wizards 0.2.0 → 0.2.2

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.
Files changed (64) hide show
  1. package/README.md +4 -1
  2. package/apps/runtime/dist/app.js +36 -4
  3. package/apps/runtime/dist/auth/local-ticket.js +8 -5
  4. package/apps/runtime/dist/cli/connect.js +531 -0
  5. package/apps/runtime/dist/cli/environment.js +3 -1
  6. package/apps/runtime/dist/cli/main.js +17 -0
  7. package/apps/runtime/dist/cli/mcp.js +175 -0
  8. package/apps/runtime/dist/cli/setup.js +49 -0
  9. package/apps/runtime/dist/env.js +1 -1
  10. package/apps/runtime/dist/mcp/auth.js +26 -0
  11. package/apps/runtime/dist/mcp/flow-app.js +94 -0
  12. package/apps/runtime/dist/mcp/handler.js +15 -5
  13. package/apps/runtime/dist/mcp/seen.js +65 -0
  14. package/apps/runtime/dist/mcp/tools.js +156 -4
  15. package/apps/runtime/dist/plugins/loader.js +23 -1
  16. package/apps/runtime/dist/routes/runs.js +7 -3
  17. package/apps/runtime/dist/routes/studio.js +20 -0
  18. package/apps/runtime/dist/secrets/signing.js +21 -3
  19. package/apps/runtime/dist/services/runs.js +190 -28
  20. package/apps/runtime/dist/services/wizards.js +1 -1
  21. package/apps/web/dist/assets/{ChangelogDialog-COqPzrKT.js → ChangelogDialog-4HCt88rf.js} +1 -1
  22. package/apps/web/dist/assets/ChatPanel-B91fTrzg.js +1 -0
  23. package/apps/web/dist/assets/{CreditsDialog-pRbTW7Xh.js → CreditsDialog-D3fZRqXH.js} +1 -1
  24. package/apps/web/dist/assets/EditorPage-ZZjb9mGV.js +2 -0
  25. package/apps/web/dist/assets/{FlowPreview-CDmcN1oX.js → FlowPreview-CjUK5046.js} +1 -1
  26. package/apps/web/dist/assets/{HomePage-DUAiS9pg.js → HomePage-Cn5TCZk7.js} +1 -1
  27. package/apps/web/dist/assets/{ImportWizard-pzljVvcr.js → ImportWizard-DiV62Uno.js} +1 -1
  28. package/apps/web/dist/assets/{LocalRuntime-DPJMJlWc.js → LocalRuntime-DupxjXff.js} +1 -1
  29. package/apps/web/dist/assets/NewWizardPage-Bz3PIQGp.js +2 -0
  30. package/apps/web/dist/assets/{PublicRunner-DoZdJuyW.js → PublicRunner-Axs1zwqe.js} +1 -1
  31. package/apps/web/dist/assets/{RunnerView-XKosfgO-.js → RunnerView-Bhv6RNME.js} +1 -1
  32. package/apps/web/dist/assets/SettingsPage-in_RmI8i.js +2 -0
  33. package/apps/web/dist/assets/{SetupPage-BFQ0V__v.js → SetupPage-xiqJMR0J.js} +1 -1
  34. package/apps/web/dist/assets/{SharePage-C1yg5bc2.js → SharePage-C8B9BUSU.js} +1 -1
  35. package/apps/web/dist/assets/{api-DijQGkp-.js → api-KMi35npD.js} +1 -1
  36. package/apps/web/dist/assets/changelog-C2LDEzLQ.js +1 -0
  37. package/apps/web/dist/assets/index-2Ktgo6f1.js +10 -0
  38. package/apps/web/dist/assets/index-B9YVjvVY.css +1 -0
  39. package/apps/web/dist/assets/meta-4R1Lnr25.js +1 -0
  40. package/apps/web/dist/assets/oss-credits-roB62QJu.js +1 -0
  41. package/apps/web/dist/assets/{outputs-37WFkpRS.js → outputs-Dhqtf-SA.js} +1 -1
  42. package/apps/web/dist/assets/plug-CLjyCoHB.js +1 -0
  43. package/apps/web/dist/assets/{session-BerOchdC.js → session-B6-6VomQ.js} +1 -1
  44. package/apps/web/dist/assets/type-Bj9H3eOK.js +1 -0
  45. package/apps/web/dist/assets/ui-Cs6lpsmj.js +1 -0
  46. package/apps/web/dist/index.html +6 -5
  47. package/apps/web/dist/mcp/flow.html +748 -0
  48. package/modules/README.md +1 -1
  49. package/node_modules/@engenty-wizards/plugin-sdk/dist/index.d.ts +24 -1
  50. package/node_modules/@engenty-wizards/plugin-sdk/dist/studio.d.ts +1 -1
  51. package/package.json +2 -1
  52. package/plugin/.claude-plugin/plugin.json +1 -1
  53. package/plugin/skills/use-wizard/SKILL.md +18 -0
  54. package/apps/web/dist/assets/ChatPanel-aQP8iz10.js +0 -1
  55. package/apps/web/dist/assets/EditorPage-xkq6pvw-.js +0 -2
  56. package/apps/web/dist/assets/NewWizardPage-TwYgdbKl.js +0 -2
  57. package/apps/web/dist/assets/SettingsPage-C0_peJuV.js +0 -2
  58. package/apps/web/dist/assets/changelog-sa4SXBrg.js +0 -1
  59. package/apps/web/dist/assets/index-BAObuqzs.js +0 -10
  60. package/apps/web/dist/assets/index-BOl3401k.css +0 -1
  61. package/apps/web/dist/assets/meta-ijlGGCOr.js +0 -1
  62. package/apps/web/dist/assets/oss-credits-ClwxOPrf.js +0 -1
  63. package/apps/web/dist/assets/type-c_dt5Ne8.js +0 -1
  64. package/apps/web/dist/assets/ui-DKc92qJ1.js +0 -1
@@ -0,0 +1,748 @@
1
+ <!doctype html>
2
+ <html lang="de">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
+ <title>engenty wizards</title>
7
+ <script type="module" crossorigin>var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(e){throw n=[e],e}},s=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),c=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},l=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},u=(n,r,o)=>(o=n==null?{}:e(i(n)),l(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var d=s((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.for(`react.view_transition`),m=Symbol.iterator;function h(e){return typeof e!=`object`||!e?null:(e=m&&e[m]||e[`@@iterator`],typeof e==`function`?e:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,v={};function y(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}y.prototype.isReactComponent={},y.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function b(){}b.prototype=y.prototype;function x(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}var S=x.prototype=new b;S.constructor=x,_(S,y.prototype),S.isPureReactComponent=!0;var C=Array.isArray;function w(){}var T={H:null,A:null,T:null,S:null},E=Object.prototype.hasOwnProperty;function D(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function ee(e,t){return D(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function k(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var A=/\/+/g;function te(e,t){return typeof e==`object`&&e&&e.key!=null?k(``+e.key):t.toString(36)}function ne(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(w,w):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function re(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,re(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+te(e,0):a,C(o)?(i=``,c!=null&&(i=c.replace(A,`$&/`)+`/`),re(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=ee(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(A,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(C(e))for(var u=0;u<e.length;u++)a=e[u],s=l+te(a,u),c+=re(a,r,i,s,o);else if(u=h(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+te(a,u++),c+=re(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return re(ne(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function ie(e,t,n){if(e==null)return e;var r=[],i=0;return re(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function ae(e){if(e._status===-1){var t=e._result,n=t();n.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t,n.status===void 0&&(n.status=`fulfilled`,n.value=t))},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t,n.status===void 0&&(n.status=`rejected`,n.reason=t))}),e._status===-1&&(e._status=0,e._result=n)}if(e._status===1)return e._result.default;throw e._result}var oe=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)};function se(e){var t=T.T,n={};n.types=t===null?null:t.types,T.T=n;try{var r=e(),i=T.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(w,oe)}catch(e){oe(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),T.T=t}}function ce(e){var t=T.T;if(t!==null){var n=t.types;n===null?t.types=[e]:n.indexOf(e)===-1&&n.push(e)}else se(ce.bind(null,e))}var j={map:ie,forEach:function(e,t,n){ie(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return ie(e,function(){t++}),t},toArray:function(e){return ie(e,function(e){return e})||[]},only:function(e){if(!O(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=j,e.Component=y,e.Fragment=r,e.Profiler=a,e.PureComponent=x,e.StrictMode=i,e.Suspense=l,e.ViewTransition=p,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=T,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return T.H.useMemoCache(e)}},e.addTransitionType=ce,e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=_({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!E.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return D(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)E.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return D(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=O,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:ae}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=se,e.unstable_useCacheRefresh=function(){return T.H.useCacheRefresh()},e.use=function(e){return T.H.use(e)},e.useActionState=function(e,t,n){return T.H.useActionState(e,t,n)},e.useCallback=function(e,t){return T.H.useCallback(e,t)},e.useContext=function(e){return T.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return T.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return T.H.useEffect(e,t)},e.useEffectEvent=function(e){return T.H.useEffectEvent(e)},e.useId=function(){return T.H.useId()},e.useImperativeHandle=function(e,t,n){return T.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return T.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return T.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return T.H.useMemo(e,t)},e.useOptimistic=function(e,t){return T.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return T.H.useReducer(e,t,n)},e.useRef=function(e){return T.H.useRef(e)},e.useState=function(e){return T.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return T.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return T.H.useTransition()},e.version=`19.3.0`})),f=s(((e,t)=>{t.exports=d()})),p=s((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m){if(n(c)!==null)m=!0,S||(S=!0,ee());else{var t=n(l);t!==null&&A(x,t.startTime-e)}}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&A(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?ee():S=!1}}}var ee;if(typeof y==`function`)ee=function(){y(D)};else if(typeof MessageChannel<`u`){var O=new MessageChannel,k=O.port2;O.port1.onmessage=D,ee=function(){k.postMessage(null)}}else ee=function(){_(D,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`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,A(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,ee()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),m=s(((e,t)=>{t.exports=p()})),h=s((e=>{var t=f();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`),o=Symbol.for(`react.recoverable`),s=Symbol.for(`react.optimistic_key`);function c(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:r===s?s:``+r,children:e,containerInfo:t,implementation:n}}var l=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.browser=function(e){return{$$typeof:o,_reason:e}},e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return c(e,t,null,r)},e.flushSync=function(e){var t=l.T,n=i.p;try{if(l.T=null,i.p=2,e)return e()}finally{l.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=u(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`){if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=u(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}}else t??i.d.M(e)}},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=u(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`){if(t){var n=u(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}else i.d.m(e)}},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return l.H.useFormState(e,t,n)},e.useFormStatus=function(){return l.H.useHostTransitionStatus()},e.version=`19.3.0`})),g=s(((e,t)=>{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=h()})),_=s((e=>{var t=m(),n=f(),r=g();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){for(var t=e,n=t;n&&!n.alternate;)t=n,t.flags&4098&&(e=t.return),n=t.return;for(;t.return;)t=t.return;return t.tag===3?e:null}function s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function u(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function d(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=d(e),t!==null)return t;e=e.sibling}return null}function p(e,t,n,r,i,a){for(;e!==null;){if((e.tag===5||e.tag===27||e.tag===6)&&n(e,r,i,a)||(e.tag!==22||e.memoizedState===null)&&(t||e.tag!==5&&e.tag!==27)&&p(e.child,t,n,r,i,a))return!0;e=e.sibling}return!1}function h(e){for(e=e.return;e!==null;){if(e.tag===3||e.tag===5||e.tag===27)return e;e=e.return}return null}function _(e){var t=!1;for(e=e.return;e!==null&&(e.tag===4&&(t=!0),e.tag!==3&&e.tag!==5&&e.tag!==27);)e=e.return;return t}function v(e){var t=[null,null],n=h(e);return n===null||y(t,e,n.child,{foundSelf:!1}),t}function y(e,t,n,r){for(;n!==null;){if(n===t)r.foundSelf=!0;else if(n.tag===5||n.tag===27||n.tag===6){if(r.foundSelf)return e[1]=n,!0;e[0]=n}else if((n.tag!==22||n.memoizedState===null)&&y(e,t,n.child,r))return!0;n=n.sibling}return!1}function b(e){switch(e.tag){case 5:case 27:case 6:return e.stateNode;case 3:return e.stateNode.containerInfo;default:throw Error(i(559))}}var x=null,S=null;function C(e,t,n){return e===n||e===t&&(x=e,!0)}function w(e,t,n){return e===n?(S=e,!1):e===t&&(S!==null&&(x=e),!0)}function T(e){if(e===null)return null;do e=e===null?null:e.return;while(e&&e.tag!==5&&e.tag!==27&&e.tag!==3);return e||null}function E(e,t,n){for(var r=0,i=e;i;i=n(i))r++;i=0;for(var a=t;a;a=n(a))i++;for(;0<r-i;)e=n(e),r--;for(;0<i-r;)t=n(t),i--;for(;r--;){if(e===t||t!==null&&e===t.alternate)return e;e=n(e),t=n(t)}return null}var D=Object.assign,ee=Symbol.for(`react.element`),O=Symbol.for(`react.transitional.element`),k=Symbol.for(`react.portal`),A=Symbol.for(`react.fragment`),te=Symbol.for(`react.strict_mode`),ne=Symbol.for(`react.profiler`),re=Symbol.for(`react.consumer`),ie=Symbol.for(`react.context`),ae=Symbol.for(`react.forward_ref`),oe=Symbol.for(`react.suspense`),se=Symbol.for(`react.suspense_list`),ce=Symbol.for(`react.memo`),j=Symbol.for(`react.lazy`),le=Symbol.for(`react.activity`),ue=Symbol.for(`react.legacy_hidden`),de=Symbol.for(`react.memo_cache_sentinel`),fe=Symbol.for(`react.view_transition`),pe=Symbol.for(`react.recoverable`),me=Symbol.iterator;function he(e){return typeof e!=`object`||!e?null:(e=me&&e[me]||e[`@@iterator`],typeof e==`function`?e:null)}var ge=Symbol.for(`react.client.reference`);function _e(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===ge?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case A:return`Fragment`;case ne:return`Profiler`;case te:return`StrictMode`;case oe:return`Suspense`;case se:return`SuspenseList`;case le:return`Activity`;case fe:return`ViewTransition`}if(typeof e==`object`)switch(e.$$typeof){case k:return`Portal`;case ie:return e.displayName||`Context`;case re:return(e._context.displayName||`Context`)+`.Consumer`;case ae:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case ce:return t=e.displayName||null,t===null?_e(e.type)||`Memo`:t;case j:t=e._payload,e=e._init;try{return _e(e(t))}catch{}}return null}var ve=Array.isArray,M=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,N=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ye={pending:!1,data:null,method:null,action:null},be=[],P=-1;function xe(e){return{current:e}}function Se(e){0>P||(e.current=be[P],be[P]=null,P--)}function Ce(e,t){P++,be[P]=e.current,e.current=t}var we=xe(null),Te=xe(null),Ee=xe(null),De=xe(null);function Oe(e,t){switch(Ce(Ee,t),Ce(Te,e),Ce(we,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?hp(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=hp(t),e=gp(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}Se(we),Ce(we,e)}function ke(){Se(we),Se(Te),Se(Ee)}function Ae(e){var t=e.memoizedState;t!==null&&(fh._currentValue=t.memoizedState,Ce(De,e)),t=we.current;var n=gp(t,e.type);t!==n&&(Ce(Te,e),Ce(we,n))}function je(e){Te.current===e&&(Se(we),Se(Te)),De.current===e&&(Se(De),fh._currentValue=ye)}var Me,Ne;function Pe(e){if(Me===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);Me=t&&t[1]||``,Ne=-1<e.stack.indexOf(`
8
+ at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
9
+ `+Me+e+Ne}var Fe=!1;function Ie(e,t){if(!e||Fe)return``;Fe=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}n=!1;try{var i=Object.getOwnPropertyDescriptor(e.prototype,`props`);Object.defineProperty(e.prototype,"props",{configurable:!0,set:function(){throw Error()}}),n=!0,new e}finally{n&&(i===void 0?delete e.prototype.props:Object.defineProperty(e.prototype,"props",i))}}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
10
+ `),l=s.split(`
11
+ `);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`
12
+ `+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{Fe=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?Pe(n):``}function Le(e,t){switch(e.tag){case 26:case 27:case 5:return Pe(e.type);case 16:return Pe(`Lazy`);case 13:return e.child!==t&&t!==null?Pe(`Suspense Fallback`):Pe(`Suspense`);case 19:return Pe(`SuspenseList`);case 0:case 15:return Ie(e.type,!1);case 11:return Ie(e.type.render,!1);case 1:return Ie(e.type,!0);case 31:return Pe(`Activity`);case 30:return Pe(`ViewTransition`);default:return``}}function Re(e){try{var t=``,n=null;do t+=Le(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
13
+ Error generating stack: `+e.message+`
14
+ `+e.stack}}var ze=Object.prototype.hasOwnProperty,Be=t.unstable_scheduleCallback,Ve=t.unstable_cancelCallback,He=t.unstable_shouldYield,Ue=t.unstable_requestPaint,We=t.unstable_now,Ge=t.unstable_getCurrentPriorityLevel,Ke=t.unstable_ImmediatePriority,qe=t.unstable_UserBlockingPriority,Je=t.unstable_NormalPriority,Ye=t.unstable_LowPriority,Xe=t.unstable_IdlePriority,Ze=t.log,Qe=t.unstable_setDisableYieldValue,$e=null,F=null;function et(e){if(typeof Ze==`function`&&Qe(e),F&&typeof F.setStrictMode==`function`)try{F.setStrictMode($e,e)}catch{}}var tt=Math.clz32?Math.clz32:it,nt=Math.log,rt=Math.LN2;function it(e){return e>>>=0,e===0?32:31-(nt(e)/rt|0)|0}var at=256,ot=262144,st=4194304;function I(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&-e;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function ct(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=I(n))):i=I(o):i=I(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=I(n))):i=I(o)):i=I(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function lt(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function ut(e,t){t&8&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0<n;){var r=31-tt(n),i=1<<r;t|=e[r],n&=~i}return t}function dt(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function ft(){var e=st;return st<<=1,!(st&62914560)&&(st=4194304),e}function pt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function mt(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function ht(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-tt(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&gt(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function gt(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-tt(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function _t(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-tt(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function vt(e,t){var n=t&-t;return n=n&42?1:yt(n),(n&(e.suspendedLanes|t))===0?n:0}function yt(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function bt(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function xt(){var e=N.p;return e===0?(e=window.event,e===void 0?32:Oh(e.type)):e}function St(e,t){var n=N.p;try{return N.p=e,t()}finally{N.p=n}}var Ct=Math.random().toString(36).slice(2),wt=`__reactFiber$`+Ct,Tt=`__reactProps$`+Ct,Et=`__reactContainer$`+Ct,Dt=`__reactEvents$`+Ct,Ot=`__reactListeners$`+Ct,kt=`__reactHandles$`+Ct,At=`__reactResources$`+Ct,jt=`__reactMarker$`+Ct,Mt=`__reactLoad$`+Ct;function Nt(e){delete e[wt],delete e[Tt],delete e[Ot],delete e[kt]}function Pt(e){var t;if(t=e[wt])return t;for(var n=e.parentNode;n;){if(t=n[Et]||n[wt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=_m(e);e!==null;){if(n=e[wt])return n;e=_m(e)}return t}e=n,n=e.parentNode}return null}function Ft(e){if(e=e[wt]||e[Et]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function It(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function Lt(e){var t=e[At];return t||=e[At]={hoistableStyles:new Map,hoistableScripts:new Map},t}function Rt(e){e[jt]=!0}function zt(e){e[Mt]=void 0}var Bt=new Set,Vt={};function Ht(e,t){Ut(e,t),Ut(e+`Capture`,t)}function Ut(e,t){for(Vt[e]=t,e=0;e<t.length;e++)Bt.add(t[e])}var Wt=RegExp(`^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$`),Gt={},Kt={};function qt(e){return ze.call(Kt,e)?!0:ze.call(Gt,e)?!1:Wt.test(e)?Kt[e]=!0:(Gt[e]=!0,!1)}var Jt=!1;function Yt(){var e=Jt;return Jt=!1,e}function Xt(e,t,n){if(qt(t)){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,n)}}}function Zt(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,n)}}function Qt(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,r)}}function $t(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function en(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function tn(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function nn(e){if(!e._valueTracker){var t=en(e)?`checked`:`value`;e._valueTracker=tn(e,t,``+e[t])}}function rn(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=en(e)?e.checked?`true`:`false`:e.value),e=r,e!==n&&(t.setValue(e),!0)}var an=/[\n"\\]/g;function on(e){return e.replace(an,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function sn(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+$t(t)):e.value!==``+$t(t)&&(e.value=``+$t(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):ln(e,$t(n)):o===`number`&&e.value==t?ln(e,$t(e.value)):ln(e,$t(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+$t(s):e.removeAttribute(`name`)}function cn(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){nn(e);return}n=n==null?``:``+$t(n),t=t==null?n:``+$t(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),nn(e)}function ln(e,t){e.defaultValue!==``+t&&(e.defaultValue=``+t)}function un(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+$t(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function dn(e,t,n){if(t!=null&&(t=``+$t(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+$t(n)}function fn(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(ve(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=$t(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),nn(e)}function pn(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var mn=new Set(`animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp`.split(` `));function hn(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||mn.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function gn(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``,Jt=!0);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&(hn(e,a,r),Jt=!0)}else for(var o in t)t.hasOwnProperty(o)&&hn(e,o,t[o])}function _n(e){if(e.indexOf(`-`)===-1)return!1;switch(e){case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:return!1;default:return!0}}var vn=new Map([[`acceptCharset`,`accept-charset`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`],[`crossOrigin`,`crossorigin`],[`accentHeight`,`accent-height`],[`alignmentBaseline`,`alignment-baseline`],[`arabicForm`,`arabic-form`],[`baselineShift`,`baseline-shift`],[`capHeight`,`cap-height`],[`clipPath`,`clip-path`],[`clipRule`,`clip-rule`],[`colorInterpolation`,`color-interpolation`],[`colorInterpolationFilters`,`color-interpolation-filters`],[`colorProfile`,`color-profile`],[`colorRendering`,`color-rendering`],[`dominantBaseline`,`dominant-baseline`],[`enableBackground`,`enable-background`],[`fillOpacity`,`fill-opacity`],[`fillRule`,`fill-rule`],[`floodColor`,`flood-color`],[`floodOpacity`,`flood-opacity`],[`fontFamily`,`font-family`],[`fontSize`,`font-size`],[`fontSizeAdjust`,`font-size-adjust`],[`fontStretch`,`font-stretch`],[`fontStyle`,`font-style`],[`fontVariant`,`font-variant`],[`fontWeight`,`font-weight`],[`glyphName`,`glyph-name`],[`glyphOrientationHorizontal`,`glyph-orientation-horizontal`],[`glyphOrientationVertical`,`glyph-orientation-vertical`],[`horizAdvX`,`horiz-adv-x`],[`horizOriginX`,`horiz-origin-x`],[`imageRendering`,`image-rendering`],[`letterSpacing`,`letter-spacing`],[`lightingColor`,`lighting-color`],[`markerEnd`,`marker-end`],[`markerMid`,`marker-mid`],[`markerStart`,`marker-start`],[`maskType`,`mask-type`],[`overlinePosition`,`overline-position`],[`overlineThickness`,`overline-thickness`],[`paintOrder`,`paint-order`],[`panose-1`,`panose-1`],[`pointerEvents`,`pointer-events`],[`renderingIntent`,`rendering-intent`],[`shapeRendering`,`shape-rendering`],[`stopColor`,`stop-color`],[`stopOpacity`,`stop-opacity`],[`strikethroughPosition`,`strikethrough-position`],[`strikethroughThickness`,`strikethrough-thickness`],[`strokeDasharray`,`stroke-dasharray`],[`strokeDashoffset`,`stroke-dashoffset`],[`strokeLinecap`,`stroke-linecap`],[`strokeLinejoin`,`stroke-linejoin`],[`strokeMiterlimit`,`stroke-miterlimit`],[`strokeOpacity`,`stroke-opacity`],[`strokeWidth`,`stroke-width`],[`textAnchor`,`text-anchor`],[`textDecoration`,`text-decoration`],[`textRendering`,`text-rendering`],[`transformOrigin`,`transform-origin`],[`underlinePosition`,`underline-position`],[`underlineThickness`,`underline-thickness`],[`unicodeBidi`,`unicode-bidi`],[`unicodeRange`,`unicode-range`],[`unitsPerEm`,`units-per-em`],[`vAlphabetic`,`v-alphabetic`],[`vHanging`,`v-hanging`],[`vIdeographic`,`v-ideographic`],[`vMathematical`,`v-mathematical`],[`vectorEffect`,`vector-effect`],[`vertAdvY`,`vert-adv-y`],[`vertOriginX`,`vert-origin-x`],[`vertOriginY`,`vert-origin-y`],[`wordSpacing`,`word-spacing`],[`writingMode`,`writing-mode`],[`xmlnsXlink`,`xmlns:xlink`],[`xHeight`,`x-height`]]),yn=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function bn(e){return yn.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function xn(){}var Sn=null;function Cn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var wn=null,Tn=null;function En(e){var t=Ft(e);if(t&&(e=t.stateNode)){var n=e[Tt]||null;a:switch(e=t.stateNode,t.type){case`input`:if(sn(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+on(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[Tt]||null;if(!a)throw Error(i(90));sn(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&rn(r)}break a;case`textarea`:dn(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&un(e,!!n.multiple,t,!1)}}}var Dn=!1;function On(e,t,n){if(Dn)return e(t,n);Dn=!0;try{return e(t)}finally{if(Dn=!1,(wn!==null||Tn!==null)&&(Vd(),wn&&(t=wn,e=Tn,Tn=wn=null,En(t),e)))for(t=0;t<e.length;t++)En(e[t])}}function kn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[Tt]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=e!==`button`&&e!==`input`&&e!==`select`&&e!==`textarea`),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var An=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0,jn=!1;if(An)try{var Mn={};Object.defineProperty(Mn,"passive",{get:function(){jn=!0}}),window.addEventListener(`test`,Mn,Mn),window.removeEventListener(`test`,Mn,Mn)}catch{jn=!1}var Nn=null,Pn=null,Fn=null;function In(){if(Fn)return Fn;var e,t=Pn,n=t.length,r,i=`value`in Nn?Nn.value:Nn.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return Fn=i.slice(e,1<r?1-r:void 0)}function Ln(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Rn(){return!0}function zn(){return!1}function Bn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?Rn:zn,this.isPropagationStopped=zn,this}return D(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=Rn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=Rn)},persist:function(){},isPersistent:Rn}),t}var Vn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Hn=Bn(Vn),Un=D({},Vn,{view:0,detail:0}),Wn=Bn(Un),Gn,Kn,qn,Jn=D({},Un,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ar,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==qn&&(qn&&e.type===`mousemove`?(Gn=e.screenX-qn.screenX,Kn=e.screenY-qn.screenY):Kn=Gn=0,qn=e),Gn)},movementY:function(e){return`movementY`in e?e.movementY:Kn}}),Yn=Bn(Jn),Xn=Bn(D({},Jn,{dataTransfer:0})),Zn=Bn(D({},Un,{relatedTarget:0})),Qn=Bn(D({},Vn,{animationName:0,elapsedTime:0,pseudoElement:0})),$n=Bn(D({},Vn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),er=Bn(D({},Vn,{data:0})),tr={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},nr={8:`Backspace`,9:`Tab`,12:`Clear`,13:`Enter`,16:`Shift`,17:`Control`,18:`Alt`,19:`Pause`,20:`CapsLock`,27:`Escape`,32:` `,33:`PageUp`,34:`PageDown`,35:`End`,36:`Home`,37:`ArrowLeft`,38:`ArrowUp`,39:`ArrowRight`,40:`ArrowDown`,45:`Insert`,46:`Delete`,112:`F1`,113:`F2`,114:`F3`,115:`F4`,116:`F5`,117:`F6`,118:`F7`,119:`F8`,120:`F9`,121:`F10`,122:`F11`,123:`F12`,144:`NumLock`,145:`ScrollLock`,224:`Meta`},rr={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function ir(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=rr[e])?!!t[e]:!1}function ar(){return ir}var or=Bn(D({},Un,{key:function(e){if(e.key){var t=tr[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=Ln(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?nr[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ar,charCode:function(e){return e.type===`keypress`?Ln(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?Ln(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),sr=Bn(D({},Jn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),cr=Bn(D({},Vn,{submitter:0})),lr=Bn(D({},Un,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ar})),ur=Bn(D({},Vn,{propertyName:0,elapsedTime:0,pseudoElement:0})),dr=Bn(D({},Jn,{deltaX:function(e){return`deltaX`in e?e.deltaX:`wheelDeltaX`in e?-e.wheelDeltaX:0},deltaY:function(e){return`deltaY`in e?e.deltaY:`wheelDeltaY`in e?-e.wheelDeltaY:`wheelDelta`in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),fr=Bn(D({},Vn,{newState:0,oldState:0,source:0})),pr=[9,13,27,32],mr=An&&`CompositionEvent`in window,hr=null;An&&`documentMode`in document&&(hr=document.documentMode);var gr=An&&`TextEvent`in window&&!hr,_r=An&&(!mr||hr&&8<hr&&11>=hr),vr=` `,yr=!1;function br(e,t){switch(e){case`keyup`:return pr.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function xr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var Sr=!1;function Cr(e,t){switch(e){case`compositionend`:return xr(t);case`keypress`:return t.which===32?(yr=!0,vr):null;case`textInput`:return e=t.data,e===vr&&yr?null:e;default:return null}}function wr(e,t){if(Sr)return e===`compositionend`||!mr&&br(e,t)?(e=In(),Fn=Pn=Nn=null,Sr=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return _r&&t.locale!==`ko`?null:t.data;default:return null}}var Tr={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Er(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!Tr[e.type]:t===`textarea`}function Dr(e,t,n,r){wn?Tn?Tn.push(r):Tn=[r]:wn=r,t=Qf(t,`onChange`),0<t.length&&(n=new Hn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var Or=null,kr=null;function Ar(e){Wf(e,0)}function jr(e){if(rn(It(e)))return e}function Mr(e,t){if(e===`change`)return t}var Nr=!1;if(An){var Pr;if(An){var Fr=`oninput`in document;if(!Fr){var Ir=document.createElement(`div`);Ir.setAttribute(`oninput`,`return;`),Fr=typeof Ir.oninput==`function`}Pr=Fr}else Pr=!1;Nr=Pr&&(!document.documentMode||9<document.documentMode)}function Lr(){Or&&(Or.detachEvent(`onpropertychange`,Rr),kr=Or=null)}function Rr(e){if(e.propertyName===`value`&&jr(kr)){var t=[];Dr(t,kr,e,Cn(e)),On(Ar,t)}}function zr(e,t,n){e===`focusin`?(Lr(),Or=t,kr=n,Or.attachEvent(`onpropertychange`,Rr)):e===`focusout`&&Lr()}function Br(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return jr(kr)}function Vr(e,t){if(e===`click`)return jr(t)}function Hr(e,t){if(e===`input`||e===`change`)return jr(t)}function Ur(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Wr=typeof Object.is==`function`?Object.is:Ur;function Gr(e,t){if(Wr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!ze.call(t,i)||!Wr(e[i],t[i]))return!1}return!0}function Kr(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}function qr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Jr(e,t){var n=qr(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=qr(n)}}function Yr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Yr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Xr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Kr(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Kr(e.document)}return t}function Zr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var Qr=An&&`documentMode`in document&&11>=document.documentMode,$r=null,ei=null,ti=null,ni=!1;function ri(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ni||$r==null||$r!==Kr(r)||(r=$r,`selectionStart`in r&&Zr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),ti&&Gr(ti,r)||(ti=r,r=Qf(ei,`onSelect`),0<r.length&&(t=new Hn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=$r)))}function ii(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var ai={animationend:ii(`Animation`,`AnimationEnd`),animationiteration:ii(`Animation`,`AnimationIteration`),animationstart:ii(`Animation`,`AnimationStart`),transitionrun:ii(`Transition`,`TransitionRun`),transitionstart:ii(`Transition`,`TransitionStart`),transitioncancel:ii(`Transition`,`TransitionCancel`),transitionend:ii(`Transition`,`TransitionEnd`)},oi={},si={};An&&(si=document.createElement(`div`).style,`AnimationEvent`in window||(delete ai.animationend.animation,delete ai.animationiteration.animation,delete ai.animationstart.animation),`TransitionEvent`in window||delete ai.transitionend.transition);function ci(e){if(oi[e])return oi[e];if(!ai[e])return e;var t=ai[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in si)return oi[e]=t[n];return e}var li=ci(`animationend`),ui=ci(`animationiteration`),di=ci(`animationstart`),fi=ci(`transitionrun`),pi=ci(`transitionstart`),mi=ci(`transitioncancel`),hi=ci(`transitionend`),gi=new Map,_i=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error fullscreenChange fullscreenError gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);_i.push(`scrollEnd`);function vi(e,t){gi.set(e,t),Ht(t,[e])}var yi=0;function bi(e,t){if(e.name!=null&&e.name!==`auto`)return e.name;if(t.autoName!==null)return t.autoName;e=Sd.identifierPrefix;var n=yi++;return e=`_`+e+`t_`+n.toString(32)+`_`,t.autoName=e}function xi(e){if(e==null||typeof e==`string`)return e;var t=null,n=Ad;if(n!==null)for(var r=0;r<n.length;r++){var i=e[n[r]];if(i!=null){if(i===`none`)return`none`;t=t==null?i:t+(` `+i)}}return t??e.default}function Si(e,t){return e=xi(e),t=xi(t),t==null?e===`auto`?null:e:t===`auto`?null:t}var Ci=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},wi=[],Ti=0,Ei=0;function Di(){for(var e=Ti,t=Ei=Ti=0;t<e;){var n=wi[t];wi[t++]=null;var r=wi[t];wi[t++]=null;var i=wi[t];wi[t++]=null;var a=wi[t];if(wi[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&ji(n,i,a)}}function Oi(e,t,n,r){wi[Ti++]=e,wi[Ti++]=t,wi[Ti++]=n,wi[Ti++]=r,Ei|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function ki(e,t,n,r){return Oi(e,t,n,r),Mi(e)}function Ai(e,t){return Oi(e,null,null,t),Mi(e)}function ji(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-tt(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function Mi(e){if(50<jd)throw jd=0,Md=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Ni={};function Pi(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Fi(e,t,n,r){return new Pi(e,t,n,r)}function Ii(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Li(e,t){var n=e.alternate;return n===null?(n=Fi(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&1206910976,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function Ri(e,t){e.flags&=1206910978;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function zi(e,t,n,r,a,o){var s=0;if(r=e,typeof r==`function`)Ii(r)&&(s=1);else if(typeof r==`string`)s=Qm(e,n,we.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(r){case le:return e=Fi(31,n,t,a),e.elementType=le,e.lanes=o,e;case A:return Bi(n.children,a,o,t);case te:s=8,a|=24;break;case ne:return e=Fi(12,n,t,a|2),e.elementType=ne,e.lanes=o,e;case oe:return e=Fi(13,n,t,a),e.elementType=oe,e.lanes=o,e;case se:return e=Fi(19,n,t,a),e.elementType=se,e.lanes=o,e;case ue:case fe:return e=a|32,e=Fi(30,n,t,e),e.elementType=fe,e.lanes=o,e.stateNode={autoName:null,paired:null,clones:null,ref:null},e;default:if(typeof r==`object`&&r)switch(r.$$typeof){case ie:s=10;break a;case re:s=9;break a;case ae:s=11;break a;case ce:s=14;break a;case j:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=Fi(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function Bi(e,t,n,r){return e=Fi(7,e,r,t),e.lanes=n,e}function Vi(e,t,n){return e=Fi(6,e,null,t),e.lanes=n,e}function Hi(e){var t=Fi(18,null,null,0);return t.stateNode=e,t}function Ui(e,t,n){return t=Fi(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Wi=new WeakMap;function Gi(e,t){if(typeof e==`object`&&e){var n=Wi.get(e);return n===void 0?(t={value:e,source:t,stack:Re(t)},Wi.set(e,t),t):n}return{value:e,source:t,stack:Re(t)}}var Ki=[],qi=0,Ji=null,Yi=0,Xi=[],Zi=0,Qi=null,$i=1,ea=``;function ta(e,t){Ki[qi++]=Yi,Ki[qi++]=Ji,Ji=e,Yi=t}function na(e,t,n){Xi[Zi++]=$i,Xi[Zi++]=ea,Xi[Zi++]=Qi,Qi=e;var r=$i;e=ea;var i=32-tt(r)-1;r&=~(1<<i),n+=1;var a=32-tt(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,$i=1<<32-tt(t)+i|n<<i|r,ea=a+e}else $i=1<<a|n<<i|r,ea=e}function ra(e){e.return!==null&&(ta(e,1),na(e,1,0))}function ia(e){for(;e===Ji;)Ji=Ki[--qi],Ki[qi]=null,Yi=Ki[--qi],Ki[qi]=null;for(;e===Qi;)Qi=Xi[--Zi],Xi[Zi]=null,ea=Xi[--Zi],Xi[Zi]=null,$i=Xi[--Zi],Xi[Zi]=null}function aa(e,t){Xi[Zi++]=$i,Xi[Zi++]=ea,Xi[Zi++]=Qi,$i=t.id,ea=t.overflow,Qi=e}var oa=null,sa=null,ca=!1,la=null,ua=!1,da=Error(i(519));function fa(e){throw va(Gi(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),da}function pa(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[wt]=e,t[Tt]=r,n){case`dialog`:Gf(`cancel`,t),Gf(`close`,t);break;case`iframe`:case`object`:case`embed`:Gf(`load`,t);break;case`video`:case`audio`:for(n=0;n<Hf.length;n++)Gf(Hf[n],t);break;case`source`:Gf(`error`,t);break;case`img`:case`image`:case`link`:Gf(`error`,t),Gf(`load`,t);break;case`details`:Gf(`toggle`,t);break;case`input`:Gf(`invalid`,t),cn(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:Gf(`invalid`,t);break;case`textarea`:Gf(`invalid`,t),fn(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||ip(t.textContent,n)?(r.popover!=null&&(Gf(`beforetoggle`,t),Gf(`toggle`,t)),r.onScroll!=null&&Gf(`scroll`,t),r.onScrollEnd!=null&&Gf(`scrollend`,t),r.onClick!=null&&(t.onclick=xn),t=!0):t=!1,t||fa(e,!0)}function ma(e){for(oa=e.return;oa;)switch(oa.tag){case 5:case 31:case 13:ua=!1;return;case 27:case 3:ua=!0;return;default:oa=oa.return}}function ha(e){if(e!==oa)return!1;if(!ca)return ma(e),ca=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=n===`form`||n===`button`||vp(e.type,e.memoizedProps)),n=!n),n&&sa&&fa(e),ma(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));sa=gm(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));sa=gm(e)}else t===27?(t=sa,Dp(e.type)?(e=hm,hm=null,sa=e):sa=t):sa=oa?mm(e.stateNode.nextSibling):null;return!0}function ga(){sa=oa=null,ca=!1}function _a(){var e=la;return e!==null&&(md===null?md=e:md.push.apply(md,e),la=null),e}function va(e){la===null?la=[e]:la.push(e)}var ya=xe(null),ba=null,xa=null;function Sa(e,t,n){Ce(ya,t._currentValue),t._currentValue=n}function Ca(e){e._currentValue=ya.current,Se(ya)}function wa(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function Ta(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var o=a.dependencies;if(o!==null){var s=a.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=a;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),wa(o.return,n,e),r||(s=null);break a}o=c.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(i(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),wa(s,n,e),s=null}else a.tag===13&&a.memoizedState!==null&&a.memoizedState.dehydrated===null?(a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),wa(a.return,n,e),s=a.child,s=s===null?null:s.sibling):s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function Ea(e,t,n,r){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(i(387));if(s=s.memoizedProps,s!==null){var c=a.type;Wr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===De.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[fh]:e.push(fh))}a=a.return}return e!==null&&Ta(t,e,n,r),t.flags|=262144,e!==null}function Da(e){for(e=e.firstContext;e!==null;){if(!Wr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Oa(e){ba=e,xa=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function ka(e){return ja(ba,e)}function Aa(e,t){return ba===null&&Oa(e),ja(e,t)}function ja(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},xa===null){if(e===null)throw Error(i(308));xa=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else xa=xa.next=t;return n}var Ma=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},Na=t.unstable_scheduleCallback,Pa=t.unstable_NormalPriority,Fa={$$typeof:ie,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ia(){return{controller:new Ma,data:new Map,refCount:0}}function La(e){e.refCount--,e.refCount===0&&Na(Pa,function(){e.controller.abort()})}function Ra(e,t){if(e.pendingLanes&4194048){var n=e.transitionTypes;for(n===null&&(n=e.transitionTypes=[]),e=0;e<t.length;e++){var r=t[e];n.indexOf(r)===-1&&n.push(r)}}}var za=null;function Ba(e){var t=e.transitionTypes;return e.transitionTypes=null,t}var Va=null,Ha=0,Ua=0,Wa=null;function Ga(e,t){if(Va===null){var n=Va=[];Ha=0,Ua=Lf(),Wa={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return Ha++,t.then(Ka,Ka),t}function Ka(){if(--Ha===0&&(za=null,Va!==null)){Wa!==null&&(Wa.status=`fulfilled`);var e=Va;Va=null,Ua=0,Wa=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function qa(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var Ja=M.S;M.S=function(e,t){if(_d=We(),typeof t==`object`&&t&&typeof t.then==`function`&&Ga(e,t),za!==null)for(var n=Cf;n!==null;)Ra(n,za),n=n.next;if(n=e.types,n!==null){for(var r=Cf;r!==null;)Ra(r,n),r=r.next;if(Ua!==0){r=za,r===null&&(r=za=[]);for(var i=0;i<n.length;i++){var a=n[i];r.indexOf(a)===-1&&r.push(a)}}}Ja!==null&&Ja(e,t)};var Ya=xe(null);function Xa(){var e=Ya.current;return e===null?Qu.pooledCache:e}function Za(e,t){t===null?Ce(Ya,Ya.current):Ce(Ya,t.pool)}function Qa(){var e=Xa();return e===null?null:{parent:Fa._currentValue,pool:e}}var $a=Error(i(460)),eo=Error(i(474)),to=Error(i(542)),no={then:function(){}};function ro(e){return e=e.status,e===`fulfilled`||e===`rejected`}function io(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(xn,xn),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,co(e),e===void 0&&!(`reason`in t)?Error(i(600)):e;default:if(typeof t.status==`string`)t.then(xn,xn);else{if(e=Qu,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,co(e),e}throw oo=t,$a}}function ao(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(oo=e,$a):e}}var oo=null;function so(){if(oo===null)throw Error(i(459));var e=oo;return oo=null,e}function co(e){if(e===$a||e===to)throw Error(i(483))}var lo=null,uo=0;function fo(e){var t=uo;return uo+=1,lo===null&&(lo=[]),io(lo,e,t)}function po(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function mo(e,t){throw t.$$typeof===ee?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function ho(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function a(e,t){return e=Li(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=134217730,n):(r=r.index,r<n?(t.flags|=2,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=134217730),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=Vi(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===A?(e=d(e,t,n.props.children,r,n.key),po(e,n),e):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===j&&ao(i)===t.type)?(t=a(t,n.props),po(t,n),t.return=e,t):(t=zi(n.type,n.key,n.props,null,e.mode,r),po(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=Ui(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=Bi(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=Vi(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case O:return n=zi(t.type,t.key,t.props,null,e.mode,n),po(n,t),n.return=e,n;case k:return t=Ui(t,e.mode,n),t.return=e,t;case j:return t=ao(t),f(e,t,n)}if(ve(t)||he(t))return t=Bi(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,fo(t),n);if(t.$$typeof===ie)return f(e,Aa(e,t),n);mo(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case O:return n.key===i?l(e,t,n,r):null;case k:return n.key===i?u(e,t,n,r):null;case j:return n=ao(n),p(e,t,n,r)}if(ve(n)||he(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,fo(n),r);if(n.$$typeof===ie)return p(e,t,Aa(e,n),r);mo(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case O:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case k:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case j:return r=ao(r),m(e,t,n,r,i)}if(ve(r)||he(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,fo(r),i);if(r.$$typeof===ie)return m(e,t,n,Aa(t,r),i);mo(t,r)}return null}function h(i,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),ca&&ta(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return ca&&ta(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&(_=g.alternate,_!==null&&d.delete(_.key===null?h:_.key)),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),ca&&ta(i,h),l}function g(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),ca&&ta(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return ca&&ta(a,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&(_=v.alternate,_!==null&&h.delete(_.key===null?g:_.key)),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),ca&&ta(a,g),u}function _(e,r,o,c){if(typeof o==`object`&&o&&o.type===A&&o.key===null&&o.props.ref===void 0&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case O:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===A){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),po(c,o),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===j&&ao(l)===r.type){n(e,r.sibling),c=a(r,o.props),po(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===A?(c=Bi(o.props.children,e.mode,c,o.key),po(c,o),c.return=e,e=c):(c=zi(o.type,o.key,o.props,null,e.mode,c),po(c,o),c.return=e,e=c)}return s(e);case k:a:{for(l=o.key;r!==null;){if(r.key===l){if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}c=Ui(o,e.mode,c),c.return=e,e=c}return s(e);case j:return o=ao(o),_(e,r,o,c)}if(ve(o))return h(e,r,o,c);if(he(o)){if(l=he(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return _(e,r,fo(o),c);if(o.$$typeof===ie)return _(e,r,Aa(e,o),c);mo(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=Vi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{uo=0;var i=_(e,t,n,r);return lo=null,i}catch(t){if(t===$a||t===to)throw t;var a=Fi(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var go=ho(!0),_o=ho(!1),vo=!1;function yo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function bo(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function xo(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function So(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Zu&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=Mi(e),ji(e,null,n),t}return Oi(e,r,t,n),Mi(e)}function Co(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,_t(e,n)}}function wo(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var To=!1;function Eo(){if(To){var e=Wa;if(e!==null)throw e}}function Do(e,t,n,r){To=!1;var i=e.updateQueue;vo=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,p=f!==s.lane;if(p?(ed&f)===f:(r&f)===f){f!==0&&f===Ua&&(To=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var m=e,h=s;f=t;var g=n;switch(h.tag){case 1:if(m=h.payload,typeof m==`function`){d=m.call(g,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=h.payload,f=typeof m==`function`?m.call(g,d,f):m,f==null)break a;d=D({},d,f);break a;case 2:vo=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),cd|=o,e.lanes=o,e.memoizedState=d}}function Oo(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function ko(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Oo(n[e],t)}var Ao=xe(null),jo=xe(0);function Mo(e,t){e=od,Ce(jo,e),Ce(Ao,t),od=e|t.baseLanes}function No(){Ce(jo,od),Ce(Ao,Ao.current)}function Po(){od=jo.current,Se(Ao),Se(jo)}var Fo=xe(null),Io=null;function Lo(e){var t=e.alternate;Ce(Ho,Ho.current&1),Ce(Fo,e),Io===null&&(t===null||Ao.current!==null||t.memoizedState!==null)&&(Io=e)}function Ro(e){Ce(Ho,Ho.current),Ce(Fo,e),Io===null&&(Io=e)}function zo(e){e.tag===22?(Ce(Ho,Ho.current),Ce(Fo,e),Io===null&&(Io=e)):Bo()}function Bo(){Ce(Ho,Ho.current),Ce(Fo,Fo.current)}function Vo(e){Se(Fo),Io===e&&(Io=null),Se(Ho)}var Ho=xe(0);function Uo(e,t){Ce(Fo,Fo.current),Ce(Ho,t)}function Wo(e){Se(Ho),Se(Fo),Io===e&&(Io=null)}function Go(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||dm(n)||fm(n)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==`independent`){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Ko=0,qo=null,Jo=null,Yo=null,Xo=!1,Zo=!1,Qo=!1,$o=0,es=0,ts=null,ns=0;function rs(){throw Error(i(321))}function is(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Wr(e[n],t[n]))return!1;return!0}function as(e,t,n,r,i,a){return Ko=a,qo=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,M.H=e===null||e.memoizedState===null?xc:Sc,Qo=!1,a=n(r,i),Qo=!1,Zo&&(a=ss(t,n,r,i)),os(e),a}function os(e){M.H=bc;var t=Jo!==null&&Jo.next!==null;if(Ko=0,Yo=Jo=qo=null,Xo=!1,es=0,ts=null,t)throw Error(i(300));e===null||V||(e=e.dependencies,e!==null&&Da(e)&&(V=!0))}function ss(e,t,n,r){qo=e;var a=0;do{if(Zo&&(ts=null),es=0,Zo=!1,25<=a)throw Error(i(301));if(a+=1,Yo=Jo=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}M.H=R,o=t(n,r)}while(Zo);return o}function cs(){var e=M.H,t=e.useState()[0];return t=typeof t.then==`function`?hs(t):t,e=e.useState()[0],(Jo===null?null:Jo.memoizedState)!==e&&(qo.flags|=1024),t}function ls(){var e=$o!==0;return $o=0,e}function us(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function ds(e){if(Xo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Xo=!1}Ko=0,Yo=Jo=qo=null,Zo=!1,es=$o=0,ts=null}function fs(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Yo===null?qo.memoizedState=Yo=e:Yo=Yo.next=e,Yo}function ps(){if(Jo===null){var e=qo.alternate;e=e===null?null:e.memoizedState}else e=Jo.next;var t=Yo===null?qo.memoizedState:Yo.next;if(t!==null)Yo=t,Jo=e;else{if(e===null)throw qo.alternate===null?Error(i(467)):Error(i(310));Jo=e,e={memoizedState:Jo.memoizedState,baseState:Jo.baseState,baseQueue:Jo.baseQueue,queue:Jo.queue,next:null},Yo===null?qo.memoizedState=Yo=e:Yo=Yo.next=e}return Yo}function ms(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function hs(e){var t=es;return es+=1,ts===null&&(ts=[]),e=io(ts,e,t),t=qo,(Yo===null?t.memoizedState:Yo.next)===null&&(t=t.alternate,M.H=t===null||t.memoizedState===null?xc:Sc),e}function gs(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return hs(e);if(e.$$typeof===pe)return;if(e.$$typeof===ie)return ka(e)}throw Error(i(438,String(e)))}function _s(e){var t=null,n=qo.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=qo.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=ms(),qo.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=de;return t.index++,n}function vs(e,t){return typeof t==`function`?t(e):t}function ys(e){return bs(ps(),Jo,e)}function bs(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(Ko&f)===f:(ed&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===Ua&&(d=!0);else if((Ko&p)===p){u=u.next,p===Ua&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,qo.lanes|=p,cd|=p;f=u.action,Qo&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,qo.lanes|=f,cd|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!Wr(o,e.memoizedState)&&(V=!0,d&&(n=Wa,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function xs(e){var t=ps(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);Wr(o,t.memoizedState)||(V=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Ss(e,t,n){var r=qo,a=ps(),o=ca;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!Wr((Jo||a).memoizedState,n);if(s&&(a.memoizedState=n,V=!0),a=a.queue,qs(Ts.bind(null,r,a,e),[e]),e=a.getSnapshot!==t||s||Yo!==null&&!!(Yo.memoizedState.tag&1),Hs(e?9:8,{destroy:void 0},ws.bind(null,r,a,n,t),null),e){if(r.flags|=2048,Qu===null)throw Error(i(349));o||Ko&127||Cs(r,t,n)}return n}function Cs(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=qo.updateQueue,t===null?(t=ms(),qo.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function ws(e,t,n,r){t.value=n,t.getSnapshot=r,Es(t)&&Ds(e)}function Ts(e,t,n){return n(function(){Es(t)&&Ds(e)})}function Es(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Wr(e,n)}catch{return!0}}function Ds(e){var t=Ai(e,2);t!==null&&Id(t,e,2)}function Os(e){var t=fs();if(typeof e==`function`){var n=e;if(e=n(),Qo){et(!0);try{n()}finally{et(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:vs,lastRenderedState:e},t}function ks(e,t,n,r){return e.baseState=n,bs(e,Jo,typeof r==`function`?r:vs)}function As(e,t,n,r,a){if(_c(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};M.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,js(t,o)):(o.next=n.next,t.pending=n.next=o)}}function js(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=M.T,o={};o.types=a===null?null:a.types,M.T=o;try{var s=n(i,r),c=M.S;c!==null&&c(o,s),Ms(e,t,s)}catch(n){Ps(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),M.T=a}}else try{a=n(i,r),Ms(e,t,a)}catch(n){Ps(e,t,n)}}function Ms(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){Ns(e,t,n)},function(n){return Ps(e,t,n)}):Ns(e,t,n)}function Ns(e,t,n){t.status=`fulfilled`,t.value=n,Fs(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,js(e,n)))}function Ps(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,Fs(t),t=t.next;while(t!==r)}e.action=null}function Fs(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Is(e,t){return t}function Ls(e,t){if(ca){var n=Qu.formState;if(n!==null){a:{var r=qo;if(ca){if(sa){b:{for(var i=sa,a=ua;i.nodeType!==8;){if(!a){i=null;break b}if(i=mm(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){sa=mm(i.nextSibling),r=i.data===`F!`;break a}}fa(r)}r=!1}r&&(t=n[0])}}return n=fs(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Is,lastRenderedState:t},n.queue=r,n=mc.bind(null,qo,r),r.dispatch=n,r=Os(!1),a=gc.bind(null,qo,!1,r.queue),r=fs(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=As.bind(null,qo,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function Rs(e){return zs(ps(),Jo,e)}function zs(e,t,n){if(t=bs(e,t,Is)[0],e=ys(vs)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=hs(t)}catch(e){throw e===$a?to:e}else r=t;t=ps();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(qo.flags|=2048,Hs(9,{destroy:void 0},Bs.bind(null,i,n),null)),[r,a,e]}function Bs(e,t){e.action=t}function Vs(e){var t=ps(),n=Jo;if(n!==null)return zs(t,n,e);ps(),t=t.memoizedState,n=ps();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function Hs(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=qo.updateQueue,t===null&&(t=ms(),qo.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Us(){return ps().memoizedState}function Ws(e,t,n,r){var i=fs();qo.flags|=e,i.memoizedState=Hs(1|t,{destroy:void 0},n,r===void 0?null:r)}function Gs(e,t,n,r){var i=ps();r=r===void 0?null:r;var a=i.memoizedState.inst;Jo!==null&&r!==null&&is(r,Jo.memoizedState.deps)?i.memoizedState=Hs(t,a,n,r):(qo.flags|=e,i.memoizedState=Hs(1|t,a,n,r))}function Ks(e,t){Ws(8390656,8,e,t)}function qs(e,t){Gs(2048,8,e,t)}function Js(e){qo.flags|=4;var t=qo.updateQueue;if(t===null)t=ms(),qo.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function Ys(e){var t=ps().memoizedState;return Js({ref:t,nextImpl:e}),function(){if(Zu&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function L(e,t){return Gs(4,2,e,t)}function Xs(e,t){return Gs(4,4,e,t)}function Zs(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Qs(e,t,n){n=n==null?null:n.concat([e]),Gs(4,4,Zs.bind(null,t,e),n)}function $s(){}function ec(e,t){var n=ps();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&is(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function tc(e,t){var n=ps();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&is(t,r[1]))return r[0];if(r=e(),Qo){et(!0);try{e()}finally{et(!1)}}return n.memoizedState=[r,t],r}function nc(e,t,n){return n===void 0||Ko&1073741824&&!(ed&261930)?e.memoizedState=t:(e.memoizedState=n,e=Pd(),qo.lanes|=e,cd|=e,n)}function rc(e,t,n,r){return Wr(n,t)?n:Ao.current===null?!(Ko&106)||Ko&1073741824&&!(ed&261930)?(V=!0,e.memoizedState=n):(e=Pd(),qo.lanes|=e,cd|=e,t):(e=nc(e,n,r),Wr(e,t)||(V=!0),e)}function ic(e,t,n,r,i){var a=N.p;N.p=a!==0&&8>a?a:8;var o=M.T,s={};s.types=o===null?null:o.types,M.T=s,gc(e,!1,t,n);try{var c=i(),l=M.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?hc(e,t,qa(c,r),Nd(e)):hc(e,t,r,Nd(e))}catch(n){hc(e,t,{then:function(){},status:`rejected`,reason:n},Nd())}finally{N.p=a,o!==null&&s.types!==null&&(o.types=s.types),M.T=o}}function ac(){}function oc(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=sc(e).queue;ic(e,a,t,ye,n===null?ac:function(){return cc(e),n(r)})}function sc(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ye,baseState:ye,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:vs,lastRenderedState:ye},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:vs,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function cc(e){var t=sc(e);t.next===null&&(t=e.alternate.memoizedState),hc(e,t.next.queue,{},Nd())}function lc(){return ka(fh)}function uc(){return ps().memoizedState}function dc(){return ps().memoizedState}function fc(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Nd();e=xo(n);var r=So(t,e,n);r!==null&&(Id(r,t,n),Co(r,t,n)),t={cache:Ia()},e.payload=t;return}t=t.return}}function pc(e,t,n){var r=Nd();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},_c(e)?vc(t,n):(n=ki(e,t,n,r),n!==null&&(Id(n,e,r),yc(n,t,r)))}function mc(e,t,n){hc(e,t,n,Nd())}function hc(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(_c(e))vc(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Wr(s,o))return Oi(e,t,i,0),Qu===null&&Di(),!1}catch{}if(n=ki(e,t,i,r),n!==null)return Id(n,e,r),yc(n,t,r),!0}return!1}function gc(e,t,n,r){if(r={lane:2,revertLane:Lf(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},_c(e)){if(t)throw Error(i(479))}else t=ki(e,n,r,2),t!==null&&Id(t,e,2)}function _c(e){var t=e.alternate;return e===qo||t!==null&&t===qo}function vc(e,t){Zo=Xo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function yc(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,_t(e,n)}}var bc={readContext:ka,use:gs,useCallback:rs,useContext:rs,useEffect:rs,useImperativeHandle:rs,useLayoutEffect:rs,useInsertionEffect:rs,useMemo:rs,useReducer:rs,useRef:rs,useState:rs,useDebugValue:rs,useDeferredValue:rs,useTransition:rs,useSyncExternalStore:rs,useId:rs,useHostTransitionStatus:rs,useFormState:rs,useActionState:rs,useOptimistic:rs,useMemoCache:rs,useCacheRefresh:rs,useEffectEvent:rs},xc={readContext:ka,use:gs,useCallback:function(e,t){return fs().memoizedState=[e,t===void 0?null:t],e},useContext:ka,useEffect:Ks,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),Ws(4194308,4,Zs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ws(4194308,4,e,t)},useInsertionEffect:function(e,t){Ws(4,2,e,t)},useMemo:function(e,t){var n=fs();t=t===void 0?null:t;var r=e();if(Qo){et(!0);try{e()}finally{et(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=fs();if(n!==void 0){var i=n(t);if(Qo){et(!0);try{n(t)}finally{et(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=pc.bind(null,qo,e),[r.memoizedState,e]},useRef:function(e){var t=fs();return e={current:e},t.memoizedState=e},useState:function(e){e=Os(e);var t=e.queue,n=mc.bind(null,qo,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:$s,useDeferredValue:function(e,t){return nc(fs(),e,t)},useTransition:function(){var e=Os(!1);return e=ic.bind(null,qo,e.queue,!0,!1),fs().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=qo,a=fs();if(ca){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Qu===null)throw Error(i(349));ed&127||Cs(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,Ks(Ts.bind(null,r,o,e),[e]),r.flags|=2048,Hs(9,{destroy:void 0},ws.bind(null,r,o,n,t),null),n},useId:function(){var e=fs(),t=Qu.identifierPrefix;if(ca){var n=ea,r=$i;n=(r&~(1<<32-tt(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=$o++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=ns++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:lc,useFormState:Ls,useActionState:Ls,useOptimistic:function(e){var t=fs();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=gc.bind(null,qo,!0,n),n.dispatch=t,[e,t]},useMemoCache:_s,useCacheRefresh:function(){return fs().memoizedState=fc.bind(null,qo)},useEffectEvent:function(e){var t=fs(),n={impl:e};return t.memoizedState=n,function(){if(Zu&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},Sc={readContext:ka,use:gs,useCallback:ec,useContext:ka,useEffect:qs,useImperativeHandle:Qs,useInsertionEffect:L,useLayoutEffect:Xs,useMemo:tc,useReducer:ys,useRef:Us,useState:function(){return ys(vs)},useDebugValue:$s,useDeferredValue:function(e,t){return rc(ps(),Jo.memoizedState,e,t)},useTransition:function(){var e=ys(vs)[0],t=ps().memoizedState;return[typeof e==`boolean`?e:hs(e),t]},useSyncExternalStore:Ss,useId:uc,useHostTransitionStatus:lc,useFormState:Rs,useActionState:Rs,useOptimistic:function(e,t){return ks(ps(),Jo,e,t)},useMemoCache:_s,useCacheRefresh:dc,useEffectEvent:Ys},R={readContext:ka,use:gs,useCallback:ec,useContext:ka,useEffect:qs,useImperativeHandle:Qs,useInsertionEffect:L,useLayoutEffect:Xs,useMemo:tc,useReducer:xs,useRef:Us,useState:function(){return xs(vs)},useDebugValue:$s,useDeferredValue:function(e,t){var n=ps();return Jo===null?nc(n,e,t):rc(n,Jo.memoizedState,e,t)},useTransition:function(){var e=xs(vs)[0],t=ps().memoizedState;return[typeof e==`boolean`?e:hs(e),t]},useSyncExternalStore:Ss,useId:uc,useHostTransitionStatus:lc,useFormState:Vs,useActionState:Vs,useOptimistic:function(e,t){var n=ps();return Jo===null?(n.baseState=e,[e,n.queue.dispatch]):ks(n,Jo,e,t)},useMemoCache:_s,useCacheRefresh:dc,useEffectEvent:Ys};function Cc(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:D({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var wc={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Nd(),i=xo(r);i.payload=t,n!=null&&(i.callback=n),t=So(e,i,r),t!==null&&(Id(t,e,r),Co(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Nd(),i=xo(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=So(e,i,r),t!==null&&(Id(t,e,r),Co(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Nd(),r=xo(n);r.tag=2,t!=null&&(r.callback=t),t=So(e,r,n),t!==null&&(Id(t,e,n),Co(t,e,n))}};function Tc(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!Gr(n,r)||!Gr(i,a):!0}function z(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&wc.enqueueReplaceState(t,t.state,null)}function Ec(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=D({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function Dc(e){Ci(e)}function Oc(e){console.error(e)}function kc(e){Ci(e)}function Ac(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function jc(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function Mc(e,t,n){return n=xo(n),n.tag=3,n.payload={element:null},n.callback=function(){Ac(e,t)},n}function B(e){return e=xo(e),e.tag=3,e}function Nc(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){jc(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){jc(t,n,r),typeof i!=`function`&&(bd===null?bd=new Set([this]):bd.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function Pc(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&Ea(t,n,a,!0),n=Fo.current,n!==null){switch(n.tag){case 31:case 13:case 19:return Io===null?Jd():n.alternate===null&&sd===0&&(sd=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===no?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),_f(e,r,a)),!1;case 22:return n.flags|=65536,r===no?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),_f(e,r,a)),!1}throw Error(i(435,n.tag))}return _f(e,r,a),Jd(),!1}if(ca)return t=Fo.current,t===null?(r!==da&&(t=Error(i(423),{cause:r}),va(Gi(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=Gi(r,n),a=Mc(e.stateNode,r,a),wo(e,a),sd!==4&&(sd=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==da&&(e=Error(i(422),{cause:r}),va(Gi(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=Gi(o,n),pd===null?pd=[o]:pd.push(o),sd!==4&&(sd=2),t===null)return!0;r=Gi(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=Mc(n.stateNode,r,e),wo(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(bd===null||!bd.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=B(a),Nc(a,e,n,r),wo(n,a),!1;break;case 22:if(n.memoizedState!==null)return n.flags|=65536,!1}n=n.return}while(n!==null);return!1}var Fc=Error(i(461)),V=!1;function Ic(e,t,n,r){t.child=e===null?_o(t,null,n,r):go(t,e.child,n,r)}function H(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return Oa(t),r=as(e,t,n,o,a,i),s=ls(),e!==null&&!V?(us(e,t,i),il(e,t,i)):(ca&&s&&ra(t),t.flags|=1,Ic(e,t,r,i),t.child)}function U(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!Ii(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,Lc(e,t,a,r,i)):(e=zi(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!al(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Gr:n,n(o,r)&&e.ref===t.ref)return il(e,t,i)}return t.flags|=1,e=Li(a,r),e.ref=t.ref,e.return=t,t.child=e}function Lc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Gr(a,r)&&e.ref===t.ref){if(V=!1,t.pendingProps=r=a,al(e,i))e.flags&131072&&(V=!0);else return t.lanes=e.lanes,il(e,t,i)}}return Uc(e,t,n,r,i)}function W(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return zc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Za(t,a===null?null:a.cachePool),a===null?No():Mo(t,a),zo(t);else return r=t.lanes=536870912,zc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&Za(t,null),No(),Bo()):(Za(t,a.cachePool),Mo(t,a),Bo(),t.memoizedState=null);return Ic(e,t,i,n),t.child}function Rc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function zc(e,t,n,r,i){var a=Xa();return a=a===null?null:{parent:Fa._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&Za(t,null),No(),zo(t),e!==null&&Ea(e,t,r,!0),t.childLanes=i,null}function Bc(e,t){return t=Yc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Vc(e,t,n){return go(t,e.child,null,n),e=Bc(t,t.pendingProps),e.flags|=2,Vo(t),t.memoizedState=null,e}function Hc(e,t,n){var r=t.pendingProps,a=!!(t.flags&128);if(t.flags&=-129,e===null){if(ca){if(r.mode===`hidden`)return e=Bc(t,r),t.lanes=536870912,e.memoizedState={baseLanes:0,cachePool:null},Rc(null,e);if(Ro(t),(e=sa)?(e=um(e,ua),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Qi===null?null:{id:$i,overflow:ea},retryLane:536870912,hydrationErrors:null},n=Hi(e),n.return=t,t.child=n,oa=t,sa=null)):e=null,e===null)throw fa(t);return t.lanes=536870912,null}return Bc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(Ro(t),a){if(t.flags&256)t.flags&=-257,t=Vc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558))}else if(V||Ea(e,t,n,!1),a=(n&e.childLanes)!==0,V||a){if(Ao.current===null){if(r=Qu,r!==null&&(s=vt(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,Ai(e,s),Id(r,e,s),Fc;Jd()}t=Vc(e,t,n)}else e=o.treeContext,sa=mm(s.nextSibling),oa=t,ca=!0,la=null,ua=!1,e!==null&&aa(t,e),t=Bc(t,r),t.flags|=134221824;return t}return e=Li(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function G(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function Uc(e,t,n,r,i){return Oa(t),n=as(e,t,n,r,void 0,i),r=ls(),e!==null&&!V?(us(e,t,i),il(e,t,i)):(ca&&r&&ra(t),t.flags|=1,Ic(e,t,n,i),t.child)}function K(e,t,n,r,i,a){return Oa(t),t.updateQueue=null,n=ss(t,r,n,i),os(e),r=ls(),e!==null&&!V?(us(e,t,a),il(e,t,a)):(ca&&r&&ra(t),t.flags|=1,Ic(e,t,n,a),t.child)}function Wc(e,t,n,r,i){if(Oa(t),t.stateNode===null){var a=Ni,o=n.contextType;typeof o==`object`&&o&&(a=ka(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=wc,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},yo(t),o=n.contextType,a.context=typeof o==`object`&&o?ka(o):Ni,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Cc(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&wc.enqueueReplaceState(a,a.state,null),Do(t,r,a,i),Eo(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=Ec(n,s);a.props=c;var l=a.context,u=n.contextType;o=Ni,typeof u==`object`&&u&&(o=ka(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&z(t,a,r,o),vo=!1;var f=t.memoizedState;a.state=f,Do(t,r,a,i),Eo(),l=t.memoizedState,s||f!==l||vo?(typeof d==`function`&&(Cc(t,n,d,r),l=t.memoizedState),(c=vo||Tc(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,bo(e,t),o=t.memoizedProps,u=Ec(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=Ni,typeof l==`object`&&l&&(c=ka(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&z(t,a,r,c),vo=!1,f=t.memoizedState,a.state=f,Do(t,r,a,i),Eo();var p=t.memoizedState;o!==d||f!==p||vo||e!==null&&e.dependencies!==null&&Da(e.dependencies)?(typeof s==`function`&&(Cc(t,n,s,r),p=t.memoizedState),(u=vo||Tc(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&Da(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,G(e,t),r=!!(t.flags&128),a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=go(t,e.child,null,i),t.child=go(t,null,n,i)):Ic(e,t,n,i),t.memoizedState=a.state,e=t.child):e=il(e,t,i),e}function q(e,t,n,r){return ga(),t.flags|=256,Ic(e,t,n,r),t.child}var Gc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Kc(e){return{baseLanes:e,cachePool:Qa()}}function qc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=dd),e}function J(e,t,n){var r=t.pendingProps,i=!1,a=!!(t.flags&128),o;if((o=a)||(o=e!==null&&e.memoizedState===null?!1:!!(Ho.current&2)),o&&(i=!0,t.flags&=-129),o=!!(t.flags&32),t.flags&=-33,e===null){if(ca){if(i?Lo(t):Bo(),(e=sa)?(e=um(e,ua),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Qi===null?null:{id:$i,overflow:ea},retryLane:536870912,hydrationErrors:null},n=Hi(e),n.return=t,t.child=n,oa=t,sa=null)):e=null,e===null)throw fa(t);return t.lanes=fm(e)?32:536870912,null}return a=r.children,r=r.fallback,i?(Bo(),i=t.mode,a=Yc({mode:`hidden`,children:a},i),r=Bi(r,i,n,null),a.return=t,r.return=t,a.sibling=r,t.child=a,r=t.child,r.memoizedState=Kc(n),r.childLanes=qc(e,o,n),t.memoizedState=Gc,Rc(null,r)):(Lo(t),Jc(t,a))}var s=e.memoizedState;if(s!==null){var c=s.dehydrated;if(c!==null)return Zc(e,t,a,o,r,c,s,n)}return i?(Bo(),i=r.fallback,a=t.mode,s=e.child,c=s.sibling,r=Li(s,{mode:`hidden`,children:r.children}),r.subtreeFlags=s.subtreeFlags&1206910976,c===null?(i=Bi(i,a,n,null),i.flags|=2):i=Li(c,i),i.return=t,r.return=t,r.sibling=i,t.child=r,Rc(null,r),r=t.child,i=e.child.memoizedState,i===null?i=Kc(n):(a=i.cachePool,a===null?a=Qa():(s=Fa._currentValue,a=a.parent===s?a:{parent:s,pool:s}),i={baseLanes:i.baseLanes|n,cachePool:a}),r.memoizedState=i,r.childLanes=qc(e,o,n),t.memoizedState=Gc,Rc(e.child,r)):(Lo(t),n=e.child,e=n.sibling,n=Li(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(o=t.deletions,o===null?(t.deletions=[e],t.flags|=16):o.push(e)),t.child=n,t.memoizedState=null,n)}function Jc(e,t){return t=Yc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function Yc(e,t){return e=Fi(22,e,null,t),e.lanes=0,e}function Xc(e,t,n){return go(t,e.child,null,n),e=Jc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Zc(e,t,n,r,a,o,s,c){if(n)return t.flags&256?(Lo(t),t.flags&=-257,Xc(e,t,c)):t.memoizedState===null?(Bo(),o=a.fallback,s=t.mode,a=Yc({mode:`visible`,children:a.children},s),o=Bi(o,s,c,null),o.flags|=2,a.return=t,o.return=t,a.sibling=o,t.child=a,go(t,e.child,null,c),a=t.child,a.memoizedState=Kc(c),a.childLanes=qc(e,r,c),t.memoizedState=Gc,Rc(null,a)):(Bo(),t.child=e.child,t.flags|=128,null);if(Lo(t),fm(o)){if(r=o.nextSibling&&o.nextSibling.dataset,r)var l=r.dgst;return r=l,r!==``&&(a=Error(i(419)),a.stack=``,a.digest=r,va({value:a,source:null,stack:null})),Xc(e,t,c)}if(V||Ea(e,t,c,!1),r=(c&e.childLanes)!==0,V||r){if(Ao.current!==null)return Xc(e,t,c);if(r=Qu,r!==null&&(a=vt(r,c),a!==0&&a!==s.retryLane))throw s.retryLane=a,Ai(e,a),Id(r,e,a),Fc;return dm(o)||Jd(),Xc(e,t,c)}return dm(o)?(t.flags|=192,t.child=e.child,null):(e=s.treeContext,sa=mm(o.nextSibling),oa=t,ca=!0,la=null,ua=!1,e!==null&&aa(t,e),t=Jc(t,a.children),t.flags|=134221824,t)}function Qc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),wa(e.return,t,n)}function $c(e){for(var t=null;e!==null;){var n=e.alternate;n!==null&&Go(n)===null&&(t=e),e=e.sibling}return t}function el(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function tl(e){var t=e.child;for(e.child=null;t!==null;){var n=t.sibling;t.sibling=e.child,e.child=t,t=n}}function nl(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=Ho.current;if(t.flags&128)return Uo(t,o),null;var s=!!(o&2);if(s?(o=o&1|2,t.flags|=128):o&=1,Uo(t,o),i===`backwards`&&e!==null?(tl(e),Ic(e,t,r,n),tl(e)):Ic(e,t,r,n),r=ca?Yi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Qc(e,n,t);else if(e.tag===19)Qc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`backwards`:n=$c(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null,tl(t)),el(t,!0,i,null,a,r);break;case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Go(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}el(t,!0,n,null,a,r);break;case`together`:el(t,!1,null,null,void 0,r);break;case`independent`:t.memoizedState=null;break;default:n=$c(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),el(t,!1,i,n,a,r)}return t.child}function rl(e,t,n){var r=t.pendingProps;return Sa(t,t.type,r.value),Ic(e,t,r.children,n),t.child}function il(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),cd|=t.lanes,(n&t.childLanes)===0){if(e!==null){if(Ea(e,t,n,!1),(n&t.childLanes)===0)return null}else return null}if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=Li(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Li(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function al(e,t){return(e.lanes&t)!==0||(e=e.dependencies,!!(e!==null&&Da(e)))}function ol(e,t,n){switch(t.tag){case 3:Oe(t,t.stateNode.containerInfo),Sa(t,Fa,e.memoizedState.cache),ga();break;case 27:case 5:Ae(t);break;case 4:Oe(t,t.stateNode.containerInfo);break;case 10:Sa(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Ro(t),null;break;case 13:var r=t.memoizedState;if(r!==null){if(r.dehydrated!==null)return Lo(t),t.flags|=128,null;r=Ea(e,t,n,!1);var i=t.child.childLanes;return r||(n&i)!==0?J(e,t,n):(Lo(t),e=il(e,t,n),e===null?null:e.sibling)}Lo(t);break;case 19:if(t.flags&128)return nl(e,t,n);if(i=!!(e.flags&128),r=(n&t.childLanes)!==0,r||=(Ea(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return nl(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Uo(t,Ho.current),r)break;return null;case 22:return t.lanes=0,W(e,t,n,t.pendingProps);case 24:Sa(t,Fa,e.memoizedState.cache)}return il(e,t,n)}function sl(e,t,n){if(e!==null){if(e.memoizedProps!==t.pendingProps)V=!0;else{if(!al(e,n)&&!(t.flags&128))return V=!1,ol(e,t,n);V=!!(e.flags&131072)}}else V=!1,ca&&t.flags&1048576&&na(t,Yi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=ao(t.elementType),t.type=e,typeof e==`function`)Ii(e)?(r=Ec(e,r),t.tag=1,t=Wc(null,t,e,r,n)):(t.tag=0,t=Uc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===ae){t.tag=11,t=H(null,t,e,r,n);break a}if(a===ce){t.tag=14,t=U(null,t,e,r,n);break a}if(a===ie){t.tag=10,t.type=e,t=rl(null,t,n);break a}}throw t=_e(e)||e,Error(i(306,t,``))}}return t;case 0:return Uc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=Ec(r,t.pendingProps),Wc(e,t,r,a,n);case 3:a:{if(Oe(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,bo(e,t),Do(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Sa(t,Fa,r),r!==o.cache&&Ta(t,[Fa],n,!0),Eo(),r=s.element,o.isDehydrated){if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=q(e,t,r,n);break a}if(r!==a){a=Gi(Error(i(424)),t),va(a),t=q(e,t,r,n);break a}switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(sa=mm(e.firstChild),oa=t,ca=!0,la=null,ua=!0,n=_o(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|134221824,n=n.sibling}else{if(ga(),r===a){t=il(e,t,n);break a}Ic(e,t,r,n)}t=t.child}return t;case 26:return G(e,t),e===null?(n=Rm(t.type,null,t.pendingProps,null))?t.memoizedState=n:ca||(t.stateNode=_p(t.type,t.pendingProps,Ee.current,t)):t.memoizedState=Rm(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Ae(t),e===null&&ca&&(r=t.stateNode=bm(t.type,t.pendingProps,Ee.current),oa=t,ua=!0,a=sa,Dp(t.type)?(hm=a,sa=mm(r.firstChild)):sa=a),Ic(e,t,t.pendingProps.children,n),G(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&ca&&((a=r=sa)&&(r=cm(r,t.type,t.pendingProps,ua),r===null?a=!1:(t.stateNode=r,oa=t,sa=mm(r.firstChild),ua=!1,a=!0)),a||fa(t)),Ae(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,vp(a,o)?r=null:s!==null&&vp(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=as(e,t,cs,null,null,n),fh._currentValue=a),G(e,t),Ic(e,t,r,n),t.child;case 6:return e===null&&ca&&((e=n=sa)&&(n=lm(n,t.pendingProps,ua),n===null?e=!1:(t.stateNode=n,oa=t,sa=null,e=!0)),e||fa(t)),null;case 13:return J(e,t,n);case 4:return Oe(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=go(t,null,r,n):Ic(e,t,r,n),t.child;case 11:return H(e,t,t.type,t.pendingProps,n);case 7:return r=t.pendingProps,G(e,t),Ic(e,t,r,n),t.child;case 8:return Ic(e,t,t.pendingProps.children,n),t.child;case 12:return Ic(e,t,t.pendingProps.children,n),t.child;case 10:return rl(e,t,n);case 9:return a=t.type._context,r=t.pendingProps.children,Oa(t),a=ka(a),r=r(a),t.flags|=1,Ic(e,t,r,n),t.child;case 14:return U(e,t,t.type,t.pendingProps,n);case 15:return Lc(e,t,t.type,t.pendingProps,n);case 19:return nl(e,t,n);case 31:return Hc(e,t,n);case 22:return W(e,t,n,t.pendingProps);case 24:return Oa(t),r=ka(Fa),e===null?(a=Xa(),a===null&&(a=Qu,o=Ia(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},yo(t),Sa(t,Fa,a)):((e.lanes&n)!==0&&(bo(e,t),Do(t,null,null,n),Eo()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,Sa(t,Fa,r),r!==a.cache&&Ta(t,[Fa],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Sa(t,Fa,r))),Ic(e,t,t.pendingProps.children,n),t.child;case 30:return t.stateNode===null&&(t.stateNode={autoName:null,paired:null,clones:null,ref:null}),r=t.pendingProps,r.name!=null&&r.name!==`auto`?t.flags|=e===null?18882560:18874368:ca&&ra(t),e!==null&&e.memoizedProps.name!==r.name?t.flags|=4194816:G(e,t),Ic(e,t,r.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function cl(e){e.flags|=4}function ll(e,t,n,r,i){var a;if((a=!!(e.mode&32))&&(a=n===null?$m(t,r):$m(t,r)&&(r.src!==n.src||r.srcSet!==n.srcSet)),a){if(e.flags|=16777216,(i&335544128)===i){if(e.stateNode.complete)e.flags|=8192;else if(Gd())e.flags|=8192;else throw oo=no,eo}}else e.flags&=-16777217}function ul(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!eh(t)){if(Gd())e.flags|=8192;else throw oo=no,eo}}function dl(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:ft(),e.lanes|=t,fd|=t)}function fl(e,t){if(!ca)switch(e.tailMode){case`visible`:break;case`collapsed`:for(var n=e.tail,r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null;break;default:for(t=e.tail,n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null}}function pl(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&1206910976,r|=i.flags&1206910976,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function ml(e,t,n){var r=t.pendingProps;switch(ia(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return pl(t),null;case 1:return pl(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Ca(Fa),ke(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(ha(t)?cl(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,_a())),pl(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(cl(t),o===null?(pl(t),ll(t,a,null,r,n)):(pl(t),ul(t,o))):o?o===e.memoizedState?(pl(t),t.flags&=-16777217):(cl(t),pl(t),ul(t,o)):(e=e.memoizedProps,e!==r&&cl(t),pl(t),ll(t,a,e,r,n)),null;case 27:if(je(t),n=Ee.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&cl(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return pl(t),t.subtreeFlags&=-33554433,null}e=we.current,ha(t)?pa(t,e):(e=bm(a,r,n),t.stateNode=e,cl(t))}return pl(t),t.subtreeFlags&=-33554433,null;case 5:if(je(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&cl(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return pl(t),t.subtreeFlags&=-33554433,null}if(o=we.current,ha(t))pa(t,o);else{var s=mp(Ee.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[wt]=t,o[Tt]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(sp(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&cl(t)}}return pl(t),t.subtreeFlags&=-33554433,ll(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&cl(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=Ee.current,ha(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=oa,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[wt]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||ip(e.nodeValue,n)),e||fa(t,!0)}else e=mp(e).createTextNode(r),e[wt]=t,t.stateNode=e}return pl(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=ha(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[wt]=t}else ga(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;pl(t),e=!1}else n=_a(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(Vo(t),t):(Vo(t),null);if(t.flags&128)throw Error(i(558))}return pl(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=ha(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[wt]=t}else ga(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;pl(t),a=!1}else a=_a(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(Vo(t),t):(Vo(t),null)}return Vo(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),dl(t,t.updateQueue),pl(t),null);case 4:return ke(),e===null&&Jf(t.stateNode.containerInfo),t.flags|=67108864,pl(t),null;case 10:return Ca(t.type),pl(t),null;case 19:if(Wo(t),r=t.memoizedState,r===null)return pl(t),null;if(a=!!(t.flags&128),o=r.rendering,o===null){if(a)fl(r,!1);else{if(sd!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Go(e),o!==null){for(t.flags|=128,fl(r,!1),e=o.updateQueue,t.updateQueue=e,dl(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Ri(n,e),n=n.sibling;return Uo(t,Ho.current&1|2),ca&&ta(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&We()>vd&&(t.flags|=128,a=!0,fl(r,!1),t.lanes=4194304)}}else{if(!a){if(e=Go(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,dl(t,e),fl(r,!0),r.tail===null&&r.tailMode!==`collapsed`&&r.tailMode!==`visible`&&!o.alternate&&!ca)return pl(t),null}else 2*We()-r.renderingStartTime>vd&&n!==536870912&&(t.flags|=128,a=!0,fl(r,!1),t.lanes=4194304)}r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}if(r.tail!==null){e=r.tail;a:{for(n=e;n!==null;){if(n.alternate!==null){n=!1;break a}n=n.sibling}n=!0}return r.rendering=e,r.tail=e.sibling,r.renderingStartTime=We(),e.sibling=null,o=Ho.current,o=a?o&1|2:o&1,r.tailMode===`visible`||r.tailMode===`collapsed`||!n||ca?Uo(t,o):(n=o,Ce(Fo,t),Ce(Ho,n),Io===null&&(Io=t)),ca&&ta(t,r.treeForkCount),e}return pl(t),null;case 22:case 23:return Vo(t),Po(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(pl(t),t.subtreeFlags&6&&(t.flags|=8192)):pl(t),n=t.updateQueue,n!==null&&dl(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&Se(Ya),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Ca(Fa),pl(t),null;case 25:return null;case 30:return t.flags|=33554432,pl(t),null}throw Error(i(156,t.tag))}function hl(e,t){switch(ia(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ca(Fa),ke(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return je(t),null;case 31:if(t.memoizedState!==null){if(Vo(t),t.alternate===null)throw Error(i(340));ga()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Vo(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));ga()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Wo(t),e=t.flags,e&65536?(t.flags=e&-65537|128,e=t.memoizedState,e!==null&&(e.rendering=null,e.tail=null),t.flags|=4,t):null;case 4:return ke(),null;case 10:return Ca(t.type),null;case 22:case 23:return Vo(t),Po(),e!==null&&Se(Ya),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Ca(Fa),null;case 25:return null;default:return null}}function gl(e,t){switch(ia(t),t.tag){case 3:Ca(Fa),ke();break;case 26:case 27:case 5:je(t);break;case 4:ke();break;case 31:t.memoizedState!==null&&Vo(t);break;case 13:Vo(t);break;case 19:Wo(t);break;case 10:Ca(t.type);break;case 22:case 23:Vo(t),Po(),e!==null&&Se(Ya);break;case 24:Ca(Fa)}}function _l(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){gf(t,t.return,e)}}function vl(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){gf(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){gf(t,t.return,e)}}function yl(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{ko(t,n)}catch(t){gf(e,e.return,t)}}}function bl(e,t,n){n.props=Ec(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){gf(e,t,n)}}function xl(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:var i=e.stateNode,a=bi(e.memoizedProps,i);(i.ref===null||i.ref.name!==a)&&(i.ref=zp(a)),r=i.ref;break;case 7:if(e.stateNode===null){var o=new Bp(e);p(e.child,!1,rm,o,void 0,void 0),e.stateNode=o}r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){gf(e,t,n)}}function Sl(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){gf(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){gf(e,t,n)}else n.current=null}}function Cl(e,t){if((e.tag===5||e.tag===27||e.tag===6)&&e.alternate===null&&t!==null)for(var n=0;n<t.length;n++)am(e.stateNode,t[n])}function wl(e){for(var t=e.return;t!==null&&(Dl(t)&&am(e.stateNode,t.stateNode),!El(t));)t=t.return}function Tl(e){for(var t=e.return;t!==null&&(Dl(t)&&om(e.stateNode,t.stateNode),!El(t));)t=t.return}function El(e){return e.tag===5||e.tag===3||e.tag===27}function Dl(e){return e&&e.tag===7&&e.stateNode!==null}function Ol(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){gf(e,e.return,t)}}function kl(e,t,n){try{var r=e.stateNode;lp(r,e.type,n,t),r[Tt]=t}catch(t){gf(e,e.return,t)}}function Al(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Dp(e.type)||e.tag===4}function jl(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Al(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Dp(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Ml(e,t,n,r){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(i,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(i),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=xn)),Cl(e,r),Jt=!0;else if(i!==4&&(i===27&&(Cl(e,r),r=null,Dp(e.type)&&(n=e.stateNode,t=null)),e=e.child,e!==null))for(Ml(e,t,n,r),e=e.sibling;e!==null;)Ml(e,t,n,r),e=e.sibling}function Nl(e,t,n,r){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?n.insertBefore(i,t):n.appendChild(i),Cl(e,r),Jt=!0;else if(i!==4&&(i===27&&(Cl(e,r),r=null,Dp(e.type)&&(n=e.stateNode)),e=e.child,e!==null))for(Nl(e,t,n,r),e=e.sibling;e!==null;)Nl(e,t,n,r),e=e.sibling}function Pl(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);sp(t,r,n),t[wt]=e,t[Tt]=n}catch(t){gf(e,e.return,t)}}var Fl=!1,Il=null;function Ll(e){(e.tag===30||e.subtreeFlags&33554432)&&(Fl=!0)}var Rl=null;function zl(){var e=Rl;return Rl=null,e}var Bl=0;function Vl(e,t,n,r,i){return Bl=0,Hl(e.child,t,n,r,i)}function Hl(e,t,n,r,i){for(var a=!1;e!==null;){if(e.tag===5){var o=e.stateNode;if(r!==null){var s=Np(o);r.push(s),s.view&&(a=!0)}else a||Np(o).view&&(a=!0);Fl=!0,Ap(o,Bl===0?t:t+`_`+Bl,n),Bl++}else(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&i||Hl(e.child,t,n,r,i)&&(a=!0));e=e.sibling}return a}function Ul(e,t){for(;e!==null;)e.tag===5?jp(e.stateNode,e.memoizedProps):(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&t||Ul(e.child,t)),e=e.sibling}function Wl(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if((e.tag!==22||e.memoizedState===null)&&(Wl(e),e.tag===30&&e.flags&18874368&&e.stateNode.paired)){var t=e.memoizedProps;if(t.name==null||t.name===`auto`)throw Error(i(544));var n=t.name;t=Si(t.default,t.share),t!==`none`&&(Vl(e,n,t,null,!1)||Ul(e.child,!1))}e=e.sibling}}function Gl(e,t){if(e.tag===30){var n=e.stateNode,r=e.memoizedProps,i=bi(r,n),a=Si(r.default,n.paired?r.share:r.enter);a===`none`?Wl(e):Vl(e,i,a,null,!1)?(Wl(e),n.paired||t||Fd(e,r.onEnter)):Ul(e.child,!1)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)Gl(e,t),e=e.sibling;else Wl(e)}function Kl(e){if(Il!==null&&Il.size!==0){var t=Il;if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&e.flags&18874368){var n=e.memoizedProps,r=n.name;if(r!=null&&r!==`auto`){var i=t.get(r);if(i!==void 0){var a=Si(n.default,n.share);if(a!==`none`&&(Vl(e,r,a,null,!1)?(a=e.stateNode,i.paired=a,a.paired=i,Fd(e,n.onShare)):Ul(e.child,!1)),t.delete(r),t.size===0)break}}}Kl(e)}e=e.sibling}}}function ql(e){if(e.tag===30){var t=e.memoizedProps,n=bi(t,e.stateNode),r=Il===null?void 0:Il.get(n),i=Si(t.default,r===void 0?t.exit:t.share);i!==`none`&&(Vl(e,n,i,null,!1)?r===void 0?Fd(e,t.onExit):(i=e.stateNode,r.paired=i,i.paired=r,Il.delete(n),Fd(e,t.onShare)):Ul(e.child,!1)),Il!==null&&Kl(e)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)ql(e),e=e.sibling;else Il!==null&&Kl(e)}function Jl(e){for(e=e.child;e!==null;){if(e.tag===30){var t=e.memoizedProps,n=bi(t,e.stateNode);t=Si(t.default,t.update),e.flags&=-5,t!==`none`&&Vl(e,n,t,e.memoizedState=[],!1)}else e.subtreeFlags&33554432&&Jl(e);e=e.sibling}}function Yl(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&e.flags&18874368){var t=e.stateNode;t.paired!==null&&(t.paired=null,Ul(e.child,!1))}Yl(e)}e=e.sibling}}function Xl(e){if(e.tag===30)e.stateNode.paired=null,Ul(e.child,!1),Yl(e);else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)Xl(e),e=e.sibling;else Yl(e)}function Zl(e){for(e=e.child;e!==null;)e.tag===30?Ul(e.child,!1):e.subtreeFlags&33554432&&Zl(e),e=e.sibling}function Ql(e,t,n,r,i,a,o){for(var s=!1;t!==null;){if(t.tag===5){var c=t.stateNode;if(a!==null&&Bl<a.length){var l=a[Bl],u=Np(c);(l.view||u.view)&&(s=!0);var d;if(d=!(e.flags&4)){if(u.clip)d=!0;else{d=l.rect;var f=u.rect;d=d.y!==f.y||d.x!==f.x||d.height!==f.height||d.width!==f.width}}d&&(e.flags|=4),u.abs?u=!l.abs:(l=l.rect,u=u.rect,u=l.height!==u.height||l.width!==u.width),u&&(e.flags|=32)}else e.flags|=32;e.flags&4&&Ap(c,Bl===0?n:n+`_`+Bl,i),s&&e.flags&4||(Rl===null&&(Rl=[]),Rl.push(c,Bl===0?r:r+`_`+Bl,t.memoizedProps)),Bl++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&o?e.flags|=t.flags&32:Ql(e,t.child,n,r,i,a,o)&&(s=!0));t=t.sibling}return s}function $l(e,t){for(e=e.child;e!==null;){if(e.tag===30){var n=e.memoizedProps,r=e.stateNode,i=bi(n,r),a=Si(n.default,n.update);if(t){r=r.clones;var o=r===null?null:r.map(Pp)}else o=e.memoizedState,e.memoizedState=null;r=e;var s=e.child;Bl=0,i=Ql(r,s,i,i,a,o,!1),e.flags&4&&i&&(t||Fd(e,n.onUpdate))}else e.subtreeFlags&33554432&&$l(e,t);e=e.sibling}}var eu=!1,tu=!1,nu=!1,ru=!1,iu=typeof WeakSet==`function`?WeakSet:Set,au=null,ou=!1,su=!1,cu=!1,lu=!1;function uu(e,t,n){if(e=e.containerInfo,fp=xh,e=Xr(e),Zr(e)){if(`selectionStart`in e)var r={start:e.selectionStart,end:e.selectionEnd};else a:{r=(r=e.ownerDocument)&&r.defaultView||window;var i=r.getSelection&&r.getSelection();if(i&&i.rangeCount!==0){r=i.anchorNode;var a=i.anchorOffset,o=i.focusNode;i=i.focusOffset;try{r.nodeType,o.nodeType}catch{r=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==r||a!==0&&f.nodeType!==3||(c=s+a),f!==o||i!==0&&f.nodeType!==3||(l=s+i),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===r&&++u===a&&(c=s),p===o&&++d===i&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}r=c===-1||l===-1?null:{start:c,end:l}}else r=null}r||={start:0,end:0}}else r=null;for(pp={focusedElem:e,selectionRange:r},xh=!1,n=(n&335544064)===n,au=t,t=n?9270:1024;au!==null;){if(e=au,n&&(r=e.deletions,r!==null))for(a=0;a<r.length;a++)n&&ql(r[a]);if(e.alternate===null&&e.flags&2)n&&Ll(e),du(n);else{if(e.tag===22){if(r=e.alternate,e.memoizedState!==null){r!==null&&r.memoizedState===null&&n&&ql(r),du(n);continue}if(r!==null&&r.memoizedState!==null){n&&Ll(e),du(n);continue}}r=e.child,(e.subtreeFlags&t)!==0&&r!==null?(r.return=e,au=r):(n&&Jl(e),du(n))}}Il=null}function du(e){for(;au!==null;){var t=au,n=e,r=t.alternate,a=t.flags;switch(t.tag){case 0:case 11:case 15:break;case 1:if(a&1024&&r!==null){n=void 0,a=r.memoizedProps,r=r.memoizedState;var o=t.stateNode;try{var s=Ec(t.type,a);n=o.getSnapshotBeforeUpdate(s,r),o.__reactInternalSnapshotBeforeUpdate=n}catch(e){gf(t,t.return,e)}}break;case 3:if(a&1024){if(r=t.stateNode.containerInfo,n=r.nodeType,n===9)sm(r);else if(n===1)switch(r.nodeName){case`HEAD`:case`HTML`:case`BODY`:sm(r);break;default:r.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;case 30:n&&r!==null&&(n=bi(r.memoizedProps,r.stateNode),a=t.memoizedProps,a=Si(a.default,a.update),a!==`none`&&Vl(r,n,a,r.memoizedState=[],!0));break;default:if(a&1024)throw Error(i(163))}if(r=t.sibling,r!==null){r.return=t.return,au=r;break}au=t.return}}function fu(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Mu(e,n),r&4&&_l(5,n);break;case 1:if(Mu(e,n),r&4){if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){gf(n,n.return,e)}else{var i=Ec(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){gf(n,n.return,e)}}}r&64&&yl(n),r&512&&xl(n,n.return);break;case 3:if(Mu(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{ko(e,t)}catch(e){gf(n,n.return,e)}}break;case 27:t===null&&r&4&&Pl(n);case 26:case 5:Mu(e,n),t===null&&r&4&&Ol(n),r&512&&xl(n,n.return);break;case 12:Mu(e,n);break;case 31:Mu(e,n),r&4&&xu(e,n);break;case 13:Mu(e,n),r&4&&Su(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=bf.bind(null,n),pm(e,n))));break;case 22:if(r=n.memoizedState!==null||eu,!r){var a=t!==null&&t.memoizedState!==null||tu;t=eu,i=tu,eu=r,(tu=a)&&!i?(r=2,n.subtreeFlags&8772&&(r|=1),Pu(e,n,r)):Mu(e,n),eu=t,tu=i}break;case 30:Mu(e,n),r&512&&xl(n,n.return);break;case 7:r&512&&xl(n,n.return);default:Mu(e,n)}}function pu(e,t){for(e=e.child;e!==null;)mu(e,t),e=e.sibling}function mu(e,t){switch(e.tag){case 5:case 26:try{var n=e.stateNode;if(t){var r=n.style;typeof r.setProperty==`function`?r.setProperty(`display`,`none`,`important`):r.display=`none`}else{var i=e.stateNode,a=e.memoizedProps.style,o=a!=null&&a.hasOwnProperty(`display`)?a.display:null;i.style.display=o==null||typeof o==`boolean`?``:(``+o).trim()}}catch(t){gf(e,e.return,t)}hu(e,t);break;case 6:try{e.stateNode.nodeValue=t?``:e.memoizedProps,Jt=!0}catch(t){gf(e,e.return,t)}break;case 18:try{var s=e.stateNode;t?kp(s,!0):kp(e.stateNode,!1)}catch(t){gf(e,e.return,t)}break;case 22:case 23:e.memoizedState===null&&pu(e,t);break;default:pu(e,t)}}function hu(e,t){if(e.subtreeFlags&67108864)for(e=e.child;e!==null;){a:{var n=e,r=t;switch(n.tag){case 4:mu(n,r);break a;case 22:n.memoizedState===null&&hu(n,r);break a;default:hu(n,r)}}e=e.sibling}}function gu(e){var t=e.alternate;t!==null&&(e.alternate=null,gu(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Nt(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var _u=null,vu=!1;function yu(e,t,n){for(n=n.child;n!==null;)bu(e,t,n),n=n.sibling}function bu(e,t,n){if(F&&typeof F.onCommitFiberUnmount==`function`)try{F.onCommitFiberUnmount($e,n)}catch{}switch(n.tag){case 26:tu||Sl(n,t),yu(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&!tu&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:tu||Sl(n,t),Tl(n);var r=_u,i=vu;Dp(n.type)&&(_u=n.stateNode,vu=!1),yu(e,t,n),xm(n.stateNode,n.type,n.memoizedProps),_u=r,vu=i;break;case 5:tu||Sl(n,t),Tl(n);case 6:if(n.tag===6&&Tl(n),r=_u,i=vu,_u=null,yu(e,t,n),_u=r,vu=i,_u!==null){if(vu)try{(_u.nodeType===9?_u.body:_u.nodeName===`HTML`?_u.ownerDocument.body:_u).removeChild(n.stateNode),Jt=!0}catch(e){gf(n,t,e)}else try{_u.removeChild(n.stateNode),Jt=!0}catch(e){gf(n,t,e)}}break;case 18:_u!==null&&(vu?(e=_u,Op(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),qh(e)):Op(_u,n.stateNode));break;case 4:r=_u,i=vu,_u=n.stateNode.containerInfo,vu=!0,yu(e,t,n),_u=r,vu=i;break;case 0:case 11:case 14:case 15:vl(2,n,t),tu||vl(4,n,t),yu(e,t,n);break;case 1:tu||(Sl(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&bl(n,t,r)),yu(e,t,n);break;case 21:yu(e,t,n);break;case 22:tu=(r=tu)||n.memoizedState!==null,yu(e,t,n),tu=r;break;case 30:Sl(n,t),yu(e,t,n);break;case 7:tu||Sl(n,t),yu(e,t,n);break;default:yu(e,t,n)}}function xu(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{qh(e)}catch(e){gf(t,t.return,e)}}}function Su(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{qh(e)}catch(e){gf(t,t.return,e)}}function Cu(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new iu),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new iu),t;default:throw Error(i(435,e.tag))}}function wu(e,t){var n=Cu(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=xf.bind(null,e,t);t.then(r,r)}})}function Tu(e,t,n){var r=t.deletions;if(r!==null)for(var a=0;a<r.length;a++){var o=r[a],s=e,c=t,l=c;a:for(;l!==null;){switch(l.tag){case 27:if(Dp(l.type)){_u=l.stateNode,vu=!1;break a}break;case 5:_u=l.stateNode,vu=!1;break a;case 3:case 4:_u=l.stateNode.containerInfo,vu=!0;break a}l=l.return}if(_u===null)throw Error(i(160));bu(s,c,o),_u=null,vu=!1,s=o.alternate,s!==null&&(s.return=null),o.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Du(t,e,n),t=t.sibling}var Eu=null;function Du(e,t,n){var r=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(a&4&&(r=e.updateQueue,r=r===null?null:r.events,r!==null))for(var o=0;o<r.length;o++){var s=r[o];s.ref.impl=s.nextImpl}Tu(t,e,n),Ou(e),a&4&&(vl(3,e,e.return),_l(3,e),vl(5,e,e.return));break;case 1:Tu(t,e,n),Ou(e),a&512&&(tu||r===null||Sl(r,r.return)),a&64&&eu&&(e=e.updateQueue,e!==null&&(t=e.callbacks,t!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?t:n.concat(t))));break;case 26:if(o=Eu,Tu(t,e,n),Ou(e),a&512&&(tu||r===null||Sl(r,r.return)),a&4){if(a=r===null?null:r.memoizedState,n=e.memoizedState,r===null){if(n===null){if(e.stateNode===null){if(eu)e.stateNode=_p(e.type,e.memoizedProps,t.containerInfo,e);else{a:{t=e.type,n=e.memoizedProps,a=o.ownerDocument||o;b:switch(t){case`title`:r=a.getElementsByTagName(`title`)[0],(!r||r[jt]||r[wt]||r.namespaceURI===`http://www.w3.org/2000/svg`||r.hasAttribute(`itemprop`))&&(r=a.createElement(t),a.head.insertBefore(r,a.querySelector(`head > title`))),sp(r,t,n),r[wt]=e,Rt(r),t=r;break a;case`link`:if(o=Xm(`link`,`href`,a).get(t+(n.href||``))){for(s=0;s<o.length;s++)if(r=o[s],r.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&r.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&r.getAttribute(`title`)===(n.title==null?null:n.title)&&r.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){o.splice(s,1);break b}}r=a.createElement(t),sp(r,t,n),a.head.appendChild(r);break;case`meta`:if(o=Xm(`meta`,`content`,a).get(t+(n.content||``))){for(s=0;s<o.length;s++)if(r=o[s],r.getAttribute(`content`)===(n.content==null?null:``+n.content)&&r.getAttribute(`name`)===(n.name==null?null:n.name)&&r.getAttribute(`property`)===(n.property==null?null:n.property)&&r.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&r.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){o.splice(s,1);break b}}r=a.createElement(t),sp(r,t,n),a.head.appendChild(r);break;default:throw Error(i(468,t))}r[wt]=e,Rt(r),t=r}e.stateNode=t}}else eu||Zm(o,e.type,e.stateNode)}else e.stateNode=Gm(o,n,e.memoizedProps)}else a===n?n===null&&e.stateNode!==null&&kl(e,e.memoizedProps,r.memoizedProps):(a===null?(t=r.stateNode,t===null||tu||t.parentNode.removeChild(t)):a.count--,n===null?eu||Zm(o,e.type,e.stateNode):Gm(o,n,e.memoizedProps))}break;case 27:Tu(t,e,n),Ou(e),a&512&&(tu||r===null||Sl(r,r.return)),r!==null&&a&4&&kl(e,e.memoizedProps,r.memoizedProps);break;case 5:if(o=nu,nu=!1,Tu(t,e,n),nu=o,Ou(e),a&512&&(tu||r===null||Sl(r,r.return)),e.flags&32){t=e.stateNode;try{pn(t,``),Jt=!0}catch(t){gf(e,e.return,t)}}a&4&&e.stateNode!=null&&(t=e.memoizedProps,kl(e,t,r===null?t:r.memoizedProps)),a&1024&&(ru=!0);break;case 6:if(Tu(t,e,n),Ou(e),a&4){if(e.stateNode===null)throw Error(i(162));t=e.memoizedProps,n=e.stateNode;try{n.nodeValue=t,Jt=!0}catch(t){gf(e,e.return,t)}}break;case 3:if(Jt=!1,Ym=null,o=Eu,Eu=Tm(t.containerInfo),Tu(t,e,n),Eu=o,Ou(e),a&4&&r!==null&&r.memoizedState.isDehydrated)try{qh(t.containerInfo)}catch(t){gf(e,e.return,t)}ru&&(ru=!1,ku(e)),Jt=!1;break;case 4:a=nu,nu=eu,r=Yt(),o=Eu,Eu=Tm(e.stateNode.containerInfo),Tu(t,e,n),Ou(e),Eu=o,Jt&&su&&(cu=!0),Jt=r,nu=a;break;case 12:Tu(t,e,n),Ou(e);break;case 31:Tu(t,e,n),Ou(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,wu(e,t)));break;case 13:Tu(t,e,n),Ou(e),e.child.flags&8192&&e.memoizedState!==null!=(r!==null&&r.memoizedState!==null)&&(gd=We()),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,wu(e,t)));break;case 22:o=e.memoizedState!==null,s=r!==null&&r.memoizedState!==null;var c=eu,l=tu,u=nu;eu=c||o,nu=u||o,tu=l||s,Tu(t,e,n),tu=l,nu=u,eu=c,Ou(e),a&8192&&(t=e.stateNode,t._visibility=o?t._visibility&-2:t._visibility|1,!o||r===null||s||eu||tu||(t=s||tu,n=eu,r=tu,eu=o||eu,tu=t,Nu(e,2),eu=n,tu=r),!o&&nu||pu(e,o)),a&4&&(t=e.updateQueue,t!==null&&(n=t.retryQueue,n!==null&&(t.retryQueue=null,wu(e,n))));break;case 19:Tu(t,e,n),Ou(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,wu(e,t)));break;case 30:a&512&&(tu||r===null||Sl(r,r.return)),a=Yt(),o=su,s=(n&335544064)===n,c=e.memoizedProps,su=s&&Si(c.default,c.update)!==`none`,Tu(t,e,n),Ou(e),s&&r!==null&&Jt&&(e.flags|=4),su=o,Jt=a;break;case 21:break;case 7:a&512&&(tu||r===null||Sl(r,r.return)),r&&r.stateNode!==null&&(r.stateNode._fragmentFiber=e);default:Tu(t,e,n),Ou(e)}}function Ou(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Al(r)){n=r;break}r=r.return}r=null;for(var a=e.return;a!==null;){if(Dl(a)){var o=a.stateNode;r===null?r=[o]:r.push(o)}if(El(a))break;a=a.return}var s=r;if(n==null)throw Error(i(160));switch(n.tag){case 27:var c=n.stateNode;Nl(e,jl(e),c,s);break;case 5:var l=n.stateNode;n.flags&32&&(pn(l,``),n.flags&=-33),Nl(e,jl(e),l,s);break;case 3:case 4:var u=n.stateNode.containerInfo;Ml(e,jl(e),u,s);break;default:throw Error(i(161))}}catch(t){gf(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function ku(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;ku(t),t.tag===5&&t.flags&1024&&(t=t.stateNode,xh=!0,t.reset(),xh=!1),e=e.sibling}}function Au(e,t){if(t.subtreeFlags&9270)for(t=t.child;t!==null;)ju(t,e),t=t.sibling;else $l(t,!1)}function ju(e,t){var n=e.alternate;if(n===null)Gl(e,!1);else switch(e.tag){case 3:if(lu=ou=!1,zl(),Au(t,e),!ou&&!cu){if(e=Rl,e!==null)for(var r=0;r<e.length;r+=3){n=e[r];var i=e[r+1];jp(n,e[r+2]),n=n.ownerDocument.documentElement,n!==null&&n.animate({opacity:[0,0],pointerEvents:[`none`,`none`]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition-group(`+i+`)`})}e=t.containerInfo,e=e.nodeType===9?e.documentElement:e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===``&&(e.style.viewTransitionName=`none`,e.animate({opacity:[0,0],pointerEvents:[`none`,`none`]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition-group(root)`}),e.animate({width:[0,0],height:[0,0]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition`})),lu=!0}Rl=null;break;case 5:Au(t,e);break;case 4:r=ou,ou=!1,Au(t,e),ou&&(cu=!0),ou=r;break;case 22:e.memoizedState===null&&(n.memoizedState===null?Au(t,e):Gl(e,!1));break;case 30:r=ou,i=zl(),ou=!1,Au(t,e),ou&&(e.flags|=4);var a=e.memoizedProps,o=e.stateNode;t=bi(a,o),o=bi(n.memoizedProps,o);var s=Si(a.default,a.update);s===`none`?t=!1:(a=n.memoizedState,n.memoizedState=null,n=e.child,Bl=0,t=Ql(e,n,t,o,s,a,!0),Bl!==(a===null?0:a.length)&&(e.flags|=32)),e.flags&4&&t?(Fd(e,e.memoizedProps.onUpdate),Rl=i):i!==null&&(i.push.apply(i,Rl),Rl=i),ou=e.flags&32?!0:r;break;default:Au(t,e)}}function Mu(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)fu(e,t.alternate,t),t=t.sibling}function Nu(e,t){for(e=e.child;e!==null;){var n=e,r=t;switch(n.tag){case 0:case 11:case 14:case 15:vl(4,n,n.return),Nu(n,r);break;case 1:Sl(n,n.return);var i=n.stateNode;typeof i.componentWillUnmount==`function`&&bl(n,n.return,i),Nu(n,r);break;case 27:r&2&&xm(n.stateNode,n.type,n.memoizedProps);case 5:Sl(n,n.return),n.tag!==5&&n.tag!==27||Tl(n),Nu(n,r);break;case 6:Tl(n);break;case 26:Sl(n,n.return),i=n.stateNode,n.memoizedState!==null||i===null||tu||i.parentNode.removeChild(i),Nu(n,r);break;case 22:n.memoizedState===null&&Nu(n,r);break;case 30:Sl(n,n.return),Nu(n,r);break;case 7:Sl(n,n.return);default:Nu(n,r)}e=e.sibling}}function Pu(e,t,n){for(n=t.subtreeFlags&8772?n:n&-2,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags,s=!!(n&1);switch(a.tag){case 0:case 11:case 15:Pu(i,a,n),_l(4,a);break;case 1:if(Pu(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){gf(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var c=r.stateNode;try{var l=i.shared.hiddenCallbacks;if(l!==null)for(i.shared.hiddenCallbacks=null,i=0;i<l.length;i++)Oo(l[i],c)}catch(e){gf(r,r.return,e)}}s&&o&64&&yl(a),xl(a,a.return);break;case 27:n&2&&Pl(a);case 5:a.tag!==5&&a.tag!==27||wl(a),Pu(i,a,n),s&&r===null&&o&4&&Ol(a),xl(a,a.return);break;case 6:wl(a);break;case 26:c=a.stateNode,a.memoizedState!==null||c===null||eu||Zm(Tm(c.ownerDocument),a.type,c),Pu(i,a,n),s&&r===null&&o&4&&Ol(a),xl(a,a.return);break;case 12:Pu(i,a,n);break;case 31:Pu(i,a,n),s&&o&4&&xu(i,a);break;case 13:Pu(i,a,n),s&&o&4&&Su(i,a);break;case 22:a.memoizedState===null&&Pu(i,a,n),xl(a,a.return);break;case 30:Pu(i,a,n),xl(a,a.return);break;case 7:xl(a,a.return);default:Pu(i,a,n)}t=t.sibling}}function Fu(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&La(n))}function Iu(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&La(e))}function Lu(e,t,n,r){var i=(n&335544064)===n;if(t.subtreeFlags&(i?10262:10256))for(t=t.child;t!==null;)Ru(e,t,n,r),t=t.sibling;else i&&Zl(t)}function Ru(e,t,n,r){var i=(n&335544064)===n;i&&t.alternate===null&&t.return!==null&&t.return.alternate!==null&&Xl(t);var a=t.flags;switch(t.tag){case 0:case 11:case 15:Lu(e,t,n,r),a&2048&&_l(9,t);break;case 1:Lu(e,t,n,r);break;case 3:Lu(e,t,n,r),i&&lu&&(e=e.containerInfo,e=e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,e.style.viewTransitionName===`root`&&(e.style.viewTransitionName=``),e=e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===`none`&&(e.style.viewTransitionName=``)),a&2048&&(a=null,t.alternate!==null&&(a=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==a&&(t.refCount++,a!=null&&La(a)));break;case 12:if(a&2048){Lu(e,t,n,r),a=t.stateNode;try{var o=t.memoizedProps,s=o.id,c=o.onPostCommit;typeof c==`function`&&c(s,t.alternate===null?`mount`:`update`,a.passiveEffectDuration,-0)}catch(e){gf(t,t.return,e)}}else Lu(e,t,n,r);break;case 31:Lu(e,t,n,r);break;case 13:Lu(e,t,n,r);break;case 23:break;case 22:o=t.stateNode,s=t.alternate,t.memoizedState===null?(i&&s!==null&&s.memoizedState!==null&&Xl(t),o._visibility&2?Lu(e,t,n,r):(o._visibility|=2,zu(e,t,n,r,!!(t.subtreeFlags&10256)||!1))):(i&&s!==null&&s.memoizedState===null&&Xl(s),o._visibility&2?Lu(e,t,n,r):Bu(e,t)),a&2048&&Fu(s,t);break;case 24:Lu(e,t,n,r),a&2048&&Iu(t.alternate,t);break;case 30:i&&(a=t.alternate,a!==null&&(Ul(a.child,!0),Ul(t.child,!0))),Lu(e,t,n,r);break;default:Lu(e,t,n,r)}}function zu(e,t,n,r,i){for(i&&=!!(t.subtreeFlags&10256)||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:zu(a,o,s,c,i),_l(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,zu(a,o,s,c,i)):u._visibility&2?zu(a,o,s,c,i):Bu(a,o),i&&l&2048&&Fu(o.alternate,o);break;case 24:zu(a,o,s,c,i),i&&l&2048&&Iu(o.alternate,o);break;default:zu(a,o,s,c,i)}t=t.sibling}}function Bu(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:Bu(n,r),i&2048&&Fu(r.alternate,r);break;case 24:Bu(n,r),i&2048&&Iu(r.alternate,r);break;default:Bu(n,r)}t=t.sibling}}var Vu=8192;function Hu(e,t,n){if(e.subtreeFlags&Vu)for(e=e.child;e!==null;)Uu(e,t,n),e=e.sibling}function Uu(e,t,n){switch(e.tag){case 26:Hu(e,t,n),e.flags&Vu&&(e.memoizedState===null?(e=e.stateNode,(t&335544128)===t&&nh(n,e)):rh(n,Eu,e.memoizedState,e.memoizedProps));break;case 5:Hu(e,t,n),e.flags&Vu&&(e=e.stateNode,(t&335544128)===t&&nh(n,e));break;case 3:case 4:var r=Eu;Eu=Tm(e.stateNode.containerInfo),Hu(e,t,n),Eu=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Vu,Vu=16777216,Hu(e,t,n),Vu=r):Hu(e,t,n));break;case 30:if((e.flags&Vu)!==0&&(r=e.memoizedProps.name,r!=null&&r!==`auto`)){var i=e.stateNode;i.paired=null,Il===null&&(Il=new Map),Il.set(r,i)}Hu(e,t,n);break;default:Hu(e,t,n)}}function Wu(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Gu(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];au=r,Ju(r,e)}Wu(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Ku(e),e=e.sibling}function Ku(e){switch(e.tag){case 0:case 11:case 15:Gu(e),e.flags&2048&&vl(9,e,e.return);break;case 3:Gu(e);break;case 12:Gu(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,qu(e)):Gu(e);break;default:Gu(e)}}function qu(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];au=r,Ju(r,e)}Wu(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:vl(8,t,t.return),qu(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,qu(t));break;default:qu(t)}e=e.sibling}}function Ju(e,t){for(;au!==null;){var n=au;switch(n.tag){case 0:case 11:case 15:vl(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:La(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,au=r;else a:for(n=e;au!==null;){r=au;var i=r.sibling,a=r.return;if(gu(r),r===n){au=null;break a}if(i!==null){i.return=a,au=i;break a}au=a}}}var Yu={getCacheForType:function(e){var t=ka(Fa),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return ka(Fa).controller.signal}},Xu=typeof WeakMap==`function`?WeakMap:Map,Zu=0,Qu=null,$u=null,ed=0,td=0,nd=null,rd=!1,id=!1,ad=!1,od=0,sd=0,cd=0,ld=0,ud=0,dd=0,fd=0,pd=null,md=null,hd=!1,gd=0,_d=0,vd=1/0,yd=null,bd=null,xd=0,Sd=null,Cd=null,wd=0,Td=0,Ed=null,Dd=null,Od=null,kd=null,Ad=null,jd=0,Md=null;function Nd(){return Zu&2&&ed!==0?ed&-ed:M.T===null?xt():Lf()}function Pd(){if(dd===0){if(!(ed&536870912)||ca){var e=ot;ot<<=1,!(ot&3932160)&&(ot=262144),dd=e}else dd=536870912}return e=Fo.current,e!==null&&(e.flags|=32),dd}function Fd(e,t){if(t!=null){var n=e.stateNode,r=n.ref;r===null&&(r=n.ref=zp(bi(e.memoizedProps,n))),kd===null&&(kd=[]),kd.push(t.bind(null,r))}}function Id(e,t,n){(e===Qu&&(td===2||td===9)||e.cancelPendingCommit!==null)&&(Ud(e,0),Bd(e,ed,dd,!1)),mt(e,n),(!(Zu&2)||e!==Qu)&&(e===Qu&&(!(Zu&2)&&(ld|=n),sd===4&&Bd(e,ed,dd,!1)),kf(e))}function Ld(e,t,n){if(Zu&6)throw Error(i(327));var r=!n&&!(t&127)&&(t&e.expiredLanes)===0||lt(e,t),a=r?Zd(e,t):Yd(e,t,!0),o=r;do{if(a===0){id&&!r&&Bd(e,t,0,!1);break}if(n=e.current.alternate,o&&!zd(n)){a=Yd(e,t,!1),o=!1;continue}if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=pd;var l=c.current.memoizedState.isDehydrated;if(l&&(Ud(c,s).flags|=256),s=Yd(c,s,!1),s!==2&&s!==6){if(ad&&!l){c.errorRecoveryDisabledLanes|=o,ld|=o,a=4;break a}o=md,md=a,o!==null&&(md===null?md=o:md.push.apply(md,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){Ud(e,0),Bd(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t&&(t&62914560)!==t)break;case 6:Bd(r,t,dd,!rd);break a;case 2:md=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=gd+300-We(),10<a)){if(Bd(r,t,dd,!rd),ct(r,0,!0)!==0)break a;wd=t,r.timeoutHandle=xp(Rd.bind(null,r,n,md,yd,hd,t,dd,ld,fd,rd,o,`Throttled`,-0,0),a);break a}Rd(r,n,md,yd,hd,t,dd,ld,fd,rd,o,null,-0,0)}break}while(1);kf(e)}function Rd(e,t,n,r,i,a,o,s,c,l,u,d,f,p){e.timeoutHandle=-1;var m=t.subtreeFlags,h=(a&335544064)===a;if(d=null,(h||m&8192||(m&16785408)==16785408)&&(d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:xn},Il=null,Uu(t,a,d),h&&(m=d,h=e.containerInfo,h=(h.nodeType===9?h:h.ownerDocument).__reactViewTransition,h!=null&&(m.count++,m.waitingForViewTransition=!0,m=sh.bind(m),h.finished.then(m,m))),m=(a&62914560)===a?gd-We():(a&4194048)===a?_d-We():0,m=ah(d,m),m!==null)){wd=a,e.cancelPendingCommit=m(af.bind(null,e,t,a,n,r,i,o,s,c,l,u,d,null,f,p)),Bd(e,a,o,!l);return}af(e,t,a,n,r,i,o,s,c,l,u,d)}function zd(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!Wr(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Bd(e,t,n,r){t=ut(e,t),t&=~ud,t&=~ld,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-tt(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&gt(e,n,t)}function Vd(){return Zu&6?!0:(Af(0,!1),!1)}function Hd(){if($u!==null){if(td===0)var e=$u.return;else e=$u,xa=ba=null,ds(e),lo=null,uo=0,e=$u;for(;e!==null;)gl(e.alternate,e),e=e.return;$u=null}}function Ud(e,t){var n=e.timeoutHandle;return n!==-1&&(e.timeoutHandle=-1,Sp(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),wd=0,Hd(),Qu=e,$u=n=Li(e.current,null),ed=t,td=0,nd=null,rd=!1,id=lt(e,t),ad=!1,fd=dd=ud=ld=cd=sd=0,md=pd=null,hd=!1,od=ut(e,t),Di(),n}function Wd(e,t){qo=null,M.H=bc,t===$a||t===to?(t=so(),td=3):t===eo?(t=so(),td=4):td=t===Fc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,nd=t,$u===null&&(sd=1,Ac(e,Gi(t,e.current)))}function Gd(){var e=Fo.current;return e===null?!0:(ed&4194048)===ed?Io===null:(ed&62914560)===ed||ed&536870912?e===Io:!1}function Kd(){var e=M.H;return M.H=bc,e===null?bc:e}function qd(){var e=M.A;return M.A=Yu,e}function Jd(){sd=4,rd||(ed&4194048)!==ed&&Fo.current!==null||(id=!0),!(cd&134217727)&&!(ld&134217727)||Qu===null||Bd(Qu,ed,dd,!1)}function Yd(e,t,n){var r=Zu;Zu|=2;var i=Kd(),a=qd();(Qu!==e||ed!==t)&&(yd=null,Ud(e,t)),t=!1;var o=sd;a:do try{if(td!==0&&$u!==null){var s=$u,c=nd;switch(td){case 8:Hd(),o=6;break a;case 3:case 2:case 9:case 6:Fo.current===null&&(t=!0);var l=td;if(td=0,nd=null,tf(e,s,c,l),n&&id){o=0;break a}break;default:l=td,td=0,nd=null,tf(e,s,c,l)}}Xd(),o=sd;break}catch(t){Wd(e,t)}while(1);return t&&e.shellSuspendCounter++,xa=ba=null,Zu=r,M.H=i,M.A=a,$u===null&&(Qu=null,ed=0,Di()),o}function Xd(){for(;$u!==null;)$d($u)}function Zd(e,t){var n=Zu;Zu|=2;var r=Kd(),a=qd();Qu!==e||ed!==t?(yd=null,vd=We()+500,Ud(e,t)):id=lt(e,t);a:do try{if(td!==0&&$u!==null){t=$u;var o=nd;b:switch(td){case 1:td=0,nd=null,tf(e,t,o,1);break;case 2:case 9:if(ro(o)){td=0,nd=null,ef(t);break}t=function(){td!==2&&td!==9||Qu!==e||(td=7),kf(e)},o.then(t,t);break a;case 3:td=7;break a;case 4:td=5;break a;case 7:ro(o)?(td=0,nd=null,ef(t)):(td=0,nd=null,tf(e,t,o,7));break;case 5:var s=null;switch($u.tag){case 26:s=$u.memoizedState;case 5:case 27:var c=$u;if(s?eh(s):c.stateNode.complete){td=0,nd=null;var l=c.sibling;if(l!==null)$u=l;else{var u=c.return;u===null?$u=null:($u=u,nf(u))}break b}}td=0,nd=null,tf(e,t,o,5);break;case 6:td=0,nd=null,tf(e,t,o,6);break;case 8:Hd(),sd=6;break a;default:throw Error(i(462))}}Qd();break}catch(t){Wd(e,t)}while(1);return xa=ba=null,M.H=r,M.A=a,Zu=n,$u===null?(Qu=null,ed=0,Di(),sd):0}function Qd(){for(;$u!==null&&!He();)$d($u)}function $d(e){var t=sl(e.alternate,e,od);e.memoizedProps=e.pendingProps,t===null?nf(e):$u=t}function ef(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=K(n,t,t.pendingProps,t.type,void 0,ed);break;case 11:t=K(n,t,t.pendingProps,t.type.render,t.ref,ed);break;case 5:ds(t);var r=t;r===oa&&(ca?(ma(r),r.tag===5&&r.stateNode!=null&&(sa=r.stateNode)):(ma(r),ca=!0));default:gl(n,t),t=$u=Ri(t,od),t=sl(n,t,od)}e.memoizedProps=e.pendingProps,t===null?nf(e):$u=t}function tf(e,t,n,r){xa=ba=null,ds(t),lo=null,uo=0;var i=t.return;try{if(Pc(e,i,t,n,ed)){sd=1,Ac(e,Gi(n,e.current)),$u=null;return}}catch(t){if(i!==null)throw $u=i,t;sd=1,Ac(e,Gi(n,e.current)),$u=null;return}t.flags&32768?(ca||r===1?e=!0:id||ed&536870912?e=!1:(rd=e=!0,(r===2||r===9||r===3||r===6)&&(r=Fo.current,r!==null&&r.tag===13&&(r.flags|=16384))),rf(t,e)):nf(t)}function nf(e){var t=e;do{if(t.flags&32768){rf(t,rd);return}e=t.return;var n=ml(t.alternate,t,od);if(n!==null){$u=n;return}if(t=t.sibling,t!==null){$u=t;return}$u=t=e}while(t!==null);sd===0&&(sd=5)}function rf(e,t){do{var n=hl(e.alternate,e);if(n!==null){n.flags&=32767,$u=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){$u=e;return}$u=e=n}while(e!==null);sd=6,$u=null}function af(e,t,n,r,a,o,s,c,l,u,d,f){e.cancelPendingCommit=null;do pf();while(xd!==0);if(Zu&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));e===Qu&&($u=Qu=null,ed=0),Cd=t,Sd=e,wd=n,Ed=a,Dd=r,of(e,t,n,s,c,l,f)}}function of(e,t,n,r,i,a,o){var s=t.lanes|t.childLanes;if(Td=s,s|=Ei,ht(e,n,s,r,i,a),kd=null,(n&335544064)===n?(Ad=Ba(e),r=10262):(Ad=null,r=10256),(t.subtreeFlags&r)!==0||(t.flags&r)!==0?(e.callbackNode=null,e.callbackPriority=0,Sf(Je,function(){return mf(),null})):(e.callbackNode=null,e.callbackPriority=0),Fl=!1,r=!!(t.flags&13878),t.subtreeFlags&13878||r){r=M.T,M.T=null,i=N.p,N.p=2,a=Zu,Zu|=4;try{uu(e,t,n)}finally{Zu=a,N.p=i,M.T=r}}xd=1,Fl?Od=Lp(o,e.containerInfo,Ad,lf,uf,cf,df,mf,sf,null,null):(lf(),uf(),df())}function sf(e){if(xd!==0){var t=Sd.onRecoverableError;t(e,{componentStack:null})}}function cf(){xd===3&&(xd=0,ju(Cd,Sd),xd=4)}function lf(){if(xd===1){xd=0;var e=Sd,t=Cd,n=wd,r=!!(t.flags&13878);if(t.subtreeFlags&13878||r){r=M.T,M.T=null;var i=N.p;N.p=2;var a=Zu;Zu|=4;try{su=cu=!1,Du(t,e,n),n=pp;var o=Xr(e.containerInfo),s=n.focusedElem,c=n.selectionRange;if(o!==s&&s&&s.ownerDocument&&Yr(s.ownerDocument.documentElement,s)){if(c!==null&&Zr(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=Jr(s,h),v=Jr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}xh=!!fp,pp=fp=null}finally{Zu=a,N.p=i,M.T=r}}e.current=t,xd=2}}function uf(){if(xd===2){xd=0;var e=Sd,t=Cd,n=!!(t.flags&8772);if(t.subtreeFlags&8772||n){n=M.T,M.T=null;var r=N.p;N.p=2;var i=Zu;Zu|=4;try{fu(e,t.alternate,t)}finally{Zu=i,N.p=r,M.T=n}}xd=3}}function df(){if(xd===4||xd===3){xd=0;var e=Od;Od=null,Ue();var t=Sd,n=Cd,r=wd,i=Dd,a=(r&335544064)===r?10262:10256;if((n.subtreeFlags&a)!==0||(n.flags&a)!==0?xd=5:(xd=0,Cd=Sd=null,ff(t,t.pendingLanes)),a=t.pendingLanes,a===0&&(bd=null),bt(r),n=n.stateNode,F&&typeof F.onCommitFiberRoot==`function`)try{F.onCommitFiberRoot($e,n,void 0,(n.current.flags&128)==128)}catch{}if(i!==null){n=M.T,a=N.p,N.p=2,M.T=null;try{for(var o=t.onRecoverableError,s=0;s<i.length;s++){var c=i[s];o(c.value,{componentStack:c.stack})}}finally{M.T=n,N.p=a}}if(i=kd,o=Ad,Ad=null,i!==null&&(kd=null,o===null&&(o=[]),e!==null))for(c=0;c<i.length;c++)n=(0,i[c])(o),n!==void 0&&e.finished.finally(n);wd&3&&pf(),kf(t),a=t.pendingLanes,r&261930&&a&42?t===Md?jd++:(jd=0,Md=t):(jd=0,Md=null),Af(0,!1)}}function ff(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,La(t)))}function pf(){return Od!==null&&(Od.skipTransition(),Od=null),lf(),uf(),df(),mf()}function mf(){if(xd!==5)return!1;var e=Sd,t=Td;Td=0;var n=bt(wd),r=M.T,a=N.p;try{N.p=32>n?32:n,M.T=null,n=Ed,Ed=null;var o=Sd,s=wd;if(xd=0,Cd=Sd=null,wd=0,Zu&6)throw Error(i(331));var c=Zu;if(Zu|=4,Ku(o.current),Ru(o,o.current,s,n),Zu=c,Af(0,!1),F&&typeof F.onPostCommitFiberRoot==`function`)try{F.onPostCommitFiberRoot($e,o)}catch{}return!0}finally{N.p=a,M.T=r,ff(e,t)}}function hf(e,t,n){t=Gi(n,t),t=Mc(e.stateNode,t,2),e=So(e,t,2),e!==null&&(mt(e,2),kf(e))}function gf(e,t,n){if(e.tag===3)hf(e,e,n);else for(;t!==null;){if(t.tag===3){hf(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(bd===null||!bd.has(r))){e=Gi(n,e),n=B(2),r=So(t,n,2),r!==null&&(Nc(n,r,t,e),mt(r,2),kf(r));break}}t=t.return}}function _f(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Xu;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(ad=!0,i.add(n),e=vf.bind(null,e,t,n),t.then(e,e))}function vf(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Qu===e&&(ed&n)===n&&(sd===4||sd===3&&(ed&62914560)===ed&&300>We()-gd?Zu&2?ud|=n:Ud(e,0):ud|=n,fd===ed&&(fd=0)),kf(e)}function yf(e,t){t===0&&(t=ft()),e=Ai(e,t),e!==null&&(mt(e,t),kf(e))}function bf(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),yf(e,n)}function xf(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),yf(e,n)}function Sf(e,t){return Be(e,t)}var Cf=null,wf=null,Tf=!1,Ef=!1,Df=!1,Of=0;function kf(e){e!==wf&&e.next===null&&(wf===null?Cf=wf=e:wf=wf.next=e),Ef=!0,Tf||(Tf=!0,If())}function Af(e,t){if(!Df&&Ef){Df=!0;do for(var n=!1,r=Cf;r!==null;){if(!t){if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-tt(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,Ff(r,a))}else a=ed,a=ct(r,r===Qu?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||lt(r,a)||(n=!0,Ff(r,a))}r=r.next}while(n);Df=!1}}function jf(){Mf()}function Mf(){Ef=Tf=!1;var e=0;Of!==0&&bp()&&(e=Of);for(var t=We(),n=null,r=Cf;r!==null;){var i=r.next,a=Nf(r,t);a===0?(r.next=null,n===null?Cf=i:n.next=i,i===null&&(wf=n)):(n=r,(e!==0||a&3)&&(Ef=!0)),r=i}xd!==0&&xd!==5||Af(e,!1),Of!==0&&(Of=0)}function Nf(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-tt(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=dt(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Qu,n=ed,n=ct(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(td===2||td===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Ve(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||lt(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&Ve(r),bt(n)){case 2:case 8:n=qe;break;case 32:n=Je;break;case 268435456:n=Xe;break;default:n=Je}return r=Pf.bind(null,e),n=Be(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&Ve(r),e.callbackPriority=2,e.callbackNode=null,2}function Pf(e,t){if(xd!==0&&xd!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(pf()&&e.callbackNode!==n)return null;var r=ed;return r=ct(e,e===Qu?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(Ld(e,r,t),Nf(e,We()),e.callbackNode!=null&&e.callbackNode===n?Pf.bind(null,e):null)}function Ff(e,t){if(pf())return null;Ld(e,t,!0)}function If(){Tp(function(){Zu&6?Be(Ke,jf):Mf()})}function Lf(){if(Of===0){var e=Ua;e===0&&(e=at,at<<=1,!(at&261888)&&(at=256)),Of=e}return Of}function Rf(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:bn(e)}function zf(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=Rf((i[Tt]||null).action),o=r.submitter;o&&(t=(t=o[Tt]||null)?Rf(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new Hn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(Of!==0){var e=new FormData(i,o);oc(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=new FormData(i,o),oc(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var Bf=0;Bf<_i.length;Bf++){var Vf=_i[Bf];vi(Vf.toLowerCase(),`on`+(Vf[0].toUpperCase()+Vf.slice(1)))}vi(li,`onAnimationEnd`),vi(ui,`onAnimationIteration`),vi(di,`onAnimationStart`),vi(`dblclick`,`onDoubleClick`),vi(`focusin`,`onFocus`),vi(`focusout`,`onBlur`),vi(fi,`onTransitionRun`),vi(pi,`onTransitionStart`),vi(mi,`onTransitionCancel`),vi(hi,`onTransitionEnd`),Ut(`onMouseEnter`,[`mouseout`,`mouseover`]),Ut(`onMouseLeave`,[`mouseout`,`mouseover`]),Ut(`onPointerEnter`,[`pointerout`,`pointerover`]),Ut(`onPointerLeave`,[`pointerout`,`pointerover`]),Ht(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),Ht(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),Ht(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),Ht(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),Ht(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),Ht(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var Hf=`abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting`.split(` `),Uf=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(Hf));function Wf(e,t){t=!!(t&4);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Ci(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Ci(e)}i.currentTarget=null,a=c}}}}function Gf(e,t){var n=t[Dt];n===void 0&&(n=t[Dt]=new Set);var r=e+`__bubble`;n.has(r)||(Yf(t,e,2,!1),n.add(r))}function Kf(e,t,n){var r=0;t&&(r|=4),Yf(n,e,r,t)}var qf=`_reactListening`+Math.random().toString(36).slice(2);function Jf(e){if(!e[qf]){e[qf]=!0,Bt.forEach(function(t){t!==`selectionchange`&&(Uf.has(t)||Kf(t,!1,e),Kf(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[qf]||(t[qf]=!0,Kf(`selectionchange`,!1,t))}}function Yf(e,t,n,r){switch(Oh(t)){case 2:var i=Sh;break;case 8:i=Ch;break;default:i=wh}n=i.bind(null,t,n,e),i=void 0,!jn||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function Xf(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;c!==null;){if(s=Pt(c),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=a=s;continue a}c=c.parentNode}}r=r.return}On(function(){var r=a,i=Cn(n),s=[];a:{var c=gi.get(e);if(c!==void 0){var l=Hn,u=e;switch(e){case`keypress`:if(Ln(n)===0)break a;case`keydown`:case`keyup`:l=or;break;case`focusin`:u=`focus`,l=Zn;break;case`focusout`:u=`blur`,l=Zn;break;case`beforeblur`:case`afterblur`:l=Zn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=Yn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=Xn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=lr;break;case li:case ui:case di:l=Qn;break;case hi:l=ur;break;case`scroll`:case`scrollend`:l=Wn;break;case`wheel`:l=dr;break;case`copy`:case`cut`:case`paste`:l=$n;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=sr;break;case`submit`:l=cr;break;case`toggle`:case`beforetoggle`:l=fr}var d=!!(t&4),f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=kn(m,p),g!=null&&d.push(Zf(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),s.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(l=e===`mouseover`||e===`pointerover`,c=e===`mouseout`||e===`pointerout`,l&&n!==Sn&&(u=n.relatedTarget||n.fromElement)&&(Pt(u)||u[Et]))break a;(c||l)&&(u=i.window===i?i:(l=i.ownerDocument)?l.defaultView||l.parentWindow:window,c?(l=n.relatedTarget||n.toElement,c=r,l=l?Pt(l):null,l!==null&&(f=o(l),d=l.tag,l!==f||d!==5&&d!==27&&d!==6)&&(l=null)):(c=null,l=r),c!==l&&(d=Yn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=sr,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=c==null?u:It(c),h=l==null?u:It(l),u=new d(g,m+`leave`,c,n,i),u.target=f,u.relatedTarget=h,g=null,Pt(i)===r&&(d=new d(p,m+`enter`,l,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,d=c&&l?E(c,l,$f):null,c!==null&&ep(s,u,c,d,!1),l!==null&&f!==null&&ep(s,f,l,d,!0)))}a:{if(c=r?It(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var _=Mr;else if(Er(c)){if(Nr)_=Hr;else{_=Br;var v=zr}}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&_n(r.elementType)&&(_=Mr):_=Vr;if(_&&=_(e,r)){Dr(s,_,n,i);break a}v&&v(e,c,r)}switch(v=r?It(r):window,e){case`focusin`:(Er(v)||v.contentEditable===`true`)&&($r=v,ei=r,ti=null);break;case`focusout`:ti=ei=$r=null;break;case`mousedown`:ni=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:ni=!1,ri(s,n,i);break;case`selectionchange`:if(Qr)break;case`keydown`:case`keyup`:ri(s,n,i)}var y;if(mr)b:{switch(e){case`compositionstart`:var b=`onCompositionStart`;break b;case`compositionend`:b=`onCompositionEnd`;break b;case`compositionupdate`:b=`onCompositionUpdate`;break b}b=void 0}else Sr?br(e,n)&&(b=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(b=`onCompositionStart`);b&&(_r&&n.locale!==`ko`&&(Sr||b!==`onCompositionStart`?b===`onCompositionEnd`&&Sr&&(y=In()):(Nn=i,Pn=`value`in Nn?Nn.value:Nn.textContent,Sr=!0)),v=Qf(r,b),0<v.length&&(b=new er(b,e,null,n,i),s.push({event:b,listeners:v}),y?b.data=y:(y=xr(n),y!==null&&(b.data=y)))),(y=gr?Cr(e,n):wr(e,n))&&(b=Qf(r,`onBeforeInput`),0<b.length&&(v=new er(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:v,listeners:b}),v.data=y)),zf(s,e,r,n,i)}Wf(s,t)})}function Zf(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Qf(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=kn(e,n),i!=null&&r.unshift(Zf(e,i,a)),i=kn(e,t),i!=null&&r.push(Zf(e,i,a))),e.tag===3)return r;e=e.return}return[]}function $f(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function ep(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=kn(n,a),l!=null&&o.unshift(Zf(n,l,c))):i||(l=kn(n,a),l!=null&&o.push(Zf(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var tp=/\r\n?/g,np=/\u0000|\uFFFD/g;function rp(e){return(typeof e==`string`?e:``+e).replace(tp,`
15
+ `).replace(np,``)}function ip(e,t){return t=rp(t),rp(e)===t}function ap(e,t,n,r,a,o){switch(n){case`children`:if(typeof r==`string`)t===`body`||t===`textarea`&&r===``||pn(e,r);else if(typeof r==`number`||typeof r==`bigint`)t!==`body`&&pn(e,``+r);else return;break;case`className`:Zt(e,`class`,r);break;case`tabIndex`:Zt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Zt(e,n,r);break;case`style`:gn(e,r,o);return;case`data`:if(t!==`object`){Zt(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=bn(r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}if(typeof o==`function`&&(n===`formAction`?(t!==`input`&&ap(e,t,`name`,a.name,a,null),ap(e,t,`formEncType`,a.formEncType,a,null),ap(e,t,`formMethod`,a.formMethod,a,null),ap(e,t,`formTarget`,a.formTarget,a,null)):(ap(e,t,`encType`,a.encType,a,null),ap(e,t,`method`,a.method,a,null),ap(e,t,`target`,a.target,a,null))),r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=bn(r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=xn);return;case`onScroll`:r!=null&&Gf(`scroll`,e);return;case`onScrollEnd`:r!=null&&Gf(`scrollend`,e);return;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));o?.__html!==n&&(e.innerHTML=n)}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=bn(r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`credentialless`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:Gf(`beforetoggle`,e),Gf(`toggle`,e),Xt(e,`popover`,r);break;case`xlinkActuate`:Qt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Qt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Qt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Qt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Qt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Qt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Qt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Qt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Qt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Xt(e,`is`,r);break;case`innerText`:case`textContent`:return;default:if(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)n=vn.get(n)||n,Xt(e,n,r);else return}Jt=!0}function op(e,t,n,r,a,o){switch(n){case`style`:gn(e,r,o);return;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));o?.__html!==n&&(e.innerHTML=n)}}break;case`children`:if(typeof r==`string`)pn(e,r);else if(typeof r==`number`||typeof r==`bigint`)pn(e,``+r);else return;break;case`onScroll`:r!=null&&Gf(`scroll`,e);return;case`onScrollEnd`:r!=null&&Gf(`scrollend`,e);return;case`onClick`:r!=null&&(e.onclick=xn);return;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:return;case`innerText`:case`textContent`:return;default:if(!Vt.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),o=n.slice(2,a?n.length-7:void 0),t=e[Tt]||null,t=t==null?null:t[n],typeof t==`function`&&e.removeEventListener(o,t,a),typeof r==`function`)){typeof t!=`function`&&t!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(o,r,a);break a}Jt=!0,n in e?e[n]=r:!0===r?e.setAttribute(n,``):Xt(e,n,r)}return}Jt=!0}function sp(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:Gf(`error`,e),Gf(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:ap(e,t,o,s,n,null)}}a&&ap(e,t,`srcSet`,n.srcSet,n,null),r&&ap(e,t,`src`,n.src,n,null);return;case`input`:Gf(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:ap(e,t,r,d,n,null)}}cn(e,o,c,l,u,s,a,!1);return;case`select`:for(a in Gf(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:ap(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&un(e,!!r,n,!0):un(e,!!r,t,!1);return;case`textarea`:for(s in Gf(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:ap(e,t,s,c,n,null)}fn(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:ap(e,t,l,r,n,null)}return;case`dialog`:Gf(`beforetoggle`,e),Gf(`toggle`,e),Gf(`cancel`,e),Gf(`close`,e);break;case`iframe`:case`object`:Gf(`load`,e);break;case`video`:case`audio`:for(r=0;r<Hf.length;r++)Gf(Hf[r],e);break;case`image`:Gf(`error`,e),Gf(`load`,e);break;case`details`:Gf(`toggle`,e);break;case`embed`:case`source`:case`link`:Gf(`error`,e),Gf(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:ap(e,t,u,r,n,null)}return;default:if(_n(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&op(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&ap(e,t,c,r,n,null))}var cp={};function lp(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||ap(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:m!==f&&(Jt=!0),o=m;break;case`name`:m!==f&&(Jt=!0),a=m;break;case`checked`:m!==f&&(Jt=!0),u=m;break;case`defaultChecked`:m!==f&&(Jt=!0),d=m;break;case`value`:m!==f&&(Jt=!0),s=m;break;case`defaultValue`:m!==f&&(Jt=!0),c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&ap(e,t,p,m,r,f)}}sn(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||ap(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:o!==l&&(Jt=!0),p=o;break;case`defaultValue`:o!==l&&(Jt=!0),c=o;break;case`multiple`:o!==l&&(Jt=!0),s=o;default:o!==l&&ap(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?un(e,!!n,n?[]:``,!1):un(e,!!n,t,!0)):un(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:ap(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:a!==o&&(Jt=!0),p=a;break;case`defaultValue`:a!==o&&(Jt=!0),m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&ap(e,t,s,a,r,o)}dn(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:ap(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:p!==m&&(Jt=!0),e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:ap(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&ap(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:ap(e,t,u,p,r,m)}return;default:if(_n(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&op(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||op(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&ap(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||ap(e,t,f,p,r,m)}function up(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function dp(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&up(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&up(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var fp=null,pp=null;function mp(e){return e.nodeType===9?e:e.ownerDocument}function hp(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function gp(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function _p(e,t,n,r){return n=mp(n).createElement(e),n[wt]=r,n[Tt]=t,sp(n,e,t),Rt(n),n}function vp(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var yp=null;function bp(){var e=window.event;return e&&e.type===`popstate`?e!==yp&&(yp=e,!0):(yp=null,!1)}var xp=typeof setTimeout==`function`?setTimeout:void 0,Sp=typeof clearTimeout==`function`?clearTimeout:void 0,Cp=typeof Promise==`function`?Promise:void 0,wp=typeof requestAnimationFrame==`function`?requestAnimationFrame:xp,Tp=typeof queueMicrotask==`function`?queueMicrotask:Cp===void 0?xp:function(e){return Cp.resolve(null).then(e).catch(Ep)};function Ep(e){setTimeout(function(){throw e})}function Dp(e){return e===`head`}function Op(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8){if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),qh(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)Sm(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,Sm(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[jt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&Sm(e.ownerDocument.body)}n=i}while(n);qh(t)}function kp(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8){if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++}n=r}while(n)}function Ap(e,t,n){if(t=CSS.escape(t)===t?t:`r-`+btoa(t).replace(/=/g,``),e.style.viewTransitionName=t,n!=null&&(e.style.viewTransitionClass=n),n=getComputedStyle(e),n.display===`inline`){if(t=e.getClientRects(),t.length===1)var r=1;else for(var i=r=0;i<t.length;i++){var a=t[i];0<a.width&&0<a.height&&r++}r===1&&(e=e.style,e.display=t.length===1?`inline-block`:`block`,e.marginTop=`-`+n.paddingTop,e.marginBottom=`-`+n.paddingBottom)}}function jp(e,t){e=e.style,t=t.style;var n=t==null?null:t.hasOwnProperty(`viewTransitionName`)?t.viewTransitionName:t.hasOwnProperty(`view-transition-name`)?t[`view-transition-name`]:null;e.viewTransitionName=n==null||typeof n==`boolean`?``:(``+n).trim(),n=t==null?null:t.hasOwnProperty(`viewTransitionClass`)?t.viewTransitionClass:t.hasOwnProperty(`view-transition-class`)?t[`view-transition-class`]:null,e.viewTransitionClass=n==null||typeof n==`boolean`?``:(``+n).trim(),e.display===`inline-block`&&(t==null?e.display=e.margin=``:(n=t.display,e.display=n==null||typeof n==`boolean`?``:n,n=t.margin,n==null?(n=t.hasOwnProperty(`marginTop`)?t.marginTop:t[`margin-top`],e.marginTop=n==null||typeof n==`boolean`?``:n,t=t.hasOwnProperty(`marginBottom`)?t.marginBottom:t[`margin-bottom`],e.marginBottom=t==null||typeof t==`boolean`?``:t):e.margin=n))}function Mp(e,t,n){return n=n.ownerDocument.defaultView,{rect:e,abs:t.position===`absolute`||t.position===`fixed`,clip:t.clipPath!==`none`||t.overflow!==`visible`||t.filter!==`none`||t.mask!==`none`||t.mask!==`none`||t.borderRadius!==`0px`,view:0<=e.bottom&&0<=e.right&&e.top<=n.innerHeight&&e.left<=n.innerWidth}}function Np(e){return Mp(e.getBoundingClientRect(),getComputedStyle(e),e)}function Pp(e){var t=e.getBoundingClientRect();t=new DOMRect(t.x+2e4,t.y+2e4,t.width,t.height);var n=getComputedStyle(e);return Mp(t,n,e)}function Fp(e){return e.documentElement.clientHeight}function Ip(e){this.addEventListener(`load`,e),this.addEventListener(`error`,e)}function Lp(e,t,n,r,i,a,o,s,c){var l=t.nodeType===9?t:t.ownerDocument;try{var u=l.startViewTransition({update:function(){var t=l.defaultView,n=t.navigation&&t.navigation.transition,o=l.fonts.status;r();var s=[];if(o===`loaded`&&(Fp(l),l.fonts.status===`loading`&&s.push(l.fonts.ready)),o=s.length,e!==null)for(var c=e.suspenseyImages,u=0,d=0;d<c.length;d++){var f=c[d];if(!f.complete){var p=f.getBoundingClientRect();if(0<p.bottom&&0<p.right&&p.top<t.innerHeight&&p.left<t.innerWidth){if(u+=th(f),u>ih){s.length=o;break}f=new Promise(Ip.bind(f)),s.push(f)}}}if(0<s.length)return t=Promise.race([Promise.all(s),new Promise(function(e){return setTimeout(e,500)})]).then(i,i),(n?Promise.allSettled([n.finished,t]):t).then(a,a);if(i(),n)return n.finished.then(a,a);a()},types:n});l.__reactViewTransition=u;var d=[];return u.ready.then(function(){for(var e=l.documentElement.getAnimations({subtree:!0}),t=0;t<e.length;t++){var n=e[t],r=n.effect,i=r.pseudoElement;if(i!=null&&i.startsWith(`::view-transition`)){d.push(n),n=r.getKeyframes();for(var a=i=void 0,s=!0,c=0;c<n.length;c++){var u=n[c],f=u.width;if(i===void 0)i=f;else if(i!==f){s=!1;break}if(f=u.height,a===void 0)a=f;else if(a!==f){s=!1;break}delete u.width,delete u.height,u.transform===`none`&&delete u.transform}s&&i!==void 0&&a!==void 0&&(r.setKeyframes(n),s=getComputedStyle(r.target,r.pseudoElement),s.width!==i||s.height!==a)&&(s=n[0],s.width=i,s.height=a,s=n[n.length-1],s.width=i,s.height=a,r.setKeyframes(n))}}o()},function(e){l.__reactViewTransition===u&&(l.__reactViewTransition=null);try{if(typeof e==`object`&&e)switch(e.name){case`InvalidStateError`:(e.message===`View transition was skipped because document visibility state is hidden.`||e.message===`Skipping view transition because document visibility state has become hidden.`||e.message===`Skipping view transition because viewport size changed.`||e.message===`Transition was aborted because of invalid state`)&&(e=null)}e!==null&&c(e)}finally{r(),i(),o()}}),u.finished.finally(function(){for(var e=0;e<d.length;e++)d[e].cancel();l.__reactViewTransition===u&&(l.__reactViewTransition=null),s()}),u}catch{return r(),i(),o(),null}}function Rp(e,t){this._scope=document.documentElement,this._selector=`::view-transition-`+e+`(`+t+`)`}Rp.prototype.animate=function(e,t){return t=typeof t==`number`?{duration:t}:D({},t),t.pseudoElement=this._selector,this._scope.animate(e,t)},Rp.prototype.getAnimations=function(){for(var e=this._scope,t=this._selector,n=e.getAnimations({subtree:!0}),r=[],i=0;i<n.length;i++){var a=n[i].effect;a!==null&&a.target===e&&a.pseudoElement===t&&r.push(n[i])}return r},Rp.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function zp(e){return{name:e,group:new Rp(`group`,e),imagePair:new Rp(`image-pair`,e),old:new Rp(`old`,e),new:new Rp(`new`,e)}}function Bp(e){this._fragmentFiber=e,this._observers=this._eventListeners=null}Bp.prototype.addEventListener=function(e,t,n){var r=null,i=null;if(!(n!=null&&typeof n!=`boolean`&&(r=n.signal||null,r!==null&&r.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var a=this._eventListeners;if(Gp(a,e,t,n)===-1){var o=this,s=t;n!=null&&typeof n!=`boolean`&&!0===n.once&&(s=function(r){o.removeEventListener(e,t,n),typeof t==`function`?t.call(this,r):t.handleEvent(r)}),r!==null&&(i=o.removeEventListener.bind(o,e,t,n),r.addEventListener(`abort`,i,{once:!0}),i=r.removeEventListener.bind(r,`abort`,i)),r=Up(n),a.push({type:e,listener:t,optionsOrUseCapture:n,attachedListener:s,cleanup:i}),p(this._fragmentFiber.child,!1,Vp,e,s,r)}this._eventListeners=a}};function Vp(e,t,n,r){return b(e).addEventListener(t,n,r),!1}Bp.prototype.removeEventListener=function(e,t,n){var r=this._eventListeners;if(r!==null&&(t=Gp(r,e,t,n),t!==-1)){var i=r[t];n=i.attachedListener;var a=i.cleanup;i=Up(i.optionsOrUseCapture),p(this._fragmentFiber.child,!1,Hp,e,n,i),r.splice(t,1),a!==null&&a()}};function Hp(e,t,n,r){return b(e).removeEventListener(t,n,r),!1}function Up(e){return e!=null&&typeof e!=`boolean`&&(!0===e.once||e.signal instanceof AbortSignal)?{capture:e.capture,passive:e.passive}:e}function Wp(e){return e==null?`c=0`:typeof e==`boolean`?`c=`+(e?`1`:`0`):`c=`+(e.capture?`1`:`0`)}function Gp(e,t,n,r){if(e.length===0)return-1;r=Wp(r);for(var i=0;i<e.length;i++){var a=e[i];if(a.type===t&&a.listener===n&&Wp(a.optionsOrUseCapture)===r)return i}return-1}Bp.prototype.dispatchEvent=function(e){var t=h(this._fragmentFiber);if(t===null)return!0;t=b(t);var n=this._eventListeners;if(n!==null&&0<n.length||!e.bubbles){var r=t.nodeType===9?t.createComment(``):document.createTextNode(``);if(n)for(var i=0;i<n.length;i++){var a=n[i];r.addEventListener(a.type,a.attachedListener,Up(a.optionsOrUseCapture))}if(t.appendChild(r),e=r.dispatchEvent(e),n)for(i=0;i<n.length;i++)a=n[i],r.removeEventListener(a.type,a.attachedListener,Up(a.optionsOrUseCapture));return t.removeChild(r),e}return t.dispatchEvent(e)},Bp.prototype.focus=function(e){p(this._fragmentFiber.child,!0,Kp,e,void 0,void 0)};function Kp(e,t){return e.tag!==6&&(e=b(e),vm(e,t))}Bp.prototype.focusLast=function(e){var t=[];p(this._fragmentFiber.child,!0,qp,t,void 0,void 0);for(var n=t.length-1;0<=n&&!Kp(t[n],e);n--);};function qp(e,t){return t.push(e),!1}Bp.prototype.blur=function(){var e=h(this._fragmentFiber);e!==null&&(e=b(e),e=mp(e).activeElement,e!==null&&p(this._fragmentFiber.child,!1,Jp,e,void 0,void 0))};function Jp(e,t){return e.tag!==6&&(e=b(e),e===t||e.contains(t)?(t.blur(),!0):!1)}Bp.prototype.observeUsing=function(e){this._observers===null&&(this._observers=new Set),this._observers.add(e),p(this._fragmentFiber.child,!1,Yp,e,void 0,void 0)};function Yp(e,t){return e.tag!==6&&(e=b(e),t.observe(e),!1)}Bp.prototype.unobserveUsing=function(e){var t=this._observers;if(t!==null&&t.has(e)){t.delete(e),p(this._fragmentFiber.child,!1,Xp,e,void 0,void 0);for(var n=t=0;n<Zp.length;n++){var r=Zp[n];r.fragmentInstance===this&&r.observer===e?e.unobserve(r.instance):Zp[t++]=r}Zp.length=t}};function Xp(e,t){return e.tag!==6&&(e=b(e),t.unobserve(e),!1)}var Zp=[],Qp=!1;function $p(e,t,n){Zp.push({fragmentInstance:e,observer:t,instance:n}),Qp||(Qp=!0,ym(function(){Qp=!1;var e=Zp;Zp=[];for(var t=0;t<e.length;t++){var n=e[t];n.observer.unobserve(n.instance)}}))}Bp.prototype.getClientRects=function(){var e=[];return p(this._fragmentFiber.child,!1,em,e,void 0,void 0),e};function em(e,t){if(e.tag===6){e=e.stateNode;var n=e.ownerDocument.createRange();n.selectNodeContents(e),t.push.apply(t,n.getClientRects())}else e=b(e),t.push.apply(t,e.getClientRects());return!1}Bp.prototype.getRootNode=function(e){var t=h(this._fragmentFiber);return t===null?this:b(t).getRootNode(e)},Bp.prototype.compareDocumentPosition=function(e){var t=h(this._fragmentFiber);if(t===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var n=[];p(this._fragmentFiber.child,!1,qp,n,void 0,void 0);var r=b(t);if(n.length===0){if(n=r,_(this._fragmentFiber)){a:{for(t=this._fragmentFiber.return;t!==null;){if(t.tag===4){t=t.stateNode.containerInfo;break a}if(t.tag===3||t.tag===5||t.tag===27)break;t=t.return}t=null}t!=null&&(n=t)}t=this._fragmentFiber;var i=r=n.compareDocumentPosition(e);return n===e?i=Node.DOCUMENT_POSITION_CONTAINS:r&Node.DOCUMENT_POSITION_CONTAINED_BY&&(n=v(t)[1],n===null?i=Node.DOCUMENT_POSITION_PRECEDING:(e=b(n).compareDocumentPosition(e),i=e===0||e&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),i|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}t=b(n[0]),i=b(n[n.length-1]);var a=_(this._fragmentFiber)?t.parentElement:r;if(a==null)return Node.DOCUMENT_POSITION_DISCONNECTED;r=a.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY,a=a.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_CONTAINED_BY;var o=t.compareDocumentPosition(e),s=i.compareDocumentPosition(e),c=o&Node.DOCUMENT_POSITION_CONTAINED_BY||s&Node.DOCUMENT_POSITION_CONTAINED_BY;return s=r&&a&&o&Node.DOCUMENT_POSITION_FOLLOWING&&s&Node.DOCUMENT_POSITION_PRECEDING,t=r&&t===e||a&&i===e||c||s?Node.DOCUMENT_POSITION_CONTAINED_BY:!r&&t===e||!a&&i===e?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:o,t&Node.DOCUMENT_POSITION_DISCONNECTED||t&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||tm(t,this._fragmentFiber,n[0],n[n.length-1],e)?t:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function tm(e,t,n,r,i){var a=Pt(i);if(e&Node.DOCUMENT_POSITION_CONTAINED_BY){if(n=!!a)a:{for(;a!==null;){if(a.tag===7&&(a===t||a.alternate===t)){n=!0;break a}a=a.return}n=!1}return n}if(e&Node.DOCUMENT_POSITION_CONTAINS){if(a===null)return a=i.ownerDocument,i===a||i===a.documentElement||i===a.body;a:{for(a=t,t=h(t);a!==null;){if(!(a.tag!==5&&a.tag!==3&&a.tag!==27||a!==t&&a.alternate!==t)){a=!0;break a}a=a.return}a=!1}return a}return e&Node.DOCUMENT_POSITION_PRECEDING?((t=!!a)&&!(t=a===n)&&(t=E(n,a,T),t===null?t=!1:(p(t,!0,C,a,n),a=x,x=null,t=a!==null)),t):e&Node.DOCUMENT_POSITION_FOLLOWING?((t=!!a)&&!(t=a===r)&&(t=E(r,a,T),t===null?t=!1:(p(t,!0,w,a,r),a=x,S=x=null,t=a!==null)),t):!1}function nm(e,t){var n=e.ownerDocument.createRange();n.selectNodeContents(e),e=n.getBoundingClientRect(),window.scrollTo(window.scrollX+e.left,t?window.scrollY+e.top:window.scrollY+e.bottom-window.innerHeight)}Bp.prototype.scrollIntoView=function(e){if(typeof e==`object`)throw Error(i(566));var t=[];p(this._fragmentFiber.child,!1,qp,t,void 0,void 0);var n=!1!==e;if(t.length===0){var r=v(this._fragmentFiber);if(r=n?r[1]||r[0]||h(this._fragmentFiber):r[0]||r[1],r===null)return;if(r.tag===6){e=b(r),nm(e,n);return}if(r=b(r),r.nodeType!==9){if(r.nodeType===11){n=`host`in r?r.host:null,n!==null&&n.scrollIntoView(e);return}r.scrollIntoView(e)}}for(r=n?t.length-1:0;r!==(n?-1:t.length);){var a=t[r];a.tag===6?(a=b(a),nm(a,n)):b(a).scrollIntoView(e),r+=n?-1:1}};function rm(e,t){return e=b(e),im(e,t),!1}function im(e,t){e.reactFragments??=new Set,e.reactFragments.add(t)}function am(e,t){var n=t._eventListeners;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];e.addEventListener(i.type,i.attachedListener,Up(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){for(var r=0,i=0;i<Zp.length;i++){var a=Zp[i];(a.fragmentInstance!==t||a.observer!==n||a.instance!==e)&&(Zp[r++]=a)}Zp.length=r,n.observe(e)}),im(e,t))}function om(e,t){var n=t._eventListeners;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];e.removeEventListener(i.type,i.attachedListener,Up(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){typeof n.rootMargin==`string`?$p(t,n,e):n.unobserve(e)}),e.reactFragments!=null&&e.reactFragments.delete(t))}function sm(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:sm(n),Nt(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function cm(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r){if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e}else if(!e[jt])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=mm(e.nextSibling),e===null)break}return null}function lm(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=mm(e.nextSibling),e===null))return null;return e}function um(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=mm(e.nextSibling),e===null))return null;return e}function dm(e){return e.data===`$?`||e.data===`$~`}function fm(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function pm(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function mm(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var hm=null;function gm(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return mm(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function _m(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function vm(e,t){function n(){r=!0}if(e.ownerDocument.activeElement===e)return!0;var r=!1;try{e.ownerDocument.addEventListener(`focus`,n,!0),(e.focus||HTMLElement.prototype.focus).call(e,t)}finally{e.ownerDocument.removeEventListener(`focus`,n,!0)}return r}function ym(e){wp(function(){wp(function(t){return e(t)})})}function bm(e,t,n){switch(t=mp(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function xm(e,t,n){for(var r in n){var i=n[r];n.hasOwnProperty(r)&&i!=null&&ap(e,t,r,null,cp,i)}n.dangerouslySetInnerHTML!=null&&(e.textContent=``),e.onclick===xn&&(e.onclick=null),Nt(e)}function Sm(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Nt(e)}var Cm=new Map,wm=new Set;function Tm(e){if(typeof e.getRootNode==`function`){var t=e.getRootNode();if(t.nodeType===9||t.nodeType===11)return t}return e.nodeType===9?e:e.ownerDocument}var Em=N.d;N.d={f:Dm,r:Om,D:jm,C:Mm,L:Nm,m:Pm,X:Im,S:Fm,M:Lm};function Dm(){var e=Em.f(),t=Vd();return e||t}function Om(e){var t=Ft(e);t!==null&&t.tag===5&&t.type===`form`?cc(t):Em.r(e)}var km=typeof document>`u`?null:document;function Am(e,t,n){var r=km;if(r&&typeof t==`string`&&t){var i=on(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),wm.has(i)||(wm.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),sp(t,`link`,e),Rt(t),r.head.appendChild(t)))}}function jm(e){Em.D(e),Am(`dns-prefetch`,e,null)}function Mm(e,t){Em.C(e,t),Am(`preconnect`,e,t)}function Nm(e,t,n){Em.L(e,t,n);var r=km;if(r&&e&&t){var i=`link[rel="preload"][as="`+on(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+on(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+on(n.imageSizes)+`"]`)):i+=`[href="`+on(e)+`"]`;var a=i;switch(t){case`style`:a=zm(e);break;case`script`:a=Um(e)}if(!(Cm.has(a)||(e=D({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),Cm.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Bm(a))||t===`script`&&r.querySelector(Wm(a))))){var o=r.createElement(`link`);sp(o,`link`,e),t===`style`&&(o[Mt]=!0,o.onload=o.onerror=function(){zt(o)}),Rt(o),r.head.appendChild(o)}}}function Pm(e,t){Em.m(e,t);var n=km;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+on(r)+`"][href="`+on(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Um(e)}if(!Cm.has(a)&&(e=D({rel:`modulepreload`,href:e},t),Cm.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Wm(a)))return}r=n.createElement(`link`),sp(r,`link`,e),Rt(r),n.head.appendChild(r)}}}function Fm(e,t,n){Em.S(e,t,n);var r=km;if(r&&e){var i=Lt(r).hoistableStyles,a=zm(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Bm(a)))s.loading=5;else{e=D({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=Cm.get(a))&&qm(e,n);var c=o=r.createElement(`link`);Rt(c),sp(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Km(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Im(e,t){Em.X(e,t);var n=km;if(n&&e){var r=Lt(n).hoistableScripts,i=Um(e),a=r.get(i);a||(a=n.querySelector(Wm(i)),a||(e=D({src:e,async:!0},t),(t=Cm.get(i))&&Jm(e,t),a=n.createElement(`script`),Rt(a),sp(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Lm(e,t){Em.M(e,t);var n=km;if(n&&e){var r=Lt(n).hoistableScripts,i=Um(e),a=r.get(i);a||(a=n.querySelector(Wm(i)),a||(e=D({src:e,async:!0,type:`module`},t),(t=Cm.get(i))&&Jm(e,t),a=n.createElement(`script`),Rt(a),sp(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Rm(e,t,n,r){var a=(a=Ee.current)?Tm(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(n=zm(n.href),t=Lt(a).hoistableStyles,r=t.get(n),r||(r={type:`style`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=zm(n.href);var o=Lt(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Bm(e)))?o._p||(s.instance=o,s.state.loading=5):(o=Cm.get(e),o||(o={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Cm.set(e,o)),Hm(a,e,o,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(n=Um(n),t=Lt(a).hoistableScripts,r=t.get(n),r||(r={type:`script`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function zm(e){return`href="`+on(e)+`"`}function Bm(e){return`link[rel="stylesheet"][`+e+`]`}function Vm(e){return D({},e,{"data-precedence":e.precedence,precedence:null})}function Hm(e,t,n,r){if(t=e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)){if(!0!==t[Mt]){r.loading=1;return}}else t=e.createElement(`link`),t[Mt]=!0,t.onload=t.onerror=zt.bind(null,t),sp(t,`link`,n),Rt(t),e.head.appendChild(t);r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2})}function Um(e){return`[src="`+on(e)+`"]`}function Wm(e){return`script[async]`+e}function Gm(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+on(n.href)+`"]`);if(r)return t.instance=r,Rt(r),r;var a=D({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),Rt(r),sp(r,`style`,a),Km(r,n.precedence,e),t.instance=r;case`stylesheet`:a=zm(n.href);var o=e.querySelector(Bm(a));if(o)return t.state.loading|=4,t.instance=o,Rt(o),o;r=Vm(n),(a=Cm.get(a))&&qm(r,a),o=(e.ownerDocument||e).createElement(`link`),Rt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),sp(o,`link`,r),t.state.loading|=4,Km(o,n.precedence,e),t.instance=o;case`script`:return o=Um(n.src),(a=e.querySelector(Wm(o)))?(t.instance=a,Rt(a),a):(r=n,(a=Cm.get(o))&&(r=D({},n),Jm(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),Rt(a),sp(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Km(r,n.precedence,e));return t.instance}function Km(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function qm(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Jm(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Ym=null;function Xm(e,t,n){if(Ym===null){var r=new Map,i=Ym=new Map;i.set(n,r)}else i=Ym,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[jt]||a[wt]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function Zm(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Qm(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function $m(e,t){return e===`img`&&t.src!=null&&t.src!==``&&t.onLoad==null&&t.loading!==`lazy`}function eh(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function th(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio==`number`?devicePixelRatio:1)*.25}function nh(e,t){typeof t.decode==`function`&&(e.imgCount++,t.complete||(e.imgBytes+=th(t),e.suspenseyImages.push(t)),e=ch.bind(e),t.decode().then(e,e))}function rh(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=zm(r.href),a=t.querySelector(Bm(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=sh.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,Rt(a);return}a=t.ownerDocument||t,r=Vm(r),(i=Cm.get(i))&&qm(r,i),a=a.createElement(`link`),Rt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),sp(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=sh.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var ih=0;function ah(e,t){return e.stylesheets&&e.count===0&&uh(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&uh(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&ih===0&&(ih=62500*dp());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&uh(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>ih?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function oh(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)uh(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function sh(){this.count--,oh(this)}function ch(){this.imgCount--,oh(this)}var lh=null;function uh(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,lh=new Map,t.forEach(dh,e),lh=null,sh.call(e))}function dh(e,t){if(!(t.state.loading&4)){var n=lh.get(e);if(n)var r=n.get(null);else{n=new Map,lh.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=sh.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var fh={$$typeof:ie,Provider:null,Consumer:null,_currentValue:ye,_currentValue2:ye,_threadCount:0};function ph(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=pt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=pt(0),this.hiddenUpdates=pt(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.transitionTypes=null,this.incompleteTransitions=new Map}function mh(e,t,n,r,i,a,o,s,c,l,u,d){return e=new ph(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=Fi(3,null,null,t),e.current=a,a.stateNode=e,t=Ia(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},yo(a),e}function hh(e){return e?(e=Ni,e):Ni}function gh(e,t,n,r,i,a){i=hh(i),r.context===null?r.context=i:r.pendingContext=i,r=xo(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=So(e,r,t),n!==null&&(Id(n,e,t),Co(n,e,t))}function _h(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function vh(e,t){_h(e,t),(e=e.alternate)&&_h(e,t)}function yh(e){if(e.tag===13||e.tag===31){var t=Ai(e,67108864);t!==null&&Id(t,e,67108864),vh(e,67108864)}}function bh(e){if(e.tag===13||e.tag===31){var t=Nd();t=yt(t);var n=Ai(e,t);n!==null&&Id(n,e,t),vh(e,t)}}var xh=!0;function Sh(e,t,n,r){var i=M.T;M.T=null;var a=N.p;try{N.p=2,wh(e,t,n,r)}finally{N.p=a,M.T=i}}function Ch(e,t,n,r){var i=M.T;M.T=null;var a=N.p;try{N.p=8,wh(e,t,n,r)}finally{N.p=a,M.T=i}}function wh(e,t,n,r){if(xh){var i=Th(r);if(i===null)Xf(e,t,r,Eh,n),Lh(e,r);else if(zh(i,e,t,n,r))r.stopPropagation();else if(Lh(e,r),t&4&&-1<Ih.indexOf(e)){for(;i!==null;){var a=Ft(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=I(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-tt(o);s.entanglements[1]|=c,o&=~c}kf(a),!(Zu&6)&&(vd=We()+500,Af(0,!1))}}break;case 31:case 13:s=Ai(a,2),s!==null&&Id(s,a,2),Vd(),vh(a,2)}if(a=Th(r),a===null&&Xf(e,t,r,Eh,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Xf(e,t,r,null,n)}}function Th(e){return e=Cn(e),Dh(e)}var Eh=null;function Dh(e){if(Eh=null,e=Pt(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Eh=e,null}function Oh(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`fullscreenerror`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`resize`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(Ge()){case Ke:return 2;case qe:return 8;case Je:case Ye:return 32;case Xe:return 268435456;default:return 32}default:return 32}}var kh=!1,Ah=null,jh=null,Mh=null,Nh=new Map,Ph=new Map,Fh=[],Ih=`mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset`.split(` `);function Lh(e,t){switch(e){case`focusin`:case`focusout`:Ah=null;break;case`dragenter`:case`dragleave`:jh=null;break;case`mouseover`:case`mouseout`:Mh=null;break;case`pointerover`:case`pointerout`:Nh.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:Ph.delete(t.pointerId)}}function Rh(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=Ft(t),t!==null&&yh(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function zh(e,t,n,r,i){switch(t){case`focusin`:return Ah=Rh(Ah,e,t,n,r,i),!0;case`dragenter`:return jh=Rh(jh,e,t,n,r,i),!0;case`mouseover`:return Mh=Rh(Mh,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return Nh.set(a,Rh(Nh.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,Ph.set(a,Rh(Ph.get(a)||null,e,t,n,r,i)),!0}return!1}function Bh(e){var t=Pt(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,St(e.priority,function(){bh(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,St(e.priority,function(){bh(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Vh(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Th(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Sn=r,n.target.dispatchEvent(r),Sn=null}else return t=Ft(n),t!==null&&yh(t),e.blockedOn=n,!1;t.shift()}return!0}function Hh(e,t,n){Vh(e)&&n.delete(t)}function Uh(){kh=!1,Ah!==null&&Vh(Ah)&&(Ah=null),jh!==null&&Vh(jh)&&(jh=null),Mh!==null&&Vh(Mh)&&(Mh=null),Nh.forEach(Hh),Ph.forEach(Hh)}function Wh(e,n){e.blockedOn===n&&(e.blockedOn=null,kh||(kh=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Uh)))}var Gh=null;function Kh(e){Gh!==e&&(Gh=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Gh===e&&(Gh=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(Dh(r||n)===null)continue;break}var a=Ft(n);a!==null&&(e.splice(t,3),t-=3,oc(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function qh(e){function t(t){return Wh(t,e)}Ah!==null&&Wh(Ah,e),jh!==null&&Wh(jh,e),Mh!==null&&Wh(Mh,e),Nh.forEach(t),Ph.forEach(t);for(var n=0;n<Fh.length;n++){var r=Fh[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Fh.length&&(n=Fh[0],n.blockedOn===null);)Bh(n),n.blockedOn===null&&Fh.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[Tt]||null;if(typeof a==`function`)o||Kh(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[Tt]||null)s=o.formAction;else if(Dh(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Kh(n)}}}function Jh(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Yh(e){this._internalRoot=e}Xh.prototype.render=Yh.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;gh(n,Nd(),e,t,null,null)},Xh.prototype.unmount=Yh.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;gh(e.current,2,null,e,null,null),Vd(),t[Et]=null}};function Xh(e){this._internalRoot=e}Xh.prototype.unstable_scheduleHydration=function(e){if(e){var t=xt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Fh.length&&t!==0&&t<Fh[n].priority;n++);Fh.splice(n,0,e),n===0&&Bh(e)}};var Zh=n.version;if(Zh!==`19.3.0`)throw Error(i(527,Zh,`19.3.0`));N.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=u(t),e=e===null?null:d(e),e=e===null?null:e.stateNode,e};var Qh={bundleType:0,version:`19.3.0`,rendererPackageName:`react-dom`,currentDispatcherRef:M,reconcilerVersion:`19.3.0`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var $h=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!$h.isDisabled&&$h.supportsFiber)try{$e=$h.inject(Qh),F=$h}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Dc,s=Oc,c=kc;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=mh(e,1,!1,null,null,n,r,null,o,s,c,Jh),e[Et]=t.current,Jf(e),new Yh(t)}})),v=s(((e,t)=>{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=_()})),y=u(f(),1),b=v(),x=Object.defineProperty,S=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),C=(e,t)=>{let n={};for(var r in e)x(n,r,{get:e[r],enumerable:!0});return t&&x(n,Symbol.toStringTag,{value:`Module`}),n},w=new Set([`https://json-schema.org/draft/2019-09/schema`,`http://json-schema.org/draft/2019-09/schema`]);function T(e){return typeof e==`string`&&w.has(e.replace(/#$/,``))}function E(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function D(e,t=`|`){return e.map(e=>xe(e)).join(t)}function ee(e,t){return typeof t==`bigint`?t.toString():t}var O=class{constructor(e){this._getter=e,this._value=void 0}get value(){let e=this._getter;return e!==void 0&&(this._value=e(),this._getter=void 0),this._value}};function k(e){return new O(e)}function A(e){return e==null}function te(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function ne(e,t){let n=e/t,r=Math.round(n),i=4*2**-52*Math.max(Math.abs(n),1);return Math.abs(n-r)<i?0:n-r}var re=Symbol(`evaluating`);function ie(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==re)return r===void 0&&(r=re,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function ae(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function oe(e){let t=Object.getOwnPropertyDescriptor(e,`shape`);return t?.get?t.get.raw:t?.value}function se(e){return oe(e._zod.def)??e._zod.def.shape}function ce(e,t,n){Object.defineProperty(e,t,{get(){let e=n();return ae(this,t,e),e},enumerable:!0,configurable:!0})}function j(e,t,n){t in e?ae(e,t,n):e[t]=n}function le(e,t,n,r){let i=se(t);for(let a of n){let n=Object.getOwnPropertyDescriptor(i,a);n.enumerable&&(n.get?ce(e,a,()=>{let e=t._zod.def.shape[a];return r?r(e,a):e}):j(e,a,r?r(n.value,a):n.value))}}function ue(e,t){for(let n of Reflect.ownKeys(t)){let r=Object.getOwnPropertyDescriptor(t,n);r.enumerable&&(r.get?ce(e,n,()=>t[n]):j(e,n,r.value))}}function de(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function fe(e){return JSON.stringify(e)}function pe(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var me=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function he(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var ge=k(()=>{if(ut.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function _e(e){if(he(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return he(n)!==!1&&Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)!==!1}function ve(e){return _e(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}var M=new Set([`string`,`number`,`symbol`]),N=new Set([`string`,`number`,`bigint`,`boolean`,`symbol`,`undefined`]);function ye(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function be(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function P(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function xe(e){return typeof e==`bigint`?e.toString()+`n`:typeof e==`string`?`"${e}"`:`${e}`}function Se(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout===`optional`)}var Ce={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},we={int64:[BigInt(`-9223372036854775808`),BigInt(`9223372036854775807`)],uint64:[BigInt(0),BigInt(`18446744073709551615`)]};function Te(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);let i={};return le(i,e,Ee(e,t)),be(e,de(n,{shape:i,checks:[]}))}function Ee(e,t){let n=se(e),r=[];for(let e of Reflect.ownKeys(t)){if(!Object.getOwnPropertyDescriptor(n,e)?.enumerable)throw Error(`Unrecognized key: "${String(e)}"`);t[e]&&r.push(e)}return r}function De(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);let i=new Set(Ee(e,t)),a={};return le(a,e,Reflect.ownKeys(se(e)).filter(e=>!i.has(e))),be(e,de(n,{shape:a,checks:[]}))}function Oe(e,t){if(!_e(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=se(e);for(let e of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return be(e,de(e._zod.def,{shape:ke(e,t)}))}function ke(e,t){let n={};return le(n,e,Reflect.ownKeys(se(e))),ue(n,t),n}function Ae(e,t){if(!_e(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return be(e,de(e._zod.def,{shape:ke(e,t)}))}function je(e,t){if(!t?._zod?.def)throw Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);let n={};return le(n,e,Reflect.ownKeys(se(e))),le(n,t,Reflect.ownKeys(se(t))),be(e,de(e._zod.def,{shape:n,get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function Me(e,t,n,r=`partial`){let i=t._zod.def.checks;if(i&&i.length>0)throw Error(`.${r}() cannot be used on object schemas containing refinements`);let a=n?new Set(Ee(t,n)):void 0,o={};return le(o,t,Reflect.ownKeys(se(t)),e&&((t,n)=>a&&!a.has(n)?t:new e({type:`optional`,innerType:t}))),be(t,de(t._zod.def,{shape:o,checks:[]}))}function Ne(e,t,n){let r=n?new Set(Ee(t,n)):void 0,i={};return le(i,t,Reflect.ownKeys(se(t)),(t,n)=>r&&!r.has(n)?t:new e({type:`nonoptional`,innerType:t})),be(t,de(t._zod.def,{shape:i}))}function Pe(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function Fe(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function Ie(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function Le(e){return typeof e==`string`?e:e?.message}function Re(e,t,n){var r;for(let i=t;i<e.length;i++)(r=e[i]).schema??(r.schema=n)}function ze(e,t,n){var r;let i=e.inst?._zod?.traits;i?.has(`$ZodType`)&&(i.has(`$ZodCheck`)?(r=e).schema??(r.schema=e.inst):e.schema=e.inst);let a=e.schema===e.inst?void 0:e.schema?._zod.def?.error,o=e.message?e.message:Le(e.inst?._zod.def?.error?.(e))??Le(a?.(e))??Le(t?.error?.(e))??Le(n.customError?.(e))??Le(n.localeError?.(e))??`Invalid input`,s={};for(let t of Object.keys(e))t!==`inst`&&t!==`schema`&&t!==`continue`&&t!==`input`&&t!==`__proto__`&&(s[t]=e[t]);return s.path??=[],s.message=o,t?.reportInput&&(s.input=e.input),s}var Be=/[\uD800-\uDBFF]/;function Ve(e){let t=e.length;if(!Be.test(e))return t;let n=t;for(let r=0;r<t-1;r++)(e.charCodeAt(r)&64512)==55296&&(e.charCodeAt(r+1)&64512)==56320&&(n--,r++);return n}function He(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function Ue(e){let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`nan`:`number`;case`object`:{if(e===null)return`null`;if(Array.isArray(e))return`array`;let t=e;if(t&&Object.getPrototypeOf(t)!==Object.prototype&&`constructor`in t&&t.constructor)return t.constructor.name}}return t}function We(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}function Ge(e,t){for(let n in t){let r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):Ye(e,n,r.value)}}function Ke(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function qe(e,t,n){return Ke(e,t,n,!1)}function Je(e,t){for(let n in e){let r=e[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!0,get(){return Ke(this,n,r(this))},set(e){Ke(this,n,e)}})}return t}function Ye(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:Ke(this,t,n.bind(this))},set(e){Ke(this,t,e)}})}function Xe(e,t){let n=Object.getPrototypeOf(e);return t in n?void 0:n}var Ze,Qe=!1,$e={configurable:!0,get(){Qe=!0}};function F(e,t,n){let r=Object.getPrototypeOf(e._zod);if(t in r&&Ze!==e._zod){Ze=void 0;return}Ze=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,$e);let e=Qe;Qe=!1;try{let r=n(this);return Qe?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:r}),Qe||=e,r}catch(n){throw delete this[t],Qe||=e,n}},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})}function et(e,t,n,r){let i=Xe(e,t);i&&Object.defineProperty(i,t,{configurable:!0,get(){let e={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,t,e),e.value=n(this),Object.defineProperty(this,t,e),e.value},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:r,value:e})}})}var tt=`~constantCatch`;function nt(e){let t=()=>e;return t[tt]=!0,t}var rt,it=Object.freeze({status:`aborted`}),at={value:void 0,enumerable:!1},ot=`captureStackTrace`in Error?Error:null;function st(e){let t=ot;if(t){let n=t.stackTraceLimit;if(typeof n==`number`){try{t.stackTraceLimit=0}catch{return ot=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function I(e,t,n,r){let i={};function a(e){this.def=e,this.constr=d,this.traits=new Set}a.prototype=i;let o=n,s=o&&new WeakSet;function c(n,r){if(!n._zod){at.value=new a(r);try{Object.defineProperty(n,"_zod",at)}finally{at.value=void 0}}else if(n._zod.traits.has(e))return;if(n._zod.traits.add(e),t(n,r),s){let e=Object.getPrototypeOf(n),t=n._zod.constr.prototype,r=e;for(;r&&r!==t;)r=Object.getPrototypeOf(r);let i=r??e;s.has(i)||(s.add(i),Ge(i,o))}let i=d.prototype;for(let e in i)Object.prototype.hasOwnProperty.call(i,e)&&(e in n||(n[e]=i[e].bind(n)))}let l=r?.Parent??Object;class u extends l{}Object.defineProperty(u,"name",{value:e});function d(e){let t=r?.Parent?st(u):this;c(t,e);let n=t._zod.deferred;if(n){for(let e of n)e();t._zod.deferred=void 0}let i=globalThis.__zod_globalConfig?.postProcessor;return i&&i(t),t}return Object.defineProperty(d,"init",{value:c}),Object.defineProperty(d,Symbol.hasInstance,{value:t=>r?.Parent&&t instanceof r.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(d,"name",{value:e}),d}var ct=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},lt=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};(rt=globalThis).__zod_globalConfig??(rt.__zod_globalConfig={});var ut=globalThis.__zod_globalConfig;function dt(e){return e&&Object.assign(ut,e),ut}function ft(){let e=this._zod;return e.message??=JSON.stringify(e.def,ee,2),e.message}function pt(e){this._zod.message=e}var mt={get:ft,set:pt,enumerable:!0,configurable:!0},ht={value:void 0,enumerable:!1},gt=new WeakSet([Object.prototype,Error.prototype]),_t=(e,t)=>{e.name=`$ZodError`,ht.value=t,Object.defineProperty(e,"issues",ht),ht.value=void 0,Object.defineProperty(e,"message",mt);let n=Object.getPrototypeOf(e);gt.has(n)||(gt.add(n),Object.defineProperty(n,"toString",{configurable:!0,enumerable:!1,get(){let e=()=>this.message;return Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0})}}))},vt=I(`$ZodError`,_t);I(`$ZodError`,_t,void 0,{Parent:Error});function yt(e,t,n){return Object.prototype.hasOwnProperty.call(e,t)||(t===`__proto__`?Object.defineProperty(e,t,{value:n(),writable:!0,enumerable:!0,configurable:!0}):e[t]=n()),e[t]}function bt(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?yt(n,i.path[0],()=>[]).push(t(i)):r.push(t(i));return{formErrors:r,fieldErrors:n}}function xt(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;i<e.length;){let n=e[i],o=i===e.length-1;if(n===`_errors`){o&&r._errors.push(t(a)),i++;continue}Object.prototype.hasOwnProperty.call(r,n)||Object.defineProperty(r,n,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});let s=r[n];o&&s._errors.push(t(a)),r=s,i++}}}};return r(e),n}function St(e,t){return{callee:t?.callee??e,Err:t?.Err}}var Ct=e=>{let t=(n,r,i,a)=>{let o=i?{...i,async:!1}:{async:!1},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new ct;if(s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>ze(e,o,dt())));throw me(n,a?.callee??t),n}return s.value};return t},wt=e=>{let t=async(n,r,i,a)=>{let o=i?{...i,async:!0}:{async:!0},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise&&(s=await s),s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>ze(e,o,dt())));throw me(n,a?.callee??t),n}return s.value};return t},Tt=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new ct;return a.issues.length?Et(e,a.issues,i):{success:!0,data:a.value}};function Et(e,t,n){let r;return{success:!1,get error(){return r||(r=new e(t.map(e=>ze(e,n,dt()))),t=void 0,n=void 0),r},set error(e){r=e,t=void 0,n=void 0}}}var Dt=e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?Et(e,a.issues,i):{success:!0,data:a.value}},Ot=Symbol.for(`zod.compile.invalid`),kt=Symbol.for(`zod.compile.fallback`),At=((e,t,n)=>{let r=e._zod.bag.validator;if(r!==void 0){if(r(t)!==Ot)return!0;if(r.definite===!0&&n===void 0)return!1}return jt(e,t,n)});function jt(e,t,n){let r=n?{...n,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},i=e._zod.bag.fallbackRun,a;if(i?(r[kt]=!0,a=i({value:t,issues:[]},r)):a=e._zod.run({value:t,issues:[]},r),a instanceof Promise)throw new ct;return a.issues.length===0}var Mt=async(e,t,n)=>{let r=n?{...n,async:!0,abortEarly:!0}:{async:!0,abortEarly:!0},i=e._zod.run({value:t,issues:[]},r);return i instanceof Promise&&(i=await i),i.issues.length===0},Nt=e=>{let t=Ct(e),n=(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return t(e,r,o,St(n,a))};return n},Pt=e=>{let t=Ct(e),n=(e,r,i,a)=>t(e,r,i,St(n,a));return n},Ft=e=>{let t=wt(e),n=async(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return await t(e,r,o,St(n,a))};return n},It=e=>{let t=wt(e),n=async(e,r,i,a)=>await t(e,r,i,St(n,a));return n},Lt=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Tt(e)(t,n,i)},Rt=e=>(t,n,r)=>Tt(e)(t,n,r),zt=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Dt(e)(t,n,i)},Bt=e=>async(t,n,r)=>Dt(e)(t,n,r),Vt=/^[cC][0-9a-z]{6,}$/,Ht=/^[0-9a-z]+$/,Ut=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,Wt=/^[0-9a-vA-V]{20}$/,Gt=/^[A-Za-z0-9]{27}$/,Kt=/^[a-zA-Z0-9_-]{21}$/;function qt(e){return RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}var Jt=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Yt=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Xt=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Zt=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Qt=`^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$`;function $t(){return new RegExp(Qt,`u`)}var en=/^(?:(?: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])$/,tn=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,nn=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,rn=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,an=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,on=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/,sn=/^https?$/,cn=/^\+[1-9]\d{6,14}$/,ln=`(?:(?:\\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])))`;function un(e){return RegExp(`^${e}$`)}var dn=un(ln);function fn(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:e.seconds?`${t}:[0-5]\\d(?:\\.\\d+)?`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function pn(e){return RegExp(`^${fn(e)}$`)}function mn(e){let t=[`Z`];e.offset&&t.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let n=`${fn({precision:e.precision,seconds:!0})}(?:${t.join(`|`)})`,r=e.local?`${n}|${fn({precision:e.precision})}`:n;return RegExp(`^${ln}T(?:${r})$`)}var hn=/^[\s\S]{0,}$/,gn=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},_n=/^-?\d+$/,vn=/^-?\d+(?:\.\d+)?$/,yn=/^(?:true|false)$/i,bn=/^null$/i,xn=/^undefined$/i,Sn=/^[^A-Z]*$/,Cn=/^[^a-z]*$/,wn=I(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Tn=e=>{let t=e.value;return!A(t)&&t.length!==void 0},En={number:`number`,bigint:`bigint`,object:`date`},Dn=I(`$ZodCheckLessThan`,(e,t)=>{wn.init(e,t);let n=En[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:En[typeof r.value]??n,code:`too_big`,maximum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),On=I(`$ZodCheckGreaterThan`,(e,t)=>{wn.init(e,t);let n=En[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:En[typeof r.value]??n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),kn=I(`$ZodCheckMultipleOf`,(e,t)=>{wn.init(e,t),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?t.value!==BigInt(0)&&n.value%t.value===BigInt(0):ne(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),An=I(`$ZodCheckNumberFormat`,(e,t)=>{wn.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=Ce[t.format];e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}s<i&&o.issues.push({origin:`number`,input:s,code:`too_small`,minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>a&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),jn=I(`$ZodCheckMaxLength`,(e,t)=>{var n;wn.init(e,t),(n=e._zod.def).when??(n.when=Tn),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>t.maximum?Ve(r):i)<=t.maximum)return;let a=He(r);n.issues.push({origin:a,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Mn=I(`$ZodCheckMinLength`,(e,t)=>{var n;wn.init(e,t),(n=e._zod.def).when??(n.when=Tn),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>=t.minimum&&i<t.minimum*2?Ve(r):i)>=t.minimum)return;let a=He(r);n.issues.push({origin:a,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Nn=I(`$ZodCheckLengthEquals`,(e,t)=>{var n;wn.init(e,t),(n=e._zod.def).when??(n.when=Tn),e._zod.check=n=>{let r=n.value,i=r.length,a=typeof r==`string`&&i>=t.length&&i<=t.length*2?Ve(r):i;if(a===t.length)return;let o=He(r),s=a>t.length;n.issues.push({origin:o,...s?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Pn=I(`$ZodCheckStringFormat`,(e,t)=>{var n,r;wn.init(e,t),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),Fn=I(`$ZodCheckRegex`,(e,t)=>{Pn.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),In=I(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=Sn,Pn.init(e,t)}),Ln=I(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=Cn,Pn.init(e,t)}),Rn=I(`$ZodCheckIncludes`,(e,t)=>{wn.init(e,t);let n=ye(t.includes);t.pattern=new RegExp(typeof t.position==`number`?`^.{${t.position},}${n}`:n),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),zn=I(`$ZodCheckStartsWith`,(e,t)=>{wn.init(e,t);let n=RegExp(`^${ye(t.prefix)}.*`);t.pattern??=n,e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),Bn=I(`$ZodCheckEndsWith`,(e,t)=>{wn.init(e,t);let n=RegExp(`.*${ye(t.suffix)}$`);t.pattern??=n,e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),Vn=I(`$ZodCheckOverwrite`,(e,t)=>{wn.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),Hn=class{constructor(e=[],t={}){this.content=[],this.indent=0,this.args=e,this.closed=t}indented(e){this.indent+=1;try{e(this)}finally{--this.indent}}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
16
+ `).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.content??[``];return new e(...Object.keys(this.closed),`return function (${this.args.join(`, `)}) {\n${t.join(`
17
+ `)}\n};`)(...Object.values(this.closed))}},Un={major:4,minor:6,patch:5},Wn=I(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Un;let r=e._zod.def.checks,i=e._zod.traits.has(`$ZodCheck`)?[e,...r??[]]:r?.length?[...r]:[];for(let t of i)for(let n of t._zod.onattach)n(e);if(i.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(t,n,r)=>{if(t.memo)return t;let i=Pe(t),a;for(let o of n){if(o._zod.def.when){if(Fe(t)||!o._zod.def.when(t))continue}else if(i)continue;let n=t.issues.length,s=o._zod.check(t);if(s instanceof Promise&&r?.async===!1)throw new ct;if(a||s instanceof Promise)a=(a??Promise.resolve()).then(async()=>{await s,t.issues.length!==n&&(Re(t.issues,n,e),i||=Pe(t,n))});else{if(t.issues.length===n)continue;Re(t.issues,n,e),i||=Pe(t,n)}}return a?a.then(()=>t):t},n=(n,r,a)=>{if(Pe(n))return n.aborted=!0,n;let o=t(r,i,a);if(o instanceof Promise){if(a.async===!1)throw new ct;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(r,a)=>{if(a.skipChecks)return e._zod.parse(r,a);if(a.direction===`backward`){let t=e._zod.parse({value:r.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,r,a)):n(t,r,a)}let o=e._zod.parse(r,a);if(o instanceof Promise){if(a.async===!1)throw new ct;return o.then(e=>t(e,i,a))}return t(o,i,a)}}},{get"~standard"(){return qe(this,`~standard`,qn(this))},set"~standard"(e){Ke(this,`~standard`,e)}}),Gn=(e,t)=>e.issues.length?{issues:e.issues.map(e=>ze(e,t,dt()))}:{value:e.value};async function Kn(e,t){let n={async:!0};return Gn(await e._zod.run({value:t,issues:[]},n),n)}function qn(e){return{validate:t=>{let n={async:!1};try{let r=e._zod.run({value:t,issues:[]},n);if(!(r instanceof Promise))return Gn(r,n)}catch{}return Kn(e,t)},vendor:`zod`,version:1}}var Jn=I(`$ZodString`,(e,t)=>{Wn.init(e,t),e._zod.pattern=t.pattern??hn,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),Yn=I(`$ZodStringFormat`,(e,t)=>{Pn.init(e,t),Jn.init(e,t)}),Xn=I(`$ZodGUID`,(e,t)=>{t.pattern??=Yt,Yn.init(e,t)}),Zn=I(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=Xt(e)}else t.pattern??=Xt();Yn.init(e,t)}),Qn=I(`$ZodEmail`,(e,t)=>{t.pattern??=Zt,Yn.init(e,t)});function $n(e){try{return typeof URL<`u`&&typeof URL.canParse==`function`?URL.canParse(e):(new URL(e),!0)}catch{return!1}}function er(e,t){return!(`normalize`in t)&&!(`hostname`in t)&&!(`protocol`in t)?$n(e)||2:tr(e,t)}function tr(e,t){if(!t.normalize&&t.protocol?.source===sn.source&&!/^https?:\/\//i.test(e))return 1;try{if(typeof URL<`u`){let t=URL;if(typeof t.parse==`function`)return t.parse(e)??2}return new URL(e)}catch{return 2}}var nr=/[\t\n\r]/g;function rr(e){return e.replace(nr,``)}function ir(e,t){return t.lastIndex=0,t.test(e.hostname)}function ar(e,t){return t.lastIndex=0,t.test(e.protocol.endsWith(`:`)?e.protocol.slice(0,-1):e.protocol)}var or=I(`$ZodURL`,(e,t)=>{Yn.init(e,t),e._zod.check=n=>{try{let r=n.value.trim(),i=er(r,t);if(i===1){n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid URL format`,input:n.value,inst:e,continue:!t.abort});return}if(i===2){n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort});return}if(i===!0){n.value=rr(r);return}t.hostname&&!ir(i,t.hostname)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort}),t.protocol&&!ar(i,t.protocol)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort}),n.value=t.normalize?i.href:rr(r);return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),sr=I(`$ZodEmoji`,(e,t)=>{t.pattern??=$t(),Yn.init(e,t)}),cr=I(`$ZodNanoID`,(e,t)=>{if(t.length!==void 0&&(!Number.isInteger(t.length)||t.length<1))throw Error(`Invalid nanoid length: ${t.length}`);t.pattern??=t.length===void 0?Kt:qt(t.length),Yn.init(e,t)}),lr=I(`$ZodCUID`,(e,t)=>{t.pattern??=Vt,Yn.init(e,t)}),ur=I(`$ZodCUID2`,(e,t)=>{t.pattern??=Ht,Yn.init(e,t)}),dr=I(`$ZodULID`,(e,t)=>{t.pattern??=Ut,Yn.init(e,t)}),fr=I(`$ZodXID`,(e,t)=>{t.pattern??=Wt,Yn.init(e,t)}),pr=I(`$ZodKSUID`,(e,t)=>{t.pattern??=Gt,Yn.init(e,t)}),mr=I(`$ZodISODateTime`,(e,t)=>{t.pattern??=mn(t),Yn.init(e,t)}),hr=I(`$ZodISODate`,(e,t)=>{t.pattern??=dn,Yn.init(e,t)}),gr=I(`$ZodISOTime`,(e,t)=>{t.pattern??=pn(t),Yn.init(e,t)}),_r=I(`$ZodISODuration`,(e,t)=>{t.pattern??=Jt,Yn.init(e,t)}),vr=I(`$ZodIPv4`,(e,t)=>{t.pattern??=en,Yn.init(e,t)}),yr=/^[0-9a-fA-F:.]+$/;function br(e){return yr.test(e)?$n(`http://[${e}]`):!1}var xr=I(`$ZodIPv6`,(e,t)=>{t.pattern??=tn,Yn.init(e,t),e._zod.check=n=>{br(n.value)||n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}),Sr=I(`$ZodCIDRv4`,(e,t)=>{t.pattern??=nn,Yn.init(e,t)});function Cr(e){let t=e.split(`/`);if(t.length!==2)return!1;let[n,r]=t;if(!r)return!1;let i=Number(r);return`${i}`!==r||i<0||i>128?!1:br(n)}var wr=I(`$ZodCIDRv6`,(e,t)=>{t.pattern??=rn,Yn.init(e,t),e._zod.check=n=>{Cr(n.value)||n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}});function Tr(e){if(e===``)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var Er=/^[0-9a-zA-Z+/]*={0,2}$/,Dr=I(`$ZodBase64`,(e,t)=>{t.pattern??=Er,Yn.init(e,t),e._zod.check=n=>{Tr(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}}),Or=/^[A-Za-z0-9_-]*$/;function kr(e){if(!Or.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return Tr(t.padEnd(Math.ceil(t.length/4)*4,`=`))}var Ar=I(`$ZodBase64URL`,(e,t)=>{t.pattern??=Or,Yn.init(e,t),e._zod.check=n=>{kr(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),jr=I(`$ZodE164`,(e,t)=>{t.pattern??=cn,Yn.init(e,t)});function Mr(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}var Nr=I(`$ZodJWT`,(e,t)=>{Yn.init(e,t),e._zod.check=n=>{Mr(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),Pr=I(`$ZodNumber`,(e,t)=>{Wn.init(e,t),e._zod.pattern=vn,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:String(i):void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),Fr=I(`$ZodNumberFormat`,(e,t)=>{An.init(e,t),Pr.init(e,t)}),Ir=I(`$ZodBoolean`,(e,t)=>{Wn.init(e,t),e._zod.pattern=yn,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i==`boolean`||n.issues.push({expected:`boolean`,code:`invalid_type`,input:i,inst:e}),n}}),Lr=I(`$ZodUndefined`,(e,t)=>{Wn.init(e,t),e._zod.pattern=xn,e._zod.values=new Set([void 0]),e._zod.parse=(t,n)=>{let r=t.value;return r===void 0||t.issues.push({expected:`undefined`,code:`invalid_type`,input:r,inst:e}),t}}),Rr=I(`$ZodNull`,(e,t)=>{Wn.init(e,t),e._zod.pattern=bn,e._zod.values=new Set([null]),e._zod.parse=(t,n)=>{let r=t.value;return r===null||t.issues.push({expected:`null`,code:`invalid_type`,input:r,inst:e}),t}}),zr=I(`$ZodAny`,(e,t)=>{Wn.init(e,t),e._zod.parse=e=>e}),Br=I(`$ZodUnknown`,(e,t)=>{Wn.init(e,t),e._zod.parse=e=>e}),Vr=I(`$ZodNever`,(e,t)=>{Wn.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)});function Hr(e,t,n){e.issues.length&&t.issues.push(...Ie(n,e.issues)),t.value[n]=e.value}var Ur=I(`$ZodArray`,(e,t)=>{Wn.init(e,t);let n=ut.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!Array.isArray(a))return r.issues.push({expected:`array`,code:`invalid_type`,input:a,inst:e}),r;r.value=n?n.alloc(e,r,Array(a.length),i):Array(a.length);let o=[],s=i?.abortEarly;for(let e=0;e<a.length;e++){let n=a[e],c=t.element._zod.run({value:n,issues:[]},i);if(c instanceof Promise)o.push(c.then(t=>Hr(t,r,e)));else if(Hr(c,r,e),s&&c.issues.length!==0&&Pe(c))break}return o.length?Promise.all(o).then(()=>r):r}});function Wr(e,t,n,r,i,a){let o=n in r,s=a===`optional`;if(o||!s||i!==`optional`){if(e.issues.length){if(i!==void 0&&s&&!o)return;t.issues.push(...Ie(n,e.issues))}if(!o&&i===void 0){e.issues.length||t.issues.push({code:`invalid_type`,expected:`nonoptional`,input:void 0,path:[n]});return}e.value===void 0?(o||i===`defaulted`&&!s)&&(t.value[n]=void 0):t.value[n]=e.value}}var Gr=[];function Kr(e){let t=Object.keys(e.shape),n=Object.getOwnPropertySymbols(e.shape),r=n.length?n:Gr,i=r.length?[...t,...r]:t;for(let t of i)if(!e.shape?.[t]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${String(t)}": expected a Zod schema`);let a=Se(e.shape);return{...e,allKeys:i,symbolKeys:r,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(a)}}function qr(e,t,n,r,i,a,o){let s=[],c=i.keySet,l=i.catchall._zod,u=l.def.type,d=l.optin,f=l.optout,p=0;for(let i in t){if(o&&n.issues.length!==p){if(Pe(n,p))break;p=n.issues.length}if(c.has(i))continue;if(i===`__proto__`){u===`never`&&s.push(i);continue}if(u===`never`){s.push(i);continue}let a=l.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>Wr(e,n,i,t,d,f))):Wr(a,n,i,t,d,f)}return s.length&&n.issues.push({code:`unrecognized_keys`,keys:s,input:t,inst:a,continue:!0}),e.length?Promise.all(e).then(()=>n):n}var Jr=I(`$ZodObject`,(e,t)=>{Wn.init(e,t);let n=Object.getOwnPropertyDescriptor(t,`shape`),r=n?.get?n.get.raw:t.shape??{};if(r){let e=()=>{let n={...r};return Object.defineProperty(t,"shape",{value:n}),e.raw=n,n};e.raw=r,Object.defineProperty(t,"shape",{get:e})}let i=k(()=>Kr(t));F(e,`propValues`,e=>{let t=e.def.shape,n={};for(let e in t){let r=t[e]._zod;if(r.values){Object.prototype.hasOwnProperty.call(n,e)||ae(n,e,new Set);for(let t of r.values)n[e].add(t);r.optin!==void 0&&n[e].add(void 0)}}return n});let a=he,o=t.catchall,s,c=ut.memoizer;c?.attach(e),e._zod.parse=(t,n)=>{s??=i.value;let r=t.value;if(!a(r))return t.issues.push({expected:`object`,code:`invalid_type`,input:r,inst:e}),t;t.value=c?c.alloc(e,t,{},n):{};let l=[],u=s.shape,d=n?.abortEarly,f=t.issues.length;for(let e of s.allKeys){if(d&&t.issues.length!==f){if(Pe(t,f))break;f=t.issues.length}if(e===`__proto__`)continue;let i=u[e],a=i._zod.optin,o=i._zod.optout,s=i._zod.run({value:r[e],issues:[]},n);s instanceof Promise?l.push(s.then(n=>Wr(n,t,e,r,a,o))):Wr(s,t,e,r,a,o)}return o?qr(l,r,t,n,i.value,e,d===!0):l.length?Promise.all(l).then(()=>t):t}}),Yr=I(`$ZodObjectJIT`,(e,t)=>{Jr.init(e,t);let n=e._zod.parse,r=k(()=>Kr(t)),i=ut.memoizer,a=t=>{let n=r.value,a=n.symbolKeys,o=new Hn([`payload`,`ctx`],{shape:t,inst:e,memo:i,syms:a}),s=e=>`shape[${e}]._zod.run({ value: input[${e}], issues: [] }, ctx)`,c=(e,t)=>`
18
+ let ${e}_ab = false;
19
+ for (let i = 0; i < ${e}.issues.length; i++) {
20
+ const iss = ${e}.issues[i];
21
+ iss.path = iss.path ? [${t}, ...iss.path] : [${t}];
22
+ payload.issues.push(iss);
23
+ if (iss.continue !== true) ${e}_ab = true;
24
+ }
25
+ if (${e}_ab && ctx && ctx.abortEarly) {
26
+ payload.value = newResult;
27
+ return payload;
28
+ }`;o.write(`const input = payload.value;`);let l=Object.create(null),u=0;for(let e of n.allKeys)l[e]=`key_${u++}`;o.write(i?`const newResult = memo.alloc(inst, payload, {}, ctx);`:`const newResult = {};`);for(let e of n.allKeys){if(e===`__proto__`)continue;let n=l[e],r=typeof e==`symbol`?`syms[${a.indexOf(e)}]`:fe(e),i=`${r} in input`,u=t[e],d=u?._zod?.optin,f=d!==void 0,p=u?._zod?.optout===`optional`;if(o.write(`const ${n} = ${s(r)};`),f&&p){let e=d===`optional`?`${n}_present`:`${n}.value !== undefined || ${n}_present`;o.write(`
29
+ const ${n}_present = ${i};
30
+ if (!${n}.issues.length || ${n}_present) {
31
+ if (${n}.issues.length) {${c(n,r)}
32
+ }
33
+
34
+ if (${e}) {
35
+ newResult[${r}] = ${n}.value;
36
+ }
37
+ }
38
+
39
+ `)}else f?(o.write(`
40
+ if (${n}.issues.length) {${c(n,r)}
41
+ }
42
+ `),d===`defaulted`?o.write(`newResult[${r}] = ${n}.value;`):o.write(`
43
+ if (${n}.value !== undefined || ${i}) {
44
+ newResult[${r}] = ${n}.value;
45
+ }
46
+ `)):o.write(`
47
+ const ${n}_present = ${i};
48
+ if (${n}.issues.length) {${c(n,r)}
49
+ }
50
+ if (!${n}_present && !${n}.issues.length) {
51
+ payload.issues.push({
52
+ code: "invalid_type",
53
+ expected: "nonoptional",
54
+ input: undefined,
55
+ path: [${r}]
56
+ });
57
+ if (ctx && ctx.abortEarly) {
58
+ payload.value = newResult;
59
+ return payload;
60
+ }
61
+ }
62
+
63
+ if (${n}_present) {
64
+ newResult[${r}] = ${n}.value;
65
+ }
66
+
67
+ `)}return o.write(`payload.value = newResult;`),o.write(`return payload;`),o.compile()},o,s=he,c=!ut.jitless,l=c&&ge.value,u=t.catchall,d;e._zod.parse=(i,f)=>{d??=r.value;let p=i.value;return s(p)?c&&l&&f?.async===!1&&f.jitless!==!0?(o||=a(t.shape),i=o(i,f),u?qr([],p,i,f,d,e,f?.abortEarly===!0):i):n(i,f):(i.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),i)}});function Xr(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!Pe(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>ze(e,r,dt())))}),t)}var Zr=I(`$ZodUnion`,(e,t)=>{Wn.init(e,t),F(e,`optin`,e=>e.def.options.some(e=>e._zod.optin===`defaulted`)?`defaulted`:e.def.options.some(e=>e._zod.optin!==void 0)?`optional`:void 0),F(e,`optout`,e=>e.def.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),F(e,`values`,e=>{if(e.def.options.every(e=>e._zod.values))return new Set(e.def.options.flatMap(e=>Array.from(e._zod.values)))}),F(e,`pattern`,e=>{if(e.def.options.every(e=>e._zod.pattern)){let t=e.def.options.map(e=>e._zod.pattern);return RegExp(`^(${t.map(e=>te(e.source)).join(`|`)})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);if(t instanceof Promise)o.push(t),a=!0;else{if(t.issues.length===0)return t;o.push(t)}}return a?Promise.all(o).then(t=>Xr(t,r,e,i)):Xr(o,r,e,i)}});function Qr(e){let t=new Map;for(let n of e.options){let r=n._zod.propValues?.[e.discriminator];if(!r||r.size===0)throw Error(`Invalid discriminated union option at index "${e.options.indexOf(n)}"`);for(let e of r)if(t.has(e)){if(e!==void 0)throw Error(`Duplicate discriminator value "${String(e)}"`);t.set(e,null)}else t.set(e,n)}return t}var $r=I(`$ZodDiscriminatedUnion`,(e,t)=>{t.inclusive=!1,Zr.init(e,t);let n=e._zod.parse;F(e,`propValues`,e=>{let t={},n=0;for(let r of e.def.options){let i=r._zod.propValues;if(!i||Object.keys(i).length===0)throw Error(`Invalid discriminated union option at index "${e.def.options.indexOf(r)}"`);i[e.def.discriminator]?.has(void 0)&&n++;for(let[e,n]of Object.entries(i)){Object.prototype.hasOwnProperty.call(t,e)||ae(t,e,new Set);for(let r of n)t[e].add(r)}}return!e.def.unionFallback&&n>1&&t[e.def.discriminator]?.delete(void 0),t}),t.options.forEach((e,n)=>{let r=oe(e._zod.def);if(r&&!Object.prototype.hasOwnProperty.call(r,t.discriminator))throw Error(`Invalid discriminated union option at index "${n}"`)});let r=k(()=>Qr(t));e._zod.parse=(i,a)=>{let o=i.value;if(!he(o))return i.issues.push({code:`invalid_type`,expected:`object`,input:o,inst:e}),i;let s=o?.[t.discriminator],c=r.value.get(s);return c&&(s!==void 0||a.direction!==`backward`)?c._zod.run(i,a):t.unionFallback||a.direction===`backward`?n(i,a):(i.issues.push({code:`invalid_union`,errors:[],note:`No matching discriminator`,discriminator:t.discriminator,options:Array.from(r.value.keys()).filter(e=>r.value.get(e)!==null),input:o,path:[t.discriminator],inst:e}),i)}}),ei=I(`$ZodIntersection`,(e,t)=>{Wn.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>ni(e,t,n)):ni(e,i,a)}});function ti(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(_e(e)&&_e(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};Object.prototype.hasOwnProperty.call(i,`__proto__`)&&delete i.__proto__;for(let n of r){if(n===`__proto__`)continue;let r=ti(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=ti(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function ni(e,t,n){let r=new Map,i,a=new Map,o=(e,t)=>{let n;if(e.code===`unrecognized_keys`&&!e.path?.length)i??=e,n=e.keys;else if(e.code===`invalid_key`&&e.origin===`record`&&e.path?.length===1){let t=String(e.path[0]);a.has(t)||a.set(t,e),n=[t]}else return!1;for(let e of n)r.has(e)||r.set(e,{}),r.get(e)[t]=!0;return!0};for(let n of t.issues)o(n,`l`)||e.issues.push(n);for(let t of n.issues)o(t,`r`)||e.issues.push(t);let s=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(s.length){let t=i?s.filter(e=>i.keys.includes(e)):[];t.length&&e.issues.push({...i,keys:t});for(let n of s)!t.includes(n)&&a.has(n)&&e.issues.push(a.get(n))}let c=ti(t.value,n.value);if(!c.valid){if(Pe(e))return e;throw Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`)}return e.value=c.data,e}var ri=I(`$ZodRecord`,(e,t)=>{Wn.init(e,t);let n=ut.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!_e(a))return r.issues.push({expected:`record`,code:`invalid_type`,input:a,inst:e}),r;let o=[],s=t.keyType._zod.values;if(s&&!t.partial){r.value=n?n.alloc(e,r,{},i):{};let c=new Set;for(let n of s)if(typeof n==`string`||typeof n==`number`||typeof n==`symbol`){if(c.add(typeof n==`number`?n.toString():n),n===`__proto__`)continue;let s=t.keyType._zod.run({value:n,issues:[]},i);if(s instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(s.issues.length){r.issues.push({code:`invalid_key`,origin:`record`,issues:s.issues.map(e=>ze(e,i,dt())),input:n,path:[n],inst:e});continue}let l=s.value;if(l===`__proto__`)continue;let u=t.valueType._zod.run({value:a[n],issues:[]},i);u instanceof Promise?o.push(u.then(e=>{e.issues.length&&r.issues.push(...Ie(n,e.issues)),r.value[l]=e.value})):(u.issues.length&&r.issues.push(...Ie(n,u.issues)),r.value[l]=u.value)}let l;for(let e in a)if(!c.has(e)){if(t.mode===`loose`){if(e===`__proto__`)continue;r.value[e]=a[e]}else l??=[],l.push(e)}l&&l.length>0&&r.issues.push({code:`unrecognized_keys`,input:a,inst:e,keys:l,continue:!0})}else{r.value=n?n.alloc(e,r,{},i):{};let c;for(let n of Reflect.ownKeys(a)){if(n===`__proto__`||!Object.prototype.propertyIsEnumerable.call(a,n))continue;let l=t.keyType._zod.run({value:n,issues:[]},i);if(l instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(typeof n==`string`&&vn.test(n)&&l.issues.length){let e=t.keyType._zod.run({value:Number(n),issues:[]},i);if(e instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);e.issues.length===0&&(l=e)}if(l.issues.length){t.mode===`loose`?r.value[n]=a[n]:s?(c??=[],c.push(n)):r.issues.push({code:`invalid_key`,origin:`record`,issues:l.issues.map(e=>ze(e,i,dt())),input:n,path:[n],inst:e});continue}let u=l.value;if(u===`__proto__`)continue;let d=t.valueType._zod.run({value:a[n],issues:[]},i);d instanceof Promise?o.push(d.then(e=>{e.issues.length&&r.issues.push(...Ie(n,e.issues)),r.value[u]=e.value})):(d.issues.length&&r.issues.push(...Ie(n,d.issues)),r.value[u]=d.value)}c&&c.length>0&&r.issues.push({code:`unrecognized_keys`,input:a,inst:e,keys:c,continue:!0})}return o.length?Promise.all(o).then(()=>r):r}}),ii=I(`$ZodEnum`,(e,t)=>{Wn.init(e,t);let n=E(t.entries),r=new Set(n);e._zod.values=r,F(e,`pattern`,e=>{let t=E(e.def.entries).filter(e=>M.has(typeof e));return RegExp(t.length?`^(${t.map(e=>ye(e.toString())).join(`|`)})$`:`^[^\\s\\S]$`)}),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),ai=I(`$ZodLiteral`,(e,t)=>{Wn.init(e,t);let n=new Set(t.values);e._zod.values=n,F(e,`pattern`,e=>{let t=e.def.values;return RegExp(t.length?`^(${t.map(e=>typeof e==`string`?ye(e):e?ye(e.toString()):String(e)).join(`|`)})$`:`^[^\\s\\S]$`)}),e._zod.parse=(r,i)=>{let a=r.value;return n.has(a)||r.issues.push({code:`invalid_value`,values:t.values,input:a,inst:e}),r}}),oi=I(`$ZodTransform`,(e,t)=>{Wn.init(e,t),e._zod.optin=`optional`,ut.memoizer?.guard(e),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new lt(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n));if(i instanceof Promise)throw new ct;return n.value=i,n}});function si(e,t){return e.value=t.issues.length?void 0:t.value,e}var ci=I(`$ZodOptional`,(e,t)=>{Wn.init(e,t),F(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),e._zod.optout=`optional`,F(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t,void 0]):void 0}),F(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${te(t.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(e.value===void 0){if(t.innerType._zod.optin!==`defaulted`)return e;let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(t=>si(e,t)):si(e,r)}return t.innerType._zod.run(e,n)}}),li=I(`$ZodExactOptional`,(e,t)=>{ci.init(e,t),F(e,`values`,e=>e.def.innerType._zod.values),F(e,`pattern`,e=>e.def.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),ui=I(`$ZodNullable`,(e,t)=>{Wn.init(e,t),F(e,`optin`,e=>e.def.innerType._zod.optin),F(e,`optout`,e=>e.def.innerType._zod.optout),F(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${te(t.source)}|null)$`):void 0}),F(e,`values`,e=>e.def.innerType._zod.values?new Set([...e.def.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),di=I(`$ZodDefault`,(e,t)=>{Wn.init(e,t),e._zod.optin=`defaulted`,F(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>fi(e,t)):fi(r,t)}});function fi(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var pi=I(`$ZodPrefault`,(e,t)=>{Wn.init(e,t),e._zod.optin=`defaulted`,F(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),mi=I(`$ZodNonOptional`,(e,t)=>{Wn.init(e,t),F(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>hi(t,e)):hi(i,e)}});function hi(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}function gi(e,t,n,r){return t.issues.length?(e.value=n.catchValue({...t,value:e.value,error:{issues:t.issues.map(e=>ze(e,r,dt()))},input:e.value}),e):(e.value=t.value,t.memo&&(e.memo=!0),e)}var _i=I(`$ZodCatch`,(e,t)=>{Wn.init(e,t),F(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),F(e,`optout`,e=>e.def.innerType._zod.optout),F(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(r=>gi(e,r,t,n)):gi(e,r,t,n)}}),vi=I(`$ZodPipe`,(e,t)=>{Wn.init(e,t),F(e,`values`,e=>e.def.in._zod.values),F(e,`optin`,e=>e.def.in._zod.optin),F(e,`optout`,e=>e.def.out._zod.optout),F(e,`propValues`,e=>e.def.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>yi(e,t.in,n)):yi(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>yi(e,t.out,n)):yi(r,t.out,n)}});function yi(e,t,n){return e.issues.some(e=>e.code!==`unrecognized_keys`)?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}var bi=I(`$ZodPreprocess`,(e,t)=>{vi.init(e,t)}),xi=I(`$ZodReadonly`,(e,t)=>{Wn.init(e,t),F(e,`propValues`,e=>e.def.innerType._zod.propValues),F(e,`values`,e=>e.def.innerType._zod.values),F(e,`optin`,e=>e.def.innerType?._zod?.optin),F(e,`optout`,e=>e.def.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(Si):Si(r)}});function Si(e){return e.memo||(e.value=Object.freeze(e.value)),e}function Ci(e){let t=e._zod.def,n=t.pattern,r=!!t.format?.includes(`int`),i,a;for(let e of t.checks??[]){let t=e._zod.def;t.pattern&&(n=t.pattern),r||=!!t.format?.includes(`int`);let o=t.minimum??t.length,s=t.maximum??t.length;o!==void 0&&(i===void 0||o>i)&&(i=o),s!==void 0&&(a===void 0||s<a)&&(a=s)}if(n)return n.source;if(i!==void 0&&a!==void 0&&i>a)return`(?!)`;if(i!==void 0||a!==void 0)return gn({minimum:i,maximum:a}).source;let o=e._zod.pattern;return(r&&o===vn?_n:o)?.source}function wi(e){let t=e._zod.def,n=e._zod.pattern?.source,r=t.innerType??e._zod.innerType;if(r){let e=r._zod.pattern?.source,t=wi(r);return n&&e&&t&&t!==e?n.replace(te(e),()=>te(t)):n}if(t.options){let e=t.options.map(wi);if(e.every(Boolean))return`^(${e.map(e=>te(e)).join(`|`)})$`}return Ci(e)}var Ti=I(`$ZodTemplateLiteral`,(e,t)=>{Wn.init(e,t);let n=[];for(let e of t.parts)if(typeof e==`object`&&e){let t=wi(e);if(!t)throw Error(`Invalid template literal part, no pattern found: ${[...e._zod.traits].shift()}`);n.push(te(t))}else if(e===null||N.has(typeof e))n.push(ye(`${e}`));else throw Error(`Invalid template literal part: ${e}`);e._zod.pattern=RegExp(`^${n.join(``)}$`),e._zod.parse=(n,r)=>typeof n.value==`string`?(e._zod.pattern.lastIndex=0,e._zod.pattern.test(n.value)||n.issues.push({input:n.value,inst:e,code:`invalid_format`,format:t.format??`template_literal`,pattern:e._zod.pattern.source}),n):(n.issues.push({input:n.value,inst:e,expected:`string`,code:`invalid_type`}),n)}),Ei=I(`$ZodLazy`,(e,t)=>{Wn.init(e,t),ie(e._zod,`innerType`,()=>{let e=t;return e._cachedInner||=t.getter(),e._cachedInner}),F(e,`pattern`,e=>e.innerType?._zod?.pattern),F(e,`propValues`,e=>e.innerType?._zod?.propValues),F(e,`optin`,e=>e.innerType?._zod?.optin??void 0),F(e,`optout`,e=>e.innerType?._zod?.optout??void 0),e._zod.parse=(t,n)=>e._zod.innerType._zod.run(t,n)}),Di=I(`$ZodCustom`,(e,t)=>{wn.init(e,t),Wn.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>Oi(t,n,r,e));Oi(i,n,r,e)}});function Oi(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(We(e))}}var ki=class extends Error{constructor(){super(`Cannot parse a reference cycle that closes through a transform`),this.name=`ZodCyclicError`}},Ai=`~memo`,ji=[];function Mi(e){return typeof e==`object`&&!!e}function Ni(e){return e.map(e=>e.path?{...e,path:e.path.slice()}:{...e})}var Pi=new WeakMap,Fi=0,Ii=1,Li=2;function Ri(e,t,n){let r=Pi.get(e);if(r!==void 0)return r?Li:Fi;if(t.has(e))return Li;t.add(e);let i=Fi,a=e=>{if(i!==Li&&e?._zod){let r=Ri(e,t,n);r>i&&(i=r)}},o=(e,r)=>{let i=Fi;for(let a of Reflect.ownKeys(e)){let o=Object.getOwnPropertyDescriptor(e,a);if(r&&!o.enumerable)continue;let s=o.get?Ii:o.value?._zod?Ri(o.value,t,n):Fi;s>i&&(i=s)}return i},s=e=>{e>i&&(i=e)},c=e._zod.def;switch(c.type){case`object`:{let e=oe(c);s(e?o(e,!0):Ii),a(c.catchall);break}case`array`:a(c.element);break;case`tuple`:for(let e of c.items)a(e);a(c.rest);break;case`record`:case`map`:a(c.keyType),a(c.valueType);break;case`set`:a(c.valueType);break;case`union`:for(let e of c.options)a(e);break;case`intersection`:a(c.left),a(c.right);break;case`optional`:case`nullable`:case`default`:case`prefault`:case`catch`:case`readonly`:case`nonoptional`:case`promise`:case`success`:a(c.innerType);break;case`pipe`:a(c.in),a(c.out);break;case`function`:a(c.input),a(c.output);break;case`lazy`:{let r=c._cachedInner??(n?e._zod.innerType:void 0);s(r?Ri(r,t,!1):Ii);break}case`template_literal`:case`string`:case`number`:case`int`:case`boolean`:case`bigint`:case`symbol`:case`undefined`:case`null`:case`void`:case`never`:case`any`:case`unknown`:case`date`:case`nan`:case`enum`:case`literal`:case`file`:case`transform`:case`custom`:break;default:for(let e in c){let t=Object.getOwnPropertyDescriptor(c,e);if(!t||t.get)continue;let n=t.value;if(n&&typeof n==`object`){if(n._zod)a(n);else if(Array.isArray(n))for(let e of n)a(e)}}}return t.delete(e),zi(e,i)}function zi(e,t){return t!==Ii&&Pi.set(e,t===Li),t}function Bi(e,t){let n=e.buckets.get(t);return n||(n=new WeakMap,e.buckets.set(t,n)),n}var Vi,Hi=[],Ui={alloc(e,t,n){let r=Vi;if(!r)return n;Vi=void 0;let i={value:n,issues:null};return r.set(t.value,i),Hi.push(i),n},guard(e){var t;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,n=(e,n)=>{if(n.direction!==`backward`&&Gi(n,e.value))throw new ki;return t(e,n)};e._zod.parse=n,e._zod.run===t&&(e._zod.run=n)})},attach(e){var t;let n,r=!1,i,a;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,o=(s,c)=>{if(n===void 0){let i=Ri(e,new Set,!1);if(i===Fi)return e._zod.parse=t,e._zod.run===o&&(e._zod.run=t),t(s,c);i===Li||r?n=!0:r=!0}let l=s.value;if(!Mi(l))return t(s,c);let u=c[Ai];u||(u={buckets:new WeakMap,backEdges:void 0},c[Ai]=u);let d;i===c?d=a:(d=Bi(u,e),i=c,a=d);let f=d.get(l);if(f)return s.value=f.value,f.issues?f.issues.length&&s.issues.push(...Ni(f.issues)):(s.memo=!0,u.backEdges??(u.backEdges=new WeakSet),u.backEdges.add(f.value)),s;Vi=d;let p=Hi.length,m=t(s,c);Vi=void 0;let h=Hi.length>p?Hi.pop():void 0;return m instanceof Promise?m.then(e=>(h&&(h.issues=e.issues.length?Ni(e.issues):ji),e)):(h&&(h.issues=m.issues.length?Ni(m.issues):ji),m)};e._zod.parse=o,e._zod.run===t&&(e._zod.run=o)})}};function Wi(){return Ui}function Gi(e,t){let n=e[Ai]?.backEdges;return n!==void 0&&Mi(t)&&n.has(t)}var Ki=()=>{let e={string:{unit:`characters`,verb:`to have`},file:{unit:`bytes`,verb:`to have`},array:{unit:`items`,verb:`to have`},set:{unit:`items`,verb:`to have`},map:{unit:`entries`,verb:`to have`}};function t(t){return e[t]??null}let n={regex:`input`,email:`email address`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO datetime`,date:`ISO date`,time:`ISO time`,duration:`ISO duration`,ipv4:`IPv4 address`,ipv6:`IPv6 address`,mac:`MAC address`,cidrv4:`IPv4 range`,cidrv6:`IPv6 range`,base64:`base64-encoded string`,base64url:`base64url-encoded string`,json_string:`JSON string`,e164:`E.164 number`,currency_code:`currency code`,credit_card:`credit card number`,iban:`IBAN`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`};function i(e,t){return e===`number`&&typeof t==`number`&&!Number.isFinite(t)?String(t):r[e]??e}return e=>{switch(e.code){case`invalid_type`:return`Invalid input: expected ${i(e.expected)}, received ${i(Ue(e.input),e.input)}`;case`invalid_value`:return e.values.length===1?`Invalid input: expected ${xe(e.values[0])}`:`Invalid option: expected one of ${D(e.values,`|`)}`;case`too_big`:{let n=e.exact?`exactly `:e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Too big: expected ${e.origin??`value`} to have ${n}${e.maximum.toString()} ${r.unit??`elements`}`:`Too big: expected ${e.origin??`value`} to be ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.exact?`exactly `:e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Too small: expected ${e.origin} to have ${n}${e.minimum.toString()} ${r.unit}`:`Too small: expected ${e.origin} to be ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Invalid string: must start with "${t.prefix}"`:t.format===`ends_with`?`Invalid string: must end with "${t.suffix}"`:t.format===`includes`?`Invalid string: must include "${t.includes}"`:t.format===`regex`?`Invalid string: must match pattern ${t.pattern}`:`Invalid ${n[t.format]??e.format}`}case`not_multiple_of`:return`Invalid number: must be a multiple of ${e.divisor}`;case`unrecognized_keys`:return`Unrecognized key${e.keys.length>1?`s`:``}: ${D(e.keys,`, `)}`;case`invalid_key`:return`Invalid key in ${e.origin}`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`Invalid discriminator value. Expected ${e.options.map(e=>`'${e}'`).join(` | `)}`:e.inclusive===!1?`Invalid input: more than one option matched`:`Invalid input`;case`invalid_element`:return`Invalid value in ${e.origin}`;default:return`Invalid input`}}};function qi(){return{localeError:Ki()}}var Ji,Yi=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function Xi(){return new Yi}(Ji=globalThis).__zod_globalRegistry??(Ji.__zod_globalRegistry=Xi());var Zi=globalThis.__zod_globalRegistry;function Qi(e){return e.checks&&=[...e.checks],e}function $i(e,t){return new e(Qi({type:`string`,...P(t)}))}function ea(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...P(t)})}function ta(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...P(t)})}function na(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...P(t)})}function ra(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...P(t)})}function ia(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...P(t)})}function aa(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...P(t)})}function oa(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...P(t)})}function sa(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...P(t)})}function ca(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...P(t)})}function la(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...P(t)})}function ua(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...P(t)})}function da(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...P(t)})}function fa(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...P(t)})}function pa(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...P(t)})}function ma(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...P(t)})}function ha(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...P(t)})}function ga(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...P(t)})}function _a(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...P(t)})}function va(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...P(t)})}function ya(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...P(t)})}function ba(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...P(t)})}function xa(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...P(t)})}function Sa(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...P(t)})}function Ca(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...P(t)})}function wa(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...P(t)})}function Ta(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...P(t)})}function Ea(e,t){return new e(Qi({type:`number`,checks:[],...P(t)}))}function Da(e,t){return new e(Qi({type:`number`,coerce:!0,checks:[],...P(t)}))}function Oa(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...P(t)})}function ka(e,t){return new e({type:`boolean`,...P(t)})}function Aa(e,t){return new e({type:`undefined`,...P(t)})}function ja(e,t){return new e({type:`null`,...P(t)})}function Ma(e){return new e({type:`any`})}function Na(e){return new e({type:`unknown`})}function Pa(e,t){return new e({type:`never`,...P(t)})}function Fa(e,t){return new Dn({check:`less_than`,...P(t),value:e,inclusive:!1})}function Ia(e,t){return new Dn({check:`less_than`,...P(t),value:e,inclusive:!0})}function La(e,t){return new On({check:`greater_than`,...P(t),value:e,inclusive:!1})}function Ra(e,t){return new On({check:`greater_than`,...P(t),value:e,inclusive:!0})}function za(e,t){return new kn({check:`multiple_of`,...P(t),value:e})}function Ba(e,t){return new jn({check:`max_length`,...P(t),maximum:e})}function Va(e,t){return new Mn({check:`min_length`,...P(t),minimum:e})}function Ha(e,t){return new Nn({check:`length_equals`,...P(t),length:e})}function Ua(e,t){return new Fn({check:`string_format`,format:`regex`,...P(t),pattern:e})}function Wa(e){return new In({check:`string_format`,format:`lowercase`,...P(e)})}function Ga(e){return new Ln({check:`string_format`,format:`uppercase`,...P(e)})}function Ka(e,t){return new Rn({check:`string_format`,format:`includes`,...P(t),includes:e})}function qa(e,t){return new zn({check:`string_format`,format:`starts_with`,...P(t),prefix:e})}function Ja(e,t){return new Bn({check:`string_format`,format:`ends_with`,...P(t),suffix:e})}function Ya(e){return new Vn({check:`overwrite`,tx:e})}function Xa(e){return Ya(t=>t.normalize(e))}function Za(){return Ya(e=>e.trim())}function Qa(){return Ya(e=>e.toLowerCase())}function $a(){return Ya(e=>e.toUpperCase())}function eo(){return Ya(e=>pe(e))}function to(e,t,n){return new e({type:`array`,element:t,...P(n)})}function no(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...P(n)})}function ro(e,t){let n=io(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(We(e,t.value,n._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,`input`in r||(r.input=t.value),r.inst??=n,r.continue??=!n._zod.def.abort,t.issues.push(We(r))}},e(t.value,t)),t);return n}function io(e,t){let n=new wn({check:`custom`,...P(t)});return n._zod.check=e,n}function ao(e,...t){for(let n of t)for(let t of Reflect.ownKeys(n))Object.prototype.propertyIsEnumerable.call(n,t)&&ae(e,t,n[t]);return e}function oo(e){let t=e?.target??`draft-2020-12`;return t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),{processors:e.processors??{},metadataRegistry:e?.metadata??Zi,target:t,unrepresentable:e?.unrepresentable??`throw`,override:e?.override??(()=>{}),io:e?.io??`output`,counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:e?.cycles??`ref`,reused:e?.reused??`inline`,intersections:[],deferred:[],external:e?.external??void 0}}function so(e,t,n,r,i){let a=typeof t.unrepresentable==`function`?t.unrepresentable({zodSchema:e,path:r.path,message:i}):t.unrepresentable;if(a===`any`)return!1;if(a===void 0||a===`throw`)throw Error(i);return Object.assign(n,a),!0}function co(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o),t.sharedDefsExtractedFor=void 0,t.sharedEmitDoneFor=void 0;let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,co(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&ao(o.schema,c),t.io===`input`&&yo(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&`_prefault`in o.schema&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function lo(e){return e.replace(/~/g,`~0`).replace(/\//g,`~1`)}function uo(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);if(e.external&&e.sharedDefsExtractedFor===e.external)return;let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${lo(a)}`}}let i=`#/${r}/`;if(t[1]===n&&!t[1].schema.id)return{ref:`#`};let a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+lo(a)}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/<root>
68
+
69
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){a(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id){a(n);continue}if(r.cycle){a(n);continue}r.count>1&&e.reused===`ref`&&a(n)}e.external&&(e.sharedDefsExtractedFor=e.external)}function fo(e){let t=e.anyOf;if(!Array.isArray(t)||t.length===0||e.type!==void 0)return;let n=[];for(let e of t){if(!e||typeof e!=`object`)return;fo(e);let t=Object.keys(e);if(t.length!==1||t[0]!==`type`)return;let r=e.type;for(let e of Array.isArray(r)?r:[r]){if(typeof e!=`string`)return;n.includes(e)||n.push(e)}}delete e.anyOf,e.type=n.length===1?n[0]:n}var po=new Set([`type`,`properties`,`required`,`additionalProperties`]),mo=[`oneOf`,`anyOf`];function ho(e){let t=e.additionalProperties;return t===void 0||t===!1||typeof t!=`object`||!t?null:Object.keys(t).length?t:null}function go(e){let t=[];for(let n of e){if(typeof n!=`object`||n.type!==`object`)return null;for(let e in n)if(!po.has(e))return null;t.push(n)}let n={},r=new Set;for(let e of t){for(let r in e.properties){if(Object.prototype.hasOwnProperty.call(n,r))continue;let e=[];for(let n of t){let t=n.properties?.[r]??ho(n);t!=null&&(e.some(e=>JSON.stringify(e)===JSON.stringify(t))||e.push(t))}ae(n,r,e.length===1?e[0]:go(e)??{allOf:e})}for(let t of e.required??[])r.add(t)}let i={type:`object`,properties:n};if(r.size&&(i.required=[...r]),t.every(e=>e.additionalProperties===!1))i.additionalProperties=!1;else{let e=[];for(let n of t){let t=ho(n);t&&!e.some(e=>JSON.stringify(e)===JSON.stringify(t))&&e.push(t)}e.length===1?i.additionalProperties=e[0]:e.length>1&&(i.additionalProperties={allOf:e})}return i}function _o(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let t of po)if(t in e)return;let n=t.filter(e=>mo.some(t=>Array.isArray(e[t]))),r=null;if(!n.length)r=go(t);else{let e=n[0],i=mo.find(t=>Array.isArray(e[t]));if(Object.keys(e).length!==1)return;let a=t.filter(t=>t!==e),o=e[i].map(e=>go([...a,e]));if(o.some(e=>!e))return;r={[i]:o}}r&&(delete e.allOf,ao(e,r))}function vo(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):ao(i,s),ao(i,a),t._zod.parent===o)for(let e in i)e!==`$ref`&&e!==`allOf`&&(e in a||delete i[e]);if(s.$ref&&n.def)for(let e in i)e!==`$ref`&&e!==`allOf`&&e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e!==`$ref`&&e!==`allOf`&&e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(let t of[...e.seen.entries()].reverse())r(t[0]);if(e.target!==`openapi-3.0`)for(let t of e.seen.entries())fo(t[1].def??t[1].schema);for(let t of e.deferred)t();if(e.intersections.length){let t=new Map;for(let n of e.seen.values())for(let e of[n.schema,n.def]){let n=e?.allOf;if(!Array.isArray(n))continue;let r=t.get(n);r?r.push(e):t.set(n,[e])}for(let n of e.intersections)for(let e of t.get(n)??[])_o(e)}}let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}ao(i,n.defId?n.schema:n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,ae(o,e.defId,e.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t[`~standard`],jsonSchema:{input:xo(t,`input`,e.processors),output:xo(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function yo(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return yo(r.element,n);if(r.type===`set`)return yo(r.valueType,n);if(r.type===`lazy`)return yo(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type==="default"||r.type===`prefault`||r.type===`catch`)return yo(r.innerType,n);if(r.type===`intersection`)return yo(r.left,n)||yo(r.right,n);if(r.type===`record`||r.type===`map`)return yo(r.keyType,n)||yo(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:yo(r.in,n)||yo(r.out,n);if(r.type===`object`){for(let e in r.shape)if(yo(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(yo(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(yo(e,n))return!0;return!!(r.rest&&yo(r.rest,n))}return!1}var bo=(e,t={})=>n=>{let r=oo({...n,processors:t});return co(e,r),uo(r,e),vo(r,e)},xo=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=oo({...i??{},target:a,io:t,processors:n});return co(e,o),uo(o,e),vo(o,e)},So=(e,t,n)=>{(e[t]===void 0||n>e[t])&&(e[t]=n)},Co=(e,t,n)=>{(e[t]===void 0||n<e[t])&&(e[t]=n)},wo=(e,t)=>{So(e,`minimum`,t),Co(e,`maximum`,t)},To=(e,t)=>{e.multipleOf??=[],e.multipleOf.includes(t)||e.multipleOf.push(t)},Eo=(e,t)=>{e.patterns??=new Set,e.patterns.add(t)},Do=(e,t)=>{e.mime=e.mime?e.mime.filter(e=>t.includes(e)):[...t]},Oo=(e,t)=>{e.format=t,t.includes(`int`)&&(e.isInt=!0)},ko=(e,t)=>So(e,`minimum`,t.minimum),Ao=(e,t)=>Co(e,`maximum`,t.maximum),jo=e=>(t,n)=>{Oo(t,n.format);let[r,i]=e[n.format];So(t,`minimum`,r),Co(t,`maximum`,i)},Mo={greater_than:(e,t)=>So(e,t.inclusive?`minimum`:`exclusiveMinimum`,t.value),less_than:(e,t)=>Co(e,t.inclusive?`maximum`:`exclusiveMaximum`,t.value),multiple_of:(e,t)=>To(e,t.value),number_format:jo(Ce),bigint_format:jo(we),min_length:ko,max_length:Ao,length_equals:(e,t)=>wo(e,t.length),min_size:ko,max_size:Ao,size_equals:(e,t)=>wo(e,t.size),string_format:(e,t)=>{Oo(e,t.format),t.pattern&&Eo(e,t.pattern),(t.format===`base64`||t.format===`base64url`)&&(e.contentEncoding=t.format),(t.local||t.precision===-1)&&(e.laxFormat=!0)},mime_type:(e,t)=>Do(e,t.mime)};function No(e){let t={},n=e._zod.def,r=e._zod.traits.has(`$ZodCheck`)?[e,...n.checks??[]]:n.checks??[];for(let e of r)Mo[e._zod.def.check]?.(t,e._zod.def);let i=e._zod.bag;i.minimum!==void 0&&So(t,`minimum`,i.minimum),i.exclusiveMinimum!==void 0&&So(t,`exclusiveMinimum`,i.exclusiveMinimum),i.maximum!==void 0&&Co(t,`maximum`,i.maximum),i.exclusiveMaximum!==void 0&&Co(t,`exclusiveMaximum`,i.exclusiveMaximum),i.multipleOf!==void 0&&To(t,i.multipleOf),i.format!==void 0&&(t.format??=i.format,i.format.includes(`int`)&&(t.isInt=!0)),i.mime&&Do(t,i.mime);for(let e of i.patterns??[])Eo(t,e);return t}var Po={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},Fo=new Map([[Er,an],[Or,on]]),Io=e=>Fo.get(e)??e,Lo=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l,laxFormat:u}=No(e);if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=Po[s]??s,i.format===``&&delete i.format,(s===`time`||u)&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c].map(Io);e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},Ro=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,multipleOf:s,exclusiveMaximum:c,exclusiveMinimum:l,isInt:u}=No(e);i.type=u?`integer`:`number`;let d=typeof l==`number`&&l>=(a??-1/0),f=typeof c==`number`&&c<=(o??1/0),p=t.target===`draft-04`||t.target===`openapi-3.0`;if(d?p?(i.minimum=l,i.exclusiveMinimum=!0):i.exclusiveMinimum=l:typeof a==`number`&&(i.minimum=a),f?p?(i.maximum=c,i.exclusiveMaximum=!0):i.exclusiveMaximum=c:typeof o==`number`&&(i.maximum=o),s){let n=new Set;for(let a of s)Number.isFinite(a)&&a!==0?n.add(Math.abs(a)):so(e,t,i,r,`A multipleOf divisor of ${a} cannot be represented in JSON Schema`);let[a,...o]=n;a!==void 0&&(i.multipleOf=a),o.length&&(i.allOf=[...i.allOf??[],...o.map(e=>({multipleOf:e}))])}},zo=(e,t,n,r)=>{n.type=`boolean`},Bo=(e,t,n,r)=>{so(e,t,n,r,`BigInt cannot be represented in JSON Schema`)},Vo=(e,t,n,r)=>{so(e,t,n,r,`Symbols cannot be represented in JSON Schema`)},Ho=(e,t,n,r)=>{t.target===`openapi-3.0`?(n.type=`string`,n.nullable=!0,n.enum=[null]):n.type=`null`},Uo=(e,t,n,r)=>{so(e,t,n,r,`Undefined cannot be represented in JSON Schema`)},Wo=(e,t,n,r)=>{so(e,t,n,r,`Void cannot be represented in JSON Schema`)},Go=(e,t,n,r)=>{n.not={}},Ko=(e,t,n,r)=>{},qo=(e,t,n,r)=>{},Jo=(e,t,n,r)=>{so(e,t,n,r,`Date cannot be represented in JSON Schema`)},Yo=(e,t,n,r)=>{let i=e._zod.def,a=E(i.entries);if(a.length===0){n.not={};return}a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},Xo=(e,t,n,r)=>{let i=e._zod.def;if(i.values.length===0){n.not={};return}let a=[];for(let o of i.values)if(o===void 0){if(so(e,t,n,r,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof o==`bigint`){if(so(e,t,n,r,`BigInt literals cannot be represented in JSON Schema`))return;a.push(Number(o))}else a.push(o);if(a.length!==0){if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a}},Zo=(e,t,n,r)=>{so(e,t,n,r,`NaN cannot be represented in JSON Schema`)},Qo=(e,t,n,r)=>{let i=n,a=e._zod.pattern;if(!a)throw Error(`Pattern not found in template literal`);i.type=`string`,i.pattern=a.source},$o=(e,t,n,r)=>{let i=n;i.type=`string`,i.format=`binary`,i.contentEncoding=`binary`;let{minimum:a,maximum:o,mime:s}=No(e);a!==void 0&&(i.minLength=a),o!==void 0&&(i.maxLength=o),s&&(s.length===0?i.not={}:s.length===1?i.contentMediaType=s[0]:i.anyOf=s.map(e=>({contentMediaType:e})))},es=(e,t,n,r)=>{n.type=`boolean`},ts=(e,t,n,r)=>{so(e,t,n,r,`Custom types cannot be represented in JSON Schema`)},ns=(e,t,n,r)=>{so(e,t,n,r,`Function types cannot be represented in JSON Schema`)},rs=(e,t,n,r)=>{so(e,t,n,r,`Transforms cannot be represented in JSON Schema`)},is=(e,t,n,r)=>{so(e,t,n,r,`Map cannot be represented in JSON Schema`)},as=(e,t,n,r)=>{so(e,t,n,r,`Set cannot be represented in JSON Schema`)},os=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=No(e);typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=co(a.element,t,{...r,path:[...r.path,`items`]})};function ss(e){let t=e._zod.def;return t.type===`pipe`&&t.in._zod.traits.has(`$ZodTransform`)?ss(t.out):t.type===`catch`?ss(t.innerType):e._zod.optin}var cs=(e,t,n,r)=>{let i=n,a=e._zod.def,o=a.shape;if(Object.getOwnPropertySymbols(o).length&&so(e,t,i,r,`Symbol keys cannot be represented in JSON Schema`))return;i.type=`object`,i.properties={};for(let e in o)ae(i.properties,e,co(o[e],t,{...r,path:[...r.path,`properties`,e]}));let s=[];for(let e of Object.keys(o)){let n=a.shape[e];(t.io===`input`?ss(n)===void 0:n._zod.optout===void 0)&&s.push(e)}s.length>0&&(i.required=s),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=co(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},ls=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>co(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},us=(e,t,n,r)=>{let i=e._zod.def,a=co(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=co(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1,c=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]];n.allOf=c,t.intersections.push(c)},ds=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`array`;let o=t.target===`draft-2020-12`?`prefixItems`:`items`,s=t.target===`draft-2020-12`||t.target===`openapi-3.0`?`items`:`additionalItems`,c=a.items.map((e,n)=>co(e,t,{...r,path:[...r.path,o,n]})),l=a.rest?co(a.rest,t,{...r,path:[...r.path,s,...t.target===`openapi-3.0`?[a.items.length]:[]]}):null,u=a.items.length;for(;u>0;){let e=a.items[u-1];if(!(t.io===`input`?ss(e)!==void 0:e._zod.optout===`optional`))break;u--}let d=a.items.length,f=!a.rest;t.target===`draft-2020-12`?(i.prefixItems=c,f?i.items=!1:l&&(i.items=l),u>0&&(i.minItems=u),f&&(i.maxItems=d)):t.target===`openapi-3.0`?(i.items={anyOf:c},l&&i.items.anyOf.push(l),u>0&&(i.minItems=u),f&&(i.maxItems=d)):(i.items=c,f?i.additionalItems=!1:l&&(i.additionalItems=l),u>0&&(i.minItems=u),f&&(i.maxItems=d));let{minimum:p,maximum:m}=No(e);typeof p==`number`&&(i.minItems=p),typeof m==`number`&&(i.maxItems=m)};function fs(e,t,n){if(t.$ref){if(n.has(t))return t;n.add(t);let r=e.get(t)?.def;if(!r)return t;let i=fs(e,r,n);return i===r?t:i}for(let r of[`anyOf`,`oneOf`]){let i=t[r];if(!Array.isArray(i))continue;let a=i.map(t=>fs(e,t,n));a.some((e,t)=>e!==i[t])&&(t={...t,[r]:a})}let r=Array.isArray(t.type)?t.type:[t.type],i=!r.includes(`string`)&&r.some(e=>e===`number`||e===`integer`),a=t.enum??(t.const===void 0?void 0:[t.const]);if(!i&&!a?.some(e=>typeof e==`number`))return t;let{minimum:o,maximum:s,exclusiveMinimum:c,exclusiveMaximum:l,multipleOf:u,format:d,id:f,...p}=t;return p.enum?p.enum=p.enum.map(e=>typeof e==`number`?String(e):e):typeof p.const==`number`&&(p.const=String(p.const)),i?(p.type=`string`,a||(p.pattern=(r.includes(`number`)?vn:_n).source),p):p}var ps=new WeakMap;function ms(e){let t=new Map;for(let n of e.seen.values())n.def&&!t.has(n.schema)&&t.set(n.schema,n);let n=new Map;for(let r of ps.get(e)??[]){let i=e.seen.get(r),a=(i?.def??i?.schema)?.propertyNames;if(!a||a===!0||n.has(a))continue;let o=fs(t,a,new Set);o!==a&&n.set(a,o)}if(n.size)for(let t of e.seen.values())for(let e of[t.schema,t.def]){let t=e&&n.get(e.propertyNames);t&&(e.propertyNames=t)}}var hs=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`;let o=a.keyType,s=No(o).patterns;if(a.mode===`loose`&&s&&s.size>0){let e=co(a.valueType,t,{...r,path:[...r.path,`patternProperties`,`*`]});i.patternProperties={};for(let t of s)ae(i.patternProperties,Io(t).source,e)}else{if(t.target===`draft-07`||t.target===`draft-2020-12`){i.propertyNames=co(a.keyType,t,{...r,path:[...r.path,`propertyNames`]});let n=ps.get(t);n||(n=[],ps.set(t,n),t.deferred.push(()=>ms(t))),n.push(e)}i.additionalProperties=co(a.valueType,t,{...r,path:[...r.path,`additionalProperties`]})}let c=o._zod.values,l=t.io===`input`&&ss(a.valueType)!==void 0;if(c&&!a.partial&&!l){let e=[...c].filter(e=>typeof e==`string`||typeof e==`number`);e.length>0&&(i.required=e.map(String))}},gs=(e,t,n,r)=>{let i=e._zod.def,a=co(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},_s=(e,t,n,r)=>{let i=e._zod.def;co(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},vs=Symbol();function ys(e,t,n,r,i){let a=!1,o=JSON.stringify(e,(e,t)=>typeof t==`bigint`?(a=!0,null):t);return a?(so(t,n,r,i,`BigInt defaults cannot be represented in JSON Schema`),vs):JSON.parse(o)}var bs=(e,t,n,r)=>{let i=e._zod.def;co(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o=ys(i.defaultValue,e,t,n,r);o!==vs&&(n.default=o)},xs=(e,t,n,r)=>{let i=e._zod.def;co(i.innerType,t,r);let a=t.seen.get(e);if(a.ref=i.innerType,t.io!==`input`)return;let o=ys(i.defaultValue,e,t,n,r);o!==vs&&(n._prefault=o)},Ss=(e,t,n,r)=>{let i=e._zod.def;co(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{so(e,t,n,r,`Dynamic catch values are not supported in JSON Schema`);return}n.default=o},Cs=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;co(o,t,r);let s=t.seen.get(e);s.ref=o},ws=(e,t,n,r)=>{let i=e._zod.def;co(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},Ts=(e,t,n,r)=>{let i=e._zod.def;co(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Es=(e,t,n,r)=>{let i=e._zod.def;co(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Ds=(e,t,n,r)=>{let i=e._zod.innerType;co(i,t,r);let a=t.seen.get(e);a.ref=i},Os={string:Lo,number:Ro,boolean:zo,bigint:Bo,symbol:Vo,null:Ho,undefined:Uo,void:Wo,never:Go,any:Ko,unknown:qo,date:Jo,enum:Yo,literal:Xo,nan:Zo,template_literal:Qo,file:$o,success:es,custom:ts,function:ns,transform:rs,map:is,set:as,array:os,object:cs,union:ls,intersection:us,tuple:ds,record:hs,nullable:gs,nonoptional:_s,default:bs,prefault:xs,catch:Ss,pipe:Cs,readonly:ws,promise:Ts,optional:Es,lazy:Ds};function ks(e,t){if(`_idmap`in e){let n=e,r=oo({...t,processors:Os}),i={};for(let e of n._idmap.entries()){let[t,n]=e;co(n,r)}let a={};r.external={registry:n,uri:t?.uri,defs:i};for(let e of n._idmap.entries()){let[t,n]=e;uo(r,n),ae(a,t,vo(r,n))}return Object.keys(i).length>0&&(a.__shared={[r.target===`draft-2020-12`?`$defs`:`definitions`]:i}),{schemas:a}}let n=oo({...t,processors:Os});return co(e,n),uo(n,e),vo(n,e)}var As=new WeakSet([Object.prototype,Error.prototype]);function js(e,t,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){let e=n(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0})}})}var Ms=I(`ZodError`,(e,t)=>{vt.init(e,t),e.name=`ZodError`;let n=Object.getPrototypeOf(e);As.has(n)||(As.add(n),js(n,`format`,e=>t=>xt(e,t)),js(n,`flatten`,e=>t=>bt(e,t)),js(n,`addIssue`,e=>t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,ee,2)}),js(n,`addIssues`,e=>t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,ee,2)}),Object.defineProperty(n,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},void 0,{Parent:Error}),Ns=Ct(Ms),Ps=wt(Ms),Fs=Tt(Ms),Is=Dt(Ms),Ls=Nt(Ms),Rs=Pt(Ms),zs=Ft(Ms),Bs=It(Ms),Vs=Lt(Ms),Hs=Rt(Ms),Us=zt(Ms),Ws=Bt(Ms);function Gs(){ut.localeError||dt(qi())}function Ks(){ut.memoizer||dt({memoizer:Wi()})}var qs=I(`ZodType`,(e,t)=>(Gs(),Wn.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(de(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return be(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(gl(e,t))},superRefine(e,t){return this.check(_l(e,t))},overwrite(e){return this.check(Ya(e))},optional(){return J(this)},exactOptional(){return Yc(this)},nullable(){return Zc(this)},nullish(){return J(Zc(this))},nonoptional(e){return rl(this,e)},array(){return V(this)},or(e){return W([this,e])},and(e){return Vc(this,e)},transform(e){return sl(this,Kc(e))},default(e){return $c(this,e)},prefault(e){return tl(this,e)},catch(e){return al(this,e)},pipe(e){return sl(this,e)},readonly(){return ul(this)},describe(e){let t=this.clone();return Zi.add(t,{description:e}),t},meta(...e){if(e.length===0)return Zi.get(this);let t=this.clone();return Zi.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return t.length===0?e(this):e(this,...t)},get"~standard"(){return qe(this,`~standard`,{...qn(this),jsonSchema:{input:xo(this,`input`),output:xo(this,`output`)}})},set"~standard"(e){Ke(this,`~standard`,e)},parse:function e(t,n){return Ns(this,t,n,{callee:e})},parseAsync:async function e(t,n){return await Ps(this,t,n,{callee:e})},safeParse(e,t){return Fs(this,e,t)},async safeParseAsync(e,t){return Is(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){Ke(this,`spa`,e)},validate(e,t){return At(this,e,t)},validateAsync(e,t){return Mt(this,e,t)},encode:function e(t,n){return Ls(this,t,n,{callee:e})},decode:function e(t,n){return Rs(this,t,n,{callee:e})},encodeAsync:async function e(t,n){return await zs(this,t,n,{callee:e})},decodeAsync:async function e(t,n){return await Bs(this,t,n,{callee:e})},safeEncode(e,t){return Vs(this,e,t)},safeDecode(e,t){return Hs(this,e,t)},async safeEncodeAsync(e,t){return Us(this,e,t)},async safeDecodeAsync(e,t){return Ws(this,e,t)},toJSONSchema(e){return bo(this,{})(e)},get description(){return Zi.get(this)?.description},get _def(){return this._zod.def}}),Js=I(`_ZodString`,(e,t)=>{Jn.init(e,t),qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Lo(e,t,n,r)},Je({format:e=>No(e).format??null,minLength:e=>No(e).minimum??null,maxLength:e=>No(e).maximum??null},{regex(...e){return this.check(Ua(...e))},includes(...e){return this.check(Ka(...e))},startsWith(...e){return this.check(qa(...e))},endsWith(...e){return this.check(Ja(...e))},min(...e){return this.check(Va(...e))},max(...e){return this.check(Ba(...e))},length(...e){return this.check(Ha(...e))},nonempty(...e){return this.check(Va(1,...e))},lowercase(e){return this.check(Wa(e))},uppercase(e){return this.check(Ga(e))},trim(){return this.check(Za())},normalize(...e){return this.check(Xa(...e))},toLowerCase(){return this.check(Qa())},toUpperCase(){return this.check($a())},slugify(){return this.check(eo())}})),Ys=I(`ZodString`,(e,t)=>{Jn.init(e,t),Js.init(e,t)},{email(e){return this.check(ea(tc,e))},url(e){return this.check(oa(ac,e))},jwt(e){return this.check(xa(xc,e))},emoji(e){return this.check(sa(sc,e))},guid(e){return this.check(ta(rc,e))},uuid(e){return this.check(na(ic,e))},uuidv4(e){return this.check(ra(ic,e))},uuidv6(e){return this.check(ia(ic,e))},uuidv7(e){return this.check(aa(ic,e))},nanoid(e){return this.check(ca(cc,e))},cuid(e){return this.check(la(lc,e))},cuid2(e){return this.check(ua(uc,e))},ulid(e){return this.check(da(dc,e))},base64(e){return this.check(va(vc,e))},base64url(e){return this.check(ya(yc,e))},xid(e){return this.check(fa(fc,e))},ksuid(e){return this.check(pa(pc,e))},ipv4(e){return this.check(ma(mc,e))},ipv6(e){return this.check(ha(hc,e))},cidrv4(e){return this.check(ga(gc,e))},cidrv6(e){return this.check(_a(_c,e))},e164(e){return this.check(ba(bc,e))},datetime(e){return this.check(Sa(Zs,e))},date(e){return this.check(Ca(Qs,e))},time(e){return this.check(wa($s,e))},duration(e){return this.check(Ta(ec,e))}});function L(e){return $i(Ys,e)}var Xs=I(`ZodStringFormat`,(e,t)=>{Yn.init(e,t),Js.init(e,t)}),Zs=I(`ZodISODateTime`,(e,t)=>{mr.init(e,t),Xs.init(e,t)}),Qs=I(`ZodISODate`,(e,t)=>{hr.init(e,t),Xs.init(e,t)}),$s=I(`ZodISOTime`,(e,t)=>{gr.init(e,t),Xs.init(e,t)}),ec=I(`ZodISODuration`,(e,t)=>{_r.init(e,t),Xs.init(e,t)}),tc=I(`ZodEmail`,(e,t)=>{Qn.init(e,t),Xs.init(e,t)});function nc(e){return ea(tc,e)}var rc=I(`ZodGUID`,(e,t)=>{Xn.init(e,t),Xs.init(e,t)}),ic=I(`ZodUUID`,(e,t)=>{Zn.init(e,t),Xs.init(e,t)}),ac=I(`ZodURL`,(e,t)=>{or.init(e,t),Xs.init(e,t)});function oc(e){return oa(ac,e)}var sc=I(`ZodEmoji`,(e,t)=>{sr.init(e,t),Xs.init(e,t)}),cc=I(`ZodNanoID`,(e,t)=>{cr.init(e,t),Xs.init(e,t)}),lc=I(`ZodCUID`,(e,t)=>{lr.init(e,t),Xs.init(e,t)}),uc=I(`ZodCUID2`,(e,t)=>{ur.init(e,t),Xs.init(e,t)}),dc=I(`ZodULID`,(e,t)=>{dr.init(e,t),Xs.init(e,t)}),fc=I(`ZodXID`,(e,t)=>{fr.init(e,t),Xs.init(e,t)}),pc=I(`ZodKSUID`,(e,t)=>{pr.init(e,t),Xs.init(e,t)}),mc=I(`ZodIPv4`,(e,t)=>{vr.init(e,t),Xs.init(e,t)}),hc=I(`ZodIPv6`,(e,t)=>{xr.init(e,t),Xs.init(e,t)}),gc=I(`ZodCIDRv4`,(e,t)=>{Sr.init(e,t),Xs.init(e,t)}),_c=I(`ZodCIDRv6`,(e,t)=>{wr.init(e,t),Xs.init(e,t)}),vc=I(`ZodBase64`,(e,t)=>{Dr.init(e,t),Xs.init(e,t)}),yc=I(`ZodBase64URL`,(e,t)=>{Ar.init(e,t),Xs.init(e,t)}),bc=I(`ZodE164`,(e,t)=>{jr.init(e,t),Xs.init(e,t)}),xc=I(`ZodJWT`,(e,t)=>{Nr.init(e,t),Xs.init(e,t)}),Sc=I(`ZodNumber`,(e,t)=>{Pr.init(e,t),qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ro(e,t,n,r),e.isFinite=!0},Je({minValue:e=>{let{minimum:t,exclusiveMinimum:n}=No(e);return Math.max(t??-1/0,n??-1/0)},maxValue:e=>{let{maximum:t,exclusiveMaximum:n}=No(e);return Math.min(t??1/0,n??1/0)},isInt:e=>{let{isInt:t,multipleOf:n}=No(e);return!!t||!!n?.some(Number.isSafeInteger)},format:e=>No(e).format??null},{gt(e,t){return this.check(La(e,t))},gte(e,t){return this.check(Ra(e,t))},min(e,t){return this.check(Ra(e,t))},lt(e,t){return this.check(Fa(e,t))},lte(e,t){return this.check(Ia(e,t))},max(e,t){return this.check(Ia(e,t))},int(e){return this.check(wc(e))},safe(e){return this.check(wc(e))},positive(e){return this.check(La(0,e))},nonnegative(e){return this.check(Ra(0,e))},negative(e){return this.check(Fa(0,e))},nonpositive(e){return this.check(Ia(0,e))},multipleOf(e,t){return this.check(za(e,t))},step(e,t){return this.check(za(e,t))},finite(){return this}}));function R(e){return Ea(Sc,e)}var Cc=I(`ZodNumberFormat`,(e,t)=>{Fr.init(e,t),Sc.init(e,t)});function wc(e){return Oa(Cc,e)}var Tc=I(`ZodBoolean`,(e,t)=>{Ir.init(e,t),qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>zo(e,t,n,r)});function z(e){return ka(Tc,e)}var Ec=I(`ZodUndefined`,(e,t)=>{Lr.init(e,t),qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Uo(e,t,n,r)});function Dc(e){return Aa(Ec,e)}var Oc=I(`ZodNull`,(e,t)=>{Rr.init(e,t),qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ho(e,t,n,r)});function kc(e){return ja(Oc,e)}var Ac=I(`ZodAny`,(e,t)=>{zr.init(e,t),qs.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function jc(){return Ma(Ac)}var Mc=I(`ZodUnknown`,(e,t)=>{Br.init(e,t),qs.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function B(){return Na(Mc)}var Nc=I(`ZodNever`,(e,t)=>{Vr.init(e,t),qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Go(e,t,n,r)});function Pc(e){return Pa(Nc,e)}var Fc=I(`ZodArray`,(e,t)=>{Ks(),Ur.init(e,t),qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>os(e,t,n,r),e.element=t.element},{min(e,t){return this.check(Va(e,t))},nonempty(e){return this.check(Va(1,e))},max(e,t){return this.check(Ba(e,t))},length(e,t){return this.check(Ha(e,t))},unwrap(){return this.element}});function V(e,t){return to(Fc,e,t)}var Ic=I(`ZodObject`,(e,t)=>{Ks(),Yr.init(e,t),qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>cs(e,t,n,r),et(e,`shape`,e=>e._zod.def.shape,!1)},{keyof(){return K(Object.keys(this._zod.def.shape))},catchall(e){return this.clone(de(this._zod.def,{catchall:e}))},passthrough(){return this.clone(de(this._zod.def,{catchall:B()}))},loose(){return this.clone(de(this._zod.def,{catchall:B()}))},strict(){return this.clone(de(this._zod.def,{catchall:Pc()}))},strip(){return this.clone(de(this._zod.def,{catchall:void 0}))},extend(e){return Oe(this,e)},safeExtend(e){return Ae(this,e)},merge(e){return je(this,e)},pick(e){return Te(this,e)},omit(e){return De(this,e)},partial(...e){return Me(qc,this,e[0])},exactPartial(...e){return Me(Jc,this,e[0],`exactPartial`)},required(...e){return Ne(nl,this,e[0])}});function H(e,t){return new Ic({type:`object`,shape:e??{},...P(t)})}function U(e,t){return new Ic({type:`object`,shape:e,catchall:B(),...P(t)})}var Lc=I(`ZodUnion`,(e,t)=>{Zr.init(e,t),qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ls(e,t,n,r),e.options=t.options});function W(e,t){return new Lc({type:`union`,options:e,...P(t)})}var Rc=I(`ZodDiscriminatedUnion`,(e,t)=>{Lc.init(e,t),$r.init(e,t)});function zc(e,t,n){return new Rc({type:`union`,options:t,discriminator:e,...P(n)})}var Bc=I(`ZodIntersection`,(e,t)=>{ei.init(e,t),qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>us(e,t,n,r)});function Vc(e,t){return new Bc({type:`intersection`,left:e,right:t})}var Hc=I(`ZodRecord`,(e,t)=>{Ks(),ri.init(e,t),qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>hs(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType});function G(e,t,n){return!t||!t._zod?new Hc({type:`record`,keyType:L(),valueType:e,...P(t)}):new Hc({type:`record`,keyType:e,valueType:t,...P(n)})}var Uc=I(`ZodEnum`,(e,t)=>{ii.init(e,t),qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Yo(e,t,n,r),e.enum=t.entries,e.options=[...e._zod.values];let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new Uc({...t,checks:[],...P(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new Uc({...t,checks:[],...P(r),entries:i})}});function K(e,t){return new Uc({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...P(t)})}var Wc=I(`ZodLiteral`,(e,t)=>{ai.init(e,t),qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Xo(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function q(e,t){return new Wc({type:`literal`,values:Array.isArray(e)?e:[e],...P(t)})}var Gc=I(`ZodTransform`,(e,t)=>{Ks(),oi.init(e,t),qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>rs(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new lt(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(We(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,`input`in t||(t.input=n.value),t.inst??=e,n.issues.push(We(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function Kc(e){return new Gc({type:`transform`,transform:e})}var qc=I(`ZodOptional`,(e,t)=>{ci.init(e,t),qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Es(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function J(e){return new qc({type:`optional`,innerType:e})}var Jc=I(`ZodExactOptional`,(e,t)=>{li.init(e,t),qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Es(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Yc(e){return new Jc({type:`optional`,innerType:e})}var Xc=I(`ZodNullable`,(e,t)=>{ui.init(e,t),qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>gs(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Zc(e){return new Xc({type:`nullable`,innerType:e})}var Qc=I(`ZodDefault`,(e,t)=>{di.init(e,t),qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>bs(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function $c(e,t){return new Qc({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():ve(t)}})}var el=I(`ZodPrefault`,(e,t)=>{pi.init(e,t),qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>xs(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function tl(e,t){return new el({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():ve(t)}})}var nl=I(`ZodNonOptional`,(e,t)=>{mi.init(e,t),qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>_s(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function rl(e,t){return new nl({type:`nonoptional`,innerType:e,...P(t)})}var il=I(`ZodCatch`,(e,t)=>{_i.init(e,t),qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ss(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function al(e,t){return new il({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:nt(t)})}var ol=I(`ZodPipe`,(e,t)=>{vi.init(e,t),qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Cs(e,t,n,r),e.in=t.in,e.out=t.out});function sl(e,t){return new ol({type:`pipe`,in:e,out:t})}var cl=I(`ZodPreprocess`,(e,t)=>{ol.init(e,t),bi.init(e,t)}),ll=I(`ZodReadonly`,(e,t)=>{xi.init(e,t),qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ws(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function ul(e){return new ll({type:`readonly`,innerType:e})}var dl=I(`ZodTemplateLiteral`,(e,t)=>{Ti.init(e,t),qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Qo(e,t,n,r)});function fl(e,t){return new dl({type:`template_literal`,parts:e,...P(t)})}var pl=I(`ZodLazy`,(e,t)=>{Ei.init(e,t),qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ds(e,t,n,r),e.unwrap=()=>e._zod.def.getter()});function ml(e){return new pl({type:`lazy`,getter:e})}var hl=I(`ZodCustom`,(e,t)=>{Di.init(e,t),qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ts(e,t,n,r)});function gl(e,t={}){return no(hl,e,t)}function _l(e,t){return ro(e,t)}function vl(e,t){return new cl({type:`pipe`,in:Kc(e),out:t})}var yl={invalid_type:`invalid_type`,too_big:`too_big`,too_small:`too_small`,invalid_format:`invalid_format`,not_multiple_of:`not_multiple_of`,unrecognized_keys:`unrecognized_keys`,invalid_union:`invalid_union`,invalid_key:`invalid_key`,invalid_element:`invalid_element`,invalid_value:`invalid_value`,custom:`custom`},bl;bl||={};function xl(e){return Sa(Zs,e)}function Sl(e){return Ca(Qs,e)}function Cl(e){return Da(Sc,e)}var wl=[`2025-11-25`,`2025-06-18`,`2025-03-26`,`2024-11-05`,`2024-10-07`],Tl=`io.modelcontextprotocol/related-task`,El=`io.modelcontextprotocol/protocolVersion`,Dl=`io.modelcontextprotocol/clientInfo`,Ol=`io.modelcontextprotocol/serverInfo`,kl=`io.modelcontextprotocol/clientCapabilities`,Al=`io.modelcontextprotocol/subscriptionId`,jl=`io.modelcontextprotocol/logLevel`,Ml=ml(()=>W([L(),R(),z(),kc(),G(L(),Ml),V(Ml)])),Nl=G(L(),Ml),Pl=V(Ml),Fl=W([L(),R().int()]),Il=L(),Ll=H({ttl:R().optional()}),Rl=H({taskId:L()}),zl=U({progressToken:Fl.optional(),[Tl]:Rl.optional()}),Bl=H({_meta:zl.optional()}),Vl=Bl.extend({task:Ll.optional()}),Hl=H({method:L(),params:Bl.loose().optional()}),Ul=H({_meta:zl.optional()}),Wl=H({method:L(),params:Ul.loose().optional()}),Gl=U({get[Ol](){return ou.optional().catch(void 0)}}),Kl=U({_meta:Gl.optional()}),ql=W([L(),R().int()]),Jl=H({jsonrpc:q(`2.0`),id:ql,...Hl.shape}).strict(),Yl=H({jsonrpc:q(`2.0`),...Wl.shape}).strict(),Xl=H({jsonrpc:q(`2.0`),id:ql,result:Kl}).strict(),Zl=H({jsonrpc:q(`2.0`),id:ql.optional(),error:H({code:R().int(),message:L(),data:B().optional()})}).strict(),Ql=W([Jl,Yl,Xl,Zl]),$l=W([Xl,Zl]),eu=Kl.strict(),tu=Ul.extend({requestId:ql.optional(),reason:L().optional()}),nu=Wl.extend({method:q(`notifications/cancelled`),params:tu}),ru=H({src:L(),mimeType:L().optional(),sizes:V(L()).optional(),theme:K([`light`,`dark`]).optional()}),iu=H({icons:V(ru).optional()}),au=H({name:L(),title:L().optional()}),ou=au.extend({...au.shape,...iu.shape,version:L(),websiteUrl:L().optional(),description:L().optional()}),su=vl(e=>e&&typeof e==`object`&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,Vc(H({form:Vc(H({applyDefaults:z().optional()}),Nl).optional(),url:Nl.optional()}),Nl.optional())),cu=U({list:Nl.optional(),cancel:Nl.optional(),requests:U({sampling:U({createMessage:Nl.optional()}).optional(),elicitation:U({create:Nl.optional()}).optional()}).optional()}),lu=U({list:Nl.optional(),cancel:Nl.optional(),requests:U({tools:U({call:Nl.optional()}).optional()}).optional()}),uu=H({experimental:G(L(),Nl).optional(),sampling:H({context:Nl.optional(),tools:Nl.optional()}).optional(),elicitation:su.optional(),roots:H({listChanged:z().optional()}).optional(),tasks:cu.optional(),extensions:G(L(),Nl).optional()}),du=Bl.extend({protocolVersion:L(),capabilities:uu,clientInfo:ou}),fu=Hl.extend({method:q(`initialize`),params:du}),pu=H({experimental:G(L(),Nl).optional(),logging:Nl.optional(),completions:Nl.optional(),prompts:H({listChanged:z().optional()}).optional(),resources:H({subscribe:z().optional(),listChanged:z().optional()}).optional(),tools:H({listChanged:z().optional()}).optional(),tasks:lu.optional(),extensions:G(L(),Nl).optional()}),mu=Kl.extend({protocolVersion:L(),capabilities:pu,serverInfo:ou,instructions:L().optional()}),hu=Wl.extend({method:q(`notifications/initialized`),params:Ul.optional()}),gu=Hl.extend({method:q(`server/discover`),params:Bl.optional()}),_u=Kl.extend({supportedVersions:V(L()),capabilities:pu,instructions:L().optional()}),vu=Hl.extend({method:q(`ping`),params:Bl.optional()}),yu=H({progress:R(),total:J(R()),message:J(L())}),bu=H({...Ul.shape,...yu.shape,progressToken:Fl}),xu=Wl.extend({method:q(`notifications/progress`),params:bu}),Su=Bl.extend({cursor:Il.optional()}),Cu=Hl.extend({params:Su.optional()}),wu=Kl.extend({nextCursor:Il.optional()}),Tu=H({uri:L(),mimeType:J(L()),_meta:G(L(),B()).optional()}),Eu=Tu.extend({text:L()}),Du=L().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:`Invalid Base64 string`}),Ou=Tu.extend({blob:Du}),ku=K([`user`,`assistant`]),Au=H({audience:V(ku).optional(),priority:R().min(0).max(1).optional(),lastModified:xl({offset:!0}).optional()}),ju=H({...au.shape,...iu.shape,uri:L(),description:J(L()),mimeType:J(L()),size:J(R()),annotations:Au.optional(),_meta:J(U({}))}),Mu=H({...au.shape,...iu.shape,uriTemplate:L(),description:J(L()),mimeType:J(L()),annotations:Au.optional(),_meta:J(U({}))}),Nu=Cu.extend({method:q(`resources/list`)}),Pu=wu.extend({resources:V(ju)}),Fu=Cu.extend({method:q(`resources/templates/list`)}),Iu=wu.extend({resourceTemplates:V(Mu)}),Lu=Bl.extend({uri:L()}),Ru=Lu,zu=Hl.extend({method:q(`resources/read`),params:Ru}),Bu=Kl.extend({contents:V(W([Eu,Ou]))}),Vu=Wl.extend({method:q(`notifications/resources/list_changed`),params:Ul.optional()}),Hu=Lu,Uu=Hl.extend({method:q(`resources/subscribe`),params:Hu}),Wu=Lu,Gu=Hl.extend({method:q(`resources/unsubscribe`),params:Wu}),Ku=H({toolsListChanged:z().optional(),promptsListChanged:z().optional(),resourcesListChanged:z().optional(),resourceSubscriptions:V(L()).optional()}),qu=Bl.extend({notifications:Ku}),Ju=Hl.extend({method:q(`subscriptions/listen`),params:qu}),Yu=Ul.extend({notifications:Ku}),Xu=Wl.extend({method:q(`notifications/subscriptions/acknowledged`),params:Yu}),Zu=Gl.extend({[Al]:ql}),Qu=Kl.extend({_meta:Zu}),$u=Ul.extend({uri:L()}),ed=Wl.extend({method:q(`notifications/resources/updated`),params:$u}),td=H({name:L(),description:J(L()),required:J(z())}),nd=H({...au.shape,...iu.shape,description:J(L()),arguments:J(V(td)),_meta:J(U({}))}),rd=Cu.extend({method:q(`prompts/list`)}),id=wu.extend({prompts:V(nd)}),ad=Bl.extend({name:L(),arguments:G(L(),L()).optional()}),od=Hl.extend({method:q(`prompts/get`),params:ad}),sd=H({type:q(`text`),text:L(),annotations:Au.optional(),_meta:G(L(),B()).optional()}),cd=H({type:q(`image`),data:Du,mimeType:L(),annotations:Au.optional(),_meta:G(L(),B()).optional()}),ld=H({type:q(`audio`),data:Du,mimeType:L(),annotations:Au.optional(),_meta:G(L(),B()).optional()}),ud=H({type:q(`tool_use`),name:L(),id:L(),input:G(L(),B()),_meta:G(L(),B()).optional()}),dd=H({type:q(`resource`),resource:W([Eu,Ou]),annotations:Au.optional(),_meta:G(L(),B()).optional()}),fd=ju.extend({type:q(`resource_link`)}),pd=W([sd,cd,ld,fd,dd]),md=H({role:ku,content:pd}),hd=Kl.extend({description:L().optional(),messages:V(md)}),gd=Wl.extend({method:q(`notifications/prompts/list_changed`),params:Ul.optional()}),_d=H({title:L().optional(),readOnlyHint:z().optional(),destructiveHint:z().optional(),idempotentHint:z().optional(),openWorldHint:z().optional()}),vd=H({taskSupport:K([`required`,`optional`,`forbidden`]).optional()}),yd=H({...au.shape,...iu.shape,description:L().optional(),inputSchema:H({type:q(`object`),properties:G(L(),Ml).optional(),required:V(L()).optional()}).catchall(B()),outputSchema:U({$schema:L().optional()}).optional(),annotations:_d.optional(),execution:vd.optional(),_meta:G(L(),B()).optional()}),bd=Cu.extend({method:q(`tools/list`)}),xd=wu.extend({tools:V(yd)}),Sd=Kl.extend({content:V(pd).default([]),structuredContent:B().optional(),isError:z().optional()}),Cd=Sd.or(Kl.extend({toolResult:B()})),wd=Vl.extend({name:L(),arguments:G(L(),B()).optional()}),Td=Hl.extend({method:q(`tools/call`),params:wd}),Ed=Wl.extend({method:q(`notifications/tools/list_changed`),params:Ul.optional()}),Dd=H({autoRefresh:z().default(!0),debounceMs:R().int().nonnegative().default(300)}),Od=K([`debug`,`info`,`notice`,`warning`,`error`,`critical`,`alert`,`emergency`]),kd=Bl.extend({level:Od}),Ad=Hl.extend({method:q(`logging/setLevel`),params:kd}),jd=Ul.extend({level:Od,logger:L().optional(),data:B()}),Md=Wl.extend({method:q(`notifications/message`),params:jd}),Nd=H({name:L().optional()}),Pd=H({hints:V(Nd).optional(),costPriority:R().min(0).max(1).optional(),speedPriority:R().min(0).max(1).optional(),intelligencePriority:R().min(0).max(1).optional()}),Fd=H({mode:K([`auto`,`required`,`none`]).optional()}),Id=H({type:q(`tool_result`),toolUseId:L().describe(`The unique identifier for the corresponding tool call.`),content:V(pd),structuredContent:B().optional(),isError:z().optional(),_meta:G(L(),B()).optional()}),Ld=zc(`type`,[sd,cd,ld]),Rd=zc(`type`,[sd,cd,ld,ud,Id]),zd=H({role:ku,content:W([Rd,V(Rd)]),_meta:G(L(),B()).optional()}),Bd=Vl.extend({messages:V(zd),modelPreferences:Pd.optional(),systemPrompt:L().optional(),includeContext:K([`none`,`thisServer`,`allServers`]).optional(),temperature:R().optional(),maxTokens:R().int(),stopSequences:V(L()).optional(),metadata:Nl.optional(),tools:V(yd).optional(),toolChoice:Fd.optional()}),Vd=Hl.extend({method:q(`sampling/createMessage`),params:Bd}),Hd=Kl.extend({model:L(),stopReason:J(K([`endTurn`,`stopSequence`,`maxTokens`]).or(L())),role:ku,content:Ld}),Ud=Kl.extend({model:L(),stopReason:J(K([`endTurn`,`stopSequence`,`maxTokens`,`toolUse`]).or(L())),role:ku,content:W([Rd,V(Rd)])}),Wd=H({type:q(`boolean`),title:L().optional(),description:L().optional(),default:z().optional()}),Gd=H({type:q(`string`),title:L().optional(),description:L().optional(),minLength:R().optional(),maxLength:R().optional(),format:K([`email`,`uri`,`date`,`date-time`]).optional(),default:L().optional()}),Kd=H({type:K([`number`,`integer`]),title:L().optional(),description:L().optional(),minimum:R().optional(),maximum:R().optional(),default:R().optional()}),qd=H({type:q(`string`),title:L().optional(),description:L().optional(),enum:V(L()),default:L().optional()}),Jd=H({type:q(`string`),title:L().optional(),description:L().optional(),oneOf:V(H({const:L(),title:L()})),default:L().optional()}),Yd=H({type:q(`string`),title:L().optional(),description:L().optional(),enum:V(L()),enumNames:V(L()).optional(),default:L().optional()}),Xd=W([qd,Jd]),Zd=H({type:q(`array`),title:L().optional(),description:L().optional(),minItems:R().optional(),maxItems:R().optional(),items:H({type:q(`string`),enum:V(L())}),default:V(L()).optional()}),Qd=H({type:q(`array`),title:L().optional(),description:L().optional(),minItems:R().optional(),maxItems:R().optional(),items:H({anyOf:V(H({const:L(),title:L()}))}),default:V(L()).optional()}),$d=W([Zd,Qd]),ef=W([Yd,Xd,$d]),tf=W([ef,Wd,Gd,Kd]),nf=Vl.extend({mode:q(`form`).optional(),message:L(),requestedSchema:H({type:q(`object`),properties:G(L(),tf),required:V(L()).optional()}).catchall(B())}),rf=Vl.extend({mode:q(`url`),message:L(),elicitationId:L(),url:L().url()}),af=W([nf,rf]),of=Hl.extend({method:q(`elicitation/create`),params:af}),sf=Ul.extend({elicitationId:L()}),cf=Wl.extend({method:q(`notifications/elicitation/complete`),params:sf}),lf=Kl.extend({action:K([`accept`,`decline`,`cancel`]),content:vl(e=>e===null?void 0:e,G(L(),W([L(),R(),z(),V(L())])).optional())}),uf=H({type:q(`ref/resource`),uri:L()}),df=H({type:q(`ref/prompt`),name:L()}),ff=Bl.extend({ref:W([df,uf]),argument:H({name:L(),value:L()}),context:H({arguments:G(L(),L()).optional()}).optional()}),pf=Hl.extend({method:q(`completion/complete`),params:ff}),mf=Kl.extend({completion:U({values:V(L()).max(100),total:J(R().int()),hasMore:J(z())})}),hf=H({uri:L().startsWith(`file://`),name:L().optional(),_meta:G(L(),B()).optional()}),gf=Hl.extend({method:q(`roots/list`),params:Bl.optional()}),_f=Kl.extend({roots:V(hf)}),vf=Wl.extend({method:q(`notifications/roots/list_changed`),params:Ul.optional()}),yf=U({ttl:R().optional(),pollInterval:R().optional()}),bf=K([`working`,`input_required`,`completed`,`failed`,`cancelled`]),xf=H({taskId:L(),status:bf,ttl:W([R(),kc()]),createdAt:L(),lastUpdatedAt:L(),pollInterval:J(R()),statusMessage:J(L())}),Sf=Kl.extend({task:xf}),Cf=Ul.merge(xf),wf=Wl.extend({method:q(`notifications/tasks/status`),params:Cf}),Tf=Hl.extend({method:q(`tasks/get`),params:Bl.extend({taskId:L()})}),Ef=Kl.merge(xf),Df=Hl.extend({method:q(`tasks/result`),params:Bl.extend({taskId:L()})}),Of=Kl.loose(),kf=Cu.extend({method:q(`tasks/list`)}),Af=wu.extend({tasks:V(xf)}),jf=Hl.extend({method:q(`tasks/cancel`),params:Bl.extend({taskId:L()})}),Mf=Kl.merge(xf),Nf=W([vu,fu,gu,pf,Ad,od,rd,Nu,Fu,zu,Uu,Gu,Ju,Td,bd]),Pf=W([nu,xu,hu,vf]),Ff=W([eu,Hd,Ud,lf,_f]),If=W([vu,Vd,of,gf]),Lf=W([nu,xu,Md,ed,Vu,Ed,gd,Xu,cf]),Rf=W([eu,mu,_u,mf,hd,id,Pu,Iu,Bu,Sd,xd,Qu]),zf=oc().superRefine((e,t)=>{if(!URL.canParse(e))return t.addIssue({code:yl.custom,message:`URL must be parseable`,fatal:!0}),it}).refine(e=>{let t=new URL(e);return t.protocol!==`javascript:`&&t.protocol!==`data:`&&t.protocol!==`vbscript:`},{message:`URL cannot use javascript:, data:, or vbscript: scheme`}),Bf=U({resource:L().url(),authorization_servers:V(zf).optional(),jwks_uri:L().url().optional(),scopes_supported:V(L()).optional(),bearer_methods_supported:V(L()).optional(),resource_signing_alg_values_supported:V(L()).optional(),resource_name:L().optional(),resource_documentation:L().optional(),resource_policy_uri:L().url().optional(),resource_tos_uri:L().url().optional(),tls_client_certificate_bound_access_tokens:z().optional(),authorization_details_types_supported:V(L()).optional(),dpop_signing_alg_values_supported:V(L()).optional(),dpop_bound_access_tokens_required:z().optional()}),Vf=U({issuer:L(),authorization_endpoint:zf,token_endpoint:zf,registration_endpoint:zf.optional(),scopes_supported:V(L()).optional(),response_types_supported:V(L()),response_modes_supported:V(L()).optional(),grant_types_supported:V(L()).optional(),token_endpoint_auth_methods_supported:V(L()).optional(),token_endpoint_auth_signing_alg_values_supported:V(L()).optional(),service_documentation:zf.optional(),revocation_endpoint:zf.optional(),revocation_endpoint_auth_methods_supported:V(L()).optional(),revocation_endpoint_auth_signing_alg_values_supported:V(L()).optional(),introspection_endpoint:L().optional(),introspection_endpoint_auth_methods_supported:V(L()).optional(),introspection_endpoint_auth_signing_alg_values_supported:V(L()).optional(),code_challenge_methods_supported:V(L()).optional(),client_id_metadata_document_supported:z().optional(),authorization_response_iss_parameter_supported:z().optional().catch(void 0),dpop_signing_alg_values_supported:V(L()).optional()}),Hf=U({issuer:L(),authorization_endpoint:zf,token_endpoint:zf,userinfo_endpoint:zf.optional(),jwks_uri:zf,registration_endpoint:zf.optional(),scopes_supported:V(L()).optional(),response_types_supported:V(L()),response_modes_supported:V(L()).optional(),grant_types_supported:V(L()).optional(),acr_values_supported:V(L()).optional(),subject_types_supported:V(L()),id_token_signing_alg_values_supported:V(L()),id_token_encryption_alg_values_supported:V(L()).optional(),id_token_encryption_enc_values_supported:V(L()).optional(),userinfo_signing_alg_values_supported:V(L()).optional(),userinfo_encryption_alg_values_supported:V(L()).optional(),userinfo_encryption_enc_values_supported:V(L()).optional(),request_object_signing_alg_values_supported:V(L()).optional(),request_object_encryption_alg_values_supported:V(L()).optional(),request_object_encryption_enc_values_supported:V(L()).optional(),token_endpoint_auth_methods_supported:V(L()).optional(),token_endpoint_auth_signing_alg_values_supported:V(L()).optional(),display_values_supported:V(L()).optional(),claim_types_supported:V(L()).optional(),claims_supported:V(L()).optional(),service_documentation:L().optional(),claims_locales_supported:V(L()).optional(),ui_locales_supported:V(L()).optional(),claims_parameter_supported:z().optional(),request_parameter_supported:z().optional(),request_uri_parameter_supported:z().optional(),require_request_uri_registration:z().optional(),op_policy_uri:zf.optional(),op_tos_uri:zf.optional(),client_id_metadata_document_supported:z().optional(),authorization_response_iss_parameter_supported:z().optional().catch(void 0)}),Uf=H({...Hf.shape,...Vf.pick({code_challenge_methods_supported:!0}).shape}),Wf=H({access_token:L(),id_token:L().optional(),token_type:L(),expires_in:Cl().optional(),scope:L().optional(),refresh_token:L().optional(),issuer:L().optional().catch(void 0)}).strip(),Gf=H({issued_token_type:q(`urn:ietf:params:oauth:token-type:id-jag`),access_token:L(),token_type:L().optional(),expires_in:R().optional(),scope:L().optional()}).strip(),Kf=H({error:L(),error_description:L().optional(),error_uri:L().optional()}),qf=zf.optional().or(q(``).transform(()=>void 0)),Jf=H({redirect_uris:V(zf),token_endpoint_auth_method:L().optional(),grant_types:V(L()).optional(),response_types:V(L()).optional(),application_type:L().optional(),client_name:L().optional(),client_uri:zf.optional(),logo_uri:qf,scope:L().optional(),contacts:V(L()).optional(),tos_uri:qf,policy_uri:L().optional(),jwks_uri:zf.optional(),jwks:jc().optional(),software_id:L().optional(),software_version:L().optional(),software_statement:L().optional()}).strip(),Yf=H({client_id:L(),client_secret:L().optional(),client_id_issued_at:R().optional(),client_secret_expires_at:R().optional(),issuer:L().optional().catch(void 0)}).strip(),Xf=Jf.merge(Yf),Zf=H({error:L(),error_description:L().optional()}).strip(),Qf=H({token:L(),token_type_hint:L().optional()}).strip(),$f=Symbol.for(`mcp.sdk.errorBrands`);function ep(e,t){let n=new Set,r=t;for(;typeof r==`function`;){let e=r.mcpBrand;Object.prototype.hasOwnProperty.call(r,`mcpBrand`)&&typeof e==`string`&&n.add(e),r=Object.getPrototypeOf(r)}n.size!==0&&Object.defineProperty(e,$f,{value:n,enumerable:!1,configurable:!0})}function tp(e,t){try{if(typeof t==`object`&&t&&Object.prototype.hasOwnProperty.call(e,`mcpBrand`)&&typeof e.mcpBrand==`string`&&Object.prototype.hasOwnProperty.call(t,$f)){let n=t[$f];if(n&&typeof n.has==`function`&&n.has(e.mcpBrand))return!0}}catch{}return Function.prototype[Symbol.hasInstance].call(e,t)}(class e extends Error{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.OAuthError`})}static[Symbol.hasInstance](e){return tp(this,e)}static isInstance(e){if(typeof this!=`function`)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return tp(this,e)}constructor(e,t,n){super(t),this.code=e,this.errorUri=n,this.name=`OAuthError`,ep(this,new.target)}toResponseObject(){let e={error:this.code,error_description:this.message};return this.errorUri&&(e.error_uri=this.errorUri),e}static fromResponse(t){return new e(t.error,t.error_description??t.error,t.error_uri)}});var np=function(e){return e.NotConnected=`NOT_CONNECTED`,e.AlreadyConnected=`ALREADY_CONNECTED`,e.NotInitialized=`NOT_INITIALIZED`,e.CapabilityNotSupported=`CAPABILITY_NOT_SUPPORTED`,e.RequestTimeout=`REQUEST_TIMEOUT`,e.ConnectionClosed=`CONNECTION_CLOSED`,e.SendFailed=`SEND_FAILED`,e.InvalidResult=`INVALID_RESULT`,e.UnsupportedResultType=`UNSUPPORTED_RESULT_TYPE`,e.InputRequiredRoundsExceeded=`INPUT_REQUIRED_ROUNDS_EXCEEDED`,e.ListPaginationExceeded=`LIST_PAGINATION_EXCEEDED`,e.MethodNotSupportedByProtocolVersion=`METHOD_NOT_SUPPORTED_BY_PROTOCOL_VERSION`,e.EraNegotiationFailed=`ERA_NEGOTIATION_FAILED`,e.ClientHttpNotImplemented=`CLIENT_HTTP_NOT_IMPLEMENTED`,e.ClientHttpAuthentication=`CLIENT_HTTP_AUTHENTICATION`,e.ClientHttpForbidden=`CLIENT_HTTP_FORBIDDEN`,e.ClientHttpUnexpectedContent=`CLIENT_HTTP_UNEXPECTED_CONTENT`,e.ClientHttpFailedToOpenStream=`CLIENT_HTTP_FAILED_TO_OPEN_STREAM`,e.ClientHttpFailedToTerminateSession=`CLIENT_HTTP_FAILED_TO_TERMINATE_SESSION`,e}({}),rp=class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.SdkError`})}static[Symbol.hasInstance](e){return tp(this,e)}static isInstance(e){if(typeof this!=`function`)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return tp(this,e)}constructor(e,t,n,r){super(t,r),this.code=e,this.data=n,this.name=`SdkError`,ep(this,new.target)}};(class extends rp{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.SdkHttpError`})}constructor(e,t,n,r){super(e,t,n,r),this.name=`SdkHttpError`}get status(){return this.data.status}get statusText(){return this.data.statusText}});var ip=`2026-07-28`;function ap(e){return e>=ip}function op(e){let t=e.structuredContent;return t===void 0||typeof t==`object`&&t&&!Array.isArray(t)||(e.content?.some(e=>e.type===`text`)??!1)?e:{...e,content:[...e.content??[],{type:`text`,text:JSON.stringify(t)}]}}var sp=[`task`,`inputRequests`,`requestState`];function cp(e){return typeof e!=`object`||!e||Array.isArray(e)||e.content!==void 0||sp.some(t=>t in e)?e:{...e,content:[]}}function lp(){let e=ml(()=>W([L(),R(),z(),kc(),G(L(),e),V(e)])),t=G(L(),e),n=W([L(),R().int()]),r=L(),i=H({ttl:R().optional()}),a=H({taskId:L()}),o=U({progressToken:n.optional(),"io.modelcontextprotocol/related-task":a.optional()}),s=H({_meta:o.optional()}),c=s.extend({task:i.optional()}),l=H({method:L(),params:s.loose().optional()}),u=H({_meta:o.optional()}),d=H({method:L(),params:u.loose().optional()}),f=U({_meta:o.optional()}),p=W([L(),R().int()]),m=f.strict(),h=u.extend({requestId:p.optional(),reason:L().optional()}),g=d.extend({method:q(`notifications/cancelled`),params:h}),_=H({src:L(),mimeType:L().optional(),sizes:V(L()).optional(),theme:K([`light`,`dark`]).optional()}),v=H({icons:V(_).optional()}),y=H({name:L(),title:L().optional()}),b=y.extend({...y.shape,...v.shape,version:L(),websiteUrl:L().optional(),description:L().optional()}),x=vl(e=>e&&typeof e==`object`&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,Vc(H({form:Vc(H({applyDefaults:z().optional()}),t).optional(),url:t.optional()}),t.optional())),S=U({list:t.optional(),cancel:t.optional(),requests:U({sampling:U({createMessage:t.optional()}).optional(),elicitation:U({create:t.optional()}).optional()}).optional()}),C=U({list:t.optional(),cancel:t.optional(),requests:U({tools:U({call:t.optional()}).optional()}).optional()}),w=H({experimental:G(L(),t).optional(),sampling:H({context:t.optional(),tools:t.optional()}).optional(),elicitation:x.optional(),roots:H({listChanged:z().optional()}).optional(),tasks:S.optional(),extensions:G(L(),t).optional()}),T=s.extend({protocolVersion:L(),capabilities:w,clientInfo:b}),E=l.extend({method:q(`initialize`),params:T}),D=H({experimental:G(L(),t).optional(),logging:t.optional(),completions:t.optional(),prompts:H({listChanged:z().optional()}).optional(),resources:H({subscribe:z().optional(),listChanged:z().optional()}).optional(),tools:H({listChanged:z().optional()}).optional(),tasks:C.optional(),extensions:G(L(),t).optional()}),ee=f.extend({protocolVersion:L(),capabilities:D,serverInfo:b,instructions:L().optional()}),O=d.extend({method:q(`notifications/initialized`),params:u.optional()}),k=l.extend({method:q(`ping`),params:s.optional()}),A=H({progress:R(),total:J(R()),message:J(L())}),te=H({...u.shape,...A.shape,progressToken:n}),ne=d.extend({method:q(`notifications/progress`),params:te}),re=s.extend({cursor:r.optional()}),ie=l.extend({params:re.optional()}),ae=f.extend({nextCursor:r.optional()}),oe=H({uri:L(),mimeType:J(L()),_meta:G(L(),B()).optional()}),se=oe.extend({text:L()}),ce=L().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:`Invalid Base64 string`}),j=oe.extend({blob:ce}),le=K([`user`,`assistant`]),ue=H({audience:V(le).optional(),priority:R().min(0).max(1).optional(),lastModified:xl({offset:!0}).optional()}),de=H({...y.shape,...v.shape,uri:L(),description:J(L()),mimeType:J(L()),size:J(R()),annotations:ue.optional(),_meta:J(U({}))}),fe=H({...y.shape,...v.shape,uriTemplate:L(),description:J(L()),mimeType:J(L()),annotations:ue.optional(),_meta:J(U({}))}),pe=ie.extend({method:q(`resources/list`)}),me=ae.extend({resources:V(de)}),he=ie.extend({method:q(`resources/templates/list`)}),ge=ae.extend({resourceTemplates:V(fe)}),_e=s.extend({uri:L()}),ve=_e,M=l.extend({method:q(`resources/read`),params:ve}),N=f.extend({contents:V(W([se,j]))}),ye=d.extend({method:q(`notifications/resources/list_changed`),params:u.optional()}),be=_e,P=l.extend({method:q(`resources/subscribe`),params:be}),xe=_e,Se=l.extend({method:q(`resources/unsubscribe`),params:xe}),Ce=u.extend({uri:L()}),we=d.extend({method:q(`notifications/resources/updated`),params:Ce}),Te=H({name:L(),description:J(L()),required:J(z())}),Ee=H({...y.shape,...v.shape,description:J(L()),arguments:J(V(Te)),_meta:J(U({}))}),De=ie.extend({method:q(`prompts/list`)}),Oe=ae.extend({prompts:V(Ee)}),ke=s.extend({name:L(),arguments:G(L(),L()).optional()}),Ae=l.extend({method:q(`prompts/get`),params:ke}),je=H({type:q(`text`),text:L(),annotations:ue.optional(),_meta:G(L(),B()).optional()}),Me=H({type:q(`image`),data:ce,mimeType:L(),annotations:ue.optional(),_meta:G(L(),B()).optional()}),Ne=H({type:q(`audio`),data:ce,mimeType:L(),annotations:ue.optional(),_meta:G(L(),B()).optional()}),Pe=H({type:q(`tool_use`),name:L(),id:L(),input:G(L(),B()),_meta:G(L(),B()).optional()}),Fe=H({type:q(`resource`),resource:W([se,j]),annotations:ue.optional(),_meta:G(L(),B()).optional()}),Ie=de.extend({type:q(`resource_link`)}),Le=W([je,Me,Ne,Ie,Fe]),Re=H({role:le,content:Le}),ze=f.extend({description:L().optional(),messages:V(Re)}),Be=d.extend({method:q(`notifications/prompts/list_changed`),params:u.optional()}),Ve=H({title:L().optional(),readOnlyHint:z().optional(),destructiveHint:z().optional(),idempotentHint:z().optional(),openWorldHint:z().optional()}),He=H({taskSupport:K([`required`,`optional`,`forbidden`]).optional()}),Ue=H({...y.shape,...v.shape,description:L().optional(),inputSchema:H({type:q(`object`),properties:G(L(),e).optional(),required:V(L()).optional()}).catchall(B()),outputSchema:H({type:q(`object`),properties:G(L(),e).optional(),required:V(L()).optional()}).catchall(B()).optional(),annotations:Ve.optional(),execution:He.optional(),_meta:G(L(),B()).optional()}),We=ie.extend({method:q(`tools/list`)}),Ge=ae.extend({tools:V(Ue)}),Ke=f.extend({content:V(Le),structuredContent:G(L(),B()).optional(),isError:z().optional()}),qe=c.extend({name:L(),arguments:G(L(),B()).optional()}),Je=l.extend({method:q(`tools/call`),params:qe}),Ye=d.extend({method:q(`notifications/tools/list_changed`),params:u.optional()}),Xe=K([`debug`,`info`,`notice`,`warning`,`error`,`critical`,`alert`,`emergency`]),Ze=s.extend({level:Xe}),Qe=l.extend({method:q(`logging/setLevel`),params:Ze}),$e=u.extend({level:Xe,logger:L().optional(),data:B()}),F=d.extend({method:q(`notifications/message`),params:$e}),et=H({name:L().optional()}),tt=H({hints:V(et).optional(),costPriority:R().min(0).max(1).optional(),speedPriority:R().min(0).max(1).optional(),intelligencePriority:R().min(0).max(1).optional()}),nt=H({mode:K([`auto`,`required`,`none`]).optional()}),rt=H({type:q(`tool_result`),toolUseId:L().describe(`The unique identifier for the corresponding tool call.`),content:V(Le),structuredContent:H({}).loose().optional(),isError:z().optional(),_meta:G(L(),B()).optional()}),it=zc(`type`,[je,Me,Ne]),at=zc(`type`,[je,Me,Ne,Pe,rt]),ot=H({role:le,content:W([at,V(at)]),_meta:G(L(),B()).optional()}),st=c.extend({messages:V(ot),modelPreferences:tt.optional(),systemPrompt:L().optional(),includeContext:K([`none`,`thisServer`,`allServers`]).optional(),temperature:R().optional(),maxTokens:R().int(),stopSequences:V(L()).optional(),metadata:t.optional(),tools:V(Ue).optional(),toolChoice:nt.optional()}),I=l.extend({method:q(`sampling/createMessage`),params:st}),ct=f.extend({model:L(),stopReason:J(K([`endTurn`,`stopSequence`,`maxTokens`]).or(L())),role:le,content:it}),lt=f.extend({model:L(),stopReason:J(K([`endTurn`,`stopSequence`,`maxTokens`,`toolUse`]).or(L())),role:le,content:W([at,V(at)])}),ut=H({type:q(`boolean`),title:L().optional(),description:L().optional(),default:z().optional()}),dt=H({type:q(`string`),title:L().optional(),description:L().optional(),minLength:R().optional(),maxLength:R().optional(),format:K([`email`,`uri`,`date`,`date-time`]).optional(),default:L().optional()}),ft=H({type:K([`number`,`integer`]),title:L().optional(),description:L().optional(),minimum:R().optional(),maximum:R().optional(),default:R().optional()}),pt=H({type:q(`string`),title:L().optional(),description:L().optional(),enum:V(L()),default:L().optional()}),mt=H({type:q(`string`),title:L().optional(),description:L().optional(),oneOf:V(H({const:L(),title:L()})),default:L().optional()}),ht=H({type:q(`string`),title:L().optional(),description:L().optional(),enum:V(L()),enumNames:V(L()).optional(),default:L().optional()}),gt=W([pt,mt]),_t=H({type:q(`array`),title:L().optional(),description:L().optional(),minItems:R().optional(),maxItems:R().optional(),items:H({type:q(`string`),enum:V(L())}),default:V(L()).optional()}),vt=H({type:q(`array`),title:L().optional(),description:L().optional(),minItems:R().optional(),maxItems:R().optional(),items:H({anyOf:V(H({const:L(),title:L()}))}),default:V(L()).optional()}),yt=W([_t,vt]),bt=W([ht,gt,yt]),xt=W([bt,ut,dt,ft]),St=c.extend({mode:q(`form`).optional(),message:L(),requestedSchema:H({type:q(`object`),properties:G(L(),xt),required:V(L()).optional()}).catchall(B())}),Ct=c.extend({mode:q(`url`),message:L(),elicitationId:L(),url:L().url()}),wt=W([St,Ct]),Tt=l.extend({method:q(`elicitation/create`),params:wt}),Et=u.extend({elicitationId:L()}),Dt=d.extend({method:q(`notifications/elicitation/complete`),params:Et}),Ot=f.extend({action:K([`accept`,`decline`,`cancel`]),content:vl(e=>e===null?void 0:e,G(L(),W([L(),R(),z(),V(L())])).optional())}),kt=H({type:q(`ref/resource`),uri:L()}),At=H({type:q(`ref/prompt`),name:L()}),jt=s.extend({ref:W([At,kt]),argument:H({name:L(),value:L()}),context:H({arguments:G(L(),L()).optional()}).optional()}),Mt=l.extend({method:q(`completion/complete`),params:jt}),Nt=f.extend({completion:U({values:V(L()).max(100),total:J(R().int()),hasMore:J(z())})}),Pt=H({uri:L().startsWith(`file://`),name:L().optional(),_meta:G(L(),B()).optional()}),Ft=l.extend({method:q(`roots/list`),params:s.optional()}),It=f.extend({roots:V(Pt)}),Lt=d.extend({method:q(`notifications/roots/list_changed`),params:u.optional()}),Rt=U({ttl:R().optional(),pollInterval:R().optional()}),zt=K([`working`,`input_required`,`completed`,`failed`,`cancelled`]),Bt=H({taskId:L(),status:zt,ttl:W([R(),kc()]),createdAt:L(),lastUpdatedAt:L(),pollInterval:J(R()),statusMessage:J(L())}),Vt=f.extend({task:Bt}),Ht=u.merge(Bt),Ut=d.extend({method:q(`notifications/tasks/status`),params:Ht}),Wt=l.extend({method:q(`tasks/get`),params:s.extend({taskId:L()})}),Gt=f.merge(Bt),Kt=l.extend({method:q(`tasks/result`),params:s.extend({taskId:L()})}),qt=f.loose(),Jt=ie.extend({method:q(`tasks/list`)}),Yt=ae.extend({tasks:V(Bt)}),Xt=l.extend({method:q(`tasks/cancel`),params:s.extend({taskId:L()})});return{JSONValueSchema:e,JSONObjectSchema:t,ProgressTokenSchema:n,CursorSchema:r,TaskMetadataSchema:i,RelatedTaskMetadataSchema:a,RequestMetaSchema:o,BaseRequestParamsSchema:s,TaskAugmentedRequestParamsSchema:c,RequestSchema:l,NotificationsParamsSchema:u,NotificationSchema:d,ResultSchema:f,RequestIdSchema:p,EmptyResultSchema:m,CancelledNotificationParamsSchema:h,CancelledNotificationSchema:g,IconSchema:_,IconsSchema:v,BaseMetadataSchema:y,ImplementationSchema:b,ClientTasksCapabilitySchema:S,ServerTasksCapabilitySchema:C,ClientCapabilitiesSchema:w,InitializeRequestParamsSchema:T,InitializeRequestSchema:E,ServerCapabilitiesSchema:D,InitializeResultSchema:ee,InitializedNotificationSchema:O,PingRequestSchema:k,ProgressSchema:A,ProgressNotificationParamsSchema:te,ProgressNotificationSchema:ne,PaginatedRequestParamsSchema:re,PaginatedRequestSchema:ie,PaginatedResultSchema:ae,ResourceContentsSchema:oe,TextResourceContentsSchema:se,BlobResourceContentsSchema:j,RoleSchema:le,AnnotationsSchema:ue,ResourceSchema:de,ResourceTemplateSchema:fe,ListResourcesRequestSchema:pe,ListResourcesResultSchema:me,ListResourceTemplatesRequestSchema:he,ListResourceTemplatesResultSchema:ge,ResourceRequestParamsSchema:_e,ReadResourceRequestParamsSchema:ve,ReadResourceRequestSchema:M,ReadResourceResultSchema:N,ResourceListChangedNotificationSchema:ye,SubscribeRequestParamsSchema:be,SubscribeRequestSchema:P,UnsubscribeRequestParamsSchema:xe,UnsubscribeRequestSchema:Se,ResourceUpdatedNotificationParamsSchema:Ce,ResourceUpdatedNotificationSchema:we,PromptArgumentSchema:Te,PromptSchema:Ee,ListPromptsRequestSchema:De,ListPromptsResultSchema:Oe,GetPromptRequestParamsSchema:ke,GetPromptRequestSchema:Ae,TextContentSchema:je,ImageContentSchema:Me,AudioContentSchema:Ne,ToolUseContentSchema:Pe,EmbeddedResourceSchema:Fe,ResourceLinkSchema:Ie,ContentBlockSchema:Le,PromptMessageSchema:Re,GetPromptResultSchema:ze,PromptListChangedNotificationSchema:Be,ToolAnnotationsSchema:Ve,ToolExecutionSchema:He,ToolSchema:Ue,ListToolsRequestSchema:We,ListToolsResultSchema:Ge,CallToolResultSchema:Ke,CallToolRequestParamsSchema:qe,CallToolRequestSchema:Je,ToolListChangedNotificationSchema:Ye,LoggingLevelSchema:Xe,SetLevelRequestParamsSchema:Ze,SetLevelRequestSchema:Qe,LoggingMessageNotificationParamsSchema:$e,LoggingMessageNotificationSchema:F,ModelHintSchema:et,ModelPreferencesSchema:tt,ToolChoiceSchema:nt,ToolResultContentSchema:rt,SamplingContentSchema:it,SamplingMessageContentBlockSchema:at,SamplingMessageSchema:ot,CreateMessageRequestParamsSchema:st,CreateMessageRequestSchema:I,CreateMessageResultSchema:ct,CreateMessageResultWithToolsSchema:lt,BooleanSchemaSchema:ut,StringSchemaSchema:dt,NumberSchemaSchema:ft,UntitledSingleSelectEnumSchemaSchema:pt,TitledSingleSelectEnumSchemaSchema:mt,LegacyTitledEnumSchemaSchema:ht,SingleSelectEnumSchemaSchema:gt,UntitledMultiSelectEnumSchemaSchema:_t,TitledMultiSelectEnumSchemaSchema:vt,MultiSelectEnumSchemaSchema:yt,EnumSchemaSchema:bt,PrimitiveSchemaDefinitionSchema:xt,ElicitRequestFormParamsSchema:St,ElicitRequestURLParamsSchema:Ct,ElicitRequestParamsSchema:wt,ElicitRequestSchema:Tt,ElicitationCompleteNotificationParamsSchema:Et,ElicitationCompleteNotificationSchema:Dt,ElicitResultSchema:Ot,ResourceTemplateReferenceSchema:kt,PromptReferenceSchema:At,CompleteRequestParamsSchema:jt,CompleteRequestSchema:Mt,CompleteResultSchema:Nt,RootSchema:Pt,ListRootsRequestSchema:Ft,ListRootsResultSchema:It,RootsListChangedNotificationSchema:Lt,TaskCreationParamsSchema:Rt,TaskStatusSchema:zt,TaskSchema:Bt,CreateTaskResultSchema:Vt,TaskStatusNotificationParamsSchema:Ht,TaskStatusNotificationSchema:Ut,GetTaskRequestSchema:Wt,GetTaskResultSchema:Gt,GetTaskPayloadRequestSchema:Kt,GetTaskPayloadResultSchema:qt,ListTasksRequestSchema:Jt,ListTasksResultSchema:Yt,CancelTaskRequestSchema:Xt,CancelTaskResultSchema:f.merge(Bt),ClientRequestSchema:W([k,E,Mt,Qe,Ae,De,pe,he,M,P,Se,Je,We,Wt,Kt,Jt,Xt]),ClientNotificationSchema:W([g,ne,O,Lt,Ut]),ClientResultSchema:W([m,ct,lt,Ot,It,Gt,Yt,Vt]),ServerRequestSchema:W([k,I,Tt,Ft,Wt,Kt,Jt,Xt]),ServerNotificationSchema:W([g,ne,F,we,ye,Ye,Be,Ut,Dt]),ServerResultSchema:W([m,ee,Nt,ze,Oe,me,ge,N,Ke,Ge,Gt,Yt,Vt]),CallToolResultWireSchema:B().superRefine((e,t)=>{if(typeof e==`object`&&e&&!Array.isArray(e)&&e.content===void 0){for(let n of sp)if(n in e){t.addIssue({code:`custom`,message:`content is required when the body carries '${n}' — another result family cannot default into an empty tools/call success`});return}}}).transform(cp).pipe(Ke)}}var up;function dp(){return up??=lp()}function fp(e){return e.type!==`object`}var pp=new Set([`const`,`enum`,`default`,`examples`]),mp=new Set([`properties`,`patternProperties`,`$defs`,`definitions`,`dependentSchemas`,`dependencies`]);function hp(e){return e!==void 0&&!(typeof e==`string`&&e.startsWith(`#`))}function gp(e){let t=typeof e.$schema==`string`?e.$schema:void 0;if(hp(e.$id))return{...t!==void 0&&{$schema:t},type:`object`,properties:{result:e},required:[`result`]};let n=T(e.$schema)&&e.$recursiveAnchor!==!0,r=(e,t)=>{if(Array.isArray(e))return e.map(e=>r(e,!1));if(typeof e!=`object`||!e||!t&&hp(e.$id))return e;let i={},a=!1;for(let[o,s]of Object.entries(e))t?i[o]=r(s,!1):(o===`$ref`||o===`$dynamicRef`)&&typeof s==`string`?i[o]=s===`#`?`#/properties/result`:s.startsWith(`#/`)?`#/properties/result${s.slice(1)}`:s:o===`$recursiveRef`&&s===`#`&&n?a=!0:i[o]=pp.has(o)?s:mp.has(o)?r(s,!0):r(s,!1);return a&&(`$ref`in i?i.allOf=[...Array.isArray(i.allOf)?i.allOf:[],{$ref:`#/properties/result`}]:i.$ref=`#/properties/result`),i};return{...t!==void 0&&{$schema:t},type:`object`,properties:{result:r(e,!1)},required:[`result`]}}var _p={ping:null,initialize:null,"completion/complete":null,"logging/setLevel":null,"prompts/get":null,"prompts/list":null,"resources/list":null,"resources/templates/list":null,"resources/read":null,"resources/subscribe":null,"resources/unsubscribe":null,"tools/call":null,"tools/list":null,"tasks/get":null,"tasks/result":null,"tasks/list":null,"tasks/cancel":null,"sampling/createMessage":null,"elicitation/create":null,"roots/list":null},vp={"notifications/cancelled":null,"notifications/progress":null,"notifications/initialized":null,"notifications/roots/list_changed":null,"notifications/tasks/status":null,"notifications/message":null,"notifications/resources/updated":null,"notifications/resources/list_changed":null,"notifications/tools/list_changed":null,"notifications/prompts/list_changed":null,"notifications/elicitation/complete":null},yp={ping:null,initialize:null,"completion/complete":null,"logging/setLevel":null,"prompts/get":null,"prompts/list":null,"resources/list":null,"resources/templates/list":null,"resources/read":null,"resources/subscribe":null,"resources/unsubscribe":null,"tools/call":null,"tools/list":null,"sampling/createMessage":null,"elicitation/create":null,"roots/list":null},bp;function xp(){if(bp)return bp;let e=dp();return bp={requestSchemas:{ping:e.PingRequestSchema,initialize:e.InitializeRequestSchema,"completion/complete":e.CompleteRequestSchema,"logging/setLevel":e.SetLevelRequestSchema,"prompts/get":e.GetPromptRequestSchema,"prompts/list":e.ListPromptsRequestSchema,"resources/list":e.ListResourcesRequestSchema,"resources/templates/list":e.ListResourceTemplatesRequestSchema,"resources/read":e.ReadResourceRequestSchema,"resources/subscribe":e.SubscribeRequestSchema,"resources/unsubscribe":e.UnsubscribeRequestSchema,"tools/call":e.CallToolRequestSchema,"tools/list":e.ListToolsRequestSchema,"tasks/get":e.GetTaskRequestSchema,"tasks/result":e.GetTaskPayloadRequestSchema,"tasks/list":e.ListTasksRequestSchema,"tasks/cancel":e.CancelTaskRequestSchema,"sampling/createMessage":e.CreateMessageRequestSchema,"elicitation/create":e.ElicitRequestSchema,"roots/list":e.ListRootsRequestSchema},notificationSchemas:{"notifications/cancelled":e.CancelledNotificationSchema,"notifications/progress":e.ProgressNotificationSchema,"notifications/initialized":e.InitializedNotificationSchema,"notifications/roots/list_changed":e.RootsListChangedNotificationSchema,"notifications/tasks/status":e.TaskStatusNotificationSchema,"notifications/message":e.LoggingMessageNotificationSchema,"notifications/resources/updated":e.ResourceUpdatedNotificationSchema,"notifications/resources/list_changed":e.ResourceListChangedNotificationSchema,"notifications/tools/list_changed":e.ToolListChangedNotificationSchema,"notifications/prompts/list_changed":e.PromptListChangedNotificationSchema,"notifications/elicitation/complete":e.ElicitationCompleteNotificationSchema},resultSchemas:{ping:e.EmptyResultSchema,initialize:e.InitializeResultSchema,"completion/complete":e.CompleteResultSchema,"logging/setLevel":e.EmptyResultSchema,"prompts/get":e.GetPromptResultSchema,"prompts/list":e.ListPromptsResultSchema,"resources/list":e.ListResourcesResultSchema,"resources/templates/list":e.ListResourceTemplatesResultSchema,"resources/read":e.ReadResourceResultSchema,"resources/subscribe":e.EmptyResultSchema,"resources/unsubscribe":e.EmptyResultSchema,"tools/call":e.CallToolResultWireSchema,"tools/list":e.ListToolsResultSchema,"sampling/createMessage":e.CreateMessageResultWithToolsSchema,"elicitation/create":e.ElicitResultSchema,"roots/list":e.ListRootsResultSchema}},bp}function Sp(e){return Object.prototype.hasOwnProperty.call(_p,e)}function Cp(e){return Object.prototype.hasOwnProperty.call(vp,e)}function wp(e){return Object.prototype.hasOwnProperty.call(yp,e)}function Tp(e){return wp(e)?xp().resultSchemas[e]:void 0}function Ep(e){return Sp(e)?xp().requestSchemas[e]:void 0}function Dp(e){return Cp(e)?xp().notificationSchemas[e]:void 0}Object.keys(_p),Object.keys(vp);function Op(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function kp(e,t){if(e===void 0)return{ok:!1,reason:`not-in-era`};let n=e.safeParse(t);return n.success?{ok:!0,value:n.data}:{ok:!1,reason:`invalid`,message:String(n.error)}}var Ap={ok:!1,reason:`not-in-era`};function jp(e){return Op(e)&&Op(e.outputSchema)&&fp(e.outputSchema)}function Mp(e){return e}var Np={era:`2025-11-25`,hasRequestMethod:Sp,hasNotificationMethod:Cp,validateRequest:(e,t)=>kp(Ep(e),t),validateResult:(e,t)=>kp(Tp(e),t),validateNotification:(e,t)=>kp(Dp(e),t),hasInputRequestMethod:()=>!1,validateInputRequest:()=>Ap,validateInputResponse:()=>Ap,samplingResultVariant:((e,t)=>{let n=dp();return kp(e?n.CreateMessageResultWithToolsSchema:n.CreateMessageResultSchema,t)}),outboundEnvelope:e=>void 0,validateEnvelopeMeta:e=>[],projectCallToolResult(e,t){let n=op(e),r=n.structuredContent;if(r===void 0)return n;let i=typeof r!=`object`||!r||Array.isArray(r),a=t!==void 0&&fp(t);return!i&&!a?n:{...n,structuredContent:{result:r}}},decodeResult(e,t){if(Op(t)&&`resultType`in t){let e={...t};return delete e.resultType,{kind:`complete`,result:Mp(e)}}return{kind:`complete`,result:Mp(t)}},encodeResult(e,t){if(e!==`tools/list`)return t;let n=t.tools;return!Array.isArray(n)||!n.some(e=>jp(e))?t:{...t,tools:n.map(e=>jp(e)?{...e,outputSchema:gp(e.outputSchema)}:e)}},encodeErrorCode:e=>e===-32002?-32602:e,checkInboundEnvelope:e=>void 0};function Pp(){let e=ml(()=>W([L(),R(),z(),kc(),G(L(),e),V(e)])),t=G(L(),e),n=W([L(),R().int()]),r=L(),i=W([L(),R().int()]),a=K([`user`,`assistant`]),o=K([`debug`,`info`,`notice`,`warning`,`error`,`critical`,`alert`,`emergency`]),s=L().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:`Invalid Base64 string`}),c=H({ttl:R().optional()}),l=H({taskId:L()}),u=U({progressToken:n.optional(),"io.modelcontextprotocol/related-task":l.optional()}),d=H({_meta:u.optional()}),f=d.extend({task:c.optional()}),p=H({_meta:u.optional()}),m=H({method:L(),params:p.loose().optional()}),h=H({src:L(),mimeType:L().optional(),sizes:V(L()).optional(),theme:K([`light`,`dark`]).optional()}),g=H({icons:V(h).optional()}),_=H({name:L(),title:L().optional()}),v=_.extend({..._.shape,...g.shape,version:L(),websiteUrl:L().optional(),description:L().optional()}),y=vl(e=>e&&typeof e==`object`&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,Vc(H({form:Vc(H({applyDefaults:z().optional()}),t).optional(),url:t.optional()}),t.optional())),b=U({list:t.optional(),cancel:t.optional(),requests:U({sampling:U({createMessage:t.optional()}).optional(),elicitation:U({create:t.optional()}).optional()}).optional()}),x=U({list:t.optional(),cancel:t.optional(),requests:U({tools:U({call:t.optional()}).optional()}).optional()}),S=H({experimental:G(L(),t).optional(),sampling:H({context:t.optional(),tools:t.optional()}).optional(),elicitation:y.optional(),roots:H({listChanged:z().optional()}).optional(),tasks:b.optional(),extensions:G(L(),t).optional()}),C=H({experimental:G(L(),t).optional(),logging:t.optional(),completions:t.optional(),prompts:H({listChanged:z().optional()}).optional(),resources:H({subscribe:z().optional(),listChanged:z().optional()}).optional(),tools:H({listChanged:z().optional()}).optional(),tasks:x.optional(),extensions:G(L(),t).optional()}),w=H({progress:R(),total:J(R()),message:J(L())}),T=H({...p.shape,...w.shape,progressToken:n}),E=m.extend({method:q(`notifications/progress`),params:T}),D=p.extend({level:o,logger:L().optional(),data:B()}),ee=m.extend({method:q(`notifications/message`),params:D}),O=H({uri:L(),mimeType:J(L()),_meta:G(L(),B()).optional()}),k=O.extend({text:L()}),A=O.extend({blob:s}),te=H({audience:V(a).optional(),priority:R().min(0).max(1).optional(),lastModified:xl({offset:!0}).optional()}),ne=H({..._.shape,...g.shape,uri:L(),description:J(L()),mimeType:J(L()),size:J(R()),annotations:te.optional(),_meta:J(U({}))}),re=H({..._.shape,...g.shape,uriTemplate:L(),description:J(L()),mimeType:J(L()),annotations:te.optional(),_meta:J(U({}))}),ie=m.extend({method:q(`notifications/resources/list_changed`),params:p.optional()}),ae=p.extend({uri:L()}),oe=m.extend({method:q(`notifications/resources/updated`),params:ae}),se=H({name:L(),description:J(L()),required:J(z())}),ce=H({..._.shape,...g.shape,description:J(L()),arguments:J(V(se)),_meta:J(U({}))}),j=m.extend({method:q(`notifications/prompts/list_changed`),params:p.optional()}),le=H({type:q(`text`),text:L(),annotations:te.optional(),_meta:G(L(),B()).optional()}),ue=H({type:q(`image`),data:s,mimeType:L(),annotations:te.optional(),_meta:G(L(),B()).optional()}),de=H({type:q(`audio`),data:s,mimeType:L(),annotations:te.optional(),_meta:G(L(),B()).optional()}),fe=H({type:q(`tool_use`),name:L(),id:L(),input:G(L(),B()),_meta:G(L(),B()).optional()}),pe=H({type:q(`resource`),resource:W([k,A]),annotations:te.optional(),_meta:G(L(),B()).optional()}),me=ne.extend({type:q(`resource_link`)}),he=W([le,ue,de,me,pe]),ge=H({role:a,content:he}),_e=H({title:L().optional(),readOnlyHint:z().optional(),destructiveHint:z().optional(),idempotentHint:z().optional(),openWorldHint:z().optional()}),ve=m.extend({method:q(`notifications/tools/list_changed`),params:p.optional()}),M=H({name:L().optional()}),N=H({hints:V(M).optional(),costPriority:R().min(0).max(1).optional(),speedPriority:R().min(0).max(1).optional(),intelligencePriority:R().min(0).max(1).optional()}),ye=H({mode:K([`auto`,`required`,`none`]).optional()}),be=H({type:q(`boolean`),title:L().optional(),description:L().optional(),default:z().optional()}),P=H({type:q(`string`),title:L().optional(),description:L().optional(),minLength:R().optional(),maxLength:R().optional(),format:K([`email`,`uri`,`date`,`date-time`]).optional(),default:L().optional()}),xe=H({type:K([`number`,`integer`]),title:L().optional(),description:L().optional(),minimum:R().optional(),maximum:R().optional(),default:R().optional()}),Se=H({type:q(`string`),title:L().optional(),description:L().optional(),enum:V(L()),default:L().optional()}),Ce=H({type:q(`string`),title:L().optional(),description:L().optional(),oneOf:V(H({const:L(),title:L()})),default:L().optional()}),we=H({type:q(`string`),title:L().optional(),description:L().optional(),enum:V(L()),enumNames:V(L()).optional(),default:L().optional()}),Te=W([Se,Ce]),Ee=H({type:q(`array`),title:L().optional(),description:L().optional(),minItems:R().optional(),maxItems:R().optional(),items:H({type:q(`string`),enum:V(L())}),default:V(L()).optional()}),De=H({type:q(`array`),title:L().optional(),description:L().optional(),minItems:R().optional(),maxItems:R().optional(),items:H({anyOf:V(H({const:L(),title:L()}))}),default:V(L()).optional()}),Oe=W([Ee,De]),ke=W([we,Te,Oe]),Ae=W([ke,be,P,xe]),je=f.extend({mode:q(`form`).optional(),message:L(),requestedSchema:H({type:q(`object`),properties:G(L(),Ae),required:V(L()).optional()}).catchall(B())}),Me=H({type:q(`ref/resource`),uri:L()}),Ne=H({type:q(`ref/prompt`),name:L()}),Pe=H({uri:L().startsWith(`file://`),name:L().optional(),_meta:G(L(),B()).optional()}),Fe=S.shape,Ie=H({experimental:Fe.experimental,sampling:Fe.sampling,elicitation:Fe.elicitation,roots:Fe.roots,extensions:Fe.extensions}),Le=C.shape,Re=H({experimental:Le.experimental,logging:Le.logging,completions:Le.completions,prompts:Le.prompts,resources:Le.resources,tools:Le.tools,extensions:Le.extensions}),ze=U({progressToken:n.optional(),[El]:L(),[Dl]:v.optional(),[kl]:Ie,[jl]:o.optional()}),Be=H({..._.shape,...g.shape,description:L().optional(),inputSchema:U({$schema:L().optional(),type:q(`object`)}),outputSchema:U({$schema:L().optional()}).optional(),annotations:_e.optional(),_meta:G(L(),B()).optional()}),Ve=H({type:q(`tool_result`),toolUseId:L(),content:V(he),structuredContent:B().optional(),isError:z().optional(),_meta:G(L(),B()).optional()}),He=W([le,ue,de,fe,Ve]),Ue=H({role:a,content:W([He,V(He)]),_meta:G(L(),B()).optional()}),We=L(),Ge=U({[Ol]:v.optional().catch(void 0)}),Ke=Ge.optional();function qe(e){return U({_meta:Ke,resultType:We.default(`complete`),...e})}let Je=qe({}),Ye=qe({nextCursor:r.optional()}),Xe=qe({content:V(he),structuredContent:B().optional(),isError:z().optional()}),Ze=qe({ttlMs:R().int().min(0),cacheScope:K([`public`,`private`]),tools:V(Be),nextCursor:r.optional()}),Qe=qe({ttlMs:R().int().min(0),cacheScope:K([`public`,`private`]),prompts:V(ce),nextCursor:r.optional()}),$e=qe({description:L().optional(),messages:V(ge)}),F=qe({ttlMs:R().int().min(0),cacheScope:K([`public`,`private`]),resources:V(ne),nextCursor:r.optional()}),et=qe({ttlMs:R().int().min(0),cacheScope:K([`public`,`private`]),resourceTemplates:V(re),nextCursor:r.optional()}),tt=qe({ttlMs:R().int().min(0),cacheScope:K([`public`,`private`]),contents:V(W([k,A]))}),nt=qe({completion:H({values:V(L()).max(100),total:R().int().optional(),hasMore:z().optional()}).loose()}),rt=qe({ttlMs:R().int().min(0),cacheScope:K([`public`,`private`])}),it=qe({ttlMs:R().int().min(0).catch(0),cacheScope:K([`public`,`private`]).catch(`private`),supportedVersions:V(L()),capabilities:Re,instructions:L().optional()}),at=H({messages:V(Ue),modelPreferences:N.optional(),systemPrompt:L().optional(),includeContext:K([`none`,`thisServer`,`allServers`]).optional(),temperature:R().optional(),maxTokens:R().int(),stopSequences:V(L()).optional(),metadata:t.optional(),tools:V(Be).optional(),toolChoice:ye.optional()}),ot=H({method:q(`sampling/createMessage`),params:at}),st=H({method:q(`roots/list`),params:H({_meta:G(L(),B()).optional()}).optional()}),I=H({...Ue.shape,model:L(),stopReason:L().optional()}),ct=H({roots:V(Pe)}),lt=H({action:K([`accept`,`decline`,`cancel`]),content:G(L(),W([L(),R(),z(),V(L())])).optional()}),ut=H({mode:q(`url`),message:L(),url:L().url()}),dt=W([je,ut]),ft=H({method:q(`elicitation/create`),params:dt}),pt=W([ot,st,ft]),mt=W([I,ct,lt]),ht=G(L(),pt),gt=G(L(),mt),_t=qe({inputRequests:ht.optional(),requestState:L().optional()}),vt={inputResponses:gt.optional(),requestState:L().optional()},yt=H({_meta:ze,...vt}),bt=U({progressToken:n.optional()});function xt(e,t){return H({method:q(e),params:H({_meta:ze,...t})})}function St(e,t){return H({method:q(e),params:H({_meta:bt.optional(),...t}).optional()})}let Ct={name:L(),arguments:G(L(),B()).optional(),...vt},wt={cursor:r.optional()},Tt=xt(`tools/call`,Ct),Et=xt(`tools/list`,wt),Dt=xt(`prompts/list`,wt),Ot=xt(`prompts/get`,{name:L(),arguments:G(L(),L()).optional(),...vt}),kt=xt(`resources/list`,wt),At=xt(`resources/templates/list`,wt),jt=xt(`resources/read`,{uri:L(),...vt}),Mt={ref:W([Ne,Me]),argument:H({name:L(),value:L()}),context:H({arguments:G(L(),L()).optional()}).optional()},Nt=xt(`completion/complete`,Mt),Pt=xt(`server/discover`,{}),Ft=H({toolsListChanged:z().optional(),promptsListChanged:z().optional(),resourcesListChanged:z().optional(),resourceSubscriptions:V(L()).optional()}),It={notifications:Ft},Lt=xt(`subscriptions/listen`,It),Rt=Ge.extend({"io.modelcontextprotocol/subscriptionId":i}),zt=U({_meta:Rt,resultType:We.default(`complete`)}),Bt={"tools/call":St(`tools/call`,Ct),"tools/list":St(`tools/list`,wt),"prompts/get":St(`prompts/get`,{name:L(),arguments:G(L(),L()).optional()}),"prompts/list":St(`prompts/list`,wt),"resources/list":St(`resources/list`,wt),"resources/templates/list":St(`resources/templates/list`,wt),"resources/read":St(`resources/read`,{uri:L()}),"completion/complete":St(`completion/complete`,Mt),"server/discover":St(`server/discover`,{}),"subscriptions/listen":St(`subscriptions/listen`,It)};function Vt(e){return U({_meta:Ke,...e})}let Ht={"tools/call":Vt({content:V(he),structuredContent:B().optional(),isError:z().optional()}),"tools/list":Vt({ttlMs:R().int().min(0),cacheScope:K([`public`,`private`]),tools:V(Be),nextCursor:r.optional()}),"prompts/get":Vt({description:L().optional(),messages:V(ge)}),"prompts/list":Vt({ttlMs:R().int().min(0),cacheScope:K([`public`,`private`]),prompts:V(ce),nextCursor:r.optional()}),"resources/list":Vt({ttlMs:R().int().min(0),cacheScope:K([`public`,`private`]),resources:V(ne),nextCursor:r.optional()}),"resources/templates/list":Vt({ttlMs:R().int().min(0),cacheScope:K([`public`,`private`]),resourceTemplates:V(re),nextCursor:r.optional()}),"resources/read":Vt({ttlMs:R().int().min(0),cacheScope:K([`public`,`private`]),contents:V(W([k,A]))}),"completion/complete":Vt({completion:H({values:V(L()).max(100),total:R().int().optional(),hasMore:z().optional()}).loose()}),"server/discover":Vt({ttlMs:R().int().min(0).catch(0),cacheScope:K([`public`,`private`]).catch(`private`),supportedVersions:V(L()),capabilities:Re,instructions:L().optional()}),"subscriptions/listen":Vt({})},Ut=U({"io.modelcontextprotocol/subscriptionId":i.optional()}),Wt=H({method:q(`notifications/subscriptions/acknowledged`),params:H({_meta:Ut.optional(),notifications:Ft})}),Gt=H({_meta:Ut.optional(),requestId:i,reason:L().optional()}),Kt=H({method:q(`notifications/cancelled`),params:Gt}),qt={"notifications/cancelled":Kt,"notifications/progress":E,"notifications/message":ee,"notifications/resources/updated":oe,"notifications/resources/list_changed":ie,"notifications/tools/list_changed":ve,"notifications/prompts/list_changed":j,"notifications/subscriptions/acknowledged":Wt},Jt=e=>H({jsonrpc:q(`2.0`),id:W([L(),R().int()]),result:e}).strict();return{JSONValueSchema:e,JSONObjectSchema:t,ProgressTokenSchema:n,CursorSchema:r,RequestIdSchema:i,RoleSchema:a,LoggingLevelSchema:o,TaskMetadataSchema:c,RelatedTaskMetadataSchema:l,RequestMetaSchema:u,BaseRequestParamsSchema:d,TaskAugmentedRequestParamsSchema:f,NotificationsParamsSchema:p,NotificationSchema:m,IconSchema:h,IconsSchema:g,BaseMetadataSchema:_,ImplementationSchema:v,ClientTasksCapabilitySchema:b,ServerTasksCapabilitySchema:x,ClientCapabilitiesSchema:S,ServerCapabilitiesSchema:C,ProgressSchema:w,ProgressNotificationParamsSchema:T,ProgressNotificationSchema:E,LoggingMessageNotificationParamsSchema:D,LoggingMessageNotificationSchema:ee,ResourceContentsSchema:O,TextResourceContentsSchema:k,BlobResourceContentsSchema:A,AnnotationsSchema:te,ResourceSchema:ne,ResourceTemplateSchema:re,ResourceListChangedNotificationSchema:ie,ResourceUpdatedNotificationParamsSchema:ae,ResourceUpdatedNotificationSchema:oe,PromptArgumentSchema:se,PromptSchema:ce,PromptListChangedNotificationSchema:j,TextContentSchema:le,ImageContentSchema:ue,AudioContentSchema:de,ToolUseContentSchema:fe,EmbeddedResourceSchema:pe,ResourceLinkSchema:me,ContentBlockSchema:he,PromptMessageSchema:ge,ToolAnnotationsSchema:_e,ToolListChangedNotificationSchema:ve,ModelHintSchema:M,ModelPreferencesSchema:N,ToolChoiceSchema:ye,BooleanSchemaSchema:be,StringSchemaSchema:P,NumberSchemaSchema:xe,UntitledSingleSelectEnumSchemaSchema:Se,TitledSingleSelectEnumSchemaSchema:Ce,LegacyTitledEnumSchemaSchema:we,SingleSelectEnumSchemaSchema:Te,UntitledMultiSelectEnumSchemaSchema:Ee,TitledMultiSelectEnumSchemaSchema:De,MultiSelectEnumSchemaSchema:Oe,EnumSchemaSchema:ke,PrimitiveSchemaDefinitionSchema:Ae,ElicitRequestFormParamsSchema:je,ResourceTemplateReferenceSchema:Me,PromptReferenceSchema:Ne,RootSchema:Pe,ClientCapabilities2026Schema:Ie,ServerCapabilities2026Schema:Re,RequestMetaEnvelopeSchema:ze,ToolSchema:Be,ToolResultContentSchema:Ve,SamplingMessageContentBlockSchema:He,SamplingMessageSchema:Ue,ResultTypeSchema:We,ResultMetaSchema:Ge,ResultSchema:Je,PaginatedResultSchema:Ye,CallToolResultSchema:Xe,ListToolsResultSchema:Ze,ListPromptsResultSchema:Qe,GetPromptResultSchema:$e,ListResourcesResultSchema:F,ListResourceTemplatesResultSchema:et,ReadResourceResultSchema:tt,CompleteResultSchema:nt,CacheableResultSchema:rt,DiscoverResultSchema:it,CreateMessageRequestParamsSchema:at,CreateMessageRequestSchema:ot,ListRootsRequestSchema:st,CreateMessageResultSchema:I,ListRootsResultSchema:ct,ElicitResultSchema:lt,ElicitRequestURLParamsSchema:ut,ElicitRequestParamsSchema:dt,ElicitRequestSchema:ft,InputRequestSchema:pt,InputResponseSchema:mt,InputRequestsSchema:ht,InputResponsesSchema:gt,InputRequiredResultSchema:_t,InputResponseRequestParamsSchema:yt,CallToolRequestSchema:Tt,ListToolsRequestSchema:Et,ListPromptsRequestSchema:Dt,GetPromptRequestSchema:Ot,ListResourcesRequestSchema:kt,ListResourceTemplatesRequestSchema:At,ReadResourceRequestSchema:jt,CompleteRequestSchema:Nt,DiscoverRequestSchema:Pt,SubscriptionFilterSchema:Ft,SubscriptionsListenRequestSchema:Lt,SubscriptionsListenResultMetaSchema:Rt,SubscriptionsListenResultSchema:zt,dispatchRequestSchemas:Bt,dispatchResultSchemas:Ht,NotificationMetaSchema:Ut,SubscriptionsAcknowledgedNotificationSchema:Wt,CancelledNotificationParamsSchema:Gt,CancelledNotificationSchema:Kt,notificationSchemas2026:qt,JSONRPCResultResponseSchema:Jt(Je),CallToolResultResponseSchema:Jt(W([Xe,_t])),ListToolsResultResponseSchema:Jt(Ze),ListPromptsResultResponseSchema:Jt(Qe),GetPromptResultResponseSchema:Jt(W([$e,_t])),ListResourcesResultResponseSchema:Jt(F),ListResourceTemplatesResultResponseSchema:Jt(et),ReadResourceResultResponseSchema:Jt(W([tt,_t])),CompleteResultResponseSchema:Jt(nt),DiscoverResultResponseSchema:Jt(it)}}var Fp;function Ip(){return Fp??=Pp()}var Lp=[`tools/list`,`prompts/list`,`resources/list`,`resources/templates/list`,`resources/read`,`server/discover`];function Rp(e){return Lp.includes(e)}var zp=Symbol(`modelcontextprotocol.resultCacheHintFallback`);function Bp(e){return e[zp]}function Vp(e){return typeof e==`number`&&Number.isSafeInteger(e)&&e>=0}function Hp(e){return e===`public`||e===`private`}var Up=function(e){return e[e.ParseError=-32700]=`ParseError`,e[e.InvalidRequest=-32600]=`InvalidRequest`,e[e.MethodNotFound=-32601]=`MethodNotFound`,e[e.InvalidParams=-32602]=`InvalidParams`,e[e.InternalError=-32603]=`InternalError`,e[e.ResourceNotFound=-32002]=`ResourceNotFound`,e[e.MissingRequiredClientCapability=-32021]=`MissingRequiredClientCapability`,e[e.UnsupportedProtocolVersion=-32022]=`UnsupportedProtocolVersion`,e[e.UrlElicitationRequired=-32042]=`UrlElicitationRequired`,e}({}),Wp=class e extends Error{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.ProtocolError`})}static[Symbol.hasInstance](e){return tp(this,e)}static isInstance(e){if(typeof this!=`function`)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return tp(this,e)}constructor(e,t,n){super(t),this.code=e,this.data=n,this.name=`ProtocolError`,ep(this,new.target)}static fromError(t,n,r){if(t===Up.UrlElicitationRequired&&r){let e=r;if(e.elicitations)return new Kp(e.elicitations,n)}if(t===Up.UnsupportedProtocolVersion&&r){let e=r;if(Array.isArray(e.supported)&&typeof e.requested==`string`)return new qp({supported:e.supported,requested:e.requested},n)}if(t===Up.InvalidParams||t===Up.ResourceNotFound){let e=r;if(typeof e?.uri==`string`&&(t===Up.ResourceNotFound||Object.keys(e).length===1))return new Gp(e.uri,n)}if(t===Up.MissingRequiredClientCapability&&r){let e=r;if(e.requiredCapabilities!==null&&typeof e.requiredCapabilities==`object`&&!Array.isArray(e.requiredCapabilities))return new Jp({requiredCapabilities:e.requiredCapabilities},n)}return new e(t,n,r)}},Gp=class extends Wp{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.ResourceNotFoundError`})}constructor(e,t=`Resource not found: ${e}`){super(Up.InvalidParams,t,{uri:e})}get uri(){return this.data.uri}},Kp=class extends Wp{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.UrlElicitationRequiredError`})}constructor(e,t=`URL elicitation${e.length>1?`s`:``} required`){super(Up.UrlElicitationRequired,t,{elicitations:e})}get elicitations(){return this.data?.elicitations??[]}},qp=class extends Wp{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.UnsupportedProtocolVersionError`})}constructor(e,t=`Unsupported protocol version: ${e.requested}`){super(Up.UnsupportedProtocolVersion,t,e)}get supported(){return this.data.supported}get requested(){return this.data.requested}},Jp=class extends Wp{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.MissingRequiredClientCapabilityError`})}constructor(e,t=`Missing required client capabilities: ${Object.keys(e.requiredCapabilities).join(`, `)}`){super(Up.MissingRequiredClientCapability,t,e)}get requiredCapabilities(){return this.data.requiredCapabilities}},Yp=0,Xp=`private`,Zp=[`tools/call`,`prompts/get`,`resources/read`];function Qp(e,t){let n=t.resultType;if(n===void 0)return{...t,resultType:`complete`};if(n===`complete`||Zp.includes(e))return t;throw new Wp(Up.InternalError,`Handler for ${e} returned resultType '${String(n)}', but results of ${e} only support 'complete' on protocol revision 2026-07-28`)}function $p(e,t){let n=Bp(t);if(t.resultType!==`complete`||!Rp(e))return n===void 0?t:im(t);let r=t,i=Vp(r.ttlMs)?r.ttlMs:nm(n),a=Hp(r.cacheScope)?r.cacheScope:rm(n),o={...r,ttlMs:i,cacheScope:a};return delete o[zp],o}function em(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function tm(e,t){if(t===void 0)return e;let n=e._meta;return n===void 0?{...e,_meta:{[Ol]:t}}:!em(n)||n[`io.modelcontextprotocol/serverInfo`]!==void 0?e:{...e,_meta:{...n,[Ol]:t}}}function nm(e){return e!==void 0&&Vp(e.ttlMs)?e.ttlMs:Yp}function rm(e){return e!==void 0&&Hp(e.cacheScope)?e.cacheScope:Xp}function im(e){let t={...e};return delete t[zp],t}var am=[`elicitation/create`,`sampling/createMessage`,`roots/list`],om;function sm(){if(om)return om;let e=Ip();return om={request:{"elicitation/create":H({method:q(`elicitation/create`),params:e.ElicitRequestParamsSchema}),"sampling/createMessage":H({method:q(`sampling/createMessage`),params:e.CreateMessageRequestParamsSchema}),"roots/list":H({method:q(`roots/list`),params:U({}).optional()})},response:{"elicitation/create":e.ElicitResultSchema,"sampling/createMessage":e.CreateMessageResultSchema,"roots/list":e.ListRootsResultSchema}},om}function cm(e){return am.includes(e)}function lm(e){return cm(e)?sm().request[e]:void 0}function um(e){return cm(e)?sm().response[e]:void 0}var dm={"tools/call":null,"tools/list":null,"prompts/get":null,"prompts/list":null,"resources/list":null,"resources/templates/list":null,"resources/read":null,"completion/complete":null,"server/discover":null,"subscriptions/listen":null},fm={"notifications/cancelled":null,"notifications/progress":null,"notifications/message":null,"notifications/resources/updated":null,"notifications/resources/list_changed":null,"notifications/tools/list_changed":null,"notifications/prompts/list_changed":null,"notifications/subscriptions/acknowledged":null};function pm(e){return Object.prototype.hasOwnProperty.call(dm,e)}function mm(e){return Object.prototype.hasOwnProperty.call(fm,e)}function hm(e){return Object.prototype.hasOwnProperty.call(dm,e)}function gm(e){return pm(e)?Ip().dispatchRequestSchemas[e]:void 0}function _m(e){return hm(e)?Ip().dispatchResultSchemas[e]:void 0}function vm(e){return mm(e)?Ip().notificationSchemas2026[e]:void 0}Object.keys(dm),Object.keys(fm);function ym(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function bm(e,t){if(e===void 0)return{ok:!1,reason:`not-in-era`};let n=e.safeParse(t);return n.success?{ok:!0,value:n.data}:{ok:!1,reason:`invalid`,message:String(n.error)}}var xm={ok:!1,reason:`not-in-era`},Sm=[El,kl];function Cm(e,t){let n=t,r=!1,i=()=>(r||=(n={...n},!0),n),a=t.tools;e===`tools/list`&&Array.isArray(a)&&a.some(e=>ym(e)&&`execution`in e)&&(i().tools=a.map(e=>{if(!ym(e)||!(`execution`in e))return e;let t={...e};return delete t.execution,t}));let o=t.capabilities;if(ym(o)&&`tasks`in o){let e={...o};delete e.tasks,i().capabilities=e}return n}var wm={era:`2026-07-28`,hasRequestMethod:pm,hasNotificationMethod:mm,hasInputRequestMethod:e=>lm(e)!==void 0,validateRequest:(e,t)=>bm(gm(e),t),validateResult:(e,t)=>bm(_m(e),t),validateNotification:(e,t)=>bm(vm(e),t),validateInputRequest:(e,t)=>bm(lm(e),t),validateInputResponse:(e,t)=>bm(um(e),t),samplingResultVariant:()=>xm,outboundEnvelope(e){return{[El]:e.protocolVersion,[Dl]:e.clientInfo,[kl]:e.clientCapabilities,...e.logLevel!==void 0&&{"io.modelcontextprotocol/logLevel":e.logLevel}}},validateEnvelopeMeta(e){let t=[];for(let n of Sm)n in e||t.push({key:n,problem:`missing`});let n=Ip().RequestMetaEnvelopeSchema.safeParse(e);if(!n.success)for(let e of n.error.issues){let n=e.path.map(String),r=n.length>0?n.join(`.`):`_meta`;n.length===1&&t.some(e=>e.key===r&&e.problem===`missing`)||t.push({key:r,problem:e.message})}return t},projectCallToolResult:e=>op(e),inputRequestSchema:lm,decodeResult(e,t){if(!ym(t))return{kind:`invalid`,error:new rp(np.InvalidResult,`Invalid result for ${e}: not an object`,{method:e})};let n=t.resultType;if(n===void 0)return{kind:`invalid`,error:new rp(np.InvalidResult,`Invalid result for ${e}: missing required resultType — servers implementing protocol revision 2026-07-28 MUST include it (the absent-means-complete bridge applies only to earlier-revision servers)`,{method:e,violation:`missing-resultType`})};if(typeof n!=`string`)return{kind:`invalid`,error:new rp(np.InvalidResult,`Invalid result for ${e}: non-string resultType`,{method:e,resultType:n})};if(n===`input_required`){let n=t.inputRequests,r=ym(n)?n:{},i=t.requestState,a=t._meta===void 0?void 0:Ip().ResultMetaSchema.safeParse(t._meta),o=a?.success?a.data:void 0;return Object.keys(r).length===0&&typeof i!=`string`?{kind:`invalid`,error:new rp(np.InvalidResult,`Invalid result for ${e}: input_required carries neither inputRequests nor requestState (every input_required result must include at least one of the two)`,{method:e,violation:`input-required-missing-both`})}:{kind:`input_required`,inputRequests:r,...typeof i==`string`&&{requestState:i},...o!==void 0&&{_meta:o}}}if(n!==`complete`)return{kind:`invalid`,error:new rp(np.UnsupportedResultType,`Unsupported result type '${n}' for ${e}`,{resultType:n,method:e})};let r=Em(),i=Object.hasOwn(r,e)?r[e]:void 0;if(i!==void 0){let n=i.safeParse(t);if(!n.success)return{kind:`invalid`,error:new rp(np.InvalidResult,`Invalid result for ${e}: ${n.error}`,{method:e})}}let a={...t};return delete a.resultType,{kind:`complete`,result:a}},encodeResult(e,t,n){return tm($p(e,Qp(e,Cm(e,t))),n)},encodeErrorCode:e=>e===-32002?-32602:e,checkInboundEnvelope(e){if(e.envelope===void 0)return`Request is missing the required _meta envelope for protocol revision 2026-07-28 (io.modelcontextprotocol/protocolVersion, io.modelcontextprotocol/clientCapabilities)`;let t=Ip().RequestMetaEnvelopeSchema.safeParse(e.envelope);if(!t.success)return`Invalid _meta envelope for protocol revision 2026-07-28: ${t.error.issues.map(e=>e.message).join(`; `)}`}},Tm;function Em(){if(Tm)return Tm;let e=Ip();return Tm={"tools/call":e.CallToolResultSchema,"tools/list":e.ListToolsResultSchema,"prompts/get":e.GetPromptResultSchema,"prompts/list":e.ListPromptsResultSchema,"resources/list":e.ListResourcesResultSchema,"resources/templates/list":e.ListResourceTemplatesResultSchema,"resources/read":e.ReadResourceResultSchema,"completion/complete":e.CompleteResultSchema,"server/discover":e.DiscoverResultSchema},Tm}var Dm=`2026-07-28`;function Om(e){return e!==void 0&&ap(e)?wm:Np}function km(e){return e.revision===void 0?e.era===`modern`?wm.era:Np.era:Om(e.revision).era}function Am(e){return Mm.some(t=>t.hasRequestMethod(e))}function jm(e){return Mm.some(t=>t.hasNotificationMethod(e))}var Mm=[Np,wm],Nm=C({AnnotationsSchema:()=>Au,AudioContentSchema:()=>ld,BaseMetadataSchema:()=>au,BaseRequestParamsSchema:()=>Bl,BlobResourceContentsSchema:()=>Ou,BooleanSchemaSchema:()=>Wd,CallToolRequestParamsSchema:()=>wd,CallToolRequestSchema:()=>Td,CallToolResultSchema:()=>Sd,CancelTaskRequestSchema:()=>jf,CancelTaskResultSchema:()=>Mf,CancelledNotificationParamsSchema:()=>tu,CancelledNotificationSchema:()=>nu,ClientCapabilitiesSchema:()=>uu,ClientNotificationSchema:()=>Pf,ClientRequestSchema:()=>Nf,ClientResultSchema:()=>Ff,ClientTasksCapabilitySchema:()=>cu,CompatibilityCallToolResultSchema:()=>Cd,CompleteRequestParamsSchema:()=>ff,CompleteRequestSchema:()=>pf,CompleteResultSchema:()=>mf,ContentBlockSchema:()=>pd,CreateMessageRequestParamsSchema:()=>Bd,CreateMessageRequestSchema:()=>Vd,CreateMessageResultSchema:()=>Hd,CreateMessageResultWithToolsSchema:()=>Ud,CreateTaskResultSchema:()=>Sf,CursorSchema:()=>Il,DiscoverRequestSchema:()=>gu,DiscoverResultSchema:()=>_u,ElicitRequestFormParamsSchema:()=>nf,ElicitRequestParamsSchema:()=>af,ElicitRequestSchema:()=>of,ElicitRequestURLParamsSchema:()=>rf,ElicitResultSchema:()=>lf,ElicitationCompleteNotificationParamsSchema:()=>sf,ElicitationCompleteNotificationSchema:()=>cf,EmbeddedResourceSchema:()=>dd,EmptyResultSchema:()=>eu,EnumSchemaSchema:()=>ef,GetPromptRequestParamsSchema:()=>ad,GetPromptRequestSchema:()=>od,GetPromptResultSchema:()=>hd,GetTaskPayloadRequestSchema:()=>Df,GetTaskPayloadResultSchema:()=>Of,GetTaskRequestSchema:()=>Tf,GetTaskResultSchema:()=>Ef,IconSchema:()=>ru,IconsSchema:()=>iu,ImageContentSchema:()=>cd,ImplementationSchema:()=>ou,InitializeRequestParamsSchema:()=>du,InitializeRequestSchema:()=>fu,InitializeResultSchema:()=>mu,InitializedNotificationSchema:()=>hu,JSONArraySchema:()=>Pl,JSONObjectSchema:()=>Nl,JSONRPCErrorResponseSchema:()=>Zl,JSONRPCMessageSchema:()=>Ql,JSONRPCNotificationSchema:()=>Yl,JSONRPCRequestSchema:()=>Jl,JSONRPCResponseSchema:()=>$l,JSONRPCResultResponseSchema:()=>Xl,JSONValueSchema:()=>Ml,LegacyTitledEnumSchemaSchema:()=>Yd,ListChangedOptionsBaseSchema:()=>Dd,ListPromptsRequestSchema:()=>rd,ListPromptsResultSchema:()=>id,ListResourceTemplatesRequestSchema:()=>Fu,ListResourceTemplatesResultSchema:()=>Iu,ListResourcesRequestSchema:()=>Nu,ListResourcesResultSchema:()=>Pu,ListRootsRequestSchema:()=>gf,ListRootsResultSchema:()=>_f,ListTasksRequestSchema:()=>kf,ListTasksResultSchema:()=>Af,ListToolsRequestSchema:()=>bd,ListToolsResultSchema:()=>xd,LoggingLevelSchema:()=>Od,LoggingMessageNotificationParamsSchema:()=>jd,LoggingMessageNotificationSchema:()=>Md,ModelHintSchema:()=>Nd,ModelPreferencesSchema:()=>Pd,MultiSelectEnumSchemaSchema:()=>$d,NotificationSchema:()=>Wl,NotificationsParamsSchema:()=>Ul,NumberSchemaSchema:()=>Kd,PaginatedRequestParamsSchema:()=>Su,PaginatedRequestSchema:()=>Cu,PaginatedResultSchema:()=>wu,PingRequestSchema:()=>vu,PrimitiveSchemaDefinitionSchema:()=>tf,ProgressNotificationParamsSchema:()=>bu,ProgressNotificationSchema:()=>xu,ProgressSchema:()=>yu,ProgressTokenSchema:()=>Fl,PromptArgumentSchema:()=>td,PromptListChangedNotificationSchema:()=>gd,PromptMessageSchema:()=>md,PromptReferenceSchema:()=>df,PromptSchema:()=>nd,ReadResourceRequestParamsSchema:()=>Ru,ReadResourceRequestSchema:()=>zu,ReadResourceResultSchema:()=>Bu,RelatedTaskMetadataSchema:()=>Rl,RequestIdSchema:()=>ql,RequestMetaSchema:()=>zl,RequestSchema:()=>Hl,ResourceContentsSchema:()=>Tu,ResourceLinkSchema:()=>fd,ResourceListChangedNotificationSchema:()=>Vu,ResourceRequestParamsSchema:()=>Lu,ResourceSchema:()=>ju,ResourceTemplateReferenceSchema:()=>uf,ResourceTemplateSchema:()=>Mu,ResourceUpdatedNotificationParamsSchema:()=>$u,ResourceUpdatedNotificationSchema:()=>ed,ResultMetaObjectSchema:()=>Gl,ResultSchema:()=>Kl,RoleSchema:()=>ku,RootSchema:()=>hf,RootsListChangedNotificationSchema:()=>vf,SamplingContentSchema:()=>Ld,SamplingMessageContentBlockSchema:()=>Rd,SamplingMessageSchema:()=>zd,ServerCapabilitiesSchema:()=>pu,ServerNotificationSchema:()=>Lf,ServerRequestSchema:()=>If,ServerResultSchema:()=>Rf,ServerTasksCapabilitySchema:()=>lu,SetLevelRequestParamsSchema:()=>kd,SetLevelRequestSchema:()=>Ad,SingleSelectEnumSchemaSchema:()=>Xd,StringSchemaSchema:()=>Gd,SubscribeRequestParamsSchema:()=>Hu,SubscribeRequestSchema:()=>Uu,SubscriptionFilterSchema:()=>Ku,SubscriptionsAcknowledgedNotificationParamsSchema:()=>Yu,SubscriptionsAcknowledgedNotificationSchema:()=>Xu,SubscriptionsListenRequestParamsSchema:()=>qu,SubscriptionsListenRequestSchema:()=>Ju,SubscriptionsListenResultMetaSchema:()=>Zu,SubscriptionsListenResultSchema:()=>Qu,TaskAugmentedRequestParamsSchema:()=>Vl,TaskCreationParamsSchema:()=>yf,TaskMetadataSchema:()=>Ll,TaskSchema:()=>xf,TaskStatusNotificationParamsSchema:()=>Cf,TaskStatusNotificationSchema:()=>wf,TaskStatusSchema:()=>bf,TextContentSchema:()=>sd,TextResourceContentsSchema:()=>Eu,TitledMultiSelectEnumSchemaSchema:()=>Qd,TitledSingleSelectEnumSchemaSchema:()=>Jd,ToolAnnotationsSchema:()=>_d,ToolChoiceSchema:()=>Fd,ToolExecutionSchema:()=>vd,ToolListChangedNotificationSchema:()=>Ed,ToolResultContentSchema:()=>Id,ToolSchema:()=>yd,ToolUseContentSchema:()=>ud,UnsubscribeRequestParamsSchema:()=>Wu,UnsubscribeRequestSchema:()=>Gu,UntitledMultiSelectEnumSchemaSchema:()=>Zd,UntitledSingleSelectEnumSchemaSchema:()=>qd}),Pm=e=>Jl.safeParse(e).success,Fm=e=>Yl.safeParse(e).success,Im=e=>Xl.safeParse(e).success,Lm=e=>Zl.safeParse(e).success;Up.InvalidRequest,Up.UnsupportedProtocolVersion,Up.InvalidParams,Up.MethodNotFound,Up.InvalidParams,Up.MissingRequiredClientCapability,Up.ParseError,Up.InvalidRequest,Up.MethodNotFound,Up.UnsupportedProtocolVersion,Up.MissingRequiredClientCapability;function Rm(e,t){return Fs(e,t)}function zm(e){return new Set(e.flatMap(e=>Object.keys(e.shape)))}function Bm(e){if(e==null)return!1;let t=typeof e;return t!==`object`&&t!==`function`||!(`~standard`in e)?!1:typeof e[`~standard`]?.validate==`function`}var Vm=!1,Hm=`draft-2020-12`;function Um(e,t=`input`){let n=e[`~standard`],r;if(n.jsonSchema)r=n.jsonSchema[t]({target:Hm});else if(n.vendor===`zod`){if(!(`_zod`in e))throw Error(`Schema appears to be from zod 3, which the SDK cannot convert to JSON Schema. Upgrade to zod >=4.2.0, or wrap your JSON Schema with fromJsonSchema().`);Vm||(Vm=!0,console.warn("[mcp-sdk] Your zod version does not implement `~standard.jsonSchema` (added in zod 4.2.0). Falling back to z.toJSONSchema(). Upgrade to zod >=4.2.0 to silence this warning.")),r=ks(e,{target:Hm,io:t})}else throw Error(`Schema library "${n.vendor}" does not implement StandardJSONSchemaV1 (\`~standard.jsonSchema\`). Upgrade to a version that does, or wrap your JSON Schema with fromJsonSchema().`);if(t===`output`)return r.type===void 0&&Wm(r)?{type:`object`,...r}:r;if(r.type!==void 0&&r.type!==`object`)throw Error(`MCP tool and prompt schemas must describe objects (got type: ${JSON.stringify(r.type)}). Wrap your schema in z.object({...}) or equivalent.`);return{type:`object`,...r}}function Wm(e){if(`properties`in e||`patternProperties`in e||`additionalProperties`in e||`required`in e)return!0;for(let t of[`oneOf`,`anyOf`,`allOf`]){let n=e[t];if(Array.isArray(n)&&n.length>0)return n.every(e=>typeof e==`object`&&!!e&&(e.type===`object`||Wm(e)))}return!1}function Gm(e){return e.path?.length?`${e.path.map(e=>String(typeof e==`object`?e.key:e)).join(`.`)}: ${e.message}`:e.message}async function Km(e,t){let n=await e[`~standard`].validate(t);return n.issues&&n.issues.length>0?{success:!1,error:n.issues.map(e=>Gm(e)).join(`, `)}:{success:!0,data:n.value}}function qm(e){let t=ks(e,{target:Hm,io:`input`});return typeof t.pattern==`string`?t.pattern:void 0}var Jm=/\\\.\\d\{(\d+)\}/;function Ym(e){let t=Jm.exec(e),n=[void 0,-1,0];return t&&n.push(Number(t[1])),[!1,!0].flatMap(e=>[!1,!0].flatMap(t=>n.map(n=>xl({local:e,offset:t,precision:n}))))}function Xm(e,t){let n;switch(e){case`email`:n=[nc()];break;case`uri`:n=[oc()];break;case`date`:n=[Sl()];break;case`date-time`:n=Ym(t)}return new Set(n.map(e=>qm(e)).filter(e=>e!==void 0))}function Zm(e,t,n){return n!==`zod`||Xm(e,t).has(t)}function Qm(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function $m(e){try{return Um(e,`input`)}catch(e){let t=e instanceof Error?e.message:String(e);throw new Wp(Up.InvalidParams,`Elicitation requestedSchema must describe an object with flat primitive properties: ${t}`)}}var eh=new Set([`$comment`,`deprecated`,`description`,`examples`,`readOnly`,`title`,`writeOnly`]);function th(e){return eh.has(e)||e.startsWith(`x-`)}var nh=new Set([`$schema`,...Object.keys(nf.shape.requestedSchema.shape)]),rh={string:zm([Gd,qd,Jd,Yd]),number:zm([Kd]),integer:zm([Kd]),boolean:zm([Wd]),array:zm([Zd,Qd])},ih=new Set(Gd.shape.format.unwrap().options);function ah(e,t,n,r){if(!Qm(e))return e;let i=typeof e.type==`string`&&Object.hasOwn(rh,e.type)?rh[e.type]:void 0;if(i===void 0)return e;let a={};for(let[o,s]of Object.entries(e))i.has(o)||th(o)?a[o]=s:o===`pattern`&&e.type===`string`&&typeof e.format==`string`?ih.has(e.format)?(typeof s!=`string`||!Zm(e.format,s,n))&&r.push(`${t}.${o}`):a[o]=s:r.push(`${t}.${o}`);return a}function oh(e,t){let n={},r=[];for(let[i,a]of Object.entries(e))i===`properties`&&Qm(a)?n[i]=Object.fromEntries(Object.entries(a).map(([e,n])=>[e,ah(n,`properties.${e}`,t,r)])):nh.has(i)?n[i]=a:th(i)||r.push(i);if(r.length>0)throw new Wp(Up.InvalidParams,`Elicitation requestedSchema contains unsupported JSON Schema constraint(s) after Standard Schema conversion: ${r.join(`, `)}`);return n}function sh(e,t){if(!Qm(e.properties))return t;let n=Object.entries(e.properties).filter(([,e])=>!Rm(tf,e).success).map(([e])=>`properties.${e}`);return n.length>0?n.join(`, `):t}function ch(e,t,n=``){return Array.isArray(e)&&Array.isArray(t)?e.flatMap((e,r)=>ch(e,t[r],`${n}[${r}]`)):!Qm(e)||!Qm(t)?[]:Object.entries(e).flatMap(([e,r])=>{let i=n?`${n}.${e}`:e;return Object.prototype.hasOwnProperty.call(t,e)?ch(r,t[e],i):th(e)?[]:[i]})}function lh(e){if(!Bm(e.requestedSchema))return{...e,mode:`form`,requestedSchema:e.requestedSchema};let t=e.requestedSchema[`~standard`].vendor,n=oh($m(e.requestedSchema),t),r=Rm(nf.shape.requestedSchema,n);if(!r.success)throw new Wp(Up.InvalidParams,`Elicitation requestedSchema only supports flat primitive properties (string, number, integer, boolean, and string enums): ${sh(n,r.error.message)}`);let i=ch(n,r.data);if(i.length>0)throw new Wp(Up.InvalidParams,`Elicitation requestedSchema contains unsupported JSON Schema constraint(s) after Standard Schema conversion: ${i.join(`, `)}`);let a=(r.data.required??[]).filter(e=>!Object.prototype.hasOwnProperty.call(r.data.properties,e));if(a.length>0)throw new Wp(Up.InvalidParams,`Elicitation requestedSchema lists required properties that are not defined in properties: ${a.join(`, `)}`);return{...e,mode:`form`,requestedSchema:r.data}}function uh(e){let t=e.inputRequests!==void 0&&Object.keys(e.inputRequests).length>0,n=typeof e.requestState==`string`;if(!t&&!n)throw TypeError(`inputRequired() requires at least one of inputRequests (with at least one entry) or requestState (spec: every InputRequiredResult MUST include at least one of the two)`);return{resultType:`input_required`,...e.inputRequests!==void 0&&{inputRequests:e.inputRequests},...e.requestState!==void 0&&{requestState:e.requestState}}}Object.assign(uh,{elicit(e){try{return{method:`elicitation/create`,params:lh(e)}}catch(e){throw e instanceof Wp?TypeError(e.message,{cause:e}):e}},elicitUrl(e){return{method:`elicitation/create`,params:{...e,mode:`url`}}},createMessage(e){return{method:`sampling/createMessage`,params:e}},listRoots(){return{method:`roots/list`}}});var dh=`AnnotationsSchema.AudioContentSchema.BaseMetadataSchema.BlobResourceContentsSchema.BooleanSchemaSchema.CallToolRequestSchema.CallToolRequestParamsSchema.CallToolResultSchema.CancelledNotificationSchema.CancelledNotificationParamsSchema.CancelTaskRequestSchema.CancelTaskResultSchema.ClientCapabilitiesSchema.ClientNotificationSchema.ClientRequestSchema.ClientResultSchema.CompatibilityCallToolResultSchema.CompleteRequestSchema.CompleteRequestParamsSchema.CompleteResultSchema.ContentBlockSchema.CreateMessageRequestSchema.CreateMessageRequestParamsSchema.CreateMessageResultSchema.CreateMessageResultWithToolsSchema.CreateTaskResultSchema.CursorSchema.DiscoverRequestSchema.DiscoverResultSchema.ElicitationCompleteNotificationSchema.ElicitationCompleteNotificationParamsSchema.ElicitRequestSchema.ElicitRequestFormParamsSchema.ElicitRequestParamsSchema.ElicitRequestURLParamsSchema.ElicitResultSchema.EmbeddedResourceSchema.EmptyResultSchema.EnumSchemaSchema.GetPromptRequestSchema.GetPromptRequestParamsSchema.GetPromptResultSchema.GetTaskPayloadRequestSchema.GetTaskPayloadResultSchema.GetTaskRequestSchema.GetTaskResultSchema.IconSchema.IconsSchema.ImageContentSchema.ImplementationSchema.InitializedNotificationSchema.InitializeRequestSchema.InitializeRequestParamsSchema.InitializeResultSchema.JSONArraySchema.JSONObjectSchema.JSONRPCErrorResponseSchema.JSONRPCMessageSchema.JSONRPCNotificationSchema.JSONRPCRequestSchema.JSONRPCResponseSchema.JSONRPCResultResponseSchema.JSONValueSchema.LegacyTitledEnumSchemaSchema.ListPromptsRequestSchema.ListPromptsResultSchema.ListResourcesRequestSchema.ListResourcesResultSchema.ListResourceTemplatesRequestSchema.ListResourceTemplatesResultSchema.ListRootsRequestSchema.ListRootsResultSchema.ListTasksRequestSchema.ListTasksResultSchema.ListToolsRequestSchema.ListToolsResultSchema.LoggingLevelSchema.LoggingMessageNotificationSchema.LoggingMessageNotificationParamsSchema.ModelHintSchema.ModelPreferencesSchema.MultiSelectEnumSchemaSchema.NotificationSchema.NumberSchemaSchema.PaginatedRequestSchema.PaginatedRequestParamsSchema.PaginatedResultSchema.PingRequestSchema.PrimitiveSchemaDefinitionSchema.ProgressSchema.ProgressNotificationSchema.ProgressNotificationParamsSchema.ProgressTokenSchema.PromptSchema.PromptArgumentSchema.PromptListChangedNotificationSchema.PromptMessageSchema.PromptReferenceSchema.ReadResourceRequestSchema.ReadResourceRequestParamsSchema.ReadResourceResultSchema.RelatedTaskMetadataSchema.RequestSchema.RequestIdSchema.RequestMetaSchema.ResourceSchema.ResourceContentsSchema.ResourceLinkSchema.ResourceListChangedNotificationSchema.ResourceRequestParamsSchema.ResourceTemplateSchema.ResourceTemplateReferenceSchema.ResourceUpdatedNotificationSchema.ResourceUpdatedNotificationParamsSchema.ResultMetaObjectSchema.ResultSchema.RoleSchema.RootSchema.RootsListChangedNotificationSchema.SamplingContentSchema.SamplingMessageSchema.SamplingMessageContentBlockSchema.ServerCapabilitiesSchema.ServerNotificationSchema.ServerRequestSchema.ServerResultSchema.SetLevelRequestSchema.SetLevelRequestParamsSchema.SingleSelectEnumSchemaSchema.StringSchemaSchema.SubscribeRequestSchema.SubscribeRequestParamsSchema.SubscriptionFilterSchema.SubscriptionsAcknowledgedNotificationSchema.SubscriptionsAcknowledgedNotificationParamsSchema.SubscriptionsListenRequestSchema.SubscriptionsListenRequestParamsSchema.SubscriptionsListenResultSchema.SubscriptionsListenResultMetaSchema.TaskAugmentedRequestParamsSchema.TaskCreationParamsSchema.TaskMetadataSchema.TaskSchema.TaskStatusSchema.TaskStatusNotificationSchema.TaskStatusNotificationParamsSchema.TextContentSchema.TextResourceContentsSchema.TitledMultiSelectEnumSchemaSchema.TitledSingleSelectEnumSchemaSchema.ToolSchema.ToolAnnotationsSchema.ToolChoiceSchema.ToolExecutionSchema.ToolListChangedNotificationSchema.ToolResultContentSchema.ToolUseContentSchema.UnsubscribeRequestSchema.UnsubscribeRequestParamsSchema.UntitledMultiSelectEnumSchemaSchema.UntitledSingleSelectEnumSchemaSchema`.split(`.`),fh={IdJagTokenExchangeResponseSchema:Gf,OAuthClientInformationFullSchema:Xf,OAuthClientInformationSchema:Yf,OAuthClientMetadataSchema:Jf,OAuthClientRegistrationErrorSchema:Zf,OAuthErrorResponseSchema:Kf,OAuthMetadataSchema:Vf,OAuthProtectedResourceMetadataSchema:Bf,OAuthTokenRevocationRequestSchema:Qf,OAuthTokensSchema:Wf,OpenIdProviderDiscoveryMetadataSchema:Uf,OpenIdProviderMetadataSchema:Hf},ph={},mh={};function hh(e,t){let n=e.slice(0,-6);ph[n]=t,mh[n]=e=>t.safeParse(e).success}for(let e of dh)hh(e,Nm[e]);for(let[e,t]of Object.entries(fh))hh(e,t);Object.freeze(ph),Object.freeze(mh);function gh(e){switch(e){case`initialize`:case`notifications/initialized`:return Om(void 0);case`server/discover`:return Om(Dm);default:return}}var _h=[El,Dl,kl,jl],vh=[`inputResponses`,`requestState`];function yh(e,t){let n=e.params;if(!wh(n))return{message:e,lifted:{}};let r=n._meta,i=wh(r)?_h.filter(e=>e in r):[],a=t===`request`?vh.filter(e=>e in n):[];if(i.length===0&&a.length===0)return{message:e,lifted:{}};let o={},s={...n};if(i.length>0&&wh(r)){let e={},t={...r};for(let n of i)e[n]=r[n],delete t[n];o.envelope=e,Object.keys(t).length>0?s._meta=t:delete s._meta}for(let e of a)e===`inputResponses`&&(o.inputResponses=s[e]),e===`requestState`&&(o.requestState=s[e]),delete s[e];return{message:{...e,params:s},lifted:o}}function bh(e,t){let n=e.validateResult(t,void 0);if(n.ok||n.reason!==`not-in-era`)return{"~standard":{version:1,vendor:`mcp-wire-codec`,validate(n){let r=e.validateResult(t,n);return r.ok?{value:r.value}:{issues:[{message:r.reason===`invalid`?r.message:`not-in-era: ${t}`}]}}}}}function xh(e){return()=>e}var Sh=xh(void 0),Ch=class{_transport;_requestMessageId=0;_requestHandlers=new Map;_requestHandlerAbortControllers=new Map;_notificationHandlers=new Map;_responseHandlers=new Map;_progressHandlers=new Map;_timeoutInfo=new Map;_pendingDebouncedNotifications=new Set;_negotiatedProtocolVersion;_supportedProtocolVersions;onclose;onerror;fallbackRequestHandler;fallbackNotificationHandler;constructor(e){this._options=e,this._supportedProtocolVersions=e?.supportedProtocolVersions??wl,this.setNotificationHandler(`notifications/cancelled`,e=>{this._oncancel(e)}),this.setNotificationHandler(`notifications/progress`,e=>{this._onprogress(e)}),this.setRequestHandler(`ping`,e=>({}))}_shouldDropInbound(e){}_outboundMetaEnvelope(){}_envelopeOutbound(e){let t=this._outboundMetaEnvelope();if(t===void 0)return e;let n=e.params??{};return{...e,params:{...n,_meta:{...t,...n._meta}}}}_resolveNonCompleteResult(e,t){return Promise.reject(new rp(np.UnsupportedResultType,`Unsupported result type '${e.kind}' for ${t.request.method}`,{resultType:e.kind,method:t.request.method}))}_getRequestHandler(e){return this._requestHandlers.get(e)}async _oncancel(e){e.params.requestId!==void 0&&this._requestHandlerAbortControllers.get(e.params.requestId)?.abort(e.params.reason)}_setupTimeout(e,t,n,r,i=!1){this._timeoutInfo.set(e,{timeoutId:setTimeout(r,t),startTime:Date.now(),timeout:t,maxTotalTimeout:n,resetTimeoutOnProgress:i,onTimeout:r})}_resetTimeout(e){let t=this._timeoutInfo.get(e);if(!t)return!1;let n=Date.now()-t.startTime;if(t.maxTotalTimeout&&n>=t.maxTotalTimeout)throw this._timeoutInfo.delete(e),new rp(np.RequestTimeout,`Maximum total timeout exceeded`,{maxTotalTimeout:t.maxTotalTimeout,totalElapsed:n});return clearTimeout(t.timeoutId),t.timeoutId=setTimeout(t.onTimeout,t.timeout),!0}_cleanupTimeout(e){let t=this._timeoutInfo.get(e);t&&(clearTimeout(t.timeoutId),this._timeoutInfo.delete(e))}async connect(e){this._transport=e;let t=this.transport?.onclose;this._transport.onclose=()=>{try{t?.()}finally{this._onclose()}};let n=this.transport?.onerror;this._transport.onerror=e=>{n?.(e),this._onerror(e)};let r=this._transport?.onmessage;this._transport.onmessage=(e,t)=>{r?.(e,t),Im(e)||Lm(e)?this._onresponse(e):Pm(e)?this._onrequest(e,t):Fm(e)?this._onnotification(e,t):this._onerror(Error(`Unknown message type: ${JSON.stringify(e)}`))},e.setSupportedProtocolVersions?.(this._supportedProtocolVersions),await this._transport.start()}_onclose(){let e=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._pendingDebouncedNotifications.clear();for(let e of this._timeoutInfo.values())clearTimeout(e.timeoutId);this._timeoutInfo.clear();let t=this._requestHandlerAbortControllers;this._requestHandlerAbortControllers=new Map;let n=new rp(np.ConnectionClosed,`Connection closed`);this._transport=void 0;try{this.onclose?.()}finally{for(let t of e.values())t(n);for(let e of t.values())e.abort(n)}}_onerror(e){this.onerror?.(e)}_onnotification(e,t){let{message:n}=yh(e,`notification`),r=this._negotiatedWireCodec();if(t?.classification===void 0&&this._shouldDropInbound(e)===`drop`)return;if(t?.classification!==void 0){let e=km(t.classification);if(e!==r.era){this._onerror(Error(`Era mismatch on inbound notification '${n.method}': classified as ${e} but this instance serves ${r.era}`));return}}if(jm(n.method)&&!r.hasNotificationMethod(n.method))return;let i=this._notificationHandlers.get(n.method),a=this.fallbackNotificationHandler;(i!==void 0||a!==void 0)&&Promise.resolve().then(()=>i===void 0?a(n):i(n,r)).catch(e=>this._onerror(Error(`Uncaught error in notification handler: ${e}`)))}_onrequest(e,t){let{message:n,lifted:r}=yh(e,`request`),i=this._negotiatedWireCodec();if(t?.classification===void 0&&this._shouldDropInbound(e)===`drop`){this._onerror(Error(`Dropped inbound request '${e.method}': not servable on this connection's protocol era`));return}let a=this._transport,o=(e,t,r)=>{let i={jsonrpc:`2.0`,id:n.id,error:{code:e,message:t,...r!==void 0&&{data:r}}};a?.send(i).catch(e=>this._onerror(Error(`Failed to send an error response: ${e}`)))};if(t?.classification!==void 0){let e=km(t.classification);if(e!==i.era){this._onerror(Error(`Era mismatch on inbound request '${n.method}': classified as ${e} but this instance serves ${i.era}`));let r=t.classification.revision??e;o(Up.UnsupportedProtocolVersion,`Unsupported protocol version: ${r}`,{supported:this._supportedProtocolVersions,requested:r});return}}if(Am(n.method)&&!i.hasRequestMethod(n.method)){o(Up.MethodNotFound,`Method not found`);return}let s=this._requestHandlers.get(n.method)??this.fallbackRequestHandler;if(s===void 0){o(Up.MethodNotFound,`Method not found`);return}let c=i.checkInboundEnvelope(r);if(c!==void 0){o(Up.InvalidParams,c);return}let l=(e,t)=>this._notificationViaCodec(this._resolveOutboundCodec(e.method),e,{...t,relatedRequestId:n.id}),u=(e,t,r)=>this._requestWithSchemaViaCodec(this._resolveOutboundCodec(e.method),e,t,{...r,relatedRequestId:n.id}),d=new AbortController;this._requestHandlerAbortControllers.set(n.id,d);let f=r.inputResponses===void 0?void 0:Eh(r.inputResponses),p={sessionId:a?.sessionId,mcpReq:{id:n.id,method:n.method,_meta:n.params?._meta,...r.envelope!==void 0&&{envelope:r.envelope},...f!==void 0&&{inputResponses:f.accepted},...f!==void 0&&f.droppedKeys.length>0&&{droppedInputResponseKeys:f.droppedKeys},requestState:r.requestState===void 0?Sh:xh(r.requestState),signal:d.signal,send:((e,t,n)=>{let r=this._resolveOutboundCodec(e.method);if(this._assertOutboundRequestInEra(r,e.method),Bm(t))return u(e,t,n);let i=bh(r,e.method);if(i===void 0)throw TypeError(`'${e.method}' is not a spec method; pass a result schema as the second argument to ctx.mcpReq.send().`);return u(e,i,t)}),notify:l},http:t?.authInfo?{authInfo:t.authInfo}:void 0},m=this.buildContext(p,t);Promise.resolve().then(()=>s(n,m)).then(async e=>{if(d.signal.aborted)return;let t;try{t=i.encodeResult(n.method,e,this._outboundServerInfo())}catch(e){this._onerror(Error(`Failed to encode result for ${n.method}: ${e}`)),o(Up.InternalError,`Internal error`);return}let r={result:t,jsonrpc:`2.0`,id:n.id};await a?.send(r)},async e=>{if(d.signal.aborted)return;let t=Number.isSafeInteger(e.code)?e.code:Up.InternalError,r={jsonrpc:`2.0`,id:n.id,error:{code:i.encodeErrorCode(t),message:e.message??`Internal error`,...e.data!==void 0&&{data:e.data}}};await a?.send(r)}).catch(e=>this._onerror(Error(`Failed to send response: ${e}`))).finally(()=>{this._requestHandlerAbortControllers.get(n.id)===d&&this._requestHandlerAbortControllers.delete(n.id)})}_onprogress(e){let{progressToken:t,...n}=e.params,r=Number(t),i=this._progressHandlers.get(r);if(!i){this._onerror(Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));return}let a=this._responseHandlers.get(r),o=this._timeoutInfo.get(r);if(o&&a&&o.resetTimeoutOnProgress)try{this._resetTimeout(r)}catch(e){this._responseHandlers.delete(r),this._progressHandlers.delete(r),this._cleanupTimeout(r),a(e);return}i(n)}_onresponse(e){let t=Number(e.id),n=this._responseHandlers.get(t);if(n===void 0){this._onerror(Error(`Received a response for an unknown message ID: ${JSON.stringify(e)}`));return}this._responseHandlers.delete(t),this._cleanupTimeout(t),this._progressHandlers.delete(t),Im(e)?n(e):n(Wp.fromError(e.error.code,e.error.message,e.error.data))}get transport(){return this._transport}async close(){await this._transport?.close()}request(e,t,n){let r=this._resolveOutboundCodec(e.method);if(this._assertOutboundRequestInEra(r,e.method),Bm(t))return this._requestWithSchemaViaCodec(r,e,t,n);let i=bh(r,e.method);if(i===void 0)throw TypeError(`'${e.method}' is not a spec method; pass a result schema as the second argument to request().`);return this._requestWithSchemaViaCodec(r,e,i,t)}_negotiatedWireCodec(){return Om(this._negotiatedProtocolVersion)}_wireCodec(){return this._negotiatedWireCodec()}_resolveOutboundCodec(e){if(this._negotiatedProtocolVersion===void 0){let t=gh(e);if(t)return t}return this._negotiatedWireCodec()}_assertOutboundRequestInEra(e,t){if(Am(t)&&!e.hasRequestMethod(t))throw new rp(np.MethodNotSupportedByProtocolVersion,`Method '${t}' is not supported by the negotiated protocol version (wire era ${e.era})`,{method:t,era:e.era})}_requestWithSchema(e,t,n){let r=this._resolveOutboundCodec(e.method);return this._assertOutboundRequestInEra(r,e.method),this._requestWithSchemaViaCodec(r,e,t,n)}_requestWithSchemaViaCodec(e,t,n,r){let{relatedRequestId:i,resumptionToken:a,onresumptiontoken:o,headers:s}=r??{},c=Date.now(),l,u;return new Promise((d,f)=>{let p=e=>{f(e)};if(!this._transport){p(Error(`Not connected`));return}if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(t.method)}catch(e){p(e);return}if(r?.signal?.aborted){let e=r.signal.reason;throw e instanceof rp?e:new rp(np.RequestTimeout,String(e))}let m=e.era===`2026-07-28`&&this._transport.hasPerRequestStream===!0?new AbortController:void 0,h=this._requestMessageId++;u=h;let g={...t,jsonrpc:`2.0`,id:h};r?.onprogress&&(this._progressHandlers.set(h,r.onprogress),g.params={...t.params,_meta:{...t.params?._meta,progressToken:h}});let _=this._envelopeOutbound(g),v=!1,y=e=>{v||(this._progressHandlers.delete(h),m===void 0?t.method!==`initialize`&&this._transport?.send(this._envelopeOutbound({jsonrpc:`2.0`,method:`notifications/cancelled`,params:{requestId:h,reason:String(e)}}),{relatedRequestId:i,resumptionToken:a,onresumptiontoken:o}).catch(e=>this._onerror(Error(`Failed to send cancellation: ${e}`))):m.abort(),f(e instanceof rp?e:new rp(np.RequestTimeout,String(e))))};this._responseHandlers.set(h,i=>{if(r?.signal?.aborted)return;if(v=!0,i instanceof Error)return f(i);let a;try{a=e.decodeResult(t.method,i.result)}catch(e){return f(e instanceof Error?e:Error(String(e)))}if(a.kind===`invalid`)return f(a.error);if(a.kind===`input_required`){if(r?.allowInputRequired===!0)return d(Dh(a));let i={codec:e,request:t,resultSchema:n,options:r,flowStartedAt:c,retry:(r,i)=>this._requestWithSchemaViaCodec(e,r===void 0?{method:t.method}:{method:t.method,params:r},n,i)};return d(this._resolveNonCompleteResult(a,i))}let o=a.result;Km(n,o).then(e=>{e.success?d(e.data):f(new rp(np.InvalidResult,`Invalid result for ${t.method}: ${e.error}`))},f)}),l=()=>y(r?.signal?.reason),r?.signal?.addEventListener(`abort`,l,{once:!0});let b=r?.timeout??6e4;this._setupTimeout(h,b,r?.maxTotalTimeout,()=>y(new rp(np.RequestTimeout,`Request timed out`,{timeout:b})),r?.resetTimeoutOnProgress??!1),this._transport.send(_,{relatedRequestId:i,resumptionToken:a,onresumptiontoken:o,headers:s,requestSignal:m?.signal}).catch(e=>{this._progressHandlers.delete(h),f(e)})}).finally(()=>{l&&r?.signal?.removeEventListener(`abort`,l),u!==void 0&&(this._responseHandlers.delete(u),this._cleanupTimeout(u))})}async notification(e,t){return await this._notificationViaCodec(this._resolveOutboundCodec(e.method),e,t)}async _notificationViaCodec(e,t,n){if(!this._transport)throw new rp(np.NotConnected,`Not connected`);if(jm(t.method)&&!e.hasNotificationMethod(t.method))throw new rp(np.MethodNotSupportedByProtocolVersion,`Notification '${t.method}' is not supported by the negotiated protocol version (wire era ${e.era})`,{method:t.method,era:e.era});this.assertNotificationCapability(t.method);let r=this._envelopeOutbound({jsonrpc:`2.0`,...t});if((this._options?.debouncedNotificationMethods??[]).includes(t.method)&&!t.params&&n?.relatedRequestId===void 0){if(this._pendingDebouncedNotifications.has(t.method))return;this._pendingDebouncedNotifications.add(t.method),Promise.resolve().then(()=>{this._pendingDebouncedNotifications.delete(t.method),this._transport&&this._transport?.send(r,n).catch(e=>this._onerror(e))});return}await this._transport.send(r,n)}setRequestHandler(e,t,n){this.assertRequestHandlerCapability(e);let r;if(typeof t==`function`){if(!Am(e))throw TypeError(`'${e}' is not a spec request method; pass schemas as the second argument to setRequestHandler().`);r=(n,r)=>{let i=this._negotiatedWireCodec(),a=i.validateRequest(e,n);if(!a.ok&&a.reason===`not-in-era`&&(a=i.validateInputRequest(e,n)),!a.ok)throw a.reason===`not-in-era`?new Wp(Up.InternalError,`No wire schema for ${e} in the resolved era`):Error(a.message);return Promise.resolve(t(a.value,r))}}else if(n)r=async(r,i)=>{let a=await Km(t.params,{...r.params});if(!a.success)throw new Wp(Up.InvalidParams,`Invalid params for ${e}: ${a.error}`);return n(a.data,i)};else throw TypeError(`setRequestHandler: handler is required`);this._requestHandlers.set(e,this._wrapHandler(e,r))}_wrapHandler(e,t){return t}_outboundServerInfo(){}removeRequestHandler(e){this._requestHandlers.delete(e)}assertCanSetRequestHandler(e){if(this._requestHandlers.has(e))throw Error(`A request handler for ${e} already exists, which would be overridden`)}setNotificationHandler(e,t,n){if(typeof t==`function`){if(!jm(e))throw TypeError(`'${e}' is not a spec notification method; pass schemas as the second argument to setNotificationHandler().`);this._notificationHandlers.set(e,(n,r)=>{let i=r.validateNotification(e,n);if(!i.ok)throw i.reason===`not-in-era`?new Wp(Up.InternalError,`No wire schema for ${e} in the resolved era`):Error(i.message);return Promise.resolve(t(i.value))});return}if(!n)throw TypeError(`setNotificationHandler: handler is required`);this._notificationHandlers.set(e,async r=>{let i=await Km(t.params,{...r.params});if(!i.success)throw new Wp(Up.InvalidParams,`Invalid params for notification ${e}: ${i.error}`);await n(i.data,r)})}removeNotificationHandler(e){this._notificationHandlers.delete(e)}};function wh(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Th(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Eh(e){let t={},n=[];if(!Th(e))return{accepted:t,droppedKeys:n};for(let[r,i]of Object.entries(e)){if(!Th(i)||`method`in i||`result`in i){n.push(r);continue}t[r]=i}return{accepted:t,droppedKeys:n}}function Dh(e){return{resultType:`input_required`,inputRequests:e.inputRequests,...e.requestState!==void 0&&{requestState:e.requestState},...e._meta!==void 0&&{_meta:e._meta}}}S((e=>{var t=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,n=/\\([\u000b\u0020-\u00ff])/g,r=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;e.parse=i;function i(e){if(!e)throw TypeError(`argument string is required`);var i=typeof e==`object`?a(e):e;if(typeof i!=`string`)throw TypeError(`argument string is required to be a string`);var s=i.indexOf(`;`),c=s===-1?i.trim():i.slice(0,s).trim();if(!r.test(c))throw TypeError(`invalid media type`);var l=new o(c.toLowerCase());if(s!==-1){var u,d,f;for(t.lastIndex=s;d=t.exec(i);){if(d.index!==s)throw TypeError(`invalid parameter format`);s+=d[0].length,u=d[1].toLowerCase(),f=d[2],f.charCodeAt(0)===34&&(f=f.slice(1,-1),f.indexOf(`\\`)!==-1&&(f=f.replace(n,`$1`))),l.parameters[u]=f}if(s!==i.length)throw TypeError(`invalid parameter format`)}return l}function a(e){var t;if(typeof e.getHeader==`function`?t=e.getHeader(`content-type`):typeof e.headers==`object`&&(t=e.headers&&e.headers[`content-type`]),typeof t!=`string`)throw TypeError(`content-type header is missing from object`);return t}function o(e){this.parameters=Object.create(null),this.type=e}}))(),typeof self<`u`&&self.location&&self.location.origin!==`null`?new URL(self.location.origin+self.location.pathname+location.search):new URL(`https://github.com/cfworker`);var Oh=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i,kh=/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,Ah=/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,jh=/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,Mh=/^(?:(?:https?|ftp):\/\/)(?:\S+(?::\S*)?@)?(?:(?!10(?:\.\d{1,3}){3})(?!127(?:\.\d{1,3}){3})(?!169\.254(?:\.\d{1,3}){2})(?!192\.168(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)(?:\.(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,Nh=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,Ph=/^(?:\/(?:[^~/]|~0|~1)*)*$/,Fh=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,Ih=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,Lh=/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,Rh=/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i;function zh(e){return e.test.bind(e)}Bh.bind(void 0,!1),zh(Ah),zh(jh),zh(Mh),zh(kh),zh(Lh),zh(Rh),zh(Nh),zh(Ph),zh(Fh),zh(Ih);function Bh(e,t){let n=t.match(Oh);if(!n)return!1;let r=+n[1],i=+n[2],a=+n[3],o=!!n[5];return(r<=23&&i<=59&&a<=59||r==23&&i==59&&a==60)&&(!e||o)}globalThis.crypto;var Vh,Hh,Uh,Wh,Gh,Kh=o((()=>{Vh=`modulepreload`,Hh=function(e,t){return new URL(e,t).href},Uh={},Wh=function(e){return e.pathname.endsWith(`.css`)},Gh=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e,i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?new URL(import.meta.resolve(e)):new URL(e,import.meta.url)}r=o(t.map(t=>{t=Hh(t,n);let r=s(t);if(r.href in Uh)return;Uh[r.href]=!0;let i=Wh(r);if(e===void 0){e={all:new Set,styles:new Set};let t=document.getElementsByTagName(`link`);for(let n=t.length-1;n>=0;n--){let r=t[n];e.all.add(r.href),r.rel===`stylesheet`&&e.styles.add(r.href)}}if((i?e.styles:e.all).has(r.href))return;let o=document.createElement(`link`);if(o.rel=i?`stylesheet`:Vh,i||(o.as=`script`),o.crossOrigin=``,o.href=r.href,a&&o.setAttribute(`nonce`,a),document.head.appendChild(o),i)return new Promise((e,t)=>{o.addEventListener(`load`,e),o.addEventListener(`error`,()=>t(Error(`Unable to preload CSS for ${r}`)))})}).filter(e=>e!==void 0))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})}})),qh=class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.OAuthClientFlowError`})}static[Symbol.hasInstance](e){return tp(this,e)}static isInstance(e){if(typeof this!=`function`)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return tp(this,e)}constructor(e){super(e),this.name=new.target.name,ep(this,new.target)}};(class extends qh{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.IssuerMismatchError`})}kind;expected;received;constructor(e,t,n){super(`Issuer mismatch in ${e===`metadata`?`authorization server metadata (RFC 8414 §3.3)`:`authorization response (RFC 9207)`}: expected ${JSON.stringify(t)}, received ${JSON.stringify(n)}`),this.kind=e,this.expected=t,this.received=n}}),class extends qh{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.RegistrationRejectedError`})}status;body;submittedMetadata;constructor(e){super(`Dynamic Client Registration rejected (HTTP ${e.status}): ${e.body}`),this.status=e.status,this.body=e.body,this.submittedMetadata=e.submittedMetadata}},class extends qh{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.InsecureTokenEndpointError`})}tokenEndpoint;constructor(e){super(`Refusing to send credentials to non-https token endpoint '${e}'. OAuth token requests MUST use TLS (localhost / *.localhost / 127.0.0.1 / ::1 are exempt).`),this.tokenEndpoint=e}},class extends qh{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.AuthorizationServerMismatchError`})}constructor(e,t){super(`Authorization server mismatch: credentials are bound to ${JSON.stringify(e)} but this call resolved ${JSON.stringify(t)}; refusing to present them to a different authorization server`),this.recordedIssuer=e,this.currentIssuer=t}},class extends qh{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.InsufficientScopeError`})}requiredScope;resourceMetadataUrl;errorDescription;constructor(e){super(`Insufficient scope${e.requiredScope?`: required "${e.requiredScope}"`:``}`),this.requiredScope=e.requiredScope,this.resourceMetadataUrl=e.resourceMetadataUrl,this.errorDescription=e.errorDescription}},class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.UnauthorizedError`})}static[Symbol.hasInstance](e){return tp(this,e)}static isInstance(e){if(typeof this!=`function`)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return tp(this,e)}constructor(e){super(e??`Unauthorized`),this.name=`UnauthorizedError`,ep(this,new.target)}},class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.SseError`})}static[Symbol.hasInstance](e){return tp(this,e)}static isInstance(e){if(typeof this!=`function`)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return tp(this,e)}constructor(e,t,n){super(`SSE error: ${t}`),this.code=e,this.event=n,ep(this,new.target)}};var Jh=class{_eventSlots=new Map;setHandler(e,t){let n=this._ensureEventSlot(e);n.onHandler&&t&&console.warn(`[MCP Apps] on${String(e)} handler replaced. Use addEventListener("${String(e)}", …) to add multiple listeners without replacing.`),n.onHandler=t}getHandler(e){return this._eventSlots.get(e)?.onHandler}addEventListener(e,t){this._ensureEventSlot(e).listeners.push(t)}removeEventListener(e,t){let n=this._eventSlots.get(e);if(!n)return;let r=n.listeners.indexOf(t);r!==-1&&n.listeners.splice(r,1)}dispatch(e,t){let n=this._eventSlots.get(e);if(n){n.onHandler?.(t);for(let e of[...n.listeners])e(t)}}_ensureEventSlot(e){let t=this._eventSlots.get(e);return t||(t={listeners:[]},this._eventSlots.set(e,t)),t}},Yh=class{_methods=new Set;claim(e,t){if(this._methods.has(e))throw Error(`Handler for "${e}" already registered (via ${t}). Use addEventListener() to attach multiple listeners, or the on* setter for replace semantics.`);this._methods.add(e)}replace(e){this._methods.add(e)}release(e){this._methods.delete(e)}has(e){return this._methods.has(e)}},Xh=new Set;function Zh(e,t){let[n,r]=t,i=n?.shape;if(typeof i?.method?.value!=`string`)return;let a=i.method.value,o=e===`request`?`setRequestHandler`:`setNotificationHandler`;Xh.has(o)||(Xh.add(o),console.warn(`[ext-apps] ${o}(Schema, handler) is deprecated; use ${o}("${a}", { params: Schema.shape.params }, handler).`));let s=r;return[a,{params:i.params},e===`request`?(e,t)=>s({method:a,params:e},Qh(t)):e=>s({method:a,params:e})]}function Qh(e){return{signal:e.mcpReq.signal,requestId:e.mcpReq.id,sessionId:e.sessionId,_meta:e.mcpReq._meta,sendRequest:e.mcpReq.send,sendNotification:e.mcpReq.notify,authInfo:e.http?.authInfo}}var $h=`2026-01-26`,eg=class{eventTarget;eventSource;messageListener;constructor(e=window.parent,t){this.eventTarget=e,this.eventSource=t,this.messageListener=e=>{if(t&&e.source!==this.eventSource){console.debug(`Ignoring message from unknown source`,e);return}let n=Ql.safeParse(e.data);n.success?(console.debug(`Parsed message`,n.data),this.onmessage?.(n.data)):e.data?.jsonrpc===`2.0`?(console.error(`Failed to parse message`,n.error.message,e),this.onerror?.(Error(`Invalid JSON-RPC message received: `+n.error.message))):console.debug(`Ignoring non-JSON-RPC message`,n.error.message,e)}}async start(){window.addEventListener(`message`,this.messageListener)}async send(e,t){e.method!==`ui/notifications/tool-input-partial`&&console.debug(`Sending message`,e),this.eventTarget.postMessage(e,`*`)}async close(){window.removeEventListener(`message`,this.messageListener),this.onclose?.()}onclose;onerror;onmessage;sessionId;setProtocolVersion},tg=W([q(`light`),q(`dark`)]).describe(`Color theme preference for the host environment.`),ng=W([q(`inline`),q(`fullscreen`),q(`pip`)]).describe(`Display mode for UI presentation.`),rg=G(W([q(`--color-background-primary`),q(`--color-background-secondary`),q(`--color-background-tertiary`),q(`--color-background-inverse`),q(`--color-background-ghost`),q(`--color-background-info`),q(`--color-background-danger`),q(`--color-background-success`),q(`--color-background-warning`),q(`--color-background-disabled`),q(`--color-text-primary`),q(`--color-text-secondary`),q(`--color-text-tertiary`),q(`--color-text-inverse`),q(`--color-text-ghost`),q(`--color-text-info`),q(`--color-text-danger`),q(`--color-text-success`),q(`--color-text-warning`),q(`--color-text-disabled`),q(`--color-border-primary`),q(`--color-border-secondary`),q(`--color-border-tertiary`),q(`--color-border-inverse`),q(`--color-border-ghost`),q(`--color-border-info`),q(`--color-border-danger`),q(`--color-border-success`),q(`--color-border-warning`),q(`--color-border-disabled`),q(`--color-ring-primary`),q(`--color-ring-secondary`),q(`--color-ring-inverse`),q(`--color-ring-info`),q(`--color-ring-danger`),q(`--color-ring-success`),q(`--color-ring-warning`),q(`--font-sans`),q(`--font-mono`),q(`--font-weight-normal`),q(`--font-weight-medium`),q(`--font-weight-semibold`),q(`--font-weight-bold`),q(`--font-text-xs-size`),q(`--font-text-sm-size`),q(`--font-text-md-size`),q(`--font-text-lg-size`),q(`--font-heading-xs-size`),q(`--font-heading-sm-size`),q(`--font-heading-md-size`),q(`--font-heading-lg-size`),q(`--font-heading-xl-size`),q(`--font-heading-2xl-size`),q(`--font-heading-3xl-size`),q(`--font-text-xs-line-height`),q(`--font-text-sm-line-height`),q(`--font-text-md-line-height`),q(`--font-text-lg-line-height`),q(`--font-heading-xs-line-height`),q(`--font-heading-sm-line-height`),q(`--font-heading-md-line-height`),q(`--font-heading-lg-line-height`),q(`--font-heading-xl-line-height`),q(`--font-heading-2xl-line-height`),q(`--font-heading-3xl-line-height`),q(`--border-radius-xs`),q(`--border-radius-sm`),q(`--border-radius-md`),q(`--border-radius-lg`),q(`--border-radius-xl`),q(`--border-radius-full`),q(`--border-width-regular`),q(`--shadow-hairline`),q(`--shadow-sm`),q(`--shadow-md`),q(`--shadow-lg`)]).describe(`CSS variable keys available to MCP apps for theming.`).describe(`Style variables for theming MCP apps.
70
+
71
+ Individual style keys are optional - hosts may provide any subset of these values.
72
+ Values are strings containing CSS values (colors, sizes, font stacks, etc.).
73
+
74
+ Note: This type uses \`Record<K, string | undefined>\` rather than \`Partial<Record<K, string>>\`
75
+ for compatibility with Zod schema generation. Both are functionally equivalent for validation.`),W([L(),Dc()]).describe(`Style variables for theming MCP apps.
76
+
77
+ Individual style keys are optional - hosts may provide any subset of these values.
78
+ Values are strings containing CSS values (colors, sizes, font stacks, etc.).
79
+
80
+ Note: This type uses \`Record<K, string | undefined>\` rather than \`Partial<Record<K, string>>\`
81
+ for compatibility with Zod schema generation. Both are functionally equivalent for validation.`)).describe(`Style variables for theming MCP apps.
82
+
83
+ Individual style keys are optional - hosts may provide any subset of these values.
84
+ Values are strings containing CSS values (colors, sizes, font stacks, etc.).
85
+
86
+ Note: This type uses \`Record<K, string | undefined>\` rather than \`Partial<Record<K, string>>\`
87
+ for compatibility with Zod schema generation. Both are functionally equivalent for validation.`);H({method:q(`ui/open-link`),params:H({url:L().describe(`URL to open in the host's browser`)})});var ig=H({isError:z().optional().describe(`True if the host failed to open the URL (e.g., due to security policy).`)}).passthrough(),ag=H({isError:z().optional().describe(`True if the download failed (e.g., user cancelled or host denied).`)}).passthrough(),og=H({isError:z().optional().describe(`True if the host rejected or failed to deliver the message.`)}).passthrough();H({method:q(`ui/notifications/sandbox-proxy-ready`),params:H({})});var sg=H({connectDomains:V(L()).optional().describe(`Origins for network requests (fetch/XHR/WebSocket).
88
+
89
+ - Maps to CSP \`connect-src\` directive
90
+ - Empty or omitted → no network connections (secure default)`),resourceDomains:V(L()).optional().describe("Origins for static resources (images, scripts, stylesheets, fonts, media).\n\n- Maps to CSP `img-src`, `script-src`, `style-src`, `font-src`, `media-src` directives\n- Wildcard subdomains supported: `https://*.example.com`\n- Empty or omitted → no network resources (secure default)"),frameDomains:V(L()).optional().describe("Origins for nested iframes.\n\n- Maps to CSP `frame-src` directive\n- Empty or omitted → no nested iframes allowed (`frame-src 'none'`)"),baseUriDomains:V(L()).optional().describe("Allowed base URIs for the document.\n\n- Maps to CSP `base-uri` directive\n- Empty or omitted → only same origin allowed (`base-uri 'self'`)")}),cg=H({camera:H({}).optional().describe(`Request camera access.
91
+
92
+ Maps to Permission Policy \`camera\` feature.`),microphone:H({}).optional().describe(`Request microphone access.
93
+
94
+ Maps to Permission Policy \`microphone\` feature.`),geolocation:H({}).optional().describe(`Request geolocation access.
95
+
96
+ Maps to Permission Policy \`geolocation\` feature.`),clipboardWrite:H({}).optional().describe(`Request clipboard write access.
97
+
98
+ Maps to Permission Policy \`clipboard-write\` feature.`)});H({method:q(`ui/notifications/size-changed`),params:H({width:R().optional().describe(`New width in pixels.`),height:R().optional().describe(`New height in pixels.`)})});var lg=H({method:q(`ui/notifications/tool-input`),params:H({arguments:G(L(),B().describe(`Complete tool call arguments as key-value pairs.`)).optional().describe(`Complete tool call arguments as key-value pairs.`)})}),ug=H({method:q(`ui/notifications/tool-input-partial`),params:H({arguments:G(L(),B().describe(`Partial tool call arguments (incomplete, may change).`)).optional().describe(`Partial tool call arguments (incomplete, may change).`)})}),dg=H({method:q(`ui/notifications/tool-cancelled`),params:H({reason:L().optional().describe(`Optional reason for the cancellation (e.g., "user action", "timeout").`)})}),fg=H({fonts:L().optional()}),pg=H({variables:rg.optional().describe(`CSS variables for theming the app.`),css:fg.optional().describe(`CSS blocks that apps can inject.`)}),mg=H({method:q(`ui/resource-teardown`),params:H({})}),hg=G(L(),B()),gg=H({text:H({}).optional().describe(`Host supports text content blocks.`),image:H({}).optional().describe(`Host supports image content blocks.`),audio:H({}).optional().describe(`Host supports audio content blocks.`),resource:H({}).optional().describe(`Host supports resource content blocks.`),resourceLink:H({}).optional().describe(`Host supports resource link content blocks.`),structuredContent:H({}).optional().describe(`Host supports structured content.`)});H({method:q(`ui/notifications/request-teardown`),params:H({}).optional()});var _g=H({experimental:G(L(),G(L(),jc()).describe(`Experimental features keyed by identifier.`)).optional().describe(`Experimental features keyed by identifier.`),openLinks:H({}).optional().describe(`Host supports opening external URLs.`),downloadFile:H({}).optional().describe(`Host supports file downloads via ui/download-file.`),serverTools:H({listChanged:z().optional().describe(`Host supports tools/list_changed notifications.`)}).optional().describe(`Host can proxy tool calls to the MCP server.`),serverResources:H({listChanged:z().optional().describe(`Host supports resources/list_changed notifications.`)}).optional().describe(`Host can proxy resource reads to the MCP server.`),logging:H({}).optional().describe(`Host accepts log messages.`),sandbox:H({permissions:cg.optional().describe(`Permissions granted by the host (camera, microphone, geolocation).`),csp:sg.optional().describe(`CSP domains approved by the host.`)}).optional().describe(`Sandbox configuration applied by the host.`),updateModelContext:gg.optional().describe(`Host accepts context updates (ui/update-model-context) to be included in the model's context for future turns.`),message:gg.optional().describe(`Host supports receiving content messages (ui/message) from the view.`),sampling:H({tools:H({}).optional().describe("Host supports tool use via `tools` and `toolChoice` parameters.")}).optional().describe("Host supports LLM sampling (sampling/createMessage) from the view.\nMirrors the MCP `ClientCapabilities.sampling` shape so hosts can pass it through.")}),vg=H({experimental:G(L(),G(L(),jc()).describe(`Experimental features keyed by identifier.`)).optional().describe(`Experimental features keyed by identifier.`),tools:H({listChanged:z().optional().describe(`App supports tools/list_changed notifications.`)}).optional().describe(`App exposes MCP-style tools that the host can call.`),availableDisplayModes:V(ng).optional().describe(`Display modes the app supports.`)});H({method:q(`ui/notifications/initialized`),params:H({}).optional()}),H({csp:sg.optional().describe(`Content Security Policy configuration for UI resources.`),permissions:cg.optional().describe(`Sandbox permissions requested by the UI resource.`),domain:L().optional().describe(`Dedicated origin for view sandbox.
99
+
100
+ Useful when views need stable, dedicated origins for OAuth callbacks, CORS policies, or API key allowlists.
101
+
102
+ **Host-dependent:** The format and validation rules for this field are determined by each host. Servers MUST consult host-specific documentation for the expected domain format. Common patterns include:
103
+ - Hash-based subdomains (e.g., \`{hash}.claudemcpcontent.com\`)
104
+ - URL-derived subdomains (e.g., \`www-example-com.oaiusercontent.com\`)
105
+
106
+ If omitted, host uses default sandbox origin (typically per-conversation).`),prefersBorder:z().optional().describe(`Visual boundary preference - true if view prefers a visible border.
107
+
108
+ Boolean requesting whether a visible border and background is provided by the host. Specifying an explicit value for this is recommended because hosts' defaults may vary.
109
+
110
+ - \`true\`: request visible border + background
111
+ - \`false\`: request no visible border + background
112
+ - omitted: host decides border`)}),H({method:q(`ui/request-display-mode`),params:H({mode:ng.describe(`The display mode being requested.`)})});var yg=H({mode:ng.describe(`The display mode that was actually set. May differ from requested if not supported.`)}).passthrough(),bg=W([q(`model`),q(`app`)]).describe(`Tool visibility scope - who can access the tool.`);H({resourceUri:L().optional(),visibility:V(bg).optional().describe(`Who can access this tool. Default: ["model", "app"]
113
+ - "model": Tool visible to and callable by the agent
114
+ - "app": Tool callable by the app from this server only`),csp:Pc().optional(),permissions:Pc().optional()}),H({mimeTypes:V(L()).optional().describe('Array of supported MIME types for UI resources.\nMust include `"text/html;profile=mcp-app"` for MCP Apps support.')}),H({method:q(`ui/download-file`),params:H({contents:V(W([dd,fd])).describe(`Resource contents to download — embedded (inline data) or linked (host fetches). Uses standard MCP resource types.`)})}),H({method:q(`ui/message`),params:H({role:q(`user`).describe(`Message role, currently only "user" is supported.`),content:V(pd).describe(`Message content blocks (text, image, etc.).`)})}),H({method:q(`ui/notifications/sandbox-resource-ready`),params:H({html:L().describe(`HTML content to load into the inner iframe.`),sandbox:L().optional().describe(`Optional override for the inner iframe's sandbox attribute.`),csp:sg.optional().describe(`CSP configuration from resource metadata.`),permissions:cg.optional().describe(`Sandbox permissions from resource metadata.`)})});var xg=H({method:q(`ui/notifications/tool-result`),params:Sd.describe(`Standard MCP tool execution result.`)}),Sg=H({toolInfo:H({id:ql.optional().describe(`JSON-RPC id of the tools/call request.`),tool:yd.describe(`Tool definition including name, inputSchema, etc.`)}).optional().describe(`Metadata of the tool call that instantiated this App.`),theme:tg.optional().describe(`Current color theme preference.`),styles:pg.optional().describe(`Style configuration for theming the app.`),displayMode:ng.optional().describe(`How the UI is currently displayed.`),availableDisplayModes:V(ng).optional().describe(`Display modes the host supports.`),containerDimensions:W([H({height:R().describe(`Fixed container height in pixels.`)}),H({maxHeight:W([R(),Dc()]).optional().describe(`Maximum container height in pixels.`)})]).and(W([H({width:R().describe(`Fixed container width in pixels.`)}),H({maxWidth:W([R(),Dc()]).optional().describe(`Maximum container width in pixels.`)})])).optional().describe(`Container dimensions. Represents the dimensions of the iframe or other
115
+ container holding the app. Specify either width or maxWidth, and either height or maxHeight.`),locale:L().optional().describe(`User's language and region preference in BCP 47 format.`),timeZone:L().optional().describe(`User's timezone in IANA format.`),userAgent:L().optional().describe(`Host application identifier.`),platform:W([q(`web`),q(`desktop`),q(`mobile`)]).optional().describe(`Platform type for responsive design decisions.`),deviceCapabilities:H({touch:z().optional().describe(`Whether the device supports touch input.`),hover:z().optional().describe(`Whether the device supports hover interactions.`)}).optional().describe(`Device input capabilities.`),safeAreaInsets:H({top:R().describe(`Top safe area inset in pixels.`),right:R().describe(`Right safe area inset in pixels.`),bottom:R().describe(`Bottom safe area inset in pixels.`),left:R().describe(`Left safe area inset in pixels.`)}).optional().describe(`Mobile safe area boundaries in pixels.`)}).passthrough(),Cg=H({method:q(`ui/notifications/host-context-changed`),params:Sg.describe(`Partial context update containing only changed fields.`)});H({method:q(`ui/update-model-context`),params:H({content:V(pd).optional().describe(`Context content blocks (text, image, etc.).`),structuredContent:G(L(),B().describe(`Structured content for machine-readable context data.`)).optional().describe(`Structured content for machine-readable context data.`)})}),H({method:q(`ui/initialize`),params:H({appInfo:ou.describe(`App identification (name and version).`),appCapabilities:vg.describe(`Features and capabilities this app provides.`),protocolVersion:L().describe(`Protocol version this app supports.`)})});var wg=H({protocolVersion:L().describe(`Negotiated protocol version string (e.g., "2025-11-21").`),hostInfo:ou.describe(`Host application identification and version.`),hostCapabilities:_g.describe(`Features and capabilities provided by the host.`),hostContext:Sg.describe(`Rich context about the host environment.`)}).passthrough(),Tg={target:`draft-2020-12`};async function Eg(e,t){let n=e[`~standard`];if(n.jsonSchema)return n.jsonSchema[t](Tg);throw Error(`Schema (vendor: ${n.vendor}) does not implement Standard JSON Schema (~standard.jsonSchema). Use a library that does (zod v4, ArkType, Valibot) or wrap your schema accordingly.`)}async function Dg(e,t,n=``){let r=await e[`~standard`].validate(t);if(r.issues){let e=r.issues.map(e=>{let t=e.path?.map(e=>typeof e==`object`?e.key:e).join(`.`);return t?`${t}: ${e.message}`:e.message}).join(`; `);throw Error(n+e)}return r.value}function Og(e,t){let n={...e,...t};return t.experimental!==void 0&&(n.experimental={...e.experimental,...t.experimental}),t.tools!==void 0&&(n.tools={...e.tools,...t.tools}),n}var kg=class e extends Ch{_appInfo;_appCapabilities;options;_hostCapabilities;_hostInfo;_hostContext;_registeredTools={};_initializedSent=!1;_registeredEvents=new Set;_events=new Jh;_methods=new Yh;setRequestHandler=(...e)=>{let[t,...n]=Zh(`request`,e)??e;this._methods.claim(t,`setRequestHandler`),super.setRequestHandler.call(this,t,...n)};setNotificationHandler=(...e)=>{let[t,...n]=Zh(`notification`,e)??e;this._methods.claim(t,`setNotificationHandler`),super.setNotificationHandler.call(this,t,...n)};removeRequestHandler=e=>{this._methods.release(e),super.removeRequestHandler(e)};removeNotificationHandler=e=>{this._methods.release(e),super.removeNotificationHandler(e)};replaceRequestHandler=(e,...t)=>{this._methods.replace(e),super.setRequestHandler.call(this,e,...t)};_assertInitialized(e){if(this._initializedSent)return;let t=`[ext-apps] App.${e}() called before connect() completed the ui/initialize handshake. Await app.connect() before calling this method, or move data loading to an ontoolresult handler.`;if(this.options?.strict)throw Error(t);console.warn(`${t}. This will throw in a future release.`)}eventSchemas={toolinput:lg,toolinputpartial:ug,toolresult:xg,toolcancelled:dg,hostcontextchanged:Cg};static ONE_SHOT_EVENTS=new Set([`toolinput`,`toolinputpartial`,`toolresult`,`toolcancelled`]);_everHadListener=new Set;_assertHandlerTiming(t){if(!e.ONE_SHOT_EVENTS.has(t)||this._everHadListener.has(t)||(this._everHadListener.add(t),!this._initializedSent))return;let n=`[ext-apps] "${String(t)}" handler registered after connect() completed the ui/initialize handshake. The host may have already sent this notification. Register handlers before calling app.connect().`;if(this.options?.strict)throw Error(n);console.warn(n)}setEventHandler(e,t){t&&this._assertHandlerTiming(e),this._ensureEventSlot(e),this._events.setHandler(e,t)}addEventListener(e,t){this._assertHandlerTiming(e),this._ensureEventSlot(e),this._events.addEventListener(e,t)}removeEventListener(e,t){this._events.removeEventListener(e,t)}_ensureEventSlot(e){if(this._registeredEvents.has(e))return;let t=this.eventSchemas[e];if(!t)throw Error(`Unknown event: ${String(e)}`);this.setNotificationHandler(t.shape.method.value,{params:t.shape.params},t=>{let n=t;e===`hostcontextchanged`&&(this._hostContext={...this._hostContext,...n}),this._events.dispatch(e,n)}),this._registeredEvents.add(e)}getEventHandler(e){return this._events.getHandler(e)}warnIfRequestHandlerReplaced(e,t,n){t&&n&&console.warn(`[MCP Apps] ${e} handler replaced. Previous handler will no longer be called.`)}constructor(e,t={},n={autoResize:!0}){super(n),this._appInfo=e,this._appCapabilities=t,this.options=n,this._methods.replace(`notifications/cancelled`),this._methods.replace(`notifications/progress`),!n.allowUnsafeEval&&dt({jitless:!0}),this.replaceRequestHandler(`ping`,e=>(console.log(`Received ping:`,e.params),{})),this.setEventHandler(`hostcontextchanged`,void 0)}buildContext(e){return e}registerAppCapabilities(e){if(this.transport)throw Error(`Cannot register capabilities after transport is established`);this._appCapabilities=Og(this._appCapabilities,e)}registerTool(e,t,n){if(this._registeredTools[e])throw Error(`Tool ${e} is already registered`);let r=this,i=()=>{r._initializedSent&&r._appCapabilities.tools?.listChanged&&r.sendToolListChanged()},a=t.inputSchema!==void 0,o={title:t.title,description:t.description,inputSchema:t.inputSchema,outputSchema:t.outputSchema,annotations:t.annotations,_meta:t._meta,enabled:!0,enable(){this.enabled=!0,i()},disable(){this.enabled=!1,i()},update(e){Object.assign(this,e),i()},remove(){r._registeredTools[e]===o&&(delete r._registeredTools[e],i())},handler:async(t,r)=>{if(!o.enabled)throw Error(`Tool ${e} is disabled`);let i;if(a){let a=o.inputSchema;i=await n(a?await Dg(a,t??{},`Invalid input for tool ${e}: `):t??{},r)}else i=await n(r);return o.outputSchema&&!i.isError&&(i.structuredContent=await Dg(o.outputSchema,i.structuredContent,`Invalid output for tool ${e}: `)),i}};return this._registeredTools[e]=o,!this._appCapabilities.tools&&!this.transport&&this.registerAppCapabilities({tools:{listChanged:!0}}),this.ensureToolHandlersInitialized(),i(),o}_toolHandlersInitialized=!1;ensureToolHandlersInitialized(){this._toolHandlersInitialized||(this._toolHandlersInitialized=!0,this.oncalltool=async(e,t)=>{let n=this._registeredTools[e.name];if(!n)throw Error(`Tool ${e.name} not found`);return n.handler(e.arguments,t)},this.onlisttools=async(e,t)=>({tools:await Promise.all(Object.entries(this._registeredTools).filter(([e,t])=>t.enabled).map(async([e,t])=>{let n={name:e,title:t.title,description:t.description,inputSchema:t.inputSchema?await Eg(t.inputSchema,`input`):{type:`object`,properties:{}}};return t.outputSchema&&(n.outputSchema=await Eg(t.outputSchema,`output`)),t.annotations&&(n.annotations=t.annotations),t._meta&&(n._meta=t._meta),n}))}))}async sendToolListChanged(e={}){this._assertInitialized(`sendToolListChanged`),await this.notification({method:`notifications/tools/list_changed`,params:e})}getHostCapabilities(){return this._hostCapabilities}getHostVersion(){return this._hostInfo}getHostContext(){return this._hostContext}get ontoolinput(){return this.getEventHandler(`toolinput`)}set ontoolinput(e){this.setEventHandler(`toolinput`,e)}get ontoolinputpartial(){return this.getEventHandler(`toolinputpartial`)}set ontoolinputpartial(e){this.setEventHandler(`toolinputpartial`,e)}get ontoolresult(){return this.getEventHandler(`toolresult`)}set ontoolresult(e){this.setEventHandler(`toolresult`,e)}get ontoolcancelled(){return this.getEventHandler(`toolcancelled`)}set ontoolcancelled(e){this.setEventHandler(`toolcancelled`,e)}get onhostcontextchanged(){return this.getEventHandler(`hostcontextchanged`)}set onhostcontextchanged(e){this.setEventHandler(`hostcontextchanged`,e)}_onteardown;get onteardown(){return this._onteardown}set onteardown(e){this.warnIfRequestHandlerReplaced(`onteardown`,this._onteardown,e),this._onteardown=e,this.replaceRequestHandler(`ui/resource-teardown`,{params:mg.shape.params,result:hg},(e,t)=>{if(!this._onteardown)throw Error(`No onteardown handler set`);return this._onteardown(e,t)})}_oncalltool;get oncalltool(){return this._oncalltool}set oncalltool(e){this.warnIfRequestHandlerReplaced(`oncalltool`,this._oncalltool,e),this._oncalltool=e,this.replaceRequestHandler(`tools/call`,(e,t)=>{if(!this._oncalltool)throw Error(`No oncalltool handler set`);return this._oncalltool(e.params,t)})}_onlisttools;get onlisttools(){return this._onlisttools}set onlisttools(e){this.warnIfRequestHandlerReplaced(`onlisttools`,this._onlisttools,e),this._onlisttools=e,this.replaceRequestHandler(`tools/list`,(e,t)=>{if(!this._onlisttools)throw Error(`No onlisttools handler set`);return this._onlisttools(e.params,t)})}assertCapabilityForMethod(e){if(e===`sampling/createMessage`&&!this._hostCapabilities?.sampling)throw Error(`Host does not support sampling (required for ${e})`)}assertRequestHandlerCapability(e){switch(e){case`tools/call`:case`tools/list`:if(!this._appCapabilities.tools)throw Error(`Client does not support tool capability (required for ${e})`);return;default:return}}assertNotificationCapability(e){}async callServerTool(e,t){if(this._assertInitialized(`callServerTool`),typeof e==`string`)throw Error(`callServerTool() expects an object as its first argument, but received a string ("${e}"). Did you mean: callServerTool({ name: "${e}", arguments: { ... } })?`);return await this.request({method:`tools/call`,params:e},{onprogress:()=>{},resetTimeoutOnProgress:!0,...t})}async readServerResource(e,t){return this._assertInitialized(`readServerResource`),await this.request({method:`resources/read`,params:e},t)}async listServerResources(e,t){return this._assertInitialized(`listServerResources`),await this.request({method:`resources/list`,params:e},t)}async createSamplingMessage(e,t){return this._assertInitialized(`createSamplingMessage`),await this.request({method:`sampling/createMessage`,params:e},t)}sendMessage(e,t){return this._assertInitialized(`sendMessage`),this.request({method:`ui/message`,params:e},og,t)}sendLog(e){return this.notification({method:`notifications/message`,params:e})}updateModelContext(e,t){return this._assertInitialized(`updateModelContext`),this.request({method:`ui/update-model-context`,params:e},eu,t)}openLink(e,t){return this._assertInitialized(`openLink`),this.request({method:`ui/open-link`,params:e},ig,t)}sendOpenLink=this.openLink;downloadFile(e,t){return this._assertInitialized(`downloadFile`),this.request({method:`ui/download-file`,params:e},ag,t)}requestTeardown(e={}){return this.notification({method:`ui/notifications/request-teardown`,params:e})}requestDisplayMode(e,t){return this._assertInitialized(`requestDisplayMode`),this.request({method:`ui/request-display-mode`,params:e},yg,t)}sendSizeChanged(e){return this.notification({method:`ui/notifications/size-changed`,params:e})}setupSizeChangedNotifications(){let e=!1,t=0,n=0,r=()=>{e||(e=!0,requestAnimationFrame(()=>{e=!1;let r=document.documentElement,i=r.style.height;r.style.height=`max-content`;let a=Math.ceil(r.getBoundingClientRect().height);r.style.height=i;let o=Math.ceil(window.innerWidth);(o!==t||a!==n)&&(t=o,n=a,this.sendSizeChanged({width:o,height:a}))}))};r();let i=new ResizeObserver(r);return i.observe(document.documentElement),i.observe(document.body),()=>i.disconnect()}async connect(e=new eg(window.parent,window.parent),t){if(this.transport)throw Error(`App is already connected. Call close() before connecting again.`);this._initializedSent=!1;try{await super.connect(e);let n=await this.request({method:`ui/initialize`,params:{appCapabilities:this._appCapabilities,appInfo:this._appInfo,protocolVersion:$h}},wg,t);if(n===void 0)throw Error(`Server sent invalid initialize result: ${n}`);this._hostCapabilities=n.hostCapabilities,this._hostInfo=n.hostInfo,this._hostContext=n.hostContext,await this.notification({method:`ui/notifications/initialized`}),this._initializedSent=!0,this.options?.autoResize&&this.setupSizeChangedNotifications()}catch(e){throw this.close(),e}}},Ag=e=>e?.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase();function jg(e,t,n=[]){if(t==null)throw Error(`[lucide]: iconNode is required when icon name is used`);return{name:Ag(e),size:24,node:t,...n.length>0?{aliases:n}:{}}}var Mg=e=>{let t=``,n=!1;for(let r of e){if(r===`-`||r===`_`||r<=` `){n=t.length>0;continue}t.length===0?t+=r.toLowerCase():t+=n?r.toUpperCase():r,n=!1}return t},Ng=e=>{let t=Mg(e);return t.charAt(0).toUpperCase()+t.slice(1)},Pg=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),Fg={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`};function Ig(e){return e!=null}function Lg(e,t={}){let n=t.attributeNames??{},r=e=>n[e]??e,i=e.size??e.width??Fg.width,a=e.size??e.height??Fg.height,o=e.aliases?.filter(e=>typeof e==`string`&&e.trim()!==``).map(e=>`lucide-${e}`)??[],s=[...e.name?[`lucide-${e.name}`]:[],...o],c=t.className?.split(` `).filter(Boolean)??[],l=t.includeDefaultClasses===!1?Pg(...c):Pg(`lucide`,...s,...c),u=t.absoluteStrokeWidth?Number(t.strokeWidth??Fg[`stroke-width`])*Number(e.size??e.width??Fg.width)/Number(t.size??t.width??Fg.width):t.strokeWidth??Fg[`stroke-width`];return[`svg`,{...Object.entries(Fg).reduce((e,[t,n])=>(e[r(t)]=n,e),{}),...`color`in t&&t.color&&{[r(`stroke`)]:t.color},...`size`in t&&Ig(t.size)&&{[r(`width`)]:t.size,[r(`height`)]:t.size},...`width`in t&&Ig(t.width)&&{[r(`width`)]:t.width},...`height`in t&&Ig(t.height)&&{[r(`height`)]:t.height},[r(`stroke-width`)]:u,...l&&{[r(`class`)]:l},[r(`viewBox`)]:`0 0 ${i} ${a}`,...t.hasA11yProp===!1?{[r(`aria-hidden`)]:`true`}:{},...`attributes`in t&&t.attributes},e.node.map(e=>{let[n,i,a]=e,o=t.nonScalingStroke?{[r(`vector-effect`)]:`non-scaling-stroke`,...i}:i;return a?[n,o,a]:[n,o]})]}function Rg(e,t={}){return Lg(e,{...t,attributeNames:{...t.attributeNames,class:`className`,"stroke-width":`strokeWidth`,"stroke-linecap":`strokeLinecap`,"stroke-linejoin":`strokeLinejoin`,"vector-effect":`vectorEffect`}})}var zg=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},Bg=(0,y.createContext)({}),Vg=()=>(0,y.useContext)(Bg),Hg=(0,y.forwardRef)(({color:e,size:t,width:n,height:r,strokeWidth:i,absoluteStrokeWidth:a,nonScalingStroke:o,className:s=``,children:c,iconNode:l=[],icon:u={node:l,aliases:[],size:24},...d},f)=>{let{size:p=24,strokeWidth:m=2,absoluteStrokeWidth:h=!1,nonScalingStroke:g=!1,color:_=`currentColor`,className:v=``}=Vg()??{},b=!!c||zg(d),[x,S,C=[]]=Rg(u,{color:e??_,width:n??t??p,height:r??t??p,strokeWidth:i??m,absoluteStrokeWidth:a??h,nonScalingStroke:o??g,className:Pg(v,s),hasA11yProp:b,attributes:d});return(0,y.createElement)(x,{ref:f,...S},[...C.map(([e,t])=>(0,y.createElement)(e,t)),...Array.isArray(c)?c:[c]])});function Y(e,t=[],n=[]){let r=typeof e==`string`?jg(e,t,n):e,i=(0,y.forwardRef)(({className:e,...t},n)=>(0,y.createElement)(Hg,{ref:n,icon:r,className:e,...t}));return r.name&&(i.displayName=Ng(r.name)),i}var Ug={name:`app-window`,size:24,node:[[`rect`,{x:`2`,y:`4`,width:`20`,height:`16`,rx:`2`,key:`izxlao`}],[`path`,{d:`M10 4v4`,key:`pp8u80`}],[`path`,{d:`M2 8h20`,key:`d11cs7`}],[`path`,{d:`M6 4v4`,key:`1svtjw`}]]};Ug.node;var Wg=Y(Ug),Gg={name:`arrow-down`,size:24,node:[[`path`,{d:`M12 5v14`,key:`s699le`}],[`path`,{d:`m19 12-7 7-7-7`,key:`1idqje`}]]};Gg.node;var Kg=Y(Gg),qg={name:`arrow-left`,size:24,node:[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]};qg.node;var Jg=Y(qg),Yg={name:`arrow-right`,size:24,node:[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]};Yg.node;var Xg=Y(Yg),Zg={name:`arrow-up`,size:24,node:[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]};Zg.node;var Qg=Y(Zg),$g={name:`bell-ring`,size:24,node:[[`path`,{d:`M10.268 21a2 2 0 0 0 3.464 0`,key:`vwvbt9`}],[`path`,{d:`M22 8c0-2.3-.8-4.3-2-6`,key:`5bb3ad`}],[`path`,{d:`M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326`,key:`11g9vi`}],[`path`,{d:`M4 2C2.8 3.7 2 5.7 2 8`,key:`tap9e0`}]]};$g.node;var e_=Y($g),t_={name:`bell`,size:24,node:[[`path`,{d:`M10.268 21a2 2 0 0 0 3.464 0`,key:`vwvbt9`}],[`path`,{d:`M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326`,key:`11g9vi`}]]};t_.node;var n_=Y(t_),r_={name:`bot`,size:24,node:[[`path`,{d:`M12 8V4H8`,key:`hb8ula`}],[`rect`,{width:`16`,height:`12`,x:`4`,y:`8`,rx:`2`,key:`enze0r`}],[`path`,{d:`M2 14h2`,key:`vft8re`}],[`path`,{d:`M20 14h2`,key:`4cs60a`}],[`path`,{d:`M15 13v2`,key:`1xurst`}],[`path`,{d:`M9 13v2`,key:`rq6x2g`}]]};r_.node;var i_=Y(r_),a_={name:`camera`,size:24,node:[[`path`,{d:`M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z`,key:`18u6gg`}],[`circle`,{cx:`12`,cy:`13`,r:`3`,key:`1vg3eu`}]]};a_.node;var o_=Y(a_),s_={name:`check`,size:24,node:[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]};s_.node;var c_=Y(s_),l_={name:`circle-alert`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]],aliases:[`alert-circle`]};l_.node;var u_=Y(l_),d_={name:`copy`,size:24,node:[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]};d_.node;var f_=Y(d_),p_={name:`corner-down-left`,size:24,node:[[`path`,{d:`M20 4v7a4 4 0 0 1-4 4H4`,key:`6o5b7l`}],[`path`,{d:`m9 10-5 5 5 5`,key:`1kshq7`}]]};p_.node;var m_=Y(p_),h_={name:`database`,size:24,node:[[`ellipse`,{cx:`12`,cy:`5`,rx:`9`,ry:`3`,key:`msslwz`}],[`path`,{d:`M3 5V19A9 3 0 0 0 21 19V5`,key:`1wlel7`}],[`path`,{d:`M3 12A9 3 0 0 0 21 12`,key:`mv7ke4`}]]};h_.node;var g_=Y(h_),__={name:`download`,size:24,node:[[`path`,{d:`M12 15V3`,key:`m9g1x1`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`path`,{d:`m7 10 5 5 5-5`,key:`brsn70`}]]};__.node;var v_=Y(__),y_={name:`eraser`,size:24,node:[[`path`,{d:`M21 21H8a2 2 0 0 1-1.42-.587l-3.994-3.999a2 2 0 0 1 0-2.828l10-10a2 2 0 0 1 2.829 0l5.999 6a2 2 0 0 1 0 2.828L12.834 21`,key:`g5wo59`}],[`path`,{d:`m5.082 11.09 8.828 8.828`,key:`1wx5vj`}]]};y_.node;var b_=Y(y_),x_={name:`external-link`,size:24,node:[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]};x_.node;var S_=Y(x_),C_={name:`eye`,size:24,node:[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,key:`1nclc0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]};C_.node;var w_=Y(C_),T_={name:`file-headphone`,size:24,node:[[`path`,{d:`M4 6.835V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2h-.343`,key:`1vfytu`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M2 19a2 2 0 0 1 4 0v1a2 2 0 0 1-4 0v-4a6 6 0 0 1 12 0v4a2 2 0 0 1-4 0v-1a2 2 0 0 1 4 0`,key:`1etmh7`}]],aliases:[`file-audio`,`file-audio-2`]};T_.node;var E_=Y(T_),D_={name:`file-text`,size:24,node:[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 9H8`,key:`b1mrlr`}],[`path`,{d:`M16 13H8`,key:`t4e002`}],[`path`,{d:`M16 17H8`,key:`z1uh3a`}]]};D_.node;var O_=Y(D_),k_={name:`film`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M7 3v18`,key:`bbkbws`}],[`path`,{d:`M3 7.5h4`,key:`zfgn84`}],[`path`,{d:`M3 12h18`,key:`1i2n21`}],[`path`,{d:`M3 16.5h4`,key:`1230mu`}],[`path`,{d:`M17 3v18`,key:`in4fa5`}],[`path`,{d:`M17 7.5h4`,key:`myr1c1`}],[`path`,{d:`M17 16.5h4`,key:`go4c1d`}]]};k_.node;var A_=Y(k_),j_={name:`flag`,size:24,node:[[`path`,{d:`M4 22V4a1 1 0 0 1 .4-.8A6 6 0 0 1 8 2c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10a1 1 0 0 1-.4.8A6 6 0 0 1 16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528`,key:`1jaruq`}]]};j_.node;var M_=Y(j_),N_={name:`flashlight-off`,size:24,node:[[`path`,{d:`M11.652 6H18`,key:`voqkpr`}],[`path`,{d:`M12 13v1`,key:`176q98`}],[`path`,{d:`M16 16v4a2 2 0 0 1-2 2h-4a2 2 0 0 1-2-2v-8a4 4 0 0 0-.8-2.4l-.6-.8A3 3 0 0 1 6 7V6`,key:`dzyf92`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}],[`path`,{d:`M7.649 2H17a1 1 0 0 1 1 1v4a3 3 0 0 1-.6 1.8l-.6.8a4 4 0 0 0-.55 1.007`,key:`1hvcfn`}]]};N_.node;var P_=Y(N_),F_={name:`flashlight`,size:24,node:[[`path`,{d:`M12 13v1`,key:`176q98`}],[`path`,{d:`M17 2a1 1 0 0 1 1 1v4a3 3 0 0 1-.6 1.8l-.6.8A4 4 0 0 0 16 12v8a2 2 0 0 1-2 2H10a2 2 0 0 1-2-2v-8a4 4 0 0 0-.8-2.4l-.6-.8A3 3 0 0 1 6 7V3a1 1 0 0 1 1-1z`,key:`17vh7j`}],[`path`,{d:`M6 6h12`,key:`n6hhss`}]]};F_.node;var I_=Y(F_),L_={name:`grip-vertical`,size:24,node:[[`circle`,{cx:`9`,cy:`12`,r:`1`,key:`1vctgf`}],[`circle`,{cx:`9`,cy:`5`,r:`1`,key:`hp0tcf`}],[`circle`,{cx:`9`,cy:`19`,r:`1`,key:`fkjjf6`}],[`circle`,{cx:`15`,cy:`12`,r:`1`,key:`1tmaij`}],[`circle`,{cx:`15`,cy:`5`,r:`1`,key:`19l28e`}],[`circle`,{cx:`15`,cy:`19`,r:`1`,key:`f4zoj3`}]]};L_.node;var R_=Y(L_),z_={name:`image-plus`,size:24,node:[[`path`,{d:`M16 5h6`,key:`1vod17`}],[`path`,{d:`M19 2v6`,key:`4bpg5p`}],[`path`,{d:`M21 11.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7.5`,key:`1ue2ih`}],[`path`,{d:`m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21`,key:`1xmnt7`}],[`circle`,{cx:`9`,cy:`9`,r:`2`,key:`af1f0g`}]]};z_.node;var B_=Y(z_),V_={name:`image-up`,size:24,node:[[`path`,{d:`M10.3 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v10l-3.1-3.1a2 2 0 0 0-2.814.014L6 21`,key:`9csbqa`}],[`path`,{d:`m14 19.5 3-3 3 3`,key:`9vmjn0`}],[`path`,{d:`M17 22v-5.5`,key:`1aa6fl`}],[`circle`,{cx:`9`,cy:`9`,r:`2`,key:`af1f0g`}]]};V_.node;var H_=Y(V_),U_={name:`image`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}],[`circle`,{cx:`9`,cy:`9`,r:`2`,key:`af1f0g`}],[`path`,{d:`m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21`,key:`1xmnt7`}]]};U_.node;var W_=Y(U_),G_={name:`layout-dashboard`,size:24,node:[[`rect`,{width:`7`,height:`9`,x:`3`,y:`3`,rx:`1`,key:`10lvy0`}],[`rect`,{width:`7`,height:`5`,x:`14`,y:`3`,rx:`1`,key:`16une8`}],[`rect`,{width:`7`,height:`9`,x:`14`,y:`12`,rx:`1`,key:`1hutg5`}],[`rect`,{width:`7`,height:`5`,x:`3`,y:`16`,rx:`1`,key:`ldoo1y`}]]};G_.node;var K_=Y(G_),q_={name:`link-2`,size:24,node:[[`path`,{d:`M9 17H7A5 5 0 0 1 7 7h2`,key:`8i5ue5`}],[`path`,{d:`M15 7h2a5 5 0 1 1 0 10h-2`,key:`1b9ql8`}],[`line`,{x1:`8`,x2:`16`,y1:`12`,y2:`12`,key:`1jonct`}]]};q_.node;var J_=Y(q_),Y_={name:`list-checks`,size:24,node:[[`path`,{d:`M13 5h8`,key:`a7qcls`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}],[`path`,{d:`m3 17 2 2 4-4`,key:`1jhpwq`}],[`path`,{d:`m3 7 2 2 4-4`,key:`1obspn`}]]};Y_.node;var X_=Y(Y_),Z_={name:`locate-fixed`,size:24,node:[[`line`,{x1:`2`,x2:`5`,y1:`12`,y2:`12`,key:`bvdh0s`}],[`line`,{x1:`19`,x2:`22`,y1:`12`,y2:`12`,key:`1tbv5k`}],[`line`,{x1:`12`,x2:`12`,y1:`2`,y2:`5`,key:`11lu5j`}],[`line`,{x1:`12`,x2:`12`,y1:`19`,y2:`22`,key:`x3vr5v`}],[`circle`,{cx:`12`,cy:`12`,r:`7`,key:`fim9np`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]};Z_.node;var Q_=Y(Z_),$_={name:`lock-keyhole`,size:24,node:[[`circle`,{cx:`12`,cy:`16`,r:`1`,key:`1au0dj`}],[`rect`,{x:`3`,y:`10`,width:`18`,height:`12`,rx:`2`,key:`6s8ecr`}],[`path`,{d:`M7 10V7a5 5 0 0 1 10 0v3`,key:`1pqi11`}]]};$_.node;var ev=Y($_),tv={name:`mail`,size:24,node:[[`path`,{d:`m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7`,key:`132q7q`}],[`rect`,{x:`2`,y:`4`,width:`20`,height:`16`,rx:`2`,key:`izxlao`}]]};tv.node;var nv=Y(tv),rv={name:`map-pin`,size:24,node:[[`path`,{d:`M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0`,key:`1r0f0z`}],[`circle`,{cx:`12`,cy:`10`,r:`3`,key:`ilqhr7`}]]};rv.node;var iv=Y(rv),av={name:`maximize-2`,size:24,node:[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`m21 3-7 7`,key:`1l2asr`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M9 21H3v-6`,key:`wtvkvv`}]]};av.node;var ov=Y(av),sv={name:`mic`,size:24,node:[[`path`,{d:`M12 19v3`,key:`npa21l`}],[`path`,{d:`M19 10v2a7 7 0 0 1-14 0v-2`,key:`1vc78b`}],[`rect`,{x:`9`,y:`2`,width:`6`,height:`13`,rx:`3`,key:`s6n7sd`}]]};sv.node;var cv=Y(sv),lv={name:`minimize-2`,size:24,node:[[`path`,{d:`m14 10 7-7`,key:`oa77jy`}],[`path`,{d:`M20 10h-6V4`,key:`mjg0md`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M4 14h6v6`,key:`rmj7iw`}]]};lv.node;var uv=Y(lv),dv={name:`minus`,size:24,node:[[`path`,{d:`M5 12h14`,key:`1ays0h`}]]};dv.node;var fv=Y(dv),pv={name:`paperclip`,size:24,node:[[`path`,{d:`m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551`,key:`1miecu`}]]};pv.node;var mv=Y(pv),hv={name:`pen-line`,size:24,node:[[`path`,{d:`M13 21h8`,key:`1jsn5i`}],[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}]],aliases:[`edit-3`]};hv.node;var gv=Y(hv),_v={name:`pencil-line`,size:24,node:[[`path`,{d:`M13 21h8`,key:`1jsn5i`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}],[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}]]};_v.node;var vv=Y(_v),yv={name:`pencil`,size:24,node:[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}]]};yv.node;var bv=Y(yv),xv={name:`plus`,size:24,node:[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]};xv.node;var Sv=Y(xv),Cv={name:`refresh-cw`,size:24,node:[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]};Cv.node;var wv=Y(Cv),Tv={name:`rotate-ccw`,size:24,node:[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}]]};Tv.node;var Ev=Y(Tv),Dv={name:`scan-line`,size:24,node:[[`path`,{d:`M3 7V5a2 2 0 0 1 2-2h2`,key:`aa7l1z`}],[`path`,{d:`M17 3h2a2 2 0 0 1 2 2v2`,key:`4qcy5o`}],[`path`,{d:`M21 17v2a2 2 0 0 1-2 2h-2`,key:`6vwrx8`}],[`path`,{d:`M7 21H5a2 2 0 0 1-2-2v-2`,key:`ioqczr`}],[`path`,{d:`M7 12h10`,key:`b7w52i`}]]};Dv.node;var Ov=Y(Dv),kv={name:`scan`,size:24,node:[[`path`,{d:`M3 7V5a2 2 0 0 1 2-2h2`,key:`aa7l1z`}],[`path`,{d:`M17 3h2a2 2 0 0 1 2 2v2`,key:`4qcy5o`}],[`path`,{d:`M21 17v2a2 2 0 0 1-2 2h-2`,key:`6vwrx8`}],[`path`,{d:`M7 21H5a2 2 0 0 1-2-2v-2`,key:`ioqczr`}]]};kv.node;var Av=Y(kv),jv={name:`share-2`,size:24,node:[[`circle`,{cx:`18`,cy:`5`,r:`3`,key:`gq8acd`}],[`circle`,{cx:`6`,cy:`12`,r:`3`,key:`w7nqdw`}],[`circle`,{cx:`18`,cy:`19`,r:`3`,key:`1xt0gg`}],[`line`,{x1:`8.59`,x2:`15.42`,y1:`13.51`,y2:`17.49`,key:`47mynk`}],[`line`,{x1:`15.41`,x2:`8.59`,y1:`6.51`,y2:`10.49`,key:`1n3mei`}]]};jv.node;var Mv=Y(jv),Nv={name:`share`,size:24,node:[[`path`,{d:`M12 2v13`,key:`1km8f5`}],[`path`,{d:`m16 6-4-4-4 4`,key:`13yo43`}],[`path`,{d:`M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8`,key:`1b2hhj`}]]};Nv.node;var Pv=Y(Nv),Fv={name:`shield-check`,size:24,node:[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]};Fv.node;var Iv=Y(Fv),Lv={name:`sparkles`,size:24,node:[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`,key:`1s2grr`}],[`path`,{d:`M20 2v4`,key:`1rf3ol`}],[`path`,{d:`M22 4h-4`,key:`gwowj6`}],[`circle`,{cx:`4`,cy:`20`,r:`2`,key:`6kqj1y`}]],aliases:[`stars`]};Lv.node;var Rv=Y(Lv),zv={name:`square`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}]]};zv.node;var Bv=Y(zv),Vv={name:`switch-camera`,size:24,node:[[`path`,{d:`M11 19H4a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2h5`,key:`mtk2lu`}],[`path`,{d:`M13 5h7a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2h-5`,key:`120jsl`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}],[`path`,{d:`m18 22-3-3 3-3`,key:`kgdoj7`}],[`path`,{d:`m6 2 3 3-3 3`,key:`1fnbkv`}]]};Vv.node;var Hv=Y(Vv),Uv={name:`trash`,size:24,node:[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]],aliases:[`trash-2`]};Uv.node;var Wv=Y(Uv),Gv={name:`triangle-alert`,size:24,node:[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]],aliases:[`alert-triangle`]};Gv.node;var Kv=Y(Gv),qv={name:`undo-2`,size:24,node:[[`path`,{d:`M9 14 4 9l5-5`,key:`102s5s`}],[`path`,{d:`M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11`,key:`f3b9sd`}]]};qv.node;var Jv=Y(qv),Yv={name:`unplug`,size:24,node:[[`path`,{d:`m19 5 3-3`,key:`yk6iyv`}],[`path`,{d:`m2 22 3-3`,key:`19mgm9`}],[`path`,{d:`M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z`,key:`goz73y`}],[`path`,{d:`M7.5 13.5 10 11`,key:`7xgeeb`}],[`path`,{d:`M10.5 16.5 13 14`,key:`10btkg`}],[`path`,{d:`m12 6 6 6 2.3-2.3a2.4 2.4 0 0 0 0-3.4l-2.6-2.6a2.4 2.4 0 0 0-3.4 0Z`,key:`1snsnr`}]]};Yv.node;var Xv=Y(Yv),Zv={name:`video`,size:24,node:[[`path`,{d:`m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5`,key:`ftymec`}],[`rect`,{x:`2`,y:`6`,width:`14`,height:`12`,rx:`2`,key:`158x01`}]]};Zv.node;var Qv=Y(Zv),$v={name:`wand-sparkles`,size:24,node:[[`path`,{d:`m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72`,key:`ul74o6`}],[`path`,{d:`m14 7 3 3`,key:`1r5n42`}],[`path`,{d:`M5 6v4`,key:`ilb8ba`}],[`path`,{d:`M19 14v4`,key:`blhpug`}],[`path`,{d:`M10 2v2`,key:`7u0qdc`}],[`path`,{d:`M7 8H3`,key:`zfb6yr`}],[`path`,{d:`M21 16h-4`,key:`1cnmox`}],[`path`,{d:`M11 3H9`,key:`1obp7u`}]],aliases:[`wand-2`]};$v.node;var ey=Y($v),ty={name:`workflow`,size:24,node:[[`rect`,{width:`8`,height:`8`,x:`3`,y:`3`,rx:`2`,key:`by2w9f`}],[`path`,{d:`M7 11v4a2 2 0 0 0 2 2h4`,key:`xkn7yn`}],[`rect`,{width:`8`,height:`8`,x:`13`,y:`13`,rx:`2`,key:`1cgmvn`}]]};ty.node;var ny=Y(ty),ry={name:`x`,size:24,node:[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]};ry.node;var iy=Y(ry),ay,oy,sy,cy=o((()=>{ay={cobalt:`var(--engenty-cobalt, oklch(60% 0.23 262))`,amber:`var(--engenty-amber, oklch(82% 0.17 78))`,moss:`var(--engenty-moss, oklch(72% 0.22 145))`,rose:`var(--engenty-rose, oklch(64% 0.25 18))`,ember:`var(--engenty-ember, oklch(70% 0.21 42))`,teal:`var(--engenty-teal, oklch(74% 0.16 192))`,violet:`var(--engenty-violet, oklch(60% 0.25 300))`,magenta:`var(--engenty-magenta, oklch(65% 0.28 345))`,citron:`var(--engenty-citron, oklch(89% 0.2 118))`,slate:`var(--engenty-slate, oklch(66% 0.13 235))`},oy=[`round`,`drop`,`dome`,`flame`,`oval`],[...oy],sy={bean:`teal`,dome:`moss`,drop:`amber`,flame:`rose`,oval:`ember`,pebble:`slate`,round:`cobalt`,sprout:`citron`,tower:`violet`,wedge:`magenta`}}));function ly(e){return Math.max(...e.blobs.map(e=>e.r*Math.min(e.rx??1,e.ry??1)))}function uy(e){let t=new Float32Array(py*4);for(let n=0;n<py;n++){let r=e.blobs[n];if(!r){t[n*4]=1e4,t[n*4+1]=1e4,t[n*4+2]=0,t[n*4+3]=0;continue}t[n*4]=r.x,t[n*4+1]=r.y,t[n*4+2]=r.r*(r.rx??1),t[n*4+3]=r.r*(r.ry??1)}return t}function dy(e){let t=new Float32Array(my*4),n=new Float32Array(my*4);return e.extras?.forEach((e,r)=>{let i=r*4;switch(n[i]=hy[e.type],n[i+1]=e.alpha??1,e.type){case`ink-dot`:t.set([e.x,e.y,e.r,0],i);break;case`body-dot`:t.set([e.x,e.y,e.r,e.bob??0],i);break;case`arc`:t.set([e.cx,e.cy,e.r,e.half*Math.PI/180],i),n[i+2]=e.width,n[i+3]=+!!e.body;break;case`bar`:t.set([e.x,e.y,e.half,0],i),n[i+2]=e.width;break;case`wave`:t.set([e.x,e.y,e.len,e.amp],i),n[i+2]=e.width}}),{geometry:t,meta:n}}var fy,py,my,hy,gy=o((()=>{fy={round:{blobs:[{x:60,y:61,r:36,rx:1,ry:1.06}],extras:[{type:`body-dot`,x:97,y:34,r:6,alpha:.5,bob:3},{type:`body-dot`,x:106,y:24,r:3.5,alpha:.35,bob:3.5}],falloff:2.2,fur:9,period:3.6,eye:{x:68,y:58,r:8},shadowRx:26},drop:{blobs:[{x:60,y:70,r:30,rx:1,ry:.95},{x:60,y:40,r:20,rx:.85,ry:1.15},{x:60,y:22,r:9,rx:.7,ry:1}],extras:[{type:`wave`,x:48,y:76,len:24,amp:2,width:2.6}],falloff:1.7,fur:8.5,period:4.4,eye:{x:60,y:56,r:8},shadowRx:24},dome:{blobs:[{x:60,y:72,r:32,rx:1.02,ry:.82},{x:60,y:46,r:28,rx:1,ry:1}],extras:[{type:`bar`,x:46,y:85,half:5,width:2.4,alpha:.5},{type:`bar`,x:60,y:87,half:5,width:2.4,alpha:.5},{type:`bar`,x:74,y:85,half:5,width:2.4,alpha:.5},{type:`body-dot`,x:60,y:6,r:3,bob:2.5}],falloff:1.7,fur:9,period:3,eye:{x:60,y:54,r:8.5},shadowRx:27},flame:{blobs:[{x:60,y:80,r:22,rx:1,ry:.95},{x:60,y:54,r:19,rx:.95,ry:1.1},{x:60,y:30,r:12,rx:.72,ry:1.25},{x:60,y:16,r:5,rx:.6,ry:1.1}],extras:[{type:`arc`,cx:60,cy:45,r:32,half:39,width:3,alpha:.55,body:!0},{type:`ink-dot`,x:60,y:82,r:2.6}],falloff:1.6,fur:7.5,period:2.6,eye:{x:60,y:62,r:8},shadowRx:22},oval:{blobs:[{x:60,y:64,r:40,rx:1.06,ry:.76}],extras:[{type:`arc`,cx:60,cy:223,r:172,half:10.7,width:2.2,alpha:.45},{type:`arc`,cx:60,cy:261,r:191,half:10.3,width:2.2,alpha:.45}],falloff:2.2,fur:10,period:4,eye:{x:66,y:58,r:8},shadowRx:32},bean:{blobs:[{x:46,y:76,r:24},{x:74,y:54,r:22}],extras:[{type:`body-dot`,x:32,y:94,r:4,alpha:.4}],falloff:1.7,fur:9,period:3.8,eye:{x:70,y:58,r:8},shadowRx:26},pebble:{blobs:[{x:56,y:76,r:32,rx:1.3,ry:.66},{x:86,y:74,r:18,rx:1,ry:.7}],extras:[{type:`ink-dot`,x:42,y:76,r:3,alpha:.32},{type:`ink-dot`,x:56,y:86,r:2.2,alpha:.32},{type:`ink-dot`,x:86,y:80,r:2.6,alpha:.32}],falloff:1.8,fur:9.5,period:4.6,eye:{x:68,y:72,r:7.5},shadowRx:34},sprout:{blobs:[{x:60,y:74,r:28},{x:48,y:34,r:8,rx:.75,ry:1.15},{x:72,y:32,r:7,rx:.75,ry:1.15}],falloff:1.7,fur:8.5,period:3.2,eye:{x:60,y:68,r:8.5},shadowRx:26},tower:{blobs:[{x:60,y:86,r:19},{x:60,y:60,r:17},{x:60,y:36,r:14}],extras:[{type:`arc`,cx:60,cy:154,r:80,half:13,width:2.2,alpha:.4},{type:`arc`,cx:60,cy:187,r:99,half:11.7,width:2.2,alpha:.4}],falloff:1.6,fur:8,period:4,eye:{x:60,y:52,r:8},shadowRx:20},wedge:{blobs:[{x:44,y:84,r:20},{x:76,y:84,r:20},{x:60,y:48,r:14}],extras:[{type:`arc`,cx:60,cy:28,r:10,half:53,width:3,alpha:.5,body:!0}],falloff:1.7,fur:8.5,period:2.9,eye:{x:60,y:70,r:8},shadowRx:28}},py=Math.max(...Object.values(fy).map(e=>e.blobs.length)),my=Math.max(...Object.values(fy).map(e=>e.extras?.length??0)),hy={"ink-dot":1,"body-dot":2,arc:3,bar:4,wave:5}})),_y=s((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),vy=s(((e,t)=>{t.exports=_y()}));function yy(e,t){let n=1/0,r=-1/0;for(let i of fy[e].blobs){let e=i.r*(i.rx??1),a=i.r*(i.ry??1),o=(t-i.y)/a;if(Math.abs(o)>=1)continue;let s=e*Math.sqrt(1-o*o);n=Math.min(n,i.x-s),r=Math.max(r,i.x+s)}return[n,r]}function by(e){let{x:t,y:n,r}=fy[e].eye,i=r*1.45,a=r*.42,[o,s]=yy(e,n);return{band:r*.95,left:o,lens:i,outer:i+a/2,right:s,rim:a,x:t,y:n}}function xy({g:e}){let t=(t,n)=>n-t>1?(0,Cy.jsxs)(`g`,{children:[(0,Cy.jsx)(`rect`,{fill:wy,height:e.band,rx:e.band*.3,width:n-t,x:t,y:e.y-e.band/2}),(0,Cy.jsx)(`line`,{stroke:Ty,strokeDasharray:`1.6 1.6`,strokeWidth:.6,x1:t+1,x2:n-1,y1:e.y,y2:e.y})]}):null;return(0,Cy.jsxs)(`g`,{className:`e-goggles`,children:[t(e.left+1.5,e.x-e.outer+.5),t(e.x+e.outer-.5,e.right-1.5),(0,Cy.jsx)(`circle`,{cx:e.x,cy:e.y,fill:Oy,r:e.lens}),(0,Cy.jsx)(`circle`,{cx:e.x,cy:e.y,fill:`none`,r:e.lens,stroke:Ey,strokeWidth:e.rim}),(0,Cy.jsx)(`circle`,{cx:e.x,cy:e.y,fill:`none`,r:e.outer,stroke:Dy,strokeWidth:.7}),[45,135,225,315].map(t=>(0,Cy.jsx)(`circle`,{cx:e.x+Math.cos(t*Math.PI/180)*e.lens,cy:e.y+Math.sin(t*Math.PI/180)*e.lens,fill:Dy,r:.9},t)),(0,Cy.jsx)(`path`,{d:`M ${e.x-e.lens*.62} ${e.y-e.lens*.2} A ${e.lens*.66} ${e.lens*.66} 0 0 1 ${e.x-e.lens*.1} ${e.y-e.lens*.64}`,fill:`none`,opacity:.75,stroke:`#fff`,strokeLinecap:`round`,strokeWidth:1.3})]})}function Sy({kind:e}){return(0,Cy.jsx)(xy,{g:by(e)})}var Cy,wy,Ty,Ey,Dy,Oy,ky=o((()=>{gy(),Cy=vy(),wy=`oklch(40% 0.07 50)`,Ty=`oklch(30% 0.06 45)`,Ey=`oklch(74% 0.12 80)`,Dy=`oklch(55% 0.1 70)`,Oy=`oklch(88% 0.05 220 / 0.32)`}));function Ay(){zy=0;let e=window.innerHeight,t=!1;for(let n of Ly){let r=n.svg.getBoundingClientRect();if(r.bottom<-40||r.top>e+40)continue;let i=r.left+r.width*.5,a=r.top+r.height*.48,o=Ry.x-i,s=Ry.y-a,c=Math.hypot(o,s)||1,l=o/c,u=s/c,d=Math.min(r.width,r.height)*2.4,f=.35+Math.min(1,c/d)*.65,p=l*5.5*f,m=u*3.5*f,h=l*7*f+u*1.2*f;n.tx=Hy(n.tx,p,.16),n.ty=Hy(n.ty,m,.16),n.rot=Hy(n.rot,h,.14),n.lean&&n.lean.setAttribute(`transform`,`translate(${n.tx.toFixed(2)} ${n.ty.toFixed(2)}) rotate(${n.rot.toFixed(2)} 60 62)`),n.shadow&&(n.shadow.setAttribute(`cx`,(60-n.tx*.35).toFixed(2)),n.shadow.setAttribute(`opacity`,String(Math.max(.08,.14-Math.abs(n.ty)*.008))));let g=n.ex+l*n.max*f,_=n.ey+1+u*n.max*.9*f;n.px=Hy(n.px,g,.24),n.py=Hy(n.py,_,.24),n.pupil&&(n.pupil.setAttribute(`cx`,n.px.toFixed(2)),n.pupil.setAttribute(`cy`,n.py.toFixed(2))),n.glint&&(n.glint.setAttribute(`cx`,(n.px-2).toFixed(2)),n.glint.setAttribute(`cy`,(n.py-3.4).toFixed(2))),(Math.abs(n.tx-p)>.05||Math.abs(n.px-g)>.05)&&(t=!0)}(t||By-->0)&&(zy=requestAnimationFrame(Ay))}function jy(){By=48,zy||=requestAnimationFrame(Ay)}function My(e){Ry.x=e.clientX,Ry.y=e.clientY,jy()}function Ny(){Vy||typeof window>`u`||window.matchMedia(`(prefers-reduced-motion: reduce)`).matches||(Vy=!0,Ry.x=window.innerWidth*.62,Ry.y=window.innerHeight*.28,window.addEventListener(`pointermove`,My,{passive:!0}),jy())}function Py(){Ly.size>0||Vy&&(Vy=!1,window.removeEventListener(`pointermove`,My),zy&&=(cancelAnimationFrame(zy),0))}function Fy(e,t,n=!0){let r=(0,Iy.useRef)(t);r.current=t,(0,Iy.useEffect)(()=>{let t=e.current;if(!(t&&n)||window.matchMedia(`(prefers-reduced-motion: reduce)`).matches)return;let{ex:i,ey:a,max:o=3.2}=r.current,s={svg:t,lean:t.querySelector(`.e-lean`),pupil:t.querySelector(`.e-pupil`),glint:t.querySelector(`.e-glint`),shadow:t.querySelector(`.e-shadow`),ex:i,ey:a,max:o,tx:0,ty:0,rot:0,px:i,py:a+1};return Ly.add(s),Ny(),jy(),()=>{Ly.delete(s),Py()}},[e,n,t.ex,t.ey,t.max])}var Iy,Ly,Ry,zy,By,Vy,Hy,Uy=o((()=>{Iy=u(f(),1),Ly=new Set,Ry={x:0,y:0},zy=0,By=0,Vy=!1,Hy=(e,t,n)=>e+(t-e)*n}));function Wy({ex:e,ey:t,max:n,ink:r,r:i,blink:a=`5.2s`}){let o=i*1.15;return(0,X.jsxs)(`g`,{className:`e-eye`,"data-ex":e,"data-ey":t,"data-max":n,children:[(0,X.jsx)(`ellipse`,{cx:e,cy:t,fill:`#fff`,rx:i,ry:o,children:(0,X.jsx)(`animate`,{attributeName:`ry`,dur:a,keyTimes:`0;0.92;0.95;1`,repeatCount:`indefinite`,values:`${o};${o};${i*.1};${o}`})}),(0,X.jsx)(`circle`,{className:`e-pupil`,cx:e,cy:t+1,fill:r,r:i*.48}),(0,X.jsx)(`circle`,{className:`e-glint`,cx:e-i*.25,cy:t-i*.3,fill:`#fff`,r:i*.18})]})}function Gy(){return(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(`path`,{fill:ay.cobalt,children:(0,X.jsx)(`animate`,{attributeName:`d`,dur:`3.6s`,repeatCount:`indefinite`,values:`M60 22 Q96 26 96 62 Q96 96 60 100 Q24 96 24 62 Q24 26 60 22 Z;M60 30 Q100 20 94 62 Q98 102 60 95 Q22 102 26 62 Q20 22 60 30 Z;M60 22 Q96 26 96 62 Q96 96 60 100 Q24 96 24 62 Q24 26 60 22 Z`})}),(0,X.jsx)(`circle`,{cx:`97`,cy:`34`,fill:ay.cobalt,opacity:`0.5`,r:`6`,children:(0,X.jsx)(`animate`,{attributeName:`cy`,dur:`3.6s`,repeatCount:`indefinite`,values:`34;28;34`})}),(0,X.jsx)(`circle`,{cx:`106`,cy:`24`,fill:ay.cobalt,opacity:`0.35`,r:`3.5`,children:(0,X.jsx)(`animate`,{attributeName:`cy`,begin:`0.4s`,dur:`3.6s`,repeatCount:`indefinite`,values:`24;17;24`})}),(0,X.jsx)(Wy,{blink:`5.2s`,ex:68,ey:58,ink:`oklch(18% 0.08 260)`,max:3.4,r:8})]})}function Ky(){return(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(`path`,{fill:ay.amber,children:(0,X.jsx)(`animate`,{attributeName:`d`,dur:`4.4s`,repeatCount:`indefinite`,values:`M60 16 Q90 34 90 66 Q90 96 60 98 Q30 96 30 66 Q30 34 60 16 Z;M50 20 Q92 30 88 66 Q92 98 60 96 Q28 98 32 66 Q26 36 50 20 Z;M70 20 Q94 36 90 66 Q88 98 60 96 Q32 98 32 66 Q30 30 70 20 Z;M60 16 Q90 34 90 66 Q90 96 60 98 Q30 96 30 66 Q30 34 60 16 Z`})}),(0,X.jsx)(Wy,{blink:`4.4s`,ex:60,ey:56,ink:`oklch(30% 0.10 60)`,max:3.2,r:8}),(0,X.jsx)(`path`,{d:`M48 76 Q54 72 60 76 Q66 80 72 76`,fill:`none`,stroke:`oklch(30% 0.10 55)`,strokeLinecap:`round`,strokeWidth:`2.6`})]})}function qy(){return(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(`path`,{fill:ay.moss,children:(0,X.jsx)(`animate`,{attributeName:`d`,dur:`3s`,repeatCount:`indefinite`,values:`M60 20 Q92 30 92 70 Q92 96 60 96 Q28 96 28 70 Q28 30 60 20 Z;M60 30 Q98 36 96 74 Q96 98 60 98 Q24 98 24 74 Q22 36 60 30 Z;M60 12 Q88 26 88 68 Q88 94 60 94 Q32 94 32 68 Q32 26 60 12 Z;M60 20 Q92 30 92 70 Q92 96 60 96 Q28 96 28 70 Q28 30 60 20 Z`})}),(0,X.jsx)(`path`,{d:`M46 90 L46 80 M60 92 L60 82 M74 90 L74 80`,opacity:`0.5`,stroke:`oklch(28% 0.10 155)`,strokeLinecap:`round`,strokeWidth:`2.4`}),(0,X.jsx)(`circle`,{cx:`60`,cy:`6`,fill:ay.moss,r:`3`,children:(0,X.jsx)(`animate`,{attributeName:`cy`,dur:`3s`,repeatCount:`indefinite`,values:`8;3;8`})}),(0,X.jsx)(Wy,{blink:`4.6s`,ex:60,ey:54,ink:`oklch(16% 0.08 160)`,max:3.4,r:8.5})]})}function Jy(){return(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(`path`,{fill:ay.rose,children:(0,X.jsx)(`animate`,{attributeName:`d`,dur:`2.6s`,repeatCount:`indefinite`,values:`M60 14 Q84 44 80 76 Q78 98 60 98 Q42 98 40 76 Q36 44 60 14 Z;M52 18 Q86 40 82 76 Q80 98 60 98 Q40 98 38 76 Q32 46 52 18 Z;M68 18 Q88 46 82 76 Q80 98 60 98 Q40 98 38 76 Q34 40 68 18 Z;M60 14 Q84 44 80 76 Q78 98 60 98 Q42 98 40 76 Q36 44 60 14 Z`})}),(0,X.jsx)(`path`,{d:`M40 20 Q60 6 80 20`,fill:`none`,opacity:`0.55`,stroke:ay.rose,strokeLinecap:`round`,strokeWidth:`3`,children:(0,X.jsx)(`animate`,{attributeName:`opacity`,dur:`2.6s`,repeatCount:`indefinite`,values:`0.55;0.15;0.55`})}),(0,X.jsx)(Wy,{blink:`3.8s`,ex:60,ey:62,ink:`oklch(22% 0.10 18)`,max:3.2,r:8}),(0,X.jsx)(`circle`,{cx:`60`,cy:`82`,fill:`oklch(22% 0.10 18)`,r:`2.6`})]})}function Yy(){return(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(`path`,{fill:ay.ember,children:(0,X.jsx)(`animate`,{attributeName:`d`,dur:`4s`,repeatCount:`indefinite`,values:`M60 34 Q100 38 100 64 Q100 92 60 94 Q20 92 20 64 Q20 38 60 34 Z;M60 40 Q110 40 108 66 Q108 96 60 96 Q12 96 12 66 Q10 40 60 40 Z;M60 28 Q92 36 92 62 Q92 88 60 90 Q28 88 28 62 Q28 36 60 28 Z;M60 34 Q100 38 100 64 Q100 92 60 94 Q20 92 20 64 Q20 38 60 34 Z`})}),(0,X.jsxs)(`g`,{fill:`none`,opacity:`0.45`,stroke:`oklch(40% 0.16 30)`,strokeWidth:`2.2`,children:[(0,X.jsx)(`path`,{d:`M28 54 Q60 48 92 54`,children:(0,X.jsx)(`animate`,{attributeName:`d`,dur:`4s`,repeatCount:`indefinite`,values:`M28 54 Q60 48 92 54;M20 56 Q60 50 100 56;M32 52 Q60 46 88 52;M28 54 Q60 48 92 54`})}),(0,X.jsx)(`path`,{d:`M26 70 Q60 64 94 70`,children:(0,X.jsx)(`animate`,{attributeName:`d`,dur:`4s`,repeatCount:`indefinite`,values:`M26 70 Q60 64 94 70;M18 72 Q60 66 102 72;M30 68 Q60 62 90 68;M26 70 Q60 64 94 70`})})]}),(0,X.jsx)(Wy,{blink:`4.2s`,ex:66,ey:58,ink:`oklch(24% 0.10 30)`,max:3.2,r:8})]})}function Xy(){return(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(`path`,{fill:ay.teal,children:(0,X.jsx)(`animate`,{attributeName:`d`,dur:`3.8s`,repeatCount:`indefinite`,values:`M48 96 Q24 92 26 68 Q28 44 52 38 Q78 32 88 50 Q98 66 84 84 Q70 100 48 96 Z;M46 98 Q20 92 24 66 Q28 40 54 36 Q80 30 90 50 Q100 68 84 86 Q68 102 46 98 Z;M50 94 Q28 90 28 68 Q30 46 52 40 Q76 34 86 50 Q94 64 82 82 Q72 98 50 94 Z;M48 96 Q24 92 26 68 Q28 44 52 38 Q78 32 88 50 Q98 66 84 84 Q70 100 48 96 Z`})}),(0,X.jsx)(`circle`,{cx:`32`,cy:`94`,fill:ay.teal,opacity:`0.4`,r:`4`,children:(0,X.jsx)(`animate`,{attributeName:`cx`,dur:`3.8s`,repeatCount:`indefinite`,values:`32;27;32`})}),(0,X.jsx)(Wy,{blink:`4.8s`,ex:70,ey:58,ink:`oklch(18% 0.08 200)`,max:3.4,r:8})]})}function Zy(){return(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(`path`,{fill:ay.slate,children:(0,X.jsx)(`animate`,{attributeName:`d`,dur:`4.6s`,repeatCount:`indefinite`,values:`M60 96 Q20 96 18 78 Q16 60 46 56 Q78 52 98 62 Q110 72 104 86 Q98 96 60 96 Z;M60 98 Q14 98 14 78 Q14 58 46 54 Q80 50 102 62 Q114 74 106 88 Q98 98 60 98 Z;M60 94 Q26 94 22 78 Q20 62 46 58 Q76 54 94 62 Q106 70 100 84 Q94 94 60 94 Z;M60 96 Q20 96 18 78 Q16 60 46 56 Q78 52 98 62 Q110 72 104 86 Q98 96 60 96 Z`})}),(0,X.jsxs)(`g`,{fill:`oklch(30% 0.05 244)`,opacity:`0.32`,children:[(0,X.jsx)(`circle`,{cx:`42`,cy:`76`,r:`3`}),(0,X.jsx)(`circle`,{cx:`56`,cy:`86`,r:`2.2`}),(0,X.jsx)(`circle`,{cx:`86`,cy:`80`,r:`2.6`})]}),(0,X.jsx)(Wy,{blink:`5.6s`,ex:68,ey:72,ink:`oklch(20% 0.06 244)`,max:3,r:7.5})]})}function Qy(){return(0,X.jsxs)(X.Fragment,{children:[(0,X.jsxs)(`g`,{fill:ay.citron,children:[(0,X.jsx)(`ellipse`,{cx:`48`,cy:`34`,rx:`6`,ry:`10`,children:(0,X.jsx)(`animate`,{attributeName:`cy`,dur:`3.2s`,repeatCount:`indefinite`,values:`34;30;34`})}),(0,X.jsx)(`ellipse`,{cx:`72`,cy:`32`,rx:`5.5`,ry:`9`,children:(0,X.jsx)(`animate`,{attributeName:`cy`,begin:`0.5s`,dur:`3.2s`,repeatCount:`indefinite`,values:`32;28;32`})})]}),(0,X.jsx)(`path`,{fill:ay.citron,children:(0,X.jsx)(`animate`,{attributeName:`d`,dur:`3.2s`,repeatCount:`indefinite`,values:`M60 100 Q28 98 28 72 Q28 46 60 44 Q92 46 92 72 Q92 98 60 100 Z;M60 102 Q24 100 24 72 Q24 42 60 40 Q96 42 96 72 Q96 100 60 102 Z;M60 98 Q32 96 32 72 Q32 50 60 48 Q88 50 88 72 Q88 96 60 98 Z;M60 100 Q28 98 28 72 Q28 46 60 44 Q92 46 92 72 Q92 98 60 100 Z`})}),(0,X.jsx)(Wy,{blink:`4.2s`,ex:60,ey:68,ink:`oklch(24% 0.09 108)`,max:3.4,r:8.5})]})}function $y(){return(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(`path`,{fill:ay.violet,children:(0,X.jsx)(`animate`,{attributeName:`d`,dur:`4s`,repeatCount:`indefinite`,values:`M60 102 Q36 100 38 78 Q40 58 42 44 Q44 26 60 24 Q76 26 78 44 Q80 58 82 78 Q84 100 60 102 Z;M60 104 Q32 102 36 78 Q40 56 40 42 Q40 22 60 20 Q80 22 80 42 Q80 56 84 78 Q88 102 60 104 Z;M60 100 Q40 98 40 78 Q42 60 44 46 Q46 30 60 28 Q74 30 76 46 Q78 60 80 78 Q80 98 60 100 Z;M60 102 Q36 100 38 78 Q40 58 42 44 Q44 26 60 24 Q76 26 78 44 Q80 58 82 78 Q84 100 60 102 Z`})}),(0,X.jsxs)(`g`,{fill:`none`,opacity:`0.4`,stroke:`oklch(28% 0.10 308)`,strokeLinecap:`round`,strokeWidth:`2.2`,children:[(0,X.jsx)(`path`,{d:`M42 74 Q60 70 78 74`}),(0,X.jsx)(`path`,{d:`M40 88 Q60 84 80 88`})]}),(0,X.jsx)(Wy,{blink:`5s`,ex:60,ey:52,ink:`oklch(20% 0.09 308)`,max:3.2,r:8})]})}function eb(){return(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(`path`,{fill:ay.magenta,children:(0,X.jsx)(`animate`,{attributeName:`d`,dur:`2.9s`,repeatCount:`indefinite`,values:`M60 30 Q74 40 86 70 Q96 92 78 98 Q60 102 42 98 Q24 92 34 70 Q46 40 60 30 Z;M60 24 Q78 38 90 70 Q100 94 78 100 Q60 104 42 100 Q20 94 30 70 Q42 38 60 24 Z;M60 34 Q72 44 82 70 Q92 90 76 96 Q60 100 44 96 Q28 90 38 70 Q48 44 60 34 Z;M60 30 Q74 40 86 70 Q96 92 78 98 Q60 102 42 98 Q24 92 34 70 Q46 40 60 30 Z`})}),(0,X.jsx)(`path`,{d:`M52 22 Q60 14 68 22`,fill:`none`,opacity:`0.5`,stroke:ay.magenta,strokeLinecap:`round`,strokeWidth:`3`,children:(0,X.jsx)(`animate`,{attributeName:`opacity`,dur:`2.9s`,repeatCount:`indefinite`,values:`0.5;0.12;0.5`})}),(0,X.jsx)(Wy,{blink:`3.6s`,ex:60,ey:70,ink:`oklch(22% 0.10 345)`,max:3.2,r:8})]})}function tb({kind:e}){switch(e){case`drop`:return(0,X.jsx)(Ky,{});case`dome`:return(0,X.jsx)(qy,{});case`flame`:return(0,X.jsx)(Jy,{});case`oval`:return(0,X.jsx)(Yy,{});case`bean`:return(0,X.jsx)(Xy,{});case`pebble`:return(0,X.jsx)(Zy,{});case`sprout`:return(0,X.jsx)(Qy,{});case`tower`:return(0,X.jsx)($y,{});case`wedge`:return(0,X.jsx)(eb,{});default:return(0,X.jsx)(Gy,{})}}function nb({animated:e=!0,goggles:t=!1,kind:n=`round`,size:r=160,className:i}){let a=(0,rb.useRef)(null),o=ib[n],s=ab[n];return Fy(a,o,e),(0,rb.useEffect)(()=>{let t=a.current;if(!t)return;let n=typeof window<`u`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches;if(e&&!n){t.unpauseAnimations();return}t.pauseAnimations(),t.setCurrentTime(0)},[e]),(0,X.jsxs)(`svg`,{"aria-hidden":`true`,className:i,height:r,overflow:`visible`,ref:a,style:{display:`block`},viewBox:`0 0 120 120`,width:r,children:[(0,X.jsx)(`ellipse`,{className:`e-shadow`,cx:`60`,cy:s.cy,fill:`#000`,opacity:`0.14`,rx:s.rx,ry:`4.5`,children:(0,X.jsx)(`animate`,{attributeName:`rx`,dur:s.dur,repeatCount:`indefinite`,values:`${s.rx};${s.rx*.8};${s.rx}`})}),(0,X.jsxs)(`g`,{className:`e-lean`,children:[(0,X.jsx)(tb,{kind:n}),t?(0,X.jsx)(Sy,{kind:n}):null]})]})}var rb,X,ib,ab,ob=o((()=>{rb=u(f(),1),cy(),ky(),Uy(),X=vy(),ib={round:{ex:68,ey:58,max:3.4},drop:{ex:60,ey:56,max:3.2},dome:{ex:60,ey:54,max:3.4},flame:{ex:60,ey:62,max:3.2},oval:{ex:66,ey:58,max:3.2},bean:{ex:70,ey:58,max:3.4},pebble:{ex:68,ey:72,max:3},sprout:{ex:60,ey:68,max:3.4},tower:{ex:60,ey:52,max:3.2},wedge:{ex:60,ey:70,max:3.2}},ab={round:{cy:108,rx:26,dur:`3.6s`},drop:{cy:106,rx:24,dur:`4.4s`},dome:{cy:104,rx:27,dur:`3s`},flame:{cy:106,rx:22,dur:`2.6s`},oval:{cy:102,rx:32,dur:`4s`},bean:{cy:102,rx:26,dur:`3.8s`},pebble:{cy:102,rx:34,dur:`4.6s`},sprout:{cy:106,rx:26,dur:`3.2s`},tower:{cy:108,rx:20,dur:`4s`},wedge:{cy:106,rx:28,dur:`2.9s`}}}));cy(),ob();var Z=vy(),sb={"brand.tagline":`Wünsch dir was. Wir bauen deinen Wizard.`,"brand.sub":`Er führt dich Schritt für Schritt zum Ergebnis. Die KI erledigt die Arbeit.`,"auth.dev":`Dev-Login (lokal)`,"auth.legal":`Kein Passwort, keine Registrierung – du meldest dich mit einem bestehenden Konto an.`,"auth.signIn":`Anmelden oder Konto erstellen`,"auth.failed":`Die Anmeldung hat nicht geklappt. Bitte noch einmal versuchen.`,"auth.localLink":`Öffne den Link, den die App beim Start ausgegeben hat – er meldet dich an diesem Gerät an.`,"nav.account":`Konto & Guthaben`,"setup.keysInAccount":`API-Schlüssel für Skripte gehören zu deinem Konto. Du legst sie dort an und ziehst sie dort zurück.`,"setup.openAccount":`Konto öffnen`,"class.label":`Modell-Klasse`,"class.classifier":`Classifier`,"class.standard":`Standard`,"class.high":`High`,"class.highest":`Highest`,"class.image":`Bild`,"class.video":`Video`,"class.audio":`Audio`,"class.speech":`Sprachausgabe`,"class.classifier.hint":`Zuordnen, Ja/Nein, wenige Werte aus Text ziehen. Am günstigsten.`,"class.standard.hint":`Kurze Texte, eine API aufrufen, umformatieren.`,"class.high.hint":`Recherche mit Werkzeugen, lange Dokumente, Abwägen vieler Quellen.`,"class.highest.hint":`Schweres Abwägen oder Code. Mehrfach so teuer wie High.`,"class.effort":`Denkaufwand`,"class.effortAuto":`Automatisch`,"class.effort.low":`Niedrig`,"class.effort.medium":`Mittel`,"class.effort.high":`Hoch`,"estimate.step":`≈ {n} Credits, selten mehr als {high}`,"estimate.measured":`gemessen aus den letzten Läufen`,"estimate.formula":`geschätzt, wird nach fünf Läufen genauer`,"estimate.share":`Ein Lauf kostet etwa {run} Credits. Beim Tageslimit sind es höchstens {day} Credits am Tag.`,"local.title":`Modelle & Konto`,"local.hint":`Diese App läuft auf deinem Gerät. Sie rechnet mit deinen eigenen Schlüsseln, einem lokalen Modell oder mit dem Guthaben deines Kontos.`,"local.account":`Konto`,"local.accountHint":`Ein Konto ist freiwillig. Damit nutzt du Guthaben statt eigener Schlüssel und veröffentlichst Wizards in der Cloud.`,"local.accountSignIn":`Anmelden oder Konto erstellen`,"local.accountWaiting":`Warte auf die Anmeldung im Browser …`,"local.accountFailed":`Der Konto-Dienst ist gerade nicht erreichbar.`,"local.accountExpired":`Die Anmeldung ist abgelaufen. Bitte neu anmelden.`,"local.topUp":`Guthaben`,"local.source":`Modelle laufen über`,"local.sourceOwn":`Eigene Schlüssel`,"local.sourceAccount":`Guthaben des Kontos`,"local.sourceAccountHint":`Alle Modell-Aufrufe laufen über das Konto. Welches Modell hinter einer Klasse steht, legt der Dienst fest.`,"local.keys":`Schlüssel`,"local.keysHint":`Ein Schlüssel reicht. Schlüssel liegen im Schlüsselbund dieses Geräts, nie in der Datenbank.`,"local.keySet":`hinterlegt`,"local.keyEmpty":`nicht hinterlegt`,"local.keyRemove":`Entfernen`,"local.classes":`Modell je Klasse`,"local.classesHint":`Ein Schritt nennt nur die Klasse. Hier steht, welches Modell sie bedient, z. B. anthropic/claude-haiku-4.5, openai:gpt-5.4-mini oder ollama:qwen3.`,"local.save":`Speichern`,"local.saved":`Gespeichert`,"local.chat":`Der Chat im Studio antwortet über`,"local.chatModels":`Modell-Klasse Highest`,"local.chatClaude":`Claude-Abo (Claude Code)`,"local.subscription":`Mit dem Abo baut das auf diesem Gerät installierte Claude Code den Wizard – mit deiner Anmeldung dort. Läufe nutzen weiter Schlüssel oder Guthaben.`,"harness.hint":`Texte denkt das auf diesem Gerät installierte {name} – mit deinem {sub} und deiner Anmeldung dort. Kein Schlüssel nötig. Bilder, Videos und Audio brauchen weiter einen Schlüssel.`,"harness.hintImages":`Texte und Bilder macht das auf diesem Gerät installierte {name} – mit deinem {sub} und deiner Anmeldung dort. Kein Schlüssel nötig. Videos und Audio brauchen weiter einen Schlüssel.`,"harness.found":`{name} {version} gefunden`,"harness.missing":`{name} ist auf diesem Gerät nicht installiert.`,"harness.install":`Oder in deinem eigenen Terminal:`,"harness.installButton":`{name} installieren`,"harness.installing":`{name} wird im Terminal unten installiert – das dauert etwa eine Minute. Danach meldest du es an.`,"harness.installEnded":`Die Installation ist zu Ende, aber {name} ist nicht da. Was oben steht, sagt warum.`,"harness.appHere":`Die {app}-App ist auf diesem Computer: {name} meldet sich mit demselben {sub} an.`,"harness.notInstalled":`nicht installiert`,"harness.authSubscription":`Angemeldet mit deinem {sub}.`,"harness.authKey":`Angemeldet mit einem API-Schlüssel aus deiner Shell – nicht mit dem Abo. Melde dich hier an, damit es über dein {sub} läuft.`,"harness.authNone":`Noch nicht angemeldet.`,"harness.signIn":`Hier anmelden`,"harness.signingIn":`Die Anmeldung läuft im Terminal unten – dein Browser öffnet sich dafür. Das Terminal schließt sich, sobald die Anmeldung da ist.`,"harness.signInInteractive":`Unten startet {name}. Wähle dort die Anmeldung mit deinem {sub} und melde dich im Browser an. Das Terminal schließt sich, sobald die Anmeldung da ist.`,"harness.loginEnded":`Die Anmeldung wurde beendet, ohne dass {name} angemeldet ist.`,"harness.sub.claude":`Claude-Abo`,"harness.sub.codex":`ChatGPT-Abo`,"harness.sub.gemini":`Google-Konto`,"harness.sub.cursor":`Cursor-Abo`,"harness.desc.claude":`Mit deinem Claude-Abo – kein Schlüssel nötig.`,"harness.desc.codex":`Mit deinem ChatGPT-Abo – kein Schlüssel nötig.`,"harness.desc.gemini":`Mit deinem Google-Konto – kein Schlüssel nötig.`,"harness.desc.cursor":`Mit deinem Cursor-Abo – kein Schlüssel nötig.`,"harness.ready":`angemeldet`,"local.recheck":`Erneut prüfen`,"local.test":`Testen`,"local.testHint":`Ein kurzer Aufruf zeigt, ob der Weg zum Modell offen ist.`,"local.testOk":`Antwort in {s} s über {ref}: „{reply}“`,"local.testFailed":`Der Test hat nicht geklappt: {error}`,"setup.title":`Setup`,"setup.sub":`Engenty kann deine vorhandenen Konten auf deinem Computer nutzen.`,"setup.source":`Womit soll die Engenty denken?`,"setup.local":`Läuft lokal auf diesem Gerät.`,"setup.stage.connect":`Verbinden`,"setup.stage.test":`Testen`,"setup.stage.done":`Fertig`,"setup.h.install":`Installiere {name}`,"setup.h.signIn":`Melde {name} an`,"setup.h.keys":`Trage einen Schlüssel ein`,"setup.h.test":`Ein kurzer Test`,"setup.h.done":`Verbunden.`,"setup.ready":`Alles bereit.`,"setup.noHarness":`Noch kein KI-Client installiert. Wähle einen – er wird hier installiert – oder trage eigene Schlüssel ein.`,"setup.ownDesc":`AI Gateway, OpenAI, Anthropic oder Ollama.`,"setup.recommended":`Empfohlen`,"setup.done":`Zum Studio`,"setup.untilWorks":`Das Studio öffnet sich, sobald der Test klappt.`,"cloud.title":`In der Cloud`,"cloud.publish":`Veröffentlichen`,"cloud.update":`Aktualisieren`,"cloud.hint":`Legt den Wizard im Konto ab. Der Link dort läuft auf dem Guthaben des Kontos, auch wenn dieses Gerät aus ist.`,"cloud.failed":`Veröffentlichen in der Cloud hat nicht geklappt.`,"nav.wizards":`Wizards`,"nav.settings":`Einstellungen`,"account.title":`Konto`,"account.hint":`Wie dich die App nennt und wie man dich erreicht.`,"account.initials":`Dein Kürzel im Menü oben rechts: die Anfangsbuchstaben deines Namens.`,"account.name":`Name`,"account.nameHint":`Anfangs steht hier der Benutzername dieses Geräts.`,"account.fromAccount":`Name und E-Mail kommen aus deinem Konto.`,"account.about":`Über dich`,"account.aboutHint":`Wer du bist und was du machst.`,"account.email":`E-Mail`,"account.phone":`Telefon`,"account.connection":`Installation`,"account.connectionHint":`Wo diese App läuft und womit sie verbunden ist.`,"account.local":`Lokale Installation`,"account.localText":`Diese App läuft auf deinem Gerät und ist mit keinem Konto verbunden. Wizards, Projektdaten und Dateien bleiben hier.`,"account.linked":`Verbunden`,"account.look":`Darstellung`,"account.lookHint":`Sprache und Design der App in diesem Browser.`,"nav.logout":`Abmelden`,"nav.language":`Sprache`,"nav.theme":`Design`,"nav.credits":`{n} Credits`,"footer.billing":`Guthaben`,"footer.usage":`Verbrauch`,"footer.invoices":`Rechnungen`,"footer.account":`Konto`,"about.version":`Version {v}`,"about.update.available":`Version {v} von engenty wizards ist da.`,"about.update.install":`Aktualisieren`,"about.update.installing":`Version {v} wird installiert …`,"about.update.restarting":`Startet neu mit Version {v} …`,"about.update.done":`Installiert. Starte engenty wizards neu, um {v} zu nutzen.`,"about.update.failed":`Das Update ist fehlgeschlagen. Logs: logs/update.log`,"about.update.notes":`Was ist neu`,"about.changelog":`Changelog`,"about.changelogHint":`Was sich von Version zu Version geändert hat.`,"about.changelogEmpty":`Noch keine Einträge.`,"about.unreleased":`Noch nicht veröffentlicht`,"about.breaking":`breaking`,"about.credits":`Open Source`,"about.creditsHint":`engenty wizards und die Open-Source-Software, auf der es aufbaut.`,"about.creditsProduct":`engenty`,"about.creditsBuiltWith":`Gebaut mit`,"about.creditsDeps":`Direkte Abhängigkeiten`,"about.creditsDepsHint":`Was die Teile dieser App selbst einbinden, mit Version und Lizenz – ohne deren eigene Abhängigkeiten.`,"about.creditsShared":`Von mehreren Teilen genutzt`,"about.search":`Suchen …`,"about.noMatches":`Keine Treffer.`,"theme.dark":`Dunkles Design`,"theme.light":`Helles Design`,"home.title":`Deine Wizards`,"home.new":`Neuer Wizard`,"home.import":`Importieren`,"import.failed":`Import hat nicht geklappt`,"home.empty":`Noch keine Wizards in diesem Projekt.`,"home.live":`Live`,"home.draft":`Entwurf`,"home.steps":`{n} Schritte`,"home.newProject":`Neues Projekt`,"home.projectName":`Name des Projekts`,"home.projectLimit":`Höchstens {n} Projekte`,"new.title":`Was soll dein Wizard können?`,"new.placeholder":`z. B. Kunden geben ihr Produkt und ihre Zielgruppe ein, der Wizard recherchiert Wettbewerber und erstellt daraus ein Positionierungs-Briefing als PDF.`,"new.build":`Wizard bauen`,"new.orStarter":`Oder beginne mit einer Vorlage`,"new.import":`Wizard-Paket importieren`,"new.hint":`Du kannst alles danach im Gespräch ändern.`,"editor.resize":`Breite ändern – Doppelklick setzt zurück`,"editor.export":`Als Paket exportieren (.wizard)`,"editor.chat":`Gespräch`,"editor.step":`Schritte`,"editor.runs":`Durchläufe`,"editor.reviewEditable":`bearbeitbar`,"editor.reviewRedo":`neu erstellbar`,"editor.otherwise":`sonst`,"editor.whenFilled":`{field} ausgefüllt`,"editor.whenEmpty":`{field} leer`,"tool.web_search":`Websuche`,"tool.web_fetch":`Webseiten lesen`,"tool.browser":`Browser`,"tool.sandbox":`Code & Shell`,"tool.image":`Bilder`,"tool.http":`API`,"editor.test":`Testen`,"editor.share":`Teilen`,"editor.publish":`Veröffentlichen`,"editor.published":`Live · Version {v}`,"editor.unpublishedChanges":`Änderungen nicht veröffentlicht`,"editor.notPublished":`Noch nicht veröffentlicht`,"editor.composer":`Beschreibe, was sich ändern soll …`,"editor.attach":`Dateien anhängen`,"editor.detach":`Entfernen`,"editor.attached":`Angehängt`,"editor.thread":`Verlauf`,"editor.voice":`Diktieren`,"editor.voiceStop":`Diktat beenden`,"editor.listening":`Ich höre zu …`,"editor.transcribing":`Wird verschriftlicht …`,"editor.micDenied":`Das Mikrofon ist für diese Seite nicht freigegeben.`,"editor.building":`Baue den Ablauf …`,"editor.files":`Dateien`,"files.explain":`Was dein Wizard bei jedem Durchlauf braucht: Widget-Code, Bibliotheken, Kartenumrisse, Preislisten. Der Assistent legt sie im Gespräch an – du kannst auch eigene hochladen.`,"files.upload":`Hochladen`,"files.count":`{n} Dateien · {size}`,"files.empty":`Noch keine Dateien. Zieh Dateien hierher oder bitte den Assistenten, ein Widget zu bauen.`,"files.download":`Herunterladen`,"files.delete":`Löschen`,"files.confirmDelete":`„{path}“ löschen?`,"editor.thinking":`Denkt nach …`,"editor.chatBroken":`Die Verbindung ist abgebrochen. Was schon gebaut war, ist gespeichert – schick die Nachricht bitte noch einmal.`,"editor.issues":`Bevor du testest oder teilst, braucht der Wizard noch Korrekturen:`,"editor.fixWithChat":`Vom Assistenten beheben lassen`,"editor.models.blocking":`So kann der Wizard nicht starten. Es fehlen Modelle:`,"editor.models.optional":`Diese Schritte laufen so nicht. Wähle beim Testen einen Weg ohne sie oder richte die Modelle ein:`,"editor.models.settings":`Modelle einrichten`,"editor.prevStep":`Vorheriger Schritt`,"editor.nextStep":`Nächster Schritt`,"editor.deleteStep":`Schritt löschen`,"editor.moveUp":`Nach oben`,"editor.moveDown":`Nach unten`,"editor.noRuns":`Noch keine Durchläufe.`,"editor.restart":`Neu starten`,"editor.close":`Schließen`,"editor.chatHello":`Beschreibe mir, was dein Wizard tun soll. Ich baue den Ablauf und du siehst ihn links als Diagramm.`,"shareRun.button":`Teilen`,"shareRun.title":`Ergebnis teilen`,"shareRun.email":`E-Mail`,"shareRun.more":`Mehr …`,"shareRun.until":`Der Link ist bis {date} gültig.`,"shareRun.kept":`Der Link bleibt gültig, bis du ihn zurückziehst.`,"shareRun.withdraw":`Link zurückziehen`,"sharePage.gone":`Dieser Link ist abgelaufen oder wurde zurückgezogen.`,"sharePage.own":`Selbst ausprobieren`,"sharePage.until":`Geteilt · verfügbar bis {date}`,"sharePage.shared":`Geteilt am {date}`,"share.title":`Wizard teilen`,"share.link":`Link`,"share.copy":`Kopieren`,"share.copied":`Kopiert`,"share.enabled":`Link ist aktiv`,"share.limit":`Durchläufe pro Tag`,"share.rotate":`Neuen Link erzeugen`,"share.rotateHint":`Der alte Link funktioniert danach nicht mehr.`,"share.publishFirst":`Veröffentliche den Wizard, damit der Link funktioniert.`,"share.open":`Öffnen`,"embed.title":`In eine Website einbetten`,"embed.inline":`In der Seite`,"embed.modal":`Button + Fenster`,"embed.inlineHint":`Füge das Tag in den HTML-Code deiner Seite ein. Der Wizard erscheint an dieser Stelle.`,"embed.modalHint":`Füge das Tag in den HTML-Code deiner Seite ein. An dieser Stelle erscheint ein Button, der den Wizard in einem Fenster öffnet.`,"type.page":`Seite`,"type.agent":`KI-Schritt`,"type.generate":`Erzeugen`,"type.widget":`Widget`,"type.review":`Prüfen`,"type.result":`Ergebnis`,"run.start":`Los geht's`,"run.next":`Weiter`,"run.back":`Zurück`,"run.accept":`Passt so`,"run.regenerate":`Neue Variante`,"run.edit":`Bearbeiten`,"run.resume":`Letzten Durchlauf fortsetzen`,"run.regenerateNote":`Was soll anders werden?`,"run.pickItem":`Nr. {n}`,"run.pickedItem":`Nr. {n} neu`,"run.regeneratePicked":`Neu erstellt wird nur Nr. {n}.`,"run.regenerateAll":`Alle werden neu erstellt. Tippe oben auf eine Nummer, um nur einzelne zu erneuern.`,"check.progress":`{done} von {total} geprüft`,"check.onlyOpen":`Nur offene`,"check.noFile":`Zu dieser Zeile gibt es keine Datei.`,"check.noPreview":`Für diese Datei gibt es keine Vorschau – öffne sie mit dem Link oben.`,"check.reopen":`Wieder offen`,"market.search":`Vorlage suchen …`,"market.all":`Alle`,"market.industry":`Branche`,"market.format":`Ergebnis`,"market.capability":`Fähigkeit`,"market.unavailable":`nicht eingerichtet`,"market.missing":`Hier nicht eingerichtet: {list}`,"market.missingHint":`Dafür fehlt hier ein Modell: {list}. Richte es unter Modelle ein.`,"market.none":`Keine Vorlage passt zu dieser Auswahl.`,"market.notFound":`Diese Vorlage gibt es nicht (mehr).`,"market.star":`Merken`,"market.starred":`Gemerkt`,"market.starHint":`Gemerkte Vorlagen liegen auf diesem Rechner auch ohne Verbindung bereit.`,"market.noneStarred":`Du hast noch keine Vorlage gemerkt.`,"market.offline":`Keine Verbindung zum Marktplatz: du siehst die Vorlagen, die hier bereitliegen.`,"market.more":`Mehr anzeigen`,"market.reset":`Auswahl zurücksetzen`,"market.count":`{n} Vorlagen`,"market.countOf":`{n} von {all} Vorlagen`,"market.countOfShort":`{n} von {all}`,"market.resetShort":`Zurücksetzen`,"market.minutes":`~ {n} Min.`,"market.credits":`~ {n} Credits pro Lauf`,"market.needsUpdate":`Braucht eine neuere App`,"market.needsUpdateHint":`Diese Vorlage nutzt Funktionen, die deine App noch nicht kennt. Aktualisiere die App, dann kannst du sie verwenden.`,"market.use":`Mit dieser Vorlage starten`,"market.steps":`So läuft der Wizard ab`,"market.duration":`Dauer`,"market.durationHint":`vom Start bis zum Ergebnis, mit {n} Angaben von dir`,"market.result":`Ergebnis`,"market.creditsRange":`~ {n} Credits`,"market.creditsHint":`pro Lauf geschätzt, selten mehr als das Doppelte`,"market.needs":`Braucht`,"market.cost":`Kosten`,"new.forWebsite":`Kleine Helfer für deine Website`,"run.feedbackPlaceholder":`Passt etwas nicht? Schreib, was anders sein soll …`,"run.feedbackTarget":`Was soll sich ändern?`,"run.feedbackPick":`Wähle oben, was sich ändern soll.`,"ai.generated":`KI-generiert`,"ai.modified":`Mit KI verändert`,"ai.publish":`Mit KI erstellt: Wer das veröffentlicht, muss es als KI-generiert kennzeichnen (EU AI Act, Art. 50). Die Datei trägt die Kennzeichnung bereits in ihren Metadaten.`,"run.regenerateGo":`Neu erstellen`,"run.retry":`Erneut versuchen`,"run.again":`Nochmal`,"run.download":`Herunterladen`,"run.copy":`Text kopieren`,"run.failed":`Da hat etwas nicht geklappt.`,"run.unavailable":`Dieser Wizard ist gerade nicht verfügbar.`,"run.notFound":`Diesen Wizard gibt es nicht (mehr).`,"run.madeWith":`Erstellt mit engenty wizards`,"run.working":`Einen Moment …`,"run.elapsed":`{s} s`,"run.cancelled":`Abgebrochen.`,"run.addRow":`Zeile hinzufügen`,"run.upload":`Datei wählen oder hierher ziehen`,"run.uploading":`Lädt hoch …`,"run.required":`Pflichtfeld`,"run.net":`Netto`,"run.vat":`USt. {r} %`,"run.total":`Gesamt`,"settings.title":`Einstellungen`,"settings.project":`Projekt`,"settings.name":`Name`,"settings.mcp":`Verbundene Systeme (MCP)`,"settings.mcpHint":`KI-Schritte können in diese Systeme schreiben oder daraus lesen – nur, wenn du sie im Schritt freigibst.`,"settings.addServer":`System verbinden`,"settings.serverName":`Name`,"settings.serverUrl":`MCP-URL`,"settings.serverHeader":`Authorization-Header (optional)`,"settings.save":`Speichern`,"settings.saved":`Gespeichert`,"settings.delete":`Projekt löschen`,"settings.copy":`Kopieren`,"settings.copied":`Kopiert`,"settings.lastUsed":`zuletzt {when}`,"settings.neverUsed":`noch nie benutzt`,"settings.revoke":`Schlüssel löschen`,"mcp.appsDisconnect":`Austragen`,"plugins.title":`Plugins`,"plugins.hint":`Plugins erweitern diese App um Seiten, Einstellungen und Werkzeuge für Schritte. Sie laufen mit allen Rechten der App: installiere nur, was du kennst.`,"plugins.hintManaged":`Diese Plugins sind für dein Konto freigeschaltet.`,"plugins.reload":`Neu laden`,"plugins.rescan":`Neu suchen`,"plugins.tools":`Werkzeuge für Schritte`,"plugins.serverFailed":`Der Server-Teil hat nicht geladen: {error}`,"plugins.studioFailed":`Der Studio-Teil hat nicht geladen: {error}`,"plugins.problems":`Kein Plugin`,"plugins.crashed":`Dieser Teil eines Plugins ist abgestürzt.`,"mcp.notReverse":`Nicht verwechseln mit „Verbundene Systeme (MCP)“ unter Connectors: Dort ruft engenty andere Server auf, hier ruft dein Client engenty auf.`,"integrate.nav":`Einbinden`,"integrate.title":`Wizards einbinden`,"integrate.lead":`Bring deine Wizards dorthin, wo du arbeitest. Jede KI-App bekommt sie als MCP – die Werkzeuge, um Wizards zu finden, zu starten und zu bauen. Apps, die MCP Apps zeigen, zeigen beim Start den Wizard selbst, Seite für Seite.`,"integrate.groupApps":`KI-Apps`,"integrate.groupShare":`Teilen`,"integrate.shareLink":`Per Link teilen`,"integrate.shareSite":`In eine Website einbinden`,"integrate.soon":`bald`,"integrate.stateWorks":`funktioniert`,"integrate.stateConnected":`eingetragen`,"integrate.stateInstalled":`auf diesem Computer`,"integrate.leadApp":`Bekommt die Werkzeuge und zeigt beim Start den Wizard selbst.`,"integrate.leadMcp":`Bekommt die Werkzeuge; ein Lauf geht als Text im Chat.`,"integrate.kindMcp":`Werkzeuge im Chat: Wizards finden, starten, ausfüllen – und bauen.`,"integrate.kindApp":`Der Wizard selbst im Chat, Seite für Seite, als Widget.`,"integrate.kindAppNo":`Zeigt diese App nicht – ein Lauf kommt als Text.`,"integrate.where":`Wo läuft die App?`,"integrate.here":`Auf diesem Computer`,"integrate.hereHint":`Ein Klick, kein Schlüssel. Die App startet engenty wizards selbst.`,"integrate.hereManaged":`Nur mit engenty wizards auf deinem Computer.`,"integrate.address":`Über die Adresse`,"integrate.addressHint":`Von überall, wo die Adresse erreichbar ist – mit Schlüssel.`,"integrate.connectTitle":`Eintragen`,"integrate.connectHint":`Trägt engenty wizards in die Einstellungen von {app} ein.`,"integrate.connect":`In {app} eintragen`,"integrate.connected":`In {app} eingetragen`,"integrate.notInstalled":`{app} ist auf diesem Computer nicht zu finden. Eintragen geht trotzdem – es wirkt, sobald {app} da ist.`,"integrate.file":`In {file} eintragen:`,"integrate.vscode":`In VS Code: „MCP: Open User Configuration“, dann eintragen:`,"integrate.chatgpt":`In ChatGPT: Einstellungen → Apps & Connectors → Erweitert → Entwicklermodus, dann „Erstellen“ mit dieser Adresse:`,"integrate.generic":`In den MCP-Einstellungen der App einen Server mit dieser Adresse anlegen (Streamable HTTP):`,"integrate.oauthLocal":`Diese App verbindet sich von den Servern ihres Herstellers aus – diesen Computer erreicht sie nicht. Nimm hier „Auf diesem Computer“ oder eine App, die hier läuft.`,"integrate.test":`Testen`,"integrate.seen":`{app} meldet sich`,"integrate.restart":`Beende {app} ganz und starte es neu – dann meldet es sich hier.`,"integrate.reload":`Lade die MCP-Server in {app} neu oder starte es neu.`,"integrate.tool":`Ein Werkzeug aufgerufen`,"integrate.askHint":`Schreib in {app} in einem neuen Chat:`,"integrate.askTool":`Welche Wizards habe ich in engenty?`,"integrate.widget":`Wizard als Widget gezeigt`,"integrate.widgetHint":`Starte einen veröffentlichten Wizard:`,"integrate.askWidget":`Starte einen meiner engenty Wizards.`,"integrate.works":`{app} arbeitet mit deinen Wizards.`,"mcp.notHere":`Geht mit diesem Server nicht`,"mcp.needsPublic":`claude.ai verbindet sich von Anthropics Servern aus. Das geht nur, wenn dieser Server öffentlich über HTTPS erreichbar ist.`,"mcp.keyTitle":`Schlüssel erstellen`,"mcp.keyHint":`Mit dem Schlüssel meldet sich dein Client an. Er wird nur einmal angezeigt und steht dann gleich im Befehl im nächsten Schritt.`,"mcp.keyCreate":`Schlüssel für {client} erstellen`,"mcp.keyReady":`Schlüssel erstellt – er steht schon im Befehl unten.`,"mcp.keyFirst":`Erst den Schlüssel erstellen – dann steht hier der fertige Befehl.`,"mcp.add":`Server eintragen`,"mcp.terminal":`Im Terminal ausführen:`,"mcp.ccPlugin":`Optional das Plugin – es bringt den Befehl /wizard mit:`,"mcp.codexKey":`Im Terminal ausführen – Codex liest den Schlüssel aus einer Umgebungsvariable:`,"mcp.claudeAi":`In claude.ai: Einstellungen → Konnektoren → Eigenen Konnektor hinzufügen, diese Adresse eintragen:`,"mcp.oauth":`Kein Schlüssel nötig: Beim ersten Aufruf meldet sich dein Client im Browser an.`,"mcp.addressPublic":`Öffentlich erreichbar.`,"mcp.addressLocal":`Nur auf diesem Rechner erreichbar, und nur solange engenty wizards läuft.`,"mcp.keys":`Schlüssel`,"mcp.keysHint":`Jeder Schlüssel meldet einen Client an und hat alle Rechte – behandle ihn wie ein Passwort. Löschst du ihn, ist der Client abgemeldet.`,"editor.viaClient":`Über {client}`,"editor.changedVia":`Geändert über {client}`,"editor.merged":`Mit Änderungen von außen zusammengeführt`,"run.uploadMore":`Weitere Datei`,"run.camera":`Kamera`,"camera.title":`Mit der Kamera aufnehmen`,"camera.hint":`Gerade und gut beleuchtet ins Bild halten.`,"camera.taken":`{n} aufgenommen`,"camera.shoot":`Aufnehmen`,"camera.done":`Fertig`,"camera.denied":`Die Kamera ist für diese Seite nicht freigegeben. Erlaube sie in den Website-Einstellungen deines Browsers (Schloss-Symbol in der Adresszeile) – oder nimm das Foto mit der Kamera-App auf.`,"connect.go":`Verbinden`,"connect.connected":`Verbunden über {name}`,"connect.disconnect":`Trennen`,"connect.none":`Auf diesem Server ist noch kein Anbieter zum Verbinden eingerichtet.`,"connect.openLink":`Hier klicken, um die Anmeldung in einem neuen Tab zu öffnen`,"list.empty":`Noch keine Einträge.`,"list.delete":`Zeile löschen`,"ask.typeInto":`Text in die Seite tippen …`,"ask.hide":`verdeckt`,"ask.up":`Nach oben`,"ask.down":`Nach unten`,"ask.pictureHint":`Das ist die Seite, die der Wizard geöffnet hat. Du kannst auch direkt ins Bild klicken und tippen.`,"ask.remember":`Anmeldung für nächstes Mal merken`,"ask.private":`Was du eingibst, geht direkt in die Seite. Die KI bekommt es nicht zu sehen. Gemerkte Anmeldungen werden verschlüsselt gespeichert.`,"ask.skip":`Überspringen`,"ask.done":`Ich bin angemeldet`,"ask.signIn":`Anmelden`,"ask.wants":`Der Wizard möchte in {service} Folgendes ausführen:`,"ask.allowRest":`Für den Rest dieses Durchlaufs erlauben`,"ask.allow":`Erlauben`,"ask.deny":`Nicht erlauben`,"store.open":`Was dieser Wizard sich merkt`,"store.title":`Gespeichert für dich`,"store.explain":`Dieser Wizard merkt sich Listen, Dateien und verbundene Konten für deinen nächsten Durchlauf. Nur du siehst sie.`,"store.empty":`Noch nichts gespeichert.`,"store.rows":`{n} Einträge`,"store.signIns":`Gemerkte Anmeldungen im Browser`,"store.files":`{n} Dateien · {size}`,"store.delete":`Alles löschen`,"store.confirmDelete":`Wirklich alles löschen`,"common.close":`Schließen`,"connectors.title":`Connectors`,"connectors.hint":`Dienste, in denen ein Wizard für die Person arbeiten kann – sie verbindet beim Durchlauf ihr eigenes Konto. Die wichtigsten sind eingebaut; jeden weiteren findest du im Verzeichnis integrations.sh und importierst ihn aus seiner OpenAPI-Beschreibung oder seinem MCP-Server.`,"connectors.imported":`Aus dem Verzeichnis`,"connectors.notSetUp":`nicht eingerichtet`,"connectors.setup":`Auf dem Server fehlen:`,"connectors.search":`Dienst suchen, z. B. Notion, Stripe, GitHub`,"connectors.find":`Suchen`,"connectors.none":`Nichts gefunden.`,"connectors.import":`Importieren`,"connectors.exists":`Schon importiert.`,"connectors.ownClient":`Eigener OAuth-Client`,"connectors.refresh":`Aktionen neu laden`,"connectors.remove":`Entfernen`,"connectors.actions":`{n} Aktionen, {r} lesend`,"connectors.pending":`Aktionen erscheinen, sobald ein Konto verbunden ist`,"connectors.needsClient":`Dieser Dienst braucht einen OAuth-Client (ID und Secret). Entfernen und mit „Eigener OAuth-Client“ neu importieren.`,"connectors.authNone":`ohne Anmeldung`,"connectors.authOauth":`Anmeldung per OAuth`,"connectors.authKey":`API-Schlüssel`,"connectors.group.read":`liest`,"connectors.group.write":`ändert`,"connectors.group.destructive":`löscht`,"run.uploadTouch":`Datei wählen`,"run.maxFiles":`Hier gehen höchstens {n} – die übrigen habe ich weggelassen.`,"run.filesMin":`{n} von mindestens {min}`,"run.filesOf":`{n} von höchstens {max}`,"run.moveFile":`Nr. {n} verschieben`,"run.moveFileHint":`Ziehen, um die Reihenfolge zu ändern`,"run.removeFile":`Entfernen`,"run.awake":`Der Bildschirm bleibt an, solange der Wizard arbeitet.`,"run.openFull":`Groß öffnen`,"run.yes":`Ja`,"run.no":`Nein`,"run.share":`Teilen`,"run.shareNow":`Jetzt teilen`,"run.shareFile":`Als Datei teilen oder in einer App öffnen`,"camera.asking":`Dein Browser fragt gleich nach der Kamera. Das Bild bleibt in diesem Wizard.`,"camera.missing":`An diesem Gerät wurde keine Kamera gefunden. Lade stattdessen ein Foto hoch.`,"camera.busy":`Die Kamera wird gerade von einer anderen App verwendet. Schließe sie und versuche es noch einmal.`,"camera.native":`Kamera-App öffnen`,"camera.pick":`Foto auswählen`,"camera.torch":`Licht`,"camera.flip":`Kamera wechseln`,"camera.photo":`Foto`,"camera.video":`Video`,"camera.record":`Aufnahme starten`,"camera.stop":`Aufnahme beenden`,"camera.recording":`Nimmt auf – tippe zum Beenden.`,"camera.clipHint":`Ein kurzer Clip, höchstens {s} Sekunden.`,"camera.hintMany":`Seite für Seite aufnehmen, dann „Fertig“.`,"scan.button":`Scannen`,"scan.title":`Code scannen`,"scan.asking":`Dein Browser fragt gleich nach der Kamera – sie liest nur den Code.`,"scan.hint":`Halte den QR- oder Strichcode in den Rahmen.`,"scan.hintQr":`Halte den QR-Code in den Rahmen. Strichcodes liest dieses Gerät hier nicht.`,"scan.miss":`Auf dem Foto war kein Code zu erkennen. Versuch es näher und schärfer.`,"scan.fromPhoto":`Foto mit dem Code wählen`,"scan.typeInstead":`Lieber eintippen`,"location.use":`Meinen Standort übernehmen`,"location.locating":`Standort wird bestimmt …`,"location.refining":`wird noch genauer …`,"location.accuracy":`auf etwa {m} m genau`,"location.map":`Karte`,"location.remove":`Standort entfernen`,"location.why":`Dein Browser fragt nach deinem Standort. Er wird nur für diesen Wizard verwendet. Du kannst auch einfach die Adresse eintippen.`,"location.denied":`Der Standort ist für diese Seite nicht freigegeben. Erlaube ihn in den Website-Einstellungen deines Browsers (Schloss-Symbol in der Adresszeile) – oder tippe die Adresse unten ein.`,"location.unavailable":`Dein Gerät konnte den Standort gerade nicht bestimmen. Versuch es im Freien noch einmal oder tippe die Adresse ein.`,"location.timeout":`Das hat zu lange gedauert. Versuch es noch einmal oder tippe die Adresse ein.`,"location.manual":`Adresse oder Ort eintippen`,"location.label":`Adresse oder Beschreibung des Orts`,"voice.start":`Sprachnotiz aufnehmen`,"voice.stop":`Stopp`,"voice.recording":`Aufnahme läuft …`,"voice.left":`noch {s} s`,"voice.again":`Neu aufnehmen`,"voice.remove":`Löschen`,"voice.pick":`Audiodatei wählen`,"voice.why":`Dein Browser fragt nach dem Mikrofon. Die Aufnahme wird danach in Text umgewandelt.`,"voice.denied":`Das Mikrofon ist für diese Seite nicht freigegeben. Erlaube es in den Website-Einstellungen deines Browsers – oder nimm die Notiz mit der Diktier-App auf und wähle die Datei.`,"voice.noRecorder":`Dieser Browser kann hier nicht aufnehmen. Nimm die Notiz mit der Diktier-App auf und wähle die Datei.`,"sign.open":`Hier unterschreiben`,"sign.hint":`Mit dem Finger unterschreiben`,"sign.pad":`Unterschriftsfeld`,"sign.clear":`Löschen`,"sign.accept":`Übernehmen`,"sign.again":`Neu unterschreiben`,"sign.remove":`Unterschrift entfernen`,"notify.ask":`Bescheid geben, wenn es fertig ist`,"notify.on":`Du bekommst Bescheid`,"notify.why":`Mit Ton, Vibration oder einer Mitteilung. Dein Browser fragt dafür einmal um Erlaubnis.`,"notify.onHint":`Du kannst die App wechseln – eine Mitteilung holt dich zurück.`,"notify.quiet":`Mit Ton und Vibration, solange diese Seite offen ist.`,"notify.blocked":`Mitteilungen sind für diese Seite blockiert – es gibt Ton und Vibration, solange sie offen ist. Erlauben kannst du sie in den Website-Einstellungen deines Browsers.`,"notify.done":`Dein Ergebnis ist fertig.`,"notify.next":`Es geht weiter – wirf einen Blick darauf.`,"notify.needsYou":`Der Wizard braucht dich kurz.`,"install.add":`Zum Startbildschirm hinzufügen`,"install.ios":`Tippe unten auf „Teilen“ und dann auf „Zum Home-Bildschirm“.`,"install.app.offer":`Installiere das Studio als App: eigenes Fenster, eigenes Symbol im Dock oder in der Taskleiste.`,"install.app.browser":`In Chrome oder Edge lässt sich das Studio als App installieren: eigenes Fenster, eigenes Symbol.`,"install.app.action":`Als App installieren`,"install.app.close":`Schließen`,"common.offline":`Keine Verbindung. Prüfe dein Netz und versuch es noch einmal.`,"common.retry":`Erneut versuchen`,"common.cancel":`Abbrechen`,"common.loading":`Lädt …`,"common.error":`Fehler`,"project.rename":`Projekt umbenennen`,"project.saving":`Speichert …`,"project.base":`Basis`,"project.baseHint":`Wer hinter den Wizards steht. Jeder KI-Schritt kennt das.`,"project.title":`Titel`,"project.titleHint":`Firma, Marke oder Vorhaben – so sehen es auch Endnutzer.`,"project.about":`Über`,"project.aboutHint":`Was ihr macht, für wen, und in welchem Ton ihr schreibt.`,"project.logos":`Logos`,"project.logosHint":`Das erste Logo sehen Endnutzer. Eine Beschreibung sagt, wofür eine Variante gedacht ist.`,"project.logoAdd":`Logo`,"project.logoMain":`Hauptlogo`,"project.logoMakeMain":`Als Hauptlogo`,"project.colors":`Farben`,"project.colorsHint":`Die erste Farbe ist der Akzent in Dokumenten, Dashboards und auf öffentlichen Seiten.`,"project.colorAdd":`Farbe`,"project.colorName":`z. B. Primär – Buttons und Überschriften`,"project.colorUse":`Beschreibe, wie engenty diese Farbe einsetzen soll.`,"project.colorAddTitle":`Farbe hinzufügen`,"project.colorValue":`Farbwert`,"project.colorUseLabel":`Verwendung`,"project.add":`Hinzufügen`,"project.colorAccent":`Akzent`,"project.colorFirst":`Als Akzent`,"project.assets":`Assets`,"project.assetsHint":`Bilder, Grafiken, Videos. KI-Schritte setzen sie in Dokumente und wählen nach der Beschreibung.`,"project.assetAdd":`Dateien`,"project.assetSearch":`Assets filtern …`,"project.documents":`Dokumente`,"project.documentsHint":`PDFs, Listen, Excel, Word, Text. Sie werden gelesen und kommen in einen Index, den jeder KI-Schritt durchsucht.`,"project.documentAdd":`Dokumente`,"project.drop":`Hierher ziehen oder`,"project.description":`Beschreibung hinzufügen …`,"project.describing":`Wird angesehen …`,"project.reading":`Wird gelesen …`,"project.indexed":`Im Index`,"project.indexedKeywords":`Im Index (Stichwörter)`,"project.notIndexed":`Kein Text gefunden`,"project.reindex":`Neu einlesen`,"project.pages":`{n} Seiten`,"project.keywordsOnly":`Der Index sucht gerade nach Stichwörtern. Mit einem AI-Gateway- oder OpenAI-Schlüssel kommt die Suche nach Bedeutung dazu.`,"project.preview":`Vorschau`,"project.viewList":`Als Liste zeigen`,"project.viewCards":`Als Karten zeigen`,"project.original":`Original`,"project.readText":`Gelesener Text`,"project.openOriginal":`Original öffnen`,"project.noText":`Noch kein Text: das Dokument wird gerade gelesen oder ließ sich nicht lesen.`,"project.textCut":`Die Vorschau zeigt den Anfang ({shown} von {total} Zeichen).`,"project.searchTest":`Im Index suchen …`,"project.searchNone":`Nichts gefunden.`,"project.remove":`Entfernen`,"project.removeConfirm":`„{name}“ entfernen?`,"project.facts":`Fakten`,"project.factsHint":`Was Wizards wissen sollen: Adresse, UID, Öffnungszeiten – alles, was passt.`,"project.factLabel":`Bezeichnung`,"project.factValue":`Wert`,"project.factAdd":`Eintrag`,"project.factType":`Typ`,"project.factAuto":`Automatisch`,"project.type.text":`Text`,"project.type.longtext":`Langer Text`,"project.type.number":`Zahl`,"project.type.date":`Datum`,"project.type.url":`Link`,"project.type.email":`E-Mail`,"project.type.phone":`Telefon`,"project.type.boolean":`Ja / Nein`,"project.yes":`Ja`,"project.no":`Nein`,"project.assistant":`Assistent`,"project.assistantTitle":`Lass dir das Projekt ausfüllen`,"project.assistantHello":`Erzähl mir von eurem Projekt, nenn mir die Website oder gib mir Dateien. Ich trage ein, was ich finde: Titel, Beschreibung, Logo, Farben und Fakten.`,"project.assistantComposer":`z. B. „Lies unsere Website example.at“ …`,"project.assistantChanged":`Projekt aktualisiert`,"flowApp.loading":`Der Wizard kommt …`,"flowApp.draft":`Entwurf`,"flowApp.published":`Veröffentlicht`,"flowApp.issues":`{n} Fehler im Entwurf`,"flowApp.flow":`Ablauf`,"flowApp.notPublished":`Veröffentliche ihn im Studio, dann läuft er hier.`,"flowApp.runPage":`Im Browser weiter`,"flowApp.inBrowser":`Nur im Browser: {fields}`,"flowApp.done":`Fertig`,"flowApp.credits":`{n} Credits`,"flowApp.ask":`Der Wizard fragt`,"flowApp.allow":`Erlauben`,"flowApp.skip":`Überspringen`,"flowApp.signIn":`Eine Anmeldung bei {site} – das geht nur im Browser.`,"flowApp.fullscreen":`Größer`,"flowApp.inline":`Kleiner`,"flowApp.failed":`Das hat nicht geklappt: {error}`},cb={"brand.tagline":`Build AI wizards, no code.`,"brand.sub":`Describe a flow in your own words. engenty turns it into a wizard you share with a link.`,"auth.dev":`Dev login (local)`,"auth.legal":`No password, no sign-up form — you sign in with an account you already have.`,"auth.signIn":`Sign in or create an account`,"auth.failed":`Sign-in did not work. Please try again.`,"auth.localLink":`Open the link the app printed at start — it signs you in on this device.`,"nav.account":`Account & credits`,"setup.keysInAccount":`API keys for scripts belong to your account. You create and revoke them there.`,"setup.openAccount":`Open account`,"class.label":`Model class`,"class.classifier":`Classifier`,"class.standard":`Standard`,"class.high":`High`,"class.highest":`Highest`,"class.image":`Image`,"class.video":`Video`,"class.audio":`Audio`,"class.speech":`Speech`,"class.classifier.hint":`Routing, yes/no, pulling a few values out of text. Cheapest.`,"class.standard.hint":`Short copy, calling an API, reformatting.`,"class.high.hint":`Research with tools, long documents, weighing many sources.`,"class.highest.hint":`Hard reasoning or code. Several times the cost of High.`,"class.effort":`Thinking effort`,"class.effortAuto":`Automatic`,"class.effort.low":`Low`,"class.effort.medium":`Medium`,"class.effort.high":`High`,"estimate.step":`≈ {n} credits, rarely more than {high}`,"estimate.measured":`measured from the latest runs`,"estimate.formula":`estimated, gets exact after five runs`,"estimate.share":`A run costs about {run} credits. At the daily limit that is at most {day} credits a day.`,"local.title":`Models & account`,"local.hint":`This app runs on your device. It works with your own keys, a local model or the credits of your account.`,"local.account":`Account`,"local.accountHint":`An account is optional. With it you use credits instead of own keys and publish wizards to the cloud.`,"local.accountSignIn":`Sign in or create an account`,"local.accountWaiting":`Waiting for the sign-in in your browser …`,"local.accountFailed":`The account service cannot be reached right now.`,"local.accountExpired":`The sign-in has expired. Please sign in again.`,"local.topUp":`Credits`,"local.source":`Models run on`,"local.sourceOwn":`Own keys`,"local.sourceAccount":`The account's credits`,"local.sourceAccountHint":`Every model call goes through the account. Which model serves a class is set by the service.`,"local.keys":`Keys`,"local.keysHint":`One key is enough. Keys live in this device's keychain, never in the database.`,"local.keySet":`stored`,"local.keyEmpty":`not stored`,"local.keyRemove":`Remove`,"local.classes":`Model per class`,"local.classesHint":`A step names only the class. Here is which model serves it, e.g. anthropic/claude-haiku-4.5, openai:gpt-5.4-mini or ollama:qwen3.`,"local.save":`Save`,"local.saved":`Saved`,"local.chat":`The studio chat answers on`,"local.chatModels":`Model class Highest`,"local.chatClaude":`Claude subscription (Claude Code)`,"local.subscription":`With the subscription, the Claude Code installed on this device builds the wizard — on your sign-in there. Runs keep using keys or credits.`,"harness.hint":`Text thinks on the {name} installed on this device — on your {sub} and your sign-in there. No key needed. Images, video and audio still need a key.`,"harness.hintImages":`Text and images come from the {name} installed on this device — on your {sub} and your sign-in there. No key needed. Video and audio still need a key.`,"harness.found":`{name} {version} found`,"harness.missing":`{name} is not installed on this device.`,"harness.install":`Or in your own terminal:`,"harness.installButton":`Install {name}`,"harness.installing":`{name} installs in the terminal below — it takes about a minute. Then you sign it in.`,"harness.installEnded":`The install ended, but {name} is not there. What it printed above says why.`,"harness.appHere":`The {app} app is on this computer: {name} signs in with the same {sub}.`,"harness.notInstalled":`not installed`,"harness.authSubscription":`Signed in with your {sub}.`,"harness.authKey":`Signed in with an API key from your shell — not the subscription. Sign in here so it runs on your {sub}.`,"harness.authNone":`Not signed in yet.`,"harness.signIn":`Sign in here`,"harness.signingIn":`The sign-in runs in the terminal below — your browser opens for it. The terminal closes once the sign-in is there.`,"harness.signInInteractive":`{name} starts below. Pick the sign-in with your {sub} there and sign in in the browser. The terminal closes once the sign-in is there.`,"harness.loginEnded":`The sign-in ended without {name} being signed in.`,"harness.sub.claude":`Claude subscription`,"harness.sub.codex":`ChatGPT subscription`,"harness.sub.gemini":`Google account`,"harness.sub.cursor":`Cursor subscription`,"harness.desc.claude":`On your Claude subscription — no key needed.`,"harness.desc.codex":`On your ChatGPT subscription — no key needed.`,"harness.desc.gemini":`On your Google account — no key needed.`,"harness.desc.cursor":`On your Cursor subscription — no key needed.`,"harness.ready":`signed in`,"local.recheck":`Check again`,"local.test":`Test`,"local.testHint":`One short call shows whether the way to the model is open.`,"local.testOk":`Answered in {s} s on {ref}: “{reply}”`,"local.testFailed":`The test did not work: {error}`,"setup.title":`Setup`,"setup.sub":`Engenty can use your existing accounts on your computer.`,"setup.source":`Choose your Engine`,"setup.local":`Runs locally on this device.`,"setup.stage.connect":`Connect`,"setup.stage.test":`Test`,"setup.stage.done":`Done`,"setup.h.install":`Install {name}`,"setup.h.signIn":`Sign in to {name}`,"setup.h.keys":`Enter a key`,"setup.h.test":`One short test`,"setup.h.done":`Connected.`,"setup.ready":`All set.`,"setup.noHarness":`No AI client installed yet. Pick one — it installs right here — or enter your own keys.`,"setup.ownDesc":`AI Gateway, OpenAI, Anthropic or Ollama.`,"setup.recommended":`Recommended`,"setup.done":`Open the studio`,"setup.untilWorks":`The studio opens once the test works.`,"cloud.title":`In the cloud`,"cloud.publish":`Publish`,"cloud.update":`Update`,"cloud.hint":`Puts the wizard into the account. Its link there runs on the account's credits, even when this device is off.`,"cloud.failed":`Publishing to the cloud did not work.`,"nav.wizards":`Wizards`,"nav.settings":`Settings`,"account.title":`Account`,"account.hint":`What the app calls you and how to reach you.`,"account.initials":`Your initials in the menu at the top right: the first letters of your name.`,"account.name":`Name`,"account.nameHint":`It starts as this device's user name.`,"account.fromAccount":`Name and e-mail come from your account.`,"account.about":`About you`,"account.aboutHint":`Who you are and what you do.`,"account.email":`E-mail`,"account.phone":`Phone`,"account.connection":`Install`,"account.connectionHint":`Where this app runs and what it is connected to.`,"account.local":`Local install`,"account.localText":`This app runs on your device and is not connected to an account. Wizards, project data and files stay here.`,"account.linked":`Connected`,"account.look":`Appearance`,"account.lookHint":`Language and theme of the app in this browser.`,"nav.logout":`Sign out`,"nav.language":`Language`,"nav.theme":`Theme`,"nav.credits":`{n} credits`,"footer.billing":`Credits`,"footer.usage":`Usage`,"footer.invoices":`Invoices`,"footer.account":`Account`,"about.version":`Version {v}`,"about.update.available":`Version {v} of engenty wizards is out.`,"about.update.install":`Update`,"about.update.installing":`Installing version {v} …`,"about.update.restarting":`Restarting with version {v} …`,"about.update.done":`Installed. Restart engenty wizards to use {v}.`,"about.update.failed":`The update failed. Logs: logs/update.log`,"about.update.notes":`What's new`,"about.changelog":`Changelog`,"about.changelogHint":`What changed from release to release.`,"about.changelogEmpty":`Nothing here yet.`,"about.unreleased":`Unreleased`,"about.breaking":`breaking`,"about.credits":`Open source`,"about.creditsHint":`engenty wizards and the open-source software it builds on.`,"about.creditsProduct":`engenty`,"about.creditsBuiltWith":`Built with`,"about.creditsDeps":`Direct dependencies`,"about.creditsDepsHint":`What the parts of this app include themselves, with version and license — without their own dependencies.`,"about.creditsShared":`Used by more than one part`,"about.search":`Search …`,"about.noMatches":`No matches.`,"theme.dark":`Dark theme`,"theme.light":`Light theme`,"home.title":`Your wizards`,"home.new":`New wizard`,"home.import":`Import`,"import.failed":`The import did not work`,"home.empty":`No wizards in this project yet.`,"home.live":`Live`,"home.draft":`Draft`,"home.steps":`{n} steps`,"home.newProject":`New project`,"home.projectName":`Project name`,"home.projectLimit":`At most {n} projects`,"new.title":`What should your wizard do?`,"new.placeholder":`e.g. Customers enter their product and audience, the wizard researches competitors and writes a positioning briefing as a PDF.`,"new.build":`Build wizard`,"new.orStarter":`Or start from a template`,"new.import":`Import a wizard package`,"new.hint":`You can change everything afterwards in the conversation.`,"editor.resize":`Resize — double-click resets`,"editor.export":`Export as a package (.wizard)`,"editor.chat":`Conversation`,"editor.step":`Steps`,"editor.runs":`Runs`,"editor.reviewEditable":`editable`,"editor.reviewRedo":`can be redone`,"editor.otherwise":`otherwise`,"editor.whenFilled":`{field} filled in`,"editor.whenEmpty":`{field} empty`,"tool.web_search":`Web search`,"tool.web_fetch":`Read web pages`,"tool.browser":`Browser`,"tool.sandbox":`Code & shell`,"tool.image":`Images`,"tool.http":`API`,"editor.test":`Test`,"editor.share":`Share`,"editor.publish":`Publish`,"editor.published":`Live · version {v}`,"editor.unpublishedChanges":`Unpublished changes`,"editor.notPublished":`Not published yet`,"editor.composer":`Describe what should change …`,"editor.attach":`Attach files`,"editor.detach":`Remove`,"editor.attached":`Attached`,"editor.thread":`Thread`,"editor.voice":`Dictate`,"editor.voiceStop":`Stop dictating`,"editor.listening":`Listening …`,"editor.transcribing":`Writing it down …`,"editor.micDenied":`The microphone is not allowed for this page.`,"editor.building":`Building the flow …`,"editor.files":`Files`,"files.explain":`What your wizard needs on every run: widget code, libraries, map outlines, price lists. The assistant creates them in the chat – you can upload your own too.`,"files.upload":`Upload`,"files.count":`{n} files · {size}`,"files.empty":`No files yet. Drop files here or ask the assistant to build a widget.`,"files.download":`Download`,"files.delete":`Delete`,"files.confirmDelete":`Delete “{path}”?`,"editor.thinking":`Thinking …`,"editor.chatBroken":`The connection dropped. What was already built is saved – please send your message again.`,"editor.issues":`Before you test or share, the wizard needs a few fixes:`,"editor.fixWithChat":`Let the assistant fix it`,"editor.models.blocking":`The wizard can't start like this. Models are missing:`,"editor.models.optional":`These steps won't run like this. Choose a path without them when testing, or set up the models:`,"editor.models.settings":`Set up models`,"editor.prevStep":`Previous step`,"editor.nextStep":`Next step`,"editor.deleteStep":`Delete step`,"editor.moveUp":`Move up`,"editor.moveDown":`Move down`,"editor.noRuns":`No runs yet.`,"editor.restart":`Restart`,"editor.close":`Close`,"editor.chatHello":`Tell me what your wizard should do. I'll build the flow and you'll see it as a diagram on the left.`,"shareRun.button":`Share`,"shareRun.title":`Share result`,"shareRun.email":`Email`,"shareRun.more":`More …`,"shareRun.until":`The link works until {date}.`,"shareRun.kept":`The link works until you withdraw it.`,"shareRun.withdraw":`Withdraw link`,"sharePage.gone":`This link has expired or was withdrawn.`,"sharePage.own":`Try it yourself`,"sharePage.until":`Shared · available until {date}`,"sharePage.shared":`Shared on {date}`,"share.title":`Share wizard`,"share.link":`Link`,"share.copy":`Copy`,"share.copied":`Copied`,"share.enabled":`Link is active`,"share.limit":`Runs per day`,"share.rotate":`Create a new link`,"share.rotateHint":`The old link stops working.`,"share.publishFirst":`Publish the wizard so the link works.`,"share.open":`Open`,"embed.title":`Embed in a website`,"embed.inline":`Inline`,"embed.modal":`Button + modal`,"embed.inlineHint":`Paste the tag into your page's HTML. The wizard appears in that place.`,"embed.modalHint":`Paste the tag into your page's HTML. A button appears in that place and opens the wizard in a window.`,"type.page":`Page`,"type.agent":`AI step`,"type.generate":`Generate`,"type.widget":`Widget`,"type.review":`Review`,"type.result":`Result`,"run.start":`Let's go`,"run.next":`Continue`,"run.back":`Back`,"run.accept":`Looks good`,"run.regenerate":`New version`,"run.edit":`Edit`,"run.resume":`Continue your last run`,"run.regenerateNote":`What should change?`,"run.pickItem":`No. {n}`,"run.pickedItem":`No. {n} again`,"run.regeneratePicked":`Only no. {n} will be made again.`,"run.regenerateAll":`Applies to all. Tap a number to change single ones only.`,"check.progress":`{done} of {total} checked`,"check.onlyOpen":`Open only`,"check.noFile":`There is no file for this row.`,"check.noPreview":`This file has no preview – open it with the link above.`,"check.reopen":`Open again`,"market.search":`Search templates …`,"market.all":`All`,"market.industry":`Industry`,"market.format":`Result`,"market.capability":`Capability`,"market.unavailable":`not set up`,"market.missing":`Not set up here: {list}`,"market.missingHint":`This needs a model that isn't set up here: {list}. Set it up under Models.`,"market.none":`No template matches this selection.`,"market.notFound":`There is no such template (any more).`,"market.star":`Star`,"market.starred":`Starred`,"market.starHint":`Starred templates are kept on this computer, ready without a connection.`,"market.noneStarred":`You haven't starred a template yet.`,"market.offline":`No connection to the marketplace: you see the templates kept here.`,"market.more":`Show more`,"market.reset":`Reset selection`,"market.count":`{n} templates`,"market.countOf":`{n} of {all} templates`,"market.countOfShort":`{n} of {all}`,"market.resetShort":`Reset`,"market.minutes":`~ {n} min`,"market.credits":`~ {n} credits per run`,"market.needsUpdate":`Needs a newer app`,"market.needsUpdateHint":`This template uses features your app does not know yet. Update the app, then you can use it.`,"market.use":`Start with this template`,"market.steps":`How the wizard runs`,"market.duration":`Duration`,"market.durationHint":`from start to result, with {n} inputs from you`,"market.result":`Result`,"market.creditsRange":`~ {n} credits`,"market.creditsHint":`estimated per run, rarely more than twice that`,"market.needs":`Needs`,"market.cost":`Cost`,"new.forWebsite":`Small helpers for your website`,"run.feedbackPlaceholder":`Something not right? Write what should be different …`,"run.feedbackTarget":`What should change?`,"run.feedbackPick":`Pick above what should change.`,"ai.generated":`AI generated`,"ai.modified":`AI modified`,"ai.publish":`Made with AI: whoever publishes this has to label it as AI-generated (EU AI Act, Art. 50). The file already carries the marking in its metadata.`,"run.regenerateGo":`Recreate`,"run.retry":`Try again`,"run.again":`Start over`,"run.download":`Download`,"run.copy":`Copy text`,"run.failed":`Something went wrong.`,"run.unavailable":`This wizard is not available right now.`,"run.notFound":`This wizard does not exist (anymore).`,"run.madeWith":`Made with engenty wizards`,"run.working":`One moment …`,"run.elapsed":`{s} s`,"run.cancelled":`Cancelled.`,"run.addRow":`Add row`,"run.upload":`Choose a file or drop it here`,"run.uploading":`Uploading …`,"run.required":`Required`,"run.net":`Net`,"run.vat":`VAT {r} %`,"run.total":`Total`,"settings.title":`Settings`,"settings.project":`Project`,"settings.name":`Name`,"settings.mcp":`Connected systems (MCP)`,"settings.mcpHint":`AI steps can read from and write to these systems — only when you allow it on the step.`,"settings.addServer":`Connect a system`,"settings.serverName":`Name`,"settings.serverUrl":`MCP URL`,"settings.serverHeader":`Authorization header (optional)`,"settings.save":`Save`,"settings.saved":`Saved`,"settings.delete":`Delete project`,"settings.copy":`Copy`,"settings.copied":`Copied`,"settings.lastUsed":`last used {when}`,"settings.neverUsed":`never used`,"settings.revoke":`Delete key`,"mcp.appsDisconnect":`Remove`,"plugins.title":`Plugins`,"plugins.hint":`Plugins add pages, settings and tools for steps to this app. They run with the app's full rights: install only what you know.`,"plugins.hintManaged":`These plugins are switched on for your account.`,"plugins.reload":`Reload`,"plugins.rescan":`Look again`,"plugins.tools":`Tools for steps`,"plugins.serverFailed":`The server half did not load: {error}`,"plugins.studioFailed":`The studio half did not load: {error}`,"plugins.problems":`Not a plugin`,"plugins.crashed":`This part of a plugin crashed.`,"mcp.notReverse":`Not the same as “Connected systems (MCP)” under Connectors: there engenty calls other servers, here your client calls engenty.`,"integrate.nav":`Integrate`,"integrate.title":`Integrate your wizards`,"integrate.lead":`Bring your wizards to where you work. Every AI app gets them as MCP — the tools to find, run and build wizards. Apps that show MCP Apps show the wizard itself when it starts, page by page.`,"integrate.groupApps":`AI apps`,"integrate.groupShare":`Share`,"integrate.shareLink":`Share by link`,"integrate.shareSite":`Put on a website`,"integrate.soon":`soon`,"integrate.stateWorks":`works`,"integrate.stateConnected":`added`,"integrate.stateInstalled":`on this computer`,"integrate.leadApp":`Gets the tools and shows the wizard itself when it starts.`,"integrate.leadMcp":`Gets the tools; a run goes as text in the chat.`,"integrate.kindMcp":`Tools in the chat: find, run and fill in wizards — and build them.`,"integrate.kindApp":`The wizard itself in the chat, page by page, as a widget.`,"integrate.kindAppNo":`This app does not show them — a run comes as text.`,"integrate.where":`Where does the app run?`,"integrate.here":`On this computer`,"integrate.hereHint":`One click, no key. The app starts engenty wizards itself.`,"integrate.hereManaged":`Only with engenty wizards on your computer.`,"integrate.address":`At the address`,"integrate.addressHint":`From anywhere the address can be reached — with a key.`,"integrate.connectTitle":`Add`,"integrate.connectHint":`Adds engenty wizards to the settings of {app}.`,"integrate.connect":`Add to {app}`,"integrate.connected":`Added to {app}`,"integrate.notInstalled":`{app} is not on this computer. You can add it anyway — it works once {app} is there.`,"integrate.file":`Put this into {file}:`,"integrate.vscode":`In VS Code: "MCP: Open User Configuration", then add:`,"integrate.chatgpt":`In ChatGPT: Settings → Apps & Connectors → Advanced → Developer mode, then "Create" with this address:`,"integrate.generic":`In the app's MCP settings, add a server at this address (Streamable HTTP):`,"integrate.oauthLocal":`This app connects from its maker's servers — it cannot reach this computer. Use "On this computer" or an app that runs here.`,"integrate.test":`Test`,"integrate.seen":`{app} checks in`,"integrate.restart":`Quit {app} completely and start it again — then it checks in here.`,"integrate.reload":`Reload the MCP servers in {app}, or restart it.`,"integrate.tool":`Called a tool`,"integrate.askHint":`In a new chat in {app}, write:`,"integrate.askTool":`Which wizards do I have in engenty?`,"integrate.widget":`Showed the wizard as a widget`,"integrate.widgetHint":`Start a published wizard:`,"integrate.askWidget":`Start one of my engenty wizards.`,"integrate.works":`{app} works with your wizards.`,"mcp.notHere":`Not possible with this server`,"mcp.needsPublic":`claude.ai connects from Anthropic's servers. That only works when this server is reachable publicly over HTTPS.`,"mcp.keyTitle":`Create a key`,"mcp.keyHint":`The key signs your client in. It is shown once and goes straight into the command in the next step.`,"mcp.keyCreate":`Create a key for {client}`,"mcp.keyReady":`Key created — it is already in the command below.`,"mcp.keyFirst":`Create the key first — then the finished command shows up here.`,"mcp.add":`Add the server`,"mcp.terminal":`Run in the terminal:`,"mcp.ccPlugin":`Optionally the plugin — it adds the /wizard command:`,"mcp.codexKey":`Run in the terminal — Codex reads the key from an environment variable:`,"mcp.claudeAi":`In claude.ai: Settings → Connectors → Add custom connector, and enter this address:`,"mcp.oauth":`No key needed: on first use your client signs in in the browser.`,"mcp.addressPublic":`Reachable publicly.`,"mcp.addressLocal":`Reachable on this computer only, and only while engenty wizards runs.`,"mcp.keys":`Keys`,"mcp.keysHint":`Each key signs one client in and has every right — treat it like a password. Delete it and that client is signed out.`,"editor.viaClient":`Via {client}`,"editor.changedVia":`Changed via {client}`,"editor.merged":`Merged with changes from elsewhere`,"run.uploadMore":`Another file`,"run.camera":`Camera`,"camera.title":`Take a picture`,"camera.hint":`Hold it flat and well lit.`,"camera.taken":`{n} taken`,"camera.shoot":`Capture`,"camera.done":`Done`,"camera.denied":`The camera is not allowed for this page. Allow it in your browser's site settings (the lock icon in the address bar) — or take the photo with your camera app.`,"connect.go":`Connect`,"connect.connected":`Connected through {name}`,"connect.disconnect":`Disconnect`,"connect.none":`No provider is set up for connecting on this server yet.`,"connect.openLink":`Click here to open the sign-in in a new tab`,"list.empty":`No entries yet.`,"list.delete":`Delete row`,"ask.typeInto":`Type into the page …`,"ask.hide":`hidden`,"ask.up":`Scroll up`,"ask.down":`Scroll down`,"ask.pictureHint":`This is the page the wizard has open. You can also click and type right in the picture.`,"ask.remember":`Remember this sign-in for next time`,"ask.private":`What you enter goes straight into the page. The AI never sees it. Remembered sign-ins are stored encrypted.`,"ask.skip":`Skip`,"ask.done":`I am signed in`,"ask.signIn":`Sign in`,"ask.wants":`The wizard wants to run this in {service}:`,"ask.allowRest":`Allow for the rest of this run`,"ask.allow":`Allow`,"ask.deny":`Don't allow`,"store.open":`What this wizard remembers`,"store.title":`Kept for you`,"store.explain":`This wizard keeps lists, files and connected accounts for your next run. Only you see them.`,"store.empty":`Nothing kept yet.`,"store.rows":`{n} entries`,"store.signIns":`Remembered sign-ins in the browser`,"store.files":`{n} files · {size}`,"store.delete":`Delete everything`,"store.confirmDelete":`Really delete everything`,"common.close":`Close`,"connectors.title":`Connectors`,"connectors.hint":`Services a wizard can work in for the person — they connect their own account during a run. The main ones are built in; any other you find in the integrations.sh registry and import from its OpenAPI spec or its MCP server.`,"connectors.imported":`From the registry`,"connectors.notSetUp":`not set up`,"connectors.setup":`The server still needs:`,"connectors.search":`Find a service, e.g. Notion, Stripe, GitHub`,"connectors.find":`Search`,"connectors.none":`Nothing found.`,"connectors.import":`Import`,"connectors.exists":`Already imported.`,"connectors.ownClient":`Own OAuth client`,"connectors.refresh":`Reload actions`,"connectors.remove":`Remove`,"connectors.actions":`{n} actions, {r} read-only`,"connectors.pending":`Actions appear once an account is connected`,"connectors.needsClient":`This service needs an OAuth client (id and secret). Remove it and import again with “Own OAuth client”.`,"connectors.authNone":`no sign-in`,"connectors.authOauth":`OAuth sign-in`,"connectors.authKey":`API key`,"connectors.group.read":`reads`,"connectors.group.write":`changes`,"connectors.group.destructive":`deletes`,"run.uploadTouch":`Choose a file`,"run.maxFiles":`At most {n} fit here – I left out the rest.`,"run.filesMin":`{n} of at least {min}`,"run.filesOf":`{n} of at most {max}`,"run.moveFile":`Move no. {n}`,"run.moveFileHint":`Drag to change the order`,"run.removeFile":`Remove`,"run.awake":`The screen stays on while the wizard works.`,"run.openFull":`Open full size`,"run.yes":`Yes`,"run.no":`No`,"run.share":`Share`,"run.shareNow":`Share now`,"run.shareFile":`Share as a file or open in an app`,"camera.asking":`Your browser is about to ask for the camera. The picture stays in this wizard.`,"camera.missing":`No camera was found on this device. Upload a photo instead.`,"camera.busy":`Another app is using the camera. Close it and try again.`,"camera.native":`Open the camera app`,"camera.pick":`Choose a photo`,"camera.torch":`Light`,"camera.flip":`Switch camera`,"camera.photo":`Photo`,"camera.video":`Video`,"camera.record":`Start recording`,"camera.stop":`Stop recording`,"camera.recording":`Recording — tap to stop.`,"camera.clipHint":`A short clip, {s} seconds at most.`,"camera.hintMany":`Capture page after page, then “Done”.`,"scan.button":`Scan`,"scan.title":`Scan a code`,"scan.asking":`Your browser is about to ask for the camera — it only reads the code.`,"scan.hint":`Hold the QR code or barcode inside the frame.`,"scan.hintQr":`Hold the QR code inside the frame. This device does not read barcodes here.`,"scan.miss":`No code was found in the photo. Try closer and sharper.`,"scan.fromPhoto":`Choose a photo of the code`,"scan.typeInstead":`Type it instead`,"location.use":`Use my location`,"location.locating":`Finding your location …`,"location.refining":`getting more exact …`,"location.accuracy":`exact to about {m} m`,"location.map":`Map`,"location.remove":`Remove location`,"location.why":`Your browser asks for your location. It is only used for this wizard. You can also just type the address.`,"location.denied":`Location is not allowed for this page. Allow it in your browser's site settings (the lock icon in the address bar) — or type the address below.`,"location.unavailable":`Your device could not find its location right now. Try again outdoors or type the address.`,"location.timeout":`That took too long. Try again or type the address.`,"location.manual":`Type an address or place`,"location.label":`Address or description of the place`,"voice.start":`Record a voice note`,"voice.stop":`Stop`,"voice.recording":`Recording …`,"voice.left":`{s} s left`,"voice.again":`Record again`,"voice.remove":`Delete`,"voice.pick":`Choose an audio file`,"voice.why":`Your browser asks for the microphone. The recording is turned into text afterwards.`,"voice.denied":`The microphone is not allowed for this page. Allow it in your browser's site settings — or record the note with your voice memo app and choose the file.`,"voice.noRecorder":`This browser cannot record here. Record the note with your voice memo app and choose the file.`,"sign.open":`Sign here`,"sign.hint":`Sign with your finger`,"sign.pad":`Signature pad`,"sign.clear":`Clear`,"sign.accept":`Use it`,"sign.again":`Sign again`,"sign.remove":`Remove signature`,"notify.ask":`Tell me when it is done`,"notify.on":`You will be told`,"notify.why":`With a sound, a buzz or a notification. Your browser asks once for permission.`,"notify.onHint":`You can switch apps — a notification brings you back.`,"notify.quiet":`With a sound and a buzz while this page is open.`,"notify.blocked":`Notifications are blocked for this page — you get a sound and a buzz while it is open. You can allow them in your browser's site settings.`,"notify.done":`Your result is ready.`,"notify.next":`It goes on — have a look.`,"notify.needsYou":`The wizard needs you for a moment.`,"install.add":`Add to home screen`,"install.ios":`Tap “Share” below, then “Add to Home Screen”.`,"install.app.offer":`Install the studio as an app: its own window, its own icon in the Dock or taskbar.`,"install.app.browser":`In Chrome or Edge the studio installs as an app: its own window, its own icon.`,"install.app.action":`Install as app`,"install.app.close":`Close`,"common.offline":`No connection. Check your network and try again.`,"common.retry":`Try again`,"common.cancel":`Cancel`,"common.loading":`Loading …`,"common.error":`Error`,"project.rename":`Rename project`,"project.saving":`Saving …`,"project.base":`Basics`,"project.baseHint":`Who is behind the wizards. Every AI step knows this.`,"project.title":`Title`,"project.titleHint":`Company, brand or undertaking — end users see it too.`,"project.about":`About`,"project.aboutHint":`What you do, for whom, and the tone you write in.`,"project.logos":`Logos`,"project.logosHint":`End users see the first logo. A description says what a variant is for.`,"project.logoAdd":`Logo`,"project.logoMain":`Main logo`,"project.logoMakeMain":`Make main logo`,"project.colors":`Colours`,"project.colorsHint":`The first colour is the accent of documents, dashboards and public pages.`,"project.colorAdd":`Colour`,"project.colorName":`e.g. Primary — buttons and headings`,"project.colorUse":`Describe how engenty should use this color.`,"project.colorAddTitle":`Add a colour`,"project.colorValue":`Colour value`,"project.colorUseLabel":`Use`,"project.add":`Add`,"project.colorAccent":`Accent`,"project.colorFirst":`Make accent`,"project.assets":`Assets`,"project.assetsHint":`Images, graphics, videos. AI steps place them in documents and choose by the description.`,"project.assetAdd":`Files`,"project.assetSearch":`Filter assets …`,"project.documents":`Documents`,"project.documentsHint":`PDFs, lists, Excel, Word, text. They are read and put into an index every AI step searches.`,"project.documentAdd":`Documents`,"project.drop":`Drop here or`,"project.description":`Add a description …`,"project.describing":`Looking at it …`,"project.reading":`Reading …`,"project.indexed":`In the index`,"project.indexedKeywords":`In the index (keywords)`,"project.notIndexed":`No text found`,"project.reindex":`Read again`,"project.pages":`{n} pages`,"project.keywordsOnly":`The index searches by keywords right now. With an AI Gateway or OpenAI key it also searches by meaning.`,"project.preview":`Preview`,"project.viewList":`Show as a list`,"project.viewCards":`Show as cards`,"project.original":`Original`,"project.readText":`Text as read`,"project.openOriginal":`Open the original`,"project.noText":`No text yet: the document is still being read, or could not be read.`,"project.textCut":`The preview shows the start ({shown} of {total} characters).`,"project.searchTest":`Search the index …`,"project.searchNone":`Nothing found.`,"project.remove":`Remove`,"project.removeConfirm":`Remove “{name}”?`,"project.facts":`Facts`,"project.factsHint":`What wizards should know: address, VAT id, opening hours — anything that fits.`,"project.factLabel":`Label`,"project.factValue":`Value`,"project.factAdd":`Entry`,"project.factType":`Type`,"project.factAuto":`Automatic`,"project.type.text":`Text`,"project.type.longtext":`Long text`,"project.type.number":`Number`,"project.type.date":`Date`,"project.type.url":`Link`,"project.type.email":`Email`,"project.type.phone":`Phone`,"project.type.boolean":`Yes / No`,"project.yes":`Yes`,"project.no":`No`,"project.assistant":`Assistant`,"project.assistantTitle":`Have your project filled in`,"project.assistantHello":`Tell me about your project, name the website or give me files. I fill in what I find: title, description, logo, colours and facts.`,"project.assistantComposer":`e.g. “Read our website example.com” …`,"project.assistantChanged":`Project updated`,"flowApp.loading":`The wizard is on its way …`,"flowApp.draft":`Draft`,"flowApp.published":`Published`,"flowApp.issues":`{n} issues in the draft`,"flowApp.flow":`Flow`,"flowApp.notPublished":`Publish it in the studio to run it here.`,"flowApp.runPage":`Continue in the browser`,"flowApp.inBrowser":`Only in the browser: {fields}`,"flowApp.done":`Done`,"flowApp.credits":`{n} credits`,"flowApp.ask":`The wizard asks`,"flowApp.allow":`Allow`,"flowApp.skip":`Skip`,"flowApp.signIn":`A sign-in at {site} — only in the browser.`,"flowApp.fullscreen":`Larger`,"flowApp.inline":`Smaller`,"flowApp.failed":`That did not work: {error}`},lb=`wizards.lang`;function ub(){try{let e=localStorage.getItem(lb);return e===`de`||e===`en`?e:null}catch{return null}}var db=ub()??(typeof navigator<`u`&&!navigator.language.toLowerCase().startsWith(`de`)?`en`:`de`),fb=db===`de`?sb:cb,pb=new Set;function mb(e){if(e!==db){db=e,fb=e===`de`?sb:cb,document.documentElement.lang=e;try{localStorage.setItem(lb,e)}catch{}for(let e of pb)e()}}function Q(e,t){let n=fb[e]??sb[e]??e;for(let[e,r]of Object.entries(t??{}))n=n.replace(`{${e}}`,String(r));return n}typeof document<`u`&&(document.documentElement.lang=db),cy();var hb=`wizards.theme`,gb=new Set,_b=window.matchMedia(`(prefers-color-scheme: dark)`);function vb(){try{let e=localStorage.getItem(hb);return e===`light`||e===`dark`?e:null}catch{return null}}var yb=0;function bb(){return yb>0?`dark`:vb()??(_b.matches?`dark`:`light`)}function xb(){requestAnimationFrame(()=>{let e=document.querySelector(`meta[name="theme-color"]`),t=document.createElement(`canvas`).getContext(`2d`);if(!e||!t||!document.body)return;t.fillStyle=getComputedStyle(document.body).backgroundColor,t.fillRect(0,0,1,1);let[n,r,i]=t.getImageData(0,0,1,1).data;e.content=`#${[n,r,i].map(e=>e.toString(16).padStart(2,`0`)).join(``)}`})}function Sb(){let e=bb()===`dark`;document.documentElement.classList.toggle(`dark`,e),xb();for(let e of gb)e()}_b.addEventListener(`change`,Sb),Sb();function Cb(){return(0,y.useSyncExternalStore)(e=>(gb.add(e),()=>gb.delete(e)),()=>document.documentElement.classList.contains(`dark`)?`dark`:`light`)}var wb=e=>`oklch(from ${ay[sy[e]??`cobalt`]} 0.34 calc(c * 0.6) h)`;function $(...e){return e.filter(Boolean).join(` `)}var Tb={primary:`bg-primary text-primary-foreground hover:brightness-[1.06] active:brightness-95 shadow-[0_1px_0_oklch(0%_0_0/0.08)]`,secondary:`bg-card text-ink border border-border hover:bg-paper-2`,ghost:`text-ink-2 hover:text-ink hover:bg-accent`,quiet:`bg-paper-2 text-ink hover:bg-paper-3`,danger:`text-rose hover:bg-rose-tint`},Eb=(0,y.forwardRef)(function({variant:e=`primary`,size:t=`md`,busy:n,className:r,children:i,disabled:a,...o},s){return(0,Z.jsxs)(`button`,{ref:s,type:`button`,disabled:a||n,className:$(`inline-flex select-none items-center justify-center gap-2 whitespace-nowrap rounded-full font-medium transition-[background,filter,color,transform] duration-150 active:scale-[0.98] disabled:pointer-events-none disabled:opacity-50`,t===`sm`&&`h-8 px-3 text-[13px] coarse:h-11 coarse:px-4`,t===`md`&&`h-10 px-4 text-sm coarse:h-11`,t===`lg`&&`h-12 px-6 text-[15px]`,Tb[e],r),...o,children:[n?(0,Z.jsx)(Lb,{className:`size-4`}):null,i]})});function Db({label:e,className:t,children:n,...r}){return(0,Z.jsx)(`button`,{type:`button`,"aria-label":e,title:e,className:$(`inline-flex size-9 shrink-0 items-center justify-center rounded-full text-ink-3 transition hover:bg-accent hover:text-ink disabled:opacity-40 coarse:size-11`,t),...r,children:n})}var Ob=`rounded-lg border border-input bg-card px-3.5 text-[15px] text-ink shadow-[inset_0_1px_0_oklch(0%_0_0/0.02)] outline-none transition placeholder:text-ink-4 focus:border-focus focus:ring-4 focus:ring-focus-glow disabled:opacity-60`;function kb(e){return/(^|\s)w-/.test(e??``)?null:`w-full`}var Ab=(0,y.forwardRef)(function({className:e,...t},n){return(0,Z.jsx)(`input`,{ref:n,className:$(Ob,kb(e),`h-11`,e),...t})});function jb(e){return(0,Z.jsx)(`input`,{type:`color`,className:`swatch size-11 shrink-0 cursor-pointer rounded-lg border border-input bg-card p-1`,...e})}var Mb=(0,y.forwardRef)(function({className:e,minRows:t=3,maxRows:n=14,onChange:r,...i},a){let o=(0,y.useRef)(null),s=()=>{let e=o.current;if(!e)return;let r=Number.parseFloat(getComputedStyle(e).lineHeight)||22;e.style.height=`auto`;let i=r*n+20;e.style.height=`${Math.min(Math.max(e.scrollHeight,r*t+20),i)}px`,e.style.overflowY=e.scrollHeight>i?`auto`:`hidden`};return(0,y.useLayoutEffect)(s),(0,Z.jsx)(`textarea`,{ref:e=>{o.current=e,typeof a==`function`?a(e):a&&(a.current=e)},className:$(Ob,kb(e),`resize-none py-2.5 leading-[1.5]`,e),onChange:e=>{s(),r?.(e)},...i})});function Nb({value:e,onChange:t,options:n,className:r,placeholder:i}){return(0,Z.jsxs)(`div`,{className:$(`relative`,r),children:[(0,Z.jsxs)(`select`,{value:e,onChange:e=>t(e.target.value),className:$(Ob,`h-11 w-full appearance-none pr-9`),children:[i===void 0?null:(0,Z.jsx)(`option`,{value:``,children:i}),n.map(e=>(0,Z.jsx)(`option`,{value:e.value,disabled:e.disabled,children:e.label},e.value))]}),(0,Z.jsx)(`svg`,{className:`-translate-y-1/2 pointer-events-none absolute top-1/2 right-3 size-4 text-ink-3`,viewBox:`0 0 16 16`,fill:`none`,children:(0,Z.jsx)(`path`,{d:`M4 6l4 4 4-4`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`})})]})}function Pb({value:e,onChange:t,options:n,multi:r}){let i=new Set(Array.isArray(e)?e:e?[e]:[]);return(0,Z.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:n.map(e=>{let a=i.has(e);return(0,Z.jsx)(`button`,{type:`button`,"aria-pressed":a,onClick:()=>{if(r){let r=new Set(i);a?r.delete(e):r.add(e),t(n.filter(e=>r.has(e)))}else t(e)},className:$(`h-10 rounded-full border px-4 text-sm transition coarse:h-11`,a?`border-ember bg-ember-tint text-ink`:`border-input bg-card text-ink-2 hover:border-ink-4 hover:text-ink`),children:e},e)})})}function Fb({checked:e,onChange:t,label:n}){return(0,Z.jsx)(`button`,{type:`button`,role:`switch`,"aria-checked":e,"aria-label":n,onClick:()=>t(!e),className:$(`relative inline-flex h-6 w-11 shrink-0 items-center rounded-full transition before:absolute before:-inset-x-1 before:-inset-y-2.5 before:content-['']`,e?`bg-primary`:`bg-paper-3`),children:(0,Z.jsx)(`span`,{className:$(`inline-block size-5 rounded-full bg-white shadow-sm transition-transform`,e?`translate-x-[22px]`:`translate-x-[2px]`)})})}function Ib({children:e,hint:t,required:n}){return(0,Z.jsxs)(`div`,{className:`mb-2`,children:[(0,Z.jsxs)(`div`,{className:`font-medium text-[14px] text-ink`,children:[e,n?(0,Z.jsx)(`span`,{className:`ml-1 text-ember`,children:`*`}):null]}),t?(0,Z.jsx)(`div`,{className:`mt-0.5 text-[13px] text-ink-3`,children:t}):null]})}function Lb({className:e}){return(0,Z.jsxs)(`svg`,{className:$(`size-5 animate-spin`,e),viewBox:`0 0 24 24`,fill:`none`,children:[(0,Z.jsx)(`circle`,{cx:`12`,cy:`12`,r:`9`,stroke:`currentColor`,strokeOpacity:`0.2`,strokeWidth:`3`}),(0,Z.jsx)(`path`,{d:`M21 12a9 9 0 0 0-9-9`,stroke:`currentColor`,strokeWidth:`3`,strokeLinecap:`round`})]})}function Rb({className:e,children:t,...n}){return(0,Z.jsx)(`div`,{className:$(`rounded-xl bg-card shadow-soft ring-1 ring-border-soft`,e),...n,children:t})}function zb({children:e,tone:t=`neutral`}){return(0,Z.jsxs)(`span`,{className:$(`inline-flex h-6 items-center gap-1.5 rounded-full px-2.5 font-medium text-[12px]`,t===`neutral`&&`bg-paper-2 text-ink-2`,t===`live`&&`bg-moss-tint text-moss`,t===`warn`&&`bg-amber-tint text-ink-2`,t===`ember`&&`bg-ember-tint text-ember-strong`),children:[t===`live`?(0,Z.jsx)(`span`,{className:`size-1.5 rounded-full bg-moss`}):null,e]})}function Bb({open:e,onClose:t,title:n,children:r,wide:i,bare:a}){let o=(0,y.useRef)(null);return(0,y.useEffect)(()=>{let t=o.current;t&&(e&&!t.open?t.showModal():!e&&t.open&&t.close())},[e]),(0,Z.jsx)(`dialog`,{ref:o,onClose:t,onClick:e=>{e.target===o.current&&t()},className:$(`m-auto p-0 text-ink backdrop:bg-[oklch(20%_0.01_60/0.28)] backdrop:backdrop-blur-[2px]`,a?`w-[calc(100%-48px)] overflow-visible bg-transparent max-sm:m-0 max-sm:h-dvh max-sm:max-h-none max-sm:w-full max-sm:max-w-none`:`max-h-[calc(100dvh-32px)] w-[calc(100%-32px)] overflow-y-auto overscroll-contain rounded-2xl bg-card shadow-overlay`,i===`page`?`sm:max-w-4xl`:i?`sm:max-w-2xl`:`sm:max-w-md`,!a&&(i===`page`?`max-w-4xl`:i?`max-w-2xl`:`max-w-md`)),children:e&&a?r:e?(0,Z.jsxs)(`div`,{className:`p-5 sm:p-7`,children:[n?(0,Z.jsxs)(`div`,{className:`mb-5 flex items-start justify-between gap-3`,children:[(0,Z.jsx)(`h2`,{className:`min-w-0 font-display font-semibold text-xl`,children:n}),(0,Z.jsx)(Db,{label:Q(`common.close`),onClick:t,className:`-mt-1.5 -mr-2`,children:(0,Z.jsx)(`svg`,{viewBox:`0 0 16 16`,fill:`none`,className:`size-4`,"aria-hidden":`true`,children:(0,Z.jsx)(`path`,{d:`M4 4l8 8M12 4l-8 8`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`})})})]}):null,r]}):null})}function Vb(e){let t=Wb.get(e);if(t)return t;if(!Gb){let e=document.createElement(`canvas`);e.width=1,e.height=1,Gb=e.getContext(`2d`,{willReadFrequently:!0})}let n=[.5,.5,.5];if(Gb){Gb.clearRect(0,0,1,1),Gb.fillStyle=`#808080`,Gb.fillStyle=e,Gb.fillRect(0,0,1,1);let[t,r,i]=Gb.getImageData(0,0,1,1).data;n=[t/255,r/255,i/255]}return Wb.set(e,n),n}function Hb(e,t){let n=Kb.get(e);return n||(n=document.createElement(`span`),n.setAttribute(`aria-hidden`,`true`),n.style.cssText=`position:absolute;width:0;height:0;overflow:hidden;visibility:hidden`,e.appendChild(n),Kb.set(e,n)),n.style.color=``,n.style.color=t,Vb(getComputedStyle(n).color||`#808080`)}function Ub(e,t){let n=Hb(e,ay[sy[t]]),r=Math.max(...n),i=[Math.min(1,n[0]+n[0]/(r||1)*.45),Math.min(1,n[1]+n[1]/(r||1)*.45),Math.min(1,n[2]+n[2]/(r||1)*.45)];return{body:qb(n,[1,1,1],.12),deep:qb(n,[.03,.02,.06],.62),tip:qb(i,[1,1,1],.12)}}var Wb,Gb,Kb,qb,Jb=o((()=>{cy(),Wb=new Map,Gb=null,Kb=new WeakMap,qb=(e,t,n)=>[e[0]+(t[0]-e[0])*n,e[1]+(t[1]-e[1])*n,e[2]+(t[2]-e[2])*n]})),Yb,Xb=o((()=>{Yb=`
116
+ vec4 gogglesOver(vec2 p, float aa, float front) {
117
+ if (uGoggles < 0.5) return vec4(0.0);
118
+ vec2 q = p - eyeCentre();
119
+ float er = uEye.z * 1.35;
120
+ float d = length(q);
121
+ float outer = er * 1.27;
122
+ float bandY = q.y + 1.7 * pow(q.x / max(uScale, 1.0), 2.0);
123
+ float band = 1.0 - smoothstep(uEye.z * 0.31 - aa, uEye.z * 0.31 + aa, abs(bandY));
124
+ // Taper into the surface; fine irregular coverage lets fur cover the strap ends.
125
+ float skin = -sdBody(p);
126
+ float grain = sin(p.x * 7.3 + sin(p.y * 4.1)) * 0.6;
127
+ float tuck = smoothstep(0.5, 6.0, skin + grain);
128
+ band *= tuck * mix(1.0, smoothstep(outer - aa, outer + aa, d), front);
129
+ float curve = clamp(skin / max(uScale, 1.0), 0.0, 1.0);
130
+ vec3 leather = mix(vec3(0.12, 0.055, 0.025), vec3(0.43, 0.24, 0.1), curve);
131
+ float seam = 1.0 - smoothstep(0.12, 0.35, abs(abs(bandY) - uEye.z * 0.22));
132
+ leather += vec3(0.11, 0.065, 0.025) * seam * step(0.4, fract(p.x * 0.65));
133
+ vec4 acc = vec4(leather * band, band);
134
+ return acc;
135
+ }
136
+ `})),Zb,Qb=o((()=>{Zb=`
137
+ vec3 deformJelly(vec3 p) {
138
+ vec3 q=p-vec3(60.0,60.0,0.0);
139
+ vec3 local=q/max(uScale,1.0);
140
+ float softness=clamp(uSoftness,0.0,1.5);
141
+ float phase=TAU*uTime/uPeriod;
142
+ vec2 lag=clamp(uWobble,vec2(-7.0),vec2(7.0));
143
+ float squash=softness*(sin(phase)*0.08+sin(phase*1.7)*0.012+lag.y*0.012);
144
+ q.xz*=inversesqrt(1.0+squash);
145
+ q.y*=1.0+squash;
146
+ float top=clamp(1.0-p.y/125.0,0.0,1.0);
147
+ q.x+=softness*(lag.x*1.15*top*top+sin(phase*0.8+local.y*2.5)*0.8);
148
+ float wave=sin(local.x*3.1+uTime*1.15)*sin(local.y*2.7-uTime*0.85)*sin(local.z*2.6+uTime*0.65);
149
+ vec3 d1=local-vec3(-0.42,-0.32,0.72);
150
+ vec3 d2=local-vec3(0.45,0.46,0.7);
151
+ float dents=-3.2*exp(-dot(d1,d1)*8.0)-2.1*exp(-dot(d2,d2)*9.0);
152
+ float face=1.0-0.8*exp(-dot(p.xy-uEye.xy,p.xy-uEye.xy)/(uEye.z*uEye.z*3.0));
153
+ q+=normalize(local+vec3(0.0,0.001,0.0))*softness*face*(wave*3.2+dents);
154
+ vec2 grab=(p.xy-uPull.xy)/max(uScale*0.65,1.0);
155
+ float influence=exp(-dot(grab,grab)*2.0)*smoothstep(-0.2,0.65,local.z);
156
+ q.xy+=uPull.zw*softness*influence;
157
+ q.z-=length(uPull.zw)*softness*influence*0.15;
158
+ return q+vec3(60.0,60.0,0.0);
159
+ }
160
+ `})),$b,ex=o((()=>{Xb(),gy(),Qb(),$b=`#version 300 es
161
+ precision highp float;
162
+ #define BLOBS ${py}
163
+ #define EXTRAS ${my}
164
+ #define VIEW ${152 .toFixed(1)}
165
+ #define ORIGIN ${(-16).toFixed(1)}
166
+ #define TAU 6.2831853
167
+ uniform vec2 uResolution;
168
+ uniform float uTime;
169
+ uniform vec4 uBlobs[BLOBS];
170
+ uniform float uFalloff;
171
+ uniform float uScale;
172
+ uniform float uFur;
173
+ uniform float uPeriod;
174
+ uniform float uInflate;
175
+ uniform float uDensity;
176
+ uniform float uThick;
177
+ uniform vec2 uLean;
178
+ uniform vec2 uTurn;
179
+ uniform float uGoggles;
180
+ uniform vec3 uLight;
181
+ uniform vec3 uBody;
182
+ uniform vec3 uDeep;
183
+ uniform vec3 uTip;
184
+ uniform vec3 uEye;
185
+ uniform float uWind;
186
+ uniform vec2 uGaze;
187
+ uniform vec4 uExtras[EXTRAS];
188
+ uniform vec4 uExtraMeta[EXTRAS];
189
+ uniform vec2 uWobble;
190
+ uniform float uClarity;
191
+ uniform float uSoftness;
192
+ uniform vec4 uPull;
193
+ #ifdef JELLY_COAT
194
+ ${Zb}
195
+ #endif
196
+ vec2 eyeCentre() { return uEye.xy; }
197
+ float bodyK(vec2 p) {
198
+ float sum=0.0;
199
+ for(int i=0;i<BLOBS;i++){
200
+ vec4 b=uBlobs[i];if(b.z<=0.0)continue;
201
+ vec2 q=(p-b.xy)/b.zw;sum+=exp(-uFalloff*dot(q,q));
202
+ }
203
+ return sqrt(max(0.0,-log(max(sum,1e-8))/uFalloff));
204
+ }
205
+ float sdBody(vec2 p){return (bodyK(p)-1.0)*uScale;}
206
+ vec3 rotateCoat(vec3 p) {
207
+ vec3 q=vec3(p.x,cos(uTurn.y)*p.y-sin(uTurn.y)*p.z,sin(uTurn.y)*p.y+cos(uTurn.y)*p.z);
208
+ return vec3(cos(uTurn.x)*q.x+sin(uTurn.x)*q.z,q.y,-sin(uTurn.x)*q.x+cos(uTurn.x)*q.z);
209
+ }
210
+ vec3 bodyStretch(){float s=sin(TAU*uTime/uPeriod)*0.018;return vec3(1.0+s,1.0-s,1.0/(1.0-s*s));}
211
+ vec3 poseCoat(vec3 p) {
212
+ float w=TAU*uTime/uPeriod;
213
+ #ifdef JELLY_COAT
214
+ p=deformJelly(p);
215
+ #endif
216
+ vec3 q=(p-vec3(60.0,60.0,0.0))*bodyStretch();
217
+ q.xy+=uLean*(1.15-p.y/120.0)*0.3;
218
+
219
+ q=rotateCoat(q);
220
+ q.xy+=vec2(60.0+sin(w)*1.5,60.0+cos(w*0.8)*1.1);
221
+ return q;
222
+ }
223
+ vec3 poseNormal(vec3 p,vec3 normal){
224
+ #ifdef JELLY_COAT
225
+ vec3 tangent=normalize(cross(normal,abs(normal.y)>0.9?vec3(1.0,0.0,0.0):vec3(0.0,1.0,0.0)));
226
+ vec3 bitangent=cross(normal,tangent);
227
+ vec3 t=poseCoat(p+tangent*0.12)-poseCoat(p-tangent*0.12);
228
+ vec3 b=poseCoat(p+bitangent*0.12)-poseCoat(p-bitangent*0.12);
229
+ return normalize(cross(t,b));
230
+ #else
231
+ return rotateCoat(normalize(normal/bodyStretch()));
232
+ #endif
233
+ }
234
+ float coatZoom(){
235
+ float extent=0.0;
236
+ for(int i=0;i<BLOBS;i++){
237
+ vec4 b=uBlobs[i];if(b.z<=0.0)continue;
238
+ extent=max(extent,max(max(abs(b.x-60.0)+b.z,abs(b.y-60.0)+b.w),b.z*uInflate/30.0));
239
+ }
240
+ return min(1.0,65.0/(extent+uFur*1.2+3.0));
241
+ }
242
+ vec4 projectCoat(vec3 p){
243
+ float zoom=coatZoom();
244
+ vec2 screen=(p.xy-60.0)*zoom+60.0;
245
+ return vec4((screen.x-ORIGIN)/VIEW*2.0-1.0,1.0-(screen.y-ORIGIN)/VIEW*2.0,-p.z*zoom/150.0,1.0);
246
+ }
247
+ float sdArc(vec2 q,float r,float span){float a=clamp(atan(q.x,-q.y),-span,span);return length(q-vec2(sin(a),-cos(a))*r);}
248
+ vec4 extrasOver(vec2 p,vec3 ink,vec3 bodyCol,float aa){
249
+ vec4 acc=vec4(0.0);
250
+ for(int i=0;i<EXTRAS;i++){
251
+ vec4 m=uExtraMeta[i],g=uExtras[i];int kind=int(m.x+0.5);
252
+ if(kind==0||kind==2||(kind==3&&m.w>0.5))continue;
253
+ vec2 q=p-g.xy;float distance=1000.0,hw=m.z*0.5;
254
+ if(kind==1){distance=length(q)-g.z;hw=0.0;}
255
+ else if(kind==3)distance=sdArc(q,g.z,g.w);
256
+ else if(kind==4)distance=length(vec2(q.x,max(abs(q.y)-g.z,0.0)));
257
+ else if(kind==5){float x=clamp(q.x,0.0,g.z);distance=length(q-vec2(x,-g.w*sin(TAU*x/g.z)));}
258
+ float a=(1.0-smoothstep(hw-aa,hw+aa,distance))*m.y;
259
+ vec3 color=mix(ink,bodyCol*0.45,0.2);
260
+ acc=vec4(color*a,a)+acc*(1.0-a);
261
+ }
262
+ return acc;
263
+ }
264
+ ${Yb}
265
+ `}));function tx(e){let t=[];for(let n=0;n<e.extraMeta.length/4;n++){let[r,,i,a]=e.extraMeta.slice(n*4,n*4+4);if(r!==2&&!(r===3&&a>.5))continue;let[o,s,c,l]=e.extras.slice(n*4,n*4+4),u=r===2?16:32,d=(e,t)=>{let a=e/u*(r===2?Math.PI:l*2)-(r===2?0:l),d=t/16*Math.PI*2,f=r===2?[Math.sin(a)*Math.cos(d),-Math.cos(a),Math.sin(a)*Math.sin(d)]:[Math.sin(a)*Math.cos(d),-Math.cos(a)*Math.cos(d),Math.sin(d)],p=r===2?[o,s,0]:[o+Math.sin(a)*c,s-Math.cos(a)*c,0],m=r===2?c:i*.5;return[...p.map((e,t)=>e+f[t]*m),...f,n]},f=(e,n,r)=>{let i=n.map((t,n)=>t-e[n]),a=r.map((t,n)=>t-e[n]),o=[i[1]*a[2]-i[2]*a[1],i[2]*a[0]-i[0]*a[2],i[0]*a[1]-i[1]*a[0]].reduce((t,n,r)=>t+n*e[r+3],0)<0?[e,r,n]:[e,n,r];for(let e of o)t.push(...e)};for(let e=0;e<u;e++)for(let t=0;t<16;t++){let n=d(e,t),r=d(e+1,t),i=d(e+1,t+1),a=d(e,t+1);f(n,r,i),f(n,i,a)}}return new Float32Array(t)}function nx(e,t){let n=new Map,r=[[`aPosition`,3,0],[`aNormal`,3,12],[`aExtra`,1,24]];return{draw(i){let a=`${i.extras.join(`,`)}:${i.extraMeta.join(`,`)}`,o=n.get(a);if(!o){let t=e.createBuffer();if(!t)throw Error(`engenty: accessory allocation failed`);let r=tx(i);if(e.bindBuffer(e.ARRAY_BUFFER,t),e.bufferData(e.ARRAY_BUFFER,r,e.STATIC_DRAW),o={buffer:t,count:r.length/7},n.set(a,o),n.size>24){let t=n.entries().next().value;t&&(e.deleteBuffer(t[1].buffer),n.delete(t[0]))}}e.bindBuffer(e.ARRAY_BUFFER,o.buffer);for(let[n,i,a]of r){let r=e.getAttribLocation(t,n);e.enableVertexAttribArray(r),e.vertexAttribPointer(r,i,e.FLOAT,!1,28,a)}e.drawArrays(e.TRIANGLES,0,o.count)},dispose(){for(let t of n.values())e.deleteBuffer(t.buffer);n.clear()}}}var rx=o((()=>{})),ix,ax,ox=o((()=>{ex(),ix=`${$b}
266
+ in vec3 aPosition;
267
+ in vec3 aNormal;
268
+ in float aExtra;
269
+ out vec3 vNormal;
270
+ out float vAlpha;
271
+ void main(){
272
+ int index=int(aExtra+0.5);
273
+ vec3 p=aPosition;
274
+ p.y+=sin(uTime*1.5+float(index)*1.7)*1.2;
275
+ p.x+=cos(uTime*1.1+float(index))*0.5;
276
+ vNormal=rotateCoat(aNormal);
277
+ vAlpha=mix(uExtraMeta[index].y,1.0,0.65);
278
+ gl_Position=projectCoat(poseCoat(p));
279
+ }
280
+ `,ax=`${$b}
281
+ in vec3 vNormal;
282
+ in float vAlpha;
283
+ out vec4 outColor;
284
+ void main(){
285
+ vec3 n=normalize(vNormal),light=normalize(uLight);
286
+ float diffuse=max(dot(n,light),0.0);
287
+ vec3 color=mix(uDeep,uBody,0.55+diffuse*0.45)*(0.7+diffuse*0.45);
288
+ vec3 halfLight=normalize(light+vec3(0.0,0.0,1.0));
289
+ color+=vec3(0.85)*pow(max(dot(n,halfLight),0.0),48.0);
290
+ color+=uTip*pow(1.0-abs(n.z),3.0)*0.2;
291
+ outColor=vec4(color*vAlpha,vAlpha);
292
+ }
293
+ `})),sx,cx=o((()=>{sx={inflate:27,softness:.05,clarity:.15}}));function lx(e,t,n){let r=e.createShader(t);if(!r)throw Error(`engenty fur: could not create shader`);if(e.shaderSource(r,n),e.compileShader(r),!e.getShaderParameter(r,e.COMPILE_STATUS)){let t=e.getShaderInfoLog(r);throw e.deleteShader(r),Error(`engenty fur: shader compile failed — ${t}`)}return r}function ux(e,t,n){let r=e.getContext(`webgl2`,{alpha:!0,antialias:!0,depth:!0,premultipliedAlpha:!0,preserveDrawingBuffer:!1,stencil:!1});if(!r)return null;let i=null;try{let e=lx(r,r.VERTEX_SHADER,n.vertex),a=lx(r,r.FRAGMENT_SHADER,t);if(i=r.createProgram(),!i)throw Error(`engenty fur: could not create program`);if(r.attachShader(i,e),r.attachShader(i,a),r.linkProgram(i),r.deleteShader(e),r.deleteShader(a),!r.getProgramParameter(i,r.LINK_STATUS))throw Error(`engenty fur: link failed — ${r.getProgramInfoLog(i)}`)}catch(e){return i&&r.deleteProgram(i),console.error(e),null}let a={};for(let e of dx)a[e]=r.getUniformLocation(i,e);let o=r.createVertexArray();r.bindVertexArray(o);let s=n.geometry(r,i),c=r.useProgram.bind(r);r.enable(r.BLEND),r.blendFunc(r.ONE,r.ONE_MINUS_SRC_ALPHA);let l=!1,u=1;return{dispose(){l||(l=!0,s.dispose(),r.deleteVertexArray(o),r.deleteProgram(i))},render(e){l||(c(i),r.bindVertexArray(o),r.uniform2f(a.uResolution,u,u),r.uniform1f(a.uTime,e.time),r.uniform4fv(a.uBlobs,e.blobs),r.uniform1f(a.uFalloff,e.falloff),r.uniform1f(a.uScale,e.scale),r.uniform1f(a.uFur,e.fur),r.uniform1f(a.uPeriod,e.period),r.uniform1f(a.uInflate,e.inflate),r.uniform1f(a.uDensity,e.density),r.uniform1f(a.uThick,e.thick),r.uniform1f(a.uClarity,e.clarity),r.uniform1f(a.uSoftness,e.softness??sx.softness),r.uniform4fv(a.uPull,e.pull??[60,60,0,0]),r.uniform2fv(a.uLean,e.lean),r.uniform3fv(a.uLight,e.light),r.uniform3fv(a.uBody,e.body),r.uniform3fv(a.uDeep,e.deep),r.uniform3fv(a.uTip,e.tip),r.uniform3fv(a.uEye,e.eye),r.uniform1f(a.uWind,e.wind),r.uniform2fv(a.uGaze,e.gaze),r.uniform2fv(a.uTurn,e.turn??[0,0]),r.uniform1f(a.uGoggles,+!!e.goggles),r.uniform4fv(a.uExtras,e.extras),r.uniform4fv(a.uExtraMeta,e.extraMeta),r.uniform2fv(a.uWobble,e.wobble),r.enable(r.SCISSOR_TEST),r.scissor(0,0,u,u),r.enable(r.DEPTH_TEST),r.depthFunc(r.LEQUAL),r.depthMask(!0),r.frontFace(r.CW),n.doubleSided?r.disable(r.CULL_FACE):(r.enable(r.CULL_FACE),r.cullFace(r.BACK)),n.clear!==!1&&(r.clearColor(0,0,0,0),r.clear(r.COLOR_BUFFER_BIT|r.DEPTH_BUFFER_BIT)),r.depthMask(n.depthWrite!==!1),s.draw(e))},viewport(e){l||(u=e,r.viewport(0,0,e,e))}}}var dx,fx=o((()=>{cx(),dx=`uResolution.uTime.uBlobs.uFalloff.uScale.uFur.uPeriod.uInflate.uDensity.uThick.uLean.uLight.uBody.uDeep.uTip.uEye.uWind.uGaze.uTurn.uGoggles.uExtras.uExtraMeta.uWobble.uClarity.uSoftness.uPull`.split(`.`)}));function px(e){return`${e.blobs.join(`,`)}:${e.falloff}:${e.inflate}`}function mx(e,t){let n=0,r=[0,0,0];for(let i=0;i<t.blobs.length;i+=4){let a=t.blobs[i+2],o=t.blobs[i+3];if(a<=0||o<=0)continue;let s=a*t.inflate/30,c=e[0]-t.blobs[i],l=e[1]-t.blobs[i+1],u=e[2],d=Math.exp(-t.falloff*(c*c/(a*a)+l*l/(o*o)+u*u/(s*s)));n+=d,r[0]+=d*c/(a*a),r[1]+=d*l/(o*o),r[2]+=d*u/(s*s)}let i=Math.hypot(...r)||1;return{value:n,normal:[r[0]/i,r[1]/i,r[2]/i]}}function hx(e){let t=px(e),n=gx.get(t);if(n)return n;let r=[1/0,1/0,1/0],i=[-1/0,-1/0,-1/0];for(let t=0;t<e.blobs.length;t+=4){if(e.blobs[t+2]<=0)continue;let n=[e.blobs[t],e.blobs[t+1],0],a=[e.blobs[t+2],e.blobs[t+3],e.blobs[t+2]*e.inflate/30];for(let e=0;e<3;e++)r[e]=Math.min(r[e],n[e]-a[e]*1.5),i[e]=Math.max(i[e],n[e]+a[e]*1.5)}let a=2.7,[o,s,c]=i.map((e,t)=>Math.ceil((e-r[t])/a)+1),l=[],u=[];for(let t=0;t<c;t++)for(let n=0;n<s;n++)for(let i=0;i<o;i++){let o=[r[0]+i*a,r[1]+n*a,r[2]+t*a];l.push(o),u.push(mx(o,e).value)}let d=Math.exp(-e.falloff),f=[],p=0,m=(e,t)=>{let n=(d-u[e])/(u[t]-u[e]);return[0,1,2].map(r=>l[e][r]+(l[t][r]-l[e][r])*n)},h=(t,n,r)=>{let i=n.map((e,n)=>e-t[n]),a=r.map((e,n)=>e-t[n]),o=[i[1]*a[2]-i[2]*a[1],i[2]*a[0]-i[0]*a[2],i[0]*a[1]-i[1]*a[0]],s=Math.hypot(...o)*.5;if(s<1e-9)return;let c=mx(t,e).normal,l=o.reduce((e,t,n)=>e+t*c[n],0)<0?[t,r,n]:[t,n,r];for(let t of l)f.push(...t,...mx(t,e).normal);p+=s};for(let e=0;e<c-1;e++)for(let t=0;t<s-1;t++)for(let n=0;n<o-1;n++){let r=n+o*(t+s*e),i=o*s,a=[r,r+1,r+o+1,r+o,r+i,r+i+1,r+i+o+1,r+i+o];if(!(a.every(e=>u[e]<d)||a.every(e=>u[e]>=d)))for(let e of _x){let t=e.map(e=>a[e]).filter(e=>u[e]>=d),n=e.map(e=>a[e]).filter(e=>u[e]<d);if(t.length===1)h(...n.map(e=>m(t[0],e)));else if(t.length===3)h(...t.map(e=>m(n[0],e)));else if(t.length===2){let e=m(t[0],n[0]),r=m(t[0],n[1]),i=m(t[1],n[0]),a=m(t[1],n[1]);h(e,r,i),h(r,a,i)}}}let g={vertices:new Float32Array(f),area:p};if(gx.set(t,g),gx.size>24){let e=gx.keys().next().value;e&&gx.delete(e)}return g}var gx,_x,vx=o((()=>{gx=new Map,_x=[[0,5,1,6],[0,1,2,6],[0,2,3,6],[0,3,7,6],[0,7,4,6],[0,4,5,6]]}));function yx(e,t,n){let r=0,i=200;for(let a=0;a<24;a++){let a=(r+i)/2,o=0;for(let r=0;r<e.blobs.length;r+=4){let[i,s,c,l]=e.blobs.slice(r,r+4);c<=0||(o+=Math.exp(-e.falloff*(((t-i)/c)**2+((n-s)/l)**2+(a/(c*e.inflate/30))**2)))}o>Math.exp(-e.falloff)?r=a:i=a}return(r+i)/2}function bx(e){let t=[],[n,r,i]=e.eye,a=i*1.35,o=yx(e,n,r),s=(e,n,r)=>{let i=n.map((t,n)=>t-e[n]),a=r.map((t,n)=>t-e[n]),o=[i[1]*a[2]-i[2]*a[1],i[2]*a[0]-i[0]*a[2],i[0]*a[1]-i[1]*a[0]];for(let i of o.reduce((t,n,r)=>t+n*e[r+3],0)<0?[e,r,n]:[e,n,r])t.push(...i)},c=(e,t,n)=>{for(let r=0;r<e;r++)for(let i=0;i<t;i++){let a=n(r/e,i/t),o=n((r+1)/e,i/t),c=n((r+1)/e,(i+1)/t),l=n(r/e,(i+1)/t);s(a,o,c),s(a,c,l)}},l=(e,t,i,a,s)=>c(96,16,(c,l)=>{let u=c*Math.PI*2,d=l*Math.PI*2,f=Math.cos(u)*Math.cos(d)/t,p=Math.sin(u)*Math.cos(d)/t,m=Math.sin(d)/a,h=Math.hypot(f,p,m);return[n+Math.cos(u)*(e+Math.cos(d)*t),r+Math.sin(u)*(e+Math.cos(d)*t),o+i+Math.sin(d)*a,f/h,p/h,m/h,s]});l(a*1.14,a*.2,.3,1.5,0),l(a*1.13,a*.14,2.1,1.8,1);for(let e=0;e<4;e++){let t=Math.PI/4+e*Math.PI/2,i=n+Math.cos(t)*a*1.13,s=r+Math.sin(t)*a*1.13;c(10,12,(e,t)=>{let n=e*Math.PI,r=t*Math.PI*2,a=[Math.sin(n)*Math.cos(r),Math.sin(n)*Math.sin(r),Math.cos(n)];return[i+a[0]*.65,s+a[1]*.65,o+3.9+a[2]*.4,...a,2]})}return c(18,96,(e,t)=>{let i=t*Math.PI*2,s=Math.cos(i)*e,c=Math.sin(i)*e,l=[s*.45,c*.45,1],u=Math.hypot(...l);return[n+s*a,r+c*a,o+2.4+2.3*(1-e*e),l[0]/u,l[1]/u,l[2]/u,3]}),new Float32Array(t)}function xx(e,t){let n=new Map,r=[[`aPosition`,3,0],[`aNormal`,3,12],[`aMaterial`,1,24]];return{draw(i){if(!i.goggles)return;let a=`${px(i)}:${i.eye.join(`,`)}`,o=n.get(a);if(!o){let t=e.createBuffer();if(!t)throw Error(`engenty: goggle allocation failed`);let r=bx(i);if(e.bindBuffer(e.ARRAY_BUFFER,t),e.bufferData(e.ARRAY_BUFFER,r,e.STATIC_DRAW),o={buffer:t,count:r.length/7},n.set(a,o),n.size>24){let t=n.entries().next().value;t&&(e.deleteBuffer(t[1].buffer),n.delete(t[0]))}}e.bindBuffer(e.ARRAY_BUFFER,o.buffer);for(let[n,i,a]of r){let r=e.getAttribLocation(t,n);e.enableVertexAttribArray(r),e.vertexAttribPointer(r,i,e.FLOAT,!1,28,a)}e.drawArrays(e.TRIANGLES,0,o.count)},dispose(){for(let{buffer:t}of n.values())e.deleteBuffer(t);n.clear()}}}var Sx=o((()=>{vx()})),Cx,wx,Tx=o((()=>{ex(),Cx=`${$b}
294
+ in vec3 aPosition;
295
+ in vec3 aNormal;
296
+ in float aMaterial;
297
+ out vec3 vNormal;
298
+ flat out int vMaterial;
299
+ void main(){
300
+ vNormal=poseNormal(aPosition,aNormal);
301
+ vMaterial=int(aMaterial+0.5);
302
+ gl_Position=projectCoat(poseCoat(aPosition));
303
+ }
304
+ `,wx=`${$b}
305
+ in vec3 vNormal;
306
+ flat in int vMaterial;
307
+ out vec4 outColor;
308
+ void main(){
309
+ vec3 n=normalize(vNormal),light=normalize(uLight),view=vec3(0.0,0.0,1.0);
310
+ float diffuse=max(dot(n,light),0.0);
311
+ float spec=pow(max(dot(n,normalize(light+view)),0.0),48.0);
312
+ if(vMaterial==3){
313
+ float fres=0.025+0.975*pow(1.0-max(dot(n,view),0.0),5.0);
314
+ float shine=pow(max(dot(n,normalize(light+view)),0.0),100.0);
315
+ float alpha=0.045+fres*0.3+shine*0.38;
316
+ vec3 glass=mix(vec3(0.35,0.65,0.73),vec3(1.0),clamp(shine*3.0,0.0,1.0));
317
+ outColor=vec4(glass*alpha,alpha);return;
318
+ }
319
+ vec3 base=vMaterial==0?vec3(0.1,0.065,0.04):vMaterial==2?vec3(0.3,0.18,0.07):vec3(0.68,0.4,0.12);
320
+ vec3 reflected=mix(vec3(0.1,0.065,0.04),vec3(1.0,0.85,0.52),smoothstep(-0.7,0.8,-reflect(-view,n).y));
321
+ vec3 color=base*(0.4+diffuse*0.75)+reflected*(vMaterial==0?0.04:0.27)+vec3(1.0,0.9,0.65)*spec*(vMaterial==0?0.1:0.8);
322
+ outColor=vec4(color,1.0);
323
+ }
324
+ `})),Ex,Dx,Ox,kx=o((()=>{ex(),Ex=`${$b}
325
+ in vec3 aPosition;
326
+ in vec3 aNormal;
327
+ out vec3 vLocal;
328
+ out vec3 vNormal;
329
+ void main(){
330
+ vLocal=aPosition;
331
+ vNormal=poseNormal(aPosition,aNormal);
332
+ gl_Position=projectCoat(poseCoat(aPosition));
333
+ }
334
+ `,Dx=`
335
+ in vec3 vLocal;
336
+ in vec3 vNormal;
337
+ out vec4 outColor;
338
+ `,Ox=`${$b}${Dx}
339
+ void main(){
340
+ vec2 p=vLocal.xy;
341
+ vec3 n=normalize(vNormal),light=normalize(uLight);
342
+ float aa=max(fwidth(p.x),fwidth(p.y))*0.7;
343
+ float lit=max(dot(n,light),0.0);
344
+ vec3 color=mix(uDeep,uBody,0.48)*(0.65+0.5*lit);
345
+ float front=smoothstep(0.0,2.0,vLocal.z);
346
+ vec2 ep=p-uEye.xy;
347
+ float er=uEye.z*1.35;
348
+ color*=mix(0.7,1.0,smoothstep(er*0.9,er*1.35,length(ep))*front+(1.0-front));
349
+ float phase=fract(uTime/5.4);
350
+ float blink=smoothstep(0.955,0.972,phase)-smoothstep(0.972,0.99,phase);
351
+ ep.y/=max(1.0-blink,0.035);
352
+ float lens=(1.0-smoothstep(er-aa,er+aa,length(ep)))*front;
353
+ vec3 eyeNormal=rotateCoat(vec3(ep/er,sqrt(max(0.0,1.0-dot(ep,ep)/(er*er)))));
354
+ vec3 eyeColor=mix(vec3(0.78,0.83,0.92),vec3(1.0),0.5+max(dot(eyeNormal,light),0.0)*0.5);
355
+ vec2 pupil=ep-uGaze/max(1.0,length(uGaze))*er*0.42;
356
+ float iris=1.0-smoothstep(er*0.43-aa,er*0.43+aa,length(pupil));
357
+ eyeColor=mix(eyeColor,vec3(0.075,0.06,0.13),iris);
358
+ float glint=1.0-smoothstep(er*0.1,er*0.16,length(pupil+vec2(er*0.14,er*0.17)));
359
+ eyeColor=mix(eyeColor,vec3(1.0),glint*iris);
360
+ // Directional contact shade from the irregular fur fringe, strongest above.
361
+ float angle=atan(ep.y,ep.x);
362
+ float edge=length(ep)/er+sin(angle*19.0)*0.025+sin(angle*37.0)*0.015;
363
+ float contact=smoothstep(0.72,1.02,edge)*(0.25+0.3*clamp(-ep.y/er,0.0,1.0));
364
+ eyeColor*=1.0-contact;
365
+ color=mix(color,eyeColor,lens);
366
+ vec4 extras=extrasOver(p,uDeep*0.55,uBody,aa)*front*(1.0-lens);
367
+ color=color*(1.0-extras.a)+extras.rgb;
368
+ vec4 goggles=gogglesOver(p,aa,front);
369
+ outColor=vec4(goggles.rgb+color*(1.0-goggles.a),1.0);
370
+ }
371
+ `})),Ax,jx=o((()=>{ex(),kx(),Ax=`${$b}${Dx}
372
+ /** Luminance, for turning a reflection into coverage. */
373
+ float lum(vec3 c) { return dot(c, vec3(0.2126, 0.7152, 0.0722)); }
374
+
375
+ /**
376
+ * Coverage of a soft rectangular window seen in direction \`r\`, sitting in
377
+ * the key direction \`w\`. \`soft\` is the blur of the lobe reflecting it.
378
+ */
379
+ float windowLobe(vec3 r, vec3 w, float soft, bool panes) {
380
+ float facing = dot(r, w);
381
+ if (facing <= 0.0) { return 0.0; }
382
+ // Tangent frame around the window direction.
383
+ vec3 ax = normalize(cross(w, vec3(0.0, 0.0, 1.0)));
384
+ vec3 ay = cross(w, ax);
385
+ vec2 q = vec2(dot(r, ax), dot(r, ay)) / facing;
386
+ vec2 half_ = vec2(0.26, 0.42);
387
+ vec2 cov = smoothstep(half_ + soft, half_ - soft, abs(q));
388
+ float win = cov.x * cov.y;
389
+ if (panes) {
390
+ // Mullions: two columns, three rows. The grid is what makes a bright
391
+ // patch read as a window and the surface as glass.
392
+ float bar = 0.018;
393
+ float mx = 1.0 - smoothstep(bar, bar + soft, abs(q.x));
394
+ float my = 1.0 - smoothstep(bar, bar + soft, abs(abs(q.y) - 0.14));
395
+ win *= 1.0 - 0.85 * max(mx, my);
396
+ }
397
+ return win;
398
+ }
399
+
400
+ void main(){
401
+ vec2 p=vLocal.xy;
402
+ vec3 n=normalize(vNormal);
403
+ float front=smoothstep(0.0,2.0,vLocal.z);
404
+ float aaPx=max(fwidth(p.x),fwidth(p.y))*0.75;
405
+ vec4 extras=extrasOver(p,uDeep*0.55,uBody,aaPx)*front;
406
+ vec3 light = normalize(uLight);
407
+ vec3 view = vec3(0.0, 0.0, 1.0);
408
+ // 1 at the thick centre, 0 at the rim.
409
+ float ndv = clamp(n.z, 0.0, 1.0);
410
+
411
+ // Wavelength-dependent absorption keeps thick gel saturated and its rim clear.
412
+ vec3 skin=mix(uBody,vec3(1.0),0.18);
413
+ vec3 sigma=-log(max(uBody,0.025)/max(skin,0.026));
414
+ float side=clamp(-dot(n.xy,light.xy),-1.0,1.0);
415
+ float chord=ndv*(1.3+0.4*side);
416
+ vec3 gel=skin*exp(-sigma*chord*1.6);
417
+ float wrap=clamp((dot(n,light)+0.6)/1.6,0.0,1.0);
418
+ vec3 col=mix(uDeep*0.5,gel,0.42+wrap*0.58)*(0.75+wrap*0.35);
419
+ // A soft transmitted lobe brightens the side opposite the key light.
420
+ float transmitted=pow(max(dot(n,normalize(vec3(-light.xy,0.45))),0.0),5.0);
421
+ col+=mix(uBody,uTip,0.4)*transmitted*(0.32+0.55*(1.0-ndv));
422
+ vec3 refracted=refract(-view,n,1.0/1.36);
423
+ float focus=pow(max(dot(normalize(vec3(-refracted.xy,ndv)),light),0.0),12.0);
424
+ col+=uBody*focus*0.28;
425
+
426
+ // Soft, restrained studio reflections follow the deformed surface normal.
427
+ float f0=0.023;
428
+ float fres=f0+(1.0-f0)*pow(1.0-ndv,5.0);
429
+ vec3 r=reflect(-view,n);
430
+ float windowHdr=5.0;
431
+ vec3 room=mix(vec3(0.075,0.07,0.1),vec3(0.65,0.68,0.73),smoothstep(-0.8,0.8,-r.y));
432
+ float key=windowLobe(r,light,0.11,false);
433
+ float fill=windowLobe(r,normalize(vec3(0.85,0.12,0.35)),0.14,false);
434
+ vec3 coat=vec3(1.0)*key*(0.12+fres*0.24);
435
+ vec3 reflection=room*fres*0.24+coat+vec3(0.65,0.84,1.0)*fill*(0.05+fres*0.12);
436
+ reflection+=uTip*pow(1.0-ndv,7.0)*0.06;
437
+ reflection=1.0-exp(-reflection*1.8);
438
+ col=col*(1.0-fres*0.45)+reflection;
439
+ // Approximate transmission into the host background; the shared canvas does
440
+ // not sample DOM pixels, so this deliberately avoids claiming scene refraction.
441
+ float clarity=mix(0.55,0.24,smoothstep(0.0,0.85,ndv))*uClarity;
442
+ float alpha=min(1.0,1.0-clarity+lum(reflection)*0.65);
443
+ vec4 acc=vec4(min(col,vec3(1.0))*alpha,alpha);
444
+
445
+ // ─── eye, in the gel ───────────────────────────────────────────────────────
446
+ float phase = fract(uTime / 5.4);
447
+ float blink = smoothstep(0.955, 0.972, phase) - smoothstep(0.972, 0.99, phase);
448
+ vec2 ep = p - eyeCentre();
449
+ ep.y /= max(1.0 - blink, 0.06);
450
+ float er = uEye.z * 1.35;
451
+ float aa = er * 0.06;
452
+ // A soft dark socket under the lens, as if it sits a little inside the gel.
453
+ acc.rgb *= mix(1.0, mix(0.7, 1.0, smoothstep(er * 0.95, er * 1.4, length(ep))), front);
454
+
455
+ float lens = smoothstep(er + aa, er - aa, length(ep)) * front;
456
+ if (lens > 0.0) {
457
+ // ─── glass eye ─────────────────────────────────────────────────────────
458
+ // The lens is a dome set into the gel and the pupil a dark glass bead on
459
+ // it: each has its own hemisphere normal and is shaded like the body —
460
+ // window reflection, Fresnel rim, a little light leaking through the
461
+ // bead's far side — rather than painted flat.
462
+ vec2 el = ep / er;
463
+ float ez = sqrt(max(0.0, 1.0 - dot(el, el)));
464
+ vec3 en = rotateCoat(vec3(el, ez));
465
+ float ndlE = max(dot(en, light), 0.0);
466
+ // Sclera: milky glass, darker where the dome meets the socket.
467
+ vec3 eyeCol = vec3(0.93, 0.94, 0.97) * (0.62 + 0.38 * ndlE) * mix(0.55, 1.0, smoothstep(0.0, 0.5, ez));
468
+
469
+ vec2 pupilAt = uGaze * er * 0.45;
470
+ float pr = er * 0.42;
471
+ vec2 pl = (ep - pupilAt) / pr;
472
+ float pz = sqrt(max(0.0, 1.0 - dot(pl, pl)));
473
+ vec3 pn = vec3(pl, pz);
474
+ float pupil = smoothstep(pr + aa, pr - aa, length(ep - pupilAt));
475
+ if (pupil > 0.0) {
476
+ vec3 bead = mix(vec3(0.05, 0.04, 0.10), vec3(0.16, 0.13, 0.24), pow(1.0 - pz, 2.0));
477
+ // The bead is transparent too: light entering at the top leaves at the
478
+ // bottom edge, warmed by the iris.
479
+ float leak = pow(max(dot(pn, normalize(vec3(-light.xy, 0.2))), 0.0), 4.0) * (1.0 - pz);
480
+ bead += mix(uTip, vec3(1.0), 0.4) * leak * 0.55;
481
+ vec3 pr_ = reflect(-view, pn);
482
+ float pf = 0.03 + 0.97 * pow(1.0 - pz, 5.0);
483
+ // A bead this small would show the window as a speck; a flatter
484
+ // reflection normal spreads it to the broad soft patch a glass eye has.
485
+ vec3 prw = reflect(-view, normalize(vec3(pl * 0.4, pz)));
486
+ vec3 pref = (mix(vec3(0.12), vec3(0.6), smoothstep(-0.7, 0.9, -pr_.y)) * pf * 2.0)
487
+ + vec3(1.0) * windowLobe(prw, light, 0.1, true) * windowHdr * (0.05 + pf * 0.5);
488
+ bead += 1.0 - exp(-pref);
489
+ eyeCol = mix(eyeCol, min(bead, vec3(1.0)), pupil);
490
+ }
491
+
492
+ // Wet skin over the whole lens.
493
+ vec3 er_ = reflect(-view, en);
494
+ float ef = 0.022 + 0.978 * pow(1.0 - ez, 5.0);
495
+ vec3 lensRef = vec3(0.7, 0.72, 0.8) * ef * 1.6
496
+ + vec3(1.0) * windowLobe(er_, light, 0.06, true) * windowHdr * (0.02 + ef * 0.3);
497
+ eyeCol += 1.0 - exp(-lensRef);
498
+
499
+ acc.rgb = acc.rgb * (1.0 - lens) + min(eyeCol, vec3(1.0)) * lens;
500
+ acc.a = acc.a * (1.0 - lens) + lens;
501
+ }
502
+
503
+ // Decals sit in the gel: slightly softened by the coat's own alpha, and the
504
+ // wet skin's reflection lies over them.
505
+ float da = extras.a * 0.92;
506
+ acc.rgb = acc.rgb * (1.0 - da) + (extras.rgb + coat * extras.a * 0.5) * 0.92;
507
+ acc.a = acc.a * (1.0 - da) + da;
508
+
509
+ vec4 goggles = gogglesOver(p, aaPx, front);
510
+ outColor = goggles + acc * (1.0 - goggles.a);
511
+ }
512
+ `}));function Mx(e,t,n,r,i){let a=-Math.sin(n[0]),o=Math.cos(n[0])*Math.sin(n[1]),s=Math.cos(n[0])*Math.cos(n[1]),c=1/0,l=-1/0;for(let t=0;t<e.length;t+=Px){let n=e[t]*a+e[t+1]*o+e[t+2]*s;c=Math.min(c,n),l=Math.max(l,n)}i.fill(0);let u=255/Math.max(l-c,.001);for(let t=0;t<r.length;t++){let n=t*Px,l=e[n]*a+e[n+1]*o+e[n+2]*s,d=Math.min(255,Math.max(0,Math.floor((l-c)*u)));r[t]=d,i[d]++}let d=0;for(let e=0;e<Fx;e++){let t=i[e];i[e]=d,d+=t}for(let n=0;n<r.length;n++){let a=i[r[n]]++*Px;for(let r=0;r<Px;r++)t[a+r]=e[n*Px+r]}}function Nx(e){return{roots:e,sorted:new Float32Array(e.length),buckets:new Uint16Array(e.length/Px),counts:new Uint32Array(Fx),yaw:NaN,pitch:NaN}}var Px,Fx,Ix=o((()=>{Px=8,Fx=256}));function Lx(e){let t=hx(e),n=781,r=()=>(n=(n*1664525+1013904223)%4294967296,n/4294967296),i=[],a=Math.min(200,Math.max(10,e.density))**2/4e3,o=t.vertices;for(let e=0;e<o.length;e+=18){let t=[o[e+6]-o[e],o[e+7]-o[e+1],o[e+8]-o[e+2]],n=[o[e+12]-o[e],o[e+13]-o[e+1],o[e+14]-o[e+2]],s=Math.hypot(t[1]*n[2]-t[2]*n[1],t[2]*n[0]-t[0]*n[2],t[0]*n[1]-t[1]*n[0])*.5*a,c=Math.floor(s)+ +(r()<s%1);for(let t=0;t<c;t++){let t=Math.sqrt(r()),n=r(),a=[1-t,t*(1-n),t*n],s=Array.from({length:6},(t,n)=>a.reduce((t,r,i)=>t+r*o[e+i*6+n],0)),c=Math.hypot(s[3],s[4],s[5]);i.push(s[0],s[1],s[2],s[3]/c,s[4]/c,s[5]/c,r(),r())}}return new Float32Array(i)}function Rx(e,t){let n=new Map,r=e.getAttribLocation(t,`aRoot`),i=e.getAttribLocation(t,`aNormal`),a=e.getAttribLocation(t,`aRandom`);return{draw(t){let o=`${px(t)}:${t.density}`,s=n.get(o);if(!s){let r=e.createBuffer();if(!r)throw Error(`engenty: strand allocation failed`);let i=Lx(t);if(e.bindBuffer(e.ARRAY_BUFFER,r),e.bufferData(e.ARRAY_BUFFER,i,e.DYNAMIC_DRAW),s={buffer:r,count:i.length/8,order:Nx(i)},n.set(o,s),n.size>24){let t=n.entries().next().value;t&&(e.deleteBuffer(t[1].buffer),n.delete(t[0]))}}e.bindBuffer(e.ARRAY_BUFFER,s.buffer);let c=t.turn??[0,0],l=s.order;(l.yaw!==c[0]||l.pitch!==c[1])&&(Mx(l.roots,l.sorted,c,l.buckets,l.counts),e.bufferSubData(e.ARRAY_BUFFER,0,l.sorted),l.yaw=c[0],l.pitch=c[1]);for(let[t,n,o]of[[r,3,0],[i,3,12],[a,2,24]])e.enableVertexAttribArray(t),e.vertexAttribPointer(t,n,e.FLOAT,!1,32,o),e.vertexAttribDivisor(t,1);e.drawArraysInstanced(e.TRIANGLE_STRIP,0,18,s.count)},dispose(){for(let t of n.values())e.deleteBuffer(t.buffer);n.clear()}}}var zx=o((()=>{Ix(),vx()})),Bx,Vx,Hx=o((()=>{ex(),Bx=`${$b}
513
+ in vec3 aRoot;
514
+ in vec3 aNormal;
515
+ in vec2 aRandom;
516
+ out vec3 vColor;
517
+ out float vAcross;
518
+ out float vCoverage;
519
+ void main(){
520
+ float t=float(gl_VertexID/2)/8.0;
521
+ float side=float(gl_VertexID%2)*2.0-1.0;
522
+ float eyeDistance=length(aRoot.xy-uEye.xy);
523
+ float front=smoothstep(0.0,2.0,aRoot.z);
524
+ float eyeAngle=atan(aRoot.y-uEye.y,aRoot.x-uEye.x);
525
+ float rim=uEye.z*1.35;
526
+ float fringe=sin(eyeAngle*19.0)*0.025+sin(eyeAngle*37.0)*0.015;
527
+ float socket=mix(1.0,smoothstep(rim*(0.88+fringe),rim*(1.08+fringe),eyeDistance),front);
528
+ socket=mix(socket,mix(1.0,smoothstep(rim*1.22,rim*1.4,eyeDistance),front),uGoggles);
529
+ float bandY=aRoot.y-uEye.y+1.7*pow((aRoot.x-uEye.x)/max(uScale,1.0),2.0);
530
+ float strap=(1.0-smoothstep(uEye.z*0.3,uEye.z*0.5,abs(bandY)))*uGoggles*smoothstep(0.5,6.0,-sdBody(aRoot.xy));
531
+ // Compress the pile only on the facing surface; side tufts cover strap ends.
532
+ strap*=smoothstep(0.45,0.8,abs(aNormal.z));
533
+ float underfur=1.0-step(0.36,aRandom.x);
534
+ float len=uFur*mix(0.55+aRandom.x*0.55,0.3+aRandom.x*0.5,underfur)*socket*(1.0-strap*0.75);
535
+ vec3 tangent=normalize(cross(aNormal,abs(aNormal.y)>0.9?vec3(1.0,0.0,0.0):vec3(0.0,1.0,0.0)));
536
+ vec3 flow=aNormal*0.95+tangent*(aRandom.y-0.5)*0.5+vec3(0.04,0.12,0.0);
537
+ float nearEye=front*(1.0-smoothstep(rim, rim*1.5,eyeDistance));
538
+ flow.xy-=normalize(aRoot.xy-uEye.xy+vec2(0.001))*nearEye*0.7;
539
+ float wave=sin(uTime*1.8+aRoot.y*0.09+aRandom.x*TAU);
540
+ vec3 bend=vec3(wave*uWind*0.12,0.07+aRandom.y*0.12,0.0);
541
+ vec3 centre=poseCoat(aRoot+len*(flow*t+bend*t*t));
542
+ vec3 direction=rotateCoat(flow+2.0*bend*t);
543
+ vec2 across=normalize(vec2(-direction.y,direction.x)+vec2(0.00001));
544
+ float radius=uThick*(0.1+aRandom.y*0.09)*mix(1.0,1.8,underfur)*pow(1.0-t,0.8);
545
+ float pixel=VIEW/uResolution.x/coatZoom();
546
+ centre.xy+=across*side*max(radius,pixel*0.7);
547
+ gl_Position=projectCoat(centre);
548
+ vec3 n=normalize(rotateCoat(aNormal/bodyStretch()));
549
+ float lit=max(dot(n,normalize(uLight)),0.0);
550
+ vColor=mix(uDeep,uBody,0.52+t*0.48)*(0.6+lit*0.65);
551
+ vColor+=uTip*pow(1.0-abs(n.z),3.0)*(0.08+t*0.22);
552
+ vColor*=0.82+aRandom.y*0.32;
553
+ vColor+=vec3(0.08)*pow(lit,12.0)*t;
554
+ vAcross=side;
555
+ vCoverage=min(1.0,radius/(pixel*0.7))*socket*(1.0-strap*0.85);
556
+ }
557
+ `,Vx=`#version 300 es
558
+ precision highp float;
559
+ in vec3 vColor;
560
+ in float vAcross;
561
+ in float vCoverage;
562
+ out vec4 outColor;
563
+ void main(){
564
+ float alpha=(1.0-smoothstep(0.35,1.0,abs(vAcross)))*vCoverage;
565
+ if(alpha<0.025)discard;
566
+ outColor=vec4(vColor*alpha,alpha);
567
+ }
568
+ `}));function Ux(e,t){let n=new Map,r=e.getAttribLocation(t,`aPosition`),i=e.getAttribLocation(t,`aNormal`);return{draw(t){let a=px(t),o=n.get(a);if(!o){let r=e.createBuffer();if(!r)throw Error(`engenty: body allocation failed`);let i=hx(t);if(e.bindBuffer(e.ARRAY_BUFFER,r),e.bufferData(e.ARRAY_BUFFER,i.vertices,e.STATIC_DRAW),o={buffer:r,count:i.vertices.length/6},n.set(a,o),n.size>24){let t=n.entries().next().value;t&&(e.deleteBuffer(t[1].buffer),n.delete(t[0]))}}e.bindBuffer(e.ARRAY_BUFFER,o.buffer);for(let[t,n]of[[r,0],[i,12]])e.enableVertexAttribArray(t),e.vertexAttribPointer(t,3,e.FLOAT,!1,24,n);e.drawArrays(e.TRIANGLES,0,o.count)},dispose(){for(let t of n.values())e.deleteBuffer(t.buffer);n.clear()}}}var Wx=o((()=>{vx()}));function Gx(e,t){let n=ux(e,t===`fur`?Ox:Ax,{vertex:t===`fur`?Ex:Ex.replace(`#version 300 es`,`#version 300 es
569
+ #define JELLY_COAT`),geometry:Ux});if(!n)return null;let r=[n];if(t===`fur`){let t=ux(e,Vx,{vertex:Bx,geometry:Rx,clear:!1,doubleSided:!0,depthWrite:!1});if(!t)return n.dispose(),null;r.push(t)}let i=ux(e,ax,{vertex:ix,geometry:nx,clear:!1});if(!i){for(let e of r)e.dispose();return null}r.push(i);let a=ux(e,wx,{vertex:t===`jelly`?Cx.replace(`#version 300 es`,`#version 300 es
570
+ #define JELLY_COAT`):Cx,geometry:xx,clear:!1});if(!a){for(let e of r)e.dispose();return null}return r.push(a),{render(e){for(let t of r)t.render(e)},viewport(e){for(let t of r)t.viewport(e)},dispose(){for(let e of r)e.dispose()}}}var Kx=o((()=>{rx(),ox(),fx(),Sx(),Tx(),jx(),zx(),Hx(),Wx(),kx()}));function qx(e){if(Xx.has(e)||typeof document>`u`)return null;let t=document.createElement(`canvas`);t.width=1,t.height=1;let n=Gx(t,e);return n?(t.addEventListener(`webglcontextlost`,t=>{t.preventDefault(),Yx.delete(e)}),{canvas:t,refs:0,renderer:n,size:0}):(Xx.add(e),null)}function Jx(e=`fur`){let t=Yx.get(e);if(!t){let n=qx(e);if(!n)return null;Yx.set(e,n),t=n}let n=t;n.refs+=1;let r=!1;return{drawInto(t,i,a){if(r||Yx.get(e)!==n)return;let o=i;o>n.size&&(n.size=o,n.canvas.width=o,n.canvas.height=o),n.renderer.viewport(o),n.renderer.render(a),t.clearRect(0,0,t.canvas.width,t.canvas.height),t.drawImage(n.canvas,0,n.canvas.height-o,o,o,0,0,t.canvas.width,t.canvas.height)},release(){r||(r=!0,--n.refs,n.refs<=0&&Yx.get(e)===n&&(n.renderer.dispose(),Yx.delete(e)))}}}var Yx,Xx,Zx=o((()=>{Kx(),Yx=new Map,Xx=new Set}));function Qx(e,t){let n=$x/Math.max(1,Math.hypot(e,t));return[e*n,t===0?0:-t*n]}var $x,eS=o((()=>{$x=Math.PI/18}));function tS(e,t,n){if(n<=0)return;let r=3.8,i=Math.sqrt(110-r*r),a=Math.exp(-3.8*n),o=Math.cos(i*n),s=Math.sin(i*n);for(let[n,c,l]of[[`x`,`vx`,t[0]],[`y`,`vy`,t[1]]]){let t=e[n]-l,u=e[c];e[n]=l+a*(t*o+(u+r*t)/i*s),e[c]=a*(u*o-(r*u+110*t)/i*s)}}var nS=o((()=>{}));function rS(e,t){let n={x:0,y:0,vx:0,vy:0},r=[60,60],i=null,a=[0,0],o=!1,s=n=>{if(!t()||n.button!==0||i!==null)return;let s=e.getBoundingClientRect(),c=(n.clientX-s.left)/s.width*152+-16,l=(n.clientY-s.top)/s.height*152+-16;Math.hypot(c-60,l-60)>48||(r[0]=c,r[1]=l,a=[n.clientX,n.clientY],i=n.pointerId,o=!1,e.setPointerCapture(i))},c=r=>{if(r.pointerId!==i)return;if(!t()){l(r);return}let s=e.getBoundingClientRect(),c=(r.clientX-a[0])/s.width*152,u=(r.clientY-a[1])/s.height*152,d=Math.min(1,18/(Math.hypot(c,u)||1));n.x=c*d,n.y=u*d,n.vx=0,n.vy=0,o||=Math.hypot(r.clientX-a[0],r.clientY-a[1])>4},l=t=>{t.pointerId===i&&(i=null,e.hasPointerCapture(t.pointerId)&&e.releasePointerCapture(t.pointerId))},u=e=>{o&&=(e.preventDefault(),e.stopPropagation(),!1)};return e.addEventListener(`pointerdown`,s),e.addEventListener(`pointermove`,c),e.addEventListener(`pointerup`,l),e.addEventListener(`pointercancel`,l),e.addEventListener(`lostpointercapture`,l),e.addEventListener(`click`,u,!0),{step(e){return i===null&&tS(n,[0,0],e),[r[0],r[1],n.x,n.y]},dispose(){i!==null&&e.hasPointerCapture(i)&&e.releasePointerCapture(i),e.removeEventListener(`pointerdown`,s),e.removeEventListener(`pointermove`,c),e.removeEventListener(`pointerup`,l),e.removeEventListener(`pointercancel`,l),e.removeEventListener(`lostpointercapture`,l),e.removeEventListener(`click`,u,!0)}}}var iS=o((()=>{ex(),nS()}));function aS(e){cS.x=e.clientX,cS.y=e.clientY;for(let e of lS)e()}function oS(){return cS}function sS(e){return!uS&&typeof window<`u`&&(uS=!0,cS.x=window.innerWidth*.62,cS.y=window.innerHeight*.28,window.addEventListener(`pointermove`,aS,{passive:!0})),lS.add(e),()=>{lS.delete(e)}}var cS,lS,uS,dS=o((()=>{cS={x:0,y:0},lS=new Set,uS=!1})),fS=c({FluffyEngenty:()=>pS});function pS({className:e,motion:t=`auto`,animationSpeed:n=1,turn:r,coat:i=`fur`,goggles:a=!1,interactive:o=!0,look:s=null,kind:c=`round`,overrides:l,quality:u=`high`,size:d=260}){let f=(0,mS.useRef)(null),p=(0,mS.useRef)(null),m=(0,mS.useRef)(0);m.current===0&&(vS+=1,m.current=vS*yS);let h=(0,mS.useRef)(null),[g,_]=(0,mS.useState)(!0),v=fy[c],y=(0,mS.useMemo)(()=>uy(v),[v]),b=(0,mS.useMemo)(()=>dy(v),[v]),x=(0,mS.useMemo)(()=>ly(v),[v]),S=(0,mS.useRef)({animationSpeed:n,motion:t,turn:r,goggles:a,blobs:y,extras:b,form:v,interactive:o,kind:c,look:s,overrides:l,quality:u,scale:x,size:d});return S.current={animationSpeed:n,motion:t,turn:r,goggles:a,blobs:y,extras:b,form:v,interactive:o,kind:c,look:s,overrides:l,quality:u,scale:x,size:d},(0,mS.useEffect)(()=>{f.current?.()},[c,l,u,d,o,s,a,t,n,r]),(0,mS.useEffect)(()=>{let e=p.current,t=h.current;if(!(e&&t))return;let n=e.getContext(`2d`),r=n?Jx(i):null;if(!(n&&r)){_(!1);return}let a=m.current,o=window.matchMedia(`(prefers-reduced-motion: reduce)`),s={x:0,y:0},c={x:0,y:0},l={vx:0,vy:0,x:0,y:0},u=0,d=!0,g=0,v=0,y=i===`jelly`?rS(t,()=>S.current.interactive&&S.current.motion!==`pause`&&(S.current.motion===`play`||!o.matches)):null,b=f=>{u=0;let p=S.current,m=gS[p.quality],h=p.motion===`pause`||p.motion===`auto`&&o.matches,_=h?0:Math.min((f-(v||f))/1e3,.1);g+=_*Math.max(.1,Math.min(2,p.animationSpeed)),v=f;let x=Math.min(window.devicePixelRatio||1,m.dprCap),C=Math.max(1,Math.round(p.size*x));e.width!==C&&(e.width=C,e.height=C);let w=120*C/(_S*152),T=p.overrides?.fur??p.form.fur;if((p.interactive||p.look)&&!h){let e,n,r,i;if(p.look)e=p.look.x,n=p.look.y,r=Math.hypot(e,n)||1,i=Math.min(1,r);else{let a=t.getBoundingClientRect(),o=oS();e=o.x-(a.left+a.width*.5),n=o.y-(a.top+a.height*.48),r=Math.hypot(e,n)||1,i=.35+Math.min(1,r/(a.width*2.4||1))*.65}s.x+=(e/r*5.5*i-s.x)*.16,s.y+=(n/r*3.5*i-s.y)*.16,c.x+=(e/r*i-c.x)*.24,c.y+=(n/r*.9*i-c.y)*.24}tS(l,[s.x,s.y],_*Math.max(.1,Math.min(2,p.animationSpeed)));let E=Ub(t,p.kind);r.drawInto(n,C,{blobs:p.blobs,clarity:p.overrides?.clarity??sx.clarity,softness:p.overrides?.softness??sx.softness,pull:y?.step(_*Math.max(.1,Math.min(2,p.animationSpeed))),body:E.body,deep:E.deep,density:Math.min(p.overrides?.density??m.density,w),extraMeta:p.extras.meta,extras:p.extras.geometry,eye:[p.form.eye.x,p.form.eye.y,p.form.eye.r],gaze:[c.x,c.y],goggles:p.goggles,turn:p.turn?Qx(p.turn.yaw/$x,p.turn.pitch/$x):Qx(c.x,c.y),fur:T,inflate:p.overrides?.inflate??(i===`jelly`?sx.inflate:xS),lean:[s.x,s.y],light:bS,period:p.form.period,scale:p.scale,falloff:p.form.falloff,thick:p.overrides?.thick??m.thick,time:g+a,tip:E.tip,wind:p.overrides?.wind??SS,wobble:[l.x-s.x,l.y-s.y]}),d&&!h&&(u=requestAnimationFrame(b))},x=()=>{u||=(v=0,requestAnimationFrame(b))},C=new IntersectionObserver(([e])=>{d=e?.isIntersecting??!0,d?x():u&&=(cancelAnimationFrame(u),0)},{rootMargin:`120px`});C.observe(t),f.current=x;let w=sS(x);return o.addEventListener(`change`,x),x(),()=>{f.current=null,C.disconnect(),y?.dispose(),w(),o.removeEventListener(`change`,x),u&&cancelAnimationFrame(u),r.release()}},[i]),g?(0,hS.jsxs)(`div`,{"aria-hidden":`true`,className:e,ref:h,style:{height:d,position:`relative`,width:d},children:[(0,hS.jsx)(`div`,{style:{background:`radial-gradient(closest-side, rgb(0 0 0 / 0.2), transparent)`,filter:`blur(4px)`,height:`${v.shadowRx*50/152}%`,left:`50%`,position:`absolute`,top:`${CS(110)}%`,transform:`translate(-50%, -50%)`,width:`${v.shadowRx*2.5*100/152}%`}}),(0,hS.jsx)(`canvas`,{ref:p,style:{display:`block`,height:d,width:d,touchAction:i===`jelly`&&o&&t!==`pause`?`none`:void 0,cursor:i===`jelly`&&o?`grab`:void 0}})]}):(0,hS.jsx)(nb,{className:e,goggles:a,kind:c,size:d})}var mS,hS,gS,_S,vS,yS,bS,xS,SS,CS,wS=o((()=>{mS=u(f(),1),ob(),gy(),Jb(),ex(),Zx(),eS(),cx(),iS(),nS(),dS(),hS=vy(),gS={high:{density:68,dprCap:2,thick:1},low:{density:40,dprCap:1,thick:1.15},medium:{density:55,dprCap:1.5,thick:1.05}},_S=1.7,vS=0,yS=2.399963,bS=[-.42,-.72,.75],xS=30,SS=.5,CS=e=>(e- -16)/152*100}));ob(),Kh();var TS=(0,y.lazy)(()=>Gh(()=>Promise.resolve().then(()=>(wS(),fS)).then(e=>({default:e.FluffyEngenty})),void 0,import.meta.url));function ES({kind:e,size:t=64,fluffy:n,coat:r,goggles:i=!1,interactive:a=!0}){let o=e||`round`,s=Cb(),c=r??(s===`dark`?`jelly`:`fur`);if(n&&t>=120&&(c===`fur`||s===`dark`))return(0,Z.jsx)(y.Suspense,{fallback:(0,Z.jsx)(nb,{goggles:i,kind:o,size:Math.round(t*.62)}),children:(0,Z.jsx)(TS,{goggles:i,coat:c,kind:o,size:t,quality:`medium`,interactive:a})});if(n&&t>=120){let e=Math.round(t*1.08);return(0,Z.jsxs)(`div`,{"aria-hidden":`true`,className:`relative flex items-center justify-center overflow-hidden`,style:{background:wb(o),borderRadius:t*.28,height:t,width:t},children:[(0,Z.jsx)(`span`,{className:`pointer-events-none absolute rounded-full bg-white`,style:{filter:`blur(${t*.18}px)`,height:t*.8,opacity:.16,right:-t*.3,top:-t*.3,width:t*.8}}),(0,Z.jsx)(`div`,{className:`relative`,style:{marginTop:t*.04},children:(0,Z.jsx)(y.Suspense,{fallback:(0,Z.jsx)(nb,{goggles:i,kind:o,size:Math.round(e*.62)}),children:(0,Z.jsx)(TS,{goggles:i,coat:`jelly`,kind:o,size:e,quality:`medium`,interactive:a})})})]})}return(0,Z.jsx)(nb,{goggles:i,kind:o,size:t,animated:a})}var DS=``.replace(/\/+$/,``);`${DS}`;var OS=null;function kS(e){OS=e?{base:e.base.replace(/\/+$/,``),ticket:e.ticket}:null}function AS(e){return OS&&e.startsWith(`/api/`)?`${OS.base}${e}${e.includes(`?`)?`&`:`?`}rt=${encodeURIComponent(OS.ticket)}`:!DS||!e.startsWith(`/`)||e.startsWith(`//`)||e===DS||e.startsWith(`${DS}/`)?e:`${DS}${e}`}function jS(e){return`./${e.replace(/^\/+/,``)}`}function MS(e,t){this.v=e,this.k=t}function NS(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function PS(e){if(Array.isArray(e))return e}function FS(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function IS(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
571
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function LS(e,t){return PS(e)||FS(e,t)||RS(e,t)||IS()}function RS(e,t){if(e){if(typeof e==`string`)return NS(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?NS(e,t):void 0}}function zS(e){var t,n;function r(t,n){try{var a=e[t](n),o=a.value,s=o instanceof MS;Promise.resolve(s?o.v:o).then(function(n){if(s){var c=t===`return`&&o.k?t:`next`;if(!o.k||n.done)return r(c,n);n=e[c](n).value}i(!!a.done,n)},function(e){r(`throw`,e)})}catch(e){i(2,e)}}function i(e,i){e===2?t.reject(i):t.resolve({value:i,done:e}),(t=t.next)?r(t.key,t.arg):n=null}this._invoke=function(e,i){return new Promise(function(a,o){var s={key:e,arg:i,resolve:a,reject:o,next:null};n?n=n.next=s:(t=n=s,r(e,i))})},typeof e.return!=`function`&&(this.return=void 0)}zS.prototype[typeof Symbol==`function`&&Symbol.asyncIterator||`@@asyncIterator`]=function(){return this},zS.prototype.next=function(e){return this._invoke(`next`,e)},zS.prototype.throw=function(e){return this._invoke(`throw`,e)},zS.prototype.return=function(e){return this._invoke(`return`,e)};var BS=Object.entries,VS=Object.setPrototypeOf,HS=Object.isFrozen,US=Object.getPrototypeOf,WS=Object.getOwnPropertyDescriptor,GS=Object.freeze,KS=Object.seal,qS=Object.create,JS=typeof Reflect<`u`&&Reflect,YS=JS.apply,XS=JS.construct;GS||=function(e){return e},KS||=function(e){return e},YS||=function(e,t){var n=[...arguments].slice(2);return e.apply(t,n)},XS||=function(e){return new e(...[...arguments].slice(1))};var ZS=_C(Array.prototype.forEach);Array.prototype.indexOf;var QS=_C(Array.prototype.lastIndexOf),$S=_C(Array.prototype.pop),eC=_C(Array.prototype.push);Array.prototype.slice;var tC=_C(Array.prototype.splice),nC=Array.isArray,rC=_C(String.prototype.toLowerCase),iC=_C(String.prototype.toString),aC=_C(String.prototype.match),oC=_C(String.prototype.replace),sC=_C(String.prototype.indexOf),cC=_C(String.prototype.trim),lC=_C(Number.prototype.toString),uC=_C(Boolean.prototype.toString),dC=typeof BigInt>`u`?null:_C(BigInt.prototype.toString),fC=typeof Symbol>`u`?null:_C(Symbol.prototype.toString),pC=_C(Object.prototype.hasOwnProperty),mC=_C(Object.prototype.toString),hC=_C(RegExp.prototype.test),gC=vC(TypeError);function _C(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);var n=[...arguments].slice(1);return YS(e,t,n)}}function vC(e){return function(){return XS(e,[...arguments])}}function yC(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:rC;if(VS&&VS(e,null),!nC(t))return e;let r=t.length;for(;r--;){let i=t[r];if(typeof i==`string`){let e=n(i);e!==i&&(HS(t)||(t[r]=e),i=e)}e[i]=!0}return e}function bC(e){for(let t=0;t<e.length;t++)pC(e,t)||(e[t]=null);return e}function xC(e){let t=qS(null);for(let r of BS(e)){var n=LS(r,2);let i=n[0],a=n[1];pC(e,i)&&(t[i]=nC(a)?bC(a):a&&typeof a==`object`&&a.constructor===Object?xC(a):a)}return t}function SC(e){switch(typeof e){case`string`:return e;case`number`:return lC(e);case`boolean`:return uC(e);case`bigint`:return dC?dC(e):`0`;case`symbol`:return fC?fC(e):`Symbol()`;case`undefined`:return mC(e);case`function`:case`object`:{if(e===null)return mC(e);let t=e,n=CC(t,`toString`);if(typeof n==`function`){let e=n(t);return typeof e==`string`?e:mC(e)}return mC(e)}default:return mC(e)}}function CC(e,t){for(;e!==null;){let n=WS(e,t);if(n){if(n.get)return _C(n.get);if(typeof n.value==`function`)return _C(n.value)}e=US(e)}function n(){return null}return n}function wC(e){try{return hC(e,``),!0}catch{return!1}}var TC=GS(`a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr`.split(`.`)),EC=GS(`svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern`.split(`.`)),DC=GS([`feBlend`,`feColorMatrix`,`feComponentTransfer`,`feComposite`,`feConvolveMatrix`,`feDiffuseLighting`,`feDisplacementMap`,`feDistantLight`,`feDropShadow`,`feFlood`,`feFuncA`,`feFuncB`,`feFuncG`,`feFuncR`,`feGaussianBlur`,`feImage`,`feMerge`,`feMergeNode`,`feMorphology`,`feOffset`,`fePointLight`,`feSpecularLighting`,`feSpotLight`,`feTile`,`feTurbulence`]),OC=GS([`animate`,`color-profile`,`cursor`,`discard`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`foreignobject`,`hatch`,`hatchpath`,`mesh`,`meshgradient`,`meshpatch`,`meshrow`,`missing-glyph`,`script`,`set`,`solidcolor`,`unknown`,`use`]),kC=GS(`math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts`.split(`.`)),AC=GS([`maction`,`maligngroup`,`malignmark`,`mlongdiv`,`mscarries`,`mscarry`,`msgroup`,`mstack`,`msline`,`msrow`,`semantics`,`annotation`,`annotation-xml`,`mprescripts`,`none`]),jC=GS([`#text`]),MC=GS(`accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.command.commandfor.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns`.split(`.`)),NC=GS(`accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dominant-baseline.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.pointer-events.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-orientation.text-rendering.textlength.type.u1.u2.unicode.values.vector-effect.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan`.split(`.`)),PC=GS(`accent.accentunder.align.bevelled.close.columnalign.columnlines.columnspacing.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lquote.lspace.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns`.split(`.`)),FC=GS([`xlink:href`,`xml:id`,`xlink:title`,`xml:space`,`xmlns:xlink`]),IC=KS(/{{[\w\W]*|^[\w\W]*}}/g),LC=KS(/<%[\w\W]*|^[\w\W]*%>/g),RC=KS(/\${[\w\W]*/g),zC=KS(/^data-[\-\w.\u00B7-\uFFFF]+$/),BC=KS(/^aria-[\-\w]+$/),VC=KS(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),HC=KS(/^(?:\w+script|data):/i),UC=KS(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),WC=KS(/^html$/i),GC=KS(/^[a-z][.\w]*(-[.\w]+)+$/i),KC=KS(/<[/\w!]/g),qC=KS(/<[/\w]/g),JC=KS(/<\/no(script|embed|frames)/i),YC=KS(/\/>/i),XC={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},ZC=[`style`,`script`,`xmp`,`iframe`,`noembed`,`noframes`,`plaintext`,`noscript`],QC=GS(yC({},ZC)),$C=function(){let e={};return ZS(ZC,t=>{e[t]=KS(RegExp(`</`+t+`(?=[\\t\\n\\f\\r />])`,`i`))}),GS(e)}(),ew=function(){return typeof window>`u`?null:window},tw=function(e,t){if(typeof e!=`object`||typeof e.createPolicy!=`function`)return null;let n=null,r=`data-tt-policy-suffix`;t&&t.hasAttribute(r)&&(n=t.getAttribute(r));let i=`dompurify`+(n?`#`+n:``);try{return e.createPolicy(i,{createHTML(e){return e},createScriptURL(e){return e}})}catch{return console.warn(`TrustedTypes policy `+i+` could not be created.`),null}},nw=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},rw=function(e,t,n,r){return pC(e,t)&&nC(e[t])?yC(r.base?xC(r.base):{},e[t],r.transform):n},iw=function(e,t,n){let r=pC(e,t)?e[t]:void 0;return r&&typeof r==`object`?xC(r):n()};function aw(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ew(),t=e=>aw(e);if(t.version=`3.4.16`,t.removed=[],!e||!e.document||e.document.nodeType!==XC.document||!e.Element)return t.isSupported=!1,t;let n=e.document,r=n,i=r.currentScript;e.DocumentFragment;let a=e.HTMLTemplateElement,o=e.Node,s=e.Element,c=e.NodeFilter;e.NamedNodeMap===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;let l=e.DOMParser,u=e.trustedTypes,d=s.prototype,f=CC(d,`cloneNode`),p=CC(d,`remove`),m=CC(d,`removeAttributeNode`),h=CC(d,`nextSibling`),g=CC(d,`childNodes`),_=CC(d,`parentNode`),v=CC(d,`shadowRoot`),y=CC(d,`attributes`),b=o&&o.prototype?CC(o.prototype,`nodeType`):null,x=o&&o.prototype?CC(o.prototype,`nodeName`):null,S=o&&o.prototype?CC(o.prototype,`ownerDocument`):null,C=function(e){return b?b(e):e.nodeType},w=function(e){return x?x(e):e.nodeName};if(typeof a==`function`){let e=n.createElement(`template`);e.content&&e.content.ownerDocument&&(n=e.content.ownerDocument)}let T,E=``,D,ee=!1,O=0,k=function(){if(O>0)throw gC(`A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.`)},A=function(e){k(),O++;try{return T.createHTML(e)}finally{O--}},te=function(e){k(),O++;try{return T.createScriptURL(e)}finally{O--}},ne=function(){return ee||=(D=tw(u,i),!0),D},re=n,ie=re.implementation,ae=re.createNodeIterator,oe=re.createDocumentFragment,se=re.getElementsByTagName,ce=r.importNode,j=nw();t.isSupported=typeof BS==`function`&&typeof _==`function`&&ie&&ie.createHTMLDocument!==void 0;let le=IC,ue=LC,de=RC,fe=zC,pe=BC,me=HC,he=UC,ge=GC,_e=VC,ve=null,M=yC({},[...TC,...EC,...DC,...kC,...jC]),N=null,ye=yC({},[...MC,...NC,...PC,...FC]),be=Object.seal(qS(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),P=null,xe=null,Se=Object.seal(qS(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),Ce=!0,we=!0,Te=!1,Ee=!0,De=!1,Oe=!0,ke=!1,Ae=!1,je=null,Me=null,Ne=!1,Pe=!1,Fe=!1,Ie=!1,Le=!0,Re=!1,ze=`user-content-`,Be=!0,Ve=!1,He={},Ue=null,We=yC({},`annotation-xml.audio.colgroup.desc.foreignobject.head.iframe.math.mi.mn.mo.ms.mtext.noembed.noframes.noscript.plaintext.script.selectedcontent.style.svg.template.thead.title.video.xmp`.split(`.`)),Ge=null,Ke=yC({},[`audio`,`video`,`img`,`source`,`image`,`track`]),qe=null,Je=yC({},[`alt`,`class`,`for`,`id`,`label`,`name`,`pattern`,`placeholder`,`role`,`summary`,`title`,`value`,`style`,`xmlns`]),Ye=`http://www.w3.org/1998/Math/MathML`,Xe=`http://www.w3.org/2000/svg`,Ze=`http://www.w3.org/1999/xhtml`,Qe=Ze,$e=!1,F=null,et=yC({},[Ye,Xe,Ze],iC),tt=GS([`mi`,`mo`,`mn`,`ms`,`mtext`]),nt=yC({},tt),rt=GS([`annotation-xml`]),it=yC({},rt),at=yC({},[`title`,`style`,`font`,`a`,`script`]),ot=null,st=[`application/xhtml+xml`,`text/html`],I=null,ct=null,lt=n.createElement(`form`),ut=function(e){return e instanceof RegExp||e instanceof Function},dt=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(ct&&ct===e)return;(!e||typeof e!=`object`)&&(e={}),e=xC(e),ot=st.indexOf(e.PARSER_MEDIA_TYPE)===-1?`text/html`:e.PARSER_MEDIA_TYPE,I=ot===`application/xhtml+xml`?iC:rC,ve=rw(e,`ALLOWED_TAGS`,M,{transform:I}),N=rw(e,`ALLOWED_ATTR`,ye,{transform:I}),F=rw(e,`ALLOWED_NAMESPACES`,et,{transform:iC}),qe=rw(e,`ADD_URI_SAFE_ATTR`,Je,{transform:I,base:Je}),Ge=rw(e,`ADD_DATA_URI_TAGS`,Ke,{transform:I,base:Ke}),Ue=rw(e,`FORBID_CONTENTS`,We,{transform:I}),P=rw(e,`FORBID_TAGS`,xC({}),{transform:I}),xe=rw(e,`FORBID_ATTR`,xC({}),{transform:I}),He=pC(e,`USE_PROFILES`)?e.USE_PROFILES&&typeof e.USE_PROFILES==`object`?xC(e.USE_PROFILES):e.USE_PROFILES:!1,Ce=e.ALLOW_ARIA_ATTR!==!1,we=e.ALLOW_DATA_ATTR!==!1,Te=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Ee=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,De=e.SAFE_FOR_TEMPLATES||!1,Oe=e.SAFE_FOR_XML!==!1,ke=e.WHOLE_DOCUMENT||!1,Pe=e.RETURN_DOM||!1,Fe=e.RETURN_DOM_FRAGMENT||!1,Ie=e.RETURN_TRUSTED_TYPE||!1,Ne=e.FORCE_BODY||!1,Le=e.SANITIZE_DOM!==!1,Re=e.SANITIZE_NAMED_PROPS||!1,Be=e.KEEP_CONTENT!==!1,Ve=e.IN_PLACE||!1,_e=wC(e.ALLOWED_URI_REGEXP)?e.ALLOWED_URI_REGEXP:VC,Qe=typeof e.NAMESPACE==`string`?e.NAMESPACE:Ze,nt=iw(e,`MATHML_TEXT_INTEGRATION_POINTS`,()=>yC({},tt)),it=iw(e,`HTML_INTEGRATION_POINTS`,()=>yC({},rt));let t=iw(e,`CUSTOM_ELEMENT_HANDLING`,()=>qS(null));if(be=qS(null),pC(t,`tagNameCheck`)&&ut(t.tagNameCheck)&&(be.tagNameCheck=t.tagNameCheck),pC(t,`attributeNameCheck`)&&ut(t.attributeNameCheck)&&(be.attributeNameCheck=t.attributeNameCheck),pC(t,`allowCustomizedBuiltInElements`)&&typeof t.allowCustomizedBuiltInElements==`boolean`&&(be.allowCustomizedBuiltInElements=t.allowCustomizedBuiltInElements),KS(be),De&&(we=!1),Fe&&(Pe=!0),He&&(ve=yC({},jC),N=qS(null),He.html===!0&&(yC(ve,TC),yC(N,MC)),He.svg===!0&&(yC(ve,EC),yC(N,NC),yC(N,FC)),He.svgFilters===!0&&(yC(ve,DC),yC(N,NC),yC(N,FC)),He.mathMl===!0&&(yC(ve,kC),yC(N,PC),yC(N,FC))),Se.tagCheck=null,Se.attributeCheck=null,pC(e,`ADD_TAGS`)&&(typeof e.ADD_TAGS==`function`?Se.tagCheck=e.ADD_TAGS:nC(e.ADD_TAGS)&&(ve===M&&(ve=xC(ve)),yC(ve,e.ADD_TAGS,I))),pC(e,`ADD_ATTR`)&&(typeof e.ADD_ATTR==`function`?Se.attributeCheck=e.ADD_ATTR:nC(e.ADD_ATTR)&&(N===ye&&(N=xC(N)),yC(N,e.ADD_ATTR,I))),pC(e,`ADD_FORBID_CONTENTS`)&&nC(e.ADD_FORBID_CONTENTS)&&(Ue===We&&(Ue=xC(Ue)),yC(Ue,e.ADD_FORBID_CONTENTS,I)),Be&&(ve[`#text`]=!0),ke&&yC(ve,[`html`,`head`,`body`]),ve.table&&(yC(ve,[`tbody`]),delete P.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!=`function`)throw gC(`TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.`);if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!=`function`)throw gC(`TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.`);let t=T;T=e.TRUSTED_TYPES_POLICY;try{E=A(``)}catch(e){throw T=t,e}}else e.TRUSTED_TYPES_POLICY===null?(T=void 0,E=``):(T===void 0&&(T=ne()),T&&typeof E==`string`&&(E=A(``)));GS&&GS(e),ct=e},ft=yC({},[...EC,...DC,...OC]),pt=yC({},[...kC,...AC]),mt=function(e,t,n){return t.namespaceURI===Ze?e===`svg`:t.namespaceURI===Ye?e===`svg`&&(n===`annotation-xml`||nt[n]):!!ft[e]},ht=function(e,t,n){return t.namespaceURI===Ze?e===`math`:t.namespaceURI===Xe?e===`math`&&it[n]:!!pt[e]},gt=function(e,t,n){return t.namespaceURI===Xe&&!it[n]||t.namespaceURI===Ye&&!nt[n]?!1:!pt[e]&&(at[e]||!ft[e])},_t=function(e){let t=_(e);(!t||!t.tagName)&&(t={namespaceURI:Qe,tagName:`template`});let n=rC(e.tagName),r=rC(t.tagName);return F[e.namespaceURI]?e.namespaceURI===Xe?mt(n,t,r):e.namespaceURI===Ye?ht(n,t,r):e.namespaceURI===Ze?gt(n,t,r):!!(ot===`application/xhtml+xml`&&F[e.namespaceURI]):!1},vt=function(e){eC(t.removed,{element:e});try{_(e).removeChild(e)}catch{if(p(e),!_(e))throw gC(`a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place`)}},yt=function(e,t,n){try{m(e,t)}catch{try{e.removeAttribute(n)}catch{}}},bt=function(e){Ct(e);let t=g(e);if(t){let e=[];ZS(t,t=>{eC(e,t)}),ZS(e,e=>{try{p(e)}catch{}})}let n=y(e);if(n)for(let t=n.length-1;t>=0;--t){let r=n[t],i=r&&r.name;typeof i==`string`&&yt(e,r,i)}},xt=function(e,n,r){if(!r)try{r=n.getAttributeNode(e)}catch{r=null}eC(t.removed,{attribute:r||null,from:n});try{r?m(n,r):n.removeAttribute(e)}catch{try{n.removeAttribute(e)}catch{}}if(e===`is`){if(Pe||Fe)try{vt(n)}catch{}else try{n.setAttribute(e,``)}catch{}}},St=function(e){let t=y(e);if(t)for(let n=t.length-1;n>=0;--n){let r=t[n],i=r&&r.name;typeof i!=`string`||N[I(i)]||yt(e,r,i)}},Ct=function(e){let t=[e];for(;t.length>0;){let e=t.pop();C(e)===XC.element&&St(e);let n=g(e);if(n)for(let e=n.length-1;e>=0;--e)t.push(n[e])}},wt=function(e,t){return Oe?e===`patchsrc`||e===`for`&&t!==`label`&&t!==`output`:!1},Tt=function(e){if(!Oe)return;let t=[e];for(;t.length>0;){let e=t.pop(),n=C(e);if(n===XC.processingInstruction||n===XC.comment&&hC(qC,e.data)){try{p(e)}catch{}continue}if(n===XC.element){let t=e,n=I(w(e));try{t.hasAttribute&&t.hasAttribute(`patchsrc`)&&t.removeAttribute(`patchsrc`),t.hasAttribute&&t.hasAttribute(`for`)&&wt(`for`,n)&&t.removeAttribute(`for`)}catch{}}let r=g(e);if(r)for(let e=r.length-1;e>=0;--e)t.push(r[e])}},Et=function(e){let t=null,r=null;if(Ne)e=`<remove></remove>`+e;else{let t=aC(e,/^[\r\n\t ]+/);r=t&&t[0]}ot===`application/xhtml+xml`&&Qe===Ze&&(e=`<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>`+e+`</body></html>`);let i=T?A(e):e;if(Qe===Ze)try{t=new l().parseFromString(i,ot)}catch{}if(!t||!t.documentElement){t=ie.createDocument(Qe,`template`,null);try{t.documentElement.innerHTML=$e?E:i}catch{}}let a=t.body||t.documentElement;return e&&r&&a.insertBefore(n.createTextNode(r),a.childNodes[0]||null),Qe===Ze?se.call(t,ke?`html`:`body`)[0]:ke?t.documentElement:a},Dt=function(e){let t=S?S(e):e.ownerDocument;return ae.call(t||e,e,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},Ot=function(e){return e=oC(e,le,` `),e=oC(e,ue,` `),e=oC(e,de,` `),e},kt=function(e){e.normalize();let t=S?S(e):e.ownerDocument,n=ae.call(t||e,e,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null),r=n.nextNode();for(;r;)r.data=Ot(r.data),r=n.nextNode();let i=e.querySelectorAll?.call(e,`template`);i&&ZS(i,e=>{jt(e.content)&&kt(e.content)})},At=function(e){let t=x?x(e):null;return typeof t!=`string`||I(t)!==`form`?!1:typeof e.nodeName!=`string`||typeof e.textContent!=`string`||typeof e.removeChild!=`function`||e.attributes!==y(e)||typeof e.removeAttribute!=`function`||typeof e.removeAttributeNode!=`function`||typeof e.getAttributeNode!=`function`||typeof e.setAttribute!=`function`||typeof e.namespaceURI!=`string`||typeof e.insertBefore!=`function`||typeof e.hasChildNodes!=`function`||e.nodeType!==b(e)||e.childNodes!==g(e)},jt=function(e){if(!b||typeof e!=`object`||!e)return!1;try{return b(e)===XC.documentFragment}catch{return!1}},Mt=function(e){if(!b||typeof e!=`object`||!e)return!1;try{return typeof b(e)==`number`}catch{return!1}};function Nt(e,n,r){e.length!==0&&ZS(e,e=>{e.call(t,n,r,ct)})}let Pt=function(e,t){return!!(Oe&&e.hasChildNodes()&&!Mt(e.firstElementChild)&&hC(KC,e.textContent)&&hC(KC,e.innerHTML)||Oe&&e.namespaceURI===Ze&&QC[t]&&(Mt(e.firstElementChild)||typeof e.textContent==`string`&&hC($C[t],e.textContent))||e.nodeType===XC.processingInstruction||Oe&&e.nodeType===XC.comment&&hC(qC,e.data))},Ft=function(e,t){return e instanceof RegExp?hC(e,t):e instanceof Function&&!!e(t,...[...arguments].slice(2))},It=function(e,t,n){if(!P[t]&&Ht(t)&&Ft(be.tagNameCheck,t))return!1;if(Be&&!Ue[t]){let t=_(e),r=g(e);if(r&&t){let i=r.length;for(let a=i-1;a>=0;--a){let i=e===n?f(r[a],!0):r[a];t.insertBefore(i,h(e))}}}return vt(e),!0},Lt=function(e,t,n,r){return e.length===0?t:t===n||t===r?xC(t):t},Rt=function(e,t){return e===t||_(e)!==null?!1:(Ve&&Ct(e),!0)},zt=function(e,n){if(Nt(j.beforeSanitizeElements,e,null),Rt(e,n))return!0;if(At(e))return vt(e),!0;let r=I(w(e));if(ve=Lt(j.uponSanitizeElement,ve,M,je),Nt(j.uponSanitizeElement,e,{tagName:r,allowedTags:ve}),Rt(e,n))return!0;if(Pt(e,r))return vt(e),!0;if(P[r]||!(Se.tagCheck instanceof Function&&Se.tagCheck(r))&&!ve[r]){let t=It(e,r,n);return t===!1&&(Nt(j.afterSanitizeElements,e,null),Rt(e,n))?!0:t}if(C(e)===XC.element&&!_t(e)||(r===`noscript`||r===`noembed`||r===`noframes`)&&hC(JC,e.innerHTML))return vt(e),!0;if(De&&e.nodeType===XC.text){let n=Ot(e.textContent);e.textContent!==n&&(eC(t.removed,{element:e.cloneNode()}),e.textContent=n)}return Nt(j.afterSanitizeElements,e,null),Rt(e,n)},Bt=function(e,t,r){if(xe[t]||wt(t,e)||Le&&(t===`id`||t===`name`)&&(r in n||r in lt))return!1;let i=N[t]||Se.attributeCheck instanceof Function&&Se.attributeCheck(t,e);return we&&hC(fe,t)||Ce&&hC(pe,t)?!0:i?qe[t]||hC(_e,oC(r,he,``))||(t===`src`||t===`xlink:href`||t===`href`)&&e!==`script`&&sC(r,`data:`)===0&&Ge[e]||Te&&!hC(me,oC(r,he,``))?!0:!r:Ht(e)&&Ft(be.tagNameCheck,e)&&Ft(be.attributeNameCheck,t,e)||t===`is`&&be.allowCustomizedBuiltInElements&&Ft(be.tagNameCheck,r)},Vt=yC({},[`annotation-xml`,`color-profile`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`missing-glyph`]),Ht=function(e){return!Vt[rC(e)]&&hC(ge,e)},Ut=function(e,t,n,r){if(T&&typeof u==`object`&&typeof u.getAttributeType==`function`&&!n)switch(u.getAttributeType(e,t)){case`TrustedHTML`:return A(r);case`TrustedScriptURL`:return te(r)}return r},Wt=function(e,t,n,r){try{return n?e.setAttributeNS(n,t,r):e.setAttribute(t,r),!At(e)||(vt(e),!1)}catch{return xt(t,e),!1}},Gt=function(e,n){if(Nt(j.beforeSanitizeAttributes,e,null),Rt(e,n))return;let r=e.attributes;if(!r||At(e))return;N=Lt(j.uponSanitizeAttribute,N,ye,Me);let i={attrName:``,attrValue:``,keepAttr:!0,allowedAttributes:N,forceKeepAttr:void 0},a=r.length,o=I(e.nodeName);for(;a--;){let n=r[a],s=n.name,c=n.namespaceURI,l=n.value,u=I(s),d=l,f=s===`value`?d:cC(d),p=!1;if(i.attrName=u,i.attrValue=f,i.keepAttr=!0,i.forceKeepAttr=void 0,Nt(j.uponSanitizeAttribute,e,i),f=i.attrValue,Re&&(u===`id`||u===`name`)&&sC(f,ze)!==0&&(xt(s,e,n),f=ze+f,p=!0),Oe&&hC(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,f)){xt(s,e,n);continue}if(u===`attributename`&&aC(f,`href`)){xt(s,e,n);continue}if(!i.forceKeepAttr){if(!i.keepAttr){xt(s,e,n);continue}if(!Ee&&hC(YC,f)){xt(s,e,n);continue}if(De&&(f=Ot(f)),!Bt(o,u,f)){xt(s,e,n);continue}f=Ut(o,u,c,f),f!==d&&Wt(e,s,c,f)&&p&&$S(t.removed)}}Nt(j.afterSanitizeAttributes,e,null),Rt(e,n)},Kt=function(e){let t=null,n=Dt(e);for(Nt(j.beforeSanitizeShadowDOM,e,null);t=n.nextNode();)if(Nt(j.uponSanitizeShadowNode,t,null),zt(t,e),Gt(t,e),jt(t.content)&&Kt(t.content),C(t)===XC.element){let e=v(t);jt(e)&&(qt(e),Kt(e))}Nt(j.afterSanitizeShadowDOM,e,null)},qt=function(e){let t=[{node:e,shadow:null}];for(;t.length>0;){let e=t.pop();if(e.shadow){Kt(e.shadow);continue}let n=e.node,r=C(n)===XC.element,i=g(n);if(i)for(let e=i.length-1;e>=0;--e)t.push({node:i[e],shadow:null});if(r){let e=x?x(n):null;if(typeof e==`string`&&I(e)===`template`){let e=n.content;jt(e)&&t.push({node:e,shadow:null})}}if(r){let e=v(n);jt(e)&&t.push({node:null,shadow:e},{node:e,shadow:null})}}};return t.sanitize=function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=null,a=null,o=null,s=null;if($e=!e,$e&&(e=`\x3C!-->`),typeof e!=`string`&&!Mt(e)&&(e=SC(e),typeof e!=`string`))throw gC(`dirty is not a string, aborting`);if(!t.isSupported)return e;Ae?(ve=je,N=Me):dt(n),(j.uponSanitizeElement.length>0||j.uponSanitizeAttribute.length>0)&&(ve=xC(ve)),j.uponSanitizeAttribute.length>0&&(N=xC(N)),t.removed=[];let c=Ve&&typeof e!=`string`&&Mt(e);if(c){Tt(e);let t=w(e);if(typeof t==`string`){let n=I(t);if(!ve[n]||P[n])throw bt(e),gC(`root node is forbidden and cannot be sanitized in-place`)}if(At(e))throw bt(e),gC(`root node is clobbered and cannot be sanitized in-place`);try{qt(e)}catch(t){throw bt(e),t}}else if(Mt(e))i=Et(`\x3C!---->`),a=i.ownerDocument.importNode(e,!0),a.nodeType===XC.element&&a.nodeName===`BODY`||a.nodeName===`HTML`?i=a:i.appendChild(a),qt(i);else{if(!Pe&&!De&&!ke&&e.indexOf(`<`)===-1)return T&&Ie?A(e):e;if(i=Et(e),!i)return Pe?null:Ie?E:``}i&&Ne&&vt(i.firstChild);let l=c?e:i;try{let e=Dt(l);for(;o=e.nextNode();)zt(o,l),Gt(o,l),jt(o.content)&&Kt(o.content)}catch(n){throw c&&(bt(e),ZS(t.removed,e=>{e.element&&Ct(e.element)})),n}if(c){let n=!1;if(ZS(t.removed,t=>{t.element&&(t.element===e&&(n=!0),Ct(t.element))}),n)throw gC(`a node selected for removal could not be safely returned; refusing to sanitize in place`);return De&&kt(e),e}if(Pe){if(De&&kt(i),Fe)for(s=oe.call(i.ownerDocument);i.firstChild;)s.appendChild(i.firstChild);else s=i;return(N.shadowroot||N.shadowrootmode)&&(s=ce.call(r,s,!0)),s}let u=ke?i.outerHTML:i.innerHTML;return ke&&ve[`!doctype`]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&hC(WC,i.ownerDocument.doctype.name)&&(u=`<!DOCTYPE `+i.ownerDocument.doctype.name+`>
572
+ `+u),De&&(u=Ot(u)),T&&Ie?A(u):u},t.setConfig=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};dt(e),Ae=!0,je=ve,Me=N},t.clearConfig=function(){ct=null,Ae=!1,je=null,Me=null,T=D,E=``},t.isValidAttribute=function(e,t,n){ct||dt({});let r=I(e),i=I(t);return Bt(r,i,n)},t.addHook=function(e,t){typeof t==`function`&&pC(j,e)&&eC(j[e],t)},t.removeHook=function(e,t){if(pC(j,e)){if(t!==void 0){let n=QS(j[e],t);return n===-1?void 0:tC(j[e],n,1)[0]}return $S(j[e])}},t.removeHooks=function(e){pC(j,e)&&(j[e]=[])},t.removeAllHooks=function(){j=nw()},t}var ow=aw();function sw(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var cw=sw();function lw(e){cw=e}var uw={exec:()=>null};function dw(e){let t=[];return n=>{let r=Math.max(0,Math.min(3,n-1)),i=t[r];return i||(i=e(r),t[r]=i),i}}function fw(e,t=``){let n=typeof e==`string`?e:e.source,r={replace:(e,t)=>{let i=typeof t==`string`?t:t.source;return i=i.replace(mw.caret,`$1`),n=n.replace(e,i),r},getRegex:()=>new RegExp(n,t)};return r}var pw=((e=``)=>{try{return!!RegExp(`(?<=1)(?<!1)`+e)}catch{return!1}})(),mw={codeRemoveIndent:/^(?: {0,3}\t| {1,4})/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,endingSpaceTabChar:/[ \t]$/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,leadingSpaceTab:/^[ \t]+/,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,numericCharacterReference:/&#(?:(\d{1,7})|[Xx]([A-Fa-f0-9]{1,6}));/g,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:dw(e=>RegExp(`^ {0,${e}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:dw(e=>RegExp(`^ {0,${e}}((?:-[ ]*){3,}|(?:_[ ]*){3,}|(?:\\*[ ]*){3,})(?:\\n+|$)`)),fencesBeginRegex:dw(e=>RegExp(`^ {0,${e}}(?:\`\`\`|~~~)`)),headingBeginRegex:dw(e=>RegExp(`^ {0,${e}}#`)),htmlBeginRegex:dw(e=>RegExp(`^ {0,${e}}(?:</?(?:${kw})(?: +|$|/?>)|<(?:script|pre|style|textarea|!--))`,`i`)),blockquoteBeginRegex:dw(e=>RegExp(`^ {0,${e}}>`))},hw=/^(?:[ \t]*(?:\n|$))+/,gw=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,_w=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,vw=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,yw=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,bw=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,xw=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |fences|blockquote|heading|hr|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Sw=fw(xw).replace(/bull/g,bw).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,``).getRegex(),Cw=fw(xw).replace(/bull/g,bw).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),ww=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,Tw=/^[^\n]+/,Ew=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Dw=fw(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace(`label`,Ew).replace(`title`,/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Ow=fw(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,bw).getRegex(),kw=`address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul`,Aw=/\x3C!--(?:-?>|[\s\S]*?(?:-->|$))/,jw=fw(`^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][a-z0-9-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][a-z0-9-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))`,`i`).replace(`comment`,Aw).replace(`tag`,kw).replace(`attribute`,/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Mw=e=>fw(ww).replace(`hr`,vw).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace(`list`,e).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,kw).getRegex(),Nw=Mw(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),Pw=Mw(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/),Fw={blockquote:fw(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace(`paragraph`,Pw).getRegex(),code:gw,def:Dw,fences:_w,heading:yw,hr:vw,html:jw,lheading:Sw,list:Ow,newline:hw,paragraph:Nw,table:uw,text:Tw},Iw=fw(`^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)`).replace(`hr`,vw).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`blockquote`,` {0,3}>`).replace(`code`,`(?: {4}| {0,3} )[^\\n]`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]`).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,kw).getRegex(),Lw={...Fw,lheading:Cw,table:Iw,paragraph:fw(ww).replace(`hr`,vw).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`table`,Iw).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]`).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,kw).getRegex()},Rw={...Fw,html:fw(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace(`comment`,Aw).replace(/tag/g,`(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b`).getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:uw,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:fw(ww).replace(`hr`,vw).replace(`heading`,` *#{1,6} *[^
573
+ ]`).replace(`lheading`,Sw).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`|fences`,``).replace(`|list`,``).replace(`|html`,``).replace(`|tag`,``).getRegex()},zw=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Bw=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Vw=/^( {2,}|\\)\n(?!\s*$)[ \t]*/,Hw=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Uw=/[\p{P}\p{S}]/u,Ww=/[\s\p{P}\p{S}]/u,Gw=/[^\s\p{P}\p{S}]/u,Kw=fw(/^((?![*_])punctSpace)/,`u`).replace(/punctSpace/g,Ww).getRegex(),qw=/[\p{Pi}\p{Ps}"']/u,Jw=/(?!~)[\p{P}\p{S}]/u,Yw=/(?!~)[\s\p{P}\p{S}]/u,Xw=/(?:[^\s\p{P}\p{S}]|~)/u,Zw=fw(/link|precode-code|html/,`g`).replace(`link`,/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace(`precode-`,pw?"(?<!`)()":"(^^|[^`])").replace(`code`,/(?<b>`+)[^`]+\k<b>(?!`)/).replace(`html`,/<(?! )[^<>]*?>/).getRegex(),Qw=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,$w=fw(Qw,`u`).replace(/punct/g,Uw).getRegex(),eT=fw(Qw,`u`).replace(/punct/g,Jw).getRegex(),tT=fw(/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/,`u`).replace(/openQuote/g,qw).replace(/punct/g,Uw).getRegex(),nT=`^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)`,rT=fw(nT,`gu`).replace(/notPunctSpace/g,Gw).replace(/punctSpace/g,Ww).replace(/punct/g,Uw).getRegex(),iT=fw(nT,`gu`).replace(/notPunctSpace/g,Xw).replace(/punctSpace/g,Yw).replace(/punct/g,Jw).getRegex(),aT=fw(`^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)`,`gu`).replace(/notPunctSpace/g,Gw).replace(/punctSpace/g,Ww).replace(/punct/g,Uw).getRegex(),oT=fw(`^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)`,`gu`).replace(/notPunctSpace/g,Gw).replace(/punctSpace/g,Ww).replace(/punct/g,Uw).getRegex(),sT=fw(`^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)`,`gu`).replace(/notPunctSpace/g,Gw).replace(/punctSpace/g,Ww).replace(/punct/g,Uw).getRegex(),cT=fw(/^~~?(?:((?!~)punct)|[^\s~])/,`u`).replace(/punct/g,Uw).getRegex(),lT=fw(`^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)`,`gu`).replace(/notPunctSpace/g,Gw).replace(/punctSpace/g,Ww).replace(/punct/g,Uw).getRegex(),uT=fw(/\\(punct)/,`gu`).replace(/punct/g,Uw).getRegex(),dT=fw(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace(`scheme`,/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace(`email`,/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),fT=fw(Aw).replace(`(?:-->|$)`,`-->`).getRegex(),pT=fw(`^comment|^</[a-zA-Z][a-zA-Z0-9-]*\\s*>|^<[a-zA-Z][a-zA-Z0-9-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>`).replace(`comment`,fT).replace(`attribute`,/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),mT=/\[(?:\\[\s\S]|[^\[\]\\])*\]/,hT=fw(/(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/).replace(`brackets`,mT).getRegex(),gT=fw(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace(`label`,hT).replace(`href`,/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace(`title`,/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),_T=fw(/^!?\[(label)\]\[(ref)\]/).replace(`label`,hT).replace(`ref`,Ew).getRegex(),vT=fw(/^!?\[(ref)\](?:\[\])?/).replace(`ref`,Ew).getRegex(),yT=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\]){1,999}/,bT=fw(/(?:[^\[\]\\`]*(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\]))){0,999}?[^\[\]\\`]*?/).replace(`brackets`,mT).getRegex(),xT=fw(`reflink|nolink(?!\\()`,`g`).replace(`reflink`,fw(/^!?\[(label)\]\[(ref)\]/).replace(`label`,bT).replace(`ref`,yT).getRegex()).replace(`nolink`,fw(/^!?\[(ref)\](?:\[\])?/).replace(`ref`,yT).getRegex()).getRegex(),ST=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,CT=fw(/(?:mailto:email|xmpp:email(?:\/[A-Za-z0-9@.]+)?)/).replace(/email/g,/[A-Za-z0-9._+-]+@[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(),wT={_backpedal:uw,anyPunctuation:uT,autolink:dT,blockSkip:Zw,br:Vw,code:Bw,del:uw,delLDelim:uw,delRDelim:uw,emStrongLDelim:$w,emStrongRDelimAst:rT,emStrongRDelimUnd:oT,escape:zw,link:gT,nolink:vT,punctuation:Kw,reflink:_T,reflinkSearch:xT,tag:pT,text:Hw,url:uw},TT={...wT,emStrongLDelim:tT,emStrongRDelimAst:aT,emStrongRDelimUnd:sT,link:fw(/^!?\[(label)\]\((.*?)\)/).replace(`label`,hT).getRegex(),reflink:fw(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace(`label`,hT).getRegex()},ET={...wT,emStrongRDelimAst:iT,emStrongLDelim:eT,delLDelim:cT,delRDelim:lT,url:fw(/^emailProtocol|^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace(`emailProtocol`,CT).replace(`protocol`,ST).replace(`email`,/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:fw(/^(?:[^a-zA-Z0-9](?=emailProtocol)|(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9](?=emailProtocol)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))))/).replace(`protocol`,ST).replace(/emailProtocol/g,/(?:mailto|xmpp):/).getRegex()},DT={...ET,br:fw(Vw).replace(`{2,}`,`*`).getRegex(),text:fw(ET.text).replace(`\\b_`,`\\b_| {2,}\\n`).replace(/\{2,\}/g,`*`).getRegex()},OT={normal:Fw,gfm:Lw,pedantic:Rw},kT={normal:wT,gfm:ET,breaks:DT,pedantic:TT},AT={"&":`&amp;`,"<":`&lt;`,">":`&gt;`,'"':`&quot;`,"'":`&#39;`},jT=e=>AT[e];function MT(e,t){if(t){if(mw.escapeTest.test(e))return e.replace(mw.escapeReplace,jT)}else if(mw.escapeTestNoEncode.test(e))return e.replace(mw.escapeReplaceNoEncode,jT);return e}function NT(e){return e.replace(mw.numericCharacterReference,(e,t,n)=>{let r=t===void 0?Number.parseInt(n,16):Number.parseInt(t,10);return r===0||r>1114111||r>=55296&&r<=57343?`�`:String.fromCodePoint(r)})}function PT(e){try{e=encodeURI(e).replace(mw.percentDecode,`%`)}catch{return null}return e}function FT(e,t){let n=e.replace(mw.findPipe,(e,t,n)=>{let r=!1,i=t;for(;--i>=0&&n[i]===`\\`;)r=!r;return r?`|`:` |`}).split(mw.splitPipe),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),t){if(n.length>t)n.splice(t);else for(;n.length<t;)n.push(``)}for(;r<n.length;r++)n[r]=n[r].trim().replace(mw.slashPipe,`|`);return n}function IT(e,t,n){let r=e.length;if(r===0)return``;let i=0;for(;i<r;){let a=e.charAt(r-i-1);if(a===t&&!n)i++;else if(a!==t&&n)i++;else break}return e.slice(0,r-i)}function LT(e){let t=e.split(`
574
+ `),n=t.length-1;for(;n>=0&&mw.blankLine.test(t[n]);)n--;return t.length-n<=2?e:t.slice(0,n+1).join(`
575
+ `)}function RT(e){return e.trim().toLowerCase().toUpperCase().toLowerCase()}function zT(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]===`\\`)r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return n>0?-2:-1}function BT(e,t=0){let n=t,r=``;for(let t of e)if(t===` `){let e=4-n%4;r+=` `.repeat(e),n+=e}else r+=t,n++;return r}function VT(e,t,n,r,i){let a=t.href,o=t.title||null,s=e[1].replace(i.other.outputLinkReplace,`$1`),c=e[0].charAt(0)===`!`;r.state.inLink=!0;let l=r.state.linkEmitted,u=r.state.inRawBlock;r.state.linkEmitted=!1;let d=r.inlineTokens(s),f=r.state.linkEmitted;if(r.state.linkEmitted=l,r.state.inLink=!1,!c){if(f){r.state.inRawBlock=u;return}r.state.linkEmitted=!0}return{type:c?`image`:`link`,raw:n,href:a,title:o,text:s,tokens:d}}function HT(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let i=r[1];return t.split(`
576
+ `).map(e=>{let t=e.match(n.other.beginningSpace);if(t===null)return e;let[r]=t;return e.slice(Math.min(r.length,i.length))}).join(`
577
+ `)}function UT(e,t,n,r){if(!t.includes(`<`))return!1;for(let i=0;i<t.length;i++){if(t[i]===`\\`){i++;continue}if(t[i]==="`"){let e=r.inline.code.exec(t.slice(i));if(e){i+=e[0].length-1;continue}}if(t[i]!==`<`)continue;let a=e.slice(n+i),o=r.inline.tag.exec(a)||r.inline.autolink.exec(a);if(o){if(o[0].length>t.length-i)return!0;i+=o[0].length-1}}return!1}var WT=class{options;rules;lexer;constructor(e){this.options=e||cw}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:`space`,raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let e=this.options.pedantic?t[0]:LT(t[0]);return{type:`code`,raw:e,codeBlockStyle:`indented`,text:e.replace(this.rules.other.codeRemoveIndent,``)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let e=t[0],n=HT(e,t[3]||``,this.rules);return{type:`code`,raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,`$1`):t[2],text:n}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(this.rules.other.endingHash.test(e)){let t=IT(e,`#`);(this.options.pedantic||!t||this.rules.other.endingSpaceTabChar.test(t))&&(e=t.trim())}return{type:`heading`,raw:IT(t[0],`
578
+ `),depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:`hr`,raw:IT(t[0],`
579
+ `)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let e=IT(t[0],`
580
+ `).split(`
581
+ `),n=``,r=``,i=[];for(;e.length>0;){let t=!1,a=[],o=0;for(;o<e.length;o++)if(this.rules.other.blockquoteStart.test(e[o]))a.push(e[o]),t=!0;else if(!t)a.push(e[o]);else break;e=e.slice(o);let s=a.join(`
582
+ `),c=s.replace(this.rules.other.blockquoteSetextReplace,`
583
+ $1`).replace(this.rules.other.blockquoteSetextReplace2,``);n=n?`${n}
584
+ ${s}`:s,r=r?`${r}
585
+ ${c}`:c;let l=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(c,i,!0),this.lexer.state.top=l,e.length===0)break;let u=i.at(-1);if(u?.type===`code`)break;if(u?.type===`blockquote`){let t=u,a=e.join(`
586
+ `),o=t.raw+`
587
+ `+a.replace(this.rules.other.blockquoteSetextReplace2,``),s=this.blockquote(o);i[i.length-1]=s;let c=o.substring(s.raw.length).replace(/^\n/,``),l=c?c.split(`
588
+ `).length:0,d=l?e.slice(0,-l):e;d.length>0&&(n=`${n}
589
+ ${d.join(`
590
+ `)}`),r=r.substring(0,r.length-t.text.length)+s.text;break}if(u?.type===`list`){let t=u,a=t.raw+`
591
+ `+e.join(`
592
+ `),o=this.list(a);i[i.length-1]=o,n=n.substring(0,n.length-u.raw.length)+o.raw,r=r.substring(0,r.length-t.raw.length)+o.raw,e=a.substring(i.at(-1).raw.length).split(`
593
+ `);continue}}return{type:`blockquote`,raw:n,tokens:i,text:r}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim(),r=n.length>1,i={type:`list`,raw:``,ordered:r,start:r?+n.slice(0,-1):``,loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:`[*+-]`);let a=this.rules.other.listItemRegex(n),o=!1;for(;e;){let n=!1,r=``,s=``;if(!(t=a.exec(e))||this.rules.block.hr.test(e))break;r=t[0],e=e.substring(r.length);let c=t[2].split(`
594
+ `,1)[0],l=t[1].length,u=this.options.pedantic?BT(c,l):c.replace(this.rules.other.leadingSpaceTab,e=>BT(e,l)),d=e.split(`
595
+ `,1)[0],f=!u.trim(),p=0;if(this.options.pedantic?(p=2,s=u.trimStart()):f?p=l+1:(p=u.search(this.rules.other.nonSpaceChar),p=p>4?1:p,s=u.slice(p),p+=l),f&&this.rules.other.blankLine.test(d)&&(r+=d+`
596
+ `,e=e.substring(d.length+1),n=!0),!n){let t=this.rules.other.nextBulletRegex(p),n=this.rules.other.hrRegex(p),i=this.rules.other.fencesBeginRegex(p),a=this.rules.other.headingBeginRegex(p),o=this.rules.other.htmlBeginRegex(p),c=this.rules.other.blockquoteBeginRegex(p);for(;e;){let l=e.split(`
597
+ `,1)[0],m;if(d=l,this.options.pedantic?(d=d.replace(this.rules.other.listReplaceNesting,` `),m=d):m=d.replace(this.rules.other.leadingSpaceTab,e=>e.replace(this.rules.other.tabCharGlobal,` `)),i.test(d)||a.test(d)||o.test(d)||c.test(d)||t.test(d)||n.test(d))break;if(m.search(this.rules.other.nonSpaceChar)>=p||!d.trim())s+=`
598
+ `+m.slice(p);else{if(f||u.replace(this.rules.other.tabCharGlobal,` `).search(this.rules.other.nonSpaceChar)>=4||i.test(u)||a.test(u)||n.test(u))break;s+=`
599
+ `+d}f=!d.trim(),r+=l+`
600
+ `,e=e.substring(l.length+1),u=m.slice(p)}}i.loose||(o?i.loose=!0:this.rules.other.doubleBlankLine.test(r)&&(o=!0)),i.items.push({type:`list_item`,raw:r,task:!!this.options.gfm&&this.rules.other.listIsTask.test(s),loose:!1,text:s,tokens:[]}),i.raw+=r}let s=i.items.at(-1);if(s)s.raw=s.raw.trimEnd(),s.text=s.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let e of i.items)if(this.lexer.state.top=!1,e.tokens=this.lexer.blockTokens(e.text,[]),!i.loose){let t=e.tokens.filter(e=>e.type===`space`);i.loose=t.length>0&&t.some(e=>this.rules.other.anyLine.test(e.raw))}for(let e of i.items){let t=e.tokens[0];if(e.task&&(t?.type===`text`||t?.type===`paragraph`)){e.text=e.text.replace(this.rules.other.listReplaceTask,``),t.raw=t.raw.replace(this.rules.other.listReplaceTask,``),t.text=t.text.replace(this.rules.other.listReplaceTask,``);for(let e=this.lexer.inlineQueue.length-1;e>=0;e--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[e].src)){this.lexer.inlineQueue[e].src=this.lexer.inlineQueue[e].src.replace(this.rules.other.listReplaceTask,``);break}let n=this.rules.other.listTaskCheckbox.exec(e.raw);if(n){let t={type:`checkbox`,raw:n[0]+` `,checked:n[0]!==`[ ]`};e.checked=t.checked,i.loose?e.tokens[0]&&[`paragraph`,`text`].includes(e.tokens[0].type)&&`tokens`in e.tokens[0]&&e.tokens[0].tokens?(e.tokens[0].raw=t.raw+e.tokens[0].raw,e.tokens[0].text=t.raw+e.tokens[0].text,e.tokens[0].tokens.unshift(t)):e.tokens.unshift({type:`paragraph`,raw:t.raw,text:t.raw,tokens:[t]}):e.tokens.unshift(t)}}else e.task&&=!1}if(i.loose)for(let e of i.items){e.loose=!0;for(let t of e.tokens)t.type===`text`&&(t.type=`paragraph`)}return i}}html(e){let t=this.rules.block.html.exec(e);if(t){let e=LT(t[0]);return{type:`html`,block:!0,raw:e,pre:t[1]===`pre`||t[1]===`script`||t[1]===`style`,text:e}}}def(e){let t=this.rules.block.def.exec(e);if(t){let e=RT(t[1]).replace(this.rules.other.multipleSpaceGlobal,` `),n=t[2]?t[2].replace(this.rules.other.hrefBrackets,`$1`).replace(this.rules.inline.anyPunctuation,`$1`):``,r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,`$1`):t[3];return{type:`def`,tag:e,raw:IT(t[0],`
601
+ `),href:n,title:r}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let n=FT(t[1]),r=t[2].replace(this.rules.other.tableAlignChars,``).split(`|`),i=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,``).split(`
602
+ `):[],a={type:`table`,raw:IT(t[0],`
603
+ `),header:[],align:[],rows:[]};if(n.length===r.length){for(let e of r)this.rules.other.tableAlignRight.test(e)?a.align.push(`right`):this.rules.other.tableAlignCenter.test(e)?a.align.push(`center`):this.rules.other.tableAlignLeft.test(e)?a.align.push(`left`):a.align.push(null);for(let e=0;e<n.length;e++)a.header.push({text:n[e],tokens:this.lexer.inline(n[e]),header:!0,align:a.align[e]});for(let e of i)a.rows.push(FT(e,a.header.length).map((e,t)=>({text:e,tokens:this.lexer.inline(e),header:!1,align:a.align[t]})));return a}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t){let e=t[1].trim();return{type:`heading`,raw:IT(t[0],`
604
+ `),depth:t[2].charAt(0)===`=`?1:2,text:e,tokens:this.lexer.inline(e)}}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let e=t[1].charAt(t[1].length-1)===`
605
+ `?t[1].slice(0,-1):t[1];return{type:`paragraph`,raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:`text`,raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:`escape`,raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:`html`,raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let n=t[0].charAt(0)===`!`?2:1;if(!this.options.pedantic&&UT(e,t[1],n,this.rules))return;let r=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(r)){if(!this.rules.other.endAngleBracket.test(r))return;let e=IT(r.slice(0,-1),`\\`);if((r.length-e.length)%2==0)return}else{let e=zT(t[2],`()`);if(e===-2)return;if(e>-1){let n=(t[0].indexOf(`!`)===0?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=``}}let i=t[2],a=``;if(this.options.pedantic){let e=this.rules.other.pedanticHrefTitle.exec(i);e&&(i=e[1],a=e[3])}else a=t[3]?t[3].slice(1,-1):``;return i=i.trim(),this.rules.other.startAngleBracket.test(i)&&(i=this.options.pedantic&&!this.rules.other.endAngleBracket.test(r)?i.slice(1):i.slice(1,-1)),VT(t,{href:i&&i.replace(this.rules.inline.anyPunctuation,`$1`),title:a&&a.replace(this.rules.inline.anyPunctuation,`$1`)},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let r=n[0].charAt(0)===`!`?2:1;if(!this.options.pedantic&&UT(e,n[1],r,this.rules))return;let i=t[RT((n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal,` `))];if(!i){let e=n[0].charAt(0);return{type:`text`,raw:e,text:e}}return VT(n,i,n[0],this.lexer,this.rules)}}emStrong(e,t,n=``){let r=this.rules.inline.emStrongLDelim.exec(e);if(!(!r||!r[1]&&!r[2]&&!r[3]&&!r[4]||r[4]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[3])||!n||this.rules.inline.punctuation.exec(n))){let i=[...r[0]].length-1,a,o,s=i,c=0,l=r[0][0],u=n===l,d=l===`*`?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(d.lastIndex=0,t=t.slice(-1*e.length+i);(r=d.exec(t))!==null;){if(a=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!a)continue;if(o=[...a].length,r[3]||r[4]){s+=o;continue}if(r[5]||r[6]){if(i%3&&!((i+o)%3)){c+=o;continue}if(u)break}if(s-=o,s>0)continue;o=Math.min(o,o+s+c);let t=[...r[0]][0].length,n=e.slice(0,i+r.index+t+o);if(Math.min(i,o)%2){let e=n.slice(1,-1);return{type:`em`,raw:n,text:e,tokens:this.lexer.inlineTokens(e)}}let l=n.slice(2,-2);return{type:`strong`,raw:n,text:l,tokens:this.lexer.inlineTokens(l)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(this.rules.other.newLineCharGlobal,` `),n=this.rules.other.nonSpaceChar.test(e),r=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return n&&r&&(e=e.substring(1,e.length-1)),{type:`codespan`,raw:t[0],text:e}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:`br`,raw:t[0]}}del(e,t,n=``){let r=this.rules.inline.delLDelim.exec(e);if(r&&(!r[1]||!n||this.rules.inline.punctuation.exec(n))){let n=[...r[0]].length-1,i,a,o=n,s=this.rules.inline.delRDelim;for(s.lastIndex=0,t=t.slice(-1*e.length+n);(r=s.exec(t))!==null;){if(i=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!i||(a=[...i].length,a!==n))continue;if(r[3]||r[4]){o+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o);let t=[...r[0]][0].length,s=e.slice(0,n+r.index+t+a),c=s.slice(n,-n);return{type:`del`,raw:s,text:c,tokens:this.lexer.inlineTokens(c)}}}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let e,n;return t[2]===`@`?(e=t[1],n=`mailto:`+e):(e=t[1],n=e),{type:`link`,raw:t[0],text:e,href:n,autolink:!0,tokens:[{type:`text`,raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,n;if(t[2]===`@`)e=t[0],n=`mailto:`+e;else{let r;do r=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??``;while(r!==t[0]);e=t[0],n=t[1]===`www.`?`http://`+t[0]:t[0]}return{type:`link`,raw:t[0],text:e,href:n,autolink:!0,tokens:[{type:`text`,raw:e,text:e}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let e=this.lexer.state.inRawBlock;return{type:`text`,raw:t[0],text:e?t[0]:NT(t[0]),escaped:e}}}},GT=class e{tokens;options;state;inlineQueue;tokenizer;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||cw,this.options.tokenizer=this.options.tokenizer||new WT,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,linkEmitted:!1,top:!0};let t={other:mw,block:OT.normal,inline:kT.normal};this.options.pedantic?(t.block=OT.pedantic,t.inline=kT.pedantic):this.options.gfm&&(t.block=OT.gfm,t.inline=this.options.breaks?kT.breaks:kT.gfm),this.tokenizer.rules=t}static get rules(){return{block:OT,inline:kT}}static lex(t,n){return new e(n).lex(t)}static lexInline(t,n){return new e(n).inlineTokens(t)}lex(e){e=e.replace(mw.carriageReturn,`
606
+ `),this.blockTokens(e,this.tokens);for(let e=0;e<this.inlineQueue.length;e++){let t=this.inlineQueue[e];this.inlineTokens(t.src,t.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],n=!1){this.tokenizer.lexer=this,this.options.pedantic&&(e=e.replace(mw.tabCharGlobal,` `).replace(mw.spaceLine,``));let r=1/0;for(;e;){if(e.length<r)r=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}let i;if(this.options.extensions?.block?.some(n=>(i=n.call({lexer:this},e,t))?(e=e.substring(i.raw.length),t.push(i),!0):!1))continue;if(i=this.tokenizer.space(e)){e=e.substring(i.raw.length);let n=t.at(-1);i.raw.length===1&&n!==void 0?n.raw+=`
607
+ `:t.push(i);continue}if(i=this.tokenizer.code(e)){e=e.substring(i.raw.length);let n=t.at(-1);n?.type===`paragraph`||n?.type===`text`?(n.raw+=(n.raw.endsWith(`
608
+ `)?``:`
609
+ `)+i.raw,n.text+=`
610
+ `+i.text,this.inlineQueue.at(-1).src=n.text):t.push(i);continue}if(i=this.tokenizer.fences(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.heading(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.hr(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.blockquote(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.list(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.html(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.def(e)){e=e.substring(i.raw.length);let n=t.at(-1);n?.type===`paragraph`||n?.type===`text`?(n.raw+=(n.raw.endsWith(`
611
+ `)?``:`
612
+ `)+i.raw,n.text+=`
613
+ `+i.raw,this.inlineQueue.at(-1).src=n.text):this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title},t.push(i));continue}if(i=this.tokenizer.table(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.lheading(e)){e=e.substring(i.raw.length),t.push(i);continue}let a=e;if(this.options.extensions?.startBlock){let t=1/0,n=e.slice(1),r;this.options.extensions.startBlock.forEach(e=>{r=e.call({lexer:this},n),typeof r==`number`&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(a=e.substring(0,t+1))}if(this.state.top&&(i=this.tokenizer.paragraph(a))){let r=t.at(-1);n&&r?.type===`paragraph`?(r.raw+=(r.raw.endsWith(`
614
+ `)?``:`
615
+ `)+i.raw,r.text+=`
616
+ `+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=r.text):t.push(i),n=a.length!==e.length,e=e.substring(i.raw.length);continue}if(i=this.tokenizer.text(e)){e=e.substring(i.raw.length);let n=t.at(-1);n?.type===`text`?(n.raw+=(n.raw.endsWith(`
617
+ `)?``:`
618
+ `)+i.raw,n.text+=`
619
+ `+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=n.text):t.push(i);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}linkInText(e){if(!e.includes(`[`))return!1;let t=this.tokenizer.rules.inline.link;for(let n of e.matchAll(this.tokenizer.rules.inline.blockSkip))if(t.test(n[0])&&e.charAt(n.index-1)!==`!`)return!0;for(let t of e.matchAll(this.tokenizer.rules.inline.reflinkSearch)){let e=t[0],n=e.lastIndexOf(`[`);if(e.charAt(0)!==`!`&&Object.hasOwn(this.tokens.links,RT(e.slice(n+1,-1)))&&!(n>1&&this.linkInText(e.slice(1,n-1))))return!0}return!1}inlineTokens(e,t=[]){this.tokenizer.lexer=this;let n=e;if(this.tokens.links&&e.includes(`[`)){let e=this.tokenizer.rules.inline.reflinkSearch,t=n=>{let r=n.lastIndexOf(`[`);if(!Object.hasOwn(this.tokens.links,RT(n.slice(r+1,-1))))return n;if(r>1&&n.charAt(0)!==`!`){let i=n.slice(1,r-1);if(this.linkInText(i))return`[`+i.replace(e,t)+`][`+`a`.repeat(n.length-r-2)+`]`}return`[`+`a`.repeat(n.length-2)+`]`};n=n.replace(e,t)}n=n.replace(this.tokenizer.rules.inline.anyPunctuation,e=>`+`.repeat(e.length)),n=n.replace(this.tokenizer.rules.inline.blockSkip,(e,t,n)=>{let r=n?n.length:0;return e.slice(0,r)+`[`+`a`.repeat(e.length-r-2)+`]`}),n=this.options.hooks?.emStrongMask?.call({lexer:this},n)??n;let r=!1,i=``,a=1/0;for(;e;){if(e.length<a)a=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}r||(i=``),r=!1;let o;if(this.options.extensions?.inline?.some(n=>(o=n.call({lexer:this},e,t))?(e=e.substring(o.raw.length),t.push(o),!0):!1))continue;if(o=this.tokenizer.escape(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.tag(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.link(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(o.raw.length);let n=t.at(-1);o.type===`text`&&n?.type===`text`?(n.raw+=o.raw,n.text+=o.text):t.push(o);continue}if(o=this.tokenizer.emStrong(e,n,i)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.codespan(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.br(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.del(e,n,i)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.autolink(e)){e=e.substring(o.raw.length),t.push(o);continue}if(!this.state.inLink&&(o=this.tokenizer.url(e))){e=e.substring(o.raw.length),t.push(o);continue}let s=e;if(this.options.extensions?.startInline){let t=1/0,n=e.slice(1),r;this.options.extensions.startInline.forEach(e=>{r=e.call({lexer:this},n),typeof r==`number`&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(s=e.substring(0,t+1))}if(o=this.tokenizer.inlineText(s)){e=e.substring(o.raw.length),o.raw.slice(-1)!==`_`&&(i=o.raw.slice(-1)),r=!0;let n=t.at(-1);n?.type===`text`?(n.raw+=o.raw,n.text+=o.text):t.push(o);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return t}infiniteLoopError(e){let t=`Infinite loop on byte: `+e;if(this.options.silent)console.error(t);else throw Error(t)}},KT=class{options;parser;constructor(e){this.options=e||cw}space(e){return``}code({text:e,lang:t,escaped:n}){let r=(t||``).match(mw.notSpaceStart)?.[0],i=e?e.replace(mw.endingNewline,``)+`
620
+ `:``;return r?`<pre><code class="language-`+MT(r)+`">`+(n?i:MT(i,!0))+`</code></pre>
621
+ `:`<pre><code>`+(n?i:MT(i,!0))+`</code></pre>
622
+ `}blockquote({tokens:e}){return`<blockquote>
623
+ ${this.parser.parse(e)}</blockquote>
624
+ `}html({text:e}){return e}def(e){return``}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
625
+ `}hr(e){return`<hr>
626
+ `}list(e){let t=e.ordered,n=e.start,r=``;for(let t=0;t<e.items.length;t++){let n=e.items[t];r+=this.listitem(n)}let i=t?`ol`:`ul`,a=t&&n!==1?` start="`+n+`"`:``;return`<`+i+a+`>
627
+ `+r+`</`+i+`>
628
+ `}listitem(e){return`<li>${this.parser.parse(e.tokens)}</li>
629
+ `}checkbox({checked:e}){return`<input `+(e?`checked="" `:``)+`disabled="" type="checkbox"> `}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
630
+ `}table(e){let t=``,n=``;for(let t=0;t<e.header.length;t++)n+=this.tablecell(e.header[t]);t+=this.tablerow({text:n});let r=``;for(let t=0;t<e.rows.length;t++){let i=e.rows[t];n=``;for(let e=0;e<i.length;e++)n+=this.tablecell(i[e]);r+=this.tablerow({text:n})}return r&&=`<tbody>${r}</tbody>`,`<table>
631
+ <thead>
632
+ `+t+`</thead>
633
+ `+r+`</table>
634
+ `}tablerow({text:e}){return`<tr>
635
+ ${e}</tr>
636
+ `}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?`th`:`td`;return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>
637
+ `}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${MT(e,!0)}</code>`}br(e){return`<br>`}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,text:n,tokens:r,autolink:i}){let a=i?MT(n,!0):this.parser.parseInline(r),o=PT(e);if(o===null)return a;e=MT(o,i);let s=`<a href="`+e+`"`;return t&&(s+=` title="`+MT(t)+`"`),s+=`>`+a+`</a>`,s}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let i=PT(e);if(i===null)return MT(n);e=i;let a=`<img src="${MT(e)}" alt="${MT(n)}"`;return t&&(a+=` title="${MT(t)}"`),a+=`>`,a}text(e){return`tokens`in e&&e.tokens?this.parser.parseInline(e.tokens):`escaped`in e&&e.escaped?e.text:MT(e.text)}},qT=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return``+e}image({text:e}){return``+e}br(){return``}checkbox({raw:e}){return e}},JT=class e{options;renderer;textRenderer;constructor(e){this.options=e||cw,this.options.renderer=this.options.renderer||new KT,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new qT}static parse(t,n){return new e(n).parse(t)}static parseInline(t,n){return new e(n).parseInline(t)}parse(e){this.renderer.parser=this;let t=``;for(let n=0;n<e.length;n++){let r=e[n];if(this.options.extensions?.renderers?.[r.type]){let e=r,n=this.options.extensions.renderers[e.type].call({parser:this},e);if(n!==!1||![`space`,`hr`,`heading`,`code`,`table`,`blockquote`,`list`,`checkbox`,`html`,`def`,`paragraph`,`text`].includes(e.type)){t+=n||``;continue}}let i=r;switch(i.type){case`space`:t+=this.renderer.space(i);break;case`hr`:t+=this.renderer.hr(i);break;case`heading`:t+=this.renderer.heading(i);break;case`code`:t+=this.renderer.code(i);break;case`table`:t+=this.renderer.table(i);break;case`blockquote`:t+=this.renderer.blockquote(i);break;case`list`:t+=this.renderer.list(i);break;case`checkbox`:t+=this.renderer.checkbox(i);break;case`html`:t+=this.renderer.html(i);break;case`def`:t+=this.renderer.def(i);break;case`paragraph`:t+=this.renderer.paragraph(i);break;case`text`:t+=this.renderer.text(i);break;default:{let e=`Token with "`+i.type+`" type was not found.`;if(this.options.silent)return console.error(e),``;throw Error(e)}}}return t}parseInline(e,t=this.renderer){this.renderer.parser=this;let n=``;for(let r=0;r<e.length;r++){let i=e[r];if(this.options.extensions?.renderers?.[i.type]){let e=this.options.extensions.renderers[i.type].call({parser:this},i);if(e!==!1||![`escape`,`html`,`link`,`image`,`checkbox`,`strong`,`em`,`codespan`,`br`,`del`,`text`].includes(i.type)){n+=e||``;continue}}let a=i;switch(a.type){case`escape`:n+=t.text(a);break;case`html`:n+=t.html(a);break;case`link`:n+=t.link(a);break;case`image`:n+=t.image(a);break;case`checkbox`:n+=t.checkbox(a);break;case`strong`:n+=t.strong(a);break;case`em`:n+=t.em(a);break;case`codespan`:n+=t.codespan(a);break;case`br`:n+=t.br(a);break;case`del`:n+=t.del(a);break;case`text`:n+=t.text(a);break;default:{let e=`Token with "`+a.type+`" type was not found.`;if(this.options.silent)return console.error(e),``;throw Error(e)}}}return n}},YT=class{options;block;constructor(e){this.options=e||cw}static passThroughHooks=new Set([`preprocess`,`postprocess`,`processAllTokens`,`emStrongMask`]);static passThroughHooksRespectAsync=new Set([`preprocess`,`postprocess`,`processAllTokens`]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(e=this.block){return e?GT.lex:GT.lexInline}provideParser(e=this.block){return e?JT.parse:JT.parseInline}},XT=new class{defaults=sw();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=JT;Renderer=KT;TextRenderer=qT;Lexer=GT;Tokenizer=WT;Hooks=YT;constructor(...e){this.use(...e)}walkTokens(e,t){let n=[];for(let r of e)switch(n=n.concat(t.call(this,r)),r.type){case`table`:{let e=r;for(let r of e.header)n=n.concat(this.walkTokens(r.tokens,t));for(let r of e.rows)for(let e of r)n=n.concat(this.walkTokens(e.tokens,t));break}case`list`:{let e=r;n=n.concat(this.walkTokens(e.items,t));break}default:{let e=r;this.defaults.extensions?.childTokens?.[e.type]?this.defaults.extensions.childTokens[e.type].forEach(r=>{let i=e[r].flat(1/0);n=n.concat(this.walkTokens(i,t))}):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,t)))}}return n}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(e=>{let n={...e};if(n.async=this.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach(e=>{if(!e.name)throw Error(`extension name required`);if(`renderer`in e){let n=t.renderers[e.name];n?t.renderers[e.name]=function(...t){let r=e.renderer.apply(this,t);return r===!1&&(r=n.apply(this,t)),r}:t.renderers[e.name]=e.renderer}if(`tokenizer`in e){if(!e.level||e.level!==`block`&&e.level!==`inline`)throw Error(`extension level must be 'block' or 'inline'`);let n=t[e.level];n?n.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&(e.level===`block`?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:e.level===`inline`&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}`childTokens`in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)}),n.extensions=t),e.renderer){let t=this.defaults.renderer||new KT(this.defaults);for(let n in e.renderer){if(!(n in t))throw Error(`renderer '${n}' does not exist`);if([`options`,`parser`].includes(n))continue;let r=n,i=e.renderer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n||``}}n.renderer=t}if(e.tokenizer){let t=this.defaults.tokenizer||new WT(this.defaults);for(let n in e.tokenizer){if(!(n in t))throw Error(`tokenizer '${n}' does not exist`);if([`options`,`rules`,`lexer`].includes(n))continue;let r=n,i=e.tokenizer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.tokenizer=t}if(e.hooks){let t=this.defaults.hooks||new YT;for(let n in e.hooks){if(!(n in t))throw Error(`hook '${n}' does not exist`);if([`options`,`block`].includes(n))continue;let r=n,i=e.hooks[r],a=t[r];t[r]=YT.passThroughHooks.has(n)?e=>{if(this.defaults.async&&YT.passThroughHooksRespectAsync.has(n))return(async()=>{let n=await i.call(t,e);return a.call(t,n)})();let r=i.call(t,e);return a.call(t,r)}:(...e)=>{if(this.defaults.async)return(async()=>{let n=await i.apply(t,e);return n===!1&&(n=await a.apply(t,e)),n})();let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.hooks=t}if(e.walkTokens){let t=this.defaults.walkTokens,r=e.walkTokens;n.walkTokens=function(e){let n=[];return n.push(r.call(this,e)),t&&(n=n.concat(t.call(this,e))),n}}this.defaults={...this.defaults,...n}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return GT.lex(e,t??this.defaults)}parser(e,t){return JT.parse(e,t??this.defaults)}parseMarkdown(e){return(t,n)=>{let r={...n},i={...this.defaults,...r},a=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&r.async===!1)return a(Error(`marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise.`));if(typeof t>`u`||t===null)return a(Error(`marked(): input parameter is undefined or null`));if(typeof t!=`string`)return a(Error(`marked(): input parameter is of type `+Object.prototype.toString.call(t)+`, string expected`));if(i.hooks&&(i.hooks.options=i,i.hooks.block=e),i.async)return(async()=>{let n=i.hooks?await i.hooks.preprocess(t):t,r=await(i.hooks?await i.hooks.provideLexer(e):e?GT.lex:GT.lexInline)(n,i),a=i.hooks?await i.hooks.processAllTokens(r):r;i.walkTokens&&await Promise.all(this.walkTokens(a,i.walkTokens));let o=await(i.hooks?await i.hooks.provideParser(e):e?JT.parse:JT.parseInline)(a,i);return i.hooks?await i.hooks.postprocess(o):o})().catch(a);try{i.hooks&&(t=i.hooks.preprocess(t));let n=(i.hooks?i.hooks.provideLexer(e):e?GT.lex:GT.lexInline)(t,i);i.hooks&&(n=i.hooks.processAllTokens(n)),i.walkTokens&&this.walkTokens(n,i.walkTokens);let r=(i.hooks?i.hooks.provideParser(e):e?JT.parse:JT.parseInline)(n,i);return i.hooks&&(r=i.hooks.postprocess(r)),r}catch(e){return a(e)}}}onError(e,t){return n=>{if(n.message+=`
638
+ Please report this to https://github.com/markedjs/marked.`,e){let e=`<p>An error occurred:</p><pre>`+MT(n.message+``,!0)+`</pre>`;return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}};function ZT(e,t){return XT.parse(e,t)}ZT.options=ZT.setOptions=function(e){return XT.setOptions(e),ZT.defaults=XT.defaults,lw(ZT.defaults),ZT},ZT.getDefaults=sw,ZT.defaults=cw;function QT(...e){return XT.use(...e),ZT.defaults=XT.defaults,lw(ZT.defaults),ZT}ZT.use=QT,ZT.walkTokens=function(e,t){return XT.walkTokens(e,t)},ZT.parseInline=XT.parseInline,ZT.Parser=JT,ZT.parser=JT.parse,ZT.Renderer=KT,ZT.TextRenderer=qT,ZT.Lexer=GT,ZT.lexer=GT.lex,ZT.Tokenizer=WT,ZT.Hooks=YT,ZT.parse=ZT,ZT.options,ZT.setOptions,ZT.walkTokens,ZT.parseInline,JT.parse,GT.lex;var $T=typeof window<`u`&&window.matchMedia?.(`(pointer: coarse)`).matches===!0,eE=typeof navigator<`u`&&!!navigator.mediaDevices?.getUserMedia;function tE(){(0,y.useEffect)(()=>{let e=window.visualViewport;if(!e)return;let t=document.documentElement,n=()=>{let n=e.scale>1.01?0:window.innerHeight-e.height-e.offsetTop,r=n>80;t.style.setProperty(`--kb`,r?`${Math.round(n)}px`:`0px`),t.classList.toggle(`keyboard-open`,r)};return n(),e.addEventListener(`resize`,n),e.addEventListener(`scroll`,n),()=>{e.removeEventListener(`resize`,n),e.removeEventListener(`scroll`,n),t.style.removeProperty(`--kb`),t.classList.remove(`keyboard-open`)}},[])}function nE(e){let[t,n]=(0,y.useState)(!1);return(0,y.useEffect)(()=>{if(!e||!(`wakeLock`in navigator))return;let t=null,r=!1,i=async()=>{if(!(r||t||document.visibilityState!==`visible`))try{let e=await navigator.wakeLock.request(`screen`);if(r){e.release().catch(()=>void 0);return}t=e,n(!0),e.addEventListener(`release`,()=>{t===e&&(t=null,n(!1))})}catch{}};return i(),document.addEventListener(`visibilitychange`,i),()=>{r=!0,document.removeEventListener(`visibilitychange`,i),t?.release().catch(()=>void 0),t=null,n(!1)}},[e]),t}var rE=`wz.notify`,iE=new Set,aE=null;function oE(){try{return localStorage.getItem(rE)===`1`}catch{return!1}}function sE(e){try{e?localStorage.setItem(rE,`1`):localStorage.removeItem(rE)}catch{}for(let e of iE)e()}var cE=typeof window<`u`&&`Notification`in window;function lE(){return oE()?cE&&Notification.permission===`granted`?`on`:`quiet`:`off`}function uE(){return(0,y.useSyncExternalStore)(e=>(iE.add(e),()=>iE.delete(e)),lE,()=>`off`)}function dE(){return cE&&Notification.permission===`denied`}async function fE(){sE(!0);try{aE??=new AudioContext,aE.resume()}catch{aE=null}if(cE&&Notification.permission==="default")try{await Notification.requestPermission()}catch{}cE&&Notification.permission===`granted`&&await navigator.serviceWorker?.register(`${DS}/sw.js`).catch(()=>void 0);for(let e of iE)e();return lE()}function pE(){sE(!1)}function mE(){let e=aE;if(e?.state!==`running`)return;let t=e.currentTime;for(let[n,r]of[660,880].entries()){let i=e.createOscillator(),a=e.createGain();i.frequency.value=r,a.gain.setValueAtTime(0,t+n*.16),a.gain.linearRampToValueAtTime(.18,t+n*.16+.02),a.gain.exponentialRampToValueAtTime(.001,t+n*.16+.32),i.connect(a).connect(e.destination),i.start(t+n*.16),i.stop(t+n*.16+.34)}}async function hE(e){if(!oE())return;if(document.visibilityState===`visible`){mE(),navigator.vibrate?.([120,60,120]);return}if(!cE||Notification.permission!==`granted`)return;let t={body:e.body,tag:e.tag,icon:jS(`icons/icon-192.png`),badge:jS(`icons/icon-192.png`),data:{url:location.href}};try{let n=await navigator.serviceWorker?.getRegistration();if(n?.active){await n.showNotification(e.title,t);return}}catch{}try{new Notification(e.title,t)}catch{}}function gE(){if(typeof navigator>`u`||!navigator.canShare)return!1;try{return navigator.canShare({files:[new File([`x`],`x.pdf`,{type:`application/pdf`})]})}catch{return!1}}function _E({text:e,className:t}){let n=(0,y.useMemo)(()=>ow.sanitize(ZT.parse(e,{async:!1})),[e]);return(0,Z.jsx)(`div`,{className:$(`prose-zen`,t),dangerouslySetInnerHTML:{__html:n}})}function vE({src:e,page:t,height:n,fit:r}){let i=(0,y.useRef)(null),[a,o]=(0,y.useState)(0);(0,y.useEffect)(()=>{let e=i.current;if(!e)return;let t=new ResizeObserver(()=>o(e.clientWidth));return t.observe(e),o(e.clientWidth),()=>t.disconnect()},[]);let[s,c]=(0,y.useState)(null);(0,y.useEffect)(()=>{let t=!0;return fetch(e,{credentials:`include`}).then(e=>e.ok?e.text():``).then(n=>t&&c({src:e,text:n})),()=>{t=!1}},[e]);let l=t??Math.max(a,900),u=a?r?a/l:Math.min(1,a/l):1;return(0,Z.jsxs)(`div`,{ref:i,className:`relative overflow-hidden rounded-lg bg-white ring-1 ring-border-soft`,style:{height:n*u},children:[s?.src===e?(0,Z.jsx)(`iframe`,{title:`preview`,srcDoc:s.text,sandbox:`allow-scripts allow-popups allow-popups-to-escape-sandbox`,className:`absolute top-0 left-0 origin-top-left border-0`,style:{width:l,height:n,transform:`scale(${u})`}},e):(0,Z.jsx)(`div`,{className:`absolute inset-0 animate-pulse bg-paper-2`}),(0,Z.jsx)(`a`,{href:e,target:`_blank`,rel:`noreferrer`,className:`absolute top-3 right-3 inline-flex size-9 items-center justify-center rounded-full bg-card/90 text-ink-2 shadow-soft ring-1 ring-border-soft backdrop-blur hover:text-ink coarse:size-11`,"aria-label":Q(`run.openFull`),children:(0,Z.jsx)(ov,{className:`size-4`})})]})}var yE={disc:{file:`ai`,box:566.93,x:89.28,y:100.72,w:365.49,h:365.49},generated:{file:`ai-generated`,box:1789.84,x:207.3,y:144.36,w:1384.24,h:266.41},edited:{file:`ai-modified`,box:1700.79,x:231.11,y:144.36,w:1230.56,h:266.41}};function bE({icon:e,tone:t,size:n,className:r}){let i=yE[e],a=n/i.h;return(0,Z.jsx)(`img`,{src:jS(`ai-labels/${i.file}-${t}.svg`),alt:``,draggable:!1,className:$(`pointer-events-none absolute max-w-none select-none`,r),style:{width:i.box*a,height:566.93*a,left:-i.x*a,top:-i.y*a}})}function xE({ai:e,className:t}){let[n,r]=(0,y.useState)(!1);if(!e)return null;let i=yE[e],a=t===`static`,o=a?[[`black`,`dark:hidden`],[`white`,`hidden dark:block`]]:[[`white`,``]];return(0,Z.jsx)(`button`,{type:`button`,"aria-label":Q(e===`edited`?`ai.modified`:`ai.generated`),"aria-expanded":n,"data-open":n,onClick:()=>r(e=>!e),className:$(`group block cursor-default overflow-hidden rounded-full backdrop-blur-md transition-[width] duration-200`,`w-[var(--ai-disc)] hover:w-[var(--ai-long)] focus-visible:w-[var(--ai-long)] data-[open=true]:w-[var(--ai-long)]`,a?`relative`:$(`absolute shadow-[0_1px_3px_rgba(0,0,0,0.25)]`,t??`bottom-2 left-2`)),style:{height:18,"--ai-disc":`18px`,"--ai-long":`${i.w/i.h*18}px`},children:o.map(([t,r])=>(0,Z.jsxs)(`span`,{className:r,children:[(0,Z.jsx)(bE,{icon:`disc`,tone:t,size:18,className:$(`transition-opacity duration-200`,n?`opacity-0`:`opacity-100 group-hover:opacity-0 group-focus-visible:opacity-0`)}),(0,Z.jsx)(bE,{icon:e,tone:t,size:18,className:$(`transition-opacity duration-200`,n?`opacity-100`:`opacity-0 group-hover:opacity-100 group-focus-visible:opacity-100`)})]},t))})}function SE(e,t){return e.type===`agent`?e.output.fields?.find(e=>e.id===t)?.description??t:t}function CE({step:e,json:t}){return!t||typeof t!=`object`?(0,Z.jsx)(`pre`,{className:`text-[13px]`,children:JSON.stringify(t,null,2)}):(0,Z.jsx)(`div`,{className:`flex flex-col gap-4`,children:Object.entries(t).map(([t,n])=>(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`div`,{className:`mb-1 font-medium text-[12px] text-ink-3 uppercase tracking-[0.06em]`,children:SE(e,t)}),typeof n==`boolean`?(0,Z.jsx)(`div`,{className:`text-[15px]`,children:Q(n?`run.yes`:`run.no`)}):typeof n==`string`||typeof n==`number`?(0,Z.jsx)(`div`,{className:`whitespace-pre-wrap text-[15px]`,children:String(n)}):Array.isArray(n)&&n.every(e=>typeof e!=`object`)?(0,Z.jsx)(`ul`,{className:`list-disc pl-5 text-[14px]`,children:n.map((e,t)=>(0,Z.jsx)(`li`,{className:`break-words`,children:String(e)},t))}):Array.isArray(n)&&n.length&&typeof n[0]==`object`?(0,Z.jsx)(wE,{rows:n}):(0,Z.jsx)(`pre`,{className:`overflow-auto rounded-lg bg-paper-2 p-3 text-[12px]`,children:JSON.stringify(n,null,2)})]},t))})}function wE({rows:e}){let t=[...new Set(e.flatMap(e=>Object.keys(e)))];return(0,Z.jsx)(`div`,{className:`overflow-x-auto rounded-lg ring-1 ring-border-soft`,children:(0,Z.jsxs)(`table`,{className:`w-full text-[13px]`,children:[(0,Z.jsx)(`thead`,{className:`bg-paper-2 text-ink-2`,children:(0,Z.jsx)(`tr`,{children:t.map(e=>(0,Z.jsx)(`th`,{className:`px-3 py-2 text-left font-medium`,children:e},e))})}),(0,Z.jsx)(`tbody`,{children:e.map((e,n)=>(0,Z.jsx)(`tr`,{className:`border-border-soft border-t`,children:t.map(t=>(0,Z.jsx)(`td`,{className:`px-3 py-2 tabular-nums`,children:e[t]===null||e[t]===void 0?``:String(e[t])},t))},n))})]})})}function TE({text:e}){let[t,n]=(0,y.useState)(!1);return(0,Z.jsxs)(`button`,{type:`button`,onClick:()=>{navigator.clipboard.writeText(e),n(!0),setTimeout(()=>n(!1),1500)},className:`inline-flex h-8 items-center gap-1.5 rounded-full bg-paper-2 px-3 text-[13px] text-ink-2 hover:text-ink coarse:h-11 coarse:px-4`,children:[t?(0,Z.jsx)(c_,{className:`size-3.5`}):(0,Z.jsx)(f_,{className:`size-3.5`}),Q(t?`share.copied`:`run.copy`)]})}function EE({base:e,step:t,output:n,editable:r,draft:i,onDraft:a,picked:o,onPick:s}){if(!n)return null;let c=t=>AS(`${e}/assets/${t}`);if(t.type===`widget`){let e=n.assets?.find(e=>e.kind===`video`);if(e){let r=n.assets?.find(e=>e.kind===`poster`),i=(t.size?.height??0)>(t.size?.width??1);return(0,Z.jsxs)(`div`,{className:$(`relative mx-auto`,i?`w-fit`:`w-full`),children:[(0,Z.jsx)(`video`,{src:c(e.id),poster:r?c(r.id):void 0,controls:!0,playsInline:!0,className:$(`rounded-lg bg-black ring-1 ring-border-soft`,i?`max-h-[76vh]`:`w-full`)}),(0,Z.jsx)(xE,{ai:e.ai,className:`top-2 right-2`})]})}let r=n.assets?.find(e=>e.mime===`text/html`),i=t.size??{width:1280,height:720};return r?(0,Z.jsx)(vE,{src:c(r.id),page:i.width,height:i.height,fit:!0}):null}if(t.type===`generate`){let e=n.assets?.[0];if(!e)return null;if(t.asset===`voice`)return(0,Z.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,Z.jsx)(`audio`,{src:c(e.id),controls:!0,className:`w-full`}),(0,Z.jsx)(xE,{ai:e.ai,className:`static`}),n.text?(0,Z.jsx)(`p`,{className:`text-[14px] text-ink-2 leading-relaxed`,children:n.text}):null]});if((n.assets?.length??0)>1&&(t.asset===`image`||t.asset===`video`)){let e=t.options?.aspectRatio===`9:16`||t.options?.aspectRatio===`2:3`;return(0,Z.jsx)(`div`,{className:$(`grid gap-3`,e?`grid-cols-2 sm:grid-cols-3`:`sm:grid-cols-2`),children:n.assets?.map((e,n)=>{let r=o?.includes(n);return(0,Z.jsxs)(`figure`,{className:$(`relative overflow-hidden rounded-lg bg-paper-2 ring-1 ring-border-soft`,r&&`ring-2 ring-ember`),children:[t.asset===`image`?(0,Z.jsx)(`img`,{src:c(e.id),alt:`${t.title} ${n+1}`,className:`w-full`}):(0,Z.jsx)(`video`,{src:c(e.id),controls:!0,playsInline:!0,loop:!0,className:`w-full`}),s?(0,Z.jsxs)(`button`,{type:`button`,"aria-pressed":r,onClick:()=>s(n),className:$(`absolute top-2 left-2 inline-flex h-8 items-center gap-1.5 rounded-full px-3 font-medium text-[12px] shadow-soft backdrop-blur coarse:h-11`,r?`bg-ember text-white`:`bg-card/90 text-ink-2 hover:text-ink`),children:[r?(0,Z.jsx)(c_,{className:`size-3.5`}):null,Q(r?`run.pickedItem`:`run.pickItem`,{n:n+1})]}):(0,Z.jsx)(`span`,{className:`absolute top-2 left-2 rounded-full bg-card/90 px-2.5 py-1 font-medium text-[12px] text-ink-2`,children:n+1}),(0,Z.jsx)(xE,{ai:e.ai,className:t.asset===`image`?`bottom-2 left-2`:`top-2 right-2`})]},e.id)})})}if(t.asset===`image`)return(0,Z.jsxs)(`div`,{className:`relative`,children:[(0,Z.jsx)(`img`,{src:c(e.id),alt:t.title,className:`w-full rounded-lg bg-paper-2 ring-1 ring-border-soft`}),(0,Z.jsx)(xE,{ai:e.ai})]});if(t.asset===`video`){let n=t.options?.aspectRatio===`9:16`;return(0,Z.jsxs)(`div`,{className:$(`relative mx-auto`,n?`w-fit`:`w-full`),children:[(0,Z.jsx)(`video`,{src:c(e.id),controls:!0,playsInline:!0,loop:!0,className:$(`rounded-lg bg-black ring-1 ring-border-soft`,n?`max-h-[70vh]`:`w-full`)}),(0,Z.jsx)(xE,{ai:e.ai,className:`top-2 left-2`})]})}return t.asset===`document`?(0,Z.jsx)(vE,{src:c(e.id),page:820,height:1100}):(0,Z.jsx)(vE,{src:c(e.id),page:null,height:760})}if(t.type===`agent`){let e=n.assets?.filter(e=>e.kind!==`file`&&e.mime.startsWith(`image/`))??[],o=n.assets?.filter(e=>e.kind===`file`)??[];return(0,Z.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[t.output.format===`json`&&n.json!==void 0?(0,Z.jsx)(CE,{step:t,json:n.json}):r?(0,Z.jsx)(Mb,{value:i??n.text??``,onChange:e=>a?.(e.target.value),minRows:4,maxRows:24}):t.output.format===`markdown`?(0,Z.jsx)(_E,{text:n.text??``}):(0,Z.jsx)(`div`,{className:`whitespace-pre-wrap text-[16px] leading-relaxed`,children:n.text}),e.map(e=>(0,Z.jsxs)(`div`,{className:`relative`,children:[(0,Z.jsx)(`img`,{src:c(e.id),alt:``,className:`w-full rounded-lg ring-1 ring-border-soft`}),(0,Z.jsx)(xE,{ai:e.ai})]},e.id)),o.length?(0,Z.jsx)(`ul`,{className:`overflow-hidden rounded-lg ring-1 ring-border-soft`,children:o.map(e=>(0,Z.jsx)(`li`,{className:`border-border-soft border-b last:border-0`,children:(0,Z.jsxs)(`a`,{href:c(e.id),download:e.name,className:`flex items-center gap-2 px-3 py-2 text-[13px] hover:bg-paper-2 coarse:min-h-11`,children:[(0,Z.jsx)(O_,{className:`size-3.5 shrink-0 text-ink-3`}),(0,Z.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:e.name})]})},e.id))}):null,t.output.format!==`json`&&!r&&n.text?(0,Z.jsx)(`div`,{children:(0,Z.jsx)(TE,{text:n.text})}):null]})}return null}var DE={png:`PNG`,mp4:`MP4`,mp3:`MP3`,pdf:`PDF`,docx:`Word`,html:`HTML`,md:`Markdown`,txt:`Text`,csv:`CSV`,xlsx:`Excel`,json:`JSON`,zip:`ZIP`};function OE(e,t){return(e.headers.get(`content-disposition`)??``).match(/filename="([^"]+)"/)?.[1]??t}function kE({url:e,format:t,title:n}){let[r,i]=(0,y.useState)(`idle`),a=(0,y.useRef)(null),o=async()=>{try{if(!a.current){i(`busy`);let n=await fetch(e,{credentials:`include`});if(!n.ok)throw Error(String(n.status));let r=await n.blob();a.current=new File([r],OE(n,`download.${t}`),{type:r.type.split(`;`)[0]})}let r={files:[a.current],title:n};if(!navigator.canShare(r)){location.href=e,i(`idle`);return}await navigator.share(r),i(`idle`)}catch(e){i(a.current&&e.name===`NotAllowedError`?`ready`:`idle`)}};return(0,Z.jsxs)(`button`,{type:`button`,onClick:()=>void o(),disabled:r===`busy`,"aria-label":Q(`run.shareFile`),title:Q(`run.shareFile`),className:$(`inline-flex h-9 items-center gap-1.5 rounded-full px-3 font-medium text-[13px] transition coarse:h-11 coarse:px-4`,r===`ready`?`bg-ember-tint text-ink ring-1 ring-ember`:`bg-paper-2 text-ink-2 hover:bg-paper-3 hover:text-ink`),children:[r===`busy`?(0,Z.jsx)(Lb,{className:`size-3.5`}):(0,Z.jsx)(Pv,{className:`size-3.5`}),Q(r===`ready`?`run.shareNow`:`run.share`)]})}var AE=gE();function jE({base:e,stepId:t,formats:n,title:r}){let i=n=>AS(`${e}/steps/${t}/download?format=${n}`);return(0,Z.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[n.map((e,t)=>(0,Z.jsxs)(`a`,{href:i(e),className:$(`inline-flex h-9 items-center gap-1.5 rounded-full px-3.5 font-medium text-[13px] transition coarse:h-11 coarse:px-4`,t===0?`bg-primary text-primary-foreground hover:brightness-105`:`bg-paper-2 text-ink-2 hover:bg-paper-3 hover:text-ink`),children:[t===0?(0,Z.jsx)(v_,{className:`size-3.5`}):null,DE[e]]},e)),AE&&n.length?(0,Z.jsx)(kE,{url:i(n[0]),format:n[0],title:r},i(n[0])):null]})}var ME=class extends Error{status;body;constructor(e,t,n){super(e),this.status=t,this.body=n}};async function NE(e,t,n){let r=await fetch(AS(t),{method:e,credentials:`include`,headers:n!==void 0&&!(n instanceof FormData)?{"content-type":`application/json`}:void 0,body:n===void 0?void 0:n instanceof FormData?n:JSON.stringify(n)}).catch(()=>{throw new ME(Q(`common.offline`),0,null)}),i=await r.text(),a=i?PE(i):null;if(!r.ok)throw new ME(a?.error??r.statusText,r.status,a);return a}function PE(e){try{return JSON.parse(e)}catch{return{error:e}}}var FE={get:e=>NE(`GET`,e),post:(e,t)=>NE(`POST`,e,t??{}),put:(e,t)=>NE(`PUT`,e,t),patch:(e,t)=>NE(`PATCH`,e,t),del:e=>NE(`DELETE`,e),upload:(e,t)=>{let n=new FormData;return n.set(`file`,t),NE(`POST`,e,n)}};function IE(e,t){let n=encodeURIComponent(e),r=encodeURIComponent(t);return[{id:`mail`,label:Q(`shareRun.email`),href:`mailto:?subject=${r}&body=${r}%0A%0A${n}`},{id:`x`,label:`X`,href:`https://x.com/intent/post?text=${r}&url=${n}`},{id:`linkedin`,label:`LinkedIn`,href:`https://www.linkedin.com/sharing/share-offsite/?url=${n}`},{id:`whatsapp`,label:`WhatsApp`,href:`https://wa.me/?text=${r}%20${n}`},{id:`facebook`,label:`Facebook`,href:`https://www.facebook.com/sharer/sharer.php?u=${n}`}]}var LE={x:`𝕏`,linkedin:`in`,whatsapp:`WA`,facebook:`f`};function RE({runId:e,title:t,initial:n}){let[r,i]=(0,y.useState)(!1),[a,o]=(0,y.useState)(n),[s,c]=(0,y.useState)(!1),[l,u]=(0,y.useState)(!1),[d,f]=(0,y.useState)(null),p=async()=>{if(i(!0),!a){c(!0),f(null);try{o(await FE.post(`/api/runs/${e}/share`))}catch(e){f(e.message)}finally{c(!1)}}},m=async()=>{await FE.del(`/api/runs/${e}/share`),o(null),i(!1)},h=()=>{a&&(navigator.clipboard.writeText(a.url),u(!0),setTimeout(()=>u(!1),1500))},g=typeof navigator<`u`&&`share`in navigator,_=a?.expiresAt?new Intl.DateTimeFormat(db,{dateStyle:`long`}).format(new Date(a.expiresAt)):null;return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(Eb,{variant:`secondary`,onClick:()=>void p(),children:[(0,Z.jsx)(Mv,{className:`size-4`}),` `,Q(`shareRun.button`)]}),(0,Z.jsx)(Bb,{open:r,onClose:()=>i(!1),title:Q(`shareRun.title`),children:s?(0,Z.jsx)(`div`,{className:`flex justify-center py-8 text-ink-4`,children:(0,Z.jsx)(Lb,{})}):d?(0,Z.jsx)(`p`,{className:`rounded-lg bg-rose-tint px-3 py-2 text-[14px] text-rose`,children:d}):a?(0,Z.jsxs)(`div`,{className:`flex flex-col gap-5`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-2 rounded-xl bg-paper-2 p-1.5 pl-3`,children:[(0,Z.jsx)(J_,{className:`size-4 shrink-0 text-ink-3`}),(0,Z.jsx)(`input`,{readOnly:!0,value:a.url,onFocus:e=>e.target.select(),"aria-label":Q(`share.link`),className:`min-w-0 flex-1 bg-transparent text-[14px] outline-none coarse:h-11`}),(0,Z.jsxs)(Eb,{size:`sm`,onClick:h,children:[l?(0,Z.jsx)(c_,{className:`size-3.5`}):(0,Z.jsx)(f_,{className:`size-3.5`}),Q(l?`share.copied`:`share.copy`)]})]}),(0,Z.jsxs)(`div`,{className:`grid grid-cols-3 gap-3 sm:grid-cols-6`,children:[IE(a.url,t).map(e=>(0,Z.jsxs)(`a`,{href:e.href,target:`_blank`,rel:`noreferrer`,className:`flex flex-col items-center gap-1.5 text-[12px] text-ink-2 hover:text-ink`,children:[(0,Z.jsx)(`span`,{className:`inline-flex size-12 items-center justify-center rounded-full bg-paper-2 font-semibold text-[15px] transition hover:bg-paper-3`,children:e.id===`mail`?(0,Z.jsx)(nv,{className:`size-5`}):LE[e.id]}),e.label]},e.id)),g?(0,Z.jsxs)(`button`,{type:`button`,onClick:()=>void navigator.share({title:t,url:a.url}).catch(()=>void 0),className:`flex flex-col items-center gap-1.5 text-[12px] text-ink-2 hover:text-ink`,children:[(0,Z.jsx)(`span`,{className:`inline-flex size-12 items-center justify-center rounded-full bg-paper-2 transition hover:bg-paper-3`,children:(0,Z.jsx)(Mv,{className:`size-5`})}),Q(`shareRun.more`)]}):null]}),(0,Z.jsxs)(`div`,{className:`flex items-center justify-between gap-3 text-[13px] text-ink-3`,children:[(0,Z.jsx)(`span`,{children:_?Q(`shareRun.until`,{date:_}):Q(`shareRun.kept`)}),(0,Z.jsx)(`button`,{type:`button`,onClick:()=>void m(),className:`shrink-0 hover:text-rose coarse:min-h-11`,children:Q(`shareRun.withdraw`)})]})]}):null})]})}function zE({runId:e,ask:t}){return t.kind===`confirm`?(0,Z.jsx)(BE,{runId:e,ask:t}):(0,Z.jsx)(VE,{runId:e,ask:t})}function BE({runId:e,ask:t}){let[n,r]=(0,y.useState)(!1),[i,a]=(0,y.useState)(!1),[o,s]=(0,y.useState)(null),c=async n=>{a(!0),s(null);try{await FE.post(`/api/runs/${e}/ask/${t.id}`,n)}catch(e){s(e.message),a(!1)}},l=t.action.destructive?Kv:vv;return(0,Z.jsxs)(`div`,{className:`animate-rise`,children:[(0,Z.jsxs)(`div`,{className:`mb-5 flex items-start gap-3`,children:[(0,Z.jsx)(`div`,{className:$(`flex size-10 shrink-0 items-center justify-center rounded-full`,t.action.destructive?`bg-rose-tint text-rose`:`bg-ember-tint text-ember-strong`),children:(0,Z.jsx)(l,{className:`size-5`})}),(0,Z.jsxs)(`div`,{className:`min-w-0`,children:[(0,Z.jsx)(`p`,{className:`text-[13px] text-ink-3`,children:Q(`ask.wants`,{service:t.service})}),(0,Z.jsx)(`h2`,{className:`font-display font-semibold text-[20px] leading-snug tracking-tight`,children:t.reason})]})]}),(0,Z.jsx)(`pre`,{className:`max-h-72 overflow-auto whitespace-pre-wrap break-words rounded-xl bg-paper-2 p-4 text-[13px] leading-relaxed ring-1 ring-border-soft`,children:t.input}),(0,Z.jsxs)(`div`,{className:`mt-5 flex items-center gap-4`,children:[(0,Z.jsx)(Fb,{checked:n,onChange:r,label:Q(`ask.allowRest`)}),(0,Z.jsx)(`span`,{className:`flex-1 text-[13px] text-ink-2`,children:Q(`ask.allowRest`)})]}),o?(0,Z.jsx)(`div`,{className:`mt-3 rounded-lg bg-rose-tint px-4 py-3 text-[14px] text-rose`,children:o}):null,(0,Z.jsxs)(`div`,{className:`action-bar mt-6 flex items-center justify-between gap-3`,children:[(0,Z.jsx)(Eb,{variant:`ghost`,disabled:i,onClick:()=>void c({type:`skip`}),children:Q(`ask.deny`)}),(0,Z.jsx)(Eb,{busy:i,onClick:()=>void c({type:`done`,remember:n}),children:Q(`ask.allow`)})]})]})}function VE({runId:e,ask:t}){let[n,r]=(0,y.useState)({}),[i,a]=(0,y.useState)(!1),[o,s]=(0,y.useState)(!1),[c,l]=(0,y.useState)(null),[u,d]=(0,y.useState)(0),[f,p]=(0,y.useState)(``),[m,h]=(0,y.useState)(!1),g=(0,y.useRef)(null),_=(0,y.useCallback)(()=>d(e=>e+1),[]);(0,y.useEffect)(()=>{let e=setInterval(_,2500);return()=>clearInterval(e)},[_]);let v=async n=>{s(!0),l(null);try{await FE.post(`/api/runs/${e}/ask/${t.id}`,n)}catch(e){l(e.message),s(!1)}},b=async t=>{l(null);try{await FE.post(`/api/runs/${e}/browser/act`,t)}catch(e){l(e.message)}_()},x=e=>{let t=g.current;if(!t?.naturalWidth)return;let n=t.getBoundingClientRect();b({type:`click`,x:Math.round((e.clientX-n.left)/n.width*t.naturalWidth),y:Math.round((e.clientY-n.top)/n.height*t.naturalHeight)})},S=t.fields.some(e=>n[e.id]);return(0,Z.jsxs)(`div`,{className:`animate-rise`,children:[(0,Z.jsxs)(`div`,{className:`mb-5 flex items-start gap-3`,children:[(0,Z.jsx)(`div`,{className:`flex size-10 shrink-0 items-center justify-center rounded-full bg-ember-tint text-ember-strong`,children:(0,Z.jsx)(ev,{className:`size-5`})}),(0,Z.jsxs)(`div`,{className:`min-w-0`,children:[(0,Z.jsx)(`h2`,{className:`font-display font-semibold text-[20px] leading-snug tracking-tight`,children:t.reason}),(0,Z.jsxs)(`p`,{className:`mt-0.5 truncate text-[13px] text-ink-3`,children:[t.site.host,t.site.title?` · ${t.site.title}`:``]})]})]}),(0,Z.jsxs)(`div`,{className:`overflow-hidden rounded-xl bg-paper-2 ring-1 ring-border-soft`,children:[(0,Z.jsx)(`img`,{ref:g,src:AS(`/api/runs/${e}/browser/screen?t=${u}`),alt:t.site.host,onClick:x,className:`block w-full cursor-pointer`}),(0,Z.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1.5 border-border-soft border-t bg-card p-2`,children:[(0,Z.jsx)(Ab,{type:m?`password`:`text`,autoComplete:`off`,value:f,placeholder:Q(`ask.typeInto`),onChange:e=>p(e.target.value),onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),b({type:`type`,text:f}).then(()=>p(``)))},autoCapitalize:`off`,autoCorrect:`off`,spellCheck:!1,enterKeyHint:`send`,className:`h-9 min-w-[9rem] flex-1 basis-full text-[13px] sm:basis-0 coarse:h-11`}),(0,Z.jsx)(`button`,{type:`button`,onClick:()=>h(e=>!e),className:$(`h-9 shrink-0 rounded-md px-2.5 text-[12px] coarse:h-11 coarse:px-3.5`,m?`bg-ember-veil text-ink`:`text-ink-3 hover:bg-paper-2`),children:Q(`ask.hide`)}),(0,Z.jsx)(HE,{label:`Enter`,onClick:()=>void b({type:`key`,key:`Enter`}),children:(0,Z.jsx)(m_,{className:`size-4`})}),(0,Z.jsx)(HE,{label:Q(`ask.up`),onClick:()=>void b({type:`scroll`,dy:-500}),children:(0,Z.jsx)(Qg,{className:`size-4`})}),(0,Z.jsx)(HE,{label:Q(`ask.down`),onClick:()=>void b({type:`scroll`,dy:500}),children:(0,Z.jsx)(Kg,{className:`size-4`})})]})]}),(0,Z.jsx)(`p`,{className:`mt-2 text-[12px] text-ink-4`,children:Q(`ask.pictureHint`)}),t.fields.length?(0,Z.jsxs)(`form`,{className:`mt-5 flex flex-col gap-4`,onSubmit:e=>{e.preventDefault(),v({type:`fill`,values:n,remember:i})},children:[t.fields.map((e,i)=>(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(Ib,{children:e.label}),(0,Z.jsx)(Ab,{autoFocus:i===0,type:e.secret?`password`:`text`,autoComplete:`off`,autoCapitalize:`off`,autoCorrect:`off`,spellCheck:!1,enterKeyHint:i===t.fields.length-1?`go`:`next`,value:n[e.id]??``,onChange:t=>r(n=>({...n,[e.id]:t.target.value}))})]},e.id)),(0,Z.jsx)(`button`,{type:`submit`,hidden:!0})]}):null,(0,Z.jsxs)(`div`,{className:`mt-5 flex items-center justify-between gap-4`,children:[(0,Z.jsx)(Fb,{checked:i,onChange:a,label:Q(`ask.remember`)}),(0,Z.jsx)(`span`,{className:`flex-1 text-[13px] text-ink-2`,children:Q(`ask.remember`)})]}),(0,Z.jsxs)(`p`,{className:`mt-3 flex items-start gap-2 text-[13px] text-ink-3`,children:[(0,Z.jsx)(Iv,{className:`mt-0.5 size-4 shrink-0 text-moss`}),` `,Q(`ask.private`)]}),c?(0,Z.jsx)(`div`,{className:`mt-3 rounded-lg bg-rose-tint px-4 py-3 text-[14px] text-rose`,children:c}):null,(0,Z.jsxs)(`div`,{className:`action-bar mt-6 flex flex-wrap items-center justify-between gap-3`,children:[(0,Z.jsx)(Eb,{variant:`ghost`,disabled:o,onClick:()=>void v({type:`skip`}),children:Q(`ask.skip`)}),(0,Z.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[t.fields.length?(0,Z.jsx)(Eb,{variant:`secondary`,disabled:o,onClick:()=>void v({type:`done`,remember:i}),children:Q(`ask.done`)}):null,t.fields.length?(0,Z.jsx)(Eb,{busy:o,disabled:!S,onClick:()=>void v({type:`fill`,values:n,remember:i}),children:Q(`ask.signIn`)}):(0,Z.jsx)(Eb,{busy:o,onClick:()=>void v({type:`done`,remember:i}),children:Q(`ask.done`)})]})]})]})}function HE({label:e,onClick:t,children:n}){return(0,Z.jsx)(`button`,{type:`button`,"aria-label":e,title:e,onClick:t,className:`flex size-9 shrink-0 items-center justify-center rounded-md text-ink-3 hover:bg-paper-2 hover:text-ink coarse:size-11`,children:n})}var UE=H({description:L().max(1024).optional(),edit:K([`inline`,`popout`]).optional(),id:L().min(1).max(64).regex(/^[a-z][a-z0-9_]*$/,`column id must be a lowercase slug (a-z, 0-9, _)`),name:L().min(1).max(128),required:z().optional()}),WE=K([`integer`,`decimal`,`percent`,`currency`]),GE=H({currency:L().regex(/^[A-Z]{3}$/,`currency must be an ISO 4217 code`).optional(),fractionDigits:R().int().min(0).max(8).optional(),grouping:z().optional(),style:WE}).superRefine((e,t)=>{e.style===`currency`&&!e.currency&&t.addIssue({code:`custom`,message:`currency style needs an ISO 4217 code`,path:[`currency`]}),e.style!==`currency`&&e.currency&&t.addIssue({code:`custom`,message:`currency is only valid on currency columns`,path:[`currency`]})}),KE=K([`date`,`datetime`,`time`]),qE=K([`short`,`medium`,`long`,`iso`]),JE=K([`hours`,`minutes`,`seconds`]),YE=H({dateStyle:qE.optional(),kind:KE,timePrecision:JE.optional()}),XE=K([`milliseconds`,`seconds`,`minutes`,`hours`,`days`]),ZE=K([`hms`,`hours`,`minutes`,`decimal-hours`,`iso`]),QE=H({display:ZE,inputUnit:XE}),$E=H({id:L().min(1).max(64),label:L().min(1).max(128)}),eD=H({allowCustom:z(),multiple:z().optional(),options:V($E).max(200)}),tD=H({style:K([`single`,`multiline`,`markdown`]).default(`single`)}),nD=V(zc(`type`,[UE.extend({format:tD.optional(),type:q(`text`)}),UE.extend({format:GE,type:q(`number`)}),UE.extend({format:YE,type:q(`date`)}),UE.extend({format:QE,type:q(`duration`)}),UE.extend({format:eD,type:q(`select`)}),UE.extend({type:q(`boolean`)})])).min(1).max(64).superRefine((e,t)=>{let n=new Set;for(let r=0;r<e.length;r++){let i=e[r]?.id;i&&(n.has(i)&&t.addIssue({code:`custom`,message:`duplicate column id "${i}"`,path:[r,`id`]}),n.add(i))}});H({description:L().optional(),edit:K([`inline`,`popout`]).optional(),format:H({allowCustom:z().optional(),currency:L().optional(),dateStyle:K([`short`,`medium`,`long`,`iso`]).optional(),display:ZE.optional(),fractionDigits:R().int().optional(),grouping:z().optional(),inputUnit:XE.optional(),kind:KE.optional(),multiple:z().optional(),options:V($E).optional(),style:K([`single`,`multiline`,`markdown`,`integer`,`decimal`,`percent`,`currency`]).optional(),timePrecision:JE.optional()}).optional(),id:L(),name:L(),required:z().optional(),type:K([`text`,`number`,`date`,`duration`,`select`,`boolean`])}),H({table_id:L().uuid()});var rD=36e5,iD=6e4,aD=1e3;function oD(e){return e.fractionDigits===void 0?e.style===`integer`?0:2:e.fractionDigits}function sD(e,t,n=`en`){if(typeof e!=`number`||!Number.isFinite(e))return``;let r=oD(t),i=t.grouping!==!1;return t.style===`percent`?new Intl.NumberFormat(n,{maximumFractionDigits:r,minimumFractionDigits:r,style:`percent`,useGrouping:i}).format(e):t.style===`currency`&&t.currency?new Intl.NumberFormat(n,{currency:t.currency,maximumFractionDigits:r,minimumFractionDigits:r,style:`currency`,useGrouping:i}).format(e):new Intl.NumberFormat(n,{maximumFractionDigits:r,minimumFractionDigits:r,useGrouping:i}).format(e)}function cD(e,t,n=`en`){if(typeof e!=`string`||e.length===0)return``;if(t.kind===`time`)return lD(e,t.timePrecision??`minutes`);if(t.dateStyle===`iso`)return t.kind===`date`?e.slice(0,10):e;let r=t.kind===`date`?new Date(`${e}T00:00:00`):new Date(e);if(Number.isNaN(r.getTime()))return e;let i=t.dateStyle??`medium`;if(t.kind===`date`)return new Intl.DateTimeFormat(n,{dateStyle:i}).format(r);let a=t.timePrecision??`minutes`;return new Intl.DateTimeFormat(n,{dateStyle:i,timeStyle:a===`hours`?`short`:`medium`}).format(r)}function lD(e,t){let[n=`0`,r=`00`,i=`00`]=e.split(`:`);return t===`hours`?`${n.padStart(2,`0`)}:00`:t===`minutes`?`${n.padStart(2,`0`)}:${r.padStart(2,`0`)}`:`${n.padStart(2,`0`)}:${r.padStart(2,`0`)}:${i.padStart(2,`0`)}`}function uD(e,t){if(typeof e!=`number`||!Number.isFinite(e))return``;let n=Math.max(0,Math.round(e));if(t.display===`iso`)return dD(n);if(t.display===`minutes`)return`${Math.round(n/iD)} min`;if(t.display===`hours`)return`${(n/rD).toFixed(2)} h`;if(t.display===`decimal-hours`)return(n/rD).toFixed(2);let r=Math.floor(n/rD),i=Math.floor(n%rD/iD),a=Math.floor(n%iD/aD);return`${r}:${String(i).padStart(2,`0`)}:${String(a).padStart(2,`0`)}`}function dD(e){let t=Math.floor(e/rD),n=Math.floor(e%rD/iD),r=Math.floor(e%iD/aD);return`${t>=24?`P${Math.floor(t/24)}D`:`P`}T${t%24}H${n}M${r}S`}function fD(e,t,n=`en`){if(t==null)return``;switch(e.type){case`number`:return sD(t,e.format,n);case`date`:return cD(t,e.format,n);case`duration`:return uD(t,e.format);case`boolean`:return t===!0?`true`:t===!1?`false`:``;case`select`:return pD(e,t);default:return String(t)}}function pD(e,t){let n=Array.isArray(t)?t:[t],r=e.format.options.reduce((e,t)=>(e[t.id]=t.label,e),{});return n.filter(e=>typeof e==`string`&&e.length>0).map(e=>r[e]??e).join(`, `)}var mD=[`mail`],hD=[`round`,`drop`,`dome`,`flame`,`oval`,`bean`,`pebble`,`sprout`,`tower`,`wedge`],gD=[`text`,`textarea`,`number`,`select`,`multiselect`,`date`,`email`,`url`,`toggle`,`color`,`image`,`file`,`items`,`connection`,`list`,`location`,`audio`,`signature`];function _D(e){if(!e||typeof e!=`object`||Array.isArray(e))return!1;let{lat:t,lng:n,label:r}=e;return typeof t==`number`&&typeof n==`number`||typeof r==`string`&&r.trim().length>0}function vD(e){return!!(e&&typeof e==`object`&&typeof e.asset==`string`&&e.asset)}var yD=[`web_search`,`web_fetch`,`browser`,`sandbox`,`image`,`http`],bD=/^[a-z][a-z0-9-]{0,39}$/,xD=/^[a-z][a-z0-9_]{0,39}$/,SD=[`classifier`,`standard`,`high`,`highest`];[...SD];var CD=[`low`,`medium`,`high`],wD=[`image`,`video`,`voice`,`document`,`dashboard`],TD=[`png`,`mp4`,`mp3`,`pdf`,`docx`,`html`,`md`,`txt`,`csv`,`xlsx`,`json`,`zip`],ED=[`1:1`,`16:9`,`9:16`,`4:5`,`3:2`,`2:3`],DD=[`720p`,`480p`],OD=L().regex(/^[a-zA-Z][a-zA-Z0-9_]{0,40}$/,`ids are letters, digits and _ and start with a letter`),kD=H({id:OD,label:L().min(1),kind:K([`text`,`number`,`money`])}),AD=H({id:OD,label:L().min(1),kind:K(gD),required:z().optional(),placeholder:L().optional(),help:L().optional(),options:V(L()).optional(),default:W([L(),R(),z(),V(L())]).optional(),columns:V(kD).optional(),vat:H({rate:R().optional(),field:L().optional()}).optional(),currency:L().optional(),multiple:z().optional(),min:R().int().min(1).max(30).optional(),max:R().int().min(1).max(30).optional(),camera:z().optional(),video:z().optional(),scan:z().optional(),connection:L().optional(),list:L().optional(),prefill:L().optional()}),jD=H({when:H({field:L(),op:K([`equals`,`notEquals`,`in`,`notEmpty`,`empty`]),value:W([L(),R(),z(),V(L())]).optional()}),goto:L()}),MD={id:OD,title:L().min(1),description:L().optional(),next:V(jD).optional()},ND=H({id:OD,kind:K([`text`,`number`,`list`,`table`,`yesno`,`choice`]),description:L().optional(),columns:V(L().min(1)).optional(),options:V(L().min(1)).min(2).max(40).optional()}).refine(e=>e.kind!==`choice`||!!e.options?.length,{message:`A choice field lists its options.`,path:[`options`]}),PD=H({...MD,type:q(`page`),fields:V(AD).min(1),cta:L().optional()}),FD=H({...MD,type:q(`agent`),instructions:L().min(1),tools:V(W([K(yD),fl([L().regex(bD),`.`,L().regex(xD)])])).default([]),mcp:V(L()).optional(),connections:V(L()).optional(),output:H({format:K([`text`,`markdown`,`json`]),fields:V(ND).optional()}).default({format:`markdown`}),model:K(SD).optional(),effort:K(CD).optional(),working:L().optional()}),ID=H({...MD,type:q(`generate`),asset:K(wD),prompt:L().min(1),options:H({aspectRatio:K(ED).optional(),duration:R().optional(),resolution:K(DD).optional(),style:L().optional(),template:K([`invoice`,`offer`,`briefing`,`letter`,`report`,`free`]).optional()}).optional(),referenceImage:L().optional(),each:L().optional(),model:K(SD).optional(),effort:K(CD).optional(),working:L().optional()}),LD=H({...MD,type:q(`widget`),entry:L().min(1),data:G(L(),L()).default({}),sample:L().optional(),size:H({width:R().int().min(200).max(3840),height:R().int().min(200).max(3840)}).optional(),video:z().optional(),working:L().optional()}),RD=H({...MD,type:q(`review`),show:V(L()).min(1),edit:z().optional(),regenerate:z().optional()}),zD=H({from:L(),label:L().optional(),formats:V(K(TD)).min(1)}),BD=zc(`type`,[PD,FD,ID,LD,RD,H({...MD,type:q(`result`),message:L().optional(),deliverables:V(zD)})]),VD=H({id:OD,title:L().min(1),description:L().optional(),columns:nD,key:L().optional(),check:H({file:L().optional(),status:L().optional()}).optional()}),HD=H({id:OD,kind:K(mD).optional(),connector:L().optional(),actions:V(L()).max(200).optional(),policy:G(L(),K([`allow`,`ask`])).optional(),title:L().optional(),description:L().optional()});H({version:q(1).default(1),title:L().min(1),description:L().default(``),avatar:K(hD).default(`round`),intro:L().optional(),lists:V(VD).max(12).optional(),connections:V(HD).max(12).optional(),steps:V(BD).min(1)});function UD(e,t,n){let r=Array.isArray(t)?t:[],i=(e.columns??[]).filter(e=>e.kind!==`text`),a=r.map(e=>{let t=i.length?i.reduce((t,n)=>t*WD(e[n.id]),1):0;return{...e,amount:GD(t)}}),o=GD(a.reduce((e,t)=>e+t.amount,0)),s=e.vat?.rate??0;if(e.vat?.field){let t=n[e.vat.field],r=Number.parseFloat(String(t??``).replace(`,`,`.`));Number.isFinite(r)&&(s=r)}let c=GD(o*s/100);return{rows:a,net:o,vatRate:s,vat:c,gross:GD(o+c),currency:e.currency??`EUR`}}function WD(e){let t=Number(typeof e==`string`?e.replace(/\s/g,``).replace(`,`,`.`):e);return Number.isFinite(t)?t:0}function GD(e){return Math.round(e*100)/100}async function KD(e,t=2400){if(!/^image\/(jpeg|png|webp)$/.test(e.type)||e.size<12e5)return e;try{let n=await createImageBitmap(e),r=Math.min(1,t/Math.max(n.width,n.height)),i=document.createElement(`canvas`);i.width=Math.round(n.width*r),i.height=Math.round(n.height*r),i.getContext(`2d`)?.drawImage(n,0,0,i.width,i.height);let a=await new Promise(e=>i.toBlob(e,`image/jpeg`,.86));return a&&a.size<e.size?new File([a],`${e.name.replace(/\.[^.]+$/,``)}.jpg`,{type:`image/jpeg`}):e}catch{return e}}function qD(){return new Date().toISOString().slice(0,19).replace(/[:T]/g,`-`)}function JD(e){let t=e?.name;return t===`NotFoundError`||t===`OverconstrainedError`?`missing`:t===`NotReadableError`||t===`AbortError`?`busy`:`denied`}function YD(e){return!!e?.getCapabilities?.()?.torch}function XD(e,t,n=!1){let r=(0,y.useRef)(null),[i,a]=(0,y.useState)(null),[o,s]=(0,y.useState)(null),[c,l]=(0,y.useState)(1),[u,d]=(0,y.useState)(!1),[f,p]=(0,y.useState)(!1);return(0,y.useEffect)(()=>{if(!e)return;let r=null,i=!1;s(null),a(null),d(!1),p(!1);let o={facingMode:{ideal:t},width:{ideal:2560},height:{ideal:1440}};return(async()=>{if(!navigator.mediaDevices?.getUserMedia)throw new DOMException(`no camera api`,`NotAllowedError`);try{r=await navigator.mediaDevices.getUserMedia({video:o,audio:n})}catch(e){if(!n)throw e;r=await navigator.mediaDevices.getUserMedia({video:o})}if(i){for(let e of r.getTracks())e.stop();return}a(r);let e=r.getVideoTracks()[0],t=()=>!i&&d(YD(e));t(),setTimeout(t,600);let s=await navigator.mediaDevices.enumerateDevices().catch(()=>[]);i||l(s.filter(e=>e.kind===`videoinput`).length)})().catch(e=>!i&&s(JD(e))),()=>{i=!0;for(let e of r?.getTracks()??[])e.stop()}},[e,t,n]),(0,y.useEffect)(()=>{r.current&&i&&(r.current.srcObject=i)},[i]),{video:r,stream:i,error:o,cameras:c,torchable:u,torch:f,setTorch:async e=>{let t=i?.getVideoTracks()[0];try{await t?.applyConstraints({advanced:[{torch:e}]}),p(e)}catch{d(!1)}},mirrored:i?.getVideoTracks()[0]?.getSettings().facingMode===`user`}}function ZD({open:e,onClose:t,label:n,children:r}){let i=(0,y.useRef)(null);return(0,y.useEffect)(()=>{let t=i.current;t&&(e&&!t.open?t.showModal():!e&&t.open&&t.close())},[e]),(0,Z.jsx)(`dialog`,{ref:i,onClose:t,"aria-label":n,className:`media-sheet`,children:e?(0,Z.jsx)(`div`,{className:`flex h-full flex-col`,children:r}):null})}function QD({label:e,onClick:t,active:n,children:r}){return(0,Z.jsx)(`button`,{type:`button`,"aria-label":e,title:e,"aria-pressed":n,onClick:t,className:$(`flex size-11 shrink-0 items-center justify-center rounded-full transition`,n?`bg-white text-black`:`bg-white/12 text-white hover:bg-white/20`),children:r})}function $D({title:e,onClose:t,camera:n,onFlip:r}){return(0,Z.jsx)(`div`,{className:`safe-top`,children:(0,Z.jsxs)(`div`,{className:`flex items-center gap-2 px-3 py-2`,children:[(0,Z.jsx)(QD,{label:Q(`common.close`),onClick:t,children:(0,Z.jsx)(iy,{className:`size-5`})}),(0,Z.jsx)(`div`,{className:`min-w-0 flex-1 truncate text-center font-medium text-[15px]`,children:e}),n.torchable?(0,Z.jsx)(QD,{label:Q(`camera.torch`),active:n.torch,onClick:()=>void n.setTorch(!n.torch),children:n.torch?(0,Z.jsx)(I_,{className:`size-5`}):(0,Z.jsx)(P_,{className:`size-5`})}):null,n.stream&&(n.cameras>1||$T)?(0,Z.jsx)(QD,{label:Q(`camera.flip`),onClick:r,children:(0,Z.jsx)(Hv,{className:`size-5`})}):(0,Z.jsx)(`span`,{className:`size-11`})]})})}function eO({camera:e,asking:t,children:n,actions:r}){return(0,Z.jsxs)(`div`,{className:`relative min-h-0 flex-1 overflow-hidden`,children:[(0,Z.jsx)(`video`,{ref:e.video,autoPlay:!0,playsInline:!0,muted:!0,className:$(`absolute inset-0 size-full object-contain`,e.mirrored&&`-scale-x-100`)}),e.error?(0,Z.jsxs)(`div`,{className:`absolute inset-0 flex flex-col items-center justify-center gap-5 bg-black px-8 text-center`,children:[(0,Z.jsx)(`p`,{className:`max-w-sm text-[15px] text-white/85 leading-relaxed`,children:Q(`camera.${e.error}`)}),r]}):e.stream?n:(0,Z.jsxs)(`div`,{className:`absolute inset-0 flex flex-col items-center justify-center gap-4 px-8 text-center text-white/75`,children:[(0,Z.jsx)(Lb,{}),(0,Z.jsx)(`p`,{className:`max-w-xs text-[14px] leading-relaxed`,children:t})]})]})}var tO=30;function nO(){if(typeof MediaRecorder<`u`)return[`video/mp4;codecs=avc1.42E01E,mp4a.40.2`,`video/mp4`,`video/webm;codecs=vp9,opus`,`video/webm;codecs=vp8,opus`,`video/webm`].find(e=>MediaRecorder.isTypeSupported(e))}var rO=!!nO();function iO({open:e,multiple:t,video:n,onClose:r,onCapture:i,onNative:a}){let[o,s]=(0,y.useState)(`environment`),[c,l]=(0,y.useState)(`photo`),[u,d]=(0,y.useState)(0),[f,p]=(0,y.useState)(!1),[m,h]=(0,y.useState)(null),g=(0,y.useRef)(null),_=XD(e,o,c===`video`);(0,y.useEffect)(()=>{e&&(d(0),l(`photo`),h(null))},[e]);let v=async e=>{p(!0);try{await i(e),d(e=>e+1),t||r()}finally{p(!1)}},b=async()=>{let e=_.video.current;if(!e?.videoWidth)return;let t=document.createElement(`canvas`);t.width=e.videoWidth,t.height=e.videoHeight,t.getContext(`2d`)?.drawImage(e,0,0);let n=await new Promise(e=>t.toBlob(e,`image/jpeg`,.9));n&&await v(new File([n],`foto-${qD()}.jpg`,{type:`image/jpeg`}))},x=()=>{g.current?.state===`recording`&&g.current.stop()},S=()=>{let e=nO();if(!_.stream||!e)return;let t=[],n=new MediaRecorder(_.stream,{mimeType:e,videoBitsPerSecond:25e5,audioBitsPerSecond:96e3});n.ondataavailable=e=>e.data.size&&t.push(e.data),n.onstop=()=>{h(null),g.current=null;let n=e.split(`;`)[0];if(t.length){let e=n===`video/mp4`?`mp4`:`webm`;v(new File(t,`video-${qD()}.${e}`,{type:n}))}},g.current=n,n.start(1e3),h(0)};(0,y.useEffect)(()=>{if(m===null)return;if(m>=tO){g.current?.state===`recording`&&g.current.stop();return}let e=setTimeout(()=>h(e=>e===null?null:e+1),1e3);return()=>clearTimeout(e)},[m]),(0,y.useEffect)(()=>{!e&&g.current&&(g.current.onstop=null,g.current.stop(),g.current=null)},[e]);let C=e=>`0:${String(e).padStart(2,`0`)}`;return(0,Z.jsxs)(ZD,{open:e,onClose:r,label:Q(`camera.title`),children:[(0,Z.jsx)($D,{title:m===null?u?Q(`camera.taken`,{n:u}):Q(`camera.title`):`${C(m)} / ${C(tO)}`,onClose:r,camera:_,onFlip:()=>s(e=>e===`environment`?`user`:`environment`)}),(0,Z.jsx)(eO,{camera:_,asking:Q(`camera.asking`),actions:(0,Z.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[a?(0,Z.jsxs)(aO,{onClick:()=>{r(),a()},children:[(0,Z.jsx)(o_,{className:`size-4`}),` `,Q($T?`camera.native`:`camera.pick`)]}):null,(0,Z.jsx)(aO,{quiet:!0,onClick:r,children:Q(`common.close`)})]})}),(0,Z.jsxs)(`div`,{className:$(`safe-bottom px-4 pt-3`,_.error&&`invisible`),children:[n&&rO&&m===null?(0,Z.jsx)(`div`,{className:`mb-3 flex justify-center gap-1 text-[13px]`,children:[`photo`,`video`].map(e=>(0,Z.jsx)(`button`,{type:`button`,"aria-pressed":c===e,onClick:()=>l(e),className:$(`h-9 rounded-full px-4 font-medium transition`,c===e?`bg-white text-black`:`text-white/70 hover:text-white`),children:Q(e===`photo`?`camera.photo`:`camera.video`)},e))}):null,(0,Z.jsxs)(`div`,{className:`grid grid-cols-[1fr_auto_1fr] items-center gap-3`,children:[(0,Z.jsx)(`span`,{className:`text-[13px] text-white/70 leading-snug`,children:m===null?c===`video`?Q(`camera.clipHint`,{s:tO}):Q(t?`camera.hintMany`:`camera.hint`):Q(`camera.recording`)}),(0,Z.jsx)(`button`,{type:`button`,"aria-label":Q(c===`photo`?`camera.shoot`:m===null?`camera.record`:`camera.stop`),disabled:!_.stream||f,onClick:()=>c===`photo`?void b():m===null?S():x(),className:`flex size-[72px] items-center justify-center rounded-full border-4 border-white transition active:scale-95 disabled:opacity-40`,children:f?(0,Z.jsx)(Lb,{className:`text-white`}):c===`photo`?(0,Z.jsx)(`span`,{className:`size-[54px] rounded-full bg-white`}):m===null?(0,Z.jsx)(`span`,{className:`flex size-[54px] items-center justify-center rounded-full bg-[#e5484d]`,children:(0,Z.jsx)(Qv,{className:`size-6 text-white`})}):(0,Z.jsx)(`span`,{className:`size-7 rounded-md bg-[#e5484d]`})}),(0,Z.jsx)(`div`,{className:`flex justify-end`,children:t&&u&&m===null?(0,Z.jsxs)(aO,{onClick:r,children:[(0,Z.jsx)(c_,{className:`size-4`}),` `,Q(`camera.done`)]}):null})]})]})]})}function aO({onClick:e,quiet:t,children:n}){return(0,Z.jsx)(`button`,{type:`button`,onClick:e,className:$(`inline-flex h-11 items-center justify-center gap-2 rounded-full px-5 font-medium text-[14px] transition`,t?`text-white/75 hover:text-white`:`bg-white text-black hover:bg-white/90`),children:n})}var oO=25,sO=9e3;function cO(e){return e.code===e.PERMISSION_DENIED?`denied`:e.code===e.TIMEOUT?`timeout`:`unavailable`}function lO({value:e,runId:t,placeholder:n,onChange:r,onBusy:i}){let a=_D(e)?e:null,[o,s]=(0,y.useState)(!1),[c,l]=(0,y.useState)(null),u=(0,y.useRef)(null),d=(0,y.useRef)(!!a?.label),f=(0,y.useRef)(a);f.current=a;let p=a?.lat!==void 0&&a.lng!==void 0,m=typeof navigator<`u`&&`geolocation`in navigator,h=()=>{u.current!==null&&(navigator.geolocation.clearWatch(u.current),u.current=null),s(!1),i?.(!1)};(0,y.useEffect)(()=>()=>{u.current!==null&&navigator.geolocation.clearWatch(u.current)},[]);let g=async(e,n)=>{try{let{label:i}=await FE.post(`/api/runs/${t}/geocode`,{lat:e,lng:n,language:db}),a=f.current;i&&!d.current&&a?.lat===e&&a.lng===n&&r({...a,label:i})}catch{}},_=()=>{l(null),s(!0),i?.(!0);let e=Date.now(),t=1/0;u.current=navigator.geolocation.watchPosition(n=>{let{latitude:i,longitude:a,accuracy:o}=n.coords;if(o<t){t=o;let e=Math.round(i*1e6)/1e6,n=Math.round(a*1e6)/1e6,s=d.current?f.current?.label:void 0,c={lat:e,lng:n,accuracy:Math.round(o),...s?{label:s}:{}};f.current=c,r(c)}if(t<=oO||Date.now()-e>sO){h();let e=f.current;e?.lat!==void 0&&e.lng!==void 0&&g(e.lat,e.lng)}},e=>{h(),t===1/0&&l(cO(e))},{enableHighAccuracy:!0,timeout:15e3,maximumAge:1e4})},v=e=>{d.current=e.trim().length>0;let t={...p?a:{},label:e};r(p||e.trim()?t:void 0)};return(0,Z.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[p?(0,Z.jsxs)(`div`,{className:`flex items-center gap-3 rounded-xl bg-card p-3 ring-1 ring-input`,children:[(0,Z.jsx)(`div`,{className:`flex size-10 shrink-0 items-center justify-center rounded-full bg-moss-tint text-moss`,children:(0,Z.jsx)(iv,{className:`size-5`})}),(0,Z.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,Z.jsxs)(`div`,{className:`truncate font-medium text-[15px] tabular-nums`,children:[a.lat?.toFixed(5),`, `,a.lng?.toFixed(5)]}),(0,Z.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-3 text-[13px] text-ink-3`,children:[(0,Z.jsx)(`span`,{children:o?Q(`location.refining`):a.accuracy?Q(`location.accuracy`,{m:a.accuracy}):null}),(0,Z.jsxs)(`a`,{href:`https://www.openstreetmap.org/?mlat=${a.lat}&mlon=${a.lng}#map=17/${a.lat}/${a.lng}`,target:`_blank`,rel:`noreferrer`,className:`inline-flex items-center gap-1 underline-offset-2 hover:text-ink hover:underline coarse:-my-3 coarse:min-h-11 coarse:min-w-11`,children:[Q(`location.map`),` `,(0,Z.jsx)(S_,{className:`size-3`})]})]})]}),(0,Z.jsx)(Db,{label:Q(`location.remove`),onClick:()=>{h(),d.current=!1,r(void 0)},children:(0,Z.jsx)(iy,{className:`size-4`})})]}):m?(0,Z.jsxs)(`div`,{children:[(0,Z.jsxs)(Eb,{variant:`secondary`,size:`lg`,busy:o,onClick:_,className:`w-full sm:w-auto`,children:[o?null:(0,Z.jsx)(Q_,{className:`size-4`}),Q(o?`location.locating`:`location.use`)]}),c?(0,Z.jsx)(`p`,{className:`mt-2 rounded-lg bg-amber-tint px-3 py-2 text-[13px] text-ink-2 leading-relaxed`,children:Q(`location.${c}`)}):(0,Z.jsx)(`p`,{className:`mt-2 text-[13px] text-ink-3 leading-relaxed`,children:Q(`location.why`)})]}):null,(0,Z.jsx)(Ab,{value:a?.label??``,placeholder:n??Q(p?`location.label`:`location.manual`),autoComplete:`street-address`,enterKeyHint:`done`,"aria-label":Q(`location.manual`),onChange:e=>v(e.target.value)})]})}var uO=c({createWorker:()=>dO}),dO,fO=o((()=>{dO=()=>new Worker(URL.createObjectURL(new Blob([`class x{constructor(a,b){this.width=b;this.height=a.length/b;this.data=a}static createEmpty(a,b){return new x(new Uint8ClampedArray(a*b),a)}get(a,b){return 0>a||a>=this.width||0>b||b>=this.height?!1:!!this.data[b*this.width+a]}set(a,b,c){this.data[b*this.width+a]=c?1:0}setRegion(a,b,c,d,e){for(let f=b;f<b+d;f++)for(let g=a;g<a+c;g++)this.set(g,f,!!e)}}
639
+ class A{constructor(a,b,c){this.width=a;a*=b;if(c&&c.length!==a)throw Error("Wrong buffer size");this.data=c||new Uint8ClampedArray(a)}get(a,b){return this.data[b*this.width+a]}set(a,b,c){this.data[b*this.width+a]=c}}
640
+ class ba{constructor(a){this.bitOffset=this.byteOffset=0;this.bytes=a}readBits(a){if(1>a||32<a||a>this.available())throw Error("Cannot read "+a.toString()+" bits");var b=0;if(0<this.bitOffset){b=8-this.bitOffset;var c=a<b?a:b;b-=c;b=(this.bytes[this.byteOffset]&255>>8-c<<b)>>b;a-=c;this.bitOffset+=c;8===this.bitOffset&&(this.bitOffset=0,this.byteOffset++)}if(0<a){for(;8<=a;)b=b<<8|this.bytes[this.byteOffset]&255,this.byteOffset++,a-=8;0<a&&(c=8-a,b=b<<a|(this.bytes[this.byteOffset]&255>>c<<c)>>c,
641
+ this.bitOffset+=a)}return b}available(){return 8*(this.bytes.length-this.byteOffset)-this.bitOffset}}var B,C=B||(B={});C.Numeric="numeric";C.Alphanumeric="alphanumeric";C.Byte="byte";C.Kanji="kanji";C.ECI="eci";C.StructuredAppend="structuredappend";var D,E=D||(D={});E[E.Terminator=0]="Terminator";E[E.Numeric=1]="Numeric";E[E.Alphanumeric=2]="Alphanumeric";E[E.Byte=4]="Byte";E[E.Kanji=8]="Kanji";E[E.ECI=7]="ECI";E[E.StructuredAppend=3]="StructuredAppend";let F="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:".split("");
642
+ function ca(a,b){let c=[],d="";b=a.readBits([8,16,16][b]);for(let e=0;e<b;e++){let f=a.readBits(8);c.push(f)}try{d+=decodeURIComponent(c.map(e=>\`%\${("0"+e.toString(16)).substr(-2)}\`).join(""))}catch(e){}return{bytes:c,text:d}}
643
+ function da(a,b){a=new ba(a);let c=9>=b?0:26>=b?1:2;for(b={text:"",bytes:[],chunks:[],version:b};4<=a.available();){var d=a.readBits(4);if(d===D.Terminator)return b;if(d===D.ECI)0===a.readBits(1)?b.chunks.push({type:B.ECI,assignmentNumber:a.readBits(7)}):0===a.readBits(1)?b.chunks.push({type:B.ECI,assignmentNumber:a.readBits(14)}):0===a.readBits(1)?b.chunks.push({type:B.ECI,assignmentNumber:a.readBits(21)}):b.chunks.push({type:B.ECI,assignmentNumber:-1});else if(d===D.Numeric){var e=a,f=[];d="";for(var g=
644
+ e.readBits([10,12,14][c]);3<=g;){var h=e.readBits(10);if(1E3<=h)throw Error("Invalid numeric value above 999");var k=Math.floor(h/100),m=Math.floor(h/10)%10;h%=10;f.push(48+k,48+m,48+h);d+=k.toString()+m.toString()+h.toString();g-=3}if(2===g){g=e.readBits(7);if(100<=g)throw Error("Invalid numeric value above 99");e=Math.floor(g/10);g%=10;f.push(48+e,48+g);d+=e.toString()+g.toString()}else if(1===g){e=e.readBits(4);if(10<=e)throw Error("Invalid numeric value above 9");f.push(48+e);d+=e.toString()}b.text+=
645
+ d;b.bytes.push(...f);b.chunks.push({type:B.Numeric,text:d})}else if(d===D.Alphanumeric){e=a;f=[];d="";for(g=e.readBits([9,11,13][c]);2<=g;)m=e.readBits(11),k=Math.floor(m/45),m%=45,f.push(F[k].charCodeAt(0),F[m].charCodeAt(0)),d+=F[k]+F[m],g-=2;1===g&&(e=e.readBits(6),f.push(F[e].charCodeAt(0)),d+=F[e]);b.text+=d;b.bytes.push(...f);b.chunks.push({type:B.Alphanumeric,text:d})}else if(d===D.Byte)d=ca(a,c),b.text+=d.text,b.bytes.push(...d.bytes),b.chunks.push({type:B.Byte,bytes:d.bytes,text:d.text});
646
+ else if(d===D.Kanji){f=a;d=[];e=f.readBits([8,10,12][c]);for(g=0;g<e;g++)k=f.readBits(13),k=Math.floor(k/192)<<8|k%192,k=7936>k?k+33088:k+49472,d.push(k>>8,k&255);f=(new TextDecoder("shift-jis")).decode(Uint8Array.from(d));b.text+=f;b.bytes.push(...d);b.chunks.push({type:B.Kanji,bytes:d,text:f})}else d===D.StructuredAppend&&b.chunks.push({type:B.StructuredAppend,currentSequence:a.readBits(4),totalSequence:a.readBits(4),parity:a.readBits(8)})}if(0===a.available()||0===a.readBits(a.available()))return b}
647
+ class G{constructor(a,b){if(0===b.length)throw Error("No coefficients.");this.field=a;let c=b.length;if(1<c&&0===b[0]){let d=1;for(;d<c&&0===b[d];)d++;if(d===c)this.coefficients=a.zero.coefficients;else for(this.coefficients=new Uint8ClampedArray(c-d),a=0;a<this.coefficients.length;a++)this.coefficients[a]=b[d+a]}else this.coefficients=b}degree(){return this.coefficients.length-1}isZero(){return 0===this.coefficients[0]}getCoefficient(a){return this.coefficients[this.coefficients.length-1-a]}addOrSubtract(a){if(this.isZero())return a;
648
+ if(a.isZero())return this;let b=this.coefficients;a=a.coefficients;b.length>a.length&&([b,a]=[a,b]);let c=new Uint8ClampedArray(a.length),d=a.length-b.length;for(var e=0;e<d;e++)c[e]=a[e];for(e=d;e<a.length;e++)c[e]=b[e-d]^a[e];return new G(this.field,c)}multiply(a){if(0===a)return this.field.zero;if(1===a)return this;let b=this.coefficients.length,c=new Uint8ClampedArray(b);for(let d=0;d<b;d++)c[d]=this.field.multiply(this.coefficients[d],a);return new G(this.field,c)}multiplyPoly(a){if(this.isZero()||
649
+ a.isZero())return this.field.zero;let b=this.coefficients,c=b.length;a=a.coefficients;let d=a.length,e=new Uint8ClampedArray(c+d-1);for(let f=0;f<c;f++){let g=b[f];for(let h=0;h<d;h++)e[f+h]=H(e[f+h],this.field.multiply(g,a[h]))}return new G(this.field,e)}multiplyByMonomial(a,b){if(0>a)throw Error("Invalid degree less than 0");if(0===b)return this.field.zero;let c=this.coefficients.length;a=new Uint8ClampedArray(c+a);for(let d=0;d<c;d++)a[d]=this.field.multiply(this.coefficients[d],b);return new G(this.field,
650
+ a)}evaluateAt(a){let b=0;if(0===a)return this.getCoefficient(0);let c=this.coefficients.length;if(1===a)return this.coefficients.forEach(d=>{b^=d}),b;b=this.coefficients[0];for(let d=1;d<c;d++)b=H(this.field.multiply(a,b),this.coefficients[d]);return b}}function H(a,b){return a^b}
651
+ class ea{constructor(a,b,c){this.primitive=a;this.size=b;this.generatorBase=c;this.expTable=Array(this.size);this.logTable=Array(this.size);a=1;for(b=0;b<this.size;b++)this.expTable[b]=a,a*=2,a>=this.size&&(a=(a^this.primitive)&this.size-1);for(a=0;a<this.size-1;a++)this.logTable[this.expTable[a]]=a;this.zero=new G(this,Uint8ClampedArray.from([0]));this.one=new G(this,Uint8ClampedArray.from([1]))}multiply(a,b){return 0===a||0===b?0:this.expTable[(this.logTable[a]+this.logTable[b])%(this.size-1)]}inverse(a){if(0===
652
+ a)throw Error("Can't invert 0");return this.expTable[this.size-this.logTable[a]-1]}buildMonomial(a,b){if(0>a)throw Error("Invalid monomial degree less than 0");if(0===b)return this.zero;a=new Uint8ClampedArray(a+1);a[0]=b;return new G(this,a)}log(a){if(0===a)throw Error("Can't take log(0)");return this.logTable[a]}exp(a){return this.expTable[a]}}
653
+ function fa(a,b,c,d){b.degree()<c.degree()&&([b,c]=[c,b]);let e=a.zero;for(var f=a.one;c.degree()>=d/2;){var g=b;let h=e;b=c;e=f;if(b.isZero())return null;c=g;f=a.zero;g=b.getCoefficient(b.degree());for(g=a.inverse(g);c.degree()>=b.degree()&&!c.isZero();){let k=c.degree()-b.degree(),m=a.multiply(c.getCoefficient(c.degree()),g);f=f.addOrSubtract(a.buildMonomial(k,m));c=c.addOrSubtract(b.multiplyByMonomial(k,m))}f=f.multiplyPoly(e).addOrSubtract(h);if(c.degree()>=b.degree())return null}d=f.getCoefficient(0);
654
+ if(0===d)return null;a=a.inverse(d);return[f.multiply(a),c.multiply(a)]}
655
+ function ha(a,b){let c=new Uint8ClampedArray(a.length);c.set(a);a=new ea(285,256,0);var d=new G(a,c),e=new Uint8ClampedArray(b),f=!1;for(var g=0;g<b;g++){var h=d.evaluateAt(a.exp(g+a.generatorBase));e[e.length-1-g]=h;0!==h&&(f=!0)}if(!f)return c;d=new G(a,e);d=fa(a,a.buildMonomial(b,1),d,b);if(null===d)return null;b=d[0];g=b.degree();if(1===g)b=[b.getCoefficient(1)];else{e=Array(g);f=0;for(h=1;h<a.size&&f<g;h++)0===b.evaluateAt(h)&&(e[f]=a.inverse(h),f++);b=f!==g?null:e}if(null==b)return null;e=d[1];
656
+ f=b.length;d=Array(f);for(g=0;g<f;g++){h=a.inverse(b[g]);let k=1;for(let m=0;m<f;m++)g!==m&&(k=a.multiply(k,H(1,a.multiply(b[m],h))));d[g]=a.multiply(e.evaluateAt(h),a.inverse(k));0!==a.generatorBase&&(d[g]=a.multiply(d[g],h))}for(e=0;e<b.length;e++){f=c.length-1-a.log(b[e]);if(0>f)return null;c[f]^=d[e]}return c}
657
+ let I=[{infoBits:null,versionNumber:1,alignmentPatternCenters:[],errorCorrectionLevels:[{ecCodewordsPerBlock:7,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:19}]},{ecCodewordsPerBlock:10,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:16}]},{ecCodewordsPerBlock:13,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:13}]},{ecCodewordsPerBlock:17,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:9}]}]},{infoBits:null,versionNumber:2,alignmentPatternCenters:[6,18],errorCorrectionLevels:[{ecCodewordsPerBlock:10,ecBlocks:[{numBlocks:1,
658
+ dataCodewordsPerBlock:34}]},{ecCodewordsPerBlock:16,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:28}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:22}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:16}]}]},{infoBits:null,versionNumber:3,alignmentPatternCenters:[6,22],errorCorrectionLevels:[{ecCodewordsPerBlock:15,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:55}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:44}]},{ecCodewordsPerBlock:18,
659
+ ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:17}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:13}]}]},{infoBits:null,versionNumber:4,alignmentPatternCenters:[6,26],errorCorrectionLevels:[{ecCodewordsPerBlock:20,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:80}]},{ecCodewordsPerBlock:18,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:32}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:24}]},{ecCodewordsPerBlock:16,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:9}]}]},
660
+ {infoBits:null,versionNumber:5,alignmentPatternCenters:[6,30],errorCorrectionLevels:[{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:108}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:43}]},{ecCodewordsPerBlock:18,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:15},{numBlocks:2,dataCodewordsPerBlock:16}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:11},{numBlocks:2,dataCodewordsPerBlock:12}]}]},{infoBits:null,versionNumber:6,alignmentPatternCenters:[6,
661
+ 34],errorCorrectionLevels:[{ecCodewordsPerBlock:18,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:68}]},{ecCodewordsPerBlock:16,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:27}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:19}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:15}]}]},{infoBits:31892,versionNumber:7,alignmentPatternCenters:[6,22,38],errorCorrectionLevels:[{ecCodewordsPerBlock:20,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:78}]},{ecCodewordsPerBlock:18,
662
+ ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:31}]},{ecCodewordsPerBlock:18,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:14},{numBlocks:4,dataCodewordsPerBlock:15}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:13},{numBlocks:1,dataCodewordsPerBlock:14}]}]},{infoBits:34236,versionNumber:8,alignmentPatternCenters:[6,24,42],errorCorrectionLevels:[{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:97}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:38},
663
+ {numBlocks:2,dataCodewordsPerBlock:39}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:18},{numBlocks:2,dataCodewordsPerBlock:19}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:14},{numBlocks:2,dataCodewordsPerBlock:15}]}]},{infoBits:39577,versionNumber:9,alignmentPatternCenters:[6,26,46],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:116}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:36},
664
+ {numBlocks:2,dataCodewordsPerBlock:37}]},{ecCodewordsPerBlock:20,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:16},{numBlocks:4,dataCodewordsPerBlock:17}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:12},{numBlocks:4,dataCodewordsPerBlock:13}]}]},{infoBits:42195,versionNumber:10,alignmentPatternCenters:[6,28,50],errorCorrectionLevels:[{ecCodewordsPerBlock:18,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:68},{numBlocks:2,dataCodewordsPerBlock:69}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:4,
665
+ dataCodewordsPerBlock:43},{numBlocks:1,dataCodewordsPerBlock:44}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:6,dataCodewordsPerBlock:19},{numBlocks:2,dataCodewordsPerBlock:20}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:6,dataCodewordsPerBlock:15},{numBlocks:2,dataCodewordsPerBlock:16}]}]},{infoBits:48118,versionNumber:11,alignmentPatternCenters:[6,30,54],errorCorrectionLevels:[{ecCodewordsPerBlock:20,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:81}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:1,
666
+ dataCodewordsPerBlock:50},{numBlocks:4,dataCodewordsPerBlock:51}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:22},{numBlocks:4,dataCodewordsPerBlock:23}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:12},{numBlocks:8,dataCodewordsPerBlock:13}]}]},{infoBits:51042,versionNumber:12,alignmentPatternCenters:[6,32,58],errorCorrectionLevels:[{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:92},{numBlocks:2,dataCodewordsPerBlock:93}]},
667
+ {ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:6,dataCodewordsPerBlock:36},{numBlocks:2,dataCodewordsPerBlock:37}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:20},{numBlocks:6,dataCodewordsPerBlock:21}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:7,dataCodewordsPerBlock:14},{numBlocks:4,dataCodewordsPerBlock:15}]}]},{infoBits:55367,versionNumber:13,alignmentPatternCenters:[6,34,62],errorCorrectionLevels:[{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:107}]},
668
+ {ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:8,dataCodewordsPerBlock:37},{numBlocks:1,dataCodewordsPerBlock:38}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:8,dataCodewordsPerBlock:20},{numBlocks:4,dataCodewordsPerBlock:21}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:12,dataCodewordsPerBlock:11},{numBlocks:4,dataCodewordsPerBlock:12}]}]},{infoBits:58893,versionNumber:14,alignmentPatternCenters:[6,26,46,66],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:115},
669
+ {numBlocks:1,dataCodewordsPerBlock:116}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:40},{numBlocks:5,dataCodewordsPerBlock:41}]},{ecCodewordsPerBlock:20,ecBlocks:[{numBlocks:11,dataCodewordsPerBlock:16},{numBlocks:5,dataCodewordsPerBlock:17}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:11,dataCodewordsPerBlock:12},{numBlocks:5,dataCodewordsPerBlock:13}]}]},{infoBits:63784,versionNumber:15,alignmentPatternCenters:[6,26,48,70],errorCorrectionLevels:[{ecCodewordsPerBlock:22,
670
+ ecBlocks:[{numBlocks:5,dataCodewordsPerBlock:87},{numBlocks:1,dataCodewordsPerBlock:88}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:5,dataCodewordsPerBlock:41},{numBlocks:5,dataCodewordsPerBlock:42}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:5,dataCodewordsPerBlock:24},{numBlocks:7,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:11,dataCodewordsPerBlock:12},{numBlocks:7,dataCodewordsPerBlock:13}]}]},{infoBits:68472,versionNumber:16,alignmentPatternCenters:[6,26,50,
671
+ 74],errorCorrectionLevels:[{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:5,dataCodewordsPerBlock:98},{numBlocks:1,dataCodewordsPerBlock:99}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:7,dataCodewordsPerBlock:45},{numBlocks:3,dataCodewordsPerBlock:46}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:15,dataCodewordsPerBlock:19},{numBlocks:2,dataCodewordsPerBlock:20}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:15},{numBlocks:13,dataCodewordsPerBlock:16}]}]},{infoBits:70749,
672
+ versionNumber:17,alignmentPatternCenters:[6,30,54,78],errorCorrectionLevels:[{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:107},{numBlocks:5,dataCodewordsPerBlock:108}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:10,dataCodewordsPerBlock:46},{numBlocks:1,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:22},{numBlocks:15,dataCodewordsPerBlock:23}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:14},{numBlocks:17,
673
+ dataCodewordsPerBlock:15}]}]},{infoBits:76311,versionNumber:18,alignmentPatternCenters:[6,30,56,82],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:5,dataCodewordsPerBlock:120},{numBlocks:1,dataCodewordsPerBlock:121}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:9,dataCodewordsPerBlock:43},{numBlocks:4,dataCodewordsPerBlock:44}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:22},{numBlocks:1,dataCodewordsPerBlock:23}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:2,
674
+ dataCodewordsPerBlock:14},{numBlocks:19,dataCodewordsPerBlock:15}]}]},{infoBits:79154,versionNumber:19,alignmentPatternCenters:[6,30,58,86],errorCorrectionLevels:[{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:113},{numBlocks:4,dataCodewordsPerBlock:114}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:44},{numBlocks:11,dataCodewordsPerBlock:45}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:21},{numBlocks:4,dataCodewordsPerBlock:22}]},
675
+ {ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:9,dataCodewordsPerBlock:13},{numBlocks:16,dataCodewordsPerBlock:14}]}]},{infoBits:84390,versionNumber:20,alignmentPatternCenters:[6,34,62,90],errorCorrectionLevels:[{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:107},{numBlocks:5,dataCodewordsPerBlock:108}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:41},{numBlocks:13,dataCodewordsPerBlock:42}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:15,dataCodewordsPerBlock:24},
676
+ {numBlocks:5,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:15,dataCodewordsPerBlock:15},{numBlocks:10,dataCodewordsPerBlock:16}]}]},{infoBits:87683,versionNumber:21,alignmentPatternCenters:[6,28,50,72,94],errorCorrectionLevels:[{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:116},{numBlocks:4,dataCodewordsPerBlock:117}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:42}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:22},
677
+ {numBlocks:6,dataCodewordsPerBlock:23}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:19,dataCodewordsPerBlock:16},{numBlocks:6,dataCodewordsPerBlock:17}]}]},{infoBits:92361,versionNumber:22,alignmentPatternCenters:[6,26,50,74,98],errorCorrectionLevels:[{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:111},{numBlocks:7,dataCodewordsPerBlock:112}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:46}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:7,dataCodewordsPerBlock:24},
678
+ {numBlocks:16,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:34,dataCodewordsPerBlock:13}]}]},{infoBits:96236,versionNumber:23,alignmentPatternCenters:[6,30,54,74,102],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:121},{numBlocks:5,dataCodewordsPerBlock:122}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:47},{numBlocks:14,dataCodewordsPerBlock:48}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:11,dataCodewordsPerBlock:24},
679
+ {numBlocks:14,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:16,dataCodewordsPerBlock:15},{numBlocks:14,dataCodewordsPerBlock:16}]}]},{infoBits:102084,versionNumber:24,alignmentPatternCenters:[6,28,54,80,106],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:6,dataCodewordsPerBlock:117},{numBlocks:4,dataCodewordsPerBlock:118}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:6,dataCodewordsPerBlock:45},{numBlocks:14,dataCodewordsPerBlock:46}]},{ecCodewordsPerBlock:30,
680
+ ecBlocks:[{numBlocks:11,dataCodewordsPerBlock:24},{numBlocks:16,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:30,dataCodewordsPerBlock:16},{numBlocks:2,dataCodewordsPerBlock:17}]}]},{infoBits:102881,versionNumber:25,alignmentPatternCenters:[6,32,58,84,110],errorCorrectionLevels:[{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:8,dataCodewordsPerBlock:106},{numBlocks:4,dataCodewordsPerBlock:107}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:8,dataCodewordsPerBlock:47},{numBlocks:13,
681
+ dataCodewordsPerBlock:48}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:7,dataCodewordsPerBlock:24},{numBlocks:22,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:22,dataCodewordsPerBlock:15},{numBlocks:13,dataCodewordsPerBlock:16}]}]},{infoBits:110507,versionNumber:26,alignmentPatternCenters:[6,30,58,86,114],errorCorrectionLevels:[{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:10,dataCodewordsPerBlock:114},{numBlocks:2,dataCodewordsPerBlock:115}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:19,
682
+ dataCodewordsPerBlock:46},{numBlocks:4,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:28,dataCodewordsPerBlock:22},{numBlocks:6,dataCodewordsPerBlock:23}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:33,dataCodewordsPerBlock:16},{numBlocks:4,dataCodewordsPerBlock:17}]}]},{infoBits:110734,versionNumber:27,alignmentPatternCenters:[6,34,62,90,118],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:8,dataCodewordsPerBlock:122},{numBlocks:4,dataCodewordsPerBlock:123}]},
683
+ {ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:22,dataCodewordsPerBlock:45},{numBlocks:3,dataCodewordsPerBlock:46}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:8,dataCodewordsPerBlock:23},{numBlocks:26,dataCodewordsPerBlock:24}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:12,dataCodewordsPerBlock:15},{numBlocks:28,dataCodewordsPerBlock:16}]}]},{infoBits:117786,versionNumber:28,alignmentPatternCenters:[6,26,50,74,98,122],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:117},
684
+ {numBlocks:10,dataCodewordsPerBlock:118}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:45},{numBlocks:23,dataCodewordsPerBlock:46}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:24},{numBlocks:31,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:11,dataCodewordsPerBlock:15},{numBlocks:31,dataCodewordsPerBlock:16}]}]},{infoBits:119615,versionNumber:29,alignmentPatternCenters:[6,30,54,78,102,126],errorCorrectionLevels:[{ecCodewordsPerBlock:30,
685
+ ecBlocks:[{numBlocks:7,dataCodewordsPerBlock:116},{numBlocks:7,dataCodewordsPerBlock:117}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:21,dataCodewordsPerBlock:45},{numBlocks:7,dataCodewordsPerBlock:46}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:23},{numBlocks:37,dataCodewordsPerBlock:24}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:19,dataCodewordsPerBlock:15},{numBlocks:26,dataCodewordsPerBlock:16}]}]},{infoBits:126325,versionNumber:30,alignmentPatternCenters:[6,
686
+ 26,52,78,104,130],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:5,dataCodewordsPerBlock:115},{numBlocks:10,dataCodewordsPerBlock:116}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:19,dataCodewordsPerBlock:47},{numBlocks:10,dataCodewordsPerBlock:48}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:15,dataCodewordsPerBlock:24},{numBlocks:25,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:23,dataCodewordsPerBlock:15},{numBlocks:25,dataCodewordsPerBlock:16}]}]},
687
+ {infoBits:127568,versionNumber:31,alignmentPatternCenters:[6,30,56,82,108,134],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:13,dataCodewordsPerBlock:115},{numBlocks:3,dataCodewordsPerBlock:116}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:46},{numBlocks:29,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:42,dataCodewordsPerBlock:24},{numBlocks:1,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:23,dataCodewordsPerBlock:15},
688
+ {numBlocks:28,dataCodewordsPerBlock:16}]}]},{infoBits:133589,versionNumber:32,alignmentPatternCenters:[6,34,60,86,112,138],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:115}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:10,dataCodewordsPerBlock:46},{numBlocks:23,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:10,dataCodewordsPerBlock:24},{numBlocks:35,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:19,
689
+ dataCodewordsPerBlock:15},{numBlocks:35,dataCodewordsPerBlock:16}]}]},{infoBits:136944,versionNumber:33,alignmentPatternCenters:[6,30,58,86,114,142],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:115},{numBlocks:1,dataCodewordsPerBlock:116}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:14,dataCodewordsPerBlock:46},{numBlocks:21,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:29,dataCodewordsPerBlock:24},{numBlocks:19,dataCodewordsPerBlock:25}]},
690
+ {ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:11,dataCodewordsPerBlock:15},{numBlocks:46,dataCodewordsPerBlock:16}]}]},{infoBits:141498,versionNumber:34,alignmentPatternCenters:[6,34,62,90,118,146],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:13,dataCodewordsPerBlock:115},{numBlocks:6,dataCodewordsPerBlock:116}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:14,dataCodewordsPerBlock:46},{numBlocks:23,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:44,
691
+ dataCodewordsPerBlock:24},{numBlocks:7,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:59,dataCodewordsPerBlock:16},{numBlocks:1,dataCodewordsPerBlock:17}]}]},{infoBits:145311,versionNumber:35,alignmentPatternCenters:[6,30,54,78,102,126,150],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:12,dataCodewordsPerBlock:121},{numBlocks:7,dataCodewordsPerBlock:122}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:12,dataCodewordsPerBlock:47},{numBlocks:26,dataCodewordsPerBlock:48}]},
692
+ {ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:39,dataCodewordsPerBlock:24},{numBlocks:14,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:22,dataCodewordsPerBlock:15},{numBlocks:41,dataCodewordsPerBlock:16}]}]},{infoBits:150283,versionNumber:36,alignmentPatternCenters:[6,24,50,76,102,128,154],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:6,dataCodewordsPerBlock:121},{numBlocks:14,dataCodewordsPerBlock:122}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:6,
693
+ dataCodewordsPerBlock:47},{numBlocks:34,dataCodewordsPerBlock:48}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:46,dataCodewordsPerBlock:24},{numBlocks:10,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:15},{numBlocks:64,dataCodewordsPerBlock:16}]}]},{infoBits:152622,versionNumber:37,alignmentPatternCenters:[6,28,54,80,106,132,158],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:122},{numBlocks:4,dataCodewordsPerBlock:123}]},
694
+ {ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:29,dataCodewordsPerBlock:46},{numBlocks:14,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:49,dataCodewordsPerBlock:24},{numBlocks:10,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:24,dataCodewordsPerBlock:15},{numBlocks:46,dataCodewordsPerBlock:16}]}]},{infoBits:158308,versionNumber:38,alignmentPatternCenters:[6,32,58,84,110,136,162],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:4,
695
+ dataCodewordsPerBlock:122},{numBlocks:18,dataCodewordsPerBlock:123}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:13,dataCodewordsPerBlock:46},{numBlocks:32,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:48,dataCodewordsPerBlock:24},{numBlocks:14,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:42,dataCodewordsPerBlock:15},{numBlocks:32,dataCodewordsPerBlock:16}]}]},{infoBits:161089,versionNumber:39,alignmentPatternCenters:[6,26,54,82,110,138,166],
696
+ errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:20,dataCodewordsPerBlock:117},{numBlocks:4,dataCodewordsPerBlock:118}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:40,dataCodewordsPerBlock:47},{numBlocks:7,dataCodewordsPerBlock:48}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:43,dataCodewordsPerBlock:24},{numBlocks:22,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:10,dataCodewordsPerBlock:15},{numBlocks:67,dataCodewordsPerBlock:16}]}]},{infoBits:167017,
697
+ versionNumber:40,alignmentPatternCenters:[6,30,58,86,114,142,170],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:19,dataCodewordsPerBlock:118},{numBlocks:6,dataCodewordsPerBlock:119}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:18,dataCodewordsPerBlock:47},{numBlocks:31,dataCodewordsPerBlock:48}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:34,dataCodewordsPerBlock:24},{numBlocks:34,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:20,dataCodewordsPerBlock:15},
698
+ {numBlocks:61,dataCodewordsPerBlock:16}]}]}];function J(a,b){a^=b;for(b=0;a;)b++,a&=a-1;return b}function K(a,b){return b<<1|a}
699
+ let ia=[{bits:21522,formatInfo:{errorCorrectionLevel:1,dataMask:0}},{bits:20773,formatInfo:{errorCorrectionLevel:1,dataMask:1}},{bits:24188,formatInfo:{errorCorrectionLevel:1,dataMask:2}},{bits:23371,formatInfo:{errorCorrectionLevel:1,dataMask:3}},{bits:17913,formatInfo:{errorCorrectionLevel:1,dataMask:4}},{bits:16590,formatInfo:{errorCorrectionLevel:1,dataMask:5}},{bits:20375,formatInfo:{errorCorrectionLevel:1,dataMask:6}},{bits:19104,formatInfo:{errorCorrectionLevel:1,dataMask:7}},{bits:30660,formatInfo:{errorCorrectionLevel:0,
700
+ dataMask:0}},{bits:29427,formatInfo:{errorCorrectionLevel:0,dataMask:1}},{bits:32170,formatInfo:{errorCorrectionLevel:0,dataMask:2}},{bits:30877,formatInfo:{errorCorrectionLevel:0,dataMask:3}},{bits:26159,formatInfo:{errorCorrectionLevel:0,dataMask:4}},{bits:25368,formatInfo:{errorCorrectionLevel:0,dataMask:5}},{bits:27713,formatInfo:{errorCorrectionLevel:0,dataMask:6}},{bits:26998,formatInfo:{errorCorrectionLevel:0,dataMask:7}},{bits:5769,formatInfo:{errorCorrectionLevel:3,dataMask:0}},{bits:5054,
701
+ formatInfo:{errorCorrectionLevel:3,dataMask:1}},{bits:7399,formatInfo:{errorCorrectionLevel:3,dataMask:2}},{bits:6608,formatInfo:{errorCorrectionLevel:3,dataMask:3}},{bits:1890,formatInfo:{errorCorrectionLevel:3,dataMask:4}},{bits:597,formatInfo:{errorCorrectionLevel:3,dataMask:5}},{bits:3340,formatInfo:{errorCorrectionLevel:3,dataMask:6}},{bits:2107,formatInfo:{errorCorrectionLevel:3,dataMask:7}},{bits:13663,formatInfo:{errorCorrectionLevel:2,dataMask:0}},{bits:12392,formatInfo:{errorCorrectionLevel:2,
702
+ dataMask:1}},{bits:16177,formatInfo:{errorCorrectionLevel:2,dataMask:2}},{bits:14854,formatInfo:{errorCorrectionLevel:2,dataMask:3}},{bits:9396,formatInfo:{errorCorrectionLevel:2,dataMask:4}},{bits:8579,formatInfo:{errorCorrectionLevel:2,dataMask:5}},{bits:11994,formatInfo:{errorCorrectionLevel:2,dataMask:6}},{bits:11245,formatInfo:{errorCorrectionLevel:2,dataMask:7}}],ja=[a=>0===(a.y+a.x)%2,a=>0===a.y%2,a=>0===a.x%3,a=>0===(a.y+a.x)%3,a=>0===(Math.floor(a.y/2)+Math.floor(a.x/3))%2,a=>0===a.x*a.y%
703
+ 2+a.x*a.y%3,a=>0===(a.y*a.x%2+a.y*a.x%3)%2,a=>0===((a.y+a.x)%2+a.y*a.x%3)%2];
704
+ function ka(a,b,c){c=ja[c.dataMask];let d=a.height;var e=17+4*b.versionNumber;let f=x.createEmpty(e,e);f.setRegion(0,0,9,9,!0);f.setRegion(e-8,0,8,9,!0);f.setRegion(0,e-8,9,8,!0);for(var g of b.alignmentPatternCenters)for(var h of b.alignmentPatternCenters)6===g&&6===h||6===g&&h===e-7||g===e-7&&6===h||f.setRegion(g-2,h-2,5,5,!0);f.setRegion(6,9,1,e-17,!0);f.setRegion(9,6,e-17,1,!0);6<b.versionNumber&&(f.setRegion(e-11,0,3,6,!0),f.setRegion(0,e-11,6,3,!0));b=[];h=g=0;e=!0;for(let k=d-1;0<k;k-=2){6===
705
+ k&&k--;for(let m=0;m<d;m++){let l=e?d-1-m:m;for(let n=0;2>n;n++){let q=k-n;if(!f.get(q,l)){h++;let r=a.get(q,l);c({y:l,x:q})&&(r=!r);g=g<<1|r;8===h&&(b.push(g),g=h=0)}}}e=!e}return b}
706
+ function la(a){var b=a.height,c=Math.floor((b-17)/4);if(6>=c)return I[c-1];c=0;for(var d=5;0<=d;d--)for(var e=b-9;e>=b-11;e--)c=K(a.get(e,d),c);d=0;for(e=5;0<=e;e--)for(let g=b-9;g>=b-11;g--)d=K(a.get(e,g),d);a=Infinity;let f;for(let g of I){if(g.infoBits===c||g.infoBits===d)return g;b=J(c,g.infoBits);b<a&&(f=g,a=b);b=J(d,g.infoBits);b<a&&(f=g,a=b)}if(3>=a)return f}
707
+ function ma(a){let b=0;for(var c=0;8>=c;c++)6!==c&&(b=K(a.get(c,8),b));for(c=7;0<=c;c--)6!==c&&(b=K(a.get(8,c),b));var d=a.height;c=0;for(var e=d-1;e>=d-7;e--)c=K(a.get(8,e),c);for(e=d-8;e<d;e++)c=K(a.get(e,8),c);a=Infinity;d=null;for(let {bits:f,formatInfo:g}of ia){if(f===b||f===c)return g;e=J(b,f);e<a&&(d=g,a=e);b!==c&&(e=J(c,f),e<a&&(d=g,a=e))}return 3>=a?d:null}
708
+ function na(a,b,c){let d=b.errorCorrectionLevels[c],e=[],f=0;d.ecBlocks.forEach(h=>{for(let k=0;k<h.numBlocks;k++)e.push({numDataCodewords:h.dataCodewordsPerBlock,codewords:[]}),f+=h.dataCodewordsPerBlock+d.ecCodewordsPerBlock});if(a.length<f)return null;a=a.slice(0,f);b=d.ecBlocks[0].dataCodewordsPerBlock;for(c=0;c<b;c++)for(var g of e)g.codewords.push(a.shift());if(1<d.ecBlocks.length)for(g=d.ecBlocks[0].numBlocks,b=d.ecBlocks[1].numBlocks,c=0;c<b;c++)e[g+c].codewords.push(a.shift());for(;0<a.length;)for(let h of e)h.codewords.push(a.shift());
709
+ return e}function L(a){let b=la(a);if(!b)return null;var c=ma(a);if(!c)return null;a=ka(a,b,c);var d=na(a,b,c.errorCorrectionLevel);if(!d)return null;c=d.reduce((e,f)=>e+f.numDataCodewords,0);c=new Uint8ClampedArray(c);a=0;for(let e of d){d=ha(e.codewords,e.codewords.length-e.numDataCodewords);if(!d)return null;for(let f=0;f<e.numDataCodewords;f++)c[a++]=d[f]}try{return da(c,b.versionNumber)}catch(e){return null}}
710
+ function M(a,b,c,d){var e=a.x-b.x+c.x-d.x;let f=a.y-b.y+c.y-d.y;if(0===e&&0===f)return{a11:b.x-a.x,a12:b.y-a.y,a13:0,a21:c.x-b.x,a22:c.y-b.y,a23:0,a31:a.x,a32:a.y,a33:1};let g=b.x-c.x;var h=d.x-c.x;let k=b.y-c.y,m=d.y-c.y;c=g*m-h*k;h=(e*m-h*f)/c;e=(g*f-e*k)/c;return{a11:b.x-a.x+h*b.x,a12:b.y-a.y+h*b.y,a13:h,a21:d.x-a.x+e*d.x,a22:d.y-a.y+e*d.y,a23:e,a31:a.x,a32:a.y,a33:1}}
711
+ function oa(a,b,c,d){a=M(a,b,c,d);return{a11:a.a22*a.a33-a.a23*a.a32,a12:a.a13*a.a32-a.a12*a.a33,a13:a.a12*a.a23-a.a13*a.a22,a21:a.a23*a.a31-a.a21*a.a33,a22:a.a11*a.a33-a.a13*a.a31,a23:a.a13*a.a21-a.a11*a.a23,a31:a.a21*a.a32-a.a22*a.a31,a32:a.a12*a.a31-a.a11*a.a32,a33:a.a11*a.a22-a.a12*a.a21}}
712
+ function pa(a,b){var c=oa({x:3.5,y:3.5},{x:b.dimension-3.5,y:3.5},{x:b.dimension-6.5,y:b.dimension-6.5},{x:3.5,y:b.dimension-3.5}),d=M(b.topLeft,b.topRight,b.alignmentPattern,b.bottomLeft),e=d.a11*c.a11+d.a21*c.a12+d.a31*c.a13,f=d.a12*c.a11+d.a22*c.a12+d.a32*c.a13,g=d.a13*c.a11+d.a23*c.a12+d.a33*c.a13,h=d.a11*c.a21+d.a21*c.a22+d.a31*c.a23,k=d.a12*c.a21+d.a22*c.a22+d.a32*c.a23,m=d.a13*c.a21+d.a23*c.a22+d.a33*c.a23,l=d.a11*c.a31+d.a21*c.a32+d.a31*c.a33,n=d.a12*c.a31+d.a22*c.a32+d.a32*c.a33,q=d.a13*
713
+ c.a31+d.a23*c.a32+d.a33*c.a33;c=x.createEmpty(b.dimension,b.dimension);d=(r,u)=>{const p=g*r+m*u+q;return{x:(e*r+h*u+l)/p,y:(f*r+k*u+n)/p}};for(let r=0;r<b.dimension;r++)for(let u=0;u<b.dimension;u++){let p=d(u+.5,r+.5);c.set(u,r,a.get(Math.floor(p.x),Math.floor(p.y)))}return{matrix:c,mappingFunction:d}}let N=(a,b)=>Math.sqrt(Math.pow(b.x-a.x,2)+Math.pow(b.y-a.y,2));function O(a){return a.reduce((b,c)=>b+c)}
714
+ function qa(a,b,c){let d=N(a,b),e=N(b,c),f=N(a,c),g,h,k;e>=d&&e>=f?[g,h,k]=[b,a,c]:f>=e&&f>=d?[g,h,k]=[a,b,c]:[g,h,k]=[a,c,b];0>(k.x-h.x)*(g.y-h.y)-(k.y-h.y)*(g.x-h.x)&&([g,k]=[k,g]);return{bottomLeft:g,topLeft:h,topRight:k}}
715
+ function ra(a,b,c,d){d=(O(P(a,c,d,5))/7+O(P(a,b,d,5))/7+O(P(c,a,d,5))/7+O(P(b,a,d,5))/7)/4;if(1>d)throw Error("Invalid module size");b=Math.round(N(a,b)/d);a=Math.round(N(a,c)/d);a=Math.floor((b+a)/2)+7;switch(a%4){case 0:a++;break;case 2:a--}return{dimension:a,moduleSize:d}}
716
+ function Q(a,b,c,d){let e=[{x:Math.floor(a.x),y:Math.floor(a.y)}];var f=Math.abs(b.y-a.y)>Math.abs(b.x-a.x);if(f){var g=Math.floor(a.y);var h=Math.floor(a.x);a=Math.floor(b.y);b=Math.floor(b.x)}else g=Math.floor(a.x),h=Math.floor(a.y),a=Math.floor(b.x),b=Math.floor(b.y);let k=Math.abs(a-g),m=Math.abs(b-h),l=Math.floor(-k/2),n=g<a?1:-1,q=h<b?1:-1,r=!0;for(let u=g,p=h;u!==a+n;u+=n){g=f?p:u;h=f?u:p;if(c.get(g,h)!==r&&(r=!r,e.push({x:g,y:h}),e.length===d+1))break;l+=m;if(0<l){if(p===b)break;p+=q;l-=k}}c=
717
+ [];for(f=0;f<d;f++)e[f]&&e[f+1]?c.push(N(e[f],e[f+1])):c.push(0);return c}function P(a,b,c,d){let e=b.y-a.y,f=b.x-a.x;b=Q(a,b,c,Math.ceil(d/2));a=Q(a,{x:a.x-f,y:a.y-e},c,Math.ceil(d/2));c=b.shift()+a.shift()-1;return a.concat(c).concat(...b)}function R(a,b){let c=O(a)/O(b),d=0;b.forEach((e,f)=>{d+=Math.pow(a[f]-e*c,2)});return{averageSize:c,error:d}}
718
+ function S(a,b,c){try{let d=P(a,{x:-1,y:a.y},c,b.length),e=P(a,{x:a.x,y:-1},c,b.length),f=P(a,{x:Math.max(0,a.x-a.y)-1,y:Math.max(0,a.y-a.x)-1},c,b.length),g=P(a,{x:Math.min(c.width,a.x+a.y)+1,y:Math.min(c.height,a.y+a.x)+1},c,b.length),h=R(d,b),k=R(e,b),m=R(f,b),l=R(g,b),n=(h.averageSize+k.averageSize+m.averageSize+l.averageSize)/4;return Math.sqrt(h.error*h.error+k.error*k.error+m.error*m.error+l.error*l.error)+(Math.pow(h.averageSize-n,2)+Math.pow(k.averageSize-n,2)+Math.pow(m.averageSize-n,2)+
719
+ Math.pow(l.averageSize-n,2))/n}catch(d){return Infinity}}function T(a,b){for(var c=Math.round(b.x);a.get(c,Math.round(b.y));)c--;for(var d=Math.round(b.x);a.get(d,Math.round(b.y));)d++;c=(c+d)/2;for(d=Math.round(b.y);a.get(Math.round(c),d);)d--;for(b=Math.round(b.y);a.get(Math.round(c),b);)b++;return{x:c,y:(d+b)/2}}
720
+ function sa(a){var b=[],c=[];let d=[];var e=[];for(let p=0;p<=a.height;p++){var f=0,g=!1;let t=[0,0,0,0,0];for(let v=-1;v<=a.width;v++){var h=a.get(v,p);if(h===g)f++;else{t=[t[1],t[2],t[3],t[4],f];f=1;g=h;var k=O(t)/7;k=Math.abs(t[0]-k)<k&&Math.abs(t[1]-k)<k&&Math.abs(t[2]-3*k)<3*k&&Math.abs(t[3]-k)<k&&Math.abs(t[4]-k)<k&&!h;var m=O(t.slice(-3))/3;h=Math.abs(t[2]-m)<m&&Math.abs(t[3]-m)<m&&Math.abs(t[4]-m)<m&&h;if(k){let z=v-t[3]-t[4],y=z-t[2];k={startX:y,endX:z,y:p};m=c.filter(w=>y>=w.bottom.startX&&
721
+ y<=w.bottom.endX||z>=w.bottom.startX&&y<=w.bottom.endX||y<=w.bottom.startX&&z>=w.bottom.endX&&1.5>t[2]/(w.bottom.endX-w.bottom.startX)&&.5<t[2]/(w.bottom.endX-w.bottom.startX));0<m.length?m[0].bottom=k:c.push({top:k,bottom:k})}if(h){let z=v-t[4],y=z-t[3];h={startX:y,y:p,endX:z};k=e.filter(w=>y>=w.bottom.startX&&y<=w.bottom.endX||z>=w.bottom.startX&&y<=w.bottom.endX||y<=w.bottom.startX&&z>=w.bottom.endX&&1.5>t[2]/(w.bottom.endX-w.bottom.startX)&&.5<t[2]/(w.bottom.endX-w.bottom.startX));0<k.length?
722
+ k[0].bottom=h:e.push({top:h,bottom:h})}}}b.push(...c.filter(v=>v.bottom.y!==p&&2<=v.bottom.y-v.top.y));c=c.filter(v=>v.bottom.y===p);d.push(...e.filter(v=>v.bottom.y!==p));e=e.filter(v=>v.bottom.y===p)}b.push(...c.filter(p=>2<=p.bottom.y-p.top.y));d.push(...e);c=[];for(var l of b)2>l.bottom.y-l.top.y||(b=(l.top.startX+l.top.endX+l.bottom.startX+l.bottom.endX)/4,e=(l.top.y+l.bottom.y+1)/2,a.get(Math.round(b),Math.round(e))&&(f=[l.top.endX-l.top.startX,l.bottom.endX-l.bottom.startX,l.bottom.y-l.top.y+
723
+ 1],f=O(f)/f.length,g=S({x:Math.round(b),y:Math.round(e)},[1,1,3,1,1],a),c.push({score:g,x:b,y:e,size:f})));if(3>c.length)return null;c.sort((p,t)=>p.score-t.score);l=[];for(b=0;b<Math.min(c.length,5);++b){e=c[b];f=[];for(var n of c)n!==e&&f.push(Object.assign(Object.assign({},n),{score:n.score+Math.pow(n.size-e.size,2)/e.size}));f.sort((p,t)=>p.score-t.score);l.push({points:[e,f[0],f[1]],score:e.score+f[0].score+f[1].score})}l.sort((p,t)=>p.score-t.score);let {topRight:q,topLeft:r,bottomLeft:u}=qa(...l[0].points);
724
+ l=U(a,d,q,r,u);n=[];l&&n.push({alignmentPattern:{x:l.alignmentPattern.x,y:l.alignmentPattern.y},bottomLeft:{x:u.x,y:u.y},dimension:l.dimension,topLeft:{x:r.x,y:r.y},topRight:{x:q.x,y:q.y}});l=T(a,q);b=T(a,r);c=T(a,u);(a=U(a,d,l,b,c))&&n.push({alignmentPattern:{x:a.alignmentPattern.x,y:a.alignmentPattern.y},bottomLeft:{x:c.x,y:c.y},topLeft:{x:b.x,y:b.y},topRight:{x:l.x,y:l.y},dimension:a.dimension});return 0===n.length?null:n}
725
+ function U(a,b,c,d,e){let f,g;try{({dimension:f,moduleSize:g}=ra(d,c,e,a))}catch(l){return null}var h=c.x-d.x+e.x,k=c.y-d.y+e.y;c=(N(d,e)+N(d,c))/2/g;e=1-3/c;let m={x:d.x+e*(h-d.x),y:d.y+e*(k-d.y)};b=b.map(l=>{const n=(l.top.startX+l.top.endX+l.bottom.startX+l.bottom.endX)/4;l=(l.top.y+l.bottom.y+1)/2;if(a.get(Math.floor(n),Math.floor(l))){var q=S({x:Math.floor(n),y:Math.floor(l)},[1,1,1],a)+N({x:n,y:l},m);return{x:n,y:l,score:q}}}).filter(l=>!!l).sort((l,n)=>l.score-n.score);return{alignmentPattern:15<=
726
+ c&&b.length?b[0]:m,dimension:f}}
727
+ function V(a){var b=sa(a);if(!b)return null;for(let e of b){b=pa(a,e);var c=b.matrix;if(null==c)c=null;else{var d=L(c);if(d)c=d;else{for(d=0;d<c.width;d++)for(let f=d+1;f<c.height;f++)c.get(d,f)!==c.get(f,d)&&(c.set(d,f,!c.get(d,f)),c.set(f,d,!c.get(f,d)));c=L(c)}}if(c)return{binaryData:c.bytes,data:c.text,chunks:c.chunks,version:c.version,location:{topRightCorner:b.mappingFunction(e.dimension,0),topLeftCorner:b.mappingFunction(0,0),bottomRightCorner:b.mappingFunction(e.dimension,e.dimension),bottomLeftCorner:b.mappingFunction(0,
728
+ e.dimension),topRightFinderPattern:e.topRight,topLeftFinderPattern:e.topLeft,bottomLeftFinderPattern:e.bottomLeft,bottomRightAlignmentPattern:e.alignmentPattern},matrix:b.matrix}}return null}let ta={inversionAttempts:"attemptBoth",greyScaleWeights:{red:.2126,green:.7152,blue:.0722,useIntegerApproximation:!1},canOverwriteImage:!0};function W(a,b){Object.keys(b).forEach(c=>{a[c]=b[c]})}
729
+ function X(a,b,c,d={}){let e=Object.create(null);W(e,ta);W(e,d);d="onlyInvert"===e.inversionAttempts||"invertFirst"===e.inversionAttempts;var f="attemptBoth"===e.inversionAttempts||d;var g=e.greyScaleWeights,h=e.canOverwriteImage,k=b*c;if(a.length!==4*k)throw Error("Malformed data passed to binarizer.");var m=0;if(h){var l=new Uint8ClampedArray(a.buffer,m,k);m+=k}l=new A(b,c,l);if(g.useIntegerApproximation)for(var n=0;n<c;n++)for(var q=0;q<b;q++){var r=4*(n*b+q);l.set(q,n,g.red*a[r]+g.green*a[r+1]+
730
+ g.blue*a[r+2]+128>>8)}else for(n=0;n<c;n++)for(q=0;q<b;q++)r=4*(n*b+q),l.set(q,n,g.red*a[r]+g.green*a[r+1]+g.blue*a[r+2]);g=Math.ceil(b/8);n=Math.ceil(c/8);q=g*n;if(h){var u=new Uint8ClampedArray(a.buffer,m,q);m+=q}u=new A(g,n,u);for(q=0;q<n;q++)for(r=0;r<g;r++){var p=Infinity,t=0;for(var v=0;8>v;v++)for(let w=0;8>w;w++){let aa=l.get(8*r+w,8*q+v);p=Math.min(p,aa);t=Math.max(t,aa)}v=(p+t)/2;v=Math.min(255,1.11*v);24>=t-p&&(v=p/2,0<q&&0<r&&(t=(u.get(r,q-1)+2*u.get(r-1,q)+u.get(r-1,q-1))/4,p<t&&(v=t)));
731
+ u.set(r,q,v)}h?(q=new Uint8ClampedArray(a.buffer,m,k),m+=k,q=new x(q,b)):q=x.createEmpty(b,c);r=null;f&&(h?(a=new Uint8ClampedArray(a.buffer,m,k),r=new x(a,b)):r=x.createEmpty(b,c));for(b=0;b<n;b++)for(a=0;a<g;a++){c=g-3;c=2>a?2:a>c?c:a;h=n-3;h=2>b?2:b>h?h:b;k=0;for(m=-2;2>=m;m++)for(p=-2;2>=p;p++)k+=u.get(c+m,h+p);c=k/25;for(h=0;8>h;h++)for(k=0;8>k;k++)m=8*a+h,p=8*b+k,t=l.get(m,p),q.set(m,p,t<=c),f&&r.set(m,p,!(t<=c))}f=f?{binarized:q,inverted:r}:{binarized:q};let {binarized:z,inverted:y}=f;(f=V(d?
732
+ y:z))||"attemptBoth"!==e.inversionAttempts&&"invertFirst"!==e.inversionAttempts||(f=V(d?z:y));return f}X.default=X;let Y="dontInvert",Z={red:77,green:150,blue:29,useIntegerApproximation:!0};
733
+ self.onmessage=a=>{let b=a.data.id,c=a.data.data;switch(a.data.type){case "decode":(a=X(c.data,c.width,c.height,{inversionAttempts:Y,greyScaleWeights:Z}))?self.postMessage({id:b,type:"qrResult",data:a.data,cornerPoints:[a.location.topLeftCorner,a.location.topRightCorner,a.location.bottomRightCorner,a.location.bottomLeftCorner]}):self.postMessage({id:b,type:"qrResult",data:null});break;case "grayscaleWeights":Z.red=c.red;Z.green=c.green;Z.blue=c.blue;Z.useIntegerApproximation=c.useIntegerApproximation;
734
+ break;case "inversionMode":switch(c){case "original":Y="dontInvert";break;case "invert":Y="onlyInvert";break;case "both":Y="attemptBoth";break;default:throw Error("Invalid inversion mode");}break;case "close":self.close()}}
735
+ `]),{type:`application/javascript`}))})),pO=c({default:()=>mO}),mO,hO=o((()=>{Kh(),mO=class e{constructor(t,n,r,i,a){this._legacyCanvasSize=e.DEFAULT_CANVAS_SIZE,this._preferredCamera=`environment`,this._maxScansPerSecond=25,this._lastScanTimestamp=-1,this._destroyed=this._flashOn=this._paused=this._active=!1,this.$video=t,this.$canvas=document.createElement(`canvas`),r&&typeof r==`object`?this._onDecode=n:(console.warn(r||i||a?`You're using a deprecated version of the QrScanner constructor which will be removed in the future`:`Note that the type of the scan result passed to onDecode will change in the future. To already switch to the new api today, you can pass returnDetailedScanResult: true.`),this._legacyOnDecode=n),n=typeof r==`object`?r:{},this._onDecodeError=n.onDecodeError||(typeof r==`function`?r:this._onDecodeError),this._calculateScanRegion=n.calculateScanRegion||(typeof i==`function`?i:this._calculateScanRegion),this._preferredCamera=n.preferredCamera||a||this._preferredCamera,this._legacyCanvasSize=typeof r==`number`?r:typeof i==`number`?i:this._legacyCanvasSize,this._maxScansPerSecond=n.maxScansPerSecond||this._maxScansPerSecond,this._onPlay=this._onPlay.bind(this),this._onLoadedMetaData=this._onLoadedMetaData.bind(this),this._onVisibilityChange=this._onVisibilityChange.bind(this),this._updateOverlay=this._updateOverlay.bind(this),t.disablePictureInPicture=!0,t.playsInline=!0,t.muted=!0;let o=!1;if(t.hidden&&(t.hidden=!1,o=!0),document.body.contains(t)||(document.body.appendChild(t),o=!0),r=t.parentElement,n.highlightScanRegion||n.highlightCodeOutline){if(i=!!n.overlay,this.$overlay=n.overlay||document.createElement(`div`),a=this.$overlay.style,a.position=`absolute`,a.display=`none`,a.pointerEvents=`none`,this.$overlay.classList.add(`scan-region-highlight`),!i&&n.highlightScanRegion){this.$overlay.innerHTML=`<svg class="scan-region-highlight-svg" viewBox="0 0 238 238" preserveAspectRatio="none" style="position:absolute;width:100%;height:100%;left:0;top:0;fill:none;stroke:#e9b213;stroke-width:4;stroke-linecap:round;stroke-linejoin:round"><path d="M31 2H10a8 8 0 0 0-8 8v21M207 2h21a8 8 0 0 1 8 8v21m0 176v21a8 8 0 0 1-8 8h-21m-176 0H10a8 8 0 0 1-8-8v-21"/></svg>`;try{this.$overlay.firstElementChild.animate({transform:[`scale(.98)`,`scale(1.01)`]},{duration:400,iterations:1/0,direction:`alternate`,easing:`ease-in-out`})}catch{}r.insertBefore(this.$overlay,this.$video.nextSibling)}n.highlightCodeOutline&&(this.$overlay.insertAdjacentHTML(`beforeend`,`<svg class="code-outline-highlight" preserveAspectRatio="none" style="display:none;width:100%;height:100%;fill:none;stroke:#e9b213;stroke-width:5;stroke-dasharray:25;stroke-linecap:round;stroke-linejoin:round"><polygon/></svg>`),this.$codeOutlineHighlight=this.$overlay.lastElementChild)}this._scanRegion=this._calculateScanRegion(t),requestAnimationFrame(()=>{let e=window.getComputedStyle(t);e.display===`none`&&(t.style.setProperty(`display`,`block`,`important`),o=!0),e.visibility!==`visible`&&(t.style.setProperty(`visibility`,`visible`,`important`),o=!0),o&&(console.warn(`QrScanner has overwritten the video hiding style to avoid Safari stopping the playback.`),t.style.opacity=`0`,t.style.width=`0`,t.style.height=`0`,this.$overlay&&this.$overlay.parentElement&&this.$overlay.parentElement.removeChild(this.$overlay),delete this.$overlay,delete this.$codeOutlineHighlight),this.$overlay&&this._updateOverlay()}),t.addEventListener(`play`,this._onPlay),t.addEventListener(`loadedmetadata`,this._onLoadedMetaData),document.addEventListener(`visibilitychange`,this._onVisibilityChange),window.addEventListener(`resize`,this._updateOverlay),this._qrEnginePromise=e.createQrEngine()}static set WORKER_PATH(e){console.warn(`Setting QrScanner.WORKER_PATH is not required and not supported anymore. Have a look at the README for new setup instructions.`)}static async hasCamera(){try{return!!(await e.listCameras(!1)).length}catch{return!1}}static async listCameras(t=!1){if(!navigator.mediaDevices)return[];let n=async()=>(await navigator.mediaDevices.enumerateDevices()).filter(e=>e.kind===`videoinput`),r;try{t&&(await n()).every(e=>!e.label)&&(r=await navigator.mediaDevices.getUserMedia({audio:!1,video:!0}))}catch{}try{return(await n()).map((e,t)=>({id:e.deviceId,label:e.label||(t===0?`Default Camera`:`Camera ${t+1}`)}))}finally{r&&(console.warn(`Call listCameras after successfully starting a QR scanner to avoid creating a temporary video stream`),e._stopVideoStream(r))}}async hasFlash(){let t;try{if(this.$video.srcObject){if(!(this.$video.srcObject instanceof MediaStream))return!1;t=this.$video.srcObject}else t=(await this._getCameraStream()).stream;return`torch`in t.getVideoTracks()[0].getSettings()}catch{return!1}finally{t&&t!==this.$video.srcObject&&(console.warn(`Call hasFlash after successfully starting the scanner to avoid creating a temporary video stream`),e._stopVideoStream(t))}}isFlashOn(){return this._flashOn}async toggleFlash(){this._flashOn?await this.turnFlashOff():await this.turnFlashOn()}async turnFlashOn(){if(!this._flashOn&&!this._destroyed&&(this._flashOn=!0,this._active&&!this._paused))try{if(!await this.hasFlash())throw`No flash available`;await this.$video.srcObject.getVideoTracks()[0].applyConstraints({advanced:[{torch:!0}]})}catch(e){throw this._flashOn=!1,e}}async turnFlashOff(){this._flashOn&&(this._flashOn=!1,await this._restartVideoStream())}destroy(){this.$video.removeEventListener(`loadedmetadata`,this._onLoadedMetaData),this.$video.removeEventListener(`play`,this._onPlay),document.removeEventListener(`visibilitychange`,this._onVisibilityChange),window.removeEventListener(`resize`,this._updateOverlay),this._destroyed=!0,this._flashOn=!1,this.stop(),e._postWorkerMessage(this._qrEnginePromise,`close`)}async start(){if(this._destroyed)throw Error(`The QR scanner can not be started as it had been destroyed.`);if((!this._active||this._paused)&&(window.location.protocol!==`https:`&&console.warn(`The camera stream is only accessible if the page is transferred via https.`),this._active=!0,!document.hidden)){if(this._paused=!1,this.$video.srcObject)await this.$video.play();else try{let{stream:t,facingMode:n}=await this._getCameraStream();!this._active||this._paused?e._stopVideoStream(t):(this._setVideoMirror(n),this.$video.srcObject=t,await this.$video.play(),this._flashOn&&(this._flashOn=!1,this.turnFlashOn().catch(()=>{})))}catch(e){if(!this._paused)throw this._active=!1,e}}}stop(){this.pause(),this._active=!1}async pause(t=!1){if(this._paused=!0,!this._active)return!0;this.$video.pause(),this.$overlay&&(this.$overlay.style.display=`none`);let n=()=>{this.$video.srcObject instanceof MediaStream&&(e._stopVideoStream(this.$video.srcObject),this.$video.srcObject=null)};return t?(n(),!0):(await new Promise(e=>setTimeout(e,300)),this._paused?(n(),!0):!1)}async setCamera(e){e!==this._preferredCamera&&(this._preferredCamera=e,await this._restartVideoStream())}static async scanImage(t,n,r,i,a=!1,o=!1){let s,c=!1;n&&(`scanRegion`in n||`qrEngine`in n||`canvas`in n||`disallowCanvasResizing`in n||`alsoTryWithoutScanRegion`in n||`returnDetailedScanResult`in n)?(s=n.scanRegion,r=n.qrEngine,i=n.canvas,a=n.disallowCanvasResizing||!1,o=n.alsoTryWithoutScanRegion||!1,c=!0):console.warn(n||r||i||a||o?`You're using a deprecated api for scanImage which will be removed in the future.`:`Note that the return type of scanImage will change in the future. To already switch to the new api today, you can pass returnDetailedScanResult: true.`),n=!!r;try{let l,u;[r,l]=await Promise.all([r||e.createQrEngine(),e._loadImage(t)]),[i,u]=e._drawToCanvas(l,s,i,a);let d;if(r instanceof Worker){let t=r;n||e._postWorkerMessageSync(t,`inversionMode`,`both`),d=await new Promise((n,r)=>{let a,o,c,l=-1;o=i=>{i.data.id===l&&(t.removeEventListener(`message`,o),t.removeEventListener(`error`,c),clearTimeout(a),i.data.data===null?r(e.NO_QR_CODE_FOUND):n({data:i.data.data,cornerPoints:e._convertPoints(i.data.cornerPoints,s)}))},c=e=>{t.removeEventListener(`message`,o),t.removeEventListener(`error`,c),clearTimeout(a),r(`Scanner error: `+(e?e.message||e:`Unknown Error`))},t.addEventListener(`message`,o),t.addEventListener(`error`,c),a=setTimeout(()=>c(`timeout`),1e4);let d=u.getImageData(0,0,i.width,i.height);l=e._postWorkerMessageSync(t,`decode`,d,[d.data.buffer])})}else d=await Promise.race([new Promise((e,t)=>window.setTimeout(()=>t(`Scanner error: timeout`),1e4)),(async()=>{try{var[n]=await r.detect(i);if(!n)throw e.NO_QR_CODE_FOUND;return{data:n.rawValue,cornerPoints:e._convertPoints(n.cornerPoints,s)}}catch(r){if(n=r.message||r,/not implemented|service unavailable/.test(n))return e._disableBarcodeDetector=!0,e.scanImage(t,{scanRegion:s,canvas:i,disallowCanvasResizing:a,alsoTryWithoutScanRegion:o});throw`Scanner error: ${n}`}})()]);return c?d:d.data}catch(n){if(!s||!o)throw n;let l=await e.scanImage(t,{qrEngine:r,canvas:i,disallowCanvasResizing:a});return c?l:l.data}finally{n||e._postWorkerMessage(r,`close`)}}setGrayscaleWeights(t,n,r,i=!0){e._postWorkerMessage(this._qrEnginePromise,`grayscaleWeights`,{red:t,green:n,blue:r,useIntegerApproximation:i})}setInversionMode(t){e._postWorkerMessage(this._qrEnginePromise,`inversionMode`,t)}static async createQrEngine(t){if(t&&console.warn(`Specifying a worker path is not required and not supported anymore.`),t=()=>Gh(()=>Promise.resolve().then(()=>(fO(),uO)).then(e=>e.createWorker()),void 0,import.meta.url),!(!e._disableBarcodeDetector&&`BarcodeDetector`in window&&BarcodeDetector.getSupportedFormats&&(await BarcodeDetector.getSupportedFormats()).includes(`qr_code`)))return t();let n=navigator.userAgentData;return n&&n.brands.some(({brand:e})=>/Chromium/i.test(e))&&/mac ?OS/i.test(n.platform)&&await n.getHighEntropyValues([`architecture`,`platformVersion`]).then(({architecture:e,platformVersion:t})=>/arm/i.test(e||`arm`)&&13<=parseInt(t||`13`)).catch(()=>!0)?t():new BarcodeDetector({formats:[`qr_code`]})}_onPlay(){this._scanRegion=this._calculateScanRegion(this.$video),this._updateOverlay(),this.$overlay&&(this.$overlay.style.display=``),this._scanFrame()}_onLoadedMetaData(){this._scanRegion=this._calculateScanRegion(this.$video),this._updateOverlay()}_onVisibilityChange(){document.hidden?this.pause():this._active&&this.start()}_calculateScanRegion(e){let t=Math.round(2/3*Math.min(e.videoWidth,e.videoHeight));return{x:Math.round((e.videoWidth-t)/2),y:Math.round((e.videoHeight-t)/2),width:t,height:t,downScaledWidth:this._legacyCanvasSize,downScaledHeight:this._legacyCanvasSize}}_updateOverlay(){requestAnimationFrame(()=>{if(this.$overlay){var e=this.$video,t=e.videoWidth,n=e.videoHeight,r=e.offsetWidth,i=e.offsetHeight,a=e.offsetLeft,o=e.offsetTop,s=window.getComputedStyle(e),c=s.objectFit,l=t/n,u=r/i;switch(c){case`none`:var d=t,f=n;break;case`fill`:d=r,f=i;break;default:(c===`cover`?l>u:l<u)?(f=i,d=f*l):(d=r,f=d/l),c===`scale-down`&&(d=Math.min(d,t),f=Math.min(f,n))}var[p,m]=s.objectPosition.split(` `).map((e,t)=>{let n=parseFloat(e);return e.endsWith(`%`)?(t?i-f:r-d)*n/100:n});s=this._scanRegion.width||t,u=this._scanRegion.height||n,c=this._scanRegion.x||0;var h=this._scanRegion.y||0;l=this.$overlay.style,l.width=`${s/t*d}px`,l.height=`${u/n*f}px`,l.top=`${o+m+h/n*f}px`,n=/scaleX\(-1\)/.test(e.style.transform),l.left=`${a+(n?r-p-d:p)+(n?t-c-s:c)/t*d}px`,l.transform=e.style.transform}})}static _convertPoints(e,t){if(!t)return e;let n=t.x||0,r=t.y||0,i=t.width&&t.downScaledWidth?t.width/t.downScaledWidth:1;t=t.height&&t.downScaledHeight?t.height/t.downScaledHeight:1;for(let a of e)a.x=a.x*i+n,a.y=a.y*t+r;return e}_scanFrame(){!this._active||this.$video.paused||this.$video.ended||(`requestVideoFrameCallback`in this.$video?this.$video.requestVideoFrameCallback.bind(this.$video):requestAnimationFrame)(async()=>{if(!(1>=this.$video.readyState)){var t=Date.now()-this._lastScanTimestamp,n=1e3/this._maxScansPerSecond;t<n&&await new Promise(e=>setTimeout(e,n-t)),this._lastScanTimestamp=Date.now();try{var r=await e.scanImage(this.$video,{scanRegion:this._scanRegion,qrEngine:this._qrEnginePromise,canvas:this.$canvas})}catch(e){if(!this._active)return;this._onDecodeError(e)}!e._disableBarcodeDetector||await this._qrEnginePromise instanceof Worker||(this._qrEnginePromise=e.createQrEngine()),r?(this._onDecode?this._onDecode(r):this._legacyOnDecode&&this._legacyOnDecode(r.data),this.$codeOutlineHighlight&&(clearTimeout(this._codeOutlineHighlightRemovalTimeout),this._codeOutlineHighlightRemovalTimeout=void 0,this.$codeOutlineHighlight.setAttribute(`viewBox`,`${this._scanRegion.x||0} ${this._scanRegion.y||0} ${this._scanRegion.width||this.$video.videoWidth} ${this._scanRegion.height||this.$video.videoHeight}`),this.$codeOutlineHighlight.firstElementChild.setAttribute(`points`,r.cornerPoints.map(({x:e,y:t})=>`${e},${t}`).join(` `)),this.$codeOutlineHighlight.style.display=``)):this.$codeOutlineHighlight&&!this._codeOutlineHighlightRemovalTimeout&&(this._codeOutlineHighlightRemovalTimeout=setTimeout(()=>this.$codeOutlineHighlight.style.display=`none`,100))}this._scanFrame()})}_onDecodeError(t){t!==e.NO_QR_CODE_FOUND&&console.log(t)}async _getCameraStream(){if(!navigator.mediaDevices)throw`Camera not found.`;let e=/^(environment|user)$/.test(this._preferredCamera)?`facingMode`:`deviceId`,t=[{width:{min:1024}},{width:{min:768}},{}],n=t.map(t=>Object.assign({},t,{[e]:{exact:this._preferredCamera}}));for(let e of[...n,...t])try{let t=await navigator.mediaDevices.getUserMedia({video:e,audio:!1});return{stream:t,facingMode:this._getFacingMode(t)||(e.facingMode?this._preferredCamera:this._preferredCamera===`environment`?`user`:`environment`)}}catch{}throw`Camera not found.`}async _restartVideoStream(){let e=this._paused;await this.pause(!0)&&!e&&this._active&&await this.start()}static _stopVideoStream(e){for(let t of e.getTracks())t.stop(),e.removeTrack(t)}_setVideoMirror(e){this.$video.style.transform=`scaleX(`+(e===`user`?-1:1)+`)`}_getFacingMode(e){return(e=e.getVideoTracks()[0])?/rear|back|environment/i.test(e.label)?`environment`:/front|user|face/i.test(e.label)?`user`:null:null}static _drawToCanvas(e,t,n,r=!1){n||=document.createElement(`canvas`);let i=t&&t.x?t.x:0,a=t&&t.y?t.y:0,o=t&&t.width?t.width:e.videoWidth||e.width,s=t&&t.height?t.height:e.videoHeight||e.height;return r||(r=t&&t.downScaledWidth?t.downScaledWidth:o,t=t&&t.downScaledHeight?t.downScaledHeight:s,n.width!==r&&(n.width=r),n.height!==t&&(n.height=t)),t=n.getContext(`2d`,{alpha:!1}),t.imageSmoothingEnabled=!1,t.drawImage(e,i,a,o,s,0,0,n.width,n.height),[n,t]}static async _loadImage(t){if(t instanceof Image)return await e._awaitImageLoad(t),t;if(t instanceof HTMLVideoElement||t instanceof HTMLCanvasElement||t instanceof SVGImageElement||`OffscreenCanvas`in window&&t instanceof OffscreenCanvas||`ImageBitmap`in window&&t instanceof ImageBitmap)return t;if(t instanceof File||t instanceof Blob||t instanceof URL||typeof t==`string`){let n=new Image;n.src=t instanceof File||t instanceof Blob?URL.createObjectURL(t):t.toString();try{return await e._awaitImageLoad(n),n}finally{(t instanceof File||t instanceof Blob)&&URL.revokeObjectURL(n.src)}}else throw`Unsupported image type.`}static async _awaitImageLoad(e){e.complete&&e.naturalWidth!==0||await new Promise((t,n)=>{let r=i=>{e.removeEventListener(`load`,r),e.removeEventListener(`error`,r),i instanceof ErrorEvent?n(`Image load error`):t()};e.addEventListener(`load`,r),e.addEventListener(`error`,r)})}static async _postWorkerMessage(t,n,r,i){return e._postWorkerMessageSync(await t,n,r,i)}static _postWorkerMessageSync(t,n,r,i){if(!(t instanceof Worker))return-1;let a=e._workerMessageId++;return t.postMessage({id:a,type:n,data:r},i),a}},mO.DEFAULT_CANVAS_SIZE=400,mO.NO_QR_CODE_FOUND=`No QR code found`,mO._disableBarcodeDetector=!1,mO._workerMessageId=0}));Kh();var gO=null;function _O(){return gO??=(async()=>{let e=window.BarcodeDetector;if(e)try{let t=await e.getSupportedFormats();if(t.includes(`qr_code`)){let n=new e({formats:t});return{qrOnly:!1,detect:async e=>(await n.detect(e))[0]?.rawValue||null}}}catch{}let{default:t}=await Gh(async()=>{let{default:e}=await Promise.resolve().then(()=>(hO(),pO));return{default:e}},void 0,import.meta.url),n=t.createQrEngine();return{qrOnly:!0,detect:async e=>{try{return(await t.scanImage(e,{qrEngine:n,returnDetailedScanResult:!0})).data||null}catch{return null}}}})(),gO}function vO({open:e,onClose:t,onResult:n}){let[r,i]=(0,y.useState)(`environment`),[a,o]=(0,y.useState)(!1),[s,c]=(0,y.useState)(!1),l=(0,y.useRef)(null),u=XD(e,r),d=(0,y.useRef)(n);d.current=n;let f=(0,y.useRef)(t);f.current=t,(0,y.useEffect)(()=>{e&&(c(!1),_O().then(e=>o(e.qrOnly)))},[e]),(0,y.useEffect)(()=>{if(!e||!u.stream)return;let t=!1,n,r=async()=>{let e=u.video.current;if(!t&&e&&e.readyState>=2&&e.videoWidth){let n=await(await _O()).detect(e).catch(()=>null);if(n&&!t){navigator.vibrate?.(60),d.current(n),f.current();return}}t||(n=setTimeout(r,200))};return r(),()=>{t=!0,clearTimeout(n)}},[e,u.stream,u.video]);let p=async e=>{if(!e)return;c(!1);let r=await createImageBitmap(e).catch(()=>null),i=r?await(await _O()).detect(r).catch(()=>null):null;i?(n(i),t()):c(!0)};return(0,Z.jsxs)(ZD,{open:e,onClose:t,label:Q(`scan.title`),children:[(0,Z.jsx)($D,{title:Q(`scan.title`),onClose:t,camera:u,onFlip:()=>i(e=>e===`environment`?`user`:`environment`)}),(0,Z.jsx)(eO,{camera:u,asking:Q(`scan.asking`),actions:(0,Z.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,Z.jsxs)(aO,{onClick:()=>l.current?.click(),children:[(0,Z.jsx)(H_,{className:`size-4`}),` `,Q(`scan.fromPhoto`)]}),(0,Z.jsx)(aO,{quiet:!0,onClick:t,children:Q(`scan.typeInstead`)})]}),children:(0,Z.jsx)(`div`,{className:`pointer-events-none absolute inset-0 flex items-center justify-center`,children:(0,Z.jsx)(`div`,{className:`aspect-square w-[min(68%,320px)] rounded-3xl border-2 border-white/90 shadow-[0_0_0_100vmax_rgb(0_0_0/0.35)]`})})}),(0,Z.jsxs)(`div`,{className:`safe-bottom flex flex-col items-center gap-3 px-5 pt-3 text-center`,children:[(0,Z.jsx)(`p`,{className:`text-[13px] text-white/75 leading-snug`,children:Q(s?`scan.miss`:a?`scan.hintQr`:`scan.hint`)}),u.stream?(0,Z.jsxs)(aO,{quiet:!0,onClick:()=>l.current?.click(),children:[(0,Z.jsx)(H_,{className:`size-4`}),` `,Q(`scan.fromPhoto`)]}):null]}),(0,Z.jsx)(`input`,{ref:l,type:`file`,hidden:!0,accept:`image/*`,onChange:e=>{p(e.target.files?.[0]),e.target.value=``}})]})}var yO=`#1d1a17`,bO={width:1200,height:480};function xO(e,t,n,r,i){e.lineCap=`round`,e.lineJoin=`round`,e.strokeStyle=yO,e.fillStyle=yO,e.lineWidth=i;for(let a of t){if(a.length===1){e.beginPath(),e.arc(a[0].x*n,a[0].y*r,i/2,0,Math.PI*2),e.fill();continue}e.beginPath(),e.moveTo(a[0].x*n,a[0].y*r);for(let t=1;t<a.length-1;t++){let i=a[t],o=a[t+1];e.quadraticCurveTo(i.x*n,i.y*r,(i.x+o.x)/2*n,(i.y+o.y)/2*r)}let t=a[a.length-1];e.lineTo(t.x*n,t.y*r),e.stroke()}}function SO({strokes:e,onStrokes:t}){let n=(0,y.useRef)(null),r=(0,y.useRef)(null),i=(0,y.useRef)(e);i.current=e;let a=()=>{let e=n.current,t=e?.getContext(`2d`);if(!e||!t)return;let a=window.devicePixelRatio||1,o=Math.round(e.clientWidth*a),s=Math.round(e.clientHeight*a);(e.width!==o||e.height!==s)&&(e.width=o,e.height=s),t.clearRect(0,0,o,s),xO(t,r.current?[...i.current,r.current]:i.current,o,s,2.4*a)};(0,y.useEffect)(()=>{a();let e=n.current;if(!e)return;let t=new ResizeObserver(a);return t.observe(e),()=>t.disconnect()},[e]);let o=e=>{let t=e.currentTarget.getBoundingClientRect();return{x:Math.min(1,Math.max(0,(e.clientX-t.left)/t.width)),y:Math.min(1,Math.max(0,(e.clientY-t.top)/t.height))}};return(0,Z.jsxs)(`div`,{className:`relative overflow-hidden rounded-xl bg-white ring-1 ring-input`,children:[(0,Z.jsx)(`canvas`,{ref:n,"aria-label":Q(`sign.pad`),className:`block aspect-[5/2] w-full cursor-crosshair touch-none select-none`,onPointerDown:e=>{e.currentTarget.setPointerCapture(e.pointerId),r.current=[o(e)],a()},onPointerMove:e=>{r.current&&(r.current.push(o(e)),a())},onPointerUp:()=>{if(r.current){let e=r.current;r.current=null,t([...i.current,e])}},onPointerCancel:()=>{r.current=null,a()}}),(0,Z.jsx)(`div`,{className:`pointer-events-none absolute inset-x-6 bottom-[22%] border-[#1d1a17]/25 border-b`}),e.length?null:(0,Z.jsx)(`div`,{className:`pointer-events-none absolute inset-0 flex items-center justify-center text-[#1d1a17]/40 text-[14px]`,children:Q(`sign.hint`)})]})}async function CO(e){let t=document.createElement(`canvas`);t.width=bO.width,t.height=bO.height;let n=t.getContext(`2d`);if(!n)return null;xO(n,e,bO.width,bO.height,7);let r=await new Promise(e=>t.toBlob(e,`image/png`));return r?new File([r],`unterschrift.png`,{type:`image/png`}):null}function wO({label:e,value:t,runId:n,onChange:r}){let[i,a]=(0,y.useState)(!1),[o,s]=(0,y.useState)([]),[c,l]=(0,y.useState)(!1),[u,d]=(0,y.useState)(null),f=typeof t==`string`&&t?t:null,p=async()=>{l(!0),d(null);try{let e=await CO(o);if(!e)return;r((await FE.upload(`/api/runs/${n}/uploads`,e)).id),a(!1)}catch(e){d(e.message)}finally{l(!1)}};return(0,Z.jsxs)(`div`,{children:[f?(0,Z.jsxs)(`div`,{className:`flex items-center gap-3 rounded-xl bg-card p-2 ring-1 ring-input`,children:[(0,Z.jsx)(`button`,{type:`button`,onClick:()=>{s([]),a(!0)},className:`min-w-0 flex-1 rounded-lg bg-white px-3`,"aria-label":Q(`sign.again`),children:(0,Z.jsx)(`img`,{src:AS(`/api/runs/${n}/assets/${f}`),alt:e,className:`mx-auto h-20 object-contain`})}),(0,Z.jsx)(Db,{label:Q(`sign.remove`),onClick:()=>r(void 0),children:(0,Z.jsx)(iy,{className:`size-4`})})]}):(0,Z.jsxs)(`button`,{type:`button`,onClick:()=>{s([]),a(!0)},className:`flex w-full flex-col items-center justify-center gap-2 rounded-xl border border-input border-dashed bg-card px-4 py-7 text-[14px] text-ink-3 transition hover:border-ember hover:text-ink`,children:[(0,Z.jsx)(gv,{className:`size-6`}),Q(`sign.open`)]}),(0,Z.jsxs)(Bb,{open:i,onClose:()=>a(!1),title:e,wide:!0,children:[(0,Z.jsx)(SO,{strokes:o,onStrokes:s}),u?(0,Z.jsx)(`p`,{className:`mt-2 text-[13px] text-rose`,children:u}):null,(0,Z.jsxs)(`div`,{className:`mt-5 flex items-center justify-between gap-3`,children:[(0,Z.jsxs)(Eb,{variant:`ghost`,disabled:!o.length||c,onClick:()=>s([]),children:[(0,Z.jsx)(b_,{className:`size-4`}),` `,Q(`sign.clear`)]}),(0,Z.jsx)(Eb,{busy:c,disabled:!o.length,onClick:()=>void p(),children:Q(`sign.accept`)})]})]})]})}function TO({runId:e,connectionId:t,connector:n,onCancel:r}){let[i,a]=(0,y.useState)({}),[o,s]=(0,y.useState)(!1),[c,l]=(0,y.useState)(null),u=async()=>{s(!0),l(null);try{await FE.post(`/api/runs/${e}/connections/${t}/credentials/${n.id}`,{values:i})}catch(e){l(e.message)}finally{s(!1)}};return(0,Z.jsxs)(`div`,{className:`flex flex-col gap-3 rounded-xl bg-card p-4 ring-1 ring-input`,children:[(n.fields??[]).map(e=>(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(Ib,{children:e.label}),(0,Z.jsx)(Ab,{type:e.secret?`password`:`text`,autoComplete:`off`,value:i[e.key]??``,placeholder:e.placeholder,onChange:t=>a(n=>({...n,[e.key]:t.target.value})),onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),u())}})]},e.key)),n.hint?(0,Z.jsx)(`p`,{className:`text-[13px] text-ink-3`,children:n.hint}):null,c?(0,Z.jsx)(`p`,{className:`text-[13px] text-rose`,children:c}):null,(0,Z.jsxs)(`div`,{className:`flex justify-end gap-2`,children:[(0,Z.jsx)(Eb,{variant:`ghost`,size:`sm`,onClick:r,children:Q(`common.cancel`)}),(0,Z.jsx)(Eb,{size:`sm`,busy:o,onClick:()=>void u(),children:Q(`connect.go`)})]})]})}function EO({runId:e,connection:t}){let[n,r]=(0,y.useState)(null),[i,a]=(0,y.useState)(null),[o,s]=(0,y.useState)(null);if(!t)return null;if(t.account){let n=t.connectors.find(e=>e.id===t.account?.connector)?.name??``;return(0,Z.jsxs)(`div`,{className:`flex items-center gap-3 rounded-xl bg-card p-3 ring-1 ring-input`,children:[(0,Z.jsx)(`div`,{className:`flex size-10 items-center justify-center rounded-full bg-moss-tint text-moss`,children:(0,Z.jsx)(c_,{className:`size-5`})}),(0,Z.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,Z.jsx)(`div`,{className:`truncate font-medium text-[15px]`,children:t.account.label}),(0,Z.jsx)(`div`,{className:`text-[13px] text-ink-3`,children:Q(`connect.connected`,{name:n})})]}),(0,Z.jsx)(Db,{label:Q(`connect.disconnect`),onClick:()=>void FE.del(`/api/runs/${e}/connections/${t.id}`),children:(0,Z.jsx)(Xv,{className:`size-4`})})]})}let c=async n=>{s(null),a(null);let r=window.open(`about:blank`,`wizard-connect`,`width=540,height=700`);try{let{url:i}=await FE.post(`/api/runs/${e}/connections/${t.id}/oauth/${n.id}`);r?r.location.replace(i):a(i)}catch(e){r?.close(),s(e.message)}},l=t.connectors.find(e=>e.id===n);return t.connectors.length?(0,Z.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,Z.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:t.connectors.map(e=>(0,Z.jsxs)(`button`,{type:`button`,onClick:()=>e.auth===`oauth2`?void c(e):r(n===e.id?null:e.id),className:$(`inline-flex h-11 items-center gap-2 rounded-full px-4 font-medium text-[14px] ring-1 transition`,n===e.id?`bg-ember-veil text-ink ring-ember`:`bg-card text-ink-2 ring-input hover:text-ink hover:ring-ember`),children:[(0,Z.jsx)(J_,{className:`size-4`}),` `,e.name]},e.id))}),l?(0,Z.jsx)(TO,{runId:e,connectionId:t.id,connector:l,onCancel:()=>r(null)}):null,i?(0,Z.jsx)(`a`,{href:i,target:`_blank`,rel:`noreferrer`,className:`text-[14px] text-ember underline`,children:Q(`connect.openLink`)}):null,o?(0,Z.jsx)(`p`,{className:`text-[13px] text-rose`,children:o}):null]}):(0,Z.jsx)(`p`,{className:`text-[14px] text-ink-3`,children:Q(`connect.none`)})}function DO(e){return e==null?``:Array.isArray(e)?e.join(`, `):String(e)}function OO(e,t){if(t.trim()===``)return null;if(e.type===`number`){let e=Number(t.replace(/\s/g,``).replace(`,`,`.`));return Number.isFinite(e)?e:t}return e.type===`boolean`?t===`true`:t}function kO({column:e,value:t,boxed:n,onCommit:r}){let[i,a]=(0,y.useState)(DO(t));(0,y.useEffect)(()=>a(DO(t)),[t]);let o=$(`w-full min-w-0 rounded-md border border-transparent px-2 text-[13px] outline-none focus:border-ember focus:bg-card`,n?`h-11 bg-paper-2`:`h-9 bg-transparent hover:bg-paper-2 coarse:h-11`);return e.type===`boolean`?(0,Z.jsx)(`label`,{className:`flex size-9 cursor-pointer items-center justify-center coarse:size-11`,children:(0,Z.jsx)(`input`,{type:`checkbox`,"aria-label":e.name,checked:t===!0,onChange:e=>r(e.target.checked),className:`size-4 accent-[var(--ember)] coarse:size-6`})}):e.type===`select`&&!e.format.multiple&&!e.format.allowCustom?(0,Z.jsxs)(`select`,{value:i,onChange:e=>r(e.target.value||null),className:o,children:[(0,Z.jsx)(`option`,{value:``}),e.format.options.map(e=>(0,Z.jsx)(`option`,{value:e.id,children:e.label},e.id))]}):(0,Z.jsx)(`input`,{"aria-label":e.name,type:e.type===`date`&&e.format.kind===`date`?`date`:`text`,inputMode:e.type===`number`?`decimal`:void 0,enterKeyHint:`done`,autoComplete:`off`,value:i,onChange:e=>a(e.target.value),onBlur:()=>{i!==DO(t)&&r(OO(e,i))},onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),e.target.blur())},className:$(o,e.type===`number`&&`text-right tabular-nums`)})}function AO({runId:e,list:t,editable:n}){let{def:r,rows:i}=t,[a,o]=(0,y.useState)(null),[s,c]=(0,y.useState)({}),l=`/api/runs/${e}/lists/${r.id}/rows`,u=async e=>{o(null);try{await e()}catch(e){o(e instanceof ME?e.message:String(e))}},d=()=>u(async()=>{await FE.post(l,{cells:s}),c({})}),f=Object.values(s).some(e=>e!=null&&e!==``);if(!i.length&&!n)return(0,Z.jsx)(`p`,{className:`text-[14px] text-ink-3`,children:Q(`list.empty`)});let p=(e,t)=>t===0||e.type===`text`&&e.format?.style===`multiline`,m=(e,t,n)=>void u(()=>FE.patch(`${l}/${e}`,{cells:{[t]:n}}));return(0,Z.jsxs)(`div`,{children:[(0,Z.jsxs)(`div`,{className:`flex flex-col gap-2 sm:hidden`,children:[i.map(e=>(0,Z.jsxs)(`div`,{className:`rounded-lg bg-paper p-2 ring-1 ring-border-soft`,children:[(0,Z.jsx)(`div`,{className:`grid grid-cols-2 gap-x-2 gap-y-1.5`,children:r.columns.map((t,r)=>(0,Z.jsxs)(`div`,{className:$(`min-w-0`,p(t,r)&&`col-span-2`),children:[(0,Z.jsx)(`div`,{className:`px-1 pb-0.5 text-[11px] text-ink-3`,children:t.name}),n?(0,Z.jsx)(kO,{boxed:!0,column:t,value:e.cells[t.id],onCommit:n=>m(e.id,t.id,n)}):(0,Z.jsx)(`div`,{className:$(`break-words px-1 text-[14px]`,t.type===`number`&&`tabular-nums`),children:fD(t,e.cells[t.id],db)||`—`})]},t.id))}),n?(0,Z.jsx)(`div`,{className:`mt-1 flex justify-end`,children:(0,Z.jsx)(Db,{label:Q(`list.delete`),onClick:()=>void u(()=>FE.del(`${l}/${e.id}`)),children:(0,Z.jsx)(Wv,{className:`size-4`})})}):null]},e.id)),n?(0,Z.jsxs)(`div`,{className:`rounded-lg border border-input border-dashed p-2`,children:[(0,Z.jsx)(`div`,{className:`grid grid-cols-2 gap-x-2 gap-y-1.5`,children:r.columns.map((e,t)=>(0,Z.jsxs)(`div`,{className:$(`min-w-0`,p(e,t)&&`col-span-2`),children:[(0,Z.jsx)(`div`,{className:`px-1 pb-0.5 text-[11px] text-ink-3`,children:e.name}),(0,Z.jsx)(kO,{boxed:!0,column:e,value:s[e.id],onCommit:t=>c(n=>({...n,[e.id]:t}))})]},e.id))}),(0,Z.jsx)(`div`,{className:`mt-2 flex justify-end`,children:(0,Z.jsxs)(Eb,{variant:`secondary`,size:`sm`,onClick:()=>f?void d():void 0,children:[(0,Z.jsx)(Sv,{className:`size-4`}),` `,Q(`run.addRow`)]})})]}):null]}),(0,Z.jsx)(`div`,{className:`hidden overflow-x-auto rounded-lg ring-1 ring-border-soft sm:block`,children:(0,Z.jsxs)(`table`,{className:`w-full text-[13px]`,children:[(0,Z.jsx)(`thead`,{className:`bg-paper-2 text-ink-2`,children:(0,Z.jsxs)(`tr`,{children:[r.columns.map(e=>(0,Z.jsx)(`th`,{className:`whitespace-nowrap px-3 py-2 text-left font-medium`,children:e.name},e.id)),n?(0,Z.jsx)(`th`,{className:`w-10`}):null]})}),(0,Z.jsxs)(`tbody`,{children:[i.map(e=>(0,Z.jsxs)(`tr`,{className:`border-border-soft border-t align-top`,children:[r.columns.map(t=>(0,Z.jsx)(`td`,{className:$(`min-w-[7.5rem]`,n?`px-1 py-0.5`:`px-3 py-2`),children:n?(0,Z.jsx)(kO,{column:t,value:e.cells[t.id],onCommit:n=>m(e.id,t.id,n)}):(0,Z.jsx)(`span`,{className:$(t.type===`number`&&`tabular-nums`),children:fD(t,e.cells[t.id],db)})},t.id)),n?(0,Z.jsx)(`td`,{className:`px-1 py-0.5`,children:(0,Z.jsx)(Db,{label:Q(`list.delete`),className:`size-9`,onClick:()=>void u(()=>FE.del(`${l}/${e.id}`)),children:(0,Z.jsx)(Wv,{className:`size-3.5`})})}):null]},e.id)),n?(0,Z.jsxs)(`tr`,{className:`border-border-soft border-t bg-paper`,children:[r.columns.map(e=>(0,Z.jsx)(`td`,{className:`px-1 py-0.5`,children:(0,Z.jsx)(kO,{column:e,value:s[e.id],onCommit:t=>c(n=>({...n,[e.id]:t}))})},e.id)),(0,Z.jsx)(`td`,{className:`px-1 py-0.5`,children:(0,Z.jsx)(Db,{label:Q(`run.addRow`),className:`size-9`,onClick:()=>f?void d():void 0,children:(0,Z.jsx)(Sv,{className:`size-4`})})})]}):null]})]})}),a?(0,Z.jsx)(`p`,{className:`mt-2 text-[13px] text-rose`,children:a}):null]})}function jO(e,t,n){return AS(`/api/runs/${e}/store/files/${t.split(`/`).map(encodeURIComponent).join(`/`)}${n?`?inline=1`:``}`)}var MO=[`bg-paper-3 text-ink-3`,`bg-moss-tint text-moss`,`bg-rose-tint text-rose`,`bg-ember-tint text-ember-strong`];function NO({runId:e,list:t}){let{def:n,rows:r}=t,i=n.columns.find(e=>e.id===n.check?.file),a=n.columns.find(e=>e.id===n.check?.status),o=a?.type===`select`?a.format.options:[],s=o[0]?.id,c=e=>a?String(e.cells[a.id]??s??``):``,l=e=>!a||c(e)===s,[u,d]=(0,y.useState)(()=>(r.find(l)??r[0])?.id??null),[f,p]=(0,y.useState)(!1),[m,h]=(0,y.useState)(null),g=`/api/runs/${e}/lists/${n.id}/rows`,_=r.find(e=>e.id===u)??r[0],v=f?r.filter(e=>l(e)||e.id===_?.id):r,b=r.filter(e=>!l(e)).length,x=n.columns.filter(e=>e!==i&&e!==a),S=x.filter(e=>e.id!==n.key),C=S.find(e=>e.type===`text`)??S[0],w=S.filter(e=>e!==C),T=async(e,t)=>{h(null);try{await FE.patch(`${g}/${e}`,{cells:t})}catch(e){h(e instanceof ME?e.message:String(e))}},E=e=>{let t=v.findIndex(e=>e.id===_?.id),n=v[Math.min(v.length-1,Math.max(0,t+e))];n&&d(n.id)},D=async e=>{if(!_||!a)return;let t=r.findIndex(e=>e.id===_.id),n=[...r.slice(t+1),...r.slice(0,t)].find(l);await T(_.id,{[a.id]:e}),n&&e!==s&&d(n.id)},ee=e=>{e.target.closest(`input, textarea, select`)||(e.key===`ArrowDown`||e.key===`ArrowUp`?(e.preventDefault(),E(e.key===`ArrowDown`?1:-1)):/^[1-9]$/.test(e.key)&&o[Number(e.key)]&&(e.preventDefault(),D(o[Number(e.key)].id)))};if(!r.length)return(0,Z.jsx)(`p`,{className:`text-[14px] text-ink-3`,children:Q(`list.empty`)});let O=i&&_?String(_.cells[i.id]??``).trim():``,k=O.split(`.`).pop()?.toLowerCase()??``,A=e=>MO[Math.min(Math.max(0,o.findIndex(t=>t.id===c(e))),3)];return(0,Z.jsxs)(`div`,{className:`grid gap-4 lg:grid-cols-[minmax(280px,360px)_minmax(0,1fr)]`,onKeyDown:ee,children:[(0,Z.jsxs)(`div`,{className:`flex min-h-0 flex-col`,children:[(0,Z.jsxs)(`div`,{className:`mb-2 flex items-center justify-between gap-2`,children:[(0,Z.jsx)(`span`,{className:`text-[13px] text-ink-3 tabular-nums`,children:Q(`check.progress`,{done:b,total:r.length})}),a?(0,Z.jsx)(`button`,{type:`button`,"aria-pressed":f,onClick:()=>p(e=>!e),className:$(`inline-flex h-8 items-center rounded-full px-3 text-[13px] ring-1 transition coarse:h-11`,f?`bg-ember-tint text-ink ring-ember`:`bg-card text-ink-2 ring-input hover:text-ink`),children:Q(`check.onlyOpen`)}):null]}),(0,Z.jsx)(`ul`,{className:`flex max-h-[38vh] flex-col gap-1.5 overflow-y-auto p-0.5 pr-1 lg:max-h-[calc(100vh-15rem)]`,children:v.map(e=>(0,Z.jsx)(`li`,{children:(0,Z.jsxs)(`button`,{type:`button`,onClick:()=>d(e.id),"aria-current":e.id===_?.id,className:$(`flex w-full items-center gap-3 rounded-lg px-3 py-2.5 text-left ring-1 transition`,e.id===_?.id?`bg-card shadow-soft ring-ember`:`bg-paper ring-border-soft hover:bg-card`),children:[(0,Z.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,Z.jsx)(`span`,{className:`block truncate font-medium text-[14px]`,children:C&&fD(C,e.cells[C.id],db)||`—`}),(0,Z.jsx)(`span`,{className:`block truncate text-[12px] text-ink-3 tabular-nums`,children:w.slice(0,2).map(t=>fD(t,e.cells[t.id],db)).filter(Boolean).join(` · `)})]}),a?(0,Z.jsx)(`span`,{className:$(`shrink-0 rounded-full px-2 py-0.5 font-medium text-[11px]`,A(e)),children:o.find(t=>t.id===c(e))?.label??c(e)}):null]})},e.id))})]}),_?(0,Z.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-3`,children:[o.length>1?(0,Z.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[o.slice(1).map((e,t)=>(0,Z.jsxs)(Eb,{size:`md`,variant:c(_)===e.id?`primary`:`secondary`,onClick:()=>void D(e.id),children:[c(_)===e.id?(0,Z.jsx)(c_,{className:`size-4`}):null,e.label,(0,Z.jsx)(`kbd`,{className:`ml-1 hidden rounded bg-black/10 px-1.5 text-[11px] lg:inline`,children:t+1})]},e.id)),c(_)===s?null:(0,Z.jsx)(Eb,{size:`md`,variant:`ghost`,onClick:()=>void D(s??``),children:Q(`check.reopen`)})]}):null,(0,Z.jsx)(`div`,{className:`overflow-hidden rounded-lg bg-paper-2 ring-1 ring-border-soft`,children:O?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-2 border-border-soft border-b bg-card px-3 py-2 text-[13px]`,children:[(0,Z.jsx)(O_,{className:`size-3.5 shrink-0 text-ink-3`}),(0,Z.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:O.split(`/`).pop()}),(0,Z.jsx)(`a`,{href:jO(e,O,k===`pdf`),target:`_blank`,rel:`noreferrer`,className:`shrink-0 text-ink-2 underline-offset-2 hover:text-ink hover:underline`,children:Q(`run.openFull`)})]}),k===`pdf`?(0,Z.jsx)(`iframe`,{title:O,src:`${jO(e,O,!0)}#toolbar=0&navpanes=0&view=FitH`,className:`h-[46vh] w-full border-0 bg-white lg:h-[calc(100vh-27rem)] lg:min-h-[360px]`},O):[`png`,`jpg`,`jpeg`,`webp`].includes(k)?(0,Z.jsx)(`div`,{className:`flex max-h-[46vh] justify-center overflow-auto bg-white lg:max-h-[calc(100vh-27rem)]`,children:(0,Z.jsx)(`img`,{src:jO(e,O,!0),alt:O,className:`max-w-full object-contain`},O)}):(0,Z.jsx)(`p`,{className:`px-4 py-10 text-center text-[14px] text-ink-3`,children:Q(`check.noPreview`)})]}):(0,Z.jsx)(`p`,{className:`px-4 py-14 text-center text-[14px] text-ink-3`,children:Q(`check.noFile`)})}),(0,Z.jsx)(`div`,{className:`grid grid-cols-2 gap-x-3 gap-y-2 sm:grid-cols-3`,children:x.map(e=>(0,Z.jsxs)(`div`,{className:$(`min-w-0`,e.type===`text`&&e.format?.style===`multiline`&&`col-span-full`),children:[(0,Z.jsx)(`div`,{className:`px-1 pb-0.5 text-[11px] text-ink-3`,children:e.name}),(0,Z.jsx)(kO,{boxed:!0,column:e,value:_.cells[e.id],onCommit:t=>void T(_.id,{[e.id]:t})})]},e.id))}),m?(0,Z.jsx)(`p`,{className:`text-[13px] text-rose`,children:m}):null]}):null]})}var PO={xlsx:`Excel`,csv:`CSV`,json:`JSON`,md:`Markdown`,zip:`ZIP`};function FO({runId:e,list:t}){return(0,Z.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:t.formats.map(n=>(0,Z.jsx)(`a`,{href:AS(`/api/runs/${e}/lists/${t.def.id}/download?format=${n}`),className:`inline-flex h-9 items-center rounded-full bg-paper-2 px-3.5 font-medium text-[13px] text-ink-2 transition hover:bg-paper-3 hover:text-ink coarse:h-11 coarse:px-4`,children:PO[n]??n},n))})}function IO(e){return e>1e6?`${(e/1e6).toFixed(1)} MB`:`${Math.max(1,Math.round(e/1e3))} KB`}function LO({runId:e}){let[t,n]=(0,y.useState)(!1),[r,i]=(0,y.useState)(null),[a,o]=(0,y.useState)(!1);(0,y.useEffect)(()=>{t&&(o(!1),FE.get(`/api/runs/${e}/store`).then(i))},[t,e]);let s=r&&!r.files.length&&!r.connections.length&&!r.keepsSignIns&&r.lists.every(e=>!e.rows);return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(`button`,{type:`button`,onClick:()=>n(!0),className:`inline-flex items-center gap-1.5 text-[13px] text-ink-4 transition hover:text-ink-2 coarse:min-h-11`,children:[(0,Z.jsx)(g_,{className:`size-3.5`}),` `,Q(`store.open`)]}),(0,Z.jsx)(Bb,{open:t,onClose:()=>n(!1),title:Q(`store.title`),wide:!0,children:r?(0,Z.jsxs)(`div`,{className:`flex flex-col gap-5 text-[14px]`,children:[(0,Z.jsx)(`p`,{className:`text-ink-3`,children:Q(`store.explain`)}),s?(0,Z.jsx)(`p`,{className:`text-ink-2`,children:Q(`store.empty`)}):null,r.lists.some(e=>e.rows)?(0,Z.jsx)(`ul`,{className:`flex flex-col gap-1`,children:r.lists.filter(e=>e.rows).map(e=>(0,Z.jsxs)(`li`,{className:`flex justify-between gap-3`,children:[(0,Z.jsx)(`span`,{children:e.title}),(0,Z.jsx)(`span`,{className:`text-ink-3 tabular-nums`,children:Q(`store.rows`,{n:e.rows})})]},e.id))}):null,r.connections.map(e=>(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Z.jsx)(J_,{className:`size-4 text-ink-3`}),` `,e.account?.label]},e.id)),r.keepsSignIns?(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Z.jsx)(c_,{className:`size-4 text-ink-3`}),` `,Q(`store.signIns`)]}):null,r.files.length?(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`div`,{className:`mb-1 text-ink-3`,children:Q(`store.files`,{n:r.files.length,size:IO(r.files.reduce((e,t)=>e+t.size,0))})}),(0,Z.jsx)(`ul`,{className:`max-h-56 overflow-y-auto rounded-lg ring-1 ring-border-soft`,children:r.files.map(t=>(0,Z.jsx)(`li`,{className:`border-border-soft border-b last:border-0`,children:(0,Z.jsxs)(`a`,{href:AS(`/api/runs/${e}/store/files/${t.path}`),className:`flex items-center gap-2 px-3 py-2 text-[13px] hover:bg-paper-2 coarse:min-h-11`,title:t.source??void 0,children:[(0,Z.jsx)(O_,{className:`size-3.5 shrink-0 text-ink-3`}),(0,Z.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:t.path}),(0,Z.jsx)(`span`,{className:`text-ink-4 tabular-nums`,children:IO(t.size)})]})},t.path))})]}):null,(0,Z.jsxs)(`div`,{className:`flex items-center justify-between gap-3 pt-1`,children:[s?(0,Z.jsx)(`span`,{}):a?(0,Z.jsxs)(Eb,{variant:`secondary`,onClick:async()=>{await FE.del(`/api/runs/${e}/store`),i(await FE.get(`/api/runs/${e}/store`)),o(!1)},children:[(0,Z.jsx)(Wv,{className:`size-4`}),` `,Q(`store.confirmDelete`)]}):(0,Z.jsxs)(Eb,{variant:`ghost`,onClick:()=>o(!0),children:[(0,Z.jsx)(Wv,{className:`size-4`}),` `,Q(`store.delete`)]}),(0,Z.jsx)(Eb,{onClick:()=>n(!1),children:Q(`common.close`)})]})]}):(0,Z.jsx)(`div`,{className:`flex justify-center py-8 text-ink-4`,children:(0,Z.jsx)(Lb,{})})})]})}var RO=300;function zO(){if(typeof MediaRecorder<`u`)return[`audio/webm;codecs=opus`,`audio/mp4`,`audio/webm`,`audio/ogg;codecs=opus`].find(e=>MediaRecorder.isTypeSupported(e))}function BO(e){return`${Math.floor(e/60)}:${String(Math.floor(e%60)).padStart(2,`0`)}`}function VO({value:e,runId:t,onChange:n,onBusy:r}){let i=vD(e)?e:null,[a,o]=(0,y.useState)(null),[s,c]=(0,y.useState)(0),[l,u]=(0,y.useState)(!1),[d,f]=(0,y.useState)(null),[p,m]=(0,y.useState)(!1),[h,g]=(0,y.useState)(null),_=(0,y.useRef)(null),v=(0,y.useRef)(null),b=zO(),x=eE&&!!b;(0,y.useEffect)(()=>()=>{_.current&&(_.current.recorder.onstop=null,_.current.stop())},[]),(0,y.useEffect)(()=>()=>{h&&URL.revokeObjectURL(h.url)},[h]);let S=async(e,i)=>{u(!0),r?.(!0),f(null);try{let r=await FE.upload(`/api/runs/${t}/uploads`,e);g({asset:r.id,url:URL.createObjectURL(e)}),n({asset:r.id,...i===void 0?{}:{seconds:i}})}catch(e){f(e.message)}finally{u(!1),r?.(!1)}},C=async()=>{f(null),m(!1);let e;try{e=await navigator.mediaDevices.getUserMedia({audio:{echoCancellation:!0,noiseSuppression:!0}})}catch{m(!0);return}let t=[],n=new MediaRecorder(e,{mimeType:b,audioBitsPerSecond:48e3}),i=Date.now(),a=new AudioContext,s=a.createAnalyser();s.fftSize=256,a.createMediaStreamSource(e).connect(s);let l=new Uint8Array(s.fftSize),u=0,d=()=>{s.getByteTimeDomainData(l);let e=0;for(let t of l)e=Math.max(e,Math.abs(t-128));if(c(Math.min(1,e/64)),o((Date.now()-i)/1e3),(Date.now()-i)/1e3>=RO){p();return}u=requestAnimationFrame(d)},p=()=>{cancelAnimationFrame(u),n.state!==`inactive`&&n.stop();for(let t of e.getTracks())t.stop();a.close().catch(()=>void 0),_.current=null,o(null),c(0)};n.ondataavailable=e=>e.data.size&&t.push(e.data),n.onstop=()=>{let e=(n.mimeType||b||`audio/webm`).split(`;`)[0],r=e===`audio/mp4`?`m4a`:e===`audio/ogg`?`ogg`:`webm`,a=Math.max(1,Math.round((Date.now()-i)/1e3));S(new File(t,`sprachnotiz-${qD()}.${r}`,{type:e}),a)},_.current={recorder:n,stop:p},r?.(!0),n.start(1e3),u=requestAnimationFrame(d)},w=a!==null,T=(0,Z.jsxs)(Eb,{variant:`secondary`,onClick:()=>v.current?.click(),children:[(0,Z.jsx)(E_,{className:`size-4`}),` `,Q(`voice.pick`)]});return(0,Z.jsxs)(`div`,{children:[w?(0,Z.jsxs)(`div`,{className:`flex items-center gap-3 rounded-xl bg-card p-3 ring-1 ring-ember`,children:[(0,Z.jsxs)(`span`,{className:`relative flex size-11 shrink-0 items-center justify-center`,children:[(0,Z.jsx)(`span`,{className:`absolute inset-0 rounded-full bg-rose-tint transition-transform duration-75`,style:{transform:`scale(${.7+s*.5})`}}),(0,Z.jsx)(`span`,{className:`relative size-3.5 animate-pulse-dot rounded-full bg-rose`})]}),(0,Z.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,Z.jsx)(`div`,{className:`font-medium text-[15px] tabular-nums`,children:BO(a)}),(0,Z.jsx)(`div`,{className:`text-[13px] text-ink-3`,children:a>270?Q(`voice.left`,{s:Math.ceil(RO-a)}):Q(`voice.recording`)})]}),(0,Z.jsxs)(Eb,{onClick:()=>_.current?.stop(),children:[(0,Z.jsx)(Bv,{className:`size-3.5 fill-current`}),` `,Q(`voice.stop`)]})]}):l?(0,Z.jsxs)(`div`,{className:`flex items-center gap-3 rounded-xl bg-card p-4 text-[14px] text-ink-3 ring-1 ring-input`,children:[(0,Z.jsx)(Lb,{className:`size-4`}),` `,Q(`run.uploading`)]}):i?(0,Z.jsxs)(`div`,{className:`rounded-xl bg-card p-3 ring-1 ring-input`,children:[(0,Z.jsx)(`audio`,{controls:!0,preload:`metadata`,src:h?.asset===i.asset?h.url:`/api/runs/${t}/assets/${i.asset}`,className:`h-11 w-full`}),i.transcript?(0,Z.jsx)(`p`,{className:`mt-2 whitespace-pre-wrap px-1 text-[14px] text-ink-2 leading-relaxed`,children:i.transcript}):null,(0,Z.jsxs)(`div`,{className:`mt-2 flex flex-wrap items-center justify-between gap-2`,children:[(0,Z.jsx)(`span`,{className:`px-1 text-[13px] text-ink-3`,children:i.seconds?BO(i.seconds):null}),(0,Z.jsxs)(`div`,{className:`flex gap-1`,children:[x?(0,Z.jsxs)(Eb,{variant:`ghost`,size:`sm`,onClick:()=>void C(),children:[(0,Z.jsx)(Ev,{className:`size-3.5`}),` `,Q(`voice.again`)]}):null,(0,Z.jsx)(Eb,{variant:`ghost`,size:`sm`,onClick:()=>n(void 0),children:Q(`voice.remove`)})]})]})]}):(0,Z.jsxs)(`div`,{children:[(0,Z.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[x?(0,Z.jsxs)(Eb,{variant:`secondary`,size:`lg`,onClick:()=>void C(),className:`w-full sm:w-auto`,children:[(0,Z.jsx)(cv,{className:`size-4`}),` `,Q(`voice.start`)]}):T,x&&p?T:null]}),p?(0,Z.jsx)(`p`,{className:`mt-2 rounded-lg bg-amber-tint px-3 py-2 text-[13px] text-ink-2 leading-relaxed`,children:Q(`voice.denied`)}):(0,Z.jsx)(`p`,{className:`mt-2 text-[13px] text-ink-3 leading-relaxed`,children:Q(x?`voice.why`:`voice.noRecorder`)})]}),(0,Z.jsx)(`input`,{ref:v,type:`file`,hidden:!0,accept:`audio/*`,capture:!0,onChange:e=>{let t=e.target.files?.[0];e.target.value=``,t&&S(t,void 0)}}),d?(0,Z.jsx)(`div`,{className:`mt-2 text-[13px] text-rose`,children:d}):null]})}function HO(e,t){try{return new Intl.NumberFormat(void 0,{style:`currency`,currency:t}).format(e)}catch{return`${e.toFixed(2)} ${t}`}}function UO({field:e,value:t,values:n,onChange:r}){let i=e.columns??[],a=Array.isArray(t)&&t.length?t:[{}],o=UD(e,a,n),s=(e,t,n)=>{r(a.map((r,i)=>i===e?{...r,[t]:n}:r))},c=i.map(e=>e.kind===`text`&&e===i[0]?`minmax(0,3fr)`:`minmax(0,1fr)`).join(` `);return(0,Z.jsxs)(`div`,{className:`rounded-xl bg-card p-2 ring-1 ring-input`,children:[(0,Z.jsx)(`div`,{className:`hidden gap-2 px-2 pt-1 pb-2 text-[12px] text-ink-3 sm:grid`,style:{gridTemplateColumns:`${c} 36px`},children:i.map(e=>(0,Z.jsx)(`div`,{className:e.kind===`text`?``:`text-right`,children:e.label},e.id))}),(0,Z.jsx)(`div`,{className:`flex flex-col gap-2`,children:a.map((e,t)=>(0,Z.jsxs)(`div`,{className:`grid grid-cols-6 gap-2 rounded-lg bg-paper p-2 sm:bg-transparent sm:p-0 sm:[grid-template-columns:var(--cols)]`,style:{"--cols":`${c} 36px`},children:[i.map((n,r)=>(0,Z.jsxs)(`label`,{className:$(`flex min-w-0 flex-col gap-1 sm:col-span-1`,r===0?`col-span-5`:i.length-1<=2?`col-span-3`:`col-span-2`),children:[(0,Z.jsx)(`span`,{className:`px-0.5 text-[11px] text-ink-3 sm:hidden`,children:n.label}),(0,Z.jsx)(`input`,{"aria-label":n.label,placeholder:n.label,inputMode:n.kind===`text`?`text`:`decimal`,autoComplete:`off`,value:String(e[n.id]??``),onChange:e=>s(t,n.id,e.target.value),className:$(`h-11 w-full min-w-0 rounded-md border border-transparent bg-paper-2 px-2.5 text-[14px] outline-none placeholder:text-transparent focus:border-focus focus:bg-card sm:placeholder:text-ink-4`,n.kind!==`text`&&`text-right tabular-nums`)})]},n.id)),(0,Z.jsx)(Db,{label:Q(`list.delete`),onClick:()=>r(a.filter((e,n)=>n!==t)),className:`order-first col-start-6 row-start-1 size-11 justify-self-end self-end sm:order-none sm:col-start-auto sm:row-start-auto`,children:(0,Z.jsx)(Wv,{className:`size-4`})})]},t))}),(0,Z.jsxs)(`div`,{className:`mt-2 flex flex-wrap items-end justify-between gap-3 px-2 pb-1`,children:[(0,Z.jsxs)(`button`,{type:`button`,onClick:()=>r([...a,{}]),className:`inline-flex h-9 items-center gap-1.5 rounded-full px-3 text-[13px] text-ink-2 hover:bg-accent coarse:h-11`,children:[(0,Z.jsx)(Sv,{className:`size-4`}),` `,Q(`run.addRow`)]}),(0,Z.jsxs)(`div`,{className:`text-right text-[13px] tabular-nums`,children:[(0,Z.jsxs)(`div`,{className:`text-ink-3`,children:[Q(`run.net`),` `,HO(o.net,o.currency)]}),o.vatRate?(0,Z.jsxs)(`div`,{className:`text-ink-3`,children:[Q(`run.vat`,{r:o.vatRate}),` `,HO(o.vat,o.currency)]}):null,(0,Z.jsxs)(`div`,{className:`font-semibold text-[15px] text-ink`,children:[Q(`run.total`),` `,HO(o.gross,o.currency)]})]})]})]})}function WO(e){return!!e?.closest(`input, textarea, [contenteditable='true']`)}function GO({field:e,value:t,runId:n,onChange:r,onBusy:i}){let a=(0,y.useRef)(null),o=(0,y.useRef)(null),s=(0,y.useRef)(null),c=(0,y.useRef)(null),[l,u]=(0,y.useState)(!1),[d,f]=(0,y.useState)({}),[p,m]=(0,y.useState)(null),[h,g]=(0,y.useState)(!1),[_,v]=(0,y.useState)(!1),[b,x]=(0,y.useState)(null),S=(0,y.useRef)(null),C=e=>{S.current=e,x(e)},w=e.kind===`image`,T=!!e.multiple,E=T?e.max??30:1,D=w||!!e.camera||!!e.video,ee=!w&&!!e.video,O=Array.isArray(t)?t:typeof t==`string`&&t?[t]:[],k=(0,y.useRef)(O);k.current=O;let A=O.length<E,te=async e=>{let t=(w?e.filter(e=>e.type.startsWith(`image/`)):e).sort((e,t)=>e.name.localeCompare(t.name,void 0,{numeric:!0}));if(!t.length)return;let a=E-(T?k.current.length:0);u(!0),i?.(!0),m(t.length>a&&T?Q(`run.maxFiles`,{n:E}):null);try{for(let e of t.slice(0,Math.max(0,a))){let t=await KD(e),i=await FE.upload(`/api/runs/${n}/uploads`,t);f(e=>({...e,[i.id]:{name:i.name,mime:i.mime}}));let a=T?[...k.current,i.id]:i.id;k.current=T?a:[i.id],r(a)}}catch(e){m(e.message)}finally{u(!1),i?.(!1)}},ne=(0,y.useRef)(te);ne.current=te;let re=e=>{let t=O.filter(t=>t!==e);r(T?t:void 0)},ie=(e,t)=>{let n=k.current.indexOf(e),i=Math.min(k.current.length-1,Math.max(0,t));if(n<0||n===i)return;let a=k.current.filter(t=>t!==e);a.splice(i,0,e),k.current=a,r(a)},ae=T&&O.length>1;(0,y.useEffect)(()=>{if(!A)return;let e=e=>{let t=Array.from(e.clipboardData?.files??[]),n=a.current;if(!t.length||!n||WO(document.activeElement))return;let r=document.querySelectorAll(`[data-upload-field]`);(n.matches(`:hover`)||n.contains(document.activeElement)||r.length===1)&&(e.preventDefault(),ne.current(t))};return document.addEventListener(`paste`,e),()=>document.removeEventListener(`paste`,e)},[A]);let oe=$(`flex flex-col items-center justify-center gap-2 rounded-xl border border-input border-dashed bg-card px-3 text-[14px] text-ink-3 transition hover:border-ember hover:text-ink`,O.length?`py-4`:`py-8`);return(0,Z.jsxs)(`div`,{ref:a,"data-upload-field":``,onDragOver:e=>{A&&(e.preventDefault(),v(!0))},onDragLeave:()=>v(!1),onDrop:e=>{v(!1),A&&(e.preventDefault(),te(Array.from(e.dataTransfer.files)))},children:[O.length?(0,Z.jsx)(`div`,{className:`mb-2 flex flex-col gap-2`,children:O.map((e,t)=>{let r=d[e],i=r?.mime??(w?`image/`:``);return(0,Z.jsxs)(`div`,{"data-file-id":e,className:$(`flex items-center gap-3 rounded-xl bg-card p-2 ring-1 ring-input transition-shadow`,b===e&&`relative z-10 shadow-elevated ring-2 ring-ember`),children:[ae?(0,Z.jsxs)(`button`,{type:`button`,"aria-label":Q(`run.moveFile`,{n:t+1}),title:Q(`run.moveFileHint`),className:$(`-mr-1 flex h-14 w-9 shrink-0 touch-none flex-col items-center justify-center gap-0.5 rounded-lg text-ink-3 hover:bg-paper-2 hover:text-ink`,b===e?`cursor-grabbing`:`cursor-grab`),onPointerDown:t=>{try{t.currentTarget.setPointerCapture(t.pointerId)}catch{}C(e)},onPointerMove:t=>{if(S.current!==e)return;let n=document.elementFromPoint(t.clientX,t.clientY)?.closest(`[data-file-id]`),r=n?.getAttribute(`data-file-id`);r&&r!==e&&a.current?.contains(n??null)&&ie(e,k.current.indexOf(r))},onPointerUp:()=>C(null),onPointerCancel:()=>C(null),onKeyDown:n=>{(n.key===`ArrowUp`||n.key===`ArrowDown`)&&(n.preventDefault(),ie(e,t+(n.key===`ArrowUp`?-1:1)))},children:[(0,Z.jsx)(`span`,{className:`font-medium text-[12px] tabular-nums`,children:t+1}),(0,Z.jsx)(R_,{className:`size-4`})]}):null,i.startsWith(`image/`)?(0,Z.jsx)(`img`,{src:AS(`/api/runs/${n}/assets/${e}`),alt:``,className:`size-14 rounded-lg object-cover`}):(0,Z.jsx)(`div`,{className:`flex size-12 shrink-0 items-center justify-center rounded-lg bg-paper-2`,children:i.startsWith(`video/`)?(0,Z.jsx)(A_,{className:`size-5 text-ink-3`}):(0,Z.jsx)(mv,{className:`size-5 text-ink-3`})}),(0,Z.jsx)(`div`,{className:`min-w-0 flex-1 truncate text-[14px]`,children:r?.name??`✓`}),(0,Z.jsx)(Db,{label:Q(`run.removeFile`),onClick:()=>re(e),children:(0,Z.jsx)(iy,{className:`size-4`})})]},e)})}):null,A?(0,Z.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,Z.jsxs)(`button`,{type:`button`,onClick:()=>o.current?.click(),className:$(oe,`min-w-[9rem] flex-1 px-4`,_&&`border-ember text-ink`),children:[w?(0,Z.jsx)(B_,{className:`size-6`}):(0,Z.jsx)(mv,{className:`size-6`}),l?Q(`run.uploading`):O.length?Q(`run.uploadMore`):Q($T?`run.uploadTouch`:`run.upload`)]}),D?(0,Z.jsxs)(`button`,{type:`button`,onClick:()=>eE?g(!0):s.current?.click(),className:$(oe,`w-28`),children:[(0,Z.jsx)(o_,{className:`size-6`}),Q(`run.camera`)]}):null,ee&&!(eE&&rO)?(0,Z.jsxs)(`button`,{type:`button`,onClick:()=>c.current?.click(),className:$(oe,`w-28`),children:[(0,Z.jsx)(Qv,{className:`size-6`}),Q(`camera.video`)]}):null]}):null,(0,Z.jsx)(`input`,{ref:o,type:`file`,hidden:!0,multiple:T,accept:w?`image/*`:void 0,onChange:e=>{te(Array.from(e.target.files??[])),e.target.value=``}}),(0,Z.jsx)(`input`,{ref:s,type:`file`,hidden:!0,accept:`image/*`,capture:`environment`,onChange:e=>{te(Array.from(e.target.files??[])),e.target.value=``}}),ee?(0,Z.jsx)(`input`,{ref:c,type:`file`,hidden:!0,accept:`video/*`,capture:`environment`,onChange:e=>{te(Array.from(e.target.files??[])),e.target.value=``}}):null,(0,Z.jsx)(iO,{open:h,multiple:T,video:ee,onClose:()=>g(!1),onCapture:e=>te([e]),onNative:()=>s.current?.click()}),T&&(e.min||e.max)?(0,Z.jsx)(`div`,{className:`mt-2 text-[13px] text-ink-3 tabular-nums`,children:e.min&&O.length<e.min?Q(`run.filesMin`,{n:O.length,min:e.min}):e.max?Q(`run.filesOf`,{n:O.length,max:e.max}):null}):null,p?(0,Z.jsx)(`div`,{className:`mt-2 text-[13px] text-rose`,children:p}):null]})}function KO(e){let t=`${e.id} ${e.label}`.toLowerCase();return/telefon|phone|handy|mobil(?!it)|\btel\b|rückruf/.test(t)?{type:`tel`,inputMode:`tel`,autoComplete:`tel`}:/\bplz\b|postleitzahl|postal|zip/.test(t)?{inputMode:`numeric`,autoComplete:`postal-code`}:/iban/.test(t)?{autoCapitalize:`characters`,autoCorrect:`off`,spellCheck:!1}:/vorname|first.?name/.test(t)?{autoComplete:`given-name`,autoCapitalize:`words`}:/nachname|last.?name|surname/.test(t)?{autoComplete:`family-name`,autoCapitalize:`words`}:/firma|unternehmen|company|organi[sz]ation/.test(t)?{autoComplete:`organization`,autoCapitalize:`words`}:/straße|strasse|street|anschrift|adresse|address/.test(t)?{autoComplete:`street-address`,autoCapitalize:`words`}:/\b(ort|stadt|city|town)\b/.test(t)?{autoComplete:`address-level2`,autoCapitalize:`words`}:/\bname\b|ansprechp/.test(t)?{autoComplete:`name`,autoCapitalize:`words`}:{autoCapitalize:`sentences`}}function qO({field:e,value:t,onChange:n}){let[r,i]=(0,y.useState)(!1);return(0,Z.jsxs)(`div`,{className:`flex gap-2`,children:[(0,Z.jsx)(Ab,{value:t,placeholder:e.placeholder,autoCapitalize:`off`,autoCorrect:`off`,spellCheck:!1,onChange:e=>n(e.target.value)}),(0,Z.jsxs)(`button`,{type:`button`,onClick:()=>i(!0),className:`inline-flex h-11 shrink-0 items-center gap-2 rounded-lg border border-input bg-card px-3.5 font-medium text-[14px] text-ink-2 transition hover:border-ember hover:text-ink`,children:[(0,Z.jsx)(Ov,{className:`size-4`}),` `,Q(`scan.button`)]}),(0,Z.jsx)(vO,{open:r,onClose:()=>i(!1),onResult:n})]})}function JO({field:e,value:t,values:n,runId:r,view:i,onChange:a,onBusy:o,error:s}){let c=t==null?``:String(t),l;switch(e.kind){case`textarea`:l=(0,Z.jsx)(Mb,{value:c,placeholder:e.placeholder,autoCapitalize:`sentences`,enterKeyHint:`enter`,onChange:e=>a(e.target.value)});break;case`number`:l=(0,Z.jsx)(Ab,{inputMode:`decimal`,autoComplete:`off`,value:c,placeholder:e.placeholder,onChange:e=>a(e.target.value)});break;case`select`:{let t=e.options??[];l=t.length<=5&&t.every(e=>e.length<=28)?(0,Z.jsx)(Pb,{value:c,options:t,onChange:a}):(0,Z.jsx)(Nb,{value:c,placeholder:`—`,onChange:a,options:t.map(e=>({value:e,label:e}))});break}case`multiselect`:l=(0,Z.jsx)(Pb,{multi:!0,value:Array.isArray(t)?t:[],options:e.options??[],onChange:a});break;case`date`:l=(0,Z.jsx)(Ab,{type:`date`,value:c,onChange:e=>a(e.target.value),className:`w-full sm:w-56`});break;case`email`:l=(0,Z.jsx)(Ab,{type:`email`,inputMode:`email`,autoComplete:`email`,autoCapitalize:`off`,autoCorrect:`off`,spellCheck:!1,value:c,placeholder:e.placeholder,onChange:e=>a(e.target.value)});break;case`url`:l=(0,Z.jsx)(Ab,{type:`url`,inputMode:`url`,autoComplete:`url`,autoCapitalize:`off`,autoCorrect:`off`,spellCheck:!1,value:c,placeholder:e.placeholder??`https://`,onChange:e=>a(e.target.value)});break;case`toggle`:l=(0,Z.jsx)(Fb,{checked:t===!0,onChange:a,label:e.label});break;case`color`:l=(0,Z.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,Z.jsx)(jb,{value:c||`#e0531b`,onChange:e=>a(e.target.value)}),(0,Z.jsx)(Ab,{value:c,placeholder:`#e0531b`,autoCapitalize:`off`,autoCorrect:`off`,spellCheck:!1,onChange:e=>a(e.target.value),className:`w-36`})]});break;case`image`:case`file`:l=(0,Z.jsx)(GO,{field:e,value:t,runId:r,onChange:a,onBusy:o});break;case`items`:l=(0,Z.jsx)(UO,{field:e,value:t,values:n,onChange:a});break;case`connection`:l=(0,Z.jsx)(EO,{runId:r,connection:i?.connections.find(t=>t.id===e.connection)});break;case`list`:{let t=i?.lists.find(t=>t.def.id===e.list);l=t?(0,Z.jsx)(AO,{runId:r,list:t,editable:!0}):null;break}case`location`:l=(0,Z.jsx)(lO,{value:t,runId:r,placeholder:e.placeholder,onChange:a,onBusy:o});break;case`audio`:l=(0,Z.jsx)(VO,{value:t,runId:r,onChange:a,onBusy:o});break;case`signature`:l=(0,Z.jsx)(wO,{label:e.label,value:t,runId:r,onChange:a});break;default:l=e.scan?(0,Z.jsx)(qO,{field:e,value:c,onChange:a}):(0,Z.jsx)(Ab,{...KO(e),value:c,placeholder:e.placeholder,onChange:e=>a(e.target.value)})}return(0,Z.jsxs)(`div`,{children:[e.kind===`toggle`?(0,Z.jsxs)(`div`,{className:`flex items-start justify-between gap-6`,children:[(0,Z.jsx)(Ib,{hint:e.help,children:e.label}),l]}):(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(Ib,{hint:e.help,required:e.required,children:e.label}),l]}),s?(0,Z.jsx)(`div`,{className:`mt-1.5 text-[13px] text-rose`,children:s}):null]})}var YO=45e3;function XO(e){let[t,n]=(0,y.useState)(null),[r,i]=(0,y.useState)(null),[a,o]=(0,y.useState)(!1),[s,c]=(0,y.useState)(!1),[l,u]=(0,y.useState)({});(0,y.useEffect)(()=>{if(n(null),o(!1),!e)return;let t=!1,r=0,i,a=null,s=Date.now(),c=()=>{t=!0,a?.close(),o(!0)},l=async()=>{try{let r=await FE.get(`/api/runs/${e}`);t||n(r)}catch(e){e instanceof ME&&e.status===404&&c()}},u=()=>{if(clearTimeout(i),a?.close(),t)return;let o=new EventSource(AS(`/api/runs/${e}/stream`),{withCredentials:!0});a=o,s=Date.now(),o.addEventListener(`view`,e=>{r=0,s=Date.now(),n(JSON.parse(e.data))}),o.addEventListener(`ping`,()=>{s=Date.now()}),o.onerror=()=>{o.close(),!(t||a!==o)&&(a=null,l(),r=Math.min(r+1,6),i=setTimeout(u,500*2**r))}},d=()=>{t||document.visibilityState!==`visible`||(!a||a.readyState===EventSource.CLOSED||Date.now()-s>YO?(r=0,u()):l())},f=setInterval(()=>{!t&&a&&Date.now()-s>YO&&(r=0,u())},15e3);return u(),document.addEventListener(`visibilitychange`,d),window.addEventListener(`pageshow`,d),window.addEventListener(`online`,d),()=>{t=!0,clearTimeout(i),clearInterval(f),document.removeEventListener(`visibilitychange`,d),window.removeEventListener(`pageshow`,d),window.removeEventListener(`online`,d),a?.close()}},[e]);let d=(0,y.useCallback)(async(t,n)=>{if(!e)return!1;c(!0),i(null),u({});try{return await FE.post(`/api/runs/${e}/${t}`,n),!0}catch(e){return e instanceof ME&&e.status===422&&Array.isArray(e.body?.fields)&&u(Object.fromEntries(e.body.fields.map(e=>[e.field,e.message]))),i(e.message),!1}finally{c(!1)}},[e]);return{view:t,notFound:a,error:r,busy:s,fieldErrors:l,submitPage:(e,t)=>d(`pages/${e}`,{values:t}),accept:(e,t)=>d(`reviews/${e}`,{type:`accept`,edits:t}),regenerate:(e,t,n,r)=>d(`reviews/${e}`,{type:`regenerate`,target:t,note:n,items:r?.length?r:void 0}),back:()=>d(`back`),retry:()=>d(`retry`)}}function ZO({view:e}){let t=Math.round(Math.min(e.progress.done,e.progress.total)/Math.max(1,e.progress.total)*100);return(0,Z.jsx)(`div`,{className:`h-[3px] w-full bg-paper-2`,children:(0,Z.jsx)(`div`,{className:`h-full bg-ember transition-[width] duration-700 ease-out`,style:{width:`${t}%`}})})}function QO({title:e,description:t,kicker:n}){return(0,Z.jsxs)(`div`,{className:`mb-8`,children:[n?(0,Z.jsx)(`p`,{className:`mb-4 text-[15px] text-ink-2 leading-relaxed`,children:n}):null,(0,Z.jsx)(`h1`,{className:`font-display font-semibold text-[28px] leading-[1.15] tracking-tight sm:text-[32px]`,children:e}),t?(0,Z.jsx)(`p`,{className:`mt-2 text-[15px] text-ink-3 leading-relaxed`,children:t}):null]})}function $O(e,t){let n={};for(let r of e.fields)n[r.id]=t.values[r.id]??t.prefill?.[r.id]??r.default??(r.kind===`multiselect`?[]:void 0);return n}function ek(e){return Array.from(e.querySelectorAll(`input:not([type="hidden"], [type="file"], [type="checkbox"], [type="color"], [type="range"], [disabled]), textarea:not([disabled])`)).filter(e=>!e.closest(`dialog`)&&e.offsetParent!==null)}function tk({view:e,run:t,step:n}){let[r,i]=(0,y.useState)(()=>$O(n,e)),[a,o]=(0,y.useState)(new Set),s=(0,y.useRef)(null),c=e.progress.done===0,l=()=>void t.submitPage(n.id,r);return(0,y.useEffect)(()=>{if(!s.current)return;let e=ek(s.current).filter(e=>e instanceof HTMLInputElement);for(let[t,n]of e.entries())(n.dataset.hint||!n.hasAttribute(`enterkeyhint`))&&(n.dataset.hint=`1`,n.setAttribute(`enterkeyhint`,t===e.length-1?`go`:`next`))}),(0,Z.jsxs)(`form`,{ref:s,className:`animate-rise`,onSubmit:e=>{e.preventDefault(),a.size||l()},onKeyDown:e=>{let t=e.target;if(e.key!==`Enter`||e.defaultPrevented||e.nativeEvent.isComposing||!(t instanceof HTMLInputElement)||t.closest(`dialog`))return;let n=ek(e.currentTarget),r=n[n.indexOf(t)+1];r&&(e.preventDefault(),r.focus())},children:[(0,Z.jsx)(QO,{title:n.title,description:n.description,kicker:c?e.wizard.intro:null}),(0,Z.jsx)(`div`,{className:`flex flex-col gap-7`,children:n.fields.map(n=>(0,Z.jsx)(JO,{field:n,value:r[n.id],values:r,runId:e.id,view:e,error:t.fieldErrors[n.id],onChange:e=>i(t=>({...t,[n.id]:e})),onBusy:e=>o(t=>{if(t.has(n.id)===e)return t;let r=new Set(t);return e?r.add(n.id):r.delete(n.id),r})},n.id))}),(0,Z.jsx)(nk,{view:e,run:t,sticky:!0,children:(0,Z.jsxs)(Eb,{type:`submit`,size:`lg`,busy:t.busy,disabled:a.size>0,children:[n.cta||Q(`run.next`),` `,(0,Z.jsx)(Xg,{className:`size-4`})]})})]})}function nk({view:e,run:t,sticky:n,children:r}){return(0,Z.jsxs)(`div`,{className:$(`mt-10 flex items-center justify-between gap-3`,n&&`action-bar`),children:[e.canBack?(0,Z.jsxs)(Eb,{variant:`ghost`,onClick:()=>void t.back(),disabled:t.busy,children:[(0,Z.jsx)(Jg,{className:`size-4`}),` `,Q(`run.back`)]}):(0,Z.jsx)(`span`,{}),r]})}function rk(){let e=uE(),[t,n]=(0,y.useState)(!1),r=e!==`off`;return(0,Z.jsxs)(`div`,{className:`mt-6 flex flex-col items-center gap-2`,children:[(0,Z.jsxs)(`button`,{type:`button`,"aria-pressed":r,disabled:t,onClick:async()=>{if(r){pE();return}n(!0),await fE(),n(!1)},className:$(`inline-flex h-11 items-center gap-2 rounded-full px-4 font-medium text-[14px] ring-1 transition`,r?`bg-ember-tint text-ink ring-ember`:`bg-card text-ink-2 ring-input hover:text-ink hover:ring-ink-4`),children:[r?(0,Z.jsx)(e_,{className:`size-4 text-ember-strong`}):(0,Z.jsx)(n_,{className:`size-4`}),Q(r?`notify.on`:`notify.ask`)]}),(0,Z.jsx)(`p`,{className:`max-w-xs text-[12px] text-ink-4 leading-relaxed`,children:Q(e===`off`?`notify.why`:e===`on`?`notify.onHint`:dE()?`notify.blocked`:`notify.quiet`)})]})}function ik({view:e,compact:t,awake:n}){let r=(0,y.useMemo)(()=>{let t=[...e.events].reverse().find(t=>t.type===`step_started`&&t.stepId===e.step?.id);return t?new Date(t.at).getTime():Date.now()},[e.events,e.step?.id]),[i,a]=(0,y.useState)(Date.now());(0,y.useEffect)(()=>{let e=setInterval(()=>a(Date.now()),1e3);return()=>clearInterval(e)},[]);let o=[...e.events].reverse().find(t=>t.type===`step_started`&&t.stepId===e.step?.id)?.message??e.step?.title??Q(`run.working`),s=e.events.filter(e=>(e.type===`tool`||e.type===`info`)&&new Date(e.at).getTime()>=r-500),c=s.slice(-4),l=[...new Set(s.map(e=>e.asset).filter(e=>!!e))],u=[...s].reverse().find(e=>e.asset)?.asset;return(0,Z.jsxs)(`div`,{className:`flex animate-rise flex-col items-center pt-6 text-center`,children:[(0,Z.jsx)(ES,{kind:e.wizard.avatar,size:t?130:170,fluffy:!0}),(0,Z.jsx)(`h2`,{className:`mt-4 font-display font-semibold text-[22px] tracking-tight`,children:o}),(0,Z.jsx)(`div`,{className:`mt-1 text-[13px] text-ink-4 tabular-nums`,children:Q(`run.elapsed`,{s:Math.max(0,Math.round((i-r)/1e3))})}),l.length?(0,Z.jsx)(`div`,{className:`mt-5 flex max-w-full flex-wrap justify-center gap-2`,children:l.slice(-8).map(t=>(0,Z.jsx)(`img`,{src:AS(`/api/runs/${e.id}/assets/${t}`),alt:``,className:$(`size-16 animate-rise rounded-lg bg-paper-2 object-cover ring-1 ring-border-soft transition sm:size-20`,t===u?`ring-2 ring-ember`:`opacity-70`)},t))}):null,(0,Z.jsx)(`div`,{className:`mt-6 flex min-h-[7rem] w-full max-w-sm flex-col gap-1.5`,children:c.map((e,t)=>(0,Z.jsxs)(`div`,{className:$(`flex items-center justify-center gap-2 text-[13px] transition-opacity`,t===c.length-1?`text-ink-2`:`text-ink-4`),children:[t===c.length-1?(0,Z.jsx)(Rv,{className:`size-3.5 animate-breathe text-ember`}):null,(0,Z.jsx)(`span`,{className:`truncate`,children:e.message})]},e.id))}),t?null:(0,Z.jsx)(rk,{}),n?(0,Z.jsx)(`p`,{className:`mt-3 text-[12px] text-ink-4`,children:Q(`run.awake`)}):null]})}function ak(e){let t=(0,y.useRef)({running:!1,since:0,ask:null});(0,y.useEffect)(()=>{if(!e)return;let n=t.current,r=e.status===`running`,i=r?n.running?n.since:Date.now():0,a=t=>{document.visibilityState!==`visible`&&!document.title.startsWith(`● `)&&(document.title=`● ${document.title}`),hE({title:e.wizard.title,body:t,tag:e.id})};r&&e.ask&&e.ask.id!==n.ask?a(Q(`notify.needsYou`)):!r&&n.running&&Date.now()-n.since>8e3&&a(e.status===`failed`?Q(`run.failed`):e.status===`done`?Q(`notify.done`):Q(`notify.next`)),t.current={running:r,since:i,ask:e.ask?.id??null}},[e]),(0,y.useEffect)(()=>{let e=()=>{document.visibilityState===`visible`&&document.title.startsWith(`● `)&&(document.title=document.title.slice(2))};return document.addEventListener(`visibilitychange`,e),()=>document.removeEventListener(`visibilitychange`,e)},[])}function ok({view:e,run:t,step:n}){let[r,i]=(0,y.useState)({}),[a,o]=(0,y.useState)({}),[s,c]=(0,y.useState)(``),l=e.shown.filter(e=>e.output),[u,d]=(0,y.useState)(l.length===1?l[0].step.id:null),[f,p]=(0,y.useState)({}),m=(0,y.useRef)(null),h=l.find(e=>e.step.id===u),g=h?.step.type===`generate`&&(h.output?.assets?.length??0)>1,_=()=>{h&&s.trim()&&t.regenerate(n.id,h.step.id,s.trim(),f[h.step.id])};return(0,Z.jsxs)(`div`,{className:`animate-rise`,children:[(0,Z.jsx)(QO,{title:n.title,description:n.description}),(0,Z.jsxs)(`div`,{className:`flex flex-col gap-6`,children:[e.shown.map(({step:t,output:s})=>{let c=!!n.edit&&t.type===`agent`&&t.output.format!==`json`;return(0,Z.jsxs)(`section`,{children:[(0,Z.jsxs)(`div`,{className:`mb-2 flex items-center justify-between gap-3`,children:[(0,Z.jsx)(`h3`,{className:`font-medium text-[13px] text-ink-3 uppercase tracking-[0.06em]`,children:t.title}),(0,Z.jsx)(`div`,{className:`flex items-center`,children:c&&!a[t.id]?(0,Z.jsxs)(`button`,{type:`button`,onClick:()=>o(e=>({...e,[t.id]:!0})),className:`inline-flex h-8 items-center gap-1.5 rounded-full px-3 text-[13px] text-ink-2 hover:bg-accent hover:text-ink coarse:h-11`,children:[(0,Z.jsx)(bv,{className:`size-3.5`}),` `,Q(`run.edit`)]}):null})]}),(0,Z.jsx)(EE,{base:`/api/runs/${e.id}`,step:t,output:s,editable:c&&a[t.id],draft:r[t.id],onDraft:e=>i(n=>({...n,[t.id]:e})),picked:f[t.id],onPick:n.regenerate?e=>{d(t.id),p(n=>{let r=n[t.id]??[];return{...n,[t.id]:r.includes(e)?r.filter(t=>t!==e):[...r,e]}}),m.current?.focus()}:void 0})]},t.id)}),e.lists.map(t=>(0,Z.jsxs)(`section`,{children:[(0,Z.jsx)(`h3`,{className:`mb-2 font-medium text-[13px] text-ink-3 uppercase tracking-[0.06em]`,children:t.def.title}),t.def.check?(0,Z.jsx)(NO,{runId:e.id,list:t}):(0,Z.jsx)(AO,{runId:e.id,list:t,editable:!0})]},t.def.id)),n.regenerate&&l.length?(0,Z.jsxs)(Rb,{className:`p-3`,children:[l.length>1?(0,Z.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1.5 px-1 pb-2`,children:[(0,Z.jsx)(`span`,{className:`mr-1 text-[13px] text-ink-3`,children:Q(`run.feedbackTarget`)}),l.map(({step:e})=>(0,Z.jsx)(`button`,{type:`button`,"aria-pressed":u===e.id,onClick:()=>{d(e.id),m.current?.focus()},className:$(`inline-flex h-8 items-center rounded-full px-3 text-[13px] ring-1 transition coarse:h-11`,u===e.id?`bg-ember-tint text-ink ring-ember`:`bg-card text-ink-2 ring-input hover:text-ink`),children:e.title},e.id))]}):null,(0,Z.jsx)(Mb,{ref:m,minRows:2,maxRows:8,value:s,placeholder:Q(`run.feedbackPlaceholder`),onChange:e=>c(e.target.value),onKeyDown:e=>{e.key===`Enter`&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),_())},className:`border-0 bg-transparent shadow-none focus:ring-0`}),(0,Z.jsxs)(`div`,{className:`flex items-center justify-between gap-3 px-1 pt-1`,children:[(0,Z.jsx)(`span`,{className:`min-w-0 text-[12px] text-ink-3`,children:g?f[h.step.id]?.length?Q(`run.regeneratePicked`,{n:[...f[h.step.id]].sort((e,t)=>e-t).map(e=>e+1).join(`, `)}):Q(`run.regenerateAll`):!h&&s.trim()?Q(`run.feedbackPick`):null}),(0,Z.jsxs)(Eb,{size:`sm`,variant:`secondary`,busy:t.busy,disabled:!s.trim()||!h,onClick:_,children:[(0,Z.jsx)(wv,{className:`size-3.5`}),` `,Q(`run.regenerateGo`)]})]})]}):null]}),(0,Z.jsx)(nk,{view:e,run:t,sticky:!0,children:(0,Z.jsxs)(Eb,{size:`lg`,busy:t.busy,onClick:()=>void t.accept(n.id,Object.keys(r).length?r:void 0),children:[Q(`run.accept`),` `,(0,Z.jsx)(Xg,{className:`size-4`})]})})]})}function sk({view:e,run:t,step:n,onRestart:r}){let i=e.shown.filter(e=>e.output);return(0,Z.jsxs)(`div`,{className:`animate-rise`,children:[(0,Z.jsxs)(`div`,{className:`mb-8 flex flex-wrap items-center gap-x-4 gap-y-5`,children:[(0,Z.jsx)(ES,{kind:e.wizard.avatar,size:64}),(0,Z.jsxs)(`div`,{className:`min-w-0 flex-1 basis-[12rem]`,children:[(0,Z.jsx)(`h1`,{className:`text-balance font-display font-semibold text-[28px] leading-tight tracking-tight sm:text-[32px]`,children:n.title}),n.message?(0,Z.jsx)(`p`,{className:`mt-1 text-[15px] text-ink-3`,children:n.message}):null]}),e.shown.some(e=>e.output)?(0,Z.jsx)(`div`,{className:`max-sm:basis-full`,children:(0,Z.jsx)(RE,{runId:e.id,title:`${n.title} · ${e.wizard.title}`,initial:e.shareUrl?{url:e.shareUrl,expiresAt:e.expiresAt}:null})}):null]}),(0,Z.jsxs)(`div`,{className:`flex flex-col gap-6`,children:[i.map(({step:t,output:n,formats:r,label:i})=>(0,Z.jsxs)(Rb,{className:`p-4 sm:p-5`,children:[(0,Z.jsxs)(`div`,{className:`mb-3 flex flex-wrap items-center justify-between gap-3`,children:[(0,Z.jsx)(`h3`,{className:`font-display font-semibold text-[17px]`,children:i??t.title}),(0,Z.jsx)(jE,{base:`/api/runs/${e.id}`,stepId:t.id,formats:r,title:i??t.title})]}),(0,Z.jsx)(EE,{base:`/api/runs/${e.id}`,step:t,output:n}),n?.assets?.some(e=>e.ai)?(0,Z.jsx)(`p`,{className:`mt-3 text-[12px] text-ink-3 leading-relaxed`,children:Q(`ai.publish`)}):null]},t.id)),e.lists.map(t=>(0,Z.jsxs)(Rb,{className:`p-4 sm:p-5`,children:[(0,Z.jsxs)(`div`,{className:`mb-3 flex flex-wrap items-center justify-between gap-3`,children:[(0,Z.jsx)(`h3`,{className:`font-display font-semibold text-[17px]`,children:t.label??t.def.title}),(0,Z.jsx)(FO,{runId:e.id,list:t})]}),(0,Z.jsx)(AO,{runId:e.id,list:t,editable:!0})]},t.def.id))]}),(0,Z.jsx)(nk,{view:e,run:t,children:r?(0,Z.jsxs)(Eb,{variant:`secondary`,onClick:r,children:[(0,Z.jsx)(Ev,{className:`size-4`}),` `,Q(`run.again`)]}):(0,Z.jsx)(`span`,{})})]})}function ck({view:e,run:t}){return(0,Z.jsxs)(`div`,{className:`flex animate-rise flex-col items-center pt-8 text-center`,children:[(0,Z.jsx)(ES,{kind:e.wizard.avatar,size:90}),(0,Z.jsx)(`h2`,{className:`mt-4 font-display font-semibold text-[22px]`,children:Q(`run.failed`)}),(0,Z.jsx)(`p`,{className:`mt-2 max-w-md text-[15px] text-ink-3`,children:e.error}),(0,Z.jsxs)(`div`,{className:`mt-8 flex gap-3`,children:[e.canBack?(0,Z.jsxs)(Eb,{variant:`ghost`,onClick:()=>void t.back(),children:[(0,Z.jsx)(Jg,{className:`size-4`}),` `,Q(`run.back`)]}):null,(0,Z.jsxs)(Eb,{onClick:()=>void t.retry(),busy:t.busy,children:[(0,Z.jsx)(Ev,{className:`size-4`}),` `,Q(`run.retry`)]})]})]})}function lk({runId:e,compact:t,onRestart:n,onView:r,stickyProgress:i}){let a=XO(e),{view:o}=a;(0,y.useEffect)(()=>{r?.(o)},[o,r]),tE();let s=nE(o?.status===`running`&&!o.ask);if(ak(o),a.notFound)return(0,Z.jsx)(`div`,{className:`py-24 text-center text-ink-3`,children:Q(`run.notFound`)});if(!o)return(0,Z.jsx)(`div`,{className:`flex justify-center py-24 text-ink-4`,children:(0,Z.jsx)(Lb,{})});let c=o.step,l=null;if(o.status===`running`&&o.ask)l=(0,Z.jsx)(zE,{runId:o.id,ask:o.ask},o.ask.id);else if(o.status===`running`)l=(0,Z.jsx)(ik,{view:o,compact:t,awake:s});else if(o.status===`failed`)l=(0,Z.jsx)(ck,{view:o,run:a});else if(o.status===`cancelled`)l=(0,Z.jsx)(`div`,{className:`py-24 text-center text-ink-3`,children:Q(`run.cancelled`)});else if(c?.type===`page`)l=(0,Z.jsx)(tk,{view:o,run:a,step:c},c.id);else if(c?.type===`review`){let e=o.shown.map(e=>e.output?.at??``).join(`|`);l=(0,Z.jsx)(ok,{view:o,run:a,step:c},`${c.id}:${e}`)}else c?.type===`result`&&(l=(0,Z.jsx)(sk,{view:o,run:a,step:c,onRestart:n}));let u=c?.type===`review`&&o.status===`waiting_input`&&o.lists.some(e=>e.def.check);return(0,Z.jsxs)(`div`,{className:`flex min-h-full flex-col`,children:[i?(0,Z.jsx)(`div`,{className:`sticky top-0 z-10`,children:(0,Z.jsx)(ZO,{view:o})}):(0,Z.jsx)(ZO,{view:o}),(0,Z.jsxs)(`div`,{className:$(`safe-x mx-auto w-full flex-1`,u?`max-w-[1240px] py-8`:t?`max-w-[620px] py-8`:`max-w-[640px] py-8 sm:py-16`),children:[l,a.error&&o.status!==`failed`?(0,Z.jsx)(`div`,{className:`mt-4 rounded-lg bg-rose-tint px-4 py-3 text-[14px] text-rose`,children:a.error}):null,o.keeps&&o.status!==`running`?(0,Z.jsx)(`div`,{className:`mt-10 flex justify-center`,children:(0,Z.jsx)(LO,{runId:o.id})}):null]})]})}var uk=Object.defineProperty,dk=(e,t,n)=>t in e?uk(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,fk=(e,t)=>{for(var n in t)uk(e,n,{get:t[n],enumerable:!0})},pk=(e,t,n)=>dk(e,typeof t==`symbol`?t:t+``,n),mk={};fk(mk,{Graph:()=>$k,alg:()=>Dk});var hk=Object.defineProperty,gk=(e,t)=>{for(var n in t)hk(e,n,{get:t[n],enumerable:!0})},_k=class{constructor(e){this._isDirected=!0,this._isMultigraph=!1,this._isCompound=!1,this._nodes={},this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={},this._nodeCount=0,this._edgeCount=0,this._defaultNodeLabelFn=()=>{},this._defaultEdgeLabelFn=()=>{},e&&(this._isDirected=`directed`in e?e.directed:!0,this._isMultigraph=`multigraph`in e&&e.multigraph,this._isCompound=`compound`in e&&e.compound),this._isCompound&&(this._parent={},this._children={},this._children[`\0`]={})}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(e){return this._label=e,this}graph(){return this._label}setDefaultNodeLabel(e){return this._defaultNodeLabelFn=typeof e==`function`?e:()=>e,this}nodeCount(){return this._nodeCount}nodes(){return Object.keys(this._nodes)}sources(){return this.nodes().filter(e=>Object.keys(this._in[e]).length===0)}sinks(){return this.nodes().filter(e=>Object.keys(this._out[e]).length===0)}setNodes(e,t){return e.forEach(e=>{t===void 0?this.setNode(e):this.setNode(e,t)}),this}setNode(e,t){return e in this._nodes?(arguments.length>1&&(this._nodes[e]=t),this):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=`\0`,this._children[e]={},this._children[`\0`][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)}node(e){return this._nodes[e]}hasNode(e){return e in this._nodes}removeNode(e){if(e in this._nodes){let t=e=>this.removeEdge(this._edgeObjs[e]);delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],this.children(e).forEach(e=>{this.setParent(e)}),delete this._children[e]),Object.keys(this._in[e]).forEach(t),delete this._in[e],delete this._preds[e],Object.keys(this._out[e]).forEach(t),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this}setParent(e,t){if(!this._isCompound)throw Error(`Cannot set parent in a non-compound graph`);if(t===void 0)t=`\0`;else{t+=``;for(let n=t;n!==void 0;n=this.parent(n))if(n===e)throw Error(`Setting `+t+` as parent of `+e+` would create a cycle`);this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this}parent(e){if(this._isCompound){let t=this._parent[e];if(t!==`\0`)return t}}children(e=`\0`){if(this._isCompound){let t=this._children[e];if(t)return Object.keys(t)}else{if(e===`\0`)return this.nodes();if(this.hasNode(e))return[]}return[]}predecessors(e){let t=this._preds[e];if(t)return Object.keys(t)}successors(e){let t=this._sucs[e];if(t)return Object.keys(t)}neighbors(e){let t=this.predecessors(e);if(t){let n=new Set(t),r=this.successors(e);if(r)for(let e of r)n.add(e);return Array.from(n.values())}}isLeaf(e){let t;return t=this.isDirected()?this.successors(e):this.neighbors(e),(t?.length??0)===0}filterNodes(e){let t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph()),Object.entries(this._nodes).forEach(([n,r])=>{e(n)&&t.setNode(n,r)}),Object.values(this._edgeObjs).forEach(e=>{t.hasNode(e.v)&&t.hasNode(e.w)&&t.setEdge(e,this.edge(e))});let n={},r=e=>{let i=this.parent(e);return!i||t.hasNode(i)?(n[e]=i,i):i in n?n[i]:r(i)};return this._isCompound&&t.nodes().forEach(e=>t.setParent(e,r(e))),t}setDefaultEdgeLabel(e){return this._defaultEdgeLabelFn=typeof e==`function`?e:()=>e,this}edgeCount(){return this._edgeCount}edges(){return Object.values(this._edgeObjs)}setPath(e,t){return e.reduce((e,n)=>(t===void 0?this.setEdge(e,n):this.setEdge(e,n,t),n)),this}setEdge(e,t,n,r){let i,a,o,s,c=!1;typeof e==`object`&&e&&`v`in e?(i=e.v,a=e.w,o=e.name,arguments.length===2&&(s=t,c=!0)):(i=e,a=t,o=r,arguments.length>2&&(s=n,c=!0)),i=``+i,a=``+a,o!==void 0&&(o=``+o);let l=bk(this._isDirected,i,a,o);if(l in this._edgeLabels)return c&&(this._edgeLabels[l]=s),this;if(o!==void 0&&!this._isMultigraph)throw Error(`Cannot set a named edge when isMultigraph = false`);this.setNode(i),this.setNode(a),this._edgeLabels[l]=c?s:this._defaultEdgeLabelFn(i,a,o);let u=xk(this._isDirected,i,a,o);return i=u.v,a=u.w,Object.freeze(u),this._edgeObjs[l]=u,vk(this._preds[a],i),vk(this._sucs[i],a),this._in[a][l]=u,this._out[i][l]=u,this._edgeCount++,this}edge(e,t,n){let r=arguments.length===1?Sk(this._isDirected,e):bk(this._isDirected,e,t,n);return this._edgeLabels[r]}edgeAsObj(e,t,n){let r=arguments.length===1?this.edge(e):this.edge(e,t,n);return typeof r!=`object`||!r?{label:r}:r}hasEdge(e,t,n){return(arguments.length===1?Sk(this._isDirected,e):bk(this._isDirected,e,t,n))in this._edgeLabels}removeEdge(e,t,n){let r=arguments.length===1?Sk(this._isDirected,e):bk(this._isDirected,e,t,n),i=this._edgeObjs[r];if(i){let e=i.v,t=i.w;delete this._edgeLabels[r],delete this._edgeObjs[r],yk(this._preds[t],e),yk(this._sucs[e],t),delete this._in[t][r],delete this._out[e][r],this._edgeCount--}return this}inEdges(e,t){return this.isDirected()?this.filterEdges(this._in[e],e,t):this.nodeEdges(e,t)}outEdges(e,t){return this.isDirected()?this.filterEdges(this._out[e],e,t):this.nodeEdges(e,t)}nodeEdges(e,t){if(e in this._nodes)return this.filterEdges({...this._in[e],...this._out[e]},e,t)}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}filterEdges(e,t,n){if(!e)return;let r=Object.values(e);return n?r.filter(e=>e.v===t&&e.w===n||e.v===n&&e.w===t):r}};function vk(e,t){e[t]?e[t]++:e[t]=1}function yk(e,t){e[t]!==void 0&&!--e[t]&&delete e[t]}function bk(e,t,n,r){let i=``+t,a=``+n;if(!e&&i>a){let e=i;i=a,a=e}return i+``+a+``+(r===void 0?`\0`:r)}function xk(e,t,n,r){let i=``+t,a=``+n;if(!e&&i>a){let e=i;i=a,a=e}let o={v:i,w:a};return r&&(o.name=r),o}function Sk(e,t){return bk(e,t.v,t.w,t.name)}gk({},{read:()=>Ek,write:()=>Ck});function Ck(e){let t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:wk(e),edges:Tk(e)},n=e.graph();return n!==void 0&&(t.value=structuredClone(n)),t}function wk(e){return e.nodes().map(t=>{let n=e.node(t),r=e.parent(t),i={v:t};return n!==void 0&&(i.value=n),r!==void 0&&(i.parent=r),i})}function Tk(e){return e.edges().map(t=>{let n=e.edge(t),r={v:t.v,w:t.w};return t.name!==void 0&&(r.name=t.name),n!==void 0&&(r.value=n),r})}function Ek(e){let t=new _k(e.options);return e.value!==void 0&&t.setGraph(e.value),e.nodes.forEach(e=>{t.setNode(e.v,e.value),e.parent&&t.setParent(e.v,e.parent)}),e.edges.forEach(e=>{t.setEdge({v:e.v,w:e.w,name:e.name},e.value)}),t}var Dk={};gk(Dk,{CycleException:()=>Hk,bellmanFord:()=>kk,components:()=>jk,dijkstra:()=>Pk,dijkstraAll:()=>Ik,findCycles:()=>Rk,floydWarshall:()=>Bk,isAcyclic:()=>Wk,postorder:()=>Jk,preorder:()=>Yk,prim:()=>Xk,shortestPaths:()=>Zk,tarjan:()=>Lk,topsort:()=>Uk});var Ok=()=>1;function kk(e,t,n,r){return Ak(e,String(t),n||Ok,r||function(t){return e.outEdges(t)??[]})}function Ak(e,t,n,r){let i={},a,o=0,s=e.nodes(),c=function(e){let t=i[e.v],r=i[e.w];if(!t||!r)return;let o=n(e);t.distance+o<r.distance&&(i[e.w]={distance:t.distance+o,predecessor:e.v},a=!0)},l=function(){s.forEach(function(e){r(e).forEach(function(t){let n=t.v===e?t.v:t.w,r=n===t.v?t.w:t.v;c({v:n,w:r})})})};s.forEach(function(e){i[e]={distance:e===t?0:1/0,predecessor:``}});let u=s.length;for(let e=1;e<u&&(a=!1,o++,l(),a);e++);if(o===u-1&&(a=!1,l(),a))throw Error(`The graph contains a negative weight cycle`);return i}function jk(e){let t={},n=[],r;function i(n){var a,o;n in t||(t[n]=!0,r.push(n),(a=e.successors(n))==null||a.forEach(i),(o=e.predecessors(n))==null||o.forEach(i))}return e.nodes().forEach(function(e){r=[],i(e),r.length&&n.push(r)}),n}var Mk=class{constructor(){this._arr=[],this._keyIndices={}}size(){return this._arr.length}keys(){return this._arr.map(e=>e.key)}has(e){return e in this._keyIndices}priority(e){let t=this._keyIndices[e];if(t!==void 0)return this._arr[t].priority}min(){if(this.size()===0)throw Error(`Queue underflow`);return this._arr[0].key}add(e,t){let n=this._keyIndices,r=String(e);if(!(r in n)){let e=this._arr,i=e.length;return n[r]=i,e.push({key:r,priority:t}),this._decrease(i),!0}return!1}removeMin(){if(this.size()===0)throw Error(`Queue underflow`);this._swap(0,this._arr.length-1);let e=this._arr.pop();return delete this._keyIndices[e.key],this._heapify(0),e.key}decrease(e,t){let n=this._keyIndices[e];if(n===void 0)throw Error(`Key not found: ${e}`);let r=this._arr[n].priority;if(t>r)throw Error(`New priority is greater than current priority. Key: ${e} Old: ${r} New: ${t}`);this._arr[n].priority=t,this._decrease(n)}_heapify(e){let t=this._arr,n=2*e,r=n+1,i=e;n<t.length&&(i=t[n].priority<t[i].priority?n:i,r<t.length&&(i=t[r].priority<t[i].priority?r:i),i!==e&&(this._swap(e,i),this._heapify(i)))}_decrease(e){let t=this._arr,n=t[e].priority,r;for(;e!==0&&(r=e>>1,!(t[r].priority<n));)this._swap(e,r),e=r}_swap(e,t){let n=this._arr,r=this._keyIndices,i=n[e],a=n[t];n[e]=a,n[t]=i,r[a.key]=e,r[i.key]=t}},Nk=()=>1;function Pk(e,t,n,r){return Fk(e,String(t),n||Nk,r||function(t){return e.outEdges(t)??[]})}function Fk(e,t,n,r){let i={},a=new Mk,o,s,c=function(e){let t=e.v===o?e.w:e.v,r=i[t];if(!r)return;let c=n(e),l=s.distance+c;if(c<0)throw Error(`dijkstra does not allow negative edge weights. Bad edge: `+e+` Weight: `+c);l<r.distance&&(r.distance=l,r.predecessor=o,a.decrease(t,l))};for(e.nodes().forEach(function(e){let n=e===t?0:1/0;i[e]={distance:n,predecessor:``},a.add(e,n)});a.size()>0;){o=a.removeMin();let e=i[o];if(!e||e.distance===1/0)break;s=e,r(o).forEach(c)}return i}function Ik(e,t,n){return e.nodes().reduce(function(r,i){return r[i]=Pk(e,i,t,n),r},{})}function Lk(e){let t=0,n=[],r={},i=[];function a(o){var s;let c=r[o]={onStack:!0,lowlink:t,index:t++};if(n.push(o),(s=e.successors(o))==null||s.forEach(function(e){if(e in r){let t=r[e];t!=null&&t.onStack&&(c.lowlink=Math.min(c.lowlink,t.index))}else{a(e);let t=r[e];t&&(c.lowlink=Math.min(c.lowlink,t.lowlink))}}),c.lowlink===c.index){let e=[],t;do{t=n.pop();let i=r[t];i&&(i.onStack=!1),e.push(t)}while(o!==t);i.push(e)}}return e.nodes().forEach(function(e){e in r||a(e)}),i}function Rk(e){return Lk(e).filter(function(t){let n=t[0];return n?t.length>1||t.length===1&&(e.outEdges(n,n)??[]).length>0:!1})}var zk=()=>1;function Bk(e,t,n){return Vk(e,t||zk,n||function(t){return e.outEdges(t)??[]})}function Vk(e,t,n){let r={},i=e.nodes();return i.forEach(function(e){let a={};r[e]=a,a[e]={distance:0,predecessor:``},i.forEach(function(t){e!==t&&(a[t]={distance:1/0,predecessor:``})}),n(e).forEach(function(n){let r=n.v===e?n.w:n.v,i=t(n);a[r]={distance:i,predecessor:e}})}),i.forEach(function(e){let t=r[e];t&&i.forEach(function(n){let a=r[n];a&&i.forEach(function(n){let r=a[e],i=t[n],o=a[n];if(r&&i&&o){let e=r.distance+i.distance;e<o.distance&&(o.distance=e,o.predecessor=i.predecessor)}})})}),r}var Hk=class extends Error{constructor(e){super(e),this.name=`CycleException`}};function Uk(e){let t={},n={},r=[];function i(a){var o;if(a in n)throw new Hk;a in t||(n[a]=!0,t[a]=!0,(o=e.predecessors(a))==null||o.forEach(i),delete n[a],r.push(a))}if(e.sinks().forEach(i),Object.keys(t).length!==e.nodeCount())throw new Hk;return r}function Wk(e){try{Uk(e)}catch(e){if(e instanceof Hk)return!1;throw e}return!0}function Gk(e,t,n,r,i){Array.isArray(t)||(t=[t]);let a=(t=>(e.isDirected()?e.successors(t):e.neighbors(t))??[]),o={};return t.forEach(function(t){if(!e.hasNode(t))throw Error(`Graph does not have node: `+t);i=Kk(e,t,n===`post`,o,a,r,i)}),i}function Kk(e,t,n,r,i,a,o){return t in r||(r[t]=!0,n||(o=a(o,t)),i(t).forEach(function(t){o=Kk(e,t,n,r,i,a,o)}),n&&(o=a(o,t))),o}function qk(e,t,n){return Gk(e,t,n,function(e,t){return e.push(t),e},[])}function Jk(e,t){return qk(e,t,`post`)}function Yk(e,t){return qk(e,t,`pre`)}function Xk(e,t){var n;let r=new _k,i={},a=new Mk,o;function s(e){let n=e.v===o?e.w:e.v,r=a.priority(n);if(r!==void 0){let s=t(e);s<r&&(i[n]=o,a.decrease(n,s))}}if(e.nodeCount()===0)return r;e.nodes().forEach(function(e){a.add(e,1/0),r.setNode(e)});let c=e.nodes()[0];c!==void 0&&a.decrease(c,0);let l=!1;for(;a.size()>0;){if(o=a.removeMin(),o in i)r.setEdge(o,i[o]);else{if(l)throw Error(`Input graph is not connected: `+e);l=!0}(n=e.nodeEdges(o))==null||n.forEach(s)}return r}function Zk(e,t,n,r){return Qk(e,t,n,r??(t=>e.outEdges(t)??[]))}function Qk(e,t,n,r){if(n===void 0)return Pk(e,t,n,r);let i=!1,a=e.nodes();for(let o=0;o<a.length;o++){let s=a[o];if(s===void 0)continue;let c=r(s);for(let e=0;e<c.length;e++){let t=c[e];if(!t)continue;let r=t.v===s?t.v:t.w;n({v:r,w:r===t.v?t.w:t.v})<0&&(i=!0)}if(i)return kk(e,t,n,r)}return Pk(e,t,n,r)}var $k=_k;function eA(e,t,n,r){let i=r;for(;e.hasNode(i);)i=gA(r);return n.dummy=t,e.setNode(i,n),i}function tA(e){let t=new $k().setGraph(e.graph());return e.nodes().forEach(n=>t.setNode(n,e.node(n))),e.edges().forEach(n=>{let r=t.edge(n.v,n.w)||{weight:0,minlen:1},i=e.edge(n);t.setEdge(n.v,n.w,{weight:r.weight+i.weight,minlen:Math.max(r.minlen,i.minlen)})}),t}function nA(e){let t=new $k({multigraph:e.isMultigraph()}).setGraph(e.graph());return e.nodes().forEach(n=>{e.children(n).length||t.setNode(n,e.node(n))}),e.edges().forEach(n=>{t.setEdge(n,e.edge(n))}),t}function rA(e,t){let n=e.x,r=e.y,i=t.x-n,a=t.y-r,o=e.width/2,s=e.height/2;if(!i&&!a)throw Error(`Not possible to find intersection inside of the rectangle`);let c,l;return Math.abs(a)*o>Math.abs(i)*s?(a<0&&(s=-s),c=s*i/a,l=s):(i<0&&(o=-o),c=o,l=o*a/i),{x:n+c,y:r+l}}function iA(e){let t=_A(dA(e)+1).map(()=>[]);return e.nodes().forEach(n=>{let r=e.node(n),i=r.rank;i!==void 0&&(t[i]||(t[i]=[]),t[i][r.order]=n)}),t}function aA(e){let t=e.nodes().map(t=>{let n=e.node(t).rank;return n===void 0?Number.MAX_VALUE:n}),n=uA(Math.min,t);e.nodes().forEach(t=>{let r=e.node(t);Object.hasOwn(r,`rank`)&&(r.rank-=n)})}function oA(e){let t=e.nodes().map(t=>e.node(t).rank).filter(e=>e!==void 0),n=uA(Math.min,t),r=[];e.nodes().forEach(t=>{let i=e.node(t).rank-n;r[i]||(r[i]=[]),r[i].push(t)});let i=0,a=e.graph().nodeRankFactor;Array.from(r).forEach((t,n)=>{t===void 0&&n%a!==0?--i:t!==void 0&&i&&t.forEach(t=>e.node(t).rank+=i)})}function sA(e,t,n,r){let i={width:0,height:0};return arguments.length>=4&&(i.rank=n,i.order=r),eA(e,`border`,i,t)}function cA(e,t=lA){let n=[];for(let r=0;r<e.length;r+=t){let i=e.slice(r,r+t);n.push(i)}return n}var lA=65535;function uA(e,t){return t.length>lA?e(...cA(t).map(t=>e(...t))):e(...t)}function dA(e){let t=e.nodes().map(t=>{let n=e.node(t).rank;return n===void 0?Number.MIN_VALUE:n});return uA(Math.max,t)}function fA(e,t){let n={lhs:[],rhs:[]};return e.forEach(e=>{t(e)?n.lhs.push(e):n.rhs.push(e)}),n}function pA(e,t){let n=Date.now();try{return t()}finally{console.log(e+` time: `+(Date.now()-n)+`ms`)}}function mA(e,t){return t()}var hA=0;function gA(e){return e+(``+ ++hA)}function _A(e,t,n=1){t??(t=e,e=0);let r=e=>e<t;n<0&&(r=e=>t<e);let i=[];for(let t=e;r(t);t+=n)i.push(t);return i}function vA(e,t){let n={};for(let r of t)e[r]!==void 0&&(n[r]=e[r]);return n}function yA(e,t){let n;return n=typeof t==`string`?e=>e[t]:t,Object.entries(e).reduce((e,[t,r])=>(e[t]=n(r,t),e),{})}function bA(e,t){return e.reduce((e,n,r)=>(e[n]=t[r],e),{})}var xA=`\0`;function SA(e,t,n){if(!(e&&t&&n&&t.dummy===`edge`&&n.dummy===`edge`&&t.edgeObj&&n.edgeObj&&e[t.edgeObj.v]&&e[n.edgeObj.v]&&e[t.edgeObj.w]&&e[n.edgeObj.w]))return 0;let r=!0;t.edgeObj.w===n.edgeObj.w&&(r=!1);let i=r?e[t.edgeObj.v]?.rank??NaN:e[t.edgeObj.w]?.rank??NaN,a=Object.entries(e).find(e=>e[1].edgeObj?.v===t.edgeObj.v&&e[1].edgeObj?.w===t.edgeObj.w&&e[1].rank===i),o=Object.entries(e).find(e=>e[1].edgeObj?.v===n.edgeObj.v&&e[1].edgeObj?.w===n.edgeObj.w&&e[1].rank===i);if(!a||!o)return 0;let s=a[1].order??NaN,c=o[1].order??NaN;return isNaN(s-c)?0:s-c}var CA=`3.1.1`,wA=class{constructor(){pk(this,`_sentinel`);let e={};e._next=e._prev=e,this._sentinel=e}dequeue(){let e=this._sentinel,t=e._prev;if(t!==e)return TA(t),t}enqueue(e){let t=this._sentinel;e._prev&&e._next&&TA(e),e._next=t._next,t._next._prev=e,t._next=e,e._prev=t}toString(){let e=[],t=this._sentinel,n=t._prev;for(;n!==t;)e.push(JSON.stringify(n,EA)),n=n._prev;return`[`+e.join(`, `)+`]`}};function TA(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function EA(e,t){if(e!==`_next`&&e!==`_prev`)return t}var DA=wA,OA=()=>1;function kA(e,t){if(e.nodeCount()<=1)return[];let n=MA(e,t||OA);return AA(n.graph,n.buckets,n.zeroIdx).flatMap(t=>e.outEdges(t.v,t.w)||[])}function AA(e,t,n){let r=[],i=t[t.length-1],a=t[0],o;for(;e.nodeCount();){for(;o=a.dequeue();)jA(e,t,n,o);for(;o=i.dequeue();)jA(e,t,n,o);if(e.nodeCount()){for(let i=t.length-2;i>0;--i)if(o=t[i]?.dequeue(),o){r=r.concat(jA(e,t,n,o,!0)||[]);break}}}return r}function jA(e,t,n,r,i){let a=[],o=i?a:void 0;return(e.inEdges(r.v)||[]).forEach(r=>{let o=e.edge(r),s=e.node(r.v);i&&a.push({v:r.v,w:r.w}),s.out-=o,NA(t,n,s)}),(e.outEdges(r.v)||[]).forEach(r=>{let i=e.edge(r),a=r.w,o=e.node(a);o.in-=i,NA(t,n,o)}),e.removeNode(r.v),o}function MA(e,t){let n=new $k,r=0,i=0;e.nodes().forEach(e=>{n.setNode(e,{v:e,in:0,out:0})}),e.edges().forEach(e=>{let a=n.edge(e.v,e.w)||0,o=t(e),s=a+o;n.setEdge(e.v,e.w,s);let c=n.node(e.v),l=n.node(e.w);i=Math.max(i,c.out+=o),r=Math.max(r,l.in+=o)});let a=PA(i+r+3).map(()=>new DA),o=r+1;return n.nodes().forEach(e=>{NA(a,o,n.node(e))}),{graph:n,buckets:a,zeroIdx:o}}function NA(e,t,n){var r,i,a;n.out?n.in?(a=e[n.out-n.in+t])==null||a.enqueue(n):(i=e[e.length-1])==null||i.enqueue(n):(r=e[0])==null||r.enqueue(n)}function PA(e){let t=[];for(let n=0;n<e;n++)t.push(n);return t}function FA(e,t){(e.graph().acyclicer===`greedy`?kA(e,n(e)):IA(e,t??null)).forEach(t=>{let n=e.edge(t);e.removeEdge(t),n.forwardName=t.name,n.reversed=!0,e.setEdge(t.w,t.v,n,gA(`rev`))});function n(e){return t=>e.edge(t).weight}}function IA(e,t){let n=[],r={},i={};function a(t){Object.hasOwn(i,t)||(i[t]=!0,r[t]=!0,e.outEdges(t).forEach(e=>{Object.hasOwn(r,e.w)?n.push(e):a(e.w)}),delete r[t])}function o(a){var s;Object.hasOwn(i,a)||(i[a]=!0,r[a]=!0,(s=e.outEdges(a))==null||s.forEach(i=>{Object.hasOwn(r,i.w)||t.node(a)?.rank>t.node(i.w)?.rank&&RA(e,i.w,i)?n.push(i):o(i.w)}),delete r[a])}let s=a;return t&&typeof t.node==`function`&&(s=o),e.sources().forEach(s),e.nodes().forEach(s),n}function LA(e){e.edges().forEach(t=>{let n=e.edge(t);if(n.reversed){e.removeEdge(t);let r=n.forwardName;delete n.reversed,delete n.forwardName,e.setEdge(t.w,t.v,n,r)}})}function RA(e,t,n){let r=new Set;function i(t){if(e.sources().includes(t))return!0;r.add(t);for(let a of e.inEdges(t)??[])if((a.v!==n.v||a.w!==n.w)&&!r.has(a.v)&&i(a.v))return!0;return!1}return i(t)}function zA(e){e.graph().dummyChains=[],e.edges().forEach(t=>BA(e,t))}function BA(e,t){let n=t.v,r=e.node(n).rank,i=t.w,a=e.node(i).rank,o=t.name,s=e.edge(t),c=s.labelRank;if(a===r+1)return;e.removeEdge(t);let l,u,d=0;for(++r;r<a;++d,++r)s.points=[],u={width:0,height:0,edgeLabel:s,edgeObj:t,rank:r},l=eA(e,`edge`,u,`_d`),r===c&&(u.width=s.width,u.height=s.height,u.dummy=`edge-label`,u.labelpos=s.labelpos),e.setEdge(n,l,{weight:s.weight},o),d===0&&e.graph().dummyChains.push(l),n=l;e.setEdge(n,i,{weight:s.weight},o)}function VA(e){e.graph().dummyChains.forEach(t=>{let n=e.node(t),r=n.edgeLabel,i;for(e.setEdge(n.edgeObj,r);n.dummy;)i=e.successors(t)[0],e.removeNode(t),r.points.push({x:n.x,y:n.y}),n.dummy===`edge-label`&&(r.x=n.x,r.y=n.y,r.width=n.width,r.height=n.height),t=i,n=e.node(t)})}function HA(e){let t={};function n(r){let i=e.node(r);if(Object.hasOwn(t,r))return i.rank;t[r]=!0;let a=e.outEdges(r),o=a?a.map(t=>t==null?1/0:n(t.w)-e.edge(t).minlen):[],s=uA(Math.min,o);return s===1/0&&(s=0),i.rank=s}e.sources().forEach(n)}function UA(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}var WA=GA;function GA(e){let t=new $k({directed:!1}),n=e.nodes();if(n.length===0)throw Error(`Graph must have at least one node`);let r=n[0],i=e.nodeCount();t.setNode(r,{});let a,o;for(;KA(t,e)<i&&(a=qA(t,e),a);)o=t.hasNode(a.v)?UA(e,a):-UA(e,a),JA(t,e,o);return t}function KA(e,t){function n(r){let i=t.nodeEdges(r);i&&i.forEach(i=>{let a=i.v,o=r===a?i.w:a;!e.hasNode(o)&&!UA(t,i)&&(e.setNode(o,{}),e.setEdge(r,o,{}),n(o))})}return e.nodes().forEach(n),e.nodeCount()}function qA(e,t){return t.edges().reduce((n,r)=>{let i=1/0;return e.hasNode(r.v)!==e.hasNode(r.w)&&(i=UA(t,r)),i<n[0]?[i,r]:n},[1/0,null])[1]}function JA(e,t,n){e.nodes().forEach(e=>t.node(e).rank+=n)}var{preorder:YA,postorder:XA}=Dk,ZA=QA;QA.initLowLimValues=nj,QA.initCutValues=$A,QA.calcCutValue=tj,QA.leaveEdge=ij,QA.enterEdge=aj,QA.exchangeEdges=oj;function QA(e){e=tA(e),HA(e);let t=WA(e);nj(t),$A(t,e);let n,r;for(;n=ij(t);)r=aj(t,e,n),oj(t,e,n,r)}function $A(e,t){let n=XA(e,e.nodes());n=n.slice(0,n.length-1),n.forEach(n=>ej(e,t,n))}function ej(e,t,n){let r=e.node(n).parent,i=e.edge(n,r);i.cutvalue=tj(e,t,n)}function tj(e,t,n){let r=e.node(n).parent,i=!0,a=t.edge(n,r),o=0;a||=(i=!1,t.edge(r,n)),o=a.weight;let s=t.nodeEdges(n);return s&&s.forEach(a=>{let s=a.v===n,c=s?a.w:a.v;if(c!==r){let r=s===i,l=t.edge(a).weight;if(o+=r?l:-l,cj(e,n,c)){let t=e.edge(n,c).cutvalue;o+=r?-t:t}}}),o}function nj(e,t){arguments.length<2&&(t=e.nodes()[0]),rj(e,{},1,t)}function rj(e,t,n,r,i){let a=n,o=e.node(r);t[r]=!0;let s=e.neighbors(r);return s&&s.forEach(i=>{Object.hasOwn(t,i)||(n=rj(e,t,n,i,r))}),o.low=a,o.lim=n++,i?o.parent=i:delete o.parent,n}function ij(e){return e.edges().find(t=>e.edge(t).cutvalue<0)}function aj(e,t,n){let r=n.v,i=n.w;t.hasEdge(r,i)||(r=n.w,i=n.v);let a=e.node(r),o=e.node(i),s=a,c=!1;return a.lim>o.lim&&(s=o,c=!0),t.edges().filter(t=>c===lj(e,e.node(t.v),s)&&c!==lj(e,e.node(t.w),s)).reduce((e,n)=>UA(t,n)<UA(t,e)?n:e)}function oj(e,t,n,r){let i=n.v,a=n.w;e.removeEdge(i,a),e.setEdge(r.v,r.w,{}),nj(e),$A(e,t),sj(e,t)}function sj(e,t){let n=e.nodes().find(t=>!e.node(t).parent);if(!n)return;let r=YA(e,[n]);r=r.slice(1),r.forEach(n=>{let r=e.node(n).parent,i=t.edge(n,r),a=!1;i||(i=t.edge(r,n),a=!0),t.node(n).rank=t.node(r).rank+(a?i.minlen:-i.minlen)})}function cj(e,t,n){return e.hasEdge(t,n)}function lj(e,t,n){return n.low<=t.lim&&t.lim<=n.lim}var uj=dj;function dj(e){let t=e.graph().ranker;if(typeof t==`function`)return t(e);switch(t){case`network-simplex`:mj(e);break;case`tight-tree`:pj(e);break;case`longest-path`:fj(e);break;case`none`:break;default:mj(e)}}var fj=HA;function pj(e){HA(e),WA(e)}function mj(e){ZA(e)}var hj=gj;function gj(e){let t=vj(e),n=e.graph();Array.isArray(n.dummyChains)&&n.dummyChains.forEach(n=>{let r=e.node(n),i=r.edgeObj,a=_j(e,t,i.v,i.w),o=a.path,s=a.lca,c=0,l=o[c],u=!0;for(;n!==i.w;){if(r=e.node(n),u){for(;(l=o[c])!==s&&e.node(l).maxRank<r.rank;)c++;l===s&&(u=!1)}if(!u){for(;c<o.length-1&&e.node(o[c+1]).minRank<=r.rank;)c++;l=o[c]}l!==void 0&&e.setParent(n,l),n=e.successors(n)[0]}})}function _j(e,t,n,r){let i=[],a=[],o=Math.min(t[n].low,t[r].low),s=Math.max(t[n].lim,t[r].lim),c;c=n;do c=e.parent(c),i.push(c);while(c&&(t[c].low>o||s>t[c].lim));let l=c,u=r;for(;(u=e.parent(u))!==l;)a.push(u);return{path:i.concat(a.reverse()),lca:l}}function vj(e){let t={},n=0;function r(i){let a=n;e.children(i).forEach(r),t[i]={low:a,lim:n++}}return e.children(xA).forEach(r),t}function yj(e){let t=eA(e,`root`,{},`_root`),n=xj(e),r=Object.values(n),i=uA(Math.max,r)-1,a=2*i+1;e.graph().nestingRoot=t,e.edges().forEach(t=>e.edge(t).minlen*=a);let o=Sj(e)+1;e.children(xA).forEach(r=>{bj(e,t,a,o,i,n,r)}),e.graph().nodeRankFactor=a}function bj(e,t,n,r,i,a,o){let s=e.children(o);if(!s.length){o!==t&&e.setEdge(t,o,{weight:0,minlen:n});return}let c=sA(e,`_bt`),l=sA(e,`_bb`),u=e.node(o);e.setParent(c,o),u.borderTop=c,e.setParent(l,o),u.borderBottom=l,s.forEach(s=>{bj(e,t,n,r,i,a,s);let u=e.node(s),d=u.borderTop?u.borderTop:s,f=u.borderBottom?u.borderBottom:s,p=u.borderTop?r:2*r,m=d===f?i-(a[o]??0)+1:1;e.setEdge(c,d,{weight:p,minlen:m,nestingEdge:!0}),e.setEdge(f,l,{weight:p,minlen:m,nestingEdge:!0})}),e.parent(o)||e.setEdge(t,c,{weight:0,minlen:i+(a[o]??0)})}function xj(e){let t={};function n(r,i){let a=e.children(r);a&&a.length&&a.forEach(e=>n(e,i+1)),t[r]=i}return e.children(xA).forEach(e=>n(e,1)),t}function Sj(e){return e.edges().reduce((t,n)=>t+e.edge(n).weight,0)}function Cj(e){let t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,e.edges().forEach(t=>{e.edge(t).nestingEdge&&e.removeEdge(t)})}var wj=Tj;function Tj(e){function t(n){let r=e.children(n),i=e.node(n);if(r.length&&r.forEach(t),i&&Object.hasOwn(i,`minRank`)){i.borderLeft=[],i.borderRight=[];for(let t=i.minRank,r=i.maxRank+1;t<r;++t)Ej(e,`borderLeft`,`_bl`,n,i,t),Ej(e,`borderRight`,`_br`,n,i,t)}}e.children(xA).forEach(t)}function Ej(e,t,n,r,i,a){let o={width:0,height:0,rank:a,borderType:t},s=i[t][a-1],c=eA(e,`border`,o,n);i[t][a]=c,e.setParent(c,r),s&&e.setEdge(s,c,{weight:1})}function Dj(e){let t=e.graph().rankdir?.toLowerCase();(t===`lr`||t===`rl`)&&kj(e)}function Oj(e){let t=e.graph().rankdir?.toLowerCase();(t===`bt`||t===`rl`)&&jj(e),(t===`lr`||t===`rl`)&&(Nj(e),kj(e))}function kj(e){e.nodes().forEach(t=>Aj(e.node(t))),e.edges().forEach(t=>Aj(e.edge(t)))}function Aj(e){let t=e.width;e.width=e.height,e.height=t}function jj(e){e.nodes().forEach(t=>Mj(e.node(t))),e.edges().forEach(t=>{var n;let r=e.edge(t);(n=r.points)==null||n.forEach(Mj),Object.hasOwn(r,`y`)&&Mj(r)})}function Mj(e){e.y=-e.y}function Nj(e){e.nodes().forEach(t=>Pj(e.node(t))),e.edges().forEach(t=>{var n;let r=e.edge(t);(n=r.points)==null||n.forEach(Pj),Object.hasOwn(r,`x`)&&Pj(r)})}function Pj(e){let t=e.x;e.x=e.y,e.y=t}function Fj(e,t=null){let n={},r=e.nodes().filter(t=>!e.children(t).length),i=r.map(t=>e.node(t).rank),a=_A(uA(Math.max,i)+1).map(()=>[]);function o(t){if(n[t])return;n[t]=!0;let r=e.node(t);a[r.rank].push(t);let i=e.successors(t);i&&[...i].sort((e,t)=>s(e,t)).forEach(o)}r.sort((t,n)=>e.node(t).rank-e.node(n).rank).forEach(o);function s(n,r){return SA(t,e.node(n),e.node(r))}return a}function Ij(e,t){let n=0;for(let r=1;r<t.length;++r)n+=Lj(e,t[r-1],t[r]);return n}function Lj(e,t,n){let r=bA(n,n.map((e,t)=>t)),i=t.flatMap(t=>{let n=e.outEdges(t);return n?n.map(t=>({pos:r[t.w],weight:e.edge(t).weight})).sort((e,t)=>e.pos-t.pos):[]}),a=1;for(;a<n.length;)a<<=1;let o=2*a-1;--a;let s=Array(o).fill(0),c=0;return i.forEach(e=>{let t=e.pos+a;s[t]+=e.weight;let n=0;for(;t>0;)t%2&&(n+=s[t+1]),t=t-1>>1,s[t]+=e.weight;c+=e.weight*n}),c}function Rj(e,t=[]){return t.map(t=>{let n=e.inEdges(t);if(!n||!n.length)return{v:t};{let r=n.reduce((t,n)=>{let r=e.edge(n),i=e.node(n.v);return{sum:t.sum+r.weight*i.order,weight:t.weight+r.weight}},{sum:0,weight:0});return{v:t,barycenter:r.sum/r.weight,weight:r.weight}}})}function zj(e,t){let n={};return e.forEach((e,t)=>{let r={indegree:0,in:[],out:[],vs:[e.v],i:t};e.barycenter!==void 0&&(r.barycenter=e.barycenter,r.weight=e.weight),n[e.v]=r}),t.edges().forEach(e=>{let t=n[e.v],r=n[e.w];t!==void 0&&r!==void 0&&(r.indegree++,t.out.push(r))}),Bj(Object.values(n).filter(e=>!e.indegree))}function Bj(e){let t=[];function n(e){return t=>{t.merged||(t.barycenter===void 0||e.barycenter===void 0||t.barycenter>=e.barycenter)&&Vj(e,t)}}function r(t){return n=>{n.in.push(t),--n.indegree===0&&e.push(n)}}for(;e.length;){let i=e.pop();t.push(i),i.in.reverse().forEach(n(i)),i.out.forEach(r(i))}return t.filter(e=>!e.merged).map(e=>vA(e,[`vs`,`i`,`barycenter`,`weight`]))}function Vj(e,t){let n=0,r=0;e.weight&&(n+=e.barycenter*e.weight,r+=e.weight),t.weight&&(n+=t.barycenter*t.weight,r+=t.weight),e.vs=t.vs.concat(e.vs),e.barycenter=n/r,e.weight=r,e.i=Math.min(t.i,e.i),t.merged=!0}function Hj(e,t,n,r,i){let a={},o=null,s=null,c=i;typeof t==`boolean`?(c=t,a={}):t&&(a=t,o=n??null,s=r??null);let l=fA(e,e=>Object.hasOwn(e,`barycenter`)),u=l.lhs,d=l.rhs.sort((e,t)=>t.i-e.i),f=[],p=0,m=0,h=0;u.sort(Wj(s,o,!!c));for(let[e,t]of Object.entries(a)){let n=u.findIndex(t=>t.vs[0]===e);u.splice(n+1,0,t)}h=Uj(f,d,h),u.forEach(e=>{h+=e.vs.length,f.push(e.vs),p+=e.barycenter*e.weight,m+=e.weight,h=Uj(f,d,h)});let g={vs:f.flat(1)};return m&&(g.barycenter=p/m,g.weight=m),g}function Uj(e,t,n){let r;for(;t.length&&(r=t[t.length-1]).i<=n;)t.pop(),e.push(r.vs),n++;return n}function Wj(e,t,n){return(r,i)=>{if(r.barycenter<i.barycenter)return-1;if(r.barycenter>i.barycenter)return 1;if(e&&(typeof r.vs[0]==`string`||typeof i.vs[0]==`string`)){let n=SA(t,e.node(r.vs[0]),e.node(i.vs[0]));if(n!==0)return n}return n?i.i-r.i:r.i-i.i}}function Gj(e,t,n,r,i){var a,o;let s=null,c=i;typeof r==`boolean`?(c=r,s=null):r!==void 0&&(s=r);let l=e.children(t),u=e.node(t),d=u?u.borderLeft:void 0,f=u?u.borderRight:void 0,p={};d&&(l=l.filter(e=>e!==d&&e!==f));let m=Rj(e,l);m.forEach(t=>{if(e.children(t.v).length){let{result:r}=Gj(e,t.v,n,s,c);p[t.v]=r,Object.hasOwn(r,`barycenter`)&&qj(t,r)}});let h=zj(m,n);Kj(h,p);let g={},_=!1;for(let t=0;t<h.length;t++)for(let n=t+1;n<h.length;n++)if(h[t]&&h[n]&&(a=h[t])!=null&&a.barycenter&&(o=h[n])!=null&&o.barycenter&&h[t]?.barycenter===h[n].barycenter){let r=h[t]?.vs[0]??``,i=h[n]?.vs[0]??``,a=e.node(r),o=e.node(i);if(a.dummy===`edge`&&o.dummy===`edge`&&a.edgeObj?.v===o.edgeObj?.v&&a.edgeObj?.w===o.edgeObj?.w){if(a.edgeLabel.reversed){g[i]=h[t],h.splice(t,1),t--;break}g[r]=h[n],h.splice(n,1),n--}else _=!0}let v=Hj(h,g,s,e,c);if(d&&f){v.vs=[d,v.vs,f].flat(1);let t=e.predecessors(d);if(t&&t.length){let n=e.node(t[0]),r=e.predecessors(f),i=e.node(r[0]);Object.hasOwn(v,`barycenter`)||(v.barycenter=0,v.weight=0),v.barycenter=(v.barycenter*v.weight+n.order+i.order)/(v.weight+2),v.weight+=2}}return Object.defineProperty(v,"result",{value:v,enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(v,"usedBias",{value:_,enumerable:!1,configurable:!0,writable:!0}),v}function Kj(e,t){e.forEach(e=>{e.vs=e.vs.flatMap(e=>t[e]?t[e].vs:e)})}function qj(e,t){e.barycenter===void 0?(e.barycenter=t.barycenter,e.weight=t.weight):(e.barycenter=(e.barycenter*e.weight+t.barycenter*t.weight)/(e.weight+t.weight),e.weight+=t.weight)}function Jj(e,t,n,r){r||=e.nodes();let i=Yj(e),a=new $k({compound:!0}).setGraph({root:i}).setDefaultNodeLabel(t=>e.node(t));return r.forEach(r=>{let o=e.node(r),s=e.parent(r);if(o.rank===t||o.minRank<=t&&t<=o.maxRank){a.setNode(r),a.setParent(r,s||i);let c=e[n](r);c&&c.forEach(t=>{let n=t.v===r?t.w:t.v,i=a.edge(n,r),o=i===void 0?0:i.weight;a.setEdge(n,r,{weight:e.edge(t).weight+o})}),Object.hasOwn(o,`minRank`)&&a.setNode(r,{borderLeft:o.borderLeft[t],borderRight:o.borderRight[t]})}}),a}function Yj(e){let t;for(;e.hasNode(t=gA(`_root`)););return t}function Xj(e,t,n){let r={},i;n.forEach(n=>{let a=e.parent(n),o,s;for(;a;){if(o=e.parent(a),o?(s=r[o],r[o]=a):(s=i,i=a),s&&s!==a){t.setEdge(s,a);return}a=o}})}function Zj(e,t={},n=null){if(typeof t.customOrder==`function`){t.customOrder(e,Zj);return}let r=dA(e),i=Qj(e,_A(1,r+1),`inEdges`),a=Qj(e,_A(r-1,-1,-1),`outEdges`),o=Fj(e,n);if(eM(e,o),t.disableOptimalOrderHeuristic)return;let s=1/0,c,l=t.constraints||[];for(let t=0,r=0;r<4;++t,++r){$j(t%2?i:a,t%4>=2,l,n),o=iA(e);let u=Ij(e,o);u<s?(r=0,c=Object.assign({},o),s=u):u===s&&(c=structuredClone(o))}eM(e,c)}function Qj(e,t,n){let r=new Map,i=(e,t)=>{r.has(e)||r.set(e,[]),r.get(e).push(t)};for(let t of e.nodes()){let n=e.node(t);if(typeof n.rank==`number`&&i(n.rank,t),typeof n.minRank==`number`&&typeof n.maxRank==`number`)for(let e=n.minRank;e<=n.maxRank;e++)e!==n.rank&&i(e,t)}return t.map(function(t){return Jj(e,t,n,r.get(t)||[])})}function $j(e,t,n,r){let i=!0,a=new $k;e.forEach(function(e){n.forEach(e=>a.setEdge(e.left,e.right));let o=e.graph().root,{result:s,usedBias:c}=Gj(e,o,a,r,i);t&&c&&(i=!i),s.vs.forEach((t,n)=>e.node(t).order=n),Xj(e,a,s.vs)})}function eM(e,t){Object.values(t).forEach(t=>t.forEach((t,n)=>e.node(t).order=n))}function tM(e,t){let n={};function r(t,r){let i=0,a=0,o=t.length,s=r[r.length-1];return r.forEach((t,c)=>{let l=rM(e,t),u=l?e.node(l).order:o;(l||t===s)&&(r.slice(a,c+1).forEach(t=>{let r=e.predecessors(t);r&&r.forEach(r=>{let a=e.node(r),o=a.order;(o<i||u<o)&&!(a.dummy&&e.node(t).dummy)&&iM(n,r,t)})}),a=c+1,i=u)}),r}return t.length&&t.reduce(r),n}function nM(e,t){let n={};function r(t,r,i,a,o){_A(r,i).forEach(r=>{let i=t[r];if(i!==void 0&&e.node(i).dummy){let t=e.predecessors(i);t&&t.forEach(t=>{if(t===void 0)return;let r=e.node(t);r.dummy&&(r.order<a||r.order>o)&&iM(n,t,i)})}})}function i(t,n){let i=-1,a=-1,o=0;return n.forEach((s,c)=>{if(e.node(s).dummy===`border`){let t=e.predecessors(s);if(t&&t.length){let s=t[0];if(s===void 0)return;a=e.node(s).order,r(n,o,c,i,a),o=c,i=a}}r(n,o,n.length,a,t.length)}),n}return t.length&&t.reduce(i),n}function rM(e,t){if(e.node(t).dummy){let n=e.predecessors(t);if(n)return n.find(t=>e.node(t).dummy)}}function iM(e,t,n){if(t>n){let e=t;t=n,n=e}let r=e[t];r||(e[t]=r={}),r[n]=!0}function aM(e,t,n){if(t>n){let e=t;t=n,n=e}let r=e[t];return r!==void 0&&Object.hasOwn(r,n)}function oM(e,t,n,r,i){let a={},o={},s={};return t.forEach(e=>{e.forEach((e,t)=>{a[e]=e,o[e]=e,s[e]=t})}),t.forEach(t=>{let c=-1,l=-1,u=!1,d=t,f=t.findIndex(t=>i?.includes(t)||hM(t,e,i));f>0&&(d=[t[f],...t.slice(0,f),...t.slice(f+1)],u=!0),d.forEach(t=>{let d=r(t);if(d&&d.length){i!=null&&i.includes(t)&&(d=d.filter(t=>hM(t,e,i)));let r=d.sort((e,t)=>{let n=s[e],r=s[t];return(n===void 0?0:n)-(r===void 0?0:r)}),f=(r.length-1)/2;for(let e=Math.floor(f),i=Math.ceil(f);e<=i;++e){let i=r[e];if(i===void 0)continue;let d=s[i];if(d!==void 0&&o[t]===t&&c<d&&s[i]!==l&&!aM(n,t,i)){let e=a[i];e!==void 0&&(o[i]=t,o[t]=a[t]=e,c=d,u&&=(c=-1,l=s[i]??-1,!1))}}}})}),{root:a,align:o}}function sM(e,t,n,r,i=!1){let a={},o=cM(e,t,n,i),s=i?`borderLeft`:`borderRight`;function c(e,t){let n=o.nodes().slice(),r={},i=n.pop();for(;i;){if(r[i])e(i);else{r[i]=!0,n.push(i);for(let e of t(i))n.push(e)}i=n.pop()}}function l(e){let t=o.inEdges(e);t?a[e]=t.reduce((e,t)=>{let n=a[t.v]??0,r=o.edge(t);return Math.max(e,n+(r===void 0?0:r))},0):a[e]=0}function u(t){let n=o.outEdges(t),r=1/0;n&&(r=n.reduce((e,t)=>{let n=a[t.w],r=o.edge(t);return Math.min(e,(n===void 0?0:n)-(r===void 0?0:r))},1/0));let i=e.node(t);r!==1/0&&i.borderType!==s&&(a[t]=Math.max(a[t]===void 0?0:a[t],r))}function d(e){return o.predecessors(e)||[]}function f(e){return o.successors(e)||[]}return c(l,d),c(u,f),Object.keys(r).forEach(e=>{let t=n[e];t!==void 0&&(a[e]=a[t]??0)}),a}function cM(e,t,n,r){let i=new $k,a=e.graph(),o=pM(a.nodesep,a.edgesep,r);return t.forEach(t=>{let r;t.forEach(t=>{let a=n[t];if(a!==void 0){if(i.setNode(a),r!==void 0){let s=n[r];if(s!==void 0){let n=i.edge(s,a);i.setEdge(s,a,Math.max(o(e,t,r),n||0))}}r=t}})}),i}function lM(e,t){return Object.values(t).reduce((t,n)=>{let r=-1/0,i=1/0;Object.entries(n).forEach(([t,n])=>{let a=mM(e,t)/2;r=Math.max(n+a,r),i=Math.min(n-a,i)});let a=r-i;return a<t[0]&&(t=[a,n]),t},[1/0,null])[1]}function uM(e,t){let n=Object.values(t),r=uA(Math.min,n),i=uA(Math.max,n);[`u`,`d`].forEach(n=>{[`l`,`r`].forEach(a=>{let o=n+a,s=e[o];if(!s||s===t)return;let c=Object.values(s),l=r-uA(Math.min,c);a!==`l`&&(l=i-uA(Math.max,c)),l&&(e[o]=yA(s,e=>e+l))})})}function dM(e,t=void 0){let n=e.ul;return n?yA(n,(n,r)=>{if(t){let n=e[t.toLowerCase()];if(n&&n[r]!==void 0)return n[r]}let i=Object.values(e).map(e=>{let t=e[r];return t===void 0?0:t}).sort((e,t)=>e-t);return((i[1]??0)+(i[2]??0))/2}):{}}function fM(e,t){let n=iA(e),r=Object.assign(tM(e,n),nM(e,n)),i={},a;return[`u`,`d`].forEach(o=>{a=o===`u`?n:Object.values(n).reverse(),[`l`,`r`].forEach(n=>{n===`r`&&(a=a.map(e=>Object.values(e).reverse()));let s=oM(e,a,r,t=>(o===`u`?e.predecessors(t):e.successors(t))||[],t),c=sM(e,a,s.root,s.align,n===`r`);n===`r`&&(c=yA(c,e=>-e)),i[o+n]=c})}),uM(i,lM(e,i)),dM(i,e.graph().align)}function pM(e,t,n){return(r,i,a)=>{let o=r.node(i),s=r.node(a),c=0,l;if(c+=o.width/2,Object.hasOwn(o,`labelpos`))switch(o.labelpos.toLowerCase()){case`l`:l=-o.width/2;break;case`r`:l=o.width/2}if(l&&(c+=n?l:-l),l=void 0,c+=(o.dummy?t:e)/2,c+=(s.dummy?t:e)/2,c+=s.width/2,Object.hasOwn(s,`labelpos`))switch(s.labelpos.toLowerCase()){case`l`:l=s.width/2;break;case`r`:l=-s.width/2}return l&&(c+=n?l:-l),c}}function mM(e,t){return e.node(t).width}function hM(e,t,n){if(!n)return!1;let r=t.node(e)?.edgeObj;if(!r||t.node(e).edgeLabel.reversed)return!1;let i=n.indexOf(r?.v),a=n.indexOf(r?.w);return i!==-1&&a!==-1&&i===(a+1)%n.length||i===(a-1)%n.length}function gM(e,t){e=nA(e),_M(e),Object.entries(fM(e,t)).forEach(([t,n])=>e.node(t).x=n)}function _M(e){let t=iA(e),n=e.graph(),r=n.ranksep,i=n.rankalign,a=0;t.forEach(t=>{let n=t.reduce((t,n)=>{let r=e.node(n).height??0;return t>r?t:r},0);t.forEach(t=>{let r=e.node(t);r.y=i===`top`?a+r.height/2:i===`bottom`?a+n-r.height/2:a+n/2}),a+=n+r})}var vM=new WeakMap;function yM(e,t={}){return xM(e,mA,t),e}function bM(e,t,n){let r=t;for(;r!==void 0;){let t=e.parent(r);if(t===n)return r;r=t}}function xM(e,t,n){let r=e.nodes().filter(t=>e.children(t).length),i={};r.forEach(r=>{let a=e.node(r);if(a&&a.rankdir){let o=new $k({multigraph:!0,compound:!0});o.setGraph({rankdir:a.rankdir});let s=e.children(r);s.forEach(t=>{let n={...e.node(t)};o.setNode(t,n);let i=e.parent(t);i&&i!==r&&s.includes(i)&&o.setParent(t,i)});let c=new Set;e.edges().forEach(t=>{let n=bM(e,t.v,r),i=bM(e,t.w,r);if(n&&i&&n!==i){let r=`${n}\0${i}`;c.has(r)||(c.add(r),o.setEdge(n,i,{...e.edge(t)}))}}),xM(o,t,n);let l=MM(o);SM(l,t,n,null),CM(o,l);let u=1/0,d=1/0,f=-1/0,p=-1/0;o.nodes().forEach(e=>{if(e===r)return;let t=o.node(e);t&&typeof t.x==`number`&&typeof t.y==`number`&&typeof t.width==`number`&&typeof t.height==`number`&&(u=Math.min(u,t.x-t.width/2),f=Math.max(f,t.x+t.width/2),d=Math.min(d,t.y-t.height/2),p=Math.max(p,t.y+t.height/2))}),(!isFinite(u)||!isFinite(d)||!isFinite(f)||!isFinite(p))&&(u=d=0,f=p=0);let m=f-u,h=p-d;i[r]={minX:u,minY:d,maxX:f,maxY:p,width:m,height:h,offsetX:u,offsetY:d},a._dagreClusterSubgraph=o}});let a=[],o=t=>{let n=[],r=(e.children(t)||[]).filter(e=>e!==t);for(;r.length>0;){let t=r.shift();n.push(t),(e.children(t)||[]).filter(e=>e!==t).forEach(e=>r.push(e))}return n},s=new Map;r.forEach(t=>{let n=e.node(t);n&&n.rankdir&&i[t]&&s.set(t,(e.children(t)||[]).filter(e=>e!==t))});let c=new Set([...s.values()].flat()),l=new Map;s.forEach((e,t)=>{c.has(t)||l.set(t,o(t))});let u=new Set([...l.values()].flat()),d=e=>{for(let[t,n]of l)if(n.includes(e))return t;return e},f=[];e.edges().forEach(t=>{(u.has(t.v)||u.has(t.w))&&f.push({edge:t,label:e.edge(t)})});let p=new Map;u.forEach(t=>{let n=e.parent(t);p.set(t,typeof n==`string`?n:void 0)}),l.forEach((t,n)=>{let r=e.node(n),o=[];t.forEach(t=>{let n=e.node(t);n&&(o.push({id:t,node:n,parent:p.get(t)}),e.removeNode(t))});let s=f.filter(({edge:e})=>t.includes(e.v)||t.includes(e.w)),c=i[n];r&&(a.push({clusterId:n,subgraph:r._dagreClusterSubgraph,bounds:c,children:t,removedNodes:o,removedEdges:s}),r.width=c.width,r.height=c.height)});let m=new Set;f.forEach(({edge:t,label:n})=>{let r=d(t.v),i=d(t.w);if(r!==i&&e.hasNode(r)&&e.hasNode(i)){let t=`${r}\0${i}`;m.has(t)||(m.add(t),e.setEdge(r,i,{...n,width:0,height:0}))}});let h=MM(e),g=SM(h,t,n,vM.get(e)??null);vM.set(e,g),CM(e,h),m.forEach(t=>{let n=t.indexOf(`\0`),r=t.slice(0,n),i=t.slice(n+1);e.hasEdge(r,i)&&e.removeEdge(r,i)}),a.forEach(({clusterId:t,subgraph:n,bounds:r,removedNodes:i,removedEdges:a})=>{let o=e.node(t),s=o?.x??0,c=o?.y??0,l=(r.minX+r.maxX)/2,u=(r.minY+r.maxY)/2;i.forEach(({id:t,node:n,parent:r})=>{e.setNode(t,n),r!==void 0&&e.setParent(t,r)}),a.forEach(({edge:t,label:n})=>{e.setEdge(t,n)}),n.nodes().forEach(r=>{if(r===t)return;let i=n.node(r),a=e.node(r);a&&i&&typeof i.x==`number`&&typeof i.y==`number`&&(a.x=s+(i.x-l),a.y=c+(i.y-u))}),delete o._dagreClusterSubgraph}),r.forEach(t=>{let n=e.node(t),r=i[t];if(n&&n.rankdir&&n._dagreClusterSubgraph&&r){let i=n._dagreClusterSubgraph,a=n.x??0,o=n.y??0,s=(r.minX+r.maxX)/2,c=(r.minY+r.maxY)/2;i.nodes().forEach(n=>{if(n===t)return;let r=i.node(n),l=e.node(n);if(l&&r&&typeof r.x==`number`&&typeof r.y==`number`){let e=r.x-s,t=r.y-c;l.x=a+e,l.y=o+t}}),delete n._dagreClusterSubgraph}})}function SM(e,t,n,r=null){var i,a;let o=n?.useDynamic!==!1,s=o&&(i=r?.graph)!=null?i:null,c=o&&(a=r?.rawNodes)!=null?a:null;t(` makeSpaceForEdgeLabels`,()=>NM(e)),t(` removeSelfEdges`,()=>HM(e)),t(` acyclic`,()=>FA(e,s)),t(` nestingGraph.run`,()=>yj(e)),t(` rank`,()=>uj(nA(e))),t(` injectEdgeLabelProxies`,()=>PM(e)),t(` removeEmptyRanks`,()=>oA(e)),t(` nestingGraph.cleanup`,()=>Cj(e)),t(` normalizeRanks`,()=>aA(e)),t(` assignRankMinMax`,()=>FM(e)),t(` removeEdgeLabelProxies`,()=>IM(e)),t(` normalize.run`,()=>zA(e)),t(` parentDummyChains`,()=>hj(e)),t(` addBorderSegments`,()=>wj(e)),t(` order`,()=>Zj(e,n,c)),t(` insertSelfEdges`,()=>UM(e)),t(` adjustCoordinateSystem`,()=>Dj(e)),t(` position`,()=>gM(e,n.corePath)),t(` positionSelfEdges`,()=>WM(e));let l=JSON.parse(JSON.stringify(e._nodes));return t(` removeBorderNodes`,()=>VM(e)),t(` normalize.undo`,()=>VA(e)),t(` fixupEdgeLabelCoords`,()=>zM(e)),t(` undoCoordinateSystem`,()=>Oj(e)),t(` translateGraph`,()=>LM(e)),t(` assignNodeIntersects`,()=>RM(e)),t(` reversePoints`,()=>BM(e)),t(` acyclic.undo`,()=>LA(e)),{graph:e,rawNodes:l}}function CM(e,t){e.nodes().forEach(n=>{let r=e.node(n),i=t.node(n);r&&(r.x=i.x,r.y=i.y,r.order=i.order,r.rank=i.rank,t.children(n).length&&(r.width=i.width,r.height=i.height))}),e.edges().forEach(n=>{let r=e.edge(n),i=t.edge(n);r.points=i.points,Object.hasOwn(i,`x`)&&(r.x=i.x,r.y=i.y)}),e.graph().width=t.graph().width,e.graph().height=t.graph().height}var wM=[`nodesep`,`edgesep`,`ranksep`,`marginx`,`marginy`],TM={ranksep:50,edgesep:20,nodesep:50,rankdir:`TB`,rankalign:`center`},EM=[`acyclicer`,`ranker`,`rankdir`,`align`,`rankalign`],DM=[`width`,`height`,`rank`],OM={width:0,height:0},kM=[`minlen`,`weight`,`width`,`height`,`labeloffset`],AM={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:`r`},jM=[`labelpos`];function MM(e){let t=new $k({multigraph:!0,compound:!0}),n=KM(e.graph());return t.setGraph(Object.assign({},TM,GM(n,wM),vA(n,EM))),e.nodes().forEach(n=>{let r=GM(KM(e.node(n)),DM);Object.keys(OM).forEach(e=>{r[e]===void 0&&(r[e]=OM[e])}),t.setNode(n,r);let i=e.parent(n);i!==void 0&&t.setParent(n,i)}),e.edges().forEach(n=>{let r=KM(e.edge(n));t.setEdge(n,Object.assign({},AM,GM(r,kM),vA(r,jM)))}),t}function NM(e){let t=e.graph();t.ranksep/=2,e.edges().forEach(n=>{let r=e.edge(n);r.minlen*=2,(r.labelpos??`r`).toLowerCase()!==`c`&&(t.rankdir===`TB`||t.rankdir===`BT`?r.width+=r.labeloffset:r.height+=r.labeloffset)})}function PM(e){e.edges().forEach(t=>{let n=e.edge(t);if(n.width&&n.height){let n=e.node(t.v);eA(e,`edge-proxy`,{rank:(e.node(t.w).rank-n.rank)/2+n.rank,e:t},`_ep`)}})}function FM(e){let t=0;e.nodes().forEach(n=>{let r=e.node(n);r.borderTop&&(r.minRank=e.node(r.borderTop).rank,r.maxRank=e.node(r.borderBottom).rank,t=Math.max(t,r.maxRank))}),e.graph().maxRank=t}function IM(e){e.nodes().forEach(t=>{let n=e.node(t);if(n.dummy===`edge-proxy`){let r=n;e.edge(r.e).labelRank=n.rank,e.removeNode(t)}})}function LM(e){let t=1/0,n=0,r=1/0,i=0,a=e.graph(),o=a.marginx||0,s=a.marginy||0;function c(e){let a=e.x,o=e.y,s=e.width,c=e.height;t=Math.min(t,a-s/2),n=Math.max(n,a+s/2),r=Math.min(r,o-c/2),i=Math.max(i,o+c/2)}e.nodes().forEach(t=>c(e.node(t))),e.edges().forEach(t=>{let n=e.edge(t);Object.hasOwn(n,`x`)&&c(n)}),t-=o,r-=s,e.nodes().forEach(n=>{let i=e.node(n);i.x-=t,i.y-=r}),e.edges().forEach(n=>{let i=e.edge(n);i.points.forEach(e=>{e.x-=t,e.y-=r}),Object.hasOwn(i,`x`)&&(i.x-=t),Object.hasOwn(i,`y`)&&(i.y-=r)}),a.width=n-t+o,a.height=i-r+s}function RM(e){e.edges().forEach(t=>{if(t.v===t.w)return;let n=e.edge(t),r=e.node(t.v),i=e.node(t.w),a,o;n.points?(a=n.points[0],o=n.points[n.points.length-1]):(n.points=[],a=i,o=r),n.points.unshift(rA(r,a)),n.points.push(rA(i,o))})}function zM(e){e.edges().forEach(t=>{let n=e.edge(t);if(Object.hasOwn(n,`x`))switch((n.labelpos===`l`||n.labelpos===`r`)&&(n.width-=n.labeloffset),n.labelpos){case`l`:n.x-=n.width/2+n.labeloffset;break;case`r`:n.x+=n.width/2+n.labeloffset}})}function BM(e){e.edges().forEach(t=>{let n=e.edge(t);n.reversed&&n.points.reverse()})}function VM(e){e.nodes().forEach(t=>{if(e.children(t).length){let n=e.node(t),r=e.node(n.borderTop),i=e.node(n.borderBottom),a=e.node(n.borderLeft[n.borderLeft.length-1]),o=e.node(n.borderRight[n.borderRight.length-1]);n.width=Math.abs(o.x-a.x),n.height=Math.abs(i.y-r.y),n.x=a.x+n.width/2,n.y=r.y+n.height/2}}),e.nodes().forEach(t=>{e.node(t).dummy===`border`&&e.removeNode(t)})}function HM(e){e.edges().forEach(t=>{if(t.v===t.w){let n=e.node(t.v);n.selfEdges||=[],n.selfEdges.push({e:t,label:e.edge(t)}),e.removeEdge(t)}})}function UM(e){iA(e).forEach(t=>{let n=0;t.forEach((t,r)=>{let i=e.node(t);typeof i.rank!=`number`&&(i.rank=0),i.order=r+n,(i.selfEdges||[]).forEach(t=>{eA(e,`selfedge`,{width:t.label.width,height:t.label.height,rank:i.rank,order:r+ ++n,e:t.e,edgeLabel:t.label},`_se`),(!Array.isArray(t.label.points)||t.label.points.length!==7)&&(t.label.points=[{x:0,y:-10},{x:0,y:-10},{x:0,y:0},{x:0,y:10},{x:0,y:10},{x:0,y:0},{x:0,y:0}])}),delete i.selfEdges})})}function WM(e){e.nodes().forEach(t=>{let n=e.node(t),r=e=>typeof e==`number`&&isFinite(e);if(n.dummy===`selfedge`){let i=n,a=e.node(i.e.v),o=r(a?.x)?a.x:0,s=r(a?.y)?a.y:0,c=r(a?.width)?a.width:0,l=r(a?.height)?a.height:0,u=r(n.x)?n.x:o,d=r(n.y)?n.y:s,f=c/2,p=l/2;i.edgeLabel.points=[{x:u+f,y:d-p},{x:u+f,y:d-p},{x:u,y:d},{x:u-f,y:d+p},{x:u-f,y:d+p},{x:u,y:d},{x:u,y:d}],i.edgeLabel.x=u,i.edgeLabel.y=d,e.setEdge(i.e,i.edgeLabel),e.removeNode(t)}else n&&Array.isArray(n.selfEdges)&&n.selfEdges.forEach(e=>{if(!Array.isArray(e.label.points)||e.label.points.length!==7){let t=r(n.x)?n.x:0,i=r(n.y)?n.y:0,a=r(n.width)?n.width:0,o=r(n.height)?n.height:0,s=a/2,c=o/2;e.label.points=[{x:t+s,y:i-c},{x:t+s,y:i-c},{x:t,y:i},{x:t-s,y:i+c},{x:t-s,y:i+c},{x:t,y:i},{x:t,y:i}]}})})}function GM(e,t){return yA(vA(e,t),Number)}function KM(e){let t={};return e&&Object.entries(e).forEach(([e,n])=>{typeof e==`string`&&(e=e.toLowerCase()),t[e]=n}),t}function qM(e){let t=iA(e),n=new $k({compound:!0,multigraph:!0}).setGraph({});return e.nodes().forEach(t=>{n.setNode(t,{label:t}),n.setParent(t,`layer`+e.node(t).rank)}),e.edges().forEach(e=>n.setEdge(e.v,e.w,{},e.name)),t.forEach((e,t)=>{let r=`layer`+t;n.setNode(r,{rank:`same`}),e.reduce((e,t)=>(n.setEdge(e,t,{style:`invis`}),t))}),n}var JM={graphlib:mk,version:CA,layout:yM,debug:qM,util:{time:pA,notime:mA}};function YM(e){if(typeof e==`string`||typeof e==`number`)return``+e;let t=``;if(Array.isArray(e))for(let n=0,r;n<e.length;n++)(r=YM(e[n]))!==``&&(t+=(t&&` `)+r);else for(let n in e)e[n]&&(t+=(t&&` `)+n);return t}var XM={value:()=>{}};function ZM(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+``)||r in n||/[\s.]/.test(r))throw Error(`illegal type: `+r);n[r]=[]}return new QM(n)}function QM(e){this._=e}function $M(e,t){return e.trim().split(/^|\s+/).map(function(e){var n=``,r=e.indexOf(`.`);if(r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),e&&!t.hasOwnProperty(e))throw Error(`unknown type: `+e);return{type:e,name:n}})}QM.prototype=ZM.prototype={constructor:QM,on:function(e,t){var n=this._,r=$M(e+``,n),i,a=-1,o=r.length;if(arguments.length<2){for(;++a<o;)if((i=(e=r[a]).type)&&(i=eN(n[i],e.name)))return i;return}if(t!=null&&typeof t!=`function`)throw Error(`invalid callback: `+t);for(;++a<o;)if(i=(e=r[a]).type)n[i]=tN(n[i],e.name,t);else if(t==null)for(i in n)n[i]=tN(n[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new QM(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var n=Array(i),r=0,i,a;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw Error(`unknown type: `+e);for(a=this._[e],r=0,i=a.length;r<i;++r)a[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw Error(`unknown type: `+e);for(var r=this._[e],i=0,a=r.length;i<a;++i)r[i].value.apply(t,n)}};function eN(e,t){for(var n=0,r=e.length,i;n<r;++n)if((i=e[n]).name===t)return i.value}function tN(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=XM,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var nN={svg:`http://www.w3.org/2000/svg`,xhtml:`http://www.w3.org/1999/xhtml`,xlink:`http://www.w3.org/1999/xlink`,xml:`http://www.w3.org/XML/1998/namespace`,xmlns:`http://www.w3.org/2000/xmlns/`};function rN(e){var t=e+=``,n=t.indexOf(`:`);return n>=0&&(t=e.slice(0,n))!==`xmlns`&&(e=e.slice(n+1)),nN.hasOwnProperty(t)?{space:nN[t],local:e}:e}function iN(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===`http://www.w3.org/1999/xhtml`&&t.documentElement.namespaceURI===`http://www.w3.org/1999/xhtml`?t.createElement(e):t.createElementNS(n,e)}}function aN(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function oN(e){var t=rN(e);return(t.local?aN:iN)(t)}function sN(){}function cN(e){return e==null?sN:function(){return this.querySelector(e)}}function lN(e){typeof e!=`function`&&(e=cN(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,s=r[i]=Array(o),c,l,u=0;u<o;++u)(c=a[u])&&(l=e.call(c,c.__data__,u,a))&&(`__data__`in c&&(l.__data__=c.__data__),s[u]=l);return new ZP(r,this._parents)}function uN(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function dN(){return[]}function fN(e){return e==null?dN:function(){return this.querySelectorAll(e)}}function pN(e){return function(){return uN(e.apply(this,arguments))}}function mN(e){e=typeof e==`function`?pN(e):fN(e);for(var t=this._groups,n=t.length,r=[],i=[],a=0;a<n;++a)for(var o=t[a],s=o.length,c,l=0;l<s;++l)(c=o[l])&&(r.push(e.call(c,c.__data__,l,o)),i.push(c));return new ZP(r,i)}function hN(e){return function(){return this.matches(e)}}function gN(e){return function(t){return t.matches(e)}}var _N=Array.prototype.find;function vN(e){return function(){return _N.call(this.children,e)}}function yN(){return this.firstElementChild}function bN(e){return this.select(e==null?yN:vN(typeof e==`function`?e:gN(e)))}var xN=Array.prototype.filter;function SN(){return Array.from(this.children)}function CN(e){return function(){return xN.call(this.children,e)}}function wN(e){return this.selectAll(e==null?SN:CN(typeof e==`function`?e:gN(e)))}function TN(e){typeof e!=`function`&&(e=hN(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,s=r[i]=[],c,l=0;l<o;++l)(c=a[l])&&e.call(c,c.__data__,l,a)&&s.push(c);return new ZP(r,this._parents)}function EN(e){return Array(e.length)}function DN(){return new ZP(this._enter||this._groups.map(EN),this._parents)}function ON(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}ON.prototype={constructor:ON,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function kN(e){return function(){return e}}function AN(e,t,n,r,i,a){for(var o=0,s,c=t.length,l=a.length;o<l;++o)(s=t[o])?(s.__data__=a[o],r[o]=s):n[o]=new ON(e,a[o]);for(;o<c;++o)(s=t[o])&&(i[o]=s)}function jN(e,t,n,r,i,a,o){var s,c,l=new Map,u=t.length,d=a.length,f=Array(u),p;for(s=0;s<u;++s)(c=t[s])&&(f[s]=p=o.call(c,c.__data__,s,t)+``,l.has(p)?i[s]=c:l.set(p,c));for(s=0;s<d;++s)p=o.call(e,a[s],s,a)+``,(c=l.get(p))?(r[s]=c,c.__data__=a[s],l.delete(p)):n[s]=new ON(e,a[s]);for(s=0;s<u;++s)(c=t[s])&&l.get(f[s])===c&&(i[s]=c)}function MN(e){return e.__data__}function NN(e,t){if(!arguments.length)return Array.from(this,MN);var n=t?jN:AN,r=this._parents,i=this._groups;typeof e!=`function`&&(e=kN(e));for(var a=i.length,o=Array(a),s=Array(a),c=Array(a),l=0;l<a;++l){var u=r[l],d=i[l],f=d.length,p=PN(e.call(u,u&&u.__data__,l,r)),m=p.length,h=s[l]=Array(m),g=o[l]=Array(m);n(u,d,h,g,c[l]=Array(f),p,t);for(var _=0,v=0,y,b;_<m;++_)if(y=h[_]){for(_>=v&&(v=_+1);!(b=g[v])&&++v<m;);y._next=b||null}}return o=new ZP(o,r),o._enter=s,o._exit=c,o}function PN(e){return typeof e==`object`&&`length`in e?e:Array.from(e)}function FN(){return new ZP(this._exit||this._groups.map(EN),this._parents)}function IN(e,t,n){var r=this.enter(),i=this,a=this.exit();return typeof e==`function`?(r=e(r),r&&=r.selection()):r=r.append(e+``),t!=null&&(i=t(i),i&&=i.selection()),n==null?a.remove():n(a),r&&i?r.merge(i).order():i}function LN(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,i=n.length,a=r.length,o=Math.min(i,a),s=Array(i),c=0;c<o;++c)for(var l=n[c],u=r[c],d=l.length,f=s[c]=Array(d),p,m=0;m<d;++m)(p=l[m]||u[m])&&(f[m]=p);for(;c<i;++c)s[c]=n[c];return new ZP(s,this._parents)}function RN(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],i=r.length-1,a=r[i],o;--i>=0;)(o=r[i])&&(a&&o.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(o,a),a=o);return this}function zN(e){e||=BN;function t(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}for(var n=this._groups,r=n.length,i=Array(r),a=0;a<r;++a){for(var o=n[a],s=o.length,c=i[a]=Array(s),l,u=0;u<s;++u)(l=o[u])&&(c[u]=l);c.sort(t)}return new ZP(i,this._parents).order()}function BN(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function VN(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function HN(){return Array.from(this)}function UN(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,a=r.length;i<a;++i){var o=r[i];if(o)return o}return null}function WN(){let e=0;for(let t of this)++e;return e}function GN(){return!this.node()}function KN(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var i=t[n],a=0,o=i.length,s;a<o;++a)(s=i[a])&&e.call(s,s.__data__,a,i);return this}function qN(e){return function(){this.removeAttribute(e)}}function JN(e){return function(){this.removeAttributeNS(e.space,e.local)}}function YN(e,t){return function(){this.setAttribute(e,t)}}function XN(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function ZN(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function QN(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function $N(e,t){var n=rN(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((t==null?n.local?JN:qN:typeof t==`function`?n.local?QN:ZN:n.local?XN:YN)(n,t))}function eP(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function tP(e){return function(){this.style.removeProperty(e)}}function nP(e,t,n){return function(){this.style.setProperty(e,t,n)}}function rP(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function iP(e,t,n){return arguments.length>1?this.each((t==null?tP:typeof t==`function`?rP:nP)(e,t,n??``)):aP(this.node(),e)}function aP(e,t){return e.style.getPropertyValue(t)||eP(e).getComputedStyle(e,null).getPropertyValue(t)}function oP(e){return function(){delete this[e]}}function sP(e,t){return function(){this[e]=t}}function cP(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function lP(e,t){return arguments.length>1?this.each((t==null?oP:typeof t==`function`?cP:sP)(e,t)):this.node()[e]}function uP(e){return e.trim().split(/^|\s+/)}function dP(e){return e.classList||new fP(e)}function fP(e){this._node=e,this._names=uP(e.getAttribute(`class`)||``)}fP.prototype={add:function(e){this._names.indexOf(e)<0&&(this._names.push(e),this._node.setAttribute(`class`,this._names.join(` `)))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute(`class`,this._names.join(` `)))},contains:function(e){return this._names.indexOf(e)>=0}};function pP(e,t){for(var n=dP(e),r=-1,i=t.length;++r<i;)n.add(t[r])}function mP(e,t){for(var n=dP(e),r=-1,i=t.length;++r<i;)n.remove(t[r])}function hP(e){return function(){pP(this,e)}}function gP(e){return function(){mP(this,e)}}function _P(e,t){return function(){(t.apply(this,arguments)?pP:mP)(this,e)}}function vP(e,t){var n=uP(e+``);if(arguments.length<2){for(var r=dP(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof t==`function`?_P:t?hP:gP)(n,t))}function yP(){this.textContent=``}function bP(e){return function(){this.textContent=e}}function xP(e){return function(){var t=e.apply(this,arguments);this.textContent=t??``}}function SP(e){return arguments.length?this.each(e==null?yP:(typeof e==`function`?xP:bP)(e)):this.node().textContent}function CP(){this.innerHTML=``}function wP(e){return function(){this.innerHTML=e}}function TP(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??``}}function EP(e){return arguments.length?this.each(e==null?CP:(typeof e==`function`?TP:wP)(e)):this.node().innerHTML}function DP(){this.nextSibling&&this.parentNode.appendChild(this)}function OP(){return this.each(DP)}function kP(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function AP(){return this.each(kP)}function jP(e){var t=typeof e==`function`?e:oN(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function MP(){return null}function NP(e,t){var n=typeof e==`function`?e:oN(e),r=t==null?MP:typeof t==`function`?t:cN(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function PP(){var e=this.parentNode;e&&e.removeChild(this)}function FP(){return this.each(PP)}function IP(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function LP(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function RP(e){return this.select(e?LP:IP)}function zP(e){return arguments.length?this.property(`__data__`,e):this.node().__data__}function BP(e){return function(t){e.call(this,t,this.__data__)}}function VP(e){return e.trim().split(/^|\s+/).map(function(e){var t=``,n=e.indexOf(`.`);return n>=0&&(t=e.slice(n+1),e=e.slice(0,n)),{type:e,name:t}})}function HP(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,i=t.length,a;n<i;++n)a=t[n],(!e.type||a.type===e.type)&&a.name===e.name?this.removeEventListener(a.type,a.listener,a.options):t[++r]=a;++r?t.length=r:delete this.__on}}}function UP(e,t,n){return function(){var r=this.__on,i,a=BP(t);if(r){for(var o=0,s=r.length;o<s;++o)if((i=r[o]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=a,i.options=n),i.value=t;return}}this.addEventListener(e.type,a,n),i={type:e.type,name:e.name,value:t,listener:a,options:n},r?r.push(i):this.__on=[i]}}function WP(e,t,n){var r=VP(e+``),i,a=r.length,o;if(arguments.length<2){var s=this.node().__on;if(s){for(var c=0,l=s.length,u;c<l;++c)for(i=0,u=s[c];i<a;++i)if((o=r[i]).type===u.type&&o.name===u.name)return u.value}return}for(s=t?UP:HP,i=0;i<a;++i)this.each(s(r[i],t,n));return this}function GP(e,t,n){var r=eP(e),i=r.CustomEvent;typeof i==`function`?i=new i(t,n):(i=r.document.createEvent(`Event`),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function KP(e,t){return function(){return GP(this,e,t)}}function qP(e,t){return function(){return GP(this,e,t.apply(this,arguments))}}function JP(e,t){return this.each((typeof t==`function`?qP:KP)(e,t))}function*YP(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,a=r.length,o;i<a;++i)(o=r[i])&&(yield o)}var XP=[null];function ZP(e,t){this._groups=e,this._parents=t}function QP(){return new ZP([[document.documentElement]],XP)}function $P(){return this}ZP.prototype=QP.prototype={constructor:ZP,select:lN,selectAll:mN,selectChild:bN,selectChildren:wN,filter:TN,data:NN,enter:DN,exit:FN,join:IN,merge:LN,selection:$P,order:RN,sort:zN,call:VN,nodes:HN,node:UN,size:WN,empty:GN,each:KN,attr:$N,style:iP,property:lP,classed:vP,text:SP,html:EP,raise:OP,lower:AP,append:jP,insert:NP,remove:FP,clone:RP,datum:zP,on:WP,dispatch:JP,[Symbol.iterator]:YP};function eF(e){return typeof e==`string`?new ZP([[document.querySelector(e)]],[document.documentElement]):new ZP([[e]],XP)}function tF(e){let t;for(;t=e.sourceEvent;)e=t;return e}function nF(e,t){if(e=tF(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}if(t.getBoundingClientRect){var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}}return[e.pageX,e.pageY]}var rF={passive:!1},iF={capture:!0,passive:!1};function aF(e){e.stopImmediatePropagation()}function oF(e){e.preventDefault(),e.stopImmediatePropagation()}function sF(e){var t=e.document.documentElement,n=eF(e).on(`dragstart.drag`,oF,iF);`onselectstart`in t?n.on(`selectstart.drag`,oF,iF):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect=`none`)}function cF(e,t){var n=e.document.documentElement,r=eF(e).on(`dragstart.drag`,null);t&&(r.on(`click.drag`,oF,iF),setTimeout(function(){r.on(`click.drag`,null)},0)),`onselectstart`in n?r.on(`selectstart.drag`,null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}var lF=e=>()=>e;function uF(e,{sourceEvent:t,subject:n,target:r,identifier:i,active:a,x:o,y:s,dx:c,dy:l,dispatch:u}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:a,enumerable:!0,configurable:!0},x:{value:o,enumerable:!0,configurable:!0},y:{value:s,enumerable:!0,configurable:!0},dx:{value:c,enumerable:!0,configurable:!0},dy:{value:l,enumerable:!0,configurable:!0},_:{value:u}})}uF.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function dF(e){return!e.ctrlKey&&!e.button}function fF(){return this.parentNode}function pF(e,t){return t??{x:e.x,y:e.y}}function mF(){return navigator.maxTouchPoints||`ontouchstart`in this}function hF(){var e=dF,t=fF,n=pF,r=mF,i={},a=ZM(`start`,`drag`,`end`),o=0,s,c,l,u,d=0;function f(e){e.on(`mousedown.drag`,p).filter(r).on(`touchstart.drag`,g).on(`touchmove.drag`,_,rF).on(`touchend.drag touchcancel.drag`,v).style(`touch-action`,`none`).style(`-webkit-tap-highlight-color`,`rgba(0,0,0,0)`)}function p(n,r){if(!u&&e.call(this,n,r)){var i=y(this,t.call(this,n,r),n,r,`mouse`);i&&(eF(n.view).on(`mousemove.drag`,m,iF).on(`mouseup.drag`,h,iF),sF(n.view),aF(n),l=!1,s=n.clientX,c=n.clientY,i(`start`,n))}}function m(e){if(oF(e),!l){var t=e.clientX-s,n=e.clientY-c;l=t*t+n*n>d}i.mouse(`drag`,e)}function h(e){eF(e.view).on(`mousemove.drag mouseup.drag`,null),cF(e.view,l),oF(e),i.mouse(`end`,e)}function g(n,r){if(e.call(this,n,r))for(var i=n.changedTouches,a=t.call(this,n,r),o=i.length,s=0,c;s<o;++s)(c=y(this,a,n,r,i[s].identifier,i[s]))&&(aF(n),c(`start`,n,i[s]))}function _(e){for(var t=e.changedTouches,n=t.length,r=0,a;r<n;++r)(a=i[t[r].identifier])&&(oF(e),a(`drag`,e,t[r]))}function v(e){var t=e.changedTouches,n=t.length,r,a;for(u&&clearTimeout(u),u=setTimeout(function(){u=null},500),r=0;r<n;++r)(a=i[t[r].identifier])&&(aF(e),a(`end`,e,t[r]))}function y(e,t,r,s,c,l){var u=a.copy(),d=nF(l||r,t),p,m,h;if((h=n.call(e,new uF(`beforestart`,{sourceEvent:r,target:f,identifier:c,active:o,x:d[0],y:d[1],dx:0,dy:0,dispatch:u}),s))!=null)return p=h.x-d[0]||0,m=h.y-d[1]||0,function n(r,a,l){var g=d,_;switch(r){case`start`:i[c]=n,_=o++;break;case`end`:delete i[c],--o;case`drag`:d=nF(l||a,t),_=o}u.call(r,e,new uF(r,{sourceEvent:a,subject:h,target:f,identifier:c,active:_,x:d[0]+p,y:d[1]+m,dx:d[0]-g[0],dy:d[1]-g[1],dispatch:u}),s)}}return f.filter=function(t){return arguments.length?(e=typeof t==`function`?t:lF(!!t),f):e},f.container=function(e){return arguments.length?(t=typeof e==`function`?e:lF(e),f):t},f.subject=function(e){return arguments.length?(n=typeof e==`function`?e:lF(e),f):n},f.touchable=function(e){return arguments.length?(r=typeof e==`function`?e:lF(!!e),f):r},f.on=function(){var e=a.on.apply(a,arguments);return e===a?f:e},f.clickDistance=function(e){return arguments.length?(d=(e=+e)*e,f):Math.sqrt(d)},f}function gF(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function _F(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function vF(){}var yF=.7,bF=1/yF,xF=`\\s*([+-]?\\d+)\\s*`,SF=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*`,CF=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*`,wF=/^#([0-9a-f]{3,8})$/,TF=RegExp(`^rgb\\(${xF},${xF},${xF}\\)$`),EF=RegExp(`^rgb\\(${CF},${CF},${CF}\\)$`),DF=RegExp(`^rgba\\(${xF},${xF},${xF},${SF}\\)$`),OF=RegExp(`^rgba\\(${CF},${CF},${CF},${SF}\\)$`),kF=RegExp(`^hsl\\(${SF},${CF},${CF}\\)$`),AF=RegExp(`^hsla\\(${SF},${CF},${CF},${SF}\\)$`),jF={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};gF(vF,IF,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:MF,formatHex:MF,formatHex8:NF,formatHsl:PF,formatRgb:FF,toString:FF});function MF(){return this.rgb().formatHex()}function NF(){return this.rgb().formatHex8()}function PF(){return YF(this).formatHsl()}function FF(){return this.rgb().formatRgb()}function IF(e){var t,n;return e=(e+``).trim().toLowerCase(),(t=wF.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?LF(t):n===3?new VF(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?RF(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?RF(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=TF.exec(e))?new VF(t[1],t[2],t[3],1):(t=EF.exec(e))?new VF(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=DF.exec(e))?RF(t[1],t[2],t[3],t[4]):(t=OF.exec(e))?RF(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=kF.exec(e))?JF(t[1],t[2]/100,t[3]/100,1):(t=AF.exec(e))?JF(t[1],t[2]/100,t[3]/100,t[4]):jF.hasOwnProperty(e)?LF(jF[e]):e===`transparent`?new VF(NaN,NaN,NaN,0):null}function LF(e){return new VF(e>>16&255,e>>8&255,e&255,1)}function RF(e,t,n,r){return r<=0&&(e=t=n=NaN),new VF(e,t,n,r)}function zF(e){return e instanceof vF||(e=IF(e)),e?(e=e.rgb(),new VF(e.r,e.g,e.b,e.opacity)):new VF}function BF(e,t,n,r){return arguments.length===1?zF(e):new VF(e,t,n,r??1)}function VF(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}gF(VF,BF,_F(vF,{brighter(e){return e=e==null?bF:bF**+e,new VF(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?yF:yF**+e,new VF(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new VF(KF(this.r),KF(this.g),KF(this.b),GF(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:HF,formatHex:HF,formatHex8:UF,formatRgb:WF,toString:WF}));function HF(){return`#${qF(this.r)}${qF(this.g)}${qF(this.b)}`}function UF(){return`#${qF(this.r)}${qF(this.g)}${qF(this.b)}${qF((isNaN(this.opacity)?1:this.opacity)*255)}`}function WF(){let e=GF(this.opacity);return`${e===1?`rgb(`:`rgba(`}${KF(this.r)}, ${KF(this.g)}, ${KF(this.b)}${e===1?`)`:`, ${e})`}`}function GF(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function KF(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function qF(e){return e=KF(e),(e<16?`0`:``)+e.toString(16)}function JF(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new ZF(e,t,n,r)}function YF(e){if(e instanceof ZF)return new ZF(e.h,e.s,e.l,e.opacity);if(e instanceof vF||(e=IF(e)),!e)return new ZF;if(e instanceof ZF)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=NaN,s=a-i,c=(a+i)/2;return s?(o=t===a?(n-r)/s+(n<r)*6:n===a?(r-t)/s+2:(t-n)/s+4,s/=c<.5?a+i:2-a-i,o*=60):s=c>0&&c<1?0:o,new ZF(o,s,c,e.opacity)}function XF(e,t,n,r){return arguments.length===1?YF(e):new ZF(e,t,n,r??1)}function ZF(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}gF(ZF,XF,_F(vF,{brighter(e){return e=e==null?bF:bF**+e,new ZF(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?yF:yF**+e,new ZF(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new VF(eI(e>=240?e-240:e+120,i,r),eI(e,i,r),eI(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new ZF(QF(this.h),$F(this.s),$F(this.l),GF(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let e=GF(this.opacity);return`${e===1?`hsl(`:`hsla(`}${QF(this.h)}, ${$F(this.s)*100}%, ${$F(this.l)*100}%${e===1?`)`:`, ${e})`}`}}));function QF(e){return e=(e||0)%360,e<0?e+360:e}function $F(e){return Math.max(0,Math.min(1,e||0))}function eI(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}var tI=e=>()=>e;function nI(e,t){return function(n){return e+n*t}}function rI(e,t,n){return e**=+n,t=t**+n-e,n=1/n,function(r){return(e+r*t)**+n}}function iI(e){return(e=+e)==1?aI:function(t,n){return n-t?rI(t,n,e):tI(isNaN(t)?n:t)}}function aI(e,t){var n=t-e;return n?nI(e,n):tI(isNaN(e)?t:e)}var oI=(function e(t){var n=iI(t);function r(e,t){var r=n((e=BF(e)).r,(t=BF(t)).r),i=n(e.g,t.g),a=n(e.b,t.b),o=aI(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=a(t),e.opacity=o(t),e+``}}return r.gamma=e,r})(1);function sI(e,t){t||=[];var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(a){for(i=0;i<n;++i)r[i]=e[i]*(1-a)+t[i]*a;return r}}function cI(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function lI(e,t){for(var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=Array(r),a=Array(n),o=0;o<r;++o)i[o]=vI(e[o],t[o]);for(;o<n;++o)a[o]=t[o];return function(e){for(o=0;o<r;++o)a[o]=i[o](e);return a}}function uI(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function dI(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function fI(e,t){var n={},r={},i;for(i in(typeof e!=`object`||!e)&&(e={}),(typeof t!=`object`||!t)&&(t={}),t)i in e?n[i]=vI(e[i],t[i]):r[i]=t[i];return function(e){for(i in n)r[i]=n[i](e);return r}}var pI=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,mI=new RegExp(pI.source,`g`);function hI(e){return function(){return e}}function gI(e){return function(t){return e(t)+``}}function _I(e,t){var n=pI.lastIndex=mI.lastIndex=0,r,i,a,o=-1,s=[],c=[];for(e+=``,t+=``;(r=pI.exec(e))&&(i=mI.exec(t));)(a=i.index)>n&&(a=t.slice(n,a),s[o]?s[o]+=a:s[++o]=a),(r=r[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,c.push({i:o,x:dI(r,i)})),n=mI.lastIndex;return n<t.length&&(a=t.slice(n),s[o]?s[o]+=a:s[++o]=a),s.length<2?c[0]?gI(c[0].x):hI(t):(t=c.length,function(e){for(var n=0,r;n<t;++n)s[(r=c[n]).i]=r.x(e);return s.join(``)})}function vI(e,t){var n=typeof t,r;return t==null||n===`boolean`?tI(t):(n===`number`?dI:n===`string`?(r=IF(t))?(t=r,oI):_I:t instanceof IF?oI:t instanceof Date?uI:cI(t)?sI:Array.isArray(t)?lI:typeof t.valueOf!=`function`&&typeof t.toString!=`function`||isNaN(t)?fI:dI)(e,t)}var yI=180/Math.PI,bI={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function xI(e,t,n,r,i,a){var o,s,c;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(c=e*n+t*r)&&(n-=e*c,r-=t*c),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,c/=s),e*r<t*n&&(e=-e,t=-t,c=-c,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(t,e)*yI,skewX:Math.atan(c)*yI,scaleX:o,scaleY:s}}var SI;function CI(e){let t=new(typeof DOMMatrix==`function`?DOMMatrix:WebKitCSSMatrix)(e+``);return t.isIdentity?bI:xI(t.a,t.b,t.c,t.d,t.e,t.f)}function wI(e){return e==null||(SI||=document.createElementNS(`http://www.w3.org/2000/svg`,`g`),SI.setAttribute(`transform`,e),!(e=SI.transform.baseVal.consolidate()))?bI:(e=e.matrix,xI(e.a,e.b,e.c,e.d,e.e,e.f))}function TI(e,t,n,r){function i(e){return e.length?e.pop()+` `:``}function a(e,r,i,a,o,s){if(e!==i||r!==a){var c=o.push(`translate(`,null,t,null,n);s.push({i:c-4,x:dI(e,i)},{i:c-2,x:dI(r,a)})}else(i||a)&&o.push(`translate(`+i+t+a+n)}function o(e,t,n,a){e===t?t&&n.push(i(n)+`rotate(`+t+r):(e-t>180?t+=360:t-e>180&&(e+=360),a.push({i:n.push(i(n)+`rotate(`,null,r)-2,x:dI(e,t)}))}function s(e,t,n,a){e===t?t&&n.push(i(n)+`skewX(`+t+r):a.push({i:n.push(i(n)+`skewX(`,null,r)-2,x:dI(e,t)})}function c(e,t,n,r,a,o){if(e!==n||t!==r){var s=a.push(i(a)+`scale(`,null,`,`,null,`)`);o.push({i:s-4,x:dI(e,n)},{i:s-2,x:dI(t,r)})}else(n!==1||r!==1)&&a.push(i(a)+`scale(`+n+`,`+r+`)`)}return function(t,n){var r=[],i=[];return t=e(t),n=e(n),a(t.translateX,t.translateY,n.translateX,n.translateY,r,i),o(t.rotate,n.rotate,r,i),s(t.skewX,n.skewX,r,i),c(t.scaleX,t.scaleY,n.scaleX,n.scaleY,r,i),t=n=null,function(e){for(var t=-1,n=i.length,a;++t<n;)r[(a=i[t]).i]=a.x(e);return r.join(``)}}}var EI=TI(CI,`px, `,`px)`,`deg)`),DI=TI(wI,`, `,`)`,`)`),OI=1e-12;function kI(e){return((e=Math.exp(e))+1/e)/2}function AI(e){return((e=Math.exp(e))-1/e)/2}function jI(e){return((e=Math.exp(2*e))-1)/(e+1)}var MI=(function e(t,n,r){function i(e,i){var a=e[0],o=e[1],s=e[2],c=i[0],l=i[1],u=i[2],d=c-a,f=l-o,p=d*d+f*f,m,h;if(p<OI)h=Math.log(u/s)/t,m=function(e){return[a+e*d,o+e*f,s*Math.exp(t*e*h)]};else{var g=Math.sqrt(p),_=(u*u-s*s+r*p)/(2*s*n*g),v=(u*u-s*s-r*p)/(2*u*n*g),y=Math.log(Math.sqrt(_*_+1)-_);h=(Math.log(Math.sqrt(v*v+1)-v)-y)/t,m=function(e){var r=e*h,i=kI(y),c=s/(n*g)*(i*jI(t*r+y)-AI(y));return[a+c*d,o+c*f,s*i/kI(t*r+y)]}}return m.duration=h*1e3*t/Math.SQRT2,m}return i.rho=function(t){var n=Math.max(.001,+t),r=n*n;return e(n,r,r*r)},i})(Math.SQRT2,2,4),NI=0,PI=0,FI=0,II=1e3,LI,RI,zI=0,BI=0,VI=0,HI=typeof performance==`object`&&performance.now?performance:Date,UI=typeof window==`object`&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function WI(){return BI||=(UI(GI),HI.now()+VI)}function GI(){BI=0}function KI(){this._call=this._time=this._next=null}KI.prototype=qI.prototype={constructor:KI,restart:function(e,t,n){if(typeof e!=`function`)throw TypeError(`callback is not a function`);n=(n==null?WI():+n)+(t==null?0:+t),!this._next&&RI!==this&&(RI?RI._next=this:LI=this,RI=this),this._call=e,this._time=n,QI()},stop:function(){this._call&&(this._call=null,this._time=1/0,QI())}};function qI(e,t,n){var r=new KI;return r.restart(e,t,n),r}function JI(){WI(),++NI;for(var e=LI,t;e;)(t=BI-e._time)>=0&&e._call.call(void 0,t),e=e._next;--NI}function YI(){BI=(zI=HI.now())+VI,NI=PI=0;try{JI()}finally{NI=0,ZI(),BI=0}}function XI(){var e=HI.now(),t=e-zI;t>II&&(VI-=t,zI=e)}function ZI(){for(var e,t=LI,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:LI=n);RI=e,QI(r)}function QI(e){NI||(PI&&=clearTimeout(PI),e-BI>24?(e<1/0&&(PI=setTimeout(YI,e-HI.now()-VI)),FI&&=clearInterval(FI)):(FI||=(zI=HI.now(),setInterval(XI,II)),NI=1,UI(YI)))}function $I(e,t,n){var r=new KI;return t=t==null?0:+t,r.restart(n=>{r.stop(),e(n+t)},t,n),r}var eL=ZM(`start`,`end`,`cancel`,`interrupt`),tL=[];function nL(e,t,n,r,i,a){var o=e.__transition;if(!o)e.__transition={};else if(n in o)return;oL(e,n,{name:t,index:r,group:i,on:eL,tween:tL,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:0})}function rL(e,t){var n=aL(e,t);if(n.state>0)throw Error(`too late; already scheduled`);return n}function iL(e,t){var n=aL(e,t);if(n.state>3)throw Error(`too late; already running`);return n}function aL(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw Error(`transition not found`);return n}function oL(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=qI(a,0,n.time);function a(e){n.state=1,n.timer.restart(o,n.delay,n.time),n.delay<=e&&o(e-n.delay)}function o(a){var l,u,d,f;if(n.state!==1)return c();for(l in r)if(f=r[l],f.name===n.name){if(f.state===3)return $I(o);f.state===4?(f.state=6,f.timer.stop(),f.on.call(`interrupt`,e,e.__data__,f.index,f.group),delete r[l]):+l<t&&(f.state=6,f.timer.stop(),f.on.call(`cancel`,e,e.__data__,f.index,f.group),delete r[l])}if($I(function(){n.state===3&&(n.state=4,n.timer.restart(s,n.delay,n.time),s(a))}),n.state=2,n.on.call(`start`,e,e.__data__,n.index,n.group),n.state===2){for(n.state=3,i=Array(d=n.tween.length),l=0,u=-1;l<d;++l)(f=n.tween[l].value.call(e,e.__data__,n.index,n.group))&&(i[++u]=f);i.length=u+1}}function s(t){for(var r=t<n.duration?n.ease.call(null,t/n.duration):(n.timer.restart(c),n.state=5,1),a=-1,o=i.length;++a<o;)i[a].call(e,r);n.state===5&&(n.on.call(`end`,e,e.__data__,n.index,n.group),c())}function c(){for(var i in n.state=6,n.timer.stop(),delete r[t],r)return;delete e.__transition}}function sL(e,t){var n=e.__transition,r,i,a=!0,o;if(n){for(o in t=t==null?null:t+``,n){if((r=n[o]).name!==t){a=!1;continue}i=r.state>2&&r.state<5,r.state=6,r.timer.stop(),r.on.call(i?`interrupt`:`cancel`,e,e.__data__,r.index,r.group),delete n[o]}a&&delete e.__transition}}function cL(e){return this.each(function(){sL(this,e)})}function lL(e,t){var n,r;return function(){var i=iL(this,e),a=i.tween;if(a!==n){r=n=a;for(var o=0,s=r.length;o<s;++o)if(r[o].name===t){r=r.slice(),r.splice(o,1);break}}i.tween=r}}function uL(e,t,n){var r,i;if(typeof n!=`function`)throw Error();return function(){var a=iL(this,e),o=a.tween;if(o!==r){i=(r=o).slice();for(var s={name:t,value:n},c=0,l=i.length;c<l;++c)if(i[c].name===t){i[c]=s;break}c===l&&i.push(s)}a.tween=i}}function dL(e,t){var n=this._id;if(e+=``,arguments.length<2){for(var r=aL(this.node(),n).tween,i=0,a=r.length,o;i<a;++i)if((o=r[i]).name===e)return o.value;return null}return this.each((t==null?lL:uL)(n,e,t))}function fL(e,t,n){var r=e._id;return e.each(function(){var e=iL(this,r);(e.value||={})[t]=n.apply(this,arguments)}),function(e){return aL(e,r).value[t]}}function pL(e,t){var n;return(typeof t==`number`?dI:t instanceof IF?oI:(n=IF(t))?(t=n,oI):_I)(e,t)}function mL(e){return function(){this.removeAttribute(e)}}function hL(e){return function(){this.removeAttributeNS(e.space,e.local)}}function gL(e,t,n){var r,i=n+``,a;return function(){var o=this.getAttribute(e);return o===i?null:o===r?a:a=t(r=o,n)}}function _L(e,t,n){var r,i=n+``,a;return function(){var o=this.getAttributeNS(e.space,e.local);return o===i?null:o===r?a:a=t(r=o,n)}}function vL(e,t,n){var r,i,a;return function(){var o,s=n(this),c;return s==null?void this.removeAttribute(e):(o=this.getAttribute(e),c=s+``,o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,s)))}}function yL(e,t,n){var r,i,a;return function(){var o,s=n(this),c;return s==null?void this.removeAttributeNS(e.space,e.local):(o=this.getAttributeNS(e.space,e.local),c=s+``,o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,s)))}}function bL(e,t){var n=rN(e),r=n===`transform`?DI:pL;return this.attrTween(e,typeof t==`function`?(n.local?yL:vL)(n,r,fL(this,`attr.`+e,t)):t==null?(n.local?hL:mL)(n):(n.local?_L:gL)(n,r,t))}function xL(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function SL(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function CL(e,t){var n,r;function i(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&SL(e,i)),n}return i._value=t,i}function wL(e,t){var n,r;function i(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&xL(e,i)),n}return i._value=t,i}function TL(e,t){var n=`attr.`+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!=`function`)throw Error();var r=rN(e);return this.tween(n,(r.local?CL:wL)(r,t))}function EL(e,t){return function(){rL(this,e).delay=+t.apply(this,arguments)}}function DL(e,t){return t=+t,function(){rL(this,e).delay=t}}function OL(e){var t=this._id;return arguments.length?this.each((typeof e==`function`?EL:DL)(t,e)):aL(this.node(),t).delay}function kL(e,t){return function(){iL(this,e).duration=+t.apply(this,arguments)}}function AL(e,t){return t=+t,function(){iL(this,e).duration=t}}function jL(e){var t=this._id;return arguments.length?this.each((typeof e==`function`?kL:AL)(t,e)):aL(this.node(),t).duration}function ML(e,t){if(typeof t!=`function`)throw Error();return function(){iL(this,e).ease=t}}function NL(e){var t=this._id;return arguments.length?this.each(ML(t,e)):aL(this.node(),t).ease}function PL(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!=`function`)throw Error();iL(this,e).ease=n}}function FL(e){if(typeof e!=`function`)throw Error();return this.each(PL(this._id,e))}function IL(e){typeof e!=`function`&&(e=hN(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,s=r[i]=[],c,l=0;l<o;++l)(c=a[l])&&e.call(c,c.__data__,l,a)&&s.push(c);return new dR(r,this._parents,this._name,this._id)}function LL(e){if(e._id!==this._id)throw Error();for(var t=this._groups,n=e._groups,r=t.length,i=n.length,a=Math.min(r,i),o=Array(r),s=0;s<a;++s)for(var c=t[s],l=n[s],u=c.length,d=o[s]=Array(u),f,p=0;p<u;++p)(f=c[p]||l[p])&&(d[p]=f);for(;s<r;++s)o[s]=t[s];return new dR(o,this._parents,this._name,this._id)}function RL(e){return(e+``).trim().split(/^|\s+/).every(function(e){var t=e.indexOf(`.`);return t>=0&&(e=e.slice(0,t)),!e||e===`start`})}function zL(e,t,n){var r,i,a=RL(t)?rL:iL;return function(){var o=a(this,e),s=o.on;s!==r&&(i=(r=s).copy()).on(t,n),o.on=i}}function BL(e,t){var n=this._id;return arguments.length<2?aL(this.node(),n).on.on(e):this.each(zL(n,e,t))}function VL(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function HL(){return this.on(`end.remove`,VL(this._id))}function UL(e){var t=this._name,n=this._id;typeof e!=`function`&&(e=cN(e));for(var r=this._groups,i=r.length,a=Array(i),o=0;o<i;++o)for(var s=r[o],c=s.length,l=a[o]=Array(c),u,d,f=0;f<c;++f)(u=s[f])&&(d=e.call(u,u.__data__,f,s))&&(`__data__`in u&&(d.__data__=u.__data__),l[f]=d,nL(l[f],t,n,f,l,aL(u,n)));return new dR(a,this._parents,t,n)}function WL(e){var t=this._name,n=this._id;typeof e!=`function`&&(e=fN(e));for(var r=this._groups,i=r.length,a=[],o=[],s=0;s<i;++s)for(var c=r[s],l=c.length,u,d=0;d<l;++d)if(u=c[d]){for(var f=e.call(u,u.__data__,d,c),p,m=aL(u,n),h=0,g=f.length;h<g;++h)(p=f[h])&&nL(p,t,n,h,f,m);a.push(f),o.push(u)}return new dR(a,o,t,n)}var GL=QP.prototype.constructor;function KL(){return new GL(this._groups,this._parents)}function qL(e,t){var n,r,i;return function(){var a=aP(this,e),o=(this.style.removeProperty(e),aP(this,e));return a===o?null:a===n&&o===r?i:i=t(n=a,r=o)}}function JL(e){return function(){this.style.removeProperty(e)}}function YL(e,t,n){var r,i=n+``,a;return function(){var o=aP(this,e);return o===i?null:o===r?a:a=t(r=o,n)}}function XL(e,t,n){var r,i,a;return function(){var o=aP(this,e),s=n(this),c=s+``;return s??(c=s=(this.style.removeProperty(e),aP(this,e))),o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,s))}}function ZL(e,t){var n,r,i,a=`style.`+t,o=`end.`+a,s;return function(){var c=iL(this,e),l=c.on,u=c.value[a]==null?s||=JL(t):void 0;(l!==n||i!==u)&&(r=(n=l).copy()).on(o,i=u),c.on=r}}function QL(e,t,n){var r=(e+=``)==`transform`?EI:pL;return t==null?this.styleTween(e,qL(e,r)).on(`end.style.`+e,JL(e)):typeof t==`function`?this.styleTween(e,XL(e,r,fL(this,`style.`+e,t))).each(ZL(this._id,e)):this.styleTween(e,YL(e,r,t),n).on(`end.style.`+e,null)}function $L(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function eR(e,t,n){var r,i;function a(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&$L(e,a,n)),r}return a._value=t,a}function tR(e,t,n){var r=`style.`+(e+=``);if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!=`function`)throw Error();return this.tween(r,eR(e,t,n??``))}function nR(e){return function(){this.textContent=e}}function rR(e){return function(){var t=e(this);this.textContent=t??``}}function iR(e){return this.tween(`text`,typeof e==`function`?rR(fL(this,`text`,e)):nR(e==null?``:e+``))}function aR(e){return function(t){this.textContent=e.call(this,t)}}function oR(e){var t,n;function r(){var r=e.apply(this,arguments);return r!==n&&(t=(n=r)&&aR(r)),t}return r._value=e,r}function sR(e){var t=`text`;if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!=`function`)throw Error();return this.tween(t,oR(e))}function cR(){for(var e=this._name,t=this._id,n=fR(),r=this._groups,i=r.length,a=0;a<i;++a)for(var o=r[a],s=o.length,c,l=0;l<s;++l)if(c=o[l]){var u=aL(c,t);nL(c,e,n,l,o,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new dR(r,this._parents,e,n)}function lR(){var e,t,n=this,r=n._id,i=n.size();return new Promise(function(a,o){var s={value:o},c={value:function(){--i===0&&a()}};n.each(function(){var n=iL(this,r),i=n.on;i!==e&&(t=(e=i).copy(),t._.cancel.push(s),t._.interrupt.push(s),t._.end.push(c)),n.on=t}),i===0&&a()})}var uR=0;function dR(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function fR(){return++uR}var pR=QP.prototype;dR.prototype={constructor:dR,select:UL,selectAll:WL,selectChild:pR.selectChild,selectChildren:pR.selectChildren,filter:IL,merge:LL,selection:KL,transition:cR,call:pR.call,nodes:pR.nodes,node:pR.node,size:pR.size,empty:pR.empty,each:pR.each,on:BL,attr:bL,attrTween:TL,style:QL,styleTween:tR,text:iR,textTween:sR,remove:HL,tween:dL,delay:OL,duration:jL,ease:NL,easeVarying:FL,end:lR,[Symbol.iterator]:pR[Symbol.iterator]};function mR(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var hR={time:null,delay:0,duration:250,ease:mR};function gR(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw Error(`transition ${t} not found`);return n}function _R(e){var t,n;e instanceof dR?(t=e._id,e=e._name):(t=fR(),(n=hR).time=WI(),e=e==null?null:e+``);for(var r=this._groups,i=r.length,a=0;a<i;++a)for(var o=r[a],s=o.length,c,l=0;l<s;++l)(c=o[l])&&nL(c,e,t,l,o,n||gR(c,t));return new dR(r,this._parents,e,t)}QP.prototype.interrupt=cL,QP.prototype.transition=_R;var vR=e=>()=>e;function yR(e,{sourceEvent:t,target:n,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}function bR(e,t,n){this.k=e,this.x=t,this.y=n}bR.prototype={constructor:bR,scale:function(e){return e===1?this:new bR(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new bR(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return`translate(`+this.x+`,`+this.y+`) scale(`+this.k+`)`}};var xR=new bR(1,0,0);SR.prototype=bR.prototype;function SR(e){for(;!e.__zoom;)if(!(e=e.parentNode))return xR;return e.__zoom}function CR(e){e.stopImmediatePropagation()}function wR(e){e.preventDefault(),e.stopImmediatePropagation()}function TR(e){return(!e.ctrlKey||e.type===`wheel`)&&!e.button}function ER(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute(`viewBox`)?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function DR(){return this.__zoom||xR}function OR(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function kR(){return navigator.maxTouchPoints||`ontouchstart`in this}function AR(e,t,n){var r=e.invertX(t[0][0])-n[0][0],i=e.invertX(t[1][0])-n[1][0],a=e.invertY(t[0][1])-n[0][1],o=e.invertY(t[1][1])-n[1][1];return e.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),o>a?(a+o)/2:Math.min(0,a)||Math.max(0,o))}function jR(){var e=TR,t=ER,n=AR,r=OR,i=kR,a=[0,1/0],o=[[-1/0,-1/0],[1/0,1/0]],s=250,c=MI,l=ZM(`start`,`zoom`,`end`),u,d,f,p=500,m=150,h=0,g=10;function _(e){e.property(`__zoom`,DR).on(`wheel.zoom`,w,{passive:!1}).on(`mousedown.zoom`,T).on(`dblclick.zoom`,E).filter(i).on(`touchstart.zoom`,D).on(`touchmove.zoom`,ee).on(`touchend.zoom touchcancel.zoom`,O).style(`-webkit-tap-highlight-color`,`rgba(0,0,0,0)`)}_.transform=function(e,t,n,r){var i=e.selection?e.selection():e;i.property(`__zoom`,DR),e===i?i.interrupt().each(function(){S(this,arguments).event(r).start().zoom(null,typeof t==`function`?t.apply(this,arguments):t).end()}):x(e,t,n,r)},_.scaleBy=function(e,t,n,r){_.scaleTo(e,function(){return this.__zoom.k*(typeof t==`function`?t.apply(this,arguments):t)},n,r)},_.scaleTo=function(e,r,i,a){_.transform(e,function(){var e=t.apply(this,arguments),a=this.__zoom,s=i==null?b(e):typeof i==`function`?i.apply(this,arguments):i,c=a.invert(s),l=typeof r==`function`?r.apply(this,arguments):r;return n(y(v(a,l),s,c),e,o)},i,a)},_.translateBy=function(e,r,i,a){_.transform(e,function(){return n(this.__zoom.translate(typeof r==`function`?r.apply(this,arguments):r,typeof i==`function`?i.apply(this,arguments):i),t.apply(this,arguments),o)},null,a)},_.translateTo=function(e,r,i,a,s){_.transform(e,function(){var e=t.apply(this,arguments),s=this.__zoom,c=a==null?b(e):typeof a==`function`?a.apply(this,arguments):a;return n(xR.translate(c[0],c[1]).scale(s.k).translate(typeof r==`function`?-r.apply(this,arguments):-r,typeof i==`function`?-i.apply(this,arguments):-i),e,o)},a,s)};function v(e,t){return t=Math.max(a[0],Math.min(a[1],t)),t===e.k?e:new bR(t,e.x,e.y)}function y(e,t,n){var r=t[0]-n[0]*e.k,i=t[1]-n[1]*e.k;return r===e.x&&i===e.y?e:new bR(e.k,r,i)}function b(e){return[(+e[0][0]+ +e[1][0])/2,(+e[0][1]+ +e[1][1])/2]}function x(e,n,r,i){e.on(`start.zoom`,function(){S(this,arguments).event(i).start()}).on(`interrupt.zoom end.zoom`,function(){S(this,arguments).event(i).end()}).tween(`zoom`,function(){var e=this,a=arguments,o=S(e,a).event(i),s=t.apply(e,a),l=r==null?b(s):typeof r==`function`?r.apply(e,a):r,u=Math.max(s[1][0]-s[0][0],s[1][1]-s[0][1]),d=e.__zoom,f=typeof n==`function`?n.apply(e,a):n,p=c(d.invert(l).concat(u/d.k),f.invert(l).concat(u/f.k));return function(e){if(e===1)e=f;else{var t=p(e),n=u/t[2];e=new bR(n,l[0]-t[0]*n,l[1]-t[1]*n)}o.zoom(null,e)}})}function S(e,t,n){return!n&&e.__zooming||new C(e,t)}function C(e,n){this.that=e,this.args=n,this.active=0,this.sourceEvent=null,this.extent=t.apply(e,n),this.taps=0}C.prototype={event:function(e){return e&&(this.sourceEvent=e),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit(`start`)),this},zoom:function(e,t){return this.mouse&&e!==`mouse`&&(this.mouse[1]=t.invert(this.mouse[0])),this.touch0&&e!==`touch`&&(this.touch0[1]=t.invert(this.touch0[0])),this.touch1&&e!==`touch`&&(this.touch1[1]=t.invert(this.touch1[0])),this.that.__zoom=t,this.emit(`zoom`),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit(`end`)),this},emit:function(e){var t=eF(this.that).datum();l.call(e,this.that,new yR(e,{sourceEvent:this.sourceEvent,target:_,type:e,transform:this.that.__zoom,dispatch:l}),t)}};function w(t,...i){if(!e.apply(this,arguments))return;var s=S(this,i).event(t),c=this.__zoom,l=Math.max(a[0],Math.min(a[1],c.k*2**r.apply(this,arguments))),u=nF(t);if(s.wheel)(s.mouse[0][0]!==u[0]||s.mouse[0][1]!==u[1])&&(s.mouse[1]=c.invert(s.mouse[0]=u)),clearTimeout(s.wheel);else if(c.k===l)return;else s.mouse=[u,c.invert(u)],sL(this),s.start();wR(t),s.wheel=setTimeout(d,m),s.zoom(`mouse`,n(y(v(c,l),s.mouse[0],s.mouse[1]),s.extent,o));function d(){s.wheel=null,s.end()}}function T(t,...r){if(f||!e.apply(this,arguments))return;var i=t.currentTarget,a=S(this,r,!0).event(t),s=eF(t.view).on(`mousemove.zoom`,d,!0).on(`mouseup.zoom`,p,!0),c=nF(t,i),l=t.clientX,u=t.clientY;sF(t.view),CR(t),a.mouse=[c,this.__zoom.invert(c)],sL(this),a.start();function d(e){if(wR(e),!a.moved){var t=e.clientX-l,r=e.clientY-u;a.moved=t*t+r*r>h}a.event(e).zoom(`mouse`,n(y(a.that.__zoom,a.mouse[0]=nF(e,i),a.mouse[1]),a.extent,o))}function p(e){s.on(`mousemove.zoom mouseup.zoom`,null),cF(e.view,a.moved),wR(e),a.event(e).end()}}function E(r,...i){if(e.apply(this,arguments)){var a=this.__zoom,c=nF(r.changedTouches?r.changedTouches[0]:r,this),l=a.invert(c),u=a.k*(r.shiftKey?.5:2),d=n(y(v(a,u),c,l),t.apply(this,i),o);wR(r),s>0?eF(this).transition().duration(s).call(x,d,c,r):eF(this).call(_.transform,d,c,r)}}function D(t,...n){if(e.apply(this,arguments)){var r=t.touches,i=r.length,a=S(this,n,t.changedTouches.length===i).event(t),o,s,c,l;for(CR(t),s=0;s<i;++s)c=r[s],l=nF(c,this),l=[l,this.__zoom.invert(l),c.identifier],a.touch0?!a.touch1&&a.touch0[2]!==l[2]&&(a.touch1=l,a.taps=0):(a.touch0=l,o=!0,a.taps=1+!!u);u&&=clearTimeout(u),o&&(a.taps<2&&(d=l[0],u=setTimeout(function(){u=null},p)),sL(this),a.start())}}function ee(e,...t){if(this.__zooming){var r=S(this,t).event(e),i=e.changedTouches,a=i.length,s,c,l,u;for(wR(e),s=0;s<a;++s)c=i[s],l=nF(c,this),r.touch0&&r.touch0[2]===c.identifier?r.touch0[0]=l:r.touch1&&r.touch1[2]===c.identifier&&(r.touch1[0]=l);if(c=r.that.__zoom,r.touch1){var d=r.touch0[0],f=r.touch0[1],p=r.touch1[0],m=r.touch1[1],h=(h=p[0]-d[0])*h+(h=p[1]-d[1])*h,g=(g=m[0]-f[0])*g+(g=m[1]-f[1])*g;c=v(c,Math.sqrt(h/g)),l=[(d[0]+p[0])/2,(d[1]+p[1])/2],u=[(f[0]+m[0])/2,(f[1]+m[1])/2]}else if(r.touch0)l=r.touch0[0],u=r.touch0[1];else return;r.zoom(`touch`,n(y(c,l,u),r.extent,o))}}function O(e,...t){if(this.__zooming){var n=S(this,t).event(e),r=e.changedTouches,i=r.length,a,o;for(CR(e),f&&clearTimeout(f),f=setTimeout(function(){f=null},p),a=0;a<i;++a)o=r[a],n.touch0&&n.touch0[2]===o.identifier?delete n.touch0:n.touch1&&n.touch1[2]===o.identifier&&delete n.touch1;if(n.touch1&&!n.touch0&&(n.touch0=n.touch1,delete n.touch1),n.touch0)n.touch0[1]=this.__zoom.invert(n.touch0[0]);else if(n.end(),n.taps===2&&(o=nF(o,this),Math.hypot(d[0]-o[0],d[1]-o[1])<g)){var s=eF(this).on(`dblclick.zoom`);s&&s.apply(this,arguments)}}}return _.wheelDelta=function(e){return arguments.length?(r=typeof e==`function`?e:vR(+e),_):r},_.filter=function(t){return arguments.length?(e=typeof t==`function`?t:vR(!!t),_):e},_.touchable=function(e){return arguments.length?(i=typeof e==`function`?e:vR(!!e),_):i},_.extent=function(e){return arguments.length?(t=typeof e==`function`?e:vR([[+e[0][0],+e[0][1]],[+e[1][0],+e[1][1]]]),_):t},_.scaleExtent=function(e){return arguments.length?(a[0]=+e[0],a[1]=+e[1],_):[a[0],a[1]]},_.translateExtent=function(e){return arguments.length?(o[0][0]=+e[0][0],o[1][0]=+e[1][0],o[0][1]=+e[0][1],o[1][1]=+e[1][1],_):[[o[0][0],o[0][1]],[o[1][0],o[1][1]]]},_.constrain=function(e){return arguments.length?(n=e,_):n},_.duration=function(e){return arguments.length?(s=+e,_):s},_.interpolate=function(e){return arguments.length?(c=e,_):c},_.on=function(){var e=l.on.apply(l,arguments);return e===l?_:e},_.clickDistance=function(e){return arguments.length?(h=(e=+e)*e,_):Math.sqrt(h)},_.tapDistance=function(e){return arguments.length?(g=+e,_):g},_}var MR={error001:(e=`react`)=>`Seems like you have not used ${e===`svelte`?`SvelteFlowProvider`:`ReactFlowProvider`} as an ancestor. Help: https://${e}flow.dev/error#001`,error002:()=>`It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.`,error003:e=>`Node type "${e}" not found. Using fallback type "default".`,error004:()=>`The parent container needs a width and a height to render the graph.`,error005:()=>`Only child nodes can use a parent extent.`,error006:()=>`Can't create edge. An edge needs a source and a target.`,error007:e=>`The old edge with id=${e} does not exist.`,error009:e=>`Marker type "${e}" doesn't exist.`,error008:(e,{id:t,sourceHandle:n,targetHandle:r})=>`Couldn't create edge for ${e} handle id: "${e===`source`?n:r}", edge id: ${t}.`,error010:()=>`Handle: No node id found. Make sure to only use a Handle inside a custom Node.`,error011:e=>`Edge type "${e}" not found. Using fallback type "default".`,error012:e=>`Node with id "${e}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(e=`react`)=>`It seems that you haven't loaded the styles. Please import '@xyflow/${e}/dist/style.css' or base.css to make sure everything is working properly.`,error014:()=>`useNodeConnections: No node ID found. Call useNodeConnections inside a custom Node or provide a node ID.`,error015:()=>`It seems that you are trying to drag a node that is not initialized. Please use onNodesChange as explained in the docs.`,error016:e=>`Edge with id "${e}" does not exist, it may have been removed. This can happen when an edge is deleted before the "onEdgeClick" handler is called.`},NR=[[-1/0,-1/0],[1/0,1/0]],PR=[`Enter`,` `,`Escape`],FR={"node.a11yDescription.default":`Press enter or space to select a node. Press delete to remove it and escape to cancel.`,"node.a11yDescription.keyboardDisabled":`Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.`,"node.a11yDescription.ariaLiveMessage":({direction:e,x:t,y:n})=>`Moved selected node ${e}. New position, x: ${t}, y: ${n}`,"edge.a11yDescription.default":`Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.`,"controls.ariaLabel":`Control Panel`,"controls.zoomIn.ariaLabel":`Zoom In`,"controls.zoomOut.ariaLabel":`Zoom Out`,"controls.fitView.ariaLabel":`Fit View`,"controls.interactive.ariaLabel":`Toggle Interactivity`,"minimap.ariaLabel":`Mini Map`,"handle.ariaLabel":`Handle`},IR;(function(e){e.Strict=`strict`,e.Loose=`loose`})(IR||={});var LR;(function(e){e.Free=`free`,e.Vertical=`vertical`,e.Horizontal=`horizontal`})(LR||={});var RR;(function(e){e.Partial=`partial`,e.Full=`full`})(RR||={});var zR={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null},BR;(function(e){e.Bezier=`default`,e.Straight=`straight`,e.Step=`step`,e.SmoothStep=`smoothstep`,e.SimpleBezier=`simplebezier`})(BR||={});var VR;(function(e){e.Arrow=`arrow`,e.ArrowClosed=`arrowclosed`})(VR||={});var HR;(function(e){e.Left=`left`,e.Top=`top`,e.Right=`right`,e.Bottom=`bottom`})(HR||={});var UR={[HR.Left]:HR.Right,[HR.Right]:HR.Left,[HR.Top]:HR.Bottom,[HR.Bottom]:HR.Top},WR=e=>!!e&&typeof e==`object`&&`id`in e&&`source`in e&&`target`in e,GR=e=>!!e&&typeof e==`object`&&`id`in e&&`position`in e&&!(`source`in e)&&!(`target`in e),KR=e=>!!e&&typeof e==`object`&&`id`in e&&`internals`in e&&!(`source`in e)&&!(`target`in e),qR=(e,t=[0,0])=>{let{width:n,height:r}=Dz(e),i=e.origin??t,a=n*i[0],o=r*i[1];return{x:e.position.x-a,y:e.position.y-o}},JR=(e,t={nodeOrigin:[0,0]})=>{if(e.length===0)return{x:0,y:0,width:0,height:0};let n=!1,r=e.reduce((e,r)=>{let i=typeof r==`string`,a=!t.nodeLookup&&!i?r:void 0;return t.nodeLookup&&(a=i?t.nodeLookup.get(r):KR(r)?r:t.nodeLookup.get(r.id)),a?(n=!0,sz(e,dz(a,t.nodeOrigin))):e},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return n?lz(r):{x:0,y:0,width:0,height:0}},YR=(e,t={})=>{let n={x:1/0,y:1/0,x2:-1/0,y2:-1/0},r=!1;return e.forEach(e=>{(t.filter===void 0||t.filter(e))&&(n=sz(n,dz(e)),r=!0)}),r?lz(n):{x:0,y:0,width:0,height:0}},XR=(e,t,[n,r,i]=[0,0,1],a=!1,o=!1)=>{let s=(t.x-n)/i,c=(t.y-r)/i,l=t.width/i,u=t.height/i,d=[];for(let t of e.values()){let{measured:e,selectable:n=!0,hidden:r=!1}=t;if(o&&!n||r)continue;let i=e.width??t.width??t.initialWidth??0,f=e.height??t.height??t.initialHeight??0,{x:p,y:m}=t.internals.positionAbsolute,h=pz(s,c,l,u,p,m,i,f),g=i*f,_=a&&h>0;(!t.internals.handleBounds||_||h>=g||t.dragging)&&d.push(t)}return d},ZR=(e,t)=>{let n=new Set;return e.forEach(e=>{n.add(e.id)}),t.filter(e=>n.has(e.source)||n.has(e.target))};function QR(e,t){let n=new Map,r=t?.nodes?new Set(t.nodes.map(e=>e.id)):null;return e.forEach(e=>{let i;if(t?.includeHiddenNodes){let{width:t,height:n}=Dz(e);i=t>0&&n>0}else i=!!(e.measured.width&&e.measured.height&&!e.hidden);i&&(!r||r.has(e.id))&&n.set(e.id,e)}),n}async function $R({nodes:e,width:t,height:n,panZoom:r,minZoom:i,maxZoom:a},o){if(e.size===0)return!0;let s=wz(YR(QR(e,o)),t,n,o?.minZoom??i,o?.maxZoom??a,o?.padding??.1);return await r.setViewport(s,{duration:o?.duration,ease:o?.ease,interpolate:o?.interpolate}),!0}function ez({nodeId:e,nextPosition:t,nodeLookup:n,nodeOrigin:r=[0,0],nodeExtent:i,onError:a}){let o=n.get(e),s=o.parentId?n.get(o.parentId):void 0,{x:c,y:l}=s?s.internals.positionAbsolute:{x:0,y:0},u=o.origin??r,d=o.extent||i;if(o.extent===`parent`&&!o.expandParent){if(!s)a?.(`005`,MR.error005());else{let{width:e,height:t}=Dz(s);e&&t&&(d=[[c,l],[c+e,l+t]])}}else s&&Ez(o.extent)&&(d=[[o.extent[0][0]+c,o.extent[0][1]+l],[o.extent[1][0]+c,o.extent[1][1]+l]]);let f=Ez(d)?rz(t,d,o.measured):t;return(o.measured.width===void 0||o.measured.height===void 0)&&a?.(`015`,MR.error015()),{position:{x:f.x-c+(o.measured.width??0)*u[0],y:f.y-l+(o.measured.height??0)*u[1]},positionAbsolute:f}}async function tz({nodesToRemove:e=[],edgesToRemove:t=[],nodes:n,edges:r,onBeforeDelete:i}){let a=new Set(e.map(e=>e.id)),o=[];for(let e of n){if(e.deletable===!1)continue;let t=a.has(e.id),n=!t&&e.parentId&&o.find(t=>t.id===e.parentId);(t||n)&&o.push(e)}let s=new Set(t.map(e=>e.id)),c=r.filter(e=>e.deletable!==!1),l=ZR(o,c);for(let e of c)s.has(e.id)&&!l.find(t=>t.id===e.id)&&l.push(e);if(!i)return{edges:l,nodes:o};let u=await i({nodes:o,edges:l});return typeof u==`boolean`?u?{edges:l,nodes:o}:{edges:[],nodes:[]}:u}var nz=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),rz=(e={x:0,y:0},t,n)=>({x:nz(e.x,t[0][0],t[1][0]-(n?.width??0)),y:nz(e.y,t[0][1],t[1][1]-(n?.height??0))});function iz(e,t,n){let{width:r,height:i}=Dz(n),{x:a,y:o}=n.internals.positionAbsolute;return rz(e,[[a,o],[a+r,o+i]],t)}var az=(e,t,n)=>e<t?nz(Math.abs(e-t),1,t)/t:e>n?-nz(Math.abs(e-n),1,t)/t:0,oz=(e,t,n=15,r=40)=>[az(e.x,r,t.width-r)*n,az(e.y,r,t.height-r)*n],sz=(e,t)=>({x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}),cz=({x:e,y:t,width:n,height:r})=>({x:e,y:t,x2:e+n,y2:t+r}),lz=({x:e,y:t,x2:n,y2:r})=>({x:e,y:t,width:n-e,height:r-t}),uz=(e,t=[0,0])=>{let{x:n,y:r}=KR(e)?e.internals.positionAbsolute:qR(e,t);return{x:n,y:r,width:e.measured?.width??e.width??e.initialWidth??0,height:e.measured?.height??e.height??e.initialHeight??0}},dz=(e,t=[0,0])=>{let{x:n,y:r}=KR(e)?e.internals.positionAbsolute:qR(e,t);return{x:n,y:r,x2:n+(e.measured?.width??e.width??e.initialWidth??0),y2:r+(e.measured?.height??e.height??e.initialHeight??0)}},fz=(e,t)=>lz(sz(cz(e),cz(t))),pz=(e,t,n,r,i,a,o,s)=>{let c=Math.max(0,Math.min(e+n,i+o)-Math.max(e,i)),l=Math.max(0,Math.min(t+r,a+s)-Math.max(t,a));return Math.ceil(c*l)},mz=(e,t)=>pz(e.x,e.y,e.width,e.height,t.x,t.y,t.width,t.height),hz=e=>gz(e.width)&&gz(e.height)&&gz(e.x)&&gz(e.y),gz=e=>!isNaN(e)&&isFinite(e),_z=(e,t)=>(e,t)=>{},vz=(e,t=[1,1])=>({x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}),yz=({x:e,y:t},[n,r,i],a=!1,o=[1,1])=>{let s={x:(e-n)/i,y:(t-r)/i};return a?vz(s,o):s},bz=({x:e,y:t},[n,r,i])=>({x:e*i+n,y:t*i+r});function xz(e,t){if(typeof e==`number`)return Math.floor((t-t/(1+e))*.5);if(typeof e==`string`&&e.endsWith(`px`)){let t=parseFloat(e);if(!Number.isNaN(t))return Math.floor(t)}if(typeof e==`string`&&e.endsWith(`%`)){let n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(t*n*.01)}return console.error(`The padding value "${e}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function Sz(e,t,n){if(typeof e==`string`||typeof e==`number`){let r=xz(e,n),i=xz(e,t);return{top:r,right:i,bottom:r,left:i,x:i*2,y:r*2}}if(typeof e==`object`){let r=xz(e.top??e.y??0,n),i=xz(e.bottom??e.y??0,n),a=xz(e.left??e.x??0,t),o=xz(e.right??e.x??0,t);return{top:r,right:o,bottom:i,left:a,x:a+o,y:r+i}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function Cz(e,t,n,r,i,a){let{x:o,y:s}=bz(e,[t,n,r]),{x:c,y:l}=bz({x:e.x+e.width,y:e.y+e.height},[t,n,r]),u=i-c,d=a-l;return{left:Math.floor(o),top:Math.floor(s),right:Math.floor(u),bottom:Math.floor(d)}}var wz=(e,t,n,r,i,a)=>{let o=Sz(a,t,n),s=(t-o.x)/e.width,c=(n-o.y)/e.height,l=nz(Math.min(s,c),r,i),u=e.x+e.width/2,d=e.y+e.height/2,f=t/2-u*l,p=n/2-d*l,m=Cz(e,f,p,l,t,n),h={left:Math.min(m.left-o.left,0),top:Math.min(m.top-o.top,0),right:Math.min(m.right-o.right,0),bottom:Math.min(m.bottom-o.bottom,0)};return{x:f-h.left+h.right,y:p-h.top+h.bottom,zoom:l}},Tz=()=>typeof navigator<`u`&&navigator?.userAgent?.indexOf(`Mac`)>=0;function Ez(e){return e!=null&&e!==`parent`}function Dz(e){return{width:e.measured?.width??e.width??e.initialWidth??0,height:e.measured?.height??e.height??e.initialHeight??0}}function Oz(e){return(e.measured?.width??e.width??e.initialWidth)!==void 0&&(e.measured?.height??e.height??e.initialHeight)!==void 0}function kz(e,t={width:0,height:0},n,r,i){let a={...e},o=r.get(n);if(o){let e=o.origin||i;a.x+=o.internals.positionAbsolute.x-(t.width??0)*e[0],a.y+=o.internals.positionAbsolute.y-(t.height??0)*e[1]}return a}function Az(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}function jz(){let e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}function Mz(e){return{...FR,...e||{}}}function Nz(e){return e===null?null:e?`valid`:`invalid`}function Pz(e,{snapGrid:t=[0,0],snapToGrid:n=!1,transform:r,containerBounds:i}){let{x:a,y:o}=Bz(e),s=yz({x:a-(i?.left??0),y:o-(i?.top??0)},r),{x:c,y:l}=n?vz(s,t):s;return{xSnapped:c,ySnapped:l,...s}}var Fz=e=>({width:e.offsetWidth,height:e.offsetHeight}),Iz=e=>e?.getRootNode?.()||window?.document,Lz=[`INPUT`,`SELECT`,`TEXTAREA`];function Rz(e){let t=e.composedPath?.()?.[0]||e.target;return t?.nodeType===1?Lz.includes(t.nodeName)||t.hasAttribute(`contenteditable`)||!!t.closest(`.nokey`):!1}var zz=e=>`clientX`in e,Bz=(e,t)=>{let n=zz(e),r=n?e.clientX:e.touches?.[0].clientX,i=n?e.clientY:e.touches?.[0].clientY;return{x:r-(t?.left??0),y:i-(t?.top??0)}},Vz=(e,t,n,r,i)=>{let a=t.querySelectorAll(`.${e}`);return!a||!a.length?null:Array.from(a).map(t=>{let a=t.getBoundingClientRect();return{id:t.getAttribute(`data-handleid`),type:e,nodeId:i,position:t.getAttribute(`data-handlepos`),x:(a.left-n.left)/r,y:(a.top-n.top)/r,...Fz(t)}})};function Hz({sourceX:e,sourceY:t,targetX:n,targetY:r,sourceControlX:i,sourceControlY:a,targetControlX:o,targetControlY:s}){let c=e*.125+i*.375+o*.375+n*.125,l=t*.125+a*.375+s*.375+r*.125;return[c,l,Math.abs(c-e),Math.abs(l-t)]}function Uz(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function Wz({pos:e,x1:t,y1:n,x2:r,y2:i,c:a}){switch(e){case HR.Left:return[t-Uz(t-r,a),n];case HR.Right:return[t+Uz(r-t,a),n];case HR.Top:return[t,n-Uz(n-i,a)];case HR.Bottom:return[t,n+Uz(i-n,a)]}}function Gz({sourceX:e,sourceY:t,sourcePosition:n=HR.Bottom,targetX:r,targetY:i,targetPosition:a=HR.Top,curvature:o=.25}){let[s,c]=Wz({pos:n,x1:e,y1:t,x2:r,y2:i,c:o}),[l,u]=Wz({pos:a,x1:r,y1:i,x2:e,y2:t,c:o}),[d,f,p,m]=Hz({sourceX:e,sourceY:t,targetX:r,targetY:i,sourceControlX:s,sourceControlY:c,targetControlX:l,targetControlY:u});return[`M${e},${t} C${s},${c} ${l},${u} ${r},${i}`,d,f,p,m]}function Kz({sourceX:e,sourceY:t,targetX:n,targetY:r}){let i=Math.abs(n-e)/2,a=n<e?n+i:n-i,o=Math.abs(r-t)/2;return[a,r<t?r+o:r-o,i,o]}function qz({sourceNode:e,targetNode:t,selected:n=!1,zIndex:r=0,elevateOnSelect:i=!1,zIndexMode:a=`basic`}){return a===`manual`?r:(i&&n?r+1e3:r)+Math.max(e.parentId||i&&e.selected?e.internals.z:0,t.parentId||i&&t.selected?t.internals.z:0)}function Jz({sourceNode:e,targetNode:t,width:n,height:r,transform:i}){let a=sz(dz(e),dz(t));return a.x===a.x2&&(a.x2+=1),a.y===a.y2&&(a.y2+=1),mz({x:-i[0]/i[2],y:-i[1]/i[2],width:n/i[2],height:r/i[2]},lz(a))>0}var Yz=({source:e,sourceHandle:t,target:n,targetHandle:r})=>`xy-edge__${e}${t||``}-${n}${r||``}`,Xz=(e,t)=>t.some(t=>t.source===e.source&&t.target===e.target&&(t.sourceHandle===e.sourceHandle||!t.sourceHandle&&!e.sourceHandle)&&(t.targetHandle===e.targetHandle||!t.targetHandle&&!e.targetHandle)),Zz=(e,t,n={})=>{if(!e.source||!e.target)return n.onError?.(`006`,MR.error006()),t;let r=n.getEdgeId||Yz,i;return i=WR(e)?{...e}:{...e,id:r(e)},Xz(i,t)?t:(i.sourceHandle===null&&delete i.sourceHandle,i.targetHandle===null&&delete i.targetHandle,t.concat(i))};function Qz({sourceX:e,sourceY:t,targetX:n,targetY:r}){let[i,a,o,s]=Kz({sourceX:e,sourceY:t,targetX:n,targetY:r});return[`M ${e},${t}L ${n},${r}`,i,a,o,s]}var $z={[HR.Left]:{x:-1,y:0},[HR.Right]:{x:1,y:0},[HR.Top]:{x:0,y:-1},[HR.Bottom]:{x:0,y:1}},eB=({source:e,sourcePosition:t=HR.Bottom,target:n})=>t===HR.Left||t===HR.Right?e.x<n.x?{x:1,y:0}:{x:-1,y:0}:e.y<n.y?{x:0,y:1}:{x:0,y:-1},tB=(e,t)=>Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2);function nB({source:e,sourcePosition:t=HR.Bottom,target:n,targetPosition:r=HR.Top,center:i,offset:a,stepPosition:o}){let s=$z[t],c=$z[r],l={x:e.x+s.x*a,y:e.y+s.y*a},u={x:n.x+c.x*a,y:n.y+c.y*a},d=eB({source:l,sourcePosition:t,target:u}),f=d.x===0?`y`:`x`,p=d[f],m=[],h,g,_={x:0,y:0},v={x:0,y:0},[,,y,b]=Kz({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(s[f]*c[f]===-1){f===`x`?(h=i.x??l.x+(u.x-l.x)*o,g=i.y??(l.y+u.y)/2):(h=i.x??(l.x+u.x)/2,g=i.y??l.y+(u.y-l.y)*o);let e=[{x:h,y:l.y},{x:h,y:u.y}],t=[{x:l.x,y:g},{x:u.x,y:g}];m=s[f]===p?f===`x`?e:t:f===`x`?t:e}else{let i=[{x:l.x,y:u.y}],o=[{x:u.x,y:l.y}];if(m=f===`x`?s.x===p?o:i:s.y===p?i:o,t===r){let t=Math.abs(e[f]-n[f]);if(t<=a){let r=Math.min(a-1,a-t);s[f]===p?_[f]=(l[f]>e[f]?-1:1)*r:v[f]=(u[f]>n[f]?-1:1)*r}}if(t!==r){let e=f===`x`?`y`:`x`,t=s[f]===c[e],n=l[e]>u[e],r=l[e]<u[e];(s[f]===1&&(!t&&n||t&&r)||s[f]!==1&&(!t&&r||t&&n))&&(m=f===`x`?i:o)}let d={x:l.x+_.x,y:l.y+_.y},y={x:u.x+v.x,y:u.y+v.y};Math.max(Math.abs(d.x-m[0].x),Math.abs(y.x-m[0].x))>=Math.max(Math.abs(d.y-m[0].y),Math.abs(y.y-m[0].y))?(h=(d.x+y.x)/2,g=m[0].y):(h=m[0].x,g=(d.y+y.y)/2)}let x={x:l.x+_.x,y:l.y+_.y},S={x:u.x+v.x,y:u.y+v.y};return[[e,...x.x!==m[0].x||x.y!==m[0].y?[x]:[],...m,...S.x!==m[m.length-1].x||S.y!==m[m.length-1].y?[S]:[],n],h,g,y,b]}function rB(e,t,n,r){let i=Math.min(tB(e,t)/2,tB(t,n)/2,r),{x:a,y:o}=t;if(e.x===a&&a===n.x||e.y===o&&o===n.y)return`L${a} ${o}`;if(e.y===o){let t=e.x<n.x?-1:1,r=e.y<n.y?1:-1;return`L ${a+i*t},${o}Q ${a},${o} ${a},${o+i*r}`}let s=e.x<n.x?1:-1;return`L ${a},${o+i*(e.y<n.y?-1:1)}Q ${a},${o} ${a+i*s},${o}`}function iB({sourceX:e,sourceY:t,sourcePosition:n=HR.Bottom,targetX:r,targetY:i,targetPosition:a=HR.Top,borderRadius:o=5,centerX:s,centerY:c,offset:l=20,stepPosition:u=.5}){let[d,f,p,m,h]=nB({source:{x:e,y:t},sourcePosition:n,target:{x:r,y:i},targetPosition:a,center:{x:s,y:c},offset:l,stepPosition:u}),g=`M${d[0].x} ${d[0].y}`;for(let e=1;e<d.length-1;e++)g+=rB(d[e-1],d[e],d[e+1],o);return g+=`L${d[d.length-1].x} ${d[d.length-1].y}`,[g,f,p,m,h]}function aB(e){return e&&!!(e.internals.handleBounds||e.handles?.length)&&!!(e.measured.width||e.width||e.initialWidth)}function oB(e){let{sourceNode:t,targetNode:n}=e;if(!aB(t)||!aB(n))return null;let r=t.internals.handleBounds||sB(t.handles),i=n.internals.handleBounds||sB(n.handles),a=lB(r?.source??[],e.sourceHandle),o=lB(e.connectionMode===IR.Strict?i?.target??[]:(i?.target??[]).concat(i?.source??[]),e.targetHandle);if(!a||!o)return e.onError?.(`008`,MR.error008(a?`target`:`source`,{id:e.id,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),null;let s=a?.position||HR.Bottom,c=o?.position||HR.Top,l=cB(t,a,s),u=cB(n,o,c);return{sourceX:l.x,sourceY:l.y,targetX:u.x,targetY:u.y,sourcePosition:s,targetPosition:c}}function sB(e){if(!e)return null;let t=[],n=[];for(let r of e)r.width=r.width??1,r.height=r.height??1,r.type===`source`?t.push(r):r.type===`target`&&n.push(r);return{source:t,target:n}}function cB(e,t,n=HR.Left,r=!1){let i=(t?.x??0)+e.internals.positionAbsolute.x,a=(t?.y??0)+e.internals.positionAbsolute.y,{width:o,height:s}=t??Dz(e);if(r)return{x:i+o/2,y:a+s/2};switch(t?.position??n){case HR.Top:return{x:i+o/2,y:a};case HR.Right:return{x:i+o,y:a+s/2};case HR.Bottom:return{x:i+o/2,y:a+s};case HR.Left:return{x:i,y:a+s/2}}}function lB(e,t){return e&&(t?e.find(e=>e.id===t):e[0])||null}function uB(e,t){return e?typeof e==`string`?e:`${t?`${t}__`:``}${Object.keys(e).sort().map(t=>`${t}=${e[t]}`).join(`&`)}`:``}function dB(e,{id:t,defaultColor:n,defaultMarkerStart:r,defaultMarkerEnd:i}){let a=new Set;return e.reduce((e,o)=>([o.markerStart||r,o.markerEnd||i].forEach(r=>{if(r&&typeof r==`object`){let i=uB(r,t);a.has(i)||(e.push({id:i,color:r.color||n,...r}),a.add(i))}}),e),[]).sort((e,t)=>e.id.localeCompare(t.id))}var fB=1e3,pB=10,mB={nodeOrigin:[0,0],nodeExtent:NR,elevateNodesOnSelect:!0,zIndexMode:`basic`,defaults:{}},hB={...mB,checkEquality:!0};function gB(e,t){let n={...e};for(let e in t)t[e]!==void 0&&(n[e]=t[e]);return n}function _B(e,t,n){let r=gB(mB,n);for(let n of e.values())if(n.parentId)SB(n,e,t,r);else{let e=rz(qR(n,r.nodeOrigin),Ez(n.extent)?n.extent:r.nodeExtent,Dz(n));n.internals.positionAbsolute=e}}function vB(e,t){if(!e.handles)return e.measured?t?.internals.handleBounds:void 0;let n=[],r=[];for(let t of e.handles){let i={id:t.id,width:t.width??1,height:t.height??1,nodeId:e.id,x:t.x,y:t.y,position:t.position,type:t.type};t.type===`source`?n.push(i):t.type===`target`&&r.push(i)}return{source:n,target:r}}function yB(e){return e===`manual`}function bB(e,t,n,r={}){let i=gB(hB,r),a={i:0},o=new Map(t),s=i?.elevateNodesOnSelect&&!yB(i.zIndexMode)?fB:0,c=e.length>0,l=!1;t.clear(),n.clear();for(let u of e){let e=o.get(u.id);if(i.checkEquality&&u===e?.internals.userNode)t.set(u.id,e);else{let n=rz(qR(u,i.nodeOrigin),Ez(u.extent)?u.extent:i.nodeExtent,Dz(u));e={...i.defaults,...u,measured:{width:u.measured?.width,height:u.measured?.height},internals:{positionAbsolute:n,handleBounds:vB(u,e),z:CB(u,s,i.zIndexMode),userNode:u}},t.set(u.id,e)}(e.measured===void 0||e.measured.width===void 0||e.measured.height===void 0)&&!e.hidden&&(c=!1),u.parentId&&SB(e,t,n,r,a),l||=u.selected??!1}return{nodesInitialized:c,hasSelectedNodes:l}}function xB(e,t){if(!e.parentId)return;let n=t.get(e.parentId);n?n.set(e.id,e):t.set(e.parentId,new Map([[e.id,e]]))}function SB(e,t,n,r,i){let{elevateNodesOnSelect:a,nodeOrigin:o,nodeExtent:s,zIndexMode:c}=gB(mB,r),l=e.parentId,u=t.get(l);if(!u){console.warn(`Parent node ${l} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}xB(e,n),i&&!u.parentId&&u.internals.rootParentIndex===void 0&&c===`auto`&&(u.internals.rootParentIndex=++i.i,u.internals.z=u.internals.z+i.i*pB),i&&u.internals.rootParentIndex!==void 0&&(i.i=u.internals.rootParentIndex);let{x:d,y:f,z:p}=wB(e,u,o,s,a&&!yB(c)?fB:0,c),{positionAbsolute:m}=e.internals,h=d!==m.x||f!==m.y;(h||p!==e.internals.z)&&t.set(e.id,{...e,internals:{...e.internals,positionAbsolute:h?{x:d,y:f}:m,z:p}})}function CB(e,t,n){let r=gz(e.zIndex)?e.zIndex:0;return yB(n)?r:r+(e.selected?t:0)}function wB(e,t,n,r,i,a){let{x:o,y:s}=t.internals.positionAbsolute,c=Dz(e),l=qR(e,n),u=Ez(e.extent)?rz(l,e.extent,c):l,d=rz({x:o+u.x,y:s+u.y},r,c);e.extent===`parent`&&(d=iz(d,c,t));let f=CB(e,i,a),p=t.internals.z??0;return{x:d.x,y:d.y,z:p>=f?p+1:f}}function TB(e,t,n,r=[0,0]){let i=[],a=new Map;for(let n of e){let e=t.get(n.parentId);if(!e)continue;let r=fz(a.get(n.parentId)?.expandedRect??uz(e),n.rect);a.set(n.parentId,{expandedRect:r,parent:e})}return a.size>0&&a.forEach(({expandedRect:t,parent:a},o)=>{let s=a.internals.positionAbsolute,c=Dz(a),l=a.origin??r,u=t.x<s.x?Math.round(Math.abs(s.x-t.x)):0,d=t.y<s.y?Math.round(Math.abs(s.y-t.y)):0,f=Math.max(c.width,Math.round(t.width)),p=Math.max(c.height,Math.round(t.height)),m=(f-c.width)*l[0],h=(p-c.height)*l[1];(u>0||d>0||m||h)&&(i.push({id:o,type:`position`,position:{x:a.position.x-u+m,y:a.position.y-d+h}}),n.get(o)?.forEach(t=>{e.some(e=>e.id===t.id)||i.push({id:t.id,type:`position`,position:{x:t.position.x+u,y:t.position.y+d}})})),(c.width<t.width||c.height<t.height||u||d)&&i.push({id:o,type:`dimensions`,setAttributes:!0,dimensions:{width:f+(u?l[0]*u-m:0),height:p+(d?l[1]*d-h:0)}})}),i}function EB(e,t,n,r,i,a,o){let s=r?.querySelector(`.xyflow__viewport`),c=!1;if(!s)return{changes:[],updatedInternals:c};let l=[],u=window.getComputedStyle(s),{m22:d}=new window.DOMMatrixReadOnly(u.transform),f=[];for(let r of e.values()){let e=t.get(r.id);if(!e)continue;if(e.hidden){t.set(e.id,{...e,internals:{...e.internals,handleBounds:void 0}}),c=!0;continue}let s=Fz(r.nodeElement),u=e.measured.width!==s.width||e.measured.height!==s.height;if(s.width&&s.height&&(u||!e.internals.handleBounds||r.force)){let p=r.nodeElement.getBoundingClientRect(),m=Ez(e.extent)?e.extent:a,{positionAbsolute:h}=e.internals;if(e.parentId&&e.extent===`parent`){let n=t.get(e.parentId);n&&(h=iz(h,s,n))}else m&&(h=rz(h,m,s));let g={...e,measured:s,internals:{...e.internals,positionAbsolute:h,handleBounds:{source:Vz(`source`,r.nodeElement,p,d,e.id),target:Vz(`target`,r.nodeElement,p,d,e.id)}}};t.set(e.id,g),e.parentId&&SB(g,t,n,{nodeOrigin:i,zIndexMode:o}),c=!0,u&&(l.push({id:e.id,type:`dimensions`,dimensions:s}),e.expandParent&&e.parentId&&f.push({id:e.id,parentId:e.parentId,rect:uz(g,i)}))}}if(f.length>0){let e=TB(f,t,n,i);l.push(...e)}return{changes:l,updatedInternals:c}}async function DB({delta:e,panZoom:t,transform:n,translateExtent:r,width:i,height:a}){if(!t||!e.x&&!e.y)return!1;let o=await t.setViewportConstrained({x:n[0]+e.x,y:n[1]+e.y,zoom:n[2]},[[0,0],[i,a]],r);return!!o&&(o.x!==n[0]||o.y!==n[1]||o.k!==n[2])}function OB(e,t,n,r,i,a){let o=i,s=r.get(o)||new Map;r.set(o,s.set(n,t)),o=`${i}-${e}`;let c=r.get(o)||new Map;if(r.set(o,c.set(n,t)),a){o=`${i}-${e}-${a}`;let s=r.get(o)||new Map;r.set(o,s.set(n,t))}}function kB(e,t,n){e.clear(),t.clear();for(let r of n){let{source:n,target:i,sourceHandle:a=null,targetHandle:o=null}=r,s={edgeId:r.id,source:n,target:i,sourceHandle:a,targetHandle:o},c=`${n}-${a}--${i}-${o}`;OB(`source`,s,`${i}-${o}--${n}-${a}`,e,n,a),OB(`target`,s,c,e,i,o),t.set(r.id,r)}}function AB(e,t){if(!e.parentId)return!1;let n=t.get(e.parentId);return n?n.selected?!0:AB(n,t):!1}function jB(e,t,n){let r=e;do{if(r?.matches?.(t))return!0;if(r===n)return!1;r=r?.parentElement}while(r);return!1}function MB(e,t,n,r){let i=new Map;for(let[a,o]of e)if((o.selected||o.id===r)&&(!o.parentId||!AB(o,e))&&(o.draggable||t&&o.draggable===void 0)){let t=e.get(a);t&&i.set(a,{id:a,position:t.position||{x:0,y:0},distance:{x:n.x-t.internals.positionAbsolute.x,y:n.y-t.internals.positionAbsolute.y},extent:t.extent,parentId:t.parentId,origin:t.origin,expandParent:t.expandParent,internals:{positionAbsolute:t.internals.positionAbsolute||{x:0,y:0}},measured:{width:t.measured.width??0,height:t.measured.height??0}})}return i}function NB({nodeId:e,dragItems:t,nodeLookup:n,dragging:r=!0}){let i=[];for(let[e,a]of t){let t=n.get(e)?.internals.userNode;t&&i.push({...t,position:a.position,dragging:r})}if(!e)return[i[0],i];let a=n.get(e)?.internals.userNode;return[a?{...a,position:t.get(e)?.position||a.position,dragging:r}:i[0],i]}function PB({dragItems:e,snapGrid:t,x:n,y:r}){let i=e.values().next().value;if(!i)return null;let a={x:n-i.distance.x,y:r-i.distance.y},o=vz(a,t);return{x:o.x-a.x,y:o.y-a.y}}function FB({onNodeMouseDown:e,getStoreItems:t,onDragStart:n,onDrag:r,onDragStop:i}){let a={x:null,y:null},o=0,s=new Map,c=!1,l={x:0,y:0},u=null,d=!1,f=null,p=!1,m=!1,h=null;function g({noDragClassName:g,handleSelector:_,domNode:v,isSelectable:y,nodeId:b,nodeClickDistance:x=0}){f=eF(v);function S({x:e,y:n}){let{nodeLookup:i,nodeExtent:o,snapGrid:c,snapToGrid:l,nodeOrigin:u,onNodeDrag:d,onSelectionDrag:f,onError:p,updateNodePositions:g}=t();a={x:e,y:n};let _=!1,v=s.size>1,y=v&&o?cz(YR(s)):null,x=v&&l?PB({dragItems:s,snapGrid:c,x:e,y:n}):null;for(let[t,r]of s){if(!i.has(t))continue;let a={x:e-r.distance.x,y:n-r.distance.y};l&&(a=x?{x:Math.round(a.x+x.x),y:Math.round(a.y+x.y)}:vz(a,c));let s=null;if(v&&o&&!r.extent&&y){let{positionAbsolute:e}=r.internals,t=e.x-y.x+o[0][0],n=e.x+r.measured.width-y.x2+o[1][0],i=e.y-y.y+o[0][1],a=e.y+r.measured.height-y.y2+o[1][1];s=[[t,i],[n,a]]}let{position:d,positionAbsolute:f}=ez({nodeId:t,nextPosition:a,nodeLookup:i,nodeExtent:s||o,nodeOrigin:u,onError:p});_=_||r.position.x!==d.x||r.position.y!==d.y,r.position=d,r.internals.positionAbsolute=f}if(m||=_,_&&(g(s,!0),h&&(r||d||!b&&f))){let[e,t]=NB({nodeId:b,dragItems:s,nodeLookup:i});r?.(h,s,e,t),d?.(h,e,t),b||f?.(h,t)}}async function C(){if(!u)return;let{transform:e,panBy:n,autoPanSpeed:r,autoPanOnNodeDrag:i}=t();if(!i){c=!1,cancelAnimationFrame(o);return}let[s,d]=oz(l,u,r);(s!==0||d!==0)&&(a.x=(a.x??0)-s/e[2],a.y=(a.y??0)-d/e[2],await n({x:s,y:d})&&S(a)),o=requestAnimationFrame(C)}function w(r){let{nodeLookup:i,multiSelectionActive:o,nodesDraggable:c,transform:l,snapGrid:f,snapToGrid:p,selectNodesOnDrag:m,onNodeDragStart:h,onSelectionDragStart:g,unselectNodesAndEdges:_}=t();d=!0,(!m||!y)&&!o&&b&&(i.get(b)?.selected||_()),y&&m&&b&&e?.(b);let v=Pz(r.sourceEvent,{transform:l,snapGrid:f,snapToGrid:p,containerBounds:u});if(a=v,s=MB(i,c,v,b),s.size>0&&(n||h||!b&&g)){let[e,t]=NB({nodeId:b,dragItems:s,nodeLookup:i});n?.(r.sourceEvent,s,e,t),h?.(r.sourceEvent,e,t),b||g?.(r.sourceEvent,t)}}let T=hF().clickDistance(x).on(`start`,e=>{let{domNode:n,nodeDragThreshold:r,transform:i,snapGrid:o,snapToGrid:s}=t();u=n?.getBoundingClientRect()||null,p=!1,m=!1,h=e.sourceEvent,r===0&&w(e),a=Pz(e.sourceEvent,{transform:i,snapGrid:o,snapToGrid:s,containerBounds:u}),l=Bz(e.sourceEvent,u)}).on(`drag`,e=>{let{autoPanOnNodeDrag:n,transform:r,snapGrid:i,snapToGrid:o,nodeDragThreshold:f,nodeLookup:m}=t(),g=Pz(e.sourceEvent,{transform:r,snapGrid:i,snapToGrid:o,containerBounds:u});if(h=e.sourceEvent,(e.sourceEvent.type===`touchmove`&&e.sourceEvent.touches.length>1||b&&!m.has(b))&&(p=!0),!p){if(!c&&n&&d&&(c=!0,C()),!d){let t=Bz(e.sourceEvent,u),n=t.x-l.x,r=t.y-l.y;Math.sqrt(n*n+r*r)>f&&w(e)}(a.x!==g.xSnapped||a.y!==g.ySnapped)&&s&&d&&(l=Bz(e.sourceEvent,u),S(g))}}).on(`end`,e=>{if(!d||p){p&&s.size>0&&t().updateNodePositions(s,!1);return}if(c=!1,d=!1,cancelAnimationFrame(o),s.size>0){let{nodeLookup:n,updateNodePositions:r,onNodeDragStop:a,onSelectionDragStop:o}=t();if(m&&=(r(s,!1),!1),i||a||!b&&o){let[t,r]=NB({nodeId:b,dragItems:s,nodeLookup:n,dragging:!1});i?.(e.sourceEvent,s,t,r),a?.(e.sourceEvent,t,r),b||o?.(e.sourceEvent,r)}}}).filter(e=>{let t=e.target;return!e.button&&(!g||!jB(t,`.${g}`,v))&&(!_||jB(t,_,v))});f.call(T)}function _(){f?.on(`.drag`,null)}return{update:g,destroy:_}}function IB(e,t,n){let r=[],i={x:e.x-n,y:e.y-n,width:n*2,height:n*2};for(let e of t.values())mz(i,uz(e))>0&&r.push(e);return r}var LB=250;function RB(e,t,n,r){let i=[],a=1/0,o=IB(e,n,t+LB);for(let n of o){let o=[...n.internals.handleBounds?.source??[],...n.internals.handleBounds?.target??[]];for(let s of o){if(r.nodeId===s.nodeId&&r.type===s.type&&r.id===s.id)continue;let{x:o,y:c}=cB(n,s,s.position,!0),l=Math.sqrt((o-e.x)**2+(c-e.y)**2);l>t||(l<a?(i=[{...s,x:o,y:c}],a=l):l===a&&i.push({...s,x:o,y:c}))}}if(!i.length)return null;if(i.length>1){let e=r.type===`source`?`target`:`source`;return i.find(t=>t.type===e)??i[0]}return i[0]}function zB(e,t,n,r,i,a=!1){let o=r.get(e);if(!o)return null;let s=i===`strict`?o.internals.handleBounds?.[t]:[...o.internals.handleBounds?.source??[],...o.internals.handleBounds?.target??[]],c=(n?s?.find(e=>e.id===n):s?.[0])??null;return c&&a?{...c,...cB(o,c,c.position,!0)}:c}function BB(e,t){return e||(t?.classList.contains(`target`)?`target`:t?.classList.contains(`source`)?`source`:null)}function VB(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}var HB=()=>!0;function UB(e,{connectionMode:t,connectionRadius:n,handleId:r,nodeId:i,edgeUpdaterType:a,isTarget:o,domNode:s,nodeLookup:c,lib:l,autoPanOnConnect:u,flowId:d,panBy:f,cancelConnection:p,onConnectStart:m,onConnect:h,onConnectEnd:g,isValidConnection:_=HB,onReconnectEnd:v,updateConnection:y,getTransform:b,getFromHandle:x,autoPanSpeed:S,dragThreshold:C=1,handleDomNode:w}){let T=Iz(e.target),E=0,D,{x:ee,y:O}=Bz(e),k=BB(a,w),A=s?.getBoundingClientRect(),te=!1;if(!A||!k)return;let ne=zB(i,k,r,c,t);if(!ne)return;let re=Bz(e,A),ie=!1,ae=null,oe=!1,se=null;function ce(){if(!u||!A)return;let[e,t]=oz(re,A,S);f({x:e,y:t}),E=requestAnimationFrame(ce)}let j={...ne,nodeId:i,type:k,position:ne.position},le=c.get(i),ue={inProgress:!0,isValid:null,from:cB(le,j,HR.Left,!0),fromHandle:j,fromPosition:j.position,fromNode:le,to:re,toHandle:null,toPosition:UR[j.position],toNode:null,pointer:re};function de(){te=!0,y(ue),m?.(e,{nodeId:i,handleId:r,handleType:k})}C===0&&de();function fe(e){if(!te){let{x:t,y:n}=Bz(e),r=t-ee,i=n-O;if(!(r*r+i*i>C*C))return;de()}if(!x()||!j){pe(e);return}let a=b();re=Bz(e,A),D=RB(yz(re,a,!1,[1,1]),n,c,j),ie||=(ce(),!0);let s=WB(e,{handle:D,connectionMode:t,fromNodeId:i,fromHandleId:r,fromType:o?`target`:`source`,isValidConnection:_,doc:T,lib:l,flowId:d,nodeLookup:c});se=s.handleDomNode,ae=s.connection,oe=VB(!!D,s.isValid);let u=c.get(i),f=u?cB(u,j,HR.Left,!0):ue.from,p={...ue,from:f,isValid:oe,to:s.toHandle&&oe?bz({x:s.toHandle.x,y:s.toHandle.y},a):re,toHandle:s.toHandle,toPosition:oe&&s.toHandle?s.toHandle.position:UR[j.position],toNode:s.toHandle?c.get(s.toHandle.nodeId):null,pointer:re};y(p),ue=p}function pe(e){if(!(`touches`in e&&e.touches.length>0)){if(te){(D||se)&&ae&&oe&&h?.(ae);let{inProgress:t,...n}=ue,r={...n,toPosition:ue.toHandle?ue.toPosition:null};g?.(e,r),a&&v?.(e,r)}p(),cancelAnimationFrame(E),ie=!1,oe=!1,ae=null,se=null,T.removeEventListener(`mousemove`,fe),T.removeEventListener(`mouseup`,pe),T.removeEventListener(`touchmove`,fe),T.removeEventListener(`touchend`,pe)}}T.addEventListener(`mousemove`,fe),T.addEventListener(`mouseup`,pe),T.addEventListener(`touchmove`,fe),T.addEventListener(`touchend`,pe)}function WB(e,{handle:t,connectionMode:n,fromNodeId:r,fromHandleId:i,fromType:a,doc:o,lib:s,flowId:c,isValidConnection:l=HB,nodeLookup:u}){let d=a===`target`,f=t?o.querySelector(`.${s}-flow__handle[data-id="${c}-${t?.nodeId}-${t?.id}-${t?.type}"]`):null,{x:p,y:m}=Bz(e),h=o.elementFromPoint(p,m),g=h?.classList.contains(`${s}-flow__handle`)?h:f,_={handleDomNode:g,isValid:!1,connection:null,toHandle:null};if(g){let e=BB(void 0,g),t=g.getAttribute(`data-nodeid`),a=g.getAttribute(`data-handleid`),o=g.classList.contains(`connectable`),s=g.classList.contains(`connectableend`);if(!t||!e)return _;let c={source:d?t:r,sourceHandle:d?a:i,target:d?r:t,targetHandle:d?i:a};_.connection=c,_.isValid=o&&s&&(n===IR.Strict?d&&e===`source`||!d&&e===`target`:t!==r||a!==i)&&l(c),_.toHandle=zB(t,e,a,u,n,!0)}return _}var GB={onPointerDown:UB,isValid:WB};function KB({domNode:e,panZoom:t,getTransform:n,getViewScale:r}){let i=eF(e);function a({translateExtent:e,width:a,height:o,zoomStep:s=1,pannable:c=!0,zoomable:l=!0,inversePan:u=!1}){let d=e=>{if(e.sourceEvent.type!==`wheel`||!t)return;let r=n(),i=e.sourceEvent.ctrlKey&&Tz()?10:1,a=-e.sourceEvent.deltaY*(e.sourceEvent.deltaMode===1?.05:e.sourceEvent.deltaMode?1:.002)*s,o=r[2]*2**(a*i);t.scaleTo(o)},f=[0,0],p=jR().on(`start`,e=>{(e.sourceEvent.type===`mousedown`||e.sourceEvent.type===`touchstart`)&&(f=[e.sourceEvent.clientX??e.sourceEvent.touches[0].clientX,e.sourceEvent.clientY??e.sourceEvent.touches[0].clientY])}).on(`zoom`,c?i=>{let s=n();if(i.sourceEvent.type!==`mousemove`&&i.sourceEvent.type!==`touchmove`||!t)return;let c=[i.sourceEvent.clientX??i.sourceEvent.touches[0].clientX,i.sourceEvent.clientY??i.sourceEvent.touches[0].clientY],l=[c[0]-f[0],c[1]-f[1]];f=c;let d=r()*Math.max(s[2],Math.log(s[2]))*(u?-1:1),p={x:s[0]-l[0]*d,y:s[1]-l[1]*d},m=[[0,0],[a,o]];t.setViewportConstrained({x:p.x,y:p.y,zoom:s[2]},m,e)}:null).on(`zoom.wheel`,l?d:null);i.call(p,{})}function o(){i.on(`zoom`,null)}return{update:a,destroy:o,pointer:nF}}var qB=e=>({x:e.x,y:e.y,zoom:e.k}),JB=({x:e,y:t,zoom:n})=>xR.translate(e,t).scale(n),YB=(e,t)=>e.target.closest(`.${t}`),XB=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),ZB=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,QB=(e,t=0,n=ZB,r=()=>{})=>{let i=typeof t==`number`&&t>0;return i||r(),i?e.transition().duration(t).ease(n).on(`end`,r):e},$B=e=>{let t=e.ctrlKey&&Tz()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t};function eV({zoomPanValues:e,noWheelClassName:t,d3Selection:n,d3Zoom:r,panOnScrollMode:i,panOnScrollSpeed:a,zoomOnPinch:o,onPanZoomStart:s,onPanZoom:c,onPanZoomEnd:l}){return u=>{if(YB(u,t))return u.ctrlKey&&u.preventDefault(),!1;u.preventDefault(),u.stopImmediatePropagation();let d=n.property(`__zoom`).k||1;if(u.ctrlKey&&o){let e=nF(u),t=d*2**$B(u);r.scaleTo(n,t,e,u);return}let f=u.deltaMode===1?20:1,p=i===LR.Vertical?0:u.deltaX*f,m=i===LR.Horizontal?0:u.deltaY*f;!Tz()&&u.shiftKey&&i!==LR.Vertical&&(p=u.deltaY*f,m=0),r.translateBy(n,-(p/d)*a,-(m/d)*a,{internal:!0});let h=qB(n.property(`__zoom`));clearTimeout(e.panScrollTimeout),e.isPanScrolling?c?.(u,h):(e.isPanScrolling=!0,s?.(u,h)),e.panScrollTimeout=setTimeout(()=>{l?.(u,h),e.isPanScrolling=!1},150)}}function tV({noWheelClassName:e,preventScrolling:t,d3ZoomHandler:n}){return function(r,i){let a=r.type===`wheel`,o=!t&&a&&!r.ctrlKey,s=YB(r,e);if(r.ctrlKey&&a&&s&&r.preventDefault(),o||s)return null;r.preventDefault(),n.call(this,r,i)}}function nV({zoomPanValues:e,onDraggingChange:t,onPanZoomStart:n}){return r=>{if(r.sourceEvent?.internal)return;let i=qB(r.transform);e.mouseButton=r.sourceEvent?.button||0,e.isZoomingOrPanning=!0,e.prevViewport=i,r.sourceEvent?.type===`mousedown`&&t(!0),n&&n?.(r.sourceEvent,i)}}function rV({zoomPanValues:e,panOnDrag:t,onPaneContextMenu:n,onTransformChange:r,onPanZoom:i}){return a=>{e.usedRightMouseButton=!!(n&&XB(t,e.mouseButton??0)),a.sourceEvent?.sync||r([a.transform.x,a.transform.y,a.transform.k]),i&&!a.sourceEvent?.internal&&i?.(a.sourceEvent,qB(a.transform))}}function iV({zoomPanValues:e,panOnDrag:t,panOnScroll:n,onDraggingChange:r,onPanZoomEnd:i,onPaneContextMenu:a}){return o=>{if(!o.sourceEvent?.internal&&(e.isZoomingOrPanning=!1,a&&XB(t,e.mouseButton??0)&&!e.usedRightMouseButton&&o.sourceEvent&&a(o.sourceEvent),e.usedRightMouseButton=!1,r(!1),i)){let t=qB(o.transform);e.prevViewport=t,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{i?.(o.sourceEvent,t)},n?150:0)}}}function aV({panActivationKeyPressed:e,zoomActivationKeyPressed:t,zoomOnScroll:n,zoomOnPinch:r,panOnDrag:i,panOnScroll:a,zoomOnDoubleClick:o,userSelectionActive:s,noWheelClassName:c,noPanClassName:l,lib:u,connectionInProgress:d}){return f=>{let p=t||n,m=r&&f.ctrlKey,h=f.type===`wheel`;if(f.button===1&&f.type===`mousedown`&&(YB(f,`${u}-flow__node`)||YB(f,`${u}-flow__edge`)||YB(f,`${u}-flow__selection`)||YB(f,`${u}-flow__nodesselection`)))return!0;if(!i&&!p&&!a&&!o&&!r||s||d&&!h||YB(f,c)&&h||YB(f,l)&&(!h||a&&h&&!t)||!r&&f.ctrlKey&&h)return!1;if(!r&&f.type===`touchstart`&&f.touches?.length>1)return f.preventDefault(),!1;if(!p&&!a&&!m&&h||!i&&(f.type===`mousedown`||f.type===`touchstart`)||Array.isArray(i)&&!i.includes(f.button)&&f.type===`mousedown`)return!1;let g=Array.isArray(i)&&i.includes(f.button)||!f.button||f.button<=1;return(!f.ctrlKey||h||e)&&g}}function oV({domNode:e,minZoom:t,maxZoom:n,translateExtent:r,viewport:i,onPanZoom:a,onPanZoomStart:o,onPanZoomEnd:s,onDraggingChange:c}){let l={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},u=e.getBoundingClientRect(),d=[[0,0],[u.width,u.height]];(typeof ResizeObserver<`u`?new ResizeObserver(e=>{let t=e[0];t&&(d=[[0,0],[t.contentRect.width,t.contentRect.height]])}):null)?.observe(e);let f=jR().extent(()=>d).scaleExtent([t,n]).translateExtent(r),p=eF(e).call(f);y({x:i.x,y:i.y,zoom:nz(i.zoom,t,n)},[[0,0],[u.width,u.height]],r);let m=p.on(`wheel.zoom`),h=p.on(`dblclick.zoom`);f.wheelDelta($B);async function g(e,t){return p?new Promise(n=>{f?.interpolate(t?.interpolate===`linear`?vI:MI).transform(QB(p,t?.duration,t?.ease,()=>n(!0)),e)}):!1}function _({noWheelClassName:e,noPanClassName:t,onPaneContextMenu:n,userSelectionActive:r,panOnScroll:i,panOnDrag:u,panOnScrollMode:d,panOnScrollSpeed:g,preventScrolling:_,zoomOnPinch:y,zoomOnScroll:b,zoomOnDoubleClick:x,panActivationKeyPressed:S=!1,zoomActivationKeyPressed:C,lib:w,onTransformChange:T,connectionInProgress:E,paneClickDistance:D,selectionOnDrag:ee}){r&&!l.isZoomingOrPanning&&v();let O=i&&!C&&!r;f.clickDistance(ee?1/0:!gz(D)||D<0?0:D);let k=O?eV({zoomPanValues:l,noWheelClassName:e,d3Selection:p,d3Zoom:f,panOnScrollMode:d,panOnScrollSpeed:g,zoomOnPinch:y,onPanZoomStart:o,onPanZoom:a,onPanZoomEnd:s}):tV({noWheelClassName:e,preventScrolling:_,d3ZoomHandler:m});p.on(`wheel.zoom`,k,{passive:!1});let A=nV({zoomPanValues:l,onDraggingChange:c,onPanZoomStart:o});f.on(`start`,A);let te=rV({zoomPanValues:l,panOnDrag:u,onPaneContextMenu:!!n,onPanZoom:a,onTransformChange:T});f.on(`zoom`,te);let ne=iV({zoomPanValues:l,panOnDrag:u,panOnScroll:i,onPaneContextMenu:n,onPanZoomEnd:s,onDraggingChange:c});f.on(`end`,ne);let re=aV({panActivationKeyPressed:S,zoomActivationKeyPressed:C,panOnDrag:u,zoomOnScroll:b,panOnScroll:i,zoomOnDoubleClick:x,zoomOnPinch:y,userSelectionActive:r,noPanClassName:t,noWheelClassName:e,lib:w,connectionInProgress:E});f.filter(re),x?p.on(`dblclick.zoom`,h):p.on(`dblclick.zoom`,null)}function v(){f.on(`zoom`,null)}async function y(e,t,n){let r=JB(e),i=f?.constrain()(r,t,n);return i&&await g(i),i}async function b(e,t){let n=JB(e);return await g(n,t),n}function x(e){if(p){let t=JB(e),n=p.property(`__zoom`);(n.k!==e.zoom||n.x!==e.x||n.y!==e.y)&&f?.transform(p,t,null,{sync:!0})}}function S(){let e=p?SR(p.node()):{x:0,y:0,k:1};return{x:e.x,y:e.y,zoom:e.k}}async function C(e,t){return p?new Promise(n=>{f?.interpolate(t?.interpolate===`linear`?vI:MI).scaleTo(QB(p,t?.duration,t?.ease,()=>n(!0)),e)}):!1}async function w(e,t){return p?new Promise(n=>{f?.interpolate(t?.interpolate===`linear`?vI:MI).scaleBy(QB(p,t?.duration,t?.ease,()=>n(!0)),e)}):!1}function T(e){f?.scaleExtent(e)}function E(e){f?.translateExtent(e)}function D(e){let t=!gz(e)||e<0?0:e;f?.clickDistance(t)}return{update:_,destroy:v,setViewport:b,setViewportConstrained:y,getViewport:S,scaleTo:C,scaleBy:w,setScaleExtent:T,setTranslateExtent:E,syncViewport:x,setClickDistance:D}}var sV;(function(e){e.Line=`line`,e.Handle=`handle`})(sV||={});function cV({width:e,prevWidth:t,height:n,prevHeight:r,affectsX:i,affectsY:a}){let o=e-t,s=n-r,c=[o>0?1:o<0?-1:0,s>0?1:s<0?-1:0];return o&&i&&(c[0]*=-1),s&&a&&(c[1]*=-1),c}function lV(e){return{isHorizontal:e.includes(`right`)||e.includes(`left`),isVertical:e.includes(`bottom`)||e.includes(`top`),affectsX:e.includes(`left`),affectsY:e.includes(`top`)}}function uV(e,t){return Math.max(0,t-e)}function dV(e,t){return Math.max(0,e-t)}function fV(e,t,n){return Math.max(0,t-e,e-n)}function pV(e,t){return e?!t:t}function mV(e,t,n,r,i,a,o,s){let{affectsX:c,affectsY:l}=t,{isHorizontal:u,isVertical:d}=t,f=u&&d,{xSnapped:p,ySnapped:m}=n,{minWidth:h,maxWidth:g,minHeight:_,maxHeight:v}=r,{x:y,y:b,width:x,height:S,aspectRatio:C}=e,w=Math.floor(u?p-e.pointerX:0),T=Math.floor(d?m-e.pointerY:0),E=x+(c?-w:w),D=S+(l?-T:T),ee=-a[0]*x,O=-a[1]*S,k=fV(E,h,g),A=fV(D,_,v);if(o){let e=0,t=0;c&&w<0?e=uV(y+w+ee,o[0][0]):!c&&w>0&&(e=dV(y+E+ee,o[1][0])),l&&T<0?t=uV(b+T+O,o[0][1]):!l&&T>0&&(t=dV(b+D+O,o[1][1])),k=Math.max(k,e),A=Math.max(A,t)}if(s){let e=0,t=0;c&&w>0?e=dV(y+w,s[0][0]):!c&&w<0&&(e=uV(y+E,s[1][0])),l&&T>0?t=dV(b+T,s[0][1]):!l&&T<0&&(t=uV(b+D,s[1][1])),k=Math.max(k,e),A=Math.max(A,t)}if(i){if(u){let e=fV(E/C,_,v)*C;if(k=Math.max(k,e),o){let e=0;e=!c&&!l||c&&!l&&f?dV(b+O+E/C,o[1][1])*C:uV(b+O+(c?w:-w)/C,o[0][1])*C,k=Math.max(k,e)}if(s){let e=0;e=!c&&!l||c&&!l&&f?uV(b+E/C,s[1][1])*C:dV(b+(c?w:-w)/C,s[0][1])*C,k=Math.max(k,e)}}if(d){let e=fV(D*C,h,g)/C;if(A=Math.max(A,e),o){let e=0;e=!c&&!l||l&&!c&&f?dV(y+D*C+ee,o[1][0])/C:uV(y+(l?T:-T)*C+ee,o[0][0])/C,A=Math.max(A,e)}if(s){let e=0;e=!c&&!l||l&&!c&&f?uV(y+D*C,s[1][0])/C:dV(y+(l?T:-T)*C,s[0][0])/C,A=Math.max(A,e)}}}T+=T<0?A:-A,w+=w<0?k:-k,i&&(f?E>D*C?T=(pV(c,l)?-w:w)/C:w=(pV(c,l)?-T:T)*C:u?(T=w/C,l=c):(w=T*C,c=l));let te=c?y+w:y,ne=l?b+T:b;return{width:x+(c?-w:w),height:S+(l?-T:T),x:a[0]*w*(c?-1:1)+te,y:a[1]*T*(l?-1:1)+ne}}var hV={width:0,height:0,x:0,y:0},gV={...hV,pointerX:0,pointerY:0,aspectRatio:1};function _V(e,t,n){let r=t.position.x+e.position.x,i=t.position.y+e.position.y,a=e.measured.width??0,o=e.measured.height??0,s=n[0]*a,c=n[1]*o;return[[r-s,i-c],[r+a-s,i+o-c]]}function vV({domNode:e,nodeId:t,getStoreItems:n,onChange:r,onEnd:i}){let a=eF(e),o={controlDirection:lV(`bottom-right`),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function s({controlPosition:e,boundaries:s,keepAspectRatio:c,resizeDirection:l,onResizeStart:u,onResize:d,onResizeEnd:f,shouldResize:p}){let m={...hV},h={...gV};o={boundaries:s,resizeDirection:l,keepAspectRatio:c,controlDirection:lV(e)};let g,_=null,v=[],y,b,x,S=hF().on(`start`,e=>{let{nodeLookup:r,transform:i,snapGrid:a,snapToGrid:o,nodeOrigin:s,paneDomNode:c}=n();if(g=r.get(t),!g)return;_=c?.getBoundingClientRect()??null;let{xSnapped:l,ySnapped:d}=Pz(e.sourceEvent,{transform:i,snapGrid:a,snapToGrid:o,containerBounds:_});m={width:g.measured.width??0,height:g.measured.height??0,x:g.position.x??0,y:g.position.y??0},h={...m,pointerX:l,pointerY:d,aspectRatio:m.width/m.height},y=void 0,b=Ez(g.extent)?g.extent:void 0,g.parentId&&(g.extent===`parent`||g.expandParent)&&(y=r.get(g.parentId)),y&&g.extent===`parent`&&(b=[[0,0],[y.measured.width,y.measured.height]]),v=[],x=void 0;for(let[e,n]of r)if(n.parentId===t&&(v.push({id:e,position:{...n.position},extent:n.extent}),n.extent===`parent`||n.expandParent)){let e=_V(n,g,n.origin??s);x=x?[[Math.min(e[0][0],x[0][0]),Math.min(e[0][1],x[0][1])],[Math.max(e[1][0],x[1][0]),Math.max(e[1][1],x[1][1])]]:e}u?.(e,{...m})}).on(`drag`,e=>{let{transform:t,snapGrid:i,snapToGrid:a,nodeOrigin:s}=n(),c=Pz(e.sourceEvent,{transform:t,snapGrid:i,snapToGrid:a,containerBounds:_}),l=[];if(!g)return;let{x:u,y:f,width:S,height:C}=m,w={},T=g.origin??s,{width:E,height:D,x:ee,y:O}=mV(h,o.controlDirection,c,o.boundaries,o.keepAspectRatio,T,b,x),k=E!==S,A=D!==C,te=ee!==u&&k,ne=O!==f&&A;if(!te&&!ne&&!k&&!A)return;let re={prevValues:{...m},startX:h.x,startY:h.y,childNodes:v.map(e=>({...e,position:{...e.position}}))};if((te||ne||T[0]===1||T[1]===1)&&(w.x=te?ee:m.x,w.y=ne?O:m.y,m.x=w.x,m.y=w.y,v.length>0)){let e=ee-u,t=O-f;for(let n of v)n.position={x:n.position.x-e+T[0]*(E-S),y:n.position.y-t+T[1]*(D-C)},l.push(n)}if((k||A)&&(w.width=k&&(!o.resizeDirection||o.resizeDirection===`horizontal`)?E:m.width,w.height=A&&(!o.resizeDirection||o.resizeDirection===`vertical`)?D:m.height,m.width=w.width,m.height=w.height),y&&g.expandParent){let e=T[0]*(w.width??0);w.x&&w.x<e&&(m.x=e,h.x-=w.x-e);let t=T[1]*(w.height??0);w.y&&w.y<t&&(m.y=t,h.y-=w.y-t)}let ie=cV({width:m.width,prevWidth:S,height:m.height,prevHeight:C,affectsX:o.controlDirection.affectsX,affectsY:o.controlDirection.affectsY}),ae={...m,direction:ie};if(p?.(e,ae)===!1){m=re.prevValues,h.x=re.startX,h.y=re.startY,v.forEach((e,t)=>{e.position=re.childNodes[t].position});return}d?.(e,ae),r(w,l)}).on(`end`,e=>{f?.(e,{...m}),i?.({...m})});a.call(S)}function c(){a.on(`.drag`,null)}return{update:s,destroy:c}}var yV=s((e=>{var t=f();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function c(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,u=r[1];return o(function(){c.value=n,c.getSnapshot=t,l(c)&&u({inst:c})},[e,n,t]),a(function(){return l(c)&&u({inst:c}),e(function(){l(c)&&u({inst:c})})},[e]),s(n),n}function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function u(e,t){return t()}var d=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?u:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?d:t.useSyncExternalStore})),bV=s(((e,t)=>{t.exports=yV()})),xV=s((e=>{var t=f(),n=bV();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=n.useSyncExternalStore,o=t.useRef,s=t.useEffect,c=t.useMemo,l=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,u){var d=o(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=c(function(){function e(e){if(!a){if(a=!0,o=e,e=r(e),u!==void 0&&f.hasValue){var t=f.value;if(u(t,e))return s=t}return s=e}if(t=s,i(o,e))return t;var n=r(e);return u!==void 0&&u(t,n)?(o=e,t):(o=e,s=n)}var a=!1,o,s,c=n===void 0?null:n;return[function(){return e(t())},c===null?void 0:function(){return e(c())}]},[t,n,r,u]);var p=a(e,d[0],d[1]);return s(function(){f.hasValue=!0,f.value=p},[p]),l(p),p}})),SV=u(s(((e,t)=>{t.exports=xV()}))(),1),CV=e=>{let t,n=new Set,r=(e,r)=>{let i=typeof e==`function`?e(t):e;if(!Object.is(i,t)){let e=t;t=r??(typeof i!=`object`||!i)?i:Object.assign({},t,i),n.forEach(n=>n(t,e))}},i=()=>t,a={setState:r,getState:i,getInitialState:()=>o,subscribe:e=>(n.add(e),()=>n.delete(e)),destroy:()=>{n.clear()}},o=t=e(r,i,a);return a},wV=e=>e?CV(e):CV,{useDebugValue:TV}=y.default,{useSyncExternalStoreWithSelector:EV}=SV.default,DV=e=>e;function OV(e,t=DV,n){let r=EV(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return TV(r),r}var kV=(e,t)=>{let n=wV(e),r=(e,r=t)=>OV(n,e,r);return Object.assign(r,n),r},AV=(e,t)=>e?kV(e,t):kV;function jV(e,t){if(Object.is(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(let[n,r]of e)if(!Object.is(r,t.get(n)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}let n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(let r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||!Object.is(e[r],t[r]))return!1;return!0}g();var MV=(0,y.createContext)(null),NV=MV.Provider,PV=MR.error001(`react`);function FV(e,t){let n=(0,y.useContext)(MV);if(n===null)throw Error(PV);return OV(n,e,t)}function IV(){let e=(0,y.useContext)(MV);if(e===null)throw Error(PV);return(0,y.useMemo)(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}var LV={display:`none`},RV={position:`absolute`,width:1,height:1,margin:-1,border:0,padding:0,overflow:`hidden`,clip:`rect(0px, 0px, 0px, 0px)`,clipPath:`inset(100%)`},zV=`react-flow__node-desc`,BV=`react-flow__edge-desc`,VV=`react-flow__aria-live`,HV=e=>e.ariaLiveMessage,UV=e=>e.ariaLabelConfig;function WV({rfId:e}){let t=FV(HV);return(0,Z.jsx)(`div`,{id:`${VV}-${e}`,"aria-live":`assertive`,"aria-atomic":`true`,style:RV,children:t})}function GV({rfId:e,disableKeyboardA11y:t}){let n=FV(UV);return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(`div`,{id:`${zV}-${e}`,style:LV,children:t?n[`node.a11yDescription.default`]:n[`node.a11yDescription.keyboardDisabled`]}),(0,Z.jsx)(`div`,{id:`${BV}-${e}`,style:LV,children:n[`edge.a11yDescription.default`]}),!t&&(0,Z.jsx)(WV,{rfId:e})]})}var KV=(0,y.forwardRef)(({position:e=`top-left`,children:t,className:n,style:r,...i},a)=>{let o=`${e}`.split(`-`);return(0,Z.jsx)(`div`,{className:YM([`react-flow__panel`,n,...o]),style:r,ref:a,...i,children:t})});KV.displayName=`Panel`;var qV=`https://reactflow.dev?utm_source=attribution`;function JV({proOptions:e,position:t=`bottom-right`}){return(0,y.useEffect)(()=>{},[]),e?.hideAttribution?null:(0,Z.jsx)(KV,{position:t,className:`react-flow__attribution`,"data-message":`Please only hide this attribution when you are subscribed to React Flow Pro: ${qV}`,children:(0,Z.jsx)(`a`,{href:qV,target:`_blank`,rel:`noopener noreferrer`,"aria-label":`React Flow attribution`,children:`React Flow`})})}var YV=e=>{let t=[],n=[];for(let[,n]of e.nodeLookup)n.selected&&t.push(n.internals.userNode);for(let[,t]of e.edgeLookup)t.selected&&n.push(t);return{selectedNodes:t,selectedEdges:n}},XV=e=>e.id;function ZV(e,t){return jV(e.selectedNodes.map(XV),t.selectedNodes.map(XV))&&jV(e.selectedEdges.map(XV),t.selectedEdges.map(XV))}function QV({onSelectionChange:e}){let t=IV(),{selectedNodes:n,selectedEdges:r}=FV(YV,ZV);return(0,y.useEffect)(()=>{let i={nodes:n,edges:r};e?.(i),t.getState().onSelectionChangeHandlers.forEach(e=>e(i))},[n,r,e]),null}var $V=e=>!!e.onSelectionChangeHandlers;function eH({onSelectionChange:e}){let t=FV($V);return e||t?(0,Z.jsx)(QV,{onSelectionChange:e}):null}var tH=[0,0],nH={x:0,y:0,zoom:1},rH=[...`nodes.edges.defaultNodes.defaultEdges.onConnect.onConnectStart.onConnectEnd.onClickConnectStart.onClickConnectEnd.nodesDraggable.autoPanOnNodeFocus.nodesConnectable.nodesFocusable.edgesFocusable.edgesReconnectable.elevateNodesOnSelect.elevateEdgesOnSelect.minZoom.maxZoom.nodeExtent.onNodesChange.onEdgesChange.elementsSelectable.connectionMode.snapGrid.snapToGrid.translateExtent.connectOnClick.defaultEdgeOptions.fitView.fitViewOptions.onNodesDelete.onEdgesDelete.onDelete.onNodeDrag.onNodeDragStart.onNodeDragStop.onSelectionDrag.onSelectionDragStart.onSelectionDragStop.onMoveStart.onMove.onMoveEnd.noPanClassName.nodeOrigin.autoPanOnConnect.autoPanOnNodeDrag.onError.connectionRadius.isValidConnection.selectNodesOnDrag.nodeDragThreshold.connectionDragThreshold.onBeforeDelete.debug.autoPanSpeed.ariaLabelConfig.zIndexMode`.split(`.`),`rfId`],iH=e=>({setNodes:e.setNodes,setEdges:e.setEdges,setMinZoom:e.setMinZoom,setMaxZoom:e.setMaxZoom,setTranslateExtent:e.setTranslateExtent,setNodeExtent:e.setNodeExtent,reset:e.reset,setDefaultNodesAndEdges:e.setDefaultNodesAndEdges}),aH={translateExtent:NR,nodeOrigin:tH,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:`nopan`,rfId:`1`};function oH(e){let{setNodes:t,setEdges:n,setMinZoom:r,setMaxZoom:i,setTranslateExtent:a,setNodeExtent:o,reset:s,setDefaultNodesAndEdges:c}=FV(iH,jV),l=IV();(0,y.useEffect)(()=>(c(e.defaultNodes,e.defaultEdges),()=>{u.current=aH,s()}),[]);let u=(0,y.useRef)(aH);return(0,y.useEffect)(()=>{for(let s of rH){let c=e[s];c!==u.current[s]&&e[s]!==void 0&&(s===`nodes`?t(c):s===`edges`?n(c):s===`minZoom`?r(c):s===`maxZoom`?i(c):s===`translateExtent`?a(c):s===`nodeExtent`?o(c):s===`ariaLabelConfig`?l.setState({ariaLabelConfig:Mz(c)}):s===`fitView`?l.setState({fitViewQueued:c}):s===`fitViewOptions`?l.setState({fitViewOptions:c}):l.setState({[s]:c}))}u.current=e},rH.map(t=>e[t])),null}function sH(){return typeof window>`u`||!window.matchMedia?null:window.matchMedia(`(prefers-color-scheme: dark)`)}function cH(e){let[t,n]=(0,y.useState)(e===`system`?null:e);return(0,y.useEffect)(()=>{if(e!==`system`){n(e);return}let t=sH(),r=()=>n(t?.matches?`dark`:`light`);return r(),t?.addEventListener(`change`,r),()=>{t?.removeEventListener(`change`,r)}},[e]),t===null?sH()?.matches?`dark`:`light`:t}var lH=typeof document<`u`?document:null;function uH(e=null,t={target:lH,actInsideInputWithModifier:!0}){let[n,r]=(0,y.useState)(!1),i=(0,y.useRef)(!1),a=(0,y.useRef)(new Set([])),[o,s]=(0,y.useMemo)(()=>{if(e!==null){let t=(Array.isArray(e)?e:[e]).filter(e=>typeof e==`string`).map(e=>e.replace(/\+/g,`
736
+ `).replace(`
737
+
738
+ `,`
739
+ +`).split(`
740
+ `));return[t,t.reduce((e,t)=>e.concat(...t),[])]}return[[],[]]},[e]);return(0,y.useEffect)(()=>{let n=t?.target??lH,c=t?.actInsideInputWithModifier??!0;if(e!==null){let e=e=>{if(i.current=e.ctrlKey||e.metaKey||e.shiftKey||e.altKey,(!i.current||i.current&&!c)&&Rz(e))return!1;let n=fH(e.code,s);if(a.current.add(e[n]),dH(o,a.current,!1)){let n=e.composedPath?.()?.[0]||e.target,a=n?.nodeName===`BUTTON`||n?.nodeName===`A`;t.preventDefault!==!1&&(i.current||!a)&&e.preventDefault(),r(!0)}},l=e=>{let t=fH(e.code,s);dH(o,a.current,!0)?(r(!1),a.current.clear()):a.current.delete(e[t]),e.key===`Meta`&&a.current.clear(),i.current=!1},u=()=>{a.current.clear(),r(!1)};return n?.addEventListener(`keydown`,e),n?.addEventListener(`keyup`,l),window.addEventListener(`blur`,u),window.addEventListener(`contextmenu`,u),()=>{n?.removeEventListener(`keydown`,e),n?.removeEventListener(`keyup`,l),window.removeEventListener(`blur`,u),window.removeEventListener(`contextmenu`,u)}}},[e,r]),n}function dH(e,t,n){return e.filter(e=>n||e.length===t.size).some(e=>e.every(e=>t.has(e)))}function fH(e,t){return t.includes(e)?`code`:`key`}var pH=()=>{let e=IV();return(0,y.useMemo)(()=>({zoomIn:async t=>{let{panZoom:n}=e.getState();return n?n.scaleBy(1.2,t):!1},zoomOut:async t=>{let{panZoom:n}=e.getState();return n?n.scaleBy(1/1.2,t):!1},zoomTo:async(t,n)=>{let{panZoom:r}=e.getState();return r?r.scaleTo(t,n):!1},getZoom:()=>e.getState().transform[2],setViewport:async(t,n)=>{let{transform:[r,i,a],panZoom:o}=e.getState();return o?(await o.setViewport({x:t.x??r,y:t.y??i,zoom:t.zoom??a},n),!0):!1},getViewport:()=>{let[t,n,r]=e.getState().transform;return{x:t,y:n,zoom:r}},setCenter:async(t,n,r)=>e.getState().setCenter(t,n,r),fitBounds:async(t,n)=>{let{width:r,height:i,minZoom:a,maxZoom:o,panZoom:s}=e.getState(),c=wz(t,r,i,a,o,n?.padding??.1);return s?(await s.setViewport(c,{duration:n?.duration,ease:n?.ease,interpolate:n?.interpolate}),!0):!1},screenToFlowPosition:(t,n={})=>{let{transform:r,snapGrid:i,snapToGrid:a,domNode:o}=e.getState();if(!o)return t;let{x:s,y:c}=o.getBoundingClientRect(),l={x:t.x-s,y:t.y-c},u=n.snapGrid??i;return yz(l,r,n.snapToGrid??a,u)},flowToScreenPosition:t=>{let{transform:n,domNode:r}=e.getState();if(!r)return t;let{x:i,y:a}=r.getBoundingClientRect(),o=bz(t,n);return{x:o.x+i,y:o.y+a}}}),[])};function mH(e,t){let n=[],r=new Map,i=[];for(let t of e)if(t.type===`add`){i.push(t);continue}else if(t.type===`remove`||t.type===`replace`)r.set(t.id,[t]);else{let e=r.get(t.id);e?e.push(t):r.set(t.id,[t])}for(let e of t){let t=r.get(e.id);if(!t){n.push(e);continue}if(t[0].type===`remove`)continue;if(t[0].type===`replace`){n.push({...t[0].item});continue}let i={...e};for(let e of t)hH(e,i);n.push(i)}return i.length&&i.forEach(e=>{e.index===void 0?n.push({...e.item}):n.splice(e.index,0,{...e.item})}),n}function hH(e,t){switch(e.type){case`select`:t.selected=e.selected;break;case`position`:e.position!==void 0&&(t.position=e.position),e.dragging!==void 0&&(t.dragging=e.dragging);break;case`dimensions`:e.dimensions!==void 0&&(t.measured={...e.dimensions},e.setAttributes&&((e.setAttributes===!0||e.setAttributes===`width`)&&(t.width=e.dimensions.width),(e.setAttributes===!0||e.setAttributes===`height`)&&(t.height=e.dimensions.height))),typeof e.resizing==`boolean`&&(t.resizing=e.resizing)}}function gH(e,t){return mH(e,t)}function _H(e,t){return mH(e,t)}function vH(e,t){return{id:e,type:`select`,selected:t}}function yH(e,t=new Set,n=!1){let r=[];for(let[i,a]of e){let e=t.has(i);(a.selected!==void 0||e)&&a.selected!==e&&(n&&(a.selected=e),r.push(vH(a.id,e)))}return r}function bH({items:e=[],lookup:t}){let n=[],r=new Map(e.map(e=>[e.id,e]));for(let[r,i]of e.entries()){let e=t.get(i.id),a=e?.internals?.userNode??e;a!==void 0&&a!==i&&n.push({id:i.id,item:i,type:`replace`}),a===void 0&&n.push({item:i,type:`add`,index:r})}for(let[e]of t)r.get(e)===void 0&&n.push({id:e,type:`remove`});return n}function xH(e){return{id:e.id,type:`remove`}}var SH=_z(`React Flow`,`https://reactflow.dev/`);function CH(e,t,n={}){return Zz(e,t,{...n,onError:n.onError??SH})}var wH=e=>GR(e),TH=e=>WR(e);function EH(e){return(0,y.forwardRef)(e)}var DH=typeof window<`u`?y.useLayoutEffect:y.useEffect;function OH(e){let[t,n]=(0,y.useState)(BigInt(0)),[r]=(0,y.useState)(()=>kH(()=>n(e=>e+BigInt(1))));return DH(()=>{let t=r.get();t.length&&(e(t),r.reset())},[t]),r}function kH(e){let t=[];return{get:()=>t,reset:()=>{t=[]},push:n=>{t.push(n),e()}}}var AH=(0,y.createContext)(null);function jH({children:e}){let t=IV(),n=OH((0,y.useCallback)(e=>{let{nodes:n=[],setNodes:r,hasDefaultNodes:i,onNodesChange:a,nodeLookup:o,fitViewQueued:s,onNodesChangeMiddlewareMap:c}=t.getState(),l=n;for(let t of e)l=typeof t==`function`?t(l):t;let u=bH({items:l,lookup:o});for(let e of c.values())u=e(u);i&&r(l),u.length>0?a?.(u):s&&window.requestAnimationFrame(()=>{let{fitViewQueued:e,nodes:n,setNodes:r}=t.getState();e&&r(n)})},[])),r=OH((0,y.useCallback)(e=>{let{edges:n=[],setEdges:r,hasDefaultEdges:i,onEdgesChange:a,edgeLookup:o}=t.getState(),s=n;for(let t of e)s=typeof t==`function`?t(s):t;i?r(s):a&&a(bH({items:s,lookup:o}))},[])),i=(0,y.useMemo)(()=>({nodeQueue:n,edgeQueue:r}),[]);return(0,Z.jsx)(AH.Provider,{value:i,children:e})}function MH(){let e=(0,y.useContext)(AH);if(!e)throw Error(`useBatchContext must be used within a BatchProvider`);return e}var NH=e=>!!e.panZoom;function PH(){let e=pH(),t=IV(),n=MH(),r=FV(NH),i=(0,y.useMemo)(()=>{let e=e=>t.getState().nodeLookup.get(e),r=e=>{n.nodeQueue.push(e)},i=e=>{n.edgeQueue.push(e)},a=e=>{let{nodeLookup:n,nodeOrigin:r}=t.getState(),i=wH(e)?e:n.get(e.id),a=i.parentId?kz(i.position,i.measured,i.parentId,n,r):i.position;return uz({...i,position:a,width:i.measured?.width??i.width,height:i.measured?.height??i.height})},o=(e,t,n={replace:!1})=>{r(r=>r.map(r=>{if(r.id===e){let e=typeof t==`function`?t(r):t;return n.replace&&wH(e)?e:{...r,...e}}return r}))},s=(e,t,n={replace:!1})=>{i(r=>r.map(r=>{if(r.id===e){let e=typeof t==`function`?t(r):t;return n.replace&&TH(e)?e:{...r,...e}}return r}))};return{getNodes:()=>t.getState().nodes.map(e=>({...e})),getNode:t=>e(t)?.internals.userNode,getInternalNode:e,getEdges:()=>{let{edges:e=[]}=t.getState();return e.map(e=>({...e}))},getEdge:e=>t.getState().edgeLookup.get(e),setNodes:r,setEdges:i,addNodes:e=>{let t=Array.isArray(e)?e:[e];n.nodeQueue.push(e=>[...e,...t])},addEdges:e=>{let t=Array.isArray(e)?e:[e];n.edgeQueue.push(e=>[...e,...t])},toObject:()=>{let{nodes:e=[],edges:n=[],transform:r}=t.getState(),[i,a,o]=r;return{nodes:e.map(e=>({...e})),edges:n.map(e=>({...e})),viewport:{x:i,y:a,zoom:o}}},deleteElements:async({nodes:e=[],edges:n=[]})=>{let{nodes:r,edges:i,onNodesDelete:a,onEdgesDelete:o,triggerNodeChanges:s,triggerEdgeChanges:c,onDelete:l,onBeforeDelete:u}=t.getState(),{nodes:d,edges:f}=await tz({nodesToRemove:e,edgesToRemove:n,nodes:r,edges:i,onBeforeDelete:u}),p=f.length>0,m=d.length>0;if(p){let e=f.map(xH);o?.(f),c(e)}if(m){let e=d.map(xH);a?.(d),s(e)}return(m||p)&&l?.({nodes:d,edges:f}),{deletedNodes:d,deletedEdges:f}},getIntersectingNodes:(e,n=!0,r)=>{let i=hz(e),o=i?e:a(e),s=r!==void 0;return o?(r||t.getState().nodes).filter(r=>{let a=t.getState().nodeLookup.get(r.id);if(a&&!i&&(r.id===e.id||!a.internals.positionAbsolute))return!1;let c=uz(s?r:a),l=mz(c,o);return n&&l>0||l>=c.width*c.height||l>=o.width*o.height}):[]},isNodeIntersecting:(e,t,n=!0)=>{let r=hz(e)?e:a(e);if(!r)return!1;let i=mz(r,t);return n&&i>0||i>=t.width*t.height||i>=r.width*r.height},updateNode:o,updateNodeData:(e,t,n={replace:!1})=>{o(e,e=>{let r=typeof t==`function`?t(e):t;return n.replace?{...e,data:r}:{...e,data:{...e.data,...r}}},n)},updateEdge:s,updateEdgeData:(e,t,n={replace:!1})=>{s(e,e=>{let r=typeof t==`function`?t(e):t;return n.replace?{...e,data:r}:{...e,data:{...e.data,...r}}},n)},getNodesBounds:e=>{let{nodeLookup:n,nodeOrigin:r}=t.getState();return JR(e,{nodeLookup:n,nodeOrigin:r})},getHandleConnections:({type:e,id:n,nodeId:r})=>Array.from(t.getState().connectionLookup.get(`${r}-${e}${n?`-${n}`:``}`)?.values()??[]),getNodeConnections:({type:e,handleId:n,nodeId:r})=>Array.from(t.getState().connectionLookup.get(`${r}${e?n?`-${e}-${n}`:`-${e}`:``}`)?.values()??[]),fitView:async e=>{let r=t.getState().fitViewResolver??jz();return t.setState({fitViewQueued:!0,fitViewOptions:e,fitViewResolver:r}),n.nodeQueue.push(e=>[...e]),r.promise}}},[]);return(0,y.useMemo)(()=>({...i,...e,viewportInitialized:r}),[r])}var FH=e=>e.selected,IH=typeof window<`u`?window:void 0;function LH({deleteKeyCode:e,multiSelectionKeyCode:t}){let n=IV(),{deleteElements:r}=PH(),i=uH(e,{actInsideInputWithModifier:!1}),a=uH(t,{target:IH});(0,y.useEffect)(()=>{if(i){let{edges:e,nodes:t}=n.getState();r({nodes:t.filter(FH),edges:e.filter(FH)}),n.setState({nodesSelectionActive:!1})}},[i]),(0,y.useEffect)(()=>{n.setState({multiSelectionActive:a})},[a])}function RH(e){let t=IV();(0,y.useEffect)(()=>{let n=()=>{if(!e.current||!(e.current.checkVisibility?.()??!0))return!1;let n=Fz(e.current);(n.height===0||n.width===0)&&t.getState().onError?.(`004`,MR.error004()),t.setState({width:n.width||500,height:n.height||500})};if(e.current){n(),window.addEventListener(`resize`,n);let t=new ResizeObserver(()=>n());return t.observe(e.current),()=>{window.removeEventListener(`resize`,n),t&&e.current&&t.unobserve(e.current)}}},[])}var zH={position:`absolute`,width:`100%`,height:`100%`,top:0,left:0},BH=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib,connectionInProgress:e.connection.inProgress});function VH({onPaneContextMenu:e,zoomOnScroll:t=!0,zoomOnPinch:n=!0,panOnScroll:r=!1,panActivationKeyPressed:i,panOnScrollSpeed:a=.5,panOnScrollMode:o=LR.Free,zoomOnDoubleClick:s=!0,panOnDrag:c=!0,defaultViewport:l,translateExtent:u,minZoom:d,maxZoom:f,zoomActivationKeyCode:p,preventScrolling:m=!0,children:h,noWheelClassName:g,noPanClassName:_,onViewportChange:v,isControlledViewport:b,paneClickDistance:x,selectionOnDrag:S}){let C=IV(),w=(0,y.useRef)(null),{userSelectionActive:T,lib:E,connectionInProgress:D}=FV(BH,jV),ee=uH(p),O=(0,y.useRef)();RH(w);let k=(0,y.useCallback)(e=>{v?.({x:e[0],y:e[1],zoom:e[2]}),b||C.setState({transform:e})},[v,b]);return(0,y.useEffect)(()=>{if(w.current){O.current=oV({domNode:w.current,minZoom:d,maxZoom:f,translateExtent:u,viewport:l,onDraggingChange:e=>C.setState(t=>t.paneDragging===e?t:{paneDragging:e}),onPanZoomStart:(e,t)=>{let{onViewportChangeStart:n,onMoveStart:r}=C.getState();r?.(e,t),n?.(t)},onPanZoom:(e,t)=>{let{onViewportChange:n,onMove:r}=C.getState();r?.(e,t),n?.(t)},onPanZoomEnd:(e,t)=>{let{onViewportChangeEnd:n,onMoveEnd:r}=C.getState();r?.(e,t),n?.(t)}});let{x:e,y:t,zoom:n}=O.current.getViewport();return C.setState({panZoom:O.current,transform:[e,t,n],domNode:w.current.closest(`.react-flow`)}),()=>{O.current?.destroy()}}},[]),(0,y.useEffect)(()=>{O.current?.update({onPaneContextMenu:e,zoomOnScroll:t,zoomOnPinch:n,panOnScroll:r,panActivationKeyPressed:i,panOnScrollSpeed:a,panOnScrollMode:o,zoomOnDoubleClick:s,panOnDrag:c,zoomActivationKeyPressed:ee,preventScrolling:m,noPanClassName:_,userSelectionActive:T,noWheelClassName:g,lib:E,onTransformChange:k,connectionInProgress:D,selectionOnDrag:S,paneClickDistance:x})},[e,t,n,r,i,a,o,s,c,ee,m,_,T,g,E,k,D,S,x]),(0,Z.jsx)(`div`,{className:`react-flow__renderer`,ref:w,style:zH,children:h})}var HH=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function UH(){let{userSelectionActive:e,userSelectionRect:t}=FV(HH,jV);return e&&t?(0,Z.jsx)(`div`,{className:`react-flow__selection react-flow__container`,style:{width:t.width,height:t.height,transform:`translate(${t.x}px, ${t.y}px)`}}):null}var WH=(e,t)=>n=>{n.target===t.current&&e?.(n)},GH=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,dragging:e.paneDragging,panBy:e.panBy,autoPanSpeed:e.autoPanSpeed});function KH({isSelecting:e,selectionKeyPressed:t,selectionMode:n=RR.Full,panOnDrag:r,autoPanOnSelection:i,paneClickDistance:a,selectionOnDrag:o,onSelectionStart:s,onSelectionEnd:c,onPaneClick:l,onPaneContextMenu:u,onPaneScroll:d,onPaneMouseEnter:f,onPaneMouseMove:p,onPaneMouseLeave:m,children:h}){let g=(0,y.useRef)(0),_=IV(),{userSelectionActive:v,elementsSelectable:b,dragging:x,panBy:S,autoPanSpeed:C}=FV(GH,jV),w=b&&(e||v),T=(0,y.useRef)(null),E=(0,y.useRef)(),D=(0,y.useRef)(new Set),ee=(0,y.useRef)(new Set),O=(0,y.useRef)(!1),k=(0,y.useRef)(!1),A=(0,y.useRef)({x:0,y:0}),te=(0,y.useRef)(!1),ne=e=>{if(k.current||O.current||_.getState().connection.inProgress){k.current=!1,O.current=!1;return}l?.(e),_.getState().resetSelectedElements(),_.setState({nodesSelectionActive:!1})},re=e=>{if(Array.isArray(r)&&r?.includes(2)){e.preventDefault();return}u?.(e)},ie=d?e=>d(e):void 0,ae=e=>{k.current&&=(e.stopPropagation(),!1)},oe=n=>{if(n.pointerType===`touch`&&r!==!1&&!t)return;let{domNode:i,transform:a}=_.getState();if(E.current=i?.getBoundingClientRect(),!E.current)return;let s=n.target===T.current;if(!s&&n.target.closest(`.nokey`)||!e||!(o&&s||t)||n.button!==0||!n.isPrimary)return;n.target?.setPointerCapture?.(n.pointerId),k.current=!1;let{x:c,y:l}=Bz(n.nativeEvent,E.current),u=yz({x:c,y:l},a);_.setState({userSelectionRect:{width:0,height:0,startX:u.x,startY:u.y,x:c,y:l}}),s||(n.stopPropagation(),n.preventDefault())};function se(e,t){let{userSelectionRect:r}=_.getState();if(!r)return;let{transform:i,nodeLookup:a,edgeLookup:o,connectionLookup:s,triggerNodeChanges:c,triggerEdgeChanges:l,defaultEdgeOptions:u}=_.getState(),d={x:r.startX,y:r.startY},{x:f,y:p}=bz(d,i),m={startX:d.x,startY:d.y,x:e<f?e:f,y:t<p?t:p,width:Math.abs(e-f),height:Math.abs(t-p)},h=D.current,g=ee.current;D.current=new Set(XR(a,m,i,n===RR.Partial,!0).map(e=>e.id)),ee.current=new Set;let v=u?.selectable??!0;for(let e of D.current){let t=s.get(e);if(t)for(let{edgeId:e}of t.values()){let t=o.get(e);t&&(t.selectable??v)&&ee.current.add(e)}}Az(h,D.current)||c(yH(a,D.current,!0)),Az(g,ee.current)||l(yH(o,ee.current)),_.setState({userSelectionRect:m,userSelectionActive:!0,nodesSelectionActive:!1})}function ce(){if(!i||!E.current)return;let[e,t]=oz(A.current,E.current,C);S({x:e,y:t}).then(e=>{if(!k.current||!e){g.current=requestAnimationFrame(ce);return}let{x:t,y:n}=A.current;se(t,n),g.current=requestAnimationFrame(ce)})}let j=()=>{cancelAnimationFrame(g.current),g.current=0,te.current=!1};(0,y.useEffect)(()=>()=>j(),[]);let le=e=>{let{userSelectionRect:n,transform:r,resetSelectedElements:i}=_.getState();if(!E.current||!n)return;let{x:o,y:c}=Bz(e.nativeEvent,E.current);A.current={x:o,y:c};let l=bz({x:n.startX,y:n.startY},r);if(!k.current){let n=t?0:a;if(Math.hypot(o-l.x,c-l.y)<=n)return;i(),s?.(e)}k.current=!0,te.current||=(ce(),!0),se(o,c)},ue=e=>{if(!w){e.target===T.current&&_.getState().connection.inProgress&&(O.current=!0);return}e.button===0&&(e.target?.releasePointerCapture?.(e.pointerId),!v&&e.target===T.current&&_.getState().userSelectionRect&&ne?.(e),_.setState({userSelectionActive:!1,userSelectionRect:null}),k.current&&(c?.(e),_.setState({nodesSelectionActive:D.current.size>0})),j())},de=e=>{e.target?.releasePointerCapture?.(e.pointerId),j()},fe=r===!0||Array.isArray(r)&&r.includes(0);return(0,Z.jsxs)(`div`,{className:YM([`react-flow__pane`,{draggable:fe,dragging:x,selection:e}]),onClick:w?void 0:WH(ne,T),onContextMenu:WH(re,T),onWheel:WH(ie,T),onPointerEnter:w?void 0:f,onPointerMove:w?le:p,onPointerUp:ue,onPointerCancel:w?de:void 0,onPointerDownCapture:w?oe:void 0,onClickCapture:w?ae:void 0,onPointerLeave:m,ref:T,style:zH,children:[h,(0,Z.jsx)(UH,{})]})}function qH({id:e,store:t,unselect:n=!1,nodeRef:r}){let{addSelectedNodes:i,unselectNodesAndEdges:a,multiSelectionActive:o,nodeLookup:s,onError:c}=t.getState(),l=s.get(e);if(!l){c?.(`012`,MR.error012(e));return}t.setState({nodesSelectionActive:!1}),l.selected?(n||l.selected&&o)&&(a({nodes:[l],edges:[]}),requestAnimationFrame(()=>r?.current?.blur())):i([e])}function JH({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:r,nodeId:i,isSelectable:a,nodeClickDistance:o}){let s=IV(),[c,l]=(0,y.useState)(!1),u=(0,y.useRef)();return(0,y.useEffect)(()=>{if(!t)return u.current=FB({getStoreItems:()=>s.getState(),onNodeMouseDown:t=>{qH({id:t,store:s,nodeRef:e})},onDragStart:()=>{l(!0)},onDragStop:()=>{l(!1)}}),()=>{u.current?.destroy(),u.current=void 0}},[t,s,e]),(0,y.useEffect)(()=>{!t&&e.current&&u.current&&u.current.update({noDragClassName:n,handleSelector:r,domNode:e.current,isSelectable:a,nodeId:i,nodeClickDistance:o})},[n,r,t,a,e,i,o]),c}var YH=e=>t=>t.selected&&(t.draggable||e&&t.draggable===void 0);function XH(){let e=IV();return(0,y.useCallback)(t=>{let{nodeExtent:n,snapToGrid:r,snapGrid:i,nodesDraggable:a,onError:o,updateNodePositions:s,nodeLookup:c,nodeOrigin:l}=e.getState(),u=new Map,d=YH(a),f=r?i[0]:5,p=r?i[1]:5,m=t.direction.x*f*t.factor,h=t.direction.y*p*t.factor;for(let[,e]of c){if(!d(e))continue;let t={x:e.internals.positionAbsolute.x+m,y:e.internals.positionAbsolute.y+h};r&&(t=vz(t,i));let{position:a,positionAbsolute:s}=ez({nodeId:e.id,nextPosition:t,nodeLookup:c,nodeExtent:n,nodeOrigin:l,onError:o});e.position=a,e.internals.positionAbsolute=s,u.set(e.id,e)}s(u)},[])}var ZH=(0,y.createContext)(null),QH=ZH.Provider;ZH.Consumer;var $H=()=>(0,y.useContext)(ZH),eU=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),tU=(0,y.createContext)(null);function nU({children:e}){let t=FV(eU,jV);return(0,Z.jsx)(tU.Provider,{value:t,children:e})}function rU(){let e=(0,y.useContext)(tU);if(!e)throw Error(`useHandleConfig must be used within a HandleConfigProvider`);return e}var iU={connectingFrom:!1,connectingTo:!1,clickConnecting:!1,isPossibleEndHandle:!0,connectionInProcess:!1,clickConnectionInProcess:!1,valid:!1},aU=(e,t,n)=>r=>{let{connectionClickStartHandle:i,connectionMode:a,connection:o}=r,{fromHandle:s,toHandle:c,isValid:l}=o;if(!s&&!i)return iU;let u=c?.nodeId===e&&c?.id===t&&c?.type===n;return{connectingFrom:s?.nodeId===e&&s?.id===t&&s?.type===n,connectingTo:u,clickConnecting:i?.nodeId===e&&i?.id===t&&i?.type===n,isPossibleEndHandle:a===IR.Strict?s?.type!==n:e!==s?.nodeId||t!==s?.id,connectionInProcess:!!s,clickConnectionInProcess:!!i,valid:u&&l}};function oU({type:e=`source`,position:t=HR.Top,isValidConnection:n,isConnectable:r=!0,isConnectableStart:i=!0,isConnectableEnd:a=!0,id:o,onConnect:s,children:c,className:l,onMouseDown:u,onTouchStart:d,...f},p){let m=o||null,h=e===`target`,g=IV(),_=$H(),{connectOnClick:v,noPanClassName:y,rfId:b}=rU(),{connectingFrom:x,connectingTo:S,clickConnecting:C,isPossibleEndHandle:w,connectionInProcess:T,clickConnectionInProcess:E,valid:D}=FV(aU(_,m,e),jV);_||g.getState().onError?.(`010`,MR.error010());let ee=e=>{let{defaultEdgeOptions:t,onConnect:n,hasDefaultEdges:r}=g.getState(),i={...t,...e};if(r){let{edges:e,setEdges:t,onError:n}=g.getState();t(CH(i,e,{onError:n}))}n?.(i),s?.(i)},O=e=>{if(!_)return;let t=zz(e.nativeEvent);if(i&&(t&&e.button===0||!t)){let t=g.getState();GB.onPointerDown(e.nativeEvent,{handleDomNode:e.currentTarget,autoPanOnConnect:t.autoPanOnConnect,connectionMode:t.connectionMode,connectionRadius:t.connectionRadius,domNode:t.domNode,nodeLookup:t.nodeLookup,lib:t.lib,isTarget:h,handleId:m,nodeId:_,flowId:t.rfId,panBy:t.panBy,cancelConnection:t.cancelConnection,onConnectStart:t.onConnectStart,onConnectEnd:(...e)=>g.getState().onConnectEnd?.(...e),updateConnection:t.updateConnection,onConnect:ee,isValidConnection:n||((...e)=>g.getState().isValidConnection?.(...e)??!0),getTransform:()=>g.getState().transform,getFromHandle:()=>g.getState().connection.fromHandle,autoPanSpeed:t.autoPanSpeed,dragThreshold:t.connectionDragThreshold})}t?u?.(e):d?.(e)};return(0,Z.jsx)(`div`,{"data-handleid":m,"data-nodeid":_,"data-handlepos":t,"data-id":`${b}-${_}-${m}-${e}`,className:YM([`react-flow__handle`,`react-flow__handle-${t}`,`nodrag`,y,l,{source:!h,target:h,connectable:r,connectablestart:i,connectableend:a,clickconnecting:C,connectingfrom:x,connectingto:S,valid:D,connectionindicator:r&&(!T||w)&&(T||E?a:i)}]),onMouseDown:O,onTouchStart:O,onClick:v?t=>{let{onClickConnectStart:r,onClickConnectEnd:a,connectionClickStartHandle:o,connectionMode:s,isValidConnection:c,lib:l,rfId:u,nodeLookup:d,connection:f}=g.getState();if(!_||!o&&!i)return;if(!o){r?.(t.nativeEvent,{nodeId:_,handleId:m,handleType:e}),g.setState({connectionClickStartHandle:{nodeId:_,type:e,id:m}});return}let p=Iz(t.target),h=n||c,{connection:v,isValid:y}=GB.isValid(t.nativeEvent,{handle:{nodeId:_,id:m,type:e},connectionMode:s,fromNodeId:o.nodeId,fromHandleId:o.id||null,fromType:o.type,isValidConnection:h,flowId:u,doc:p,lib:l,nodeLookup:d});y&&v&&ee(v);let b=structuredClone(f);delete b.inProgress,b.toPosition=b.toHandle?b.toHandle.position:null,a?.(t,b),g.setState({connectionClickStartHandle:null})}:void 0,ref:p,...f,children:c})}var sU=(0,y.memo)(EH(oU));function cU({data:e,isConnectable:t,sourcePosition:n=HR.Bottom}){return(0,Z.jsxs)(Z.Fragment,{children:[e?.label,(0,Z.jsx)(sU,{type:`source`,position:n,isConnectable:t})]})}function lU({data:e,isConnectable:t,targetPosition:n=HR.Top,sourcePosition:r=HR.Bottom}){return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(sU,{type:`target`,position:n,isConnectable:t}),e?.label,(0,Z.jsx)(sU,{type:`source`,position:r,isConnectable:t})]})}function uU(){return null}function dU({data:e,isConnectable:t,targetPosition:n=HR.Top}){return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(sU,{type:`target`,position:n,isConnectable:t}),e?.label]})}var fU={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},pU={input:cU,default:lU,output:dU,group:uU};function mU(e){return e.internals.handleBounds===void 0?{width:e.width??e.initialWidth??e.style?.width,height:e.height??e.initialHeight??e.style?.height}:{width:e.width??e.style?.width,height:e.height??e.style?.height}}var hU=e=>{let{width:t,height:n,x:r,y:i}=YR(e.nodeLookup,{filter:e=>!!e.selected});return{width:gz(t)?t:null,height:gz(n)?n:null,userSelectionActive:e.userSelectionActive,transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]}) translate(${r}px,${i}px)`}};function gU({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){let r=IV(),{width:i,height:a,transformString:o,userSelectionActive:s}=FV(hU,jV),c=XH(),l=(0,y.useRef)(null);(0,y.useEffect)(()=>{n||l.current?.focus({preventScroll:!0})},[n]);let u=!s&&i!==null&&a!==null;if(JH({nodeRef:l,disabled:!u}),!u)return null;let d=e?t=>{e(t,r.getState().nodes.filter(e=>e.selected))}:void 0;return(0,Z.jsx)(`div`,{className:YM([`react-flow__nodesselection`,`react-flow__container`,t]),style:{transform:o},children:(0,Z.jsx)(`div`,{ref:l,className:`react-flow__nodesselection-rect`,onContextMenu:d,tabIndex:n?void 0:-1,onKeyDown:n?void 0:e=>{Object.prototype.hasOwnProperty.call(fU,e.key)&&(e.preventDefault(),c({direction:fU[e.key],factor:e.shiftKey?4:1}))},style:{width:i,height:a}})})}var _U=typeof window<`u`?window:void 0,vU=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function yU({children:e,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:i,onPaneContextMenu:a,onPaneScroll:o,paneClickDistance:s,deleteKeyCode:c,selectionKeyCode:l,selectionOnDrag:u,selectionMode:d,onSelectionStart:f,onSelectionEnd:p,multiSelectionKeyCode:m,panActivationKeyCode:h,zoomActivationKeyCode:g,elementsSelectable:_,zoomOnScroll:v,zoomOnPinch:y,panOnScroll:b,panOnScrollSpeed:x,panOnScrollMode:S,zoomOnDoubleClick:C,panOnDrag:w,autoPanOnSelection:T,defaultViewport:E,translateExtent:D,minZoom:ee,maxZoom:O,preventScrolling:k,onSelectionContextMenu:A,noWheelClassName:te,noPanClassName:ne,disableKeyboardA11y:re,onViewportChange:ie,isControlledViewport:ae}){let{nodesSelectionActive:oe,userSelectionActive:se}=FV(vU,jV),ce=uH(l,{target:_U}),j=uH(h,{target:_U}),le=j||w,ue=j||b,de=u&&le!==!0,fe=ce||se||de;return LH({deleteKeyCode:c,multiSelectionKeyCode:m}),(0,Z.jsx)(VH,{onPaneContextMenu:a,elementsSelectable:_,zoomOnScroll:v,zoomOnPinch:y,panOnScroll:ue,panActivationKeyPressed:j,panOnScrollSpeed:x,panOnScrollMode:S,zoomOnDoubleClick:C,panOnDrag:!ce&&le,defaultViewport:E,translateExtent:D,minZoom:ee,maxZoom:O,zoomActivationKeyCode:g,preventScrolling:k,noWheelClassName:te,noPanClassName:ne,onViewportChange:ie,isControlledViewport:ae,paneClickDistance:s,selectionOnDrag:de,children:(0,Z.jsxs)(KH,{onSelectionStart:f,onSelectionEnd:p,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:i,onPaneContextMenu:a,onPaneScroll:o,panOnDrag:le,autoPanOnSelection:T,isSelecting:!!fe,selectionMode:d,selectionKeyPressed:ce,paneClickDistance:s,selectionOnDrag:de,children:[e,oe&&(0,Z.jsx)(gU,{onSelectionContextMenu:A,noPanClassName:ne,disableKeyboardA11y:re})]})})}yU.displayName=`FlowRenderer`;var bU=(0,y.memo)(yU),xU=e=>t=>e?XR(t.nodeLookup,{x:0,y:0,width:t.width,height:t.height},t.transform,!0).map(e=>e.id):Array.from(t.nodeLookup.keys());function SU(e){return FV((0,y.useCallback)(xU(e),[e]),jV)}var CU=e=>e.updateNodeInternals;function wU(){let e=FV(CU),[t]=(0,y.useState)(()=>typeof ResizeObserver>`u`?null:new ResizeObserver(t=>{let n=new Map;t.forEach(e=>{let t=e.target.getAttribute(`data-id`);n.set(t,{id:t,nodeElement:e.target,force:!0})}),e(n)}));return(0,y.useEffect)(()=>()=>{t?.disconnect()},[t]),t}function TU({node:e,nodeType:t,hasDimensions:n,resizeObserver:r}){let i=IV(),a=(0,y.useRef)(null),o=(0,y.useRef)(null),s=(0,y.useRef)(e.sourcePosition),c=(0,y.useRef)(e.targetPosition),l=(0,y.useRef)(t),u=n&&!!e.internals.handleBounds;return(0,y.useEffect)(()=>{a.current&&!e.hidden&&(!u||o.current!==a.current)&&(o.current&&r?.unobserve(o.current),r?.observe(a.current),o.current=a.current)},[u,e.hidden]),(0,y.useEffect)(()=>()=>{o.current&&=(r?.unobserve(o.current),null)},[]),(0,y.useEffect)(()=>{if(a.current){let n=l.current!==t,r=s.current!==e.sourcePosition,o=c.current!==e.targetPosition;(n||r||o)&&(l.current=t,s.current=e.sourcePosition,c.current=e.targetPosition,i.getState().updateNodeInternals(new Map([[e.id,{id:e.id,nodeElement:a.current,force:!0}]])))}},[e.id,t,e.sourcePosition,e.targetPosition]),a}function EU({id:e,onClick:t,onMouseEnter:n,onMouseMove:r,onMouseLeave:i,onContextMenu:a,onDoubleClick:o,nodesDraggable:s,elementsSelectable:c,nodesConnectable:l,nodesFocusable:u,resizeObserver:d,noDragClassName:f,noPanClassName:p,disableKeyboardA11y:m,rfId:h,nodeTypes:g,nodeClickDistance:_,onError:v}){let{node:y,internals:b,isParent:x}=FV(t=>{let n=t.nodeLookup.get(e),r=t.parentLookup.has(e);return{node:n,internals:n.internals,isParent:r}},jV),S=y.type||`default`,C=g?.[S]||pU[S];C===void 0&&(v?.(`003`,MR.error003(S)),S=`default`,C=g?.default||pU.default);let w=!!(y.draggable||s&&y.draggable===void 0),T=!!(y.selectable||c&&y.selectable===void 0),E=!!(y.connectable||l&&y.connectable===void 0),D=!!(y.focusable||u&&y.focusable===void 0),ee=IV(),O=Oz(y),k=TU({node:y,nodeType:S,hasDimensions:O,resizeObserver:d}),A=JH({nodeRef:k,disabled:y.hidden||!w,noDragClassName:f,handleSelector:y.dragHandle,nodeId:e,isSelectable:T,nodeClickDistance:_}),te=XH();if(y.hidden)return null;let ne=Dz(y),re=mU(y),ie=T||w||t||n||r||i,ae=n?e=>n(e,{...b.userNode}):void 0,oe=r?e=>r(e,{...b.userNode}):void 0,se=i?e=>i(e,{...b.userNode}):void 0,ce=a?e=>a(e,{...b.userNode}):void 0,j=o?e=>o(e,{...b.userNode}):void 0,le=n=>{let{selectNodesOnDrag:r,nodeDragThreshold:i}=ee.getState();T&&(!r||!w||i>0)&&qH({id:e,store:ee,nodeRef:k}),t&&t(n,{...b.userNode})},ue=t=>{if(!(Rz(t.nativeEvent)||m)){if(PR.includes(t.key)&&T){let n=t.key===`Escape`;qH({id:e,store:ee,unselect:n,nodeRef:k})}else if(w&&y.selected&&Object.prototype.hasOwnProperty.call(fU,t.key)){t.preventDefault();let{ariaLabelConfig:e}=ee.getState();ee.setState({ariaLiveMessage:e[`node.a11yDescription.ariaLiveMessage`]({direction:t.key.replace(`Arrow`,``).toLowerCase(),x:~~b.positionAbsolute.x,y:~~b.positionAbsolute.y})}),te({direction:fU[t.key],factor:t.shiftKey?4:1})}}},de=()=>{if(m||!k.current?.matches(`:focus-visible`))return;let{transform:t,width:n,height:r,autoPanOnNodeFocus:i,setCenter:a}=ee.getState();i&&(XR(new Map([[e,y]]),{x:0,y:0,width:n,height:r},t,!0).length>0||a(y.position.x+ne.width/2,y.position.y+ne.height/2,{zoom:t[2]}))};return(0,Z.jsx)(`div`,{className:YM([`react-flow__node`,`react-flow__node-${S}`,{[p]:w},y.className,{selected:y.selected,selectable:T,parent:x,draggable:w,dragging:A}]),ref:k,style:{zIndex:b.z,transform:`translate(${b.positionAbsolute.x}px,${b.positionAbsolute.y}px)`,pointerEvents:ie?`all`:`none`,visibility:O?`visible`:`hidden`,...y.style,...re},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:ae,onMouseMove:oe,onMouseLeave:se,onContextMenu:ce,onClick:le,onDoubleClick:j,onKeyDown:D?ue:void 0,tabIndex:D?0:void 0,onFocus:D?de:void 0,role:y.ariaRole??(D?`group`:void 0),"aria-roledescription":`node`,"aria-describedby":m?void 0:`${zV}-${h}`,"aria-label":y.ariaLabel,...y.domAttributes,children:(0,Z.jsx)(QH,{value:e,children:(0,Z.jsx)(C,{id:e,data:y.data,type:S,positionAbsoluteX:b.positionAbsolute.x,positionAbsoluteY:b.positionAbsolute.y,selected:y.selected??!1,selectable:T,draggable:w,deletable:y.deletable??!0,isConnectable:E,sourcePosition:y.sourcePosition,targetPosition:y.targetPosition,dragging:A,dragHandle:y.dragHandle,zIndex:b.z,parentId:y.parentId,...ne})})})}var DU=(0,y.memo)(EU),OU=e=>({nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function kU(e){let{nodesConnectable:t,nodesFocusable:n,elementsSelectable:r,onError:i}=FV(OU,jV),a=SU(e.onlyRenderVisibleElements),o=wU();return(0,Z.jsx)(`div`,{className:`react-flow__nodes`,style:zH,children:a.map(a=>(0,Z.jsx)(DU,{id:a,nodeTypes:e.nodeTypes,nodeExtent:e.nodeExtent,onClick:e.onNodeClick,onMouseEnter:e.onNodeMouseEnter,onMouseMove:e.onNodeMouseMove,onMouseLeave:e.onNodeMouseLeave,onContextMenu:e.onNodeContextMenu,onDoubleClick:e.onNodeDoubleClick,noDragClassName:e.noDragClassName,noPanClassName:e.noPanClassName,rfId:e.rfId,disableKeyboardA11y:e.disableKeyboardA11y,resizeObserver:o,nodesDraggable:e.nodesDraggable??!0,nodesConnectable:t,nodesFocusable:n,elementsSelectable:r,nodeClickDistance:e.nodeClickDistance,onError:i},a))})}kU.displayName=`NodeRenderer`;var AU=(0,y.memo)(kU);function jU(e){return FV((0,y.useCallback)(t=>{if(!e)return t.edges.map(e=>e.id);let n=[];if(t.width&&t.height)for(let e of t.edges){let r=t.nodeLookup.get(e.source),i=t.nodeLookup.get(e.target);r&&i&&Jz({sourceNode:r,targetNode:i,width:t.width,height:t.height,transform:t.transform})&&n.push(e.id)}return n},[e]),jV)}var MU=({color:e=`none`,strokeWidth:t=1})=>{let n={strokeWidth:t,...e&&{stroke:e}};return(0,Z.jsx)(`polyline`,{className:`arrow`,style:n,strokeLinecap:`round`,fill:`none`,strokeLinejoin:`round`,points:`-5,-4 0,0 -5,4`})},NU=({color:e=`none`,strokeWidth:t=1})=>{let n={strokeWidth:t,...e&&{stroke:e,fill:e}};return(0,Z.jsx)(`polyline`,{className:`arrowclosed`,style:n,strokeLinecap:`round`,strokeLinejoin:`round`,points:`-5,-4 0,0 -5,4 -5,-4`})},PU={[VR.Arrow]:MU,[VR.ArrowClosed]:NU};function FU(e){let t=IV();return(0,y.useMemo)(()=>Object.prototype.hasOwnProperty.call(PU,e)?PU[e]:(t.getState().onError?.(`009`,MR.error009(e)),null),[e])}var IU=({id:e,type:t,color:n,width:r=12.5,height:i=12.5,markerUnits:a=`strokeWidth`,strokeWidth:o,orient:s=`auto-start-reverse`})=>{let c=FU(t);return c?(0,Z.jsx)(`marker`,{className:`react-flow__arrowhead`,id:e,markerWidth:`${r}`,markerHeight:`${i}`,viewBox:`-10 -10 20 20`,markerUnits:a,orient:s,refX:`0`,refY:`0`,children:(0,Z.jsx)(c,{color:n,strokeWidth:o})}):null},LU=({defaultColor:e,rfId:t})=>{let n=FV(e=>e.edges),r=FV(e=>e.defaultEdgeOptions),i=(0,y.useMemo)(()=>dB(n,{id:t,defaultColor:e,defaultMarkerStart:r?.markerStart,defaultMarkerEnd:r?.markerEnd}),[n,r,t,e]);return i.length?(0,Z.jsx)(`svg`,{className:`react-flow__marker`,"aria-hidden":`true`,children:(0,Z.jsx)(`defs`,{children:i.map(e=>(0,Z.jsx)(IU,{id:e.id,type:e.type,color:e.color,width:e.width,height:e.height,markerUnits:e.markerUnits,strokeWidth:e.strokeWidth,orient:e.orient},e.id))})}):null};LU.displayName=`MarkerDefinitions`;var RU=(0,y.memo)(LU);function zU({x:e,y:t,label:n,labelStyle:r,labelShowBg:i=!0,labelBgStyle:a,labelBgPadding:o=[2,4],labelBgBorderRadius:s=2,children:c,className:l,...u}){let[d,f]=(0,y.useState)({x:1,y:0,width:0,height:0}),p=YM([`react-flow__edge-textwrapper`,l]),m=(0,y.useRef)(null);return(0,y.useEffect)(()=>{if(m.current){let e=m.current.getBBox();f({x:e.x,y:e.y,width:e.width,height:e.height})}},[n]),n?(0,Z.jsxs)(`g`,{transform:`translate(${e-d.width/2} ${t-d.height/2})`,className:p,visibility:d.width?`visible`:`hidden`,...u,children:[i&&(0,Z.jsx)(`rect`,{width:d.width+2*o[0],x:-o[0],y:-o[1],height:d.height+2*o[1],className:`react-flow__edge-textbg`,style:a,rx:s,ry:s}),(0,Z.jsx)(`text`,{className:`react-flow__edge-text`,y:d.height/2,dy:`0.3em`,ref:m,style:r,children:n}),c]}):null}zU.displayName=`EdgeText`;var BU=(0,y.memo)(zU);function VU({path:e,labelX:t,labelY:n,label:r,labelStyle:i,labelShowBg:a,labelBgStyle:o,labelBgPadding:s,labelBgBorderRadius:c,interactionWidth:l=20,...u}){return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(`path`,{...u,d:e,fill:`none`,className:YM([`react-flow__edge-path`,u.className])}),l?(0,Z.jsx)(`path`,{d:e,fill:`none`,strokeOpacity:0,strokeWidth:l,className:`react-flow__edge-interaction`}):null,r&&gz(t)&&gz(n)?(0,Z.jsx)(BU,{x:t,y:n,label:r,labelStyle:i,labelShowBg:a,labelBgStyle:o,labelBgPadding:s,labelBgBorderRadius:c}):null]})}function HU({pos:e,x1:t,y1:n,x2:r,y2:i}){return e===HR.Left||e===HR.Right?[.5*(t+r),n]:[t,.5*(n+i)]}function UU({sourceX:e,sourceY:t,sourcePosition:n=HR.Bottom,targetX:r,targetY:i,targetPosition:a=HR.Top}){let[o,s]=HU({pos:n,x1:e,y1:t,x2:r,y2:i}),[c,l]=HU({pos:a,x1:r,y1:i,x2:e,y2:t}),[u,d,f,p]=Hz({sourceX:e,sourceY:t,targetX:r,targetY:i,sourceControlX:o,sourceControlY:s,targetControlX:c,targetControlY:l});return[`M${e},${t} C${o},${s} ${c},${l} ${r},${i}`,u,d,f,p]}function WU(e){return(0,y.memo)(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:a,sourcePosition:o,targetPosition:s,label:c,labelStyle:l,labelShowBg:u,labelBgStyle:d,labelBgPadding:f,labelBgBorderRadius:p,style:m,markerEnd:h,markerStart:g,interactionWidth:_})=>{let[v,y,b]=UU({sourceX:n,sourceY:r,sourcePosition:o,targetX:i,targetY:a,targetPosition:s}),x=e.isInternal?void 0:t;return(0,Z.jsx)(VU,{id:x,path:v,labelX:y,labelY:b,label:c,labelStyle:l,labelShowBg:u,labelBgStyle:d,labelBgPadding:f,labelBgBorderRadius:p,style:m,markerEnd:h,markerStart:g,interactionWidth:_})})}var GU=WU({isInternal:!1}),KU=WU({isInternal:!0});GU.displayName=`SimpleBezierEdge`,KU.displayName=`SimpleBezierEdgeInternal`;function qU(e){return(0,y.memo)(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:a,label:o,labelStyle:s,labelShowBg:c,labelBgStyle:l,labelBgPadding:u,labelBgBorderRadius:d,style:f,sourcePosition:p=HR.Bottom,targetPosition:m=HR.Top,markerEnd:h,markerStart:g,pathOptions:_,interactionWidth:v})=>{let[y,b,x]=iB({sourceX:n,sourceY:r,sourcePosition:p,targetX:i,targetY:a,targetPosition:m,borderRadius:_?.borderRadius,offset:_?.offset,stepPosition:_?.stepPosition}),S=e.isInternal?void 0:t;return(0,Z.jsx)(VU,{id:S,path:y,labelX:b,labelY:x,label:o,labelStyle:s,labelShowBg:c,labelBgStyle:l,labelBgPadding:u,labelBgBorderRadius:d,style:f,markerEnd:h,markerStart:g,interactionWidth:v})})}var JU=qU({isInternal:!1}),YU=qU({isInternal:!0});JU.displayName=`SmoothStepEdge`,YU.displayName=`SmoothStepEdgeInternal`;function XU(e){return(0,y.memo)(({id:t,...n})=>{let r=e.isInternal?void 0:t;return(0,Z.jsx)(JU,{...n,id:r,pathOptions:(0,y.useMemo)(()=>({borderRadius:0,offset:n.pathOptions?.offset}),[n.pathOptions?.offset])})})}var ZU=XU({isInternal:!1}),QU=XU({isInternal:!0});ZU.displayName=`StepEdge`,QU.displayName=`StepEdgeInternal`;function $U(e){return(0,y.memo)(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:a,label:o,labelStyle:s,labelShowBg:c,labelBgStyle:l,labelBgPadding:u,labelBgBorderRadius:d,style:f,markerEnd:p,markerStart:m,interactionWidth:h})=>{let[g,_,v]=Qz({sourceX:n,sourceY:r,targetX:i,targetY:a}),y=e.isInternal?void 0:t;return(0,Z.jsx)(VU,{id:y,path:g,labelX:_,labelY:v,label:o,labelStyle:s,labelShowBg:c,labelBgStyle:l,labelBgPadding:u,labelBgBorderRadius:d,style:f,markerEnd:p,markerStart:m,interactionWidth:h})})}var eW=$U({isInternal:!1}),tW=$U({isInternal:!0});eW.displayName=`StraightEdge`,tW.displayName=`StraightEdgeInternal`;function nW(e){return(0,y.memo)(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:a,sourcePosition:o=HR.Bottom,targetPosition:s=HR.Top,label:c,labelStyle:l,labelShowBg:u,labelBgStyle:d,labelBgPadding:f,labelBgBorderRadius:p,style:m,markerEnd:h,markerStart:g,pathOptions:_,interactionWidth:v})=>{let[y,b,x]=Gz({sourceX:n,sourceY:r,sourcePosition:o,targetX:i,targetY:a,targetPosition:s,curvature:_?.curvature}),S=e.isInternal?void 0:t;return(0,Z.jsx)(VU,{id:S,path:y,labelX:b,labelY:x,label:c,labelStyle:l,labelShowBg:u,labelBgStyle:d,labelBgPadding:f,labelBgBorderRadius:p,style:m,markerEnd:h,markerStart:g,interactionWidth:v})})}var rW=nW({isInternal:!1}),iW=nW({isInternal:!0});rW.displayName=`BezierEdge`,iW.displayName=`BezierEdgeInternal`;var aW={default:iW,straight:tW,step:QU,smoothstep:YU,simplebezier:KU},oW={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null,zIndex:void 0},sW=(e,t,n)=>n===HR.Left?e-t:n===HR.Right?e+t:e,cW=(e,t,n)=>n===HR.Top?e-t:n===HR.Bottom?e+t:e,lW=`react-flow__edgeupdater`;function uW({position:e,centerX:t,centerY:n,radius:r=10,onMouseDown:i,onMouseEnter:a,onMouseOut:o,type:s}){return(0,Z.jsx)(`circle`,{onMouseDown:i,onMouseEnter:a,onMouseOut:o,className:YM([lW,`${lW}-${s}`]),cx:sW(t,r,e),cy:cW(n,r,e),r,stroke:`transparent`,fill:`transparent`})}function dW({isReconnectable:e,reconnectRadius:t,edge:n,sourceX:r,sourceY:i,targetX:a,targetY:o,sourcePosition:s,targetPosition:c,onReconnect:l,onReconnectStart:u,onReconnectEnd:d,setReconnecting:f,setUpdateHover:p}){let m=IV(),h=(e,t)=>{if(e.button!==0)return;let{autoPanOnConnect:r,domNode:i,connectionMode:a,connectionRadius:o,lib:s,onConnectStart:c,cancelConnection:p,nodeLookup:h,rfId:g,panBy:_,updateConnection:v}=m.getState(),y=t.type===`target`;GB.onPointerDown(e.nativeEvent,{autoPanOnConnect:r,connectionMode:a,connectionRadius:o,domNode:i,handleId:t.id,nodeId:t.nodeId,nodeLookup:h,isTarget:y,edgeUpdaterType:t.type,lib:s,flowId:g,cancelConnection:p,panBy:_,isValidConnection:(...e)=>m.getState().isValidConnection?.(...e)??!0,onConnect:e=>l?.(n,e),onConnectStart:(r,i)=>{f(!0),u?.(e,n,t.type),c?.(r,i)},onConnectEnd:(...e)=>m.getState().onConnectEnd?.(...e),onReconnectEnd:(e,r)=>{f(!1),d?.(e,n,t.type,r)},updateConnection:v,getTransform:()=>m.getState().transform,getFromHandle:()=>m.getState().connection.fromHandle,dragThreshold:m.getState().connectionDragThreshold,handleDomNode:e.currentTarget})},g=e=>h(e,{nodeId:n.target,id:n.targetHandle??null,type:`target`}),_=e=>h(e,{nodeId:n.source,id:n.sourceHandle??null,type:`source`}),v=()=>p(!0),y=()=>p(!1);return(0,Z.jsxs)(Z.Fragment,{children:[(e===!0||e===`source`)&&(0,Z.jsx)(uW,{position:s,centerX:r,centerY:i,radius:t,onMouseDown:g,onMouseEnter:v,onMouseOut:y,type:`source`}),(e===!0||e===`target`)&&(0,Z.jsx)(uW,{position:c,centerX:a,centerY:o,radius:t,onMouseDown:_,onMouseEnter:v,onMouseOut:y,type:`target`})]})}function fW({id:e,edgesFocusable:t,edgesReconnectable:n,elementsSelectable:r,onClick:i,onDoubleClick:a,onContextMenu:o,onMouseEnter:s,onMouseMove:c,onMouseLeave:l,reconnectRadius:u,onReconnect:d,onReconnectStart:f,onReconnectEnd:p,rfId:m,edgeTypes:h,noPanClassName:g,onError:_,disableKeyboardA11y:v}){let b=FV(t=>t.edgeLookup.get(e)),x=FV(e=>e.defaultEdgeOptions);b=x?{...x,...b}:b;let S=b.type||`default`,C=h?.[S]||aW[S];C===void 0&&(_?.(`011`,MR.error011(S)),S=`default`,C=h?.default||aW.default);let w=!!(b.focusable||t&&b.focusable===void 0),T=d!==void 0&&(b.reconnectable||n&&b.reconnectable===void 0),E=!!(b.selectable||r&&b.selectable===void 0),D=(0,y.useRef)(null),[ee,O]=(0,y.useState)(!1),[k,A]=(0,y.useState)(!1),te=IV(),{zIndex:ne=b.zIndex,sourceX:re,sourceY:ie,targetX:ae,targetY:oe,sourcePosition:se,targetPosition:ce}=FV((0,y.useCallback)(t=>{let n=t.nodeLookup.get(b.source),r=t.nodeLookup.get(b.target);if(!n||!r)return oW;let i=oB({id:e,sourceNode:n,targetNode:r,sourceHandle:b.sourceHandle||null,targetHandle:b.targetHandle||null,connectionMode:t.connectionMode,onError:_}),a=qz({selected:b.selected,zIndex:b.zIndex,sourceNode:n,targetNode:r,elevateOnSelect:t.elevateEdgesOnSelect,zIndexMode:t.zIndexMode});return{...i||oW,zIndex:a}},[b.source,b.target,b.sourceHandle,b.targetHandle,b.selected,b.zIndex,_]),jV),j=(0,y.useMemo)(()=>b.markerStart?`url('#${uB(b.markerStart,m)}')`:void 0,[b.markerStart,m]),le=(0,y.useMemo)(()=>b.markerEnd?`url('#${uB(b.markerEnd,m)}')`:void 0,[b.markerEnd,m]);if(b.hidden||re===null||ie===null||ae===null||oe===null)return null;let ue=t=>{let{addSelectedEdges:n,unselectNodesAndEdges:r,multiSelectionActive:a}=te.getState();E&&(te.setState({nodesSelectionActive:!1}),b.selected&&a?(r({nodes:[],edges:[b]}),D.current?.blur()):n([e])),i&&i(t,b)},de=a?e=>{a(e,{...b})}:void 0,fe=o?e=>{o(e,{...b})}:void 0,pe=s?e=>{s(e,{...b})}:void 0,me=c?e=>{c(e,{...b})}:void 0,he=l?e=>{l(e,{...b})}:void 0;return(0,Z.jsx)(`svg`,{style:{zIndex:ne},children:(0,Z.jsxs)(`g`,{className:YM([`react-flow__edge`,`react-flow__edge-${S}`,b.className,g,{selected:b.selected,animated:b.animated,inactive:!E&&!i,updating:ee,selectable:E}]),onClick:ue,onDoubleClick:de,onContextMenu:fe,onMouseEnter:pe,onMouseMove:me,onMouseLeave:he,onKeyDown:w?t=>{if(!v&&PR.includes(t.key)&&E){let{unselectNodesAndEdges:n,addSelectedEdges:r}=te.getState();t.key===`Escape`?(D.current?.blur(),n({edges:[b]})):r([e])}}:void 0,tabIndex:w?0:void 0,role:b.ariaRole??(w?`group`:`img`),"aria-roledescription":`edge`,"data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":b.ariaLabel===null?void 0:b.ariaLabel||`Edge from ${b.source} to ${b.target}`,"aria-describedby":w?`${BV}-${m}`:void 0,ref:D,...b.domAttributes,children:[!k&&(0,Z.jsx)(C,{id:e,source:b.source,target:b.target,type:b.type,selected:b.selected,animated:b.animated,selectable:E,deletable:b.deletable??!0,label:b.label,labelStyle:b.labelStyle,labelShowBg:b.labelShowBg,labelBgStyle:b.labelBgStyle,labelBgPadding:b.labelBgPadding,labelBgBorderRadius:b.labelBgBorderRadius,sourceX:re,sourceY:ie,targetX:ae,targetY:oe,sourcePosition:se,targetPosition:ce,data:b.data,style:b.style,sourceHandleId:b.sourceHandle,targetHandleId:b.targetHandle,markerStart:j,markerEnd:le,pathOptions:`pathOptions`in b?b.pathOptions:void 0,interactionWidth:b.interactionWidth}),T&&(0,Z.jsx)(dW,{edge:b,isReconnectable:T,reconnectRadius:u,onReconnect:d,onReconnectStart:f,onReconnectEnd:p,sourceX:re,sourceY:ie,targetX:ae,targetY:oe,sourcePosition:se,targetPosition:ce,setUpdateHover:O,setReconnecting:A})]})})}var pW=(0,y.memo)(fW),mW=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function hW({defaultMarkerColor:e,onlyRenderVisibleElements:t,rfId:n,edgeTypes:r,noPanClassName:i,onReconnect:a,onEdgeContextMenu:o,onEdgeMouseEnter:s,onEdgeMouseMove:c,onEdgeMouseLeave:l,onEdgeClick:u,reconnectRadius:d,onEdgeDoubleClick:f,onReconnectStart:p,onReconnectEnd:m,disableKeyboardA11y:h}){let{edgesFocusable:g,edgesReconnectable:_,elementsSelectable:v,onError:y}=FV(mW,jV),b=jU(t);return(0,Z.jsxs)(`div`,{className:`react-flow__edges`,children:[(0,Z.jsx)(RU,{defaultColor:e,rfId:n}),b.map(e=>(0,Z.jsx)(pW,{id:e,edgesFocusable:g,edgesReconnectable:_,elementsSelectable:v,noPanClassName:i,onReconnect:a,onContextMenu:o,onMouseEnter:s,onMouseMove:c,onMouseLeave:l,onClick:u,reconnectRadius:d,onDoubleClick:f,onReconnectStart:p,onReconnectEnd:m,rfId:n,onError:y,edgeTypes:r,disableKeyboardA11y:h},e))]})}hW.displayName=`EdgeRenderer`;var gW=(0,y.memo)(hW),_W=e=>`translate(${e[0]}px,${e[1]}px) scale(${e[2]})`;function vW({children:e}){let t=IV(),n=(0,y.useRef)(null),[r]=(0,y.useState)(()=>t.getState().transform);return DH(()=>{let e=null,r=()=>{let r=t.getState().transform;e&&r[0]===e[0]&&r[1]===e[1]&&r[2]===e[2]||(e=r,n.current&&(n.current.style.transform=_W(r)))};return r(),t.subscribe(r)},[t]),(0,Z.jsx)(`div`,{ref:n,className:`react-flow__viewport xyflow__viewport react-flow__container`,style:{transform:_W(r)},children:e})}function yW(e){let t=PH(),n=(0,y.useRef)(!1);(0,y.useEffect)(()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),n.current=!0)},[e,t.viewportInitialized])}var bW=e=>e.panZoom?.syncViewport;function xW(e){let t=FV(bW),n=IV();return(0,y.useEffect)(()=>{e&&(t?.(e),n.setState({transform:[e.x,e.y,e.zoom]}))},[e,t]),null}function SW(e){return e.connection.inProgress?{...e.connection,to:yz(e.connection.to,e.transform)}:{...e.connection}}function CW(e){return e?t=>e(SW(t)):SW}function wW(e){return FV(CW(e),jV)}var TW=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function EW({containerStyle:e,style:t,type:n,component:r}){let{nodesConnectable:i,width:a,height:o,isValid:s,inProgress:c}=FV(TW,jV);return a&&i&&c?(0,Z.jsx)(`svg`,{style:e,width:a,height:o,className:`react-flow__connectionline react-flow__container`,children:(0,Z.jsx)(`g`,{className:YM([`react-flow__connection`,Nz(s)]),children:(0,Z.jsx)(DW,{style:t,type:n,CustomComponent:r,isValid:s})})}):null}var DW=({style:e,type:t=BR.Bezier,CustomComponent:n,isValid:r})=>{let{inProgress:i,from:a,fromNode:o,fromHandle:s,fromPosition:c,to:l,toNode:u,toHandle:d,toPosition:f,pointer:p}=wW();if(!i)return;if(n)return(0,Z.jsx)(n,{connectionLineType:t,connectionLineStyle:e,fromNode:o,fromHandle:s,fromX:a.x,fromY:a.y,toX:l.x,toY:l.y,fromPosition:c,toPosition:f,connectionStatus:Nz(r),toNode:u,toHandle:d,pointer:p});let m=``,h={sourceX:a.x,sourceY:a.y,sourcePosition:c,targetX:l.x,targetY:l.y,targetPosition:f};switch(t){case BR.Bezier:[m]=Gz(h);break;case BR.SimpleBezier:[m]=UU(h);break;case BR.Step:[m]=iB({...h,borderRadius:0});break;case BR.SmoothStep:[m]=iB(h);break;default:[m]=Qz(h)}return(0,Z.jsx)(`path`,{d:m,fill:`none`,className:`react-flow__connection-path`,style:e})};DW.displayName=`ConnectionLine`;var OW={};function kW(e=OW){(0,y.useRef)(e),IV(),(0,y.useEffect)(()=>{},[e])}function AW(){IV(),(0,y.useRef)(!1),(0,y.useEffect)(()=>{},[])}function jW({nodeTypes:e,edgeTypes:t,onInit:n,onNodeClick:r,onEdgeClick:i,onNodeDoubleClick:a,onEdgeDoubleClick:o,onNodeMouseEnter:s,onNodeMouseMove:c,onNodeMouseLeave:l,onNodeContextMenu:u,onSelectionContextMenu:d,onSelectionStart:f,onSelectionEnd:p,connectionLineType:m,connectionLineStyle:h,connectionLineComponent:g,connectionLineContainerStyle:_,selectionKeyCode:v,selectionOnDrag:y,selectionMode:b,multiSelectionKeyCode:x,panActivationKeyCode:S,zoomActivationKeyCode:C,deleteKeyCode:w,onlyRenderVisibleElements:T,elementsSelectable:E,defaultViewport:D,translateExtent:ee,minZoom:O,maxZoom:k,preventScrolling:A,defaultMarkerColor:te,zoomOnScroll:ne,zoomOnPinch:re,panOnScroll:ie,panOnScrollSpeed:ae,panOnScrollMode:oe,zoomOnDoubleClick:se,panOnDrag:ce,autoPanOnSelection:j,onPaneClick:le,onPaneMouseEnter:ue,onPaneMouseMove:de,onPaneMouseLeave:fe,onPaneScroll:pe,onPaneContextMenu:me,paneClickDistance:he,nodeClickDistance:ge,onEdgeContextMenu:_e,onEdgeMouseEnter:ve,onEdgeMouseMove:M,onEdgeMouseLeave:N,reconnectRadius:ye,onReconnect:be,onReconnectStart:P,onReconnectEnd:xe,noDragClassName:Se,noWheelClassName:Ce,noPanClassName:we,disableKeyboardA11y:Te,nodeExtent:Ee,rfId:De,viewport:Oe,onViewportChange:ke,nodesDraggable:Ae}){return kW(e),kW(t),AW(),yW(n),xW(Oe),(0,Z.jsx)(bU,{onPaneClick:le,onPaneMouseEnter:ue,onPaneMouseMove:de,onPaneMouseLeave:fe,onPaneContextMenu:me,onPaneScroll:pe,paneClickDistance:he,deleteKeyCode:w,selectionKeyCode:v,selectionOnDrag:y,selectionMode:b,onSelectionStart:f,onSelectionEnd:p,multiSelectionKeyCode:x,panActivationKeyCode:S,zoomActivationKeyCode:C,elementsSelectable:E,zoomOnScroll:ne,zoomOnPinch:re,zoomOnDoubleClick:se,panOnScroll:ie,panOnScrollSpeed:ae,panOnScrollMode:oe,panOnDrag:ce,autoPanOnSelection:j,defaultViewport:D,translateExtent:ee,minZoom:O,maxZoom:k,onSelectionContextMenu:d,preventScrolling:A,noDragClassName:Se,noWheelClassName:Ce,noPanClassName:we,disableKeyboardA11y:Te,onViewportChange:ke,isControlledViewport:!!Oe,children:(0,Z.jsxs)(vW,{children:[(0,Z.jsx)(gW,{edgeTypes:t,onEdgeClick:i,onEdgeDoubleClick:o,onReconnect:be,onReconnectStart:P,onReconnectEnd:xe,onlyRenderVisibleElements:T,onEdgeContextMenu:_e,onEdgeMouseEnter:ve,onEdgeMouseMove:M,onEdgeMouseLeave:N,reconnectRadius:ye,defaultMarkerColor:te,noPanClassName:we,disableKeyboardA11y:Te,rfId:De}),(0,Z.jsx)(EW,{style:h,type:m,component:g,containerStyle:_}),(0,Z.jsx)(`div`,{className:`react-flow__edgelabel-renderer`}),(0,Z.jsx)(AU,{nodeTypes:e,onNodeClick:r,onNodeDoubleClick:a,onNodeMouseEnter:s,onNodeMouseMove:c,onNodeMouseLeave:l,onNodeContextMenu:u,nodeClickDistance:ge,onlyRenderVisibleElements:T,noPanClassName:we,noDragClassName:Se,disableKeyboardA11y:Te,nodeExtent:Ee,rfId:De,nodesDraggable:Ae}),(0,Z.jsx)(`div`,{className:`react-flow__viewport-portal`})]})})}jW.displayName=`GraphView`;var MW=(0,y.memo)(jW),NW=_z(`React Flow`,`https://reactflow.dev/`),PW=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:i,height:a,fitView:o,fitViewOptions:s,minZoom:c=.5,maxZoom:l=2,nodeOrigin:u,nodeExtent:d,zIndexMode:f=`basic`}={})=>{let p=new Map,m=new Map,h=new Map,g=new Map,_=r??t??[],v=n??e??[],y=u??[0,0],b=d??NR;kB(h,g,_);let{nodesInitialized:x}=bB(v,p,m,{nodeOrigin:y,nodeExtent:b,zIndexMode:f}),S=[0,0,1];if(o&&i&&a){let{x:e,y:t,zoom:n}=wz(YR(p,{filter:e=>!(!e.width&&!e.initialWidth||!e.height&&!e.initialHeight)}),i,a,c,l,s?.padding??.1);S=[e,t,n]}return{rfId:`1`,width:i??0,height:a??0,transform:S,nodes:v,nodesInitialized:x,nodeLookup:p,parentLookup:m,edges:_,edgeLookup:g,connectionLookup:h,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:n!==void 0,hasDefaultEdges:r!==void 0,panZoom:null,minZoom:c,maxZoom:l,translateExtent:NR,nodeExtent:b,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:IR.Strict,domNode:null,paneDragging:!1,noPanClassName:`nopan`,nodeOrigin:y,nodeDragThreshold:1,connectionDragThreshold:1,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesReconnectable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,elevateEdgesOnSelect:!0,selectNodesOnDrag:!0,multiSelectionActive:!1,fitViewQueued:o??!1,fitViewOptions:s,fitViewResolver:null,connection:{...zR},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:``,autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:NW,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:`react`,debug:!1,ariaLabelConfig:FR,zIndexMode:f,defaultEdgeOptions:void 0,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map,onNodesDelete:void 0,onEdgesDelete:void 0,onDelete:void 0,onBeforeDelete:void 0,onViewportChangeStart:void 0,onViewportChange:void 0,onViewportChangeEnd:void 0,onNodeDragStart:void 0,onNodeDrag:void 0,onNodeDragStop:void 0,onSelectionDragStart:void 0,onSelectionDrag:void 0,onSelectionDragStop:void 0,onMoveStart:void 0,onMove:void 0,onMoveEnd:void 0,onConnect:void 0,onConnectStart:void 0,onConnectEnd:void 0,onClickConnectStart:void 0,onClickConnectEnd:void 0}},FW=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:i,height:a,fitView:o,fitViewOptions:s,minZoom:c,maxZoom:l,nodeOrigin:u,nodeExtent:d,zIndexMode:f})=>AV((p,m)=>{async function h(){let{nodeLookup:e,panZoom:t,fitViewOptions:n,fitViewResolver:r,width:i,height:a,minZoom:o,maxZoom:s}=m();t&&(await $R({nodes:e,width:i,height:a,panZoom:t,minZoom:o,maxZoom:s},n),r?.resolve(!0),p({fitViewResolver:null}))}return{...PW({nodes:e,edges:t,width:i,height:a,fitView:o,fitViewOptions:s,minZoom:c,maxZoom:l,nodeOrigin:u,nodeExtent:d,defaultNodes:n,defaultEdges:r,zIndexMode:f}),setNodes:e=>{let{nodeLookup:t,parentLookup:n,nodeOrigin:r,nodeExtent:i,elevateNodesOnSelect:a,fitViewQueued:o,zIndexMode:s,nodesSelectionActive:c}=m(),{nodesInitialized:l,hasSelectedNodes:u}=bB(e,t,n,{nodeOrigin:r,nodeExtent:i,elevateNodesOnSelect:a,checkEquality:!0,zIndexMode:s}),d=c&&u;o&&l?(h(),p({nodes:e,nodesInitialized:l,fitViewQueued:!1,fitViewOptions:void 0,nodesSelectionActive:d})):p({nodes:e,nodesInitialized:l,nodesSelectionActive:d})},setEdges:e=>{let{connectionLookup:t,edgeLookup:n}=m();kB(t,n,e),p({edges:e})},setDefaultNodesAndEdges:(e,t)=>{if(e){let{setNodes:t}=m();t(e),p({hasDefaultNodes:!0})}if(t){let{setEdges:e}=m();e(t),p({hasDefaultEdges:!0})}},updateNodeInternals:e=>{let{triggerNodeChanges:t,nodeLookup:n,parentLookup:r,domNode:i,nodeOrigin:a,nodeExtent:o,debug:s,fitViewQueued:c,zIndexMode:l}=m(),{changes:u,updatedInternals:d}=EB(e,n,r,i,a,o,l);d&&(_B(n,r,{nodeOrigin:a,nodeExtent:o,zIndexMode:l}),c?(h(),p({fitViewQueued:!1,fitViewOptions:void 0})):p({}),u?.length>0&&(s&&console.log(`React Flow: trigger node changes`,u),t?.(u)))},updateNodePositions:(e,t=!1)=>{let n=[],r=[],{nodeLookup:i,triggerNodeChanges:a,connection:o,updateConnection:s,onNodesChangeMiddlewareMap:c}=m();for(let[a,c]of e){let e=i.get(a),l=!!(e?.expandParent&&e?.parentId&&c?.position),u={id:a,type:`position`,position:l?{x:Math.max(0,c.position.x),y:Math.max(0,c.position.y)}:c.position,dragging:t};if(e&&o.inProgress&&o.fromNode.id===e.id){let t=cB(e,o.fromHandle,HR.Left,!0);s({...o,from:t})}l&&e.parentId&&n.push({id:a,parentId:e.parentId,rect:{...c.internals.positionAbsolute,width:c.measured.width??0,height:c.measured.height??0}}),r.push(u)}if(n.length>0){let{parentLookup:e,nodeOrigin:t}=m(),a=TB(n,i,e,t);r.push(...a)}for(let e of c.values())r=e(r);a(r)},triggerNodeChanges:e=>{let{onNodesChange:t,setNodes:n,nodes:r,hasDefaultNodes:i,debug:a}=m();e?.length&&(i&&n(gH(e,r)),a&&console.log(`React Flow: trigger node changes`,e),t?.(e))},triggerEdgeChanges:e=>{let{onEdgesChange:t,setEdges:n,edges:r,hasDefaultEdges:i,debug:a}=m();e?.length&&(i&&n(_H(e,r)),a&&console.log(`React Flow: trigger edge changes`,e),t?.(e))},addSelectedNodes:e=>{let{multiSelectionActive:t,edgeLookup:n,nodeLookup:r,triggerNodeChanges:i,triggerEdgeChanges:a}=m();if(t){i(e.map(e=>vH(e,!0)));return}i(yH(r,new Set([...e]),!0)),a(yH(n))},addSelectedEdges:e=>{let{multiSelectionActive:t,edgeLookup:n,nodeLookup:r,triggerNodeChanges:i,triggerEdgeChanges:a}=m();if(t){a(e.map(e=>vH(e,!0)));return}a(yH(n,new Set([...e]))),i(yH(r,new Set,!0))},unselectNodesAndEdges:({nodes:e,edges:t}={})=>{let{edges:n,nodes:r,nodeLookup:i,triggerNodeChanges:a,triggerEdgeChanges:o}=m(),s=e||r,c=t||n,l=[];for(let e of s){if(!e.selected)continue;let t=i.get(e.id);t&&(t.selected=!1),l.push(vH(e.id,!1))}let u=[];for(let e of c)e.selected&&u.push(vH(e.id,!1));a(l),o(u)},setMinZoom:e=>{let{panZoom:t,maxZoom:n}=m();t?.setScaleExtent([e,n]),p({minZoom:e})},setMaxZoom:e=>{let{panZoom:t,minZoom:n}=m();t?.setScaleExtent([n,e]),p({maxZoom:e})},setTranslateExtent:e=>{m().panZoom?.setTranslateExtent(e),p({translateExtent:e})},resetSelectedElements:()=>{let{edges:e,nodes:t,triggerNodeChanges:n,triggerEdgeChanges:r,elementsSelectable:i}=m();if(!i)return;let a=t.reduce((e,t)=>t.selected?[...e,vH(t.id,!1)]:e,[]),o=e.reduce((e,t)=>t.selected?[...e,vH(t.id,!1)]:e,[]);n(a),r(o)},setNodeExtent:e=>{let{nodes:t,nodeLookup:n,parentLookup:r,nodeOrigin:i,elevateNodesOnSelect:a,nodeExtent:o,zIndexMode:s}=m();(e[0][0]!==o[0][0]||e[0][1]!==o[0][1]||e[1][0]!==o[1][0]||e[1][1]!==o[1][1])&&(bB(t,n,r,{nodeOrigin:i,nodeExtent:e,elevateNodesOnSelect:a,checkEquality:!1,zIndexMode:s}),p({nodeExtent:e}))},panBy:e=>{let{transform:t,width:n,height:r,panZoom:i,translateExtent:a}=m();return DB({delta:e,panZoom:i,transform:t,translateExtent:a,width:n,height:r})},setCenter:async(e,t,n)=>{let{width:r,height:i,maxZoom:a,panZoom:o}=m();if(!o)return!1;let s=n?.zoom===void 0?a:n.zoom;return await o.setViewport({x:r/2-e*s,y:i/2-t*s,zoom:s},{duration:n?.duration,ease:n?.ease,interpolate:n?.interpolate}),!0},cancelConnection:()=>{p({connection:{...zR}})},updateConnection:e=>{p({connection:e})},reset:()=>p({...PW()})}},Object.is);function IW({initialNodes:e,initialEdges:t,defaultNodes:n,defaultEdges:r,initialWidth:i,initialHeight:a,initialMinZoom:o,initialMaxZoom:s,initialFitViewOptions:c,fitView:l,nodeOrigin:u,nodeExtent:d,zIndexMode:f,children:p}){let[m]=(0,y.useState)(()=>FW({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:i,height:a,fitView:l,minZoom:o,maxZoom:s,fitViewOptions:c,nodeOrigin:u,nodeExtent:d,zIndexMode:f}));return(0,Z.jsx)(NV,{value:m,children:(0,Z.jsx)(jH,{children:(0,Z.jsx)(nU,{children:p})})})}function LW({children:e,nodes:t,edges:n,defaultNodes:r,defaultEdges:i,width:a,height:o,fitView:s,fitViewOptions:c,minZoom:l,maxZoom:u,nodeOrigin:d,nodeExtent:f,zIndexMode:p}){return(0,y.useContext)(MV)?(0,Z.jsx)(Z.Fragment,{children:e}):(0,Z.jsx)(IW,{initialNodes:t,initialEdges:n,defaultNodes:r,defaultEdges:i,initialWidth:a,initialHeight:o,fitView:s,initialFitViewOptions:c,initialMinZoom:l,initialMaxZoom:u,nodeOrigin:d,nodeExtent:f,zIndexMode:p,children:e})}var RW={width:`100%`,height:`100%`,overflow:`hidden`,position:`relative`,zIndex:0};function zW({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,className:i,nodeTypes:a,edgeTypes:o,onNodeClick:s,onEdgeClick:c,onInit:l,onMove:u,onMoveStart:d,onMoveEnd:f,onConnect:p,onConnectStart:m,onConnectEnd:h,onClickConnectStart:g,onClickConnectEnd:_,onNodeMouseEnter:v,onNodeMouseMove:b,onNodeMouseLeave:x,onNodeContextMenu:S,onNodeDoubleClick:C,onNodeDragStart:w,onNodeDrag:T,onNodeDragStop:E,onNodesDelete:D,onEdgesDelete:ee,onDelete:O,onSelectionChange:k,onSelectionDragStart:A,onSelectionDrag:te,onSelectionDragStop:ne,onSelectionContextMenu:re,onSelectionStart:ie,onSelectionEnd:ae,onBeforeDelete:oe,connectionMode:se,connectionLineType:ce=BR.Bezier,connectionLineStyle:j,connectionLineComponent:le,connectionLineContainerStyle:ue,deleteKeyCode:de=`Backspace`,selectionKeyCode:fe=`Shift`,selectionOnDrag:pe=!1,selectionMode:me=RR.Full,panActivationKeyCode:he=`Space`,multiSelectionKeyCode:ge=Tz()?`Meta`:`Control`,zoomActivationKeyCode:_e=Tz()?`Meta`:`Control`,snapToGrid:ve,snapGrid:M,onlyRenderVisibleElements:N=!1,selectNodesOnDrag:ye,nodesDraggable:be,autoPanOnNodeFocus:P,nodesConnectable:xe,nodesFocusable:Se,nodeOrigin:Ce=tH,edgesFocusable:we,edgesReconnectable:Te,elementsSelectable:Ee=!0,defaultViewport:De=nH,minZoom:Oe=.5,maxZoom:ke=2,translateExtent:Ae=NR,preventScrolling:je=!0,nodeExtent:Me,defaultMarkerColor:Ne=`#b1b1b7`,zoomOnScroll:Pe=!0,zoomOnPinch:Fe=!0,panOnScroll:Ie=!1,panOnScrollSpeed:Le=.5,panOnScrollMode:Re=LR.Free,zoomOnDoubleClick:ze=!0,panOnDrag:Be=!0,onPaneClick:Ve,onPaneMouseEnter:He,onPaneMouseMove:Ue,onPaneMouseLeave:We,onPaneScroll:Ge,onPaneContextMenu:Ke,paneClickDistance:qe=1,nodeClickDistance:Je=0,children:Ye,onReconnect:Xe,onReconnectStart:Ze,onReconnectEnd:Qe,onEdgeContextMenu:$e,onEdgeDoubleClick:F,onEdgeMouseEnter:et,onEdgeMouseMove:tt,onEdgeMouseLeave:nt,reconnectRadius:rt=10,onNodesChange:it,onEdgesChange:at,noDragClassName:ot=`nodrag`,noWheelClassName:st=`nowheel`,noPanClassName:I=`nopan`,fitView:ct,fitViewOptions:lt,connectOnClick:ut,attributionPosition:dt,proOptions:ft,defaultEdgeOptions:pt,elevateNodesOnSelect:mt=!0,elevateEdgesOnSelect:ht=!1,disableKeyboardA11y:gt=!1,autoPanOnConnect:_t,autoPanOnNodeDrag:vt,autoPanOnSelection:yt=!0,autoPanSpeed:bt,connectionRadius:xt,isValidConnection:St,onError:Ct,style:wt,id:Tt,nodeDragThreshold:Et,connectionDragThreshold:Dt,viewport:Ot,onViewportChange:kt,width:At,height:jt,colorMode:Mt=`light`,debug:Nt,onScroll:Pt,ariaLabelConfig:Ft,zIndexMode:It=`basic`,...Lt},Rt){let zt=Tt||`1`,Bt=cH(Mt),Vt=(0,y.useCallback)(e=>{e.currentTarget.scrollTo({top:0,left:0,behavior:`instant`}),Pt?.(e)},[Pt]);return(0,Z.jsx)(`div`,{"data-testid":`rf__wrapper`,...Lt,onScroll:Vt,style:{...wt,...RW},ref:Rt,className:YM([`react-flow`,i,Bt]),id:Tt,role:`application`,children:(0,Z.jsxs)(LW,{nodes:e,edges:t,width:At,height:jt,fitView:ct,fitViewOptions:lt,minZoom:Oe,maxZoom:ke,nodeOrigin:Ce,nodeExtent:Me,zIndexMode:It,children:[(0,Z.jsx)(oH,{nodes:e,edges:t,defaultNodes:n,defaultEdges:r,onConnect:p,onConnectStart:m,onConnectEnd:h,onClickConnectStart:g,onClickConnectEnd:_,nodesDraggable:be,autoPanOnNodeFocus:P,nodesConnectable:xe,nodesFocusable:Se,edgesFocusable:we,edgesReconnectable:Te,elementsSelectable:Ee,elevateNodesOnSelect:mt,elevateEdgesOnSelect:ht,minZoom:Oe,maxZoom:ke,nodeExtent:Me,onNodesChange:it,onEdgesChange:at,snapToGrid:ve,snapGrid:M,connectionMode:se,translateExtent:Ae,connectOnClick:ut,defaultEdgeOptions:pt,fitView:ct,fitViewOptions:lt,onNodesDelete:D,onEdgesDelete:ee,onDelete:O,onNodeDragStart:w,onNodeDrag:T,onNodeDragStop:E,onSelectionDrag:te,onSelectionDragStart:A,onSelectionDragStop:ne,onMove:u,onMoveStart:d,onMoveEnd:f,noPanClassName:I,nodeOrigin:Ce,rfId:zt,autoPanOnConnect:_t,autoPanOnNodeDrag:vt,autoPanSpeed:bt,onError:Ct,connectionRadius:xt,isValidConnection:St,selectNodesOnDrag:ye,nodeDragThreshold:Et,connectionDragThreshold:Dt,onBeforeDelete:oe,debug:Nt,ariaLabelConfig:Ft,zIndexMode:It}),(0,Z.jsx)(MW,{onInit:l,onNodeClick:s,onEdgeClick:c,onNodeMouseEnter:v,onNodeMouseMove:b,onNodeMouseLeave:x,onNodeContextMenu:S,onNodeDoubleClick:C,nodeTypes:a,edgeTypes:o,connectionLineType:ce,connectionLineStyle:j,connectionLineComponent:le,connectionLineContainerStyle:ue,selectionKeyCode:fe,selectionOnDrag:pe,selectionMode:me,deleteKeyCode:de,multiSelectionKeyCode:ge,panActivationKeyCode:he,zoomActivationKeyCode:_e,onlyRenderVisibleElements:N,defaultViewport:De,translateExtent:Ae,minZoom:Oe,maxZoom:ke,preventScrolling:je,zoomOnScroll:Pe,zoomOnPinch:Fe,zoomOnDoubleClick:ze,panOnScroll:Ie,panOnScrollSpeed:Le,panOnScrollMode:Re,panOnDrag:Be,autoPanOnSelection:yt,onPaneClick:Ve,onPaneMouseEnter:He,onPaneMouseMove:Ue,onPaneMouseLeave:We,onPaneScroll:Ge,onPaneContextMenu:Ke,paneClickDistance:qe,nodeClickDistance:Je,onSelectionContextMenu:re,onSelectionStart:ie,onSelectionEnd:ae,onReconnect:Xe,onReconnectStart:Ze,onReconnectEnd:Qe,onEdgeContextMenu:$e,onEdgeDoubleClick:F,onEdgeMouseEnter:et,onEdgeMouseMove:tt,onEdgeMouseLeave:nt,reconnectRadius:rt,defaultMarkerColor:Ne,noDragClassName:ot,noWheelClassName:st,noPanClassName:I,rfId:zt,disableKeyboardA11y:gt,nodeExtent:Me,viewport:Ot,onViewportChange:kt,nodesDraggable:be}),(0,Z.jsx)(eH,{onSelectionChange:k}),Ye,(0,Z.jsx)(JV,{proOptions:ft,position:dt}),(0,Z.jsx)(GV,{rfId:zt,disableKeyboardA11y:gt})]})})}var BW=EH(zW);MR.error014();function VW({dimensions:e,lineWidth:t,variant:n,className:r}){return(0,Z.jsx)(`path`,{strokeWidth:t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:YM([`react-flow__background-pattern`,n,r])})}function HW({radius:e,className:t}){return(0,Z.jsx)(`circle`,{cx:e,cy:e,r:e,className:YM([`react-flow__background-pattern`,`dots`,t])})}var UW;(function(e){e.Lines=`lines`,e.Dots=`dots`,e.Cross=`cross`})(UW||={});var WW={[UW.Dots]:1,[UW.Lines]:1,[UW.Cross]:6},GW=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function KW({id:e,variant:t=UW.Dots,gap:n=20,size:r,lineWidth:i=1,offset:a=0,color:o,bgColor:s,style:c,className:l,patternClassName:u}){let d=(0,y.useRef)(null),{transform:f,patternId:p}=FV(GW,jV),m=r||WW[t],h=t===UW.Dots,g=t===UW.Cross,_=Array.isArray(n)?n:[n,n],v=[_[0]*f[2]||1,_[1]*f[2]||1],b=m*f[2],x=Array.isArray(a)?a:[a,a],S=g?[b,b]:v,C=[x[0]*f[2]+S[0]/2,x[1]*f[2]+S[1]/2],w=`${p}${e||``}`;return(0,Z.jsxs)(`svg`,{className:YM([`react-flow__background`,l]),style:{...c,...zH,"--xy-background-color-props":s,"--xy-background-pattern-color-props":o},ref:d,"data-testid":`rf__background`,children:[(0,Z.jsx)(`pattern`,{id:w,x:f[0]%v[0],y:f[1]%v[1],width:v[0],height:v[1],patternUnits:`userSpaceOnUse`,patternTransform:`translate(-${C[0]},-${C[1]})`,children:h?(0,Z.jsx)(HW,{radius:b/2,className:u}):(0,Z.jsx)(VW,{dimensions:S,lineWidth:i,variant:t,className:u})}),(0,Z.jsx)(`rect`,{x:`0`,y:`0`,width:`100%`,height:`100%`,fill:`url(#${w})`})]})}KW.displayName=`Background`,(0,y.memo)(KW);function qW(){return(0,Z.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 32 32`,children:(0,Z.jsx)(`path`,{d:`M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z`})})}function JW(){return(0,Z.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 32 5`,children:(0,Z.jsx)(`path`,{d:`M0 0h32v4.2H0z`})})}function YW(){return(0,Z.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 32 30`,children:(0,Z.jsx)(`path`,{d:`M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z`})})}function XW(){return(0,Z.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 25 32`,children:(0,Z.jsx)(`path`,{d:`M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z`})})}function ZW(){return(0,Z.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 25 32`,children:(0,Z.jsx)(`path`,{d:`M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z`})})}function QW({children:e,className:t,...n}){return(0,Z.jsx)(`button`,{type:`button`,className:YM([`react-flow__controls-button`,t]),...n,children:e})}var $W=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function eG({style:e,showZoom:t=!0,showFitView:n=!0,showInteractive:r=!0,fitViewOptions:i,onZoomIn:a,onZoomOut:o,onFitView:s,onInteractiveChange:c,className:l,children:u,position:d=`bottom-left`,orientation:f=`vertical`,"aria-label":p}){let m=IV(),{isInteractive:h,minZoomReached:g,maxZoomReached:_,ariaLabelConfig:v}=FV($W,jV),{zoomIn:y,zoomOut:b,fitView:x}=PH();return(0,Z.jsxs)(KV,{className:YM([`react-flow__controls`,f===`horizontal`?`horizontal`:`vertical`,l]),position:d,style:e,"data-testid":`rf__controls`,"aria-label":p??v[`controls.ariaLabel`],children:[t&&(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(QW,{onClick:()=>{y(),a?.()},className:`react-flow__controls-zoomin`,title:v[`controls.zoomIn.ariaLabel`],"aria-label":v[`controls.zoomIn.ariaLabel`],disabled:_,children:(0,Z.jsx)(qW,{})}),(0,Z.jsx)(QW,{onClick:()=>{b(),o?.()},className:`react-flow__controls-zoomout`,title:v[`controls.zoomOut.ariaLabel`],"aria-label":v[`controls.zoomOut.ariaLabel`],disabled:g,children:(0,Z.jsx)(JW,{})})]}),n&&(0,Z.jsx)(QW,{className:`react-flow__controls-fitview`,onClick:()=>{x(i),s?.()},title:v[`controls.fitView.ariaLabel`],"aria-label":v[`controls.fitView.ariaLabel`],children:(0,Z.jsx)(YW,{})}),r&&(0,Z.jsx)(QW,{className:`react-flow__controls-interactive`,onClick:()=>{m.setState({nodesDraggable:!h,nodesConnectable:!h,elementsSelectable:!h}),c?.(!h)},title:v[`controls.interactive.ariaLabel`],"aria-label":v[`controls.interactive.ariaLabel`],children:h?(0,Z.jsx)(ZW,{}):(0,Z.jsx)(XW,{})}),u]})}eG.displayName=`Controls`,(0,y.memo)(eG);function tG({id:e,x:t,y:n,width:r,height:i,style:a,color:o,strokeColor:s,strokeWidth:c,className:l,borderRadius:u,shapeRendering:d,selected:f,onClick:p}){let{background:m,backgroundColor:h}=a||{},g=o||m||h;return(0,Z.jsx)(`rect`,{className:YM([`react-flow__minimap-node`,{selected:f},l]),x:t,y:n,rx:u,ry:u,width:r,height:i,style:{fill:g,stroke:s,strokeWidth:c},shapeRendering:d,onClick:p?t=>p(t,e):void 0})}var nG=(0,y.memo)(tG),rG=e=>e.nodes.map(e=>e.id),iG=e=>e instanceof Function?e:()=>e;function aG({nodeStrokeColor:e,nodeColor:t,nodeClassName:n=``,nodeBorderRadius:r=5,nodeStrokeWidth:i,nodeComponent:a=nG,onClick:o}){let s=FV(rG,jV),c=iG(t),l=iG(e),u=iG(n),d=typeof window>`u`||window.chrome?`crispEdges`:`geometricPrecision`;return(0,Z.jsx)(Z.Fragment,{children:s.map(e=>(0,Z.jsx)(sG,{id:e,nodeColorFunc:c,nodeStrokeColorFunc:l,nodeClassNameFunc:u,nodeBorderRadius:r,nodeStrokeWidth:i,NodeComponent:a,onClick:o,shapeRendering:d},e))})}function oG({id:e,nodeColorFunc:t,nodeStrokeColorFunc:n,nodeClassNameFunc:r,nodeBorderRadius:i,nodeStrokeWidth:a,shapeRendering:o,NodeComponent:s,onClick:c}){let{node:l,x:u,y:d,width:f,height:p}=FV(t=>{let n=t.nodeLookup.get(e);if(!n)return{node:void 0,x:0,y:0,width:0,height:0};let r=n.internals.userNode,{x:i,y:a}=n.internals.positionAbsolute,{width:o,height:s}=Dz(r);return{node:r,x:i,y:a,width:o,height:s}},jV);return!l||l.hidden||!Oz(l)?null:(0,Z.jsx)(s,{x:u,y:d,width:f,height:p,style:l.style,selected:!!l.selected,className:r(l),color:t(l),borderRadius:i,strokeColor:n(l),strokeWidth:a,shapeRendering:o,onClick:c,id:l.id})}var sG=(0,y.memo)(oG),cG=(0,y.memo)(aG),lG=200,uG=150,dG=e=>!e.hidden,fG=e=>{let t={x:-e.transform[0]/e.transform[2],y:-e.transform[1]/e.transform[2],width:e.width/e.transform[2],height:e.height/e.transform[2]},n=!1;for(let t of e.nodeLookup.values())if(!t.hidden){n=!0;break}return{viewBB:t,boundingRect:n?fz(YR(e.nodeLookup,{filter:dG}),t):t,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}},pG=(e,t)=>e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height,mG=(e,t)=>pG(e.viewBB,t.viewBB)&&pG(e.boundingRect,t.boundingRect)&&e.rfId===t.rfId&&e.panZoom===t.panZoom&&e.translateExtent===t.translateExtent&&e.flowWidth===t.flowWidth&&e.flowHeight===t.flowHeight&&e.ariaLabelConfig===t.ariaLabelConfig,hG=`react-flow__minimap-desc`;function gG({style:e,className:t,nodeStrokeColor:n,nodeColor:r,nodeClassName:i=``,nodeBorderRadius:a=5,nodeStrokeWidth:o,nodeComponent:s,bgColor:c,maskColor:l,maskStrokeColor:u,maskStrokeWidth:d,position:f=`bottom-right`,onClick:p,onNodeClick:m,pannable:h=!1,zoomable:g=!1,ariaLabel:_,inversePan:v,zoomStep:b=1,offsetScale:x=5}){let S=IV(),C=(0,y.useRef)(null),{boundingRect:w,panZoom:T,viewBB:E,rfId:D,translateExtent:ee,flowWidth:O,flowHeight:k,ariaLabelConfig:A}=FV(fG,mG),te=e?.width??lG,ne=e?.height??uG,re=w.width/te,ie=w.height/ne,ae=Math.max(re,ie),oe=ae*te,se=ae*ne,ce=x*ae,j=w.x-(oe-w.width)/2-ce,le=w.y-(se-w.height)/2-ce,ue=oe+ce*2,de=se+ce*2,fe=`${hG}-${D}`,pe=(0,y.useRef)(0),me=(0,y.useRef)();pe.current=ae,(0,y.useEffect)(()=>{let e=S.getState().panZoom;if(C.current&&e)return me.current=KB({domNode:C.current,panZoom:e,getTransform:()=>S.getState().transform,getViewScale:()=>pe.current}),()=>{me.current?.destroy()}},[T]),(0,y.useEffect)(()=>{me.current?.update({translateExtent:ee,width:O,height:k,inversePan:v,pannable:h,zoomStep:b,zoomable:g})},[h,g,v,b,ee,O,k]);let he=p?e=>{let[t,n]=me.current?.pointer(e)||[0,0];p(e,{x:t,y:n})}:void 0,ge=(0,y.useCallback)((e,t)=>{let n=S.getState().nodeLookup.get(t).internals.userNode;m?.(e,n)},[m]),_e=m?ge:void 0,ve=_??A[`minimap.ariaLabel`];return(0,Z.jsx)(KV,{position:f,style:{...e,"--xy-minimap-background-color-props":typeof c==`string`?c:void 0,"--xy-minimap-mask-background-color-props":typeof l==`string`?l:void 0,"--xy-minimap-mask-stroke-color-props":typeof u==`string`?u:void 0,"--xy-minimap-mask-stroke-width-props":typeof d==`number`?d*ae:void 0,"--xy-minimap-node-background-color-props":typeof r==`string`?r:void 0,"--xy-minimap-node-stroke-color-props":typeof n==`string`?n:void 0,"--xy-minimap-node-stroke-width-props":typeof o==`number`?o:void 0},className:YM([`react-flow__minimap`,t]),"data-testid":`rf__minimap`,children:(0,Z.jsxs)(`svg`,{width:te,height:ne,viewBox:`${j} ${le} ${ue} ${de}`,className:`react-flow__minimap-svg`,role:`img`,"aria-labelledby":fe,ref:C,onClick:he,children:[ve&&(0,Z.jsx)(`title`,{id:fe,children:ve}),(0,Z.jsx)(cG,{onClick:_e,nodeColor:r,nodeStrokeColor:n,nodeBorderRadius:a,nodeClassName:i,nodeStrokeWidth:o,nodeComponent:s}),(0,Z.jsx)(`path`,{className:`react-flow__minimap-mask`,d:`M${j-ce},${le-ce}h${ue+ce*2}v${de+ce*2}h${-ue-ce*2}z
741
+ M${E.x},${E.y}h${E.width}v${E.height}h${-E.width}z`,fillRule:`evenodd`,pointerEvents:`none`})]})})}gG.displayName=`MiniMap`,(0,y.memo)(gG);var _G=e=>t=>e?`${Math.max(1/t.transform[2],1)}`:void 0,vG={[sV.Line]:`right`,[sV.Handle]:`bottom-right`};function yG({nodeId:e,position:t,variant:n=sV.Handle,className:r,style:i=void 0,children:a,color:o,minWidth:s=10,minHeight:c=10,maxWidth:l=Number.MAX_VALUE,maxHeight:u=Number.MAX_VALUE,keepAspectRatio:d=!1,resizeDirection:f,autoScale:p=!0,shouldResize:m,onResizeStart:h,onResize:g,onResizeEnd:_}){let v=$H(),b=typeof e==`string`?e:v,x=IV(),S=(0,y.useRef)(null),C=n===sV.Handle,w=FV((0,y.useCallback)(_G(C&&p),[C,p]),jV),T=(0,y.useRef)(null),E=t??vG[n];(0,y.useEffect)(()=>{if(S.current&&b)return T.current||=vV({domNode:S.current,nodeId:b,getStoreItems:()=>{let{nodeLookup:e,transform:t,snapGrid:n,snapToGrid:r,nodeOrigin:i,domNode:a}=x.getState();return{nodeLookup:e,transform:t,snapGrid:n,snapToGrid:r,nodeOrigin:i,paneDomNode:a}},onChange:(e,t)=>{let{triggerNodeChanges:n,nodeLookup:r,parentLookup:i,nodeOrigin:a}=x.getState(),o=[],s={x:e.x,y:e.y},c=r.get(b);if(c&&c.expandParent&&c.parentId){let t=c.origin??a,n=e.width??c.measured.width??0,l=e.height??c.measured.height??0,u=TB([{id:c.id,parentId:c.parentId,rect:{width:n,height:l,...kz({x:e.x??c.position.x,y:e.y??c.position.y},{width:n,height:l},c.parentId,r,t)}}],r,i,a);o.push(...u),s.x=e.x?Math.max(t[0]*n,e.x):void 0,s.y=e.y?Math.max(t[1]*l,e.y):void 0}if(s.x!==void 0&&s.y!==void 0){let e={id:b,type:`position`,position:{...s}};o.push(e)}if(e.width!==void 0&&e.height!==void 0){let t={id:b,type:`dimensions`,resizing:!0,setAttributes:f?f===`horizontal`?`width`:`height`:!0,dimensions:{width:e.width,height:e.height}};o.push(t)}for(let e of t){let t={...e,type:`position`};o.push(t)}n(o)},onEnd:({width:e,height:t})=>{let n={id:b,type:`dimensions`,resizing:!1,dimensions:{width:e,height:t}};x.getState().triggerNodeChanges([n])}}),T.current.update({controlPosition:E,boundaries:{minWidth:s,minHeight:c,maxWidth:l,maxHeight:u},keepAspectRatio:d,resizeDirection:f,onResizeStart:h,onResize:g,onResizeEnd:_,shouldResize:m}),()=>{T.current?.destroy()}},[E,s,c,l,u,d,h,g,_,m]);let D=E.split(`-`);return(0,Z.jsx)(`div`,{className:YM([`react-flow__resize-control`,`nodrag`,...D,n,r]),ref:S,style:{...i,scale:w,...o&&{[C?`backgroundColor`:`borderColor`]:o}},children:a})}(0,y.memo)(yG);function bG(e){switch(e.type){case`page`:return X_;case`agent`:return i_;case`generate`:return e.asset===`image`?W_:e.asset===`video`?Qv:e.asset===`dashboard`?K_:O_;case`widget`:return Wg;case`review`:return w_;case`result`:return M_}return ey}var xG={page:`bg-cobalt-tint text-cobalt`,agent:`bg-ember-tint text-ember-strong`,generate:`bg-amber-tint text-ink-2`,widget:`bg-ember-veil text-ember-strong`,review:`bg-moss-tint text-moss`,result:`bg-paper-2 text-ink-2`};function SG(e){return Q(`type.${e.type}`)}var CG=[`web_search`,`web_fetch`,`browser`,`sandbox`,`image`,`http`];function wG(e){return CG.includes(e)?Q(`tool.${e}`):e}function TG(e){switch(e.type){case`page`:return e.fields.map(e=>e.label).join(` · `);case`agent`:{let t=e.tools.map(wG),n=e.mcp?.length?[`MCP: ${e.mcp.join(`, `)}`]:[];return[...t,...n].join(` · `)||e.instructions.slice(0,90)}case`generate`:{let t=[e.asset];return e.options?.aspectRatio&&t.push(e.options.aspectRatio),e.options?.duration&&t.push(`${e.options.duration}s`),e.options?.resolution&&t.push(e.options.resolution),e.options?.template&&t.push(e.options.template),t.join(` · `)}case`widget`:return[e.entry,Object.keys(e.data).join(`, `)].filter(Boolean).join(` · `);case`review`:return[e.edit?Q(`editor.reviewEditable`):null,e.regenerate?Q(`editor.reviewRedo`):null].filter(Boolean).join(` · `);case`result`:return e.deliverables.map(e=>`${e.label??e.from} (${e.formats.join(`, `)})`).join(` · `)}return``}var EG=280,DG=92;function OG({data:e}){let{step:t,selected:n,issue:r,active:i,pulse:a,cost:o,passed:s}=e,c=bG(t);return(0,Z.jsxs)(`div`,{className:$(`relative w-[280px] cursor-pointer rounded-xl bg-card px-4 py-3 text-left shadow-soft ring-1 transition`,n?`shadow-elevated ring-2 ring-ember`:i?`ring-2 ring-moss`:a?`ring-2 ring-ember/60`:`ring-border-soft hover:shadow-elevated`),children:[i?(0,Z.jsx)(`span`,{className:`-top-1 -right-1 absolute size-3 animate-breathe rounded-full bg-moss`}):a?(0,Z.jsx)(`span`,{className:`-top-1 -right-1 absolute size-3 animate-breathe rounded-full bg-ember`}):null,(0,Z.jsx)(sU,{type:`target`,position:HR.Top}),(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Z.jsx)(`span`,{className:$(`inline-flex size-6 items-center justify-center rounded-md`,xG[t.type]),children:(0,Z.jsx)(c,{className:`size-3.5`})}),(0,Z.jsx)(`span`,{className:`font-medium text-[11px] text-ink-3 uppercase tracking-[0.07em]`,children:SG(t)}),r?(0,Z.jsx)(u_,{className:`ml-auto size-4 text-rose`}):s&&!i?(0,Z.jsx)(c_,{className:`ml-auto size-4 text-moss`}):o===null?null:(0,Z.jsxs)(`span`,{className:`ml-auto text-[11px] text-ink-3 tabular-nums`,children:[`≈`,` `,o<10?o.toLocaleString(void 0,{maximumFractionDigits:1}):Math.round(o),` `,`cr`]})]}),(0,Z.jsx)(`div`,{className:`mt-1.5 truncate font-display font-semibold text-[15px] text-ink`,children:t.title}),(0,Z.jsx)(`div`,{className:`truncate text-[12px] text-ink-3`,children:TG(t)||`\xA0`}),(0,Z.jsx)(sU,{type:`source`,position:HR.Bottom})]})}function kG({data:e}){return(0,Z.jsxs)(`div`,{className:$(`flex w-[280px] cursor-pointer items-center gap-3 rounded-full bg-paper-2 py-1.5 pr-5 pl-2 transition`,e.selected?`ring-2 ring-ember`:`hover:bg-paper-3`),children:[(0,Z.jsx)(ES,{kind:e.avatar,size:40,interactive:!1}),(0,Z.jsx)(`span`,{className:`truncate font-display font-semibold text-[15px]`,children:e.title}),(0,Z.jsx)(sU,{type:`source`,position:HR.Bottom})]})}function AG(e){let{data:t,sourceX:n,sourceY:r,targetX:i,targetY:a,sourcePosition:o,targetPosition:s}=e,c={label:e.label,labelStyle:e.labelStyle,labelBgStyle:e.labelBgStyle,labelBgPadding:e.labelBgPadding,labelBgBorderRadius:e.labelBgBorderRadius,style:e.style,markerEnd:e.markerEnd};if(!t?.points.length){let[e,t,l]=Gz({sourceX:n,sourceY:r,targetX:i,targetY:a,sourcePosition:o,targetPosition:s});return(0,Z.jsx)(VU,{path:e,labelX:t,labelY:l,...c})}let l=[{x:n,y:r},...t.points,{x:i,y:a}],u=l.map((e,t)=>{let n=l[t-1];if(!n)return`M ${e.x} ${e.y}`;let r=(n.y+e.y)/2;return`C ${n.x} ${r} ${e.x} ${r} ${e.x} ${e.y}`}).join(` `);return(0,Z.jsx)(VU,{path:u,labelX:t.labelX,labelY:t.labelY,...c})}var jG={step:OG,start:kG},MG={branch:AG},NG=34,PG={};function FG(e){let t=Array.isArray(e.when.value)?e.when.value.join(` / `):String(e.when.value??``);switch(e.when.op){case`equals`:return`${e.when.field} = ${t}`;case`notEquals`:return`${e.when.field} ≠ ${t}`;case`in`:return`${e.when.field} ∈ ${t}`;case`notEmpty`:return Q(`editor.whenFilled`,{field:e.when.field});case`empty`:return Q(`editor.whenEmpty`,{field:e.when.field})}}function IG(e,t,n,r,i,a,o){let s=new JM.graphlib.Graph;s.setGraph({rankdir:`TB`,nodesep:48,ranksep:46,marginx:20,marginy:20}),s.setDefaultEdgeLabel(()=>({})),s.setNode(`__start`,{width:EG,height:52});for(let t of e.steps)s.setNode(t.id,{width:EG,height:DG});let c=[],l={markerEnd:{type:VR.ArrowClosed,width:14,height:14,color:`var(--ink-4)`}};e.steps[0]&&(s.setEdge(`__start`,e.steps[0].id),c.push({id:`e-start`,source:`__start`,target:e.steps[0].id,...l})),e.steps.forEach((t,n)=>{let r=e.steps[n+1],i=new Map;for(let n of t.next??[])n.goto!==`end`&&e.steps.some(e=>e.id===n.goto)&&i.set(n.goto,[...i.get(n.goto)??[],FG(n)]);for(let[e,n]of i){let r=n.join(` · `),i=r.length>NG?`${r.slice(0,33)}…`:r;s.setEdge(t.id,e,{width:i.length*6.2+16,height:22,labelpos:`c`}),c.push({id:`b-${t.id}-${e}`,type:`branch`,source:t.id,target:e,label:i,labelStyle:{fontSize:11,fill:`var(--ink-2)`},labelBgStyle:{fill:`var(--paper-2)`},labelBgPadding:[6,3],labelBgBorderRadius:8,style:{strokeDasharray:`5 4`},...l})}r&&t.type!==`result`&&(s.hasEdge(t.id,r.id)||s.setEdge(t.id,r.id),c.push({id:`n-${t.id}`,source:t.id,target:r.id,...t.next?.length?{label:Q(`editor.otherwise`),labelStyle:{fontSize:11,fill:`var(--ink-3)`},labelBgStyle:{fill:`var(--background)`}}:{},...l}))}),JM.layout(s);for(let e of c){if(e.type!==`branch`)continue;let t=s.edge(e.source,e.target),n=(t.points??[]).slice(1,-1);n.length&&t.x!==void 0&&t.y!==void 0&&(e.data={points:n,labelX:t.x,labelY:t.y})}return{nodes:[{id:`__start`,type:`start`,position:{x:s.node(`__start`).x-EG/2,y:s.node(`__start`).y-26},data:{title:e.title,avatar:e.avatar,selected:t===`__wizard`},draggable:!1},...e.steps.map((e,c)=>{let l=s.node(e.id);return{id:e.id,type:`step`,position:{x:l.x-EG/2,y:l.y-DG/2},data:{step:e,selected:t===e.id,issue:n.has(e.id),index:c,active:r===e.id,pulse:i.includes(e.id),cost:a[e.id]?.credits??null,passed:o.has(e.id)},draggable:!1}})],edges:c}}function LG(){let e=PH(),t=`inline-flex size-8 items-center justify-center rounded-full text-ink-3 hover:bg-accent hover:text-ink`;return(0,Z.jsxs)(`div`,{className:`absolute bottom-4 left-4 z-10 flex items-center gap-0.5 rounded-full bg-card p-1 shadow-soft ring-1 ring-border-soft`,children:[(0,Z.jsx)(`button`,{type:`button`,className:t,onClick:()=>e.zoomOut(),"aria-label":`Zoom out`,children:(0,Z.jsx)(fv,{className:`size-4`})}),(0,Z.jsx)(`button`,{type:`button`,className:t,onClick:()=>e.fitView({padding:.2,duration:300}),"aria-label":`Fit`,children:(0,Z.jsx)(Av,{className:`size-4`})}),(0,Z.jsx)(`button`,{type:`button`,className:t,onClick:()=>e.zoomIn(),"aria-label":`Zoom in`,children:(0,Z.jsx)(Sv,{className:`size-4`})})]})}var RG=.8,zG=new Set;function BG({def:e,selected:t,onSelect:n,issueSteps:r,activeStep:i,pulse:a,costs:o=PG,passed:s=zG,minFitZoom:c=RG,fitKey:l}){let{nodes:u,edges:d}=(0,y.useMemo)(()=>IG(e,t,r,i,a??[],o,s),[e,t,r,i,a,o,s]),f=PH(),p=(0,y.useRef)(null),m=e.steps.map(e=>e.id).join(`|`);return(0,y.useEffect)(()=>{let e=requestAnimationFrame(()=>{let e=p.current;if(!e||!u.length)return;let t=u.map(e=>e.position.x),n=u.map(e=>e.position.y),r={x:Math.min(...t),y:Math.min(...n),width:Math.max(...t)+EG-Math.min(...t),height:Math.max(...n)+DG-Math.min(...n)},i=Math.min(e.clientWidth/(r.width*1.2),e.clientHeight/(r.height*1.15),1),a=Math.max(i,c),o=(e.clientWidth-r.width*a)/2-r.x*a,s=i>=c?(e.clientHeight-r.height*a)/2-r.y*a:24-r.y*a;f.setViewport({x:o,y:s,zoom:a},{duration:400})});return()=>cancelAnimationFrame(e)},[m,l,f]),(0,Z.jsx)(`div`,{ref:p,className:`h-full w-full`,children:(0,Z.jsx)(BW,{nodes:u,edges:d,nodeTypes:jG,edgeTypes:MG,onNodeClick:(e,t)=>n(t.id===`__start`?`__wizard`:t.id),onPaneClick:()=>n(null),nodesConnectable:!1,nodesDraggable:!1,elementsSelectable:!1,panOnScroll:!0,zoomOnScroll:!1,zoomOnPinch:!0,minZoom:.3,maxZoom:1.4,proOptions:{hideAttribution:!0},children:(0,Z.jsx)(LG,{})})})}function VG(e){return(0,Z.jsx)(IW,{children:(0,Z.jsx)(BG,{...e})})}var HG=`engenty/flow`,UG=new Set([`text`,`textarea`,`number`,`select`,`multiselect`,`date`,`email`,`url`,`toggle`,`color`,`location`]),WG=420,GG=600,KG=320,qG=new Set;function JG(e){if(e.structuredContent)return e.structuredContent;let t=e.content?.find(e=>e.type===`text`);try{return t&&`text`in t?JSON.parse(t.text):null}catch{return t&&`text`in t?t.text:null}}function YG(e){let t=JG(e);if(e.isError){let e=t&&typeof t==`object`&&`error`in t?String(t.error):String(t);throw Object.assign(Error(e),{body:t})}return t}function XG(e){e&&(e.theme&&document.documentElement.classList.toggle(`dark`,e.theme===`dark`),e.locale&&mb(e.locale.toLowerCase().startsWith(`de`)?`de`:`en`))}function ZG(){let e=(0,y.useMemo)(()=>new kg({name:`engenty-wizards-flow`,version:`1.0.0`},{},{autoResize:!0}),[]),[t,n]=(0,y.useState)(null),[r,i]=(0,y.useState)(null),[a,o]=(0,y.useState)(),[s,c]=(0,y.useState)(null),[l,u]=(0,y.useState)(`asking`);(0,y.useEffect)(()=>{e.ontoolresult=e=>{let t=e._meta?.[HG];t&&(n(t),i(t.run??null))},e.onhostcontextchanged=e=>{o(t=>({...t,...e})),XG(e)},e.connect().then(()=>{let t=e.getHostContext();o(t),XG(t)}).catch(e=>console.error(`[flow widget]`,e))},[e]);let d=(0,y.useCallback)(async(t,n)=>YG(await e.callServerTool({name:t,arguments:n})),[e]),f=(0,y.useCallback)(t=>{let n=t.outputs.map(e=>e.title).join(`, `),r=[`engenty wizards run ${t.runId}: ${t.status}${t.step?` at "${t.step.title}"`:``}.`,n?`Made so far: ${n}.`:``,t.status===`done`?`The person finished it in the widget; get_run has the outputs and download links.`:`The person answers this run in the widget; get_run has the details.`].filter(Boolean).join(` `);e.updateModelContext({content:[{type:`text`,text:r}]}).catch(()=>void 0)},[e]),p=(0,y.useRef)(``),m=(0,y.useCallback)(t=>{let n=t?`${t.status}:${t.step?.id??``}`:``;if(!t||n===p.current)return;p.current=n;let r=[`engenty wizards run ${t.id}: ${t.status}${t.step?` at "${t.step.title}"`:``}.`,t.status===`done`?`The person finished it in the widget; get_run has the outputs and download links.`:`The person answers this run in the widget; get_run has the details.`].join(` `);e.updateModelContext({content:[{type:`text`,text:r}]}).catch(()=>void 0)},[e]),h=(0,y.useRef)(null),g=(0,y.useRef)(``),_=(0,y.useCallback)(e=>{m(e);let t=e?`${e.status}:${e.step?.id??``}`:``;t!==g.current&&(g.current=t,h.current?.scrollTo({top:0}))},[m]),v=r?.runId,b=t?.runtime;(0,y.useEffect)(()=>{if(!v||!b){u(`no`);return}kS(b),u(`asking`);let e=!0;return fetch(AS(`/api/runs/${v}`),{credentials:`include`}).then(t=>e&&u(t.ok?`yes`:`no`)).catch(()=>e&&u(`no`)),()=>{e=!1}},[v,b]);let x=(0,y.useCallback)(async t=>{let r=await e.callServerTool({name:`run_wizard`,arguments:{wizardId:t}});YG(r);let a=r._meta?.[HG];a&&(n(a),i(a.run??null))},[e]),S=r?.status===`running`;(0,y.useEffect)(()=>{if(!v||!S||l!==`no`)return;let e=!0;return(async()=>{for(;e;)try{let t=await d(`get_run`,{runId:v,waitSeconds:20});if(!e)return;if(i(t),t.status!==`running`){f(t);return}}catch{await new Promise(e=>setTimeout(e,3e3))}})(),()=>{e=!1}},[v,S,l,d,f]);let C=(0,y.useMemo)(()=>new Set(r?.passed??[]),[r]),w=a?.displayMode===`fullscreen`,T=a?.availableDisplayModes?.includes(`fullscreen`),E=t=>{e.openLink({url:t}).catch(()=>window.open(t,`_blank`,`noopener`))};if(!t||r&&l===`asking`)return(0,Z.jsxs)(`div`,{className:`flex items-center justify-center gap-2 text-ink-3 text-sm`,style:{height:160},children:[(0,Z.jsx)(Lb,{className:`size-4`}),Q(`flowApp.loading`)]});if(r&&l===`yes`)return(0,Z.jsx)(`div`,{ref:h,className:`overflow-y-auto overscroll-contain bg-background text-ink`,style:{maxHeight:GG},children:(0,Z.jsx)(lk,{runId:r.runId,compact:!0,stickyProgress:!0,onView:_})});if(!r)return(0,Z.jsx)(QG,{view:t,onStart:()=>x(t.wizard.id)});let D=r&&r.status!==`done`?r.step?.id??null:null;return(0,Z.jsxs)(`div`,{className:$(`flex bg-background text-ink`,w?`h-screen flex-row`:`flex-col`),children:[(0,Z.jsx)(`div`,{className:$(`relative min-w-0`,w?`flex-1`:``),style:w?void 0:{height:KG},children:(0,Z.jsx)(VG,{def:t.definition,selected:s,onSelect:c,issueSteps:qG,activeStep:D,passed:C,minFitZoom:.45,fitKey:String(w)})}),(0,Z.jsxs)(`aside`,{className:$(`flex flex-col gap-3 border-border-soft bg-card p-4`,w?`w-[380px] overflow-y-auto border-l`:`border-t`),children:[(0,Z.jsxs)(`header`,{className:`flex flex-wrap items-center gap-2`,children:[(0,Z.jsx)(`span`,{className:`truncate font-display font-semibold text-[15px]`,children:t.wizard.title}),(0,Z.jsx)(zb,{children:t.wizard.shows===`published`?Q(`flowApp.published`):Q(`flowApp.draft`)}),t.wizard.issues?(0,Z.jsx)(`span`,{className:`text-[12px] text-rose`,children:Q(`flowApp.issues`,{n:t.wizard.issues})}):null,(0,Z.jsx)(`span`,{className:`ml-auto flex items-center gap-1`,children:T?(0,Z.jsxs)(Eb,{size:`sm`,variant:`ghost`,onClick:()=>e.requestDisplayMode({mode:w?`inline`:`fullscreen`}).then(({mode:e})=>o(t=>({...t,displayMode:e}))).catch(()=>void 0),children:[w?(0,Z.jsx)(uv,{className:`size-4`}):(0,Z.jsx)(ov,{className:`size-4`}),Q(w?`flowApp.inline`:`flowApp.fullscreen`)]}):null})]}),(0,Z.jsx)($G,{report:r,selected:s,call:d,onReport:e=>{i(e),f(e)},open:E})]})]})}function QG({view:e,onStart:t}){let[n,r]=(0,y.useState)(!1),[i,a]=(0,y.useState)(null),[o,s]=(0,y.useState)(!1),c=e.wizard.description??e.definition.description;return(0,Z.jsxs)(`div`,{className:`flex flex-col overflow-y-auto overscroll-contain bg-background text-ink`,style:{maxHeight:GG},children:[(0,Z.jsxs)(`div`,{className:`mx-auto flex max-w-lg flex-col items-center px-6 pt-6 pb-6 text-center`,children:[(0,Z.jsx)(ES,{kind:e.wizard.avatar??e.definition.avatar,size:120,fluffy:!0}),(0,Z.jsx)(`h1`,{className:`mt-2 text-balance font-display font-semibold text-[26px] leading-[1.1] tracking-tight`,children:e.wizard.title}),c?(0,Z.jsx)(`p`,{className:`mt-3 text-[15px] text-ink-2 leading-relaxed`,children:c}):null,e.wizard.published?(0,Z.jsxs)(Eb,{size:`lg`,className:`mt-8 min-w-48`,busy:n,onClick:async()=>{r(!0),a(null);try{await t()}catch(e){a(e.message),r(!1)}},children:[Q(`run.start`),` `,(0,Z.jsx)(Xg,{className:`size-4`})]}):(0,Z.jsx)(`p`,{className:`mt-8 rounded-xl bg-paper-2 px-5 py-4 text-[14px] text-ink-2`,children:Q(`flowApp.notPublished`)}),i?(0,Z.jsx)(`p`,{className:`mt-4 text-[14px] text-rose`,children:i}):null,(0,Z.jsxs)(Eb,{size:`sm`,variant:`ghost`,className:`mt-4`,onClick:()=>s(!o),children:[(0,Z.jsx)(ny,{className:`size-4`}),Q(`flowApp.flow`)]})]}),o?(0,Z.jsx)(`div`,{className:`relative border-border-soft border-t`,style:{height:WG},children:(0,Z.jsx)(VG,{def:e.definition,selected:null,onSelect:()=>void 0,issueSteps:qG,activeStep:null,minFitZoom:.45})}):null]})}function $G({report:e,selected:t,call:n,onReport:r,open:i}){let[a,o]=(0,y.useState)(!1),[s,c]=(0,y.useState)(null),l=async(t,i)=>{o(!0),c(null);try{r(await n(t,{runId:e.runId,...i}))}catch(e){c(e.message)}finally{o(!1)}},u=e.waitingFor,d=t?e.outputs.filter(e=>e.stepId===t):[],f=e.events.at(-1),p=e.browserUrl,m=p?()=>i(p):void 0,h=null;return e.status===`running`&&!(u&&`ask`in u)?h=(0,Z.jsxs)(`p`,{className:`flex items-center gap-2 text-[13px] text-ink-2`,children:[(0,Z.jsx)(Lb,{className:`size-4`}),f?.message||Q(`run.working`)]}):u&&`page`in u?h=(0,Z.jsx)(tK,{fields:u.fields,busy:a,onSubmit:e=>l(`answer_page`,{stepId:u.page,values:e,waitSeconds:3}),onBrowser:m},`${e.runId}-${u.page}`):u&&`review`in u?h=(0,Z.jsx)(rK,{outputs:e.outputs.filter(e=>u.show.includes(e.stepId)),targets:u.show,busy:a,onAccept:()=>l(`review_step`,{stepId:u.review,action:{type:`accept`}}),onRegenerate:(e,t)=>l(`review_step`,{stepId:u.review,action:{type:`regenerate`,target:e,note:t}}),open:i}):u&&`ask`in u?h=u.kind===`confirm`?(0,Z.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,Z.jsx)(`div`,{className:`font-medium text-[13px]`,children:Q(`flowApp.ask`)}),(0,Z.jsxs)(`p`,{className:`text-[13px] text-ink-2`,children:[u.reason,` — `,u.service,`: `,u.action]}),(0,Z.jsxs)(`div`,{className:`flex gap-2`,children:[(0,Z.jsx)(Eb,{size:`sm`,busy:a,onClick:()=>l(`answer_ask`,{askId:u.ask,answer:`allow`}),children:Q(`flowApp.allow`)}),(0,Z.jsx)(Eb,{size:`sm`,variant:`ghost`,disabled:a,onClick:()=>l(`answer_ask`,{askId:u.ask,answer:`skip`}),children:Q(`flowApp.skip`)})]})]}):(0,Z.jsxs)(`div`,{className:`flex flex-col items-start gap-2`,children:[(0,Z.jsx)(`p`,{className:`text-[13px] text-ink-2`,children:Q(`flowApp.signIn`,{site:u.site})}),m?(0,Z.jsxs)(Eb,{size:`sm`,onClick:m,children:[(0,Z.jsx)(S_,{className:`size-4`}),Q(`flowApp.runPage`)]}):null]}):e.status===`failed`?h=(0,Z.jsxs)(`div`,{className:`flex flex-col items-start gap-2`,children:[(0,Z.jsx)(`p`,{className:`text-[13px] text-rose`,children:e.error||Q(`run.failed`)}),(0,Z.jsx)(Eb,{size:`sm`,busy:a,onClick:()=>l(`control_run`,{action:`retry`}),children:Q(`run.retry`)})]}):e.status===`cancelled`?h=(0,Z.jsx)(`p`,{className:`text-[13px] text-ink-3`,children:Q(`run.cancelled`)}):e.status===`done`&&(h=(0,Z.jsx)(iK,{outputs:e.outputs,open:i})),(0,Z.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-2 text-[12px] text-ink-3`,children:[(0,Z.jsx)(`span`,{className:`font-medium text-ink-2`,children:e.status===`done`?Q(`flowApp.done`):e.step?.title}),(0,Z.jsxs)(`span`,{children:[`· `,Q(`flowApp.credits`,{n:e.credits})]}),(0,Z.jsxs)(`span`,{className:`ml-auto flex gap-1`,children:[e.status===`waiting_input`&&e.passed.length?(0,Z.jsxs)(Eb,{size:`sm`,variant:`ghost`,disabled:a,onClick:()=>l(`control_run`,{action:`back`}),children:[(0,Z.jsx)(Jv,{className:`size-4`}),Q(`run.back`)]}):null,m?(0,Z.jsxs)(Eb,{size:`sm`,variant:`ghost`,onClick:m,children:[(0,Z.jsx)(S_,{className:`size-4`}),Q(`flowApp.runPage`)]}):null]})]}),h,s?(0,Z.jsx)(`p`,{className:`text-[13px] text-rose`,children:Q(`flowApp.failed`,{error:s})}):null,d.length&&e.status!==`done`?(0,Z.jsx)(iK,{outputs:d,open:i}):null]})}function eK(e){return e.value??e.default??(e.kind===`multiselect`?[]:e.kind!==`toggle`&&``)}function tK({fields:e,busy:t,onSubmit:n,onBrowser:r}){let i=e.filter(e=>UG.has(e.kind)),a=e.filter(e=>!UG.has(e.kind)),[o,s]=(0,y.useState)(()=>Object.fromEntries(i.map(e=>[e.id,eK(e)]))),c=(e,t)=>s(n=>({...n,[e]:t})),l=i.some(e=>{let t=o[e.id];return e.required&&(t===``||t===void 0||Array.isArray(t)&&!t.length)});return a.some(e=>e.required)?(0,Z.jsxs)(`div`,{className:`flex flex-col items-start gap-2`,children:[(0,Z.jsx)(`p`,{className:`text-[13px] text-ink-2`,children:Q(`flowApp.inBrowser`,{fields:a.map(e=>e.label).join(`, `)})}),r?(0,Z.jsxs)(Eb,{size:`sm`,onClick:r,children:[(0,Z.jsx)(S_,{className:`size-4`}),Q(`flowApp.runPage`)]}):null]}):(0,Z.jsxs)(`form`,{className:`flex flex-col gap-3`,onSubmit:e=>{e.preventDefault();let t={};for(let e of i){let n=o[e.id];n!==``&&n!==void 0&&(t[e.id]=e.kind===`number`?Number(n):e.kind===`location`?{label:String(n)}:n)}n(t)},children:[i.map(e=>(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(Ib,{required:e.required,hint:e.help,children:e.label}),(0,Z.jsx)(`div`,{className:`mt-1.5`,children:(0,Z.jsx)(nK,{field:e,value:o[e.id],onChange:t=>c(e.id,t)})})]},e.id)),(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Z.jsx)(Eb,{type:`submit`,busy:t,disabled:l,children:Q(`run.next`)}),a.length?(0,Z.jsx)(`span`,{className:`text-[12px] text-ink-3`,children:Q(`flowApp.inBrowser`,{fields:a.map(e=>e.label).join(`, `)})}):null]})]})}function nK({field:e,value:t,onChange:n}){let r=typeof t==`string`||typeof t==`number`?String(t):``;switch(e.kind){case`textarea`:return(0,Z.jsx)(Mb,{value:r,rows:4,placeholder:e.placeholder,onChange:e=>n(e.target.value)});case`select`:return(0,Z.jsx)(Nb,{value:r,onChange:n,placeholder:``,options:(e.options??[]).map(e=>({value:e,label:e}))});case`multiselect`:return(0,Z.jsx)(Pb,{multi:!0,value:Array.isArray(t)?t:[],onChange:n,options:e.options??[]});case`toggle`:return(0,Z.jsx)(Fb,{checked:t===!0,onChange:n});case`location`:return(0,Z.jsx)(Ab,{value:t&&typeof t==`object`&&`label`in t?String(t.label??``):r,placeholder:e.placeholder,onChange:e=>n(e.target.value)});default:return(0,Z.jsx)(Ab,{type:e.kind===`number`?`number`:e.kind===`date`?`date`:e.kind===`email`?`email`:e.kind===`url`?`url`:e.kind===`color`?`color`:`text`,value:r,placeholder:e.placeholder,onChange:e=>n(e.target.value)})}}function rK({outputs:e,targets:t,busy:n,onAccept:r,onRegenerate:i,open:a}){let[o,s]=(0,y.useState)(``),[c,l]=(0,y.useState)(t[0]??``);return(0,Z.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,Z.jsx)(iK,{outputs:e,open:a}),(0,Z.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[t.length>1?(0,Z.jsx)(Nb,{value:c,onChange:l,options:e.map(e=>({value:e.stepId,label:e.title}))}):null,(0,Z.jsx)(Mb,{rows:2,value:o,placeholder:Q(`run.regenerateNote`),onChange:e=>s(e.target.value)}),(0,Z.jsxs)(`div`,{className:`flex gap-2`,children:[(0,Z.jsx)(Eb,{busy:n,onClick:r,children:Q(`run.accept`)}),(0,Z.jsx)(Eb,{variant:`ghost`,disabled:n||!o.trim()||!c,onClick:()=>i(c,o.trim()),children:Q(`run.regenerateGo`)})]})]})]})}function iK({outputs:e,open:t}){return(0,Z.jsx)(`div`,{className:`flex flex-col gap-3`,children:e.map(e=>(0,Z.jsxs)(`section`,{className:`rounded-xl bg-paper-2 p-3`,children:[(0,Z.jsx)(`div`,{className:`mb-1.5 font-medium text-[13px] text-ink-2`,children:e.title}),e.text?(0,Z.jsx)(_E,{text:e.text,className:`text-[13px]`}):null,e.assets.filter(e=>e.mime.startsWith(`image/`)).map(e=>(0,Z.jsx)(`img`,{src:e.url,alt:e.name,className:`mt-2 max-h-64 rounded-lg`},e.url)),Object.keys(e.downloads).length?(0,Z.jsx)(`div`,{className:`mt-2 flex flex-wrap gap-1`,children:Object.entries(e.downloads).map(([e,n])=>(0,Z.jsxs)(Eb,{size:`sm`,variant:`secondary`,onClick:()=>t(n),children:[(0,Z.jsx)(v_,{className:`size-4`}),e.toUpperCase()]},e))}):null]},e.stepId))})}(0,b.createRoot)(document.getElementById(`root`)).render((0,Z.jsx)(y.StrictMode,{children:(0,Z.jsx)(ZG,{})}));</script>
742
+ <style rel="stylesheet" crossorigin>@import "https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700&family=Geist+Mono:wght@400;500&family=Space+Grotesk:wght@400;500;600;700&display=swap";@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial;--tw-content:""}}}.react-flow{--xy-edge-stroke-default:#b1b1b7;--xy-edge-stroke-width-default:1;--xy-edge-stroke-selected-default:#555;--xy-connectionline-stroke-default:#b1b1b7;--xy-connectionline-stroke-width-default:1;--xy-attribution-background-color-default:#ffffff80;--xy-minimap-background-color-default:#fff;--xy-minimap-mask-background-color-default:#f0f0f099;--xy-minimap-mask-stroke-color-default:transparent;--xy-minimap-mask-stroke-width-default:1;--xy-minimap-node-background-color-default:#e2e2e2;--xy-minimap-node-stroke-color-default:transparent;--xy-minimap-node-stroke-width-default:2;--xy-background-color-default:transparent;--xy-background-pattern-dots-color-default:#91919a;--xy-background-pattern-lines-color-default:#eee;--xy-background-pattern-cross-color-default:#e2e2e2;background-color:var(--xy-background-color,var(--xy-background-color-default));--xy-node-border-default:1px solid #bbb;--xy-node-border-selected-default:1px solid #555;--xy-handle-background-color-default:#333;--xy-selection-background-color-default:#9696b41a;--xy-selection-border-default:1px dotted #9b9b9bcc;--xy-resize-background-color-default:#3367d9;direction:ltr}.react-flow.dark{--xy-edge-stroke-default:#3e3e3e;--xy-edge-stroke-width-default:1;--xy-edge-stroke-selected-default:#727272;--xy-connectionline-stroke-default:#b1b1b7;--xy-connectionline-stroke-width-default:1;--xy-attribution-background-color-default:#96969640;--xy-minimap-background-color-default:#141414;--xy-minimap-mask-background-color-default:#3c3c3c99;--xy-minimap-mask-stroke-color-default:transparent;--xy-minimap-mask-stroke-width-default:1;--xy-minimap-node-background-color-default:#2b2b2b;--xy-minimap-node-stroke-color-default:transparent;--xy-minimap-node-stroke-width-default:2;--xy-background-color-default:#141414;--xy-background-pattern-dots-color-default:#555;--xy-background-pattern-lines-color-default:#333;--xy-background-pattern-cross-color-default:#333;--xy-node-color-default:#f8f8f8}.react-flow__background{background-color:var(--xy-background-color-props,var(--xy-background-color,var(--xy-background-color-default)));pointer-events:none;z-index:-1}.react-flow__container{width:100%;height:100%;position:absolute;top:0;left:0}.react-flow__pane{z-index:1;touch-action:none}.react-flow__pane.draggable{cursor:grab}.react-flow__pane.dragging{cursor:grabbing}.react-flow__pane.selection{cursor:pointer}.react-flow__viewport{transform-origin:0 0;z-index:2;pointer-events:none}.react-flow__renderer{z-index:4}.react-flow__selection{z-index:6}.react-flow__nodesselection-rect:focus,.react-flow__nodesselection-rect:focus-visible{outline:none}.react-flow__edge-path{stroke:var(--xy-edge-stroke,var(--xy-edge-stroke-default));stroke-width:var(--xy-edge-stroke-width,var(--xy-edge-stroke-width-default));fill:none}.react-flow__connection-path{stroke:var(--xy-connectionline-stroke,var(--xy-connectionline-stroke-default));stroke-width:var(--xy-connectionline-stroke-width,var(--xy-connectionline-stroke-width-default));fill:none}.react-flow .react-flow__edges{position:absolute}.react-flow .react-flow__edges svg{pointer-events:none;position:absolute;overflow:visible}.react-flow__edge{pointer-events:visibleStroke}.react-flow__edge.selectable{cursor:pointer}.react-flow__edge.animated path{stroke-dasharray:5;animation:.5s linear infinite dashdraw}.react-flow__edge.animated path.react-flow__edge-interaction{stroke-dasharray:none;animation:none}.react-flow__edge.inactive{pointer-events:none}.react-flow__edge.selected,.react-flow__edge:focus,.react-flow__edge:focus-visible{outline:none}.react-flow__edge.selected .react-flow__edge-path,.react-flow__edge.selectable:focus .react-flow__edge-path,.react-flow__edge.selectable:focus-visible .react-flow__edge-path{stroke:var(--xy-edge-stroke-selected,var(--xy-edge-stroke-selected-default))}.react-flow__edge-textwrapper{pointer-events:all}.react-flow__edge .react-flow__edge-text{pointer-events:none;-webkit-user-select:none;user-select:none}.react-flow__arrowhead polyline{stroke:var(--xy-edge-stroke,var(--xy-edge-stroke-default))}.react-flow__arrowhead polyline.arrowclosed{fill:var(--xy-edge-stroke,var(--xy-edge-stroke-default))}.react-flow__connection{pointer-events:none}.react-flow__connection .animated{stroke-dasharray:5;animation:.5s linear infinite dashdraw}svg.react-flow__connectionline{z-index:1001;position:absolute;overflow:visible}.react-flow__nodes{pointer-events:none;transform-origin:0 0}.react-flow__node{-webkit-user-select:none;user-select:none;pointer-events:all;transform-origin:0 0;box-sizing:border-box;cursor:default;position:absolute}.react-flow__node.selectable{cursor:pointer}.react-flow__node.draggable{cursor:grab;pointer-events:all}.react-flow__node.draggable.dragging{cursor:grabbing}.react-flow__nodesselection{z-index:3;transform-origin:0 0;pointer-events:none}.react-flow__nodesselection-rect{pointer-events:all;cursor:grab;position:absolute}.react-flow__handle{pointer-events:none;background-color:var(--xy-handle-background-color,var(--xy-handle-background-color-default));min-width:5px;min-height:5px;position:absolute}.react-flow__handle.connectingfrom{pointer-events:all}.react-flow__handle.connectionindicator{pointer-events:all;cursor:crosshair}.react-flow__handle-bottom{top:auto;bottom:0;left:50%;transform:translate(-50%,50%)}.react-flow__handle-top{top:0;left:50%;transform:translate(-50%,-50%)}.react-flow__handle-left{top:50%;left:0;transform:translate(-50%,-50%)}.react-flow__handle-right{top:50%;right:0;transform:translate(50%,-50%)}.react-flow__edgeupdater{cursor:move;pointer-events:all}.react-flow__pane.selection .react-flow__panel{pointer-events:none}.react-flow__panel{z-index:5;margin:15px;position:absolute}.react-flow__panel.top{top:0}.react-flow__panel.bottom{bottom:0}.react-flow__panel.top.center,.react-flow__panel.bottom.center{left:50%;transform:translate(-15px)translate(-50%)}.react-flow__panel.left{left:0}.react-flow__panel.right{right:0}.react-flow__panel.left.center,.react-flow__panel.right.center{top:50%;transform:translateY(-15px)translateY(-50%)}.react-flow__attribution{background:var(--xy-attribution-background-color,var(--xy-attribution-background-color-default));margin:0;padding:2px 3px;font-size:10px}.react-flow__attribution a{color:#999;text-decoration:none}@keyframes dashdraw{0%{stroke-dashoffset:10px}}.react-flow__edgelabel-renderer{pointer-events:none;-webkit-user-select:none;user-select:none;width:100%;height:100%;position:absolute;top:0;left:0}.react-flow__viewport-portal{-webkit-user-select:none;user-select:none;width:100%;height:100%;position:absolute;top:0;left:0}.react-flow__minimap{background:var(--xy-minimap-background-color-props,var(--xy-minimap-background-color,var(--xy-minimap-background-color-default)))}.react-flow__minimap-svg{display:block}.react-flow__minimap-mask{fill:var(--xy-minimap-mask-background-color-props,var(--xy-minimap-mask-background-color,var(--xy-minimap-mask-background-color-default)));stroke:var(--xy-minimap-mask-stroke-color-props,var(--xy-minimap-mask-stroke-color,var(--xy-minimap-mask-stroke-color-default)));stroke-width:var(--xy-minimap-mask-stroke-width-props,var(--xy-minimap-mask-stroke-width,var(--xy-minimap-mask-stroke-width-default)))}.react-flow__minimap-node{fill:var(--xy-minimap-node-background-color-props,var(--xy-minimap-node-background-color,var(--xy-minimap-node-background-color-default)));stroke:var(--xy-minimap-node-stroke-color-props,var(--xy-minimap-node-stroke-color,var(--xy-minimap-node-stroke-color-default)));stroke-width:var(--xy-minimap-node-stroke-width-props,var(--xy-minimap-node-stroke-width,var(--xy-minimap-node-stroke-width-default)))}.react-flow__background-pattern.dots{fill:var(--xy-background-pattern-color-props,var(--xy-background-pattern-color,var(--xy-background-pattern-dots-color-default)))}.react-flow__background-pattern.lines{stroke:var(--xy-background-pattern-color-props,var(--xy-background-pattern-color,var(--xy-background-pattern-lines-color-default)))}.react-flow__background-pattern.cross{stroke:var(--xy-background-pattern-color-props,var(--xy-background-pattern-color,var(--xy-background-pattern-cross-color-default)))}.react-flow__controls{flex-direction:column;display:flex}.react-flow__controls.horizontal{flex-direction:row}.react-flow__controls-button{justify-content:center;align-items:center;width:26px;height:26px;padding:4px;display:flex}.react-flow__controls-button svg{fill:currentColor;width:100%;max-width:12px;max-height:12px}.react-flow__node-input,.react-flow__node-default,.react-flow__node-output,.react-flow__node-group{border:var(--xy-node-border,var(--xy-node-border-default));color:var(--xy-node-color,var(--xy-node-color-default))}.react-flow__node-input.selected,.react-flow__node-input:focus,.react-flow__node-input:focus-visible,.react-flow__node-default.selected,.react-flow__node-default:focus,.react-flow__node-default:focus-visible,.react-flow__node-output.selected,.react-flow__node-output:focus,.react-flow__node-output:focus-visible,.react-flow__node-group.selected,.react-flow__node-group:focus,.react-flow__node-group:focus-visible{border:var(--xy-node-border-selected,var(--xy-node-border-selected-default));outline:none}.react-flow__nodesselection-rect,.react-flow__selection{background:var(--xy-selection-background-color,var(--xy-selection-background-color-default));border:var(--xy-selection-border,var(--xy-selection-border-default))}.react-flow__resize-control{position:absolute}.react-flow__resize-control.left,.react-flow__resize-control.right{cursor:ew-resize}.react-flow__resize-control.top,.react-flow__resize-control.bottom{cursor:ns-resize}.react-flow__resize-control.top.left,.react-flow__resize-control.bottom.right{cursor:nwse-resize}.react-flow__resize-control.bottom.left,.react-flow__resize-control.top.right{cursor:nesw-resize}.react-flow__resize-control.handle{background-color:var(--xy-resize-background-color,var(--xy-resize-background-color-default));border:1px solid #fff;border-radius:1px;width:5px;height:5px;translate:-50% -50%}.react-flow__resize-control.handle.left{top:50%;left:0}.react-flow__resize-control.handle.right{top:50%;left:100%}.react-flow__resize-control.handle.top{top:0;left:50%}.react-flow__resize-control.handle.bottom{top:100%;left:50%}.react-flow__resize-control.handle.top.left,.react-flow__resize-control.handle.bottom.left{left:0}.react-flow__resize-control.handle.top.right,.react-flow__resize-control.handle.bottom.right{left:100%}.react-flow__resize-control.line{border-color:var(--xy-resize-background-color,var(--xy-resize-background-color-default));border-style:solid;border-width:0}.react-flow__resize-control.line.left,.react-flow__resize-control.line.right{width:1px;height:100%;top:0;transform:translate(-50%)}.react-flow__resize-control.line.left{border-left-width:1px;left:0}.react-flow__resize-control.line.right{border-right-width:1px;left:100%}.react-flow__resize-control.line.top,.react-flow__resize-control.line.bottom{width:100%;height:1px;left:0;transform:translateY(-50%)}.react-flow__resize-control.line.top{border-top-width:1px;top:0}.react-flow__resize-control.line.bottom{border-bottom-width:1px;top:100%}@layer theme{:root,:host{--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-xs:20rem;--container-sm:24rem;--container-md:28rem;--container-lg:32rem;--container-xl:36rem;--container-2xl:42rem;--container-3xl:48rem;--container-4xl:56rem;--container-5xl:64rem;--container-6xl:72rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--text-3xl:1.875rem;--text-3xl--line-height:calc(2.25 / 1.875);--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--tracking-tight:-.025em;--tracking-wide:.025em;--leading-tight:1.25;--leading-snug:1.375;--leading-relaxed:1.625;--ease-out:cubic-bezier(0, 0, .2, 1);--animate-spin:spin 1s linear infinite;--animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--blur-md:12px;--blur-3xl:64px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--f-ui);--default-mono-font-family:var(--f-mono);--color-card:var(--card)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring:where(:not(iframe)){outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}html:not([data-desktop]) :is(button,select,summary,[role=button],[role=switch],label:has(input[type=file]),input[type=color]):not(:disabled){cursor:pointer}}@layer components;@layer utilities{.pointer-events-none{pointer-events:none}.invisible{visibility:hidden}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{inset:0}.inset-x-0{inset-inline:0}.inset-x-6{inset-inline:calc(var(--spacing) * 6)}.inset-y-0{inset-block:0}.-top-0\.5{top:calc(var(--spacing) * -.5)}.-top-1{top:calc(var(--spacing) * -1)}.-top-1\.5{top:calc(var(--spacing) * -1.5)}.-top-2\.5{top:calc(var(--spacing) * -2.5)}.-top-3{top:calc(var(--spacing) * -3)}.-top-4{top:calc(var(--spacing) * -4)}.-top-14{top:calc(var(--spacing) * -14)}.-top-28{top:calc(var(--spacing) * -28)}.top-0{top:0}.top-0\.5{top:calc(var(--spacing) * .5)}.top-1{top:var(--spacing)}.top-1\/2{top:50%}.top-2{top:calc(var(--spacing) * 2)}.top-3{top:calc(var(--spacing) * 3)}.top-6{top:calc(var(--spacing) * 6)}.top-11{top:calc(var(--spacing) * 11)}.top-12{top:calc(var(--spacing) * 12)}.top-24{top:calc(var(--spacing) * 24)}.top-full{top:100%}.-right-0\.5{right:calc(var(--spacing) * -.5)}.-right-1{right:calc(var(--spacing) * -1)}.-right-1\.5{right:calc(var(--spacing) * -1.5)}.-right-10{right:calc(var(--spacing) * -10)}.right-0{right:0}.right-1{right:var(--spacing)}.right-2{right:calc(var(--spacing) * 2)}.right-3{right:calc(var(--spacing) * 3)}.right-4{right:calc(var(--spacing) * 4)}.right-9{right:calc(var(--spacing) * 9)}.right-10{right:calc(var(--spacing) * 10)}.-bottom-5{bottom:calc(var(--spacing) * -5)}.bottom-0{bottom:0}.bottom-0\.5{bottom:calc(var(--spacing) * .5)}.bottom-2{bottom:calc(var(--spacing) * 2)}.bottom-4{bottom:calc(var(--spacing) * 4)}.bottom-12{bottom:calc(var(--spacing) * 12)}.bottom-\[22\%\]{bottom:22%}.-left-1\.5{left:calc(var(--spacing) * -1.5)}.left-0{left:0}.left-0\.5{left:calc(var(--spacing) * .5)}.left-1\/2{left:50%}.left-2{left:calc(var(--spacing) * 2)}.left-3{left:calc(var(--spacing) * 3)}.left-4{left:calc(var(--spacing) * 4)}.left-\[9px\]{left:9px}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.order-first{order:-9999}.col-span-2{grid-column:span 2/span 2}.col-span-3{grid-column:span 3/span 3}.col-span-5{grid-column:span 5/span 5}.col-span-full{grid-column:1/-1}.col-start-6{grid-column-start:6}.row-start-1{grid-row-start:1}.m-auto{margin:auto}.-mx-1{margin-inline:calc(var(--spacing) * -1)}.-mx-5{margin-inline:calc(var(--spacing) * -5)}.mx-2{margin-inline:calc(var(--spacing) * 2)}.mx-5{margin-inline:calc(var(--spacing) * 5)}.mx-auto{margin-inline:auto}.-my-1{margin-block:calc(var(--spacing) * -1)}.my-1{margin-block:var(--spacing)}.my-1\.5{margin-block:calc(var(--spacing) * 1.5)}.-mt-1{margin-top:calc(var(--spacing) * -1)}.-mt-1\.5{margin-top:calc(var(--spacing) * -1.5)}.-mt-2{margin-top:calc(var(--spacing) * -2)}.-mt-3{margin-top:calc(var(--spacing) * -3)}.mt-0\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:var(--spacing)}.mt-1\.5{margin-top:calc(var(--spacing) * 1.5)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-2\.5{margin-top:calc(var(--spacing) * 2.5)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-3\.5{margin-top:calc(var(--spacing) * 3.5)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mt-5{margin-top:calc(var(--spacing) * 5)}.mt-6{margin-top:calc(var(--spacing) * 6)}.mt-8{margin-top:calc(var(--spacing) * 8)}.mt-9{margin-top:calc(var(--spacing) * 9)}.mt-10{margin-top:calc(var(--spacing) * 10)}.mt-16{margin-top:calc(var(--spacing) * 16)}.mt-\[7px\]{margin-top:7px}.mt-auto{margin-top:auto}.-mr-1{margin-right:calc(var(--spacing) * -1)}.-mr-1\.5{margin-right:calc(var(--spacing) * -1.5)}.-mr-2{margin-right:calc(var(--spacing) * -2)}.mr-1{margin-right:var(--spacing)}.mr-\[0\.09em\]{margin-right:.09em}.mr-auto{margin-right:auto}.-mb-3{margin-bottom:calc(var(--spacing) * -3)}.mb-0\.5{margin-bottom:calc(var(--spacing) * .5)}.mb-1{margin-bottom:var(--spacing)}.mb-1\.5{margin-bottom:calc(var(--spacing) * 1.5)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.mb-5{margin-bottom:calc(var(--spacing) * 5)}.mb-6{margin-bottom:calc(var(--spacing) * 6)}.mb-8{margin-bottom:calc(var(--spacing) * 8)}.-ml-1{margin-left:calc(var(--spacing) * -1)}.-ml-1\.5{margin-left:calc(var(--spacing) * -1.5)}.ml-1{margin-left:var(--spacing)}.ml-1\.5{margin-left:calc(var(--spacing) * 1.5)}.ml-2{margin-left:calc(var(--spacing) * 2)}.ml-8{margin-left:calc(var(--spacing) * 8)}.ml-\[0\.06em\]{margin-left:.06em}.ml-auto{margin-left:auto}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.line-clamp-3{-webkit-line-clamp:3;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.aspect-\[5\/2\]{aspect-ratio:5/2}.aspect-square{aspect-ratio:1}.size-1\.5{width:calc(var(--spacing) * 1.5);height:calc(var(--spacing) * 1.5)}.size-2{width:calc(var(--spacing) * 2);height:calc(var(--spacing) * 2)}.size-2\.5{width:calc(var(--spacing) * 2.5);height:calc(var(--spacing) * 2.5)}.size-3{width:calc(var(--spacing) * 3);height:calc(var(--spacing) * 3)}.size-3\.5{width:calc(var(--spacing) * 3.5);height:calc(var(--spacing) * 3.5)}.size-4{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.size-5{width:calc(var(--spacing) * 5);height:calc(var(--spacing) * 5)}.size-6{width:calc(var(--spacing) * 6);height:calc(var(--spacing) * 6)}.size-7{width:calc(var(--spacing) * 7);height:calc(var(--spacing) * 7)}.size-8{width:calc(var(--spacing) * 8);height:calc(var(--spacing) * 8)}.size-9{width:calc(var(--spacing) * 9);height:calc(var(--spacing) * 9)}.size-10{width:calc(var(--spacing) * 10);height:calc(var(--spacing) * 10)}.size-11{width:calc(var(--spacing) * 11);height:calc(var(--spacing) * 11)}.size-12{width:calc(var(--spacing) * 12);height:calc(var(--spacing) * 12)}.size-14{width:calc(var(--spacing) * 14);height:calc(var(--spacing) * 14)}.size-16{width:calc(var(--spacing) * 16);height:calc(var(--spacing) * 16)}.size-20{width:calc(var(--spacing) * 20);height:calc(var(--spacing) * 20)}.size-80{width:calc(var(--spacing) * 80);height:calc(var(--spacing) * 80)}.size-\[3px\]{width:3px;height:3px}.size-\[22px\]{width:22px;height:22px}.size-\[54px\]{width:54px;height:54px}.size-\[72px\]{width:72px;height:72px}.size-full{width:100%;height:100%}.h-6{height:calc(var(--spacing) * 6)}.h-7{height:calc(var(--spacing) * 7)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-10{height:calc(var(--spacing) * 10)}.h-11{height:calc(var(--spacing) * 11)}.h-12{height:calc(var(--spacing) * 12)}.h-14{height:calc(var(--spacing) * 14)}.h-16{height:calc(var(--spacing) * 16)}.h-20{height:calc(var(--spacing) * 20)}.h-28{height:calc(var(--spacing) * 28)}.h-40{height:calc(var(--spacing) * 40)}.h-44{height:calc(var(--spacing) * 44)}.h-\[3px\]{height:3px}.h-\[28rem\]{height:28rem}.h-\[46vh\]{height:46vh}.h-\[55vh\]{height:55vh}.h-\[70dvh\]{height:70dvh}.h-dvh{height:100dvh}.h-full{height:100%}.h-px{height:1px}.h-screen{height:100vh}.max-h-56{max-height:calc(var(--spacing) * 56)}.max-h-60{max-height:calc(var(--spacing) * 60)}.max-h-64{max-height:calc(var(--spacing) * 64)}.max-h-72{max-height:calc(var(--spacing) * 72)}.max-h-80{max-height:calc(var(--spacing) * 80)}.max-h-\[38vh\]{max-height:38vh}.max-h-\[46vh\]{max-height:46vh}.max-h-\[60dvh\]{max-height:60dvh}.max-h-\[68dvh\]{max-height:68dvh}.max-h-\[70dvh\]{max-height:70dvh}.max-h-\[70vh\]{max-height:70vh}.max-h-\[76vh\]{max-height:76vh}.max-h-\[200px\]{max-height:200px}.max-h-\[520px\]{max-height:520px}.max-h-\[calc\(100dvh-32px\)\]{max-height:calc(100dvh - 32px)}.max-h-\[calc\(100dvh-48px\)\]{max-height:calc(100dvh - 48px)}.min-h-0{min-height:0}.min-h-11{min-height:calc(var(--spacing) * 11)}.min-h-28{min-height:calc(var(--spacing) * 28)}.min-h-48{min-height:calc(var(--spacing) * 48)}.min-h-80{min-height:calc(var(--spacing) * 80)}.min-h-\[2\.6em\]{min-height:2.6em}.min-h-\[6\.5rem\]{min-height:6.5rem}.min-h-\[7rem\]{min-height:7rem}.min-h-\[40px\]{min-height:40px}.min-h-\[45vh\]{min-height:45vh}.min-h-\[124px\]{min-height:124px}.min-h-dvh{min-height:100dvh}.min-h-full{min-height:100%}.w-1\.5{width:calc(var(--spacing) * 1.5)}.w-3{width:calc(var(--spacing) * 3)}.w-4{width:calc(var(--spacing) * 4)}.w-5{width:calc(var(--spacing) * 5)}.w-9{width:calc(var(--spacing) * 9)}.w-10{width:calc(var(--spacing) * 10)}.w-11{width:calc(var(--spacing) * 11)}.w-14{width:calc(var(--spacing) * 14)}.w-16{width:calc(var(--spacing) * 16)}.w-24{width:calc(var(--spacing) * 24)}.w-28{width:calc(var(--spacing) * 28)}.w-36{width:calc(var(--spacing) * 36)}.w-40{width:calc(var(--spacing) * 40)}.w-56{width:calc(var(--spacing) * 56)}.w-60{width:calc(var(--spacing) * 60)}.w-\[222\%\]{width:222%}.w-\[280px\]{width:280px}.w-\[380px\]{width:380px}.w-\[calc\(100\%\+0\.5rem\)\]{width:calc(100% + .5rem)}.w-\[calc\(100\%-32px\)\]{width:calc(100% - 32px)}.w-\[calc\(100\%-48px\)\]{width:calc(100% - 48px)}.w-\[min\(68\%\,320px\)\]{width:min(68%,320px)}.w-\[var\(--ai-disc\)\]{width:var(--ai-disc)}.w-auto{width:auto}.w-fit{width:fit-content}.w-full{width:100%}.max-w-2xl{max-width:var(--container-2xl)}.max-w-3xl{max-width:var(--container-3xl)}.max-w-4xl{max-width:var(--container-4xl)}.max-w-5xl{max-width:var(--container-5xl)}.max-w-6xl{max-width:var(--container-6xl)}.max-w-\[60\%\]{max-width:60%}.max-w-\[88rem\]{max-width:88rem}.max-w-\[160px\]{max-width:160px}.max-w-\[620px\]{max-width:620px}.max-w-\[640px\]{max-width:640px}.max-w-\[680px\]{max-width:680px}.max-w-\[1240px\]{max-width:1240px}.max-w-full{max-width:100%}.max-w-lg{max-width:var(--container-lg)}.max-w-md{max-width:var(--container-md)}.max-w-none{max-width:none}.max-w-sm{max-width:var(--container-sm)}.max-w-xl{max-width:var(--container-xl)}.max-w-xs{max-width:var(--container-xs)}.min-w-0{min-width:0}.min-w-48{min-width:calc(var(--spacing) * 48)}.min-w-60{min-width:calc(var(--spacing) * 60)}.min-w-\[7\.5rem\]{min-width:7.5rem}.min-w-\[9rem\]{min-width:9rem}.flex-1{flex:1}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.basis-\[12rem\]{flex-basis:12rem}.basis-full{flex-basis:100%}.origin-top{transform-origin:top}.origin-top-left{transform-origin:0 0}.-translate-x-1\/2{--tw-translate-x:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-\[2px\]{--tw-translate-x:2px;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-\[22px\]{--tw-translate-x:22px;translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-1\/2{--tw-translate-y:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.-scale-x-100{--tw-scale-x:calc(100% * -1);scale:var(--tw-scale-x) var(--tw-scale-y)}.scale-\[0\.45\]{scale:.45}.-rotate-90{rotate:-90deg}.rotate-180{rotate:180deg}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-col-resize{cursor:col-resize}.cursor-crosshair{cursor:crosshair}.cursor-default{cursor:default}.cursor-grab{cursor:grab}.cursor-grabbing{cursor:grabbing}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.cursor-zoom-in{cursor:zoom-in}.touch-none{touch-action:none}.resize{resize:both}.resize-none{resize:none}.\[scrollbar-width\:none\]{scrollbar-width:none}.list-disc{list-style-type:disc}.appearance-none{appearance:none}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.grid-cols-\[1fr_auto_1fr\]{grid-template-columns:1fr auto 1fr}.grid-cols-\[22px_minmax\(0\,1fr\)\]{grid-template-columns:22px minmax(0,1fr)}.grid-cols-\[minmax\(0\,1fr\)_auto_auto\]{grid-template-columns:minmax(0,1fr) auto auto}.grid-cols-\[repeat\(auto-fill\,minmax\(184px\,1fr\)\)\]{grid-template-columns:repeat(auto-fill,minmax(184px,1fr))}.grid-cols-\[repeat\(auto-fill\,minmax\(220px\,1fr\)\)\]{grid-template-columns:repeat(auto-fill,minmax(220px,1fr))}.flex-col{flex-direction:column}.flex-row{flex-direction:row}.flex-wrap{flex-wrap:wrap}.place-items-center{place-items:center}.items-baseline{align-items:baseline}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-0\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:var(--spacing)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-2\.5{gap:calc(var(--spacing) * 2.5)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-5{gap:calc(var(--spacing) * 5)}.gap-6{gap:calc(var(--spacing) * 6)}.gap-7{gap:calc(var(--spacing) * 7)}.gap-8{gap:calc(var(--spacing) * 8)}.gap-9{gap:calc(var(--spacing) * 9)}.gap-10{gap:calc(var(--spacing) * 10)}.gap-x-1{column-gap:var(--spacing)}.gap-x-2{column-gap:calc(var(--spacing) * 2)}.gap-x-2\.5{column-gap:calc(var(--spacing) * 2.5)}.gap-x-3{column-gap:calc(var(--spacing) * 3)}.gap-x-4{column-gap:calc(var(--spacing) * 4)}.gap-x-5{column-gap:calc(var(--spacing) * 5)}.gap-x-7{column-gap:calc(var(--spacing) * 7)}.gap-y-0\.5{row-gap:calc(var(--spacing) * .5)}.gap-y-1{row-gap:var(--spacing)}.gap-y-1\.5{row-gap:calc(var(--spacing) * 1.5)}.gap-y-2{row-gap:calc(var(--spacing) * 2)}.gap-y-5{row-gap:calc(var(--spacing) * 5)}.gap-y-6{row-gap:calc(var(--spacing) * 6)}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px * var(--tw-divide-y-reverse));border-bottom-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-border-soft>:not(:last-child)){border-color:var(--border-soft)}.self-center{align-self:center}.self-end{align-self:flex-end}.self-start{align-self:flex-start}.justify-self-end{justify-self:flex-end}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overscroll-contain{overscroll-behavior:contain}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:calc(var(--radius) * 2)}.rounded-3xl{border-radius:calc(var(--radius) * 3)}.rounded-full{border-radius:2147483647px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) * .75)}.rounded-xl{border-radius:calc(var(--radius) * 1.5)}.rounded-br-md{border-bottom-right-radius:calc(var(--radius) * .75)}.border{border-style:var(--tw-border-style);border-width:1px}.border-0{border-style:var(--tw-border-style);border-width:0}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-4{border-style:var(--tw-border-style);border-width:4px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-\[\#1d1a17\]\/25{border-color:oklab(22.0098% .00284923 .00685373/.25)}.border-border{border-color:var(--border)}.border-border-soft{border-color:var(--border-soft)}.border-ember{border-color:var(--ember)}.border-ink-4{border-color:var(--ink-4)}.border-input{border-color:var(--input)}.border-transparent{border-color:#0000}.border-white{border-color:var(--color-white)}.border-white\/40{border-color:#fff6}@supports (color:color-mix(in lab, red, red)){.border-white\/40{border-color:color-mix(in oklab, var(--color-white) 40%, transparent)}}.border-white\/90{border-color:#ffffffe6}@supports (color:color-mix(in lab, red, red)){.border-white\/90{border-color:color-mix(in oklab, var(--color-white) 90%, transparent)}}.bg-\(--coin-bg\,var\(--color-card\)\){background-color:var(--coin-bg,var(--color-card))}.bg-\[\#0f1424\]{background-color:#0f1424}.bg-\[\#e5484d\]{background-color:#e5484d}.bg-\[oklch\(20\%_0\.01_60\/0\.22\)\]{background-color:oklch(20% .01 60/.22)}.bg-accent{background-color:var(--accent)}.bg-amber{background-color:var(--amber)}.bg-amber-tint{background-color:var(--amber-tint)}.bg-background,.bg-background\/85{background-color:var(--background)}@supports (color:color-mix(in lab, red, red)){.bg-background\/85{background-color:color-mix(in oklab, var(--background) 85%, transparent)}}.bg-black{background-color:var(--color-black)}.bg-black\/10{background-color:#0000001a}@supports (color:color-mix(in lab, red, red)){.bg-black\/10{background-color:color-mix(in oklab, var(--color-black) 10%, transparent)}}.bg-border-soft{background-color:var(--border-soft)}.bg-card,.bg-card\/90{background-color:var(--card)}@supports (color:color-mix(in lab, red, red)){.bg-card\/90{background-color:color-mix(in oklab, var(--card) 90%, transparent)}}.bg-card\/95{background-color:var(--card)}@supports (color:color-mix(in lab, red, red)){.bg-card\/95{background-color:color-mix(in oklab, var(--card) 95%, transparent)}}.bg-cobalt{background-color:var(--cobalt)}.bg-cobalt-tint{background-color:var(--cobalt-tint)}.bg-ember{background-color:var(--ember)}.bg-ember-tint,.bg-ember-tint\/50{background-color:var(--ember-tint)}@supports (color:color-mix(in lab, red, red)){.bg-ember-tint\/50{background-color:color-mix(in oklab, var(--ember-tint) 50%, transparent)}}.bg-ember-veil{background-color:var(--ember-veil)}.bg-foreground{background-color:var(--foreground)}.bg-ink{background-color:var(--ink)}.bg-ink-4,.bg-ink-4\/40{background-color:var(--ink-4)}@supports (color:color-mix(in lab, red, red)){.bg-ink-4\/40{background-color:color-mix(in oklab, var(--ink-4) 40%, transparent)}}.bg-moss{background-color:var(--moss)}.bg-moss-tint{background-color:var(--moss-tint)}.bg-muted{background-color:var(--muted)}.bg-paper{background-color:var(--paper)}.bg-paper-2,.bg-paper-2\/60{background-color:var(--paper-2)}@supports (color:color-mix(in lab, red, red)){.bg-paper-2\/60{background-color:color-mix(in oklab, var(--paper-2) 60%, transparent)}}.bg-paper-3{background-color:var(--paper-3)}.bg-primary{background-color:var(--primary)}.bg-rose{background-color:var(--rose)}.bg-rose-tint{background-color:var(--rose-tint)}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.bg-white\/10{background-color:#ffffff1a}@supports (color:color-mix(in lab, red, red)){.bg-white\/10{background-color:color-mix(in oklab, var(--color-white) 10%, transparent)}}.bg-white\/12{background-color:#ffffff1f}@supports (color:color-mix(in lab, red, red)){.bg-white\/12{background-color:color-mix(in oklab, var(--color-white) 12%, transparent)}}.bg-white\/20{background-color:#fff3}@supports (color:color-mix(in lab, red, red)){.bg-white\/20{background-color:color-mix(in oklab, var(--color-white) 20%, transparent)}}.bg-white\/\[0\.07\]{background-color:#ffffff12}@supports (color:color-mix(in lab, red, red)){.bg-white\/\[0\.07\]{background-color:color-mix(in oklab, var(--color-white) 7.0%, transparent)}}.bg-linear-to-br{--tw-gradient-position:to bottom right}@supports (background-image:linear-gradient(in lab, red, red)){.bg-linear-to-br{--tw-gradient-position:to bottom right in oklab}}.bg-linear-to-br{background-image:linear-gradient(var(--tw-gradient-stops))}.bg-linear-to-t{--tw-gradient-position:to top}@supports (background-image:linear-gradient(in lab, red, red)){.bg-linear-to-t{--tw-gradient-position:to top in oklab}}.bg-linear-to-t{background-image:linear-gradient(var(--tw-gradient-stops))}.from-card{--tw-gradient-from:var(--card);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-ember-tint{--tw-gradient-from:var(--ember-tint);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.via-card{--tw-gradient-via:var(--card);--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.to-card{--tw-gradient-to:var(--card);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-transparent{--tw-gradient-to:transparent;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.fill-amber{fill:var(--amber)}.fill-current{fill:currentColor}.object-contain{object-fit:contain}.object-cover{object-fit:cover}.p-0{padding:0}.p-0\.5{padding:calc(var(--spacing) * .5)}.p-1{padding:var(--spacing)}.p-1\.5{padding:calc(var(--spacing) * 1.5)}.p-2{padding:calc(var(--spacing) * 2)}.p-3{padding:calc(var(--spacing) * 3)}.p-3\.5{padding:calc(var(--spacing) * 3.5)}.p-4{padding:calc(var(--spacing) * 4)}.p-5{padding:calc(var(--spacing) * 5)}.p-6{padding:calc(var(--spacing) * 6)}.p-8{padding:calc(var(--spacing) * 8)}.p-10{padding:calc(var(--spacing) * 10)}.px-0\.5{padding-inline:calc(var(--spacing) * .5)}.px-1{padding-inline:var(--spacing)}.px-1\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-3\.5{padding-inline:calc(var(--spacing) * 3.5)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-5{padding-inline:calc(var(--spacing) * 5)}.px-6{padding-inline:calc(var(--spacing) * 6)}.px-8{padding-inline:calc(var(--spacing) * 8)}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:var(--spacing)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-3\.5{padding-block:calc(var(--spacing) * 3.5)}.py-4{padding-block:calc(var(--spacing) * 4)}.py-5{padding-block:calc(var(--spacing) * 5)}.py-6{padding-block:calc(var(--spacing) * 6)}.py-7{padding-block:calc(var(--spacing) * 7)}.py-8{padding-block:calc(var(--spacing) * 8)}.py-10{padding-block:calc(var(--spacing) * 10)}.py-14{padding-block:calc(var(--spacing) * 14)}.py-16{padding-block:calc(var(--spacing) * 16)}.py-24{padding-block:calc(var(--spacing) * 24)}.py-\[3px\]{padding-block:3px}.pt-0\.5{padding-top:calc(var(--spacing) * .5)}.pt-1{padding-top:var(--spacing)}.pt-1\.5{padding-top:calc(var(--spacing) * 1.5)}.pt-2{padding-top:calc(var(--spacing) * 2)}.pt-2\.5{padding-top:calc(var(--spacing) * 2.5)}.pt-3{padding-top:calc(var(--spacing) * 3)}.pt-4{padding-top:calc(var(--spacing) * 4)}.pt-5{padding-top:calc(var(--spacing) * 5)}.pt-6{padding-top:calc(var(--spacing) * 6)}.pt-8{padding-top:calc(var(--spacing) * 8)}.pr-1{padding-right:var(--spacing)}.pr-2{padding-right:calc(var(--spacing) * 2)}.pr-2\.5{padding-right:calc(var(--spacing) * 2.5)}.pr-3{padding-right:calc(var(--spacing) * 3)}.pr-5{padding-right:calc(var(--spacing) * 5)}.pr-9{padding-right:calc(var(--spacing) * 9)}.pr-20{padding-right:calc(var(--spacing) * 20)}.pr-32{padding-right:calc(var(--spacing) * 32)}.pb-0\.5{padding-bottom:calc(var(--spacing) * .5)}.pb-1{padding-bottom:var(--spacing)}.pb-1\.5{padding-bottom:calc(var(--spacing) * 1.5)}.pb-2{padding-bottom:calc(var(--spacing) * 2)}.pb-2\.5{padding-bottom:calc(var(--spacing) * 2.5)}.pb-4{padding-bottom:calc(var(--spacing) * 4)}.pb-5{padding-bottom:calc(var(--spacing) * 5)}.pb-6{padding-bottom:calc(var(--spacing) * 6)}.pb-10{padding-bottom:calc(var(--spacing) * 10)}.pb-12{padding-bottom:calc(var(--spacing) * 12)}.pb-20{padding-bottom:calc(var(--spacing) * 20)}.pl-1{padding-left:var(--spacing)}.pl-2{padding-left:calc(var(--spacing) * 2)}.pl-2\.5{padding-left:calc(var(--spacing) * 2.5)}.pl-3{padding-left:calc(var(--spacing) * 3)}.pl-5{padding-left:calc(var(--spacing) * 5)}.pl-5\.5{padding-left:calc(var(--spacing) * 5.5)}.pl-9{padding-left:calc(var(--spacing) * 9)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.align-top{vertical-align:top}.font-display{font-family:var(--f-display)}.font-mono{font-family:var(--f-mono)}.font-sans{font-family:var(--f-ui)}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-\[12\.5px\]{font-size:12.5px}.text-\[12px\]{font-size:12px}.text-\[13px\]{font-size:13px}.text-\[14px\]{font-size:14px}.text-\[15px\]{font-size:15px}.text-\[16px\]{font-size:16px}.text-\[17px\]{font-size:17px}.text-\[20px\]{font-size:20px}.text-\[22px\]{font-size:22px}.text-\[26px\]{font-size:26px}.text-\[28px\]{font-size:28px}.text-\[30px\]{font-size:30px}.text-\[32px\]{font-size:32px}.text-\[34px\]{font-size:34px}.text-\[clamp\(28px\,3vw\,40px\)\]{font-size:clamp(28px,3vw,40px)}.leading-4{--tw-leading:calc(var(--spacing) * 4);line-height:calc(var(--spacing) * 4)}.leading-\[1\.1\]{--tw-leading:1.1;line-height:1.1}.leading-\[1\.5\]{--tw-leading:1.5;line-height:1.5}.leading-\[1\.06\]{--tw-leading:1.06;line-height:1.06}.leading-\[1\.08\]{--tw-leading:1.08;line-height:1.08}.leading-\[1\.15\]{--tw-leading:1.15;line-height:1.15}.leading-none{--tw-leading:1;line-height:1}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-snug{--tw-leading:var(--leading-snug);line-height:var(--leading-snug)}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-\[-0\.02em\]{--tw-tracking:-.02em;letter-spacing:-.02em}.tracking-\[-0\.03em\]{--tw-tracking:-.03em;letter-spacing:-.03em}.tracking-\[0\.06em\]{--tw-tracking:.06em;letter-spacing:.06em}.tracking-\[0\.07em\]{--tw-tracking:.07em;letter-spacing:.07em}.tracking-\[0\.08em\]{--tw-tracking:.08em;letter-spacing:.08em}.tracking-\[0\.14em\]{--tw-tracking:.14em;letter-spacing:.14em}.tracking-\[0\.16em\]{--tw-tracking:.16em;letter-spacing:.16em}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.text-balance{text-wrap:balance}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-line{white-space:pre-line}.whitespace-pre-wrap{white-space:pre-wrap}.text-\[\#1d1a17\]\/40{color:oklab(22.0098% .00284923 .00685373/.4)}.text-\[oklch\(32\%_0\.15_262\)\]{color:oklch(32% .15 262)}.text-amber{color:var(--amber)}.text-background{color:var(--background)}.text-black{color:var(--color-black)}.text-cobalt{color:var(--cobalt)}.text-ember{color:var(--ember)}.text-ember-strong{color:var(--ember-strong)}.text-foreground{color:var(--foreground)}.text-ink{color:var(--ink)}.text-ink-2{color:var(--ink-2)}.text-ink-3{color:var(--ink-3)}.text-ink-4{color:var(--ink-4)}.text-moss{color:var(--moss)}.text-muted-foreground{color:var(--muted-foreground)}.text-paper{color:var(--paper)}.text-primary-foreground{color:var(--primary-foreground)}.text-rose{color:var(--rose)}.text-white{color:var(--color-white)}.text-white\/40{color:#fff6}@supports (color:color-mix(in lab, red, red)){.text-white\/40{color:color-mix(in oklab, var(--color-white) 40%, transparent)}}.text-white\/55{color:#ffffff8c}@supports (color:color-mix(in lab, red, red)){.text-white\/55{color:color-mix(in oklab, var(--color-white) 55%, transparent)}}.text-white\/60{color:#fff9}@supports (color:color-mix(in lab, red, red)){.text-white\/60{color:color-mix(in oklab, var(--color-white) 60%, transparent)}}.text-white\/65{color:#ffffffa6}@supports (color:color-mix(in lab, red, red)){.text-white\/65{color:color-mix(in oklab, var(--color-white) 65%, transparent)}}.text-white\/70{color:#ffffffb3}@supports (color:color-mix(in lab, red, red)){.text-white\/70{color:color-mix(in oklab, var(--color-white) 70%, transparent)}}.text-white\/75{color:#ffffffbf}@supports (color:color-mix(in lab, red, red)){.text-white\/75{color:color-mix(in oklab, var(--color-white) 75%, transparent)}}.text-white\/80{color:#fffc}@supports (color:color-mix(in lab, red, red)){.text-white\/80{color:color-mix(in oklab, var(--color-white) 80%, transparent)}}.text-white\/85{color:#ffffffd9}@supports (color:color-mix(in lab, red, red)){.text-white\/85{color:color-mix(in oklab, var(--color-white) 85%, transparent)}}.uppercase{text-transform:uppercase}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.underline{text-decoration-line:underline}.underline-offset-2{text-underline-offset:2px}.underline-offset-4{text-underline-offset:4px}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.accent-\[var\(--ember\)\]{accent-color:var(--ember)}.opacity-0{opacity:0}.opacity-50{opacity:.5}.opacity-55{opacity:.55}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-80{opacity:.8}.opacity-100{opacity:1}.opacity-\[0\.14\]{opacity:.14}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[0_0_0_1px_var\(--border-soft\)\]{--tw-shadow:0 0 0 1px var(--tw-shadow-color,var(--border-soft));box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[0_0_0_100vmax_rgb\(0_0_0\/0\.35\)\]{--tw-shadow:0 0 0 100vmax var(--tw-shadow-color,#00000059);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[0_1px_0_oklch\(0\%_0_0\/0\.08\)\]{--tw-shadow:0 1px 0 var(--tw-shadow-color,oklch(0% 0 0/.08));box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[0_1px_3px_rgba\(0\,0\,0\,0\.25\)\]{--tw-shadow:0 1px 3px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[0_2px_8px_oklch\(0\%_0_0\/0\.22\)\]{--tw-shadow:0 2px 8px var(--tw-shadow-color,oklch(0% 0 0/.22));box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[0_6px_24px_oklch\(88\%_0\.17_150\/0\.35\)\]{--tw-shadow:0 6px 24px var(--tw-shadow-color,oklch(88% .17 150/.35));box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[inset_0_1px_0_oklch\(0\%_0_0\/0\.02\)\]{--tw-shadow:inset 0 1px 0 var(--tw-shadow-color,oklch(0% 0 0/.02));box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-elevated{--tw-shadow:var(--shadow-ember-elevated);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-none{--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-overlay{--tw-shadow:var(--shadow-ember-overlay);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-soft{--tw-shadow:var(--shadow-ember-soft);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring,.ring-1{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-2{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-amber\/30{--tw-ring-color:var(--amber)}@supports (color:color-mix(in lab, red, red)){.ring-amber\/30{--tw-ring-color:color-mix(in oklab, var(--amber) 30%, transparent)}}.ring-border{--tw-ring-color:var(--border)}.ring-border-soft,.ring-border-soft\/60{--tw-ring-color:var(--border-soft)}@supports (color:color-mix(in lab, red, red)){.ring-border-soft\/60{--tw-ring-color:color-mix(in oklab, var(--border-soft) 60%, transparent)}}.ring-card{--tw-ring-color:var(--card)}.ring-ember{--tw-ring-color:var(--ember)}.ring-ember-strong\/40{--tw-ring-color:var(--ember-strong)}@supports (color:color-mix(in lab, red, red)){.ring-ember-strong\/40{--tw-ring-color:color-mix(in oklab, var(--ember-strong) 40%, transparent)}}.ring-ember-veil{--tw-ring-color:var(--ember-veil)}.ring-ember\/60{--tw-ring-color:var(--ember)}@supports (color:color-mix(in lab, red, red)){.ring-ember\/60{--tw-ring-color:color-mix(in oklab, var(--ember) 60%, transparent)}}.ring-input{--tw-ring-color:var(--input)}.ring-moss{--tw-ring-color:var(--moss)}.ring-rose\/30{--tw-ring-color:var(--rose)}@supports (color:color-mix(in lab, red, red)){.ring-rose\/30{--tw-ring-color:color-mix(in oklab, var(--rose) 30%, transparent)}}.ring-white\/12{--tw-ring-color:#ffffff1f}@supports (color:color-mix(in lab, red, red)){.ring-white\/12{--tw-ring-color:color-mix(in oklab, var(--color-white) 12%, transparent)}}.ring-white\/15{--tw-ring-color:#ffffff26}@supports (color:color-mix(in lab, red, red)){.ring-white\/15{--tw-ring-color:color-mix(in oklab, var(--color-white) 15%, transparent)}}.ring-offset-2{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.blur-3xl{--tw-blur:blur(var(--blur-3xl));filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.backdrop-blur{--tw-backdrop-blur:blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-\[1px\]{--tw-backdrop-blur:blur(1px);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-md{--tw-backdrop-blur:blur(var(--blur-md));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[background\,filter\,color\,transform\]{transition-property:background,filter,color,transform;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[background-color\,color\,box-shadow\,filter\]{transition-property:background-color,color,box-shadow,filter;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[background-color\,color\,box-shadow\]{transition-property:background-color,color,box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[height\]{transition-property:height;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[left\,translate\]{transition-property:left,translate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[opacity\,scale\,left\]{transition-property:opacity,scale,left;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[width\]{transition-property:width;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-shadow{transition-property:box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-75{--tw-duration:75ms;transition-duration:75ms}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.duration-500{--tw-duration:.5s;transition-duration:.5s}.duration-700{--tw-duration:.7s;transition-duration:.7s}.ease-\[cubic-bezier\(0\.3\,0\.7\,0\.2\,1\)\]{--tw-ease:cubic-bezier(.3,.7,.2,1);transition-timing-function:cubic-bezier(.3,.7,.2,1)}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.outline-none{--tw-outline-style:none;outline-style:none}.select-all{-webkit-user-select:all;user-select:all}.select-none{-webkit-user-select:none;user-select:none}@media (hover:hover){.group-hover\:translate-x-0\.5:is(:where(.group):hover *){--tw-translate-x:calc(var(--spacing) * .5);translate:var(--tw-translate-x) var(--tw-translate-y)}.group-hover\:bg-ember\/70:is(:where(.group):hover *){background-color:var(--ember)}@supports (color:color-mix(in lab, red, red)){.group-hover\:bg-ember\/70:is(:where(.group):hover *){background-color:color-mix(in oklab, var(--ember) 70%, transparent)}}.group-hover\:text-white\/80:is(:where(.group):hover *){color:#fffc}@supports (color:color-mix(in lab, red, red)){.group-hover\:text-white\/80:is(:where(.group):hover *){color:color-mix(in oklab, var(--color-white) 80%, transparent)}}.group-hover\:opacity-0:is(:where(.group):hover *){opacity:0}.group-hover\:opacity-100:is(:where(.group):hover *){opacity:1}}.group-focus-visible\:bg-ember:is(:where(.group):focus-visible *){background-color:var(--ember)}.group-focus-visible\:opacity-0:is(:where(.group):focus-visible *){opacity:0}.group-focus-visible\:opacity-100:is(:where(.group):focus-visible *){opacity:1}.group-active\:h-16:is(:where(.group):active *){height:calc(var(--spacing) * 16)}.group-active\:bg-ember:is(:where(.group):active *){background-color:var(--ember)}@media (hover:hover){.group-enabled\:group-hover\:translate-x-0\.5:is(:where(.group):enabled *):is(:where(.group):hover *){--tw-translate-x:calc(var(--spacing) * .5);translate:var(--tw-translate-x) var(--tw-translate-y)}}.placeholder\:text-ink-4::placeholder{color:var(--ink-4)}.placeholder\:text-transparent::placeholder{color:#0000}.backdrop\:bg-\[oklch\(20\%_0\.01_60\/0\.28\)\]::backdrop{background-color:oklch(20% .01 60/.28)}.backdrop\:backdrop-blur-\[2px\]::backdrop{--tw-backdrop-blur:blur(2px);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.before\:absolute:before{content:var(--tw-content);position:absolute}.before\:-inset-x-1:before{content:var(--tw-content);inset-inline:calc(var(--spacing) * -1)}.before\:-inset-y-2\.5:before{content:var(--tw-content);inset-block:calc(var(--spacing) * -2.5)}.before\:content-\[\'\'\]:before{--tw-content:"";content:var(--tw-content)}.first\:border-t-0:first-child{border-top-style:var(--tw-border-style);border-top-width:0}.first\:border-l-0:first-child{border-left-style:var(--tw-border-style);border-left-width:0}.first\:pt-0:first-child{padding-top:0}.first\:pl-0:first-child{padding-left:0}.last\:border-0:last-child{border-style:var(--tw-border-style);border-width:0}.last\:pb-0:last-child{padding-bottom:0}.focus-within\:w-full:focus-within{width:100%}.focus-within\:border-focus:focus-within{border-color:var(--focus-line)}.focus-within\:opacity-100:focus-within{opacity:1}.focus-within\:ring-2:focus-within{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus-within\:ring-4:focus-within{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus-within\:ring-focus:focus-within{--tw-ring-color:var(--focus-line)}.focus-within\:ring-focus-glow:focus-within{--tw-ring-color:var(--focus-glow)}@media (hover:hover){.hover\:w-\[var\(--ai-long\)\]:hover{width:var(--ai-long)}.hover\:border-ember:hover{border-color:var(--ember)}.hover\:border-ink-4:hover{border-color:var(--ink-4)}.hover\:bg-accent:hover{background-color:var(--accent)}.hover\:bg-card:hover,.hover\:bg-card\/60:hover{background-color:var(--card)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-card\/60:hover{background-color:color-mix(in oklab, var(--card) 60%, transparent)}}.hover\:bg-paper-2:hover{background-color:var(--paper-2)}.hover\:bg-paper-3:hover{background-color:var(--paper-3)}.hover\:bg-rose-tint:hover{background-color:var(--rose-tint)}.hover\:bg-transparent:hover{background-color:#0000}.hover\:bg-white\/15:hover{background-color:#ffffff26}@supports (color:color-mix(in lab, red, red)){.hover\:bg-white\/15:hover{background-color:color-mix(in oklab, var(--color-white) 15%, transparent)}}.hover\:bg-white\/20:hover{background-color:#fff3}@supports (color:color-mix(in lab, red, red)){.hover\:bg-white\/20:hover{background-color:color-mix(in oklab, var(--color-white) 20%, transparent)}}.hover\:bg-white\/90:hover{background-color:#ffffffe6}@supports (color:color-mix(in lab, red, red)){.hover\:bg-white\/90:hover{background-color:color-mix(in oklab, var(--color-white) 90%, transparent)}}.hover\:text-ink:hover{color:var(--ink)}.hover\:text-ink-2:hover{color:var(--ink-2)}.hover\:text-rose:hover{color:var(--rose)}.hover\:text-white:hover{color:var(--color-white)}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-100:hover{opacity:1}.hover\:shadow-elevated:hover{--tw-shadow:var(--shadow-ember-elevated);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.hover\:ring-2:hover{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.hover\:ring-border:hover{--tw-ring-color:var(--border)}.hover\:ring-border-soft:hover{--tw-ring-color:var(--border-soft)}.hover\:ring-ember:hover{--tw-ring-color:var(--ember)}.hover\:ring-ink-4:hover{--tw-ring-color:var(--ink-4)}.hover\:brightness-105:hover{--tw-brightness:brightness(105%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.hover\:brightness-\[1\.06\]:hover{--tw-brightness:brightness(1.06);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}}.focus\:border-ember:focus{border-color:var(--ember)}.focus\:border-focus:focus{border-color:var(--focus-line)}.focus\:bg-card:focus{background-color:var(--card)}.focus\:text-ink:focus{color:var(--ink)}.focus\:ring-0:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus\:ring-1:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus\:ring-4:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus\:ring-border:focus{--tw-ring-color:var(--border)}.focus\:ring-focus-glow:focus{--tw-ring-color:var(--focus-glow)}.focus-visible\:w-\[var\(--ai-long\)\]:focus-visible{width:var(--ai-long)}.focus-visible\:opacity-100:focus-visible{opacity:1}.focus-visible\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus-visible\:ring-focus:focus-visible{--tw-ring-color:var(--focus-line)}.focus-visible\:outline-2:focus-visible{outline-style:var(--tw-outline-style);outline-width:2px}.focus-visible\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.active\:scale-95:active{--tw-scale-x:95%;--tw-scale-y:95%;--tw-scale-z:95%;scale:var(--tw-scale-x) var(--tw-scale-y)}.active\:scale-\[0\.98\]:active{scale:.98}.active\:brightness-95:active{--tw-brightness:brightness(95%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:opacity-40:disabled{opacity:.4}.disabled\:opacity-50:disabled{opacity:.5}.disabled\:opacity-60:disabled{opacity:.6}.has-\[input\:not\(\:placeholder-shown\)\]\:w-full:has(:is(input:not(:placeholder-shown))){width:100%}.aria-pressed\:bg-foreground[aria-pressed=true]{background-color:var(--foreground)}.aria-pressed\:text-background[aria-pressed=true]{color:var(--background)}.aria-pressed\:ring-2[aria-pressed=true]{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.aria-pressed\:ring-current[aria-pressed=true]{--tw-ring-color:currentcolor}.data-\[open\=true\]\:w-\[var\(--ai-long\)\][data-open=true]{width:var(--ai-long)}.data-\[over\]\:border-focus[data-over]{border-color:var(--focus-line)}.data-\[over\]\:bg-paper-2[data-over]{background-color:var(--paper-2)}.data-\[over\]\:text-ink[data-over]{color:var(--ink)}@media (prefers-reduced-motion:reduce){.motion-reduce\:transition-none{transition-property:none}}@media not all and (width>=420px){.max-\[420px\]\:hidden{display:none}}@media not all and (width>=64rem){.max-lg\:pointer-events-none{pointer-events:none}.max-lg\:left-1\/2{left:50%}.max-lg\:hidden{display:none}.max-lg\:h-0{height:0}.max-lg\:h-\[148px\]{height:148px}.max-lg\:-translate-x-1\/2{--tw-translate-x:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.max-lg\:scale-\[0\.4\]{scale:.4}.max-lg\:scale-\[0\.6\]{scale:.6}.max-lg\:text-center{text-align:center}.max-lg\:opacity-0{opacity:0}.max-lg\:opacity-100{opacity:1}}@media not all and (width>=48rem){.max-md\:hidden{display:none}}@media not all and (width>=40rem){.max-sm\:sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.max-sm\:col-span-3{grid-column:span 3/span 3}.max-sm\:m-0{margin:0}.max-sm\:-mx-4{margin-inline:calc(var(--spacing) * -4)}.max-sm\:ml-1\.5{margin-left:calc(var(--spacing) * 1.5)}.max-sm\:hidden{display:none}.max-sm\:size-4{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.max-sm\:h-dvh{height:100dvh}.max-sm\:max-h-none{max-height:none}.max-sm\:w-auto{width:auto}.max-sm\:w-full{width:100%}.max-sm\:max-w-none{max-width:none}.max-sm\:basis-full{flex-basis:100%}.max-sm\:\[scrollbar-width\:none\]{scrollbar-width:none}.max-sm\:overflow-x-auto{overflow-x:auto}.max-sm\:overflow-y-auto{overflow-y:auto}.max-sm\:rounded-none{border-radius:0}.max-sm\:border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.max-sm\:border-border-soft{border-color:var(--border-soft)}.max-sm\:px-4{padding-inline:calc(var(--spacing) * 4)}.max-sm\:pr-10{padding-right:calc(var(--spacing) * 10)}.max-sm\:pb-4{padding-bottom:calc(var(--spacing) * 4)}.max-sm\:font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}}@media (width>=40rem){.sm\:-top-3\.5{top:calc(var(--spacing) * -3.5)}.sm\:-right-3\.5{right:calc(var(--spacing) * -3.5)}.sm\:order-none{order:0}.sm\:col-span-1{grid-column:span 1/span 1}.sm\:col-span-2{grid-column:span 2/span 2}.sm\:col-start-auto{grid-column-start:auto}.sm\:row-start-auto{grid-row-start:auto}.sm\:-mx-7{margin-inline:calc(var(--spacing) * -7)}.sm\:mt-6{margin-top:calc(var(--spacing) * 6)}.sm\:mr-1{margin-right:var(--spacing)}.sm\:block{display:block}.sm\:grid{display:grid}.sm\:hidden{display:none}.sm\:inline-flex{display:inline-flex}.sm\:size-20{width:calc(var(--spacing) * 20);height:calc(var(--spacing) * 20)}.sm\:h-11{height:calc(var(--spacing) * 11)}.sm\:min-h-0{min-height:0}.sm\:min-h-\[136px\]{min-height:136px}.sm\:w-32{width:calc(var(--spacing) * 32)}.sm\:w-56{width:calc(var(--spacing) * 56)}.sm\:w-auto{width:auto}.sm\:max-w-2xl{max-width:var(--container-2xl)}.sm\:max-w-4xl{max-width:var(--container-4xl)}.sm\:max-w-md{max-width:var(--container-md)}.sm\:flex-1{flex:1}.sm\:basis-0{flex-basis:0}.sm\:\[grid-template-columns\:var\(--cols\)\]{grid-template-columns:var(--cols)}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.sm\:grid-cols-\[1fr_2fr_auto\]{grid-template-columns:1fr 2fr auto}.sm\:grid-cols-\[230px_minmax\(0\,1fr\)\]{grid-template-columns:230px minmax(0,1fr)}.sm\:grid-cols-\[minmax\(0\,2fr\)_minmax\(0\,3fr\)_auto_auto\]{grid-template-columns:minmax(0,2fr) minmax(0,3fr) auto auto}.sm\:grid-rows-\[minmax\(0\,1fr\)\]{grid-template-rows:minmax(0,1fr)}.sm\:flex-row{flex-direction:row}.sm\:flex-wrap{flex-wrap:wrap}.sm\:justify-center{justify-content:center}.sm\:gap-3{gap:calc(var(--spacing) * 3)}.sm\:gap-8{gap:calc(var(--spacing) * 8)}.sm\:overflow-y-auto{overflow-y:auto}.sm\:rounded-t-2xl{border-top-left-radius:calc(var(--radius) * 2);border-top-right-radius:calc(var(--radius) * 2)}.sm\:bg-transparent{background-color:#0000}.sm\:p-0{padding:0}.sm\:p-5{padding:calc(var(--spacing) * 5)}.sm\:p-6{padding:calc(var(--spacing) * 6)}.sm\:p-7{padding:calc(var(--spacing) * 7)}.sm\:px-4{padding-inline:calc(var(--spacing) * 4)}.sm\:px-6{padding-inline:calc(var(--spacing) * 6)}.sm\:px-7{padding-inline:calc(var(--spacing) * 7)}.sm\:px-10{padding-inline:calc(var(--spacing) * 10)}.sm\:py-16{padding-block:calc(var(--spacing) * 16)}.sm\:pt-8{padding-top:calc(var(--spacing) * 8)}.sm\:pt-16{padding-top:calc(var(--spacing) * 16)}.sm\:pr-36{padding-right:calc(var(--spacing) * 36)}.sm\:pr-40{padding-right:calc(var(--spacing) * 40)}.sm\:pb-6{padding-bottom:calc(var(--spacing) * 6)}.sm\:pb-8{padding-bottom:calc(var(--spacing) * 8)}.sm\:pb-16{padding-bottom:calc(var(--spacing) * 16)}.sm\:text-\[28px\]{font-size:28px}.sm\:text-\[32px\]{font-size:32px}.sm\:text-\[34px\]{font-size:34px}.sm\:text-\[38px\]{font-size:38px}.sm\:placeholder\:text-ink-4::placeholder{color:var(--ink-4)}}@media (width>=48rem){.md\:mt-8{margin-top:calc(var(--spacing) * 8)}.md\:hidden{display:none}.md\:inline-flex{display:inline-flex}.md\:grid-cols-\[200px_minmax\(0\,1fr\)\]{grid-template-columns:200px minmax(0,1fr)}.md\:gap-10{gap:calc(var(--spacing) * 10)}}@media (width>=64rem){.lg\:pointer-events-none{pointer-events:none}.lg\:sticky{position:sticky}.lg\:top-24{top:calc(var(--spacing) * 24)}.lg\:top-\[calc\(6vh\+5\.25rem\)\]{top:calc(6vh + 5.25rem)}.lg\:left-0{left:0}.lg\:left-\[calc\(50\%-508px\)\]{left:calc(50% - 508px)}.lg\:left-\[calc\(50\%-560px\)\]{left:calc(50% - 560px)}.lg\:ml-0{margin-left:0}.lg\:ml-\[calc\(50\%-16rem\)\]{margin-left:calc(50% - 16rem)}.lg\:block{display:block}.lg\:hidden{display:none}.lg\:inline{display:inline}.lg\:h-0{height:0}.lg\:h-\[calc\(100vh-27rem\)\]{height:calc(100vh - 27rem)}.lg\:h-auto{height:auto}.lg\:max-h-\[calc\(100vh-15rem\)\]{max-height:calc(100vh - 15rem)}.lg\:max-h-\[calc\(100vh-27rem\)\]{max-height:calc(100vh - 27rem)}.lg\:min-h-0{min-height:0}.lg\:min-h-\[6\.5rem\]{min-height:6.5rem}.lg\:min-h-\[360px\]{min-height:360px}.lg\:w-\(--pane\){width:var(--pane)}.lg\:w-\[32rem\]{width:32rem}.lg\:origin-center{transform-origin:50%}.lg\:translate-x-0{--tw-translate-x:0px;translate:var(--tw-translate-x) var(--tw-translate-y)}.lg\:scale-75{--tw-scale-x:75%;--tw-scale-y:75%;--tw-scale-z:75%;scale:var(--tw-scale-x) var(--tw-scale-y)}.lg\:scale-100{--tw-scale-x:100%;--tw-scale-y:100%;--tw-scale-z:100%;scale:var(--tw-scale-x) var(--tw-scale-y)}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.lg\:grid-cols-\[1fr_280px\]{grid-template-columns:1fr 280px}.lg\:grid-cols-\[16rem_minmax\(0\,1fr\)\]{grid-template-columns:16rem minmax(0,1fr)}.lg\:grid-cols-\[minmax\(280px\,360px\)_minmax\(0\,1fr\)\]{grid-template-columns:minmax(280px,360px) minmax(0,1fr)}.lg\:flex-row{flex-direction:row}.lg\:items-start{align-items:flex-start}.lg\:gap-14{gap:calc(var(--spacing) * 14)}.lg\:self-start{align-self:flex-start}.lg\:rounded-tl-3xl{border-top-left-radius:calc(var(--radius) * 3)}.lg\:pt-\[6vh\]{padding-top:6vh}.lg\:text-left{text-align:left}.lg\:opacity-0{opacity:0}.lg\:opacity-100{opacity:1}.lg\:transition-\[margin\]{transition-property:margin;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.lg\:duration-700{--tw-duration:.7s;transition-duration:.7s}}.dark\:block:is(.dark *){display:block}.dark\:hidden:is(.dark *){display:none}@media (pointer:coarse){.coarse\:-my-3{margin-block:calc(var(--spacing) * -3)}.coarse\:size-6{width:calc(var(--spacing) * 6);height:calc(var(--spacing) * 6)}.coarse\:size-11{width:calc(var(--spacing) * 11);height:calc(var(--spacing) * 11)}.coarse\:h-11{height:calc(var(--spacing) * 11)}.coarse\:min-h-11{min-height:calc(var(--spacing) * 11)}.coarse\:min-w-11{min-width:calc(var(--spacing) * 11)}.coarse\:px-3\.5{padding-inline:calc(var(--spacing) * 3.5)}.coarse\:px-4{padding-inline:calc(var(--spacing) * 4)}.coarse\:py-2\.5{padding-block:calc(var(--spacing) * 2.5)}.coarse\:opacity-100{opacity:1}}@media not all and (width>=40rem){.max-sm\:\[\&\:\:-webkit-scrollbar\]\:hidden::-webkit-scrollbar{display:none}}.\[\&\:\:-webkit-search-cancel-button\]\:hidden::-webkit-search-cancel-button{display:none}.\[\&\>button\]\:size-8>button{width:calc(var(--spacing) * 8);height:calc(var(--spacing) * 8)}.\[\&\>button\]\:bg-card>button{background-color:var(--card)}.\[\&\>button\]\:shadow-soft>button{--tw-shadow:var(--shadow-ember-soft);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}}:root,.dark .tone-flip{--raw-primary:#e0531b;--raw-secondary:#f1f3f5;--raw-background:#faf8f5;--raw-sidebar:var(--paper);--contrast:1;--hue-success:150;--hue-danger:25;--hue-warning:70;--hue-info:264;--paper:oklch(from var(--raw-background) calc(.99 - (.02 * var(--contrast))) c h);--paper-2:oklch(from var(--raw-background) calc(.96 - (.03 * var(--contrast))) calc(c * 1.2) h);--paper-3:oklch(from var(--raw-background) calc(.94 - (.04 * var(--contrast))) calc(c * 1.5) h);--canvas:var(--paper);--canvas-dim:var(--paper-2);--canvas-darken:var(--paper-3);--ink:oklch(from var(--raw-background) calc(.22 + (.05 / var(--contrast))) calc(c * 1.2) h);--ink-2:oklch(from var(--raw-background) calc(.4 + (.05 / var(--contrast))) c h);--ink-3:oklch(from var(--raw-background) calc(.55 + (.05 / var(--contrast))) calc(c * .8) h);--ink-4:oklch(from var(--raw-background) calc(.7 + (.05 / var(--contrast))) calc(c * .6) h);--ember:oklch(from var(--raw-primary) l c h);--ember-strong:oklch(from var(--raw-primary) calc(l - (.08 * var(--contrast))) c h);--ember-tint:oklch(from var(--raw-primary) calc(.96 + .02 * (1 - var(--contrast))) calc(c * .2) h);--ember-veil:oklch(from var(--raw-primary) l c h / .1);--cobalt:var(--info);--cobalt-tint:var(--info-tint);--moss:var(--success);--moss-tint:var(--success-tint);--amber:var(--warning);--amber-tint:var(--warning-tint);--rose:var(--danger);--rose-tint:var(--danger-tint);--danger:oklch(from var(--raw-background) calc(.64 - (.05 * var(--contrast))) .2 var(--hue-danger));--danger-tint:oklch(from var(--raw-background) calc(.98 - (.01 * var(--contrast))) .03 var(--hue-danger));--success:oklch(from var(--raw-background) calc(.48 - (.04 * var(--contrast))) .13 var(--hue-success));--success-tint:oklch(from var(--raw-background) calc(.98 - (.01 * var(--contrast))) .025 var(--hue-success));--warning:oklch(from var(--raw-background) calc(.78 - (.04 * var(--contrast))) .16 var(--hue-warning));--warning-tint:oklch(from var(--raw-background) calc(.98 - (.01 * var(--contrast))) .04 var(--hue-warning));--info:oklch(from var(--raw-background) calc(.5 - (.05 * var(--contrast))) .18 var(--hue-info));--info-tint:oklch(from var(--raw-background) calc(.98 - (.01 * var(--contrast))) .025 var(--hue-info));--link:var(--info);--secondary-accent:oklch(from var(--raw-secondary) l c h);--secondary-accent-strong:oklch(from var(--raw-secondary) calc(l - (.08 * var(--contrast))) c h);--f-display:"Space Grotesk", ui-sans-serif, system-ui, sans-serif;--f-ui:"Geist", ui-sans-serif, system-ui, sans-serif;--f-mono:"Geist Mono", ui-monospace, monospace;--t-display-l:56px;--t-display:40px;--t-h1:28px;--t-h2:20px;--t-h3:16px;--t-body:14px;--t-ui:13px;--t-small:12px;--t-micro:11px;--s-1:4px;--s-2:8px;--s-3:12px;--s-4:16px;--s-5:20px;--s-6:24px;--s-8:32px;--s-10:40px;--s-12:48px;--s-16:64px;--r-1:2px;--r-2:4px;--r-3:6px;--r-4:12px;--r-5:16px;--r-pill:999px;--shadow-ember-elevated:0 1px 2px oklch(from var(--raw-background) .4 c h / .04), 0 6px 18px oklch(from var(--raw-background) .2 c h / .06);--shadow-ember-overlay:0 2px 4px oklch(from var(--raw-background) .2 c h / .08), 0 10px 28px oklch(from var(--raw-background) .15 c h / .16);--shadow-ember-soft:0 1px 2px oklch(from var(--raw-background) .4 c h / .03), 0 3px 10px oklch(from var(--raw-background) .3 c h / .05);--e-1:0 1px 0 oklch(from var(--raw-background) .7 c h / .08);--e-2:var(--shadow-ember-elevated);--e-3:0 1px 2px oklch(from var(--raw-background) .4 c h / .04), 0 6px 18px oklch(from var(--raw-background) .4 c h / .06), 0 18px 36px oklch(from var(--raw-background) .4 c h / .07);--shadow-shell-secondary-edge:0 2px 24px -8px oklch(from var(--raw-background) .35 c h / .14);--shadow-shell-copilot-edge:0 2px 24px -8px oklch(from var(--raw-background) .35 c h / .14);--row-compact:28px;--row-default:32px;--row-comfy:40px;--shell-row:44px;--shell-footer:48px;--input-inset:oklch(from var(--raw-background) calc(calc(.99 - (.02 * var(--contrast))) - (.12 * var(--contrast))) calc(c * 3) h / .65)}.dark,.tone-flip{--raw-sidebar:oklch(from var(--raw-background) calc(.09 + (.03 * var(--contrast))) calc(c * 1.2) h);--paper:oklch(from var(--raw-background) calc(.12 + (.03 * var(--contrast))) c h);--paper-2:oklch(from var(--raw-background) calc(.15 + (.02 * var(--contrast))) calc(c * 1.2) h);--paper-3:oklch(from var(--raw-background) calc(.18 + (.01 * var(--contrast))) calc(c * 1.5) h);--ink:oklch(from var(--raw-background) calc(.92 - (.05 / var(--contrast))) calc(c * 1.2) h);--ink-2:oklch(from var(--raw-background) calc(.85 - (.05 / var(--contrast))) c h);--ink-3:oklch(from var(--raw-background) calc(.72 - (.05 / var(--contrast))) calc(c * .8) h);--ink-4:oklch(from var(--raw-background) calc(.58 - (.05 / var(--contrast))) calc(c * .6) h);--input-inset:oklch(from var(--raw-background) calc(calc(.12 + (.03 * var(--contrast))) + (.21 * var(--contrast))) calc(c * 2.8) h / .65);--ember-strong:oklch(from var(--raw-primary) calc(l + (.08 * var(--contrast))) c h);--ember-tint:oklch(from var(--raw-primary) calc(.18 + .02 * var(--contrast)) calc(c * .35) h);--secondary-accent-strong:oklch(from var(--raw-secondary) calc(l + (.08 * var(--contrast))) c h);--danger:oklch(from var(--raw-background) calc(.62 + (.05 * var(--contrast))) .2 var(--hue-danger));--danger-tint:oklch(from var(--raw-background) calc(.18 + (.02 * var(--contrast))) .05 var(--hue-danger));--success:oklch(from var(--raw-background) calc(.65 + (.05 * var(--contrast))) .13 var(--hue-success));--success-tint:oklch(from var(--raw-background) calc(.18 + (.02 * var(--contrast))) .04 var(--hue-success));--warning:oklch(from var(--raw-background) calc(.78 + (.04 * var(--contrast))) .16 var(--hue-warning));--warning-tint:oklch(from var(--raw-background) calc(.18 + (.02 * var(--contrast))) .05 var(--hue-warning));--info:oklch(from var(--raw-background) calc(.72 + (.05 * var(--contrast))) .18 var(--hue-info));--info-tint:oklch(from var(--raw-background) calc(.18 + (.02 * var(--contrast))) .04 var(--hue-info));--shadow-ember-elevated:0 1px 2px oklch(0% 0 0/.22), 0 6px 18px oklch(0% 0 0/.28);--shadow-ember-overlay:0 2px 4px oklch(0% 0 0/.3), 0 10px 28px oklch(0% 0 0/.44);--shadow-ember-soft:0 1px 2px oklch(0% 0 0/.18), 0 3px 10px oklch(0% 0 0/.22);--e-2:var(--shadow-ember-elevated);--e-3:0 1px 2px oklch(0% 0 0/.22), 0 6px 18px oklch(0% 0 0/.28), 0 24px 48px oklch(0% 0 0/.32);--shadow-shell-secondary-edge:0 2px 28px -10px oklch(0% 0 0/.5);--shadow-shell-copilot-edge:0 2px 28px -10px oklch(0% 0 0/.5)}.tone-flip{--canvas:var(--paper);--canvas-dim:var(--paper-2);--canvas-darken:var(--paper-3);--cobalt:var(--info);--cobalt-tint:var(--info-tint);--moss:var(--success);--moss-tint:var(--success-tint);--amber:var(--warning);--amber-tint:var(--warning-tint);--rose:var(--danger);--rose-tint:var(--danger-tint);--link:var(--info);color:var(--foreground)}@media (prefers-contrast:more){:root{--contrast:1.4}}.theme-high-contrast{--contrast:1.4}.theme-deuteranopia,.theme-protanopia{--hue-success:195;--hue-danger:15;--hue-warning:50}.theme-tritanopia{--hue-success:165;--hue-warning:10;--hue-info:140}:root,.dark .tone-flip{--background:var(--canvas);--foreground:var(--ink);--card:oklch(100% 0 0);--card-foreground:var(--ink);--popover:oklch(from var(--card) l c h / .72);--popover-foreground:var(--ink);--primary:var(--ember-strong);--primary-foreground:oklch(99% 0 0);--secondary:var(--paper-2);--secondary-foreground:var(--ink);--muted:var(--paper-3)}@supports (color:color-mix(in lab, red, red)){:root,.dark .tone-flip{--muted:color-mix(in oklch, var(--paper-3) 32%, var(--card))}}:root,.dark .tone-flip{--muted-foreground:var(--ink-3);--accent:var(--ink)}@supports (color:color-mix(in lab, red, red)){:root,.dark .tone-flip{--accent:color-mix(in oklch, var(--ink) calc(7.5% * var(--contrast)), var(--paper))}}:root,.dark .tone-flip{--accent-foreground:var(--ink);--destructive:var(--danger);--destructive-foreground:oklch(99% 0 0);--border:var(--ink)}@supports (color:color-mix(in lab, red, red)){:root,.dark .tone-flip{--border:color-mix(in oklch, var(--ink) calc(12% * var(--contrast)), var(--paper))}}:root,.dark .tone-flip{--border-soft:var(--border)}@supports (color:color-mix(in lab, red, red)){:root,.dark .tone-flip{--border-soft:color-mix(in oklch, var(--border) 50%, transparent)}}:root,.dark .tone-flip{--input:var(--ink)}@supports (color:color-mix(in lab, red, red)){:root,.dark .tone-flip{--input:color-mix(in oklch, var(--ink) calc(10% * var(--contrast)), var(--paper))}}:root,.dark .tone-flip{--ring:var(--ember)}@supports (color:color-mix(in lab, red, red)){:root,.dark .tone-flip{--ring:color-mix(in oklch, var(--ember) 45%, transparent)}}:root,.dark .tone-flip{--link:var(--info);--chart-1:var(--moss);--chart-2:var(--cobalt);--chart-3:var(--ember);--chart-4:var(--amber);--chart-5:var(--rose);--sidebar:oklch(from var(--raw-sidebar) l c h);--sidebar-foreground:oklch(from var(--sidebar) clamp(.15, (.62 - l) * 100, .98) calc(c * .06) h);--sidebar-primary:var(--ember);--sidebar-primary-foreground:oklch(from var(--ember) calc(1 - l) calc(c * .1) h);--sidebar-accent:oklch(from var(--sidebar) calc(l + .05 * (1 - 2 * l)) c h);--sidebar-accent-foreground:oklch(from var(--sidebar) clamp(.15, (.62 - l) * 100, .98) calc(c * .06) h);--sidebar-border:var(--sidebar)}@supports (color:color-mix(in lab, red, red)){:root,.dark .tone-flip{--sidebar-border:color-mix(in oklch, var(--sidebar) 82%, var(--sidebar-foreground))}}:root,.dark .tone-flip{--sidebar-ring:var(--sidebar-primary)}@supports (color:color-mix(in lab, red, red)){:root,.dark .tone-flip{--sidebar-ring:color-mix(in oklch, var(--sidebar-primary) 65%, transparent)}}:root,.dark .tone-flip{--font-sans:var(--f-ui);--font-heading:var(--f-display);--font-mono:var(--f-mono);--radius:.5rem;--radius-button:.5rem;--shadow-2xs:var(--e-1);--shadow-xs:0 1px 2px oklch(40% var(--seed-neutral-c) var(--seed-neutral-h) / .06);--shadow-sm:var(--e-2);--shadow-md:0 4px 12px oklch(40% var(--seed-neutral-c) var(--seed-neutral-h) / .08);--shadow-lg:var(--e-3);--shadow-xl:0 20px 40px oklch(35% var(--seed-neutral-c) var(--seed-neutral-h) / .12);--shadow-2xl:0 24px 48px oklch(30% var(--seed-neutral-c) var(--seed-neutral-h) / .16)}.dark,.tone-flip{--background:var(--canvas);--foreground:var(--ink);--card:var(--paper-2);--card-foreground:var(--ink);--popover:oklch(from var(--card) l c h / .78);--popover-foreground:var(--ink);--primary:var(--ember-strong);--primary-foreground:oklch(from var(--raw-background) .16 .02 h);--secondary:var(--paper-2);--secondary-foreground:var(--ink-2);--muted:var(--paper-3)}@supports (color:color-mix(in lab, red, red)){.dark,.tone-flip{--muted:color-mix(in oklch, var(--paper-3) 45%, var(--card))}}.dark,.tone-flip{--muted-foreground:var(--ink-3);--accent:var(--ink)}@supports (color:color-mix(in lab, red, red)){.dark,.tone-flip{--accent:color-mix(in oklch, var(--ink) calc(10% * var(--contrast)), var(--paper))}}.dark,.tone-flip{--accent-foreground:var(--ink);--destructive:var(--danger);--destructive-foreground:oklch(99% 0 0);--border:var(--ink)}@supports (color:color-mix(in lab, red, red)){.dark,.tone-flip{--border:color-mix(in oklch, var(--ink) calc(12% * var(--contrast)), var(--paper))}}.dark,.tone-flip{--border-soft:var(--border)}@supports (color:color-mix(in lab, red, red)){.dark,.tone-flip{--border-soft:color-mix(in oklch, var(--border) 50%, transparent)}}.dark,.tone-flip{--input:var(--ink)}@supports (color:color-mix(in lab, red, red)){.dark,.tone-flip{--input:color-mix(in oklch, var(--ink) calc(10% * var(--contrast)), var(--paper))}}.dark,.tone-flip{--ring:var(--ember)}@supports (color:color-mix(in lab, red, red)){.dark,.tone-flip{--ring:color-mix(in oklch, var(--ember) 55%, transparent)}}.dark,.tone-flip{--link:var(--info);--chart-1:var(--moss);--chart-2:var(--cobalt);--chart-3:var(--ember);--chart-4:var(--amber);--chart-5:var(--rose);--sidebar:oklch(from var(--raw-sidebar) l c h);--sidebar-foreground:oklch(from var(--sidebar) clamp(.15, (.62 - l) * 100, .98) calc(c * .06) h);--sidebar-primary:var(--ember);--sidebar-primary-foreground:oklch(from var(--ember) calc(1 - l) calc(c * .1) h);--sidebar-accent:oklch(from var(--sidebar) calc(l + .05 * (1 - 2 * l)) c h);--sidebar-accent-foreground:oklch(from var(--sidebar) clamp(.15, (.62 - l) * 100, .98) calc(c * .06) h);--sidebar-border:var(--sidebar)}@supports (color:color-mix(in lab, red, red)){.dark,.tone-flip{--sidebar-border:color-mix(in oklch, var(--sidebar) 82%, var(--sidebar-foreground))}}.dark,.tone-flip{--sidebar-ring:var(--sidebar-primary)}@supports (color:color-mix(in lab, red, red)){.dark,.tone-flip{--sidebar-ring:color-mix(in oklch, var(--sidebar-primary) 55%, transparent)}}.dark,.tone-flip{--shadow-2xs:0 1px 0 oklch(0% 0 0/.2);--shadow-xs:0 1px 2px oklch(0% 0 0/.25);--shadow-sm:var(--e-2);--shadow-md:0 4px 14px oklch(0% 0 0/.32);--shadow-lg:var(--e-3);--shadow-xl:0 20px 40px oklch(0% 0 0/.42);--shadow-2xl:0 24px 56px oklch(0% 0 0/.48)}.dark{--stage:oklch(34% .14 264);--raw-background:var(--stage);--raw-sidebar:oklch(from var(--stage) calc(l - .04) c h);--paper:oklch(from var(--stage) l c h);--card:oklch(from var(--stage) calc(l + .06) calc(c * .95) h);--paper-2:oklch(from var(--stage) calc(l + .1) calc(c * .92) h);--paper-3:oklch(from var(--stage) calc(l + .14) calc(c * .88) h);--ink:oklch(from var(--stage) .97 .015 h);--ink-2:oklch(from var(--stage) .9 .03 h);--ink-3:oklch(from var(--stage) .8 .05 h);--ink-4:oklch(from var(--stage) .68 .06 h);--accent:var(--ink)}@supports (color:color-mix(in lab, red, red)){.dark{--accent:color-mix(in oklch, var(--ink) 10%, var(--card))}}.dark{--border:var(--ink)}@supports (color:color-mix(in lab, red, red)){.dark{--border:color-mix(in oklch, var(--ink) 18%, var(--card))}}.dark{--input:var(--ink)}@supports (color:color-mix(in lab, red, red)){.dark{--input:color-mix(in oklch, var(--ink) 24%, var(--card))}}.dark{--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark}html{-webkit-text-size-adjust:100%;font-size:16px}body{background:var(--background);color:var(--foreground);font-family:var(--f-ui);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#root{min-height:100dvh}@media (pointer:coarse){input:not([type=checkbox],[type=radio],[type=range],[type=color]),textarea,select{font-size:16px}}button,a,[role=switch]{-webkit-tap-highlight-color:transparent;touch-action:manipulation}.safe-top{padding-top:env(safe-area-inset-top)}.safe-x{padding-left:max(1.25rem, env(safe-area-inset-left));padding-right:max(1.25rem, env(safe-area-inset-right))}.safe-bottom{padding-bottom:max(.75rem, env(safe-area-inset-bottom))}@media (width<=767px){.action-bar{bottom:var(--kb,0px);z-index:10;padding:.75rem 1.25rem max(.75rem, env(safe-area-inset-bottom));background:var(--background);margin-inline:-1.25rem;position:sticky}@supports (color:color-mix(in lab, red, red)){.action-bar{background:color-mix(in oklch, var(--background) 88%, transparent)}}.action-bar{-webkit-backdrop-filter:blur(10px);border-top:1px solid var(--border-soft)}.keyboard-open .action-bar{padding-bottom:.75rem}}::selection{color:var(--ink);background:var(--ember-veil)}:root{--focus-line:var(--ink)}@supports (color:color-mix(in lab, red, red)){:root{--focus-line:color-mix(in oklch, var(--ink) 26%, transparent)}}:root{--focus-glow:transparent}:focus-visible{outline:1.5px solid var(--focus-line);outline-offset:2px}:is(input,textarea,select):focus-visible{outline:none}.theme-high-contrast{--focus-line:var(--ember);--focus-glow:var(--ember-veil)}@media (prefers-contrast:more){:root{--focus-line:var(--ember);--focus-glow:var(--ember-veil)}}.theme-high-contrast :focus-visible{outline-width:2px}@media (prefers-contrast:more){:focus-visible{outline-width:2px}}.prose-zen{color:var(--ink);overflow-wrap:anywhere;line-height:1.6}.prose-zen>*+*{margin-top:.75em}.prose-zen h1,.prose-zen h2,.prose-zen h3{font-family:var(--f-display);margin-top:1.25em;font-weight:600;line-height:1.25}.prose-zen h1{font-size:1.5rem}.prose-zen h2{font-size:1.2rem}.prose-zen h3{font-size:1.05rem}.prose-zen ul,.prose-zen ol{padding-left:1.25em}.prose-zen ul{list-style:outside}.prose-zen ol{list-style:decimal}.prose-zen a{color:var(--ember-strong);text-underline-offset:2px;text-decoration:underline}.prose-zen table{border-collapse:collapse;width:100%;font-size:.9em}@media (width<=639px){.prose-zen table{-webkit-overflow-scrolling:touch;display:block;overflow-x:auto}}.prose-zen pre{overflow-x:auto}.prose-zen img{max-width:100%;height:auto}.prose-zen th,.prose-zen td{border-bottom:1px solid var(--border-soft);text-align:left;padding:.4em .6em}.prose-zen code{font-family:var(--f-mono);background:var(--paper-2);border-radius:4px;padding:.1em .3em;font-size:.9em}.prose-zen blockquote{border-left:3px solid var(--border);color:var(--ink-2);padding-left:.9em}.swatch::-webkit-color-swatch-wrapper{padding:0}.swatch::-webkit-color-swatch{border-radius:calc(var(--radius) * .5);border:0}.swatch::-moz-color-swatch{border-radius:calc(var(--radius) * .5);border:0}.react-flow__attribution{display:none}.react-flow__edge-path{stroke:var(--ink-4);stroke-width:1.5px}.react-flow__handle{opacity:0}@keyframes rise{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}.animate-rise{animation:.45s cubic-bezier(.2,.7,.2,1) backwards rise}@keyframes dock{0%{opacity:0;transform:translateY(calc(100% + 16px))}to{opacity:1;transform:none}}.animate-dock{animation:.32s cubic-bezier(.2,.7,.2,1) both dock}@keyframes settle{0%{opacity:0;transform:translate(28px)}}.animate-settle{animation:.6s cubic-bezier(.2,.7,.2,1) .3s both settle}@keyframes breathe{0%,to{opacity:.5}50%{opacity:1}}.animate-breathe{animation:2.4s ease-in-out infinite breathe}@keyframes pulse-dot{0%,to{opacity:1;transform:scale(1)}50%{opacity:.55;transform:scale(.72)}}.animate-pulse-dot{animation:1.2s ease-in-out infinite pulse-dot}dialog.media-sheet{color:#fff;background:#000;width:100%;max-width:none;height:100dvh;max-height:none;margin:0;padding:0}dialog.media-sheet::backdrop{background:oklch(20% .01 60/.5)}@media (width>=640px) and (height>=560px){dialog.media-sheet{border-radius:calc(var(--radius) * 2);width:min(720px,100% - 48px);height:min(640px,100dvh - 48px);margin:auto;overflow:hidden}}@media (prefers-reduced-motion:reduce){.animate-rise,.animate-dock,.animate-settle,.animate-breathe,.animate-pulse-dot{animation:none}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"<length-percentage>";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"<length-percentage>";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"<length-percentage>";inherits:false;initial-value:100%}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-content{syntax:"*";inherits:false;initial-value:""}@keyframes spin{to{transform:rotate(360deg)}}@keyframes pulse{50%{opacity:.5}}
743
+ /*$vite$:1*/</style>
744
+ </head>
745
+ <body>
746
+ <div id="root"></div>
747
+ </body>
748
+ </html>