@hedia/web-public 3.4.0-819 → 3.4.0-821
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{}).SENTRY_RELEASE={id:"400594dd495d16ba1f87c34f631c200064eade12"};try{e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},(t=(new e.Error).stack)&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="350d4786-7d1d-4be0-adbb-354b699ef8a2",e._sentryDebugIdIdentifier="sentry-dbid-350d4786-7d1d-4be0-adbb-354b699ef8a2")}catch(e){}var e,t;function n(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function i(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if("function"==typeof t){var n=function e(){var n=!1;try{n=this instanceof e}catch{}return n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var i=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,i.get?i:{enumerable:!0,get:function(){return e[t]}})}),n}!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))t(e);new MutationObserver(e=>{for(const n of e)if("childList"===n.type)for(const e of n.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&t(e)}).observe(document,{childList:!0,subtree:!0})}function t(e){if(e.ep)return;e.ep=!0;const t=function(e){const t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),"use-credentials"===e.crossOrigin?t.credentials="include":"anonymous"===e.crossOrigin?t.credentials="omit":t.credentials="same-origin",t}(e);fetch(e.href,t)}}();var r,a,o={exports:{}},s={};function l(){return a||(a=1,o.exports=function(){if(r)return s;r=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(t,n,i){var r=null;if(void 0!==i&&(r=""+i),void 0!==n.key&&(r=""+n.key),"key"in n)for(var a in i={},n)"key"!==a&&(i[a]=n[a]);else i=n;return n=i.ref,{$$typeof:e,type:t,key:r,ref:void 0!==n?n:null,props:i}}return s.Fragment=t,s.jsx=n,s.jsxs=n,s}()),o.exports}var u,c,d=l(),h={exports:{}},m={},p={exports:{}},f={};function g(){return c||(c=1,p.exports=(u||(u=1,function(e){function t(e,t){var n=e.length;e.push(t);e:for(;0<n;){var i=n-1>>>1,a=e[i];if(!(0<r(a,t)))break e;e[i]=t,e[n]=a,n=i}}function n(e){return 0===e.length?null:e[0]}function i(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var i=0,a=e.length,o=a>>>1;i<o;){var s=2*(i+1)-1,l=e[s],u=s+1,c=e[u];if(0>r(l,n))u<a&&0>r(c,l)?(e[i]=c,e[u]=n,i=u):(e[i]=l,e[s]=n,i=s);else{if(!(u<a&&0>r(c,n)))break e;e[i]=c,e[u]=n,i=u}}}return t}function r(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if(e.unstable_now=void 0,"object"==typeof performance&&"function"==typeof performance.now){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var l=[],u=[],c=1,d=null,h=3,m=!1,p=!1,f=!1,g=!1,_="function"==typeof setTimeout?setTimeout:null,v="function"==typeof clearTimeout?clearTimeout:null,y="undefined"!=typeof setImmediate?setImmediate:null;function b(e){for(var r=n(u);null!==r;){if(null===r.callback)i(u);else{if(!(r.startTime<=e))break;i(u),r.sortIndex=r.expirationTime,t(l,r)}r=n(u)}}function w(e){if(f=!1,b(e),!p)if(null!==n(l))p=!0,k||(k=!0,S());else{var t=n(u);null!==t&&A(w,t.startTime-e)}}var S,k=!1,C=-1,E=5,x=-1;function I(){return!(!g&&e.unstable_now()-x<E)}function T(){if(g=!1,k){var t=e.unstable_now();x=t;var r=!0;try{e:{p=!1,f&&(f=!1,v(C),C=-1),m=!0;var a=h;try{t:{for(b(t),d=n(l);null!==d&&!(d.expirationTime>t&&I());){var o=d.callback;if("function"==typeof o){d.callback=null,h=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),"function"==typeof s){d.callback=s,b(t),r=!0;break t}d===n(l)&&i(l),b(t)}else i(l);d=n(l)}if(null!==d)r=!0;else{var c=n(u);null!==c&&A(w,c.startTime-t),r=!1}}break e}finally{d=null,h=a,m=!1}r=void 0}}finally{r?S():k=!1}}}if("function"==typeof y)S=function(){y(T)};else if("undefined"!=typeof MessageChannel){var O=new MessageChannel,R=O.port2;O.port1.onmessage=T,S=function(){R.postMessage(null)}}else S=function(){_(T,0)};function A(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):E=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return h},e.unstable_next=function(e){switch(h){case 1:case 2:case 3:var t=3;break;default:t=h}var n=h;h=t;try{return e()}finally{h=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=h;h=e;try{return t()}finally{h=n}},e.unstable_scheduleCallback=function(i,r,a){var o=e.unstable_now();switch(a="object"==typeof a&&null!==a&&"number"==typeof(a=a.delay)&&0<a?o+a:o,i){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return i={id:c++,callback:r,priorityLevel:i,startTime:a,expirationTime:s=a+s,sortIndex:-1},a>o?(i.sortIndex=a,t(u,i),null===n(l)&&i===n(u)&&(f?(v(C),C=-1):f=!0,A(w,a-o))):(i.sortIndex=s,t(l,i),p||m||(p=!0,k||(k=!0,S()))),i},e.unstable_shouldYield=I,e.unstable_wrapCallback=function(e){var t=h;return function(){var n=h;h=t;try{return e.apply(this,arguments)}finally{h=n}}}}(f)),f)),p.exports}var _,v,y={exports:{}},b={};function w(){if(_)return b;_=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),r=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),o=Symbol.for("react.context"),s=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),u=Symbol.for("react.memo"),c=Symbol.for("react.lazy"),d=Symbol.iterator;var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},m=Object.assign,p={};function f(e,t,n){this.props=e,this.context=t,this.refs=p,this.updater=n||h}function g(){}function v(e,t,n){this.props=e,this.context=t,this.refs=p,this.updater=n||h}f.prototype.isReactComponent={},f.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},f.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},g.prototype=f.prototype;var y=v.prototype=new g;y.constructor=v,m(y,f.prototype),y.isPureReactComponent=!0;var w=Array.isArray,S={H:null,A:null,T:null,S:null,V:null},k=Object.prototype.hasOwnProperty;function C(t,n,i,r,a,o){return i=o.ref,{$$typeof:e,type:t,key:n,ref:void 0!==i?i:null,props:o}}function E(t){return"object"==typeof t&&null!==t&&t.$$typeof===e}var x=/\/+/g;function I(e,t){return"object"==typeof e&&null!==e&&null!=e.key?(n=""+e.key,i={"=":"=0",":":"=2"},"$"+n.replace(/[=:]/g,function(e){return i[e]})):t.toString(36);var n,i}function T(){}function O(n,i,r,a,o){var s=typeof n;"undefined"!==s&&"boolean"!==s||(n=null);var l,u,h=!1;if(null===n)h=!0;else switch(s){case"bigint":case"string":case"number":h=!0;break;case"object":switch(n.$$typeof){case e:case t:h=!0;break;case c:return O((h=n._init)(n._payload),i,r,a,o)}}if(h)return o=o(n),h=""===a?"."+I(n,0):a,w(o)?(r="",null!=h&&(r=h.replace(x,"$&/")+"/"),O(o,i,r,"",function(e){return e})):null!=o&&(E(o)&&(l=o,u=r+(null==o.key||n&&n.key===o.key?"":(""+o.key).replace(x,"$&/")+"/")+h,o=C(l.type,u,void 0,0,0,l.props)),i.push(o)),1;h=0;var m,p=""===a?".":a+":";if(w(n))for(var f=0;f<n.length;f++)h+=O(a=n[f],i,r,s=p+I(a,f),o);else if("function"==typeof(f=null===(m=n)||"object"!=typeof m?null:"function"==typeof(m=d&&m[d]||m["@@iterator"])?m:null))for(n=f.call(n),f=0;!(a=n.next()).done;)h+=O(a=a.value,i,r,s=p+I(a,f++),o);else if("object"===s){if("function"==typeof n.then)return O(function(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch("string"==typeof e.status?e.then(T,T):(e.status="pending",e.then(function(t){"pending"===e.status&&(e.status="fulfilled",e.value=t)},function(t){"pending"===e.status&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}(n),i,r,a,o);throw i=String(n),Error("Objects are not valid as a React child (found: "+("[object Object]"===i?"object with keys {"+Object.keys(n).join(", ")+"}":i)+"). If you meant to render a collection of children, use an array instead.")}return h}function R(e,t,n){if(null==e)return e;var i=[],r=0;return O(e,i,"","",function(e){return t.call(n,e,r++)}),i}function A(e){if(-1===e._status){var t=e._result;(t=t()).then(function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)},function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)}),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var L="function"==typeof reportError?reportError:function(e){if("object"==typeof window&&"function"==typeof window.ErrorEvent){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:"object"==typeof e&&null!==e&&"string"==typeof e.message?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if("object"==typeof process&&"function"==typeof process.emit)return void process.emit("uncaughtException",e);console.error(e)};function P(){}return b.Children={map:R,forEach:function(e,t,n){R(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return R(e,function(){t++}),t},toArray:function(e){return R(e,function(e){return e})||[]},only:function(e){if(!E(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},b.Component=f,b.Fragment=n,b.Profiler=r,b.PureComponent=v,b.StrictMode=i,b.Suspense=l,b.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=S,b.__COMPILER_RUNTIME={__proto__:null,c:function(e){return S.H.useMemoCache(e)}},b.cache=function(e){return function(){return e.apply(null,arguments)}},b.cloneElement=function(e,t,n){if(null==e)throw Error("The argument must be a React element, but you passed "+e+".");var i=m({},e.props),r=e.key;if(null!=t)for(a in void 0!==t.ref&&void 0,void 0!==t.key&&(r=""+t.key),t)!k.call(t,a)||"key"===a||"__self"===a||"__source"===a||"ref"===a&&void 0===t.ref||(i[a]=t[a]);var a=arguments.length-2;if(1===a)i.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];i.children=o}return C(e.type,r,void 0,0,0,i)},b.createContext=function(e){return(e={$$typeof:o,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider=e,e.Consumer={$$typeof:a,_context:e},e},b.createElement=function(e,t,n){var i,r={},a=null;if(null!=t)for(i in void 0!==t.key&&(a=""+t.key),t)k.call(t,i)&&"key"!==i&&"__self"!==i&&"__source"!==i&&(r[i]=t[i]);var o=arguments.length-2;if(1===o)r.children=n;else if(1<o){for(var s=Array(o),l=0;l<o;l++)s[l]=arguments[l+2];r.children=s}if(e&&e.defaultProps)for(i in o=e.defaultProps)void 0===r[i]&&(r[i]=o[i]);return C(e,a,void 0,0,0,r)},b.createRef=function(){return{current:null}},b.forwardRef=function(e){return{$$typeof:s,render:e}},b.isValidElement=E,b.lazy=function(e){return{$$typeof:c,_payload:{_status:-1,_result:e},_init:A}},b.memo=function(e,t){return{$$typeof:u,type:e,compare:void 0===t?null:t}},b.startTransition=function(e){var t=S.T,n={};S.T=n;try{var i=e(),r=S.S;null!==r&&r(n,i),"object"==typeof i&&null!==i&&"function"==typeof i.then&&i.then(P,L)}catch(a){L(a)}finally{S.T=t}},b.unstable_useCacheRefresh=function(){return S.H.useCacheRefresh()},b.use=function(e){return S.H.use(e)},b.useActionState=function(e,t,n){return S.H.useActionState(e,t,n)},b.useCallback=function(e,t){return S.H.useCallback(e,t)},b.useContext=function(e){return S.H.useContext(e)},b.useDebugValue=function(){},b.useDeferredValue=function(e,t){return S.H.useDeferredValue(e,t)},b.useEffect=function(e,t,n){var i=S.H;if("function"==typeof n)throw Error("useEffect CRUD overload is not enabled in this build of React.");return i.useEffect(e,t)},b.useId=function(){return S.H.useId()},b.useImperativeHandle=function(e,t,n){return S.H.useImperativeHandle(e,t,n)},b.useInsertionEffect=function(e,t){return S.H.useInsertionEffect(e,t)},b.useLayoutEffect=function(e,t){return S.H.useLayoutEffect(e,t)},b.useMemo=function(e,t){return S.H.useMemo(e,t)},b.useOptimistic=function(e,t){return S.H.useOptimistic(e,t)},b.useReducer=function(e,t,n){return S.H.useReducer(e,t,n)},b.useRef=function(e){return S.H.useRef(e)},b.useState=function(e){return S.H.useState(e)},b.useSyncExternalStore=function(e,t,n){return S.H.useSyncExternalStore(e,t,n)},b.useTransition=function(){return S.H.useTransition()},b.version="19.1.0",b}function S(){return v||(v=1,y.exports=w()),y.exports}var k,C,E,x,I={exports:{}},T={};function O(){if(k)return T;k=1;var e=S();function t(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var i={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},r=Symbol.for("react.portal");var a=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function o(e,t){return"font"===e?"":"string"==typeof t?"use-credentials"===t?t:"":void 0}return T.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,T.createPortal=function(e,n){var i=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!n||1!==n.nodeType&&9!==n.nodeType&&11!==n.nodeType)throw Error(t(299));return function(e,t,n){var i=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:r,key:null==i?null:""+i,children:e,containerInfo:t,implementation:n}}(e,n,null,i)},T.flushSync=function(e){var t=a.T,n=i.p;try{if(a.T=null,i.p=2,e)return e()}finally{a.T=t,i.p=n,i.d.f()}},T.preconnect=function(e,t){"string"==typeof e&&(t?t="string"==typeof(t=t.crossOrigin)?"use-credentials"===t?t:"":void 0:t=null,i.d.C(e,t))},T.prefetchDNS=function(e){"string"==typeof e&&i.d.D(e)},T.preinit=function(e,t){if("string"==typeof e&&t&&"string"==typeof t.as){var n=t.as,r=o(n,t.crossOrigin),a="string"==typeof t.integrity?t.integrity:void 0,s="string"==typeof t.fetchPriority?t.fetchPriority:void 0;"style"===n?i.d.S(e,"string"==typeof t.precedence?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:s}):"script"===n&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:s,nonce:"string"==typeof t.nonce?t.nonce:void 0})}},T.preinitModule=function(e,t){if("string"==typeof e)if("object"==typeof t&&null!==t){if(null==t.as||"script"===t.as){var n=o(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:"string"==typeof t.integrity?t.integrity:void 0,nonce:"string"==typeof t.nonce?t.nonce:void 0})}}else null==t&&i.d.M(e)},T.preload=function(e,t){if("string"==typeof e&&"object"==typeof t&&null!==t&&"string"==typeof t.as){var n=t.as,r=o(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:"string"==typeof t.integrity?t.integrity:void 0,nonce:"string"==typeof t.nonce?t.nonce:void 0,type:"string"==typeof t.type?t.type:void 0,fetchPriority:"string"==typeof t.fetchPriority?t.fetchPriority:void 0,referrerPolicy:"string"==typeof t.referrerPolicy?t.referrerPolicy:void 0,imageSrcSet:"string"==typeof t.imageSrcSet?t.imageSrcSet:void 0,imageSizes:"string"==typeof t.imageSizes?t.imageSizes:void 0,media:"string"==typeof t.media?t.media:void 0})}},T.preloadModule=function(e,t){if("string"==typeof e)if(t){var n=o(t.as,t.crossOrigin);i.d.m(e,{as:"string"==typeof t.as&&"script"!==t.as?t.as:void 0,crossOrigin:n,integrity:"string"==typeof t.integrity?t.integrity:void 0})}else i.d.m(e)},T.requestFormReset=function(e){i.d.r(e)},T.unstable_batchedUpdates=function(e,t){return e(t)},T.useFormState=function(e,t,n){return a.H.useFormState(e,t,n)},T.useFormStatus=function(){return a.H.useHostTransitionStatus()},T.version="19.1.0",T}function R(){if(C)return I.exports;return C=1,function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),I.exports=O(),I.exports}function A(){if(E)return m;E=1;
|
|
1
|
+
("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{}).SENTRY_RELEASE={id:"5092215ecf2b8e8842efb767b2faad40c406abff"};try{e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},(t=(new e.Error).stack)&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="e3f43446-79ca-4d0f-ace3-9b3aded9d2ed",e._sentryDebugIdIdentifier="sentry-dbid-e3f43446-79ca-4d0f-ace3-9b3aded9d2ed")}catch(e){}var e,t;function n(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function i(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if("function"==typeof t){var n=function e(){var n=!1;try{n=this instanceof e}catch{}return n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var i=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,i.get?i:{enumerable:!0,get:function(){return e[t]}})}),n}!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))t(e);new MutationObserver(e=>{for(const n of e)if("childList"===n.type)for(const e of n.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&t(e)}).observe(document,{childList:!0,subtree:!0})}function t(e){if(e.ep)return;e.ep=!0;const t=function(e){const t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),"use-credentials"===e.crossOrigin?t.credentials="include":"anonymous"===e.crossOrigin?t.credentials="omit":t.credentials="same-origin",t}(e);fetch(e.href,t)}}();var r,a,o={exports:{}},s={};function l(){return a||(a=1,o.exports=function(){if(r)return s;r=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(t,n,i){var r=null;if(void 0!==i&&(r=""+i),void 0!==n.key&&(r=""+n.key),"key"in n)for(var a in i={},n)"key"!==a&&(i[a]=n[a]);else i=n;return n=i.ref,{$$typeof:e,type:t,key:r,ref:void 0!==n?n:null,props:i}}return s.Fragment=t,s.jsx=n,s.jsxs=n,s}()),o.exports}var u,c,d=l(),h={exports:{}},m={},p={exports:{}},f={};function g(){return c||(c=1,p.exports=(u||(u=1,function(e){function t(e,t){var n=e.length;e.push(t);e:for(;0<n;){var i=n-1>>>1,a=e[i];if(!(0<r(a,t)))break e;e[i]=t,e[n]=a,n=i}}function n(e){return 0===e.length?null:e[0]}function i(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var i=0,a=e.length,o=a>>>1;i<o;){var s=2*(i+1)-1,l=e[s],u=s+1,c=e[u];if(0>r(l,n))u<a&&0>r(c,l)?(e[i]=c,e[u]=n,i=u):(e[i]=l,e[s]=n,i=s);else{if(!(u<a&&0>r(c,n)))break e;e[i]=c,e[u]=n,i=u}}}return t}function r(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if(e.unstable_now=void 0,"object"==typeof performance&&"function"==typeof performance.now){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var l=[],u=[],c=1,d=null,h=3,m=!1,p=!1,f=!1,g=!1,_="function"==typeof setTimeout?setTimeout:null,v="function"==typeof clearTimeout?clearTimeout:null,y="undefined"!=typeof setImmediate?setImmediate:null;function b(e){for(var r=n(u);null!==r;){if(null===r.callback)i(u);else{if(!(r.startTime<=e))break;i(u),r.sortIndex=r.expirationTime,t(l,r)}r=n(u)}}function w(e){if(f=!1,b(e),!p)if(null!==n(l))p=!0,k||(k=!0,S());else{var t=n(u);null!==t&&A(w,t.startTime-e)}}var S,k=!1,C=-1,E=5,x=-1;function I(){return!(!g&&e.unstable_now()-x<E)}function T(){if(g=!1,k){var t=e.unstable_now();x=t;var r=!0;try{e:{p=!1,f&&(f=!1,v(C),C=-1),m=!0;var a=h;try{t:{for(b(t),d=n(l);null!==d&&!(d.expirationTime>t&&I());){var o=d.callback;if("function"==typeof o){d.callback=null,h=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),"function"==typeof s){d.callback=s,b(t),r=!0;break t}d===n(l)&&i(l),b(t)}else i(l);d=n(l)}if(null!==d)r=!0;else{var c=n(u);null!==c&&A(w,c.startTime-t),r=!1}}break e}finally{d=null,h=a,m=!1}r=void 0}}finally{r?S():k=!1}}}if("function"==typeof y)S=function(){y(T)};else if("undefined"!=typeof MessageChannel){var O=new MessageChannel,R=O.port2;O.port1.onmessage=T,S=function(){R.postMessage(null)}}else S=function(){_(T,0)};function A(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):E=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return h},e.unstable_next=function(e){switch(h){case 1:case 2:case 3:var t=3;break;default:t=h}var n=h;h=t;try{return e()}finally{h=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=h;h=e;try{return t()}finally{h=n}},e.unstable_scheduleCallback=function(i,r,a){var o=e.unstable_now();switch(a="object"==typeof a&&null!==a&&"number"==typeof(a=a.delay)&&0<a?o+a:o,i){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return i={id:c++,callback:r,priorityLevel:i,startTime:a,expirationTime:s=a+s,sortIndex:-1},a>o?(i.sortIndex=a,t(u,i),null===n(l)&&i===n(u)&&(f?(v(C),C=-1):f=!0,A(w,a-o))):(i.sortIndex=s,t(l,i),p||m||(p=!0,k||(k=!0,S()))),i},e.unstable_shouldYield=I,e.unstable_wrapCallback=function(e){var t=h;return function(){var n=h;h=t;try{return e.apply(this,arguments)}finally{h=n}}}}(f)),f)),p.exports}var _,v,y={exports:{}},b={};function w(){if(_)return b;_=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),r=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),o=Symbol.for("react.context"),s=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),u=Symbol.for("react.memo"),c=Symbol.for("react.lazy"),d=Symbol.iterator;var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},m=Object.assign,p={};function f(e,t,n){this.props=e,this.context=t,this.refs=p,this.updater=n||h}function g(){}function v(e,t,n){this.props=e,this.context=t,this.refs=p,this.updater=n||h}f.prototype.isReactComponent={},f.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},f.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},g.prototype=f.prototype;var y=v.prototype=new g;y.constructor=v,m(y,f.prototype),y.isPureReactComponent=!0;var w=Array.isArray,S={H:null,A:null,T:null,S:null,V:null},k=Object.prototype.hasOwnProperty;function C(t,n,i,r,a,o){return i=o.ref,{$$typeof:e,type:t,key:n,ref:void 0!==i?i:null,props:o}}function E(t){return"object"==typeof t&&null!==t&&t.$$typeof===e}var x=/\/+/g;function I(e,t){return"object"==typeof e&&null!==e&&null!=e.key?(n=""+e.key,i={"=":"=0",":":"=2"},"$"+n.replace(/[=:]/g,function(e){return i[e]})):t.toString(36);var n,i}function T(){}function O(n,i,r,a,o){var s=typeof n;"undefined"!==s&&"boolean"!==s||(n=null);var l,u,h=!1;if(null===n)h=!0;else switch(s){case"bigint":case"string":case"number":h=!0;break;case"object":switch(n.$$typeof){case e:case t:h=!0;break;case c:return O((h=n._init)(n._payload),i,r,a,o)}}if(h)return o=o(n),h=""===a?"."+I(n,0):a,w(o)?(r="",null!=h&&(r=h.replace(x,"$&/")+"/"),O(o,i,r,"",function(e){return e})):null!=o&&(E(o)&&(l=o,u=r+(null==o.key||n&&n.key===o.key?"":(""+o.key).replace(x,"$&/")+"/")+h,o=C(l.type,u,void 0,0,0,l.props)),i.push(o)),1;h=0;var m,p=""===a?".":a+":";if(w(n))for(var f=0;f<n.length;f++)h+=O(a=n[f],i,r,s=p+I(a,f),o);else if("function"==typeof(f=null===(m=n)||"object"!=typeof m?null:"function"==typeof(m=d&&m[d]||m["@@iterator"])?m:null))for(n=f.call(n),f=0;!(a=n.next()).done;)h+=O(a=a.value,i,r,s=p+I(a,f++),o);else if("object"===s){if("function"==typeof n.then)return O(function(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch("string"==typeof e.status?e.then(T,T):(e.status="pending",e.then(function(t){"pending"===e.status&&(e.status="fulfilled",e.value=t)},function(t){"pending"===e.status&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}(n),i,r,a,o);throw i=String(n),Error("Objects are not valid as a React child (found: "+("[object Object]"===i?"object with keys {"+Object.keys(n).join(", ")+"}":i)+"). If you meant to render a collection of children, use an array instead.")}return h}function R(e,t,n){if(null==e)return e;var i=[],r=0;return O(e,i,"","",function(e){return t.call(n,e,r++)}),i}function A(e){if(-1===e._status){var t=e._result;(t=t()).then(function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)},function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)}),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var L="function"==typeof reportError?reportError:function(e){if("object"==typeof window&&"function"==typeof window.ErrorEvent){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:"object"==typeof e&&null!==e&&"string"==typeof e.message?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if("object"==typeof process&&"function"==typeof process.emit)return void process.emit("uncaughtException",e);console.error(e)};function P(){}return b.Children={map:R,forEach:function(e,t,n){R(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return R(e,function(){t++}),t},toArray:function(e){return R(e,function(e){return e})||[]},only:function(e){if(!E(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},b.Component=f,b.Fragment=n,b.Profiler=r,b.PureComponent=v,b.StrictMode=i,b.Suspense=l,b.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=S,b.__COMPILER_RUNTIME={__proto__:null,c:function(e){return S.H.useMemoCache(e)}},b.cache=function(e){return function(){return e.apply(null,arguments)}},b.cloneElement=function(e,t,n){if(null==e)throw Error("The argument must be a React element, but you passed "+e+".");var i=m({},e.props),r=e.key;if(null!=t)for(a in void 0!==t.ref&&void 0,void 0!==t.key&&(r=""+t.key),t)!k.call(t,a)||"key"===a||"__self"===a||"__source"===a||"ref"===a&&void 0===t.ref||(i[a]=t[a]);var a=arguments.length-2;if(1===a)i.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];i.children=o}return C(e.type,r,void 0,0,0,i)},b.createContext=function(e){return(e={$$typeof:o,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider=e,e.Consumer={$$typeof:a,_context:e},e},b.createElement=function(e,t,n){var i,r={},a=null;if(null!=t)for(i in void 0!==t.key&&(a=""+t.key),t)k.call(t,i)&&"key"!==i&&"__self"!==i&&"__source"!==i&&(r[i]=t[i]);var o=arguments.length-2;if(1===o)r.children=n;else if(1<o){for(var s=Array(o),l=0;l<o;l++)s[l]=arguments[l+2];r.children=s}if(e&&e.defaultProps)for(i in o=e.defaultProps)void 0===r[i]&&(r[i]=o[i]);return C(e,a,void 0,0,0,r)},b.createRef=function(){return{current:null}},b.forwardRef=function(e){return{$$typeof:s,render:e}},b.isValidElement=E,b.lazy=function(e){return{$$typeof:c,_payload:{_status:-1,_result:e},_init:A}},b.memo=function(e,t){return{$$typeof:u,type:e,compare:void 0===t?null:t}},b.startTransition=function(e){var t=S.T,n={};S.T=n;try{var i=e(),r=S.S;null!==r&&r(n,i),"object"==typeof i&&null!==i&&"function"==typeof i.then&&i.then(P,L)}catch(a){L(a)}finally{S.T=t}},b.unstable_useCacheRefresh=function(){return S.H.useCacheRefresh()},b.use=function(e){return S.H.use(e)},b.useActionState=function(e,t,n){return S.H.useActionState(e,t,n)},b.useCallback=function(e,t){return S.H.useCallback(e,t)},b.useContext=function(e){return S.H.useContext(e)},b.useDebugValue=function(){},b.useDeferredValue=function(e,t){return S.H.useDeferredValue(e,t)},b.useEffect=function(e,t,n){var i=S.H;if("function"==typeof n)throw Error("useEffect CRUD overload is not enabled in this build of React.");return i.useEffect(e,t)},b.useId=function(){return S.H.useId()},b.useImperativeHandle=function(e,t,n){return S.H.useImperativeHandle(e,t,n)},b.useInsertionEffect=function(e,t){return S.H.useInsertionEffect(e,t)},b.useLayoutEffect=function(e,t){return S.H.useLayoutEffect(e,t)},b.useMemo=function(e,t){return S.H.useMemo(e,t)},b.useOptimistic=function(e,t){return S.H.useOptimistic(e,t)},b.useReducer=function(e,t,n){return S.H.useReducer(e,t,n)},b.useRef=function(e){return S.H.useRef(e)},b.useState=function(e){return S.H.useState(e)},b.useSyncExternalStore=function(e,t,n){return S.H.useSyncExternalStore(e,t,n)},b.useTransition=function(){return S.H.useTransition()},b.version="19.1.0",b}function S(){return v||(v=1,y.exports=w()),y.exports}var k,C,E,x,I={exports:{}},T={};function O(){if(k)return T;k=1;var e=S();function t(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var i={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},r=Symbol.for("react.portal");var a=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function o(e,t){return"font"===e?"":"string"==typeof t?"use-credentials"===t?t:"":void 0}return T.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,T.createPortal=function(e,n){var i=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!n||1!==n.nodeType&&9!==n.nodeType&&11!==n.nodeType)throw Error(t(299));return function(e,t,n){var i=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:r,key:null==i?null:""+i,children:e,containerInfo:t,implementation:n}}(e,n,null,i)},T.flushSync=function(e){var t=a.T,n=i.p;try{if(a.T=null,i.p=2,e)return e()}finally{a.T=t,i.p=n,i.d.f()}},T.preconnect=function(e,t){"string"==typeof e&&(t?t="string"==typeof(t=t.crossOrigin)?"use-credentials"===t?t:"":void 0:t=null,i.d.C(e,t))},T.prefetchDNS=function(e){"string"==typeof e&&i.d.D(e)},T.preinit=function(e,t){if("string"==typeof e&&t&&"string"==typeof t.as){var n=t.as,r=o(n,t.crossOrigin),a="string"==typeof t.integrity?t.integrity:void 0,s="string"==typeof t.fetchPriority?t.fetchPriority:void 0;"style"===n?i.d.S(e,"string"==typeof t.precedence?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:s}):"script"===n&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:s,nonce:"string"==typeof t.nonce?t.nonce:void 0})}},T.preinitModule=function(e,t){if("string"==typeof e)if("object"==typeof t&&null!==t){if(null==t.as||"script"===t.as){var n=o(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:"string"==typeof t.integrity?t.integrity:void 0,nonce:"string"==typeof t.nonce?t.nonce:void 0})}}else null==t&&i.d.M(e)},T.preload=function(e,t){if("string"==typeof e&&"object"==typeof t&&null!==t&&"string"==typeof t.as){var n=t.as,r=o(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:"string"==typeof t.integrity?t.integrity:void 0,nonce:"string"==typeof t.nonce?t.nonce:void 0,type:"string"==typeof t.type?t.type:void 0,fetchPriority:"string"==typeof t.fetchPriority?t.fetchPriority:void 0,referrerPolicy:"string"==typeof t.referrerPolicy?t.referrerPolicy:void 0,imageSrcSet:"string"==typeof t.imageSrcSet?t.imageSrcSet:void 0,imageSizes:"string"==typeof t.imageSizes?t.imageSizes:void 0,media:"string"==typeof t.media?t.media:void 0})}},T.preloadModule=function(e,t){if("string"==typeof e)if(t){var n=o(t.as,t.crossOrigin);i.d.m(e,{as:"string"==typeof t.as&&"script"!==t.as?t.as:void 0,crossOrigin:n,integrity:"string"==typeof t.integrity?t.integrity:void 0})}else i.d.m(e)},T.requestFormReset=function(e){i.d.r(e)},T.unstable_batchedUpdates=function(e,t){return e(t)},T.useFormState=function(e,t,n){return a.H.useFormState(e,t,n)},T.useFormStatus=function(){return a.H.useHostTransitionStatus()},T.version="19.1.0",T}function R(){if(C)return I.exports;return C=1,function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),I.exports=O(),I.exports}function A(){if(E)return m;E=1;
|
|
2
2
|
/**
|
|
3
3
|
* @license React
|
|
4
4
|
* react-dom-client.production.js
|
|
@@ -16,5 +16,5 @@ var t=g(),n=S(),i=R();function r(e){var t="https://react.dev/errors/"+e;if(1<arg
|
|
|
16
16
|
* @author Feross Aboukhadijeh <https://feross.org>
|
|
17
17
|
* @license MIT
|
|
18
18
|
*/
|
|
19
|
-
const n=function(){if(Bz)return Vz;Bz=1,Vz.byteLength=function(e){var t=a(e),n=t[0],i=t[1];return 3*(n+i)/4-i},Vz.toByteArray=function(e){var i,r,o=a(e),s=o[0],l=o[1],u=new n(function(e,t,n){return 3*(t+n)/4-n}(0,s,l)),c=0,d=l>0?s-4:s;for(r=0;r<d;r+=4)i=t[e.charCodeAt(r)]<<18|t[e.charCodeAt(r+1)]<<12|t[e.charCodeAt(r+2)]<<6|t[e.charCodeAt(r+3)],u[c++]=i>>16&255,u[c++]=i>>8&255,u[c++]=255&i;return 2===l&&(i=t[e.charCodeAt(r)]<<2|t[e.charCodeAt(r+1)]>>4,u[c++]=255&i),1===l&&(i=t[e.charCodeAt(r)]<<10|t[e.charCodeAt(r+1)]<<4|t[e.charCodeAt(r+2)]>>2,u[c++]=i>>8&255,u[c++]=255&i),u},Vz.fromByteArray=function(t){for(var n,i=t.length,r=i%3,a=[],o=16383,l=0,u=i-r;l<u;l+=o)a.push(s(t,l,l+o>u?u:l+o));return 1===r?(n=t[i-1],a.push(e[n>>2]+e[n<<4&63]+"==")):2===r&&(n=(t[i-2]<<8)+t[i-1],a.push(e[n>>10]+e[n>>4&63]+e[n<<2&63]+"=")),a.join("")};for(var e=[],t=[],n="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r=0;r<64;++r)e[r]=i[r],t[i.charCodeAt(r)]=r;function a(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function o(t){return e[t>>18&63]+e[t>>12&63]+e[t>>6&63]+e[63&t]}function s(e,t,n){for(var i,r=[],a=t;a<n;a+=3)i=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),r.push(o(i));return r.join("")}return t["-".charCodeAt(0)]=62,t["_".charCodeAt(0)]=63,Vz}(),i=(Hz||(Hz=1,Uz.read=function(e,t,n,i,r){var a,o,s=8*r-i-1,l=(1<<s)-1,u=l>>1,c=-7,d=n?r-1:0,h=n?-1:1,m=e[t+d];for(d+=h,a=m&(1<<-c)-1,m>>=-c,c+=s;c>0;a=256*a+e[t+d],d+=h,c-=8);for(o=a&(1<<-c)-1,a>>=-c,c+=i;c>0;o=256*o+e[t+d],d+=h,c-=8);if(0===a)a=1-u;else{if(a===l)return o?NaN:1/0*(m?-1:1);o+=Math.pow(2,i),a-=u}return(m?-1:1)*o*Math.pow(2,a-i)},Uz.write=function(e,t,n,i,r,a){var o,s,l,u=8*a-r-1,c=(1<<u)-1,d=c>>1,h=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,m=i?0:a-1,p=i?1:-1,f=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=c):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),(t+=o+d>=1?h/l:h*Math.pow(2,1-d))*l>=2&&(o++,l/=2),o+d>=c?(s=0,o=c):o+d>=1?(s=(t*l-1)*Math.pow(2,r),o+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,r),o=0));r>=8;e[n+m]=255&s,m+=p,s/=256,r-=8);for(o=o<<r|s,u+=r;u>0;e[n+m]=255&o,m+=p,o/=256,u-=8);e[n+m-p]|=128*f}),Uz),r="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=s,t.SlowBuffer=function(e){return+e!=e&&(e=0),s.alloc(+e)},t.INSPECT_MAX_BYTES=50;const a=2147483647;function o(e){if(e>a)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,s.prototype),t}function s(e,t,n){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return c(e)}return l(e,t,n)}function l(e,t,n){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!s.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const n=0|p(e,t);let i=o(n);const r=i.write(e,t);return r!==n&&(i=i.slice(0,r)),i}(e,t);if(ArrayBuffer.isView(e))return function(e){if(X(e,Uint8Array)){const t=new Uint8Array(e);return h(t.buffer,t.byteOffset,t.byteLength)}return d(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(X(e,ArrayBuffer)||e&&X(e.buffer,ArrayBuffer))return h(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&(X(e,SharedArrayBuffer)||e&&X(e.buffer,SharedArrayBuffer)))return h(e,t,n);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const i=e.valueOf&&e.valueOf();if(null!=i&&i!==e)return s.from(i,t,n);const r=function(e){if(s.isBuffer(e)){const t=0|m(e.length),n=o(t);return 0===n.length||e.copy(n,0,0,t),n}return void 0!==e.length?"number"!=typeof e.length||q(e.length)?o(0):d(e):"Buffer"===e.type&&Array.isArray(e.data)?d(e.data):void 0}(e);if(r)return r;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return s.from(e[Symbol.toPrimitive]("string"),t,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function u(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function c(e){return u(e),o(e<0?0:0|m(e))}function d(e){const t=e.length<0?0:0|m(e.length),n=o(t);for(let i=0;i<t;i+=1)n[i]=255&e[i];return n}function h(e,t,n){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(n||0))throw new RangeError('"length" is outside of buffer bounds');let i;return i=void 0===t&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,t):new Uint8Array(e,t,n),Object.setPrototypeOf(i,s.prototype),i}function m(e){if(e>=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|e}function p(e,t){if(s.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||X(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const n=e.length,i=arguments.length>2&&!0===arguments[2];if(!i&&0===n)return 0;let r=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return W(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return Y(e).length;default:if(r)return i?-1:W(e).length;t=(""+t).toLowerCase(),r=!0}}function f(e,t,n){let i=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return O(this,t,n);case"utf8":case"utf-8":return E(this,t,n);case"ascii":return I(this,t,n);case"latin1":case"binary":return T(this,t,n);case"base64":return C(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,t,n);default:if(i)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),i=!0}}function g(e,t,n){const i=e[t];e[t]=e[n],e[n]=i}function _(e,t,n,i,r){if(0===e.length)return-1;if("string"==typeof n?(i=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),q(n=+n)&&(n=r?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(r)return-1;n=e.length-1}else if(n<0){if(!r)return-1;n=0}if("string"==typeof t&&(t=s.from(t,i)),s.isBuffer(t))return 0===t.length?-1:v(e,t,n,i,r);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?r?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):v(e,[t],n,i,r);throw new TypeError("val must be string, number or Buffer")}function v(e,t,n,i,r){let a,o=1,s=e.length,l=t.length;if(void 0!==i&&("ucs2"===(i=String(i).toLowerCase())||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(e.length<2||t.length<2)return-1;o=2,s/=2,l/=2,n/=2}function u(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(r){let i=-1;for(a=n;a<s;a++)if(u(e,a)===u(t,-1===i?0:a-i)){if(-1===i&&(i=a),a-i+1===l)return i*o}else-1!==i&&(a-=a-i),i=-1}else for(n+l>s&&(n=s-l),a=n;a>=0;a--){let n=!0;for(let i=0;i<l;i++)if(u(e,a+i)!==u(t,i)){n=!1;break}if(n)return a}return-1}function y(e,t,n,i){n=Number(n)||0;const r=e.length-n;i?(i=Number(i))>r&&(i=r):i=r;const a=t.length;let o;for(i>a/2&&(i=a/2),o=0;o<i;++o){const i=parseInt(t.substr(2*o,2),16);if(q(i))return o;e[n+o]=i}return o}function b(e,t,n,i){return $(W(t,e.length-n),e,n,i)}function w(e,t,n,i){return $(function(e){const t=[];for(let n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,i)}function S(e,t,n,i){return $(Y(t),e,n,i)}function k(e,t,n,i){return $(function(e,t){let n,i,r;const a=[];for(let o=0;o<e.length&&!((t-=2)<0);++o)n=e.charCodeAt(o),i=n>>8,r=n%256,a.push(r),a.push(i);return a}(t,e.length-n),e,n,i)}function C(e,t,i){return 0===t&&i===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,i))}function E(e,t,n){n=Math.min(e.length,n);const i=[];let r=t;for(;r<n;){const t=e[r];let a=null,o=t>239?4:t>223?3:t>191?2:1;if(r+o<=n){let n,i,s,l;switch(o){case 1:t<128&&(a=t);break;case 2:n=e[r+1],128==(192&n)&&(l=(31&t)<<6|63&n,l>127&&(a=l));break;case 3:n=e[r+1],i=e[r+2],128==(192&n)&&128==(192&i)&&(l=(15&t)<<12|(63&n)<<6|63&i,l>2047&&(l<55296||l>57343)&&(a=l));break;case 4:n=e[r+1],i=e[r+2],s=e[r+3],128==(192&n)&&128==(192&i)&&128==(192&s)&&(l=(15&t)<<18|(63&n)<<12|(63&i)<<6|63&s,l>65535&&l<1114112&&(a=l))}}null===a?(a=65533,o=1):a>65535&&(a-=65536,i.push(a>>>10&1023|55296),a=56320|1023&a),i.push(a),r+=o}return function(e){const t=e.length;if(t<=x)return String.fromCharCode.apply(String,e);let n="",i=0;for(;i<t;)n+=String.fromCharCode.apply(String,e.slice(i,i+=x));return n}(i)}t.kMaxLength=a,s.TYPED_ARRAY_SUPPORT=function(){try{const e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),s.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}}),s.poolSize=8192,s.from=function(e,t,n){return l(e,t,n)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array),s.alloc=function(e,t,n){return function(e,t,n){return u(e),e<=0?o(e):void 0!==t?"string"==typeof n?o(e).fill(t,n):o(e).fill(t):o(e)}(e,t,n)},s.allocUnsafe=function(e){return c(e)},s.allocUnsafeSlow=function(e){return c(e)},s.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==s.prototype},s.compare=function(e,t){if(X(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),X(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),!s.isBuffer(e)||!s.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let n=e.length,i=t.length;for(let r=0,a=Math.min(n,i);r<a;++r)if(e[r]!==t[r]){n=e[r],i=t[r];break}return n<i?-1:i<n?1:0},s.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},s.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return s.alloc(0);let n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;const i=s.allocUnsafe(t);let r=0;for(n=0;n<e.length;++n){let t=e[n];if(X(t,Uint8Array))r+t.length>i.length?(s.isBuffer(t)||(t=s.from(t)),t.copy(i,r)):Uint8Array.prototype.set.call(i,t,r);else{if(!s.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(i,r)}r+=t.length}return i},s.byteLength=p,s.prototype._isBuffer=!0,s.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)g(this,t,t+1);return this},s.prototype.swap32=function(){const e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)g(this,t,t+3),g(this,t+1,t+2);return this},s.prototype.swap64=function(){const e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)g(this,t,t+7),g(this,t+1,t+6),g(this,t+2,t+5),g(this,t+3,t+4);return this},s.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?E(this,0,e):f.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(e){if(!s.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===s.compare(this,e)},s.prototype.inspect=function(){let e="";const n=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,n).replace(/(.{2})/g,"$1 ").trim(),this.length>n&&(e+=" ... "),"<Buffer "+e+">"},r&&(s.prototype[r]=s.prototype.inspect),s.prototype.compare=function(e,t,n,i,r){if(X(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),!s.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===i&&(i=0),void 0===r&&(r=this.length),t<0||n>e.length||i<0||r>this.length)throw new RangeError("out of range index");if(i>=r&&t>=n)return 0;if(i>=r)return-1;if(t>=n)return 1;if(this===e)return 0;let a=(r>>>=0)-(i>>>=0),o=(n>>>=0)-(t>>>=0);const l=Math.min(a,o),u=this.slice(i,r),c=e.slice(t,n);for(let s=0;s<l;++s)if(u[s]!==c[s]){a=u[s],o=c[s];break}return a<o?-1:o<a?1:0},s.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},s.prototype.indexOf=function(e,t,n){return _(this,e,t,n,!0)},s.prototype.lastIndexOf=function(e,t,n){return _(this,e,t,n,!1)},s.prototype.write=function(e,t,n,i){if(void 0===t)i="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)i=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(n)?(n>>>=0,void 0===i&&(i="utf8")):(i=n,n=void 0)}const r=this.length-t;if((void 0===n||n>r)&&(n=r),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");let a=!1;for(;;)switch(i){case"hex":return y(this,e,t,n);case"utf8":case"utf-8":return b(this,e,t,n);case"ascii":case"latin1":case"binary":return w(this,e,t,n);case"base64":return S(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,e,t,n);default:if(a)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),a=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const x=4096;function I(e,t,n){let i="";n=Math.min(e.length,n);for(let r=t;r<n;++r)i+=String.fromCharCode(127&e[r]);return i}function T(e,t,n){let i="";n=Math.min(e.length,n);for(let r=t;r<n;++r)i+=String.fromCharCode(e[r]);return i}function O(e,t,n){const i=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>i)&&(n=i);let r="";for(let a=t;a<n;++a)r+=Z[e[a]];return r}function R(e,t,n){const i=e.slice(t,n);let r="";for(let a=0;a<i.length-1;a+=2)r+=String.fromCharCode(i[a]+256*i[a+1]);return r}function A(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function L(e,t,n,i,r,a){if(!s.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>r||t<a)throw new RangeError('"value" argument is out of bounds');if(n+i>e.length)throw new RangeError("Index out of range")}function P(e,t,n,i,r){H(t,i,r,e,n,7);let a=Number(t&BigInt(4294967295));e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[n++]=o,o>>=8,e[n++]=o,o>>=8,e[n++]=o,o>>=8,e[n++]=o,n}function M(e,t,n,i,r){H(t,i,r,e,n,7);let a=Number(t&BigInt(4294967295));e[n+7]=a,a>>=8,e[n+6]=a,a>>=8,e[n+5]=a,a>>=8,e[n+4]=a;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[n+3]=o,o>>=8,e[n+2]=o,o>>=8,e[n+1]=o,o>>=8,e[n]=o,n+8}function D(e,t,n,i,r,a){if(n+i>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function N(e,t,n,r,a){return t=+t,n>>>=0,a||D(e,0,n,4),i.write(e,t,n,r,23,4),n+4}function F(e,t,n,r,a){return t=+t,n>>>=0,a||D(e,0,n,8),i.write(e,t,n,r,52,8),n+8}s.prototype.slice=function(e,t){const n=this.length;(e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e);const i=this.subarray(e,t);return Object.setPrototypeOf(i,s.prototype),i},s.prototype.readUintLE=s.prototype.readUIntLE=function(e,t,n){e>>>=0,t>>>=0,n||A(e,t,this.length);let i=this[e],r=1,a=0;for(;++a<t&&(r*=256);)i+=this[e+a]*r;return i},s.prototype.readUintBE=s.prototype.readUIntBE=function(e,t,n){e>>>=0,t>>>=0,n||A(e,t,this.length);let i=this[e+--t],r=1;for(;t>0&&(r*=256);)i+=this[e+--t]*r;return i},s.prototype.readUint8=s.prototype.readUInt8=function(e,t){return e>>>=0,t||A(e,1,this.length),this[e]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(e,t){return e>>>=0,t||A(e,2,this.length),this[e]|this[e+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(e,t){return e>>>=0,t||A(e,2,this.length),this[e]<<8|this[e+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(e,t){return e>>>=0,t||A(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(e,t){return e>>>=0,t||A(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},s.prototype.readBigUInt64LE=K(function(e){z(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||U(e,this.length-8);const i=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,r=this[++e]+256*this[++e]+65536*this[++e]+n*2**24;return BigInt(i)+(BigInt(r)<<BigInt(32))}),s.prototype.readBigUInt64BE=K(function(e){z(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||U(e,this.length-8);const i=t*2**24+65536*this[++e]+256*this[++e]+this[++e],r=this[++e]*2**24+65536*this[++e]+256*this[++e]+n;return(BigInt(i)<<BigInt(32))+BigInt(r)}),s.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||A(e,t,this.length);let i=this[e],r=1,a=0;for(;++a<t&&(r*=256);)i+=this[e+a]*r;return r*=128,i>=r&&(i-=Math.pow(2,8*t)),i},s.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||A(e,t,this.length);let i=t,r=1,a=this[e+--i];for(;i>0&&(r*=256);)a+=this[e+--i]*r;return r*=128,a>=r&&(a-=Math.pow(2,8*t)),a},s.prototype.readInt8=function(e,t){return e>>>=0,t||A(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},s.prototype.readInt16LE=function(e,t){e>>>=0,t||A(e,2,this.length);const n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt16BE=function(e,t){e>>>=0,t||A(e,2,this.length);const n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt32LE=function(e,t){return e>>>=0,t||A(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},s.prototype.readInt32BE=function(e,t){return e>>>=0,t||A(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},s.prototype.readBigInt64LE=K(function(e){z(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||U(e,this.length-8);const i=this[e+4]+256*this[e+5]+65536*this[e+6]+(n<<24);return(BigInt(i)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)}),s.prototype.readBigInt64BE=K(function(e){z(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||U(e,this.length-8);const i=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(i)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+n)}),s.prototype.readFloatLE=function(e,t){return e>>>=0,t||A(e,4,this.length),i.read(this,e,!0,23,4)},s.prototype.readFloatBE=function(e,t){return e>>>=0,t||A(e,4,this.length),i.read(this,e,!1,23,4)},s.prototype.readDoubleLE=function(e,t){return e>>>=0,t||A(e,8,this.length),i.read(this,e,!0,52,8)},s.prototype.readDoubleBE=function(e,t){return e>>>=0,t||A(e,8,this.length),i.read(this,e,!1,52,8)},s.prototype.writeUintLE=s.prototype.writeUIntLE=function(e,t,n,i){e=+e,t>>>=0,n>>>=0,i||L(this,e,t,n,Math.pow(2,8*n)-1,0);let r=1,a=0;for(this[t]=255&e;++a<n&&(r*=256);)this[t+a]=e/r&255;return t+n},s.prototype.writeUintBE=s.prototype.writeUIntBE=function(e,t,n,i){e=+e,t>>>=0,n>>>=0,i||L(this,e,t,n,Math.pow(2,8*n)-1,0);let r=n-1,a=1;for(this[t+r]=255&e;--r>=0&&(a*=256);)this[t+r]=e/a&255;return t+n},s.prototype.writeUint8=s.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||L(this,e,t,1,255,0),this[t]=255&e,t+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||L(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||L(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||L(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||L(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},s.prototype.writeBigUInt64LE=K(function(e,t=0){return P(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeBigUInt64BE=K(function(e,t=0){return M(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeIntLE=function(e,t,n,i){if(e=+e,t>>>=0,!i){const i=Math.pow(2,8*n-1);L(this,e,t,n,i-1,-i)}let r=0,a=1,o=0;for(this[t]=255&e;++r<n&&(a*=256);)e<0&&0===o&&0!==this[t+r-1]&&(o=1),this[t+r]=(e/a|0)-o&255;return t+n},s.prototype.writeIntBE=function(e,t,n,i){if(e=+e,t>>>=0,!i){const i=Math.pow(2,8*n-1);L(this,e,t,n,i-1,-i)}let r=n-1,a=1,o=0;for(this[t+r]=255&e;--r>=0&&(a*=256);)e<0&&0===o&&0!==this[t+r+1]&&(o=1),this[t+r]=(e/a|0)-o&255;return t+n},s.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||L(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},s.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||L(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},s.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||L(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},s.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||L(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},s.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||L(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},s.prototype.writeBigInt64LE=K(function(e,t=0){return P(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),s.prototype.writeBigInt64BE=K(function(e,t=0){return M(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),s.prototype.writeFloatLE=function(e,t,n){return N(this,e,t,!0,n)},s.prototype.writeFloatBE=function(e,t,n){return N(this,e,t,!1,n)},s.prototype.writeDoubleLE=function(e,t,n){return F(this,e,t,!0,n)},s.prototype.writeDoubleBE=function(e,t,n){return F(this,e,t,!1,n)},s.prototype.copy=function(e,t,n,i){if(!s.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),i||0===i||(i=this.length),t>=e.length&&(t=e.length),t||(t=0),i>0&&i<n&&(i=n),i===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-t<i-n&&(i=e.length-t+n);const r=i-n;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,n,i):Uint8Array.prototype.set.call(e,this.subarray(n,i),t),r},s.prototype.fill=function(e,t,n,i){if("string"==typeof e){if("string"==typeof t?(i=t,t=0,n=this.length):"string"==typeof n&&(i=n,n=this.length),void 0!==i&&"string"!=typeof i)throw new TypeError("encoding must be a string");if("string"==typeof i&&!s.isEncoding(i))throw new TypeError("Unknown encoding: "+i);if(1===e.length){const t=e.charCodeAt(0);("utf8"===i&&t<128||"latin1"===i)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;let r;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(r=t;r<n;++r)this[r]=e;else{const a=s.isBuffer(e)?e:s.from(e,i),o=a.length;if(0===o)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(r=0;r<n-t;++r)this[r+t]=a[r%o]}return this};const B={};function j(e,t,n){B[e]=class extends n{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function V(e){let t="",n=e.length;const i="-"===e[0]?1:0;for(;n>=i+4;n-=3)t=`_${e.slice(n-3,n)}${t}`;return`${e.slice(0,n)}${t}`}function H(e,t,n,i,r,a){if(e>n||e<t){const n="bigint"==typeof t?"n":"";let i;throw i=0===t||t===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(a+1)}${n}`:`>= -(2${n} ** ${8*(a+1)-1}${n}) and < 2 ** ${8*(a+1)-1}${n}`,new B.ERR_OUT_OF_RANGE("value",i,e)}!function(e,t,n){z(t,"offset"),void 0!==e[t]&&void 0!==e[t+n]||U(t,e.length-(n+1))}(i,r,a)}function z(e,t){if("number"!=typeof e)throw new B.ERR_INVALID_ARG_TYPE(t,"number",e)}function U(e,t,n){if(Math.floor(e)!==e)throw z(e,n),new B.ERR_OUT_OF_RANGE("offset","an integer",e);if(t<0)throw new B.ERR_BUFFER_OUT_OF_BOUNDS;throw new B.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${t}`,e)}j("ERR_BUFFER_OUT_OF_BOUNDS",function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),j("ERR_INVALID_ARG_TYPE",function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`},TypeError),j("ERR_OUT_OF_RANGE",function(e,t,n){let i=`The value of "${e}" is out of range.`,r=n;return Number.isInteger(n)&&Math.abs(n)>2**32?r=V(String(n)):"bigint"==typeof n&&(r=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(r=V(r)),r+="n"),i+=` It must be ${t}. Received ${r}`,i},RangeError);const G=/[^+/0-9A-Za-z-_]/g;function W(e,t){let n;t=t||1/0;const i=e.length;let r=null;const a=[];for(let o=0;o<i;++o){if(n=e.charCodeAt(o),n>55295&&n<57344){if(!r){if(n>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(o+1===i){(t-=3)>-1&&a.push(239,191,189);continue}r=n;continue}if(n<56320){(t-=3)>-1&&a.push(239,191,189),r=n;continue}n=65536+(r-55296<<10|n-56320)}else r&&(t-=3)>-1&&a.push(239,191,189);if(r=null,n<128){if((t-=1)<0)break;a.push(n)}else if(n<2048){if((t-=2)<0)break;a.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;a.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return a}function Y(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(G,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function $(e,t,n,i){let r;for(r=0;r<i&&!(r+n>=t.length||r>=e.length);++r)t[r+n]=e[r];return r}function X(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function q(e){return e!=e}const Z=function(){const e="0123456789abcdef",t=new Array(256);for(let n=0;n<16;++n){const i=16*n;for(let r=0;r<16;++r)t[i+r]=e[n]+e[r]}return t}();function K(e){return"undefined"==typeof BigInt?Q:e}function Q(){throw new Error("BigInt not supported")}}(jz)),jz);const{OAUTH_BASE_URL:Wz="",OAUTH_CLIENT_ID:Yz=""}=zj,$z={accessToken:qj.getString("access_token"),refreshToken:qj.getString("refresh_token"),isOnboardingFinished:qj.getBoolean("isOnboardingFinished"),isLicenseValid:!1,cgmStatus:{available:!1,active:!1}},Xz=uL()(jj(e=>({...$z,setTokens:({accessToken:t,refreshToken:n})=>{e({accessToken:t,refreshToken:n})},setIsOnboardingFinished:t=>{e({isOnboardingFinished:t})},setIsLicenseValid:t=>{e({isLicenseValid:t})},setCgmStatus:t=>{e({cgmStatus:t})},clear:()=>{e($z)}}),{name:"AUTH_STORE",storage:Fj(Zj)}));var qz="b30def84-6b37-426a-9752-be3cf572fdf1";const Zz=oV?"https://tracking.hedia.io":zj.TRACKING_BASE_URL,Kz=oV?qz:zj.TRACKING_PROJECT_ID;async function Qz(e){const t={...e,uuid:void 0},n={headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(t),method:FL.HTTPRequestMethod.POST},i=`${Zz}/api/v1/projects/${Kz}/events`,{status:r}=await fetch(i,n);if(r!==FL.StatusCode.CREATED)throw new Error("[tracking::syncTrackingEvent] Error while syncing tracking event")}var Jz=(e=>(e.MalformedDataError="Malformed Data Error",e.IncorrectDataError="Incorrect Data Type Error",e))(Jz||{});const eU="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,tU="8.55.0",nU=globalThis;function iU(e,t,n){const i=n||nU,r=i.__SENTRY__=i.__SENTRY__||{},a=r[tU]=r[tU]||{};return a[e]||(a[e]=t())}const rU="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,aU=["debug","info","warn","error","log","assert","trace"],oU={};function sU(e){if(!("console"in nU))return e();const t=nU.console,n={},i=Object.keys(oU);i.forEach(e=>{const i=oU[e];n[e]=t[e],t[e]=i});try{return e()}finally{i.forEach(e=>{t[e]=n[e]})}}const lU=iU("logger",function(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return rU?aU.forEach(n=>{t[n]=(...t)=>{e&&sU(()=>{nU.console[n](`Sentry Logger [${n}]:`,...t)})}}):aU.forEach(e=>{t[e]=()=>{}}),t}),uU="<anonymous>";function cU(){return dU(nU),nU}function dU(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||tU,t[tU]=t[tU]||{}}const hU=Object.prototype.toString;function mU(e,t){return hU.call(e)===`[object ${t}]`}function pU(e){return mU(e,"String")}function fU(e){return mU(e,"Object")}function gU(e,t){try{return e instanceof t}catch(n){return!1}}const _U=nU;function vU(e,t){const n=e,i=[];if(!n||!n.tagName)return"";if(_U.HTMLElement&&n instanceof HTMLElement&&n.dataset){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}i.push(n.tagName.toLowerCase());const r=t&&t.length?t.filter(e=>n.getAttribute(e)).map(e=>[e,n.getAttribute(e)]):null;if(r&&r.length)r.forEach(e=>{i.push(`[${e[0]}="${e[1]}"]`)});else{n.id&&i.push(`#${n.id}`);const e=n.className;if(e&&pU(e)){const t=e.split(/\s+/);for(const e of t)i.push(`.${e}`)}}const a=["aria-label","type","name","title","alt"];for(const o of a){const e=n.getAttribute(o);e&&i.push(`[${o}="${e}"]`)}return i.join("")}function yU(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch(i){rU&&lU.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function bU(e){if(function(e){switch(hU.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return gU(e,Error)}}(e))return{message:e.message,name:e.name,stack:e.stack,...SU(e)};if(t=e,"undefined"!=typeof Event&&gU(t,Event)){const t={type:e.type,target:wU(e.target),currentTarget:wU(e.currentTarget),...SU(e)};return"undefined"!=typeof CustomEvent&&gU(e,CustomEvent)&&(t.detail=e.detail),t}return e;var t}function wU(e){try{return t=e,"undefined"!=typeof Element&&gU(t,Element)?function(e,t={}){if(!e)return"<unknown>";try{let n=e;const i=5,r=[];let a=0,o=0;const s=" > ",l=s.length;let u;const c=Array.isArray(t)?t:t.keyAttrs,d=!Array.isArray(t)&&t.maxStringLength||80;for(;n&&a++<i&&(u=vU(n,c),!("html"===u||a>1&&o+r.length*l+u.length>=d));)r.push(u),o+=u.length,n=n.parentNode;return r.reverse().join(s)}catch(n){return"<unknown>"}}(e):Object.prototype.toString.call(e)}catch(n){return"<unknown>"}var t}function SU(e){if("object"==typeof e&&null!==e){const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}return{}}function kU(e){return CU(e,new Map)}function CU(e,t){if(function(e){if(!fU(e))return!1;try{const t=Object.getPrototypeOf(e).constructor.name;return!t||"Object"===t}catch(t){return!0}}(e)){const n=t.get(e);if(void 0!==n)return n;const i={};t.set(e,i);for(const r of Object.getOwnPropertyNames(e))void 0!==e[r]&&(i[r]=CU(e[r],t));return i}if(Array.isArray(e)){const n=t.get(e);if(void 0!==n)return n;const i=[];return t.set(e,i),e.forEach(e=>{i.push(CU(e,t))}),i}return e}function EU(){return Date.now()/1e3}const xU=function(){const{performance:e}=nU;if(!e||!e.now)return EU;const t=Date.now()-e.now(),n=null==e.timeOrigin?t:e.timeOrigin;return()=>(n+e.now())/1e3}();function IU(){const e=nU,t=e.crypto||e.msCrypto;let n=()=>16*Math.random();try{if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");t&&t.getRandomValues&&(n=()=>{const e=new Uint8Array(1);return t.getRandomValues(e),e[0]})}catch(i){}return"10000000100040008000100000000000".replace(/[018]/g,e=>(e^(15&n())>>e/4).toString(16))}function TU(){return IU()}function OU(){return IU().substring(16)}function RU(e,t,n=2){if(!t||"object"!=typeof t||n<=0)return t;if(e&&t&&0===Object.keys(t).length)return e;const i={...e};for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&(i[r]=RU(i[r],t[r],n-1));return i}(()=>{const{performance:e}=nU;if(!e||!e.now)return;const t=36e5,n=e.now(),i=Date.now(),r=e.timeOrigin?Math.abs(e.timeOrigin+n-i):t,a=r<t,o=e.timing&&e.timing.navigationStart,s="number"==typeof o?Math.abs(o+n-i):t;(a||s<t)&&(r<=s&&e.timeOrigin)})();const AU="_sentrySpan";function LU(e,t){t?yU(e,AU,t):delete e[AU]}function PU(e){return e[AU]}class MU{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:TU(),spanId:OU()}}clone(){const e=new MU;return e._breadcrumbs=[...this._breadcrumbs],e._tags={...this._tags},e._extra={...this._extra},e._contexts={...this._contexts},this._contexts.flags&&(e._contexts.flags={values:[...this._contexts.flags.values]}),e._user=this._user,e._level=this._level,e._session=this._session,e._transactionName=this._transactionName,e._fingerprint=this._fingerprint,e._eventProcessors=[...this._eventProcessors],e._requestSession=this._requestSession,e._attachments=[...this._attachments],e._sdkProcessingMetadata={...this._sdkProcessingMetadata},e._propagationContext={...this._propagationContext},e._client=this._client,e._lastEventId=this._lastEventId,LU(e,PU(this)),e}setClient(e){this._client=e}setLastEventId(e){this._lastEventId=e}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&function(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),e.did||t.did||(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||xU(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=32===t.sid.length?t.sid:IU()),void 0!==t.init&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),"number"==typeof t.started&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if("number"==typeof t.duration)e.duration=t.duration;else{const t=e.timestamp-e.started;e.duration=t>=0?t:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),"number"==typeof t.errors&&(e.errors=t.errors),t.status&&(e.status=t.status)}(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(e){return this._requestSession=e,this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,t){return this._tags={...this._tags,[e]:t},this._notifyScopeListeners(),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,t){return this._extra={...this._extra,[e]:t},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,t){return null===t?delete this._contexts[e]:this._contexts[e]=t,this._notifyScopeListeners(),this}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;const t="function"==typeof e?e(this):e,[n,i]=t instanceof DU?[t.getScopeData(),t.getRequestSession()]:fU(t)?[e,e.requestSession]:[],{tags:r,extra:a,user:o,contexts:s,level:l,fingerprint:u=[],propagationContext:c}=n||{};return this._tags={...this._tags,...r},this._extra={...this._extra,...a},this._contexts={...this._contexts,...s},o&&Object.keys(o).length&&(this._user=o),l&&(this._level=l),u.length&&(this._fingerprint=u),c&&(this._propagationContext=c),i&&(this._requestSession=i),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._session=void 0,LU(this,void 0),this._attachments=[],this.setPropagationContext({traceId:TU()}),this._notifyScopeListeners(),this}addBreadcrumb(e,t){const n="number"==typeof t?t:100;if(n<=0)return this;const i={timestamp:EU(),...e};return this._breadcrumbs.push(i),this._breadcrumbs.length>n&&(this._breadcrumbs=this._breadcrumbs.slice(-n),this._client&&this._client.recordDroppedEvent("buffer_overflow","log_item")),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:PU(this)}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=RU(this._sdkProcessingMetadata,e,2),this}setPropagationContext(e){return this._propagationContext={spanId:OU(),...e},this}getPropagationContext(){return this._propagationContext}captureException(e,t){const n=t&&t.event_id?t.event_id:IU();if(!this._client)return lU.warn("No client configured on scope - will not capture exception!"),n;const i=new Error("Sentry syntheticException");return this._client.captureException(e,{originalException:e,syntheticException:i,...t,event_id:n},this),n}captureMessage(e,t,n){const i=n&&n.event_id?n.event_id:IU();if(!this._client)return lU.warn("No client configured on scope - will not capture message!"),i;const r=new Error(e);return this._client.captureMessage(e,t,{originalException:e,syntheticException:r,...n,event_id:i},this),i}captureEvent(e,t){const n=t&&t.event_id?t.event_id:IU();return this._client?(this._client.captureEvent(e,{...t,event_id:n},this),n):(lU.warn("No client configured on scope - will not capture event!"),n)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(e=>{e(this)}),this._notifyingListeners=!1)}}const DU=MU;class NU{constructor(e,t){let n,i;n=e||new DU,i=t||new DU,this._stack=[{scope:n}],this._isolationScope=i}withScope(t){const n=this._pushScope();let i;try{i=t(n)}catch(e){throw this._popScope(),e}return r=i,Boolean(r&&r.then&&"function"==typeof r.then)?i.then(e=>(this._popScope(),e),e=>{throw this._popScope(),e}):(this._popScope(),i);var r}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const e=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:e}),e}_popScope(){return!(this._stack.length<=1)&&!!this._stack.pop()}}function FU(){const e=dU(cU());return e.stack=e.stack||new NU(iU("defaultCurrentScope",()=>new DU),iU("defaultIsolationScope",()=>new DU))}function BU(e){return FU().withScope(e)}function jU(e,t){const n=FU();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function VU(e){return FU().withScope(()=>e(FU().getIsolationScope()))}function HU(e){const t=dU(e);return t.acs?t.acs:{withIsolationScope:VU,withScope:BU,withSetScope:jU,withSetIsolationScope:(e,t)=>VU(t),getCurrentScope:()=>FU().getScope(),getIsolationScope:()=>FU().getIsolationScope()}}function zU(){return HU(cU()).getCurrentScope()}function UU(){return HU(cU()).getIsolationScope()}function GU(...e){const t=HU(cU());if(2===e.length){const[n,i]=e;return n?t.withSetScope(n,i):t.withScope(i)}return t.withScope(e[0])}function WU(){return zU().getClient()}function YU(e){const t=e._sentryMetrics;if(!t)return;const n={};for(const[,[i,r]]of t){(n[i]||(n[i]=[])).push(kU(r))}return n}const $U="sentry.source",XU="sentry.sample_rate",qU="sentry.op",ZU="sentry.origin",KU="sentry.idle_span_finish_reason",QU="sentry.custom_span_name",JU=/^sentry-/;function eG(e){const t=function(e){if(!e||!pU(e)&&!Array.isArray(e))return;if(Array.isArray(e))return e.reduce((e,t)=>{const n=tG(t);return Object.entries(n).forEach(([t,n])=>{e[t]=n}),e},{});return tG(e)}(e);if(!t)return;const n=Object.entries(t).reduce((e,[t,n])=>{if(t.match(JU)){e[t.slice(7)]=n}return e},{});return Object.keys(n).length>0?n:void 0}function tG(e){return e.split(",").map(e=>e.split("=").map(e=>decodeURIComponent(e.trim()))).reduce((e,[t,n])=>(t&&n&&(e[t]=n),e),{})}let nG=!1;function iG(e){const{spanId:t,traceId:n}=e.spanContext(),{data:i,op:r,parent_span_id:a,status:o,origin:s}=oG(e);return kU({parent_span_id:a,span_id:t,trace_id:n,data:i,op:r,status:o,origin:s})}function rG(e){return"number"==typeof e?aG(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?aG(e.getTime()):xU()}function aG(e){return e>9999999999?e/1e3:e}function oG(t){if(function(e){return"function"==typeof e.getSpanJSON}(t))return t.getSpanJSON();try{const{spanId:e,traceId:n}=t.spanContext();if(function(e){const t=e;return!!(t.attributes&&t.startTime&&t.name&&t.endTime&&t.status)}(t)){const{attributes:i,startTime:r,name:a,endTime:o,parentSpanId:s,status:l}=t;return kU({span_id:e,trace_id:n,data:i,description:a,parent_span_id:s,start_timestamp:rG(r),timestamp:rG(o)||void 0,status:lG(l),op:i[qU],origin:i[ZU],_metrics_summary:YU(t)})}return{span_id:e,trace_id:n}}catch(e){return{}}}function sG(e){const{traceFlags:t}=e.spanContext();return 1===t}function lG(e){if(e&&0!==e.code)return 1===e.code?"ok":e.message||"unknown_error"}const uG="_sentryChildSpans",cG="_sentryRootSpan";function dG(e,t){const n=e[cG]||e;yU(t,cG,n),e[uG]?e[uG].add(t):yU(e,uG,new Set([t]))}function hG(e){const t=new Set;return function e(n){if(!t.has(n)&&sG(n)){t.add(n);const i=n[uG]?Array.from(n[uG]):[];for(const t of i)e(t)}}(e),Array.from(t)}function mG(e){return e[cG]||e}function pG(){const e=HU(cU());return e.getActiveSpan?e.getActiveSpan():PU(zU())}const fG="_sentryScope",gG="_sentryIsolationScope";function _G(e){return{scope:e[fG],isolationScope:e[gG]}}function vG(e){if("boolean"==typeof __SENTRY_TRACING__&&!__SENTRY_TRACING__)return!1;const t=WU(),n=e||t&&t.getOptions();return!!n&&(n.enableTracing||"tracesSampleRate"in n||"tracesSampler"in n)}class yG{constructor(e={}){this._traceId=e.traceId||TU(),this._spanId=e.spanId||OU()}spanContext(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:0}}end(e){}setAttribute(e,t){return this}setAttributes(e){return this}setStatus(e){return this}updateName(e){return this}isRecording(){return!1}addEvent(e,t,n){return this}addLink(e){return this}addLinks(e){return this}recordException(e,t){}}const bG="_frozenDsc";function wG(e,t){yU(e,bG,t)}function SG(e){const t=WU();if(!t)return{};const n=mG(e),i=n[bG];if(i)return i;const r=n.spanContext().traceState,a=r&&r.get("sentry.dsc"),o=a&&eG(a);if(o)return o;const s=function(e,t){const n=t.getOptions(),{publicKey:i}=t.getDsn()||{},r=kU({environment:n.environment||"production",release:n.release,public_key:i,trace_id:e});return t.emit("createDsc",r),r}(e.spanContext().traceId,t),l=oG(n),u=l.data||{},c=u[XU];null!=c&&(s.sample_rate=`${c}`);const d=u[$U],h=l.description;return"url"!==d&&h&&(s.transaction=h),vG()&&(s.sampled=String(sG(n))),t.emit("createDsc",s,n),s}function kG(e,t){if(!vG(e))return[!1];const n=UU().getScopeData().sdkProcessingMetadata.normalizedRequest,i={...t,normalizedRequest:t.normalizedRequest||n};let r;r="function"==typeof e.tracesSampler?e.tracesSampler(i):void 0!==i.parentSampled?i.parentSampled:void 0!==e.tracesSampleRate?e.tracesSampleRate:1;const a=function(e){if("boolean"==typeof e)return Number(e);const t="string"==typeof e?parseFloat(e):e;if(!("number"!=typeof t||isNaN(t)||t<0||t>1))return t;eU&&lU.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(e)} of type ${JSON.stringify(typeof e)}.`)}(r);if(void 0===a)return eU&&lU.warn("[Tracing] Discarding transaction because of invalid sample rate."),[!1];if(!a)return eU&&lU.log("[Tracing] Discarding transaction because "+("function"==typeof e.tracesSampler?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0")),[!1,a];return Math.random()<a?[!0,a]:(eU&&lU.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(r)})`),[!1,a])}function CG(e,t=!1){const{host:n,path:i,pass:r,port:a,projectId:o,protocol:s,publicKey:l}=e;return`${s}://${l}${t&&r?`:${r}`:""}@${n}${a?`:${a}`:""}/${i?`${i}/`:i}${o}`}function EG(e,t=100,n=1/0){try{return xG("",e,t,n)}catch(i){return{ERROR:`**non-serializable** (${i})`}}}function xG(t,n,i=1/0,r=1/0,a=function(){const e="function"==typeof WeakSet,t=e?new WeakSet:[];return[function(n){if(e)return!!t.has(n)||(t.add(n),!1);for(let e=0;e<t.length;e++)if(t[e]===n)return!0;return t.push(n),!1},function(n){if(e)t.delete(n);else for(let e=0;e<t.length;e++)if(t[e]===n){t.splice(e,1);break}}]}()){const[o,s]=a;if(null==n||["boolean","string"].includes(typeof n)||"number"==typeof n&&Number.isFinite(n))return n;const l=function(t,n){try{if("domain"===t&&n&&"object"==typeof n&&n._events)return"[Domain]";if("domainEmitter"===t)return"[DomainEmitter]";if("undefined"!=typeof self&&n===self)return"[Global]";if("undefined"!=typeof window&&n===window)return"[Window]";if("undefined"!=typeof document&&n===document)return"[Document]";if("object"==typeof(i=n)&&null!==i&&(i.__isVue||i._isVue))return"[VueViewModel]";if(function(e){return fU(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}(n))return"[SyntheticEvent]";if("number"==typeof n&&!Number.isFinite(n))return`[${n}]`;if("function"==typeof n)return`[Function: ${function(t){try{return t&&"function"==typeof t&&t.name||uU}catch(e){return uU}}(n)}]`;if("symbol"==typeof n)return`[${String(n)}]`;if("bigint"==typeof n)return`[BigInt: ${String(n)}]`;const r=function(e){const t=Object.getPrototypeOf(e);return t?t.constructor.name:"null prototype"}(n);return/^HTML(\w*)Element$/.test(r)?`[HTMLElement: ${r}]`:`[object ${r}]`}catch(r){return`**non-serializable** (${r})`}var i}(t,n);if(!l.startsWith("[object "))return l;if(n.__sentry_skip_normalization__)return n;const u="number"==typeof n.__sentry_override_normalization_depth__?n.__sentry_override_normalization_depth__:i;if(0===u)return l.replace("object ","");if(o(n))return"[Circular ~]";const c=n;if(c&&"function"==typeof c.toJSON)try{return xG("",c.toJSON(),u-1,r,a)}catch(p){}const d=Array.isArray(n)?[]:{};let h=0;const m=bU(n);for(const e in m){if(!Object.prototype.hasOwnProperty.call(m,e))continue;if(h>=r){d[e]="[MaxProperties ~]";break}const t=m[e];d[e]=xG(e,t,u-1,r,a),h++}return s(n),d}function IG(e){return[{type:"span"},e]}function TG(e,t){const n=SG(e[0]),i=t&&t.getDsn(),r=t&&t.getOptions().tunnel,a={sent_at:(new Date).toISOString(),...(o=n,!!o.trace_id&&!!o.public_key&&{trace:n}),...!!r&&i&&{dsn:CG(i)}};var o;const s=t&&t.getOptions().beforeSendSpan,l=s?e=>{const t=s(oG(e));return t||nG||(sU(()=>{console.warn("[Sentry] Deprecation warning: Returning null from `beforeSendSpan` will be disallowed from SDK version 9.0.0 onwards. The callback will only support mutating spans. To drop certain spans, configure the respective integrations directly.")}),nG=!0),t}:e=>oG(e),u=[];for(const c of e){const e=l(c);e&&u.push(IG(e))}return function(e,t=[]){return[e,t]}(a,u)}function OG(e){if(!e||0===e.length)return;const t={};return e.forEach(e=>{const n=e.attributes||{},i=n["sentry.measurement_unit"],r=n["sentry.measurement_value"];"string"==typeof i&&"number"==typeof r&&(t[e.name]={value:r,unit:i})}),t}class RG{constructor(e={}){this._traceId=e.traceId||TU(),this._spanId=e.spanId||OU(),this._startTime=e.startTimestamp||xU(),this._attributes={},this.setAttributes({[ZU]:"manual",[qU]:e.op,...e.attributes}),this._name=e.name,e.parentSpanId&&(this._parentSpanId=e.parentSpanId),"sampled"in e&&(this._sampled=e.sampled),e.endTimestamp&&(this._endTime=e.endTimestamp),this._events=[],this._isStandaloneSpan=e.isStandalone,this._endTime&&this._onSpanEnded()}addLink(e){return this}addLinks(e){return this}recordException(e,t){}spanContext(){const{_spanId:e,_traceId:t,_sampled:n}=this;return{spanId:e,traceId:t,traceFlags:n?1:0}}setAttribute(e,t){return void 0===t?delete this._attributes[e]:this._attributes[e]=t,this}setAttributes(e){return Object.keys(e).forEach(t=>this.setAttribute(t,e[t])),this}updateStartTime(e){this._startTime=rG(e)}setStatus(e){return this._status=e,this}updateName(e){return this._name=e,this.setAttribute($U,"custom"),this}end(e){this._endTime||(this._endTime=rG(e),function(e){if(!eU)return;const{description:t="< unknown name >",op:n="< unknown op >"}=oG(e),{spanId:i}=e.spanContext(),r=`[Tracing] Finishing "${n}" ${mG(e)===e?"root ":""}span "${t}" with ID ${i}`;lU.log(r)}(this),this._onSpanEnded())}getSpanJSON(){return kU({data:this._attributes,description:this._name,op:this._attributes[qU],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:lG(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[ZU],_metrics_summary:YU(this),profile_id:this._attributes["sentry.profile_id"],exclusive_time:this._attributes["sentry.exclusive_time"],measurements:OG(this._events),is_segment:this._isStandaloneSpan&&mG(this)===this||void 0,segment_id:this._isStandaloneSpan?mG(this).spanContext().spanId:void 0})}isRecording(){return!this._endTime&&!!this._sampled}addEvent(e,t,n){eU&&lU.log("[Tracing] Adding an event to span:",e);const i=AG(t)?t:n||xU(),r=AG(t)?{}:t||{},a={name:e,time:rG(i),attributes:r};return this._events.push(a),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){const e=WU();e&&e.emit("spanEnd",this);if(!(this._isStandaloneSpan||this===mG(this)))return;if(this._isStandaloneSpan)return void(this._sampled?function(e){const t=WU();if(!t)return;const n=e[1];if(!n||0===n.length)return void t.recordDroppedEvent("before_send","span");t.sendEnvelope(e)}(TG([this],e)):(eU&&lU.log("[Tracing] Discarding standalone span because its trace was not chosen to be sampled."),e&&e.recordDroppedEvent("sample_rate","span")));const t=this._convertSpanToTransaction();if(t){(_G(this).scope||zU()).captureEvent(t)}}_convertSpanToTransaction(){if(!LG(oG(this)))return;this._name||(eU&&lU.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>");const{scope:e,isolationScope:t}=_G(this),n=(e||zU()).getClient()||WU();if(!0!==this._sampled)return eU&&lU.log("[Tracing] Discarding transaction because its trace was not chosen to be sampled."),void(n&&n.recordDroppedEvent("sample_rate","transaction"));const i=hG(this).filter(e=>e!==this&&!function(e){return e instanceof RG&&e.isStandaloneSpan()}(e)).map(e=>oG(e)).filter(LG),r=this._attributes[$U];delete this._attributes[QU],i.forEach(e=>{e.data&&delete e.data[QU]});const a={contexts:{trace:iG(this)},spans:i.length>1e3?i.sort((e,t)=>e.start_timestamp-t.start_timestamp).slice(0,1e3):i,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{capturedSpanScope:e,capturedSpanIsolationScope:t,...kU({dynamicSamplingContext:SG(this)})},_metrics_summary:YU(this),...r&&{transaction_info:{source:r}}},o=OG(this._events);return o&&Object.keys(o).length&&(eU&&lU.log("[Measurements] Adding measurements to transaction event",JSON.stringify(o,void 0,2)),a.measurements=o),a}}function AG(e){return e&&"number"==typeof e||e instanceof Date||Array.isArray(e)}function LG(e){return!!(e.start_timestamp&&e.timestamp&&e.span_id&&e.trace_id)}const PG="__SENTRY_SUPPRESS_TRACING__";function MG(e){const t=DG();if(t.startInactiveSpan)return t.startInactiveSpan(e);const n=function(e){const t=e.experimental||{},n={isStandalone:t.standalone,...e};if(e.startTime){const t={...n};return t.startTimestamp=rG(e.startTime),delete t.startTime,t}return n}(e),{forceTransaction:i,parentSpan:r}=e,a=e.scope?t=>GU(e.scope,t):void 0!==r?e=>function(e,t){const n=DG();if(n.withActiveSpan)return n.withActiveSpan(e,t);return GU(n=>(LU(n,e||void 0),t(n)))}(r,e):e=>e();return a(()=>{const t=zU(),r=function(e){const t=PU(e);if(!t)return;const n=WU(),i=n?n.getOptions():{};if(i.parentSpanIsAlwaysRootSpan)return mG(t);return t}(t);return e.onlyIfParent&&!r?new yG:function({parentSpan:e,spanArguments:t,forceTransaction:n,scope:i}){if(!vG())return new yG;const r=UU();let a;if(e&&!n)a=function(e,t,n){const{spanId:i,traceId:r}=e.spanContext(),a=!t.getScopeData().sdkProcessingMetadata[PG]&&sG(e),o=a?new RG({...n,parentSpanId:i,traceId:r,sampled:a}):new yG({traceId:r});dG(e,o);const s=WU();s&&(s.emit("spanStart",o),n.endTimestamp&&s.emit("spanEnd",o));return o}(e,i,t),dG(e,a);else if(e){const n=SG(e),{traceId:r,spanId:o}=e.spanContext(),s=sG(e);a=NG({traceId:r,parentSpanId:o,...t},i,s),wG(a,n)}else{const{traceId:e,dsc:n,parentSpanId:o,sampled:s}={...r.getPropagationContext(),...i.getPropagationContext()};a=NG({traceId:e,parentSpanId:o,...t},i,s),n&&wG(a,n)}return function(e){if(!eU)return;const{description:t="< unknown name >",op:n="< unknown op >",parent_span_id:i}=oG(e),{spanId:r}=e.spanContext(),a=sG(e),o=mG(e),s=o===e,l=`[Tracing] Starting ${a?"sampled":"unsampled"} ${s?"root ":""}span`,u=[`op: ${n}`,`name: ${t}`,`ID: ${r}`];if(i&&u.push(`parent ID: ${i}`),!s){const{op:e,description:t}=oG(o);u.push(`root ID: ${o.spanContext().spanId}`),e&&u.push(`root op: ${e}`),t&&u.push(`root description: ${t}`)}lU.log(`${l}\n ${u.join("\n ")}`)}(a),function(e,t,n){e&&(yU(e,gG,n),yU(e,fG,t))}(a,i,r),a}({parentSpan:r,spanArguments:n,forceTransaction:i,scope:t})})}function DG(){return HU(cU())}function NG(e,t,n){const i=WU(),r=i&&i.getOptions()||{},{name:a="",attributes:o}=e,[s,l]=t.getScopeData().sdkProcessingMetadata[PG]?[!1]:kG(r,{name:a,parentSampled:n,attributes:o,transactionContext:{name:a,parentSampled:n}}),u=new RG({...e,attributes:{[$U]:"custom",...e.attributes},sampled:s});return void 0!==l&&u.setAttribute(XU,l),i&&i.emit("spanStart",u),u}const FG={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3};function BG(e,t={}){const n=new Map;let i,r=!1,a="externalFinish",o=!t.disableAutoFinish;const s=[],{idleTimeout:l=FG.idleTimeout,finalTimeout:u=FG.finalTimeout,childSpanTimeout:c=FG.childSpanTimeout,beforeSpanEnd:d}=t,h=WU();if(!h||!vG())return new yG;const m=zU(),p=pG(),f=function(e){const t=MG(e);return LU(zU(),t),eU&&lU.log("[Tracing] Started span is an idle span"),t}(e);function g(){i&&(clearTimeout(i),i=void 0)}function _(e){g(),i=setTimeout(()=>{!r&&0===n.size&&o&&(a="idleTimeout",f.end(e))},l)}function v(e){i=setTimeout(()=>{!r&&o&&(a="heartbeatFailed",f.end(e))},c)}function y(e){r=!0,n.clear(),s.forEach(e=>e()),LU(m,p);const t=oG(f),{start_timestamp:i}=t;if(!i)return;(t.data||{})[KU]||f.setAttribute(KU,a),lU.log(`[Tracing] Idle span "${t.op}" finished`);const o=hG(f).filter(e=>e!==f);let c=0;o.forEach(t=>{t.isRecording()&&(t.setStatus({code:2,message:"cancelled"}),t.end(e),eU&&lU.log("[Tracing] Cancelling span since span ended early",JSON.stringify(t,void 0,2)));const n=oG(t),{timestamp:i=0,start_timestamp:r=0}=n,a=r<=e,o=i-r<=(u+l)/1e3;if(eU){const e=JSON.stringify(t,void 0,2);a?o||lU.log("[Tracing] Discarding span since it finished after idle span final timeout",e):lU.log("[Tracing] Discarding span since it happened after idle span was finished",e)}o&&a||(!function(e,t){e[uG]&&e[uG].delete(t)}(f,t),c++)}),c>0&&f.setAttribute("sentry.idle_span_discarded_spans",c)}return f.end=new Proxy(f.end,{apply(e,t,n){d&&d(f);const[i,...r]=n,a=rG(i||xU()),o=hG(f).filter(e=>e!==f);if(!o.length)return y(a),Reflect.apply(e,t,[a,...r]);const s=o.map(e=>oG(e).timestamp).filter(e=>!!e),l=s.length?Math.max(...s):void 0,c=oG(f).start_timestamp,h=Math.min(c?c+u/1e3:1/0,Math.max(c||-1/0,Math.min(a,l||1/0)));return y(h),Reflect.apply(e,t,[h,...r])}}),s.push(h.on("spanStart",e=>{if(r||e===f||oG(e).timestamp)return;var t;hG(f).includes(e)&&(t=e.spanContext().spanId,g(),n.set(t,!0),v(xU()+c/1e3))})),s.push(h.on("spanEnd",e=>{var t;r||(t=e.spanContext().spanId,n.has(t)&&n.delete(t),0===n.size&&_(xU()+l/1e3))})),s.push(h.on("idleSpanEnableAutoFinish",e=>{e===f&&(o=!0,_(),n.size&&v())})),t.disableAutoFinish||_(),setTimeout(()=>{r||(f.setStatus({code:2,message:"deadline_exceeded"}),a="finalTimeout",f.end())},u),f}class jG extends Error{constructor(e,t="warn"){super(e),this.message=e,this.logLevel=t}}const VG=100;function HG(e,t){const n=WU(),i=UU();if(!n)return;const{beforeBreadcrumb:r=null,maxBreadcrumbs:a=VG}=n.getOptions();if(a<=0)return;const o={timestamp:EU(),...e},s=r?sU(()=>r(o,t)):o;null!==s&&(n.emit&&n.emit("beforeAddBreadcrumb",s,t),i.addBreadcrumb(s,a))}const zG={},UG=nU;function GG(e){var t;const n="string"!=typeof e&&"exception"in e&&(null===(t=e.exception)||void 0===t?void 0:t.values)?e.exception.values:[];for(const i of n)if(i.mechanism&&!1===i.mechanism.handled&&"onerror"===i.mechanism.type)return!0;return!1}function WG(){const e=null!==(i=null===(n=null===(t=UG.expo)||void 0===t?void 0:t.modules)||void 0===n?void 0:n.ExponentConstants)&&void 0!==i?i:void 0;var t,n,i;return"expo"===(e&&e.appOwnership)}function YG(){return"web"===lr.OS}function $G(){return"web"!==lr.OS}const XG="value";function qG(e,t){let n;t=t||1/0;const i=e.length;let r=null;const a=[];for(let o=0;o<i;++o){if(n=e.charCodeAt(o),n>55295&&n<57344){if(!r){if(n>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(o+1===i){(t-=3)>-1&&a.push(239,191,189);continue}r=n;continue}if(n<56320){(t-=3)>-1&&a.push(239,191,189),r=n;continue}n=65536+(r-55296<<10|n-56320)}else r&&(t-=3)>-1&&a.push(239,191,189);if(r=null,n<128){if((t-=1)<0)break;a.push(n)}else if(n<2048){if((t-=2)<0)break;a.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;a.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return a}const ZG=[],KG="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(let Qee=0,Jee=64;Qee<Jee;++Qee)ZG[Qee]=KG[Qee];function QG(e){return ZG[e>>18&63]+ZG[e>>12&63]+ZG[e>>6&63]+ZG[63&e]}function JG(e,t,n){let i;const r=[];for(let a=t;a<n;a+=3)i=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),r.push(QG(i));return r.join("")}var eW=function(t,n,i,r){return new(i||(i=Promise))(function(a,o){function s(t){try{u(r.next(t))}catch(e){o(e)}}function l(t){try{u(r.throw(t))}catch(e){o(e)}}function u(e){var t;e.done?a(e.value):(t=e.value,t instanceof i?t:new i(function(e){e(t)})).then(s,l)}u((r=r.apply(t,n||[])).next())})},tW=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]])}return n};const nW=!0===UG.RN$Bridgeless||null!=UG.__turboModuleProxy?zG.TurboModuleRegistry&&zG.TurboModuleRegistry.get("RNSentry"):nr.RNSentry,iW=qG("\n"),rW={fetchModules(){return eW(this,void 0,void 0,function*(){if(!this.enableNative)throw this._DisabledNativeError;if(!this._isModuleLoaded(nW))throw this._NativeClientError;const e=yield nW.fetchModules();return e?JSON.parse(e):null})},sendEnvelope(e){return eW(this,void 0,void 0,function*(){if(!this.enableNative)return void lU.warn("Event was skipped as native SDK is not enabled.");if(!this._isModuleLoaded(nW))throw this._NativeClientError;const[t,n]=e,i=qG(JSON.stringify(t));let r=new Uint8Array(i.length+iW.length);r.set(i),r.set(iW,i.length);let a=!1;for(const e of n){const[t,n]=this._processItem(e);let i,o;"string"==typeof n?(i="text/plain",o=qG(n)):n instanceof Uint8Array?(i="string"==typeof t.content_type?t.content_type:"application/octet-stream",o=n):(i="application/json",o=qG(JSON.stringify(n)),a||(a=GG(n))),t.content_type=i,t.length=o.length;const s=qG(JSON.stringify(t)),l=new Uint8Array(r.length+s.length+iW.length+o.length+iW.length);l.set(r),l.set(s,r.length),l.set(iW,r.length+s.length),l.set(o,r.length+s.length+iW.length),l.set(iW,r.length+s.length+iW.length+o.length),r=l}yield nW.captureEnvelope(function(e){let t;const n=e.length,i=n%3,r=[],a=16383;for(let o=0,s=n-i;o<s;o+=a)r.push(JG(e,o,o+a>s?s:o+a));return 1===i?(t=e[n-1],r.push(`${ZG[t>>2]+ZG[t<<4&63]}==`)):2===i&&(t=(e[n-2]<<8)+e[n-1],r.push(`${ZG[t>>10]+ZG[t>>4&63]+ZG[t<<2&63]}=`)),r.join("")}(r),{hardCrashed:a})})},initNativeSdk(e){return eW(this,void 0,void 0,function*(){const t=Object.assign({enableNative:!0,autoInitializeNativeSdk:!0},e);if(!t.enableNative)return t.enableNativeNagger&&lU.warn("Note: Native Sentry SDK is disabled."),this.enableNative=!1,!1;if(!t.autoInitializeNativeSdk)return t.enableNativeNagger&&lU.warn("Note: Native Sentry SDK was not initialized automatically, you will need to initialize it manually. If you wish to disable the native SDK and get rid of this warning, pass enableNative: false"),this.enableNative=!0,!1;if(!t.dsn)return lU.warn("Warning: No DSN was provided. The Sentry SDK will be disabled. Native SDK will also not be initalized."),this.enableNative=!1,!1;if(!this._isModuleLoaded(nW))throw this._NativeClientError;const{beforeSend:n,beforeBreadcrumb:i,beforeSendTransaction:r,integrations:a}=t,o=tW(t,["beforeSend","beforeBreadcrumb","beforeSendTransaction","integrations"]),s=yield nW.initNativeSdk(o);return this.nativeIsReady=s,this.enableNative=!0,s})},fetchNativeRelease(){return eW(this,void 0,void 0,function*(){if(!this.enableNative)throw this._DisabledNativeError;if(!this._isModuleLoaded(nW))throw this._NativeClientError;return nW.fetchNativeRelease()})},fetchNativeSdkInfo(){return eW(this,void 0,void 0,function*(){if(!this.enableNative)throw this._DisabledNativeError;if(!this._isModuleLoaded(nW))throw this._NativeClientError;return nW.fetchNativeSdkInfo()})},fetchNativeDeviceContexts(){return eW(this,void 0,void 0,function*(){if(!this.enableNative)throw this._DisabledNativeError;if(!this._isModuleLoaded(nW))throw this._NativeClientError;return nW.fetchNativeDeviceContexts()})},fetchNativeAppStart(){return eW(this,void 0,void 0,function*(){return this.enableNative?this._isModuleLoaded(nW)?nW.fetchNativeAppStart():(lU.error(this._NativeClientError),null):(lU.warn(this._DisabledNativeError),null)})},fetchNativeFrames(){return eW(this,void 0,void 0,function*(){if(!this.enableNative)throw this._DisabledNativeError;if(!this._isModuleLoaded(nW))throw this._NativeClientError;return nW.fetchNativeFrames()})},nativeCrash(){if(this.enableNative){if(!this._isModuleLoaded(nW))throw this._NativeClientError;nW.crash()}},setUser(e){if(!this.enableNative)return;if(!this._isModuleLoaded(nW))throw this._NativeClientError;let t=null,n=null;if(e){const{id:i,ip_address:r,email:a,username:o,segment:s}=e,l=tW(e,["id","ip_address","email","username","segment"]),u={id:i,ip_address:r,email:a,username:o,segment:s};t=this._serializeObject(u),n=this._serializeObject(l)}nW.setUser(t,n)},setTag(e,t){if(!this.enableNative)return;if(!this._isModuleLoaded(nW))throw this._NativeClientError;const n="string"==typeof t?t:JSON.stringify(t);nW.setTag(e,n)},setExtra(t,n){if(!this.enableNative)return;if(!this._isModuleLoaded(nW))throw this._NativeClientError;if("string"==typeof n)return nW.setExtra(t,n);if(void 0===n)return nW.setExtra(t,"undefined");let i;try{const e=EG(n);i=JSON.stringify(e)}catch(e){lU.error("Extra for key ${key} not passed to native SDK, because it contains non-stringifiable values",e)}return"string"==typeof i?nW.setExtra(t,i):nW.setExtra(t,"**non-stringifiable**")},addBreadcrumb(e){if(this.enableNative){if(!this._isModuleLoaded(nW))throw this._NativeClientError;nW.addBreadcrumb(Object.assign(Object.assign({},e),{level:e.level?this._processLevel(e.level):void 0}))}},clearBreadcrumbs(){if(this.enableNative){if(!this._isModuleLoaded(nW))throw this._NativeClientError;nW.clearBreadcrumbs()}},setContext(t,n){if(!this.enableNative)return;if(!this._isModuleLoaded(nW))throw this._NativeClientError;if(null===n)return nW.setContext(t,null);let i;try{i=function(e){const t=EG(e);return null===t||"object"!=typeof t||Array.isArray(t)||t.constructor!==Object?{[XG]:t}:t}(n)}catch(e){lU.error("Context for key ${key} not passed to native SDK, because it contains non-serializable values",e)}i?nW.setContext(t,i):nW.setContext(t,{error:"**non-serializable**"})},closeNativeSdk(){return eW(this,void 0,void 0,function*(){if(this.enableNative&&this._isModuleLoaded(nW))return nW.closeNativeSdk().then(()=>{this.enableNative=!1})})},disableNativeFramesTracking(){this.enableNative&&this._isModuleLoaded(nW)&&nW.disableNativeFramesTracking()},enableNativeFramesTracking(){this.enableNative&&this._isModuleLoaded(nW)&&nW.enableNativeFramesTracking()},isNativeAvailable(){return this._isModuleLoaded(nW)},captureScreenshot(){return eW(this,void 0,void 0,function*(){if(!this.enableNative)return lU.warn(this._DisabledNativeError),null;if(!this._isModuleLoaded(nW))return lU.error(this._NativeClientError),null;let t;try{t=yield nW.captureScreenshot()}catch(e){lU.warn("Failed to capture screenshot",e)}return t?t.map(e=>Object.assign(Object.assign({},e),{data:new Uint8Array(e.data)})):null})},fetchViewHierarchy(){return eW(this,void 0,void 0,function*(){if(!this.enableNative)throw this._DisabledNativeError;if(!this._isModuleLoaded(nW))throw this._NativeClientError;const e=yield nW.fetchViewHierarchy();return e?new Uint8Array(e):null})},startProfiling(e){if(!this.enableNative)throw this._DisabledNativeError;if(!this._isModuleLoaded(nW))throw this._NativeClientError;const{started:t,error:n}=nW.startProfiling(e);return t?lU.log("[NATIVE] Start Profiling"):lU.error("[NATIVE] Start Profiling Failed",n),!!t},stopProfiling(){if(!this.enableNative)throw this._DisabledNativeError;if(!this._isModuleLoaded(nW))throw this._NativeClientError;const{profile:t,nativeProfile:n,androidProfile:i,error:r}=nW.stopProfiling();if(!t||r)return lU.error("[NATIVE] Stop Profiling Failed",r),null;"ios"!==lr.OS||n||lU.warn("[NATIVE] Stop Profiling Failed: No Native Profile"),"android"!==lr.OS||i||lU.warn("[NATIVE] Stop Profiling Failed: No Android Profile");try{return{hermesProfile:JSON.parse(t),nativeProfile:n,androidProfile:i}}catch(e){return lU.error("[NATIVE] Failed to parse Hermes Profile JSON",e),null}},fetchNativePackageName(){return this.enableNative&&this._isModuleLoaded(nW)&&nW.fetchNativePackageName()||null},fetchNativeStackFramesBy(e){return this.enableNative&&this._isModuleLoaded(nW)&&nW.fetchNativeStackFramesBy(e)||null},initNativeReactNavigationNewFrameTracking(){return eW(this,void 0,void 0,function*(){if(this.enableNative&&this._isModuleLoaded(nW))return nW.initNativeReactNavigationNewFrameTracking()})},captureReplay(e){return eW(this,void 0,void 0,function*(){return this.enableNative?this._isModuleLoaded(nW)?(yield nW.captureReplay(e))||null:(lU.warn(`[NATIVE] \`${this.captureReplay.name}\` is not available when native is not available.`),Promise.resolve(null)):(lU.warn(`[NATIVE] \`${this.captureReplay.name}\` is not available when native is disabled.`),Promise.resolve(null))})},getCurrentReplayId(){return this.enableNative?this._isModuleLoaded(nW)?nW.getCurrentReplayId()||null:(lU.warn(`[NATIVE] \`${this.getCurrentReplayId.name}\` is not available when native is not available.`),null):(lU.warn(`[NATIVE] \`${this.getCurrentReplayId.name}\` is not available when native is disabled.`),null)},crashedLastRun(){return eW(this,void 0,void 0,function*(){if(!this.enableNative)return null;if(!this._isModuleLoaded(nW))return null;const e=yield nW.crashedLastRun();return"boolean"==typeof e?e:null})},getNewScreenTimeToDisplay(){return this.enableNative&&this._isModuleLoaded(nW)?nW.getNewScreenTimeToDisplay():Promise.resolve(null)},getDataFromUri(e){return eW(this,void 0,void 0,function*(){if(!this.enableNative||!this._isModuleLoaded(nW))return null;try{const t=yield nW.getDataFromUri(e);return new Uint8Array(t)}catch(t){return lU.error("Error:",t),null}})},popTimeToDisplayFor(e){if(!this.enableNative||!this._isModuleLoaded(nW))return Promise.resolve(null);try{return nW.popTimeToDisplayFor(e)}catch(t){return lU.error("Error:",t),null}},setActiveSpanId(e){if(this.enableNative&&this._isModuleLoaded(nW))try{nW.setActiveSpanId(e)}catch(t){return void lU.error("Error:",t)}},encodeToBase64(e){return eW(this,void 0,void 0,function*(){if(!this.enableNative||!this._isModuleLoaded(nW))return Promise.resolve(null);try{const t=Array.from(e);return(yield nW.encodeToBase64(t))||null}catch(t){return lU.error("Error:",t),Promise.resolve(null)}})},_processItem(e){const[t,n]=e;if("event"==t.type||"transaction"==t.type){const e=this._processLevels(n);return"android"===rW.platform&&"message"in e&&(e.message={message:e.message}),[t,e]}return e},_serializeObject(e){const t={};return Object.keys(e).forEach(n=>{const i=e[n];t[n]="string"==typeof i?i:JSON.stringify(i)}),t},_processLevels(e){var t;return Object.assign(Object.assign({},e),{level:e.level?this._processLevel(e.level):void 0,breadcrumbs:null===(t=e.breadcrumbs)||void 0===t?void 0:t.map(e=>Object.assign(Object.assign({},e),{level:e.level?this._processLevel(e.level):void 0}))})},_processLevel:e=>"log"==e?"debug":e,_isModuleLoaded:e=>!!e,_DisabledNativeError:new jG("Native is disabled"),_NativeClientError:new jG("Native Client is not available, can't start on native."),enableNative:!0,nativeIsReady:!1,platform:lr.OS};function aW(e){return eW(this,void 0,void 0,function*(){return rW.getDataFromUri(e)})}"android"===lr.OS||lr.OS;const oW="MobileFeedback",sW=(e={})=>{const{buttonOptions:t,screenshotButtonOptions:n,colorScheme:i,themeLight:r,themeDark:a}=e,o=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]])}return n}(e,["buttonOptions","screenshotButtonOptions","colorScheme","themeLight","themeDark"]);return{name:oW,options:o,buttonOptions:t||{},screenshotButtonOptions:n||{},colorScheme:i||"system",themeLight:r||{},themeDark:a||{}}},lW=()=>{var e;return null===(e=WU())||void 0===e?void 0:e.getIntegrationByName(oW)},uW="auto.interaction",cW="manual.interaction",dW=(e,t)=>{(function(e){return e===mG(e)})(t)&&function(e){return e instanceof RG}(t)?e.on("spanEnd",e=>{if(e!==t)return;hG(t).length<=1&&(lU.log(`Not sampling as ${oG(t).op} transaction has no child spans.`),t._sampled=!1)}):lU.warn("Not sampling childless spans only works for Sentry Transactions (Root Spans).")},hW=(e,{finalTimeout:t,idleTimeout:n})=>{const i=WU();if(!i)return lU.warn("[startIdleSpan] Can't create idle span, missing client."),new yG;if("background"===Tu.currentState)return lU.debug(`[startIdleSpan] App is already in background, not starting span for ${e.name}`),new yG;zU().setPropagationContext({traceId:TU(),spanId:OU()});const r=BG(e,{finalTimeout:t,idleTimeout:n});return((e,t)=>{const n=Tu.addEventListener("change",e=>{"background"===e&&(lU.debug(`Setting ${oG(t).op} transaction to cancelled because the app is in the background.`),t.setStatus({code:2,message:"cancelled"}),t.end())});n&&e.on("spanEnd",e=>{e===t&&(lU.debug(`Removing AppState listener for ${oG(t).op} transaction.`),n&&n.remove&&n.remove())})})(i,r),r};const mW="ReactNativeTracing";function pW(){const e=WU();if(e)return function(e){return e.getIntegrationByName(mW)}(e)}YG();const fW="UserInteraction",gW=e=>{const t=WU();if(!t)return;const n=pW();if(!n)return void lU.log(`[${fW}] Tracing integration is not available. Can not start user interaction span.`);const i=t.getOptions(),{elementId:r,op:a}=e;if(!i.enableUserInteractionTracing)return void lU.log(`[${fW}] User Interaction Tracing is disabled.`);if(!r)return void lU.log(`[${fW}] User Interaction Tracing can not create transaction with undefined elementId.`);if(!n.state.currentRoute)return void lU.log(`[${fW}] User Interaction Tracing can not create transaction without a current route.`);const o=pG(),s=o&&![uW,cW].includes(oG(o).origin);if(o&&s)return void lU.warn(`[${fW}] Did not create ${a} transaction because active transaction ${oG(o).description} exists on the scope.`);const l=`${n.state.currentRoute}.${r}`;if(o&&oG(o).description===l&&oG(o).op===a)return void lU.warn(`[${fW}] Did not create ${a} transaction because it the same transaction ${oG(o).description} already exists on the scope.`);const u=zU(),c={name:l,op:a,scope:u};!function(e){delete e._sentrySpan}(u);const d=hW(c,{idleTimeout:n.options.idleTimeoutMs,finalTimeout:n.options.finalTimeoutMs});return d.setAttribute(ZU,cW),dW(t,d),lU.log(`[${fW}] User Interaction Tracing Created ${a} transaction ${l}.`),d};new class{constructor({cleanupInterval:e=5e3,ttl:t=2e3}={}){this._ttl=t,this._map=new Map,this._cleanupIntervalMs=e,this.startCleanup()}set(e,t){if(this._cleanupInterval||this.startCleanup(),"object"!=typeof t||!("then"in t))return void this._map.set(e,{value:t,expiresAt:Date.now()+this._ttl,promise:null});const n={value:void 0,expiresAt:null,promise:t};this._map.set(e,n),t.then(e=>{n.value=e,n.expiresAt=Date.now()+this._ttl,n.promise=null},()=>{n.expiresAt=Date.now()+this._ttl,n.promise=null})}pop(e){const t=this.get(e);return this._map.delete(e),t}get(e){const t=this._map.get(e);if(t)return t.promise?t.promise:(t.expiresAt&&t.expiresAt<=Date.now()&&this._map.delete(e),t.value)}has(e){const t=this._map.get(e);return!!t&&(!!t.promise||(!(t.expiresAt&&t.expiresAt<=Date.now())||(this._map.delete(e),!1)))}ttl(e){const t=this._map.get(e);if(t&&t.expiresAt){const e=t.expiresAt-Date.now();return e>0?e:0}}cleanup(){const e=Date.now();for(const[t,n]of this._map.entries())n.expiresAt&&n.expiresAt<=e&&this._map.delete(t);this._map.size||this.stopCleanup()}clear(){clearInterval(this._cleanupInterval),this._map.clear()}stopCleanup(){clearInterval(this._cleanupInterval)}startCleanup(){this._cleanupInterval=setInterval(()=>this.cleanup(),this._cleanupIntervalMs)}}({ttl:6e4});const _W=(e,t)=>{YG()&&void 0!==UG.alert?UG.alert(`${e}\n${t}`):sr.alert(e,t)},vW={onFormOpen:()=>{},onFormClose:()=>{},onAddScreenshot:e=>{},onSubmitSuccess:()=>{},onSubmitError:()=>{},onFormSubmitted:()=>{},showBranding:!0,isEmailRequired:!1,shouldValidateEmail:!0,isNameRequired:!1,showEmail:!0,showName:!0,enableScreenshot:!1,enableTakeScreenshot:!1,cancelButtonLabel:"Cancel",emailLabel:"Email",emailPlaceholder:"your.email@example.org",formTitle:"Report a Bug",isRequiredLabel:"(required)",messageLabel:"Description",messagePlaceholder:"What's the bug? What did you expect?",nameLabel:"Name",namePlaceholder:"Your Name",submitButtonLabel:"Send Bug Report",errorTitle:"Error",formError:"Please fill out all required fields.",emailError:"Please enter a valid email address.",captureScreenshotError:"Error capturing screenshot. Please try again.",successMessageText:"Thank you for your report!",addScreenshotButtonLabel:"Add a screenshot",removeScreenshotButtonLabel:"Remove screenshot",captureScreenshotButtonLabel:"Take a screenshot",genericError:"Unable to send feedback due to an unexpected error."};function yW(){const e=(()=>{const e=lW();return e?e.colorScheme:"system"})(),t="system"===e?hu.getColorScheme():e,n=Object.assign(Object.assign({},bW),(()=>{const e=lW();return e?e.themeLight:{}})()),i=Object.assign(Object.assign({},wW),(()=>{const e=lW();return e?e.themeDark:{}})());return"dark"===t?i:n}const bW={accentBackground:"rgba(88, 74, 192, 1)",accentForeground:"#ffffff",foreground:"#2b2233",background:"#ffffff",border:"rgba(41, 35, 47, 0.13)",feedbackIcon:"rgba(54, 45, 89, 1)",sentryLogo:"rgba(54, 45, 89, 1)"},wW={accentBackground:"rgba(88, 74, 192, 1)",accentForeground:"#ffffff",foreground:"#ebe6ef",background:"#29232f",border:"rgba(235, 230, 239, 0.15)",feedbackIcon:"#ffffff",sentryLogo:"#ffffff"};const SW="AutoInjectMobileScreenshotButton";class kW{static get _feedbackComponentName(){throw new Error("Subclasses must override feedbackComponentName")}static initialize(e){this._setVisibility=e}static reset(){this._isVisible=!1,this._setVisibility=void 0}static show(){this._setVisibility?(this._isVisible=!0,this._setVisibility(!0)):console.warn(`[Sentry] ${this._feedbackComponentName} requires 'Sentry.wrap(RootComponent)' to be called before 'show${this._feedbackComponentName}()'.`)}static hide(){this._setVisibility?(this._isVisible=!1,this._setVisibility(!1)):console.warn(`[Sentry] ${this._feedbackComponentName} requires 'Sentry.wrap(RootComponent)' before interacting with the widget.`)}static isFormVisible(){return this._isVisible}}kW._isVisible=!1;class CW extends kW{static get _feedbackComponentName(){return"FeedbackButton"}}class EW extends kW{static get _feedbackComponentName(){return"ScreenshotButton"}}const xW=()=>{var e,t;YG()?lU.warn("ScreenshotButton is not supported on Web."):((null===(e=WU())||void 0===e?void 0:e.getIntegrationByName(SW))||null===(t=WU())||void 0===t||t.addIntegration({name:SW}),EW.show())};let IW;var TW=function(t,n,i,r){return new(i||(i=Promise))(function(n,a){function o(t){try{l(r.next(t))}catch(e){a(e)}}function s(t){try{l(r.throw(t))}catch(e){a(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i(function(e){e(t)})).then(o,s)}l((r=r.apply(t,[])).next())})};class OW extends M.Component{constructor(e){var t,n,i,r,a,o;super(e),this._didSubmitForm=!1,this.handleFeedbackSubmit=()=>{const{name:e,email:t,description:n}=this.state,{onSubmitSuccess:i,onSubmitError:r,onFormSubmitted:a}=this.props,o=this.props,s=null==e?void 0:e.trim(),l=null==t?void 0:t.trim(),u=null==n?void 0:n.trim();if(this.props.isNameRequired&&!s||this.props.isEmailRequired&&!l||!u)return void _W(o.errorTitle,o.formError);if(this.props.shouldValidateEmail&&(this.props.isEmailRequired||l.length>0)&&!(e=>/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(e))(l))return void _W(o.errorTitle,o.emailError);const c=this.state.filename&&this.state.attachment?[{filename:this.state.filename,data:this.state.attachment}]:void 0,d={message:u,name:s,email:l,associatedEventId:UU().lastEventId()};try{a||this.setState({isVisible:!1}),function(e,t={},n=zU()){const{message:i,name:r,email:a,url:o,source:s,associatedEventId:l,tags:u}=e,c={contexts:{feedback:kU({contact_email:a,name:r,message:i,url:o,source:s,associated_event_id:l})},type:"feedback",level:"info",tags:u},d=n&&n.getClient()||WU();d&&d.emit("beforeSendFeedback",c,t),n.captureEvent(c,t)}(d,c?{attachments:c}:void 0),i({name:s,email:l,message:u,attachments:c}),_W(o.successMessageText,""),a(),this._didSubmitForm=!0}catch(h){r(new Error(`Feedback form submission failed: ${h}`)),_W(o.errorTitle,o.genericError),lU.error(`Feedback form submission failed: ${h}`)}},this.onScreenshotButtonPress=()=>TW(this,0,void 0,function*(){if(this._hasScreenshot())this.setState({filename:void 0,attachment:void 0,attachmentUri:void 0});else{const e=this.props;if(e.imagePicker){const t=e.imagePicker.launchImageLibraryAsync?()=>e.imagePicker.launchImageLibraryAsync({mediaTypes:["images"],base64:YG()}):e.imagePicker.launchImageLibrary?()=>e.imagePicker.launchImageLibrary({mediaType:"photo",includeBase64:YG()}):null;if(!t)return void lU.warn("No compatible image picker library found. Please provide a valid image picker library.");const n=yield t();if(n.assets&&n.assets.length>0)if(YG()){const e=n.assets[0].fileName,t=n.assets[0].uri,i=(e=>{if("function"!=typeof atob||!YG())throw new Error("atob is not available in this environment.");const t=atob(e);return new Uint8Array([...t].map(e=>e.charCodeAt(0)))})(n.assets[0].base64);null!=i?this.setState({filename:e,attachment:i,attachmentUri:t}):lU.error("Failed to read image data on the web")}else{const e=n.assets[0].fileName,t=n.assets[0].uri;aW(t).then(n=>{null!=n?this.setState({filename:e,attachment:n,attachmentUri:t}):(this._showImageRetrievalDevelopmentNote(),lU.error("Failed to read image data from uri:",t))}).catch(e=>{this._showImageRetrievalDevelopmentNote(),lU.error("Failed to read image data from uri:",t,"error: ",e)})}}else{const{onAddScreenshot:e}=Object.assign(Object.assign({},vW),this.props);e(e=>{aW(e).then(t=>{null!=t?this.setState({filename:"feedback_screenshot",attachment:t,attachmentUri:e}):(this._showImageRetrievalDevelopmentNote(),lU.error("Failed to read image data from uri:",e))}).catch(t=>{this._showImageRetrievalDevelopmentNote(),lU.error("Failed to read image data from uri:",e,"error: ",t)})})}}}),this._setCapturedScreenshot=e=>{null!=e.data?(lU.debug("Setting captured screenshot:",e.filename),rW.encodeToBase64(e.data).then(t=>{if(null!=t){const n=`data:${e.contentType};base64,${t}`;this.setState({filename:e.filename,attachment:e.data,attachmentUri:n})}else lU.error("Failed to read image data from:",e.filename)}).catch(t=>{lU.error("Failed to read image data from:",e.filename,"error: ",t)})):lU.error("Failed to read image data from:",e.filename)},this._saveFormState=()=>{OW._savedState=Object.assign({},this.state)},this._clearFormState=()=>{OW._savedState={name:"",email:"",description:"",filename:void 0,attachment:void 0,attachmentUri:void 0}},this._hasScreenshot=()=>void 0!==this.state.filename&&void 0!==this.state.attachment&&void 0!==this.state.attachmentUri,this._getUser=()=>{const e=zU().getUser();if(e)return e;const t=UU().getUser();return t||iU("globalScope",()=>new DU).getUser()},this._showImageRetrievalDevelopmentNote=()=>{WG()&&_W("Development note","The feedback widget cannot retrieve image data in Expo Go. Please build your app to test this functionality.")};const s={useSentryUser:{email:(null===(n=null===(t=this.props)||void 0===t?void 0:t.useSentryUser)||void 0===n?void 0:n.email)||(null===(i=this._getUser())||void 0===i?void 0:i.email)||"",name:(null===(a=null===(r=this.props)||void 0===r?void 0:r.useSentryUser)||void 0===a?void 0:a.name)||(null===(o=this._getUser())||void 0===o?void 0:o.name)||""}};this.state={isVisible:!0,name:OW._savedState.name||s.useSentryUser.name,email:OW._savedState.email||s.useSentryUser.email,description:OW._savedState.description||"",filename:OW._savedState.filename||void 0,attachment:OW._savedState.attachment||void 0,attachmentUri:OW._savedState.attachmentUri||void 0},function(){var e,t;(null===(e=WU())||void 0===e?void 0:e.getIntegrationByName(oW))||null===(t=WU())||void 0===t||t.addIntegration(sW())}()}static reset(){OW._savedState={name:"",email:"",description:"",filename:void 0,attachment:void 0,attachmentUri:void 0}}componentDidMount(){this._themeListener=hu.addChangeListener(()=>{this.forceUpdate()})}componentWillUnmount(){this._didSubmitForm?(this._clearFormState(),this._didSubmitForm=!1):this._saveFormState(),this._themeListener&&this._themeListener.remove()}render(){const e=yW(),{name:t,email:n,description:i}=this.state,{onFormClose:r}=this.props,a=this.props,o=this.props,s=this.props,l=Object.assign(Object.assign({},(e=>({container:{flex:1,padding:20,backgroundColor:e.background},title:{fontSize:24,fontWeight:"bold",marginBottom:20,textAlign:"left",flex:1,color:e.foreground},label:{marginBottom:4,fontSize:16,color:e.foreground},input:{height:50,borderColor:e.border,borderWidth:1,borderRadius:5,paddingHorizontal:10,marginBottom:15,fontSize:16,color:e.foreground},textArea:{height:100,textAlignVertical:"top",color:e.foreground},screenshotButton:{backgroundColor:e.background,padding:15,borderRadius:5,alignItems:"center",flex:1,borderWidth:1,borderColor:e.border},screenshotContainer:{flexDirection:"row",alignItems:"center",width:"100%",marginBottom:20},screenshotThumbnail:{width:50,height:50,borderRadius:5,marginRight:10},screenshotText:{color:e.foreground,fontSize:16},takeScreenshotButton:{backgroundColor:e.background,padding:15,borderRadius:5,alignItems:"center",borderWidth:1,borderColor:e.border,marginTop:-10,marginBottom:20},takeScreenshotText:{color:e.foreground,fontSize:16},submitButton:{backgroundColor:e.accentBackground,paddingVertical:15,borderRadius:5,alignItems:"center",marginBottom:10},submitText:{color:e.accentForeground,fontSize:18},cancelButton:{backgroundColor:e.background,padding:15,borderRadius:5,alignItems:"center",borderWidth:1,borderColor:e.border},cancelText:{color:e.foreground,fontSize:16},titleContainer:{flexDirection:"row",width:"100%"},sentryLogo:{width:40,height:40,tintColor:e.sentryLogo}}))(e)),this.props.styles),u=()=>{r?r():this.setState({isVisible:!1})};if(!this.state.isVisible)return null;const c=(()=>{const e=IW;return IW=void 0,e})();return"ErrorCapturingScreenshot"===c?setTimeout(()=>TW(this,0,void 0,function*(){_W(s.errorTitle,s.captureScreenshotError)}),100):c&&this._setCapturedScreenshot(c),M.createElement(fm,{onPress:$G()?Pu.dismiss:void 0,accessible:!1,accessibilityElementsHidden:!1},M.createElement(ga,{style:l.container},M.createElement(ga,{style:l.titleContainer},M.createElement(hl,{style:l.title,testID:"sentry-feedback-form-title"},s.formTitle),a.showBranding&&M.createElement(Js,{source:{uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAAC4BAMAAABUVL5sAAAAD1BMVEUAAAA2Llo3LVk4LFg2LVmgcvrUAAAABHRSTlMAgL9ARyeO/QAAA7pJREFUeNrtWltynDAQFBIHIFUcgCQ6AIk5AAjd/0ypxFk3ouUCNJofl/rHy75a09MzI7Q2DQ0NDQ0NDQ0NDQ0N9eF+xPh9MKpwPv6FLss7R9yMImz8j8nowb9IglFDF6N+KCNIdqMFcGjpBbVUXdzHqKsXUhJGNb2g1vz6azRgX8XulUwMtVZjFsWkvFz10s0ooEO+9Vpxj/6rp9eI5VsdE6eJcDCxilqICiZWMHBSMkBVA2vq1SVrVyr6Ea5VMjHqjytTwcAgRVJ0DAy9VoWUTNT3tQysZGIYmGNTKHfK0q6oFkysYWCuHB0DaxX9yHLx5JKrhVC0TGwjWNRMvNAuW6PoR4TCepnqLLuiicEyKJq4g2C6Rc+hsInlgtHCF41OrD65INisObksbKy2/YJg9U08sGBTbRN3YaBQQu2i74/mcQil6vZr5C0dQpGbGKJvdOA1VDVxd5LHooPR5BJPdwql5vaLeq9FQZKJpa1kOoUSKpq45+m+ZK93aUpSwRyuafslUguCIZRZamKoBYQT80QmlqnF38p6bSIDcyg2q5fw/uo8dx0upZMLLdadQ1kgkNDEOOGiYYXjVKGJ8V00rEggcErurxAKCwQTi9RCAW7UFcUm5vPAOFNXFBY9DggQyp76jnIkOyBwaeqtyMScEu7w4JRNLnyQOjyvACcWpR145g6PV1fp9mvE0jMd3tWZXDR3/Ud2cSXZfmHhvNpEoFlgYsjFHX4AJc3kXXSTyEfDTrz94ptE1qvS9ouG1Ud2sQT5PVcHg3FL78FIYUpqxWK1yLzMxNzhHVaLzItMzB0eB/S4CDRHC+AzFTjhAiSSHx9tpgJXqnmhXi7VizM/F5v4V5oVqOIp81PpEW4Xt7PUA0kEe5WZ2PLt7ZopDg8Seue9GpxoU0WrHyFPgYlzmyrKPDxcpFeX3YRS5mGvxybmsC2tPhLJQxPzdsfliwMeLjAx9wcujoFIaEAX/KSYXz0s+9TE/E7LX0yF8lQvitl99sVjSgITl/yk6Lk48JjfGadnanHml8xjMvFTA+eL42CRwDKEZwbm4rBMyAmdH6UEz8HDTPj4d4ie1EJxJCQg56DXaxKOl0iGz0jcdebZluzhbFSA1yEZ2JzbHZKQe3I/EK4CErTHbwn84ZP+8Poxqrd/+I2cXJAw0v9VAkBiI3DhLryZEe6SXNeJk5HcHFu+Aom5wiIn2a7niZiE1WKMUhIOhNFJSQZzh0VG8tPcQufLSQI46sO9vcM0NDQ0NDQ0NDQ0NHxF/AFGJOBYBWrb5gAAAABJRU5ErkJggg=="},style:l.sentryLogo,testID:"sentry-logo"})),a.showName&&M.createElement(M.Fragment,null,M.createElement(hl,{style:l.label},s.nameLabel,a.isNameRequired&&` ${s.isRequiredLabel}`),M.createElement(kh,{style:l.input,testID:"sentry-feedback-name-input",placeholder:s.namePlaceholder,value:t,onChangeText:e=>this.setState({name:e})})),a.showEmail&&M.createElement(M.Fragment,null,M.createElement(hl,{style:l.label},s.emailLabel,a.isEmailRequired&&` ${s.isRequiredLabel}`),M.createElement(kh,{style:l.input,testID:"sentry-feedback-email-input",placeholder:s.emailPlaceholder,keyboardType:"email-address",value:n,onChangeText:e=>this.setState({email:e})})),M.createElement(hl,{style:l.label},s.messageLabel,` ${s.isRequiredLabel}`),M.createElement(kh,{style:[l.input,l.textArea],testID:"sentry-feedback-message-input",placeholder:s.messagePlaceholder,value:i,onChangeText:e=>this.setState({description:e}),multiline:!0}),(a.enableScreenshot||o.imagePicker||this._hasScreenshot())&&M.createElement(ga,{style:l.screenshotContainer},this.state.attachmentUri&&M.createElement(Js,{source:{uri:this.state.attachmentUri},style:l.screenshotThumbnail}),M.createElement(Ic,{style:l.screenshotButton,onPress:this.onScreenshotButtonPress},M.createElement(hl,{style:l.screenshotText},this._hasScreenshot()?s.removeScreenshotButtonLabel:s.addScreenshotButtonLabel))),$G()&&a.enableTakeScreenshot&&!this.state.attachmentUri&&M.createElement(Ic,{style:l.takeScreenshotButton,onPress:()=>{CW.hide(),u(),xW()}},M.createElement(hl,{style:l.takeScreenshotText,testID:"sentry-feedback-take-screenshot-button"},s.captureScreenshotButtonLabel)),M.createElement(Ic,{style:l.submitButton,onPress:this.handleFeedbackSubmit},M.createElement(hl,{style:l.submitText,testID:"sentry-feedback-submit-button"},s.submitButtonLabel)),M.createElement(Ic,{style:l.cancelButton,onPress:u},M.createElement(hl,{style:l.cancelText},s.cancelButtonLabel))))}}OW.defaultProps=Object.assign({},vW),OW._savedState={name:"",email:"",description:"",filename:void 0,attachment:void 0,attachmentUri:void 0},function(){var e;const{major:t,minor:n}=(null===(e=zG.ReactNativeVersion)||void 0===e?void 0:e.version)||{}}();tr.hasViewManagerConfig&&tr.hasViewManagerConfig("RNSentryOnDrawReporter");const RW=Ei.create({wrapperView:{flex:1}}),AW="sentry-label",LW="data-sentry-component",PW="data-sentry-element",MW="data-sentry-source-file";class DW extends M.Component{constructor(){super(...arguments),this.name="TouchEventBoundary"}componentDidMount(){var e;const t=WU();null===(e=null==t?void 0:t.addIntegration)||void 0===e||e.call(t,function(e,t=()=>{}){return{name:e,setupOnce:t}}(this.name))}render(){return M.createElement(ga,{style:RW.wrapperView,onTouchStart:this._onTouchStart.bind(this)},this.props.children)}_logTouchEvent(e,t){const n=e[0],i=t||`${n.name}${n.file?` (${n.file})`:""}`,r={category:this.props.breadcrumbCategory,data:{path:e},level:"info",message:`Touch event within element: ${i}`,type:this.props.breadcrumbType};HG(r),lU.log(`[TouchEvents] ${r.message}`)}_isNameIgnored(e){let t=this.props.ignoreNames||[];return this.props.ignoredDisplayNames&&(t=[...t,...this.props.ignoredDisplayNames]),t.some(t=>"string"==typeof t&&e===t||t instanceof RegExp&&e.match(t))}_onTouchStart(e){var t,n;if(!e._targetInst)return;let i=e._targetInst;const r=[];for(;i&&this.props.maxComponentTreeSize&&r.length<this.props.maxComponentTreeSize&&(null===(t=i.elementType)||void 0===t?void 0:t.displayName)!==DW.displayName;){const e=NW(i,this.props.labelName);this._pushIfNotIgnored(r,e),i=i.return}const a=null===(n=r.find(e=>e.label))||void 0===n?void 0:n.label;r.length>0&&this._logTouchEvent(r,a);const o=gW({elementId:a,op:"ui.action.touch"});o&&o.setAttribute(ZU,uW)}_pushIfNotIgnored(e,t){return!!t&&(!(!t.name&&!t.label)&&((!t.name||!this._isNameIgnored(t.name))&&((!t.label||!this._isNameIgnored(t.label))&&(!(e.length>0&&JSON.stringify(e[e.length-1])===JSON.stringify(t))&&(e.push(t),!0)))))}}function NW(e,t){var n;const i=null===(n=e.elementType)||void 0===n?void 0:n.displayName,r=e.memoizedProps;return r?kU({name:FW(r)||i,element:BW(r),file:jW(r),label:VW(r,t)}):i?{name:i}:void 0}function FW(e){return"string"==typeof e[LW]&&e[LW].length>0&&"unknown"!==e[LW]&&e[LW]||void 0}function BW(e){return"string"==typeof e[PW]&&e[PW].length>0&&"unknown"!==e[PW]&&e[PW]||void 0}function jW(e){return"string"==typeof e[MW]&&e[MW].length>0&&"unknown"!==e[MW]&&e[MW]||void 0}function VW(e,t){return"string"==typeof e[AW]&&e[AW].length>0?e[AW]:"string"==typeof t&&"string"==typeof e[t]&&e[t].length>0?e[t]:void 0}function HW(e){return Array.isArray(e)||tN(e)}function zW(e,t){const n=HW(e),i=HW(t);if(n!==i)throw HG({data:{incoming:e,schema:t,isArrayIncoming:n,isArraySchema:i},message:"TypeGuard isArray"}),new Error(`PersistenceUtils::typeGuard] ${Jz.MalformedDataError}`);if(n)for(const r of e)zW(r,t[0]);return WW(t)&&Object.keys(t).forEach(n=>{const i=e[n],r=t[n];if(i&&HW(r))zW(i,r);else if(i&&WW(i))zW(i,r);else if(WW(e)&&!e.hasOwnProperty(n))throw HG({data:{key:n,incoming:e,incomingProperty:i,schema:t,schemaProperty:r,isObjectIncoming:WW(e),hasOwnPropertyIncoming:e.hasOwnProperty(n)},message:"TypeGuard isObject"}),new Error(`[PersistenceUtils::typeGuard] ${Jz.MalformedDataError}`)}),!0}DW.displayName="__Sentry.TouchEventBoundary",DW.defaultProps={breadcrumbCategory:"touch",breadcrumbType:"user",ignoreNames:[],maxComponentTreeSize:20};const UW=/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z/;function GW(e){if(HW(e))for(let t=0;t<e.length;t++)e[t]=GW(e[t]);else if(WW(e))for(const t of Object.keys(e)){const n=e[t];"object"==typeof n?e[t]=GW(n):"string"==typeof n&&UW.exec(n)&&(e[t]=new Date(n))}return e}function WW(e){return null!=e&&"object"==typeof e&&!HW(e)}class YW{storageName;schema;constructor(e,t){this.storageName=`${e}Storage`,this.schema=JSON.parse(JSON.stringify(t))}get(){const e=qj.getString(this.storageName),t=this.instantiateData(e);return this.isT(t),t}update(e){const t=JSON.parse(JSON.stringify(e)),n=Object.assign(this.get(),t);return this.isT(n),qj.set(this.storageName,JSON.stringify(n)),n}set(e){return this.isT(e),qj.set(this.storageName,JSON.stringify(e)),e}clear(){return qj.delete(this.storageName),this.instantiateData(void 0)}instantiateData(e){const t=e??JSON.stringify(this.schema);return qj.set(this.storageName,t),JSON.parse(t)}isT(e){if(!e||"object"!=typeof e)throw new Error(`[PersistenceManager::isT] ${Jz.IncorrectDataError}`);return zW(e,this.schema),!0}}class $W{persistenceManager;schema;data;constructor(e,t){this.schema=JSON.parse(JSON.stringify(t)),this.data=JSON.parse(JSON.stringify(t)),this.persistenceManager=new YW(e,t),this.createDataFromSchema(),this.restore()}get(){return this.data}set(e){return this.data=JSON.parse(JSON.stringify(e)),this.data=GW(this.data),this.data}update(e){if(HW(this.data)){const n=this.data.findIndex(t=>t.uuid===e.uuid);if(-1!==n)this.data[n]={...this.data[n],...e};else try{zW([e],this.schema),this.data.push(e)}catch(t){if(t.message===Jz.MalformedDataError)throw new Error("[DataManager::update] Cannot add an element that does not contain required fields");throw t}}else Object.assign(this.data,e);return this.data}save(e=!0){return e?this.persistenceManager.update(this.data):this.persistenceManager.set(this.data)}restore(){if(this.data=this.persistenceManager.get(),this.data=GW(this.data),HW(this.data)){const e=e=>e.filter(e=>!!e.uuid);this.data=e(this.data)}return this.data}clear=()=>(this.persistenceManager.clear(),this.createDataFromSchema(),this.data);createDataFromSchema(){this.data=HW(this.schema)?[]:JSON.parse(JSON.stringify(this.schema))}}const XW=new class extends $W{migrateData(){throw new Error("[TrackingManager::migrateData] Method purposefully not implemented.")}constructor(){super("trackingEvent",[])}update(e){return super.update(e)}sync=async()=>{const e=super.get(),t=[];for(const n of e)try{await Qz(n)}catch{t.push(n)}super.set(t),super.save(!1)}},qW=6048e5,ZW=6e4,KW=36e5,QW=Symbol.for("constructDateFrom");function JW(e,t){return"function"==typeof e?e(t):e&&"object"==typeof e&&QW in e?e[QW](t):e instanceof Date?new e.constructor(t):new Date(t)}function eY(e,t){return JW(t||e,e)}function tY(e,t,n){const i=eY(e,n?.in);return isNaN(t)?JW(n?.in||e,NaN):t?(i.setDate(i.getDate()+t),i):i}function nY(e,t,n){const i=eY(e,n?.in);if(isNaN(t))return JW(e,NaN);if(!t)return i;const r=i.getDate(),a=JW(e,i.getTime());a.setMonth(i.getMonth()+t+1,0);return r>=a.getDate()?a:(i.setFullYear(a.getFullYear(),a.getMonth(),r),i)}function iY(e,t,n){return function(e,t){return JW(e,+eY(e)+t)}(e,t*KW)}let rY={};function aY(){return rY}function oY(e,t){const n=aY(),i=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,r=eY(e,t?.in),a=r.getDay(),o=(a<i?7:0)+a-i;return r.setDate(r.getDate()-o),r.setHours(0,0,0,0),r}function sY(e,t){return oY(e,{...t,weekStartsOn:1})}function lY(e,t){const n=eY(e,t?.in),i=n.getFullYear(),r=JW(n,0);r.setFullYear(i+1,0,4),r.setHours(0,0,0,0);const a=sY(r),o=JW(n,0);o.setFullYear(i,0,4),o.setHours(0,0,0,0);const s=sY(o);return n.getTime()>=a.getTime()?i+1:n.getTime()>=s.getTime()?i:i-1}function uY(e){const t=eY(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function cY(e,...t){const n=JW.bind(null,e||t.find(e=>"object"==typeof e));return t.map(n)}function dY(e,t){const n=eY(e,t?.in);return n.setHours(0,0,0,0),n}function hY(e,t,n){const i=eY(e,n?.in);return i.setTime(i.getTime()+t*ZW),i}function mY(e){return!(!((t=e)instanceof Date||"object"==typeof t&&"[object Date]"===Object.prototype.toString.call(t))&&"number"!=typeof e||isNaN(+eY(e)));var t}function pY(e,t,n){const i=(r=t,(+eY(e)-+eY(r))/ZW);var r,a;return(a=n?.roundingMethod,e=>{const t=(a?Math[a]:Math.trunc)(e);return 0===t?0:t})(i)}const fY={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},gY=(e,t,n)=>{let i;const r=fY[e];return i="string"==typeof r?r:1===t?r.one:r.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+i:i+" ago":i};function _Y(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const vY={date:_Y({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:_Y({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:_Y({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},yY={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},bY=(e,t,n,i)=>yY[e];function wY(e){return(t,n)=>{let i;if("formatting"===(n?.context?String(n.context):"standalone")&&e.formattingValues){const t=e.defaultFormattingWidth||e.defaultWidth,r=n?.width?String(n.width):t;i=e.formattingValues[r]||e.formattingValues[t]}else{const t=e.defaultWidth,r=n?.width?String(n.width):e.defaultWidth;i=e.values[r]||e.values[t]}return i[e.argumentCallback?e.argumentCallback(t):t]}}const SY={ordinalNumber:(e,t)=>{const n=Number(e),i=n%100;if(i>20||i<10)switch(i%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:wY({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:wY({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:wY({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:wY({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:wY({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})};function kY(e){return(t,n={})=>{const i=n.width,r=i&&e.matchPatterns[i]||e.matchPatterns[e.defaultMatchWidth],a=t.match(r);if(!a)return null;const o=a[0],s=i&&e.parsePatterns[i]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?function(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n;return}(s,e=>e.test(o)):function(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n;return}(s,e=>e.test(o));let u;u=e.valueCallback?e.valueCallback(l):l,u=n.valueCallback?n.valueCallback(u):u;return{value:u,rest:t.slice(o.length)}}}function CY(e){return(t,n={})=>{const i=t.match(e.matchPattern);if(!i)return null;const r=i[0],a=t.match(e.parsePattern);if(!a)return null;let o=e.valueCallback?e.valueCallback(a[0]):a[0];o=n.valueCallback?n.valueCallback(o):o;return{value:o,rest:t.slice(r.length)}}}const EY={ordinalNumber:CY({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:kY({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:kY({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:kY({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:kY({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:kY({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},xY={code:"en-US",formatDistance:gY,formatLong:vY,formatRelative:bY,localize:SY,match:EY,options:{weekStartsOn:0,firstWeekContainsDate:1}};function IY(e,t){const n=eY(e,t?.in),i=function(e,t,n){const[i,r]=cY(n?.in,e,t),a=dY(i),o=dY(r),s=+a-uY(a),l=+o-uY(o);return Math.round((s-l)/864e5)}(n,function(e,t){const n=eY(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}(n));return i+1}function TY(e,t){const n=eY(e,t?.in),i=+sY(n)-+function(e,t){const n=lY(e,t),i=JW(e,0);return i.setFullYear(n,0,4),i.setHours(0,0,0,0),sY(i)}(n);return Math.round(i/qW)+1}function OY(e,t){const n=eY(e,t?.in),i=n.getFullYear(),r=aY(),a=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,o=JW(t?.in||e,0);o.setFullYear(i+1,0,a),o.setHours(0,0,0,0);const s=oY(o,t),l=JW(t?.in||e,0);l.setFullYear(i,0,a),l.setHours(0,0,0,0);const u=oY(l,t);return+n>=+s?i+1:+n>=+u?i:i-1}function RY(e,t){const n=eY(e,t?.in),i=+oY(n,t)-+function(e,t){const n=aY(),i=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,r=OY(e,t),a=JW(t?.in||e,0);return a.setFullYear(r,0,i),a.setHours(0,0,0,0),oY(a,t)}(n,t);return Math.round(i/qW)+1}function AY(e,t){return(e<0?"-":"")+Math.abs(e).toString().padStart(t,"0")}const LY={y(e,t){const n=e.getFullYear(),i=n>0?n:1-n;return AY("yy"===t?i%100:i,t.length)},M(e,t){const n=e.getMonth();return"M"===t?String(n+1):AY(n+1,2)},d:(e,t)=>AY(e.getDate(),t.length),a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return"am"===n?"a.m.":"p.m."}},h:(e,t)=>AY(e.getHours()%12||12,t.length),H:(e,t)=>AY(e.getHours(),t.length),m:(e,t)=>AY(e.getMinutes(),t.length),s:(e,t)=>AY(e.getSeconds(),t.length),S(e,t){const n=t.length,i=e.getMilliseconds();return AY(Math.trunc(i*Math.pow(10,n-3)),t.length)}},PY="midnight",MY="noon",DY="morning",NY="afternoon",FY="evening",BY="night",jY={G:function(e,t,n){const i=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(i,{width:"abbreviated"});case"GGGGG":return n.era(i,{width:"narrow"});default:return n.era(i,{width:"wide"})}},y:function(e,t,n){if("yo"===t){const t=e.getFullYear(),i=t>0?t:1-t;return n.ordinalNumber(i,{unit:"year"})}return LY.y(e,t)},Y:function(e,t,n,i){const r=OY(e,i),a=r>0?r:1-r;if("YY"===t){return AY(a%100,2)}return"Yo"===t?n.ordinalNumber(a,{unit:"year"}):AY(a,t.length)},R:function(e,t){return AY(lY(e),t.length)},u:function(e,t){return AY(e.getFullYear(),t.length)},Q:function(e,t,n){const i=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(i);case"QQ":return AY(i,2);case"Qo":return n.ordinalNumber(i,{unit:"quarter"});case"QQQ":return n.quarter(i,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(i,{width:"narrow",context:"formatting"});default:return n.quarter(i,{width:"wide",context:"formatting"})}},q:function(e,t,n){const i=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(i);case"qq":return AY(i,2);case"qo":return n.ordinalNumber(i,{unit:"quarter"});case"qqq":return n.quarter(i,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(i,{width:"narrow",context:"standalone"});default:return n.quarter(i,{width:"wide",context:"standalone"})}},M:function(e,t,n){const i=e.getMonth();switch(t){case"M":case"MM":return LY.M(e,t);case"Mo":return n.ordinalNumber(i+1,{unit:"month"});case"MMM":return n.month(i,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(i,{width:"narrow",context:"formatting"});default:return n.month(i,{width:"wide",context:"formatting"})}},L:function(e,t,n){const i=e.getMonth();switch(t){case"L":return String(i+1);case"LL":return AY(i+1,2);case"Lo":return n.ordinalNumber(i+1,{unit:"month"});case"LLL":return n.month(i,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(i,{width:"narrow",context:"standalone"});default:return n.month(i,{width:"wide",context:"standalone"})}},w:function(e,t,n,i){const r=RY(e,i);return"wo"===t?n.ordinalNumber(r,{unit:"week"}):AY(r,t.length)},I:function(e,t,n){const i=TY(e);return"Io"===t?n.ordinalNumber(i,{unit:"week"}):AY(i,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getDate(),{unit:"date"}):LY.d(e,t)},D:function(e,t,n){const i=IY(e);return"Do"===t?n.ordinalNumber(i,{unit:"dayOfYear"}):AY(i,t.length)},E:function(e,t,n){const i=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(i,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(i,{width:"short",context:"formatting"});default:return n.day(i,{width:"wide",context:"formatting"})}},e:function(e,t,n,i){const r=e.getDay(),a=(r-i.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return AY(a,2);case"eo":return n.ordinalNumber(a,{unit:"day"});case"eee":return n.day(r,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(r,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},c:function(e,t,n,i){const r=e.getDay(),a=(r-i.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return AY(a,t.length);case"co":return n.ordinalNumber(a,{unit:"day"});case"ccc":return n.day(r,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(r,{width:"narrow",context:"standalone"});case"cccccc":return n.day(r,{width:"short",context:"standalone"});default:return n.day(r,{width:"wide",context:"standalone"})}},i:function(e,t,n){const i=e.getDay(),r=0===i?7:i;switch(t){case"i":return String(r);case"ii":return AY(r,t.length);case"io":return n.ordinalNumber(r,{unit:"day"});case"iii":return n.day(i,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(i,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(i,{width:"short",context:"formatting"});default:return n.day(i,{width:"wide",context:"formatting"})}},a:function(e,t,n){const i=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(i,{width:"narrow",context:"formatting"});default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(e,t,n){const i=e.getHours();let r;switch(r=12===i?MY:0===i?PY:i/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(e,t,n){const i=e.getHours();let r;switch(r=i>=17?FY:i>=12?NY:i>=4?DY:BY,t){case"B":case"BB":case"BBB":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){let t=e.getHours()%12;return 0===t&&(t=12),n.ordinalNumber(t,{unit:"hour"})}return LY.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getHours(),{unit:"hour"}):LY.H(e,t)},K:function(e,t,n){const i=e.getHours()%12;return"Ko"===t?n.ordinalNumber(i,{unit:"hour"}):AY(i,t.length)},k:function(e,t,n){let i=e.getHours();return 0===i&&(i=24),"ko"===t?n.ordinalNumber(i,{unit:"hour"}):AY(i,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):LY.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getSeconds(),{unit:"second"}):LY.s(e,t)},S:function(e,t){return LY.S(e,t)},X:function(e,t,n){const i=e.getTimezoneOffset();if(0===i)return"Z";switch(t){case"X":return HY(i);case"XXXX":case"XX":return zY(i);default:return zY(i,":")}},x:function(e,t,n){const i=e.getTimezoneOffset();switch(t){case"x":return HY(i);case"xxxx":case"xx":return zY(i);default:return zY(i,":")}},O:function(e,t,n){const i=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+VY(i,":");default:return"GMT"+zY(i,":")}},z:function(e,t,n){const i=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+VY(i,":");default:return"GMT"+zY(i,":")}},t:function(e,t,n){return AY(Math.trunc(+e/1e3),t.length)},T:function(e,t,n){return AY(+e,t.length)}};function VY(e,t=""){const n=e>0?"-":"+",i=Math.abs(e),r=Math.trunc(i/60),a=i%60;return 0===a?n+String(r):n+String(r)+t+AY(a,2)}function HY(e,t){if(e%60==0){return(e>0?"-":"+")+AY(Math.abs(e)/60,2)}return zY(e,t)}function zY(e,t=""){const n=e>0?"-":"+",i=Math.abs(e);return n+AY(Math.trunc(i/60),2)+t+AY(i%60,2)}const UY=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},GY=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},WY={p:GY,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],i=n[1],r=n[2];if(!r)return UY(e,t);let a;switch(i){case"P":a=t.dateTime({width:"short"});break;case"PP":a=t.dateTime({width:"medium"});break;case"PPP":a=t.dateTime({width:"long"});break;default:a=t.dateTime({width:"full"})}return a.replace("{{date}}",UY(i,t)).replace("{{time}}",GY(r,t))}},YY=/^D+$/,$Y=/^Y+$/,XY=["D","DD","YY","YYYY"];function qY(e){return YY.test(e)}function ZY(e){return $Y.test(e)}function KY(e,t,n){const i=function(e,t,n){const i="Y"===e[0]?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${i} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}(e,t,n);if(console.warn(i),XY.includes(e))throw new RangeError(i)}const QY=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,JY=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,e$=/^'([^]*?)'?$/,t$=/''/g,n$=/[a-zA-Z]/;function i$(e,t,n){const i=aY(),r=i.locale??xY,a=i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,o=i.weekStartsOn??i.locale?.options?.weekStartsOn??0,s=eY(e,n?.in);if(!mY(s))throw new RangeError("Invalid time value");let l=t.match(JY).map(e=>{const t=e[0];if("p"===t||"P"===t){return(0,WY[t])(e,r.formatLong)}return e}).join("").match(QY).map(e=>{if("''"===e)return{isToken:!1,value:"'"};const t=e[0];if("'"===t)return{isToken:!1,value:r$(e)};if(jY[t])return{isToken:!0,value:e};if(t.match(n$))throw new RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}});r.localize.preprocessor&&(l=r.localize.preprocessor(s,l));const u={firstWeekContainsDate:a,weekStartsOn:o,locale:r};return l.map(n=>{if(!n.isToken)return n.value;const i=n.value;(ZY(i)||qY(i))&&KY(i,t,String(e));return(0,jY[i[0]])(s,i,r.localize,u)}).join("")}function r$(e){const t=e.match(e$);return t?t[1].replace(t$,"'"):e}function a$(e,t){const n=eY(e,t?.in),i=n.getFullYear(),r=n.getMonth(),a=JW(n,0);return a.setFullYear(i,r+1,0),a.setHours(0,0,0,0),a.getDate()}function o$(e,t){return+eY(e)>+eY(t)}function s$(e,t){return+eY(e)<+eY(t)}class l${subPriority=0;validate(e,t){return!0}}class u$ extends l${constructor(e,t,n,i,r){super(),this.value=e,this.validateValue=t,this.setValue=n,this.priority=i,r&&(this.subPriority=r)}validate(e,t){return this.validateValue(e,this.value,t)}set(e,t,n){return this.setValue(e,t,this.value,n)}}class c$ extends l${priority=10;subPriority=-1;constructor(e,t){super(),this.context=e||(e=>JW(t,e))}set(e,t){return t.timestampIsSet?e:JW(e,function(e,t){const n=function(e){return"function"==typeof e&&e.prototype?.constructor===e}(t)?new t(0):JW(t,0);return n.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),n.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),n}(e,this.context))}}class d${run(e,t,n,i){const r=this.parse(e,t,n,i);return r?{setter:new u$(r.value,this.validate,this.set,this.priority,this.subPriority),rest:r.rest}:null}validate(e,t,n){return!0}}const h$=/^(1[0-2]|0?\d)/,m$=/^(3[0-1]|[0-2]?\d)/,p$=/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,f$=/^(5[0-3]|[0-4]?\d)/,g$=/^(2[0-3]|[0-1]?\d)/,_$=/^(2[0-4]|[0-1]?\d)/,v$=/^(1[0-1]|0?\d)/,y$=/^(1[0-2]|0?\d)/,b$=/^[0-5]?\d/,w$=/^[0-5]?\d/,S$=/^\d/,k$=/^\d{1,2}/,C$=/^\d{1,3}/,E$=/^\d{1,4}/,x$=/^-?\d+/,I$=/^-?\d/,T$=/^-?\d{1,2}/,O$=/^-?\d{1,3}/,R$=/^-?\d{1,4}/,A$=/^([+-])(\d{2})(\d{2})?|Z/,L$=/^([+-])(\d{2})(\d{2})|Z/,P$=/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,M$=/^([+-])(\d{2}):(\d{2})|Z/,D$=/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/;function N$(e,t){return e?{value:t(e.value),rest:e.rest}:e}function F$(e,t){const n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function B$(e,t){const n=t.match(e);if(!n)return null;if("Z"===n[0])return{value:0,rest:t.slice(1)};const i="+"===n[1]?1:-1,r=n[2]?parseInt(n[2],10):0,a=n[3]?parseInt(n[3],10):0,o=n[5]?parseInt(n[5],10):0;return{value:i*(r*KW+a*ZW+1e3*o),rest:t.slice(n[0].length)}}function j$(e){return F$(x$,e)}function V$(e,t){switch(e){case 1:return F$(S$,t);case 2:return F$(k$,t);case 3:return F$(C$,t);case 4:return F$(E$,t);default:return F$(new RegExp("^\\d{1,"+e+"}"),t)}}function H$(e,t){switch(e){case 1:return F$(I$,t);case 2:return F$(T$,t);case 3:return F$(O$,t);case 4:return F$(R$,t);default:return F$(new RegExp("^-?\\d{1,"+e+"}"),t)}}function z$(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;default:return 0}}function U$(e,t){const n=t>0,i=n?t:1-t;let r;if(i<=50)r=e||100;else{const t=i+50;r=e+100*Math.trunc(t/100)-(e>=t%100?100:0)}return n?r:1-r}function G$(e){return e%400==0||e%4==0&&e%100!=0}const W$=[31,28,31,30,31,30,31,31,30,31,30,31],Y$=[31,29,31,30,31,30,31,31,30,31,30,31];function $$(e,t,n){const i=aY(),r=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??i.weekStartsOn??i.locale?.options?.weekStartsOn??0,a=eY(e,n?.in),o=a.getDay(),s=7-r;return tY(a,t<0||t>6?t-(o+s)%7:((t%7+7)%7+s)%7-(o+s)%7,n)}function X$(e,t,n){const i=eY(e,n?.in),r=function(e,t){const n=eY(e,t?.in).getDay();return 0===n?7:n}(i,n);return tY(i,t-r,n)}const q$={G:new class extends d${priority=140;parse(e,t,n){switch(t){case"G":case"GG":case"GGG":return n.era(e,{width:"abbreviated"})||n.era(e,{width:"narrow"});case"GGGGG":return n.era(e,{width:"narrow"});default:return n.era(e,{width:"wide"})||n.era(e,{width:"abbreviated"})||n.era(e,{width:"narrow"})}}set(e,t,n){return t.era=n,e.setFullYear(n,0,1),e.setHours(0,0,0,0),e}incompatibleTokens=["R","u","t","T"]},y:new class extends d${priority=130;incompatibleTokens=["Y","R","u","w","I","i","e","c","t","T"];parse(e,t,n){const i=e=>({year:e,isTwoDigitYear:"yy"===t});switch(t){case"y":return N$(V$(4,e),i);case"yo":return N$(n.ordinalNumber(e,{unit:"year"}),i);default:return N$(V$(t.length,e),i)}}validate(e,t){return t.isTwoDigitYear||t.year>0}set(e,t,n){const i=e.getFullYear();if(n.isTwoDigitYear){const t=U$(n.year,i);return e.setFullYear(t,0,1),e.setHours(0,0,0,0),e}const r="era"in t&&1!==t.era?1-n.year:n.year;return e.setFullYear(r,0,1),e.setHours(0,0,0,0),e}},Y:new class extends d${priority=130;parse(e,t,n){const i=e=>({year:e,isTwoDigitYear:"YY"===t});switch(t){case"Y":return N$(V$(4,e),i);case"Yo":return N$(n.ordinalNumber(e,{unit:"year"}),i);default:return N$(V$(t.length,e),i)}}validate(e,t){return t.isTwoDigitYear||t.year>0}set(e,t,n,i){const r=OY(e,i);if(n.isTwoDigitYear){const t=U$(n.year,r);return e.setFullYear(t,0,i.firstWeekContainsDate),e.setHours(0,0,0,0),oY(e,i)}const a="era"in t&&1!==t.era?1-n.year:n.year;return e.setFullYear(a,0,i.firstWeekContainsDate),e.setHours(0,0,0,0),oY(e,i)}incompatibleTokens=["y","R","u","Q","q","M","L","I","d","D","i","t","T"]},R:new class extends d${priority=130;parse(e,t){return H$("R"===t?4:t.length,e)}set(e,t,n){const i=JW(e,0);return i.setFullYear(n,0,4),i.setHours(0,0,0,0),sY(i)}incompatibleTokens=["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]},u:new class extends d${priority=130;parse(e,t){return H$("u"===t?4:t.length,e)}set(e,t,n){return e.setFullYear(n,0,1),e.setHours(0,0,0,0),e}incompatibleTokens=["G","y","Y","R","w","I","i","e","c","t","T"]},Q:new class extends d${priority=120;parse(e,t,n){switch(t){case"Q":case"QQ":return V$(t.length,e);case"Qo":return n.ordinalNumber(e,{unit:"quarter"});case"QQQ":return n.quarter(e,{width:"abbreviated",context:"formatting"})||n.quarter(e,{width:"narrow",context:"formatting"});case"QQQQQ":return n.quarter(e,{width:"narrow",context:"formatting"});default:return n.quarter(e,{width:"wide",context:"formatting"})||n.quarter(e,{width:"abbreviated",context:"formatting"})||n.quarter(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=1&&t<=4}set(e,t,n){return e.setMonth(3*(n-1),1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]},q:new class extends d${priority=120;parse(e,t,n){switch(t){case"q":case"qq":return V$(t.length,e);case"qo":return n.ordinalNumber(e,{unit:"quarter"});case"qqq":return n.quarter(e,{width:"abbreviated",context:"standalone"})||n.quarter(e,{width:"narrow",context:"standalone"});case"qqqqq":return n.quarter(e,{width:"narrow",context:"standalone"});default:return n.quarter(e,{width:"wide",context:"standalone"})||n.quarter(e,{width:"abbreviated",context:"standalone"})||n.quarter(e,{width:"narrow",context:"standalone"})}}validate(e,t){return t>=1&&t<=4}set(e,t,n){return e.setMonth(3*(n-1),1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]},M:new class extends d${incompatibleTokens=["Y","R","q","Q","L","w","I","D","i","e","c","t","T"];priority=110;parse(e,t,n){const i=e=>e-1;switch(t){case"M":return N$(F$(h$,e),i);case"MM":return N$(V$(2,e),i);case"Mo":return N$(n.ordinalNumber(e,{unit:"month"}),i);case"MMM":return n.month(e,{width:"abbreviated",context:"formatting"})||n.month(e,{width:"narrow",context:"formatting"});case"MMMMM":return n.month(e,{width:"narrow",context:"formatting"});default:return n.month(e,{width:"wide",context:"formatting"})||n.month(e,{width:"abbreviated",context:"formatting"})||n.month(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=0&&t<=11}set(e,t,n){return e.setMonth(n,1),e.setHours(0,0,0,0),e}},L:new class extends d${priority=110;parse(e,t,n){const i=e=>e-1;switch(t){case"L":return N$(F$(h$,e),i);case"LL":return N$(V$(2,e),i);case"Lo":return N$(n.ordinalNumber(e,{unit:"month"}),i);case"LLL":return n.month(e,{width:"abbreviated",context:"standalone"})||n.month(e,{width:"narrow",context:"standalone"});case"LLLLL":return n.month(e,{width:"narrow",context:"standalone"});default:return n.month(e,{width:"wide",context:"standalone"})||n.month(e,{width:"abbreviated",context:"standalone"})||n.month(e,{width:"narrow",context:"standalone"})}}validate(e,t){return t>=0&&t<=11}set(e,t,n){return e.setMonth(n,1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]},w:new class extends d${priority=100;parse(e,t,n){switch(t){case"w":return F$(f$,e);case"wo":return n.ordinalNumber(e,{unit:"week"});default:return V$(t.length,e)}}validate(e,t){return t>=1&&t<=53}set(e,t,n,i){return oY(function(e,t,n){const i=eY(e,n?.in),r=RY(i,n)-t;return i.setDate(i.getDate()-7*r),eY(i,n?.in)}(e,n,i),i)}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","i","t","T"]},I:new class extends d${priority=100;parse(e,t,n){switch(t){case"I":return F$(f$,e);case"Io":return n.ordinalNumber(e,{unit:"week"});default:return V$(t.length,e)}}validate(e,t){return t>=1&&t<=53}set(e,t,n){return sY(function(e,t,n){const i=eY(e,n?.in),r=TY(i,n)-t;return i.setDate(i.getDate()-7*r),i}(e,n))}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]},d:new class extends d${priority=90;subPriority=1;parse(e,t,n){switch(t){case"d":return F$(m$,e);case"do":return n.ordinalNumber(e,{unit:"date"});default:return V$(t.length,e)}}validate(e,t){const n=G$(e.getFullYear()),i=e.getMonth();return n?t>=1&&t<=Y$[i]:t>=1&&t<=W$[i]}set(e,t,n){return e.setDate(n),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","w","I","D","i","e","c","t","T"]},D:new class extends d${priority=90;subpriority=1;parse(e,t,n){switch(t){case"D":case"DD":return F$(p$,e);case"Do":return n.ordinalNumber(e,{unit:"date"});default:return V$(t.length,e)}}validate(e,t){return G$(e.getFullYear())?t>=1&&t<=366:t>=1&&t<=365}set(e,t,n){return e.setMonth(0,n),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]},E:new class extends d${priority=90;parse(e,t,n){switch(t){case"E":case"EE":case"EEE":return n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"EEEEE":return n.day(e,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});default:return n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=0&&t<=6}set(e,t,n,i){return(e=$$(e,n,i)).setHours(0,0,0,0),e}incompatibleTokens=["D","i","e","c","t","T"]},e:new class extends d${priority=90;parse(e,t,n,i){const r=e=>{const t=7*Math.floor((e-1)/7);return(e+i.weekStartsOn+6)%7+t};switch(t){case"e":case"ee":return N$(V$(t.length,e),r);case"eo":return N$(n.ordinalNumber(e,{unit:"day"}),r);case"eee":return n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"eeeee":return n.day(e,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});default:return n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=0&&t<=6}set(e,t,n,i){return(e=$$(e,n,i)).setHours(0,0,0,0),e}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]},c:new class extends d${priority=90;parse(e,t,n,i){const r=e=>{const t=7*Math.floor((e-1)/7);return(e+i.weekStartsOn+6)%7+t};switch(t){case"c":case"cc":return N$(V$(t.length,e),r);case"co":return N$(n.ordinalNumber(e,{unit:"day"}),r);case"ccc":return n.day(e,{width:"abbreviated",context:"standalone"})||n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"});case"ccccc":return n.day(e,{width:"narrow",context:"standalone"});case"cccccc":return n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"});default:return n.day(e,{width:"wide",context:"standalone"})||n.day(e,{width:"abbreviated",context:"standalone"})||n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"})}}validate(e,t){return t>=0&&t<=6}set(e,t,n,i){return(e=$$(e,n,i)).setHours(0,0,0,0),e}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]},i:new class extends d${priority=90;parse(e,t,n){const i=e=>0===e?7:e;switch(t){case"i":case"ii":return V$(t.length,e);case"io":return n.ordinalNumber(e,{unit:"day"});case"iii":return N$(n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),i);case"iiiii":return N$(n.day(e,{width:"narrow",context:"formatting"}),i);case"iiiiii":return N$(n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),i);default:return N$(n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),i)}}validate(e,t){return t>=1&&t<=7}set(e,t,n){return(e=X$(e,n)).setHours(0,0,0,0),e}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]},a:new class extends d${priority=80;parse(e,t,n){switch(t){case"a":case"aa":case"aaa":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaaa":return n.dayPeriod(e,{width:"narrow",context:"formatting"});default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,t,n){return e.setHours(z$(n),0,0,0),e}incompatibleTokens=["b","B","H","k","t","T"]},b:new class extends d${priority=80;parse(e,t,n){switch(t){case"b":case"bb":case"bbb":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbbb":return n.dayPeriod(e,{width:"narrow",context:"formatting"});default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,t,n){return e.setHours(z$(n),0,0,0),e}incompatibleTokens=["a","B","H","k","t","T"]},B:new class extends d${priority=80;parse(e,t,n){switch(t){case"B":case"BB":case"BBB":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBBB":return n.dayPeriod(e,{width:"narrow",context:"formatting"});default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,t,n){return e.setHours(z$(n),0,0,0),e}incompatibleTokens=["a","b","t","T"]},h:new class extends d${priority=70;parse(e,t,n){switch(t){case"h":return F$(y$,e);case"ho":return n.ordinalNumber(e,{unit:"hour"});default:return V$(t.length,e)}}validate(e,t){return t>=1&&t<=12}set(e,t,n){const i=e.getHours()>=12;return i&&n<12?e.setHours(n+12,0,0,0):i||12!==n?e.setHours(n,0,0,0):e.setHours(0,0,0,0),e}incompatibleTokens=["H","K","k","t","T"]},H:new class extends d${priority=70;parse(e,t,n){switch(t){case"H":return F$(g$,e);case"Ho":return n.ordinalNumber(e,{unit:"hour"});default:return V$(t.length,e)}}validate(e,t){return t>=0&&t<=23}set(e,t,n){return e.setHours(n,0,0,0),e}incompatibleTokens=["a","b","h","K","k","t","T"]},K:new class extends d${priority=70;parse(e,t,n){switch(t){case"K":return F$(v$,e);case"Ko":return n.ordinalNumber(e,{unit:"hour"});default:return V$(t.length,e)}}validate(e,t){return t>=0&&t<=11}set(e,t,n){return e.getHours()>=12&&n<12?e.setHours(n+12,0,0,0):e.setHours(n,0,0,0),e}incompatibleTokens=["h","H","k","t","T"]},k:new class extends d${priority=70;parse(e,t,n){switch(t){case"k":return F$(_$,e);case"ko":return n.ordinalNumber(e,{unit:"hour"});default:return V$(t.length,e)}}validate(e,t){return t>=1&&t<=24}set(e,t,n){const i=n<=24?n%24:n;return e.setHours(i,0,0,0),e}incompatibleTokens=["a","b","h","H","K","t","T"]},m:new class extends d${priority=60;parse(e,t,n){switch(t){case"m":return F$(b$,e);case"mo":return n.ordinalNumber(e,{unit:"minute"});default:return V$(t.length,e)}}validate(e,t){return t>=0&&t<=59}set(e,t,n){return e.setMinutes(n,0,0),e}incompatibleTokens=["t","T"]},s:new class extends d${priority=50;parse(e,t,n){switch(t){case"s":return F$(w$,e);case"so":return n.ordinalNumber(e,{unit:"second"});default:return V$(t.length,e)}}validate(e,t){return t>=0&&t<=59}set(e,t,n){return e.setSeconds(n,0),e}incompatibleTokens=["t","T"]},S:new class extends d${priority=30;parse(e,t){return N$(V$(t.length,e),e=>Math.trunc(e*Math.pow(10,3-t.length)))}set(e,t,n){return e.setMilliseconds(n),e}incompatibleTokens=["t","T"]},X:new class extends d${priority=10;parse(e,t){switch(t){case"X":return B$(A$,e);case"XX":return B$(L$,e);case"XXXX":return B$(P$,e);case"XXXXX":return B$(D$,e);default:return B$(M$,e)}}set(e,t,n){return t.timestampIsSet?e:JW(e,e.getTime()-uY(e)-n)}incompatibleTokens=["t","T","x"]},x:new class extends d${priority=10;parse(e,t){switch(t){case"x":return B$(A$,e);case"xx":return B$(L$,e);case"xxxx":return B$(P$,e);case"xxxxx":return B$(D$,e);default:return B$(M$,e)}}set(e,t,n){return t.timestampIsSet?e:JW(e,e.getTime()-uY(e)-n)}incompatibleTokens=["t","T","X"]},t:new class extends d${priority=40;parse(e){return j$(e)}set(e,t,n){return[JW(e,1e3*n),{timestampIsSet:!0}]}incompatibleTokens="*"},T:new class extends d${priority=20;parse(e){return j$(e)}set(e,t,n){return[JW(e,n),{timestampIsSet:!0}]}incompatibleTokens="*"}},Z$=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,K$=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Q$=/^'([^]*?)'?$/,J$=/''/g,eX=/\S/,tX=/[a-zA-Z]/;function nX(e,t,n,i){const r=()=>JW(n,NaN),a=Object.assign({},aY()),o=a.locale??xY,s=a.firstWeekContainsDate??a.locale?.options?.firstWeekContainsDate??1,l=a.weekStartsOn??a.locale?.options?.weekStartsOn??0;if(!t)return e?r():eY(n,i?.in);const u={firstWeekContainsDate:s,weekStartsOn:l,locale:o},c=[new c$(i?.in,n)],d=t.match(K$).map(e=>{const t=e[0];if(t in WY){return(0,WY[t])(e,o.formatLong)}return e}).join("").match(Z$),h=[];for(let g of d){ZY(g)&&KY(g,t,e),qY(g)&&KY(g,t,e);const n=g[0],i=q$[n];if(i){const{incompatibleTokens:t}=i;if(Array.isArray(t)){const e=h.find(e=>t.includes(e.token)||e.token===n);if(e)throw new RangeError(`The format string mustn't contain \`${e.fullToken}\` and \`${g}\` at the same time`)}else if("*"===i.incompatibleTokens&&h.length>0)throw new RangeError(`The format string mustn't contain \`${g}\` and any other token at the same time`);h.push({token:n,fullToken:g});const a=i.run(e,g,o.match,u);if(!a)return r();c.push(a.setter),e=a.rest}else{if(n.match(tX))throw new RangeError("Format string contains an unescaped latin alphabet character `"+n+"`");if("''"===g?g="'":"'"===n&&(g=iX(g)),0!==e.indexOf(g))return r();e=e.slice(g.length)}}if(e.length>0&&eX.test(e))return r();const m=c.map(e=>e.priority).sort((e,t)=>t-e).filter((e,t,n)=>n.indexOf(e)===t).map(e=>c.filter(t=>t.priority===e).sort((e,t)=>t.subPriority-e.subPriority)).map(e=>e[0]);let p=eY(n,i?.in);if(isNaN(+p))return r();const f={};for(const g of m){if(!g.validate(p,u))return r();const e=g.set(p,f,u);Array.isArray(e)?(p=e[0],Object.assign(f,e[1])):p=e}return p}function iX(e){return e.match(Q$)[1].replace(J$,"'")}function rX(e,t){const n=eY(e,t?.in);return n.setMinutes(0,0,0),n}function aX(e,t,n){const[i,r]=cY(n?.in,e,t);return+rX(i)===+rX(r)}function oX(e,t,n){const[i,r]=cY(n?.in,e,t);return+oY(i,n)===+oY(r,n)}function sX(e,t,n){return tY(e,-t,n)}function lX(e,t,n){let i=eY(e,n?.in);return isNaN(+i)?JW(e,NaN):(null!=t.year&&i.setFullYear(t.year),null!=t.month&&(i=function(e,t,n){const i=eY(e,n?.in),r=i.getFullYear(),a=i.getDate(),o=JW(e,0);o.setFullYear(r,t,15),o.setHours(0,0,0,0);const s=a$(o);return i.setMonth(t,Math.min(a,s)),i}(i,t.month)),null!=t.date&&i.setDate(t.date),null!=t.hours&&i.setHours(t.hours),null!=t.minutes&&i.setMinutes(t.minutes),null!=t.seconds&&i.setSeconds(t.seconds),null!=t.milliseconds&&i.setMilliseconds(t.milliseconds),i)}function uX(e){const t={},n=aY();for(const i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i]);for(const i in e)Object.prototype.hasOwnProperty.call(e,i)&&(void 0===e[i]?delete t[i]:t[i]=e[i]);rY=t}function cX(e,t,n){const{years:i=0,months:r=0,weeks:a=0,days:o=0,hours:s=0,minutes:l=0,seconds:u=0}=t,c=function(e,t,n){return nY(e,-t,n)}(e,r+12*i,n);return JW(e,+sX(c,o+7*a,n)-1e3*(u+60*(l+60*s)))}function dX(e,t,n){return iY(e,-4)}function hX(e,t,n){return hY(e,-1,n)}function mX(e,t,n){return function(e,t,n){return nY(e,12*t,n)}(e,-18,n)}let pX;const fX=new Uint8Array(16);function gX(){if(!pX&&(pX="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!pX))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return pX(fX)}const _X=[];for(let Qee=0;Qee<256;++Qee)_X.push((Qee+256).toString(16).slice(1));const vX={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function yX(e,t,n){if(vX.randomUUID&&!e)return vX.randomUUID();const i=(e=e||{}).random||(e.rng||gX)();return i[6]=15&i[6]|64,i[8]=63&i[8]|128,function(e,t=0){return _X[e[t+0]]+_X[e[t+1]]+_X[e[t+2]]+_X[e[t+3]]+"-"+_X[e[t+4]]+_X[e[t+5]]+"-"+_X[e[t+6]]+_X[e[t+7]]+"-"+_X[e[t+8]]+_X[e[t+9]]+"-"+_X[e[t+10]]+_X[e[t+11]]+_X[e[t+12]]+_X[e[t+13]]+_X[e[t+14]]+_X[e[t+15]]}(i)}const bX=oV?"/api/v2":zj.HEDIA_API_URL_V2;var wX=(e=>(e[e.cL=10]="cL",e[e.g=100]="g",e[e.mL=100]="mL",e))(wX||{});const SX={cl:10,g:100,ml:100},kX=e=>{const t=e.reduce((e,t)=>{const n=TX(t.unit);return e+t.amount/n*t.foodItem.carbohydrates},0);return Math.round(t)},CX={cartItems:[],totalCarbsCartItems:0,manualCarbsInput:0},EX=uL()((e,t)=>({...CX,carbohydrateStoreActions:{setManualCarbsInput:t=>{e({manualCarbsInput:Math.round(t)})},upsertCartItem:t=>{e(e=>{const n=e.cartItems.findIndex(e=>e.foodItem.id===t.foodItem.id);let i;i=-1!==n?e.cartItems.map((e,i)=>i===n?t:e):[...e.cartItems,t];return{cartItems:i,totalCarbsCartItems:kX(i)}})},removeFromCart:(t,n)=>{e(e=>{const i=e.cartItems.filter(({foodItem:e})=>!("id"===n?e.id===t:e.title===t));return{cartItems:i,totalCarbsCartItems:kX(i)}})},clear:()=>{e(CX)},checkoutCart:async()=>{const e=t().cartItems.map(e=>({foodItemId:e.foodItem.id,amount:e.amount,unit:e.unit}));e.length&&await xX(e)}}})),xX=async e=>{try{await FX(`${bX}/food/foodcart`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({foodCartItems:e})})}catch(t){console.error(t)}},IX=()=>yX(),TX=e=>e?SX[e]:wX.g;function OX(e,t){const n=Object.values(e);return Object.keys(e)[n.indexOf(t)]}const RX=(e,t)=>Array.from({length:t-e+1},(t,n)=>(e+n).toString()),AX=(e,t)=>Array.from({length:10*(t-e)+1},(t,n)=>(e+n/10).toFixed(1)),LX=(e,t)=>{if(e===t)return!0;if("object"!=typeof e||"object"!=typeof t||null===e||null===t)return!1;const n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;for(const r of n)if(!i.includes(r)||!LX(e[r],t[r]))return!1;return!0},PX="3.4.0";var MX=(e=>(e.QuickGuideStartPress="quickguide.start.press",e.QuickGuideBackPressStep1="quickguide.screen1.back.press",e.QuickGuideNextPressStep1="quickguide.screen1.next.press",e.QuickGuideBackPressStep2="quickguide.screen2.back.press",e.QuickGuideNextPressStep2="quickguide.screen2.next.press",e.QuickGuideBackPressStep3="quickguide.screen3.back.press",e.QuickGuideNextPressStep3="quickguide.screen3.next.press",e.QuickGuideBackPressStep4="quickguide.screen4.back.press",e.QuickGuideNextPressStep4="quickguide.screen4.next.press",e.QuickGuideBackPressStep5="quickguide.screen5.back.press",e.QuickGuideNextPressStep5="quickguide.screen5.next.press",e.QuickGuideBackPressStep6="quickguide.screen6.back.press",e.QuickGuideNextPressStep6="quickguide.screen6.next.press",e.QuickGuideBackPressStep7="quickguide.screen7.back.press",e.QuickGuideNextPressStep7="quickguide.screen7.next.press",e.QuickGuideBackPressStep8="quickguide.screen8.back.press",e.QuickGuideNextPressStep8="quickguide.screen8.next.press",e.QuickGuideBackPressStep9="quickguide.screen9.back.press",e.QuickGuideFinishPress="quickguide.finish.press",e.SetupIntroStartPress="setup.intro.start.press",e.SetupGeneralBackPress="setup.general.back.press",e.SetupGeneralNextPress="setup.general.next.press",e.SetupTreatmentBackPress="setup.treatment.back.press",e.SetupTreatmentNextPress="setup.treatment.next.press",e.SetupOptionsNextPress="setup.options.next.press",e.SetupOptionsBackPress="setup.options.back.press",e.SetupInsulinBackPress="setup.insulin.back.press",e.SetupInsulinNextPress="setup.insulin.next.press",e.SetupTDDBackPress="setup.tdd.back.press",e.SetupTDDNextPress="setup.tdd.next.press",e.SetupSummaryBackPress="setup.summary.back.press",e.SetupSummaryFinishPress="setup.summary.finish.press",e.CarbohydrateChart7DaysPress="carbohydratechart.7days.press",e.CarbohydrateChart14DaysPress="carbohydratechart.14days.press",e.CarbohydrateChart30DaysPress="carbohydratechart.30days.press",e.CarbohydrateChart90DaysPress="carbohydratechart.90days.press",e.CarbohydrateChartStart="carbohydratechart.start",e.CarbohydrateChartEnd="carbohydratechart.end",e.RapidInsulinChart7DaysPress="rapidinsulinchart.7days.press",e.RapidInsulinChart14DaysPress="rapidinsulinchart.14days.press",e.RapidInsulinChart30DaysPress="rapidinsulinchart.30days.press",e.RapidInsulinChart90DaysPress="rapidinsulinchart.90days.press",e.RapidInsulinChartStart="rapidinsulinchart.start",e.RapidInsulinChartEnd="rapidinsulinchart.end",e.TimeInRangeChart7DaysPress="timeinrangechart.7days.press",e.TimeInRangeChart14DaysPress="timeinrangechart.14days.press",e.TimeInRangeChart30DaysPress="timeinrangechart.30days.press",e.TimeInRangeChart90DaysPress="timeinrangechart.90days.press",e.TimeInRangeChartStart="timeinrangechart.start",e.TimeInRangeChartEnd="timeinrangechart.end",e.MyDayPreviousPress="mydaychart.previous.press",e.MyDayNextPress="mydaychart.next.press",e.MyDayChartStart="mydaychart.start",e.MyDayChartEnd="mydaychart.end",e.ActiveInsulinChartStart="activeinsulinchart.start",e.ActiveInsulinChartEnd="activeinsulinchart.end",e.GlucoseChart7DaysPressCGM="glucosechart.cgm.7days.press",e.GlucoseChart14DaysPressCGM="glucosechart.cgm.14days.press",e.GlucoseChart30DaysPressCGM="glucosechart.cgm.30days.press",e.GlucoseChart90DaysPressCGM="glucosechart.cgm.90days.press",e.GlucoseChartStartCGM="glucosechart.cgm.start",e.GlucoseChartEndCGM="glucosechart.cgm.end",e.GlucoseChart7DaysPressBGM="glucosechart.bgm.7days.press",e.GlucoseChart14DaysPressBGM="glucosechart.bgm.14days.press",e.GlucoseChart30DaysPressBGM="glucosechart.bgm.30days.press",e.GlucoseChart90DaysPressBGM="glucosechart.bgm.90days.press",e.GlucoseChartStartBGM="glucosechart.bgm.start",e.GlucoseChartEndBGM="glucosechart.bgm.end",e.DashboardCgmButtonPress="home.dashboard.cgm.press",e.DashboardTabPress="home.dashboard.press",e.LogbookTabPress="home.logbook.press",e.NewCalculationTabPress="home.newcalculation.press",e.SettingsTabPress="home.settings.press",e.FoodLibraryTabPress="home.foodlibrary.press",e.GlucoseTabPress="calcflow.glucose.press",e.CarbsTabPress="calcflow.carbs.press",e.ActivityTabPress="calcflow.activity.press",e.SummaryTabPress="calcflow.summary.press",e.AbortCalculationPress="calcflow.abort.press",e.RecentInsulinRegisterPress="calcflow.recentinsulin.register.press",e.RecentInsulinContinuePress="calcflow.recentinsulin.continue.press",e.CarbsManualInput="calcflow.carbs.input.manual",e.CarbsFoodLibraryDatabaseInput="calcflow.carbs.foodlibrary.input.database",e.CarbsFoodLibraryPersonalInput="calcflow.carbs.foodlibrary.input.personal",e.CarbsFoodLibraryPersonalPress="calcflow.carbs.foodlibrary.personal.press",e.CarbsFoodLibrarySearch="calcflow.carbs.foodlibrary.search",e.CarbsFoodLibraryAbort="calcflow.carbs.foodlibrary.abort",e.FoodLibrarySearched="foodlibrary.searched",e.FoodLibraryPersonalPress="foodlibrary.personal.press",e.FoodLibraryCreatePress="foodlibrary.create.press",e.FoodLibraryUpdatePress="foodlibrary.update.press",e.ActivityAddPress="calcflow.activity.add.press",e.ActivityEditPress="calcflow.activity.edit.press",e.TransferDevice="integration.device.transfer",e.TransferService="integration.service.transfer",e.ExpiredGlucose="calcflow.glucose.expired",e.SummaryExpiredGlucose="calcflow.summary.glucose.expired",e.SummaryEmptyGlucose="calcflow.summary.glucose.empty",e.RecommendationSuccess="calcflow.recommendation.success",e.RecommendationInvalid="calcflow.recommendation.invalid",e.RecommendationViewDetailsPress="calcflow.recommendation.details.press",e.RecommendationExpired="calcflow.recommendation.expired",e.RecommendationToastPress="calcflow.recommendation.toast.press",e.LogbookPersonalAddPress="logbook.personal.add.press",e.LogbookPersonalEditPress="logbook.personal.edit.press",e.LogbookPersonalDeletePress="logbook.personal.delete.press",e.LogbookExportPress="logbook.export.press",e.LogbookExportDurationFourteenDaysPress="logbook.export.duration.fourteendays.press",e.LogbookExportDurationThreeMonthsPress="logbook.export.duration.threemonths.press",e.LogbookExportDurationSixMonthsPress="logbook.export.duration.sixmonths.press",e.LogbookExportGeneratePress="logbook.export.generate.press",e.SettingsProfile="settings.profile.press",e.SettingsInsulin="settings.insulin.press",e.SettingsGlucose="settings.glucose.press",e.SettingsActivity="settings.activity.press",e.SettingsNotifications="settings.notifications.press",e.SettingsSmartPen="settings.smartpen.press",e.SettingsCGM="settings.cgm.press",e.SettingsBGM="settings.bgm.press",e.SettingsIFU="settings.ifu.press",e.SettingsSupport="settings.support.press",e.SettingsLegal="settings.legal.press",e.NotificationsAllowQuickGuide="quickguide.notifications.allow.press",e.NotificationsAllowSettings="settings.notifications.allow.press",e.NotificationsDenyQuickGuide="quickguide.notifications.deny.press",e.NotificationsDenySettings="settings.notifications.deny.press",e.ErrorOffline="errors.offline",e.ErrorForceUpdate="errors.forceupdate",e.ErrorLogOut="errors.logout",e))(MX||{});const DX=()=>{const{email:e,id:t,country:n=""}=wq.get();return{id:t,isTester:e.includes("@hedia"),country:n,uuid:IX(),timestamp:(new Date).toISOString(),timezone:Intl.DateTimeFormat().resolvedOptions().timeZone,platform:lr.OS}},NX=e=>{const{id:t,isTester:n,country:i,uuid:r,timestamp:a,timezone:o,platform:s}=DX(),l={uuid:r,type:e,timestamp:a,timezone:o,data:{version:PX,platform:s,user:{id:t,isTester:n},geo:{country:i}}};XW.update(l),XW.sync().catch(console.error)},FX=async(e,t,n=0)=>{if(oV)return fetch(e,t);const{accessToken:i,refreshToken:r}=Xz.getState();if(!i||!r)throw new Error("Missing access token or refresh token");const a={...t?.headers,Authorization:`Bearer ${i}`},o=await fetch(e,{...t,headers:a});if([FL.StatusCode.UNAUTHORIZED,FL.StatusCode.FORBIDDEN].includes(o.status)){if(n<1)return await BX(r),FX(e,t,n+1);throw new Error("[hediaFetch::hediaFetch] Failed to refresh token after retry")}return o},BX=async e=>{const{setTokens:t}=Xz.getState(),n=await(async e=>{const t=new URL(Wz+"/token");return fetch(t.toString(),{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Authorization:"Basic "+Gz.Buffer.from(encodeURIComponent(Yz)).toString("base64")},body:new URLSearchParams({grant_type:"refresh_token",refresh_token:e}).toString()})})(e);if(n.status===FL.StatusCode.BAD_REQUEST)throw NX(MX.ErrorLogOut),t({accessToken:void 0,refreshToken:void 0}),new Error("[hediaFetch::refreshAccessToken] Bad request - cleared storage");if(!n.ok)throw new Error("[hediaFetch::refreshAccessToken] Failed to refresh access token");const{access_token:i,refresh_token:r}=await n.json();t({accessToken:i,refreshToken:r})};const{HEDIA_API_URL_V3:jX}=oV?{HEDIA_API_URL_V3:"/api/v3"}:zj,VX={email:""},HX={lessThanXSeconds:{one:"mindre end ét sekund",other:"mindre end {{count}} sekunder"},xSeconds:{one:"1 sekund",other:"{{count}} sekunder"},halfAMinute:"ét halvt minut",lessThanXMinutes:{one:"mindre end ét minut",other:"mindre end {{count}} minutter"},xMinutes:{one:"1 minut",other:"{{count}} minutter"},aboutXHours:{one:"cirka 1 time",other:"cirka {{count}} timer"},xHours:{one:"1 time",other:"{{count}} timer"},xDays:{one:"1 dag",other:"{{count}} dage"},aboutXWeeks:{one:"cirka 1 uge",other:"cirka {{count}} uger"},xWeeks:{one:"1 uge",other:"{{count}} uger"},aboutXMonths:{one:"cirka 1 måned",other:"cirka {{count}} måneder"},xMonths:{one:"1 måned",other:"{{count}} måneder"},aboutXYears:{one:"cirka 1 år",other:"cirka {{count}} år"},xYears:{one:"1 år",other:"{{count}} år"},overXYears:{one:"over 1 år",other:"over {{count}} år"},almostXYears:{one:"næsten 1 år",other:"næsten {{count}} år"}},zX={date:_Y({formats:{full:"EEEE 'den' d. MMMM y",long:"d. MMMM y",medium:"d. MMM y",short:"dd/MM/y"},defaultWidth:"full"}),time:_Y({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:_Y({formats:{full:"{{date}} 'kl'. {{time}}",long:"{{date}} 'kl'. {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},defaultWidth:"full"})},UX={lastWeek:"'sidste' eeee 'kl.' p",yesterday:"'i går kl.' p",today:"'i dag kl.' p",tomorrow:"'i morgen kl.' p",nextWeek:"'på' eeee 'kl.' p",other:"P"},GX={code:"da",formatDistance:(e,t,n)=>{let i;const r=HX[e];return i="string"==typeof r?r:1===t?r.one:r.other.replace("{{count}}",String(t)),n?.addSuffix?n.comparison&&n.comparison>0?"om "+i:i+" siden":i},formatLong:zX,formatRelative:(e,t,n,i)=>UX[e],localize:{ordinalNumber:(e,t)=>Number(e)+".",era:wY({values:{narrow:["fvt","vt"],abbreviated:["f.v.t.","v.t."],wide:["før vesterlandsk tidsregning","vesterlandsk tidsregning"]},defaultWidth:"wide"}),quarter:wY({values:{narrow:["1","2","3","4"],abbreviated:["1. kvt.","2. kvt.","3. kvt.","4. kvt."],wide:["1. kvartal","2. kvartal","3. kvartal","4. kvartal"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:wY({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["jan.","feb.","mar.","apr.","maj","jun.","jul.","aug.","sep.","okt.","nov.","dec."],wide:["januar","februar","marts","april","maj","juni","juli","august","september","oktober","november","december"]},defaultWidth:"wide"}),day:wY({values:{narrow:["S","M","T","O","T","F","L"],short:["sø","ma","ti","on","to","fr","lø"],abbreviated:["søn.","man.","tir.","ons.","tor.","fre.","lør."],wide:["søndag","mandag","tirsdag","onsdag","torsdag","fredag","lørdag"]},defaultWidth:"wide"}),dayPeriod:wY({values:{narrow:{am:"a",pm:"p",midnight:"midnat",noon:"middag",morning:"morgen",afternoon:"eftermiddag",evening:"aften",night:"nat"},abbreviated:{am:"AM",pm:"PM",midnight:"midnat",noon:"middag",morning:"morgen",afternoon:"eftermiddag",evening:"aften",night:"nat"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnat",noon:"middag",morning:"morgen",afternoon:"eftermiddag",evening:"aften",night:"nat"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"midnat",noon:"middag",morning:"om morgenen",afternoon:"om eftermiddagen",evening:"om aftenen",night:"om natten"},abbreviated:{am:"AM",pm:"PM",midnight:"midnat",noon:"middag",morning:"om morgenen",afternoon:"om eftermiddagen",evening:"om aftenen",night:"om natten"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnat",noon:"middag",morning:"om morgenen",afternoon:"om eftermiddagen",evening:"om aftenen",night:"om natten"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:CY({matchPattern:/^(\d+)(\.)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:kY({matchPatterns:{narrow:/^(fKr|fvt|eKr|vt)/i,abbreviated:/^(f\.Kr\.?|f\.v\.t\.?|e\.Kr\.?|v\.t\.)/i,wide:/^(f.Kr.|før vesterlandsk tidsregning|e.Kr.|vesterlandsk tidsregning)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^f/i,/^(v|e)/i]},defaultParseWidth:"any"}),quarter:kY({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^[1234]. kvt\./i,wide:/^[1234]\.? kvartal/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:kY({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan.|feb.|mar.|apr.|maj|jun.|jul.|aug.|sep.|okt.|nov.|dec.)/i,wide:/^(januar|februar|marts|april|maj|juni|juli|august|september|oktober|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^maj/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:kY({matchPatterns:{narrow:/^[smtofl]/i,short:/^(søn.|man.|tir.|ons.|tor.|fre.|lør.)/i,abbreviated:/^(søn|man|tir|ons|tor|fre|lør)/i,wide:/^(søndag|mandag|tirsdag|onsdag|torsdag|fredag|lørdag)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^o/i,/^t/i,/^f/i,/^l/i],any:[/^s/i,/^m/i,/^ti/i,/^o/i,/^to/i,/^f/i,/^l/i]},defaultParseWidth:"any"}),dayPeriod:kY({matchPatterns:{narrow:/^(a|p|midnat|middag|(om) (morgenen|eftermiddagen|aftenen|natten))/i,any:/^([ap]\.?\s?m\.?|midnat|middag|(om) (morgenen|eftermiddagen|aftenen|natten))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/midnat/i,noon:/middag/i,morning:/morgen/i,afternoon:/eftermiddag/i,evening:/aften/i,night:/nat/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:4}},WX={lessThanXSeconds:{standalone:{one:"weniger als 1 Sekunde",other:"weniger als {{count}} Sekunden"},withPreposition:{one:"weniger als 1 Sekunde",other:"weniger als {{count}} Sekunden"}},xSeconds:{standalone:{one:"1 Sekunde",other:"{{count}} Sekunden"},withPreposition:{one:"1 Sekunde",other:"{{count}} Sekunden"}},halfAMinute:{standalone:"eine halbe Minute",withPreposition:"einer halben Minute"},lessThanXMinutes:{standalone:{one:"weniger als 1 Minute",other:"weniger als {{count}} Minuten"},withPreposition:{one:"weniger als 1 Minute",other:"weniger als {{count}} Minuten"}},xMinutes:{standalone:{one:"1 Minute",other:"{{count}} Minuten"},withPreposition:{one:"1 Minute",other:"{{count}} Minuten"}},aboutXHours:{standalone:{one:"etwa 1 Stunde",other:"etwa {{count}} Stunden"},withPreposition:{one:"etwa 1 Stunde",other:"etwa {{count}} Stunden"}},xHours:{standalone:{one:"1 Stunde",other:"{{count}} Stunden"},withPreposition:{one:"1 Stunde",other:"{{count}} Stunden"}},xDays:{standalone:{one:"1 Tag",other:"{{count}} Tage"},withPreposition:{one:"1 Tag",other:"{{count}} Tagen"}},aboutXWeeks:{standalone:{one:"etwa 1 Woche",other:"etwa {{count}} Wochen"},withPreposition:{one:"etwa 1 Woche",other:"etwa {{count}} Wochen"}},xWeeks:{standalone:{one:"1 Woche",other:"{{count}} Wochen"},withPreposition:{one:"1 Woche",other:"{{count}} Wochen"}},aboutXMonths:{standalone:{one:"etwa 1 Monat",other:"etwa {{count}} Monate"},withPreposition:{one:"etwa 1 Monat",other:"etwa {{count}} Monaten"}},xMonths:{standalone:{one:"1 Monat",other:"{{count}} Monate"},withPreposition:{one:"1 Monat",other:"{{count}} Monaten"}},aboutXYears:{standalone:{one:"etwa 1 Jahr",other:"etwa {{count}} Jahre"},withPreposition:{one:"etwa 1 Jahr",other:"etwa {{count}} Jahren"}},xYears:{standalone:{one:"1 Jahr",other:"{{count}} Jahre"},withPreposition:{one:"1 Jahr",other:"{{count}} Jahren"}},overXYears:{standalone:{one:"mehr als 1 Jahr",other:"mehr als {{count}} Jahre"},withPreposition:{one:"mehr als 1 Jahr",other:"mehr als {{count}} Jahren"}},almostXYears:{standalone:{one:"fast 1 Jahr",other:"fast {{count}} Jahre"},withPreposition:{one:"fast 1 Jahr",other:"fast {{count}} Jahren"}}},YX={date:_Y({formats:{full:"EEEE, do MMMM y",long:"do MMMM y",medium:"do MMM y",short:"dd.MM.y"},defaultWidth:"full"}),time:_Y({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:_Y({formats:{full:"{{date}} 'um' {{time}}",long:"{{date}} 'um' {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},defaultWidth:"full"})},$X={lastWeek:"'letzten' eeee 'um' p",yesterday:"'gestern um' p",today:"'heute um' p",tomorrow:"'morgen um' p",nextWeek:"eeee 'um' p",other:"P"},XX={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],wide:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"]},qX={narrow:XX.narrow,abbreviated:["Jan.","Feb.","März","Apr.","Mai","Juni","Juli","Aug.","Sep.","Okt.","Nov.","Dez."],wide:XX.wide},ZX={code:"de",formatDistance:(e,t,n)=>{let i;const r=n?.addSuffix?WX[e].withPreposition:WX[e].standalone;return i="string"==typeof r?r:1===t?r.one:r.other.replace("{{count}}",String(t)),n?.addSuffix?n.comparison&&n.comparison>0?"in "+i:"vor "+i:i},formatLong:YX,formatRelative:(e,t,n,i)=>$X[e],localize:{ordinalNumber:e=>Number(e)+".",era:wY({values:{narrow:["v.Chr.","n.Chr."],abbreviated:["v.Chr.","n.Chr."],wide:["vor Christus","nach Christus"]},defaultWidth:"wide"}),quarter:wY({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1. Quartal","2. Quartal","3. Quartal","4. Quartal"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:wY({values:XX,formattingValues:qX,defaultWidth:"wide"}),day:wY({values:{narrow:["S","M","D","M","D","F","S"],short:["So","Mo","Di","Mi","Do","Fr","Sa"],abbreviated:["So.","Mo.","Di.","Mi.","Do.","Fr.","Sa."],wide:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"]},defaultWidth:"wide"}),dayPeriod:wY({values:{narrow:{am:"vm.",pm:"nm.",midnight:"Mitternacht",noon:"Mittag",morning:"Morgen",afternoon:"Nachm.",evening:"Abend",night:"Nacht"},abbreviated:{am:"vorm.",pm:"nachm.",midnight:"Mitternacht",noon:"Mittag",morning:"Morgen",afternoon:"Nachmittag",evening:"Abend",night:"Nacht"},wide:{am:"vormittags",pm:"nachmittags",midnight:"Mitternacht",noon:"Mittag",morning:"Morgen",afternoon:"Nachmittag",evening:"Abend",night:"Nacht"}},defaultWidth:"wide",formattingValues:{narrow:{am:"vm.",pm:"nm.",midnight:"Mitternacht",noon:"Mittag",morning:"morgens",afternoon:"nachm.",evening:"abends",night:"nachts"},abbreviated:{am:"vorm.",pm:"nachm.",midnight:"Mitternacht",noon:"Mittag",morning:"morgens",afternoon:"nachmittags",evening:"abends",night:"nachts"},wide:{am:"vormittags",pm:"nachmittags",midnight:"Mitternacht",noon:"Mittag",morning:"morgens",afternoon:"nachmittags",evening:"abends",night:"nachts"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:CY({matchPattern:/^(\d+)(\.)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e)}),era:kY({matchPatterns:{narrow:/^(v\.? ?Chr\.?|n\.? ?Chr\.?)/i,abbreviated:/^(v\.? ?Chr\.?|n\.? ?Chr\.?)/i,wide:/^(vor Christus|vor unserer Zeitrechnung|nach Christus|unserer Zeitrechnung)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^v/i,/^n/i]},defaultParseWidth:"any"}),quarter:kY({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](\.)? Quartal/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:kY({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(j[aä]n|feb|mär[z]?|apr|mai|jun[i]?|jul[i]?|aug|sep|okt|nov|dez)\.?/i,wide:/^(januar|februar|märz|april|mai|juni|juli|august|september|oktober|november|dezember)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^j[aä]/i,/^f/i,/^mär/i,/^ap/i,/^mai/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:kY({matchPatterns:{narrow:/^[smdmf]/i,short:/^(so|mo|di|mi|do|fr|sa)/i,abbreviated:/^(son?|mon?|die?|mit?|don?|fre?|sam?)\.?/i,wide:/^(sonntag|montag|dienstag|mittwoch|donnerstag|freitag|samstag)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^so/i,/^mo/i,/^di/i,/^mi/i,/^do/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:kY({matchPatterns:{narrow:/^(vm\.?|nm\.?|Mitternacht|Mittag|morgens|nachm\.?|abends|nachts)/i,abbreviated:/^(vorm\.?|nachm\.?|Mitternacht|Mittag|morgens|nachm\.?|abends|nachts)/i,wide:/^(vormittags|nachmittags|Mitternacht|Mittag|morgens|nachmittags|abends|nachts)/i},defaultMatchWidth:"wide",parsePatterns:{any:{am:/^v/i,pm:/^n/i,midnight:/^Mitte/i,noon:/^Mitta/i,morning:/morgens/i,afternoon:/nachmittags/i,evening:/abends/i,night:/nachts/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:4}},KX={code:"en-GB",formatDistance:gY,formatLong:{date:_Y({formats:{full:"EEEE, d MMMM yyyy",long:"d MMMM yyyy",medium:"d MMM yyyy",short:"dd/MM/yyyy"},defaultWidth:"full"}),time:_Y({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:_Y({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},formatRelative:bY,localize:SY,match:EY,options:{weekStartsOn:1,firstWeekContainsDate:4}},QX={lessThanXSeconds:{one:"menos de un segundo",other:"menos de {{count}} segundos"},xSeconds:{one:"1 segundo",other:"{{count}} segundos"},halfAMinute:"medio minuto",lessThanXMinutes:{one:"menos de un minuto",other:"menos de {{count}} minutos"},xMinutes:{one:"1 minuto",other:"{{count}} minutos"},aboutXHours:{one:"alrededor de 1 hora",other:"alrededor de {{count}} horas"},xHours:{one:"1 hora",other:"{{count}} horas"},xDays:{one:"1 día",other:"{{count}} días"},aboutXWeeks:{one:"alrededor de 1 semana",other:"alrededor de {{count}} semanas"},xWeeks:{one:"1 semana",other:"{{count}} semanas"},aboutXMonths:{one:"alrededor de 1 mes",other:"alrededor de {{count}} meses"},xMonths:{one:"1 mes",other:"{{count}} meses"},aboutXYears:{one:"alrededor de 1 año",other:"alrededor de {{count}} años"},xYears:{one:"1 año",other:"{{count}} años"},overXYears:{one:"más de 1 año",other:"más de {{count}} años"},almostXYears:{one:"casi 1 año",other:"casi {{count}} años"}},JX={date:_Y({formats:{full:"EEEE, d 'de' MMMM 'de' y",long:"d 'de' MMMM 'de' y",medium:"d MMM y",short:"dd/MM/y"},defaultWidth:"full"}),time:_Y({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:_Y({formats:{full:"{{date}} 'a las' {{time}}",long:"{{date}} 'a las' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},eq={lastWeek:"'el' eeee 'pasado a la' p",yesterday:"'ayer a la' p",today:"'hoy a la' p",tomorrow:"'mañana a la' p",nextWeek:"eeee 'a la' p",other:"P"},tq={lastWeek:"'el' eeee 'pasado a las' p",yesterday:"'ayer a las' p",today:"'hoy a las' p",tomorrow:"'mañana a las' p",nextWeek:"eeee 'a las' p",other:"P"},nq={code:"es",formatDistance:(e,t,n)=>{let i;const r=QX[e];return i="string"==typeof r?r:1===t?r.one:r.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"en "+i:"hace "+i:i},formatLong:JX,formatRelative:(e,t,n,i)=>1!==t.getHours()?tq[e]:eq[e],localize:{ordinalNumber:(e,t)=>Number(e)+"º",era:wY({values:{narrow:["AC","DC"],abbreviated:["AC","DC"],wide:["antes de cristo","después de cristo"]},defaultWidth:"wide"}),quarter:wY({values:{narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["1º trimestre","2º trimestre","3º trimestre","4º trimestre"]},defaultWidth:"wide",argumentCallback:e=>Number(e)-1}),month:wY({values:{narrow:["e","f","m","a","m","j","j","a","s","o","n","d"],abbreviated:["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"],wide:["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"]},defaultWidth:"wide"}),day:wY({values:{narrow:["d","l","m","m","j","v","s"],short:["do","lu","ma","mi","ju","vi","sá"],abbreviated:["dom","lun","mar","mié","jue","vie","sáb"],wide:["domingo","lunes","martes","miércoles","jueves","viernes","sábado"]},defaultWidth:"wide"}),dayPeriod:wY({values:{narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"mañana",afternoon:"tarde",evening:"tarde",night:"noche"},abbreviated:{am:"AM",pm:"PM",midnight:"medianoche",noon:"mediodia",morning:"mañana",afternoon:"tarde",evening:"tarde",night:"noche"},wide:{am:"a.m.",pm:"p.m.",midnight:"medianoche",noon:"mediodia",morning:"mañana",afternoon:"tarde",evening:"tarde",night:"noche"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"de la mañana",afternoon:"de la tarde",evening:"de la tarde",night:"de la noche"},abbreviated:{am:"AM",pm:"PM",midnight:"medianoche",noon:"mediodia",morning:"de la mañana",afternoon:"de la tarde",evening:"de la tarde",night:"de la noche"},wide:{am:"a.m.",pm:"p.m.",midnight:"medianoche",noon:"mediodia",morning:"de la mañana",afternoon:"de la tarde",evening:"de la tarde",night:"de la noche"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:CY({matchPattern:/^(\d+)(º)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:kY({matchPatterns:{narrow:/^(ac|dc|a|d)/i,abbreviated:/^(a\.?\s?c\.?|a\.?\s?e\.?\s?c\.?|d\.?\s?c\.?|e\.?\s?c\.?)/i,wide:/^(antes de cristo|antes de la era com[uú]n|despu[eé]s de cristo|era com[uú]n)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^ac/i,/^dc/i],wide:[/^(antes de cristo|antes de la era com[uú]n)/i,/^(despu[eé]s de cristo|era com[uú]n)/i]},defaultParseWidth:"any"}),quarter:kY({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^T[1234]/i,wide:/^[1234](º)? trimestre/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:kY({matchPatterns:{narrow:/^[efmajsond]/i,abbreviated:/^(ene|feb|mar|abr|may|jun|jul|ago|sep|oct|nov|dic)/i,wide:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^e/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^en/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i]},defaultParseWidth:"any"}),day:kY({matchPatterns:{narrow:/^[dlmjvs]/i,short:/^(do|lu|ma|mi|ju|vi|s[áa])/i,abbreviated:/^(dom|lun|mar|mi[ée]|jue|vie|s[áa]b)/i,wide:/^(domingo|lunes|martes|mi[ée]rcoles|jueves|viernes|s[áa]bado)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^d/i,/^l/i,/^m/i,/^m/i,/^j/i,/^v/i,/^s/i],any:[/^do/i,/^lu/i,/^ma/i,/^mi/i,/^ju/i,/^vi/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:kY({matchPatterns:{narrow:/^(a|p|mn|md|(de la|a las) (mañana|tarde|noche))/i,any:/^([ap]\.?\s?m\.?|medianoche|mediodia|(de la|a las) (mañana|tarde|noche))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mn/i,noon:/^md/i,morning:/mañana/i,afternoon:/tarde/i,evening:/tarde/i,night:/noche/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:1}},iq={lessThanXSeconds:{one:"moins d’une seconde",other:"moins de {{count}} secondes"},xSeconds:{one:"1 seconde",other:"{{count}} secondes"},halfAMinute:"30 secondes",lessThanXMinutes:{one:"moins d’une minute",other:"moins de {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"environ 1 heure",other:"environ {{count}} heures"},xHours:{one:"1 heure",other:"{{count}} heures"},xDays:{one:"1 jour",other:"{{count}} jours"},aboutXWeeks:{one:"environ 1 semaine",other:"environ {{count}} semaines"},xWeeks:{one:"1 semaine",other:"{{count}} semaines"},aboutXMonths:{one:"environ 1 mois",other:"environ {{count}} mois"},xMonths:{one:"1 mois",other:"{{count}} mois"},aboutXYears:{one:"environ 1 an",other:"environ {{count}} ans"},xYears:{one:"1 an",other:"{{count}} ans"},overXYears:{one:"plus d’un an",other:"plus de {{count}} ans"},almostXYears:{one:"presqu’un an",other:"presque {{count}} ans"}},rq={date:_Y({formats:{full:"EEEE d MMMM y",long:"d MMMM y",medium:"d MMM y",short:"dd/MM/y"},defaultWidth:"full"}),time:_Y({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:_Y({formats:{full:"{{date}} 'à' {{time}}",long:"{{date}} 'à' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},aq={lastWeek:"eeee 'dernier à' p",yesterday:"'hier à' p",today:"'aujourd’hui à' p",tomorrow:"'demain à' p'",nextWeek:"eeee 'prochain à' p",other:"P"},oq=["MMM","MMMM"],sq={code:"fr",formatDistance:(e,t,n)=>{let i;const r=iq[e];return i="string"==typeof r?r:1===t?r.one:r.other.replace("{{count}}",String(t)),n?.addSuffix?n.comparison&&n.comparison>0?"dans "+i:"il y a "+i:i},formatLong:rq,formatRelative:(e,t,n,i)=>aq[e],localize:{preprocessor:(e,t)=>{if(1===e.getDate())return t;return t.some(e=>e.isToken&&oq.includes(e.value))?t.map(e=>e.isToken&&"do"===e.value?{isToken:!0,value:"d"}:e):t},ordinalNumber:(e,t)=>{const n=Number(e),i=t?.unit;if(0===n)return"0";let r;return r=1===n?i&&["year","week","hour","minute","second"].includes(i)?"ère":"er":"ème",n+r},era:wY({values:{narrow:["av. J.-C","ap. J.-C"],abbreviated:["av. J.-C","ap. J.-C"],wide:["avant Jésus-Christ","après Jésus-Christ"]},defaultWidth:"wide"}),quarter:wY({values:{narrow:["T1","T2","T3","T4"],abbreviated:["1er trim.","2ème trim.","3ème trim.","4ème trim."],wide:["1er trimestre","2ème trimestre","3ème trimestre","4ème trimestre"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:wY({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc."],wide:["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"]},defaultWidth:"wide"}),day:wY({values:{narrow:["D","L","M","M","J","V","S"],short:["di","lu","ma","me","je","ve","sa"],abbreviated:["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],wide:["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"]},defaultWidth:"wide"}),dayPeriod:wY({values:{narrow:{am:"AM",pm:"PM",midnight:"minuit",noon:"midi",morning:"mat.",afternoon:"ap.m.",evening:"soir",night:"mat."},abbreviated:{am:"AM",pm:"PM",midnight:"minuit",noon:"midi",morning:"matin",afternoon:"après-midi",evening:"soir",night:"matin"},wide:{am:"AM",pm:"PM",midnight:"minuit",noon:"midi",morning:"du matin",afternoon:"de l’après-midi",evening:"du soir",night:"du matin"}},defaultWidth:"wide"})},match:{ordinalNumber:CY({matchPattern:/^(\d+)(ième|ère|ème|er|e)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e)}),era:kY({matchPatterns:{narrow:/^(av\.J\.C|ap\.J\.C|ap\.J\.-C)/i,abbreviated:/^(av\.J\.-C|av\.J-C|apr\.J\.-C|apr\.J-C|ap\.J-C)/i,wide:/^(avant Jésus-Christ|après Jésus-Christ)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^av/i,/^ap/i]},defaultParseWidth:"any"}),quarter:kY({matchPatterns:{narrow:/^T?[1234]/i,abbreviated:/^[1234](er|ème|e)? trim\.?/i,wide:/^[1234](er|ème|e)? trimestre/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:kY({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(janv|févr|mars|avr|mai|juin|juill|juil|août|sept|oct|nov|déc)\.?/i,wide:/^(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^av/i,/^ma/i,/^juin/i,/^juil/i,/^ao/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:kY({matchPatterns:{narrow:/^[lmjvsd]/i,short:/^(di|lu|ma|me|je|ve|sa)/i,abbreviated:/^(dim|lun|mar|mer|jeu|ven|sam)\.?/i,wide:/^(dimanche|lundi|mardi|mercredi|jeudi|vendredi|samedi)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^d/i,/^l/i,/^m/i,/^m/i,/^j/i,/^v/i,/^s/i],any:[/^di/i,/^lu/i,/^ma/i,/^me/i,/^je/i,/^ve/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:kY({matchPatterns:{narrow:/^(a|p|minuit|midi|mat\.?|ap\.?m\.?|soir|nuit)/i,any:/^([ap]\.?\s?m\.?|du matin|de l'après[-\s]midi|du soir|de la nuit)/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^min/i,noon:/^mid/i,morning:/mat/i,afternoon:/ap/i,evening:/soir/i,night:/nuit/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:4}},lq={lessThanXSeconds:{one:"meno di un secondo",other:"meno di {{count}} secondi"},xSeconds:{one:"un secondo",other:"{{count}} secondi"},halfAMinute:"alcuni secondi",lessThanXMinutes:{one:"meno di un minuto",other:"meno di {{count}} minuti"},xMinutes:{one:"un minuto",other:"{{count}} minuti"},aboutXHours:{one:"circa un'ora",other:"circa {{count}} ore"},xHours:{one:"un'ora",other:"{{count}} ore"},xDays:{one:"un giorno",other:"{{count}} giorni"},aboutXWeeks:{one:"circa una settimana",other:"circa {{count}} settimane"},xWeeks:{one:"una settimana",other:"{{count}} settimane"},aboutXMonths:{one:"circa un mese",other:"circa {{count}} mesi"},xMonths:{one:"un mese",other:"{{count}} mesi"},aboutXYears:{one:"circa un anno",other:"circa {{count}} anni"},xYears:{one:"un anno",other:"{{count}} anni"},overXYears:{one:"più di un anno",other:"più di {{count}} anni"},almostXYears:{one:"quasi un anno",other:"quasi {{count}} anni"}},uq={date:_Y({formats:{full:"EEEE d MMMM y",long:"d MMMM y",medium:"d MMM y",short:"dd/MM/y"},defaultWidth:"full"}),time:_Y({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:_Y({formats:{full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},defaultWidth:"full"})},cq=["domenica","lunedì","martedì","mercoledì","giovedì","venerdì","sabato"];function dq(e){return"'"+cq[e]+" alle' p"}const hq={lastWeek:(e,t,n)=>{const i=e.getDay();return oX(e,t,n)?dq(i):function(e){return 0===e?"'domenica scorsa alle' p":"'"+cq[e]+" scorso alle' p"}(i)},yesterday:"'ieri alle' p",today:"'oggi alle' p",tomorrow:"'domani alle' p",nextWeek:(e,t,n)=>{const i=e.getDay();return oX(e,t,n)?dq(i):function(e){return 0===e?"'domenica prossima alle' p":"'"+cq[e]+" prossimo alle' p"}(i)},other:"P"},mq={code:"it",formatDistance:(e,t,n)=>{let i;const r=lq[e];return i="string"==typeof r?r:1===t?r.one:r.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"tra "+i:i+" fa":i},formatLong:uq,formatRelative:(e,t,n,i)=>{const r=hq[e];return"function"==typeof r?r(t,n,i):r},localize:{ordinalNumber:(e,t)=>{const n=Number(e);return String(n)},era:wY({values:{narrow:["aC","dC"],abbreviated:["a.C.","d.C."],wide:["avanti Cristo","dopo Cristo"]},defaultWidth:"wide"}),quarter:wY({values:{narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["1º trimestre","2º trimestre","3º trimestre","4º trimestre"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:wY({values:{narrow:["G","F","M","A","M","G","L","A","S","O","N","D"],abbreviated:["gen","feb","mar","apr","mag","giu","lug","ago","set","ott","nov","dic"],wide:["gennaio","febbraio","marzo","aprile","maggio","giugno","luglio","agosto","settembre","ottobre","novembre","dicembre"]},defaultWidth:"wide"}),day:wY({values:{narrow:["D","L","M","M","G","V","S"],short:["dom","lun","mar","mer","gio","ven","sab"],abbreviated:["dom","lun","mar","mer","gio","ven","sab"],wide:["domenica","lunedì","martedì","mercoledì","giovedì","venerdì","sabato"]},defaultWidth:"wide"}),dayPeriod:wY({values:{narrow:{am:"m.",pm:"p.",midnight:"mezzanotte",noon:"mezzogiorno",morning:"mattina",afternoon:"pomeriggio",evening:"sera",night:"notte"},abbreviated:{am:"AM",pm:"PM",midnight:"mezzanotte",noon:"mezzogiorno",morning:"mattina",afternoon:"pomeriggio",evening:"sera",night:"notte"},wide:{am:"AM",pm:"PM",midnight:"mezzanotte",noon:"mezzogiorno",morning:"mattina",afternoon:"pomeriggio",evening:"sera",night:"notte"}},defaultWidth:"wide",formattingValues:{narrow:{am:"m.",pm:"p.",midnight:"mezzanotte",noon:"mezzogiorno",morning:"di mattina",afternoon:"del pomeriggio",evening:"di sera",night:"di notte"},abbreviated:{am:"AM",pm:"PM",midnight:"mezzanotte",noon:"mezzogiorno",morning:"di mattina",afternoon:"del pomeriggio",evening:"di sera",night:"di notte"},wide:{am:"AM",pm:"PM",midnight:"mezzanotte",noon:"mezzogiorno",morning:"di mattina",afternoon:"del pomeriggio",evening:"di sera",night:"di notte"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:CY({matchPattern:/^(\d+)(º)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:kY({matchPatterns:{narrow:/^(aC|dC)/i,abbreviated:/^(a\.?\s?C\.?|a\.?\s?e\.?\s?v\.?|d\.?\s?C\.?|e\.?\s?v\.?)/i,wide:/^(avanti Cristo|avanti Era Volgare|dopo Cristo|Era Volgare)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^a/i,/^(d|e)/i]},defaultParseWidth:"any"}),quarter:kY({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^t[1234]/i,wide:/^[1234](º)? trimestre/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:kY({matchPatterns:{narrow:/^[gfmalsond]/i,abbreviated:/^(gen|feb|mar|apr|mag|giu|lug|ago|set|ott|nov|dic)/i,wide:/^(gennaio|febbraio|marzo|aprile|maggio|giugno|luglio|agosto|settembre|ottobre|novembre|dicembre)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^g/i,/^f/i,/^m/i,/^a/i,/^m/i,/^g/i,/^l/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ge/i,/^f/i,/^mar/i,/^ap/i,/^mag/i,/^gi/i,/^l/i,/^ag/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:kY({matchPatterns:{narrow:/^[dlmgvs]/i,short:/^(do|lu|ma|me|gi|ve|sa)/i,abbreviated:/^(dom|lun|mar|mer|gio|ven|sab)/i,wide:/^(domenica|luned[i|ì]|marted[i|ì]|mercoled[i|ì]|gioved[i|ì]|venerd[i|ì]|sabato)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^d/i,/^l/i,/^m/i,/^m/i,/^g/i,/^v/i,/^s/i],any:[/^d/i,/^l/i,/^ma/i,/^me/i,/^g/i,/^v/i,/^s/i]},defaultParseWidth:"any"}),dayPeriod:kY({matchPatterns:{narrow:/^(a|m\.|p|mezzanotte|mezzogiorno|(di|del) (mattina|pomeriggio|sera|notte))/i,any:/^([ap]\.?\s?m\.?|mezzanotte|mezzogiorno|(di|del) (mattina|pomeriggio|sera|notte))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mezza/i,noon:/^mezzo/i,morning:/mattina/i,afternoon:/pomeriggio/i,evening:/sera/i,night:/notte/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:4}},pq={lessThanXSeconds:{one:"mindre än en sekund",other:"mindre än {{count}} sekunder"},xSeconds:{one:"en sekund",other:"{{count}} sekunder"},halfAMinute:"en halv minut",lessThanXMinutes:{one:"mindre än en minut",other:"mindre än {{count}} minuter"},xMinutes:{one:"en minut",other:"{{count}} minuter"},aboutXHours:{one:"ungefär en timme",other:"ungefär {{count}} timmar"},xHours:{one:"en timme",other:"{{count}} timmar"},xDays:{one:"en dag",other:"{{count}} dagar"},aboutXWeeks:{one:"ungefär en vecka",other:"ungefär {{count}} veckor"},xWeeks:{one:"en vecka",other:"{{count}} veckor"},aboutXMonths:{one:"ungefär en månad",other:"ungefär {{count}} månader"},xMonths:{one:"en månad",other:"{{count}} månader"},aboutXYears:{one:"ungefär ett år",other:"ungefär {{count}} år"},xYears:{one:"ett år",other:"{{count}} år"},overXYears:{one:"över ett år",other:"över {{count}} år"},almostXYears:{one:"nästan ett år",other:"nästan {{count}} år"}},fq=["noll","en","två","tre","fyra","fem","sex","sju","åtta","nio","tio","elva","tolv"],gq={date:_Y({formats:{full:"EEEE d MMMM y",long:"d MMMM y",medium:"d MMM y",short:"y-MM-dd"},defaultWidth:"full"}),time:_Y({formats:{full:"'kl'. HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:_Y({formats:{full:"{{date}} 'kl.' {{time}}",long:"{{date}} 'kl.' {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},defaultWidth:"full"})},_q={lastWeek:"'i' EEEE's kl.' p",yesterday:"'igår kl.' p",today:"'idag kl.' p",tomorrow:"'imorgon kl.' p",nextWeek:"EEEE 'kl.' p",other:"P"},vq={code:"sv",formatDistance:(e,t,n)=>{let i;const r=pq[e];return i="string"==typeof r?r:1===t?r.one:r.other.replace("{{count}}",t<13?fq[t]:String(t)),n?.addSuffix?n.comparison&&n.comparison>0?"om "+i:i+" sedan":i},formatLong:gq,formatRelative:(e,t,n,i)=>_q[e],localize:{ordinalNumber:(e,t)=>{const n=Number(e),i=n%100;if(i>20||i<10)switch(i%10){case 1:case 2:return n+":a"}return n+":e"},era:wY({values:{narrow:["f.Kr.","e.Kr."],abbreviated:["f.Kr.","e.Kr."],wide:["före Kristus","efter Kristus"]},defaultWidth:"wide"}),quarter:wY({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1:a kvartalet","2:a kvartalet","3:e kvartalet","4:e kvartalet"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:wY({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["jan.","feb.","mars","apr.","maj","juni","juli","aug.","sep.","okt.","nov.","dec."],wide:["januari","februari","mars","april","maj","juni","juli","augusti","september","oktober","november","december"]},defaultWidth:"wide"}),day:wY({values:{narrow:["S","M","T","O","T","F","L"],short:["sö","må","ti","on","to","fr","lö"],abbreviated:["sön","mån","tis","ons","tors","fre","lör"],wide:["söndag","måndag","tisdag","onsdag","torsdag","fredag","lördag"]},defaultWidth:"wide"}),dayPeriod:wY({values:{narrow:{am:"fm",pm:"em",midnight:"midnatt",noon:"middag",morning:"morg.",afternoon:"efterm.",evening:"kväll",night:"natt"},abbreviated:{am:"f.m.",pm:"e.m.",midnight:"midnatt",noon:"middag",morning:"morgon",afternoon:"efterm.",evening:"kväll",night:"natt"},wide:{am:"förmiddag",pm:"eftermiddag",midnight:"midnatt",noon:"middag",morning:"morgon",afternoon:"eftermiddag",evening:"kväll",night:"natt"}},defaultWidth:"wide",formattingValues:{narrow:{am:"fm",pm:"em",midnight:"midnatt",noon:"middag",morning:"på morg.",afternoon:"på efterm.",evening:"på kvällen",night:"på natten"},abbreviated:{am:"fm",pm:"em",midnight:"midnatt",noon:"middag",morning:"på morg.",afternoon:"på efterm.",evening:"på kvällen",night:"på natten"},wide:{am:"fm",pm:"em",midnight:"midnatt",noon:"middag",morning:"på morgonen",afternoon:"på eftermiddagen",evening:"på kvällen",night:"på natten"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:CY({matchPattern:/^(\d+)(:a|:e)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:kY({matchPatterns:{narrow:/^(f\.? ?Kr\.?|f\.? ?v\.? ?t\.?|e\.? ?Kr\.?|v\.? ?t\.?)/i,abbreviated:/^(f\.? ?Kr\.?|f\.? ?v\.? ?t\.?|e\.? ?Kr\.?|v\.? ?t\.?)/i,wide:/^(före Kristus|före vår tid|efter Kristus|vår tid)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^f/i,/^[ev]/i]},defaultParseWidth:"any"}),quarter:kY({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](:a|:e)? kvartalet/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:kY({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar[s]?|apr|maj|jun[i]?|jul[i]?|aug|sep|okt|nov|dec)\.?/i,wide:/^(januari|februari|mars|april|maj|juni|juli|augusti|september|oktober|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^maj/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:kY({matchPatterns:{narrow:/^[smtofl]/i,short:/^(sö|må|ti|on|to|fr|lö)/i,abbreviated:/^(sön|mån|tis|ons|tors|fre|lör)/i,wide:/^(söndag|måndag|tisdag|onsdag|torsdag|fredag|lördag)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^s/i,/^m/i,/^ti/i,/^o/i,/^to/i,/^f/i,/^l/i]},defaultParseWidth:"any"}),dayPeriod:kY({matchPatterns:{any:/^([fe]\.?\s?m\.?|midn(att)?|midd(ag)?|(på) (morgonen|eftermiddagen|kvällen|natten))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^f/i,pm:/^e/i,midnight:/^midn/i,noon:/^midd/i,morning:/morgon/i,afternoon:/eftermiddag/i,evening:/kväll/i,night:/natt/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:4}},yq=OX(FL.Languages,FL.Languages.en);function bq(e){const{set:t}=Qj.getState();t(e),function(e){const t={da:GX,de:ZX,es:nq,fr:sq,it:mq,enGB:KX,sv:vq};uX({locale:"en"===e?t.enGB:t[e]})}(e)}const wq=new class extends $W{constructor(){super("userDetails",VX)}get(){const{id:e,country:t,language:n,email:i,name:r}=super.get();return{id:e,name:r,country:t,language:n,email:i}}async fetch(){const e=await(async()=>{const e={headers:{Accept:"application/json","Content-Type":"application/json"},method:FL.HTTPRequestMethod.GET},t=await FX(`${jX}/user`,e);if(t.status!==FL.StatusCode.OK){const{message:e}=await t.json();throw new Error("string"==typeof e?e:JSON.stringify(e))}return t.json()})();bq(e.language??yq),super.set(e),super.save()}migrateData(){throw new Error("[UserDetailsManager::migrateData] Purposefully not implemented.")}};var Sq,kq,Cq={},Eq={};function xq(){return kq||(kq=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"calculateActiveInsulin",{enumerable:!0,get:function(){return t.calculateInsulinOnBoard}}),Object.defineProperty(e,"calculateRecommendation",{enumerable:!0,get:function(){return t.calculateRecommendation}}),Object.defineProperty(e,"getReduction",{enumerable:!0,get:function(){return t.getReduction}});var t=function(){if(Sq)return Eq;Sq=1,Object.defineProperty(Eq,"__esModule",{value:!0}),Eq.adjustedInsulinCorrection=n,Eq.calculateInsulinOnBoard=a,Eq.calculateRecommendation=function(t){const{carbohydrateRatio:i,carbohydrates:a,currentBGL:s,insulinSensitivity:u,targetBGL:c,recentBoluses:d,activity:h}=t;if(null===s)throw new Error(e.GlucoseErrors.MissingCurrentBGL);if(s<e.CONSTANTS.GLUCOSE_INPUT_MIN_MMOLL||s>e.CONSTANTS.GLUCOSE_INPUT_MAX_MMOLL)throw new Error(e.GlucoseErrors.OutOfRangeCurrentBGL);const m=h?.activitySettings?.target,p=o(a,i),{activeInsulin:f,adjustedInsulin:g}=n(s,void 0!==m?Math.max(m,c):c,u,d??[]);let _=p+g;const v=_>e.CONSTANTS.INSULIN_DOSE_MAX;_=Math.min(_,e.CONSTANTS.INSULIN_DOSE_MAX);let y=0;if(s<3.9){const e=o(15,i);_-=e,_<0&&(y=Math.max(15,r(_+e,i)))}else{const e=r(_,i);y=Math.max(0,e)}_=Math.max(0,_);const b=h?l(h.activityDuration,h.activitySettings,h.activityIntensity,h.activityDate):null;return b&&(_*=1-b),{bolus:_,carbRecommendation:y,wasLimited:v,activityReduction:b,activeInsulin:f}},Eq.foodBolus=o,Eq.foodRecommendation=r,Eq.fractionOfInsulinStillActive=i,Eq.getInterval=u,Eq.getReduction=l,Eq.insulinStillActive=s,Eq.rawInsulinCorrection=t;var e=NL();function t(e,t,n){return(e-t)/n}function n(e,n,i,r){const o=a(r),s=t(e,n,i);return{activeInsulin:o,adjustedInsulin:Math.max(s-o,Math.min(s,0))}}function i(e){if(e<0)throw new RangeError(`Parameter secondsPassed can't be negative. Found ${e}.`);return 0===e?1:e<5e3?Math.cos((e+500)/5900):e<7e3?-120127e-9*e+1.197151:e<14400?.96-Math.tanh((e-2800)/6e3):0}function r(e,t){return-e*t}function a(e){return e.reduce((e,t)=>e+s(t),0)}function o(e,t){return e/t}function s(e){return e.insulinDose*i(e.secondsPassed)}function l(t,n,i,r){if(t<e.CONSTANTS.ACTIVITY_DURATION_MIN||t>e.CONSTANTS.ACTIVITY_DURATION_MAX)throw new Error(e.ActivityErrors.OutOfRange);const a=r.getTime()+t*e.Milliseconds.Minute,o=(new Date).getTime()>=a,s=u(t,(()=>{if(o)return n.post;if(null===i)throw new Error(e.ActivityErrors.MissingIntensity);return n[i]})());if(null==s)throw new Error(e.ActivityErrors.InvalidInterval);const l=1-s;if(l<e.CONSTANTS.ACTIVITY_REDUCTION_MIN||l>e.CONSTANTS.ACTIVITY_REDUCTION_MAX)throw new Error(e.ActivityErrors.InvalidReduction);return l}function u(e,t){const{fromZero:n,fromThirty:i,fromFortysix:r}=t;return e<=29?n:e<=45?i:r}return Eq}()}(Cq)),Cq}var Iq=xq();const Tq=oV?"/api/v2":zj.HEDIA_API_URL_V2;const Oq=e=>{let t=Rq();t=t.filter(t=>t[0]!==e),qj.set("event/index",JSON.stringify(t))},Rq=()=>{const e=qj.getString("event/index");return void 0===e?[]:JSON.parse(e)},Aq=()=>{const e=qj.getString("event/pendingChanges");return void 0===e?{lastSyncTimestamp:new Date(0).toJSON(),eventUpdates:[],deletedEvents:[]}:JSON.parse(e)},Lq=new class{create=async(e,t)=>{try{e.overwrittenByUUID=void 0;const n=Aq();n.eventUpdates.push({...e,uuidOld:t}),qj.set("event/pendingChanges",JSON.stringify(n));const i=(e,t)=>{if(this.saveLocally(e),void 0!==t){const n=this.getByUUID(t);n.overwrittenByUUID=e.uuid,this.saveLocally(n)}};return oV?(await this.sync(),i(e,t)):(i(e,t),GQ.syncAll().catch(console.error)),!0}catch(n){return console.error(n),!1}};getActiveEvents=()=>{const e=Rq(),t=[];for(const n of e){const[e,i]=n,r=this.getByUUID(e);i>Date.now()-90*FL.Milliseconds.Minute-r.durationSeconds*FL.Milliseconds.Second&&t.push(r)}return t};getEvents=(e,t)=>{let n=Rq();if(void 0!==e){const t=e.getTime();n=n.filter(e=>e[1]>=t)}if(void 0!==t){const e=t.getTime();n=n.filter(t=>t[1]<e)}const i=[];for(const a of n)try{const e=this.getByUUID(a[0]);i.push(e)}catch(r){console.error(r)}return i};sync=async()=>{const e=Aq(),t={method:FL.HTTPRequestMethod.POST,body:JSON.stringify(e),headers:{"Content-Type":"application/json"}},n=await FX(`${Tq}/events`,t),i=await n.json();if(n.status!==FL.StatusCode.OK)throw new Error(`[EventManager::sync] Problem during event synchronization. Server response: ${JSON.stringify(n)}`);const{lastSyncTimestamp:r,eventUpdates:a}=i;for(const l of a)this.saveLocally(l);const o=Aq(),s={lastSyncTimestamp:r,eventUpdates:o.eventUpdates.filter(t=>!e.eventUpdates.map(e=>e.uuid).includes(t.uuid)),deletedEvents:o.deletedEvents.filter(t=>!e.deletedEvents.includes(t))};qj.set("event/pendingChanges",JSON.stringify(s))};getEventWithHighestReduction=e=>{if(!e)throw new Error("[EventManager::getEventWithHighestReduction] Cannot retrieve highest reduction without a provided setting!");const t=this.getActiveEvents();if(!t.length)return;const n=({durationSeconds:t,activityIntensity:n,startTimestamp:i})=>{if(null===i)throw new Error("[EventManager::calculateReduction] Cannot calculate reduction without startTimestamp!");return Iq.getReduction(t/60,e,n,new Date(i))},i=t.sort((e,t)=>n(e)-n(t));return i[i.length-1]};getByUUID=e=>{const t=qj.getString(`event/${e}`);if(void 0===t)throw new Error(`[EventManager::getByUUID] The requested event with UUID ${e} does not exist!`);return JSON.parse(t)};saveLocally=e=>{if(Oq(e.uuid),qj.set(`event/${e.uuid}`,JSON.stringify(e)),!e.deleted&&!e.overwrittenByUUID){let t=Rq();if(null===e.startTimestamp)throw new Error("[EventManager::saveLocally] event.startTimestamp must be non-null.");const n=new Date(e.startTimestamp).getTime();t.push([e.uuid,n]),t=t.sort((e,t)=>t[1]-e[1]),qj.set("event/index",JSON.stringify(t))}}};const Pq=new class{get=()=>{const e=qj.getString("userSettings");if(!e)return{};const t=JSON.parse(e);return t.gender&&!t.biologicalSex&&(t.biologicalSex=t.gender,delete t.gender),t};write=e=>{const t={...e};delete t.gender,qj.set("userSettings",JSON.stringify(t))};getPending=()=>{const e=qj.getString("pendingSettingsChanges");if(!e)return[];return JSON.parse(e).map(e=>(e.gender&&!e.biologicalSex&&(e.biologicalSex=e.gender,delete e.gender),e))};addPending=e=>{const t=this.getPending();t.push(e),qj.set("pendingSettingsChanges",JSON.stringify(t))};removePending=e=>{const t=e.map(e=>e.uuid),n=this.getPending().filter(e=>!t.includes(e.uuid));qj.set("pendingSettingsChanges",JSON.stringify(n))}};var Mq=Object.defineProperty,Dq=Object.getOwnPropertyDescriptor,Nq=(e,t,n,i)=>{for(var r,a=i>1?void 0:i?Dq(t,n):t,o=e.length-1;o>=0;o--)(r=e[o])&&(a=(i?r(t,n,a):r(a))||a);return i&&a&&Mq(t,n,a),a};const Fq=oV?"/api/v2":zj.HEDIA_API_URL_V2;class Bq{_diabetesType;_biologicalSex;_heightCm;_weightKg;_birthDate;_injectionMethod;_glucoseUnit;_treatmentParameters;_glucoseLevelTargets;_fastActingInsulin;_longActingInsulin;_uuid;_activity;_notifications;constructor(){const e=this.getUserSettings();this.updateUserSettings(e),UD(this)}get diabetesType(){return this._diabetesType}get biologicalSex(){return this._biologicalSex}get heightCm(){return this._heightCm}get weightKg(){return this._weightKg}get birthDate(){return this._birthDate}get injectionMethod(){return this._injectionMethod}get glucoseUnit(){return this._glucoseUnit}get treatmentParameters(){return this._treatmentParameters}get glucoseLevelTargets(){return this._glucoseLevelTargets}get fastActingInsulin(){return this._fastActingInsulin}get longActingInsulin(){return this._longActingInsulin}get uuid(){return this._uuid}get activity(){return this._activity}get notifications(){return this._notifications}async setUserSettings(e){const t=this.getUserSettings();e.uuidOld=t.uuid,e.uuid=IX(),e.created=(new Date).toJSON();const n={...t,...e};return Pq.addPending(e),oV?this.syncWeb():(Pq.write(n),this.updateUserSettings(n),GQ.syncAll().catch(console.error),!0)}getUserSettings(){return Pq.get()}async syncWeb(){const e=Pq.getPending();try{const t=await this.makeSyncRequest(e);return Pq.write(t),this.updateUserSettings(t),!0}catch(t){return console.error(t),!1}finally{Pq.removePending(e)}}async sync(){const e=Pq.getPending(),t=await this.makeSyncRequest(e);Pq.write(t),this.updateUserSettings(t),Pq.removePending(e)}reset(){this.updateUserSettings({activity:void 0,birthday:void 0,bloodGlucoseUnits:void 0,created:void 0,diabetesType:void 0,fastActingInsulin:void 0,glucoseLevelTargets:void 0,insulinDependent:void 0,longActingInsulin:void 0,treatmentType:void 0,parameters:void 0,uuid:void 0,uuidOld:void 0,notifications:void 0,biologicalSex:void 0,height:void 0,bloodKetonesUnit:void 0,email:void 0,weight:void 0})}makeSyncRequest=async e=>{const t={headers:{"Content-Type":"application/json"},method:e?FL.HTTPRequestMethod.POST:FL.HTTPRequestMethod.GET,body:e?JSON.stringify(e):void 0},n=await FX(`${Fq}/settings`,t),i=await n.json();if(n.status!==FL.StatusCode.OK)throw new Error(`[UserSettingsManager::makeSyncRequest] - ${JSON.stringify(i.message)}`);return i};updateUserSettings(e){this._diabetesType=e.diabetesType,this._biologicalSex=e.biologicalSex,this._heightCm=e.height,this._weightKg=e.weight,this._birthDate=e.birthday,this._injectionMethod=e.treatmentType,this._glucoseUnit=e.bloodGlucoseUnits,this._treatmentParameters=e.parameters,this._glucoseLevelTargets=e.glucoseLevelTargets,this._fastActingInsulin=e.fastActingInsulin,this._longActingInsulin=e.longActingInsulin,this._uuid=e.uuid,this._activity=e.activity,this._notifications=e.notifications}}function jq(e,t,n){const i={carbohydrateRatio:t,insulinSensitivity:e,startTime:"00:00"},r=["00:00","05:00","09:00","11:00","13:00","18:00","22:00"].map(e=>({insulinSensitivity:i.insulinSensitivity,carbohydrateRatio:i.carbohydrateRatio,startTime:e}));return{overallParameters:i,parameterIntervals:r,use:n}}Nq([fM],Bq.prototype,"_diabetesType",2),Nq([fM],Bq.prototype,"_biologicalSex",2),Nq([fM],Bq.prototype,"_heightCm",2),Nq([fM],Bq.prototype,"_weightKg",2),Nq([fM],Bq.prototype,"_birthDate",2),Nq([fM],Bq.prototype,"_injectionMethod",2),Nq([fM],Bq.prototype,"_glucoseUnit",2),Nq([fM],Bq.prototype,"_treatmentParameters",2),Nq([fM],Bq.prototype,"_glucoseLevelTargets",2),Nq([fM],Bq.prototype,"_fastActingInsulin",2),Nq([fM],Bq.prototype,"_longActingInsulin",2),Nq([fM],Bq.prototype,"_uuid",2),Nq([fM],Bq.prototype,"_activity",2),Nq([fM],Bq.prototype,"_notifications",2),Nq([fD],Bq.prototype,"updateUserSettings",1);const Vq=new Bq,Hq="mmol/L",zq=[0,30],Uq=[0,540],Gq=3.9,Wq=10,Yq=70,$q=180,Xq=e=>{if(e===FL.BloodGlucoseUnit.MMOL_L)return{text:Hq,graphLimits:zq,inputMin:FL.CONSTANTS.GLUCOSE_INPUT_MIN_MMOLL,inputMax:FL.CONSTANTS.GLUCOSE_INPUT_MAX_MMOLL,decimalPlaces:1,placeholder:"-.-",targetInterval:{low:Gq,high:Wq}};if(e===FL.BloodGlucoseUnit.MG_DL)return{text:"mg/dL",graphLimits:Uq,inputMin:20,inputMax:600,decimalPlaces:0,placeholder:"-",targetInterval:{low:Yq,high:$q}};throw new Error(`[glucose::getBGConstants] Unsupported glucose unit! ${e}`)};async function qq(e){return e?e.startsWith("data:image/svg+xml;utf8")&&"android"===lr.OS?function(e){try{return decodeURIComponent(e).split(",").slice(1).join(",")}catch(t){throw new Error(`Decoding ${e} failed with error: ${t}`)}}(e):e.startsWith("data:image/svg+xml;base64")?Zq(e):async function(e){const t=await fetch(e);if(t.ok||0===t.status&&e.startsWith("file://"))return await t.text();throw new Error(`Fetching ${e} failed with status ${t.status}`)}(e):null}const Zq=e=>{const t=decodeURIComponent(e).split(";")[1].split(","),n=t[0],i=t.slice(1).join(",");return Gz.Buffer.from(i,n).toString("utf-8")};const Kq=e=>e.replace(/[A-Z]/g,e=>"-"+e.toLowerCase()),Qq=e=>{if(e){if(1===e.nodeType&&"function"==typeof e.getBoundingClientRect)return e.getBoundingClientRect()}throw new Error("Can not get boundingClientRect of "+e||"undefined")};function Jq(){const e=this.state.touchable.responderID;null!==e&&((e,t)=>{const n=null==e?void 0:e.parentNode;n&&setTimeout(()=>{const i=Qq(n),{height:r,left:a,top:o,width:s}=Qq(e),l=a-i.left,u=o-i.top;t(l,u,s,r,a,o)},0)})(e,this._handleQueryLayout)}function eZ(e){return!!(e.onPress||e.onPressIn||e.onPressOut||e.onLongPress)}var tZ,nZ,iZ,rZ,aZ,oZ;function sZ(e,t){const n=[];if(t&&n.push(...lZ(t)),Array.isArray(e))if("number"==typeof e[0])n.push(`matrix(${e.join(" ")})`);else{const t=function(e){const t={};return null==e||e.forEach(e=>{const n=Object.keys(e);1!==n.length&&console.error("You must specify exactly one property per transform object.");const i=n[0],r=e[i];t[i]=r}),t}(e);n.push(...lZ(t))}else"string"==typeof e&&n.push(e);return n.length?n.join(" "):void 0}function lZ(e){const t=[];return null!=e.translate&&t.push(`translate(${e.translate})`),null==e.translateX&&null==e.translateY||t.push(`translate(${e.translateX||0}, ${e.translateY||0})`),null!=e.scale&&t.push(`scale(${e.scale})`),null==e.scaleX&&null==e.scaleY||t.push(`scale(${e.scaleX||1}, ${e.scaleY||1})`),null!=e.rotation&&t.push(`rotate(${e.rotation})`),null!=e.skewX&&t.push(`skewX(${e.skewX})`),null!=e.skewY&&t.push(`skewY(${e.skewY})`),t}!function(){if(nZ)return tZ;function e(t,n,i,r){this.message=t,this.expected=n,this.found=i,this.location=r,this.name="SyntaxError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,e)}nZ=1,function(e,t){function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n}(e,Error),e.buildMessage=function(e,t){var n,i={literal:function(e){return'"'+a(e.text)+'"'},class:function(e){var t,n="";for(t=0;t<e.parts.length;t++)n+=e.parts[t]instanceof Array?o(e.parts[t][0])+"-"+o(e.parts[t][1]):o(e.parts[t]);return"["+(e.inverted?"^":"")+n+"]"},any:function(e){return"any character"},end:function(e){return"end of input"},other:function(e){return e.description}};function r(e){return e.charCodeAt(0).toString(16).toUpperCase()}function a(e){return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(e){return"\\x0"+r(e)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(e){return"\\x"+r(e)})}function o(e){return e.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(e){return"\\x0"+r(e)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(e){return"\\x"+r(e)})}function s(e){return i[e.type](e)}return"Expected "+function(e){var t,n,i=new Array(e.length);for(t=0;t<e.length;t++)i[t]=s(e[t]);if(i.sort(),i.length>0){for(t=1,n=1;t<i.length;t++)i[t-1]!==i[t]&&(i[n]=i[t],n++);i.length=n}switch(i.length){case 1:return i[0];case 2:return i[0]+" or "+i[1];default:return i.slice(0,-1).join(", ")+", or "+i[i.length-1]}}(e)+" but "+(((n=t)?'"'+a(n)+'"':"end of input")+" found.")},tZ={SyntaxError:e,parse:function(t,n){n=void 0!==n?n:{};var i,r={},a={transformList:ue},o=ue,s=function(e){return e},l=function(e,t){return function(e,t){var n=e[0],i=e[1],r=e[2],a=e[3],o=e[4],s=e[5],l=t[0],u=t[1],c=t[2],d=t[3],h=t[4],m=t[5],p=n*c+i*m+r,f=a*u+o*h;return[n*l+i*d,n*u+i*h,p,a*l+o*d,f,a*c+o*m+s]}(e,t)},u="matrix",c=re("matrix",!1),d="(",h=re("(",!1),m=")",p=re(")",!1),f=function(e,t,n,i,r,a){return[e,n,r,t,i,a]},g="translate",_=re("translate",!1),v=function(e,t){return[1,0,e,0,1,t||0]},y="scale",b=re("scale",!1),w=function(e,t){return[e,0,0,0,null===t?e:t,0]},S="rotate",k=re("rotate",!1),C=function(e,t){var n=Math.cos(Ce*e),i=Math.sin(Ce*e);if(null!==t){var r=t[0],a=t[1];return[n,-i,n*-r+-i*-a+r,i,n,i*-r+n*-a+a]}return[n,-i,0,i,n,0]},E="skewX",x=re("skewX",!1),I=function(e){return[1,Math.tan(Ce*e),0,0,1,0]},T="skewY",O=re("skewY",!1),R=function(e){return[1,0,0,Math.tan(Ce*e),1,0]},A=function(e){return parseFloat(e.join(""))},L=function(e){return parseInt(e.join(""))},P=function(e){return e},M=function(e,t){return[e,t]},D=",",N=re(",",!1),F=function(e){return e.join("")},B=function(e){return e.join("")},j=function(e){return e.join("")},V={type:"other",description:"fractionalConstant"},H=".",z=re(".",!1),U=function(e,t){return[e?e.join(""):null,".",t.join("")].join("")},G=/^[eE]/,W=ae(["e","E"],!1,!1),Y=function(e){return[e[0],e[1],e[2].join("")].join("")},$=/^[+\-]/,X=ae(["+","-"],!1,!1),q=/^[0-9]/,Z=ae([["0","9"]],!1,!1),K=/^[ \t\r\n]/,Q=ae([" ","\t","\r","\n"],!1,!1),J=0,ee=[{line:1,column:1}],te=0,ne=[],ie=0;if("startRule"in n){if(!(n.startRule in a))throw new Error("Can't start parsing from rule \""+n.startRule+'".');o=a[n.startRule]}function re(e,t){return{type:"literal",text:e,ignoreCase:t}}function ae(e,t,n){return{type:"class",parts:e,inverted:t,ignoreCase:n}}function oe(e){var n,i=ee[e];if(i)return i;for(n=e-1;!ee[n];)n--;for(i={line:(i=ee[n]).line,column:i.column};n<e;)10===t.charCodeAt(n)?(i.line++,i.column=1):i.column++,n++;return ee[e]=i,i}function se(e,t){var n=oe(e),i=oe(t);return{start:{offset:e,line:n.line,column:n.column},end:{offset:t,line:i.line,column:i.column}}}function le(e){J<te||(J>te&&(te=J,ne=[]),ne.push(e))}function ue(){var e,t,n,i,a;for(e=J,t=[],n=be();n!==r;)t.push(n),n=be();if(t!==r)if((n=ce())===r&&(n=null),n!==r){for(i=[],a=be();a!==r;)i.push(a),a=be();i!==r?e=t=s(n):(J=e,e=r)}else J=e,e=r;else J=e,e=r;return e}function ce(){var e,t,n,i;if(e=J,(t=de())!==r){for(n=[],i=pe();i!==r;)n.push(i),i=pe();n!==r&&(i=ce())!==r?e=t=l(t,i):(J=e,e=r)}else J=e,e=r;return e===r&&(e=de()),e}function de(){var e;return(e=function(){var e,n,i,a,o,s,l,g,_,v,y,b,w;e=J,t.substr(J,6)===u?(n=u,J+=6):(n=r,0===ie&&le(c));if(n!==r){for(i=[],a=be();a!==r;)i.push(a),a=be();if(i!==r)if(40===t.charCodeAt(J)?(a=d,J++):(a=r,0===ie&&le(h)),a!==r){for(o=[],s=be();s!==r;)o.push(s),s=be();if(o!==r)if((s=he())!==r)if(pe()!==r)if((l=he())!==r)if(pe()!==r)if((g=he())!==r)if(pe()!==r)if((_=he())!==r)if(pe()!==r)if((v=he())!==r)if(pe()!==r)if((y=he())!==r){for(b=[],w=be();w!==r;)b.push(w),w=be();b!==r?(41===t.charCodeAt(J)?(w=m,J++):(w=r,0===ie&&le(p)),w!==r?e=n=f(s,l,g,_,v,y):(J=e,e=r)):(J=e,e=r)}else J=e,e=r;else J=e,e=r;else J=e,e=r;else J=e,e=r;else J=e,e=r;else J=e,e=r;else J=e,e=r;else J=e,e=r;else J=e,e=r;else J=e,e=r;else J=e,e=r;else J=e,e=r}else J=e,e=r;else J=e,e=r}else J=e,e=r;return e}())===r&&(e=function(){var e,n,i,a,o,s,l,u,c;e=J,t.substr(J,9)===g?(n=g,J+=9):(n=r,0===ie&&le(_));if(n!==r){for(i=[],a=be();a!==r;)i.push(a),a=be();if(i!==r)if(40===t.charCodeAt(J)?(a=d,J++):(a=r,0===ie&&le(h)),a!==r){for(o=[],s=be();s!==r;)o.push(s),s=be();if(o!==r)if((s=he())!==r)if((l=me())===r&&(l=null),l!==r){for(u=[],c=be();c!==r;)u.push(c),c=be();u!==r?(41===t.charCodeAt(J)?(c=m,J++):(c=r,0===ie&&le(p)),c!==r?e=n=v(s,l):(J=e,e=r)):(J=e,e=r)}else J=e,e=r;else J=e,e=r;else J=e,e=r}else J=e,e=r;else J=e,e=r}else J=e,e=r;return e}())===r&&(e=function(){var e,n,i,a,o,s,l,u,c;e=J,t.substr(J,5)===y?(n=y,J+=5):(n=r,0===ie&&le(b));if(n!==r){for(i=[],a=be();a!==r;)i.push(a),a=be();if(i!==r)if(40===t.charCodeAt(J)?(a=d,J++):(a=r,0===ie&&le(h)),a!==r){for(o=[],s=be();s!==r;)o.push(s),s=be();if(o!==r)if((s=he())!==r)if((l=me())===r&&(l=null),l!==r){for(u=[],c=be();c!==r;)u.push(c),c=be();u!==r?(41===t.charCodeAt(J)?(c=m,J++):(c=r,0===ie&&le(p)),c!==r?e=n=w(s,l):(J=e,e=r)):(J=e,e=r)}else J=e,e=r;else J=e,e=r;else J=e,e=r}else J=e,e=r;else J=e,e=r}else J=e,e=r;return e}())===r&&(e=function(){var e,n,i,a,o,s,l,u,c;e=J,t.substr(J,6)===S?(n=S,J+=6):(n=r,0===ie&&le(k));if(n!==r){for(i=[],a=be();a!==r;)i.push(a),a=be();if(i!==r)if(40===t.charCodeAt(J)?(a=d,J++):(a=r,0===ie&&le(h)),a!==r){for(o=[],s=be();s!==r;)o.push(s),s=be();if(o!==r)if((s=he())!==r)if(l=function(){var e,t,n,i;e=J,t=pe(),t!==r&&(n=he())!==r&&pe()!==r&&(i=he())!==r?e=t=M(n,i):(J=e,e=r);return e}(),l===r&&(l=null),l!==r){for(u=[],c=be();c!==r;)u.push(c),c=be();u!==r?(41===t.charCodeAt(J)?(c=m,J++):(c=r,0===ie&&le(p)),c!==r?e=n=C(s,l):(J=e,e=r)):(J=e,e=r)}else J=e,e=r;else J=e,e=r;else J=e,e=r}else J=e,e=r;else J=e,e=r}else J=e,e=r;return e}())===r&&(e=function(){var e,n,i,a,o,s,l,u;e=J,t.substr(J,5)===E?(n=E,J+=5):(n=r,0===ie&&le(x));if(n!==r){for(i=[],a=be();a!==r;)i.push(a),a=be();if(i!==r)if(40===t.charCodeAt(J)?(a=d,J++):(a=r,0===ie&&le(h)),a!==r){for(o=[],s=be();s!==r;)o.push(s),s=be();if(o!==r)if((s=he())!==r){for(l=[],u=be();u!==r;)l.push(u),u=be();l!==r?(41===t.charCodeAt(J)?(u=m,J++):(u=r,0===ie&&le(p)),u!==r?e=n=I(s):(J=e,e=r)):(J=e,e=r)}else J=e,e=r;else J=e,e=r}else J=e,e=r;else J=e,e=r}else J=e,e=r;return e}())===r&&(e=function(){var e,n,i,a,o,s,l,u;e=J,t.substr(J,5)===T?(n=T,J+=5):(n=r,0===ie&&le(O));if(n!==r){for(i=[],a=be();a!==r;)i.push(a),a=be();if(i!==r)if(40===t.charCodeAt(J)?(a=d,J++):(a=r,0===ie&&le(h)),a!==r){for(o=[],s=be();s!==r;)o.push(s),s=be();if(o!==r)if((s=he())!==r){for(l=[],u=be();u!==r;)l.push(u),u=be();l!==r?(41===t.charCodeAt(J)?(u=m,J++):(u=r,0===ie&&le(p)),u!==r?e=n=R(s):(J=e,e=r)):(J=e,e=r)}else J=e,e=r;else J=e,e=r}else J=e,e=r;else J=e,e=r}else J=e,e=r;return e}()),e}function he(){var e,n,i,a;return e=J,n=J,(i=_e())===r&&(i=null),i!==r?(a=function(){var e,n,i,a;e=J,n=J,i=function(){var e,n,i,a;ie++,e=J,n=ve(),n===r&&(n=null);n!==r?(46===t.charCodeAt(J)?(i=H,J++):(i=r,0===ie&&le(z)),i!==r&&(a=ve())!==r?e=n=U(n,a):(J=e,e=r)):(J=e,e=r);e===r&&(e=J,(n=ve())!==r?(46===t.charCodeAt(J)?(i=H,J++):(i=r,0===ie&&le(z)),i!==r?e=n=j(n):(J=e,e=r)):(J=e,e=r));ie--,e===r&&(n=r,0===ie&&le(V));return e}(),i!==r?((a=ge())===r&&(a=null),a!==r?n=i=[i,a]:(J=n,n=r)):(J=n,n=r);n!==r&&(n=B(n));e=n,e===r&&(e=J,n=J,(i=ve())!==r&&(a=ge())!==r?n=i=[i,a]:(J=n,n=r),n!==r&&(n=j(n)),e=n);return e}(),a!==r?n=i=[i,a]:(J=n,n=r)):(J=n,n=r),n!==r&&(n=A(n)),(e=n)===r&&(e=J,n=J,(i=_e())===r&&(i=null),i!==r?(a=function(){var e,t;e=J,t=ve(),t!==r&&(t=F(t));return e=t,e}(),a!==r?n=i=[i,a]:(J=n,n=r)):(J=n,n=r),n!==r&&(n=L(n)),e=n),e}function me(){var e,t;return e=J,pe()!==r&&(t=he())!==r?e=P(t):(J=e,e=r),e}function pe(){var e,t,n,i,a;if(e=J,t=[],(n=be())!==r)for(;n!==r;)t.push(n),n=be();else t=r;if(t!==r)if((n=fe())===r&&(n=null),n!==r){for(i=[],a=be();a!==r;)i.push(a),a=be();i!==r?e=t=[t,n,i]:(J=e,e=r)}else J=e,e=r;else J=e,e=r;if(e===r)if(e=J,(t=fe())!==r){for(n=[],i=be();i!==r;)n.push(i),i=be();n!==r?e=t=[t,n]:(J=e,e=r)}else J=e,e=r;return e}function fe(){var e;return 44===t.charCodeAt(J)?(e=D,J++):(e=r,0===ie&&le(N)),e}function ge(){var e,n,i,a;return e=J,G.test(t.charAt(J))?(n=t.charAt(J),J++):(n=r,0===ie&&le(W)),n!==r?((i=_e())===r&&(i=null),i!==r&&(a=ve())!==r?e=n=[n,i,a]:(J=e,e=r)):(J=e,e=r),e!==r&&(e=Y(e)),e}function _e(){var e;return $.test(t.charAt(J))?(e=t.charAt(J),J++):(e=r,0===ie&&le(X)),e}function ve(){var e,t;if(e=[],(t=ye())!==r)for(;t!==r;)e.push(t),t=ye();else e=r;return e}function ye(){var e;return q.test(t.charAt(J))?(e=t.charAt(J),J++):(e=r,0===ie&&le(Z)),e}function be(){var e;return K.test(t.charAt(J))?(e=t.charAt(J),J++):(e=r,0===ie&&le(Q)),e}var we,Se,ke,Ce=Math.PI/180;if((i=o())!==r&&J===t.length)return i;throw i!==r&&J<t.length&&le({type:"end"}),we=ne,Se=te<t.length?t.charAt(te):null,ke=te<t.length?se(te,te+1):se(te,te),new e(e.buildMessage(we,Se),we,Se,ke)}}}(),function(){if(rZ)return iZ;function e(t,n,i,r){var a=Error.call(this,t);return Object.setPrototypeOf&&Object.setPrototypeOf(a,e.prototype),a.expected=n,a.found=i,a.location=r,a.name="SyntaxError",a}function t(e,t,n){return n=n||" ",e.length>t?e:(t-=e.length,e+(n+=n.repeat(t)).slice(0,t))}rZ=1,function(e,t){function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n}(e,Error),e.prototype.format=function(e){var n="Error: "+this.message;if(this.location){var i,r=null;for(i=0;i<e.length;i++)if(e[i].source===this.location.source){r=e[i].text.split(/\r\n|\n|\r/g);break}var a=this.location.start,o=this.location.source&&"function"==typeof this.location.source.offset?this.location.source.offset(a):a,s=this.location.source+":"+o.line+":"+o.column;if(r){var l=this.location.end,u=t("",o.line.toString().length," "),c=r[a.line-1],d=(a.line===l.line?l.column:c.length+1)-a.column||1;n+="\n --\x3e "+s+"\n"+u+" |\n"+o.line+" | "+c+"\n"+u+" | "+t("",a.column-1," ")+t("",d,"^")}else n+="\n at "+s}return n},e.buildMessage=function(e,t){var n,i={literal:function(e){return'"'+a(e.text)+'"'},class:function(e){var t=e.parts.map(function(e){return Array.isArray(e)?o(e[0])+"-"+o(e[1]):o(e)});return"["+(e.inverted?"^":"")+t.join("")+"]"},any:function(){return"any character"},end:function(){return"end of input"},other:function(e){return e.description}};function r(e){return e.charCodeAt(0).toString(16).toUpperCase()}function a(e){return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(e){return"\\x0"+r(e)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(e){return"\\x"+r(e)})}function o(e){return e.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(e){return"\\x0"+r(e)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(e){return"\\x"+r(e)})}function s(e){return i[e.type](e)}return"Expected "+function(e){var t,n,i=e.map(s);if(i.sort(),i.length>0){for(t=1,n=1;t<i.length;t++)i[t-1]!==i[t]&&(i[n]=i[t],n++);i.length=n}switch(i.length){case 1:return i[0];case 2:return i[0]+" or "+i[1];default:return i.slice(0,-1).join(", ")+", or "+i[i.length-1]}}(e)+" but "+(((n=t)?'"'+a(n)+'"':"end of input")+" found.")},iZ={StartRules:["start"],SyntaxError:e,parse:function(t,n){var i,r,a,o,s={},l=(n=void 0!==n?n:{}).grammarSource,u={start:ge},c=ge,d="matrix(",h=")",m="translate(",p="scale(",f="rotate(",g="skewX(",_="skewY(",v=".",y="e",b=/^[ \t\n\r,]/,w=/^[ \t\n\r]/,S=/^[+\-]/,k=/^[0-9]/,C=he("transform functions"),E=he("transformFunctions"),x=he("transform function"),I=he("matrix"),T=ce("matrix(",!1),O=ce(")",!1),R=he("translate"),A=ce("translate(",!1),L=he("scale"),P=ce("scale(",!1),M=he("rotate"),D=ce("rotate(",!1),N=he("x, y"),F=he("skewX"),B=ce("skewX(",!1),j=he("skewY"),V=ce("skewY(",!1),H=he("space or comma"),z=de([" ","\t","\n","\r",","],!1,!1),U=he("whitespace"),G=de([" ","\t","\n","\r"],!1,!1),W=de(["+","-"],!1,!1),Y=de([["0","9"]],!1,!1),$=ce(".",!1),X=ce("e",!1),q=function(e,t){const n=Array.isArray(e)?e:[e];return t.forEach(e=>{Array.isArray(e[1])?n.push(...e[1]):n.push(e[1])}),n},Z=function(e,t,n,i,r,a,o,s,l){return{matrix:[e,t,n,i,r,a,o,s,l]}},K=function(e,t){return null==t?{translate:e}:{translate:[e,t]}},Q=function(e,t){return null==t?{scale:e}:[{scaleX:e},{scaleY:t}]},J=function(e,t){return null!==t?{rotate:`${e}deg`}:[{rotate:`${e}deg`}]},ee=function(e,t){return[e,t]},te=function(e){return[{skewX:`${e}deg`}]},ne=function(e){return[{skewY:`${e}deg`}]},ie=function(){return parseFloat(t.substring(ae,re))},re=0|n.peg$currPos,ae=re,oe=[{line:1,column:1}],se=re,le=n.peg$maxFailExpected||[],ue=0|n.peg$silentFails;if(n.startRule){if(!(n.startRule in u))throw new Error("Can't start parsing from rule \""+n.startRule+'".');c=u[n.startRule]}function ce(e,t){return{type:"literal",text:e,ignoreCase:t}}function de(e,t,n){return{type:"class",parts:e,inverted:t,ignoreCase:n}}function he(e){return{type:"other",description:e}}function me(e){var n,i=oe[e];if(i)return i;if(e>=oe.length)n=oe.length-1;else for(n=e;!oe[--n];);for(i={line:(i=oe[n]).line,column:i.column};n<e;)10===t.charCodeAt(n)?(i.line++,i.column=1):i.column++,n++;return oe[e]=i,i}function pe(e,t,n){var i=me(e),r=me(t);return{source:l,start:{offset:e,line:i.line,column:i.column},end:{offset:t,line:r.line,column:r.column}}}function fe(e){re<se||(re>se&&(se=re,le=[]),le.push(e))}function ge(){var e;return ue++,e=function(){var e,t,n,i,r,a;if(ue++,e=re,(t=_e())!==s){for(n=[],i=re,r=ye(),(a=_e())!==s?i=r=[r,a]:(re=i,i=s);i!==s;)n.push(i),i=re,r=ye(),(a=_e())!==s?i=r=[r,a]:(re=i,i=s);ae=e,e=q(t,n)}else re=e,e=s;ue--,e===s&&(t=s,0===ue&&fe(E));return e}(),ue--,e===s&&0===ue&&fe(C),e}function _e(){var e;return ue++,(e=function(){var e,n,i,r,a,o,l,u,c,m,p,f;ue++,e=re,ye(),t.substr(re,7)===d?(n=d,re+=7):(n=s,0===ue&&fe(T));n!==s?(ye(),(i=be())!==s?(ve(),(r=be())!==s?(ve(),(a=be())!==s?(ve(),(o=be())!==s?(ve(),(l=be())!==s?(ve(),(u=be())!==s?(ve(),(c=be())!==s?(ve(),(m=be())!==s?(ve(),(p=be())!==s?(ye(),41===t.charCodeAt(re)?(f=h,re++):(f=s,0===ue&&fe(O)),f!==s?(ye(),ae=e,e=Z(i,r,a,o,l,u,c,m,p)):(re=e,e=s)):(re=e,e=s)):(re=e,e=s)):(re=e,e=s)):(re=e,e=s)):(re=e,e=s)):(re=e,e=s)):(re=e,e=s)):(re=e,e=s)):(re=e,e=s)):(re=e,e=s);ue--,e===s&&0===ue&&fe(I);return e}())===s&&(e=function(){var e,n,i,r,a;ue++,e=re,ye(),t.substr(re,10)===m?(n=m,re+=10):(n=s,0===ue&&fe(A));n!==s?(ye(),(i=be())!==s?(ve(),(r=be())===s&&(r=null),ye(),41===t.charCodeAt(re)?(a=h,re++):(a=s,0===ue&&fe(O)),a!==s?(ye(),ae=e,e=K(i,r)):(re=e,e=s)):(re=e,e=s)):(re=e,e=s);ue--,e===s&&0===ue&&fe(R);return e}())===s&&(e=function(){var e,n,i,r,a;ue++,e=re,ye(),t.substr(re,6)===p?(n=p,re+=6):(n=s,0===ue&&fe(P));n!==s?(ye(),(i=be())!==s?(ve(),(r=be())===s&&(r=null),ye(),41===t.charCodeAt(re)?(a=h,re++):(a=s,0===ue&&fe(O)),a!==s?(ye(),ae=e,e=Q(i,r)):(re=e,e=s)):(re=e,e=s)):(re=e,e=s);ue--,e===s&&0===ue&&fe(L);return e}())===s&&(e=function(){var e,n,i,r,a;ue++,e=re,ye(),t.substr(re,7)===f?(n=f,re+=7):(n=s,0===ue&&fe(D));n!==s?(ye(),(i=be())!==s?(r=function(){var e,t,n;ue++,e=re,ve(),t=be(),t!==s?(ve(),(n=be())!==s?(ae=e,e=ee(t,n)):(re=e,e=s)):(re=e,e=s);ue--,e===s&&0===ue&&fe(N);return e}(),r===s&&(r=null),ye(),41===t.charCodeAt(re)?(a=h,re++):(a=s,0===ue&&fe(O)),a!==s?(ye(),ae=e,e=J(i,r)):(re=e,e=s)):(re=e,e=s)):(re=e,e=s);ue--,e===s&&0===ue&&fe(M);return e}())===s&&(e=function(){var e,n,i,r;ue++,e=re,ye(),t.substr(re,6)===g?(n=g,re+=6):(n=s,0===ue&&fe(B));n!==s?(ye(),(i=be())!==s?(ye(),41===t.charCodeAt(re)?(r=h,re++):(r=s,0===ue&&fe(O)),r!==s?(ye(),ae=e,e=te(i)):(re=e,e=s)):(re=e,e=s)):(re=e,e=s);ue--,e===s&&0===ue&&fe(F);return e}())===s&&(e=function(){var e,n,i,r;ue++,e=re,ye(),t.substr(re,6)===_?(n=_,re+=6):(n=s,0===ue&&fe(V));n!==s?(ye(),(i=be())!==s?(ye(),41===t.charCodeAt(re)?(r=h,re++):(r=s,0===ue&&fe(O)),r!==s?(ye(),ae=e,e=ne(i)):(re=e,e=s)):(re=e,e=s)):(re=e,e=s);ue--,e===s&&0===ue&&fe(j);return e}()),ue--,e===s&&0===ue&&fe(x),e}function ve(){var e,n;for(ue++,e=[],n=t.charAt(re),b.test(n)?re++:(n=s,0===ue&&fe(z));n!==s;)e.push(n),n=t.charAt(re),b.test(n)?re++:(n=s,0===ue&&fe(z));return ue--,n=s,0===ue&&fe(H),e}function ye(){var e,n;for(ue++,e=[],n=t.charAt(re),w.test(n)?re++:(n=s,0===ue&&fe(G));n!==s;)e.push(n),n=t.charAt(re),w.test(n)?re++:(n=s,0===ue&&fe(G));return ue--,n=s,0===ue&&fe(U),e}function be(){var e,n,i,r,a,o,l,u;for(e=re,n=t.charAt(re),S.test(n)?re++:(n=s,0===ue&&fe(W)),n===s&&(n=null),i=re,r=[],a=t.charAt(re),k.test(a)?re++:(a=s,0===ue&&fe(Y));a!==s;)r.push(a),a=t.charAt(re),k.test(a)?re++:(a=s,0===ue&&fe(Y));if(46===t.charCodeAt(re)?(a=v,re++):(a=s,0===ue&&fe($)),a!==s){if(o=[],l=t.charAt(re),k.test(l)?re++:(l=s,0===ue&&fe(Y)),l!==s)for(;l!==s;)o.push(l),l=t.charAt(re),k.test(l)?re++:(l=s,0===ue&&fe(Y));else o=s;o!==s?i=r=[r,a,o]:(re=i,i=s)}else re=i,i=s;if(i===s)if(i=[],r=t.charAt(re),k.test(r)?re++:(r=s,0===ue&&fe(Y)),r!==s)for(;r!==s;)i.push(r),r=t.charAt(re),k.test(r)?re++:(r=s,0===ue&&fe(Y));else i=s;if(i!==s){if(r=re,101===t.charCodeAt(re)?(a=y,re++):(a=s,0===ue&&fe(X)),a!==s){if(o=t.charAt(re),S.test(o)?re++:(o=s,0===ue&&fe(W)),o===s&&(o=null),l=[],u=t.charAt(re),k.test(u)?re++:(u=s,0===ue&&fe(Y)),u!==s)for(;u!==s;)l.push(u),u=t.charAt(re),k.test(u)?re++:(u=s,0===ue&&fe(Y));else l=s;l!==s?r=a=[a,o,l]:(re=r,r=s)}else re=r,r=s;r===s&&(r=null),ae=e,e=ie()}else re=e,e=s;return e}if(i=c(),n.peg$library)return{peg$result:i,peg$currPos:re,peg$FAILED:s,peg$maxFailExpected:le,peg$maxFailPos:se};if(i!==s&&re===t.length)return i;throw i!==s&&re<t.length&&fe({type:"end"}),r=le,a=se<t.length?t.charAt(se):null,o=se<t.length?pe(se,se+1):pe(se,se),new e(e.buildMessage(r,a),r,a,o)}}}();var uZ=function(){if(oZ)return aZ;oZ=1;const e=[];return aZ={registerAsset:function(t){return e.push(t)},getAssetByID:function(t){return e[t-1]}}}();const cZ=/^(data:image\/svg\+xml;utf8,)(.*)/;const dZ=(e,t=e.props)=>{const{transform:n,origin:i,originX:r,originY:a,fontFamily:o,fontSize:s,fontWeight:l,fontStyle:u,style:c,forwardedRef:d,gradientTransform:h,patternTransform:m,onPress:p,...f}=t,g={...eZ(t)?{onStartShouldSetResponder:e.touchableHandleStartShouldSetResponder,onResponderTerminationRequest:e.touchableHandleResponderTerminationRequest,onResponderGrant:e.touchableHandleResponderGrant,onResponderMove:e.touchableHandleResponderMove,onResponderRelease:e.touchableHandleResponderRelease,onResponderTerminate:e.touchableHandleResponderTerminate}:null,...f};null!=i?g["transform-origin"]=i.toString().replace(","," "):null==r&&null==a||(g["transform-origin"]=`${r||0} ${a||0}`);const _=sZ(n,t);_&&(g.transform=_);const v=sZ(h);v&&(g.gradientTransform=v);const y=sZ(m);y&&(g.patternTransform=y),g.ref=t=>{e.elementRef.current=t,"function"==typeof d?d(t):d&&(d.current=t)};const b={};var w,S,k;(null!=o&&(b.fontFamily=o),null!=s&&(b.fontSize=s),null!=l&&(b.fontWeight=l),null!=u&&(b.fontStyle=u),g.style=(S=b,(w=c)?Ei?[w,S]:w[Symbol.iterator]?Object.assign({},...w,S):Object.assign({},w,S):S),null!==p&&(g.onClick=t.onPress),null!==t.href&&void 0!==t.href)&&(g.href=null===(k=function(e){let t={};if("number"==typeof e){const n=uZ.getAssetByID(e);if(null==n)throw new Error(`Image: asset with ID "${e}" could not be found. Please check the image source or packager.`);if(t={width:n.width,height:n.height,scale:n.scales[0]},n.scales.length>1){const e=Ws.get();t.scale=n.scales.reduce((t,n)=>Math.abs(n-e)<Math.abs(t-e)?n:t)}const i=1!==t.scale?`@${t.scale}x`:"";t.uri=n?`${n.httpServerLocation}/${n.name}${i}.${n.type}`:""}else"string"==typeof e?t.uri=e:e&&!Array.isArray(e)&&"string"==typeof e.uri&&(t.uri=e.uri);if(t.uri){var n;const e=null===(n=t)||void 0===n||null===(n=n.uri)||void 0===n?void 0:n.match(cZ);if(e){const[,n,i]=e,r=encodeURIComponent(i);return t.uri=`${n}${r}`,t}}return t}(t.href))||void 0===k?void 0:k.uri);return g};function hZ(e){return`rgba(${e>>16&255},${e>>8&255},${255&e},${((e>>24&255)/255).toFixed(2)})`}const mZ={top:20,left:20,right:20,bottom:30},{Mixin:pZ}=im,{touchableHandleStartShouldSetResponder:fZ,touchableHandleResponderTerminationRequest:gZ,touchableHandleResponderGrant:_Z,touchableHandleResponderMove:vZ,touchableHandleResponderRelease:yZ,touchableHandleResponderTerminate:bZ,touchableGetInitialState:wZ}=pZ,SZ={...pZ,touchableHandleStartShouldSetResponder(e){const{onStartShouldSetResponder:t}=this.props;return t?t(e):fZ.call(this,e)},touchableHandleResponderTerminationRequest(e){const{onResponderTerminationRequest:t}=this.props;return t?t(e):gZ.call(this,e)},touchableHandleResponderGrant(e){const{onResponderGrant:t}=this.props;return t?t(e):_Z.call(this,e)},touchableHandleResponderMove(e){const{onResponderMove:t}=this.props;return t?t(e):vZ.call(this,e)},touchableHandleResponderRelease(e){const{onResponderRelease:t}=this.props;return t?t(e):yZ.call(this,e)},touchableHandleResponderTerminate(e){const{onResponderTerminate:t}=this.props;return t?t(e):bZ.call(this,e)},touchableHandlePress(e){const{onPress:t}=this.props;t&&t(e)},touchableHandleActivePressIn(e){const{onPressIn:t}=this.props;t&&t(e)},touchableHandleActivePressOut(e){const{onPressOut:t}=this.props;t&&t(e)},touchableHandleLongPress(e){const{onLongPress:t}=this.props;t&&t(e)},touchableGetPressRectOffset(){const{pressRetentionOffset:e}=this.props;return e||mZ},touchableGetHitSlop(){const{hitSlop:e}=this.props;return e},touchableGetHighlightDelayMS(){const{delayPressIn:e}=this.props;return e||0},touchableGetLongPressDelayMS(){const{delayLongPress:e}=this.props;return 0===e?0:e||500},touchableGetPressOutDelayMS(){const{delayPressOut:e}=this.props;return e||0}},kZ=Object.keys(SZ),CZ=kZ.map(e=>SZ[e]),EZ=kZ.length;class xZ extends D.Component{prepareProps(e){return e}elementRef=D.createRef();lastMergedProps={};setNativeProps(e){const t=Object.assign({},this.props,this.lastMergedProps,e.style);this.lastMergedProps=t;const n=dZ(this,this.prepareProps(t)),i=this.elementRef.current;if(i)for(const r of Object.keys(n)){const e=n[r];switch(r){case"ref":case"children":break;case"style":for(const e of[].concat(n.style??[]))Object.assign(i.style,e);break;case"fill":if(e&&"object"==typeof e){const t=e;i.setAttribute("fill",hZ(t.payload))}break;case"stroke":if(e&&"object"==typeof e){const t=e;i.setAttribute("stroke",hZ(t.payload))}break;default:i.setAttribute(Kq(r),e)}}}constructor(e){super(e),eZ(e)&&(e=>{for(let t=0;t<EZ;t++){const n=kZ[t],i=CZ[t];e[n]="function"==typeof i?i.bind(e):i}e.state=wZ()})(this),this._remeasureMetricsOnActivation=Jq.bind(this)}render(){if(!this.tag)throw new Error("When extending `WebShape` you need to overwrite either `tag` or `render`!");return this.lastMergedProps={},Ui(this.tag,dZ(this,this.prepareProps(this.props)))}}class IZ extends xZ{tag="circle"}class TZ extends xZ{tag="clipPath"}class OZ extends xZ{tag="defs"}class RZ extends xZ{tag="ellipse"}class AZ extends xZ{tag="feBlend"}class LZ extends xZ{tag="feColorMatrix"}class PZ extends xZ{tag="feComponentTransfer"}class MZ extends xZ{tag="feComposite"}class DZ extends xZ{tag="feConvolveMatrix"}class NZ extends xZ{tag="feDiffuseLighting"}class FZ extends xZ{tag="feDisplacementMap"}class BZ extends xZ{tag="feDistantLight"}class jZ extends xZ{tag="feDropShadow"}class VZ extends xZ{tag="feFlood"}class HZ extends xZ{tag="feGaussianBlur"}class zZ extends xZ{tag="feImage"}class UZ extends xZ{tag="feMerge"}class GZ extends xZ{tag="feMergeNode"}class WZ extends xZ{tag="feMorphology"}class YZ extends xZ{tag="feOffset"}class $Z extends xZ{tag="fePointLight"}class XZ extends xZ{tag="feSpecularLighting"}class qZ extends xZ{tag="feSpotLight"}class ZZ extends xZ{tag="feTile"}class KZ extends xZ{tag="feTurbulence"}class QZ extends xZ{tag="filter"}class JZ extends xZ{tag="foreignObject"}class eK extends xZ{tag="g";prepareProps(e){const{x:t,y:n,...i}=e;return!t&&!n||i.translate||(i.translate=`${t||0}, ${n||0}`),i}}class tK extends xZ{tag="image"}class nK extends xZ{tag="line"}class iK extends xZ{tag="linearGradient"}class rK extends xZ{tag="marker"}class aK extends xZ{tag="mask"}class oK extends xZ{tag="path"}class sK extends xZ{tag="pattern"}class lK extends xZ{tag="polygon"}class uK extends xZ{tag="polyline"}class cK extends xZ{tag="radialGradient"}class dK extends xZ{tag="rect"}class hK extends xZ{tag="stop"}class mK extends xZ{tag="svg";toDataURL(e,t={}){const n=this.elementRef.current;if(null===n)return;const i=Qq(n),r=Number(t.width)||i.width,a=Number(t.height)||i.height,o=document.createElementNS("http://www.w3.org/2000/svg","svg");o.setAttribute("viewBox",`0 0 ${i.width} ${i.height}`),o.setAttribute("width",String(r)),o.setAttribute("height",String(a)),o.appendChild(n.cloneNode(!0));const s=new window.Image;var l;s.onload=()=>{const t=document.createElement("canvas");t.width=r,t.height=a;const n=t.getContext("2d");null==n||n.drawImage(s,0,0),e(t.toDataURL().replace("data:image/png;base64,",""))},s.src=`data:image/svg+xml;utf8,${l=(new window.XMLSerializer).serializeToString(o),l.replace("<svg",~l.indexOf("xmlns")?"<svg":'<svg xmlns="http://www.w3.org/2000/svg"').replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/{/g,"%7B").replace(/}/g,"%7D").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}`}}let pK=class extends xZ{tag="symbol"};class fK extends xZ{tag="tspan"}let gK=class extends xZ{tag="text"};class _K extends xZ{tag="textPath"}class vK extends xZ{tag="use"}const yK={circle:IZ,clipPath:TZ,defs:OZ,ellipse:RZ,filter:QZ,feBlend:AZ,feColorMatrix:LZ,feComponentTransfer:PZ,feComposite:MZ,feConvolveMatrix:DZ,feDiffuseLighting:NZ,feDisplacementMap:FZ,feDistantLight:BZ,feDropShadow:jZ,feFlood:VZ,feGaussianBlur:HZ,feImage:zZ,feMerge:UZ,feMergeNode:GZ,feMorphology:WZ,feOffset:YZ,fePointLight:$Z,feSpecularLighting:XZ,feSpotLight:qZ,feTile:ZZ,feTurbulence:KZ,foreignObject:JZ,g:eK,image:tK,line:nK,linearGradient:iK,marker:rK,mask:aK,path:oK,pattern:sK,polygon:lK,polyline:uK,radialGradient:cK,rect:dK,stop:hK,svg:mK,symbol:pK,text:gK,textPath:_K,tspan:fK,use:vK};function bK(){return bK=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},bK.apply(null,arguments)}function wK(){return null}function SK({ast:e,override:t}){if(!e)return null;const{props:n,children:i}=e,r=yK.svg;return M.createElement(r,bK({},n,t),i)}const kK=console.error.bind(console);function CK(e){const{onError:t=kK,xml:n,override:i,fallback:r}=e;try{const t=M.useMemo(()=>null!==n?NK(n):null,[n]);return M.createElement(SK,{ast:t,override:i||e})}catch(a){return t(a),r??null}}class EK extends M.Component{state={ast:null};componentDidMount(){this.parse(this.props.xml)}componentDidUpdate(e){const{xml:t}=this.props;t!==e.xml&&this.parse(t)}parse(t){const{onError:n=kK}=this.props;try{this.setState({ast:t?NK(t):null})}catch(e){const i=e;n({...i,message:`[RNSVG] Couldn't parse SVG, reason: ${i.message}`})}}render(){const{props:e,state:{ast:t}}=this;return M.createElement(SK,{ast:t,override:e.override||e})}}class xK extends M.Component{state={xml:null};componentDidMount(){this.fetch(this.props.uri)}componentDidUpdate(e){const{uri:t}=this.props;t!==e.uri&&this.fetch(t)}async fetch(t){try{this.setState({xml:t?await qq(t):null})}catch(e){console.error(e)}}render(){const{props:e,state:{xml:t}}=this;return M.createElement(EK,{xml:t,override:e,onError:e.onError})}}const IK=(e,t)=>t.toUpperCase(),TK=e=>e.replace(/[:-]([a-z])/g,IK);function OK(e,t){if("object"==typeof e){const{Tag:n,props:i,children:r}=e;return null!=i&&i.class&&(i.className=i.class,delete i.class),M.createElement(n,bK({key:t},i),r.map(OK))}return e}function RK(e,t){let n="";for(;t--;)n+=e;return n}const AK=e=>RK(" ",e.length);const LK=/[a-zA-Z0-9:_-]/,PK=/<!--/,MK=/[\s\t\r\n]/,DK=/['"]/;function NK(e,t){const n=e.length;let i,r=null,a=function(){for(;_+1<n&&("<"!==e[_]||!LK.test(e[_+1])&&!PK.test(e.slice(_,_+4)));)_++;return u()},o=null;const s=[];function l(t){const{line:n,column:i,snippet:r}=function(e,t){const n=e.split("\n"),i=n.length;let r=t,a=0;for(;a<i;a++){const{length:e}=n[a];if(!(r>=e))break;r-=e}const o=e.slice(0,t).replace(/^\t+/,AK),s=/(^|\n).*$/.exec(o),l=s&&s[0]||"",u=e.slice(t),c=/.*(\n|$)/.exec(u);return{line:a,column:r,snippet:`${l}${c&&c[0]}\n${RK(" ",l.length)}^`}}(e,_);throw new Error(`${t} (${n}:${i}). If this is valid SVG, it's probably a bug. Please raise an issue\n\n${r}`)}function u(){let t,i="";for(;_<n&&"<"!==(t=e[_]);)i+=t,_+=1;return/\S/.test(i)&&o.push(i),"<"===e[_]?c:u}function c(){const t=e[_];if("?"===t)return u;if("!"===t){const t=_+1;if("--"===e.slice(t,_+3))return d;const n=_+8;if("[CDATA["===e.slice(t,n))return h;if(/doctype/i.test(e.slice(t,n)))return u}if("/"===t)return m;const a=p(),c={},v={tag:a,props:c,children:[],parent:r,Tag:yK[a]||wK};r?o.push(v):i=v,function(t){for(;_<n;){if(!MK.test(e[_]))return;g();const n=p();if(!n)return;let i=!0;g(),"="===e[_]&&(_+=1,g(),i=f(),"id"===n||isNaN(+i)||""===i.trim()||(i=+i)),t[TK(n)]=i}}(c);const{style:y}=c;"string"==typeof y&&(v.styles=y,c.style=function(e){const t={},n=e.split(";").filter(e=>e.trim()),{length:i}=n;for(let r=0;r<i;r++){const e=n[r];if(0!==e.length){const n=e.split(":"),i=n[0],r=n[1];t[TK(i.trim())]=r.trim()}}return t}(y));let b=!1;return"/"===e[_]&&(_+=1,b=!0),">"!==e[_]&&l("Expected >"),b||(r=v,({children:o}=v),s.push(v)),u}function d(){const t=e.indexOf("--\x3e",_);return~t||l("expected --\x3e"),_=t+2,u}function h(){const t=e.indexOf("]]>",_);return~t||l("expected ]]>"),o.push(e.slice(_+7,t)),_=t+2,u}function m(){const t=p();return t||l("Expected tag name"),r&&t!==r.tag&&l(`Expected closing tag </${t}> to match opening tag <${r.tag}>`),g(),">"!==e[_]&&l("Expected >"),s.pop(),r=s[s.length-1],r&&({children:o}=r),u}function p(){let t,i="";for(;_<n&&LK.test(t=e[_]);)i+=t,_+=1;return i}function f(){return DK.test(e[_])?function(){const t=e[_++];let i="",r=!1;for(;_<n;){const n=e[_++];if(n===t&&!r)return i;"\\"!==n||r||(r=!0),i+=r?`\\${n}`:n,r=!1}return i}():function(){let t="";do{const n=e[_];if(" "===n||">"===n||"/"===n)return t;t+=n,_+=1}while(_<n);return t}()}function g(){for(;_<n&&MK.test(e[_]);)_+=1}let _=0;for(;_<n;)a||l("Unexpected character"),a=a(),_+=1;if(a!==u&&l("Unexpected end of input"),i){const e=(t?t(i):i)||i,n=e.children.map(OK),r=e;return r.children=n,r}return null}function FK(e,t){throw Error(`[react-native-svg] You are trying to import a ${t} \`${e}\` that has been moved to a sub-package. Change your import from \`react-native-svg\` to \`react-native-svg/css\`.`)}const BK=Object.freeze(Object.defineProperty({__proto__:null,Circle:IZ,ClipPath:TZ,Defs:OZ,Ellipse:RZ,FeBlend:AZ,FeColorMatrix:LZ,FeComponentTransfer:PZ,FeComposite:MZ,FeConvolveMatrix:DZ,FeDiffuseLighting:NZ,FeDisplacementMap:FZ,FeDistantLight:BZ,FeDropShadow:jZ,FeFlood:VZ,FeFuncA:class extends xZ{tag="feFuncA"},FeFuncB:class extends xZ{tag="feFuncB"},FeFuncG:class extends xZ{tag="feFuncG"},FeFuncR:class extends xZ{tag="feFuncR"},FeGaussianBlur:HZ,FeImage:zZ,FeMerge:UZ,FeMergeNode:GZ,FeMorphology:WZ,FeOffset:YZ,FePointLight:$Z,FeSpecularLighting:XZ,FeSpotLight:qZ,FeTile:ZZ,FeTurbulence:KZ,Filter:QZ,ForeignObject:JZ,G:eK,Image:tK,Line:nK,LinearGradient:iK,LocalSvg:function(){FK("LocalSvg","component")},Marker:rK,Mask:aK,Path:oK,Pattern:sK,Polygon:lK,Polyline:uK,RadialGradient:cK,Rect:dK,Stop:hK,Svg:mK,SvgAst:SK,SvgCss:function(){FK("SvgCss","component")},SvgCssUri:function(){FK("SvgCssUri","component")},SvgFromUri:xK,SvgFromXml:EK,SvgUri:function(e){const{onError:t=kK,uri:n,onLoad:i,fallback:r}=e,[a,o]=M.useState(null),[s,l]=M.useState(!1);return M.useEffect(()=>{n?qq(n).then(e=>{o(e),s&&l(!1),null==i||i()}).catch(e=>{t(e),l(!0)}):o(null)},[t,n,i]),s?r??null:M.createElement(CK,{xml:a,override:e,fallback:r})},SvgWithCss:function(){FK("SvgWithCss","component")},SvgWithCssUri:function(){FK("SvgWithCssUri","component")},SvgXml:CK,Symbol:pK,TSpan:fK,Text:gK,TextPath:_K,Use:vK,WithLocalSvg:function(){FK("WithLocalSvg","component")},camelCase:TK,default:mK,fetchText:qq,inlineStyles:function(){FK("inlineStyles","function")},loadLocalRawResource:function(){FK("loadLocalRawResource","function")},parse:NK},Symbol.toStringTag,{value:"Module"})),jK=e=>M.createElement(mK,{width:28,height:28,viewBox:"0 0 28 28",fill:"none",...e},M.createElement(oK,{fillRule:"evenodd",clipRule:"evenodd",d:"M14.7447 9.05001C15.2398 9.38089 15.822 9.55749 16.4176 9.55749C17.2159 9.55657 17.9813 9.23902 18.5457 8.67452C19.1103 8.11002 19.4278 7.34465 19.4288 6.54632C19.4288 5.95077 19.2521 5.3686 18.9213 4.8734C18.5904 4.37822 18.1201 3.99228 17.5699 3.76437C17.0197 3.53646 16.4142 3.47683 15.8301 3.59301C15.246 3.7092 14.7095 3.99599 14.2883 4.41711C13.8673 4.83823 13.5805 5.37477 13.4643 5.95887C13.3481 6.54299 13.4077 7.14843 13.6356 7.69865C13.8635 8.24886 14.2495 8.71915 14.7447 9.05001ZM15.7169 5.4977C15.9243 5.35912 16.1682 5.28516 16.4176 5.28516C16.752 5.28547 17.0726 5.41843 17.309 5.65488C17.5454 5.89133 17.6784 6.21193 17.6788 6.54632C17.6788 6.79576 17.6048 7.03959 17.4662 7.24699C17.3276 7.45439 17.1307 7.61604 16.9002 7.7115C16.6697 7.80694 16.4162 7.83192 16.1715 7.78326C15.9269 7.7346 15.7022 7.61448 15.5258 7.4381C15.3494 7.26172 15.2293 7.03701 15.1806 6.79236C15.1319 6.54772 15.1569 6.29415 15.2524 6.06369C15.3479 5.83324 15.5095 5.63628 15.7169 5.4977ZM13.2683 22.7677C13.3935 22.8332 13.5327 22.8674 13.674 22.8674C13.8507 22.8669 14.023 22.8129 14.1685 22.7126C14.3139 22.6121 14.4254 22.47 14.4883 22.3051L15.5021 19.6031C15.8009 18.8176 15.78 17.9462 15.444 17.1758C15.1079 16.4056 14.4834 15.7976 13.7043 15.4824L12.925 15.1616C12.7078 15.073 12.5149 14.9342 12.362 14.7564C12.2091 14.5786 12.1007 14.367 12.0459 14.139C11.9909 13.911 11.9909 13.6733 12.0461 13.4453C12.1012 13.2174 12.2097 13.0059 12.3626 12.8282C12.6165 12.5344 12.9754 12.3518 13.3622 12.3195C13.7492 12.2872 14.1334 12.4078 14.4323 12.6556L15.6258 13.6507C16.206 14.1328 16.9365 14.3969 17.6908 14.3974H21.0741C21.3063 14.3974 21.5288 14.3051 21.6929 14.1411C21.857 13.9769 21.9491 13.7545 21.9491 13.5224C21.9491 13.2902 21.857 13.0678 21.6929 12.9036C21.5288 12.7396 21.3063 12.6474 21.0741 12.6474H17.6908C17.3453 12.6468 17.0107 12.526 16.7446 12.3055L15.5523 11.3115C14.8994 10.7709 14.0607 10.5077 13.2159 10.5783C12.3713 10.649 11.5878 11.0479 11.0338 11.6895C10.7016 12.0775 10.4661 12.5388 10.3467 13.0354C10.2274 13.5322 10.2275 14.0501 10.3472 14.5466C10.4669 15.0433 10.7027 15.5045 11.0352 15.8921C11.3677 16.2799 11.7875 16.5833 12.26 16.7774L13.0475 17.0982C13.4043 17.242 13.6904 17.5201 13.8443 17.8727C13.9981 18.2252 14.0074 18.6241 13.87 18.9836L12.8573 21.6856C12.8072 21.8176 12.7901 21.96 12.8071 22.1002C12.8243 22.2406 12.8751 22.3745 12.9555 22.4908C13.0358 22.607 13.1431 22.7021 13.2683 22.7677ZM7.24495 26.2852C6.43735 26.2852 5.64787 26.0456 4.97638 25.5969C4.30488 25.1484 3.78151 24.5105 3.47245 23.7645C3.16339 23.0184 3.08253 22.1973 3.24008 21.4052C3.39764 20.6132 3.78654 19.8855 4.35761 19.3144C4.92867 18.7434 5.65625 18.3545 6.44834 18.197C7.24042 18.0394 8.06145 18.1202 8.80758 18.4293C9.55371 18.7383 10.1914 19.2617 10.6401 19.9332C11.0888 20.6048 11.3283 21.3943 11.3283 22.2018C11.3283 23.2848 10.8981 24.3234 10.1323 25.0892C9.36653 25.855 8.32792 26.2852 7.24495 26.2852ZM7.24495 19.8685C6.78346 19.8685 6.33235 20.0053 5.94863 20.2618C5.56491 20.5181 5.26584 20.8826 5.08924 21.3089C4.91263 21.7353 4.86642 22.2044 4.95645 22.6571C5.04648 23.1096 5.26872 23.5254 5.59505 23.8517C5.92136 24.178 6.33713 24.4003 6.78975 24.4904C7.24237 24.5803 7.71152 24.5341 8.13789 24.3576C8.56425 24.181 8.92866 23.8818 9.18506 23.4981C9.44144 23.1144 9.57828 22.6634 9.57828 22.2018C9.57612 21.5844 9.32935 20.993 8.89199 20.5572C8.45464 20.1213 7.86238 19.8767 7.24495 19.8767V19.8685ZM18.5024 25.5969C19.174 26.0456 19.9633 26.2852 20.771 26.2852C21.8539 26.2852 22.8926 25.855 23.6584 25.0892C24.4241 24.3234 24.8544 23.2848 24.8544 22.2018C24.8544 21.3943 24.6148 20.6048 24.1661 19.9332C23.7174 19.2617 23.0797 18.7383 22.3337 18.4293C21.5875 18.1202 20.7665 18.0394 19.9744 18.197C19.1823 18.3545 18.4547 18.7434 17.8836 19.3144C17.3126 19.8855 16.9237 20.6132 16.7661 21.4052C16.6086 22.1973 16.6894 23.0184 16.9985 23.7645C17.3075 24.5105 17.8309 25.1484 18.5024 25.5969ZM19.4746 20.2618C19.8583 20.0053 20.3095 19.8685 20.771 19.8685V19.8767C21.3884 19.8767 21.9806 20.1213 22.418 20.5572C22.8554 20.993 23.1021 21.5844 23.1044 22.2018C23.1044 22.6634 22.9675 23.1144 22.7111 23.4981C22.4548 23.8818 22.0903 24.181 21.6639 24.3576C21.2376 24.5341 20.7685 24.5803 20.3158 24.4904C19.8631 24.4003 19.4474 24.178 19.1211 23.8517C18.7948 23.5254 18.5726 23.1096 18.4825 22.6571C18.3924 22.2044 18.4386 21.7353 18.6153 21.3089C18.7919 20.8826 19.0909 20.5181 19.4746 20.2618Z",fill:e?.color??wL.iconNavigationBarInactive})),VK=e=>M.createElement(mK,{width:24,height:24,viewBox:"0 0 24 24",fill:"none",...e},M.createElement(oK,{fillRule:"evenodd",clipRule:"evenodd",d:"M16.3935 5.69575C16.3935 6.98075 15.3475 8.02675 14.0625 8.02675C12.7765 8.02675 11.7305 6.98075 11.7305 5.69575C11.7305 4.41075 12.7765 3.36475 14.0625 3.36475C15.3475 3.36475 16.3935 4.41075 16.3935 5.69575ZM11.1694 12.8454L11.8384 13.1213C13.3544 13.7403 14.0934 15.4314 13.5184 16.9704L12.6484 19.2873C12.4984 19.6883 12.1174 19.9363 11.7124 19.9363C11.5954 19.9363 11.4764 19.9153 11.3604 19.8713C10.8434 19.6783 10.5824 19.1014 10.7764 18.5844L11.6454 16.2683C11.8384 15.7503 11.5904 15.1803 11.0794 14.9713L10.4094 14.6953C9.50536 14.3263 8.85336 13.5663 8.62336 12.6143C8.39236 11.6603 8.62636 10.6854 9.26336 9.94138C10.3334 8.69538 12.2274 8.53638 13.4864 9.58838L14.5084 10.4394C14.6914 10.5914 14.9224 10.6744 15.1594 10.6744H18.0604C18.6124 10.6744 19.0604 11.1223 19.0604 11.6743C19.0604 12.2263 18.6124 12.6743 18.0604 12.6743H15.1594C14.4564 12.6743 13.7704 12.4263 13.2294 11.9763L12.2054 11.1243C11.7804 10.7694 11.1424 10.8234 10.7824 11.2433C10.5674 11.4933 10.4894 11.8223 10.5674 12.1433C10.6444 12.4643 10.8644 12.7204 11.1694 12.8454ZM6.20457 21.115C5.10257 21.115 4.20557 20.219 4.20557 19.117C4.20557 18.015 5.10257 17.118 6.20457 17.118C7.30657 17.118 8.20257 18.015 8.20257 19.117C8.20257 20.219 7.30657 21.115 6.20457 21.115ZM6.20457 15.618C4.27557 15.618 2.70557 17.188 2.70557 19.117C2.70557 21.046 4.27557 22.615 6.20457 22.615C8.13357 22.615 9.70257 21.046 9.70257 19.117C9.70257 17.188 8.13357 15.618 6.20457 15.618ZM15.7974 19.117C15.7974 20.219 16.6944 21.115 17.7964 21.115C18.8984 21.115 19.7944 20.219 19.7944 19.117C19.7944 18.015 18.8984 17.118 17.7964 17.118C16.6944 17.118 15.7974 18.015 15.7974 19.117ZM14.2974 19.117C14.2974 17.188 15.8674 15.618 17.7964 15.618C19.7254 15.618 21.2944 17.188 21.2944 19.117C21.2944 21.046 19.7254 22.615 17.7964 22.615C15.8674 22.615 14.2974 21.046 14.2974 19.117Z",fill:e?.color??wL.iconNavigationBarActive})),HK=e=>M.createElement(mK,{width:24,height:24,viewBox:"0 0 24 24",fill:"none",...e},M.createElement(oK,{d:"M11.98 3C12.5309 3 12.9778 3.44676 12.9778 3.99778V10.9822H19.9622C20.5131 10.9822 20.96 11.429 20.96 11.98C20.96 12.2815 20.8262 12.5517 20.615 12.7345C20.4404 12.886 20.2117 12.9778 19.9622 12.9778H12.9778V19.9622C12.9778 20.5133 12.5309 20.96 11.98 20.96C11.4291 20.96 10.9822 20.5133 10.9822 19.9622V12.9778H3.99778C3.44692 12.9778 3 12.531 3 11.98C3 11.429 3.44692 10.9822 3.99778 10.9822H10.9822V3.99778C10.9822 3.44676 11.4291 3 11.98 3Z",fill:e?.color??wL.icon,fillOpacity:.95})),zK=e=>M.createElement(mK,{width:24,height:24,viewBox:"0 0 24 24",fill:"none",...e},M.createElement(oK,{d:"M9.26216 10.0642C9.43989 10.4341 9.28071 10.884 8.90669 11.0642C8.27046 11.364 7.79682 12.0142 7.70112 12.7041C7.64448 13.114 7.26606 13.404 6.85591 13.3442C6.44526 13.2942 6.15864 12.9141 6.21479 12.5041C6.37983 11.3039 7.17085 10.2241 8.26264 9.70412C8.63667 9.52419 9.08442 9.68411 9.26216 10.0642Z",fill:e?.color??wL.iconNavigationBarInactive}),M.createElement(oK,{fillRule:"evenodd",clipRule:"evenodd",d:"M11.4458 7.23465C11.3667 6.69339 11.1977 6.19364 10.9272 5.7742C10.5483 5.19413 9.93601 4.72415 8.93992 4.53421C8.53318 4.45413 8.26707 4.05399 8.34617 3.65409C8.42478 3.24417 8.81883 2.97415 9.22508 3.05423C10.602 3.32401 11.5732 4.0242 12.1841 4.95413C12.6377 5.65262 12.8725 6.44925 12.9595 7.2432C13.4619 7.19974 13.9643 7.11014 14.4673 6.97415C15.1391 6.79422 16.7549 6.53421 18.2949 7.22415C19.9219 7.95413 21.2529 9.63407 21.4541 12.894L21.4555 12.9341C21.48 15.9941 20.5049 18.3039 19.3813 19.884C19.0459 20.3518 18.6968 20.7549 18.3554 21.093C18.1274 21.3188 17.9033 21.5159 17.6894 21.6841C17.4228 21.894 17.165 22.0642 16.9292 22.1941C16.7138 22.3013 16.4653 22.4082 16.2207 22.4416C15.2471 22.6555 14.3613 22.4893 13.6694 22.3042C13.3388 22.2141 12.9721 22.084 12.7471 22.0242C12.4746 21.9441 12.3291 21.9141 12.2495 21.9141C12.1621 21.9141 12.0122 21.9441 11.7431 22.0142C11.6382 22.043 11.4975 22.0854 11.3437 22.1321C11.1777 22.1824 10.9966 22.2373 10.8291 22.2842C10.1328 22.4624 9.24558 22.6306 8.26121 22.4302C8.02244 22.396 7.77976 22.2996 7.56639 22.1841C7.33006 22.0642 7.07225 21.894 6.80564 21.6841C6.27098 21.2642 5.67283 20.6641 5.11375 19.874C3.99119 18.3039 3.01853 15.9941 3.04344 12.9341L3.0449 12.894C3.24607 9.63407 4.57762 7.95413 6.20457 7.22415C7.74461 6.53421 9.35984 6.79422 10.0317 6.97415C10.5039 7.1016 10.9746 7.18851 11.4458 7.23465ZM16.0244 20.9473L16.0307 20.9458C16.0327 20.9453 16.0346 20.9448 16.0366 20.9441C16.0127 20.9541 16.0727 20.9441 16.2295 20.864C16.3711 20.7839 16.5532 20.6741 16.7627 20.5041C17.0688 20.2632 17.4179 19.9368 17.77 19.5137C17.9004 19.3572 18.0312 19.1875 18.1606 19.0041C19.1113 17.6785 19.9717 15.6775 19.9555 12.9714C19.7783 10.1409 18.6846 9.04349 17.6821 8.59427C16.5918 8.10404 15.373 8.28421 14.8574 8.42411C13.1211 8.88407 11.3774 8.88407 9.64109 8.42411C9.12596 8.28421 7.90769 8.10404 6.81736 8.59427C5.8159 9.043 4.72264 10.1385 4.54344 12.9629C4.52537 15.6733 5.38426 17.6772 6.33445 19.0041C6.58494 19.355 6.84129 19.6589 7.08885 19.9165C7.31443 20.1511 7.53269 20.3469 7.7324 20.5041C7.94236 20.6641 8.12498 20.7839 8.26805 20.864C8.37254 20.9172 8.43553 20.9394 8.46092 20.9482C8.4741 20.9529 8.47703 20.9541 8.47117 20.9541H8.53025C9.19432 21.094 9.82908 20.9941 10.4443 20.8342C10.7822 20.7441 11.0141 20.6641 11.3369 20.5742C11.6089 20.4941 11.9355 20.4141 12.2495 20.4141C12.5703 20.4141 12.9038 20.5041 13.1758 20.5842C13.3198 20.6247 13.4482 20.6653 13.5762 20.7058C13.7319 20.7551 13.8872 20.8047 14.0688 20.8542C14.6831 21.0242 15.3032 21.124 15.9409 20.9641C15.957 20.959 15.9731 20.9565 15.9892 20.9539C16.001 20.9521 16.0127 20.9502 16.0244 20.9473Z",fill:e?.color??wL.iconNavigationBarInactive})),UK=e=>M.createElement(mK,{width:24,height:24,viewBox:"0 0 24 24",fill:"none",...e},M.createElement(oK,{fillRule:"evenodd",clipRule:"evenodd",d:"M8.04316 3.60454C8.12202 3.1979 8.51559 2.93219 8.92223 3.01105C10.2992 3.27808 11.2703 3.97422 11.8813 4.91206C12.3804 5.6783 12.6145 6.56644 12.678 7.43902C13.1847 7.39462 13.6915 7.30411 14.1989 7.16747C14.8466 6.99265 16.3988 6.75245 17.8696 7.41069C19.4044 8.09754 20.6958 9.68948 20.892 12.8663C20.8926 12.8761 20.8929 12.886 20.893 12.8958C20.9177 15.8912 19.9638 18.1528 18.8702 19.6843C18.3249 20.4479 17.7434 21.0321 17.2281 21.437C16.9707 21.6392 16.7245 21.8008 16.5023 21.918C16.3043 22.0224 16.091 22.11 15.8887 22.14C14.9514 22.3607 14.0934 22.2028 13.4084 22.0136C13.1979 21.9554 12.9793 21.8866 12.7875 21.8263C12.6801 21.7925 12.5811 21.7613 12.4966 21.7361C12.2263 21.6556 12.0576 21.6208 11.9473 21.6208C11.8313 21.6208 11.6594 21.6545 11.3919 21.7297C11.3049 21.7542 11.2002 21.7855 11.0862 21.8195C10.899 21.8754 10.6868 21.9387 10.4871 21.9917C9.80436 22.1729 8.95309 22.3276 8.01418 22.1412C7.80916 22.1115 7.59125 22.0221 7.38731 21.9141C7.16483 21.7963 6.91848 21.6344 6.6609 21.4319C6.14526 21.0266 5.56418 20.4427 5.01958 19.6798C3.92731 18.1496 2.97639 15.8909 3.00045 12.8959C3.00053 12.886 3.00087 12.8762 3.00148 12.8663C3.19764 9.68942 4.48941 8.09751 6.02425 7.41068C7.49526 6.75242 9.04763 6.99267 9.69485 7.16754C10.1879 7.30029 10.6804 7.3895 11.1727 7.43516C11.1122 6.79573 10.9352 6.2078 10.6244 5.73084C10.2452 5.14868 9.63277 4.67679 8.63665 4.48361C8.23002 4.40475 7.9643 4.01118 8.04316 3.60454ZM8.60309 11.0139C8.97721 10.8361 9.13636 10.3887 8.95857 10.0146C8.78078 9.64044 8.33337 9.48129 7.95925 9.65908C6.86721 10.178 6.07626 11.2571 5.91139 12.4555C5.85494 12.8659 6.14182 13.2443 6.55217 13.3007C6.96252 13.3572 7.34094 13.0703 7.39739 12.66C7.49327 11.963 7.96717 11.3161 8.60309 11.0139Z",fill:e?.color??wL.iconNavigationBarActive})),GK=e=>M.createElement(mK,{width:47,height:56,viewBox:"0 0 47 56",fill:"none",...e},M.createElement(aK,{id:"a",fill:wL.bgBrand},M.createElement(oK,{fillRule:"evenodd",clipRule:"evenodd",d:"M24.762.384L23.5 2.392 22.238.384a2.263 2.263 0 012.524 0zM23.5 5.294l-.476.353c-1.11.83-2.671 2.05-4.452 3.595-3.568 3.096-7.95 7.44-11.389 12.522-3.334 5.412-3.322 12.723-.351 18.76 2.94 5.974 8.685 10.505 16.668 10.505 7.983 0 13.728-4.53 16.668-10.505 2.971-6.037 2.983-13.348-.351-18.76-3.438-5.082-7.821-9.426-11.389-12.522A79.366 79.366 0 0023.5 5.295zM22.238.385L23.5 2.392 24.762.384l.004.004.01.005.029.02.105.072a61.327 61.327 0 011.79 1.29 83.974 83.974 0 014.717 3.808c3.746 3.25 8.474 7.915 12.236 13.488.017.025.035.051.05.078 4.376 7.056 4.208 16.217.605 23.54C40.666 50.086 33.42 55.811 23.5 55.811c-9.92 0-17.166-5.725-20.808-13.124-3.603-7.322-3.771-16.483.604-23.54a2.38 2.38 0 01.05-.077c3.763-5.573 8.49-10.238 12.237-13.488a83.942 83.942 0 014.716-3.809A61.78 61.78 0 0122.09.485l.106-.072.03-.02.009-.005.004-.004zm-9.726 32.127c1.19-.489 2.54.11 3.014 1.338 1.014 2.626 3.2 4.695 6.28 5.059 1.274.15 2.188 1.336 2.042 2.648-.145 1.313-1.296 2.255-2.57 2.105-5.01-.591-8.51-4.016-10.064-8.043-.474-1.228.107-2.619 1.298-3.107z"})),M.createElement(oK,{fillRule:"evenodd",clipRule:"evenodd",d:"M24.762.384L23.5 2.392 22.238.384a2.263 2.263 0 012.524 0zM23.5 5.294l-.476.353c-1.11.83-2.671 2.05-4.452 3.595-3.568 3.096-7.95 7.44-11.389 12.522-3.334 5.412-3.322 12.723-.351 18.76 2.94 5.974 8.685 10.505 16.668 10.505 7.983 0 13.728-4.53 16.668-10.505 2.971-6.037 2.983-13.348-.351-18.76-3.438-5.082-7.821-9.426-11.389-12.522A79.366 79.366 0 0023.5 5.295zM22.238.385L23.5 2.392 24.762.384l.004.004.01.005.029.02.105.072a61.327 61.327 0 011.79 1.29 83.974 83.974 0 014.717 3.808c3.746 3.25 8.474 7.915 12.236 13.488.017.025.035.051.05.078 4.376 7.056 4.208 16.217.605 23.54C40.666 50.086 33.42 55.811 23.5 55.811c-9.92 0-17.166-5.725-20.808-13.124-3.603-7.322-3.771-16.483.604-23.54a2.38 2.38 0 01.05-.077c3.763-5.573 8.49-10.238 12.237-13.488a83.942 83.942 0 014.716-3.809A61.78 61.78 0 0122.09.485l.106-.072.03-.02.009-.005.004-.004zm-9.726 32.127c1.19-.489 2.54.11 3.014 1.338 1.014 2.626 3.2 4.695 6.28 5.059 1.274.15 2.188 1.336 2.042 2.648-.145 1.313-1.296 2.255-2.57 2.105-5.01-.591-8.51-4.016-10.064-8.043-.474-1.228.107-2.619 1.298-3.107z",fill:"url(#paint0_linear_24287_41659)"}),M.createElement(oK,{d:"M24.762.384l.547-.788-.007-.005-.007-.005-.533.798zM23.5 2.392l-.813.51.813 1.294.813-1.293-.813-.511zM22.238.384l-.533-.798-.007.005-.007.005.547.788zm1.262 4.91l.568-.773-.567-.417-.568.417.567.774zm-.476.353l-.575-.769.575.77zm-4.452 3.595l-.63-.725.63.725zM7.183 21.764l-.795-.538-.011.017-.011.017.817.504zm-.351 18.76l-.862.424.862-.424zm33.336 0l.862.424-.862-.424zm-.351-18.76l.817-.504-.01-.017-.012-.017-.795.538zM28.428 9.242l.63-.725-.63.725zm-4.452-3.595l.575-.769-.575.77zm.79-5.26l-.547.79.01.006.01.007.527-.802zm.01.006l.538-.795-.011-.007-.528.802zm.029.02l.54-.793-.002-.002-.538.795zm.105.072l.543-.792-.003-.002-.54.794zm.387.27l.553-.786-.553.785zm1.404 1.02l-.575.768.575-.769zm4.716 3.808l.63-.726-.63.726zM43.653 19.07l.796-.537-.796.537zm.05.078l-.819.5.004.006.816-.506zm.605 23.54l.86.423-.86-.424zm-41.616 0l-.86.423.86-.424zm.604-23.54l-.816-.506.816.506zm.05-.078l-.795-.538.796.538zM15.584 5.583l.629.725-.63-.725zm4.716-3.809l-.574-.769.574.77zm1.404-1.02L21.15-.03l.553.785zm.387-.269l-.54-.794-.003.002.543.792zm.105-.072l-.538-.795-.002.002.54.793zm.03-.02l-.528-.802-.01.007.538.795zm.009-.005l.527.802.01-.007.01-.007-.547-.788zm-6.708 33.46l-.896.347.896-.346zm6.28 5.06l.113-.954-.113.954zm2.042 2.648l-.954-.106.954.106zm-2.57 2.105l.113-.954-.112.954zm-10.064-8.043l-.896.346.896-.346zM23.949-.126L22.687 1.88l1.626 1.022L25.575.895 23.948-.126zm.364 2.007L23.05-.127 21.426.895l1.261 2.008 1.626-1.022zm-1.542-.698a1.303 1.303 0 011.458 0l1.066-1.597a3.223 3.223 0 00-3.59 0l1.066 1.597zm.162 3.338l-.484.357 1.15 1.538c.167-.125.323-.24.469-.347l-1.135-1.548zm-.484.357a80.381 80.381 0 00-4.506 3.64l1.258 1.45A78.456 78.456 0 0123.6 6.415l-1.15-1.538zm-4.506 3.64c-3.603 3.125-8.053 7.53-11.555 12.708l1.59 1.076c3.374-4.988 7.69-9.269 11.223-12.335l-1.258-1.45zM6.366 21.26c-3.533 5.735-3.49 13.401-.396 19.688l1.723-.848c-2.848-5.787-2.828-12.743.308-17.833L6.366 21.26zM5.97 40.948c3.079 6.255 9.132 11.04 17.53 11.04v-1.92c-7.567 0-13.005-4.274-15.807-9.968l-1.723.848zm17.53 11.04c8.398 0 14.451-4.785 17.53-11.04l-1.723-.848c-2.802 5.694-8.24 9.969-15.807 9.969v1.92zm17.53-11.04c3.094-6.287 3.137-13.953-.396-19.688l-1.635 1.007c3.136 5.09 3.156 12.046.308 17.833l1.723.848zm-.418-19.722c-3.502-5.177-7.952-9.582-11.555-12.709L27.8 9.967c3.533 3.066 7.849 7.347 11.223 12.335l1.59-1.076zM29.057 8.517a80.381 80.381 0 00-4.506-3.639L23.4 6.416A78.493 78.493 0 0127.8 9.967l1.258-1.45zm-4.506-3.639a74.094 74.094 0 00-.483-.357L22.932 6.07l.47.347 1.149-1.538zm-1.909-3.623c.014-.006-.075.039-.189.065a.96.96 0 01-.446-.004.963.963 0 01-.573-.409l.012.02c.02.03.058.093.137.219l1.104 1.757 1.626-1.022C23.683.877 23.367.375 23.209.125l-.138-.221-.022-.035a.354.354 0 00-.027-.04.994.994 0 00-.028-.037c-.01-.013-.042-.053-.09-.1-.026-.024-.178-.176-.434-.24-.352-.087-.627.057-.636.061l.808 1.742zm1.671 1.648l1.104-1.757.137-.219.013-.02-.005.007-.017.026a.98.98 0 01-.118.136.96.96 0 01-.88.244c-.114-.026-.203-.071-.19-.065l.809-1.742c.013.007-.076-.038-.19-.064a.96.96 0 00-.446.004c-.256.063-.408.215-.434.24a.996.996 0 00-.137.165l-.008.011-.022.035-.138.22-1.104 1.757 1.626 1.022zm-.099-1.73l.005.003L25.314-.4l-.005-.003-1.095 1.577zm.025.017l.009.006L25.303-.41l-.01-.006L24.24 1.19zm-.002-.002l.03.02 1.076-1.59-.03-.02-1.076 1.59zm.028.02l.105.07 1.08-1.587-.105-.071-1.08 1.587zm.102.069l.378.262L25.85-.03a41.78 41.78 0 00-.397-.276l-1.086 1.584zm.378.262c.326.23.796.567 1.38 1.004l1.15-1.538C26.675.556 26.19.208 25.85-.03l-1.105 1.57zm1.38 1.004c1.17.875 2.803 2.15 4.663 3.765l1.259-1.45a84.98 84.98 0 00-4.772-3.853l-1.15 1.538zm4.663 3.765c3.711 3.22 8.372 7.822 12.07 13.3l1.59-1.075c-3.825-5.668-8.62-10.395-12.401-13.676l-1.259 1.45zm12.07 13.3l.026.041 1.639-1a2.921 2.921 0 00-.074-.115l-1.592 1.074zm.03.047c4.174 6.732 4.04 15.536.558 22.61l1.723.847c3.726-7.571 3.927-17.089-.65-24.47l-1.631 1.013zm.558 22.61C39.942 49.383 33.004 54.851 23.5 54.851v1.92c10.337 0 17.89-5.981 21.669-13.66l-1.723-.848zM23.5 54.851c-9.504 0-16.442-5.468-19.946-12.588l-1.723.848c3.78 7.679 11.332 13.66 21.67 13.66v-1.92zM3.554 42.264c-3.481-7.073-3.616-15.877.558-22.61L2.48 18.644c-4.576 7.38-4.375 16.898-.649 24.47l1.723-.849zm.558-22.61l.03-.046-1.59-1.074a3.299 3.299 0 00-.072.109l1.632 1.012zm.03-.046c3.698-5.478 8.359-10.08 12.07-13.3l-1.258-1.45c-3.781 3.28-8.577 8.007-12.403 13.676l1.591 1.074zm12.07-13.3a82.969 82.969 0 014.662-3.765l-1.15-1.538c-1.2.898-2.87 2.203-4.77 3.852l1.258 1.45zm4.662-3.765a60.944 60.944 0 011.381-1.004L21.15-.03c-.34.24-.824.587-1.425 1.036l1.15 1.538zm1.381-1.004l.378-.262-1.086-1.584-.397.276 1.105 1.57zm.375-.26l.105-.072-1.08-1.587-.105.071 1.08 1.588zm.104-.07l.029-.02-1.077-1.59-.029.02 1.076 1.59zm.018-.013l.01-.006-1.056-1.605-.009.006 1.055 1.605zm.029-.02l.005-.003L21.69-.404l-.005.003 1.095 1.577zM12.876 33.4c.674-.276 1.467.05 1.755.796l1.79-.692c-.66-1.71-2.566-2.58-4.274-1.88l.73 1.776zm1.755.796c1.12 2.9 3.57 5.254 7.063 5.666l.225-1.907c-2.67-.315-4.59-2.1-5.497-4.451l-1.792.692zm7.063 5.666c.724.085 1.29.775 1.2 1.59l1.908.211c.201-1.81-1.06-3.493-2.883-3.708l-.225 1.907zm1.2 1.59c-.09.81-.785 1.341-1.503 1.256l-.225 1.907c1.83.216 3.435-1.137 3.636-2.952l-1.908-.212zm-1.503 1.256c-4.597-.542-7.831-3.68-9.282-7.435l-1.79.692c1.659 4.298 5.422 8.01 10.847 8.65l.225-1.907zm-9.282-7.435c-.293-.758.077-1.59.767-1.873l-.729-1.776c-1.691.694-2.484 2.644-1.829 4.34l1.791-.69z",fill:"url(#paint1_linear_24287_41659)",mask:"url(#a)"}),M.createElement(OZ,null,M.createElement(iK,{id:"paint0_linear_24287_41659",x1:0,y1:0,x2:53.6297,y2:7.33414,gradientUnits:"userSpaceOnUse"},M.createElement(hK,{stopColor:"#A200FF"}),M.createElement(hK,{offset:1e-4,stopColor:"#A200FF"}),M.createElement(hK,{offset:1,stopColor:"#FF8600"})),M.createElement(iK,{id:"paint1_linear_24287_41659",x1:0,y1:0,x2:53.6297,y2:7.33414,gradientUnits:"userSpaceOnUse"},M.createElement(hK,{stopColor:"#A200FF"}),M.createElement(hK,{offset:1e-4,stopColor:"#A200FF"}),M.createElement(hK,{offset:1,stopColor:"#FF8600"})))),WK=e=>M.createElement(mK,{width:24,height:24,viewBox:"0 0 24 24",fill:"none",...e},M.createElement(oK,{fillRule:"evenodd",clipRule:"evenodd",d:"M16.0435 1.6347C16.4575 1.6347 16.7935 1.9707 16.7935 2.3847L16.794 3.23252C18.2541 3.33262 19.4667 3.83275 20.325 4.6928C21.262 5.6338 21.755 6.9868 21.75 8.6098V17.7328C21.75 21.0648 19.634 23.1348 16.229 23.1348H7.771C4.366 23.1348 2.25 21.0358 2.25 17.6568V8.6078C2.25 5.465 4.13706 3.44764 7.21469 3.23286L7.2153 2.3847C7.2153 1.9707 7.5513 1.6347 7.9653 1.6347C8.3793 1.6347 8.7153 1.9707 8.7153 2.3847L8.715 3.2137H15.293L15.2935 2.3847C15.2935 1.9707 15.6295 1.6347 16.0435 1.6347ZM20.25 10.5387H3.75V17.6568C3.75 20.2228 5.178 21.6348 7.771 21.6348H16.229C18.822 21.6348 20.25 20.2488 20.25 17.7328L20.25 10.5387ZM16.4512 16.831C16.8652 16.831 17.2012 17.167 17.2012 17.581C17.2012 17.995 16.8652 18.331 16.4512 18.331C16.0372 18.331 15.6972 17.995 15.6972 17.581C15.6972 17.167 16.0282 16.831 16.4422 16.831H16.4512ZM12.0137 16.831C12.4277 16.831 12.7637 17.167 12.7637 17.581C12.7637 17.995 12.4277 18.331 12.0137 18.331C11.5997 18.331 11.2597 17.995 11.2597 17.581C11.2597 17.167 11.5907 16.831 12.0047 16.831H12.0137ZM7.5669 16.831C7.9809 16.831 8.3169 17.167 8.3169 17.581C8.3169 17.995 7.9809 18.331 7.5669 18.331C7.1529 18.331 6.8119 17.995 6.8119 17.581C6.8119 17.167 7.1439 16.831 7.5579 16.831H7.5669ZM16.4512 12.9443C16.8652 12.9443 17.2012 13.2803 17.2012 13.6943C17.2012 14.1083 16.8652 14.4443 16.4512 14.4443C16.0372 14.4443 15.6972 14.1083 15.6972 13.6943C15.6972 13.2803 16.0282 12.9443 16.4422 12.9443H16.4512ZM12.0137 12.9443C12.4277 12.9443 12.7637 13.2803 12.7637 13.6943C12.7637 14.1083 12.4277 14.4443 12.0137 14.4443C11.5997 14.4443 11.2597 14.1083 11.2597 13.6943C11.2597 13.2803 11.5907 12.9443 12.0047 12.9443H12.0137ZM7.5669 12.9443C7.9809 12.9443 8.3169 13.2803 8.3169 13.6943C8.3169 14.1083 7.9809 14.4443 7.5669 14.4443C7.1529 14.4443 6.8119 14.1083 6.8119 13.6943C6.8119 13.2803 7.1439 12.9443 7.5579 12.9443H7.5669ZM15.293 4.7137H8.715L8.7153 5.6757C8.7153 6.0897 8.3793 6.4257 7.9653 6.4257C7.5513 6.4257 7.2153 6.0897 7.2153 5.6757L7.21477 4.73641C4.97454 4.9246 3.75 6.28256 3.75 8.6078V9.0387H20.25L20.25 8.6078C20.254 7.3728 19.922 6.4128 19.263 5.7528C18.6845 5.17261 17.8389 4.82611 16.7944 4.73689L16.7935 5.6757C16.7935 6.0897 16.4575 6.4257 16.0435 6.4257C15.6295 6.4257 15.2935 6.0897 15.2935 5.6757L15.293 4.7137Z",fill:e?.color??wL.icon})),YK=e=>M.createElement(mK,{width:"40",height:"84",viewBox:"0 0 40 84",...e},M.createElement(oK,{fillRule:"evenodd",clipRule:"evenodd",d:"M40.0001 28.9285V24.5471C39.5337 24.6152 39.0574 24.65 38.5725 24.65C33.7881 24.65 29.7894 21.2357 28.8091 16.675H37.1449V12.325H28.8091C29.7894 7.76427 33.7881 4.35 38.5725 4.35C39.0574 4.35 39.5337 4.3848 40.0001 4.45247V0.0715333C39.5304 0.0241667 39.0545 0 38.5725 0C30.6878 0 24.2964 6.49165 24.2964 14.5C24.2964 22.5084 30.6878 29 38.5725 29C39.0545 29 39.5304 28.9758 40.0001 28.9285Z",fill:wL.icon}),M.createElement(oK,{fillRule:"evenodd",clipRule:"evenodd",d:"M0 14.5C0 22.5084 6.35291 29 14.1901 29C14.7014 29 15.2066 28.9725 15.7037 28.9188V24.533C15.2104 24.6104 14.7047 24.65 14.1901 24.65C8.7042 24.65 4.25703 20.1057 4.25703 14.5C4.25703 8.8943 8.7042 4.35 14.1901 4.35C14.7047 4.35 15.2104 4.38963 15.7037 4.46697V0.0812C15.2066 0.02755 14.7014 0 14.1901 0C6.35291 0 0 6.49165 0 14.5Z",fill:wL.icon}),M.createElement(oK,{fillRule:"evenodd",clipRule:"evenodd",d:"M3.07255 44C4.12117 44 4.89209 43.648 5.38529 42.9439C5.8785 42.2398 6.1251 41.1635 6.1251 39.7152V38.111C6.11177 36.7117 5.85851 35.6767 5.3653 35.006C4.87209 34.3353 4.1034 34 3.05922 34C2.00616 34 1.23302 34.3476 0.739811 35.0428C0.246604 35.738 0 36.8008 0 38.2313V39.8824C0.0177732 41.2504 0.275485 42.2787 0.773136 42.9672C1.27079 43.6557 2.03726 44 3.07255 44ZM3.07255 42.9906C2.45493 42.9906 1.99394 42.74 1.68957 42.2386C1.3852 41.7373 1.23302 40.9608 1.23302 39.9091V37.9305C1.24191 36.9412 1.39076 36.2081 1.67957 35.7313C1.96839 35.2545 2.42827 35.016 3.05922 35.016C3.69461 35.016 4.15894 35.2556 4.4522 35.7346C4.74546 36.2137 4.89209 36.9768 4.89209 38.0241V40.0495C4.87876 41.0655 4.72435 41.8097 4.42887 42.2821C4.13339 42.7545 3.68128 42.9906 3.07255 42.9906ZM15.4217 34.0869V43.8663H14.182V35.6243L11.696 36.5401V35.4171L15.2284 34.0869H15.4217ZM29.0572 43.8663V42.857H24.1851L26.7844 40.0294C28.0019 38.7059 28.6106 37.5651 28.6106 36.607C28.6106 35.8182 28.3485 35.1865 27.8242 34.7119C27.2998 34.2373 26.5867 34 25.6847 34C24.7205 34 23.9507 34.2763 23.3753 34.8289C22.7999 35.3815 22.5122 36.1056 22.5122 37.0013H23.7452C23.7452 36.3775 23.9151 35.8906 24.2551 35.5408C24.595 35.191 25.0715 35.016 25.6847 35.016C26.1957 35.016 26.6045 35.1787 26.911 35.504C27.2176 35.8293 27.3709 36.246 27.3709 36.754C27.3709 37.1328 27.2765 37.4993 27.0877 37.8536C26.8988 38.2079 26.5556 38.668 26.0579 39.234L22.6988 42.9773V43.8663H29.0572ZM39.1469 43.2313C38.5781 43.7438 37.8383 44 36.9275 44C36.0166 44 35.2757 43.7527 34.7047 43.258C34.1337 42.7634 33.8482 42.1105 33.8482 41.2995H35.0879C35.0879 41.8119 35.2545 42.2219 35.5878 42.5294C35.921 42.8369 36.3676 42.9906 36.9275 42.9906C37.5229 42.9906 37.9783 42.8347 38.2938 42.5227C38.6092 42.2108 38.767 41.7629 38.767 41.1791C38.767 40.6132 38.5937 40.1787 38.2471 39.8757C37.9005 39.5726 37.4007 39.4167 36.7475 39.4078H35.8211V38.3984H36.7475C37.3296 38.3895 37.7872 38.2357 38.1205 37.9372C38.4537 37.6386 38.6204 37.2353 38.6204 36.7273C38.6204 35.5865 38.0538 35.016 36.9208 35.016C36.3876 35.016 35.9621 35.1687 35.6444 35.4739C35.3267 35.7792 35.1679 36.1836 35.1679 36.6872H33.9349C33.9349 35.9162 34.2159 35.2756 34.778 34.7654C35.3401 34.2551 36.0543 34 36.9208 34C37.8361 34 38.5537 34.2429 39.0736 34.7286C39.5934 35.2143 39.8534 35.8895 39.8534 36.754C39.8534 37.1774 39.7167 37.5873 39.4435 37.984C39.1702 38.3806 38.7981 38.6769 38.3271 38.873C38.8603 39.0423 39.2724 39.3231 39.5634 39.7152C39.8545 40.1074 40 40.5865 40 41.1524C40 42.0258 39.7156 42.7188 39.1469 43.2313Z",fill:wL.icon}),M.createElement(oK,{fillRule:"evenodd",clipRule:"evenodd",d:"M38.5714 58.4286H1.42857V82H38.5714V58.4286ZM0 57V83.4286H40V57H0Z",fill:wL.icon}),M.createElement(oK,{d:"M4.4248 78.0714V62.2211H9.21449L12.0905 73.033L14.934 62.2211H19.7345V78.0714H16.7612V65.5944L13.615 78.0714H10.5336L7.39809 65.5944V78.0714H4.4248Z",fill:wL.icon}),M.createElement(oK,{d:"M22.4596 62.2211H28.3088C29.6279 62.2211 30.6334 62.322 31.3253 62.5238C32.2552 62.7977 33.0517 63.2842 33.7148 63.9834C34.3779 64.6826 34.8825 65.5403 35.2285 66.5567C35.5744 67.5658 35.7474 68.8127 35.7474 70.2976C35.7474 71.6022 35.5853 72.7267 35.2609 73.6709C34.8645 74.8242 34.2986 75.7576 33.5634 76.4712C33.0084 77.0118 32.2588 77.4335 31.3145 77.7362C30.6082 77.9597 29.6639 78.0714 28.4818 78.0714H22.4596V62.2211ZM25.6599 64.9024V75.4008H28.0493C28.9431 75.4008 29.5882 75.3504 29.9847 75.2495C30.5036 75.1197 30.9325 74.8999 31.2713 74.5899C31.6173 74.28 31.8984 73.7718 32.1146 73.0654C32.3309 72.3519 32.439 71.3824 32.439 70.157C32.439 68.9317 32.3309 67.991 32.1146 67.3351C31.8984 66.6792 31.5956 66.1674 31.2064 65.7998C30.8172 65.4322 30.3234 65.1835 29.7252 65.0538C29.2783 64.9529 28.4025 64.9024 27.0979 64.9024H25.6599Z",fill:wL.icon})),$K=e=>M.createElement(mK,{width:24,height:24,viewBox:"0 0 24 24",fill:"none",...e},M.createElement(oK,{d:"M9.91114 17.3465C9.8166 17.3465 9.723 17.3278 9.63569 17.2916C9.54838 17.2554 9.46907 17.2023 9.40234 17.1353L5.20234 12.9353C5.07112 12.7995 4.99847 12.6177 5.00002 12.4289C5.00157 12.2401 5.07721 12.0595 5.21064 11.9259C5.34407 11.7924 5.52462 11.7166 5.7134 11.7148C5.90218 11.7131 6.08409 11.7856 6.21994 11.9167L9.91114 15.6079L18.6472 6.87191C18.7136 6.80317 18.7931 6.74836 18.881 6.71067C18.9688 6.67297 19.0633 6.65316 19.1589 6.65237C19.2545 6.65158 19.3492 6.66985 19.4378 6.70609C19.5263 6.74234 19.6066 6.79583 19.6741 6.86347C19.7417 6.9311 19.7952 7.01151 19.8313 7.10002C19.8674 7.18852 19.8857 7.28334 19.8847 7.37894C19.8839 7.47454 19.864 7.56901 19.8262 7.65684C19.7884 7.74467 19.7335 7.82408 19.6648 7.89046L10.4151 17.1353C10.2815 17.2694 10.1004 17.3452 9.91114 17.3465Z",fill:e?.color??wL.icon})),XK=e=>M.createElement(mK,{width:24,height:24,viewBox:"0 0 24 24",fill:"none",...e},M.createElement(oK,{fillRule:"evenodd",clipRule:"evenodd",d:"M16.3344 3.38489H7.6654C4.6444 3.38489 2.7504 5.52389 2.7504 8.55089V16.7189C2.7504 19.7459 4.6354 21.8849 7.6654 21.8849H16.3334C19.3644 21.8849 21.2504 19.7459 21.2504 16.7189V8.55089C21.2504 5.52389 19.3644 3.38489 16.3344 3.38489Z",stroke:e?.color??wL.icon,strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),qK=e=>M.createElement(mK,{width:24,height:24,viewBox:"0 0 24 24",fill:"none",...e},M.createElement(oK,{d:"M14.5784 9.44215L14.5784 9.44219L10.8449 13.1767L9.41855 11.7512C9.41852 11.7511 9.41849 11.7511 9.41845 11.7511C8.93018 11.2629 8.13968 11.2629 7.65145 11.7512C7.16318 12.2394 7.16318 13.031 7.65145 13.5193L9.96045 15.8283C10.2049 16.0727 10.5246 16.1947 10.845 16.1947C11.1647 16.1947 11.4844 16.0724 11.7286 15.8283L16.3466 11.2103C16.8348 10.722 16.8348 9.93041 16.3466 9.44215C15.8583 8.95389 15.0667 8.95389 14.5784 9.44215ZM7.782 3.6347H16.217C17.6754 3.6347 18.8605 4.14442 19.6821 5.00394C20.5055 5.86543 21 7.11668 21 8.66171V16.6097C21 18.1541 20.5053 19.4048 19.6817 20.266C18.8599 21.1252 17.6745 21.6347 16.216 21.6347H7.782C6.32407 21.6347 5.13922 21.1252 4.31777 20.266C3.49445 19.4049 3 18.1542 3 16.6097V8.66171C3 7.11668 3.49448 5.86541 4.31784 5.00392C5.13931 4.14439 6.32414 3.6347 7.782 3.6347Z",fill:e?.color??wL.icon,stroke:e?.color??wL.icon})),ZK=e=>M.createElement(mK,{width:24,height:24,viewBox:"0 0 24 24",fill:"none",...e},M.createElement(oK,{d:"M16.2803 4.48542C16.5466 4.75168 16.5708 5.16835 16.3529 5.46196L16.2803 5.54608L9.811 12.0157L16.2803 18.4854C16.5466 18.7517 16.5708 19.1683 16.3529 19.462L16.2803 19.5461C16.0141 19.8123 15.5974 19.8365 15.3038 19.6187L15.2197 19.5461L8.21967 12.5461C7.9534 12.2798 7.9292 11.8631 8.14705 11.5695L8.21967 11.4854L15.2197 4.48542C15.5126 4.19252 15.9874 4.19252 16.2803 4.48542Z",fill:e.color??wL.icon})),KK=e=>M.createElement(mK,{width:25,height:26,viewBox:"0 0 25 26",fill:"none",...e},M.createElement(oK,{fillRule:"evenodd",clipRule:"evenodd",d:"M16.0713 21.2014C15.7665 21.2014 15.4618 21.0847 15.2296 20.8525L8.08689 13.7098C7.62143 13.2444 7.62143 12.492 8.08689 12.0266L15.2296 4.88383C15.6951 4.41836 16.4474 4.41836 16.913 4.88383C17.3784 5.3493 17.3784 6.10166 16.913 6.56713L10.6118 12.8682L16.913 19.1693C17.3784 19.6347 17.3784 20.3871 16.913 20.8525C16.6808 21.0847 16.3761 21.2014 16.0713 21.2014Z",fill:e.color??wL.icon})),QK=e=>M.createElement(mK,{width:24,height:24,viewBox:"0 0 24 24",fill:"none",...e},M.createElement(oK,{d:"M8.21967 20.0899C7.9534 19.8236 7.9292 19.407 8.14705 19.1134L8.21967 19.0292L14.689 12.5596L8.21967 6.0899C7.9534 5.82363 7.9292 5.40697 8.14705 5.11336L8.21967 5.02924C8.48594 4.76297 8.9026 4.73877 9.19621 4.95662L9.28033 5.02924L16.2803 12.0292C16.5466 12.2955 16.5708 12.7122 16.3529 13.0058L16.2803 13.0899L9.28033 20.0899C8.98744 20.3828 8.51256 20.3828 8.21967 20.0899Z",fill:e.color??wL.icon})),JK=e=>M.createElement(mK,{width:24,height:24,viewBox:"0 0 24 24",fill:"none",...e},M.createElement(oK,{d:"M6.72911 6.34559C6.44794 6.06441 5.99206 6.06441 5.71088 6.34559C5.42971 6.62676 5.42971 7.08264 5.71088 7.36382L10.9617 12.6147L5.71088 17.8656C5.42971 18.1468 5.42971 18.6026 5.71088 18.8838C5.99206 19.165 6.44794 19.165 6.72911 18.8838L11.98 13.633L17.2309 18.8838C17.5121 19.165 17.9679 19.165 18.2491 18.8838C18.5303 18.6026 18.5303 18.1468 18.2491 17.8656L12.9983 12.6147L18.2491 7.36382C18.5303 7.08264 18.5303 6.62676 18.2491 6.34559C17.9679 6.06441 17.5121 6.06441 17.2309 6.34559L11.98 11.5964L6.72911 6.34559Z",fill:e?.color??wL.icon})),eQ=e=>M.createElement(mK,{width:24,height:25,viewBox:"0 0 24 25",fill:"none",...e},M.createElement(oK,{fillRule:"evenodd",clipRule:"evenodd",d:"M13.414 12.3682L18.707 7.07529C19.098 6.68429 19.098 6.05229 18.707 5.66129C18.316 5.27029 17.684 5.27029 17.293 5.66129L12 10.9542L6.70701 5.66129C6.31601 5.27029 5.68401 5.27029 5.29301 5.66129C4.90201 6.05229 4.90201 6.68429 5.29301 7.07529L10.586 12.3682L5.29301 17.6613C4.90201 18.0522 4.90201 18.6842 5.29301 19.0752C5.48801 19.2702 5.74401 19.3682 6.00001 19.3682C6.25601 19.3682 6.51201 19.2702 6.70701 19.0752L12 13.7823L17.293 19.0752C17.488 19.2702 17.744 19.3682 18 19.3682C18.256 19.3682 18.512 19.2702 18.707 19.0752C19.098 18.6842 19.098 18.0522 18.707 17.6613L13.414 12.3682Z",fill:e.color??wL.icon}));function tQ(e){return M.createElement(mK,{width:24,height:25,viewBox:"0 0 24 25",fill:"none",...e},M.createElement(oK,{fillRule:"evenodd",clipRule:"evenodd",d:"M12.638 7.76a2.58 2.58 0 102.868-4.29 2.58 2.58 0 00-2.868 4.29zm.834-3.044a1.081 1.081 0 111.2 1.798 1.081 1.081 0 01-1.2-1.798zm-2.1 14.803a.75.75 0 001.046-.397l.87-2.316a2.755 2.755 0 00-1.542-3.532L11.079 13a1.267 1.267 0 111.293-2.148l1.022.853c.498.413 1.124.64 1.77.64h2.9a.75.75 0 000-1.5h-2.9c-.296 0-.582-.104-.81-.293L13.33 9.7a2.777 2.777 0 00-3.873.324 2.768 2.768 0 001.05 4.361l.676.275a1.258 1.258 0 01.705 1.616l-.868 2.316a.748.748 0 00.352.928zM6.21 22.534a3.5 3.5 0 110-7 3.5 3.5 0 010 7zm0-5.5a2 2 0 102 2 2 2 0 00-2-1.993v-.007zm9.65 4.91a3.5 3.5 0 103.888-5.82 3.5 3.5 0 00-3.889 5.82zm.832-4.573a2 2 0 011.112-.337v.007a2 2 0 012 1.993 2 2 0 11-3.111-1.663z",fill:wL.icon}))}const nQ=e=>M.createElement(mK,{width:28,height:28,viewBox:"0 0 28 28",fill:"none",...e},M.createElement(oK,{fillRule:"evenodd",clipRule:"evenodd",d:"M15.001 4.41143L14.5 5.20879L13.9989 4.41143C14.3038 4.20791 14.6961 4.20791 15.001 4.41143ZM14.5 6.3617C14.4414 6.40466 14.3782 6.45134 14.3109 6.50165C13.8698 6.83133 13.2501 7.3157 12.5427 7.92948C11.1256 9.15913 9.38504 10.8841 8.01956 12.9025C6.69517 15.0522 6.69988 17.9558 7.8799 20.3534C9.04765 22.7262 11.3296 24.5255 14.5 24.5255C17.6704 24.5255 19.9522 22.7262 21.1201 20.3534C22.3001 17.9558 22.3047 15.0522 20.9803 12.9025C19.6149 10.8841 17.8742 9.15913 16.4572 7.92948C15.7498 7.3157 15.1301 6.83133 14.689 6.50165C14.6217 6.45134 14.5585 6.40466 14.5 6.3617ZM13.9989 4.41143C13.9991 4.41131 13.9989 4.41143 14.5 5.20879C15.001 4.41143 15.0008 4.41131 15.001 4.41143L15.0029 4.4127L15.0065 4.41505L15.0181 4.42295L15.06 4.45146C15.0959 4.47608 15.1477 4.51183 15.2138 4.55835C15.3459 4.65134 15.5356 4.78745 15.7711 4.96346C16.2419 5.31529 16.8975 5.82789 17.6444 6.47598C19.1322 7.7669 21.0099 9.6196 22.5041 11.8329C22.5109 11.8431 22.5177 11.8535 22.5241 11.8639C24.2619 14.6665 24.1952 18.3049 22.764 21.213C21.3177 24.1517 18.44 26.4255 14.5 26.4255C10.5599 26.4255 7.68226 24.1517 6.23595 21.213C4.80472 18.3049 4.73807 14.6665 6.4758 11.8639C6.48228 11.8535 6.48897 11.8431 6.49585 11.8329C7.98996 9.6196 9.86782 7.7669 11.3555 6.47598C12.1024 5.82789 12.758 5.31529 13.2288 4.96346C13.4644 4.78745 13.654 4.65134 13.7861 4.55835C13.8523 4.51183 13.904 4.47608 13.9399 4.45146L13.9818 4.42295L13.9935 4.41505L13.997 4.4127L13.9989 4.41143ZM10.1358 17.1709C10.6088 16.9769 11.1448 17.2148 11.333 17.7023C11.7357 18.7452 12.6036 19.5672 13.8273 19.7115C14.3331 19.7712 14.6962 20.2421 14.6383 20.7633C14.5804 21.2847 14.1235 21.6589 13.6178 21.5992C11.6275 21.3645 10.2379 20.0043 9.62029 18.4049C9.43206 17.9174 9.66286 17.365 10.1358 17.1709Z",fill:e?.color??wL.iconNavigationBarInactive})),iQ=e=>M.createElement(mK,{width:28,height:28,viewBox:"0 0 28 28",fill:"none",...e},M.createElement(oK,{d:"M9.47572 16.8973L9.47563 16.8974C8.70231 17.2102 8.33375 18.0938 8.63669 18.8671C9.37596 20.7542 11.0517 22.3823 13.4637 22.6627C14.2958 22.7594 15.0352 22.1525 15.1284 21.3254L15.1284 21.3253C15.2214 20.4994 14.6377 19.741 13.8072 19.6443L13.8071 19.6443C12.6515 19.5101 11.8233 18.75 11.4309 17.7484L10.984 17.9235L11.4309 17.7484C11.1265 16.9714 10.253 16.5831 9.47572 16.8973ZM14.5 25.9455C10.7597 25.9455 8.05158 23.8421 6.67199 21.0789C5.2861 18.303 5.26321 14.906 6.85972 12.3608C9.34794 8.73088 12.9056 5.98426 14.2429 5.02279C14.3998 4.91003 14.6002 4.91003 14.7571 5.0228C16.0944 5.98427 19.6519 8.73087 22.1402 12.3608C23.7367 14.9059 23.7138 18.303 22.3279 21.0789C20.9483 23.8421 18.2402 25.9455 14.5 25.9455Z",fill:e?.color??wL.iconNavigationBarActive,stroke:e?.color??wL.iconNavigationBarActive,strokeWidth:.96})),rQ=e=>M.createElement(mK,{width:24,height:24,viewBox:"0 0 24 24",fill:"none",...e},M.createElement(oK,{fillRule:"evenodd",clipRule:"evenodd",d:"M5.2513 6.38429C6.07792 5.49683 7.25513 4.99994 8.645 4.99994H11.6506C11.9986 4.99994 12.2808 5.28208 12.2808 5.63012C12.2808 5.97816 11.9986 6.26031 11.6506 6.26031H8.645C7.56779 6.26031 6.73758 6.6378 6.17357 7.24333C5.60494 7.85381 5.26037 8.74689 5.26037 9.85332V16.5305C5.26037 17.6382 5.6036 18.5314 6.17112 19.1416C6.73386 19.7466 7.56369 20.1243 8.645 20.1243H15.7324C16.8151 20.1243 17.6451 19.7465 18.2076 19.1416C18.7749 18.5315 19.1178 17.6384 19.1178 16.5305V13.5216C19.1178 13.1736 19.4 12.8914 19.748 12.8914C20.096 12.8914 20.3782 13.1736 20.3782 13.5216V16.5305C20.3782 17.8979 19.9518 19.1168 19.1305 19.9999C18.3045 20.8882 17.1266 21.3847 15.7324 21.3847H8.645C7.25186 21.3847 6.07429 20.888 5.24823 19.9999C4.42695 19.1169 4 17.8981 4 16.5305V9.85332C4 8.48531 4.42929 7.2668 5.2513 6.38429Z",fill:e?.color??wL.icon}),M.createElement(oK,{fillRule:"evenodd",clipRule:"evenodd",d:"M16.5818 6.82051L11.9345 11.8931C11.6675 12.1932 11.5006 12.5692 11.4569 12.9697L11.3377 14.0698C11.2974 14.4426 11.6242 14.7507 11.9937 14.6891C11.9936 14.6891 11.9938 14.689 11.9937 14.6891L13.0606 14.5101C13.4935 14.4373 13.8884 14.2197 14.1802 13.8934L14.1853 13.8878L18.786 8.86705L18.7882 8.8647C19.1016 8.52614 19.0813 7.99816 18.7425 7.68452L17.7614 6.77612C17.7614 6.77609 17.7614 6.77615 17.7614 6.77612C17.4228 6.46331 16.8946 6.48377 16.5818 6.82051ZM15.656 5.96537C16.4416 5.11656 17.7676 5.06553 18.6169 5.85059L19.5987 6.75961C19.5986 6.7596 19.5987 6.75963 19.5987 6.75961C20.4475 7.54548 20.4996 8.86988 19.7143 9.71954C19.7139 9.71999 19.7135 9.72045 19.7131 9.7209L15.117 14.7366C14.6344 15.275 13.9827 15.6332 13.2696 15.7531L12.2021 15.932C11.0092 16.1317 9.95483 15.1373 10.0846 13.9346L10.2039 12.8335C10.2761 12.1713 10.553 11.5478 10.9971 11.0507L11.0024 11.0449L15.6538 5.96774L15.656 5.96537Z",fill:e?.color??wL.icon})),aQ=e=>M.createElement(mK,{height:48,width:48,viewBox:"0 0 48 48",fill:"none",...e},M.createElement(oK,{d:"M33 29C33 30.1045 32.1001 31 30.9907 31H17.0093C15.9 31 15 30.1045 15 29C15 27.8955 15.9 27 17.0093 27H24H30.9907C32.1001 27 33 27.8955 33 29Z",fill:e?.color??wL.iconNavigationBarSummaryInactive}),M.createElement(oK,{d:"M33 19C33 20.1045 32.1001 21 30.9907 21H17.0093C15.9 21 15 20.1045 15 19C15 17.8955 15.9 17 17.0093 17H24H30.9907C32.1001 17 33 17.8955 33 19Z",fill:e?.color??wL.iconNavigationBarSummaryInactive}));function oQ(e){return M.createElement(mK,{width:24,height:24,viewBox:"0 0 24 24",fill:"none",...e},M.createElement(oK,{d:"M7.783 3h8.435C19.166 3 21 5.081 21 8.026v7.948C21 18.919 19.166 21 16.217 21H7.783C4.835 21 3 18.919 3 15.974V8.026C3 5.081 4.844 3 7.783 3zM14.612 14.155h-5.22M14.612 9.846h-5.22",stroke:wL.icon,strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}))}const sQ=e=>M.createElement(mK,{width:49,height:48,viewBox:"0 0 49 48",fill:"none",...e},M.createElement(oK,{d:"M17.833 5.03309C17.2472 4.4473 16.2974 4.4473 15.7116 5.03309C15.1258 5.61889 15.1258 6.56862 15.7116 7.15442C16.0606 7.50335 16.059 8.06675 15.7127 8.41225C14.1935 9.93153 14.1908 12.3972 15.7127 13.916C16.2991 14.5012 17.2489 14.5002 17.8341 13.9138C18.4192 13.3274 18.4182 12.3777 17.8318 11.7925C17.4856 11.447 17.484 10.8836 17.833 10.5347C19.3538 9.01579 19.3519 6.552 17.833 5.03309Z",fill:wL.bgEmptyOnBg}),M.createElement(oK,{d:"M37.6074 11.7745C38.1932 11.1887 38.1932 10.239 37.6074 9.6532C37.0216 9.06742 36.072 9.06742 35.4862 9.6532C33.9668 11.1725 33.9652 13.6371 35.4872 15.1559C36.0736 15.7411 37.0234 15.7401 37.6086 15.1537C38.1938 14.5673 38.1928 13.6175 37.6064 13.0324C37.2602 12.6869 37.2586 12.1235 37.6074 11.7745Z",fill:wL.bgEmptyOnBg}),M.createElement(oK,{d:"M8.90709 13.0331C8.32131 12.4473 7.37155 12.4473 6.78577 13.0331C6.19999 13.6189 6.19999 14.5686 6.78577 15.1544C7.13469 15.5033 7.13311 16.0667 6.78687 16.4122C6.20049 16.9974 6.19949 17.9472 6.78467 18.5336C7.36985 19.12 8.31959 19.121 8.90599 18.5358C10.428 17.017 10.4264 14.5524 8.90709 13.0331Z",fill:wL.bgEmptyOnBg}),M.createElement(oK,{fillRule:"evenodd",clipRule:"evenodd",d:"M24.499 12.5244C22.2078 12.5244 20.3545 14.3825 20.3545 16.6709V18.0337C12.7803 19.6396 7.09435 25.5434 7.52215 32.662C7.55389 33.19 7.99137 33.602 8.52035 33.602H40.4796C41.0086 33.602 41.4462 33.19 41.4778 32.6618C41.9038 25.543 36.2172 19.6391 28.6436 18.0335V16.6709C28.6436 14.3818 26.7876 12.5244 24.499 12.5244ZM25.6436 17.6343V16.6709C25.6436 16.0372 25.1294 15.5244 24.499 15.5244C23.8676 15.5244 23.3546 16.0365 23.3546 16.6709V17.6344C23.7334 17.6129 24.1154 17.602 24.5 17.602C24.8838 17.602 25.2652 17.6129 25.6436 17.6343Z",fill:wL.bgEmptyOnBg}),M.createElement(oK,{d:"M6.09606 36.1678C6.50008 35.8434 6.99498 35.7178 7.49988 35.7178H41.4998C42.0048 35.7178 42.4996 35.8434 42.9038 36.1678C43.3084 36.4926 43.5118 36.9284 43.6004 37.3402C43.7656 38.1086 43.5746 38.9812 43.3446 39.6722C42.7004 41.6044 40.8896 42.9096 38.8522 42.9096H10.1476C8.11008 42.9096 6.29946 41.605 5.65538 39.6726C5.42538 38.9816 5.2341 38.1086 5.39932 37.3402C5.48786 36.9284 5.6914 36.4926 6.09606 36.1678Z",fill:wL.bgEmptyOnBg})),lQ=e=>M.createElement(mK,{width:24,height:24,viewBox:"0 0 28 28",...e},M.createElement(oK,{fillRule:"evenodd",clipRule:"evenodd",d:"M4 14C4 19.5228 8.47715 24 14 24C19.5228 24 24 19.5228 24 14C24 8.47715 19.5228 4 14 4C8.47715 4 4 8.47715 4 14ZM22.1818 14C22.1818 18.5187 18.5187 22.1818 14 22.1818C9.48128 22.1818 5.81815 18.5187 5.81815 14C5.81815 9.48128 9.48128 5.81815 14 5.81815C18.5187 5.81815 22.1818 9.48128 22.1818 14Z",fill:e?.color??wL.icon}),M.createElement(oK,{d:"M15 17.1667C15 17.6269 14.5523 18 14 18C13.4477 18 13 17.6269 13 17.1667V13.8333C13 13.3731 13.4477 13 14 13C14.5523 13 15 13.3731 15 13.8333V17.1667Z",fill:e?.color??wL.icon}),M.createElement(oK,{fillRule:"evenodd",clipRule:"evenodd",d:"M14 11C14.5523 11 15 10.5523 15 10C15 9.44772 14.5523 9 14 9C13.4477 9 13 9.44772 13 10C13 10.5523 13.4477 11 14 11Z",fill:e?.color??wL.icon})),uQ=e=>M.createElement(mK,{width:24,height:25,viewBox:"0 0 24 25",fill:"none",...e},M.createElement(oK,{fillRule:"evenodd",clipRule:"evenodd",d:"M16.659 2.36804C19.989 2.36804 22.5 5.08504 22.5 8.68804V15.556C22.5 17.4 21.848 19.066 20.663 20.248C19.6 21.307 18.221 21.868 16.675 21.868H6.822C5.279 21.868 3.901 21.308 2.837 20.248C1.652 19.066 1 17.4 1 15.556V8.68804C1 5.08504 3.511 2.36804 6.841 2.36804H16.659ZM16.659 3.86804H6.841C4.326 3.86804 2.5 5.89504 2.5 8.68804V15.556C2.5 16.999 2.996 18.288 3.896 19.185C4.672 19.96 5.685 20.368 6.825 20.368H16.659C16.661 20.366 16.669 20.368 16.675 20.368C17.816 20.368 18.828 19.96 19.604 19.185C20.505 18.288 21 16.999 21 15.556V8.68804C21 5.89504 19.174 3.86804 16.659 3.86804ZM18.235 8.49684C18.496 8.81784 18.447 9.28984 18.126 9.55184L13.682 13.1638C13.12 13.6098 12.448 13.8328 11.777 13.8328C11.108 13.8328 10.441 13.6118 9.883 13.1698L5.398 9.55384C5.075 9.29384 5.025 8.82084 5.284 8.49884C5.545 8.17784 6.017 8.12684 6.339 8.38584L10.82 11.9978C11.383 12.4438 12.176 12.4438 12.743 11.9938L17.179 8.38784C17.501 8.12484 17.973 8.17484 18.235 8.49684Z",fill:"#F5F2FF",fillOpacity:.95})),cQ=e=>M.createElement(mK,{width:"40",height:"29",viewBox:"0 0 40 29",...e},M.createElement(oK,{d:"M29.8431 28.0756C28.6 27.6408 27.4897 26.9403 26.3499 26.2989C25.9038 26.048 25.4406 25.813 24.9615 25.6337C24.3315 25.3975 23.6719 25.5111 23.026 25.5973C22.0712 25.7234 21.1665 25.9947 20.3264 26.484C20.1788 26.5702 19.929 26.5691 19.7463 26.4953C19.6316 26.4488 19.5147 26.3727 19.3978 26.3125C18.5361 25.8755 17.6109 25.6643 16.6584 25.5394C15.7321 25.418 14.875 25.5883 14.0724 26.0651C13.4957 26.4079 12.9122 26.7394 12.3309 27.072C10.7507 27.9779 9.06826 28.5864 7.25074 28.7737C6.13367 28.8884 3.87456 28.8884 2.57812 28.5898C1.70853 28.407 0.858238 28.1312 0 27.8951C0 19.1628 0 10.4317 0 1.69951C0.662977 2.0923 1.33957 2.45444 2.09678 2.63948C3.20817 2.91081 4.33887 3.00957 5.47751 3.08563C6.8852 3.17986 8.24975 3.01865 9.54392 2.46579C10.5236 2.04803 11.467 1.54512 12.4285 1.08308C13.5025 0.566546 14.556 0.0273115 15.8081 0.0205C17.2158 0.0125534 18.5588 0.255494 19.8643 0.761808C19.9472 0.793595 20.0619 0.799268 20.1447 0.769752C21.3095 0.34858 23.6118 -0.225849 25.0422 0.0920169C25.855 0.272519 26.3726 0.516597 27.0061 0.803811C28.0119 1.26018 28.9837 1.78692 29.9827 2.25805C30.9068 2.69398 31.8763 3.02319 32.9014 3.06179C33.8289 3.09698 34.7632 3.0686 35.6895 2.99936C37.1392 2.89151 37.7942 2.87334 39.1032 2.15474C39.6458 1.85731 39.9557 1.4963 40 1.48155C40 10.207 40 19.2116 40 27.9405C38.5253 28.39 37.1301 28.7715 35.484 28.9031C32.8253 29.0473 30.9919 28.4774 29.8431 28.0756ZM19.2945 24.7198C19.2945 17.1739 19.2945 9.62345 19.2945 2.05824C19.2366 2.03327 19.1787 2.00035 19.1162 1.98332C18.5656 1.83233 18.0184 1.67 17.4633 1.53831C16.1771 1.2318 14.9454 1.36121 13.7715 2.00148C13.1086 2.36362 12.4229 2.68262 11.7485 3.02319C9.94012 3.93706 8.05222 4.72037 5.98155 4.58528C4.84745 4.51149 3.81098 4.37753 2.60082 4.17319C2.07407 4.07783 1.80275 4.00404 1.39634 3.91435C1.39634 11.5749 1.39634 19.2196 1.39634 26.8688C1.47807 26.8926 1.54619 26.9119 1.61317 26.9312C3.52945 27.483 5.47637 27.6294 7.44941 27.3433C9.26352 27.08 10.8937 26.3386 12.4331 25.3771C13.2244 24.8821 14.0292 24.3974 14.9522 24.2135C16.4405 23.9172 17.8697 24.2475 19.2945 24.7198ZM38.6264 3.92117C38.5821 3.92911 38.5537 3.93252 38.5276 3.93933C37.3299 4.25265 36.1084 4.39456 34.8744 4.47176C33.2533 4.57279 31.6515 4.48651 30.1428 3.83943C28.8906 3.30246 27.6725 2.68376 26.4408 2.09798C25.7199 1.75514 25.0047 1.38846 24.1794 1.38165C23.3234 1.37483 22.4856 1.50879 21.6637 1.74606C21.3436 1.83801 21.0291 1.94926 20.7124 2.05257C20.7124 9.63594 20.7124 17.1864 20.7124 24.705C21.2584 24.5643 21.8033 24.3974 22.3596 24.2861C23.1872 24.1215 24.0261 24.0239 24.8673 24.1681C25.7517 24.3191 26.518 24.755 27.2865 25.1977C28.1413 25.6893 28.9996 26.1888 29.901 26.5793C32.1237 27.5431 34.4521 27.6816 36.8225 27.2888C37.4253 27.1889 38.0213 27.0425 38.6252 26.9165C38.6264 19.2298 38.6264 11.5851 38.6264 3.92117Z",fill:wL.icon}),M.createElement(oK,{d:"M25.7222 22.1271C25.7222 21.6866 25.7222 21.2586 25.7222 20.8125C26.401 20.8125 27.0799 20.8125 27.7803 20.8125C27.7803 18.6669 27.7803 16.5383 27.7803 14.3916C27.131 14.3916 26.4907 14.3916 25.8391 14.3916C25.8391 13.9602 25.8391 13.547 25.8391 13.1235C27.9643 13.1235 30.094 13.1235 32.2407 13.1235C32.2407 15.6801 32.2407 18.2344 32.2407 20.8011C32.8946 20.8011 33.5314 20.8011 34.1842 20.8011C34.1842 21.2473 34.1842 21.6832 34.1842 22.1282C31.3654 22.1271 28.5546 22.1271 25.7222 22.1271Z",fill:wL.icon}),M.createElement(oK,{d:"M30.1452 11.5738C28.9521 11.5784 27.9372 10.5624 27.9292 9.3556C27.9224 8.15338 28.9339 7.13281 30.1361 7.1294C31.3576 7.126 32.3714 8.13295 32.3737 9.35219C32.376 10.5567 31.3599 11.5693 30.1452 11.5738Z",fill:wL.icon})),dQ=e=>M.createElement(mK,{width:"41",height:"38",viewBox:"0 0 41 38",fill:e?.color,...e},M.createElement(oK,{d:"M1 36.5699V23.38L6.78992 13.95L11.38 21.1L15.77 13.95L20.2799 20.9L24.52 13.95L29.2799 21.72H29.2999V1H39.6599L39.5 36.5699H1Z",stroke:wL.icon,strokeWidth:"1.5",strokeMiterlimit:"10"})),hQ=e=>M.createElement(mK,{width:140,height:140,viewBox:"0 0 140 140",fill:"none",...e},M.createElement(oK,{fillRule:"evenodd",clipRule:"evenodd",d:"M111.495 29.6715C113.197 31.386 113.188 34.1561 111.473 35.8586L101.55 45.712C101.33 45.9911 101.078 46.2395 100.803 46.4538L83.6298 63.5069C83.3936 63.8126 83.1188 64.085 82.8138 64.3172L41.0996 105.739C39.385 107.441 36.615 107.431 34.9125 105.716C33.2099 104.002 33.2197 101.232 34.9343 99.5295L70.0434 64.6666C57.5051 65.1969 46.0982 70.2859 37.5436 78.3271C35.783 79.982 33.0142 79.8963 31.3594 78.1358C29.7045 76.3753 29.7902 73.6062 31.5508 71.9513C42.165 61.9745 56.5252 55.8711 72.2169 55.8711C74.3467 55.8711 76.4607 55.9758 78.5612 56.2088L89.812 45.0365C84.1793 43.6293 78.2888 42.9047 72.2157 42.9047C53.1182 42.9047 35.693 50.2834 22.697 62.3904C20.9291 64.0378 18.1608 63.9398 16.5137 62.1717C14.8667 60.4036 14.9647 57.6353 16.7327 55.9882C31.2867 42.4296 50.8221 34.1547 72.2157 34.1547C80.7902 34.1547 89.0904 35.4508 96.9263 37.9726L105.308 29.6497C107.023 27.9472 109.792 27.9569 111.495 29.6715ZM108.253 47.4031C109.499 45.333 112.187 44.665 114.258 45.9112C119.122 48.8397 123.6 52.2586 127.687 56.0404C129.46 57.6816 129.567 60.4497 127.926 62.223C126.285 63.9964 123.516 64.1037 121.743 62.4622C118.066 59.059 114.063 56.0074 109.745 53.4077C107.675 52.1615 107.007 49.4732 108.253 47.4031ZM91.8245 63.8762C92.8132 61.6718 95.4021 60.6859 97.6071 61.6747C103.309 64.2326 108.483 67.7466 112.946 71.9577C114.703 73.6155 114.784 76.3846 113.125 78.1422C111.467 79.8998 108.699 79.9797 106.941 78.3219C103.163 74.7571 98.8018 71.8008 94.026 69.6588C91.8216 68.67 90.8357 66.0812 91.8245 63.8762ZM74.0894 82.1689C74.5322 79.7936 76.8171 78.2274 79.1924 78.6701C86.3412 80.0036 92.801 83.405 97.8591 88.1289C99.6248 89.7779 99.7193 92.5464 98.0697 94.3122C96.4206 96.0779 93.6521 96.1724 91.8863 94.5234C87.999 90.8921 83.0395 88.2887 77.5882 87.2719C75.2129 86.8292 73.6461 84.5443 74.0894 82.1689ZM72.1831 108.499C70.3456 108.499 68.6417 109.219 67.356 110.43C65.5973 112.088 62.8287 112.005 61.1715 110.246C59.5148 108.488 59.5971 105.719 61.3558 104.062C64.1908 101.391 68.0152 99.7494 72.1831 99.7494C76.3504 99.7494 80.1747 101.391 83.0098 104.062C84.7685 105.719 84.8507 108.488 83.1941 110.246C81.5368 112.005 78.7683 112.088 77.0096 110.43C75.7239 109.219 74.02 108.499 72.1831 108.499Z",fill:"url(#paint0_linear_29840_35249)"}),M.createElement(OZ,null,M.createElement(iK,{id:"paint0_linear_29840_35249",x1:15.3398,y1:28.3792,x2:141.357,y2:56.3442,gradientUnits:"userSpaceOnUse"},M.createElement(hK,{stopColor:"#A200FF"}),M.createElement(hK,{offset:1e-4,stopColor:"#A200FF"}),M.createElement(hK,{offset:1,stopColor:"#FF8600"}))));function mQ(e){return M.createElement(mK,{width:49,height:48,viewBox:"0 0 49 48",fill:"none",...e},M.createElement(oK,{fillRule:"evenodd",clipRule:"evenodd",d:"M19.535 42a1.5 1.5 0 011.5-1.5h7.926a1.5 1.5 0 010 3h-7.926a1.5 1.5 0 01-1.5-1.5zM19.535 6a1.5 1.5 0 011.5-1.5h7.926a1.5 1.5 0 010 3h-7.926a1.5 1.5 0 01-1.5-1.5zM7 18.54a1.5 1.5 0 011.5 1.499v7.924a1.5 1.5 0 01-3 0v-7.924a1.5 1.5 0 011.5-1.5zM43 18.54a1.5 1.5 0 011.5 1.499v7.924a1.5 1.5 0 01-3 0v-7.924a1.5 1.5 0 011.5-1.5zM24.473 31.574a1.5 1.5 0 011.5 1.5v.088a1.5 1.5 0 01-3 0v-.088a1.5 1.5 0 011.5-1.5zM18.324 20.084A6.66 6.66 0 0125 13.408a6.67 6.67 0 016.675 6.676c0 2.604-1.489 4.445-3.437 5.522l-.343.193c-.576.324-1.032.58-1.404.915-.372.334-.527.636-.522 1.057a1.5 1.5 0 11-3 .039c-.02-1.51.69-2.583 1.515-3.326.645-.58 1.446-1.026 2.014-1.342l.265-.148.018-.01c1.231-.68 1.894-1.63 1.894-2.9A3.67 3.67 0 0025 16.408a3.66 3.66 0 00-3.676 3.676 1.5 1.5 0 01-3 0zM6.847 32.343A1.5 1.5 0 018.54 33.62c.538 3.843 3.007 6.41 6.782 6.85a1.5 1.5 0 11-.348 2.98c-5.235-.611-8.693-4.326-9.405-9.415a1.5 1.5 0 011.278-1.693zM43.063 32.343a1.5 1.5 0 011.278 1.693c-.712 5.085-4.147 8.801-9.385 9.414a1.5 1.5 0 11-.349-2.98c3.771-.44 6.224-3.002 6.763-6.85a1.5 1.5 0 011.693-1.277zM16.638 5.865a1.5 1.5 0 01-1.316 1.664c-3.77.442-6.243 3.022-6.782 6.87a1.5 1.5 0 11-2.97-.416c.71-5.085 4.165-8.82 9.404-9.434a1.5 1.5 0 011.664 1.316zM33.292 5.865a1.5 1.5 0 011.664-1.316c5.242.614 8.674 4.354 9.385 9.434a1.5 1.5 0 11-2.971.416c-.54-3.852-2.996-6.429-6.763-6.87a1.5 1.5 0 01-1.315-1.664z",fill:wL.bgEmptyOnBg}))}const pQ=e=>M.createElement(mK,{width:24,height:25,viewBox:"0 0 24 25",fill:"none",...e},M.createElement(oK,{d:"M20.9369 17.9484L18.4094 18.4528L17.9078 15.9393",stroke:e?.color??wL.icon,strokeWidth:1.44,strokeLinecap:"round",strokeLinejoin:"round"}),M.createElement(oK,{d:"M3.68064 6.78526L6.19133 6.20428L6.76944 8.7019",stroke:e?.color??wL.icon,strokeWidth:1.44,strokeLinecap:"round",strokeLinejoin:"round"}),M.createElement(oK,{d:"M18.3836 18.2968C21.7013 15.066 21.8396 9.7597 18.6638 6.35981C16.6744 4.22928 13.8508 3.34661 11.171 3.74264",stroke:e?.color??wL.icon,strokeWidth:1.44,strokeLinecap:"round",strokeLinejoin:"round"}),M.createElement(oK,{d:"M6.22222 6.36179C3.00353 9.69069 3.0259 14.9998 6.30344 18.3026C8.35649 20.3705 11.2053 21.1682 13.8719 20.6908",stroke:e?.color??wL.icon,strokeWidth:1.44,strokeLinecap:"round",strokeLinejoin:"round"})),fQ=e=>M.createElement(mK,{width:16,height:16,viewBox:"0 0 16 16",fill:"none",...e},M.createElement(oK,{d:"M7 12C9.76142 12 12 9.76142 12 7C12 4.23858 9.76142 2 7 2C4.23858 2 2 4.23858 2 7C2 9.76142 4.23858 12 7 12Z",stroke:wL.icon,strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),M.createElement(oK,{d:"M10.6666 11.3333L14 13.9999",stroke:wL.icon,strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),gQ=e=>M.createElement(mK,{width:39,height:25,viewBox:"0 0 39 25",fill:"none",...e},M.createElement(oK,{d:"M0 0.569824V24.7127H39V0.569824H0ZM1.15617 1.71512H37.8438V23.5685H1.15617V1.71512ZM23.3605 6.55721C22.882 6.56019 21.2049 6.58767 21.2 6.59248C21.1908 6.60164 21.1956 18.3199 21.2049 18.4937L21.2139 18.6678L21.3242 18.6742C21.3846 18.6774 21.9166 18.6793 22.5065 18.6786C23.4462 18.6774 23.5815 18.6744 23.6007 18.6554C23.6199 18.6364 23.6234 18.5141 23.6257 17.6961C23.6271 17.1805 23.6326 16.3241 23.6382 15.7927C23.644 15.261 23.6507 14.3077 23.6532 13.6739C23.6576 12.595 23.6705 11.9472 23.6879 11.9298C23.7075 11.9103 23.763 11.9926 23.85 12.1696C23.9025 12.2764 23.9695 12.4058 23.9991 12.4569C24.0287 12.5079 24.1344 12.7077 24.2341 12.9005C24.3335 13.0936 24.4863 13.3866 24.5735 13.552C24.715 13.82 24.7967 13.9728 25.0288 14.4039C25.0649 14.4707 25.2261 14.7736 25.387 15.0766C25.8041 15.8625 26.0923 16.4056 26.246 16.6945C26.3193 16.8324 26.4368 17.0545 26.5066 17.1883C26.8722 17.8895 27.2704 18.6014 27.324 18.6495C27.3506 18.6733 27.386 18.6767 27.6529 18.6818C27.8173 18.6848 27.9551 18.6905 27.959 18.6946C27.9731 18.7097 29.6988 18.6848 29.7145 18.6692C29.7247 18.6591 29.7324 18.056 29.7384 16.8044C29.7509 14.2607 29.7548 6.61928 29.7439 6.60141C29.7379 6.59202 29.3212 6.58721 28.5313 6.58721H27.3277L27.3183 7.38411C27.3067 8.33975 27.3086 11.5502 27.3213 12.4926C27.3264 12.8628 27.3271 13.2203 27.3231 13.2872L27.316 13.4088L27.278 13.3587C27.2373 13.3048 27.0919 13.0625 27.0919 13.0487C27.0919 13.0442 27.06 12.9848 27.0214 12.9168C26.9827 12.8488 26.9141 12.7223 26.8683 12.6358C26.8225 12.5492 26.7672 12.4493 26.7455 12.414C26.7238 12.3785 26.5804 12.108 26.4271 11.8125C26.2738 11.5173 26.1383 11.2596 26.1258 11.2399C26.1135 11.2204 25.9887 10.9852 25.8481 10.7174C25.7077 10.4498 25.5294 10.1115 25.452 9.96584C25.3747 9.82016 25.2705 9.62362 25.2203 9.52925C25.1703 9.43465 24.9997 9.11259 24.8411 8.81344C24.4743 8.12214 24.1289 7.45993 23.9485 7.1026C23.7866 6.78146 23.6932 6.61699 23.6532 6.58103C23.6285 6.55881 23.5942 6.55583 23.3605 6.55721ZM14.2773 6.57507C13.5973 6.5627 12.8139 6.65662 12.1981 6.82933C11.414 7.049 10.9679 7.26111 10.4846 7.64295C10.0904 7.95447 9.80758 8.28454 9.58628 8.69181C9.35436 9.11832 9.2207 9.76175 9.27111 10.2091C9.30325 10.4947 9.34164 10.6546 9.43853 10.9041C9.67693 11.517 10.1033 12.0457 10.6525 12.4094C11.1182 12.7178 11.386 12.8279 12.3181 13.093C13.2421 13.3557 14.1053 13.5483 15.046 13.7016C15.7276 13.8124 15.9362 13.8523 16.0676 13.8965C16.342 13.989 16.6209 14.1686 16.7777 14.3537C16.8834 14.479 16.925 14.5486 16.9721 14.6799C17.0057 14.7726 17.0096 14.8049 17.0101 14.9909C17.0108 15.1462 17.0045 15.2218 16.9853 15.2915C16.8272 15.8678 16.4442 16.2407 15.7861 16.4583C15.2992 16.6193 14.5097 16.6688 13.9261 16.5751C12.8453 16.4013 12.2126 16.0048 11.8413 15.2695C11.7326 15.0544 11.6353 14.8086 11.5983 14.6545C11.5377 14.402 11.524 14.3677 11.4836 14.3704C11.4637 14.3716 11.3758 14.3796 11.2884 14.3878C11.201 14.3961 10.9538 14.4188 10.7392 14.4387C9.93822 14.5131 9.26926 14.5873 9.25261 14.6038C9.23851 14.6176 9.26672 14.8011 9.33147 15.1188C9.51507 16.0196 9.88874 16.7836 10.4368 17.3775C10.9182 17.8995 11.6704 18.2718 12.6252 18.4612C13.1468 18.5645 13.8486 18.6474 14.374 18.6678C14.9463 18.69 15.4289 18.6454 16.1515 18.5031C17.2272 18.2917 17.8074 18.0175 18.3855 17.4465C18.6058 17.2286 18.7321 17.0646 18.8888 16.7925C18.9904 16.6166 19.1462 16.2787 19.1982 16.1218C19.3152 15.7702 19.3867 15.2802 19.3687 14.9577C19.3532 14.6868 19.3076 14.3267 19.2611 14.1104C19.2123 13.8837 19.1955 13.8308 19.1039 13.6093C18.9409 13.2155 18.7742 12.9631 18.4937 12.685C18.1743 12.3684 17.8256 12.1483 17.3872 11.9866C17.1599 11.9028 17.0089 11.8654 16.5275 11.7754C15.554 11.5935 14.8251 11.43 14.1788 11.2481C14.0278 11.2055 13.7839 11.1372 13.6371 11.0965C12.4101 10.7559 12.0327 10.4863 12.0327 9.94935C12.0327 9.67837 12.165 9.40762 12.4212 9.15428C12.5354 9.04113 12.7301 8.89797 12.8552 8.8352C13.1697 8.67738 13.7991 8.54796 14.2512 8.54842C14.627 8.54888 15.249 8.65241 15.5917 8.77084C15.8271 8.85238 16.0715 9.01501 16.1977 9.17444C16.3695 9.39136 16.5434 9.7125 16.6651 10.0373C16.7557 10.2794 16.7562 10.2808 16.8057 10.2808C16.829 10.2808 16.9564 10.2746 17.0887 10.2668C17.2212 10.2593 17.479 10.2462 17.6619 10.238C18.2497 10.2109 18.8012 10.1812 18.8877 10.1715C18.9846 10.161 19.0149 10.1385 19.0059 10.0836C18.9453 9.71548 18.8329 9.28301 18.7314 9.02761C18.6558 8.83772 18.4902 8.52139 18.3822 8.36013C18.0173 7.81543 17.6048 7.45466 17.026 7.17406C16.3404 6.84216 15.5507 6.65387 14.562 6.58721C14.4697 6.58103 14.3745 6.57691 14.2773 6.57507Z",fill:wL.icon}));function _Q(e){return M.createElement(mK,{width:48,height:48,viewBox:"0 0 56 56",...e},M.createElement(oK,{fillRule:"evenodd",clipRule:"evenodd",d:"M28 51.615c13.255 0 24-10.745 24-24s-10.745-24-24-24-24 10.745-24 24 10.745 24 24 24zm-6.137-15.402a1 1 0 001.51 1.302l9.334-9.334.097-.112a1 1 0 00-.097-1.302l-9.333-9.333-.112-.097a1 1 0 00-1.302.097l-.097.112a1 1 0 00.097 1.302l8.625 8.626L21.96 36.1l-.097.113z",fill:"#F5F2FF"}))}const vQ=e=>M.createElement(mK,{width:24,height:24,viewBox:"0 0 24 24",fill:"none",...e},M.createElement(oK,{d:"M12 2C17.53 2 22 6.48 22 12C22 17.53 17.53 22 12 22C6.48 22 2 17.53 2 12C2 6.48 6.48 2 12 2ZM11.65 6.93C11.24 6.93 10.9 7.26 10.9 7.68V12.73C10.9 12.99 11.04 13.23 11.27 13.37L15.19 15.71C15.31 15.78 15.44 15.82 15.58 15.82C15.83 15.82 16.08 15.69 16.22 15.45C16.43 15.1 16.32 14.64 15.96 14.42L12.4 12.3V7.68C12.4 7.26 12.06 6.93 11.65 6.93Z",fill:e?.color??wL.icon})),yQ=e=>M.createElement(mK,{width:24,height:25,viewBox:"0 0 24 25",fill:"none",...e},M.createElement(oK,{d:"M10.7741 14.6419L4.20561 11.4315C2.80076 10.7449 2.80076 8.74314 4.20468 8.05658L10.479 4.98999C11.3019 4.5874 12.264 4.5874 13.0869 4.98999L19.3686 8.05939C20.7734 8.74594 20.7734 10.7486 19.3686 11.4351L13.0897 14.5037C12.264 14.9072 11.2991 14.9072 10.4733 14.5037L6.48478 12.5542",stroke:"#F5F2FF",strokeOpacity:.95,strokeWidth:1.44,strokeLinecap:"round",strokeLinejoin:"round"}),M.createElement(oK,{d:"M20.4317 9.73553L20.3999 14.9328",stroke:"#F5F2FF",strokeOpacity:.95,strokeWidth:1.44,strokeLinecap:"round",strokeLinejoin:"round"}),M.createElement(oK,{d:"M6.4856 12.5555V17.3278C6.4856 18.1498 6.97319 18.9064 7.7326 19.2202C10.3966 20.3196 13.0494 20.3337 15.6919 19.2268C16.4457 18.911 16.9286 18.1563 16.9286 17.339V12.6424",stroke:"#F5F2FF",strokeOpacity:.95,strokeWidth:1.44,strokeLinecap:"round",strokeLinejoin:"round"})),bQ=e=>M.createElement(mK,{width:"41",height:"26",viewBox:"0 0 41 26",...e},M.createElement(oK,{fillRule:"evenodd",clipRule:"evenodd",d:"M38.731 1.43448H1.43448V24.5655H38.731V1.43448ZM0 0V26H40.1655V0H0Z",fill:wL.icon}),M.createElement(oK,{d:"M5.86475 6.40173H8.48226V13.423C8.48226 14.5372 8.51468 15.2594 8.57953 15.5895C8.69154 16.1201 8.95683 16.5475 9.37539 16.8718C9.79986 17.1901 10.3776 17.3493 11.1086 17.3493C11.8514 17.3493 12.4115 17.199 12.7888 16.8983C13.1661 16.5917 13.393 16.2174 13.4697 15.7753C13.5463 15.3331 13.5846 14.5991 13.5846 13.5734V6.40173H16.2021V13.2108C16.2021 14.7672 16.1314 15.8666 15.9899 16.5092C15.8484 17.1518 15.5861 17.6942 15.2029 18.1363C14.8256 18.5785 14.3186 18.9322 13.6819 19.1975C13.0452 19.4569 12.214 19.5866 11.1882 19.5866C9.95019 19.5866 9.00989 19.4451 8.3673 19.1621C7.73061 18.8732 7.22656 18.5018 6.85516 18.0479C6.48375 17.5881 6.2391 17.1076 6.12119 16.6065C5.95023 15.8637 5.86475 14.7672 5.86475 13.3169V6.40173Z",fill:wL.icon}),M.createElement(oK,{d:"M18.9611 6.40173H23.7452C24.824 6.40173 25.6464 6.48427 26.2124 6.64934C26.9728 6.87336 27.6243 7.27129 28.1666 7.84313C28.709 8.41498 29.1217 9.11652 29.4047 9.94775C29.6876 10.7731 29.8291 11.793 29.8291 13.0074C29.8291 14.0745 29.6965 14.9941 29.4312 15.7664C29.1069 16.7097 28.6442 17.4731 28.0428 18.0567C27.5889 18.4989 26.9758 18.8438 26.2035 19.0914C25.6258 19.2741 24.8535 19.3655 23.8867 19.3655H18.9611V6.40173ZM21.5787 8.59478V17.1813H23.5329C24.264 17.1813 24.7916 17.14 25.1158 17.0575C25.5403 16.9514 25.8911 16.7716 26.1681 16.5181C26.4511 16.2646 26.681 15.8489 26.8579 15.2712C27.0347 14.6876 27.1232 13.8947 27.1232 12.8925C27.1232 11.8903 27.0347 11.1209 26.8579 10.5844C26.681 10.048 26.4334 9.62941 26.1151 9.32875C25.7967 9.02809 25.3929 8.8247 24.9036 8.71858C24.5381 8.63605 23.8218 8.59478 22.7548 8.59478H21.5787Z",fill:wL.icon}),M.createElement(oK,{d:"M31.978 19.3655V6.40173H34.5955V19.3655H31.978Z",fill:wL.icon})),wQ=e=>M.createElement(mK,{width:"82",height:"28",viewBox:"0 0 82 28",...e},M.createElement(oK,{fillRule:"evenodd",clipRule:"evenodd",d:"M40.2613 1.10811H1.10811V26.2252H40.2613V1.10811ZM0 0V27.3333H41.3694V0H0Z",fill:wL.icon}),M.createElement(oK,{fillRule:"evenodd",clipRule:"evenodd",d:"M80.8919 1.10811H41.3693V26.2252H80.8919V1.10811ZM40.2612 0V27.3333H82V0H40.2612Z",fill:wL.icon}),M.createElement(oK,{d:"M10.1362 8.20728H12.4318V14.365C12.4318 15.3422 12.4602 15.9755 12.5171 16.265C12.6153 16.7304 12.848 17.1052 13.2151 17.3896C13.5873 17.6688 14.094 17.8084 14.7351 17.8084C15.3866 17.8084 15.8777 17.6765 16.2086 17.4128C16.5395 17.144 16.7386 16.8157 16.8058 16.4279C16.873 16.0401 16.9066 15.3965 16.9066 14.4968V8.20728H19.2022V14.1789C19.2022 15.5438 19.1402 16.508 19.0161 17.0716C18.892 17.6352 18.6619 18.1108 18.3258 18.4986C17.9949 18.8863 17.5503 19.1966 16.9919 19.4292C16.4335 19.6567 15.7045 19.7704 14.8049 19.7704C13.7192 19.7704 12.8945 19.6464 12.331 19.3982C11.7726 19.1449 11.3305 18.8191 11.0048 18.421C10.6791 18.0177 10.4645 17.5964 10.3611 17.1569C10.2112 16.5055 10.1362 15.5438 10.1362 14.2719V8.20728Z",fill:wL.icon}),M.createElement(oK,{d:"M21.343 19.5766V8.20728H23.6385V13.256L28.2762 8.20728H31.3628L27.0819 12.6356L31.5955 19.5766H28.6252L25.4998 14.2409L23.6385 16.141V19.5766H21.343Z",fill:wL.icon}),M.createElement(oK,{d:"M45.9097 19.5766V8.20728H50.7412C51.9562 8.20728 52.8377 8.31068 53.3858 8.51749C53.939 8.71913 54.3811 9.08104 54.7119 9.60323C55.0428 10.1254 55.2083 10.7226 55.2083 11.3947C55.2083 12.2478 54.9575 12.9535 54.456 13.5119C53.9545 14.0651 53.2048 14.4141 52.207 14.5589C52.7033 14.8484 53.1118 15.1664 53.4323 15.5128C53.758 15.8592 54.1949 16.4744 54.743 17.3585L56.1312 19.5766H53.3858L51.7262 17.1026C51.1367 16.2185 50.7335 15.6627 50.5163 15.4352C50.2992 15.2026 50.0691 15.0449 49.8261 14.9622C49.5831 14.8743 49.1979 14.8303 48.6706 14.8303H48.2052V19.5766H45.9097ZM48.2052 13.0156H49.9037C51.0049 13.0156 51.6925 12.969 51.9666 12.876C52.2406 12.7829 52.4552 12.6226 52.6103 12.3951C52.7654 12.1677 52.8429 11.8833 52.8429 11.5421C52.8429 11.1595 52.7395 10.8518 52.5327 10.6192C52.3311 10.3813 52.0441 10.2314 51.6719 10.1694C51.4857 10.1435 50.9274 10.1306 49.9967 10.1306H48.2052V13.0156Z",fill:wL.icon}),M.createElement(oK,{d:"M57.0621 19.5766V8.20728H65.4921V10.1306H59.3577V12.6511H65.0656V14.5666H59.3577V17.661H65.7093V19.5766H57.0621Z",fill:wL.icon}),M.createElement(oK,{d:"M67.3382 19.5766V8.20728H71.022C72.4179 8.20728 73.3279 8.26415 73.7519 8.37789C74.4033 8.54851 74.9488 8.92076 75.3882 9.49466C75.8277 10.0634 76.0474 10.8001 76.0474 11.7049C76.0474 12.4029 75.9208 12.9897 75.6674 13.4654C75.4141 13.941 75.0909 14.3159 74.698 14.5899C74.3102 14.8587 73.9147 15.0371 73.5114 15.125C72.9634 15.2336 72.1698 15.2879 71.1306 15.2879H69.6338V19.5766H67.3382ZM69.6338 10.1306V13.3568H70.8902C71.7949 13.3568 72.3999 13.2973 72.7049 13.1784C73.0099 13.0595 73.2478 12.8734 73.4184 12.62C73.5942 12.3667 73.6821 12.072 73.6821 11.7359C73.6821 11.3223 73.5606 10.9811 73.3176 10.7122C73.0746 10.4434 72.7669 10.2754 72.3947 10.2081C72.1207 10.1564 71.57 10.1306 70.7428 10.1306H69.6338Z",fill:wL.icon})),SQ=e=>M.createElement(mK,{width:24,height:24,viewBox:"0 0 24 24",fill:"none",...e},M.createElement(oK,{fillRule:"evenodd",clipRule:"evenodd",d:"M11.9617 12.9951H11.9927C14.8247 12.9951 17.1287 10.6912 17.1287 7.85917C17.1287 5.02717 14.8247 2.72217 11.9927 2.72217C9.15975 2.72217 6.85575 5.02717 6.85575 7.85617C6.85075 9.22517 7.37975 10.5132 8.34375 11.4841C9.30675 12.4541 10.5917 12.9911 11.9617 12.9951ZM8.35575 7.85917C8.35575 5.85417 9.98775 4.22217 11.9927 4.22217C13.9977 4.22217 15.6287 5.85417 15.6287 7.85917C15.6287 9.86417 13.9977 11.4951 11.9927 11.4951H11.9647C10.9967 11.4931 10.0897 11.1131 9.40775 10.4262C8.72575 9.74017 8.35275 8.82917 8.35575 7.85917Z",fill:e?.color??wL.icon}),M.createElement(oK,{fillRule:"evenodd",clipRule:"evenodd",d:"M4.40552 19.8591C4.40552 23.4841 10.1215 23.4841 11.9995 23.4841C13.8775 23.4841 19.5945 23.4841 19.5945 19.8371C19.5945 17.0441 16.1165 14.6841 11.9995 14.6841C7.88352 14.6841 4.40552 17.0541 4.40552 19.8591ZM5.90552 19.8591C5.90552 18.1241 8.51152 16.1841 11.9995 16.1841C15.4885 16.1841 18.0945 18.1131 18.0945 19.8371C18.0945 21.2611 16.0435 21.9841 11.9995 21.9841C7.95652 21.9841 5.90552 21.2691 5.90552 19.8591Z",fill:e?.color??wL.icon})),kQ=e=>M.createElement(mK,{width:24,height:24,viewBox:"0 0 24 24",fill:"none",...e},M.createElement(oK,{d:"M10.6279 3.35309C11.9877 2.59902 13.7174 3.09447 14.4773 4.44209L21.746 17.0572C21.906 17.4338 21.976 17.7399 21.996 18.058C22.036 18.8012 21.776 19.5236 21.2661 20.0795C20.7562 20.6334 20.0663 20.9604 19.3164 21H4.6789C4.36896 20.9812 4.05901 20.9108 3.76906 20.8018C2.3193 20.2172 1.61942 18.5723 2.20932 17.1464L9.52809 4.43317C9.77804 3.98628 10.158 3.60082 10.6279 3.35309ZM11.9977 15.2726C11.5178 15.2726 11.1178 15.669 11.1178 16.1456C11.1178 16.6202 11.5178 17.0176 11.9977 17.0176C12.4776 17.0176 12.8675 16.6202 12.8675 16.1347C12.8675 15.66 12.4776 15.2726 11.9977 15.2726ZM11.9977 9.09039C11.5178 9.09039 11.1178 9.47585 11.1178 9.95248V12.7557C11.1178 13.2314 11.5178 13.6287 11.9977 13.6287C12.4776 13.6287 12.8675 13.2314 12.8675 12.7557V9.95248C12.8675 9.47585 12.4776 9.09039 11.9977 9.09039Z",fill:e?.color??wL.icon}));function CQ(e,t){switch(e){case"Walk":return(e=>M.createElement(mK,{width:24,height:25,viewBox:"0 0 24 25",fill:"none",...e},M.createElement(oK,{fillRule:"evenodd",clipRule:"evenodd",d:"M12.2239 7.41804C13.5829 7.41804 14.6889 6.31204 14.6889 4.95204C14.6889 3.59404 13.5829 2.48804 12.2239 2.48804C10.8649 2.48804 9.75995 3.59404 9.75995 4.95204C9.75995 6.31204 10.8649 7.41804 12.2239 7.41804ZM17.2186 12.6578C16.7666 12.5448 16.3446 12.2298 15.9296 11.6948C15.736 11.4433 15.5593 11.1839 15.3846 10.9274L15.3836 10.9258C14.8046 10.0758 14.1476 9.11379 12.9596 8.53979C11.3796 7.77979 9.59864 7.89579 8.30964 8.84679C6.44764 10.2228 6.09164 12.7888 6.02664 13.5428C5.97964 14.0928 6.38664 14.5768 6.93764 14.6238C7.47564 14.6808 7.97164 14.2638 8.01864 13.7138C8.11064 12.6468 8.55264 11.1538 9.49664 10.4558C9.73364 10.2818 10.0186 10.1838 10.3166 10.1198L9.80764 12.1978C9.41064 13.7618 9.76664 15.4568 10.7606 16.7318L14.5416 21.6018C14.7396 21.8558 15.0346 21.9888 15.3326 21.9888C15.5466 21.9888 15.7626 21.9198 15.9456 21.7788C16.3816 21.4398 16.4606 20.8108 16.1216 20.3748L12.3386 15.5038C11.7216 14.7108 11.4996 13.6588 11.7476 12.6818L12.2906 10.4688C12.8766 10.8268 13.2816 11.3938 13.7316 12.0528C13.9286 12.3428 14.1286 12.6348 14.3486 12.9188C15.0496 13.8238 15.8306 14.3728 16.7356 14.5978C16.8166 14.6188 16.8976 14.6278 16.9776 14.6278C17.4266 14.6278 17.8346 14.3248 17.9476 13.8698C18.0806 13.3338 17.7546 12.7908 17.2186 12.6578ZM6.69495 20.3892L8.70595 17.7032C9.03795 17.2612 9.66395 17.1712 10.106 17.5012C10.548 17.8322 10.638 18.4592 10.308 18.9012L8.29695 21.5872C8.09995 21.8502 7.79995 21.9882 7.49495 21.9882C7.28695 21.9882 7.07695 21.9232 6.89695 21.7882C6.45495 21.4582 6.36495 20.8312 6.69495 20.3892Z",fill:e?.color??wL.icon})))(t);case"Run":return(e=>M.createElement(mK,{width:24,height:25,viewBox:"0 0 24 25",fill:"none",...e},M.createElement(oK,{d:"M17.9661 12.2324C16.6232 12.2932 15.2897 11.983 14.1117 11.3357C13.6374 11.0255 13.1929 10.672 12.784 10.2797C12.6006 10.1126 12.4163 9.9456 12.2253 9.7872C11.4615 9.19369 10.5107 8.89299 9.54458 8.93947C8.57848 8.98596 7.6609 9.37655 6.95771 10.0406C6.82035 10.1733 6.63591 10.2459 6.44499 10.2426C6.25406 10.2393 6.07228 10.1602 5.93962 10.0229C5.80698 9.88552 5.73433 9.70109 5.73766 9.51016C5.74099 9.31924 5.82002 9.13745 5.95738 9.0048C6.91167 8.08758 8.16697 7.54871 9.48922 7.48865C10.8115 7.4286 12.1104 7.85147 13.144 8.6784C13.3504 8.84928 13.551 9.03072 13.7507 9.21216C14.0945 9.54399 14.4674 9.84409 14.8653 10.1088C16.0419 10.6983 17.3657 10.9298 18.6726 10.7751C18.7676 10.7687 18.8629 10.7816 18.9527 10.8132C19.0426 10.8447 19.1252 10.8941 19.1953 10.9584C19.2655 11.0229 19.3219 11.1007 19.361 11.1875C19.4003 11.2743 19.4214 11.3682 19.4233 11.4634C19.4316 11.6541 19.3639 11.8402 19.235 11.981C19.1062 12.1218 18.9266 12.2056 18.736 12.2141C18.4902 12.2247 18.232 12.2324 17.9661 12.2324Z",fill:e?.color??wL.icon}),M.createElement(oK,{d:"M11.5341 21.5986C11.4137 21.5983 11.2953 21.5679 11.1897 21.5102C11.0841 21.4525 10.9947 21.3693 10.9295 21.2681C10.8643 21.1669 10.8254 21.0511 10.8166 20.931C10.8076 20.811 10.8289 20.6907 10.8784 20.581L11.1194 20.0606C11.6997 19.0761 12.0143 17.9576 12.0323 16.8149C11.9175 16.2344 11.6386 15.699 11.2288 15.2722C10.7643 14.741 10.4138 14.1202 10.1987 13.4482C9.63232 11.3362 10.8419 9.828 11.8134 8.61552C11.9329 8.46644 12.1066 8.37092 12.2964 8.34994C12.4863 8.32896 12.6767 8.38427 12.8258 8.50368C12.9748 8.62309 13.0704 8.79683 13.0914 8.98668C13.1123 9.17653 13.057 9.36692 12.9376 9.516C11.8634 10.86 11.2374 11.7634 11.5936 13.0747C11.7635 13.5613 12.0277 14.0096 12.3712 14.3938C12.9546 15.0283 13.3365 15.8219 13.4685 16.6738C13.4905 18.0765 13.1308 19.4589 12.4278 20.6731L12.1936 21.1781C12.136 21.3043 12.0431 21.4113 11.926 21.4859C11.809 21.5605 11.6729 21.5996 11.5341 21.5986Z",fill:e?.color??wL.icon}),M.createElement(oK,{d:"M6.00136 17.2471H5.59816C5.3428 17.2471 5.08935 17.2423 4.83591 17.2471C4.64495 17.2527 4.45965 17.182 4.32075 17.0509C4.18186 16.9198 4.10075 16.7388 4.09527 16.5478C4.08979 16.3568 4.1604 16.1716 4.29156 16.0326C4.42271 15.8937 4.60367 15.8127 4.79463 15.8071C5.06631 15.7985 5.33895 15.8014 5.61159 15.8071C6.07354 15.8222 6.53598 15.8068 6.99591 15.7611C7.64014 15.6608 8.25927 15.4382 8.81992 15.1054C8.90312 15.0605 8.99438 15.0322 9.08847 15.0225C9.18257 15.0127 9.27765 15.0217 9.36832 15.0486C9.45897 15.0757 9.54343 15.1203 9.61687 15.18C9.69031 15.2396 9.75127 15.3131 9.7962 15.3964C9.84122 15.4795 9.86944 15.5708 9.87914 15.6649C9.88893 15.7589 9.88001 15.8541 9.85303 15.9447C9.82596 16.0353 9.78141 16.1198 9.7217 16.1933C9.66208 16.2667 9.58855 16.3277 9.50535 16.3727C8.78803 16.7906 7.9976 17.0678 7.1764 17.1896C6.7863 17.2333 6.39385 17.2525 6.00136 17.2471Z",fill:e?.color??wL.icon}),M.createElement(oK,{d:"M15.0016 8.13885C14.4814 8.13885 13.9728 7.98458 13.5403 7.69555C13.1077 7.40651 12.7706 6.9957 12.5715 6.51506C12.3724 6.03441 12.3202 5.50553 12.4218 4.99528C12.5233 4.48504 12.7737 4.01634 13.1416 3.64848C13.5095 3.28061 13.9782 3.03008 14.4885 2.92859C14.9987 2.8271 15.5276 2.87919 16.0083 3.07828C16.4888 3.27737 16.8997 3.61451 17.1887 4.04708C17.4777 4.47965 17.632 4.98821 17.632 5.50845C17.6312 6.20584 17.3539 6.87445 16.8607 7.36759C16.3676 7.86071 15.699 8.13809 15.0016 8.13885ZM15.0016 4.31805C14.7662 4.31805 14.536 4.38787 14.3403 4.51867C14.1445 4.64947 13.992 4.83538 13.9018 5.0529C13.8118 5.27042 13.7882 5.50977 13.8341 5.74068C13.88 5.9716 13.9934 6.18371 14.1599 6.35019C14.3263 6.51667 14.5385 6.63005 14.7694 6.67597C15.0003 6.72191 15.2397 6.69833 15.4571 6.60824C15.6747 6.51814 15.8606 6.36557 15.9914 6.1698C16.1222 5.97404 16.192 5.74389 16.192 5.50845C16.1918 5.19281 16.0662 4.89018 15.843 4.66699C15.6199 4.4438 15.3173 4.31831 15.0016 4.31805Z",fill:e?.color??wL.icon})))(t);case"Cycling":return VK(t);case"Swim":return(e=>M.createElement(mK,{width:24,height:25,viewBox:"0 0 24 25",fill:"none",...e},M.createElement(oK,{fillRule:"evenodd",clipRule:"evenodd",d:"M15.4783 3.16847C13.8241 3.14988 12.4581 4.47976 12.4395 6.14079C12.4208 7.80102 13.7568 9.16101 15.4108 9.17959C17.0646 9.19818 18.4308 7.86853 18.4495 6.20833C18.4681 4.54732 17.1324 3.18705 15.4783 3.16847ZM11.2201 10.4843C9.55401 9.59571 7.35721 9.85949 5.93122 11.2049C5.60073 11.5167 5.08005 11.5015 4.76824 11.171C4.45644 10.8405 4.47158 10.3199 4.80207 10.0081C7.03164 7.90452 10.6515 7.7188 13.0173 9.72702C13.2557 9.92889 13.498 10.1535 13.723 10.3619L13.723 10.362L13.7231 10.362C13.8303 10.4614 13.9337 10.5572 14.0307 10.645C14.3508 10.9348 14.6494 11.1841 14.9664 11.3837C16.144 12.1257 17.6709 12.2476 19.3074 12.1942C19.7615 12.1794 20.1416 12.5356 20.1564 12.9897C20.1712 13.4438 19.8151 13.8239 19.361 13.8387C17.6834 13.8934 15.716 13.8008 14.0894 12.7759C13.6508 12.4996 13.2684 12.1745 12.9264 11.8648C12.798 11.7486 12.6796 11.6387 12.5656 11.5329L12.5656 11.5329L12.522 11.4925C11.9965 12.1701 11.6085 12.7741 11.4397 13.4295C11.3264 13.8695 10.8778 14.1343 10.4378 14.021C9.99778 13.9077 9.73297 13.4591 9.8463 13.0191C10.0938 12.0581 10.6439 11.2264 11.2201 10.4843ZM4.78191 18.232C5.85379 18.232 6.43155 17.9161 6.92362 17.6431L6.93743 17.6354C7.32803 17.4186 7.6404 17.2453 8.33869 17.2453C9.03713 17.2453 9.34901 17.419 9.73782 17.6356L9.75023 17.6425C10.2398 17.9151 10.8153 18.232 11.8824 18.232C12.9539 18.232 13.5314 17.916 14.0233 17.643L14.037 17.6354C14.4274 17.4187 14.7397 17.2453 15.4381 17.2453C16.1437 17.2453 16.4593 17.4199 16.8511 17.6367L16.8636 17.6436C17.3562 17.9161 17.9339 18.232 19.0058 18.232C19.7581 18.232 20.2749 18.0791 20.7164 17.8702C20.8776 17.7939 21.0322 17.7078 21.1592 17.6372L21.1593 17.6371L21.1593 17.6371L21.1596 17.6369L21.161 17.6362C21.191 17.6194 21.2195 17.6036 21.2461 17.589C21.3961 17.5066 21.5225 17.442 21.6609 17.3895C22.1015 17.2227 22.3416 16.6747 22.1972 16.1655C22.0529 15.6564 21.5787 15.3789 21.1381 15.5457C20.8975 15.6368 20.6952 15.7432 20.5251 15.8367C20.4833 15.8597 20.4446 15.8812 20.4081 15.9014C20.2873 15.9685 20.1903 16.0224 20.0801 16.0746C19.8341 16.191 19.5331 16.2917 19.0058 16.2917C18.3083 16.2917 17.9957 16.1188 17.6036 15.9018L17.5884 15.8934C17.0941 15.62 16.5143 15.305 15.4381 15.305C14.3662 15.305 13.7885 15.6209 13.2965 15.894L13.2825 15.9017C12.8921 16.1185 12.58 16.2917 11.8824 16.2917C11.1921 16.2917 10.8833 16.1197 10.4942 15.9029L10.479 15.8945C9.98774 15.6209 9.41013 15.305 8.33869 15.305C7.26681 15.305 6.68906 15.6209 6.19699 15.8939L6.18318 15.9016C5.79258 16.1183 5.48021 16.2917 4.78191 16.2917C4.08599 16.2917 3.81747 16.145 3.41606 15.9257L3.41604 15.9257C3.27028 15.846 3.10699 15.7568 2.89935 15.6616C2.46842 15.464 1.98044 15.7075 1.80942 16.2055C1.6384 16.7035 1.8491 17.2674 2.28003 17.4651C2.37401 17.5082 2.47474 17.5641 2.58641 17.626L2.58643 17.626C3.04185 17.8786 3.67913 18.232 4.78191 18.232ZM6.65016 21.9872C7.08672 21.8689 7.4557 21.6593 7.71739 21.5106C7.78858 21.4702 7.85182 21.4342 7.90633 21.4059C8.17298 21.2672 8.47373 21.148 9.02628 21.148C9.69729 21.148 9.99741 21.32 10.3756 21.5367L10.3903 21.5452C10.8679 21.8188 11.4293 22.1347 12.4708 22.1347C13.5127 22.1347 14.0742 21.8188 14.5525 21.5457L14.5661 21.538C14.9456 21.3212 15.2489 21.148 15.927 21.148C16.4866 21.148 16.7909 21.2678 17.0587 21.4065C17.1137 21.435 17.1776 21.4712 17.2497 21.512C17.5114 21.6604 17.8803 21.8694 18.3145 21.9871C18.7539 22.1063 19.1913 21.7795 19.2915 21.2571C19.3918 20.7347 19.1169 20.2146 18.6775 20.0954C18.4331 20.0291 18.2851 19.9455 18.0671 19.8224C17.9679 19.7663 17.8542 19.7021 17.7104 19.6276C17.2637 19.3963 16.7382 19.2077 15.927 19.2077C14.8855 19.2077 14.3241 19.5237 13.846 19.7967L13.8328 19.8043C13.4532 20.021 13.1496 20.1944 12.4708 20.1944C11.7919 20.1944 11.4887 20.0207 11.1108 19.8041L11.0987 19.7972C10.6229 19.5246 10.0635 19.2077 9.02628 19.2077C8.21967 19.2077 7.69688 19.3969 7.25219 19.6283C7.11128 19.7016 6.99927 19.765 6.9013 19.8204L6.90129 19.8204C6.68193 19.9446 6.53296 20.0289 6.28754 20.0954C5.84816 20.2144 5.57315 20.7345 5.67329 21.2569C5.77342 21.7793 6.21078 22.1063 6.65016 21.9872Z",fill:e?.color??wL.icon})))(t);default:return(e=>M.createElement(mK,{width:24,height:25,viewBox:"0 0 24 25",fill:"none",...e},M.createElement(oK,{d:"M8.779 17.4909L7.11328 21.2378",stroke:e?.color??wL.icon,strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),M.createElement(oK,{fillRule:"evenodd",clipRule:"evenodd",d:"M11.0231 7.14645C12.0982 7.14645 12.9777 6.27273 12.9777 5.19273C12.9777 4.11274 12.0982 3.23804 11.0231 3.23804C9.94792 3.23804 9.06836 4.11274 9.06836 5.19273C9.06836 6.27273 9.94792 7.14645 11.0231 7.14645Z",stroke:e?.color??wL.icon,strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),M.createElement(oK,{d:"M16.8852 10.0007C16.0436 10.421 15.2312 11.069 14.2358 11.0106C13.1354 10.9454 12.0904 10.1642 10.9589 10.4706C9.95086 10.744 9.34859 11.5896 9.29313 12.6005C9.18222 14.6106 11.3675 15.3014 12.2296 16.8251C12.97 18.1328 12.9554 19.7965 12.9846 21.2356",stroke:e?.color??wL.icon,strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),M.createElement(oK,{d:"M16.8848 8.53492L16.8853 10.0008L16.8848 21.2379",stroke:e?.color??wL.icon,strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})))(t)}}function EQ(e){const{hard:t,light:n,moderate:i}=FL.ActivityIntensity;switch(e?.toLowerCase()){case n:return{backgroundColor:wL.bgLight};case i:return{backgroundColor:wL.bgModerate};case t:return{backgroundColor:wL.bgHard};default:return{backgroundColor:wL.bgBackground}}}function xQ(e){return e<=29?"0-29":e<=45?"30-45":"46-60"}function IQ(e,t){const n=new Date,i=pY(hY(iY(new Date(e),1.5),t),n),r=Math.floor(i/60),a=i%60;return r>0?`${r}${Jj("activity_card__active_hour")} ${a}${Jj("activity_card__active_min")}`:`${a} ${Jj("activity_card__active_min")}`}const TQ={Walk:()=>Jj("new_activity_type_walk"),Run:()=>Jj("new_activity_type_run"),Cycling:()=>Jj("new_activity_type_cycling"),Swim:()=>Jj("new_activity_type_swim"),Other:()=>Jj("new_activity_type_other")},OQ={light:()=>Jj("activity_intensity_1"),moderate:()=>Jj("activity_intensity_2"),hard:()=>Jj("activity_intensity_3")},RQ=Hq;function AQ(e,t,n){if(t===n)return e;switch(n){case FL.BloodGlucoseUnit.MG_DL:return e*FL.CONSTANTS.MGDL_PER_MMOLL_BGL;case FL.BloodGlucoseUnit.MMOL_L:return e*FL.CONSTANTS.MMOLL_PER_MGDL_BGL;default:throw new Error(`[conversionGlucose::convertBGL] Unsupported glucose unit! ${n}`)}}function LQ(e,t){const{decimalPlaces:n}=Xq(t);return(Math.round(10*e)/10).toFixed(n)}function PQ(e,t,n){return LQ(AQ(e,t,n),n)}const MQ=WB({entry_timestamp:YB([zB(),jB()]),settings_uuid:jB(),insulin_entered_units:YB([VB(),GB()]),carbohydrates_entered_grams:YB([VB(),GB()]),blood_glucose_millimolar:YB([VB(),GB()]),blood_ketones_millimolar:YB([VB(),GB(),UB()]),event_uuid:YB([jB(),GB(),UB()])});wL.borderCardOverlay,wL.textNavigationNumberActive,wL.textNavigationNumberActive,wL.textNavigationNumberActive;const DQ=e=>{MQ.parse(e);const{blood_glucose_millimolar:t,carbohydrates_entered_grams:n,insulin_entered_units:i,blood_ketones_millimolar:r}=e,{inputMax:a,inputMin:o}=Xq(FL.BloodGlucoseUnit.MMOL_L),{inputMax:s}={displayUnit:RQ,inputMin:0,inputMax:8,decimalPlaces:1};if(null!==t&&t>a)throw new Error(`[LogbookUtils::validateLogbook] blood_glucose_millimolar is greater than ${a}`);if(null!==t&&t<o)throw new Error(`[LogbookUtils::validateLogbook] blood_glucose_millimolar is less than ${o}`);if(null!==r&&r>s)throw new Error(`[LogbookUtils::validateLogbook] blood_ketones_millimolar is greater than ${s}`);const l={blood_glucose_millimolar:t,carbohydrates_entered_grams:n,insulin_entered_units:i,blood_ketones_millimolar:r};return Object.entries(l).forEach(([e,t])=>{if(function(e){return null!==e&&e<0}(t))throw new Error(`[LogbookUtils::validateLogbook] ${e} is less than 0`)}),!0},NQ=e=>({blood_glucose_millimolar:null,blood_ketones_millimolar:null,carbohydrates_entered_grams:0,insulin_entered_units:0,insulin_suggested_units:null,carbohydrates_suggested_grams:null,carbohydrates_modified_suggested_grams:null,carbohydrates_overwritten_suggested_grams:null,client_timestamp:new Date,client_version:"",entry_timestamp:new Date,event_uuid:null,is_deleted:null,mood:null,settings_uuid:"",uuid:"",device_and_os:"",overwritten_by_id:null,server_timestamp:null,server_version:null,utc_timezone_offset:null,active_insulin:null,activity_reduction:null,blood_glucose_millimolar_sample_id:null,timezone:"",...e});const FQ=oV?"/api/v2":zj.HEDIA_API_URL_V2;const BQ=e=>{const{uuid:t}=e;if(!t)throw new Error("[LogbookManager::saveLocally] uuid must be defined");jQ(t);const n=zQ();n.push([t,new Date(e.entry_timestamp).getTime()]),n.sort((e,t)=>t[1]-e[1]),qj.set("logbook/index",JSON.stringify(n)),qj.set(`logbook/${e.uuid}`,JSON.stringify(e))},jQ=e=>{const t=zQ().filter(([t])=>t!==e);qj.set("logbook/index",JSON.stringify(t)),qj.delete(`logbook/${e}`)},VQ=()=>{const e=qj.getString("logbook/pendingChanges");return e?JSON.parse(e):{last_sync_timestamp:new Date(0).toISOString(),created:[],edited:[],deleted:[]}},HQ=(e,t)=>{const{created:n,deleted:i,edited:r,last_sync_timestamp:a}=VQ(),o={last_sync_timestamp:a,created:[...n].filter(({uuid:t})=>t!==e),edited:[...r].filter(({oldUUID:n,newUUID:i})=>n!==t&&i!==e),deleted:[...i].filter(t=>t!==e)};qj.set("logbook/pendingChanges",JSON.stringify(o))},zQ=()=>{const e=qj.getString("logbook/index");return void 0===e?[]:JSON.parse(e)},UQ=new class{async addLogbook(e,t){const n=t?this.getLogbookByUUID(t):null;try{e.uuid=IX(),e.client_timestamp=new Date,e.client_version=PX,e.device_and_os=`${lr.OS} ${lr.Version}`;const n=VQ();if(t){const i=this.getLogbookByUUID(t);e.settings_uuid=i.settings_uuid,n.edited.push({oldUUID:t,newUUID:e.uuid}),jQ(t)}else{const{uuid:t}=Vq;if(!t)throw new Error("[LogbookManager::addLogbook] settingsUUID must be defined");e.settings_uuid=t}return e.utc_timezone_offset=(()=>{const e=(new Date).getTimezoneOffset(),t=-e>=0?"+":"-",n=Math.abs(e);return`${t}${Math.floor(n/60).toString().padStart(2,"0")}:${(n%60).toString().padStart(2,"0")}`})(),e.timezone=Intl.DateTimeFormat().resolvedOptions().timeZone,n.created.push(e),qj.set("logbook/pendingChanges",JSON.stringify(n)),BQ(e),oV?await this.syncWeb():GQ.syncAll().catch(console.error),e}catch(i){return console.error(i),oV&&(t?(jQ(e.uuid),null!==n&&BQ(n),HQ(e.uuid,t)):(jQ(e.uuid),HQ(e.uuid))),null}}deleteLogbook=async e=>{const t=this.getLogbookByUUID(e);try{const t=VQ();return t.deleted.push(e),qj.set("logbook/pendingChanges",JSON.stringify(t)),jQ(e),oV?await this.syncWeb():GQ.syncAll().catch(console.error),!0}catch(n){return console.error(n),oV&&(BQ(t),HQ(e)),!1}};syncWeb=async()=>{const e=VQ(),t=await FX(`${FQ}/logbooks`,(n=e,{method:FL.HTTPRequestMethod.POST,body:JSON.stringify(n),headers:{"Content-Type":"application/json"}}));var n;if(t.status!==FL.StatusCode.OK)throw new Error("Could not sync logbooks with server");const i=await t.json(),{created:r,last_sync_timestamp:a}=i;for(const s of r)BQ(s);const o={last_sync_timestamp:a,created:[],deleted:[],edited:[]};qj.set("logbook/pendingChanges",JSON.stringify(o))};sync=async()=>{const e=VQ(),{created:t,deleted:n,edited:i,last_sync_timestamp:r}=e,a=e=>({method:FL.HTTPRequestMethod.POST,body:JSON.stringify(e),headers:{"Content-Type":"application/json"}}),o=[],s=[],l=[];let u=[],c=[],d=e.last_sync_timestamp;const h=e=>{const{created:t,deleted:n,last_sync_timestamp:i}=e;u=u.concat(t),c=c.concat(n),d=i},m=[{list:t,listName:"created",unsuccess:o},{list:n,listName:"deleted",unsuccess:s},{list:i,listName:"edited",unsuccess:l}];if(!t.length&&!i.length&&!n.length){const e={created:[],deleted:[],edited:[],last_sync_timestamp:r},t=await FX(`${FQ}/logbooks`,a(e));h(await t.json())}for(const g of m)for(const e of g.list){const t={created:[],deleted:[],edited:[],last_sync_timestamp:r};t[g.listName].push(e);try{const n=await FX(`${FQ}/logbooks`,a(t));if(n.status!==FL.StatusCode.OK)throw g.unsuccess.push(e),new Error(`[LogbookManager::sync] Could not sync logbooks with server ${JSON.stringify(await n.json())}`);h(await n.json())}catch(f){console.error(`[LogbookManager::sync] Failed to sync list ${g.listName}`,e,f)}}const p={last_sync_timestamp:d,created:o,deleted:s,edited:l};qj.set("logbook/pendingChanges",JSON.stringify(p)),qj.set("logbook/unsuccessful",JSON.stringify(p));for(const g of u)BQ(g);for(const g of c)jQ(g)};getRecentBoluses=(e,t)=>{const n=new Date(Date.now()-4*FL.Milliseconds.Hour),i=new Date;return this.getLogbooks(e??n,t??i).map(e=>{const{insulin_entered_units:t,entry_timestamp:n}=e;if(null===t)throw new Error("[LogbookManager::getRecentBoluses] insulin_entered_units must be non-null.");return{insulinDose:t,secondsPassed:(Date.now()-new Date(n).getTime())/1e3}})};getLogbooks=(e,t)=>{let n=zQ();if(void 0!==e){const t=e.getTime();n=n.filter(e=>e[1]>=t)}if(void 0!==t){const e=t.getTime();n=n.filter(t=>t[1]<e)}const i=[];for(const a of n)try{const e=this.getLogbookByUUID(a[0]);try{DQ(e),i.push(e)}catch(r){console.error(r),this.removePending(e.uuid),jQ(e.uuid)}}catch(r){console.error(r)}return i};removePending=e=>{HQ(e)};getLogbookByUUID=e=>{const t=qj.getString(`logbook/${e}`);if(!t)throw new Error("LogbookManager::getLogbookByUUID - could not find logbook in local storage");const n={blood_ketones_millimolar:null,...JSON.parse(t)};return{...n,entry_timestamp:new Date(n.entry_timestamp),server_timestamp:n.server_timestamp?new Date(n.server_timestamp):null,client_timestamp:new Date(n.client_timestamp)}}};const GQ=new class{currentIsConnected=null;isSynchronizing=!1;isListenerAttached=!1;constructor(){this.setListener()}syncAll=async()=>{if(!this.isSynchronizing)try{this.isSynchronizing=!0,await Vq.sync().catch(console.error),await Lq.sync().catch(console.error),await UQ.sync().catch(console.error),await wq.fetch().catch(console.error)}finally{this.isSynchronizing=!1}};reset=()=>{Vq.reset(),wq.clear()};handleConnectivity=async({isConnected:e,isInternetReachable:t})=>{const{accessToken:n}=Xz.getState();this.currentIsConnected!==(e&&t)&&(this.currentIsConnected=e&&t,this.currentIsConnected&&n&&await this.syncAll())};setListener=()=>{this.isListenerAttached||oV||(Fz.addEventListener(this.handleConnectivity),this.isListenerAttached=!0)}},{add:WQ,multiply:YQ}=uu;function $Q(e,t,n){return WQ(YQ(e,t),YQ(e.interpolate({inputRange:[0,1],outputRange:[1,0]}),n))}const{add:XQ,multiply:qQ}=uu;function ZQ(e){let{index:t,current:n,next:i,inverted:r,layouts:{screen:a},insets:o}=e;const s="ios"===lr.OS&&!lr.isPad&&!lr.isTV&&o.top>20,l=a.width>a.height,u=l?0:10,c=o.top,d=a.height/a.width,h=XQ(n.progress.interpolate({inputRange:[0,1],outputRange:[0,1],extrapolate:"clamp"}),i?i.progress.interpolate({inputRange:[0,1],outputRange:[0,1],extrapolate:"clamp"}):0),m=0===t,p=qQ(h.interpolate({inputRange:[0,1,2],outputRange:[a.height,m?0:u,(m?c:0)-u*d]}),r),f=h.interpolate({inputRange:[0,1,1.0001,2],outputRange:[0,.3,1,1]}),g=l?1:h.interpolate({inputRange:[0,1,2],outputRange:[1,1,a.width?1-2*u/a.width:1]}),_=l?0:m?h.interpolate({inputRange:[0,1,1.0001,2],outputRange:[0,0,s?38:0,10]}):10;return{cardStyle:{overflow:"hidden",borderTopLeftRadius:_,borderTopRightRadius:_,borderBottomLeftRadius:s?_:0,borderBottomRightRadius:s?_:0,marginTop:m?0:c,marginBottom:m?0:u,transform:[{translateY:p},{scale:g}]},overlayStyle:{opacity:f}}}function KQ(){return{}}const{add:QQ}=uu;function JQ(e){let{current:t,next:n}=e;const i=QQ(t.progress.interpolate({inputRange:[0,1],outputRange:[0,1],extrapolate:"clamp"}),n?n.progress.interpolate({inputRange:[0,1],outputRange:[0,1],extrapolate:"clamp"}):0),r=i.interpolate({inputRange:[0,1,2],outputRange:[0,1,0]});return{leftButtonStyle:{opacity:r},rightButtonStyle:{opacity:r},titleStyle:{opacity:r},backgroundStyle:{opacity:i.interpolate({inputRange:[0,1,1.9,2],outputRange:[0,1,1,0]})}}}function eJ(e){let{current:t,next:n,layouts:{screen:i}}=e;const r=[{translateX:QQ(t.progress.interpolate({inputRange:[0,1],outputRange:[0,1],extrapolate:"clamp"}),n?n.progress.interpolate({inputRange:[0,1],outputRange:[0,1],extrapolate:"clamp"}):0).interpolate({inputRange:[0,1,2],outputRange:Lu.getConstants().isRTL?[-i.width,0,i.width]:[i.width,0,-i.width]})}];return{leftButtonStyle:{transform:r},rightButtonStyle:{transform:r},titleStyle:{transform:r},backgroundStyle:{transform:r}}}function tJ(e){let{current:t,next:n,layouts:{screen:i}}=e;const r=[{translateX:QQ(t.progress.interpolate({inputRange:[0,1],outputRange:[0,1],extrapolate:"clamp"}),n?n.progress.interpolate({inputRange:[0,1],outputRange:[0,1],extrapolate:"clamp"}):0).interpolate({inputRange:[0,1,2],outputRange:Lu.getConstants().isRTL?[i.width,0,-i.width]:[-i.width,0,i.width]})}];return{leftButtonStyle:{transform:r},rightButtonStyle:{transform:r},titleStyle:{transform:r},backgroundStyle:{transform:r}}}function nJ(e){let{current:t,next:n,layouts:{header:i}}=e;const r=[{translateY:QQ(t.progress.interpolate({inputRange:[0,1],outputRange:[0,1],extrapolate:"clamp"}),n?n.progress.interpolate({inputRange:[0,1],outputRange:[0,1],extrapolate:"clamp"}):0).interpolate({inputRange:[0,1,2],outputRange:[-i.height,0,-i.height]})}];return{leftButtonStyle:{transform:r},rightButtonStyle:{transform:r},titleStyle:{transform:r},backgroundStyle:{transform:r}}}function iJ(){return{}}const rJ={animation:"spring",config:{stiffness:1e3,damping:500,mass:3,overshootClamping:!0,restDisplacementThreshold:10,restSpeedThreshold:10}},aJ={animation:"timing",config:{duration:350,easing:Xl.out(Xl.poly(5))}},oJ={animation:"timing",config:{duration:150,easing:Xl.in(Xl.linear)}},sJ={animation:"timing",config:{duration:425,easing:Xl.bezier(.35,.45,0,1)}},lJ={animation:"timing",config:{duration:400,easing:Xl.bezier(.35,.45,0,1)}},uJ={animation:"timing",config:{duration:250,easing:e=>Math.cos((e+1)*Math.PI)/2+.5}},cJ={animation:"timing",config:{duration:200,easing:e=>1===e?1:Math.pow(e,2)}},dJ={gestureDirection:"horizontal",transitionSpec:{open:rJ,close:rJ},cardStyleInterpolator:function(e){let{current:t,next:n,inverted:i,layouts:{screen:r}}=e;return{cardStyle:{transform:[{translateX:qQ(t.progress.interpolate({inputRange:[0,1],outputRange:[r.width,0],extrapolate:"clamp"}),i)},{translateX:n?qQ(n.progress.interpolate({inputRange:[0,1],outputRange:[0,-.3*r.width],extrapolate:"clamp"}),i):0}]},overlayStyle:{opacity:t.progress.interpolate({inputRange:[0,1],outputRange:[0,.07],extrapolate:"clamp"})},shadowStyle:{shadowOpacity:t.progress.interpolate({inputRange:[0,1],outputRange:[0,.3],extrapolate:"clamp"})}}},headerStyleInterpolator:JQ},hJ={gestureDirection:"vertical",transitionSpec:{open:rJ,close:rJ},cardStyleInterpolator:ZQ,headerStyleInterpolator:JQ},mJ={gestureDirection:"vertical",transitionSpec:{open:aJ,close:oJ},cardStyleInterpolator:function(e){let{current:t,inverted:n,layouts:{screen:i},closing:r}=e;const a=qQ(t.progress.interpolate({inputRange:[0,1],outputRange:[.08*i.height,0],extrapolate:"clamp"}),n);return{cardStyle:{opacity:$Q(r,t.progress,t.progress.interpolate({inputRange:[0,.5,.9,1],outputRange:[0,.25,.7,1],extrapolate:"clamp"})),transform:[{translateY:a}]}}},headerStyleInterpolator:JQ},pJ={gestureDirection:"vertical",transitionSpec:{open:sJ,close:sJ},cardStyleInterpolator:function(e){let{current:t,next:n,inverted:i,layouts:{screen:r}}=e;return{containerStyle:{overflow:"hidden",transform:[{translateY:qQ(t.progress.interpolate({inputRange:[0,1],outputRange:[r.height,0],extrapolate:"clamp"}),i)}]},cardStyle:{transform:[{translateY:qQ(t.progress.interpolate({inputRange:[0,1],outputRange:[r.height*(95.9/100)*-1,0],extrapolate:"clamp"}),i)},{translateY:n?qQ(n.progress.interpolate({inputRange:[0,1],outputRange:[0,.02*r.height*-1],extrapolate:"clamp"}),i):0}]},overlayStyle:{opacity:t.progress.interpolate({inputRange:[0,.36,1],outputRange:[0,.1,.1],extrapolate:"clamp"})}}},headerStyleInterpolator:JQ},fJ={gestureDirection:"horizontal",transitionSpec:{open:lJ,close:lJ},cardStyleInterpolator:function(e){let{current:t,next:n,closing:i}=e;const r=XQ(t.progress.interpolate({inputRange:[0,1],outputRange:[0,1],extrapolate:"clamp"}),n?n.progress.interpolate({inputRange:[0,1],outputRange:[0,1],extrapolate:"clamp"}):0);return{cardStyle:{opacity:r.interpolate({inputRange:[0,.75,.875,1,1.0825,1.2075,2],outputRange:[0,0,1,1,1,1,0]}),transform:[{scale:$Q(i,t.progress.interpolate({inputRange:[0,1],outputRange:[.925,1],extrapolate:"clamp"}),r.interpolate({inputRange:[0,1,2],outputRange:[.85,1,1.075]}))}]}}},headerStyleInterpolator:JQ},gJ={gestureDirection:"vertical",transitionSpec:{open:uJ,close:cJ},cardStyleInterpolator:function(e){let{current:t,inverted:n,layouts:{screen:i},closing:r}=e;const a=qQ(t.progress.interpolate({inputRange:[0,1],outputRange:[.8*i.height,0],extrapolate:"clamp"}),n);return{cardStyle:{opacity:$Q(r,t.progress,t.progress.interpolate({inputRange:[0,1],outputRange:[0,1],extrapolate:"clamp"})),transform:[{translateY:a}]},overlayStyle:{opacity:t.progress.interpolate({inputRange:[0,1],outputRange:[0,.3],extrapolate:"clamp"})}}},headerStyleInterpolator:JQ},_J={gestureDirection:"vertical",transitionSpec:{open:uJ,close:cJ},cardStyleInterpolator:function(e){let{current:{progress:t}}=e;return{cardStyle:{opacity:t.interpolate({inputRange:[0,.5,.9,1],outputRange:[0,.25,.7,1]})},overlayStyle:{opacity:t.interpolate({inputRange:[0,1],outputRange:[0,.5],extrapolate:"clamp"})}}},headerStyleInterpolator:JQ},vJ=lr.select({ios:dJ,android:lr.Version>=29?fJ:lr.Version>=28?pJ:mJ,default:fJ}),yJ=lr.select({ios:hJ,default:gJ}),bJ=i(Object.freeze(Object.defineProperty({__proto__:null,default:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAABgCAQAAABIkb+zAAAAlklEQVR4Ae3a1REDMRDG4A3VmHbcUFLigf0exn/mkxuQjmELAAAAAD5Eq5atP6+rZeuPhGz9kZCtPxKy9fs6Zuuf60CfPn369OnTp0+fPn369OnTfx36X1vh+nO6/pytL+D1BCexy+iNhFPt6/dIOEiQIEGCBAkSJEiQ8B0k+PwoQYKhP2OXAYOvRo+vD38bvwcAAACABXF8ILs1PQqpAAAAAElFTkSuQmCC"},Symbol.toStringTag,{value:"Module"}))),wJ=i(Object.freeze(Object.defineProperty({__proto__:null,default:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAABVCAQAAAChx3/YAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAAmJLR0QA/4ePzL8AAAAHdElNRQfkAQMKHDc9iQjuAAACmUlEQVRo3r3ZS2sUQRAH8M5zklwWg0K8mKBB/AIqXhTEi1cTPQe9iH4AUXBNjh79EooKgggSHyCICIIQL7NV1T2bze6EFS/xoms0ie0hs+sa9zE901U79/3R8+iu+pdSnn/VfbCAz/Um2r+XV8AO0jH9pP3vvSN2COdhGX8xInbIzNMKbv1PeEPsiLmEn2i7E+EJsSN4Az+UtjoTXpBwlG7CGnQlPCA2oFtQxZ3uRG7EBnAvjHsTOREbwB2s9bpRuZHKGCzCer9V5ELi8ehuOiIzYkejBUTYTkNkREyAV5DgdzoiE2ICuoYaUxMZEBPQdYpdCGfkzbA+rUsugDNiAnOGwJVwQipj0XlCd8IBscN0wv1GOSEmCE9qyEakREyAZ4myEqkQE+hzupydSIHE4+aUjvIQfZH6hL6QbxV9kfqEnqP1vEQPxA6YA3hReyB6IOUC3vZDdEXKBVPUG36ILkhlihbxqy+iI1KZogf4xW0zd0TWDuJD+AYWLRuyOo2P0DOxB6nM4Fv87pv4B1mdxhfY8E+0IeaIfok/OIgWEs3q97DJQyTI5xn9FBpcBFqlVDgLz6CBlu9S8SS9JlYCraKlTv2qb+QdN4FWYV0AEVkJLQH/M4kn9Sv2t0vkOxH64pt7F9f22LYLVw8D9y4sdJ40T0bgPRmVUqp+iP2MF6pWkrrrPnPdJVRB7tbCVMQNZkSkqlfKDtD+kLs/Eem0xHpGoe631cdHzIhIIiGUrSQp0XHmlEgo7xJK7loZZMiMJGlqjTVNbebCRKy5cPJsLjMn3EJZvdDUQWh+krwCReZJUHOmVaqxzrSEpnNCc0ahiWlz9ksrrLNfoSn27sgf5mCZfrIiStnB8lF8rHdYEaWU+ljQV/dW0X8Ac6zWpmDZsO8AAAAldEVYdGRhdGU6Y3JlYXRlADIwMjAtMDEtMDNUMTA6Mjg6NTIrMDA6MDD7fVVWAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDIwLTAxLTAzVDEwOjI4OjUyKzAwOjAwiiDt6gAAAABJRU5ErkJggg=="},Symbol.toStringTag,{value:"Module"})));function SJ(){return SJ=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},SJ.apply(this,arguments)}function kJ(e){let{style:t,...n}=e;const{colors:i}=Rf();return M.createElement(ga,SJ({},n,{style:[{flex:1,backgroundColor:i.background},t]}))}function CJ(e,t,n){let i;const r=e.width>e.height;return i="ios"===lr.OS?lr.isPad||lr.isTV?t?56:50:r?32:t?56:44:"android"===lr.OS?56:64,i+n}function EJ(e,t){return"string"==typeof e.headerTitle?e.headerTitle:void 0!==e.title?e.title:t}function xJ(){return xJ=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},xJ.apply(this,arguments)}function IJ(e){let{style:t,...n}=e;const{colors:i}=Rf();return M.createElement(uu.View,xJ({style:[TJ.container,{backgroundColor:i.card,borderBottomColor:i.border,shadowColor:i.border},t]},n))}const TJ=Ei.create({container:{flex:1,...lr.select({android:{elevation:4},ios:{shadowOpacity:.85,shadowRadius:0,shadowOffset:{width:0,height:Ei.hairlineWidth}},default:{borderBottomWidth:Ei.hairlineWidth}})}}),OJ="__react_navigation__elements_contexts";function RJ(e,t){let n=self[OJ].get(e);return n||(n=M.createContext(t),n.displayName=e,self[OJ].set(e,n),n)}self[OJ]=self[OJ]??new Map;const AJ=RJ("HeaderShownContext",!1);function LJ(){return LJ=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},LJ.apply(this,arguments)}function PJ(e){let{tintColor:t,style:n,...i}=e;const{colors:r}=Rf();return M.createElement(uu.Text,LJ({accessibilityRole:"header","aria-level":"1",numberOfLines:1},i,{style:[MJ.title,{color:void 0===t?r.text:t},n]}))}const MJ=Ei.create({title:lr.select({ios:{fontSize:17,fontWeight:"600"},android:{fontSize:20,fontFamily:"sans-serif-medium",fontWeight:"normal"},default:{fontSize:18,fontWeight:"500"}})});function DJ(e){const t=hH(),n=mH(),i=M.useContext(AJ),r="ios"===lr.OS&&t.top>50?t.top-5:t.top,{layout:a=n,modal:o=!1,title:s,headerTitle:l,headerTitleAlign:u=lr.select({ios:"center",default:"left"}),headerLeft:c,headerLeftLabelVisible:d,headerTransparent:h,headerTintColor:m,headerBackground:p,headerRight:f,headerTitleAllowFontScaling:g,headerTitleStyle:_,headerLeftContainerStyle:v,headerRightContainerStyle:y,headerTitleContainerStyle:b,headerBackgroundContainerStyle:w,headerStyle:S,headerShadowVisible:k,headerPressColor:C,headerPressOpacity:E,headerStatusBarHeight:x=(i?0:r)}=e,I=CJ(a,o,x),{height:T=I,minHeight:O,maxHeight:R,backgroundColor:A,borderBottomColor:L,borderBottomEndRadius:P,borderBottomLeftRadius:D,borderBottomRightRadius:N,borderBottomStartRadius:F,borderBottomWidth:B,borderColor:j,borderEndColor:V,borderEndWidth:H,borderLeftColor:z,borderLeftWidth:U,borderRadius:G,borderRightColor:W,borderRightWidth:Y,borderStartColor:$,borderStartWidth:X,borderStyle:q,borderTopColor:Z,borderTopEndRadius:K,borderTopLeftRadius:Q,borderTopRightRadius:J,borderTopStartRadius:ee,borderTopWidth:te,borderWidth:ne,boxShadow:ie,elevation:re,shadowColor:ae,shadowOffset:oe,shadowOpacity:se,shadowRadius:le,opacity:ue,transform:ce,...de}=Ei.flatten(S||{}),he={backgroundColor:A,borderBottomColor:L,borderBottomEndRadius:P,borderBottomLeftRadius:D,borderBottomRightRadius:N,borderBottomStartRadius:F,borderBottomWidth:B,borderColor:j,borderEndColor:V,borderEndWidth:H,borderLeftColor:z,borderLeftWidth:U,borderRadius:G,borderRightColor:W,borderRightWidth:Y,borderStartColor:$,borderStartWidth:X,borderStyle:q,borderTopColor:Z,borderTopEndRadius:K,borderTopLeftRadius:Q,borderTopRightRadius:J,borderTopStartRadius:ee,borderTopWidth:te,borderWidth:ne,boxShadow:ie,elevation:re,shadowColor:ae,shadowOffset:oe,shadowOpacity:se,shadowRadius:le,opacity:ue,transform:ce};for(const M in he)void 0===he[M]&&delete he[M];const me=[he,!1===k&&{elevation:0,shadowOpacity:0,borderBottomWidth:0}],pe=c?c({tintColor:m,pressColor:C,pressOpacity:E,labelVisible:d}):null,fe=f?f({tintColor:m,pressColor:C,pressOpacity:E}):null,ge="function"!=typeof l?e=>M.createElement(PJ,e):l;return M.createElement(M.Fragment,null,M.createElement(uu.View,{pointerEvents:"box-none",style:[Ei.absoluteFill,{zIndex:0},w]},p?p({style:me}):h?null:M.createElement(IJ,{style:me})),M.createElement(uu.View,{pointerEvents:"box-none",style:[{height:T,minHeight:O,maxHeight:R,opacity:ue,transform:ce}]},M.createElement(ga,{pointerEvents:"none",style:{height:x}}),M.createElement(ga,{pointerEvents:"box-none",style:NJ.content},M.createElement(uu.View,{pointerEvents:"box-none",style:[NJ.left,"center"===u&&NJ.expand,{marginStart:t.left},v]},pe),M.createElement(uu.View,{pointerEvents:"box-none",style:[NJ.title,{maxWidth:"center"===u?a.width-2*((pe?!1!==d?80:32:16)+Math.max(t.left,t.right)):a.width-((pe?72:16)+(fe?72:16)+t.left-t.right)},b]},ge({children:s,allowFontScaling:g,tintColor:m,style:_})),M.createElement(uu.View,{pointerEvents:"box-none",style:[NJ.right,NJ.expand,{marginEnd:t.right},y]},fe))))}const NJ=Ei.create({content:{flex:1,flexDirection:"row",alignItems:"stretch"},title:{marginHorizontal:16,justifyContent:"center"},left:{justifyContent:"center",alignItems:"flex-start"},right:{justifyContent:"center",alignItems:"flex-end"},expand:{flexGrow:1,flexBasis:0}});function FJ(e){let{children:t}=e;return t}function BJ(){return BJ=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},BJ.apply(this,arguments)}const jJ=uu.createAnimatedComponent(eh),VJ="android"===lr.OS&&lr.Version>=21;function HJ(e){let{onPressIn:t,onPressOut:n,android_ripple:i,pressColor:r,pressOpacity:a=.3,style:o,...s}=e;const{dark:l}=Rf(),[u]=M.useState(()=>new uu.Value(1)),c=(e,t)=>{VJ||uu.timing(u,{toValue:e,duration:t,easing:Xl.inOut(Xl.quad),useNativeDriver:!0}).start()};return M.createElement(jJ,BJ({onPressIn:e=>{c(a,0),null==t||t(e)},onPressOut:e=>{c(1,200),null==n||n(e)},android_ripple:VJ?{color:void 0!==r?r:l?"rgba(255, 255, 255, .32)":"rgba(0, 0, 0, .32)",...i}:void 0,style:[{opacity:VJ?1:u},o]},s))}function zJ(e){let{disabled:t,allowFontScaling:n,backImage:i,label:r,labelStyle:a,labelVisible:o="ios"===lr.OS,onLabelLayout:s,onPress:l,pressColor:u,pressOpacity:c,screenLayout:d,tintColor:h,titleLayout:m,truncatedLabel:p="Back",accessibilityLabel:f=(r&&"Back"!==r?`${r}, back`:"Go back"),testID:g,style:_}=e;const{colors:v}=Rf(),[y,b]=M.useState(void 0),w=void 0!==h?h:lr.select({ios:v.primary,default:v.text}),S=e=>{null==s||s(e),b(e.nativeEvent.layout.x+e.nativeEvent.layout.width)};return M.createElement(HJ,{disabled:t,accessible:!0,accessibilityRole:"button",accessibilityLabel:f,testID:g,onPress:t?void 0:()=>l&&requestAnimationFrame(l),pressColor:u,pressOpacity:c,android_ripple:UJ,style:[GJ.container,t&&GJ.disabled,_],hitSlop:lr.select({ios:void 0,default:{top:16,right:16,bottom:16,left:16}})},M.createElement(M.Fragment,null,i?i({tintColor:w}):M.createElement(Js,{style:[GJ.icon,Boolean(o)&&GJ.iconWithLabel,Boolean(w)&&{tintColor:w}],source:bJ,fadeDuration:0}),(()=>{const e=!r||y&&m&&d&&(d.width-m.width)/2<y+26?p:r;if(!o||void 0===e)return null;const t=M.createElement(ga,{style:d?[GJ.labelWrapper,{minWidth:d.width/2-27}]:null},M.createElement(uu.Text,{accessible:!1,onLayout:e===r?S:void 0,style:[GJ.label,w?{color:w}:null,a],numberOfLines:1,allowFontScaling:!!n},e));return i||"ios"!==lr.OS?t:M.createElement(FJ,{maskElement:M.createElement(ga,{style:GJ.iconMaskContainer},M.createElement(Js,{source:wJ,style:GJ.iconMask}),M.createElement(ga,{style:GJ.iconMaskFillerRect}))},t)})()))}const UJ={borderless:!0,foreground:"android"===lr.OS&&lr.Version>=23,radius:20},GJ=Ei.create({container:{alignItems:"center",flexDirection:"row",minWidth:Ei.hairlineWidth,...lr.select({ios:null,default:{marginVertical:3,marginHorizontal:11}})},disabled:{opacity:.5},label:{fontSize:17,letterSpacing:.35},labelWrapper:{flexDirection:"row",alignItems:"flex-start"},icon:lr.select({ios:{height:21,width:13,marginLeft:8,marginRight:22,marginVertical:12,resizeMode:"contain",transform:[{scaleX:Lu.getConstants().isRTL?-1:1}]},default:{height:24,width:24,margin:3,resizeMode:"contain",transform:[{scaleX:Lu.getConstants().isRTL?-1:1}]}}),iconWithLabel:"ios"===lr.OS?{marginRight:6}:{},iconMaskContainer:{flex:1,flexDirection:"row",justifyContent:"center"},iconMaskFillerRect:{flex:1,backgroundColor:"#000"},iconMask:{height:21,width:13,marginLeft:-14.5,marginVertical:12,alignSelf:"center",resizeMode:"contain",transform:[{scaleX:Lu.getConstants().isRTL?-1:1}]}}),WJ=RJ("HeaderBackContext",void 0),YJ=RJ("HeaderHeightContext",void 0);function $J(e){let{color:t,size:n,style:i}=e;return M.createElement(hl,{style:[XJ.icon,{color:t,fontSize:n},i]},"⏷")}const XJ=Ei.create({icon:{backgroundColor:"transparent"}});function qJ(){return qJ=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},qJ.apply(this,arguments)}function ZJ(e){let{visible:t,children:n,style:i,...r}=e;return"web"===lr.OS?M.createElement(ga,qJ({hidden:!t,style:[{display:t?"flex":"none"},KJ.container,i],pointerEvents:t?"auto":"none"},r),n):M.createElement(ga,{style:[KJ.container,i],pointerEvents:t?"auto":"none"},M.createElement(ga,{collapsable:!1,removeClippedSubviews:"ios"!==lr.OS&&"macos"!==lr.OS||!t,pointerEvents:t?"auto":"none",style:t?KJ.attached:KJ.detached},n))}const KJ=Ei.create({container:{flex:1,overflow:"hidden"},attached:{flex:1},detached:{flex:1,top:3e4}}),{width:QJ=0,height:JJ=0}=Aa.get("window"),e1=(lr.OS,{frame:{x:0,y:0,width:QJ,height:JJ},insets:{top:0,left:0,right:0,bottom:0}});function t1(e){let{children:t,style:n}=e;return M.useContext(sH)?M.createElement(ga,{style:[i1.container,n]},t):("web"===lr.OS&&(t=M.createElement(n1,{initialMetrics:e1},t)),M.createElement(uH,{initialMetrics:e1,style:n},t))}const n1=e=>{let{initialMetrics:t,children:n}=e;const i=M.useRef(null),[r,a]=M.useState(t.frame);return M.useEffect(()=>{if(null==i.current)return;const e=i.current.getBoundingClientRect();let t;a({x:e.x,y:e.y,width:e.width,height:e.height});const n=new ResizeObserver(e=>{const n=e[0];if(n){const{x:e,y:i,width:r,height:o}=n.contentRect;clearTimeout(t),t=setTimeout(()=>{a({x:e,y:i,width:r,height:o})},100)}});return n.observe(i.current),()=>{n.disconnect(),clearTimeout(t)}},[]),M.createElement(lH.Provider,{value:r},M.createElement("div",{ref:i,style:{...Ei.absoluteFillObject,pointerEvents:"none",visibility:"hidden"}}),n)};t1.initialMetrics=e1;const i1=Ei.create({container:{flex:1}});function r1(e){const t=mH(),n=hH(),i=M.useContext(AJ),r=M.useContext(YJ),{focused:a,modal:o=!1,header:s,headerShown:l=!0,headerTransparent:u,headerStatusBarHeight:c=(i?0:n.top),navigation:d,route:h,children:m,style:p}=e,[f,g]=M.useState(()=>CJ(t,o,c));return M.createElement(kJ,{accessibilityElementsHidden:!a,importantForAccessibility:a?"auto":"no-hide-descendants",style:[a1.container,p]},M.createElement(ga,{style:a1.content},M.createElement(AJ.Provider,{value:i||!1!==l},M.createElement(YJ.Provider,{value:l?f:r??0},m))),l?M.createElement(Bm.Provider,{value:d},M.createElement(jm.Provider,{value:h},M.createElement(ga,{onLayout:e=>{const{height:t}=e.nativeEvent.layout;g(t)},style:u?a1.absolute:null},s))):null)}const a1=Ei.create({container:{flex:1,flexDirection:"column-reverse"},content:{flex:1},absolute:{position:"absolute",top:0,left:0,right:0}}),o1=M.createContext(!1),s1=e=>{let{children:t}=e;return M.createElement(M.Fragment,null,t)},l1=ga,u1=3,c1=4,d1=5;function h1(e){let t,n;return function(){let i=!1;for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];if(t){if(t.length!==a.length)i=!0;else for(let e=0;e<t.length;e++)if(t[e]!==a[e]){i=!0;break}}else i=!0;return t=a,(i||void 0===n)&&(n=e(...a)),n}}function m1(){return m1=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},m1.apply(this,arguments)}function p1(e){const[t,n]=M.useState(void 0),[i,r]=M.useState(void 0),a=e=>{const{height:t,width:n}=e.nativeEvent.layout;r(e=>e&&t===e.height&&n===e.width?e:{height:t,width:n})},o=e=>{const{height:i,width:r}=e.nativeEvent.layout;t&&i===t.height&&r===t.width||n({height:i,width:r})},s=h1((e,t,n,i,r,a,o)=>e({current:{progress:n},next:i&&{progress:i},layouts:{header:{height:o,width:t.width},screen:t,title:r,leftLabel:a}})),{progress:l,layout:u,modal:c,onGoBack:d,headerTitle:h,headerLeft:m=(d?e=>M.createElement(zJ,e):void 0),headerRight:p,headerBackImage:f,headerBackTitle:g,headerBackTitleVisible:_="ios"===lr.OS,headerTruncatedBackTitle:v,headerBackAccessibilityLabel:y,headerBackTestID:b,headerBackAllowFontScaling:w,headerBackTitleStyle:S,headerTitleContainerStyle:k,headerLeftContainerStyle:C,headerRightContainerStyle:E,headerBackgroundContainerStyle:x,headerStyle:I,headerStatusBarHeight:T,styleInterpolator:O,...R}=e,A=CJ(u,c,T),{height:L=A}=Ei.flatten(I||{}),{titleStyle:P,leftButtonStyle:D,leftLabelStyle:N,rightButtonStyle:F,backgroundStyle:B}=s(O,u,l.current,l.next,i,g?t:void 0,"number"==typeof L?L:A),j=m?e=>m({...e,backImage:f,accessibilityLabel:y,testID:b,allowFontScaling:w,onPress:d,label:g,truncatedLabel:v,labelStyle:[N,S],onLabelLayout:o,screenLayout:u,titleLayout:i,canGoBack:Boolean(d)}):void 0,V=p?e=>p({...e,canGoBack:Boolean(d)}):void 0,H="function"!=typeof h?e=>M.createElement(PJ,m1({},e,{onLayout:a})):e=>h({...e,onLayout:a});return M.createElement(DJ,m1({modal:c,layout:u,headerTitle:H,headerLeft:j,headerLeftLabelVisible:_,headerRight:V,headerTitleContainerStyle:[P,k],headerLeftContainerStyle:[D,C],headerRightContainerStyle:[F,E],headerBackgroundContainerStyle:[B,x],headerStyle:I,headerStatusBarHeight:T},R))}function f1(){return f1=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},f1.apply(this,arguments)}const g1=M.memo(function(e){let{back:t,layout:n,progress:i,options:r,route:a,navigation:o,styleInterpolator:s}=e;const l=hH();let u;void 0!==r.headerBackTitle?u=r.headerBackTitle:t&&(u=t.title);const c=M.useCallback(function(e,t){let n;return function(){if(!n){for(var i=arguments.length,r=new Array(i),a=0;a<i;a++)r[a]=arguments[a];e.apply(this,r),n=setTimeout(()=>{n=void 0},t)}}}(()=>{o.isFocused()&&o.canGoBack()&&o.dispatch({...Rm.pop(),source:a.key})},50),[o,a.key]),d=M.useContext(o1),h=M.useContext(AJ),m=void 0!==r.headerStatusBarHeight?r.headerStatusBarHeight:d||h?0:l.top;return M.createElement(p1,f1({},r,{title:EJ(r,a.name),progress:i,layout:n,modal:d,headerBackTitle:void 0!==r.headerBackTitle?r.headerBackTitle:u,headerStatusBarHeight:m,onGoBack:t?c:void 0,styleInterpolator:s}))});function _1(e){let{mode:t,scenes:n,layout:i,getPreviousScene:r,getFocusedRoute:a,onContentHeightChange:o,style:s}=e;const l=a(),u=M.useContext(WJ);return M.createElement(uu.View,{pointerEvents:"box-none",style:s},n.slice(-3).map((e,n,a)=>{var s,c;if("screen"===t&&n!==a.length-1||!e)return null;const{header:d,headerMode:h,headerShown:m=!0,headerTransparent:p,headerStyleInterpolator:f}=e.descriptor.options;if(h!==t||!m)return null;const g=l.key===e.descriptor.route.key,_=r({route:e.descriptor.route});let v=u;if(_){const{options:e,route:t}=_.descriptor;v=_?{title:EJ(e,t.name)}:u}const y=null===(s=a[n-1])||void 0===s?void 0:s.descriptor,b=null===(c=a[n+1])||void 0===c?void 0:c.descriptor,{headerShown:w=!0,headerMode:S}=(null==y?void 0:y.options)||{},k=a.slice(n+1).find(e=>{const{headerShown:t=!0,headerMode:n}=(null==e?void 0:e.descriptor.options)||{};return!1===t||"screen"===n}),{gestureDirection:C}=(null==k?void 0:k.descriptor.options)||{},E=(!1===w||"screen"===S)&&!b||k,x={layout:i,back:v,progress:e.progress,options:e.descriptor.options,route:e.descriptor.route,navigation:e.descriptor.navigation,styleInterpolator:"float"===t?E?"vertical"===C||"vertical-inverted"===C?nJ:"horizontal-inverted"===C?tJ:eJ:f:iJ};return M.createElement(Bm.Provider,{key:e.descriptor.route.key,value:e.descriptor.navigation},M.createElement(jm.Provider,{value:e.descriptor.route},M.createElement(ga,{onLayout:o?t=>{const{height:n}=t.nativeEvent.layout;o({route:e.descriptor.route,height:n})}:void 0,pointerEvents:g?"box-none":"none",accessibilityElementsHidden:!g,importantForAccessibility:g?"auto":"no-hide-descendants",style:"float"===t&&!g||p?v1.header:null},void 0!==d?d(x):M.createElement(g1,x))))}))}const v1=Ei.create({header:{position:"absolute",top:0,left:0,right:0}});var y1,b1,w1={exports:{}};function S1(){return b1?y1:(b1=1,y1={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]})}var k1,C1,E1,x1,I1,T1,O1,R1,A1,L1,P1,M1,D1={exports:{}};function N1(){if(E1)return D1.exports;E1=1;var e=C1?k1:(C1=1,k1=function(e){return!(!e||"string"==typeof e)&&(e instanceof Array||Array.isArray(e)||e.length>=0&&(e.splice instanceof Function||Object.getOwnPropertyDescriptor(e,e.length-1)&&"String"!==e.constructor.name))}),t=Array.prototype.concat,n=Array.prototype.slice,i=D1.exports=function(i){for(var r=[],a=0,o=i.length;a<o;a++){var s=i[a];e(s)?r=t.call(r,n.call(s)):r.push(s)}return r};return i.wrap=function(e){return function(){return e(i(arguments))}},D1.exports}function F1(){if(T1)return I1;T1=1;const e=S1(),t={};for(const r of Object.keys(e))t[e[r]]=r;const n={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};I1=n;for(const r of Object.keys(n)){if(!("channels"in n[r]))throw new Error("missing channels property: "+r);if(!("labels"in n[r]))throw new Error("missing channel labels property: "+r);if(n[r].labels.length!==n[r].channels)throw new Error("channel and label counts mismatch: "+r);const{channels:e,labels:t}=n[r];delete n[r].channels,delete n[r].labels,Object.defineProperty(n[r],"channels",{value:e}),Object.defineProperty(n[r],"labels",{value:t})}function i(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}return n.rgb.hsl=function(e){const t=e[0]/255,n=e[1]/255,i=e[2]/255,r=Math.min(t,n,i),a=Math.max(t,n,i),o=a-r;let s,l;a===r?s=0:t===a?s=(n-i)/o:n===a?s=2+(i-t)/o:i===a&&(s=4+(t-n)/o),s=Math.min(60*s,360),s<0&&(s+=360);const u=(r+a)/2;return l=a===r?0:u<=.5?o/(a+r):o/(2-a-r),[s,100*l,100*u]},n.rgb.hsv=function(e){let t,n,i,r,a;const o=e[0]/255,s=e[1]/255,l=e[2]/255,u=Math.max(o,s,l),c=u-Math.min(o,s,l),d=function(e){return(u-e)/6/c+.5};return 0===c?(r=0,a=0):(a=c/u,t=d(o),n=d(s),i=d(l),o===u?r=i-n:s===u?r=1/3+t-i:l===u&&(r=2/3+n-t),r<0?r+=1:r>1&&(r-=1)),[360*r,100*a,100*u]},n.rgb.hwb=function(e){const t=e[0],i=e[1];let r=e[2];const a=n.rgb.hsl(e)[0],o=1/255*Math.min(t,Math.min(i,r));return r=1-1/255*Math.max(t,Math.max(i,r)),[a,100*o,100*r]},n.rgb.cmyk=function(e){const t=e[0]/255,n=e[1]/255,i=e[2]/255,r=Math.min(1-t,1-n,1-i);return[100*((1-t-r)/(1-r)||0),100*((1-n-r)/(1-r)||0),100*((1-i-r)/(1-r)||0),100*r]},n.rgb.keyword=function(n){const r=t[n];if(r)return r;let a,o=1/0;for(const t of Object.keys(e)){const r=i(n,e[t]);r<o&&(o=r,a=t)}return a},n.keyword.rgb=function(t){return e[t]},n.rgb.xyz=function(e){let t=e[0]/255,n=e[1]/255,i=e[2]/255;t=t>.04045?((t+.055)/1.055)**2.4:t/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92,i=i>.04045?((i+.055)/1.055)**2.4:i/12.92;return[100*(.4124*t+.3576*n+.1805*i),100*(.2126*t+.7152*n+.0722*i),100*(.0193*t+.1192*n+.9505*i)]},n.rgb.lab=function(e){const t=n.rgb.xyz(e);let i=t[0],r=t[1],a=t[2];i/=95.047,r/=100,a/=108.883,i=i>.008856?i**(1/3):7.787*i+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,a=a>.008856?a**(1/3):7.787*a+16/116;return[116*r-16,500*(i-r),200*(r-a)]},n.hsl.rgb=function(e){const t=e[0]/360,n=e[1]/100,i=e[2]/100;let r,a,o;if(0===n)return o=255*i,[o,o,o];r=i<.5?i*(1+n):i+n-i*n;const s=2*i-r,l=[0,0,0];for(let u=0;u<3;u++)a=t+1/3*-(u-1),a<0&&a++,a>1&&a--,o=6*a<1?s+6*(r-s)*a:2*a<1?r:3*a<2?s+(r-s)*(2/3-a)*6:s,l[u]=255*o;return l},n.hsl.hsv=function(e){const t=e[0];let n=e[1]/100,i=e[2]/100,r=n;const a=Math.max(i,.01);i*=2,n*=i<=1?i:2-i,r*=a<=1?a:2-a;return[t,100*(0===i?2*r/(a+r):2*n/(i+n)),100*((i+n)/2)]},n.hsv.rgb=function(e){const t=e[0]/60,n=e[1]/100;let i=e[2]/100;const r=Math.floor(t)%6,a=t-Math.floor(t),o=255*i*(1-n),s=255*i*(1-n*a),l=255*i*(1-n*(1-a));switch(i*=255,r){case 0:return[i,l,o];case 1:return[s,i,o];case 2:return[o,i,l];case 3:return[o,s,i];case 4:return[l,o,i];case 5:return[i,o,s]}},n.hsv.hsl=function(e){const t=e[0],n=e[1]/100,i=e[2]/100,r=Math.max(i,.01);let a,o;o=(2-n)*i;const s=(2-n)*r;return a=n*r,a/=s<=1?s:2-s,a=a||0,o/=2,[t,100*a,100*o]},n.hwb.rgb=function(e){const t=e[0]/360;let n=e[1]/100,i=e[2]/100;const r=n+i;let a;r>1&&(n/=r,i/=r);const o=Math.floor(6*t),s=1-i;a=6*t-o,1&o&&(a=1-a);const l=n+a*(s-n);let u,c,d;switch(o){default:case 6:case 0:u=s,c=l,d=n;break;case 1:u=l,c=s,d=n;break;case 2:u=n,c=s,d=l;break;case 3:u=n,c=l,d=s;break;case 4:u=l,c=n,d=s;break;case 5:u=s,c=n,d=l}return[255*u,255*c,255*d]},n.cmyk.rgb=function(e){const t=e[0]/100,n=e[1]/100,i=e[2]/100,r=e[3]/100;return[255*(1-Math.min(1,t*(1-r)+r)),255*(1-Math.min(1,n*(1-r)+r)),255*(1-Math.min(1,i*(1-r)+r))]},n.xyz.rgb=function(e){const t=e[0]/100,n=e[1]/100,i=e[2]/100;let r,a,o;return r=3.2406*t+-1.5372*n+-.4986*i,a=-.9689*t+1.8758*n+.0415*i,o=.0557*t+-.204*n+1.057*i,r=r>.0031308?1.055*r**(1/2.4)-.055:12.92*r,a=a>.0031308?1.055*a**(1/2.4)-.055:12.92*a,o=o>.0031308?1.055*o**(1/2.4)-.055:12.92*o,r=Math.min(Math.max(0,r),1),a=Math.min(Math.max(0,a),1),o=Math.min(Math.max(0,o),1),[255*r,255*a,255*o]},n.xyz.lab=function(e){let t=e[0],n=e[1],i=e[2];t/=95.047,n/=100,i/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,i=i>.008856?i**(1/3):7.787*i+16/116;return[116*n-16,500*(t-n),200*(n-i)]},n.lab.xyz=function(e){let t,n,i;n=(e[0]+16)/116,t=e[1]/500+n,i=n-e[2]/200;const r=n**3,a=t**3,o=i**3;return n=r>.008856?r:(n-16/116)/7.787,t=a>.008856?a:(t-16/116)/7.787,i=o>.008856?o:(i-16/116)/7.787,t*=95.047,n*=100,i*=108.883,[t,n,i]},n.lab.lch=function(e){const t=e[0],n=e[1],i=e[2];let r;r=360*Math.atan2(i,n)/2/Math.PI,r<0&&(r+=360);return[t,Math.sqrt(n*n+i*i),r]},n.lch.lab=function(e){const t=e[0],n=e[1],i=e[2]/360*2*Math.PI;return[t,n*Math.cos(i),n*Math.sin(i)]},n.rgb.ansi16=function(e,t=null){const[i,r,a]=e;let o=null===t?n.rgb.hsv(e)[2]:t;if(o=Math.round(o/50),0===o)return 30;let s=30+(Math.round(a/255)<<2|Math.round(r/255)<<1|Math.round(i/255));return 2===o&&(s+=60),s},n.hsv.ansi16=function(e){return n.rgb.ansi16(n.hsv.rgb(e),e[2])},n.rgb.ansi256=function(e){const t=e[0],n=e[1],i=e[2];if(t===n&&n===i)return t<8?16:t>248?231:Math.round((t-8)/247*24)+232;return 16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(i/255*5)},n.ansi16.rgb=function(e){let t=e%10;if(0===t||7===t)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];const n=.5*(1+~~(e>50));return[(1&t)*n*255,(t>>1&1)*n*255,(t>>2&1)*n*255]},n.ansi256.rgb=function(e){if(e>=232){const t=10*(e-232)+8;return[t,t,t]}let t;e-=16;return[Math.floor(e/36)/5*255,Math.floor((t=e%36)/6)/5*255,t%6/5*255]},n.rgb.hex=function(e){const t=(((255&Math.round(e[0]))<<16)+((255&Math.round(e[1]))<<8)+(255&Math.round(e[2]))).toString(16).toUpperCase();return"000000".substring(t.length)+t},n.hex.rgb=function(e){const t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let n=t[0];3===t[0].length&&(n=n.split("").map(e=>e+e).join(""));const i=parseInt(n,16);return[i>>16&255,i>>8&255,255&i]},n.rgb.hcg=function(e){const t=e[0]/255,n=e[1]/255,i=e[2]/255,r=Math.max(Math.max(t,n),i),a=Math.min(Math.min(t,n),i),o=r-a;let s,l;return s=o<1?a/(1-o):0,l=o<=0?0:r===t?(n-i)/o%6:r===n?2+(i-t)/o:4+(t-n)/o,l/=6,l%=1,[360*l,100*o,100*s]},n.hsl.hcg=function(e){const t=e[1]/100,n=e[2]/100,i=n<.5?2*t*n:2*t*(1-n);let r=0;return i<1&&(r=(n-.5*i)/(1-i)),[e[0],100*i,100*r]},n.hsv.hcg=function(e){const t=e[1]/100,n=e[2]/100,i=t*n;let r=0;return i<1&&(r=(n-i)/(1-i)),[e[0],100*i,100*r]},n.hcg.rgb=function(e){const t=e[0]/360,n=e[1]/100,i=e[2]/100;if(0===n)return[255*i,255*i,255*i];const r=[0,0,0],a=t%1*6,o=a%1,s=1-o;let l=0;switch(Math.floor(a)){case 0:r[0]=1,r[1]=o,r[2]=0;break;case 1:r[0]=s,r[1]=1,r[2]=0;break;case 2:r[0]=0,r[1]=1,r[2]=o;break;case 3:r[0]=0,r[1]=s,r[2]=1;break;case 4:r[0]=o,r[1]=0,r[2]=1;break;default:r[0]=1,r[1]=0,r[2]=s}return l=(1-n)*i,[255*(n*r[0]+l),255*(n*r[1]+l),255*(n*r[2]+l)]},n.hcg.hsv=function(e){const t=e[1]/100,n=t+e[2]/100*(1-t);let i=0;return n>0&&(i=t/n),[e[0],100*i,100*n]},n.hcg.hsl=function(e){const t=e[1]/100,n=e[2]/100*(1-t)+.5*t;let i=0;return n>0&&n<.5?i=t/(2*n):n>=.5&&n<1&&(i=t/(2*(1-n))),[e[0],100*i,100*n]},n.hcg.hwb=function(e){const t=e[1]/100,n=t+e[2]/100*(1-t);return[e[0],100*(n-t),100*(1-n)]},n.hwb.hcg=function(e){const t=e[1]/100,n=1-e[2]/100,i=n-t;let r=0;return i<1&&(r=(n-i)/(1-i)),[e[0],100*i,100*r]},n.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},n.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},n.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},n.gray.hsl=function(e){return[0,0,e[0]]},n.gray.hsv=n.gray.hsl,n.gray.hwb=function(e){return[0,100,e[0]]},n.gray.cmyk=function(e){return[0,0,0,e[0]]},n.gray.lab=function(e){return[e[0],0,0]},n.gray.hex=function(e){const t=255&Math.round(e[0]/100*255),n=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(n.length)+n},n.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]},I1}function B1(){if(R1)return O1;R1=1;const e=F1();function t(t){const n=function(){const t={},n=Object.keys(e);for(let e=n.length,i=0;i<e;i++)t[n[i]]={distance:-1,parent:null};return t}(),i=[t];for(n[t].distance=0;i.length;){const t=i.pop(),r=Object.keys(e[t]);for(let e=r.length,a=0;a<e;a++){const e=r[a],o=n[e];-1===o.distance&&(o.distance=n[t].distance+1,o.parent=t,i.unshift(e))}}return n}function n(e,t){return function(n){return t(e(n))}}function i(t,i){const r=[i[t].parent,t];let a=e[i[t].parent][t],o=i[t].parent;for(;i[o].parent;)r.unshift(i[o].parent),a=n(e[i[o].parent][o],a),o=i[o].parent;return a.conversion=r,a}return O1=function(e){const n=t(e),r={},a=Object.keys(n);for(let t=a.length,o=0;o<t;o++){const e=a[o];null!==n[e].parent&&(r[e]=i(e,n))}return r},O1}function j1(){if(L1)return A1;L1=1;const e=F1(),t=B1(),n={};return Object.keys(e).forEach(i=>{n[i]={},Object.defineProperty(n[i],"channels",{value:e[i].channels}),Object.defineProperty(n[i],"labels",{value:e[i].labels});const r=t(i);Object.keys(r).forEach(e=>{const t=r[e];n[i][e]=function(e){const t=function(...t){const n=t[0];if(null==n)return n;n.length>1&&(t=n);const i=e(t);if("object"==typeof i)for(let e=i.length,r=0;r<e;r++)i[r]=Math.round(i[r]);return i};return"conversion"in e&&(t.conversion=e.conversion),t}(t),n[i][e].raw=function(e){const t=function(...t){const n=t[0];return null==n?n:(n.length>1&&(t=n),e(t))};return"conversion"in e&&(t.conversion=e.conversion),t}(t)})}),A1=n}function V1(){if(M1)return P1;M1=1;const e=function(){if(x1)return w1.exports;x1=1;var e=S1(),t=N1(),n=Object.hasOwnProperty,i=Object.create(null);for(var r in e)n.call(e,r)&&(i[e[r]]=r);var a=w1.exports={to:{},get:{}};function o(e,t,n){return Math.min(Math.max(t,e),n)}function s(e){var t=Math.round(e).toString(16).toUpperCase();return t.length<2?"0"+t:t}return a.get=function(e){var t,n;switch(e.substring(0,3).toLowerCase()){case"hsl":t=a.get.hsl(e),n="hsl";break;case"hwb":t=a.get.hwb(e),n="hwb";break;default:t=a.get.rgb(e),n="rgb"}return t?{model:n,value:t}:null},a.get.rgb=function(t){if(!t)return null;var i,r,a,s=[0,0,0,1];if(i=t.match(/^#([a-f0-9]{6})([a-f0-9]{2})?$/i)){for(a=i[2],i=i[1],r=0;r<3;r++){var l=2*r;s[r]=parseInt(i.slice(l,l+2),16)}a&&(s[3]=parseInt(a,16)/255)}else if(i=t.match(/^#([a-f0-9]{3,4})$/i)){for(a=(i=i[1])[3],r=0;r<3;r++)s[r]=parseInt(i[r]+i[r],16);a&&(s[3]=parseInt(a+a,16)/255)}else if(i=t.match(/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)){for(r=0;r<3;r++)s[r]=parseInt(i[r+1],0);i[4]&&(i[5]?s[3]=.01*parseFloat(i[4]):s[3]=parseFloat(i[4]))}else{if(!(i=t.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)))return(i=t.match(/^(\w+)$/))?"transparent"===i[1]?[0,0,0,0]:n.call(e,i[1])?((s=e[i[1]])[3]=1,s):null:null;for(r=0;r<3;r++)s[r]=Math.round(2.55*parseFloat(i[r+1]));i[4]&&(i[5]?s[3]=.01*parseFloat(i[4]):s[3]=parseFloat(i[4]))}for(r=0;r<3;r++)s[r]=o(s[r],0,255);return s[3]=o(s[3],0,1),s},a.get.hsl=function(e){if(!e)return null;var t=e.match(/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(t){var n=parseFloat(t[4]);return[(parseFloat(t[1])%360+360)%360,o(parseFloat(t[2]),0,100),o(parseFloat(t[3]),0,100),o(isNaN(n)?1:n,0,1)]}return null},a.get.hwb=function(e){if(!e)return null;var t=e.match(/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(t){var n=parseFloat(t[4]);return[(parseFloat(t[1])%360+360)%360,o(parseFloat(t[2]),0,100),o(parseFloat(t[3]),0,100),o(isNaN(n)?1:n,0,1)]}return null},a.to.hex=function(){var e=t(arguments);return"#"+s(e[0])+s(e[1])+s(e[2])+(e[3]<1?s(Math.round(255*e[3])):"")},a.to.rgb=function(){var e=t(arguments);return e.length<4||1===e[3]?"rgb("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+")":"rgba("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+", "+e[3]+")"},a.to.rgb.percent=function(){var e=t(arguments),n=Math.round(e[0]/255*100),i=Math.round(e[1]/255*100),r=Math.round(e[2]/255*100);return e.length<4||1===e[3]?"rgb("+n+"%, "+i+"%, "+r+"%)":"rgba("+n+"%, "+i+"%, "+r+"%, "+e[3]+")"},a.to.hsl=function(){var e=t(arguments);return e.length<4||1===e[3]?"hsl("+e[0]+", "+e[1]+"%, "+e[2]+"%)":"hsla("+e[0]+", "+e[1]+"%, "+e[2]+"%, "+e[3]+")"},a.to.hwb=function(){var e=t(arguments),n="";return e.length>=4&&1!==e[3]&&(n=", "+e[3]),"hwb("+e[0]+", "+e[1]+"%, "+e[2]+"%"+n+")"},a.to.keyword=function(e){return i[e.slice(0,3)]},w1.exports}(),t=j1(),n=["keyword","gray","hex"],i={};for(const c of Object.keys(t))i[[...t[c].labels].sort().join("")]=c;const r={};function a(o,s){if(!(this instanceof a))return new a(o,s);if(s&&s in n&&(s=null),s&&!(s in t))throw new Error("Unknown model: "+s);let l,c;if(null==o)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(o instanceof a)this.model=o.model,this.color=[...o.color],this.valpha=o.valpha;else if("string"==typeof o){const n=e.get(o);if(null===n)throw new Error("Unable to parse color from string: "+o);this.model=n.model,c=t[this.model].channels,this.color=n.value.slice(0,c),this.valpha="number"==typeof n.value[c]?n.value[c]:1}else if(o.length>0){this.model=s||"rgb",c=t[this.model].channels;const e=Array.prototype.slice.call(o,0,c);this.color=u(e,c),this.valpha="number"==typeof o[c]?o[c]:1}else if("number"==typeof o)this.model="rgb",this.color=[o>>16&255,o>>8&255,255&o],this.valpha=1;else{this.valpha=1;const e=Object.keys(o);"alpha"in o&&(e.splice(e.indexOf("alpha"),1),this.valpha="number"==typeof o.alpha?o.alpha:0);const n=e.sort().join("");if(!(n in i))throw new Error("Unable to parse color from object: "+JSON.stringify(o));this.model=i[n];const{labels:r}=t[this.model],a=[];for(l=0;l<r.length;l++)a.push(o[r[l]]);this.color=u(a)}if(r[this.model])for(c=t[this.model].channels,l=0;l<c;l++){const e=r[this.model][l];e&&(this.color[l]=e(this.color[l]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}a.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(t){let n=this.model in e.to?this:this.rgb();n=n.round("number"==typeof t?t:1);const i=1===n.valpha?n.color:[...n.color,this.valpha];return e.to[n.model](i)},percentString(t){const n=this.rgb().round("number"==typeof t?t:1),i=1===n.valpha?n.color:[...n.color,this.valpha];return e.to.rgb.percent(i)},array(){return 1===this.valpha?[...this.color]:[...this.color,this.valpha]},object(){const e={},{channels:n}=t[this.model],{labels:i}=t[this.model];for(let t=0;t<n;t++)e[i[t]]=this.color[t];return 1!==this.valpha&&(e.alpha=this.valpha),e},unitArray(){const e=this.rgb().color;return e[0]/=255,e[1]/=255,e[2]/=255,1!==this.valpha&&e.push(this.valpha),e},unitObject(){const e=this.rgb().object();return e.r/=255,e.g/=255,e.b/=255,1!==this.valpha&&(e.alpha=this.valpha),e},round(e){return e=Math.max(e||0,0),new a([...this.color.map(o(e)),this.valpha],this.model)},alpha(e){return void 0!==e?new a([...this.color,Math.max(0,Math.min(1,e))],this.model):this.valpha},red:s("rgb",0,l(255)),green:s("rgb",1,l(255)),blue:s("rgb",2,l(255)),hue:s(["hsl","hsv","hsl","hwb","hcg"],0,e=>(e%360+360)%360),saturationl:s("hsl",1,l(100)),lightness:s("hsl",2,l(100)),saturationv:s("hsv",1,l(100)),value:s("hsv",2,l(100)),chroma:s("hcg",1,l(100)),gray:s("hcg",2,l(100)),white:s("hwb",1,l(100)),wblack:s("hwb",2,l(100)),cyan:s("cmyk",0,l(100)),magenta:s("cmyk",1,l(100)),yellow:s("cmyk",2,l(100)),black:s("cmyk",3,l(100)),x:s("xyz",0,l(95.047)),y:s("xyz",1,l(100)),z:s("xyz",2,l(108.833)),l:s("lab",0,l(100)),a:s("lab",1),b:s("lab",2),keyword(e){return void 0!==e?new a(e):t[this.model].keyword(this.color)},hex(t){return void 0!==t?new a(t):e.to.hex(this.rgb().round().color)},hexa(t){if(void 0!==t)return new a(t);const n=this.rgb().round().color;let i=Math.round(255*this.valpha).toString(16).toUpperCase();return 1===i.length&&(i="0"+i),e.to.hex(n)+i},rgbNumber(){const e=this.rgb().color;return(255&e[0])<<16|(255&e[1])<<8|255&e[2]},luminosity(){const e=this.rgb().color,t=[];for(const[n,i]of e.entries()){const e=i/255;t[n]=e<=.04045?e/12.92:((e+.055)/1.055)**2.4}return.2126*t[0]+.7152*t[1]+.0722*t[2]},contrast(e){const t=this.luminosity(),n=e.luminosity();return t>n?(t+.05)/(n+.05):(n+.05)/(t+.05)},level(e){const t=this.contrast(e);return t>=7?"AAA":t>=4.5?"AA":""},isDark(){const e=this.rgb().color;return(2126*e[0]+7152*e[1]+722*e[2])/1e4<128},isLight(){return!this.isDark()},negate(){const e=this.rgb();for(let t=0;t<3;t++)e.color[t]=255-e.color[t];return e},lighten(e){const t=this.hsl();return t.color[2]+=t.color[2]*e,t},darken(e){const t=this.hsl();return t.color[2]-=t.color[2]*e,t},saturate(e){const t=this.hsl();return t.color[1]+=t.color[1]*e,t},desaturate(e){const t=this.hsl();return t.color[1]-=t.color[1]*e,t},whiten(e){const t=this.hwb();return t.color[1]+=t.color[1]*e,t},blacken(e){const t=this.hwb();return t.color[2]+=t.color[2]*e,t},grayscale(){const e=this.rgb().color,t=.3*e[0]+.59*e[1]+.11*e[2];return a.rgb(t,t,t)},fade(e){return this.alpha(this.valpha-this.valpha*e)},opaquer(e){return this.alpha(this.valpha+this.valpha*e)},rotate(e){const t=this.hsl();let n=t.color[0];return n=(n+e)%360,n=n<0?360+n:n,t.color[0]=n,t},mix(e,t){if(!e||!e.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof e);const n=e.rgb(),i=this.rgb(),r=void 0===t?.5:t,o=2*r-1,s=n.alpha()-i.alpha(),l=((o*s===-1?o:(o+s)/(1+o*s))+1)/2,u=1-l;return a.rgb(l*n.red()+u*i.red(),l*n.green()+u*i.green(),l*n.blue()+u*i.blue(),n.alpha()*r+i.alpha()*(1-r))}};for(const c of Object.keys(t)){if(n.includes(c))continue;const{channels:e}=t[c];a.prototype[c]=function(...e){return this.model===c?new a(this):e.length>0?new a(e,c):new a([...(n=t[this.model][c].raw(this.color),Array.isArray(n)?n:[n]),this.valpha],c);var n},a[c]=function(...t){let n=t[0];return"number"==typeof n&&(n=u(t,e)),new a(n,c)}}function o(e){return function(t){return function(e,t){return Number(e.toFixed(t))}(t,e)}}function s(e,t,n){e=Array.isArray(e)?e:[e];for(const i of e)(r[i]||(r[i]=[]))[t]=n;return e=e[0],function(i){let r;return void 0!==i?(n&&(i=n(i)),r=this[e](),r.color[t]=i,r):(r=this[e]().color[t],n&&(r=n(r)),r)}}function l(e){return function(t){return Math.max(0,Math.min(e,t))}}function u(e,t){for(let n=0;n<t;n++)"number"!=typeof e[n]&&(e[n]=0);return e}return P1=a}const H1=n(V1());function z1(e,t){for(var n=e.length-1;n>=0;n--)if(t(e[n]))return n;return-1}function U1(e){switch(e){case"vertical":return 1;case"vertical-inverted":return-1;case"horizontal":return Lu.getConstants().isRTL?-1:1;case"horizontal-inverted":return Lu.getConstants().isRTL?1:-1}}function G1(e,t){const n=U1(t);switch(t){case"vertical":case"vertical-inverted":return e.height*n;case"horizontal":case"horizontal-inverted":return e.width*n}}const W1=i(tz);function Y1(){return Y1=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},Y1.apply(this,arguments)}let $1;try{$1=W1}catch(e){}const X1=e=>{let{enabled:t,...n}=e;return null!=$1?M.createElement($1.ScreenContainer,Y1({enabled:t},n)):M.createElement(ga,n)},q1=e=>{let{enabled:t,active:n,...i}=e;return null!=$1?M.createElement($1.Screen,Y1({enabled:t,activityState:n},i)):M.createElement(ga,i)},Z1=M.createContext(void 0);function K1(e){var t,n;let{dark:i,layout:r,insets:a,style:o}=e;const{dark:s}=Rf(),[l,u]=M.useState(!0),c=1-20/r.width,d=(a.top-34)*c,h=Ei.flatten(o),m=null==h||null===(t=h.transform)||void 0===t||null===(n=t.find(e=>void 0!==e.translateY))||void 0===n?void 0:n.translateY;M.useEffect(()=>{const e=null==m?void 0:m.addListener(e=>{let{value:t}=e;u(t<d)});return()=>null==m?void 0:m.removeListener(e)},[d,m]);const p=i??!s;return M.createElement(uh,{animated:!0,barStyle:l&&p?"dark-content":"light-content"})}function Q1(){return Q1=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},Q1.apply(this,arguments)}const J1=M.forwardRef(function(e,t){let{enabled:n,layout:i,style:r,...a}=e;const[o,s]=M.useState(!1),[l,u]=M.useState("auto");return M.useImperativeHandle(t,()=>({setPointerEvents:u})),M.useEffect(()=>{if("undefined"==typeof document||!document.body)return;const e=document.body.clientWidth,t=document.body.clientHeight;s(e===i.width&&t===i.height)},[i.height,i.width]),M.createElement(ga,Q1({},a,{pointerEvents:l,style:[n&&o?e2.page:e2.card,r]}))}),e2=Ei.create({page:{minHeight:"100%"},card:{flex:1,overflow:"hidden"}});function t2(){return t2=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},t2.apply(this,arguments)}const n2="web"!==lr.OS,i2=e=>{if(e){return null!=Ei.flatten(e).opacity}return!1};class r2 extends M.Component{static defaultProps={shadowEnabled:!1,gestureEnabled:!0,gestureVelocityImpact:.3,overlay:e=>{let{style:t}=e;return t?M.createElement(uu.View,{pointerEvents:"none",style:[o2.overlay,t]}):null}};componentDidMount(){this.animate({closing:this.props.closing}),this.isCurrentlyMounted=!0}componentDidUpdate(e){const{layout:t,gestureDirection:n,closing:i}=this.props,{width:r,height:a}=t;r!==e.layout.width&&this.layout.width.setValue(r),a!==e.layout.height&&this.layout.height.setValue(a),n!==e.gestureDirection&&this.inverted.setValue(U1(n));const o=this.getAnimateToValue(this.props);this.getAnimateToValue(e)===o&&this.lastToValue===o||this.animate({closing:i})}componentWillUnmount(){this.props.gesture.stopAnimation(),this.isCurrentlyMounted=!1,this.handleEndInteraction()}isCurrentlyMounted=!1;isClosing=new uu.Value(0);inverted=new uu.Value(U1(this.props.gestureDirection));layout={width:new uu.Value(this.props.layout.width),height:new uu.Value(this.props.layout.height)};isSwiping=new uu.Value(0);animate=e=>{let{closing:t,velocity:n}=e;const{gesture:i,transitionSpec:r,onOpen:a,onClose:o,onTransition:s}=this.props,l=this.getAnimateToValue({...this.props,closing:t});this.lastToValue=l,this.isClosing.setValue(t?1:0);const u=t?r.close:r.open,c="spring"===u.animation?uu.spring:uu.timing;this.setPointerEventsEnabled(!t),this.handleStartInteraction(),clearTimeout(this.pendingGestureCallback),null==s||s({closing:t,gesture:void 0!==n}),c(i,{...u.config,velocity:n,toValue:l,useNativeDriver:n2,isInteraction:!1}).start(e=>{let{finished:n}=e;this.handleEndInteraction(),clearTimeout(this.pendingGestureCallback),n&&(t?o():a(),this.isCurrentlyMounted&&this.forceUpdate())})};getAnimateToValue=e=>{let{closing:t,layout:n,gestureDirection:i}=e;return t?G1(n,i):0};setPointerEventsEnabled=e=>{var t;const n=e?"box-none":"none";null===(t=this.ref.current)||void 0===t||t.setPointerEvents(n)};handleStartInteraction=()=>{void 0===this.interactionHandle&&(this.interactionHandle=Qa.createInteractionHandle())};handleEndInteraction=()=>{void 0!==this.interactionHandle&&(Qa.clearInteractionHandle(this.interactionHandle),this.interactionHandle=void 0)};handleGestureStateChange=e=>{let{nativeEvent:t}=e;const{layout:n,onClose:i,onGestureBegin:r,onGestureCanceled:a,onGestureEnd:o,gestureDirection:s,gestureVelocityImpact:l}=this.props;switch(t.state){case c1:this.isSwiping.setValue(1),this.handleStartInteraction(),null==r||r();break;case u1:{this.isSwiping.setValue(0),this.handleEndInteraction();const e="vertical"===s||"vertical-inverted"===s?t.velocityY:t.velocityX;this.animate({closing:this.props.closing,velocity:e}),null==a||a();break}case d1:{let e,r,a;this.isSwiping.setValue(0),"vertical"===s||"vertical-inverted"===s?(e=n.height,r=t.translationY,a=t.velocityY):(e=n.width,r=t.translationX,a=t.velocityX);const u=(r+a*l)*U1(s)>e/2?0!==a||0!==r:this.props.closing;this.animate({closing:u,velocity:a}),u&&(this.pendingGestureCallback=setTimeout(()=>{i(),this.forceUpdate()},32)),null==o||o();break}}};getInterpolatedStyle=h1((e,t)=>e(t));getCardAnimation=h1((e,t,n,i,r,a,o,s)=>({index:e,current:{progress:t},next:n&&{progress:n},closing:this.isClosing,swiping:this.isSwiping,inverted:this.inverted,layouts:{screen:i},insets:{top:r,right:a,bottom:o,left:s}}));gestureActivationCriteria(){const{layout:e,gestureDirection:t,gestureResponseDistance:n}=this.props,i=!0,r=void 0!==n?n:"vertical"===t||"vertical-inverted"===t?135:50;if("vertical"===t)return{maxDeltaX:15,minOffsetY:5,hitSlop:{bottom:-e.height+r},enableTrackpadTwoFingerGesture:i};if("vertical-inverted"===t)return{maxDeltaX:15,minOffsetY:-5,hitSlop:{top:-e.height+r},enableTrackpadTwoFingerGesture:i};{const n=-e.width+r;return 1===U1(t)?{minOffsetX:5,maxDeltaY:20,hitSlop:{right:n},enableTrackpadTwoFingerGesture:i}:{minOffsetX:-5,maxDeltaY:20,hitSlop:{left:n},enableTrackpadTwoFingerGesture:i}}}ref=M.createRef();render(){const{styleInterpolator:e,interpolationIndex:t,current:n,gesture:i,next:r,layout:a,insets:o,overlay:s,overlayEnabled:l,shadowEnabled:u,gestureEnabled:c,gestureDirection:d,pageOverflowEnabled:h,headerDarkContent:m,children:p,containerStyle:f,contentStyle:g,..._}=this.props,v=this.getCardAnimation(t,n,r,a,o.top,o.right,o.bottom,o.left),y=this.getInterpolatedStyle(e,v),{containerStyle:b,cardStyle:w,overlayStyle:S,shadowStyle:k}=y,C=c?uu.event([{nativeEvent:"vertical"===d||"vertical-inverted"===d?{translationY:i}:{translationX:i}}],{useNativeDriver:n2}):void 0,{backgroundColor:E}=Ei.flatten(g||{}),x="string"==typeof E&&0===H1(E).alpha();return M.createElement(Z1.Provider,{value:v},"ios"===lr.OS&&l&&r&&a2(e)?M.createElement(K1,{dark:m,layout:a,insets:o,style:w}):null,M.createElement(uu.View,{style:{opacity:n},collapsable:!1}),M.createElement(ga,t2({pointerEvents:"box-none",collapsable:!1},_),l?M.createElement(ga,{pointerEvents:"box-none",style:Ei.absoluteFill},s({style:S})):null,M.createElement(uu.View,{style:[o2.container,b,f],pointerEvents:"box-none"},M.createElement(s1,t2({enabled:0!==a.width&&c,onGestureEvent:C,onHandlerStateChange:this.handleGestureStateChange},this.gestureActivationCriteria()),M.createElement(uu.View,{needsOffscreenAlphaCompositing:i2(w),style:[o2.container,w]},u&&k&&!x?M.createElement(uu.View,{style:[o2.shadow,"horizontal"===d?[o2.shadowHorizontal,o2.shadowLeft]:"horizontal-inverted"===d?[o2.shadowHorizontal,o2.shadowRight]:"vertical"===d?[o2.shadowVertical,o2.shadowTop]:[o2.shadowVertical,o2.shadowBottom],{backgroundColor:E},k],pointerEvents:"none"}):null,M.createElement(J1,{ref:this.ref,enabled:h,layout:a,style:g},p))))))}}const a2=e=>e===ZQ||"forModalPresentationIOS"===e.name,o2=Ei.create({container:{flex:1},overlay:{flex:1,backgroundColor:"#000"},shadow:{position:"absolute",shadowRadius:5,shadowColor:"#000",shadowOpacity:.3},shadowHorizontal:{top:0,bottom:0,width:3,shadowOffset:{width:-1,height:1}},shadowLeft:{left:0},shadowRight:{right:0},shadowVertical:{left:0,right:0,height:3,shadowOffset:{width:1,height:-1}},shadowTop:{top:0},shadowBottom:{bottom:0}});function s2(e){let{interpolationIndex:t,index:n,active:i,closing:r,gesture:a,focused:o,modal:s,getPreviousScene:l,getFocusedRoute:u,headerDarkContent:c,hasAbsoluteFloatHeader:d,headerHeight:h,onHeaderHeightChange:m,isParentHeaderShown:p,isNextScreenTransparent:f,detachCurrentScreen:g,layout:_,onCloseRoute:v,onOpenRoute:y,onGestureCancel:b,onGestureEnd:w,onGestureStart:S,onTransitionEnd:k,onTransitionStart:C,renderHeader:E,renderScene:x,safeAreaInsetBottom:I,safeAreaInsetLeft:T,safeAreaInsetRight:O,safeAreaInsetTop:R,scene:A}=e;const L=M.useContext(YJ),{onPageChangeStart:P,onPageChangeCancel:D,onPageChangeConfirm:N}=function(e){const t=M.useRef(void 0),n=M.useRef(0),i=M.useRef(),r=M.useCallback(()=>{void 0!==i.current&&(clearTimeout(i.current),i.current=void 0)},[]),a=M.useCallback(()=>{if(!e())return;r();const i=kh.State.currentlyFocusedInput();null==i||i.blur(),t.current=i,n.current=Date.now()},[r,e]),o=M.useCallback(n=>{if(e()){if(r(),n)Pu.dismiss();else{const e=t.current;null==e||e.blur()}t.current=void 0}},[r,e]),s=M.useCallback(()=>{if(!e())return;r();const a=t.current;a&&(Date.now()-n.current<100?i.current=setTimeout(()=>{null==a||a.focus(),t.current=void 0},100):(null==a||a.focus(),t.current=void 0))},[r,e]);return M.useEffect(()=>()=>r(),[r]),{onPageChangeStart:a,onPageChangeConfirm:o,onPageChangeCancel:s}}(M.useCallback(()=>{const{options:e,navigation:t}=A.descriptor;return t.isFocused()&&!1!==e.keyboardHandlingEnabled},[A.descriptor])),F={top:R,right:O,bottom:I,left:T},{colors:B}=Rf(),[j,V]=M.useState("box-none");M.useEffect(()=>{var e,t;const n=null===(e=A.progress.next)||void 0===e||null===(t=e.addListener)||void 0===t?void 0:t.call(e,e=>{let{value:t}=e;V(t<=.1?"box-none":"none")});return()=>{var e,t;n&&(null===(e=A.progress.next)||void 0===e||null===(t=e.removeListener)||void 0===t||t.call(e,n))}},[j,A.progress.next]);const{presentation:H,animationEnabled:z,cardOverlay:U,cardOverlayEnabled:G,cardShadowEnabled:W,cardStyle:Y,cardStyleInterpolator:$,gestureDirection:X,gestureEnabled:q,gestureResponseDistance:Z,gestureVelocityImpact:K,headerMode:Q,headerShown:J,transitionSpec:ee}=A.descriptor.options,te=l({route:A.descriptor.route});let ne;if(te){const{options:e,route:t}=te.descriptor;ne=EJ(e,t.name)}const ie=M.useMemo(()=>void 0!==ne?{title:ne}:void 0,[ne]);return M.createElement(r2,{interpolationIndex:t,gestureDirection:X,layout:_,insets:F,gesture:a,current:A.progress.current,next:A.progress.next,closing:r,onOpen:()=>{const{route:e}=A.descriptor;k({route:e},!1),y({route:e})},onClose:()=>{const{route:e}=A.descriptor;k({route:e},!0),v({route:e})},overlay:U,overlayEnabled:G,shadowEnabled:W,onTransition:e=>{let{closing:t,gesture:n}=e;const{route:r}=A.descriptor;n?i&&t?null==N||N(!1):null==D||D():null==N||N(!0),null==C||C({route:r},t)},onGestureBegin:()=>{const{route:e}=A.descriptor;P(),S({route:e})},onGestureCanceled:()=>{const{route:e}=A.descriptor;D(),b({route:e})},onGestureEnd:()=>{const{route:e}=A.descriptor;w({route:e})},gestureEnabled:0!==n&&q,gestureResponseDistance:Z,gestureVelocityImpact:K,transitionSpec:ee,styleInterpolator:$,accessibilityElementsHidden:!o,importantForAccessibility:o?"auto":"no-hide-descendants",pointerEvents:i?"box-none":j,pageOverflowEnabled:"float"!==Q&&"modal"!==H,headerDarkContent:c,containerStyle:d&&"screen"!==Q?{marginTop:h}:null,contentStyle:[{backgroundColor:"transparentModal"===H?"transparent":B.background},Y],style:[{overflow:i?void 0:"hidden",display:!1!==z||!1!==f||!1===g||o?"flex":"none"},Ei.absoluteFill]},M.createElement(ga,{style:u2.container},M.createElement(o1.Provider,{value:s},M.createElement(ga,{style:u2.scene},M.createElement(WJ.Provider,{value:ie},M.createElement(AJ.Provider,{value:p||!1!==J},M.createElement(YJ.Provider,{value:J?h:L??0},x({route:A.descriptor.route}))))),"float"!==Q?E({mode:"screen",layout:_,scenes:[te,A],getPreviousScene:l,getFocusedRoute:u,onContentHeightChange:m}):null)))}const l2=M.memo(s2),u2=Ei.create({container:{flex:1,flexDirection:"column-reverse"},scene:{flex:1}}),c2=Object.freeze({options:{}}),d2=(e,t)=>{const{cardStyleInterpolator:n}=e[t].descriptor.options;let i=0;for(let a=t-1;a>=0;a--){var r;if((null===(r=e[a])||void 0===r?void 0:r.descriptor.options.cardStyleInterpolator)!==n)break;i++}return i},h2=(e,t,n)=>{if(n)return!0;const{cardStyleInterpolator:i}=e.descriptor.options;return a2(i)&&0!==t},m2=(e,t,n,i,r,a)=>e.reduce((o,s,l)=>{const{headerStatusBarHeight:u=(n?0:t.top),headerStyle:c}=s.descriptor.options,d=Ei.flatten(c||{}),h="height"in d&&"number"==typeof d.height?d.height:a[s.route.key],m=d2(e,l),p=h2(s,m,i);return o[s.route.key]="number"==typeof h?h:CJ(r,p,u),o},{}),p2=(e,t)=>{const{presentation:n,gestureDirection:i=("modal"===n?yJ.gestureDirection:vJ.gestureDirection)}=(null==t?void 0:t.options)||{};return G1(e,i)},f2=(e,t,n)=>{const i=p2({width:Math.max(1,t.width),height:Math.max(1,t.height)},n);return i>0?e.interpolate({inputRange:[0,i],outputRange:[1,0]}):e.interpolate({inputRange:[i,0],outputRange:[0,1]})};class g2 extends M.Component{static getDerivedStateFromProps(e,t){if(e.routes===t.routes&&e.descriptors===t.descriptors)return null;const n=e.routes.reduce((n,i)=>{const r=e.descriptors[i.key],{animationEnabled:a}=(null==r?void 0:r.options)||{};return n[i.key]=t.gestures[i.key]||new uu.Value(e.openingRouteKeys.includes(i.key)&&!1!==a?p2(t.layout,r):0),n},{}),i=e.routes.map((i,r,a)=>{const o=a[r-1],s=a[r+1],l=t.scenes[r],u=n[i.key],c=o?n[o.key]:void 0,d=s?n[s.key]:void 0,h=e.descriptors[i.key]||t.descriptors[i.key]||(l?l.descriptor:c2),m=e.descriptors[null==s?void 0:s.key]||t.descriptors[null==s?void 0:s.key],p=e.descriptors[null==o?void 0:o.key]||t.descriptors[null==o?void 0:o.key],f=r!==a.length-1&&m&&"transparentModal"!==m.options.presentation?m.options:h.options;let g="modal"===f.presentation?yJ:"transparentModal"===f.presentation?_J:vJ;const{animationEnabled:_="web"!==lr.OS&&"windows"!==lr.OS&&"macos"!==lr.OS,gestureEnabled:v="ios"===lr.OS&&_,gestureDirection:y=g.gestureDirection,transitionSpec:b=g.transitionSpec,cardStyleInterpolator:w=(!1===_?KQ:g.cardStyleInterpolator),headerStyleInterpolator:S=g.headerStyleInterpolator,cardOverlayEnabled:k="ios"!==lr.OS&&"transparentModal"!==f.presentation||a2(w)}=f,C=h.options.headerMode??("modal"===f.presentation||"transparentModal"===f.presentation||"modal"===(null==m?void 0:m.options.presentation)||"transparentModal"===(null==m?void 0:m.options.presentation)||a2(w)||"ios"!==lr.OS||void 0!==h.options.header?"screen":"float"),E={route:i,descriptor:{...h,options:{...h.options,animationEnabled:_,cardOverlayEnabled:k,cardStyleInterpolator:w,gestureDirection:y,gestureEnabled:v,headerStyleInterpolator:S,transitionSpec:b,headerMode:C}},progress:{current:f2(u,t.layout,h),next:d&&"transparentModal"!==(null==m?void 0:m.options.presentation)?f2(d,t.layout,m):void 0,previous:c?f2(c,t.layout,p):void 0},__memo:[t.layout,h,m,p,u,d,c]};return l&&E.__memo.every((e,t)=>l.__memo[t]===e)?l:E});return{routes:e.routes,scenes:i,gestures:n,descriptors:e.descriptors,headerHeights:m2(i,e.insets,e.isParentHeaderShown,e.isParentModal,t.layout,t.headerHeights)}}constructor(e){super(e),this.state={routes:[],scenes:[],gestures:{},layout:t1.initialMetrics.frame,descriptors:this.props.descriptors,headerHeights:{}}}handleLayout=e=>{const{height:t,width:n}=e.nativeEvent.layout,i={width:n,height:t};this.setState((e,r)=>t===e.layout.height&&n===e.layout.width?null:{layout:i,headerHeights:m2(e.scenes,r.insets,r.isParentHeaderShown,r.isParentModal,i,e.headerHeights)})};handleHeaderLayout=e=>{let{route:t,height:n}=e;this.setState(e=>{let{headerHeights:i}=e;return i[t.key]===n?null:{headerHeights:{...i,[t.key]:n}}})};getFocusedRoute=()=>{const{state:e}=this.props;return e.routes[e.index]};getPreviousScene=e=>{let{route:t}=e;const{getPreviousRoute:n}=this.props,{scenes:i}=this.state,r=n({route:t});if(r){return i.find(e=>e.descriptor.route.key===r.key)}};render(){const{insets:e,state:t,routes:n,closingRouteKeys:i,onOpenRoute:r,onCloseRoute:a,renderHeader:o,renderScene:s,isParentHeaderShown:l,isParentModal:u,onTransitionStart:c,onTransitionEnd:d,onGestureStart:h,onGestureEnd:m,onGestureCancel:p,detachInactiveScreens:f="web"===lr.OS||"android"===lr.OS||"ios"===lr.OS}=this.props,{scenes:g,layout:_,gestures:v,headerHeights:y}=this.state,b=t.routes[t.index],w=y[b.key],S=this.state.scenes.slice(-2).some(e=>{const t=e.descriptor.options??{},{headerMode:n,headerTransparent:i,headerShown:r=!0}=t;return!(!i&&!1!==r&&"screen"!==n)});let k=1;for(let E=g.length-1;E>=0;E--){const{options:e}=g[E].descriptor,{detachPreviousScreen:t="transparentModal"!==e.presentation&&(!a2(e.cardStyleInterpolator)||E!==z1(g,e=>{const{cardStyleInterpolator:t}=e.descriptor.options;return t===ZQ||"forModalPresentationIOS"===(null==t?void 0:t.name)}))}=e;if(!1===t)k++;else if(E<=g.length-2)break}const C=M.createElement(M.Fragment,{key:"header"},o({mode:"float",layout:_,scenes:g,getPreviousScene:this.getPreviousScene,getFocusedRoute:this.getFocusedRoute,onContentHeightChange:this.handleHeaderLayout,style:[_2.floating,S&&[{height:w},_2.absolute]]}));return M.createElement(kJ,null,S?null:C,M.createElement(X1,{enabled:f,style:_2.container,onLayout:this.handleLayout},n.map((t,n,w)=>{var C,E;const x=b.key===t.key,I=v[t.key],T=g[n];let O=1;if(n<w.length-k-1)O=0;else{const e=g[w.length-1],t=n===w.length-1?2:n>=w.length-k?1:0;O=e?e.progress.current.interpolate({inputRange:[0,.99999,1],outputRange:[1,1,t],extrapolate:"clamp"}):1}const{headerShown:R=!0,headerTransparent:A,headerStyle:L,headerTintColor:P,freezeOnBlur:D}=T.descriptor.options,N=e.top,F=e.right,B=e.bottom,j=e.left,V=!1!==R?y[t.key]:0;let H;if(R)if("string"==typeof P)H=H1(P).isDark();else{const e=Ei.flatten(L);e&&"backgroundColor"in e&&"string"==typeof e.backgroundColor&&(H=!H1(e.backgroundColor).isDark())}const z=d2(g,n),U=h2(T,z,u),G="transparentModal"===(null===(C=g[n+1])||void 0===C?void 0:C.descriptor.options.presentation),W=!1!==(null===(E=g[n+1])||void 0===E?void 0:E.descriptor.options.detachPreviousScreen);return M.createElement(q1,{key:t.key,style:Ei.absoluteFill,enabled:f,active:O,freezeOnBlur:D,pointerEvents:"box-none"},M.createElement(l2,{index:n,interpolationIndex:z,modal:U,active:n===w.length-1,focused:x,closing:i.includes(t.key),layout:_,gesture:I,scene:T,safeAreaInsetTop:N,safeAreaInsetRight:F,safeAreaInsetBottom:B,safeAreaInsetLeft:j,onGestureStart:h,onGestureCancel:p,onGestureEnd:m,headerHeight:V,isParentHeaderShown:l,onHeaderHeightChange:this.handleHeaderLayout,getPreviousScene:this.getPreviousScene,getFocusedRoute:this.getFocusedRoute,headerDarkContent:H,hasAbsoluteFloatHeader:S&&!A,renderHeader:o,renderScene:s,onOpenRoute:r,onCloseRoute:a,onTransitionStart:c,onTransitionEnd:d,isNextScreenTransparent:G,detachCurrentScreen:W}))})),S?C:null)}}const _2=Ei.create({container:{flex:1},absolute:{position:"absolute",top:0,left:0,right:0},floating:{zIndex:1}});function v2(){return v2=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},v2.apply(this,arguments)}const y2=l1??ga;class b2 extends M.Component{static getDerivedStateFromProps(e,t){if((e.state.routes===t.previousRoutes||(n=e.state.routes.map(e=>e.key),i=t.previousRoutes.map(e=>e.key),n.length===i.length&&n.every((e,t)=>e===i[t])))&&t.routes.length){let n=t.routes,i=t.previousRoutes,r=e.descriptors,a=t.previousDescriptors;if(e.descriptors!==t.previousDescriptors&&(r=t.routes.reduce((n,i)=>(n[i.key]=e.descriptors[i.key]||t.descriptors[i.key],n),{}),a=e.descriptors),e.state.routes!==t.previousRoutes){const r=e.state.routes.reduce((e,t)=>(e[t.key]=t,e),{});n=t.routes.map(e=>r[e.key]||e),i=e.state.routes}return{routes:n,previousRoutes:i,descriptors:r,previousDescriptors:a}}var n,i;let r=e.state.index<e.state.routes.length-1?e.state.routes.slice(0,e.state.index+1):e.state.routes,{openingRouteKeys:a,closingRouteKeys:o,replacingRouteKeys:s,previousRoutes:l}=t;const u=l[l.length-1],c=r[r.length-1],d=n=>{const i=e.descriptors[n]||t.descriptors[n];return!i||!1!==i.options.animationEnabled};var h;if(u&&u.key!==c.key?l.some(e=>e.key===c.key)?r.some(e=>e.key===u.key)||d(u.key)&&!o.includes(u.key)&&(o=[...o,u.key],a=a.filter(e=>e!==u.key),s=s.filter(e=>e!==u.key),r=[...r,u]):d(c.key)&&!a.includes(c.key)&&(a=[...a,c.key],o=o.filter(e=>e!==c.key),s=s.filter(e=>e!==c.key),r.some(e=>e.key===u.key)||(a=a.filter(e=>e!==u.key),"pop"===(h=c.key,(e.descriptors[h]||t.descriptors[h]).options.animationTypeForReplace??"push")?(o=[...o,u.key],a=a.filter(e=>e!==c.key),r=[...r,u]):(s=[...s,u.key],o=o.filter(e=>e!==u.key),r=r.slice(),r.splice(r.length-1,0,u)))):(s.length||o.length)&&(r=r.slice(),r.splice(r.length-1,0,...t.routes.filter(e=>{let{key:t}=e;return!!d(t)&&(s.includes(t)||o.includes(t))}))),!r.length)throw new Error("There should always be at least one route in the navigation state.");const m=r.reduce((n,i)=>(n[i.key]=e.descriptors[i.key]||t.descriptors[i.key],n),{});return{routes:r,previousRoutes:e.state.routes,previousDescriptors:e.descriptors,openingRouteKeys:a,closingRouteKeys:o,replacingRouteKeys:s,descriptors:m}}state={routes:[],previousRoutes:[],previousDescriptors:{},openingRouteKeys:[],closingRouteKeys:[],replacingRouteKeys:[],descriptors:{}};getPreviousRoute=e=>{let{route:t}=e;const{closingRouteKeys:n,replacingRouteKeys:i}=this.state,r=this.state.routes.filter(e=>e.key===t.key||!n.includes(e.key)&&!i.includes(e.key)),a=r.findIndex(e=>e.key===t.key);return r[a-1]};renderScene=e=>{let{route:t}=e;const n=this.state.descriptors[t.key]||this.props.descriptors[t.key];return n?n.render():null};renderHeader=e=>M.createElement(_1,e);handleOpenRoute=e=>{let{route:t}=e;const{state:n,navigation:i}=this.props,{closingRouteKeys:r,replacingRouteKeys:a}=this.state;r.some(e=>e===t.key)&&a.every(e=>e!==t.key)&&n.routeNames.includes(t.name)&&!n.routes.some(e=>e.key===t.key)?i.navigate(t):this.setState(e=>({routes:e.replacingRouteKeys.length?e.routes.filter(t=>!e.replacingRouteKeys.includes(t.key)):e.routes,openingRouteKeys:e.openingRouteKeys.filter(e=>e!==t.key),closingRouteKeys:e.closingRouteKeys.filter(e=>e!==t.key),replacingRouteKeys:[]}))};handleCloseRoute=e=>{let{route:t}=e;const{state:n,navigation:i}=this.props;n.routes.some(e=>e.key===t.key)?i.dispatch({...Rm.pop(),source:t.key,target:n.key}):this.setState(e=>({routes:e.routes.filter(e=>e.key!==t.key),openingRouteKeys:e.openingRouteKeys.filter(e=>e!==t.key),closingRouteKeys:e.closingRouteKeys.filter(e=>e!==t.key)}))};handleTransitionStart=(e,t)=>{let{route:n}=e;return this.props.navigation.emit({type:"transitionStart",data:{closing:t},target:n.key})};handleTransitionEnd=(e,t)=>{let{route:n}=e;return this.props.navigation.emit({type:"transitionEnd",data:{closing:t},target:n.key})};handleGestureStart=e=>{let{route:t}=e;this.props.navigation.emit({type:"gestureStart",target:t.key})};handleGestureEnd=e=>{let{route:t}=e;this.props.navigation.emit({type:"gestureEnd",target:t.key})};handleGestureCancel=e=>{let{route:t}=e;this.props.navigation.emit({type:"gestureCancel",target:t.key})};render(){const{state:e,descriptors:t,...n}=this.props,{routes:i,descriptors:r,openingRouteKeys:a,closingRouteKeys:o}=this.state;return M.createElement(y2,{style:w2.container},M.createElement(t1,null,M.createElement(sH.Consumer,null,t=>M.createElement(o1.Consumer,null,s=>M.createElement(AJ.Consumer,null,l=>M.createElement(g2,v2({insets:t,isParentHeaderShown:l,isParentModal:s,getPreviousRoute:this.getPreviousRoute,routes:i,openingRouteKeys:a,closingRouteKeys:o,onOpenRoute:this.handleOpenRoute,onCloseRoute:this.handleCloseRoute,onTransitionStart:this.handleTransitionStart,onTransitionEnd:this.handleTransitionEnd,renderHeader:this.renderHeader,renderScene:this.renderScene,state:e,descriptors:r,onGestureStart:this.handleGestureStart,onGestureEnd:this.handleGestureEnd,onGestureCancel:this.handleGestureCancel},n)))))))}}const w2=Ei.create({container:{flex:1}});function S2(){return S2=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},S2.apply(this,arguments)}const k2=ep(function(e){let{id:t,initialRouteName:n,children:i,screenListeners:r,screenOptions:a,...o}=e;const s=o.mode;UH(null!=s,`Stack Navigator: 'mode="${s}"' is deprecated. Use 'presentation: "${s}"' in 'screenOptions' instead.\n\nSee https://reactnavigation.org/docs/stack-navigator#presentation for more details.`);const l=o.headerMode;UH("none"===l,"Stack Navigator: 'headerMode=\"none\"' is deprecated. Use 'headerShown: false' in 'screenOptions' instead.\n\nSee https://reactnavigation.org/docs/stack-navigator/#headershown for more details."),UH(null!=l&&"none"!==l,"Stack Navigator: 'headerMode' is moved to 'options'. Moved it to 'screenOptions' to keep current behavior.\n\nSee https://reactnavigation.org/docs/stack-navigator/#headermode for more details.");const u=o.keyboardHandlingEnabled;UH(void 0!==u,"Stack Navigator: 'keyboardHandlingEnabled' is moved to 'options'. Moved it to 'screenOptions' to keep current behavior.\n\nSee https://reactnavigation.org/docs/stack-navigator/#keyboardhandlingenabled for more details.");const c={presentation:s,headerShown:!l||"none"!==l,headerMode:l&&"none"!==l?l:void 0,keyboardHandlingEnabled:u},{state:d,descriptors:h,navigation:m,NavigationContent:p}=uf(Am,{id:t,initialRouteName:n,children:i,screenListeners:r,screenOptions:a,defaultScreenOptions:c});return M.useEffect(()=>{var e;return null===(e=m.addListener)||void 0===e?void 0:e.call(m,"tabPress",e=>{const t=m.isFocused();requestAnimationFrame(()=>{d.index>0&&t&&!e.defaultPrevented&&m.dispatch({...Rm.popToTop(),target:d.key})})})},[m,d.index,d.key]),M.createElement(p,null,M.createElement(b2,S2({},o,{state:d,descriptors:h,navigation:m})))});var C2=(e=>(e.MainBottomTabs="MainBottomTabs",e.NewCalculationStack="NewCalculationStack",e.AccountWebView="AccountWebView",e.ActiveInsulin="ActiveInsulin",e.RegisterActiveInsulin="RegisterActiveInsulin",e.CalculationBottomTabs="CalculationBottomTabs",e.LoadingRecommendation="LoadingRecommendation",e.Recommendation="Recommendation",e.LeavingRecommendation="LeavingRecommendation",e.DashboardTab="DashboardTab",e.LogbooksTab="LogbooksTab",e.FoodTab="FoodTab",e.SettingsTab="SettingsTab",e.Dashboard="Dashboard",e.ActiveInsulinChart="ActiveInsulinChart",e.MyDay="MyDay",e.GlucoseBGM="GlucoseBGM",e.GlucoseCGM="GlucoseCGM",e.CarbohydrateChart="CarbohydrateChart",e.RapidInsulinChart="RapidInsulinChart",e.TimeInRange="TimeInRange",e.LicensingStatus="LicensingStatus",e.LicensingWebView="LicensingWebView",e.LicensingInfoWebView="LicensingInfoWebView",e.Logbooks="Logbooks",e.RecommendationLogbook="RecommendationLogbook",e.Settings="Settings",e.ProfileStack="ProfileStack",e.GlucoseSettings="GlucoseSettings",e.ActivitySettings="ActivitySettings",e.InsulinSettingsStack="InsulinSettingsStack",e.Notifications="Notifications",e.SetupGlucoseMeters="SetupGlucoseMeters",e.IFU="IFU",e.Support="Support",e.SupportWebView="SupportWebView",e.SupportContact="SupportContact",e.Legal="Legal",e.GlucoseUnit="GlucoseUnit",e.Profile="Profile",e.BiologicalSex="BiologicalSex",e.DiabetesType="DiabetesType",e.InsulinSettings="InsulinSettings",e.TreatmentType="TreatmentType",e.RapidActingInsulin="RapidActingInsulin",e.LongActingInsulin="LongActingInsulin",e.GlucoseTab="GlucoseTab",e.CarbsTab="CarbsTab",e.ActivityTab="ActivityTab",e.SummaryTab="SummaryTab",e.NovoPenSync="NovoPenSync",e.NovoPenConflict="NovoPenConflict",e.SmartPenSetupStack="SmartPenSetupStack",e.SmartPenSetupScreen1="SmartPenSetupScreen1",e.SmartPenSetupScreen2="SmartPenSetupScreen2",e.NovoPenSetupStack="NovoPenSetupStack",e.NovoPenSetupScreen1="NovoPenSetupScreen1",e.NovoPenSetupScreen2="NovoPenSetupScreen2",e.NovoPenSetupScreen3="NovoPenSetupScreen3",e.NovoPenSetupScreen4="NovoPenSetupScreen4",e.RenameSmartPen="RenameSmartPen",e.SetupCGMWebview="SetupCGMWebview",e.AddActivity="AddActivity",e.AddLogbook="AddLogbook",e.AddCarbs="AddCarbs",e.CreateFood="CreateFood",e.FoodLibraryStack="FoodLibraryStack",e.SyncNovoPenStack="SyncNovoPenStack",e.FoodLibrary="FoodLibrary",e.FoodDetails="FoodDetails",e))(C2||{}),E2=(e=>(e.SetupBolusCalculator="SetupBolusCalculator",e.QuickGuideStack="QuickGuideStack",e.LicensingInfoWebView="LicensingInfoWebView",e.LicensingWebView="LicensingWebView",e.LicensingStatus="LicensingStatus",e.SetupStart="SetupStart",e.Setup="Setup",e.BiologicalSex="BiologicalSex",e.TreatmentType="TreatmentType",e.RapidActingInsulin="RapidActingInsulin",e.LongActingInsulin="LongActingInsulin",e.InsulinSettings="InsulinSettings",e.QuickGuideStart="QuickGuideStart",e.QuickGuide="QuickGuide",e.QuickGuideAllSet="QuickGuideAllSet",e))(E2||{});const x2={selectedEventUUID:null,activityDurationSeconds:0},I2=uL()(e=>({...x2,activityStoreActions:{set:t=>{e(e=>({...e,...t}))},clear:()=>{e(x2)}}}));var T2="/api/v3";const O2=oV?"/api/v2":zj.HEDIA_API_URL_V2,R2=oV?T2:zj.HEDIA_API_URL_V3,A2={frequentlyAdded:[],searchResults:[],myFood:[],isLoading:!1,hasSearched:!1,isMyFoodTab:!1,query:"",selectedFoodItem:void 0,animatedEntryId:void 0},L2=uL()((t,n)=>({...A2,foodStoreActions:{set:e=>{t(t=>({...t,...e}))},clear:()=>{t(A2)},search:async i=>{const r=encodeURIComponent(n().query.toLowerCase().trim());try{t({isLoading:!0});const e=await P2(r,i);if(!e)throw new Error("[foodStore::search] Failed to search for food items");t({searchResults:e})}catch(e){console.error(e),t({searchResults:[]})}finally{t({isLoading:!1})}},loadMyFood:async()=>{try{t({isLoading:!0});const e=await D2();if(!e)throw new Error("[foodStore::loadMyFood] Failed to load my food items");t({myFood:e})}catch(e){console.error(e)}finally{t({isLoading:!1})}},createMyFoodItem:async n=>{try{t({isLoading:!0});const e=await N2(n);if(!e)throw new Error("[foodStore::createMyFoodItem] Failed to create food item");return t(t=>({myFood:[e,...t.myFood],animatedEntryId:e.id.toString()})),!0}catch(e){return console.error(e),!1}finally{t({isLoading:!1})}},updateMyFoodItem:async i=>{try{t({isLoading:!0});const e=await F2(i);if(!e)throw new Error("[foodStore::updateMyFoodItem] Failed to update food item");return t(t=>({myFood:t.myFood.map(t=>t.id===e.id?e:t)})),e.id===n().selectedFoodItem?.id&&t({selectedFoodItem:e}),!0}catch(e){return console.error(e),!1}finally{t({isLoading:!1})}},deleteMyFoodItem:async n=>{try{if(t({isLoading:!0}),!n.id)throw new Error("[foodStore::deleteMyFoodItem] Failed to delete food item");return await B2(n),t(e=>({myFood:e.myFood.filter(e=>e.id!==n.id)})),!0}catch(e){return console.error(e),!1}finally{t({isLoading:!1})}},loadFrequentFoodItems:async()=>{try{t({isLoading:!0});const e=await M2();if(!e)throw new Error("[foodStore::loadFrequentFoodItems] Failed to load frequently added food items");t({frequentlyAdded:e})}catch(e){console.error(e),t({frequentlyAdded:[]})}finally{t({isLoading:!1})}}}})),P2=async(t,n)=>{try{const e=await FX(`${O2}/food?search=${t}&language=${n}`);return await e.json()}catch(e){return void console.error(e)}},M2=async()=>{try{const e=await FX(`${O2}/food/frequent`);return await e.json()}catch(e){return void console.error(e)}},D2=async()=>{try{const e=await FX(`${O2}/food/myfood`);return await e.json()}catch(e){return void console.error(e)}},N2=async t=>{try{const e=await FX(`${O2}/food`,{method:FL.HTTPRequestMethod.POST,headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});return await e.json()}catch(e){return void console.error(e)}},F2=async t=>{try{const e=await FX(`${O2}/food/${t.id}`,{method:FL.HTTPRequestMethod.PUT,headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});return await e.json()}catch(e){return void console.error(e)}},B2=async e=>{await FX(`${R2}/food-items/${e.id}`,{method:FL.HTTPRequestMethod.DELETE})},j2={glucoseTimestamp:null,glucoseMMOLL:null,isUsingGlucoseDeviceReading:!1,isUsingGlucoseSample:!1,latestGlucoseDeviceReading:null,latestGlucoseSample:null,glucoseSampleID:null},V2=uL()(e=>({...j2,glucoseStoreActions:{set:t=>{e(e=>({...e,...t}))},clear:()=>{e(j2)}}})),H2={showDiscardCalculationModal:!1,showDiscardSmartPenSetupModal:!1,showSyncErrorModal:!1},z2=uL()(e=>({...H2,modalStoreActions:{set:t=>{e(e=>({...e,...t}))},clear:()=>{e(H2)}}})),U2={setupCalculatorSettings:{},totalDailyDosage:null},G2=uL()(e=>({...U2,setupCalculatorActions:{setSetupCalculatorStoreValues:t=>{e(e=>({setupCalculatorSettings:{...e.setupCalculatorSettings,...t}}))},setTotalDailyDosage:t=>{e({totalDailyDosage:t})},clear:()=>{e(U2)}}})),W2=()=>G2(e=>e.setupCalculatorActions),Y2=()=>G2(e=>e.setupCalculatorSettings),$2=()=>G2(e=>e.totalDailyDosage),X2=()=>{EX.getState().carbohydrateStoreActions.clear(),V2.getState().glucoseStoreActions.clear(),I2.getState().activityStoreActions.clear()},q2={top:10,bottom:10,left:20,right:20},Z2=()=>{const{goBack:e}=Gp();return D.createElement(eh,{onPress:e,testID:"header-back-button",style:({pressed:e})=>[{opacity:e?.5:1},i0.iconContainerOutline,i0.backButton],hitSlop:q2},D.createElement(KK,{height:27,width:27,color:wL.iconBrand}))},K2=({onPress:e})=>{const{pop:t}=Gp(),{COLORS:n}=sj();return D.createElement(eh,{onPress:e??(()=>{t()}),testID:"header-close-button",style:({pressed:e})=>[{opacity:e?.5:1},i0.iconContainerOutline,i0.closeButton],hitSlop:q2},D.createElement(eQ,{height:27,width:27,color:n.iconBrand}))},Q2=()=>{const{navigate:e}=Gp(),t=M.useCallback(()=>{oV&&X2(),e(C2.SettingsTab)},[e]);return D.createElement(eh,{onPress:t,testID:"header-profile-button",style:({pressed:e})=>[{opacity:e?.5:1},i0.iconContainerOutline,i0.profileButton],hitSlop:q2},D.createElement(SQ,{color:wL.iconBrand}))},J2=({onPress:e,title:t,disabled:n=!1})=>{const{t:i}=eV(),{COLORS:r}=sj();return D.createElement(eh,{style:({pressed:e})=>[{opacity:e?.5:1},i0.doneButton],onPress:()=>{!n&&e()},disabled:n},D.createElement(pj,{style:[i0.doneText,{color:r.textBrand},n&&i0.textDisabled],allowFontScaling:!1},t??i("button_add")))},e0=({onPress:e})=>{const{t:t}=eV(),n=Gp(),{COLORS:i}=sj(),r=M.useCallback(()=>{n.pop()},[n]);return D.createElement(eh,{style:({pressed:e})=>[{opacity:e?.5:1},i0.cancelButton],onPress:e??r},D.createElement(pj,{style:[i0.cancelText,{color:i.textBrand}],allowFontScaling:!1},t("button_cancel")))},t0=({onPress:e})=>{const{t:t}=eV(),n=Gp(),{COLORS:i}=sj(),r=M.useCallback(()=>{n.pop()},[n]);return D.createElement(eh,{style:({pressed:e})=>[{opacity:e?.5:1},i0.cancelButton],onPress:e??r},D.createElement(pj,{style:[i0.cancelText,{color:i.textBrand}],allowFontScaling:!1},t("button_close")))},n0=({onPress:e})=>D.createElement(eh,{onPress:e,style:({pressed:e})=>[{opacity:e?.5:1},i0.iconContainerOutline,i0.editButton],hitSlop:q2},D.createElement(rQ,{color:wL.iconBrand})),i0=Ei.create({headerStyle:{backgroundColor:wL.bgNavigation},modalHeaderStyle:{backgroundColor:wL.bgModal},headerLeftContainerStyle:{paddingLeft:16},headerTitle:{..._L.medium_Base,color:wL.textNavigationTitle},modalHeaderTitle:{..._L.medium_Base,color:wL.textNavigationTitle},iconContainerOutline:{padding:4},iconContainer:{padding:4},backButton:{marginLeft:oV?4:-12,marginRight:12},closeButton:{marginLeft:oV?4:-12,marginRight:oV?12:0},cancelButton:{marginLeft:oV?12:0},profileButton:{marginRight:oV?12:0},doneButton:{paddingRight:oV?12:0,paddingLeft:8},editButton:{marginRight:oV?12:-4,marginLeft:4},doneText:{..._L.semiBold_Base},textDisabled:{color:wL.textModalButtonInactive},cancelText:{..._L.regular_Base}}),r0={headerShown:!0,headerLeft:Z2,headerStyle:i0.headerStyle,headerTitleStyle:i0.headerTitle,headerTitleAlign:"center",headerBlurEffect:"regular"};i0.modalHeaderTitle;const a0={animationEnabled:!0,cardStyle:{flex:1},headerShown:!0,headerLeft:Z2,headerStyle:i0.headerStyle,headerTitleStyle:i0.headerTitle,headerTitleAlign:"center",headerTitleAllowFontScaling:!1},o0={...a0,presentation:"modal",headerLeft:K2,headerStyle:i0.modalHeaderStyle,headerTitleStyle:i0.modalHeaderTitle,headerTitleAllowFontScaling:!1,headerLeftContainerStyle:{flex:1},headerTitleContainerStyle:{flex:3,alignItems:"center"},headerRightContainerStyle:{flex:1}},s0={headerStyle:i0.headerStyle,headerLeftContainerStyle:i0.headerLeftContainerStyle,headerTitleStyle:i0.headerTitle,headerTitleAlign:"center",headerTitleAllowFontScaling:!1},l0=({setUnit:e,currentUnit:t})=>{const n="ml"===t,i="cl"===t;return M.createElement(ga,{style:u0.container},M.createElement(Ic,{style:n?u0.selected:u0.unselected,onPress:()=>{e("ml")},testID:`unit-selector-ml-button-${n}`},M.createElement(pj,{style:u0.unitText},"ml")),M.createElement(Ic,{style:i?u0.selected:u0.unselected,onPress:()=>{e("cl")},testID:`unit-selector-cl-button-${i}`},M.createElement(pj,{style:u0.unitText},"cl")))},u0=Ei.create({container:{flex:1,flexDirection:"row",borderWidth:1,borderColor:wL.bgInput,borderRadius:16,backgroundColor:wL.bgFoodInput,marginVertical:8,overflow:"hidden"},unselected:{flex:1,alignItems:"center",justifyContent:"center"},selected:{flex:1,backgroundColor:wL.bgBrand,alignItems:"center",justifyContent:"center",borderRadius:16},unitText:{..._L.regular_SM,padding:8}}),c0=({ref:e,style:t,onChangeText:n,onFocusChange:i,...r})=>{const a=M.useCallback(e=>{const t=e.replace(/\D+/g,"");n(t)},[n]),o=M.useCallback(()=>{i?.(!0)},[i]),s=M.useCallback(()=>{i?.(!1)},[i]);return D.createElement(kh,{cursorColor:wL.iconBrand,placeholder:"-",placeholderTextColor:wL.textSecondary,maxLength:3,inputMode:"numeric",enterKeyHint:"done",ref:e,style:t,onFocus:o,onBlur:s,autoFocus:void 0!==i,...r,onChangeText:a})},d0="add-carbs-details",h0=oV&&{outline:"none"},m0=()=>{const{t:e}=eV(),t=Gp(),n=cf(),{selectedFoodItem:i}=L2(),{cartItems:r,carbohydrateStoreActions:a}=EX(),[o,s]=M.useState(!1),l=M.useMemo(()=>r.find(e=>e.foodItem.id===i?.id),[r,i]);if(!i)throw new Error("[AddCarbs::render] selectedFoodItem is undefined");const u=M.useMemo(()=>{const e={foodItem:i,amount:0,unit:i.liquid?"ml":"g"};return l??e},[l,i]),[c,d]=M.useState(u.amount?u.amount.toString():""),[h,m]=M.useState(u.foodItem.liquid?"ml":"g"),[p,f]=M.useState(!1),[g,_]=M.useState(!1),[v,y]=M.useState(!1),b=M.useCallback((e=0)=>{const t=Number(c)||100,n="ml"===h||"g"===h?t:10*t;return Math.round(n*e/100)},[c,h]),w=M.useCallback(()=>{b(u.foodItem.carbohydrates)>300?f(!0):(a.upsertCartItem({foodItem:i,unit:h,amount:Number(c)}),null!==i.user_id?NX(MX.CarbsFoodLibraryPersonalInput):NX(MX.CarbsFoodLibraryDatabaseInput),t.pop(),!n.params.isCarbItem&&setTimeout(()=>{t.pop()},500))},[b,u.foodItem.carbohydrates,a,i,h,c,t,n.params.isCarbItem]);M.useEffect(()=>{const e=()=>{t.navigate(C2.CreateFood)};t.setOptions({title:u.foodItem.title,headerLeft:()=>D.createElement(t0,{onPress:()=>{const e=u.amount?u.amount.toString():"";c===e?t.pop():_(!0)}}),headerRight:null!==i.user_id?()=>D.createElement(n0,{onPress:e}):()=>null})},[u.foodItem.title,c,t,i,u.amount]);const S=M.useCallback(()=>{v&&t.pop()},[t,v]),k=M.useMemo(()=>void 0===h?"":"g"===h?e("grams"):h,[h,e]);return D.createElement(Xa,{contentContainerStyle:p0.pageWrapper,disableScrollViewPanResponder:!0,keyboardDismissMode:"on-drag"},D.createElement(ga,{style:p0.calculationCard},D.createElement(ga,{style:p0.row},i.liquid?D.createElement(ga,{style:p0.liquidInputContainer},D.createElement(c0,{placeholderTextColor:wL.text,style:[p0.amountInputLiquid,o&&{borderColor:wL.borderInputActive}],value:c,onChangeText:d,onFocusChange:s,testID:`${d0}-amount-input`}),D.createElement(l0,{setUnit:m,currentUnit:h})):D.createElement(ga,{style:[p0.gramInputContainer,o&&{borderColor:wL.borderInputActive}]},D.createElement(c0,{placeholderTextColor:wL.text,style:p0.amountInputGrams,value:c,onFocusChange:s,onChangeText:d,testID:`${d0}-amount-input`}),D.createElement(pj,{style:p0.weightText},e("food_card_unit")))),D.createElement(ga,{style:p0.dashedLineContainer},Array.from({length:20},(e,t)=>t).map(e=>D.createElement(ga,{key:e,style:p0.dashedLine}))),D.createElement(ga,{style:p0.carbsTotalContainer},D.createElement(ga,{style:p0.left},D.createElement(pj,{style:p0.carbAmount},Number(c)<1?0:b(u.foodItem.carbohydrates)),D.createElement(pj,{style:p0.carbsText},e("my_food_add_unit"))),D.createElement(cj,{title:e("button_add"),onPress:w,disabled:Number(c)<1,size:uj.Small}))),D.createElement(ga,{style:p0.foodNameContainer},D.createElement(pj,{style:p0.title},u.foodItem.title),D.createElement(pj,{style:p0.subtitle},e("food_library_carb_body",{amount:""===c?"100":c,unit:k}))),!!u.foodItem.description&&u.foodItem.description!==u.foodItem.title&&D.createElement(ga,{style:p0.descriptionContainer},D.createElement(pj,{style:p0.descriptionHeader},e("food_overview_description")),D.createElement(pj,{style:p0.description,testID:`${d0}-description`},u.foodItem.description)),D.createElement(ga,{style:p0.tableCell},D.createElement(pj,{style:p0.cellText},e("logbook_personal_log_card_carbs")),D.createElement(pj,{style:p0.cellValue,testID:`${d0}-carbs`},b(u.foodItem.carbohydrates),D.createElement(pj,{style:p0.gText}," ",e("logbook_collum_unit")))),D.createElement(ga,{style:p0.line}),D.createElement(ga,{style:p0.tableCell},D.createElement(pj,{style:p0.cellText},e("food_library_item_energy")),D.createElement(pj,{style:p0.cellValue,testID:`${d0}-kcal`},b(u.foodItem.energy),D.createElement(pj,{style:p0.gText}," kcal"))),D.createElement(ga,{style:p0.line}),D.createElement(ga,{style:p0.tableCell},D.createElement(pj,{style:p0.cellText},e("food_add_library_item_protein")),D.createElement(pj,{style:p0.cellValue},b(u.foodItem.protein),D.createElement(pj,{style:p0.gText}," ",e("logbook_collum_unit")))),D.createElement(ga,{style:p0.line}),D.createElement(ga,{style:p0.tableCell},D.createElement(pj,{style:p0.cellText},e("food_add_library_item_sugar")),D.createElement(pj,{style:p0.cellValue},b(u.foodItem.sugar),D.createElement(pj,{style:p0.gText}," ",e("logbook_collum_unit")))),D.createElement(ga,{style:p0.line}),D.createElement(ga,{style:p0.tableCell},D.createElement(pj,{style:p0.cellText},e("food_add_library_item_fibers")),D.createElement(pj,{style:p0.cellValue},b(u.foodItem.fibers),D.createElement(pj,{style:p0.gText}," ",e("logbook_collum_unit")))),D.createElement(ga,{style:p0.line}),D.createElement(ga,{style:p0.tableCell},D.createElement(pj,{style:p0.cellText},e("food_add_library_item_fat")),D.createElement(pj,{style:p0.cellValue},b(u.foodItem.fat),D.createElement(pj,{style:p0.gText}," ",e("logbook_collum_unit")))),D.createElement(ga,{style:p0.line}),D.createElement(ga,{style:p0.tableCell},D.createElement(pj,{style:p0.cellText},e("food_add_library_item_sfat")),D.createElement(pj,{style:p0.cellValue},b(u.foodItem.saturated_fat),D.createElement(pj,{style:p0.gText}," ",e("logbook_collum_unit")))),D.createElement(sz,{isVisible:p,title:e("current_glucose_invalid_modal_title"),message:e("current_glucose_invalid_modal_body"),buttons:[{testID:"close-button",title:e("button_close"),onPress:()=>{f(!1)}}]}),D.createElement(sz,{isVisible:g,title:e("food_modal_discard_title"),onModalHide:S,buttons:[{type:lj.Error,testID:"discard-button",title:e("button_discard_changes"),onPress:()=>{_(!1),y(!0)}},{type:lj.Secondary,testID:"keep-button",title:e("button_cancel"),onPress:()=>{_(!1)}}]}))},p0=Ei.create({pageWrapper:{paddingHorizontal:16,paddingVertical:32,backgroundColor:wL.bgSheet},calculationCard:{backgroundColor:wL.bgInput,padding:16,borderRadius:16,marginBottom:32},row:{flexDirection:"row",marginBottom:24},liquidInputContainer:{flexDirection:"row",alignItems:"center",gap:16,flex:1,borderRadius:16,overflow:"hidden"},gramInputContainer:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",flex:1,paddingHorizontal:16,borderWidth:1,borderRadius:16,overflow:"hidden",backgroundColor:wL.bgFoodInput},amountInputGrams:{..._L.regular_Base,textAlign:"left",color:wL.text,paddingVertical:16,flex:2,fontFamily:sV?gL.RobotoRegular:gL.PoppinsRegular,...h0},amountInputLiquid:{..._L.regular_Base,textAlign:"left",color:wL.text,backgroundColor:wL.bgFoodInput,padding:16,flex:1,borderWidth:1,borderColor:wL.borderInputActive,borderRadius:16,fontFamily:sV?gL.RobotoRegular:gL.PoppinsRegular,...h0},weightText:{flex:1,textAlign:"right"},line:{height:1,backgroundColor:wL.borderDivider},carbsTotalContainer:{justifyContent:"space-between",paddingHorizontal:8,paddingVertical:16,gap:24,flexDirection:"row",flexWrap:"wrap"},left:{alignItems:"baseline",alignSelf:"center",flexDirection:"row",flexWrap:"wrap"},carbAmount:{..._L.bold_3XL,marginRight:4},carbsText:{..._L.medium_Base},foodNameContainer:{paddingHorizontal:16,paddingBottom:24},title:{..._L.semiBold_LG},subtitle:{..._L.regular_Base,color:wL.textSecondary},tableCell:{flexDirection:"row",justifyContent:"space-between",alignContent:"center",paddingHorizontal:16,paddingVertical:16},cellText:{..._L.regular_Base,textAlign:"left"},cellValue:{..._L.regular_Base,color:wL.textSecondary,textAlign:"right"},gText:{..._L.regular_Base,color:wL.textSecondary},descriptionContainer:{marginBottom:32,paddingVertical:12,paddingHorizontal:16,borderRadius:16},descriptionHeader:{..._L.regular_XS,color:wL.textSecondary},description:{..._L.regular_Base},dashedLineContainer:{flexDirection:"row",justifyContent:"space-between"},dashedLine:{height:1,width:8,backgroundColor:wL.borderDivider}}),f0=()=>{},g0={setDefaultMode:f0,setInputMode:f0,preload:f0,setFocusTo:f0},_0=()=>({remove:f0}),v0=ga,y0=ga,b0=()=>{},w0=()=>b0,S0=e=>({value:e,addListener:b0,removeListener:b0,modify:b0,get:()=>e,set:b0}),k0=S0(0),C0=S0(null),E0={enabled:!0,animated:{progress:new uu.Value(0),height:new uu.Value(0)},reanimated:{progress:k0,height:k0},layout:C0,setKeyboardHandlers:w0,setInputHandlers:w0,setEnabled:b0},x0=M.createContext(E0),I0=()=>M.useContext(x0);let T0={height:0,duration:0,timestamp:(new Date).getTime(),target:-1,type:"default",appearance:"light"};const O0={setDefaultMode:g0.setDefaultMode,setInputMode:g0.setInputMode,setFocusTo:g0.setFocusTo,preload:g0.preload,dismiss:async e=>(null==e||e.keepFocus,new Promise(e=>{e()})),isVisible:()=>!1,state:()=>T0};FR.createAnimatedComponent(uu.createAnimatedComponent(v0)),Ei.create({container:{flex:1},hidden:{display:"none",position:"absolute"}}),lr.OS;const R0=Aa.get("screen");let A0={width:R0.width,height:R0.height};const L0=["keyboardDidShow","keyboardDidHide"],P0=()=>({...O0.state(),isVisible:O0.isVisible()}),M0=e=>e;function D0(e,t){M.useEffect(()=>()=>O0.setDefaultMode(),[]),function(e,t){const n=I0();M.useLayoutEffect(()=>{const t=n.setKeyboardHandlers(e);return()=>t()},t)}(e,t)}lr.OS;const N0="android"===lr.OS&&lr.Version>=30||"ios"===lr.OS,F0={duration:250,easing:lE.bezier(.19919472913616398,.010644531250000006,.27920937042459737,.91025390625)},B0=(e,t)=>{let n;return t&&(n=t.find(t=>t>=e)),n??e};function j0(){return j0=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},j0.apply(null,arguments)}const V0=M.forwardRef(({children:e,onLayout:t,bottomOffset:n=0,disableScrollOnKeyboardHide:i=!1,enabled:r=!0,extraKeyboardSpace:a=0,ScrollViewComponent:o=FR.ScrollView,snapToOffsets:s,...l},u)=>{const c=SR(),d=lR(null),h=lR(0),m=AR(c),p=lR(0),f=lR(0),g=lR(!1),_=lR(-1),v=lR(0),y=lR(0),{input:b}={input:I0().layout},w=lR(null),S=lR(null),{height:k}=(()=>{const[e,t]=M.useState(A0);return M.useEffect(()=>(t(A0),()=>{}),[]),e})(),C=M.useCallback(e=>{"function"==typeof u?u(e):u&&(u.current=e),c(e)},[]),E=M.useCallback(e=>{d.value=c.current,null==t||t(e)},[t]),x=M.useCallback((e,t=!1)=>{var i,a,o;if(!r)return 0;if((null===(i=w.value)||void 0===i?void 0:i.parentScrollViewTarget)!==d.value)return 0;const l=k-f.value,u=((null===(a=w.value)||void 0===a?void 0:a.layout.absoluteY)||0)+((null===(o=w.value)||void 0===o?void 0:o.layout.height)||0);if(l-u<=n){const i=f.value-(k-u)+n,r=KR(e,[v.value,f.value],[0,B0(i+h.value,s)-h.value]),a=Math.max(r,0)+h.value;return sA(c,0,a,t),r}if(u<0){const e=l-n,i=h.value+u;sA(c,0,i-e,t)}return 0},[n,r,k,s]),I=M.useCallback(e=>{const t=KR(e.height,[0,f.value],[0,f.value+a]);p.value=t},[a]),T=M.useCallback(()=>{var e,t;const n=null===(e=S.value)||void 0===e?void 0:e.selection.end.y;return!(null===(t=b.value)||void 0===t||!t.layout||!n)&&(w.value={...b.value,layout:{...b.value.layout,height:QR(n,0,b.value.layout.height)}},!0)},[b,S,w]),O=M.useCallback(()=>{const e=h.value,t=w.value;T()&&(h.value=m.value,x(f.value,!0),h.value=e,w.value=t)},[x]),R=M.useCallback(()=>{O()},[O]),A=M.useMemo(()=>((e,t=0)=>{const n={time:0};return(...i)=>{const r=Date.now();if(!(r-n.time<t))return n.time=r,e(...i);n.time=r}})(R,200),[R]),L=M.useCallback(e=>{var t,n;const i=null===(t=S.value)||void 0===t?void 0:t.target,r=null===(n=S.value)||void 0===n?void 0:n.selection;if(S.value=e,e.target===i)return e.selection.end.position===e.selection.start.position&&(null==r?void 0:r.end.y)!==e.selection.end.y||e.selection.start.position!==e.selection.end.position?O():void A()},[O,A]);!function(e,t){const n=I0();M.useLayoutEffect(()=>{const t=n.setInputHandlers(e);return()=>t()},t)}({onSelectionChange:L},[L]),((e,t)=>{const n=lR(-1),i=lR(0),r=lR(0),a=lR(0);_R(()=>{if(!N0&&0!==r.value)return{duration:F0.duration,target:n.value,height:a.value,progress:a.value/r.value}},t=>{var n,a;t&&(null===(n=e.onMove)||void 0===n||n.call(e,t),t.height===i.value&&(null===(a=e.onEnd)||void 0===a||a.call(e,t),r.value=i.value))},t),D0({onStart:t=>{var o,s,l;if(!N0&&t.height===r.value)return null===(s=e.onStart)||void 0===s||s.call(e,t),void(null===(l=e.onEnd)||void 0===l||l.call(e,t));n.value=t.target,i.value=t.height,t.height>0&&(r.value=t.height),N0||(a.value=DE(t.height,F0)),null===(o=e.onStart)||void 0===o||o.call(e,{...t,duration:N0?t.duration:F0.duration})},onMove:t=>{var n;N0&&(null===(n=e.onMove)||void 0===n||n.call(e,t))},onEnd:t=>{var n;N0&&(null===(n=e.onEnd)||void 0===n||n.call(e,t))}},t)})({onStart:e=>{const t=f.value!==e.height&&e.height>0;g.value=e.height>0&&0===f.value;const n=0===e.height,i=_.value!==e.target&&-1!==e.target||t;t&&(v.value=f.value),n&&(v.value=0,h.value=y.value),(g.value||t||i)&&(h.value=m.value,f.value=e.height),i&&(_.value=e.target,T(),y.value=m.value),i&&!g.value&&(m.value+=x(e.height,!0))},onMove:e=>{I(e),i&&!g.value||x(e.height)},onEnd:e=>{f.value=e.height,h.value=m.value,I(e)}},[x,i,I]),M.useEffect(()=>{Fk(x)(f.value,!0)},[n]),_R(()=>b.value,(e,t)=>{(null==e?void 0:e.target)===(null==t?void 0:t.target)&&(null==e?void 0:e.layout.height)!==(null==t?void 0:t.layout.height)&&O()},[]);const P=mR(()=>r?{paddingBottom:p.value+1}:{},[r]);return D.createElement(o,j0({ref:C},l,{scrollEventThrottle:16,onLayout:E}),e,r&&D.createElement(FR.View,{style:P}))}),H0={width:13,height:2,borderRadius:1},z0={marginHorizontal:5,width:30,height:30,justifyContent:"center",alignItems:"center"};Ei.create({arrowUpContainer:z0,arrowDownContainer:{...z0,transform:[{rotate:"180deg"}]},arrow:{width:20,height:20,flexDirection:"row",alignItems:"center",justifyContent:"space-between"},arrowLeftLine:{...H0,transform:[{rotate:"-45deg"}],left:-.5},arrowRightLine:{...H0,transform:[{rotate:"45deg"}],left:-5.5}});lr.select({android:({children:e,onPress:t,disabled:n,accessibilityLabel:i,accessibilityHint:r,testID:a,rippleRadius:o=18,style:s,theme:l})=>{const u=function(e=M0){const[t,n]=M.useState(()=>e(P0()));return M.useEffect(()=>{const t=L0.map(t=>_0(t,()=>n(e(P0()))));return n(e(P0())),()=>{t.forEach(e=>e.remove())}},[]),t}(e=>e.appearance),c=M.useMemo(()=>({disabled:n}),[n]),d=M.useMemo(()=>dm.Ripple(l[u].ripple,!0,o),[u,o,l]);return D.createElement(dm,{accessibilityHint:r,accessibilityLabel:i,accessibilityRole:"button",accessibilityState:c,background:d,style:s,testID:a,onPress:t},D.createElement(ga,{style:s},e))},default:({children:e,onPress:t,disabled:n,accessibilityLabel:i,accessibilityHint:r,testID:a,style:o})=>{const s=n?ga:Ic,l=M.useMemo(()=>({disabled:n}),[n]);return D.createElement(s,{accessibilityHint:r,accessibilityLabel:i,accessibilityRole:"button",accessibilityState:l,style:o,testID:a,onPress:t},e)}});"ios"===lr.OS&&parseInt(lr.Version,10),Ei.create({flex:{flex:1},toolbar:{position:"absolute",bottom:0,alignItems:"center",width:"100%",flexDirection:"row",height:42},arrows:{flexDirection:"row",paddingLeft:8},doneButton:{fontWeight:"600",fontSize:15},doneButtonContainer:{marginRight:16,marginLeft:8},floating:{alignSelf:"center",borderRadius:20,overflow:"hidden"}}),Ei.create({absolute:{position:"absolute"},stretch:{top:0,bottom:0,left:0,right:0}}),uu.createAnimatedComponent(y0);const U0=({onModalHide:e})=>{const{t:t}=eV(),{showSyncErrorModal:n,modalStoreActions:i}=z2();return D.createElement(sz,{isVisible:n,onModalHide:e,onModalShow:()=>{NX(MX.ErrorOffline)},title:t("glucose_modal_changes_title"),message:t("glucose_modal_changes_body"),buttons:[{title:t("glucose_modal_changes_button_confirm"),onPress:()=>{i.set({showSyncErrorModal:!1})}}]})},G0=Ei.create({container:{flex:1,paddingHorizontal:16,backgroundColor:wL.bgSheet},contentContainer:{paddingVertical:32},cardMandatory:{backgroundColor:wL.bgCard,padding:16,borderRadius:16,marginBottom:32,gap:32},cardOptional:{backgroundColor:wL.bgCard,padding:16,borderRadius:16,marginBottom:32,gap:16},segmentContainer:{flexDirection:"row",justifyContent:"center",alignItems:"center",backgroundColor:wL.bgInput,borderRadius:16},segment:{flex:1,flexDirection:"row",justifyContent:"center",alignItems:"center",alignSelf:"stretch",backgroundColor:wL.bgInput,paddingVertical:8,borderColor:wL.bgInput,borderRadius:16,borderWidth:1},segmentIntensity:{flex:1,justifyContent:"center",alignItems:"center",backgroundColor:wL.bgInput,paddingVertical:8,borderColor:wL.bgInput,borderRadius:16,borderWidth:1},selected:{backgroundColor:wL.bgBrand,borderColor:wL.borderOnBrand},borderLeft:{backgroundColor:wL.borderDivider,alignSelf:"center",height:16,width:1},value:{..._L.medium_Base},intensityDescription:{backgroundColor:wL.bgInput,padding:16,borderRadius:16,marginTop:8},intensityDescriptionText:{..._L.regular_XS,color:wL.textSecondary},intensityDot:{width:10,height:10,borderRadius:5,marginRight:4,marginBottom:2},reductionContainer:{flex:1,flexDirection:"row",justifyContent:"space-between",paddingTop:16,borderTopColor:wL.borderDivider},reductionDescription:{flex:1,alignSelf:"center",..._L.semiBold_SM},reductionPercentage:{..._L.bold_4XL,marginLeft:24},typesContainer:{flexDirection:"row"},activityIcon:{color:wL.text,width:22,height:22},activityTypeScrollViewContainer:{gap:4,paddingHorizontal:16},activityType:{flexDirection:"row",justifyContent:"center",alignItems:"center",alignSelf:"stretch",backgroundColor:wL.bgInput,borderColor:wL.borderOnSecondary,borderRadius:16,paddingHorizontal:12,paddingVertical:8,borderWidth:1},activityTypeText:{..._L.medium_SM,color:wL.textInputText,paddingLeft:4},titleInputContainer:{paddingHorizontal:16}}),W0=rF(()=>{const{t:e}=eV(),{activityStoreActions:t}=I2(),{modalStoreActions:n}=z2(),i=Gp(),r=cf(),[a,o]=M.useState(!1),[s,l]=M.useState(!1),{activity:u}=Vq;if(void 0===u)throw new Error("[CreateActivity::render] activitySettings is undefined");const c=M.useMemo(()=>({uuid:IX(),startTimestamp:null,deleted:!1,type:null,activityIntensity:null,durationSeconds:0,overwrittenByUUID:void 0,title:void 0,uuidOld:void 0}),[]),d=M.useMemo(()=>r.params?.activity??c,[c,r.params?.activity]),h=M.useMemo(()=>{if(null===d.startTimestamp)return null;return new Date(d.startTimestamp).getTime()+d.durationSeconds*FL.Milliseconds.Second>Date.now()?0:1},[d]),[m,p]=M.useState(d),[f,g]=M.useState(h),[_,v]=M.useState(0),y=M.useMemo(()=>1===f?m.durationSeconds>0&&!!m.startTimestamp:m.durationSeconds>0&&!!m.activityIntensity&&!!m.startTimestamp,[m,f]),b=M.useMemo(()=>!LX(m,d),[m,d]),w=M.useCallback(()=>{b?o(!0):i.goBack()},[b,i]),S=M.useCallback(async()=>{const e=r.params?.activity?.uuid,a=e?{...m,uuid:IX()}:m;if(await Lq.create(a,e)){const n=Lq.getEventWithHighestReduction(u);t.set({selectedEventUUID:n?.uuid??a.uuid,activityDurationSeconds:n?.durationSeconds??0}),NX(e?MX.ActivityEditPress:MX.ActivityAddPress),i.goBack()}else n.set({showSyncErrorModal:!0})},[m,u,t,n,i,r.params?.activity]);M.useEffect(()=>{const t=r.params?.activity?e("button_done"):e("button_add"),n=!y||!b;i.setOptions({headerRight:()=>D.createElement(J2,{title:t,onPress:S,disabled:n}),headerLeft:()=>D.createElement(e0,{onPress:w})})},[w,S,y,r.params?.activity,e,i,b]);const k=e=>{p(t=>({...t,...e}))},C=e=>{const t=60*e,n=Date.now()-(1===f?t*FL.Milliseconds.Second:0);k({durationSeconds:t,startTimestamp:new Date(n).toISOString()})},E=e=>{k({activityIntensity:FL.ActivityIntensity[e]})},x=Math.round(m.durationSeconds/60),I=29===x,T=45===x,O=60===x,R=m.activityIntensity===FL.ActivityIntensity.light,A=m.activityIntensity===FL.ActivityIntensity.moderate,L=m.activityIntensity===FL.ActivityIntensity.hard,P=0===f,N=1===f,F=x>45&&L&&!u.hard.fromFortysix;M.useEffect(()=>{const{activityIntensity:e,durationSeconds:t,startTimestamp:n}=m,i=0===f&&e;if(!F&&n&&t&&(i||1===f)){const t=Iq.getReduction(x,u,i?e:null,new Date(n));v(t)}},[F,u,m,x,f]);const B=M.useCallback(()=>{s&&setTimeout(i.goBack,100)},[s,i]),j=M.useCallback(()=>{o(!1),l(!0)},[]);return D.createElement(D.Fragment,null,D.createElement(V0,{testID:"create-activity-scroll-view",style:G0.container,contentContainerStyle:G0.contentContainer,keyboardDismissMode:oV?"none":"on-drag",automaticallyAdjustKeyboardInsets:!0,contentInsetAdjustmentBehavior:"automatic"},D.createElement(ga,{style:G0.cardMandatory},D.createElement(ga,null,D.createElement(Sj,{title:e("new_activity_when_title")}),D.createElement(ga,{style:G0.segmentContainer},D.createElement(eh,{style:[G0.segment,0===f&&G0.selected],onPress:()=>{g(0),0!==m.durationSeconds&&k({startTimestamp:(new Date).toISOString()})},testID:`starting-now-touchable-${P}`},D.createElement(pj,{style:G0.value,maxFontSizeMultiplier:vL},e("new_activity_intensity_option1"))),D.createElement(ga,{style:G0.borderLeft}),D.createElement(eh,{style:[G0.segment,1===f&&G0.selected],onPress:()=>{if(g(1),0!==m.durationSeconds){const e=new Date(Date.now()-m.durationSeconds*FL.Milliseconds.Second);k({startTimestamp:e.toISOString(),activityIntensity:null})}},testID:`just-finished-now-touchable-${N}`},D.createElement(pj,{style:G0.value,maxFontSizeMultiplier:vL},e("new_activity_intensity_option2"))))),D.createElement(ga,null,D.createElement(Sj,{title:e("new_activity_duration_title")}),D.createElement(ga,{style:G0.segmentContainer},D.createElement(eh,{style:[G0.segment,I&&G0.selected],onPress:()=>{C(29)}},D.createElement(pj,{style:G0.value,maxFontSizeMultiplier:vL},"0-29 min")),D.createElement(ga,{style:G0.borderLeft}),D.createElement(eh,{style:[G0.segment,T&&G0.selected],onPress:()=>{C(45)}},D.createElement(pj,{style:G0.value,maxFontSizeMultiplier:vL},"30-45 min")),D.createElement(ga,{style:G0.borderLeft}),D.createElement(eh,{style:[G0.segment,O&&G0.selected],onPress:()=>{C(60)}},D.createElement(pj,{style:G0.value,maxFontSizeMultiplier:vL},"46-60 min")))),P&&D.createElement(ga,null,D.createElement(Sj,{title:e("new_activity_intensity_title")}),D.createElement(ga,{style:G0.segmentContainer},D.createElement(eh,{style:[G0.segmentIntensity,R&&G0.selected],onPress:()=>{E(FL.ActivityIntensity.light)},testID:`activity-light-touchable-${R}`},D.createElement(ga,{style:[G0.intensityDot,EQ(FL.ActivityIntensity.light)]}),D.createElement(pj,{style:G0.value,maxFontSizeMultiplier:vL},e("activity_intensity_1"))),D.createElement(ga,{style:G0.borderLeft}),D.createElement(eh,{style:[G0.segmentIntensity,A&&G0.selected],onPress:()=>{E(FL.ActivityIntensity.moderate)},testID:`activity-moderate-touchable-${A}`},D.createElement(ga,{style:[G0.intensityDot,EQ(FL.ActivityIntensity.moderate)]}),D.createElement(pj,{style:G0.value,maxFontSizeMultiplier:vL},e("activity_intensity_2"))),D.createElement(ga,{style:G0.borderLeft}),D.createElement(eh,{style:[G0.segmentIntensity,L&&G0.selected],onPress:()=>{E(FL.ActivityIntensity.hard)},testID:`activity-hard-touchable-${L}`},D.createElement(ga,{style:[G0.intensityDot,EQ(FL.ActivityIntensity.hard)]}),D.createElement(pj,{style:G0.value,maxFontSizeMultiplier:vL},e("activity_intensity_3")))),(R||A||L)&&D.createElement(ga,null,D.createElement(ga,{style:G0.intensityDescription},R&&D.createElement(pj,{style:G0.intensityDescriptionText},e("activity_intensity_1_text")),A&&D.createElement(pj,{style:G0.intensityDescriptionText},e("activity_intensity_2_text")),L&&D.createElement(pj,{style:G0.intensityDescriptionText},e("activity_intensity_3_text"))))),y&&!F&&D.createElement(ga,null,D.createElement(hj,null),D.createElement(ga,{style:G0.reductionContainer},D.createElement(pj,{style:G0.reductionDescription,maxFontSizeMultiplier:vL},e("new_activity_reduction_amount_body")),D.createElement(pj,{style:G0.reductionPercentage,testID:"create-activity-reduction-percentage",maxFontSizeMultiplier:vL},`${Math.round(100*_)}%`)))),D.createElement(ga,{style:[G0.cardOptional,{paddingHorizontal:0}]},D.createElement(ga,{style:G0.titleInputContainer},D.createElement(cV,{testID:"activity-title-input",placeholder:e("new_activity_note_input"),value:m.title??"",onChangeText:e=>{k({title:e})},maxFontSizeMultiplier:vL})),D.createElement(Xa,{horizontal:!0,style:G0.typesContainer,showsHorizontalScrollIndicator:!1,contentContainerStyle:G0.activityTypeScrollViewContainer},Object.keys(FL.ActivityEnum).map(e=>{const t=m.type===e,n=`activity-${e}-touchable-${t}`.toLowerCase();return D.createElement(eh,{testID:n,key:e,style:[G0.activityType,t&&G0.selected],onPress:()=>{k({type:FL.ActivityEnum[e]})}},CQ(e,G0.activityIcon),D.createElement(pj,{style:G0.activityTypeText,maxFontSizeMultiplier:vL},TQ[e]()))})))),D.createElement(U0,null),D.createElement(sz,{isVisible:F,title:e("new_activity_modal_intensity_high_title"),message:e("new_activity_modal_intensity_high_body"),buttons:[{title:e("button_understood"),testID:"ok-button",onPress:()=>{k({activityIntensity:null})}}]}),D.createElement(sz,{isVisible:a,title:e("new_activity_modal_discard_title"),onModalHide:B,buttons:[{title:e("button_discard_changes"),testID:"discard-button",type:lj.Error,onPress:j},{title:e("button_keep_editing"),testID:"keep-button",type:lj.Secondary,onPress:()=>{o(!1)}}]}))});const Y0=Ei.create({button:{backgroundColor:wL.iosBg2,borderRadius:13},buttonText:{fontSize:17,lineHeight:22,fontWeight:"600",paddingHorizontal:16,paddingVertical:14,textAlign:"center",color:wL.textKeyboardButtons}}),$0=D.memo(function({onPress:e}){const{t:t}=eV();return D.createElement(eh,{accessibilityRole:"button",style:Y0.button,onPress:e,testID:"wheel-picker-modal-cancel"},D.createElement(pj,{style:Y0.buttonText},t("button_cancel")))});const X0=Ei.create({button:{backgroundColor:wL.iosBg2,borderBottomLeftRadius:13,borderBottomRightRadius:13},buttonText:{fontSize:17,lineHeight:22,fontWeight:"400",paddingHorizontal:16,paddingVertical:14,textAlign:"center",color:wL.textKeyboardButtons}}),q0=D.memo(function({onPress:e}){const{t:t}=eV();return D.createElement(eh,{accessibilityRole:"button",style:X0.button,onPress:e,testID:"wheel-picker-modal-confirm"},D.createElement(pj,{style:X0.buttonText},t("button_confirm")))});const Z0=Ei.create({item:{alignItems:"center",justifyContent:"center",zIndex:100},itemPressable:{width:"100%"},itemText:{textAlign:"center",fontSize:22,lineHeight:26,fontWeight:"400",color:wL.text}}),K0=D.memo(function({textStyle:e,style:t,height:n,option:i,onItemPress:r}){return D.createElement(ga,{style:[Z0.item,t,{height:n}]},D.createElement(eh,{style:Z0.itemPressable,onPress:r},D.createElement(hl,{style:[e,Z0.itemText]},i)))});const Q0=Ei.create({mask:{position:"absolute",left:0,right:0,pointerEvents:"none"}}),J0=M.memo(function({itemHeight:e,visibleRest:t}){const n=e*t;return D.createElement(D.Fragment,null,D.createElement(nj,{colors:[wL.iosBg2,wL.dropshadow100],style:[Q0.mask,{top:0,height:n}]}),D.createElement(nj,{colors:[wL.dropshadow100,wL.iosBg2],style:[Q0.mask,{bottom:0,height:n}]}))});const e3=Ei.create({container:{borderTopLeftRadius:13,borderTopRightRadius:13,backgroundColor:wL.iosBg2,alignSelf:"center"},selectedIndicator:{position:"absolute",backgroundColor:wL.iosHighlight,borderRadius:7,top:"50%",alignSelf:"center"}}),t3=D.memo(function({testID:e,initialScrollIndex:t,options:n,onChange:i,selectedIndicatorStyle:r={},containerStyle:a={},itemStyle:o={},itemTextStyle:s={},itemHeight:l=36,visibleRest:u=3,decelerationRate:c="normal",containerProps:d={},flatListProps:h={},accessibilityLabel:m,ref:p}){const{t:f}=eV(),{width:g}=vm(),_=(1+2*u)*l,v=M.useRef(null),y=M.useRef(null);M.useImperativeHandle(p,()=>({scrollToIndex(e){v.current?.scrollToIndex({index:e,animated:!0})}}),[]);const[b]=M.useState(new uu.Value(0)),w=M.useMemo(()=>{const e=[...n];for(let t=0;t<u;t++)e.unshift(null),e.push(null);return e},[n,u]),S=M.useMemo(()=>[...Array(w.length)].map((e,t)=>t*l),[w,l]),k=M.useCallback(e=>{oV||y.current!==e&&(y.current=e)},[]),C=M.useCallback(e=>{const t=e.nativeEvent.contentOffset.y,r=Math.min(n.length-1,Math.max(0,Math.round(t/l)));k(r),oV&&(i(r),v.current?.scrollToIndex({index:r,animated:!0}))},[k,l,i,n.length]),E=oj((...e)=>{const t=e[0];C(t)},100),x=M.useCallback(e=>{const t=e.nativeEvent.contentOffset.y,r=Math.min(l*(n.length-1),Math.max(t,0));let a=Math.floor(Math.floor(r)/l);Math.floor(r%l)>l/2&&a++,i(a)},[l,i,n.length]);return D.createElement(ga,{accessible:!0,accessibilityHint:f("wheelpicker_accessibility_label"),accessibilityLabel:m,accessibilityRole:"adjustable",style:[e3.container,{height:_,width:g},a],...d},D.createElement(ga,{style:[e3.selectedIndicator,{transform:[{translateY:-l/2}],height:l,width:g-32-20},r]}),D.createElement(uu.FlatList,{...h,testID:e,ref:v,showsVerticalScrollIndicator:!1,removeClippedSubviews:sV,onScroll:uu.event([{nativeEvent:{contentOffset:{y:b}}}],{useNativeDriver:!oV,listener:oV?E:C}),scrollEventThrottle:16,initialScrollIndex:t,onMomentumScrollEnd:x,snapToInterval:l,snapToOffsets:S,decelerationRate:c,getItemLayout:(e,t)=>({length:l,offset:l*t,index:t}),data:w,keyExtractor:(e,t)=>t.toString(),windowSize:31,initialNumToRender:2*u+1,maxToRenderPerBatch:12,updateCellsBatchingPeriod:50,renderItem:({item:e,index:t})=>D.createElement(K0,{key:`option-${t}`,option:e,style:o,textStyle:s,height:l,onItemPress:()=>{const e=Math.max(0,Math.min(t-u,n.length-1));v.current?.scrollToIndex({index:e,animated:!0})}})}),D.createElement(J0,{itemHeight:l,visibleRest:u}))});const n3=D.memo(function({items:e,isVisible:t,onCancel:n,onConfirm:i,onModalHide:r,initialScrollIndex:a,accessibilityLabel:o,testID:s}){const[l,u]=M.useState(a),{width:c}=vm();M.useEffect(()=>{u(a)},[a]);const d=M.useCallback(e=>{u(e)},[]),h=M.useCallback(()=>{i(parseFloat(e[l]))},[e,i,l]),m=M.useCallback(()=>{u(a),n()},[a,n]);return D.createElement(sz,{isVisible:t,containerStyle:i3.modalContainer,onModalHide:r},D.createElement(ga,null,D.createElement(ga,{style:i3.pickersContainer},D.createElement(t3,{testID:s,initialScrollIndex:a,options:e,onChange:d,accessibilityLabel:o,containerStyle:{width:c-32}})),D.createElement(ga,{style:i3.buttonContainer},D.createElement(q0,{onPress:h}),D.createElement($0,{onPress:m}))))}),i3=Ei.create({pickersContainer:{flexDirection:"row",borderTopLeftRadius:13,borderTopRightRadius:13,overflow:"hidden"},buttonContainer:{gap:8},modalContainer:{backgroundColor:wL.bgTransparent}}),r3=({isLiquid:e,setSelected:t})=>{const{t:n}=eV();return M.createElement(ga,{style:a3.container},M.createElement(eh,{style:[a3.segment,!e&&a3.selected],onPress:()=>{t(!1)},testID:`food-type-food-${e}`},M.createElement(pj,{style:a3.value,maxFontSizeMultiplier:vL},n("add_food_segment_food"))),M.createElement(ga,{style:a3.borderLeft}),M.createElement(eh,{style:[a3.segment,e&&a3.selected],onPress:()=>{t(!0)},testID:`food-type-drink-${e}`},M.createElement(pj,{style:a3.value,maxFontSizeMultiplier:vL},n("add_food_segment_drink"))))},a3=Ei.create({container:{flexDirection:"row",justifyContent:"center",alignItems:"center",backgroundColor:wL.bgInput,borderRadius:16,marginBottom:32},segment:{flex:1,flexDirection:"row",justifyContent:"center",alignItems:"center",backgroundColor:wL.bgInput,paddingVertical:7,borderColor:wL.bgInput,borderRadius:16,borderWidth:1},selected:{backgroundColor:wL.bgBrand,borderColor:wL.borderOnBrand},borderLeft:{backgroundColor:wL.borderDivider,alignSelf:"center",height:16,width:1},value:{..._L.medium_Base}}),o3={id:Date.now(),title:"",keywords:"",description:"",liquid:!1,energy:0,carbohydrates:0,protein:0,sugar:0,fibers:0,fat:0,saturated_fat:0,source:null,user_id:null},s3=RX(0,100),l3=RX(0,999),u3="create-food",c3=()=>{const{t:e}=eV(),{foodStoreActions:t,selectedFoodItem:n,isLoading:i}=L2(),{cartItems:r,carbohydrateStoreActions:a}=EX(),{modalStoreActions:o}=z2(),s=Gp(),[l,u]=M.useState(n??o3),[c,d]=M.useState(""),[h,m]=M.useState(!1),[p,f]=M.useState(!1),[g,_]=M.useState(0),[v,y]=M.useState(!1);M.useEffect(()=>{m(Boolean(l.title&&l.carbohydrates))},[l.title,l.carbohydrates]);const b=M.useCallback(e=>{const t=r.find(t=>t.foodItem.id===e.id);t&&a.upsertCartItem({...t,foodItem:e})},[r,a]),w=M.useCallback(async()=>{if(i)return;const e=n?await t.updateMyFoodItem(l):await t.createMyFoodItem(l);n&&e&&b(l),e?(s.pop(),NX(MX.FoodLibraryCreatePress)):o.set({showSyncErrorModal:!0})},[l,i,n,t,s,b,o]);M.useEffect(()=>{const t=e(n?"button_done":"button_add"),i=()=>{s.pop()};s.setOptions({title:l.title,headerLeft:()=>D.createElement(e0,{onPress:i}),headerRight:()=>D.createElement(J2,{title:t,onPress:w,disabled:!h})})},[l.title,h,s,w,n,e]);const S=M.useCallback(e=>{Pu.dismiss(),d(e),_(Number(l[e])),f(!0)},[l]),k=M.useCallback(e=>{u(t=>({...t,[c]:e})),f(!1),d("")},[c]),C=M.useCallback(async()=>{if(!n||i)return;y(!1);await t.deleteMyFoodItem(n)?(a.removeFromCart(n.id,"id"),s.dispatch(Rm.pop()),s.dispatch(Rm.pop()),t.set({selectedFoodItem:void 0})):setTimeout(()=>{o.set({showSyncErrorModal:!0})},300)},[n,i,t,a,s,o]),{carbohydrates:E,description:x,energy:I,fat:T,fibers:O,liquid:R,protein:A,saturated_fat:L,sugar:P,title:N}=l;return D.createElement(Xa,{testID:`${u3}-scroll`,keyboardDismissMode:"on-drag",keyboardShouldPersistTaps:"always",style:d3.scrollView},D.createElement(ga,{style:d3.container},D.createElement(r3,{isLiquid:R,setSelected:e=>{u(t=>({...t,liquid:e}))}}),D.createElement(pj,{style:d3.sectionHeader},e("food_add_title")),D.createElement(ga,{style:d3.mandatorySection},D.createElement(cV,{value:N,placeholder:e(R?"food_add_library_input_drink_name":"food_add_library_input_name"),onChangeText:e=>{u(t=>({...t,title:e}))},containerStyle:d3.noBorder,testID:`${u3}-name`,autoFocus:!n}),D.createElement(bj,{title:e("food_add_library_item_carbs"),onPress:()=>{S("carbohydrates")},style:d3.smallNegativeMarginTop,renderRightSlot:()=>D.createElement(pj,{style:d3.rightSlot,testID:`${u3}-carbohydrates`},E," / 100g")})),D.createElement(pj,{style:d3.sectionHeader},e("food_add_optional_title")),D.createElement(ga,{style:d3.optionalSection},D.createElement(cV,{value:x,placeholder:e("add_food_overview_description"),onChangeText:e=>{u(t=>({...t,description:e}))},testID:`${u3}-description`,containerStyle:d3.noBorder}),D.createElement(bj,{title:e("food_add_library_item_energy"),onPress:()=>{S("energy")},style:d3.mediumNegativeMarginTop,renderRightSlot:()=>D.createElement(pj,{style:d3.rightSlot,testID:`${u3}-energy`},I," / 100g")}),D.createElement(bj,{title:e("food_library_item_protein"),onPress:()=>{S("protein")},renderRightSlot:()=>D.createElement(pj,{style:d3.rightSlot,testID:`${u3}-protein`},A," / 100g")}),D.createElement(bj,{title:e("food_library_item_sugar"),onPress:()=>{S("sugar")},renderRightSlot:()=>D.createElement(pj,{style:d3.rightSlot,testID:`${u3}-sugar`},P," / 100g")}),D.createElement(bj,{title:e("food_library_item_fibers"),onPress:()=>{S("fibers")},renderRightSlot:()=>D.createElement(pj,{style:d3.rightSlot,testID:`${u3}-fibers`},O," / 100g")}),D.createElement(bj,{title:e("food_library_item_fat"),onPress:()=>{S("fat")},renderRightSlot:()=>D.createElement(pj,{style:d3.rightSlot,testID:`${u3}-fat`},T," / 100g")}),D.createElement(bj,{title:e("food_library_item_sfat"),onPress:()=>{S("saturated_fat")},renderRightSlot:()=>D.createElement(pj,{style:d3.rightSlot,testID:`${u3}-saturated-fat`},L," / 100g")})),n&&D.createElement(cj,{type:lj.ErrorSecondary,title:e("button_delete_food"),testID:"delete_food_button",onPress:()=>{y(!0)}})),D.createElement(sz,{isVisible:v,title:e("food_modal_delete_food_title"),buttons:[{title:e("button_delete_food"),type:lj.Error,testID:"delete_modal_delete_button",onPress:C},{title:e("button_cancel"),type:lj.Secondary,testID:"delete_modal_cancel_button",onPress:()=>{y(!1)}}]}),D.createElement(n3,{isVisible:p,items:"energy"===c?l3:s3,initialScrollIndex:g,onCancel:()=>{f(!1)},onConfirm:k}),D.createElement(U0,null))},d3=Ei.create({scrollView:{backgroundColor:wL.bgSheet},container:{flex:1,paddingHorizontal:16,paddingTop:32,paddingBottom:64},mandatorySection:{marginBottom:32},optionalSection:{marginBottom:32,gap:8},sectionHeader:{..._L.medium_SM,color:wL.text,marginHorizontal:16,marginBottom:8},rightSlot:{..._L.regular_Base,color:wL.textInputTextSecondary},noBorder:{borderWidth:0},smallNegativeMarginTop:{marginTop:-8},mediumNegativeMarginTop:{marginTop:-16}}),h3=({item:e,index:t,testID:n})=>{const{t:i}=eV(),{navigate:r}=Gp(),{foodStoreActions:a}=L2(),o=cf(),{COLORS:s}=sj(),l=`${n}-${t}`;return D.createElement(Ic,{style:[m3.container,{backgroundColor:s.bgInput}],onPress:()=>{a.set({selectedFoodItem:e}),o.params?.comingFrom===C2.FoodTab?r(C2.FoodDetails):r(C2.AddCarbs,{isCarbItem:!1})},testID:l},D.createElement(pj,{style:[m3.title,{color:s.textInputText}],numberOfLines:1,maxFontSizeMultiplier:bL,testID:`${l}-title`},e.title),D.createElement(pj,{style:[m3.subTitle,{color:s.textInputTextSecondary}],numberOfLines:1,testID:`${l}-subtitle`,maxFontSizeMultiplier:bL},(()=>{const t=e.carbohydrates.toFixed(),n=i("new_cal_carbohydrates_input_unit"),r=i("food_card_kcal",{value:e.energy.toString()});return`${i("food_card_carb",{value:t,carbs:n})} ${r} ${i("food_card_grams")}`})()))},m3=Ei.create({container:{padding:16,borderRadius:16},title:{..._L.medium_Base,marginBottom:4},subTitle:{..._L.regular_SM}}),p3=oV?{outline:"none"}:{},f3=({comingFrom:e})=>{const{t:t,language:n}=eV(),{query:i,foodStoreActions:r}=L2(),a=()=>{r.set({hasSearched:!1,query:"",searchResults:[]})},o=async()=>{""!==i&&(r.set({hasSearched:!0}),await r.search(n),e===C2.FoodTab?NX(MX.FoodLibrarySearched):NX(MX.CarbsFoodLibrarySearch))},s=oj(o,300);return D.createElement(ga,{style:g3.container},D.createElement(fQ,null),D.createElement(kh,{testID:"food-searchbar-input",autoCapitalize:"none",placeholder:t("food_search_title"),placeholderTextColor:wL.textSearchInactive,cursorColor:wL.textSearchActive,style:g3.searchInput,multiline:!1,value:i,onChangeText:e=>{r.set({query:e}),e?e.length>2&&s():a()},onSubmitEditing:o,autoCorrect:!1,enterKeyHint:"search"}),i.length>0&&D.createElement(eh,{onPress:a,hitSlop:10},D.createElement(JK,{color:wL.textSecondary,width:16,height:16})))},g3=Ei.create({container:{flexDirection:"row",alignItems:"center",justifyContent:"center",backgroundColor:wL.bgSearch,borderRadius:16,marginTop:16,paddingHorizontal:12},searchInput:{..._L.regular_Base,flex:1,paddingVertical:8,paddingHorizontal:4,marginTop:2,color:wL.textSearchActive,fontFamily:sV?gL.RobotoRegular:gL.PoppinsRegular,...p3}}),_3=()=>{const{t:e,language:t}=eV(),{fontScale:n}=vm(),{myFood:i,searchResults:r,isLoading:a,isMyFoodTab:o,hasSearched:s,frequentlyAdded:l,animatedEntryId:u,foodStoreActions:c}=L2(),d=Gp(),h=cf(),{COLORS:m}=sj();Wp(M.useCallback(()=>{c.loadFrequentFoodItems().catch(console.error)},[c])),M.useEffect(()=>{i.sort((e,n)=>e.title.localeCompare(n.title,t))},[i,t]),M.useEffect(()=>{c.loadMyFood().catch(console.error)},[c]);const p=M.useCallback(()=>{c.set({isMyFoodTab:!0}),h.params.comingFrom===C2.CarbsTab?NX(MX.CarbsFoodLibraryPersonalPress):NX(MX.FoodLibraryPersonalPress)},[c,h.params.comingFrom]),f=M.useCallback(()=>{c.set({selectedFoodItem:void 0}),d.navigate(C2.CreateFood)},[c,d]),g=M.useMemo(()=>{const t=e(o||s?o?"food_empty_state_no_food":"food_empty_state_search_no_food":"food_empty_state_default");return D.createElement(ga,{style:[v3.emptyListContainer,{marginTop:o?64+Math.round(23*n):32}]},D.createElement(sQ,null),D.createElement(pj,{style:v3.message},t))},[n,o,s,e]),_=M.useMemo(()=>D.createElement(ga,{style:v3.header},D.createElement(ga,{style:[v3.segmentContainer,{backgroundColor:m.bgInput}]},D.createElement(eh,{style:[v3.segment,!o&&v3.selected],onPress:()=>{c.set({isMyFoodTab:!1})},testID:`food-library-button-${!o}`},D.createElement(pj,{style:v3.value,maxFontSizeMultiplier:vL},e("food_segment_button_library"))),D.createElement(ga,{style:v3.borderLeft}),D.createElement(eh,{style:[v3.segment,o&&v3.selected],onPress:p,testID:`my-food-button-${o}`},D.createElement(pj,{style:v3.value,maxFontSizeMultiplier:vL},e("food_segment_button_my_food")))),!o&&D.createElement(D.Fragment,null,D.createElement(f3,{comingFrom:h.params.comingFrom??C2.FoodTab}),!s&&!!l.length&&D.createElement(pj,{style:v3.frequentHeader},e("food_library_frequent_title")))),[m.bgInput,o,e,p,h.params.comingFrom,s,l.length,c]),v=M.useMemo(()=>o?i:s?r:l,[o,i,s,r,l]);return D.createElement(D.Fragment,null,D.createElement(ga,{style:[v3.container,h.params.comingFrom===C2.CarbsTab&&{backgroundColor:m.bgSheet}]},D.createElement(Wo,{data:v,keyExtractor:e=>`${e.id}`,ListEmptyComponent:a?D.createElement(QV,null):g,ListHeaderComponent:_,renderItem:({item:e,index:t})=>D.createElement(rj,{onAnimationFinished:()=>{c.set({animatedEntryId:void 0})},isAnimated:o&&u===e.id.toString(),style:v3.listItem},D.createElement(h3,{item:e,index:t,testID:"food-item"})),disableScrollViewPanResponder:!0,keyboardDismissMode:"on-drag",contentContainerStyle:v.length?v3.contentContainer:v3.emptyContentContainer})),o&&D.createElement(nj,{colors:m.gradientButtonBox,style:v3.gradient},D.createElement(cj,{type:lj.Secondary,testID:"my-food-create-food-button",onPress:f,title:e("food_my_food_button_create"),style:v3.createFoodButton})))},v3=Ei.create({container:{flex:1},emptyContentContainer:{flex:1,marginHorizontal:16},contentContainer:{marginHorizontal:16,paddingBottom:80},header:{marginVertical:32},segmentContainer:{flexDirection:"row",justifyContent:"center",alignItems:"center",borderRadius:16},segment:{flex:1,alignSelf:"stretch",flexDirection:"row",justifyContent:"center",alignItems:"center",backgroundColor:wL.bgInput,paddingVertical:7,borderColor:wL.bgInput,borderRadius:16,borderWidth:1},selected:{backgroundColor:wL.bgBrand,borderColor:wL.borderOnSecondary},borderLeft:{backgroundColor:wL.borderDivider,alignSelf:"center",height:16,width:1},value:{..._L.medium_Base},emptyListContainer:{flex:1,alignItems:"center"},message:{..._L.regular_SM,color:wL.textSecondary,marginTop:16,marginHorizontal:16,textAlign:"center"},frequentHeader:{..._L.medium_SM,color:wL.textSecondary,marginHorizontal:16,marginTop:32,marginBottom:-24},listItem:{marginBottom:8},gradient:{position:"absolute",bottom:0,left:0,right:0},createFoodButton:{margin:16,marginBottom:32}});function y3({uri:e,style:t,onLoadEnd:n}){const i=M.useRef(null);return M.useEffect(()=>{const e=i.current;if(n&&e)return e.addEventListener("load",n),()=>{e.removeEventListener("load",n)}},[i,n]),D.createElement("iframe",{ref:i,src:e,style:t})}function b3(){const{language:e}=Qj.getState();return`https://pdf.hedia.io/IFU/${e}/Hedia-IFU-${PX}`}const w3=()=>D.createElement(y3,{style:S3.iframe,uri:b3()}),S3=Ei.create({iframe:{flex:1}});var k3,C3={},E3={exports:{}};var x3,I3,T3={};var O3=function(){if(I3)return C3;I3=1;var e,t=(k3||(k3=1,(e=E3).exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports),E3.exports);Object.defineProperty(C3,"__esModule",{value:!0}),C3.default=C3.WebView=void 0,t(S());var n=JB,i=t(function(){if(x3)return T3;x3=1,Object.defineProperty(T3,"__esModule",{value:!0}),T3.default=void 0;var e=JB.StyleSheet.create({container:{flex:1,overflow:"hidden"},loadingOrErrorView:{position:"absolute",flex:1,justifyContent:"center",alignItems:"center",height:"100%",width:"100%",backgroundColor:"white"},loadingProgressBar:{height:20},errorText:{fontSize:14,textAlign:"center",marginBottom:2},errorTextTitle:{fontSize:15,fontWeight:"500",marginBottom:10},webView:{backgroundColor:"#ffffff"},flexStart:{alignSelf:"flex-start"},colorRed:{color:"red"}});return T3.default=e,T3}()),r=l(),a=C3.WebView=function(){return(0,r.jsx)(n.View,{style:i.default.flexStart,children:(0,r.jsx)(n.Text,{style:i.default.colorRed,children:"React Native WebView does not support this platform."})})};return C3.default=a,C3}();const R3=n(O3);function A3({url:e,testID:t,incognito:n=!0,backgroundColor:i=wL.bgBackground,onNavigationStateChange:r,spinnerSize:a=15,style:o}){const[s,l]=M.useState(!1),{top:u}=hH();return e?D.createElement(D.Fragment,null,D.createElement(R3,{source:{uri:e},testID:t,incognito:n,startInLoadingState:!0,renderLoading:()=>D.createElement(ga,{style:L3.centerContainer},D.createElement(qV,{source:KV.LOADING_SPINNER,autoPlay:!0,style:{height:`${a}%`}})),onHttpError:()=>{l(!0)},onNavigationStateChange:r,style:{backgroundColor:i},containerStyle:[L3.container,{backgroundColor:i,paddingTop:u},o]}),s&&D.createElement(FR.View,{entering:wx.duration(300).delay(2e3),style:L3.centerContainer},D.createElement(hl,{style:L3.errorTitle},"The page can't be found"),D.createElement(hl,{style:L3.errorSubtitle},"It looks like nothing was found at this location."))):null}const L3=Ei.create({container:{height:"100%"},centerContainer:{height:"100%",justifyContent:"center"},errorTitle:{..._L.semiBold_4XL,color:wL.text,textAlign:"center"},errorSubtitle:{..._L.medium_XS,color:wL.textSecondary,textAlign:"center"}});function P3(){return oV?D.createElement(y3,{style:M3.iframe,uri:"https://www.hedia.com/support/partner"}):D.createElement(A3,{url:"https://www.hedia.com/support/native",testID:"support-webview",style:M3.container})}const M3=Ei.create({iframe:{flex:1},container:{paddingTop:0}});function D3(){const{dispatch:e}=Gp(),t=cf(),[n,i]=M.useState(!1);return M.useEffect(()=>{setTimeout(()=>{i(!0)},1e3)},[]),M.useEffect(()=>{n&&(oV?(window.location.href="/redirect?status=success",qj.clearAll()):e(wm(C2.DashboardTab,{screen:C2.Dashboard,params:{action:nV.Saved,logbookEntry:t.params.logbookEntry}})))},[e,n,t.params.logbookEntry]),D.createElement(ga,{style:N3.animationContainer},D.createElement(qV,{autoPlay:!0,source:KV.LEAVING_RECOMMENDATION,style:N3.animation,webStyle:N3.animation,resizeMode:"cover",loop:!1}))}const N3=Ei.create({animationContainer:{flex:1,justifyContent:"center",alignItems:"center"},animation:{width:131,height:131}});var F3={},B3={};const j3=i(wH);var V3={},H3={};const z3=i(BK);var U3,G3,W3={},Y3={},$3={};function X3(){if(G3)return Y3;G3=1,Object.defineProperty(Y3,"__esModule",{value:!0}),Y3.DARK_SEMANTIC_COLORS=void 0;var e=(U3||(U3=1,Object.defineProperty($3,"__esModule",{value:!0}),$3.COLORS=void 0,$3.COLORS={base100:"#f6f6f6",base200:"#ebebeb",base300:"#e0e0e0",base400:"#cccccc",base500:"#b3b3b3",base600:"#9a9a9a",base700:"#767676",base800:"#595959",base900:"#2c2c2c",primary100:"#e8fcfc",primary200:"#c1f2f2",primary300:"#99e4e4",primary400:"#5ac2c2",primary500:"#4fbaba",primary600:"#38a6a6",primary700:"#209191",primary800:"#0a6e6e",primary900:"#005555",yellow100:"#fefee9",yellow200:"#fafad0",yellow300:"#f0f0a6",yellow400:"#dddd7e",yellow500:"#c1c152",yellow600:"#a7a739",yellow700:"#85852d",yellow800:"#666623",yellow900:"#4d4d1a",green100:"#99ffc7",green200:"#7fe0ab",green300:"#67c190",green400:"#51a277",green500:"#3d835e",green600:"#29764e",green700:"#18683f",green800:"#0b5a32",green900:"#004d26",red100:"#fee9e9",red200:"#fad0d0",red300:"#f0a6a6",red400:"#dd7e7e",red500:"#c15252",red600:"#a73939",red700:"#852d2d",red800:"#662323",red900:"#4d1a1a",base100:"#E9E0FF",base100a:"#E9E0FF1A",base200:"#76708F",base300:"#393546",base350:"#302C3A",base400:"#27242E",base500:"#1B1A21",base600:"#151319",base700:"#131215",base700a:"#131215B3",base800:"#0A090D",base900:"#050408",base900a:"#05040899",primary100:"#B5D8FF",primary100a:"#B5D8FF99",primary200:"#9EC6FF",primary300:"#87B5FF",primary300a:"#87B5FF4D",primary400:"#73ADFF",primary400a:"#3D4AC680",primary500:"#5F99F9",primary600:"#4A85F0",primary700:"#4A73ED",primary700a:"#4A73ED",primary800:"#4A5DEB",primary900:"#3D4AC6",red50:"#FEEBEE",red100:"#F3B8BA",red200:"#E87A7E",red300:"#FF3B30",red400:"#D12A2E",red400a:"#D12A2E99",red500:"#AE241B",red600:"#792521",red700:"#4B1E1D",red800:"#2A1616",red900:"#160D0D",green50:"#D6FFED",green100:"#C5F8DC",green200:"#5CE59C",green200a:"#5CE59C1A",green300:"#64D9A4",green400:"#1BD881",green500:"#02AD71",green600:"#1E8059",green700:"#185C45",green800:"#113B2F",green900:"#0A1C18",yellow50:"#FFE5B5",yellow100:"#FFEBC2",yellow200:"#FFD27E",yellow300:"#F3B901",yellow400:"#FF9E01",yellow500:"#FF5A01",yellow600:"#874312",yellow700:"#523010",yellow800:"#2E1B0B",yellow900:"#1A1208",accentActiveInsulin:"#8CF4FF",accentBorderActiveInsulin:"#66D6FF",accentBorderActiveInsulinOpacity:"#224352",accentCarbohydrate:"#5CE5DC",accentGlucoseAverage:"#FF8CD8",accentMyDay:"#F2BD85",accentPhysicalActivity:"#D7EB98",accentRapid:"#66D6FF",accentTimeInRange:"#5CE59C",gradientActiveInsulinBottom:"#01C1D600",gradientActiveInsulinTop:"#8CF4FF",gradientButtonBoxBottom:"#000000",gradientButtonBoxTop:"#0000000D",gradientCarbohydrateBottom:"#48B2AB",gradientCarbohydrateTop:"#5CE5DC",gradientGlucoseAverageBottom:"#AF6DB9",gradientGlucoseAverageTop:"#FF8CD8",gradientGlucoseBottom:"#CBAE6F",gradientGlucoseTop:"#F2BD85",gradientHighBottom:"#F2B900",gradientHighTop:"#FF9E01",gradientLowBottom:"#FF657F",gradientLowTop:"#EF2F4F",gradientPhysicalActivityBottom:"#79A762",gradientPhysicalActivityTop:"#D7EB98",gradientQuickGuideBottom:"#000000",gradientQuickGuideTop:"#0000000D",gradientRapidBottom:"#4796B2",gradientRapidTop:"#66D6FF",gradientRecCarbohydrateBottom:"#409F99",gradientRecCarbohydrateTop:"#327D78",gradientTargetBottom:"#1AD881",gradientTargetTop:"#02AD71",gradientVeryHighBottom:"#EA7644",gradientVeryHighTop:"#FF5A01",gradientVeryLowBottom:"#F44337",gradientVeryLowTop:"#A6261E",white100:"#FFFFFF0D",white200:"#FFFFFF1A",white300:"#FFFFFF33",white400:"#FFFFFF66",white500:"#FFFFFF99",white600:"#FFFFFFCC",white700:"#FFFFFFE6",white800:"#FFFFFFF2",white900:"#FFFFFF",black100:"#0000000D",black200:"#0000001A",black300:"#00000033",black400:"#0000004D",black500:"#00000080",black600:"#000000CC",black700:"#000000D9",black800:"#000000F2",black900:"#000000",noRisk:"#DFB38F",lowRisk:"#DB988D",moderateRisk:"#A76762",highRisk:"#773751",transparent:"transparent",dropshadow100:"#0C0C0D00",dropshadow500:"#0C0C0D00",iOSKeyboardButton:"#0A84FF",iosBg1:"#8C8C8C",iosBg2:"#252525",iosHighlight:"#5858593D"}),$3);return Y3.DARK_SEMANTIC_COLORS={bgActivityHighlight:e.COLORS.base350,bgBackground:e.COLORS.base900,bgBrand:e.COLORS.primary800,bgBrandDisabled:e.COLORS.base300,bgBrandPagination:e.COLORS.primary200,bgBrandPressed:e.COLORS.primary900,bgBrandTinted:e.COLORS.primary300a,bgButtonSecondary:e.COLORS.base350,bgCard:e.COLORS.base600,bgDanger:e.COLORS.red400,bgDangerDisabled:e.COLORS.red700,bgDangerPressed:e.COLORS.red500,bgDashboardDotsHigh:e.COLORS.yellow300,bgDashboardDotsInRange:e.COLORS.green400,bgDashboardDotsLow:e.COLORS.red300,bgDashboardHighlightDots:e.COLORS.green300,bgEmptyOnBg:e.COLORS.white600,bgFoodInput:e.COLORS.white200,bgFoodInputWeight:e.COLORS.base300,bgHard:e.COLORS.red300,bgIcon:e.COLORS.base400,bgInfoBox:e.COLORS.base500,bgInput:e.COLORS.base500,bgInputActive:e.COLORS.base400,bgInputDanger:e.COLORS.base600,bgKeyboard:e.COLORS.black900,bgLight:e.COLORS.green400,bgLogbookHighlight:e.COLORS.base350,bgLogbookManual:e.COLORS.base500,bgLogbookRec:e.COLORS.base400,bgModal:e.COLORS.base500,bgModerate:e.COLORS.yellow400,bgNavigation:e.COLORS.base900a,bgNavigationBar:e.COLORS.base900a,bgNavigationBarCalc:e.COLORS.white200,bgNavigationBarSummaryActive:e.COLORS.white200,bgNavigationBarSummaryInactive:e.COLORS.white100,bgNavigationIndicator:e.COLORS.primary400,bgOnProgressBarSecondary:e.COLORS.base400,bgOnSmartpenConflictPressed:e.COLORS.primary700,bgPagination:e.COLORS.white300,bgPills:e.COLORS.white100,bgPillsInactive:e.COLORS.black200,bgProgressBar:e.COLORS.base900a,bgRecNavigationNumberActive:e.COLORS.white900,bgRecNavigationNumberInactive:e.COLORS.white400,bgRecNavigationSummaryButton:e.COLORS.base600,bgRecommendation:e.COLORS.base400,bgRecommendationCorrection:e.COLORS.base500,bgSearch:e.COLORS.base400,bgSecondary:e.COLORS.base500,bgSecondaryDisabled:e.COLORS.base600,bgSecondaryPressed:e.COLORS.base300,bgSheet:e.COLORS.base800,bgSmartpenConflictButtonActive:e.COLORS.base400,bgSmartpenConflictButtonDisabled:e.COLORS.base400,bgSmartpenConflictCardActive:e.COLORS.base400,bgSmartpenConflictCardDisabled:e.COLORS.base500,bgTableActive:e.COLORS.white300,bgTableHighlight:e.COLORS.base500,bgTableInputActive:e.COLORS.base600,bgTableInputInactive:e.COLORS.base600,bgTableTopActive:e.COLORS.base500,bgTableTopInactive:e.COLORS.base500,bgTimeInRange:e.COLORS.green200a,bgToast:e.COLORS.base300,bgToggleActive:e.COLORS.primary600,bgToggleInactive:e.COLORS.base300,bgToggleSlider:e.COLORS.white300,bgToggleSliderKnob:e.COLORS.white900,bgTransparent:e.COLORS.transparent,borderActiveInsulin:e.COLORS.accentActiveInsulin,borderBrandAnimation:e.COLORS.primary400,borderCarbohydrate:e.COLORS.accentCarbohydrate,borderCardOverlay:e.COLORS.base600,borderDanger:e.COLORS.red300,borderDivider:e.COLORS.white200,borderGlucoseAverage:e.COLORS.accentGlucoseAverage,borderGraphOverlay:e.COLORS.black500,borderInputActive:e.COLORS.primary500,borderInputDivider:e.COLORS.white100,borderKnob:e.COLORS.white100,borderLine:e.COLORS.white800,borderNavigation:e.COLORS.base100a,borderOnBrand:e.COLORS.white200,borderOnBrandDisabled:e.COLORS.black100,borderOnDangerDisabled:e.COLORS.red100,borderOnProgressBarSecondary:e.COLORS.white100,borderOnSecondary:e.COLORS.white100,borderOnSecondaryDisabled:e.COLORS.black100,borderOverlay:e.COLORS.black500,borderRapid:e.COLORS.accentRapid,borderSlider:e.COLORS.white100,borderTableDivider:e.COLORS.white200,dropshadow100:e.COLORS.dropshadow100,dropshadow500:e.COLORS.dropshadow500,gradientActiveInsulin:[e.COLORS.gradientActiveInsulinBottom,e.COLORS.gradientRapidTop],gradientButtonBox:[e.COLORS.gradientButtonBoxTop,e.COLORS.gradientButtonBoxBottom],gradientCarbohydrates:[e.COLORS.gradientCarbohydrateBottom,e.COLORS.gradientCarbohydrateTop],gradientGlucose:[e.COLORS.gradientGlucoseBottom,e.COLORS.gradientGlucoseTop],gradientGlucoseAverage:[e.COLORS.gradientGlucoseAverageBottom,e.COLORS.gradientGlucoseAverageTop],gradientHigh:[e.COLORS.gradientHighBottom,e.COLORS.gradientHighTop],gradientLow:[e.COLORS.gradientLowTop,e.COLORS.gradientLowBottom],gradientPhysicalActivity:[e.COLORS.gradientPhysicalActivityBottom,e.COLORS.gradientPhysicalActivityTop],gradientQuickGuide:[e.COLORS.gradientQuickGuideTop,e.COLORS.gradientQuickGuideBottom],gradientRapid:[e.COLORS.gradientRapidBottom,e.COLORS.gradientRapidTop],gradientRecCarbohydrates:[e.COLORS.gradientRecCarbohydrateBottom,e.COLORS.gradientRecCarbohydrateTop],gradientTarget:[e.COLORS.gradientTargetBottom,e.COLORS.gradientTargetTop],gradientVeryHigh:[e.COLORS.gradientVeryHighBottom,e.COLORS.gradientVeryHighTop],gradientVeryLow:[e.COLORS.gradientVeryLowBottom,e.COLORS.gradientVeryLowTop],icon:e.COLORS.white800,iconActiveInsulin:e.COLORS.accentActiveInsulin,iconBrand:e.COLORS.primary400,iconCarbohydrate:e.COLORS.accentCarbohydrate,iconCheckmark:e.COLORS.green400,iconDanger:e.COLORS.red300,iconDangerPressed:e.COLORS.white600,iconDangerSecondaryPressed:e.COLORS.red500,iconGlucose:e.COLORS.accentMyDay,iconGlucoseAverage:e.COLORS.accentGlucoseAverage,iconInputActive:e.COLORS.white800,iconInputInactive:e.COLORS.white500,iconNavigationBarActive:e.COLORS.primary400,iconNavigationBarInactive:e.COLORS.white500,iconNavigationBarSummaryActive:e.COLORS.primary400,iconNavigationBarSummaryInactive:e.COLORS.white500,iconNavigationRec:e.COLORS.white900,iconOnBrand:e.COLORS.white800,iconOnBrandDisabled:e.COLORS.white400,iconOnBrandPressed:e.COLORS.white600,iconOnCard:e.COLORS.white800,iconOnCardInactive:e.COLORS.white400,iconOnDanger:e.COLORS.white800,iconOnDangerDisabled:e.COLORS.white500,iconOnInput:e.COLORS.white600,iconOnSecondary:e.COLORS.white800,iconOnSecondaryDanger:e.COLORS.red300,iconOnSecondaryDangerDisabled:e.COLORS.white400,iconOnSecondaryDisabled:e.COLORS.white400,iconOnSecondaryPressed:e.COLORS.white600,iconOnTertiary:e.COLORS.white800,iconOnTertiaryDisabled:e.COLORS.white400,iconOnTertiaryPressed:e.COLORS.white600,iconOnToast:e.COLORS.white900,iconPhysicalActivity:e.COLORS.accentPhysicalActivity,iconRapid:e.COLORS.accentRapid,iconSearch:e.COLORS.white500,iconSecondary:e.COLORS.white500,iconSegmentPicker:e.COLORS.white800,iconSegmentPickerActive:e.COLORS.white800,iconSuccess:e.COLORS.green400,iconTimeInRange:e.COLORS.accentTimeInRange,iconToggleSlider:e.COLORS.white900,iconWarning:e.COLORS.yellow300,iosStatusBar:e.COLORS.white900,iosBg1:e.COLORS.iosBg1,iosBg2:e.COLORS.iosBg2,iosHighlight:e.COLORS.iosHighlight,neutralBlack:e.COLORS.black900,text:e.COLORS.white900,textActiveInsulin:e.COLORS.accentActiveInsulin,textBrand:e.COLORS.primary400,textCarbohydrate:e.COLORS.accentCarbohydrate,textDanger:e.COLORS.red300,textDangerDisabled:e.COLORS.white500,textDangerPressed:e.COLORS.white600,textDangerSecondaryPressed:e.COLORS.red500,textDangerTableActive:e.COLORS.red300,textDangerTableInactive:e.COLORS.red400a,textDisplay:e.COLORS.white900,textFoodInput:e.COLORS.white800,textFoodInputWeight:e.COLORS.base300,textGlucose:e.COLORS.accentMyDay,textGlucoseAverage:e.COLORS.accentGlucoseAverage,textHigh:e.COLORS.yellow300,textInputGraphInactive:e.COLORS.white300,textInputInactive:e.COLORS.white500,textInputText:e.COLORS.white900,textInputTextBrand:e.COLORS.primary400,textInputTextSecondary:e.COLORS.white600,textKeyboardButtons:e.COLORS.iOSKeyboardButton,textKeybord:e.COLORS.white800,textLow:e.COLORS.red300,textModalButtonInactive:e.COLORS.white300,textNavigationNumberActive:e.COLORS.black900,textNavigationNumberInactive:e.COLORS.white900,textNavigationTitle:e.COLORS.white900,textOnBrand:e.COLORS.white900,textOnBrandDisabled:e.COLORS.white400,textOnBrandPressed:e.COLORS.white600,textOnCarbCard:e.COLORS.white800,textOnDanger:e.COLORS.white800,textOnGraphInactive:e.COLORS.white500,textOnNavigationActive:e.COLORS.primary400,textOnNavigationInactive:e.COLORS.white500,textOnRecommendation:e.COLORS.white800,textOnRecommendationStrikethrough:e.COLORS.white500,textOnSecondary:e.COLORS.white800,textOnSecondaryDangerDisabled:e.COLORS.red400a,textOnSecondaryDisabled:e.COLORS.white400,textOnSecondaryPressed:e.COLORS.white600,textOnSmartpenConflictActive:e.COLORS.white900,textOnSmartpenConflictPressed:e.COLORS.white800,textOnTertiary:e.COLORS.white800,textOnTertiaryDisabled:e.COLORS.white400,textOnTertiaryPressed:e.COLORS.white600,textOnToast:e.COLORS.white800,textPhysicalActivity:e.COLORS.accentPhysicalActivity,textPillInactive:e.COLORS.white400,textRapid:e.COLORS.accentRapid,textSearchActive:e.COLORS.white800,textSearchBrand:e.COLORS.primary400,textSearchInactive:e.COLORS.white500,textSecondary:e.COLORS.white600,textSecondaryDanger:e.COLORS.red300,textSegmentPicker:e.COLORS.white800,textSmartenConflictButtonDisabled:e.COLORS.white400,textSmartpenConflictButtonActive:e.COLORS.base400,textSmartpenConflictDisabled:e.COLORS.white400,textSuccess:e.COLORS.green200,textTableActive:e.COLORS.primary400,textTableInactive:e.COLORS.white400,textTarget:e.COLORS.green400,textTimeInRange:e.COLORS.accentTimeInRange,textToggleSlider:e.COLORS.white800,textVeryHigh:e.COLORS.yellow500,textVeryLow:e.COLORS.red400,textWarning:e.COLORS.yellow300,toggleKnob:e.COLORS.white900},Y3}var q3,Z3,K3,Q3={};function J3(){return Z3||(Z3=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.COLORS=void 0,Object.defineProperty(e,"FONTS",{enumerable:!0,get:function(){return n.FONTS}}),Object.defineProperty(e,"FontFamily",{enumerable:!0,get:function(){return n.FontFamily}});var t=X3(),n=function(){if(q3)return Q3;q3=1,Object.defineProperty(Q3,"__esModule",{value:!0}),Q3.FontFamily=Q3.FONTS=void 0;let e=Q3.FontFamily=function(e){return e.PoppinsBold="Poppins-Bold",e.PoppinsSemiBold="Poppins-SemiBold",e.PoppinsMedium="Poppins-Medium",e.PoppinsRegular="Poppins-Regular",e}({});return Q3.FONTS={Poppins:{bold_6XL:{fontFamily:e.PoppinsBold,fontSize:60,lineHeight:78},semiBold_6XL:{fontFamily:e.PoppinsSemiBold,fontSize:60,lineHeight:78},bold_5XL:{fontFamily:e.PoppinsBold,fontSize:48,lineHeight:62},semiBold_5XL:{fontFamily:e.PoppinsSemiBold,fontSize:48,lineHeight:62},bold_4XL:{fontFamily:e.PoppinsBold,fontSize:36,lineHeight:47},semiBold_4XL:{fontFamily:e.PoppinsSemiBold,fontSize:36,lineHeight:47},bold_3XL:{fontFamily:e.PoppinsBold,fontSize:30,lineHeight:39},semiBold_3XL:{fontFamily:e.PoppinsSemiBold,fontSize:30,lineHeight:39},bold_2XL:{fontFamily:e.PoppinsBold,fontSize:24,lineHeight:31},semiBold_2XL:{fontFamily:e.PoppinsSemiBold,fontSize:24,lineHeight:31},medium_2XL:{fontFamily:e.PoppinsMedium,fontSize:24,lineHeight:31},bold_XL:{fontFamily:e.PoppinsBold,fontSize:20,lineHeight:26},semiBold_XL:{fontFamily:e.PoppinsSemiBold,fontSize:20,lineHeight:26},medium_XL:{fontFamily:e.PoppinsMedium,fontSize:20,lineHeight:26},bold_LG:{fontFamily:e.PoppinsBold,fontSize:18,lineHeight:23},semiBold_LG:{fontFamily:e.PoppinsSemiBold,fontSize:18,lineHeight:23},medium_LG:{fontFamily:e.PoppinsMedium,fontSize:18,lineHeight:23},bold_Base:{fontFamily:e.PoppinsBold,fontSize:16,lineHeight:21},semiBold_Base:{fontFamily:e.PoppinsSemiBold,fontSize:16,lineHeight:21},medium_Base:{fontFamily:e.PoppinsMedium,fontSize:16,lineHeight:21},regular_Base:{fontFamily:e.PoppinsRegular,fontSize:16,lineHeight:21},semiBold_SM:{fontFamily:e.PoppinsSemiBold,fontSize:14,lineHeight:18},medium_SM:{fontFamily:e.PoppinsMedium,fontSize:14,lineHeight:18},regular_SM:{fontFamily:e.PoppinsRegular,fontSize:14,lineHeight:18},semiBold_XS:{fontFamily:e.PoppinsSemiBold,fontSize:12,lineHeight:16},medium_XS:{fontFamily:e.PoppinsMedium,fontSize:12,lineHeight:16},regular_XS:{fontFamily:e.PoppinsRegular,fontSize:12,lineHeight:16},regular_XXS:{fontFamily:e.PoppinsRegular,fontSize:10,lineHeight:10}}},Q3}();e.COLORS=t.DARK_SEMANTIC_COLORS}(W3)),W3}var e4,t4={};var n4,i4={};function r4(){if(n4)return i4;n4=1,Object.defineProperty(i4,"__esModule",{value:!0}),i4.TIMEOUT_MODAL_TRIGGER=i4.TARGET_BGL_MMOL_LIMITS=i4.INSULIN_TO_CARBS_RATIO_LIMITS=i4.INSULIN_SENSITIVITY_MMOL_LIMITS=i4.INSULIN_DOSE_LIMITS=i4.CURRENT_BGL_MMOL_LIMITS=i4.CARBOHYDRATES_LIMITS=i4.BOLUS_SECONDS_PASSED_LIMITS=i4.ACTIVITY_TARGET_BGL_MMOL_LIMITS=i4.ACTIVITY_SETTINGS_INTERVAL_LIMITS=i4.ACTIVITY_POSTPONE_GLUCOSE=i4.ACTIVITY_DURATION_MINUTES_LIMITS=void 0;var e=NL();return i4.ACTIVITY_POSTPONE_GLUCOSE=5,i4.TIMEOUT_MODAL_TRIGGER=6e5,i4.CARBOHYDRATES_LIMITS={min:e.CONSTANTS.CARBOHYDRATES_INPUT_MIN,max:e.CONSTANTS.CARBOHYDRATES_INPUT_MAX},i4.INSULIN_DOSE_LIMITS={min:e.CONSTANTS.INSULIN_DOSE_MIN,max:e.CONSTANTS.INSULIN_DOSE_MAX},i4.BOLUS_SECONDS_PASSED_LIMITS={min:e.CONSTANTS.BOLUS_SECONDS_MIN,max:e.CONSTANTS.BOLUS_SECONDS_MAX},i4.ACTIVITY_DURATION_MINUTES_LIMITS={min:e.CONSTANTS.ACTIVITY_DURATION_MIN,max:e.CONSTANTS.ACTIVITY_DURATION_MAX},i4.INSULIN_SENSITIVITY_MMOL_LIMITS={min:e.CONSTANTS.INSULIN_SENSITIVITY_MIN,max:e.CONSTANTS.INSULIN_SENSITIVITY_MAX},i4.INSULIN_TO_CARBS_RATIO_LIMITS={min:e.CONSTANTS.INSULIN_TO_CARBS_RATIO_MIN,max:e.CONSTANTS.INSULIN_TO_CARBS_RATIO_MAX},i4.CURRENT_BGL_MMOL_LIMITS={min:e.CONSTANTS.GLUCOSE_INPUT_MIN_MMOLL,max:e.CONSTANTS.GLUCOSE_INPUT_MAX_MMOLL},i4.TARGET_BGL_MMOL_LIMITS={min:e.CONSTANTS.TARGET_GLUCOSE_MIN,max:e.CONSTANTS.TARGET_GLUCOSE_MAX},i4.ACTIVITY_TARGET_BGL_MMOL_LIMITS={min:e.CONSTANTS.ACTIVITY_TARGET_GLUCOSE_MIN,max:e.CONSTANTS.ACTIVITY_TARGET_GLUCOSE_MAX},i4.ACTIVITY_SETTINGS_INTERVAL_LIMITS={min:e.CONSTANTS.ACTIVITY_REDUCTION_MIN,max:e.CONSTANTS.ACTIVITY_REDUCTION_MAX},i4}var a4,o4={};function s4(){if(a4)return o4;a4=1,Object.defineProperty(o4,"__esModule",{value:!0}),o4.useLanguage=o4.LanguageProvider=o4.LanguageContext=void 0;var e=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=i(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&{}.hasOwnProperty.call(e,o)){var s=a?Object.getOwnPropertyDescriptor(e,o):null;s&&(s.get||s.set)?Object.defineProperty(r,o,s):r[o]=e[o]}return r.default=e,n&&n.set(e,r),r}(S()),t=Dj(),n=l();function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(i=function(e){return e?n:t})(e)}const r=o4.LanguageContext=(0,e.createContext)(void 0);o4.LanguageProvider=({children:i})=>{const{language:a,changeLanguage:o,t:s}=(0,t.useTranslation)(),l=e.default.useMemo(()=>({language:a,changeLanguage:o,t:s}),[a,o,s]);return(0,n.jsx)(r.Provider,{value:l,children:i})};return o4.useLanguage=()=>{const t=(0,e.useContext)(r);if(!t)throw new Error("useLanguage must be used within a LanguageProvider");return t},o4}var l4,u4={};function c4(){if(l4)return u4;l4=1,Object.defineProperty(u4,"__esModule",{value:!0}),u4.roundInsulinValue=u4.formatUnit=u4.displayedBGLValue=u4.createSequentialArrayInteger=u4.createSequentialArrayHalf=u4.createSequentialArrayDecimal=u4.convertBGLToMGDL=void 0;var e=NL();const{PenHalf:t,PenWhole:n,Pump:i}=e.InjectionMethod;u4.roundInsulinValue=(e,r)=>{const a={[n]:1,[t]:2,[i]:10}[r];return Math.round(e*a)/a};const r=t=>Math.round(t*e.CONSTANTS.MGDL_PER_MMOLL_BGL);u4.convertBGLToMGDL=r;u4.displayedBGLValue=(t,n)=>n===e.BloodGlucoseUnit.MMOL_L?t.toFixed(1):`${r(t)}`;u4.formatUnit=e=>`${e.substring(0,e.length-1)}${e.substring(e.length-1,e.length).toUpperCase()}`;u4.createSequentialArrayHalf=(e,t)=>Array.from({length:(t-e)/.5+1},(t,n)=>(e+.5*n).toFixed(1));u4.createSequentialArrayInteger=(e,t)=>Array.from({length:t-e+1},(t,n)=>(e+n).toString());return u4.createSequentialArrayDecimal=(e,t)=>Array.from({length:10*(t-e)+1},(t,n)=>(e+n/10).toFixed(1)),u4}var d4,h4,m4={};function p4(){if(d4)return m4;d4=1,Object.defineProperty(m4,"__esModule",{value:!0}),m4.default=void 0,function(e){e&&e.__esModule}(S());var e=JB,t=J3(),n=l();const i=e.StyleSheet.create({defaultText:{...t.FONTS.Poppins.regular_Base,color:t.COLORS.text}});return m4.default=function(t){return(0,n.jsx)(e.Text,{...t,style:[i.defaultText,t.style],children:t.children})},m4}function f4(){if(h4)return V3;h4=1,Object.defineProperty(V3,"__esModule",{value:!0}),V3.default=void 0;var e=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=m(t);if(n&&n.has(e))return n.get(e);var i={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&{}.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(i,a,o):i[a]=e[a]}return i.default=e,n&&n.set(e,i),i}(S()),t=JB,n=NL(),i=h(function(){if(K3)return H3;K3=1,Object.defineProperty(H3,"__esModule",{value:!0}),H3.default=void 0,function(e){e&&e.__esModule}(S());var e=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=i(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&{}.hasOwnProperty.call(e,o)){var s=a?Object.getOwnPropertyDescriptor(e,o):null;s&&(s.get||s.set)?Object.defineProperty(r,o,s):r[o]=e[o]}return r.default=e,n&&n.set(e,r),r}(z3),t=J3(),n=l();function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(i=function(e){return e?n:t})(e)}return H3.default=function(i){return(0,n.jsx)(e.default,{width:24,height:24,viewBox:"0 0 24 24",...i,children:(0,n.jsx)(e.Path,{d:"M7.668 13.77h0a1.375 1.375 0 00-.758 1.776c.642 1.638 2.097 3.053 4.194 3.297h0a1.36 1.36 0 001.503-1.207h0a1.368 1.368 0 00-1.193-1.517h0c-.962-.111-1.652-.743-1.98-1.582l-.448.176.447-.175a1.352 1.352 0 00-1.765-.768zM12 21.52c-3.177 0-5.476-1.785-6.648-4.133-1.18-2.361-1.197-5.247.157-7.405 2.079-3.033 5.034-5.346 6.234-6.216a.434.434 0 01.514 0c1.2.87 4.155 3.183 6.234 6.216 1.354 2.158 1.336 5.044.157 7.405-1.172 2.348-3.471 4.133-6.648 4.133z",fill:t.COLORS.iconSecondary,stroke:t.COLORS.iconSecondary,strokeWidth:.96})})},H3}()),r=h(function(){if(e4)return t4;e4=1,Object.defineProperty(t4,"__esModule",{value:!0}),t4.default=void 0,function(e){e&&e.__esModule}(S());var e=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=i(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&{}.hasOwnProperty.call(e,o)){var s=a?Object.getOwnPropertyDescriptor(e,o):null;s&&(s.get||s.set)?Object.defineProperty(r,o,s):r[o]=e[o]}return r.default=e,n&&n.set(e,r),r}(z3),t=J3(),n=l();function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(i=function(e){return e?n:t})(e)}return t4.default=function(i){return(0,n.jsxs)(e.default,{width:24,height:24,viewBox:"0 0 24 24",fill:"none",...i,children:[(0,n.jsx)(e.Mask,{id:"a",fill:t.COLORS.iconSecondary,children:(0,n.jsx)(e.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M17.862 4.741a2.493 2.493 0 01-2.49 2.489 2.492 2.492 0 01-2.49-2.489 2.492 2.492 0 012.49-2.491 2.493 2.493 0 012.49 2.491zm1.326 5.237c-1.271.056-2.72.02-3.824-.658-.385-.237-.744-.562-1.125-.907-.211-.191-.422-.382-.64-.562-2.246-1.865-5.681-1.71-7.818.353a1 1 0 101.388 1.439c1.056-1.018 2.637-1.326 3.974-.893-.818 1.14-1.496 2.52-1.013 4.322.225.84.699 1.452 1.118 1.99l.008.011c.404.524.724.94.777 1.469.105 1.04-.42 2.164-.928 3.249l-.253.547a1.002 1.002 0 00.91 1.413 1 1 0 00.912-.588l.243-.525v-.003c.593-1.267 1.265-2.704 1.106-4.292-.111-1.103-.685-1.845-1.19-2.5l-.004-.004c-.347-.447-.646-.834-.767-1.285-.267-.996.079-1.772.767-2.718l.028.024.039.035c.43.39.877.795 1.42 1.129 1.299.798 2.819.972 4.143.972.282 0 .556-.01.817-.02a1 1 0 00.955-1.043c-.024-.552-.511-.971-1.043-.955zm-10.37 4.539c-.533.289-1.12.567-1.81.654-.446.055-.915.052-1.404.046l-.162-.001c-.234-.001-.469-.003-.704.005a1 1 0 00.03 1.999h.029c.24-.008.482-.006.722-.004h.065c.536.007 1.093.01 1.672-.061 1.022-.127 1.845-.516 2.515-.88a1 1 0 00-.954-1.758z"})}),(0,n.jsx)(e.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M17.862 4.741a2.493 2.493 0 01-2.49 2.489 2.492 2.492 0 01-2.49-2.489 2.492 2.492 0 012.49-2.491 2.493 2.493 0 012.49 2.491zm1.326 5.237c-1.271.056-2.72.02-3.824-.658-.385-.237-.744-.562-1.125-.907-.211-.191-.422-.382-.64-.562-2.246-1.865-5.681-1.71-7.818.353a1 1 0 101.388 1.439c1.056-1.018 2.637-1.326 3.974-.893-.818 1.14-1.496 2.52-1.013 4.322.225.84.699 1.452 1.118 1.99l.008.011c.404.524.724.94.777 1.469.105 1.04-.42 2.164-.928 3.249l-.253.547a1.002 1.002 0 00.91 1.413 1 1 0 00.912-.588l.243-.525v-.003c.593-1.267 1.265-2.704 1.106-4.292-.111-1.103-.685-1.845-1.19-2.5l-.004-.004c-.347-.447-.646-.834-.767-1.285-.267-.996.079-1.772.767-2.718l.028.024.039.035c.43.39.877.795 1.42 1.129 1.299.798 2.819.972 4.143.972.282 0 .556-.01.817-.02a1 1 0 00.955-1.043c-.024-.552-.511-.971-1.043-.955zm-10.37 4.539c-.533.289-1.12.567-1.81.654-.446.055-.915.052-1.404.046l-.162-.001c-.234-.001-.469-.003-.704.005a1 1 0 00.03 1.999h.029c.24-.008.482-.006.722-.004h.065c.536.007 1.093.01 1.672-.061 1.022-.127 1.845-.516 2.515-.88a1 1 0 00-.954-1.758z",fill:t.COLORS.iconSecondary}),(0,n.jsx)(e.Path,{d:"M15.364 9.32l-.525.851h.001l.524-.851zm3.824.658l-.03-1h-.014l.044 1zm-4.95-1.565l.672-.742-.671.742zm-.64-.562l-.638.769.002.002.637-.771zm-7.817.353l.693.72h.001l-.694-.72zm-.026 1.414l-.72.693v.002l.72-.695zm1.414.025l-.694-.72h-.002l.696.72zm3.974-.893l.812.582.798-1.112-1.302-.422-.308.952zm-1.013 4.322l.965-.26-.965.26zm1.118 1.99l.791-.61-.002-.003-.79.614zm.008.011l-.792.61.792-.61zm.777 1.469l-.995.098v.002l.995-.1zm-.928 3.249l-.906-.424-.002.004.908.42zm-.253.547l-.908-.42-.004.008.912.412zm.499 1.324l-.413.91.004.002.409-.912zm1.323-.5l-.908-.42-.003.008.91.413zm.243-.524l-.906-.424-.002.004.908.42zm0-.003l-.905-.423.906.424zm1.106-4.292l-.995.1.995-.1zm-1.19-2.5l.79-.611-.79.611zm-.004-.004l.79-.612v-.002l-.79.614zm-.767-1.285l-.966.258.966-.258zm.767-2.718l.672-.74-.825-.75-.656.901.809.589zm.028.024l-.65.761.65-.76zm.039.035l-.69.723.008.009.01.008.672-.74zm1.42 1.129l.524-.852-.523.852zm4.96.952l.042.999h.001l-.043-1zm.955-1.043l-1 .043 1-.043zM7.008 15.17l.123.992h.003l-.126-.992zm1.81-.654l-.477-.88.476.88zm-3.214.7l.012-1h-.008l-.004 1zm-.162-.001l-.005 1 .005-1zm-.704.005l.03 1h.002l-.032-1zm-.97 1.028l1-.028v-.001l-1 .029zm1.029.97v1h.03l-.03-1zm.722-.003l-.008 1h.008v-1zm0 0l.008-1H5.52v1zm.065 0l.012-1h-.004l-.008 1zm1.672-.061l.124.992-.124-.992zm2.515-.88l.478.878-.478-.878zm.402-1.356l-.879.476.001.002.879-.478zm5.199-6.689a3.493 3.493 0 003.49-3.489h-2c0 .82-.67 1.489-1.49 1.489v2zm-3.49-3.489a3.492 3.492 0 003.49 3.489v-2c-.82 0-1.49-.669-1.49-1.489h-2zm3.49-3.491a3.492 3.492 0 00-3.49 3.491h2c0-.822.67-1.491 1.49-1.491v-2zm3.49 3.491a3.493 3.493 0 00-3.49-3.491v2c.82 0 1.49.669 1.49 1.491h2zm-4.022 5.43c1.392.856 3.126.861 4.392.806l-.088-1.998c-1.277.056-2.438-.008-3.257-.511l-1.047 1.704zm-1.273-1.017c.365.33.794.723 1.272 1.017l1.049-1.703c-.292-.18-.581-.437-.978-.797l-1.343 1.483zm-.605-.532c.197.163.392.338.606.532l1.342-1.483c-.208-.188-.436-.395-.675-.591l-1.273 1.542zm-6.487.301c1.78-1.718 4.642-1.833 6.485-.303l1.277-1.539c-2.649-2.2-6.657-2.003-9.15.403l1.388 1.44zm0 .001s-.001-.001 0 0v-.001l-.001.002-1.387-1.442a2 2 0 00-.053 2.828l1.441-1.387zm-.002 0h.002c0-.001 0 0 0 0h-.001v-.002l-1.438 1.391a2 2 0 002.828.048l-1.39-1.437zm4.978-1.126c-1.667-.54-3.64-.164-4.976 1.125l1.388 1.44c.774-.747 1.965-.988 2.971-.662l.617-1.903zm-.356 5.015c-.368-1.376.113-2.439.86-3.48L10.33 8.166c-.89 1.24-1.763 2.937-1.166 5.164l1.931-.518zm.942 1.636c-.426-.548-.775-1.015-.942-1.636l-1.931.517c.283 1.06.882 1.816 1.294 2.346l1.58-1.227zm.01.013l-.008-.01-1.583 1.221.008.01 1.583-1.22zm.98 1.98c-.086-.867-.62-1.514-.98-1.98l-1.583 1.222c.449.582.554.765.573.957l1.99-.198zm-1.017 3.773c.25-.532.534-1.138.737-1.75.204-.614.353-1.307.28-2.024l-1.99.201c.033.324-.028.713-.188 1.192-.16.481-.391.98-.65 1.533l1.811.848zm-.25.542l.252-.547-1.815-.84-.253.548 1.815.84zm.003-.006c.001 0 0 0 0 0v-.002 0l-1.823-.823a2.002 2.002 0 00.998 2.646l.825-1.821zm0 0h.001l-.005-.002-.817 1.825c.262.118.542.177.82.177v-2zm0 0v2a2 2 0 001.822-1.176l-1.822-.825zm.246-.533l-.243.525 1.815.84.243-.525-1.815-.84zm.002-.006v.002l1.812.847v-.002l-1.812-.847zm1.017-3.77c.128 1.272-.404 2.461-1.016 3.77l1.811.847c.574-1.226 1.386-2.911 1.195-4.817l-1.99.2zm-.987-1.987c.514.664.908 1.201.987 1.987l1.99-.2c-.143-1.418-.896-2.365-1.395-3.01l-1.582 1.223zm-.004-.005l.004.005 1.582-1.223-.003-.005-1.583 1.223zm-.941-1.637c.183.682.626 1.231.943 1.639l1.58-1.227c-.378-.486-.533-.71-.592-.93l-1.931.518zm.924-3.566c-.743 1.022-1.31 2.123-.924 3.566l1.931-.518c-.147-.55-.023-1.001.61-1.871L12.02 9.247zm1.486-.147a.403.403 0 00-.005-.004l-1.345 1.48.052.045L13.506 9.1zm.08.071c-.036-.034-.07-.063-.08-.071l-1.298 1.521.007.006.001.001-.01-.01 1.38-1.447zm1.254 1c-.453-.278-.834-.62-1.272-1.017l-1.344 1.481c.423.384.934.85 1.57 1.24l1.046-1.704zm3.619.825c-1.259 0-2.556-.17-3.619-.824l-1.047 1.704c1.533.942 3.276 1.12 4.666 1.12v-2zm.774-.02c-.255.011-.513.02-.774.02v2c.302 0 .592-.01.859-.021l-.085-1.998zm-.001 0l.087 1.999a2 2 0 001.91-2.086l-1.997.087zm-.014.001c-.003 0-.003 0 0 .001a.045.045 0 01.014.008c.004.004.004.006.003.003a.044.044 0 01-.003-.013l1.998-.087c-.05-1.13-1.026-1.942-2.073-1.91l.06 1.998zM7.134 16.163c.88-.111 1.602-.464 2.16-.768l-.954-1.757c-.505.274-.957.478-1.457.54l.25 1.985zm-1.543.053c.482.006 1.017.012 1.54-.053l-.245-1.985c-.369.046-.772.045-1.27.039l-.025 2zm-.153 0h.16l.01-2h-.16l-.01 2zm-.668.004c.213-.006.43-.005.667-.004l.01-2c-.23-.001-.483-.003-.74.005l.063 2zm-.002 0l-.058-1.999a2 2 0 00-1.941 2.057l2-.058zm0 0c-.002 0 0 0 0 0-.001-.001-.001-.001 0 0v.001c0 .001 0 .001 0 0l-2 .055a2 2 0 002 1.944v-2zm.029 0h-.03v2h.03v-2zm.73-.004c-.237-.002-.497-.004-.76.004l.06 2c.219-.008.44-.006.684-.004l.016-2zm-.008 0v2-2zm.073 0h-.065l-.015 2h.065l.015-2zm1.541-.054c-.504.063-.997.06-1.537.055l-.023 2c.532.006 1.151.011 1.807-.07l-.247-1.985zm2.161-.766c-.631.343-1.324.662-2.16.766l.246 1.985c1.207-.15 2.16-.609 2.869-.994l-.955-1.757zm.001 0c0 .002 0 .002 0 0v-.001c0-.001 0-.001 0 0v.001h-.002l.957 1.757a2 2 0 00.802-2.712l-1.757.956zm0 0l1.758-.954a2.001 2.001 0 00-2.712-.805l.953 1.759z",fill:t.COLORS.iconSecondary,mask:"url(#a)"})]})},t4}()),a=r4(),o=s4(),s=J3(),u=c4(),c=h(p4()),d=l();function h(e){return e&&e.__esModule?e:{default:e}}function m(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(m=function(e){return e?n:t})(e)}const p=t.StyleSheet.create({container:{gap:16,flexWrap:"wrap"},text:{...s.FONTS.Poppins.regular_SM,color:s.COLORS.textSecondary,flex:1},row:{flexDirection:"row",gap:8},icon:{alignSelf:"center"}});return V3.default=function({currentBGL:s,hasActivity:l,glucoseUnit:h}){const{t:m}=(0,o.useLanguage)(),f=(0,e.useMemo)(()=>n.CONSTANTS.LEVEL_TWO_HYPOGLYCEMIA_MIN<=s&&s<n.CONSTANTS.LEVEL_TWO_HYPOGLYCEMIA_MAX?m("recommendation_suggestions_remeasure_very_low"):n.CONSTANTS.LEVEL_ONE_HYPOGLYCEMIA_MIN<=s&&s<n.CONSTANTS.LEVEL_ONE_HYPOGLYCEMIA_MAX?m("recommendation_suggestions_remeasure_low"):n.CONSTANTS.SEVERE_HYPOGLYCEMIA_MIN<=s&&s<=n.CONSTANTS.SEVERE_HYPERGLYCEMIA_MAX?m("recommendation_suggestions_measure_ketone"):null,[s,m]),g=(0,e.useMemo)(()=>{if(n.CONSTANTS.LOW_GLUCOSE_MESSAGE_ACTIVITY_MIN<=s&&s<=n.CONSTANTS.LOW_GLUCOSE_MESSAGE_ACTIVITY_MAX){const e=(0,u.formatUnit)(h),t=h===n.BloodGlucoseUnit.MG_DL?(0,u.convertBGLToMGDL)(a.ACTIVITY_POSTPONE_GLUCOSE).toString():a.ACTIVITY_POSTPONE_GLUCOSE.toString();return m("recommendation_suggestions_postpone_activity",{displayUnit:e,value:t})}return n.CONSTANTS.HIGH_GLUCOSE_MESSAGE_ACTIVITY_MIN<=s&&s<=n.CONSTANTS.HIGH_GLUCOSE_MESSAGE_ACTIVITY_MAX?m("recommendation_suggestions_reduce_intensity"):null},[s,h,m]);return(0,d.jsxs)(t.View,{style:p.container,children:[f&&(0,d.jsxs)(t.View,{style:p.row,children:[(0,d.jsx)(i.default,{style:p.icon,testID:"blood-icon"}),(0,d.jsx)(c.default,{style:p.text,testID:"blood-glucose-message",children:f})]}),l&&g&&(0,d.jsxs)(t.View,{style:p.row,children:[(0,d.jsx)(r.default,{style:p.icon,testID:"run-icon"}),(0,d.jsx)(c.default,{style:p.text,testID:"activity-message",children:g})]})]})},V3}var g4,_4={},v4={};var y4,b4={};function w4(){if(y4)return b4;y4=1,Object.defineProperty(b4,"__esModule",{value:!0}),b4.default=void 0,function(e){e&&e.__esModule}(S());var e=z3,t=J3(),n=l();return b4.default=i=>(0,n.jsxs)(e.Svg,{width:24,height:25,viewBox:"0 0 24 25",fill:"none",...i,children:[(0,n.jsx)(e.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M3.99312 4.2711C4.97691 3.21491 6.37794 2.62354 8.03206 2.62354H11.6091C12.0233 2.62354 12.3591 2.95933 12.3591 3.37354C12.3591 3.78775 12.0233 4.12354 11.6091 4.12354H8.03206C6.75004 4.12354 5.76199 4.57281 5.09074 5.29347C4.414 6.02002 4.00391 7.08289 4.00391 8.39968V16.3464C4.00391 17.6647 4.4124 18.7277 5.08783 19.4539C5.75756 20.1739 6.74517 20.6235 8.03206 20.6235H16.467C17.7555 20.6235 18.7433 20.1738 19.4128 19.4539C20.088 18.7278 20.4961 17.6649 20.4961 16.3464V12.7654C20.4961 12.3512 20.8319 12.0154 21.2461 12.0154C21.6603 12.0154 21.9961 12.3512 21.9961 12.7654V16.3464C21.9961 17.9738 21.4886 19.4244 20.5112 20.4754C19.5281 21.5326 18.1263 22.1235 16.467 22.1235H8.03206C6.37405 22.1235 4.97259 21.5324 3.98947 20.4754C3.01204 19.4245 2.50391 17.974 2.50391 16.3464V8.39968C2.50391 6.77158 3.01482 5.32139 3.99312 4.2711Z",fill:i?.color??t.COLORS.iconBrand}),(0,n.jsx)(e.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M17.4779 4.79025L11.947 10.8273C11.6292 11.1844 11.4306 11.6319 11.3786 12.1085L11.2367 13.4178C11.1888 13.8615 11.5777 14.2282 12.0174 14.1548C12.0173 14.1548 12.0175 14.1547 12.0174 14.1548L13.2872 13.9418C13.8024 13.8552 14.2724 13.5962 14.6197 13.2079L14.6257 13.2012L20.1012 7.2259L20.1038 7.2231C20.4768 6.82017 20.4526 6.1918 20.0494 5.81853L18.8817 4.73742C18.8817 4.73738 18.8818 4.73746 18.8817 4.73742C18.4788 4.36513 17.8501 4.38948 17.4779 4.79025ZM16.376 3.77252C17.311 2.76233 18.8891 2.70159 19.8999 3.63592L21.0684 4.71777C21.0683 4.71776 21.0684 4.71779 21.0684 4.71777C22.0786 5.65306 22.1405 7.22926 21.206 8.24047C21.2055 8.24101 21.205 8.24155 21.2045 8.24209L15.7346 14.2114C15.1602 14.8521 14.3846 15.2784 13.5359 15.4211L12.2655 15.6341C10.8457 15.8717 9.59091 14.6883 9.74532 13.2569L9.88736 11.9465C9.97332 11.1584 10.3028 10.4163 10.8313 9.82475L10.8376 9.81777L16.3734 3.77534L16.376 3.77252Z",fill:i?.color??t.COLORS.iconBrand})]}),b4}var S4={},k4={};const C4=i(te);var E4,x4={};var I4,T4,O4,R4={},A4={};function L4(){if(T4)return R4;T4=1,Object.defineProperty(R4,"__esModule",{value:!0}),R4.default=void 0,function(e){e&&e.__esModule}(S());var e=JB,t=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=r(t);if(n&&n.has(e))return n.get(e);var i={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&{}.hasOwnProperty.call(e,o)){var s=a?Object.getOwnPropertyDescriptor(e,o):null;s&&(s.get||s.set)?Object.defineProperty(i,o,s):i[o]=e[o]}return i.default=e,n&&n.set(e,i),i}(function(){if(I4)return A4;I4=1,Object.defineProperty(A4,"__esModule",{value:!0}),A4.default=A4.CheckmarkGradientHeight=void 0,function(e){e&&e.__esModule}(S());var e=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=i(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&{}.hasOwnProperty.call(e,o)){var s=a?Object.getOwnPropertyDescriptor(e,o):null;s&&(s.get||s.set)?Object.defineProperty(r,o,s):r[o]=e[o]}return r.default=e,n&&n.set(e,r),r}(z3),t=J3(),n=l();function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(i=function(e){return e?n:t})(e)}const r=A4.CheckmarkGradientHeight=140;return A4.default=function(i){return(0,n.jsxs)(e.default,{width:141,height:r,viewBox:"0 0 141 140",fill:"none",...i,children:[(0,n.jsx)(e.Path,{d:"M129.8 70.15c0 32.668-26.482 59.15-59.15 59.15S11.5 102.818 11.5 70.15 37.982 11 70.65 11s59.15 26.482 59.15 59.15z",fill:"url(#paint0_linear_24773_68288)"}),(0,n.jsx)(e.Path,{d:"M45.5 72.791l14.955 13.572a1 1 0 001.375-.03L95.5 53",stroke:t.COLORS.bgBackground,strokeWidth:8,strokeLinecap:"round"}),(0,n.jsx)(e.Defs,{children:(0,n.jsxs)(e.LinearGradient,{id:"paint0_linear_24773_68288",x1:11.5,y1:11,x2:145.478,y2:32.7577,gradientUnits:"userSpaceOnUse",children:[(0,n.jsx)(e.Stop,{stopColor:"#A200FF"}),(0,n.jsx)(e.Stop,{offset:1e-4,stopColor:"#A200FF"}),(0,n.jsx)(e.Stop,{offset:1,stopColor:"#FF8600"})]})})]})},A4}()),n=J3(),i=l();function r(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(r=function(e){return e?n:t})(e)}const a=e.StyleSheet.create({container:{position:"absolute",top:0,left:0,right:0,bottom:0},checkmarkContainer:{flex:1,flexGrow:1,alignItems:"center",backgroundColor:n.COLORS.bgBackground}});return R4.default=()=>{const{height:n}=(0,e.useWindowDimensions)();return(0,i.jsx)(e.View,{style:a.container,testID:"backdrop-checkmark",children:(0,i.jsx)(e.View,{style:a.checkmarkContainer,children:(0,i.jsx)(t.default,{style:{marginTop:n/2-t.CheckmarkGradientHeight,opacity:.6},testID:"timeout-modal-checkmark"})})})},R4}function P4(){if(O4)return k4;O4=1,Object.defineProperty(k4,"__esModule",{value:!0}),k4.default=void 0;var e=C4,t=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=c(t);if(n&&n.has(e))return n.get(e);var i={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&{}.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(i,a,o):i[a]=e[a]}return i.default=e,n&&n.set(e,i),i}(S()),n=JB,i=j3,r=J3(),a=u(function(){if(E4)return x4;E4=1,Object.defineProperty(x4,"__esModule",{value:!0}),x4.default=void 0,function(e){e&&e.__esModule}(S());var e=JB,t=J3(),n=l();const i=e.StyleSheet.create({container:{backgroundColor:t.COLORS.borderOverlay,position:"absolute",top:0,left:0,right:0,bottom:0}});return x4.default=()=>(0,n.jsx)(e.View,{style:i.container,testID:"backdrop"}),x4}()),o=u(L4()),s=l();function u(e){return e&&e.__esModule?e:{default:e}}function c(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(c=function(e){return e?n:t})(e)}const d=Math.ceil(n.Dimensions.get("screen").height/100*85);function h({testID:r,isVisible:l,onModalHide:u,onModalShow:c,containerStyle:h,children:p,checkmark:f}){const{bottom:g}=(0,i.useSafeAreaInsets)(),[_,v]=(0,t.useState)(0),[y,b]=(0,t.useState)(!1),w=(0,t.useRef)(new n.Animated.Value(d)).current,S=(0,t.useCallback)(()=>{n.Animated.timing(w,{toValue:0,duration:300,easing:n.Easing.out(n.Easing.cubic),useNativeDriver:"web"!==n.Platform.OS}).start(({finished:e})=>{e&&c&&c()})},[w,c]),k=(0,t.useCallback)(()=>{n.Animated.timing(w,{toValue:_,duration:300,easing:n.Easing.out(n.Easing.cubic),useNativeDriver:"web"!==n.Platform.OS}).start(({finished:e})=>{e&&(b(!1),u&&u())})},[w,_,u]);(0,t.useEffect)(()=>{if(y!==l)return!y&&l?(b(!0),S()):void(y&&!l&&k())},[l,S,k,y]);const C=(0,t.useCallback)(e=>{v(e.nativeEvent.layout.height+g)},[g]);return y?(0,s.jsx)(e.Portal,{children:(0,s.jsxs)(n.View,{style:m.overlay,children:[f?(0,s.jsx)(o.default,{}):(0,s.jsx)(a.default,{}),(0,s.jsx)(n.Animated.View,{testID:r,onLayout:C,style:[m.modal,{transform:[{translateY:w}]},{paddingBottom:g+16},h],children:p})]})}):null}const m=n.StyleSheet.create({modal:{width:"100%",maxHeight:"85%",paddingTop:32,paddingBottom:16,paddingHorizontal:16,borderTopRightRadius:20,borderTopLeftRadius:20,backgroundColor:r.COLORS.bgModal},backdrop:{position:"absolute",left:0,right:0,top:0,bottom:0},overlay:{...n.StyleSheet.absoluteFillObject,backgroundColor:r.COLORS.bgTransparent,justifyContent:"flex-end"}});return k4.default=t.default.memo(h),k4}var M4,D4={},N4={};var F4,B4,j4,V4,H4={};function z4(){if(B4)return D4;B4=1,Object.defineProperty(D4,"__esModule",{value:!0}),D4.default=void 0;var e=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=u(t);if(n&&n.has(e))return n.get(e);var i={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&{}.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(i,a,o):i[a]=e[a]}return i.default=e,n&&n.set(e,i),i}(S()),t=JB,n=s(tj()),i=function(){if(M4)return N4;M4=1,Object.defineProperty(N4,"__esModule",{value:!0}),N4.useDebouncedCallback=function(t,n){const i=(0,e.useRef)(null),r=(0,e.useRef)(t);return(0,e.useEffect)(()=>{r.current=t},[t]),(0,e.useCallback)((...e)=>{i.current&&clearTimeout(i.current),i.current=setTimeout(()=>{r.current(...e)},n)},[n])};var e=S();return N4}(),r=J3(),a=s(function(){if(F4)return H4;F4=1,Object.defineProperty(H4,"__esModule",{value:!0}),H4.default=void 0;var e=function(e){return e&&e.__esModule?e:{default:e}}(S()),t=JB,n=J3(),i=l();function r({type:e,height:n,option:r,index:o,onItemPress:s}){return(0,i.jsx)(t.Pressable,{onPress:s,testID:`${e}-wheel-picker-item-`+o,children:(0,i.jsx)(t.Animated.View,{style:[a.option,{height:n}],children:(0,i.jsx)(t.Text,{style:a.itemTextStyle,children:r})})})}H4.default=e.default.memo(r);const a=t.StyleSheet.create({option:{alignItems:"center",justifyContent:"center",zIndex:100},itemTextStyle:{fontSize:22,lineHeight:26,fontWeight:"400",color:n.COLORS.text}});return H4}()),o=l();function s(e){return e&&e.__esModule?e:{default:e}}function u(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(u=function(e){return e?n:t})(e)}D4.default=function({type:s,initialScrollIndex:l,selectedIndex:u,options:d,onChange:h,visibleRest:m=3,decelerationRate:p="normal"}){const{width:f}=(0,t.useWindowDimensions)(),g=35,_=g*m,v=(0,e.useRef)(null),y=(0,e.useMemo)(()=>new t.Animated.Value(0),[]),b=(1+2*m)*g,w=(0,e.useMemo)(()=>{const e=[...d];for(let t=0;t<m;t++)e.unshift(null),e.push(null);return e},[d,m]),S=(0,e.useMemo)(()=>[...Array(w.length)].map((e,t)=>t*g),[w,g]),k=(0,e.useCallback)(e=>{const t=Math.min(g*(d.length-1),Math.max(e.nativeEvent.contentOffset.y,0));let n=Math.floor(Math.floor(t)/g);Math.floor(t%g)>17.5&&n++,n!==u&&h(n)},[d.length,u,h]),C=(0,e.useCallback)(e=>{const t=Math.round(Math.round(e.nativeEvent.contentOffset.y)/g),n=Math.min(d.length-1,Math.max(t,0));n!==u&&h(n),v.current?.scrollToIndex({index:n,animated:!0})},[h,u,d.length]),E=(0,i.useDebouncedCallback)(C,100),x=(0,e.useCallback)(e=>{h(e),v.current?.scrollToIndex({index:e,animated:!0})},[h]);return(0,o.jsxs)(t.View,{style:[c.containerPicker,{height:b}],testID:`${s}-wheel-picker`,children:[(0,o.jsx)(t.View,{style:[c.selectedIndicator,{transform:[{translateY:-17.5}],height:g,width:f-32-20}]}),(0,o.jsx)(t.Animated.FlatList,{testID:`${s}-wheel-picker-list`,ref:v,style:c.scrollView,showsVerticalScrollIndicator:!1,onScroll:t.Animated.event([{nativeEvent:{contentOffset:{y:y}}}],{useNativeDriver:"web"!==t.Platform.OS,listener:"web"===t.Platform.OS?E:void 0}),onMomentumScrollEnd:k,snapToInterval:g,snapToOffsets:S,decelerationRate:p,initialScrollIndex:l,getItemLayout:(e,t)=>({length:g,offset:g*t,index:t}),data:w,keyExtractor:(e,t)=>t.toString(),renderItem:({item:e,index:t})=>(0,o.jsx)(a.default,{type:s,index:t,option:e,height:g,onItemPress:()=>x(Math.max(0,Math.min(t-m,d.length-1)))},e)}),(0,o.jsx)(n.default,{colors:[r.COLORS.iosBg2,r.COLORS.dropshadow100],style:[c.mask,{top:0,height:_}]}),(0,o.jsx)(n.default,{colors:[r.COLORS.dropshadow100,r.COLORS.iosBg2],style:[c.mask,{bottom:0,height:_}]})]})};const c=t.StyleSheet.create({containerPicker:{borderTopLeftRadius:13,borderTopRightRadius:13,backgroundColor:r.COLORS.iosBg2,overflow:"hidden"},selectedIndicator:{position:"absolute",backgroundColor:r.COLORS.iosHighlight,borderRadius:7,top:"50%",alignSelf:"center"},scrollView:{overflow:"hidden",flex:1},mask:{position:"absolute",left:0,right:0,pointerEvents:"none"}});return D4}function U4(){if(j4)return S4;j4=1,Object.defineProperty(S4,"__esModule",{value:!0}),S4.default=void 0;var e=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=c(t);if(n&&n.has(e))return n.get(e);var i={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&{}.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(i,a,o):i[a]=e[a]}return i.default=e,n&&n.set(e,i),i}(S()),t=JB,n=s4(),i=J3(),r=u(P4()),a=u(p4()),o=u(z4()),s=l();function u(e){return e&&e.__esModule?e:{default:e}}function c(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(c=function(e){return e?n:t})(e)}const d=i=>{const{isVisible:l,items:u,initialScrollIndex:c,type:d,onCancel:m,onConfirm:p,onDismiss:f}=i,{t:g}=(0,n.useLanguage)(),[_,v]=(0,e.useState)(c),y=(0,e.useCallback)(e=>{v(e)},[]),b=(0,e.useCallback)(()=>{p(parseFloat(u[_]))},[u,_,p]),w=(0,e.useCallback)(()=>{v(c),m()},[c,m]);return(0,s.jsx)(r.default,{isVisible:l,onModalHide:f,containerStyle:h.contentContainerModal,children:(0,s.jsxs)(t.View,{testID:`${d}-wheelpicker-modal`,children:[(0,s.jsx)(o.default,{type:d,selectedIndex:_,initialScrollIndex:c,options:u,onChange:y}),(0,s.jsxs)(t.View,{style:h.buttonContainer,children:[(0,s.jsx)(t.Pressable,{style:h.confirmButton,children:(0,s.jsx)(t.TouchableOpacity,{onPress:b,testID:`${d}-wheel-picker-modal-confirm-button`,accessibilityRole:"button",children:(0,s.jsx)(a.default,{style:h.buttonText,children:g("button_confirm")})})}),(0,s.jsx)(t.Pressable,{style:h.cancelButton,children:(0,s.jsx)(t.TouchableOpacity,{onPress:w,testID:`${d}-wheel-picker-modal-cancel-button`,accessibilityRole:"button",children:(0,s.jsx)(a.default,{style:h.cancelText,children:g("button_cancel")})})})]})]})})};S4.default=(0,e.memo)(d);const h=t.StyleSheet.create({buttonContainer:{gap:8},contentContainerModal:{backgroundColor:i.COLORS.bgTransparent},buttonText:{fontSize:17,lineHeight:22,fontWeight:"400",paddingHorizontal:16,paddingVertical:14,textAlign:"center",color:i.COLORS.textKeyboardButtons},cancelButton:{backgroundColor:i.COLORS.iosBg2,borderRadius:13},cancelText:{fontSize:17,lineHeight:22,fontWeight:"600",paddingHorizontal:16,paddingVertical:14,textAlign:"center",color:i.COLORS.textKeyboardButtons},confirmButton:{backgroundColor:i.COLORS.iosBg2,borderBottomLeftRadius:13,borderBottomRightRadius:13}});return S4}function G4(){if(V4)return _4;V4=1,Object.defineProperty(_4,"__esModule",{value:!0}),_4.default=void 0;var e=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=p(t);if(n&&n.has(e))return n.get(e);var i={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&{}.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(i,a,o):i[a]=e[a]}return i.default=e,n&&n.set(e,i),i}(S()),t=JB,n=m(tj()),i=m(function(){if(g4)return v4;g4=1,Object.defineProperty(v4,"__esModule",{value:!0}),v4.default=void 0,function(e){e&&e.__esModule}(S());var e=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=i(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&{}.hasOwnProperty.call(e,o)){var s=a?Object.getOwnPropertyDescriptor(e,o):null;s&&(s.get||s.set)?Object.defineProperty(r,o,s):r[o]=e[o]}return r.default=e,n&&n.set(e,r),r}(z3),t=J3(),n=l();function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(i=function(e){return e?n:t})(e)}return v4.default=function(i){return(0,n.jsx)(e.default,{width:42,height:42,viewBox:"0 0 42 42",fill:"none",...i,children:(0,n.jsx)(e.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M14.075 5.202a1.313 1.313 0 011.539-1.04c2.41.468 4.109 1.686 5.178 3.328.874 1.34 1.283 2.895 1.394 4.422a15.383 15.383 0 002.662-.475c1.134-.306 3.85-.727 6.424.425 2.686 1.202 4.946 3.988 5.289 9.548a.988.988 0 01.002.051c.043 5.242-1.626 9.2-3.54 11.88-.955 1.336-1.972 2.359-2.874 3.067a8.58 8.58 0 01-1.27.842c-.347.183-.72.336-1.074.389-1.64.386-3.142.11-4.34-.222-.369-.102-.751-.222-1.087-.327-.188-.06-.361-.114-.509-.158-.473-.141-.768-.202-.961-.202-.203 0-.504.059-.972.19-.152.043-.336.098-.535.158-.328.097-.7.208-1.049.301-1.194.317-2.684.588-4.327.262-.359-.052-.74-.209-1.097-.398-.39-.206-.82-.49-1.271-.844-.903-.709-1.92-1.73-2.873-3.066-1.911-2.678-3.575-6.63-3.533-11.872 0-.017 0-.034.002-.051.343-5.56 2.603-8.346 5.29-9.548 2.574-1.152 5.29-.731 6.423-.425.863.232 1.725.388 2.586.468-.106-1.119-.415-2.148-.96-2.982-.663-1.02-1.735-1.845-3.478-2.183a1.312 1.312 0 01-1.039-1.538zm.98 12.966a1.313 1.313 0 00-1.126-2.371c-1.911.908-3.296 2.796-3.584 4.894a1.312 1.312 0 102.6.358 3.85 3.85 0 012.11-2.881z",fill:t.COLORS.iconOnBrand})})},v4}()),r=m(w4()),a=r4(),o=s4(),s=J3(),u=c4(),c=m(p4()),d=m(U4()),h=l();function m(e){return e&&e.__esModule?e:{default:e}}function p(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(p=function(e){return e?n:t})(e)}const f=(0,u.createSequentialArrayInteger)(a.CARBOHYDRATES_LIMITS.min,a.CARBOHYDRATES_LIMITS.max);_4.default=function({carbsRecommendation:a,editedCarbsRecommendation:l,onDismiss:u,onConfirm:m}){const{t:p}=(0,o.useLanguage)(),[_,v]=(0,e.useState)(!1),y=(0,e.useCallback)(()=>{v(!1)},[]),b=(0,e.useCallback)(()=>{v(!0)},[]),w=(0,e.useCallback)(e=>{v(!1),m(e)},[m]),S=(0,e.useCallback)(()=>{if(null!==l)return f.findIndex(e=>e===l.toString());const e=Math.round(a);return f.findIndex(t=>t===e.toString())},[l,a]);return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(n.default,{colors:s.COLORS.gradientRecCarbohydrates,useAngle:!0,angle:270,style:g.card,testID:"carbs-recommendation-display",children:(0,h.jsxs)(t.View,{style:g.row,children:[(0,h.jsx)(i.default,{}),(0,h.jsxs)(t.View,{style:g.body,children:[(0,h.jsxs)(t.View,{style:g.valueRow,children:[(0,h.jsx)(c.default,{style:g.label,children:p("recommendation_carb_eat")}),null!==l?(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(c.default,{style:g.valueEdited,children:` ${a} g`}),(0,h.jsx)(c.default,{style:g.valueBold,children:` ${l} g`})]}):(0,h.jsx)(c.default,{style:g.valueBold,children:` ${a} g`})]}),(0,h.jsx)(c.default,{style:g.subtitle,children:p("recommendation_carb_title")})]}),(0,h.jsx)(t.TouchableOpacity,{onPress:b,testID:"carbohydrates-edit-button",hitSlop:10,style:g.editButton,children:(0,h.jsx)(r.default,{style:g.editIcon,color:s.COLORS.iconOnToast})})]})}),(0,h.jsx)(d.default,{type:"carbohydrates",items:f,isVisible:_,initialScrollIndex:S(),onConfirm:w,onCancel:y,onDismiss:u})]})};const g=t.StyleSheet.create({card:{borderRadius:16,marginBottom:32},row:{flexDirection:"row",justifyContent:"center",alignItems:"center",padding:24,gap:12},body:{flex:1},valueRow:{flexDirection:"row",alignItems:"center"},label:{...s.FONTS.Poppins.medium_LG,color:s.COLORS.textOnRecommendation},valueBold:{...s.FONTS.Poppins.bold_LG,color:s.COLORS.textOnRecommendation},subtitle:{...s.FONTS.Poppins.medium_SM,color:s.COLORS.textOnRecommendation,lineHeight:23},valueEdited:{...s.FONTS.Poppins.medium_Base,textDecorationLine:"line-through",opacity:.4},editIcon:{marginLeft:4},editButton:{alignSelf:"flex-start"}});return _4}var W4,Y4={};var $4,X4={},q4={};var Z4,K4={};var Q4,J4,e9={};function t9(){if(J4)return X4;J4=1,Object.defineProperty(X4,"__esModule",{value:!0}),X4.styles=X4.default=void 0;var e=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=h(t);if(n&&n.has(e))return n.get(e);var i={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&{}.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(i,a,o):i[a]=e[a]}return i.default=e,n&&n.set(e,i),i}(S()),t=JB,n=d(function(){if($4)return q4;$4=1,Object.defineProperty(q4,"__esModule",{value:!0}),q4.default=void 0,function(e){e&&e.__esModule}(S());var e=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=i(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&{}.hasOwnProperty.call(e,o)){var s=a?Object.getOwnPropertyDescriptor(e,o):null;s&&(s.get||s.set)?Object.defineProperty(r,o,s):r[o]=e[o]}return r.default=e,n&&n.set(e,r),r}(z3),t=J3(),n=l();function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(i=function(e){return e?n:t})(e)}return q4.default=function(i){return(0,n.jsx)(e.default,{width:21,height:20,viewBox:"0 0 21 20",...i,children:(0,n.jsx)(e.Path,{d:"M4.022 6.839a.692.692 0 01.84-.057l.073.057 5.565 5.074 5.565-5.074a.693.693 0 01.84-.057l.073.057a.55.55 0 01.062.766l-.062.066-6.022 5.49a.692.692 0 01-.84.057l-.072-.057-6.022-5.49a.552.552 0 010-.832z",fill:t.COLORS.iconBrand})})},q4}()),i=d(function(){if(Z4)return K4;Z4=1,Object.defineProperty(K4,"__esModule",{value:!0}),K4.default=void 0,function(e){e&&e.__esModule}(S());var e=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=i(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&{}.hasOwnProperty.call(e,o)){var s=a?Object.getOwnPropertyDescriptor(e,o):null;s&&(s.get||s.set)?Object.defineProperty(r,o,s):r[o]=e[o]}return r.default=e,n&&n.set(e,r),r}(z3),t=J3(),n=l();function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(i=function(e){return e?n:t})(e)}return K4.default=function(i){return(0,n.jsx)(e.default,{width:21,height:20,viewBox:"0 0 21 20",fill:"none",...i,children:(0,n.jsx)(e.Path,{d:"M16.984 13.15a.625.625 0 01-.814.061l-.07-.06-5.392-5.392-5.391 5.391a.625.625 0 01-.814.061l-.07-.06a.625.625 0 01-.06-.814l.06-.07 5.834-5.834a.625.625 0 01.813-.06l.07.06 5.834 5.834a.625.625 0 010 .883z",fill:t.COLORS.iconBrand})})},K4}()),r=s4(),a=J3(),o=c4(),s=d(p4()),u=d(function(){if(Q4)return e9;Q4=1,Object.defineProperty(e9,"__esModule",{value:!0}),e9.styles=e9.default=void 0,r(S());var e=JB,t=J3(),n=r(p4()),i=l();function r(e){return e&&e.__esModule?e:{default:e}}e9.default=function({title:t,value:r,unit:o,hasSeparator:s,testID:l}){return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(e.View,{style:a.itemContainer,testID:l,children:[(0,i.jsx)(e.View,{style:a.itemTitleContainer,children:(0,i.jsx)(n.default,{style:a.itemText,testID:l+"-title",children:t})}),(0,i.jsxs)(e.View,{style:a.row,children:[(0,i.jsx)(n.default,{style:a.itemText,testID:l+"-value",children:r}),!!o&&(0,i.jsx)(e.View,{style:a.row,children:(0,i.jsx)(n.default,{style:a.itemText,testID:l+"-unit",children:" "+o})})]})]}),s&&(0,i.jsx)(e.View,{style:a.divider,testID:l+"-divider"})]})};const a=e9.styles=e.StyleSheet.create({itemContainer:{flex:1,flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingVertical:14,paddingHorizontal:16,gap:8},itemTitleContainer:{alignSelf:"flex-start"},itemText:{...t.FONTS.Poppins.regular_Base,color:t.COLORS.textSecondary,textAlign:"right"},divider:{height:1,backgroundColor:t.COLORS.borderDivider},row:{flexDirection:"row",flexShrink:1,justifyContent:"flex-end"}});return e9}()),c=l();function d(e){return e&&e.__esModule?e:{default:e}}function h(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(h=function(e){return e?n:t})(e)}X4.default=function({carbIntakeValue:a,activeInsulin:l,currentBGL:d,bloodGlucoseUnit:h,activity:p,trackExpandDetails:f}){const{t:g}=(0,r.useLanguage)(),[_,v]=(0,e.useState)(!1),y=(0,e.useMemo)(()=>({light:g("activity_intensity_1"),moderate:g("activity_intensity_2"),hard:g("activity_intensity_3")}),[g]),b=(0,e.useCallback)(()=>{t.LayoutAnimation.configureNext(t.LayoutAnimation.Presets.easeInEaseOut),v(e=>{const t=!e;return t&&f(),t})},[f]),w=(0,e.useMemo)(()=>{if(!p)return"";const{activityDuration:e,activityIntensity:t,activityReduction:n}=p,i=n?Math.round(100*n):0;return`${e>=0&&e<=29?"0-29 min":e>29&&e<=45?"30-45 min":"46-60 min"}. ${t?`${y[t]},`:""} ${`${i}% ${g("recommendation_reduction")}`}`},[y,p,g]),S=(0,e.useMemo)(()=>[{title:g("recommendation_summary_active_insulin_title"),value:l,unit:g(1===l?"unit":"units"),testID:"active-insulin-item"},{title:g("Glucose"),value:(0,o.displayedBGLValue)(d,h),unit:(0,o.formatUnit)(h),testID:"blood-glucose-item"},{title:g("recommendation_carbohydrates_title"),value:a||"-",unit:a?g(1===a?"gram":"grams"):void 0,testID:"carbs-item"},void 0!==p&&{title:g("recommendation_activity_title"),value:w,testID:"activity-item"}].filter(e=>e),[g,l,d,h,a,p,w]);return(0,c.jsxs)(t.View,{style:m.container,children:[(0,c.jsxs)(t.TouchableOpacity,{style:m.clickableContainer,onPress:b,hitSlop:10,children:[(0,c.jsx)(s.default,{style:m.title,children:g("recommendation_card_cal_details_title")}),(0,c.jsx)(t.View,{style:m.expandButton,testID:"chevron-"+_,children:_?(0,c.jsx)(i.default,{style:m.chevron}):(0,c.jsx)(n.default,{style:m.chevron})})]}),_&&(0,c.jsx)(t.View,{children:S.map(({title:e,unit:t,value:n,testID:i},r,a)=>(0,c.jsx)(u.default,{testID:i,title:e,value:n,unit:t,hasSeparator:r!==a.length-1},e))})]})};const m=X4.styles=t.StyleSheet.create({container:{padding:16,gap:16},clickableContainer:{flexDirection:"row",justifyContent:"center"},expandButton:{justifyContent:"center",alignItems:"center"},chevron:{alignSelf:"center",marginLeft:4},title:{...a.FONTS.Poppins.regular_SM,color:a.COLORS.textSecondary,textAlign:"center"}});return X4}var n9,i9={};var r9={};const a9=i(ZV),o9={nm:"Comp 1",ddd:0,h:64,w:364,meta:{g:"@lottiefiles/toolkit-js 0.33.2"},layers:[{ty:4,nm:"Shape Layer 1",sr:1,st:0,op:601,ip:0,hd:!1,ddd:0,bm:0,hasMask:!1,ao:0,ks:{a:{a:0,k:[0,0],ix:2},s:{a:0,k:[30.33,7.11],ix:2},sk:{a:0,k:0},p:{a:0,k:[0,0],ix:2},r:{a:0,k:0,ix:2},sa:{a:0,k:0},o:{a:0,k:100,ix:2}},ef:[],shapes:[{ty:"gr",bm:0,hd:!1,nm:"",it:[{ty:"rc",bm:0,hd:!1,nm:"",d:1,p:{a:0,k:[0,0],ix:2},r:{a:0,k:0,ix:2},s:{a:0,k:[1200,900],ix:2}},{ty:"gf",bm:0,hd:!1,mn:"ADBE Vector Graphic - G-Fill",nm:"Gradient Fill 1",e:{a:0,k:[600,7.289215087890625],ix:2},g:{p:2,k:{a:1,k:[{o:{x:.4,y:0},i:{x:.8,y:1},s:[0,0,.42745098039215684,.6666666666666666,1,.4588235294117647,.8941176470588236,.7019607843137254],t:0},{o:{x:.4,y:0},i:{x:.8,y:1},s:[0,.054901960784313725,.4745098039215686,.6980392156862745,.6638605291193181,.2627450980392157,.6666666666666666,.5450980392156862],t:200},{o:{x:.4,y:0},i:{x:.8,y:1},s:[0,.054901960784313725,.4745098039215686,.6980392156862745,.8369723566228694,.2627450980392157,.6666666666666666,.5450980392156862],t:400},{s:[0,0,.42745098039215684,.6666666666666666,1,.4588235294117647,.8941176470588236,.7019607843137254],t:600}],ix:2}},t:1,a:{a:0,k:0},h:{a:0,k:0},s:{a:0,k:[-608.3176879882812,0],ix:2},r:1,o:{a:0,k:100,ix:2}},{ty:"tm",bm:0,hd:!1,nm:"",e:{a:0,k:100,ix:2},o:{a:0,k:0,ix:2},s:{a:0,k:0,ix:2},m:1},{ty:"tr",a:{a:0,k:[0,0],ix:2},s:{a:0,k:[100,100],ix:2},sk:{a:0,k:0,ix:2},p:{a:0,k:[600,450],ix:2},r:{a:0,k:0,ix:2},sa:{a:0,k:0,ix:2},o:{a:0,k:100,ix:2}}]}],ind:1}],v:"5.7.5",fr:100,op:600,ip:0,assets:[]},s9={nm:"Comp 1",ddd:0,h:64,w:364,meta:{g:"@lottiefiles/toolkit-js 0.33.2"},layers:[{ty:4,nm:"Shape Layer 1",sr:1,st:0,op:601,ip:0,hd:!1,ddd:0,bm:0,hasMask:!1,ao:0,ks:{a:{a:0,k:[0,0],ix:2},s:{a:0,k:[30.33,7.11],ix:2},sk:{a:0,k:0},p:{a:0,k:[0,0],ix:2},r:{a:0,k:0,ix:2},sa:{a:0,k:0},o:{a:0,k:100,ix:2}},ef:[],shapes:[{ty:"gr",bm:0,hd:!1,nm:"",it:[{ty:"sh",bm:0,hd:!1,nm:"",d:1,ks:{a:0,k:{c:!1,i:[[0,0],[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0],[0,0]],v:[[-600.000021186202,-449.9999888573779],[600.000021186202,-449.9999888573779],[600.000021186202,449.9999888573779],[-600.000021186202,449.9999888573779],[-600.000021186202,-449.9999888573779]]}}},{ty:"gf",bm:0,hd:!1,mn:"ADBE Vector Graphic - G-Fill",nm:"Gradient Fill 1",e:{a:0,k:[606.9923706054688,0],ix:2},g:{p:3,k:{a:1,k:[{o:{x:.167,y:.167},i:{x:.833,y:.833},s:[0,.5372549019607843,.11764705882352941,.596078431372549,.17592637605001588,.5725490196078431,.16862745098039217,.5058823529411764,.865995362363706,.6901960784313725,.3333333333333333,.2,0,1,.17592637605001588,.9880573993718839,.865995362363706,1],t:0},{o:{x:.167,y:.167},i:{x:.833,y:.833},s:[0,.49019607843137253,.054901960784313725,.7137254901960784,.41551957563920455,.49019607843137253,.054901960784313725,.7137254901960784,1,.6980392156862745,.3411764705882353,.18823529411764706,0,1,.41551957563920455,.9880573993718839,1,1],t:100},{o:{x:.167,y:.167},i:{x:.833,y:.833},s:[0,.4980392156862745,.06274509803921569,.6941176470588235,.7601806640625,.49019607843137253,.054901960784313725,.7137254901960784,.9799886407796468,.5529411764705883,.1411764705882353,.5529411764705883,0,1,.7601806640625,.9880573993718839,.9799886407796468,1],t:200},{o:{x:.167,y:.167},i:{x:.833,y:.833},s:[0,.7372549019607844,.396078431372549,.08627450980392157,.10764936967329546,.7372549019607844,.396078431372549,.08627450980392157,.3060213955965909,.6313725490196078,.25098039215686274,.35294117647058826,0,.9880573993718839,.10764936967329546,1,.3060213955965909,1],t:300},{o:{x:.167,y:.167},i:{x:.833,y:.833},s:[0,.6313725490196078,.24705882352941178,.3568627450980392,.2374200994318182,.7372549019607844,.396078431372549,.08627450980392157,1,.6313725490196078,.24705882352941178,.3568627450980392,0,1,.2374200994318182,.9880573993718839,1,1],t:400},{o:{x:.167,y:.167},i:{x:.833,y:.833},s:[0,.49019607843137253,.054901960784313725,.7137254901960784,.6711636629971591,.7372549019607844,.396078431372549,.08627450980392157,.9628360471622012,.7372549019607844,.396078431372549,.08627450980392157,0,1,.6711636629971591,.9880573993718839,.9628360471622012,1],t:500},{s:[0,.5372549019607843,.11764705882352941,.596078431372549,.17398613618369482,.5686274509803921,.16470588235294117,.5137254901960784,.8699261650677039,.6901960784313725,.3333333333333333,.2,0,1,.17398613618369482,.9880573993718839,.8699261650677039,1],t:600}],ix:2}},t:1,a:{a:0,k:0},h:{a:0,k:0},s:{a:0,k:[-600,0],ix:2},r:1,o:{a:0,k:100,ix:2}},{ty:"tm",bm:0,hd:!1,nm:"",e:{a:0,k:100,ix:2},o:{a:0,k:0,ix:2},s:{a:0,k:0,ix:2},m:1},{ty:"tr",a:{a:0,k:[0,0],ix:2},s:{a:0,k:[100,100],ix:2},sk:{a:0,k:0,ix:2},p:{a:0,k:[600.0000351333254,450.0000136337806],ix:2},r:{a:0,k:0,ix:2},sa:{a:0,k:0,ix:2},o:{a:0,k:100,ix:2}}]}],ind:1}],v:"5.7.5",fr:100,op:600,ip:0,assets:[]};var l9;var u9,c9={};var d9,h9,m9={},p9={};function f9(){if(d9)return p9;d9=1,Object.defineProperty(p9,"__esModule",{value:!0}),p9.styles=void 0;var e=JB,t=J3();return p9.styles=e.StyleSheet.create({backgroundStyle:{backgroundColor:t.COLORS.bgModal},containerStyle:{opacity:.5},handleIndicatorStyle:{display:"none"},title:{...t.FONTS.Poppins.semiBold_LG,color:t.COLORS.text,textAlign:"center",marginBottom:8},container:{backgroundColor:t.COLORS.bgModal,paddingHorizontal:16,paddingTop:16},message:{color:t.COLORS.textSecondary,textAlign:"center",marginBottom:32},buttonContainer:{gap:16},button:{paddingHorizontal:16,paddingVertical:12,backgroundColor:t.COLORS.bgBrand,borderColor:t.COLORS.borderOnBrand,borderRadius:16,borderWidth:1},buttonText:{...t.FONTS.Poppins.semiBold_Base,color:t.COLORS.text,textAlign:"center"},cancelButton:{paddingHorizontal:16,paddingVertical:12,backgroundColor:t.COLORS.bgButtonSecondary,borderRadius:16},deleteRedButton:{paddingHorizontal:16,paddingVertical:12,backgroundColor:t.COLORS.bgDanger,borderRadius:16},deleteFailureCloseButton:{paddingHorizontal:16,paddingVertical:12,backgroundColor:t.COLORS.bgBrand,borderRadius:16},saveButton:{paddingHorizontal:16,paddingVertical:12,backgroundColor:t.COLORS.bgBrand,borderRadius:16},saveText:{...t.FONTS.Poppins.semiBold_Base,textAlign:"center",color:t.COLORS.text},closeText:{...t.FONTS.Poppins.semiBold_Base,textAlign:"center",color:t.COLORS.text}}),p9}var g9,_9={};var v9,y9={};var b9,w9={};var S9,k9={};var C9,E9={};var x9,I9,T9={},O9={};function R9(){if(I9)return T9;I9=1,Object.defineProperty(T9,"__esModule",{value:!0}),T9.default=void 0;var e=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=s(t);if(n&&n.has(e))return n.get(e);var i={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&{}.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(i,a,o):i[a]=e[a]}return i.default=e,n&&n.set(e,i),i}(S()),t=JB,n=o(tj()),i=o(function(){if(x9)return O9;x9=1,Object.defineProperty(O9,"__esModule",{value:!0}),O9.default=void 0,function(e){e&&e.__esModule}(S());var e=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=i(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&{}.hasOwnProperty.call(e,o)){var s=a?Object.getOwnPropertyDescriptor(e,o):null;s&&(s.get||s.set)?Object.defineProperty(r,o,s):r[o]=e[o]}return r.default=e,n&&n.set(e,r),r}(z3),t=J3(),n=l();function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(i=function(e){return e?n:t})(e)}return O9.default=function(i){return(0,n.jsxs)(e.default,{width:40,height:40,viewBox:"0 0 40 40",fill:"none",...i,children:[(0,n.jsx)(e.Rect,{width:40,height:40,rx:20,fill:t.COLORS.bgIcon}),(0,n.jsx)(e.Path,{d:"M13.544 16.745l-.014-.01-.015-.01a1.33 1.33 0 00-1.625.112 1.162 1.162 0 000 1.738l7.226 6.588.013.012.014.011.087.069.014.01.015.01a1.33 1.33 0 001.625-.112l7.226-6.588.014-.013.012-.013.075-.08.013-.013.012-.015a1.16 1.16 0 00-.126-1.604l-.013-.012-.015-.011-.086-.069-.014-.01-.015-.01a1.33 1.33 0 00-1.625.112L20 22.62l-6.341-5.782-.014-.012-.014-.011-.087-.069z",fill:t.COLORS.icon,stroke:t.COLORS.iconBrand})]})},O9}()),r=J3(),a=l();function o(e){return e&&e.__esModule?e:{default:e}}function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(s=function(e){return e?n:t})(e)}const u=t.StyleSheet.create({scrollToEndButton:{position:"absolute",bottom:80,alignSelf:"center"},arrowContainer:{backgroundColor:r.COLORS.bgBackground,borderRadius:24},gradient:{position:"absolute",left:0,right:0,bottom:0,height:145},linearGradient:{flex:1}});return T9.default=function({scrollToEnd:o,isVisibleArrow:s,isVisibleBlur:l}){const c=(0,e.useRef)(new t.Animated.Value(155)).current,d=(0,e.useRef)(new t.Animated.Value(l?1:0)).current;return(0,e.useEffect)(()=>{t.Animated.timing(d,{toValue:l?1:0,duration:400,useNativeDriver:!0}).start()},[l,d]),(0,e.useEffect)(()=>{s&&t.Animated.spring(c,{toValue:0,damping:10,stiffness:100,mass:1,useNativeDriver:!0}).start()},[s,c]),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(t.Pressable,{style:u.scrollToEndButton,testID:"scroll-hint-arrow",children:s&&(0,a.jsx)(t.Animated.View,{style:[u.arrowContainer,{transform:[{translateY:c}]}],children:(0,a.jsx)(t.TouchableOpacity,{testID:"scroll-hint-arrow-button",onPress:o,children:(0,a.jsx)(i.default,{})})})}),(0,a.jsx)(t.Animated.View,{style:[u.gradient,{opacity:d}],pointerEvents:"none",testID:"scroll-hint-blur",children:(0,a.jsx)(n.default,{colors:r.COLORS.gradientButtonBox,style:u.linearGradient})})]})},T9}var A9,L9,P9,M9,D9={},N9={},F9={},B9={},j9={},V9={},H9={};function z9(){return A9||(A9=1,function(e){var t,n,i;Object.defineProperty(e,"__esModule",{value:!0}),e.getParsedType=e.ZodParsedType=e.objectUtil=e.util=void 0,(n=t||(e.util=t={})).assertEqual=e=>{},n.assertIs=function(e){},n.assertNever=function(e){throw new Error},n.arrayToEnum=e=>{const t={};for(const n of e)t[n]=n;return t},n.getValidEnumValues=e=>{const t=n.objectKeys(e).filter(t=>"number"!=typeof e[e[t]]),i={};for(const n of t)i[n]=e[n];return n.objectValues(i)},n.objectValues=e=>n.objectKeys(e).map(function(t){return e[t]}),n.objectKeys="function"==typeof Object.keys?e=>Object.keys(e):e=>{const t=[];for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t},n.find=(e,t)=>{for(const n of e)if(t(n))return n},n.isInteger="function"==typeof Number.isInteger?e=>Number.isInteger(e):e=>"number"==typeof e&&Number.isFinite(e)&&Math.floor(e)===e,n.joinValues=function(e,t=" | "){return e.map(e=>"string"==typeof e?`'${e}'`:e).join(t)},n.jsonStringifyReplacer=(e,t)=>"bigint"==typeof t?t.toString():t,(i||(e.objectUtil=i={})).mergeShapes=(e,t)=>({...e,...t}),e.ZodParsedType=t.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]);e.getParsedType=t=>{switch(typeof t){case"undefined":return e.ZodParsedType.undefined;case"string":return e.ZodParsedType.string;case"number":return Number.isNaN(t)?e.ZodParsedType.nan:e.ZodParsedType.number;case"boolean":return e.ZodParsedType.boolean;case"function":return e.ZodParsedType.function;case"bigint":return e.ZodParsedType.bigint;case"symbol":return e.ZodParsedType.symbol;case"object":return Array.isArray(t)?e.ZodParsedType.array:null===t?e.ZodParsedType.null:t.then&&"function"==typeof t.then&&t.catch&&"function"==typeof t.catch?e.ZodParsedType.promise:"undefined"!=typeof Map&&t instanceof Map?e.ZodParsedType.map:"undefined"!=typeof Set&&t instanceof Set?e.ZodParsedType.set:"undefined"!=typeof Date&&t instanceof Date?e.ZodParsedType.date:e.ZodParsedType.object;default:return e.ZodParsedType.unknown}}}(H9)),H9}function U9(){if(L9)return V9;L9=1,Object.defineProperty(V9,"__esModule",{value:!0}),V9.ZodError=V9.quotelessJson=V9.ZodIssueCode=void 0;const e=z9();V9.ZodIssueCode=e.util.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);V9.quotelessJson=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");let t=class t extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}format(e){const t=e||function(e){return e.message},n={_errors:[]},i=e=>{for(const r of e.issues)if("invalid_union"===r.code)r.unionErrors.map(i);else if("invalid_return_type"===r.code)i(r.returnTypeError);else if("invalid_arguments"===r.code)i(r.argumentsError);else if(0===r.path.length)n._errors.push(t(r));else{let e=n,i=0;for(;i<r.path.length;){const n=r.path[i];i===r.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(r))):e[n]=e[n]||{_errors:[]},e=e[n],i++}}};return i(this),n}static assert(e){if(!(e instanceof t))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,e.util.jsonStringifyReplacer,2)}get isEmpty(){return 0===this.issues.length}flatten(e=e=>e.message){const t={},n=[];for(const i of this.issues)if(i.path.length>0){const n=i.path[0];t[n]=t[n]||[],t[n].push(e(i))}else n.push(e(i));return{formErrors:n,fieldErrors:t}}get formErrors(){return this.flatten()}};return V9.ZodError=t,t.create=e=>new t(e),V9}function G9(){if(P9)return j9;P9=1,Object.defineProperty(j9,"__esModule",{value:!0});const e=U9(),t=z9();return j9.default=(n,i)=>{let r;switch(n.code){case e.ZodIssueCode.invalid_type:r=n.received===t.ZodParsedType.undefined?"Required":`Expected ${n.expected}, received ${n.received}`;break;case e.ZodIssueCode.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(n.expected,t.util.jsonStringifyReplacer)}`;break;case e.ZodIssueCode.unrecognized_keys:r=`Unrecognized key(s) in object: ${t.util.joinValues(n.keys,", ")}`;break;case e.ZodIssueCode.invalid_union:r="Invalid input";break;case e.ZodIssueCode.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${t.util.joinValues(n.options)}`;break;case e.ZodIssueCode.invalid_enum_value:r=`Invalid enum value. Expected ${t.util.joinValues(n.options)}, received '${n.received}'`;break;case e.ZodIssueCode.invalid_arguments:r="Invalid function arguments";break;case e.ZodIssueCode.invalid_return_type:r="Invalid function return type";break;case e.ZodIssueCode.invalid_date:r="Invalid date";break;case e.ZodIssueCode.invalid_string:"object"==typeof n.validation?"includes"in n.validation?(r=`Invalid input: must include "${n.validation.includes}"`,"number"==typeof n.validation.position&&(r=`${r} at one or more positions greater than or equal to ${n.validation.position}`)):"startsWith"in n.validation?r=`Invalid input: must start with "${n.validation.startsWith}"`:"endsWith"in n.validation?r=`Invalid input: must end with "${n.validation.endsWith}"`:t.util.assertNever(n.validation):r="regex"!==n.validation?`Invalid ${n.validation}`:"Invalid";break;case e.ZodIssueCode.too_small:r="array"===n.type?`Array must contain ${n.exact?"exactly":n.inclusive?"at least":"more than"} ${n.minimum} element(s)`:"string"===n.type?`String must contain ${n.exact?"exactly":n.inclusive?"at least":"over"} ${n.minimum} character(s)`:"number"===n.type||"bigint"===n.type?`Number must be ${n.exact?"exactly equal to ":n.inclusive?"greater than or equal to ":"greater than "}${n.minimum}`:"date"===n.type?`Date must be ${n.exact?"exactly equal to ":n.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(n.minimum))}`:"Invalid input";break;case e.ZodIssueCode.too_big:r="array"===n.type?`Array must contain ${n.exact?"exactly":n.inclusive?"at most":"less than"} ${n.maximum} element(s)`:"string"===n.type?`String must contain ${n.exact?"exactly":n.inclusive?"at most":"under"} ${n.maximum} character(s)`:"number"===n.type?`Number must be ${n.exact?"exactly":n.inclusive?"less than or equal to":"less than"} ${n.maximum}`:"bigint"===n.type?`BigInt must be ${n.exact?"exactly":n.inclusive?"less than or equal to":"less than"} ${n.maximum}`:"date"===n.type?`Date must be ${n.exact?"exactly":n.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(n.maximum))}`:"Invalid input";break;case e.ZodIssueCode.custom:r="Invalid input";break;case e.ZodIssueCode.invalid_intersection_types:r="Intersection results could not be merged";break;case e.ZodIssueCode.not_multiple_of:r=`Number must be a multiple of ${n.multipleOf}`;break;case e.ZodIssueCode.not_finite:r="Number must be finite";break;default:r=i.defaultError,t.util.assertNever(n)}return{message:r}},j9}function W9(){if(M9)return B9;M9=1;var e=B9&&B9.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(B9,"__esModule",{value:!0}),B9.defaultErrorMap=void 0,B9.setErrorMap=function(e){n=e},B9.getErrorMap=function(){return n};const t=e(G9());B9.defaultErrorMap=t.default;let n=t.default;return B9}var Y9,$9={};function X9(){return Y9||(Y9=1,function(e){var t=$9&&$9.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.isAsync=e.isValid=e.isDirty=e.isAborted=e.OK=e.DIRTY=e.INVALID=e.ParseStatus=e.EMPTY_PATH=e.makeIssue=void 0,e.addIssueToContext=function(t,r){const a=(0,n.getErrorMap)(),o=(0,e.makeIssue)({issueData:r,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,a,a===i.default?void 0:i.default].filter(e=>!!e)});t.common.issues.push(o)};const n=W9(),i=t(G9());e.makeIssue=e=>{const{data:t,path:n,errorMaps:i,issueData:r}=e,a=[...n,...r.path||[]],o={...r,path:a};if(void 0!==r.message)return{...r,path:a,message:r.message};let s="";const l=i.filter(e=>!!e).slice().reverse();for(const u of l)s=u(o,{data:t,defaultError:s}).message;return{...r,path:a,message:s}},e.EMPTY_PATH=[];class r{constructor(){this.value="valid"}dirty(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static mergeArray(t,n){const i=[];for(const r of n){if("aborted"===r.status)return e.INVALID;"dirty"===r.status&&t.dirty(),i.push(r.value)}return{status:t.value,value:i}}static async mergeObjectAsync(e,t){const n=[];for(const i of t){const e=await i.key,t=await i.value;n.push({key:e,value:t})}return r.mergeObjectSync(e,n)}static mergeObjectSync(t,n){const i={};for(const r of n){const{key:n,value:a}=r;if("aborted"===n.status)return e.INVALID;if("aborted"===a.status)return e.INVALID;"dirty"===n.status&&t.dirty(),"dirty"===a.status&&t.dirty(),"__proto__"===n.value||void 0===a.value&&!r.alwaysSet||(i[n.value]=a.value)}return{status:t.value,value:i}}}e.ParseStatus=r,e.INVALID=Object.freeze({status:"aborted"});e.DIRTY=e=>({status:"dirty",value:e});e.OK=e=>({status:"valid",value:e});e.isAborted=e=>"aborted"===e.status;e.isDirty=e=>"dirty"===e.status;e.isValid=e=>"valid"===e.status;e.isAsync=e=>"undefined"!=typeof Promise&&e instanceof Promise}($9)),$9}var q9,Z9={};function K9(){return q9||(q9=1,Object.defineProperty(Z9,"__esModule",{value:!0})),Z9}var Q9,J9,e5,t5,n5,i5,r5,a5={},o5={};function s5(){return Q9||(Q9=1,Object.defineProperty(o5,"__esModule",{value:!0}),o5.errorUtil=void 0,function(e){e.errToObj=e=>"string"==typeof e?{message:e}:e||{},e.toString=e=>"string"==typeof e?e:e?.message}(e||(o5.errorUtil=e={}))),o5;var e}function l5(){if(J9)return a5;J9=1,Object.defineProperty(a5,"__esModule",{value:!0}),a5.discriminatedUnion=a5.date=a5.boolean=a5.bigint=a5.array=a5.any=a5.coerce=a5.ZodFirstPartyTypeKind=a5.late=a5.ZodSchema=a5.Schema=a5.ZodReadonly=a5.ZodPipeline=a5.ZodBranded=a5.BRAND=a5.ZodNaN=a5.ZodCatch=a5.ZodDefault=a5.ZodNullable=a5.ZodOptional=a5.ZodTransformer=a5.ZodEffects=a5.ZodPromise=a5.ZodNativeEnum=a5.ZodEnum=a5.ZodLiteral=a5.ZodLazy=a5.ZodFunction=a5.ZodSet=a5.ZodMap=a5.ZodRecord=a5.ZodTuple=a5.ZodIntersection=a5.ZodDiscriminatedUnion=a5.ZodUnion=a5.ZodObject=a5.ZodArray=a5.ZodVoid=a5.ZodNever=a5.ZodUnknown=a5.ZodAny=a5.ZodNull=a5.ZodUndefined=a5.ZodSymbol=a5.ZodDate=a5.ZodBoolean=a5.ZodBigInt=a5.ZodNumber=a5.ZodString=a5.ZodType=void 0,a5.NEVER=a5.void=a5.unknown=a5.union=a5.undefined=a5.tuple=a5.transformer=a5.symbol=a5.string=a5.strictObject=a5.set=a5.record=a5.promise=a5.preprocess=a5.pipeline=a5.ostring=a5.optional=a5.onumber=a5.oboolean=a5.object=a5.number=a5.nullable=a5.null=a5.never=a5.nativeEnum=a5.nan=a5.map=a5.literal=a5.lazy=a5.intersection=a5.instanceof=a5.function=a5.enum=a5.effect=void 0,a5.datetimeRegex=T,a5.custom=be;const e=U9(),t=W9(),n=s5(),i=X9(),r=z9();class a{constructor(e,t,n,i){this._cachedPath=[],this.parent=e,this.data=t,this._path=n,this._key=i}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const o=(t,n)=>{if((0,i.isValid)(n))return{success:!0,data:n.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new e.ZodError(t.common.issues);return this._error=n,this._error}}};function s(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:i,description:r}=e;if(t&&(n||i))throw new Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');if(t)return{errorMap:t,description:r};return{errorMap:(t,r)=>{const{message:a}=e;return"invalid_enum_value"===t.code?{message:a??r.defaultError}:void 0===r.data?{message:a??i??r.defaultError}:"invalid_type"!==t.code?{message:r.defaultError}:{message:a??n??r.defaultError}},description:r}}class l{get description(){return this._def.description}_getType(e){return(0,r.getParsedType)(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:(0,r.getParsedType)(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new i.ParseStatus,ctx:{common:e.parent.common,data:e.data,parsedType:(0,r.getParsedType)(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if((0,i.isAsync)(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const n=this.safeParse(e,t);if(n.success)return n.data;throw n.error}safeParse(e,t){const n={common:{issues:[],async:t?.async??!1,contextualErrorMap:t?.errorMap},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:(0,r.getParsedType)(e)},i=this._parseSync({data:e,path:n.path,parent:n});return o(n,i)}"~validate"(e){const t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:(0,r.getParsedType)(e)};if(!this["~standard"].async)try{const n=this._parseSync({data:e,path:[],parent:t});return(0,i.isValid)(n)?{value:n.value}:{issues:t.common.issues}}catch(n){n?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(e=>(0,i.isValid)(e)?{value:e.value}:{issues:t.common.issues})}async parseAsync(e,t){const n=await this.safeParseAsync(e,t);if(n.success)return n.data;throw n.error}async safeParseAsync(e,t){const n={common:{issues:[],contextualErrorMap:t?.errorMap,async:!0},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:(0,r.getParsedType)(e)},a=this._parse({data:e,path:n.path,parent:n}),s=await((0,i.isAsync)(a)?a:Promise.resolve(a));return o(n,s)}refine(t,n){const i=e=>"string"==typeof n||void 0===n?{message:n}:"function"==typeof n?n(e):n;return this._refinement((n,r)=>{const a=t(n),o=()=>r.addIssue({code:e.ZodIssueCode.custom,...i(n)});return"undefined"!=typeof Promise&&a instanceof Promise?a.then(e=>!!e||(o(),!1)):!!a||(o(),!1)})}refinement(e,t){return this._refinement((n,i)=>!!e(n)||(i.addIssue("function"==typeof t?t(n,i):t),!1))}_refinement(e){return new ce({schema:this,typeName:we.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:e=>this["~validate"](e)}}optional(){return de.create(this,this._def)}nullable(){return he.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return W.create(this)}promise(){return ue.create(this,this._def)}or(e){return X.create([this,e],this._def)}and(e){return Q.create(this,e,this._def)}transform(e){return new ce({...s(this._def),schema:this,typeName:we.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t="function"==typeof e?e:()=>e;return new me({...s(this._def),innerType:this,defaultValue:t,typeName:we.ZodDefault})}brand(){return new ge({typeName:we.ZodBranded,type:this,...s(this._def)})}catch(e){const t="function"==typeof e?e:()=>e;return new pe({...s(this._def),innerType:this,catchValue:t,typeName:we.ZodCatch})}describe(e){return new(0,this.constructor)({...this._def,description:e})}pipe(e){return _e.create(this,e)}readonly(){return ve.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}a5.ZodType=l,a5.Schema=l,a5.ZodSchema=l;const u=/^c[^\s-]{8,}$/i,c=/^[0-9a-z]+$/,d=/^[0-9A-HJKMNP-TV-Z]{26}$/i,h=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,m=/^[a-z0-9_-]{21}$/i,p=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,f=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,g=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i;let _;const v=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,y=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,b=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,w=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,S=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,k=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,C="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",E=new RegExp(`^${C}$`);function x(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:null==e.precision&&(t=`${t}(\\.\\d+)?`);return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${e.precision?"+":"?"}`}function I(e){return new RegExp(`^${x(e)}$`)}function T(e){let t=`${C}T${x(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function O(e,t){return!("v4"!==t&&t||!v.test(e))||!("v6"!==t&&t||!b.test(e))}function R(e,t){if(!p.test(e))return!1;try{const[n]=e.split(".");if(!n)return!1;const i=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),r=JSON.parse(atob(i));return"object"==typeof r&&null!==r&&((!("typ"in r)||"JWT"===r?.typ)&&(!!r.alg&&(!t||r.alg===t)))}catch{return!1}}function A(e,t){return!("v4"!==t&&t||!y.test(e))||!("v6"!==t&&t||!w.test(e))}class L extends l{_parse(t){this._def.coerce&&(t.data=String(t.data));if(this._getType(t)!==r.ZodParsedType.string){const n=this._getOrReturnCtx(t);return(0,i.addIssueToContext)(n,{code:e.ZodIssueCode.invalid_type,expected:r.ZodParsedType.string,received:n.parsedType}),i.INVALID}const n=new i.ParseStatus;let a;for(const o of this._def.checks)if("min"===o.kind)t.data.length<o.value&&(a=this._getOrReturnCtx(t,a),(0,i.addIssueToContext)(a,{code:e.ZodIssueCode.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),n.dirty());else if("max"===o.kind)t.data.length>o.value&&(a=this._getOrReturnCtx(t,a),(0,i.addIssueToContext)(a,{code:e.ZodIssueCode.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),n.dirty());else if("length"===o.kind){const r=t.data.length>o.value,s=t.data.length<o.value;(r||s)&&(a=this._getOrReturnCtx(t,a),r?(0,i.addIssueToContext)(a,{code:e.ZodIssueCode.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):s&&(0,i.addIssueToContext)(a,{code:e.ZodIssueCode.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),n.dirty())}else if("email"===o.kind)g.test(t.data)||(a=this._getOrReturnCtx(t,a),(0,i.addIssueToContext)(a,{validation:"email",code:e.ZodIssueCode.invalid_string,message:o.message}),n.dirty());else if("emoji"===o.kind)_||(_=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),_.test(t.data)||(a=this._getOrReturnCtx(t,a),(0,i.addIssueToContext)(a,{validation:"emoji",code:e.ZodIssueCode.invalid_string,message:o.message}),n.dirty());else if("uuid"===o.kind)h.test(t.data)||(a=this._getOrReturnCtx(t,a),(0,i.addIssueToContext)(a,{validation:"uuid",code:e.ZodIssueCode.invalid_string,message:o.message}),n.dirty());else if("nanoid"===o.kind)m.test(t.data)||(a=this._getOrReturnCtx(t,a),(0,i.addIssueToContext)(a,{validation:"nanoid",code:e.ZodIssueCode.invalid_string,message:o.message}),n.dirty());else if("cuid"===o.kind)u.test(t.data)||(a=this._getOrReturnCtx(t,a),(0,i.addIssueToContext)(a,{validation:"cuid",code:e.ZodIssueCode.invalid_string,message:o.message}),n.dirty());else if("cuid2"===o.kind)c.test(t.data)||(a=this._getOrReturnCtx(t,a),(0,i.addIssueToContext)(a,{validation:"cuid2",code:e.ZodIssueCode.invalid_string,message:o.message}),n.dirty());else if("ulid"===o.kind)d.test(t.data)||(a=this._getOrReturnCtx(t,a),(0,i.addIssueToContext)(a,{validation:"ulid",code:e.ZodIssueCode.invalid_string,message:o.message}),n.dirty());else if("url"===o.kind)try{new URL(t.data)}catch{a=this._getOrReturnCtx(t,a),(0,i.addIssueToContext)(a,{validation:"url",code:e.ZodIssueCode.invalid_string,message:o.message}),n.dirty()}else if("regex"===o.kind){o.regex.lastIndex=0;o.regex.test(t.data)||(a=this._getOrReturnCtx(t,a),(0,i.addIssueToContext)(a,{validation:"regex",code:e.ZodIssueCode.invalid_string,message:o.message}),n.dirty())}else if("trim"===o.kind)t.data=t.data.trim();else if("includes"===o.kind)t.data.includes(o.value,o.position)||(a=this._getOrReturnCtx(t,a),(0,i.addIssueToContext)(a,{code:e.ZodIssueCode.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),n.dirty());else if("toLowerCase"===o.kind)t.data=t.data.toLowerCase();else if("toUpperCase"===o.kind)t.data=t.data.toUpperCase();else if("startsWith"===o.kind)t.data.startsWith(o.value)||(a=this._getOrReturnCtx(t,a),(0,i.addIssueToContext)(a,{code:e.ZodIssueCode.invalid_string,validation:{startsWith:o.value},message:o.message}),n.dirty());else if("endsWith"===o.kind)t.data.endsWith(o.value)||(a=this._getOrReturnCtx(t,a),(0,i.addIssueToContext)(a,{code:e.ZodIssueCode.invalid_string,validation:{endsWith:o.value},message:o.message}),n.dirty());else if("datetime"===o.kind){T(o).test(t.data)||(a=this._getOrReturnCtx(t,a),(0,i.addIssueToContext)(a,{code:e.ZodIssueCode.invalid_string,validation:"datetime",message:o.message}),n.dirty())}else if("date"===o.kind){E.test(t.data)||(a=this._getOrReturnCtx(t,a),(0,i.addIssueToContext)(a,{code:e.ZodIssueCode.invalid_string,validation:"date",message:o.message}),n.dirty())}else if("time"===o.kind){I(o).test(t.data)||(a=this._getOrReturnCtx(t,a),(0,i.addIssueToContext)(a,{code:e.ZodIssueCode.invalid_string,validation:"time",message:o.message}),n.dirty())}else"duration"===o.kind?f.test(t.data)||(a=this._getOrReturnCtx(t,a),(0,i.addIssueToContext)(a,{validation:"duration",code:e.ZodIssueCode.invalid_string,message:o.message}),n.dirty()):"ip"===o.kind?O(t.data,o.version)||(a=this._getOrReturnCtx(t,a),(0,i.addIssueToContext)(a,{validation:"ip",code:e.ZodIssueCode.invalid_string,message:o.message}),n.dirty()):"jwt"===o.kind?R(t.data,o.alg)||(a=this._getOrReturnCtx(t,a),(0,i.addIssueToContext)(a,{validation:"jwt",code:e.ZodIssueCode.invalid_string,message:o.message}),n.dirty()):"cidr"===o.kind?A(t.data,o.version)||(a=this._getOrReturnCtx(t,a),(0,i.addIssueToContext)(a,{validation:"cidr",code:e.ZodIssueCode.invalid_string,message:o.message}),n.dirty()):"base64"===o.kind?S.test(t.data)||(a=this._getOrReturnCtx(t,a),(0,i.addIssueToContext)(a,{validation:"base64",code:e.ZodIssueCode.invalid_string,message:o.message}),n.dirty()):"base64url"===o.kind?k.test(t.data)||(a=this._getOrReturnCtx(t,a),(0,i.addIssueToContext)(a,{validation:"base64url",code:e.ZodIssueCode.invalid_string,message:o.message}),n.dirty()):r.util.assertNever(o);return{status:n.value,value:t.data}}_regex(t,i,r){return this.refinement(e=>t.test(e),{validation:i,code:e.ZodIssueCode.invalid_string,...n.errorUtil.errToObj(r)})}_addCheck(e){return new L({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...n.errorUtil.errToObj(e)})}url(e){return this._addCheck({kind:"url",...n.errorUtil.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...n.errorUtil.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...n.errorUtil.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...n.errorUtil.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...n.errorUtil.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...n.errorUtil.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...n.errorUtil.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...n.errorUtil.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...n.errorUtil.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...n.errorUtil.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...n.errorUtil.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...n.errorUtil.errToObj(e)})}datetime(e){return"string"==typeof e?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:void 0===e?.precision?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...n.errorUtil.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return"string"==typeof e?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:void 0===e?.precision?null:e?.precision,...n.errorUtil.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...n.errorUtil.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...n.errorUtil.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t?.position,...n.errorUtil.errToObj(t?.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...n.errorUtil.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...n.errorUtil.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...n.errorUtil.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...n.errorUtil.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...n.errorUtil.errToObj(t)})}nonempty(e){return this.min(1,n.errorUtil.errToObj(e))}trim(){return new L({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new L({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new L({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>"datetime"===e.kind)}get isDate(){return!!this._def.checks.find(e=>"date"===e.kind)}get isTime(){return!!this._def.checks.find(e=>"time"===e.kind)}get isDuration(){return!!this._def.checks.find(e=>"duration"===e.kind)}get isEmail(){return!!this._def.checks.find(e=>"email"===e.kind)}get isURL(){return!!this._def.checks.find(e=>"url"===e.kind)}get isEmoji(){return!!this._def.checks.find(e=>"emoji"===e.kind)}get isUUID(){return!!this._def.checks.find(e=>"uuid"===e.kind)}get isNANOID(){return!!this._def.checks.find(e=>"nanoid"===e.kind)}get isCUID(){return!!this._def.checks.find(e=>"cuid"===e.kind)}get isCUID2(){return!!this._def.checks.find(e=>"cuid2"===e.kind)}get isULID(){return!!this._def.checks.find(e=>"ulid"===e.kind)}get isIP(){return!!this._def.checks.find(e=>"ip"===e.kind)}get isCIDR(){return!!this._def.checks.find(e=>"cidr"===e.kind)}get isBase64(){return!!this._def.checks.find(e=>"base64"===e.kind)}get isBase64url(){return!!this._def.checks.find(e=>"base64url"===e.kind)}get minLength(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}function P(e,t){const n=(e.toString().split(".")[1]||"").length,i=(t.toString().split(".")[1]||"").length,r=n>i?n:i;return Number.parseInt(e.toFixed(r).replace(".",""))%Number.parseInt(t.toFixed(r).replace(".",""))/10**r}a5.ZodString=L,L.create=e=>new L({checks:[],typeName:we.ZodString,coerce:e?.coerce??!1,...s(e)});class M extends l{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){this._def.coerce&&(t.data=Number(t.data));if(this._getType(t)!==r.ZodParsedType.number){const n=this._getOrReturnCtx(t);return(0,i.addIssueToContext)(n,{code:e.ZodIssueCode.invalid_type,expected:r.ZodParsedType.number,received:n.parsedType}),i.INVALID}let n;const a=new i.ParseStatus;for(const o of this._def.checks)if("int"===o.kind)r.util.isInteger(t.data)||(n=this._getOrReturnCtx(t,n),(0,i.addIssueToContext)(n,{code:e.ZodIssueCode.invalid_type,expected:"integer",received:"float",message:o.message}),a.dirty());else if("min"===o.kind){(o.inclusive?t.data<o.value:t.data<=o.value)&&(n=this._getOrReturnCtx(t,n),(0,i.addIssueToContext)(n,{code:e.ZodIssueCode.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),a.dirty())}else if("max"===o.kind){(o.inclusive?t.data>o.value:t.data>=o.value)&&(n=this._getOrReturnCtx(t,n),(0,i.addIssueToContext)(n,{code:e.ZodIssueCode.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),a.dirty())}else"multipleOf"===o.kind?0!==P(t.data,o.value)&&(n=this._getOrReturnCtx(t,n),(0,i.addIssueToContext)(n,{code:e.ZodIssueCode.not_multiple_of,multipleOf:o.value,message:o.message}),a.dirty()):"finite"===o.kind?Number.isFinite(t.data)||(n=this._getOrReturnCtx(t,n),(0,i.addIssueToContext)(n,{code:e.ZodIssueCode.not_finite,message:o.message}),a.dirty()):r.util.assertNever(o);return{status:a.value,value:t.data}}gte(e,t){return this.setLimit("min",e,!0,n.errorUtil.toString(t))}gt(e,t){return this.setLimit("min",e,!1,n.errorUtil.toString(t))}lte(e,t){return this.setLimit("max",e,!0,n.errorUtil.toString(t))}lt(e,t){return this.setLimit("max",e,!1,n.errorUtil.toString(t))}setLimit(e,t,i,r){return new M({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:i,message:n.errorUtil.toString(r)}]})}_addCheck(e){return new M({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:n.errorUtil.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:n.errorUtil.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:n.errorUtil.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:n.errorUtil.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:n.errorUtil.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:n.errorUtil.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:n.errorUtil.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:n.errorUtil.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:n.errorUtil.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>"int"===e.kind||"multipleOf"===e.kind&&r.util.isInteger(e.value))}get isFinite(){let e=null,t=null;for(const n of this._def.checks){if("finite"===n.kind||"int"===n.kind||"multipleOf"===n.kind)return!0;"min"===n.kind?(null===t||n.value>t)&&(t=n.value):"max"===n.kind&&(null===e||n.value<e)&&(e=n.value)}return Number.isFinite(t)&&Number.isFinite(e)}}a5.ZodNumber=M,M.create=e=>new M({checks:[],typeName:we.ZodNumber,coerce:e?.coerce||!1,...s(e)});class D extends l{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==r.ZodParsedType.bigint)return this._getInvalidInput(t);let n;const a=new i.ParseStatus;for(const o of this._def.checks)if("min"===o.kind){(o.inclusive?t.data<o.value:t.data<=o.value)&&(n=this._getOrReturnCtx(t,n),(0,i.addIssueToContext)(n,{code:e.ZodIssueCode.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),a.dirty())}else if("max"===o.kind){(o.inclusive?t.data>o.value:t.data>=o.value)&&(n=this._getOrReturnCtx(t,n),(0,i.addIssueToContext)(n,{code:e.ZodIssueCode.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),a.dirty())}else"multipleOf"===o.kind?t.data%o.value!==BigInt(0)&&(n=this._getOrReturnCtx(t,n),(0,i.addIssueToContext)(n,{code:e.ZodIssueCode.not_multiple_of,multipleOf:o.value,message:o.message}),a.dirty()):r.util.assertNever(o);return{status:a.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return(0,i.addIssueToContext)(n,{code:e.ZodIssueCode.invalid_type,expected:r.ZodParsedType.bigint,received:n.parsedType}),i.INVALID}gte(e,t){return this.setLimit("min",e,!0,n.errorUtil.toString(t))}gt(e,t){return this.setLimit("min",e,!1,n.errorUtil.toString(t))}lte(e,t){return this.setLimit("max",e,!0,n.errorUtil.toString(t))}lt(e,t){return this.setLimit("max",e,!1,n.errorUtil.toString(t))}setLimit(e,t,i,r){return new D({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:i,message:n.errorUtil.toString(r)}]})}_addCheck(e){return new D({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:n.errorUtil.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:n.errorUtil.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:n.errorUtil.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:n.errorUtil.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:n.errorUtil.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}a5.ZodBigInt=D,D.create=e=>new D({checks:[],typeName:we.ZodBigInt,coerce:e?.coerce??!1,...s(e)});class N extends l{_parse(t){this._def.coerce&&(t.data=Boolean(t.data));if(this._getType(t)!==r.ZodParsedType.boolean){const n=this._getOrReturnCtx(t);return(0,i.addIssueToContext)(n,{code:e.ZodIssueCode.invalid_type,expected:r.ZodParsedType.boolean,received:n.parsedType}),i.INVALID}return(0,i.OK)(t.data)}}a5.ZodBoolean=N,N.create=e=>new N({typeName:we.ZodBoolean,coerce:e?.coerce||!1,...s(e)});class F extends l{_parse(t){this._def.coerce&&(t.data=new Date(t.data));if(this._getType(t)!==r.ZodParsedType.date){const n=this._getOrReturnCtx(t);return(0,i.addIssueToContext)(n,{code:e.ZodIssueCode.invalid_type,expected:r.ZodParsedType.date,received:n.parsedType}),i.INVALID}if(Number.isNaN(t.data.getTime())){const n=this._getOrReturnCtx(t);return(0,i.addIssueToContext)(n,{code:e.ZodIssueCode.invalid_date}),i.INVALID}const n=new i.ParseStatus;let a;for(const o of this._def.checks)"min"===o.kind?t.data.getTime()<o.value&&(a=this._getOrReturnCtx(t,a),(0,i.addIssueToContext)(a,{code:e.ZodIssueCode.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),n.dirty()):"max"===o.kind?t.data.getTime()>o.value&&(a=this._getOrReturnCtx(t,a),(0,i.addIssueToContext)(a,{code:e.ZodIssueCode.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),n.dirty()):r.util.assertNever(o);return{status:n.value,value:new Date(t.data.getTime())}}_addCheck(e){return new F({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:n.errorUtil.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:n.errorUtil.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return null!=e?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return null!=e?new Date(e):null}}a5.ZodDate=F,F.create=e=>new F({checks:[],coerce:e?.coerce||!1,typeName:we.ZodDate,...s(e)});class B extends l{_parse(t){if(this._getType(t)!==r.ZodParsedType.symbol){const n=this._getOrReturnCtx(t);return(0,i.addIssueToContext)(n,{code:e.ZodIssueCode.invalid_type,expected:r.ZodParsedType.symbol,received:n.parsedType}),i.INVALID}return(0,i.OK)(t.data)}}a5.ZodSymbol=B,B.create=e=>new B({typeName:we.ZodSymbol,...s(e)});class j extends l{_parse(t){if(this._getType(t)!==r.ZodParsedType.undefined){const n=this._getOrReturnCtx(t);return(0,i.addIssueToContext)(n,{code:e.ZodIssueCode.invalid_type,expected:r.ZodParsedType.undefined,received:n.parsedType}),i.INVALID}return(0,i.OK)(t.data)}}a5.ZodUndefined=j,j.create=e=>new j({typeName:we.ZodUndefined,...s(e)});class V extends l{_parse(t){if(this._getType(t)!==r.ZodParsedType.null){const n=this._getOrReturnCtx(t);return(0,i.addIssueToContext)(n,{code:e.ZodIssueCode.invalid_type,expected:r.ZodParsedType.null,received:n.parsedType}),i.INVALID}return(0,i.OK)(t.data)}}a5.ZodNull=V,V.create=e=>new V({typeName:we.ZodNull,...s(e)});class H extends l{constructor(){super(...arguments),this._any=!0}_parse(e){return(0,i.OK)(e.data)}}a5.ZodAny=H,H.create=e=>new H({typeName:we.ZodAny,...s(e)});class z extends l{constructor(){super(...arguments),this._unknown=!0}_parse(e){return(0,i.OK)(e.data)}}a5.ZodUnknown=z,z.create=e=>new z({typeName:we.ZodUnknown,...s(e)});class U extends l{_parse(t){const n=this._getOrReturnCtx(t);return(0,i.addIssueToContext)(n,{code:e.ZodIssueCode.invalid_type,expected:r.ZodParsedType.never,received:n.parsedType}),i.INVALID}}a5.ZodNever=U,U.create=e=>new U({typeName:we.ZodNever,...s(e)});class G extends l{_parse(t){if(this._getType(t)!==r.ZodParsedType.undefined){const n=this._getOrReturnCtx(t);return(0,i.addIssueToContext)(n,{code:e.ZodIssueCode.invalid_type,expected:r.ZodParsedType.void,received:n.parsedType}),i.INVALID}return(0,i.OK)(t.data)}}a5.ZodVoid=G,G.create=e=>new G({typeName:we.ZodVoid,...s(e)});class W extends l{_parse(t){const{ctx:n,status:o}=this._processInputParams(t),s=this._def;if(n.parsedType!==r.ZodParsedType.array)return(0,i.addIssueToContext)(n,{code:e.ZodIssueCode.invalid_type,expected:r.ZodParsedType.array,received:n.parsedType}),i.INVALID;if(null!==s.exactLength){const t=n.data.length>s.exactLength.value,r=n.data.length<s.exactLength.value;(t||r)&&((0,i.addIssueToContext)(n,{code:t?e.ZodIssueCode.too_big:e.ZodIssueCode.too_small,minimum:r?s.exactLength.value:void 0,maximum:t?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),o.dirty())}if(null!==s.minLength&&n.data.length<s.minLength.value&&((0,i.addIssueToContext)(n,{code:e.ZodIssueCode.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),o.dirty()),null!==s.maxLength&&n.data.length>s.maxLength.value&&((0,i.addIssueToContext)(n,{code:e.ZodIssueCode.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),o.dirty()),n.common.async)return Promise.all([...n.data].map((e,t)=>s.type._parseAsync(new a(n,e,n.path,t)))).then(e=>i.ParseStatus.mergeArray(o,e));const l=[...n.data].map((e,t)=>s.type._parseSync(new a(n,e,n.path,t)));return i.ParseStatus.mergeArray(o,l)}get element(){return this._def.type}min(e,t){return new W({...this._def,minLength:{value:e,message:n.errorUtil.toString(t)}})}max(e,t){return new W({...this._def,maxLength:{value:e,message:n.errorUtil.toString(t)}})}length(e,t){return new W({...this._def,exactLength:{value:e,message:n.errorUtil.toString(t)}})}nonempty(e){return this.min(1,e)}}function Y(e){if(e instanceof $){const t={};for(const n in e.shape){const i=e.shape[n];t[n]=de.create(Y(i))}return new $({...e._def,shape:()=>t})}return e instanceof W?new W({...e._def,type:Y(e.element)}):e instanceof de?de.create(Y(e.unwrap())):e instanceof he?he.create(Y(e.unwrap())):e instanceof J?J.create(e.items.map(e=>Y(e))):e}a5.ZodArray=W,W.create=(e,t)=>new W({type:e,minLength:null,maxLength:null,exactLength:null,typeName:we.ZodArray,...s(t)});class $ extends l{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(null!==this._cached)return this._cached;const e=this._def.shape(),t=r.util.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(t){if(this._getType(t)!==r.ZodParsedType.object){const n=this._getOrReturnCtx(t);return(0,i.addIssueToContext)(n,{code:e.ZodIssueCode.invalid_type,expected:r.ZodParsedType.object,received:n.parsedType}),i.INVALID}const{status:n,ctx:o}=this._processInputParams(t),{shape:s,keys:l}=this._getCached(),u=[];if(!(this._def.catchall instanceof U&&"strip"===this._def.unknownKeys))for(const e in o.data)l.includes(e)||u.push(e);const c=[];for(const e of l){const t=s[e],n=o.data[e];c.push({key:{status:"valid",value:e},value:t._parse(new a(o,n,o.path,e)),alwaysSet:e in o.data})}if(this._def.catchall instanceof U){const t=this._def.unknownKeys;if("passthrough"===t)for(const e of u)c.push({key:{status:"valid",value:e},value:{status:"valid",value:o.data[e]}});else if("strict"===t)u.length>0&&((0,i.addIssueToContext)(o,{code:e.ZodIssueCode.unrecognized_keys,keys:u}),n.dirty());else if("strip"!==t)throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const e=this._def.catchall;for(const t of u){const n=o.data[t];c.push({key:{status:"valid",value:t},value:e._parse(new a(o,n,o.path,t)),alwaysSet:t in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const e=[];for(const t of c){const n=await t.key,i=await t.value;e.push({key:n,value:i,alwaysSet:t.alwaysSet})}return e}).then(e=>i.ParseStatus.mergeObjectSync(n,e)):i.ParseStatus.mergeObjectSync(n,c)}get shape(){return this._def.shape()}strict(e){return n.errorUtil.errToObj,new $({...this._def,unknownKeys:"strict",...void 0!==e?{errorMap:(t,i)=>{const r=this._def.errorMap?.(t,i).message??i.defaultError;return"unrecognized_keys"===t.code?{message:n.errorUtil.errToObj(e).message??r}:{message:r}}}:{}})}strip(){return new $({...this._def,unknownKeys:"strip"})}passthrough(){return new $({...this._def,unknownKeys:"passthrough"})}extend(e){return new $({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new $({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:we.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new $({...this._def,catchall:e})}pick(e){const t={};for(const n of r.util.objectKeys(e))e[n]&&this.shape[n]&&(t[n]=this.shape[n]);return new $({...this._def,shape:()=>t})}omit(e){const t={};for(const n of r.util.objectKeys(this.shape))e[n]||(t[n]=this.shape[n]);return new $({...this._def,shape:()=>t})}deepPartial(){return Y(this)}partial(e){const t={};for(const n of r.util.objectKeys(this.shape)){const i=this.shape[n];e&&!e[n]?t[n]=i:t[n]=i.optional()}return new $({...this._def,shape:()=>t})}required(e){const t={};for(const n of r.util.objectKeys(this.shape))if(e&&!e[n])t[n]=this.shape[n];else{let e=this.shape[n];for(;e instanceof de;)e=e._def.innerType;t[n]=e}return new $({...this._def,shape:()=>t})}keyof(){return oe(r.util.objectKeys(this.shape))}}a5.ZodObject=$,$.create=(e,t)=>new $({shape:()=>e,unknownKeys:"strip",catchall:U.create(),typeName:we.ZodObject,...s(t)}),$.strictCreate=(e,t)=>new $({shape:()=>e,unknownKeys:"strict",catchall:U.create(),typeName:we.ZodObject,...s(t)}),$.lazycreate=(e,t)=>new $({shape:e,unknownKeys:"strip",catchall:U.create(),typeName:we.ZodObject,...s(t)});class X extends l{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;if(n.common.async)return Promise.all(r.map(async e=>{const t={...n,common:{...n.common,issues:[]},parent:null};return{result:await e._parseAsync({data:n.data,path:n.path,parent:t}),ctx:t}})).then(function(t){for(const e of t)if("valid"===e.result.status)return e.result;for(const e of t)if("dirty"===e.result.status)return n.common.issues.push(...e.ctx.common.issues),e.result;const r=t.map(t=>new e.ZodError(t.ctx.common.issues));return(0,i.addIssueToContext)(n,{code:e.ZodIssueCode.invalid_union,unionErrors:r}),i.INVALID});{let t;const a=[];for(const e of r){const i={...n,common:{...n.common,issues:[]},parent:null},r=e._parseSync({data:n.data,path:n.path,parent:i});if("valid"===r.status)return r;"dirty"!==r.status||t||(t={result:r,ctx:i}),i.common.issues.length&&a.push(i.common.issues)}if(t)return n.common.issues.push(...t.ctx.common.issues),t.result;const o=a.map(t=>new e.ZodError(t));return(0,i.addIssueToContext)(n,{code:e.ZodIssueCode.invalid_union,unionErrors:o}),i.INVALID}}get options(){return this._def.options}}a5.ZodUnion=X,X.create=(e,t)=>new X({options:e,typeName:we.ZodUnion,...s(t)});const q=e=>e instanceof re?q(e.schema):e instanceof ce?q(e.innerType()):e instanceof ae?[e.value]:e instanceof se?e.options:e instanceof le?r.util.objectValues(e.enum):e instanceof me?q(e._def.innerType):e instanceof j?[void 0]:e instanceof V?[null]:e instanceof de?[void 0,...q(e.unwrap())]:e instanceof he?[null,...q(e.unwrap())]:e instanceof ge||e instanceof ve?q(e.unwrap()):e instanceof pe?q(e._def.innerType):[];class Z extends l{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==r.ZodParsedType.object)return(0,i.addIssueToContext)(n,{code:e.ZodIssueCode.invalid_type,expected:r.ZodParsedType.object,received:n.parsedType}),i.INVALID;const a=this.discriminator,o=n.data[a],s=this.optionsMap.get(o);return s?n.common.async?s._parseAsync({data:n.data,path:n.path,parent:n}):s._parseSync({data:n.data,path:n.path,parent:n}):((0,i.addIssueToContext)(n,{code:e.ZodIssueCode.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[a]}),i.INVALID)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,n){const i=new Map;for(const r of t){const t=q(r.shape[e]);if(!t.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const n of t){if(i.has(n))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(n)}`);i.set(n,r)}}return new Z({typeName:we.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:i,...s(n)})}}function K(e,t){const n=(0,r.getParsedType)(e),i=(0,r.getParsedType)(t);if(e===t)return{valid:!0,data:e};if(n===r.ZodParsedType.object&&i===r.ZodParsedType.object){const n=r.util.objectKeys(t),i=r.util.objectKeys(e).filter(e=>-1!==n.indexOf(e)),a={...e,...t};for(const r of i){const n=K(e[r],t[r]);if(!n.valid)return{valid:!1};a[r]=n.data}return{valid:!0,data:a}}if(n===r.ZodParsedType.array&&i===r.ZodParsedType.array){if(e.length!==t.length)return{valid:!1};const n=[];for(let i=0;i<e.length;i++){const r=K(e[i],t[i]);if(!r.valid)return{valid:!1};n.push(r.data)}return{valid:!0,data:n}}return n===r.ZodParsedType.date&&i===r.ZodParsedType.date&&+e===+t?{valid:!0,data:e}:{valid:!1}}a5.ZodDiscriminatedUnion=Z;class Q extends l{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),a=(t,a)=>{if((0,i.isAborted)(t)||(0,i.isAborted)(a))return i.INVALID;const o=K(t.value,a.value);return o.valid?(((0,i.isDirty)(t)||(0,i.isDirty)(a))&&n.dirty(),{status:n.value,value:o.data}):((0,i.addIssueToContext)(r,{code:e.ZodIssueCode.invalid_intersection_types}),i.INVALID)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([e,t])=>a(e,t)):a(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}a5.ZodIntersection=Q,Q.create=(e,t,n)=>new Q({left:e,right:t,typeName:we.ZodIntersection,...s(n)});class J extends l{_parse(t){const{status:n,ctx:o}=this._processInputParams(t);if(o.parsedType!==r.ZodParsedType.array)return(0,i.addIssueToContext)(o,{code:e.ZodIssueCode.invalid_type,expected:r.ZodParsedType.array,received:o.parsedType}),i.INVALID;if(o.data.length<this._def.items.length)return(0,i.addIssueToContext)(o,{code:e.ZodIssueCode.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),i.INVALID;!this._def.rest&&o.data.length>this._def.items.length&&((0,i.addIssueToContext)(o,{code:e.ZodIssueCode.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const s=[...o.data].map((e,t)=>{const n=this._def.items[t]||this._def.rest;return n?n._parse(new a(o,e,o.path,t)):null}).filter(e=>!!e);return o.common.async?Promise.all(s).then(e=>i.ParseStatus.mergeArray(n,e)):i.ParseStatus.mergeArray(n,s)}get items(){return this._def.items}rest(e){return new J({...this._def,rest:e})}}a5.ZodTuple=J,J.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new J({items:e,typeName:we.ZodTuple,rest:null,...s(t)})};class ee extends l{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:o}=this._processInputParams(t);if(o.parsedType!==r.ZodParsedType.object)return(0,i.addIssueToContext)(o,{code:e.ZodIssueCode.invalid_type,expected:r.ZodParsedType.object,received:o.parsedType}),i.INVALID;const s=[],l=this._def.keyType,u=this._def.valueType;for(const e in o.data)s.push({key:l._parse(new a(o,e,o.path,e)),value:u._parse(new a(o,o.data[e],o.path,e)),alwaysSet:e in o.data});return o.common.async?i.ParseStatus.mergeObjectAsync(n,s):i.ParseStatus.mergeObjectSync(n,s)}get element(){return this._def.valueType}static create(e,t,n){return new ee(t instanceof l?{keyType:e,valueType:t,typeName:we.ZodRecord,...s(n)}:{keyType:L.create(),valueType:e,typeName:we.ZodRecord,...s(t)})}}a5.ZodRecord=ee;class te extends l{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:o}=this._processInputParams(t);if(o.parsedType!==r.ZodParsedType.map)return(0,i.addIssueToContext)(o,{code:e.ZodIssueCode.invalid_type,expected:r.ZodParsedType.map,received:o.parsedType}),i.INVALID;const s=this._def.keyType,l=this._def.valueType,u=[...o.data.entries()].map(([e,t],n)=>({key:s._parse(new a(o,e,o.path,[n,"key"])),value:l._parse(new a(o,t,o.path,[n,"value"]))}));if(o.common.async){const e=new Map;return Promise.resolve().then(async()=>{for(const t of u){const r=await t.key,a=await t.value;if("aborted"===r.status||"aborted"===a.status)return i.INVALID;"dirty"!==r.status&&"dirty"!==a.status||n.dirty(),e.set(r.value,a.value)}return{status:n.value,value:e}})}{const e=new Map;for(const t of u){const r=t.key,a=t.value;if("aborted"===r.status||"aborted"===a.status)return i.INVALID;"dirty"!==r.status&&"dirty"!==a.status||n.dirty(),e.set(r.value,a.value)}return{status:n.value,value:e}}}}a5.ZodMap=te,te.create=(e,t,n)=>new te({valueType:t,keyType:e,typeName:we.ZodMap,...s(n)});class ne extends l{_parse(t){const{status:n,ctx:o}=this._processInputParams(t);if(o.parsedType!==r.ZodParsedType.set)return(0,i.addIssueToContext)(o,{code:e.ZodIssueCode.invalid_type,expected:r.ZodParsedType.set,received:o.parsedType}),i.INVALID;const s=this._def;null!==s.minSize&&o.data.size<s.minSize.value&&((0,i.addIssueToContext)(o,{code:e.ZodIssueCode.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),n.dirty()),null!==s.maxSize&&o.data.size>s.maxSize.value&&((0,i.addIssueToContext)(o,{code:e.ZodIssueCode.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),n.dirty());const l=this._def.valueType;function u(e){const t=new Set;for(const r of e){if("aborted"===r.status)return i.INVALID;"dirty"===r.status&&n.dirty(),t.add(r.value)}return{status:n.value,value:t}}const c=[...o.data.values()].map((e,t)=>l._parse(new a(o,e,o.path,t)));return o.common.async?Promise.all(c).then(e=>u(e)):u(c)}min(e,t){return new ne({...this._def,minSize:{value:e,message:n.errorUtil.toString(t)}})}max(e,t){return new ne({...this._def,maxSize:{value:e,message:n.errorUtil.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}a5.ZodSet=ne,ne.create=(e,t)=>new ne({valueType:e,minSize:null,maxSize:null,typeName:we.ZodSet,...s(t)});class ie extends l{constructor(){super(...arguments),this.validate=this.implement}_parse(n){const{ctx:a}=this._processInputParams(n);if(a.parsedType!==r.ZodParsedType.function)return(0,i.addIssueToContext)(a,{code:e.ZodIssueCode.invalid_type,expected:r.ZodParsedType.function,received:a.parsedType}),i.INVALID;function o(n,r){return(0,i.makeIssue)({data:n,path:a.path,errorMaps:[a.common.contextualErrorMap,a.schemaErrorMap,(0,t.getErrorMap)(),t.defaultErrorMap].filter(e=>!!e),issueData:{code:e.ZodIssueCode.invalid_arguments,argumentsError:r}})}function s(n,r){return(0,i.makeIssue)({data:n,path:a.path,errorMaps:[a.common.contextualErrorMap,a.schemaErrorMap,(0,t.getErrorMap)(),t.defaultErrorMap].filter(e=>!!e),issueData:{code:e.ZodIssueCode.invalid_return_type,returnTypeError:r}})}const l={errorMap:a.common.contextualErrorMap},u=a.data;if(this._def.returns instanceof ue){const t=this;return(0,i.OK)(async function(...n){const i=new e.ZodError([]),r=await t._def.args.parseAsync(n,l).catch(e=>{throw i.addIssue(o(n,e)),i}),a=await Reflect.apply(u,this,r),c=await t._def.returns._def.type.parseAsync(a,l).catch(e=>{throw i.addIssue(s(a,e)),i});return c})}{const t=this;return(0,i.OK)(function(...n){const i=t._def.args.safeParse(n,l);if(!i.success)throw new e.ZodError([o(n,i.error)]);const r=Reflect.apply(u,this,i.data),a=t._def.returns.safeParse(r,l);if(!a.success)throw new e.ZodError([s(r,a.error)]);return a.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new ie({...this._def,args:J.create(e).rest(z.create())})}returns(e){return new ie({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,n){return new ie({args:e||J.create([]).rest(z.create()),returns:t||z.create(),typeName:we.ZodFunction,...s(n)})}}a5.ZodFunction=ie;class re extends l{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}a5.ZodLazy=re,re.create=(e,t)=>new re({getter:e,typeName:we.ZodLazy,...s(t)});class ae extends l{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return(0,i.addIssueToContext)(n,{received:n.data,code:e.ZodIssueCode.invalid_literal,expected:this._def.value}),i.INVALID}return{status:"valid",value:t.data}}get value(){return this._def.value}}function oe(e,t){return new se({values:e,typeName:we.ZodEnum,...s(t)})}a5.ZodLiteral=ae,ae.create=(e,t)=>new ae({value:e,typeName:we.ZodLiteral,...s(t)});class se extends l{_parse(t){if("string"!=typeof t.data){const n=this._getOrReturnCtx(t),a=this._def.values;return(0,i.addIssueToContext)(n,{expected:r.util.joinValues(a),received:n.parsedType,code:e.ZodIssueCode.invalid_type}),i.INVALID}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return(0,i.addIssueToContext)(n,{received:n.data,code:e.ZodIssueCode.invalid_enum_value,options:r}),i.INVALID}return(0,i.OK)(t.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return se.create(e,{...this._def,...t})}exclude(e,t=this._def){return se.create(this.options.filter(t=>!e.includes(t)),{...this._def,...t})}}a5.ZodEnum=se,se.create=oe;class le extends l{_parse(t){const n=r.util.getValidEnumValues(this._def.values),a=this._getOrReturnCtx(t);if(a.parsedType!==r.ZodParsedType.string&&a.parsedType!==r.ZodParsedType.number){const t=r.util.objectValues(n);return(0,i.addIssueToContext)(a,{expected:r.util.joinValues(t),received:a.parsedType,code:e.ZodIssueCode.invalid_type}),i.INVALID}if(this._cache||(this._cache=new Set(r.util.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){const t=r.util.objectValues(n);return(0,i.addIssueToContext)(a,{received:a.data,code:e.ZodIssueCode.invalid_enum_value,options:t}),i.INVALID}return(0,i.OK)(t.data)}get enum(){return this._def.values}}a5.ZodNativeEnum=le,le.create=(e,t)=>new le({values:e,typeName:we.ZodNativeEnum,...s(t)});class ue extends l{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==r.ZodParsedType.promise&&!1===n.common.async)return(0,i.addIssueToContext)(n,{code:e.ZodIssueCode.invalid_type,expected:r.ZodParsedType.promise,received:n.parsedType}),i.INVALID;const a=n.parsedType===r.ZodParsedType.promise?n.data:Promise.resolve(n.data);return(0,i.OK)(a.then(e=>this._def.type.parseAsync(e,{path:n.path,errorMap:n.common.contextualErrorMap})))}}a5.ZodPromise=ue,ue.create=(e,t)=>new ue({type:e,typeName:we.ZodPromise,...s(t)});class ce extends l{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===we.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:n}=this._processInputParams(e),a=this._def.effect||null,o={addIssue:e=>{(0,i.addIssueToContext)(n,e),e.fatal?t.abort():t.dirty()},get path(){return n.path}};if(o.addIssue=o.addIssue.bind(o),"preprocess"===a.type){const e=a.transform(n.data,o);if(n.common.async)return Promise.resolve(e).then(async e=>{if("aborted"===t.value)return i.INVALID;const r=await this._def.schema._parseAsync({data:e,path:n.path,parent:n});return"aborted"===r.status?i.INVALID:"dirty"===r.status||"dirty"===t.value?(0,i.DIRTY)(r.value):r});{if("aborted"===t.value)return i.INVALID;const r=this._def.schema._parseSync({data:e,path:n.path,parent:n});return"aborted"===r.status?i.INVALID:"dirty"===r.status||"dirty"===t.value?(0,i.DIRTY)(r.value):r}}if("refinement"===a.type){const e=e=>{const t=a.refinement(e,o);if(n.common.async)return Promise.resolve(t);if(t instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return e};if(!1===n.common.async){const r=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return"aborted"===r.status?i.INVALID:("dirty"===r.status&&t.dirty(),e(r.value),{status:t.value,value:r.value})}return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(n=>"aborted"===n.status?i.INVALID:("dirty"===n.status&&t.dirty(),e(n.value).then(()=>({status:t.value,value:n.value}))))}if("transform"===a.type){if(!1===n.common.async){const e=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!(0,i.isValid)(e))return i.INVALID;const r=a.transform(e.value,o);if(r instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:r}}return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(e=>(0,i.isValid)(e)?Promise.resolve(a.transform(e.value,o)).then(e=>({status:t.value,value:e})):i.INVALID)}r.util.assertNever(a)}}a5.ZodEffects=ce,a5.ZodTransformer=ce,ce.create=(e,t,n)=>new ce({schema:e,typeName:we.ZodEffects,effect:t,...s(n)}),ce.createWithPreprocess=(e,t,n)=>new ce({schema:t,effect:{type:"preprocess",transform:e},typeName:we.ZodEffects,...s(n)});class de extends l{_parse(e){return this._getType(e)===r.ZodParsedType.undefined?(0,i.OK)(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}a5.ZodOptional=de,de.create=(e,t)=>new de({innerType:e,typeName:we.ZodOptional,...s(t)});class he extends l{_parse(e){return this._getType(e)===r.ZodParsedType.null?(0,i.OK)(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}a5.ZodNullable=he,he.create=(e,t)=>new he({innerType:e,typeName:we.ZodNullable,...s(t)});class me extends l{_parse(e){const{ctx:t}=this._processInputParams(e);let n=t.data;return t.parsedType===r.ZodParsedType.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}a5.ZodDefault=me,me.create=(e,t)=>new me({innerType:e,typeName:we.ZodDefault,defaultValue:"function"==typeof t.default?t.default:()=>t.default,...s(t)});class pe extends l{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},a=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return(0,i.isAsync)(a)?a.then(t=>({status:"valid",value:"valid"===t.status?t.value:this._def.catchValue({get error(){return new e.ZodError(r.common.issues)},input:r.data})})):{status:"valid",value:"valid"===a.status?a.value:this._def.catchValue({get error(){return new e.ZodError(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}a5.ZodCatch=pe,pe.create=(e,t)=>new pe({innerType:e,typeName:we.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:()=>t.catch,...s(t)});class fe extends l{_parse(t){if(this._getType(t)!==r.ZodParsedType.nan){const n=this._getOrReturnCtx(t);return(0,i.addIssueToContext)(n,{code:e.ZodIssueCode.invalid_type,expected:r.ZodParsedType.nan,received:n.parsedType}),i.INVALID}return{status:"valid",value:t.data}}}a5.ZodNaN=fe,fe.create=e=>new fe({typeName:we.ZodNaN,...s(e)}),a5.BRAND=Symbol("zod_brand");class ge extends l{_parse(e){const{ctx:t}=this._processInputParams(e),n=t.data;return this._def.type._parse({data:n,path:t.path,parent:t})}unwrap(){return this._def.type}}a5.ZodBranded=ge;class _e extends l{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.common.async){return(async()=>{const e=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return"aborted"===e.status?i.INVALID:"dirty"===e.status?(t.dirty(),(0,i.DIRTY)(e.value)):this._def.out._parseAsync({data:e.value,path:n.path,parent:n})})()}{const e=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return"aborted"===e.status?i.INVALID:"dirty"===e.status?(t.dirty(),{status:"dirty",value:e.value}):this._def.out._parseSync({data:e.value,path:n.path,parent:n})}}static create(e,t){return new _e({in:e,out:t,typeName:we.ZodPipeline})}}a5.ZodPipeline=_e;class ve extends l{_parse(e){const t=this._def.innerType._parse(e),n=e=>((0,i.isValid)(e)&&(e.value=Object.freeze(e.value)),e);return(0,i.isAsync)(t)?t.then(e=>n(e)):n(t)}unwrap(){return this._def.innerType}}function ye(e,t){const n="function"==typeof e?e(t):"string"==typeof e?{message:e}:e;return"string"==typeof n?{message:n}:n}function be(e,t={},n){return e?H.create().superRefine((i,r)=>{const a=e(i);if(a instanceof Promise)return a.then(e=>{if(!e){const e=ye(t,i),a=e.fatal??n??!0;r.addIssue({code:"custom",...e,fatal:a})}});if(!a){const e=ye(t,i),a=e.fatal??n??!0;r.addIssue({code:"custom",...e,fatal:a})}}):H.create()}var we,Se;a5.ZodReadonly=ve,ve.create=(e,t)=>new ve({innerType:e,typeName:we.ZodReadonly,...s(t)}),a5.late={object:$.lazycreate},(Se=we||(a5.ZodFirstPartyTypeKind=we={})).ZodString="ZodString",Se.ZodNumber="ZodNumber",Se.ZodNaN="ZodNaN",Se.ZodBigInt="ZodBigInt",Se.ZodBoolean="ZodBoolean",Se.ZodDate="ZodDate",Se.ZodSymbol="ZodSymbol",Se.ZodUndefined="ZodUndefined",Se.ZodNull="ZodNull",Se.ZodAny="ZodAny",Se.ZodUnknown="ZodUnknown",Se.ZodNever="ZodNever",Se.ZodVoid="ZodVoid",Se.ZodArray="ZodArray",Se.ZodObject="ZodObject",Se.ZodUnion="ZodUnion",Se.ZodDiscriminatedUnion="ZodDiscriminatedUnion",Se.ZodIntersection="ZodIntersection",Se.ZodTuple="ZodTuple",Se.ZodRecord="ZodRecord",Se.ZodMap="ZodMap",Se.ZodSet="ZodSet",Se.ZodFunction="ZodFunction",Se.ZodLazy="ZodLazy",Se.ZodLiteral="ZodLiteral",Se.ZodEnum="ZodEnum",Se.ZodEffects="ZodEffects",Se.ZodNativeEnum="ZodNativeEnum",Se.ZodOptional="ZodOptional",Se.ZodNullable="ZodNullable",Se.ZodDefault="ZodDefault",Se.ZodCatch="ZodCatch",Se.ZodPromise="ZodPromise",Se.ZodBranded="ZodBranded",Se.ZodPipeline="ZodPipeline",Se.ZodReadonly="ZodReadonly";a5.instanceof=(e,t={message:`Input not instance of ${e.name}`})=>be(t=>t instanceof e,t);const ke=L.create;a5.string=ke;const Ce=M.create;a5.number=Ce;const Ee=fe.create;a5.nan=Ee;const xe=D.create;a5.bigint=xe;const Ie=N.create;a5.boolean=Ie;const Te=F.create;a5.date=Te;const Oe=B.create;a5.symbol=Oe;const Re=j.create;a5.undefined=Re;const Ae=V.create;a5.null=Ae;const Le=H.create;a5.any=Le;const Pe=z.create;a5.unknown=Pe;const Me=U.create;a5.never=Me;const De=G.create;a5.void=De;const Ne=W.create;a5.array=Ne;const Fe=$.create;a5.object=Fe;const Be=$.strictCreate;a5.strictObject=Be;const je=X.create;a5.union=je;const Ve=Z.create;a5.discriminatedUnion=Ve;const He=Q.create;a5.intersection=He;const ze=J.create;a5.tuple=ze;const Ue=ee.create;a5.record=Ue;const Ge=te.create;a5.map=Ge;const We=ne.create;a5.set=We;const Ye=ie.create;a5.function=Ye;const $e=re.create;a5.lazy=$e;const Xe=ae.create;a5.literal=Xe;const qe=se.create;a5.enum=qe;const Ze=le.create;a5.nativeEnum=Ze;const Ke=ue.create;a5.promise=Ke;const Qe=ce.create;a5.effect=Qe,a5.transformer=Qe;const Je=de.create;a5.optional=Je;const et=he.create;a5.nullable=et;const tt=ce.createWithPreprocess;a5.preprocess=tt;const nt=_e.create;a5.pipeline=nt;a5.ostring=()=>ke().optional();a5.onumber=()=>Ce().optional();return a5.oboolean=()=>Ie().optional(),a5.coerce={string:e=>L.create({...e,coerce:!0}),number:e=>M.create({...e,coerce:!0}),boolean:e=>N.create({...e,coerce:!0}),bigint:e=>D.create({...e,coerce:!0}),date:e=>F.create({...e,coerce:!0})},a5.NEVER=i.INVALID,a5}function u5(){return e5||(e5=1,e=F9,t=F9&&F9.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=F9&&F9.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)},Object.defineProperty(e,"__esModule",{value:!0}),n(W9(),e),n(X9(),e),n(K9(),e),n(z9(),e),n(l5(),e),n(U9(),e)),F9;var e,t,n}function c5(){return t5||(t5=1,function(e){var t=N9&&N9.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=N9&&N9.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=N9&&N9.__importStar||function(e){if(e&&e.__esModule)return e;var i={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&t(i,e,r);return n(i,e),i},r=N9&&N9.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),e.z=void 0;const a=i(u5());e.z=a,r(u5(),e),e.default=a}(N9)),N9}function d5(){if(n5)return D9;n5=1,Object.defineProperty(D9,"__esModule",{value:!0}),D9.recommendationPropsSchema=D9.calculatorParamsSchema=D9.activitySchema=D9.activityReductionSchema=void 0;var e=c5(),t=NL(),n=r4();const i=(t,n)=>e.z.number().refine(e=>e>=t.min&&e<=t.max,{message:n}),r=D9.activityReductionSchema=e.z.object({fromZero:i(n.ACTIVITY_SETTINGS_INTERVAL_LIMITS),fromThirty:i(n.ACTIVITY_SETTINGS_INTERVAL_LIMITS),fromFortysix:i(n.ACTIVITY_SETTINGS_INTERVAL_LIMITS)}),a=D9.activitySchema=e.z.object({activityDuration:i(n.ACTIVITY_DURATION_MINUTES_LIMITS),activityIntensity:e.z.nativeEnum(t.ActivityIntensity).nullable(),activitySettings:e.z.object({light:r,moderate:r,hard:e.z.object({...r.shape,fromFortysix:i(n.ACTIVITY_SETTINGS_INTERVAL_LIMITS).nullable()}),post:r,target:i(n.ACTIVITY_TARGET_BGL_MMOL_LIMITS)}),activityDate:e.z.date()}).nullable(),o=D9.calculatorParamsSchema=e.z.object({currentBGL:i(n.CURRENT_BGL_MMOL_LIMITS).nullable(),targetBGL:i(n.TARGET_BGL_MMOL_LIMITS),insulinSensitivity:i(n.INSULIN_SENSITIVITY_MMOL_LIMITS),carbohydrates:i(n.CARBOHYDRATES_LIMITS),carbohydrateRatio:i(n.INSULIN_TO_CARBS_RATIO_LIMITS),recentBoluses:e.z.array(e.z.object({secondsPassed:i(n.BOLUS_SECONDS_PASSED_LIMITS),insulinDose:i(n.INSULIN_DOSE_LIMITS)})),activity:a});return D9.recommendationPropsSchema=e.z.object({bloodGlucoseUnit:e.z.nativeEnum(t.BloodGlucoseUnit),injectionMethod:e.z.nativeEnum(t.InjectionMethod),language:e.z.string().refine(e=>Object.keys(t.Languages).includes(e)),calculatorParams:o}),D9}function h5(){if(i5)return B3;i5=1,Object.defineProperty(B3,"__esModule",{value:!0}),B3.default=B3.SyncStatus=B3.RecommendationScreen=void 0;var e=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=T(t);if(n&&n.has(e))return n.get(e);var i={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&{}.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(i,a,o):i[a]=e[a]}return i.default=e,n&&n.set(e,i),i}(S()),t=JB,n=j3,i=xq(),r=NL(),a=I(f4()),o=I(G4()),s=I(function(){if(W4)return Y4;W4=1,Object.defineProperty(Y4,"__esModule",{value:!0}),Y4.default=void 0,function(e){e&&e.__esModule}(S());var e=JB,t=J3(),n=l();const i=e.StyleSheet.create({container:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",width:"100%"},line:{width:8,height:1,borderRadius:4,backgroundColor:t.COLORS.borderDivider}});return Y4.default=function(){const t=Array.from({length:25},(e,t)=>`dot-${t}`);return(0,n.jsx)(e.View,{style:i.container,children:t.map(t=>(0,n.jsx)(e.View,{testID:t,style:i.line},t))})},Y4}()),u=I(t9()),c=I(function(){if(n9)return i9;n9=1,Object.defineProperty(i9,"__esModule",{value:!0}),i9.default=void 0,a(S());var e=JB,t=s4(),n=J3(),i=a(p4()),r=l();function a(e){return e&&e.__esModule?e:{default:e}}const o=e.StyleSheet.create({container:{justifyContent:"flex-end",gap:16,backgroundColor:n.COLORS.bgNavigationBar,padding:16},saveButton:{paddingHorizontal:16,paddingVertical:12,backgroundColor:n.COLORS.bgBrand,borderRadius:16,borderColor:n.COLORS.borderOnBrand,borderWidth:1},deleteButton:{paddingHorizontal:16,paddingVertical:12,backgroundColor:n.COLORS.bgButtonSecondary,borderRadius:16},saveText:{...n.FONTS.Poppins.semiBold_Base,textAlign:"center"},deleteText:{...n.FONTS.Poppins.semiBold_Base,color:n.COLORS.textSecondaryDanger,textAlign:"center"}});return i9.default=function({prefixTestID:n,onSave:a,onDelete:s,onLayout:l}){const{t:u}=(0,t.useLanguage)();return(0,r.jsxs)(e.View,{style:o.container,onLayout:l,testID:n+"-footer",children:[(0,r.jsx)(e.TouchableOpacity,{style:o.saveButton,onPress:a,testID:n+"-footer-save-button",children:(0,r.jsx)(i.default,{style:o.saveText,children:u("button_save")})}),(0,r.jsx)(e.TouchableOpacity,{style:o.deleteButton,onPress:s,testID:n+"-footer-delete-button",children:(0,r.jsx)(i.default,{style:o.deleteText,children:u("button_delete")})})]})},i9}()),d=I(function(){if(l9)return r9;l9=1,Object.defineProperty(r9,"__esModule",{value:!0}),r9.default=void 0;var e=d(a9),t=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=c(t);if(n&&n.has(e))return n.get(e);var i={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&{}.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(i,a,o):i[a]=e[a]}return i.default=e,n&&n.set(e,i),i}(S()),n=JB,i=vA,r=J3(),a=d(o9),o=d(s9),s=s4(),u=l();function c(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(c=function(e){return e?n:t})(e)}function d(e){return e&&e.__esModule?e:{default:e}}const h=n.Animated.createAnimatedComponent(e.default),m=n.StyleSheet.create({containerEdit:{justifyContent:"center",alignContent:"center",paddingVertical:7.25,height:64,borderTopLeftRadius:12,borderTopRightRadius:12,backgroundColor:r.COLORS.bgRecommendationCorrection},containerRecommendation:{justifyContent:"center",alignContent:"center",height:64},headerTextCrossed:{textDecorationLine:"line-through",color:r.COLORS.textOnRecommendationStrikethrough},headerText:{...r.FONTS.Poppins.medium_Base,color:r.COLORS.textOnRecommendation,textAlign:"center",letterSpacing:1.6},background:{height:64,overflow:"hidden",position:"absolute",top:0,borderTopLeftRadius:12,borderTopRightRadius:12,justifyContent:"center"},lottie:{height:128}});return r9.default=function({isEdited:e}){const{t:r}=(0,s.useLanguage)(),{width:l}=(0,n.useWindowDimensions)(),c=(0,i.useReducedMotion)(),d=(0,t.useRef)(null),p=(0,t.useRef)(null);return(0,t.useEffect)(()=>{const t=e?d.current:p.current;c?t?.pause():t?.play()},[c,e]),e?(0,u.jsxs)(n.View,{style:m.containerEdit,testID:"edited-recommendation-header",children:[(0,u.jsx)(n.View,{style:m.background,children:(0,u.jsx)(h,{ref:d,source:a.default,resizeMode:"cover",style:m.lottie,webStyle:m.lottie})}),(0,u.jsx)(n.Text,{style:[m.headerText,m.headerTextCrossed],children:r("recommendation_card_title").toUpperCase()}),(0,u.jsx)(n.Text,{style:m.headerText,children:r("recommendation_change_title").toUpperCase()})]}):(0,u.jsxs)(n.View,{style:m.containerRecommendation,testID:"initial-recommendation-header",children:[(0,u.jsx)(n.View,{style:[m.background,{width:l-32}],children:(0,u.jsx)(h,{ref:p,source:o.default,resizeMode:"cover",style:m.lottie,webStyle:m.lottie})}),(0,u.jsx)(n.Text,{style:m.headerText,children:r("recommendation_card_title").toUpperCase()})]})},r9}()),h=I(function(){if(u9)return c9;u9=1,Object.defineProperty(c9,"__esModule",{value:!0}),c9.default=void 0;var e=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=m(t);if(n&&n.has(e))return n.get(e);var i={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&{}.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(i,a,o):i[a]=e[a]}return i.default=e,n&&n.set(e,i),i}(S()),t=JB,n=NL(),i=h(w4()),r=r4(),a=s4(),o=J3(),s=c4(),u=h(p4()),c=h(U4()),d=l();function h(e){return e&&e.__esModule?e:{default:e}}function m(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(m=function(e){return e?n:t})(e)}const p=t.StyleSheet.create({container:{paddingVertical:48,justifyContent:"center",alignItems:"center"},title:{...o.FONTS.Poppins.medium_Base,color:o.COLORS.textInputTextSecondary},row:{flexDirection:"row",marginVertical:8,alignItems:"center"},value:{...o.FONTS.Poppins.bold_6XL,color:o.COLORS.text},crossedValue:{...o.FONTS.Poppins.bold_2XL,color:o.COLORS.textInputTextSecondary,textDecorationLine:"line-through",opacity:.4},crossedUnit:{...o.FONTS.Poppins.bold_2XL,color:o.COLORS.textInputTextSecondary},unit:{...o.FONTS.Poppins.bold_2XL,color:o.COLORS.text,lineHeight:78},editIcon:{marginLeft:4}});return c9.default=function({initialValue:o,editedValue:l,wasLimited:h,injectionMethod:m,onDismiss:f,onConfirm:g}){const{t:_}=(0,a.useLanguage)(),[v,y]=(0,e.useState)(!1),b=(0,e.useCallback)(()=>{y(!0)},[]),w=(0,e.useCallback)(()=>{y(!1)},[]),S=(0,e.useCallback)(e=>{y(!1),g(e)},[g]),k=(0,e.useMemo)(()=>{const{min:e,max:t}=r.INSULIN_DOSE_LIMITS,i=h?o:t;return m===n.InjectionMethod.Pump?(0,s.createSequentialArrayDecimal)(e,i):m===n.InjectionMethod.PenWhole?(0,s.createSequentialArrayInteger)(e,i):(0,s.createSequentialArrayHalf)(e,i)},[m,o,h]),C=(0,e.useMemo)(()=>m===n.InjectionMethod.PenWhole?0:1,[m]),E=(0,e.useCallback)(()=>{if(null!==l)return k.findIndex(e=>e===l.toFixed(C));const e=(0,s.roundInsulinValue)(o,m);return k.findIndex(t=>t===e.toFixed(C))},[l,o,k,m,C]);return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)(t.View,{style:p.container,children:[null!==l&&(0,d.jsxs)(u.default,{style:p.crossedValue,testID:"insulin-initial-value",children:[`${o} `,(0,d.jsx)(u.default,{style:p.crossedUnit,testID:"insulin-initial-unit",children:_(1===o?"unit":"units")})]}),(0,d.jsxs)(t.TouchableOpacity,{style:p.row,testID:"insulin-current-value-container",onPress:b,children:[(0,d.jsxs)(u.default,{style:p.value,testID:"insulin-value",children:[`${l??o} `,(0,d.jsx)(u.default,{style:p.unit,testID:"insulin-unit",children:_(1===(l??o)?"unit":"units")})]}),(0,d.jsx)(t.TouchableOpacity,{onPress:b,testID:"insulin-edit-button",hitSlop:10,children:(0,d.jsx)(i.default,{style:p.editIcon})})]}),(0,d.jsx)(u.default,{style:p.title,testID:"insulin-display-title",children:_("recommendation_rapid_title")})]}),(0,d.jsx)(c.default,{type:"insulin",items:k,isVisible:v,initialScrollIndex:E(),onConfirm:S,onCancel:w,onDismiss:f})]})},c9}()),m=I(function(){if(h9)return m9;h9=1,Object.defineProperty(m9,"__esModule",{value:!0}),m9.default=void 0,o(S());var e=JB,t=s4(),n=o(p4()),i=o(P4()),r=f9(),a=l();function o(e){return e&&e.__esModule?e:{default:e}}return m9.default=o=>{const{isVisible:s,onPressClose:l}=o,{t:u}=(0,t.useLanguage)();return(0,a.jsx)(i.default,{isVisible:s,children:(0,a.jsxs)(e.View,{testID:"delete-failure-modal-visible-"+s,children:[(0,a.jsx)(n.default,{style:r.styles.title,testID:"delete-modal-failure-title",children:u("new_activity_modal_no_delete_title")}),(0,a.jsx)(n.default,{style:r.styles.message,testID:"delete-modal-failure-message",children:u("new_activity_modal_no_delete_body")}),(0,a.jsx)(e.TouchableOpacity,{style:r.styles.deleteFailureCloseButton,onPress:l,testID:"delete-modal-failure-close-button",children:(0,a.jsx)(n.default,{style:r.styles.buttonText,children:u("button_close")})})]})})},m9}()),p=I(function(){if(g9)return _9;g9=1,Object.defineProperty(_9,"__esModule",{value:!0}),_9.default=void 0,o(S());var e=JB,t=s4(),n=o(p4()),i=o(P4()),r=f9(),a=l();function o(e){return e&&e.__esModule?e:{default:e}}return _9.default=o=>{const{isVisible:s,onPressDelete:l,onPressCancel:u,onDismiss:c}=o,{t:d}=(0,t.useLanguage)();return(0,a.jsx)(i.default,{onModalHide:c,isVisible:s,children:(0,a.jsxs)(e.View,{testID:"delete-modal-visible-"+s,children:[(0,a.jsx)(n.default,{style:r.styles.title,testID:"delete-modal-title",children:d("recommendation_modal_delete_rec_title")}),(0,a.jsx)(n.default,{style:r.styles.message,testID:"delete-modal-message",children:d("recommendation_modal_delete_rec_body")}),(0,a.jsxs)(e.View,{style:r.styles.buttonContainer,children:[(0,a.jsx)(e.TouchableOpacity,{style:r.styles.deleteRedButton,onPress:l,testID:"delete-modal-delete-button",children:(0,a.jsx)(n.default,{style:r.styles.buttonText,children:d("recommendation_modal_delete_rec_button_danger_delete")})}),(0,a.jsx)(e.TouchableOpacity,{style:r.styles.cancelButton,onPress:u,testID:"delete-modal-cancel-button",children:(0,a.jsx)(n.default,{style:r.styles.buttonText,children:d("button_cancel")})})]})]})})},_9}()),f=I(function(){if(v9)return y9;v9=1,Object.defineProperty(y9,"__esModule",{value:!0}),y9.default=void 0,o(S());var e=JB,t=s4(),n=o(p4()),i=o(P4()),r=f9(),a=l();function o(e){return e&&e.__esModule?e:{default:e}}return y9.default=o=>{const{isVisible:s,onPressClose:l}=o,{t:u}=(0,t.useLanguage)();return(0,a.jsx)(i.default,{isVisible:s,children:(0,a.jsxs)(e.View,{testID:"edit-failure-modal-visible-"+s,children:[(0,a.jsx)(n.default,{style:r.styles.title,testID:"edit-modal-failure-title",children:u("glucose_modal_changes_title")}),(0,a.jsx)(n.default,{style:r.styles.message,testID:"edit-modal-failure-message",children:u("glucose_modal_changes_body")}),(0,a.jsx)(e.TouchableOpacity,{style:r.styles.deleteFailureCloseButton,onPress:l,testID:"edit-modal-failure-close-button",children:(0,a.jsx)(n.default,{style:r.styles.buttonText,children:u("glucose_modal_changes_button_confirm")})})]})})},y9}()),g=I(function(){if(b9)return w9;b9=1,Object.defineProperty(w9,"__esModule",{value:!0}),w9.default=void 0,w9.getLimitedValue=d;var e=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=c(t);if(n&&n.has(e))return n.get(e);var i={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&{}.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(i,a,o):i[a]=e[a]}return i.default=e,n&&n.set(e,i),i}(S()),t=JB,n=NL(),i=s4(),r=u(p4()),a=u(P4()),o=f9(),s=l();function u(e){return e&&e.__esModule?e:{default:e}}function c(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(c=function(e){return e?n:t})(e)}function d(e){return n.CONSTANTS.INSULIN_DOSE_MAX-n.CONSTANTS.INSULIN_DOSE_MAX*e}return w9.default=l=>{const{isVisible:u,activityReduction:c,onPress:h}=l,{t:m}=(0,i.useLanguage)(),p=(0,e.useMemo)(()=>null===c?m("recommendation_modal_safety_limitation_body",{SAFETY_INSULIN_LIMIT:`${n.CONSTANTS.INSULIN_DOSE_MAX}`}):m("recommendation_modal_safety_limitation2_body",{0:`${d(c)}`,SAFETY_INSULIN_LIMIT:`${n.CONSTANTS.INSULIN_DOSE_MAX}`,1:`${(100*c).toFixed(0)}`,2:`${d(c)}`}),[c,m]);return(0,s.jsx)(a.default,{isVisible:u,children:(0,s.jsxs)(t.View,{testID:"limitation-modal-visible-"+u,children:[(0,s.jsx)(r.default,{style:o.styles.title,children:m("recommendation_modal_safety_limitation_title")}),(0,s.jsx)(r.default,{style:o.styles.message,testID:"limitation-modal-message",children:p}),(0,s.jsx)(t.TouchableOpacity,{style:o.styles.button,onPress:h,testID:"limitation-modal-button",children:(0,s.jsx)(r.default,{style:o.styles.buttonText,children:m("button_understood")})})]})})},w9}()),_=I(function(){if(S9)return k9;S9=1,Object.defineProperty(k9,"__esModule",{value:!0}),k9.default=void 0,o(S());var e=JB,t=s4(),n=o(p4()),i=o(P4()),r=f9(),a=l();function o(e){return e&&e.__esModule?e:{default:e}}return k9.default=o=>{const{isVisible:s,onPressClose:l}=o,{t:u}=(0,t.useLanguage)();return(0,a.jsx)(i.default,{isVisible:s,children:(0,a.jsxs)(e.View,{testID:"save-failure-modal-visible-"+s,children:[(0,a.jsx)(n.default,{style:r.styles.title,testID:"save-modal-failure-title",children:u("no_save_modal_title")}),(0,a.jsx)(n.default,{style:r.styles.message,testID:"save-modal-failure-message",children:u("no_save_modal_body")}),(0,a.jsx)(e.TouchableOpacity,{style:r.styles.deleteFailureCloseButton,onPress:l,testID:"save-modal-failure-close-button",children:(0,a.jsx)(n.default,{style:r.styles.buttonText,children:u("button_close")})})]})})},k9}()),v=I(function(){if(C9)return E9;C9=1,Object.defineProperty(E9,"__esModule",{value:!0}),E9.default=void 0,o(S());var e=JB,t=s4(),n=o(p4()),i=o(P4()),r=f9(),a=l();function o(e){return e&&e.__esModule?e:{default:e}}return E9.default=o=>{const{isVisible:s,onPressViewInLogbook:l,onPressCancel:u,onDismiss:c}=o,{t:d}=(0,t.useLanguage)(),h="web"===e.Platform.OS;return(0,a.jsx)(i.default,{checkmark:!0,onModalHide:c,isVisible:s,children:(0,a.jsxs)(e.View,{testID:"timeout-modal-visible-"+s,children:[(0,a.jsx)(n.default,{style:r.styles.title,testID:"timeout-modal-title",children:d("recommendation_modal_auto_saved_title")}),(0,a.jsx)(n.default,{style:r.styles.message,testID:"timeout-modal-message",children:d("recommendation_modal_auto_saved_body")}),(0,a.jsxs)(e.View,{style:r.styles.buttonContainer,children:[!h&&(0,a.jsx)(e.TouchableOpacity,{style:r.styles.saveButton,onPress:l,testID:"timeout-modal-view-button",children:(0,a.jsx)(n.default,{style:r.styles.saveText,children:d("recommendation_modal_auto_saved_button_confirm")})}),(0,a.jsx)(e.TouchableOpacity,{style:r.styles.cancelButton,onPress:u,testID:"timeout-modal-close-button",children:(0,a.jsx)(n.default,{style:r.styles.closeText,children:d("button_close")})})]})]})})},E9}()),y=I(R9()),b=r4(),w=s4(),k=J3(),C=c4(),E=d5(),x=l();function I(e){return e&&e.__esModule?e:{default:e}}function T(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(T=function(e){return e?n:t})(e)}let O=B3.SyncStatus=function(e){return e.Idle="Idle",e.Success="Success",e.Loading="Loading",e.Failure="Failure",e}({});const R=l=>{const S=(0,n.useSafeAreaInsets)(),{changeLanguage:k}=(0,w.useLanguage)();"android"===t.Platform.OS&&t.UIManager.setLayoutAnimationEnabledExperimental?.(!0);const{height:I}=(0,t.useWindowDimensions)(),T=(0,e.useMemo)(()=>I-S.bottom-S.top,[I,S.bottom,S.top]),R=(0,e.useRef)(null),{deleteStatus:L,editStatus:P,saveStatus:M,calculatorParams:D,bloodGlucoseUnit:N,injectionMethod:F,transferEditedRecommendation:B,closeCalculationFooter:j,closeCalculationTimeoutModal:V,deleteCalculation:H,closeCalculationViewInlogbook:z,trackRecommendationTimeout:U,trackExpandDetails:G}=l,{currentBGL:W,carbohydrates:Y,activity:$}=D,X=(0,e.useRef)(new Date).current,q=(0,e.useRef)((0,i.calculateRecommendation)(D)).current,[Z,K]=(0,e.useState)(null),[Q,J]=(0,e.useState)(null),[ee,te]=(0,e.useState)(null),[ne,ie]=(0,e.useState)(null),[re,ae]=(0,e.useState)(0),[oe,se]=(0,e.useState)(0),[le,ue]=(0,e.useState)(0),[ce,de]=(0,e.useState)(!0),[he,me]=(0,e.useState)(!1),[pe,fe]=(0,e.useState)(!1),[ge,_e]=(0,e.useState)(!0),[ve,ye]=(0,e.useState)(!1),[be,we]=(0,e.useState)(!1),[Se,ke]=(0,e.useState)(!1),[Ce,Ee]=(0,e.useState)(!1),[xe,Ie]=(0,e.useState)(!1),[Te,Oe]=(0,e.useState)(!1),[Re,Ae]=(0,e.useState)(!1),[Le,Pe]=(0,e.useState)(!1),[Me,De]=(0,e.useState)(!1);(0,e.useEffect)(()=>{L===O.Failure&&Pe(!0)},[L]),(0,e.useEffect)(()=>{M===O.Failure&&Ae(!0)},[M]),(0,e.useEffect)(()=>{P===O.Success&&(K(Q),te(ne))},[L,P,ne,Q,M]),(0,e.useEffect)(()=>{E.recommendationPropsSchema.parse(l),k(l.language)},[k,l]),(0,e.useEffect)(()=>{q.wasLimited&&Oe(!0)},[q.wasLimited]),(0,e.useEffect)(()=>{const e=X.getTime(),t=setInterval(()=>{!((new Date).getTime()-e>b.TIMEOUT_MODAL_TRIGGER)||xe||Se||(ke(!0),Ie(!0),U())},1*r.Milliseconds.Second);return()=>clearInterval(t)},[Se,xe,X,U]);const Ne=(0,e.useCallback)(e=>{const t=X.getTime(),n=(new Date).getTime()-t>b.TIMEOUT_MODAL_TRIGGER;"active"===e&&n&&(Ie(!0),U())},[X,U]),Fe=(0,e.useCallback)(()=>(Ee(!0),!0),[]);(0,e.useEffect)(()=>{const e=t.AppState.addEventListener("change",Ne);let n=null;return"android"===t.Platform.OS&&(n=t.BackHandler.addEventListener("hardwareBackPress",Fe)),()=>{e.remove(),n?.remove()}},[Ne,Fe]);const Be=(0,e.useMemo)(()=>{if($)return{activityDuration:$.activityDuration,activityIntensity:$.activityIntensity,activityReduction:q.activityReduction}},[$,q.activityReduction]),je=(0,e.useCallback)(e=>{t.LayoutAnimation.configureNext(t.LayoutAnimation.Presets.easeInEaseOut);const n=(0,C.roundInsulinValue)(q.bolus,F),i=Math.round(q.carbRecommendation),r=e!==n?e:null;e!==n?J(e):(K(null),J(null)),B({modified:ee,suggested:i},{modified:r,suggested:n},X,q.activeInsulin,q.activityReduction)},[q,F,ee,B,X]),Ve=(0,e.useCallback)(e=>{t.LayoutAnimation.configureNext(t.LayoutAnimation.Presets.easeInEaseOut);const n=(0,C.roundInsulinValue)(q.bolus,F),i=Math.round(q.carbRecommendation),r=e!==i?e:null;e!==i?ie(e):(te(null),ie(null)),B({modified:r,suggested:i},{modified:Z,suggested:n},X,q.activeInsulin,q.activityReduction)},[q,F,Z,B,X]),He=(0,e.useCallback)(()=>{ve&&H()},[H,ve]),ze=(0,e.useCallback)(()=>{be?z():V()},[be,V,z]),Ue=(0,e.useCallback)(()=>{we(!0),Ie(!1)},[]),Ge=(0,e.useCallback)(()=>{ye(!0),Ee(!1)},[]),We=(0,e.useCallback)(()=>{P===O.Failure&&De(!0)},[P]),Ye=(0,e.useCallback)(()=>{De(!1)},[]),$e=(0,e.useCallback)((e,t)=>{ue(t)},[]),Xe=(0,e.useCallback)(()=>{R?.current?.scrollToEnd(),fe(!0),setTimeout(()=>_e(!1),1)},[]),qe=(0,e.useCallback)(e=>{const{layoutMeasurement:{height:t},contentOffset:{y:n}}=e.nativeEvent,i=Math.round(t+n),r=i>=le-re,a=i>=Math.round(le);me(r),ce&&de(!1),a&&fe(!0),a&&setTimeout(()=>_e(!1),1)},[re,le,ce]),Ze=(0,e.useMemo)(()=>Math.round(oe+re),[oe,re]);return Se?(0,x.jsx)(t.View,{style:A.timeoutContainer,children:(0,x.jsx)(t.View,{style:A.timeoutContainerBackground,children:(0,x.jsx)(v.default,{isVisible:xe,onPressViewInLogbook:Ue,onPressCancel:()=>Ie(!1),onDismiss:ze})})}):(0,x.jsxs)(x.Fragment,{children:[(0,x.jsxs)(t.ScrollView,{ref:R,scrollEventThrottle:16,style:A.scrollView,contentContainerStyle:[A.contentContainer,pe&&{paddingBottom:32}],testID:"recommendation-screen",onScroll:qe,onContentSizeChange:$e,children:[(0,x.jsxs)(t.View,{testID:"recommendation-content",onLayout:({nativeEvent:e})=>se(e.layout.height),style:A.contentRecommendationContainer,children:[(0,x.jsxs)(t.View,{style:A.recommendationContainer,children:[(0,x.jsx)(d.default,{isEdited:null!==Z}),(0,x.jsx)(h.default,{initialValue:(0,C.roundInsulinValue)(q.bolus,F),editedValue:Z,injectionMethod:F,wasLimited:q.wasLimited,onDismiss:We,onConfirm:je}),(0,x.jsx)(s.default,{}),(0,x.jsx)(u.default,{currentBGL:W,bloodGlucoseUnit:N,trackExpandDetails:G,carbIntakeValue:Math.round(Y),activeInsulin:Math.round(10*q.activeInsulin)/10,activity:Be})]}),(0,x.jsxs)(t.View,{style:A.extraRecommendationContainer,children:[Math.round(q.carbRecommendation)>0&&(0,x.jsx)(o.default,{carbsRecommendation:Math.round(q.carbRecommendation),editedCarbsRecommendation:ee,onDismiss:We,onConfirm:Ve}),(0,x.jsx)(a.default,{currentBGL:W,hasActivity:null!==$,glucoseUnit:N})]})]}),Ze>T&&ge&&(0,x.jsx)(c.default,{prefixTestID:"scroll",onSave:Xe,onDelete:Xe,onLayout:({nativeEvent:e})=>ae(e.layout.height)})]}),(0,x.jsx)(y.default,{scrollToEnd:Xe,isVisibleArrow:Ze>T&&ce,isVisibleBlur:Ze>T&&!he&&!pe}),(Ze<=T||pe)&&(0,x.jsx)(c.default,{prefixTestID:"fixed",onSave:j,onDelete:()=>Ee(!0),onLayout:({nativeEvent:e})=>ae(e.layout.height)}),(0,x.jsx)(g.default,{isVisible:Te,activityReduction:q.activityReduction,onPress:()=>Oe(!1)}),(0,x.jsx)(p.default,{isVisible:Ce,onPressDelete:Ge,onDismiss:He,onPressCancel:()=>Ee(!1)}),(0,x.jsx)(m.default,{isVisible:Le,onPressClose:()=>Pe(!1)}),(0,x.jsx)(_.default,{isVisible:Re,onPressClose:()=>Ae(!1)}),(0,x.jsx)(f.default,{isVisible:Me,onPressClose:Ye})]})};B3.RecommendationScreen=R;B3.default=e=>(0,x.jsx)(w.LanguageProvider,{children:(0,x.jsx)(R,{...e})});const A=t.StyleSheet.create({timeoutContainer:{...t.StyleSheet.absoluteFillObject,backgroundColor:k.COLORS.bgBackground},timeoutContainerBackground:{flex:1,opacity:.5},contentContainer:{backgroundColor:k.COLORS.bgBackground},contentRecommendationContainer:{gap:32,paddingVertical:32,backgroundColor:k.COLORS.bgBackground},extraRecommendationContainer:{paddingHorizontal:16},scrollView:{backgroundColor:k.COLORS.bgBackground,flex:1},recommendationContainer:{borderRadius:16,backgroundColor:k.COLORS.bgRecommendation,marginHorizontal:16}});return B3}var m5=(r5||(r5=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"RecommendationScreenWrapper",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(e,"SyncStatus",{enumerable:!0,get:function(){return t.SyncStatus}}),Object.defineProperty(e,"recommendationPropsSchema",{enumerable:!0,get:function(){return n.recommendationPropsSchema}});var t=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=i(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&{}.hasOwnProperty.call(e,o)){var s=a?Object.getOwnPropertyDescriptor(e,o):null;s&&(s.get||s.set)?Object.defineProperty(r,o,s):r[o]=e[o]}return r.default=e,n&&n.set(e,r),r}(h5()),n=d5();function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(i=function(e){return e?n:t})(e)}}(F3)),F3);function p5(e,t){const n=i$(e,"HH:mm"),i=function(e){const t=[];for(const n of e)t.push(nX(n.startTime,"HH:mm",new Date));return t}(t),r=nX(n,"HH:mm",new Date);for(let a=0;a<i.length;a++)if(f5(i[a],i[(a+1)%i.length],r))return t[a];throw new Error("[ParameterTimeIntervalsUtils::getDailyParameters] The parameter interval has not been found")}function f5(e,t,n){const i=s$(e,t),r=(a=n,+eY(e)===+eY(a)||s$(e,n));var a;const o=g5(e),s=g5(t,!i),l=g5(n,!r);return o<=l&&l<s}function g5(e,t){return e.getMinutes()+60*(e.getHours()+(t?24:0))}const _5=Ei.create({animationContainer:{flex:1,justifyContent:"center",alignItems:"center"},text:{..._L.bold_Base},animation:{width:327,height:327}}),v5=rF(function({setRemeasurementNotification:e}){const{t:t,language:n}=eV(),{glucoseMMOLL:i,glucoseSampleID:r}=V2(),{selectedEventUUID:a}=I2(),{carbohydrateStoreActions:o,manualCarbsInput:s,totalCarbsCartItems:l}=EX(),u=Gp(),c=M.useRef(!1),[d,h]=D.useState(!1),[m,p]=D.useState(null),[f,g]=D.useState(null),{glucoseUnit:_,injectionMethod:v,activity:y}=Vq;if(void 0===_)throw new Error("[LoadingRecommendationScreen::render] glucoseUnit is undefined");if(void 0===v)throw new Error("[LoadingRecommendationScreen::render] injectionMethod is undefined");if(void 0===y)throw new Error("[LoadingRecommendationScreen::render] activity is undefined");if(null===i)throw new Error("[LoadingRecommendationScreen::render] glucoseMMOLL is undefined");const b=M.useMemo(()=>a?Lq.getByUUID(a):null,[a]),w=M.useMemo(()=>null!==b&&b.startTimestamp?{activitySettings:y,activityDate:new Date(b.startTimestamp),activityDuration:b.durationSeconds/60,activityIntensity:b.activityIntensity}:null,[y,b]),{carbohydrateRatio:S,insulinSensitivity:k}=M.useMemo(()=>function(e){const t=Vq.treatmentParameters?.use===FL.Usage.Overall,{treatmentParameters:n}=Vq;if(void 0===n)throw new Error("[ParameterTimeIntervalsUtils::getInsulinParameters] treatmentParameters is undefined.");return t?n.overallParameters:p5(e,n.parameterIntervals)}(new Date),[]),{target:C}=M.useMemo(()=>function(e){const{glucoseLevelTargets:t}=Vq;if(void 0===t)throw new Error("[ParameterTimeIntervalsUtils::getBGLParameters] glucoseLevelTargets is undefined.");const n=t.use===FL.Usage.Overall,{overallTargetBGL:i,targetBGLIntervals:r}=t;if(n){if(void 0===i)throw new Error("[ParameterTimeIntervalsUtils::getBGLParameters] overallTargetBGL cannot be undefined");return i}if(void 0===r)throw new Error("[ParameterTimeIntervalsUtils::getBGLParameters] targetBGLIntervals cannot be undefined");return p5(e,r)}(new Date),[]),E=M.useMemo(()=>UQ.getRecentBoluses(),[]),x=M.useMemo(()=>({bloodGlucoseUnit:_,injectionMethod:v,language:n,calculatorParams:{currentBGL:i,activity:w,carbohydrateRatio:S,insulinSensitivity:k,carbohydrates:s+l,targetBGL:C,recentBoluses:E}}),[_,v,i,w,S,k,s,l,C,E,n]),I=M.useCallback(async()=>{const t=m5.recommendationPropsSchema.safeParse(x);if(!t.success)return NX(MX.RecommendationInvalid),console.error(t.error),void g(tV.Validation);const{activeInsulin:n,carbRecommendation:a,bolus:u,activityReduction:c}=Iq.calculateRecommendation(x.calculatorParams),d=Math.round(a),h=((e,t)=>{const n={[FL.InjectionMethod.PenWhole]:1,[FL.InjectionMethod.PenHalf]:2,[FL.InjectionMethod.Pump]:10}[t];return Math.round(e*n)/n})(u,v),m=new Date,f=s+l,_=await UQ.addLogbook(NQ({blood_glucose_millimolar:i,blood_glucose_millimolar_sample_id:r,entry_timestamp:m,event_uuid:b?b.uuid:null,carbohydrates_suggested_grams:d,carbohydrates_entered_grams:f+d,insulin_entered_units:h,insulin_suggested_units:h,active_insulin:n,activity_reduction:c}));null!==_?(null!==_.blood_glucose_millimolar&&void 0!==e&&await e(_.blood_glucose_millimolar),o.checkoutCart().catch(console.error),p(_),NX(MX.RecommendationSuccess)):g(tV.Sync)},[x,o,b,i,r,v,s,e,l]);return c.current||(c.current=!0,I().catch(console.error)),M.useEffect(()=>{setTimeout(()=>{h(!0)},1600)},[]),M.useEffect(()=>{u.setOptions({gestureEnabled:!1});return u.addListener("beforeRemove",({preventDefault:e})=>{d||e()})},[d,u]),M.useEffect(()=>{d&&null!==m&&null===f&&u.replace(C2.Recommendation,{...x,logbookEntry:m}),d&&null!==f&&u.navigate({name:C2.SummaryTab,params:{errorType:f}})},[f,d,m,x,u]),D.createElement(ga,{style:_5.animationContainer},D.createElement(qV,{autoPlay:!0,source:KV.LOADING_RECOMMENDATION,style:_5.animation,webStyle:_5.animation,resizeMode:"cover",loop:!0}),D.createElement(pj,{style:_5.text},t("recommendation_loading_title")))});const y5=oV?"/api/v2":zj.HEDIA_API_URL_V2;function b5(){const e=Gp(),t=cf(),{manualCarbsInput:n,totalCarbsCartItems:i}=EX(),[r,a]=M.useState(m5.SyncStatus.Idle),[o,s]=M.useState(m5.SyncStatus.Idle),[l,u]=M.useState(m5.SyncStatus.Idle),{bloodGlucoseUnit:c,calculatorParams:d,injectionMethod:h,language:m,logbookEntry:p}=t.params,[f,g]=M.useState(p),_=M.useCallback(e=>{const t=e.data.state;oV&&t.routes[t.index].name===C2.CalculationBottomTabs&&(X2(),window.location.href="/redirect?status=success",qj.clearAll())},[]);M.useEffect(()=>(e.addListener("state",_),()=>{e.removeListener("state",_)}),[e,_]),M.useEffect(()=>{e.setOptions({gestureEnabled:!1})},[e]);const v=M.useCallback(async(e,t,r,a,o)=>{u(m5.SyncStatus.Loading);const s=n+i,l=NQ({...f,entry_timestamp:r,carbohydrates_suggested_grams:e.suggested,carbohydrates_overwritten_suggested_grams:e.modified,carbohydrates_entered_grams:s+(e.modified??e.suggested),insulin_entered_units:t.modified??t.suggested,insulin_suggested_units:t.suggested,active_insulin:a,activity_reduction:o}),c=await UQ.addLogbook(l,f.uuid);c?(g(c),u(m5.SyncStatus.Success)):u(m5.SyncStatus.Failure)},[n,f,i]),y=M.useCallback(()=>{if(oV)throw new Error("Recommendation::handleOnCloseCalculationViewInLogbook] Cannot view-in-logbook on web");const{Logbooks:t,LogbooksTab:n}=C2;e.navigate(n,{screen:t,params:{logbookEntry:f}}),X2()},[e,f]),b=M.useCallback(()=>{oV?(window.location.href="/redirect?status=success",qj.clearAll()):e.dispatch(wm(C2.DashboardTab,{screen:C2.Dashboard})),X2()},[e]),w=M.useCallback(async()=>{a(m5.SyncStatus.Loading);const t=await UQ.deleteLogbook(f.uuid);if(oV)t?(window.location.href="/redirect?status=success",X2(),qj.clearAll()):a(m5.SyncStatus.Failure);else{X2();const{Dashboard:t,DashboardTab:n}=C2;e.navigate(n,{screen:t,params:{action:nV.Deleted}})}},[f.uuid,e]),S=M.useCallback(async()=>{s(m5.SyncStatus.Loading);const t=()=>{s(m5.SyncStatus.Success),X2(),e.replace(C2.LeavingRecommendation,{logbookEntry:f})};if(oV){await(async()=>{let e;const t=new Promise((t,n)=>{e=setTimeout(()=>{n(new Error("Timeout exceeded"))},3e3)});try{return await Promise.race([fetch(`${y5}/basic/status`),t]),!0}catch(n){return console.error("API connection error:",n),!1}finally{clearTimeout(e)}})()?t():s(m5.SyncStatus.Failure)}else t()},[e,f]);return D.createElement(yH,{style:w5.container},D.createElement(m5.RecommendationScreenWrapper,{deleteStatus:r,saveStatus:o,editStatus:l,bloodGlucoseUnit:c,injectionMethod:h,language:m,calculatorParams:d,closeCalculationViewInlogbook:y,closeCalculationFooter:S,closeCalculationTimeoutModal:b,transferEditedRecommendation:v,deleteCalculation:w,trackExpandDetails:()=>{NX(MX.RecommendationViewDetailsPress)},trackRecommendationTimeout:()=>{NX(MX.RecommendationExpired)}}))}const w5=Ei.create({container:{flex:1,backgroundColor:wL.bgBackground}});function S5(){return D.useEffect(()=>{console.warn(`DateTimePicker is not supported on: ${lr.OS}`)},[]),null}const k5=(e,t)=>{const n=e.indexOf(t);return-1===n?0:n},C5=(e,t)=>{const n=new Date(e);return n.setHours(t,0,0,0),{date:n,formatted:i$(n,"HH:mm")}},E5=Array.from({length:60},(e,t)=>t.toString().padStart(2,"0"));const x5=D.memo(function({isVisible:e,initialValue:t,min:n,max:i,onCancel:r,onConfirm:a,onModalHide:o}){const{width:s}=vm(),l=M.useRef(null),u=M.useRef(null),[c,d]=M.useState(t),h=M.useMemo(()=>{if(!n||!i){const e=new Date;return Array.from({length:24},(t,n)=>C5(e,n))}const e=n.getHours(),t=i.getHours(),r=[];if(o=i,(a=n).getFullYear()===o.getFullYear()&&a.getMonth()===o.getMonth()&&a.getDate()===o.getDate()&&n<i&&e<=t)for(let i=e;i<=t;i++)r.push(C5(n,i));else{for(let t=e;t<24;t++)r.push(C5(n,t));for(let e=0;e<=t;e++)r.push(C5(i,e))}var a,o;return r},[n,i]),m=M.useMemo(()=>h.map(e=>i$(e.date,"HH")),[h]),p=M.useMemo(()=>{const[e]=i$(t,"HH:mm").split(":");return k5(m,e)},[t,m]),f=M.useMemo(()=>{const[,e]=i$(t,"HH:mm").split(":");return k5(E5,e)},[t]),g=M.useMemo(()=>{const[e]=i$(c,"HH:mm").split(":");return k5(m,e)},[c,m]),_=M.useMemo(()=>{const[,e]=i$(c,"HH:mm").split(":");return k5(E5,e)},[c]),v=M.useMemo(()=>n?k5(m,i$(n,"HH")):null,[n,m]),y=M.useMemo(()=>i?k5(m,i$(i,"HH")):null,[i,m]),b=M.useMemo(()=>n?parseInt(i$(n,"mm"),10):null,[n]),w=M.useMemo(()=>i?parseInt(i$(i,"mm"),10):null,[i]),S=M.useCallback((e,t)=>{const n=e<0||e>=m.length,i=t<0||t>=E5.length;if(n||i)return;const r=lX(h[e].date,{minutes:parseInt(E5[t],10),seconds:0,milliseconds:0});d(r)},[m.length,h]),k=M.useCallback(e=>{u.current?.scrollToIndex(e)},[]),C=M.useCallback(e=>{if(null===y||null===v||(null===w||null===b))return void S(e,_);let t=_;return e===v&&_<b?(t=b,k(b),void S(e,t)):e===y&&_>w?(t=w,k(w),void S(e,t)):void S(e,_)},[y,v,w,b,_,S,k]),E=M.useCallback(e=>{if(null===y||null===v||(null===w||null===b))return void S(g,e);let t=e;return g===v&&e<b?(t=b,k(b),void S(g,t)):g===y&&e>w?(t=w,k(w),void S(g,t)):void S(g,t)},[y,w,v,b,g,S,k]),x=M.useCallback(()=>{a(c)},[a,c]),I=M.useCallback(()=>{d(t),r()},[r,t]);return D.createElement(sz,{isVisible:e,containerStyle:I5.modalContainer,onModalHide:o},D.createElement(ga,null,D.createElement(ga,{style:I5.pickersContainer},D.createElement(t3,{key:"hours-wheel-picker",ref:l,initialScrollIndex:p,options:m,onChange:C,containerStyle:[I5.itemContainerLeft,{width:(s-32)/2}],selectedIndicatorStyle:[I5.selectedIndicatorLeft,{width:(s-32)/2-10}],itemStyle:I5.itemLeft,testID:"hours-wheel-picker"}),D.createElement(t3,{key:"minutes-wheel-picker",ref:u,initialScrollIndex:f,options:E5,onChange:E,containerStyle:[I5.itemContainerRight,{width:(s-32)/2}],selectedIndicatorStyle:[I5.selectedIndicatorRight,{width:(s-32)/2-10}],itemStyle:I5.itemRight,testID:"minutes-wheel-picker"})),D.createElement(ga,{style:I5.buttonContainer},D.createElement(q0,{onPress:x}),D.createElement($0,{onPress:I}))))}),I5=Ei.create({modalContainer:{backgroundColor:wL.bgTransparent},buttonContainer:{gap:8},pickersContainer:{flexDirection:"row",borderTopLeftRadius:13,borderTopRightRadius:13,overflow:"hidden"},itemContainerLeft:{borderTopRightRadius:0,paddingLeft:16},itemContainerRight:{borderTopLeftRadius:0,paddingRight:16},itemLeft:{alignSelf:"flex-end",marginRight:16},itemRight:{alignSelf:"flex-start",marginLeft:16},selectedIndicatorRight:{alignSelf:"flex-start",borderTopLeftRadius:0,borderBottomLeftRadius:0},selectedIndicatorLeft:{alignSelf:"flex-end",borderTopRightRadius:0,borderBottomRightRadius:0}}),T5=e=>{switch(e){case FL.InjectionMethod.PenWhole:return RX(FL.CONSTANTS.INSULIN_DOSE_MIN,FL.CONSTANTS.INSULIN_DOSE_MAX);case FL.InjectionMethod.PenHalf:return((e,t,n=.1)=>Array.from({length:Math.round((t-e)/n)+1},(t,i)=>(e+i*n).toFixed(1)))(FL.CONSTANTS.INSULIN_DOSE_MIN,FL.CONSTANTS.INSULIN_DOSE_MAX,.5);case FL.InjectionMethod.Pump:return AX(FL.CONSTANTS.INSULIN_DOSE_MIN,FL.CONSTANTS.INSULIN_DOSE_MAX);default:throw new Error("[insulin::getInsulinInputSequentialArray] Unsupported injection method!")}},O5=()=>{const{t:e}=eV(),{showDiscardCalculationModal:t,modalStoreActions:n}=z2(),{pop:i}=Gp(),[r,a]=M.useState(!1),o=M.useCallback(()=>{X2(),a(!0),n.set({showDiscardCalculationModal:!1})},[n]),s=M.useMemo(()=>[{testID:"discard-button",title:e("new_cal_modal_discard_cal_danger_button"),type:lj.Error,onPress:o},{testID:"cancel-button",title:e("button_cancel"),type:lj.Secondary,onPress:()=>{n.set({showDiscardCalculationModal:!1})}}],[o,n,e]);return D.createElement(sz,{key:"discard_calculation_modal",isVisible:t,title:e("new_cal_modal_discard_cal_title"),message:e("new_cal_modal_discard_cal_body"),onModalHide:()=>{r&&i()},buttons:s})};const R5=Ei.create({rightSlot:{flexDirection:"row",alignItems:"center"},insulinValueText:{..._L.medium_Base},separator:{width:1,backgroundColor:wL.borderDivider,alignSelf:"stretch",marginHorizontal:12}}),A5=D.memo(function({time:e,insulinValue:t,onEdit:n,testID:i}){const{t:r}=eV();return D.createElement(bj,{title:i$(e,"HH:mm"),onPress:n,testID:i,renderRightSlot:()=>D.createElement(ga,{style:R5.rightSlot},D.createElement(pj,{style:R5.insulinValueText},`${t} ${1!==parseFloat(t)?r("units"):r("unit")}`),D.createElement(ga,{style:R5.separator}),D.createElement(rQ,null))})});var L5=(e=>(e.Create="Create",e.Edit="Edit",e.Delete="Delete",e))(L5||{});function P5({renderRegisterInsulinButtons:e}){const{t:t}=eV(),{navigate:n,setOptions:i,replace:r,pop:a}=Gp(),o=cf(),{height:s}=vm(),l=M.useMemo(()=>s<667,[s]),[u,c]=M.useState([]),[d,h]=M.useState(null),[m,p]=M.useState(!1),f=M.useCallback(()=>{NX(MX.AbortCalculationPress),a()},[a]);M.useEffect(()=>{if(!oV){i({headerLeft:()=>D.createElement(K2,{onPress:f})})}},[f,i]),Wp(M.useCallback(()=>{const e=lX(dX(new Date),{seconds:0,milliseconds:0}),t=UQ.getLogbooks(e).map(e=>({uuid:e.uuid,time:e.entry_timestamp.toString(),insulinValue:e.insulin_entered_units?.toString()??""}));c(t)},[])),M.useEffect(()=>{if(!o.params)return;const{insulinEntryId:e}=o.params;h(e)},[o.params]);const g=M.useCallback(e=>{n(C2.RegisterActiveInsulin,{action:"Edit",insulinEntry:u.find(t=>t.uuid===e)})},[n,u]),_=M.useCallback(()=>{NX(MX.RecentInsulinContinuePress),r(C2.CalculationBottomTabs,{screen:C2.GlucoseTab})},[r]),v=M.useCallback(()=>{h(null)},[]),y=M.useMemo(()=>[{title:t("button_close"),onPress:()=>{p(!1)}}],[t]);return D.createElement(D.Fragment,null,D.createElement(Wo,{testID:"active_insulin_list",data:u,contentContainerStyle:D5.containerList,renderItem:({item:e,index:t})=>D.createElement(rj,{key:e.uuid,isAnimated:d===e.uuid,onAnimationFinished:v},D.createElement(A5,{time:e.time,testID:`entry-${t}`,insulinValue:e.insulinValue,onEdit:()=>{g(e.uuid)}})),ItemSeparatorComponent:M5,ListEmptyComponent:D.createElement(ga,{style:D5.emptyComponentList},D.createElement(mQ,null),D.createElement(pj,{style:D5.noInsulinText},t("Recent_insulin_empty_state_title"))),ListFooterComponent:()=>e(0===u.length),ListFooterComponentStyle:l?D5.smallScreenFooterList:D5.footerList,ListHeaderComponent:D.createElement(D.Fragment,null,u.length>0?D.createElement(pj,{style:D5.title},t("Recent_insulin_title",{timeFourHour:i$(dX(new Date),"HH:mm")})):D.createElement(pj,{style:D5.title},t("Recent_insulin_empty_title")),D.createElement(eh,{style:D5.infoTextContainer,onPress:()=>{p(!0)}},D.createElement(pj,{style:D5.infoText},t("Recent_insulin_link_modal")),D.createElement(lQ,{color:wL.iconBrand,width:16,height:16}))),ListHeaderComponentStyle:l?D5.smallScreenHeaderList:D5.headerList}),D.createElement(yH,{style:D5.footer,edges:["bottom"]},D.createElement(cj,{title:t("Recent_insulin_button_continue"),onPress:_,type:u.length>0?lj.Primary:lj.Secondary,style:D5.confirmButton})),D.createElement(sz,{key:"recent_insulin_info",isVisible:m,title:t("Recent_insulin_modal_title"),message:t("Recent_insulin_modal_body"),buttons:y}),D.createElement(O5,null))}const M5=()=>D.createElement(ga,{style:D5.separatorList}),D5=Ei.create({containerList:{paddingHorizontal:16},headerList:{paddingTop:32,paddingBottom:64,paddingHorizontal:16},smallScreenHeaderList:{paddingVertical:32},footerList:{paddingVertical:64},smallScreenFooterList:{paddingVertical:32},title:{..._L.semiBold_2XL,marginBottom:12},infoTextContainer:{flexDirection:"row",alignItems:"center"},infoText:{..._L.semiBold_SM,color:wL.textBrand,marginRight:4},emptyComponentList:{justifyContent:"space-between",alignItems:"center",gap:8,paddingHorizontal:64,opacity:.5},separatorList:{height:8},noInsulinText:{..._L.medium_Base,textAlign:"center",color:wL.bgEmptyOnBg},footer:{backgroundColor:wL.bgProgressBar,paddingHorizontal:16,paddingBottom:16},confirmButton:{marginTop:16}});const N5=rF(function(){const{t:e}=eV(),t=Gp(),n=cf(),{bottom:i}=hH(),[r,a]=M.useState(!1),[o,s]=M.useState(n.params.insulinEntry?.insulinValue),[l,u]=M.useState(!1),[c,d]=M.useState(n.params.insulinEntry?new Date(n.params.insulinEntry.time):void 0),[h,m]=M.useState(),[p,f]=M.useState(!1),[g,_]=M.useState(!1),[v,y]=M.useState(!1),{initialInsulinValue:b,initialDate:w}=M.useMemo(()=>({initialInsulinValue:n.params.insulinEntry?.insulinValue,initialDate:n.params.insulinEntry?new Date(n.params.insulinEntry.time):void 0}),[n.params.insulinEntry]),S=Vq.injectionMethod;if(void 0===S)throw new Error("[RegisterActiveInsulin::render] injectionMethod is undefined");const k=M.useMemo(()=>T5(S),[S]),C=M.useCallback(async()=>{if(!o||!c)throw new Error("[RegisterActiveInsulin::handleDonePressed] insulinValue or date is undefined");if(n.params.action===L5.Create){const e=NQ({entry_timestamp:c,insulin_entered_units:parseFloat(o)});return await UQ.addLogbook(e)?void t.navigate({name:C2.ActiveInsulin,params:{insulinEntryId:e.uuid},merge:!0}):void f(!0)}if(!n.params.insulinEntry)throw new Error("[RegisterActiveInsulin::handleDonePressed] insulinEntry is undefined");const e={...UQ.getLogbookByUUID(n.params.insulinEntry.uuid),entry_timestamp:c,insulin_entered_units:parseFloat(o)};await UQ.addLogbook(e,n.params.insulinEntry.uuid)?t.navigate({name:C2.ActiveInsulin,params:{insulinEntryId:e.uuid},merge:!0}):f(!0)},[c,o,t,n.params.action,n.params.insulinEntry]);M.useEffect(()=>{t.setOptions({headerRight:()=>D.createElement(J2,{title:n.params.action===L5.Edit?e("button_done"):e("button_save"),onPress:C,disabled:!c||!o||!!h||w===c&&b===o})})},[t,C,o,c,n.params.action,e,w,b,h]);const E=M.useCallback(()=>{_(!0),y(!1)},[]),x=M.useCallback(()=>{setTimeout(async()=>{if(g&&n.params.insulinEntry){await UQ.deleteLogbook(n.params.insulinEntry.uuid)?t.goBack():f(!0)}},0)},[g,t,n.params.insulinEntry]),I=M.useCallback(()=>{u(!0)},[]),T=M.useCallback(()=>{a(!0)},[]),O=M.useCallback(t=>{const n=new Date,i=function(e,t,n){const i=+eY(e,n?.in),[r,a]=[+eY(t.start,n?.in),+eY(t.end,n?.in)].sort((e,t)=>e-t);return i>=r&&i<=a}(t,{start:lX(dX(n),{seconds:0,milliseconds:0}),end:n}),r=i?void 0:e("error_insulin_intake_hint");d(t),m(r),u(!1)},[e]),R=M.useCallback(()=>{u(!1)},[]),A=M.useCallback(e=>{s(e.toString()),a(!1)},[]),L=M.useMemo(()=>{if(!o)return 0;const e=(e=>{switch(e){case FL.InjectionMethod.PenWhole:return 0;case FL.InjectionMethod.PenHalf:case FL.InjectionMethod.Pump:return 1;default:throw new Error("[insulin::getInsulinInputDecimalPlaces] Unsupported injection method!")}})(S);return k.findIndex(t=>t===parseFloat(o).toFixed(e))},[o,k,S]);return D.createElement(D.Fragment,null,D.createElement(Xa,{contentContainerStyle:F5.contentContainer},D.createElement(ga,{style:F5.screen},D.createElement(pj,{style:F5.screenTitle},e("register_insulin_title",{timeFourHour:i$(dX(new Date),"HH:mm")})),D.createElement(bj,{title:e("register_insulin_input_title"),testID:"insulin-input",onPress:T,renderRightSlot:()=>D.createElement(ga,{style:F5.insulinRightSlot},D.createElement(pj,{style:F5.insulinText},o),D.createElement(pj,{style:F5.unitsText},e("units"))),style:r&&F5.focusedRow}),D.createElement(KB,{isAnimated:!!h},D.createElement(bj,{renderLeftSlot:()=>D.createElement(pj,null,e("register_insulin_time_input_title")),testID:"time-input",errorMessage:h,onPress:I,renderRightSlot:()=>D.createElement(ga,{style:F5.setTimeButton},D.createElement(pj,{style:[F5.setTimeText,l&&F5.setTimeTextSelected,!!h&&F5.setTimeTextError]},c?i$(c,"HH:mm"):e("register_insulin_time_button_unit"))),style:l?F5.focusedRowInsulin:F5.rowInsulin}))),n.params.action===L5.Edit&&D.createElement(cj,{title:e("button_delete"),onPress:()=>{y(!0)},type:lj.ErrorSecondary})),D.createElement(n3,{isVisible:r,items:k,onConfirm:A,onCancel:()=>{a(!1)},initialScrollIndex:L,testID:"insulin-wheel-picker"}),lV?D.createElement(S5,{testID:"date-time-picker",isVisible:l,display:"spinner",date:c??new Date,mode:(new Date).getHours()>=4?"time":"datetime",onConfirm:O,onCancel:R,cancelTextIOS:e("button_cancel"),confirmTextIOS:e("button_confirm"),pickerStyleIOS:F5.alignCenter,modalStyleIOS:{paddingBottom:i}}):D.createElement(x5,{isVisible:l,initialValue:c??new Date,min:cX(new Date,{hours:4}),max:new Date,onConfirm:O,onCancel:R}),D.createElement(sz,{isVisible:v,title:e("register_insulin_modal_title"),message:e("register_insulin_modal_body"),onModalHide:x,buttons:[{title:e("button_delete"),testID:"confirm_delete",type:lj.Error,onPress:E},{title:e("button_cancel"),type:lj.Secondary,onPress:()=>{y(!1)}}]}),D.createElement(sz,{isVisible:p,icon:hQ,title:e("new_cal_modal_no_internet_title"),message:e("new_cal_modal_no_internet_body"),buttons:[{title:e("button_close"),onPress:()=>{f(!1)}}]}))}),F5=Ei.create({contentContainer:{flex:1,paddingHorizontal:16,paddingVertical:32,gap:24,backgroundColor:wL.bgSheet},screen:{gap:16},screenTitle:{textAlign:"center",marginBottom:8},focusedRow:{borderColor:wL.borderInputActive},focusedRowInsulin:{borderColor:wL.borderInputActive,flexWrap:"wrap",paddingVertical:8},rowInsulin:{flexWrap:"wrap",paddingVertical:8},insulinRightSlot:{flexDirection:"row",flex:1,alignItems:"center"},setTimeButton:{backgroundColor:wL.bgPills,borderRadius:16,paddingHorizontal:12,paddingVertical:8},setTimeText:{..._L.regular_Base,color:wL.text},setTimeTextSelected:{color:wL.textBrand},setTimeTextError:{color:wL.textDanger},insulinText:{..._L.regular_Base,color:wL.textSecondary,marginRight:4},unitsText:{..._L.regular_Base,color:wL.textSecondary},alignCenter:{alignSelf:"center"}});function B5(){const{t:e}=eV(),t=Gp(),n=M.useCallback(()=>{NX(MX.RecentInsulinRegisterPress),t.navigate(C2.RegisterActiveInsulin,{action:L5.Create})},[t]);return d.jsx(P5,{renderRegisterInsulinButtons:t=>d.jsx(cj,{title:e("recent_insulin_button_add"),onPress:n,leftIcon:d.jsx(HK,{color:wL.text}),type:t?lj.Primary:lj.Secondary})})}const j5=M.createContext(void 0),V5=M.createContext(void 0);function H5(){return H5=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},H5.apply(this,arguments)}function z5(e){let{children:t,style:n,visible:i=!0,size:r=18,...a}=e;const[o]=M.useState(()=>new uu.Value(i?1:0)),[s,l]=M.useState(i),u=Rf();if(M.useEffect(()=>{if(s)return uu.timing(o,{toValue:i?1:0,duration:150,useNativeDriver:!0}).start(e=>{let{finished:t}=e;t&&!i&&l(!1)}),()=>o.stopAnimation()},[o,s,i]),!s){if(!i)return null;l(!0)}const{backgroundColor:c=u.colors.notification,...d}=Ei.flatten(n)||{},h=H1(c).isLight()?"black":"white",m=r/2,p=Math.floor(3*r/4);return M.createElement(uu.Text,H5({numberOfLines:1,style:[{transform:[{scale:o.interpolate({inputRange:[0,1],outputRange:[.5,1]})}],color:h,lineHeight:r-1,height:r,minWidth:r,opacity:o,backgroundColor:c,fontSize:p,borderRadius:m},U5.container,d]},a),t)}const U5=Ei.create({container:{alignSelf:"flex-end",textAlign:"center",paddingHorizontal:4,overflow:"hidden"}});function G5(e){let{route:t,horizontal:n,badge:i,badgeStyle:r,activeOpacity:a,inactiveOpacity:o,activeTintColor:s,inactiveTintColor:l,renderIcon:u,style:c}=e;return D.createElement(ga,{style:[n?W5.iconHorizontal:W5.iconVertical,c]},D.createElement(ga,{style:[W5.icon,{opacity:a}]},u({focused:!0,size:25,color:s})),D.createElement(ga,{style:[W5.icon,{opacity:o}]},u({focused:!1,size:25,color:l})),D.createElement(z5,{visible:null!=i,style:[W5.badge,n?W5.badgeHorizontal:W5.badgeVertical,r],size:75/4},i))}const W5=Ei.create({icon:{position:"absolute",alignSelf:"center",alignItems:"center",justifyContent:"center",height:"100%",width:"100%",minWidth:25},iconVertical:{flex:1},iconHorizontal:{height:"100%",marginTop:3},badge:{position:"absolute",left:3},badgeVertical:{top:3},badgeHorizontal:{top:7}});function Y5(){return Y5=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},Y5.apply(this,arguments)}function $5(e){let{focused:t,route:n,descriptor:i,label:r,icon:a,badge:o,badgeStyle:s,to:l,button:u=e=>{let{children:t,style:n,onPress:i,to:r,accessibilityRole:a,...o}=e;return"web"===lr.OS&&r?D.createElement(pf,Y5({},o,{to:r,style:[X5.button,n],onPress:e=>{e.metaKey||e.altKey||e.ctrlKey||e.shiftKey||null!=e.button&&0!==e.button||(e.preventDefault(),null==i||i(e))}}),t):D.createElement(eh,Y5({},o,{accessibilityRole:a,onPress:i,style:n}),t)},accessibilityLabel:c,testID:d,onPress:h,onLongPress:m,horizontal:p,activeTintColor:f,inactiveTintColor:g,activeBackgroundColor:_="transparent",inactiveBackgroundColor:v="transparent",showLabel:y=!0,allowFontScaling:b,labelStyle:w,iconStyle:S,style:k}=e;const{colors:C}=Rf(),E=void 0===f?C.primary:f,x=void 0===g?H1(C.text).mix(H1(C.card),.5).hex():g,I={focused:t},T=t?_:v;return u({to:l,onPress:h,onLongPress:m,testID:d,accessibilityLabel:c,accessibilityRole:lr.select({ios:"button",default:"tab"}),accessibilityState:{selected:t},accessibilityStates:t?["selected"]:[],style:[X5.tab,{backgroundColor:T},p?X5.tabLandscape:X5.tabPortrait,k],children:D.createElement(D.Fragment,null,(e=>{let{focused:t}=e;if(void 0===a)return null;const i=t?1:0,r=t?0:1;return D.createElement(G5,{route:n,horizontal:p,badge:o,badgeStyle:s,activeOpacity:i,inactiveOpacity:r,activeTintColor:E,inactiveTintColor:x,renderIcon:a,style:S})})(I),(e=>{let{focused:t}=e;if(!1===y)return null;const a=t?E:x;if("string"==typeof r)return D.createElement(hl,{numberOfLines:1,style:[X5.label,{color:a},p?X5.labelBeside:X5.labelBeneath,w],allowFontScaling:b},r);const{options:o}=i,s="string"==typeof o.tabBarLabel?o.tabBarLabel:void 0!==o.title?o.title:n.name;return r({focused:t,color:a,position:p?"beside-icon":"below-icon",children:s})})(I))})}const X5=Ei.create({tab:{flex:1,alignItems:"center"},tabPortrait:{justifyContent:"flex-end",flexDirection:"column"},tabLandscape:{justifyContent:"center",flexDirection:"row"},label:{textAlign:"center",backgroundColor:"transparent"},labelBeneath:{fontSize:10},labelBeside:{fontSize:13,marginLeft:20,marginTop:3},button:{display:"flex"}}),q5="web"!==lr.OS,Z5=e=>{let{state:t,descriptors:n,layout:i,dimensions:r}=e;const{tabBarLabelPosition:a}=n[t.routes[t.index].key].options;if(a)switch(a){case"beside-icon":return!0;case"below-icon":return!1}if(i.width>=768){return t.routes.reduce((e,t)=>{const{tabBarItemStyle:i}=n[t.key].options,r=Ei.flatten(i);if(r){if("number"==typeof r.width)return e+r.width;if("number"==typeof r.maxWidth)return e+r.maxWidth}return e+125},0)<=i.width}return r.width>r.height},K5=e=>Math.max(e.bottom-lr.select({ios:4,default:0}),0),Q5=e=>{var t;let{state:n,descriptors:i,dimensions:r,insets:a,style:o,...s}=e;const l=null===(t=Ei.flatten(o))||void 0===t?void 0:t.height;if("number"==typeof l)return l;const u=r.width>r.height,c=Z5({state:n,descriptors:i,dimensions:r,...s}),d=K5(a);return"ios"===lr.OS&&!lr.isPad&&u&&c?32+d:49+d};function J5(e){let{state:t,navigation:n,descriptors:i,insets:r,style:a}=e;const{colors:o}=Rf(),s=function(){const e=M.useContext(Fp),t=M.useContext(df);return M.useCallback((n,i)=>{const{options:r}=t;if(!1===(null==r?void 0:r.enabled))return;const a=e?Af(e,{index:0,routes:[{name:n,params:i}]}):{index:0,routes:[{name:n,params:i}]};return null!=r&&r.getPathFromState?r.getPathFromState(a,null==r?void 0:r.config):wp(a,null==r?void 0:r.config)},[t,e])}(),l=t.routes[t.index],u=i[l.key].options,{tabBarShowLabel:c,tabBarHideOnKeyboard:d=!1,tabBarVisibilityAnimationConfig:h,tabBarStyle:m,tabBarBackground:p,tabBarActiveTintColor:f,tabBarInactiveTintColor:g,tabBarActiveBackgroundColor:_,tabBarInactiveBackgroundColor:v}=u,y=mH(),b=function(){const[e,t]=M.useState(!1);return M.useEffect(()=>{const e=()=>t(!0),n=()=>t(!1);let i;return i="ios"===lr.OS?[Pu.addListener("keyboardWillShow",e),Pu.addListener("keyboardWillHide",n)]:[Pu.addListener("keyboardDidShow",e),Pu.addListener("keyboardDidHide",n)],()=>{i.forEach(e=>e.remove())}},[]),e}(),w=D.useContext(j5),S=!(d&&b),k=D.useRef(h);D.useEffect(()=>{k.current=h});const[C,E]=D.useState(!S),[x]=D.useState(()=>new uu.Value(S?1:0));D.useEffect(()=>{const e=k.current;if(S){var t,n;("spring"===(null==e||null===(t=e.show)||void 0===t?void 0:t.animation)?uu.spring:uu.timing)(x,{toValue:1,useNativeDriver:q5,duration:250,...null==e||null===(n=e.show)||void 0===n?void 0:n.config}).start(e=>{let{finished:t}=e;t&&E(!1)})}else{var i,r;E(!0);("spring"===(null==e||null===(i=e.hide)||void 0===i?void 0:i.animation)?uu.spring:uu.timing)(x,{toValue:0,useNativeDriver:q5,duration:200,...null==e||null===(r=e.hide)||void 0===r?void 0:r.config}).start()}return()=>x.stopAnimation()},[x,S]);const[I,T]=D.useState({height:0,width:y.width}),{routes:O}=t,R=K5(r),A=Q5({state:t,descriptors:i,insets:r,dimensions:y,layout:I,style:[m,a]}),L=Z5({state:t,descriptors:i,dimensions:y,layout:I}),P=null==p?void 0:p();return D.createElement(uu.View,{style:[e6.tabBar,{backgroundColor:null!=P?"transparent":o.card,borderTopColor:o.border},{transform:[{translateY:x.interpolate({inputRange:[0,1],outputRange:[I.height+R+Ei.hairlineWidth,0]})}],position:C?"absolute":null},{height:A,paddingBottom:R,paddingHorizontal:Math.max(r.left,r.right)},m],pointerEvents:C?"none":"auto",onLayout:e=>{const{height:t,width:n}=e.nativeEvent.layout;null==w||w(t),T(e=>t===e.height&&n===e.width?e:{height:t,width:n})}},D.createElement(ga,{pointerEvents:"none",style:Ei.absoluteFill},P),D.createElement(ga,{accessibilityRole:"tablist",style:e6.content},O.map((e,r)=>{const a=r===t.index,{options:o}=i[e.key],l=void 0!==o.tabBarLabel?o.tabBarLabel:void 0!==o.title?o.title:e.name,u=void 0!==o.tabBarAccessibilityLabel?o.tabBarAccessibilityLabel:"string"==typeof l&&"ios"===lr.OS?`${l}, tab, ${r+1} of ${O.length}`:void 0;return D.createElement(Bm.Provider,{key:e.key,value:i[e.key].navigation},D.createElement(jm.Provider,{value:e},D.createElement($5,{route:e,descriptor:i[e.key],focused:a,horizontal:L,onPress:()=>{const i=n.emit({type:"tabPress",target:e.key,canPreventDefault:!0});a||i.defaultPrevented||n.dispatch({...wm({name:e.name,merge:!0}),target:t.key})},onLongPress:()=>{n.emit({type:"tabLongPress",target:e.key})},accessibilityLabel:u,to:s(e.name,e.params),testID:o.tabBarTestID,allowFontScaling:o.tabBarAllowFontScaling,activeTintColor:f,inactiveTintColor:g,activeBackgroundColor:_,inactiveBackgroundColor:v,button:o.tabBarButton,icon:o.tabBarIcon??(e=>{let{color:t,size:n}=e;return D.createElement($J,{color:t,size:n})}),badge:o.tabBarBadge,badgeStyle:o.tabBarBadgeStyle,label:l,showLabel:c,labelStyle:o.tabBarLabelStyle,iconStyle:o.tabBarIconStyle,style:o.tabBarItemStyle})))})))}const e6=Ei.create({tabBar:{left:0,right:0,bottom:0,borderTopWidth:Ei.hairlineWidth,elevation:8},content:{flex:1,flexDirection:"row"}});function t6(){return t6=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},t6.apply(this,arguments)}let n6;try{n6=W1}catch(e){}const i6=e=>{var t,n;let{enabled:i,...r}=e;return null!==(t=n6)&&void 0!==t&&null!==(n=t.screensEnabled)&&void 0!==n&&n.call(t)?M.createElement(n6.ScreenContainer,t6({enabled:i},r)):M.createElement(ga,r)};function r6(e){var t,n;let{visible:i,children:r,...a}=e;return null!==(t=n6)&&void 0!==t&&null!==(n=t.screensEnabled)&&void 0!==n&&n.call(t)?M.createElement(n6.Screen,t6({activityState:i?2:0},a),r):M.createElement(ZJ,t6({visible:i},a),r)}function a6(){return a6=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},a6.apply(this,arguments)}function o6(e){const{tabBar:t=e=>M.createElement(J5,e),state:n,navigation:i,descriptors:r,safeAreaInsets:a,detachInactiveScreens:o="web"===lr.OS||"android"===lr.OS||"ios"===lr.OS,sceneContainerStyle:s}=e,l=n.routes[n.index].key,[u,c]=M.useState([l]);u.includes(l)||c([...u,l]);const d=t1.initialMetrics.frame,[h,m]=M.useState(()=>Q5({state:n,descriptors:r,dimensions:d,layout:{width:d.width,height:0},insets:{...t1.initialMetrics.insets,...e.safeAreaInsets},style:r[n.routes[n.index].key].options.tabBarStyle})),{routes:p}=n;return M.createElement(t1,null,M.createElement(i6,{enabled:o,hasTwoStates:!0,style:s6.container},p.map((e,t)=>{const i=r[e.key],{lazy:a=!0,unmountOnBlur:l}=i.options,c=n.index===t;if(l&&!c)return null;if(a&&!u.includes(e.key)&&!c)return null;const{freezeOnBlur:m,header:p=t=>{let{layout:n,options:i}=t;return M.createElement(DJ,a6({},i,{layout:n,title:EJ(i,e.name)}))},headerShown:f,headerStatusBarHeight:g,headerTransparent:_}=i.options;return M.createElement(r6,{key:e.key,style:[Ei.absoluteFill,{zIndex:c?0:-1}],visible:c,enabled:o,freezeOnBlur:m},M.createElement(V5.Provider,{value:h},M.createElement(r1,{focused:c,route:i.route,navigation:i.navigation,headerShown:f,headerStatusBarHeight:g,headerTransparent:_,header:p({layout:d,route:i.route,navigation:i.navigation,options:i.options}),style:s},i.render())))})),M.createElement(j5.Provider,{value:m},M.createElement(sH.Consumer,null,e=>t({state:n,descriptors:r,navigation:i,insets:{top:(null==a?void 0:a.top)??(null==e?void 0:e.top)??0,right:(null==a?void 0:a.right)??(null==e?void 0:e.right)??0,bottom:(null==a?void 0:a.bottom)??(null==e?void 0:e.bottom)??0,left:(null==a?void 0:a.left)??(null==e?void 0:e.left)??0}}))))}const s6=Ei.create({container:{flex:1,overflow:"hidden"}});function l6(){return l6=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},l6.apply(this,arguments)}const u6=ep(function(e){let{id:t,initialRouteName:n,backBehavior:i,children:r,screenListeners:a,screenOptions:o,sceneContainerStyle:s,...l}=e;const{lazy:u,tabBarOptions:c,...d}=l;let h={};c&&(Object.assign(h,{tabBarHideOnKeyboard:c.keyboardHidesTabBar,tabBarActiveTintColor:c.activeTintColor,tabBarInactiveTintColor:c.inactiveTintColor,tabBarActiveBackgroundColor:c.activeBackgroundColor,tabBarInactiveBackgroundColor:c.inactiveBackgroundColor,tabBarAllowFontScaling:c.allowFontScaling,tabBarShowLabel:c.showLabel,tabBarLabelStyle:c.labelStyle,tabBarIconStyle:c.iconStyle,tabBarItemStyle:c.tabStyle,tabBarLabelPosition:c.labelPosition??(!1===c.adaptive?"below-icon":void 0),tabBarStyle:[{display:c.tabBarVisible?"none":"flex"},h.tabBarStyle]}),Object.keys(h).forEach(e=>{void 0===h[e]&&delete h[e]}),UH(c,`Bottom Tab Navigator: 'tabBarOptions' is deprecated. Migrate the options to 'screenOptions' instead.\n\nPlace the following in 'screenOptions' in your code to keep current behavior:\n\n${JSON.stringify(h,null,2)}\n\nSee https://reactnavigation.org/docs/bottom-tab-navigator#options for more details.`)),"boolean"==typeof u&&(h.lazy=u,UH(!0,"Bottom Tab Navigator: 'lazy' in props is deprecated. Move it to 'screenOptions' instead.\n\nSee https://reactnavigation.org/docs/bottom-tab-navigator/#lazy for more details."));const{state:m,descriptors:p,navigation:f,NavigationContent:g}=uf(Om,{id:t,initialRouteName:n,backBehavior:i,children:r,screenListeners:a,screenOptions:o,defaultScreenOptions:h});return M.createElement(g,null,M.createElement(o6,l6({},d,{state:m,navigation:f,descriptors:p,sceneContainerStyle:s})))});new Xo(nr.RNDeviceInfo);const c6=new Xo(nr.RNDeviceInfo);let d6=!1,h6=-1,m6={};const p6=e=>{const{level:t,charging:n,chargingtime:i,dischargingtime:r}=e;return{batteryLevel:t,lowPowerMode:!1,batteryState:1===t?"full":n?"charging":"unplugged",chargingtime:i,dischargingtime:r}},f6=()=>window.performance&&window.performance.memory?window.performance.memory.jsHeapSizeLimit:-1,g6=()=>document.referrer,_6=()=>!!navigator.onLine,v6=()=>window.navigator.userAgent,y6=()=>!!navigator.geolocation,b6=()=>navigator.deviceMemory?1e9*navigator.deviceMemory:-1,w6=()=>window.performance&&window.performance.memory?window.performance.memory.usedJSHeapSize:-1;"undefined"!=typeof navigator&&navigator.getBattery&&navigator.getBattery().then(e=>{d6=e.charging,e.addEventListener("chargingchange",()=>{const{charging:t}=e;d6=t,m6=p6(e),c6.emit("RNDeviceInfo_powerStateDidChange",m6)}),e.addEventListener("levelchange",()=>{const{level:t}=e;h6=t,m6=p6(e),c6.emit("RNDeviceInfo_batteryLevelDidChange",t),t<.2&&c6.emit("RNDeviceInfo_batteryLevelIsLow",t)})});const S6=Object.freeze(Object.defineProperty({__proto__:null,getBaseOs:async()=>(()=>{const e=window.navigator.userAgent,t=window.navigator.platform;let n=t;return-1!==["Macintosh","MacIntel","MacPPC","Mac68K"].indexOf(t)?n="Mac OS":-1!==["iPhone","iPad","iPod"].indexOf(t)?n="iOS":-1!==["Win32","Win64","Windows","WinCE"].indexOf(t)?n="Windows":/Android/.test(e)?n="Android":!n&&/Linux/.test(t)&&(n="Linux"),n})(),getBatteryLevel:async()=>navigator.getBattery?navigator.getBattery().then(e=>e.level):-1,getBatteryLevelSync:()=>h6,getFreeDiskStorage:async()=>navigator.storage&&navigator.storage.estimate?navigator.storage.estimate().then(({quota:e,usage:t})=>e-t):-1,getFreeDiskStorageSync:()=>(console.log("[react-native-device-info] getFreeDiskStorageSync not supported - please use getFreeDiskStorage"),-1),getInstallReferrer:async()=>g6(),getInstallReferrerSync:g6,getMaxMemory:async()=>f6(),getMaxMemorySync:f6,getPowerState:async()=>navigator.getBattery?navigator.getBattery().then(e=>p6(e)):{},getPowerStateSync:()=>m6,getTotalDiskCapacity:async()=>navigator.storage&&navigator.storage.estimate?navigator.storage.estimate().then(({quota:e})=>e):-1,getTotalDiskCapacitySync:()=>(console.log("[react-native-device-info] getTotalDiskCapacitySync not supported - please use getTotalDiskCapacity"),-1),getTotalMemory:async()=>b6(),getTotalMemorySync:b6,getUsedMemory:async()=>w6(),getUsedMemorySync:w6,getUserAgent:async()=>v6(),getUserAgentSync:v6,isAirplaneMode:async()=>_6(),isAirplaneModeSync:_6,isBatteryCharging:async()=>!!navigator.getBattery&&navigator.getBattery().then(e=>e.charging),isBatteryChargingSync:()=>d6,isCameraPresent:async()=>!(!navigator.mediaDevices||!navigator.mediaDevices.enumerateDevices)&&navigator.mediaDevices.enumerateDevices().then(e=>!!e.find(e=>"videoinput"===e.kind)),isCameraPresentSync:()=>(console.log("[react-native-device-info] isCameraPresentSync not supported - please use isCameraPresent"),!1),isLocationEnabled:async()=>y6(),isLocationEnabledSync:y6},Symbol.toStringTag,{value:"Module"})),k6=i(S6);let C6=nr.RNDeviceInfo;if("web"!==lr.OS&&"dom"!==lr.OS||(C6=k6),!C6&&("android"===lr.OS||"ios"===lr.OS||"web"===lr.OS||"dom"===lr.OS))throw new Error("react-native-device-info: NativeModule.RNDeviceInfo is null. To fix this issue try these steps:\n • For react-native <= 0.59: Run `react-native link react-native-device-info` in the project root.\n • Rebuild and re-run the app.\n • If you are using CocoaPods on iOS, run `pod install` in the `ios` directory and then rebuild and re-run the app. You may also need to re-open Xcode to get the new pods.\n If none of these fix the issue, please open an issue on the Github repository: https://github.com/react-native-device-info/react-native-device-info");const E6=C6;let x6={};function I6({getter:e,supportedPlatforms:t,defaultValue:n,memoKey:i}){if(i&&null!=x6[i])return x6[i];{const r=function(e,t,n){let i={};return e.filter(e=>lr.OS==e).forEach(e=>i[e]=t),lr.select({...i,default:n})}(t,e,()=>n)();return i&&(x6[i]=r),r}}const T6=()=>I6({defaultValue:!1,supportedPlatforms:["ios"],memoKey:"zoomed",getter:()=>E6.isDisplayZoomed});new Xo(nr.RNDeviceInfo);const O6=Ei.create({container:{flexDirection:"row",justifyContent:"space-between",backgroundColor:wL.bgNavigationBarCalc,padding:8,paddingLeft:16,borderRadius:40,marginBottom:16},topLine:{width:30,height:2,borderRadius:1,backgroundColor:wL.bgNavigationIndicator,position:"absolute"},button:{alignItems:"center",justifyContent:"center",minWidth:60,maxWidth:80},calculateButton:{backgroundColor:wL.bgNavigationBarSummaryInactive,alignItems:"center",borderRadius:26,height:52,flex:1,minWidth:60},title:{..._L.medium_XXS,color:wL.textOnNavigationInactive,paddingTop:2,textAlign:"center"},titleActive:{color:wL.textOnNavigationActive},valueCircle:{backgroundColor:wL.bgRecNavigationNumberInactive,borderRadius:7,position:"absolute",left:40,top:6},activeValueCircle:{backgroundColor:wL.bgRecNavigationNumberActive},value:{..._L.semiBold_XXS,color:wL.textNavigationNumberActive,paddingTop:oV?2:0,paddingBottom:oV?2:0,paddingHorizontal:4}}),R6=rF(({navigation:e})=>{const{t:t}=eV(),{isCalculationTabBarHidden:n}=hL(),{glucoseMMOLL:i}=V2(),{totalCarbsCartItems:r,manualCarbsInput:a}=EX(),{activityDurationSeconds:o}=I2(),{glucoseUnit:s}=Vq;if(void 0===s)throw new Error("[BolusTab::render] glucoseUnit must be non-undefined.");const{navigate:l,getState:u}=e,c=u().index,[d,h]=M.useState(!1),[m,p]=M.useState([0,0,0,0]),f=lR(0),g=mR(()=>({transform:[{translateX:f.value}]}),[f]);M.useEffect(()=>{f.value=DE(m[c],{duration:200})},[c,f,m]);const _=()=>{NX(MX.GlucoseTabPress),l(C2.GlucoseTab)},v=()=>{NX(MX.CarbsTabPress),l(C2.CarbsTab)},y=()=>{NX(MX.ActivityTabPress),l(C2.ActivityTab)},b=()=>{r+a>300?h(!0):(NX(MX.SummaryTabPress),l(C2.SummaryTab))};return n?null:D.createElement(D.Fragment,null,D.createElement(yH,{style:[O6.container,{marginHorizontal:T6()?4:24}],edges:["bottom"],mode:"margin"},D.createElement(FR.View,{style:[O6.topLine,g]}),(()=>{const e=Math.round(a+r),n=Math.round(o/60);return[{testID:"bg-tab",value:null===i?"-":PQ(i,FL.BloodGlucoseUnit.MMOL_L,s),onPress:_,title:t("bottom_navigation_calculation_glucose")},{testID:"carbs-tab",value:e,onPress:v,title:t("bottom_navigation_calculation_carbs")},{testID:"activity-tab",value:n,onPress:y,title:t("bottom_navigation_calculation_activity")},{isSummary:!0,testID:"summary-tab",onPress:b}].map((e,t)=>{const{testID:n,title:i,value:r,onPress:a,isSummary:o}=e,s=`${t}_${n}`,l=t===c,u=o?[O6.calculateButton,{maxWidth:T6()?70:84}]:O6.button,d=t,h={0:l?D.createElement(iQ,null):D.createElement(nQ,null),1:l?D.createElement(UK,{height:28,width:28}):D.createElement(zK,{height:28,width:28}),2:l?D.createElement(VK,{height:28,width:28}):D.createElement(jK,null),3:l?D.createElement(aQ,{color:wL.iconNavigationBarSummaryActive}):D.createElement(aQ,null)};return D.createElement(eh,{key:s,testID:n,onPress:a,style:u,disabled:l,onLayout:e=>{((e,t,n)=>{const i=(n-30)/2+t;p(t=>{const n=[...t];return n[e]=i,n})})(t,e.nativeEvent.layout.x,e.nativeEvent.layout.width)}},h[d],D.createElement(pj,{maxFontSizeMultiplier:vL,style:[O6.title,l&&O6.titleActive],ellipsizeMode:"tail",numberOfLines:1},i),!o&&D.createElement(ga,{style:[O6.valueCircle,(l||Number(r)>0)&&O6.activeValueCircle]},D.createElement(pj,{style:O6.value,maxFontSizeMultiplier:vL},r)))})})()),D.createElement(sz,{isVisible:d,title:t("current_glucose_invalid_modal_title"),message:t("current_glucose_invalid_modal_body"),buttons:[{title:t("button_close"),onPress:()=>{h(!1)}}]}))}),A6=()=>{const{t:e}=eV();return M.createElement(M.Fragment,null,M.createElement(pj,{style:L6.header,testID:"activity-info-title"},e("physical_activity_modal_activity_insulin_title")),M.createElement(pj,{style:[L6.text,L6.spacing]},e("physical_activity_modal_activity_insulin_body")),M.createElement(pj,{style:L6.header},e("physical_activity_modal_adjust_insulin_title")),M.createElement(pj,{style:L6.text},e("physical_activity_modal_adjust_insulin_body")))},L6=Ei.create({header:{..._L.semiBold_LG,marginBottom:8},text:{color:wL.textSecondary},spacing:{marginBottom:32}});function P6({isSpinning:e,height:t=20,width:n=20}){const i=TR(),r=M.useRef(new uu.Value(0)).current;M.useEffect(()=>{const t=uu.loop(uu.timing(r,{toValue:1,duration:3e3,useNativeDriver:!oV,easing:Xl.linear}));return e&&!i&&t.start(),()=>{t.stop()}},[r,e,i]);const a=r.interpolate({inputRange:[0,1],outputRange:["0deg","360deg"]});return D.createElement(uu.View,{style:{transform:[{rotate:a}]}},D.createElement(pQ,{height:t,width:n}))}function M6({activity:e,isChecked:t,index:n=0,onEdit:i,toggleActivitySwitch:r}){const{t:a}=eV();if(!Vq.activity)throw new Error("[ActivityCard::render] No settings found!");if(!Vq.glucoseUnit)throw new Error("[ActivityCard::render] No glucose unit found!");const{activityIntensity:o,durationSeconds:s,startTimestamp:l,title:u,type:c,uuid:d}=e;if(!l)throw new Error("[ActivityCard::render] No startTimestamp!");const h=i$(l,"dd.MM.yy"),m=i$(l,"HH:mm"),p=o?OQ[o]():null,f=o?EQ(o):null,g={...D6.intensityDot,...f},_={borderColor:wL.borderInputActive},v=M.useMemo(()=>Math.round(s/60),[s]),[y,b]=M.useState(IQ(l,v)),w=M.useMemo(()=>{const e=Vq.activity;if(!e)throw new Error("[ActivityCard::reduction] No settings found!");return(100*Iq.getReduction(v,e,o,new Date(l))).toFixed(0)},[o,v,l]),S=`activity-${v}-${o}-${c}-${t}`.toLowerCase(),k=`activity-card-${n}`,C=p?`${k}-intensity-${p.toLowerCase()}`:"",E=f?`${k}-intensity-${f.backgroundColor}`:"",x=Vq.glucoseUnit===FL.BloodGlucoseUnit.MMOL_L?a("glucose_unit_mmol/l"):a("glucose_unit_mg/dl");return M.useEffect(()=>{const e=t?setInterval(()=>{b(IQ(l,v))},FL.Milliseconds.Minute):null;return()=>{var t;(t=e)&&clearInterval(t)}},[t,l,v]),D.createElement(ga,{testID:S,style:[D6.wrapper,t&&_]},D.createElement(ga,{style:D6.headerContainer},D.createElement(pj,{style:D6.header},a("activity_card_title")),D.createElement(vh,{testID:`${k}-${t}`,value:t,onValueChange:()=>{r(d)},trackColor:{true:wL.bgToggleActive,false:wL.bgToggleInactive},thumbColor:wL.toggleKnob,activeThumbColor:wL.toggleKnob,activeTrackColor:wL.bgToggleActive})),D.createElement(ga,{style:D6.mainInfoCard},D.createElement(ga,{style:D6.titleAndEditContainer},c&&D.createElement(ga,{style:D6.row},CQ(c,D6.icon),D.createElement(ga,{style:D6.mainInfo},D.createElement(pj,{style:D6.type,testID:`${k}-type`},TQ[c]()),u&&D.createElement(pj,{style:D6.title,testID:`${k}-title`},u)))),D.createElement(ga,{style:D6.intensityDuration},null!==p&&D.createElement(D.Fragment,null,D.createElement(ga,{style:g,testID:E}),D.createElement(pj,{style:D6.intensityText,testID:C},p)),D.createElement(vQ,{color:wL.iconOnInput}),D.createElement(pj,{style:D6.durationText,testID:`${k}-duration`},`${xQ(v)} ${a("activity_card__active_min")}`),D.createElement(eh,{onPress:()=>{i(d)},style:D6.editButton,testID:`${k}-edit-button`},D.createElement(rQ,{color:wL.iconBrand,width:20,height:20}))),t&&D.createElement(ga,{style:D6.secondaryInfoCard,testID:`${k}-reduction-card`},D.createElement(ga,{style:D6.activityTimeContainer},D.createElement(ga,{style:D6.activeForContainer},D.createElement(P6,{isSpinning:t}),D.createElement(pj,{style:D6.activeFor},a("activity_card__active_time")," ",y)),D.createElement(pj,{style:D6.startingTimeText,testID:`${k}-time`},a("activity_card__created_time",{dateLogged:h,timeLogged:m}))),!!w&&D.createElement(ga,null,D.createElement(pj,{style:D6.reductionText},a("activity_card__reduction"),` ${w}%`),D.createElement(pj,{style:D6.targetText},a("activity_card__reduction_more",{value:PQ(Vq.activity.target,FL.BloodGlucoseUnit.MMOL_L,Vq.glucoseUnit),displayUnit:x}))))))}const D6=Ei.create({wrapper:{marginBottom:32,borderColor:wL.borderOnSecondary,borderWidth:2,borderRadius:16,overflow:"hidden"},headerContainer:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",backgroundColor:wL.bgActivityHighlight,paddingVertical:12,paddingHorizontal:16},header:{..._L.medium_Base},mainInfoCard:{backgroundColor:wL.bgInput,padding:16},titleAndEditContainer:{flexDirection:"row",justifyContent:"space-between",marginBottom:12},row:{flex:1,flexDirection:"row"},icon:{color:wL.text,width:48,height:48},mainInfo:{flex:1,justifyContent:"center",marginLeft:8},type:{..._L.bold_LG},title:{..._L.medium_Base},editButton:{flexDirection:"row",alignItems:"center",marginLeft:16},intensityDuration:{alignItems:"center",flexDirection:"row"},intensityDot:{width:10,height:10,borderRadius:5,marginRight:4,marginBottom:2},intensityText:{..._L.medium_Base,color:wL.textInputTextSecondary,marginRight:16},durationText:{..._L.medium_Base,color:wL.textInputTextSecondary,marginLeft:4},secondaryInfoCard:{paddingTop:24},activityTimeContainer:{borderBottomWidth:1,borderBottomColor:wL.borderDivider,marginBottom:24},activeForContainer:{flexDirection:"row",marginBottom:2,alignItems:"center"},activeFor:{..._L.medium_SM,color:wL.textInputText,marginLeft:2},startingTimeText:{..._L.regular_SM,color:wL.textSecondary,marginBottom:24},reductionText:{..._L.regular_SM,color:wL.textInputTextSecondary,marginBottom:12},targetText:{..._L.regular_SM,color:wL.textInputTextSecondary}}),N6=()=>{const{t:e}=eV(),{selectedEventUUID:t,activityStoreActions:n}=I2(),{navigate:i,addListener:r,removeListener:a}=Gp(),[o,s]=M.useState([]),[l,u]=M.useState(!1);M.useEffect(()=>{const e=()=>{const e=Lq.getActiveEvents();s(e)},t=Tu.addEventListener("change",t=>{"active"===t&&e()});return r("focus",e),()=>{a("focus",e),t.remove()}},[a,r]);const c=M.useCallback(e=>{const i=Lq.getByUUID(e);n.set({selectedEventUUID:t===e?null:e,activityDurationSeconds:t===e?0:i.durationSeconds})},[n,t]),d=e=>{const t=Lq.getByUUID(e);i(C2.AddActivity,{activity:t})};return D.createElement(D.Fragment,null,D.createElement(Xa,{contentContainerStyle:F6.scrollView},D.createElement(ga,null,D.createElement(ga,{style:F6.row},D.createElement(VK,{color:wL.icon,width:24,height:24}),D.createElement(pj,{style:F6.pageHeader},e("new_cal_activity_title"))),D.createElement(pj,{style:[F6.subheader,0===o.length&&F6.noActivities],onPress:()=>{u(!0)}},D.createElement(pj,{style:F6.subheaderText},e("new_cal_current_activity_body")+" "),D.createElement(pj,{style:F6.learnMore},e("new_cal_current_activity_body_link")))),o.map((e,n)=>D.createElement(M6,{key:e.uuid,index:n,toggleActivitySwitch:c,isChecked:t===e.uuid,onEdit:d,activity:e})),D.createElement(cj,{type:0===o.length?lj.Primary:lj.Secondary,testID:"add-activity-button",title:0===o.length?e("new_cal_activity_button_add"):e("new_cal_activity_button_add_new"),onPress:()=>{i(C2.AddActivity)}})),D.createElement(O5,null),D.createElement(sz,{isVisible:l,enableScroll:!0,buttons:[{title:e("button_close"),onPress:()=>{u(!1)},style:F6.modalButton}]},D.createElement(A6,null)))},F6=Ei.create({scrollView:{paddingVertical:32,paddingHorizontal:16,paddingBottom:130},row:{flexDirection:"row",justifyContent:"center",alignItems:"center"},pageHeader:{..._L.semiBold_Base,color:wL.text,marginLeft:4},noActivities:{marginBottom:128},subheader:{color:wL.textSecondary,paddingHorizontal:16,textAlign:"center",marginBottom:32,marginTop:8},subheaderText:{..._L.regular_SM,color:wL.textSecondary,textAlign:"center"},learnMore:{..._L.semiBold_SM,color:wL.textBrand},modalButton:{marginTop:32}});RX(FL.CONSTANTS.CARBOHYDRATES_INPUT_MIN,FL.CONSTANTS.CARBOHYDRATES_INPUT_MAX);const B6=()=>{const{t:e}=eV(),{cartItems:t,carbohydrateStoreActions:n}=EX(),{foodStoreActions:i}=L2(),r=Gp(),a=M.useCallback((e,t)=>{e?n.removeFromCart(e,"id"):n.removeFromCart(t,"title")},[n]),o=M.useCallback(e=>TX(e),[]),s=M.useCallback(e=>{i.set({selectedFoodItem:e}),r.navigate(C2.AddCarbs,{isCarbItem:!0})},[i,r]);return D.createElement(D.Fragment,null,t.map((t,n)=>{const{carbohydrates:i,id:r,title:l}=t.foodItem;return D.createElement(eh,{key:r,onPress:()=>{s(t.foodItem)},style:j6.foodItem},D.createElement(ga,{style:j6.left},D.createElement(pj,{numberOfLines:1,style:j6.title},l),D.createElement(pj,{style:j6.weight},t.amount," ",e("food_card_unit"))),D.createElement(ga,{style:j6.right},D.createElement(pj,{style:j6.value,testID:`carbs-item-${n}-amount`},(t.amount/o(t.unit)*i).toFixed(0)," g "+e("new_cal_carbohydrates_input_unit")),D.createElement(eh,{onPress:()=>{a(r,l)},testID:`carbs-item-${n}-remove-icon`},D.createElement(JK,null))))}))},j6=Ei.create({foodItem:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",marginBottom:8,gap:8,padding:16,backgroundColor:wL.bgInput,borderRadius:16},title:{..._L.medium_Base,paddingBottom:4},weight:{..._L.regular_SM,color:wL.textSecondary},left:{flexShrink:1},right:{alignSelf:"flex-start",alignItems:"center",flexDirection:"row"},value:{color:wL.textSecondary,textAlign:"right",marginRight:4}}),{max:V6,min:H6}={min:FL.CONSTANTS.CARBOHYDRATES_INPUT_MIN,max:FL.CONSTANTS.CARBOHYDRATES_INPUT_MAX},z6=oV&&{outline:"none"},U6=()=>{const{flagsStoreActions:e}=hL(),{t:t}=eV(),{totalCarbsCartItems:n,manualCarbsInput:i,carbohydrateStoreActions:r}=EX(),{dispatch:a,addListener:o,removeListener:s,navigate:l}=Gp(),{height:u}=vm(),c=M.useMemo(()=>u<=667,[u]),d=M.useRef(null),[h,m]=M.useState(!1),[p,f]=M.useState(i.toString()),[g,_]=M.useState(!1),[v,y]=M.useState(!1);M.useEffect(()=>{oV&&e.set({isCalculationTabBarHidden:h})},[e,h]);const b=M.useCallback(()=>{n+i>300&&y(!0)},[i,n]),w=M.useCallback(()=>{window.setTimeout(()=>{window.scrollTo({top:0,left:0,behavior:"smooth"})},100)},[]),S=M.useCallback(()=>{window.visualViewport?.addEventListener("resize",w),b()},[b,w]),k=M.useCallback(()=>{window.visualViewport?.removeEventListener("resize",w)},[w]);M.useEffect(()=>(o("focus",S),o("blur",k),()=>{s("focus",S),s("blur",k)}),[o,s,k,S]);const C=()=>{if(m(!1),""===p)return r.setManualCarbsInput(0),void f("0");const e=Number(p);return!isNaN(e)&&e>=H6?e>V6?(f(i.toString()),void y(!0)):(r.setManualCarbsInput(e),f(e.toString()),void NX(MX.CarbsManualInput)):(f(i.toString()),void _(!0))};return D.createElement(D.Fragment,null,D.createElement(Xa,{testID:"carbs-screen-scroll",scrollEventThrottle:8,contentContainerStyle:G6.scrollView},D.createElement(ga,{style:c?G6.smallScreenHeaderContainer:G6.headerContainer},D.createElement(ga,{style:G6.row},D.createElement(UK,{color:wL.icon}),D.createElement(pj,{style:G6.pageHeader},t("new_cal_carbohydrates_title"))),D.createElement(pj,{style:G6.subheader},t("new_cal_carbohydrates_body"))),D.createElement(bj,{renderLeftSlot:()=>D.createElement(pj,{testID:"carbs-input-unit"},t("new_cal_carbohydrates_input_entry")),renderRightSlot:()=>D.createElement(ga,{style:G6.inputRow},D.createElement(c0,{testID:"carbs-input",placeholder:"0",value:p,onChangeText:f,onBlur:C,style:G6.numberInput,ref:d,selectTextOnFocus:!0}),D.createElement(pj,{style:G6.unit},t("my_food_add_unit")),D.createElement(ga,{style:G6.separator}),D.createElement(rQ,null)),onPress:()=>{m(!0),d.current?.focus()},style:h?G6.groupedRowFocused:G6.groupedRow}),D.createElement(B6,null),D.createElement(cj,{type:lj.Secondary,title:t("new_cal_carbohydrates_button_add_food"),testID:"add-food-from-library-button",onPress:()=>{oV?l(C2.FoodLibrary,{comingFrom:C2.CarbsTab}):a(wm(C2.FoodLibraryStack,{comingFrom:C2.CarbsTab}))},style:c?G6.smallScreenButton:G6.button}),D.createElement(O5,null),D.createElement(sz,{isVisible:g,title:t("current_glucose_invalid_modal_title"),message:t("current_glucose_invalid_modal_body"),buttons:[{testID:"close-button",title:t("button_close"),onPress:()=>{_(!1)}}]}),D.createElement(sz,{isVisible:v,title:t("current_glucose_invalid_modal_title"),message:t("current_glucose_invalid_modal_body"),buttons:[{title:t("button_close"),onPress:()=>{y(!1)}}]})),D.createElement(ga,{style:G6.totalWrapper},D.createElement(hj,null)),D.createElement(ga,{style:c?G6.smallScreenTotalContainer:G6.totalContainer},D.createElement(pj,{style:G6.totalTitle},t("new_cal_carbohydrates_total_entry")),D.createElement(ga,{style:G6.totalGramsContainer},D.createElement(pj,{style:G6.totalValue,testID:"total-carbs-value"},n+i),D.createElement(pj,{style:G6.totalUnits,testID:"total-carbs-unit"},t("my_food_add_unit")))))},G6=Ei.create({scrollView:{paddingVertical:32,paddingHorizontal:16},row:{flex:1,flexDirection:"row",justifyContent:"center",alignItems:"center"},inputRow:{flexDirection:"row",justifyContent:"flex-start",alignItems:"center",gap:4},headerContainer:{marginBottom:112},smallScreenHeaderContainer:{marginBottom:32},pageHeader:{..._L.semiBold_Base,color:wL.text,marginLeft:4},subheader:{..._L.regular_SM,color:wL.textSecondary,textAlign:"center",marginTop:8,marginHorizontal:16},groupedRow:{marginBottom:16,flexWrap:"wrap",justifyContent:"space-between"},groupedRowFocused:{marginBottom:16,borderColor:wL.borderInputActive,flexWrap:"wrap",justifyContent:"space-between"},separator:{width:1,backgroundColor:wL.borderDivider,height:20,marginHorizontal:12},unit:{..._L.regular_Base,color:wL.textSecondary},numberInput:{..._L.regular_Base,textAlign:"right",lineHeight:22,color:wL.textSecondary,padding:0,maxWidth:40,fontFamily:sV?gL.RobotoRegular:gL.PoppinsRegular,...z6},totalWrapper:{marginHorizontal:16},totalContainer:{flexDirection:"row",justifyContent:"space-between",alignItems:"baseline",paddingVertical:32,paddingBottom:16,marginHorizontal:16,gap:8,flexWrap:"wrap"},smallScreenTotalContainer:{flexDirection:"row",justifyContent:"space-between",alignItems:"baseline",paddingVertical:16,paddingBottom:16,marginHorizontal:16,gap:8,flexWrap:"wrap"},totalTitle:{..._L.medium_SM},totalGramsContainer:{flexDirection:"row",alignItems:"baseline"},totalValue:{..._L.bold_4XL},totalUnits:{..._L.bold_2XL,marginLeft:8},button:{marginHorizontal:"auto",marginTop:64,marginBottom:32},smallScreenButton:{marginHorizontal:"auto",marginVertical:32}});var W6=(e=>(e.Add="Add",e.Sync="Sync",e.SyncSpinner="SyncSpinner",e.Edit="Edit",e.Done="Done",e))(W6||{});const Y6=({title:e,subtitle:t,children:n,icon:i,onPressCard:r,onPressIcon:a})=>{const o=M.useMemo(()=>"SyncSpinner"===i,[i]);return D.createElement(eh,{style:({pressed:e})=>[$6.container,{opacity:e?.5:1}],onPress:r,disabled:!r},D.createElement(ga,{style:$6.textContainer},D.createElement(pj,{style:$6.title},e),n,!!t&&D.createElement(pj,{style:$6.subtitle},t)),D.createElement(eh,{style:({pressed:e})=>[$6.iconContainer,{opacity:e?.5:1}],onPress:()=>{a&&a()},hitSlop:20,disabled:!a},"Add"===i&&D.createElement(HK,{width:32,height:32}),"Edit"===i&&D.createElement(rQ,{width:32,height:32}),"Sync"===i&&D.createElement(pQ,{height:32,width:32}),"SyncSpinner"===i&&D.createElement(P6,{isSpinning:o,height:32,width:32}),"Done"===i&&D.createElement($K,{width:32,height:32})))},$6=Ei.create({container:{flexDirection:"row",backgroundColor:wL.bgInput,justifyContent:"space-between",padding:16,borderRadius:16},textContainer:{flex:1},title:{..._L.semiBold_Base,marginBottom:4},subtitle:{..._L.regular_XS,color:wL.textSecondary},iconContainer:{backgroundColor:wL.bgIcon,alignSelf:"center",justifyContent:"center",padding:6,borderRadius:16,marginLeft:16}}),X6=oV?{outline:"none"}:{};function q6({value:e,unit:t,editable:n=!0,onChange:i,onPress:r,onBlur:a,testID:o,ref:s}){const{t:l}=eV(),{flagsStoreActions:u}=hL(),{height:c}=vm(),d=M.useMemo(()=>c<667,[c]),[h,m]=M.useState(!1),p=M.useRef(null);M.useImperativeHandle(s,()=>({focus:()=>{setTimeout(()=>{p.current?.focus(),oV&&u.set({isCalculationTabBarHidden:!0})},100)}}),[u]);const f=M.useCallback(()=>{m(!0),oV&&u.set({isCalculationTabBarHidden:!0})},[u]),g=M.useCallback(()=>{m(!1),a?.(),oV&&u.set({isCalculationTabBarHidden:!1})},[u,a]),_=M.useCallback(()=>{n?p.current?.focus():r?.()},[r,n]);return D.createElement(ga,{style:d?Z6.smallScreenContainer:Z6.container},D.createElement(eh,{onPress:_,style:Z6.input,pointerEvents:"box-only"},D.createElement(kh,{ref:p,value:e,onChangeText:i,placeholder:h?"":l("bolus_glucose_enter_input"),onBlur:g,onFocus:f,style:[{...Z6.textInput,...X6},h||e?{..._L.bold_4XL}:{..._L.semiBold_2XL},sV&&!h&&!e&&{paddingTop:16}],placeholderTextColor:wL.textSecondary,cursorColor:wL.iconBrand,enterKeyHint:"done",inputMode:"decimal",autoCorrect:!1,maxLength:4,maxFontSizeMultiplier:vL,multiline:!1,numberOfLines:1,selectTextOnFocus:!0,testID:o}),D.createElement(ga,{style:Z6.unitContainer},D.createElement(pj,{style:[Z6.unitText,{color:h?wL.text:wL.textSecondary}],maxFontSizeMultiplier:vL},t))),D.createElement(ga,{style:Z6.animationContainer},D.createElement(qV,{source:KV.GLUCOSE_INPUT_UNDERLINE,autoPlay:!0,style:Z6.animation,webStyle:Z6.animation})))}const Z6=Ei.create({container:{paddingHorizontal:40,marginBottom:64},smallScreenContainer:{paddingHorizontal:20,marginBottom:32},input:{flexDirection:"row",alignItems:"center",height:62,justifyContent:"center"},textInput:{paddingTop:0,paddingBottom:0,flex:1,textAlign:"right",verticalAlign:"middle",color:wL.text,width:"100%"},unitContainer:{marginLeft:8,flex:1},unitText:{..._L.semiBold_2XL},animationContainer:{height:4,width:"100%",borderRadius:2,overflow:"hidden",justifyContent:"center"},animation:{height:64}});const{HEDIA_API_URL_V2:K6,NODE_ENV:Q6}={HEDIA_API_URL_V2:"/api/v2"},{MMOL_L:J6}=FL.BloodGlucoseUnit,e7=e=>({id:e.id,object_id:e.id,user_id:e.userId,type:e.type,quantity:{unit:e.quantity.unit.toLowerCase(),value:e.quantity.value},timestamp:new Date(e.startDate),source_id:e.source.id,device_name:e.device.name,source_name:e.source.name});const t7=Ei.create({scrollView:{paddingTop:32,paddingHorizontal:16,paddingBottom:130},headerContainer:{marginBottom:112},smallScreenHeaderContainer:{marginBottom:32},row:{flexDirection:"row",justifyContent:"center",alignItems:"center"},pageHeader:{..._L.semiBold_Base,color:wL.text,marginLeft:4},subheader:{..._L.regular_SM,color:wL.textSecondary,textAlign:"center",marginTop:8,marginHorizontal:16},noReadingsContainer:{backgroundColor:wL.bgInput,padding:16,borderRadius:16},noMeasurements:{..._L.regular_XS,textAlign:"center",marginBottom:8,color:wL.textInputText},buttonText:{..._L.semiBold_SM,color:wL.textBrand,textAlign:"center"},card:{flexDirection:"row"},valueContainer:{paddingRight:8,borderRightWidth:1,borderRightColor:wL.borderDivider,marginBottom:4},value:{..._L.medium_XS},crossedOut:{textDecorationLine:"line-through",color:wL.textSecondary},warning:{color:wL.textWarning},time:{..._L.regular_XS,color:wL.textSecondary,marginLeft:8}}),n7=rF(function(){const{t:e}=eV(),t=Gp(),n=cf(),{activityStoreActions:i}=I2(),{glucoseMMOLL:r,glucoseTimestamp:a,isUsingGlucoseSample:o,latestGlucoseSample:s,glucoseStoreActions:l}=V2(),{height:u}=vm(),c=M.useMemo(()=>u<667,[u]),{glucoseUnit:d,activity:h}=Vq;if(void 0===d)throw new Error("[Glucose::render] glucoseUnit must be non-undefined.");const{decimalPlaces:m,inputMax:p,inputMin:f,text:g}=M.useMemo(()=>Xq(d),[d]),[_,v]=M.useState(""),[y,b]=M.useState(!1),[w,S]=M.useState(!1),[k,C]=M.useState(!1),[E,x]=M.useState(!1),[I,T]=M.useState(!1),[O,R]=M.useState(!1),[A,L]=M.useState(!1),[P,N]=M.useState(!1),[F,B]=M.useState(""),[j,V]=M.useState(""),H=M.useRef(null),z=M.useCallback(()=>{window.setTimeout(()=>{window.scrollTo({top:0,left:0,behavior:"smooth"})},100)},[]),U=M.useCallback(()=>{window.visualViewport?.addEventListener("resize",z)},[z]),G=M.useCallback(()=>{window.visualViewport?.removeEventListener("resize",z)},[z]),W=M.useCallback(()=>{l.set({glucoseMMOLL:null,glucoseTimestamp:null,isUsingGlucoseSample:!1,glucoseSampleID:null})},[l]);M.useEffect(()=>(t.addListener("focus",U),t.addListener("blur",G),()=>{t.removeListener("focus",U),t.removeListener("blur",G)}),[t,G,U]),Wp(M.useCallback(()=>{const e=()=>{const e=o&&s?new Date(s.timestamp).getTime():a;e&&Date.now()-e>10*FL.Milliseconds.Minute?(x(!0),v("")):x(!1)};e();const t=setInterval(e,1e3);return()=>{clearInterval(t)}},[o,s,a]));const Y=M.useCallback(()=>{if(s){const{quantity:t,timestamp:n}=s,i=Date.now()-new Date(n).getTime()>10*FL.Milliseconds.Minute,r=pY(new Date,new Date(n).getTime()).toString();V(e("imprted_device_card_time",{min:r}));const a=function(e,t,n){const i=Xq(n).text;return`${PQ(e,t,n)} ${i}`}(t.value,t.unit,d);B(i?e("imprted_device_card_unit"):a),N(i)}},[d,s,e]);M.useEffect(()=>{Y()},[Y]),function(e,t){const n=M.useRef(void 0);M.useEffect(()=>{n.current=e},[e]),M.useEffect(()=>{const e=setInterval(function(){n.current&&n.current()},t);return()=>{clearInterval(e)}},[t])}(Y,1e3),M.useEffect(()=>{n.params?.editGlucose&&(v(""),H.current?.focus())},[n.params?.editGlucose]),M.useEffect(()=>{null===r&&v("")},[r]),M.useEffect(()=>{(async()=>{try{L(!0);const e=await FX(`${K6}/samples`);if(!e.ok)throw new Error("[Glucose::getSamples] response status not OK");const t=await e.json();if(t.length>0){const e=t.map(e7),n=e.filter(e=>"HDA"!==e.source_name&&e.timestamp.getTime()<=(new Date).getTime()).sort((e,t)=>t.timestamp.getTime()-e.timestamp.getTime());if(n.length>0){const e=n[0],{unit:t,value:i}=e.quantity,{inputMax:r,inputMin:a}=Xq(t);i>=a&&i<=r?(l.set({latestGlucoseSample:e,isUsingGlucoseSample:!0}),(e=>{const{id:t,isTester:n,country:i,uuid:r,timestamp:a,timezone:o,platform:s}=DX(),l={uuid:r,timestamp:a,timezone:o,type:"integration.service.transfer",data:{version:PX,platform:s,source:{sourceID:e.source_id,deviceName:e.device_name,sourceName:e.source_name},reading:{type:e.type,value:e.quantity.value,unit:e.quantity.unit},geo:{country:i},user:{id:t,isTester:n}}};XW.update(l),XW.sync().catch(console.error)})(e)):l.set({latestGlucoseSample:null,isUsingGlucoseSample:!1})}}}finally{L(!1)}})().catch(console.error)},[l]),M.useEffect(()=>{if(o&&s){const{quantity:e}=s;l.set({glucoseMMOLL:AQ(e.value,e.unit,J6),glucoseSampleID:s.id});const t=PQ(e.value,e.unit,d);v(t)}},[d,o,s,l]),M.useEffect(()=>{if(""!==_&&s){const{quantity:e}=s,t=PQ(e.value,e.unit,d);_!==t||P||l.set({isUsingGlucoseSample:!0})}},[d,_,P,s,l]),M.useEffect(()=>{const e=Lq.getEventWithHighestReduction(h);i.set({selectedEventUUID:e?.uuid??null,activityDurationSeconds:e?.durationSeconds??0})},[h,i]);const $=M.useCallback(()=>{if(""===_)return void W();const e=parseFloat(_);if(!(!isNaN(e)&&e>=f&&e<=p)){const e=r&&PQ(r,J6,d);return v(e||""),void b(!0)}const t=AQ(e,d,J6);l.set({glucoseMMOLL:t,glucoseTimestamp:Date.now()}),v(e.toFixed(m))},[W,m,_,r,d,p,f,l]),X=M.useCallback(()=>{o?C(!0):H.current?.focus()},[o]),q=M.useCallback(()=>{O&&(W(),C(!1),H.current?.focus(),R(!1))},[W,O]),Z=M.useCallback(()=>{R(!0),C(!1)},[]),K=M.useCallback(()=>{S(!0)},[]),Q=M.useCallback(()=>{P||l.set({isUsingGlucoseSample:!0})},[P,l]),J=M.useCallback(()=>{W(),x(!1)},[W]),ee=M.useCallback(()=>{W(),x(!1),T(!0)},[W]),te=M.useCallback(()=>{I&&H.current?.focus(),T(!1)},[H,I]),ne=M.useCallback(e=>{v(e.replace(",","."))},[]),ie=M.useCallback(()=>{const e={id:"TEST",object_id:"TEST",user_id:"TEST",type:"blood_glucose",timestamp:new Date(Date.now()-(4*Math.random()+5)*FL.Milliseconds.Minute),source_id:"TEST",quantity:{unit:FL.BloodGlucoseUnit.MMOL_L,value:Math.random()*(33.3-1.1)+1.1},source_name:"HDA Test Name",device_name:"HDA Test Dvice"};l.set({isUsingGlucoseSample:!0,latestGlucoseSample:e})},[l]),re=M.useMemo(()=>!o&&!P,[P,o]);return D.createElement(D.Fragment,null,D.createElement(Xa,{testID:"bg-scroll-view",scrollEventThrottle:8,contentContainerStyle:t7.scrollView},D.createElement(ga,{style:c?t7.smallScreenHeaderContainer:t7.headerContainer},D.createElement(ga,{style:t7.row},D.createElement(iQ,{color:wL.icon,width:24,height:24}),D.createElement(pj,{style:t7.pageHeader},e("new_cal_current_glucose_title"))),D.createElement(pj,{style:t7.subheader},e("new_cal_glucose_body"))),D.createElement(q6,{ref:H,value:_,unit:g,onChange:ne,onPress:X,onBlur:$,editable:!(o||A)}),s?D.createElement(Y6,{title:s.device_name,subtitle:e("from_source",{source:s.source_name}),icon:o?W6.Done:W6.Sync,onPressCard:o?void 0:Q},D.createElement(ga,{style:t7.card},D.createElement(ga,{style:t7.valueContainer},D.createElement(pj,{style:[t7.value,re&&t7.crossedOut,P&&t7.warning]},F)),D.createElement(pj,{style:t7.time},j))):D.createElement(eh,{style:t7.noReadingsContainer,onPress:K,onLongPress:()=>{"production"!==Q6&&ie()}},D.createElement(pj,{style:t7.noMeasurements},e("bg_device_no_measurement")),D.createElement(pj,{style:t7.buttonText},e("bg_device_no_measurement_body")))),D.createElement(sz,{isVisible:y,title:e("current_glucose_invalid_high_modal_title",{min:LQ(f,d),max:LQ(p,d)}),buttons:[{testID:"close-button",title:e("button_close"),onPress:()=>{b(!1)}}]}),D.createElement(sz,{isVisible:w,title:e("import_modal_reading_title"),message:e("import_modal_reading_body"),buttons:[{testID:"close-button",title:e("button_close"),onPress:()=>{S(!1)}}]}),D.createElement(sz,{isVisible:k,title:e("new_cal_modal_change_synced_value_title"),message:e("new_cal_modal_change_synced_value_body"),onModalHide:q,buttons:[{testID:"change-button",type:lj.Error,title:e("new_cal_modal_change_synced_value_danger_button"),onPress:Z},{testID:"keep-button",type:lj.Secondary,title:e("new_cal_modal_change_synced_value_button"),onPress:()=>{C(!1)}}]}),D.createElement(sz,{isVisible:E,title:e("new_cal_summary_modal_expire_title"),message:e("new_cal_summary_modal_expire_body"),icon:GK,onModalHide:te,onModalShow:()=>{NX(MX.ExpiredGlucose)},buttons:[{title:e("new_cal_summary_modal_expire_button_edit"),onPress:ee},{title:e("button_cancel"),type:lj.Secondary,onPress:J}]}))}),i7=oV?56:48,r7=({onCompleteSwipe:e,testID:t,ref:n})=>{const{t:i}=eV(),{width:r}=vm(),a=M.useMemo(()=>r-32-64,[r]),o=M.useMemo(()=>a-i7-(oV?3:12),[a]),s=lR(0),l=lR(a);M.useEffect(()=>{l.value=a},[a,l]);const[u,c]=M.useState(0);M.useImperativeHandle(n,()=>({reset:()=>{s.value=rx(100,DE(0)),l.value=rx(100,DE(a))}}));const d=nL.Pan().onUpdate(e=>{const t=Math.max(0,Math.min(e.translationX,o));s.value=t,l.value=a-t}).onEnd(()=>{s.value>=1*o?Hk(e)():(s.value=lx(0),l.value=lx(a))}),h=mR(()=>({width:l.value}),[l]);return D.createElement(FR.View,{style:[a7.container,h]},D.createElement(FA,{gesture:d},D.createElement(ga,{style:a7.iconContainer},D.createElement(_Q,{testID:t}),D.createElement(pj,{style:[a7.text,{left:(a-u)/2}],onLayout:e=>{const{width:t}=e.nativeEvent.layout;0===u&&c(t)}},i("new_cal_summary_calculate_slider")))))};r7.displayName="SwipeButton";const a7=Ei.create({container:{justifyContent:"center",alignSelf:"flex-end",marginHorizontal:16,borderRadius:42,overflow:"hidden",height:58,backgroundColor:wL.bgToggleSlider,borderColor:wL.borderSlider,borderWidth:1},iconContainer:{alignItems:"center",flexDirection:"row",overflow:"hidden",marginHorizontal:6},text:{position:"absolute",color:wL.text,..._L.medium_LG}});const o7=Ei.create({scrollView:{paddingTop:32,paddingHorizontal:32,paddingBottom:130},headerContainer:{flexDirection:"row",gap:4,alignItems:"center",justifyContent:"center",paddingBottom:32},headerText:{..._L.semiBold_Base,color:wL.text},invisibleCalculateButton:{position:"absolute",top:0,right:0,width:0,height:0,opacity:0},listItemContainer:{paddingVertical:16,paddingHorizontal:16},listItem:{flexDirection:"row",alignItems:"center",justifyContent:"space-between"},listItemLeft:{flexDirection:"row",alignItems:"center"},listItemRight:{alignItems:"flex-end"},listItemTitle:{..._L.regular_SM,marginLeft:8},listItemValue:{..._L.bold_2XL},listItemUnit:{..._L.regular_SM},separatorLine:{width:"100%",height:1,backgroundColor:wL.borderDivider},activityIntensityContainer:{alignSelf:"flex-end",paddingHorizontal:12,paddingVertical:8,borderRadius:40,backgroundColor:wL.bgIcon,justifyContent:"center",alignItems:"center",marginTop:4},activityIntensityText:{..._L.regular_XS},swipeContainer:{marginTop:64,justifyContent:"center"},smallScreenSwipeContainer:{marginTop:32,justifyContent:"center"}}),s7=rF(function(){const{t:e}=eV(),{navigate:t}=Gp(),n=cf(),{height:i}=vm(),r=M.useMemo(()=>i<667,[i]),{glucoseTimestamp:a,glucoseMMOLL:o,isUsingGlucoseDeviceReading:s,latestGlucoseDeviceReading:l,latestGlucoseSample:u,isUsingGlucoseSample:c,glucoseStoreActions:d}=V2(),{manualCarbsInput:h,totalCarbsCartItems:m}=EX(),{selectedEventUUID:p}=I2(),{glucoseUnit:f,activity:g}=Vq;if(void 0===f)throw new Error("[Summary::render] glucoseUnit is undefined");if(void 0===g)throw new Error("[Summary::render] activity is undefined");const _=M.useRef(null),[v,y]=M.useState(!1),[b,w]=M.useState(null),[S,k]=M.useState(!1),[C,E]=M.useState(!1),[x,I]=M.useState(!1),[T,O]=M.useState(!1),R=M.useRef(new uu.Value(0)).current,A=M.useRef(new uu.Value(.8)).current;Wp(M.useCallback(()=>{R.setValue(0),A.setValue(.8),uu.parallel([uu.timing(R,{toValue:1,duration:200,useNativeDriver:!oV,easing:Xl.in(Xl.linear)}),uu.timing(A,{toValue:1,duration:200,useNativeDriver:!oV,easing:Xl.in(Xl.linear)})]).start()},[R,A])),M.useEffect(()=>{const e=()=>{const e=c&&u?new Date(u.timestamp).getTime():s&&l?l.timestamp.getTime():a;e&&Date.now()-e>10*FL.Milliseconds.Minute?(y(!0),d.set({glucoseMMOLL:null})):y(!1)};e();const t=setInterval(e,1e3);return()=>{clearInterval(t)}},[s,l,c,u,a,d]);const L=M.useMemo(()=>p?Lq.getByUUID(p):null,[p]),P=M.useCallback(()=>v?(NX(MX.SummaryExpiredGlucose),void I(!0)):null===o?(NX(MX.SummaryEmptyGlucose),void k(!0)):void t(C2.LoadingRecommendation),[o,v,t]);M.useEffect(()=>{n.params?.errorType&&(w(n.params.errorType),_.current?.reset())},[n.params]);const{glucoseDisplayValue:N,glucoseDispalyUnit:F}=M.useMemo(()=>v?{glucoseDisplayValue:null,glucoseDispalyUnit:e("new_cal_summary_expired")}:null!==o?{glucoseDisplayValue:PQ(o,FL.BloodGlucoseUnit.MMOL_L,f),glucoseDispalyUnit:Xq(f).text}:{glucoseDisplayValue:null,glucoseDispalyUnit:"-"},[o,f,v,e]),{activityIntervalDisplay:B,activityIntensityDisplay:j}=M.useMemo(()=>{if(L?.durationSeconds&&L.startTimestamp){return{activityIntervalDisplay:xQ(Math.round(L.durationSeconds/60)),activityIntensityDisplay:L.activityIntensity?OQ[L.activityIntensity]():null}}return{activityIntervalDisplay:null,activityIntensityDisplay:null}},[L]),V=M.useMemo(()=>n.params?.errorType===tV.Sync,[n.params]);return D.createElement(D.Fragment,null,D.createElement(Xa,{testID:"summary-scroll-view",scrollEventThrottle:8,contentContainerStyle:o7.scrollView},oV&&D.createElement(eh,{testID:"invisible-calculate-button",onPress:P,style:o7.invisibleCalculateButton}),D.createElement(ga,{style:o7.headerContainer},D.createElement(oQ,null),D.createElement(pj,{style:o7.headerText},e("new_cal_summary_title"))),D.createElement(uu.View,{style:{opacity:R,transform:[{scale:A}]}},D.createElement(ga,{style:[o7.listItemContainer,o7.listItem]},D.createElement(ga,{style:o7.listItemLeft},D.createElement(iQ,{color:wL.text,height:24,width:24}),D.createElement(pj,{style:o7.listItemTitle},e("new_cal_summary_glucose_title"))),D.createElement(ga,{style:o7.listItemRight},null!==N&&D.createElement(pj,{style:o7.listItemValue},N),D.createElement(pj,{style:o7.listItemUnit},F))),D.createElement(ga,{style:o7.separatorLine}),D.createElement(ga,{style:[o7.listItemContainer,o7.listItem]},D.createElement(ga,{style:o7.listItemLeft},D.createElement(UK,{color:wL.text,height:24,width:24}),D.createElement(pj,{style:o7.listItemTitle},e("new_cal_summary_carb_title"))),D.createElement(ga,{style:o7.listItemRight},D.createElement(pj,{style:o7.listItemValue},Math.round(h+m)),D.createElement(pj,{style:o7.listItemUnit},e("logbook_collum_unit")))),D.createElement(ga,{style:o7.separatorLine}),D.createElement(ga,{style:o7.listItemContainer},D.createElement(ga,{style:o7.listItem},D.createElement(ga,{style:o7.listItemLeft},D.createElement(tQ,null),D.createElement(pj,{style:o7.listItemTitle},e("new_cal_summary_activity_title"))),D.createElement(ga,{style:o7.listItemRight},null!==B&&D.createElement(pj,{style:o7.listItemValue},B),D.createElement(pj,{style:o7.listItemUnit},null!==B?e("new_cal_summary_activity_unit"):"-"))),null!==j&&D.createElement(ga,{style:o7.activityIntensityContainer},D.createElement(pj,{style:o7.activityIntensityText},j)))),D.createElement(ga,{style:r?o7.smallScreenSwipeContainer:o7.swipeContainer},D.createElement(r7,{ref:_,onCompleteSwipe:P,testID:"calculate-swipe-button"}))),D.createElement(O5,null),D.createElement(sz,{isVisible:null!==b,icon:V?hQ:void 0,title:e(V?"recommendation_no_save_modal_title":"rejected_input_modal_title"),message:e(V?"recommendation_no_save_modal_body":"rejected_input_modal_body"),buttons:[{title:e("button_close"),onPress:()=>{w(null)}}]}),D.createElement(sz,{isVisible:S,title:e("new_cal_summary_modal_enter_glucose_title"),message:e("new_cal_summary_modal_enter_glucose_body"),icon:GK,onModalHide:()=>{_.current?.reset(),C&&t(C2.GlucoseTab,{editGlucose:IX()}),E(!1)},buttons:[{title:e("new_cal_summary_modal_enter_glucose_button_add"),onPress:()=>{E(!0),k(!1)}},{title:e("button_cancel"),type:lj.Secondary,onPress:()=>{k(!1)}}]}),D.createElement(sz,{isVisible:x,title:e("new_cal_summary_modal_expire_title"),message:e("new_cal_summary_modal_expire_body"),icon:GK,onModalHide:()=>{_.current?.reset(),oV?d.set({glucoseSampleID:null,isUsingGlucoseSample:!1,glucoseTimestamp:null}):d.set({isUsingGlucoseDeviceReading:!1,glucoseTimestamp:null}),T&&t(C2.GlucoseTab,{editGlucose:IX()}),T&&y(!1),O(!1)},buttons:[{title:e("new_cal_summary_modal_expire_button_edit"),onPress:()=>{O(!0),I(!1)}},{title:e("button_cancel"),type:lj.Secondary,onPress:()=>{I(!1)}}]}))}),l7=e=>d.jsx(R6,{...e}),u7=()=>{const{t:e}=eV(),{Navigator:t,Screen:n}=u6();return d.jsxs(t,{screenOptions:{...s0,tabBarHideOnKeyboard:!0,title:e("new_calculation_navigation")},backBehavior:"none",tabBar:l7,children:[d.jsx(n,{name:C2.GlucoseTab,component:n7}),d.jsx(n,{name:C2.CarbsTab,component:U6}),d.jsx(n,{name:C2.ActivityTab,component:N6}),d.jsx(n,{name:C2.SummaryTab,component:s7})]})};function c7(){const{t:e}=eV(),{Navigator:t,Screen:n}=k2();return d.jsxs(t,{screenOptions:{headerShown:!1,...dJ},children:[d.jsx(n,{name:C2.ActiveInsulin,component:B5,options:{...a0,headerLeft:()=>null,headerRight:Q2,title:e("new_calculation_navigation")}}),d.jsx(n,{name:C2.RegisterActiveInsulin,component:N5,options:{...o0,headerLeft:e0,title:e("recent_insulin_navigation_title"),...yJ}}),d.jsx(n,{name:C2.CalculationBottomTabs,component:u7}),d.jsx(n,{name:C2.LoadingRecommendation,component:v5}),d.jsx(n,{name:C2.Recommendation,component:b5,options:{...a0,headerShown:!1}}),d.jsx(n,{name:C2.LeavingRecommendation,component:D3})]})}const d7=AX(FL.CONSTANTS.ACTIVITY_TARGET_GLUCOSE_MIN,FL.CONSTANTS.ACTIVITY_TARGET_GLUCOSE_MAX),h7=RX(90,250),m7={fromZero:1,fromThirty:.75,fromFortysix:.5},p7={fromZero:1,fromThirty:.5,fromFortysix:.25},f7={fromZero:1,fromThirty:.25,fromFortysix:null},g7={fromZero:1,fromThirty:.5,fromFortysix:.5};function _7(){return{target:8,light:m7,moderate:p7,hard:f7,post:g7}}const v7=({text:e,learnMoreText:t,learnMoreOnPress:n})=>{const{t:i}=eV();return M.createElement(ga,{style:y7.card},M.createElement(kQ,null),M.createElement(ga,{style:y7.rightContainer},M.createElement(pj,{style:y7.contactText},e??i("warning_HCP")),void 0!==t&&void 0!==n&&M.createElement(Ic,{onPress:n,style:y7.learnMoreContainer},M.createElement(pj,{style:y7.learnMoreText},t),M.createElement(lQ,{color:wL.iconBrand,height:16,width:16}))))},y7=Ei.create({card:{backgroundColor:wL.bgInfoBox,borderRadius:16,paddingHorizontal:16,paddingVertical:12,flexDirection:"row",gap:8},rightContainer:{flex:1,gap:8},learnMoreContainer:{flexDirection:"row",alignItems:"center",gap:4},contactText:{flexShrink:1,..._L.regular_SM,color:wL.text},learnMoreText:{flexShrink:1,..._L.semiBold_SM,color:wL.textBrand}});function b7({columnDisposition:e,disabled:t=!1,testID:n,children:i,style:r}){return D.createElement(ga,{testID:n,style:[w7.row,t&&w7.disabledRow,r]},D.Children.map(i,(n,i)=>D.isValidElement(n)?D.cloneElement(n,{disabled:t,cellRatio:e?e[i]:void 0}):null))}const w7=Ei.create({row:{flexDirection:"row",justifyContent:"space-between",backgroundColor:wL.bgTableTopActive},disabledRow:{opacity:.5}});function S7({index:e,columnDisposition:t,disabled:n=!1,testID:i,children:r,style:a}){const o=M.useCallback(e=>void 0!==e&&e%2?wL.bgTableInputActive:wL.bgTableHighlight,[]);return D.createElement(ga,{testID:i,style:[k7.row,n&&k7.disabledRow,{backgroundColor:o(e)},a]},D.Children.map(r,(e,i)=>D.isValidElement(e)?D.cloneElement(e,{disabled:n,cellRatio:t?t[i]:void 0}):null))}const k7=Ei.create({row:{flexDirection:"row",justifyContent:"space-between"},disabledRow:{opacity:.5}});function C7({columnDisposition:e,disabled:t=!1,testID:n,children:i,style:r}){return D.createElement(ga,{testID:n,style:[E7.table,t&&E7.tableDisabled,r]},(()=>{let n=0;return D.Children.map(i,i=>{if(D.isValidElement(i)){if(i.type===b7){const n=i;return D.cloneElement(n,{disabled:n.props.disabled??t,columnDisposition:e})}if(i.type===S7){const r=i,a=D.cloneElement(r,{disabled:r.props.disabled??t,index:n,columnDisposition:e});return n+=1,a}return D.cloneElement(i)}return null})})())}const E7=Ei.create({table:{borderRadius:16,overflow:"hidden",backgroundColor:wL.bgTableInputActive},tableDisabled:{backgroundColor:wL.bgTableInputInactive}});function x7({disabled:e=!1,onPress:t,testID:n,accessibilityLabel:i,accessibilityValue:r,cellRatio:a,children:o,style:s}){return D.createElement(Ic,{disabled:!t||e,onPress:t,style:[I7.cell,{flex:a??1},s],testID:n,accessibilityRole:"button",accessibilityHint:"Double-tap to set value",accessibilityState:{disabled:e},accessibilityLabel:i,accessibilityValue:{text:r}},D.Children.map(o,t=>{if(D.isValidElement(t)){const n=t;if(e){const e=n.props.style,t=Array.isArray(e)?[...e,{color:wL.text}]:[e,{color:wL.text}];return D.cloneElement(n,{...n.props,style:t})}return D.cloneElement(n)}return null}))}const I7=Ei.create({cell:{justifyContent:"center",alignItems:"center",borderColor:wL.borderTableDivider,borderTopWidth:1,borderLeftWidth:1,paddingVertical:8}});function T7({testID:e,cellRatio:t,children:n,style:i,accessibilityLabel:r,accessibilityValue:a,disabled:o=!1}){return D.createElement(ga,{style:[O7.cell,{flex:t??1},i],testID:e,accessible:!0,accessibilityRole:"header",accessibilityState:{disabled:o},accessibilityLabel:r,accessibilityValue:{text:a}},n)}const O7=Ei.create({cell:{justifyContent:"space-between",alignItems:"center",borderColor:wL.borderTableDivider,borderTopWidth:1,borderLeftWidth:1,paddingVertical:8}}),R7=()=>Jj("activity_settings_table_min"),A7=[{title:"0-29",subtitle:R7},{title:"30-45",subtitle:R7},{title:"46-60",subtitle:R7}],L7=e=>Math.round(100*(1-e)),P7=e=>null===e?"-":`${L7(e).toString()} %`,M7=e=>Math.round(100*(1-e/100))/100;const D7=rF(function(){const{t:e}=eV(),{modalStoreActions:t}=z2(),[n,i]=M.useState(!1),[r,a]=M.useState(!1),[o,s]=M.useState(!1),[l,u]=M.useState(null),[c,d]=M.useState(null),[h,m]=M.useState(void 0),{glucoseUnit:p}=Vq;if(void 0===p)throw new Error("[ActivitySettings::render] glucoseUnit is not defined");const{activity:f}=Vq;if(void 0===f)throw new Error("[ActivitySettings::render] activity is not defined");const{target:g,post:_,hard:v,light:y,moderate:b}=f,w=M.useMemo(()=>PQ(g,FL.BloodGlucoseUnit.MMOL_L,p),[p,g]),{text:S}=M.useMemo(()=>Xq(p),[p]),k=M.useMemo(()=>({light:y,moderate:b,hard:v}),[y,b,v]),C=M.useMemo(()=>({post:_}),[_]),E=M.useCallback(async()=>{const e={..._7(),target:g,post:_};if(LX(f,e))return;const t=await Vq.setUserSettings({activity:e});m(t)},[f,_,g]),x=M.useCallback(async()=>{const e={hard:v,moderate:b,light:y,target:g,post:_7().post};if(LX(f,e))return;const t=await Vq.setUserSettings({activity:e});m(t)},[f,v,y,b,g]),I=M.useCallback((e,t)=>{u({interval:t,intensity:e}),i(!0)},[i,u]),T=M.useCallback(()=>{u(null),i(!0)},[]),O=M.useCallback(async e=>{if(null===l)throw new Error("[ActivitySettings::updateActivity] pressedTableCell is null");if(M7(e)!==f[l.intensity][l.interval]){const t=JSON.parse(JSON.stringify(f));t[l.intensity][l.interval]=M7(e);const n=await Vq.setUserSettings({activity:t});m(n)}},[f,l]),R=M.useCallback(async e=>{const t=AQ(e,p,FL.BloodGlucoseUnit.MMOL_L);if(t!==f.target){const e=JSON.parse(JSON.stringify(f));e.target=t;const n=await Vq.setUserSettings({activity:e});m(n)}},[f,p]),A=M.useCallback(async e=>{l?await O(e):await R(e),i(!1)},[l,O,R]),L=M.useMemo(()=>{if(null===l){return p===FL.BloodGlucoseUnit.MMOL_L?d7:h7}return RX(0,75)},[l,p]),P=M.useMemo(()=>{if(null===l){const e=PQ(g,FL.BloodGlucoseUnit.MMOL_L,p);return L.findIndex(t=>t===e)}const e=f[l.intensity][l.interval];return null===e?75:L7(e)},[l,f,g,p,L]),N=M.useCallback(()=>{!1===h&&t.set({showSyncErrorModal:!0}),m(void 0)},[h,t]);return D.createElement(D.Fragment,null,D.createElement(Xa,{testID:"settings-activity-scroll",style:N7.scrollView,contentContainerStyle:N7.scrollViewContent},D.createElement(v7,{text:e("physical_activity_hcp_card_body"),learnMoreText:e("physical_activity_hcp_card_button"),learnMoreOnPress:()=>{s(!0)}}),D.createElement(ga,null,D.createElement(Sj,{title:e("physical_activity_target_title"),subtitle:e("physical_activity_target_body")}),D.createElement(bj,{title:e("target_activity_input"),value:`${w} ${S}`,testID:"activity-target",onPress:T})),D.createElement(ga,null,D.createElement(Sj,{title:e("target_activity_reduction_title"),subtitle:e("target_activity_reduction_body")}),D.createElement(C7,{columnDisposition:[3,2,2,2]},D.createElement(b7,null,[{title:Jj("table_activity_intensity"),maxFontSizeMultiplier:yL},{title:"0-29",subtitle:R7(),maxFontSizeMultiplier:bL},{title:"30-45",subtitle:R7(),maxFontSizeMultiplier:bL},{title:"46-60",subtitle:R7(),maxFontSizeMultiplier:bL}].map((e,t)=>D.createElement(T7,{key:e.title,style:[0===t&&N7.tableFirstCell,N7.noTopBorder]},D.createElement(pj,{style:N7.tableHeaderTitle,maxFontSizeMultiplier:e.maxFontSizeMultiplier},e.title),D.createElement(D.Fragment,null,e.subtitle&&D.createElement(pj,{style:N7.tableHeaderSubtitle},e.subtitle))))),Object.keys(k).map(e=>D.createElement(S7,{key:e},D.createElement(x7,{style:N7.tableFirstCell},D.createElement(pj,{style:N7.tableTitle},OQ[e]())),Object.keys(k[e]).map(t=>D.createElement(x7,{key:t,testID:`settings-activity-${e}-${t}`,onPress:()=>{I(e,t)}},D.createElement(pj,{style:N7.tableText},P7(k[e][t])))))),D.createElement(Ic,{style:N7.resetContainer,onPress:()=>{d("during"),a(!0)},testID:"restore-default-activity-settings-during"},D.createElement(pj,{style:N7.resetText},e("button_reset_default"))))),D.createElement(ga,null,D.createElement(Sj,{title:e("target_activity_reduction_after_title"),subtitle:e("target_activity_reduction_after_body")}),D.createElement(C7,null,D.createElement(b7,null,A7.map((e,t)=>D.createElement(T7,{key:e.title,style:[0===t&&N7.noLeftBorder,N7.noTopBorder]},D.createElement(pj,{style:N7.tableHeaderTitle},e.title),D.createElement(pj,{style:N7.tableHeaderSubtitle},e.subtitle())))),D.createElement(S7,null,Object.keys(C.post).map((e,t)=>D.createElement(x7,{key:e,style:[0===t&&N7.noLeftBorder,N7.activeBackground],testID:`settings-activity-post-${e}`,onPress:()=>{I("post",e)}},D.createElement(pj,{style:N7.tableText},P7(C.post[e]))))),D.createElement(Ic,{style:N7.resetContainer,onPress:()=>{d("after"),a(!0)},testID:"restore-default-activity-settings-after"},D.createElement(pj,{style:N7.resetText},e("button_reset_default")))))),D.createElement(n3,{initialScrollIndex:P,isVisible:n,onCancel:()=>{i(!1)},onConfirm:A,items:L,onModalHide:N,testID:"activity-wheel-picker"}),D.createElement(sz,{title:e("physical_activity_modal_reset_title "),isVisible:r,onModalHide:N,buttons:[{title:e("button_reset"),type:lj.Error,onPress:async()=>{"after"===c?await x():await E(),a(!1)}},{title:e("button_cancel"),type:lj.Secondary,onPress:()=>{a(!1)}}]}),D.createElement(sz,{isVisible:o,enableScroll:!0,buttons:[{title:e("button_close"),onPress:()=>{s(!1)},style:N7.activityInfoModalButton}]},D.createElement(A6,null)),D.createElement(U0,{onModalHide:()=>{m(void 0)}}))}),N7=Ei.create({scrollView:{paddingHorizontal:16},scrollViewContent:{flexGrow:1,gap:32,paddingVertical:32},tableFirstCell:{paddingLeft:16,alignItems:"flex-start",borderLeftWidth:0},resetText:{..._L.semiBold_Base,color:wL.textDangerTableActive,textAlign:"center"},resetContainer:{backgroundColor:wL.bgInput,alignItems:"center",padding:16,borderTopWidth:1,borderColor:wL.borderTableDivider},tableHeaderTitle:{..._L.semiBold_Base,color:wL.textInputText},tableHeaderSubtitle:{..._L.medium_XS,color:wL.textInputTextSecondary},tableTitle:{..._L.regular_Base,color:wL.text},tableText:{..._L.medium_Base,color:wL.textTableActive},activityInfoModalButton:{marginTop:32},noTopBorder:{borderTopWidth:0},noLeftBorder:{borderLeftWidth:0},activeBackground:{backgroundColor:wL.bgTableInputActive}}),F7=Array.from({length:60},(e,t)=>t.toString().padStart(2,"0"));const B7=D.memo(function({isVisible:e,initialValue:t,min:n,max:i,onCancel:r,onConfirm:a,onModalHide:o}){const{width:s}=vm(),l=M.useRef(null),u=M.useRef(null),c=M.useMemo(()=>{const e=[],t=i?nX("59","mm",new Date(i)):nX("23:59","HH:mm",new Date);let r=n?nX("00","mm",new Date(n)):nX("00:00","HH:mm",new Date);for(;s$(r,t)||aX(r,t);)e.push(r),r=iY(r,1);return e},[i,n]),d=M.useMemo(()=>c.map(e=>e.getHours().toString().padStart(2,"0"),[]),[c]),[h,m]=M.useState(t),p=function(e){const t=M.useRef(void 0);return M.useEffect(()=>{t.current=e},[e]),t.current}(e);M.useEffect(()=>{!p&&e&&m(t)},[p,e,t]);const f=M.useMemo(()=>c.findIndex(e=>e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()&&e.getHours()===t.getHours()),[c,t]),g=M.useMemo(()=>{const[,e]=i$(t,"HH:mm").split(":");return F7.indexOf(e)},[t]),_=M.useMemo(()=>c.findIndex(e=>e.getFullYear()===h.getFullYear()&&e.getMonth()===h.getMonth()&&e.getDate()===h.getDate()&&e.getHours()===h.getHours()),[c,h]),v=M.useMemo(()=>{const[,e]=i$(h,"HH:mm").split(":");return F7.indexOf(e)},[h]),y=M.useMemo(()=>n?0:null,[n]),b=M.useMemo(()=>i?c.length-1:null,[i,c]),w=M.useMemo(()=>{if(!n)return null;const[,e]=i$(n,"HH:mm").split(":");return F7.indexOf(e)},[n]),S=M.useMemo(()=>{if(!i)return null;const[,e]=i$(i,"HH:mm").split(":");return F7.indexOf(e)},[i]),k=M.useCallback(()=>{a(h)},[a,h]),C=M.useCallback(()=>{m(t),r()},[r,t]),E=M.useCallback((e,r)=>{if(e<0||r<0||e>=c.length||r>=F7.length)return;const a=`${c[e].getHours()}:${F7[r]}`;if(!n||!i){const e=nX(a,"HH:mm",new Date(t));return void m(e)}const o=c[e],s=nX(a,"HH:mm",new Date(o));m(s)},[n,i,c,t]),x=M.useCallback(e=>{u.current?.scrollToIndex(e)},[]),I=M.useCallback(e=>{null!==b&&null!==y&&null!==S&&null!==w?e===y&&v<w?(E(e,w),x(w)):e===b&&v>S?(E(e,S),x(S)):E(e,v):E(e,v)},[b,y,S,w,E,v,x]),T=M.useCallback(e=>{null!==b&&null!==y&&null!==S&&null!==w?_===y&&e<w?(E(_,w),x(w)):_===b&&e>S?(E(_,S),x(S)):E(_,e):E(_,e)},[E,b,S,y,w,x,_]);return D.createElement(sz,{isVisible:e,containerStyle:j7.modalContainer,onModalHide:o},D.createElement(ga,null,D.createElement(ga,{style:j7.pickersContainer},D.createElement(t3,{testID:"hours_wheel_picker",key:"hours-wheel-picker",ref:l,initialScrollIndex:f,options:d,onChange:I,containerStyle:[j7.itemContainerLeft,{width:(s-32)/2}],selectedIndicatorStyle:[j7.selectedIndicatorLeft,{width:(s-32)/2-10}],itemStyle:j7.itemLeft}),D.createElement(t3,{testID:"minutes_wheel_picker",key:"minutes-wheel-picker",ref:u,initialScrollIndex:g,options:F7,onChange:T,containerStyle:[j7.itemContainerRight,{width:(s-32)/2}],selectedIndicatorStyle:[j7.selectedIndicatorRight,{width:(s-32)/2-10}],itemStyle:j7.itemRight})),D.createElement(ga,{style:j7.buttonContainer},D.createElement(q0,{onPress:k}),D.createElement($0,{onPress:C}))))}),j7=Ei.create({modalContainer:{backgroundColor:wL.bgTransparent},buttonContainer:{gap:8},pickersContainer:{flexDirection:"row",borderTopLeftRadius:13,borderTopRightRadius:13,overflow:"hidden"},itemContainerLeft:{borderTopRightRadius:0,paddingLeft:16},itemContainerRight:{borderTopLeftRadius:0,paddingRight:16},itemLeft:{alignSelf:"flex-end",marginRight:16},itemRight:{alignSelf:"flex-start",marginLeft:16},selectedIndicatorRight:{alignSelf:"flex-start",borderTopLeftRadius:0,borderBottomLeftRadius:0},selectedIndicatorLeft:{alignSelf:"flex-end",borderTopRightRadius:0,borderBottomRightRadius:0}});var V7=(e=>(e.Low="low",e.Target="target",e.High="high",e))(V7||{});const H7=()=>Jj("table_fixed_target");const z7=(e,t)=>({startTime:e.startTime,low:PQ(e.low,FL.BloodGlucoseUnit.MMOL_L,t),target:PQ(e.target,FL.BloodGlucoseUnit.MMOL_L,t),high:PQ(e.high,FL.BloodGlucoseUnit.MMOL_L,t)}),U7=(e,t)=>{const n=e.startTime;let i=parseFloat(e.low),r=parseFloat(e.target),a=parseFloat(e.high);return i=AQ(i,t,FL.BloodGlucoseUnit.MMOL_L),r=AQ(r,t,FL.BloodGlucoseUnit.MMOL_L),a=AQ(a,t,FL.BloodGlucoseUnit.MMOL_L),{startTime:n,low:i,target:r,high:a}},G7=(e,t)=>e.map(e=>U7(e,t));const W7=rF(function(){const{t:e}=eV(),{modalStoreActions:t}=z2(),n=Gp(),[i,r]=M.useState(),[a,o]=M.useState(void 0),[s,l]=M.useState(!1),[u,c]=M.useState(!1),[d,h]=M.useState(!1),[m,p]=M.useState(),f=Vq.glucoseUnit;if(void 0===f)throw new Error("[GlucoseSettings::render] glucoseUnit is undefined.");const g=Vq.glucoseLevelTargets;if(void 0===g)throw new Error("[GlucoseSettings::render] parameters from userSettings must be defined and non-null.");const _=g.targetBGLIntervals;if(!_)throw new Error("[GlucoseSettings::render] parameters from userSettings must be defined and non-null.");const v=g.overallTargetBGL;if(!v)throw new Error("[GlucoseSettings::render] parameters from userSettings must be defined and non-null.");const y=g.use===FL.Usage.Overall,b=((e,t)=>e.map(e=>z7(e,t)))(_,f),w=z7(v,f),S=M.useCallback(e=>{c(!0),p(e)},[]),k=M.useCallback(async()=>{const e=[{startTime:"00:00",low:6,target:8,high:10},{startTime:"05:00",low:4,target:6,high:7.2},{startTime:"09:00",low:6,target:7,high:8},{startTime:"11:00",low:4,target:6,high:10},{startTime:"13:00",low:6,target:7,high:8},{startTime:"18:00",low:4,target:6,high:10},{startTime:"22:00",low:6,target:8,high:10}],t={startTime:"00:00",low:3.9,target:6,high:10},n={...g,targetBGLIntervals:e},i={...g,overallTargetBGL:t},r=y?i:n;if(y?!LX(g.overallTargetBGL,t):!LX(g.targetBGLIntervals,e)){const e=await Vq.setUserSettings({glucoseLevelTargets:r});o(e)}h(!1)},[g,y]),C=M.useCallback(async e=>{if(e!==parseFloat(w.target)){const t={...w};t.target=e.toString();const n=U7(t,f),i={glucoseLevelTargets:{...g,overallTargetBGL:n}},r=await Vq.setUserSettings(i);o(r)}},[f,w,g]),E=M.useCallback(async e=>{if(void 0!==m&&e!==parseFloat(b[m].target)){const t=[...b],n={...t[m]};n.target=e.toString(),t[m]=n;const i=G7(t,f),r={glucoseLevelTargets:{...g,targetBGLIntervals:i}},a=await Vq.setUserSettings(r);o(a)}},[m,b,f,g]),x=M.useCallback(async e=>{y?await C(e):await E(e),c(!1)},[y,C,E]),I=M.useCallback(async()=>{const e=!y,n={glucoseLevelTargets:{...g,use:e?FL.Usage.Overall:FL.Usage.Intervals}},i=await Vq.setUserSettings(n);t.set({showSyncErrorModal:!i})},[y,g,t]),T=M.useMemo(()=>Xq(f).text,[f]),O=M.useMemo(()=>{const e=f===FL.BloodGlucoseUnit.MMOL_L,{min:t,max:n}=e?(e=>{switch(e){case"low":return{min:3,max:8.5};case"target":return{min:FL.CONSTANTS.TARGET_GLUCOSE_MIN,max:FL.CONSTANTS.TARGET_GLUCOSE_MAX};case"high":return{min:7.2,max:13.9};default:throw new Error("[glucoseSettings::getBGIntervalsConstantsMMOLL] - No IntervalType defined")}})(V7.Target):(e=>{switch(e){case"low":return{min:54,max:153};case"target":return{min:79,max:180};case"high":return{min:130,max:250};default:throw new Error("[glucoseSettings::getBGIntervalsConstantsMGDL] - No IntervalType defined")}})(V7.Target);return f===FL.BloodGlucoseUnit.MG_DL?RX(t,n):AX(t,n)},[f]),R=M.useMemo(()=>void 0===m?0:y?O.indexOf(w.target):O.indexOf(b[m].target),[m,y,O,b,w.target]),A=M.useCallback(e=>{const t=b[(e-1+b.length)%b.length].startTime,n=b[(e+1+b.length)%b.length].startTime,i=nX(b[e].startTime,"HH:mm",new Date),a=nX(t,"HH:mm",new Date),o=nX(n,"HH:mm",new Date);s$(i,a)&&s$(i,o)?r({current:i,min:hY(sX(a,1),1),max:hX(o)}):o$(i,a)&&o$(i,o)?r({current:i,min:hY(a,1),max:hX(tY(o,1))}):r({current:i,min:hY(a,1),max:hX(o)}),l(!0),p(e)},[b]),L=M.useCallback(async e=>{if(void 0===m)return;const t=i$(e,"HH:mm");if(t!==b[m].startTime){const e=[...b],n={...e[m]};n.startTime=t,e[m]=n;const i=G7(e,f),r={glucoseLevelTargets:{...g,targetBGLIntervals:i}},a=await Vq.setUserSettings(r);o(a)}l(!1)},[m,b,f,g]),P=M.useCallback(()=>{l(!1)},[]),N=M.useCallback(()=>{c(!1)},[]),F=M.useCallback(()=>{!1===a&&t.set({showSyncErrorModal:!0}),o(void 0)},[t,a]);return D.createElement(D.Fragment,null,D.createElement(Xa,{testID:"settings-glucose-scrollview",style:Y7.scrollView,contentContainerStyle:Y7.scrollViewContent},D.createElement(v7,null),D.createElement(bj,{title:e("glucose_input"),value:T,testID:"glucose-change",onPress:()=>{n.navigate(C2.GlucoseUnit)},renderRightSlot:()=>D.createElement(QK,null)}),D.createElement(C7,{columnDisposition:[1,2]},D.createElement(lz,{title:e("fixed_input_title"),message:e("fixed_input_body"),value:y,testID:"settings-glucose-overall-switch",onValueChange:I,style:Y7.switchContainer}),D.createElement(b7,{disabled:!y,testID:"settings-glucose-overall-header"},D.createElement(T7,{style:Y7.tableFirstCell,testID:"settings-glucose-overall-header-time"},D.createElement(pj,{style:Y7.headerTitle,maxFontSizeMultiplier:bL},e("table_fixed_low"))),D.createElement(T7,{testID:"settings-glucose-overall-header-target"},D.createElement(pj,{style:Y7.headerTitle,maxFontSizeMultiplier:bL},H7()),D.createElement(pj,{style:Y7.headerSubtitle},T))),D.createElement(S7,{disabled:!y},D.createElement(x7,{style:Y7.tableFirstCell},D.createElement(pj,{style:Y7.subtitle},e("table_fixed_all_day "))),D.createElement(x7,{onPress:()=>{S(0)}},D.createElement(pj,{style:Y7.fixedValueTitle,testID:"settings-glucose-overall-all-day-target"},w.target))),D.createElement(Ic,{style:Y7.resetContainer,disabled:!y,onPress:()=>{h(!0)}},D.createElement(pj,{style:[Y7.resetText,!y&&Y7.resetTextDisabled]},e("button_reset_default")))),D.createElement(C7,{columnDisposition:[1,2]},D.createElement(lz,{title:e("table_variable_title"),message:e("table_variable_body"),value:!y,testID:"daily-interval-switch",onValueChange:I,style:Y7.switchContainer}),D.createElement(b7,{disabled:y,testID:"settings-glucose-variable-header"},D.createElement(T7,{style:Y7.tableFirstCell,testID:"settings-glucose-variable-header-time"},D.createElement(pj,{style:Y7.headerTitle,maxFontSizeMultiplier:bL},e("table_variable_time")),D.createElement(pj,{style:Y7.headerSubtitle},e("table_variable_time_unit"))),D.createElement(T7,{key:H7(),testID:"settings-glucose-variable-header-target"},D.createElement(pj,{style:Y7.headerTitle,maxFontSizeMultiplier:vL},H7()),D.createElement(pj,{style:Y7.headerSubtitle},T))),b.map((e,t)=>D.createElement(S7,{key:e.startTime,disabled:y},D.createElement(x7,{style:Y7.tableFirstCell,onPress:()=>{A(t)}},D.createElement(pj,{style:Y7.title},e.startTime),D.createElement(pj,{style:Y7.subtitle},rV[Object.keys(iV)[t]]())),D.createElement(x7,{onPress:()=>{S(t)}},D.createElement(pj,{style:Y7.title,testID:`settings-glucose-variable-target-${Object.keys(iV)[t].toLowerCase()}`},e.target)))),D.createElement(Ic,{style:Y7.resetContainer,disabled:y,onPress:()=>{h(!0)}},D.createElement(pj,{style:[Y7.resetText,y&&Y7.resetTextDisabled]},e("button_reset_default"))))),D.createElement(n3,{isVisible:u,items:O,onConfirm:x,onCancel:N,initialScrollIndex:R,onModalHide:F,testID:"settings-glucose-target-wheel-picker"}),D.createElement(B7,{isVisible:s,initialValue:i?.current??new Date,min:i?.min,max:i?.max,onConfirm:L,onCancel:P,onModalHide:F}),D.createElement(sz,{isVisible:d,title:e("physical_activity_modal_reset_title "),onModalHide:F,buttons:[{title:e("button_reset"),type:lj.Error,onPress:k},{title:e("button_cancel"),type:lj.Secondary,onPress:()=>{h(!1)}}]}),D.createElement(U0,{onModalHide:()=>{o(void 0)}}))}),Y7=Ei.create({scrollView:{paddingHorizontal:16},scrollViewContent:{flexGrow:1,gap:32,paddingVertical:32},tableFirstCell:{alignItems:"flex-start",paddingLeft:16,borderLeftWidth:0},resetContainer:{alignItems:"center",padding:16,borderTopWidth:1,borderColor:wL.borderTableDivider},resetText:{..._L.semiBold_Base,color:wL.textDangerTableActive,textAlign:"center"},resetTextDisabled:{color:wL.textTableInactive},headerTitle:{..._L.medium_Base,color:wL.text},headerSubtitle:{..._L.medium_XS,color:wL.textInputTextSecondary},title:{..._L.medium_Base,color:wL.textTableActive},fixedValueTitle:{..._L.medium_Base,color:wL.textTableActive,paddingVertical:8},subtitle:{..._L.regular_XS,color:wL.textInputTextSecondary},switchContainer:{borderBottomLeftRadius:0,borderBottomRightRadius:0}}),$7=e=>{const{t:t}=eV(),{glucoseUnit:n,isError:i,onPressMGDL:r,onPressMMOLL:a}=e,o=n===FL.BloodGlucoseUnit.MMOL_L,s=n===FL.BloodGlucoseUnit.MG_DL,l=o?q7.unitButton:X7.unitButton,u=s?q7.unitButton:X7.unitButton;return D.createElement(ga,{style:X7.unitsContainer},D.createElement(Ic,{testID:`mmoll-button-${o}`,onPress:a,style:i?q7.unitErrorButton:l,accessibilityRole:"button",accessibilityState:{selected:o}},D.createElement(pj,{style:o?q7.unitText:X7.unitText,maxFontSizeMultiplier:vL},t("glucose_unit_mmol/l")),D.createElement(pj,{style:o?q7.exampleText:X7.exampleText,maxFontSizeMultiplier:vL},t("example")),D.createElement(pj,{style:o?q7.unitExampleText:X7.unitExampleText,maxFontSizeMultiplier:vL},t("glucose_unit_example_mmol/L"))),D.createElement(Ic,{testID:`mgdl-button-${s}`,onPress:r,style:i?q7.unitErrorButton:u,accessibilityRole:"button",accessibilityState:{selected:s}},D.createElement(pj,{style:s?q7.unitText:X7.unitText,maxFontSizeMultiplier:vL},t("glucose_unit_mg/dl")),D.createElement(pj,{style:s?q7.exampleText:X7.exampleText,maxFontSizeMultiplier:vL},t("example")),D.createElement(pj,{style:s?q7.unitExampleText:X7.unitExampleText,maxFontSizeMultiplier:vL},t("glucose_unit_example_mg/dl"))))},X7=Ei.create({unitsContainer:{flexDirection:"row",justifyContent:"space-between",gap:12},unitButton:{flex:1,paddingHorizontal:14,paddingVertical:10,backgroundColor:wL.bgInput,borderColor:wL.bgInput,borderRadius:16,borderWidth:2},unitText:{..._L.medium_Base,color:wL.text,marginBottom:8},exampleText:{..._L.medium_XS,color:wL.textSecondary,marginBottom:4},unitExampleText:{..._L.regular_XS,color:wL.textSecondary}}),q7=Ei.create({unitButton:{...X7.unitButton,backgroundColor:wL.bgBrand,borderColor:wL.borderOnBrand},unitErrorButton:{...X7.unitButton,borderColor:wL.borderDanger},unitText:{...X7.unitText},exampleText:{...X7.exampleText,color:wL.text},unitExampleText:{...X7.unitExampleText,color:wL.text}}),Z7=Ei.create({container:{paddingHorizontal:16,paddingTop:32}}),K7=rF(()=>{const{modalStoreActions:e}=z2(),t=M.useCallback(async t=>{if(t===Vq.glucoseUnit)return;const n=await Vq.setUserSettings({bloodGlucoseUnits:t});e.set({showSyncErrorModal:!n})},[e]);return D.createElement(D.Fragment,null,D.createElement(ga,{style:Z7.container},D.createElement($7,{onPressMMOLL:()=>t(FL.BloodGlucoseUnit.MMOL_L),onPressMGDL:()=>t(FL.BloodGlucoseUnit.MG_DL),glucoseUnit:Vq.glucoseUnit})),D.createElement(U0,null))}),Q7=()=>{const{t:e}=eV(),t=Gp();return M.createElement(Xa,{contentContainerStyle:J7.scrollView,testID:"legal-page-scrollview"},M.createElement(pj,{style:J7.title},e("legal_title")),M.createElement(ga,{style:J7.section},M.createElement(dQ,{testID:"manufacturer-symbol",color:wL.bgBackground}),M.createElement(pj,{style:J7.textContainer},"2025-09-08")),M.createElement(ga,{style:J7.section},M.createElement(cQ,{testID:"manual-icon"}),M.createElement(pj,{testID:"manual-button",style:J7.manualText,onPress:()=>{NX(MX.SettingsIFU),t.navigate(C2.IFU)}},e("legal_IFU"))),M.createElement(ga,{style:J7.section},M.createElement(gQ,{testID:"SN-symbol"}),M.createElement(pj,{style:J7.textContainer},PX)),M.createElement(ga,{style:J7.section},M.createElement(YK,{testID:"ce-logo"}),M.createElement(pj,{style:J7.alignTop},e("legal_ce_mark_text"))),M.createElement(ga,{style:J7.section},M.createElement(dQ,{color:wL.text}),M.createElement(ga,{style:J7.textContainer},M.createElement(pj,{style:J7.sectionTitle},e("legal_company_name")),M.createElement(pj,null,e("legal_company_adress")),M.createElement(pj,null,e("legal_company_country")),M.createElement(pj,null,e("legal_company_email")),M.createElement(pj,null,e("legal_company_cvr_vat")))),M.createElement(ga,{style:[J7.section,J7.udiSection]},M.createElement(bQ,{testID:"udi-logo",style:J7.udiLogo}),M.createElement(pj,{style:[J7.textContainer,J7.udiText]},M.createElement(pj,null,"(01)05700002209597(10)"),M.createElement(pj,null,`${PX}(8012)${PX}`))),M.createElement(ga,{style:J7.sectionColumn},M.createElement(wQ,{testID:"uk-rep-logo",style:J7.repIcon}),M.createElement(pj,null,e("legal_ukrep")),M.createElement(pj,null,e("united_kingdom")),M.createElement(pj,null,e("legal_ukrep1"))),null)},J7=Ei.create({scrollView:{paddingVertical:32,paddingHorizontal:16},title:{..._L.regular_SM,textAlign:"center",marginBottom:32},section:{flexDirection:"row",marginBottom:32},sectionTitle:{..._L.medium_Base},textContainer:{flex:1,marginLeft:20,alignSelf:"center"},alignTop:{flex:1,marginLeft:20,alignSelf:"flex-start"},sectionColumn:{marginBottom:32},repIcon:{marginBottom:12},manualText:{..._L.medium_Base,color:wL.textBrand,marginLeft:20,alignSelf:"center"},udiSection:{flexWrap:"wrap",marginBottom:20},udiLogo:{marginRight:20,marginBottom:12},udiText:{marginLeft:0,marginBottom:12,display:"flex",flexWrap:"wrap"}}),e8=()=>{const{t:e}=eV(),{navigate:t}=Gp(),n=M.useCallback(async()=>{if(oV)t(C2.SupportContact);else{const e="support@hedia.com",t="Hedia support",n=`App version: ${PX}\n${I6({defaultValue:"unknown",supportedPlatforms:["ios","android","windows"],memoKey:"systemName",getter:()=>lr.select({ios:E6.systemName,android:"Android",windows:"Windows",default:"unknown"})})} version: ${I6({defaultValue:"unknown",getter:()=>E6.systemVersion,supportedPlatforms:["android","ios","windows"],memoKey:"systemVersion"})}`;await Vu.openURL(`mailto:${e}?subject=${t}&body=${n}`)}},[t]);return D.createElement(Xa,{contentContainerStyle:t8.wrapper},D.createElement(pj,{style:t8.title},e("support_title")),D.createElement(ga,{style:t8.buttons},D.createElement(cj,{title:e("button_email"),leftIcon:D.createElement(uQ,null),onPress:n,testID:"send_email_button"}),D.createElement(cj,{title:e("button_support_page"),leftIcon:D.createElement(yQ,null),onPress:()=>{t(C2.SupportWebView)},testID:"open_support_page_button",type:lj.Secondary}),D.createElement(cj,{title:e("button_instructions"),leftIcon:D.createElement(cQ,{width:20}),onPress:()=>{NX(MX.SettingsIFU),t(C2.IFU)},testID:"open_ifu_page_button",type:lj.Secondary})))},t8=Ei.create({wrapper:{flex:1,justifyContent:"center",paddingHorizontal:16},title:{..._L.bold_3XL,marginBottom:48,color:wL.text,textAlign:"center"},buttons:{gap:16}}),n8=Ei.create({container:{marginHorizontal:16,marginTop:32},checkmarkContainer:{width:24,height:24}}),i8=rF(()=>{const{t:e}=eV(),{isOnboardingFinished:t}=Xz(),{biologicalSex:n}=Y2(),{setSetupCalculatorStoreValues:i}=W2(),{modalStoreActions:r}=z2(),a=t?Vq.biologicalSex:n,o=M.useCallback(async e=>{if(a!==e)if(t){await Vq.setUserSettings({biologicalSex:e})||r.set({showSyncErrorModal:!0})}else i({biologicalSex:e})},[a,t,r,i]);return D.createElement(ga,{testID:"biological-sex",style:n8.container},D.createElement(bj.Container,null,D.createElement(bj,{testID:"biological_sex_male",title:e("general_input_sex_option_male"),renderRightSlot:()=>D.createElement(ga,{style:n8.checkmarkContainer},a===FL.BiologicalSex.Male?D.createElement($K,{color:wL.iconCheckmark}):null),onPress:()=>o(FL.BiologicalSex.Male)}),D.createElement(bj,{testID:"biological_sex_female",title:e("general_input_sex_option_female"),renderRightSlot:()=>D.createElement(ga,{style:n8.checkmarkContainer},a===FL.BiologicalSex.Female?D.createElement($K,{color:wL.iconCheckmark}):null),onPress:()=>o(FL.BiologicalSex.Female)}),D.createElement(bj,{testID:"biological_sex_no_answer",title:e("biological_sex_no_answer"),renderRightSlot:()=>D.createElement(ga,{style:n8.checkmarkContainer},a===FL.BiologicalSex.Unspecified?D.createElement($K,{color:wL.iconCheckmark}):null),onPress:()=>o(FL.BiologicalSex.Unspecified)})),D.createElement(U0,null))}),r8=Ei.create({container:{marginHorizontal:16,marginTop:32},checkmarkContainer:{width:24,height:24}}),a8=rF(()=>{const{t:e}=eV(),{modalStoreActions:t}=z2(),n=Vq.diabetesType,[i,r]=M.useState(!1),a=M.useCallback(async e=>{if(n===e)return;await Vq.setUserSettings({diabetesType:e})?e===FL.DiabetesType.Type2&&r(!0):t.set({showSyncErrorModal:!0})},[n,t]),o=M.useCallback(()=>{r(!1)},[]);return D.createElement(D.Fragment,null,D.createElement(ga,{style:r8.container},D.createElement(bj.Container,null,D.createElement(bj,{title:e("type_of_diabetes_type1"),renderRightSlot:()=>D.createElement(ga,{style:r8.checkmarkContainer},n===FL.DiabetesType.Type1?D.createElement($K,{color:wL.iconCheckmark}):null),onPress:()=>a(FL.DiabetesType.Type1)}),D.createElement(bj,{title:e("type_of_diabetes_type2"),renderRightSlot:()=>D.createElement(ga,{style:r8.checkmarkContainer},n===FL.DiabetesType.Type2?D.createElement($K,{color:wL.iconCheckmark}):null),onPress:()=>a(FL.DiabetesType.Type2)}))),D.createElement(sz,{title:e("modal_diabetes2_title"),isVisible:i,message:e("modal_diabetes2_body"),buttons:[{title:e("button_close"),onPress:o}]}),D.createElement(U0,null))}),o8=(e,t)=>a$(new Date(e,t)),s8=(()=>{const e=(new Date).getFullYear();return[...Array(12).keys()].map(t=>i$(new Date(e,t),"MMM"))})(),l8=Array.from({length:31},(e,t)=>(t+1).toString().padStart(2,"0")),u8=(()=>{const e=(new Date).getFullYear()-1900+1,t=Array.from({length:e},(e,t)=>(t+1900).toString());return t})();const c8=D.memo(function({isVisible:e,initialValue:t,onCancel:n,onConfirm:i,onModalHide:r}){const{width:a}=vm(),o=M.useRef(null),s=M.useRef(null),l=M.useRef(null),[u,c]=M.useState(t),d=M.useMemo(()=>t.getDate()-1,[t]),h=M.useMemo(()=>t.getMonth(),[t]),m=M.useMemo(()=>{const e=t.getFullYear();return u8.indexOf(e.toString())},[t]),p=M.useMemo(()=>u.getDate()-1,[u]),f=M.useMemo(()=>u.getMonth(),[u]),g=M.useMemo(()=>u.getFullYear(),[u]),_=M.useCallback(()=>{i(u)},[i,u]),v=M.useCallback(()=>{c(t),n()},[n,t]),y=M.useCallback(e=>{const t=o8(g,e)-1,n=Math.min(p,t),i=new Date(g,e,n+1);c(i),p>t&&o.current?.scrollToIndex(t)},[p,g]),b=M.useCallback(e=>{const t=o8(g,f)-1,n=Math.min(e,t),i=new Date(g,f,n+1);c(i),e>t&&o.current?.scrollToIndex(t)},[f,g]),w=M.useCallback(e=>{const t=parseInt(u8[e],10),n=o8(t,f)-1,i=Math.min(p,n),r=new Date(t,f,i+1);c(r),p>n&&o.current?.scrollToIndex(n)},[p,f]);return D.createElement(sz,{isVisible:e,containerStyle:d8.modalContainer,onModalHide:r},D.createElement(ga,null,D.createElement(ga,{style:d8.pickersContainer},D.createElement(t3,{key:"months-wheel-picker",ref:s,initialScrollIndex:h,options:s8,onChange:y,containerStyle:[d8.itemContainerLeft,{width:(a-32)/3}],selectedIndicatorStyle:[d8.selectedIndicatorLeft,{width:(a-32)/3-10}],itemStyle:d8.itemLeft,testID:"months-wheel-picker"}),D.createElement(t3,{key:"days-wheel-picker",ref:o,initialScrollIndex:d,options:l8,onChange:b,containerStyle:[d8.itemContainerCenter,{width:(a-32)/3}],selectedIndicatorStyle:[d8.selectedIndicatorCenter,{width:(a-32)/3}],itemStyle:d8.itemCenter,testID:"days-wheel-picker"}),D.createElement(t3,{key:"years-wheel-picker",ref:l,initialScrollIndex:m,options:u8,onChange:w,containerStyle:[d8.itemContainerRight,{width:(a-32)/3}],selectedIndicatorStyle:[d8.selectedIndicatorRight,{width:(a-32)/3-10}],itemStyle:d8.itemRight,testID:"years-wheel-picker"})),D.createElement(ga,{style:d8.buttonContainer},D.createElement(q0,{onPress:_}),D.createElement($0,{onPress:v}))))}),d8=Ei.create({modalContainer:{backgroundColor:wL.bgTransparent},buttonContainer:{gap:8},pickersContainer:{flexDirection:"row",borderTopLeftRadius:13,borderTopRightRadius:13,overflow:"hidden"},itemContainerLeft:{borderTopRightRadius:0,paddingLeft:8},itemContainerCenter:{borderTopLeftRadius:0,borderTopRightRadius:0},itemContainerRight:{borderTopLeftRadius:0,paddingRight:8},itemLeft:{alignSelf:"flex-end"},itemCenter:{alignSelf:"center"},itemRight:{alignSelf:"flex-start"},selectedIndicatorRight:{alignSelf:"flex-start",borderTopLeftRadius:0,borderBottomLeftRadius:0},selectedIndicatorCenter:{alignSelf:"center",borderRadius:0},selectedIndicatorLeft:{alignSelf:"flex-end",borderTopRightRadius:0,borderBottomRightRadius:0}}),h8=RX(50,220),m8=RX(35,300);const p8=rF(function(){const{t:e}=eV(),{modalStoreActions:t}=z2(),n=Gp(),{bottom:i}=hH(),[r,a]=M.useState(!1),[o,s]=M.useState(!1),[l,u]=M.useState(!1),[c,d]=M.useState(!1),[h,m]=M.useState(void 0),[p,f]=M.useState(!1),{birthDate:g,diabetesType:_,biologicalSex:v,weightKg:y,heightCm:b}=Vq;if(void 0===_)throw new Error("[AboutSection::render] diatbetesType must be defined.");const w=M.useMemo(()=>g?new Date(g):void 0,[g]),S=M.useMemo(()=>_===FL.DiabetesType.Type1?"type_of_diabetes_type1":"type_of_diabetes_type2",[_]),k=M.useCallback(async e=>{if(e!==b){const t=await Vq.setUserSettings({height:e});m(t)}a(!1)},[b]),C=M.useCallback(async e=>{if(e!==y){const t=await Vq.setUserSettings({weight:e});m(t)}s(!1)},[y]),E=M.useMemo(()=>{if(!b)return 0;const e=Math.round(10*b)/10;return h8.indexOf(e.toString())},[b]),x=M.useMemo(()=>{if(!y)return 0;const e=Math.round(10*y)/10;return m8.indexOf(e.toString())},[y]),I=async e=>{if(e.toISOString()!==g){if(s$(e,mX(new Date))){const t=await Vq.setUserSettings({birthday:e.toISOString()});m(t)}else sV?d(!0):f(!0)}u(!1)},T=M.useCallback(()=>{!1===h&&t.set({showSyncErrorModal:!0}),m(void 0)},[t,h]),O=M.useCallback(()=>{p?d(!0):T()},[p,T]);return D.createElement(D.Fragment,null,D.createElement(ga,null,D.createElement(bj.Container,null,D.createElement(bj,{title:e("my_profile_birth"),value:w?w.toLocaleDateString():"-",testID:"date-of-birth",onPress:()=>{u(!0)}}),D.createElement(bj,{title:e("my_profile_diabetes_type"),value:e(S),testID:"diabetes-type",onPress:()=>{n.navigate(C2.DiabetesType)},renderRightSlot:()=>D.createElement(QK,{color:wL.iconInputInactive})}),D.createElement(bj,{title:e("my_profile_sex"),testID:"biologicalSex",value:v?aV[v]():"-",onPress:()=>{n.navigate(C2.BiologicalSex)},renderRightSlot:()=>D.createElement(QK,null)}),D.createElement(bj,{title:e("my_profile_height"),value:`${b??"-"} cm`,testID:"height",onPress:()=>{a(!0)}}),D.createElement(bj,{title:e("my_profile_weight"),value:`${y??"-"} kg`,testID:"weight",onPress:()=>{s(!0)}}))),lV?D.createElement(S5,{testID:"birthday-date-picker",display:"spinner",maximumDate:new Date,date:w,isVisible:l,onConfirm:I,onCancel:()=>{u(!1)},cancelTextIOS:e("button_cancel"),confirmTextIOS:e("button_confirm"),onHide:O,pickerStyleIOS:{alignSelf:"center"},modalStyleIOS:{paddingBottom:i}}):D.createElement(c8,{isVisible:l,initialValue:w??new Date,onConfirm:I,onCancel:()=>{u(!1)},onModalHide:O}),D.createElement(n3,{isVisible:r,items:h8,onConfirm:k,onCancel:()=>{a(!1)},initialScrollIndex:E,onModalHide:T,testID:"height_wheel_picker"}),D.createElement(n3,{isVisible:o,items:m8,onConfirm:C,onCancel:()=>{s(!1)},initialScrollIndex:x,onModalHide:T,testID:"weight_wheel_picker"}),D.createElement(sz,{isVisible:c,title:e("invalid_date_modal_title"),message:e("invalid_date_modal_body"),buttons:[{title:e("button_understood"),onPress:()=>{f(!1),d(!1)},testID:"understood-button"}]}),D.createElement(U0,{onModalHide:()=>{m(void 0)}}))});function f8(){const{t:e}=eV();return D.createElement(Xa,{testID:"profile-screen-scroll",style:g8.scrollView,contentContainerStyle:g8.contentContainer},D.createElement(bj,{title:e("my_profile_account"),testID:"first-name",renderLeftSlot:()=>D.createElement(SQ,null),renderRightSlot:()=>D.createElement(QK,null),onPress:()=>{window.location.href="/account"}}),D.createElement(p8,null))}const g8=Ei.create({scrollView:{paddingHorizontal:16},contentContainer:{paddingVertical:32,flexGrow:1,gap:24}}),_8=()=>{const{t:e}=eV(),{Navigator:t,Screen:n}=k2();return d.jsxs(t,{screenOptions:{...a0,...dJ},children:[d.jsx(n,{name:C2.Profile,component:f8,options:{title:e("my_profile_navigation")}}),d.jsx(n,{name:C2.BiologicalSex,component:i8,options:{title:e("biological_sex_navigation")}}),d.jsx(n,{name:C2.DiabetesType,component:a8,options:{title:e("diabetes_type_navigation")}})]})};const v8=oV?"/api/v2":zj.HEDIA_API_URL_V2,y8=()=>{const{fontScale:e}=vm(),t=e.toFixed(3);return D.createElement(D.Fragment,null,D.createElement(pj,{style:b8.text,maxFontSizeMultiplier:vL},`Country code: ${qj.getString("countryCodeAlpha2")}`),D.createElement(pj,{style:b8.text,maxFontSizeMultiplier:vL},`Font scale: ${t}`),D.createElement(pj,{style:b8.textBold,maxFontSizeMultiplier:vL},v8??".env is broken"))},b8=Ei.create({text:{..._L.regular_Base,backgroundColor:wL.bgModerate,color:wL.neutralBlack,textAlign:"center"},textBold:{..._L.semiBold_Base,backgroundColor:wL.bgModerate,color:wL.neutralBlack,textAlign:"center"}});function w8(){const{t:e}=eV(),t=Gp(),[n,i]=M.useState(!0),r=M.useCallback(()=>{NX(MX.SettingsProfile),t.navigate(C2.ProfileStack,{screen:C2.Profile})},[t]),a=M.useCallback(()=>{NX(MX.SettingsGlucose),t.navigate(C2.GlucoseSettings)},[t]),o=M.useCallback(()=>{NX(MX.SettingsInsulin),t.navigate(C2.InsulinSettingsStack,{screen:C2.InsulinSettings})},[t]),s=M.useCallback(()=>{NX(MX.SettingsActivity),t.navigate(C2.ActivitySettings)},[t]),l=M.useCallback(()=>{NX(MX.SettingsSupport),t.navigate(C2.Support)},[t]),u=M.useCallback(()=>{NX(MX.SettingsLegal),t.navigate(C2.Legal)},[t]);return d.jsxs(Xa,{testID:"scroll-settings",style:S8.scrollView,contentContainerStyle:S8.scrollViewContentContainer,contentInsetAdjustmentBehavior:"automatic",children:[d.jsx(bj,{title:e("settings_card_my_profile"),testID:"edit-profile-button",renderRightSlot:()=>d.jsx(QK,{}),onPress:r}),d.jsxs(ga,{children:[d.jsx(Sj,{title:e("settings_personal_settings_title")}),d.jsxs(bj.Container,{children:[d.jsx(bj,{title:e("settings_card_glucose"),testID:"settings-glucose",onPress:a,renderRightSlot:()=>d.jsx(QK,{})}),d.jsx(bj,{title:e("settings_card_insulin_settings"),testID:"settings-insulin",onPress:o,renderRightSlot:()=>d.jsx(QK,{})}),d.jsx(bj,{title:e("settings_card_physical_activity"),testID:"settings-activity",onPress:s,renderRightSlot:()=>d.jsx(QK,{})})]})]}),d.jsxs(ga,{children:[d.jsx(Sj,{title:e("settings_hedia_diabetes_assistant_title")}),d.jsxs(bj.Container,{children:[d.jsx(bj,{title:e("settings_support"),testID:"settings-support",onPress:l,renderRightSlot:()=>d.jsx(QK,{})}),d.jsx(bj,{title:e("settings_card_legal"),testID:"settings-legal",onPress:u,renderRightSlot:()=>d.jsx(QK,{})})]})]}),d.jsx(Ic,{onPress:()=>{i(!n)},style:S8.versionContainer,children:d.jsx(pj,{style:S8.versionText,children:n?PX:"(819)"})}),"false"===zj.IS_PRODUCTION&&d.jsx(ga,{children:d.jsx(y8,{})})]})}const S8=Ei.create({scrollView:{flex:1,paddingHorizontal:16},scrollViewContentContainer:{paddingVertical:32,flexGrow:1,gap:24},versionContainer:{alignItems:"center",marginTop:"auto"},versionText:{..._L.regular_Base,color:wL.textSecondary}}),k8=["transparentModal","containedTransparentModal"];function C8(e){let{state:t,descriptors:n}=e;const i=M.useContext(WJ);return M.createElement(t1,null,M.createElement(ga,{style:E8.container},t.routes.map((e,r)=>{var a,o;const s=t.index===r,l=null===(a=t.routes[r-1])||void 0===a?void 0:a.key,u=null===(o=t.routes[r+1])||void 0===o?void 0:o.key,c=l?n[l]:void 0,d=u?n[u]:void 0,{options:h,navigation:m,render:p}=n[e.key],f=c?{title:EJ(c.options,c.route.name)}:i,g=void 0!==f,{header:_,headerShown:v,headerTintColor:y,headerBackImageSource:b,headerLeft:w,headerRight:S,headerTitle:k,headerTitleAlign:C,headerTitleStyle:E,headerStyle:x,headerShadowVisible:I,headerTransparent:T,headerBackground:O,headerBackTitle:R,presentation:A,contentStyle:L}=h,P=null==d?void 0:d.options.presentation;return M.createElement(r1,{key:e.key,focused:s,route:e,navigation:m,headerShown:v,headerTransparent:T,header:void 0!==_?_({back:f,options:h,route:e,navigation:m}):M.createElement(DJ,{title:EJ(h,e.name),headerTintColor:y,headerLeft:"function"==typeof w?e=>{let{tintColor:t}=e;return w({tintColor:t,canGoBack:g,label:R})}:void 0===w&&g?e=>{let{tintColor:t}=e;return M.createElement(zJ,{tintColor:t,backImage:void 0!==b?()=>M.createElement(Js,{source:b,style:[E8.backImage,{tintColor:t}]}):void 0,onPress:m.goBack,canGoBack:g})}:w,headerRight:"function"==typeof S?e=>{let{tintColor:t}=e;return S({tintColor:t,canGoBack:g})}:S,headerTitle:"function"==typeof k?e=>{let{children:t,tintColor:n}=e;return k({children:t,tintColor:n})}:k,headerTitleAlign:C,headerTitleStyle:E,headerTransparent:T,headerShadowVisible:I,headerBackground:O,headerStyle:x}),style:[Ei.absoluteFill,{display:s||null!=P&&k8.includes(P)?"flex":"none"},null!=A&&k8.includes(A)?{backgroundColor:"transparent"}:null]},M.createElement(WJ.Provider,{value:f},M.createElement(ga,{style:[E8.contentContainer,L]},p())))})))}const E8=Ei.create({container:{flex:1},contentContainer:{flex:1},backImage:{height:24,width:24,margin:3,resizeMode:"contain"}});function x8(){return x8=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},x8.apply(this,arguments)}const I8=ep(function(e){let{id:t,initialRouteName:n,children:i,screenListeners:r,screenOptions:a,...o}=e;const{state:s,descriptors:l,navigation:u,NavigationContent:c}=uf(Am,{id:t,initialRouteName:n,children:i,screenListeners:r,screenOptions:a});return M.useEffect(()=>{var e;return null==u||null===(e=u.addListener)||void 0===e?void 0:e.call(u,"tabPress",e=>{const t=u.isFocused();requestAnimationFrame(()=>{s.index>0&&t&&!e.defaultPrevented&&u.dispatch({...Rm.popToTop(),target:s.key})})})},[u,s.index,s.key]),M.createElement(c,null,M.createElement(C8,x8({},o,{state:s,navigation:u,descriptors:l})))});function T8(){return D.createElement(ga,{style:O8.separator})}const O8=Ei.create({separator:{backgroundColor:wL.borderInputDivider,height:1}}),R8=AX(FL.CONSTANTS.INSULIN_TO_CARBS_RATIO_MIN,FL.CONSTANTS.INSULIN_TO_CARBS_RATIO_MAX);var A8=(e=>(e.DividendNumber="109",e.ExampleInsulinSensitivity="2.2",e))(A8||{}),L8=(e=>(e.DividendNumber="1960",e.ExampleInsulinSensitivity="39.2",e))(L8||{});const P8=AX(FL.CONSTANTS.INSULIN_SENSITIVITY_MIN,FL.CONSTANTS.INSULIN_SENSITIVITY_MAX),M8=RX(5,197),D8=({onPress:e,isVisible:t})=>{const{t:n}=eV();return D.createElement(sz,{isVisible:t,title:n("insulin_settings_modal_carb_ratio_title"),enableScroll:!0,buttons:[{title:n("button_close"),onPress:e,testID:"close-button"}]},D.createElement(pj,{testID:"insulin_settings_modal_carb_ratio_body",style:N8.p1},n("insulin_settings_modal_carb_ratio_body")),D.createElement(pj,{testID:"insulin_settings_modal_carb_ratio_example",style:N8.p2},n("insulin_settings_modal_carb_example_body")))},N8=Ei.create({p1:{color:wL.textSecondary,marginTop:12,marginBottom:16},p2:{color:wL.textSecondary}}),F8=({glucoseUnit:e,onPress:t,isVisible:n})=>{const{t:i}=eV(),{text:r}=Xq(e),a=e===FL.BloodGlucoseUnit.MMOL_L?A8.DividendNumber:L8.DividendNumber,o=e===FL.BloodGlucoseUnit.MMOL_L?A8.ExampleInsulinSensitivity:L8.ExampleInsulinSensitivity;return D.createElement(sz,{title:i("modal_insulin_seneitivity_title"),isVisible:n,enableScroll:!0,buttons:[{title:i("button_close"),onPress:t,testID:"close-button"}]},D.createElement(pj,{testID:"insulin_sensitivity_modal_body",style:B8.p1},i("insulin_sensitivity_modal_body",{dividerNumber:a})),D.createElement(pj,{testID:"insulin_sensitivity_modal_example",style:B8.p2},i("insulin_sensitivity_modal_example",{dividerNumber:a,displayResult:o,displayUnit:r})))},B8=Ei.create({p1:{color:wL.textSecondary,marginTop:12,marginBottom:16},p2:{color:wL.textSecondary}}),j8=()=>{const{t:e}=eV(),{bloodGlucoseUnits:t}=Y2(),n=Vq.glucoseUnit??t;if(void 0===n)throw new Error("[HelpCalculatingSection::render] glucoseUnit must be defined.");const[i,r]=M.useState(!1),[a,o]=M.useState(!1),s=n===FL.BloodGlucoseUnit.MMOL_L?A8.DividendNumber:L8.DividendNumber;return D.createElement(ga,null,D.createElement(Sj,{title:e("insulin_settings_learn_more_title")}),D.createElement(bj.Container,null,D.createElement(bj,{testID:"info-insulin-carbs-ratio",title:e("insulin_settings_learn_more_carb_ratio"),onPress:()=>{o(!0)},displayType:vj.ListItem}),D.createElement(bj,{testID:`info-insulin-sensitivity-${s}`,title:e("insulin_settings_learn_more_sensitivity"),onPress:()=>{r(!0)},displayType:vj.ListItem})),D.createElement(F8,{onPress:()=>{r(!1)},glucoseUnit:n,isVisible:i}),D.createElement(D8,{onPress:()=>{o(!1)},isVisible:a}))},V8=Ei.create({switchContainer:{borderBottomLeftRadius:0,borderBottomRightRadius:0},firstTableCell:{paddingLeft:16,alignItems:"flex-start",justifyContent:"space-between",borderLeftWidth:0},tableHeaderTitle:{..._L.semiBold_Base,color:wL.text,textAlign:"center"},tableHeaderTitleWithMargin:{marginHorizontal:8},tableTitle:{..._L.regular_Base,color:wL.textInputText},tableSubtitle:{..._L.regular_XS,color:wL.textInputTextSecondary},tableText:{..._L.medium_Base,color:wL.textTableActive}}),H8=rF(()=>{const{t:e}=eV(),{modalStoreActions:t}=z2(),{glucoseUnit:n,treatmentParameters:i}=Vq;if(void 0===n)throw new Error("[DailyInsulinTable::render] glucoseUnit is undefined.");if(void 0===i)throw new Error("[DailyInsulinTable::render] parameters from userSettings must be defined and non-null.");const r=i.use,[a,o]=M.useState(!1),[s,l]=M.useState(!1),[u,c]=M.useState(void 0),[d,h]=M.useState(0),[m,p]=M.useState(!1),[f,g]=M.useState(),_=M.useCallback(async e=>{const t=AQ(e,n,FL.BloodGlucoseUnit.MMOL_L);if(t!==i.parameterIntervals[d].insulinSensitivity){const e={...i,parameterIntervals:i.parameterIntervals.map((e,n)=>n===d?{...e,insulinSensitivity:t}:e)},n=await Vq.setUserSettings({parameters:e});c(n)}o(!1)},[n,i,d]),v=M.useCallback(async e=>{const t=Number(e.toFixed(1));if(t!==i.parameterIntervals[d].carbohydrateRatio){const e={...i,parameterIntervals:i.parameterIntervals.map((e,n)=>n===d?{...e,carbohydrateRatio:t}:e)},n=await Vq.setUserSettings({parameters:e});c(n)}l(!1)},[i,d]),{text:y}=Xq(n),b=M.useMemo(()=>[{title:e("table_variable_insulin_time"),subtitle:e("table_variable_time_unit"),scale:bL},{title:e("table_variable_insulin_sensitivity"),subtitle:e("table_variable_insulin_sensitivity_unit",{displayUnit:y}),scale:vL},{title:e("table_variable_insulin_carb"),subtitle:e("table_variable_insulin_carb_unit"),scale:vL}],[y,e]),w=M.useMemo(()=>n===FL.BloodGlucoseUnit.MG_DL?M8:P8,[n]),S=M.useMemo(()=>{const e=PQ(i.parameterIntervals[d].insulinSensitivity,FL.BloodGlucoseUnit.MMOL_L,n);return w.findIndex(t=>t===e)},[w,n,i.parameterIntervals,d]),k=M.useMemo(()=>{const e=i.parameterIntervals[d].carbohydrateRatio.toFixed(1);return R8.findIndex(t=>t===e)},[i.parameterIntervals,d]),C=M.useCallback(async e=>{const t=i$(e,"HH:mm");if(t!==i.parameterIntervals[d].startTime){const e=[...i.parameterIntervals],n={...e[d]};n.startTime=t,e[d]=n;const r=await Vq.setUserSettings({parameters:{...i,parameterIntervals:e}});c(r)}p(!1)},[i,d]),E=M.useCallback(()=>{p(!1)},[]),x=M.useCallback(async e=>{const n={...i,use:e?FL.Usage.Intervals:FL.Usage.Overall},r=await Vq.setUserSettings({parameters:n});t.set({showSyncErrorModal:!r})},[i,t]),I=M.useCallback(()=>{!1===u&&t.set({showSyncErrorModal:!0}),c(void 0)},[t,u]);return D.createElement(D.Fragment,null,D.createElement(C7,{columnDisposition:[2,3,3]},D.createElement(lz,{testID:"daily-interval-switch",title:e("variable_insulin_settings_title"),message:e("variable_insulin_settings_body"),value:r===FL.Usage.Intervals,onValueChange:x,style:V8.switchContainer}),D.createElement(b7,{disabled:r!==FL.Usage.Intervals},b.map((e,t)=>D.createElement(T7,{key:e.title,style:0===t&&V8.firstTableCell},D.createElement(pj,{maxFontSizeMultiplier:e.scale,style:[V8.tableHeaderTitle,0!==t&&V8.tableHeaderTitleWithMargin]},e.title),D.createElement(pj,{style:V8.tableSubtitle},e.subtitle)))),Object.keys(iV).map((e,t)=>D.createElement(S7,{key:e,disabled:r!==FL.Usage.Intervals},D.createElement(x7,{onPress:()=>{(e=>{const t=i.parameterIntervals[(e-1+i.parameterIntervals.length)%i.parameterIntervals.length].startTime,n=i.parameterIntervals[(e+1+i.parameterIntervals.length)%i.parameterIntervals.length].startTime,r=nX(i.parameterIntervals[e].startTime,"HH:mm",new Date),a=nX(t,"HH:mm",new Date),o=nX(n,"HH:mm",new Date);s$(r,a)&&s$(r,o)?g({current:r,min:hY(nX(t,"HH:mm",sX(new Date,1)),1),max:hX(o)}):o$(r,a)&&o$(r,o)?g({current:r,min:hY(a,1),max:hX(nX(n,"HH:mm",tY(new Date,1)))}):g({current:r,min:hY(a,1),max:hX(o)}),h(e),p(!0)})(t)},style:V8.firstTableCell},D.createElement(pj,{maxFontSizeMultiplier:bL,style:V8.tableTitle},i.parameterIntervals[t].startTime),D.createElement(pj,{style:V8.tableSubtitle},rV[e]())),D.createElement(x7,{testID:`${e.toLowerCase()}-insulin`,onPress:()=>{(e=>{h(e),o(!0)})(t)}},D.createElement(pj,{maxFontSizeMultiplier:bL,style:V8.tableText},PQ(i.parameterIntervals[t].insulinSensitivity,FL.BloodGlucoseUnit.MMOL_L,n))),D.createElement(x7,{testID:`${e.toLowerCase()}-carbs`,onPress:()=>{(e=>{h(e),l(!0)})(t)}},D.createElement(pj,{maxFontSizeMultiplier:bL,style:V8.tableText},i.parameterIntervals[t].carbohydrateRatio.toFixed(1)))))),D.createElement(B7,{isVisible:m,initialValue:f?.current??new Date,min:f?.min,max:f?.max,onConfirm:C,onCancel:E,onModalHide:I}),D.createElement(n3,{isVisible:a,items:w,initialScrollIndex:S,onConfirm:_,onCancel:()=>{o(!1)},onModalHide:I,testID:"insulin_sensitivity_picker"}),D.createElement(n3,{isVisible:s,items:R8,initialScrollIndex:k,onConfirm:v,onCancel:()=>{l(!1)},onModalHide:I,testID:"insulin_to_carb_ratio_picker"}))}),z8={Lantus:()=>Jj("long-acting_insulin_option1"),Basaglar:()=>Jj("long-acting_insulin_option2"),Tuojeo:()=>Jj("long-acting_insulin_option3"),Levemir:()=>Jj("long-acting_insulin_option4"),Tresiba:()=>Jj("long-acting_insulin_option5"),Other:()=>Jj("long-acting_insulin_option6"),None:()=>Jj("long-acting_insulin_option7")},U8=Ei.create({scrollView:{paddingVertical:32,paddingHorizontal:16,flexGrow:1},checkmarkContainer:{width:24,height:24}}),G8=rF(()=>{const{isOnboardingFinished:e}=Xz(),{longActingInsulin:t}=Y2(),{setSetupCalculatorStoreValues:n}=W2(),{modalStoreActions:i}=z2(),r=cf(),a=e?Vq.longActingInsulin:t,o=M.useCallback(async e=>{if(e!==a)if(r.params.comingFrom===E2.Setup)n({longActingInsulin:FL.LongActingInsulin[e]});else{await Vq.setUserSettings({longActingInsulin:FL.LongActingInsulin[e]})||i.set({showSyncErrorModal:!0})}},[r.params.comingFrom,a,n,i]);return D.createElement(Xa,{testID:"scroll",contentContainerStyle:U8.scrollView},D.createElement(bj.Container,null,Object.keys(FL.LongActingInsulin).map(e=>D.createElement(bj,{key:e,title:z8[e](),renderRightSlot:()=>D.createElement(ga,{style:U8.checkmarkContainer},FL.LongActingInsulin[e]===a?D.createElement($K,{color:wL.iconCheckmark}):null),onPress:()=>o(e),displayType:vj.ListItem,testID:`treatment-${e.match(/[A-Z][a-z]+/g)?.join("-").toLowerCase()}`}))),D.createElement(U0,null))}),W8={Novorapid:()=>Jj("rapid-acting_insulin_option1"),Fiasp:()=>Jj("rapid-acting_insulin_option2"),Humalog:()=>Jj("rapid-acting_insulin_option3"),Apidra:()=>Jj("rapid-acting_insulin_option4"),Other:()=>Jj("rapid-acting_insulin_option5"),None:()=>Jj("rapid-acting_insulin_option6")},Y8=Ei.create({scrollView:{paddingVertical:32,paddingHorizontal:16,flexGrow:1},checkmarkContainer:{width:24,height:24}}),$8=rF(()=>{const{isOnboardingFinished:e}=Xz(),{fastActingInsulin:t}=Y2(),{setSetupCalculatorStoreValues:n}=W2(),{modalStoreActions:i}=z2(),r=cf(),a=e?Vq.fastActingInsulin:t,o=M.useCallback(async e=>{if(e!==a)if(r.params.comingFrom===E2.Setup)n({fastActingInsulin:FL.FastActingInsulin[e]});else{await Vq.setUserSettings({fastActingInsulin:FL.FastActingInsulin[e]})||i.set({showSyncErrorModal:!0})}},[r.params.comingFrom,a,n,i]);return D.createElement(Xa,{testID:"scroll",contentContainerStyle:Y8.scrollView},D.createElement(bj.Container,null,Object.keys(FL.FastActingInsulin).map(e=>D.createElement(bj,{key:e,title:W8[e](),renderRightSlot:()=>D.createElement(ga,{style:Y8.checkmarkContainer},FL.FastActingInsulin[e]===a?D.createElement($K,{color:wL.iconCheckmark}):null),onPress:()=>o(e),displayType:vj.ListItem,testID:`treatment-${e.match(/[A-Z][a-z]+/g)?.join("-").toLowerCase()}`}))),D.createElement(U0,null))}),X8={PenHalf:()=>Jj("treatment_type_option1"),PenWhole:()=>Jj("treatment_type_option2"),Pump:()=>Jj("treatment_type_option3")},q8=Ei.create({scrollView:{paddingVertical:32,paddingHorizontal:16,flexGrow:1},checkmarkContainer:{width:24,height:24}}),Z8=rF(()=>{const{isOnboardingFinished:e}=Xz(),{setSetupCalculatorStoreValues:t}=W2(),{treatmentType:n}=Y2(),{modalStoreActions:i}=z2(),r=cf(),a=e?Vq.injectionMethod:n,o=M.useCallback(async e=>{if(e!==a)if(r.params.comingFrom===E2.Setup)t({treatmentType:FL.InjectionMethod[e]});else{await Vq.setUserSettings({treatmentType:FL.InjectionMethod[e]})||i.set({showSyncErrorModal:!0})}},[r.params.comingFrom,a,t,i]);return D.createElement(Xa,{testID:"scroll",contentContainerStyle:q8.scrollView},D.createElement(bj.Container,null,Object.keys(FL.InjectionMethod).map(e=>D.createElement(bj,{key:e,title:X8[e](),renderRightSlot:()=>D.createElement(ga,{style:q8.checkmarkContainer},FL.InjectionMethod[e]===a?D.createElement($K,{color:wL.iconCheckmark}):null),onPress:()=>o(e),testID:`treatment-${e.match(/[A-Z][a-z]+/g)?.join("-").toLowerCase()}`,displayType:vj.ListItem}))),D.createElement(U0,null))});const K8=rF(function(){const{t:e}=eV(),t=Gp(),{injectionMethod:n,fastActingInsulin:i,longActingInsulin:r}=Vq;if(void 0===n)throw new Error("[TreatmentSection::render] injectionMethod must be defined and non-null.");const a=M.useMemo(()=>{const e=OX(FL.InjectionMethod,n);return X8[e]()},[n]),o=M.useMemo(()=>i?W8[i]():"-",[i]),s=M.useMemo(()=>r?z8[r]():"-",[r]);return D.createElement(ga,null,D.createElement(bj.Container,null,D.createElement(bj,{title:e("my_profile_treatment_type"),value:a,testID:"treatment-type",onPress:()=>{t.navigate(C2.TreatmentType,{comingFrom:C2.Profile})},renderRightSlot:()=>D.createElement(QK,null)}),D.createElement(bj,{title:e("my_profile_rapid-acting_insulin"),value:o,testID:"fast-acting-insulin",onPress:()=>{t.navigate(C2.RapidActingInsulin,{comingFrom:C2.Profile})},renderRightSlot:()=>D.createElement(QK,null)}),D.createElement(bj,{title:e("my_profile_long-acting_insulin"),value:s,testID:"long-acting-insulin",onPress:()=>{t.navigate(C2.LongActingInsulin,{comingFrom:C2.Profile})},renderRightSlot:()=>D.createElement(QK,null)})))}),{MMOL_L:Q8}=FL.BloodGlucoseUnit,J8=Ei.create({scrollView:{paddingVertical:32,paddingHorizontal:16,flexGrow:1},spacing:{height:32},active:{opacity:1},inactive:{opacity:.5},value:{color:wL.textBrand},valueInactive:{color:wL.textInputTextSecondary},switchContainer:{borderBottomLeftRadius:0,borderBottomRightRadius:0}}),eee=rF(()=>{const{t:e}=eV(),{modalStoreActions:t}=z2(),{glucoseUnit:n,treatmentParameters:i}=Vq;if(void 0===n)throw new Error("[InsulinSettings::render] glucoseUnit is undefined.");if(void 0===i)throw new Error("[InsulinSettings::render] parameters from userSettings must be defined and non-null.");const r=i.use===FL.Usage.Overall,{text:a}=Xq(n),{carbohydrateRatio:o,insulinSensitivity:s}=i.overallParameters,[l,u]=M.useState(!1),[c,d]=M.useState(!1),[h,m]=M.useState(void 0),p=M.useMemo(()=>n===Q8?P8:M8,[n]),f=M.useCallback(async e=>{const t=AQ(e,n,Q8);if(t!==i.overallParameters.insulinSensitivity){const e={...i,overallParameters:{...i.overallParameters,insulinSensitivity:t}},n=await Vq.setUserSettings({parameters:e});m(n)}u(!1)},[n,i]),g=M.useCallback(async e=>{const t=Number(e.toFixed(1));if(t!==i.overallParameters.carbohydrateRatio){const e={...i,overallParameters:{...i.overallParameters,carbohydrateRatio:t}},n=await Vq.setUserSettings({parameters:e});m(n)}d(!1)},[i]),_=M.useMemo(()=>{const e=PQ(s,Q8,n);return p.findIndex(t=>t===e)},[p,n,s]),v=M.useMemo(()=>R8.findIndex(e=>e===o.toFixed(1)),[o]),y=M.useCallback(()=>{!1===h&&t.set({showSyncErrorModal:!0}),m(void 0)},[t,h]),b=M.useCallback(async e=>{const n={...i,use:e?FL.Usage.Overall:FL.Usage.Intervals},r=await Vq.setUserSettings({parameters:n});t.set({showSyncErrorModal:!r})},[i,t]);return D.createElement(D.Fragment,null,D.createElement(Xa,{testID:"scroll",contentContainerStyle:J8.scrollView},D.createElement(K8,null),D.createElement(ga,{style:J8.spacing}),D.createElement(v7,null),D.createElement(ga,{style:J8.spacing}),D.createElement(bj.Container,null,D.createElement(lz,{testID:"insulin-settings-overall-switch",title:e("fixed_insulin_settings_title"),message:e("fixed_insulin_settings_body"),value:r,onValueChange:b,style:J8.switchContainer}),D.createElement(T8,null),D.createElement(bj,{title:e("fixed_insulin_settings_carb_ratio_title"),value:`${o.toFixed(1)} ${e("fixed_insulin_settings_carb_ratio_unit")}`,testID:"carbohydrate-ratio",onPress:r?()=>{d(!0)}:void 0,containerStyle:r?J8.active:J8.inactive,valueStyle:r?J8.value:J8.valueInactive}),D.createElement(bj,{title:e("fixed_insulin_settings_sensitivity_title"),value:`${PQ(s,Q8,n)} ${e("fixed_insulin_settings_sensitivity_unit",{displayUnit:a})}`,testID:"insulin-sensitivity",onPress:r?()=>{u(!0)}:void 0,containerStyle:r?J8.active:J8.inactive,valueStyle:r?J8.value:J8.valueInactive})),D.createElement(ga,{style:J8.spacing}),D.createElement(H8,null),D.createElement(ga,{style:J8.spacing}),D.createElement(j8,null)),D.createElement(n3,{isVisible:l,items:p,initialScrollIndex:_,onConfirm:f,onCancel:()=>{u(!1)},onModalHide:y,testID:"insulin_sensitivity_picker"}),D.createElement(n3,{isVisible:c,items:R8,initialScrollIndex:v,onConfirm:g,onCancel:()=>{d(!1)},onModalHide:y,testID:"insulin_to_carb_ratio_picker"}),D.createElement(U0,{onModalHide:()=>{m(void 0)}}))}),tee=()=>{const{t:e}=eV(),{Navigator:t,Screen:n}=I8();return d.jsxs(t,{screenOptions:r0,children:[d.jsx(n,{name:C2.InsulinSettings,component:eee,options:{title:e("insulin_settings_navigation")}}),d.jsx(n,{name:C2.TreatmentType,component:Z8,options:{title:e("treatment_type_navigation")}}),d.jsx(n,{name:C2.RapidActingInsulin,component:$8,options:{title:e("rapid-acting_insulin_navigation")}}),d.jsx(n,{name:C2.LongActingInsulin,component:G8,options:{title:e("long-acting_insulin_navigation")}})]})},nee=()=>{const{t:e}=eV(),{Navigator:t,Screen:n}=k2();return d.jsxs(t,{screenOptions:{...a0,...dJ},children:[d.jsx(n,{name:C2.Settings,component:w8,options:{title:e("settings_navigation"),headerShown:!0,headerLeft:K2}}),d.jsx(n,{name:C2.ProfileStack,component:_8,options:{headerShown:!1}}),d.jsx(n,{name:C2.GlucoseSettings,component:W7,options:{title:e("glucose_navigation")}}),d.jsx(n,{name:C2.GlucoseUnit,component:K7,options:{title:e("glucose_unit_navigation")}}),d.jsx(n,{name:C2.ActivitySettings,component:D7,options:{title:e("physical_activity_navigation")}}),d.jsx(n,{name:C2.InsulinSettingsStack,component:tee,options:{headerShown:!1}}),d.jsx(n,{name:C2.Support,component:e8,options:{title:e("support_navigation")}}),d.jsx(n,{name:C2.Legal,component:Q7,options:{title:e("legal_navigation")}})]})};function iee(){return d.jsx(y3,{style:ree.iframe,uri:"https://www.hedia.com/contact#contactsupport"})}const ree=Ei.create({iframe:{flex:1}}),{Navigator:aee,Screen:oee,Group:see}=k2(),lee=()=>{const{t:e}=eV(),t=M.useCallback(()=>d.jsx(K2,{}),[]),n=M.useCallback(()=>d.jsx(e0,{}),[]);return d.jsxs(aee,{children:[d.jsxs(see,{screenOptions:{headerShown:!1,animationEnabled:!0},children:[d.jsx(oee,{name:C2.NewCalculationStack,component:c7}),d.jsx(oee,{name:C2.SettingsTab,component:nee})]}),d.jsxs(see,{screenOptions:o0,children:[d.jsx(oee,{name:C2.AddActivity,component:W0,options:{title:e("new_activity_navigation"),headerLeft:n}}),d.jsx(oee,{name:C2.FoodLibrary,component:_3,options:{title:e("food_library_sheet_navigation"),headerLeft:t}}),d.jsx(oee,{name:C2.AddCarbs,component:m0,options:{title:""}}),d.jsx(oee,{name:C2.CreateFood,component:c3,options:{title:"",gestureEnabled:!1}}),d.jsx(oee,{name:C2.IFU,component:w3,options:{title:e("IFU_navigation"),headerLeft:t}}),d.jsx(oee,{name:C2.SupportWebView,component:P3,options:{title:e("support_navigation"),headerLeft:t}}),d.jsx(oee,{name:C2.SupportContact,component:iee,options:{title:e("support_navigation"),headerLeft:t}})]})]})},uee=({title:e,subtitle:t,stepChecked:n,onAnimationFinished:i})=>{const{t:r}=eV();return M.useEffect(()=>{i?.()},[i]),D.createElement(Xa,{contentContainerStyle:cee.container},D.createElement(pj,{style:cee.title},e),D.createElement(pj,{style:cee.subtitle},t),D.createElement(ga,{style:cee.stepsWrapper},D.createElement(ga,{style:cee.stepContainer},D.createElement(pj,{style:1===n||2===n||3===n?cee.textActive:cee.textInactive}," 1. "+r("overview1")),(1===n||2===n||3===n)&&D.createElement($K,null)),D.createElement(ga,{style:cee.stepContainer},D.createElement(pj,{style:2===n||3===n?cee.textActive:cee.textInactive},"2. "+r("overview2")),(2===n||3===n)&&D.createElement($K,null)),D.createElement(ga,{style:cee.stepContainer},D.createElement(pj,{style:3===n?cee.textActive:cee.textInactive},"3. "+r("overview3")),3===n&&D.createElement($K,null))))},cee=Ei.create({container:{flex:1,justifyContent:"center",paddingHorizontal:16},title:{..._L.bold_3XL,paddingHorizontal:16,marginBottom:4},subtitle:{..._L.medium_SM,color:wL.textSecondary,paddingHorizontal:16,marginBottom:16},stepsWrapper:{padding:16,gap:8},stepContainer:{flexDirection:"row",alignItems:"center",gap:8},textActive:{color:wL.text},textInactive:{color:wL.textSecondary}}),dee=()=>{const{t:e}=eV(),{setIsOnboardingFinished:t}=Xz(),n=M.useCallback(()=>{setTimeout(()=>{t(!0)},1e3)},[t]);return D.createElement(uee,{title:e("guide_end_title"),subtitle:e("guide_end_body"),stepChecked:3,onAnimationFinished:n})},hee=({currentStep:e,text:t,onPress:n,inactive:i,isBackVisible:r=!0,onBackPress:a,shouldRenderRightIcon:o=!0})=>{const{t:s}=eV(),{goBack:l}=Gp();return M.createElement(yH,{style:mee.container,edges:["bottom"]},M.createElement(ga,{style:mee.buttonsWrapper},r&&M.createElement(cj,{title:s("button_back"),onPress:a||l,testID:`back${e}`,style:mee.button,leftIcon:M.createElement(ZK,null),type:lj.Secondary}),M.createElement(cj,{title:t??s("button_next"),onPress:n,inactive:i,testID:`next${e}`,style:mee.button,rightIcon:o?M.createElement(QK,{color:i?wL.textSecondary:wL.text}):void 0})))},mee=Ei.create({container:{backgroundColor:wL.bgProgressBar,borderTopColor:wL.borderOnProgressBarSecondary,borderTopWidth:1},buttonsWrapper:{flexDirection:"row",paddingHorizontal:16,paddingBottom:16,gap:8},button:{flex:1,marginTop:12}}),pee=()=>{const{t:e}=eV(),{navigate:t}=Gp(),n=M.useCallback(()=>{t(E2.QuickGuideStack,{screen:E2.QuickGuide}),NX(MX.QuickGuideStartPress)},[t]);return D.createElement(D.Fragment,null,D.createElement(uee,{title:e("guide_quick_guide_title"),subtitle:e("guide_quick_guide_body"),stepChecked:2}),D.createElement(hee,{currentStep:1,isBackVisible:!1,onPress:n,text:e("button_start"),shouldRenderRightIcon:!1}))},fee=()=>{const{t:e}=eV(),t=Gp(),n=M.useRef(null),[i,r]=M.useState(2),[a,o]=M.useState(0),{height:s,width:l}=vm(),u=M.useMemo(()=>[{title:e("guide_recent_insulin_title"),subtitle:e("guide_recent_insulin_body"),image:"/assets/webp/1_EN.webp"},{title:e("web_guide_no_import_title"),subtitle:e("web_guide_no_import_body"),image:"/assets/webp/2_EN.webp"},{title:e("guide_glucose_title"),subtitle:e("guide_glucose_body"),image:"/assets/webp/3_EN.webp"},{title:e("guide_carbohydrates_title"),subtitle:e("guide_carbohydrates_body"),image:"/assets/webp/4_EN.webp"},{title:e("guide_activity_title"),subtitle:e("guide_activity_body"),image:"/assets/webp/5_EN.webp"},{title:e("guide_summary_title"),subtitle:e("onboarding_quick_guide_text"),image:"/assets/webp/6_EN.webp"},{title:e("guide_recommendation_title"),subtitle:e("guide_recommendation_body"),image:"/assets/webp/7_EN.webp"}],[e]),c=M.useCallback(e=>{switch(e-1){case 1:return MX.QuickGuideBackPressStep1;case 2:return MX.QuickGuideBackPressStep2;case 3:return MX.QuickGuideBackPressStep3;case 4:return MX.QuickGuideBackPressStep4;case 5:return MX.QuickGuideBackPressStep5;case 6:return MX.QuickGuideBackPressStep6;case 7:return MX.QuickGuideBackPressStep7;default:throw new Error("[QuickGuide::getTrackingEventBackPress] Invalid step")}},[]),h=M.useCallback(e=>{switch(e-1){case 1:return MX.QuickGuideNextPressStep1;case 2:return MX.QuickGuideNextPressStep2;case 3:return MX.QuickGuideNextPressStep3;case 4:return MX.QuickGuideNextPressStep4;case 5:return MX.QuickGuideNextPressStep5;case 6:return MX.QuickGuideNextPressStep6;default:throw new Error("[QuickGuide::getTrackingEventNextPress] Invalid step")}},[]),m=M.useCallback(()=>{if(a===u.length-1)NX(MX.QuickGuideFinishPress),t.navigate(E2.QuickGuideAllSet);else{const e=a+1;n.current?.scrollToIndex({index:e,animated:!0}),r(i+1),o(e);const t=h(i);NX(t)}},[a,i,h,t,u.length]),p=M.useCallback(()=>{if(0===a)t.navigate(E2.QuickGuideStart);else{const e=a-1;n.current?.scrollToIndex({index:e,animated:!0}),r(i-1),o(e)}const e=c(i);NX(e)},[a,i,c,t]);return d.jsxs(d.Fragment,{children:[d.jsx(Wo,{ref:n,data:u,initialNumToRender:1,renderItem:({item:e,index:t})=>1===t?(e=>d.jsxs(ga,{style:[gee.container,{width:l}],children:[d.jsx(nj,{colors:wL.gradientQuickGuide,style:gee.gradient}),d.jsx(ga,{style:{flex:1,justifyContent:"flex-end"},children:d.jsx(Js,{source:e.image,style:{height:QR(s/5,140,180),width:QR(s/5,140,180),zIndex:10},resizeMode:"stretch"})}),d.jsxs(ga,{style:[gee.textContainer,{flex:1,justifyContent:"center"}],children:[d.jsx(pj,{style:gee.title,maxFontSizeMultiplier:bL,children:e.title}),d.jsx(pj,{style:gee.subtitle,maxFontSizeMultiplier:bL,children:e.subtitle})]})]}))(e):d.jsxs(ga,{style:[gee.container,{width:l}],children:[d.jsx(Js,{source:e.image,style:gee.image,resizeMode:"contain"}),d.jsx(nj,{colors:wL.gradientQuickGuide,locations:[.45,.64],style:gee.gradient}),d.jsxs(ga,{style:gee.textContainer,children:[d.jsx(pj,{style:gee.title,maxFontSizeMultiplier:bL,children:e.title}),d.jsx(pj,{style:gee.subtitle,maxFontSizeMultiplier:bL,children:e.subtitle})]})]}),scrollEnabled:!1,horizontal:!0,showsHorizontalScrollIndicator:!1}),d.jsx(hee,{currentStep:i,onPress:m,onBackPress:p,text:a===u.length-1?e("button_complete"):e("button_next"),shouldRenderRightIcon:a!==u.length-1})]})},gee=Ei.create({container:{flex:1,alignItems:"center"},image:{position:"absolute",width:"100%",height:"100%",marginTop:32,marginBottom:14},textContainer:{marginTop:"auto",minHeight:Ws.getFontScale()>vL?165:155,backgroundColor:wL.bgTransparent},title:{..._L.bold_2XL,marginBottom:4,paddingHorizontal:16,textAlign:"center"},subtitle:{..._L.medium_SM,color:wL.textSecondary,paddingHorizontal:Ws.getFontScale()>vL?16:32,textAlign:"center"},gradient:{position:"absolute",top:"16%",bottom:0,left:0,right:0}}),_ee=()=>{const{Navigator:e,Screen:t}=I8();return d.jsxs(e,{screenOptions:{...r0,headerShown:!1},children:[d.jsx(t,{name:E2.QuickGuideStart,component:pee}),d.jsx(t,{name:E2.QuickGuide,component:fee}),d.jsx(t,{name:E2.QuickGuideAllSet,component:dee})]})};function vee({onOptionSelect:e,setNextEnabled:t,ref:n}){const{t:i}=eV(),{width:r}=vm(),[a,o]=M.useState(null),s=M.useCallback(n=>{o(n),e(n),t(!0)},[e,t]);return M.useImperativeHandle(n,()=>({onBackPress(){NX(MX.SetupOptionsBackPress)},onNextPressed:()=>null!==a?(NX(MX.SetupOptionsNextPress),t(!0),{transitionAllowed:!0}):(t(!1),{transitionAllowed:!1}),validateData:()=>({isValid:null!==a})}),[a,t]),D.createElement(Xa,{contentContainerStyle:[yee.container,{width:r}]},D.createElement(pj,{style:yee.header},i("insulin_settings_title")),D.createElement(ga,{style:yee.buttonsContainer},D.createElement(cj,{title:i("insulin_settings_button_yes"),testID:"insulin_settings_yes",onPress:()=>{s("yes")},type:"yes"===a?lj.Primary:lj.Secondary,style:yee.button}),D.createElement(cj,{title:i("insulin_settings_button_no"),testID:"insulin_settings_no",onPress:()=>{s("no")},type:"no"===a?lj.Primary:lj.Secondary,style:yee.button})))}const yee=Ei.create({container:{flex:1,paddingHorizontal:16,paddingTop:32},header:{..._L.semiBold_2XL,color:wL.text,paddingHorizontal:16,marginBottom:24},buttonsContainer:{flexDirection:"row",marginBottom:24,gap:12},button:{flex:1}});function bee({setNextEnabled:e,ref:t}){const{t:n}=eV(),{width:i}=vm(),{bottom:r}=hH(),{birthday:a,biologicalSex:o,diabetesType:s,bloodGlucoseUnits:l}=Y2(),{setSetupCalculatorStoreValues:u}=W2(),c=Gp(),[d,h]=M.useState(!1),[m,p]=M.useState(!1),[f,g]=M.useState(""),[_,v]=M.useState(!1),y=M.useCallback(e=>{s$(e,mX(new Date))?(u({birthday:e.toISOString()}),g("")):(u({birthday:void 0}),g(n("birthday_error")))},[u,n]),b=M.useCallback(e=>{y(e),h(!1)},[y]),w=M.useCallback(()=>{u({diabetesType:FL.DiabetesType.Type2}),p(!0)},[u]),S=M.useCallback(()=>!!(a&&o&&s&&l),[a,l,s,o]);return M.useEffect(()=>{const t=S();e(t)},[e,S]),M.useImperativeHandle(t,()=>({onBackPress(){NX(MX.SetupGeneralBackPress)},onNextPressed:()=>{v(!0),!a&&g(n("birthday_error"));return S()?(e(!0),NX(MX.SetupGeneralNextPress),{transitionAllowed:!0}):(e(!1),{transitionAllowed:!1})},validateData:()=>({isValid:S()})}),[a,n,S,e]),D.createElement(D.Fragment,null,D.createElement(Xa,{testID:"step_2",contentContainerStyle:[wee.container,{width:i}]},D.createElement(Sj,{title:n("general_birthday_title")}),D.createElement(KB,{isAnimated:!!f},D.createElement(bj,{testID:"birthday",renderLeftSlot:()=>D.createElement(WK,null),title:n("general_input_birthday"),subtitle:a?new Date(a).toLocaleDateString():"",errorMessage:f,containerStyle:wee.wrapper,onPress:()=>{h(!0)}})),D.createElement(ga,{style:wee.wrapper},D.createElement(Sj,{title:n("biological_sex_title")}),D.createElement(KB,{isAnimated:_&&!o,errorMessage:n("diabetes_error")},D.createElement(bj,{title:n("my_profile_sex"),testID:"biological-sex",value:o?aV[o]():"-",onPress:()=>{c.navigate(E2.BiologicalSex)},renderRightSlot:()=>D.createElement(QK,null),errorMessage:_&&!o?n("diabetes_error"):void 0}))),D.createElement(ga,{style:wee.wrapper},D.createElement(Sj,{title:n("type_of_diabetes_title")}),D.createElement(KB,{isAnimated:_&&!s,errorMessage:n("diabetes_error")},D.createElement(ga,{style:wee.row},D.createElement(Cj,{title:n("type_of_diabetes_type1"),isActive:s===FL.DiabetesType.Type1,testID:"type-1",onPress:()=>{u({diabetesType:FL.DiabetesType.Type1})},isError:_&&!s}),D.createElement(Cj,{title:n("type_of_diabetes_type2"),isActive:s===FL.DiabetesType.Type2,testID:"type-2",onPress:w,isError:_&&!s})))),D.createElement(ga,{style:wee.wrapper},D.createElement(Sj,{title:n("glucose_unit_title")}),D.createElement(KB,{isAnimated:_&&!l,errorMessage:n("glucose_unit_error")},D.createElement($7,{glucoseUnit:l,onPressMMOLL:()=>{u({bloodGlucoseUnits:FL.BloodGlucoseUnit.MMOL_L})},onPressMGDL:()=>{u({bloodGlucoseUnits:FL.BloodGlucoseUnit.MG_DL})},isError:_&&!l})))),lV?D.createElement(S5,{testID:"birthday-date-picker",display:"spinner",date:a?new Date(a):new Date,isVisible:d,onConfirm:b,onCancel:()=>{h(!1)},cancelTextIOS:n("button_cancel"),confirmTextIOS:n("button_confirm"),pickerStyleIOS:wee.alignCenter,modalStyleIOS:{paddingBottom:r}}):D.createElement(c8,{isVisible:d,initialValue:a?new Date(a):new Date,onConfirm:b,onCancel:()=>{h(!1)}}),D.createElement(sz,{isVisible:m,textAlign:"left",title:n("modal_diabetes2_title"),message:n("modal_diabetes2_body"),buttons:[{title:n("button_close"),testID:"type2-modal-understood-button",onPress:()=>{p(!1)}}]}))}const wee=Ei.create({container:{paddingTop:32,paddingHorizontal:16},wrapper:{marginBottom:24},row:{flexDirection:"row",gap:12},alignCenter:{alignSelf:"center"}});function See({setNextEnabled:e,ref:t}){const{t:n}=eV(),{width:i}=vm(),{parameters:r,treatmentType:a,fastActingInsulin:o,longActingInsulin:s}=Y2(),{setSetupCalculatorStoreValues:l}=W2(),{navigate:u}=Gp(),[c,d]=M.useState(!1);M.useEffect(()=>{r||l({parameters:jq(0,0,FL.Usage.Overall)})},[r,l]),M.useEffect(()=>{e(!!a)},[e,a]),M.useImperativeHandle(t,()=>({onBackPress(){NX(MX.SetupTreatmentBackPress)},onNextPressed:()=>(d(!0),a?(e(!0),NX(MX.SetupTreatmentNextPress),{transitionAllowed:!0}):(e(!1),{transitionAllowed:!1})),validateData:()=>({isValid:!!a})}),[e,a]);const h=a?OX(FL.InjectionMethod,a):void 0,m=(h&&X8[h]())??"-",p=(o&&W8[o]())??"-",f=(s&&z8[s]())??"-";return D.createElement(ga,{testID:"step_3",style:[kee.container,{width:i}]},D.createElement(KB,{isAnimated:c&&!a},D.createElement(bj,{title:n("treatment_type_input"),value:m,testID:"treatment-type",renderRightSlot:()=>D.createElement(QK,null),onPress:()=>{u(E2.TreatmentType,{comingFrom:E2.Setup})},errorMessage:c&&!a?n("treatment_type_input_error"):void 0})),D.createElement(ga,null,D.createElement(Sj,{title:n("treatment_type_insulin_title")}),D.createElement(bj.Container,null,D.createElement(bj,{title:n("Rapid-acting_insulin_input"),value:p,testID:"fast-acting",renderRightSlot:()=>D.createElement(QK,null),displayType:vj.ListItem,onPress:()=>{u(E2.RapidActingInsulin,{comingFrom:E2.Setup})}}),D.createElement(bj,{title:n("long-acting_insulin_input"),value:f,testID:"long-acting",renderRightSlot:()=>D.createElement(QK,null),displayType:vj.ListItem,onPress:()=>{u(E2.LongActingInsulin,{comingFrom:E2.Setup})}}))))}const kee=Ei.create({container:{paddingHorizontal:16,paddingVertical:32,gap:24}}),Cee=RX(10,350);function Eee({setNextEnabled:e,ref:t}){const{t:n}=eV(),{width:i}=vm(),{bloodGlucoseUnits:r,parameters:a}=Y2();if(!r||!a)throw new Error("[Step4::render] are not defined");const o=$2(),{setSetupCalculatorStoreValues:s,setTotalDailyDosage:l}=W2(),[u,c]=M.useState(!1),[d,h]=M.useState(void 0),m=M.useMemo(()=>{if(!o)return{carbohydrateRatio:0,insulinSensitivityMMOLL:0};return{carbohydrateRatio:parseFloat((500/o).toFixed(1)),insulinSensitivityMMOLL:Number(A8.DividendNumber)/o}},[o]);M.useEffect(()=>{const{carbohydrateRatio:e,insulinSensitivityMMOLL:t}=m,n=jq(t,e,FL.Usage.Overall);s({parameters:n})},[r,m,s]);const p=M.useMemo(()=>o?Cee.findIndex(e=>e===o.toString()):Cee.findIndex(e=>e===50..toString()),[o]);M.useImperativeHandle(t,()=>({onBackPress(){NX(MX.SetupTDDBackPress)},onNextPressed:()=>o?(NX(MX.SetupTDDNextPress),e(!0),{transitionAllowed:!0}):(h(n("insulin_settings_input_error",{inputTypeTranslated:n("daily_insulin_dosage_input")})),e(!1),{transitionAllowed:!1}),validateData:()=>({isValid:!!o})}),[e,o,n]);const f=M.useCallback(t=>{l(t),c(!1),h(void 0),e(!0)},[e,l]),{text:g}=M.useMemo(()=>Xq(r),[r]),_=M.useMemo(()=>`${PQ(a.overallParameters.insulinSensitivity,FL.BloodGlucoseUnit.MMOL_L,r)} ${n("fixed_insulin_settings_sensitivity_unit",{displayUnit:g})}`,[a,g,n,r]),v=M.useMemo(()=>a.overallParameters.carbohydrateRatio+" "+n("insulin_helper_carb_ratio_unit"),[a,n]);return D.createElement(D.Fragment,null,D.createElement(Xa,{contentContainerStyle:[xee.container,{width:i}]},D.createElement(ga,null,D.createElement(Sj,{title:n("daily_insulin_dosage_title")}),D.createElement(pj,{style:xee.subheader},n("daily_insulin_dosage_body")),D.createElement(KB,{isAnimated:!!d},D.createElement(bj,{testID:"daily_insulin_dosage",title:n("daily_insulin_dosage_input"),value:`${o??"-"} ${n(1===o?"unit":"units")}`,onPress:()=>{c(!0)},errorMessage:d}))),!!o&&D.createElement(ga,{style:xee.explanation},D.createElement(pj,{style:xee.text},n("insulin_helper_body")),D.createElement(ga,{style:xee.row},D.createElement(pj,{style:xee.textSemiBold},n("insulin_helper_carb_ratio_input")),D.createElement(pj,{style:xee.textSemiBold},v)),D.createElement(ga,{style:xee.row},D.createElement(pj,{style:xee.textSemiBold},n("insulin_helper_insulin_sensitivity_input")),D.createElement(pj,{style:xee.textSemiBold},_))),D.createElement(v7,null),D.createElement(ga,null,D.createElement(j8,null))),D.createElement(n3,{testID:"daily_insulin_dosage_picker",onCancel:()=>{c(!1)},onConfirm:f,initialScrollIndex:p,isVisible:u,items:Cee}))}const xee=Ei.create({container:{paddingVertical:32,paddingHorizontal:16,gap:24},subheader:{..._L.regular_SM,color:wL.textSecondary,marginHorizontal:16,marginBottom:8},explanation:{backgroundColor:wL.bgInput,borderRadius:8,padding:16},row:{flexDirection:"row",justifyContent:"space-between"},text:{..._L.regular_SM,color:wL.textSecondary,marginBottom:16},textSemiBold:{..._L.medium_SM,color:wL.textSecondary,paddingVertical:16}});function Iee({setNextEnabled:e,ref:t}){const{t:n}=eV(),{width:i}=vm(),{bloodGlucoseUnits:r,parameters:a}=Y2();if(!a||!r)throw new Error("[Step5::render] setupCalculatorStoreValues are not defined");const{setSetupCalculatorStoreValues:o,setTotalDailyDosage:s}=W2(),[l,u]=M.useState(void 0),[c,d]=M.useState(void 0),[h,m]=M.useState(!1),[p,f]=M.useState(!1),{text:g}=M.useMemo(()=>Xq(r),[r]),{carbohydrateRatio:_,insulinSensitivity:v}=M.useMemo(()=>a.overallParameters,[a]),y=M.useCallback(e=>{const t=n("IS"===e?"insulin_sensitivity_input":"insulin-to-carb_ratio_input");return n("insulin_settings_input_error",{inputTypeTranslated:t})},[n]);M.useEffect(()=>{e(!(!v||!_))},[_,v,e]),M.useImperativeHandle(t,()=>({onBackPress(){NX(MX.SetupInsulinBackPress)},onNextPressed:()=>_||v?_?v?(d(void 0),u(void 0),s(null),e(!0),NX(MX.SetupInsulinNextPress),{transitionAllowed:!0}):(e(!1),u(y("IS")),{transitionAllowed:!1}):(d(y("ICR")),e(!1),{transitionAllowed:!1}):(d(y("ICR")),u(y("IS")),e(!1),{transitionAllowed:!1}),validateData:()=>({isValid:!(!_||!v)})}),[_,v,s,e,y]);const b=M.useCallback(e=>{const t=AQ(e,r,FL.BloodGlucoseUnit.MMOL_L);o({parameters:{...a,overallParameters:{...a.overallParameters,insulinSensitivity:t}}}),s(null),u(void 0),m(!1)},[r,a,o,s]),w=M.useCallback(e=>{const t=Number(e.toFixed(1));a.overallParameters.carbohydrateRatio=t,o({parameters:{...a,overallParameters:{...a.overallParameters,carbohydrateRatio:t}}}),s(null),d(void 0),f(!1)},[a,o,s]),S=M.useMemo(()=>r===FL.BloodGlucoseUnit.MMOL_L?P8:M8,[r]),k=M.useMemo(()=>{const e=r===FL.BloodGlucoseUnit.MMOL_L?2..toFixed(1):36..toString();if(0===v)return S.findIndex(t=>t===e);const t=PQ(v,FL.BloodGlucoseUnit.MMOL_L,r);return S.findIndex(e=>e===t)},[S,r,v]),C=M.useMemo(()=>0===_?R8.findIndex(e=>e===10..toFixed(1)):R8.findIndex(e=>e===_.toFixed(1)),[_]),E=M.useMemo(()=>{const e=PQ(v,FL.BloodGlucoseUnit.MMOL_L,r);return`${v?e:"-"} ${n("fixed_insulin_settings_sensitivity_unit",{displayUnit:g})}`},[v,r,g,n]);return D.createElement(D.Fragment,null,D.createElement(Xa,{contentContainerStyle:[Tee.contentContainer,{width:i}]},D.createElement(ga,null,D.createElement(Sj,{title:n("insulin-to-carb_ratio_title")}),D.createElement(KB,{isAnimated:!!c},D.createElement(bj,{title:n("insulin-to-carb_ratio_input"),value:`${_||"-"} ${n("fixed_insulin_settings_carb_ratio_unit")}`,testID:"carb_ratio",onPress:()=>{f(!0)},errorMessage:c}))),D.createElement(ga,null,D.createElement(Sj,{title:n("insulin_sensitivity_title")}),D.createElement(KB,{isAnimated:!!l},D.createElement(bj,{title:n("insulin_sensitivity_input"),value:E,testID:"insulin_sensitivity",onPress:()=>{m(!0)},errorMessage:l}))),D.createElement(v7,null),D.createElement(j8,null)),D.createElement(n3,{testID:"insulin_sensitivity_picker",isVisible:h,items:S,initialScrollIndex:k,onConfirm:b,onCancel:()=>{m(!1)}}),D.createElement(n3,{testID:"insulin_to_carb_ratio_picker",isVisible:p,items:R8,initialScrollIndex:C,onConfirm:w,onCancel:()=>{f(!1)}}))}const Tee=Ei.create({contentContainer:{paddingVertical:32,paddingHorizontal:16,gap:24}});const Oee=Ei.create({container:{paddingHorizontal:16,paddingVertical:32},spacing:{height:32},titleStyle:{color:wL.textSecondary}}),Ree=rF(function({setNextEnabled:e,ref:t}){const{t:n}=eV(),{width:i}=vm(),{fastActingInsulin:r,longActingInsulin:a,bloodGlucoseUnits:o,parameters:s,treatmentType:l,diabetesType:u,birthday:c,biologicalSex:d}=Y2(),h=$2(),{modalStoreActions:m}=z2(),p=M.useCallback(async()=>{if(void 0===o)throw new Error("[Step6::setUserSettings] bloodGlucoseUnits from userSettingsManager is undefined.");if(void 0===u)throw new Error("[Step6::setUserSettings] diabetesType from userSettingsManager is undefined.");if(void 0===s)throw new Error("[Step6::setUserSettings] parameters from newUserSettingsManager is undefined.");if(void 0===c)throw new Error("[Step6::setUserSettings] birthday from newUserSettingsManager is undefined.");if(void 0===d)throw new Error("[Step6::setUserSettings] biologicalSex from newUserSettingsManager is undefined.");const{carbohydrateRatio:e,insulinSensitivity:t}=s.overallParameters,n=jq(t,e,FL.Usage.Overall);return Vq.setUserSettings({parameters:n,activity:_7(),notifications:{medicineNotification:{toggle:!1,dailyReminderTime:"19:00"},remeasurementNotification:{toggle:!0,remeasurement:1.5},deviceIdentifiers:[]},glucoseLevelTargets:{targetBGLIntervals:[{startTime:"00:00",low:6,target:8,high:10},{startTime:"05:00",low:4,target:6,high:7.2},{startTime:"09:00",low:6,target:7,high:8},{startTime:"11:00",low:4,target:6,high:10},{startTime:"13:00",low:6,target:7,high:8},{startTime:"18:00",low:4,target:6,high:10},{startTime:"22:00",low:6,target:8,high:10}],overallTargetBGL:{startTime:"00:00",low:3.9,target:6,high:10},use:FL.Usage.Intervals},bloodGlucoseUnits:o,fastActingInsulin:r,longActingInsulin:a,treatmentType:l,diabetesType:u,birthday:c,biologicalSex:d})},[c,o,u,r,d,a,s,l]);M.useImperativeHandle(t,()=>({onBackPress(){NX(MX.SetupSummaryBackPress)},onNextPressed:async()=>{NX(MX.SetupSummaryFinishPress);const t=await p();return t?e(!0):m.set({showSyncErrorModal:!0}),{transitionAllowed:t}},validateData:()=>({isValid:!0})}),[e,m,p]);const f=M.useMemo(()=>{if(void 0===o)throw new Error("[Step6::generalTreatmentItems] bloodGlucoseUnits is undefined");if(void 0===l)throw new Error("[Step6::generalTreatmentItems] treatmentType is undefined");if(void 0===u)throw new Error("[Step6::generalTreatmentItems] diabetesType is undefined");const{text:e}=Xq(o),t=OX(FL.InjectionMethod,l),i=u===FL.DiabetesType.Type1?"type_of_diabetes_type1":"type_of_diabetes_type2";return[{label:n("summary_setup_input_diabetes_type"),value:n(i),testID:"diabetes-type-result"},{label:n("summary_setup_input_treatment_type"),value:X8[t](),testID:"treatment-type-result"},{label:n("summary_setup_input_glucose_unit"),value:e,testID:"glucose-result"},{label:n("summary_setup_input_rapid-acting_insulin"),value:(r&&W8[r]())??"-",testID:"fast-acting-result"},{label:n("summary_setup_input_long-acting_insulin_input"),value:(a&&z8[a]())??"-",testID:"long-acting-result"}]},[o,u,r,a,l,n]),g=M.useMemo(()=>{if(void 0===o)throw new Error("[Step6::insulinFactorsItems] bloodGlucoseUnits is undefined");const{text:e}=Xq(o),{carbohydrateRatio:t,insulinSensitivity:i}=s?.overallParameters??{};if(void 0===t||void 0===i)throw new Error("[Step6::insulinFactorsItems] carbohydrateRatio or insulinSensitivity is undefined");return[h?{label:n("summary_setup_input_daily_dose_input"),value:h.toFixed(0),unit:n("units"),testID:"total-daily-insulin-result"}:null,{label:n("summary_setup_input_insulin-to-carb_input"),value:`${t}`,unit:n("summary_setup_insulin-to-carb_unit"),testID:"carb-ratio-result"},{label:n("summary_setup_input_insulin_sensitivity_input"),value:PQ(i,FL.BloodGlucoseUnit.MMOL_L,o),unit:n("summary_setup_insulin_sensitivity_unit",{displayUnit:e}),testID:"insulin-sensitivity-result"}].filter(e=>null!==e)},[o,s?.overallParameters,n,h]);return D.createElement(Xa,{testID:"scroll",contentContainerStyle:[Oee.container,{width:i}]},D.createElement(v7,null),D.createElement(ga,{style:Oee.spacing}),D.createElement(Sj,{title:n("summary_setup_general_title")}),f.map(({testID:e,label:t,value:n,unit:i})=>D.createElement(bj,{key:e,testID:e,title:t,displayStyle:yj.List,displayType:vj.ListItem,titleStyle:Oee.titleStyle,value:`${n} ${i??""}`})),D.createElement(ga,{style:Oee.spacing}),D.createElement(Sj,{title:n("summary_setup_insuling_settings_title")}),g.map(({testID:e,label:t,value:n,unit:i})=>D.createElement(bj,{key:e,testID:e,title:t,displayStyle:yj.List,displayType:vj.ListItem,titleStyle:Oee.titleStyle,value:`${n} ${i??""}`})),D.createElement(U0,null))}),Aee=()=>{const{t:e}=eV(),{width:t}=vm(),{clear:n}=W2(),i=Gp(),[r,a]=M.useState(2),[o,s]=M.useState(0),[l,u]=M.useState(0),[c,d]=M.useState(!1),[h,m]=M.useState(!1),p=M.useRef(null),f=M.useRef(null);M.useEffect(()=>{n()},[n]);const g=M.useCallback(e=>{d(e)},[]),_=M.useCallback(e=>{m("yes"===e)},[]),v=M.useMemo(()=>[{title:e("general_navigation"),stepNumber:2,renderComponent:e=>D.createElement(bee,{ref:e,setNextEnabled:g})},{title:e("treatment_navigation"),stepNumber:3,renderComponent:e=>D.createElement(See,{ref:e,setNextEnabled:g})},{title:e("insulin_settings_navigation"),stepNumber:4,renderComponent:e=>D.createElement(vee,{ref:e,onOptionSelect:_,setNextEnabled:g})},{title:e("insulin_settings_navigation"),stepNumber:4,renderComponent:e=>h?D.createElement(Iee,{ref:e,setNextEnabled:g}):D.createElement(Eee,{ref:e,setNextEnabled:g})},{title:e("summary_setup_navigation"),stepNumber:5,renderComponent:e=>D.createElement(Ree,{ref:e,setNextEnabled:g})}],[_,g,h,e]);M.useEffect(()=>{i.setOptions({title:v[o].title})},[o,i,v]),M.useEffect(()=>{if(!f.current)return;const{isValid:e}=f.current.validateData();d(e)},[o,v]);const y=M.useCallback(async()=>{if(!f.current)return;const{transitionAllowed:e}=await f.current.onNextPressed();if(e)if(o===v.length-1)i.dispatch(Sm({index:0,routes:[{name:E2.QuickGuideStack}]}));else{const e=o+1;p.current?.scrollToIndex({index:e,animated:!0}),a(v[e].stepNumber),s(e),u(t=>Math.max(t,e))}},[o,v,i]),b=M.useCallback(()=>{if(f.current?.onBackPress(),0===o)i.goBack();else{const e=o-1;p.current?.scrollToIndex({index:e,animated:!0}),a(v[e].stepNumber),s(e),u(t=>Math.max(t,e))}},[o,i,v]);return Wp(M.useCallback(()=>{const e=Au.addEventListener("hardwareBackPress",()=>(b(),!0));return()=>{e.remove()}},[b])),D.createElement(D.Fragment,null,D.createElement(Wo,{ref:p,data:v,renderItem:({item:e,index:n})=>n<=l?e.renderComponent(n===o?f:null):D.createElement(ga,{style:{width:t}}),scrollEnabled:!1,horizontal:!0,initialNumToRender:1,showsHorizontalScrollIndicator:!1}),D.createElement(hee,{currentStep:r,onPress:y,onBackPress:b,inactive:!c,text:o===v.length-1?e("button_complete"):e("button_next"),shouldRenderRightIcon:o!==v.length-1}))},{HEDIA_ACCOUNT_CALLBACK:Lee="",LICENSING_BASE_URL:Pee=""}=zj;var Mee=(e=>(e.InactiveLicense="/problems/inactive-license",e.InvalidLicense="/problems/invalid-license",e.LicenseNotFound="/problems/license-not-found",e))(Mee||{});const Dee=WB({type:$B("/problems/license-not-found"),title:jB(),status:$B(FL.StatusCode.BAD_REQUEST),detail:jB()}),Nee=WB({type:$B("/problems/invalid-license"),title:jB(),status:$B(FL.StatusCode.BAD_REQUEST),detail:jB()}),Fee=WB({type:$B("/problems/inactive-license"),title:jB(),status:$B(FL.StatusCode.BAD_REQUEST),detail:jB()}),Bee=WB({isActive:HB(),key:jB(),startDate:jB(),type:XB(["perpetual","subscription","time-limited"]),endDate:jB().optional(),duration:XB(["P1M","P3M","P6M","P12M"]).optional()});function jee(e=2){const{setIsLicenseValid:t}=Xz(),[n,i]=M.useState(0);return{checkLicense:M.useCallback(async r=>{try{const a=await(async()=>{const e=await FX(Pee+"/check-license?product=HDA"),t=await e.json();if(e.status===FL.StatusCode.OK)return Bee.parse(t);if(e.status===FL.StatusCode.BAD_REQUEST){if(Dee.safeParse(t).success)return Dee.parse(t);if(Nee.safeParse(t).success)return Nee.parse(t);if(Fee.safeParse(t).success)return Fee.parse(t)}throw Error(`licensing:: Check License failed: ${e.status} - ${t.type||"Unknown error"}`)})();if(n>=e)return void t(!0);if(a.type===Mee.InactiveLicense)return t(!1),await(async()=>{const e=await FX(Pee+"/activate-license",{method:FL.HTTPRequestMethod.POST,headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({product:"HDA"})});return await e.json()})(),void i(e=>e+1);if(a.type===Mee.InvalidLicense||a.type===Mee.LicenseNotFound)return void r(a.type);if(a.isActive)return t(!0),void i(0);t(!1),r()}catch(a){console.error("[useLicenseChecker]",a),t(!0)}},[t,n,e]),retryCount:n}}const Vee=({isVisible:e,onCancelPress:t,onContinuePress:n,onModalHide:i})=>{const{t:r}=eV(),[a,o]=M.useState([!1,!1,!1]),[s,l]=M.useState(!1),u=M.useMemo(()=>a.every(Boolean),[a]);M.useEffect(()=>{e&&(o([!1,!1,!1]),l(!1))},[e]);const c=M.useCallback(e=>{o(t=>t.map((t,n)=>n===e?!t:t))},[]),d=M.useCallback(()=>{s&&u&&i()},[u,s,i]),h=M.useCallback(()=>{l(!0),n()},[n]);return D.createElement(sz,{testID:"restrictions_modal",isVisible:e,enableScroll:!0,onModalHide:d,containerStyle:Hee.modal,buttons:[{testID:"restrictions_continue_button",title:r("welcome_modal_button_confirm"),onPress:h,disabled:!u},{testID:"restrictions_cancel_button",title:r("button_cancel"),type:lj.Secondary,onPress:t}]},D.createElement(pj,{style:Hee.title},r("welcome_modal_title")),D.createElement(pj,{style:Hee.subtitle},r("welcome_modal_body")),D.createElement(eh,{testID:"restrictions_checkmark_1",onPress:()=>{c(0)},style:({pressed:e})=>[{opacity:e?.5:1},Hee.checkmarkContainer]},D.createElement(ga,{style:Hee.checkmarkTextContainer},D.createElement(pj,{style:Hee.checkmarkTitle},r("welcome_modal_years_title")),D.createElement(pj,{style:Hee.checkmarkSubtitle},r("welcome_modal_years_body"))),a[0]?D.createElement(qK,null):D.createElement(XK,null)),D.createElement(ga,{style:Hee.separatorLine}),D.createElement(eh,{testID:"restrictions_checkmark_2",onPress:()=>{c(1)},style:({pressed:e})=>[{opacity:e?.5:1},Hee.checkmarkContainer]},D.createElement(ga,{style:Hee.checkmarkTextContainer},D.createElement(pj,{style:Hee.checkmarkTitle},r("welcome_modal_pregnancy_title")),D.createElement(pj,{style:Hee.checkmarkSubtitle},r("welcome_modal_pregnancy_body"))),a[1]?D.createElement(qK,null):D.createElement(XK,null)),D.createElement(ga,{style:Hee.separatorLine}),D.createElement(eh,{testID:"restrictions_checkmark_3",onPress:()=>{c(2)},style:({pressed:e})=>[{opacity:e?.5:1},Hee.checkmarkContainer]},D.createElement(ga,{style:Hee.checkmarkTextContainer},D.createElement(pj,{style:Hee.checkmarkTitle},r("welcome_modal_gestational_title")),D.createElement(pj,{style:Hee.checkmarkSubtitle},r("welcome_modal_gestational_body"))),a[2]?D.createElement(qK,null):D.createElement(XK,null)))},Hee=Ei.create({modal:{backgroundColor:wL.bgModal},title:{..._L.bold_2XL,marginBottom:8},subtitle:{..._L.regular_Base,color:wL.textSecondary,marginBottom:16},checkmarkContainer:{paddingVertical:16,flexDirection:"row",justifyContent:"space-between"},checkmarkTextContainer:{flex:1,marginRight:16},checkmarkTitle:{..._L.semiBold_Base,marginBottom:2},checkmarkSubtitle:{..._L.regular_SM,color:wL.textSecondary},separatorLine:{width:"100%",backgroundColor:wL.borderDivider,height:1}}),zee=rF(()=>{const{t:e}=eV(),{navigate:t}=Gp(),{clear:n}=W2(),{isLicenseValid:i}=Xz(),{checkLicense:r}=jee(),[a,o]=M.useState(!1);M.useEffect(()=>{n(),oV||r(e=>{t(E2.LicensingStatus,e&&{errorType:e})}).catch(console.error)},[r,n,t]);const s=M.useCallback(()=>{o(!0),NX(MX.SetupIntroStartPress)},[]);return oV||i?D.createElement(D.Fragment,null,D.createElement(uee,{title:e("setup_account_title"),subtitle:e("setup_account_body"),stepChecked:1}),D.createElement(hee,{currentStep:1,isBackVisible:!1,onPress:s,text:e("button_start"),shouldRenderRightIcon:!1}),D.createElement(Vee,{isVisible:a,onCancelPress:()=>{o(!1)},onContinuePress:()=>{o(!1)},onModalHide:()=>{t(E2.Setup)}})):D.createElement(QV,null)}),Uee=()=>{const{t:e}=eV(),{Navigator:t,Screen:n}=I8();return d.jsxs(t,{screenOptions:{...r0,headerLeft:()=>null,headerBackVisible:!1},children:[d.jsx(n,{name:E2.SetupStart,component:zee,options:{title:e("setup_account_navigation")}}),d.jsx(n,{name:E2.Setup,component:Aee,options:{title:e("general_navigation")}}),d.jsx(n,{name:E2.BiologicalSex,component:i8,options:{title:e("biological_sex_navigation"),headerLeft:Z2}}),d.jsx(n,{name:E2.TreatmentType,component:Z8,options:{title:e("treatment_type_navigation"),headerLeft:Z2}}),d.jsx(n,{name:E2.RapidActingInsulin,component:$8,options:{title:e("rapid-acting_insulin_navigation"),headerLeft:Z2}}),d.jsx(n,{name:E2.LongActingInsulin,component:G8,options:{title:e("long-acting_insulin_navigation"),headerLeft:Z2}})]})},Gee=()=>{const{Navigator:e,Screen:t}=I8();return d.jsxs(e,{screenOptions:{...r0,headerShown:!1},children:[d.jsx(t,{name:E2.SetupBolusCalculator,component:Uee}),d.jsx(t,{name:E2.QuickGuideStack,component:_ee})]})},Wee=rF(()=>{const{isOnboardingFinished:e,setIsOnboardingFinished:t}=Xz(),[n,i]=D.useState(!1),r=M.useCallback(async()=>{if(await GQ.syncAll(),!Vq.uuid)throw window.location.href="/redirect?status=error",new Error("[App::syncData] User settings not found");const e=qB(FL.BloodGlucoseUnit).safeParse(Vq.glucoseUnit);t(e.success)},[t]);return M.useEffect(()=>{r().catch(console.error).finally(()=>{i(!0)})},[r]),n&&void 0!==e?e?d.jsx(lee,{}):d.jsx(Gee,{}):d.jsx(QV,{})}),Yee={prefixes:[],config:{screens:{SetupBolusCalculator:{path:"setup-bolus-calculator",screens:{SetupStart:"setup-start",Setup:"setup",BiologicalSex:"biological-sex",InsulinSettings:"insulin-settings",TreatmentType:"treatment-type",RapidActingInsulin:"rapid-acting-insulin",LongActingInsulin:"long-acting-insulin"}},QuickGuideStack:{path:"quick-guide",screens:{QuickGuideStart:"quick-guide-start",QuickGuide:"quick-guide",QuickGuideAllSet:"quick-guide-all-set"}},NewCalculationStack:{path:"new-calculation",screens:{ActiveInsulin:{path:"active-insulin"},RegisterActiveInsulin:{path:"register"},CalculationBottomTabs:{path:"inputs",screens:{GlucoseTab:{path:"glucose",screens:{Glucose:""}},CarbsTab:{path:"carbs",screens:{Carbs:"",FoodLibrary:"library"}},ActivityTab:{path:"activity",screens:{ActivityOverview:"",AddActivity:"add-activity"}},SummaryTab:{path:"summary",screens:{Summary:""}}}},LoadingRecommendation:{path:"loading"},Recommendation:{path:"recommendation"},LeavingRecommendation:{path:"leaving"}}},IFU:"ifu",SettingsTab:{path:"settings",screens:{Settings:"",ProfileStack:{path:"profile",screens:{Profile:"",BiologicalSex:"biological-sex",TreatmentType:"treatment-type",RapidActingInsulin:"rapid-acting-insulin",LongActingInsulin:"long-acting-insulin",DiabetesType:"diabetes-type"}},GlucoseSettings:"glucose",ActivitySettings:"activity",InsulinSettingsStack:{path:"insulin-settings",screens:{InsulinSettings:"",TreatmentType:"treatment-type",RapidActingInsulin:"rapid-acting-insulin",LongActingInsulin:"long-acting-insulin"}},IFU:"ifu",Legal:"legal",GlucoseUnit:"glucose-unit"}}}}};var $ee="web-production",Xee="https://key@sentry-proxy.hedia.io/123456";const qee=function(){const e=[...Object.keys(km),"addListener","removeListener","resetRoot","dispatch","isFocused","canGoBack","getRootState","getState","getParent","getCurrentRoute","getCurrentOptions"],t={},n=(e,n)=>{t[e]&&(t[e]=t[e].filter(e=>e!==n))};let i=null;return{get current(){return i},set current(e){i=e,null!=e&&Object.entries(t).forEach(t=>{let[n,i]=t;i.forEach(t=>{e.addListener(n,t)})})},isReady:()=>null!=i&&i.isReady(),...e.reduce((e,r)=>(e[r]=function(){for(var e=arguments.length,a=new Array(e),o=0;o<e;o++)a[o]=arguments[o];if(null!=i)return i[r](...a);switch(r){case"addListener":{const[e,i]=a;return t[e]=t[e]||[],t[e].push(i),()=>n(e,i)}case"removeListener":{const[e,t]=a;n(e,t);break}default:console.error(Lm)}},e),{})}}(),Zee={...ff,colors:{...ff.colors,background:wL.bgBackground,border:wL.borderNavigation}};!function(e){const t={...e};var n,i;Rv(t,"react"),n="react",i={version:M.version},i_().setContext(n,i),function(e={}){const t=!e.skipBrowserExtensionCheck&&ab(),n={...e,enabled:!t&&e.enabled,stackParser:(i=e.stackParser||Uy,Array.isArray(i)?Wf(...i):i),integrations:sv({integrations:e.integrations,defaultIntegrations:null==e.defaultIntegrations?[Bv(),Dv(),qy(),$y(),eb(),rb(),$v(),ib(),Jy()]:e.defaultIntegrations}),transport:e.transport||Ny};var i;kv(wy,n)}(t)}({dsn:Xee,environment:$ee,ignoreErrors:["No text/key with value"],beforeSend:e=>e.message?.includes("No text/key with value")?null:(e.user&&(delete e.user.email,delete e.user.ip_address,delete e.user.username,delete e.user.geo),e)});const Kee=()=>d.jsx(Rw,{children:d.jsx(ee,{children:d.jsx(Of,{theme:Zee,ref:qee,linking:Yee,children:d.jsx(Wee,{})})})});P.createRoot(document.getElementById("root")).render(d.jsx(Kee,{}));
|
|
19
|
+
const n=function(){if(Bz)return Vz;Bz=1,Vz.byteLength=function(e){var t=a(e),n=t[0],i=t[1];return 3*(n+i)/4-i},Vz.toByteArray=function(e){var i,r,o=a(e),s=o[0],l=o[1],u=new n(function(e,t,n){return 3*(t+n)/4-n}(0,s,l)),c=0,d=l>0?s-4:s;for(r=0;r<d;r+=4)i=t[e.charCodeAt(r)]<<18|t[e.charCodeAt(r+1)]<<12|t[e.charCodeAt(r+2)]<<6|t[e.charCodeAt(r+3)],u[c++]=i>>16&255,u[c++]=i>>8&255,u[c++]=255&i;return 2===l&&(i=t[e.charCodeAt(r)]<<2|t[e.charCodeAt(r+1)]>>4,u[c++]=255&i),1===l&&(i=t[e.charCodeAt(r)]<<10|t[e.charCodeAt(r+1)]<<4|t[e.charCodeAt(r+2)]>>2,u[c++]=i>>8&255,u[c++]=255&i),u},Vz.fromByteArray=function(t){for(var n,i=t.length,r=i%3,a=[],o=16383,l=0,u=i-r;l<u;l+=o)a.push(s(t,l,l+o>u?u:l+o));return 1===r?(n=t[i-1],a.push(e[n>>2]+e[n<<4&63]+"==")):2===r&&(n=(t[i-2]<<8)+t[i-1],a.push(e[n>>10]+e[n>>4&63]+e[n<<2&63]+"=")),a.join("")};for(var e=[],t=[],n="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r=0;r<64;++r)e[r]=i[r],t[i.charCodeAt(r)]=r;function a(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function o(t){return e[t>>18&63]+e[t>>12&63]+e[t>>6&63]+e[63&t]}function s(e,t,n){for(var i,r=[],a=t;a<n;a+=3)i=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),r.push(o(i));return r.join("")}return t["-".charCodeAt(0)]=62,t["_".charCodeAt(0)]=63,Vz}(),i=(Hz||(Hz=1,Uz.read=function(e,t,n,i,r){var a,o,s=8*r-i-1,l=(1<<s)-1,u=l>>1,c=-7,d=n?r-1:0,h=n?-1:1,m=e[t+d];for(d+=h,a=m&(1<<-c)-1,m>>=-c,c+=s;c>0;a=256*a+e[t+d],d+=h,c-=8);for(o=a&(1<<-c)-1,a>>=-c,c+=i;c>0;o=256*o+e[t+d],d+=h,c-=8);if(0===a)a=1-u;else{if(a===l)return o?NaN:1/0*(m?-1:1);o+=Math.pow(2,i),a-=u}return(m?-1:1)*o*Math.pow(2,a-i)},Uz.write=function(e,t,n,i,r,a){var o,s,l,u=8*a-r-1,c=(1<<u)-1,d=c>>1,h=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,m=i?0:a-1,p=i?1:-1,f=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=c):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),(t+=o+d>=1?h/l:h*Math.pow(2,1-d))*l>=2&&(o++,l/=2),o+d>=c?(s=0,o=c):o+d>=1?(s=(t*l-1)*Math.pow(2,r),o+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,r),o=0));r>=8;e[n+m]=255&s,m+=p,s/=256,r-=8);for(o=o<<r|s,u+=r;u>0;e[n+m]=255&o,m+=p,o/=256,u-=8);e[n+m-p]|=128*f}),Uz),r="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=s,t.SlowBuffer=function(e){return+e!=e&&(e=0),s.alloc(+e)},t.INSPECT_MAX_BYTES=50;const a=2147483647;function o(e){if(e>a)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,s.prototype),t}function s(e,t,n){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return c(e)}return l(e,t,n)}function l(e,t,n){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!s.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const n=0|p(e,t);let i=o(n);const r=i.write(e,t);return r!==n&&(i=i.slice(0,r)),i}(e,t);if(ArrayBuffer.isView(e))return function(e){if(X(e,Uint8Array)){const t=new Uint8Array(e);return h(t.buffer,t.byteOffset,t.byteLength)}return d(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(X(e,ArrayBuffer)||e&&X(e.buffer,ArrayBuffer))return h(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&(X(e,SharedArrayBuffer)||e&&X(e.buffer,SharedArrayBuffer)))return h(e,t,n);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const i=e.valueOf&&e.valueOf();if(null!=i&&i!==e)return s.from(i,t,n);const r=function(e){if(s.isBuffer(e)){const t=0|m(e.length),n=o(t);return 0===n.length||e.copy(n,0,0,t),n}return void 0!==e.length?"number"!=typeof e.length||q(e.length)?o(0):d(e):"Buffer"===e.type&&Array.isArray(e.data)?d(e.data):void 0}(e);if(r)return r;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return s.from(e[Symbol.toPrimitive]("string"),t,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function u(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function c(e){return u(e),o(e<0?0:0|m(e))}function d(e){const t=e.length<0?0:0|m(e.length),n=o(t);for(let i=0;i<t;i+=1)n[i]=255&e[i];return n}function h(e,t,n){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(n||0))throw new RangeError('"length" is outside of buffer bounds');let i;return i=void 0===t&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,t):new Uint8Array(e,t,n),Object.setPrototypeOf(i,s.prototype),i}function m(e){if(e>=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|e}function p(e,t){if(s.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||X(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const n=e.length,i=arguments.length>2&&!0===arguments[2];if(!i&&0===n)return 0;let r=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return W(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return Y(e).length;default:if(r)return i?-1:W(e).length;t=(""+t).toLowerCase(),r=!0}}function f(e,t,n){let i=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return O(this,t,n);case"utf8":case"utf-8":return E(this,t,n);case"ascii":return I(this,t,n);case"latin1":case"binary":return T(this,t,n);case"base64":return C(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,t,n);default:if(i)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),i=!0}}function g(e,t,n){const i=e[t];e[t]=e[n],e[n]=i}function _(e,t,n,i,r){if(0===e.length)return-1;if("string"==typeof n?(i=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),q(n=+n)&&(n=r?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(r)return-1;n=e.length-1}else if(n<0){if(!r)return-1;n=0}if("string"==typeof t&&(t=s.from(t,i)),s.isBuffer(t))return 0===t.length?-1:v(e,t,n,i,r);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?r?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):v(e,[t],n,i,r);throw new TypeError("val must be string, number or Buffer")}function v(e,t,n,i,r){let a,o=1,s=e.length,l=t.length;if(void 0!==i&&("ucs2"===(i=String(i).toLowerCase())||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(e.length<2||t.length<2)return-1;o=2,s/=2,l/=2,n/=2}function u(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(r){let i=-1;for(a=n;a<s;a++)if(u(e,a)===u(t,-1===i?0:a-i)){if(-1===i&&(i=a),a-i+1===l)return i*o}else-1!==i&&(a-=a-i),i=-1}else for(n+l>s&&(n=s-l),a=n;a>=0;a--){let n=!0;for(let i=0;i<l;i++)if(u(e,a+i)!==u(t,i)){n=!1;break}if(n)return a}return-1}function y(e,t,n,i){n=Number(n)||0;const r=e.length-n;i?(i=Number(i))>r&&(i=r):i=r;const a=t.length;let o;for(i>a/2&&(i=a/2),o=0;o<i;++o){const i=parseInt(t.substr(2*o,2),16);if(q(i))return o;e[n+o]=i}return o}function b(e,t,n,i){return $(W(t,e.length-n),e,n,i)}function w(e,t,n,i){return $(function(e){const t=[];for(let n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,i)}function S(e,t,n,i){return $(Y(t),e,n,i)}function k(e,t,n,i){return $(function(e,t){let n,i,r;const a=[];for(let o=0;o<e.length&&!((t-=2)<0);++o)n=e.charCodeAt(o),i=n>>8,r=n%256,a.push(r),a.push(i);return a}(t,e.length-n),e,n,i)}function C(e,t,i){return 0===t&&i===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,i))}function E(e,t,n){n=Math.min(e.length,n);const i=[];let r=t;for(;r<n;){const t=e[r];let a=null,o=t>239?4:t>223?3:t>191?2:1;if(r+o<=n){let n,i,s,l;switch(o){case 1:t<128&&(a=t);break;case 2:n=e[r+1],128==(192&n)&&(l=(31&t)<<6|63&n,l>127&&(a=l));break;case 3:n=e[r+1],i=e[r+2],128==(192&n)&&128==(192&i)&&(l=(15&t)<<12|(63&n)<<6|63&i,l>2047&&(l<55296||l>57343)&&(a=l));break;case 4:n=e[r+1],i=e[r+2],s=e[r+3],128==(192&n)&&128==(192&i)&&128==(192&s)&&(l=(15&t)<<18|(63&n)<<12|(63&i)<<6|63&s,l>65535&&l<1114112&&(a=l))}}null===a?(a=65533,o=1):a>65535&&(a-=65536,i.push(a>>>10&1023|55296),a=56320|1023&a),i.push(a),r+=o}return function(e){const t=e.length;if(t<=x)return String.fromCharCode.apply(String,e);let n="",i=0;for(;i<t;)n+=String.fromCharCode.apply(String,e.slice(i,i+=x));return n}(i)}t.kMaxLength=a,s.TYPED_ARRAY_SUPPORT=function(){try{const e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),s.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}}),s.poolSize=8192,s.from=function(e,t,n){return l(e,t,n)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array),s.alloc=function(e,t,n){return function(e,t,n){return u(e),e<=0?o(e):void 0!==t?"string"==typeof n?o(e).fill(t,n):o(e).fill(t):o(e)}(e,t,n)},s.allocUnsafe=function(e){return c(e)},s.allocUnsafeSlow=function(e){return c(e)},s.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==s.prototype},s.compare=function(e,t){if(X(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),X(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),!s.isBuffer(e)||!s.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let n=e.length,i=t.length;for(let r=0,a=Math.min(n,i);r<a;++r)if(e[r]!==t[r]){n=e[r],i=t[r];break}return n<i?-1:i<n?1:0},s.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},s.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return s.alloc(0);let n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;const i=s.allocUnsafe(t);let r=0;for(n=0;n<e.length;++n){let t=e[n];if(X(t,Uint8Array))r+t.length>i.length?(s.isBuffer(t)||(t=s.from(t)),t.copy(i,r)):Uint8Array.prototype.set.call(i,t,r);else{if(!s.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(i,r)}r+=t.length}return i},s.byteLength=p,s.prototype._isBuffer=!0,s.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)g(this,t,t+1);return this},s.prototype.swap32=function(){const e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)g(this,t,t+3),g(this,t+1,t+2);return this},s.prototype.swap64=function(){const e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)g(this,t,t+7),g(this,t+1,t+6),g(this,t+2,t+5),g(this,t+3,t+4);return this},s.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?E(this,0,e):f.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(e){if(!s.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===s.compare(this,e)},s.prototype.inspect=function(){let e="";const n=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,n).replace(/(.{2})/g,"$1 ").trim(),this.length>n&&(e+=" ... "),"<Buffer "+e+">"},r&&(s.prototype[r]=s.prototype.inspect),s.prototype.compare=function(e,t,n,i,r){if(X(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),!s.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===i&&(i=0),void 0===r&&(r=this.length),t<0||n>e.length||i<0||r>this.length)throw new RangeError("out of range index");if(i>=r&&t>=n)return 0;if(i>=r)return-1;if(t>=n)return 1;if(this===e)return 0;let a=(r>>>=0)-(i>>>=0),o=(n>>>=0)-(t>>>=0);const l=Math.min(a,o),u=this.slice(i,r),c=e.slice(t,n);for(let s=0;s<l;++s)if(u[s]!==c[s]){a=u[s],o=c[s];break}return a<o?-1:o<a?1:0},s.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},s.prototype.indexOf=function(e,t,n){return _(this,e,t,n,!0)},s.prototype.lastIndexOf=function(e,t,n){return _(this,e,t,n,!1)},s.prototype.write=function(e,t,n,i){if(void 0===t)i="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)i=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(n)?(n>>>=0,void 0===i&&(i="utf8")):(i=n,n=void 0)}const r=this.length-t;if((void 0===n||n>r)&&(n=r),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");let a=!1;for(;;)switch(i){case"hex":return y(this,e,t,n);case"utf8":case"utf-8":return b(this,e,t,n);case"ascii":case"latin1":case"binary":return w(this,e,t,n);case"base64":return S(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,e,t,n);default:if(a)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),a=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const x=4096;function I(e,t,n){let i="";n=Math.min(e.length,n);for(let r=t;r<n;++r)i+=String.fromCharCode(127&e[r]);return i}function T(e,t,n){let i="";n=Math.min(e.length,n);for(let r=t;r<n;++r)i+=String.fromCharCode(e[r]);return i}function O(e,t,n){const i=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>i)&&(n=i);let r="";for(let a=t;a<n;++a)r+=Z[e[a]];return r}function R(e,t,n){const i=e.slice(t,n);let r="";for(let a=0;a<i.length-1;a+=2)r+=String.fromCharCode(i[a]+256*i[a+1]);return r}function A(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function L(e,t,n,i,r,a){if(!s.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>r||t<a)throw new RangeError('"value" argument is out of bounds');if(n+i>e.length)throw new RangeError("Index out of range")}function P(e,t,n,i,r){H(t,i,r,e,n,7);let a=Number(t&BigInt(4294967295));e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[n++]=o,o>>=8,e[n++]=o,o>>=8,e[n++]=o,o>>=8,e[n++]=o,n}function M(e,t,n,i,r){H(t,i,r,e,n,7);let a=Number(t&BigInt(4294967295));e[n+7]=a,a>>=8,e[n+6]=a,a>>=8,e[n+5]=a,a>>=8,e[n+4]=a;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[n+3]=o,o>>=8,e[n+2]=o,o>>=8,e[n+1]=o,o>>=8,e[n]=o,n+8}function D(e,t,n,i,r,a){if(n+i>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function N(e,t,n,r,a){return t=+t,n>>>=0,a||D(e,0,n,4),i.write(e,t,n,r,23,4),n+4}function F(e,t,n,r,a){return t=+t,n>>>=0,a||D(e,0,n,8),i.write(e,t,n,r,52,8),n+8}s.prototype.slice=function(e,t){const n=this.length;(e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e);const i=this.subarray(e,t);return Object.setPrototypeOf(i,s.prototype),i},s.prototype.readUintLE=s.prototype.readUIntLE=function(e,t,n){e>>>=0,t>>>=0,n||A(e,t,this.length);let i=this[e],r=1,a=0;for(;++a<t&&(r*=256);)i+=this[e+a]*r;return i},s.prototype.readUintBE=s.prototype.readUIntBE=function(e,t,n){e>>>=0,t>>>=0,n||A(e,t,this.length);let i=this[e+--t],r=1;for(;t>0&&(r*=256);)i+=this[e+--t]*r;return i},s.prototype.readUint8=s.prototype.readUInt8=function(e,t){return e>>>=0,t||A(e,1,this.length),this[e]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(e,t){return e>>>=0,t||A(e,2,this.length),this[e]|this[e+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(e,t){return e>>>=0,t||A(e,2,this.length),this[e]<<8|this[e+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(e,t){return e>>>=0,t||A(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(e,t){return e>>>=0,t||A(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},s.prototype.readBigUInt64LE=K(function(e){z(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||U(e,this.length-8);const i=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,r=this[++e]+256*this[++e]+65536*this[++e]+n*2**24;return BigInt(i)+(BigInt(r)<<BigInt(32))}),s.prototype.readBigUInt64BE=K(function(e){z(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||U(e,this.length-8);const i=t*2**24+65536*this[++e]+256*this[++e]+this[++e],r=this[++e]*2**24+65536*this[++e]+256*this[++e]+n;return(BigInt(i)<<BigInt(32))+BigInt(r)}),s.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||A(e,t,this.length);let i=this[e],r=1,a=0;for(;++a<t&&(r*=256);)i+=this[e+a]*r;return r*=128,i>=r&&(i-=Math.pow(2,8*t)),i},s.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||A(e,t,this.length);let i=t,r=1,a=this[e+--i];for(;i>0&&(r*=256);)a+=this[e+--i]*r;return r*=128,a>=r&&(a-=Math.pow(2,8*t)),a},s.prototype.readInt8=function(e,t){return e>>>=0,t||A(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},s.prototype.readInt16LE=function(e,t){e>>>=0,t||A(e,2,this.length);const n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt16BE=function(e,t){e>>>=0,t||A(e,2,this.length);const n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt32LE=function(e,t){return e>>>=0,t||A(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},s.prototype.readInt32BE=function(e,t){return e>>>=0,t||A(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},s.prototype.readBigInt64LE=K(function(e){z(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||U(e,this.length-8);const i=this[e+4]+256*this[e+5]+65536*this[e+6]+(n<<24);return(BigInt(i)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)}),s.prototype.readBigInt64BE=K(function(e){z(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||U(e,this.length-8);const i=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(i)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+n)}),s.prototype.readFloatLE=function(e,t){return e>>>=0,t||A(e,4,this.length),i.read(this,e,!0,23,4)},s.prototype.readFloatBE=function(e,t){return e>>>=0,t||A(e,4,this.length),i.read(this,e,!1,23,4)},s.prototype.readDoubleLE=function(e,t){return e>>>=0,t||A(e,8,this.length),i.read(this,e,!0,52,8)},s.prototype.readDoubleBE=function(e,t){return e>>>=0,t||A(e,8,this.length),i.read(this,e,!1,52,8)},s.prototype.writeUintLE=s.prototype.writeUIntLE=function(e,t,n,i){e=+e,t>>>=0,n>>>=0,i||L(this,e,t,n,Math.pow(2,8*n)-1,0);let r=1,a=0;for(this[t]=255&e;++a<n&&(r*=256);)this[t+a]=e/r&255;return t+n},s.prototype.writeUintBE=s.prototype.writeUIntBE=function(e,t,n,i){e=+e,t>>>=0,n>>>=0,i||L(this,e,t,n,Math.pow(2,8*n)-1,0);let r=n-1,a=1;for(this[t+r]=255&e;--r>=0&&(a*=256);)this[t+r]=e/a&255;return t+n},s.prototype.writeUint8=s.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||L(this,e,t,1,255,0),this[t]=255&e,t+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||L(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||L(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||L(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||L(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},s.prototype.writeBigUInt64LE=K(function(e,t=0){return P(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeBigUInt64BE=K(function(e,t=0){return M(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeIntLE=function(e,t,n,i){if(e=+e,t>>>=0,!i){const i=Math.pow(2,8*n-1);L(this,e,t,n,i-1,-i)}let r=0,a=1,o=0;for(this[t]=255&e;++r<n&&(a*=256);)e<0&&0===o&&0!==this[t+r-1]&&(o=1),this[t+r]=(e/a|0)-o&255;return t+n},s.prototype.writeIntBE=function(e,t,n,i){if(e=+e,t>>>=0,!i){const i=Math.pow(2,8*n-1);L(this,e,t,n,i-1,-i)}let r=n-1,a=1,o=0;for(this[t+r]=255&e;--r>=0&&(a*=256);)e<0&&0===o&&0!==this[t+r+1]&&(o=1),this[t+r]=(e/a|0)-o&255;return t+n},s.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||L(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},s.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||L(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},s.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||L(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},s.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||L(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},s.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||L(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},s.prototype.writeBigInt64LE=K(function(e,t=0){return P(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),s.prototype.writeBigInt64BE=K(function(e,t=0){return M(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),s.prototype.writeFloatLE=function(e,t,n){return N(this,e,t,!0,n)},s.prototype.writeFloatBE=function(e,t,n){return N(this,e,t,!1,n)},s.prototype.writeDoubleLE=function(e,t,n){return F(this,e,t,!0,n)},s.prototype.writeDoubleBE=function(e,t,n){return F(this,e,t,!1,n)},s.prototype.copy=function(e,t,n,i){if(!s.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),i||0===i||(i=this.length),t>=e.length&&(t=e.length),t||(t=0),i>0&&i<n&&(i=n),i===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-t<i-n&&(i=e.length-t+n);const r=i-n;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,n,i):Uint8Array.prototype.set.call(e,this.subarray(n,i),t),r},s.prototype.fill=function(e,t,n,i){if("string"==typeof e){if("string"==typeof t?(i=t,t=0,n=this.length):"string"==typeof n&&(i=n,n=this.length),void 0!==i&&"string"!=typeof i)throw new TypeError("encoding must be a string");if("string"==typeof i&&!s.isEncoding(i))throw new TypeError("Unknown encoding: "+i);if(1===e.length){const t=e.charCodeAt(0);("utf8"===i&&t<128||"latin1"===i)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;let r;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(r=t;r<n;++r)this[r]=e;else{const a=s.isBuffer(e)?e:s.from(e,i),o=a.length;if(0===o)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(r=0;r<n-t;++r)this[r+t]=a[r%o]}return this};const B={};function j(e,t,n){B[e]=class extends n{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function V(e){let t="",n=e.length;const i="-"===e[0]?1:0;for(;n>=i+4;n-=3)t=`_${e.slice(n-3,n)}${t}`;return`${e.slice(0,n)}${t}`}function H(e,t,n,i,r,a){if(e>n||e<t){const n="bigint"==typeof t?"n":"";let i;throw i=0===t||t===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(a+1)}${n}`:`>= -(2${n} ** ${8*(a+1)-1}${n}) and < 2 ** ${8*(a+1)-1}${n}`,new B.ERR_OUT_OF_RANGE("value",i,e)}!function(e,t,n){z(t,"offset"),void 0!==e[t]&&void 0!==e[t+n]||U(t,e.length-(n+1))}(i,r,a)}function z(e,t){if("number"!=typeof e)throw new B.ERR_INVALID_ARG_TYPE(t,"number",e)}function U(e,t,n){if(Math.floor(e)!==e)throw z(e,n),new B.ERR_OUT_OF_RANGE("offset","an integer",e);if(t<0)throw new B.ERR_BUFFER_OUT_OF_BOUNDS;throw new B.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${t}`,e)}j("ERR_BUFFER_OUT_OF_BOUNDS",function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),j("ERR_INVALID_ARG_TYPE",function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`},TypeError),j("ERR_OUT_OF_RANGE",function(e,t,n){let i=`The value of "${e}" is out of range.`,r=n;return Number.isInteger(n)&&Math.abs(n)>2**32?r=V(String(n)):"bigint"==typeof n&&(r=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(r=V(r)),r+="n"),i+=` It must be ${t}. Received ${r}`,i},RangeError);const G=/[^+/0-9A-Za-z-_]/g;function W(e,t){let n;t=t||1/0;const i=e.length;let r=null;const a=[];for(let o=0;o<i;++o){if(n=e.charCodeAt(o),n>55295&&n<57344){if(!r){if(n>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(o+1===i){(t-=3)>-1&&a.push(239,191,189);continue}r=n;continue}if(n<56320){(t-=3)>-1&&a.push(239,191,189),r=n;continue}n=65536+(r-55296<<10|n-56320)}else r&&(t-=3)>-1&&a.push(239,191,189);if(r=null,n<128){if((t-=1)<0)break;a.push(n)}else if(n<2048){if((t-=2)<0)break;a.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;a.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return a}function Y(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(G,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function $(e,t,n,i){let r;for(r=0;r<i&&!(r+n>=t.length||r>=e.length);++r)t[r+n]=e[r];return r}function X(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function q(e){return e!=e}const Z=function(){const e="0123456789abcdef",t=new Array(256);for(let n=0;n<16;++n){const i=16*n;for(let r=0;r<16;++r)t[i+r]=e[n]+e[r]}return t}();function K(e){return"undefined"==typeof BigInt?Q:e}function Q(){throw new Error("BigInt not supported")}}(jz)),jz);const{OAUTH_BASE_URL:Wz="",OAUTH_CLIENT_ID:Yz=""}=zj,$z={accessToken:qj.getString("access_token"),refreshToken:qj.getString("refresh_token"),isOnboardingFinished:qj.getBoolean("isOnboardingFinished"),isLicenseValid:!1,cgmStatus:{available:!1,active:!1}},Xz=uL()(jj(e=>({...$z,setTokens:({accessToken:t,refreshToken:n})=>{e({accessToken:t,refreshToken:n})},setIsOnboardingFinished:t=>{e({isOnboardingFinished:t})},setIsLicenseValid:t=>{e({isLicenseValid:t})},setCgmStatus:t=>{e({cgmStatus:t})},clear:()=>{e($z)}}),{name:"AUTH_STORE",storage:Fj(Zj)}));var qz="b30def84-6b37-426a-9752-be3cf572fdf1";const Zz=oV?"https://tracking.hedia.io":zj.TRACKING_BASE_URL,Kz=oV?qz:zj.TRACKING_PROJECT_ID;async function Qz(e){const t={...e,uuid:void 0},n={headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(t),method:FL.HTTPRequestMethod.POST},i=`${Zz}/api/v1/projects/${Kz}/events`,{status:r}=await fetch(i,n);if(r!==FL.StatusCode.CREATED)throw new Error("[tracking::syncTrackingEvent] Error while syncing tracking event")}var Jz=(e=>(e.MalformedDataError="Malformed Data Error",e.IncorrectDataError="Incorrect Data Type Error",e))(Jz||{});const eU="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,tU="8.55.0",nU=globalThis;function iU(e,t,n){const i=n||nU,r=i.__SENTRY__=i.__SENTRY__||{},a=r[tU]=r[tU]||{};return a[e]||(a[e]=t())}const rU="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,aU=["debug","info","warn","error","log","assert","trace"],oU={};function sU(e){if(!("console"in nU))return e();const t=nU.console,n={},i=Object.keys(oU);i.forEach(e=>{const i=oU[e];n[e]=t[e],t[e]=i});try{return e()}finally{i.forEach(e=>{t[e]=n[e]})}}const lU=iU("logger",function(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return rU?aU.forEach(n=>{t[n]=(...t)=>{e&&sU(()=>{nU.console[n](`Sentry Logger [${n}]:`,...t)})}}):aU.forEach(e=>{t[e]=()=>{}}),t}),uU="<anonymous>";function cU(){return dU(nU),nU}function dU(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||tU,t[tU]=t[tU]||{}}const hU=Object.prototype.toString;function mU(e,t){return hU.call(e)===`[object ${t}]`}function pU(e){return mU(e,"String")}function fU(e){return mU(e,"Object")}function gU(e,t){try{return e instanceof t}catch(n){return!1}}const _U=nU;function vU(e,t){const n=e,i=[];if(!n||!n.tagName)return"";if(_U.HTMLElement&&n instanceof HTMLElement&&n.dataset){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}i.push(n.tagName.toLowerCase());const r=t&&t.length?t.filter(e=>n.getAttribute(e)).map(e=>[e,n.getAttribute(e)]):null;if(r&&r.length)r.forEach(e=>{i.push(`[${e[0]}="${e[1]}"]`)});else{n.id&&i.push(`#${n.id}`);const e=n.className;if(e&&pU(e)){const t=e.split(/\s+/);for(const e of t)i.push(`.${e}`)}}const a=["aria-label","type","name","title","alt"];for(const o of a){const e=n.getAttribute(o);e&&i.push(`[${o}="${e}"]`)}return i.join("")}function yU(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch(i){rU&&lU.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function bU(e){if(function(e){switch(hU.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return gU(e,Error)}}(e))return{message:e.message,name:e.name,stack:e.stack,...SU(e)};if(t=e,"undefined"!=typeof Event&&gU(t,Event)){const t={type:e.type,target:wU(e.target),currentTarget:wU(e.currentTarget),...SU(e)};return"undefined"!=typeof CustomEvent&&gU(e,CustomEvent)&&(t.detail=e.detail),t}return e;var t}function wU(e){try{return t=e,"undefined"!=typeof Element&&gU(t,Element)?function(e,t={}){if(!e)return"<unknown>";try{let n=e;const i=5,r=[];let a=0,o=0;const s=" > ",l=s.length;let u;const c=Array.isArray(t)?t:t.keyAttrs,d=!Array.isArray(t)&&t.maxStringLength||80;for(;n&&a++<i&&(u=vU(n,c),!("html"===u||a>1&&o+r.length*l+u.length>=d));)r.push(u),o+=u.length,n=n.parentNode;return r.reverse().join(s)}catch(n){return"<unknown>"}}(e):Object.prototype.toString.call(e)}catch(n){return"<unknown>"}var t}function SU(e){if("object"==typeof e&&null!==e){const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}return{}}function kU(e){return CU(e,new Map)}function CU(e,t){if(function(e){if(!fU(e))return!1;try{const t=Object.getPrototypeOf(e).constructor.name;return!t||"Object"===t}catch(t){return!0}}(e)){const n=t.get(e);if(void 0!==n)return n;const i={};t.set(e,i);for(const r of Object.getOwnPropertyNames(e))void 0!==e[r]&&(i[r]=CU(e[r],t));return i}if(Array.isArray(e)){const n=t.get(e);if(void 0!==n)return n;const i=[];return t.set(e,i),e.forEach(e=>{i.push(CU(e,t))}),i}return e}function EU(){return Date.now()/1e3}const xU=function(){const{performance:e}=nU;if(!e||!e.now)return EU;const t=Date.now()-e.now(),n=null==e.timeOrigin?t:e.timeOrigin;return()=>(n+e.now())/1e3}();function IU(){const e=nU,t=e.crypto||e.msCrypto;let n=()=>16*Math.random();try{if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");t&&t.getRandomValues&&(n=()=>{const e=new Uint8Array(1);return t.getRandomValues(e),e[0]})}catch(i){}return"10000000100040008000100000000000".replace(/[018]/g,e=>(e^(15&n())>>e/4).toString(16))}function TU(){return IU()}function OU(){return IU().substring(16)}function RU(e,t,n=2){if(!t||"object"!=typeof t||n<=0)return t;if(e&&t&&0===Object.keys(t).length)return e;const i={...e};for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&(i[r]=RU(i[r],t[r],n-1));return i}(()=>{const{performance:e}=nU;if(!e||!e.now)return;const t=36e5,n=e.now(),i=Date.now(),r=e.timeOrigin?Math.abs(e.timeOrigin+n-i):t,a=r<t,o=e.timing&&e.timing.navigationStart,s="number"==typeof o?Math.abs(o+n-i):t;(a||s<t)&&(r<=s&&e.timeOrigin)})();const AU="_sentrySpan";function LU(e,t){t?yU(e,AU,t):delete e[AU]}function PU(e){return e[AU]}class MU{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:TU(),spanId:OU()}}clone(){const e=new MU;return e._breadcrumbs=[...this._breadcrumbs],e._tags={...this._tags},e._extra={...this._extra},e._contexts={...this._contexts},this._contexts.flags&&(e._contexts.flags={values:[...this._contexts.flags.values]}),e._user=this._user,e._level=this._level,e._session=this._session,e._transactionName=this._transactionName,e._fingerprint=this._fingerprint,e._eventProcessors=[...this._eventProcessors],e._requestSession=this._requestSession,e._attachments=[...this._attachments],e._sdkProcessingMetadata={...this._sdkProcessingMetadata},e._propagationContext={...this._propagationContext},e._client=this._client,e._lastEventId=this._lastEventId,LU(e,PU(this)),e}setClient(e){this._client=e}setLastEventId(e){this._lastEventId=e}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&function(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),e.did||t.did||(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||xU(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=32===t.sid.length?t.sid:IU()),void 0!==t.init&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),"number"==typeof t.started&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if("number"==typeof t.duration)e.duration=t.duration;else{const t=e.timestamp-e.started;e.duration=t>=0?t:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),"number"==typeof t.errors&&(e.errors=t.errors),t.status&&(e.status=t.status)}(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(e){return this._requestSession=e,this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,t){return this._tags={...this._tags,[e]:t},this._notifyScopeListeners(),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,t){return this._extra={...this._extra,[e]:t},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,t){return null===t?delete this._contexts[e]:this._contexts[e]=t,this._notifyScopeListeners(),this}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;const t="function"==typeof e?e(this):e,[n,i]=t instanceof DU?[t.getScopeData(),t.getRequestSession()]:fU(t)?[e,e.requestSession]:[],{tags:r,extra:a,user:o,contexts:s,level:l,fingerprint:u=[],propagationContext:c}=n||{};return this._tags={...this._tags,...r},this._extra={...this._extra,...a},this._contexts={...this._contexts,...s},o&&Object.keys(o).length&&(this._user=o),l&&(this._level=l),u.length&&(this._fingerprint=u),c&&(this._propagationContext=c),i&&(this._requestSession=i),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._session=void 0,LU(this,void 0),this._attachments=[],this.setPropagationContext({traceId:TU()}),this._notifyScopeListeners(),this}addBreadcrumb(e,t){const n="number"==typeof t?t:100;if(n<=0)return this;const i={timestamp:EU(),...e};return this._breadcrumbs.push(i),this._breadcrumbs.length>n&&(this._breadcrumbs=this._breadcrumbs.slice(-n),this._client&&this._client.recordDroppedEvent("buffer_overflow","log_item")),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:PU(this)}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=RU(this._sdkProcessingMetadata,e,2),this}setPropagationContext(e){return this._propagationContext={spanId:OU(),...e},this}getPropagationContext(){return this._propagationContext}captureException(e,t){const n=t&&t.event_id?t.event_id:IU();if(!this._client)return lU.warn("No client configured on scope - will not capture exception!"),n;const i=new Error("Sentry syntheticException");return this._client.captureException(e,{originalException:e,syntheticException:i,...t,event_id:n},this),n}captureMessage(e,t,n){const i=n&&n.event_id?n.event_id:IU();if(!this._client)return lU.warn("No client configured on scope - will not capture message!"),i;const r=new Error(e);return this._client.captureMessage(e,t,{originalException:e,syntheticException:r,...n,event_id:i},this),i}captureEvent(e,t){const n=t&&t.event_id?t.event_id:IU();return this._client?(this._client.captureEvent(e,{...t,event_id:n},this),n):(lU.warn("No client configured on scope - will not capture event!"),n)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(e=>{e(this)}),this._notifyingListeners=!1)}}const DU=MU;class NU{constructor(e,t){let n,i;n=e||new DU,i=t||new DU,this._stack=[{scope:n}],this._isolationScope=i}withScope(t){const n=this._pushScope();let i;try{i=t(n)}catch(e){throw this._popScope(),e}return r=i,Boolean(r&&r.then&&"function"==typeof r.then)?i.then(e=>(this._popScope(),e),e=>{throw this._popScope(),e}):(this._popScope(),i);var r}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const e=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:e}),e}_popScope(){return!(this._stack.length<=1)&&!!this._stack.pop()}}function FU(){const e=dU(cU());return e.stack=e.stack||new NU(iU("defaultCurrentScope",()=>new DU),iU("defaultIsolationScope",()=>new DU))}function BU(e){return FU().withScope(e)}function jU(e,t){const n=FU();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function VU(e){return FU().withScope(()=>e(FU().getIsolationScope()))}function HU(e){const t=dU(e);return t.acs?t.acs:{withIsolationScope:VU,withScope:BU,withSetScope:jU,withSetIsolationScope:(e,t)=>VU(t),getCurrentScope:()=>FU().getScope(),getIsolationScope:()=>FU().getIsolationScope()}}function zU(){return HU(cU()).getCurrentScope()}function UU(){return HU(cU()).getIsolationScope()}function GU(...e){const t=HU(cU());if(2===e.length){const[n,i]=e;return n?t.withSetScope(n,i):t.withScope(i)}return t.withScope(e[0])}function WU(){return zU().getClient()}function YU(e){const t=e._sentryMetrics;if(!t)return;const n={};for(const[,[i,r]]of t){(n[i]||(n[i]=[])).push(kU(r))}return n}const $U="sentry.source",XU="sentry.sample_rate",qU="sentry.op",ZU="sentry.origin",KU="sentry.idle_span_finish_reason",QU="sentry.custom_span_name",JU=/^sentry-/;function eG(e){const t=function(e){if(!e||!pU(e)&&!Array.isArray(e))return;if(Array.isArray(e))return e.reduce((e,t)=>{const n=tG(t);return Object.entries(n).forEach(([t,n])=>{e[t]=n}),e},{});return tG(e)}(e);if(!t)return;const n=Object.entries(t).reduce((e,[t,n])=>{if(t.match(JU)){e[t.slice(7)]=n}return e},{});return Object.keys(n).length>0?n:void 0}function tG(e){return e.split(",").map(e=>e.split("=").map(e=>decodeURIComponent(e.trim()))).reduce((e,[t,n])=>(t&&n&&(e[t]=n),e),{})}let nG=!1;function iG(e){const{spanId:t,traceId:n}=e.spanContext(),{data:i,op:r,parent_span_id:a,status:o,origin:s}=oG(e);return kU({parent_span_id:a,span_id:t,trace_id:n,data:i,op:r,status:o,origin:s})}function rG(e){return"number"==typeof e?aG(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?aG(e.getTime()):xU()}function aG(e){return e>9999999999?e/1e3:e}function oG(t){if(function(e){return"function"==typeof e.getSpanJSON}(t))return t.getSpanJSON();try{const{spanId:e,traceId:n}=t.spanContext();if(function(e){const t=e;return!!(t.attributes&&t.startTime&&t.name&&t.endTime&&t.status)}(t)){const{attributes:i,startTime:r,name:a,endTime:o,parentSpanId:s,status:l}=t;return kU({span_id:e,trace_id:n,data:i,description:a,parent_span_id:s,start_timestamp:rG(r),timestamp:rG(o)||void 0,status:lG(l),op:i[qU],origin:i[ZU],_metrics_summary:YU(t)})}return{span_id:e,trace_id:n}}catch(e){return{}}}function sG(e){const{traceFlags:t}=e.spanContext();return 1===t}function lG(e){if(e&&0!==e.code)return 1===e.code?"ok":e.message||"unknown_error"}const uG="_sentryChildSpans",cG="_sentryRootSpan";function dG(e,t){const n=e[cG]||e;yU(t,cG,n),e[uG]?e[uG].add(t):yU(e,uG,new Set([t]))}function hG(e){const t=new Set;return function e(n){if(!t.has(n)&&sG(n)){t.add(n);const i=n[uG]?Array.from(n[uG]):[];for(const t of i)e(t)}}(e),Array.from(t)}function mG(e){return e[cG]||e}function pG(){const e=HU(cU());return e.getActiveSpan?e.getActiveSpan():PU(zU())}const fG="_sentryScope",gG="_sentryIsolationScope";function _G(e){return{scope:e[fG],isolationScope:e[gG]}}function vG(e){if("boolean"==typeof __SENTRY_TRACING__&&!__SENTRY_TRACING__)return!1;const t=WU(),n=e||t&&t.getOptions();return!!n&&(n.enableTracing||"tracesSampleRate"in n||"tracesSampler"in n)}class yG{constructor(e={}){this._traceId=e.traceId||TU(),this._spanId=e.spanId||OU()}spanContext(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:0}}end(e){}setAttribute(e,t){return this}setAttributes(e){return this}setStatus(e){return this}updateName(e){return this}isRecording(){return!1}addEvent(e,t,n){return this}addLink(e){return this}addLinks(e){return this}recordException(e,t){}}const bG="_frozenDsc";function wG(e,t){yU(e,bG,t)}function SG(e){const t=WU();if(!t)return{};const n=mG(e),i=n[bG];if(i)return i;const r=n.spanContext().traceState,a=r&&r.get("sentry.dsc"),o=a&&eG(a);if(o)return o;const s=function(e,t){const n=t.getOptions(),{publicKey:i}=t.getDsn()||{},r=kU({environment:n.environment||"production",release:n.release,public_key:i,trace_id:e});return t.emit("createDsc",r),r}(e.spanContext().traceId,t),l=oG(n),u=l.data||{},c=u[XU];null!=c&&(s.sample_rate=`${c}`);const d=u[$U],h=l.description;return"url"!==d&&h&&(s.transaction=h),vG()&&(s.sampled=String(sG(n))),t.emit("createDsc",s,n),s}function kG(e,t){if(!vG(e))return[!1];const n=UU().getScopeData().sdkProcessingMetadata.normalizedRequest,i={...t,normalizedRequest:t.normalizedRequest||n};let r;r="function"==typeof e.tracesSampler?e.tracesSampler(i):void 0!==i.parentSampled?i.parentSampled:void 0!==e.tracesSampleRate?e.tracesSampleRate:1;const a=function(e){if("boolean"==typeof e)return Number(e);const t="string"==typeof e?parseFloat(e):e;if(!("number"!=typeof t||isNaN(t)||t<0||t>1))return t;eU&&lU.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(e)} of type ${JSON.stringify(typeof e)}.`)}(r);if(void 0===a)return eU&&lU.warn("[Tracing] Discarding transaction because of invalid sample rate."),[!1];if(!a)return eU&&lU.log("[Tracing] Discarding transaction because "+("function"==typeof e.tracesSampler?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0")),[!1,a];return Math.random()<a?[!0,a]:(eU&&lU.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(r)})`),[!1,a])}function CG(e,t=!1){const{host:n,path:i,pass:r,port:a,projectId:o,protocol:s,publicKey:l}=e;return`${s}://${l}${t&&r?`:${r}`:""}@${n}${a?`:${a}`:""}/${i?`${i}/`:i}${o}`}function EG(e,t=100,n=1/0){try{return xG("",e,t,n)}catch(i){return{ERROR:`**non-serializable** (${i})`}}}function xG(t,n,i=1/0,r=1/0,a=function(){const e="function"==typeof WeakSet,t=e?new WeakSet:[];return[function(n){if(e)return!!t.has(n)||(t.add(n),!1);for(let e=0;e<t.length;e++)if(t[e]===n)return!0;return t.push(n),!1},function(n){if(e)t.delete(n);else for(let e=0;e<t.length;e++)if(t[e]===n){t.splice(e,1);break}}]}()){const[o,s]=a;if(null==n||["boolean","string"].includes(typeof n)||"number"==typeof n&&Number.isFinite(n))return n;const l=function(t,n){try{if("domain"===t&&n&&"object"==typeof n&&n._events)return"[Domain]";if("domainEmitter"===t)return"[DomainEmitter]";if("undefined"!=typeof self&&n===self)return"[Global]";if("undefined"!=typeof window&&n===window)return"[Window]";if("undefined"!=typeof document&&n===document)return"[Document]";if("object"==typeof(i=n)&&null!==i&&(i.__isVue||i._isVue))return"[VueViewModel]";if(function(e){return fU(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}(n))return"[SyntheticEvent]";if("number"==typeof n&&!Number.isFinite(n))return`[${n}]`;if("function"==typeof n)return`[Function: ${function(t){try{return t&&"function"==typeof t&&t.name||uU}catch(e){return uU}}(n)}]`;if("symbol"==typeof n)return`[${String(n)}]`;if("bigint"==typeof n)return`[BigInt: ${String(n)}]`;const r=function(e){const t=Object.getPrototypeOf(e);return t?t.constructor.name:"null prototype"}(n);return/^HTML(\w*)Element$/.test(r)?`[HTMLElement: ${r}]`:`[object ${r}]`}catch(r){return`**non-serializable** (${r})`}var i}(t,n);if(!l.startsWith("[object "))return l;if(n.__sentry_skip_normalization__)return n;const u="number"==typeof n.__sentry_override_normalization_depth__?n.__sentry_override_normalization_depth__:i;if(0===u)return l.replace("object ","");if(o(n))return"[Circular ~]";const c=n;if(c&&"function"==typeof c.toJSON)try{return xG("",c.toJSON(),u-1,r,a)}catch(p){}const d=Array.isArray(n)?[]:{};let h=0;const m=bU(n);for(const e in m){if(!Object.prototype.hasOwnProperty.call(m,e))continue;if(h>=r){d[e]="[MaxProperties ~]";break}const t=m[e];d[e]=xG(e,t,u-1,r,a),h++}return s(n),d}function IG(e){return[{type:"span"},e]}function TG(e,t){const n=SG(e[0]),i=t&&t.getDsn(),r=t&&t.getOptions().tunnel,a={sent_at:(new Date).toISOString(),...(o=n,!!o.trace_id&&!!o.public_key&&{trace:n}),...!!r&&i&&{dsn:CG(i)}};var o;const s=t&&t.getOptions().beforeSendSpan,l=s?e=>{const t=s(oG(e));return t||nG||(sU(()=>{console.warn("[Sentry] Deprecation warning: Returning null from `beforeSendSpan` will be disallowed from SDK version 9.0.0 onwards. The callback will only support mutating spans. To drop certain spans, configure the respective integrations directly.")}),nG=!0),t}:e=>oG(e),u=[];for(const c of e){const e=l(c);e&&u.push(IG(e))}return function(e,t=[]){return[e,t]}(a,u)}function OG(e){if(!e||0===e.length)return;const t={};return e.forEach(e=>{const n=e.attributes||{},i=n["sentry.measurement_unit"],r=n["sentry.measurement_value"];"string"==typeof i&&"number"==typeof r&&(t[e.name]={value:r,unit:i})}),t}class RG{constructor(e={}){this._traceId=e.traceId||TU(),this._spanId=e.spanId||OU(),this._startTime=e.startTimestamp||xU(),this._attributes={},this.setAttributes({[ZU]:"manual",[qU]:e.op,...e.attributes}),this._name=e.name,e.parentSpanId&&(this._parentSpanId=e.parentSpanId),"sampled"in e&&(this._sampled=e.sampled),e.endTimestamp&&(this._endTime=e.endTimestamp),this._events=[],this._isStandaloneSpan=e.isStandalone,this._endTime&&this._onSpanEnded()}addLink(e){return this}addLinks(e){return this}recordException(e,t){}spanContext(){const{_spanId:e,_traceId:t,_sampled:n}=this;return{spanId:e,traceId:t,traceFlags:n?1:0}}setAttribute(e,t){return void 0===t?delete this._attributes[e]:this._attributes[e]=t,this}setAttributes(e){return Object.keys(e).forEach(t=>this.setAttribute(t,e[t])),this}updateStartTime(e){this._startTime=rG(e)}setStatus(e){return this._status=e,this}updateName(e){return this._name=e,this.setAttribute($U,"custom"),this}end(e){this._endTime||(this._endTime=rG(e),function(e){if(!eU)return;const{description:t="< unknown name >",op:n="< unknown op >"}=oG(e),{spanId:i}=e.spanContext(),r=`[Tracing] Finishing "${n}" ${mG(e)===e?"root ":""}span "${t}" with ID ${i}`;lU.log(r)}(this),this._onSpanEnded())}getSpanJSON(){return kU({data:this._attributes,description:this._name,op:this._attributes[qU],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:lG(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[ZU],_metrics_summary:YU(this),profile_id:this._attributes["sentry.profile_id"],exclusive_time:this._attributes["sentry.exclusive_time"],measurements:OG(this._events),is_segment:this._isStandaloneSpan&&mG(this)===this||void 0,segment_id:this._isStandaloneSpan?mG(this).spanContext().spanId:void 0})}isRecording(){return!this._endTime&&!!this._sampled}addEvent(e,t,n){eU&&lU.log("[Tracing] Adding an event to span:",e);const i=AG(t)?t:n||xU(),r=AG(t)?{}:t||{},a={name:e,time:rG(i),attributes:r};return this._events.push(a),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){const e=WU();e&&e.emit("spanEnd",this);if(!(this._isStandaloneSpan||this===mG(this)))return;if(this._isStandaloneSpan)return void(this._sampled?function(e){const t=WU();if(!t)return;const n=e[1];if(!n||0===n.length)return void t.recordDroppedEvent("before_send","span");t.sendEnvelope(e)}(TG([this],e)):(eU&&lU.log("[Tracing] Discarding standalone span because its trace was not chosen to be sampled."),e&&e.recordDroppedEvent("sample_rate","span")));const t=this._convertSpanToTransaction();if(t){(_G(this).scope||zU()).captureEvent(t)}}_convertSpanToTransaction(){if(!LG(oG(this)))return;this._name||(eU&&lU.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>");const{scope:e,isolationScope:t}=_G(this),n=(e||zU()).getClient()||WU();if(!0!==this._sampled)return eU&&lU.log("[Tracing] Discarding transaction because its trace was not chosen to be sampled."),void(n&&n.recordDroppedEvent("sample_rate","transaction"));const i=hG(this).filter(e=>e!==this&&!function(e){return e instanceof RG&&e.isStandaloneSpan()}(e)).map(e=>oG(e)).filter(LG),r=this._attributes[$U];delete this._attributes[QU],i.forEach(e=>{e.data&&delete e.data[QU]});const a={contexts:{trace:iG(this)},spans:i.length>1e3?i.sort((e,t)=>e.start_timestamp-t.start_timestamp).slice(0,1e3):i,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{capturedSpanScope:e,capturedSpanIsolationScope:t,...kU({dynamicSamplingContext:SG(this)})},_metrics_summary:YU(this),...r&&{transaction_info:{source:r}}},o=OG(this._events);return o&&Object.keys(o).length&&(eU&&lU.log("[Measurements] Adding measurements to transaction event",JSON.stringify(o,void 0,2)),a.measurements=o),a}}function AG(e){return e&&"number"==typeof e||e instanceof Date||Array.isArray(e)}function LG(e){return!!(e.start_timestamp&&e.timestamp&&e.span_id&&e.trace_id)}const PG="__SENTRY_SUPPRESS_TRACING__";function MG(e){const t=DG();if(t.startInactiveSpan)return t.startInactiveSpan(e);const n=function(e){const t=e.experimental||{},n={isStandalone:t.standalone,...e};if(e.startTime){const t={...n};return t.startTimestamp=rG(e.startTime),delete t.startTime,t}return n}(e),{forceTransaction:i,parentSpan:r}=e,a=e.scope?t=>GU(e.scope,t):void 0!==r?e=>function(e,t){const n=DG();if(n.withActiveSpan)return n.withActiveSpan(e,t);return GU(n=>(LU(n,e||void 0),t(n)))}(r,e):e=>e();return a(()=>{const t=zU(),r=function(e){const t=PU(e);if(!t)return;const n=WU(),i=n?n.getOptions():{};if(i.parentSpanIsAlwaysRootSpan)return mG(t);return t}(t);return e.onlyIfParent&&!r?new yG:function({parentSpan:e,spanArguments:t,forceTransaction:n,scope:i}){if(!vG())return new yG;const r=UU();let a;if(e&&!n)a=function(e,t,n){const{spanId:i,traceId:r}=e.spanContext(),a=!t.getScopeData().sdkProcessingMetadata[PG]&&sG(e),o=a?new RG({...n,parentSpanId:i,traceId:r,sampled:a}):new yG({traceId:r});dG(e,o);const s=WU();s&&(s.emit("spanStart",o),n.endTimestamp&&s.emit("spanEnd",o));return o}(e,i,t),dG(e,a);else if(e){const n=SG(e),{traceId:r,spanId:o}=e.spanContext(),s=sG(e);a=NG({traceId:r,parentSpanId:o,...t},i,s),wG(a,n)}else{const{traceId:e,dsc:n,parentSpanId:o,sampled:s}={...r.getPropagationContext(),...i.getPropagationContext()};a=NG({traceId:e,parentSpanId:o,...t},i,s),n&&wG(a,n)}return function(e){if(!eU)return;const{description:t="< unknown name >",op:n="< unknown op >",parent_span_id:i}=oG(e),{spanId:r}=e.spanContext(),a=sG(e),o=mG(e),s=o===e,l=`[Tracing] Starting ${a?"sampled":"unsampled"} ${s?"root ":""}span`,u=[`op: ${n}`,`name: ${t}`,`ID: ${r}`];if(i&&u.push(`parent ID: ${i}`),!s){const{op:e,description:t}=oG(o);u.push(`root ID: ${o.spanContext().spanId}`),e&&u.push(`root op: ${e}`),t&&u.push(`root description: ${t}`)}lU.log(`${l}\n ${u.join("\n ")}`)}(a),function(e,t,n){e&&(yU(e,gG,n),yU(e,fG,t))}(a,i,r),a}({parentSpan:r,spanArguments:n,forceTransaction:i,scope:t})})}function DG(){return HU(cU())}function NG(e,t,n){const i=WU(),r=i&&i.getOptions()||{},{name:a="",attributes:o}=e,[s,l]=t.getScopeData().sdkProcessingMetadata[PG]?[!1]:kG(r,{name:a,parentSampled:n,attributes:o,transactionContext:{name:a,parentSampled:n}}),u=new RG({...e,attributes:{[$U]:"custom",...e.attributes},sampled:s});return void 0!==l&&u.setAttribute(XU,l),i&&i.emit("spanStart",u),u}const FG={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3};function BG(e,t={}){const n=new Map;let i,r=!1,a="externalFinish",o=!t.disableAutoFinish;const s=[],{idleTimeout:l=FG.idleTimeout,finalTimeout:u=FG.finalTimeout,childSpanTimeout:c=FG.childSpanTimeout,beforeSpanEnd:d}=t,h=WU();if(!h||!vG())return new yG;const m=zU(),p=pG(),f=function(e){const t=MG(e);return LU(zU(),t),eU&&lU.log("[Tracing] Started span is an idle span"),t}(e);function g(){i&&(clearTimeout(i),i=void 0)}function _(e){g(),i=setTimeout(()=>{!r&&0===n.size&&o&&(a="idleTimeout",f.end(e))},l)}function v(e){i=setTimeout(()=>{!r&&o&&(a="heartbeatFailed",f.end(e))},c)}function y(e){r=!0,n.clear(),s.forEach(e=>e()),LU(m,p);const t=oG(f),{start_timestamp:i}=t;if(!i)return;(t.data||{})[KU]||f.setAttribute(KU,a),lU.log(`[Tracing] Idle span "${t.op}" finished`);const o=hG(f).filter(e=>e!==f);let c=0;o.forEach(t=>{t.isRecording()&&(t.setStatus({code:2,message:"cancelled"}),t.end(e),eU&&lU.log("[Tracing] Cancelling span since span ended early",JSON.stringify(t,void 0,2)));const n=oG(t),{timestamp:i=0,start_timestamp:r=0}=n,a=r<=e,o=i-r<=(u+l)/1e3;if(eU){const e=JSON.stringify(t,void 0,2);a?o||lU.log("[Tracing] Discarding span since it finished after idle span final timeout",e):lU.log("[Tracing] Discarding span since it happened after idle span was finished",e)}o&&a||(!function(e,t){e[uG]&&e[uG].delete(t)}(f,t),c++)}),c>0&&f.setAttribute("sentry.idle_span_discarded_spans",c)}return f.end=new Proxy(f.end,{apply(e,t,n){d&&d(f);const[i,...r]=n,a=rG(i||xU()),o=hG(f).filter(e=>e!==f);if(!o.length)return y(a),Reflect.apply(e,t,[a,...r]);const s=o.map(e=>oG(e).timestamp).filter(e=>!!e),l=s.length?Math.max(...s):void 0,c=oG(f).start_timestamp,h=Math.min(c?c+u/1e3:1/0,Math.max(c||-1/0,Math.min(a,l||1/0)));return y(h),Reflect.apply(e,t,[h,...r])}}),s.push(h.on("spanStart",e=>{if(r||e===f||oG(e).timestamp)return;var t;hG(f).includes(e)&&(t=e.spanContext().spanId,g(),n.set(t,!0),v(xU()+c/1e3))})),s.push(h.on("spanEnd",e=>{var t;r||(t=e.spanContext().spanId,n.has(t)&&n.delete(t),0===n.size&&_(xU()+l/1e3))})),s.push(h.on("idleSpanEnableAutoFinish",e=>{e===f&&(o=!0,_(),n.size&&v())})),t.disableAutoFinish||_(),setTimeout(()=>{r||(f.setStatus({code:2,message:"deadline_exceeded"}),a="finalTimeout",f.end())},u),f}class jG extends Error{constructor(e,t="warn"){super(e),this.message=e,this.logLevel=t}}const VG=100;function HG(e,t){const n=WU(),i=UU();if(!n)return;const{beforeBreadcrumb:r=null,maxBreadcrumbs:a=VG}=n.getOptions();if(a<=0)return;const o={timestamp:EU(),...e},s=r?sU(()=>r(o,t)):o;null!==s&&(n.emit&&n.emit("beforeAddBreadcrumb",s,t),i.addBreadcrumb(s,a))}const zG={},UG=nU;function GG(e){var t;const n="string"!=typeof e&&"exception"in e&&(null===(t=e.exception)||void 0===t?void 0:t.values)?e.exception.values:[];for(const i of n)if(i.mechanism&&!1===i.mechanism.handled&&"onerror"===i.mechanism.type)return!0;return!1}function WG(){const e=null!==(i=null===(n=null===(t=UG.expo)||void 0===t?void 0:t.modules)||void 0===n?void 0:n.ExponentConstants)&&void 0!==i?i:void 0;var t,n,i;return"expo"===(e&&e.appOwnership)}function YG(){return"web"===lr.OS}function $G(){return"web"!==lr.OS}const XG="value";function qG(e,t){let n;t=t||1/0;const i=e.length;let r=null;const a=[];for(let o=0;o<i;++o){if(n=e.charCodeAt(o),n>55295&&n<57344){if(!r){if(n>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(o+1===i){(t-=3)>-1&&a.push(239,191,189);continue}r=n;continue}if(n<56320){(t-=3)>-1&&a.push(239,191,189),r=n;continue}n=65536+(r-55296<<10|n-56320)}else r&&(t-=3)>-1&&a.push(239,191,189);if(r=null,n<128){if((t-=1)<0)break;a.push(n)}else if(n<2048){if((t-=2)<0)break;a.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;a.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return a}const ZG=[],KG="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(let Qee=0,Jee=64;Qee<Jee;++Qee)ZG[Qee]=KG[Qee];function QG(e){return ZG[e>>18&63]+ZG[e>>12&63]+ZG[e>>6&63]+ZG[63&e]}function JG(e,t,n){let i;const r=[];for(let a=t;a<n;a+=3)i=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),r.push(QG(i));return r.join("")}var eW=function(t,n,i,r){return new(i||(i=Promise))(function(a,o){function s(t){try{u(r.next(t))}catch(e){o(e)}}function l(t){try{u(r.throw(t))}catch(e){o(e)}}function u(e){var t;e.done?a(e.value):(t=e.value,t instanceof i?t:new i(function(e){e(t)})).then(s,l)}u((r=r.apply(t,n||[])).next())})},tW=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]])}return n};const nW=!0===UG.RN$Bridgeless||null!=UG.__turboModuleProxy?zG.TurboModuleRegistry&&zG.TurboModuleRegistry.get("RNSentry"):nr.RNSentry,iW=qG("\n"),rW={fetchModules(){return eW(this,void 0,void 0,function*(){if(!this.enableNative)throw this._DisabledNativeError;if(!this._isModuleLoaded(nW))throw this._NativeClientError;const e=yield nW.fetchModules();return e?JSON.parse(e):null})},sendEnvelope(e){return eW(this,void 0,void 0,function*(){if(!this.enableNative)return void lU.warn("Event was skipped as native SDK is not enabled.");if(!this._isModuleLoaded(nW))throw this._NativeClientError;const[t,n]=e,i=qG(JSON.stringify(t));let r=new Uint8Array(i.length+iW.length);r.set(i),r.set(iW,i.length);let a=!1;for(const e of n){const[t,n]=this._processItem(e);let i,o;"string"==typeof n?(i="text/plain",o=qG(n)):n instanceof Uint8Array?(i="string"==typeof t.content_type?t.content_type:"application/octet-stream",o=n):(i="application/json",o=qG(JSON.stringify(n)),a||(a=GG(n))),t.content_type=i,t.length=o.length;const s=qG(JSON.stringify(t)),l=new Uint8Array(r.length+s.length+iW.length+o.length+iW.length);l.set(r),l.set(s,r.length),l.set(iW,r.length+s.length),l.set(o,r.length+s.length+iW.length),l.set(iW,r.length+s.length+iW.length+o.length),r=l}yield nW.captureEnvelope(function(e){let t;const n=e.length,i=n%3,r=[],a=16383;for(let o=0,s=n-i;o<s;o+=a)r.push(JG(e,o,o+a>s?s:o+a));return 1===i?(t=e[n-1],r.push(`${ZG[t>>2]+ZG[t<<4&63]}==`)):2===i&&(t=(e[n-2]<<8)+e[n-1],r.push(`${ZG[t>>10]+ZG[t>>4&63]+ZG[t<<2&63]}=`)),r.join("")}(r),{hardCrashed:a})})},initNativeSdk(e){return eW(this,void 0,void 0,function*(){const t=Object.assign({enableNative:!0,autoInitializeNativeSdk:!0},e);if(!t.enableNative)return t.enableNativeNagger&&lU.warn("Note: Native Sentry SDK is disabled."),this.enableNative=!1,!1;if(!t.autoInitializeNativeSdk)return t.enableNativeNagger&&lU.warn("Note: Native Sentry SDK was not initialized automatically, you will need to initialize it manually. If you wish to disable the native SDK and get rid of this warning, pass enableNative: false"),this.enableNative=!0,!1;if(!t.dsn)return lU.warn("Warning: No DSN was provided. The Sentry SDK will be disabled. Native SDK will also not be initalized."),this.enableNative=!1,!1;if(!this._isModuleLoaded(nW))throw this._NativeClientError;const{beforeSend:n,beforeBreadcrumb:i,beforeSendTransaction:r,integrations:a}=t,o=tW(t,["beforeSend","beforeBreadcrumb","beforeSendTransaction","integrations"]),s=yield nW.initNativeSdk(o);return this.nativeIsReady=s,this.enableNative=!0,s})},fetchNativeRelease(){return eW(this,void 0,void 0,function*(){if(!this.enableNative)throw this._DisabledNativeError;if(!this._isModuleLoaded(nW))throw this._NativeClientError;return nW.fetchNativeRelease()})},fetchNativeSdkInfo(){return eW(this,void 0,void 0,function*(){if(!this.enableNative)throw this._DisabledNativeError;if(!this._isModuleLoaded(nW))throw this._NativeClientError;return nW.fetchNativeSdkInfo()})},fetchNativeDeviceContexts(){return eW(this,void 0,void 0,function*(){if(!this.enableNative)throw this._DisabledNativeError;if(!this._isModuleLoaded(nW))throw this._NativeClientError;return nW.fetchNativeDeviceContexts()})},fetchNativeAppStart(){return eW(this,void 0,void 0,function*(){return this.enableNative?this._isModuleLoaded(nW)?nW.fetchNativeAppStart():(lU.error(this._NativeClientError),null):(lU.warn(this._DisabledNativeError),null)})},fetchNativeFrames(){return eW(this,void 0,void 0,function*(){if(!this.enableNative)throw this._DisabledNativeError;if(!this._isModuleLoaded(nW))throw this._NativeClientError;return nW.fetchNativeFrames()})},nativeCrash(){if(this.enableNative){if(!this._isModuleLoaded(nW))throw this._NativeClientError;nW.crash()}},setUser(e){if(!this.enableNative)return;if(!this._isModuleLoaded(nW))throw this._NativeClientError;let t=null,n=null;if(e){const{id:i,ip_address:r,email:a,username:o,segment:s}=e,l=tW(e,["id","ip_address","email","username","segment"]),u={id:i,ip_address:r,email:a,username:o,segment:s};t=this._serializeObject(u),n=this._serializeObject(l)}nW.setUser(t,n)},setTag(e,t){if(!this.enableNative)return;if(!this._isModuleLoaded(nW))throw this._NativeClientError;const n="string"==typeof t?t:JSON.stringify(t);nW.setTag(e,n)},setExtra(t,n){if(!this.enableNative)return;if(!this._isModuleLoaded(nW))throw this._NativeClientError;if("string"==typeof n)return nW.setExtra(t,n);if(void 0===n)return nW.setExtra(t,"undefined");let i;try{const e=EG(n);i=JSON.stringify(e)}catch(e){lU.error("Extra for key ${key} not passed to native SDK, because it contains non-stringifiable values",e)}return"string"==typeof i?nW.setExtra(t,i):nW.setExtra(t,"**non-stringifiable**")},addBreadcrumb(e){if(this.enableNative){if(!this._isModuleLoaded(nW))throw this._NativeClientError;nW.addBreadcrumb(Object.assign(Object.assign({},e),{level:e.level?this._processLevel(e.level):void 0}))}},clearBreadcrumbs(){if(this.enableNative){if(!this._isModuleLoaded(nW))throw this._NativeClientError;nW.clearBreadcrumbs()}},setContext(t,n){if(!this.enableNative)return;if(!this._isModuleLoaded(nW))throw this._NativeClientError;if(null===n)return nW.setContext(t,null);let i;try{i=function(e){const t=EG(e);return null===t||"object"!=typeof t||Array.isArray(t)||t.constructor!==Object?{[XG]:t}:t}(n)}catch(e){lU.error("Context for key ${key} not passed to native SDK, because it contains non-serializable values",e)}i?nW.setContext(t,i):nW.setContext(t,{error:"**non-serializable**"})},closeNativeSdk(){return eW(this,void 0,void 0,function*(){if(this.enableNative&&this._isModuleLoaded(nW))return nW.closeNativeSdk().then(()=>{this.enableNative=!1})})},disableNativeFramesTracking(){this.enableNative&&this._isModuleLoaded(nW)&&nW.disableNativeFramesTracking()},enableNativeFramesTracking(){this.enableNative&&this._isModuleLoaded(nW)&&nW.enableNativeFramesTracking()},isNativeAvailable(){return this._isModuleLoaded(nW)},captureScreenshot(){return eW(this,void 0,void 0,function*(){if(!this.enableNative)return lU.warn(this._DisabledNativeError),null;if(!this._isModuleLoaded(nW))return lU.error(this._NativeClientError),null;let t;try{t=yield nW.captureScreenshot()}catch(e){lU.warn("Failed to capture screenshot",e)}return t?t.map(e=>Object.assign(Object.assign({},e),{data:new Uint8Array(e.data)})):null})},fetchViewHierarchy(){return eW(this,void 0,void 0,function*(){if(!this.enableNative)throw this._DisabledNativeError;if(!this._isModuleLoaded(nW))throw this._NativeClientError;const e=yield nW.fetchViewHierarchy();return e?new Uint8Array(e):null})},startProfiling(e){if(!this.enableNative)throw this._DisabledNativeError;if(!this._isModuleLoaded(nW))throw this._NativeClientError;const{started:t,error:n}=nW.startProfiling(e);return t?lU.log("[NATIVE] Start Profiling"):lU.error("[NATIVE] Start Profiling Failed",n),!!t},stopProfiling(){if(!this.enableNative)throw this._DisabledNativeError;if(!this._isModuleLoaded(nW))throw this._NativeClientError;const{profile:t,nativeProfile:n,androidProfile:i,error:r}=nW.stopProfiling();if(!t||r)return lU.error("[NATIVE] Stop Profiling Failed",r),null;"ios"!==lr.OS||n||lU.warn("[NATIVE] Stop Profiling Failed: No Native Profile"),"android"!==lr.OS||i||lU.warn("[NATIVE] Stop Profiling Failed: No Android Profile");try{return{hermesProfile:JSON.parse(t),nativeProfile:n,androidProfile:i}}catch(e){return lU.error("[NATIVE] Failed to parse Hermes Profile JSON",e),null}},fetchNativePackageName(){return this.enableNative&&this._isModuleLoaded(nW)&&nW.fetchNativePackageName()||null},fetchNativeStackFramesBy(e){return this.enableNative&&this._isModuleLoaded(nW)&&nW.fetchNativeStackFramesBy(e)||null},initNativeReactNavigationNewFrameTracking(){return eW(this,void 0,void 0,function*(){if(this.enableNative&&this._isModuleLoaded(nW))return nW.initNativeReactNavigationNewFrameTracking()})},captureReplay(e){return eW(this,void 0,void 0,function*(){return this.enableNative?this._isModuleLoaded(nW)?(yield nW.captureReplay(e))||null:(lU.warn(`[NATIVE] \`${this.captureReplay.name}\` is not available when native is not available.`),Promise.resolve(null)):(lU.warn(`[NATIVE] \`${this.captureReplay.name}\` is not available when native is disabled.`),Promise.resolve(null))})},getCurrentReplayId(){return this.enableNative?this._isModuleLoaded(nW)?nW.getCurrentReplayId()||null:(lU.warn(`[NATIVE] \`${this.getCurrentReplayId.name}\` is not available when native is not available.`),null):(lU.warn(`[NATIVE] \`${this.getCurrentReplayId.name}\` is not available when native is disabled.`),null)},crashedLastRun(){return eW(this,void 0,void 0,function*(){if(!this.enableNative)return null;if(!this._isModuleLoaded(nW))return null;const e=yield nW.crashedLastRun();return"boolean"==typeof e?e:null})},getNewScreenTimeToDisplay(){return this.enableNative&&this._isModuleLoaded(nW)?nW.getNewScreenTimeToDisplay():Promise.resolve(null)},getDataFromUri(e){return eW(this,void 0,void 0,function*(){if(!this.enableNative||!this._isModuleLoaded(nW))return null;try{const t=yield nW.getDataFromUri(e);return new Uint8Array(t)}catch(t){return lU.error("Error:",t),null}})},popTimeToDisplayFor(e){if(!this.enableNative||!this._isModuleLoaded(nW))return Promise.resolve(null);try{return nW.popTimeToDisplayFor(e)}catch(t){return lU.error("Error:",t),null}},setActiveSpanId(e){if(this.enableNative&&this._isModuleLoaded(nW))try{nW.setActiveSpanId(e)}catch(t){return void lU.error("Error:",t)}},encodeToBase64(e){return eW(this,void 0,void 0,function*(){if(!this.enableNative||!this._isModuleLoaded(nW))return Promise.resolve(null);try{const t=Array.from(e);return(yield nW.encodeToBase64(t))||null}catch(t){return lU.error("Error:",t),Promise.resolve(null)}})},_processItem(e){const[t,n]=e;if("event"==t.type||"transaction"==t.type){const e=this._processLevels(n);return"android"===rW.platform&&"message"in e&&(e.message={message:e.message}),[t,e]}return e},_serializeObject(e){const t={};return Object.keys(e).forEach(n=>{const i=e[n];t[n]="string"==typeof i?i:JSON.stringify(i)}),t},_processLevels(e){var t;return Object.assign(Object.assign({},e),{level:e.level?this._processLevel(e.level):void 0,breadcrumbs:null===(t=e.breadcrumbs)||void 0===t?void 0:t.map(e=>Object.assign(Object.assign({},e),{level:e.level?this._processLevel(e.level):void 0}))})},_processLevel:e=>"log"==e?"debug":e,_isModuleLoaded:e=>!!e,_DisabledNativeError:new jG("Native is disabled"),_NativeClientError:new jG("Native Client is not available, can't start on native."),enableNative:!0,nativeIsReady:!1,platform:lr.OS};function aW(e){return eW(this,void 0,void 0,function*(){return rW.getDataFromUri(e)})}"android"===lr.OS||lr.OS;const oW="MobileFeedback",sW=(e={})=>{const{buttonOptions:t,screenshotButtonOptions:n,colorScheme:i,themeLight:r,themeDark:a}=e,o=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]])}return n}(e,["buttonOptions","screenshotButtonOptions","colorScheme","themeLight","themeDark"]);return{name:oW,options:o,buttonOptions:t||{},screenshotButtonOptions:n||{},colorScheme:i||"system",themeLight:r||{},themeDark:a||{}}},lW=()=>{var e;return null===(e=WU())||void 0===e?void 0:e.getIntegrationByName(oW)},uW="auto.interaction",cW="manual.interaction",dW=(e,t)=>{(function(e){return e===mG(e)})(t)&&function(e){return e instanceof RG}(t)?e.on("spanEnd",e=>{if(e!==t)return;hG(t).length<=1&&(lU.log(`Not sampling as ${oG(t).op} transaction has no child spans.`),t._sampled=!1)}):lU.warn("Not sampling childless spans only works for Sentry Transactions (Root Spans).")},hW=(e,{finalTimeout:t,idleTimeout:n})=>{const i=WU();if(!i)return lU.warn("[startIdleSpan] Can't create idle span, missing client."),new yG;if("background"===Tu.currentState)return lU.debug(`[startIdleSpan] App is already in background, not starting span for ${e.name}`),new yG;zU().setPropagationContext({traceId:TU(),spanId:OU()});const r=BG(e,{finalTimeout:t,idleTimeout:n});return((e,t)=>{const n=Tu.addEventListener("change",e=>{"background"===e&&(lU.debug(`Setting ${oG(t).op} transaction to cancelled because the app is in the background.`),t.setStatus({code:2,message:"cancelled"}),t.end())});n&&e.on("spanEnd",e=>{e===t&&(lU.debug(`Removing AppState listener for ${oG(t).op} transaction.`),n&&n.remove&&n.remove())})})(i,r),r};const mW="ReactNativeTracing";function pW(){const e=WU();if(e)return function(e){return e.getIntegrationByName(mW)}(e)}YG();const fW="UserInteraction",gW=e=>{const t=WU();if(!t)return;const n=pW();if(!n)return void lU.log(`[${fW}] Tracing integration is not available. Can not start user interaction span.`);const i=t.getOptions(),{elementId:r,op:a}=e;if(!i.enableUserInteractionTracing)return void lU.log(`[${fW}] User Interaction Tracing is disabled.`);if(!r)return void lU.log(`[${fW}] User Interaction Tracing can not create transaction with undefined elementId.`);if(!n.state.currentRoute)return void lU.log(`[${fW}] User Interaction Tracing can not create transaction without a current route.`);const o=pG(),s=o&&![uW,cW].includes(oG(o).origin);if(o&&s)return void lU.warn(`[${fW}] Did not create ${a} transaction because active transaction ${oG(o).description} exists on the scope.`);const l=`${n.state.currentRoute}.${r}`;if(o&&oG(o).description===l&&oG(o).op===a)return void lU.warn(`[${fW}] Did not create ${a} transaction because it the same transaction ${oG(o).description} already exists on the scope.`);const u=zU(),c={name:l,op:a,scope:u};!function(e){delete e._sentrySpan}(u);const d=hW(c,{idleTimeout:n.options.idleTimeoutMs,finalTimeout:n.options.finalTimeoutMs});return d.setAttribute(ZU,cW),dW(t,d),lU.log(`[${fW}] User Interaction Tracing Created ${a} transaction ${l}.`),d};new class{constructor({cleanupInterval:e=5e3,ttl:t=2e3}={}){this._ttl=t,this._map=new Map,this._cleanupIntervalMs=e,this.startCleanup()}set(e,t){if(this._cleanupInterval||this.startCleanup(),"object"!=typeof t||!("then"in t))return void this._map.set(e,{value:t,expiresAt:Date.now()+this._ttl,promise:null});const n={value:void 0,expiresAt:null,promise:t};this._map.set(e,n),t.then(e=>{n.value=e,n.expiresAt=Date.now()+this._ttl,n.promise=null},()=>{n.expiresAt=Date.now()+this._ttl,n.promise=null})}pop(e){const t=this.get(e);return this._map.delete(e),t}get(e){const t=this._map.get(e);if(t)return t.promise?t.promise:(t.expiresAt&&t.expiresAt<=Date.now()&&this._map.delete(e),t.value)}has(e){const t=this._map.get(e);return!!t&&(!!t.promise||(!(t.expiresAt&&t.expiresAt<=Date.now())||(this._map.delete(e),!1)))}ttl(e){const t=this._map.get(e);if(t&&t.expiresAt){const e=t.expiresAt-Date.now();return e>0?e:0}}cleanup(){const e=Date.now();for(const[t,n]of this._map.entries())n.expiresAt&&n.expiresAt<=e&&this._map.delete(t);this._map.size||this.stopCleanup()}clear(){clearInterval(this._cleanupInterval),this._map.clear()}stopCleanup(){clearInterval(this._cleanupInterval)}startCleanup(){this._cleanupInterval=setInterval(()=>this.cleanup(),this._cleanupIntervalMs)}}({ttl:6e4});const _W=(e,t)=>{YG()&&void 0!==UG.alert?UG.alert(`${e}\n${t}`):sr.alert(e,t)},vW={onFormOpen:()=>{},onFormClose:()=>{},onAddScreenshot:e=>{},onSubmitSuccess:()=>{},onSubmitError:()=>{},onFormSubmitted:()=>{},showBranding:!0,isEmailRequired:!1,shouldValidateEmail:!0,isNameRequired:!1,showEmail:!0,showName:!0,enableScreenshot:!1,enableTakeScreenshot:!1,cancelButtonLabel:"Cancel",emailLabel:"Email",emailPlaceholder:"your.email@example.org",formTitle:"Report a Bug",isRequiredLabel:"(required)",messageLabel:"Description",messagePlaceholder:"What's the bug? What did you expect?",nameLabel:"Name",namePlaceholder:"Your Name",submitButtonLabel:"Send Bug Report",errorTitle:"Error",formError:"Please fill out all required fields.",emailError:"Please enter a valid email address.",captureScreenshotError:"Error capturing screenshot. Please try again.",successMessageText:"Thank you for your report!",addScreenshotButtonLabel:"Add a screenshot",removeScreenshotButtonLabel:"Remove screenshot",captureScreenshotButtonLabel:"Take a screenshot",genericError:"Unable to send feedback due to an unexpected error."};function yW(){const e=(()=>{const e=lW();return e?e.colorScheme:"system"})(),t="system"===e?hu.getColorScheme():e,n=Object.assign(Object.assign({},bW),(()=>{const e=lW();return e?e.themeLight:{}})()),i=Object.assign(Object.assign({},wW),(()=>{const e=lW();return e?e.themeDark:{}})());return"dark"===t?i:n}const bW={accentBackground:"rgba(88, 74, 192, 1)",accentForeground:"#ffffff",foreground:"#2b2233",background:"#ffffff",border:"rgba(41, 35, 47, 0.13)",feedbackIcon:"rgba(54, 45, 89, 1)",sentryLogo:"rgba(54, 45, 89, 1)"},wW={accentBackground:"rgba(88, 74, 192, 1)",accentForeground:"#ffffff",foreground:"#ebe6ef",background:"#29232f",border:"rgba(235, 230, 239, 0.15)",feedbackIcon:"#ffffff",sentryLogo:"#ffffff"};const SW="AutoInjectMobileScreenshotButton";class kW{static get _feedbackComponentName(){throw new Error("Subclasses must override feedbackComponentName")}static initialize(e){this._setVisibility=e}static reset(){this._isVisible=!1,this._setVisibility=void 0}static show(){this._setVisibility?(this._isVisible=!0,this._setVisibility(!0)):console.warn(`[Sentry] ${this._feedbackComponentName} requires 'Sentry.wrap(RootComponent)' to be called before 'show${this._feedbackComponentName}()'.`)}static hide(){this._setVisibility?(this._isVisible=!1,this._setVisibility(!1)):console.warn(`[Sentry] ${this._feedbackComponentName} requires 'Sentry.wrap(RootComponent)' before interacting with the widget.`)}static isFormVisible(){return this._isVisible}}kW._isVisible=!1;class CW extends kW{static get _feedbackComponentName(){return"FeedbackButton"}}class EW extends kW{static get _feedbackComponentName(){return"ScreenshotButton"}}const xW=()=>{var e,t;YG()?lU.warn("ScreenshotButton is not supported on Web."):((null===(e=WU())||void 0===e?void 0:e.getIntegrationByName(SW))||null===(t=WU())||void 0===t||t.addIntegration({name:SW}),EW.show())};let IW;var TW=function(t,n,i,r){return new(i||(i=Promise))(function(n,a){function o(t){try{l(r.next(t))}catch(e){a(e)}}function s(t){try{l(r.throw(t))}catch(e){a(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i(function(e){e(t)})).then(o,s)}l((r=r.apply(t,[])).next())})};class OW extends M.Component{constructor(e){var t,n,i,r,a,o;super(e),this._didSubmitForm=!1,this.handleFeedbackSubmit=()=>{const{name:e,email:t,description:n}=this.state,{onSubmitSuccess:i,onSubmitError:r,onFormSubmitted:a}=this.props,o=this.props,s=null==e?void 0:e.trim(),l=null==t?void 0:t.trim(),u=null==n?void 0:n.trim();if(this.props.isNameRequired&&!s||this.props.isEmailRequired&&!l||!u)return void _W(o.errorTitle,o.formError);if(this.props.shouldValidateEmail&&(this.props.isEmailRequired||l.length>0)&&!(e=>/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(e))(l))return void _W(o.errorTitle,o.emailError);const c=this.state.filename&&this.state.attachment?[{filename:this.state.filename,data:this.state.attachment}]:void 0,d={message:u,name:s,email:l,associatedEventId:UU().lastEventId()};try{a||this.setState({isVisible:!1}),function(e,t={},n=zU()){const{message:i,name:r,email:a,url:o,source:s,associatedEventId:l,tags:u}=e,c={contexts:{feedback:kU({contact_email:a,name:r,message:i,url:o,source:s,associated_event_id:l})},type:"feedback",level:"info",tags:u},d=n&&n.getClient()||WU();d&&d.emit("beforeSendFeedback",c,t),n.captureEvent(c,t)}(d,c?{attachments:c}:void 0),i({name:s,email:l,message:u,attachments:c}),_W(o.successMessageText,""),a(),this._didSubmitForm=!0}catch(h){r(new Error(`Feedback form submission failed: ${h}`)),_W(o.errorTitle,o.genericError),lU.error(`Feedback form submission failed: ${h}`)}},this.onScreenshotButtonPress=()=>TW(this,0,void 0,function*(){if(this._hasScreenshot())this.setState({filename:void 0,attachment:void 0,attachmentUri:void 0});else{const e=this.props;if(e.imagePicker){const t=e.imagePicker.launchImageLibraryAsync?()=>e.imagePicker.launchImageLibraryAsync({mediaTypes:["images"],base64:YG()}):e.imagePicker.launchImageLibrary?()=>e.imagePicker.launchImageLibrary({mediaType:"photo",includeBase64:YG()}):null;if(!t)return void lU.warn("No compatible image picker library found. Please provide a valid image picker library.");const n=yield t();if(n.assets&&n.assets.length>0)if(YG()){const e=n.assets[0].fileName,t=n.assets[0].uri,i=(e=>{if("function"!=typeof atob||!YG())throw new Error("atob is not available in this environment.");const t=atob(e);return new Uint8Array([...t].map(e=>e.charCodeAt(0)))})(n.assets[0].base64);null!=i?this.setState({filename:e,attachment:i,attachmentUri:t}):lU.error("Failed to read image data on the web")}else{const e=n.assets[0].fileName,t=n.assets[0].uri;aW(t).then(n=>{null!=n?this.setState({filename:e,attachment:n,attachmentUri:t}):(this._showImageRetrievalDevelopmentNote(),lU.error("Failed to read image data from uri:",t))}).catch(e=>{this._showImageRetrievalDevelopmentNote(),lU.error("Failed to read image data from uri:",t,"error: ",e)})}}else{const{onAddScreenshot:e}=Object.assign(Object.assign({},vW),this.props);e(e=>{aW(e).then(t=>{null!=t?this.setState({filename:"feedback_screenshot",attachment:t,attachmentUri:e}):(this._showImageRetrievalDevelopmentNote(),lU.error("Failed to read image data from uri:",e))}).catch(t=>{this._showImageRetrievalDevelopmentNote(),lU.error("Failed to read image data from uri:",e,"error: ",t)})})}}}),this._setCapturedScreenshot=e=>{null!=e.data?(lU.debug("Setting captured screenshot:",e.filename),rW.encodeToBase64(e.data).then(t=>{if(null!=t){const n=`data:${e.contentType};base64,${t}`;this.setState({filename:e.filename,attachment:e.data,attachmentUri:n})}else lU.error("Failed to read image data from:",e.filename)}).catch(t=>{lU.error("Failed to read image data from:",e.filename,"error: ",t)})):lU.error("Failed to read image data from:",e.filename)},this._saveFormState=()=>{OW._savedState=Object.assign({},this.state)},this._clearFormState=()=>{OW._savedState={name:"",email:"",description:"",filename:void 0,attachment:void 0,attachmentUri:void 0}},this._hasScreenshot=()=>void 0!==this.state.filename&&void 0!==this.state.attachment&&void 0!==this.state.attachmentUri,this._getUser=()=>{const e=zU().getUser();if(e)return e;const t=UU().getUser();return t||iU("globalScope",()=>new DU).getUser()},this._showImageRetrievalDevelopmentNote=()=>{WG()&&_W("Development note","The feedback widget cannot retrieve image data in Expo Go. Please build your app to test this functionality.")};const s={useSentryUser:{email:(null===(n=null===(t=this.props)||void 0===t?void 0:t.useSentryUser)||void 0===n?void 0:n.email)||(null===(i=this._getUser())||void 0===i?void 0:i.email)||"",name:(null===(a=null===(r=this.props)||void 0===r?void 0:r.useSentryUser)||void 0===a?void 0:a.name)||(null===(o=this._getUser())||void 0===o?void 0:o.name)||""}};this.state={isVisible:!0,name:OW._savedState.name||s.useSentryUser.name,email:OW._savedState.email||s.useSentryUser.email,description:OW._savedState.description||"",filename:OW._savedState.filename||void 0,attachment:OW._savedState.attachment||void 0,attachmentUri:OW._savedState.attachmentUri||void 0},function(){var e,t;(null===(e=WU())||void 0===e?void 0:e.getIntegrationByName(oW))||null===(t=WU())||void 0===t||t.addIntegration(sW())}()}static reset(){OW._savedState={name:"",email:"",description:"",filename:void 0,attachment:void 0,attachmentUri:void 0}}componentDidMount(){this._themeListener=hu.addChangeListener(()=>{this.forceUpdate()})}componentWillUnmount(){this._didSubmitForm?(this._clearFormState(),this._didSubmitForm=!1):this._saveFormState(),this._themeListener&&this._themeListener.remove()}render(){const e=yW(),{name:t,email:n,description:i}=this.state,{onFormClose:r}=this.props,a=this.props,o=this.props,s=this.props,l=Object.assign(Object.assign({},(e=>({container:{flex:1,padding:20,backgroundColor:e.background},title:{fontSize:24,fontWeight:"bold",marginBottom:20,textAlign:"left",flex:1,color:e.foreground},label:{marginBottom:4,fontSize:16,color:e.foreground},input:{height:50,borderColor:e.border,borderWidth:1,borderRadius:5,paddingHorizontal:10,marginBottom:15,fontSize:16,color:e.foreground},textArea:{height:100,textAlignVertical:"top",color:e.foreground},screenshotButton:{backgroundColor:e.background,padding:15,borderRadius:5,alignItems:"center",flex:1,borderWidth:1,borderColor:e.border},screenshotContainer:{flexDirection:"row",alignItems:"center",width:"100%",marginBottom:20},screenshotThumbnail:{width:50,height:50,borderRadius:5,marginRight:10},screenshotText:{color:e.foreground,fontSize:16},takeScreenshotButton:{backgroundColor:e.background,padding:15,borderRadius:5,alignItems:"center",borderWidth:1,borderColor:e.border,marginTop:-10,marginBottom:20},takeScreenshotText:{color:e.foreground,fontSize:16},submitButton:{backgroundColor:e.accentBackground,paddingVertical:15,borderRadius:5,alignItems:"center",marginBottom:10},submitText:{color:e.accentForeground,fontSize:18},cancelButton:{backgroundColor:e.background,padding:15,borderRadius:5,alignItems:"center",borderWidth:1,borderColor:e.border},cancelText:{color:e.foreground,fontSize:16},titleContainer:{flexDirection:"row",width:"100%"},sentryLogo:{width:40,height:40,tintColor:e.sentryLogo}}))(e)),this.props.styles),u=()=>{r?r():this.setState({isVisible:!1})};if(!this.state.isVisible)return null;const c=(()=>{const e=IW;return IW=void 0,e})();return"ErrorCapturingScreenshot"===c?setTimeout(()=>TW(this,0,void 0,function*(){_W(s.errorTitle,s.captureScreenshotError)}),100):c&&this._setCapturedScreenshot(c),M.createElement(fm,{onPress:$G()?Pu.dismiss:void 0,accessible:!1,accessibilityElementsHidden:!1},M.createElement(ga,{style:l.container},M.createElement(ga,{style:l.titleContainer},M.createElement(hl,{style:l.title,testID:"sentry-feedback-form-title"},s.formTitle),a.showBranding&&M.createElement(Js,{source:{uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAAC4BAMAAABUVL5sAAAAD1BMVEUAAAA2Llo3LVk4LFg2LVmgcvrUAAAABHRSTlMAgL9ARyeO/QAAA7pJREFUeNrtWltynDAQFBIHIFUcgCQ6AIk5AAjd/0ypxFk3ouUCNJofl/rHy75a09MzI7Q2DQ0NDQ0NDQ0NDQ0N9eF+xPh9MKpwPv6FLss7R9yMImz8j8nowb9IglFDF6N+KCNIdqMFcGjpBbVUXdzHqKsXUhJGNb2g1vz6azRgX8XulUwMtVZjFsWkvFz10s0ooEO+9Vpxj/6rp9eI5VsdE6eJcDCxilqICiZWMHBSMkBVA2vq1SVrVyr6Ea5VMjHqjytTwcAgRVJ0DAy9VoWUTNT3tQysZGIYmGNTKHfK0q6oFkysYWCuHB0DaxX9yHLx5JKrhVC0TGwjWNRMvNAuW6PoR4TCepnqLLuiicEyKJq4g2C6Rc+hsInlgtHCF41OrD65INisObksbKy2/YJg9U08sGBTbRN3YaBQQu2i74/mcQil6vZr5C0dQpGbGKJvdOA1VDVxd5LHooPR5BJPdwql5vaLeq9FQZKJpa1kOoUSKpq45+m+ZK93aUpSwRyuafslUguCIZRZamKoBYQT80QmlqnF38p6bSIDcyg2q5fw/uo8dx0upZMLLdadQ1kgkNDEOOGiYYXjVKGJ8V00rEggcErurxAKCwQTi9RCAW7UFcUm5vPAOFNXFBY9DggQyp76jnIkOyBwaeqtyMScEu7w4JRNLnyQOjyvACcWpR145g6PV1fp9mvE0jMd3tWZXDR3/Ud2cSXZfmHhvNpEoFlgYsjFHX4AJc3kXXSTyEfDTrz94ptE1qvS9ouG1Ud2sQT5PVcHg3FL78FIYUpqxWK1yLzMxNzhHVaLzItMzB0eB/S4CDRHC+AzFTjhAiSSHx9tpgJXqnmhXi7VizM/F5v4V5oVqOIp81PpEW4Xt7PUA0kEe5WZ2PLt7ZopDg8Seue9GpxoU0WrHyFPgYlzmyrKPDxcpFeX3YRS5mGvxybmsC2tPhLJQxPzdsfliwMeLjAx9wcujoFIaEAX/KSYXz0s+9TE/E7LX0yF8lQvitl99sVjSgITl/yk6Lk48JjfGadnanHml8xjMvFTA+eL42CRwDKEZwbm4rBMyAmdH6UEz8HDTPj4d4ie1EJxJCQg56DXaxKOl0iGz0jcdebZluzhbFSA1yEZ2JzbHZKQe3I/EK4CErTHbwn84ZP+8Poxqrd/+I2cXJAw0v9VAkBiI3DhLryZEe6SXNeJk5HcHFu+Aom5wiIn2a7niZiE1WKMUhIOhNFJSQZzh0VG8tPcQufLSQI46sO9vcM0NDQ0NDQ0NDQ0NHxF/AFGJOBYBWrb5gAAAABJRU5ErkJggg=="},style:l.sentryLogo,testID:"sentry-logo"})),a.showName&&M.createElement(M.Fragment,null,M.createElement(hl,{style:l.label},s.nameLabel,a.isNameRequired&&` ${s.isRequiredLabel}`),M.createElement(kh,{style:l.input,testID:"sentry-feedback-name-input",placeholder:s.namePlaceholder,value:t,onChangeText:e=>this.setState({name:e})})),a.showEmail&&M.createElement(M.Fragment,null,M.createElement(hl,{style:l.label},s.emailLabel,a.isEmailRequired&&` ${s.isRequiredLabel}`),M.createElement(kh,{style:l.input,testID:"sentry-feedback-email-input",placeholder:s.emailPlaceholder,keyboardType:"email-address",value:n,onChangeText:e=>this.setState({email:e})})),M.createElement(hl,{style:l.label},s.messageLabel,` ${s.isRequiredLabel}`),M.createElement(kh,{style:[l.input,l.textArea],testID:"sentry-feedback-message-input",placeholder:s.messagePlaceholder,value:i,onChangeText:e=>this.setState({description:e}),multiline:!0}),(a.enableScreenshot||o.imagePicker||this._hasScreenshot())&&M.createElement(ga,{style:l.screenshotContainer},this.state.attachmentUri&&M.createElement(Js,{source:{uri:this.state.attachmentUri},style:l.screenshotThumbnail}),M.createElement(Ic,{style:l.screenshotButton,onPress:this.onScreenshotButtonPress},M.createElement(hl,{style:l.screenshotText},this._hasScreenshot()?s.removeScreenshotButtonLabel:s.addScreenshotButtonLabel))),$G()&&a.enableTakeScreenshot&&!this.state.attachmentUri&&M.createElement(Ic,{style:l.takeScreenshotButton,onPress:()=>{CW.hide(),u(),xW()}},M.createElement(hl,{style:l.takeScreenshotText,testID:"sentry-feedback-take-screenshot-button"},s.captureScreenshotButtonLabel)),M.createElement(Ic,{style:l.submitButton,onPress:this.handleFeedbackSubmit},M.createElement(hl,{style:l.submitText,testID:"sentry-feedback-submit-button"},s.submitButtonLabel)),M.createElement(Ic,{style:l.cancelButton,onPress:u},M.createElement(hl,{style:l.cancelText},s.cancelButtonLabel))))}}OW.defaultProps=Object.assign({},vW),OW._savedState={name:"",email:"",description:"",filename:void 0,attachment:void 0,attachmentUri:void 0},function(){var e;const{major:t,minor:n}=(null===(e=zG.ReactNativeVersion)||void 0===e?void 0:e.version)||{}}();tr.hasViewManagerConfig&&tr.hasViewManagerConfig("RNSentryOnDrawReporter");const RW=Ei.create({wrapperView:{flex:1}}),AW="sentry-label",LW="data-sentry-component",PW="data-sentry-element",MW="data-sentry-source-file";class DW extends M.Component{constructor(){super(...arguments),this.name="TouchEventBoundary"}componentDidMount(){var e;const t=WU();null===(e=null==t?void 0:t.addIntegration)||void 0===e||e.call(t,function(e,t=()=>{}){return{name:e,setupOnce:t}}(this.name))}render(){return M.createElement(ga,{style:RW.wrapperView,onTouchStart:this._onTouchStart.bind(this)},this.props.children)}_logTouchEvent(e,t){const n=e[0],i=t||`${n.name}${n.file?` (${n.file})`:""}`,r={category:this.props.breadcrumbCategory,data:{path:e},level:"info",message:`Touch event within element: ${i}`,type:this.props.breadcrumbType};HG(r),lU.log(`[TouchEvents] ${r.message}`)}_isNameIgnored(e){let t=this.props.ignoreNames||[];return this.props.ignoredDisplayNames&&(t=[...t,...this.props.ignoredDisplayNames]),t.some(t=>"string"==typeof t&&e===t||t instanceof RegExp&&e.match(t))}_onTouchStart(e){var t,n;if(!e._targetInst)return;let i=e._targetInst;const r=[];for(;i&&this.props.maxComponentTreeSize&&r.length<this.props.maxComponentTreeSize&&(null===(t=i.elementType)||void 0===t?void 0:t.displayName)!==DW.displayName;){const e=NW(i,this.props.labelName);this._pushIfNotIgnored(r,e),i=i.return}const a=null===(n=r.find(e=>e.label))||void 0===n?void 0:n.label;r.length>0&&this._logTouchEvent(r,a);const o=gW({elementId:a,op:"ui.action.touch"});o&&o.setAttribute(ZU,uW)}_pushIfNotIgnored(e,t){return!!t&&(!(!t.name&&!t.label)&&((!t.name||!this._isNameIgnored(t.name))&&((!t.label||!this._isNameIgnored(t.label))&&(!(e.length>0&&JSON.stringify(e[e.length-1])===JSON.stringify(t))&&(e.push(t),!0)))))}}function NW(e,t){var n;const i=null===(n=e.elementType)||void 0===n?void 0:n.displayName,r=e.memoizedProps;return r?kU({name:FW(r)||i,element:BW(r),file:jW(r),label:VW(r,t)}):i?{name:i}:void 0}function FW(e){return"string"==typeof e[LW]&&e[LW].length>0&&"unknown"!==e[LW]&&e[LW]||void 0}function BW(e){return"string"==typeof e[PW]&&e[PW].length>0&&"unknown"!==e[PW]&&e[PW]||void 0}function jW(e){return"string"==typeof e[MW]&&e[MW].length>0&&"unknown"!==e[MW]&&e[MW]||void 0}function VW(e,t){return"string"==typeof e[AW]&&e[AW].length>0?e[AW]:"string"==typeof t&&"string"==typeof e[t]&&e[t].length>0?e[t]:void 0}function HW(e){return Array.isArray(e)||tN(e)}function zW(e,t){const n=HW(e),i=HW(t);if(n!==i)throw HG({data:{incoming:e,schema:t,isArrayIncoming:n,isArraySchema:i},message:"TypeGuard isArray"}),new Error(`PersistenceUtils::typeGuard] ${Jz.MalformedDataError}`);if(n)for(const r of e)zW(r,t[0]);return WW(t)&&Object.keys(t).forEach(n=>{const i=e[n],r=t[n];if(i&&HW(r))zW(i,r);else if(i&&WW(i))zW(i,r);else if(WW(e)&&!e.hasOwnProperty(n))throw HG({data:{key:n,incoming:e,incomingProperty:i,schema:t,schemaProperty:r,isObjectIncoming:WW(e),hasOwnPropertyIncoming:e.hasOwnProperty(n)},message:"TypeGuard isObject"}),new Error(`[PersistenceUtils::typeGuard] ${Jz.MalformedDataError}`)}),!0}DW.displayName="__Sentry.TouchEventBoundary",DW.defaultProps={breadcrumbCategory:"touch",breadcrumbType:"user",ignoreNames:[],maxComponentTreeSize:20};const UW=/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z/;function GW(e){if(HW(e))for(let t=0;t<e.length;t++)e[t]=GW(e[t]);else if(WW(e))for(const t of Object.keys(e)){const n=e[t];"object"==typeof n?e[t]=GW(n):"string"==typeof n&&UW.exec(n)&&(e[t]=new Date(n))}return e}function WW(e){return null!=e&&"object"==typeof e&&!HW(e)}class YW{storageName;schema;constructor(e,t){this.storageName=`${e}Storage`,this.schema=JSON.parse(JSON.stringify(t))}get(){const e=qj.getString(this.storageName),t=this.instantiateData(e);return this.isT(t),t}update(e){const t=JSON.parse(JSON.stringify(e)),n=Object.assign(this.get(),t);return this.isT(n),qj.set(this.storageName,JSON.stringify(n)),n}set(e){return this.isT(e),qj.set(this.storageName,JSON.stringify(e)),e}clear(){return qj.delete(this.storageName),this.instantiateData(void 0)}instantiateData(e){const t=e??JSON.stringify(this.schema);return qj.set(this.storageName,t),JSON.parse(t)}isT(e){if(!e||"object"!=typeof e)throw new Error(`[PersistenceManager::isT] ${Jz.IncorrectDataError}`);return zW(e,this.schema),!0}}class $W{persistenceManager;schema;data;constructor(e,t){this.schema=JSON.parse(JSON.stringify(t)),this.data=JSON.parse(JSON.stringify(t)),this.persistenceManager=new YW(e,t),this.createDataFromSchema(),this.restore()}get(){return this.data}set(e){return this.data=JSON.parse(JSON.stringify(e)),this.data=GW(this.data),this.data}update(e){if(HW(this.data)){const n=this.data.findIndex(t=>t.uuid===e.uuid);if(-1!==n)this.data[n]={...this.data[n],...e};else try{zW([e],this.schema),this.data.push(e)}catch(t){if(t.message===Jz.MalformedDataError)throw new Error("[DataManager::update] Cannot add an element that does not contain required fields");throw t}}else Object.assign(this.data,e);return this.data}save(e=!0){return e?this.persistenceManager.update(this.data):this.persistenceManager.set(this.data)}restore(){if(this.data=this.persistenceManager.get(),this.data=GW(this.data),HW(this.data)){const e=e=>e.filter(e=>!!e.uuid);this.data=e(this.data)}return this.data}clear=()=>(this.persistenceManager.clear(),this.createDataFromSchema(),this.data);createDataFromSchema(){this.data=HW(this.schema)?[]:JSON.parse(JSON.stringify(this.schema))}}const XW=new class extends $W{migrateData(){throw new Error("[TrackingManager::migrateData] Method purposefully not implemented.")}constructor(){super("trackingEvent",[])}update(e){return super.update(e)}sync=async()=>{const e=super.get(),t=[];for(const n of e)try{await Qz(n)}catch{t.push(n)}super.set(t),super.save(!1)}},qW=6048e5,ZW=6e4,KW=36e5,QW=Symbol.for("constructDateFrom");function JW(e,t){return"function"==typeof e?e(t):e&&"object"==typeof e&&QW in e?e[QW](t):e instanceof Date?new e.constructor(t):new Date(t)}function eY(e,t){return JW(t||e,e)}function tY(e,t,n){const i=eY(e,n?.in);return isNaN(t)?JW(n?.in||e,NaN):t?(i.setDate(i.getDate()+t),i):i}function nY(e,t,n){const i=eY(e,n?.in);if(isNaN(t))return JW(e,NaN);if(!t)return i;const r=i.getDate(),a=JW(e,i.getTime());a.setMonth(i.getMonth()+t+1,0);return r>=a.getDate()?a:(i.setFullYear(a.getFullYear(),a.getMonth(),r),i)}function iY(e,t,n){return function(e,t){return JW(e,+eY(e)+t)}(e,t*KW)}let rY={};function aY(){return rY}function oY(e,t){const n=aY(),i=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,r=eY(e,t?.in),a=r.getDay(),o=(a<i?7:0)+a-i;return r.setDate(r.getDate()-o),r.setHours(0,0,0,0),r}function sY(e,t){return oY(e,{...t,weekStartsOn:1})}function lY(e,t){const n=eY(e,t?.in),i=n.getFullYear(),r=JW(n,0);r.setFullYear(i+1,0,4),r.setHours(0,0,0,0);const a=sY(r),o=JW(n,0);o.setFullYear(i,0,4),o.setHours(0,0,0,0);const s=sY(o);return n.getTime()>=a.getTime()?i+1:n.getTime()>=s.getTime()?i:i-1}function uY(e){const t=eY(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function cY(e,...t){const n=JW.bind(null,e||t.find(e=>"object"==typeof e));return t.map(n)}function dY(e,t){const n=eY(e,t?.in);return n.setHours(0,0,0,0),n}function hY(e,t,n){const i=eY(e,n?.in);return i.setTime(i.getTime()+t*ZW),i}function mY(e){return!(!((t=e)instanceof Date||"object"==typeof t&&"[object Date]"===Object.prototype.toString.call(t))&&"number"!=typeof e||isNaN(+eY(e)));var t}function pY(e,t,n){const i=(r=t,(+eY(e)-+eY(r))/ZW);var r,a;return(a=n?.roundingMethod,e=>{const t=(a?Math[a]:Math.trunc)(e);return 0===t?0:t})(i)}const fY={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},gY=(e,t,n)=>{let i;const r=fY[e];return i="string"==typeof r?r:1===t?r.one:r.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+i:i+" ago":i};function _Y(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const vY={date:_Y({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:_Y({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:_Y({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},yY={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},bY=(e,t,n,i)=>yY[e];function wY(e){return(t,n)=>{let i;if("formatting"===(n?.context?String(n.context):"standalone")&&e.formattingValues){const t=e.defaultFormattingWidth||e.defaultWidth,r=n?.width?String(n.width):t;i=e.formattingValues[r]||e.formattingValues[t]}else{const t=e.defaultWidth,r=n?.width?String(n.width):e.defaultWidth;i=e.values[r]||e.values[t]}return i[e.argumentCallback?e.argumentCallback(t):t]}}const SY={ordinalNumber:(e,t)=>{const n=Number(e),i=n%100;if(i>20||i<10)switch(i%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:wY({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:wY({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:wY({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:wY({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:wY({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})};function kY(e){return(t,n={})=>{const i=n.width,r=i&&e.matchPatterns[i]||e.matchPatterns[e.defaultMatchWidth],a=t.match(r);if(!a)return null;const o=a[0],s=i&&e.parsePatterns[i]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?function(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n;return}(s,e=>e.test(o)):function(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n;return}(s,e=>e.test(o));let u;u=e.valueCallback?e.valueCallback(l):l,u=n.valueCallback?n.valueCallback(u):u;return{value:u,rest:t.slice(o.length)}}}function CY(e){return(t,n={})=>{const i=t.match(e.matchPattern);if(!i)return null;const r=i[0],a=t.match(e.parsePattern);if(!a)return null;let o=e.valueCallback?e.valueCallback(a[0]):a[0];o=n.valueCallback?n.valueCallback(o):o;return{value:o,rest:t.slice(r.length)}}}const EY={ordinalNumber:CY({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:kY({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:kY({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:kY({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:kY({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:kY({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},xY={code:"en-US",formatDistance:gY,formatLong:vY,formatRelative:bY,localize:SY,match:EY,options:{weekStartsOn:0,firstWeekContainsDate:1}};function IY(e,t){const n=eY(e,t?.in),i=function(e,t,n){const[i,r]=cY(n?.in,e,t),a=dY(i),o=dY(r),s=+a-uY(a),l=+o-uY(o);return Math.round((s-l)/864e5)}(n,function(e,t){const n=eY(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}(n));return i+1}function TY(e,t){const n=eY(e,t?.in),i=+sY(n)-+function(e,t){const n=lY(e,t),i=JW(e,0);return i.setFullYear(n,0,4),i.setHours(0,0,0,0),sY(i)}(n);return Math.round(i/qW)+1}function OY(e,t){const n=eY(e,t?.in),i=n.getFullYear(),r=aY(),a=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,o=JW(t?.in||e,0);o.setFullYear(i+1,0,a),o.setHours(0,0,0,0);const s=oY(o,t),l=JW(t?.in||e,0);l.setFullYear(i,0,a),l.setHours(0,0,0,0);const u=oY(l,t);return+n>=+s?i+1:+n>=+u?i:i-1}function RY(e,t){const n=eY(e,t?.in),i=+oY(n,t)-+function(e,t){const n=aY(),i=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,r=OY(e,t),a=JW(t?.in||e,0);return a.setFullYear(r,0,i),a.setHours(0,0,0,0),oY(a,t)}(n,t);return Math.round(i/qW)+1}function AY(e,t){return(e<0?"-":"")+Math.abs(e).toString().padStart(t,"0")}const LY={y(e,t){const n=e.getFullYear(),i=n>0?n:1-n;return AY("yy"===t?i%100:i,t.length)},M(e,t){const n=e.getMonth();return"M"===t?String(n+1):AY(n+1,2)},d:(e,t)=>AY(e.getDate(),t.length),a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return"am"===n?"a.m.":"p.m."}},h:(e,t)=>AY(e.getHours()%12||12,t.length),H:(e,t)=>AY(e.getHours(),t.length),m:(e,t)=>AY(e.getMinutes(),t.length),s:(e,t)=>AY(e.getSeconds(),t.length),S(e,t){const n=t.length,i=e.getMilliseconds();return AY(Math.trunc(i*Math.pow(10,n-3)),t.length)}},PY="midnight",MY="noon",DY="morning",NY="afternoon",FY="evening",BY="night",jY={G:function(e,t,n){const i=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(i,{width:"abbreviated"});case"GGGGG":return n.era(i,{width:"narrow"});default:return n.era(i,{width:"wide"})}},y:function(e,t,n){if("yo"===t){const t=e.getFullYear(),i=t>0?t:1-t;return n.ordinalNumber(i,{unit:"year"})}return LY.y(e,t)},Y:function(e,t,n,i){const r=OY(e,i),a=r>0?r:1-r;if("YY"===t){return AY(a%100,2)}return"Yo"===t?n.ordinalNumber(a,{unit:"year"}):AY(a,t.length)},R:function(e,t){return AY(lY(e),t.length)},u:function(e,t){return AY(e.getFullYear(),t.length)},Q:function(e,t,n){const i=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(i);case"QQ":return AY(i,2);case"Qo":return n.ordinalNumber(i,{unit:"quarter"});case"QQQ":return n.quarter(i,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(i,{width:"narrow",context:"formatting"});default:return n.quarter(i,{width:"wide",context:"formatting"})}},q:function(e,t,n){const i=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(i);case"qq":return AY(i,2);case"qo":return n.ordinalNumber(i,{unit:"quarter"});case"qqq":return n.quarter(i,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(i,{width:"narrow",context:"standalone"});default:return n.quarter(i,{width:"wide",context:"standalone"})}},M:function(e,t,n){const i=e.getMonth();switch(t){case"M":case"MM":return LY.M(e,t);case"Mo":return n.ordinalNumber(i+1,{unit:"month"});case"MMM":return n.month(i,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(i,{width:"narrow",context:"formatting"});default:return n.month(i,{width:"wide",context:"formatting"})}},L:function(e,t,n){const i=e.getMonth();switch(t){case"L":return String(i+1);case"LL":return AY(i+1,2);case"Lo":return n.ordinalNumber(i+1,{unit:"month"});case"LLL":return n.month(i,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(i,{width:"narrow",context:"standalone"});default:return n.month(i,{width:"wide",context:"standalone"})}},w:function(e,t,n,i){const r=RY(e,i);return"wo"===t?n.ordinalNumber(r,{unit:"week"}):AY(r,t.length)},I:function(e,t,n){const i=TY(e);return"Io"===t?n.ordinalNumber(i,{unit:"week"}):AY(i,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getDate(),{unit:"date"}):LY.d(e,t)},D:function(e,t,n){const i=IY(e);return"Do"===t?n.ordinalNumber(i,{unit:"dayOfYear"}):AY(i,t.length)},E:function(e,t,n){const i=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(i,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(i,{width:"short",context:"formatting"});default:return n.day(i,{width:"wide",context:"formatting"})}},e:function(e,t,n,i){const r=e.getDay(),a=(r-i.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return AY(a,2);case"eo":return n.ordinalNumber(a,{unit:"day"});case"eee":return n.day(r,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(r,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},c:function(e,t,n,i){const r=e.getDay(),a=(r-i.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return AY(a,t.length);case"co":return n.ordinalNumber(a,{unit:"day"});case"ccc":return n.day(r,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(r,{width:"narrow",context:"standalone"});case"cccccc":return n.day(r,{width:"short",context:"standalone"});default:return n.day(r,{width:"wide",context:"standalone"})}},i:function(e,t,n){const i=e.getDay(),r=0===i?7:i;switch(t){case"i":return String(r);case"ii":return AY(r,t.length);case"io":return n.ordinalNumber(r,{unit:"day"});case"iii":return n.day(i,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(i,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(i,{width:"short",context:"formatting"});default:return n.day(i,{width:"wide",context:"formatting"})}},a:function(e,t,n){const i=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(i,{width:"narrow",context:"formatting"});default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(e,t,n){const i=e.getHours();let r;switch(r=12===i?MY:0===i?PY:i/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(e,t,n){const i=e.getHours();let r;switch(r=i>=17?FY:i>=12?NY:i>=4?DY:BY,t){case"B":case"BB":case"BBB":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){let t=e.getHours()%12;return 0===t&&(t=12),n.ordinalNumber(t,{unit:"hour"})}return LY.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getHours(),{unit:"hour"}):LY.H(e,t)},K:function(e,t,n){const i=e.getHours()%12;return"Ko"===t?n.ordinalNumber(i,{unit:"hour"}):AY(i,t.length)},k:function(e,t,n){let i=e.getHours();return 0===i&&(i=24),"ko"===t?n.ordinalNumber(i,{unit:"hour"}):AY(i,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):LY.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getSeconds(),{unit:"second"}):LY.s(e,t)},S:function(e,t){return LY.S(e,t)},X:function(e,t,n){const i=e.getTimezoneOffset();if(0===i)return"Z";switch(t){case"X":return HY(i);case"XXXX":case"XX":return zY(i);default:return zY(i,":")}},x:function(e,t,n){const i=e.getTimezoneOffset();switch(t){case"x":return HY(i);case"xxxx":case"xx":return zY(i);default:return zY(i,":")}},O:function(e,t,n){const i=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+VY(i,":");default:return"GMT"+zY(i,":")}},z:function(e,t,n){const i=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+VY(i,":");default:return"GMT"+zY(i,":")}},t:function(e,t,n){return AY(Math.trunc(+e/1e3),t.length)},T:function(e,t,n){return AY(+e,t.length)}};function VY(e,t=""){const n=e>0?"-":"+",i=Math.abs(e),r=Math.trunc(i/60),a=i%60;return 0===a?n+String(r):n+String(r)+t+AY(a,2)}function HY(e,t){if(e%60==0){return(e>0?"-":"+")+AY(Math.abs(e)/60,2)}return zY(e,t)}function zY(e,t=""){const n=e>0?"-":"+",i=Math.abs(e);return n+AY(Math.trunc(i/60),2)+t+AY(i%60,2)}const UY=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},GY=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},WY={p:GY,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],i=n[1],r=n[2];if(!r)return UY(e,t);let a;switch(i){case"P":a=t.dateTime({width:"short"});break;case"PP":a=t.dateTime({width:"medium"});break;case"PPP":a=t.dateTime({width:"long"});break;default:a=t.dateTime({width:"full"})}return a.replace("{{date}}",UY(i,t)).replace("{{time}}",GY(r,t))}},YY=/^D+$/,$Y=/^Y+$/,XY=["D","DD","YY","YYYY"];function qY(e){return YY.test(e)}function ZY(e){return $Y.test(e)}function KY(e,t,n){const i=function(e,t,n){const i="Y"===e[0]?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${i} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}(e,t,n);if(console.warn(i),XY.includes(e))throw new RangeError(i)}const QY=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,JY=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,e$=/^'([^]*?)'?$/,t$=/''/g,n$=/[a-zA-Z]/;function i$(e,t,n){const i=aY(),r=i.locale??xY,a=i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,o=i.weekStartsOn??i.locale?.options?.weekStartsOn??0,s=eY(e,n?.in);if(!mY(s))throw new RangeError("Invalid time value");let l=t.match(JY).map(e=>{const t=e[0];if("p"===t||"P"===t){return(0,WY[t])(e,r.formatLong)}return e}).join("").match(QY).map(e=>{if("''"===e)return{isToken:!1,value:"'"};const t=e[0];if("'"===t)return{isToken:!1,value:r$(e)};if(jY[t])return{isToken:!0,value:e};if(t.match(n$))throw new RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}});r.localize.preprocessor&&(l=r.localize.preprocessor(s,l));const u={firstWeekContainsDate:a,weekStartsOn:o,locale:r};return l.map(n=>{if(!n.isToken)return n.value;const i=n.value;(ZY(i)||qY(i))&&KY(i,t,String(e));return(0,jY[i[0]])(s,i,r.localize,u)}).join("")}function r$(e){const t=e.match(e$);return t?t[1].replace(t$,"'"):e}function a$(e,t){const n=eY(e,t?.in),i=n.getFullYear(),r=n.getMonth(),a=JW(n,0);return a.setFullYear(i,r+1,0),a.setHours(0,0,0,0),a.getDate()}function o$(e,t){return+eY(e)>+eY(t)}function s$(e,t){return+eY(e)<+eY(t)}class l${subPriority=0;validate(e,t){return!0}}class u$ extends l${constructor(e,t,n,i,r){super(),this.value=e,this.validateValue=t,this.setValue=n,this.priority=i,r&&(this.subPriority=r)}validate(e,t){return this.validateValue(e,this.value,t)}set(e,t,n){return this.setValue(e,t,this.value,n)}}class c$ extends l${priority=10;subPriority=-1;constructor(e,t){super(),this.context=e||(e=>JW(t,e))}set(e,t){return t.timestampIsSet?e:JW(e,function(e,t){const n=function(e){return"function"==typeof e&&e.prototype?.constructor===e}(t)?new t(0):JW(t,0);return n.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),n.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),n}(e,this.context))}}class d${run(e,t,n,i){const r=this.parse(e,t,n,i);return r?{setter:new u$(r.value,this.validate,this.set,this.priority,this.subPriority),rest:r.rest}:null}validate(e,t,n){return!0}}const h$=/^(1[0-2]|0?\d)/,m$=/^(3[0-1]|[0-2]?\d)/,p$=/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,f$=/^(5[0-3]|[0-4]?\d)/,g$=/^(2[0-3]|[0-1]?\d)/,_$=/^(2[0-4]|[0-1]?\d)/,v$=/^(1[0-1]|0?\d)/,y$=/^(1[0-2]|0?\d)/,b$=/^[0-5]?\d/,w$=/^[0-5]?\d/,S$=/^\d/,k$=/^\d{1,2}/,C$=/^\d{1,3}/,E$=/^\d{1,4}/,x$=/^-?\d+/,I$=/^-?\d/,T$=/^-?\d{1,2}/,O$=/^-?\d{1,3}/,R$=/^-?\d{1,4}/,A$=/^([+-])(\d{2})(\d{2})?|Z/,L$=/^([+-])(\d{2})(\d{2})|Z/,P$=/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,M$=/^([+-])(\d{2}):(\d{2})|Z/,D$=/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/;function N$(e,t){return e?{value:t(e.value),rest:e.rest}:e}function F$(e,t){const n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function B$(e,t){const n=t.match(e);if(!n)return null;if("Z"===n[0])return{value:0,rest:t.slice(1)};const i="+"===n[1]?1:-1,r=n[2]?parseInt(n[2],10):0,a=n[3]?parseInt(n[3],10):0,o=n[5]?parseInt(n[5],10):0;return{value:i*(r*KW+a*ZW+1e3*o),rest:t.slice(n[0].length)}}function j$(e){return F$(x$,e)}function V$(e,t){switch(e){case 1:return F$(S$,t);case 2:return F$(k$,t);case 3:return F$(C$,t);case 4:return F$(E$,t);default:return F$(new RegExp("^\\d{1,"+e+"}"),t)}}function H$(e,t){switch(e){case 1:return F$(I$,t);case 2:return F$(T$,t);case 3:return F$(O$,t);case 4:return F$(R$,t);default:return F$(new RegExp("^-?\\d{1,"+e+"}"),t)}}function z$(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;default:return 0}}function U$(e,t){const n=t>0,i=n?t:1-t;let r;if(i<=50)r=e||100;else{const t=i+50;r=e+100*Math.trunc(t/100)-(e>=t%100?100:0)}return n?r:1-r}function G$(e){return e%400==0||e%4==0&&e%100!=0}const W$=[31,28,31,30,31,30,31,31,30,31,30,31],Y$=[31,29,31,30,31,30,31,31,30,31,30,31];function $$(e,t,n){const i=aY(),r=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??i.weekStartsOn??i.locale?.options?.weekStartsOn??0,a=eY(e,n?.in),o=a.getDay(),s=7-r;return tY(a,t<0||t>6?t-(o+s)%7:((t%7+7)%7+s)%7-(o+s)%7,n)}function X$(e,t,n){const i=eY(e,n?.in),r=function(e,t){const n=eY(e,t?.in).getDay();return 0===n?7:n}(i,n);return tY(i,t-r,n)}const q$={G:new class extends d${priority=140;parse(e,t,n){switch(t){case"G":case"GG":case"GGG":return n.era(e,{width:"abbreviated"})||n.era(e,{width:"narrow"});case"GGGGG":return n.era(e,{width:"narrow"});default:return n.era(e,{width:"wide"})||n.era(e,{width:"abbreviated"})||n.era(e,{width:"narrow"})}}set(e,t,n){return t.era=n,e.setFullYear(n,0,1),e.setHours(0,0,0,0),e}incompatibleTokens=["R","u","t","T"]},y:new class extends d${priority=130;incompatibleTokens=["Y","R","u","w","I","i","e","c","t","T"];parse(e,t,n){const i=e=>({year:e,isTwoDigitYear:"yy"===t});switch(t){case"y":return N$(V$(4,e),i);case"yo":return N$(n.ordinalNumber(e,{unit:"year"}),i);default:return N$(V$(t.length,e),i)}}validate(e,t){return t.isTwoDigitYear||t.year>0}set(e,t,n){const i=e.getFullYear();if(n.isTwoDigitYear){const t=U$(n.year,i);return e.setFullYear(t,0,1),e.setHours(0,0,0,0),e}const r="era"in t&&1!==t.era?1-n.year:n.year;return e.setFullYear(r,0,1),e.setHours(0,0,0,0),e}},Y:new class extends d${priority=130;parse(e,t,n){const i=e=>({year:e,isTwoDigitYear:"YY"===t});switch(t){case"Y":return N$(V$(4,e),i);case"Yo":return N$(n.ordinalNumber(e,{unit:"year"}),i);default:return N$(V$(t.length,e),i)}}validate(e,t){return t.isTwoDigitYear||t.year>0}set(e,t,n,i){const r=OY(e,i);if(n.isTwoDigitYear){const t=U$(n.year,r);return e.setFullYear(t,0,i.firstWeekContainsDate),e.setHours(0,0,0,0),oY(e,i)}const a="era"in t&&1!==t.era?1-n.year:n.year;return e.setFullYear(a,0,i.firstWeekContainsDate),e.setHours(0,0,0,0),oY(e,i)}incompatibleTokens=["y","R","u","Q","q","M","L","I","d","D","i","t","T"]},R:new class extends d${priority=130;parse(e,t){return H$("R"===t?4:t.length,e)}set(e,t,n){const i=JW(e,0);return i.setFullYear(n,0,4),i.setHours(0,0,0,0),sY(i)}incompatibleTokens=["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]},u:new class extends d${priority=130;parse(e,t){return H$("u"===t?4:t.length,e)}set(e,t,n){return e.setFullYear(n,0,1),e.setHours(0,0,0,0),e}incompatibleTokens=["G","y","Y","R","w","I","i","e","c","t","T"]},Q:new class extends d${priority=120;parse(e,t,n){switch(t){case"Q":case"QQ":return V$(t.length,e);case"Qo":return n.ordinalNumber(e,{unit:"quarter"});case"QQQ":return n.quarter(e,{width:"abbreviated",context:"formatting"})||n.quarter(e,{width:"narrow",context:"formatting"});case"QQQQQ":return n.quarter(e,{width:"narrow",context:"formatting"});default:return n.quarter(e,{width:"wide",context:"formatting"})||n.quarter(e,{width:"abbreviated",context:"formatting"})||n.quarter(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=1&&t<=4}set(e,t,n){return e.setMonth(3*(n-1),1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]},q:new class extends d${priority=120;parse(e,t,n){switch(t){case"q":case"qq":return V$(t.length,e);case"qo":return n.ordinalNumber(e,{unit:"quarter"});case"qqq":return n.quarter(e,{width:"abbreviated",context:"standalone"})||n.quarter(e,{width:"narrow",context:"standalone"});case"qqqqq":return n.quarter(e,{width:"narrow",context:"standalone"});default:return n.quarter(e,{width:"wide",context:"standalone"})||n.quarter(e,{width:"abbreviated",context:"standalone"})||n.quarter(e,{width:"narrow",context:"standalone"})}}validate(e,t){return t>=1&&t<=4}set(e,t,n){return e.setMonth(3*(n-1),1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]},M:new class extends d${incompatibleTokens=["Y","R","q","Q","L","w","I","D","i","e","c","t","T"];priority=110;parse(e,t,n){const i=e=>e-1;switch(t){case"M":return N$(F$(h$,e),i);case"MM":return N$(V$(2,e),i);case"Mo":return N$(n.ordinalNumber(e,{unit:"month"}),i);case"MMM":return n.month(e,{width:"abbreviated",context:"formatting"})||n.month(e,{width:"narrow",context:"formatting"});case"MMMMM":return n.month(e,{width:"narrow",context:"formatting"});default:return n.month(e,{width:"wide",context:"formatting"})||n.month(e,{width:"abbreviated",context:"formatting"})||n.month(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=0&&t<=11}set(e,t,n){return e.setMonth(n,1),e.setHours(0,0,0,0),e}},L:new class extends d${priority=110;parse(e,t,n){const i=e=>e-1;switch(t){case"L":return N$(F$(h$,e),i);case"LL":return N$(V$(2,e),i);case"Lo":return N$(n.ordinalNumber(e,{unit:"month"}),i);case"LLL":return n.month(e,{width:"abbreviated",context:"standalone"})||n.month(e,{width:"narrow",context:"standalone"});case"LLLLL":return n.month(e,{width:"narrow",context:"standalone"});default:return n.month(e,{width:"wide",context:"standalone"})||n.month(e,{width:"abbreviated",context:"standalone"})||n.month(e,{width:"narrow",context:"standalone"})}}validate(e,t){return t>=0&&t<=11}set(e,t,n){return e.setMonth(n,1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]},w:new class extends d${priority=100;parse(e,t,n){switch(t){case"w":return F$(f$,e);case"wo":return n.ordinalNumber(e,{unit:"week"});default:return V$(t.length,e)}}validate(e,t){return t>=1&&t<=53}set(e,t,n,i){return oY(function(e,t,n){const i=eY(e,n?.in),r=RY(i,n)-t;return i.setDate(i.getDate()-7*r),eY(i,n?.in)}(e,n,i),i)}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","i","t","T"]},I:new class extends d${priority=100;parse(e,t,n){switch(t){case"I":return F$(f$,e);case"Io":return n.ordinalNumber(e,{unit:"week"});default:return V$(t.length,e)}}validate(e,t){return t>=1&&t<=53}set(e,t,n){return sY(function(e,t,n){const i=eY(e,n?.in),r=TY(i,n)-t;return i.setDate(i.getDate()-7*r),i}(e,n))}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]},d:new class extends d${priority=90;subPriority=1;parse(e,t,n){switch(t){case"d":return F$(m$,e);case"do":return n.ordinalNumber(e,{unit:"date"});default:return V$(t.length,e)}}validate(e,t){const n=G$(e.getFullYear()),i=e.getMonth();return n?t>=1&&t<=Y$[i]:t>=1&&t<=W$[i]}set(e,t,n){return e.setDate(n),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","w","I","D","i","e","c","t","T"]},D:new class extends d${priority=90;subpriority=1;parse(e,t,n){switch(t){case"D":case"DD":return F$(p$,e);case"Do":return n.ordinalNumber(e,{unit:"date"});default:return V$(t.length,e)}}validate(e,t){return G$(e.getFullYear())?t>=1&&t<=366:t>=1&&t<=365}set(e,t,n){return e.setMonth(0,n),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]},E:new class extends d${priority=90;parse(e,t,n){switch(t){case"E":case"EE":case"EEE":return n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"EEEEE":return n.day(e,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});default:return n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=0&&t<=6}set(e,t,n,i){return(e=$$(e,n,i)).setHours(0,0,0,0),e}incompatibleTokens=["D","i","e","c","t","T"]},e:new class extends d${priority=90;parse(e,t,n,i){const r=e=>{const t=7*Math.floor((e-1)/7);return(e+i.weekStartsOn+6)%7+t};switch(t){case"e":case"ee":return N$(V$(t.length,e),r);case"eo":return N$(n.ordinalNumber(e,{unit:"day"}),r);case"eee":return n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"eeeee":return n.day(e,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});default:return n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=0&&t<=6}set(e,t,n,i){return(e=$$(e,n,i)).setHours(0,0,0,0),e}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]},c:new class extends d${priority=90;parse(e,t,n,i){const r=e=>{const t=7*Math.floor((e-1)/7);return(e+i.weekStartsOn+6)%7+t};switch(t){case"c":case"cc":return N$(V$(t.length,e),r);case"co":return N$(n.ordinalNumber(e,{unit:"day"}),r);case"ccc":return n.day(e,{width:"abbreviated",context:"standalone"})||n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"});case"ccccc":return n.day(e,{width:"narrow",context:"standalone"});case"cccccc":return n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"});default:return n.day(e,{width:"wide",context:"standalone"})||n.day(e,{width:"abbreviated",context:"standalone"})||n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"})}}validate(e,t){return t>=0&&t<=6}set(e,t,n,i){return(e=$$(e,n,i)).setHours(0,0,0,0),e}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]},i:new class extends d${priority=90;parse(e,t,n){const i=e=>0===e?7:e;switch(t){case"i":case"ii":return V$(t.length,e);case"io":return n.ordinalNumber(e,{unit:"day"});case"iii":return N$(n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),i);case"iiiii":return N$(n.day(e,{width:"narrow",context:"formatting"}),i);case"iiiiii":return N$(n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),i);default:return N$(n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),i)}}validate(e,t){return t>=1&&t<=7}set(e,t,n){return(e=X$(e,n)).setHours(0,0,0,0),e}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]},a:new class extends d${priority=80;parse(e,t,n){switch(t){case"a":case"aa":case"aaa":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaaa":return n.dayPeriod(e,{width:"narrow",context:"formatting"});default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,t,n){return e.setHours(z$(n),0,0,0),e}incompatibleTokens=["b","B","H","k","t","T"]},b:new class extends d${priority=80;parse(e,t,n){switch(t){case"b":case"bb":case"bbb":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbbb":return n.dayPeriod(e,{width:"narrow",context:"formatting"});default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,t,n){return e.setHours(z$(n),0,0,0),e}incompatibleTokens=["a","B","H","k","t","T"]},B:new class extends d${priority=80;parse(e,t,n){switch(t){case"B":case"BB":case"BBB":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBBB":return n.dayPeriod(e,{width:"narrow",context:"formatting"});default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,t,n){return e.setHours(z$(n),0,0,0),e}incompatibleTokens=["a","b","t","T"]},h:new class extends d${priority=70;parse(e,t,n){switch(t){case"h":return F$(y$,e);case"ho":return n.ordinalNumber(e,{unit:"hour"});default:return V$(t.length,e)}}validate(e,t){return t>=1&&t<=12}set(e,t,n){const i=e.getHours()>=12;return i&&n<12?e.setHours(n+12,0,0,0):i||12!==n?e.setHours(n,0,0,0):e.setHours(0,0,0,0),e}incompatibleTokens=["H","K","k","t","T"]},H:new class extends d${priority=70;parse(e,t,n){switch(t){case"H":return F$(g$,e);case"Ho":return n.ordinalNumber(e,{unit:"hour"});default:return V$(t.length,e)}}validate(e,t){return t>=0&&t<=23}set(e,t,n){return e.setHours(n,0,0,0),e}incompatibleTokens=["a","b","h","K","k","t","T"]},K:new class extends d${priority=70;parse(e,t,n){switch(t){case"K":return F$(v$,e);case"Ko":return n.ordinalNumber(e,{unit:"hour"});default:return V$(t.length,e)}}validate(e,t){return t>=0&&t<=11}set(e,t,n){return e.getHours()>=12&&n<12?e.setHours(n+12,0,0,0):e.setHours(n,0,0,0),e}incompatibleTokens=["h","H","k","t","T"]},k:new class extends d${priority=70;parse(e,t,n){switch(t){case"k":return F$(_$,e);case"ko":return n.ordinalNumber(e,{unit:"hour"});default:return V$(t.length,e)}}validate(e,t){return t>=1&&t<=24}set(e,t,n){const i=n<=24?n%24:n;return e.setHours(i,0,0,0),e}incompatibleTokens=["a","b","h","H","K","t","T"]},m:new class extends d${priority=60;parse(e,t,n){switch(t){case"m":return F$(b$,e);case"mo":return n.ordinalNumber(e,{unit:"minute"});default:return V$(t.length,e)}}validate(e,t){return t>=0&&t<=59}set(e,t,n){return e.setMinutes(n,0,0),e}incompatibleTokens=["t","T"]},s:new class extends d${priority=50;parse(e,t,n){switch(t){case"s":return F$(w$,e);case"so":return n.ordinalNumber(e,{unit:"second"});default:return V$(t.length,e)}}validate(e,t){return t>=0&&t<=59}set(e,t,n){return e.setSeconds(n,0),e}incompatibleTokens=["t","T"]},S:new class extends d${priority=30;parse(e,t){return N$(V$(t.length,e),e=>Math.trunc(e*Math.pow(10,3-t.length)))}set(e,t,n){return e.setMilliseconds(n),e}incompatibleTokens=["t","T"]},X:new class extends d${priority=10;parse(e,t){switch(t){case"X":return B$(A$,e);case"XX":return B$(L$,e);case"XXXX":return B$(P$,e);case"XXXXX":return B$(D$,e);default:return B$(M$,e)}}set(e,t,n){return t.timestampIsSet?e:JW(e,e.getTime()-uY(e)-n)}incompatibleTokens=["t","T","x"]},x:new class extends d${priority=10;parse(e,t){switch(t){case"x":return B$(A$,e);case"xx":return B$(L$,e);case"xxxx":return B$(P$,e);case"xxxxx":return B$(D$,e);default:return B$(M$,e)}}set(e,t,n){return t.timestampIsSet?e:JW(e,e.getTime()-uY(e)-n)}incompatibleTokens=["t","T","X"]},t:new class extends d${priority=40;parse(e){return j$(e)}set(e,t,n){return[JW(e,1e3*n),{timestampIsSet:!0}]}incompatibleTokens="*"},T:new class extends d${priority=20;parse(e){return j$(e)}set(e,t,n){return[JW(e,n),{timestampIsSet:!0}]}incompatibleTokens="*"}},Z$=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,K$=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Q$=/^'([^]*?)'?$/,J$=/''/g,eX=/\S/,tX=/[a-zA-Z]/;function nX(e,t,n,i){const r=()=>JW(n,NaN),a=Object.assign({},aY()),o=a.locale??xY,s=a.firstWeekContainsDate??a.locale?.options?.firstWeekContainsDate??1,l=a.weekStartsOn??a.locale?.options?.weekStartsOn??0;if(!t)return e?r():eY(n,i?.in);const u={firstWeekContainsDate:s,weekStartsOn:l,locale:o},c=[new c$(i?.in,n)],d=t.match(K$).map(e=>{const t=e[0];if(t in WY){return(0,WY[t])(e,o.formatLong)}return e}).join("").match(Z$),h=[];for(let g of d){ZY(g)&&KY(g,t,e),qY(g)&&KY(g,t,e);const n=g[0],i=q$[n];if(i){const{incompatibleTokens:t}=i;if(Array.isArray(t)){const e=h.find(e=>t.includes(e.token)||e.token===n);if(e)throw new RangeError(`The format string mustn't contain \`${e.fullToken}\` and \`${g}\` at the same time`)}else if("*"===i.incompatibleTokens&&h.length>0)throw new RangeError(`The format string mustn't contain \`${g}\` and any other token at the same time`);h.push({token:n,fullToken:g});const a=i.run(e,g,o.match,u);if(!a)return r();c.push(a.setter),e=a.rest}else{if(n.match(tX))throw new RangeError("Format string contains an unescaped latin alphabet character `"+n+"`");if("''"===g?g="'":"'"===n&&(g=iX(g)),0!==e.indexOf(g))return r();e=e.slice(g.length)}}if(e.length>0&&eX.test(e))return r();const m=c.map(e=>e.priority).sort((e,t)=>t-e).filter((e,t,n)=>n.indexOf(e)===t).map(e=>c.filter(t=>t.priority===e).sort((e,t)=>t.subPriority-e.subPriority)).map(e=>e[0]);let p=eY(n,i?.in);if(isNaN(+p))return r();const f={};for(const g of m){if(!g.validate(p,u))return r();const e=g.set(p,f,u);Array.isArray(e)?(p=e[0],Object.assign(f,e[1])):p=e}return p}function iX(e){return e.match(Q$)[1].replace(J$,"'")}function rX(e,t){const n=eY(e,t?.in);return n.setMinutes(0,0,0),n}function aX(e,t,n){const[i,r]=cY(n?.in,e,t);return+rX(i)===+rX(r)}function oX(e,t,n){const[i,r]=cY(n?.in,e,t);return+oY(i,n)===+oY(r,n)}function sX(e,t,n){return tY(e,-t,n)}function lX(e,t,n){let i=eY(e,n?.in);return isNaN(+i)?JW(e,NaN):(null!=t.year&&i.setFullYear(t.year),null!=t.month&&(i=function(e,t,n){const i=eY(e,n?.in),r=i.getFullYear(),a=i.getDate(),o=JW(e,0);o.setFullYear(r,t,15),o.setHours(0,0,0,0);const s=a$(o);return i.setMonth(t,Math.min(a,s)),i}(i,t.month)),null!=t.date&&i.setDate(t.date),null!=t.hours&&i.setHours(t.hours),null!=t.minutes&&i.setMinutes(t.minutes),null!=t.seconds&&i.setSeconds(t.seconds),null!=t.milliseconds&&i.setMilliseconds(t.milliseconds),i)}function uX(e){const t={},n=aY();for(const i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i]);for(const i in e)Object.prototype.hasOwnProperty.call(e,i)&&(void 0===e[i]?delete t[i]:t[i]=e[i]);rY=t}function cX(e,t,n){const{years:i=0,months:r=0,weeks:a=0,days:o=0,hours:s=0,minutes:l=0,seconds:u=0}=t,c=function(e,t,n){return nY(e,-t,n)}(e,r+12*i,n);return JW(e,+sX(c,o+7*a,n)-1e3*(u+60*(l+60*s)))}function dX(e,t,n){return iY(e,-4)}function hX(e,t,n){return hY(e,-1,n)}function mX(e,t,n){return function(e,t,n){return nY(e,12*t,n)}(e,-18,n)}let pX;const fX=new Uint8Array(16);function gX(){if(!pX&&(pX="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!pX))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return pX(fX)}const _X=[];for(let Qee=0;Qee<256;++Qee)_X.push((Qee+256).toString(16).slice(1));const vX={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function yX(e,t,n){if(vX.randomUUID&&!e)return vX.randomUUID();const i=(e=e||{}).random||(e.rng||gX)();return i[6]=15&i[6]|64,i[8]=63&i[8]|128,function(e,t=0){return _X[e[t+0]]+_X[e[t+1]]+_X[e[t+2]]+_X[e[t+3]]+"-"+_X[e[t+4]]+_X[e[t+5]]+"-"+_X[e[t+6]]+_X[e[t+7]]+"-"+_X[e[t+8]]+_X[e[t+9]]+"-"+_X[e[t+10]]+_X[e[t+11]]+_X[e[t+12]]+_X[e[t+13]]+_X[e[t+14]]+_X[e[t+15]]}(i)}const bX=oV?"/api/v2":zj.HEDIA_API_URL_V2;var wX=(e=>(e[e.cL=10]="cL",e[e.g=100]="g",e[e.mL=100]="mL",e))(wX||{});const SX={cl:10,g:100,ml:100},kX=e=>{const t=e.reduce((e,t)=>{const n=TX(t.unit);return e+t.amount/n*t.foodItem.carbohydrates},0);return Math.round(t)},CX={cartItems:[],totalCarbsCartItems:0,manualCarbsInput:0},EX=uL()((e,t)=>({...CX,carbohydrateStoreActions:{setManualCarbsInput:t=>{e({manualCarbsInput:Math.round(t)})},upsertCartItem:t=>{e(e=>{const n=e.cartItems.findIndex(e=>e.foodItem.id===t.foodItem.id);let i;i=-1!==n?e.cartItems.map((e,i)=>i===n?t:e):[...e.cartItems,t];return{cartItems:i,totalCarbsCartItems:kX(i)}})},removeFromCart:(t,n)=>{e(e=>{const i=e.cartItems.filter(({foodItem:e})=>!("id"===n?e.id===t:e.title===t));return{cartItems:i,totalCarbsCartItems:kX(i)}})},clear:()=>{e(CX)},checkoutCart:async()=>{const e=t().cartItems.map(e=>({foodItemId:e.foodItem.id,amount:e.amount,unit:e.unit}));e.length&&await xX(e)}}})),xX=async e=>{try{await FX(`${bX}/food/foodcart`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({foodCartItems:e})})}catch(t){console.error(t)}},IX=()=>yX(),TX=e=>e?SX[e]:wX.g;function OX(e,t){const n=Object.values(e);return Object.keys(e)[n.indexOf(t)]}const RX=(e,t)=>Array.from({length:t-e+1},(t,n)=>(e+n).toString()),AX=(e,t)=>Array.from({length:10*(t-e)+1},(t,n)=>(e+n/10).toFixed(1)),LX=(e,t)=>{if(e===t)return!0;if("object"!=typeof e||"object"!=typeof t||null===e||null===t)return!1;const n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;for(const r of n)if(!i.includes(r)||!LX(e[r],t[r]))return!1;return!0},PX="3.4.0";var MX=(e=>(e.QuickGuideStartPress="quickguide.start.press",e.QuickGuideBackPressStep1="quickguide.screen1.back.press",e.QuickGuideNextPressStep1="quickguide.screen1.next.press",e.QuickGuideBackPressStep2="quickguide.screen2.back.press",e.QuickGuideNextPressStep2="quickguide.screen2.next.press",e.QuickGuideBackPressStep3="quickguide.screen3.back.press",e.QuickGuideNextPressStep3="quickguide.screen3.next.press",e.QuickGuideBackPressStep4="quickguide.screen4.back.press",e.QuickGuideNextPressStep4="quickguide.screen4.next.press",e.QuickGuideBackPressStep5="quickguide.screen5.back.press",e.QuickGuideNextPressStep5="quickguide.screen5.next.press",e.QuickGuideBackPressStep6="quickguide.screen6.back.press",e.QuickGuideNextPressStep6="quickguide.screen6.next.press",e.QuickGuideBackPressStep7="quickguide.screen7.back.press",e.QuickGuideNextPressStep7="quickguide.screen7.next.press",e.QuickGuideBackPressStep8="quickguide.screen8.back.press",e.QuickGuideNextPressStep8="quickguide.screen8.next.press",e.QuickGuideBackPressStep9="quickguide.screen9.back.press",e.QuickGuideFinishPress="quickguide.finish.press",e.SetupIntroStartPress="setup.intro.start.press",e.SetupGeneralBackPress="setup.general.back.press",e.SetupGeneralNextPress="setup.general.next.press",e.SetupTreatmentBackPress="setup.treatment.back.press",e.SetupTreatmentNextPress="setup.treatment.next.press",e.SetupOptionsNextPress="setup.options.next.press",e.SetupOptionsBackPress="setup.options.back.press",e.SetupInsulinBackPress="setup.insulin.back.press",e.SetupInsulinNextPress="setup.insulin.next.press",e.SetupTDDBackPress="setup.tdd.back.press",e.SetupTDDNextPress="setup.tdd.next.press",e.SetupSummaryBackPress="setup.summary.back.press",e.SetupSummaryFinishPress="setup.summary.finish.press",e.CarbohydrateChart7DaysPress="carbohydratechart.7days.press",e.CarbohydrateChart14DaysPress="carbohydratechart.14days.press",e.CarbohydrateChart30DaysPress="carbohydratechart.30days.press",e.CarbohydrateChart90DaysPress="carbohydratechart.90days.press",e.CarbohydrateChartStart="carbohydratechart.start",e.CarbohydrateChartEnd="carbohydratechart.end",e.RapidInsulinChart7DaysPress="rapidinsulinchart.7days.press",e.RapidInsulinChart14DaysPress="rapidinsulinchart.14days.press",e.RapidInsulinChart30DaysPress="rapidinsulinchart.30days.press",e.RapidInsulinChart90DaysPress="rapidinsulinchart.90days.press",e.RapidInsulinChartStart="rapidinsulinchart.start",e.RapidInsulinChartEnd="rapidinsulinchart.end",e.TimeInRangeChart7DaysPress="timeinrangechart.7days.press",e.TimeInRangeChart14DaysPress="timeinrangechart.14days.press",e.TimeInRangeChart30DaysPress="timeinrangechart.30days.press",e.TimeInRangeChart90DaysPress="timeinrangechart.90days.press",e.TimeInRangeChartStart="timeinrangechart.start",e.TimeInRangeChartEnd="timeinrangechart.end",e.MyDayPreviousPress="mydaychart.previous.press",e.MyDayNextPress="mydaychart.next.press",e.MyDayChartStart="mydaychart.start",e.MyDayChartEnd="mydaychart.end",e.ActiveInsulinChartStart="activeinsulinchart.start",e.ActiveInsulinChartEnd="activeinsulinchart.end",e.GlucoseChart7DaysPressCGM="glucosechart.cgm.7days.press",e.GlucoseChart14DaysPressCGM="glucosechart.cgm.14days.press",e.GlucoseChart30DaysPressCGM="glucosechart.cgm.30days.press",e.GlucoseChart90DaysPressCGM="glucosechart.cgm.90days.press",e.GlucoseChartStartCGM="glucosechart.cgm.start",e.GlucoseChartEndCGM="glucosechart.cgm.end",e.GlucoseChart7DaysPressBGM="glucosechart.bgm.7days.press",e.GlucoseChart14DaysPressBGM="glucosechart.bgm.14days.press",e.GlucoseChart30DaysPressBGM="glucosechart.bgm.30days.press",e.GlucoseChart90DaysPressBGM="glucosechart.bgm.90days.press",e.GlucoseChartStartBGM="glucosechart.bgm.start",e.GlucoseChartEndBGM="glucosechart.bgm.end",e.DashboardCgmButtonPress="home.dashboard.cgm.press",e.DashboardTabPress="home.dashboard.press",e.LogbookTabPress="home.logbook.press",e.NewCalculationTabPress="home.newcalculation.press",e.SettingsTabPress="home.settings.press",e.FoodLibraryTabPress="home.foodlibrary.press",e.GlucoseTabPress="calcflow.glucose.press",e.CarbsTabPress="calcflow.carbs.press",e.ActivityTabPress="calcflow.activity.press",e.SummaryTabPress="calcflow.summary.press",e.AbortCalculationPress="calcflow.abort.press",e.RecentInsulinRegisterPress="calcflow.recentinsulin.register.press",e.RecentInsulinContinuePress="calcflow.recentinsulin.continue.press",e.CarbsManualInput="calcflow.carbs.input.manual",e.CarbsFoodLibraryDatabaseInput="calcflow.carbs.foodlibrary.input.database",e.CarbsFoodLibraryPersonalInput="calcflow.carbs.foodlibrary.input.personal",e.CarbsFoodLibraryPersonalPress="calcflow.carbs.foodlibrary.personal.press",e.CarbsFoodLibrarySearch="calcflow.carbs.foodlibrary.search",e.CarbsFoodLibraryAbort="calcflow.carbs.foodlibrary.abort",e.FoodLibrarySearched="foodlibrary.searched",e.FoodLibraryPersonalPress="foodlibrary.personal.press",e.FoodLibraryCreatePress="foodlibrary.create.press",e.FoodLibraryUpdatePress="foodlibrary.update.press",e.ActivityAddPress="calcflow.activity.add.press",e.ActivityEditPress="calcflow.activity.edit.press",e.TransferDevice="integration.device.transfer",e.TransferService="integration.service.transfer",e.ExpiredGlucose="calcflow.glucose.expired",e.SummaryExpiredGlucose="calcflow.summary.glucose.expired",e.SummaryEmptyGlucose="calcflow.summary.glucose.empty",e.RecommendationSuccess="calcflow.recommendation.success",e.RecommendationInvalid="calcflow.recommendation.invalid",e.RecommendationViewDetailsPress="calcflow.recommendation.details.press",e.RecommendationExpired="calcflow.recommendation.expired",e.RecommendationToastPress="calcflow.recommendation.toast.press",e.LogbookPersonalAddPress="logbook.personal.add.press",e.LogbookPersonalEditPress="logbook.personal.edit.press",e.LogbookPersonalDeletePress="logbook.personal.delete.press",e.LogbookExportPress="logbook.export.press",e.LogbookExportDurationFourteenDaysPress="logbook.export.duration.fourteendays.press",e.LogbookExportDurationThreeMonthsPress="logbook.export.duration.threemonths.press",e.LogbookExportDurationSixMonthsPress="logbook.export.duration.sixmonths.press",e.LogbookExportGeneratePress="logbook.export.generate.press",e.SettingsProfile="settings.profile.press",e.SettingsInsulin="settings.insulin.press",e.SettingsGlucose="settings.glucose.press",e.SettingsActivity="settings.activity.press",e.SettingsNotifications="settings.notifications.press",e.SettingsSmartPen="settings.smartpen.press",e.SettingsCGM="settings.cgm.press",e.SettingsBGM="settings.bgm.press",e.SettingsIFU="settings.ifu.press",e.SettingsSupport="settings.support.press",e.SettingsLegal="settings.legal.press",e.NotificationsAllowQuickGuide="quickguide.notifications.allow.press",e.NotificationsAllowSettings="settings.notifications.allow.press",e.NotificationsDenyQuickGuide="quickguide.notifications.deny.press",e.NotificationsDenySettings="settings.notifications.deny.press",e.ErrorOffline="errors.offline",e.ErrorForceUpdate="errors.forceupdate",e.ErrorLogOut="errors.logout",e))(MX||{});const DX=()=>{const{email:e,id:t,country:n=""}=wq.get();return{id:t,isTester:e.includes("@hedia"),country:n,uuid:IX(),timestamp:(new Date).toISOString(),timezone:Intl.DateTimeFormat().resolvedOptions().timeZone,platform:lr.OS}},NX=e=>{const{id:t,isTester:n,country:i,uuid:r,timestamp:a,timezone:o,platform:s}=DX(),l={uuid:r,type:e,timestamp:a,timezone:o,data:{version:PX,platform:s,user:{id:t,isTester:n},geo:{country:i}}};XW.update(l),XW.sync().catch(console.error)},FX=async(e,t,n=0)=>{if(oV)return fetch(e,t);const{accessToken:i,refreshToken:r}=Xz.getState();if(!i||!r)throw new Error("Missing access token or refresh token");const a={...t?.headers,Authorization:`Bearer ${i}`},o=await fetch(e,{...t,headers:a});if([FL.StatusCode.UNAUTHORIZED,FL.StatusCode.FORBIDDEN].includes(o.status)){if(n<1)return await BX(r),FX(e,t,n+1);throw new Error("[hediaFetch::hediaFetch] Failed to refresh token after retry")}return o},BX=async e=>{const{setTokens:t}=Xz.getState(),n=await(async e=>{const t=new URL(Wz+"/token");return fetch(t.toString(),{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Authorization:"Basic "+Gz.Buffer.from(encodeURIComponent(Yz)).toString("base64")},body:new URLSearchParams({grant_type:"refresh_token",refresh_token:e}).toString()})})(e);if(n.status===FL.StatusCode.BAD_REQUEST)throw NX(MX.ErrorLogOut),t({accessToken:void 0,refreshToken:void 0}),new Error("[hediaFetch::refreshAccessToken] Bad request - cleared storage");if(!n.ok)throw new Error("[hediaFetch::refreshAccessToken] Failed to refresh access token");const{access_token:i,refresh_token:r}=await n.json();t({accessToken:i,refreshToken:r})};const{HEDIA_API_URL_V3:jX}=oV?{HEDIA_API_URL_V3:"/api/v3"}:zj,VX={email:""},HX={lessThanXSeconds:{one:"mindre end ét sekund",other:"mindre end {{count}} sekunder"},xSeconds:{one:"1 sekund",other:"{{count}} sekunder"},halfAMinute:"ét halvt minut",lessThanXMinutes:{one:"mindre end ét minut",other:"mindre end {{count}} minutter"},xMinutes:{one:"1 minut",other:"{{count}} minutter"},aboutXHours:{one:"cirka 1 time",other:"cirka {{count}} timer"},xHours:{one:"1 time",other:"{{count}} timer"},xDays:{one:"1 dag",other:"{{count}} dage"},aboutXWeeks:{one:"cirka 1 uge",other:"cirka {{count}} uger"},xWeeks:{one:"1 uge",other:"{{count}} uger"},aboutXMonths:{one:"cirka 1 måned",other:"cirka {{count}} måneder"},xMonths:{one:"1 måned",other:"{{count}} måneder"},aboutXYears:{one:"cirka 1 år",other:"cirka {{count}} år"},xYears:{one:"1 år",other:"{{count}} år"},overXYears:{one:"over 1 år",other:"over {{count}} år"},almostXYears:{one:"næsten 1 år",other:"næsten {{count}} år"}},zX={date:_Y({formats:{full:"EEEE 'den' d. MMMM y",long:"d. MMMM y",medium:"d. MMM y",short:"dd/MM/y"},defaultWidth:"full"}),time:_Y({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:_Y({formats:{full:"{{date}} 'kl'. {{time}}",long:"{{date}} 'kl'. {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},defaultWidth:"full"})},UX={lastWeek:"'sidste' eeee 'kl.' p",yesterday:"'i går kl.' p",today:"'i dag kl.' p",tomorrow:"'i morgen kl.' p",nextWeek:"'på' eeee 'kl.' p",other:"P"},GX={code:"da",formatDistance:(e,t,n)=>{let i;const r=HX[e];return i="string"==typeof r?r:1===t?r.one:r.other.replace("{{count}}",String(t)),n?.addSuffix?n.comparison&&n.comparison>0?"om "+i:i+" siden":i},formatLong:zX,formatRelative:(e,t,n,i)=>UX[e],localize:{ordinalNumber:(e,t)=>Number(e)+".",era:wY({values:{narrow:["fvt","vt"],abbreviated:["f.v.t.","v.t."],wide:["før vesterlandsk tidsregning","vesterlandsk tidsregning"]},defaultWidth:"wide"}),quarter:wY({values:{narrow:["1","2","3","4"],abbreviated:["1. kvt.","2. kvt.","3. kvt.","4. kvt."],wide:["1. kvartal","2. kvartal","3. kvartal","4. kvartal"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:wY({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["jan.","feb.","mar.","apr.","maj","jun.","jul.","aug.","sep.","okt.","nov.","dec."],wide:["januar","februar","marts","april","maj","juni","juli","august","september","oktober","november","december"]},defaultWidth:"wide"}),day:wY({values:{narrow:["S","M","T","O","T","F","L"],short:["sø","ma","ti","on","to","fr","lø"],abbreviated:["søn.","man.","tir.","ons.","tor.","fre.","lør."],wide:["søndag","mandag","tirsdag","onsdag","torsdag","fredag","lørdag"]},defaultWidth:"wide"}),dayPeriod:wY({values:{narrow:{am:"a",pm:"p",midnight:"midnat",noon:"middag",morning:"morgen",afternoon:"eftermiddag",evening:"aften",night:"nat"},abbreviated:{am:"AM",pm:"PM",midnight:"midnat",noon:"middag",morning:"morgen",afternoon:"eftermiddag",evening:"aften",night:"nat"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnat",noon:"middag",morning:"morgen",afternoon:"eftermiddag",evening:"aften",night:"nat"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"midnat",noon:"middag",morning:"om morgenen",afternoon:"om eftermiddagen",evening:"om aftenen",night:"om natten"},abbreviated:{am:"AM",pm:"PM",midnight:"midnat",noon:"middag",morning:"om morgenen",afternoon:"om eftermiddagen",evening:"om aftenen",night:"om natten"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnat",noon:"middag",morning:"om morgenen",afternoon:"om eftermiddagen",evening:"om aftenen",night:"om natten"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:CY({matchPattern:/^(\d+)(\.)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:kY({matchPatterns:{narrow:/^(fKr|fvt|eKr|vt)/i,abbreviated:/^(f\.Kr\.?|f\.v\.t\.?|e\.Kr\.?|v\.t\.)/i,wide:/^(f.Kr.|før vesterlandsk tidsregning|e.Kr.|vesterlandsk tidsregning)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^f/i,/^(v|e)/i]},defaultParseWidth:"any"}),quarter:kY({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^[1234]. kvt\./i,wide:/^[1234]\.? kvartal/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:kY({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan.|feb.|mar.|apr.|maj|jun.|jul.|aug.|sep.|okt.|nov.|dec.)/i,wide:/^(januar|februar|marts|april|maj|juni|juli|august|september|oktober|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^maj/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:kY({matchPatterns:{narrow:/^[smtofl]/i,short:/^(søn.|man.|tir.|ons.|tor.|fre.|lør.)/i,abbreviated:/^(søn|man|tir|ons|tor|fre|lør)/i,wide:/^(søndag|mandag|tirsdag|onsdag|torsdag|fredag|lørdag)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^o/i,/^t/i,/^f/i,/^l/i],any:[/^s/i,/^m/i,/^ti/i,/^o/i,/^to/i,/^f/i,/^l/i]},defaultParseWidth:"any"}),dayPeriod:kY({matchPatterns:{narrow:/^(a|p|midnat|middag|(om) (morgenen|eftermiddagen|aftenen|natten))/i,any:/^([ap]\.?\s?m\.?|midnat|middag|(om) (morgenen|eftermiddagen|aftenen|natten))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/midnat/i,noon:/middag/i,morning:/morgen/i,afternoon:/eftermiddag/i,evening:/aften/i,night:/nat/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:4}},WX={lessThanXSeconds:{standalone:{one:"weniger als 1 Sekunde",other:"weniger als {{count}} Sekunden"},withPreposition:{one:"weniger als 1 Sekunde",other:"weniger als {{count}} Sekunden"}},xSeconds:{standalone:{one:"1 Sekunde",other:"{{count}} Sekunden"},withPreposition:{one:"1 Sekunde",other:"{{count}} Sekunden"}},halfAMinute:{standalone:"eine halbe Minute",withPreposition:"einer halben Minute"},lessThanXMinutes:{standalone:{one:"weniger als 1 Minute",other:"weniger als {{count}} Minuten"},withPreposition:{one:"weniger als 1 Minute",other:"weniger als {{count}} Minuten"}},xMinutes:{standalone:{one:"1 Minute",other:"{{count}} Minuten"},withPreposition:{one:"1 Minute",other:"{{count}} Minuten"}},aboutXHours:{standalone:{one:"etwa 1 Stunde",other:"etwa {{count}} Stunden"},withPreposition:{one:"etwa 1 Stunde",other:"etwa {{count}} Stunden"}},xHours:{standalone:{one:"1 Stunde",other:"{{count}} Stunden"},withPreposition:{one:"1 Stunde",other:"{{count}} Stunden"}},xDays:{standalone:{one:"1 Tag",other:"{{count}} Tage"},withPreposition:{one:"1 Tag",other:"{{count}} Tagen"}},aboutXWeeks:{standalone:{one:"etwa 1 Woche",other:"etwa {{count}} Wochen"},withPreposition:{one:"etwa 1 Woche",other:"etwa {{count}} Wochen"}},xWeeks:{standalone:{one:"1 Woche",other:"{{count}} Wochen"},withPreposition:{one:"1 Woche",other:"{{count}} Wochen"}},aboutXMonths:{standalone:{one:"etwa 1 Monat",other:"etwa {{count}} Monate"},withPreposition:{one:"etwa 1 Monat",other:"etwa {{count}} Monaten"}},xMonths:{standalone:{one:"1 Monat",other:"{{count}} Monate"},withPreposition:{one:"1 Monat",other:"{{count}} Monaten"}},aboutXYears:{standalone:{one:"etwa 1 Jahr",other:"etwa {{count}} Jahre"},withPreposition:{one:"etwa 1 Jahr",other:"etwa {{count}} Jahren"}},xYears:{standalone:{one:"1 Jahr",other:"{{count}} Jahre"},withPreposition:{one:"1 Jahr",other:"{{count}} Jahren"}},overXYears:{standalone:{one:"mehr als 1 Jahr",other:"mehr als {{count}} Jahre"},withPreposition:{one:"mehr als 1 Jahr",other:"mehr als {{count}} Jahren"}},almostXYears:{standalone:{one:"fast 1 Jahr",other:"fast {{count}} Jahre"},withPreposition:{one:"fast 1 Jahr",other:"fast {{count}} Jahren"}}},YX={date:_Y({formats:{full:"EEEE, do MMMM y",long:"do MMMM y",medium:"do MMM y",short:"dd.MM.y"},defaultWidth:"full"}),time:_Y({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:_Y({formats:{full:"{{date}} 'um' {{time}}",long:"{{date}} 'um' {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},defaultWidth:"full"})},$X={lastWeek:"'letzten' eeee 'um' p",yesterday:"'gestern um' p",today:"'heute um' p",tomorrow:"'morgen um' p",nextWeek:"eeee 'um' p",other:"P"},XX={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],wide:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"]},qX={narrow:XX.narrow,abbreviated:["Jan.","Feb.","März","Apr.","Mai","Juni","Juli","Aug.","Sep.","Okt.","Nov.","Dez."],wide:XX.wide},ZX={code:"de",formatDistance:(e,t,n)=>{let i;const r=n?.addSuffix?WX[e].withPreposition:WX[e].standalone;return i="string"==typeof r?r:1===t?r.one:r.other.replace("{{count}}",String(t)),n?.addSuffix?n.comparison&&n.comparison>0?"in "+i:"vor "+i:i},formatLong:YX,formatRelative:(e,t,n,i)=>$X[e],localize:{ordinalNumber:e=>Number(e)+".",era:wY({values:{narrow:["v.Chr.","n.Chr."],abbreviated:["v.Chr.","n.Chr."],wide:["vor Christus","nach Christus"]},defaultWidth:"wide"}),quarter:wY({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1. Quartal","2. Quartal","3. Quartal","4. Quartal"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:wY({values:XX,formattingValues:qX,defaultWidth:"wide"}),day:wY({values:{narrow:["S","M","D","M","D","F","S"],short:["So","Mo","Di","Mi","Do","Fr","Sa"],abbreviated:["So.","Mo.","Di.","Mi.","Do.","Fr.","Sa."],wide:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"]},defaultWidth:"wide"}),dayPeriod:wY({values:{narrow:{am:"vm.",pm:"nm.",midnight:"Mitternacht",noon:"Mittag",morning:"Morgen",afternoon:"Nachm.",evening:"Abend",night:"Nacht"},abbreviated:{am:"vorm.",pm:"nachm.",midnight:"Mitternacht",noon:"Mittag",morning:"Morgen",afternoon:"Nachmittag",evening:"Abend",night:"Nacht"},wide:{am:"vormittags",pm:"nachmittags",midnight:"Mitternacht",noon:"Mittag",morning:"Morgen",afternoon:"Nachmittag",evening:"Abend",night:"Nacht"}},defaultWidth:"wide",formattingValues:{narrow:{am:"vm.",pm:"nm.",midnight:"Mitternacht",noon:"Mittag",morning:"morgens",afternoon:"nachm.",evening:"abends",night:"nachts"},abbreviated:{am:"vorm.",pm:"nachm.",midnight:"Mitternacht",noon:"Mittag",morning:"morgens",afternoon:"nachmittags",evening:"abends",night:"nachts"},wide:{am:"vormittags",pm:"nachmittags",midnight:"Mitternacht",noon:"Mittag",morning:"morgens",afternoon:"nachmittags",evening:"abends",night:"nachts"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:CY({matchPattern:/^(\d+)(\.)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e)}),era:kY({matchPatterns:{narrow:/^(v\.? ?Chr\.?|n\.? ?Chr\.?)/i,abbreviated:/^(v\.? ?Chr\.?|n\.? ?Chr\.?)/i,wide:/^(vor Christus|vor unserer Zeitrechnung|nach Christus|unserer Zeitrechnung)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^v/i,/^n/i]},defaultParseWidth:"any"}),quarter:kY({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](\.)? Quartal/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:kY({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(j[aä]n|feb|mär[z]?|apr|mai|jun[i]?|jul[i]?|aug|sep|okt|nov|dez)\.?/i,wide:/^(januar|februar|märz|april|mai|juni|juli|august|september|oktober|november|dezember)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^j[aä]/i,/^f/i,/^mär/i,/^ap/i,/^mai/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:kY({matchPatterns:{narrow:/^[smdmf]/i,short:/^(so|mo|di|mi|do|fr|sa)/i,abbreviated:/^(son?|mon?|die?|mit?|don?|fre?|sam?)\.?/i,wide:/^(sonntag|montag|dienstag|mittwoch|donnerstag|freitag|samstag)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^so/i,/^mo/i,/^di/i,/^mi/i,/^do/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:kY({matchPatterns:{narrow:/^(vm\.?|nm\.?|Mitternacht|Mittag|morgens|nachm\.?|abends|nachts)/i,abbreviated:/^(vorm\.?|nachm\.?|Mitternacht|Mittag|morgens|nachm\.?|abends|nachts)/i,wide:/^(vormittags|nachmittags|Mitternacht|Mittag|morgens|nachmittags|abends|nachts)/i},defaultMatchWidth:"wide",parsePatterns:{any:{am:/^v/i,pm:/^n/i,midnight:/^Mitte/i,noon:/^Mitta/i,morning:/morgens/i,afternoon:/nachmittags/i,evening:/abends/i,night:/nachts/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:4}},KX={code:"en-GB",formatDistance:gY,formatLong:{date:_Y({formats:{full:"EEEE, d MMMM yyyy",long:"d MMMM yyyy",medium:"d MMM yyyy",short:"dd/MM/yyyy"},defaultWidth:"full"}),time:_Y({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:_Y({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},formatRelative:bY,localize:SY,match:EY,options:{weekStartsOn:1,firstWeekContainsDate:4}},QX={lessThanXSeconds:{one:"menos de un segundo",other:"menos de {{count}} segundos"},xSeconds:{one:"1 segundo",other:"{{count}} segundos"},halfAMinute:"medio minuto",lessThanXMinutes:{one:"menos de un minuto",other:"menos de {{count}} minutos"},xMinutes:{one:"1 minuto",other:"{{count}} minutos"},aboutXHours:{one:"alrededor de 1 hora",other:"alrededor de {{count}} horas"},xHours:{one:"1 hora",other:"{{count}} horas"},xDays:{one:"1 día",other:"{{count}} días"},aboutXWeeks:{one:"alrededor de 1 semana",other:"alrededor de {{count}} semanas"},xWeeks:{one:"1 semana",other:"{{count}} semanas"},aboutXMonths:{one:"alrededor de 1 mes",other:"alrededor de {{count}} meses"},xMonths:{one:"1 mes",other:"{{count}} meses"},aboutXYears:{one:"alrededor de 1 año",other:"alrededor de {{count}} años"},xYears:{one:"1 año",other:"{{count}} años"},overXYears:{one:"más de 1 año",other:"más de {{count}} años"},almostXYears:{one:"casi 1 año",other:"casi {{count}} años"}},JX={date:_Y({formats:{full:"EEEE, d 'de' MMMM 'de' y",long:"d 'de' MMMM 'de' y",medium:"d MMM y",short:"dd/MM/y"},defaultWidth:"full"}),time:_Y({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:_Y({formats:{full:"{{date}} 'a las' {{time}}",long:"{{date}} 'a las' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},eq={lastWeek:"'el' eeee 'pasado a la' p",yesterday:"'ayer a la' p",today:"'hoy a la' p",tomorrow:"'mañana a la' p",nextWeek:"eeee 'a la' p",other:"P"},tq={lastWeek:"'el' eeee 'pasado a las' p",yesterday:"'ayer a las' p",today:"'hoy a las' p",tomorrow:"'mañana a las' p",nextWeek:"eeee 'a las' p",other:"P"},nq={code:"es",formatDistance:(e,t,n)=>{let i;const r=QX[e];return i="string"==typeof r?r:1===t?r.one:r.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"en "+i:"hace "+i:i},formatLong:JX,formatRelative:(e,t,n,i)=>1!==t.getHours()?tq[e]:eq[e],localize:{ordinalNumber:(e,t)=>Number(e)+"º",era:wY({values:{narrow:["AC","DC"],abbreviated:["AC","DC"],wide:["antes de cristo","después de cristo"]},defaultWidth:"wide"}),quarter:wY({values:{narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["1º trimestre","2º trimestre","3º trimestre","4º trimestre"]},defaultWidth:"wide",argumentCallback:e=>Number(e)-1}),month:wY({values:{narrow:["e","f","m","a","m","j","j","a","s","o","n","d"],abbreviated:["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"],wide:["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"]},defaultWidth:"wide"}),day:wY({values:{narrow:["d","l","m","m","j","v","s"],short:["do","lu","ma","mi","ju","vi","sá"],abbreviated:["dom","lun","mar","mié","jue","vie","sáb"],wide:["domingo","lunes","martes","miércoles","jueves","viernes","sábado"]},defaultWidth:"wide"}),dayPeriod:wY({values:{narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"mañana",afternoon:"tarde",evening:"tarde",night:"noche"},abbreviated:{am:"AM",pm:"PM",midnight:"medianoche",noon:"mediodia",morning:"mañana",afternoon:"tarde",evening:"tarde",night:"noche"},wide:{am:"a.m.",pm:"p.m.",midnight:"medianoche",noon:"mediodia",morning:"mañana",afternoon:"tarde",evening:"tarde",night:"noche"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"de la mañana",afternoon:"de la tarde",evening:"de la tarde",night:"de la noche"},abbreviated:{am:"AM",pm:"PM",midnight:"medianoche",noon:"mediodia",morning:"de la mañana",afternoon:"de la tarde",evening:"de la tarde",night:"de la noche"},wide:{am:"a.m.",pm:"p.m.",midnight:"medianoche",noon:"mediodia",morning:"de la mañana",afternoon:"de la tarde",evening:"de la tarde",night:"de la noche"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:CY({matchPattern:/^(\d+)(º)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:kY({matchPatterns:{narrow:/^(ac|dc|a|d)/i,abbreviated:/^(a\.?\s?c\.?|a\.?\s?e\.?\s?c\.?|d\.?\s?c\.?|e\.?\s?c\.?)/i,wide:/^(antes de cristo|antes de la era com[uú]n|despu[eé]s de cristo|era com[uú]n)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^ac/i,/^dc/i],wide:[/^(antes de cristo|antes de la era com[uú]n)/i,/^(despu[eé]s de cristo|era com[uú]n)/i]},defaultParseWidth:"any"}),quarter:kY({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^T[1234]/i,wide:/^[1234](º)? trimestre/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:kY({matchPatterns:{narrow:/^[efmajsond]/i,abbreviated:/^(ene|feb|mar|abr|may|jun|jul|ago|sep|oct|nov|dic)/i,wide:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^e/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^en/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i]},defaultParseWidth:"any"}),day:kY({matchPatterns:{narrow:/^[dlmjvs]/i,short:/^(do|lu|ma|mi|ju|vi|s[áa])/i,abbreviated:/^(dom|lun|mar|mi[ée]|jue|vie|s[áa]b)/i,wide:/^(domingo|lunes|martes|mi[ée]rcoles|jueves|viernes|s[áa]bado)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^d/i,/^l/i,/^m/i,/^m/i,/^j/i,/^v/i,/^s/i],any:[/^do/i,/^lu/i,/^ma/i,/^mi/i,/^ju/i,/^vi/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:kY({matchPatterns:{narrow:/^(a|p|mn|md|(de la|a las) (mañana|tarde|noche))/i,any:/^([ap]\.?\s?m\.?|medianoche|mediodia|(de la|a las) (mañana|tarde|noche))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mn/i,noon:/^md/i,morning:/mañana/i,afternoon:/tarde/i,evening:/tarde/i,night:/noche/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:1}},iq={lessThanXSeconds:{one:"moins d’une seconde",other:"moins de {{count}} secondes"},xSeconds:{one:"1 seconde",other:"{{count}} secondes"},halfAMinute:"30 secondes",lessThanXMinutes:{one:"moins d’une minute",other:"moins de {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"environ 1 heure",other:"environ {{count}} heures"},xHours:{one:"1 heure",other:"{{count}} heures"},xDays:{one:"1 jour",other:"{{count}} jours"},aboutXWeeks:{one:"environ 1 semaine",other:"environ {{count}} semaines"},xWeeks:{one:"1 semaine",other:"{{count}} semaines"},aboutXMonths:{one:"environ 1 mois",other:"environ {{count}} mois"},xMonths:{one:"1 mois",other:"{{count}} mois"},aboutXYears:{one:"environ 1 an",other:"environ {{count}} ans"},xYears:{one:"1 an",other:"{{count}} ans"},overXYears:{one:"plus d’un an",other:"plus de {{count}} ans"},almostXYears:{one:"presqu’un an",other:"presque {{count}} ans"}},rq={date:_Y({formats:{full:"EEEE d MMMM y",long:"d MMMM y",medium:"d MMM y",short:"dd/MM/y"},defaultWidth:"full"}),time:_Y({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:_Y({formats:{full:"{{date}} 'à' {{time}}",long:"{{date}} 'à' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},aq={lastWeek:"eeee 'dernier à' p",yesterday:"'hier à' p",today:"'aujourd’hui à' p",tomorrow:"'demain à' p'",nextWeek:"eeee 'prochain à' p",other:"P"},oq=["MMM","MMMM"],sq={code:"fr",formatDistance:(e,t,n)=>{let i;const r=iq[e];return i="string"==typeof r?r:1===t?r.one:r.other.replace("{{count}}",String(t)),n?.addSuffix?n.comparison&&n.comparison>0?"dans "+i:"il y a "+i:i},formatLong:rq,formatRelative:(e,t,n,i)=>aq[e],localize:{preprocessor:(e,t)=>{if(1===e.getDate())return t;return t.some(e=>e.isToken&&oq.includes(e.value))?t.map(e=>e.isToken&&"do"===e.value?{isToken:!0,value:"d"}:e):t},ordinalNumber:(e,t)=>{const n=Number(e),i=t?.unit;if(0===n)return"0";let r;return r=1===n?i&&["year","week","hour","minute","second"].includes(i)?"ère":"er":"ème",n+r},era:wY({values:{narrow:["av. J.-C","ap. J.-C"],abbreviated:["av. J.-C","ap. J.-C"],wide:["avant Jésus-Christ","après Jésus-Christ"]},defaultWidth:"wide"}),quarter:wY({values:{narrow:["T1","T2","T3","T4"],abbreviated:["1er trim.","2ème trim.","3ème trim.","4ème trim."],wide:["1er trimestre","2ème trimestre","3ème trimestre","4ème trimestre"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:wY({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc."],wide:["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"]},defaultWidth:"wide"}),day:wY({values:{narrow:["D","L","M","M","J","V","S"],short:["di","lu","ma","me","je","ve","sa"],abbreviated:["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],wide:["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"]},defaultWidth:"wide"}),dayPeriod:wY({values:{narrow:{am:"AM",pm:"PM",midnight:"minuit",noon:"midi",morning:"mat.",afternoon:"ap.m.",evening:"soir",night:"mat."},abbreviated:{am:"AM",pm:"PM",midnight:"minuit",noon:"midi",morning:"matin",afternoon:"après-midi",evening:"soir",night:"matin"},wide:{am:"AM",pm:"PM",midnight:"minuit",noon:"midi",morning:"du matin",afternoon:"de l’après-midi",evening:"du soir",night:"du matin"}},defaultWidth:"wide"})},match:{ordinalNumber:CY({matchPattern:/^(\d+)(ième|ère|ème|er|e)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e)}),era:kY({matchPatterns:{narrow:/^(av\.J\.C|ap\.J\.C|ap\.J\.-C)/i,abbreviated:/^(av\.J\.-C|av\.J-C|apr\.J\.-C|apr\.J-C|ap\.J-C)/i,wide:/^(avant Jésus-Christ|après Jésus-Christ)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^av/i,/^ap/i]},defaultParseWidth:"any"}),quarter:kY({matchPatterns:{narrow:/^T?[1234]/i,abbreviated:/^[1234](er|ème|e)? trim\.?/i,wide:/^[1234](er|ème|e)? trimestre/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:kY({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(janv|févr|mars|avr|mai|juin|juill|juil|août|sept|oct|nov|déc)\.?/i,wide:/^(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^av/i,/^ma/i,/^juin/i,/^juil/i,/^ao/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:kY({matchPatterns:{narrow:/^[lmjvsd]/i,short:/^(di|lu|ma|me|je|ve|sa)/i,abbreviated:/^(dim|lun|mar|mer|jeu|ven|sam)\.?/i,wide:/^(dimanche|lundi|mardi|mercredi|jeudi|vendredi|samedi)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^d/i,/^l/i,/^m/i,/^m/i,/^j/i,/^v/i,/^s/i],any:[/^di/i,/^lu/i,/^ma/i,/^me/i,/^je/i,/^ve/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:kY({matchPatterns:{narrow:/^(a|p|minuit|midi|mat\.?|ap\.?m\.?|soir|nuit)/i,any:/^([ap]\.?\s?m\.?|du matin|de l'après[-\s]midi|du soir|de la nuit)/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^min/i,noon:/^mid/i,morning:/mat/i,afternoon:/ap/i,evening:/soir/i,night:/nuit/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:4}},lq={lessThanXSeconds:{one:"meno di un secondo",other:"meno di {{count}} secondi"},xSeconds:{one:"un secondo",other:"{{count}} secondi"},halfAMinute:"alcuni secondi",lessThanXMinutes:{one:"meno di un minuto",other:"meno di {{count}} minuti"},xMinutes:{one:"un minuto",other:"{{count}} minuti"},aboutXHours:{one:"circa un'ora",other:"circa {{count}} ore"},xHours:{one:"un'ora",other:"{{count}} ore"},xDays:{one:"un giorno",other:"{{count}} giorni"},aboutXWeeks:{one:"circa una settimana",other:"circa {{count}} settimane"},xWeeks:{one:"una settimana",other:"{{count}} settimane"},aboutXMonths:{one:"circa un mese",other:"circa {{count}} mesi"},xMonths:{one:"un mese",other:"{{count}} mesi"},aboutXYears:{one:"circa un anno",other:"circa {{count}} anni"},xYears:{one:"un anno",other:"{{count}} anni"},overXYears:{one:"più di un anno",other:"più di {{count}} anni"},almostXYears:{one:"quasi un anno",other:"quasi {{count}} anni"}},uq={date:_Y({formats:{full:"EEEE d MMMM y",long:"d MMMM y",medium:"d MMM y",short:"dd/MM/y"},defaultWidth:"full"}),time:_Y({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:_Y({formats:{full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},defaultWidth:"full"})},cq=["domenica","lunedì","martedì","mercoledì","giovedì","venerdì","sabato"];function dq(e){return"'"+cq[e]+" alle' p"}const hq={lastWeek:(e,t,n)=>{const i=e.getDay();return oX(e,t,n)?dq(i):function(e){return 0===e?"'domenica scorsa alle' p":"'"+cq[e]+" scorso alle' p"}(i)},yesterday:"'ieri alle' p",today:"'oggi alle' p",tomorrow:"'domani alle' p",nextWeek:(e,t,n)=>{const i=e.getDay();return oX(e,t,n)?dq(i):function(e){return 0===e?"'domenica prossima alle' p":"'"+cq[e]+" prossimo alle' p"}(i)},other:"P"},mq={code:"it",formatDistance:(e,t,n)=>{let i;const r=lq[e];return i="string"==typeof r?r:1===t?r.one:r.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"tra "+i:i+" fa":i},formatLong:uq,formatRelative:(e,t,n,i)=>{const r=hq[e];return"function"==typeof r?r(t,n,i):r},localize:{ordinalNumber:(e,t)=>{const n=Number(e);return String(n)},era:wY({values:{narrow:["aC","dC"],abbreviated:["a.C.","d.C."],wide:["avanti Cristo","dopo Cristo"]},defaultWidth:"wide"}),quarter:wY({values:{narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["1º trimestre","2º trimestre","3º trimestre","4º trimestre"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:wY({values:{narrow:["G","F","M","A","M","G","L","A","S","O","N","D"],abbreviated:["gen","feb","mar","apr","mag","giu","lug","ago","set","ott","nov","dic"],wide:["gennaio","febbraio","marzo","aprile","maggio","giugno","luglio","agosto","settembre","ottobre","novembre","dicembre"]},defaultWidth:"wide"}),day:wY({values:{narrow:["D","L","M","M","G","V","S"],short:["dom","lun","mar","mer","gio","ven","sab"],abbreviated:["dom","lun","mar","mer","gio","ven","sab"],wide:["domenica","lunedì","martedì","mercoledì","giovedì","venerdì","sabato"]},defaultWidth:"wide"}),dayPeriod:wY({values:{narrow:{am:"m.",pm:"p.",midnight:"mezzanotte",noon:"mezzogiorno",morning:"mattina",afternoon:"pomeriggio",evening:"sera",night:"notte"},abbreviated:{am:"AM",pm:"PM",midnight:"mezzanotte",noon:"mezzogiorno",morning:"mattina",afternoon:"pomeriggio",evening:"sera",night:"notte"},wide:{am:"AM",pm:"PM",midnight:"mezzanotte",noon:"mezzogiorno",morning:"mattina",afternoon:"pomeriggio",evening:"sera",night:"notte"}},defaultWidth:"wide",formattingValues:{narrow:{am:"m.",pm:"p.",midnight:"mezzanotte",noon:"mezzogiorno",morning:"di mattina",afternoon:"del pomeriggio",evening:"di sera",night:"di notte"},abbreviated:{am:"AM",pm:"PM",midnight:"mezzanotte",noon:"mezzogiorno",morning:"di mattina",afternoon:"del pomeriggio",evening:"di sera",night:"di notte"},wide:{am:"AM",pm:"PM",midnight:"mezzanotte",noon:"mezzogiorno",morning:"di mattina",afternoon:"del pomeriggio",evening:"di sera",night:"di notte"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:CY({matchPattern:/^(\d+)(º)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:kY({matchPatterns:{narrow:/^(aC|dC)/i,abbreviated:/^(a\.?\s?C\.?|a\.?\s?e\.?\s?v\.?|d\.?\s?C\.?|e\.?\s?v\.?)/i,wide:/^(avanti Cristo|avanti Era Volgare|dopo Cristo|Era Volgare)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^a/i,/^(d|e)/i]},defaultParseWidth:"any"}),quarter:kY({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^t[1234]/i,wide:/^[1234](º)? trimestre/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:kY({matchPatterns:{narrow:/^[gfmalsond]/i,abbreviated:/^(gen|feb|mar|apr|mag|giu|lug|ago|set|ott|nov|dic)/i,wide:/^(gennaio|febbraio|marzo|aprile|maggio|giugno|luglio|agosto|settembre|ottobre|novembre|dicembre)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^g/i,/^f/i,/^m/i,/^a/i,/^m/i,/^g/i,/^l/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ge/i,/^f/i,/^mar/i,/^ap/i,/^mag/i,/^gi/i,/^l/i,/^ag/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:kY({matchPatterns:{narrow:/^[dlmgvs]/i,short:/^(do|lu|ma|me|gi|ve|sa)/i,abbreviated:/^(dom|lun|mar|mer|gio|ven|sab)/i,wide:/^(domenica|luned[i|ì]|marted[i|ì]|mercoled[i|ì]|gioved[i|ì]|venerd[i|ì]|sabato)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^d/i,/^l/i,/^m/i,/^m/i,/^g/i,/^v/i,/^s/i],any:[/^d/i,/^l/i,/^ma/i,/^me/i,/^g/i,/^v/i,/^s/i]},defaultParseWidth:"any"}),dayPeriod:kY({matchPatterns:{narrow:/^(a|m\.|p|mezzanotte|mezzogiorno|(di|del) (mattina|pomeriggio|sera|notte))/i,any:/^([ap]\.?\s?m\.?|mezzanotte|mezzogiorno|(di|del) (mattina|pomeriggio|sera|notte))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mezza/i,noon:/^mezzo/i,morning:/mattina/i,afternoon:/pomeriggio/i,evening:/sera/i,night:/notte/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:4}},pq={lessThanXSeconds:{one:"mindre än en sekund",other:"mindre än {{count}} sekunder"},xSeconds:{one:"en sekund",other:"{{count}} sekunder"},halfAMinute:"en halv minut",lessThanXMinutes:{one:"mindre än en minut",other:"mindre än {{count}} minuter"},xMinutes:{one:"en minut",other:"{{count}} minuter"},aboutXHours:{one:"ungefär en timme",other:"ungefär {{count}} timmar"},xHours:{one:"en timme",other:"{{count}} timmar"},xDays:{one:"en dag",other:"{{count}} dagar"},aboutXWeeks:{one:"ungefär en vecka",other:"ungefär {{count}} veckor"},xWeeks:{one:"en vecka",other:"{{count}} veckor"},aboutXMonths:{one:"ungefär en månad",other:"ungefär {{count}} månader"},xMonths:{one:"en månad",other:"{{count}} månader"},aboutXYears:{one:"ungefär ett år",other:"ungefär {{count}} år"},xYears:{one:"ett år",other:"{{count}} år"},overXYears:{one:"över ett år",other:"över {{count}} år"},almostXYears:{one:"nästan ett år",other:"nästan {{count}} år"}},fq=["noll","en","två","tre","fyra","fem","sex","sju","åtta","nio","tio","elva","tolv"],gq={date:_Y({formats:{full:"EEEE d MMMM y",long:"d MMMM y",medium:"d MMM y",short:"y-MM-dd"},defaultWidth:"full"}),time:_Y({formats:{full:"'kl'. HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:_Y({formats:{full:"{{date}} 'kl.' {{time}}",long:"{{date}} 'kl.' {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},defaultWidth:"full"})},_q={lastWeek:"'i' EEEE's kl.' p",yesterday:"'igår kl.' p",today:"'idag kl.' p",tomorrow:"'imorgon kl.' p",nextWeek:"EEEE 'kl.' p",other:"P"},vq={code:"sv",formatDistance:(e,t,n)=>{let i;const r=pq[e];return i="string"==typeof r?r:1===t?r.one:r.other.replace("{{count}}",t<13?fq[t]:String(t)),n?.addSuffix?n.comparison&&n.comparison>0?"om "+i:i+" sedan":i},formatLong:gq,formatRelative:(e,t,n,i)=>_q[e],localize:{ordinalNumber:(e,t)=>{const n=Number(e),i=n%100;if(i>20||i<10)switch(i%10){case 1:case 2:return n+":a"}return n+":e"},era:wY({values:{narrow:["f.Kr.","e.Kr."],abbreviated:["f.Kr.","e.Kr."],wide:["före Kristus","efter Kristus"]},defaultWidth:"wide"}),quarter:wY({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1:a kvartalet","2:a kvartalet","3:e kvartalet","4:e kvartalet"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:wY({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["jan.","feb.","mars","apr.","maj","juni","juli","aug.","sep.","okt.","nov.","dec."],wide:["januari","februari","mars","april","maj","juni","juli","augusti","september","oktober","november","december"]},defaultWidth:"wide"}),day:wY({values:{narrow:["S","M","T","O","T","F","L"],short:["sö","må","ti","on","to","fr","lö"],abbreviated:["sön","mån","tis","ons","tors","fre","lör"],wide:["söndag","måndag","tisdag","onsdag","torsdag","fredag","lördag"]},defaultWidth:"wide"}),dayPeriod:wY({values:{narrow:{am:"fm",pm:"em",midnight:"midnatt",noon:"middag",morning:"morg.",afternoon:"efterm.",evening:"kväll",night:"natt"},abbreviated:{am:"f.m.",pm:"e.m.",midnight:"midnatt",noon:"middag",morning:"morgon",afternoon:"efterm.",evening:"kväll",night:"natt"},wide:{am:"förmiddag",pm:"eftermiddag",midnight:"midnatt",noon:"middag",morning:"morgon",afternoon:"eftermiddag",evening:"kväll",night:"natt"}},defaultWidth:"wide",formattingValues:{narrow:{am:"fm",pm:"em",midnight:"midnatt",noon:"middag",morning:"på morg.",afternoon:"på efterm.",evening:"på kvällen",night:"på natten"},abbreviated:{am:"fm",pm:"em",midnight:"midnatt",noon:"middag",morning:"på morg.",afternoon:"på efterm.",evening:"på kvällen",night:"på natten"},wide:{am:"fm",pm:"em",midnight:"midnatt",noon:"middag",morning:"på morgonen",afternoon:"på eftermiddagen",evening:"på kvällen",night:"på natten"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:CY({matchPattern:/^(\d+)(:a|:e)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:kY({matchPatterns:{narrow:/^(f\.? ?Kr\.?|f\.? ?v\.? ?t\.?|e\.? ?Kr\.?|v\.? ?t\.?)/i,abbreviated:/^(f\.? ?Kr\.?|f\.? ?v\.? ?t\.?|e\.? ?Kr\.?|v\.? ?t\.?)/i,wide:/^(före Kristus|före vår tid|efter Kristus|vår tid)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^f/i,/^[ev]/i]},defaultParseWidth:"any"}),quarter:kY({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](:a|:e)? kvartalet/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:kY({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar[s]?|apr|maj|jun[i]?|jul[i]?|aug|sep|okt|nov|dec)\.?/i,wide:/^(januari|februari|mars|april|maj|juni|juli|augusti|september|oktober|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^maj/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:kY({matchPatterns:{narrow:/^[smtofl]/i,short:/^(sö|må|ti|on|to|fr|lö)/i,abbreviated:/^(sön|mån|tis|ons|tors|fre|lör)/i,wide:/^(söndag|måndag|tisdag|onsdag|torsdag|fredag|lördag)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^s/i,/^m/i,/^ti/i,/^o/i,/^to/i,/^f/i,/^l/i]},defaultParseWidth:"any"}),dayPeriod:kY({matchPatterns:{any:/^([fe]\.?\s?m\.?|midn(att)?|midd(ag)?|(på) (morgonen|eftermiddagen|kvällen|natten))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^f/i,pm:/^e/i,midnight:/^midn/i,noon:/^midd/i,morning:/morgon/i,afternoon:/eftermiddag/i,evening:/kväll/i,night:/natt/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:4}},yq=OX(FL.Languages,FL.Languages.en);function bq(e){const{set:t}=Qj.getState();t(e),function(e){const t={da:GX,de:ZX,es:nq,fr:sq,it:mq,enGB:KX,sv:vq};uX({locale:"en"===e?t.enGB:t[e]})}(e)}const wq=new class extends $W{constructor(){super("userDetails",VX)}get(){const{id:e,country:t,language:n,email:i,name:r}=super.get();return{id:e,name:r,country:t,language:n,email:i}}async fetch(){const e=await(async()=>{const e={headers:{Accept:"application/json","Content-Type":"application/json"},method:FL.HTTPRequestMethod.GET},t=await FX(`${jX}/user`,e);if(t.status!==FL.StatusCode.OK){const{message:e}=await t.json();throw new Error("string"==typeof e?e:JSON.stringify(e))}return t.json()})();bq(e.language??yq),super.set(e),super.save()}migrateData(){throw new Error("[UserDetailsManager::migrateData] Purposefully not implemented.")}};var Sq,kq,Cq={},Eq={};function xq(){return kq||(kq=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"calculateActiveInsulin",{enumerable:!0,get:function(){return t.calculateInsulinOnBoard}}),Object.defineProperty(e,"calculateRecommendation",{enumerable:!0,get:function(){return t.calculateRecommendation}}),Object.defineProperty(e,"getReduction",{enumerable:!0,get:function(){return t.getReduction}});var t=function(){if(Sq)return Eq;Sq=1,Object.defineProperty(Eq,"__esModule",{value:!0}),Eq.adjustedInsulinCorrection=n,Eq.calculateInsulinOnBoard=a,Eq.calculateRecommendation=function(t){const{carbohydrateRatio:i,carbohydrates:a,currentBGL:s,insulinSensitivity:u,targetBGL:c,recentBoluses:d,activity:h}=t;if(null===s)throw new Error(e.GlucoseErrors.MissingCurrentBGL);if(s<e.CONSTANTS.GLUCOSE_INPUT_MIN_MMOLL||s>e.CONSTANTS.GLUCOSE_INPUT_MAX_MMOLL)throw new Error(e.GlucoseErrors.OutOfRangeCurrentBGL);const m=h?.activitySettings?.target,p=o(a,i),{activeInsulin:f,adjustedInsulin:g}=n(s,void 0!==m?Math.max(m,c):c,u,d??[]);let _=p+g;const v=_>e.CONSTANTS.INSULIN_DOSE_MAX;_=Math.min(_,e.CONSTANTS.INSULIN_DOSE_MAX);let y=0;if(s<3.9){const e=o(15,i);_-=e,_<0&&(y=Math.max(15,r(_+e,i)))}else{const e=r(_,i);y=Math.max(0,e)}_=Math.max(0,_);const b=h?l(h.activityDuration,h.activitySettings,h.activityIntensity,h.activityDate):null;return b&&(_*=1-b),{bolus:_,carbRecommendation:y,wasLimited:v,activityReduction:b,activeInsulin:f}},Eq.foodBolus=o,Eq.foodRecommendation=r,Eq.fractionOfInsulinStillActive=i,Eq.getInterval=u,Eq.getReduction=l,Eq.insulinStillActive=s,Eq.rawInsulinCorrection=t;var e=NL();function t(e,t,n){return(e-t)/n}function n(e,n,i,r){const o=a(r),s=t(e,n,i);return{activeInsulin:o,adjustedInsulin:Math.max(s-o,Math.min(s,0))}}function i(e){if(e<0)throw new RangeError(`Parameter secondsPassed can't be negative. Found ${e}.`);return 0===e?1:e<5e3?Math.cos((e+500)/5900):e<7e3?-120127e-9*e+1.197151:e<14400?.96-Math.tanh((e-2800)/6e3):0}function r(e,t){return-e*t}function a(e){return e.reduce((e,t)=>e+s(t),0)}function o(e,t){return e/t}function s(e){return e.insulinDose*i(e.secondsPassed)}function l(t,n,i,r){if(t<e.CONSTANTS.ACTIVITY_DURATION_MIN||t>e.CONSTANTS.ACTIVITY_DURATION_MAX)throw new Error(e.ActivityErrors.OutOfRange);const a=r.getTime()+t*e.Milliseconds.Minute,o=(new Date).getTime()>=a,s=u(t,(()=>{if(o)return n.post;if(null===i)throw new Error(e.ActivityErrors.MissingIntensity);return n[i]})());if(null==s)throw new Error(e.ActivityErrors.InvalidInterval);const l=1-s;if(l<e.CONSTANTS.ACTIVITY_REDUCTION_MIN||l>e.CONSTANTS.ACTIVITY_REDUCTION_MAX)throw new Error(e.ActivityErrors.InvalidReduction);return l}function u(e,t){const{fromZero:n,fromThirty:i,fromFortysix:r}=t;return e<=29?n:e<=45?i:r}return Eq}()}(Cq)),Cq}var Iq=xq();const Tq=oV?"/api/v2":zj.HEDIA_API_URL_V2;const Oq=e=>{let t=Rq();t=t.filter(t=>t[0]!==e),qj.set("event/index",JSON.stringify(t))},Rq=()=>{const e=qj.getString("event/index");return void 0===e?[]:JSON.parse(e)},Aq=()=>{const e=qj.getString("event/pendingChanges");return void 0===e?{lastSyncTimestamp:new Date(0).toJSON(),eventUpdates:[],deletedEvents:[]}:JSON.parse(e)},Lq=new class{create=async(e,t)=>{try{e.overwrittenByUUID=void 0;const n=Aq();n.eventUpdates.push({...e,uuidOld:t}),qj.set("event/pendingChanges",JSON.stringify(n));const i=(e,t)=>{if(this.saveLocally(e),void 0!==t){const n=this.getByUUID(t);n.overwrittenByUUID=e.uuid,this.saveLocally(n)}};return oV?(await this.sync(),i(e,t)):(i(e,t),GQ.syncAll().catch(console.error)),!0}catch(n){return console.error(n),!1}};getActiveEvents=()=>{const e=Rq(),t=[];for(const n of e){const[e,i]=n,r=this.getByUUID(e);i>Date.now()-90*FL.Milliseconds.Minute-r.durationSeconds*FL.Milliseconds.Second&&t.push(r)}return t};getEvents=(e,t)=>{let n=Rq();if(void 0!==e){const t=e.getTime();n=n.filter(e=>e[1]>=t)}if(void 0!==t){const e=t.getTime();n=n.filter(t=>t[1]<e)}const i=[];for(const a of n)try{const e=this.getByUUID(a[0]);i.push(e)}catch(r){console.error(r)}return i};sync=async()=>{const e=Aq(),t={method:FL.HTTPRequestMethod.POST,body:JSON.stringify(e),headers:{"Content-Type":"application/json"}},n=await FX(`${Tq}/events`,t),i=await n.json();if(n.status!==FL.StatusCode.OK)throw new Error(`[EventManager::sync] Problem during event synchronization. Server response: ${JSON.stringify(n)}`);const{lastSyncTimestamp:r,eventUpdates:a}=i;for(const l of a)this.saveLocally(l);const o=Aq(),s={lastSyncTimestamp:r,eventUpdates:o.eventUpdates.filter(t=>!e.eventUpdates.map(e=>e.uuid).includes(t.uuid)),deletedEvents:o.deletedEvents.filter(t=>!e.deletedEvents.includes(t))};qj.set("event/pendingChanges",JSON.stringify(s))};getEventWithHighestReduction=e=>{if(!e)throw new Error("[EventManager::getEventWithHighestReduction] Cannot retrieve highest reduction without a provided setting!");const t=this.getActiveEvents();if(!t.length)return;const n=({durationSeconds:t,activityIntensity:n,startTimestamp:i})=>{if(null===i)throw new Error("[EventManager::calculateReduction] Cannot calculate reduction without startTimestamp!");return Iq.getReduction(t/60,e,n,new Date(i))},i=t.sort((e,t)=>n(e)-n(t));return i[i.length-1]};getByUUID=e=>{const t=qj.getString(`event/${e}`);if(void 0===t)throw new Error(`[EventManager::getByUUID] The requested event with UUID ${e} does not exist!`);return JSON.parse(t)};saveLocally=e=>{if(Oq(e.uuid),qj.set(`event/${e.uuid}`,JSON.stringify(e)),!e.deleted&&!e.overwrittenByUUID){let t=Rq();if(null===e.startTimestamp)throw new Error("[EventManager::saveLocally] event.startTimestamp must be non-null.");const n=new Date(e.startTimestamp).getTime();t.push([e.uuid,n]),t=t.sort((e,t)=>t[1]-e[1]),qj.set("event/index",JSON.stringify(t))}}};const Pq=new class{get=()=>{const e=qj.getString("userSettings");if(!e)return{};const t=JSON.parse(e);return t.gender&&!t.biologicalSex&&(t.biologicalSex=t.gender,delete t.gender),t};write=e=>{const t={...e};delete t.gender,qj.set("userSettings",JSON.stringify(t))};getPending=()=>{const e=qj.getString("pendingSettingsChanges");if(!e)return[];return JSON.parse(e).map(e=>(e.gender&&!e.biologicalSex&&(e.biologicalSex=e.gender,delete e.gender),e))};addPending=e=>{const t=this.getPending();t.push(e),qj.set("pendingSettingsChanges",JSON.stringify(t))};removePending=e=>{const t=e.map(e=>e.uuid),n=this.getPending().filter(e=>!t.includes(e.uuid));qj.set("pendingSettingsChanges",JSON.stringify(n))}};var Mq=Object.defineProperty,Dq=Object.getOwnPropertyDescriptor,Nq=(e,t,n,i)=>{for(var r,a=i>1?void 0:i?Dq(t,n):t,o=e.length-1;o>=0;o--)(r=e[o])&&(a=(i?r(t,n,a):r(a))||a);return i&&a&&Mq(t,n,a),a};const Fq=oV?"/api/v2":zj.HEDIA_API_URL_V2;class Bq{_diabetesType;_biologicalSex;_heightCm;_weightKg;_birthDate;_injectionMethod;_glucoseUnit;_treatmentParameters;_glucoseLevelTargets;_fastActingInsulin;_longActingInsulin;_uuid;_activity;_notifications;constructor(){const e=this.getUserSettings();this.updateUserSettings(e),UD(this)}get diabetesType(){return this._diabetesType}get biologicalSex(){return this._biologicalSex}get heightCm(){return this._heightCm}get weightKg(){return this._weightKg}get birthDate(){return this._birthDate}get injectionMethod(){return this._injectionMethod}get glucoseUnit(){return this._glucoseUnit}get treatmentParameters(){return this._treatmentParameters}get glucoseLevelTargets(){return this._glucoseLevelTargets}get fastActingInsulin(){return this._fastActingInsulin}get longActingInsulin(){return this._longActingInsulin}get uuid(){return this._uuid}get activity(){return this._activity}get notifications(){return this._notifications}async setUserSettings(e){const t=this.getUserSettings();e.uuidOld=t.uuid,e.uuid=IX(),e.created=(new Date).toJSON();const n={...t,...e};return Pq.addPending(e),oV?this.syncWeb():(Pq.write(n),this.updateUserSettings(n),GQ.syncAll().catch(console.error),!0)}getUserSettings(){return Pq.get()}async syncWeb(){const e=Pq.getPending();try{const t=await this.makeSyncRequest(e);return Pq.write(t),this.updateUserSettings(t),!0}catch(t){return console.error(t),!1}finally{Pq.removePending(e)}}async sync(){const e=Pq.getPending(),t=await this.makeSyncRequest(e);Pq.write(t),this.updateUserSettings(t),Pq.removePending(e)}reset(){this.updateUserSettings({activity:void 0,birthday:void 0,bloodGlucoseUnits:void 0,created:void 0,diabetesType:void 0,fastActingInsulin:void 0,glucoseLevelTargets:void 0,insulinDependent:void 0,longActingInsulin:void 0,treatmentType:void 0,parameters:void 0,uuid:void 0,uuidOld:void 0,notifications:void 0,biologicalSex:void 0,height:void 0,bloodKetonesUnit:void 0,email:void 0,weight:void 0})}makeSyncRequest=async e=>{const t={headers:{"Content-Type":"application/json"},method:e?FL.HTTPRequestMethod.POST:FL.HTTPRequestMethod.GET,body:e?JSON.stringify(e):void 0},n=await FX(`${Fq}/settings`,t),i=await n.json();if(n.status!==FL.StatusCode.OK)throw new Error(`[UserSettingsManager::makeSyncRequest] - ${JSON.stringify(i.message)}`);return i};updateUserSettings(e){this._diabetesType=e.diabetesType,this._biologicalSex=e.biologicalSex,this._heightCm=e.height,this._weightKg=e.weight,this._birthDate=e.birthday,this._injectionMethod=e.treatmentType,this._glucoseUnit=e.bloodGlucoseUnits,this._treatmentParameters=e.parameters,this._glucoseLevelTargets=e.glucoseLevelTargets,this._fastActingInsulin=e.fastActingInsulin,this._longActingInsulin=e.longActingInsulin,this._uuid=e.uuid,this._activity=e.activity,this._notifications=e.notifications}}function jq(e,t,n){const i={carbohydrateRatio:t,insulinSensitivity:e,startTime:"00:00"},r=["00:00","05:00","09:00","11:00","13:00","18:00","22:00"].map(e=>({insulinSensitivity:i.insulinSensitivity,carbohydrateRatio:i.carbohydrateRatio,startTime:e}));return{overallParameters:i,parameterIntervals:r,use:n}}Nq([fM],Bq.prototype,"_diabetesType",2),Nq([fM],Bq.prototype,"_biologicalSex",2),Nq([fM],Bq.prototype,"_heightCm",2),Nq([fM],Bq.prototype,"_weightKg",2),Nq([fM],Bq.prototype,"_birthDate",2),Nq([fM],Bq.prototype,"_injectionMethod",2),Nq([fM],Bq.prototype,"_glucoseUnit",2),Nq([fM],Bq.prototype,"_treatmentParameters",2),Nq([fM],Bq.prototype,"_glucoseLevelTargets",2),Nq([fM],Bq.prototype,"_fastActingInsulin",2),Nq([fM],Bq.prototype,"_longActingInsulin",2),Nq([fM],Bq.prototype,"_uuid",2),Nq([fM],Bq.prototype,"_activity",2),Nq([fM],Bq.prototype,"_notifications",2),Nq([fD],Bq.prototype,"updateUserSettings",1);const Vq=new Bq,Hq="mmol/L",zq=[0,30],Uq=[0,540],Gq=3.9,Wq=10,Yq=70,$q=180,Xq=e=>{if(e===FL.BloodGlucoseUnit.MMOL_L)return{text:Hq,graphLimits:zq,inputMin:FL.CONSTANTS.GLUCOSE_INPUT_MIN_MMOLL,inputMax:FL.CONSTANTS.GLUCOSE_INPUT_MAX_MMOLL,decimalPlaces:1,placeholder:"-.-",targetInterval:{low:Gq,high:Wq}};if(e===FL.BloodGlucoseUnit.MG_DL)return{text:"mg/dL",graphLimits:Uq,inputMin:20,inputMax:600,decimalPlaces:0,placeholder:"-",targetInterval:{low:Yq,high:$q}};throw new Error(`[glucose::getBGConstants] Unsupported glucose unit! ${e}`)};async function qq(e){return e?e.startsWith("data:image/svg+xml;utf8")&&"android"===lr.OS?function(e){try{return decodeURIComponent(e).split(",").slice(1).join(",")}catch(t){throw new Error(`Decoding ${e} failed with error: ${t}`)}}(e):e.startsWith("data:image/svg+xml;base64")?Zq(e):async function(e){const t=await fetch(e);if(t.ok||0===t.status&&e.startsWith("file://"))return await t.text();throw new Error(`Fetching ${e} failed with status ${t.status}`)}(e):null}const Zq=e=>{const t=decodeURIComponent(e).split(";")[1].split(","),n=t[0],i=t.slice(1).join(",");return Gz.Buffer.from(i,n).toString("utf-8")};const Kq=e=>e.replace(/[A-Z]/g,e=>"-"+e.toLowerCase()),Qq=e=>{if(e){if(1===e.nodeType&&"function"==typeof e.getBoundingClientRect)return e.getBoundingClientRect()}throw new Error("Can not get boundingClientRect of "+e||"undefined")};function Jq(){const e=this.state.touchable.responderID;null!==e&&((e,t)=>{const n=null==e?void 0:e.parentNode;n&&setTimeout(()=>{const i=Qq(n),{height:r,left:a,top:o,width:s}=Qq(e),l=a-i.left,u=o-i.top;t(l,u,s,r,a,o)},0)})(e,this._handleQueryLayout)}function eZ(e){return!!(e.onPress||e.onPressIn||e.onPressOut||e.onLongPress)}var tZ,nZ,iZ,rZ,aZ,oZ;function sZ(e,t){const n=[];if(t&&n.push(...lZ(t)),Array.isArray(e))if("number"==typeof e[0])n.push(`matrix(${e.join(" ")})`);else{const t=function(e){const t={};return null==e||e.forEach(e=>{const n=Object.keys(e);1!==n.length&&console.error("You must specify exactly one property per transform object.");const i=n[0],r=e[i];t[i]=r}),t}(e);n.push(...lZ(t))}else"string"==typeof e&&n.push(e);return n.length?n.join(" "):void 0}function lZ(e){const t=[];return null!=e.translate&&t.push(`translate(${e.translate})`),null==e.translateX&&null==e.translateY||t.push(`translate(${e.translateX||0}, ${e.translateY||0})`),null!=e.scale&&t.push(`scale(${e.scale})`),null==e.scaleX&&null==e.scaleY||t.push(`scale(${e.scaleX||1}, ${e.scaleY||1})`),null!=e.rotation&&t.push(`rotate(${e.rotation})`),null!=e.skewX&&t.push(`skewX(${e.skewX})`),null!=e.skewY&&t.push(`skewY(${e.skewY})`),t}!function(){if(nZ)return tZ;function e(t,n,i,r){this.message=t,this.expected=n,this.found=i,this.location=r,this.name="SyntaxError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,e)}nZ=1,function(e,t){function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n}(e,Error),e.buildMessage=function(e,t){var n,i={literal:function(e){return'"'+a(e.text)+'"'},class:function(e){var t,n="";for(t=0;t<e.parts.length;t++)n+=e.parts[t]instanceof Array?o(e.parts[t][0])+"-"+o(e.parts[t][1]):o(e.parts[t]);return"["+(e.inverted?"^":"")+n+"]"},any:function(e){return"any character"},end:function(e){return"end of input"},other:function(e){return e.description}};function r(e){return e.charCodeAt(0).toString(16).toUpperCase()}function a(e){return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(e){return"\\x0"+r(e)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(e){return"\\x"+r(e)})}function o(e){return e.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(e){return"\\x0"+r(e)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(e){return"\\x"+r(e)})}function s(e){return i[e.type](e)}return"Expected "+function(e){var t,n,i=new Array(e.length);for(t=0;t<e.length;t++)i[t]=s(e[t]);if(i.sort(),i.length>0){for(t=1,n=1;t<i.length;t++)i[t-1]!==i[t]&&(i[n]=i[t],n++);i.length=n}switch(i.length){case 1:return i[0];case 2:return i[0]+" or "+i[1];default:return i.slice(0,-1).join(", ")+", or "+i[i.length-1]}}(e)+" but "+(((n=t)?'"'+a(n)+'"':"end of input")+" found.")},tZ={SyntaxError:e,parse:function(t,n){n=void 0!==n?n:{};var i,r={},a={transformList:ue},o=ue,s=function(e){return e},l=function(e,t){return function(e,t){var n=e[0],i=e[1],r=e[2],a=e[3],o=e[4],s=e[5],l=t[0],u=t[1],c=t[2],d=t[3],h=t[4],m=t[5],p=n*c+i*m+r,f=a*u+o*h;return[n*l+i*d,n*u+i*h,p,a*l+o*d,f,a*c+o*m+s]}(e,t)},u="matrix",c=re("matrix",!1),d="(",h=re("(",!1),m=")",p=re(")",!1),f=function(e,t,n,i,r,a){return[e,n,r,t,i,a]},g="translate",_=re("translate",!1),v=function(e,t){return[1,0,e,0,1,t||0]},y="scale",b=re("scale",!1),w=function(e,t){return[e,0,0,0,null===t?e:t,0]},S="rotate",k=re("rotate",!1),C=function(e,t){var n=Math.cos(Ce*e),i=Math.sin(Ce*e);if(null!==t){var r=t[0],a=t[1];return[n,-i,n*-r+-i*-a+r,i,n,i*-r+n*-a+a]}return[n,-i,0,i,n,0]},E="skewX",x=re("skewX",!1),I=function(e){return[1,Math.tan(Ce*e),0,0,1,0]},T="skewY",O=re("skewY",!1),R=function(e){return[1,0,0,Math.tan(Ce*e),1,0]},A=function(e){return parseFloat(e.join(""))},L=function(e){return parseInt(e.join(""))},P=function(e){return e},M=function(e,t){return[e,t]},D=",",N=re(",",!1),F=function(e){return e.join("")},B=function(e){return e.join("")},j=function(e){return e.join("")},V={type:"other",description:"fractionalConstant"},H=".",z=re(".",!1),U=function(e,t){return[e?e.join(""):null,".",t.join("")].join("")},G=/^[eE]/,W=ae(["e","E"],!1,!1),Y=function(e){return[e[0],e[1],e[2].join("")].join("")},$=/^[+\-]/,X=ae(["+","-"],!1,!1),q=/^[0-9]/,Z=ae([["0","9"]],!1,!1),K=/^[ \t\r\n]/,Q=ae([" ","\t","\r","\n"],!1,!1),J=0,ee=[{line:1,column:1}],te=0,ne=[],ie=0;if("startRule"in n){if(!(n.startRule in a))throw new Error("Can't start parsing from rule \""+n.startRule+'".');o=a[n.startRule]}function re(e,t){return{type:"literal",text:e,ignoreCase:t}}function ae(e,t,n){return{type:"class",parts:e,inverted:t,ignoreCase:n}}function oe(e){var n,i=ee[e];if(i)return i;for(n=e-1;!ee[n];)n--;for(i={line:(i=ee[n]).line,column:i.column};n<e;)10===t.charCodeAt(n)?(i.line++,i.column=1):i.column++,n++;return ee[e]=i,i}function se(e,t){var n=oe(e),i=oe(t);return{start:{offset:e,line:n.line,column:n.column},end:{offset:t,line:i.line,column:i.column}}}function le(e){J<te||(J>te&&(te=J,ne=[]),ne.push(e))}function ue(){var e,t,n,i,a;for(e=J,t=[],n=be();n!==r;)t.push(n),n=be();if(t!==r)if((n=ce())===r&&(n=null),n!==r){for(i=[],a=be();a!==r;)i.push(a),a=be();i!==r?e=t=s(n):(J=e,e=r)}else J=e,e=r;else J=e,e=r;return e}function ce(){var e,t,n,i;if(e=J,(t=de())!==r){for(n=[],i=pe();i!==r;)n.push(i),i=pe();n!==r&&(i=ce())!==r?e=t=l(t,i):(J=e,e=r)}else J=e,e=r;return e===r&&(e=de()),e}function de(){var e;return(e=function(){var e,n,i,a,o,s,l,g,_,v,y,b,w;e=J,t.substr(J,6)===u?(n=u,J+=6):(n=r,0===ie&&le(c));if(n!==r){for(i=[],a=be();a!==r;)i.push(a),a=be();if(i!==r)if(40===t.charCodeAt(J)?(a=d,J++):(a=r,0===ie&&le(h)),a!==r){for(o=[],s=be();s!==r;)o.push(s),s=be();if(o!==r)if((s=he())!==r)if(pe()!==r)if((l=he())!==r)if(pe()!==r)if((g=he())!==r)if(pe()!==r)if((_=he())!==r)if(pe()!==r)if((v=he())!==r)if(pe()!==r)if((y=he())!==r){for(b=[],w=be();w!==r;)b.push(w),w=be();b!==r?(41===t.charCodeAt(J)?(w=m,J++):(w=r,0===ie&&le(p)),w!==r?e=n=f(s,l,g,_,v,y):(J=e,e=r)):(J=e,e=r)}else J=e,e=r;else J=e,e=r;else J=e,e=r;else J=e,e=r;else J=e,e=r;else J=e,e=r;else J=e,e=r;else J=e,e=r;else J=e,e=r;else J=e,e=r;else J=e,e=r;else J=e,e=r}else J=e,e=r;else J=e,e=r}else J=e,e=r;return e}())===r&&(e=function(){var e,n,i,a,o,s,l,u,c;e=J,t.substr(J,9)===g?(n=g,J+=9):(n=r,0===ie&&le(_));if(n!==r){for(i=[],a=be();a!==r;)i.push(a),a=be();if(i!==r)if(40===t.charCodeAt(J)?(a=d,J++):(a=r,0===ie&&le(h)),a!==r){for(o=[],s=be();s!==r;)o.push(s),s=be();if(o!==r)if((s=he())!==r)if((l=me())===r&&(l=null),l!==r){for(u=[],c=be();c!==r;)u.push(c),c=be();u!==r?(41===t.charCodeAt(J)?(c=m,J++):(c=r,0===ie&&le(p)),c!==r?e=n=v(s,l):(J=e,e=r)):(J=e,e=r)}else J=e,e=r;else J=e,e=r;else J=e,e=r}else J=e,e=r;else J=e,e=r}else J=e,e=r;return e}())===r&&(e=function(){var e,n,i,a,o,s,l,u,c;e=J,t.substr(J,5)===y?(n=y,J+=5):(n=r,0===ie&&le(b));if(n!==r){for(i=[],a=be();a!==r;)i.push(a),a=be();if(i!==r)if(40===t.charCodeAt(J)?(a=d,J++):(a=r,0===ie&&le(h)),a!==r){for(o=[],s=be();s!==r;)o.push(s),s=be();if(o!==r)if((s=he())!==r)if((l=me())===r&&(l=null),l!==r){for(u=[],c=be();c!==r;)u.push(c),c=be();u!==r?(41===t.charCodeAt(J)?(c=m,J++):(c=r,0===ie&&le(p)),c!==r?e=n=w(s,l):(J=e,e=r)):(J=e,e=r)}else J=e,e=r;else J=e,e=r;else J=e,e=r}else J=e,e=r;else J=e,e=r}else J=e,e=r;return e}())===r&&(e=function(){var e,n,i,a,o,s,l,u,c;e=J,t.substr(J,6)===S?(n=S,J+=6):(n=r,0===ie&&le(k));if(n!==r){for(i=[],a=be();a!==r;)i.push(a),a=be();if(i!==r)if(40===t.charCodeAt(J)?(a=d,J++):(a=r,0===ie&&le(h)),a!==r){for(o=[],s=be();s!==r;)o.push(s),s=be();if(o!==r)if((s=he())!==r)if(l=function(){var e,t,n,i;e=J,t=pe(),t!==r&&(n=he())!==r&&pe()!==r&&(i=he())!==r?e=t=M(n,i):(J=e,e=r);return e}(),l===r&&(l=null),l!==r){for(u=[],c=be();c!==r;)u.push(c),c=be();u!==r?(41===t.charCodeAt(J)?(c=m,J++):(c=r,0===ie&&le(p)),c!==r?e=n=C(s,l):(J=e,e=r)):(J=e,e=r)}else J=e,e=r;else J=e,e=r;else J=e,e=r}else J=e,e=r;else J=e,e=r}else J=e,e=r;return e}())===r&&(e=function(){var e,n,i,a,o,s,l,u;e=J,t.substr(J,5)===E?(n=E,J+=5):(n=r,0===ie&&le(x));if(n!==r){for(i=[],a=be();a!==r;)i.push(a),a=be();if(i!==r)if(40===t.charCodeAt(J)?(a=d,J++):(a=r,0===ie&&le(h)),a!==r){for(o=[],s=be();s!==r;)o.push(s),s=be();if(o!==r)if((s=he())!==r){for(l=[],u=be();u!==r;)l.push(u),u=be();l!==r?(41===t.charCodeAt(J)?(u=m,J++):(u=r,0===ie&&le(p)),u!==r?e=n=I(s):(J=e,e=r)):(J=e,e=r)}else J=e,e=r;else J=e,e=r}else J=e,e=r;else J=e,e=r}else J=e,e=r;return e}())===r&&(e=function(){var e,n,i,a,o,s,l,u;e=J,t.substr(J,5)===T?(n=T,J+=5):(n=r,0===ie&&le(O));if(n!==r){for(i=[],a=be();a!==r;)i.push(a),a=be();if(i!==r)if(40===t.charCodeAt(J)?(a=d,J++):(a=r,0===ie&&le(h)),a!==r){for(o=[],s=be();s!==r;)o.push(s),s=be();if(o!==r)if((s=he())!==r){for(l=[],u=be();u!==r;)l.push(u),u=be();l!==r?(41===t.charCodeAt(J)?(u=m,J++):(u=r,0===ie&&le(p)),u!==r?e=n=R(s):(J=e,e=r)):(J=e,e=r)}else J=e,e=r;else J=e,e=r}else J=e,e=r;else J=e,e=r}else J=e,e=r;return e}()),e}function he(){var e,n,i,a;return e=J,n=J,(i=_e())===r&&(i=null),i!==r?(a=function(){var e,n,i,a;e=J,n=J,i=function(){var e,n,i,a;ie++,e=J,n=ve(),n===r&&(n=null);n!==r?(46===t.charCodeAt(J)?(i=H,J++):(i=r,0===ie&&le(z)),i!==r&&(a=ve())!==r?e=n=U(n,a):(J=e,e=r)):(J=e,e=r);e===r&&(e=J,(n=ve())!==r?(46===t.charCodeAt(J)?(i=H,J++):(i=r,0===ie&&le(z)),i!==r?e=n=j(n):(J=e,e=r)):(J=e,e=r));ie--,e===r&&(n=r,0===ie&&le(V));return e}(),i!==r?((a=ge())===r&&(a=null),a!==r?n=i=[i,a]:(J=n,n=r)):(J=n,n=r);n!==r&&(n=B(n));e=n,e===r&&(e=J,n=J,(i=ve())!==r&&(a=ge())!==r?n=i=[i,a]:(J=n,n=r),n!==r&&(n=j(n)),e=n);return e}(),a!==r?n=i=[i,a]:(J=n,n=r)):(J=n,n=r),n!==r&&(n=A(n)),(e=n)===r&&(e=J,n=J,(i=_e())===r&&(i=null),i!==r?(a=function(){var e,t;e=J,t=ve(),t!==r&&(t=F(t));return e=t,e}(),a!==r?n=i=[i,a]:(J=n,n=r)):(J=n,n=r),n!==r&&(n=L(n)),e=n),e}function me(){var e,t;return e=J,pe()!==r&&(t=he())!==r?e=P(t):(J=e,e=r),e}function pe(){var e,t,n,i,a;if(e=J,t=[],(n=be())!==r)for(;n!==r;)t.push(n),n=be();else t=r;if(t!==r)if((n=fe())===r&&(n=null),n!==r){for(i=[],a=be();a!==r;)i.push(a),a=be();i!==r?e=t=[t,n,i]:(J=e,e=r)}else J=e,e=r;else J=e,e=r;if(e===r)if(e=J,(t=fe())!==r){for(n=[],i=be();i!==r;)n.push(i),i=be();n!==r?e=t=[t,n]:(J=e,e=r)}else J=e,e=r;return e}function fe(){var e;return 44===t.charCodeAt(J)?(e=D,J++):(e=r,0===ie&&le(N)),e}function ge(){var e,n,i,a;return e=J,G.test(t.charAt(J))?(n=t.charAt(J),J++):(n=r,0===ie&&le(W)),n!==r?((i=_e())===r&&(i=null),i!==r&&(a=ve())!==r?e=n=[n,i,a]:(J=e,e=r)):(J=e,e=r),e!==r&&(e=Y(e)),e}function _e(){var e;return $.test(t.charAt(J))?(e=t.charAt(J),J++):(e=r,0===ie&&le(X)),e}function ve(){var e,t;if(e=[],(t=ye())!==r)for(;t!==r;)e.push(t),t=ye();else e=r;return e}function ye(){var e;return q.test(t.charAt(J))?(e=t.charAt(J),J++):(e=r,0===ie&&le(Z)),e}function be(){var e;return K.test(t.charAt(J))?(e=t.charAt(J),J++):(e=r,0===ie&&le(Q)),e}var we,Se,ke,Ce=Math.PI/180;if((i=o())!==r&&J===t.length)return i;throw i!==r&&J<t.length&&le({type:"end"}),we=ne,Se=te<t.length?t.charAt(te):null,ke=te<t.length?se(te,te+1):se(te,te),new e(e.buildMessage(we,Se),we,Se,ke)}}}(),function(){if(rZ)return iZ;function e(t,n,i,r){var a=Error.call(this,t);return Object.setPrototypeOf&&Object.setPrototypeOf(a,e.prototype),a.expected=n,a.found=i,a.location=r,a.name="SyntaxError",a}function t(e,t,n){return n=n||" ",e.length>t?e:(t-=e.length,e+(n+=n.repeat(t)).slice(0,t))}rZ=1,function(e,t){function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n}(e,Error),e.prototype.format=function(e){var n="Error: "+this.message;if(this.location){var i,r=null;for(i=0;i<e.length;i++)if(e[i].source===this.location.source){r=e[i].text.split(/\r\n|\n|\r/g);break}var a=this.location.start,o=this.location.source&&"function"==typeof this.location.source.offset?this.location.source.offset(a):a,s=this.location.source+":"+o.line+":"+o.column;if(r){var l=this.location.end,u=t("",o.line.toString().length," "),c=r[a.line-1],d=(a.line===l.line?l.column:c.length+1)-a.column||1;n+="\n --\x3e "+s+"\n"+u+" |\n"+o.line+" | "+c+"\n"+u+" | "+t("",a.column-1," ")+t("",d,"^")}else n+="\n at "+s}return n},e.buildMessage=function(e,t){var n,i={literal:function(e){return'"'+a(e.text)+'"'},class:function(e){var t=e.parts.map(function(e){return Array.isArray(e)?o(e[0])+"-"+o(e[1]):o(e)});return"["+(e.inverted?"^":"")+t.join("")+"]"},any:function(){return"any character"},end:function(){return"end of input"},other:function(e){return e.description}};function r(e){return e.charCodeAt(0).toString(16).toUpperCase()}function a(e){return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(e){return"\\x0"+r(e)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(e){return"\\x"+r(e)})}function o(e){return e.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(e){return"\\x0"+r(e)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(e){return"\\x"+r(e)})}function s(e){return i[e.type](e)}return"Expected "+function(e){var t,n,i=e.map(s);if(i.sort(),i.length>0){for(t=1,n=1;t<i.length;t++)i[t-1]!==i[t]&&(i[n]=i[t],n++);i.length=n}switch(i.length){case 1:return i[0];case 2:return i[0]+" or "+i[1];default:return i.slice(0,-1).join(", ")+", or "+i[i.length-1]}}(e)+" but "+(((n=t)?'"'+a(n)+'"':"end of input")+" found.")},iZ={StartRules:["start"],SyntaxError:e,parse:function(t,n){var i,r,a,o,s={},l=(n=void 0!==n?n:{}).grammarSource,u={start:ge},c=ge,d="matrix(",h=")",m="translate(",p="scale(",f="rotate(",g="skewX(",_="skewY(",v=".",y="e",b=/^[ \t\n\r,]/,w=/^[ \t\n\r]/,S=/^[+\-]/,k=/^[0-9]/,C=he("transform functions"),E=he("transformFunctions"),x=he("transform function"),I=he("matrix"),T=ce("matrix(",!1),O=ce(")",!1),R=he("translate"),A=ce("translate(",!1),L=he("scale"),P=ce("scale(",!1),M=he("rotate"),D=ce("rotate(",!1),N=he("x, y"),F=he("skewX"),B=ce("skewX(",!1),j=he("skewY"),V=ce("skewY(",!1),H=he("space or comma"),z=de([" ","\t","\n","\r",","],!1,!1),U=he("whitespace"),G=de([" ","\t","\n","\r"],!1,!1),W=de(["+","-"],!1,!1),Y=de([["0","9"]],!1,!1),$=ce(".",!1),X=ce("e",!1),q=function(e,t){const n=Array.isArray(e)?e:[e];return t.forEach(e=>{Array.isArray(e[1])?n.push(...e[1]):n.push(e[1])}),n},Z=function(e,t,n,i,r,a,o,s,l){return{matrix:[e,t,n,i,r,a,o,s,l]}},K=function(e,t){return null==t?{translate:e}:{translate:[e,t]}},Q=function(e,t){return null==t?{scale:e}:[{scaleX:e},{scaleY:t}]},J=function(e,t){return null!==t?{rotate:`${e}deg`}:[{rotate:`${e}deg`}]},ee=function(e,t){return[e,t]},te=function(e){return[{skewX:`${e}deg`}]},ne=function(e){return[{skewY:`${e}deg`}]},ie=function(){return parseFloat(t.substring(ae,re))},re=0|n.peg$currPos,ae=re,oe=[{line:1,column:1}],se=re,le=n.peg$maxFailExpected||[],ue=0|n.peg$silentFails;if(n.startRule){if(!(n.startRule in u))throw new Error("Can't start parsing from rule \""+n.startRule+'".');c=u[n.startRule]}function ce(e,t){return{type:"literal",text:e,ignoreCase:t}}function de(e,t,n){return{type:"class",parts:e,inverted:t,ignoreCase:n}}function he(e){return{type:"other",description:e}}function me(e){var n,i=oe[e];if(i)return i;if(e>=oe.length)n=oe.length-1;else for(n=e;!oe[--n];);for(i={line:(i=oe[n]).line,column:i.column};n<e;)10===t.charCodeAt(n)?(i.line++,i.column=1):i.column++,n++;return oe[e]=i,i}function pe(e,t,n){var i=me(e),r=me(t);return{source:l,start:{offset:e,line:i.line,column:i.column},end:{offset:t,line:r.line,column:r.column}}}function fe(e){re<se||(re>se&&(se=re,le=[]),le.push(e))}function ge(){var e;return ue++,e=function(){var e,t,n,i,r,a;if(ue++,e=re,(t=_e())!==s){for(n=[],i=re,r=ye(),(a=_e())!==s?i=r=[r,a]:(re=i,i=s);i!==s;)n.push(i),i=re,r=ye(),(a=_e())!==s?i=r=[r,a]:(re=i,i=s);ae=e,e=q(t,n)}else re=e,e=s;ue--,e===s&&(t=s,0===ue&&fe(E));return e}(),ue--,e===s&&0===ue&&fe(C),e}function _e(){var e;return ue++,(e=function(){var e,n,i,r,a,o,l,u,c,m,p,f;ue++,e=re,ye(),t.substr(re,7)===d?(n=d,re+=7):(n=s,0===ue&&fe(T));n!==s?(ye(),(i=be())!==s?(ve(),(r=be())!==s?(ve(),(a=be())!==s?(ve(),(o=be())!==s?(ve(),(l=be())!==s?(ve(),(u=be())!==s?(ve(),(c=be())!==s?(ve(),(m=be())!==s?(ve(),(p=be())!==s?(ye(),41===t.charCodeAt(re)?(f=h,re++):(f=s,0===ue&&fe(O)),f!==s?(ye(),ae=e,e=Z(i,r,a,o,l,u,c,m,p)):(re=e,e=s)):(re=e,e=s)):(re=e,e=s)):(re=e,e=s)):(re=e,e=s)):(re=e,e=s)):(re=e,e=s)):(re=e,e=s)):(re=e,e=s)):(re=e,e=s)):(re=e,e=s);ue--,e===s&&0===ue&&fe(I);return e}())===s&&(e=function(){var e,n,i,r,a;ue++,e=re,ye(),t.substr(re,10)===m?(n=m,re+=10):(n=s,0===ue&&fe(A));n!==s?(ye(),(i=be())!==s?(ve(),(r=be())===s&&(r=null),ye(),41===t.charCodeAt(re)?(a=h,re++):(a=s,0===ue&&fe(O)),a!==s?(ye(),ae=e,e=K(i,r)):(re=e,e=s)):(re=e,e=s)):(re=e,e=s);ue--,e===s&&0===ue&&fe(R);return e}())===s&&(e=function(){var e,n,i,r,a;ue++,e=re,ye(),t.substr(re,6)===p?(n=p,re+=6):(n=s,0===ue&&fe(P));n!==s?(ye(),(i=be())!==s?(ve(),(r=be())===s&&(r=null),ye(),41===t.charCodeAt(re)?(a=h,re++):(a=s,0===ue&&fe(O)),a!==s?(ye(),ae=e,e=Q(i,r)):(re=e,e=s)):(re=e,e=s)):(re=e,e=s);ue--,e===s&&0===ue&&fe(L);return e}())===s&&(e=function(){var e,n,i,r,a;ue++,e=re,ye(),t.substr(re,7)===f?(n=f,re+=7):(n=s,0===ue&&fe(D));n!==s?(ye(),(i=be())!==s?(r=function(){var e,t,n;ue++,e=re,ve(),t=be(),t!==s?(ve(),(n=be())!==s?(ae=e,e=ee(t,n)):(re=e,e=s)):(re=e,e=s);ue--,e===s&&0===ue&&fe(N);return e}(),r===s&&(r=null),ye(),41===t.charCodeAt(re)?(a=h,re++):(a=s,0===ue&&fe(O)),a!==s?(ye(),ae=e,e=J(i,r)):(re=e,e=s)):(re=e,e=s)):(re=e,e=s);ue--,e===s&&0===ue&&fe(M);return e}())===s&&(e=function(){var e,n,i,r;ue++,e=re,ye(),t.substr(re,6)===g?(n=g,re+=6):(n=s,0===ue&&fe(B));n!==s?(ye(),(i=be())!==s?(ye(),41===t.charCodeAt(re)?(r=h,re++):(r=s,0===ue&&fe(O)),r!==s?(ye(),ae=e,e=te(i)):(re=e,e=s)):(re=e,e=s)):(re=e,e=s);ue--,e===s&&0===ue&&fe(F);return e}())===s&&(e=function(){var e,n,i,r;ue++,e=re,ye(),t.substr(re,6)===_?(n=_,re+=6):(n=s,0===ue&&fe(V));n!==s?(ye(),(i=be())!==s?(ye(),41===t.charCodeAt(re)?(r=h,re++):(r=s,0===ue&&fe(O)),r!==s?(ye(),ae=e,e=ne(i)):(re=e,e=s)):(re=e,e=s)):(re=e,e=s);ue--,e===s&&0===ue&&fe(j);return e}()),ue--,e===s&&0===ue&&fe(x),e}function ve(){var e,n;for(ue++,e=[],n=t.charAt(re),b.test(n)?re++:(n=s,0===ue&&fe(z));n!==s;)e.push(n),n=t.charAt(re),b.test(n)?re++:(n=s,0===ue&&fe(z));return ue--,n=s,0===ue&&fe(H),e}function ye(){var e,n;for(ue++,e=[],n=t.charAt(re),w.test(n)?re++:(n=s,0===ue&&fe(G));n!==s;)e.push(n),n=t.charAt(re),w.test(n)?re++:(n=s,0===ue&&fe(G));return ue--,n=s,0===ue&&fe(U),e}function be(){var e,n,i,r,a,o,l,u;for(e=re,n=t.charAt(re),S.test(n)?re++:(n=s,0===ue&&fe(W)),n===s&&(n=null),i=re,r=[],a=t.charAt(re),k.test(a)?re++:(a=s,0===ue&&fe(Y));a!==s;)r.push(a),a=t.charAt(re),k.test(a)?re++:(a=s,0===ue&&fe(Y));if(46===t.charCodeAt(re)?(a=v,re++):(a=s,0===ue&&fe($)),a!==s){if(o=[],l=t.charAt(re),k.test(l)?re++:(l=s,0===ue&&fe(Y)),l!==s)for(;l!==s;)o.push(l),l=t.charAt(re),k.test(l)?re++:(l=s,0===ue&&fe(Y));else o=s;o!==s?i=r=[r,a,o]:(re=i,i=s)}else re=i,i=s;if(i===s)if(i=[],r=t.charAt(re),k.test(r)?re++:(r=s,0===ue&&fe(Y)),r!==s)for(;r!==s;)i.push(r),r=t.charAt(re),k.test(r)?re++:(r=s,0===ue&&fe(Y));else i=s;if(i!==s){if(r=re,101===t.charCodeAt(re)?(a=y,re++):(a=s,0===ue&&fe(X)),a!==s){if(o=t.charAt(re),S.test(o)?re++:(o=s,0===ue&&fe(W)),o===s&&(o=null),l=[],u=t.charAt(re),k.test(u)?re++:(u=s,0===ue&&fe(Y)),u!==s)for(;u!==s;)l.push(u),u=t.charAt(re),k.test(u)?re++:(u=s,0===ue&&fe(Y));else l=s;l!==s?r=a=[a,o,l]:(re=r,r=s)}else re=r,r=s;r===s&&(r=null),ae=e,e=ie()}else re=e,e=s;return e}if(i=c(),n.peg$library)return{peg$result:i,peg$currPos:re,peg$FAILED:s,peg$maxFailExpected:le,peg$maxFailPos:se};if(i!==s&&re===t.length)return i;throw i!==s&&re<t.length&&fe({type:"end"}),r=le,a=se<t.length?t.charAt(se):null,o=se<t.length?pe(se,se+1):pe(se,se),new e(e.buildMessage(r,a),r,a,o)}}}();var uZ=function(){if(oZ)return aZ;oZ=1;const e=[];return aZ={registerAsset:function(t){return e.push(t)},getAssetByID:function(t){return e[t-1]}}}();const cZ=/^(data:image\/svg\+xml;utf8,)(.*)/;const dZ=(e,t=e.props)=>{const{transform:n,origin:i,originX:r,originY:a,fontFamily:o,fontSize:s,fontWeight:l,fontStyle:u,style:c,forwardedRef:d,gradientTransform:h,patternTransform:m,onPress:p,...f}=t,g={...eZ(t)?{onStartShouldSetResponder:e.touchableHandleStartShouldSetResponder,onResponderTerminationRequest:e.touchableHandleResponderTerminationRequest,onResponderGrant:e.touchableHandleResponderGrant,onResponderMove:e.touchableHandleResponderMove,onResponderRelease:e.touchableHandleResponderRelease,onResponderTerminate:e.touchableHandleResponderTerminate}:null,...f};null!=i?g["transform-origin"]=i.toString().replace(","," "):null==r&&null==a||(g["transform-origin"]=`${r||0} ${a||0}`);const _=sZ(n,t);_&&(g.transform=_);const v=sZ(h);v&&(g.gradientTransform=v);const y=sZ(m);y&&(g.patternTransform=y),g.ref=t=>{e.elementRef.current=t,"function"==typeof d?d(t):d&&(d.current=t)};const b={};var w,S,k;(null!=o&&(b.fontFamily=o),null!=s&&(b.fontSize=s),null!=l&&(b.fontWeight=l),null!=u&&(b.fontStyle=u),g.style=(S=b,(w=c)?Ei?[w,S]:w[Symbol.iterator]?Object.assign({},...w,S):Object.assign({},w,S):S),null!==p&&(g.onClick=t.onPress),null!==t.href&&void 0!==t.href)&&(g.href=null===(k=function(e){let t={};if("number"==typeof e){const n=uZ.getAssetByID(e);if(null==n)throw new Error(`Image: asset with ID "${e}" could not be found. Please check the image source or packager.`);if(t={width:n.width,height:n.height,scale:n.scales[0]},n.scales.length>1){const e=Ws.get();t.scale=n.scales.reduce((t,n)=>Math.abs(n-e)<Math.abs(t-e)?n:t)}const i=1!==t.scale?`@${t.scale}x`:"";t.uri=n?`${n.httpServerLocation}/${n.name}${i}.${n.type}`:""}else"string"==typeof e?t.uri=e:e&&!Array.isArray(e)&&"string"==typeof e.uri&&(t.uri=e.uri);if(t.uri){var n;const e=null===(n=t)||void 0===n||null===(n=n.uri)||void 0===n?void 0:n.match(cZ);if(e){const[,n,i]=e,r=encodeURIComponent(i);return t.uri=`${n}${r}`,t}}return t}(t.href))||void 0===k?void 0:k.uri);return g};function hZ(e){return`rgba(${e>>16&255},${e>>8&255},${255&e},${((e>>24&255)/255).toFixed(2)})`}const mZ={top:20,left:20,right:20,bottom:30},{Mixin:pZ}=im,{touchableHandleStartShouldSetResponder:fZ,touchableHandleResponderTerminationRequest:gZ,touchableHandleResponderGrant:_Z,touchableHandleResponderMove:vZ,touchableHandleResponderRelease:yZ,touchableHandleResponderTerminate:bZ,touchableGetInitialState:wZ}=pZ,SZ={...pZ,touchableHandleStartShouldSetResponder(e){const{onStartShouldSetResponder:t}=this.props;return t?t(e):fZ.call(this,e)},touchableHandleResponderTerminationRequest(e){const{onResponderTerminationRequest:t}=this.props;return t?t(e):gZ.call(this,e)},touchableHandleResponderGrant(e){const{onResponderGrant:t}=this.props;return t?t(e):_Z.call(this,e)},touchableHandleResponderMove(e){const{onResponderMove:t}=this.props;return t?t(e):vZ.call(this,e)},touchableHandleResponderRelease(e){const{onResponderRelease:t}=this.props;return t?t(e):yZ.call(this,e)},touchableHandleResponderTerminate(e){const{onResponderTerminate:t}=this.props;return t?t(e):bZ.call(this,e)},touchableHandlePress(e){const{onPress:t}=this.props;t&&t(e)},touchableHandleActivePressIn(e){const{onPressIn:t}=this.props;t&&t(e)},touchableHandleActivePressOut(e){const{onPressOut:t}=this.props;t&&t(e)},touchableHandleLongPress(e){const{onLongPress:t}=this.props;t&&t(e)},touchableGetPressRectOffset(){const{pressRetentionOffset:e}=this.props;return e||mZ},touchableGetHitSlop(){const{hitSlop:e}=this.props;return e},touchableGetHighlightDelayMS(){const{delayPressIn:e}=this.props;return e||0},touchableGetLongPressDelayMS(){const{delayLongPress:e}=this.props;return 0===e?0:e||500},touchableGetPressOutDelayMS(){const{delayPressOut:e}=this.props;return e||0}},kZ=Object.keys(SZ),CZ=kZ.map(e=>SZ[e]),EZ=kZ.length;class xZ extends D.Component{prepareProps(e){return e}elementRef=D.createRef();lastMergedProps={};setNativeProps(e){const t=Object.assign({},this.props,this.lastMergedProps,e.style);this.lastMergedProps=t;const n=dZ(this,this.prepareProps(t)),i=this.elementRef.current;if(i)for(const r of Object.keys(n)){const e=n[r];switch(r){case"ref":case"children":break;case"style":for(const e of[].concat(n.style??[]))Object.assign(i.style,e);break;case"fill":if(e&&"object"==typeof e){const t=e;i.setAttribute("fill",hZ(t.payload))}break;case"stroke":if(e&&"object"==typeof e){const t=e;i.setAttribute("stroke",hZ(t.payload))}break;default:i.setAttribute(Kq(r),e)}}}constructor(e){super(e),eZ(e)&&(e=>{for(let t=0;t<EZ;t++){const n=kZ[t],i=CZ[t];e[n]="function"==typeof i?i.bind(e):i}e.state=wZ()})(this),this._remeasureMetricsOnActivation=Jq.bind(this)}render(){if(!this.tag)throw new Error("When extending `WebShape` you need to overwrite either `tag` or `render`!");return this.lastMergedProps={},Ui(this.tag,dZ(this,this.prepareProps(this.props)))}}class IZ extends xZ{tag="circle"}class TZ extends xZ{tag="clipPath"}class OZ extends xZ{tag="defs"}class RZ extends xZ{tag="ellipse"}class AZ extends xZ{tag="feBlend"}class LZ extends xZ{tag="feColorMatrix"}class PZ extends xZ{tag="feComponentTransfer"}class MZ extends xZ{tag="feComposite"}class DZ extends xZ{tag="feConvolveMatrix"}class NZ extends xZ{tag="feDiffuseLighting"}class FZ extends xZ{tag="feDisplacementMap"}class BZ extends xZ{tag="feDistantLight"}class jZ extends xZ{tag="feDropShadow"}class VZ extends xZ{tag="feFlood"}class HZ extends xZ{tag="feGaussianBlur"}class zZ extends xZ{tag="feImage"}class UZ extends xZ{tag="feMerge"}class GZ extends xZ{tag="feMergeNode"}class WZ extends xZ{tag="feMorphology"}class YZ extends xZ{tag="feOffset"}class $Z extends xZ{tag="fePointLight"}class XZ extends xZ{tag="feSpecularLighting"}class qZ extends xZ{tag="feSpotLight"}class ZZ extends xZ{tag="feTile"}class KZ extends xZ{tag="feTurbulence"}class QZ extends xZ{tag="filter"}class JZ extends xZ{tag="foreignObject"}class eK extends xZ{tag="g";prepareProps(e){const{x:t,y:n,...i}=e;return!t&&!n||i.translate||(i.translate=`${t||0}, ${n||0}`),i}}class tK extends xZ{tag="image"}class nK extends xZ{tag="line"}class iK extends xZ{tag="linearGradient"}class rK extends xZ{tag="marker"}class aK extends xZ{tag="mask"}class oK extends xZ{tag="path"}class sK extends xZ{tag="pattern"}class lK extends xZ{tag="polygon"}class uK extends xZ{tag="polyline"}class cK extends xZ{tag="radialGradient"}class dK extends xZ{tag="rect"}class hK extends xZ{tag="stop"}class mK extends xZ{tag="svg";toDataURL(e,t={}){const n=this.elementRef.current;if(null===n)return;const i=Qq(n),r=Number(t.width)||i.width,a=Number(t.height)||i.height,o=document.createElementNS("http://www.w3.org/2000/svg","svg");o.setAttribute("viewBox",`0 0 ${i.width} ${i.height}`),o.setAttribute("width",String(r)),o.setAttribute("height",String(a)),o.appendChild(n.cloneNode(!0));const s=new window.Image;var l;s.onload=()=>{const t=document.createElement("canvas");t.width=r,t.height=a;const n=t.getContext("2d");null==n||n.drawImage(s,0,0),e(t.toDataURL().replace("data:image/png;base64,",""))},s.src=`data:image/svg+xml;utf8,${l=(new window.XMLSerializer).serializeToString(o),l.replace("<svg",~l.indexOf("xmlns")?"<svg":'<svg xmlns="http://www.w3.org/2000/svg"').replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/{/g,"%7B").replace(/}/g,"%7D").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}`}}let pK=class extends xZ{tag="symbol"};class fK extends xZ{tag="tspan"}let gK=class extends xZ{tag="text"};class _K extends xZ{tag="textPath"}class vK extends xZ{tag="use"}const yK={circle:IZ,clipPath:TZ,defs:OZ,ellipse:RZ,filter:QZ,feBlend:AZ,feColorMatrix:LZ,feComponentTransfer:PZ,feComposite:MZ,feConvolveMatrix:DZ,feDiffuseLighting:NZ,feDisplacementMap:FZ,feDistantLight:BZ,feDropShadow:jZ,feFlood:VZ,feGaussianBlur:HZ,feImage:zZ,feMerge:UZ,feMergeNode:GZ,feMorphology:WZ,feOffset:YZ,fePointLight:$Z,feSpecularLighting:XZ,feSpotLight:qZ,feTile:ZZ,feTurbulence:KZ,foreignObject:JZ,g:eK,image:tK,line:nK,linearGradient:iK,marker:rK,mask:aK,path:oK,pattern:sK,polygon:lK,polyline:uK,radialGradient:cK,rect:dK,stop:hK,svg:mK,symbol:pK,text:gK,textPath:_K,tspan:fK,use:vK};function bK(){return bK=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},bK.apply(null,arguments)}function wK(){return null}function SK({ast:e,override:t}){if(!e)return null;const{props:n,children:i}=e,r=yK.svg;return M.createElement(r,bK({},n,t),i)}const kK=console.error.bind(console);function CK(e){const{onError:t=kK,xml:n,override:i,fallback:r}=e;try{const t=M.useMemo(()=>null!==n?NK(n):null,[n]);return M.createElement(SK,{ast:t,override:i||e})}catch(a){return t(a),r??null}}class EK extends M.Component{state={ast:null};componentDidMount(){this.parse(this.props.xml)}componentDidUpdate(e){const{xml:t}=this.props;t!==e.xml&&this.parse(t)}parse(t){const{onError:n=kK}=this.props;try{this.setState({ast:t?NK(t):null})}catch(e){const i=e;n({...i,message:`[RNSVG] Couldn't parse SVG, reason: ${i.message}`})}}render(){const{props:e,state:{ast:t}}=this;return M.createElement(SK,{ast:t,override:e.override||e})}}class xK extends M.Component{state={xml:null};componentDidMount(){this.fetch(this.props.uri)}componentDidUpdate(e){const{uri:t}=this.props;t!==e.uri&&this.fetch(t)}async fetch(t){try{this.setState({xml:t?await qq(t):null})}catch(e){console.error(e)}}render(){const{props:e,state:{xml:t}}=this;return M.createElement(EK,{xml:t,override:e,onError:e.onError})}}const IK=(e,t)=>t.toUpperCase(),TK=e=>e.replace(/[:-]([a-z])/g,IK);function OK(e,t){if("object"==typeof e){const{Tag:n,props:i,children:r}=e;return null!=i&&i.class&&(i.className=i.class,delete i.class),M.createElement(n,bK({key:t},i),r.map(OK))}return e}function RK(e,t){let n="";for(;t--;)n+=e;return n}const AK=e=>RK(" ",e.length);const LK=/[a-zA-Z0-9:_-]/,PK=/<!--/,MK=/[\s\t\r\n]/,DK=/['"]/;function NK(e,t){const n=e.length;let i,r=null,a=function(){for(;_+1<n&&("<"!==e[_]||!LK.test(e[_+1])&&!PK.test(e.slice(_,_+4)));)_++;return u()},o=null;const s=[];function l(t){const{line:n,column:i,snippet:r}=function(e,t){const n=e.split("\n"),i=n.length;let r=t,a=0;for(;a<i;a++){const{length:e}=n[a];if(!(r>=e))break;r-=e}const o=e.slice(0,t).replace(/^\t+/,AK),s=/(^|\n).*$/.exec(o),l=s&&s[0]||"",u=e.slice(t),c=/.*(\n|$)/.exec(u);return{line:a,column:r,snippet:`${l}${c&&c[0]}\n${RK(" ",l.length)}^`}}(e,_);throw new Error(`${t} (${n}:${i}). If this is valid SVG, it's probably a bug. Please raise an issue\n\n${r}`)}function u(){let t,i="";for(;_<n&&"<"!==(t=e[_]);)i+=t,_+=1;return/\S/.test(i)&&o.push(i),"<"===e[_]?c:u}function c(){const t=e[_];if("?"===t)return u;if("!"===t){const t=_+1;if("--"===e.slice(t,_+3))return d;const n=_+8;if("[CDATA["===e.slice(t,n))return h;if(/doctype/i.test(e.slice(t,n)))return u}if("/"===t)return m;const a=p(),c={},v={tag:a,props:c,children:[],parent:r,Tag:yK[a]||wK};r?o.push(v):i=v,function(t){for(;_<n;){if(!MK.test(e[_]))return;g();const n=p();if(!n)return;let i=!0;g(),"="===e[_]&&(_+=1,g(),i=f(),"id"===n||isNaN(+i)||""===i.trim()||(i=+i)),t[TK(n)]=i}}(c);const{style:y}=c;"string"==typeof y&&(v.styles=y,c.style=function(e){const t={},n=e.split(";").filter(e=>e.trim()),{length:i}=n;for(let r=0;r<i;r++){const e=n[r];if(0!==e.length){const n=e.split(":"),i=n[0],r=n[1];t[TK(i.trim())]=r.trim()}}return t}(y));let b=!1;return"/"===e[_]&&(_+=1,b=!0),">"!==e[_]&&l("Expected >"),b||(r=v,({children:o}=v),s.push(v)),u}function d(){const t=e.indexOf("--\x3e",_);return~t||l("expected --\x3e"),_=t+2,u}function h(){const t=e.indexOf("]]>",_);return~t||l("expected ]]>"),o.push(e.slice(_+7,t)),_=t+2,u}function m(){const t=p();return t||l("Expected tag name"),r&&t!==r.tag&&l(`Expected closing tag </${t}> to match opening tag <${r.tag}>`),g(),">"!==e[_]&&l("Expected >"),s.pop(),r=s[s.length-1],r&&({children:o}=r),u}function p(){let t,i="";for(;_<n&&LK.test(t=e[_]);)i+=t,_+=1;return i}function f(){return DK.test(e[_])?function(){const t=e[_++];let i="",r=!1;for(;_<n;){const n=e[_++];if(n===t&&!r)return i;"\\"!==n||r||(r=!0),i+=r?`\\${n}`:n,r=!1}return i}():function(){let t="";do{const n=e[_];if(" "===n||">"===n||"/"===n)return t;t+=n,_+=1}while(_<n);return t}()}function g(){for(;_<n&&MK.test(e[_]);)_+=1}let _=0;for(;_<n;)a||l("Unexpected character"),a=a(),_+=1;if(a!==u&&l("Unexpected end of input"),i){const e=(t?t(i):i)||i,n=e.children.map(OK),r=e;return r.children=n,r}return null}function FK(e,t){throw Error(`[react-native-svg] You are trying to import a ${t} \`${e}\` that has been moved to a sub-package. Change your import from \`react-native-svg\` to \`react-native-svg/css\`.`)}const BK=Object.freeze(Object.defineProperty({__proto__:null,Circle:IZ,ClipPath:TZ,Defs:OZ,Ellipse:RZ,FeBlend:AZ,FeColorMatrix:LZ,FeComponentTransfer:PZ,FeComposite:MZ,FeConvolveMatrix:DZ,FeDiffuseLighting:NZ,FeDisplacementMap:FZ,FeDistantLight:BZ,FeDropShadow:jZ,FeFlood:VZ,FeFuncA:class extends xZ{tag="feFuncA"},FeFuncB:class extends xZ{tag="feFuncB"},FeFuncG:class extends xZ{tag="feFuncG"},FeFuncR:class extends xZ{tag="feFuncR"},FeGaussianBlur:HZ,FeImage:zZ,FeMerge:UZ,FeMergeNode:GZ,FeMorphology:WZ,FeOffset:YZ,FePointLight:$Z,FeSpecularLighting:XZ,FeSpotLight:qZ,FeTile:ZZ,FeTurbulence:KZ,Filter:QZ,ForeignObject:JZ,G:eK,Image:tK,Line:nK,LinearGradient:iK,LocalSvg:function(){FK("LocalSvg","component")},Marker:rK,Mask:aK,Path:oK,Pattern:sK,Polygon:lK,Polyline:uK,RadialGradient:cK,Rect:dK,Stop:hK,Svg:mK,SvgAst:SK,SvgCss:function(){FK("SvgCss","component")},SvgCssUri:function(){FK("SvgCssUri","component")},SvgFromUri:xK,SvgFromXml:EK,SvgUri:function(e){const{onError:t=kK,uri:n,onLoad:i,fallback:r}=e,[a,o]=M.useState(null),[s,l]=M.useState(!1);return M.useEffect(()=>{n?qq(n).then(e=>{o(e),s&&l(!1),null==i||i()}).catch(e=>{t(e),l(!0)}):o(null)},[t,n,i]),s?r??null:M.createElement(CK,{xml:a,override:e,fallback:r})},SvgWithCss:function(){FK("SvgWithCss","component")},SvgWithCssUri:function(){FK("SvgWithCssUri","component")},SvgXml:CK,Symbol:pK,TSpan:fK,Text:gK,TextPath:_K,Use:vK,WithLocalSvg:function(){FK("WithLocalSvg","component")},camelCase:TK,default:mK,fetchText:qq,inlineStyles:function(){FK("inlineStyles","function")},loadLocalRawResource:function(){FK("loadLocalRawResource","function")},parse:NK},Symbol.toStringTag,{value:"Module"})),jK=e=>M.createElement(mK,{width:28,height:28,viewBox:"0 0 28 28",fill:"none",...e},M.createElement(oK,{fillRule:"evenodd",clipRule:"evenodd",d:"M14.7447 9.05001C15.2398 9.38089 15.822 9.55749 16.4176 9.55749C17.2159 9.55657 17.9813 9.23902 18.5457 8.67452C19.1103 8.11002 19.4278 7.34465 19.4288 6.54632C19.4288 5.95077 19.2521 5.3686 18.9213 4.8734C18.5904 4.37822 18.1201 3.99228 17.5699 3.76437C17.0197 3.53646 16.4142 3.47683 15.8301 3.59301C15.246 3.7092 14.7095 3.99599 14.2883 4.41711C13.8673 4.83823 13.5805 5.37477 13.4643 5.95887C13.3481 6.54299 13.4077 7.14843 13.6356 7.69865C13.8635 8.24886 14.2495 8.71915 14.7447 9.05001ZM15.7169 5.4977C15.9243 5.35912 16.1682 5.28516 16.4176 5.28516C16.752 5.28547 17.0726 5.41843 17.309 5.65488C17.5454 5.89133 17.6784 6.21193 17.6788 6.54632C17.6788 6.79576 17.6048 7.03959 17.4662 7.24699C17.3276 7.45439 17.1307 7.61604 16.9002 7.7115C16.6697 7.80694 16.4162 7.83192 16.1715 7.78326C15.9269 7.7346 15.7022 7.61448 15.5258 7.4381C15.3494 7.26172 15.2293 7.03701 15.1806 6.79236C15.1319 6.54772 15.1569 6.29415 15.2524 6.06369C15.3479 5.83324 15.5095 5.63628 15.7169 5.4977ZM13.2683 22.7677C13.3935 22.8332 13.5327 22.8674 13.674 22.8674C13.8507 22.8669 14.023 22.8129 14.1685 22.7126C14.3139 22.6121 14.4254 22.47 14.4883 22.3051L15.5021 19.6031C15.8009 18.8176 15.78 17.9462 15.444 17.1758C15.1079 16.4056 14.4834 15.7976 13.7043 15.4824L12.925 15.1616C12.7078 15.073 12.5149 14.9342 12.362 14.7564C12.2091 14.5786 12.1007 14.367 12.0459 14.139C11.9909 13.911 11.9909 13.6733 12.0461 13.4453C12.1012 13.2174 12.2097 13.0059 12.3626 12.8282C12.6165 12.5344 12.9754 12.3518 13.3622 12.3195C13.7492 12.2872 14.1334 12.4078 14.4323 12.6556L15.6258 13.6507C16.206 14.1328 16.9365 14.3969 17.6908 14.3974H21.0741C21.3063 14.3974 21.5288 14.3051 21.6929 14.1411C21.857 13.9769 21.9491 13.7545 21.9491 13.5224C21.9491 13.2902 21.857 13.0678 21.6929 12.9036C21.5288 12.7396 21.3063 12.6474 21.0741 12.6474H17.6908C17.3453 12.6468 17.0107 12.526 16.7446 12.3055L15.5523 11.3115C14.8994 10.7709 14.0607 10.5077 13.2159 10.5783C12.3713 10.649 11.5878 11.0479 11.0338 11.6895C10.7016 12.0775 10.4661 12.5388 10.3467 13.0354C10.2274 13.5322 10.2275 14.0501 10.3472 14.5466C10.4669 15.0433 10.7027 15.5045 11.0352 15.8921C11.3677 16.2799 11.7875 16.5833 12.26 16.7774L13.0475 17.0982C13.4043 17.242 13.6904 17.5201 13.8443 17.8727C13.9981 18.2252 14.0074 18.6241 13.87 18.9836L12.8573 21.6856C12.8072 21.8176 12.7901 21.96 12.8071 22.1002C12.8243 22.2406 12.8751 22.3745 12.9555 22.4908C13.0358 22.607 13.1431 22.7021 13.2683 22.7677ZM7.24495 26.2852C6.43735 26.2852 5.64787 26.0456 4.97638 25.5969C4.30488 25.1484 3.78151 24.5105 3.47245 23.7645C3.16339 23.0184 3.08253 22.1973 3.24008 21.4052C3.39764 20.6132 3.78654 19.8855 4.35761 19.3144C4.92867 18.7434 5.65625 18.3545 6.44834 18.197C7.24042 18.0394 8.06145 18.1202 8.80758 18.4293C9.55371 18.7383 10.1914 19.2617 10.6401 19.9332C11.0888 20.6048 11.3283 21.3943 11.3283 22.2018C11.3283 23.2848 10.8981 24.3234 10.1323 25.0892C9.36653 25.855 8.32792 26.2852 7.24495 26.2852ZM7.24495 19.8685C6.78346 19.8685 6.33235 20.0053 5.94863 20.2618C5.56491 20.5181 5.26584 20.8826 5.08924 21.3089C4.91263 21.7353 4.86642 22.2044 4.95645 22.6571C5.04648 23.1096 5.26872 23.5254 5.59505 23.8517C5.92136 24.178 6.33713 24.4003 6.78975 24.4904C7.24237 24.5803 7.71152 24.5341 8.13789 24.3576C8.56425 24.181 8.92866 23.8818 9.18506 23.4981C9.44144 23.1144 9.57828 22.6634 9.57828 22.2018C9.57612 21.5844 9.32935 20.993 8.89199 20.5572C8.45464 20.1213 7.86238 19.8767 7.24495 19.8767V19.8685ZM18.5024 25.5969C19.174 26.0456 19.9633 26.2852 20.771 26.2852C21.8539 26.2852 22.8926 25.855 23.6584 25.0892C24.4241 24.3234 24.8544 23.2848 24.8544 22.2018C24.8544 21.3943 24.6148 20.6048 24.1661 19.9332C23.7174 19.2617 23.0797 18.7383 22.3337 18.4293C21.5875 18.1202 20.7665 18.0394 19.9744 18.197C19.1823 18.3545 18.4547 18.7434 17.8836 19.3144C17.3126 19.8855 16.9237 20.6132 16.7661 21.4052C16.6086 22.1973 16.6894 23.0184 16.9985 23.7645C17.3075 24.5105 17.8309 25.1484 18.5024 25.5969ZM19.4746 20.2618C19.8583 20.0053 20.3095 19.8685 20.771 19.8685V19.8767C21.3884 19.8767 21.9806 20.1213 22.418 20.5572C22.8554 20.993 23.1021 21.5844 23.1044 22.2018C23.1044 22.6634 22.9675 23.1144 22.7111 23.4981C22.4548 23.8818 22.0903 24.181 21.6639 24.3576C21.2376 24.5341 20.7685 24.5803 20.3158 24.4904C19.8631 24.4003 19.4474 24.178 19.1211 23.8517C18.7948 23.5254 18.5726 23.1096 18.4825 22.6571C18.3924 22.2044 18.4386 21.7353 18.6153 21.3089C18.7919 20.8826 19.0909 20.5181 19.4746 20.2618Z",fill:e?.color??wL.iconNavigationBarInactive})),VK=e=>M.createElement(mK,{width:24,height:24,viewBox:"0 0 24 24",fill:"none",...e},M.createElement(oK,{fillRule:"evenodd",clipRule:"evenodd",d:"M16.3935 5.69575C16.3935 6.98075 15.3475 8.02675 14.0625 8.02675C12.7765 8.02675 11.7305 6.98075 11.7305 5.69575C11.7305 4.41075 12.7765 3.36475 14.0625 3.36475C15.3475 3.36475 16.3935 4.41075 16.3935 5.69575ZM11.1694 12.8454L11.8384 13.1213C13.3544 13.7403 14.0934 15.4314 13.5184 16.9704L12.6484 19.2873C12.4984 19.6883 12.1174 19.9363 11.7124 19.9363C11.5954 19.9363 11.4764 19.9153 11.3604 19.8713C10.8434 19.6783 10.5824 19.1014 10.7764 18.5844L11.6454 16.2683C11.8384 15.7503 11.5904 15.1803 11.0794 14.9713L10.4094 14.6953C9.50536 14.3263 8.85336 13.5663 8.62336 12.6143C8.39236 11.6603 8.62636 10.6854 9.26336 9.94138C10.3334 8.69538 12.2274 8.53638 13.4864 9.58838L14.5084 10.4394C14.6914 10.5914 14.9224 10.6744 15.1594 10.6744H18.0604C18.6124 10.6744 19.0604 11.1223 19.0604 11.6743C19.0604 12.2263 18.6124 12.6743 18.0604 12.6743H15.1594C14.4564 12.6743 13.7704 12.4263 13.2294 11.9763L12.2054 11.1243C11.7804 10.7694 11.1424 10.8234 10.7824 11.2433C10.5674 11.4933 10.4894 11.8223 10.5674 12.1433C10.6444 12.4643 10.8644 12.7204 11.1694 12.8454ZM6.20457 21.115C5.10257 21.115 4.20557 20.219 4.20557 19.117C4.20557 18.015 5.10257 17.118 6.20457 17.118C7.30657 17.118 8.20257 18.015 8.20257 19.117C8.20257 20.219 7.30657 21.115 6.20457 21.115ZM6.20457 15.618C4.27557 15.618 2.70557 17.188 2.70557 19.117C2.70557 21.046 4.27557 22.615 6.20457 22.615C8.13357 22.615 9.70257 21.046 9.70257 19.117C9.70257 17.188 8.13357 15.618 6.20457 15.618ZM15.7974 19.117C15.7974 20.219 16.6944 21.115 17.7964 21.115C18.8984 21.115 19.7944 20.219 19.7944 19.117C19.7944 18.015 18.8984 17.118 17.7964 17.118C16.6944 17.118 15.7974 18.015 15.7974 19.117ZM14.2974 19.117C14.2974 17.188 15.8674 15.618 17.7964 15.618C19.7254 15.618 21.2944 17.188 21.2944 19.117C21.2944 21.046 19.7254 22.615 17.7964 22.615C15.8674 22.615 14.2974 21.046 14.2974 19.117Z",fill:e?.color??wL.iconNavigationBarActive})),HK=e=>M.createElement(mK,{width:24,height:24,viewBox:"0 0 24 24",fill:"none",...e},M.createElement(oK,{d:"M11.98 3C12.5309 3 12.9778 3.44676 12.9778 3.99778V10.9822H19.9622C20.5131 10.9822 20.96 11.429 20.96 11.98C20.96 12.2815 20.8262 12.5517 20.615 12.7345C20.4404 12.886 20.2117 12.9778 19.9622 12.9778H12.9778V19.9622C12.9778 20.5133 12.5309 20.96 11.98 20.96C11.4291 20.96 10.9822 20.5133 10.9822 19.9622V12.9778H3.99778C3.44692 12.9778 3 12.531 3 11.98C3 11.429 3.44692 10.9822 3.99778 10.9822H10.9822V3.99778C10.9822 3.44676 11.4291 3 11.98 3Z",fill:e?.color??wL.icon,fillOpacity:.95})),zK=e=>M.createElement(mK,{width:24,height:24,viewBox:"0 0 24 24",fill:"none",...e},M.createElement(oK,{d:"M9.26216 10.0642C9.43989 10.4341 9.28071 10.884 8.90669 11.0642C8.27046 11.364 7.79682 12.0142 7.70112 12.7041C7.64448 13.114 7.26606 13.404 6.85591 13.3442C6.44526 13.2942 6.15864 12.9141 6.21479 12.5041C6.37983 11.3039 7.17085 10.2241 8.26264 9.70412C8.63667 9.52419 9.08442 9.68411 9.26216 10.0642Z",fill:e?.color??wL.iconNavigationBarInactive}),M.createElement(oK,{fillRule:"evenodd",clipRule:"evenodd",d:"M11.4458 7.23465C11.3667 6.69339 11.1977 6.19364 10.9272 5.7742C10.5483 5.19413 9.93601 4.72415 8.93992 4.53421C8.53318 4.45413 8.26707 4.05399 8.34617 3.65409C8.42478 3.24417 8.81883 2.97415 9.22508 3.05423C10.602 3.32401 11.5732 4.0242 12.1841 4.95413C12.6377 5.65262 12.8725 6.44925 12.9595 7.2432C13.4619 7.19974 13.9643 7.11014 14.4673 6.97415C15.1391 6.79422 16.7549 6.53421 18.2949 7.22415C19.9219 7.95413 21.2529 9.63407 21.4541 12.894L21.4555 12.9341C21.48 15.9941 20.5049 18.3039 19.3813 19.884C19.0459 20.3518 18.6968 20.7549 18.3554 21.093C18.1274 21.3188 17.9033 21.5159 17.6894 21.6841C17.4228 21.894 17.165 22.0642 16.9292 22.1941C16.7138 22.3013 16.4653 22.4082 16.2207 22.4416C15.2471 22.6555 14.3613 22.4893 13.6694 22.3042C13.3388 22.2141 12.9721 22.084 12.7471 22.0242C12.4746 21.9441 12.3291 21.9141 12.2495 21.9141C12.1621 21.9141 12.0122 21.9441 11.7431 22.0142C11.6382 22.043 11.4975 22.0854 11.3437 22.1321C11.1777 22.1824 10.9966 22.2373 10.8291 22.2842C10.1328 22.4624 9.24558 22.6306 8.26121 22.4302C8.02244 22.396 7.77976 22.2996 7.56639 22.1841C7.33006 22.0642 7.07225 21.894 6.80564 21.6841C6.27098 21.2642 5.67283 20.6641 5.11375 19.874C3.99119 18.3039 3.01853 15.9941 3.04344 12.9341L3.0449 12.894C3.24607 9.63407 4.57762 7.95413 6.20457 7.22415C7.74461 6.53421 9.35984 6.79422 10.0317 6.97415C10.5039 7.1016 10.9746 7.18851 11.4458 7.23465ZM16.0244 20.9473L16.0307 20.9458C16.0327 20.9453 16.0346 20.9448 16.0366 20.9441C16.0127 20.9541 16.0727 20.9441 16.2295 20.864C16.3711 20.7839 16.5532 20.6741 16.7627 20.5041C17.0688 20.2632 17.4179 19.9368 17.77 19.5137C17.9004 19.3572 18.0312 19.1875 18.1606 19.0041C19.1113 17.6785 19.9717 15.6775 19.9555 12.9714C19.7783 10.1409 18.6846 9.04349 17.6821 8.59427C16.5918 8.10404 15.373 8.28421 14.8574 8.42411C13.1211 8.88407 11.3774 8.88407 9.64109 8.42411C9.12596 8.28421 7.90769 8.10404 6.81736 8.59427C5.8159 9.043 4.72264 10.1385 4.54344 12.9629C4.52537 15.6733 5.38426 17.6772 6.33445 19.0041C6.58494 19.355 6.84129 19.6589 7.08885 19.9165C7.31443 20.1511 7.53269 20.3469 7.7324 20.5041C7.94236 20.6641 8.12498 20.7839 8.26805 20.864C8.37254 20.9172 8.43553 20.9394 8.46092 20.9482C8.4741 20.9529 8.47703 20.9541 8.47117 20.9541H8.53025C9.19432 21.094 9.82908 20.9941 10.4443 20.8342C10.7822 20.7441 11.0141 20.6641 11.3369 20.5742C11.6089 20.4941 11.9355 20.4141 12.2495 20.4141C12.5703 20.4141 12.9038 20.5041 13.1758 20.5842C13.3198 20.6247 13.4482 20.6653 13.5762 20.7058C13.7319 20.7551 13.8872 20.8047 14.0688 20.8542C14.6831 21.0242 15.3032 21.124 15.9409 20.9641C15.957 20.959 15.9731 20.9565 15.9892 20.9539C16.001 20.9521 16.0127 20.9502 16.0244 20.9473Z",fill:e?.color??wL.iconNavigationBarInactive})),UK=e=>M.createElement(mK,{width:24,height:24,viewBox:"0 0 24 24",fill:"none",...e},M.createElement(oK,{fillRule:"evenodd",clipRule:"evenodd",d:"M8.04316 3.60454C8.12202 3.1979 8.51559 2.93219 8.92223 3.01105C10.2992 3.27808 11.2703 3.97422 11.8813 4.91206C12.3804 5.6783 12.6145 6.56644 12.678 7.43902C13.1847 7.39462 13.6915 7.30411 14.1989 7.16747C14.8466 6.99265 16.3988 6.75245 17.8696 7.41069C19.4044 8.09754 20.6958 9.68948 20.892 12.8663C20.8926 12.8761 20.8929 12.886 20.893 12.8958C20.9177 15.8912 19.9638 18.1528 18.8702 19.6843C18.3249 20.4479 17.7434 21.0321 17.2281 21.437C16.9707 21.6392 16.7245 21.8008 16.5023 21.918C16.3043 22.0224 16.091 22.11 15.8887 22.14C14.9514 22.3607 14.0934 22.2028 13.4084 22.0136C13.1979 21.9554 12.9793 21.8866 12.7875 21.8263C12.6801 21.7925 12.5811 21.7613 12.4966 21.7361C12.2263 21.6556 12.0576 21.6208 11.9473 21.6208C11.8313 21.6208 11.6594 21.6545 11.3919 21.7297C11.3049 21.7542 11.2002 21.7855 11.0862 21.8195C10.899 21.8754 10.6868 21.9387 10.4871 21.9917C9.80436 22.1729 8.95309 22.3276 8.01418 22.1412C7.80916 22.1115 7.59125 22.0221 7.38731 21.9141C7.16483 21.7963 6.91848 21.6344 6.6609 21.4319C6.14526 21.0266 5.56418 20.4427 5.01958 19.6798C3.92731 18.1496 2.97639 15.8909 3.00045 12.8959C3.00053 12.886 3.00087 12.8762 3.00148 12.8663C3.19764 9.68942 4.48941 8.09751 6.02425 7.41068C7.49526 6.75242 9.04763 6.99267 9.69485 7.16754C10.1879 7.30029 10.6804 7.3895 11.1727 7.43516C11.1122 6.79573 10.9352 6.2078 10.6244 5.73084C10.2452 5.14868 9.63277 4.67679 8.63665 4.48361C8.23002 4.40475 7.9643 4.01118 8.04316 3.60454ZM8.60309 11.0139C8.97721 10.8361 9.13636 10.3887 8.95857 10.0146C8.78078 9.64044 8.33337 9.48129 7.95925 9.65908C6.86721 10.178 6.07626 11.2571 5.91139 12.4555C5.85494 12.8659 6.14182 13.2443 6.55217 13.3007C6.96252 13.3572 7.34094 13.0703 7.39739 12.66C7.49327 11.963 7.96717 11.3161 8.60309 11.0139Z",fill:e?.color??wL.iconNavigationBarActive})),GK=e=>M.createElement(mK,{width:47,height:56,viewBox:"0 0 47 56",fill:"none",...e},M.createElement(aK,{id:"a",fill:wL.bgBrand},M.createElement(oK,{fillRule:"evenodd",clipRule:"evenodd",d:"M24.762.384L23.5 2.392 22.238.384a2.263 2.263 0 012.524 0zM23.5 5.294l-.476.353c-1.11.83-2.671 2.05-4.452 3.595-3.568 3.096-7.95 7.44-11.389 12.522-3.334 5.412-3.322 12.723-.351 18.76 2.94 5.974 8.685 10.505 16.668 10.505 7.983 0 13.728-4.53 16.668-10.505 2.971-6.037 2.983-13.348-.351-18.76-3.438-5.082-7.821-9.426-11.389-12.522A79.366 79.366 0 0023.5 5.295zM22.238.385L23.5 2.392 24.762.384l.004.004.01.005.029.02.105.072a61.327 61.327 0 011.79 1.29 83.974 83.974 0 014.717 3.808c3.746 3.25 8.474 7.915 12.236 13.488.017.025.035.051.05.078 4.376 7.056 4.208 16.217.605 23.54C40.666 50.086 33.42 55.811 23.5 55.811c-9.92 0-17.166-5.725-20.808-13.124-3.603-7.322-3.771-16.483.604-23.54a2.38 2.38 0 01.05-.077c3.763-5.573 8.49-10.238 12.237-13.488a83.942 83.942 0 014.716-3.809A61.78 61.78 0 0122.09.485l.106-.072.03-.02.009-.005.004-.004zm-9.726 32.127c1.19-.489 2.54.11 3.014 1.338 1.014 2.626 3.2 4.695 6.28 5.059 1.274.15 2.188 1.336 2.042 2.648-.145 1.313-1.296 2.255-2.57 2.105-5.01-.591-8.51-4.016-10.064-8.043-.474-1.228.107-2.619 1.298-3.107z"})),M.createElement(oK,{fillRule:"evenodd",clipRule:"evenodd",d:"M24.762.384L23.5 2.392 22.238.384a2.263 2.263 0 012.524 0zM23.5 5.294l-.476.353c-1.11.83-2.671 2.05-4.452 3.595-3.568 3.096-7.95 7.44-11.389 12.522-3.334 5.412-3.322 12.723-.351 18.76 2.94 5.974 8.685 10.505 16.668 10.505 7.983 0 13.728-4.53 16.668-10.505 2.971-6.037 2.983-13.348-.351-18.76-3.438-5.082-7.821-9.426-11.389-12.522A79.366 79.366 0 0023.5 5.295zM22.238.385L23.5 2.392 24.762.384l.004.004.01.005.029.02.105.072a61.327 61.327 0 011.79 1.29 83.974 83.974 0 014.717 3.808c3.746 3.25 8.474 7.915 12.236 13.488.017.025.035.051.05.078 4.376 7.056 4.208 16.217.605 23.54C40.666 50.086 33.42 55.811 23.5 55.811c-9.92 0-17.166-5.725-20.808-13.124-3.603-7.322-3.771-16.483.604-23.54a2.38 2.38 0 01.05-.077c3.763-5.573 8.49-10.238 12.237-13.488a83.942 83.942 0 014.716-3.809A61.78 61.78 0 0122.09.485l.106-.072.03-.02.009-.005.004-.004zm-9.726 32.127c1.19-.489 2.54.11 3.014 1.338 1.014 2.626 3.2 4.695 6.28 5.059 1.274.15 2.188 1.336 2.042 2.648-.145 1.313-1.296 2.255-2.57 2.105-5.01-.591-8.51-4.016-10.064-8.043-.474-1.228.107-2.619 1.298-3.107z",fill:"url(#paint0_linear_24287_41659)"}),M.createElement(oK,{d:"M24.762.384l.547-.788-.007-.005-.007-.005-.533.798zM23.5 2.392l-.813.51.813 1.294.813-1.293-.813-.511zM22.238.384l-.533-.798-.007.005-.007.005.547.788zm1.262 4.91l.568-.773-.567-.417-.568.417.567.774zm-.476.353l-.575-.769.575.77zm-4.452 3.595l-.63-.725.63.725zM7.183 21.764l-.795-.538-.011.017-.011.017.817.504zm-.351 18.76l-.862.424.862-.424zm33.336 0l.862.424-.862-.424zm-.351-18.76l.817-.504-.01-.017-.012-.017-.795.538zM28.428 9.242l.63-.725-.63.725zm-4.452-3.595l.575-.769-.575.77zm.79-5.26l-.547.79.01.006.01.007.527-.802zm.01.006l.538-.795-.011-.007-.528.802zm.029.02l.54-.793-.002-.002-.538.795zm.105.072l.543-.792-.003-.002-.54.794zm.387.27l.553-.786-.553.785zm1.404 1.02l-.575.768.575-.769zm4.716 3.808l.63-.726-.63.726zM43.653 19.07l.796-.537-.796.537zm.05.078l-.819.5.004.006.816-.506zm.605 23.54l.86.423-.86-.424zm-41.616 0l-.86.423.86-.424zm.604-23.54l-.816-.506.816.506zm.05-.078l-.795-.538.796.538zM15.584 5.583l.629.725-.63-.725zm4.716-3.809l-.574-.769.574.77zm1.404-1.02L21.15-.03l.553.785zm.387-.269l-.54-.794-.003.002.543.792zm.105-.072l-.538-.795-.002.002.54.793zm.03-.02l-.528-.802-.01.007.538.795zm.009-.005l.527.802.01-.007.01-.007-.547-.788zm-6.708 33.46l-.896.347.896-.346zm6.28 5.06l.113-.954-.113.954zm2.042 2.648l-.954-.106.954.106zm-2.57 2.105l.113-.954-.112.954zm-10.064-8.043l-.896.346.896-.346zM23.949-.126L22.687 1.88l1.626 1.022L25.575.895 23.948-.126zm.364 2.007L23.05-.127 21.426.895l1.261 2.008 1.626-1.022zm-1.542-.698a1.303 1.303 0 011.458 0l1.066-1.597a3.223 3.223 0 00-3.59 0l1.066 1.597zm.162 3.338l-.484.357 1.15 1.538c.167-.125.323-.24.469-.347l-1.135-1.548zm-.484.357a80.381 80.381 0 00-4.506 3.64l1.258 1.45A78.456 78.456 0 0123.6 6.415l-1.15-1.538zm-4.506 3.64c-3.603 3.125-8.053 7.53-11.555 12.708l1.59 1.076c3.374-4.988 7.69-9.269 11.223-12.335l-1.258-1.45zM6.366 21.26c-3.533 5.735-3.49 13.401-.396 19.688l1.723-.848c-2.848-5.787-2.828-12.743.308-17.833L6.366 21.26zM5.97 40.948c3.079 6.255 9.132 11.04 17.53 11.04v-1.92c-7.567 0-13.005-4.274-15.807-9.968l-1.723.848zm17.53 11.04c8.398 0 14.451-4.785 17.53-11.04l-1.723-.848c-2.802 5.694-8.24 9.969-15.807 9.969v1.92zm17.53-11.04c3.094-6.287 3.137-13.953-.396-19.688l-1.635 1.007c3.136 5.09 3.156 12.046.308 17.833l1.723.848zm-.418-19.722c-3.502-5.177-7.952-9.582-11.555-12.709L27.8 9.967c3.533 3.066 7.849 7.347 11.223 12.335l1.59-1.076zM29.057 8.517a80.381 80.381 0 00-4.506-3.639L23.4 6.416A78.493 78.493 0 0127.8 9.967l1.258-1.45zm-4.506-3.639a74.094 74.094 0 00-.483-.357L22.932 6.07l.47.347 1.149-1.538zm-1.909-3.623c.014-.006-.075.039-.189.065a.96.96 0 01-.446-.004.963.963 0 01-.573-.409l.012.02c.02.03.058.093.137.219l1.104 1.757 1.626-1.022C23.683.877 23.367.375 23.209.125l-.138-.221-.022-.035a.354.354 0 00-.027-.04.994.994 0 00-.028-.037c-.01-.013-.042-.053-.09-.1-.026-.024-.178-.176-.434-.24-.352-.087-.627.057-.636.061l.808 1.742zm1.671 1.648l1.104-1.757.137-.219.013-.02-.005.007-.017.026a.98.98 0 01-.118.136.96.96 0 01-.88.244c-.114-.026-.203-.071-.19-.065l.809-1.742c.013.007-.076-.038-.19-.064a.96.96 0 00-.446.004c-.256.063-.408.215-.434.24a.996.996 0 00-.137.165l-.008.011-.022.035-.138.22-1.104 1.757 1.626 1.022zm-.099-1.73l.005.003L25.314-.4l-.005-.003-1.095 1.577zm.025.017l.009.006L25.303-.41l-.01-.006L24.24 1.19zm-.002-.002l.03.02 1.076-1.59-.03-.02-1.076 1.59zm.028.02l.105.07 1.08-1.587-.105-.071-1.08 1.587zm.102.069l.378.262L25.85-.03a41.78 41.78 0 00-.397-.276l-1.086 1.584zm.378.262c.326.23.796.567 1.38 1.004l1.15-1.538C26.675.556 26.19.208 25.85-.03l-1.105 1.57zm1.38 1.004c1.17.875 2.803 2.15 4.663 3.765l1.259-1.45a84.98 84.98 0 00-4.772-3.853l-1.15 1.538zm4.663 3.765c3.711 3.22 8.372 7.822 12.07 13.3l1.59-1.075c-3.825-5.668-8.62-10.395-12.401-13.676l-1.259 1.45zm12.07 13.3l.026.041 1.639-1a2.921 2.921 0 00-.074-.115l-1.592 1.074zm.03.047c4.174 6.732 4.04 15.536.558 22.61l1.723.847c3.726-7.571 3.927-17.089-.65-24.47l-1.631 1.013zm.558 22.61C39.942 49.383 33.004 54.851 23.5 54.851v1.92c10.337 0 17.89-5.981 21.669-13.66l-1.723-.848zM23.5 54.851c-9.504 0-16.442-5.468-19.946-12.588l-1.723.848c3.78 7.679 11.332 13.66 21.67 13.66v-1.92zM3.554 42.264c-3.481-7.073-3.616-15.877.558-22.61L2.48 18.644c-4.576 7.38-4.375 16.898-.649 24.47l1.723-.849zm.558-22.61l.03-.046-1.59-1.074a3.299 3.299 0 00-.072.109l1.632 1.012zm.03-.046c3.698-5.478 8.359-10.08 12.07-13.3l-1.258-1.45c-3.781 3.28-8.577 8.007-12.403 13.676l1.591 1.074zm12.07-13.3a82.969 82.969 0 014.662-3.765l-1.15-1.538c-1.2.898-2.87 2.203-4.77 3.852l1.258 1.45zm4.662-3.765a60.944 60.944 0 011.381-1.004L21.15-.03c-.34.24-.824.587-1.425 1.036l1.15 1.538zm1.381-1.004l.378-.262-1.086-1.584-.397.276 1.105 1.57zm.375-.26l.105-.072-1.08-1.587-.105.071 1.08 1.588zm.104-.07l.029-.02-1.077-1.59-.029.02 1.076 1.59zm.018-.013l.01-.006-1.056-1.605-.009.006 1.055 1.605zm.029-.02l.005-.003L21.69-.404l-.005.003 1.095 1.577zM12.876 33.4c.674-.276 1.467.05 1.755.796l1.79-.692c-.66-1.71-2.566-2.58-4.274-1.88l.73 1.776zm1.755.796c1.12 2.9 3.57 5.254 7.063 5.666l.225-1.907c-2.67-.315-4.59-2.1-5.497-4.451l-1.792.692zm7.063 5.666c.724.085 1.29.775 1.2 1.59l1.908.211c.201-1.81-1.06-3.493-2.883-3.708l-.225 1.907zm1.2 1.59c-.09.81-.785 1.341-1.503 1.256l-.225 1.907c1.83.216 3.435-1.137 3.636-2.952l-1.908-.212zm-1.503 1.256c-4.597-.542-7.831-3.68-9.282-7.435l-1.79.692c1.659 4.298 5.422 8.01 10.847 8.65l.225-1.907zm-9.282-7.435c-.293-.758.077-1.59.767-1.873l-.729-1.776c-1.691.694-2.484 2.644-1.829 4.34l1.791-.69z",fill:"url(#paint1_linear_24287_41659)",mask:"url(#a)"}),M.createElement(OZ,null,M.createElement(iK,{id:"paint0_linear_24287_41659",x1:0,y1:0,x2:53.6297,y2:7.33414,gradientUnits:"userSpaceOnUse"},M.createElement(hK,{stopColor:"#A200FF"}),M.createElement(hK,{offset:1e-4,stopColor:"#A200FF"}),M.createElement(hK,{offset:1,stopColor:"#FF8600"})),M.createElement(iK,{id:"paint1_linear_24287_41659",x1:0,y1:0,x2:53.6297,y2:7.33414,gradientUnits:"userSpaceOnUse"},M.createElement(hK,{stopColor:"#A200FF"}),M.createElement(hK,{offset:1e-4,stopColor:"#A200FF"}),M.createElement(hK,{offset:1,stopColor:"#FF8600"})))),WK=e=>M.createElement(mK,{width:24,height:24,viewBox:"0 0 24 24",fill:"none",...e},M.createElement(oK,{fillRule:"evenodd",clipRule:"evenodd",d:"M16.0435 1.6347C16.4575 1.6347 16.7935 1.9707 16.7935 2.3847L16.794 3.23252C18.2541 3.33262 19.4667 3.83275 20.325 4.6928C21.262 5.6338 21.755 6.9868 21.75 8.6098V17.7328C21.75 21.0648 19.634 23.1348 16.229 23.1348H7.771C4.366 23.1348 2.25 21.0358 2.25 17.6568V8.6078C2.25 5.465 4.13706 3.44764 7.21469 3.23286L7.2153 2.3847C7.2153 1.9707 7.5513 1.6347 7.9653 1.6347C8.3793 1.6347 8.7153 1.9707 8.7153 2.3847L8.715 3.2137H15.293L15.2935 2.3847C15.2935 1.9707 15.6295 1.6347 16.0435 1.6347ZM20.25 10.5387H3.75V17.6568C3.75 20.2228 5.178 21.6348 7.771 21.6348H16.229C18.822 21.6348 20.25 20.2488 20.25 17.7328L20.25 10.5387ZM16.4512 16.831C16.8652 16.831 17.2012 17.167 17.2012 17.581C17.2012 17.995 16.8652 18.331 16.4512 18.331C16.0372 18.331 15.6972 17.995 15.6972 17.581C15.6972 17.167 16.0282 16.831 16.4422 16.831H16.4512ZM12.0137 16.831C12.4277 16.831 12.7637 17.167 12.7637 17.581C12.7637 17.995 12.4277 18.331 12.0137 18.331C11.5997 18.331 11.2597 17.995 11.2597 17.581C11.2597 17.167 11.5907 16.831 12.0047 16.831H12.0137ZM7.5669 16.831C7.9809 16.831 8.3169 17.167 8.3169 17.581C8.3169 17.995 7.9809 18.331 7.5669 18.331C7.1529 18.331 6.8119 17.995 6.8119 17.581C6.8119 17.167 7.1439 16.831 7.5579 16.831H7.5669ZM16.4512 12.9443C16.8652 12.9443 17.2012 13.2803 17.2012 13.6943C17.2012 14.1083 16.8652 14.4443 16.4512 14.4443C16.0372 14.4443 15.6972 14.1083 15.6972 13.6943C15.6972 13.2803 16.0282 12.9443 16.4422 12.9443H16.4512ZM12.0137 12.9443C12.4277 12.9443 12.7637 13.2803 12.7637 13.6943C12.7637 14.1083 12.4277 14.4443 12.0137 14.4443C11.5997 14.4443 11.2597 14.1083 11.2597 13.6943C11.2597 13.2803 11.5907 12.9443 12.0047 12.9443H12.0137ZM7.5669 12.9443C7.9809 12.9443 8.3169 13.2803 8.3169 13.6943C8.3169 14.1083 7.9809 14.4443 7.5669 14.4443C7.1529 14.4443 6.8119 14.1083 6.8119 13.6943C6.8119 13.2803 7.1439 12.9443 7.5579 12.9443H7.5669ZM15.293 4.7137H8.715L8.7153 5.6757C8.7153 6.0897 8.3793 6.4257 7.9653 6.4257C7.5513 6.4257 7.2153 6.0897 7.2153 5.6757L7.21477 4.73641C4.97454 4.9246 3.75 6.28256 3.75 8.6078V9.0387H20.25L20.25 8.6078C20.254 7.3728 19.922 6.4128 19.263 5.7528C18.6845 5.17261 17.8389 4.82611 16.7944 4.73689L16.7935 5.6757C16.7935 6.0897 16.4575 6.4257 16.0435 6.4257C15.6295 6.4257 15.2935 6.0897 15.2935 5.6757L15.293 4.7137Z",fill:e?.color??wL.icon})),YK=e=>M.createElement(mK,{width:"40",height:"84",viewBox:"0 0 40 84",...e},M.createElement(oK,{fillRule:"evenodd",clipRule:"evenodd",d:"M40.0001 28.9285V24.5471C39.5337 24.6152 39.0574 24.65 38.5725 24.65C33.7881 24.65 29.7894 21.2357 28.8091 16.675H37.1449V12.325H28.8091C29.7894 7.76427 33.7881 4.35 38.5725 4.35C39.0574 4.35 39.5337 4.3848 40.0001 4.45247V0.0715333C39.5304 0.0241667 39.0545 0 38.5725 0C30.6878 0 24.2964 6.49165 24.2964 14.5C24.2964 22.5084 30.6878 29 38.5725 29C39.0545 29 39.5304 28.9758 40.0001 28.9285Z",fill:wL.icon}),M.createElement(oK,{fillRule:"evenodd",clipRule:"evenodd",d:"M0 14.5C0 22.5084 6.35291 29 14.1901 29C14.7014 29 15.2066 28.9725 15.7037 28.9188V24.533C15.2104 24.6104 14.7047 24.65 14.1901 24.65C8.7042 24.65 4.25703 20.1057 4.25703 14.5C4.25703 8.8943 8.7042 4.35 14.1901 4.35C14.7047 4.35 15.2104 4.38963 15.7037 4.46697V0.0812C15.2066 0.02755 14.7014 0 14.1901 0C6.35291 0 0 6.49165 0 14.5Z",fill:wL.icon}),M.createElement(oK,{fillRule:"evenodd",clipRule:"evenodd",d:"M3.07255 44C4.12117 44 4.89209 43.648 5.38529 42.9439C5.8785 42.2398 6.1251 41.1635 6.1251 39.7152V38.111C6.11177 36.7117 5.85851 35.6767 5.3653 35.006C4.87209 34.3353 4.1034 34 3.05922 34C2.00616 34 1.23302 34.3476 0.739811 35.0428C0.246604 35.738 0 36.8008 0 38.2313V39.8824C0.0177732 41.2504 0.275485 42.2787 0.773136 42.9672C1.27079 43.6557 2.03726 44 3.07255 44ZM3.07255 42.9906C2.45493 42.9906 1.99394 42.74 1.68957 42.2386C1.3852 41.7373 1.23302 40.9608 1.23302 39.9091V37.9305C1.24191 36.9412 1.39076 36.2081 1.67957 35.7313C1.96839 35.2545 2.42827 35.016 3.05922 35.016C3.69461 35.016 4.15894 35.2556 4.4522 35.7346C4.74546 36.2137 4.89209 36.9768 4.89209 38.0241V40.0495C4.87876 41.0655 4.72435 41.8097 4.42887 42.2821C4.13339 42.7545 3.68128 42.9906 3.07255 42.9906ZM15.4217 34.0869V43.8663H14.182V35.6243L11.696 36.5401V35.4171L15.2284 34.0869H15.4217ZM29.0572 43.8663V42.857H24.1851L26.7844 40.0294C28.0019 38.7059 28.6106 37.5651 28.6106 36.607C28.6106 35.8182 28.3485 35.1865 27.8242 34.7119C27.2998 34.2373 26.5867 34 25.6847 34C24.7205 34 23.9507 34.2763 23.3753 34.8289C22.7999 35.3815 22.5122 36.1056 22.5122 37.0013H23.7452C23.7452 36.3775 23.9151 35.8906 24.2551 35.5408C24.595 35.191 25.0715 35.016 25.6847 35.016C26.1957 35.016 26.6045 35.1787 26.911 35.504C27.2176 35.8293 27.3709 36.246 27.3709 36.754C27.3709 37.1328 27.2765 37.4993 27.0877 37.8536C26.8988 38.2079 26.5556 38.668 26.0579 39.234L22.6988 42.9773V43.8663H29.0572ZM39.1469 43.2313C38.5781 43.7438 37.8383 44 36.9275 44C36.0166 44 35.2757 43.7527 34.7047 43.258C34.1337 42.7634 33.8482 42.1105 33.8482 41.2995H35.0879C35.0879 41.8119 35.2545 42.2219 35.5878 42.5294C35.921 42.8369 36.3676 42.9906 36.9275 42.9906C37.5229 42.9906 37.9783 42.8347 38.2938 42.5227C38.6092 42.2108 38.767 41.7629 38.767 41.1791C38.767 40.6132 38.5937 40.1787 38.2471 39.8757C37.9005 39.5726 37.4007 39.4167 36.7475 39.4078H35.8211V38.3984H36.7475C37.3296 38.3895 37.7872 38.2357 38.1205 37.9372C38.4537 37.6386 38.6204 37.2353 38.6204 36.7273C38.6204 35.5865 38.0538 35.016 36.9208 35.016C36.3876 35.016 35.9621 35.1687 35.6444 35.4739C35.3267 35.7792 35.1679 36.1836 35.1679 36.6872H33.9349C33.9349 35.9162 34.2159 35.2756 34.778 34.7654C35.3401 34.2551 36.0543 34 36.9208 34C37.8361 34 38.5537 34.2429 39.0736 34.7286C39.5934 35.2143 39.8534 35.8895 39.8534 36.754C39.8534 37.1774 39.7167 37.5873 39.4435 37.984C39.1702 38.3806 38.7981 38.6769 38.3271 38.873C38.8603 39.0423 39.2724 39.3231 39.5634 39.7152C39.8545 40.1074 40 40.5865 40 41.1524C40 42.0258 39.7156 42.7188 39.1469 43.2313Z",fill:wL.icon}),M.createElement(oK,{fillRule:"evenodd",clipRule:"evenodd",d:"M38.5714 58.4286H1.42857V82H38.5714V58.4286ZM0 57V83.4286H40V57H0Z",fill:wL.icon}),M.createElement(oK,{d:"M4.4248 78.0714V62.2211H9.21449L12.0905 73.033L14.934 62.2211H19.7345V78.0714H16.7612V65.5944L13.615 78.0714H10.5336L7.39809 65.5944V78.0714H4.4248Z",fill:wL.icon}),M.createElement(oK,{d:"M22.4596 62.2211H28.3088C29.6279 62.2211 30.6334 62.322 31.3253 62.5238C32.2552 62.7977 33.0517 63.2842 33.7148 63.9834C34.3779 64.6826 34.8825 65.5403 35.2285 66.5567C35.5744 67.5658 35.7474 68.8127 35.7474 70.2976C35.7474 71.6022 35.5853 72.7267 35.2609 73.6709C34.8645 74.8242 34.2986 75.7576 33.5634 76.4712C33.0084 77.0118 32.2588 77.4335 31.3145 77.7362C30.6082 77.9597 29.6639 78.0714 28.4818 78.0714H22.4596V62.2211ZM25.6599 64.9024V75.4008H28.0493C28.9431 75.4008 29.5882 75.3504 29.9847 75.2495C30.5036 75.1197 30.9325 74.8999 31.2713 74.5899C31.6173 74.28 31.8984 73.7718 32.1146 73.0654C32.3309 72.3519 32.439 71.3824 32.439 70.157C32.439 68.9317 32.3309 67.991 32.1146 67.3351C31.8984 66.6792 31.5956 66.1674 31.2064 65.7998C30.8172 65.4322 30.3234 65.1835 29.7252 65.0538C29.2783 64.9529 28.4025 64.9024 27.0979 64.9024H25.6599Z",fill:wL.icon})),$K=e=>M.createElement(mK,{width:24,height:24,viewBox:"0 0 24 24",fill:"none",...e},M.createElement(oK,{d:"M9.91114 17.3465C9.8166 17.3465 9.723 17.3278 9.63569 17.2916C9.54838 17.2554 9.46907 17.2023 9.40234 17.1353L5.20234 12.9353C5.07112 12.7995 4.99847 12.6177 5.00002 12.4289C5.00157 12.2401 5.07721 12.0595 5.21064 11.9259C5.34407 11.7924 5.52462 11.7166 5.7134 11.7148C5.90218 11.7131 6.08409 11.7856 6.21994 11.9167L9.91114 15.6079L18.6472 6.87191C18.7136 6.80317 18.7931 6.74836 18.881 6.71067C18.9688 6.67297 19.0633 6.65316 19.1589 6.65237C19.2545 6.65158 19.3492 6.66985 19.4378 6.70609C19.5263 6.74234 19.6066 6.79583 19.6741 6.86347C19.7417 6.9311 19.7952 7.01151 19.8313 7.10002C19.8674 7.18852 19.8857 7.28334 19.8847 7.37894C19.8839 7.47454 19.864 7.56901 19.8262 7.65684C19.7884 7.74467 19.7335 7.82408 19.6648 7.89046L10.4151 17.1353C10.2815 17.2694 10.1004 17.3452 9.91114 17.3465Z",fill:e?.color??wL.icon})),XK=e=>M.createElement(mK,{width:24,height:24,viewBox:"0 0 24 24",fill:"none",...e},M.createElement(oK,{fillRule:"evenodd",clipRule:"evenodd",d:"M16.3344 3.38489H7.6654C4.6444 3.38489 2.7504 5.52389 2.7504 8.55089V16.7189C2.7504 19.7459 4.6354 21.8849 7.6654 21.8849H16.3334C19.3644 21.8849 21.2504 19.7459 21.2504 16.7189V8.55089C21.2504 5.52389 19.3644 3.38489 16.3344 3.38489Z",stroke:e?.color??wL.icon,strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),qK=e=>M.createElement(mK,{width:24,height:24,viewBox:"0 0 24 24",fill:"none",...e},M.createElement(oK,{d:"M14.5784 9.44215L14.5784 9.44219L10.8449 13.1767L9.41855 11.7512C9.41852 11.7511 9.41849 11.7511 9.41845 11.7511C8.93018 11.2629 8.13968 11.2629 7.65145 11.7512C7.16318 12.2394 7.16318 13.031 7.65145 13.5193L9.96045 15.8283C10.2049 16.0727 10.5246 16.1947 10.845 16.1947C11.1647 16.1947 11.4844 16.0724 11.7286 15.8283L16.3466 11.2103C16.8348 10.722 16.8348 9.93041 16.3466 9.44215C15.8583 8.95389 15.0667 8.95389 14.5784 9.44215ZM7.782 3.6347H16.217C17.6754 3.6347 18.8605 4.14442 19.6821 5.00394C20.5055 5.86543 21 7.11668 21 8.66171V16.6097C21 18.1541 20.5053 19.4048 19.6817 20.266C18.8599 21.1252 17.6745 21.6347 16.216 21.6347H7.782C6.32407 21.6347 5.13922 21.1252 4.31777 20.266C3.49445 19.4049 3 18.1542 3 16.6097V8.66171C3 7.11668 3.49448 5.86541 4.31784 5.00392C5.13931 4.14439 6.32414 3.6347 7.782 3.6347Z",fill:e?.color??wL.icon,stroke:e?.color??wL.icon})),ZK=e=>M.createElement(mK,{width:24,height:24,viewBox:"0 0 24 24",fill:"none",...e},M.createElement(oK,{d:"M16.2803 4.48542C16.5466 4.75168 16.5708 5.16835 16.3529 5.46196L16.2803 5.54608L9.811 12.0157L16.2803 18.4854C16.5466 18.7517 16.5708 19.1683 16.3529 19.462L16.2803 19.5461C16.0141 19.8123 15.5974 19.8365 15.3038 19.6187L15.2197 19.5461L8.21967 12.5461C7.9534 12.2798 7.9292 11.8631 8.14705 11.5695L8.21967 11.4854L15.2197 4.48542C15.5126 4.19252 15.9874 4.19252 16.2803 4.48542Z",fill:e.color??wL.icon})),KK=e=>M.createElement(mK,{width:25,height:26,viewBox:"0 0 25 26",fill:"none",...e},M.createElement(oK,{fillRule:"evenodd",clipRule:"evenodd",d:"M16.0713 21.2014C15.7665 21.2014 15.4618 21.0847 15.2296 20.8525L8.08689 13.7098C7.62143 13.2444 7.62143 12.492 8.08689 12.0266L15.2296 4.88383C15.6951 4.41836 16.4474 4.41836 16.913 4.88383C17.3784 5.3493 17.3784 6.10166 16.913 6.56713L10.6118 12.8682L16.913 19.1693C17.3784 19.6347 17.3784 20.3871 16.913 20.8525C16.6808 21.0847 16.3761 21.2014 16.0713 21.2014Z",fill:e.color??wL.icon})),QK=e=>M.createElement(mK,{width:24,height:24,viewBox:"0 0 24 24",fill:"none",...e},M.createElement(oK,{d:"M8.21967 20.0899C7.9534 19.8236 7.9292 19.407 8.14705 19.1134L8.21967 19.0292L14.689 12.5596L8.21967 6.0899C7.9534 5.82363 7.9292 5.40697 8.14705 5.11336L8.21967 5.02924C8.48594 4.76297 8.9026 4.73877 9.19621 4.95662L9.28033 5.02924L16.2803 12.0292C16.5466 12.2955 16.5708 12.7122 16.3529 13.0058L16.2803 13.0899L9.28033 20.0899C8.98744 20.3828 8.51256 20.3828 8.21967 20.0899Z",fill:e.color??wL.icon})),JK=e=>M.createElement(mK,{width:24,height:24,viewBox:"0 0 24 24",fill:"none",...e},M.createElement(oK,{d:"M6.72911 6.34559C6.44794 6.06441 5.99206 6.06441 5.71088 6.34559C5.42971 6.62676 5.42971 7.08264 5.71088 7.36382L10.9617 12.6147L5.71088 17.8656C5.42971 18.1468 5.42971 18.6026 5.71088 18.8838C5.99206 19.165 6.44794 19.165 6.72911 18.8838L11.98 13.633L17.2309 18.8838C17.5121 19.165 17.9679 19.165 18.2491 18.8838C18.5303 18.6026 18.5303 18.1468 18.2491 17.8656L12.9983 12.6147L18.2491 7.36382C18.5303 7.08264 18.5303 6.62676 18.2491 6.34559C17.9679 6.06441 17.5121 6.06441 17.2309 6.34559L11.98 11.5964L6.72911 6.34559Z",fill:e?.color??wL.icon})),eQ=e=>M.createElement(mK,{width:24,height:25,viewBox:"0 0 24 25",fill:"none",...e},M.createElement(oK,{fillRule:"evenodd",clipRule:"evenodd",d:"M13.414 12.3682L18.707 7.07529C19.098 6.68429 19.098 6.05229 18.707 5.66129C18.316 5.27029 17.684 5.27029 17.293 5.66129L12 10.9542L6.70701 5.66129C6.31601 5.27029 5.68401 5.27029 5.29301 5.66129C4.90201 6.05229 4.90201 6.68429 5.29301 7.07529L10.586 12.3682L5.29301 17.6613C4.90201 18.0522 4.90201 18.6842 5.29301 19.0752C5.48801 19.2702 5.74401 19.3682 6.00001 19.3682C6.25601 19.3682 6.51201 19.2702 6.70701 19.0752L12 13.7823L17.293 19.0752C17.488 19.2702 17.744 19.3682 18 19.3682C18.256 19.3682 18.512 19.2702 18.707 19.0752C19.098 18.6842 19.098 18.0522 18.707 17.6613L13.414 12.3682Z",fill:e.color??wL.icon}));function tQ(e){return M.createElement(mK,{width:24,height:25,viewBox:"0 0 24 25",fill:"none",...e},M.createElement(oK,{fillRule:"evenodd",clipRule:"evenodd",d:"M12.638 7.76a2.58 2.58 0 102.868-4.29 2.58 2.58 0 00-2.868 4.29zm.834-3.044a1.081 1.081 0 111.2 1.798 1.081 1.081 0 01-1.2-1.798zm-2.1 14.803a.75.75 0 001.046-.397l.87-2.316a2.755 2.755 0 00-1.542-3.532L11.079 13a1.267 1.267 0 111.293-2.148l1.022.853c.498.413 1.124.64 1.77.64h2.9a.75.75 0 000-1.5h-2.9c-.296 0-.582-.104-.81-.293L13.33 9.7a2.777 2.777 0 00-3.873.324 2.768 2.768 0 001.05 4.361l.676.275a1.258 1.258 0 01.705 1.616l-.868 2.316a.748.748 0 00.352.928zM6.21 22.534a3.5 3.5 0 110-7 3.5 3.5 0 010 7zm0-5.5a2 2 0 102 2 2 2 0 00-2-1.993v-.007zm9.65 4.91a3.5 3.5 0 103.888-5.82 3.5 3.5 0 00-3.889 5.82zm.832-4.573a2 2 0 011.112-.337v.007a2 2 0 012 1.993 2 2 0 11-3.111-1.663z",fill:wL.icon}))}const nQ=e=>M.createElement(mK,{width:28,height:28,viewBox:"0 0 28 28",fill:"none",...e},M.createElement(oK,{fillRule:"evenodd",clipRule:"evenodd",d:"M15.001 4.41143L14.5 5.20879L13.9989 4.41143C14.3038 4.20791 14.6961 4.20791 15.001 4.41143ZM14.5 6.3617C14.4414 6.40466 14.3782 6.45134 14.3109 6.50165C13.8698 6.83133 13.2501 7.3157 12.5427 7.92948C11.1256 9.15913 9.38504 10.8841 8.01956 12.9025C6.69517 15.0522 6.69988 17.9558 7.8799 20.3534C9.04765 22.7262 11.3296 24.5255 14.5 24.5255C17.6704 24.5255 19.9522 22.7262 21.1201 20.3534C22.3001 17.9558 22.3047 15.0522 20.9803 12.9025C19.6149 10.8841 17.8742 9.15913 16.4572 7.92948C15.7498 7.3157 15.1301 6.83133 14.689 6.50165C14.6217 6.45134 14.5585 6.40466 14.5 6.3617ZM13.9989 4.41143C13.9991 4.41131 13.9989 4.41143 14.5 5.20879C15.001 4.41143 15.0008 4.41131 15.001 4.41143L15.0029 4.4127L15.0065 4.41505L15.0181 4.42295L15.06 4.45146C15.0959 4.47608 15.1477 4.51183 15.2138 4.55835C15.3459 4.65134 15.5356 4.78745 15.7711 4.96346C16.2419 5.31529 16.8975 5.82789 17.6444 6.47598C19.1322 7.7669 21.0099 9.6196 22.5041 11.8329C22.5109 11.8431 22.5177 11.8535 22.5241 11.8639C24.2619 14.6665 24.1952 18.3049 22.764 21.213C21.3177 24.1517 18.44 26.4255 14.5 26.4255C10.5599 26.4255 7.68226 24.1517 6.23595 21.213C4.80472 18.3049 4.73807 14.6665 6.4758 11.8639C6.48228 11.8535 6.48897 11.8431 6.49585 11.8329C7.98996 9.6196 9.86782 7.7669 11.3555 6.47598C12.1024 5.82789 12.758 5.31529 13.2288 4.96346C13.4644 4.78745 13.654 4.65134 13.7861 4.55835C13.8523 4.51183 13.904 4.47608 13.9399 4.45146L13.9818 4.42295L13.9935 4.41505L13.997 4.4127L13.9989 4.41143ZM10.1358 17.1709C10.6088 16.9769 11.1448 17.2148 11.333 17.7023C11.7357 18.7452 12.6036 19.5672 13.8273 19.7115C14.3331 19.7712 14.6962 20.2421 14.6383 20.7633C14.5804 21.2847 14.1235 21.6589 13.6178 21.5992C11.6275 21.3645 10.2379 20.0043 9.62029 18.4049C9.43206 17.9174 9.66286 17.365 10.1358 17.1709Z",fill:e?.color??wL.iconNavigationBarInactive})),iQ=e=>M.createElement(mK,{width:28,height:28,viewBox:"0 0 28 28",fill:"none",...e},M.createElement(oK,{d:"M9.47572 16.8973L9.47563 16.8974C8.70231 17.2102 8.33375 18.0938 8.63669 18.8671C9.37596 20.7542 11.0517 22.3823 13.4637 22.6627C14.2958 22.7594 15.0352 22.1525 15.1284 21.3254L15.1284 21.3253C15.2214 20.4994 14.6377 19.741 13.8072 19.6443L13.8071 19.6443C12.6515 19.5101 11.8233 18.75 11.4309 17.7484L10.984 17.9235L11.4309 17.7484C11.1265 16.9714 10.253 16.5831 9.47572 16.8973ZM14.5 25.9455C10.7597 25.9455 8.05158 23.8421 6.67199 21.0789C5.2861 18.303 5.26321 14.906 6.85972 12.3608C9.34794 8.73088 12.9056 5.98426 14.2429 5.02279C14.3998 4.91003 14.6002 4.91003 14.7571 5.0228C16.0944 5.98427 19.6519 8.73087 22.1402 12.3608C23.7367 14.9059 23.7138 18.303 22.3279 21.0789C20.9483 23.8421 18.2402 25.9455 14.5 25.9455Z",fill:e?.color??wL.iconNavigationBarActive,stroke:e?.color??wL.iconNavigationBarActive,strokeWidth:.96})),rQ=e=>M.createElement(mK,{width:24,height:24,viewBox:"0 0 24 24",fill:"none",...e},M.createElement(oK,{fillRule:"evenodd",clipRule:"evenodd",d:"M5.2513 6.38429C6.07792 5.49683 7.25513 4.99994 8.645 4.99994H11.6506C11.9986 4.99994 12.2808 5.28208 12.2808 5.63012C12.2808 5.97816 11.9986 6.26031 11.6506 6.26031H8.645C7.56779 6.26031 6.73758 6.6378 6.17357 7.24333C5.60494 7.85381 5.26037 8.74689 5.26037 9.85332V16.5305C5.26037 17.6382 5.6036 18.5314 6.17112 19.1416C6.73386 19.7466 7.56369 20.1243 8.645 20.1243H15.7324C16.8151 20.1243 17.6451 19.7465 18.2076 19.1416C18.7749 18.5315 19.1178 17.6384 19.1178 16.5305V13.5216C19.1178 13.1736 19.4 12.8914 19.748 12.8914C20.096 12.8914 20.3782 13.1736 20.3782 13.5216V16.5305C20.3782 17.8979 19.9518 19.1168 19.1305 19.9999C18.3045 20.8882 17.1266 21.3847 15.7324 21.3847H8.645C7.25186 21.3847 6.07429 20.888 5.24823 19.9999C4.42695 19.1169 4 17.8981 4 16.5305V9.85332C4 8.48531 4.42929 7.2668 5.2513 6.38429Z",fill:e?.color??wL.icon}),M.createElement(oK,{fillRule:"evenodd",clipRule:"evenodd",d:"M16.5818 6.82051L11.9345 11.8931C11.6675 12.1932 11.5006 12.5692 11.4569 12.9697L11.3377 14.0698C11.2974 14.4426 11.6242 14.7507 11.9937 14.6891C11.9936 14.6891 11.9938 14.689 11.9937 14.6891L13.0606 14.5101C13.4935 14.4373 13.8884 14.2197 14.1802 13.8934L14.1853 13.8878L18.786 8.86705L18.7882 8.8647C19.1016 8.52614 19.0813 7.99816 18.7425 7.68452L17.7614 6.77612C17.7614 6.77609 17.7614 6.77615 17.7614 6.77612C17.4228 6.46331 16.8946 6.48377 16.5818 6.82051ZM15.656 5.96537C16.4416 5.11656 17.7676 5.06553 18.6169 5.85059L19.5987 6.75961C19.5986 6.7596 19.5987 6.75963 19.5987 6.75961C20.4475 7.54548 20.4996 8.86988 19.7143 9.71954C19.7139 9.71999 19.7135 9.72045 19.7131 9.7209L15.117 14.7366C14.6344 15.275 13.9827 15.6332 13.2696 15.7531L12.2021 15.932C11.0092 16.1317 9.95483 15.1373 10.0846 13.9346L10.2039 12.8335C10.2761 12.1713 10.553 11.5478 10.9971 11.0507L11.0024 11.0449L15.6538 5.96774L15.656 5.96537Z",fill:e?.color??wL.icon})),aQ=e=>M.createElement(mK,{height:48,width:48,viewBox:"0 0 48 48",fill:"none",...e},M.createElement(oK,{d:"M33 29C33 30.1045 32.1001 31 30.9907 31H17.0093C15.9 31 15 30.1045 15 29C15 27.8955 15.9 27 17.0093 27H24H30.9907C32.1001 27 33 27.8955 33 29Z",fill:e?.color??wL.iconNavigationBarSummaryInactive}),M.createElement(oK,{d:"M33 19C33 20.1045 32.1001 21 30.9907 21H17.0093C15.9 21 15 20.1045 15 19C15 17.8955 15.9 17 17.0093 17H24H30.9907C32.1001 17 33 17.8955 33 19Z",fill:e?.color??wL.iconNavigationBarSummaryInactive}));function oQ(e){return M.createElement(mK,{width:24,height:24,viewBox:"0 0 24 24",fill:"none",...e},M.createElement(oK,{d:"M7.783 3h8.435C19.166 3 21 5.081 21 8.026v7.948C21 18.919 19.166 21 16.217 21H7.783C4.835 21 3 18.919 3 15.974V8.026C3 5.081 4.844 3 7.783 3zM14.612 14.155h-5.22M14.612 9.846h-5.22",stroke:wL.icon,strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}))}const sQ=e=>M.createElement(mK,{width:49,height:48,viewBox:"0 0 49 48",fill:"none",...e},M.createElement(oK,{d:"M17.833 5.03309C17.2472 4.4473 16.2974 4.4473 15.7116 5.03309C15.1258 5.61889 15.1258 6.56862 15.7116 7.15442C16.0606 7.50335 16.059 8.06675 15.7127 8.41225C14.1935 9.93153 14.1908 12.3972 15.7127 13.916C16.2991 14.5012 17.2489 14.5002 17.8341 13.9138C18.4192 13.3274 18.4182 12.3777 17.8318 11.7925C17.4856 11.447 17.484 10.8836 17.833 10.5347C19.3538 9.01579 19.3519 6.552 17.833 5.03309Z",fill:wL.bgEmptyOnBg}),M.createElement(oK,{d:"M37.6074 11.7745C38.1932 11.1887 38.1932 10.239 37.6074 9.6532C37.0216 9.06742 36.072 9.06742 35.4862 9.6532C33.9668 11.1725 33.9652 13.6371 35.4872 15.1559C36.0736 15.7411 37.0234 15.7401 37.6086 15.1537C38.1938 14.5673 38.1928 13.6175 37.6064 13.0324C37.2602 12.6869 37.2586 12.1235 37.6074 11.7745Z",fill:wL.bgEmptyOnBg}),M.createElement(oK,{d:"M8.90709 13.0331C8.32131 12.4473 7.37155 12.4473 6.78577 13.0331C6.19999 13.6189 6.19999 14.5686 6.78577 15.1544C7.13469 15.5033 7.13311 16.0667 6.78687 16.4122C6.20049 16.9974 6.19949 17.9472 6.78467 18.5336C7.36985 19.12 8.31959 19.121 8.90599 18.5358C10.428 17.017 10.4264 14.5524 8.90709 13.0331Z",fill:wL.bgEmptyOnBg}),M.createElement(oK,{fillRule:"evenodd",clipRule:"evenodd",d:"M24.499 12.5244C22.2078 12.5244 20.3545 14.3825 20.3545 16.6709V18.0337C12.7803 19.6396 7.09435 25.5434 7.52215 32.662C7.55389 33.19 7.99137 33.602 8.52035 33.602H40.4796C41.0086 33.602 41.4462 33.19 41.4778 32.6618C41.9038 25.543 36.2172 19.6391 28.6436 18.0335V16.6709C28.6436 14.3818 26.7876 12.5244 24.499 12.5244ZM25.6436 17.6343V16.6709C25.6436 16.0372 25.1294 15.5244 24.499 15.5244C23.8676 15.5244 23.3546 16.0365 23.3546 16.6709V17.6344C23.7334 17.6129 24.1154 17.602 24.5 17.602C24.8838 17.602 25.2652 17.6129 25.6436 17.6343Z",fill:wL.bgEmptyOnBg}),M.createElement(oK,{d:"M6.09606 36.1678C6.50008 35.8434 6.99498 35.7178 7.49988 35.7178H41.4998C42.0048 35.7178 42.4996 35.8434 42.9038 36.1678C43.3084 36.4926 43.5118 36.9284 43.6004 37.3402C43.7656 38.1086 43.5746 38.9812 43.3446 39.6722C42.7004 41.6044 40.8896 42.9096 38.8522 42.9096H10.1476C8.11008 42.9096 6.29946 41.605 5.65538 39.6726C5.42538 38.9816 5.2341 38.1086 5.39932 37.3402C5.48786 36.9284 5.6914 36.4926 6.09606 36.1678Z",fill:wL.bgEmptyOnBg})),lQ=e=>M.createElement(mK,{width:24,height:24,viewBox:"0 0 28 28",...e},M.createElement(oK,{fillRule:"evenodd",clipRule:"evenodd",d:"M4 14C4 19.5228 8.47715 24 14 24C19.5228 24 24 19.5228 24 14C24 8.47715 19.5228 4 14 4C8.47715 4 4 8.47715 4 14ZM22.1818 14C22.1818 18.5187 18.5187 22.1818 14 22.1818C9.48128 22.1818 5.81815 18.5187 5.81815 14C5.81815 9.48128 9.48128 5.81815 14 5.81815C18.5187 5.81815 22.1818 9.48128 22.1818 14Z",fill:e?.color??wL.icon}),M.createElement(oK,{d:"M15 17.1667C15 17.6269 14.5523 18 14 18C13.4477 18 13 17.6269 13 17.1667V13.8333C13 13.3731 13.4477 13 14 13C14.5523 13 15 13.3731 15 13.8333V17.1667Z",fill:e?.color??wL.icon}),M.createElement(oK,{fillRule:"evenodd",clipRule:"evenodd",d:"M14 11C14.5523 11 15 10.5523 15 10C15 9.44772 14.5523 9 14 9C13.4477 9 13 9.44772 13 10C13 10.5523 13.4477 11 14 11Z",fill:e?.color??wL.icon})),uQ=e=>M.createElement(mK,{width:24,height:25,viewBox:"0 0 24 25",fill:"none",...e},M.createElement(oK,{fillRule:"evenodd",clipRule:"evenodd",d:"M16.659 2.36804C19.989 2.36804 22.5 5.08504 22.5 8.68804V15.556C22.5 17.4 21.848 19.066 20.663 20.248C19.6 21.307 18.221 21.868 16.675 21.868H6.822C5.279 21.868 3.901 21.308 2.837 20.248C1.652 19.066 1 17.4 1 15.556V8.68804C1 5.08504 3.511 2.36804 6.841 2.36804H16.659ZM16.659 3.86804H6.841C4.326 3.86804 2.5 5.89504 2.5 8.68804V15.556C2.5 16.999 2.996 18.288 3.896 19.185C4.672 19.96 5.685 20.368 6.825 20.368H16.659C16.661 20.366 16.669 20.368 16.675 20.368C17.816 20.368 18.828 19.96 19.604 19.185C20.505 18.288 21 16.999 21 15.556V8.68804C21 5.89504 19.174 3.86804 16.659 3.86804ZM18.235 8.49684C18.496 8.81784 18.447 9.28984 18.126 9.55184L13.682 13.1638C13.12 13.6098 12.448 13.8328 11.777 13.8328C11.108 13.8328 10.441 13.6118 9.883 13.1698L5.398 9.55384C5.075 9.29384 5.025 8.82084 5.284 8.49884C5.545 8.17784 6.017 8.12684 6.339 8.38584L10.82 11.9978C11.383 12.4438 12.176 12.4438 12.743 11.9938L17.179 8.38784C17.501 8.12484 17.973 8.17484 18.235 8.49684Z",fill:"#F5F2FF",fillOpacity:.95})),cQ=e=>M.createElement(mK,{width:"40",height:"29",viewBox:"0 0 40 29",...e},M.createElement(oK,{d:"M29.8431 28.0756C28.6 27.6408 27.4897 26.9403 26.3499 26.2989C25.9038 26.048 25.4406 25.813 24.9615 25.6337C24.3315 25.3975 23.6719 25.5111 23.026 25.5973C22.0712 25.7234 21.1665 25.9947 20.3264 26.484C20.1788 26.5702 19.929 26.5691 19.7463 26.4953C19.6316 26.4488 19.5147 26.3727 19.3978 26.3125C18.5361 25.8755 17.6109 25.6643 16.6584 25.5394C15.7321 25.418 14.875 25.5883 14.0724 26.0651C13.4957 26.4079 12.9122 26.7394 12.3309 27.072C10.7507 27.9779 9.06826 28.5864 7.25074 28.7737C6.13367 28.8884 3.87456 28.8884 2.57812 28.5898C1.70853 28.407 0.858238 28.1312 0 27.8951C0 19.1628 0 10.4317 0 1.69951C0.662977 2.0923 1.33957 2.45444 2.09678 2.63948C3.20817 2.91081 4.33887 3.00957 5.47751 3.08563C6.8852 3.17986 8.24975 3.01865 9.54392 2.46579C10.5236 2.04803 11.467 1.54512 12.4285 1.08308C13.5025 0.566546 14.556 0.0273115 15.8081 0.0205C17.2158 0.0125534 18.5588 0.255494 19.8643 0.761808C19.9472 0.793595 20.0619 0.799268 20.1447 0.769752C21.3095 0.34858 23.6118 -0.225849 25.0422 0.0920169C25.855 0.272519 26.3726 0.516597 27.0061 0.803811C28.0119 1.26018 28.9837 1.78692 29.9827 2.25805C30.9068 2.69398 31.8763 3.02319 32.9014 3.06179C33.8289 3.09698 34.7632 3.0686 35.6895 2.99936C37.1392 2.89151 37.7942 2.87334 39.1032 2.15474C39.6458 1.85731 39.9557 1.4963 40 1.48155C40 10.207 40 19.2116 40 27.9405C38.5253 28.39 37.1301 28.7715 35.484 28.9031C32.8253 29.0473 30.9919 28.4774 29.8431 28.0756ZM19.2945 24.7198C19.2945 17.1739 19.2945 9.62345 19.2945 2.05824C19.2366 2.03327 19.1787 2.00035 19.1162 1.98332C18.5656 1.83233 18.0184 1.67 17.4633 1.53831C16.1771 1.2318 14.9454 1.36121 13.7715 2.00148C13.1086 2.36362 12.4229 2.68262 11.7485 3.02319C9.94012 3.93706 8.05222 4.72037 5.98155 4.58528C4.84745 4.51149 3.81098 4.37753 2.60082 4.17319C2.07407 4.07783 1.80275 4.00404 1.39634 3.91435C1.39634 11.5749 1.39634 19.2196 1.39634 26.8688C1.47807 26.8926 1.54619 26.9119 1.61317 26.9312C3.52945 27.483 5.47637 27.6294 7.44941 27.3433C9.26352 27.08 10.8937 26.3386 12.4331 25.3771C13.2244 24.8821 14.0292 24.3974 14.9522 24.2135C16.4405 23.9172 17.8697 24.2475 19.2945 24.7198ZM38.6264 3.92117C38.5821 3.92911 38.5537 3.93252 38.5276 3.93933C37.3299 4.25265 36.1084 4.39456 34.8744 4.47176C33.2533 4.57279 31.6515 4.48651 30.1428 3.83943C28.8906 3.30246 27.6725 2.68376 26.4408 2.09798C25.7199 1.75514 25.0047 1.38846 24.1794 1.38165C23.3234 1.37483 22.4856 1.50879 21.6637 1.74606C21.3436 1.83801 21.0291 1.94926 20.7124 2.05257C20.7124 9.63594 20.7124 17.1864 20.7124 24.705C21.2584 24.5643 21.8033 24.3974 22.3596 24.2861C23.1872 24.1215 24.0261 24.0239 24.8673 24.1681C25.7517 24.3191 26.518 24.755 27.2865 25.1977C28.1413 25.6893 28.9996 26.1888 29.901 26.5793C32.1237 27.5431 34.4521 27.6816 36.8225 27.2888C37.4253 27.1889 38.0213 27.0425 38.6252 26.9165C38.6264 19.2298 38.6264 11.5851 38.6264 3.92117Z",fill:wL.icon}),M.createElement(oK,{d:"M25.7222 22.1271C25.7222 21.6866 25.7222 21.2586 25.7222 20.8125C26.401 20.8125 27.0799 20.8125 27.7803 20.8125C27.7803 18.6669 27.7803 16.5383 27.7803 14.3916C27.131 14.3916 26.4907 14.3916 25.8391 14.3916C25.8391 13.9602 25.8391 13.547 25.8391 13.1235C27.9643 13.1235 30.094 13.1235 32.2407 13.1235C32.2407 15.6801 32.2407 18.2344 32.2407 20.8011C32.8946 20.8011 33.5314 20.8011 34.1842 20.8011C34.1842 21.2473 34.1842 21.6832 34.1842 22.1282C31.3654 22.1271 28.5546 22.1271 25.7222 22.1271Z",fill:wL.icon}),M.createElement(oK,{d:"M30.1452 11.5738C28.9521 11.5784 27.9372 10.5624 27.9292 9.3556C27.9224 8.15338 28.9339 7.13281 30.1361 7.1294C31.3576 7.126 32.3714 8.13295 32.3737 9.35219C32.376 10.5567 31.3599 11.5693 30.1452 11.5738Z",fill:wL.icon})),dQ=e=>M.createElement(mK,{width:"41",height:"38",viewBox:"0 0 41 38",fill:e?.color,...e},M.createElement(oK,{d:"M1 36.5699V23.38L6.78992 13.95L11.38 21.1L15.77 13.95L20.2799 20.9L24.52 13.95L29.2799 21.72H29.2999V1H39.6599L39.5 36.5699H1Z",stroke:wL.icon,strokeWidth:"1.5",strokeMiterlimit:"10"})),hQ=e=>M.createElement(mK,{width:140,height:140,viewBox:"0 0 140 140",fill:"none",...e},M.createElement(oK,{fillRule:"evenodd",clipRule:"evenodd",d:"M111.495 29.6715C113.197 31.386 113.188 34.1561 111.473 35.8586L101.55 45.712C101.33 45.9911 101.078 46.2395 100.803 46.4538L83.6298 63.5069C83.3936 63.8126 83.1188 64.085 82.8138 64.3172L41.0996 105.739C39.385 107.441 36.615 107.431 34.9125 105.716C33.2099 104.002 33.2197 101.232 34.9343 99.5295L70.0434 64.6666C57.5051 65.1969 46.0982 70.2859 37.5436 78.3271C35.783 79.982 33.0142 79.8963 31.3594 78.1358C29.7045 76.3753 29.7902 73.6062 31.5508 71.9513C42.165 61.9745 56.5252 55.8711 72.2169 55.8711C74.3467 55.8711 76.4607 55.9758 78.5612 56.2088L89.812 45.0365C84.1793 43.6293 78.2888 42.9047 72.2157 42.9047C53.1182 42.9047 35.693 50.2834 22.697 62.3904C20.9291 64.0378 18.1608 63.9398 16.5137 62.1717C14.8667 60.4036 14.9647 57.6353 16.7327 55.9882C31.2867 42.4296 50.8221 34.1547 72.2157 34.1547C80.7902 34.1547 89.0904 35.4508 96.9263 37.9726L105.308 29.6497C107.023 27.9472 109.792 27.9569 111.495 29.6715ZM108.253 47.4031C109.499 45.333 112.187 44.665 114.258 45.9112C119.122 48.8397 123.6 52.2586 127.687 56.0404C129.46 57.6816 129.567 60.4497 127.926 62.223C126.285 63.9964 123.516 64.1037 121.743 62.4622C118.066 59.059 114.063 56.0074 109.745 53.4077C107.675 52.1615 107.007 49.4732 108.253 47.4031ZM91.8245 63.8762C92.8132 61.6718 95.4021 60.6859 97.6071 61.6747C103.309 64.2326 108.483 67.7466 112.946 71.9577C114.703 73.6155 114.784 76.3846 113.125 78.1422C111.467 79.8998 108.699 79.9797 106.941 78.3219C103.163 74.7571 98.8018 71.8008 94.026 69.6588C91.8216 68.67 90.8357 66.0812 91.8245 63.8762ZM74.0894 82.1689C74.5322 79.7936 76.8171 78.2274 79.1924 78.6701C86.3412 80.0036 92.801 83.405 97.8591 88.1289C99.6248 89.7779 99.7193 92.5464 98.0697 94.3122C96.4206 96.0779 93.6521 96.1724 91.8863 94.5234C87.999 90.8921 83.0395 88.2887 77.5882 87.2719C75.2129 86.8292 73.6461 84.5443 74.0894 82.1689ZM72.1831 108.499C70.3456 108.499 68.6417 109.219 67.356 110.43C65.5973 112.088 62.8287 112.005 61.1715 110.246C59.5148 108.488 59.5971 105.719 61.3558 104.062C64.1908 101.391 68.0152 99.7494 72.1831 99.7494C76.3504 99.7494 80.1747 101.391 83.0098 104.062C84.7685 105.719 84.8507 108.488 83.1941 110.246C81.5368 112.005 78.7683 112.088 77.0096 110.43C75.7239 109.219 74.02 108.499 72.1831 108.499Z",fill:"url(#paint0_linear_29840_35249)"}),M.createElement(OZ,null,M.createElement(iK,{id:"paint0_linear_29840_35249",x1:15.3398,y1:28.3792,x2:141.357,y2:56.3442,gradientUnits:"userSpaceOnUse"},M.createElement(hK,{stopColor:"#A200FF"}),M.createElement(hK,{offset:1e-4,stopColor:"#A200FF"}),M.createElement(hK,{offset:1,stopColor:"#FF8600"}))));function mQ(e){return M.createElement(mK,{width:49,height:48,viewBox:"0 0 49 48",fill:"none",...e},M.createElement(oK,{fillRule:"evenodd",clipRule:"evenodd",d:"M19.535 42a1.5 1.5 0 011.5-1.5h7.926a1.5 1.5 0 010 3h-7.926a1.5 1.5 0 01-1.5-1.5zM19.535 6a1.5 1.5 0 011.5-1.5h7.926a1.5 1.5 0 010 3h-7.926a1.5 1.5 0 01-1.5-1.5zM7 18.54a1.5 1.5 0 011.5 1.499v7.924a1.5 1.5 0 01-3 0v-7.924a1.5 1.5 0 011.5-1.5zM43 18.54a1.5 1.5 0 011.5 1.499v7.924a1.5 1.5 0 01-3 0v-7.924a1.5 1.5 0 011.5-1.5zM24.473 31.574a1.5 1.5 0 011.5 1.5v.088a1.5 1.5 0 01-3 0v-.088a1.5 1.5 0 011.5-1.5zM18.324 20.084A6.66 6.66 0 0125 13.408a6.67 6.67 0 016.675 6.676c0 2.604-1.489 4.445-3.437 5.522l-.343.193c-.576.324-1.032.58-1.404.915-.372.334-.527.636-.522 1.057a1.5 1.5 0 11-3 .039c-.02-1.51.69-2.583 1.515-3.326.645-.58 1.446-1.026 2.014-1.342l.265-.148.018-.01c1.231-.68 1.894-1.63 1.894-2.9A3.67 3.67 0 0025 16.408a3.66 3.66 0 00-3.676 3.676 1.5 1.5 0 01-3 0zM6.847 32.343A1.5 1.5 0 018.54 33.62c.538 3.843 3.007 6.41 6.782 6.85a1.5 1.5 0 11-.348 2.98c-5.235-.611-8.693-4.326-9.405-9.415a1.5 1.5 0 011.278-1.693zM43.063 32.343a1.5 1.5 0 011.278 1.693c-.712 5.085-4.147 8.801-9.385 9.414a1.5 1.5 0 11-.349-2.98c3.771-.44 6.224-3.002 6.763-6.85a1.5 1.5 0 011.693-1.277zM16.638 5.865a1.5 1.5 0 01-1.316 1.664c-3.77.442-6.243 3.022-6.782 6.87a1.5 1.5 0 11-2.97-.416c.71-5.085 4.165-8.82 9.404-9.434a1.5 1.5 0 011.664 1.316zM33.292 5.865a1.5 1.5 0 011.664-1.316c5.242.614 8.674 4.354 9.385 9.434a1.5 1.5 0 11-2.971.416c-.54-3.852-2.996-6.429-6.763-6.87a1.5 1.5 0 01-1.315-1.664z",fill:wL.bgEmptyOnBg}))}const pQ=e=>M.createElement(mK,{width:24,height:25,viewBox:"0 0 24 25",fill:"none",...e},M.createElement(oK,{d:"M20.9369 17.9484L18.4094 18.4528L17.9078 15.9393",stroke:e?.color??wL.icon,strokeWidth:1.44,strokeLinecap:"round",strokeLinejoin:"round"}),M.createElement(oK,{d:"M3.68064 6.78526L6.19133 6.20428L6.76944 8.7019",stroke:e?.color??wL.icon,strokeWidth:1.44,strokeLinecap:"round",strokeLinejoin:"round"}),M.createElement(oK,{d:"M18.3836 18.2968C21.7013 15.066 21.8396 9.7597 18.6638 6.35981C16.6744 4.22928 13.8508 3.34661 11.171 3.74264",stroke:e?.color??wL.icon,strokeWidth:1.44,strokeLinecap:"round",strokeLinejoin:"round"}),M.createElement(oK,{d:"M6.22222 6.36179C3.00353 9.69069 3.0259 14.9998 6.30344 18.3026C8.35649 20.3705 11.2053 21.1682 13.8719 20.6908",stroke:e?.color??wL.icon,strokeWidth:1.44,strokeLinecap:"round",strokeLinejoin:"round"})),fQ=e=>M.createElement(mK,{width:16,height:16,viewBox:"0 0 16 16",fill:"none",...e},M.createElement(oK,{d:"M7 12C9.76142 12 12 9.76142 12 7C12 4.23858 9.76142 2 7 2C4.23858 2 2 4.23858 2 7C2 9.76142 4.23858 12 7 12Z",stroke:wL.icon,strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),M.createElement(oK,{d:"M10.6666 11.3333L14 13.9999",stroke:wL.icon,strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),gQ=e=>M.createElement(mK,{width:39,height:25,viewBox:"0 0 39 25",fill:"none",...e},M.createElement(oK,{d:"M0 0.569824V24.7127H39V0.569824H0ZM1.15617 1.71512H37.8438V23.5685H1.15617V1.71512ZM23.3605 6.55721C22.882 6.56019 21.2049 6.58767 21.2 6.59248C21.1908 6.60164 21.1956 18.3199 21.2049 18.4937L21.2139 18.6678L21.3242 18.6742C21.3846 18.6774 21.9166 18.6793 22.5065 18.6786C23.4462 18.6774 23.5815 18.6744 23.6007 18.6554C23.6199 18.6364 23.6234 18.5141 23.6257 17.6961C23.6271 17.1805 23.6326 16.3241 23.6382 15.7927C23.644 15.261 23.6507 14.3077 23.6532 13.6739C23.6576 12.595 23.6705 11.9472 23.6879 11.9298C23.7075 11.9103 23.763 11.9926 23.85 12.1696C23.9025 12.2764 23.9695 12.4058 23.9991 12.4569C24.0287 12.5079 24.1344 12.7077 24.2341 12.9005C24.3335 13.0936 24.4863 13.3866 24.5735 13.552C24.715 13.82 24.7967 13.9728 25.0288 14.4039C25.0649 14.4707 25.2261 14.7736 25.387 15.0766C25.8041 15.8625 26.0923 16.4056 26.246 16.6945C26.3193 16.8324 26.4368 17.0545 26.5066 17.1883C26.8722 17.8895 27.2704 18.6014 27.324 18.6495C27.3506 18.6733 27.386 18.6767 27.6529 18.6818C27.8173 18.6848 27.9551 18.6905 27.959 18.6946C27.9731 18.7097 29.6988 18.6848 29.7145 18.6692C29.7247 18.6591 29.7324 18.056 29.7384 16.8044C29.7509 14.2607 29.7548 6.61928 29.7439 6.60141C29.7379 6.59202 29.3212 6.58721 28.5313 6.58721H27.3277L27.3183 7.38411C27.3067 8.33975 27.3086 11.5502 27.3213 12.4926C27.3264 12.8628 27.3271 13.2203 27.3231 13.2872L27.316 13.4088L27.278 13.3587C27.2373 13.3048 27.0919 13.0625 27.0919 13.0487C27.0919 13.0442 27.06 12.9848 27.0214 12.9168C26.9827 12.8488 26.9141 12.7223 26.8683 12.6358C26.8225 12.5492 26.7672 12.4493 26.7455 12.414C26.7238 12.3785 26.5804 12.108 26.4271 11.8125C26.2738 11.5173 26.1383 11.2596 26.1258 11.2399C26.1135 11.2204 25.9887 10.9852 25.8481 10.7174C25.7077 10.4498 25.5294 10.1115 25.452 9.96584C25.3747 9.82016 25.2705 9.62362 25.2203 9.52925C25.1703 9.43465 24.9997 9.11259 24.8411 8.81344C24.4743 8.12214 24.1289 7.45993 23.9485 7.1026C23.7866 6.78146 23.6932 6.61699 23.6532 6.58103C23.6285 6.55881 23.5942 6.55583 23.3605 6.55721ZM14.2773 6.57507C13.5973 6.5627 12.8139 6.65662 12.1981 6.82933C11.414 7.049 10.9679 7.26111 10.4846 7.64295C10.0904 7.95447 9.80758 8.28454 9.58628 8.69181C9.35436 9.11832 9.2207 9.76175 9.27111 10.2091C9.30325 10.4947 9.34164 10.6546 9.43853 10.9041C9.67693 11.517 10.1033 12.0457 10.6525 12.4094C11.1182 12.7178 11.386 12.8279 12.3181 13.093C13.2421 13.3557 14.1053 13.5483 15.046 13.7016C15.7276 13.8124 15.9362 13.8523 16.0676 13.8965C16.342 13.989 16.6209 14.1686 16.7777 14.3537C16.8834 14.479 16.925 14.5486 16.9721 14.6799C17.0057 14.7726 17.0096 14.8049 17.0101 14.9909C17.0108 15.1462 17.0045 15.2218 16.9853 15.2915C16.8272 15.8678 16.4442 16.2407 15.7861 16.4583C15.2992 16.6193 14.5097 16.6688 13.9261 16.5751C12.8453 16.4013 12.2126 16.0048 11.8413 15.2695C11.7326 15.0544 11.6353 14.8086 11.5983 14.6545C11.5377 14.402 11.524 14.3677 11.4836 14.3704C11.4637 14.3716 11.3758 14.3796 11.2884 14.3878C11.201 14.3961 10.9538 14.4188 10.7392 14.4387C9.93822 14.5131 9.26926 14.5873 9.25261 14.6038C9.23851 14.6176 9.26672 14.8011 9.33147 15.1188C9.51507 16.0196 9.88874 16.7836 10.4368 17.3775C10.9182 17.8995 11.6704 18.2718 12.6252 18.4612C13.1468 18.5645 13.8486 18.6474 14.374 18.6678C14.9463 18.69 15.4289 18.6454 16.1515 18.5031C17.2272 18.2917 17.8074 18.0175 18.3855 17.4465C18.6058 17.2286 18.7321 17.0646 18.8888 16.7925C18.9904 16.6166 19.1462 16.2787 19.1982 16.1218C19.3152 15.7702 19.3867 15.2802 19.3687 14.9577C19.3532 14.6868 19.3076 14.3267 19.2611 14.1104C19.2123 13.8837 19.1955 13.8308 19.1039 13.6093C18.9409 13.2155 18.7742 12.9631 18.4937 12.685C18.1743 12.3684 17.8256 12.1483 17.3872 11.9866C17.1599 11.9028 17.0089 11.8654 16.5275 11.7754C15.554 11.5935 14.8251 11.43 14.1788 11.2481C14.0278 11.2055 13.7839 11.1372 13.6371 11.0965C12.4101 10.7559 12.0327 10.4863 12.0327 9.94935C12.0327 9.67837 12.165 9.40762 12.4212 9.15428C12.5354 9.04113 12.7301 8.89797 12.8552 8.8352C13.1697 8.67738 13.7991 8.54796 14.2512 8.54842C14.627 8.54888 15.249 8.65241 15.5917 8.77084C15.8271 8.85238 16.0715 9.01501 16.1977 9.17444C16.3695 9.39136 16.5434 9.7125 16.6651 10.0373C16.7557 10.2794 16.7562 10.2808 16.8057 10.2808C16.829 10.2808 16.9564 10.2746 17.0887 10.2668C17.2212 10.2593 17.479 10.2462 17.6619 10.238C18.2497 10.2109 18.8012 10.1812 18.8877 10.1715C18.9846 10.161 19.0149 10.1385 19.0059 10.0836C18.9453 9.71548 18.8329 9.28301 18.7314 9.02761C18.6558 8.83772 18.4902 8.52139 18.3822 8.36013C18.0173 7.81543 17.6048 7.45466 17.026 7.17406C16.3404 6.84216 15.5507 6.65387 14.562 6.58721C14.4697 6.58103 14.3745 6.57691 14.2773 6.57507Z",fill:wL.icon}));function _Q(e){return M.createElement(mK,{width:48,height:48,viewBox:"0 0 56 56",...e},M.createElement(oK,{fillRule:"evenodd",clipRule:"evenodd",d:"M28 51.615c13.255 0 24-10.745 24-24s-10.745-24-24-24-24 10.745-24 24 10.745 24 24 24zm-6.137-15.402a1 1 0 001.51 1.302l9.334-9.334.097-.112a1 1 0 00-.097-1.302l-9.333-9.333-.112-.097a1 1 0 00-1.302.097l-.097.112a1 1 0 00.097 1.302l8.625 8.626L21.96 36.1l-.097.113z",fill:"#F5F2FF"}))}const vQ=e=>M.createElement(mK,{width:24,height:24,viewBox:"0 0 24 24",fill:"none",...e},M.createElement(oK,{d:"M12 2C17.53 2 22 6.48 22 12C22 17.53 17.53 22 12 22C6.48 22 2 17.53 2 12C2 6.48 6.48 2 12 2ZM11.65 6.93C11.24 6.93 10.9 7.26 10.9 7.68V12.73C10.9 12.99 11.04 13.23 11.27 13.37L15.19 15.71C15.31 15.78 15.44 15.82 15.58 15.82C15.83 15.82 16.08 15.69 16.22 15.45C16.43 15.1 16.32 14.64 15.96 14.42L12.4 12.3V7.68C12.4 7.26 12.06 6.93 11.65 6.93Z",fill:e?.color??wL.icon})),yQ=e=>M.createElement(mK,{width:24,height:25,viewBox:"0 0 24 25",fill:"none",...e},M.createElement(oK,{d:"M10.7741 14.6419L4.20561 11.4315C2.80076 10.7449 2.80076 8.74314 4.20468 8.05658L10.479 4.98999C11.3019 4.5874 12.264 4.5874 13.0869 4.98999L19.3686 8.05939C20.7734 8.74594 20.7734 10.7486 19.3686 11.4351L13.0897 14.5037C12.264 14.9072 11.2991 14.9072 10.4733 14.5037L6.48478 12.5542",stroke:"#F5F2FF",strokeOpacity:.95,strokeWidth:1.44,strokeLinecap:"round",strokeLinejoin:"round"}),M.createElement(oK,{d:"M20.4317 9.73553L20.3999 14.9328",stroke:"#F5F2FF",strokeOpacity:.95,strokeWidth:1.44,strokeLinecap:"round",strokeLinejoin:"round"}),M.createElement(oK,{d:"M6.4856 12.5555V17.3278C6.4856 18.1498 6.97319 18.9064 7.7326 19.2202C10.3966 20.3196 13.0494 20.3337 15.6919 19.2268C16.4457 18.911 16.9286 18.1563 16.9286 17.339V12.6424",stroke:"#F5F2FF",strokeOpacity:.95,strokeWidth:1.44,strokeLinecap:"round",strokeLinejoin:"round"})),bQ=e=>M.createElement(mK,{width:"41",height:"26",viewBox:"0 0 41 26",...e},M.createElement(oK,{fillRule:"evenodd",clipRule:"evenodd",d:"M38.731 1.43448H1.43448V24.5655H38.731V1.43448ZM0 0V26H40.1655V0H0Z",fill:wL.icon}),M.createElement(oK,{d:"M5.86475 6.40173H8.48226V13.423C8.48226 14.5372 8.51468 15.2594 8.57953 15.5895C8.69154 16.1201 8.95683 16.5475 9.37539 16.8718C9.79986 17.1901 10.3776 17.3493 11.1086 17.3493C11.8514 17.3493 12.4115 17.199 12.7888 16.8983C13.1661 16.5917 13.393 16.2174 13.4697 15.7753C13.5463 15.3331 13.5846 14.5991 13.5846 13.5734V6.40173H16.2021V13.2108C16.2021 14.7672 16.1314 15.8666 15.9899 16.5092C15.8484 17.1518 15.5861 17.6942 15.2029 18.1363C14.8256 18.5785 14.3186 18.9322 13.6819 19.1975C13.0452 19.4569 12.214 19.5866 11.1882 19.5866C9.95019 19.5866 9.00989 19.4451 8.3673 19.1621C7.73061 18.8732 7.22656 18.5018 6.85516 18.0479C6.48375 17.5881 6.2391 17.1076 6.12119 16.6065C5.95023 15.8637 5.86475 14.7672 5.86475 13.3169V6.40173Z",fill:wL.icon}),M.createElement(oK,{d:"M18.9611 6.40173H23.7452C24.824 6.40173 25.6464 6.48427 26.2124 6.64934C26.9728 6.87336 27.6243 7.27129 28.1666 7.84313C28.709 8.41498 29.1217 9.11652 29.4047 9.94775C29.6876 10.7731 29.8291 11.793 29.8291 13.0074C29.8291 14.0745 29.6965 14.9941 29.4312 15.7664C29.1069 16.7097 28.6442 17.4731 28.0428 18.0567C27.5889 18.4989 26.9758 18.8438 26.2035 19.0914C25.6258 19.2741 24.8535 19.3655 23.8867 19.3655H18.9611V6.40173ZM21.5787 8.59478V17.1813H23.5329C24.264 17.1813 24.7916 17.14 25.1158 17.0575C25.5403 16.9514 25.8911 16.7716 26.1681 16.5181C26.4511 16.2646 26.681 15.8489 26.8579 15.2712C27.0347 14.6876 27.1232 13.8947 27.1232 12.8925C27.1232 11.8903 27.0347 11.1209 26.8579 10.5844C26.681 10.048 26.4334 9.62941 26.1151 9.32875C25.7967 9.02809 25.3929 8.8247 24.9036 8.71858C24.5381 8.63605 23.8218 8.59478 22.7548 8.59478H21.5787Z",fill:wL.icon}),M.createElement(oK,{d:"M31.978 19.3655V6.40173H34.5955V19.3655H31.978Z",fill:wL.icon})),wQ=e=>M.createElement(mK,{width:"82",height:"28",viewBox:"0 0 82 28",...e},M.createElement(oK,{fillRule:"evenodd",clipRule:"evenodd",d:"M40.2613 1.10811H1.10811V26.2252H40.2613V1.10811ZM0 0V27.3333H41.3694V0H0Z",fill:wL.icon}),M.createElement(oK,{fillRule:"evenodd",clipRule:"evenodd",d:"M80.8919 1.10811H41.3693V26.2252H80.8919V1.10811ZM40.2612 0V27.3333H82V0H40.2612Z",fill:wL.icon}),M.createElement(oK,{d:"M10.1362 8.20728H12.4318V14.365C12.4318 15.3422 12.4602 15.9755 12.5171 16.265C12.6153 16.7304 12.848 17.1052 13.2151 17.3896C13.5873 17.6688 14.094 17.8084 14.7351 17.8084C15.3866 17.8084 15.8777 17.6765 16.2086 17.4128C16.5395 17.144 16.7386 16.8157 16.8058 16.4279C16.873 16.0401 16.9066 15.3965 16.9066 14.4968V8.20728H19.2022V14.1789C19.2022 15.5438 19.1402 16.508 19.0161 17.0716C18.892 17.6352 18.6619 18.1108 18.3258 18.4986C17.9949 18.8863 17.5503 19.1966 16.9919 19.4292C16.4335 19.6567 15.7045 19.7704 14.8049 19.7704C13.7192 19.7704 12.8945 19.6464 12.331 19.3982C11.7726 19.1449 11.3305 18.8191 11.0048 18.421C10.6791 18.0177 10.4645 17.5964 10.3611 17.1569C10.2112 16.5055 10.1362 15.5438 10.1362 14.2719V8.20728Z",fill:wL.icon}),M.createElement(oK,{d:"M21.343 19.5766V8.20728H23.6385V13.256L28.2762 8.20728H31.3628L27.0819 12.6356L31.5955 19.5766H28.6252L25.4998 14.2409L23.6385 16.141V19.5766H21.343Z",fill:wL.icon}),M.createElement(oK,{d:"M45.9097 19.5766V8.20728H50.7412C51.9562 8.20728 52.8377 8.31068 53.3858 8.51749C53.939 8.71913 54.3811 9.08104 54.7119 9.60323C55.0428 10.1254 55.2083 10.7226 55.2083 11.3947C55.2083 12.2478 54.9575 12.9535 54.456 13.5119C53.9545 14.0651 53.2048 14.4141 52.207 14.5589C52.7033 14.8484 53.1118 15.1664 53.4323 15.5128C53.758 15.8592 54.1949 16.4744 54.743 17.3585L56.1312 19.5766H53.3858L51.7262 17.1026C51.1367 16.2185 50.7335 15.6627 50.5163 15.4352C50.2992 15.2026 50.0691 15.0449 49.8261 14.9622C49.5831 14.8743 49.1979 14.8303 48.6706 14.8303H48.2052V19.5766H45.9097ZM48.2052 13.0156H49.9037C51.0049 13.0156 51.6925 12.969 51.9666 12.876C52.2406 12.7829 52.4552 12.6226 52.6103 12.3951C52.7654 12.1677 52.8429 11.8833 52.8429 11.5421C52.8429 11.1595 52.7395 10.8518 52.5327 10.6192C52.3311 10.3813 52.0441 10.2314 51.6719 10.1694C51.4857 10.1435 50.9274 10.1306 49.9967 10.1306H48.2052V13.0156Z",fill:wL.icon}),M.createElement(oK,{d:"M57.0621 19.5766V8.20728H65.4921V10.1306H59.3577V12.6511H65.0656V14.5666H59.3577V17.661H65.7093V19.5766H57.0621Z",fill:wL.icon}),M.createElement(oK,{d:"M67.3382 19.5766V8.20728H71.022C72.4179 8.20728 73.3279 8.26415 73.7519 8.37789C74.4033 8.54851 74.9488 8.92076 75.3882 9.49466C75.8277 10.0634 76.0474 10.8001 76.0474 11.7049C76.0474 12.4029 75.9208 12.9897 75.6674 13.4654C75.4141 13.941 75.0909 14.3159 74.698 14.5899C74.3102 14.8587 73.9147 15.0371 73.5114 15.125C72.9634 15.2336 72.1698 15.2879 71.1306 15.2879H69.6338V19.5766H67.3382ZM69.6338 10.1306V13.3568H70.8902C71.7949 13.3568 72.3999 13.2973 72.7049 13.1784C73.0099 13.0595 73.2478 12.8734 73.4184 12.62C73.5942 12.3667 73.6821 12.072 73.6821 11.7359C73.6821 11.3223 73.5606 10.9811 73.3176 10.7122C73.0746 10.4434 72.7669 10.2754 72.3947 10.2081C72.1207 10.1564 71.57 10.1306 70.7428 10.1306H69.6338Z",fill:wL.icon})),SQ=e=>M.createElement(mK,{width:24,height:24,viewBox:"0 0 24 24",fill:"none",...e},M.createElement(oK,{fillRule:"evenodd",clipRule:"evenodd",d:"M11.9617 12.9951H11.9927C14.8247 12.9951 17.1287 10.6912 17.1287 7.85917C17.1287 5.02717 14.8247 2.72217 11.9927 2.72217C9.15975 2.72217 6.85575 5.02717 6.85575 7.85617C6.85075 9.22517 7.37975 10.5132 8.34375 11.4841C9.30675 12.4541 10.5917 12.9911 11.9617 12.9951ZM8.35575 7.85917C8.35575 5.85417 9.98775 4.22217 11.9927 4.22217C13.9977 4.22217 15.6287 5.85417 15.6287 7.85917C15.6287 9.86417 13.9977 11.4951 11.9927 11.4951H11.9647C10.9967 11.4931 10.0897 11.1131 9.40775 10.4262C8.72575 9.74017 8.35275 8.82917 8.35575 7.85917Z",fill:e?.color??wL.icon}),M.createElement(oK,{fillRule:"evenodd",clipRule:"evenodd",d:"M4.40552 19.8591C4.40552 23.4841 10.1215 23.4841 11.9995 23.4841C13.8775 23.4841 19.5945 23.4841 19.5945 19.8371C19.5945 17.0441 16.1165 14.6841 11.9995 14.6841C7.88352 14.6841 4.40552 17.0541 4.40552 19.8591ZM5.90552 19.8591C5.90552 18.1241 8.51152 16.1841 11.9995 16.1841C15.4885 16.1841 18.0945 18.1131 18.0945 19.8371C18.0945 21.2611 16.0435 21.9841 11.9995 21.9841C7.95652 21.9841 5.90552 21.2691 5.90552 19.8591Z",fill:e?.color??wL.icon})),kQ=e=>M.createElement(mK,{width:24,height:24,viewBox:"0 0 24 24",fill:"none",...e},M.createElement(oK,{d:"M10.6279 3.35309C11.9877 2.59902 13.7174 3.09447 14.4773 4.44209L21.746 17.0572C21.906 17.4338 21.976 17.7399 21.996 18.058C22.036 18.8012 21.776 19.5236 21.2661 20.0795C20.7562 20.6334 20.0663 20.9604 19.3164 21H4.6789C4.36896 20.9812 4.05901 20.9108 3.76906 20.8018C2.3193 20.2172 1.61942 18.5723 2.20932 17.1464L9.52809 4.43317C9.77804 3.98628 10.158 3.60082 10.6279 3.35309ZM11.9977 15.2726C11.5178 15.2726 11.1178 15.669 11.1178 16.1456C11.1178 16.6202 11.5178 17.0176 11.9977 17.0176C12.4776 17.0176 12.8675 16.6202 12.8675 16.1347C12.8675 15.66 12.4776 15.2726 11.9977 15.2726ZM11.9977 9.09039C11.5178 9.09039 11.1178 9.47585 11.1178 9.95248V12.7557C11.1178 13.2314 11.5178 13.6287 11.9977 13.6287C12.4776 13.6287 12.8675 13.2314 12.8675 12.7557V9.95248C12.8675 9.47585 12.4776 9.09039 11.9977 9.09039Z",fill:e?.color??wL.icon}));function CQ(e,t){switch(e){case"Walk":return(e=>M.createElement(mK,{width:24,height:25,viewBox:"0 0 24 25",fill:"none",...e},M.createElement(oK,{fillRule:"evenodd",clipRule:"evenodd",d:"M12.2239 7.41804C13.5829 7.41804 14.6889 6.31204 14.6889 4.95204C14.6889 3.59404 13.5829 2.48804 12.2239 2.48804C10.8649 2.48804 9.75995 3.59404 9.75995 4.95204C9.75995 6.31204 10.8649 7.41804 12.2239 7.41804ZM17.2186 12.6578C16.7666 12.5448 16.3446 12.2298 15.9296 11.6948C15.736 11.4433 15.5593 11.1839 15.3846 10.9274L15.3836 10.9258C14.8046 10.0758 14.1476 9.11379 12.9596 8.53979C11.3796 7.77979 9.59864 7.89579 8.30964 8.84679C6.44764 10.2228 6.09164 12.7888 6.02664 13.5428C5.97964 14.0928 6.38664 14.5768 6.93764 14.6238C7.47564 14.6808 7.97164 14.2638 8.01864 13.7138C8.11064 12.6468 8.55264 11.1538 9.49664 10.4558C9.73364 10.2818 10.0186 10.1838 10.3166 10.1198L9.80764 12.1978C9.41064 13.7618 9.76664 15.4568 10.7606 16.7318L14.5416 21.6018C14.7396 21.8558 15.0346 21.9888 15.3326 21.9888C15.5466 21.9888 15.7626 21.9198 15.9456 21.7788C16.3816 21.4398 16.4606 20.8108 16.1216 20.3748L12.3386 15.5038C11.7216 14.7108 11.4996 13.6588 11.7476 12.6818L12.2906 10.4688C12.8766 10.8268 13.2816 11.3938 13.7316 12.0528C13.9286 12.3428 14.1286 12.6348 14.3486 12.9188C15.0496 13.8238 15.8306 14.3728 16.7356 14.5978C16.8166 14.6188 16.8976 14.6278 16.9776 14.6278C17.4266 14.6278 17.8346 14.3248 17.9476 13.8698C18.0806 13.3338 17.7546 12.7908 17.2186 12.6578ZM6.69495 20.3892L8.70595 17.7032C9.03795 17.2612 9.66395 17.1712 10.106 17.5012C10.548 17.8322 10.638 18.4592 10.308 18.9012L8.29695 21.5872C8.09995 21.8502 7.79995 21.9882 7.49495 21.9882C7.28695 21.9882 7.07695 21.9232 6.89695 21.7882C6.45495 21.4582 6.36495 20.8312 6.69495 20.3892Z",fill:e?.color??wL.icon})))(t);case"Run":return(e=>M.createElement(mK,{width:24,height:25,viewBox:"0 0 24 25",fill:"none",...e},M.createElement(oK,{d:"M17.9661 12.2324C16.6232 12.2932 15.2897 11.983 14.1117 11.3357C13.6374 11.0255 13.1929 10.672 12.784 10.2797C12.6006 10.1126 12.4163 9.9456 12.2253 9.7872C11.4615 9.19369 10.5107 8.89299 9.54458 8.93947C8.57848 8.98596 7.6609 9.37655 6.95771 10.0406C6.82035 10.1733 6.63591 10.2459 6.44499 10.2426C6.25406 10.2393 6.07228 10.1602 5.93962 10.0229C5.80698 9.88552 5.73433 9.70109 5.73766 9.51016C5.74099 9.31924 5.82002 9.13745 5.95738 9.0048C6.91167 8.08758 8.16697 7.54871 9.48922 7.48865C10.8115 7.4286 12.1104 7.85147 13.144 8.6784C13.3504 8.84928 13.551 9.03072 13.7507 9.21216C14.0945 9.54399 14.4674 9.84409 14.8653 10.1088C16.0419 10.6983 17.3657 10.9298 18.6726 10.7751C18.7676 10.7687 18.8629 10.7816 18.9527 10.8132C19.0426 10.8447 19.1252 10.8941 19.1953 10.9584C19.2655 11.0229 19.3219 11.1007 19.361 11.1875C19.4003 11.2743 19.4214 11.3682 19.4233 11.4634C19.4316 11.6541 19.3639 11.8402 19.235 11.981C19.1062 12.1218 18.9266 12.2056 18.736 12.2141C18.4902 12.2247 18.232 12.2324 17.9661 12.2324Z",fill:e?.color??wL.icon}),M.createElement(oK,{d:"M11.5341 21.5986C11.4137 21.5983 11.2953 21.5679 11.1897 21.5102C11.0841 21.4525 10.9947 21.3693 10.9295 21.2681C10.8643 21.1669 10.8254 21.0511 10.8166 20.931C10.8076 20.811 10.8289 20.6907 10.8784 20.581L11.1194 20.0606C11.6997 19.0761 12.0143 17.9576 12.0323 16.8149C11.9175 16.2344 11.6386 15.699 11.2288 15.2722C10.7643 14.741 10.4138 14.1202 10.1987 13.4482C9.63232 11.3362 10.8419 9.828 11.8134 8.61552C11.9329 8.46644 12.1066 8.37092 12.2964 8.34994C12.4863 8.32896 12.6767 8.38427 12.8258 8.50368C12.9748 8.62309 13.0704 8.79683 13.0914 8.98668C13.1123 9.17653 13.057 9.36692 12.9376 9.516C11.8634 10.86 11.2374 11.7634 11.5936 13.0747C11.7635 13.5613 12.0277 14.0096 12.3712 14.3938C12.9546 15.0283 13.3365 15.8219 13.4685 16.6738C13.4905 18.0765 13.1308 19.4589 12.4278 20.6731L12.1936 21.1781C12.136 21.3043 12.0431 21.4113 11.926 21.4859C11.809 21.5605 11.6729 21.5996 11.5341 21.5986Z",fill:e?.color??wL.icon}),M.createElement(oK,{d:"M6.00136 17.2471H5.59816C5.3428 17.2471 5.08935 17.2423 4.83591 17.2471C4.64495 17.2527 4.45965 17.182 4.32075 17.0509C4.18186 16.9198 4.10075 16.7388 4.09527 16.5478C4.08979 16.3568 4.1604 16.1716 4.29156 16.0326C4.42271 15.8937 4.60367 15.8127 4.79463 15.8071C5.06631 15.7985 5.33895 15.8014 5.61159 15.8071C6.07354 15.8222 6.53598 15.8068 6.99591 15.7611C7.64014 15.6608 8.25927 15.4382 8.81992 15.1054C8.90312 15.0605 8.99438 15.0322 9.08847 15.0225C9.18257 15.0127 9.27765 15.0217 9.36832 15.0486C9.45897 15.0757 9.54343 15.1203 9.61687 15.18C9.69031 15.2396 9.75127 15.3131 9.7962 15.3964C9.84122 15.4795 9.86944 15.5708 9.87914 15.6649C9.88893 15.7589 9.88001 15.8541 9.85303 15.9447C9.82596 16.0353 9.78141 16.1198 9.7217 16.1933C9.66208 16.2667 9.58855 16.3277 9.50535 16.3727C8.78803 16.7906 7.9976 17.0678 7.1764 17.1896C6.7863 17.2333 6.39385 17.2525 6.00136 17.2471Z",fill:e?.color??wL.icon}),M.createElement(oK,{d:"M15.0016 8.13885C14.4814 8.13885 13.9728 7.98458 13.5403 7.69555C13.1077 7.40651 12.7706 6.9957 12.5715 6.51506C12.3724 6.03441 12.3202 5.50553 12.4218 4.99528C12.5233 4.48504 12.7737 4.01634 13.1416 3.64848C13.5095 3.28061 13.9782 3.03008 14.4885 2.92859C14.9987 2.8271 15.5276 2.87919 16.0083 3.07828C16.4888 3.27737 16.8997 3.61451 17.1887 4.04708C17.4777 4.47965 17.632 4.98821 17.632 5.50845C17.6312 6.20584 17.3539 6.87445 16.8607 7.36759C16.3676 7.86071 15.699 8.13809 15.0016 8.13885ZM15.0016 4.31805C14.7662 4.31805 14.536 4.38787 14.3403 4.51867C14.1445 4.64947 13.992 4.83538 13.9018 5.0529C13.8118 5.27042 13.7882 5.50977 13.8341 5.74068C13.88 5.9716 13.9934 6.18371 14.1599 6.35019C14.3263 6.51667 14.5385 6.63005 14.7694 6.67597C15.0003 6.72191 15.2397 6.69833 15.4571 6.60824C15.6747 6.51814 15.8606 6.36557 15.9914 6.1698C16.1222 5.97404 16.192 5.74389 16.192 5.50845C16.1918 5.19281 16.0662 4.89018 15.843 4.66699C15.6199 4.4438 15.3173 4.31831 15.0016 4.31805Z",fill:e?.color??wL.icon})))(t);case"Cycling":return VK(t);case"Swim":return(e=>M.createElement(mK,{width:24,height:25,viewBox:"0 0 24 25",fill:"none",...e},M.createElement(oK,{fillRule:"evenodd",clipRule:"evenodd",d:"M15.4783 3.16847C13.8241 3.14988 12.4581 4.47976 12.4395 6.14079C12.4208 7.80102 13.7568 9.16101 15.4108 9.17959C17.0646 9.19818 18.4308 7.86853 18.4495 6.20833C18.4681 4.54732 17.1324 3.18705 15.4783 3.16847ZM11.2201 10.4843C9.55401 9.59571 7.35721 9.85949 5.93122 11.2049C5.60073 11.5167 5.08005 11.5015 4.76824 11.171C4.45644 10.8405 4.47158 10.3199 4.80207 10.0081C7.03164 7.90452 10.6515 7.7188 13.0173 9.72702C13.2557 9.92889 13.498 10.1535 13.723 10.3619L13.723 10.362L13.7231 10.362C13.8303 10.4614 13.9337 10.5572 14.0307 10.645C14.3508 10.9348 14.6494 11.1841 14.9664 11.3837C16.144 12.1257 17.6709 12.2476 19.3074 12.1942C19.7615 12.1794 20.1416 12.5356 20.1564 12.9897C20.1712 13.4438 19.8151 13.8239 19.361 13.8387C17.6834 13.8934 15.716 13.8008 14.0894 12.7759C13.6508 12.4996 13.2684 12.1745 12.9264 11.8648C12.798 11.7486 12.6796 11.6387 12.5656 11.5329L12.5656 11.5329L12.522 11.4925C11.9965 12.1701 11.6085 12.7741 11.4397 13.4295C11.3264 13.8695 10.8778 14.1343 10.4378 14.021C9.99778 13.9077 9.73297 13.4591 9.8463 13.0191C10.0938 12.0581 10.6439 11.2264 11.2201 10.4843ZM4.78191 18.232C5.85379 18.232 6.43155 17.9161 6.92362 17.6431L6.93743 17.6354C7.32803 17.4186 7.6404 17.2453 8.33869 17.2453C9.03713 17.2453 9.34901 17.419 9.73782 17.6356L9.75023 17.6425C10.2398 17.9151 10.8153 18.232 11.8824 18.232C12.9539 18.232 13.5314 17.916 14.0233 17.643L14.037 17.6354C14.4274 17.4187 14.7397 17.2453 15.4381 17.2453C16.1437 17.2453 16.4593 17.4199 16.8511 17.6367L16.8636 17.6436C17.3562 17.9161 17.9339 18.232 19.0058 18.232C19.7581 18.232 20.2749 18.0791 20.7164 17.8702C20.8776 17.7939 21.0322 17.7078 21.1592 17.6372L21.1593 17.6371L21.1593 17.6371L21.1596 17.6369L21.161 17.6362C21.191 17.6194 21.2195 17.6036 21.2461 17.589C21.3961 17.5066 21.5225 17.442 21.6609 17.3895C22.1015 17.2227 22.3416 16.6747 22.1972 16.1655C22.0529 15.6564 21.5787 15.3789 21.1381 15.5457C20.8975 15.6368 20.6952 15.7432 20.5251 15.8367C20.4833 15.8597 20.4446 15.8812 20.4081 15.9014C20.2873 15.9685 20.1903 16.0224 20.0801 16.0746C19.8341 16.191 19.5331 16.2917 19.0058 16.2917C18.3083 16.2917 17.9957 16.1188 17.6036 15.9018L17.5884 15.8934C17.0941 15.62 16.5143 15.305 15.4381 15.305C14.3662 15.305 13.7885 15.6209 13.2965 15.894L13.2825 15.9017C12.8921 16.1185 12.58 16.2917 11.8824 16.2917C11.1921 16.2917 10.8833 16.1197 10.4942 15.9029L10.479 15.8945C9.98774 15.6209 9.41013 15.305 8.33869 15.305C7.26681 15.305 6.68906 15.6209 6.19699 15.8939L6.18318 15.9016C5.79258 16.1183 5.48021 16.2917 4.78191 16.2917C4.08599 16.2917 3.81747 16.145 3.41606 15.9257L3.41604 15.9257C3.27028 15.846 3.10699 15.7568 2.89935 15.6616C2.46842 15.464 1.98044 15.7075 1.80942 16.2055C1.6384 16.7035 1.8491 17.2674 2.28003 17.4651C2.37401 17.5082 2.47474 17.5641 2.58641 17.626L2.58643 17.626C3.04185 17.8786 3.67913 18.232 4.78191 18.232ZM6.65016 21.9872C7.08672 21.8689 7.4557 21.6593 7.71739 21.5106C7.78858 21.4702 7.85182 21.4342 7.90633 21.4059C8.17298 21.2672 8.47373 21.148 9.02628 21.148C9.69729 21.148 9.99741 21.32 10.3756 21.5367L10.3903 21.5452C10.8679 21.8188 11.4293 22.1347 12.4708 22.1347C13.5127 22.1347 14.0742 21.8188 14.5525 21.5457L14.5661 21.538C14.9456 21.3212 15.2489 21.148 15.927 21.148C16.4866 21.148 16.7909 21.2678 17.0587 21.4065C17.1137 21.435 17.1776 21.4712 17.2497 21.512C17.5114 21.6604 17.8803 21.8694 18.3145 21.9871C18.7539 22.1063 19.1913 21.7795 19.2915 21.2571C19.3918 20.7347 19.1169 20.2146 18.6775 20.0954C18.4331 20.0291 18.2851 19.9455 18.0671 19.8224C17.9679 19.7663 17.8542 19.7021 17.7104 19.6276C17.2637 19.3963 16.7382 19.2077 15.927 19.2077C14.8855 19.2077 14.3241 19.5237 13.846 19.7967L13.8328 19.8043C13.4532 20.021 13.1496 20.1944 12.4708 20.1944C11.7919 20.1944 11.4887 20.0207 11.1108 19.8041L11.0987 19.7972C10.6229 19.5246 10.0635 19.2077 9.02628 19.2077C8.21967 19.2077 7.69688 19.3969 7.25219 19.6283C7.11128 19.7016 6.99927 19.765 6.9013 19.8204L6.90129 19.8204C6.68193 19.9446 6.53296 20.0289 6.28754 20.0954C5.84816 20.2144 5.57315 20.7345 5.67329 21.2569C5.77342 21.7793 6.21078 22.1063 6.65016 21.9872Z",fill:e?.color??wL.icon})))(t);default:return(e=>M.createElement(mK,{width:24,height:25,viewBox:"0 0 24 25",fill:"none",...e},M.createElement(oK,{d:"M8.779 17.4909L7.11328 21.2378",stroke:e?.color??wL.icon,strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),M.createElement(oK,{fillRule:"evenodd",clipRule:"evenodd",d:"M11.0231 7.14645C12.0982 7.14645 12.9777 6.27273 12.9777 5.19273C12.9777 4.11274 12.0982 3.23804 11.0231 3.23804C9.94792 3.23804 9.06836 4.11274 9.06836 5.19273C9.06836 6.27273 9.94792 7.14645 11.0231 7.14645Z",stroke:e?.color??wL.icon,strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),M.createElement(oK,{d:"M16.8852 10.0007C16.0436 10.421 15.2312 11.069 14.2358 11.0106C13.1354 10.9454 12.0904 10.1642 10.9589 10.4706C9.95086 10.744 9.34859 11.5896 9.29313 12.6005C9.18222 14.6106 11.3675 15.3014 12.2296 16.8251C12.97 18.1328 12.9554 19.7965 12.9846 21.2356",stroke:e?.color??wL.icon,strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),M.createElement(oK,{d:"M16.8848 8.53492L16.8853 10.0008L16.8848 21.2379",stroke:e?.color??wL.icon,strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})))(t)}}function EQ(e){const{hard:t,light:n,moderate:i}=FL.ActivityIntensity;switch(e?.toLowerCase()){case n:return{backgroundColor:wL.bgLight};case i:return{backgroundColor:wL.bgModerate};case t:return{backgroundColor:wL.bgHard};default:return{backgroundColor:wL.bgBackground}}}function xQ(e){return e<=29?"0-29":e<=45?"30-45":"46-60"}function IQ(e,t){const n=new Date,i=pY(hY(iY(new Date(e),1.5),t),n),r=Math.floor(i/60),a=i%60;return r>0?`${r}${Jj("activity_card__active_hour")} ${a}${Jj("activity_card__active_min")}`:`${a} ${Jj("activity_card__active_min")}`}const TQ={Walk:()=>Jj("new_activity_type_walk"),Run:()=>Jj("new_activity_type_run"),Cycling:()=>Jj("new_activity_type_cycling"),Swim:()=>Jj("new_activity_type_swim"),Other:()=>Jj("new_activity_type_other")},OQ={light:()=>Jj("activity_intensity_1"),moderate:()=>Jj("activity_intensity_2"),hard:()=>Jj("activity_intensity_3")},RQ=Hq;function AQ(e,t,n){if(t===n)return e;switch(n){case FL.BloodGlucoseUnit.MG_DL:return e*FL.CONSTANTS.MGDL_PER_MMOLL_BGL;case FL.BloodGlucoseUnit.MMOL_L:return e*FL.CONSTANTS.MMOLL_PER_MGDL_BGL;default:throw new Error(`[conversionGlucose::convertBGL] Unsupported glucose unit! ${n}`)}}function LQ(e,t){const{decimalPlaces:n}=Xq(t);return(Math.round(10*e)/10).toFixed(n)}function PQ(e,t,n){return LQ(AQ(e,t,n),n)}const MQ=WB({entry_timestamp:YB([zB(),jB()]),settings_uuid:jB(),insulin_entered_units:YB([VB(),GB()]),carbohydrates_entered_grams:YB([VB(),GB()]),blood_glucose_millimolar:YB([VB(),GB()]),blood_ketones_millimolar:YB([VB(),GB(),UB()]),event_uuid:YB([jB(),GB(),UB()])});wL.borderCardOverlay,wL.textNavigationNumberActive,wL.textNavigationNumberActive,wL.textNavigationNumberActive;const DQ=e=>{MQ.parse(e);const{blood_glucose_millimolar:t,carbohydrates_entered_grams:n,insulin_entered_units:i,blood_ketones_millimolar:r}=e,{inputMax:a,inputMin:o}=Xq(FL.BloodGlucoseUnit.MMOL_L),{inputMax:s}={displayUnit:RQ,inputMin:0,inputMax:8,decimalPlaces:1};if(null!==t&&t>a)throw new Error(`[LogbookUtils::validateLogbook] blood_glucose_millimolar is greater than ${a}`);if(null!==t&&t<o)throw new Error(`[LogbookUtils::validateLogbook] blood_glucose_millimolar is less than ${o}`);if(null!==r&&r>s)throw new Error(`[LogbookUtils::validateLogbook] blood_ketones_millimolar is greater than ${s}`);const l={blood_glucose_millimolar:t,carbohydrates_entered_grams:n,insulin_entered_units:i,blood_ketones_millimolar:r};return Object.entries(l).forEach(([e,t])=>{if(function(e){return null!==e&&e<0}(t))throw new Error(`[LogbookUtils::validateLogbook] ${e} is less than 0`)}),!0},NQ=e=>({blood_glucose_millimolar:null,blood_ketones_millimolar:null,carbohydrates_entered_grams:0,insulin_entered_units:0,insulin_suggested_units:null,carbohydrates_suggested_grams:null,carbohydrates_modified_suggested_grams:null,carbohydrates_overwritten_suggested_grams:null,client_timestamp:new Date,client_version:"",entry_timestamp:new Date,event_uuid:null,is_deleted:null,mood:null,settings_uuid:"",uuid:"",device_and_os:"",overwritten_by_id:null,server_timestamp:null,server_version:null,utc_timezone_offset:null,active_insulin:null,activity_reduction:null,blood_glucose_millimolar_sample_id:null,timezone:"",...e});const FQ=oV?"/api/v2":zj.HEDIA_API_URL_V2;const BQ=e=>{const{uuid:t}=e;if(!t)throw new Error("[LogbookManager::saveLocally] uuid must be defined");jQ(t);const n=zQ();n.push([t,new Date(e.entry_timestamp).getTime()]),n.sort((e,t)=>t[1]-e[1]),qj.set("logbook/index",JSON.stringify(n)),qj.set(`logbook/${e.uuid}`,JSON.stringify(e))},jQ=e=>{const t=zQ().filter(([t])=>t!==e);qj.set("logbook/index",JSON.stringify(t)),qj.delete(`logbook/${e}`)},VQ=()=>{const e=qj.getString("logbook/pendingChanges");return e?JSON.parse(e):{last_sync_timestamp:new Date(0).toISOString(),created:[],edited:[],deleted:[]}},HQ=(e,t)=>{const{created:n,deleted:i,edited:r,last_sync_timestamp:a}=VQ(),o={last_sync_timestamp:a,created:[...n].filter(({uuid:t})=>t!==e),edited:[...r].filter(({oldUUID:n,newUUID:i})=>n!==t&&i!==e),deleted:[...i].filter(t=>t!==e)};qj.set("logbook/pendingChanges",JSON.stringify(o))},zQ=()=>{const e=qj.getString("logbook/index");return void 0===e?[]:JSON.parse(e)},UQ=new class{async addLogbook(e,t){const n=t?this.getLogbookByUUID(t):null;try{e.uuid=IX(),e.client_timestamp=new Date,e.client_version=PX,e.device_and_os=`${lr.OS} ${lr.Version}`;const n=VQ();if(t){const i=this.getLogbookByUUID(t);e.settings_uuid=i.settings_uuid,n.edited.push({oldUUID:t,newUUID:e.uuid}),jQ(t)}else{const{uuid:t}=Vq;if(!t)throw new Error("[LogbookManager::addLogbook] settingsUUID must be defined");e.settings_uuid=t}return e.utc_timezone_offset=(()=>{const e=(new Date).getTimezoneOffset(),t=-e>=0?"+":"-",n=Math.abs(e);return`${t}${Math.floor(n/60).toString().padStart(2,"0")}:${(n%60).toString().padStart(2,"0")}`})(),e.timezone=Intl.DateTimeFormat().resolvedOptions().timeZone,n.created.push(e),qj.set("logbook/pendingChanges",JSON.stringify(n)),BQ(e),oV?await this.syncWeb():GQ.syncAll().catch(console.error),e}catch(i){return console.error(i),oV&&(t?(jQ(e.uuid),null!==n&&BQ(n),HQ(e.uuid,t)):(jQ(e.uuid),HQ(e.uuid))),null}}deleteLogbook=async e=>{const t=this.getLogbookByUUID(e);try{const t=VQ();return t.deleted.push(e),qj.set("logbook/pendingChanges",JSON.stringify(t)),jQ(e),oV?await this.syncWeb():GQ.syncAll().catch(console.error),!0}catch(n){return console.error(n),oV&&(BQ(t),HQ(e)),!1}};syncWeb=async()=>{const e=VQ(),t=await FX(`${FQ}/logbooks`,(n=e,{method:FL.HTTPRequestMethod.POST,body:JSON.stringify(n),headers:{"Content-Type":"application/json"}}));var n;if(t.status!==FL.StatusCode.OK)throw new Error("Could not sync logbooks with server");const i=await t.json(),{created:r,last_sync_timestamp:a}=i;for(const s of r)BQ(s);const o={last_sync_timestamp:a,created:[],deleted:[],edited:[]};qj.set("logbook/pendingChanges",JSON.stringify(o))};sync=async()=>{const e=VQ(),{created:t,deleted:n,edited:i,last_sync_timestamp:r}=e,a=e=>({method:FL.HTTPRequestMethod.POST,body:JSON.stringify(e),headers:{"Content-Type":"application/json"}}),o=[],s=[],l=[];let u=[],c=[],d=e.last_sync_timestamp;const h=e=>{const{created:t,deleted:n,last_sync_timestamp:i}=e;u=u.concat(t),c=c.concat(n),d=i},m=[{list:t,listName:"created",unsuccess:o},{list:n,listName:"deleted",unsuccess:s},{list:i,listName:"edited",unsuccess:l}];if(!t.length&&!i.length&&!n.length){const e={created:[],deleted:[],edited:[],last_sync_timestamp:r},t=await FX(`${FQ}/logbooks`,a(e));h(await t.json())}for(const g of m)for(const e of g.list){const t={created:[],deleted:[],edited:[],last_sync_timestamp:r};t[g.listName].push(e);try{const n=await FX(`${FQ}/logbooks`,a(t));if(n.status!==FL.StatusCode.OK)throw g.unsuccess.push(e),new Error(`[LogbookManager::sync] Could not sync logbooks with server ${JSON.stringify(await n.json())}`);h(await n.json())}catch(f){console.error(`[LogbookManager::sync] Failed to sync list ${g.listName}`,e,f)}}const p={last_sync_timestamp:d,created:o,deleted:s,edited:l};qj.set("logbook/pendingChanges",JSON.stringify(p)),qj.set("logbook/unsuccessful",JSON.stringify(p));for(const g of u)BQ(g);for(const g of c)jQ(g)};getRecentBoluses=(e,t)=>{const n=new Date(Date.now()-4*FL.Milliseconds.Hour),i=new Date;return this.getLogbooks(e??n,t??i).map(e=>{const{insulin_entered_units:t,entry_timestamp:n}=e;if(null===t)throw new Error("[LogbookManager::getRecentBoluses] insulin_entered_units must be non-null.");return{insulinDose:t,secondsPassed:(Date.now()-new Date(n).getTime())/1e3}})};getLogbooks=(e,t)=>{let n=zQ();if(void 0!==e){const t=e.getTime();n=n.filter(e=>e[1]>=t)}if(void 0!==t){const e=t.getTime();n=n.filter(t=>t[1]<e)}const i=[];for(const a of n)try{const e=this.getLogbookByUUID(a[0]);try{DQ(e),i.push(e)}catch(r){console.error(r),this.removePending(e.uuid),jQ(e.uuid)}}catch(r){console.error(r)}return i};removePending=e=>{HQ(e)};getLogbookByUUID=e=>{const t=qj.getString(`logbook/${e}`);if(!t)throw new Error("LogbookManager::getLogbookByUUID - could not find logbook in local storage");const n={blood_ketones_millimolar:null,...JSON.parse(t)};return{...n,entry_timestamp:new Date(n.entry_timestamp),server_timestamp:n.server_timestamp?new Date(n.server_timestamp):null,client_timestamp:new Date(n.client_timestamp)}}};const GQ=new class{currentIsConnected=null;isSynchronizing=!1;isListenerAttached=!1;constructor(){this.setListener()}syncAll=async()=>{if(!this.isSynchronizing)try{this.isSynchronizing=!0,await Vq.sync().catch(console.error),await Lq.sync().catch(console.error),await UQ.sync().catch(console.error),await wq.fetch().catch(console.error)}finally{this.isSynchronizing=!1}};reset=()=>{Vq.reset(),wq.clear()};handleConnectivity=async({isConnected:e,isInternetReachable:t})=>{const{accessToken:n}=Xz.getState();this.currentIsConnected!==(e&&t)&&(this.currentIsConnected=e&&t,this.currentIsConnected&&n&&await this.syncAll())};setListener=()=>{this.isListenerAttached||oV||(Fz.addEventListener(this.handleConnectivity),this.isListenerAttached=!0)}},{add:WQ,multiply:YQ}=uu;function $Q(e,t,n){return WQ(YQ(e,t),YQ(e.interpolate({inputRange:[0,1],outputRange:[1,0]}),n))}const{add:XQ,multiply:qQ}=uu;function ZQ(e){let{index:t,current:n,next:i,inverted:r,layouts:{screen:a},insets:o}=e;const s="ios"===lr.OS&&!lr.isPad&&!lr.isTV&&o.top>20,l=a.width>a.height,u=l?0:10,c=o.top,d=a.height/a.width,h=XQ(n.progress.interpolate({inputRange:[0,1],outputRange:[0,1],extrapolate:"clamp"}),i?i.progress.interpolate({inputRange:[0,1],outputRange:[0,1],extrapolate:"clamp"}):0),m=0===t,p=qQ(h.interpolate({inputRange:[0,1,2],outputRange:[a.height,m?0:u,(m?c:0)-u*d]}),r),f=h.interpolate({inputRange:[0,1,1.0001,2],outputRange:[0,.3,1,1]}),g=l?1:h.interpolate({inputRange:[0,1,2],outputRange:[1,1,a.width?1-2*u/a.width:1]}),_=l?0:m?h.interpolate({inputRange:[0,1,1.0001,2],outputRange:[0,0,s?38:0,10]}):10;return{cardStyle:{overflow:"hidden",borderTopLeftRadius:_,borderTopRightRadius:_,borderBottomLeftRadius:s?_:0,borderBottomRightRadius:s?_:0,marginTop:m?0:c,marginBottom:m?0:u,transform:[{translateY:p},{scale:g}]},overlayStyle:{opacity:f}}}function KQ(){return{}}const{add:QQ}=uu;function JQ(e){let{current:t,next:n}=e;const i=QQ(t.progress.interpolate({inputRange:[0,1],outputRange:[0,1],extrapolate:"clamp"}),n?n.progress.interpolate({inputRange:[0,1],outputRange:[0,1],extrapolate:"clamp"}):0),r=i.interpolate({inputRange:[0,1,2],outputRange:[0,1,0]});return{leftButtonStyle:{opacity:r},rightButtonStyle:{opacity:r},titleStyle:{opacity:r},backgroundStyle:{opacity:i.interpolate({inputRange:[0,1,1.9,2],outputRange:[0,1,1,0]})}}}function eJ(e){let{current:t,next:n,layouts:{screen:i}}=e;const r=[{translateX:QQ(t.progress.interpolate({inputRange:[0,1],outputRange:[0,1],extrapolate:"clamp"}),n?n.progress.interpolate({inputRange:[0,1],outputRange:[0,1],extrapolate:"clamp"}):0).interpolate({inputRange:[0,1,2],outputRange:Lu.getConstants().isRTL?[-i.width,0,i.width]:[i.width,0,-i.width]})}];return{leftButtonStyle:{transform:r},rightButtonStyle:{transform:r},titleStyle:{transform:r},backgroundStyle:{transform:r}}}function tJ(e){let{current:t,next:n,layouts:{screen:i}}=e;const r=[{translateX:QQ(t.progress.interpolate({inputRange:[0,1],outputRange:[0,1],extrapolate:"clamp"}),n?n.progress.interpolate({inputRange:[0,1],outputRange:[0,1],extrapolate:"clamp"}):0).interpolate({inputRange:[0,1,2],outputRange:Lu.getConstants().isRTL?[i.width,0,-i.width]:[-i.width,0,i.width]})}];return{leftButtonStyle:{transform:r},rightButtonStyle:{transform:r},titleStyle:{transform:r},backgroundStyle:{transform:r}}}function nJ(e){let{current:t,next:n,layouts:{header:i}}=e;const r=[{translateY:QQ(t.progress.interpolate({inputRange:[0,1],outputRange:[0,1],extrapolate:"clamp"}),n?n.progress.interpolate({inputRange:[0,1],outputRange:[0,1],extrapolate:"clamp"}):0).interpolate({inputRange:[0,1,2],outputRange:[-i.height,0,-i.height]})}];return{leftButtonStyle:{transform:r},rightButtonStyle:{transform:r},titleStyle:{transform:r},backgroundStyle:{transform:r}}}function iJ(){return{}}const rJ={animation:"spring",config:{stiffness:1e3,damping:500,mass:3,overshootClamping:!0,restDisplacementThreshold:10,restSpeedThreshold:10}},aJ={animation:"timing",config:{duration:350,easing:Xl.out(Xl.poly(5))}},oJ={animation:"timing",config:{duration:150,easing:Xl.in(Xl.linear)}},sJ={animation:"timing",config:{duration:425,easing:Xl.bezier(.35,.45,0,1)}},lJ={animation:"timing",config:{duration:400,easing:Xl.bezier(.35,.45,0,1)}},uJ={animation:"timing",config:{duration:250,easing:e=>Math.cos((e+1)*Math.PI)/2+.5}},cJ={animation:"timing",config:{duration:200,easing:e=>1===e?1:Math.pow(e,2)}},dJ={gestureDirection:"horizontal",transitionSpec:{open:rJ,close:rJ},cardStyleInterpolator:function(e){let{current:t,next:n,inverted:i,layouts:{screen:r}}=e;return{cardStyle:{transform:[{translateX:qQ(t.progress.interpolate({inputRange:[0,1],outputRange:[r.width,0],extrapolate:"clamp"}),i)},{translateX:n?qQ(n.progress.interpolate({inputRange:[0,1],outputRange:[0,-.3*r.width],extrapolate:"clamp"}),i):0}]},overlayStyle:{opacity:t.progress.interpolate({inputRange:[0,1],outputRange:[0,.07],extrapolate:"clamp"})},shadowStyle:{shadowOpacity:t.progress.interpolate({inputRange:[0,1],outputRange:[0,.3],extrapolate:"clamp"})}}},headerStyleInterpolator:JQ},hJ={gestureDirection:"vertical",transitionSpec:{open:rJ,close:rJ},cardStyleInterpolator:ZQ,headerStyleInterpolator:JQ},mJ={gestureDirection:"vertical",transitionSpec:{open:aJ,close:oJ},cardStyleInterpolator:function(e){let{current:t,inverted:n,layouts:{screen:i},closing:r}=e;const a=qQ(t.progress.interpolate({inputRange:[0,1],outputRange:[.08*i.height,0],extrapolate:"clamp"}),n);return{cardStyle:{opacity:$Q(r,t.progress,t.progress.interpolate({inputRange:[0,.5,.9,1],outputRange:[0,.25,.7,1],extrapolate:"clamp"})),transform:[{translateY:a}]}}},headerStyleInterpolator:JQ},pJ={gestureDirection:"vertical",transitionSpec:{open:sJ,close:sJ},cardStyleInterpolator:function(e){let{current:t,next:n,inverted:i,layouts:{screen:r}}=e;return{containerStyle:{overflow:"hidden",transform:[{translateY:qQ(t.progress.interpolate({inputRange:[0,1],outputRange:[r.height,0],extrapolate:"clamp"}),i)}]},cardStyle:{transform:[{translateY:qQ(t.progress.interpolate({inputRange:[0,1],outputRange:[r.height*(95.9/100)*-1,0],extrapolate:"clamp"}),i)},{translateY:n?qQ(n.progress.interpolate({inputRange:[0,1],outputRange:[0,.02*r.height*-1],extrapolate:"clamp"}),i):0}]},overlayStyle:{opacity:t.progress.interpolate({inputRange:[0,.36,1],outputRange:[0,.1,.1],extrapolate:"clamp"})}}},headerStyleInterpolator:JQ},fJ={gestureDirection:"horizontal",transitionSpec:{open:lJ,close:lJ},cardStyleInterpolator:function(e){let{current:t,next:n,closing:i}=e;const r=XQ(t.progress.interpolate({inputRange:[0,1],outputRange:[0,1],extrapolate:"clamp"}),n?n.progress.interpolate({inputRange:[0,1],outputRange:[0,1],extrapolate:"clamp"}):0);return{cardStyle:{opacity:r.interpolate({inputRange:[0,.75,.875,1,1.0825,1.2075,2],outputRange:[0,0,1,1,1,1,0]}),transform:[{scale:$Q(i,t.progress.interpolate({inputRange:[0,1],outputRange:[.925,1],extrapolate:"clamp"}),r.interpolate({inputRange:[0,1,2],outputRange:[.85,1,1.075]}))}]}}},headerStyleInterpolator:JQ},gJ={gestureDirection:"vertical",transitionSpec:{open:uJ,close:cJ},cardStyleInterpolator:function(e){let{current:t,inverted:n,layouts:{screen:i},closing:r}=e;const a=qQ(t.progress.interpolate({inputRange:[0,1],outputRange:[.8*i.height,0],extrapolate:"clamp"}),n);return{cardStyle:{opacity:$Q(r,t.progress,t.progress.interpolate({inputRange:[0,1],outputRange:[0,1],extrapolate:"clamp"})),transform:[{translateY:a}]},overlayStyle:{opacity:t.progress.interpolate({inputRange:[0,1],outputRange:[0,.3],extrapolate:"clamp"})}}},headerStyleInterpolator:JQ},_J={gestureDirection:"vertical",transitionSpec:{open:uJ,close:cJ},cardStyleInterpolator:function(e){let{current:{progress:t}}=e;return{cardStyle:{opacity:t.interpolate({inputRange:[0,.5,.9,1],outputRange:[0,.25,.7,1]})},overlayStyle:{opacity:t.interpolate({inputRange:[0,1],outputRange:[0,.5],extrapolate:"clamp"})}}},headerStyleInterpolator:JQ},vJ=lr.select({ios:dJ,android:lr.Version>=29?fJ:lr.Version>=28?pJ:mJ,default:fJ}),yJ=lr.select({ios:hJ,default:gJ}),bJ=i(Object.freeze(Object.defineProperty({__proto__:null,default:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAABgCAQAAABIkb+zAAAAlklEQVR4Ae3a1REDMRDG4A3VmHbcUFLigf0exn/mkxuQjmELAAAAAD5Eq5atP6+rZeuPhGz9kZCtPxKy9fs6Zuuf60CfPn369OnTp0+fPn369OnTfx36X1vh+nO6/pytL+D1BCexy+iNhFPt6/dIOEiQIEGCBAkSJEiQ8B0k+PwoQYKhP2OXAYOvRo+vD38bvwcAAACABXF8ILs1PQqpAAAAAElFTkSuQmCC"},Symbol.toStringTag,{value:"Module"}))),wJ=i(Object.freeze(Object.defineProperty({__proto__:null,default:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAABVCAQAAAChx3/YAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAAmJLR0QA/4ePzL8AAAAHdElNRQfkAQMKHDc9iQjuAAACmUlEQVRo3r3ZS2sUQRAH8M5zklwWg0K8mKBB/AIqXhTEi1cTPQe9iH4AUXBNjh79EooKgggSHyCICIIQL7NV1T2bze6EFS/xoms0ie0hs+sa9zE901U79/3R8+iu+pdSnn/VfbCAz/Um2r+XV8AO0jH9pP3vvSN2COdhGX8xInbIzNMKbv1PeEPsiLmEn2i7E+EJsSN4Az+UtjoTXpBwlG7CGnQlPCA2oFtQxZ3uRG7EBnAvjHsTOREbwB2s9bpRuZHKGCzCer9V5ELi8ehuOiIzYkejBUTYTkNkREyAV5DgdzoiE2ICuoYaUxMZEBPQdYpdCGfkzbA+rUsugDNiAnOGwJVwQipj0XlCd8IBscN0wv1GOSEmCE9qyEakREyAZ4myEqkQE+hzupydSIHE4+aUjvIQfZH6hL6QbxV9kfqEnqP1vEQPxA6YA3hReyB6IOUC3vZDdEXKBVPUG36ILkhlihbxqy+iI1KZogf4xW0zd0TWDuJD+AYWLRuyOo2P0DOxB6nM4Fv87pv4B1mdxhfY8E+0IeaIfok/OIgWEs3q97DJQyTI5xn9FBpcBFqlVDgLz6CBlu9S8SS9JlYCraKlTv2qb+QdN4FWYV0AEVkJLQH/M4kn9Sv2t0vkOxH64pt7F9f22LYLVw8D9y4sdJ40T0bgPRmVUqp+iP2MF6pWkrrrPnPdJVRB7tbCVMQNZkSkqlfKDtD+kLs/Eem0xHpGoe631cdHzIhIIiGUrSQp0XHmlEgo7xJK7loZZMiMJGlqjTVNbebCRKy5cPJsLjMn3EJZvdDUQWh+krwCReZJUHOmVaqxzrSEpnNCc0ahiWlz9ksrrLNfoSn27sgf5mCZfrIiStnB8lF8rHdYEaWU+ljQV/dW0X8Ac6zWpmDZsO8AAAAldEVYdGRhdGU6Y3JlYXRlADIwMjAtMDEtMDNUMTA6Mjg6NTIrMDA6MDD7fVVWAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDIwLTAxLTAzVDEwOjI4OjUyKzAwOjAwiiDt6gAAAABJRU5ErkJggg=="},Symbol.toStringTag,{value:"Module"})));function SJ(){return SJ=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},SJ.apply(this,arguments)}function kJ(e){let{style:t,...n}=e;const{colors:i}=Rf();return M.createElement(ga,SJ({},n,{style:[{flex:1,backgroundColor:i.background},t]}))}function CJ(e,t,n){let i;const r=e.width>e.height;return i="ios"===lr.OS?lr.isPad||lr.isTV?t?56:50:r?32:t?56:44:"android"===lr.OS?56:64,i+n}function EJ(e,t){return"string"==typeof e.headerTitle?e.headerTitle:void 0!==e.title?e.title:t}function xJ(){return xJ=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},xJ.apply(this,arguments)}function IJ(e){let{style:t,...n}=e;const{colors:i}=Rf();return M.createElement(uu.View,xJ({style:[TJ.container,{backgroundColor:i.card,borderBottomColor:i.border,shadowColor:i.border},t]},n))}const TJ=Ei.create({container:{flex:1,...lr.select({android:{elevation:4},ios:{shadowOpacity:.85,shadowRadius:0,shadowOffset:{width:0,height:Ei.hairlineWidth}},default:{borderBottomWidth:Ei.hairlineWidth}})}}),OJ="__react_navigation__elements_contexts";function RJ(e,t){let n=self[OJ].get(e);return n||(n=M.createContext(t),n.displayName=e,self[OJ].set(e,n),n)}self[OJ]=self[OJ]??new Map;const AJ=RJ("HeaderShownContext",!1);function LJ(){return LJ=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},LJ.apply(this,arguments)}function PJ(e){let{tintColor:t,style:n,...i}=e;const{colors:r}=Rf();return M.createElement(uu.Text,LJ({accessibilityRole:"header","aria-level":"1",numberOfLines:1},i,{style:[MJ.title,{color:void 0===t?r.text:t},n]}))}const MJ=Ei.create({title:lr.select({ios:{fontSize:17,fontWeight:"600"},android:{fontSize:20,fontFamily:"sans-serif-medium",fontWeight:"normal"},default:{fontSize:18,fontWeight:"500"}})});function DJ(e){const t=hH(),n=mH(),i=M.useContext(AJ),r="ios"===lr.OS&&t.top>50?t.top-5:t.top,{layout:a=n,modal:o=!1,title:s,headerTitle:l,headerTitleAlign:u=lr.select({ios:"center",default:"left"}),headerLeft:c,headerLeftLabelVisible:d,headerTransparent:h,headerTintColor:m,headerBackground:p,headerRight:f,headerTitleAllowFontScaling:g,headerTitleStyle:_,headerLeftContainerStyle:v,headerRightContainerStyle:y,headerTitleContainerStyle:b,headerBackgroundContainerStyle:w,headerStyle:S,headerShadowVisible:k,headerPressColor:C,headerPressOpacity:E,headerStatusBarHeight:x=(i?0:r)}=e,I=CJ(a,o,x),{height:T=I,minHeight:O,maxHeight:R,backgroundColor:A,borderBottomColor:L,borderBottomEndRadius:P,borderBottomLeftRadius:D,borderBottomRightRadius:N,borderBottomStartRadius:F,borderBottomWidth:B,borderColor:j,borderEndColor:V,borderEndWidth:H,borderLeftColor:z,borderLeftWidth:U,borderRadius:G,borderRightColor:W,borderRightWidth:Y,borderStartColor:$,borderStartWidth:X,borderStyle:q,borderTopColor:Z,borderTopEndRadius:K,borderTopLeftRadius:Q,borderTopRightRadius:J,borderTopStartRadius:ee,borderTopWidth:te,borderWidth:ne,boxShadow:ie,elevation:re,shadowColor:ae,shadowOffset:oe,shadowOpacity:se,shadowRadius:le,opacity:ue,transform:ce,...de}=Ei.flatten(S||{}),he={backgroundColor:A,borderBottomColor:L,borderBottomEndRadius:P,borderBottomLeftRadius:D,borderBottomRightRadius:N,borderBottomStartRadius:F,borderBottomWidth:B,borderColor:j,borderEndColor:V,borderEndWidth:H,borderLeftColor:z,borderLeftWidth:U,borderRadius:G,borderRightColor:W,borderRightWidth:Y,borderStartColor:$,borderStartWidth:X,borderStyle:q,borderTopColor:Z,borderTopEndRadius:K,borderTopLeftRadius:Q,borderTopRightRadius:J,borderTopStartRadius:ee,borderTopWidth:te,borderWidth:ne,boxShadow:ie,elevation:re,shadowColor:ae,shadowOffset:oe,shadowOpacity:se,shadowRadius:le,opacity:ue,transform:ce};for(const M in he)void 0===he[M]&&delete he[M];const me=[he,!1===k&&{elevation:0,shadowOpacity:0,borderBottomWidth:0}],pe=c?c({tintColor:m,pressColor:C,pressOpacity:E,labelVisible:d}):null,fe=f?f({tintColor:m,pressColor:C,pressOpacity:E}):null,ge="function"!=typeof l?e=>M.createElement(PJ,e):l;return M.createElement(M.Fragment,null,M.createElement(uu.View,{pointerEvents:"box-none",style:[Ei.absoluteFill,{zIndex:0},w]},p?p({style:me}):h?null:M.createElement(IJ,{style:me})),M.createElement(uu.View,{pointerEvents:"box-none",style:[{height:T,minHeight:O,maxHeight:R,opacity:ue,transform:ce}]},M.createElement(ga,{pointerEvents:"none",style:{height:x}}),M.createElement(ga,{pointerEvents:"box-none",style:NJ.content},M.createElement(uu.View,{pointerEvents:"box-none",style:[NJ.left,"center"===u&&NJ.expand,{marginStart:t.left},v]},pe),M.createElement(uu.View,{pointerEvents:"box-none",style:[NJ.title,{maxWidth:"center"===u?a.width-2*((pe?!1!==d?80:32:16)+Math.max(t.left,t.right)):a.width-((pe?72:16)+(fe?72:16)+t.left-t.right)},b]},ge({children:s,allowFontScaling:g,tintColor:m,style:_})),M.createElement(uu.View,{pointerEvents:"box-none",style:[NJ.right,NJ.expand,{marginEnd:t.right},y]},fe))))}const NJ=Ei.create({content:{flex:1,flexDirection:"row",alignItems:"stretch"},title:{marginHorizontal:16,justifyContent:"center"},left:{justifyContent:"center",alignItems:"flex-start"},right:{justifyContent:"center",alignItems:"flex-end"},expand:{flexGrow:1,flexBasis:0}});function FJ(e){let{children:t}=e;return t}function BJ(){return BJ=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},BJ.apply(this,arguments)}const jJ=uu.createAnimatedComponent(eh),VJ="android"===lr.OS&&lr.Version>=21;function HJ(e){let{onPressIn:t,onPressOut:n,android_ripple:i,pressColor:r,pressOpacity:a=.3,style:o,...s}=e;const{dark:l}=Rf(),[u]=M.useState(()=>new uu.Value(1)),c=(e,t)=>{VJ||uu.timing(u,{toValue:e,duration:t,easing:Xl.inOut(Xl.quad),useNativeDriver:!0}).start()};return M.createElement(jJ,BJ({onPressIn:e=>{c(a,0),null==t||t(e)},onPressOut:e=>{c(1,200),null==n||n(e)},android_ripple:VJ?{color:void 0!==r?r:l?"rgba(255, 255, 255, .32)":"rgba(0, 0, 0, .32)",...i}:void 0,style:[{opacity:VJ?1:u},o]},s))}function zJ(e){let{disabled:t,allowFontScaling:n,backImage:i,label:r,labelStyle:a,labelVisible:o="ios"===lr.OS,onLabelLayout:s,onPress:l,pressColor:u,pressOpacity:c,screenLayout:d,tintColor:h,titleLayout:m,truncatedLabel:p="Back",accessibilityLabel:f=(r&&"Back"!==r?`${r}, back`:"Go back"),testID:g,style:_}=e;const{colors:v}=Rf(),[y,b]=M.useState(void 0),w=void 0!==h?h:lr.select({ios:v.primary,default:v.text}),S=e=>{null==s||s(e),b(e.nativeEvent.layout.x+e.nativeEvent.layout.width)};return M.createElement(HJ,{disabled:t,accessible:!0,accessibilityRole:"button",accessibilityLabel:f,testID:g,onPress:t?void 0:()=>l&&requestAnimationFrame(l),pressColor:u,pressOpacity:c,android_ripple:UJ,style:[GJ.container,t&&GJ.disabled,_],hitSlop:lr.select({ios:void 0,default:{top:16,right:16,bottom:16,left:16}})},M.createElement(M.Fragment,null,i?i({tintColor:w}):M.createElement(Js,{style:[GJ.icon,Boolean(o)&&GJ.iconWithLabel,Boolean(w)&&{tintColor:w}],source:bJ,fadeDuration:0}),(()=>{const e=!r||y&&m&&d&&(d.width-m.width)/2<y+26?p:r;if(!o||void 0===e)return null;const t=M.createElement(ga,{style:d?[GJ.labelWrapper,{minWidth:d.width/2-27}]:null},M.createElement(uu.Text,{accessible:!1,onLayout:e===r?S:void 0,style:[GJ.label,w?{color:w}:null,a],numberOfLines:1,allowFontScaling:!!n},e));return i||"ios"!==lr.OS?t:M.createElement(FJ,{maskElement:M.createElement(ga,{style:GJ.iconMaskContainer},M.createElement(Js,{source:wJ,style:GJ.iconMask}),M.createElement(ga,{style:GJ.iconMaskFillerRect}))},t)})()))}const UJ={borderless:!0,foreground:"android"===lr.OS&&lr.Version>=23,radius:20},GJ=Ei.create({container:{alignItems:"center",flexDirection:"row",minWidth:Ei.hairlineWidth,...lr.select({ios:null,default:{marginVertical:3,marginHorizontal:11}})},disabled:{opacity:.5},label:{fontSize:17,letterSpacing:.35},labelWrapper:{flexDirection:"row",alignItems:"flex-start"},icon:lr.select({ios:{height:21,width:13,marginLeft:8,marginRight:22,marginVertical:12,resizeMode:"contain",transform:[{scaleX:Lu.getConstants().isRTL?-1:1}]},default:{height:24,width:24,margin:3,resizeMode:"contain",transform:[{scaleX:Lu.getConstants().isRTL?-1:1}]}}),iconWithLabel:"ios"===lr.OS?{marginRight:6}:{},iconMaskContainer:{flex:1,flexDirection:"row",justifyContent:"center"},iconMaskFillerRect:{flex:1,backgroundColor:"#000"},iconMask:{height:21,width:13,marginLeft:-14.5,marginVertical:12,alignSelf:"center",resizeMode:"contain",transform:[{scaleX:Lu.getConstants().isRTL?-1:1}]}}),WJ=RJ("HeaderBackContext",void 0),YJ=RJ("HeaderHeightContext",void 0);function $J(e){let{color:t,size:n,style:i}=e;return M.createElement(hl,{style:[XJ.icon,{color:t,fontSize:n},i]},"⏷")}const XJ=Ei.create({icon:{backgroundColor:"transparent"}});function qJ(){return qJ=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},qJ.apply(this,arguments)}function ZJ(e){let{visible:t,children:n,style:i,...r}=e;return"web"===lr.OS?M.createElement(ga,qJ({hidden:!t,style:[{display:t?"flex":"none"},KJ.container,i],pointerEvents:t?"auto":"none"},r),n):M.createElement(ga,{style:[KJ.container,i],pointerEvents:t?"auto":"none"},M.createElement(ga,{collapsable:!1,removeClippedSubviews:"ios"!==lr.OS&&"macos"!==lr.OS||!t,pointerEvents:t?"auto":"none",style:t?KJ.attached:KJ.detached},n))}const KJ=Ei.create({container:{flex:1,overflow:"hidden"},attached:{flex:1},detached:{flex:1,top:3e4}}),{width:QJ=0,height:JJ=0}=Aa.get("window"),e1=(lr.OS,{frame:{x:0,y:0,width:QJ,height:JJ},insets:{top:0,left:0,right:0,bottom:0}});function t1(e){let{children:t,style:n}=e;return M.useContext(sH)?M.createElement(ga,{style:[i1.container,n]},t):("web"===lr.OS&&(t=M.createElement(n1,{initialMetrics:e1},t)),M.createElement(uH,{initialMetrics:e1,style:n},t))}const n1=e=>{let{initialMetrics:t,children:n}=e;const i=M.useRef(null),[r,a]=M.useState(t.frame);return M.useEffect(()=>{if(null==i.current)return;const e=i.current.getBoundingClientRect();let t;a({x:e.x,y:e.y,width:e.width,height:e.height});const n=new ResizeObserver(e=>{const n=e[0];if(n){const{x:e,y:i,width:r,height:o}=n.contentRect;clearTimeout(t),t=setTimeout(()=>{a({x:e,y:i,width:r,height:o})},100)}});return n.observe(i.current),()=>{n.disconnect(),clearTimeout(t)}},[]),M.createElement(lH.Provider,{value:r},M.createElement("div",{ref:i,style:{...Ei.absoluteFillObject,pointerEvents:"none",visibility:"hidden"}}),n)};t1.initialMetrics=e1;const i1=Ei.create({container:{flex:1}});function r1(e){const t=mH(),n=hH(),i=M.useContext(AJ),r=M.useContext(YJ),{focused:a,modal:o=!1,header:s,headerShown:l=!0,headerTransparent:u,headerStatusBarHeight:c=(i?0:n.top),navigation:d,route:h,children:m,style:p}=e,[f,g]=M.useState(()=>CJ(t,o,c));return M.createElement(kJ,{accessibilityElementsHidden:!a,importantForAccessibility:a?"auto":"no-hide-descendants",style:[a1.container,p]},M.createElement(ga,{style:a1.content},M.createElement(AJ.Provider,{value:i||!1!==l},M.createElement(YJ.Provider,{value:l?f:r??0},m))),l?M.createElement(Bm.Provider,{value:d},M.createElement(jm.Provider,{value:h},M.createElement(ga,{onLayout:e=>{const{height:t}=e.nativeEvent.layout;g(t)},style:u?a1.absolute:null},s))):null)}const a1=Ei.create({container:{flex:1,flexDirection:"column-reverse"},content:{flex:1},absolute:{position:"absolute",top:0,left:0,right:0}}),o1=M.createContext(!1),s1=e=>{let{children:t}=e;return M.createElement(M.Fragment,null,t)},l1=ga,u1=3,c1=4,d1=5;function h1(e){let t,n;return function(){let i=!1;for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];if(t){if(t.length!==a.length)i=!0;else for(let e=0;e<t.length;e++)if(t[e]!==a[e]){i=!0;break}}else i=!0;return t=a,(i||void 0===n)&&(n=e(...a)),n}}function m1(){return m1=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},m1.apply(this,arguments)}function p1(e){const[t,n]=M.useState(void 0),[i,r]=M.useState(void 0),a=e=>{const{height:t,width:n}=e.nativeEvent.layout;r(e=>e&&t===e.height&&n===e.width?e:{height:t,width:n})},o=e=>{const{height:i,width:r}=e.nativeEvent.layout;t&&i===t.height&&r===t.width||n({height:i,width:r})},s=h1((e,t,n,i,r,a,o)=>e({current:{progress:n},next:i&&{progress:i},layouts:{header:{height:o,width:t.width},screen:t,title:r,leftLabel:a}})),{progress:l,layout:u,modal:c,onGoBack:d,headerTitle:h,headerLeft:m=(d?e=>M.createElement(zJ,e):void 0),headerRight:p,headerBackImage:f,headerBackTitle:g,headerBackTitleVisible:_="ios"===lr.OS,headerTruncatedBackTitle:v,headerBackAccessibilityLabel:y,headerBackTestID:b,headerBackAllowFontScaling:w,headerBackTitleStyle:S,headerTitleContainerStyle:k,headerLeftContainerStyle:C,headerRightContainerStyle:E,headerBackgroundContainerStyle:x,headerStyle:I,headerStatusBarHeight:T,styleInterpolator:O,...R}=e,A=CJ(u,c,T),{height:L=A}=Ei.flatten(I||{}),{titleStyle:P,leftButtonStyle:D,leftLabelStyle:N,rightButtonStyle:F,backgroundStyle:B}=s(O,u,l.current,l.next,i,g?t:void 0,"number"==typeof L?L:A),j=m?e=>m({...e,backImage:f,accessibilityLabel:y,testID:b,allowFontScaling:w,onPress:d,label:g,truncatedLabel:v,labelStyle:[N,S],onLabelLayout:o,screenLayout:u,titleLayout:i,canGoBack:Boolean(d)}):void 0,V=p?e=>p({...e,canGoBack:Boolean(d)}):void 0,H="function"!=typeof h?e=>M.createElement(PJ,m1({},e,{onLayout:a})):e=>h({...e,onLayout:a});return M.createElement(DJ,m1({modal:c,layout:u,headerTitle:H,headerLeft:j,headerLeftLabelVisible:_,headerRight:V,headerTitleContainerStyle:[P,k],headerLeftContainerStyle:[D,C],headerRightContainerStyle:[F,E],headerBackgroundContainerStyle:[B,x],headerStyle:I,headerStatusBarHeight:T},R))}function f1(){return f1=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},f1.apply(this,arguments)}const g1=M.memo(function(e){let{back:t,layout:n,progress:i,options:r,route:a,navigation:o,styleInterpolator:s}=e;const l=hH();let u;void 0!==r.headerBackTitle?u=r.headerBackTitle:t&&(u=t.title);const c=M.useCallback(function(e,t){let n;return function(){if(!n){for(var i=arguments.length,r=new Array(i),a=0;a<i;a++)r[a]=arguments[a];e.apply(this,r),n=setTimeout(()=>{n=void 0},t)}}}(()=>{o.isFocused()&&o.canGoBack()&&o.dispatch({...Rm.pop(),source:a.key})},50),[o,a.key]),d=M.useContext(o1),h=M.useContext(AJ),m=void 0!==r.headerStatusBarHeight?r.headerStatusBarHeight:d||h?0:l.top;return M.createElement(p1,f1({},r,{title:EJ(r,a.name),progress:i,layout:n,modal:d,headerBackTitle:void 0!==r.headerBackTitle?r.headerBackTitle:u,headerStatusBarHeight:m,onGoBack:t?c:void 0,styleInterpolator:s}))});function _1(e){let{mode:t,scenes:n,layout:i,getPreviousScene:r,getFocusedRoute:a,onContentHeightChange:o,style:s}=e;const l=a(),u=M.useContext(WJ);return M.createElement(uu.View,{pointerEvents:"box-none",style:s},n.slice(-3).map((e,n,a)=>{var s,c;if("screen"===t&&n!==a.length-1||!e)return null;const{header:d,headerMode:h,headerShown:m=!0,headerTransparent:p,headerStyleInterpolator:f}=e.descriptor.options;if(h!==t||!m)return null;const g=l.key===e.descriptor.route.key,_=r({route:e.descriptor.route});let v=u;if(_){const{options:e,route:t}=_.descriptor;v=_?{title:EJ(e,t.name)}:u}const y=null===(s=a[n-1])||void 0===s?void 0:s.descriptor,b=null===(c=a[n+1])||void 0===c?void 0:c.descriptor,{headerShown:w=!0,headerMode:S}=(null==y?void 0:y.options)||{},k=a.slice(n+1).find(e=>{const{headerShown:t=!0,headerMode:n}=(null==e?void 0:e.descriptor.options)||{};return!1===t||"screen"===n}),{gestureDirection:C}=(null==k?void 0:k.descriptor.options)||{},E=(!1===w||"screen"===S)&&!b||k,x={layout:i,back:v,progress:e.progress,options:e.descriptor.options,route:e.descriptor.route,navigation:e.descriptor.navigation,styleInterpolator:"float"===t?E?"vertical"===C||"vertical-inverted"===C?nJ:"horizontal-inverted"===C?tJ:eJ:f:iJ};return M.createElement(Bm.Provider,{key:e.descriptor.route.key,value:e.descriptor.navigation},M.createElement(jm.Provider,{value:e.descriptor.route},M.createElement(ga,{onLayout:o?t=>{const{height:n}=t.nativeEvent.layout;o({route:e.descriptor.route,height:n})}:void 0,pointerEvents:g?"box-none":"none",accessibilityElementsHidden:!g,importantForAccessibility:g?"auto":"no-hide-descendants",style:"float"===t&&!g||p?v1.header:null},void 0!==d?d(x):M.createElement(g1,x))))}))}const v1=Ei.create({header:{position:"absolute",top:0,left:0,right:0}});var y1,b1,w1={exports:{}};function S1(){return b1?y1:(b1=1,y1={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]})}var k1,C1,E1,x1,I1,T1,O1,R1,A1,L1,P1,M1,D1={exports:{}};function N1(){if(E1)return D1.exports;E1=1;var e=C1?k1:(C1=1,k1=function(e){return!(!e||"string"==typeof e)&&(e instanceof Array||Array.isArray(e)||e.length>=0&&(e.splice instanceof Function||Object.getOwnPropertyDescriptor(e,e.length-1)&&"String"!==e.constructor.name))}),t=Array.prototype.concat,n=Array.prototype.slice,i=D1.exports=function(i){for(var r=[],a=0,o=i.length;a<o;a++){var s=i[a];e(s)?r=t.call(r,n.call(s)):r.push(s)}return r};return i.wrap=function(e){return function(){return e(i(arguments))}},D1.exports}function F1(){if(T1)return I1;T1=1;const e=S1(),t={};for(const r of Object.keys(e))t[e[r]]=r;const n={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};I1=n;for(const r of Object.keys(n)){if(!("channels"in n[r]))throw new Error("missing channels property: "+r);if(!("labels"in n[r]))throw new Error("missing channel labels property: "+r);if(n[r].labels.length!==n[r].channels)throw new Error("channel and label counts mismatch: "+r);const{channels:e,labels:t}=n[r];delete n[r].channels,delete n[r].labels,Object.defineProperty(n[r],"channels",{value:e}),Object.defineProperty(n[r],"labels",{value:t})}function i(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}return n.rgb.hsl=function(e){const t=e[0]/255,n=e[1]/255,i=e[2]/255,r=Math.min(t,n,i),a=Math.max(t,n,i),o=a-r;let s,l;a===r?s=0:t===a?s=(n-i)/o:n===a?s=2+(i-t)/o:i===a&&(s=4+(t-n)/o),s=Math.min(60*s,360),s<0&&(s+=360);const u=(r+a)/2;return l=a===r?0:u<=.5?o/(a+r):o/(2-a-r),[s,100*l,100*u]},n.rgb.hsv=function(e){let t,n,i,r,a;const o=e[0]/255,s=e[1]/255,l=e[2]/255,u=Math.max(o,s,l),c=u-Math.min(o,s,l),d=function(e){return(u-e)/6/c+.5};return 0===c?(r=0,a=0):(a=c/u,t=d(o),n=d(s),i=d(l),o===u?r=i-n:s===u?r=1/3+t-i:l===u&&(r=2/3+n-t),r<0?r+=1:r>1&&(r-=1)),[360*r,100*a,100*u]},n.rgb.hwb=function(e){const t=e[0],i=e[1];let r=e[2];const a=n.rgb.hsl(e)[0],o=1/255*Math.min(t,Math.min(i,r));return r=1-1/255*Math.max(t,Math.max(i,r)),[a,100*o,100*r]},n.rgb.cmyk=function(e){const t=e[0]/255,n=e[1]/255,i=e[2]/255,r=Math.min(1-t,1-n,1-i);return[100*((1-t-r)/(1-r)||0),100*((1-n-r)/(1-r)||0),100*((1-i-r)/(1-r)||0),100*r]},n.rgb.keyword=function(n){const r=t[n];if(r)return r;let a,o=1/0;for(const t of Object.keys(e)){const r=i(n,e[t]);r<o&&(o=r,a=t)}return a},n.keyword.rgb=function(t){return e[t]},n.rgb.xyz=function(e){let t=e[0]/255,n=e[1]/255,i=e[2]/255;t=t>.04045?((t+.055)/1.055)**2.4:t/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92,i=i>.04045?((i+.055)/1.055)**2.4:i/12.92;return[100*(.4124*t+.3576*n+.1805*i),100*(.2126*t+.7152*n+.0722*i),100*(.0193*t+.1192*n+.9505*i)]},n.rgb.lab=function(e){const t=n.rgb.xyz(e);let i=t[0],r=t[1],a=t[2];i/=95.047,r/=100,a/=108.883,i=i>.008856?i**(1/3):7.787*i+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,a=a>.008856?a**(1/3):7.787*a+16/116;return[116*r-16,500*(i-r),200*(r-a)]},n.hsl.rgb=function(e){const t=e[0]/360,n=e[1]/100,i=e[2]/100;let r,a,o;if(0===n)return o=255*i,[o,o,o];r=i<.5?i*(1+n):i+n-i*n;const s=2*i-r,l=[0,0,0];for(let u=0;u<3;u++)a=t+1/3*-(u-1),a<0&&a++,a>1&&a--,o=6*a<1?s+6*(r-s)*a:2*a<1?r:3*a<2?s+(r-s)*(2/3-a)*6:s,l[u]=255*o;return l},n.hsl.hsv=function(e){const t=e[0];let n=e[1]/100,i=e[2]/100,r=n;const a=Math.max(i,.01);i*=2,n*=i<=1?i:2-i,r*=a<=1?a:2-a;return[t,100*(0===i?2*r/(a+r):2*n/(i+n)),100*((i+n)/2)]},n.hsv.rgb=function(e){const t=e[0]/60,n=e[1]/100;let i=e[2]/100;const r=Math.floor(t)%6,a=t-Math.floor(t),o=255*i*(1-n),s=255*i*(1-n*a),l=255*i*(1-n*(1-a));switch(i*=255,r){case 0:return[i,l,o];case 1:return[s,i,o];case 2:return[o,i,l];case 3:return[o,s,i];case 4:return[l,o,i];case 5:return[i,o,s]}},n.hsv.hsl=function(e){const t=e[0],n=e[1]/100,i=e[2]/100,r=Math.max(i,.01);let a,o;o=(2-n)*i;const s=(2-n)*r;return a=n*r,a/=s<=1?s:2-s,a=a||0,o/=2,[t,100*a,100*o]},n.hwb.rgb=function(e){const t=e[0]/360;let n=e[1]/100,i=e[2]/100;const r=n+i;let a;r>1&&(n/=r,i/=r);const o=Math.floor(6*t),s=1-i;a=6*t-o,1&o&&(a=1-a);const l=n+a*(s-n);let u,c,d;switch(o){default:case 6:case 0:u=s,c=l,d=n;break;case 1:u=l,c=s,d=n;break;case 2:u=n,c=s,d=l;break;case 3:u=n,c=l,d=s;break;case 4:u=l,c=n,d=s;break;case 5:u=s,c=n,d=l}return[255*u,255*c,255*d]},n.cmyk.rgb=function(e){const t=e[0]/100,n=e[1]/100,i=e[2]/100,r=e[3]/100;return[255*(1-Math.min(1,t*(1-r)+r)),255*(1-Math.min(1,n*(1-r)+r)),255*(1-Math.min(1,i*(1-r)+r))]},n.xyz.rgb=function(e){const t=e[0]/100,n=e[1]/100,i=e[2]/100;let r,a,o;return r=3.2406*t+-1.5372*n+-.4986*i,a=-.9689*t+1.8758*n+.0415*i,o=.0557*t+-.204*n+1.057*i,r=r>.0031308?1.055*r**(1/2.4)-.055:12.92*r,a=a>.0031308?1.055*a**(1/2.4)-.055:12.92*a,o=o>.0031308?1.055*o**(1/2.4)-.055:12.92*o,r=Math.min(Math.max(0,r),1),a=Math.min(Math.max(0,a),1),o=Math.min(Math.max(0,o),1),[255*r,255*a,255*o]},n.xyz.lab=function(e){let t=e[0],n=e[1],i=e[2];t/=95.047,n/=100,i/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,i=i>.008856?i**(1/3):7.787*i+16/116;return[116*n-16,500*(t-n),200*(n-i)]},n.lab.xyz=function(e){let t,n,i;n=(e[0]+16)/116,t=e[1]/500+n,i=n-e[2]/200;const r=n**3,a=t**3,o=i**3;return n=r>.008856?r:(n-16/116)/7.787,t=a>.008856?a:(t-16/116)/7.787,i=o>.008856?o:(i-16/116)/7.787,t*=95.047,n*=100,i*=108.883,[t,n,i]},n.lab.lch=function(e){const t=e[0],n=e[1],i=e[2];let r;r=360*Math.atan2(i,n)/2/Math.PI,r<0&&(r+=360);return[t,Math.sqrt(n*n+i*i),r]},n.lch.lab=function(e){const t=e[0],n=e[1],i=e[2]/360*2*Math.PI;return[t,n*Math.cos(i),n*Math.sin(i)]},n.rgb.ansi16=function(e,t=null){const[i,r,a]=e;let o=null===t?n.rgb.hsv(e)[2]:t;if(o=Math.round(o/50),0===o)return 30;let s=30+(Math.round(a/255)<<2|Math.round(r/255)<<1|Math.round(i/255));return 2===o&&(s+=60),s},n.hsv.ansi16=function(e){return n.rgb.ansi16(n.hsv.rgb(e),e[2])},n.rgb.ansi256=function(e){const t=e[0],n=e[1],i=e[2];if(t===n&&n===i)return t<8?16:t>248?231:Math.round((t-8)/247*24)+232;return 16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(i/255*5)},n.ansi16.rgb=function(e){let t=e%10;if(0===t||7===t)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];const n=.5*(1+~~(e>50));return[(1&t)*n*255,(t>>1&1)*n*255,(t>>2&1)*n*255]},n.ansi256.rgb=function(e){if(e>=232){const t=10*(e-232)+8;return[t,t,t]}let t;e-=16;return[Math.floor(e/36)/5*255,Math.floor((t=e%36)/6)/5*255,t%6/5*255]},n.rgb.hex=function(e){const t=(((255&Math.round(e[0]))<<16)+((255&Math.round(e[1]))<<8)+(255&Math.round(e[2]))).toString(16).toUpperCase();return"000000".substring(t.length)+t},n.hex.rgb=function(e){const t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let n=t[0];3===t[0].length&&(n=n.split("").map(e=>e+e).join(""));const i=parseInt(n,16);return[i>>16&255,i>>8&255,255&i]},n.rgb.hcg=function(e){const t=e[0]/255,n=e[1]/255,i=e[2]/255,r=Math.max(Math.max(t,n),i),a=Math.min(Math.min(t,n),i),o=r-a;let s,l;return s=o<1?a/(1-o):0,l=o<=0?0:r===t?(n-i)/o%6:r===n?2+(i-t)/o:4+(t-n)/o,l/=6,l%=1,[360*l,100*o,100*s]},n.hsl.hcg=function(e){const t=e[1]/100,n=e[2]/100,i=n<.5?2*t*n:2*t*(1-n);let r=0;return i<1&&(r=(n-.5*i)/(1-i)),[e[0],100*i,100*r]},n.hsv.hcg=function(e){const t=e[1]/100,n=e[2]/100,i=t*n;let r=0;return i<1&&(r=(n-i)/(1-i)),[e[0],100*i,100*r]},n.hcg.rgb=function(e){const t=e[0]/360,n=e[1]/100,i=e[2]/100;if(0===n)return[255*i,255*i,255*i];const r=[0,0,0],a=t%1*6,o=a%1,s=1-o;let l=0;switch(Math.floor(a)){case 0:r[0]=1,r[1]=o,r[2]=0;break;case 1:r[0]=s,r[1]=1,r[2]=0;break;case 2:r[0]=0,r[1]=1,r[2]=o;break;case 3:r[0]=0,r[1]=s,r[2]=1;break;case 4:r[0]=o,r[1]=0,r[2]=1;break;default:r[0]=1,r[1]=0,r[2]=s}return l=(1-n)*i,[255*(n*r[0]+l),255*(n*r[1]+l),255*(n*r[2]+l)]},n.hcg.hsv=function(e){const t=e[1]/100,n=t+e[2]/100*(1-t);let i=0;return n>0&&(i=t/n),[e[0],100*i,100*n]},n.hcg.hsl=function(e){const t=e[1]/100,n=e[2]/100*(1-t)+.5*t;let i=0;return n>0&&n<.5?i=t/(2*n):n>=.5&&n<1&&(i=t/(2*(1-n))),[e[0],100*i,100*n]},n.hcg.hwb=function(e){const t=e[1]/100,n=t+e[2]/100*(1-t);return[e[0],100*(n-t),100*(1-n)]},n.hwb.hcg=function(e){const t=e[1]/100,n=1-e[2]/100,i=n-t;let r=0;return i<1&&(r=(n-i)/(1-i)),[e[0],100*i,100*r]},n.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},n.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},n.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},n.gray.hsl=function(e){return[0,0,e[0]]},n.gray.hsv=n.gray.hsl,n.gray.hwb=function(e){return[0,100,e[0]]},n.gray.cmyk=function(e){return[0,0,0,e[0]]},n.gray.lab=function(e){return[e[0],0,0]},n.gray.hex=function(e){const t=255&Math.round(e[0]/100*255),n=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(n.length)+n},n.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]},I1}function B1(){if(R1)return O1;R1=1;const e=F1();function t(t){const n=function(){const t={},n=Object.keys(e);for(let e=n.length,i=0;i<e;i++)t[n[i]]={distance:-1,parent:null};return t}(),i=[t];for(n[t].distance=0;i.length;){const t=i.pop(),r=Object.keys(e[t]);for(let e=r.length,a=0;a<e;a++){const e=r[a],o=n[e];-1===o.distance&&(o.distance=n[t].distance+1,o.parent=t,i.unshift(e))}}return n}function n(e,t){return function(n){return t(e(n))}}function i(t,i){const r=[i[t].parent,t];let a=e[i[t].parent][t],o=i[t].parent;for(;i[o].parent;)r.unshift(i[o].parent),a=n(e[i[o].parent][o],a),o=i[o].parent;return a.conversion=r,a}return O1=function(e){const n=t(e),r={},a=Object.keys(n);for(let t=a.length,o=0;o<t;o++){const e=a[o];null!==n[e].parent&&(r[e]=i(e,n))}return r},O1}function j1(){if(L1)return A1;L1=1;const e=F1(),t=B1(),n={};return Object.keys(e).forEach(i=>{n[i]={},Object.defineProperty(n[i],"channels",{value:e[i].channels}),Object.defineProperty(n[i],"labels",{value:e[i].labels});const r=t(i);Object.keys(r).forEach(e=>{const t=r[e];n[i][e]=function(e){const t=function(...t){const n=t[0];if(null==n)return n;n.length>1&&(t=n);const i=e(t);if("object"==typeof i)for(let e=i.length,r=0;r<e;r++)i[r]=Math.round(i[r]);return i};return"conversion"in e&&(t.conversion=e.conversion),t}(t),n[i][e].raw=function(e){const t=function(...t){const n=t[0];return null==n?n:(n.length>1&&(t=n),e(t))};return"conversion"in e&&(t.conversion=e.conversion),t}(t)})}),A1=n}function V1(){if(M1)return P1;M1=1;const e=function(){if(x1)return w1.exports;x1=1;var e=S1(),t=N1(),n=Object.hasOwnProperty,i=Object.create(null);for(var r in e)n.call(e,r)&&(i[e[r]]=r);var a=w1.exports={to:{},get:{}};function o(e,t,n){return Math.min(Math.max(t,e),n)}function s(e){var t=Math.round(e).toString(16).toUpperCase();return t.length<2?"0"+t:t}return a.get=function(e){var t,n;switch(e.substring(0,3).toLowerCase()){case"hsl":t=a.get.hsl(e),n="hsl";break;case"hwb":t=a.get.hwb(e),n="hwb";break;default:t=a.get.rgb(e),n="rgb"}return t?{model:n,value:t}:null},a.get.rgb=function(t){if(!t)return null;var i,r,a,s=[0,0,0,1];if(i=t.match(/^#([a-f0-9]{6})([a-f0-9]{2})?$/i)){for(a=i[2],i=i[1],r=0;r<3;r++){var l=2*r;s[r]=parseInt(i.slice(l,l+2),16)}a&&(s[3]=parseInt(a,16)/255)}else if(i=t.match(/^#([a-f0-9]{3,4})$/i)){for(a=(i=i[1])[3],r=0;r<3;r++)s[r]=parseInt(i[r]+i[r],16);a&&(s[3]=parseInt(a+a,16)/255)}else if(i=t.match(/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)){for(r=0;r<3;r++)s[r]=parseInt(i[r+1],0);i[4]&&(i[5]?s[3]=.01*parseFloat(i[4]):s[3]=parseFloat(i[4]))}else{if(!(i=t.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)))return(i=t.match(/^(\w+)$/))?"transparent"===i[1]?[0,0,0,0]:n.call(e,i[1])?((s=e[i[1]])[3]=1,s):null:null;for(r=0;r<3;r++)s[r]=Math.round(2.55*parseFloat(i[r+1]));i[4]&&(i[5]?s[3]=.01*parseFloat(i[4]):s[3]=parseFloat(i[4]))}for(r=0;r<3;r++)s[r]=o(s[r],0,255);return s[3]=o(s[3],0,1),s},a.get.hsl=function(e){if(!e)return null;var t=e.match(/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(t){var n=parseFloat(t[4]);return[(parseFloat(t[1])%360+360)%360,o(parseFloat(t[2]),0,100),o(parseFloat(t[3]),0,100),o(isNaN(n)?1:n,0,1)]}return null},a.get.hwb=function(e){if(!e)return null;var t=e.match(/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(t){var n=parseFloat(t[4]);return[(parseFloat(t[1])%360+360)%360,o(parseFloat(t[2]),0,100),o(parseFloat(t[3]),0,100),o(isNaN(n)?1:n,0,1)]}return null},a.to.hex=function(){var e=t(arguments);return"#"+s(e[0])+s(e[1])+s(e[2])+(e[3]<1?s(Math.round(255*e[3])):"")},a.to.rgb=function(){var e=t(arguments);return e.length<4||1===e[3]?"rgb("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+")":"rgba("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+", "+e[3]+")"},a.to.rgb.percent=function(){var e=t(arguments),n=Math.round(e[0]/255*100),i=Math.round(e[1]/255*100),r=Math.round(e[2]/255*100);return e.length<4||1===e[3]?"rgb("+n+"%, "+i+"%, "+r+"%)":"rgba("+n+"%, "+i+"%, "+r+"%, "+e[3]+")"},a.to.hsl=function(){var e=t(arguments);return e.length<4||1===e[3]?"hsl("+e[0]+", "+e[1]+"%, "+e[2]+"%)":"hsla("+e[0]+", "+e[1]+"%, "+e[2]+"%, "+e[3]+")"},a.to.hwb=function(){var e=t(arguments),n="";return e.length>=4&&1!==e[3]&&(n=", "+e[3]),"hwb("+e[0]+", "+e[1]+"%, "+e[2]+"%"+n+")"},a.to.keyword=function(e){return i[e.slice(0,3)]},w1.exports}(),t=j1(),n=["keyword","gray","hex"],i={};for(const c of Object.keys(t))i[[...t[c].labels].sort().join("")]=c;const r={};function a(o,s){if(!(this instanceof a))return new a(o,s);if(s&&s in n&&(s=null),s&&!(s in t))throw new Error("Unknown model: "+s);let l,c;if(null==o)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(o instanceof a)this.model=o.model,this.color=[...o.color],this.valpha=o.valpha;else if("string"==typeof o){const n=e.get(o);if(null===n)throw new Error("Unable to parse color from string: "+o);this.model=n.model,c=t[this.model].channels,this.color=n.value.slice(0,c),this.valpha="number"==typeof n.value[c]?n.value[c]:1}else if(o.length>0){this.model=s||"rgb",c=t[this.model].channels;const e=Array.prototype.slice.call(o,0,c);this.color=u(e,c),this.valpha="number"==typeof o[c]?o[c]:1}else if("number"==typeof o)this.model="rgb",this.color=[o>>16&255,o>>8&255,255&o],this.valpha=1;else{this.valpha=1;const e=Object.keys(o);"alpha"in o&&(e.splice(e.indexOf("alpha"),1),this.valpha="number"==typeof o.alpha?o.alpha:0);const n=e.sort().join("");if(!(n in i))throw new Error("Unable to parse color from object: "+JSON.stringify(o));this.model=i[n];const{labels:r}=t[this.model],a=[];for(l=0;l<r.length;l++)a.push(o[r[l]]);this.color=u(a)}if(r[this.model])for(c=t[this.model].channels,l=0;l<c;l++){const e=r[this.model][l];e&&(this.color[l]=e(this.color[l]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}a.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(t){let n=this.model in e.to?this:this.rgb();n=n.round("number"==typeof t?t:1);const i=1===n.valpha?n.color:[...n.color,this.valpha];return e.to[n.model](i)},percentString(t){const n=this.rgb().round("number"==typeof t?t:1),i=1===n.valpha?n.color:[...n.color,this.valpha];return e.to.rgb.percent(i)},array(){return 1===this.valpha?[...this.color]:[...this.color,this.valpha]},object(){const e={},{channels:n}=t[this.model],{labels:i}=t[this.model];for(let t=0;t<n;t++)e[i[t]]=this.color[t];return 1!==this.valpha&&(e.alpha=this.valpha),e},unitArray(){const e=this.rgb().color;return e[0]/=255,e[1]/=255,e[2]/=255,1!==this.valpha&&e.push(this.valpha),e},unitObject(){const e=this.rgb().object();return e.r/=255,e.g/=255,e.b/=255,1!==this.valpha&&(e.alpha=this.valpha),e},round(e){return e=Math.max(e||0,0),new a([...this.color.map(o(e)),this.valpha],this.model)},alpha(e){return void 0!==e?new a([...this.color,Math.max(0,Math.min(1,e))],this.model):this.valpha},red:s("rgb",0,l(255)),green:s("rgb",1,l(255)),blue:s("rgb",2,l(255)),hue:s(["hsl","hsv","hsl","hwb","hcg"],0,e=>(e%360+360)%360),saturationl:s("hsl",1,l(100)),lightness:s("hsl",2,l(100)),saturationv:s("hsv",1,l(100)),value:s("hsv",2,l(100)),chroma:s("hcg",1,l(100)),gray:s("hcg",2,l(100)),white:s("hwb",1,l(100)),wblack:s("hwb",2,l(100)),cyan:s("cmyk",0,l(100)),magenta:s("cmyk",1,l(100)),yellow:s("cmyk",2,l(100)),black:s("cmyk",3,l(100)),x:s("xyz",0,l(95.047)),y:s("xyz",1,l(100)),z:s("xyz",2,l(108.833)),l:s("lab",0,l(100)),a:s("lab",1),b:s("lab",2),keyword(e){return void 0!==e?new a(e):t[this.model].keyword(this.color)},hex(t){return void 0!==t?new a(t):e.to.hex(this.rgb().round().color)},hexa(t){if(void 0!==t)return new a(t);const n=this.rgb().round().color;let i=Math.round(255*this.valpha).toString(16).toUpperCase();return 1===i.length&&(i="0"+i),e.to.hex(n)+i},rgbNumber(){const e=this.rgb().color;return(255&e[0])<<16|(255&e[1])<<8|255&e[2]},luminosity(){const e=this.rgb().color,t=[];for(const[n,i]of e.entries()){const e=i/255;t[n]=e<=.04045?e/12.92:((e+.055)/1.055)**2.4}return.2126*t[0]+.7152*t[1]+.0722*t[2]},contrast(e){const t=this.luminosity(),n=e.luminosity();return t>n?(t+.05)/(n+.05):(n+.05)/(t+.05)},level(e){const t=this.contrast(e);return t>=7?"AAA":t>=4.5?"AA":""},isDark(){const e=this.rgb().color;return(2126*e[0]+7152*e[1]+722*e[2])/1e4<128},isLight(){return!this.isDark()},negate(){const e=this.rgb();for(let t=0;t<3;t++)e.color[t]=255-e.color[t];return e},lighten(e){const t=this.hsl();return t.color[2]+=t.color[2]*e,t},darken(e){const t=this.hsl();return t.color[2]-=t.color[2]*e,t},saturate(e){const t=this.hsl();return t.color[1]+=t.color[1]*e,t},desaturate(e){const t=this.hsl();return t.color[1]-=t.color[1]*e,t},whiten(e){const t=this.hwb();return t.color[1]+=t.color[1]*e,t},blacken(e){const t=this.hwb();return t.color[2]+=t.color[2]*e,t},grayscale(){const e=this.rgb().color,t=.3*e[0]+.59*e[1]+.11*e[2];return a.rgb(t,t,t)},fade(e){return this.alpha(this.valpha-this.valpha*e)},opaquer(e){return this.alpha(this.valpha+this.valpha*e)},rotate(e){const t=this.hsl();let n=t.color[0];return n=(n+e)%360,n=n<0?360+n:n,t.color[0]=n,t},mix(e,t){if(!e||!e.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof e);const n=e.rgb(),i=this.rgb(),r=void 0===t?.5:t,o=2*r-1,s=n.alpha()-i.alpha(),l=((o*s===-1?o:(o+s)/(1+o*s))+1)/2,u=1-l;return a.rgb(l*n.red()+u*i.red(),l*n.green()+u*i.green(),l*n.blue()+u*i.blue(),n.alpha()*r+i.alpha()*(1-r))}};for(const c of Object.keys(t)){if(n.includes(c))continue;const{channels:e}=t[c];a.prototype[c]=function(...e){return this.model===c?new a(this):e.length>0?new a(e,c):new a([...(n=t[this.model][c].raw(this.color),Array.isArray(n)?n:[n]),this.valpha],c);var n},a[c]=function(...t){let n=t[0];return"number"==typeof n&&(n=u(t,e)),new a(n,c)}}function o(e){return function(t){return function(e,t){return Number(e.toFixed(t))}(t,e)}}function s(e,t,n){e=Array.isArray(e)?e:[e];for(const i of e)(r[i]||(r[i]=[]))[t]=n;return e=e[0],function(i){let r;return void 0!==i?(n&&(i=n(i)),r=this[e](),r.color[t]=i,r):(r=this[e]().color[t],n&&(r=n(r)),r)}}function l(e){return function(t){return Math.max(0,Math.min(e,t))}}function u(e,t){for(let n=0;n<t;n++)"number"!=typeof e[n]&&(e[n]=0);return e}return P1=a}const H1=n(V1());function z1(e,t){for(var n=e.length-1;n>=0;n--)if(t(e[n]))return n;return-1}function U1(e){switch(e){case"vertical":return 1;case"vertical-inverted":return-1;case"horizontal":return Lu.getConstants().isRTL?-1:1;case"horizontal-inverted":return Lu.getConstants().isRTL?1:-1}}function G1(e,t){const n=U1(t);switch(t){case"vertical":case"vertical-inverted":return e.height*n;case"horizontal":case"horizontal-inverted":return e.width*n}}const W1=i(tz);function Y1(){return Y1=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},Y1.apply(this,arguments)}let $1;try{$1=W1}catch(e){}const X1=e=>{let{enabled:t,...n}=e;return null!=$1?M.createElement($1.ScreenContainer,Y1({enabled:t},n)):M.createElement(ga,n)},q1=e=>{let{enabled:t,active:n,...i}=e;return null!=$1?M.createElement($1.Screen,Y1({enabled:t,activityState:n},i)):M.createElement(ga,i)},Z1=M.createContext(void 0);function K1(e){var t,n;let{dark:i,layout:r,insets:a,style:o}=e;const{dark:s}=Rf(),[l,u]=M.useState(!0),c=1-20/r.width,d=(a.top-34)*c,h=Ei.flatten(o),m=null==h||null===(t=h.transform)||void 0===t||null===(n=t.find(e=>void 0!==e.translateY))||void 0===n?void 0:n.translateY;M.useEffect(()=>{const e=null==m?void 0:m.addListener(e=>{let{value:t}=e;u(t<d)});return()=>null==m?void 0:m.removeListener(e)},[d,m]);const p=i??!s;return M.createElement(uh,{animated:!0,barStyle:l&&p?"dark-content":"light-content"})}function Q1(){return Q1=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},Q1.apply(this,arguments)}const J1=M.forwardRef(function(e,t){let{enabled:n,layout:i,style:r,...a}=e;const[o,s]=M.useState(!1),[l,u]=M.useState("auto");return M.useImperativeHandle(t,()=>({setPointerEvents:u})),M.useEffect(()=>{if("undefined"==typeof document||!document.body)return;const e=document.body.clientWidth,t=document.body.clientHeight;s(e===i.width&&t===i.height)},[i.height,i.width]),M.createElement(ga,Q1({},a,{pointerEvents:l,style:[n&&o?e2.page:e2.card,r]}))}),e2=Ei.create({page:{minHeight:"100%"},card:{flex:1,overflow:"hidden"}});function t2(){return t2=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},t2.apply(this,arguments)}const n2="web"!==lr.OS,i2=e=>{if(e){return null!=Ei.flatten(e).opacity}return!1};class r2 extends M.Component{static defaultProps={shadowEnabled:!1,gestureEnabled:!0,gestureVelocityImpact:.3,overlay:e=>{let{style:t}=e;return t?M.createElement(uu.View,{pointerEvents:"none",style:[o2.overlay,t]}):null}};componentDidMount(){this.animate({closing:this.props.closing}),this.isCurrentlyMounted=!0}componentDidUpdate(e){const{layout:t,gestureDirection:n,closing:i}=this.props,{width:r,height:a}=t;r!==e.layout.width&&this.layout.width.setValue(r),a!==e.layout.height&&this.layout.height.setValue(a),n!==e.gestureDirection&&this.inverted.setValue(U1(n));const o=this.getAnimateToValue(this.props);this.getAnimateToValue(e)===o&&this.lastToValue===o||this.animate({closing:i})}componentWillUnmount(){this.props.gesture.stopAnimation(),this.isCurrentlyMounted=!1,this.handleEndInteraction()}isCurrentlyMounted=!1;isClosing=new uu.Value(0);inverted=new uu.Value(U1(this.props.gestureDirection));layout={width:new uu.Value(this.props.layout.width),height:new uu.Value(this.props.layout.height)};isSwiping=new uu.Value(0);animate=e=>{let{closing:t,velocity:n}=e;const{gesture:i,transitionSpec:r,onOpen:a,onClose:o,onTransition:s}=this.props,l=this.getAnimateToValue({...this.props,closing:t});this.lastToValue=l,this.isClosing.setValue(t?1:0);const u=t?r.close:r.open,c="spring"===u.animation?uu.spring:uu.timing;this.setPointerEventsEnabled(!t),this.handleStartInteraction(),clearTimeout(this.pendingGestureCallback),null==s||s({closing:t,gesture:void 0!==n}),c(i,{...u.config,velocity:n,toValue:l,useNativeDriver:n2,isInteraction:!1}).start(e=>{let{finished:n}=e;this.handleEndInteraction(),clearTimeout(this.pendingGestureCallback),n&&(t?o():a(),this.isCurrentlyMounted&&this.forceUpdate())})};getAnimateToValue=e=>{let{closing:t,layout:n,gestureDirection:i}=e;return t?G1(n,i):0};setPointerEventsEnabled=e=>{var t;const n=e?"box-none":"none";null===(t=this.ref.current)||void 0===t||t.setPointerEvents(n)};handleStartInteraction=()=>{void 0===this.interactionHandle&&(this.interactionHandle=Qa.createInteractionHandle())};handleEndInteraction=()=>{void 0!==this.interactionHandle&&(Qa.clearInteractionHandle(this.interactionHandle),this.interactionHandle=void 0)};handleGestureStateChange=e=>{let{nativeEvent:t}=e;const{layout:n,onClose:i,onGestureBegin:r,onGestureCanceled:a,onGestureEnd:o,gestureDirection:s,gestureVelocityImpact:l}=this.props;switch(t.state){case c1:this.isSwiping.setValue(1),this.handleStartInteraction(),null==r||r();break;case u1:{this.isSwiping.setValue(0),this.handleEndInteraction();const e="vertical"===s||"vertical-inverted"===s?t.velocityY:t.velocityX;this.animate({closing:this.props.closing,velocity:e}),null==a||a();break}case d1:{let e,r,a;this.isSwiping.setValue(0),"vertical"===s||"vertical-inverted"===s?(e=n.height,r=t.translationY,a=t.velocityY):(e=n.width,r=t.translationX,a=t.velocityX);const u=(r+a*l)*U1(s)>e/2?0!==a||0!==r:this.props.closing;this.animate({closing:u,velocity:a}),u&&(this.pendingGestureCallback=setTimeout(()=>{i(),this.forceUpdate()},32)),null==o||o();break}}};getInterpolatedStyle=h1((e,t)=>e(t));getCardAnimation=h1((e,t,n,i,r,a,o,s)=>({index:e,current:{progress:t},next:n&&{progress:n},closing:this.isClosing,swiping:this.isSwiping,inverted:this.inverted,layouts:{screen:i},insets:{top:r,right:a,bottom:o,left:s}}));gestureActivationCriteria(){const{layout:e,gestureDirection:t,gestureResponseDistance:n}=this.props,i=!0,r=void 0!==n?n:"vertical"===t||"vertical-inverted"===t?135:50;if("vertical"===t)return{maxDeltaX:15,minOffsetY:5,hitSlop:{bottom:-e.height+r},enableTrackpadTwoFingerGesture:i};if("vertical-inverted"===t)return{maxDeltaX:15,minOffsetY:-5,hitSlop:{top:-e.height+r},enableTrackpadTwoFingerGesture:i};{const n=-e.width+r;return 1===U1(t)?{minOffsetX:5,maxDeltaY:20,hitSlop:{right:n},enableTrackpadTwoFingerGesture:i}:{minOffsetX:-5,maxDeltaY:20,hitSlop:{left:n},enableTrackpadTwoFingerGesture:i}}}ref=M.createRef();render(){const{styleInterpolator:e,interpolationIndex:t,current:n,gesture:i,next:r,layout:a,insets:o,overlay:s,overlayEnabled:l,shadowEnabled:u,gestureEnabled:c,gestureDirection:d,pageOverflowEnabled:h,headerDarkContent:m,children:p,containerStyle:f,contentStyle:g,..._}=this.props,v=this.getCardAnimation(t,n,r,a,o.top,o.right,o.bottom,o.left),y=this.getInterpolatedStyle(e,v),{containerStyle:b,cardStyle:w,overlayStyle:S,shadowStyle:k}=y,C=c?uu.event([{nativeEvent:"vertical"===d||"vertical-inverted"===d?{translationY:i}:{translationX:i}}],{useNativeDriver:n2}):void 0,{backgroundColor:E}=Ei.flatten(g||{}),x="string"==typeof E&&0===H1(E).alpha();return M.createElement(Z1.Provider,{value:v},"ios"===lr.OS&&l&&r&&a2(e)?M.createElement(K1,{dark:m,layout:a,insets:o,style:w}):null,M.createElement(uu.View,{style:{opacity:n},collapsable:!1}),M.createElement(ga,t2({pointerEvents:"box-none",collapsable:!1},_),l?M.createElement(ga,{pointerEvents:"box-none",style:Ei.absoluteFill},s({style:S})):null,M.createElement(uu.View,{style:[o2.container,b,f],pointerEvents:"box-none"},M.createElement(s1,t2({enabled:0!==a.width&&c,onGestureEvent:C,onHandlerStateChange:this.handleGestureStateChange},this.gestureActivationCriteria()),M.createElement(uu.View,{needsOffscreenAlphaCompositing:i2(w),style:[o2.container,w]},u&&k&&!x?M.createElement(uu.View,{style:[o2.shadow,"horizontal"===d?[o2.shadowHorizontal,o2.shadowLeft]:"horizontal-inverted"===d?[o2.shadowHorizontal,o2.shadowRight]:"vertical"===d?[o2.shadowVertical,o2.shadowTop]:[o2.shadowVertical,o2.shadowBottom],{backgroundColor:E},k],pointerEvents:"none"}):null,M.createElement(J1,{ref:this.ref,enabled:h,layout:a,style:g},p))))))}}const a2=e=>e===ZQ||"forModalPresentationIOS"===e.name,o2=Ei.create({container:{flex:1},overlay:{flex:1,backgroundColor:"#000"},shadow:{position:"absolute",shadowRadius:5,shadowColor:"#000",shadowOpacity:.3},shadowHorizontal:{top:0,bottom:0,width:3,shadowOffset:{width:-1,height:1}},shadowLeft:{left:0},shadowRight:{right:0},shadowVertical:{left:0,right:0,height:3,shadowOffset:{width:1,height:-1}},shadowTop:{top:0},shadowBottom:{bottom:0}});function s2(e){let{interpolationIndex:t,index:n,active:i,closing:r,gesture:a,focused:o,modal:s,getPreviousScene:l,getFocusedRoute:u,headerDarkContent:c,hasAbsoluteFloatHeader:d,headerHeight:h,onHeaderHeightChange:m,isParentHeaderShown:p,isNextScreenTransparent:f,detachCurrentScreen:g,layout:_,onCloseRoute:v,onOpenRoute:y,onGestureCancel:b,onGestureEnd:w,onGestureStart:S,onTransitionEnd:k,onTransitionStart:C,renderHeader:E,renderScene:x,safeAreaInsetBottom:I,safeAreaInsetLeft:T,safeAreaInsetRight:O,safeAreaInsetTop:R,scene:A}=e;const L=M.useContext(YJ),{onPageChangeStart:P,onPageChangeCancel:D,onPageChangeConfirm:N}=function(e){const t=M.useRef(void 0),n=M.useRef(0),i=M.useRef(),r=M.useCallback(()=>{void 0!==i.current&&(clearTimeout(i.current),i.current=void 0)},[]),a=M.useCallback(()=>{if(!e())return;r();const i=kh.State.currentlyFocusedInput();null==i||i.blur(),t.current=i,n.current=Date.now()},[r,e]),o=M.useCallback(n=>{if(e()){if(r(),n)Pu.dismiss();else{const e=t.current;null==e||e.blur()}t.current=void 0}},[r,e]),s=M.useCallback(()=>{if(!e())return;r();const a=t.current;a&&(Date.now()-n.current<100?i.current=setTimeout(()=>{null==a||a.focus(),t.current=void 0},100):(null==a||a.focus(),t.current=void 0))},[r,e]);return M.useEffect(()=>()=>r(),[r]),{onPageChangeStart:a,onPageChangeConfirm:o,onPageChangeCancel:s}}(M.useCallback(()=>{const{options:e,navigation:t}=A.descriptor;return t.isFocused()&&!1!==e.keyboardHandlingEnabled},[A.descriptor])),F={top:R,right:O,bottom:I,left:T},{colors:B}=Rf(),[j,V]=M.useState("box-none");M.useEffect(()=>{var e,t;const n=null===(e=A.progress.next)||void 0===e||null===(t=e.addListener)||void 0===t?void 0:t.call(e,e=>{let{value:t}=e;V(t<=.1?"box-none":"none")});return()=>{var e,t;n&&(null===(e=A.progress.next)||void 0===e||null===(t=e.removeListener)||void 0===t||t.call(e,n))}},[j,A.progress.next]);const{presentation:H,animationEnabled:z,cardOverlay:U,cardOverlayEnabled:G,cardShadowEnabled:W,cardStyle:Y,cardStyleInterpolator:$,gestureDirection:X,gestureEnabled:q,gestureResponseDistance:Z,gestureVelocityImpact:K,headerMode:Q,headerShown:J,transitionSpec:ee}=A.descriptor.options,te=l({route:A.descriptor.route});let ne;if(te){const{options:e,route:t}=te.descriptor;ne=EJ(e,t.name)}const ie=M.useMemo(()=>void 0!==ne?{title:ne}:void 0,[ne]);return M.createElement(r2,{interpolationIndex:t,gestureDirection:X,layout:_,insets:F,gesture:a,current:A.progress.current,next:A.progress.next,closing:r,onOpen:()=>{const{route:e}=A.descriptor;k({route:e},!1),y({route:e})},onClose:()=>{const{route:e}=A.descriptor;k({route:e},!0),v({route:e})},overlay:U,overlayEnabled:G,shadowEnabled:W,onTransition:e=>{let{closing:t,gesture:n}=e;const{route:r}=A.descriptor;n?i&&t?null==N||N(!1):null==D||D():null==N||N(!0),null==C||C({route:r},t)},onGestureBegin:()=>{const{route:e}=A.descriptor;P(),S({route:e})},onGestureCanceled:()=>{const{route:e}=A.descriptor;D(),b({route:e})},onGestureEnd:()=>{const{route:e}=A.descriptor;w({route:e})},gestureEnabled:0!==n&&q,gestureResponseDistance:Z,gestureVelocityImpact:K,transitionSpec:ee,styleInterpolator:$,accessibilityElementsHidden:!o,importantForAccessibility:o?"auto":"no-hide-descendants",pointerEvents:i?"box-none":j,pageOverflowEnabled:"float"!==Q&&"modal"!==H,headerDarkContent:c,containerStyle:d&&"screen"!==Q?{marginTop:h}:null,contentStyle:[{backgroundColor:"transparentModal"===H?"transparent":B.background},Y],style:[{overflow:i?void 0:"hidden",display:!1!==z||!1!==f||!1===g||o?"flex":"none"},Ei.absoluteFill]},M.createElement(ga,{style:u2.container},M.createElement(o1.Provider,{value:s},M.createElement(ga,{style:u2.scene},M.createElement(WJ.Provider,{value:ie},M.createElement(AJ.Provider,{value:p||!1!==J},M.createElement(YJ.Provider,{value:J?h:L??0},x({route:A.descriptor.route}))))),"float"!==Q?E({mode:"screen",layout:_,scenes:[te,A],getPreviousScene:l,getFocusedRoute:u,onContentHeightChange:m}):null)))}const l2=M.memo(s2),u2=Ei.create({container:{flex:1,flexDirection:"column-reverse"},scene:{flex:1}}),c2=Object.freeze({options:{}}),d2=(e,t)=>{const{cardStyleInterpolator:n}=e[t].descriptor.options;let i=0;for(let a=t-1;a>=0;a--){var r;if((null===(r=e[a])||void 0===r?void 0:r.descriptor.options.cardStyleInterpolator)!==n)break;i++}return i},h2=(e,t,n)=>{if(n)return!0;const{cardStyleInterpolator:i}=e.descriptor.options;return a2(i)&&0!==t},m2=(e,t,n,i,r,a)=>e.reduce((o,s,l)=>{const{headerStatusBarHeight:u=(n?0:t.top),headerStyle:c}=s.descriptor.options,d=Ei.flatten(c||{}),h="height"in d&&"number"==typeof d.height?d.height:a[s.route.key],m=d2(e,l),p=h2(s,m,i);return o[s.route.key]="number"==typeof h?h:CJ(r,p,u),o},{}),p2=(e,t)=>{const{presentation:n,gestureDirection:i=("modal"===n?yJ.gestureDirection:vJ.gestureDirection)}=(null==t?void 0:t.options)||{};return G1(e,i)},f2=(e,t,n)=>{const i=p2({width:Math.max(1,t.width),height:Math.max(1,t.height)},n);return i>0?e.interpolate({inputRange:[0,i],outputRange:[1,0]}):e.interpolate({inputRange:[i,0],outputRange:[0,1]})};class g2 extends M.Component{static getDerivedStateFromProps(e,t){if(e.routes===t.routes&&e.descriptors===t.descriptors)return null;const n=e.routes.reduce((n,i)=>{const r=e.descriptors[i.key],{animationEnabled:a}=(null==r?void 0:r.options)||{};return n[i.key]=t.gestures[i.key]||new uu.Value(e.openingRouteKeys.includes(i.key)&&!1!==a?p2(t.layout,r):0),n},{}),i=e.routes.map((i,r,a)=>{const o=a[r-1],s=a[r+1],l=t.scenes[r],u=n[i.key],c=o?n[o.key]:void 0,d=s?n[s.key]:void 0,h=e.descriptors[i.key]||t.descriptors[i.key]||(l?l.descriptor:c2),m=e.descriptors[null==s?void 0:s.key]||t.descriptors[null==s?void 0:s.key],p=e.descriptors[null==o?void 0:o.key]||t.descriptors[null==o?void 0:o.key],f=r!==a.length-1&&m&&"transparentModal"!==m.options.presentation?m.options:h.options;let g="modal"===f.presentation?yJ:"transparentModal"===f.presentation?_J:vJ;const{animationEnabled:_="web"!==lr.OS&&"windows"!==lr.OS&&"macos"!==lr.OS,gestureEnabled:v="ios"===lr.OS&&_,gestureDirection:y=g.gestureDirection,transitionSpec:b=g.transitionSpec,cardStyleInterpolator:w=(!1===_?KQ:g.cardStyleInterpolator),headerStyleInterpolator:S=g.headerStyleInterpolator,cardOverlayEnabled:k="ios"!==lr.OS&&"transparentModal"!==f.presentation||a2(w)}=f,C=h.options.headerMode??("modal"===f.presentation||"transparentModal"===f.presentation||"modal"===(null==m?void 0:m.options.presentation)||"transparentModal"===(null==m?void 0:m.options.presentation)||a2(w)||"ios"!==lr.OS||void 0!==h.options.header?"screen":"float"),E={route:i,descriptor:{...h,options:{...h.options,animationEnabled:_,cardOverlayEnabled:k,cardStyleInterpolator:w,gestureDirection:y,gestureEnabled:v,headerStyleInterpolator:S,transitionSpec:b,headerMode:C}},progress:{current:f2(u,t.layout,h),next:d&&"transparentModal"!==(null==m?void 0:m.options.presentation)?f2(d,t.layout,m):void 0,previous:c?f2(c,t.layout,p):void 0},__memo:[t.layout,h,m,p,u,d,c]};return l&&E.__memo.every((e,t)=>l.__memo[t]===e)?l:E});return{routes:e.routes,scenes:i,gestures:n,descriptors:e.descriptors,headerHeights:m2(i,e.insets,e.isParentHeaderShown,e.isParentModal,t.layout,t.headerHeights)}}constructor(e){super(e),this.state={routes:[],scenes:[],gestures:{},layout:t1.initialMetrics.frame,descriptors:this.props.descriptors,headerHeights:{}}}handleLayout=e=>{const{height:t,width:n}=e.nativeEvent.layout,i={width:n,height:t};this.setState((e,r)=>t===e.layout.height&&n===e.layout.width?null:{layout:i,headerHeights:m2(e.scenes,r.insets,r.isParentHeaderShown,r.isParentModal,i,e.headerHeights)})};handleHeaderLayout=e=>{let{route:t,height:n}=e;this.setState(e=>{let{headerHeights:i}=e;return i[t.key]===n?null:{headerHeights:{...i,[t.key]:n}}})};getFocusedRoute=()=>{const{state:e}=this.props;return e.routes[e.index]};getPreviousScene=e=>{let{route:t}=e;const{getPreviousRoute:n}=this.props,{scenes:i}=this.state,r=n({route:t});if(r){return i.find(e=>e.descriptor.route.key===r.key)}};render(){const{insets:e,state:t,routes:n,closingRouteKeys:i,onOpenRoute:r,onCloseRoute:a,renderHeader:o,renderScene:s,isParentHeaderShown:l,isParentModal:u,onTransitionStart:c,onTransitionEnd:d,onGestureStart:h,onGestureEnd:m,onGestureCancel:p,detachInactiveScreens:f="web"===lr.OS||"android"===lr.OS||"ios"===lr.OS}=this.props,{scenes:g,layout:_,gestures:v,headerHeights:y}=this.state,b=t.routes[t.index],w=y[b.key],S=this.state.scenes.slice(-2).some(e=>{const t=e.descriptor.options??{},{headerMode:n,headerTransparent:i,headerShown:r=!0}=t;return!(!i&&!1!==r&&"screen"!==n)});let k=1;for(let E=g.length-1;E>=0;E--){const{options:e}=g[E].descriptor,{detachPreviousScreen:t="transparentModal"!==e.presentation&&(!a2(e.cardStyleInterpolator)||E!==z1(g,e=>{const{cardStyleInterpolator:t}=e.descriptor.options;return t===ZQ||"forModalPresentationIOS"===(null==t?void 0:t.name)}))}=e;if(!1===t)k++;else if(E<=g.length-2)break}const C=M.createElement(M.Fragment,{key:"header"},o({mode:"float",layout:_,scenes:g,getPreviousScene:this.getPreviousScene,getFocusedRoute:this.getFocusedRoute,onContentHeightChange:this.handleHeaderLayout,style:[_2.floating,S&&[{height:w},_2.absolute]]}));return M.createElement(kJ,null,S?null:C,M.createElement(X1,{enabled:f,style:_2.container,onLayout:this.handleLayout},n.map((t,n,w)=>{var C,E;const x=b.key===t.key,I=v[t.key],T=g[n];let O=1;if(n<w.length-k-1)O=0;else{const e=g[w.length-1],t=n===w.length-1?2:n>=w.length-k?1:0;O=e?e.progress.current.interpolate({inputRange:[0,.99999,1],outputRange:[1,1,t],extrapolate:"clamp"}):1}const{headerShown:R=!0,headerTransparent:A,headerStyle:L,headerTintColor:P,freezeOnBlur:D}=T.descriptor.options,N=e.top,F=e.right,B=e.bottom,j=e.left,V=!1!==R?y[t.key]:0;let H;if(R)if("string"==typeof P)H=H1(P).isDark();else{const e=Ei.flatten(L);e&&"backgroundColor"in e&&"string"==typeof e.backgroundColor&&(H=!H1(e.backgroundColor).isDark())}const z=d2(g,n),U=h2(T,z,u),G="transparentModal"===(null===(C=g[n+1])||void 0===C?void 0:C.descriptor.options.presentation),W=!1!==(null===(E=g[n+1])||void 0===E?void 0:E.descriptor.options.detachPreviousScreen);return M.createElement(q1,{key:t.key,style:Ei.absoluteFill,enabled:f,active:O,freezeOnBlur:D,pointerEvents:"box-none"},M.createElement(l2,{index:n,interpolationIndex:z,modal:U,active:n===w.length-1,focused:x,closing:i.includes(t.key),layout:_,gesture:I,scene:T,safeAreaInsetTop:N,safeAreaInsetRight:F,safeAreaInsetBottom:B,safeAreaInsetLeft:j,onGestureStart:h,onGestureCancel:p,onGestureEnd:m,headerHeight:V,isParentHeaderShown:l,onHeaderHeightChange:this.handleHeaderLayout,getPreviousScene:this.getPreviousScene,getFocusedRoute:this.getFocusedRoute,headerDarkContent:H,hasAbsoluteFloatHeader:S&&!A,renderHeader:o,renderScene:s,onOpenRoute:r,onCloseRoute:a,onTransitionStart:c,onTransitionEnd:d,isNextScreenTransparent:G,detachCurrentScreen:W}))})),S?C:null)}}const _2=Ei.create({container:{flex:1},absolute:{position:"absolute",top:0,left:0,right:0},floating:{zIndex:1}});function v2(){return v2=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},v2.apply(this,arguments)}const y2=l1??ga;class b2 extends M.Component{static getDerivedStateFromProps(e,t){if((e.state.routes===t.previousRoutes||(n=e.state.routes.map(e=>e.key),i=t.previousRoutes.map(e=>e.key),n.length===i.length&&n.every((e,t)=>e===i[t])))&&t.routes.length){let n=t.routes,i=t.previousRoutes,r=e.descriptors,a=t.previousDescriptors;if(e.descriptors!==t.previousDescriptors&&(r=t.routes.reduce((n,i)=>(n[i.key]=e.descriptors[i.key]||t.descriptors[i.key],n),{}),a=e.descriptors),e.state.routes!==t.previousRoutes){const r=e.state.routes.reduce((e,t)=>(e[t.key]=t,e),{});n=t.routes.map(e=>r[e.key]||e),i=e.state.routes}return{routes:n,previousRoutes:i,descriptors:r,previousDescriptors:a}}var n,i;let r=e.state.index<e.state.routes.length-1?e.state.routes.slice(0,e.state.index+1):e.state.routes,{openingRouteKeys:a,closingRouteKeys:o,replacingRouteKeys:s,previousRoutes:l}=t;const u=l[l.length-1],c=r[r.length-1],d=n=>{const i=e.descriptors[n]||t.descriptors[n];return!i||!1!==i.options.animationEnabled};var h;if(u&&u.key!==c.key?l.some(e=>e.key===c.key)?r.some(e=>e.key===u.key)||d(u.key)&&!o.includes(u.key)&&(o=[...o,u.key],a=a.filter(e=>e!==u.key),s=s.filter(e=>e!==u.key),r=[...r,u]):d(c.key)&&!a.includes(c.key)&&(a=[...a,c.key],o=o.filter(e=>e!==c.key),s=s.filter(e=>e!==c.key),r.some(e=>e.key===u.key)||(a=a.filter(e=>e!==u.key),"pop"===(h=c.key,(e.descriptors[h]||t.descriptors[h]).options.animationTypeForReplace??"push")?(o=[...o,u.key],a=a.filter(e=>e!==c.key),r=[...r,u]):(s=[...s,u.key],o=o.filter(e=>e!==u.key),r=r.slice(),r.splice(r.length-1,0,u)))):(s.length||o.length)&&(r=r.slice(),r.splice(r.length-1,0,...t.routes.filter(e=>{let{key:t}=e;return!!d(t)&&(s.includes(t)||o.includes(t))}))),!r.length)throw new Error("There should always be at least one route in the navigation state.");const m=r.reduce((n,i)=>(n[i.key]=e.descriptors[i.key]||t.descriptors[i.key],n),{});return{routes:r,previousRoutes:e.state.routes,previousDescriptors:e.descriptors,openingRouteKeys:a,closingRouteKeys:o,replacingRouteKeys:s,descriptors:m}}state={routes:[],previousRoutes:[],previousDescriptors:{},openingRouteKeys:[],closingRouteKeys:[],replacingRouteKeys:[],descriptors:{}};getPreviousRoute=e=>{let{route:t}=e;const{closingRouteKeys:n,replacingRouteKeys:i}=this.state,r=this.state.routes.filter(e=>e.key===t.key||!n.includes(e.key)&&!i.includes(e.key)),a=r.findIndex(e=>e.key===t.key);return r[a-1]};renderScene=e=>{let{route:t}=e;const n=this.state.descriptors[t.key]||this.props.descriptors[t.key];return n?n.render():null};renderHeader=e=>M.createElement(_1,e);handleOpenRoute=e=>{let{route:t}=e;const{state:n,navigation:i}=this.props,{closingRouteKeys:r,replacingRouteKeys:a}=this.state;r.some(e=>e===t.key)&&a.every(e=>e!==t.key)&&n.routeNames.includes(t.name)&&!n.routes.some(e=>e.key===t.key)?i.navigate(t):this.setState(e=>({routes:e.replacingRouteKeys.length?e.routes.filter(t=>!e.replacingRouteKeys.includes(t.key)):e.routes,openingRouteKeys:e.openingRouteKeys.filter(e=>e!==t.key),closingRouteKeys:e.closingRouteKeys.filter(e=>e!==t.key),replacingRouteKeys:[]}))};handleCloseRoute=e=>{let{route:t}=e;const{state:n,navigation:i}=this.props;n.routes.some(e=>e.key===t.key)?i.dispatch({...Rm.pop(),source:t.key,target:n.key}):this.setState(e=>({routes:e.routes.filter(e=>e.key!==t.key),openingRouteKeys:e.openingRouteKeys.filter(e=>e!==t.key),closingRouteKeys:e.closingRouteKeys.filter(e=>e!==t.key)}))};handleTransitionStart=(e,t)=>{let{route:n}=e;return this.props.navigation.emit({type:"transitionStart",data:{closing:t},target:n.key})};handleTransitionEnd=(e,t)=>{let{route:n}=e;return this.props.navigation.emit({type:"transitionEnd",data:{closing:t},target:n.key})};handleGestureStart=e=>{let{route:t}=e;this.props.navigation.emit({type:"gestureStart",target:t.key})};handleGestureEnd=e=>{let{route:t}=e;this.props.navigation.emit({type:"gestureEnd",target:t.key})};handleGestureCancel=e=>{let{route:t}=e;this.props.navigation.emit({type:"gestureCancel",target:t.key})};render(){const{state:e,descriptors:t,...n}=this.props,{routes:i,descriptors:r,openingRouteKeys:a,closingRouteKeys:o}=this.state;return M.createElement(y2,{style:w2.container},M.createElement(t1,null,M.createElement(sH.Consumer,null,t=>M.createElement(o1.Consumer,null,s=>M.createElement(AJ.Consumer,null,l=>M.createElement(g2,v2({insets:t,isParentHeaderShown:l,isParentModal:s,getPreviousRoute:this.getPreviousRoute,routes:i,openingRouteKeys:a,closingRouteKeys:o,onOpenRoute:this.handleOpenRoute,onCloseRoute:this.handleCloseRoute,onTransitionStart:this.handleTransitionStart,onTransitionEnd:this.handleTransitionEnd,renderHeader:this.renderHeader,renderScene:this.renderScene,state:e,descriptors:r,onGestureStart:this.handleGestureStart,onGestureEnd:this.handleGestureEnd,onGestureCancel:this.handleGestureCancel},n)))))))}}const w2=Ei.create({container:{flex:1}});function S2(){return S2=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},S2.apply(this,arguments)}const k2=ep(function(e){let{id:t,initialRouteName:n,children:i,screenListeners:r,screenOptions:a,...o}=e;const s=o.mode;UH(null!=s,`Stack Navigator: 'mode="${s}"' is deprecated. Use 'presentation: "${s}"' in 'screenOptions' instead.\n\nSee https://reactnavigation.org/docs/stack-navigator#presentation for more details.`);const l=o.headerMode;UH("none"===l,"Stack Navigator: 'headerMode=\"none\"' is deprecated. Use 'headerShown: false' in 'screenOptions' instead.\n\nSee https://reactnavigation.org/docs/stack-navigator/#headershown for more details."),UH(null!=l&&"none"!==l,"Stack Navigator: 'headerMode' is moved to 'options'. Moved it to 'screenOptions' to keep current behavior.\n\nSee https://reactnavigation.org/docs/stack-navigator/#headermode for more details.");const u=o.keyboardHandlingEnabled;UH(void 0!==u,"Stack Navigator: 'keyboardHandlingEnabled' is moved to 'options'. Moved it to 'screenOptions' to keep current behavior.\n\nSee https://reactnavigation.org/docs/stack-navigator/#keyboardhandlingenabled for more details.");const c={presentation:s,headerShown:!l||"none"!==l,headerMode:l&&"none"!==l?l:void 0,keyboardHandlingEnabled:u},{state:d,descriptors:h,navigation:m,NavigationContent:p}=uf(Am,{id:t,initialRouteName:n,children:i,screenListeners:r,screenOptions:a,defaultScreenOptions:c});return M.useEffect(()=>{var e;return null===(e=m.addListener)||void 0===e?void 0:e.call(m,"tabPress",e=>{const t=m.isFocused();requestAnimationFrame(()=>{d.index>0&&t&&!e.defaultPrevented&&m.dispatch({...Rm.popToTop(),target:d.key})})})},[m,d.index,d.key]),M.createElement(p,null,M.createElement(b2,S2({},o,{state:d,descriptors:h,navigation:m})))});var C2=(e=>(e.MainBottomTabs="MainBottomTabs",e.NewCalculationStack="NewCalculationStack",e.AccountWebView="AccountWebView",e.ActiveInsulin="ActiveInsulin",e.RegisterActiveInsulin="RegisterActiveInsulin",e.CalculationBottomTabs="CalculationBottomTabs",e.LoadingRecommendation="LoadingRecommendation",e.Recommendation="Recommendation",e.LeavingRecommendation="LeavingRecommendation",e.DashboardTab="DashboardTab",e.LogbooksTab="LogbooksTab",e.FoodTab="FoodTab",e.SettingsTab="SettingsTab",e.Dashboard="Dashboard",e.ActiveInsulinChart="ActiveInsulinChart",e.MyDay="MyDay",e.GlucoseBGM="GlucoseBGM",e.GlucoseCGM="GlucoseCGM",e.CarbohydrateChart="CarbohydrateChart",e.RapidInsulinChart="RapidInsulinChart",e.TimeInRange="TimeInRange",e.LicensingStatus="LicensingStatus",e.LicensingWebView="LicensingWebView",e.LicensingInfoWebView="LicensingInfoWebView",e.Logbooks="Logbooks",e.RecommendationLogbook="RecommendationLogbook",e.Settings="Settings",e.ProfileStack="ProfileStack",e.GlucoseSettings="GlucoseSettings",e.ActivitySettings="ActivitySettings",e.InsulinSettingsStack="InsulinSettingsStack",e.Notifications="Notifications",e.SetupGlucoseMeters="SetupGlucoseMeters",e.IFU="IFU",e.Support="Support",e.SupportWebView="SupportWebView",e.SupportContact="SupportContact",e.Legal="Legal",e.GlucoseUnit="GlucoseUnit",e.Profile="Profile",e.BiologicalSex="BiologicalSex",e.DiabetesType="DiabetesType",e.InsulinSettings="InsulinSettings",e.TreatmentType="TreatmentType",e.RapidActingInsulin="RapidActingInsulin",e.LongActingInsulin="LongActingInsulin",e.GlucoseTab="GlucoseTab",e.CarbsTab="CarbsTab",e.ActivityTab="ActivityTab",e.SummaryTab="SummaryTab",e.NovoPenSync="NovoPenSync",e.NovoPenConflict="NovoPenConflict",e.SmartPenSetupStack="SmartPenSetupStack",e.SmartPenSetupScreen1="SmartPenSetupScreen1",e.SmartPenSetupScreen2="SmartPenSetupScreen2",e.NovoPenSetupStack="NovoPenSetupStack",e.NovoPenSetupScreen1="NovoPenSetupScreen1",e.NovoPenSetupScreen2="NovoPenSetupScreen2",e.NovoPenSetupScreen3="NovoPenSetupScreen3",e.NovoPenSetupScreen4="NovoPenSetupScreen4",e.RenameSmartPen="RenameSmartPen",e.SetupCGMWebview="SetupCGMWebview",e.AddActivity="AddActivity",e.AddLogbook="AddLogbook",e.AddCarbs="AddCarbs",e.CreateFood="CreateFood",e.FoodLibraryStack="FoodLibraryStack",e.SyncNovoPenStack="SyncNovoPenStack",e.FoodLibrary="FoodLibrary",e.FoodDetails="FoodDetails",e))(C2||{}),E2=(e=>(e.SetupBolusCalculator="SetupBolusCalculator",e.QuickGuideStack="QuickGuideStack",e.LicensingInfoWebView="LicensingInfoWebView",e.LicensingWebView="LicensingWebView",e.LicensingStatus="LicensingStatus",e.SetupStart="SetupStart",e.Setup="Setup",e.BiologicalSex="BiologicalSex",e.TreatmentType="TreatmentType",e.RapidActingInsulin="RapidActingInsulin",e.LongActingInsulin="LongActingInsulin",e.InsulinSettings="InsulinSettings",e.QuickGuideStart="QuickGuideStart",e.QuickGuide="QuickGuide",e.QuickGuideAllSet="QuickGuideAllSet",e))(E2||{});const x2={selectedEventUUID:null,activityDurationSeconds:0},I2=uL()(e=>({...x2,activityStoreActions:{set:t=>{e(e=>({...e,...t}))},clear:()=>{e(x2)}}}));var T2="/api/v3";const O2=oV?"/api/v2":zj.HEDIA_API_URL_V2,R2=oV?T2:zj.HEDIA_API_URL_V3,A2={frequentlyAdded:[],searchResults:[],myFood:[],isLoading:!1,hasSearched:!1,isMyFoodTab:!1,query:"",selectedFoodItem:void 0,animatedEntryId:void 0},L2=uL()((t,n)=>({...A2,foodStoreActions:{set:e=>{t(t=>({...t,...e}))},clear:()=>{t(A2)},search:async i=>{const r=encodeURIComponent(n().query.toLowerCase().trim());try{t({isLoading:!0});const e=await P2(r,i);if(!e)throw new Error("[foodStore::search] Failed to search for food items");t({searchResults:e})}catch(e){console.error(e),t({searchResults:[]})}finally{t({isLoading:!1})}},loadMyFood:async()=>{try{t({isLoading:!0});const e=await D2();if(!e)throw new Error("[foodStore::loadMyFood] Failed to load my food items");t({myFood:e})}catch(e){console.error(e)}finally{t({isLoading:!1})}},createMyFoodItem:async n=>{try{t({isLoading:!0});const e=await N2(n);if(!e)throw new Error("[foodStore::createMyFoodItem] Failed to create food item");return t(t=>({myFood:[e,...t.myFood],animatedEntryId:e.id.toString()})),!0}catch(e){return console.error(e),!1}finally{t({isLoading:!1})}},updateMyFoodItem:async i=>{try{t({isLoading:!0});const e=await F2(i);if(!e)throw new Error("[foodStore::updateMyFoodItem] Failed to update food item");return t(t=>({myFood:t.myFood.map(t=>t.id===e.id?e:t)})),e.id===n().selectedFoodItem?.id&&t({selectedFoodItem:e}),!0}catch(e){return console.error(e),!1}finally{t({isLoading:!1})}},deleteMyFoodItem:async n=>{try{if(t({isLoading:!0}),!n.id)throw new Error("[foodStore::deleteMyFoodItem] Failed to delete food item");return await B2(n),t(e=>({myFood:e.myFood.filter(e=>e.id!==n.id)})),!0}catch(e){return console.error(e),!1}finally{t({isLoading:!1})}},loadFrequentFoodItems:async()=>{try{t({isLoading:!0});const e=await M2();if(!e)throw new Error("[foodStore::loadFrequentFoodItems] Failed to load frequently added food items");t({frequentlyAdded:e})}catch(e){console.error(e),t({frequentlyAdded:[]})}finally{t({isLoading:!1})}}}})),P2=async(t,n)=>{try{const e=await FX(`${O2}/food?search=${t}&language=${n}`);return await e.json()}catch(e){return void console.error(e)}},M2=async()=>{try{const e=await FX(`${O2}/food/frequent`);return await e.json()}catch(e){return void console.error(e)}},D2=async()=>{try{const e=await FX(`${O2}/food/myfood`);return await e.json()}catch(e){return void console.error(e)}},N2=async t=>{try{const e=await FX(`${O2}/food`,{method:FL.HTTPRequestMethod.POST,headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});return await e.json()}catch(e){return void console.error(e)}},F2=async t=>{try{const e=await FX(`${O2}/food/${t.id}`,{method:FL.HTTPRequestMethod.PUT,headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});return await e.json()}catch(e){return void console.error(e)}},B2=async e=>{await FX(`${R2}/food-items/${e.id}`,{method:FL.HTTPRequestMethod.DELETE})},j2={glucoseTimestamp:null,glucoseMMOLL:null,isUsingGlucoseDeviceReading:!1,isUsingGlucoseSample:!1,latestGlucoseDeviceReading:null,latestGlucoseSample:null,glucoseSampleID:null},V2=uL()(e=>({...j2,glucoseStoreActions:{set:t=>{e(e=>({...e,...t}))},clear:()=>{e(j2)}}})),H2={showDiscardCalculationModal:!1,showDiscardSmartPenSetupModal:!1,showSyncErrorModal:!1},z2=uL()(e=>({...H2,modalStoreActions:{set:t=>{e(e=>({...e,...t}))},clear:()=>{e(H2)}}})),U2={setupCalculatorSettings:{},totalDailyDosage:null},G2=uL()(e=>({...U2,setupCalculatorActions:{setSetupCalculatorStoreValues:t=>{e(e=>({setupCalculatorSettings:{...e.setupCalculatorSettings,...t}}))},setTotalDailyDosage:t=>{e({totalDailyDosage:t})},clear:()=>{e(U2)}}})),W2=()=>G2(e=>e.setupCalculatorActions),Y2=()=>G2(e=>e.setupCalculatorSettings),$2=()=>G2(e=>e.totalDailyDosage),X2=()=>{EX.getState().carbohydrateStoreActions.clear(),V2.getState().glucoseStoreActions.clear(),I2.getState().activityStoreActions.clear()},q2={top:10,bottom:10,left:20,right:20},Z2=()=>{const{goBack:e}=Gp();return D.createElement(eh,{onPress:e,testID:"header-back-button",style:({pressed:e})=>[{opacity:e?.5:1},i0.iconContainerOutline,i0.backButton],hitSlop:q2},D.createElement(KK,{height:27,width:27,color:wL.iconBrand}))},K2=({onPress:e})=>{const{pop:t}=Gp(),{COLORS:n}=sj();return D.createElement(eh,{onPress:e??(()=>{t()}),testID:"header-close-button",style:({pressed:e})=>[{opacity:e?.5:1},i0.iconContainerOutline,i0.closeButton],hitSlop:q2},D.createElement(eQ,{height:27,width:27,color:n.iconBrand}))},Q2=()=>{const{navigate:e}=Gp(),t=M.useCallback(()=>{oV&&X2(),e(C2.SettingsTab)},[e]);return D.createElement(eh,{onPress:t,testID:"header-profile-button",style:({pressed:e})=>[{opacity:e?.5:1},i0.iconContainerOutline,i0.profileButton],hitSlop:q2},D.createElement(SQ,{color:wL.iconBrand}))},J2=({onPress:e,title:t,disabled:n=!1})=>{const{t:i}=eV(),{COLORS:r}=sj();return D.createElement(eh,{style:({pressed:e})=>[{opacity:e?.5:1},i0.doneButton],onPress:()=>{!n&&e()},disabled:n},D.createElement(pj,{style:[i0.doneText,{color:r.textBrand},n&&i0.textDisabled],allowFontScaling:!1},t??i("button_add")))},e0=({onPress:e})=>{const{t:t}=eV(),n=Gp(),{COLORS:i}=sj(),r=M.useCallback(()=>{n.pop()},[n]);return D.createElement(eh,{style:({pressed:e})=>[{opacity:e?.5:1},i0.cancelButton],onPress:e??r},D.createElement(pj,{style:[i0.cancelText,{color:i.textBrand}],allowFontScaling:!1},t("button_cancel")))},t0=({onPress:e})=>{const{t:t}=eV(),n=Gp(),{COLORS:i}=sj(),r=M.useCallback(()=>{n.pop()},[n]);return D.createElement(eh,{style:({pressed:e})=>[{opacity:e?.5:1},i0.cancelButton],onPress:e??r},D.createElement(pj,{style:[i0.cancelText,{color:i.textBrand}],allowFontScaling:!1},t("button_close")))},n0=({onPress:e})=>D.createElement(eh,{onPress:e,style:({pressed:e})=>[{opacity:e?.5:1},i0.iconContainerOutline,i0.editButton],hitSlop:q2},D.createElement(rQ,{color:wL.iconBrand})),i0=Ei.create({headerStyle:{backgroundColor:wL.bgNavigation},modalHeaderStyle:{backgroundColor:wL.bgModal},headerLeftContainerStyle:{paddingLeft:16},headerTitle:{..._L.medium_Base,color:wL.textNavigationTitle},modalHeaderTitle:{..._L.medium_Base,color:wL.textNavigationTitle},iconContainerOutline:{padding:4},iconContainer:{padding:4},backButton:{marginLeft:oV?4:-12,marginRight:12},closeButton:{marginLeft:oV?4:-12,marginRight:oV?12:0},cancelButton:{marginLeft:oV?12:0},profileButton:{marginRight:oV?12:0},doneButton:{paddingRight:oV?12:0,paddingLeft:8},editButton:{marginRight:oV?12:-4,marginLeft:4},doneText:{..._L.semiBold_Base},textDisabled:{color:wL.textModalButtonInactive},cancelText:{..._L.regular_Base}}),r0={headerShown:!0,headerLeft:Z2,headerStyle:i0.headerStyle,headerTitleStyle:i0.headerTitle,headerTitleAlign:"center",headerBlurEffect:"regular"};i0.modalHeaderTitle;const a0={animationEnabled:!0,cardStyle:{flex:1},headerShown:!0,headerLeft:Z2,headerStyle:i0.headerStyle,headerTitleStyle:i0.headerTitle,headerTitleAlign:"center",headerTitleAllowFontScaling:!1},o0={...a0,presentation:"modal",headerLeft:K2,headerStyle:i0.modalHeaderStyle,headerTitleStyle:i0.modalHeaderTitle,headerTitleAllowFontScaling:!1,headerLeftContainerStyle:{flex:1},headerTitleContainerStyle:{flex:3,alignItems:"center"},headerRightContainerStyle:{flex:1}},s0={headerStyle:i0.headerStyle,headerLeftContainerStyle:i0.headerLeftContainerStyle,headerTitleStyle:i0.headerTitle,headerTitleAlign:"center",headerTitleAllowFontScaling:!1},l0=({setUnit:e,currentUnit:t})=>{const n="ml"===t,i="cl"===t;return M.createElement(ga,{style:u0.container},M.createElement(Ic,{style:n?u0.selected:u0.unselected,onPress:()=>{e("ml")},testID:`unit-selector-ml-button-${n}`},M.createElement(pj,{style:u0.unitText},"ml")),M.createElement(Ic,{style:i?u0.selected:u0.unselected,onPress:()=>{e("cl")},testID:`unit-selector-cl-button-${i}`},M.createElement(pj,{style:u0.unitText},"cl")))},u0=Ei.create({container:{flex:1,flexDirection:"row",borderWidth:1,borderColor:wL.bgInput,borderRadius:16,backgroundColor:wL.bgFoodInput,marginVertical:8,overflow:"hidden"},unselected:{flex:1,alignItems:"center",justifyContent:"center"},selected:{flex:1,backgroundColor:wL.bgBrand,alignItems:"center",justifyContent:"center",borderRadius:16},unitText:{..._L.regular_SM,padding:8}}),c0=({ref:e,style:t,onChangeText:n,onFocusChange:i,...r})=>{const a=M.useCallback(e=>{const t=e.replace(/\D+/g,"");n(t)},[n]),o=M.useCallback(()=>{i?.(!0)},[i]),s=M.useCallback(()=>{i?.(!1)},[i]);return D.createElement(kh,{cursorColor:wL.iconBrand,placeholder:"-",placeholderTextColor:wL.textSecondary,maxLength:3,inputMode:"numeric",enterKeyHint:"done",ref:e,style:t,onFocus:o,onBlur:s,autoFocus:void 0!==i,...r,onChangeText:a})},d0="add-carbs-details",h0=oV&&{outline:"none"},m0=()=>{const{t:e}=eV(),t=Gp(),n=cf(),{selectedFoodItem:i}=L2(),{cartItems:r,carbohydrateStoreActions:a}=EX(),[o,s]=M.useState(!1),l=M.useMemo(()=>r.find(e=>e.foodItem.id===i?.id),[r,i]);if(!i)throw new Error("[AddCarbs::render] selectedFoodItem is undefined");const u=M.useMemo(()=>{const e={foodItem:i,amount:0,unit:i.liquid?"ml":"g"};return l??e},[l,i]),[c,d]=M.useState(u.amount?u.amount.toString():""),[h,m]=M.useState(u.foodItem.liquid?"ml":"g"),[p,f]=M.useState(!1),[g,_]=M.useState(!1),[v,y]=M.useState(!1),b=M.useCallback((e=0)=>{const t=Number(c)||100,n="ml"===h||"g"===h?t:10*t;return Math.round(n*e/100)},[c,h]),w=M.useCallback(()=>{b(u.foodItem.carbohydrates)>300?f(!0):(a.upsertCartItem({foodItem:i,unit:h,amount:Number(c)}),null!==i.user_id?NX(MX.CarbsFoodLibraryPersonalInput):NX(MX.CarbsFoodLibraryDatabaseInput),t.pop(),!n.params.isCarbItem&&setTimeout(()=>{t.pop()},500))},[b,u.foodItem.carbohydrates,a,i,h,c,t,n.params.isCarbItem]);M.useEffect(()=>{const e=()=>{t.navigate(C2.CreateFood)};t.setOptions({title:u.foodItem.title,headerLeft:()=>D.createElement(t0,{onPress:()=>{const e=u.amount?u.amount.toString():"";c===e?t.pop():_(!0)}}),headerRight:null!==i.user_id?()=>D.createElement(n0,{onPress:e}):()=>null})},[u.foodItem.title,c,t,i,u.amount]);const S=M.useCallback(()=>{v&&t.pop()},[t,v]),k=M.useMemo(()=>void 0===h?"":"g"===h?e("grams"):h,[h,e]);return D.createElement(Xa,{contentContainerStyle:p0.pageWrapper,disableScrollViewPanResponder:!0,keyboardDismissMode:"on-drag"},D.createElement(ga,{style:p0.calculationCard},D.createElement(ga,{style:p0.row},i.liquid?D.createElement(ga,{style:p0.liquidInputContainer},D.createElement(c0,{placeholderTextColor:wL.text,style:[p0.amountInputLiquid,o&&{borderColor:wL.borderInputActive}],value:c,onChangeText:d,onFocusChange:s,testID:`${d0}-amount-input`}),D.createElement(l0,{setUnit:m,currentUnit:h})):D.createElement(ga,{style:[p0.gramInputContainer,o&&{borderColor:wL.borderInputActive}]},D.createElement(c0,{placeholderTextColor:wL.text,style:p0.amountInputGrams,value:c,onFocusChange:s,onChangeText:d,testID:`${d0}-amount-input`}),D.createElement(pj,{style:p0.weightText},e("food_card_unit")))),D.createElement(ga,{style:p0.dashedLineContainer},Array.from({length:20},(e,t)=>t).map(e=>D.createElement(ga,{key:e,style:p0.dashedLine}))),D.createElement(ga,{style:p0.carbsTotalContainer},D.createElement(ga,{style:p0.left},D.createElement(pj,{style:p0.carbAmount},Number(c)<1?0:b(u.foodItem.carbohydrates)),D.createElement(pj,{style:p0.carbsText},e("my_food_add_unit"))),D.createElement(cj,{title:e("button_add"),onPress:w,disabled:Number(c)<1,size:uj.Small}))),D.createElement(ga,{style:p0.foodNameContainer},D.createElement(pj,{style:p0.title},u.foodItem.title),D.createElement(pj,{style:p0.subtitle},e("food_library_carb_body",{amount:""===c?"100":c,unit:k}))),!!u.foodItem.description&&u.foodItem.description!==u.foodItem.title&&D.createElement(ga,{style:p0.descriptionContainer},D.createElement(pj,{style:p0.descriptionHeader},e("food_overview_description")),D.createElement(pj,{style:p0.description,testID:`${d0}-description`},u.foodItem.description)),D.createElement(ga,{style:p0.tableCell},D.createElement(pj,{style:p0.cellText},e("logbook_personal_log_card_carbs")),D.createElement(pj,{style:p0.cellValue,testID:`${d0}-carbs`},b(u.foodItem.carbohydrates),D.createElement(pj,{style:p0.gText}," ",e("logbook_collum_unit")))),D.createElement(ga,{style:p0.line}),D.createElement(ga,{style:p0.tableCell},D.createElement(pj,{style:p0.cellText},e("food_library_item_energy")),D.createElement(pj,{style:p0.cellValue,testID:`${d0}-kcal`},b(u.foodItem.energy),D.createElement(pj,{style:p0.gText}," kcal"))),D.createElement(ga,{style:p0.line}),D.createElement(ga,{style:p0.tableCell},D.createElement(pj,{style:p0.cellText},e("food_add_library_item_protein")),D.createElement(pj,{style:p0.cellValue},b(u.foodItem.protein),D.createElement(pj,{style:p0.gText}," ",e("logbook_collum_unit")))),D.createElement(ga,{style:p0.line}),D.createElement(ga,{style:p0.tableCell},D.createElement(pj,{style:p0.cellText},e("food_add_library_item_sugar")),D.createElement(pj,{style:p0.cellValue},b(u.foodItem.sugar),D.createElement(pj,{style:p0.gText}," ",e("logbook_collum_unit")))),D.createElement(ga,{style:p0.line}),D.createElement(ga,{style:p0.tableCell},D.createElement(pj,{style:p0.cellText},e("food_add_library_item_fibers")),D.createElement(pj,{style:p0.cellValue},b(u.foodItem.fibers),D.createElement(pj,{style:p0.gText}," ",e("logbook_collum_unit")))),D.createElement(ga,{style:p0.line}),D.createElement(ga,{style:p0.tableCell},D.createElement(pj,{style:p0.cellText},e("food_add_library_item_fat")),D.createElement(pj,{style:p0.cellValue},b(u.foodItem.fat),D.createElement(pj,{style:p0.gText}," ",e("logbook_collum_unit")))),D.createElement(ga,{style:p0.line}),D.createElement(ga,{style:p0.tableCell},D.createElement(pj,{style:p0.cellText},e("food_add_library_item_sfat")),D.createElement(pj,{style:p0.cellValue},b(u.foodItem.saturated_fat),D.createElement(pj,{style:p0.gText}," ",e("logbook_collum_unit")))),D.createElement(sz,{isVisible:p,title:e("current_glucose_invalid_modal_title"),message:e("current_glucose_invalid_modal_body"),buttons:[{testID:"close-button",title:e("button_close"),onPress:()=>{f(!1)}}]}),D.createElement(sz,{isVisible:g,title:e("food_modal_discard_title"),onModalHide:S,buttons:[{type:lj.Error,testID:"discard-button",title:e("button_discard_changes"),onPress:()=>{_(!1),y(!0)}},{type:lj.Secondary,testID:"keep-button",title:e("button_cancel"),onPress:()=>{_(!1)}}]}))},p0=Ei.create({pageWrapper:{paddingHorizontal:16,paddingVertical:32,backgroundColor:wL.bgSheet},calculationCard:{backgroundColor:wL.bgInput,padding:16,borderRadius:16,marginBottom:32},row:{flexDirection:"row",marginBottom:24},liquidInputContainer:{flexDirection:"row",alignItems:"center",gap:16,flex:1,borderRadius:16,overflow:"hidden"},gramInputContainer:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",flex:1,paddingHorizontal:16,borderWidth:1,borderRadius:16,overflow:"hidden",backgroundColor:wL.bgFoodInput},amountInputGrams:{..._L.regular_Base,textAlign:"left",color:wL.text,paddingVertical:16,flex:2,fontFamily:sV?gL.RobotoRegular:gL.PoppinsRegular,...h0},amountInputLiquid:{..._L.regular_Base,textAlign:"left",color:wL.text,backgroundColor:wL.bgFoodInput,padding:16,flex:1,borderWidth:1,borderColor:wL.borderInputActive,borderRadius:16,fontFamily:sV?gL.RobotoRegular:gL.PoppinsRegular,...h0},weightText:{flex:1,textAlign:"right"},line:{height:1,backgroundColor:wL.borderDivider},carbsTotalContainer:{justifyContent:"space-between",paddingHorizontal:8,paddingVertical:16,gap:24,flexDirection:"row",flexWrap:"wrap"},left:{alignItems:"baseline",alignSelf:"center",flexDirection:"row",flexWrap:"wrap"},carbAmount:{..._L.bold_3XL,marginRight:4},carbsText:{..._L.medium_Base},foodNameContainer:{paddingHorizontal:16,paddingBottom:24},title:{..._L.semiBold_LG},subtitle:{..._L.regular_Base,color:wL.textSecondary},tableCell:{flexDirection:"row",justifyContent:"space-between",alignContent:"center",paddingHorizontal:16,paddingVertical:16},cellText:{..._L.regular_Base,textAlign:"left"},cellValue:{..._L.regular_Base,color:wL.textSecondary,textAlign:"right"},gText:{..._L.regular_Base,color:wL.textSecondary},descriptionContainer:{marginBottom:32,paddingVertical:12,paddingHorizontal:16,borderRadius:16},descriptionHeader:{..._L.regular_XS,color:wL.textSecondary},description:{..._L.regular_Base},dashedLineContainer:{flexDirection:"row",justifyContent:"space-between"},dashedLine:{height:1,width:8,backgroundColor:wL.borderDivider}}),f0=()=>{},g0={setDefaultMode:f0,setInputMode:f0,preload:f0,setFocusTo:f0},_0=()=>({remove:f0}),v0=ga,y0=ga,b0=()=>{},w0=()=>b0,S0=e=>({value:e,addListener:b0,removeListener:b0,modify:b0,get:()=>e,set:b0}),k0=S0(0),C0=S0(null),E0={enabled:!0,animated:{progress:new uu.Value(0),height:new uu.Value(0)},reanimated:{progress:k0,height:k0},layout:C0,setKeyboardHandlers:w0,setInputHandlers:w0,setEnabled:b0},x0=M.createContext(E0),I0=()=>M.useContext(x0);let T0={height:0,duration:0,timestamp:(new Date).getTime(),target:-1,type:"default",appearance:"light"};const O0={setDefaultMode:g0.setDefaultMode,setInputMode:g0.setInputMode,setFocusTo:g0.setFocusTo,preload:g0.preload,dismiss:async e=>(null==e||e.keepFocus,new Promise(e=>{e()})),isVisible:()=>!1,state:()=>T0};FR.createAnimatedComponent(uu.createAnimatedComponent(v0)),Ei.create({container:{flex:1},hidden:{display:"none",position:"absolute"}}),lr.OS;const R0=Aa.get("screen");let A0={width:R0.width,height:R0.height};const L0=["keyboardDidShow","keyboardDidHide"],P0=()=>({...O0.state(),isVisible:O0.isVisible()}),M0=e=>e;function D0(e,t){M.useEffect(()=>()=>O0.setDefaultMode(),[]),function(e,t){const n=I0();M.useLayoutEffect(()=>{const t=n.setKeyboardHandlers(e);return()=>t()},t)}(e,t)}lr.OS;const N0="android"===lr.OS&&lr.Version>=30||"ios"===lr.OS,F0={duration:250,easing:lE.bezier(.19919472913616398,.010644531250000006,.27920937042459737,.91025390625)},B0=(e,t)=>{let n;return t&&(n=t.find(t=>t>=e)),n??e};function j0(){return j0=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},j0.apply(null,arguments)}const V0=M.forwardRef(({children:e,onLayout:t,bottomOffset:n=0,disableScrollOnKeyboardHide:i=!1,enabled:r=!0,extraKeyboardSpace:a=0,ScrollViewComponent:o=FR.ScrollView,snapToOffsets:s,...l},u)=>{const c=SR(),d=lR(null),h=lR(0),m=AR(c),p=lR(0),f=lR(0),g=lR(!1),_=lR(-1),v=lR(0),y=lR(0),{input:b}={input:I0().layout},w=lR(null),S=lR(null),{height:k}=(()=>{const[e,t]=M.useState(A0);return M.useEffect(()=>(t(A0),()=>{}),[]),e})(),C=M.useCallback(e=>{"function"==typeof u?u(e):u&&(u.current=e),c(e)},[]),E=M.useCallback(e=>{d.value=c.current,null==t||t(e)},[t]),x=M.useCallback((e,t=!1)=>{var i,a,o;if(!r)return 0;if((null===(i=w.value)||void 0===i?void 0:i.parentScrollViewTarget)!==d.value)return 0;const l=k-f.value,u=((null===(a=w.value)||void 0===a?void 0:a.layout.absoluteY)||0)+((null===(o=w.value)||void 0===o?void 0:o.layout.height)||0);if(l-u<=n){const i=f.value-(k-u)+n,r=KR(e,[v.value,f.value],[0,B0(i+h.value,s)-h.value]),a=Math.max(r,0)+h.value;return sA(c,0,a,t),r}if(u<0){const e=l-n,i=h.value+u;sA(c,0,i-e,t)}return 0},[n,r,k,s]),I=M.useCallback(e=>{const t=KR(e.height,[0,f.value],[0,f.value+a]);p.value=t},[a]),T=M.useCallback(()=>{var e,t;const n=null===(e=S.value)||void 0===e?void 0:e.selection.end.y;return!(null===(t=b.value)||void 0===t||!t.layout||!n)&&(w.value={...b.value,layout:{...b.value.layout,height:QR(n,0,b.value.layout.height)}},!0)},[b,S,w]),O=M.useCallback(()=>{const e=h.value,t=w.value;T()&&(h.value=m.value,x(f.value,!0),h.value=e,w.value=t)},[x]),R=M.useCallback(()=>{O()},[O]),A=M.useMemo(()=>((e,t=0)=>{const n={time:0};return(...i)=>{const r=Date.now();if(!(r-n.time<t))return n.time=r,e(...i);n.time=r}})(R,200),[R]),L=M.useCallback(e=>{var t,n;const i=null===(t=S.value)||void 0===t?void 0:t.target,r=null===(n=S.value)||void 0===n?void 0:n.selection;if(S.value=e,e.target===i)return e.selection.end.position===e.selection.start.position&&(null==r?void 0:r.end.y)!==e.selection.end.y||e.selection.start.position!==e.selection.end.position?O():void A()},[O,A]);!function(e,t){const n=I0();M.useLayoutEffect(()=>{const t=n.setInputHandlers(e);return()=>t()},t)}({onSelectionChange:L},[L]),((e,t)=>{const n=lR(-1),i=lR(0),r=lR(0),a=lR(0);_R(()=>{if(!N0&&0!==r.value)return{duration:F0.duration,target:n.value,height:a.value,progress:a.value/r.value}},t=>{var n,a;t&&(null===(n=e.onMove)||void 0===n||n.call(e,t),t.height===i.value&&(null===(a=e.onEnd)||void 0===a||a.call(e,t),r.value=i.value))},t),D0({onStart:t=>{var o,s,l;if(!N0&&t.height===r.value)return null===(s=e.onStart)||void 0===s||s.call(e,t),void(null===(l=e.onEnd)||void 0===l||l.call(e,t));n.value=t.target,i.value=t.height,t.height>0&&(r.value=t.height),N0||(a.value=DE(t.height,F0)),null===(o=e.onStart)||void 0===o||o.call(e,{...t,duration:N0?t.duration:F0.duration})},onMove:t=>{var n;N0&&(null===(n=e.onMove)||void 0===n||n.call(e,t))},onEnd:t=>{var n;N0&&(null===(n=e.onEnd)||void 0===n||n.call(e,t))}},t)})({onStart:e=>{const t=f.value!==e.height&&e.height>0;g.value=e.height>0&&0===f.value;const n=0===e.height,i=_.value!==e.target&&-1!==e.target||t;t&&(v.value=f.value),n&&(v.value=0,h.value=y.value),(g.value||t||i)&&(h.value=m.value,f.value=e.height),i&&(_.value=e.target,T(),y.value=m.value),i&&!g.value&&(m.value+=x(e.height,!0))},onMove:e=>{I(e),i&&!g.value||x(e.height)},onEnd:e=>{f.value=e.height,h.value=m.value,I(e)}},[x,i,I]),M.useEffect(()=>{Fk(x)(f.value,!0)},[n]),_R(()=>b.value,(e,t)=>{(null==e?void 0:e.target)===(null==t?void 0:t.target)&&(null==e?void 0:e.layout.height)!==(null==t?void 0:t.layout.height)&&O()},[]);const P=mR(()=>r?{paddingBottom:p.value+1}:{},[r]);return D.createElement(o,j0({ref:C},l,{scrollEventThrottle:16,onLayout:E}),e,r&&D.createElement(FR.View,{style:P}))}),H0={width:13,height:2,borderRadius:1},z0={marginHorizontal:5,width:30,height:30,justifyContent:"center",alignItems:"center"};Ei.create({arrowUpContainer:z0,arrowDownContainer:{...z0,transform:[{rotate:"180deg"}]},arrow:{width:20,height:20,flexDirection:"row",alignItems:"center",justifyContent:"space-between"},arrowLeftLine:{...H0,transform:[{rotate:"-45deg"}],left:-.5},arrowRightLine:{...H0,transform:[{rotate:"45deg"}],left:-5.5}});lr.select({android:({children:e,onPress:t,disabled:n,accessibilityLabel:i,accessibilityHint:r,testID:a,rippleRadius:o=18,style:s,theme:l})=>{const u=function(e=M0){const[t,n]=M.useState(()=>e(P0()));return M.useEffect(()=>{const t=L0.map(t=>_0(t,()=>n(e(P0()))));return n(e(P0())),()=>{t.forEach(e=>e.remove())}},[]),t}(e=>e.appearance),c=M.useMemo(()=>({disabled:n}),[n]),d=M.useMemo(()=>dm.Ripple(l[u].ripple,!0,o),[u,o,l]);return D.createElement(dm,{accessibilityHint:r,accessibilityLabel:i,accessibilityRole:"button",accessibilityState:c,background:d,style:s,testID:a,onPress:t},D.createElement(ga,{style:s},e))},default:({children:e,onPress:t,disabled:n,accessibilityLabel:i,accessibilityHint:r,testID:a,style:o})=>{const s=n?ga:Ic,l=M.useMemo(()=>({disabled:n}),[n]);return D.createElement(s,{accessibilityHint:r,accessibilityLabel:i,accessibilityRole:"button",accessibilityState:l,style:o,testID:a,onPress:t},e)}});"ios"===lr.OS&&parseInt(lr.Version,10),Ei.create({flex:{flex:1},toolbar:{position:"absolute",bottom:0,alignItems:"center",width:"100%",flexDirection:"row",height:42},arrows:{flexDirection:"row",paddingLeft:8},doneButton:{fontWeight:"600",fontSize:15},doneButtonContainer:{marginRight:16,marginLeft:8},floating:{alignSelf:"center",borderRadius:20,overflow:"hidden"}}),Ei.create({absolute:{position:"absolute"},stretch:{top:0,bottom:0,left:0,right:0}}),uu.createAnimatedComponent(y0);const U0=({onModalHide:e})=>{const{t:t}=eV(),{showSyncErrorModal:n,modalStoreActions:i}=z2();return D.createElement(sz,{isVisible:n,onModalHide:e,onModalShow:()=>{NX(MX.ErrorOffline)},title:t("glucose_modal_changes_title"),message:t("glucose_modal_changes_body"),buttons:[{title:t("glucose_modal_changes_button_confirm"),onPress:()=>{i.set({showSyncErrorModal:!1})}}]})},G0=Ei.create({container:{flex:1,paddingHorizontal:16,backgroundColor:wL.bgSheet},contentContainer:{paddingVertical:32},cardMandatory:{backgroundColor:wL.bgCard,padding:16,borderRadius:16,marginBottom:32,gap:32},cardOptional:{backgroundColor:wL.bgCard,padding:16,borderRadius:16,marginBottom:32,gap:16},segmentContainer:{flexDirection:"row",justifyContent:"center",alignItems:"center",backgroundColor:wL.bgInput,borderRadius:16},segment:{flex:1,flexDirection:"row",justifyContent:"center",alignItems:"center",alignSelf:"stretch",backgroundColor:wL.bgInput,paddingVertical:8,borderColor:wL.bgInput,borderRadius:16,borderWidth:1},segmentIntensity:{flex:1,justifyContent:"center",alignItems:"center",backgroundColor:wL.bgInput,paddingVertical:8,borderColor:wL.bgInput,borderRadius:16,borderWidth:1},selected:{backgroundColor:wL.bgBrand,borderColor:wL.borderOnBrand},borderLeft:{backgroundColor:wL.borderDivider,alignSelf:"center",height:16,width:1},value:{..._L.medium_Base},intensityDescription:{backgroundColor:wL.bgInput,padding:16,borderRadius:16,marginTop:8},intensityDescriptionText:{..._L.regular_XS,color:wL.textSecondary},intensityDot:{width:10,height:10,borderRadius:5,marginRight:4,marginBottom:2},reductionContainer:{flex:1,flexDirection:"row",justifyContent:"space-between",paddingTop:16,borderTopColor:wL.borderDivider},reductionDescription:{flex:1,alignSelf:"center",..._L.semiBold_SM},reductionPercentage:{..._L.bold_4XL,marginLeft:24},typesContainer:{flexDirection:"row"},activityIcon:{color:wL.text,width:22,height:22},activityTypeScrollViewContainer:{gap:4,paddingHorizontal:16},activityType:{flexDirection:"row",justifyContent:"center",alignItems:"center",alignSelf:"stretch",backgroundColor:wL.bgInput,borderColor:wL.borderOnSecondary,borderRadius:16,paddingHorizontal:12,paddingVertical:8,borderWidth:1},activityTypeText:{..._L.medium_SM,color:wL.textInputText,paddingLeft:4},titleInputContainer:{paddingHorizontal:16}}),W0=rF(()=>{const{t:e}=eV(),{activityStoreActions:t}=I2(),{modalStoreActions:n}=z2(),i=Gp(),r=cf(),[a,o]=M.useState(!1),[s,l]=M.useState(!1),{activity:u}=Vq;if(void 0===u)throw new Error("[CreateActivity::render] activitySettings is undefined");const c=M.useMemo(()=>({uuid:IX(),startTimestamp:null,deleted:!1,type:null,activityIntensity:null,durationSeconds:0,overwrittenByUUID:void 0,title:void 0,uuidOld:void 0}),[]),d=M.useMemo(()=>r.params?.activity??c,[c,r.params?.activity]),h=M.useMemo(()=>{if(null===d.startTimestamp)return null;return new Date(d.startTimestamp).getTime()+d.durationSeconds*FL.Milliseconds.Second>Date.now()?0:1},[d]),[m,p]=M.useState(d),[f,g]=M.useState(h),[_,v]=M.useState(0),y=M.useMemo(()=>1===f?m.durationSeconds>0&&!!m.startTimestamp:m.durationSeconds>0&&!!m.activityIntensity&&!!m.startTimestamp,[m,f]),b=M.useMemo(()=>!LX(m,d),[m,d]),w=M.useCallback(()=>{b?o(!0):i.goBack()},[b,i]),S=M.useCallback(async()=>{const e=r.params?.activity?.uuid,a=e?{...m,uuid:IX()}:m;if(await Lq.create(a,e)){const n=Lq.getEventWithHighestReduction(u);t.set({selectedEventUUID:n?.uuid??a.uuid,activityDurationSeconds:n?.durationSeconds??0}),NX(e?MX.ActivityEditPress:MX.ActivityAddPress),i.goBack()}else n.set({showSyncErrorModal:!0})},[m,u,t,n,i,r.params?.activity]);M.useEffect(()=>{const t=r.params?.activity?e("button_done"):e("button_add"),n=!y||!b;i.setOptions({headerRight:()=>D.createElement(J2,{title:t,onPress:S,disabled:n}),headerLeft:()=>D.createElement(e0,{onPress:w})})},[w,S,y,r.params?.activity,e,i,b]);const k=e=>{p(t=>({...t,...e}))},C=e=>{const t=60*e,n=Date.now()-(1===f?t*FL.Milliseconds.Second:0);k({durationSeconds:t,startTimestamp:new Date(n).toISOString()})},E=e=>{k({activityIntensity:FL.ActivityIntensity[e]})},x=Math.round(m.durationSeconds/60),I=29===x,T=45===x,O=60===x,R=m.activityIntensity===FL.ActivityIntensity.light,A=m.activityIntensity===FL.ActivityIntensity.moderate,L=m.activityIntensity===FL.ActivityIntensity.hard,P=0===f,N=1===f,F=x>45&&L&&!u.hard.fromFortysix;M.useEffect(()=>{const{activityIntensity:e,durationSeconds:t,startTimestamp:n}=m,i=0===f&&e;if(!F&&n&&t&&(i||1===f)){const t=Iq.getReduction(x,u,i?e:null,new Date(n));v(t)}},[F,u,m,x,f]);const B=M.useCallback(()=>{s&&setTimeout(i.goBack,100)},[s,i]),j=M.useCallback(()=>{o(!1),l(!0)},[]);return D.createElement(D.Fragment,null,D.createElement(V0,{testID:"create-activity-scroll-view",style:G0.container,contentContainerStyle:G0.contentContainer,keyboardDismissMode:oV?"none":"on-drag",automaticallyAdjustKeyboardInsets:!0,contentInsetAdjustmentBehavior:"automatic"},D.createElement(ga,{style:G0.cardMandatory},D.createElement(ga,null,D.createElement(Sj,{title:e("new_activity_when_title")}),D.createElement(ga,{style:G0.segmentContainer},D.createElement(eh,{style:[G0.segment,0===f&&G0.selected],onPress:()=>{g(0),0!==m.durationSeconds&&k({startTimestamp:(new Date).toISOString()})},testID:`starting-now-touchable-${P}`},D.createElement(pj,{style:G0.value,maxFontSizeMultiplier:vL},e("new_activity_intensity_option1"))),D.createElement(ga,{style:G0.borderLeft}),D.createElement(eh,{style:[G0.segment,1===f&&G0.selected],onPress:()=>{if(g(1),0!==m.durationSeconds){const e=new Date(Date.now()-m.durationSeconds*FL.Milliseconds.Second);k({startTimestamp:e.toISOString(),activityIntensity:null})}},testID:`just-finished-now-touchable-${N}`},D.createElement(pj,{style:G0.value,maxFontSizeMultiplier:vL},e("new_activity_intensity_option2"))))),D.createElement(ga,null,D.createElement(Sj,{title:e("new_activity_duration_title")}),D.createElement(ga,{style:G0.segmentContainer},D.createElement(eh,{style:[G0.segment,I&&G0.selected],onPress:()=>{C(29)}},D.createElement(pj,{style:G0.value,maxFontSizeMultiplier:vL},"0-29 min")),D.createElement(ga,{style:G0.borderLeft}),D.createElement(eh,{style:[G0.segment,T&&G0.selected],onPress:()=>{C(45)}},D.createElement(pj,{style:G0.value,maxFontSizeMultiplier:vL},"30-45 min")),D.createElement(ga,{style:G0.borderLeft}),D.createElement(eh,{style:[G0.segment,O&&G0.selected],onPress:()=>{C(60)}},D.createElement(pj,{style:G0.value,maxFontSizeMultiplier:vL},"46-60 min")))),P&&D.createElement(ga,null,D.createElement(Sj,{title:e("new_activity_intensity_title")}),D.createElement(ga,{style:G0.segmentContainer},D.createElement(eh,{style:[G0.segmentIntensity,R&&G0.selected],onPress:()=>{E(FL.ActivityIntensity.light)},testID:`activity-light-touchable-${R}`},D.createElement(ga,{style:[G0.intensityDot,EQ(FL.ActivityIntensity.light)]}),D.createElement(pj,{style:G0.value,maxFontSizeMultiplier:vL},e("activity_intensity_1"))),D.createElement(ga,{style:G0.borderLeft}),D.createElement(eh,{style:[G0.segmentIntensity,A&&G0.selected],onPress:()=>{E(FL.ActivityIntensity.moderate)},testID:`activity-moderate-touchable-${A}`},D.createElement(ga,{style:[G0.intensityDot,EQ(FL.ActivityIntensity.moderate)]}),D.createElement(pj,{style:G0.value,maxFontSizeMultiplier:vL},e("activity_intensity_2"))),D.createElement(ga,{style:G0.borderLeft}),D.createElement(eh,{style:[G0.segmentIntensity,L&&G0.selected],onPress:()=>{E(FL.ActivityIntensity.hard)},testID:`activity-hard-touchable-${L}`},D.createElement(ga,{style:[G0.intensityDot,EQ(FL.ActivityIntensity.hard)]}),D.createElement(pj,{style:G0.value,maxFontSizeMultiplier:vL},e("activity_intensity_3")))),(R||A||L)&&D.createElement(ga,null,D.createElement(ga,{style:G0.intensityDescription},R&&D.createElement(pj,{style:G0.intensityDescriptionText},e("activity_intensity_1_text")),A&&D.createElement(pj,{style:G0.intensityDescriptionText},e("activity_intensity_2_text")),L&&D.createElement(pj,{style:G0.intensityDescriptionText},e("activity_intensity_3_text"))))),y&&!F&&D.createElement(ga,null,D.createElement(hj,null),D.createElement(ga,{style:G0.reductionContainer},D.createElement(pj,{style:G0.reductionDescription,maxFontSizeMultiplier:vL},e("new_activity_reduction_amount_body")),D.createElement(pj,{style:G0.reductionPercentage,testID:"create-activity-reduction-percentage",maxFontSizeMultiplier:vL},`${Math.round(100*_)}%`)))),D.createElement(ga,{style:[G0.cardOptional,{paddingHorizontal:0}]},D.createElement(ga,{style:G0.titleInputContainer},D.createElement(cV,{testID:"activity-title-input",placeholder:e("new_activity_note_input"),value:m.title??"",onChangeText:e=>{k({title:e})},maxFontSizeMultiplier:vL})),D.createElement(Xa,{horizontal:!0,style:G0.typesContainer,showsHorizontalScrollIndicator:!1,contentContainerStyle:G0.activityTypeScrollViewContainer},Object.keys(FL.ActivityEnum).map(e=>{const t=m.type===e,n=`activity-${e}-touchable-${t}`.toLowerCase();return D.createElement(eh,{testID:n,key:e,style:[G0.activityType,t&&G0.selected],onPress:()=>{k({type:FL.ActivityEnum[e]})}},CQ(e,G0.activityIcon),D.createElement(pj,{style:G0.activityTypeText,maxFontSizeMultiplier:vL},TQ[e]()))})))),D.createElement(U0,null),D.createElement(sz,{isVisible:F,title:e("new_activity_modal_intensity_high_title"),message:e("new_activity_modal_intensity_high_body"),buttons:[{title:e("button_understood"),testID:"ok-button",onPress:()=>{k({activityIntensity:null})}}]}),D.createElement(sz,{isVisible:a,title:e("new_activity_modal_discard_title"),onModalHide:B,buttons:[{title:e("button_discard_changes"),testID:"discard-button",type:lj.Error,onPress:j},{title:e("button_keep_editing"),testID:"keep-button",type:lj.Secondary,onPress:()=>{o(!1)}}]}))});const Y0=Ei.create({button:{backgroundColor:wL.iosBg2,borderRadius:13},buttonText:{fontSize:17,lineHeight:22,fontWeight:"600",paddingHorizontal:16,paddingVertical:14,textAlign:"center",color:wL.textKeyboardButtons}}),$0=D.memo(function({onPress:e}){const{t:t}=eV();return D.createElement(eh,{accessibilityRole:"button",style:Y0.button,onPress:e,testID:"wheel-picker-modal-cancel"},D.createElement(pj,{style:Y0.buttonText},t("button_cancel")))});const X0=Ei.create({button:{backgroundColor:wL.iosBg2,borderBottomLeftRadius:13,borderBottomRightRadius:13},buttonText:{fontSize:17,lineHeight:22,fontWeight:"400",paddingHorizontal:16,paddingVertical:14,textAlign:"center",color:wL.textKeyboardButtons}}),q0=D.memo(function({onPress:e}){const{t:t}=eV();return D.createElement(eh,{accessibilityRole:"button",style:X0.button,onPress:e,testID:"wheel-picker-modal-confirm"},D.createElement(pj,{style:X0.buttonText},t("button_confirm")))});const Z0=Ei.create({item:{alignItems:"center",justifyContent:"center",zIndex:100},itemPressable:{width:"100%"},itemText:{textAlign:"center",fontSize:22,lineHeight:26,fontWeight:"400",color:wL.text}}),K0=D.memo(function({textStyle:e,style:t,height:n,option:i,onItemPress:r}){return D.createElement(ga,{style:[Z0.item,t,{height:n}]},D.createElement(eh,{style:Z0.itemPressable,onPress:r},D.createElement(hl,{style:[e,Z0.itemText]},i)))});const Q0=Ei.create({mask:{position:"absolute",left:0,right:0,pointerEvents:"none"}}),J0=M.memo(function({itemHeight:e,visibleRest:t}){const n=e*t;return D.createElement(D.Fragment,null,D.createElement(nj,{colors:[wL.iosBg2,wL.dropshadow100],style:[Q0.mask,{top:0,height:n}]}),D.createElement(nj,{colors:[wL.dropshadow100,wL.iosBg2],style:[Q0.mask,{bottom:0,height:n}]}))});const e3=Ei.create({container:{borderTopLeftRadius:13,borderTopRightRadius:13,backgroundColor:wL.iosBg2,alignSelf:"center"},selectedIndicator:{position:"absolute",backgroundColor:wL.iosHighlight,borderRadius:7,top:"50%",alignSelf:"center"}}),t3=D.memo(function({testID:e,initialScrollIndex:t,options:n,onChange:i,selectedIndicatorStyle:r={},containerStyle:a={},itemStyle:o={},itemTextStyle:s={},itemHeight:l=36,visibleRest:u=3,decelerationRate:c="normal",containerProps:d={},flatListProps:h={},accessibilityLabel:m,ref:p}){const{t:f}=eV(),{width:g}=vm(),_=(1+2*u)*l,v=M.useRef(null),y=M.useRef(null);M.useImperativeHandle(p,()=>({scrollToIndex(e){v.current?.scrollToIndex({index:e,animated:!0})}}),[]);const[b]=M.useState(new uu.Value(0)),w=M.useMemo(()=>{const e=[...n];for(let t=0;t<u;t++)e.unshift(null),e.push(null);return e},[n,u]),S=M.useMemo(()=>[...Array(w.length)].map((e,t)=>t*l),[w,l]),k=M.useCallback(e=>{oV||y.current!==e&&(y.current=e)},[]),C=M.useCallback(e=>{const t=e.nativeEvent.contentOffset.y,r=Math.min(n.length-1,Math.max(0,Math.round(t/l)));k(r),oV&&(i(r),v.current?.scrollToIndex({index:r,animated:!0}))},[k,l,i,n.length]),E=oj((...e)=>{const t=e[0];C(t)},100),x=M.useCallback(e=>{const t=e.nativeEvent.contentOffset.y,r=Math.min(l*(n.length-1),Math.max(t,0));let a=Math.floor(Math.floor(r)/l);Math.floor(r%l)>l/2&&a++,i(a)},[l,i,n.length]);return D.createElement(ga,{accessible:!0,accessibilityHint:f("wheelpicker_accessibility_label"),accessibilityLabel:m,accessibilityRole:"adjustable",style:[e3.container,{height:_,width:g},a],...d},D.createElement(ga,{style:[e3.selectedIndicator,{transform:[{translateY:-l/2}],height:l,width:g-32-20},r]}),D.createElement(uu.FlatList,{...h,testID:e,ref:v,showsVerticalScrollIndicator:!1,removeClippedSubviews:sV,onScroll:uu.event([{nativeEvent:{contentOffset:{y:b}}}],{useNativeDriver:!oV,listener:oV?E:C}),scrollEventThrottle:16,initialScrollIndex:t,onMomentumScrollEnd:x,snapToInterval:l,snapToOffsets:S,decelerationRate:c,getItemLayout:(e,t)=>({length:l,offset:l*t,index:t}),data:w,keyExtractor:(e,t)=>t.toString(),windowSize:31,initialNumToRender:2*u+1,maxToRenderPerBatch:12,updateCellsBatchingPeriod:50,renderItem:({item:e,index:t})=>D.createElement(K0,{key:`option-${t}`,option:e,style:o,textStyle:s,height:l,onItemPress:()=>{const e=Math.max(0,Math.min(t-u,n.length-1));v.current?.scrollToIndex({index:e,animated:!0})}})}),D.createElement(J0,{itemHeight:l,visibleRest:u}))});const n3=D.memo(function({items:e,isVisible:t,onCancel:n,onConfirm:i,onModalHide:r,initialScrollIndex:a,accessibilityLabel:o,testID:s}){const[l,u]=M.useState(a),{width:c}=vm();M.useEffect(()=>{u(a)},[a]);const d=M.useCallback(e=>{u(e)},[]),h=M.useCallback(()=>{i(parseFloat(e[l]))},[e,i,l]),m=M.useCallback(()=>{u(a),n()},[a,n]);return D.createElement(sz,{isVisible:t,containerStyle:i3.modalContainer,onModalHide:r},D.createElement(ga,null,D.createElement(ga,{style:i3.pickersContainer},D.createElement(t3,{testID:s,initialScrollIndex:a,options:e,onChange:d,accessibilityLabel:o,containerStyle:{width:c-32}})),D.createElement(ga,{style:i3.buttonContainer},D.createElement(q0,{onPress:h}),D.createElement($0,{onPress:m}))))}),i3=Ei.create({pickersContainer:{flexDirection:"row",borderTopLeftRadius:13,borderTopRightRadius:13,overflow:"hidden"},buttonContainer:{gap:8},modalContainer:{backgroundColor:wL.bgTransparent}}),r3=({isLiquid:e,setSelected:t})=>{const{t:n}=eV();return M.createElement(ga,{style:a3.container},M.createElement(eh,{style:[a3.segment,!e&&a3.selected],onPress:()=>{t(!1)},testID:`food-type-food-${e}`},M.createElement(pj,{style:a3.value,maxFontSizeMultiplier:vL},n("add_food_segment_food"))),M.createElement(ga,{style:a3.borderLeft}),M.createElement(eh,{style:[a3.segment,e&&a3.selected],onPress:()=>{t(!0)},testID:`food-type-drink-${e}`},M.createElement(pj,{style:a3.value,maxFontSizeMultiplier:vL},n("add_food_segment_drink"))))},a3=Ei.create({container:{flexDirection:"row",justifyContent:"center",alignItems:"center",backgroundColor:wL.bgInput,borderRadius:16,marginBottom:32},segment:{flex:1,flexDirection:"row",justifyContent:"center",alignItems:"center",backgroundColor:wL.bgInput,paddingVertical:7,borderColor:wL.bgInput,borderRadius:16,borderWidth:1},selected:{backgroundColor:wL.bgBrand,borderColor:wL.borderOnBrand},borderLeft:{backgroundColor:wL.borderDivider,alignSelf:"center",height:16,width:1},value:{..._L.medium_Base}}),o3={id:Date.now(),title:"",keywords:"",description:"",liquid:!1,energy:0,carbohydrates:0,protein:0,sugar:0,fibers:0,fat:0,saturated_fat:0,source:null,user_id:null},s3=RX(0,100),l3=RX(0,999),u3="create-food",c3=()=>{const{t:e}=eV(),{foodStoreActions:t,selectedFoodItem:n,isLoading:i}=L2(),{cartItems:r,carbohydrateStoreActions:a}=EX(),{modalStoreActions:o}=z2(),s=Gp(),[l,u]=M.useState(n??o3),[c,d]=M.useState(""),[h,m]=M.useState(!1),[p,f]=M.useState(!1),[g,_]=M.useState(0),[v,y]=M.useState(!1);M.useEffect(()=>{m(Boolean(l.title&&l.carbohydrates))},[l.title,l.carbohydrates]);const b=M.useCallback(e=>{const t=r.find(t=>t.foodItem.id===e.id);t&&a.upsertCartItem({...t,foodItem:e})},[r,a]),w=M.useCallback(async()=>{if(i)return;const e=n?await t.updateMyFoodItem(l):await t.createMyFoodItem(l);n&&e&&b(l),e?(s.pop(),NX(MX.FoodLibraryCreatePress)):o.set({showSyncErrorModal:!0})},[l,i,n,t,s,b,o]);M.useEffect(()=>{const t=e(n?"button_done":"button_add"),i=()=>{s.pop()};s.setOptions({title:l.title,headerLeft:()=>D.createElement(e0,{onPress:i}),headerRight:()=>D.createElement(J2,{title:t,onPress:w,disabled:!h})})},[l.title,h,s,w,n,e]);const S=M.useCallback(e=>{Pu.dismiss(),d(e),_(Number(l[e])),f(!0)},[l]),k=M.useCallback(e=>{u(t=>({...t,[c]:e})),f(!1),d("")},[c]),C=M.useCallback(async()=>{if(!n||i)return;y(!1);await t.deleteMyFoodItem(n)?(a.removeFromCart(n.id,"id"),s.dispatch(Rm.pop()),s.dispatch(Rm.pop()),t.set({selectedFoodItem:void 0})):setTimeout(()=>{o.set({showSyncErrorModal:!0})},300)},[n,i,t,a,s,o]),{carbohydrates:E,description:x,energy:I,fat:T,fibers:O,liquid:R,protein:A,saturated_fat:L,sugar:P,title:N}=l;return D.createElement(Xa,{testID:`${u3}-scroll`,keyboardDismissMode:"on-drag",keyboardShouldPersistTaps:"always",style:d3.scrollView},D.createElement(ga,{style:d3.container},D.createElement(r3,{isLiquid:R,setSelected:e=>{u(t=>({...t,liquid:e}))}}),D.createElement(pj,{style:d3.sectionHeader},e("food_add_title")),D.createElement(ga,{style:d3.mandatorySection},D.createElement(cV,{value:N,placeholder:e(R?"food_add_library_input_drink_name":"food_add_library_input_name"),onChangeText:e=>{u(t=>({...t,title:e}))},containerStyle:d3.noBorder,testID:`${u3}-name`,autoFocus:!n}),D.createElement(bj,{title:e("food_add_library_item_carbs"),onPress:()=>{S("carbohydrates")},style:d3.smallNegativeMarginTop,renderRightSlot:()=>D.createElement(pj,{style:d3.rightSlot,testID:`${u3}-carbohydrates`},E," / 100g")})),D.createElement(pj,{style:d3.sectionHeader},e("food_add_optional_title")),D.createElement(ga,{style:d3.optionalSection},D.createElement(cV,{value:x,placeholder:e("add_food_overview_description"),onChangeText:e=>{u(t=>({...t,description:e}))},testID:`${u3}-description`,containerStyle:d3.noBorder}),D.createElement(bj,{title:e("food_add_library_item_energy"),onPress:()=>{S("energy")},style:d3.mediumNegativeMarginTop,renderRightSlot:()=>D.createElement(pj,{style:d3.rightSlot,testID:`${u3}-energy`},I," / 100g")}),D.createElement(bj,{title:e("food_library_item_protein"),onPress:()=>{S("protein")},renderRightSlot:()=>D.createElement(pj,{style:d3.rightSlot,testID:`${u3}-protein`},A," / 100g")}),D.createElement(bj,{title:e("food_library_item_sugar"),onPress:()=>{S("sugar")},renderRightSlot:()=>D.createElement(pj,{style:d3.rightSlot,testID:`${u3}-sugar`},P," / 100g")}),D.createElement(bj,{title:e("food_library_item_fibers"),onPress:()=>{S("fibers")},renderRightSlot:()=>D.createElement(pj,{style:d3.rightSlot,testID:`${u3}-fibers`},O," / 100g")}),D.createElement(bj,{title:e("food_library_item_fat"),onPress:()=>{S("fat")},renderRightSlot:()=>D.createElement(pj,{style:d3.rightSlot,testID:`${u3}-fat`},T," / 100g")}),D.createElement(bj,{title:e("food_library_item_sfat"),onPress:()=>{S("saturated_fat")},renderRightSlot:()=>D.createElement(pj,{style:d3.rightSlot,testID:`${u3}-saturated-fat`},L," / 100g")})),n&&D.createElement(cj,{type:lj.ErrorSecondary,title:e("button_delete_food"),testID:"delete_food_button",onPress:()=>{y(!0)}})),D.createElement(sz,{isVisible:v,title:e("food_modal_delete_food_title"),buttons:[{title:e("button_delete_food"),type:lj.Error,testID:"delete_modal_delete_button",onPress:C},{title:e("button_cancel"),type:lj.Secondary,testID:"delete_modal_cancel_button",onPress:()=>{y(!1)}}]}),D.createElement(n3,{isVisible:p,items:"energy"===c?l3:s3,initialScrollIndex:g,onCancel:()=>{f(!1)},onConfirm:k}),D.createElement(U0,null))},d3=Ei.create({scrollView:{backgroundColor:wL.bgSheet},container:{flex:1,paddingHorizontal:16,paddingTop:32,paddingBottom:64},mandatorySection:{marginBottom:32},optionalSection:{marginBottom:32,gap:8},sectionHeader:{..._L.medium_SM,color:wL.text,marginHorizontal:16,marginBottom:8},rightSlot:{..._L.regular_Base,color:wL.textInputTextSecondary},noBorder:{borderWidth:0},smallNegativeMarginTop:{marginTop:-8},mediumNegativeMarginTop:{marginTop:-16}}),h3=({item:e,index:t,testID:n})=>{const{t:i}=eV(),{navigate:r}=Gp(),{foodStoreActions:a}=L2(),o=cf(),{COLORS:s}=sj(),l=`${n}-${t}`;return D.createElement(Ic,{style:[m3.container,{backgroundColor:s.bgInput}],onPress:()=>{a.set({selectedFoodItem:e}),o.params?.comingFrom===C2.FoodTab?r(C2.FoodDetails):r(C2.AddCarbs,{isCarbItem:!1})},testID:l},D.createElement(pj,{style:[m3.title,{color:s.textInputText}],numberOfLines:1,maxFontSizeMultiplier:bL,testID:`${l}-title`},e.title),D.createElement(pj,{style:[m3.subTitle,{color:s.textInputTextSecondary}],numberOfLines:1,testID:`${l}-subtitle`,maxFontSizeMultiplier:bL},(()=>{const t=e.carbohydrates.toFixed(),n=i("new_cal_carbohydrates_input_unit"),r=i("food_card_kcal",{value:e.energy.toString()});return`${i("food_card_carb",{value:t,carbs:n})} ${r} ${i("food_card_grams")}`})()))},m3=Ei.create({container:{padding:16,borderRadius:16},title:{..._L.medium_Base,marginBottom:4},subTitle:{..._L.regular_SM}}),p3=oV?{outline:"none"}:{},f3=({comingFrom:e})=>{const{t:t,language:n}=eV(),{query:i,foodStoreActions:r}=L2(),a=()=>{r.set({hasSearched:!1,query:"",searchResults:[]})},o=async()=>{""!==i&&(r.set({hasSearched:!0}),await r.search(n),e===C2.FoodTab?NX(MX.FoodLibrarySearched):NX(MX.CarbsFoodLibrarySearch))},s=oj(o,300);return D.createElement(ga,{style:g3.container},D.createElement(fQ,null),D.createElement(kh,{testID:"food-searchbar-input",autoCapitalize:"none",placeholder:t("food_search_title"),placeholderTextColor:wL.textSearchInactive,cursorColor:wL.textSearchActive,style:g3.searchInput,multiline:!1,value:i,onChangeText:e=>{r.set({query:e}),e?e.length>2&&s():a()},onSubmitEditing:o,autoCorrect:!1,enterKeyHint:"search"}),i.length>0&&D.createElement(eh,{onPress:a,hitSlop:10},D.createElement(JK,{color:wL.textSecondary,width:16,height:16})))},g3=Ei.create({container:{flexDirection:"row",alignItems:"center",justifyContent:"center",backgroundColor:wL.bgSearch,borderRadius:16,marginTop:16,paddingHorizontal:12},searchInput:{..._L.regular_Base,flex:1,paddingVertical:8,paddingHorizontal:4,marginTop:2,color:wL.textSearchActive,fontFamily:sV?gL.RobotoRegular:gL.PoppinsRegular,...p3}}),_3=()=>{const{t:e,language:t}=eV(),{fontScale:n}=vm(),{myFood:i,searchResults:r,isLoading:a,isMyFoodTab:o,hasSearched:s,frequentlyAdded:l,animatedEntryId:u,foodStoreActions:c}=L2(),d=Gp(),h=cf(),{COLORS:m}=sj();Wp(M.useCallback(()=>{c.loadFrequentFoodItems().catch(console.error)},[c])),M.useEffect(()=>{i.sort((e,n)=>e.title.localeCompare(n.title,t))},[i,t]),M.useEffect(()=>{c.loadMyFood().catch(console.error)},[c]);const p=M.useCallback(()=>{c.set({isMyFoodTab:!0}),h.params.comingFrom===C2.CarbsTab?NX(MX.CarbsFoodLibraryPersonalPress):NX(MX.FoodLibraryPersonalPress)},[c,h.params.comingFrom]),f=M.useCallback(()=>{c.set({selectedFoodItem:void 0}),d.navigate(C2.CreateFood)},[c,d]),g=M.useMemo(()=>{const t=e(o||s?o?"food_empty_state_no_food":"food_empty_state_search_no_food":"food_empty_state_default");return D.createElement(ga,{style:[v3.emptyListContainer,{marginTop:o?64+Math.round(23*n):32}]},D.createElement(sQ,null),D.createElement(pj,{style:v3.message},t))},[n,o,s,e]),_=M.useMemo(()=>D.createElement(ga,{style:v3.header},D.createElement(ga,{style:[v3.segmentContainer,{backgroundColor:m.bgInput}]},D.createElement(eh,{style:[v3.segment,!o&&v3.selected],onPress:()=>{c.set({isMyFoodTab:!1})},testID:`food-library-button-${!o}`},D.createElement(pj,{style:v3.value,maxFontSizeMultiplier:vL},e("food_segment_button_library"))),D.createElement(ga,{style:v3.borderLeft}),D.createElement(eh,{style:[v3.segment,o&&v3.selected],onPress:p,testID:`my-food-button-${o}`},D.createElement(pj,{style:v3.value,maxFontSizeMultiplier:vL},e("food_segment_button_my_food")))),!o&&D.createElement(D.Fragment,null,D.createElement(f3,{comingFrom:h.params.comingFrom??C2.FoodTab}),!s&&!!l.length&&D.createElement(pj,{style:v3.frequentHeader},e("food_library_frequent_title")))),[m.bgInput,o,e,p,h.params.comingFrom,s,l.length,c]),v=M.useMemo(()=>o?i:s?r:l,[o,i,s,r,l]);return D.createElement(D.Fragment,null,D.createElement(ga,{style:[v3.container,h.params.comingFrom===C2.CarbsTab&&{backgroundColor:m.bgSheet}]},D.createElement(Wo,{data:v,keyExtractor:e=>`${e.id}`,ListEmptyComponent:a?D.createElement(QV,null):g,ListHeaderComponent:_,renderItem:({item:e,index:t})=>D.createElement(rj,{onAnimationFinished:()=>{c.set({animatedEntryId:void 0})},isAnimated:o&&u===e.id.toString(),style:v3.listItem},D.createElement(h3,{item:e,index:t,testID:"food-item"})),disableScrollViewPanResponder:!0,keyboardDismissMode:"on-drag",contentContainerStyle:v.length?v3.contentContainer:v3.emptyContentContainer})),o&&D.createElement(nj,{colors:m.gradientButtonBox,style:v3.gradient},D.createElement(cj,{type:lj.Secondary,testID:"my-food-create-food-button",onPress:f,title:e("food_my_food_button_create"),style:v3.createFoodButton})))},v3=Ei.create({container:{flex:1},emptyContentContainer:{flex:1,marginHorizontal:16},contentContainer:{marginHorizontal:16,paddingBottom:80},header:{marginVertical:32},segmentContainer:{flexDirection:"row",justifyContent:"center",alignItems:"center",borderRadius:16},segment:{flex:1,alignSelf:"stretch",flexDirection:"row",justifyContent:"center",alignItems:"center",backgroundColor:wL.bgInput,paddingVertical:7,borderColor:wL.bgInput,borderRadius:16,borderWidth:1},selected:{backgroundColor:wL.bgBrand,borderColor:wL.borderOnSecondary},borderLeft:{backgroundColor:wL.borderDivider,alignSelf:"center",height:16,width:1},value:{..._L.medium_Base},emptyListContainer:{flex:1,alignItems:"center"},message:{..._L.regular_SM,color:wL.textSecondary,marginTop:16,marginHorizontal:16,textAlign:"center"},frequentHeader:{..._L.medium_SM,color:wL.textSecondary,marginHorizontal:16,marginTop:32,marginBottom:-24},listItem:{marginBottom:8},gradient:{position:"absolute",bottom:0,left:0,right:0},createFoodButton:{margin:16,marginBottom:32}});function y3({uri:e,style:t,onLoadEnd:n}){const i=M.useRef(null);return M.useEffect(()=>{const e=i.current;if(n&&e)return e.addEventListener("load",n),()=>{e.removeEventListener("load",n)}},[i,n]),D.createElement("iframe",{ref:i,src:e,style:t})}function b3(){const{language:e}=Qj.getState();return`https://pdf.hedia.io/IFU/${e}/Hedia-IFU-${PX}`}const w3=()=>D.createElement(y3,{style:S3.iframe,uri:b3()}),S3=Ei.create({iframe:{flex:1}});var k3,C3={},E3={exports:{}};var x3,I3,T3={};var O3=function(){if(I3)return C3;I3=1;var e,t=(k3||(k3=1,(e=E3).exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports),E3.exports);Object.defineProperty(C3,"__esModule",{value:!0}),C3.default=C3.WebView=void 0,t(S());var n=JB,i=t(function(){if(x3)return T3;x3=1,Object.defineProperty(T3,"__esModule",{value:!0}),T3.default=void 0;var e=JB.StyleSheet.create({container:{flex:1,overflow:"hidden"},loadingOrErrorView:{position:"absolute",flex:1,justifyContent:"center",alignItems:"center",height:"100%",width:"100%",backgroundColor:"white"},loadingProgressBar:{height:20},errorText:{fontSize:14,textAlign:"center",marginBottom:2},errorTextTitle:{fontSize:15,fontWeight:"500",marginBottom:10},webView:{backgroundColor:"#ffffff"},flexStart:{alignSelf:"flex-start"},colorRed:{color:"red"}});return T3.default=e,T3}()),r=l(),a=C3.WebView=function(){return(0,r.jsx)(n.View,{style:i.default.flexStart,children:(0,r.jsx)(n.Text,{style:i.default.colorRed,children:"React Native WebView does not support this platform."})})};return C3.default=a,C3}();const R3=n(O3);function A3({url:e,testID:t,incognito:n=!0,backgroundColor:i=wL.bgBackground,onNavigationStateChange:r,spinnerSize:a=15,style:o}){const[s,l]=M.useState(!1),{top:u}=hH();return e?D.createElement(D.Fragment,null,D.createElement(R3,{source:{uri:e},testID:t,incognito:n,startInLoadingState:!0,renderLoading:()=>D.createElement(ga,{style:L3.centerContainer},D.createElement(qV,{source:KV.LOADING_SPINNER,autoPlay:!0,style:{height:`${a}%`}})),onHttpError:()=>{l(!0)},onNavigationStateChange:r,style:{backgroundColor:i},containerStyle:[L3.container,{backgroundColor:i,paddingTop:u},o]}),s&&D.createElement(FR.View,{entering:wx.duration(300).delay(2e3),style:L3.centerContainer},D.createElement(hl,{style:L3.errorTitle},"The page can't be found"),D.createElement(hl,{style:L3.errorSubtitle},"It looks like nothing was found at this location."))):null}const L3=Ei.create({container:{height:"100%"},centerContainer:{height:"100%",justifyContent:"center"},errorTitle:{..._L.semiBold_4XL,color:wL.text,textAlign:"center"},errorSubtitle:{..._L.medium_XS,color:wL.textSecondary,textAlign:"center"}});function P3(){return oV?D.createElement(y3,{style:M3.iframe,uri:"https://www.hedia.com/support/partner"}):D.createElement(A3,{url:"https://www.hedia.com/support/native",testID:"support-webview",style:M3.container})}const M3=Ei.create({iframe:{flex:1},container:{paddingTop:0}});function D3(){const{dispatch:e}=Gp(),t=cf(),[n,i]=M.useState(!1);return M.useEffect(()=>{setTimeout(()=>{i(!0)},1e3)},[]),M.useEffect(()=>{n&&(oV?(window.location.href="/redirect?status=success",qj.clearAll()):e(wm(C2.DashboardTab,{screen:C2.Dashboard,params:{action:nV.Saved,logbookEntry:t.params.logbookEntry}})))},[e,n,t.params.logbookEntry]),D.createElement(ga,{style:N3.animationContainer},D.createElement(qV,{autoPlay:!0,source:KV.LEAVING_RECOMMENDATION,style:N3.animation,webStyle:N3.animation,resizeMode:"cover",loop:!1}))}const N3=Ei.create({animationContainer:{flex:1,justifyContent:"center",alignItems:"center"},animation:{width:131,height:131}});var F3={},B3={};const j3=i(wH);var V3={},H3={};const z3=i(BK);var U3,G3,W3={},Y3={},$3={};function X3(){if(G3)return Y3;G3=1,Object.defineProperty(Y3,"__esModule",{value:!0}),Y3.DARK_SEMANTIC_COLORS=void 0;var e=(U3||(U3=1,Object.defineProperty($3,"__esModule",{value:!0}),$3.COLORS=void 0,$3.COLORS={base100:"#f6f6f6",base200:"#ebebeb",base300:"#e0e0e0",base400:"#cccccc",base500:"#b3b3b3",base600:"#9a9a9a",base700:"#767676",base800:"#595959",base900:"#2c2c2c",primary100:"#e8fcfc",primary200:"#c1f2f2",primary300:"#99e4e4",primary400:"#5ac2c2",primary500:"#4fbaba",primary600:"#38a6a6",primary700:"#209191",primary800:"#0a6e6e",primary900:"#005555",yellow100:"#fefee9",yellow200:"#fafad0",yellow300:"#f0f0a6",yellow400:"#dddd7e",yellow500:"#c1c152",yellow600:"#a7a739",yellow700:"#85852d",yellow800:"#666623",yellow900:"#4d4d1a",green100:"#99ffc7",green200:"#7fe0ab",green300:"#67c190",green400:"#51a277",green500:"#3d835e",green600:"#29764e",green700:"#18683f",green800:"#0b5a32",green900:"#004d26",red100:"#fee9e9",red200:"#fad0d0",red300:"#f0a6a6",red400:"#dd7e7e",red500:"#c15252",red600:"#a73939",red700:"#852d2d",red800:"#662323",red900:"#4d1a1a",base100:"#E9E0FF",base100a:"#E9E0FF1A",base200:"#76708F",base300:"#393546",base350:"#302C3A",base400:"#27242E",base500:"#1B1A21",base600:"#151319",base700:"#131215",base700a:"#131215B3",base800:"#0A090D",base900:"#050408",base900a:"#05040899",primary100:"#B5D8FF",primary100a:"#B5D8FF99",primary200:"#9EC6FF",primary300:"#87B5FF",primary300a:"#87B5FF4D",primary400:"#73ADFF",primary400a:"#3D4AC680",primary500:"#5F99F9",primary600:"#4A85F0",primary700:"#4A73ED",primary700a:"#4A73ED",primary800:"#4A5DEB",primary900:"#3D4AC6",red50:"#FEEBEE",red100:"#F3B8BA",red200:"#E87A7E",red300:"#FF3B30",red400:"#D12A2E",red400a:"#D12A2E99",red500:"#AE241B",red600:"#792521",red700:"#4B1E1D",red800:"#2A1616",red900:"#160D0D",green50:"#D6FFED",green100:"#C5F8DC",green200:"#5CE59C",green200a:"#5CE59C1A",green300:"#64D9A4",green400:"#1BD881",green500:"#02AD71",green600:"#1E8059",green700:"#185C45",green800:"#113B2F",green900:"#0A1C18",yellow50:"#FFE5B5",yellow100:"#FFEBC2",yellow200:"#FFD27E",yellow300:"#F3B901",yellow400:"#FF9E01",yellow500:"#FF5A01",yellow600:"#874312",yellow700:"#523010",yellow800:"#2E1B0B",yellow900:"#1A1208",accentActiveInsulin:"#8CF4FF",accentBorderActiveInsulin:"#66D6FF",accentBorderActiveInsulinOpacity:"#224352",accentCarbohydrate:"#5CE5DC",accentGlucoseAverage:"#FF8CD8",accentMyDay:"#F2BD85",accentPhysicalActivity:"#D7EB98",accentRapid:"#66D6FF",accentTimeInRange:"#5CE59C",gradientActiveInsulinBottom:"#01C1D600",gradientActiveInsulinTop:"#8CF4FF",gradientButtonBoxBottom:"#000000",gradientButtonBoxTop:"#0000000D",gradientCarbohydrateBottom:"#48B2AB",gradientCarbohydrateTop:"#5CE5DC",gradientGlucoseAverageBottom:"#AF6DB9",gradientGlucoseAverageTop:"#FF8CD8",gradientGlucoseBottom:"#CBAE6F",gradientGlucoseTop:"#F2BD85",gradientHighBottom:"#F2B900",gradientHighTop:"#FF9E01",gradientLowBottom:"#FF657F",gradientLowTop:"#EF2F4F",gradientPhysicalActivityBottom:"#79A762",gradientPhysicalActivityTop:"#D7EB98",gradientQuickGuideBottom:"#000000",gradientQuickGuideTop:"#0000000D",gradientRapidBottom:"#4796B2",gradientRapidTop:"#66D6FF",gradientRecCarbohydrateBottom:"#409F99",gradientRecCarbohydrateTop:"#327D78",gradientTargetBottom:"#1AD881",gradientTargetTop:"#02AD71",gradientVeryHighBottom:"#EA7644",gradientVeryHighTop:"#FF5A01",gradientVeryLowBottom:"#F44337",gradientVeryLowTop:"#A6261E",white100:"#FFFFFF0D",white200:"#FFFFFF1A",white300:"#FFFFFF33",white400:"#FFFFFF66",white500:"#FFFFFF99",white600:"#FFFFFFCC",white700:"#FFFFFFE6",white800:"#FFFFFFF2",white900:"#FFFFFF",black100:"#0000000D",black200:"#0000001A",black300:"#00000033",black400:"#0000004D",black500:"#00000080",black600:"#000000CC",black700:"#000000D9",black800:"#000000F2",black900:"#000000",noRisk:"#DFB38F",lowRisk:"#DB988D",moderateRisk:"#A76762",highRisk:"#773751",transparent:"transparent",dropshadow100:"#0C0C0D00",dropshadow500:"#0C0C0D00",iOSKeyboardButton:"#0A84FF",iosBg1:"#8C8C8C",iosBg2:"#252525",iosHighlight:"#5858593D"}),$3);return Y3.DARK_SEMANTIC_COLORS={bgActivityHighlight:e.COLORS.base350,bgBackground:e.COLORS.base900,bgBrand:e.COLORS.primary800,bgBrandDisabled:e.COLORS.base300,bgBrandPagination:e.COLORS.primary200,bgBrandPressed:e.COLORS.primary900,bgBrandTinted:e.COLORS.primary300a,bgButtonSecondary:e.COLORS.base350,bgCard:e.COLORS.base600,bgDanger:e.COLORS.red400,bgDangerDisabled:e.COLORS.red700,bgDangerPressed:e.COLORS.red500,bgDashboardDotsHigh:e.COLORS.yellow300,bgDashboardDotsInRange:e.COLORS.green400,bgDashboardDotsLow:e.COLORS.red300,bgDashboardHighlightDots:e.COLORS.green300,bgEmptyOnBg:e.COLORS.white600,bgFoodInput:e.COLORS.white200,bgFoodInputWeight:e.COLORS.base300,bgHard:e.COLORS.red300,bgIcon:e.COLORS.base400,bgInfoBox:e.COLORS.base500,bgInput:e.COLORS.base500,bgInputActive:e.COLORS.base400,bgInputDanger:e.COLORS.base600,bgKeyboard:e.COLORS.black900,bgLight:e.COLORS.green400,bgLogbookHighlight:e.COLORS.base350,bgLogbookManual:e.COLORS.base500,bgLogbookRec:e.COLORS.base400,bgModal:e.COLORS.base500,bgModerate:e.COLORS.yellow400,bgNavigation:e.COLORS.base900a,bgNavigationBar:e.COLORS.base900a,bgNavigationBarCalc:e.COLORS.white200,bgNavigationBarSummaryActive:e.COLORS.white200,bgNavigationBarSummaryInactive:e.COLORS.white100,bgNavigationIndicator:e.COLORS.primary400,bgOnProgressBarSecondary:e.COLORS.base400,bgOnSmartpenConflictPressed:e.COLORS.primary700,bgPagination:e.COLORS.white300,bgPills:e.COLORS.white100,bgPillsInactive:e.COLORS.black200,bgProgressBar:e.COLORS.base900a,bgRecNavigationNumberActive:e.COLORS.white900,bgRecNavigationNumberInactive:e.COLORS.white400,bgRecNavigationSummaryButton:e.COLORS.base600,bgRecommendation:e.COLORS.base400,bgRecommendationCorrection:e.COLORS.base500,bgSearch:e.COLORS.base400,bgSecondary:e.COLORS.base500,bgSecondaryDisabled:e.COLORS.base600,bgSecondaryPressed:e.COLORS.base300,bgSheet:e.COLORS.base800,bgSmartpenConflictButtonActive:e.COLORS.base400,bgSmartpenConflictButtonDisabled:e.COLORS.base400,bgSmartpenConflictCardActive:e.COLORS.base400,bgSmartpenConflictCardDisabled:e.COLORS.base500,bgTableActive:e.COLORS.white300,bgTableHighlight:e.COLORS.base500,bgTableInputActive:e.COLORS.base600,bgTableInputInactive:e.COLORS.base600,bgTableTopActive:e.COLORS.base500,bgTableTopInactive:e.COLORS.base500,bgTimeInRange:e.COLORS.green200a,bgToast:e.COLORS.base300,bgToggleActive:e.COLORS.primary600,bgToggleInactive:e.COLORS.base300,bgToggleSlider:e.COLORS.white300,bgToggleSliderKnob:e.COLORS.white900,bgTransparent:e.COLORS.transparent,borderActiveInsulin:e.COLORS.accentActiveInsulin,borderBrandAnimation:e.COLORS.primary400,borderCarbohydrate:e.COLORS.accentCarbohydrate,borderCardOverlay:e.COLORS.base600,borderDanger:e.COLORS.red300,borderDivider:e.COLORS.white200,borderGlucoseAverage:e.COLORS.accentGlucoseAverage,borderGraphOverlay:e.COLORS.black500,borderInputActive:e.COLORS.primary500,borderInputDivider:e.COLORS.white100,borderKnob:e.COLORS.white100,borderLine:e.COLORS.white800,borderNavigation:e.COLORS.base100a,borderOnBrand:e.COLORS.white200,borderOnBrandDisabled:e.COLORS.black100,borderOnDangerDisabled:e.COLORS.red100,borderOnProgressBarSecondary:e.COLORS.white100,borderOnSecondary:e.COLORS.white100,borderOnSecondaryDisabled:e.COLORS.black100,borderOverlay:e.COLORS.black500,borderRapid:e.COLORS.accentRapid,borderSlider:e.COLORS.white100,borderTableDivider:e.COLORS.white200,dropshadow100:e.COLORS.dropshadow100,dropshadow500:e.COLORS.dropshadow500,gradientActiveInsulin:[e.COLORS.gradientActiveInsulinBottom,e.COLORS.gradientRapidTop],gradientButtonBox:[e.COLORS.gradientButtonBoxTop,e.COLORS.gradientButtonBoxBottom],gradientCarbohydrates:[e.COLORS.gradientCarbohydrateBottom,e.COLORS.gradientCarbohydrateTop],gradientGlucose:[e.COLORS.gradientGlucoseBottom,e.COLORS.gradientGlucoseTop],gradientGlucoseAverage:[e.COLORS.gradientGlucoseAverageBottom,e.COLORS.gradientGlucoseAverageTop],gradientHigh:[e.COLORS.gradientHighBottom,e.COLORS.gradientHighTop],gradientLow:[e.COLORS.gradientLowTop,e.COLORS.gradientLowBottom],gradientPhysicalActivity:[e.COLORS.gradientPhysicalActivityBottom,e.COLORS.gradientPhysicalActivityTop],gradientQuickGuide:[e.COLORS.gradientQuickGuideTop,e.COLORS.gradientQuickGuideBottom],gradientRapid:[e.COLORS.gradientRapidBottom,e.COLORS.gradientRapidTop],gradientRecCarbohydrates:[e.COLORS.gradientRecCarbohydrateBottom,e.COLORS.gradientRecCarbohydrateTop],gradientTarget:[e.COLORS.gradientTargetBottom,e.COLORS.gradientTargetTop],gradientVeryHigh:[e.COLORS.gradientVeryHighBottom,e.COLORS.gradientVeryHighTop],gradientVeryLow:[e.COLORS.gradientVeryLowBottom,e.COLORS.gradientVeryLowTop],icon:e.COLORS.white800,iconActiveInsulin:e.COLORS.accentActiveInsulin,iconBrand:e.COLORS.primary400,iconCarbohydrate:e.COLORS.accentCarbohydrate,iconCheckmark:e.COLORS.green400,iconDanger:e.COLORS.red300,iconDangerPressed:e.COLORS.white600,iconDangerSecondaryPressed:e.COLORS.red500,iconGlucose:e.COLORS.accentMyDay,iconGlucoseAverage:e.COLORS.accentGlucoseAverage,iconInputActive:e.COLORS.white800,iconInputInactive:e.COLORS.white500,iconNavigationBarActive:e.COLORS.primary400,iconNavigationBarInactive:e.COLORS.white500,iconNavigationBarSummaryActive:e.COLORS.primary400,iconNavigationBarSummaryInactive:e.COLORS.white500,iconNavigationRec:e.COLORS.white900,iconOnBrand:e.COLORS.white800,iconOnBrandDisabled:e.COLORS.white400,iconOnBrandPressed:e.COLORS.white600,iconOnCard:e.COLORS.white800,iconOnCardInactive:e.COLORS.white400,iconOnDanger:e.COLORS.white800,iconOnDangerDisabled:e.COLORS.white500,iconOnInput:e.COLORS.white600,iconOnSecondary:e.COLORS.white800,iconOnSecondaryDanger:e.COLORS.red300,iconOnSecondaryDangerDisabled:e.COLORS.white400,iconOnSecondaryDisabled:e.COLORS.white400,iconOnSecondaryPressed:e.COLORS.white600,iconOnTertiary:e.COLORS.white800,iconOnTertiaryDisabled:e.COLORS.white400,iconOnTertiaryPressed:e.COLORS.white600,iconOnToast:e.COLORS.white900,iconPhysicalActivity:e.COLORS.accentPhysicalActivity,iconRapid:e.COLORS.accentRapid,iconSearch:e.COLORS.white500,iconSecondary:e.COLORS.white500,iconSegmentPicker:e.COLORS.white800,iconSegmentPickerActive:e.COLORS.white800,iconSuccess:e.COLORS.green400,iconTimeInRange:e.COLORS.accentTimeInRange,iconToggleSlider:e.COLORS.white900,iconWarning:e.COLORS.yellow300,iosStatusBar:e.COLORS.white900,iosBg1:e.COLORS.iosBg1,iosBg2:e.COLORS.iosBg2,iosHighlight:e.COLORS.iosHighlight,neutralBlack:e.COLORS.black900,text:e.COLORS.white900,textActiveInsulin:e.COLORS.accentActiveInsulin,textBrand:e.COLORS.primary400,textCarbohydrate:e.COLORS.accentCarbohydrate,textDanger:e.COLORS.red300,textDangerDisabled:e.COLORS.white500,textDangerPressed:e.COLORS.white600,textDangerSecondaryPressed:e.COLORS.red500,textDangerTableActive:e.COLORS.red300,textDangerTableInactive:e.COLORS.red400a,textDisplay:e.COLORS.white900,textFoodInput:e.COLORS.white800,textFoodInputWeight:e.COLORS.base300,textGlucose:e.COLORS.accentMyDay,textGlucoseAverage:e.COLORS.accentGlucoseAverage,textHigh:e.COLORS.yellow300,textInputGraphInactive:e.COLORS.white300,textInputInactive:e.COLORS.white500,textInputText:e.COLORS.white900,textInputTextBrand:e.COLORS.primary400,textInputTextSecondary:e.COLORS.white600,textKeyboardButtons:e.COLORS.iOSKeyboardButton,textKeybord:e.COLORS.white800,textLow:e.COLORS.red300,textModalButtonInactive:e.COLORS.white300,textNavigationNumberActive:e.COLORS.black900,textNavigationNumberInactive:e.COLORS.white900,textNavigationTitle:e.COLORS.white900,textOnBrand:e.COLORS.white900,textOnBrandDisabled:e.COLORS.white400,textOnBrandPressed:e.COLORS.white600,textOnCarbCard:e.COLORS.white800,textOnDanger:e.COLORS.white800,textOnGraphInactive:e.COLORS.white500,textOnNavigationActive:e.COLORS.primary400,textOnNavigationInactive:e.COLORS.white500,textOnRecommendation:e.COLORS.white800,textOnRecommendationStrikethrough:e.COLORS.white500,textOnSecondary:e.COLORS.white800,textOnSecondaryDangerDisabled:e.COLORS.red400a,textOnSecondaryDisabled:e.COLORS.white400,textOnSecondaryPressed:e.COLORS.white600,textOnSmartpenConflictActive:e.COLORS.white900,textOnSmartpenConflictPressed:e.COLORS.white800,textOnTertiary:e.COLORS.white800,textOnTertiaryDisabled:e.COLORS.white400,textOnTertiaryPressed:e.COLORS.white600,textOnToast:e.COLORS.white800,textPhysicalActivity:e.COLORS.accentPhysicalActivity,textPillInactive:e.COLORS.white400,textRapid:e.COLORS.accentRapid,textSearchActive:e.COLORS.white800,textSearchBrand:e.COLORS.primary400,textSearchInactive:e.COLORS.white500,textSecondary:e.COLORS.white600,textSecondaryDanger:e.COLORS.red300,textSegmentPicker:e.COLORS.white800,textSmartenConflictButtonDisabled:e.COLORS.white400,textSmartpenConflictButtonActive:e.COLORS.base400,textSmartpenConflictDisabled:e.COLORS.white400,textSuccess:e.COLORS.green200,textTableActive:e.COLORS.primary400,textTableInactive:e.COLORS.white400,textTarget:e.COLORS.green400,textTimeInRange:e.COLORS.accentTimeInRange,textToggleSlider:e.COLORS.white800,textVeryHigh:e.COLORS.yellow500,textVeryLow:e.COLORS.red400,textWarning:e.COLORS.yellow300,toggleKnob:e.COLORS.white900},Y3}var q3,Z3,K3,Q3={};function J3(){return Z3||(Z3=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.COLORS=void 0,Object.defineProperty(e,"FONTS",{enumerable:!0,get:function(){return n.FONTS}}),Object.defineProperty(e,"FontFamily",{enumerable:!0,get:function(){return n.FontFamily}});var t=X3(),n=function(){if(q3)return Q3;q3=1,Object.defineProperty(Q3,"__esModule",{value:!0}),Q3.FontFamily=Q3.FONTS=void 0;let e=Q3.FontFamily=function(e){return e.PoppinsBold="Poppins-Bold",e.PoppinsSemiBold="Poppins-SemiBold",e.PoppinsMedium="Poppins-Medium",e.PoppinsRegular="Poppins-Regular",e}({});return Q3.FONTS={Poppins:{bold_6XL:{fontFamily:e.PoppinsBold,fontSize:60,lineHeight:78},semiBold_6XL:{fontFamily:e.PoppinsSemiBold,fontSize:60,lineHeight:78},bold_5XL:{fontFamily:e.PoppinsBold,fontSize:48,lineHeight:62},semiBold_5XL:{fontFamily:e.PoppinsSemiBold,fontSize:48,lineHeight:62},bold_4XL:{fontFamily:e.PoppinsBold,fontSize:36,lineHeight:47},semiBold_4XL:{fontFamily:e.PoppinsSemiBold,fontSize:36,lineHeight:47},bold_3XL:{fontFamily:e.PoppinsBold,fontSize:30,lineHeight:39},semiBold_3XL:{fontFamily:e.PoppinsSemiBold,fontSize:30,lineHeight:39},bold_2XL:{fontFamily:e.PoppinsBold,fontSize:24,lineHeight:31},semiBold_2XL:{fontFamily:e.PoppinsSemiBold,fontSize:24,lineHeight:31},medium_2XL:{fontFamily:e.PoppinsMedium,fontSize:24,lineHeight:31},bold_XL:{fontFamily:e.PoppinsBold,fontSize:20,lineHeight:26},semiBold_XL:{fontFamily:e.PoppinsSemiBold,fontSize:20,lineHeight:26},medium_XL:{fontFamily:e.PoppinsMedium,fontSize:20,lineHeight:26},bold_LG:{fontFamily:e.PoppinsBold,fontSize:18,lineHeight:23},semiBold_LG:{fontFamily:e.PoppinsSemiBold,fontSize:18,lineHeight:23},medium_LG:{fontFamily:e.PoppinsMedium,fontSize:18,lineHeight:23},bold_Base:{fontFamily:e.PoppinsBold,fontSize:16,lineHeight:21},semiBold_Base:{fontFamily:e.PoppinsSemiBold,fontSize:16,lineHeight:21},medium_Base:{fontFamily:e.PoppinsMedium,fontSize:16,lineHeight:21},regular_Base:{fontFamily:e.PoppinsRegular,fontSize:16,lineHeight:21},semiBold_SM:{fontFamily:e.PoppinsSemiBold,fontSize:14,lineHeight:18},medium_SM:{fontFamily:e.PoppinsMedium,fontSize:14,lineHeight:18},regular_SM:{fontFamily:e.PoppinsRegular,fontSize:14,lineHeight:18},semiBold_XS:{fontFamily:e.PoppinsSemiBold,fontSize:12,lineHeight:16},medium_XS:{fontFamily:e.PoppinsMedium,fontSize:12,lineHeight:16},regular_XS:{fontFamily:e.PoppinsRegular,fontSize:12,lineHeight:16},regular_XXS:{fontFamily:e.PoppinsRegular,fontSize:10,lineHeight:10}}},Q3}();e.COLORS=t.DARK_SEMANTIC_COLORS}(W3)),W3}var e4,t4={};var n4,i4={};function r4(){if(n4)return i4;n4=1,Object.defineProperty(i4,"__esModule",{value:!0}),i4.TIMEOUT_MODAL_TRIGGER=i4.TARGET_BGL_MMOL_LIMITS=i4.INSULIN_TO_CARBS_RATIO_LIMITS=i4.INSULIN_SENSITIVITY_MMOL_LIMITS=i4.INSULIN_DOSE_LIMITS=i4.CURRENT_BGL_MMOL_LIMITS=i4.CARBOHYDRATES_LIMITS=i4.BOLUS_SECONDS_PASSED_LIMITS=i4.ACTIVITY_TARGET_BGL_MMOL_LIMITS=i4.ACTIVITY_SETTINGS_INTERVAL_LIMITS=i4.ACTIVITY_POSTPONE_GLUCOSE=i4.ACTIVITY_DURATION_MINUTES_LIMITS=void 0;var e=NL();return i4.ACTIVITY_POSTPONE_GLUCOSE=5,i4.TIMEOUT_MODAL_TRIGGER=6e5,i4.CARBOHYDRATES_LIMITS={min:e.CONSTANTS.CARBOHYDRATES_INPUT_MIN,max:e.CONSTANTS.CARBOHYDRATES_INPUT_MAX},i4.INSULIN_DOSE_LIMITS={min:e.CONSTANTS.INSULIN_DOSE_MIN,max:e.CONSTANTS.INSULIN_DOSE_MAX},i4.BOLUS_SECONDS_PASSED_LIMITS={min:e.CONSTANTS.BOLUS_SECONDS_MIN,max:e.CONSTANTS.BOLUS_SECONDS_MAX},i4.ACTIVITY_DURATION_MINUTES_LIMITS={min:e.CONSTANTS.ACTIVITY_DURATION_MIN,max:e.CONSTANTS.ACTIVITY_DURATION_MAX},i4.INSULIN_SENSITIVITY_MMOL_LIMITS={min:e.CONSTANTS.INSULIN_SENSITIVITY_MIN,max:e.CONSTANTS.INSULIN_SENSITIVITY_MAX},i4.INSULIN_TO_CARBS_RATIO_LIMITS={min:e.CONSTANTS.INSULIN_TO_CARBS_RATIO_MIN,max:e.CONSTANTS.INSULIN_TO_CARBS_RATIO_MAX},i4.CURRENT_BGL_MMOL_LIMITS={min:e.CONSTANTS.GLUCOSE_INPUT_MIN_MMOLL,max:e.CONSTANTS.GLUCOSE_INPUT_MAX_MMOLL},i4.TARGET_BGL_MMOL_LIMITS={min:e.CONSTANTS.TARGET_GLUCOSE_MIN,max:e.CONSTANTS.TARGET_GLUCOSE_MAX},i4.ACTIVITY_TARGET_BGL_MMOL_LIMITS={min:e.CONSTANTS.ACTIVITY_TARGET_GLUCOSE_MIN,max:e.CONSTANTS.ACTIVITY_TARGET_GLUCOSE_MAX},i4.ACTIVITY_SETTINGS_INTERVAL_LIMITS={min:e.CONSTANTS.ACTIVITY_REDUCTION_MIN,max:e.CONSTANTS.ACTIVITY_REDUCTION_MAX},i4}var a4,o4={};function s4(){if(a4)return o4;a4=1,Object.defineProperty(o4,"__esModule",{value:!0}),o4.useLanguage=o4.LanguageProvider=o4.LanguageContext=void 0;var e=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=i(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&{}.hasOwnProperty.call(e,o)){var s=a?Object.getOwnPropertyDescriptor(e,o):null;s&&(s.get||s.set)?Object.defineProperty(r,o,s):r[o]=e[o]}return r.default=e,n&&n.set(e,r),r}(S()),t=Dj(),n=l();function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(i=function(e){return e?n:t})(e)}const r=o4.LanguageContext=(0,e.createContext)(void 0);o4.LanguageProvider=({children:i})=>{const{language:a,changeLanguage:o,t:s}=(0,t.useTranslation)(),l=e.default.useMemo(()=>({language:a,changeLanguage:o,t:s}),[a,o,s]);return(0,n.jsx)(r.Provider,{value:l,children:i})};return o4.useLanguage=()=>{const t=(0,e.useContext)(r);if(!t)throw new Error("useLanguage must be used within a LanguageProvider");return t},o4}var l4,u4={};function c4(){if(l4)return u4;l4=1,Object.defineProperty(u4,"__esModule",{value:!0}),u4.roundInsulinValue=u4.formatUnit=u4.displayedBGLValue=u4.createSequentialArrayInteger=u4.createSequentialArrayHalf=u4.createSequentialArrayDecimal=u4.convertBGLToMGDL=void 0;var e=NL();const{PenHalf:t,PenWhole:n,Pump:i}=e.InjectionMethod;u4.roundInsulinValue=(e,r)=>{const a={[n]:1,[t]:2,[i]:10}[r];return Math.round(e*a)/a};const r=t=>Math.round(t*e.CONSTANTS.MGDL_PER_MMOLL_BGL);u4.convertBGLToMGDL=r;u4.displayedBGLValue=(t,n)=>n===e.BloodGlucoseUnit.MMOL_L?t.toFixed(1):`${r(t)}`;u4.formatUnit=e=>`${e.substring(0,e.length-1)}${e.substring(e.length-1,e.length).toUpperCase()}`;u4.createSequentialArrayHalf=(e,t)=>Array.from({length:(t-e)/.5+1},(t,n)=>(e+.5*n).toFixed(1));u4.createSequentialArrayInteger=(e,t)=>Array.from({length:t-e+1},(t,n)=>(e+n).toString());return u4.createSequentialArrayDecimal=(e,t)=>Array.from({length:10*(t-e)+1},(t,n)=>(e+n/10).toFixed(1)),u4}var d4,h4,m4={};function p4(){if(d4)return m4;d4=1,Object.defineProperty(m4,"__esModule",{value:!0}),m4.default=void 0,function(e){e&&e.__esModule}(S());var e=JB,t=J3(),n=l();const i=e.StyleSheet.create({defaultText:{...t.FONTS.Poppins.regular_Base,color:t.COLORS.text}});return m4.default=function(t){return(0,n.jsx)(e.Text,{...t,style:[i.defaultText,t.style],children:t.children})},m4}function f4(){if(h4)return V3;h4=1,Object.defineProperty(V3,"__esModule",{value:!0}),V3.default=void 0;var e=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=m(t);if(n&&n.has(e))return n.get(e);var i={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&{}.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(i,a,o):i[a]=e[a]}return i.default=e,n&&n.set(e,i),i}(S()),t=JB,n=NL(),i=h(function(){if(K3)return H3;K3=1,Object.defineProperty(H3,"__esModule",{value:!0}),H3.default=void 0,function(e){e&&e.__esModule}(S());var e=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=i(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&{}.hasOwnProperty.call(e,o)){var s=a?Object.getOwnPropertyDescriptor(e,o):null;s&&(s.get||s.set)?Object.defineProperty(r,o,s):r[o]=e[o]}return r.default=e,n&&n.set(e,r),r}(z3),t=J3(),n=l();function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(i=function(e){return e?n:t})(e)}return H3.default=function(i){return(0,n.jsx)(e.default,{width:24,height:24,viewBox:"0 0 24 24",...i,children:(0,n.jsx)(e.Path,{d:"M7.668 13.77h0a1.375 1.375 0 00-.758 1.776c.642 1.638 2.097 3.053 4.194 3.297h0a1.36 1.36 0 001.503-1.207h0a1.368 1.368 0 00-1.193-1.517h0c-.962-.111-1.652-.743-1.98-1.582l-.448.176.447-.175a1.352 1.352 0 00-1.765-.768zM12 21.52c-3.177 0-5.476-1.785-6.648-4.133-1.18-2.361-1.197-5.247.157-7.405 2.079-3.033 5.034-5.346 6.234-6.216a.434.434 0 01.514 0c1.2.87 4.155 3.183 6.234 6.216 1.354 2.158 1.336 5.044.157 7.405-1.172 2.348-3.471 4.133-6.648 4.133z",fill:t.COLORS.iconSecondary,stroke:t.COLORS.iconSecondary,strokeWidth:.96})})},H3}()),r=h(function(){if(e4)return t4;e4=1,Object.defineProperty(t4,"__esModule",{value:!0}),t4.default=void 0,function(e){e&&e.__esModule}(S());var e=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=i(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&{}.hasOwnProperty.call(e,o)){var s=a?Object.getOwnPropertyDescriptor(e,o):null;s&&(s.get||s.set)?Object.defineProperty(r,o,s):r[o]=e[o]}return r.default=e,n&&n.set(e,r),r}(z3),t=J3(),n=l();function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(i=function(e){return e?n:t})(e)}return t4.default=function(i){return(0,n.jsxs)(e.default,{width:24,height:24,viewBox:"0 0 24 24",fill:"none",...i,children:[(0,n.jsx)(e.Mask,{id:"a",fill:t.COLORS.iconSecondary,children:(0,n.jsx)(e.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M17.862 4.741a2.493 2.493 0 01-2.49 2.489 2.492 2.492 0 01-2.49-2.489 2.492 2.492 0 012.49-2.491 2.493 2.493 0 012.49 2.491zm1.326 5.237c-1.271.056-2.72.02-3.824-.658-.385-.237-.744-.562-1.125-.907-.211-.191-.422-.382-.64-.562-2.246-1.865-5.681-1.71-7.818.353a1 1 0 101.388 1.439c1.056-1.018 2.637-1.326 3.974-.893-.818 1.14-1.496 2.52-1.013 4.322.225.84.699 1.452 1.118 1.99l.008.011c.404.524.724.94.777 1.469.105 1.04-.42 2.164-.928 3.249l-.253.547a1.002 1.002 0 00.91 1.413 1 1 0 00.912-.588l.243-.525v-.003c.593-1.267 1.265-2.704 1.106-4.292-.111-1.103-.685-1.845-1.19-2.5l-.004-.004c-.347-.447-.646-.834-.767-1.285-.267-.996.079-1.772.767-2.718l.028.024.039.035c.43.39.877.795 1.42 1.129 1.299.798 2.819.972 4.143.972.282 0 .556-.01.817-.02a1 1 0 00.955-1.043c-.024-.552-.511-.971-1.043-.955zm-10.37 4.539c-.533.289-1.12.567-1.81.654-.446.055-.915.052-1.404.046l-.162-.001c-.234-.001-.469-.003-.704.005a1 1 0 00.03 1.999h.029c.24-.008.482-.006.722-.004h.065c.536.007 1.093.01 1.672-.061 1.022-.127 1.845-.516 2.515-.88a1 1 0 00-.954-1.758z"})}),(0,n.jsx)(e.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M17.862 4.741a2.493 2.493 0 01-2.49 2.489 2.492 2.492 0 01-2.49-2.489 2.492 2.492 0 012.49-2.491 2.493 2.493 0 012.49 2.491zm1.326 5.237c-1.271.056-2.72.02-3.824-.658-.385-.237-.744-.562-1.125-.907-.211-.191-.422-.382-.64-.562-2.246-1.865-5.681-1.71-7.818.353a1 1 0 101.388 1.439c1.056-1.018 2.637-1.326 3.974-.893-.818 1.14-1.496 2.52-1.013 4.322.225.84.699 1.452 1.118 1.99l.008.011c.404.524.724.94.777 1.469.105 1.04-.42 2.164-.928 3.249l-.253.547a1.002 1.002 0 00.91 1.413 1 1 0 00.912-.588l.243-.525v-.003c.593-1.267 1.265-2.704 1.106-4.292-.111-1.103-.685-1.845-1.19-2.5l-.004-.004c-.347-.447-.646-.834-.767-1.285-.267-.996.079-1.772.767-2.718l.028.024.039.035c.43.39.877.795 1.42 1.129 1.299.798 2.819.972 4.143.972.282 0 .556-.01.817-.02a1 1 0 00.955-1.043c-.024-.552-.511-.971-1.043-.955zm-10.37 4.539c-.533.289-1.12.567-1.81.654-.446.055-.915.052-1.404.046l-.162-.001c-.234-.001-.469-.003-.704.005a1 1 0 00.03 1.999h.029c.24-.008.482-.006.722-.004h.065c.536.007 1.093.01 1.672-.061 1.022-.127 1.845-.516 2.515-.88a1 1 0 00-.954-1.758z",fill:t.COLORS.iconSecondary}),(0,n.jsx)(e.Path,{d:"M15.364 9.32l-.525.851h.001l.524-.851zm3.824.658l-.03-1h-.014l.044 1zm-4.95-1.565l.672-.742-.671.742zm-.64-.562l-.638.769.002.002.637-.771zm-7.817.353l.693.72h.001l-.694-.72zm-.026 1.414l-.72.693v.002l.72-.695zm1.414.025l-.694-.72h-.002l.696.72zm3.974-.893l.812.582.798-1.112-1.302-.422-.308.952zm-1.013 4.322l.965-.26-.965.26zm1.118 1.99l.791-.61-.002-.003-.79.614zm.008.011l-.792.61.792-.61zm.777 1.469l-.995.098v.002l.995-.1zm-.928 3.249l-.906-.424-.002.004.908.42zm-.253.547l-.908-.42-.004.008.912.412zm.499 1.324l-.413.91.004.002.409-.912zm1.323-.5l-.908-.42-.003.008.91.413zm.243-.524l-.906-.424-.002.004.908.42zm0-.003l-.905-.423.906.424zm1.106-4.292l-.995.1.995-.1zm-1.19-2.5l.79-.611-.79.611zm-.004-.004l.79-.612v-.002l-.79.614zm-.767-1.285l-.966.258.966-.258zm.767-2.718l.672-.74-.825-.75-.656.901.809.589zm.028.024l-.65.761.65-.76zm.039.035l-.69.723.008.009.01.008.672-.74zm1.42 1.129l.524-.852-.523.852zm4.96.952l.042.999h.001l-.043-1zm.955-1.043l-1 .043 1-.043zM7.008 15.17l.123.992h.003l-.126-.992zm1.81-.654l-.477-.88.476.88zm-3.214.7l.012-1h-.008l-.004 1zm-.162-.001l-.005 1 .005-1zm-.704.005l.03 1h.002l-.032-1zm-.97 1.028l1-.028v-.001l-1 .029zm1.029.97v1h.03l-.03-1zm.722-.003l-.008 1h.008v-1zm0 0l.008-1H5.52v1zm.065 0l.012-1h-.004l-.008 1zm1.672-.061l.124.992-.124-.992zm2.515-.88l.478.878-.478-.878zm.402-1.356l-.879.476.001.002.879-.478zm5.199-6.689a3.493 3.493 0 003.49-3.489h-2c0 .82-.67 1.489-1.49 1.489v2zm-3.49-3.489a3.492 3.492 0 003.49 3.489v-2c-.82 0-1.49-.669-1.49-1.489h-2zm3.49-3.491a3.492 3.492 0 00-3.49 3.491h2c0-.822.67-1.491 1.49-1.491v-2zm3.49 3.491a3.493 3.493 0 00-3.49-3.491v2c.82 0 1.49.669 1.49 1.491h2zm-4.022 5.43c1.392.856 3.126.861 4.392.806l-.088-1.998c-1.277.056-2.438-.008-3.257-.511l-1.047 1.704zm-1.273-1.017c.365.33.794.723 1.272 1.017l1.049-1.703c-.292-.18-.581-.437-.978-.797l-1.343 1.483zm-.605-.532c.197.163.392.338.606.532l1.342-1.483c-.208-.188-.436-.395-.675-.591l-1.273 1.542zm-6.487.301c1.78-1.718 4.642-1.833 6.485-.303l1.277-1.539c-2.649-2.2-6.657-2.003-9.15.403l1.388 1.44zm0 .001s-.001-.001 0 0v-.001l-.001.002-1.387-1.442a2 2 0 00-.053 2.828l1.441-1.387zm-.002 0h.002c0-.001 0 0 0 0h-.001v-.002l-1.438 1.391a2 2 0 002.828.048l-1.39-1.437zm4.978-1.126c-1.667-.54-3.64-.164-4.976 1.125l1.388 1.44c.774-.747 1.965-.988 2.971-.662l.617-1.903zm-.356 5.015c-.368-1.376.113-2.439.86-3.48L10.33 8.166c-.89 1.24-1.763 2.937-1.166 5.164l1.931-.518zm.942 1.636c-.426-.548-.775-1.015-.942-1.636l-1.931.517c.283 1.06.882 1.816 1.294 2.346l1.58-1.227zm.01.013l-.008-.01-1.583 1.221.008.01 1.583-1.22zm.98 1.98c-.086-.867-.62-1.514-.98-1.98l-1.583 1.222c.449.582.554.765.573.957l1.99-.198zm-1.017 3.773c.25-.532.534-1.138.737-1.75.204-.614.353-1.307.28-2.024l-1.99.201c.033.324-.028.713-.188 1.192-.16.481-.391.98-.65 1.533l1.811.848zm-.25.542l.252-.547-1.815-.84-.253.548 1.815.84zm.003-.006c.001 0 0 0 0 0v-.002 0l-1.823-.823a2.002 2.002 0 00.998 2.646l.825-1.821zm0 0h.001l-.005-.002-.817 1.825c.262.118.542.177.82.177v-2zm0 0v2a2 2 0 001.822-1.176l-1.822-.825zm.246-.533l-.243.525 1.815.84.243-.525-1.815-.84zm.002-.006v.002l1.812.847v-.002l-1.812-.847zm1.017-3.77c.128 1.272-.404 2.461-1.016 3.77l1.811.847c.574-1.226 1.386-2.911 1.195-4.817l-1.99.2zm-.987-1.987c.514.664.908 1.201.987 1.987l1.99-.2c-.143-1.418-.896-2.365-1.395-3.01l-1.582 1.223zm-.004-.005l.004.005 1.582-1.223-.003-.005-1.583 1.223zm-.941-1.637c.183.682.626 1.231.943 1.639l1.58-1.227c-.378-.486-.533-.71-.592-.93l-1.931.518zm.924-3.566c-.743 1.022-1.31 2.123-.924 3.566l1.931-.518c-.147-.55-.023-1.001.61-1.871L12.02 9.247zm1.486-.147a.403.403 0 00-.005-.004l-1.345 1.48.052.045L13.506 9.1zm.08.071c-.036-.034-.07-.063-.08-.071l-1.298 1.521.007.006.001.001-.01-.01 1.38-1.447zm1.254 1c-.453-.278-.834-.62-1.272-1.017l-1.344 1.481c.423.384.934.85 1.57 1.24l1.046-1.704zm3.619.825c-1.259 0-2.556-.17-3.619-.824l-1.047 1.704c1.533.942 3.276 1.12 4.666 1.12v-2zm.774-.02c-.255.011-.513.02-.774.02v2c.302 0 .592-.01.859-.021l-.085-1.998zm-.001 0l.087 1.999a2 2 0 001.91-2.086l-1.997.087zm-.014.001c-.003 0-.003 0 0 .001a.045.045 0 01.014.008c.004.004.004.006.003.003a.044.044 0 01-.003-.013l1.998-.087c-.05-1.13-1.026-1.942-2.073-1.91l.06 1.998zM7.134 16.163c.88-.111 1.602-.464 2.16-.768l-.954-1.757c-.505.274-.957.478-1.457.54l.25 1.985zm-1.543.053c.482.006 1.017.012 1.54-.053l-.245-1.985c-.369.046-.772.045-1.27.039l-.025 2zm-.153 0h.16l.01-2h-.16l-.01 2zm-.668.004c.213-.006.43-.005.667-.004l.01-2c-.23-.001-.483-.003-.74.005l.063 2zm-.002 0l-.058-1.999a2 2 0 00-1.941 2.057l2-.058zm0 0c-.002 0 0 0 0 0-.001-.001-.001-.001 0 0v.001c0 .001 0 .001 0 0l-2 .055a2 2 0 002 1.944v-2zm.029 0h-.03v2h.03v-2zm.73-.004c-.237-.002-.497-.004-.76.004l.06 2c.219-.008.44-.006.684-.004l.016-2zm-.008 0v2-2zm.073 0h-.065l-.015 2h.065l.015-2zm1.541-.054c-.504.063-.997.06-1.537.055l-.023 2c.532.006 1.151.011 1.807-.07l-.247-1.985zm2.161-.766c-.631.343-1.324.662-2.16.766l.246 1.985c1.207-.15 2.16-.609 2.869-.994l-.955-1.757zm.001 0c0 .002 0 .002 0 0v-.001c0-.001 0-.001 0 0v.001h-.002l.957 1.757a2 2 0 00.802-2.712l-1.757.956zm0 0l1.758-.954a2.001 2.001 0 00-2.712-.805l.953 1.759z",fill:t.COLORS.iconSecondary,mask:"url(#a)"})]})},t4}()),a=r4(),o=s4(),s=J3(),u=c4(),c=h(p4()),d=l();function h(e){return e&&e.__esModule?e:{default:e}}function m(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(m=function(e){return e?n:t})(e)}const p=t.StyleSheet.create({container:{gap:16,flexWrap:"wrap"},text:{...s.FONTS.Poppins.regular_SM,color:s.COLORS.textSecondary,flex:1},row:{flexDirection:"row",gap:8},icon:{alignSelf:"center"}});return V3.default=function({currentBGL:s,hasActivity:l,glucoseUnit:h}){const{t:m}=(0,o.useLanguage)(),f=(0,e.useMemo)(()=>n.CONSTANTS.LEVEL_TWO_HYPOGLYCEMIA_MIN<=s&&s<n.CONSTANTS.LEVEL_TWO_HYPOGLYCEMIA_MAX?m("recommendation_suggestions_remeasure_very_low"):n.CONSTANTS.LEVEL_ONE_HYPOGLYCEMIA_MIN<=s&&s<n.CONSTANTS.LEVEL_ONE_HYPOGLYCEMIA_MAX?m("recommendation_suggestions_remeasure_low"):n.CONSTANTS.SEVERE_HYPOGLYCEMIA_MIN<=s&&s<=n.CONSTANTS.SEVERE_HYPERGLYCEMIA_MAX?m("recommendation_suggestions_measure_ketone"):null,[s,m]),g=(0,e.useMemo)(()=>{if(n.CONSTANTS.LOW_GLUCOSE_MESSAGE_ACTIVITY_MIN<=s&&s<=n.CONSTANTS.LOW_GLUCOSE_MESSAGE_ACTIVITY_MAX){const e=(0,u.formatUnit)(h),t=h===n.BloodGlucoseUnit.MG_DL?(0,u.convertBGLToMGDL)(a.ACTIVITY_POSTPONE_GLUCOSE).toString():a.ACTIVITY_POSTPONE_GLUCOSE.toString();return m("recommendation_suggestions_postpone_activity",{displayUnit:e,value:t})}return n.CONSTANTS.HIGH_GLUCOSE_MESSAGE_ACTIVITY_MIN<=s&&s<=n.CONSTANTS.HIGH_GLUCOSE_MESSAGE_ACTIVITY_MAX?m("recommendation_suggestions_reduce_intensity"):null},[s,h,m]);return(0,d.jsxs)(t.View,{style:p.container,children:[f&&(0,d.jsxs)(t.View,{style:p.row,children:[(0,d.jsx)(i.default,{style:p.icon,testID:"blood-icon"}),(0,d.jsx)(c.default,{style:p.text,testID:"blood-glucose-message",children:f})]}),l&&g&&(0,d.jsxs)(t.View,{style:p.row,children:[(0,d.jsx)(r.default,{style:p.icon,testID:"run-icon"}),(0,d.jsx)(c.default,{style:p.text,testID:"activity-message",children:g})]})]})},V3}var g4,_4={},v4={};var y4,b4={};function w4(){if(y4)return b4;y4=1,Object.defineProperty(b4,"__esModule",{value:!0}),b4.default=void 0,function(e){e&&e.__esModule}(S());var e=z3,t=J3(),n=l();return b4.default=i=>(0,n.jsxs)(e.Svg,{width:24,height:25,viewBox:"0 0 24 25",fill:"none",...i,children:[(0,n.jsx)(e.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M3.99312 4.2711C4.97691 3.21491 6.37794 2.62354 8.03206 2.62354H11.6091C12.0233 2.62354 12.3591 2.95933 12.3591 3.37354C12.3591 3.78775 12.0233 4.12354 11.6091 4.12354H8.03206C6.75004 4.12354 5.76199 4.57281 5.09074 5.29347C4.414 6.02002 4.00391 7.08289 4.00391 8.39968V16.3464C4.00391 17.6647 4.4124 18.7277 5.08783 19.4539C5.75756 20.1739 6.74517 20.6235 8.03206 20.6235H16.467C17.7555 20.6235 18.7433 20.1738 19.4128 19.4539C20.088 18.7278 20.4961 17.6649 20.4961 16.3464V12.7654C20.4961 12.3512 20.8319 12.0154 21.2461 12.0154C21.6603 12.0154 21.9961 12.3512 21.9961 12.7654V16.3464C21.9961 17.9738 21.4886 19.4244 20.5112 20.4754C19.5281 21.5326 18.1263 22.1235 16.467 22.1235H8.03206C6.37405 22.1235 4.97259 21.5324 3.98947 20.4754C3.01204 19.4245 2.50391 17.974 2.50391 16.3464V8.39968C2.50391 6.77158 3.01482 5.32139 3.99312 4.2711Z",fill:i?.color??t.COLORS.iconBrand}),(0,n.jsx)(e.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M17.4779 4.79025L11.947 10.8273C11.6292 11.1844 11.4306 11.6319 11.3786 12.1085L11.2367 13.4178C11.1888 13.8615 11.5777 14.2282 12.0174 14.1548C12.0173 14.1548 12.0175 14.1547 12.0174 14.1548L13.2872 13.9418C13.8024 13.8552 14.2724 13.5962 14.6197 13.2079L14.6257 13.2012L20.1012 7.2259L20.1038 7.2231C20.4768 6.82017 20.4526 6.1918 20.0494 5.81853L18.8817 4.73742C18.8817 4.73738 18.8818 4.73746 18.8817 4.73742C18.4788 4.36513 17.8501 4.38948 17.4779 4.79025ZM16.376 3.77252C17.311 2.76233 18.8891 2.70159 19.8999 3.63592L21.0684 4.71777C21.0683 4.71776 21.0684 4.71779 21.0684 4.71777C22.0786 5.65306 22.1405 7.22926 21.206 8.24047C21.2055 8.24101 21.205 8.24155 21.2045 8.24209L15.7346 14.2114C15.1602 14.8521 14.3846 15.2784 13.5359 15.4211L12.2655 15.6341C10.8457 15.8717 9.59091 14.6883 9.74532 13.2569L9.88736 11.9465C9.97332 11.1584 10.3028 10.4163 10.8313 9.82475L10.8376 9.81777L16.3734 3.77534L16.376 3.77252Z",fill:i?.color??t.COLORS.iconBrand})]}),b4}var S4={},k4={};const C4=i(te);var E4,x4={};var I4,T4,O4,R4={},A4={};function L4(){if(T4)return R4;T4=1,Object.defineProperty(R4,"__esModule",{value:!0}),R4.default=void 0,function(e){e&&e.__esModule}(S());var e=JB,t=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=r(t);if(n&&n.has(e))return n.get(e);var i={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&{}.hasOwnProperty.call(e,o)){var s=a?Object.getOwnPropertyDescriptor(e,o):null;s&&(s.get||s.set)?Object.defineProperty(i,o,s):i[o]=e[o]}return i.default=e,n&&n.set(e,i),i}(function(){if(I4)return A4;I4=1,Object.defineProperty(A4,"__esModule",{value:!0}),A4.default=A4.CheckmarkGradientHeight=void 0,function(e){e&&e.__esModule}(S());var e=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=i(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&{}.hasOwnProperty.call(e,o)){var s=a?Object.getOwnPropertyDescriptor(e,o):null;s&&(s.get||s.set)?Object.defineProperty(r,o,s):r[o]=e[o]}return r.default=e,n&&n.set(e,r),r}(z3),t=J3(),n=l();function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(i=function(e){return e?n:t})(e)}const r=A4.CheckmarkGradientHeight=140;return A4.default=function(i){return(0,n.jsxs)(e.default,{width:141,height:r,viewBox:"0 0 141 140",fill:"none",...i,children:[(0,n.jsx)(e.Path,{d:"M129.8 70.15c0 32.668-26.482 59.15-59.15 59.15S11.5 102.818 11.5 70.15 37.982 11 70.65 11s59.15 26.482 59.15 59.15z",fill:"url(#paint0_linear_24773_68288)"}),(0,n.jsx)(e.Path,{d:"M45.5 72.791l14.955 13.572a1 1 0 001.375-.03L95.5 53",stroke:t.COLORS.bgBackground,strokeWidth:8,strokeLinecap:"round"}),(0,n.jsx)(e.Defs,{children:(0,n.jsxs)(e.LinearGradient,{id:"paint0_linear_24773_68288",x1:11.5,y1:11,x2:145.478,y2:32.7577,gradientUnits:"userSpaceOnUse",children:[(0,n.jsx)(e.Stop,{stopColor:"#A200FF"}),(0,n.jsx)(e.Stop,{offset:1e-4,stopColor:"#A200FF"}),(0,n.jsx)(e.Stop,{offset:1,stopColor:"#FF8600"})]})})]})},A4}()),n=J3(),i=l();function r(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(r=function(e){return e?n:t})(e)}const a=e.StyleSheet.create({container:{position:"absolute",top:0,left:0,right:0,bottom:0},checkmarkContainer:{flex:1,flexGrow:1,alignItems:"center",backgroundColor:n.COLORS.bgBackground}});return R4.default=()=>{const{height:n}=(0,e.useWindowDimensions)();return(0,i.jsx)(e.View,{style:a.container,testID:"backdrop-checkmark",children:(0,i.jsx)(e.View,{style:a.checkmarkContainer,children:(0,i.jsx)(t.default,{style:{marginTop:n/2-t.CheckmarkGradientHeight,opacity:.6},testID:"timeout-modal-checkmark"})})})},R4}function P4(){if(O4)return k4;O4=1,Object.defineProperty(k4,"__esModule",{value:!0}),k4.default=void 0;var e=C4,t=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=c(t);if(n&&n.has(e))return n.get(e);var i={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&{}.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(i,a,o):i[a]=e[a]}return i.default=e,n&&n.set(e,i),i}(S()),n=JB,i=j3,r=J3(),a=u(function(){if(E4)return x4;E4=1,Object.defineProperty(x4,"__esModule",{value:!0}),x4.default=void 0,function(e){e&&e.__esModule}(S());var e=JB,t=J3(),n=l();const i=e.StyleSheet.create({container:{backgroundColor:t.COLORS.borderOverlay,position:"absolute",top:0,left:0,right:0,bottom:0}});return x4.default=()=>(0,n.jsx)(e.View,{style:i.container,testID:"backdrop"}),x4}()),o=u(L4()),s=l();function u(e){return e&&e.__esModule?e:{default:e}}function c(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(c=function(e){return e?n:t})(e)}const d=Math.ceil(n.Dimensions.get("screen").height/100*85);function h({testID:r,isVisible:l,onModalHide:u,onModalShow:c,containerStyle:h,children:p,checkmark:f}){const{bottom:g}=(0,i.useSafeAreaInsets)(),[_,v]=(0,t.useState)(0),[y,b]=(0,t.useState)(!1),w=(0,t.useRef)(new n.Animated.Value(d)).current,S=(0,t.useCallback)(()=>{n.Animated.timing(w,{toValue:0,duration:300,easing:n.Easing.out(n.Easing.cubic),useNativeDriver:"web"!==n.Platform.OS}).start(({finished:e})=>{e&&c&&c()})},[w,c]),k=(0,t.useCallback)(()=>{n.Animated.timing(w,{toValue:_,duration:300,easing:n.Easing.out(n.Easing.cubic),useNativeDriver:"web"!==n.Platform.OS}).start(({finished:e})=>{e&&(b(!1),u&&u())})},[w,_,u]);(0,t.useEffect)(()=>{if(y!==l)return!y&&l?(b(!0),S()):void(y&&!l&&k())},[l,S,k,y]);const C=(0,t.useCallback)(e=>{v(e.nativeEvent.layout.height+g)},[g]);return y?(0,s.jsx)(e.Portal,{children:(0,s.jsxs)(n.View,{style:m.overlay,children:[f?(0,s.jsx)(o.default,{}):(0,s.jsx)(a.default,{}),(0,s.jsx)(n.Animated.View,{testID:r,onLayout:C,style:[m.modal,{transform:[{translateY:w}]},{paddingBottom:g+16},h],children:p})]})}):null}const m=n.StyleSheet.create({modal:{width:"100%",maxHeight:"85%",paddingTop:32,paddingBottom:16,paddingHorizontal:16,borderTopRightRadius:20,borderTopLeftRadius:20,backgroundColor:r.COLORS.bgModal},backdrop:{position:"absolute",left:0,right:0,top:0,bottom:0},overlay:{...n.StyleSheet.absoluteFillObject,backgroundColor:r.COLORS.bgTransparent,justifyContent:"flex-end"}});return k4.default=t.default.memo(h),k4}var M4,D4={},N4={};var F4,B4,j4,V4,H4={};function z4(){if(B4)return D4;B4=1,Object.defineProperty(D4,"__esModule",{value:!0}),D4.default=void 0;var e=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=u(t);if(n&&n.has(e))return n.get(e);var i={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&{}.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(i,a,o):i[a]=e[a]}return i.default=e,n&&n.set(e,i),i}(S()),t=JB,n=s(tj()),i=function(){if(M4)return N4;M4=1,Object.defineProperty(N4,"__esModule",{value:!0}),N4.useDebouncedCallback=function(t,n){const i=(0,e.useRef)(null),r=(0,e.useRef)(t);return(0,e.useEffect)(()=>{r.current=t},[t]),(0,e.useCallback)((...e)=>{i.current&&clearTimeout(i.current),i.current=setTimeout(()=>{r.current(...e)},n)},[n])};var e=S();return N4}(),r=J3(),a=s(function(){if(F4)return H4;F4=1,Object.defineProperty(H4,"__esModule",{value:!0}),H4.default=void 0;var e=function(e){return e&&e.__esModule?e:{default:e}}(S()),t=JB,n=J3(),i=l();function r({type:e,height:n,option:r,index:o,onItemPress:s}){return(0,i.jsx)(t.Pressable,{onPress:s,testID:`${e}-wheel-picker-item-`+o,children:(0,i.jsx)(t.Animated.View,{style:[a.option,{height:n}],children:(0,i.jsx)(t.Text,{style:a.itemTextStyle,children:r})})})}H4.default=e.default.memo(r);const a=t.StyleSheet.create({option:{alignItems:"center",justifyContent:"center",zIndex:100},itemTextStyle:{fontSize:22,lineHeight:26,fontWeight:"400",color:n.COLORS.text}});return H4}()),o=l();function s(e){return e&&e.__esModule?e:{default:e}}function u(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(u=function(e){return e?n:t})(e)}D4.default=function({type:s,initialScrollIndex:l,selectedIndex:u,options:d,onChange:h,visibleRest:m=3,decelerationRate:p="normal"}){const{width:f}=(0,t.useWindowDimensions)(),g=35,_=g*m,v=(0,e.useRef)(null),y=(0,e.useMemo)(()=>new t.Animated.Value(0),[]),b=(1+2*m)*g,w=(0,e.useMemo)(()=>{const e=[...d];for(let t=0;t<m;t++)e.unshift(null),e.push(null);return e},[d,m]),S=(0,e.useMemo)(()=>[...Array(w.length)].map((e,t)=>t*g),[w,g]),k=(0,e.useCallback)(e=>{const t=Math.min(g*(d.length-1),Math.max(e.nativeEvent.contentOffset.y,0));let n=Math.floor(Math.floor(t)/g);Math.floor(t%g)>17.5&&n++,n!==u&&h(n)},[d.length,u,h]),C=(0,e.useCallback)(e=>{const t=Math.round(Math.round(e.nativeEvent.contentOffset.y)/g),n=Math.min(d.length-1,Math.max(t,0));n!==u&&h(n),v.current?.scrollToIndex({index:n,animated:!0})},[h,u,d.length]),E=(0,i.useDebouncedCallback)(C,100),x=(0,e.useCallback)(e=>{h(e),v.current?.scrollToIndex({index:e,animated:!0})},[h]);return(0,o.jsxs)(t.View,{style:[c.containerPicker,{height:b}],testID:`${s}-wheel-picker`,children:[(0,o.jsx)(t.View,{style:[c.selectedIndicator,{transform:[{translateY:-17.5}],height:g,width:f-32-20}]}),(0,o.jsx)(t.Animated.FlatList,{testID:`${s}-wheel-picker-list`,ref:v,style:c.scrollView,showsVerticalScrollIndicator:!1,onScroll:t.Animated.event([{nativeEvent:{contentOffset:{y:y}}}],{useNativeDriver:"web"!==t.Platform.OS,listener:"web"===t.Platform.OS?E:void 0}),onMomentumScrollEnd:k,snapToInterval:g,snapToOffsets:S,decelerationRate:p,initialScrollIndex:l,getItemLayout:(e,t)=>({length:g,offset:g*t,index:t}),data:w,keyExtractor:(e,t)=>t.toString(),renderItem:({item:e,index:t})=>(0,o.jsx)(a.default,{type:s,index:t,option:e,height:g,onItemPress:()=>x(Math.max(0,Math.min(t-m,d.length-1)))},e)}),(0,o.jsx)(n.default,{colors:[r.COLORS.iosBg2,r.COLORS.dropshadow100],style:[c.mask,{top:0,height:_}]}),(0,o.jsx)(n.default,{colors:[r.COLORS.dropshadow100,r.COLORS.iosBg2],style:[c.mask,{bottom:0,height:_}]})]})};const c=t.StyleSheet.create({containerPicker:{borderTopLeftRadius:13,borderTopRightRadius:13,backgroundColor:r.COLORS.iosBg2,overflow:"hidden"},selectedIndicator:{position:"absolute",backgroundColor:r.COLORS.iosHighlight,borderRadius:7,top:"50%",alignSelf:"center"},scrollView:{overflow:"hidden",flex:1},mask:{position:"absolute",left:0,right:0,pointerEvents:"none"}});return D4}function U4(){if(j4)return S4;j4=1,Object.defineProperty(S4,"__esModule",{value:!0}),S4.default=void 0;var e=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=c(t);if(n&&n.has(e))return n.get(e);var i={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&{}.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(i,a,o):i[a]=e[a]}return i.default=e,n&&n.set(e,i),i}(S()),t=JB,n=s4(),i=J3(),r=u(P4()),a=u(p4()),o=u(z4()),s=l();function u(e){return e&&e.__esModule?e:{default:e}}function c(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(c=function(e){return e?n:t})(e)}const d=i=>{const{isVisible:l,items:u,initialScrollIndex:c,type:d,onCancel:m,onConfirm:p,onDismiss:f}=i,{t:g}=(0,n.useLanguage)(),[_,v]=(0,e.useState)(c),y=(0,e.useCallback)(e=>{v(e)},[]),b=(0,e.useCallback)(()=>{p(parseFloat(u[_]))},[u,_,p]),w=(0,e.useCallback)(()=>{v(c),m()},[c,m]);return(0,s.jsx)(r.default,{isVisible:l,onModalHide:f,containerStyle:h.contentContainerModal,children:(0,s.jsxs)(t.View,{testID:`${d}-wheelpicker-modal`,children:[(0,s.jsx)(o.default,{type:d,selectedIndex:_,initialScrollIndex:c,options:u,onChange:y}),(0,s.jsxs)(t.View,{style:h.buttonContainer,children:[(0,s.jsx)(t.Pressable,{style:h.confirmButton,children:(0,s.jsx)(t.TouchableOpacity,{onPress:b,testID:`${d}-wheel-picker-modal-confirm-button`,accessibilityRole:"button",children:(0,s.jsx)(a.default,{style:h.buttonText,children:g("button_confirm")})})}),(0,s.jsx)(t.Pressable,{style:h.cancelButton,children:(0,s.jsx)(t.TouchableOpacity,{onPress:w,testID:`${d}-wheel-picker-modal-cancel-button`,accessibilityRole:"button",children:(0,s.jsx)(a.default,{style:h.cancelText,children:g("button_cancel")})})})]})]})})};S4.default=(0,e.memo)(d);const h=t.StyleSheet.create({buttonContainer:{gap:8},contentContainerModal:{backgroundColor:i.COLORS.bgTransparent},buttonText:{fontSize:17,lineHeight:22,fontWeight:"400",paddingHorizontal:16,paddingVertical:14,textAlign:"center",color:i.COLORS.textKeyboardButtons},cancelButton:{backgroundColor:i.COLORS.iosBg2,borderRadius:13},cancelText:{fontSize:17,lineHeight:22,fontWeight:"600",paddingHorizontal:16,paddingVertical:14,textAlign:"center",color:i.COLORS.textKeyboardButtons},confirmButton:{backgroundColor:i.COLORS.iosBg2,borderBottomLeftRadius:13,borderBottomRightRadius:13}});return S4}function G4(){if(V4)return _4;V4=1,Object.defineProperty(_4,"__esModule",{value:!0}),_4.default=void 0;var e=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=p(t);if(n&&n.has(e))return n.get(e);var i={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&{}.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(i,a,o):i[a]=e[a]}return i.default=e,n&&n.set(e,i),i}(S()),t=JB,n=m(tj()),i=m(function(){if(g4)return v4;g4=1,Object.defineProperty(v4,"__esModule",{value:!0}),v4.default=void 0,function(e){e&&e.__esModule}(S());var e=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=i(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&{}.hasOwnProperty.call(e,o)){var s=a?Object.getOwnPropertyDescriptor(e,o):null;s&&(s.get||s.set)?Object.defineProperty(r,o,s):r[o]=e[o]}return r.default=e,n&&n.set(e,r),r}(z3),t=J3(),n=l();function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(i=function(e){return e?n:t})(e)}return v4.default=function(i){return(0,n.jsx)(e.default,{width:42,height:42,viewBox:"0 0 42 42",fill:"none",...i,children:(0,n.jsx)(e.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M14.075 5.202a1.313 1.313 0 011.539-1.04c2.41.468 4.109 1.686 5.178 3.328.874 1.34 1.283 2.895 1.394 4.422a15.383 15.383 0 002.662-.475c1.134-.306 3.85-.727 6.424.425 2.686 1.202 4.946 3.988 5.289 9.548a.988.988 0 01.002.051c.043 5.242-1.626 9.2-3.54 11.88-.955 1.336-1.972 2.359-2.874 3.067a8.58 8.58 0 01-1.27.842c-.347.183-.72.336-1.074.389-1.64.386-3.142.11-4.34-.222-.369-.102-.751-.222-1.087-.327-.188-.06-.361-.114-.509-.158-.473-.141-.768-.202-.961-.202-.203 0-.504.059-.972.19-.152.043-.336.098-.535.158-.328.097-.7.208-1.049.301-1.194.317-2.684.588-4.327.262-.359-.052-.74-.209-1.097-.398-.39-.206-.82-.49-1.271-.844-.903-.709-1.92-1.73-2.873-3.066-1.911-2.678-3.575-6.63-3.533-11.872 0-.017 0-.034.002-.051.343-5.56 2.603-8.346 5.29-9.548 2.574-1.152 5.29-.731 6.423-.425.863.232 1.725.388 2.586.468-.106-1.119-.415-2.148-.96-2.982-.663-1.02-1.735-1.845-3.478-2.183a1.312 1.312 0 01-1.039-1.538zm.98 12.966a1.313 1.313 0 00-1.126-2.371c-1.911.908-3.296 2.796-3.584 4.894a1.312 1.312 0 102.6.358 3.85 3.85 0 012.11-2.881z",fill:t.COLORS.iconOnBrand})})},v4}()),r=m(w4()),a=r4(),o=s4(),s=J3(),u=c4(),c=m(p4()),d=m(U4()),h=l();function m(e){return e&&e.__esModule?e:{default:e}}function p(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(p=function(e){return e?n:t})(e)}const f=(0,u.createSequentialArrayInteger)(a.CARBOHYDRATES_LIMITS.min,a.CARBOHYDRATES_LIMITS.max);_4.default=function({carbsRecommendation:a,editedCarbsRecommendation:l,onDismiss:u,onConfirm:m}){const{t:p}=(0,o.useLanguage)(),[_,v]=(0,e.useState)(!1),y=(0,e.useCallback)(()=>{v(!1)},[]),b=(0,e.useCallback)(()=>{v(!0)},[]),w=(0,e.useCallback)(e=>{v(!1),m(e)},[m]),S=(0,e.useCallback)(()=>{if(null!==l)return f.findIndex(e=>e===l.toString());const e=Math.round(a);return f.findIndex(t=>t===e.toString())},[l,a]);return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(n.default,{colors:s.COLORS.gradientRecCarbohydrates,useAngle:!0,angle:270,style:g.card,testID:"carbs-recommendation-display",children:(0,h.jsxs)(t.View,{style:g.row,children:[(0,h.jsx)(i.default,{}),(0,h.jsxs)(t.View,{style:g.body,children:[(0,h.jsxs)(t.View,{style:g.valueRow,children:[(0,h.jsx)(c.default,{style:g.label,children:p("recommendation_carb_eat")}),null!==l?(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(c.default,{style:g.valueEdited,children:` ${a} g`}),(0,h.jsx)(c.default,{style:g.valueBold,children:` ${l} g`})]}):(0,h.jsx)(c.default,{style:g.valueBold,children:` ${a} g`})]}),(0,h.jsx)(c.default,{style:g.subtitle,children:p("recommendation_carb_title")})]}),(0,h.jsx)(t.TouchableOpacity,{onPress:b,testID:"carbohydrates-edit-button",hitSlop:10,style:g.editButton,children:(0,h.jsx)(r.default,{style:g.editIcon,color:s.COLORS.iconOnToast})})]})}),(0,h.jsx)(d.default,{type:"carbohydrates",items:f,isVisible:_,initialScrollIndex:S(),onConfirm:w,onCancel:y,onDismiss:u})]})};const g=t.StyleSheet.create({card:{borderRadius:16,marginBottom:32},row:{flexDirection:"row",justifyContent:"center",alignItems:"center",padding:24,gap:12},body:{flex:1},valueRow:{flexDirection:"row",alignItems:"center"},label:{...s.FONTS.Poppins.medium_LG,color:s.COLORS.textOnRecommendation},valueBold:{...s.FONTS.Poppins.bold_LG,color:s.COLORS.textOnRecommendation},subtitle:{...s.FONTS.Poppins.medium_SM,color:s.COLORS.textOnRecommendation,lineHeight:23},valueEdited:{...s.FONTS.Poppins.medium_Base,textDecorationLine:"line-through",opacity:.4},editIcon:{marginLeft:4},editButton:{alignSelf:"flex-start"}});return _4}var W4,Y4={};var $4,X4={},q4={};var Z4,K4={};var Q4,J4,e9={};function t9(){if(J4)return X4;J4=1,Object.defineProperty(X4,"__esModule",{value:!0}),X4.styles=X4.default=void 0;var e=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=h(t);if(n&&n.has(e))return n.get(e);var i={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&{}.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(i,a,o):i[a]=e[a]}return i.default=e,n&&n.set(e,i),i}(S()),t=JB,n=d(function(){if($4)return q4;$4=1,Object.defineProperty(q4,"__esModule",{value:!0}),q4.default=void 0,function(e){e&&e.__esModule}(S());var e=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=i(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&{}.hasOwnProperty.call(e,o)){var s=a?Object.getOwnPropertyDescriptor(e,o):null;s&&(s.get||s.set)?Object.defineProperty(r,o,s):r[o]=e[o]}return r.default=e,n&&n.set(e,r),r}(z3),t=J3(),n=l();function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(i=function(e){return e?n:t})(e)}return q4.default=function(i){return(0,n.jsx)(e.default,{width:21,height:20,viewBox:"0 0 21 20",...i,children:(0,n.jsx)(e.Path,{d:"M4.022 6.839a.692.692 0 01.84-.057l.073.057 5.565 5.074 5.565-5.074a.693.693 0 01.84-.057l.073.057a.55.55 0 01.062.766l-.062.066-6.022 5.49a.692.692 0 01-.84.057l-.072-.057-6.022-5.49a.552.552 0 010-.832z",fill:t.COLORS.iconBrand})})},q4}()),i=d(function(){if(Z4)return K4;Z4=1,Object.defineProperty(K4,"__esModule",{value:!0}),K4.default=void 0,function(e){e&&e.__esModule}(S());var e=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=i(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&{}.hasOwnProperty.call(e,o)){var s=a?Object.getOwnPropertyDescriptor(e,o):null;s&&(s.get||s.set)?Object.defineProperty(r,o,s):r[o]=e[o]}return r.default=e,n&&n.set(e,r),r}(z3),t=J3(),n=l();function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(i=function(e){return e?n:t})(e)}return K4.default=function(i){return(0,n.jsx)(e.default,{width:21,height:20,viewBox:"0 0 21 20",fill:"none",...i,children:(0,n.jsx)(e.Path,{d:"M16.984 13.15a.625.625 0 01-.814.061l-.07-.06-5.392-5.392-5.391 5.391a.625.625 0 01-.814.061l-.07-.06a.625.625 0 01-.06-.814l.06-.07 5.834-5.834a.625.625 0 01.813-.06l.07.06 5.834 5.834a.625.625 0 010 .883z",fill:t.COLORS.iconBrand})})},K4}()),r=s4(),a=J3(),o=c4(),s=d(p4()),u=d(function(){if(Q4)return e9;Q4=1,Object.defineProperty(e9,"__esModule",{value:!0}),e9.styles=e9.default=void 0,r(S());var e=JB,t=J3(),n=r(p4()),i=l();function r(e){return e&&e.__esModule?e:{default:e}}e9.default=function({title:t,value:r,unit:o,hasSeparator:s,testID:l}){return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(e.View,{style:a.itemContainer,testID:l,children:[(0,i.jsx)(e.View,{style:a.itemTitleContainer,children:(0,i.jsx)(n.default,{style:a.itemText,testID:l+"-title",children:t})}),(0,i.jsxs)(e.View,{style:a.row,children:[(0,i.jsx)(n.default,{style:a.itemText,testID:l+"-value",children:r}),!!o&&(0,i.jsx)(e.View,{style:a.row,children:(0,i.jsx)(n.default,{style:a.itemText,testID:l+"-unit",children:" "+o})})]})]}),s&&(0,i.jsx)(e.View,{style:a.divider,testID:l+"-divider"})]})};const a=e9.styles=e.StyleSheet.create({itemContainer:{flex:1,flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingVertical:14,paddingHorizontal:16,gap:8},itemTitleContainer:{alignSelf:"flex-start"},itemText:{...t.FONTS.Poppins.regular_Base,color:t.COLORS.textSecondary,textAlign:"right"},divider:{height:1,backgroundColor:t.COLORS.borderDivider},row:{flexDirection:"row",flexShrink:1,justifyContent:"flex-end"}});return e9}()),c=l();function d(e){return e&&e.__esModule?e:{default:e}}function h(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(h=function(e){return e?n:t})(e)}X4.default=function({carbIntakeValue:a,activeInsulin:l,currentBGL:d,bloodGlucoseUnit:h,activity:p,trackExpandDetails:f}){const{t:g}=(0,r.useLanguage)(),[_,v]=(0,e.useState)(!1),y=(0,e.useMemo)(()=>({light:g("activity_intensity_1"),moderate:g("activity_intensity_2"),hard:g("activity_intensity_3")}),[g]),b=(0,e.useCallback)(()=>{t.LayoutAnimation.configureNext(t.LayoutAnimation.Presets.easeInEaseOut),v(e=>{const t=!e;return t&&f(),t})},[f]),w=(0,e.useMemo)(()=>{if(!p)return"";const{activityDuration:e,activityIntensity:t,activityReduction:n}=p,i=n?Math.round(100*n):0;return`${e>=0&&e<=29?"0-29 min":e>29&&e<=45?"30-45 min":"46-60 min"}. ${t?`${y[t]},`:""} ${`${i}% ${g("recommendation_reduction")}`}`},[y,p,g]),S=(0,e.useMemo)(()=>[{title:g("recommendation_summary_active_insulin_title"),value:l,unit:g(1===l?"unit":"units"),testID:"active-insulin-item"},{title:g("Glucose"),value:(0,o.displayedBGLValue)(d,h),unit:(0,o.formatUnit)(h),testID:"blood-glucose-item"},{title:g("recommendation_carbohydrates_title"),value:a||"-",unit:a?g(1===a?"gram":"grams"):void 0,testID:"carbs-item"},void 0!==p&&{title:g("recommendation_activity_title"),value:w,testID:"activity-item"}].filter(e=>e),[g,l,d,h,a,p,w]);return(0,c.jsxs)(t.View,{style:m.container,children:[(0,c.jsxs)(t.TouchableOpacity,{style:m.clickableContainer,onPress:b,hitSlop:10,children:[(0,c.jsx)(s.default,{style:m.title,children:g("recommendation_card_cal_details_title")}),(0,c.jsx)(t.View,{style:m.expandButton,testID:"chevron-"+_,children:_?(0,c.jsx)(i.default,{style:m.chevron}):(0,c.jsx)(n.default,{style:m.chevron})})]}),_&&(0,c.jsx)(t.View,{children:S.map(({title:e,unit:t,value:n,testID:i},r,a)=>(0,c.jsx)(u.default,{testID:i,title:e,value:n,unit:t,hasSeparator:r!==a.length-1},e))})]})};const m=X4.styles=t.StyleSheet.create({container:{padding:16,gap:16},clickableContainer:{flexDirection:"row",justifyContent:"center"},expandButton:{justifyContent:"center",alignItems:"center"},chevron:{alignSelf:"center",marginLeft:4},title:{...a.FONTS.Poppins.regular_SM,color:a.COLORS.textSecondary,textAlign:"center"}});return X4}var n9,i9={};var r9={};const a9=i(ZV),o9={nm:"Comp 1",ddd:0,h:64,w:364,meta:{g:"@lottiefiles/toolkit-js 0.33.2"},layers:[{ty:4,nm:"Shape Layer 1",sr:1,st:0,op:601,ip:0,hd:!1,ddd:0,bm:0,hasMask:!1,ao:0,ks:{a:{a:0,k:[0,0],ix:2},s:{a:0,k:[30.33,7.11],ix:2},sk:{a:0,k:0},p:{a:0,k:[0,0],ix:2},r:{a:0,k:0,ix:2},sa:{a:0,k:0},o:{a:0,k:100,ix:2}},ef:[],shapes:[{ty:"gr",bm:0,hd:!1,nm:"",it:[{ty:"rc",bm:0,hd:!1,nm:"",d:1,p:{a:0,k:[0,0],ix:2},r:{a:0,k:0,ix:2},s:{a:0,k:[1200,900],ix:2}},{ty:"gf",bm:0,hd:!1,mn:"ADBE Vector Graphic - G-Fill",nm:"Gradient Fill 1",e:{a:0,k:[600,7.289215087890625],ix:2},g:{p:2,k:{a:1,k:[{o:{x:.4,y:0},i:{x:.8,y:1},s:[0,0,.42745098039215684,.6666666666666666,1,.4588235294117647,.8941176470588236,.7019607843137254],t:0},{o:{x:.4,y:0},i:{x:.8,y:1},s:[0,.054901960784313725,.4745098039215686,.6980392156862745,.6638605291193181,.2627450980392157,.6666666666666666,.5450980392156862],t:200},{o:{x:.4,y:0},i:{x:.8,y:1},s:[0,.054901960784313725,.4745098039215686,.6980392156862745,.8369723566228694,.2627450980392157,.6666666666666666,.5450980392156862],t:400},{s:[0,0,.42745098039215684,.6666666666666666,1,.4588235294117647,.8941176470588236,.7019607843137254],t:600}],ix:2}},t:1,a:{a:0,k:0},h:{a:0,k:0},s:{a:0,k:[-608.3176879882812,0],ix:2},r:1,o:{a:0,k:100,ix:2}},{ty:"tm",bm:0,hd:!1,nm:"",e:{a:0,k:100,ix:2},o:{a:0,k:0,ix:2},s:{a:0,k:0,ix:2},m:1},{ty:"tr",a:{a:0,k:[0,0],ix:2},s:{a:0,k:[100,100],ix:2},sk:{a:0,k:0,ix:2},p:{a:0,k:[600,450],ix:2},r:{a:0,k:0,ix:2},sa:{a:0,k:0,ix:2},o:{a:0,k:100,ix:2}}]}],ind:1}],v:"5.7.5",fr:100,op:600,ip:0,assets:[]},s9={nm:"Comp 1",ddd:0,h:64,w:364,meta:{g:"@lottiefiles/toolkit-js 0.33.2"},layers:[{ty:4,nm:"Shape Layer 1",sr:1,st:0,op:601,ip:0,hd:!1,ddd:0,bm:0,hasMask:!1,ao:0,ks:{a:{a:0,k:[0,0],ix:2},s:{a:0,k:[30.33,7.11],ix:2},sk:{a:0,k:0},p:{a:0,k:[0,0],ix:2},r:{a:0,k:0,ix:2},sa:{a:0,k:0},o:{a:0,k:100,ix:2}},ef:[],shapes:[{ty:"gr",bm:0,hd:!1,nm:"",it:[{ty:"sh",bm:0,hd:!1,nm:"",d:1,ks:{a:0,k:{c:!1,i:[[0,0],[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0],[0,0]],v:[[-600.000021186202,-449.9999888573779],[600.000021186202,-449.9999888573779],[600.000021186202,449.9999888573779],[-600.000021186202,449.9999888573779],[-600.000021186202,-449.9999888573779]]}}},{ty:"gf",bm:0,hd:!1,mn:"ADBE Vector Graphic - G-Fill",nm:"Gradient Fill 1",e:{a:0,k:[606.9923706054688,0],ix:2},g:{p:3,k:{a:1,k:[{o:{x:.167,y:.167},i:{x:.833,y:.833},s:[0,.5372549019607843,.11764705882352941,.596078431372549,.17592637605001588,.5725490196078431,.16862745098039217,.5058823529411764,.865995362363706,.6901960784313725,.3333333333333333,.2,0,1,.17592637605001588,.9880573993718839,.865995362363706,1],t:0},{o:{x:.167,y:.167},i:{x:.833,y:.833},s:[0,.49019607843137253,.054901960784313725,.7137254901960784,.41551957563920455,.49019607843137253,.054901960784313725,.7137254901960784,1,.6980392156862745,.3411764705882353,.18823529411764706,0,1,.41551957563920455,.9880573993718839,1,1],t:100},{o:{x:.167,y:.167},i:{x:.833,y:.833},s:[0,.4980392156862745,.06274509803921569,.6941176470588235,.7601806640625,.49019607843137253,.054901960784313725,.7137254901960784,.9799886407796468,.5529411764705883,.1411764705882353,.5529411764705883,0,1,.7601806640625,.9880573993718839,.9799886407796468,1],t:200},{o:{x:.167,y:.167},i:{x:.833,y:.833},s:[0,.7372549019607844,.396078431372549,.08627450980392157,.10764936967329546,.7372549019607844,.396078431372549,.08627450980392157,.3060213955965909,.6313725490196078,.25098039215686274,.35294117647058826,0,.9880573993718839,.10764936967329546,1,.3060213955965909,1],t:300},{o:{x:.167,y:.167},i:{x:.833,y:.833},s:[0,.6313725490196078,.24705882352941178,.3568627450980392,.2374200994318182,.7372549019607844,.396078431372549,.08627450980392157,1,.6313725490196078,.24705882352941178,.3568627450980392,0,1,.2374200994318182,.9880573993718839,1,1],t:400},{o:{x:.167,y:.167},i:{x:.833,y:.833},s:[0,.49019607843137253,.054901960784313725,.7137254901960784,.6711636629971591,.7372549019607844,.396078431372549,.08627450980392157,.9628360471622012,.7372549019607844,.396078431372549,.08627450980392157,0,1,.6711636629971591,.9880573993718839,.9628360471622012,1],t:500},{s:[0,.5372549019607843,.11764705882352941,.596078431372549,.17398613618369482,.5686274509803921,.16470588235294117,.5137254901960784,.8699261650677039,.6901960784313725,.3333333333333333,.2,0,1,.17398613618369482,.9880573993718839,.8699261650677039,1],t:600}],ix:2}},t:1,a:{a:0,k:0},h:{a:0,k:0},s:{a:0,k:[-600,0],ix:2},r:1,o:{a:0,k:100,ix:2}},{ty:"tm",bm:0,hd:!1,nm:"",e:{a:0,k:100,ix:2},o:{a:0,k:0,ix:2},s:{a:0,k:0,ix:2},m:1},{ty:"tr",a:{a:0,k:[0,0],ix:2},s:{a:0,k:[100,100],ix:2},sk:{a:0,k:0,ix:2},p:{a:0,k:[600.0000351333254,450.0000136337806],ix:2},r:{a:0,k:0,ix:2},sa:{a:0,k:0,ix:2},o:{a:0,k:100,ix:2}}]}],ind:1}],v:"5.7.5",fr:100,op:600,ip:0,assets:[]};var l9;var u9,c9={};var d9,h9,m9={},p9={};function f9(){if(d9)return p9;d9=1,Object.defineProperty(p9,"__esModule",{value:!0}),p9.styles=void 0;var e=JB,t=J3();return p9.styles=e.StyleSheet.create({backgroundStyle:{backgroundColor:t.COLORS.bgModal},containerStyle:{opacity:.5},handleIndicatorStyle:{display:"none"},title:{...t.FONTS.Poppins.semiBold_LG,color:t.COLORS.text,textAlign:"center",marginBottom:8},container:{backgroundColor:t.COLORS.bgModal,paddingHorizontal:16,paddingTop:16},message:{color:t.COLORS.textSecondary,textAlign:"center",marginBottom:32},buttonContainer:{gap:16},button:{paddingHorizontal:16,paddingVertical:12,backgroundColor:t.COLORS.bgBrand,borderColor:t.COLORS.borderOnBrand,borderRadius:16,borderWidth:1},buttonText:{...t.FONTS.Poppins.semiBold_Base,color:t.COLORS.text,textAlign:"center"},cancelButton:{paddingHorizontal:16,paddingVertical:12,backgroundColor:t.COLORS.bgButtonSecondary,borderRadius:16},deleteRedButton:{paddingHorizontal:16,paddingVertical:12,backgroundColor:t.COLORS.bgDanger,borderRadius:16},deleteFailureCloseButton:{paddingHorizontal:16,paddingVertical:12,backgroundColor:t.COLORS.bgBrand,borderRadius:16},saveButton:{paddingHorizontal:16,paddingVertical:12,backgroundColor:t.COLORS.bgBrand,borderRadius:16},saveText:{...t.FONTS.Poppins.semiBold_Base,textAlign:"center",color:t.COLORS.text},closeText:{...t.FONTS.Poppins.semiBold_Base,textAlign:"center",color:t.COLORS.text}}),p9}var g9,_9={};var v9,y9={};var b9,w9={};var S9,k9={};var C9,E9={};var x9,I9,T9={},O9={};function R9(){if(I9)return T9;I9=1,Object.defineProperty(T9,"__esModule",{value:!0}),T9.default=void 0;var e=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=s(t);if(n&&n.has(e))return n.get(e);var i={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&{}.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(i,a,o):i[a]=e[a]}return i.default=e,n&&n.set(e,i),i}(S()),t=JB,n=o(tj()),i=o(function(){if(x9)return O9;x9=1,Object.defineProperty(O9,"__esModule",{value:!0}),O9.default=void 0,function(e){e&&e.__esModule}(S());var e=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=i(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&{}.hasOwnProperty.call(e,o)){var s=a?Object.getOwnPropertyDescriptor(e,o):null;s&&(s.get||s.set)?Object.defineProperty(r,o,s):r[o]=e[o]}return r.default=e,n&&n.set(e,r),r}(z3),t=J3(),n=l();function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(i=function(e){return e?n:t})(e)}return O9.default=function(i){return(0,n.jsxs)(e.default,{width:40,height:40,viewBox:"0 0 40 40",fill:"none",...i,children:[(0,n.jsx)(e.Rect,{width:40,height:40,rx:20,fill:t.COLORS.bgIcon}),(0,n.jsx)(e.Path,{d:"M13.544 16.745l-.014-.01-.015-.01a1.33 1.33 0 00-1.625.112 1.162 1.162 0 000 1.738l7.226 6.588.013.012.014.011.087.069.014.01.015.01a1.33 1.33 0 001.625-.112l7.226-6.588.014-.013.012-.013.075-.08.013-.013.012-.015a1.16 1.16 0 00-.126-1.604l-.013-.012-.015-.011-.086-.069-.014-.01-.015-.01a1.33 1.33 0 00-1.625.112L20 22.62l-6.341-5.782-.014-.012-.014-.011-.087-.069z",fill:t.COLORS.icon,stroke:t.COLORS.iconBrand})]})},O9}()),r=J3(),a=l();function o(e){return e&&e.__esModule?e:{default:e}}function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(s=function(e){return e?n:t})(e)}const u=t.StyleSheet.create({scrollToEndButton:{position:"absolute",bottom:80,alignSelf:"center"},arrowContainer:{backgroundColor:r.COLORS.bgBackground,borderRadius:24},gradient:{position:"absolute",left:0,right:0,bottom:0,height:145},linearGradient:{flex:1}});return T9.default=function({scrollToEnd:o,isVisibleArrow:s,isVisibleBlur:l}){const c=(0,e.useRef)(new t.Animated.Value(155)).current,d=(0,e.useRef)(new t.Animated.Value(l?1:0)).current;return(0,e.useEffect)(()=>{t.Animated.timing(d,{toValue:l?1:0,duration:400,useNativeDriver:!0}).start()},[l,d]),(0,e.useEffect)(()=>{s&&t.Animated.spring(c,{toValue:0,damping:10,stiffness:100,mass:1,useNativeDriver:!0}).start()},[s,c]),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(t.Pressable,{style:u.scrollToEndButton,testID:"scroll-hint-arrow",children:s&&(0,a.jsx)(t.Animated.View,{style:[u.arrowContainer,{transform:[{translateY:c}]}],children:(0,a.jsx)(t.TouchableOpacity,{testID:"scroll-hint-arrow-button",onPress:o,children:(0,a.jsx)(i.default,{})})})}),(0,a.jsx)(t.Animated.View,{style:[u.gradient,{opacity:d}],pointerEvents:"none",testID:"scroll-hint-blur",children:(0,a.jsx)(n.default,{colors:r.COLORS.gradientButtonBox,style:u.linearGradient})})]})},T9}var A9,L9,P9,M9,D9={},N9={},F9={},B9={},j9={},V9={},H9={};function z9(){return A9||(A9=1,function(e){var t,n,i;Object.defineProperty(e,"__esModule",{value:!0}),e.getParsedType=e.ZodParsedType=e.objectUtil=e.util=void 0,(n=t||(e.util=t={})).assertEqual=e=>{},n.assertIs=function(e){},n.assertNever=function(e){throw new Error},n.arrayToEnum=e=>{const t={};for(const n of e)t[n]=n;return t},n.getValidEnumValues=e=>{const t=n.objectKeys(e).filter(t=>"number"!=typeof e[e[t]]),i={};for(const n of t)i[n]=e[n];return n.objectValues(i)},n.objectValues=e=>n.objectKeys(e).map(function(t){return e[t]}),n.objectKeys="function"==typeof Object.keys?e=>Object.keys(e):e=>{const t=[];for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t},n.find=(e,t)=>{for(const n of e)if(t(n))return n},n.isInteger="function"==typeof Number.isInteger?e=>Number.isInteger(e):e=>"number"==typeof e&&Number.isFinite(e)&&Math.floor(e)===e,n.joinValues=function(e,t=" | "){return e.map(e=>"string"==typeof e?`'${e}'`:e).join(t)},n.jsonStringifyReplacer=(e,t)=>"bigint"==typeof t?t.toString():t,(i||(e.objectUtil=i={})).mergeShapes=(e,t)=>({...e,...t}),e.ZodParsedType=t.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]);e.getParsedType=t=>{switch(typeof t){case"undefined":return e.ZodParsedType.undefined;case"string":return e.ZodParsedType.string;case"number":return Number.isNaN(t)?e.ZodParsedType.nan:e.ZodParsedType.number;case"boolean":return e.ZodParsedType.boolean;case"function":return e.ZodParsedType.function;case"bigint":return e.ZodParsedType.bigint;case"symbol":return e.ZodParsedType.symbol;case"object":return Array.isArray(t)?e.ZodParsedType.array:null===t?e.ZodParsedType.null:t.then&&"function"==typeof t.then&&t.catch&&"function"==typeof t.catch?e.ZodParsedType.promise:"undefined"!=typeof Map&&t instanceof Map?e.ZodParsedType.map:"undefined"!=typeof Set&&t instanceof Set?e.ZodParsedType.set:"undefined"!=typeof Date&&t instanceof Date?e.ZodParsedType.date:e.ZodParsedType.object;default:return e.ZodParsedType.unknown}}}(H9)),H9}function U9(){if(L9)return V9;L9=1,Object.defineProperty(V9,"__esModule",{value:!0}),V9.ZodError=V9.quotelessJson=V9.ZodIssueCode=void 0;const e=z9();V9.ZodIssueCode=e.util.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);V9.quotelessJson=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");let t=class t extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}format(e){const t=e||function(e){return e.message},n={_errors:[]},i=e=>{for(const r of e.issues)if("invalid_union"===r.code)r.unionErrors.map(i);else if("invalid_return_type"===r.code)i(r.returnTypeError);else if("invalid_arguments"===r.code)i(r.argumentsError);else if(0===r.path.length)n._errors.push(t(r));else{let e=n,i=0;for(;i<r.path.length;){const n=r.path[i];i===r.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(r))):e[n]=e[n]||{_errors:[]},e=e[n],i++}}};return i(this),n}static assert(e){if(!(e instanceof t))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,e.util.jsonStringifyReplacer,2)}get isEmpty(){return 0===this.issues.length}flatten(e=e=>e.message){const t={},n=[];for(const i of this.issues)if(i.path.length>0){const n=i.path[0];t[n]=t[n]||[],t[n].push(e(i))}else n.push(e(i));return{formErrors:n,fieldErrors:t}}get formErrors(){return this.flatten()}};return V9.ZodError=t,t.create=e=>new t(e),V9}function G9(){if(P9)return j9;P9=1,Object.defineProperty(j9,"__esModule",{value:!0});const e=U9(),t=z9();return j9.default=(n,i)=>{let r;switch(n.code){case e.ZodIssueCode.invalid_type:r=n.received===t.ZodParsedType.undefined?"Required":`Expected ${n.expected}, received ${n.received}`;break;case e.ZodIssueCode.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(n.expected,t.util.jsonStringifyReplacer)}`;break;case e.ZodIssueCode.unrecognized_keys:r=`Unrecognized key(s) in object: ${t.util.joinValues(n.keys,", ")}`;break;case e.ZodIssueCode.invalid_union:r="Invalid input";break;case e.ZodIssueCode.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${t.util.joinValues(n.options)}`;break;case e.ZodIssueCode.invalid_enum_value:r=`Invalid enum value. Expected ${t.util.joinValues(n.options)}, received '${n.received}'`;break;case e.ZodIssueCode.invalid_arguments:r="Invalid function arguments";break;case e.ZodIssueCode.invalid_return_type:r="Invalid function return type";break;case e.ZodIssueCode.invalid_date:r="Invalid date";break;case e.ZodIssueCode.invalid_string:"object"==typeof n.validation?"includes"in n.validation?(r=`Invalid input: must include "${n.validation.includes}"`,"number"==typeof n.validation.position&&(r=`${r} at one or more positions greater than or equal to ${n.validation.position}`)):"startsWith"in n.validation?r=`Invalid input: must start with "${n.validation.startsWith}"`:"endsWith"in n.validation?r=`Invalid input: must end with "${n.validation.endsWith}"`:t.util.assertNever(n.validation):r="regex"!==n.validation?`Invalid ${n.validation}`:"Invalid";break;case e.ZodIssueCode.too_small:r="array"===n.type?`Array must contain ${n.exact?"exactly":n.inclusive?"at least":"more than"} ${n.minimum} element(s)`:"string"===n.type?`String must contain ${n.exact?"exactly":n.inclusive?"at least":"over"} ${n.minimum} character(s)`:"number"===n.type||"bigint"===n.type?`Number must be ${n.exact?"exactly equal to ":n.inclusive?"greater than or equal to ":"greater than "}${n.minimum}`:"date"===n.type?`Date must be ${n.exact?"exactly equal to ":n.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(n.minimum))}`:"Invalid input";break;case e.ZodIssueCode.too_big:r="array"===n.type?`Array must contain ${n.exact?"exactly":n.inclusive?"at most":"less than"} ${n.maximum} element(s)`:"string"===n.type?`String must contain ${n.exact?"exactly":n.inclusive?"at most":"under"} ${n.maximum} character(s)`:"number"===n.type?`Number must be ${n.exact?"exactly":n.inclusive?"less than or equal to":"less than"} ${n.maximum}`:"bigint"===n.type?`BigInt must be ${n.exact?"exactly":n.inclusive?"less than or equal to":"less than"} ${n.maximum}`:"date"===n.type?`Date must be ${n.exact?"exactly":n.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(n.maximum))}`:"Invalid input";break;case e.ZodIssueCode.custom:r="Invalid input";break;case e.ZodIssueCode.invalid_intersection_types:r="Intersection results could not be merged";break;case e.ZodIssueCode.not_multiple_of:r=`Number must be a multiple of ${n.multipleOf}`;break;case e.ZodIssueCode.not_finite:r="Number must be finite";break;default:r=i.defaultError,t.util.assertNever(n)}return{message:r}},j9}function W9(){if(M9)return B9;M9=1;var e=B9&&B9.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(B9,"__esModule",{value:!0}),B9.defaultErrorMap=void 0,B9.setErrorMap=function(e){n=e},B9.getErrorMap=function(){return n};const t=e(G9());B9.defaultErrorMap=t.default;let n=t.default;return B9}var Y9,$9={};function X9(){return Y9||(Y9=1,function(e){var t=$9&&$9.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.isAsync=e.isValid=e.isDirty=e.isAborted=e.OK=e.DIRTY=e.INVALID=e.ParseStatus=e.EMPTY_PATH=e.makeIssue=void 0,e.addIssueToContext=function(t,r){const a=(0,n.getErrorMap)(),o=(0,e.makeIssue)({issueData:r,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,a,a===i.default?void 0:i.default].filter(e=>!!e)});t.common.issues.push(o)};const n=W9(),i=t(G9());e.makeIssue=e=>{const{data:t,path:n,errorMaps:i,issueData:r}=e,a=[...n,...r.path||[]],o={...r,path:a};if(void 0!==r.message)return{...r,path:a,message:r.message};let s="";const l=i.filter(e=>!!e).slice().reverse();for(const u of l)s=u(o,{data:t,defaultError:s}).message;return{...r,path:a,message:s}},e.EMPTY_PATH=[];class r{constructor(){this.value="valid"}dirty(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static mergeArray(t,n){const i=[];for(const r of n){if("aborted"===r.status)return e.INVALID;"dirty"===r.status&&t.dirty(),i.push(r.value)}return{status:t.value,value:i}}static async mergeObjectAsync(e,t){const n=[];for(const i of t){const e=await i.key,t=await i.value;n.push({key:e,value:t})}return r.mergeObjectSync(e,n)}static mergeObjectSync(t,n){const i={};for(const r of n){const{key:n,value:a}=r;if("aborted"===n.status)return e.INVALID;if("aborted"===a.status)return e.INVALID;"dirty"===n.status&&t.dirty(),"dirty"===a.status&&t.dirty(),"__proto__"===n.value||void 0===a.value&&!r.alwaysSet||(i[n.value]=a.value)}return{status:t.value,value:i}}}e.ParseStatus=r,e.INVALID=Object.freeze({status:"aborted"});e.DIRTY=e=>({status:"dirty",value:e});e.OK=e=>({status:"valid",value:e});e.isAborted=e=>"aborted"===e.status;e.isDirty=e=>"dirty"===e.status;e.isValid=e=>"valid"===e.status;e.isAsync=e=>"undefined"!=typeof Promise&&e instanceof Promise}($9)),$9}var q9,Z9={};function K9(){return q9||(q9=1,Object.defineProperty(Z9,"__esModule",{value:!0})),Z9}var Q9,J9,e5,t5,n5,i5,r5,a5={},o5={};function s5(){return Q9||(Q9=1,Object.defineProperty(o5,"__esModule",{value:!0}),o5.errorUtil=void 0,function(e){e.errToObj=e=>"string"==typeof e?{message:e}:e||{},e.toString=e=>"string"==typeof e?e:e?.message}(e||(o5.errorUtil=e={}))),o5;var e}function l5(){if(J9)return a5;J9=1,Object.defineProperty(a5,"__esModule",{value:!0}),a5.discriminatedUnion=a5.date=a5.boolean=a5.bigint=a5.array=a5.any=a5.coerce=a5.ZodFirstPartyTypeKind=a5.late=a5.ZodSchema=a5.Schema=a5.ZodReadonly=a5.ZodPipeline=a5.ZodBranded=a5.BRAND=a5.ZodNaN=a5.ZodCatch=a5.ZodDefault=a5.ZodNullable=a5.ZodOptional=a5.ZodTransformer=a5.ZodEffects=a5.ZodPromise=a5.ZodNativeEnum=a5.ZodEnum=a5.ZodLiteral=a5.ZodLazy=a5.ZodFunction=a5.ZodSet=a5.ZodMap=a5.ZodRecord=a5.ZodTuple=a5.ZodIntersection=a5.ZodDiscriminatedUnion=a5.ZodUnion=a5.ZodObject=a5.ZodArray=a5.ZodVoid=a5.ZodNever=a5.ZodUnknown=a5.ZodAny=a5.ZodNull=a5.ZodUndefined=a5.ZodSymbol=a5.ZodDate=a5.ZodBoolean=a5.ZodBigInt=a5.ZodNumber=a5.ZodString=a5.ZodType=void 0,a5.NEVER=a5.void=a5.unknown=a5.union=a5.undefined=a5.tuple=a5.transformer=a5.symbol=a5.string=a5.strictObject=a5.set=a5.record=a5.promise=a5.preprocess=a5.pipeline=a5.ostring=a5.optional=a5.onumber=a5.oboolean=a5.object=a5.number=a5.nullable=a5.null=a5.never=a5.nativeEnum=a5.nan=a5.map=a5.literal=a5.lazy=a5.intersection=a5.instanceof=a5.function=a5.enum=a5.effect=void 0,a5.datetimeRegex=T,a5.custom=be;const e=U9(),t=W9(),n=s5(),i=X9(),r=z9();class a{constructor(e,t,n,i){this._cachedPath=[],this.parent=e,this.data=t,this._path=n,this._key=i}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const o=(t,n)=>{if((0,i.isValid)(n))return{success:!0,data:n.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new e.ZodError(t.common.issues);return this._error=n,this._error}}};function s(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:i,description:r}=e;if(t&&(n||i))throw new Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');if(t)return{errorMap:t,description:r};return{errorMap:(t,r)=>{const{message:a}=e;return"invalid_enum_value"===t.code?{message:a??r.defaultError}:void 0===r.data?{message:a??i??r.defaultError}:"invalid_type"!==t.code?{message:r.defaultError}:{message:a??n??r.defaultError}},description:r}}class l{get description(){return this._def.description}_getType(e){return(0,r.getParsedType)(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:(0,r.getParsedType)(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new i.ParseStatus,ctx:{common:e.parent.common,data:e.data,parsedType:(0,r.getParsedType)(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if((0,i.isAsync)(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const n=this.safeParse(e,t);if(n.success)return n.data;throw n.error}safeParse(e,t){const n={common:{issues:[],async:t?.async??!1,contextualErrorMap:t?.errorMap},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:(0,r.getParsedType)(e)},i=this._parseSync({data:e,path:n.path,parent:n});return o(n,i)}"~validate"(e){const t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:(0,r.getParsedType)(e)};if(!this["~standard"].async)try{const n=this._parseSync({data:e,path:[],parent:t});return(0,i.isValid)(n)?{value:n.value}:{issues:t.common.issues}}catch(n){n?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(e=>(0,i.isValid)(e)?{value:e.value}:{issues:t.common.issues})}async parseAsync(e,t){const n=await this.safeParseAsync(e,t);if(n.success)return n.data;throw n.error}async safeParseAsync(e,t){const n={common:{issues:[],contextualErrorMap:t?.errorMap,async:!0},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:(0,r.getParsedType)(e)},a=this._parse({data:e,path:n.path,parent:n}),s=await((0,i.isAsync)(a)?a:Promise.resolve(a));return o(n,s)}refine(t,n){const i=e=>"string"==typeof n||void 0===n?{message:n}:"function"==typeof n?n(e):n;return this._refinement((n,r)=>{const a=t(n),o=()=>r.addIssue({code:e.ZodIssueCode.custom,...i(n)});return"undefined"!=typeof Promise&&a instanceof Promise?a.then(e=>!!e||(o(),!1)):!!a||(o(),!1)})}refinement(e,t){return this._refinement((n,i)=>!!e(n)||(i.addIssue("function"==typeof t?t(n,i):t),!1))}_refinement(e){return new ce({schema:this,typeName:we.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:e=>this["~validate"](e)}}optional(){return de.create(this,this._def)}nullable(){return he.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return W.create(this)}promise(){return ue.create(this,this._def)}or(e){return X.create([this,e],this._def)}and(e){return Q.create(this,e,this._def)}transform(e){return new ce({...s(this._def),schema:this,typeName:we.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t="function"==typeof e?e:()=>e;return new me({...s(this._def),innerType:this,defaultValue:t,typeName:we.ZodDefault})}brand(){return new ge({typeName:we.ZodBranded,type:this,...s(this._def)})}catch(e){const t="function"==typeof e?e:()=>e;return new pe({...s(this._def),innerType:this,catchValue:t,typeName:we.ZodCatch})}describe(e){return new(0,this.constructor)({...this._def,description:e})}pipe(e){return _e.create(this,e)}readonly(){return ve.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}a5.ZodType=l,a5.Schema=l,a5.ZodSchema=l;const u=/^c[^\s-]{8,}$/i,c=/^[0-9a-z]+$/,d=/^[0-9A-HJKMNP-TV-Z]{26}$/i,h=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,m=/^[a-z0-9_-]{21}$/i,p=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,f=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,g=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i;let _;const v=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,y=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,b=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,w=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,S=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,k=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,C="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",E=new RegExp(`^${C}$`);function x(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:null==e.precision&&(t=`${t}(\\.\\d+)?`);return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${e.precision?"+":"?"}`}function I(e){return new RegExp(`^${x(e)}$`)}function T(e){let t=`${C}T${x(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function O(e,t){return!("v4"!==t&&t||!v.test(e))||!("v6"!==t&&t||!b.test(e))}function R(e,t){if(!p.test(e))return!1;try{const[n]=e.split(".");if(!n)return!1;const i=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),r=JSON.parse(atob(i));return"object"==typeof r&&null!==r&&((!("typ"in r)||"JWT"===r?.typ)&&(!!r.alg&&(!t||r.alg===t)))}catch{return!1}}function A(e,t){return!("v4"!==t&&t||!y.test(e))||!("v6"!==t&&t||!w.test(e))}class L extends l{_parse(t){this._def.coerce&&(t.data=String(t.data));if(this._getType(t)!==r.ZodParsedType.string){const n=this._getOrReturnCtx(t);return(0,i.addIssueToContext)(n,{code:e.ZodIssueCode.invalid_type,expected:r.ZodParsedType.string,received:n.parsedType}),i.INVALID}const n=new i.ParseStatus;let a;for(const o of this._def.checks)if("min"===o.kind)t.data.length<o.value&&(a=this._getOrReturnCtx(t,a),(0,i.addIssueToContext)(a,{code:e.ZodIssueCode.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),n.dirty());else if("max"===o.kind)t.data.length>o.value&&(a=this._getOrReturnCtx(t,a),(0,i.addIssueToContext)(a,{code:e.ZodIssueCode.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),n.dirty());else if("length"===o.kind){const r=t.data.length>o.value,s=t.data.length<o.value;(r||s)&&(a=this._getOrReturnCtx(t,a),r?(0,i.addIssueToContext)(a,{code:e.ZodIssueCode.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):s&&(0,i.addIssueToContext)(a,{code:e.ZodIssueCode.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),n.dirty())}else if("email"===o.kind)g.test(t.data)||(a=this._getOrReturnCtx(t,a),(0,i.addIssueToContext)(a,{validation:"email",code:e.ZodIssueCode.invalid_string,message:o.message}),n.dirty());else if("emoji"===o.kind)_||(_=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),_.test(t.data)||(a=this._getOrReturnCtx(t,a),(0,i.addIssueToContext)(a,{validation:"emoji",code:e.ZodIssueCode.invalid_string,message:o.message}),n.dirty());else if("uuid"===o.kind)h.test(t.data)||(a=this._getOrReturnCtx(t,a),(0,i.addIssueToContext)(a,{validation:"uuid",code:e.ZodIssueCode.invalid_string,message:o.message}),n.dirty());else if("nanoid"===o.kind)m.test(t.data)||(a=this._getOrReturnCtx(t,a),(0,i.addIssueToContext)(a,{validation:"nanoid",code:e.ZodIssueCode.invalid_string,message:o.message}),n.dirty());else if("cuid"===o.kind)u.test(t.data)||(a=this._getOrReturnCtx(t,a),(0,i.addIssueToContext)(a,{validation:"cuid",code:e.ZodIssueCode.invalid_string,message:o.message}),n.dirty());else if("cuid2"===o.kind)c.test(t.data)||(a=this._getOrReturnCtx(t,a),(0,i.addIssueToContext)(a,{validation:"cuid2",code:e.ZodIssueCode.invalid_string,message:o.message}),n.dirty());else if("ulid"===o.kind)d.test(t.data)||(a=this._getOrReturnCtx(t,a),(0,i.addIssueToContext)(a,{validation:"ulid",code:e.ZodIssueCode.invalid_string,message:o.message}),n.dirty());else if("url"===o.kind)try{new URL(t.data)}catch{a=this._getOrReturnCtx(t,a),(0,i.addIssueToContext)(a,{validation:"url",code:e.ZodIssueCode.invalid_string,message:o.message}),n.dirty()}else if("regex"===o.kind){o.regex.lastIndex=0;o.regex.test(t.data)||(a=this._getOrReturnCtx(t,a),(0,i.addIssueToContext)(a,{validation:"regex",code:e.ZodIssueCode.invalid_string,message:o.message}),n.dirty())}else if("trim"===o.kind)t.data=t.data.trim();else if("includes"===o.kind)t.data.includes(o.value,o.position)||(a=this._getOrReturnCtx(t,a),(0,i.addIssueToContext)(a,{code:e.ZodIssueCode.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),n.dirty());else if("toLowerCase"===o.kind)t.data=t.data.toLowerCase();else if("toUpperCase"===o.kind)t.data=t.data.toUpperCase();else if("startsWith"===o.kind)t.data.startsWith(o.value)||(a=this._getOrReturnCtx(t,a),(0,i.addIssueToContext)(a,{code:e.ZodIssueCode.invalid_string,validation:{startsWith:o.value},message:o.message}),n.dirty());else if("endsWith"===o.kind)t.data.endsWith(o.value)||(a=this._getOrReturnCtx(t,a),(0,i.addIssueToContext)(a,{code:e.ZodIssueCode.invalid_string,validation:{endsWith:o.value},message:o.message}),n.dirty());else if("datetime"===o.kind){T(o).test(t.data)||(a=this._getOrReturnCtx(t,a),(0,i.addIssueToContext)(a,{code:e.ZodIssueCode.invalid_string,validation:"datetime",message:o.message}),n.dirty())}else if("date"===o.kind){E.test(t.data)||(a=this._getOrReturnCtx(t,a),(0,i.addIssueToContext)(a,{code:e.ZodIssueCode.invalid_string,validation:"date",message:o.message}),n.dirty())}else if("time"===o.kind){I(o).test(t.data)||(a=this._getOrReturnCtx(t,a),(0,i.addIssueToContext)(a,{code:e.ZodIssueCode.invalid_string,validation:"time",message:o.message}),n.dirty())}else"duration"===o.kind?f.test(t.data)||(a=this._getOrReturnCtx(t,a),(0,i.addIssueToContext)(a,{validation:"duration",code:e.ZodIssueCode.invalid_string,message:o.message}),n.dirty()):"ip"===o.kind?O(t.data,o.version)||(a=this._getOrReturnCtx(t,a),(0,i.addIssueToContext)(a,{validation:"ip",code:e.ZodIssueCode.invalid_string,message:o.message}),n.dirty()):"jwt"===o.kind?R(t.data,o.alg)||(a=this._getOrReturnCtx(t,a),(0,i.addIssueToContext)(a,{validation:"jwt",code:e.ZodIssueCode.invalid_string,message:o.message}),n.dirty()):"cidr"===o.kind?A(t.data,o.version)||(a=this._getOrReturnCtx(t,a),(0,i.addIssueToContext)(a,{validation:"cidr",code:e.ZodIssueCode.invalid_string,message:o.message}),n.dirty()):"base64"===o.kind?S.test(t.data)||(a=this._getOrReturnCtx(t,a),(0,i.addIssueToContext)(a,{validation:"base64",code:e.ZodIssueCode.invalid_string,message:o.message}),n.dirty()):"base64url"===o.kind?k.test(t.data)||(a=this._getOrReturnCtx(t,a),(0,i.addIssueToContext)(a,{validation:"base64url",code:e.ZodIssueCode.invalid_string,message:o.message}),n.dirty()):r.util.assertNever(o);return{status:n.value,value:t.data}}_regex(t,i,r){return this.refinement(e=>t.test(e),{validation:i,code:e.ZodIssueCode.invalid_string,...n.errorUtil.errToObj(r)})}_addCheck(e){return new L({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...n.errorUtil.errToObj(e)})}url(e){return this._addCheck({kind:"url",...n.errorUtil.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...n.errorUtil.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...n.errorUtil.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...n.errorUtil.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...n.errorUtil.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...n.errorUtil.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...n.errorUtil.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...n.errorUtil.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...n.errorUtil.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...n.errorUtil.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...n.errorUtil.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...n.errorUtil.errToObj(e)})}datetime(e){return"string"==typeof e?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:void 0===e?.precision?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...n.errorUtil.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return"string"==typeof e?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:void 0===e?.precision?null:e?.precision,...n.errorUtil.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...n.errorUtil.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...n.errorUtil.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t?.position,...n.errorUtil.errToObj(t?.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...n.errorUtil.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...n.errorUtil.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...n.errorUtil.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...n.errorUtil.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...n.errorUtil.errToObj(t)})}nonempty(e){return this.min(1,n.errorUtil.errToObj(e))}trim(){return new L({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new L({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new L({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>"datetime"===e.kind)}get isDate(){return!!this._def.checks.find(e=>"date"===e.kind)}get isTime(){return!!this._def.checks.find(e=>"time"===e.kind)}get isDuration(){return!!this._def.checks.find(e=>"duration"===e.kind)}get isEmail(){return!!this._def.checks.find(e=>"email"===e.kind)}get isURL(){return!!this._def.checks.find(e=>"url"===e.kind)}get isEmoji(){return!!this._def.checks.find(e=>"emoji"===e.kind)}get isUUID(){return!!this._def.checks.find(e=>"uuid"===e.kind)}get isNANOID(){return!!this._def.checks.find(e=>"nanoid"===e.kind)}get isCUID(){return!!this._def.checks.find(e=>"cuid"===e.kind)}get isCUID2(){return!!this._def.checks.find(e=>"cuid2"===e.kind)}get isULID(){return!!this._def.checks.find(e=>"ulid"===e.kind)}get isIP(){return!!this._def.checks.find(e=>"ip"===e.kind)}get isCIDR(){return!!this._def.checks.find(e=>"cidr"===e.kind)}get isBase64(){return!!this._def.checks.find(e=>"base64"===e.kind)}get isBase64url(){return!!this._def.checks.find(e=>"base64url"===e.kind)}get minLength(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}function P(e,t){const n=(e.toString().split(".")[1]||"").length,i=(t.toString().split(".")[1]||"").length,r=n>i?n:i;return Number.parseInt(e.toFixed(r).replace(".",""))%Number.parseInt(t.toFixed(r).replace(".",""))/10**r}a5.ZodString=L,L.create=e=>new L({checks:[],typeName:we.ZodString,coerce:e?.coerce??!1,...s(e)});class M extends l{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){this._def.coerce&&(t.data=Number(t.data));if(this._getType(t)!==r.ZodParsedType.number){const n=this._getOrReturnCtx(t);return(0,i.addIssueToContext)(n,{code:e.ZodIssueCode.invalid_type,expected:r.ZodParsedType.number,received:n.parsedType}),i.INVALID}let n;const a=new i.ParseStatus;for(const o of this._def.checks)if("int"===o.kind)r.util.isInteger(t.data)||(n=this._getOrReturnCtx(t,n),(0,i.addIssueToContext)(n,{code:e.ZodIssueCode.invalid_type,expected:"integer",received:"float",message:o.message}),a.dirty());else if("min"===o.kind){(o.inclusive?t.data<o.value:t.data<=o.value)&&(n=this._getOrReturnCtx(t,n),(0,i.addIssueToContext)(n,{code:e.ZodIssueCode.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),a.dirty())}else if("max"===o.kind){(o.inclusive?t.data>o.value:t.data>=o.value)&&(n=this._getOrReturnCtx(t,n),(0,i.addIssueToContext)(n,{code:e.ZodIssueCode.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),a.dirty())}else"multipleOf"===o.kind?0!==P(t.data,o.value)&&(n=this._getOrReturnCtx(t,n),(0,i.addIssueToContext)(n,{code:e.ZodIssueCode.not_multiple_of,multipleOf:o.value,message:o.message}),a.dirty()):"finite"===o.kind?Number.isFinite(t.data)||(n=this._getOrReturnCtx(t,n),(0,i.addIssueToContext)(n,{code:e.ZodIssueCode.not_finite,message:o.message}),a.dirty()):r.util.assertNever(o);return{status:a.value,value:t.data}}gte(e,t){return this.setLimit("min",e,!0,n.errorUtil.toString(t))}gt(e,t){return this.setLimit("min",e,!1,n.errorUtil.toString(t))}lte(e,t){return this.setLimit("max",e,!0,n.errorUtil.toString(t))}lt(e,t){return this.setLimit("max",e,!1,n.errorUtil.toString(t))}setLimit(e,t,i,r){return new M({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:i,message:n.errorUtil.toString(r)}]})}_addCheck(e){return new M({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:n.errorUtil.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:n.errorUtil.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:n.errorUtil.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:n.errorUtil.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:n.errorUtil.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:n.errorUtil.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:n.errorUtil.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:n.errorUtil.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:n.errorUtil.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>"int"===e.kind||"multipleOf"===e.kind&&r.util.isInteger(e.value))}get isFinite(){let e=null,t=null;for(const n of this._def.checks){if("finite"===n.kind||"int"===n.kind||"multipleOf"===n.kind)return!0;"min"===n.kind?(null===t||n.value>t)&&(t=n.value):"max"===n.kind&&(null===e||n.value<e)&&(e=n.value)}return Number.isFinite(t)&&Number.isFinite(e)}}a5.ZodNumber=M,M.create=e=>new M({checks:[],typeName:we.ZodNumber,coerce:e?.coerce||!1,...s(e)});class D extends l{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==r.ZodParsedType.bigint)return this._getInvalidInput(t);let n;const a=new i.ParseStatus;for(const o of this._def.checks)if("min"===o.kind){(o.inclusive?t.data<o.value:t.data<=o.value)&&(n=this._getOrReturnCtx(t,n),(0,i.addIssueToContext)(n,{code:e.ZodIssueCode.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),a.dirty())}else if("max"===o.kind){(o.inclusive?t.data>o.value:t.data>=o.value)&&(n=this._getOrReturnCtx(t,n),(0,i.addIssueToContext)(n,{code:e.ZodIssueCode.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),a.dirty())}else"multipleOf"===o.kind?t.data%o.value!==BigInt(0)&&(n=this._getOrReturnCtx(t,n),(0,i.addIssueToContext)(n,{code:e.ZodIssueCode.not_multiple_of,multipleOf:o.value,message:o.message}),a.dirty()):r.util.assertNever(o);return{status:a.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return(0,i.addIssueToContext)(n,{code:e.ZodIssueCode.invalid_type,expected:r.ZodParsedType.bigint,received:n.parsedType}),i.INVALID}gte(e,t){return this.setLimit("min",e,!0,n.errorUtil.toString(t))}gt(e,t){return this.setLimit("min",e,!1,n.errorUtil.toString(t))}lte(e,t){return this.setLimit("max",e,!0,n.errorUtil.toString(t))}lt(e,t){return this.setLimit("max",e,!1,n.errorUtil.toString(t))}setLimit(e,t,i,r){return new D({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:i,message:n.errorUtil.toString(r)}]})}_addCheck(e){return new D({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:n.errorUtil.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:n.errorUtil.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:n.errorUtil.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:n.errorUtil.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:n.errorUtil.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}a5.ZodBigInt=D,D.create=e=>new D({checks:[],typeName:we.ZodBigInt,coerce:e?.coerce??!1,...s(e)});class N extends l{_parse(t){this._def.coerce&&(t.data=Boolean(t.data));if(this._getType(t)!==r.ZodParsedType.boolean){const n=this._getOrReturnCtx(t);return(0,i.addIssueToContext)(n,{code:e.ZodIssueCode.invalid_type,expected:r.ZodParsedType.boolean,received:n.parsedType}),i.INVALID}return(0,i.OK)(t.data)}}a5.ZodBoolean=N,N.create=e=>new N({typeName:we.ZodBoolean,coerce:e?.coerce||!1,...s(e)});class F extends l{_parse(t){this._def.coerce&&(t.data=new Date(t.data));if(this._getType(t)!==r.ZodParsedType.date){const n=this._getOrReturnCtx(t);return(0,i.addIssueToContext)(n,{code:e.ZodIssueCode.invalid_type,expected:r.ZodParsedType.date,received:n.parsedType}),i.INVALID}if(Number.isNaN(t.data.getTime())){const n=this._getOrReturnCtx(t);return(0,i.addIssueToContext)(n,{code:e.ZodIssueCode.invalid_date}),i.INVALID}const n=new i.ParseStatus;let a;for(const o of this._def.checks)"min"===o.kind?t.data.getTime()<o.value&&(a=this._getOrReturnCtx(t,a),(0,i.addIssueToContext)(a,{code:e.ZodIssueCode.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),n.dirty()):"max"===o.kind?t.data.getTime()>o.value&&(a=this._getOrReturnCtx(t,a),(0,i.addIssueToContext)(a,{code:e.ZodIssueCode.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),n.dirty()):r.util.assertNever(o);return{status:n.value,value:new Date(t.data.getTime())}}_addCheck(e){return new F({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:n.errorUtil.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:n.errorUtil.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return null!=e?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return null!=e?new Date(e):null}}a5.ZodDate=F,F.create=e=>new F({checks:[],coerce:e?.coerce||!1,typeName:we.ZodDate,...s(e)});class B extends l{_parse(t){if(this._getType(t)!==r.ZodParsedType.symbol){const n=this._getOrReturnCtx(t);return(0,i.addIssueToContext)(n,{code:e.ZodIssueCode.invalid_type,expected:r.ZodParsedType.symbol,received:n.parsedType}),i.INVALID}return(0,i.OK)(t.data)}}a5.ZodSymbol=B,B.create=e=>new B({typeName:we.ZodSymbol,...s(e)});class j extends l{_parse(t){if(this._getType(t)!==r.ZodParsedType.undefined){const n=this._getOrReturnCtx(t);return(0,i.addIssueToContext)(n,{code:e.ZodIssueCode.invalid_type,expected:r.ZodParsedType.undefined,received:n.parsedType}),i.INVALID}return(0,i.OK)(t.data)}}a5.ZodUndefined=j,j.create=e=>new j({typeName:we.ZodUndefined,...s(e)});class V extends l{_parse(t){if(this._getType(t)!==r.ZodParsedType.null){const n=this._getOrReturnCtx(t);return(0,i.addIssueToContext)(n,{code:e.ZodIssueCode.invalid_type,expected:r.ZodParsedType.null,received:n.parsedType}),i.INVALID}return(0,i.OK)(t.data)}}a5.ZodNull=V,V.create=e=>new V({typeName:we.ZodNull,...s(e)});class H extends l{constructor(){super(...arguments),this._any=!0}_parse(e){return(0,i.OK)(e.data)}}a5.ZodAny=H,H.create=e=>new H({typeName:we.ZodAny,...s(e)});class z extends l{constructor(){super(...arguments),this._unknown=!0}_parse(e){return(0,i.OK)(e.data)}}a5.ZodUnknown=z,z.create=e=>new z({typeName:we.ZodUnknown,...s(e)});class U extends l{_parse(t){const n=this._getOrReturnCtx(t);return(0,i.addIssueToContext)(n,{code:e.ZodIssueCode.invalid_type,expected:r.ZodParsedType.never,received:n.parsedType}),i.INVALID}}a5.ZodNever=U,U.create=e=>new U({typeName:we.ZodNever,...s(e)});class G extends l{_parse(t){if(this._getType(t)!==r.ZodParsedType.undefined){const n=this._getOrReturnCtx(t);return(0,i.addIssueToContext)(n,{code:e.ZodIssueCode.invalid_type,expected:r.ZodParsedType.void,received:n.parsedType}),i.INVALID}return(0,i.OK)(t.data)}}a5.ZodVoid=G,G.create=e=>new G({typeName:we.ZodVoid,...s(e)});class W extends l{_parse(t){const{ctx:n,status:o}=this._processInputParams(t),s=this._def;if(n.parsedType!==r.ZodParsedType.array)return(0,i.addIssueToContext)(n,{code:e.ZodIssueCode.invalid_type,expected:r.ZodParsedType.array,received:n.parsedType}),i.INVALID;if(null!==s.exactLength){const t=n.data.length>s.exactLength.value,r=n.data.length<s.exactLength.value;(t||r)&&((0,i.addIssueToContext)(n,{code:t?e.ZodIssueCode.too_big:e.ZodIssueCode.too_small,minimum:r?s.exactLength.value:void 0,maximum:t?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),o.dirty())}if(null!==s.minLength&&n.data.length<s.minLength.value&&((0,i.addIssueToContext)(n,{code:e.ZodIssueCode.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),o.dirty()),null!==s.maxLength&&n.data.length>s.maxLength.value&&((0,i.addIssueToContext)(n,{code:e.ZodIssueCode.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),o.dirty()),n.common.async)return Promise.all([...n.data].map((e,t)=>s.type._parseAsync(new a(n,e,n.path,t)))).then(e=>i.ParseStatus.mergeArray(o,e));const l=[...n.data].map((e,t)=>s.type._parseSync(new a(n,e,n.path,t)));return i.ParseStatus.mergeArray(o,l)}get element(){return this._def.type}min(e,t){return new W({...this._def,minLength:{value:e,message:n.errorUtil.toString(t)}})}max(e,t){return new W({...this._def,maxLength:{value:e,message:n.errorUtil.toString(t)}})}length(e,t){return new W({...this._def,exactLength:{value:e,message:n.errorUtil.toString(t)}})}nonempty(e){return this.min(1,e)}}function Y(e){if(e instanceof $){const t={};for(const n in e.shape){const i=e.shape[n];t[n]=de.create(Y(i))}return new $({...e._def,shape:()=>t})}return e instanceof W?new W({...e._def,type:Y(e.element)}):e instanceof de?de.create(Y(e.unwrap())):e instanceof he?he.create(Y(e.unwrap())):e instanceof J?J.create(e.items.map(e=>Y(e))):e}a5.ZodArray=W,W.create=(e,t)=>new W({type:e,minLength:null,maxLength:null,exactLength:null,typeName:we.ZodArray,...s(t)});class $ extends l{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(null!==this._cached)return this._cached;const e=this._def.shape(),t=r.util.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(t){if(this._getType(t)!==r.ZodParsedType.object){const n=this._getOrReturnCtx(t);return(0,i.addIssueToContext)(n,{code:e.ZodIssueCode.invalid_type,expected:r.ZodParsedType.object,received:n.parsedType}),i.INVALID}const{status:n,ctx:o}=this._processInputParams(t),{shape:s,keys:l}=this._getCached(),u=[];if(!(this._def.catchall instanceof U&&"strip"===this._def.unknownKeys))for(const e in o.data)l.includes(e)||u.push(e);const c=[];for(const e of l){const t=s[e],n=o.data[e];c.push({key:{status:"valid",value:e},value:t._parse(new a(o,n,o.path,e)),alwaysSet:e in o.data})}if(this._def.catchall instanceof U){const t=this._def.unknownKeys;if("passthrough"===t)for(const e of u)c.push({key:{status:"valid",value:e},value:{status:"valid",value:o.data[e]}});else if("strict"===t)u.length>0&&((0,i.addIssueToContext)(o,{code:e.ZodIssueCode.unrecognized_keys,keys:u}),n.dirty());else if("strip"!==t)throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const e=this._def.catchall;for(const t of u){const n=o.data[t];c.push({key:{status:"valid",value:t},value:e._parse(new a(o,n,o.path,t)),alwaysSet:t in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const e=[];for(const t of c){const n=await t.key,i=await t.value;e.push({key:n,value:i,alwaysSet:t.alwaysSet})}return e}).then(e=>i.ParseStatus.mergeObjectSync(n,e)):i.ParseStatus.mergeObjectSync(n,c)}get shape(){return this._def.shape()}strict(e){return n.errorUtil.errToObj,new $({...this._def,unknownKeys:"strict",...void 0!==e?{errorMap:(t,i)=>{const r=this._def.errorMap?.(t,i).message??i.defaultError;return"unrecognized_keys"===t.code?{message:n.errorUtil.errToObj(e).message??r}:{message:r}}}:{}})}strip(){return new $({...this._def,unknownKeys:"strip"})}passthrough(){return new $({...this._def,unknownKeys:"passthrough"})}extend(e){return new $({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new $({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:we.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new $({...this._def,catchall:e})}pick(e){const t={};for(const n of r.util.objectKeys(e))e[n]&&this.shape[n]&&(t[n]=this.shape[n]);return new $({...this._def,shape:()=>t})}omit(e){const t={};for(const n of r.util.objectKeys(this.shape))e[n]||(t[n]=this.shape[n]);return new $({...this._def,shape:()=>t})}deepPartial(){return Y(this)}partial(e){const t={};for(const n of r.util.objectKeys(this.shape)){const i=this.shape[n];e&&!e[n]?t[n]=i:t[n]=i.optional()}return new $({...this._def,shape:()=>t})}required(e){const t={};for(const n of r.util.objectKeys(this.shape))if(e&&!e[n])t[n]=this.shape[n];else{let e=this.shape[n];for(;e instanceof de;)e=e._def.innerType;t[n]=e}return new $({...this._def,shape:()=>t})}keyof(){return oe(r.util.objectKeys(this.shape))}}a5.ZodObject=$,$.create=(e,t)=>new $({shape:()=>e,unknownKeys:"strip",catchall:U.create(),typeName:we.ZodObject,...s(t)}),$.strictCreate=(e,t)=>new $({shape:()=>e,unknownKeys:"strict",catchall:U.create(),typeName:we.ZodObject,...s(t)}),$.lazycreate=(e,t)=>new $({shape:e,unknownKeys:"strip",catchall:U.create(),typeName:we.ZodObject,...s(t)});class X extends l{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;if(n.common.async)return Promise.all(r.map(async e=>{const t={...n,common:{...n.common,issues:[]},parent:null};return{result:await e._parseAsync({data:n.data,path:n.path,parent:t}),ctx:t}})).then(function(t){for(const e of t)if("valid"===e.result.status)return e.result;for(const e of t)if("dirty"===e.result.status)return n.common.issues.push(...e.ctx.common.issues),e.result;const r=t.map(t=>new e.ZodError(t.ctx.common.issues));return(0,i.addIssueToContext)(n,{code:e.ZodIssueCode.invalid_union,unionErrors:r}),i.INVALID});{let t;const a=[];for(const e of r){const i={...n,common:{...n.common,issues:[]},parent:null},r=e._parseSync({data:n.data,path:n.path,parent:i});if("valid"===r.status)return r;"dirty"!==r.status||t||(t={result:r,ctx:i}),i.common.issues.length&&a.push(i.common.issues)}if(t)return n.common.issues.push(...t.ctx.common.issues),t.result;const o=a.map(t=>new e.ZodError(t));return(0,i.addIssueToContext)(n,{code:e.ZodIssueCode.invalid_union,unionErrors:o}),i.INVALID}}get options(){return this._def.options}}a5.ZodUnion=X,X.create=(e,t)=>new X({options:e,typeName:we.ZodUnion,...s(t)});const q=e=>e instanceof re?q(e.schema):e instanceof ce?q(e.innerType()):e instanceof ae?[e.value]:e instanceof se?e.options:e instanceof le?r.util.objectValues(e.enum):e instanceof me?q(e._def.innerType):e instanceof j?[void 0]:e instanceof V?[null]:e instanceof de?[void 0,...q(e.unwrap())]:e instanceof he?[null,...q(e.unwrap())]:e instanceof ge||e instanceof ve?q(e.unwrap()):e instanceof pe?q(e._def.innerType):[];class Z extends l{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==r.ZodParsedType.object)return(0,i.addIssueToContext)(n,{code:e.ZodIssueCode.invalid_type,expected:r.ZodParsedType.object,received:n.parsedType}),i.INVALID;const a=this.discriminator,o=n.data[a],s=this.optionsMap.get(o);return s?n.common.async?s._parseAsync({data:n.data,path:n.path,parent:n}):s._parseSync({data:n.data,path:n.path,parent:n}):((0,i.addIssueToContext)(n,{code:e.ZodIssueCode.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[a]}),i.INVALID)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,n){const i=new Map;for(const r of t){const t=q(r.shape[e]);if(!t.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const n of t){if(i.has(n))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(n)}`);i.set(n,r)}}return new Z({typeName:we.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:i,...s(n)})}}function K(e,t){const n=(0,r.getParsedType)(e),i=(0,r.getParsedType)(t);if(e===t)return{valid:!0,data:e};if(n===r.ZodParsedType.object&&i===r.ZodParsedType.object){const n=r.util.objectKeys(t),i=r.util.objectKeys(e).filter(e=>-1!==n.indexOf(e)),a={...e,...t};for(const r of i){const n=K(e[r],t[r]);if(!n.valid)return{valid:!1};a[r]=n.data}return{valid:!0,data:a}}if(n===r.ZodParsedType.array&&i===r.ZodParsedType.array){if(e.length!==t.length)return{valid:!1};const n=[];for(let i=0;i<e.length;i++){const r=K(e[i],t[i]);if(!r.valid)return{valid:!1};n.push(r.data)}return{valid:!0,data:n}}return n===r.ZodParsedType.date&&i===r.ZodParsedType.date&&+e===+t?{valid:!0,data:e}:{valid:!1}}a5.ZodDiscriminatedUnion=Z;class Q extends l{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),a=(t,a)=>{if((0,i.isAborted)(t)||(0,i.isAborted)(a))return i.INVALID;const o=K(t.value,a.value);return o.valid?(((0,i.isDirty)(t)||(0,i.isDirty)(a))&&n.dirty(),{status:n.value,value:o.data}):((0,i.addIssueToContext)(r,{code:e.ZodIssueCode.invalid_intersection_types}),i.INVALID)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([e,t])=>a(e,t)):a(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}a5.ZodIntersection=Q,Q.create=(e,t,n)=>new Q({left:e,right:t,typeName:we.ZodIntersection,...s(n)});class J extends l{_parse(t){const{status:n,ctx:o}=this._processInputParams(t);if(o.parsedType!==r.ZodParsedType.array)return(0,i.addIssueToContext)(o,{code:e.ZodIssueCode.invalid_type,expected:r.ZodParsedType.array,received:o.parsedType}),i.INVALID;if(o.data.length<this._def.items.length)return(0,i.addIssueToContext)(o,{code:e.ZodIssueCode.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),i.INVALID;!this._def.rest&&o.data.length>this._def.items.length&&((0,i.addIssueToContext)(o,{code:e.ZodIssueCode.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const s=[...o.data].map((e,t)=>{const n=this._def.items[t]||this._def.rest;return n?n._parse(new a(o,e,o.path,t)):null}).filter(e=>!!e);return o.common.async?Promise.all(s).then(e=>i.ParseStatus.mergeArray(n,e)):i.ParseStatus.mergeArray(n,s)}get items(){return this._def.items}rest(e){return new J({...this._def,rest:e})}}a5.ZodTuple=J,J.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new J({items:e,typeName:we.ZodTuple,rest:null,...s(t)})};class ee extends l{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:o}=this._processInputParams(t);if(o.parsedType!==r.ZodParsedType.object)return(0,i.addIssueToContext)(o,{code:e.ZodIssueCode.invalid_type,expected:r.ZodParsedType.object,received:o.parsedType}),i.INVALID;const s=[],l=this._def.keyType,u=this._def.valueType;for(const e in o.data)s.push({key:l._parse(new a(o,e,o.path,e)),value:u._parse(new a(o,o.data[e],o.path,e)),alwaysSet:e in o.data});return o.common.async?i.ParseStatus.mergeObjectAsync(n,s):i.ParseStatus.mergeObjectSync(n,s)}get element(){return this._def.valueType}static create(e,t,n){return new ee(t instanceof l?{keyType:e,valueType:t,typeName:we.ZodRecord,...s(n)}:{keyType:L.create(),valueType:e,typeName:we.ZodRecord,...s(t)})}}a5.ZodRecord=ee;class te extends l{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:o}=this._processInputParams(t);if(o.parsedType!==r.ZodParsedType.map)return(0,i.addIssueToContext)(o,{code:e.ZodIssueCode.invalid_type,expected:r.ZodParsedType.map,received:o.parsedType}),i.INVALID;const s=this._def.keyType,l=this._def.valueType,u=[...o.data.entries()].map(([e,t],n)=>({key:s._parse(new a(o,e,o.path,[n,"key"])),value:l._parse(new a(o,t,o.path,[n,"value"]))}));if(o.common.async){const e=new Map;return Promise.resolve().then(async()=>{for(const t of u){const r=await t.key,a=await t.value;if("aborted"===r.status||"aborted"===a.status)return i.INVALID;"dirty"!==r.status&&"dirty"!==a.status||n.dirty(),e.set(r.value,a.value)}return{status:n.value,value:e}})}{const e=new Map;for(const t of u){const r=t.key,a=t.value;if("aborted"===r.status||"aborted"===a.status)return i.INVALID;"dirty"!==r.status&&"dirty"!==a.status||n.dirty(),e.set(r.value,a.value)}return{status:n.value,value:e}}}}a5.ZodMap=te,te.create=(e,t,n)=>new te({valueType:t,keyType:e,typeName:we.ZodMap,...s(n)});class ne extends l{_parse(t){const{status:n,ctx:o}=this._processInputParams(t);if(o.parsedType!==r.ZodParsedType.set)return(0,i.addIssueToContext)(o,{code:e.ZodIssueCode.invalid_type,expected:r.ZodParsedType.set,received:o.parsedType}),i.INVALID;const s=this._def;null!==s.minSize&&o.data.size<s.minSize.value&&((0,i.addIssueToContext)(o,{code:e.ZodIssueCode.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),n.dirty()),null!==s.maxSize&&o.data.size>s.maxSize.value&&((0,i.addIssueToContext)(o,{code:e.ZodIssueCode.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),n.dirty());const l=this._def.valueType;function u(e){const t=new Set;for(const r of e){if("aborted"===r.status)return i.INVALID;"dirty"===r.status&&n.dirty(),t.add(r.value)}return{status:n.value,value:t}}const c=[...o.data.values()].map((e,t)=>l._parse(new a(o,e,o.path,t)));return o.common.async?Promise.all(c).then(e=>u(e)):u(c)}min(e,t){return new ne({...this._def,minSize:{value:e,message:n.errorUtil.toString(t)}})}max(e,t){return new ne({...this._def,maxSize:{value:e,message:n.errorUtil.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}a5.ZodSet=ne,ne.create=(e,t)=>new ne({valueType:e,minSize:null,maxSize:null,typeName:we.ZodSet,...s(t)});class ie extends l{constructor(){super(...arguments),this.validate=this.implement}_parse(n){const{ctx:a}=this._processInputParams(n);if(a.parsedType!==r.ZodParsedType.function)return(0,i.addIssueToContext)(a,{code:e.ZodIssueCode.invalid_type,expected:r.ZodParsedType.function,received:a.parsedType}),i.INVALID;function o(n,r){return(0,i.makeIssue)({data:n,path:a.path,errorMaps:[a.common.contextualErrorMap,a.schemaErrorMap,(0,t.getErrorMap)(),t.defaultErrorMap].filter(e=>!!e),issueData:{code:e.ZodIssueCode.invalid_arguments,argumentsError:r}})}function s(n,r){return(0,i.makeIssue)({data:n,path:a.path,errorMaps:[a.common.contextualErrorMap,a.schemaErrorMap,(0,t.getErrorMap)(),t.defaultErrorMap].filter(e=>!!e),issueData:{code:e.ZodIssueCode.invalid_return_type,returnTypeError:r}})}const l={errorMap:a.common.contextualErrorMap},u=a.data;if(this._def.returns instanceof ue){const t=this;return(0,i.OK)(async function(...n){const i=new e.ZodError([]),r=await t._def.args.parseAsync(n,l).catch(e=>{throw i.addIssue(o(n,e)),i}),a=await Reflect.apply(u,this,r),c=await t._def.returns._def.type.parseAsync(a,l).catch(e=>{throw i.addIssue(s(a,e)),i});return c})}{const t=this;return(0,i.OK)(function(...n){const i=t._def.args.safeParse(n,l);if(!i.success)throw new e.ZodError([o(n,i.error)]);const r=Reflect.apply(u,this,i.data),a=t._def.returns.safeParse(r,l);if(!a.success)throw new e.ZodError([s(r,a.error)]);return a.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new ie({...this._def,args:J.create(e).rest(z.create())})}returns(e){return new ie({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,n){return new ie({args:e||J.create([]).rest(z.create()),returns:t||z.create(),typeName:we.ZodFunction,...s(n)})}}a5.ZodFunction=ie;class re extends l{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}a5.ZodLazy=re,re.create=(e,t)=>new re({getter:e,typeName:we.ZodLazy,...s(t)});class ae extends l{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return(0,i.addIssueToContext)(n,{received:n.data,code:e.ZodIssueCode.invalid_literal,expected:this._def.value}),i.INVALID}return{status:"valid",value:t.data}}get value(){return this._def.value}}function oe(e,t){return new se({values:e,typeName:we.ZodEnum,...s(t)})}a5.ZodLiteral=ae,ae.create=(e,t)=>new ae({value:e,typeName:we.ZodLiteral,...s(t)});class se extends l{_parse(t){if("string"!=typeof t.data){const n=this._getOrReturnCtx(t),a=this._def.values;return(0,i.addIssueToContext)(n,{expected:r.util.joinValues(a),received:n.parsedType,code:e.ZodIssueCode.invalid_type}),i.INVALID}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return(0,i.addIssueToContext)(n,{received:n.data,code:e.ZodIssueCode.invalid_enum_value,options:r}),i.INVALID}return(0,i.OK)(t.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return se.create(e,{...this._def,...t})}exclude(e,t=this._def){return se.create(this.options.filter(t=>!e.includes(t)),{...this._def,...t})}}a5.ZodEnum=se,se.create=oe;class le extends l{_parse(t){const n=r.util.getValidEnumValues(this._def.values),a=this._getOrReturnCtx(t);if(a.parsedType!==r.ZodParsedType.string&&a.parsedType!==r.ZodParsedType.number){const t=r.util.objectValues(n);return(0,i.addIssueToContext)(a,{expected:r.util.joinValues(t),received:a.parsedType,code:e.ZodIssueCode.invalid_type}),i.INVALID}if(this._cache||(this._cache=new Set(r.util.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){const t=r.util.objectValues(n);return(0,i.addIssueToContext)(a,{received:a.data,code:e.ZodIssueCode.invalid_enum_value,options:t}),i.INVALID}return(0,i.OK)(t.data)}get enum(){return this._def.values}}a5.ZodNativeEnum=le,le.create=(e,t)=>new le({values:e,typeName:we.ZodNativeEnum,...s(t)});class ue extends l{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==r.ZodParsedType.promise&&!1===n.common.async)return(0,i.addIssueToContext)(n,{code:e.ZodIssueCode.invalid_type,expected:r.ZodParsedType.promise,received:n.parsedType}),i.INVALID;const a=n.parsedType===r.ZodParsedType.promise?n.data:Promise.resolve(n.data);return(0,i.OK)(a.then(e=>this._def.type.parseAsync(e,{path:n.path,errorMap:n.common.contextualErrorMap})))}}a5.ZodPromise=ue,ue.create=(e,t)=>new ue({type:e,typeName:we.ZodPromise,...s(t)});class ce extends l{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===we.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:n}=this._processInputParams(e),a=this._def.effect||null,o={addIssue:e=>{(0,i.addIssueToContext)(n,e),e.fatal?t.abort():t.dirty()},get path(){return n.path}};if(o.addIssue=o.addIssue.bind(o),"preprocess"===a.type){const e=a.transform(n.data,o);if(n.common.async)return Promise.resolve(e).then(async e=>{if("aborted"===t.value)return i.INVALID;const r=await this._def.schema._parseAsync({data:e,path:n.path,parent:n});return"aborted"===r.status?i.INVALID:"dirty"===r.status||"dirty"===t.value?(0,i.DIRTY)(r.value):r});{if("aborted"===t.value)return i.INVALID;const r=this._def.schema._parseSync({data:e,path:n.path,parent:n});return"aborted"===r.status?i.INVALID:"dirty"===r.status||"dirty"===t.value?(0,i.DIRTY)(r.value):r}}if("refinement"===a.type){const e=e=>{const t=a.refinement(e,o);if(n.common.async)return Promise.resolve(t);if(t instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return e};if(!1===n.common.async){const r=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return"aborted"===r.status?i.INVALID:("dirty"===r.status&&t.dirty(),e(r.value),{status:t.value,value:r.value})}return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(n=>"aborted"===n.status?i.INVALID:("dirty"===n.status&&t.dirty(),e(n.value).then(()=>({status:t.value,value:n.value}))))}if("transform"===a.type){if(!1===n.common.async){const e=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!(0,i.isValid)(e))return i.INVALID;const r=a.transform(e.value,o);if(r instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:r}}return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(e=>(0,i.isValid)(e)?Promise.resolve(a.transform(e.value,o)).then(e=>({status:t.value,value:e})):i.INVALID)}r.util.assertNever(a)}}a5.ZodEffects=ce,a5.ZodTransformer=ce,ce.create=(e,t,n)=>new ce({schema:e,typeName:we.ZodEffects,effect:t,...s(n)}),ce.createWithPreprocess=(e,t,n)=>new ce({schema:t,effect:{type:"preprocess",transform:e},typeName:we.ZodEffects,...s(n)});class de extends l{_parse(e){return this._getType(e)===r.ZodParsedType.undefined?(0,i.OK)(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}a5.ZodOptional=de,de.create=(e,t)=>new de({innerType:e,typeName:we.ZodOptional,...s(t)});class he extends l{_parse(e){return this._getType(e)===r.ZodParsedType.null?(0,i.OK)(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}a5.ZodNullable=he,he.create=(e,t)=>new he({innerType:e,typeName:we.ZodNullable,...s(t)});class me extends l{_parse(e){const{ctx:t}=this._processInputParams(e);let n=t.data;return t.parsedType===r.ZodParsedType.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}a5.ZodDefault=me,me.create=(e,t)=>new me({innerType:e,typeName:we.ZodDefault,defaultValue:"function"==typeof t.default?t.default:()=>t.default,...s(t)});class pe extends l{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},a=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return(0,i.isAsync)(a)?a.then(t=>({status:"valid",value:"valid"===t.status?t.value:this._def.catchValue({get error(){return new e.ZodError(r.common.issues)},input:r.data})})):{status:"valid",value:"valid"===a.status?a.value:this._def.catchValue({get error(){return new e.ZodError(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}a5.ZodCatch=pe,pe.create=(e,t)=>new pe({innerType:e,typeName:we.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:()=>t.catch,...s(t)});class fe extends l{_parse(t){if(this._getType(t)!==r.ZodParsedType.nan){const n=this._getOrReturnCtx(t);return(0,i.addIssueToContext)(n,{code:e.ZodIssueCode.invalid_type,expected:r.ZodParsedType.nan,received:n.parsedType}),i.INVALID}return{status:"valid",value:t.data}}}a5.ZodNaN=fe,fe.create=e=>new fe({typeName:we.ZodNaN,...s(e)}),a5.BRAND=Symbol("zod_brand");class ge extends l{_parse(e){const{ctx:t}=this._processInputParams(e),n=t.data;return this._def.type._parse({data:n,path:t.path,parent:t})}unwrap(){return this._def.type}}a5.ZodBranded=ge;class _e extends l{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.common.async){return(async()=>{const e=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return"aborted"===e.status?i.INVALID:"dirty"===e.status?(t.dirty(),(0,i.DIRTY)(e.value)):this._def.out._parseAsync({data:e.value,path:n.path,parent:n})})()}{const e=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return"aborted"===e.status?i.INVALID:"dirty"===e.status?(t.dirty(),{status:"dirty",value:e.value}):this._def.out._parseSync({data:e.value,path:n.path,parent:n})}}static create(e,t){return new _e({in:e,out:t,typeName:we.ZodPipeline})}}a5.ZodPipeline=_e;class ve extends l{_parse(e){const t=this._def.innerType._parse(e),n=e=>((0,i.isValid)(e)&&(e.value=Object.freeze(e.value)),e);return(0,i.isAsync)(t)?t.then(e=>n(e)):n(t)}unwrap(){return this._def.innerType}}function ye(e,t){const n="function"==typeof e?e(t):"string"==typeof e?{message:e}:e;return"string"==typeof n?{message:n}:n}function be(e,t={},n){return e?H.create().superRefine((i,r)=>{const a=e(i);if(a instanceof Promise)return a.then(e=>{if(!e){const e=ye(t,i),a=e.fatal??n??!0;r.addIssue({code:"custom",...e,fatal:a})}});if(!a){const e=ye(t,i),a=e.fatal??n??!0;r.addIssue({code:"custom",...e,fatal:a})}}):H.create()}var we,Se;a5.ZodReadonly=ve,ve.create=(e,t)=>new ve({innerType:e,typeName:we.ZodReadonly,...s(t)}),a5.late={object:$.lazycreate},(Se=we||(a5.ZodFirstPartyTypeKind=we={})).ZodString="ZodString",Se.ZodNumber="ZodNumber",Se.ZodNaN="ZodNaN",Se.ZodBigInt="ZodBigInt",Se.ZodBoolean="ZodBoolean",Se.ZodDate="ZodDate",Se.ZodSymbol="ZodSymbol",Se.ZodUndefined="ZodUndefined",Se.ZodNull="ZodNull",Se.ZodAny="ZodAny",Se.ZodUnknown="ZodUnknown",Se.ZodNever="ZodNever",Se.ZodVoid="ZodVoid",Se.ZodArray="ZodArray",Se.ZodObject="ZodObject",Se.ZodUnion="ZodUnion",Se.ZodDiscriminatedUnion="ZodDiscriminatedUnion",Se.ZodIntersection="ZodIntersection",Se.ZodTuple="ZodTuple",Se.ZodRecord="ZodRecord",Se.ZodMap="ZodMap",Se.ZodSet="ZodSet",Se.ZodFunction="ZodFunction",Se.ZodLazy="ZodLazy",Se.ZodLiteral="ZodLiteral",Se.ZodEnum="ZodEnum",Se.ZodEffects="ZodEffects",Se.ZodNativeEnum="ZodNativeEnum",Se.ZodOptional="ZodOptional",Se.ZodNullable="ZodNullable",Se.ZodDefault="ZodDefault",Se.ZodCatch="ZodCatch",Se.ZodPromise="ZodPromise",Se.ZodBranded="ZodBranded",Se.ZodPipeline="ZodPipeline",Se.ZodReadonly="ZodReadonly";a5.instanceof=(e,t={message:`Input not instance of ${e.name}`})=>be(t=>t instanceof e,t);const ke=L.create;a5.string=ke;const Ce=M.create;a5.number=Ce;const Ee=fe.create;a5.nan=Ee;const xe=D.create;a5.bigint=xe;const Ie=N.create;a5.boolean=Ie;const Te=F.create;a5.date=Te;const Oe=B.create;a5.symbol=Oe;const Re=j.create;a5.undefined=Re;const Ae=V.create;a5.null=Ae;const Le=H.create;a5.any=Le;const Pe=z.create;a5.unknown=Pe;const Me=U.create;a5.never=Me;const De=G.create;a5.void=De;const Ne=W.create;a5.array=Ne;const Fe=$.create;a5.object=Fe;const Be=$.strictCreate;a5.strictObject=Be;const je=X.create;a5.union=je;const Ve=Z.create;a5.discriminatedUnion=Ve;const He=Q.create;a5.intersection=He;const ze=J.create;a5.tuple=ze;const Ue=ee.create;a5.record=Ue;const Ge=te.create;a5.map=Ge;const We=ne.create;a5.set=We;const Ye=ie.create;a5.function=Ye;const $e=re.create;a5.lazy=$e;const Xe=ae.create;a5.literal=Xe;const qe=se.create;a5.enum=qe;const Ze=le.create;a5.nativeEnum=Ze;const Ke=ue.create;a5.promise=Ke;const Qe=ce.create;a5.effect=Qe,a5.transformer=Qe;const Je=de.create;a5.optional=Je;const et=he.create;a5.nullable=et;const tt=ce.createWithPreprocess;a5.preprocess=tt;const nt=_e.create;a5.pipeline=nt;a5.ostring=()=>ke().optional();a5.onumber=()=>Ce().optional();return a5.oboolean=()=>Ie().optional(),a5.coerce={string:e=>L.create({...e,coerce:!0}),number:e=>M.create({...e,coerce:!0}),boolean:e=>N.create({...e,coerce:!0}),bigint:e=>D.create({...e,coerce:!0}),date:e=>F.create({...e,coerce:!0})},a5.NEVER=i.INVALID,a5}function u5(){return e5||(e5=1,e=F9,t=F9&&F9.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=F9&&F9.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)},Object.defineProperty(e,"__esModule",{value:!0}),n(W9(),e),n(X9(),e),n(K9(),e),n(z9(),e),n(l5(),e),n(U9(),e)),F9;var e,t,n}function c5(){return t5||(t5=1,function(e){var t=N9&&N9.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=N9&&N9.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=N9&&N9.__importStar||function(e){if(e&&e.__esModule)return e;var i={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&t(i,e,r);return n(i,e),i},r=N9&&N9.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),e.z=void 0;const a=i(u5());e.z=a,r(u5(),e),e.default=a}(N9)),N9}function d5(){if(n5)return D9;n5=1,Object.defineProperty(D9,"__esModule",{value:!0}),D9.recommendationPropsSchema=D9.calculatorParamsSchema=D9.activitySchema=D9.activityReductionSchema=void 0;var e=c5(),t=NL(),n=r4();const i=(t,n)=>e.z.number().refine(e=>e>=t.min&&e<=t.max,{message:n}),r=D9.activityReductionSchema=e.z.object({fromZero:i(n.ACTIVITY_SETTINGS_INTERVAL_LIMITS),fromThirty:i(n.ACTIVITY_SETTINGS_INTERVAL_LIMITS),fromFortysix:i(n.ACTIVITY_SETTINGS_INTERVAL_LIMITS)}),a=D9.activitySchema=e.z.object({activityDuration:i(n.ACTIVITY_DURATION_MINUTES_LIMITS),activityIntensity:e.z.nativeEnum(t.ActivityIntensity).nullable(),activitySettings:e.z.object({light:r,moderate:r,hard:e.z.object({...r.shape,fromFortysix:i(n.ACTIVITY_SETTINGS_INTERVAL_LIMITS).nullable()}),post:r,target:i(n.ACTIVITY_TARGET_BGL_MMOL_LIMITS)}),activityDate:e.z.date()}).nullable(),o=D9.calculatorParamsSchema=e.z.object({currentBGL:i(n.CURRENT_BGL_MMOL_LIMITS).nullable(),targetBGL:i(n.TARGET_BGL_MMOL_LIMITS),insulinSensitivity:i(n.INSULIN_SENSITIVITY_MMOL_LIMITS),carbohydrates:i(n.CARBOHYDRATES_LIMITS),carbohydrateRatio:i(n.INSULIN_TO_CARBS_RATIO_LIMITS),recentBoluses:e.z.array(e.z.object({secondsPassed:i(n.BOLUS_SECONDS_PASSED_LIMITS),insulinDose:i(n.INSULIN_DOSE_LIMITS)})),activity:a});return D9.recommendationPropsSchema=e.z.object({bloodGlucoseUnit:e.z.nativeEnum(t.BloodGlucoseUnit),injectionMethod:e.z.nativeEnum(t.InjectionMethod),language:e.z.string().refine(e=>Object.keys(t.Languages).includes(e)),calculatorParams:o}),D9}function h5(){if(i5)return B3;i5=1,Object.defineProperty(B3,"__esModule",{value:!0}),B3.default=B3.SyncStatus=B3.RecommendationScreen=void 0;var e=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=T(t);if(n&&n.has(e))return n.get(e);var i={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&{}.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(i,a,o):i[a]=e[a]}return i.default=e,n&&n.set(e,i),i}(S()),t=JB,n=j3,i=xq(),r=NL(),a=I(f4()),o=I(G4()),s=I(function(){if(W4)return Y4;W4=1,Object.defineProperty(Y4,"__esModule",{value:!0}),Y4.default=void 0,function(e){e&&e.__esModule}(S());var e=JB,t=J3(),n=l();const i=e.StyleSheet.create({container:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",width:"100%"},line:{width:8,height:1,borderRadius:4,backgroundColor:t.COLORS.borderDivider}});return Y4.default=function(){const t=Array.from({length:25},(e,t)=>`dot-${t}`);return(0,n.jsx)(e.View,{style:i.container,children:t.map(t=>(0,n.jsx)(e.View,{testID:t,style:i.line},t))})},Y4}()),u=I(t9()),c=I(function(){if(n9)return i9;n9=1,Object.defineProperty(i9,"__esModule",{value:!0}),i9.default=void 0,a(S());var e=JB,t=s4(),n=J3(),i=a(p4()),r=l();function a(e){return e&&e.__esModule?e:{default:e}}const o=e.StyleSheet.create({container:{justifyContent:"flex-end",gap:16,backgroundColor:n.COLORS.bgNavigationBar,padding:16},saveButton:{paddingHorizontal:16,paddingVertical:12,backgroundColor:n.COLORS.bgBrand,borderRadius:16,borderColor:n.COLORS.borderOnBrand,borderWidth:1},deleteButton:{paddingHorizontal:16,paddingVertical:12,backgroundColor:n.COLORS.bgButtonSecondary,borderRadius:16},saveText:{...n.FONTS.Poppins.semiBold_Base,textAlign:"center"},deleteText:{...n.FONTS.Poppins.semiBold_Base,color:n.COLORS.textSecondaryDanger,textAlign:"center"}});return i9.default=function({prefixTestID:n,onSave:a,onDelete:s,onLayout:l}){const{t:u}=(0,t.useLanguage)();return(0,r.jsxs)(e.View,{style:o.container,onLayout:l,testID:n+"-footer",children:[(0,r.jsx)(e.TouchableOpacity,{style:o.saveButton,onPress:a,testID:n+"-footer-save-button",children:(0,r.jsx)(i.default,{style:o.saveText,children:u("button_save")})}),(0,r.jsx)(e.TouchableOpacity,{style:o.deleteButton,onPress:s,testID:n+"-footer-delete-button",children:(0,r.jsx)(i.default,{style:o.deleteText,children:u("button_delete")})})]})},i9}()),d=I(function(){if(l9)return r9;l9=1,Object.defineProperty(r9,"__esModule",{value:!0}),r9.default=void 0;var e=d(a9),t=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=c(t);if(n&&n.has(e))return n.get(e);var i={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&{}.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(i,a,o):i[a]=e[a]}return i.default=e,n&&n.set(e,i),i}(S()),n=JB,i=vA,r=J3(),a=d(o9),o=d(s9),s=s4(),u=l();function c(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(c=function(e){return e?n:t})(e)}function d(e){return e&&e.__esModule?e:{default:e}}const h=n.Animated.createAnimatedComponent(e.default),m=n.StyleSheet.create({containerEdit:{justifyContent:"center",alignContent:"center",paddingVertical:7.25,height:64,borderTopLeftRadius:12,borderTopRightRadius:12,backgroundColor:r.COLORS.bgRecommendationCorrection},containerRecommendation:{justifyContent:"center",alignContent:"center",height:64},headerTextCrossed:{textDecorationLine:"line-through",color:r.COLORS.textOnRecommendationStrikethrough},headerText:{...r.FONTS.Poppins.medium_Base,color:r.COLORS.textOnRecommendation,textAlign:"center",letterSpacing:1.6},background:{height:64,overflow:"hidden",position:"absolute",top:0,borderTopLeftRadius:12,borderTopRightRadius:12,justifyContent:"center"},lottie:{height:128}});return r9.default=function({isEdited:e}){const{t:r}=(0,s.useLanguage)(),{width:l}=(0,n.useWindowDimensions)(),c=(0,i.useReducedMotion)(),d=(0,t.useRef)(null),p=(0,t.useRef)(null);return(0,t.useEffect)(()=>{const t=e?d.current:p.current;c?t?.pause():t?.play()},[c,e]),e?(0,u.jsxs)(n.View,{style:m.containerEdit,testID:"edited-recommendation-header",children:[(0,u.jsx)(n.View,{style:m.background,children:(0,u.jsx)(h,{ref:d,source:a.default,resizeMode:"cover",style:m.lottie,webStyle:m.lottie})}),(0,u.jsx)(n.Text,{style:[m.headerText,m.headerTextCrossed],children:r("recommendation_card_title").toUpperCase()}),(0,u.jsx)(n.Text,{style:m.headerText,children:r("recommendation_change_title").toUpperCase()})]}):(0,u.jsxs)(n.View,{style:m.containerRecommendation,testID:"initial-recommendation-header",children:[(0,u.jsx)(n.View,{style:[m.background,{width:l-32}],children:(0,u.jsx)(h,{ref:p,source:o.default,resizeMode:"cover",style:m.lottie,webStyle:m.lottie})}),(0,u.jsx)(n.Text,{style:m.headerText,children:r("recommendation_card_title").toUpperCase()})]})},r9}()),h=I(function(){if(u9)return c9;u9=1,Object.defineProperty(c9,"__esModule",{value:!0}),c9.default=void 0;var e=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=m(t);if(n&&n.has(e))return n.get(e);var i={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&{}.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(i,a,o):i[a]=e[a]}return i.default=e,n&&n.set(e,i),i}(S()),t=JB,n=NL(),i=h(w4()),r=r4(),a=s4(),o=J3(),s=c4(),u=h(p4()),c=h(U4()),d=l();function h(e){return e&&e.__esModule?e:{default:e}}function m(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(m=function(e){return e?n:t})(e)}const p=t.StyleSheet.create({container:{paddingVertical:48,justifyContent:"center",alignItems:"center"},title:{...o.FONTS.Poppins.medium_Base,color:o.COLORS.textInputTextSecondary},row:{flexDirection:"row",marginVertical:8,alignItems:"center"},value:{...o.FONTS.Poppins.bold_6XL,color:o.COLORS.text},crossedValue:{...o.FONTS.Poppins.bold_2XL,color:o.COLORS.textInputTextSecondary,textDecorationLine:"line-through",opacity:.4},crossedUnit:{...o.FONTS.Poppins.bold_2XL,color:o.COLORS.textInputTextSecondary},unit:{...o.FONTS.Poppins.bold_2XL,color:o.COLORS.text,lineHeight:78},editIcon:{marginLeft:4}});return c9.default=function({initialValue:o,editedValue:l,wasLimited:h,injectionMethod:m,onDismiss:f,onConfirm:g}){const{t:_}=(0,a.useLanguage)(),[v,y]=(0,e.useState)(!1),b=(0,e.useCallback)(()=>{y(!0)},[]),w=(0,e.useCallback)(()=>{y(!1)},[]),S=(0,e.useCallback)(e=>{y(!1),g(e)},[g]),k=(0,e.useMemo)(()=>{const{min:e,max:t}=r.INSULIN_DOSE_LIMITS,i=h?o:t;return m===n.InjectionMethod.Pump?(0,s.createSequentialArrayDecimal)(e,i):m===n.InjectionMethod.PenWhole?(0,s.createSequentialArrayInteger)(e,i):(0,s.createSequentialArrayHalf)(e,i)},[m,o,h]),C=(0,e.useMemo)(()=>m===n.InjectionMethod.PenWhole?0:1,[m]),E=(0,e.useCallback)(()=>{if(null!==l)return k.findIndex(e=>e===l.toFixed(C));const e=(0,s.roundInsulinValue)(o,m);return k.findIndex(t=>t===e.toFixed(C))},[l,o,k,m,C]);return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)(t.View,{style:p.container,children:[null!==l&&(0,d.jsxs)(u.default,{style:p.crossedValue,testID:"insulin-initial-value",children:[`${o} `,(0,d.jsx)(u.default,{style:p.crossedUnit,testID:"insulin-initial-unit",children:_(1===o?"unit":"units")})]}),(0,d.jsxs)(t.TouchableOpacity,{style:p.row,testID:"insulin-current-value-container",onPress:b,children:[(0,d.jsxs)(u.default,{style:p.value,testID:"insulin-value",children:[`${l??o} `,(0,d.jsx)(u.default,{style:p.unit,testID:"insulin-unit",children:_(1===(l??o)?"unit":"units")})]}),(0,d.jsx)(t.TouchableOpacity,{onPress:b,testID:"insulin-edit-button",hitSlop:10,children:(0,d.jsx)(i.default,{style:p.editIcon})})]}),(0,d.jsx)(u.default,{style:p.title,testID:"insulin-display-title",children:_("recommendation_rapid_title")})]}),(0,d.jsx)(c.default,{type:"insulin",items:k,isVisible:v,initialScrollIndex:E(),onConfirm:S,onCancel:w,onDismiss:f})]})},c9}()),m=I(function(){if(h9)return m9;h9=1,Object.defineProperty(m9,"__esModule",{value:!0}),m9.default=void 0,o(S());var e=JB,t=s4(),n=o(p4()),i=o(P4()),r=f9(),a=l();function o(e){return e&&e.__esModule?e:{default:e}}return m9.default=o=>{const{isVisible:s,onPressClose:l}=o,{t:u}=(0,t.useLanguage)();return(0,a.jsx)(i.default,{isVisible:s,children:(0,a.jsxs)(e.View,{testID:"delete-failure-modal-visible-"+s,children:[(0,a.jsx)(n.default,{style:r.styles.title,testID:"delete-modal-failure-title",children:u("new_activity_modal_no_delete_title")}),(0,a.jsx)(n.default,{style:r.styles.message,testID:"delete-modal-failure-message",children:u("new_activity_modal_no_delete_body")}),(0,a.jsx)(e.TouchableOpacity,{style:r.styles.deleteFailureCloseButton,onPress:l,testID:"delete-modal-failure-close-button",children:(0,a.jsx)(n.default,{style:r.styles.buttonText,children:u("button_close")})})]})})},m9}()),p=I(function(){if(g9)return _9;g9=1,Object.defineProperty(_9,"__esModule",{value:!0}),_9.default=void 0,o(S());var e=JB,t=s4(),n=o(p4()),i=o(P4()),r=f9(),a=l();function o(e){return e&&e.__esModule?e:{default:e}}return _9.default=o=>{const{isVisible:s,onPressDelete:l,onPressCancel:u,onDismiss:c}=o,{t:d}=(0,t.useLanguage)();return(0,a.jsx)(i.default,{onModalHide:c,isVisible:s,children:(0,a.jsxs)(e.View,{testID:"delete-modal-visible-"+s,children:[(0,a.jsx)(n.default,{style:r.styles.title,testID:"delete-modal-title",children:d("recommendation_modal_delete_rec_title")}),(0,a.jsx)(n.default,{style:r.styles.message,testID:"delete-modal-message",children:d("recommendation_modal_delete_rec_body")}),(0,a.jsxs)(e.View,{style:r.styles.buttonContainer,children:[(0,a.jsx)(e.TouchableOpacity,{style:r.styles.deleteRedButton,onPress:l,testID:"delete-modal-delete-button",children:(0,a.jsx)(n.default,{style:r.styles.buttonText,children:d("recommendation_modal_delete_rec_button_danger_delete")})}),(0,a.jsx)(e.TouchableOpacity,{style:r.styles.cancelButton,onPress:u,testID:"delete-modal-cancel-button",children:(0,a.jsx)(n.default,{style:r.styles.buttonText,children:d("button_cancel")})})]})]})})},_9}()),f=I(function(){if(v9)return y9;v9=1,Object.defineProperty(y9,"__esModule",{value:!0}),y9.default=void 0,o(S());var e=JB,t=s4(),n=o(p4()),i=o(P4()),r=f9(),a=l();function o(e){return e&&e.__esModule?e:{default:e}}return y9.default=o=>{const{isVisible:s,onPressClose:l}=o,{t:u}=(0,t.useLanguage)();return(0,a.jsx)(i.default,{isVisible:s,children:(0,a.jsxs)(e.View,{testID:"edit-failure-modal-visible-"+s,children:[(0,a.jsx)(n.default,{style:r.styles.title,testID:"edit-modal-failure-title",children:u("glucose_modal_changes_title")}),(0,a.jsx)(n.default,{style:r.styles.message,testID:"edit-modal-failure-message",children:u("glucose_modal_changes_body")}),(0,a.jsx)(e.TouchableOpacity,{style:r.styles.deleteFailureCloseButton,onPress:l,testID:"edit-modal-failure-close-button",children:(0,a.jsx)(n.default,{style:r.styles.buttonText,children:u("glucose_modal_changes_button_confirm")})})]})})},y9}()),g=I(function(){if(b9)return w9;b9=1,Object.defineProperty(w9,"__esModule",{value:!0}),w9.default=void 0,w9.getLimitedValue=d;var e=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=c(t);if(n&&n.has(e))return n.get(e);var i={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&{}.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(i,a,o):i[a]=e[a]}return i.default=e,n&&n.set(e,i),i}(S()),t=JB,n=NL(),i=s4(),r=u(p4()),a=u(P4()),o=f9(),s=l();function u(e){return e&&e.__esModule?e:{default:e}}function c(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(c=function(e){return e?n:t})(e)}function d(e){return n.CONSTANTS.INSULIN_DOSE_MAX-n.CONSTANTS.INSULIN_DOSE_MAX*e}return w9.default=l=>{const{isVisible:u,activityReduction:c,onPress:h}=l,{t:m}=(0,i.useLanguage)(),p=(0,e.useMemo)(()=>null===c?m("recommendation_modal_safety_limitation_body",{SAFETY_INSULIN_LIMIT:`${n.CONSTANTS.INSULIN_DOSE_MAX}`}):m("recommendation_modal_safety_limitation2_body",{0:`${d(c)}`,SAFETY_INSULIN_LIMIT:`${n.CONSTANTS.INSULIN_DOSE_MAX}`,1:`${(100*c).toFixed(0)}`,2:`${d(c)}`}),[c,m]);return(0,s.jsx)(a.default,{isVisible:u,children:(0,s.jsxs)(t.View,{testID:"limitation-modal-visible-"+u,children:[(0,s.jsx)(r.default,{style:o.styles.title,children:m("recommendation_modal_safety_limitation_title")}),(0,s.jsx)(r.default,{style:o.styles.message,testID:"limitation-modal-message",children:p}),(0,s.jsx)(t.TouchableOpacity,{style:o.styles.button,onPress:h,testID:"limitation-modal-button",children:(0,s.jsx)(r.default,{style:o.styles.buttonText,children:m("button_understood")})})]})})},w9}()),_=I(function(){if(S9)return k9;S9=1,Object.defineProperty(k9,"__esModule",{value:!0}),k9.default=void 0,o(S());var e=JB,t=s4(),n=o(p4()),i=o(P4()),r=f9(),a=l();function o(e){return e&&e.__esModule?e:{default:e}}return k9.default=o=>{const{isVisible:s,onPressClose:l}=o,{t:u}=(0,t.useLanguage)();return(0,a.jsx)(i.default,{isVisible:s,children:(0,a.jsxs)(e.View,{testID:"save-failure-modal-visible-"+s,children:[(0,a.jsx)(n.default,{style:r.styles.title,testID:"save-modal-failure-title",children:u("no_save_modal_title")}),(0,a.jsx)(n.default,{style:r.styles.message,testID:"save-modal-failure-message",children:u("no_save_modal_body")}),(0,a.jsx)(e.TouchableOpacity,{style:r.styles.deleteFailureCloseButton,onPress:l,testID:"save-modal-failure-close-button",children:(0,a.jsx)(n.default,{style:r.styles.buttonText,children:u("button_close")})})]})})},k9}()),v=I(function(){if(C9)return E9;C9=1,Object.defineProperty(E9,"__esModule",{value:!0}),E9.default=void 0,o(S());var e=JB,t=s4(),n=o(p4()),i=o(P4()),r=f9(),a=l();function o(e){return e&&e.__esModule?e:{default:e}}return E9.default=o=>{const{isVisible:s,onPressViewInLogbook:l,onPressCancel:u,onDismiss:c}=o,{t:d}=(0,t.useLanguage)(),h="web"===e.Platform.OS;return(0,a.jsx)(i.default,{checkmark:!0,onModalHide:c,isVisible:s,children:(0,a.jsxs)(e.View,{testID:"timeout-modal-visible-"+s,children:[(0,a.jsx)(n.default,{style:r.styles.title,testID:"timeout-modal-title",children:d("recommendation_modal_auto_saved_title")}),(0,a.jsx)(n.default,{style:r.styles.message,testID:"timeout-modal-message",children:d("recommendation_modal_auto_saved_body")}),(0,a.jsxs)(e.View,{style:r.styles.buttonContainer,children:[!h&&(0,a.jsx)(e.TouchableOpacity,{style:r.styles.saveButton,onPress:l,testID:"timeout-modal-view-button",children:(0,a.jsx)(n.default,{style:r.styles.saveText,children:d("recommendation_modal_auto_saved_button_confirm")})}),(0,a.jsx)(e.TouchableOpacity,{style:r.styles.cancelButton,onPress:u,testID:"timeout-modal-close-button",children:(0,a.jsx)(n.default,{style:r.styles.closeText,children:d("button_close")})})]})]})})},E9}()),y=I(R9()),b=r4(),w=s4(),k=J3(),C=c4(),E=d5(),x=l();function I(e){return e&&e.__esModule?e:{default:e}}function T(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(T=function(e){return e?n:t})(e)}let O=B3.SyncStatus=function(e){return e.Idle="Idle",e.Success="Success",e.Loading="Loading",e.Failure="Failure",e}({});const R=l=>{const S=(0,n.useSafeAreaInsets)(),{changeLanguage:k}=(0,w.useLanguage)();"android"===t.Platform.OS&&t.UIManager.setLayoutAnimationEnabledExperimental?.(!0);const{height:I}=(0,t.useWindowDimensions)(),T=(0,e.useMemo)(()=>I-S.bottom-S.top,[I,S.bottom,S.top]),R=(0,e.useRef)(null),{deleteStatus:L,editStatus:P,saveStatus:M,calculatorParams:D,bloodGlucoseUnit:N,injectionMethod:F,transferEditedRecommendation:B,closeCalculationFooter:j,closeCalculationTimeoutModal:V,deleteCalculation:H,closeCalculationViewInlogbook:z,trackRecommendationTimeout:U,trackExpandDetails:G}=l,{currentBGL:W,carbohydrates:Y,activity:$}=D,X=(0,e.useRef)(new Date).current,q=(0,e.useRef)((0,i.calculateRecommendation)(D)).current,[Z,K]=(0,e.useState)(null),[Q,J]=(0,e.useState)(null),[ee,te]=(0,e.useState)(null),[ne,ie]=(0,e.useState)(null),[re,ae]=(0,e.useState)(0),[oe,se]=(0,e.useState)(0),[le,ue]=(0,e.useState)(0),[ce,de]=(0,e.useState)(!0),[he,me]=(0,e.useState)(!1),[pe,fe]=(0,e.useState)(!1),[ge,_e]=(0,e.useState)(!0),[ve,ye]=(0,e.useState)(!1),[be,we]=(0,e.useState)(!1),[Se,ke]=(0,e.useState)(!1),[Ce,Ee]=(0,e.useState)(!1),[xe,Ie]=(0,e.useState)(!1),[Te,Oe]=(0,e.useState)(!1),[Re,Ae]=(0,e.useState)(!1),[Le,Pe]=(0,e.useState)(!1),[Me,De]=(0,e.useState)(!1);(0,e.useEffect)(()=>{L===O.Failure&&Pe(!0)},[L]),(0,e.useEffect)(()=>{M===O.Failure&&Ae(!0)},[M]),(0,e.useEffect)(()=>{P===O.Success&&(K(Q),te(ne))},[L,P,ne,Q,M]),(0,e.useEffect)(()=>{E.recommendationPropsSchema.parse(l),k(l.language)},[k,l]),(0,e.useEffect)(()=>{q.wasLimited&&Oe(!0)},[q.wasLimited]),(0,e.useEffect)(()=>{const e=X.getTime(),t=setInterval(()=>{!((new Date).getTime()-e>b.TIMEOUT_MODAL_TRIGGER)||xe||Se||(ke(!0),Ie(!0),U())},1*r.Milliseconds.Second);return()=>clearInterval(t)},[Se,xe,X,U]);const Ne=(0,e.useCallback)(e=>{const t=X.getTime(),n=(new Date).getTime()-t>b.TIMEOUT_MODAL_TRIGGER;"active"===e&&n&&(Ie(!0),U())},[X,U]),Fe=(0,e.useCallback)(()=>(Ee(!0),!0),[]);(0,e.useEffect)(()=>{const e=t.AppState.addEventListener("change",Ne);let n=null;return"android"===t.Platform.OS&&(n=t.BackHandler.addEventListener("hardwareBackPress",Fe)),()=>{e.remove(),n?.remove()}},[Ne,Fe]);const Be=(0,e.useMemo)(()=>{if($)return{activityDuration:$.activityDuration,activityIntensity:$.activityIntensity,activityReduction:q.activityReduction}},[$,q.activityReduction]),je=(0,e.useCallback)(e=>{t.LayoutAnimation.configureNext(t.LayoutAnimation.Presets.easeInEaseOut);const n=(0,C.roundInsulinValue)(q.bolus,F),i=Math.round(q.carbRecommendation),r=e!==n?e:null;e!==n?J(e):(K(null),J(null)),B({modified:ee,suggested:i},{modified:r,suggested:n},X,q.activeInsulin,q.activityReduction)},[q,F,ee,B,X]),Ve=(0,e.useCallback)(e=>{t.LayoutAnimation.configureNext(t.LayoutAnimation.Presets.easeInEaseOut);const n=(0,C.roundInsulinValue)(q.bolus,F),i=Math.round(q.carbRecommendation),r=e!==i?e:null;e!==i?ie(e):(te(null),ie(null)),B({modified:r,suggested:i},{modified:Z,suggested:n},X,q.activeInsulin,q.activityReduction)},[q,F,Z,B,X]),He=(0,e.useCallback)(()=>{ve&&H()},[H,ve]),ze=(0,e.useCallback)(()=>{be?z():V()},[be,V,z]),Ue=(0,e.useCallback)(()=>{we(!0),Ie(!1)},[]),Ge=(0,e.useCallback)(()=>{ye(!0),Ee(!1)},[]),We=(0,e.useCallback)(()=>{P===O.Failure&&De(!0)},[P]),Ye=(0,e.useCallback)(()=>{De(!1)},[]),$e=(0,e.useCallback)((e,t)=>{ue(t)},[]),Xe=(0,e.useCallback)(()=>{R?.current?.scrollToEnd(),fe(!0),setTimeout(()=>_e(!1),1)},[]),qe=(0,e.useCallback)(e=>{const{layoutMeasurement:{height:t},contentOffset:{y:n}}=e.nativeEvent,i=Math.round(t+n),r=i>=le-re,a=i>=Math.round(le);me(r),ce&&de(!1),a&&fe(!0),a&&setTimeout(()=>_e(!1),1)},[re,le,ce]),Ze=(0,e.useMemo)(()=>Math.round(oe+re),[oe,re]);return Se?(0,x.jsx)(t.View,{style:A.timeoutContainer,children:(0,x.jsx)(t.View,{style:A.timeoutContainerBackground,children:(0,x.jsx)(v.default,{isVisible:xe,onPressViewInLogbook:Ue,onPressCancel:()=>Ie(!1),onDismiss:ze})})}):(0,x.jsxs)(x.Fragment,{children:[(0,x.jsxs)(t.ScrollView,{ref:R,scrollEventThrottle:16,style:A.scrollView,contentContainerStyle:[A.contentContainer,pe&&{paddingBottom:32}],testID:"recommendation-screen",onScroll:qe,onContentSizeChange:$e,children:[(0,x.jsxs)(t.View,{testID:"recommendation-content",onLayout:({nativeEvent:e})=>se(e.layout.height),style:A.contentRecommendationContainer,children:[(0,x.jsxs)(t.View,{style:A.recommendationContainer,children:[(0,x.jsx)(d.default,{isEdited:null!==Z}),(0,x.jsx)(h.default,{initialValue:(0,C.roundInsulinValue)(q.bolus,F),editedValue:Z,injectionMethod:F,wasLimited:q.wasLimited,onDismiss:We,onConfirm:je}),(0,x.jsx)(s.default,{}),(0,x.jsx)(u.default,{currentBGL:W,bloodGlucoseUnit:N,trackExpandDetails:G,carbIntakeValue:Math.round(Y),activeInsulin:Math.round(10*q.activeInsulin)/10,activity:Be})]}),(0,x.jsxs)(t.View,{style:A.extraRecommendationContainer,children:[Math.round(q.carbRecommendation)>0&&(0,x.jsx)(o.default,{carbsRecommendation:Math.round(q.carbRecommendation),editedCarbsRecommendation:ee,onDismiss:We,onConfirm:Ve}),(0,x.jsx)(a.default,{currentBGL:W,hasActivity:null!==$,glucoseUnit:N})]})]}),Ze>T&&ge&&(0,x.jsx)(c.default,{prefixTestID:"scroll",onSave:Xe,onDelete:Xe,onLayout:({nativeEvent:e})=>ae(e.layout.height)})]}),(0,x.jsx)(y.default,{scrollToEnd:Xe,isVisibleArrow:Ze>T&&ce,isVisibleBlur:Ze>T&&!he&&!pe}),(Ze<=T||pe)&&(0,x.jsx)(c.default,{prefixTestID:"fixed",onSave:j,onDelete:()=>Ee(!0),onLayout:({nativeEvent:e})=>ae(e.layout.height)}),(0,x.jsx)(g.default,{isVisible:Te,activityReduction:q.activityReduction,onPress:()=>Oe(!1)}),(0,x.jsx)(p.default,{isVisible:Ce,onPressDelete:Ge,onDismiss:He,onPressCancel:()=>Ee(!1)}),(0,x.jsx)(m.default,{isVisible:Le,onPressClose:()=>Pe(!1)}),(0,x.jsx)(_.default,{isVisible:Re,onPressClose:()=>Ae(!1)}),(0,x.jsx)(f.default,{isVisible:Me,onPressClose:Ye})]})};B3.RecommendationScreen=R;B3.default=e=>(0,x.jsx)(w.LanguageProvider,{children:(0,x.jsx)(R,{...e})});const A=t.StyleSheet.create({timeoutContainer:{...t.StyleSheet.absoluteFillObject,backgroundColor:k.COLORS.bgBackground},timeoutContainerBackground:{flex:1,opacity:.5},contentContainer:{backgroundColor:k.COLORS.bgBackground},contentRecommendationContainer:{gap:32,paddingVertical:32,backgroundColor:k.COLORS.bgBackground},extraRecommendationContainer:{paddingHorizontal:16},scrollView:{backgroundColor:k.COLORS.bgBackground,flex:1},recommendationContainer:{borderRadius:16,backgroundColor:k.COLORS.bgRecommendation,marginHorizontal:16}});return B3}var m5=(r5||(r5=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"RecommendationScreenWrapper",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(e,"SyncStatus",{enumerable:!0,get:function(){return t.SyncStatus}}),Object.defineProperty(e,"recommendationPropsSchema",{enumerable:!0,get:function(){return n.recommendationPropsSchema}});var t=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=i(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&{}.hasOwnProperty.call(e,o)){var s=a?Object.getOwnPropertyDescriptor(e,o):null;s&&(s.get||s.set)?Object.defineProperty(r,o,s):r[o]=e[o]}return r.default=e,n&&n.set(e,r),r}(h5()),n=d5();function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(i=function(e){return e?n:t})(e)}}(F3)),F3);function p5(e,t){const n=i$(e,"HH:mm"),i=function(e){const t=[];for(const n of e)t.push(nX(n.startTime,"HH:mm",new Date));return t}(t),r=nX(n,"HH:mm",new Date);for(let a=0;a<i.length;a++)if(f5(i[a],i[(a+1)%i.length],r))return t[a];throw new Error("[ParameterTimeIntervalsUtils::getDailyParameters] The parameter interval has not been found")}function f5(e,t,n){const i=s$(e,t),r=(a=n,+eY(e)===+eY(a)||s$(e,n));var a;const o=g5(e),s=g5(t,!i),l=g5(n,!r);return o<=l&&l<s}function g5(e,t){return e.getMinutes()+60*(e.getHours()+(t?24:0))}const _5=Ei.create({animationContainer:{flex:1,justifyContent:"center",alignItems:"center"},text:{..._L.bold_Base},animation:{width:327,height:327}}),v5=rF(function({setRemeasurementNotification:e}){const{t:t,language:n}=eV(),{glucoseMMOLL:i,glucoseSampleID:r}=V2(),{selectedEventUUID:a}=I2(),{carbohydrateStoreActions:o,manualCarbsInput:s,totalCarbsCartItems:l}=EX(),u=Gp(),c=M.useRef(!1),[d,h]=D.useState(!1),[m,p]=D.useState(null),[f,g]=D.useState(null),{glucoseUnit:_,injectionMethod:v,activity:y}=Vq;if(void 0===_)throw new Error("[LoadingRecommendationScreen::render] glucoseUnit is undefined");if(void 0===v)throw new Error("[LoadingRecommendationScreen::render] injectionMethod is undefined");if(void 0===y)throw new Error("[LoadingRecommendationScreen::render] activity is undefined");if(null===i)throw new Error("[LoadingRecommendationScreen::render] glucoseMMOLL is undefined");const b=M.useMemo(()=>a?Lq.getByUUID(a):null,[a]),w=M.useMemo(()=>null!==b&&b.startTimestamp?{activitySettings:y,activityDate:new Date(b.startTimestamp),activityDuration:b.durationSeconds/60,activityIntensity:b.activityIntensity}:null,[y,b]),{carbohydrateRatio:S,insulinSensitivity:k}=M.useMemo(()=>function(e){const t=Vq.treatmentParameters?.use===FL.Usage.Overall,{treatmentParameters:n}=Vq;if(void 0===n)throw new Error("[ParameterTimeIntervalsUtils::getInsulinParameters] treatmentParameters is undefined.");return t?n.overallParameters:p5(e,n.parameterIntervals)}(new Date),[]),{target:C}=M.useMemo(()=>function(e){const{glucoseLevelTargets:t}=Vq;if(void 0===t)throw new Error("[ParameterTimeIntervalsUtils::getBGLParameters] glucoseLevelTargets is undefined.");const n=t.use===FL.Usage.Overall,{overallTargetBGL:i,targetBGLIntervals:r}=t;if(n){if(void 0===i)throw new Error("[ParameterTimeIntervalsUtils::getBGLParameters] overallTargetBGL cannot be undefined");return i}if(void 0===r)throw new Error("[ParameterTimeIntervalsUtils::getBGLParameters] targetBGLIntervals cannot be undefined");return p5(e,r)}(new Date),[]),E=M.useMemo(()=>UQ.getRecentBoluses(),[]),x=M.useMemo(()=>({bloodGlucoseUnit:_,injectionMethod:v,language:n,calculatorParams:{currentBGL:i,activity:w,carbohydrateRatio:S,insulinSensitivity:k,carbohydrates:s+l,targetBGL:C,recentBoluses:E}}),[_,v,i,w,S,k,s,l,C,E,n]),I=M.useCallback(async()=>{const t=m5.recommendationPropsSchema.safeParse(x);if(!t.success)return NX(MX.RecommendationInvalid),console.error(t.error),void g(tV.Validation);const{activeInsulin:n,carbRecommendation:a,bolus:u,activityReduction:c}=Iq.calculateRecommendation(x.calculatorParams),d=Math.round(a),h=((e,t)=>{const n={[FL.InjectionMethod.PenWhole]:1,[FL.InjectionMethod.PenHalf]:2,[FL.InjectionMethod.Pump]:10}[t];return Math.round(e*n)/n})(u,v),m=new Date,f=s+l,_=await UQ.addLogbook(NQ({blood_glucose_millimolar:i,blood_glucose_millimolar_sample_id:r,entry_timestamp:m,event_uuid:b?b.uuid:null,carbohydrates_suggested_grams:d,carbohydrates_entered_grams:f+d,insulin_entered_units:h,insulin_suggested_units:h,active_insulin:n,activity_reduction:c}));null!==_?(null!==_.blood_glucose_millimolar&&void 0!==e&&await e(_.blood_glucose_millimolar),o.checkoutCart().catch(console.error),p(_),NX(MX.RecommendationSuccess)):g(tV.Sync)},[x,o,b,i,r,v,s,e,l]);return c.current||(c.current=!0,I().catch(console.error)),M.useEffect(()=>{setTimeout(()=>{h(!0)},1600)},[]),M.useEffect(()=>{u.setOptions({gestureEnabled:!1});return u.addListener("beforeRemove",({preventDefault:e})=>{d||e()})},[d,u]),M.useEffect(()=>{d&&null!==m&&null===f&&u.replace(C2.Recommendation,{...x,logbookEntry:m}),d&&null!==f&&u.navigate({name:C2.SummaryTab,params:{errorType:f}})},[f,d,m,x,u]),D.createElement(ga,{style:_5.animationContainer},D.createElement(qV,{autoPlay:!0,source:KV.LOADING_RECOMMENDATION,style:_5.animation,webStyle:_5.animation,resizeMode:"cover",loop:!0}),D.createElement(pj,{style:_5.text},t("recommendation_loading_title")))});const y5=oV?"/api/v2":zj.HEDIA_API_URL_V2;function b5(){const e=Gp(),t=cf(),{manualCarbsInput:n,totalCarbsCartItems:i}=EX(),[r,a]=M.useState(m5.SyncStatus.Idle),[o,s]=M.useState(m5.SyncStatus.Idle),[l,u]=M.useState(m5.SyncStatus.Idle),{bloodGlucoseUnit:c,calculatorParams:d,injectionMethod:h,language:m,logbookEntry:p}=t.params,[f,g]=M.useState(p),_=M.useCallback(e=>{const t=e.data.state;oV&&t.routes[t.index].name===C2.CalculationBottomTabs&&(X2(),window.location.href="/redirect?status=success",qj.clearAll())},[]);M.useEffect(()=>(e.addListener("state",_),()=>{e.removeListener("state",_)}),[e,_]),M.useEffect(()=>{e.setOptions({gestureEnabled:!1})},[e]);const v=M.useCallback(async(e,t,r,a,o)=>{u(m5.SyncStatus.Loading);const s=n+i,l=NQ({...f,entry_timestamp:r,carbohydrates_suggested_grams:e.suggested,carbohydrates_overwritten_suggested_grams:e.modified,carbohydrates_entered_grams:s+(e.modified??e.suggested),insulin_entered_units:t.modified??t.suggested,insulin_suggested_units:t.suggested,active_insulin:a,activity_reduction:o}),c=await UQ.addLogbook(l,f.uuid);c?(g(c),u(m5.SyncStatus.Success)):u(m5.SyncStatus.Failure)},[n,f,i]),y=M.useCallback(()=>{if(oV)throw new Error("Recommendation::handleOnCloseCalculationViewInLogbook] Cannot view-in-logbook on web");const{Logbooks:t,LogbooksTab:n}=C2;e.navigate(n,{screen:t,params:{logbookEntry:f}}),X2()},[e,f]),b=M.useCallback(()=>{oV?(window.location.href="/redirect?status=success",qj.clearAll()):e.dispatch(wm(C2.DashboardTab,{screen:C2.Dashboard})),X2()},[e]),w=M.useCallback(async()=>{a(m5.SyncStatus.Loading);const t=await UQ.deleteLogbook(f.uuid);if(oV)t?(window.location.href="/redirect?status=success",X2(),qj.clearAll()):a(m5.SyncStatus.Failure);else{X2();const{Dashboard:t,DashboardTab:n}=C2;e.navigate(n,{screen:t,params:{action:nV.Deleted}})}},[f.uuid,e]),S=M.useCallback(async()=>{s(m5.SyncStatus.Loading);const t=()=>{s(m5.SyncStatus.Success),X2(),e.replace(C2.LeavingRecommendation,{logbookEntry:f})};if(oV){await(async()=>{let e;const t=new Promise((t,n)=>{e=setTimeout(()=>{n(new Error("Timeout exceeded"))},3e3)});try{return await Promise.race([fetch(`${y5}/basic/status`),t]),!0}catch(n){return console.error("API connection error:",n),!1}finally{clearTimeout(e)}})()?t():s(m5.SyncStatus.Failure)}else t()},[e,f]);return D.createElement(yH,{style:w5.container},D.createElement(m5.RecommendationScreenWrapper,{deleteStatus:r,saveStatus:o,editStatus:l,bloodGlucoseUnit:c,injectionMethod:h,language:m,calculatorParams:d,closeCalculationViewInlogbook:y,closeCalculationFooter:S,closeCalculationTimeoutModal:b,transferEditedRecommendation:v,deleteCalculation:w,trackExpandDetails:()=>{NX(MX.RecommendationViewDetailsPress)},trackRecommendationTimeout:()=>{NX(MX.RecommendationExpired)}}))}const w5=Ei.create({container:{flex:1,backgroundColor:wL.bgBackground}});function S5(){return D.useEffect(()=>{console.warn(`DateTimePicker is not supported on: ${lr.OS}`)},[]),null}const k5=(e,t)=>{const n=e.indexOf(t);return-1===n?0:n},C5=(e,t)=>{const n=new Date(e);return n.setHours(t,0,0,0),{date:n,formatted:i$(n,"HH:mm")}},E5=Array.from({length:60},(e,t)=>t.toString().padStart(2,"0"));const x5=D.memo(function({isVisible:e,initialValue:t,min:n,max:i,onCancel:r,onConfirm:a,onModalHide:o}){const{width:s}=vm(),l=M.useRef(null),u=M.useRef(null),[c,d]=M.useState(t),h=M.useMemo(()=>{if(!n||!i){const e=new Date;return Array.from({length:24},(t,n)=>C5(e,n))}const e=n.getHours(),t=i.getHours(),r=[];if(o=i,(a=n).getFullYear()===o.getFullYear()&&a.getMonth()===o.getMonth()&&a.getDate()===o.getDate()&&n<i&&e<=t)for(let i=e;i<=t;i++)r.push(C5(n,i));else{for(let t=e;t<24;t++)r.push(C5(n,t));for(let e=0;e<=t;e++)r.push(C5(i,e))}var a,o;return r},[n,i]),m=M.useMemo(()=>h.map(e=>i$(e.date,"HH")),[h]),p=M.useMemo(()=>{const[e]=i$(t,"HH:mm").split(":");return k5(m,e)},[t,m]),f=M.useMemo(()=>{const[,e]=i$(t,"HH:mm").split(":");return k5(E5,e)},[t]),g=M.useMemo(()=>{const[e]=i$(c,"HH:mm").split(":");return k5(m,e)},[c,m]),_=M.useMemo(()=>{const[,e]=i$(c,"HH:mm").split(":");return k5(E5,e)},[c]),v=M.useMemo(()=>n?k5(m,i$(n,"HH")):null,[n,m]),y=M.useMemo(()=>i?k5(m,i$(i,"HH")):null,[i,m]),b=M.useMemo(()=>n?parseInt(i$(n,"mm"),10):null,[n]),w=M.useMemo(()=>i?parseInt(i$(i,"mm"),10):null,[i]),S=M.useCallback((e,t)=>{const n=e<0||e>=m.length,i=t<0||t>=E5.length;if(n||i)return;const r=lX(h[e].date,{minutes:parseInt(E5[t],10),seconds:0,milliseconds:0});d(r)},[m.length,h]),k=M.useCallback(e=>{u.current?.scrollToIndex(e)},[]),C=M.useCallback(e=>{if(null===y||null===v||(null===w||null===b))return void S(e,_);let t=_;return e===v&&_<b?(t=b,k(b),void S(e,t)):e===y&&_>w?(t=w,k(w),void S(e,t)):void S(e,_)},[y,v,w,b,_,S,k]),E=M.useCallback(e=>{if(null===y||null===v||(null===w||null===b))return void S(g,e);let t=e;return g===v&&e<b?(t=b,k(b),void S(g,t)):g===y&&e>w?(t=w,k(w),void S(g,t)):void S(g,t)},[y,w,v,b,g,S,k]),x=M.useCallback(()=>{a(c)},[a,c]),I=M.useCallback(()=>{d(t),r()},[r,t]);return D.createElement(sz,{isVisible:e,containerStyle:I5.modalContainer,onModalHide:o},D.createElement(ga,null,D.createElement(ga,{style:I5.pickersContainer},D.createElement(t3,{key:"hours-wheel-picker",ref:l,initialScrollIndex:p,options:m,onChange:C,containerStyle:[I5.itemContainerLeft,{width:(s-32)/2}],selectedIndicatorStyle:[I5.selectedIndicatorLeft,{width:(s-32)/2-10}],itemStyle:I5.itemLeft,testID:"hours-wheel-picker"}),D.createElement(t3,{key:"minutes-wheel-picker",ref:u,initialScrollIndex:f,options:E5,onChange:E,containerStyle:[I5.itemContainerRight,{width:(s-32)/2}],selectedIndicatorStyle:[I5.selectedIndicatorRight,{width:(s-32)/2-10}],itemStyle:I5.itemRight,testID:"minutes-wheel-picker"})),D.createElement(ga,{style:I5.buttonContainer},D.createElement(q0,{onPress:x}),D.createElement($0,{onPress:I}))))}),I5=Ei.create({modalContainer:{backgroundColor:wL.bgTransparent},buttonContainer:{gap:8},pickersContainer:{flexDirection:"row",borderTopLeftRadius:13,borderTopRightRadius:13,overflow:"hidden"},itemContainerLeft:{borderTopRightRadius:0,paddingLeft:16},itemContainerRight:{borderTopLeftRadius:0,paddingRight:16},itemLeft:{alignSelf:"flex-end",marginRight:16},itemRight:{alignSelf:"flex-start",marginLeft:16},selectedIndicatorRight:{alignSelf:"flex-start",borderTopLeftRadius:0,borderBottomLeftRadius:0},selectedIndicatorLeft:{alignSelf:"flex-end",borderTopRightRadius:0,borderBottomRightRadius:0}}),T5=e=>{switch(e){case FL.InjectionMethod.PenWhole:return RX(FL.CONSTANTS.INSULIN_DOSE_MIN,FL.CONSTANTS.INSULIN_DOSE_MAX);case FL.InjectionMethod.PenHalf:return((e,t,n=.1)=>Array.from({length:Math.round((t-e)/n)+1},(t,i)=>(e+i*n).toFixed(1)))(FL.CONSTANTS.INSULIN_DOSE_MIN,FL.CONSTANTS.INSULIN_DOSE_MAX,.5);case FL.InjectionMethod.Pump:return AX(FL.CONSTANTS.INSULIN_DOSE_MIN,FL.CONSTANTS.INSULIN_DOSE_MAX);default:throw new Error("[insulin::getInsulinInputSequentialArray] Unsupported injection method!")}},O5=()=>{const{t:e}=eV(),{showDiscardCalculationModal:t,modalStoreActions:n}=z2(),{pop:i}=Gp(),[r,a]=M.useState(!1),o=M.useCallback(()=>{X2(),a(!0),n.set({showDiscardCalculationModal:!1})},[n]),s=M.useMemo(()=>[{testID:"discard-button",title:e("new_cal_modal_discard_cal_danger_button"),type:lj.Error,onPress:o},{testID:"cancel-button",title:e("button_cancel"),type:lj.Secondary,onPress:()=>{n.set({showDiscardCalculationModal:!1})}}],[o,n,e]);return D.createElement(sz,{key:"discard_calculation_modal",isVisible:t,title:e("new_cal_modal_discard_cal_title"),message:e("new_cal_modal_discard_cal_body"),onModalHide:()=>{r&&i()},buttons:s})};const R5=Ei.create({rightSlot:{flexDirection:"row",alignItems:"center"},insulinValueText:{..._L.medium_Base},separator:{width:1,backgroundColor:wL.borderDivider,alignSelf:"stretch",marginHorizontal:12}}),A5=D.memo(function({time:e,insulinValue:t,onEdit:n,testID:i}){const{t:r}=eV();return D.createElement(bj,{title:i$(e,"HH:mm"),onPress:n,testID:i,renderRightSlot:()=>D.createElement(ga,{style:R5.rightSlot},D.createElement(pj,{style:R5.insulinValueText},`${t} ${1!==parseFloat(t)?r("units"):r("unit")}`),D.createElement(ga,{style:R5.separator}),D.createElement(rQ,null))})});var L5=(e=>(e.Create="Create",e.Edit="Edit",e.Delete="Delete",e))(L5||{});function P5({renderRegisterInsulinButtons:e}){const{t:t}=eV(),{navigate:n,setOptions:i,replace:r,pop:a}=Gp(),o=cf(),{height:s}=vm(),l=M.useMemo(()=>s<667,[s]),[u,c]=M.useState([]),[d,h]=M.useState(null),[m,p]=M.useState(!1),f=M.useCallback(()=>{NX(MX.AbortCalculationPress),a()},[a]);M.useEffect(()=>{if(!oV){i({headerLeft:()=>D.createElement(K2,{onPress:f})})}},[f,i]),Wp(M.useCallback(()=>{const e=lX(dX(new Date),{seconds:0,milliseconds:0}),t=UQ.getLogbooks(e).map(e=>({uuid:e.uuid,time:e.entry_timestamp.toString(),insulinValue:e.insulin_entered_units?.toString()??""}));c(t)},[])),M.useEffect(()=>{if(!o.params)return;const{insulinEntryId:e}=o.params;h(e)},[o.params]);const g=M.useCallback(e=>{n(C2.RegisterActiveInsulin,{action:"Edit",insulinEntry:u.find(t=>t.uuid===e)})},[n,u]),_=M.useCallback(()=>{NX(MX.RecentInsulinContinuePress),r(C2.CalculationBottomTabs,{screen:C2.GlucoseTab})},[r]),v=M.useCallback(()=>{h(null)},[]),y=M.useMemo(()=>[{title:t("button_close"),onPress:()=>{p(!1)}}],[t]);return D.createElement(D.Fragment,null,D.createElement(Wo,{testID:"active_insulin_list",data:u,contentContainerStyle:D5.containerList,renderItem:({item:e,index:t})=>D.createElement(rj,{key:e.uuid,isAnimated:d===e.uuid,onAnimationFinished:v},D.createElement(A5,{time:e.time,testID:`entry-${t}`,insulinValue:e.insulinValue,onEdit:()=>{g(e.uuid)}})),ItemSeparatorComponent:M5,ListEmptyComponent:D.createElement(ga,{style:D5.emptyComponentList},D.createElement(mQ,null),D.createElement(pj,{style:D5.noInsulinText},t("Recent_insulin_empty_state_title"))),ListFooterComponent:()=>e(0===u.length),ListFooterComponentStyle:l?D5.smallScreenFooterList:D5.footerList,ListHeaderComponent:D.createElement(D.Fragment,null,u.length>0?D.createElement(pj,{style:D5.title},t("Recent_insulin_title",{timeFourHour:i$(dX(new Date),"HH:mm")})):D.createElement(pj,{style:D5.title},t("Recent_insulin_empty_title")),D.createElement(eh,{style:D5.infoTextContainer,onPress:()=>{p(!0)}},D.createElement(pj,{style:D5.infoText},t("Recent_insulin_link_modal")),D.createElement(lQ,{color:wL.iconBrand,width:16,height:16}))),ListHeaderComponentStyle:l?D5.smallScreenHeaderList:D5.headerList}),D.createElement(yH,{style:D5.footer,edges:["bottom"]},D.createElement(cj,{title:t("Recent_insulin_button_continue"),onPress:_,type:u.length>0?lj.Primary:lj.Secondary,style:D5.confirmButton})),D.createElement(sz,{key:"recent_insulin_info",isVisible:m,title:t("Recent_insulin_modal_title"),message:t("Recent_insulin_modal_body"),buttons:y}),D.createElement(O5,null))}const M5=()=>D.createElement(ga,{style:D5.separatorList}),D5=Ei.create({containerList:{paddingHorizontal:16},headerList:{paddingTop:32,paddingBottom:64,paddingHorizontal:16},smallScreenHeaderList:{paddingVertical:32},footerList:{paddingVertical:64},smallScreenFooterList:{paddingVertical:32},title:{..._L.semiBold_2XL,marginBottom:12},infoTextContainer:{flexDirection:"row",alignItems:"center"},infoText:{..._L.semiBold_SM,color:wL.textBrand,marginRight:4},emptyComponentList:{justifyContent:"space-between",alignItems:"center",gap:8,paddingHorizontal:64,opacity:.5},separatorList:{height:8},noInsulinText:{..._L.medium_Base,textAlign:"center",color:wL.bgEmptyOnBg},footer:{backgroundColor:wL.bgProgressBar,paddingHorizontal:16,paddingBottom:16},confirmButton:{marginTop:16}});const N5=rF(function(){const{t:e}=eV(),t=Gp(),n=cf(),{bottom:i}=hH(),[r,a]=M.useState(!1),[o,s]=M.useState(n.params.insulinEntry?.insulinValue),[l,u]=M.useState(!1),[c,d]=M.useState(n.params.insulinEntry?new Date(n.params.insulinEntry.time):void 0),[h,m]=M.useState(),[p,f]=M.useState(!1),[g,_]=M.useState(!1),[v,y]=M.useState(!1),{initialInsulinValue:b,initialDate:w}=M.useMemo(()=>({initialInsulinValue:n.params.insulinEntry?.insulinValue,initialDate:n.params.insulinEntry?new Date(n.params.insulinEntry.time):void 0}),[n.params.insulinEntry]),S=Vq.injectionMethod;if(void 0===S)throw new Error("[RegisterActiveInsulin::render] injectionMethod is undefined");const k=M.useMemo(()=>T5(S),[S]),C=M.useCallback(async()=>{if(!o||!c)throw new Error("[RegisterActiveInsulin::handleDonePressed] insulinValue or date is undefined");if(n.params.action===L5.Create){const e=NQ({entry_timestamp:c,insulin_entered_units:parseFloat(o)});return await UQ.addLogbook(e)?void t.navigate({name:C2.ActiveInsulin,params:{insulinEntryId:e.uuid},merge:!0}):void f(!0)}if(!n.params.insulinEntry)throw new Error("[RegisterActiveInsulin::handleDonePressed] insulinEntry is undefined");const e={...UQ.getLogbookByUUID(n.params.insulinEntry.uuid),entry_timestamp:c,insulin_entered_units:parseFloat(o)};await UQ.addLogbook(e,n.params.insulinEntry.uuid)?t.navigate({name:C2.ActiveInsulin,params:{insulinEntryId:e.uuid},merge:!0}):f(!0)},[c,o,t,n.params.action,n.params.insulinEntry]);M.useEffect(()=>{t.setOptions({headerRight:()=>D.createElement(J2,{title:n.params.action===L5.Edit?e("button_done"):e("button_save"),onPress:C,disabled:!c||!o||!!h||w===c&&b===o})})},[t,C,o,c,n.params.action,e,w,b,h]);const E=M.useCallback(()=>{_(!0),y(!1)},[]),x=M.useCallback(()=>{setTimeout(async()=>{if(g&&n.params.insulinEntry){await UQ.deleteLogbook(n.params.insulinEntry.uuid)?t.goBack():f(!0)}},0)},[g,t,n.params.insulinEntry]),I=M.useCallback(()=>{u(!0)},[]),T=M.useCallback(()=>{a(!0)},[]),O=M.useCallback(t=>{const n=new Date,i=function(e,t,n){const i=+eY(e,n?.in),[r,a]=[+eY(t.start,n?.in),+eY(t.end,n?.in)].sort((e,t)=>e-t);return i>=r&&i<=a}(t,{start:lX(dX(n),{seconds:0,milliseconds:0}),end:n}),r=i?void 0:e("error_insulin_intake_hint");d(t),m(r),u(!1)},[e]),R=M.useCallback(()=>{u(!1)},[]),A=M.useCallback(e=>{s(e.toString()),a(!1)},[]),L=M.useMemo(()=>{if(!o)return 0;const e=(e=>{switch(e){case FL.InjectionMethod.PenWhole:return 0;case FL.InjectionMethod.PenHalf:case FL.InjectionMethod.Pump:return 1;default:throw new Error("[insulin::getInsulinInputDecimalPlaces] Unsupported injection method!")}})(S);return k.findIndex(t=>t===parseFloat(o).toFixed(e))},[o,k,S]);return D.createElement(D.Fragment,null,D.createElement(Xa,{contentContainerStyle:F5.contentContainer},D.createElement(ga,{style:F5.screen},D.createElement(pj,{style:F5.screenTitle},e("register_insulin_title",{timeFourHour:i$(dX(new Date),"HH:mm")})),D.createElement(bj,{title:e("register_insulin_input_title"),testID:"insulin-input",onPress:T,renderRightSlot:()=>D.createElement(ga,{style:F5.insulinRightSlot},D.createElement(pj,{style:F5.insulinText},o),D.createElement(pj,{style:F5.unitsText},e("units"))),style:r&&F5.focusedRow}),D.createElement(KB,{isAnimated:!!h},D.createElement(bj,{renderLeftSlot:()=>D.createElement(pj,null,e("register_insulin_time_input_title")),testID:"time-input",errorMessage:h,onPress:I,renderRightSlot:()=>D.createElement(ga,{style:F5.setTimeButton},D.createElement(pj,{style:[F5.setTimeText,l&&F5.setTimeTextSelected,!!h&&F5.setTimeTextError]},c?i$(c,"HH:mm"):e("register_insulin_time_button_unit"))),style:l?F5.focusedRowInsulin:F5.rowInsulin}))),n.params.action===L5.Edit&&D.createElement(cj,{title:e("button_delete"),onPress:()=>{y(!0)},type:lj.ErrorSecondary})),D.createElement(n3,{isVisible:r,items:k,onConfirm:A,onCancel:()=>{a(!1)},initialScrollIndex:L,testID:"insulin-wheel-picker"}),lV?D.createElement(S5,{testID:"date-time-picker",isVisible:l,display:"spinner",date:c??new Date,mode:(new Date).getHours()>=4?"time":"datetime",onConfirm:O,onCancel:R,cancelTextIOS:e("button_cancel"),confirmTextIOS:e("button_confirm"),pickerStyleIOS:F5.alignCenter,modalStyleIOS:{paddingBottom:i}}):D.createElement(x5,{isVisible:l,initialValue:c??new Date,min:cX(new Date,{hours:4}),max:new Date,onConfirm:O,onCancel:R}),D.createElement(sz,{isVisible:v,title:e("register_insulin_modal_title"),message:e("register_insulin_modal_body"),onModalHide:x,buttons:[{title:e("button_delete"),testID:"confirm_delete",type:lj.Error,onPress:E},{title:e("button_cancel"),type:lj.Secondary,onPress:()=>{y(!1)}}]}),D.createElement(sz,{isVisible:p,icon:hQ,title:e("new_cal_modal_no_internet_title"),message:e("new_cal_modal_no_internet_body"),buttons:[{title:e("button_close"),onPress:()=>{f(!1)}}]}))}),F5=Ei.create({contentContainer:{flex:1,paddingHorizontal:16,paddingVertical:32,gap:24,backgroundColor:wL.bgSheet},screen:{gap:16},screenTitle:{textAlign:"center",marginBottom:8},focusedRow:{borderColor:wL.borderInputActive},focusedRowInsulin:{borderColor:wL.borderInputActive,flexWrap:"wrap",paddingVertical:8},rowInsulin:{flexWrap:"wrap",paddingVertical:8},insulinRightSlot:{flexDirection:"row",flex:1,alignItems:"center"},setTimeButton:{backgroundColor:wL.bgPills,borderRadius:16,paddingHorizontal:12,paddingVertical:8},setTimeText:{..._L.regular_Base,color:wL.text},setTimeTextSelected:{color:wL.textBrand},setTimeTextError:{color:wL.textDanger},insulinText:{..._L.regular_Base,color:wL.textSecondary,marginRight:4},unitsText:{..._L.regular_Base,color:wL.textSecondary},alignCenter:{alignSelf:"center"}});function B5(){const{t:e}=eV(),t=Gp(),n=M.useCallback(()=>{NX(MX.RecentInsulinRegisterPress),t.navigate(C2.RegisterActiveInsulin,{action:L5.Create})},[t]);return d.jsx(P5,{renderRegisterInsulinButtons:t=>d.jsx(cj,{title:e("recent_insulin_button_add"),onPress:n,leftIcon:d.jsx(HK,{color:wL.text}),type:t?lj.Primary:lj.Secondary})})}const j5=M.createContext(void 0),V5=M.createContext(void 0);function H5(){return H5=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},H5.apply(this,arguments)}function z5(e){let{children:t,style:n,visible:i=!0,size:r=18,...a}=e;const[o]=M.useState(()=>new uu.Value(i?1:0)),[s,l]=M.useState(i),u=Rf();if(M.useEffect(()=>{if(s)return uu.timing(o,{toValue:i?1:0,duration:150,useNativeDriver:!0}).start(e=>{let{finished:t}=e;t&&!i&&l(!1)}),()=>o.stopAnimation()},[o,s,i]),!s){if(!i)return null;l(!0)}const{backgroundColor:c=u.colors.notification,...d}=Ei.flatten(n)||{},h=H1(c).isLight()?"black":"white",m=r/2,p=Math.floor(3*r/4);return M.createElement(uu.Text,H5({numberOfLines:1,style:[{transform:[{scale:o.interpolate({inputRange:[0,1],outputRange:[.5,1]})}],color:h,lineHeight:r-1,height:r,minWidth:r,opacity:o,backgroundColor:c,fontSize:p,borderRadius:m},U5.container,d]},a),t)}const U5=Ei.create({container:{alignSelf:"flex-end",textAlign:"center",paddingHorizontal:4,overflow:"hidden"}});function G5(e){let{route:t,horizontal:n,badge:i,badgeStyle:r,activeOpacity:a,inactiveOpacity:o,activeTintColor:s,inactiveTintColor:l,renderIcon:u,style:c}=e;return D.createElement(ga,{style:[n?W5.iconHorizontal:W5.iconVertical,c]},D.createElement(ga,{style:[W5.icon,{opacity:a}]},u({focused:!0,size:25,color:s})),D.createElement(ga,{style:[W5.icon,{opacity:o}]},u({focused:!1,size:25,color:l})),D.createElement(z5,{visible:null!=i,style:[W5.badge,n?W5.badgeHorizontal:W5.badgeVertical,r],size:75/4},i))}const W5=Ei.create({icon:{position:"absolute",alignSelf:"center",alignItems:"center",justifyContent:"center",height:"100%",width:"100%",minWidth:25},iconVertical:{flex:1},iconHorizontal:{height:"100%",marginTop:3},badge:{position:"absolute",left:3},badgeVertical:{top:3},badgeHorizontal:{top:7}});function Y5(){return Y5=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},Y5.apply(this,arguments)}function $5(e){let{focused:t,route:n,descriptor:i,label:r,icon:a,badge:o,badgeStyle:s,to:l,button:u=e=>{let{children:t,style:n,onPress:i,to:r,accessibilityRole:a,...o}=e;return"web"===lr.OS&&r?D.createElement(pf,Y5({},o,{to:r,style:[X5.button,n],onPress:e=>{e.metaKey||e.altKey||e.ctrlKey||e.shiftKey||null!=e.button&&0!==e.button||(e.preventDefault(),null==i||i(e))}}),t):D.createElement(eh,Y5({},o,{accessibilityRole:a,onPress:i,style:n}),t)},accessibilityLabel:c,testID:d,onPress:h,onLongPress:m,horizontal:p,activeTintColor:f,inactiveTintColor:g,activeBackgroundColor:_="transparent",inactiveBackgroundColor:v="transparent",showLabel:y=!0,allowFontScaling:b,labelStyle:w,iconStyle:S,style:k}=e;const{colors:C}=Rf(),E=void 0===f?C.primary:f,x=void 0===g?H1(C.text).mix(H1(C.card),.5).hex():g,I={focused:t},T=t?_:v;return u({to:l,onPress:h,onLongPress:m,testID:d,accessibilityLabel:c,accessibilityRole:lr.select({ios:"button",default:"tab"}),accessibilityState:{selected:t},accessibilityStates:t?["selected"]:[],style:[X5.tab,{backgroundColor:T},p?X5.tabLandscape:X5.tabPortrait,k],children:D.createElement(D.Fragment,null,(e=>{let{focused:t}=e;if(void 0===a)return null;const i=t?1:0,r=t?0:1;return D.createElement(G5,{route:n,horizontal:p,badge:o,badgeStyle:s,activeOpacity:i,inactiveOpacity:r,activeTintColor:E,inactiveTintColor:x,renderIcon:a,style:S})})(I),(e=>{let{focused:t}=e;if(!1===y)return null;const a=t?E:x;if("string"==typeof r)return D.createElement(hl,{numberOfLines:1,style:[X5.label,{color:a},p?X5.labelBeside:X5.labelBeneath,w],allowFontScaling:b},r);const{options:o}=i,s="string"==typeof o.tabBarLabel?o.tabBarLabel:void 0!==o.title?o.title:n.name;return r({focused:t,color:a,position:p?"beside-icon":"below-icon",children:s})})(I))})}const X5=Ei.create({tab:{flex:1,alignItems:"center"},tabPortrait:{justifyContent:"flex-end",flexDirection:"column"},tabLandscape:{justifyContent:"center",flexDirection:"row"},label:{textAlign:"center",backgroundColor:"transparent"},labelBeneath:{fontSize:10},labelBeside:{fontSize:13,marginLeft:20,marginTop:3},button:{display:"flex"}}),q5="web"!==lr.OS,Z5=e=>{let{state:t,descriptors:n,layout:i,dimensions:r}=e;const{tabBarLabelPosition:a}=n[t.routes[t.index].key].options;if(a)switch(a){case"beside-icon":return!0;case"below-icon":return!1}if(i.width>=768){return t.routes.reduce((e,t)=>{const{tabBarItemStyle:i}=n[t.key].options,r=Ei.flatten(i);if(r){if("number"==typeof r.width)return e+r.width;if("number"==typeof r.maxWidth)return e+r.maxWidth}return e+125},0)<=i.width}return r.width>r.height},K5=e=>Math.max(e.bottom-lr.select({ios:4,default:0}),0),Q5=e=>{var t;let{state:n,descriptors:i,dimensions:r,insets:a,style:o,...s}=e;const l=null===(t=Ei.flatten(o))||void 0===t?void 0:t.height;if("number"==typeof l)return l;const u=r.width>r.height,c=Z5({state:n,descriptors:i,dimensions:r,...s}),d=K5(a);return"ios"===lr.OS&&!lr.isPad&&u&&c?32+d:49+d};function J5(e){let{state:t,navigation:n,descriptors:i,insets:r,style:a}=e;const{colors:o}=Rf(),s=function(){const e=M.useContext(Fp),t=M.useContext(df);return M.useCallback((n,i)=>{const{options:r}=t;if(!1===(null==r?void 0:r.enabled))return;const a=e?Af(e,{index:0,routes:[{name:n,params:i}]}):{index:0,routes:[{name:n,params:i}]};return null!=r&&r.getPathFromState?r.getPathFromState(a,null==r?void 0:r.config):wp(a,null==r?void 0:r.config)},[t,e])}(),l=t.routes[t.index],u=i[l.key].options,{tabBarShowLabel:c,tabBarHideOnKeyboard:d=!1,tabBarVisibilityAnimationConfig:h,tabBarStyle:m,tabBarBackground:p,tabBarActiveTintColor:f,tabBarInactiveTintColor:g,tabBarActiveBackgroundColor:_,tabBarInactiveBackgroundColor:v}=u,y=mH(),b=function(){const[e,t]=M.useState(!1);return M.useEffect(()=>{const e=()=>t(!0),n=()=>t(!1);let i;return i="ios"===lr.OS?[Pu.addListener("keyboardWillShow",e),Pu.addListener("keyboardWillHide",n)]:[Pu.addListener("keyboardDidShow",e),Pu.addListener("keyboardDidHide",n)],()=>{i.forEach(e=>e.remove())}},[]),e}(),w=D.useContext(j5),S=!(d&&b),k=D.useRef(h);D.useEffect(()=>{k.current=h});const[C,E]=D.useState(!S),[x]=D.useState(()=>new uu.Value(S?1:0));D.useEffect(()=>{const e=k.current;if(S){var t,n;("spring"===(null==e||null===(t=e.show)||void 0===t?void 0:t.animation)?uu.spring:uu.timing)(x,{toValue:1,useNativeDriver:q5,duration:250,...null==e||null===(n=e.show)||void 0===n?void 0:n.config}).start(e=>{let{finished:t}=e;t&&E(!1)})}else{var i,r;E(!0);("spring"===(null==e||null===(i=e.hide)||void 0===i?void 0:i.animation)?uu.spring:uu.timing)(x,{toValue:0,useNativeDriver:q5,duration:200,...null==e||null===(r=e.hide)||void 0===r?void 0:r.config}).start()}return()=>x.stopAnimation()},[x,S]);const[I,T]=D.useState({height:0,width:y.width}),{routes:O}=t,R=K5(r),A=Q5({state:t,descriptors:i,insets:r,dimensions:y,layout:I,style:[m,a]}),L=Z5({state:t,descriptors:i,dimensions:y,layout:I}),P=null==p?void 0:p();return D.createElement(uu.View,{style:[e6.tabBar,{backgroundColor:null!=P?"transparent":o.card,borderTopColor:o.border},{transform:[{translateY:x.interpolate({inputRange:[0,1],outputRange:[I.height+R+Ei.hairlineWidth,0]})}],position:C?"absolute":null},{height:A,paddingBottom:R,paddingHorizontal:Math.max(r.left,r.right)},m],pointerEvents:C?"none":"auto",onLayout:e=>{const{height:t,width:n}=e.nativeEvent.layout;null==w||w(t),T(e=>t===e.height&&n===e.width?e:{height:t,width:n})}},D.createElement(ga,{pointerEvents:"none",style:Ei.absoluteFill},P),D.createElement(ga,{accessibilityRole:"tablist",style:e6.content},O.map((e,r)=>{const a=r===t.index,{options:o}=i[e.key],l=void 0!==o.tabBarLabel?o.tabBarLabel:void 0!==o.title?o.title:e.name,u=void 0!==o.tabBarAccessibilityLabel?o.tabBarAccessibilityLabel:"string"==typeof l&&"ios"===lr.OS?`${l}, tab, ${r+1} of ${O.length}`:void 0;return D.createElement(Bm.Provider,{key:e.key,value:i[e.key].navigation},D.createElement(jm.Provider,{value:e},D.createElement($5,{route:e,descriptor:i[e.key],focused:a,horizontal:L,onPress:()=>{const i=n.emit({type:"tabPress",target:e.key,canPreventDefault:!0});a||i.defaultPrevented||n.dispatch({...wm({name:e.name,merge:!0}),target:t.key})},onLongPress:()=>{n.emit({type:"tabLongPress",target:e.key})},accessibilityLabel:u,to:s(e.name,e.params),testID:o.tabBarTestID,allowFontScaling:o.tabBarAllowFontScaling,activeTintColor:f,inactiveTintColor:g,activeBackgroundColor:_,inactiveBackgroundColor:v,button:o.tabBarButton,icon:o.tabBarIcon??(e=>{let{color:t,size:n}=e;return D.createElement($J,{color:t,size:n})}),badge:o.tabBarBadge,badgeStyle:o.tabBarBadgeStyle,label:l,showLabel:c,labelStyle:o.tabBarLabelStyle,iconStyle:o.tabBarIconStyle,style:o.tabBarItemStyle})))})))}const e6=Ei.create({tabBar:{left:0,right:0,bottom:0,borderTopWidth:Ei.hairlineWidth,elevation:8},content:{flex:1,flexDirection:"row"}});function t6(){return t6=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},t6.apply(this,arguments)}let n6;try{n6=W1}catch(e){}const i6=e=>{var t,n;let{enabled:i,...r}=e;return null!==(t=n6)&&void 0!==t&&null!==(n=t.screensEnabled)&&void 0!==n&&n.call(t)?M.createElement(n6.ScreenContainer,t6({enabled:i},r)):M.createElement(ga,r)};function r6(e){var t,n;let{visible:i,children:r,...a}=e;return null!==(t=n6)&&void 0!==t&&null!==(n=t.screensEnabled)&&void 0!==n&&n.call(t)?M.createElement(n6.Screen,t6({activityState:i?2:0},a),r):M.createElement(ZJ,t6({visible:i},a),r)}function a6(){return a6=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},a6.apply(this,arguments)}function o6(e){const{tabBar:t=e=>M.createElement(J5,e),state:n,navigation:i,descriptors:r,safeAreaInsets:a,detachInactiveScreens:o="web"===lr.OS||"android"===lr.OS||"ios"===lr.OS,sceneContainerStyle:s}=e,l=n.routes[n.index].key,[u,c]=M.useState([l]);u.includes(l)||c([...u,l]);const d=t1.initialMetrics.frame,[h,m]=M.useState(()=>Q5({state:n,descriptors:r,dimensions:d,layout:{width:d.width,height:0},insets:{...t1.initialMetrics.insets,...e.safeAreaInsets},style:r[n.routes[n.index].key].options.tabBarStyle})),{routes:p}=n;return M.createElement(t1,null,M.createElement(i6,{enabled:o,hasTwoStates:!0,style:s6.container},p.map((e,t)=>{const i=r[e.key],{lazy:a=!0,unmountOnBlur:l}=i.options,c=n.index===t;if(l&&!c)return null;if(a&&!u.includes(e.key)&&!c)return null;const{freezeOnBlur:m,header:p=t=>{let{layout:n,options:i}=t;return M.createElement(DJ,a6({},i,{layout:n,title:EJ(i,e.name)}))},headerShown:f,headerStatusBarHeight:g,headerTransparent:_}=i.options;return M.createElement(r6,{key:e.key,style:[Ei.absoluteFill,{zIndex:c?0:-1}],visible:c,enabled:o,freezeOnBlur:m},M.createElement(V5.Provider,{value:h},M.createElement(r1,{focused:c,route:i.route,navigation:i.navigation,headerShown:f,headerStatusBarHeight:g,headerTransparent:_,header:p({layout:d,route:i.route,navigation:i.navigation,options:i.options}),style:s},i.render())))})),M.createElement(j5.Provider,{value:m},M.createElement(sH.Consumer,null,e=>t({state:n,descriptors:r,navigation:i,insets:{top:(null==a?void 0:a.top)??(null==e?void 0:e.top)??0,right:(null==a?void 0:a.right)??(null==e?void 0:e.right)??0,bottom:(null==a?void 0:a.bottom)??(null==e?void 0:e.bottom)??0,left:(null==a?void 0:a.left)??(null==e?void 0:e.left)??0}}))))}const s6=Ei.create({container:{flex:1,overflow:"hidden"}});function l6(){return l6=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},l6.apply(this,arguments)}const u6=ep(function(e){let{id:t,initialRouteName:n,backBehavior:i,children:r,screenListeners:a,screenOptions:o,sceneContainerStyle:s,...l}=e;const{lazy:u,tabBarOptions:c,...d}=l;let h={};c&&(Object.assign(h,{tabBarHideOnKeyboard:c.keyboardHidesTabBar,tabBarActiveTintColor:c.activeTintColor,tabBarInactiveTintColor:c.inactiveTintColor,tabBarActiveBackgroundColor:c.activeBackgroundColor,tabBarInactiveBackgroundColor:c.inactiveBackgroundColor,tabBarAllowFontScaling:c.allowFontScaling,tabBarShowLabel:c.showLabel,tabBarLabelStyle:c.labelStyle,tabBarIconStyle:c.iconStyle,tabBarItemStyle:c.tabStyle,tabBarLabelPosition:c.labelPosition??(!1===c.adaptive?"below-icon":void 0),tabBarStyle:[{display:c.tabBarVisible?"none":"flex"},h.tabBarStyle]}),Object.keys(h).forEach(e=>{void 0===h[e]&&delete h[e]}),UH(c,`Bottom Tab Navigator: 'tabBarOptions' is deprecated. Migrate the options to 'screenOptions' instead.\n\nPlace the following in 'screenOptions' in your code to keep current behavior:\n\n${JSON.stringify(h,null,2)}\n\nSee https://reactnavigation.org/docs/bottom-tab-navigator#options for more details.`)),"boolean"==typeof u&&(h.lazy=u,UH(!0,"Bottom Tab Navigator: 'lazy' in props is deprecated. Move it to 'screenOptions' instead.\n\nSee https://reactnavigation.org/docs/bottom-tab-navigator/#lazy for more details."));const{state:m,descriptors:p,navigation:f,NavigationContent:g}=uf(Om,{id:t,initialRouteName:n,backBehavior:i,children:r,screenListeners:a,screenOptions:o,defaultScreenOptions:h});return M.createElement(g,null,M.createElement(o6,l6({},d,{state:m,navigation:f,descriptors:p,sceneContainerStyle:s})))});new Xo(nr.RNDeviceInfo);const c6=new Xo(nr.RNDeviceInfo);let d6=!1,h6=-1,m6={};const p6=e=>{const{level:t,charging:n,chargingtime:i,dischargingtime:r}=e;return{batteryLevel:t,lowPowerMode:!1,batteryState:1===t?"full":n?"charging":"unplugged",chargingtime:i,dischargingtime:r}},f6=()=>window.performance&&window.performance.memory?window.performance.memory.jsHeapSizeLimit:-1,g6=()=>document.referrer,_6=()=>!!navigator.onLine,v6=()=>window.navigator.userAgent,y6=()=>!!navigator.geolocation,b6=()=>navigator.deviceMemory?1e9*navigator.deviceMemory:-1,w6=()=>window.performance&&window.performance.memory?window.performance.memory.usedJSHeapSize:-1;"undefined"!=typeof navigator&&navigator.getBattery&&navigator.getBattery().then(e=>{d6=e.charging,e.addEventListener("chargingchange",()=>{const{charging:t}=e;d6=t,m6=p6(e),c6.emit("RNDeviceInfo_powerStateDidChange",m6)}),e.addEventListener("levelchange",()=>{const{level:t}=e;h6=t,m6=p6(e),c6.emit("RNDeviceInfo_batteryLevelDidChange",t),t<.2&&c6.emit("RNDeviceInfo_batteryLevelIsLow",t)})});const S6=Object.freeze(Object.defineProperty({__proto__:null,getBaseOs:async()=>(()=>{const e=window.navigator.userAgent,t=window.navigator.platform;let n=t;return-1!==["Macintosh","MacIntel","MacPPC","Mac68K"].indexOf(t)?n="Mac OS":-1!==["iPhone","iPad","iPod"].indexOf(t)?n="iOS":-1!==["Win32","Win64","Windows","WinCE"].indexOf(t)?n="Windows":/Android/.test(e)?n="Android":!n&&/Linux/.test(t)&&(n="Linux"),n})(),getBatteryLevel:async()=>navigator.getBattery?navigator.getBattery().then(e=>e.level):-1,getBatteryLevelSync:()=>h6,getFreeDiskStorage:async()=>navigator.storage&&navigator.storage.estimate?navigator.storage.estimate().then(({quota:e,usage:t})=>e-t):-1,getFreeDiskStorageSync:()=>(console.log("[react-native-device-info] getFreeDiskStorageSync not supported - please use getFreeDiskStorage"),-1),getInstallReferrer:async()=>g6(),getInstallReferrerSync:g6,getMaxMemory:async()=>f6(),getMaxMemorySync:f6,getPowerState:async()=>navigator.getBattery?navigator.getBattery().then(e=>p6(e)):{},getPowerStateSync:()=>m6,getTotalDiskCapacity:async()=>navigator.storage&&navigator.storage.estimate?navigator.storage.estimate().then(({quota:e})=>e):-1,getTotalDiskCapacitySync:()=>(console.log("[react-native-device-info] getTotalDiskCapacitySync not supported - please use getTotalDiskCapacity"),-1),getTotalMemory:async()=>b6(),getTotalMemorySync:b6,getUsedMemory:async()=>w6(),getUsedMemorySync:w6,getUserAgent:async()=>v6(),getUserAgentSync:v6,isAirplaneMode:async()=>_6(),isAirplaneModeSync:_6,isBatteryCharging:async()=>!!navigator.getBattery&&navigator.getBattery().then(e=>e.charging),isBatteryChargingSync:()=>d6,isCameraPresent:async()=>!(!navigator.mediaDevices||!navigator.mediaDevices.enumerateDevices)&&navigator.mediaDevices.enumerateDevices().then(e=>!!e.find(e=>"videoinput"===e.kind)),isCameraPresentSync:()=>(console.log("[react-native-device-info] isCameraPresentSync not supported - please use isCameraPresent"),!1),isLocationEnabled:async()=>y6(),isLocationEnabledSync:y6},Symbol.toStringTag,{value:"Module"})),k6=i(S6);let C6=nr.RNDeviceInfo;if("web"!==lr.OS&&"dom"!==lr.OS||(C6=k6),!C6&&("android"===lr.OS||"ios"===lr.OS||"web"===lr.OS||"dom"===lr.OS))throw new Error("react-native-device-info: NativeModule.RNDeviceInfo is null. To fix this issue try these steps:\n • For react-native <= 0.59: Run `react-native link react-native-device-info` in the project root.\n • Rebuild and re-run the app.\n • If you are using CocoaPods on iOS, run `pod install` in the `ios` directory and then rebuild and re-run the app. You may also need to re-open Xcode to get the new pods.\n If none of these fix the issue, please open an issue on the Github repository: https://github.com/react-native-device-info/react-native-device-info");const E6=C6;let x6={};function I6({getter:e,supportedPlatforms:t,defaultValue:n,memoKey:i}){if(i&&null!=x6[i])return x6[i];{const r=function(e,t,n){let i={};return e.filter(e=>lr.OS==e).forEach(e=>i[e]=t),lr.select({...i,default:n})}(t,e,()=>n)();return i&&(x6[i]=r),r}}const T6=()=>I6({defaultValue:!1,supportedPlatforms:["ios"],memoKey:"zoomed",getter:()=>E6.isDisplayZoomed});new Xo(nr.RNDeviceInfo);const O6=Ei.create({container:{flexDirection:"row",justifyContent:"space-between",backgroundColor:wL.bgNavigationBarCalc,padding:8,paddingLeft:16,borderRadius:40,marginBottom:16},topLine:{width:30,height:2,borderRadius:1,backgroundColor:wL.bgNavigationIndicator,position:"absolute"},button:{alignItems:"center",justifyContent:"center",minWidth:60,maxWidth:80},calculateButton:{backgroundColor:wL.bgNavigationBarSummaryInactive,alignItems:"center",borderRadius:26,height:52,flex:1,minWidth:60},title:{..._L.medium_XXS,color:wL.textOnNavigationInactive,paddingTop:2,textAlign:"center"},titleActive:{color:wL.textOnNavigationActive},valueCircle:{backgroundColor:wL.bgRecNavigationNumberInactive,borderRadius:7,position:"absolute",left:40,top:6},activeValueCircle:{backgroundColor:wL.bgRecNavigationNumberActive},value:{..._L.semiBold_XXS,color:wL.textNavigationNumberActive,paddingTop:oV?2:0,paddingBottom:oV?2:0,paddingHorizontal:4}}),R6=rF(({navigation:e})=>{const{t:t}=eV(),{isCalculationTabBarHidden:n}=hL(),{glucoseMMOLL:i}=V2(),{totalCarbsCartItems:r,manualCarbsInput:a}=EX(),{activityDurationSeconds:o}=I2(),{glucoseUnit:s}=Vq;if(void 0===s)throw new Error("[BolusTab::render] glucoseUnit must be non-undefined.");const{navigate:l,getState:u}=e,c=u().index,[d,h]=M.useState(!1),[m,p]=M.useState([0,0,0,0]),f=lR(0),g=mR(()=>({transform:[{translateX:f.value}]}),[f]);M.useEffect(()=>{f.value=DE(m[c],{duration:200})},[c,f,m]);const _=()=>{NX(MX.GlucoseTabPress),l(C2.GlucoseTab)},v=()=>{NX(MX.CarbsTabPress),l(C2.CarbsTab)},y=()=>{NX(MX.ActivityTabPress),l(C2.ActivityTab)},b=()=>{r+a>300?h(!0):(NX(MX.SummaryTabPress),l(C2.SummaryTab))};return n?null:D.createElement(D.Fragment,null,D.createElement(yH,{style:[O6.container,{marginHorizontal:T6()?4:24}],edges:["bottom"],mode:"margin"},D.createElement(FR.View,{style:[O6.topLine,g]}),(()=>{const e=Math.round(a+r),n=Math.round(o/60);return[{testID:"bg-tab",value:null===i?"-":PQ(i,FL.BloodGlucoseUnit.MMOL_L,s),onPress:_,title:t("bottom_navigation_calculation_glucose")},{testID:"carbs-tab",value:e,onPress:v,title:t("bottom_navigation_calculation_carbs")},{testID:"activity-tab",value:n,onPress:y,title:t("bottom_navigation_calculation_activity")},{isSummary:!0,testID:"summary-tab",onPress:b}].map((e,t)=>{const{testID:n,title:i,value:r,onPress:a,isSummary:o}=e,s=`${t}_${n}`,l=t===c,u=o?[O6.calculateButton,{maxWidth:T6()?70:84}]:O6.button,d=t,h={0:l?D.createElement(iQ,null):D.createElement(nQ,null),1:l?D.createElement(UK,{height:28,width:28}):D.createElement(zK,{height:28,width:28}),2:l?D.createElement(VK,{height:28,width:28}):D.createElement(jK,null),3:l?D.createElement(aQ,{color:wL.iconNavigationBarSummaryActive}):D.createElement(aQ,null)};return D.createElement(eh,{key:s,testID:n,onPress:a,style:u,disabled:l,onLayout:e=>{((e,t,n)=>{const i=(n-30)/2+t;p(t=>{const n=[...t];return n[e]=i,n})})(t,e.nativeEvent.layout.x,e.nativeEvent.layout.width)}},h[d],D.createElement(pj,{maxFontSizeMultiplier:vL,style:[O6.title,l&&O6.titleActive],ellipsizeMode:"tail",numberOfLines:1},i),!o&&D.createElement(ga,{style:[O6.valueCircle,(l||Number(r)>0)&&O6.activeValueCircle]},D.createElement(pj,{style:O6.value,maxFontSizeMultiplier:vL},r)))})})()),D.createElement(sz,{isVisible:d,title:t("current_glucose_invalid_modal_title"),message:t("current_glucose_invalid_modal_body"),buttons:[{title:t("button_close"),onPress:()=>{h(!1)}}]}))}),A6=()=>{const{t:e}=eV();return M.createElement(M.Fragment,null,M.createElement(pj,{style:L6.header,testID:"activity-info-title"},e("physical_activity_modal_activity_insulin_title")),M.createElement(pj,{style:[L6.text,L6.spacing]},e("physical_activity_modal_activity_insulin_body")),M.createElement(pj,{style:L6.header},e("physical_activity_modal_adjust_insulin_title")),M.createElement(pj,{style:L6.text},e("physical_activity_modal_adjust_insulin_body")))},L6=Ei.create({header:{..._L.semiBold_LG,marginBottom:8},text:{color:wL.textSecondary},spacing:{marginBottom:32}});function P6({isSpinning:e,height:t=20,width:n=20}){const i=TR(),r=M.useRef(new uu.Value(0)).current;M.useEffect(()=>{const t=uu.loop(uu.timing(r,{toValue:1,duration:3e3,useNativeDriver:!oV,easing:Xl.linear}));return e&&!i&&t.start(),()=>{t.stop()}},[r,e,i]);const a=r.interpolate({inputRange:[0,1],outputRange:["0deg","360deg"]});return D.createElement(uu.View,{style:{transform:[{rotate:a}]}},D.createElement(pQ,{height:t,width:n}))}function M6({activity:e,isChecked:t,index:n=0,onEdit:i,toggleActivitySwitch:r}){const{t:a}=eV();if(!Vq.activity)throw new Error("[ActivityCard::render] No settings found!");if(!Vq.glucoseUnit)throw new Error("[ActivityCard::render] No glucose unit found!");const{activityIntensity:o,durationSeconds:s,startTimestamp:l,title:u,type:c,uuid:d}=e;if(!l)throw new Error("[ActivityCard::render] No startTimestamp!");const h=i$(l,"dd.MM.yy"),m=i$(l,"HH:mm"),p=o?OQ[o]():null,f=o?EQ(o):null,g={...D6.intensityDot,...f},_={borderColor:wL.borderInputActive},v=M.useMemo(()=>Math.round(s/60),[s]),[y,b]=M.useState(IQ(l,v)),w=M.useMemo(()=>{const e=Vq.activity;if(!e)throw new Error("[ActivityCard::reduction] No settings found!");return(100*Iq.getReduction(v,e,o,new Date(l))).toFixed(0)},[o,v,l]),S=`activity-${v}-${o}-${c}-${t}`.toLowerCase(),k=`activity-card-${n}`,C=p?`${k}-intensity-${p.toLowerCase()}`:"",E=f?`${k}-intensity-${f.backgroundColor}`:"",x=Vq.glucoseUnit===FL.BloodGlucoseUnit.MMOL_L?a("glucose_unit_mmol/l"):a("glucose_unit_mg/dl");return M.useEffect(()=>{const e=t?setInterval(()=>{b(IQ(l,v))},FL.Milliseconds.Minute):null;return()=>{var t;(t=e)&&clearInterval(t)}},[t,l,v]),D.createElement(ga,{testID:S,style:[D6.wrapper,t&&_]},D.createElement(ga,{style:D6.headerContainer},D.createElement(pj,{style:D6.header},a("activity_card_title")),D.createElement(vh,{testID:`${k}-${t}`,value:t,onValueChange:()=>{r(d)},trackColor:{true:wL.bgToggleActive,false:wL.bgToggleInactive},thumbColor:wL.toggleKnob,activeThumbColor:wL.toggleKnob,activeTrackColor:wL.bgToggleActive})),D.createElement(ga,{style:D6.mainInfoCard},D.createElement(ga,{style:D6.titleAndEditContainer},c&&D.createElement(ga,{style:D6.row},CQ(c,D6.icon),D.createElement(ga,{style:D6.mainInfo},D.createElement(pj,{style:D6.type,testID:`${k}-type`},TQ[c]()),u&&D.createElement(pj,{style:D6.title,testID:`${k}-title`},u)))),D.createElement(ga,{style:D6.intensityDuration},null!==p&&D.createElement(D.Fragment,null,D.createElement(ga,{style:g,testID:E}),D.createElement(pj,{style:D6.intensityText,testID:C},p)),D.createElement(vQ,{color:wL.iconOnInput}),D.createElement(pj,{style:D6.durationText,testID:`${k}-duration`},`${xQ(v)} ${a("activity_card__active_min")}`),D.createElement(eh,{onPress:()=>{i(d)},style:D6.editButton,testID:`${k}-edit-button`},D.createElement(rQ,{color:wL.iconBrand,width:20,height:20}))),t&&D.createElement(ga,{style:D6.secondaryInfoCard,testID:`${k}-reduction-card`},D.createElement(ga,{style:D6.activityTimeContainer},D.createElement(ga,{style:D6.activeForContainer},D.createElement(P6,{isSpinning:t}),D.createElement(pj,{style:D6.activeFor},a("activity_card__active_time")," ",y)),D.createElement(pj,{style:D6.startingTimeText,testID:`${k}-time`},a("activity_card__created_time",{dateLogged:h,timeLogged:m}))),!!w&&D.createElement(ga,null,D.createElement(pj,{style:D6.reductionText},a("activity_card__reduction"),` ${w}%`),D.createElement(pj,{style:D6.targetText},a("activity_card__reduction_more",{value:PQ(Vq.activity.target,FL.BloodGlucoseUnit.MMOL_L,Vq.glucoseUnit),displayUnit:x}))))))}const D6=Ei.create({wrapper:{marginBottom:32,borderColor:wL.borderOnSecondary,borderWidth:2,borderRadius:16,overflow:"hidden"},headerContainer:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",backgroundColor:wL.bgActivityHighlight,paddingVertical:12,paddingHorizontal:16},header:{..._L.medium_Base},mainInfoCard:{backgroundColor:wL.bgInput,padding:16},titleAndEditContainer:{flexDirection:"row",justifyContent:"space-between",marginBottom:12},row:{flex:1,flexDirection:"row"},icon:{color:wL.text,width:48,height:48},mainInfo:{flex:1,justifyContent:"center",marginLeft:8},type:{..._L.bold_LG},title:{..._L.medium_Base},editButton:{flexDirection:"row",alignItems:"center",marginLeft:16},intensityDuration:{alignItems:"center",flexDirection:"row"},intensityDot:{width:10,height:10,borderRadius:5,marginRight:4,marginBottom:2},intensityText:{..._L.medium_Base,color:wL.textInputTextSecondary,marginRight:16},durationText:{..._L.medium_Base,color:wL.textInputTextSecondary,marginLeft:4},secondaryInfoCard:{paddingTop:24},activityTimeContainer:{borderBottomWidth:1,borderBottomColor:wL.borderDivider,marginBottom:24},activeForContainer:{flexDirection:"row",marginBottom:2,alignItems:"center"},activeFor:{..._L.medium_SM,color:wL.textInputText,marginLeft:2},startingTimeText:{..._L.regular_SM,color:wL.textSecondary,marginBottom:24},reductionText:{..._L.regular_SM,color:wL.textInputTextSecondary,marginBottom:12},targetText:{..._L.regular_SM,color:wL.textInputTextSecondary}}),N6=()=>{const{t:e}=eV(),{selectedEventUUID:t,activityStoreActions:n}=I2(),{navigate:i,addListener:r,removeListener:a}=Gp(),[o,s]=M.useState([]),[l,u]=M.useState(!1);M.useEffect(()=>{const e=()=>{const e=Lq.getActiveEvents();s(e)},t=Tu.addEventListener("change",t=>{"active"===t&&e()});return r("focus",e),()=>{a("focus",e),t.remove()}},[a,r]);const c=M.useCallback(e=>{const i=Lq.getByUUID(e);n.set({selectedEventUUID:t===e?null:e,activityDurationSeconds:t===e?0:i.durationSeconds})},[n,t]),d=e=>{const t=Lq.getByUUID(e);i(C2.AddActivity,{activity:t})};return D.createElement(D.Fragment,null,D.createElement(Xa,{contentContainerStyle:F6.scrollView},D.createElement(ga,null,D.createElement(ga,{style:F6.row},D.createElement(VK,{color:wL.icon,width:24,height:24}),D.createElement(pj,{style:F6.pageHeader},e("new_cal_activity_title"))),D.createElement(pj,{style:[F6.subheader,0===o.length&&F6.noActivities],onPress:()=>{u(!0)}},D.createElement(pj,{style:F6.subheaderText},e("new_cal_current_activity_body")+" "),D.createElement(pj,{style:F6.learnMore},e("new_cal_current_activity_body_link")))),o.map((e,n)=>D.createElement(M6,{key:e.uuid,index:n,toggleActivitySwitch:c,isChecked:t===e.uuid,onEdit:d,activity:e})),D.createElement(cj,{type:0===o.length?lj.Primary:lj.Secondary,testID:"add-activity-button",title:0===o.length?e("new_cal_activity_button_add"):e("new_cal_activity_button_add_new"),onPress:()=>{i(C2.AddActivity)}})),D.createElement(O5,null),D.createElement(sz,{isVisible:l,enableScroll:!0,buttons:[{title:e("button_close"),onPress:()=>{u(!1)},style:F6.modalButton}]},D.createElement(A6,null)))},F6=Ei.create({scrollView:{paddingVertical:32,paddingHorizontal:16,paddingBottom:130},row:{flexDirection:"row",justifyContent:"center",alignItems:"center"},pageHeader:{..._L.semiBold_Base,color:wL.text,marginLeft:4},noActivities:{marginBottom:128},subheader:{color:wL.textSecondary,paddingHorizontal:16,textAlign:"center",marginBottom:32,marginTop:8},subheaderText:{..._L.regular_SM,color:wL.textSecondary,textAlign:"center"},learnMore:{..._L.semiBold_SM,color:wL.textBrand},modalButton:{marginTop:32}});RX(FL.CONSTANTS.CARBOHYDRATES_INPUT_MIN,FL.CONSTANTS.CARBOHYDRATES_INPUT_MAX);const B6=()=>{const{t:e}=eV(),{cartItems:t,carbohydrateStoreActions:n}=EX(),{foodStoreActions:i}=L2(),r=Gp(),a=M.useCallback((e,t)=>{e?n.removeFromCart(e,"id"):n.removeFromCart(t,"title")},[n]),o=M.useCallback(e=>TX(e),[]),s=M.useCallback(e=>{i.set({selectedFoodItem:e}),r.navigate(C2.AddCarbs,{isCarbItem:!0})},[i,r]);return D.createElement(D.Fragment,null,t.map((t,n)=>{const{carbohydrates:i,id:r,title:l}=t.foodItem;return D.createElement(eh,{key:r,onPress:()=>{s(t.foodItem)},style:j6.foodItem},D.createElement(ga,{style:j6.left},D.createElement(pj,{numberOfLines:1,style:j6.title},l),D.createElement(pj,{style:j6.weight},t.amount," ",e("food_card_unit"))),D.createElement(ga,{style:j6.right},D.createElement(pj,{style:j6.value,testID:`carbs-item-${n}-amount`},(t.amount/o(t.unit)*i).toFixed(0)," g "+e("new_cal_carbohydrates_input_unit")),D.createElement(eh,{onPress:()=>{a(r,l)},testID:`carbs-item-${n}-remove-icon`},D.createElement(JK,null))))}))},j6=Ei.create({foodItem:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",marginBottom:8,gap:8,padding:16,backgroundColor:wL.bgInput,borderRadius:16},title:{..._L.medium_Base,paddingBottom:4},weight:{..._L.regular_SM,color:wL.textSecondary},left:{flexShrink:1},right:{alignSelf:"flex-start",alignItems:"center",flexDirection:"row"},value:{color:wL.textSecondary,textAlign:"right",marginRight:4}}),{max:V6,min:H6}={min:FL.CONSTANTS.CARBOHYDRATES_INPUT_MIN,max:FL.CONSTANTS.CARBOHYDRATES_INPUT_MAX},z6=oV&&{outline:"none"},U6=()=>{const{flagsStoreActions:e}=hL(),{t:t}=eV(),{totalCarbsCartItems:n,manualCarbsInput:i,carbohydrateStoreActions:r}=EX(),{dispatch:a,addListener:o,removeListener:s,navigate:l}=Gp(),{height:u}=vm(),c=M.useMemo(()=>u<=667,[u]),d=M.useRef(null),[h,m]=M.useState(!1),[p,f]=M.useState(i.toString()),[g,_]=M.useState(!1),[v,y]=M.useState(!1);M.useEffect(()=>{oV&&e.set({isCalculationTabBarHidden:h})},[e,h]);const b=M.useCallback(()=>{n+i>300&&y(!0)},[i,n]),w=M.useCallback(()=>{window.setTimeout(()=>{window.scrollTo({top:0,left:0,behavior:"smooth"})},100)},[]),S=M.useCallback(()=>{window.visualViewport?.addEventListener("resize",w),b()},[b,w]),k=M.useCallback(()=>{window.visualViewport?.removeEventListener("resize",w)},[w]);M.useEffect(()=>(o("focus",S),o("blur",k),()=>{s("focus",S),s("blur",k)}),[o,s,k,S]);const C=()=>{if(m(!1),""===p)return r.setManualCarbsInput(0),void f("0");const e=Number(p);return!isNaN(e)&&e>=H6?e>V6?(f(i.toString()),void y(!0)):(r.setManualCarbsInput(e),f(e.toString()),void NX(MX.CarbsManualInput)):(f(i.toString()),void _(!0))};return D.createElement(D.Fragment,null,D.createElement(Xa,{testID:"carbs-screen-scroll",scrollEventThrottle:8,contentContainerStyle:G6.scrollView},D.createElement(ga,{style:c?G6.smallScreenHeaderContainer:G6.headerContainer},D.createElement(ga,{style:G6.row},D.createElement(UK,{color:wL.icon}),D.createElement(pj,{style:G6.pageHeader},t("new_cal_carbohydrates_title"))),D.createElement(pj,{style:G6.subheader},t("new_cal_carbohydrates_body"))),D.createElement(bj,{renderLeftSlot:()=>D.createElement(pj,{testID:"carbs-input-unit"},t("new_cal_carbohydrates_input_entry")),renderRightSlot:()=>D.createElement(ga,{style:G6.inputRow},D.createElement(c0,{testID:"carbs-input",placeholder:"0",value:p,onChangeText:f,onBlur:C,style:G6.numberInput,ref:d,selectTextOnFocus:!0}),D.createElement(pj,{style:G6.unit},t("my_food_add_unit")),D.createElement(ga,{style:G6.separator}),D.createElement(rQ,null)),onPress:()=>{m(!0),d.current?.focus()},style:h?G6.groupedRowFocused:G6.groupedRow}),D.createElement(B6,null),D.createElement(cj,{type:lj.Secondary,title:t("new_cal_carbohydrates_button_add_food"),testID:"add-food-from-library-button",onPress:()=>{oV?l(C2.FoodLibrary,{comingFrom:C2.CarbsTab}):a(wm(C2.FoodLibraryStack,{comingFrom:C2.CarbsTab}))},style:c?G6.smallScreenButton:G6.button}),D.createElement(O5,null),D.createElement(sz,{isVisible:g,title:t("current_glucose_invalid_modal_title"),message:t("current_glucose_invalid_modal_body"),buttons:[{testID:"close-button",title:t("button_close"),onPress:()=>{_(!1)}}]}),D.createElement(sz,{isVisible:v,title:t("current_glucose_invalid_modal_title"),message:t("current_glucose_invalid_modal_body"),buttons:[{title:t("button_close"),onPress:()=>{y(!1)}}]})),D.createElement(ga,{style:G6.totalWrapper},D.createElement(hj,null)),D.createElement(ga,{style:c?G6.smallScreenTotalContainer:G6.totalContainer},D.createElement(pj,{style:G6.totalTitle},t("new_cal_carbohydrates_total_entry")),D.createElement(ga,{style:G6.totalGramsContainer},D.createElement(pj,{style:G6.totalValue,testID:"total-carbs-value"},n+i),D.createElement(pj,{style:G6.totalUnits,testID:"total-carbs-unit"},t("my_food_add_unit")))))},G6=Ei.create({scrollView:{paddingVertical:32,paddingHorizontal:16},row:{flex:1,flexDirection:"row",justifyContent:"center",alignItems:"center"},inputRow:{flexDirection:"row",justifyContent:"flex-start",alignItems:"center",gap:4},headerContainer:{marginBottom:112},smallScreenHeaderContainer:{marginBottom:32},pageHeader:{..._L.semiBold_Base,color:wL.text,marginLeft:4},subheader:{..._L.regular_SM,color:wL.textSecondary,textAlign:"center",marginTop:8,marginHorizontal:16},groupedRow:{marginBottom:16,flexWrap:"wrap",justifyContent:"space-between"},groupedRowFocused:{marginBottom:16,borderColor:wL.borderInputActive,flexWrap:"wrap",justifyContent:"space-between"},separator:{width:1,backgroundColor:wL.borderDivider,height:20,marginHorizontal:12},unit:{..._L.regular_Base,color:wL.textSecondary},numberInput:{..._L.regular_Base,textAlign:"right",lineHeight:22,color:wL.textSecondary,padding:0,maxWidth:40,fontFamily:sV?gL.RobotoRegular:gL.PoppinsRegular,...z6},totalWrapper:{marginHorizontal:16},totalContainer:{flexDirection:"row",justifyContent:"space-between",alignItems:"baseline",paddingVertical:32,paddingBottom:16,marginHorizontal:16,gap:8,flexWrap:"wrap"},smallScreenTotalContainer:{flexDirection:"row",justifyContent:"space-between",alignItems:"baseline",paddingVertical:16,paddingBottom:16,marginHorizontal:16,gap:8,flexWrap:"wrap"},totalTitle:{..._L.medium_SM},totalGramsContainer:{flexDirection:"row",alignItems:"baseline"},totalValue:{..._L.bold_4XL},totalUnits:{..._L.bold_2XL,marginLeft:8},button:{marginHorizontal:"auto",marginTop:64,marginBottom:32},smallScreenButton:{marginHorizontal:"auto",marginVertical:32}});var W6=(e=>(e.Add="Add",e.Sync="Sync",e.SyncSpinner="SyncSpinner",e.Edit="Edit",e.Done="Done",e))(W6||{});const Y6=({title:e,subtitle:t,children:n,icon:i,onPressCard:r,onPressIcon:a})=>{const o=M.useMemo(()=>"SyncSpinner"===i,[i]);return D.createElement(eh,{style:({pressed:e})=>[$6.container,{opacity:e?.5:1}],onPress:r,disabled:!r},D.createElement(ga,{style:$6.textContainer},D.createElement(pj,{style:$6.title},e),n,!!t&&D.createElement(pj,{style:$6.subtitle},t)),D.createElement(eh,{style:({pressed:e})=>[$6.iconContainer,{opacity:e?.5:1}],onPress:()=>{a&&a()},hitSlop:20,disabled:!a},"Add"===i&&D.createElement(HK,{width:32,height:32}),"Edit"===i&&D.createElement(rQ,{width:32,height:32}),"Sync"===i&&D.createElement(pQ,{height:32,width:32}),"SyncSpinner"===i&&D.createElement(P6,{isSpinning:o,height:32,width:32}),"Done"===i&&D.createElement($K,{width:32,height:32})))},$6=Ei.create({container:{flexDirection:"row",backgroundColor:wL.bgInput,justifyContent:"space-between",padding:16,borderRadius:16},textContainer:{flex:1},title:{..._L.semiBold_Base,marginBottom:4},subtitle:{..._L.regular_XS,color:wL.textSecondary},iconContainer:{backgroundColor:wL.bgIcon,alignSelf:"center",justifyContent:"center",padding:6,borderRadius:16,marginLeft:16}}),X6=oV?{outline:"none"}:{};function q6({value:e,unit:t,editable:n=!0,onChange:i,onPress:r,onBlur:a,testID:o,ref:s}){const{t:l}=eV(),{flagsStoreActions:u}=hL(),{height:c}=vm(),d=M.useMemo(()=>c<667,[c]),[h,m]=M.useState(!1),p=M.useRef(null);M.useImperativeHandle(s,()=>({focus:()=>{setTimeout(()=>{p.current?.focus(),oV&&u.set({isCalculationTabBarHidden:!0})},100)}}),[u]);const f=M.useCallback(()=>{m(!0),oV&&u.set({isCalculationTabBarHidden:!0})},[u]),g=M.useCallback(()=>{m(!1),a?.(),oV&&u.set({isCalculationTabBarHidden:!1})},[u,a]),_=M.useCallback(()=>{n?p.current?.focus():r?.()},[r,n]);return D.createElement(ga,{style:d?Z6.smallScreenContainer:Z6.container},D.createElement(eh,{onPress:_,style:Z6.input,pointerEvents:"box-only"},D.createElement(kh,{ref:p,value:e,onChangeText:i,placeholder:h?"":l("bolus_glucose_enter_input"),onBlur:g,onFocus:f,style:[{...Z6.textInput,...X6},h||e?{..._L.bold_4XL}:{..._L.semiBold_2XL},sV&&!h&&!e&&{paddingTop:16}],placeholderTextColor:wL.textSecondary,cursorColor:wL.iconBrand,enterKeyHint:"done",inputMode:"decimal",autoCorrect:!1,maxLength:4,maxFontSizeMultiplier:vL,multiline:!1,numberOfLines:1,selectTextOnFocus:!0,testID:o}),D.createElement(ga,{style:Z6.unitContainer},D.createElement(pj,{style:[Z6.unitText,{color:h?wL.text:wL.textSecondary}],maxFontSizeMultiplier:vL},t))),D.createElement(ga,{style:Z6.animationContainer},D.createElement(qV,{source:KV.GLUCOSE_INPUT_UNDERLINE,autoPlay:!0,style:Z6.animation,webStyle:Z6.animation})))}const Z6=Ei.create({container:{paddingHorizontal:40,marginBottom:64},smallScreenContainer:{paddingHorizontal:20,marginBottom:32},input:{flexDirection:"row",alignItems:"center",height:62,justifyContent:"center"},textInput:{paddingTop:0,paddingBottom:0,flex:1,textAlign:"right",verticalAlign:"middle",color:wL.text,width:"100%"},unitContainer:{marginLeft:8,flex:1},unitText:{..._L.semiBold_2XL},animationContainer:{height:4,width:"100%",borderRadius:2,overflow:"hidden",justifyContent:"center"},animation:{height:64}});const{HEDIA_API_URL_V2:K6,NODE_ENV:Q6}={HEDIA_API_URL_V2:"/api/v2"},{MMOL_L:J6}=FL.BloodGlucoseUnit,e7=e=>({id:e.id,object_id:e.id,user_id:e.userId,type:e.type,quantity:{unit:e.quantity.unit.toLowerCase(),value:e.quantity.value},timestamp:new Date(e.startDate),source_id:e.source.id,device_name:e.device.name,source_name:e.source.name});const t7=Ei.create({scrollView:{paddingTop:32,paddingHorizontal:16,paddingBottom:130},headerContainer:{marginBottom:112},smallScreenHeaderContainer:{marginBottom:32},row:{flexDirection:"row",justifyContent:"center",alignItems:"center"},pageHeader:{..._L.semiBold_Base,color:wL.text,marginLeft:4},subheader:{..._L.regular_SM,color:wL.textSecondary,textAlign:"center",marginTop:8,marginHorizontal:16},noReadingsContainer:{backgroundColor:wL.bgInput,padding:16,borderRadius:16},noMeasurements:{..._L.regular_XS,textAlign:"center",marginBottom:8,color:wL.textInputText},buttonText:{..._L.semiBold_SM,color:wL.textBrand,textAlign:"center"},card:{flexDirection:"row"},valueContainer:{paddingRight:8,borderRightWidth:1,borderRightColor:wL.borderDivider,marginBottom:4},value:{..._L.medium_XS},crossedOut:{textDecorationLine:"line-through",color:wL.textSecondary},warning:{color:wL.textWarning},time:{..._L.regular_XS,color:wL.textSecondary,marginLeft:8}}),n7=rF(function(){const{t:e}=eV(),t=Gp(),n=cf(),{activityStoreActions:i}=I2(),{glucoseMMOLL:r,glucoseTimestamp:a,isUsingGlucoseSample:o,latestGlucoseSample:s,glucoseStoreActions:l}=V2(),{height:u}=vm(),c=M.useMemo(()=>u<667,[u]),{glucoseUnit:d,activity:h}=Vq;if(void 0===d)throw new Error("[Glucose::render] glucoseUnit must be non-undefined.");const{decimalPlaces:m,inputMax:p,inputMin:f,text:g}=M.useMemo(()=>Xq(d),[d]),[_,v]=M.useState(""),[y,b]=M.useState(!1),[w,S]=M.useState(!1),[k,C]=M.useState(!1),[E,x]=M.useState(!1),[I,T]=M.useState(!1),[O,R]=M.useState(!1),[A,L]=M.useState(!1),[P,N]=M.useState(!1),[F,B]=M.useState(""),[j,V]=M.useState(""),H=M.useRef(null),z=M.useCallback(()=>{window.setTimeout(()=>{window.scrollTo({top:0,left:0,behavior:"smooth"})},100)},[]),U=M.useCallback(()=>{window.visualViewport?.addEventListener("resize",z)},[z]),G=M.useCallback(()=>{window.visualViewport?.removeEventListener("resize",z)},[z]),W=M.useCallback(()=>{l.set({glucoseMMOLL:null,glucoseTimestamp:null,isUsingGlucoseSample:!1,glucoseSampleID:null})},[l]);M.useEffect(()=>(t.addListener("focus",U),t.addListener("blur",G),()=>{t.removeListener("focus",U),t.removeListener("blur",G)}),[t,G,U]),Wp(M.useCallback(()=>{const e=()=>{const e=o&&s?new Date(s.timestamp).getTime():a;e&&Date.now()-e>10*FL.Milliseconds.Minute?(x(!0),v("")):x(!1)};e();const t=setInterval(e,1e3);return()=>{clearInterval(t)}},[o,s,a]));const Y=M.useCallback(()=>{if(s){const{quantity:t,timestamp:n}=s,i=Date.now()-new Date(n).getTime()>10*FL.Milliseconds.Minute,r=pY(new Date,new Date(n).getTime()).toString();V(e("imprted_device_card_time",{min:r}));const a=function(e,t,n){const i=Xq(n).text;return`${PQ(e,t,n)} ${i}`}(t.value,t.unit,d);B(i?e("imprted_device_card_unit"):a),N(i)}},[d,s,e]);M.useEffect(()=>{Y()},[Y]),function(e,t){const n=M.useRef(void 0);M.useLayoutEffect(()=>{n.current=e},[e]),M.useEffect(()=>{const e=setInterval(function(){n.current&&n.current()},t);return()=>{clearInterval(e)}},[t])}(Y,1e3),M.useEffect(()=>{n.params?.editGlucose&&(v(""),H.current?.focus())},[n.params?.editGlucose]),M.useEffect(()=>{null===r&&v("")},[r]),M.useEffect(()=>{(async()=>{try{L(!0);const e=await FX(`${K6}/samples`);if(!e.ok)throw new Error("[Glucose::getSamples] response status not OK");const t=await e.json();if(t.length>0){const e=t.map(e7),n=e.filter(e=>"HDA"!==e.source_name&&e.timestamp.getTime()<=(new Date).getTime()).sort((e,t)=>t.timestamp.getTime()-e.timestamp.getTime());if(n.length>0){const e=n[0],{unit:t,value:i}=e.quantity,{inputMax:r,inputMin:a}=Xq(t);i>=a&&i<=r?(l.set({latestGlucoseSample:e,isUsingGlucoseSample:!0}),(e=>{const{id:t,isTester:n,country:i,uuid:r,timestamp:a,timezone:o,platform:s}=DX(),l={uuid:r,timestamp:a,timezone:o,type:"integration.service.transfer",data:{version:PX,platform:s,source:{sourceID:e.source_id,deviceName:e.device_name,sourceName:e.source_name},reading:{type:e.type,value:e.quantity.value,unit:e.quantity.unit},geo:{country:i},user:{id:t,isTester:n}}};XW.update(l),XW.sync().catch(console.error)})(e)):l.set({latestGlucoseSample:null,isUsingGlucoseSample:!1})}}}finally{L(!1)}})().catch(console.error)},[l]),M.useEffect(()=>{if(o&&s){const{quantity:e}=s;l.set({glucoseMMOLL:AQ(e.value,e.unit,J6),glucoseSampleID:s.id});const t=PQ(e.value,e.unit,d);v(t)}},[d,o,s,l]),M.useEffect(()=>{if(""!==_&&s){const{quantity:e}=s,t=PQ(e.value,e.unit,d);_!==t||P||l.set({isUsingGlucoseSample:!0})}},[d,_,P,s,l]),M.useEffect(()=>{const e=Lq.getEventWithHighestReduction(h);i.set({selectedEventUUID:e?.uuid??null,activityDurationSeconds:e?.durationSeconds??0})},[h,i]);const $=M.useCallback(()=>{if(""===_)return void W();const e=parseFloat(_);if(!(!isNaN(e)&&e>=f&&e<=p)){const e=r&&PQ(r,J6,d);return v(e||""),void b(!0)}const t=AQ(e,d,J6);l.set({glucoseMMOLL:t,glucoseTimestamp:Date.now()}),v(e.toFixed(m))},[W,m,_,r,d,p,f,l]),X=M.useCallback(()=>{o?C(!0):H.current?.focus()},[o]),q=M.useCallback(()=>{O&&(W(),C(!1),H.current?.focus(),R(!1))},[W,O]),Z=M.useCallback(()=>{R(!0),C(!1)},[]),K=M.useCallback(()=>{S(!0)},[]),Q=M.useCallback(()=>{P||l.set({isUsingGlucoseSample:!0})},[P,l]),J=M.useCallback(()=>{W(),x(!1)},[W]),ee=M.useCallback(()=>{W(),x(!1),T(!0)},[W]),te=M.useCallback(()=>{I&&H.current?.focus(),T(!1)},[H,I]),ne=M.useCallback(e=>{v(e.replace(",","."))},[]),ie=M.useCallback(()=>{const e={id:"TEST",object_id:"TEST",user_id:"TEST",type:"blood_glucose",timestamp:new Date(Date.now()-(4*Math.random()+5)*FL.Milliseconds.Minute),source_id:"TEST",quantity:{unit:FL.BloodGlucoseUnit.MMOL_L,value:Math.random()*(33.3-1.1)+1.1},source_name:"HDA Test Name",device_name:"HDA Test Dvice"};l.set({isUsingGlucoseSample:!0,latestGlucoseSample:e})},[l]),re=M.useMemo(()=>!o&&!P,[P,o]);return D.createElement(D.Fragment,null,D.createElement(Xa,{testID:"bg-scroll-view",scrollEventThrottle:8,contentContainerStyle:t7.scrollView},D.createElement(ga,{style:c?t7.smallScreenHeaderContainer:t7.headerContainer},D.createElement(ga,{style:t7.row},D.createElement(iQ,{color:wL.icon,width:24,height:24}),D.createElement(pj,{style:t7.pageHeader},e("new_cal_current_glucose_title"))),D.createElement(pj,{style:t7.subheader},e("new_cal_glucose_body"))),D.createElement(q6,{ref:H,value:_,unit:g,onChange:ne,onPress:X,onBlur:$,editable:!(o||A)}),s?D.createElement(Y6,{title:s.device_name,subtitle:e("from_source",{source:s.source_name}),icon:o?W6.Done:W6.Sync,onPressCard:o?void 0:Q},D.createElement(ga,{style:t7.card},D.createElement(ga,{style:t7.valueContainer},D.createElement(pj,{style:[t7.value,re&&t7.crossedOut,P&&t7.warning]},F)),D.createElement(pj,{style:t7.time},j))):D.createElement(eh,{style:t7.noReadingsContainer,onPress:K,onLongPress:()=>{"production"!==Q6&&ie()}},D.createElement(pj,{style:t7.noMeasurements},e("bg_device_no_measurement")),D.createElement(pj,{style:t7.buttonText},e("bg_device_no_measurement_body")))),D.createElement(sz,{isVisible:y,title:e("current_glucose_invalid_high_modal_title",{min:LQ(f,d),max:LQ(p,d)}),buttons:[{testID:"close-button",title:e("button_close"),onPress:()=>{b(!1)}}]}),D.createElement(sz,{isVisible:w,title:e("import_modal_reading_title"),message:e("import_modal_reading_body"),buttons:[{testID:"close-button",title:e("button_close"),onPress:()=>{S(!1)}}]}),D.createElement(sz,{isVisible:k,title:e("new_cal_modal_change_synced_value_title"),message:e("new_cal_modal_change_synced_value_body"),onModalHide:q,buttons:[{testID:"change-button",type:lj.Error,title:e("new_cal_modal_change_synced_value_danger_button"),onPress:Z},{testID:"keep-button",type:lj.Secondary,title:e("new_cal_modal_change_synced_value_button"),onPress:()=>{C(!1)}}]}),D.createElement(sz,{isVisible:E,title:e("new_cal_summary_modal_expire_title"),message:e("new_cal_summary_modal_expire_body"),icon:GK,onModalHide:te,onModalShow:()=>{NX(MX.ExpiredGlucose)},buttons:[{title:e("new_cal_summary_modal_expire_button_edit"),onPress:ee},{title:e("button_cancel"),type:lj.Secondary,onPress:J}]}))}),i7=oV?56:48,r7=({onCompleteSwipe:e,testID:t,ref:n})=>{const{t:i}=eV(),{width:r}=vm(),a=M.useMemo(()=>r-32-64,[r]),o=M.useMemo(()=>a-i7-(oV?3:12),[a]),s=lR(0),l=lR(a);M.useEffect(()=>{l.value=a},[a,l]);const[u,c]=M.useState(0);M.useImperativeHandle(n,()=>({reset:()=>{s.value=rx(100,DE(0)),l.value=rx(100,DE(a))}}));const d=nL.Pan().onUpdate(e=>{const t=Math.max(0,Math.min(e.translationX,o));s.value=t,l.value=a-t}).onEnd(()=>{s.value>=1*o?Hk(e)():(s.value=lx(0),l.value=lx(a))}),h=mR(()=>({width:l.value}),[l]);return D.createElement(FR.View,{style:[a7.container,h]},D.createElement(FA,{gesture:d},D.createElement(ga,{style:a7.iconContainer},D.createElement(_Q,{testID:t}),D.createElement(pj,{style:[a7.text,{left:(a-u)/2}],onLayout:e=>{const{width:t}=e.nativeEvent.layout;0===u&&c(t)}},i("new_cal_summary_calculate_slider")))))};r7.displayName="SwipeButton";const a7=Ei.create({container:{justifyContent:"center",alignSelf:"flex-end",marginHorizontal:16,borderRadius:42,overflow:"hidden",height:58,backgroundColor:wL.bgToggleSlider,borderColor:wL.borderSlider,borderWidth:1},iconContainer:{alignItems:"center",flexDirection:"row",overflow:"hidden",marginHorizontal:6},text:{position:"absolute",color:wL.text,..._L.medium_LG}});const o7=Ei.create({scrollView:{paddingTop:32,paddingHorizontal:32,paddingBottom:130},headerContainer:{flexDirection:"row",gap:4,alignItems:"center",justifyContent:"center",paddingBottom:32},headerText:{..._L.semiBold_Base,color:wL.text},invisibleCalculateButton:{position:"absolute",top:0,right:0,width:0,height:0,opacity:0},listItemContainer:{paddingVertical:16,paddingHorizontal:16},listItem:{flexDirection:"row",alignItems:"center",justifyContent:"space-between"},listItemLeft:{flexDirection:"row",alignItems:"center"},listItemRight:{alignItems:"flex-end"},listItemTitle:{..._L.regular_SM,marginLeft:8},listItemValue:{..._L.bold_2XL},listItemUnit:{..._L.regular_SM},separatorLine:{width:"100%",height:1,backgroundColor:wL.borderDivider},activityIntensityContainer:{alignSelf:"flex-end",paddingHorizontal:12,paddingVertical:8,borderRadius:40,backgroundColor:wL.bgIcon,justifyContent:"center",alignItems:"center",marginTop:4},activityIntensityText:{..._L.regular_XS},swipeContainer:{marginTop:64,justifyContent:"center"},smallScreenSwipeContainer:{marginTop:32,justifyContent:"center"}}),s7=rF(function(){const{t:e}=eV(),{navigate:t}=Gp(),n=cf(),{height:i}=vm(),r=M.useMemo(()=>i<667,[i]),{glucoseTimestamp:a,glucoseMMOLL:o,isUsingGlucoseDeviceReading:s,latestGlucoseDeviceReading:l,latestGlucoseSample:u,isUsingGlucoseSample:c,glucoseStoreActions:d}=V2(),{manualCarbsInput:h,totalCarbsCartItems:m}=EX(),{selectedEventUUID:p}=I2(),{glucoseUnit:f,activity:g}=Vq;if(void 0===f)throw new Error("[Summary::render] glucoseUnit is undefined");if(void 0===g)throw new Error("[Summary::render] activity is undefined");const _=M.useRef(null),[v,y]=M.useState(!1),[b,w]=M.useState(null),[S,k]=M.useState(!1),[C,E]=M.useState(!1),[x,I]=M.useState(!1),[T,O]=M.useState(!1),R=M.useRef(new uu.Value(0)).current,A=M.useRef(new uu.Value(.8)).current;Wp(M.useCallback(()=>{R.setValue(0),A.setValue(.8),uu.parallel([uu.timing(R,{toValue:1,duration:200,useNativeDriver:!oV,easing:Xl.in(Xl.linear)}),uu.timing(A,{toValue:1,duration:200,useNativeDriver:!oV,easing:Xl.in(Xl.linear)})]).start()},[R,A])),M.useEffect(()=>{const e=()=>{const e=c&&u?new Date(u.timestamp).getTime():s&&l?l.timestamp.getTime():a;e&&Date.now()-e>10*FL.Milliseconds.Minute?(y(!0),d.set({glucoseMMOLL:null})):y(!1)};e();const t=setInterval(e,1e3);return()=>{clearInterval(t)}},[s,l,c,u,a,d]);const L=M.useMemo(()=>p?Lq.getByUUID(p):null,[p]),P=M.useCallback(()=>v?(NX(MX.SummaryExpiredGlucose),void I(!0)):null===o?(NX(MX.SummaryEmptyGlucose),void k(!0)):void t(C2.LoadingRecommendation),[o,v,t]);M.useEffect(()=>{n.params?.errorType&&(w(n.params.errorType),_.current?.reset())},[n.params]);const{glucoseDisplayValue:N,glucoseDispalyUnit:F}=M.useMemo(()=>v?{glucoseDisplayValue:null,glucoseDispalyUnit:e("new_cal_summary_expired")}:null!==o?{glucoseDisplayValue:PQ(o,FL.BloodGlucoseUnit.MMOL_L,f),glucoseDispalyUnit:Xq(f).text}:{glucoseDisplayValue:null,glucoseDispalyUnit:"-"},[o,f,v,e]),{activityIntervalDisplay:B,activityIntensityDisplay:j}=M.useMemo(()=>{if(L?.durationSeconds&&L.startTimestamp){return{activityIntervalDisplay:xQ(Math.round(L.durationSeconds/60)),activityIntensityDisplay:L.activityIntensity?OQ[L.activityIntensity]():null}}return{activityIntervalDisplay:null,activityIntensityDisplay:null}},[L]),V=M.useMemo(()=>n.params?.errorType===tV.Sync,[n.params]);return D.createElement(D.Fragment,null,D.createElement(Xa,{testID:"summary-scroll-view",scrollEventThrottle:8,contentContainerStyle:o7.scrollView},oV&&D.createElement(eh,{testID:"invisible-calculate-button",onPress:P,style:o7.invisibleCalculateButton}),D.createElement(ga,{style:o7.headerContainer},D.createElement(oQ,null),D.createElement(pj,{style:o7.headerText},e("new_cal_summary_title"))),D.createElement(uu.View,{style:{opacity:R,transform:[{scale:A}]}},D.createElement(ga,{style:[o7.listItemContainer,o7.listItem]},D.createElement(ga,{style:o7.listItemLeft},D.createElement(iQ,{color:wL.text,height:24,width:24}),D.createElement(pj,{style:o7.listItemTitle},e("new_cal_summary_glucose_title"))),D.createElement(ga,{style:o7.listItemRight},null!==N&&D.createElement(pj,{style:o7.listItemValue},N),D.createElement(pj,{style:o7.listItemUnit},F))),D.createElement(ga,{style:o7.separatorLine}),D.createElement(ga,{style:[o7.listItemContainer,o7.listItem]},D.createElement(ga,{style:o7.listItemLeft},D.createElement(UK,{color:wL.text,height:24,width:24}),D.createElement(pj,{style:o7.listItemTitle},e("new_cal_summary_carb_title"))),D.createElement(ga,{style:o7.listItemRight},D.createElement(pj,{style:o7.listItemValue},Math.round(h+m)),D.createElement(pj,{style:o7.listItemUnit},e("logbook_collum_unit")))),D.createElement(ga,{style:o7.separatorLine}),D.createElement(ga,{style:o7.listItemContainer},D.createElement(ga,{style:o7.listItem},D.createElement(ga,{style:o7.listItemLeft},D.createElement(tQ,null),D.createElement(pj,{style:o7.listItemTitle},e("new_cal_summary_activity_title"))),D.createElement(ga,{style:o7.listItemRight},null!==B&&D.createElement(pj,{style:o7.listItemValue},B),D.createElement(pj,{style:o7.listItemUnit},null!==B?e("new_cal_summary_activity_unit"):"-"))),null!==j&&D.createElement(ga,{style:o7.activityIntensityContainer},D.createElement(pj,{style:o7.activityIntensityText},j)))),D.createElement(ga,{style:r?o7.smallScreenSwipeContainer:o7.swipeContainer},D.createElement(r7,{ref:_,onCompleteSwipe:P,testID:"calculate-swipe-button"}))),D.createElement(O5,null),D.createElement(sz,{isVisible:null!==b,icon:V?hQ:void 0,title:e(V?"recommendation_no_save_modal_title":"rejected_input_modal_title"),message:e(V?"recommendation_no_save_modal_body":"rejected_input_modal_body"),buttons:[{title:e("button_close"),onPress:()=>{w(null)}}]}),D.createElement(sz,{isVisible:S,title:e("new_cal_summary_modal_enter_glucose_title"),message:e("new_cal_summary_modal_enter_glucose_body"),icon:GK,onModalHide:()=>{_.current?.reset(),C&&t(C2.GlucoseTab,{editGlucose:IX()}),E(!1)},buttons:[{title:e("new_cal_summary_modal_enter_glucose_button_add"),onPress:()=>{E(!0),k(!1)}},{title:e("button_cancel"),type:lj.Secondary,onPress:()=>{k(!1)}}]}),D.createElement(sz,{isVisible:x,title:e("new_cal_summary_modal_expire_title"),message:e("new_cal_summary_modal_expire_body"),icon:GK,onModalHide:()=>{_.current?.reset(),oV?d.set({glucoseSampleID:null,isUsingGlucoseSample:!1,glucoseTimestamp:null}):d.set({isUsingGlucoseDeviceReading:!1,glucoseTimestamp:null}),T&&t(C2.GlucoseTab,{editGlucose:IX()}),T&&y(!1),O(!1)},buttons:[{title:e("new_cal_summary_modal_expire_button_edit"),onPress:()=>{O(!0),I(!1)}},{title:e("button_cancel"),type:lj.Secondary,onPress:()=>{I(!1)}}]}))}),l7=e=>d.jsx(R6,{...e}),u7=()=>{const{t:e}=eV(),{Navigator:t,Screen:n}=u6();return d.jsxs(t,{screenOptions:{...s0,tabBarHideOnKeyboard:!0,title:e("new_calculation_navigation")},backBehavior:"none",tabBar:l7,children:[d.jsx(n,{name:C2.GlucoseTab,component:n7}),d.jsx(n,{name:C2.CarbsTab,component:U6}),d.jsx(n,{name:C2.ActivityTab,component:N6}),d.jsx(n,{name:C2.SummaryTab,component:s7})]})};function c7(){const{t:e}=eV(),{Navigator:t,Screen:n}=k2();return d.jsxs(t,{screenOptions:{headerShown:!1,...dJ},children:[d.jsx(n,{name:C2.ActiveInsulin,component:B5,options:{...a0,headerLeft:()=>null,headerRight:Q2,title:e("new_calculation_navigation")}}),d.jsx(n,{name:C2.RegisterActiveInsulin,component:N5,options:{...o0,headerLeft:e0,title:e("recent_insulin_navigation_title"),...yJ}}),d.jsx(n,{name:C2.CalculationBottomTabs,component:u7}),d.jsx(n,{name:C2.LoadingRecommendation,component:v5}),d.jsx(n,{name:C2.Recommendation,component:b5,options:{...a0,headerShown:!1}}),d.jsx(n,{name:C2.LeavingRecommendation,component:D3})]})}const d7=AX(FL.CONSTANTS.ACTIVITY_TARGET_GLUCOSE_MIN,FL.CONSTANTS.ACTIVITY_TARGET_GLUCOSE_MAX),h7=RX(90,250),m7={fromZero:1,fromThirty:.75,fromFortysix:.5},p7={fromZero:1,fromThirty:.5,fromFortysix:.25},f7={fromZero:1,fromThirty:.25,fromFortysix:null},g7={fromZero:1,fromThirty:.5,fromFortysix:.5};function _7(){return{target:8,light:m7,moderate:p7,hard:f7,post:g7}}const v7=({text:e,learnMoreText:t,learnMoreOnPress:n})=>{const{t:i}=eV();return M.createElement(ga,{style:y7.card},M.createElement(kQ,null),M.createElement(ga,{style:y7.rightContainer},M.createElement(pj,{style:y7.contactText},e??i("warning_HCP")),void 0!==t&&void 0!==n&&M.createElement(Ic,{onPress:n,style:y7.learnMoreContainer},M.createElement(pj,{style:y7.learnMoreText},t),M.createElement(lQ,{color:wL.iconBrand,height:16,width:16}))))},y7=Ei.create({card:{backgroundColor:wL.bgInfoBox,borderRadius:16,paddingHorizontal:16,paddingVertical:12,flexDirection:"row",gap:8},rightContainer:{flex:1,gap:8},learnMoreContainer:{flexDirection:"row",alignItems:"center",gap:4},contactText:{flexShrink:1,..._L.regular_SM,color:wL.text},learnMoreText:{flexShrink:1,..._L.semiBold_SM,color:wL.textBrand}});function b7({columnDisposition:e,disabled:t=!1,testID:n,children:i,style:r}){return D.createElement(ga,{testID:n,style:[w7.row,t&&w7.disabledRow,r]},D.Children.map(i,(n,i)=>D.isValidElement(n)?D.cloneElement(n,{disabled:t,cellRatio:e?e[i]:void 0}):null))}const w7=Ei.create({row:{flexDirection:"row",justifyContent:"space-between",backgroundColor:wL.bgTableTopActive},disabledRow:{opacity:.5}});function S7({index:e,columnDisposition:t,disabled:n=!1,testID:i,children:r,style:a}){const o=M.useCallback(e=>void 0!==e&&e%2?wL.bgTableInputActive:wL.bgTableHighlight,[]);return D.createElement(ga,{testID:i,style:[k7.row,n&&k7.disabledRow,{backgroundColor:o(e)},a]},D.Children.map(r,(e,i)=>D.isValidElement(e)?D.cloneElement(e,{disabled:n,cellRatio:t?t[i]:void 0}):null))}const k7=Ei.create({row:{flexDirection:"row",justifyContent:"space-between"},disabledRow:{opacity:.5}});function C7({columnDisposition:e,disabled:t=!1,testID:n,children:i,style:r}){return D.createElement(ga,{testID:n,style:[E7.table,t&&E7.tableDisabled,r]},(()=>{let n=0;return D.Children.map(i,i=>{if(D.isValidElement(i)){if(i.type===b7){const n=i;return D.cloneElement(n,{disabled:n.props.disabled??t,columnDisposition:e})}if(i.type===S7){const r=i,a=D.cloneElement(r,{disabled:r.props.disabled??t,index:n,columnDisposition:e});return n+=1,a}return D.cloneElement(i)}return null})})())}const E7=Ei.create({table:{borderRadius:16,overflow:"hidden",backgroundColor:wL.bgTableInputActive},tableDisabled:{backgroundColor:wL.bgTableInputInactive}});function x7({disabled:e=!1,onPress:t,testID:n,accessibilityLabel:i,accessibilityValue:r,cellRatio:a,children:o,style:s}){return D.createElement(Ic,{disabled:!t||e,onPress:t,style:[I7.cell,{flex:a??1},s],testID:n,accessibilityRole:"button",accessibilityHint:"Double-tap to set value",accessibilityState:{disabled:e},accessibilityLabel:i,accessibilityValue:{text:r}},D.Children.map(o,t=>{if(D.isValidElement(t)){const n=t;if(e){const e=n.props.style,t=Array.isArray(e)?[...e,{color:wL.text}]:[e,{color:wL.text}];return D.cloneElement(n,{...n.props,style:t})}return D.cloneElement(n)}return null}))}const I7=Ei.create({cell:{justifyContent:"center",alignItems:"center",borderColor:wL.borderTableDivider,borderTopWidth:1,borderLeftWidth:1,paddingVertical:8}});function T7({testID:e,cellRatio:t,children:n,style:i,accessibilityLabel:r,accessibilityValue:a,disabled:o=!1}){return D.createElement(ga,{style:[O7.cell,{flex:t??1},i],testID:e,accessible:!0,accessibilityRole:"header",accessibilityState:{disabled:o},accessibilityLabel:r,accessibilityValue:{text:a}},n)}const O7=Ei.create({cell:{justifyContent:"space-between",alignItems:"center",borderColor:wL.borderTableDivider,borderTopWidth:1,borderLeftWidth:1,paddingVertical:8}}),R7=()=>Jj("activity_settings_table_min"),A7=[{title:"0-29",subtitle:R7},{title:"30-45",subtitle:R7},{title:"46-60",subtitle:R7}],L7=e=>Math.round(100*(1-e)),P7=e=>null===e?"-":`${L7(e).toString()} %`,M7=e=>Math.round(100*(1-e/100))/100;const D7=rF(function(){const{t:e}=eV(),{modalStoreActions:t}=z2(),[n,i]=M.useState(!1),[r,a]=M.useState(!1),[o,s]=M.useState(!1),[l,u]=M.useState(null),[c,d]=M.useState(null),[h,m]=M.useState(void 0),{glucoseUnit:p}=Vq;if(void 0===p)throw new Error("[ActivitySettings::render] glucoseUnit is not defined");const{activity:f}=Vq;if(void 0===f)throw new Error("[ActivitySettings::render] activity is not defined");const{target:g,post:_,hard:v,light:y,moderate:b}=f,w=M.useMemo(()=>PQ(g,FL.BloodGlucoseUnit.MMOL_L,p),[p,g]),{text:S}=M.useMemo(()=>Xq(p),[p]),k=M.useMemo(()=>({light:y,moderate:b,hard:v}),[y,b,v]),C=M.useMemo(()=>({post:_}),[_]),E=M.useCallback(async()=>{const e={..._7(),target:g,post:_};if(LX(f,e))return;const t=await Vq.setUserSettings({activity:e});m(t)},[f,_,g]),x=M.useCallback(async()=>{const e={hard:v,moderate:b,light:y,target:g,post:_7().post};if(LX(f,e))return;const t=await Vq.setUserSettings({activity:e});m(t)},[f,v,y,b,g]),I=M.useCallback((e,t)=>{u({interval:t,intensity:e}),i(!0)},[i,u]),T=M.useCallback(()=>{u(null),i(!0)},[]),O=M.useCallback(async e=>{if(null===l)throw new Error("[ActivitySettings::updateActivity] pressedTableCell is null");if(M7(e)!==f[l.intensity][l.interval]){const t=JSON.parse(JSON.stringify(f));t[l.intensity][l.interval]=M7(e);const n=await Vq.setUserSettings({activity:t});m(n)}},[f,l]),R=M.useCallback(async e=>{const t=AQ(e,p,FL.BloodGlucoseUnit.MMOL_L);if(t!==f.target){const e=JSON.parse(JSON.stringify(f));e.target=t;const n=await Vq.setUserSettings({activity:e});m(n)}},[f,p]),A=M.useCallback(async e=>{l?await O(e):await R(e),i(!1)},[l,O,R]),L=M.useMemo(()=>{if(null===l){return p===FL.BloodGlucoseUnit.MMOL_L?d7:h7}return RX(0,75)},[l,p]),P=M.useMemo(()=>{if(null===l){const e=PQ(g,FL.BloodGlucoseUnit.MMOL_L,p);return L.findIndex(t=>t===e)}const e=f[l.intensity][l.interval];return null===e?75:L7(e)},[l,f,g,p,L]),N=M.useCallback(()=>{!1===h&&t.set({showSyncErrorModal:!0}),m(void 0)},[h,t]);return D.createElement(D.Fragment,null,D.createElement(Xa,{testID:"settings-activity-scroll",style:N7.scrollView,contentContainerStyle:N7.scrollViewContent},D.createElement(v7,{text:e("physical_activity_hcp_card_body"),learnMoreText:e("physical_activity_hcp_card_button"),learnMoreOnPress:()=>{s(!0)}}),D.createElement(ga,null,D.createElement(Sj,{title:e("physical_activity_target_title"),subtitle:e("physical_activity_target_body")}),D.createElement(bj,{title:e("target_activity_input"),value:`${w} ${S}`,testID:"activity-target",onPress:T})),D.createElement(ga,null,D.createElement(Sj,{title:e("target_activity_reduction_title"),subtitle:e("target_activity_reduction_body")}),D.createElement(C7,{columnDisposition:[3,2,2,2]},D.createElement(b7,null,[{title:Jj("table_activity_intensity"),maxFontSizeMultiplier:yL},{title:"0-29",subtitle:R7(),maxFontSizeMultiplier:bL},{title:"30-45",subtitle:R7(),maxFontSizeMultiplier:bL},{title:"46-60",subtitle:R7(),maxFontSizeMultiplier:bL}].map((e,t)=>D.createElement(T7,{key:e.title,style:[0===t&&N7.tableFirstCell,N7.noTopBorder]},D.createElement(pj,{style:N7.tableHeaderTitle,maxFontSizeMultiplier:e.maxFontSizeMultiplier},e.title),D.createElement(D.Fragment,null,e.subtitle&&D.createElement(pj,{style:N7.tableHeaderSubtitle},e.subtitle))))),Object.keys(k).map(e=>D.createElement(S7,{key:e},D.createElement(x7,{style:N7.tableFirstCell},D.createElement(pj,{style:N7.tableTitle},OQ[e]())),Object.keys(k[e]).map(t=>D.createElement(x7,{key:t,testID:`settings-activity-${e}-${t}`,onPress:()=>{I(e,t)}},D.createElement(pj,{style:N7.tableText},P7(k[e][t])))))),D.createElement(Ic,{style:N7.resetContainer,onPress:()=>{d("during"),a(!0)},testID:"restore-default-activity-settings-during"},D.createElement(pj,{style:N7.resetText},e("button_reset_default"))))),D.createElement(ga,null,D.createElement(Sj,{title:e("target_activity_reduction_after_title"),subtitle:e("target_activity_reduction_after_body")}),D.createElement(C7,null,D.createElement(b7,null,A7.map((e,t)=>D.createElement(T7,{key:e.title,style:[0===t&&N7.noLeftBorder,N7.noTopBorder]},D.createElement(pj,{style:N7.tableHeaderTitle},e.title),D.createElement(pj,{style:N7.tableHeaderSubtitle},e.subtitle())))),D.createElement(S7,null,Object.keys(C.post).map((e,t)=>D.createElement(x7,{key:e,style:[0===t&&N7.noLeftBorder,N7.activeBackground],testID:`settings-activity-post-${e}`,onPress:()=>{I("post",e)}},D.createElement(pj,{style:N7.tableText},P7(C.post[e]))))),D.createElement(Ic,{style:N7.resetContainer,onPress:()=>{d("after"),a(!0)},testID:"restore-default-activity-settings-after"},D.createElement(pj,{style:N7.resetText},e("button_reset_default")))))),D.createElement(n3,{initialScrollIndex:P,isVisible:n,onCancel:()=>{i(!1)},onConfirm:A,items:L,onModalHide:N,testID:"activity-wheel-picker"}),D.createElement(sz,{title:e("physical_activity_modal_reset_title "),isVisible:r,onModalHide:N,buttons:[{title:e("button_reset"),type:lj.Error,onPress:async()=>{"after"===c?await x():await E(),a(!1)}},{title:e("button_cancel"),type:lj.Secondary,onPress:()=>{a(!1)}}]}),D.createElement(sz,{isVisible:o,enableScroll:!0,buttons:[{title:e("button_close"),onPress:()=>{s(!1)},style:N7.activityInfoModalButton}]},D.createElement(A6,null)),D.createElement(U0,{onModalHide:()=>{m(void 0)}}))}),N7=Ei.create({scrollView:{paddingHorizontal:16},scrollViewContent:{flexGrow:1,gap:32,paddingVertical:32},tableFirstCell:{paddingLeft:16,alignItems:"flex-start",borderLeftWidth:0},resetText:{..._L.semiBold_Base,color:wL.textDangerTableActive,textAlign:"center"},resetContainer:{backgroundColor:wL.bgInput,alignItems:"center",padding:16,borderTopWidth:1,borderColor:wL.borderTableDivider},tableHeaderTitle:{..._L.semiBold_Base,color:wL.textInputText},tableHeaderSubtitle:{..._L.medium_XS,color:wL.textInputTextSecondary},tableTitle:{..._L.regular_Base,color:wL.text},tableText:{..._L.medium_Base,color:wL.textTableActive},activityInfoModalButton:{marginTop:32},noTopBorder:{borderTopWidth:0},noLeftBorder:{borderLeftWidth:0},activeBackground:{backgroundColor:wL.bgTableInputActive}}),F7=Array.from({length:60},(e,t)=>t.toString().padStart(2,"0"));const B7=D.memo(function({isVisible:e,initialValue:t,min:n,max:i,onCancel:r,onConfirm:a,onModalHide:o}){const{width:s}=vm(),l=M.useRef(null),u=M.useRef(null),c=M.useMemo(()=>{const e=[],t=i?nX("59","mm",new Date(i)):nX("23:59","HH:mm",new Date);let r=n?nX("00","mm",new Date(n)):nX("00:00","HH:mm",new Date);for(;s$(r,t)||aX(r,t);)e.push(r),r=iY(r,1);return e},[i,n]),d=M.useMemo(()=>c.map(e=>e.getHours().toString().padStart(2,"0"),[]),[c]),[h,m]=M.useState(t),p=function(e){const t=M.useRef(void 0);return M.useEffect(()=>{t.current=e},[e]),t.current}(e);M.useEffect(()=>{!p&&e&&m(t)},[p,e,t]);const f=M.useMemo(()=>c.findIndex(e=>e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()&&e.getHours()===t.getHours()),[c,t]),g=M.useMemo(()=>{const[,e]=i$(t,"HH:mm").split(":");return F7.indexOf(e)},[t]),_=M.useMemo(()=>c.findIndex(e=>e.getFullYear()===h.getFullYear()&&e.getMonth()===h.getMonth()&&e.getDate()===h.getDate()&&e.getHours()===h.getHours()),[c,h]),v=M.useMemo(()=>{const[,e]=i$(h,"HH:mm").split(":");return F7.indexOf(e)},[h]),y=M.useMemo(()=>n?0:null,[n]),b=M.useMemo(()=>i?c.length-1:null,[i,c]),w=M.useMemo(()=>{if(!n)return null;const[,e]=i$(n,"HH:mm").split(":");return F7.indexOf(e)},[n]),S=M.useMemo(()=>{if(!i)return null;const[,e]=i$(i,"HH:mm").split(":");return F7.indexOf(e)},[i]),k=M.useCallback(()=>{a(h)},[a,h]),C=M.useCallback(()=>{m(t),r()},[r,t]),E=M.useCallback((e,r)=>{if(e<0||r<0||e>=c.length||r>=F7.length)return;const a=`${c[e].getHours()}:${F7[r]}`;if(!n||!i){const e=nX(a,"HH:mm",new Date(t));return void m(e)}const o=c[e],s=nX(a,"HH:mm",new Date(o));m(s)},[n,i,c,t]),x=M.useCallback(e=>{u.current?.scrollToIndex(e)},[]),I=M.useCallback(e=>{null!==b&&null!==y&&null!==S&&null!==w?e===y&&v<w?(E(e,w),x(w)):e===b&&v>S?(E(e,S),x(S)):E(e,v):E(e,v)},[b,y,S,w,E,v,x]),T=M.useCallback(e=>{null!==b&&null!==y&&null!==S&&null!==w?_===y&&e<w?(E(_,w),x(w)):_===b&&e>S?(E(_,S),x(S)):E(_,e):E(_,e)},[E,b,S,y,w,x,_]);return D.createElement(sz,{isVisible:e,containerStyle:j7.modalContainer,onModalHide:o},D.createElement(ga,null,D.createElement(ga,{style:j7.pickersContainer},D.createElement(t3,{testID:"hours_wheel_picker",key:"hours-wheel-picker",ref:l,initialScrollIndex:f,options:d,onChange:I,containerStyle:[j7.itemContainerLeft,{width:(s-32)/2}],selectedIndicatorStyle:[j7.selectedIndicatorLeft,{width:(s-32)/2-10}],itemStyle:j7.itemLeft}),D.createElement(t3,{testID:"minutes_wheel_picker",key:"minutes-wheel-picker",ref:u,initialScrollIndex:g,options:F7,onChange:T,containerStyle:[j7.itemContainerRight,{width:(s-32)/2}],selectedIndicatorStyle:[j7.selectedIndicatorRight,{width:(s-32)/2-10}],itemStyle:j7.itemRight})),D.createElement(ga,{style:j7.buttonContainer},D.createElement(q0,{onPress:k}),D.createElement($0,{onPress:C}))))}),j7=Ei.create({modalContainer:{backgroundColor:wL.bgTransparent},buttonContainer:{gap:8},pickersContainer:{flexDirection:"row",borderTopLeftRadius:13,borderTopRightRadius:13,overflow:"hidden"},itemContainerLeft:{borderTopRightRadius:0,paddingLeft:16},itemContainerRight:{borderTopLeftRadius:0,paddingRight:16},itemLeft:{alignSelf:"flex-end",marginRight:16},itemRight:{alignSelf:"flex-start",marginLeft:16},selectedIndicatorRight:{alignSelf:"flex-start",borderTopLeftRadius:0,borderBottomLeftRadius:0},selectedIndicatorLeft:{alignSelf:"flex-end",borderTopRightRadius:0,borderBottomRightRadius:0}});var V7=(e=>(e.Low="low",e.Target="target",e.High="high",e))(V7||{});const H7=()=>Jj("table_fixed_target");const z7=(e,t)=>({startTime:e.startTime,low:PQ(e.low,FL.BloodGlucoseUnit.MMOL_L,t),target:PQ(e.target,FL.BloodGlucoseUnit.MMOL_L,t),high:PQ(e.high,FL.BloodGlucoseUnit.MMOL_L,t)}),U7=(e,t)=>{const n=e.startTime;let i=parseFloat(e.low),r=parseFloat(e.target),a=parseFloat(e.high);return i=AQ(i,t,FL.BloodGlucoseUnit.MMOL_L),r=AQ(r,t,FL.BloodGlucoseUnit.MMOL_L),a=AQ(a,t,FL.BloodGlucoseUnit.MMOL_L),{startTime:n,low:i,target:r,high:a}},G7=(e,t)=>e.map(e=>U7(e,t));const W7=rF(function(){const{t:e}=eV(),{modalStoreActions:t}=z2(),n=Gp(),[i,r]=M.useState(),[a,o]=M.useState(void 0),[s,l]=M.useState(!1),[u,c]=M.useState(!1),[d,h]=M.useState(!1),[m,p]=M.useState(),f=Vq.glucoseUnit;if(void 0===f)throw new Error("[GlucoseSettings::render] glucoseUnit is undefined.");const g=Vq.glucoseLevelTargets;if(void 0===g)throw new Error("[GlucoseSettings::render] parameters from userSettings must be defined and non-null.");const _=g.targetBGLIntervals;if(!_)throw new Error("[GlucoseSettings::render] parameters from userSettings must be defined and non-null.");const v=g.overallTargetBGL;if(!v)throw new Error("[GlucoseSettings::render] parameters from userSettings must be defined and non-null.");const y=g.use===FL.Usage.Overall,b=((e,t)=>e.map(e=>z7(e,t)))(_,f),w=z7(v,f),S=M.useCallback(e=>{c(!0),p(e)},[]),k=M.useCallback(async()=>{const e=[{startTime:"00:00",low:6,target:8,high:10},{startTime:"05:00",low:4,target:6,high:7.2},{startTime:"09:00",low:6,target:7,high:8},{startTime:"11:00",low:4,target:6,high:10},{startTime:"13:00",low:6,target:7,high:8},{startTime:"18:00",low:4,target:6,high:10},{startTime:"22:00",low:6,target:8,high:10}],t={startTime:"00:00",low:3.9,target:6,high:10},n={...g,targetBGLIntervals:e},i={...g,overallTargetBGL:t},r=y?i:n;if(y?!LX(g.overallTargetBGL,t):!LX(g.targetBGLIntervals,e)){const e=await Vq.setUserSettings({glucoseLevelTargets:r});o(e)}h(!1)},[g,y]),C=M.useCallback(async e=>{if(e!==parseFloat(w.target)){const t={...w};t.target=e.toString();const n=U7(t,f),i={glucoseLevelTargets:{...g,overallTargetBGL:n}},r=await Vq.setUserSettings(i);o(r)}},[f,w,g]),E=M.useCallback(async e=>{if(void 0!==m&&e!==parseFloat(b[m].target)){const t=[...b],n={...t[m]};n.target=e.toString(),t[m]=n;const i=G7(t,f),r={glucoseLevelTargets:{...g,targetBGLIntervals:i}},a=await Vq.setUserSettings(r);o(a)}},[m,b,f,g]),x=M.useCallback(async e=>{y?await C(e):await E(e),c(!1)},[y,C,E]),I=M.useCallback(async()=>{const e=!y,n={glucoseLevelTargets:{...g,use:e?FL.Usage.Overall:FL.Usage.Intervals}},i=await Vq.setUserSettings(n);t.set({showSyncErrorModal:!i})},[y,g,t]),T=M.useMemo(()=>Xq(f).text,[f]),O=M.useMemo(()=>{const e=f===FL.BloodGlucoseUnit.MMOL_L,{min:t,max:n}=e?(e=>{switch(e){case"low":return{min:3,max:8.5};case"target":return{min:FL.CONSTANTS.TARGET_GLUCOSE_MIN,max:FL.CONSTANTS.TARGET_GLUCOSE_MAX};case"high":return{min:7.2,max:13.9};default:throw new Error("[glucoseSettings::getBGIntervalsConstantsMMOLL] - No IntervalType defined")}})(V7.Target):(e=>{switch(e){case"low":return{min:54,max:153};case"target":return{min:79,max:180};case"high":return{min:130,max:250};default:throw new Error("[glucoseSettings::getBGIntervalsConstantsMGDL] - No IntervalType defined")}})(V7.Target);return f===FL.BloodGlucoseUnit.MG_DL?RX(t,n):AX(t,n)},[f]),R=M.useMemo(()=>void 0===m?0:y?O.indexOf(w.target):O.indexOf(b[m].target),[m,y,O,b,w.target]),A=M.useCallback(e=>{const t=b[(e-1+b.length)%b.length].startTime,n=b[(e+1+b.length)%b.length].startTime,i=nX(b[e].startTime,"HH:mm",new Date),a=nX(t,"HH:mm",new Date),o=nX(n,"HH:mm",new Date);s$(i,a)&&s$(i,o)?r({current:i,min:hY(sX(a,1),1),max:hX(o)}):o$(i,a)&&o$(i,o)?r({current:i,min:hY(a,1),max:hX(tY(o,1))}):r({current:i,min:hY(a,1),max:hX(o)}),l(!0),p(e)},[b]),L=M.useCallback(async e=>{if(void 0===m)return;const t=i$(e,"HH:mm");if(t!==b[m].startTime){const e=[...b],n={...e[m]};n.startTime=t,e[m]=n;const i=G7(e,f),r={glucoseLevelTargets:{...g,targetBGLIntervals:i}},a=await Vq.setUserSettings(r);o(a)}l(!1)},[m,b,f,g]),P=M.useCallback(()=>{l(!1)},[]),N=M.useCallback(()=>{c(!1)},[]),F=M.useCallback(()=>{!1===a&&t.set({showSyncErrorModal:!0}),o(void 0)},[t,a]);return D.createElement(D.Fragment,null,D.createElement(Xa,{testID:"settings-glucose-scrollview",style:Y7.scrollView,contentContainerStyle:Y7.scrollViewContent},D.createElement(v7,null),D.createElement(bj,{title:e("glucose_input"),value:T,testID:"glucose-change",onPress:()=>{n.navigate(C2.GlucoseUnit)},renderRightSlot:()=>D.createElement(QK,null)}),D.createElement(C7,{columnDisposition:[1,2]},D.createElement(lz,{title:e("fixed_input_title"),message:e("fixed_input_body"),value:y,testID:"settings-glucose-overall-switch",onValueChange:I,style:Y7.switchContainer}),D.createElement(b7,{disabled:!y,testID:"settings-glucose-overall-header"},D.createElement(T7,{style:Y7.tableFirstCell,testID:"settings-glucose-overall-header-time"},D.createElement(pj,{style:Y7.headerTitle,maxFontSizeMultiplier:bL},e("table_fixed_low"))),D.createElement(T7,{testID:"settings-glucose-overall-header-target"},D.createElement(pj,{style:Y7.headerTitle,maxFontSizeMultiplier:bL},H7()),D.createElement(pj,{style:Y7.headerSubtitle},T))),D.createElement(S7,{disabled:!y},D.createElement(x7,{style:Y7.tableFirstCell},D.createElement(pj,{style:Y7.subtitle},e("table_fixed_all_day "))),D.createElement(x7,{onPress:()=>{S(0)}},D.createElement(pj,{style:Y7.fixedValueTitle,testID:"settings-glucose-overall-all-day-target"},w.target))),D.createElement(Ic,{style:Y7.resetContainer,disabled:!y,onPress:()=>{h(!0)}},D.createElement(pj,{style:[Y7.resetText,!y&&Y7.resetTextDisabled]},e("button_reset_default")))),D.createElement(C7,{columnDisposition:[1,2]},D.createElement(lz,{title:e("table_variable_title"),message:e("table_variable_body"),value:!y,testID:"daily-interval-switch",onValueChange:I,style:Y7.switchContainer}),D.createElement(b7,{disabled:y,testID:"settings-glucose-variable-header"},D.createElement(T7,{style:Y7.tableFirstCell,testID:"settings-glucose-variable-header-time"},D.createElement(pj,{style:Y7.headerTitle,maxFontSizeMultiplier:bL},e("table_variable_time")),D.createElement(pj,{style:Y7.headerSubtitle},e("table_variable_time_unit"))),D.createElement(T7,{key:H7(),testID:"settings-glucose-variable-header-target"},D.createElement(pj,{style:Y7.headerTitle,maxFontSizeMultiplier:vL},H7()),D.createElement(pj,{style:Y7.headerSubtitle},T))),b.map((e,t)=>D.createElement(S7,{key:e.startTime,disabled:y},D.createElement(x7,{style:Y7.tableFirstCell,onPress:()=>{A(t)}},D.createElement(pj,{style:Y7.title},e.startTime),D.createElement(pj,{style:Y7.subtitle},rV[Object.keys(iV)[t]]())),D.createElement(x7,{onPress:()=>{S(t)}},D.createElement(pj,{style:Y7.title,testID:`settings-glucose-variable-target-${Object.keys(iV)[t].toLowerCase()}`},e.target)))),D.createElement(Ic,{style:Y7.resetContainer,disabled:y,onPress:()=>{h(!0)}},D.createElement(pj,{style:[Y7.resetText,y&&Y7.resetTextDisabled]},e("button_reset_default"))))),D.createElement(n3,{isVisible:u,items:O,onConfirm:x,onCancel:N,initialScrollIndex:R,onModalHide:F,testID:"settings-glucose-target-wheel-picker"}),D.createElement(B7,{isVisible:s,initialValue:i?.current??new Date,min:i?.min,max:i?.max,onConfirm:L,onCancel:P,onModalHide:F}),D.createElement(sz,{isVisible:d,title:e("physical_activity_modal_reset_title "),onModalHide:F,buttons:[{title:e("button_reset"),type:lj.Error,onPress:k},{title:e("button_cancel"),type:lj.Secondary,onPress:()=>{h(!1)}}]}),D.createElement(U0,{onModalHide:()=>{o(void 0)}}))}),Y7=Ei.create({scrollView:{paddingHorizontal:16},scrollViewContent:{flexGrow:1,gap:32,paddingVertical:32},tableFirstCell:{alignItems:"flex-start",paddingLeft:16,borderLeftWidth:0},resetContainer:{alignItems:"center",padding:16,borderTopWidth:1,borderColor:wL.borderTableDivider},resetText:{..._L.semiBold_Base,color:wL.textDangerTableActive,textAlign:"center"},resetTextDisabled:{color:wL.textTableInactive},headerTitle:{..._L.medium_Base,color:wL.text},headerSubtitle:{..._L.medium_XS,color:wL.textInputTextSecondary},title:{..._L.medium_Base,color:wL.textTableActive},fixedValueTitle:{..._L.medium_Base,color:wL.textTableActive,paddingVertical:8},subtitle:{..._L.regular_XS,color:wL.textInputTextSecondary},switchContainer:{borderBottomLeftRadius:0,borderBottomRightRadius:0}}),$7=e=>{const{t:t}=eV(),{glucoseUnit:n,isError:i,onPressMGDL:r,onPressMMOLL:a}=e,o=n===FL.BloodGlucoseUnit.MMOL_L,s=n===FL.BloodGlucoseUnit.MG_DL,l=o?q7.unitButton:X7.unitButton,u=s?q7.unitButton:X7.unitButton;return D.createElement(ga,{style:X7.unitsContainer},D.createElement(Ic,{testID:`mmoll-button-${o}`,onPress:a,style:i?q7.unitErrorButton:l,accessibilityRole:"button",accessibilityState:{selected:o}},D.createElement(pj,{style:o?q7.unitText:X7.unitText,maxFontSizeMultiplier:vL},t("glucose_unit_mmol/l")),D.createElement(pj,{style:o?q7.exampleText:X7.exampleText,maxFontSizeMultiplier:vL},t("example")),D.createElement(pj,{style:o?q7.unitExampleText:X7.unitExampleText,maxFontSizeMultiplier:vL},t("glucose_unit_example_mmol/L"))),D.createElement(Ic,{testID:`mgdl-button-${s}`,onPress:r,style:i?q7.unitErrorButton:u,accessibilityRole:"button",accessibilityState:{selected:s}},D.createElement(pj,{style:s?q7.unitText:X7.unitText,maxFontSizeMultiplier:vL},t("glucose_unit_mg/dl")),D.createElement(pj,{style:s?q7.exampleText:X7.exampleText,maxFontSizeMultiplier:vL},t("example")),D.createElement(pj,{style:s?q7.unitExampleText:X7.unitExampleText,maxFontSizeMultiplier:vL},t("glucose_unit_example_mg/dl"))))},X7=Ei.create({unitsContainer:{flexDirection:"row",justifyContent:"space-between",gap:12},unitButton:{flex:1,paddingHorizontal:14,paddingVertical:10,backgroundColor:wL.bgInput,borderColor:wL.bgInput,borderRadius:16,borderWidth:2},unitText:{..._L.medium_Base,color:wL.text,marginBottom:8},exampleText:{..._L.medium_XS,color:wL.textSecondary,marginBottom:4},unitExampleText:{..._L.regular_XS,color:wL.textSecondary}}),q7=Ei.create({unitButton:{...X7.unitButton,backgroundColor:wL.bgBrand,borderColor:wL.borderOnBrand},unitErrorButton:{...X7.unitButton,borderColor:wL.borderDanger},unitText:{...X7.unitText},exampleText:{...X7.exampleText,color:wL.text},unitExampleText:{...X7.unitExampleText,color:wL.text}}),Z7=Ei.create({container:{paddingHorizontal:16,paddingTop:32}}),K7=rF(()=>{const{modalStoreActions:e}=z2(),t=M.useCallback(async t=>{if(t===Vq.glucoseUnit)return;const n=await Vq.setUserSettings({bloodGlucoseUnits:t});e.set({showSyncErrorModal:!n})},[e]);return D.createElement(D.Fragment,null,D.createElement(ga,{style:Z7.container},D.createElement($7,{onPressMMOLL:()=>t(FL.BloodGlucoseUnit.MMOL_L),onPressMGDL:()=>t(FL.BloodGlucoseUnit.MG_DL),glucoseUnit:Vq.glucoseUnit})),D.createElement(U0,null))}),Q7=()=>{const{t:e}=eV(),t=Gp();return M.createElement(Xa,{contentContainerStyle:J7.scrollView,testID:"legal-page-scrollview"},M.createElement(pj,{style:J7.title},e("legal_title")),M.createElement(ga,{style:J7.section},M.createElement(dQ,{testID:"manufacturer-symbol",color:wL.bgBackground}),M.createElement(pj,{style:J7.textContainer},"2025-09-09")),M.createElement(ga,{style:J7.section},M.createElement(cQ,{testID:"manual-icon"}),M.createElement(pj,{testID:"manual-button",style:J7.manualText,onPress:()=>{NX(MX.SettingsIFU),t.navigate(C2.IFU)}},e("legal_IFU"))),M.createElement(ga,{style:J7.section},M.createElement(gQ,{testID:"SN-symbol"}),M.createElement(pj,{style:J7.textContainer},PX)),M.createElement(ga,{style:J7.section},M.createElement(YK,{testID:"ce-logo"}),M.createElement(pj,{style:J7.alignTop},e("legal_ce_mark_text"))),M.createElement(ga,{style:J7.section},M.createElement(dQ,{color:wL.text}),M.createElement(ga,{style:J7.textContainer},M.createElement(pj,{style:J7.sectionTitle},e("legal_company_name")),M.createElement(pj,null,e("legal_company_adress")),M.createElement(pj,null,e("legal_company_country")),M.createElement(pj,null,e("legal_company_email")),M.createElement(pj,null,e("legal_company_cvr_vat")))),M.createElement(ga,{style:[J7.section,J7.udiSection]},M.createElement(bQ,{testID:"udi-logo",style:J7.udiLogo}),M.createElement(pj,{style:[J7.textContainer,J7.udiText]},M.createElement(pj,null,"(01)05700002209597(10)"),M.createElement(pj,null,`${PX}(8012)${PX}`))),M.createElement(ga,{style:J7.sectionColumn},M.createElement(wQ,{testID:"uk-rep-logo",style:J7.repIcon}),M.createElement(pj,null,e("legal_ukrep")),M.createElement(pj,null,e("united_kingdom")),M.createElement(pj,null,e("legal_ukrep1"))),null)},J7=Ei.create({scrollView:{paddingVertical:32,paddingHorizontal:16},title:{..._L.regular_SM,textAlign:"center",marginBottom:32},section:{flexDirection:"row",marginBottom:32},sectionTitle:{..._L.medium_Base},textContainer:{flex:1,marginLeft:20,alignSelf:"center"},alignTop:{flex:1,marginLeft:20,alignSelf:"flex-start"},sectionColumn:{marginBottom:32},repIcon:{marginBottom:12},manualText:{..._L.medium_Base,color:wL.textBrand,marginLeft:20,alignSelf:"center"},udiSection:{flexWrap:"wrap",marginBottom:20},udiLogo:{marginRight:20,marginBottom:12},udiText:{marginLeft:0,marginBottom:12,display:"flex",flexWrap:"wrap"}}),e8=()=>{const{t:e}=eV(),{navigate:t}=Gp(),n=M.useCallback(async()=>{if(oV)t(C2.SupportContact);else{const e="support@hedia.com",t="Hedia support",n=`App version: ${PX}\n${I6({defaultValue:"unknown",supportedPlatforms:["ios","android","windows"],memoKey:"systemName",getter:()=>lr.select({ios:E6.systemName,android:"Android",windows:"Windows",default:"unknown"})})} version: ${I6({defaultValue:"unknown",getter:()=>E6.systemVersion,supportedPlatforms:["android","ios","windows"],memoKey:"systemVersion"})}`;await Vu.openURL(`mailto:${e}?subject=${t}&body=${n}`)}},[t]);return D.createElement(Xa,{contentContainerStyle:t8.wrapper},D.createElement(pj,{style:t8.title},e("support_title")),D.createElement(ga,{style:t8.buttons},D.createElement(cj,{title:e("button_email"),leftIcon:D.createElement(uQ,null),onPress:n,testID:"send_email_button"}),D.createElement(cj,{title:e("button_support_page"),leftIcon:D.createElement(yQ,null),onPress:()=>{t(C2.SupportWebView)},testID:"open_support_page_button",type:lj.Secondary}),D.createElement(cj,{title:e("button_instructions"),leftIcon:D.createElement(cQ,{width:20}),onPress:()=>{NX(MX.SettingsIFU),t(C2.IFU)},testID:"open_ifu_page_button",type:lj.Secondary})))},t8=Ei.create({wrapper:{flex:1,justifyContent:"center",paddingHorizontal:16},title:{..._L.bold_3XL,marginBottom:48,color:wL.text,textAlign:"center"},buttons:{gap:16}}),n8=Ei.create({container:{marginHorizontal:16,marginTop:32},checkmarkContainer:{width:24,height:24}}),i8=rF(()=>{const{t:e}=eV(),{isOnboardingFinished:t}=Xz(),{biologicalSex:n}=Y2(),{setSetupCalculatorStoreValues:i}=W2(),{modalStoreActions:r}=z2(),a=t?Vq.biologicalSex:n,o=M.useCallback(async e=>{if(a!==e)if(t){await Vq.setUserSettings({biologicalSex:e})||r.set({showSyncErrorModal:!0})}else i({biologicalSex:e})},[a,t,r,i]);return D.createElement(ga,{testID:"biological-sex",style:n8.container},D.createElement(bj.Container,null,D.createElement(bj,{testID:"biological_sex_male",title:e("general_input_sex_option_male"),renderRightSlot:()=>D.createElement(ga,{style:n8.checkmarkContainer},a===FL.BiologicalSex.Male?D.createElement($K,{color:wL.iconCheckmark}):null),onPress:()=>o(FL.BiologicalSex.Male)}),D.createElement(bj,{testID:"biological_sex_female",title:e("general_input_sex_option_female"),renderRightSlot:()=>D.createElement(ga,{style:n8.checkmarkContainer},a===FL.BiologicalSex.Female?D.createElement($K,{color:wL.iconCheckmark}):null),onPress:()=>o(FL.BiologicalSex.Female)}),D.createElement(bj,{testID:"biological_sex_no_answer",title:e("biological_sex_no_answer"),renderRightSlot:()=>D.createElement(ga,{style:n8.checkmarkContainer},a===FL.BiologicalSex.Unspecified?D.createElement($K,{color:wL.iconCheckmark}):null),onPress:()=>o(FL.BiologicalSex.Unspecified)})),D.createElement(U0,null))}),r8=Ei.create({container:{marginHorizontal:16,marginTop:32},checkmarkContainer:{width:24,height:24}}),a8=rF(()=>{const{t:e}=eV(),{modalStoreActions:t}=z2(),n=Vq.diabetesType,[i,r]=M.useState(!1),a=M.useCallback(async e=>{if(n===e)return;await Vq.setUserSettings({diabetesType:e})?e===FL.DiabetesType.Type2&&r(!0):t.set({showSyncErrorModal:!0})},[n,t]),o=M.useCallback(()=>{r(!1)},[]);return D.createElement(D.Fragment,null,D.createElement(ga,{style:r8.container},D.createElement(bj.Container,null,D.createElement(bj,{title:e("type_of_diabetes_type1"),renderRightSlot:()=>D.createElement(ga,{style:r8.checkmarkContainer},n===FL.DiabetesType.Type1?D.createElement($K,{color:wL.iconCheckmark}):null),onPress:()=>a(FL.DiabetesType.Type1)}),D.createElement(bj,{title:e("type_of_diabetes_type2"),renderRightSlot:()=>D.createElement(ga,{style:r8.checkmarkContainer},n===FL.DiabetesType.Type2?D.createElement($K,{color:wL.iconCheckmark}):null),onPress:()=>a(FL.DiabetesType.Type2)}))),D.createElement(sz,{title:e("modal_diabetes2_title"),isVisible:i,message:e("modal_diabetes2_body"),buttons:[{title:e("button_close"),onPress:o}]}),D.createElement(U0,null))}),o8=(e,t)=>a$(new Date(e,t)),s8=(()=>{const e=(new Date).getFullYear();return[...Array(12).keys()].map(t=>i$(new Date(e,t),"MMM"))})(),l8=Array.from({length:31},(e,t)=>(t+1).toString().padStart(2,"0")),u8=(()=>{const e=(new Date).getFullYear()-1900+1,t=Array.from({length:e},(e,t)=>(t+1900).toString());return t})();const c8=D.memo(function({isVisible:e,initialValue:t,onCancel:n,onConfirm:i,onModalHide:r}){const{width:a}=vm(),o=M.useRef(null),s=M.useRef(null),l=M.useRef(null),[u,c]=M.useState(t),d=M.useMemo(()=>t.getDate()-1,[t]),h=M.useMemo(()=>t.getMonth(),[t]),m=M.useMemo(()=>{const e=t.getFullYear();return u8.indexOf(e.toString())},[t]),p=M.useMemo(()=>u.getDate()-1,[u]),f=M.useMemo(()=>u.getMonth(),[u]),g=M.useMemo(()=>u.getFullYear(),[u]),_=M.useCallback(()=>{i(u)},[i,u]),v=M.useCallback(()=>{c(t),n()},[n,t]),y=M.useCallback(e=>{const t=o8(g,e)-1,n=Math.min(p,t),i=new Date(g,e,n+1);c(i),p>t&&o.current?.scrollToIndex(t)},[p,g]),b=M.useCallback(e=>{const t=o8(g,f)-1,n=Math.min(e,t),i=new Date(g,f,n+1);c(i),e>t&&o.current?.scrollToIndex(t)},[f,g]),w=M.useCallback(e=>{const t=parseInt(u8[e],10),n=o8(t,f)-1,i=Math.min(p,n),r=new Date(t,f,i+1);c(r),p>n&&o.current?.scrollToIndex(n)},[p,f]);return D.createElement(sz,{isVisible:e,containerStyle:d8.modalContainer,onModalHide:r},D.createElement(ga,null,D.createElement(ga,{style:d8.pickersContainer},D.createElement(t3,{key:"months-wheel-picker",ref:s,initialScrollIndex:h,options:s8,onChange:y,containerStyle:[d8.itemContainerLeft,{width:(a-32)/3}],selectedIndicatorStyle:[d8.selectedIndicatorLeft,{width:(a-32)/3-10}],itemStyle:d8.itemLeft,testID:"months-wheel-picker"}),D.createElement(t3,{key:"days-wheel-picker",ref:o,initialScrollIndex:d,options:l8,onChange:b,containerStyle:[d8.itemContainerCenter,{width:(a-32)/3}],selectedIndicatorStyle:[d8.selectedIndicatorCenter,{width:(a-32)/3}],itemStyle:d8.itemCenter,testID:"days-wheel-picker"}),D.createElement(t3,{key:"years-wheel-picker",ref:l,initialScrollIndex:m,options:u8,onChange:w,containerStyle:[d8.itemContainerRight,{width:(a-32)/3}],selectedIndicatorStyle:[d8.selectedIndicatorRight,{width:(a-32)/3-10}],itemStyle:d8.itemRight,testID:"years-wheel-picker"})),D.createElement(ga,{style:d8.buttonContainer},D.createElement(q0,{onPress:_}),D.createElement($0,{onPress:v}))))}),d8=Ei.create({modalContainer:{backgroundColor:wL.bgTransparent},buttonContainer:{gap:8},pickersContainer:{flexDirection:"row",borderTopLeftRadius:13,borderTopRightRadius:13,overflow:"hidden"},itemContainerLeft:{borderTopRightRadius:0,paddingLeft:8},itemContainerCenter:{borderTopLeftRadius:0,borderTopRightRadius:0},itemContainerRight:{borderTopLeftRadius:0,paddingRight:8},itemLeft:{alignSelf:"flex-end"},itemCenter:{alignSelf:"center"},itemRight:{alignSelf:"flex-start"},selectedIndicatorRight:{alignSelf:"flex-start",borderTopLeftRadius:0,borderBottomLeftRadius:0},selectedIndicatorCenter:{alignSelf:"center",borderRadius:0},selectedIndicatorLeft:{alignSelf:"flex-end",borderTopRightRadius:0,borderBottomRightRadius:0}}),h8=RX(50,220),m8=RX(35,300);const p8=rF(function(){const{t:e}=eV(),{modalStoreActions:t}=z2(),n=Gp(),{bottom:i}=hH(),[r,a]=M.useState(!1),[o,s]=M.useState(!1),[l,u]=M.useState(!1),[c,d]=M.useState(!1),[h,m]=M.useState(void 0),[p,f]=M.useState(!1),{birthDate:g,diabetesType:_,biologicalSex:v,weightKg:y,heightCm:b}=Vq;if(void 0===_)throw new Error("[AboutSection::render] diatbetesType must be defined.");const w=M.useMemo(()=>g?new Date(g):void 0,[g]),S=M.useMemo(()=>_===FL.DiabetesType.Type1?"type_of_diabetes_type1":"type_of_diabetes_type2",[_]),k=M.useCallback(async e=>{if(e!==b){const t=await Vq.setUserSettings({height:e});m(t)}a(!1)},[b]),C=M.useCallback(async e=>{if(e!==y){const t=await Vq.setUserSettings({weight:e});m(t)}s(!1)},[y]),E=M.useMemo(()=>{if(!b)return 0;const e=Math.round(10*b)/10;return h8.indexOf(e.toString())},[b]),x=M.useMemo(()=>{if(!y)return 0;const e=Math.round(10*y)/10;return m8.indexOf(e.toString())},[y]),I=async e=>{if(e.toISOString()!==g){if(s$(e,mX(new Date))){const t=await Vq.setUserSettings({birthday:e.toISOString()});m(t)}else sV?d(!0):f(!0)}u(!1)},T=M.useCallback(()=>{!1===h&&t.set({showSyncErrorModal:!0}),m(void 0)},[t,h]),O=M.useCallback(()=>{p?d(!0):T()},[p,T]);return D.createElement(D.Fragment,null,D.createElement(ga,null,D.createElement(bj.Container,null,D.createElement(bj,{title:e("my_profile_birth"),value:w?w.toLocaleDateString():"-",testID:"date-of-birth",onPress:()=>{u(!0)}}),D.createElement(bj,{title:e("my_profile_diabetes_type"),value:e(S),testID:"diabetes-type",onPress:()=>{n.navigate(C2.DiabetesType)},renderRightSlot:()=>D.createElement(QK,{color:wL.iconInputInactive})}),D.createElement(bj,{title:e("my_profile_sex"),testID:"biologicalSex",value:v?aV[v]():"-",onPress:()=>{n.navigate(C2.BiologicalSex)},renderRightSlot:()=>D.createElement(QK,null)}),D.createElement(bj,{title:e("my_profile_height"),value:`${b??"-"} cm`,testID:"height",onPress:()=>{a(!0)}}),D.createElement(bj,{title:e("my_profile_weight"),value:`${y??"-"} kg`,testID:"weight",onPress:()=>{s(!0)}}))),lV?D.createElement(S5,{testID:"birthday-date-picker",display:"spinner",maximumDate:new Date,date:w,isVisible:l,onConfirm:I,onCancel:()=>{u(!1)},cancelTextIOS:e("button_cancel"),confirmTextIOS:e("button_confirm"),onHide:O,pickerStyleIOS:{alignSelf:"center"},modalStyleIOS:{paddingBottom:i}}):D.createElement(c8,{isVisible:l,initialValue:w??new Date,onConfirm:I,onCancel:()=>{u(!1)},onModalHide:O}),D.createElement(n3,{isVisible:r,items:h8,onConfirm:k,onCancel:()=>{a(!1)},initialScrollIndex:E,onModalHide:T,testID:"height_wheel_picker"}),D.createElement(n3,{isVisible:o,items:m8,onConfirm:C,onCancel:()=>{s(!1)},initialScrollIndex:x,onModalHide:T,testID:"weight_wheel_picker"}),D.createElement(sz,{isVisible:c,title:e("invalid_date_modal_title"),message:e("invalid_date_modal_body"),buttons:[{title:e("button_understood"),onPress:()=>{f(!1),d(!1)},testID:"understood-button"}]}),D.createElement(U0,{onModalHide:()=>{m(void 0)}}))});function f8(){const{t:e}=eV();return D.createElement(Xa,{testID:"profile-screen-scroll",style:g8.scrollView,contentContainerStyle:g8.contentContainer},D.createElement(bj,{title:e("my_profile_account"),testID:"first-name",renderLeftSlot:()=>D.createElement(SQ,null),renderRightSlot:()=>D.createElement(QK,null),onPress:()=>{window.location.href="/account"}}),D.createElement(p8,null))}const g8=Ei.create({scrollView:{paddingHorizontal:16},contentContainer:{paddingVertical:32,flexGrow:1,gap:24}}),_8=()=>{const{t:e}=eV(),{Navigator:t,Screen:n}=k2();return d.jsxs(t,{screenOptions:{...a0,...dJ},children:[d.jsx(n,{name:C2.Profile,component:f8,options:{title:e("my_profile_navigation")}}),d.jsx(n,{name:C2.BiologicalSex,component:i8,options:{title:e("biological_sex_navigation")}}),d.jsx(n,{name:C2.DiabetesType,component:a8,options:{title:e("diabetes_type_navigation")}})]})};const v8=oV?"/api/v2":zj.HEDIA_API_URL_V2,y8=()=>{const{fontScale:e}=vm(),t=e.toFixed(3);return D.createElement(D.Fragment,null,D.createElement(pj,{style:b8.text,maxFontSizeMultiplier:vL},`Country code: ${qj.getString("countryCodeAlpha2")}`),D.createElement(pj,{style:b8.text,maxFontSizeMultiplier:vL},`Font scale: ${t}`),D.createElement(pj,{style:b8.textBold,maxFontSizeMultiplier:vL},v8??".env is broken"))},b8=Ei.create({text:{..._L.regular_Base,backgroundColor:wL.bgModerate,color:wL.neutralBlack,textAlign:"center"},textBold:{..._L.semiBold_Base,backgroundColor:wL.bgModerate,color:wL.neutralBlack,textAlign:"center"}});function w8(){const{t:e}=eV(),t=Gp(),[n,i]=M.useState(!0),r=M.useCallback(()=>{NX(MX.SettingsProfile),t.navigate(C2.ProfileStack,{screen:C2.Profile})},[t]),a=M.useCallback(()=>{NX(MX.SettingsGlucose),t.navigate(C2.GlucoseSettings)},[t]),o=M.useCallback(()=>{NX(MX.SettingsInsulin),t.navigate(C2.InsulinSettingsStack,{screen:C2.InsulinSettings})},[t]),s=M.useCallback(()=>{NX(MX.SettingsActivity),t.navigate(C2.ActivitySettings)},[t]),l=M.useCallback(()=>{NX(MX.SettingsSupport),t.navigate(C2.Support)},[t]),u=M.useCallback(()=>{NX(MX.SettingsLegal),t.navigate(C2.Legal)},[t]);return d.jsxs(Xa,{testID:"scroll-settings",style:S8.scrollView,contentContainerStyle:S8.scrollViewContentContainer,contentInsetAdjustmentBehavior:"automatic",children:[d.jsx(bj,{title:e("settings_card_my_profile"),testID:"edit-profile-button",renderRightSlot:()=>d.jsx(QK,{}),onPress:r}),d.jsxs(ga,{children:[d.jsx(Sj,{title:e("settings_personal_settings_title")}),d.jsxs(bj.Container,{children:[d.jsx(bj,{title:e("settings_card_glucose"),testID:"settings-glucose",onPress:a,renderRightSlot:()=>d.jsx(QK,{})}),d.jsx(bj,{title:e("settings_card_insulin_settings"),testID:"settings-insulin",onPress:o,renderRightSlot:()=>d.jsx(QK,{})}),d.jsx(bj,{title:e("settings_card_physical_activity"),testID:"settings-activity",onPress:s,renderRightSlot:()=>d.jsx(QK,{})})]})]}),d.jsxs(ga,{children:[d.jsx(Sj,{title:e("settings_hedia_diabetes_assistant_title")}),d.jsxs(bj.Container,{children:[d.jsx(bj,{title:e("settings_support"),testID:"settings-support",onPress:l,renderRightSlot:()=>d.jsx(QK,{})}),d.jsx(bj,{title:e("settings_card_legal"),testID:"settings-legal",onPress:u,renderRightSlot:()=>d.jsx(QK,{})})]})]}),d.jsx(Ic,{onPress:()=>{i(!n)},style:S8.versionContainer,children:d.jsx(pj,{style:S8.versionText,children:n?PX:"(821)"})}),"false"===zj.IS_PRODUCTION&&d.jsx(ga,{children:d.jsx(y8,{})})]})}const S8=Ei.create({scrollView:{flex:1,paddingHorizontal:16},scrollViewContentContainer:{paddingVertical:32,flexGrow:1,gap:24},versionContainer:{alignItems:"center",marginTop:"auto"},versionText:{..._L.regular_Base,color:wL.textSecondary}}),k8=["transparentModal","containedTransparentModal"];function C8(e){let{state:t,descriptors:n}=e;const i=M.useContext(WJ);return M.createElement(t1,null,M.createElement(ga,{style:E8.container},t.routes.map((e,r)=>{var a,o;const s=t.index===r,l=null===(a=t.routes[r-1])||void 0===a?void 0:a.key,u=null===(o=t.routes[r+1])||void 0===o?void 0:o.key,c=l?n[l]:void 0,d=u?n[u]:void 0,{options:h,navigation:m,render:p}=n[e.key],f=c?{title:EJ(c.options,c.route.name)}:i,g=void 0!==f,{header:_,headerShown:v,headerTintColor:y,headerBackImageSource:b,headerLeft:w,headerRight:S,headerTitle:k,headerTitleAlign:C,headerTitleStyle:E,headerStyle:x,headerShadowVisible:I,headerTransparent:T,headerBackground:O,headerBackTitle:R,presentation:A,contentStyle:L}=h,P=null==d?void 0:d.options.presentation;return M.createElement(r1,{key:e.key,focused:s,route:e,navigation:m,headerShown:v,headerTransparent:T,header:void 0!==_?_({back:f,options:h,route:e,navigation:m}):M.createElement(DJ,{title:EJ(h,e.name),headerTintColor:y,headerLeft:"function"==typeof w?e=>{let{tintColor:t}=e;return w({tintColor:t,canGoBack:g,label:R})}:void 0===w&&g?e=>{let{tintColor:t}=e;return M.createElement(zJ,{tintColor:t,backImage:void 0!==b?()=>M.createElement(Js,{source:b,style:[E8.backImage,{tintColor:t}]}):void 0,onPress:m.goBack,canGoBack:g})}:w,headerRight:"function"==typeof S?e=>{let{tintColor:t}=e;return S({tintColor:t,canGoBack:g})}:S,headerTitle:"function"==typeof k?e=>{let{children:t,tintColor:n}=e;return k({children:t,tintColor:n})}:k,headerTitleAlign:C,headerTitleStyle:E,headerTransparent:T,headerShadowVisible:I,headerBackground:O,headerStyle:x}),style:[Ei.absoluteFill,{display:s||null!=P&&k8.includes(P)?"flex":"none"},null!=A&&k8.includes(A)?{backgroundColor:"transparent"}:null]},M.createElement(WJ.Provider,{value:f},M.createElement(ga,{style:[E8.contentContainer,L]},p())))})))}const E8=Ei.create({container:{flex:1},contentContainer:{flex:1},backImage:{height:24,width:24,margin:3,resizeMode:"contain"}});function x8(){return x8=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},x8.apply(this,arguments)}const I8=ep(function(e){let{id:t,initialRouteName:n,children:i,screenListeners:r,screenOptions:a,...o}=e;const{state:s,descriptors:l,navigation:u,NavigationContent:c}=uf(Am,{id:t,initialRouteName:n,children:i,screenListeners:r,screenOptions:a});return M.useEffect(()=>{var e;return null==u||null===(e=u.addListener)||void 0===e?void 0:e.call(u,"tabPress",e=>{const t=u.isFocused();requestAnimationFrame(()=>{s.index>0&&t&&!e.defaultPrevented&&u.dispatch({...Rm.popToTop(),target:s.key})})})},[u,s.index,s.key]),M.createElement(c,null,M.createElement(C8,x8({},o,{state:s,navigation:u,descriptors:l})))});function T8(){return D.createElement(ga,{style:O8.separator})}const O8=Ei.create({separator:{backgroundColor:wL.borderInputDivider,height:1}}),R8=AX(FL.CONSTANTS.INSULIN_TO_CARBS_RATIO_MIN,FL.CONSTANTS.INSULIN_TO_CARBS_RATIO_MAX);var A8=(e=>(e.DividendNumber="109",e.ExampleInsulinSensitivity="2.2",e))(A8||{}),L8=(e=>(e.DividendNumber="1960",e.ExampleInsulinSensitivity="39.2",e))(L8||{});const P8=AX(FL.CONSTANTS.INSULIN_SENSITIVITY_MIN,FL.CONSTANTS.INSULIN_SENSITIVITY_MAX),M8=RX(5,197),D8=({onPress:e,isVisible:t})=>{const{t:n}=eV();return D.createElement(sz,{isVisible:t,title:n("insulin_settings_modal_carb_ratio_title"),enableScroll:!0,buttons:[{title:n("button_close"),onPress:e,testID:"close-button"}]},D.createElement(pj,{testID:"insulin_settings_modal_carb_ratio_body",style:N8.p1},n("insulin_settings_modal_carb_ratio_body")),D.createElement(pj,{testID:"insulin_settings_modal_carb_ratio_example",style:N8.p2},n("insulin_settings_modal_carb_example_body")))},N8=Ei.create({p1:{color:wL.textSecondary,marginTop:12,marginBottom:16},p2:{color:wL.textSecondary}}),F8=({glucoseUnit:e,onPress:t,isVisible:n})=>{const{t:i}=eV(),{text:r}=Xq(e),a=e===FL.BloodGlucoseUnit.MMOL_L?A8.DividendNumber:L8.DividendNumber,o=e===FL.BloodGlucoseUnit.MMOL_L?A8.ExampleInsulinSensitivity:L8.ExampleInsulinSensitivity;return D.createElement(sz,{title:i("modal_insulin_seneitivity_title"),isVisible:n,enableScroll:!0,buttons:[{title:i("button_close"),onPress:t,testID:"close-button"}]},D.createElement(pj,{testID:"insulin_sensitivity_modal_body",style:B8.p1},i("insulin_sensitivity_modal_body",{dividerNumber:a})),D.createElement(pj,{testID:"insulin_sensitivity_modal_example",style:B8.p2},i("insulin_sensitivity_modal_example",{dividerNumber:a,displayResult:o,displayUnit:r})))},B8=Ei.create({p1:{color:wL.textSecondary,marginTop:12,marginBottom:16},p2:{color:wL.textSecondary}}),j8=()=>{const{t:e}=eV(),{bloodGlucoseUnits:t}=Y2(),n=Vq.glucoseUnit??t;if(void 0===n)throw new Error("[HelpCalculatingSection::render] glucoseUnit must be defined.");const[i,r]=M.useState(!1),[a,o]=M.useState(!1),s=n===FL.BloodGlucoseUnit.MMOL_L?A8.DividendNumber:L8.DividendNumber;return D.createElement(ga,null,D.createElement(Sj,{title:e("insulin_settings_learn_more_title")}),D.createElement(bj.Container,null,D.createElement(bj,{testID:"info-insulin-carbs-ratio",title:e("insulin_settings_learn_more_carb_ratio"),onPress:()=>{o(!0)},displayType:vj.ListItem}),D.createElement(bj,{testID:`info-insulin-sensitivity-${s}`,title:e("insulin_settings_learn_more_sensitivity"),onPress:()=>{r(!0)},displayType:vj.ListItem})),D.createElement(F8,{onPress:()=>{r(!1)},glucoseUnit:n,isVisible:i}),D.createElement(D8,{onPress:()=>{o(!1)},isVisible:a}))},V8=Ei.create({switchContainer:{borderBottomLeftRadius:0,borderBottomRightRadius:0},firstTableCell:{paddingLeft:16,alignItems:"flex-start",justifyContent:"space-between",borderLeftWidth:0},tableHeaderTitle:{..._L.semiBold_Base,color:wL.text,textAlign:"center"},tableHeaderTitleWithMargin:{marginHorizontal:8},tableTitle:{..._L.regular_Base,color:wL.textInputText},tableSubtitle:{..._L.regular_XS,color:wL.textInputTextSecondary},tableText:{..._L.medium_Base,color:wL.textTableActive}}),H8=rF(()=>{const{t:e}=eV(),{modalStoreActions:t}=z2(),{glucoseUnit:n,treatmentParameters:i}=Vq;if(void 0===n)throw new Error("[DailyInsulinTable::render] glucoseUnit is undefined.");if(void 0===i)throw new Error("[DailyInsulinTable::render] parameters from userSettings must be defined and non-null.");const r=i.use,[a,o]=M.useState(!1),[s,l]=M.useState(!1),[u,c]=M.useState(void 0),[d,h]=M.useState(0),[m,p]=M.useState(!1),[f,g]=M.useState(),_=M.useCallback(async e=>{const t=AQ(e,n,FL.BloodGlucoseUnit.MMOL_L);if(t!==i.parameterIntervals[d].insulinSensitivity){const e={...i,parameterIntervals:i.parameterIntervals.map((e,n)=>n===d?{...e,insulinSensitivity:t}:e)},n=await Vq.setUserSettings({parameters:e});c(n)}o(!1)},[n,i,d]),v=M.useCallback(async e=>{const t=Number(e.toFixed(1));if(t!==i.parameterIntervals[d].carbohydrateRatio){const e={...i,parameterIntervals:i.parameterIntervals.map((e,n)=>n===d?{...e,carbohydrateRatio:t}:e)},n=await Vq.setUserSettings({parameters:e});c(n)}l(!1)},[i,d]),{text:y}=Xq(n),b=M.useMemo(()=>[{title:e("table_variable_insulin_time"),subtitle:e("table_variable_time_unit"),scale:bL},{title:e("table_variable_insulin_sensitivity"),subtitle:e("table_variable_insulin_sensitivity_unit",{displayUnit:y}),scale:vL},{title:e("table_variable_insulin_carb"),subtitle:e("table_variable_insulin_carb_unit"),scale:vL}],[y,e]),w=M.useMemo(()=>n===FL.BloodGlucoseUnit.MG_DL?M8:P8,[n]),S=M.useMemo(()=>{const e=PQ(i.parameterIntervals[d].insulinSensitivity,FL.BloodGlucoseUnit.MMOL_L,n);return w.findIndex(t=>t===e)},[w,n,i.parameterIntervals,d]),k=M.useMemo(()=>{const e=i.parameterIntervals[d].carbohydrateRatio.toFixed(1);return R8.findIndex(t=>t===e)},[i.parameterIntervals,d]),C=M.useCallback(async e=>{const t=i$(e,"HH:mm");if(t!==i.parameterIntervals[d].startTime){const e=[...i.parameterIntervals],n={...e[d]};n.startTime=t,e[d]=n;const r=await Vq.setUserSettings({parameters:{...i,parameterIntervals:e}});c(r)}p(!1)},[i,d]),E=M.useCallback(()=>{p(!1)},[]),x=M.useCallback(async e=>{const n={...i,use:e?FL.Usage.Intervals:FL.Usage.Overall},r=await Vq.setUserSettings({parameters:n});t.set({showSyncErrorModal:!r})},[i,t]),I=M.useCallback(()=>{!1===u&&t.set({showSyncErrorModal:!0}),c(void 0)},[t,u]);return D.createElement(D.Fragment,null,D.createElement(C7,{columnDisposition:[2,3,3]},D.createElement(lz,{testID:"daily-interval-switch",title:e("variable_insulin_settings_title"),message:e("variable_insulin_settings_body"),value:r===FL.Usage.Intervals,onValueChange:x,style:V8.switchContainer}),D.createElement(b7,{disabled:r!==FL.Usage.Intervals},b.map((e,t)=>D.createElement(T7,{key:e.title,style:0===t&&V8.firstTableCell},D.createElement(pj,{maxFontSizeMultiplier:e.scale,style:[V8.tableHeaderTitle,0!==t&&V8.tableHeaderTitleWithMargin]},e.title),D.createElement(pj,{style:V8.tableSubtitle},e.subtitle)))),Object.keys(iV).map((e,t)=>D.createElement(S7,{key:e,disabled:r!==FL.Usage.Intervals},D.createElement(x7,{onPress:()=>{(e=>{const t=i.parameterIntervals[(e-1+i.parameterIntervals.length)%i.parameterIntervals.length].startTime,n=i.parameterIntervals[(e+1+i.parameterIntervals.length)%i.parameterIntervals.length].startTime,r=nX(i.parameterIntervals[e].startTime,"HH:mm",new Date),a=nX(t,"HH:mm",new Date),o=nX(n,"HH:mm",new Date);s$(r,a)&&s$(r,o)?g({current:r,min:hY(nX(t,"HH:mm",sX(new Date,1)),1),max:hX(o)}):o$(r,a)&&o$(r,o)?g({current:r,min:hY(a,1),max:hX(nX(n,"HH:mm",tY(new Date,1)))}):g({current:r,min:hY(a,1),max:hX(o)}),h(e),p(!0)})(t)},style:V8.firstTableCell},D.createElement(pj,{maxFontSizeMultiplier:bL,style:V8.tableTitle},i.parameterIntervals[t].startTime),D.createElement(pj,{style:V8.tableSubtitle},rV[e]())),D.createElement(x7,{testID:`${e.toLowerCase()}-insulin`,onPress:()=>{(e=>{h(e),o(!0)})(t)}},D.createElement(pj,{maxFontSizeMultiplier:bL,style:V8.tableText},PQ(i.parameterIntervals[t].insulinSensitivity,FL.BloodGlucoseUnit.MMOL_L,n))),D.createElement(x7,{testID:`${e.toLowerCase()}-carbs`,onPress:()=>{(e=>{h(e),l(!0)})(t)}},D.createElement(pj,{maxFontSizeMultiplier:bL,style:V8.tableText},i.parameterIntervals[t].carbohydrateRatio.toFixed(1)))))),D.createElement(B7,{isVisible:m,initialValue:f?.current??new Date,min:f?.min,max:f?.max,onConfirm:C,onCancel:E,onModalHide:I}),D.createElement(n3,{isVisible:a,items:w,initialScrollIndex:S,onConfirm:_,onCancel:()=>{o(!1)},onModalHide:I,testID:"insulin_sensitivity_picker"}),D.createElement(n3,{isVisible:s,items:R8,initialScrollIndex:k,onConfirm:v,onCancel:()=>{l(!1)},onModalHide:I,testID:"insulin_to_carb_ratio_picker"}))}),z8={Lantus:()=>Jj("long-acting_insulin_option1"),Basaglar:()=>Jj("long-acting_insulin_option2"),Tuojeo:()=>Jj("long-acting_insulin_option3"),Levemir:()=>Jj("long-acting_insulin_option4"),Tresiba:()=>Jj("long-acting_insulin_option5"),Other:()=>Jj("long-acting_insulin_option6"),None:()=>Jj("long-acting_insulin_option7")},U8=Ei.create({scrollView:{paddingVertical:32,paddingHorizontal:16,flexGrow:1},checkmarkContainer:{width:24,height:24}}),G8=rF(()=>{const{isOnboardingFinished:e}=Xz(),{longActingInsulin:t}=Y2(),{setSetupCalculatorStoreValues:n}=W2(),{modalStoreActions:i}=z2(),r=cf(),a=e?Vq.longActingInsulin:t,o=M.useCallback(async e=>{if(e!==a)if(r.params.comingFrom===E2.Setup)n({longActingInsulin:FL.LongActingInsulin[e]});else{await Vq.setUserSettings({longActingInsulin:FL.LongActingInsulin[e]})||i.set({showSyncErrorModal:!0})}},[r.params.comingFrom,a,n,i]);return D.createElement(Xa,{testID:"scroll",contentContainerStyle:U8.scrollView},D.createElement(bj.Container,null,Object.keys(FL.LongActingInsulin).map(e=>D.createElement(bj,{key:e,title:z8[e](),renderRightSlot:()=>D.createElement(ga,{style:U8.checkmarkContainer},FL.LongActingInsulin[e]===a?D.createElement($K,{color:wL.iconCheckmark}):null),onPress:()=>o(e),displayType:vj.ListItem,testID:`treatment-${e.match(/[A-Z][a-z]+/g)?.join("-").toLowerCase()}`}))),D.createElement(U0,null))}),W8={Novorapid:()=>Jj("rapid-acting_insulin_option1"),Fiasp:()=>Jj("rapid-acting_insulin_option2"),Humalog:()=>Jj("rapid-acting_insulin_option3"),Apidra:()=>Jj("rapid-acting_insulin_option4"),Other:()=>Jj("rapid-acting_insulin_option5"),None:()=>Jj("rapid-acting_insulin_option6")},Y8=Ei.create({scrollView:{paddingVertical:32,paddingHorizontal:16,flexGrow:1},checkmarkContainer:{width:24,height:24}}),$8=rF(()=>{const{isOnboardingFinished:e}=Xz(),{fastActingInsulin:t}=Y2(),{setSetupCalculatorStoreValues:n}=W2(),{modalStoreActions:i}=z2(),r=cf(),a=e?Vq.fastActingInsulin:t,o=M.useCallback(async e=>{if(e!==a)if(r.params.comingFrom===E2.Setup)n({fastActingInsulin:FL.FastActingInsulin[e]});else{await Vq.setUserSettings({fastActingInsulin:FL.FastActingInsulin[e]})||i.set({showSyncErrorModal:!0})}},[r.params.comingFrom,a,n,i]);return D.createElement(Xa,{testID:"scroll",contentContainerStyle:Y8.scrollView},D.createElement(bj.Container,null,Object.keys(FL.FastActingInsulin).map(e=>D.createElement(bj,{key:e,title:W8[e](),renderRightSlot:()=>D.createElement(ga,{style:Y8.checkmarkContainer},FL.FastActingInsulin[e]===a?D.createElement($K,{color:wL.iconCheckmark}):null),onPress:()=>o(e),displayType:vj.ListItem,testID:`treatment-${e.match(/[A-Z][a-z]+/g)?.join("-").toLowerCase()}`}))),D.createElement(U0,null))}),X8={PenHalf:()=>Jj("treatment_type_option1"),PenWhole:()=>Jj("treatment_type_option2"),Pump:()=>Jj("treatment_type_option3")},q8=Ei.create({scrollView:{paddingVertical:32,paddingHorizontal:16,flexGrow:1},checkmarkContainer:{width:24,height:24}}),Z8=rF(()=>{const{isOnboardingFinished:e}=Xz(),{setSetupCalculatorStoreValues:t}=W2(),{treatmentType:n}=Y2(),{modalStoreActions:i}=z2(),r=cf(),a=e?Vq.injectionMethod:n,o=M.useCallback(async e=>{if(e!==a)if(r.params.comingFrom===E2.Setup)t({treatmentType:FL.InjectionMethod[e]});else{await Vq.setUserSettings({treatmentType:FL.InjectionMethod[e]})||i.set({showSyncErrorModal:!0})}},[r.params.comingFrom,a,t,i]);return D.createElement(Xa,{testID:"scroll",contentContainerStyle:q8.scrollView},D.createElement(bj.Container,null,Object.keys(FL.InjectionMethod).map(e=>D.createElement(bj,{key:e,title:X8[e](),renderRightSlot:()=>D.createElement(ga,{style:q8.checkmarkContainer},FL.InjectionMethod[e]===a?D.createElement($K,{color:wL.iconCheckmark}):null),onPress:()=>o(e),testID:`treatment-${e.match(/[A-Z][a-z]+/g)?.join("-").toLowerCase()}`,displayType:vj.ListItem}))),D.createElement(U0,null))});const K8=rF(function(){const{t:e}=eV(),t=Gp(),{injectionMethod:n,fastActingInsulin:i,longActingInsulin:r}=Vq;if(void 0===n)throw new Error("[TreatmentSection::render] injectionMethod must be defined and non-null.");const a=M.useMemo(()=>{const e=OX(FL.InjectionMethod,n);return X8[e]()},[n]),o=M.useMemo(()=>i?W8[i]():"-",[i]),s=M.useMemo(()=>r?z8[r]():"-",[r]);return D.createElement(ga,null,D.createElement(bj.Container,null,D.createElement(bj,{title:e("my_profile_treatment_type"),value:a,testID:"treatment-type",onPress:()=>{t.navigate(C2.TreatmentType,{comingFrom:C2.Profile})},renderRightSlot:()=>D.createElement(QK,null)}),D.createElement(bj,{title:e("my_profile_rapid-acting_insulin"),value:o,testID:"fast-acting-insulin",onPress:()=>{t.navigate(C2.RapidActingInsulin,{comingFrom:C2.Profile})},renderRightSlot:()=>D.createElement(QK,null)}),D.createElement(bj,{title:e("my_profile_long-acting_insulin"),value:s,testID:"long-acting-insulin",onPress:()=>{t.navigate(C2.LongActingInsulin,{comingFrom:C2.Profile})},renderRightSlot:()=>D.createElement(QK,null)})))}),{MMOL_L:Q8}=FL.BloodGlucoseUnit,J8=Ei.create({scrollView:{paddingVertical:32,paddingHorizontal:16,flexGrow:1},spacing:{height:32},active:{opacity:1},inactive:{opacity:.5},value:{color:wL.textBrand},valueInactive:{color:wL.textInputTextSecondary},switchContainer:{borderBottomLeftRadius:0,borderBottomRightRadius:0}}),eee=rF(()=>{const{t:e}=eV(),{modalStoreActions:t}=z2(),{glucoseUnit:n,treatmentParameters:i}=Vq;if(void 0===n)throw new Error("[InsulinSettings::render] glucoseUnit is undefined.");if(void 0===i)throw new Error("[InsulinSettings::render] parameters from userSettings must be defined and non-null.");const r=i.use===FL.Usage.Overall,{text:a}=Xq(n),{carbohydrateRatio:o,insulinSensitivity:s}=i.overallParameters,[l,u]=M.useState(!1),[c,d]=M.useState(!1),[h,m]=M.useState(void 0),p=M.useMemo(()=>n===Q8?P8:M8,[n]),f=M.useCallback(async e=>{const t=AQ(e,n,Q8);if(t!==i.overallParameters.insulinSensitivity){const e={...i,overallParameters:{...i.overallParameters,insulinSensitivity:t}},n=await Vq.setUserSettings({parameters:e});m(n)}u(!1)},[n,i]),g=M.useCallback(async e=>{const t=Number(e.toFixed(1));if(t!==i.overallParameters.carbohydrateRatio){const e={...i,overallParameters:{...i.overallParameters,carbohydrateRatio:t}},n=await Vq.setUserSettings({parameters:e});m(n)}d(!1)},[i]),_=M.useMemo(()=>{const e=PQ(s,Q8,n);return p.findIndex(t=>t===e)},[p,n,s]),v=M.useMemo(()=>R8.findIndex(e=>e===o.toFixed(1)),[o]),y=M.useCallback(()=>{!1===h&&t.set({showSyncErrorModal:!0}),m(void 0)},[t,h]),b=M.useCallback(async e=>{const n={...i,use:e?FL.Usage.Overall:FL.Usage.Intervals},r=await Vq.setUserSettings({parameters:n});t.set({showSyncErrorModal:!r})},[i,t]);return D.createElement(D.Fragment,null,D.createElement(Xa,{testID:"scroll",contentContainerStyle:J8.scrollView},D.createElement(K8,null),D.createElement(ga,{style:J8.spacing}),D.createElement(v7,null),D.createElement(ga,{style:J8.spacing}),D.createElement(bj.Container,null,D.createElement(lz,{testID:"insulin-settings-overall-switch",title:e("fixed_insulin_settings_title"),message:e("fixed_insulin_settings_body"),value:r,onValueChange:b,style:J8.switchContainer}),D.createElement(T8,null),D.createElement(bj,{title:e("fixed_insulin_settings_carb_ratio_title"),value:`${o.toFixed(1)} ${e("fixed_insulin_settings_carb_ratio_unit")}`,testID:"carbohydrate-ratio",onPress:r?()=>{d(!0)}:void 0,containerStyle:r?J8.active:J8.inactive,valueStyle:r?J8.value:J8.valueInactive}),D.createElement(bj,{title:e("fixed_insulin_settings_sensitivity_title"),value:`${PQ(s,Q8,n)} ${e("fixed_insulin_settings_sensitivity_unit",{displayUnit:a})}`,testID:"insulin-sensitivity",onPress:r?()=>{u(!0)}:void 0,containerStyle:r?J8.active:J8.inactive,valueStyle:r?J8.value:J8.valueInactive})),D.createElement(ga,{style:J8.spacing}),D.createElement(H8,null),D.createElement(ga,{style:J8.spacing}),D.createElement(j8,null)),D.createElement(n3,{isVisible:l,items:p,initialScrollIndex:_,onConfirm:f,onCancel:()=>{u(!1)},onModalHide:y,testID:"insulin_sensitivity_picker"}),D.createElement(n3,{isVisible:c,items:R8,initialScrollIndex:v,onConfirm:g,onCancel:()=>{d(!1)},onModalHide:y,testID:"insulin_to_carb_ratio_picker"}),D.createElement(U0,{onModalHide:()=>{m(void 0)}}))}),tee=()=>{const{t:e}=eV(),{Navigator:t,Screen:n}=I8();return d.jsxs(t,{screenOptions:r0,children:[d.jsx(n,{name:C2.InsulinSettings,component:eee,options:{title:e("insulin_settings_navigation")}}),d.jsx(n,{name:C2.TreatmentType,component:Z8,options:{title:e("treatment_type_navigation")}}),d.jsx(n,{name:C2.RapidActingInsulin,component:$8,options:{title:e("rapid-acting_insulin_navigation")}}),d.jsx(n,{name:C2.LongActingInsulin,component:G8,options:{title:e("long-acting_insulin_navigation")}})]})},nee=()=>{const{t:e}=eV(),{Navigator:t,Screen:n}=k2();return d.jsxs(t,{screenOptions:{...a0,...dJ},children:[d.jsx(n,{name:C2.Settings,component:w8,options:{title:e("settings_navigation"),headerShown:!0,headerLeft:K2}}),d.jsx(n,{name:C2.ProfileStack,component:_8,options:{headerShown:!1}}),d.jsx(n,{name:C2.GlucoseSettings,component:W7,options:{title:e("glucose_navigation")}}),d.jsx(n,{name:C2.GlucoseUnit,component:K7,options:{title:e("glucose_unit_navigation")}}),d.jsx(n,{name:C2.ActivitySettings,component:D7,options:{title:e("physical_activity_navigation")}}),d.jsx(n,{name:C2.InsulinSettingsStack,component:tee,options:{headerShown:!1}}),d.jsx(n,{name:C2.Support,component:e8,options:{title:e("support_navigation")}}),d.jsx(n,{name:C2.Legal,component:Q7,options:{title:e("legal_navigation")}})]})};function iee(){return d.jsx(y3,{style:ree.iframe,uri:"https://www.hedia.com/contact#contactsupport"})}const ree=Ei.create({iframe:{flex:1}}),{Navigator:aee,Screen:oee,Group:see}=k2(),lee=()=>{const{t:e}=eV(),t=M.useCallback(()=>d.jsx(K2,{}),[]),n=M.useCallback(()=>d.jsx(e0,{}),[]);return d.jsxs(aee,{children:[d.jsxs(see,{screenOptions:{headerShown:!1,animationEnabled:!0},children:[d.jsx(oee,{name:C2.NewCalculationStack,component:c7}),d.jsx(oee,{name:C2.SettingsTab,component:nee})]}),d.jsxs(see,{screenOptions:o0,children:[d.jsx(oee,{name:C2.AddActivity,component:W0,options:{title:e("new_activity_navigation"),headerLeft:n}}),d.jsx(oee,{name:C2.FoodLibrary,component:_3,options:{title:e("food_library_sheet_navigation"),headerLeft:t}}),d.jsx(oee,{name:C2.AddCarbs,component:m0,options:{title:""}}),d.jsx(oee,{name:C2.CreateFood,component:c3,options:{title:"",gestureEnabled:!1}}),d.jsx(oee,{name:C2.IFU,component:w3,options:{title:e("IFU_navigation"),headerLeft:t}}),d.jsx(oee,{name:C2.SupportWebView,component:P3,options:{title:e("support_navigation"),headerLeft:t}}),d.jsx(oee,{name:C2.SupportContact,component:iee,options:{title:e("support_navigation"),headerLeft:t}})]})]})},uee=({title:e,subtitle:t,stepChecked:n,onAnimationFinished:i})=>{const{t:r}=eV();return M.useEffect(()=>{i?.()},[i]),D.createElement(Xa,{contentContainerStyle:cee.container},D.createElement(pj,{style:cee.title},e),D.createElement(pj,{style:cee.subtitle},t),D.createElement(ga,{style:cee.stepsWrapper},D.createElement(ga,{style:cee.stepContainer},D.createElement(pj,{style:1===n||2===n||3===n?cee.textActive:cee.textInactive}," 1. "+r("overview1")),(1===n||2===n||3===n)&&D.createElement($K,null)),D.createElement(ga,{style:cee.stepContainer},D.createElement(pj,{style:2===n||3===n?cee.textActive:cee.textInactive},"2. "+r("overview2")),(2===n||3===n)&&D.createElement($K,null)),D.createElement(ga,{style:cee.stepContainer},D.createElement(pj,{style:3===n?cee.textActive:cee.textInactive},"3. "+r("overview3")),3===n&&D.createElement($K,null))))},cee=Ei.create({container:{flex:1,justifyContent:"center",paddingHorizontal:16},title:{..._L.bold_3XL,paddingHorizontal:16,marginBottom:4},subtitle:{..._L.medium_SM,color:wL.textSecondary,paddingHorizontal:16,marginBottom:16},stepsWrapper:{padding:16,gap:8},stepContainer:{flexDirection:"row",alignItems:"center",gap:8},textActive:{color:wL.text},textInactive:{color:wL.textSecondary}}),dee=()=>{const{t:e}=eV(),{setIsOnboardingFinished:t}=Xz(),n=M.useCallback(()=>{setTimeout(()=>{t(!0)},1e3)},[t]);return D.createElement(uee,{title:e("guide_end_title"),subtitle:e("guide_end_body"),stepChecked:3,onAnimationFinished:n})},hee=({currentStep:e,text:t,onPress:n,inactive:i,isBackVisible:r=!0,onBackPress:a,shouldRenderRightIcon:o=!0})=>{const{t:s}=eV(),{goBack:l}=Gp();return M.createElement(yH,{style:mee.container,edges:["bottom"]},M.createElement(ga,{style:mee.buttonsWrapper},r&&M.createElement(cj,{title:s("button_back"),onPress:a||l,testID:`back${e}`,style:mee.button,leftIcon:M.createElement(ZK,null),type:lj.Secondary}),M.createElement(cj,{title:t??s("button_next"),onPress:n,inactive:i,testID:`next${e}`,style:mee.button,rightIcon:o?M.createElement(QK,{color:i?wL.textSecondary:wL.text}):void 0})))},mee=Ei.create({container:{backgroundColor:wL.bgProgressBar,borderTopColor:wL.borderOnProgressBarSecondary,borderTopWidth:1},buttonsWrapper:{flexDirection:"row",paddingHorizontal:16,paddingBottom:16,gap:8},button:{flex:1,marginTop:12}}),pee=()=>{const{t:e}=eV(),{navigate:t}=Gp(),n=M.useCallback(()=>{t(E2.QuickGuideStack,{screen:E2.QuickGuide}),NX(MX.QuickGuideStartPress)},[t]);return D.createElement(D.Fragment,null,D.createElement(uee,{title:e("guide_quick_guide_title"),subtitle:e("guide_quick_guide_body"),stepChecked:2}),D.createElement(hee,{currentStep:1,isBackVisible:!1,onPress:n,text:e("button_start"),shouldRenderRightIcon:!1}))},fee=()=>{const{t:e}=eV(),t=Gp(),n=M.useRef(null),[i,r]=M.useState(2),[a,o]=M.useState(0),{height:s,width:l}=vm(),u=M.useMemo(()=>[{title:e("guide_recent_insulin_title"),subtitle:e("guide_recent_insulin_body"),image:"/assets/webp/1_EN.webp"},{title:e("web_guide_no_import_title"),subtitle:e("web_guide_no_import_body"),image:"/assets/webp/2_EN.webp"},{title:e("guide_glucose_title"),subtitle:e("guide_glucose_body"),image:"/assets/webp/3_EN.webp"},{title:e("guide_carbohydrates_title"),subtitle:e("guide_carbohydrates_body"),image:"/assets/webp/4_EN.webp"},{title:e("guide_activity_title"),subtitle:e("guide_activity_body"),image:"/assets/webp/5_EN.webp"},{title:e("guide_summary_title"),subtitle:e("onboarding_quick_guide_text"),image:"/assets/webp/6_EN.webp"},{title:e("guide_recommendation_title"),subtitle:e("guide_recommendation_body"),image:"/assets/webp/7_EN.webp"}],[e]),c=M.useCallback(e=>{switch(e-1){case 1:return MX.QuickGuideBackPressStep1;case 2:return MX.QuickGuideBackPressStep2;case 3:return MX.QuickGuideBackPressStep3;case 4:return MX.QuickGuideBackPressStep4;case 5:return MX.QuickGuideBackPressStep5;case 6:return MX.QuickGuideBackPressStep6;case 7:return MX.QuickGuideBackPressStep7;default:throw new Error("[QuickGuide::getTrackingEventBackPress] Invalid step")}},[]),h=M.useCallback(e=>{switch(e-1){case 1:return MX.QuickGuideNextPressStep1;case 2:return MX.QuickGuideNextPressStep2;case 3:return MX.QuickGuideNextPressStep3;case 4:return MX.QuickGuideNextPressStep4;case 5:return MX.QuickGuideNextPressStep5;case 6:return MX.QuickGuideNextPressStep6;default:throw new Error("[QuickGuide::getTrackingEventNextPress] Invalid step")}},[]),m=M.useCallback(()=>{if(a===u.length-1)NX(MX.QuickGuideFinishPress),t.navigate(E2.QuickGuideAllSet);else{const e=a+1;n.current?.scrollToIndex({index:e,animated:!0}),r(i+1),o(e);const t=h(i);NX(t)}},[a,i,h,t,u.length]),p=M.useCallback(()=>{if(0===a)t.navigate(E2.QuickGuideStart);else{const e=a-1;n.current?.scrollToIndex({index:e,animated:!0}),r(i-1),o(e)}const e=c(i);NX(e)},[a,i,c,t]);return d.jsxs(d.Fragment,{children:[d.jsx(Wo,{ref:n,data:u,initialNumToRender:1,renderItem:({item:e,index:t})=>1===t?(e=>d.jsxs(ga,{style:[gee.container,{width:l}],children:[d.jsx(nj,{colors:wL.gradientQuickGuide,style:gee.gradient}),d.jsx(ga,{style:{flex:1,justifyContent:"flex-end"},children:d.jsx(Js,{source:e.image,style:{height:QR(s/5,140,180),width:QR(s/5,140,180),zIndex:10},resizeMode:"stretch"})}),d.jsxs(ga,{style:[gee.textContainer,{flex:1,justifyContent:"center"}],children:[d.jsx(pj,{style:gee.title,maxFontSizeMultiplier:bL,children:e.title}),d.jsx(pj,{style:gee.subtitle,maxFontSizeMultiplier:bL,children:e.subtitle})]})]}))(e):d.jsxs(ga,{style:[gee.container,{width:l}],children:[d.jsx(Js,{source:e.image,style:gee.image,resizeMode:"contain"}),d.jsx(nj,{colors:wL.gradientQuickGuide,locations:[.45,.64],style:gee.gradient}),d.jsxs(ga,{style:gee.textContainer,children:[d.jsx(pj,{style:gee.title,maxFontSizeMultiplier:bL,children:e.title}),d.jsx(pj,{style:gee.subtitle,maxFontSizeMultiplier:bL,children:e.subtitle})]})]}),scrollEnabled:!1,horizontal:!0,showsHorizontalScrollIndicator:!1}),d.jsx(hee,{currentStep:i,onPress:m,onBackPress:p,text:a===u.length-1?e("button_complete"):e("button_next"),shouldRenderRightIcon:a!==u.length-1})]})},gee=Ei.create({container:{flex:1,alignItems:"center"},image:{position:"absolute",width:"100%",height:"100%",marginTop:32,marginBottom:14},textContainer:{marginTop:"auto",minHeight:Ws.getFontScale()>vL?165:155,backgroundColor:wL.bgTransparent},title:{..._L.bold_2XL,marginBottom:4,paddingHorizontal:16,textAlign:"center"},subtitle:{..._L.medium_SM,color:wL.textSecondary,paddingHorizontal:Ws.getFontScale()>vL?16:32,textAlign:"center"},gradient:{position:"absolute",top:"16%",bottom:0,left:0,right:0}}),_ee=()=>{const{Navigator:e,Screen:t}=I8();return d.jsxs(e,{screenOptions:{...r0,headerShown:!1},children:[d.jsx(t,{name:E2.QuickGuideStart,component:pee}),d.jsx(t,{name:E2.QuickGuide,component:fee}),d.jsx(t,{name:E2.QuickGuideAllSet,component:dee})]})};function vee({onOptionSelect:e,setNextEnabled:t,ref:n}){const{t:i}=eV(),{width:r}=vm(),[a,o]=M.useState(null),s=M.useCallback(n=>{o(n),e(n),t(!0)},[e,t]);return M.useImperativeHandle(n,()=>({onBackPress(){NX(MX.SetupOptionsBackPress)},onNextPressed:()=>null!==a?(NX(MX.SetupOptionsNextPress),t(!0),{transitionAllowed:!0}):(t(!1),{transitionAllowed:!1}),validateData:()=>({isValid:null!==a})}),[a,t]),D.createElement(Xa,{contentContainerStyle:[yee.container,{width:r}]},D.createElement(pj,{style:yee.header},i("insulin_settings_title")),D.createElement(ga,{style:yee.buttonsContainer},D.createElement(cj,{title:i("insulin_settings_button_yes"),testID:"insulin_settings_yes",onPress:()=>{s("yes")},type:"yes"===a?lj.Primary:lj.Secondary,style:yee.button}),D.createElement(cj,{title:i("insulin_settings_button_no"),testID:"insulin_settings_no",onPress:()=>{s("no")},type:"no"===a?lj.Primary:lj.Secondary,style:yee.button})))}const yee=Ei.create({container:{flex:1,paddingHorizontal:16,paddingTop:32},header:{..._L.semiBold_2XL,color:wL.text,paddingHorizontal:16,marginBottom:24},buttonsContainer:{flexDirection:"row",marginBottom:24,gap:12},button:{flex:1}});function bee({setNextEnabled:e,ref:t}){const{t:n}=eV(),{width:i}=vm(),{bottom:r}=hH(),{birthday:a,biologicalSex:o,diabetesType:s,bloodGlucoseUnits:l}=Y2(),{setSetupCalculatorStoreValues:u}=W2(),c=Gp(),[d,h]=M.useState(!1),[m,p]=M.useState(!1),[f,g]=M.useState(""),[_,v]=M.useState(!1),y=M.useCallback(e=>{s$(e,mX(new Date))?(u({birthday:e.toISOString()}),g("")):(u({birthday:void 0}),g(n("birthday_error")))},[u,n]),b=M.useCallback(e=>{y(e),h(!1)},[y]),w=M.useCallback(()=>{u({diabetesType:FL.DiabetesType.Type2}),p(!0)},[u]),S=M.useCallback(()=>!!(a&&o&&s&&l),[a,l,s,o]);return M.useEffect(()=>{const t=S();e(t)},[e,S]),M.useImperativeHandle(t,()=>({onBackPress(){NX(MX.SetupGeneralBackPress)},onNextPressed:()=>{v(!0),!a&&g(n("birthday_error"));return S()?(e(!0),NX(MX.SetupGeneralNextPress),{transitionAllowed:!0}):(e(!1),{transitionAllowed:!1})},validateData:()=>({isValid:S()})}),[a,n,S,e]),D.createElement(D.Fragment,null,D.createElement(Xa,{testID:"step_2",contentContainerStyle:[wee.container,{width:i}]},D.createElement(Sj,{title:n("general_birthday_title")}),D.createElement(KB,{isAnimated:!!f},D.createElement(bj,{testID:"birthday",renderLeftSlot:()=>D.createElement(WK,null),title:n("general_input_birthday"),subtitle:a?new Date(a).toLocaleDateString():"",errorMessage:f,containerStyle:wee.wrapper,onPress:()=>{h(!0)}})),D.createElement(ga,{style:wee.wrapper},D.createElement(Sj,{title:n("biological_sex_title")}),D.createElement(KB,{isAnimated:_&&!o,errorMessage:n("diabetes_error")},D.createElement(bj,{title:n("my_profile_sex"),testID:"biological-sex",value:o?aV[o]():"-",onPress:()=>{c.navigate(E2.BiologicalSex)},renderRightSlot:()=>D.createElement(QK,null),errorMessage:_&&!o?n("diabetes_error"):void 0}))),D.createElement(ga,{style:wee.wrapper},D.createElement(Sj,{title:n("type_of_diabetes_title")}),D.createElement(KB,{isAnimated:_&&!s,errorMessage:n("diabetes_error")},D.createElement(ga,{style:wee.row},D.createElement(Cj,{title:n("type_of_diabetes_type1"),isActive:s===FL.DiabetesType.Type1,testID:"type-1",onPress:()=>{u({diabetesType:FL.DiabetesType.Type1})},isError:_&&!s}),D.createElement(Cj,{title:n("type_of_diabetes_type2"),isActive:s===FL.DiabetesType.Type2,testID:"type-2",onPress:w,isError:_&&!s})))),D.createElement(ga,{style:wee.wrapper},D.createElement(Sj,{title:n("glucose_unit_title")}),D.createElement(KB,{isAnimated:_&&!l,errorMessage:n("glucose_unit_error")},D.createElement($7,{glucoseUnit:l,onPressMMOLL:()=>{u({bloodGlucoseUnits:FL.BloodGlucoseUnit.MMOL_L})},onPressMGDL:()=>{u({bloodGlucoseUnits:FL.BloodGlucoseUnit.MG_DL})},isError:_&&!l})))),lV?D.createElement(S5,{testID:"birthday-date-picker",display:"spinner",date:a?new Date(a):new Date,isVisible:d,onConfirm:b,onCancel:()=>{h(!1)},cancelTextIOS:n("button_cancel"),confirmTextIOS:n("button_confirm"),pickerStyleIOS:wee.alignCenter,modalStyleIOS:{paddingBottom:r}}):D.createElement(c8,{isVisible:d,initialValue:a?new Date(a):new Date,onConfirm:b,onCancel:()=>{h(!1)}}),D.createElement(sz,{isVisible:m,textAlign:"left",title:n("modal_diabetes2_title"),message:n("modal_diabetes2_body"),buttons:[{title:n("button_close"),testID:"type2-modal-understood-button",onPress:()=>{p(!1)}}]}))}const wee=Ei.create({container:{paddingTop:32,paddingHorizontal:16},wrapper:{marginBottom:24},row:{flexDirection:"row",gap:12},alignCenter:{alignSelf:"center"}});function See({setNextEnabled:e,ref:t}){const{t:n}=eV(),{width:i}=vm(),{parameters:r,treatmentType:a,fastActingInsulin:o,longActingInsulin:s}=Y2(),{setSetupCalculatorStoreValues:l}=W2(),{navigate:u}=Gp(),[c,d]=M.useState(!1);M.useEffect(()=>{r||l({parameters:jq(0,0,FL.Usage.Overall)})},[r,l]),M.useEffect(()=>{e(!!a)},[e,a]),M.useImperativeHandle(t,()=>({onBackPress(){NX(MX.SetupTreatmentBackPress)},onNextPressed:()=>(d(!0),a?(e(!0),NX(MX.SetupTreatmentNextPress),{transitionAllowed:!0}):(e(!1),{transitionAllowed:!1})),validateData:()=>({isValid:!!a})}),[e,a]);const h=a?OX(FL.InjectionMethod,a):void 0,m=(h&&X8[h]())??"-",p=(o&&W8[o]())??"-",f=(s&&z8[s]())??"-";return D.createElement(ga,{testID:"step_3",style:[kee.container,{width:i}]},D.createElement(KB,{isAnimated:c&&!a},D.createElement(bj,{title:n("treatment_type_input"),value:m,testID:"treatment-type",renderRightSlot:()=>D.createElement(QK,null),onPress:()=>{u(E2.TreatmentType,{comingFrom:E2.Setup})},errorMessage:c&&!a?n("treatment_type_input_error"):void 0})),D.createElement(ga,null,D.createElement(Sj,{title:n("treatment_type_insulin_title")}),D.createElement(bj.Container,null,D.createElement(bj,{title:n("Rapid-acting_insulin_input"),value:p,testID:"fast-acting",renderRightSlot:()=>D.createElement(QK,null),displayType:vj.ListItem,onPress:()=>{u(E2.RapidActingInsulin,{comingFrom:E2.Setup})}}),D.createElement(bj,{title:n("long-acting_insulin_input"),value:f,testID:"long-acting",renderRightSlot:()=>D.createElement(QK,null),displayType:vj.ListItem,onPress:()=>{u(E2.LongActingInsulin,{comingFrom:E2.Setup})}}))))}const kee=Ei.create({container:{paddingHorizontal:16,paddingVertical:32,gap:24}}),Cee=RX(10,350);function Eee({setNextEnabled:e,ref:t}){const{t:n}=eV(),{width:i}=vm(),{bloodGlucoseUnits:r,parameters:a}=Y2();if(!r||!a)throw new Error("[Step4::render] are not defined");const o=$2(),{setSetupCalculatorStoreValues:s,setTotalDailyDosage:l}=W2(),[u,c]=M.useState(!1),[d,h]=M.useState(void 0),m=M.useMemo(()=>{if(!o)return{carbohydrateRatio:0,insulinSensitivityMMOLL:0};return{carbohydrateRatio:parseFloat((500/o).toFixed(1)),insulinSensitivityMMOLL:Number(A8.DividendNumber)/o}},[o]);M.useEffect(()=>{const{carbohydrateRatio:e,insulinSensitivityMMOLL:t}=m,n=jq(t,e,FL.Usage.Overall);s({parameters:n})},[r,m,s]);const p=M.useMemo(()=>o?Cee.findIndex(e=>e===o.toString()):Cee.findIndex(e=>e===50..toString()),[o]);M.useImperativeHandle(t,()=>({onBackPress(){NX(MX.SetupTDDBackPress)},onNextPressed:()=>o?(NX(MX.SetupTDDNextPress),e(!0),{transitionAllowed:!0}):(h(n("insulin_settings_input_error",{inputTypeTranslated:n("daily_insulin_dosage_input")})),e(!1),{transitionAllowed:!1}),validateData:()=>({isValid:!!o})}),[e,o,n]);const f=M.useCallback(t=>{l(t),c(!1),h(void 0),e(!0)},[e,l]),{text:g}=M.useMemo(()=>Xq(r),[r]),_=M.useMemo(()=>`${PQ(a.overallParameters.insulinSensitivity,FL.BloodGlucoseUnit.MMOL_L,r)} ${n("fixed_insulin_settings_sensitivity_unit",{displayUnit:g})}`,[a,g,n,r]),v=M.useMemo(()=>a.overallParameters.carbohydrateRatio+" "+n("insulin_helper_carb_ratio_unit"),[a,n]);return D.createElement(D.Fragment,null,D.createElement(Xa,{contentContainerStyle:[xee.container,{width:i}]},D.createElement(ga,null,D.createElement(Sj,{title:n("daily_insulin_dosage_title")}),D.createElement(pj,{style:xee.subheader},n("daily_insulin_dosage_body")),D.createElement(KB,{isAnimated:!!d},D.createElement(bj,{testID:"daily_insulin_dosage",title:n("daily_insulin_dosage_input"),value:`${o??"-"} ${n(1===o?"unit":"units")}`,onPress:()=>{c(!0)},errorMessage:d}))),!!o&&D.createElement(ga,{style:xee.explanation},D.createElement(pj,{style:xee.text},n("insulin_helper_body")),D.createElement(ga,{style:xee.row},D.createElement(pj,{style:xee.textSemiBold},n("insulin_helper_carb_ratio_input")),D.createElement(pj,{style:xee.textSemiBold},v)),D.createElement(ga,{style:xee.row},D.createElement(pj,{style:xee.textSemiBold},n("insulin_helper_insulin_sensitivity_input")),D.createElement(pj,{style:xee.textSemiBold},_))),D.createElement(v7,null),D.createElement(ga,null,D.createElement(j8,null))),D.createElement(n3,{testID:"daily_insulin_dosage_picker",onCancel:()=>{c(!1)},onConfirm:f,initialScrollIndex:p,isVisible:u,items:Cee}))}const xee=Ei.create({container:{paddingVertical:32,paddingHorizontal:16,gap:24},subheader:{..._L.regular_SM,color:wL.textSecondary,marginHorizontal:16,marginBottom:8},explanation:{backgroundColor:wL.bgInput,borderRadius:8,padding:16},row:{flexDirection:"row",justifyContent:"space-between"},text:{..._L.regular_SM,color:wL.textSecondary,marginBottom:16},textSemiBold:{..._L.medium_SM,color:wL.textSecondary,paddingVertical:16}});function Iee({setNextEnabled:e,ref:t}){const{t:n}=eV(),{width:i}=vm(),{bloodGlucoseUnits:r,parameters:a}=Y2();if(!a||!r)throw new Error("[Step5::render] setupCalculatorStoreValues are not defined");const{setSetupCalculatorStoreValues:o,setTotalDailyDosage:s}=W2(),[l,u]=M.useState(void 0),[c,d]=M.useState(void 0),[h,m]=M.useState(!1),[p,f]=M.useState(!1),{text:g}=M.useMemo(()=>Xq(r),[r]),{carbohydrateRatio:_,insulinSensitivity:v}=M.useMemo(()=>a.overallParameters,[a]),y=M.useCallback(e=>{const t=n("IS"===e?"insulin_sensitivity_input":"insulin-to-carb_ratio_input");return n("insulin_settings_input_error",{inputTypeTranslated:t})},[n]);M.useEffect(()=>{e(!(!v||!_))},[_,v,e]),M.useImperativeHandle(t,()=>({onBackPress(){NX(MX.SetupInsulinBackPress)},onNextPressed:()=>_||v?_?v?(d(void 0),u(void 0),s(null),e(!0),NX(MX.SetupInsulinNextPress),{transitionAllowed:!0}):(e(!1),u(y("IS")),{transitionAllowed:!1}):(d(y("ICR")),e(!1),{transitionAllowed:!1}):(d(y("ICR")),u(y("IS")),e(!1),{transitionAllowed:!1}),validateData:()=>({isValid:!(!_||!v)})}),[_,v,s,e,y]);const b=M.useCallback(e=>{const t=AQ(e,r,FL.BloodGlucoseUnit.MMOL_L);o({parameters:{...a,overallParameters:{...a.overallParameters,insulinSensitivity:t}}}),s(null),u(void 0),m(!1)},[r,a,o,s]),w=M.useCallback(e=>{const t=Number(e.toFixed(1));a.overallParameters.carbohydrateRatio=t,o({parameters:{...a,overallParameters:{...a.overallParameters,carbohydrateRatio:t}}}),s(null),d(void 0),f(!1)},[a,o,s]),S=M.useMemo(()=>r===FL.BloodGlucoseUnit.MMOL_L?P8:M8,[r]),k=M.useMemo(()=>{const e=r===FL.BloodGlucoseUnit.MMOL_L?2..toFixed(1):36..toString();if(0===v)return S.findIndex(t=>t===e);const t=PQ(v,FL.BloodGlucoseUnit.MMOL_L,r);return S.findIndex(e=>e===t)},[S,r,v]),C=M.useMemo(()=>0===_?R8.findIndex(e=>e===10..toFixed(1)):R8.findIndex(e=>e===_.toFixed(1)),[_]),E=M.useMemo(()=>{const e=PQ(v,FL.BloodGlucoseUnit.MMOL_L,r);return`${v?e:"-"} ${n("fixed_insulin_settings_sensitivity_unit",{displayUnit:g})}`},[v,r,g,n]);return D.createElement(D.Fragment,null,D.createElement(Xa,{contentContainerStyle:[Tee.contentContainer,{width:i}]},D.createElement(ga,null,D.createElement(Sj,{title:n("insulin-to-carb_ratio_title")}),D.createElement(KB,{isAnimated:!!c},D.createElement(bj,{title:n("insulin-to-carb_ratio_input"),value:`${_||"-"} ${n("fixed_insulin_settings_carb_ratio_unit")}`,testID:"carb_ratio",onPress:()=>{f(!0)},errorMessage:c}))),D.createElement(ga,null,D.createElement(Sj,{title:n("insulin_sensitivity_title")}),D.createElement(KB,{isAnimated:!!l},D.createElement(bj,{title:n("insulin_sensitivity_input"),value:E,testID:"insulin_sensitivity",onPress:()=>{m(!0)},errorMessage:l}))),D.createElement(v7,null),D.createElement(j8,null)),D.createElement(n3,{testID:"insulin_sensitivity_picker",isVisible:h,items:S,initialScrollIndex:k,onConfirm:b,onCancel:()=>{m(!1)}}),D.createElement(n3,{testID:"insulin_to_carb_ratio_picker",isVisible:p,items:R8,initialScrollIndex:C,onConfirm:w,onCancel:()=>{f(!1)}}))}const Tee=Ei.create({contentContainer:{paddingVertical:32,paddingHorizontal:16,gap:24}});const Oee=Ei.create({container:{paddingHorizontal:16,paddingVertical:32},spacing:{height:32},titleStyle:{color:wL.textSecondary}}),Ree=rF(function({setNextEnabled:e,ref:t}){const{t:n}=eV(),{width:i}=vm(),{fastActingInsulin:r,longActingInsulin:a,bloodGlucoseUnits:o,parameters:s,treatmentType:l,diabetesType:u,birthday:c,biologicalSex:d}=Y2(),h=$2(),{modalStoreActions:m}=z2(),p=M.useCallback(async()=>{if(void 0===o)throw new Error("[Step6::setUserSettings] bloodGlucoseUnits from userSettingsManager is undefined.");if(void 0===u)throw new Error("[Step6::setUserSettings] diabetesType from userSettingsManager is undefined.");if(void 0===s)throw new Error("[Step6::setUserSettings] parameters from newUserSettingsManager is undefined.");if(void 0===c)throw new Error("[Step6::setUserSettings] birthday from newUserSettingsManager is undefined.");if(void 0===d)throw new Error("[Step6::setUserSettings] biologicalSex from newUserSettingsManager is undefined.");const{carbohydrateRatio:e,insulinSensitivity:t}=s.overallParameters,n=jq(t,e,FL.Usage.Overall);return Vq.setUserSettings({parameters:n,activity:_7(),notifications:{medicineNotification:{toggle:!1,dailyReminderTime:"19:00"},remeasurementNotification:{toggle:!0,remeasurement:1.5},deviceIdentifiers:[]},glucoseLevelTargets:{targetBGLIntervals:[{startTime:"00:00",low:6,target:8,high:10},{startTime:"05:00",low:4,target:6,high:7.2},{startTime:"09:00",low:6,target:7,high:8},{startTime:"11:00",low:4,target:6,high:10},{startTime:"13:00",low:6,target:7,high:8},{startTime:"18:00",low:4,target:6,high:10},{startTime:"22:00",low:6,target:8,high:10}],overallTargetBGL:{startTime:"00:00",low:3.9,target:6,high:10},use:FL.Usage.Intervals},bloodGlucoseUnits:o,fastActingInsulin:r,longActingInsulin:a,treatmentType:l,diabetesType:u,birthday:c,biologicalSex:d})},[c,o,u,r,d,a,s,l]);M.useImperativeHandle(t,()=>({onBackPress(){NX(MX.SetupSummaryBackPress)},onNextPressed:async()=>{NX(MX.SetupSummaryFinishPress);const t=await p();return t?e(!0):m.set({showSyncErrorModal:!0}),{transitionAllowed:t}},validateData:()=>({isValid:!0})}),[e,m,p]);const f=M.useMemo(()=>{if(void 0===o)throw new Error("[Step6::generalTreatmentItems] bloodGlucoseUnits is undefined");if(void 0===l)throw new Error("[Step6::generalTreatmentItems] treatmentType is undefined");if(void 0===u)throw new Error("[Step6::generalTreatmentItems] diabetesType is undefined");const{text:e}=Xq(o),t=OX(FL.InjectionMethod,l),i=u===FL.DiabetesType.Type1?"type_of_diabetes_type1":"type_of_diabetes_type2";return[{label:n("summary_setup_input_diabetes_type"),value:n(i),testID:"diabetes-type-result"},{label:n("summary_setup_input_treatment_type"),value:X8[t](),testID:"treatment-type-result"},{label:n("summary_setup_input_glucose_unit"),value:e,testID:"glucose-result"},{label:n("summary_setup_input_rapid-acting_insulin"),value:(r&&W8[r]())??"-",testID:"fast-acting-result"},{label:n("summary_setup_input_long-acting_insulin_input"),value:(a&&z8[a]())??"-",testID:"long-acting-result"}]},[o,u,r,a,l,n]),g=M.useMemo(()=>{if(void 0===o)throw new Error("[Step6::insulinFactorsItems] bloodGlucoseUnits is undefined");const{text:e}=Xq(o),{carbohydrateRatio:t,insulinSensitivity:i}=s?.overallParameters??{};if(void 0===t||void 0===i)throw new Error("[Step6::insulinFactorsItems] carbohydrateRatio or insulinSensitivity is undefined");return[h?{label:n("summary_setup_input_daily_dose_input"),value:h.toFixed(0),unit:n("units"),testID:"total-daily-insulin-result"}:null,{label:n("summary_setup_input_insulin-to-carb_input"),value:`${t}`,unit:n("summary_setup_insulin-to-carb_unit"),testID:"carb-ratio-result"},{label:n("summary_setup_input_insulin_sensitivity_input"),value:PQ(i,FL.BloodGlucoseUnit.MMOL_L,o),unit:n("summary_setup_insulin_sensitivity_unit",{displayUnit:e}),testID:"insulin-sensitivity-result"}].filter(e=>null!==e)},[o,s?.overallParameters,n,h]);return D.createElement(Xa,{testID:"scroll",contentContainerStyle:[Oee.container,{width:i}]},D.createElement(v7,null),D.createElement(ga,{style:Oee.spacing}),D.createElement(Sj,{title:n("summary_setup_general_title")}),f.map(({testID:e,label:t,value:n,unit:i})=>D.createElement(bj,{key:e,testID:e,title:t,displayStyle:yj.List,displayType:vj.ListItem,titleStyle:Oee.titleStyle,value:`${n} ${i??""}`})),D.createElement(ga,{style:Oee.spacing}),D.createElement(Sj,{title:n("summary_setup_insuling_settings_title")}),g.map(({testID:e,label:t,value:n,unit:i})=>D.createElement(bj,{key:e,testID:e,title:t,displayStyle:yj.List,displayType:vj.ListItem,titleStyle:Oee.titleStyle,value:`${n} ${i??""}`})),D.createElement(U0,null))}),Aee=()=>{const{t:e}=eV(),{width:t}=vm(),{clear:n}=W2(),i=Gp(),[r,a]=M.useState(2),[o,s]=M.useState(0),[l,u]=M.useState(0),[c,d]=M.useState(!1),[h,m]=M.useState(!1),p=M.useRef(null),f=M.useRef(null);M.useEffect(()=>{n()},[n]);const g=M.useCallback(e=>{d(e)},[]),_=M.useCallback(e=>{m("yes"===e)},[]),v=M.useMemo(()=>[{title:e("general_navigation"),stepNumber:2,renderComponent:e=>D.createElement(bee,{ref:e,setNextEnabled:g})},{title:e("treatment_navigation"),stepNumber:3,renderComponent:e=>D.createElement(See,{ref:e,setNextEnabled:g})},{title:e("insulin_settings_navigation"),stepNumber:4,renderComponent:e=>D.createElement(vee,{ref:e,onOptionSelect:_,setNextEnabled:g})},{title:e("insulin_settings_navigation"),stepNumber:4,renderComponent:e=>h?D.createElement(Iee,{ref:e,setNextEnabled:g}):D.createElement(Eee,{ref:e,setNextEnabled:g})},{title:e("summary_setup_navigation"),stepNumber:5,renderComponent:e=>D.createElement(Ree,{ref:e,setNextEnabled:g})}],[_,g,h,e]);M.useEffect(()=>{i.setOptions({title:v[o].title})},[o,i,v]),M.useEffect(()=>{if(!f.current)return;const{isValid:e}=f.current.validateData();d(e)},[o,v]);const y=M.useCallback(async()=>{if(!f.current)return;const{transitionAllowed:e}=await f.current.onNextPressed();if(e)if(o===v.length-1)i.dispatch(Sm({index:0,routes:[{name:E2.QuickGuideStack}]}));else{const e=o+1;p.current?.scrollToIndex({index:e,animated:!0}),a(v[e].stepNumber),s(e),u(t=>Math.max(t,e))}},[o,v,i]),b=M.useCallback(()=>{if(f.current?.onBackPress(),0===o)i.goBack();else{const e=o-1;p.current?.scrollToIndex({index:e,animated:!0}),a(v[e].stepNumber),s(e),u(t=>Math.max(t,e))}},[o,i,v]);return Wp(M.useCallback(()=>{const e=Au.addEventListener("hardwareBackPress",()=>(b(),!0));return()=>{e.remove()}},[b])),D.createElement(D.Fragment,null,D.createElement(Wo,{ref:p,data:v,renderItem:({item:e,index:n})=>n<=l?e.renderComponent(n===o?f:null):D.createElement(ga,{style:{width:t}}),scrollEnabled:!1,horizontal:!0,initialNumToRender:1,showsHorizontalScrollIndicator:!1}),D.createElement(hee,{currentStep:r,onPress:y,onBackPress:b,inactive:!c,text:o===v.length-1?e("button_complete"):e("button_next"),shouldRenderRightIcon:o!==v.length-1}))},{HEDIA_ACCOUNT_CALLBACK:Lee="",LICENSING_BASE_URL:Pee=""}=zj;var Mee=(e=>(e.InactiveLicense="/problems/inactive-license",e.InvalidLicense="/problems/invalid-license",e.LicenseNotFound="/problems/license-not-found",e))(Mee||{});const Dee=WB({type:$B("/problems/license-not-found"),title:jB(),status:$B(FL.StatusCode.BAD_REQUEST),detail:jB()}),Nee=WB({type:$B("/problems/invalid-license"),title:jB(),status:$B(FL.StatusCode.BAD_REQUEST),detail:jB()}),Fee=WB({type:$B("/problems/inactive-license"),title:jB(),status:$B(FL.StatusCode.BAD_REQUEST),detail:jB()}),Bee=WB({isActive:HB(),key:jB(),startDate:jB(),type:XB(["perpetual","subscription","time-limited"]),endDate:jB().optional(),duration:XB(["P1M","P3M","P6M","P12M"]).optional()});function jee(e=2){const{setIsLicenseValid:t}=Xz(),[n,i]=M.useState(0);return{checkLicense:M.useCallback(async r=>{try{const a=await(async()=>{const e=await FX(Pee+"/check-license?product=HDA"),t=await e.json();if(e.status===FL.StatusCode.OK)return Bee.parse(t);if(e.status===FL.StatusCode.BAD_REQUEST){if(Dee.safeParse(t).success)return Dee.parse(t);if(Nee.safeParse(t).success)return Nee.parse(t);if(Fee.safeParse(t).success)return Fee.parse(t)}throw Error(`licensing:: Check License failed: ${e.status} - ${t.type||"Unknown error"}`)})();if(n>=e)return void t(!0);if(a.type===Mee.InactiveLicense)return t(!1),await(async()=>{const e=await FX(Pee+"/activate-license",{method:FL.HTTPRequestMethod.POST,headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({product:"HDA"})});return await e.json()})(),void i(e=>e+1);if(a.type===Mee.InvalidLicense||a.type===Mee.LicenseNotFound)return void r(a.type);if(a.isActive)return t(!0),void i(0);t(!1),r()}catch(a){console.error("[useLicenseChecker]",a),t(!0)}},[t,n,e]),retryCount:n}}const Vee=({isVisible:e,onCancelPress:t,onContinuePress:n,onModalHide:i})=>{const{t:r}=eV(),[a,o]=M.useState([!1,!1,!1]),[s,l]=M.useState(!1),u=M.useMemo(()=>a.every(Boolean),[a]);M.useEffect(()=>{e&&(o([!1,!1,!1]),l(!1))},[e]);const c=M.useCallback(e=>{o(t=>t.map((t,n)=>n===e?!t:t))},[]),d=M.useCallback(()=>{s&&u&&i()},[u,s,i]),h=M.useCallback(()=>{l(!0),n()},[n]);return D.createElement(sz,{testID:"restrictions_modal",isVisible:e,enableScroll:!0,onModalHide:d,containerStyle:Hee.modal,buttons:[{testID:"restrictions_continue_button",title:r("welcome_modal_button_confirm"),onPress:h,disabled:!u},{testID:"restrictions_cancel_button",title:r("button_cancel"),type:lj.Secondary,onPress:t}]},D.createElement(pj,{style:Hee.title},r("welcome_modal_title")),D.createElement(pj,{style:Hee.subtitle},r("welcome_modal_body")),D.createElement(eh,{testID:"restrictions_checkmark_1",onPress:()=>{c(0)},style:({pressed:e})=>[{opacity:e?.5:1},Hee.checkmarkContainer]},D.createElement(ga,{style:Hee.checkmarkTextContainer},D.createElement(pj,{style:Hee.checkmarkTitle},r("welcome_modal_years_title")),D.createElement(pj,{style:Hee.checkmarkSubtitle},r("welcome_modal_years_body"))),a[0]?D.createElement(qK,null):D.createElement(XK,null)),D.createElement(ga,{style:Hee.separatorLine}),D.createElement(eh,{testID:"restrictions_checkmark_2",onPress:()=>{c(1)},style:({pressed:e})=>[{opacity:e?.5:1},Hee.checkmarkContainer]},D.createElement(ga,{style:Hee.checkmarkTextContainer},D.createElement(pj,{style:Hee.checkmarkTitle},r("welcome_modal_pregnancy_title")),D.createElement(pj,{style:Hee.checkmarkSubtitle},r("welcome_modal_pregnancy_body"))),a[1]?D.createElement(qK,null):D.createElement(XK,null)),D.createElement(ga,{style:Hee.separatorLine}),D.createElement(eh,{testID:"restrictions_checkmark_3",onPress:()=>{c(2)},style:({pressed:e})=>[{opacity:e?.5:1},Hee.checkmarkContainer]},D.createElement(ga,{style:Hee.checkmarkTextContainer},D.createElement(pj,{style:Hee.checkmarkTitle},r("welcome_modal_gestational_title")),D.createElement(pj,{style:Hee.checkmarkSubtitle},r("welcome_modal_gestational_body"))),a[2]?D.createElement(qK,null):D.createElement(XK,null)))},Hee=Ei.create({modal:{backgroundColor:wL.bgModal},title:{..._L.bold_2XL,marginBottom:8},subtitle:{..._L.regular_Base,color:wL.textSecondary,marginBottom:16},checkmarkContainer:{paddingVertical:16,flexDirection:"row",justifyContent:"space-between"},checkmarkTextContainer:{flex:1,marginRight:16},checkmarkTitle:{..._L.semiBold_Base,marginBottom:2},checkmarkSubtitle:{..._L.regular_SM,color:wL.textSecondary},separatorLine:{width:"100%",backgroundColor:wL.borderDivider,height:1}}),zee=rF(()=>{const{t:e}=eV(),{navigate:t}=Gp(),{clear:n}=W2(),{isLicenseValid:i}=Xz(),{checkLicense:r}=jee(),[a,o]=M.useState(!1);M.useEffect(()=>{n(),oV||r(e=>{t(E2.LicensingStatus,e&&{errorType:e})}).catch(console.error)},[r,n,t]);const s=M.useCallback(()=>{o(!0),NX(MX.SetupIntroStartPress)},[]);return oV||i?D.createElement(D.Fragment,null,D.createElement(uee,{title:e("setup_account_title"),subtitle:e("setup_account_body"),stepChecked:1}),D.createElement(hee,{currentStep:1,isBackVisible:!1,onPress:s,text:e("button_start"),shouldRenderRightIcon:!1}),D.createElement(Vee,{isVisible:a,onCancelPress:()=>{o(!1)},onContinuePress:()=>{o(!1)},onModalHide:()=>{t(E2.Setup)}})):D.createElement(QV,null)}),Uee=()=>{const{t:e}=eV(),{Navigator:t,Screen:n}=I8();return d.jsxs(t,{screenOptions:{...r0,headerLeft:()=>null,headerBackVisible:!1},children:[d.jsx(n,{name:E2.SetupStart,component:zee,options:{title:e("setup_account_navigation")}}),d.jsx(n,{name:E2.Setup,component:Aee,options:{title:e("general_navigation")}}),d.jsx(n,{name:E2.BiologicalSex,component:i8,options:{title:e("biological_sex_navigation"),headerLeft:Z2}}),d.jsx(n,{name:E2.TreatmentType,component:Z8,options:{title:e("treatment_type_navigation"),headerLeft:Z2}}),d.jsx(n,{name:E2.RapidActingInsulin,component:$8,options:{title:e("rapid-acting_insulin_navigation"),headerLeft:Z2}}),d.jsx(n,{name:E2.LongActingInsulin,component:G8,options:{title:e("long-acting_insulin_navigation"),headerLeft:Z2}})]})},Gee=()=>{const{Navigator:e,Screen:t}=I8();return d.jsxs(e,{screenOptions:{...r0,headerShown:!1},children:[d.jsx(t,{name:E2.SetupBolusCalculator,component:Uee}),d.jsx(t,{name:E2.QuickGuideStack,component:_ee})]})},Wee=rF(()=>{const{isOnboardingFinished:e,setIsOnboardingFinished:t}=Xz(),[n,i]=D.useState(!1),r=M.useCallback(async()=>{if(await GQ.syncAll(),!Vq.uuid)throw window.location.href="/redirect?status=error",new Error("[App::syncData] User settings not found");const e=qB(FL.BloodGlucoseUnit).safeParse(Vq.glucoseUnit);t(e.success)},[t]);return M.useEffect(()=>{r().catch(console.error).finally(()=>{i(!0)})},[r]),n&&void 0!==e?e?d.jsx(lee,{}):d.jsx(Gee,{}):d.jsx(QV,{})}),Yee={prefixes:[],config:{screens:{SetupBolusCalculator:{path:"setup-bolus-calculator",screens:{SetupStart:"setup-start",Setup:"setup",BiologicalSex:"biological-sex",InsulinSettings:"insulin-settings",TreatmentType:"treatment-type",RapidActingInsulin:"rapid-acting-insulin",LongActingInsulin:"long-acting-insulin"}},QuickGuideStack:{path:"quick-guide",screens:{QuickGuideStart:"quick-guide-start",QuickGuide:"quick-guide",QuickGuideAllSet:"quick-guide-all-set"}},NewCalculationStack:{path:"new-calculation",screens:{ActiveInsulin:{path:"active-insulin"},RegisterActiveInsulin:{path:"register"},CalculationBottomTabs:{path:"inputs",screens:{GlucoseTab:{path:"glucose",screens:{Glucose:""}},CarbsTab:{path:"carbs",screens:{Carbs:"",FoodLibrary:"library"}},ActivityTab:{path:"activity",screens:{ActivityOverview:"",AddActivity:"add-activity"}},SummaryTab:{path:"summary",screens:{Summary:""}}}},LoadingRecommendation:{path:"loading"},Recommendation:{path:"recommendation"},LeavingRecommendation:{path:"leaving"}}},IFU:"ifu",SettingsTab:{path:"settings",screens:{Settings:"",ProfileStack:{path:"profile",screens:{Profile:"",BiologicalSex:"biological-sex",TreatmentType:"treatment-type",RapidActingInsulin:"rapid-acting-insulin",LongActingInsulin:"long-acting-insulin",DiabetesType:"diabetes-type"}},GlucoseSettings:"glucose",ActivitySettings:"activity",InsulinSettingsStack:{path:"insulin-settings",screens:{InsulinSettings:"",TreatmentType:"treatment-type",RapidActingInsulin:"rapid-acting-insulin",LongActingInsulin:"long-acting-insulin"}},IFU:"ifu",Legal:"legal",GlucoseUnit:"glucose-unit"}}}}};var $ee="web-production",Xee="https://key@sentry-proxy.hedia.io/123456";const qee=function(){const e=[...Object.keys(km),"addListener","removeListener","resetRoot","dispatch","isFocused","canGoBack","getRootState","getState","getParent","getCurrentRoute","getCurrentOptions"],t={},n=(e,n)=>{t[e]&&(t[e]=t[e].filter(e=>e!==n))};let i=null;return{get current(){return i},set current(e){i=e,null!=e&&Object.entries(t).forEach(t=>{let[n,i]=t;i.forEach(t=>{e.addListener(n,t)})})},isReady:()=>null!=i&&i.isReady(),...e.reduce((e,r)=>(e[r]=function(){for(var e=arguments.length,a=new Array(e),o=0;o<e;o++)a[o]=arguments[o];if(null!=i)return i[r](...a);switch(r){case"addListener":{const[e,i]=a;return t[e]=t[e]||[],t[e].push(i),()=>n(e,i)}case"removeListener":{const[e,t]=a;n(e,t);break}default:console.error(Lm)}},e),{})}}(),Zee={...ff,colors:{...ff.colors,background:wL.bgBackground,border:wL.borderNavigation}};!function(e){const t={...e};var n,i;Rv(t,"react"),n="react",i={version:M.version},i_().setContext(n,i),function(e={}){const t=!e.skipBrowserExtensionCheck&&ab(),n={...e,enabled:!t&&e.enabled,stackParser:(i=e.stackParser||Uy,Array.isArray(i)?Wf(...i):i),integrations:sv({integrations:e.integrations,defaultIntegrations:null==e.defaultIntegrations?[Bv(),Dv(),qy(),$y(),eb(),rb(),$v(),ib(),Jy()]:e.defaultIntegrations}),transport:e.transport||Ny};var i;kv(wy,n)}(t)}({dsn:Xee,environment:$ee,ignoreErrors:["No text/key with value"],beforeSend:e=>e.message?.includes("No text/key with value")?null:(e.user&&(delete e.user.email,delete e.user.ip_address,delete e.user.username,delete e.user.geo),e)});const Kee=()=>d.jsx(Rw,{children:d.jsx(ee,{children:d.jsx(Of,{theme:Zee,ref:qee,linking:Yee,children:d.jsx(Wee,{})})})});P.createRoot(document.getElementById("root")).render(d.jsx(Kee,{}));
|
|
20
20
|
//# sourceMappingURL=index.bundle.js.map
|