@motiadev/workbench 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +10 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +8 -0
- package/dist/middleware.d.ts +3 -0
- package/dist/middleware.d.ts.map +1 -0
- package/dist/middleware.js +47 -0
- package/dist/src/components/app-sidebar.d.ts +2 -0
- package/dist/src/components/app-sidebar.d.ts.map +1 -0
- package/dist/src/components/app-sidebar.js +13 -0
- package/dist/src/components/log-console.d.ts +2 -0
- package/dist/src/components/log-console.d.ts.map +1 -0
- package/dist/src/components/log-console.js +20 -0
- package/dist/src/components/log-level-badge.d.ts +4 -0
- package/dist/src/components/log-level-badge.d.ts.map +1 -0
- package/dist/src/components/log-level-badge.js +11 -0
- package/dist/src/components/ui/badge.d.ts +10 -0
- package/dist/src/components/ui/badge.d.ts.map +1 -0
- package/dist/src/components/ui/badge.js +23 -0
- package/dist/src/components/ui/button.d.ts +12 -0
- package/dist/src/components/ui/button.d.ts.map +1 -0
- package/dist/src/components/ui/button.js +34 -0
- package/dist/src/components/ui/collapsible.d.ts +6 -0
- package/dist/src/components/ui/collapsible.d.ts.map +1 -0
- package/dist/src/components/ui/collapsible.js +5 -0
- package/dist/src/components/ui/dialog.d.ts +20 -0
- package/dist/src/components/ui/dialog.d.ts.map +1 -0
- package/dist/src/components/ui/dialog.js +22 -0
- package/dist/src/components/ui/input.d.ts +4 -0
- package/dist/src/components/ui/input.d.ts.map +1 -0
- package/dist/src/components/ui/input.js +8 -0
- package/dist/src/components/ui/label.d.ts +6 -0
- package/dist/src/components/ui/label.d.ts.map +1 -0
- package/dist/src/components/ui/label.js +10 -0
- package/dist/src/components/ui/select.d.ts +14 -0
- package/dist/src/components/ui/select.d.ts.map +1 -0
- package/dist/src/components/ui/select.js +26 -0
- package/dist/src/components/ui/separator.d.ts +5 -0
- package/dist/src/components/ui/separator.d.ts.map +1 -0
- package/dist/src/components/ui/separator.js +8 -0
- package/dist/src/components/ui/sheet.d.ts +26 -0
- package/dist/src/components/ui/sheet.d.ts.map +1 -0
- package/dist/src/components/ui/sheet.js +36 -0
- package/dist/src/components/ui/sidebar.d.ts +67 -0
- package/dist/src/components/ui/sidebar.d.ts.map +1 -0
- package/dist/src/components/ui/sidebar.js +221 -0
- package/dist/src/components/ui/skeleton.d.ts +3 -0
- package/dist/src/components/ui/skeleton.d.ts.map +1 -0
- package/dist/src/components/ui/skeleton.js +6 -0
- package/dist/src/components/ui/switch.d.ts +5 -0
- package/dist/src/components/ui/switch.d.ts.map +1 -0
- package/dist/src/components/ui/switch.js +7 -0
- package/dist/src/components/ui/table.d.ts +11 -0
- package/dist/src/components/ui/table.d.ts.map +1 -0
- package/dist/src/components/ui/table.js +20 -0
- package/dist/src/components/ui/textarea.d.ts +4 -0
- package/dist/src/components/ui/textarea.d.ts.map +1 -0
- package/dist/src/components/ui/textarea.js +8 -0
- package/dist/src/components/ui/tooltip.d.ts +8 -0
- package/dist/src/components/ui/tooltip.d.ts.map +1 -0
- package/dist/src/components/ui/tooltip.js +11 -0
- package/dist/src/hooks/use-list-flows.d.ts +10 -0
- package/dist/src/hooks/use-list-flows.d.ts.map +1 -0
- package/dist/src/hooks/use-list-flows.js +12 -0
- package/dist/src/hooks/use-log-listener.d.ts +6 -0
- package/dist/src/hooks/use-log-listener.d.ts.map +1 -0
- package/dist/src/hooks/use-log-listener.js +22 -0
- package/dist/src/hooks/use-mobile.d.ts +2 -0
- package/dist/src/hooks/use-mobile.d.ts.map +1 -0
- package/dist/src/hooks/use-mobile.js +15 -0
- package/dist/src/lib/utils.d.ts +3 -0
- package/dist/src/lib/utils.d.ts.map +1 -0
- package/dist/src/lib/utils.js +5 -0
- package/dist/src/main.d.ts +9 -0
- package/dist/src/main.d.ts.map +1 -0
- package/dist/src/main.js +15 -0
- package/dist/src/publicComponents/api-node.d.ts +8 -0
- package/dist/src/publicComponents/api-node.d.ts.map +1 -0
- package/dist/src/publicComponents/api-node.js +7 -0
- package/dist/src/publicComponents/base-handle.d.ts +8 -0
- package/dist/src/publicComponents/base-handle.d.ts.map +1 -0
- package/dist/src/publicComponents/base-handle.js +7 -0
- package/dist/src/publicComponents/base-node.d.ts +16 -0
- package/dist/src/publicComponents/base-node.d.ts.map +1 -0
- package/dist/src/publicComponents/base-node.js +20 -0
- package/dist/src/publicComponents/emits.d.ts +5 -0
- package/dist/src/publicComponents/emits.d.ts.map +1 -0
- package/dist/src/publicComponents/emits.js +6 -0
- package/dist/src/publicComponents/event-node.d.ts +9 -0
- package/dist/src/publicComponents/event-node.d.ts.map +1 -0
- package/dist/src/publicComponents/event-node.js +9 -0
- package/dist/src/publicComponents/node-props.d.ts +12 -0
- package/dist/src/publicComponents/node-props.d.ts.map +1 -0
- package/dist/src/publicComponents/node-props.js +1 -0
- package/dist/src/publicComponents/noop-node.d.ts +8 -0
- package/dist/src/publicComponents/noop-node.d.ts.map +1 -0
- package/dist/src/publicComponents/noop-node.js +5 -0
- package/dist/src/publicComponents/subscribe.d.ts +5 -0
- package/dist/src/publicComponents/subscribe.d.ts.map +1 -0
- package/dist/src/publicComponents/subscribe.js +5 -0
- package/dist/src/route-wrapper.d.ts +4 -0
- package/dist/src/route-wrapper.d.ts.map +1 -0
- package/dist/src/route-wrapper.js +4 -0
- package/dist/src/routeTree.gen.d.ts +53 -0
- package/dist/src/routeTree.gen.d.ts.map +1 -0
- package/dist/src/routeTree.gen.js +45 -0
- package/dist/src/routes/__root.d.ts +2 -0
- package/dist/src/routes/__root.d.ts.map +1 -0
- package/dist/src/routes/__root.js +15 -0
- package/dist/src/routes/flow/$id.d.ts +4 -0
- package/dist/src/routes/flow/$id.d.ts.map +1 -0
- package/dist/src/routes/flow/$id.js +15 -0
- package/dist/src/routes/index.d.ts +2 -0
- package/dist/src/routes/index.d.ts.map +1 -0
- package/dist/src/routes/index.js +8 -0
- package/dist/src/stores/use-logs.d.ts +15 -0
- package/dist/src/stores/use-logs.d.ts.map +1 -0
- package/dist/src/stores/use-logs.js +6 -0
- package/dist/src/views/flow/arrow-head.d.ts +8 -0
- package/dist/src/views/flow/arrow-head.d.ts.map +1 -0
- package/dist/src/views/flow/arrow-head.js +2 -0
- package/dist/src/views/flow/base-edge.d.ts +4 -0
- package/dist/src/views/flow/base-edge.d.ts.map +1 -0
- package/dist/src/views/flow/base-edge.js +22 -0
- package/dist/src/views/flow/flow-loader.d.ts +2 -0
- package/dist/src/views/flow/flow-loader.d.ts.map +1 -0
- package/dist/src/views/flow/flow-loader.js +4 -0
- package/dist/src/views/flow/flow-view.d.ts +8 -0
- package/dist/src/views/flow/flow-view.d.ts.map +1 -0
- package/dist/src/views/flow/flow-view.js +40 -0
- package/dist/src/views/flow/hooks/use-get-flow-state.d.ts +40 -0
- package/dist/src/views/flow/hooks/use-get-flow-state.d.ts.map +1 -0
- package/dist/src/views/flow/hooks/use-get-flow-state.js +48 -0
- package/dist/src/views/flow/hooks/use-organize-nodes.d.ts +4 -0
- package/dist/src/views/flow/hooks/use-organize-nodes.d.ts.map +1 -0
- package/dist/src/views/flow/hooks/use-organize-nodes.js +43 -0
- package/dist/src/views/flow/legend.d.ts +4 -0
- package/dist/src/views/flow/legend.d.ts.map +1 -0
- package/dist/src/views/flow/legend.js +41 -0
- package/dist/src/views/flow/node-organizer.d.ts +6 -0
- package/dist/src/views/flow/node-organizer.d.ts.map +1 -0
- package/dist/src/views/flow/node-organizer.js +51 -0
- package/dist/src/views/flow/nodes/api-flow-node.d.ts +5 -0
- package/dist/src/views/flow/nodes/api-flow-node.d.ts.map +1 -0
- package/dist/src/views/flow/nodes/api-flow-node.js +5 -0
- package/dist/src/views/flow/nodes/event-flow-node.d.ts +3 -0
- package/dist/src/views/flow/nodes/event-flow-node.d.ts.map +1 -0
- package/dist/src/views/flow/nodes/event-flow-node.js +5 -0
- package/dist/src/views/flow/nodes/json-schema-form.d.ts +9 -0
- package/dist/src/views/flow/nodes/json-schema-form.d.ts.map +1 -0
- package/dist/src/views/flow/nodes/json-schema-form.js +35 -0
- package/dist/src/views/flow/nodes/language-indicator.d.ts +8 -0
- package/dist/src/views/flow/nodes/language-indicator.d.ts.map +1 -0
- package/dist/src/views/flow/nodes/language-indicator.js +25 -0
- package/dist/src/views/flow/nodes/nodes.types.d.ts +37 -0
- package/dist/src/views/flow/nodes/nodes.types.d.ts.map +1 -0
- package/dist/src/views/flow/nodes/nodes.types.js +1 -0
- package/dist/src/views/flow/nodes/noop-flow-node.d.ts +5 -0
- package/dist/src/views/flow/nodes/noop-flow-node.d.ts.map +1 -0
- package/dist/src/views/flow/nodes/noop-flow-node.js +5 -0
- package/dist/tailwind.config.d.ts +4 -0
- package/dist/tailwind.config.d.ts.map +1 -0
- package/dist/tailwind.config.js +77 -0
- package/dist/tsconfig.app.tsbuildinfo +1 -0
- package/dist/tsconfig.node.tsbuildinfo +1 -0
- package/dist/vite.config.d.ts +11 -0
- package/dist/vite.config.d.ts.map +1 -0
- package/dist/vite.config.js +18 -0
- package/middleware.ts +3 -2
- package/package.json +5 -3
- package/postcss.config.js +1 -1
- package/src/views/flow/base-edge.tsx +7 -20
- package/src/views/flow/flow-view.tsx +1 -1
- package/src/views/flow/hooks/use-get-flow-state.tsx +18 -34
- package/src/views/flow/legend.tsx +45 -8
- package/src/views/flow/nodes/nodes.types.ts +4 -4
- package/tsconfig.app.json +7 -5
- package/tsconfig.json +1 -0
- package/tsconfig.node.json +15 -5
- package/vite.config.ts +3 -3
- package/dist/.empty +0 -0
- package/dist/assets/index-DGmArPOa.css +0 -1
- package/dist/assets/index-hQsWtfVb.js +0 -182
- package/dist/index.html +0 -20
|
@@ -1,182 +0,0 @@
|
|
|
1
|
-
function qA(e,t){for(var n=0;n<t.length;n++){const i=t[n];if(typeof i!="string"&&!Array.isArray(i)){for(const o in i)if(o!=="default"&&!(o in e)){const a=Object.getOwnPropertyDescriptor(i,o);a&&Object.defineProperty(e,o,a.get?a:{enumerable:!0,get:()=>i[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))i(o);new MutationObserver(o=>{for(const a of o)if(a.type==="childList")for(const u of a.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&i(u)}).observe(document,{childList:!0,subtree:!0});function n(o){const a={};return o.integrity&&(a.integrity=o.integrity),o.referrerPolicy&&(a.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?a.credentials="include":o.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function i(o){if(o.ep)return;o.ep=!0;const a=n(o);fetch(o.href,a)}})();var bu=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function xl(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var td={exports:{}},ms={},nd={exports:{}},Ne={};/**
|
|
2
|
-
* @license React
|
|
3
|
-
* react.production.min.js
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
-
*
|
|
7
|
-
* This source code is licensed under the MIT license found in the
|
|
8
|
-
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var i1;function FA(){if(i1)return Ne;i1=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),u=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),p=Symbol.iterator;function v(j){return j===null||typeof j!="object"?null:(j=p&&j[p]||j["@@iterator"],typeof j=="function"?j:null)}var m={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,w={};function _(j,X,oe){this.props=j,this.context=X,this.refs=w,this.updater=oe||m}_.prototype.isReactComponent={},_.prototype.setState=function(j,X){if(typeof j!="object"&&typeof j!="function"&&j!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,j,X,"setState")},_.prototype.forceUpdate=function(j){this.updater.enqueueForceUpdate(this,j,"forceUpdate")};function S(){}S.prototype=_.prototype;function k(j,X,oe){this.props=j,this.context=X,this.refs=w,this.updater=oe||m}var E=k.prototype=new S;E.constructor=k,x(E,_.prototype),E.isPureReactComponent=!0;var C=Array.isArray,R=Object.prototype.hasOwnProperty,A={current:null},T={key:!0,ref:!0,__self:!0,__source:!0};function L(j,X,oe){var V,G={},Z=null,ne=null;if(X!=null)for(V in X.ref!==void 0&&(ne=X.ref),X.key!==void 0&&(Z=""+X.key),X)R.call(X,V)&&!T.hasOwnProperty(V)&&(G[V]=X[V]);var re=arguments.length-2;if(re===1)G.children=oe;else if(1<re){for(var se=Array(re),de=0;de<re;de++)se[de]=arguments[de+2];G.children=se}if(j&&j.defaultProps)for(V in re=j.defaultProps,re)G[V]===void 0&&(G[V]=re[V]);return{$$typeof:e,type:j,key:Z,ref:ne,props:G,_owner:A.current}}function O(j,X){return{$$typeof:e,type:j.type,key:X,ref:j.ref,props:j.props,_owner:j._owner}}function q(j){return typeof j=="object"&&j!==null&&j.$$typeof===e}function F(j){var X={"=":"=0",":":"=2"};return"$"+j.replace(/[=:]/g,function(oe){return X[oe]})}var $=/\/+/g;function W(j,X){return typeof j=="object"&&j!==null&&j.key!=null?F(""+j.key):X.toString(36)}function I(j,X,oe,V,G){var Z=typeof j;(Z==="undefined"||Z==="boolean")&&(j=null);var ne=!1;if(j===null)ne=!0;else switch(Z){case"string":case"number":ne=!0;break;case"object":switch(j.$$typeof){case e:case t:ne=!0}}if(ne)return ne=j,G=G(ne),j=V===""?"."+W(ne,0):V,C(G)?(oe="",j!=null&&(oe=j.replace($,"$&/")+"/"),I(G,X,oe,"",function(de){return de})):G!=null&&(q(G)&&(G=O(G,oe+(!G.key||ne&&ne.key===G.key?"":(""+G.key).replace($,"$&/")+"/")+j)),X.push(G)),1;if(ne=0,V=V===""?".":V+":",C(j))for(var re=0;re<j.length;re++){Z=j[re];var se=V+W(Z,re);ne+=I(Z,X,oe,se,G)}else if(se=v(j),typeof se=="function")for(j=se.call(j),re=0;!(Z=j.next()).done;)Z=Z.value,se=V+W(Z,re++),ne+=I(Z,X,oe,se,G);else if(Z==="object")throw X=String(j),Error("Objects are not valid as a React child (found: "+(X==="[object Object]"?"object with keys {"+Object.keys(j).join(", ")+"}":X)+"). If you meant to render a collection of children, use an array instead.");return ne}function H(j,X,oe){if(j==null)return j;var V=[],G=0;return I(j,V,"","",function(Z){return X.call(oe,Z,G++)}),V}function z(j){if(j._status===-1){var X=j._result;X=X(),X.then(function(oe){(j._status===0||j._status===-1)&&(j._status=1,j._result=oe)},function(oe){(j._status===0||j._status===-1)&&(j._status=2,j._result=oe)}),j._status===-1&&(j._status=0,j._result=X)}if(j._status===1)return j._result.default;throw j._result}var Q={current:null},D={transition:null},U={ReactCurrentDispatcher:Q,ReactCurrentBatchConfig:D,ReactCurrentOwner:A};function K(){throw Error("act(...) is not supported in production builds of React.")}return Ne.Children={map:H,forEach:function(j,X,oe){H(j,function(){X.apply(this,arguments)},oe)},count:function(j){var X=0;return H(j,function(){X++}),X},toArray:function(j){return H(j,function(X){return X})||[]},only:function(j){if(!q(j))throw Error("React.Children.only expected to receive a single React element child.");return j}},Ne.Component=_,Ne.Fragment=n,Ne.Profiler=o,Ne.PureComponent=k,Ne.StrictMode=i,Ne.Suspense=f,Ne.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=U,Ne.act=K,Ne.cloneElement=function(j,X,oe){if(j==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+j+".");var V=x({},j.props),G=j.key,Z=j.ref,ne=j._owner;if(X!=null){if(X.ref!==void 0&&(Z=X.ref,ne=A.current),X.key!==void 0&&(G=""+X.key),j.type&&j.type.defaultProps)var re=j.type.defaultProps;for(se in X)R.call(X,se)&&!T.hasOwnProperty(se)&&(V[se]=X[se]===void 0&&re!==void 0?re[se]:X[se])}var se=arguments.length-2;if(se===1)V.children=oe;else if(1<se){re=Array(se);for(var de=0;de<se;de++)re[de]=arguments[de+2];V.children=re}return{$$typeof:e,type:j.type,key:G,ref:Z,props:V,_owner:ne}},Ne.createContext=function(j){return j={$$typeof:u,_currentValue:j,_currentValue2:j,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},j.Provider={$$typeof:a,_context:j},j.Consumer=j},Ne.createElement=L,Ne.createFactory=function(j){var X=L.bind(null,j);return X.type=j,X},Ne.createRef=function(){return{current:null}},Ne.forwardRef=function(j){return{$$typeof:l,render:j}},Ne.isValidElement=q,Ne.lazy=function(j){return{$$typeof:h,_payload:{_status:-1,_result:j},_init:z}},Ne.memo=function(j,X){return{$$typeof:d,type:j,compare:X===void 0?null:X}},Ne.startTransition=function(j){var X=D.transition;D.transition={};try{j()}finally{D.transition=X}},Ne.unstable_act=K,Ne.useCallback=function(j,X){return Q.current.useCallback(j,X)},Ne.useContext=function(j){return Q.current.useContext(j)},Ne.useDebugValue=function(){},Ne.useDeferredValue=function(j){return Q.current.useDeferredValue(j)},Ne.useEffect=function(j,X){return Q.current.useEffect(j,X)},Ne.useId=function(){return Q.current.useId()},Ne.useImperativeHandle=function(j,X,oe){return Q.current.useImperativeHandle(j,X,oe)},Ne.useInsertionEffect=function(j,X){return Q.current.useInsertionEffect(j,X)},Ne.useLayoutEffect=function(j,X){return Q.current.useLayoutEffect(j,X)},Ne.useMemo=function(j,X){return Q.current.useMemo(j,X)},Ne.useReducer=function(j,X,oe){return Q.current.useReducer(j,X,oe)},Ne.useRef=function(j){return Q.current.useRef(j)},Ne.useState=function(j){return Q.current.useState(j)},Ne.useSyncExternalStore=function(j,X,oe){return Q.current.useSyncExternalStore(j,X,oe)},Ne.useTransition=function(){return Q.current.useTransition()},Ne.version="18.3.1",Ne}var o1;function hi(){return o1||(o1=1,nd.exports=FA()),nd.exports}/**
|
|
10
|
-
* @license React
|
|
11
|
-
* react-jsx-runtime.production.min.js
|
|
12
|
-
*
|
|
13
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
14
|
-
*
|
|
15
|
-
* This source code is licensed under the MIT license found in the
|
|
16
|
-
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var s1;function zA(){if(s1)return ms;s1=1;var e=hi(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function u(l,f,d){var h,p={},v=null,m=null;d!==void 0&&(v=""+d),f.key!==void 0&&(v=""+f.key),f.ref!==void 0&&(m=f.ref);for(h in f)i.call(f,h)&&!a.hasOwnProperty(h)&&(p[h]=f[h]);if(l&&l.defaultProps)for(h in f=l.defaultProps,f)p[h]===void 0&&(p[h]=f[h]);return{$$typeof:t,type:l,key:v,ref:m,props:p,_owner:o.current}}return ms.Fragment=n,ms.jsx=u,ms.jsxs=u,ms}var a1;function $A(){return a1||(a1=1,td.exports=zA()),td.exports}var M=$A(),P=hi();const ER=xl(P),BA=qA({__proto__:null,default:ER},[P]);var Su={},rd={exports:{}},Et={},id={exports:{}},od={};/**
|
|
18
|
-
* @license React
|
|
19
|
-
* scheduler.production.min.js
|
|
20
|
-
*
|
|
21
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
22
|
-
*
|
|
23
|
-
* This source code is licensed under the MIT license found in the
|
|
24
|
-
* LICENSE file in the root directory of this source tree.
|
|
25
|
-
*/var u1;function VA(){return u1||(u1=1,function(e){function t(D,U){var K=D.length;D.push(U);e:for(;0<K;){var j=K-1>>>1,X=D[j];if(0<o(X,U))D[j]=U,D[K]=X,K=j;else break e}}function n(D){return D.length===0?null:D[0]}function i(D){if(D.length===0)return null;var U=D[0],K=D.pop();if(K!==U){D[0]=K;e:for(var j=0,X=D.length,oe=X>>>1;j<oe;){var V=2*(j+1)-1,G=D[V],Z=V+1,ne=D[Z];if(0>o(G,K))Z<X&&0>o(ne,G)?(D[j]=ne,D[Z]=K,j=Z):(D[j]=G,D[V]=K,j=V);else if(Z<X&&0>o(ne,K))D[j]=ne,D[Z]=K,j=Z;else break e}}return U}function o(D,U){var K=D.sortIndex-U.sortIndex;return K!==0?K:D.id-U.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var u=Date,l=u.now();e.unstable_now=function(){return u.now()-l}}var f=[],d=[],h=1,p=null,v=3,m=!1,x=!1,w=!1,_=typeof setTimeout=="function"?setTimeout:null,S=typeof clearTimeout=="function"?clearTimeout:null,k=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function E(D){for(var U=n(d);U!==null;){if(U.callback===null)i(d);else if(U.startTime<=D)i(d),U.sortIndex=U.expirationTime,t(f,U);else break;U=n(d)}}function C(D){if(w=!1,E(D),!x)if(n(f)!==null)x=!0,z(R);else{var U=n(d);U!==null&&Q(C,U.startTime-D)}}function R(D,U){x=!1,w&&(w=!1,S(L),L=-1),m=!0;var K=v;try{for(E(U),p=n(f);p!==null&&(!(p.expirationTime>U)||D&&!F());){var j=p.callback;if(typeof j=="function"){p.callback=null,v=p.priorityLevel;var X=j(p.expirationTime<=U);U=e.unstable_now(),typeof X=="function"?p.callback=X:p===n(f)&&i(f),E(U)}else i(f);p=n(f)}if(p!==null)var oe=!0;else{var V=n(d);V!==null&&Q(C,V.startTime-U),oe=!1}return oe}finally{p=null,v=K,m=!1}}var A=!1,T=null,L=-1,O=5,q=-1;function F(){return!(e.unstable_now()-q<O)}function $(){if(T!==null){var D=e.unstable_now();q=D;var U=!0;try{U=T(!0,D)}finally{U?W():(A=!1,T=null)}}else A=!1}var W;if(typeof k=="function")W=function(){k($)};else if(typeof MessageChannel<"u"){var I=new MessageChannel,H=I.port2;I.port1.onmessage=$,W=function(){H.postMessage(null)}}else W=function(){_($,0)};function z(D){T=D,A||(A=!0,W())}function Q(D,U){L=_(function(){D(e.unstable_now())},U)}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(D){D.callback=null},e.unstable_continueExecution=function(){x||m||(x=!0,z(R))},e.unstable_forceFrameRate=function(D){0>D||125<D?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):O=0<D?Math.floor(1e3/D):5},e.unstable_getCurrentPriorityLevel=function(){return v},e.unstable_getFirstCallbackNode=function(){return n(f)},e.unstable_next=function(D){switch(v){case 1:case 2:case 3:var U=3;break;default:U=v}var K=v;v=U;try{return D()}finally{v=K}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(D,U){switch(D){case 1:case 2:case 3:case 4:case 5:break;default:D=3}var K=v;v=D;try{return U()}finally{v=K}},e.unstable_scheduleCallback=function(D,U,K){var j=e.unstable_now();switch(typeof K=="object"&&K!==null?(K=K.delay,K=typeof K=="number"&&0<K?j+K:j):K=j,D){case 1:var X=-1;break;case 2:X=250;break;case 5:X=1073741823;break;case 4:X=1e4;break;default:X=5e3}return X=K+X,D={id:h++,callback:U,priorityLevel:D,startTime:K,expirationTime:X,sortIndex:-1},K>j?(D.sortIndex=K,t(d,D),n(f)===null&&D===n(d)&&(w?(S(L),L=-1):w=!0,Q(C,K-j))):(D.sortIndex=X,t(f,D),x||m||(x=!0,z(R))),D},e.unstable_shouldYield=F,e.unstable_wrapCallback=function(D){var U=v;return function(){var K=v;v=U;try{return D.apply(this,arguments)}finally{v=K}}}}(od)),od}var l1;function HA(){return l1||(l1=1,id.exports=VA()),id.exports}/**
|
|
26
|
-
* @license React
|
|
27
|
-
* react-dom.production.min.js
|
|
28
|
-
*
|
|
29
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
30
|
-
*
|
|
31
|
-
* This source code is licensed under the MIT license found in the
|
|
32
|
-
* LICENSE file in the root directory of this source tree.
|
|
33
|
-
*/var c1;function UA(){if(c1)return Et;c1=1;var e=hi(),t=HA();function n(r){for(var s="https://reactjs.org/docs/error-decoder.html?invariant="+r,c=1;c<arguments.length;c++)s+="&args[]="+encodeURIComponent(arguments[c]);return"Minified React error #"+r+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var i=new Set,o={};function a(r,s){u(r,s),u(r+"Capture",s)}function u(r,s){for(o[r]=s,r=0;r<s.length;r++)i.add(s[r])}var l=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),f=Object.prototype.hasOwnProperty,d=/^[: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]*$/,h={},p={};function v(r){return f.call(p,r)?!0:f.call(h,r)?!1:d.test(r)?p[r]=!0:(h[r]=!0,!1)}function m(r,s,c,g){if(c!==null&&c.type===0)return!1;switch(typeof s){case"function":case"symbol":return!0;case"boolean":return g?!1:c!==null?!c.acceptsBooleans:(r=r.toLowerCase().slice(0,5),r!=="data-"&&r!=="aria-");default:return!1}}function x(r,s,c,g){if(s===null||typeof s>"u"||m(r,s,c,g))return!0;if(g)return!1;if(c!==null)switch(c.type){case 3:return!s;case 4:return s===!1;case 5:return isNaN(s);case 6:return isNaN(s)||1>s}return!1}function w(r,s,c,g,y,b,N){this.acceptsBooleans=s===2||s===3||s===4,this.attributeName=g,this.attributeNamespace=y,this.mustUseProperty=c,this.propertyName=r,this.type=s,this.sanitizeURL=b,this.removeEmptyString=N}var _={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(r){_[r]=new w(r,0,!1,r,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(r){var s=r[0];_[s]=new w(s,1,!1,r[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(r){_[r]=new w(r,2,!1,r.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(r){_[r]=new w(r,2,!1,r,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(r){_[r]=new w(r,3,!1,r.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(r){_[r]=new w(r,3,!0,r,null,!1,!1)}),["capture","download"].forEach(function(r){_[r]=new w(r,4,!1,r,null,!1,!1)}),["cols","rows","size","span"].forEach(function(r){_[r]=new w(r,6,!1,r,null,!1,!1)}),["rowSpan","start"].forEach(function(r){_[r]=new w(r,5,!1,r.toLowerCase(),null,!1,!1)});var S=/[\-:]([a-z])/g;function k(r){return r[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(r){var s=r.replace(S,k);_[s]=new w(s,1,!1,r,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(r){var s=r.replace(S,k);_[s]=new w(s,1,!1,r,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(r){var s=r.replace(S,k);_[s]=new w(s,1,!1,r,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(r){_[r]=new w(r,1,!1,r.toLowerCase(),null,!1,!1)}),_.xlinkHref=new w("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(r){_[r]=new w(r,1,!1,r.toLowerCase(),null,!0,!0)});function E(r,s,c,g){var y=_.hasOwnProperty(s)?_[s]:null;(y!==null?y.type!==0:g||!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(x(s,c,y,g)&&(c=null),g||y===null?v(s)&&(c===null?r.removeAttribute(s):r.setAttribute(s,""+c)):y.mustUseProperty?r[y.propertyName]=c===null?y.type===3?!1:"":c:(s=y.attributeName,g=y.attributeNamespace,c===null?r.removeAttribute(s):(y=y.type,c=y===3||y===4&&c===!0?"":""+c,g?r.setAttributeNS(g,s,c):r.setAttribute(s,c))))}var C=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,R=Symbol.for("react.element"),A=Symbol.for("react.portal"),T=Symbol.for("react.fragment"),L=Symbol.for("react.strict_mode"),O=Symbol.for("react.profiler"),q=Symbol.for("react.provider"),F=Symbol.for("react.context"),$=Symbol.for("react.forward_ref"),W=Symbol.for("react.suspense"),I=Symbol.for("react.suspense_list"),H=Symbol.for("react.memo"),z=Symbol.for("react.lazy"),Q=Symbol.for("react.offscreen"),D=Symbol.iterator;function U(r){return r===null||typeof r!="object"?null:(r=D&&r[D]||r["@@iterator"],typeof r=="function"?r:null)}var K=Object.assign,j;function X(r){if(j===void 0)try{throw Error()}catch(c){var s=c.stack.trim().match(/\n( *(at )?)/);j=s&&s[1]||""}return`
|
|
34
|
-
`+j+r}var oe=!1;function V(r,s){if(!r||oe)return"";oe=!0;var c=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(s)if(s=function(){throw Error()},Object.defineProperty(s.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(s,[])}catch(ie){var g=ie}Reflect.construct(r,[],s)}else{try{s.call()}catch(ie){g=ie}r.call(s.prototype)}else{try{throw Error()}catch(ie){g=ie}r()}}catch(ie){if(ie&&g&&typeof ie.stack=="string"){for(var y=ie.stack.split(`
|
|
35
|
-
`),b=g.stack.split(`
|
|
36
|
-
`),N=y.length-1,B=b.length-1;1<=N&&0<=B&&y[N]!==b[B];)B--;for(;1<=N&&0<=B;N--,B--)if(y[N]!==b[B]){if(N!==1||B!==1)do if(N--,B--,0>B||y[N]!==b[B]){var Y=`
|
|
37
|
-
`+y[N].replace(" at new "," at ");return r.displayName&&Y.includes("<anonymous>")&&(Y=Y.replace("<anonymous>",r.displayName)),Y}while(1<=N&&0<=B);break}}}finally{oe=!1,Error.prepareStackTrace=c}return(r=r?r.displayName||r.name:"")?X(r):""}function G(r){switch(r.tag){case 5:return X(r.type);case 16:return X("Lazy");case 13:return X("Suspense");case 19:return X("SuspenseList");case 0:case 2:case 15:return r=V(r.type,!1),r;case 11:return r=V(r.type.render,!1),r;case 1:return r=V(r.type,!0),r;default:return""}}function Z(r){if(r==null)return null;if(typeof r=="function")return r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case T:return"Fragment";case A:return"Portal";case O:return"Profiler";case L:return"StrictMode";case W:return"Suspense";case I:return"SuspenseList"}if(typeof r=="object")switch(r.$$typeof){case F:return(r.displayName||"Context")+".Consumer";case q:return(r._context.displayName||"Context")+".Provider";case $:var s=r.render;return r=r.displayName,r||(r=s.displayName||s.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case H:return s=r.displayName||null,s!==null?s:Z(r.type)||"Memo";case z:s=r._payload,r=r._init;try{return Z(r(s))}catch{}}return null}function ne(r){var s=r.type;switch(r.tag){case 24:return"Cache";case 9:return(s.displayName||"Context")+".Consumer";case 10:return(s._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return r=s.render,r=r.displayName||r.name||"",s.displayName||(r!==""?"ForwardRef("+r+")":"ForwardRef");case 7:return"Fragment";case 5:return s;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Z(s);case 8:return s===L?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof s=="function")return s.displayName||s.name||null;if(typeof s=="string")return s}return null}function re(r){switch(typeof r){case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function se(r){var s=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function de(r){var s=se(r)?"checked":"value",c=Object.getOwnPropertyDescriptor(r.constructor.prototype,s),g=""+r[s];if(!r.hasOwnProperty(s)&&typeof c<"u"&&typeof c.get=="function"&&typeof c.set=="function"){var y=c.get,b=c.set;return Object.defineProperty(r,s,{configurable:!0,get:function(){return y.call(this)},set:function(N){g=""+N,b.call(this,N)}}),Object.defineProperty(r,s,{enumerable:c.enumerable}),{getValue:function(){return g},setValue:function(N){g=""+N},stopTracking:function(){r._valueTracker=null,delete r[s]}}}}function fe(r){r._valueTracker||(r._valueTracker=de(r))}function he(r){if(!r)return!1;var s=r._valueTracker;if(!s)return!0;var c=s.getValue(),g="";return r&&(g=se(r)?r.checked?"true":"false":r.value),r=g,r!==c?(s.setValue(r),!0):!1}function ge(r){if(r=r||(typeof document<"u"?document:void 0),typeof r>"u")return null;try{return r.activeElement||r.body}catch{return r.body}}function be(r,s){var c=s.checked;return K({},s,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:c??r._wrapperState.initialChecked})}function we(r,s){var c=s.defaultValue==null?"":s.defaultValue,g=s.checked!=null?s.checked:s.defaultChecked;c=re(s.value!=null?s.value:c),r._wrapperState={initialChecked:g,initialValue:c,controlled:s.type==="checkbox"||s.type==="radio"?s.checked!=null:s.value!=null}}function De(r,s){s=s.checked,s!=null&&E(r,"checked",s,!1)}function Ce(r,s){De(r,s);var c=re(s.value),g=s.type;if(c!=null)g==="number"?(c===0&&r.value===""||r.value!=c)&&(r.value=""+c):r.value!==""+c&&(r.value=""+c);else if(g==="submit"||g==="reset"){r.removeAttribute("value");return}s.hasOwnProperty("value")?Ke(r,s.type,c):s.hasOwnProperty("defaultValue")&&Ke(r,s.type,re(s.defaultValue)),s.checked==null&&s.defaultChecked!=null&&(r.defaultChecked=!!s.defaultChecked)}function it(r,s,c){if(s.hasOwnProperty("value")||s.hasOwnProperty("defaultValue")){var g=s.type;if(!(g!=="submit"&&g!=="reset"||s.value!==void 0&&s.value!==null))return;s=""+r._wrapperState.initialValue,c||s===r.value||(r.value=s),r.defaultValue=s}c=r.name,c!==""&&(r.name=""),r.defaultChecked=!!r._wrapperState.initialChecked,c!==""&&(r.name=c)}function Ke(r,s,c){(s!=="number"||ge(r.ownerDocument)!==r)&&(c==null?r.defaultValue=""+r._wrapperState.initialValue:r.defaultValue!==""+c&&(r.defaultValue=""+c))}var Pe=Array.isArray;function Me(r,s,c,g){if(r=r.options,s){s={};for(var y=0;y<c.length;y++)s["$"+c[y]]=!0;for(c=0;c<r.length;c++)y=s.hasOwnProperty("$"+r[c].value),r[c].selected!==y&&(r[c].selected=y),y&&g&&(r[c].defaultSelected=!0)}else{for(c=""+re(c),s=null,y=0;y<r.length;y++){if(r[y].value===c){r[y].selected=!0,g&&(r[y].defaultSelected=!0);return}s!==null||r[y].disabled||(s=r[y])}s!==null&&(s.selected=!0)}}function Ye(r,s){if(s.dangerouslySetInnerHTML!=null)throw Error(n(91));return K({},s,{value:void 0,defaultValue:void 0,children:""+r._wrapperState.initialValue})}function je(r,s){var c=s.value;if(c==null){if(c=s.children,s=s.defaultValue,c!=null){if(s!=null)throw Error(n(92));if(Pe(c)){if(1<c.length)throw Error(n(93));c=c[0]}s=c}s==null&&(s=""),c=s}r._wrapperState={initialValue:re(c)}}function Pt(r,s){var c=re(s.value),g=re(s.defaultValue);c!=null&&(c=""+c,c!==r.value&&(r.value=c),s.defaultValue==null&&r.defaultValue!==c&&(r.defaultValue=c)),g!=null&&(r.defaultValue=""+g)}function pt(r){var s=r.textContent;s===r._wrapperState.initialValue&&s!==""&&s!==null&&(r.value=s)}function yn(r){switch(r){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Jt(r,s){return r==null||r==="http://www.w3.org/1999/xhtml"?yn(s):r==="http://www.w3.org/2000/svg"&&s==="foreignObject"?"http://www.w3.org/1999/xhtml":r}var Nt,An=function(r){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(s,c,g,y){MSApp.execUnsafeLocalFunction(function(){return r(s,c,g,y)})}:r}(function(r,s){if(r.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in r)r.innerHTML=s;else{for(Nt=Nt||document.createElement("div"),Nt.innerHTML="<svg>"+s.valueOf().toString()+"</svg>",s=Nt.firstChild;r.firstChild;)r.removeChild(r.firstChild);for(;s.firstChild;)r.appendChild(s.firstChild)}});function wn(r,s){if(s){var c=r.firstChild;if(c&&c===r.lastChild&&c.nodeType===3){c.nodeValue=s;return}}r.textContent=s}var In={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},yi=["Webkit","ms","Moz","O"];Object.keys(In).forEach(function(r){yi.forEach(function(s){s=s+r.charAt(0).toUpperCase()+r.substring(1),In[s]=In[r]})});function Tt(r,s,c){return s==null||typeof s=="boolean"||s===""?"":c||typeof s!="number"||s===0||In.hasOwnProperty(r)&&In[r]?(""+s).trim():s+"px"}function Bt(r,s){r=r.style;for(var c in s)if(s.hasOwnProperty(c)){var g=c.indexOf("--")===0,y=Tt(c,s[c],g);c==="float"&&(c="cssFloat"),g?r.setProperty(c,y):r[c]=y}}var lc=K({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Po(r,s){if(s){if(lc[r]&&(s.children!=null||s.dangerouslySetInnerHTML!=null))throw Error(n(137,r));if(s.dangerouslySetInnerHTML!=null){if(s.children!=null)throw Error(n(60));if(typeof s.dangerouslySetInnerHTML!="object"||!("__html"in s.dangerouslySetInnerHTML))throw Error(n(61))}if(s.style!=null&&typeof s.style!="object")throw Error(n(62))}}function No(r,s){if(r.indexOf("-")===-1)return typeof s.is=="string";switch(r){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 To=null;function Mo(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var Ao=null,ir=null,or=null;function ua(r){if(r=ns(r)){if(typeof Ao!="function")throw Error(n(280));var s=r.stateNode;s&&(s=ja(s),Ao(r.stateNode,r.type,s))}}function Io(r){ir?or?or.push(r):or=[r]:ir=r}function la(){if(ir){var r=ir,s=or;if(or=ir=null,ua(r),s)for(r=0;r<s.length;r++)ua(s[r])}}function ca(r,s){return r(s)}function fa(){}var Lo=!1;function da(r,s,c){if(Lo)return r(s,c);Lo=!0;try{return ca(r,s,c)}finally{Lo=!1,(ir!==null||or!==null)&&(fa(),la())}}function Fr(r,s){var c=r.stateNode;if(c===null)return null;var g=ja(c);if(g===null)return null;c=g[s];e:switch(s){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(g=!g.disabled)||(r=r.type,g=!(r==="button"||r==="input"||r==="select"||r==="textarea")),r=!g;break e;default:r=!1}if(r)return null;if(c&&typeof c!="function")throw Error(n(231,s,typeof c));return c}var Oo=!1;if(l)try{var zr={};Object.defineProperty(zr,"passive",{get:function(){Oo=!0}}),window.addEventListener("test",zr,zr),window.removeEventListener("test",zr,zr)}catch{Oo=!1}function cc(r,s,c,g,y,b,N,B,Y){var ie=Array.prototype.slice.call(arguments,3);try{s.apply(c,ie)}catch(ue){this.onError(ue)}}var $r=!1,wi=null,xi=!1,Do=null,fc={onError:function(r){$r=!0,wi=r}};function dc(r,s,c,g,y,b,N,B,Y){$r=!1,wi=null,cc.apply(fc,arguments)}function ha(r,s,c,g,y,b,N,B,Y){if(dc.apply(this,arguments),$r){if($r){var ie=wi;$r=!1,wi=null}else throw Error(n(198));xi||(xi=!0,Do=ie)}}function xn(r){var s=r,c=r;if(r.alternate)for(;s.return;)s=s.return;else{r=s;do s=r,s.flags&4098&&(c=s.return),r=s.return;while(r)}return s.tag===3?c:null}function pa(r){if(r.tag===13){var s=r.memoizedState;if(s===null&&(r=r.alternate,r!==null&&(s=r.memoizedState)),s!==null)return s.dehydrated}return null}function ga(r){if(xn(r)!==r)throw Error(n(188))}function hc(r){var s=r.alternate;if(!s){if(s=xn(r),s===null)throw Error(n(188));return s!==r?null:r}for(var c=r,g=s;;){var y=c.return;if(y===null)break;var b=y.alternate;if(b===null){if(g=y.return,g!==null){c=g;continue}break}if(y.child===b.child){for(b=y.child;b;){if(b===c)return ga(y),r;if(b===g)return ga(y),s;b=b.sibling}throw Error(n(188))}if(c.return!==g.return)c=y,g=b;else{for(var N=!1,B=y.child;B;){if(B===c){N=!0,c=y,g=b;break}if(B===g){N=!0,g=y,c=b;break}B=B.sibling}if(!N){for(B=b.child;B;){if(B===c){N=!0,c=b,g=y;break}if(B===g){N=!0,g=b,c=y;break}B=B.sibling}if(!N)throw Error(n(189))}}if(c.alternate!==g)throw Error(n(190))}if(c.tag!==3)throw Error(n(188));return c.stateNode.current===c?r:s}function va(r){return r=hc(r),r!==null?ma(r):null}function ma(r){if(r.tag===5||r.tag===6)return r;for(r=r.child;r!==null;){var s=ma(r);if(s!==null)return s;r=r.sibling}return null}var ya=t.unstable_scheduleCallback,wa=t.unstable_cancelCallback,xa=t.unstable_shouldYield,pc=t.unstable_requestPaint,Ue=t.unstable_now,gc=t.unstable_getCurrentPriorityLevel,jo=t.unstable_ImmediatePriority,_a=t.unstable_UserBlockingPriority,_i=t.unstable_NormalPriority,vc=t.unstable_LowPriority,qo=t.unstable_IdlePriority,bi=null,Vt=null;function mc(r){if(Vt&&typeof Vt.onCommitFiberRoot=="function")try{Vt.onCommitFiberRoot(bi,r,void 0,(r.current.flags&128)===128)}catch{}}var Mt=Math.clz32?Math.clz32:xc,yc=Math.log,wc=Math.LN2;function xc(r){return r>>>=0,r===0?32:31-(yc(r)/wc|0)|0}var Si=64,Ei=4194304;function Ln(r){switch(r&-r){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return r&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return r&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return r}}function Ci(r,s){var c=r.pendingLanes;if(c===0)return 0;var g=0,y=r.suspendedLanes,b=r.pingedLanes,N=c&268435455;if(N!==0){var B=N&~y;B!==0?g=Ln(B):(b&=N,b!==0&&(g=Ln(b)))}else N=c&~y,N!==0?g=Ln(N):b!==0&&(g=Ln(b));if(g===0)return 0;if(s!==0&&s!==g&&!(s&y)&&(y=g&-g,b=s&-s,y>=b||y===16&&(b&4194240)!==0))return s;if(g&4&&(g|=c&16),s=r.entangledLanes,s!==0)for(r=r.entanglements,s&=g;0<s;)c=31-Mt(s),y=1<<c,g|=r[c],s&=~y;return g}function i2(r,s){switch(r){case 1:case 2:case 4:return s+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return s+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function o2(r,s){for(var c=r.suspendedLanes,g=r.pingedLanes,y=r.expirationTimes,b=r.pendingLanes;0<b;){var N=31-Mt(b),B=1<<N,Y=y[N];Y===-1?(!(B&c)||B&g)&&(y[N]=i2(B,s)):Y<=s&&(r.expiredLanes|=B),b&=~B}}function _c(r){return r=r.pendingLanes&-1073741825,r!==0?r:r&1073741824?1073741824:0}function O0(){var r=Si;return Si<<=1,!(Si&4194240)&&(Si=64),r}function bc(r){for(var s=[],c=0;31>c;c++)s.push(r);return s}function Fo(r,s,c){r.pendingLanes|=s,s!==536870912&&(r.suspendedLanes=0,r.pingedLanes=0),r=r.eventTimes,s=31-Mt(s),r[s]=c}function s2(r,s){var c=r.pendingLanes&~s;r.pendingLanes=s,r.suspendedLanes=0,r.pingedLanes=0,r.expiredLanes&=s,r.mutableReadLanes&=s,r.entangledLanes&=s,s=r.entanglements;var g=r.eventTimes;for(r=r.expirationTimes;0<c;){var y=31-Mt(c),b=1<<y;s[y]=0,g[y]=-1,r[y]=-1,c&=~b}}function Sc(r,s){var c=r.entangledLanes|=s;for(r=r.entanglements;c;){var g=31-Mt(c),y=1<<g;y&s|r[g]&s&&(r[g]|=s),c&=~y}}var Oe=0;function D0(r){return r&=-r,1<r?4<r?r&268435455?16:536870912:4:1}var j0,Ec,q0,F0,z0,Cc=!1,ba=[],sr=null,ar=null,ur=null,zo=new Map,$o=new Map,lr=[],a2="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function $0(r,s){switch(r){case"focusin":case"focusout":sr=null;break;case"dragenter":case"dragleave":ar=null;break;case"mouseover":case"mouseout":ur=null;break;case"pointerover":case"pointerout":zo.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":$o.delete(s.pointerId)}}function Bo(r,s,c,g,y,b){return r===null||r.nativeEvent!==b?(r={blockedOn:s,domEventName:c,eventSystemFlags:g,nativeEvent:b,targetContainers:[y]},s!==null&&(s=ns(s),s!==null&&Ec(s)),r):(r.eventSystemFlags|=g,s=r.targetContainers,y!==null&&s.indexOf(y)===-1&&s.push(y),r)}function u2(r,s,c,g,y){switch(s){case"focusin":return sr=Bo(sr,r,s,c,g,y),!0;case"dragenter":return ar=Bo(ar,r,s,c,g,y),!0;case"mouseover":return ur=Bo(ur,r,s,c,g,y),!0;case"pointerover":var b=y.pointerId;return zo.set(b,Bo(zo.get(b)||null,r,s,c,g,y)),!0;case"gotpointercapture":return b=y.pointerId,$o.set(b,Bo($o.get(b)||null,r,s,c,g,y)),!0}return!1}function B0(r){var s=Br(r.target);if(s!==null){var c=xn(s);if(c!==null){if(s=c.tag,s===13){if(s=pa(c),s!==null){r.blockedOn=s,z0(r.priority,function(){q0(c)});return}}else if(s===3&&c.stateNode.current.memoizedState.isDehydrated){r.blockedOn=c.tag===3?c.stateNode.containerInfo:null;return}}}r.blockedOn=null}function Sa(r){if(r.blockedOn!==null)return!1;for(var s=r.targetContainers;0<s.length;){var c=Rc(r.domEventName,r.eventSystemFlags,s[0],r.nativeEvent);if(c===null){c=r.nativeEvent;var g=new c.constructor(c.type,c);To=g,c.target.dispatchEvent(g),To=null}else return s=ns(c),s!==null&&Ec(s),r.blockedOn=c,!1;s.shift()}return!0}function V0(r,s,c){Sa(r)&&c.delete(s)}function l2(){Cc=!1,sr!==null&&Sa(sr)&&(sr=null),ar!==null&&Sa(ar)&&(ar=null),ur!==null&&Sa(ur)&&(ur=null),zo.forEach(V0),$o.forEach(V0)}function Vo(r,s){r.blockedOn===s&&(r.blockedOn=null,Cc||(Cc=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,l2)))}function Ho(r){function s(y){return Vo(y,r)}if(0<ba.length){Vo(ba[0],r);for(var c=1;c<ba.length;c++){var g=ba[c];g.blockedOn===r&&(g.blockedOn=null)}}for(sr!==null&&Vo(sr,r),ar!==null&&Vo(ar,r),ur!==null&&Vo(ur,r),zo.forEach(s),$o.forEach(s),c=0;c<lr.length;c++)g=lr[c],g.blockedOn===r&&(g.blockedOn=null);for(;0<lr.length&&(c=lr[0],c.blockedOn===null);)B0(c),c.blockedOn===null&&lr.shift()}var ki=C.ReactCurrentBatchConfig,Ea=!0;function c2(r,s,c,g){var y=Oe,b=ki.transition;ki.transition=null;try{Oe=1,kc(r,s,c,g)}finally{Oe=y,ki.transition=b}}function f2(r,s,c,g){var y=Oe,b=ki.transition;ki.transition=null;try{Oe=4,kc(r,s,c,g)}finally{Oe=y,ki.transition=b}}function kc(r,s,c,g){if(Ea){var y=Rc(r,s,c,g);if(y===null)Hc(r,s,g,Ca,c),$0(r,g);else if(u2(y,r,s,c,g))g.stopPropagation();else if($0(r,g),s&4&&-1<a2.indexOf(r)){for(;y!==null;){var b=ns(y);if(b!==null&&j0(b),b=Rc(r,s,c,g),b===null&&Hc(r,s,g,Ca,c),b===y)break;y=b}y!==null&&g.stopPropagation()}else Hc(r,s,g,null,c)}}var Ca=null;function Rc(r,s,c,g){if(Ca=null,r=Mo(g),r=Br(r),r!==null)if(s=xn(r),s===null)r=null;else if(c=s.tag,c===13){if(r=pa(s),r!==null)return r;r=null}else if(c===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;r=null}else s!==r&&(r=null);return Ca=r,null}function H0(r){switch(r){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(gc()){case jo:return 1;case _a:return 4;case _i:case vc:return 16;case qo:return 536870912;default:return 16}default:return 16}}var cr=null,Pc=null,ka=null;function U0(){if(ka)return ka;var r,s=Pc,c=s.length,g,y="value"in cr?cr.value:cr.textContent,b=y.length;for(r=0;r<c&&s[r]===y[r];r++);var N=c-r;for(g=1;g<=N&&s[c-g]===y[b-g];g++);return ka=y.slice(r,1<g?1-g:void 0)}function Ra(r){var s=r.keyCode;return"charCode"in r?(r=r.charCode,r===0&&s===13&&(r=13)):r=s,r===10&&(r=13),32<=r||r===13?r:0}function Pa(){return!0}function W0(){return!1}function At(r){function s(c,g,y,b,N){this._reactName=c,this._targetInst=y,this.type=g,this.nativeEvent=b,this.target=N,this.currentTarget=null;for(var B in r)r.hasOwnProperty(B)&&(c=r[B],this[B]=c?c(b):b[B]);return this.isDefaultPrevented=(b.defaultPrevented!=null?b.defaultPrevented:b.returnValue===!1)?Pa:W0,this.isPropagationStopped=W0,this}return K(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var c=this.nativeEvent;c&&(c.preventDefault?c.preventDefault():typeof c.returnValue!="unknown"&&(c.returnValue=!1),this.isDefaultPrevented=Pa)},stopPropagation:function(){var c=this.nativeEvent;c&&(c.stopPropagation?c.stopPropagation():typeof c.cancelBubble!="unknown"&&(c.cancelBubble=!0),this.isPropagationStopped=Pa)},persist:function(){},isPersistent:Pa}),s}var Ri={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r){return r.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Nc=At(Ri),Uo=K({},Ri,{view:0,detail:0}),d2=At(Uo),Tc,Mc,Wo,Na=K({},Uo,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ic,button:0,buttons:0,relatedTarget:function(r){return r.relatedTarget===void 0?r.fromElement===r.srcElement?r.toElement:r.fromElement:r.relatedTarget},movementX:function(r){return"movementX"in r?r.movementX:(r!==Wo&&(Wo&&r.type==="mousemove"?(Tc=r.screenX-Wo.screenX,Mc=r.screenY-Wo.screenY):Mc=Tc=0,Wo=r),Tc)},movementY:function(r){return"movementY"in r?r.movementY:Mc}}),G0=At(Na),h2=K({},Na,{dataTransfer:0}),p2=At(h2),g2=K({},Uo,{relatedTarget:0}),Ac=At(g2),v2=K({},Ri,{animationName:0,elapsedTime:0,pseudoElement:0}),m2=At(v2),y2=K({},Ri,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),w2=At(y2),x2=K({},Ri,{data:0}),K0=At(x2),_2={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},b2={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"},S2={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function E2(r){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(r):(r=S2[r])?!!s[r]:!1}function Ic(){return E2}var C2=K({},Uo,{key:function(r){if(r.key){var s=_2[r.key]||r.key;if(s!=="Unidentified")return s}return r.type==="keypress"?(r=Ra(r),r===13?"Enter":String.fromCharCode(r)):r.type==="keydown"||r.type==="keyup"?b2[r.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ic,charCode:function(r){return r.type==="keypress"?Ra(r):0},keyCode:function(r){return r.type==="keydown"||r.type==="keyup"?r.keyCode:0},which:function(r){return r.type==="keypress"?Ra(r):r.type==="keydown"||r.type==="keyup"?r.keyCode:0}}),k2=At(C2),R2=K({},Na,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Y0=At(R2),P2=K({},Uo,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ic}),N2=At(P2),T2=K({},Ri,{propertyName:0,elapsedTime:0,pseudoElement:0}),M2=At(T2),A2=K({},Na,{deltaX:function(r){return"deltaX"in r?r.deltaX:"wheelDeltaX"in r?-r.wheelDeltaX:0},deltaY:function(r){return"deltaY"in r?r.deltaY:"wheelDeltaY"in r?-r.wheelDeltaY:"wheelDelta"in r?-r.wheelDelta:0},deltaZ:0,deltaMode:0}),I2=At(A2),L2=[9,13,27,32],Lc=l&&"CompositionEvent"in window,Go=null;l&&"documentMode"in document&&(Go=document.documentMode);var O2=l&&"TextEvent"in window&&!Go,X0=l&&(!Lc||Go&&8<Go&&11>=Go),Q0=" ",Z0=!1;function J0(r,s){switch(r){case"keyup":return L2.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ew(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var Pi=!1;function D2(r,s){switch(r){case"compositionend":return ew(s);case"keypress":return s.which!==32?null:(Z0=!0,Q0);case"textInput":return r=s.data,r===Q0&&Z0?null:r;default:return null}}function j2(r,s){if(Pi)return r==="compositionend"||!Lc&&J0(r,s)?(r=U0(),ka=Pc=cr=null,Pi=!1,r):null;switch(r){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1<s.char.length)return s.char;if(s.which)return String.fromCharCode(s.which)}return null;case"compositionend":return X0&&s.locale!=="ko"?null:s.data;default:return null}}var q2={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 tw(r){var s=r&&r.nodeName&&r.nodeName.toLowerCase();return s==="input"?!!q2[r.type]:s==="textarea"}function nw(r,s,c,g){Io(g),s=La(s,"onChange"),0<s.length&&(c=new Nc("onChange","change",null,c,g),r.push({event:c,listeners:s}))}var Ko=null,Yo=null;function F2(r){xw(r,0)}function Ta(r){var s=Ii(r);if(he(s))return r}function z2(r,s){if(r==="change")return s}var rw=!1;if(l){var Oc;if(l){var Dc="oninput"in document;if(!Dc){var iw=document.createElement("div");iw.setAttribute("oninput","return;"),Dc=typeof iw.oninput=="function"}Oc=Dc}else Oc=!1;rw=Oc&&(!document.documentMode||9<document.documentMode)}function ow(){Ko&&(Ko.detachEvent("onpropertychange",sw),Yo=Ko=null)}function sw(r){if(r.propertyName==="value"&&Ta(Yo)){var s=[];nw(s,Yo,r,Mo(r)),da(F2,s)}}function $2(r,s,c){r==="focusin"?(ow(),Ko=s,Yo=c,Ko.attachEvent("onpropertychange",sw)):r==="focusout"&&ow()}function B2(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return Ta(Yo)}function V2(r,s){if(r==="click")return Ta(s)}function H2(r,s){if(r==="input"||r==="change")return Ta(s)}function U2(r,s){return r===s&&(r!==0||1/r===1/s)||r!==r&&s!==s}var en=typeof Object.is=="function"?Object.is:U2;function Xo(r,s){if(en(r,s))return!0;if(typeof r!="object"||r===null||typeof s!="object"||s===null)return!1;var c=Object.keys(r),g=Object.keys(s);if(c.length!==g.length)return!1;for(g=0;g<c.length;g++){var y=c[g];if(!f.call(s,y)||!en(r[y],s[y]))return!1}return!0}function aw(r){for(;r&&r.firstChild;)r=r.firstChild;return r}function uw(r,s){var c=aw(r);r=0;for(var g;c;){if(c.nodeType===3){if(g=r+c.textContent.length,r<=s&&g>=s)return{node:c,offset:s-r};r=g}e:{for(;c;){if(c.nextSibling){c=c.nextSibling;break e}c=c.parentNode}c=void 0}c=aw(c)}}function lw(r,s){return r&&s?r===s?!0:r&&r.nodeType===3?!1:s&&s.nodeType===3?lw(r,s.parentNode):"contains"in r?r.contains(s):r.compareDocumentPosition?!!(r.compareDocumentPosition(s)&16):!1:!1}function cw(){for(var r=window,s=ge();s instanceof r.HTMLIFrameElement;){try{var c=typeof s.contentWindow.location.href=="string"}catch{c=!1}if(c)r=s.contentWindow;else break;s=ge(r.document)}return s}function jc(r){var s=r&&r.nodeName&&r.nodeName.toLowerCase();return s&&(s==="input"&&(r.type==="text"||r.type==="search"||r.type==="tel"||r.type==="url"||r.type==="password")||s==="textarea"||r.contentEditable==="true")}function W2(r){var s=cw(),c=r.focusedElem,g=r.selectionRange;if(s!==c&&c&&c.ownerDocument&&lw(c.ownerDocument.documentElement,c)){if(g!==null&&jc(c)){if(s=g.start,r=g.end,r===void 0&&(r=s),"selectionStart"in c)c.selectionStart=s,c.selectionEnd=Math.min(r,c.value.length);else if(r=(s=c.ownerDocument||document)&&s.defaultView||window,r.getSelection){r=r.getSelection();var y=c.textContent.length,b=Math.min(g.start,y);g=g.end===void 0?b:Math.min(g.end,y),!r.extend&&b>g&&(y=g,g=b,b=y),y=uw(c,b);var N=uw(c,g);y&&N&&(r.rangeCount!==1||r.anchorNode!==y.node||r.anchorOffset!==y.offset||r.focusNode!==N.node||r.focusOffset!==N.offset)&&(s=s.createRange(),s.setStart(y.node,y.offset),r.removeAllRanges(),b>g?(r.addRange(s),r.extend(N.node,N.offset)):(s.setEnd(N.node,N.offset),r.addRange(s)))}}for(s=[],r=c;r=r.parentNode;)r.nodeType===1&&s.push({element:r,left:r.scrollLeft,top:r.scrollTop});for(typeof c.focus=="function"&&c.focus(),c=0;c<s.length;c++)r=s[c],r.element.scrollLeft=r.left,r.element.scrollTop=r.top}}var G2=l&&"documentMode"in document&&11>=document.documentMode,Ni=null,qc=null,Qo=null,Fc=!1;function fw(r,s,c){var g=c.window===c?c.document:c.nodeType===9?c:c.ownerDocument;Fc||Ni==null||Ni!==ge(g)||(g=Ni,"selectionStart"in g&&jc(g)?g={start:g.selectionStart,end:g.selectionEnd}:(g=(g.ownerDocument&&g.ownerDocument.defaultView||window).getSelection(),g={anchorNode:g.anchorNode,anchorOffset:g.anchorOffset,focusNode:g.focusNode,focusOffset:g.focusOffset}),Qo&&Xo(Qo,g)||(Qo=g,g=La(qc,"onSelect"),0<g.length&&(s=new Nc("onSelect","select",null,s,c),r.push({event:s,listeners:g}),s.target=Ni)))}function Ma(r,s){var c={};return c[r.toLowerCase()]=s.toLowerCase(),c["Webkit"+r]="webkit"+s,c["Moz"+r]="moz"+s,c}var Ti={animationend:Ma("Animation","AnimationEnd"),animationiteration:Ma("Animation","AnimationIteration"),animationstart:Ma("Animation","AnimationStart"),transitionend:Ma("Transition","TransitionEnd")},zc={},dw={};l&&(dw=document.createElement("div").style,"AnimationEvent"in window||(delete Ti.animationend.animation,delete Ti.animationiteration.animation,delete Ti.animationstart.animation),"TransitionEvent"in window||delete Ti.transitionend.transition);function Aa(r){if(zc[r])return zc[r];if(!Ti[r])return r;var s=Ti[r],c;for(c in s)if(s.hasOwnProperty(c)&&c in dw)return zc[r]=s[c];return r}var hw=Aa("animationend"),pw=Aa("animationiteration"),gw=Aa("animationstart"),vw=Aa("transitionend"),mw=new Map,yw="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function fr(r,s){mw.set(r,s),a(s,[r])}for(var $c=0;$c<yw.length;$c++){var Bc=yw[$c],K2=Bc.toLowerCase(),Y2=Bc[0].toUpperCase()+Bc.slice(1);fr(K2,"on"+Y2)}fr(hw,"onAnimationEnd"),fr(pw,"onAnimationIteration"),fr(gw,"onAnimationStart"),fr("dblclick","onDoubleClick"),fr("focusin","onFocus"),fr("focusout","onBlur"),fr(vw,"onTransitionEnd"),u("onMouseEnter",["mouseout","mouseover"]),u("onMouseLeave",["mouseout","mouseover"]),u("onPointerEnter",["pointerout","pointerover"]),u("onPointerLeave",["pointerout","pointerover"]),a("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),a("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),a("onBeforeInput",["compositionend","keypress","textInput","paste"]),a("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Zo="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(" "),X2=new Set("cancel close invalid load scroll toggle".split(" ").concat(Zo));function ww(r,s,c){var g=r.type||"unknown-event";r.currentTarget=c,ha(g,s,void 0,r),r.currentTarget=null}function xw(r,s){s=(s&4)!==0;for(var c=0;c<r.length;c++){var g=r[c],y=g.event;g=g.listeners;e:{var b=void 0;if(s)for(var N=g.length-1;0<=N;N--){var B=g[N],Y=B.instance,ie=B.currentTarget;if(B=B.listener,Y!==b&&y.isPropagationStopped())break e;ww(y,B,ie),b=Y}else for(N=0;N<g.length;N++){if(B=g[N],Y=B.instance,ie=B.currentTarget,B=B.listener,Y!==b&&y.isPropagationStopped())break e;ww(y,B,ie),b=Y}}}if(xi)throw r=Do,xi=!1,Do=null,r}function Fe(r,s){var c=s[Xc];c===void 0&&(c=s[Xc]=new Set);var g=r+"__bubble";c.has(g)||(_w(s,r,2,!1),c.add(g))}function Vc(r,s,c){var g=0;s&&(g|=4),_w(c,r,g,s)}var Ia="_reactListening"+Math.random().toString(36).slice(2);function Jo(r){if(!r[Ia]){r[Ia]=!0,i.forEach(function(c){c!=="selectionchange"&&(X2.has(c)||Vc(c,!1,r),Vc(c,!0,r))});var s=r.nodeType===9?r:r.ownerDocument;s===null||s[Ia]||(s[Ia]=!0,Vc("selectionchange",!1,s))}}function _w(r,s,c,g){switch(H0(s)){case 1:var y=c2;break;case 4:y=f2;break;default:y=kc}c=y.bind(null,s,c,r),y=void 0,!Oo||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(y=!0),g?y!==void 0?r.addEventListener(s,c,{capture:!0,passive:y}):r.addEventListener(s,c,!0):y!==void 0?r.addEventListener(s,c,{passive:y}):r.addEventListener(s,c,!1)}function Hc(r,s,c,g,y){var b=g;if(!(s&1)&&!(s&2)&&g!==null)e:for(;;){if(g===null)return;var N=g.tag;if(N===3||N===4){var B=g.stateNode.containerInfo;if(B===y||B.nodeType===8&&B.parentNode===y)break;if(N===4)for(N=g.return;N!==null;){var Y=N.tag;if((Y===3||Y===4)&&(Y=N.stateNode.containerInfo,Y===y||Y.nodeType===8&&Y.parentNode===y))return;N=N.return}for(;B!==null;){if(N=Br(B),N===null)return;if(Y=N.tag,Y===5||Y===6){g=b=N;continue e}B=B.parentNode}}g=g.return}da(function(){var ie=b,ue=Mo(c),le=[];e:{var ae=mw.get(r);if(ae!==void 0){var pe=Nc,ye=r;switch(r){case"keypress":if(Ra(c)===0)break e;case"keydown":case"keyup":pe=k2;break;case"focusin":ye="focus",pe=Ac;break;case"focusout":ye="blur",pe=Ac;break;case"beforeblur":case"afterblur":pe=Ac;break;case"click":if(c.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":pe=G0;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":pe=p2;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":pe=N2;break;case hw:case pw:case gw:pe=m2;break;case vw:pe=M2;break;case"scroll":pe=d2;break;case"wheel":pe=I2;break;case"copy":case"cut":case"paste":pe=w2;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":pe=Y0}var xe=(s&4)!==0,Ze=!xe&&r==="scroll",ee=xe?ae!==null?ae+"Capture":null:ae;xe=[];for(var J=ie,te;J!==null;){te=J;var ce=te.stateNode;if(te.tag===5&&ce!==null&&(te=ce,ee!==null&&(ce=Fr(J,ee),ce!=null&&xe.push(es(J,ce,te)))),Ze)break;J=J.return}0<xe.length&&(ae=new pe(ae,ye,null,c,ue),le.push({event:ae,listeners:xe}))}}if(!(s&7)){e:{if(ae=r==="mouseover"||r==="pointerover",pe=r==="mouseout"||r==="pointerout",ae&&c!==To&&(ye=c.relatedTarget||c.fromElement)&&(Br(ye)||ye[On]))break e;if((pe||ae)&&(ae=ue.window===ue?ue:(ae=ue.ownerDocument)?ae.defaultView||ae.parentWindow:window,pe?(ye=c.relatedTarget||c.toElement,pe=ie,ye=ye?Br(ye):null,ye!==null&&(Ze=xn(ye),ye!==Ze||ye.tag!==5&&ye.tag!==6)&&(ye=null)):(pe=null,ye=ie),pe!==ye)){if(xe=G0,ce="onMouseLeave",ee="onMouseEnter",J="mouse",(r==="pointerout"||r==="pointerover")&&(xe=Y0,ce="onPointerLeave",ee="onPointerEnter",J="pointer"),Ze=pe==null?ae:Ii(pe),te=ye==null?ae:Ii(ye),ae=new xe(ce,J+"leave",pe,c,ue),ae.target=Ze,ae.relatedTarget=te,ce=null,Br(ue)===ie&&(xe=new xe(ee,J+"enter",ye,c,ue),xe.target=te,xe.relatedTarget=Ze,ce=xe),Ze=ce,pe&&ye)t:{for(xe=pe,ee=ye,J=0,te=xe;te;te=Mi(te))J++;for(te=0,ce=ee;ce;ce=Mi(ce))te++;for(;0<J-te;)xe=Mi(xe),J--;for(;0<te-J;)ee=Mi(ee),te--;for(;J--;){if(xe===ee||ee!==null&&xe===ee.alternate)break t;xe=Mi(xe),ee=Mi(ee)}xe=null}else xe=null;pe!==null&&bw(le,ae,pe,xe,!1),ye!==null&&Ze!==null&&bw(le,Ze,ye,xe,!0)}}e:{if(ae=ie?Ii(ie):window,pe=ae.nodeName&&ae.nodeName.toLowerCase(),pe==="select"||pe==="input"&&ae.type==="file")var _e=z2;else if(tw(ae))if(rw)_e=H2;else{_e=B2;var Se=$2}else(pe=ae.nodeName)&&pe.toLowerCase()==="input"&&(ae.type==="checkbox"||ae.type==="radio")&&(_e=V2);if(_e&&(_e=_e(r,ie))){nw(le,_e,c,ue);break e}Se&&Se(r,ae,ie),r==="focusout"&&(Se=ae._wrapperState)&&Se.controlled&&ae.type==="number"&&Ke(ae,"number",ae.value)}switch(Se=ie?Ii(ie):window,r){case"focusin":(tw(Se)||Se.contentEditable==="true")&&(Ni=Se,qc=ie,Qo=null);break;case"focusout":Qo=qc=Ni=null;break;case"mousedown":Fc=!0;break;case"contextmenu":case"mouseup":case"dragend":Fc=!1,fw(le,c,ue);break;case"selectionchange":if(G2)break;case"keydown":case"keyup":fw(le,c,ue)}var Ee;if(Lc)e:{switch(r){case"compositionstart":var ke="onCompositionStart";break e;case"compositionend":ke="onCompositionEnd";break e;case"compositionupdate":ke="onCompositionUpdate";break e}ke=void 0}else Pi?J0(r,c)&&(ke="onCompositionEnd"):r==="keydown"&&c.keyCode===229&&(ke="onCompositionStart");ke&&(X0&&c.locale!=="ko"&&(Pi||ke!=="onCompositionStart"?ke==="onCompositionEnd"&&Pi&&(Ee=U0()):(cr=ue,Pc="value"in cr?cr.value:cr.textContent,Pi=!0)),Se=La(ie,ke),0<Se.length&&(ke=new K0(ke,r,null,c,ue),le.push({event:ke,listeners:Se}),Ee?ke.data=Ee:(Ee=ew(c),Ee!==null&&(ke.data=Ee)))),(Ee=O2?D2(r,c):j2(r,c))&&(ie=La(ie,"onBeforeInput"),0<ie.length&&(ue=new K0("onBeforeInput","beforeinput",null,c,ue),le.push({event:ue,listeners:ie}),ue.data=Ee))}xw(le,s)})}function es(r,s,c){return{instance:r,listener:s,currentTarget:c}}function La(r,s){for(var c=s+"Capture",g=[];r!==null;){var y=r,b=y.stateNode;y.tag===5&&b!==null&&(y=b,b=Fr(r,c),b!=null&&g.unshift(es(r,b,y)),b=Fr(r,s),b!=null&&g.push(es(r,b,y))),r=r.return}return g}function Mi(r){if(r===null)return null;do r=r.return;while(r&&r.tag!==5);return r||null}function bw(r,s,c,g,y){for(var b=s._reactName,N=[];c!==null&&c!==g;){var B=c,Y=B.alternate,ie=B.stateNode;if(Y!==null&&Y===g)break;B.tag===5&&ie!==null&&(B=ie,y?(Y=Fr(c,b),Y!=null&&N.unshift(es(c,Y,B))):y||(Y=Fr(c,b),Y!=null&&N.push(es(c,Y,B)))),c=c.return}N.length!==0&&r.push({event:s,listeners:N})}var Q2=/\r\n?/g,Z2=/\u0000|\uFFFD/g;function Sw(r){return(typeof r=="string"?r:""+r).replace(Q2,`
|
|
38
|
-
`).replace(Z2,"")}function Oa(r,s,c){if(s=Sw(s),Sw(r)!==s&&c)throw Error(n(425))}function Da(){}var Uc=null,Wc=null;function Gc(r,s){return r==="textarea"||r==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var Kc=typeof setTimeout=="function"?setTimeout:void 0,J2=typeof clearTimeout=="function"?clearTimeout:void 0,Ew=typeof Promise=="function"?Promise:void 0,eA=typeof queueMicrotask=="function"?queueMicrotask:typeof Ew<"u"?function(r){return Ew.resolve(null).then(r).catch(tA)}:Kc;function tA(r){setTimeout(function(){throw r})}function Yc(r,s){var c=s,g=0;do{var y=c.nextSibling;if(r.removeChild(c),y&&y.nodeType===8)if(c=y.data,c==="/$"){if(g===0){r.removeChild(y),Ho(s);return}g--}else c!=="$"&&c!=="$?"&&c!=="$!"||g++;c=y}while(c);Ho(s)}function dr(r){for(;r!=null;r=r.nextSibling){var s=r.nodeType;if(s===1||s===3)break;if(s===8){if(s=r.data,s==="$"||s==="$!"||s==="$?")break;if(s==="/$")return null}}return r}function Cw(r){r=r.previousSibling;for(var s=0;r;){if(r.nodeType===8){var c=r.data;if(c==="$"||c==="$!"||c==="$?"){if(s===0)return r;s--}else c==="/$"&&s++}r=r.previousSibling}return null}var Ai=Math.random().toString(36).slice(2),_n="__reactFiber$"+Ai,ts="__reactProps$"+Ai,On="__reactContainer$"+Ai,Xc="__reactEvents$"+Ai,nA="__reactListeners$"+Ai,rA="__reactHandles$"+Ai;function Br(r){var s=r[_n];if(s)return s;for(var c=r.parentNode;c;){if(s=c[On]||c[_n]){if(c=s.alternate,s.child!==null||c!==null&&c.child!==null)for(r=Cw(r);r!==null;){if(c=r[_n])return c;r=Cw(r)}return s}r=c,c=r.parentNode}return null}function ns(r){return r=r[_n]||r[On],!r||r.tag!==5&&r.tag!==6&&r.tag!==13&&r.tag!==3?null:r}function Ii(r){if(r.tag===5||r.tag===6)return r.stateNode;throw Error(n(33))}function ja(r){return r[ts]||null}var Qc=[],Li=-1;function hr(r){return{current:r}}function ze(r){0>Li||(r.current=Qc[Li],Qc[Li]=null,Li--)}function qe(r,s){Li++,Qc[Li]=r.current,r.current=s}var pr={},ct=hr(pr),wt=hr(!1),Vr=pr;function Oi(r,s){var c=r.type.contextTypes;if(!c)return pr;var g=r.stateNode;if(g&&g.__reactInternalMemoizedUnmaskedChildContext===s)return g.__reactInternalMemoizedMaskedChildContext;var y={},b;for(b in c)y[b]=s[b];return g&&(r=r.stateNode,r.__reactInternalMemoizedUnmaskedChildContext=s,r.__reactInternalMemoizedMaskedChildContext=y),y}function xt(r){return r=r.childContextTypes,r!=null}function qa(){ze(wt),ze(ct)}function kw(r,s,c){if(ct.current!==pr)throw Error(n(168));qe(ct,s),qe(wt,c)}function Rw(r,s,c){var g=r.stateNode;if(s=s.childContextTypes,typeof g.getChildContext!="function")return c;g=g.getChildContext();for(var y in g)if(!(y in s))throw Error(n(108,ne(r)||"Unknown",y));return K({},c,g)}function Fa(r){return r=(r=r.stateNode)&&r.__reactInternalMemoizedMergedChildContext||pr,Vr=ct.current,qe(ct,r),qe(wt,wt.current),!0}function Pw(r,s,c){var g=r.stateNode;if(!g)throw Error(n(169));c?(r=Rw(r,s,Vr),g.__reactInternalMemoizedMergedChildContext=r,ze(wt),ze(ct),qe(ct,r)):ze(wt),qe(wt,c)}var Dn=null,za=!1,Zc=!1;function Nw(r){Dn===null?Dn=[r]:Dn.push(r)}function iA(r){za=!0,Nw(r)}function gr(){if(!Zc&&Dn!==null){Zc=!0;var r=0,s=Oe;try{var c=Dn;for(Oe=1;r<c.length;r++){var g=c[r];do g=g(!0);while(g!==null)}Dn=null,za=!1}catch(y){throw Dn!==null&&(Dn=Dn.slice(r+1)),ya(jo,gr),y}finally{Oe=s,Zc=!1}}return null}var Di=[],ji=0,$a=null,Ba=0,Ht=[],Ut=0,Hr=null,jn=1,qn="";function Ur(r,s){Di[ji++]=Ba,Di[ji++]=$a,$a=r,Ba=s}function Tw(r,s,c){Ht[Ut++]=jn,Ht[Ut++]=qn,Ht[Ut++]=Hr,Hr=r;var g=jn;r=qn;var y=32-Mt(g)-1;g&=~(1<<y),c+=1;var b=32-Mt(s)+y;if(30<b){var N=y-y%5;b=(g&(1<<N)-1).toString(32),g>>=N,y-=N,jn=1<<32-Mt(s)+y|c<<y|g,qn=b+r}else jn=1<<b|c<<y|g,qn=r}function Jc(r){r.return!==null&&(Ur(r,1),Tw(r,1,0))}function ef(r){for(;r===$a;)$a=Di[--ji],Di[ji]=null,Ba=Di[--ji],Di[ji]=null;for(;r===Hr;)Hr=Ht[--Ut],Ht[Ut]=null,qn=Ht[--Ut],Ht[Ut]=null,jn=Ht[--Ut],Ht[Ut]=null}var It=null,Lt=null,Be=!1,tn=null;function Mw(r,s){var c=Yt(5,null,null,0);c.elementType="DELETED",c.stateNode=s,c.return=r,s=r.deletions,s===null?(r.deletions=[c],r.flags|=16):s.push(c)}function Aw(r,s){switch(r.tag){case 5:var c=r.type;return s=s.nodeType!==1||c.toLowerCase()!==s.nodeName.toLowerCase()?null:s,s!==null?(r.stateNode=s,It=r,Lt=dr(s.firstChild),!0):!1;case 6:return s=r.pendingProps===""||s.nodeType!==3?null:s,s!==null?(r.stateNode=s,It=r,Lt=null,!0):!1;case 13:return s=s.nodeType!==8?null:s,s!==null?(c=Hr!==null?{id:jn,overflow:qn}:null,r.memoizedState={dehydrated:s,treeContext:c,retryLane:1073741824},c=Yt(18,null,null,0),c.stateNode=s,c.return=r,r.child=c,It=r,Lt=null,!0):!1;default:return!1}}function tf(r){return(r.mode&1)!==0&&(r.flags&128)===0}function nf(r){if(Be){var s=Lt;if(s){var c=s;if(!Aw(r,s)){if(tf(r))throw Error(n(418));s=dr(c.nextSibling);var g=It;s&&Aw(r,s)?Mw(g,c):(r.flags=r.flags&-4097|2,Be=!1,It=r)}}else{if(tf(r))throw Error(n(418));r.flags=r.flags&-4097|2,Be=!1,It=r}}}function Iw(r){for(r=r.return;r!==null&&r.tag!==5&&r.tag!==3&&r.tag!==13;)r=r.return;It=r}function Va(r){if(r!==It)return!1;if(!Be)return Iw(r),Be=!0,!1;var s;if((s=r.tag!==3)&&!(s=r.tag!==5)&&(s=r.type,s=s!=="head"&&s!=="body"&&!Gc(r.type,r.memoizedProps)),s&&(s=Lt)){if(tf(r))throw Lw(),Error(n(418));for(;s;)Mw(r,s),s=dr(s.nextSibling)}if(Iw(r),r.tag===13){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(n(317));e:{for(r=r.nextSibling,s=0;r;){if(r.nodeType===8){var c=r.data;if(c==="/$"){if(s===0){Lt=dr(r.nextSibling);break e}s--}else c!=="$"&&c!=="$!"&&c!=="$?"||s++}r=r.nextSibling}Lt=null}}else Lt=It?dr(r.stateNode.nextSibling):null;return!0}function Lw(){for(var r=Lt;r;)r=dr(r.nextSibling)}function qi(){Lt=It=null,Be=!1}function rf(r){tn===null?tn=[r]:tn.push(r)}var oA=C.ReactCurrentBatchConfig;function rs(r,s,c){if(r=c.ref,r!==null&&typeof r!="function"&&typeof r!="object"){if(c._owner){if(c=c._owner,c){if(c.tag!==1)throw Error(n(309));var g=c.stateNode}if(!g)throw Error(n(147,r));var y=g,b=""+r;return s!==null&&s.ref!==null&&typeof s.ref=="function"&&s.ref._stringRef===b?s.ref:(s=function(N){var B=y.refs;N===null?delete B[b]:B[b]=N},s._stringRef=b,s)}if(typeof r!="string")throw Error(n(284));if(!c._owner)throw Error(n(290,r))}return r}function Ha(r,s){throw r=Object.prototype.toString.call(s),Error(n(31,r==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":r))}function Ow(r){var s=r._init;return s(r._payload)}function Dw(r){function s(ee,J){if(r){var te=ee.deletions;te===null?(ee.deletions=[J],ee.flags|=16):te.push(J)}}function c(ee,J){if(!r)return null;for(;J!==null;)s(ee,J),J=J.sibling;return null}function g(ee,J){for(ee=new Map;J!==null;)J.key!==null?ee.set(J.key,J):ee.set(J.index,J),J=J.sibling;return ee}function y(ee,J){return ee=Sr(ee,J),ee.index=0,ee.sibling=null,ee}function b(ee,J,te){return ee.index=te,r?(te=ee.alternate,te!==null?(te=te.index,te<J?(ee.flags|=2,J):te):(ee.flags|=2,J)):(ee.flags|=1048576,J)}function N(ee){return r&&ee.alternate===null&&(ee.flags|=2),ee}function B(ee,J,te,ce){return J===null||J.tag!==6?(J=Yf(te,ee.mode,ce),J.return=ee,J):(J=y(J,te),J.return=ee,J)}function Y(ee,J,te,ce){var _e=te.type;return _e===T?ue(ee,J,te.props.children,ce,te.key):J!==null&&(J.elementType===_e||typeof _e=="object"&&_e!==null&&_e.$$typeof===z&&Ow(_e)===J.type)?(ce=y(J,te.props),ce.ref=rs(ee,J,te),ce.return=ee,ce):(ce=pu(te.type,te.key,te.props,null,ee.mode,ce),ce.ref=rs(ee,J,te),ce.return=ee,ce)}function ie(ee,J,te,ce){return J===null||J.tag!==4||J.stateNode.containerInfo!==te.containerInfo||J.stateNode.implementation!==te.implementation?(J=Xf(te,ee.mode,ce),J.return=ee,J):(J=y(J,te.children||[]),J.return=ee,J)}function ue(ee,J,te,ce,_e){return J===null||J.tag!==7?(J=Jr(te,ee.mode,ce,_e),J.return=ee,J):(J=y(J,te),J.return=ee,J)}function le(ee,J,te){if(typeof J=="string"&&J!==""||typeof J=="number")return J=Yf(""+J,ee.mode,te),J.return=ee,J;if(typeof J=="object"&&J!==null){switch(J.$$typeof){case R:return te=pu(J.type,J.key,J.props,null,ee.mode,te),te.ref=rs(ee,null,J),te.return=ee,te;case A:return J=Xf(J,ee.mode,te),J.return=ee,J;case z:var ce=J._init;return le(ee,ce(J._payload),te)}if(Pe(J)||U(J))return J=Jr(J,ee.mode,te,null),J.return=ee,J;Ha(ee,J)}return null}function ae(ee,J,te,ce){var _e=J!==null?J.key:null;if(typeof te=="string"&&te!==""||typeof te=="number")return _e!==null?null:B(ee,J,""+te,ce);if(typeof te=="object"&&te!==null){switch(te.$$typeof){case R:return te.key===_e?Y(ee,J,te,ce):null;case A:return te.key===_e?ie(ee,J,te,ce):null;case z:return _e=te._init,ae(ee,J,_e(te._payload),ce)}if(Pe(te)||U(te))return _e!==null?null:ue(ee,J,te,ce,null);Ha(ee,te)}return null}function pe(ee,J,te,ce,_e){if(typeof ce=="string"&&ce!==""||typeof ce=="number")return ee=ee.get(te)||null,B(J,ee,""+ce,_e);if(typeof ce=="object"&&ce!==null){switch(ce.$$typeof){case R:return ee=ee.get(ce.key===null?te:ce.key)||null,Y(J,ee,ce,_e);case A:return ee=ee.get(ce.key===null?te:ce.key)||null,ie(J,ee,ce,_e);case z:var Se=ce._init;return pe(ee,J,te,Se(ce._payload),_e)}if(Pe(ce)||U(ce))return ee=ee.get(te)||null,ue(J,ee,ce,_e,null);Ha(J,ce)}return null}function ye(ee,J,te,ce){for(var _e=null,Se=null,Ee=J,ke=J=0,at=null;Ee!==null&&ke<te.length;ke++){Ee.index>ke?(at=Ee,Ee=null):at=Ee.sibling;var Le=ae(ee,Ee,te[ke],ce);if(Le===null){Ee===null&&(Ee=at);break}r&&Ee&&Le.alternate===null&&s(ee,Ee),J=b(Le,J,ke),Se===null?_e=Le:Se.sibling=Le,Se=Le,Ee=at}if(ke===te.length)return c(ee,Ee),Be&&Ur(ee,ke),_e;if(Ee===null){for(;ke<te.length;ke++)Ee=le(ee,te[ke],ce),Ee!==null&&(J=b(Ee,J,ke),Se===null?_e=Ee:Se.sibling=Ee,Se=Ee);return Be&&Ur(ee,ke),_e}for(Ee=g(ee,Ee);ke<te.length;ke++)at=pe(Ee,ee,ke,te[ke],ce),at!==null&&(r&&at.alternate!==null&&Ee.delete(at.key===null?ke:at.key),J=b(at,J,ke),Se===null?_e=at:Se.sibling=at,Se=at);return r&&Ee.forEach(function(Er){return s(ee,Er)}),Be&&Ur(ee,ke),_e}function xe(ee,J,te,ce){var _e=U(te);if(typeof _e!="function")throw Error(n(150));if(te=_e.call(te),te==null)throw Error(n(151));for(var Se=_e=null,Ee=J,ke=J=0,at=null,Le=te.next();Ee!==null&&!Le.done;ke++,Le=te.next()){Ee.index>ke?(at=Ee,Ee=null):at=Ee.sibling;var Er=ae(ee,Ee,Le.value,ce);if(Er===null){Ee===null&&(Ee=at);break}r&&Ee&&Er.alternate===null&&s(ee,Ee),J=b(Er,J,ke),Se===null?_e=Er:Se.sibling=Er,Se=Er,Ee=at}if(Le.done)return c(ee,Ee),Be&&Ur(ee,ke),_e;if(Ee===null){for(;!Le.done;ke++,Le=te.next())Le=le(ee,Le.value,ce),Le!==null&&(J=b(Le,J,ke),Se===null?_e=Le:Se.sibling=Le,Se=Le);return Be&&Ur(ee,ke),_e}for(Ee=g(ee,Ee);!Le.done;ke++,Le=te.next())Le=pe(Ee,ee,ke,Le.value,ce),Le!==null&&(r&&Le.alternate!==null&&Ee.delete(Le.key===null?ke:Le.key),J=b(Le,J,ke),Se===null?_e=Le:Se.sibling=Le,Se=Le);return r&&Ee.forEach(function(jA){return s(ee,jA)}),Be&&Ur(ee,ke),_e}function Ze(ee,J,te,ce){if(typeof te=="object"&&te!==null&&te.type===T&&te.key===null&&(te=te.props.children),typeof te=="object"&&te!==null){switch(te.$$typeof){case R:e:{for(var _e=te.key,Se=J;Se!==null;){if(Se.key===_e){if(_e=te.type,_e===T){if(Se.tag===7){c(ee,Se.sibling),J=y(Se,te.props.children),J.return=ee,ee=J;break e}}else if(Se.elementType===_e||typeof _e=="object"&&_e!==null&&_e.$$typeof===z&&Ow(_e)===Se.type){c(ee,Se.sibling),J=y(Se,te.props),J.ref=rs(ee,Se,te),J.return=ee,ee=J;break e}c(ee,Se);break}else s(ee,Se);Se=Se.sibling}te.type===T?(J=Jr(te.props.children,ee.mode,ce,te.key),J.return=ee,ee=J):(ce=pu(te.type,te.key,te.props,null,ee.mode,ce),ce.ref=rs(ee,J,te),ce.return=ee,ee=ce)}return N(ee);case A:e:{for(Se=te.key;J!==null;){if(J.key===Se)if(J.tag===4&&J.stateNode.containerInfo===te.containerInfo&&J.stateNode.implementation===te.implementation){c(ee,J.sibling),J=y(J,te.children||[]),J.return=ee,ee=J;break e}else{c(ee,J);break}else s(ee,J);J=J.sibling}J=Xf(te,ee.mode,ce),J.return=ee,ee=J}return N(ee);case z:return Se=te._init,Ze(ee,J,Se(te._payload),ce)}if(Pe(te))return ye(ee,J,te,ce);if(U(te))return xe(ee,J,te,ce);Ha(ee,te)}return typeof te=="string"&&te!==""||typeof te=="number"?(te=""+te,J!==null&&J.tag===6?(c(ee,J.sibling),J=y(J,te),J.return=ee,ee=J):(c(ee,J),J=Yf(te,ee.mode,ce),J.return=ee,ee=J),N(ee)):c(ee,J)}return Ze}var Fi=Dw(!0),jw=Dw(!1),Ua=hr(null),Wa=null,zi=null,of=null;function sf(){of=zi=Wa=null}function af(r){var s=Ua.current;ze(Ua),r._currentValue=s}function uf(r,s,c){for(;r!==null;){var g=r.alternate;if((r.childLanes&s)!==s?(r.childLanes|=s,g!==null&&(g.childLanes|=s)):g!==null&&(g.childLanes&s)!==s&&(g.childLanes|=s),r===c)break;r=r.return}}function $i(r,s){Wa=r,of=zi=null,r=r.dependencies,r!==null&&r.firstContext!==null&&(r.lanes&s&&(_t=!0),r.firstContext=null)}function Wt(r){var s=r._currentValue;if(of!==r)if(r={context:r,memoizedValue:s,next:null},zi===null){if(Wa===null)throw Error(n(308));zi=r,Wa.dependencies={lanes:0,firstContext:r}}else zi=zi.next=r;return s}var Wr=null;function lf(r){Wr===null?Wr=[r]:Wr.push(r)}function qw(r,s,c,g){var y=s.interleaved;return y===null?(c.next=c,lf(s)):(c.next=y.next,y.next=c),s.interleaved=c,Fn(r,g)}function Fn(r,s){r.lanes|=s;var c=r.alternate;for(c!==null&&(c.lanes|=s),c=r,r=r.return;r!==null;)r.childLanes|=s,c=r.alternate,c!==null&&(c.childLanes|=s),c=r,r=r.return;return c.tag===3?c.stateNode:null}var vr=!1;function cf(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Fw(r,s){r=r.updateQueue,s.updateQueue===r&&(s.updateQueue={baseState:r.baseState,firstBaseUpdate:r.firstBaseUpdate,lastBaseUpdate:r.lastBaseUpdate,shared:r.shared,effects:r.effects})}function zn(r,s){return{eventTime:r,lane:s,tag:0,payload:null,callback:null,next:null}}function mr(r,s,c){var g=r.updateQueue;if(g===null)return null;if(g=g.shared,Ie&2){var y=g.pending;return y===null?s.next=s:(s.next=y.next,y.next=s),g.pending=s,Fn(r,c)}return y=g.interleaved,y===null?(s.next=s,lf(g)):(s.next=y.next,y.next=s),g.interleaved=s,Fn(r,c)}function Ga(r,s,c){if(s=s.updateQueue,s!==null&&(s=s.shared,(c&4194240)!==0)){var g=s.lanes;g&=r.pendingLanes,c|=g,s.lanes=c,Sc(r,c)}}function zw(r,s){var c=r.updateQueue,g=r.alternate;if(g!==null&&(g=g.updateQueue,c===g)){var y=null,b=null;if(c=c.firstBaseUpdate,c!==null){do{var N={eventTime:c.eventTime,lane:c.lane,tag:c.tag,payload:c.payload,callback:c.callback,next:null};b===null?y=b=N:b=b.next=N,c=c.next}while(c!==null);b===null?y=b=s:b=b.next=s}else y=b=s;c={baseState:g.baseState,firstBaseUpdate:y,lastBaseUpdate:b,shared:g.shared,effects:g.effects},r.updateQueue=c;return}r=c.lastBaseUpdate,r===null?c.firstBaseUpdate=s:r.next=s,c.lastBaseUpdate=s}function Ka(r,s,c,g){var y=r.updateQueue;vr=!1;var b=y.firstBaseUpdate,N=y.lastBaseUpdate,B=y.shared.pending;if(B!==null){y.shared.pending=null;var Y=B,ie=Y.next;Y.next=null,N===null?b=ie:N.next=ie,N=Y;var ue=r.alternate;ue!==null&&(ue=ue.updateQueue,B=ue.lastBaseUpdate,B!==N&&(B===null?ue.firstBaseUpdate=ie:B.next=ie,ue.lastBaseUpdate=Y))}if(b!==null){var le=y.baseState;N=0,ue=ie=Y=null,B=b;do{var ae=B.lane,pe=B.eventTime;if((g&ae)===ae){ue!==null&&(ue=ue.next={eventTime:pe,lane:0,tag:B.tag,payload:B.payload,callback:B.callback,next:null});e:{var ye=r,xe=B;switch(ae=s,pe=c,xe.tag){case 1:if(ye=xe.payload,typeof ye=="function"){le=ye.call(pe,le,ae);break e}le=ye;break e;case 3:ye.flags=ye.flags&-65537|128;case 0:if(ye=xe.payload,ae=typeof ye=="function"?ye.call(pe,le,ae):ye,ae==null)break e;le=K({},le,ae);break e;case 2:vr=!0}}B.callback!==null&&B.lane!==0&&(r.flags|=64,ae=y.effects,ae===null?y.effects=[B]:ae.push(B))}else pe={eventTime:pe,lane:ae,tag:B.tag,payload:B.payload,callback:B.callback,next:null},ue===null?(ie=ue=pe,Y=le):ue=ue.next=pe,N|=ae;if(B=B.next,B===null){if(B=y.shared.pending,B===null)break;ae=B,B=ae.next,ae.next=null,y.lastBaseUpdate=ae,y.shared.pending=null}}while(!0);if(ue===null&&(Y=le),y.baseState=Y,y.firstBaseUpdate=ie,y.lastBaseUpdate=ue,s=y.shared.interleaved,s!==null){y=s;do N|=y.lane,y=y.next;while(y!==s)}else b===null&&(y.shared.lanes=0);Yr|=N,r.lanes=N,r.memoizedState=le}}function $w(r,s,c){if(r=s.effects,s.effects=null,r!==null)for(s=0;s<r.length;s++){var g=r[s],y=g.callback;if(y!==null){if(g.callback=null,g=c,typeof y!="function")throw Error(n(191,y));y.call(g)}}}var is={},bn=hr(is),os=hr(is),ss=hr(is);function Gr(r){if(r===is)throw Error(n(174));return r}function ff(r,s){switch(qe(ss,s),qe(os,r),qe(bn,is),r=s.nodeType,r){case 9:case 11:s=(s=s.documentElement)?s.namespaceURI:Jt(null,"");break;default:r=r===8?s.parentNode:s,s=r.namespaceURI||null,r=r.tagName,s=Jt(s,r)}ze(bn),qe(bn,s)}function Bi(){ze(bn),ze(os),ze(ss)}function Bw(r){Gr(ss.current);var s=Gr(bn.current),c=Jt(s,r.type);s!==c&&(qe(os,r),qe(bn,c))}function df(r){os.current===r&&(ze(bn),ze(os))}var We=hr(0);function Ya(r){for(var s=r;s!==null;){if(s.tag===13){var c=s.memoizedState;if(c!==null&&(c=c.dehydrated,c===null||c.data==="$?"||c.data==="$!"))return s}else if(s.tag===19&&s.memoizedProps.revealOrder!==void 0){if(s.flags&128)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===r)break;for(;s.sibling===null;){if(s.return===null||s.return===r)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var hf=[];function pf(){for(var r=0;r<hf.length;r++)hf[r]._workInProgressVersionPrimary=null;hf.length=0}var Xa=C.ReactCurrentDispatcher,gf=C.ReactCurrentBatchConfig,Kr=0,Ge=null,nt=null,ot=null,Qa=!1,as=!1,us=0,sA=0;function ft(){throw Error(n(321))}function vf(r,s){if(s===null)return!1;for(var c=0;c<s.length&&c<r.length;c++)if(!en(r[c],s[c]))return!1;return!0}function mf(r,s,c,g,y,b){if(Kr=b,Ge=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,Xa.current=r===null||r.memoizedState===null?cA:fA,r=c(g,y),as){b=0;do{if(as=!1,us=0,25<=b)throw Error(n(301));b+=1,ot=nt=null,s.updateQueue=null,Xa.current=dA,r=c(g,y)}while(as)}if(Xa.current=eu,s=nt!==null&&nt.next!==null,Kr=0,ot=nt=Ge=null,Qa=!1,s)throw Error(n(300));return r}function yf(){var r=us!==0;return us=0,r}function Sn(){var r={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ot===null?Ge.memoizedState=ot=r:ot=ot.next=r,ot}function Gt(){if(nt===null){var r=Ge.alternate;r=r!==null?r.memoizedState:null}else r=nt.next;var s=ot===null?Ge.memoizedState:ot.next;if(s!==null)ot=s,nt=r;else{if(r===null)throw Error(n(310));nt=r,r={memoizedState:nt.memoizedState,baseState:nt.baseState,baseQueue:nt.baseQueue,queue:nt.queue,next:null},ot===null?Ge.memoizedState=ot=r:ot=ot.next=r}return ot}function ls(r,s){return typeof s=="function"?s(r):s}function wf(r){var s=Gt(),c=s.queue;if(c===null)throw Error(n(311));c.lastRenderedReducer=r;var g=nt,y=g.baseQueue,b=c.pending;if(b!==null){if(y!==null){var N=y.next;y.next=b.next,b.next=N}g.baseQueue=y=b,c.pending=null}if(y!==null){b=y.next,g=g.baseState;var B=N=null,Y=null,ie=b;do{var ue=ie.lane;if((Kr&ue)===ue)Y!==null&&(Y=Y.next={lane:0,action:ie.action,hasEagerState:ie.hasEagerState,eagerState:ie.eagerState,next:null}),g=ie.hasEagerState?ie.eagerState:r(g,ie.action);else{var le={lane:ue,action:ie.action,hasEagerState:ie.hasEagerState,eagerState:ie.eagerState,next:null};Y===null?(B=Y=le,N=g):Y=Y.next=le,Ge.lanes|=ue,Yr|=ue}ie=ie.next}while(ie!==null&&ie!==b);Y===null?N=g:Y.next=B,en(g,s.memoizedState)||(_t=!0),s.memoizedState=g,s.baseState=N,s.baseQueue=Y,c.lastRenderedState=g}if(r=c.interleaved,r!==null){y=r;do b=y.lane,Ge.lanes|=b,Yr|=b,y=y.next;while(y!==r)}else y===null&&(c.lanes=0);return[s.memoizedState,c.dispatch]}function xf(r){var s=Gt(),c=s.queue;if(c===null)throw Error(n(311));c.lastRenderedReducer=r;var g=c.dispatch,y=c.pending,b=s.memoizedState;if(y!==null){c.pending=null;var N=y=y.next;do b=r(b,N.action),N=N.next;while(N!==y);en(b,s.memoizedState)||(_t=!0),s.memoizedState=b,s.baseQueue===null&&(s.baseState=b),c.lastRenderedState=b}return[b,g]}function Vw(){}function Hw(r,s){var c=Ge,g=Gt(),y=s(),b=!en(g.memoizedState,y);if(b&&(g.memoizedState=y,_t=!0),g=g.queue,_f(Gw.bind(null,c,g,r),[r]),g.getSnapshot!==s||b||ot!==null&&ot.memoizedState.tag&1){if(c.flags|=2048,cs(9,Ww.bind(null,c,g,y,s),void 0,null),st===null)throw Error(n(349));Kr&30||Uw(c,s,y)}return y}function Uw(r,s,c){r.flags|=16384,r={getSnapshot:s,value:c},s=Ge.updateQueue,s===null?(s={lastEffect:null,stores:null},Ge.updateQueue=s,s.stores=[r]):(c=s.stores,c===null?s.stores=[r]:c.push(r))}function Ww(r,s,c,g){s.value=c,s.getSnapshot=g,Kw(s)&&Yw(r)}function Gw(r,s,c){return c(function(){Kw(s)&&Yw(r)})}function Kw(r){var s=r.getSnapshot;r=r.value;try{var c=s();return!en(r,c)}catch{return!0}}function Yw(r){var s=Fn(r,1);s!==null&&sn(s,r,1,-1)}function Xw(r){var s=Sn();return typeof r=="function"&&(r=r()),s.memoizedState=s.baseState=r,r={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ls,lastRenderedState:r},s.queue=r,r=r.dispatch=lA.bind(null,Ge,r),[s.memoizedState,r]}function cs(r,s,c,g){return r={tag:r,create:s,destroy:c,deps:g,next:null},s=Ge.updateQueue,s===null?(s={lastEffect:null,stores:null},Ge.updateQueue=s,s.lastEffect=r.next=r):(c=s.lastEffect,c===null?s.lastEffect=r.next=r:(g=c.next,c.next=r,r.next=g,s.lastEffect=r)),r}function Qw(){return Gt().memoizedState}function Za(r,s,c,g){var y=Sn();Ge.flags|=r,y.memoizedState=cs(1|s,c,void 0,g===void 0?null:g)}function Ja(r,s,c,g){var y=Gt();g=g===void 0?null:g;var b=void 0;if(nt!==null){var N=nt.memoizedState;if(b=N.destroy,g!==null&&vf(g,N.deps)){y.memoizedState=cs(s,c,b,g);return}}Ge.flags|=r,y.memoizedState=cs(1|s,c,b,g)}function Zw(r,s){return Za(8390656,8,r,s)}function _f(r,s){return Ja(2048,8,r,s)}function Jw(r,s){return Ja(4,2,r,s)}function ex(r,s){return Ja(4,4,r,s)}function tx(r,s){if(typeof s=="function")return r=r(),s(r),function(){s(null)};if(s!=null)return r=r(),s.current=r,function(){s.current=null}}function nx(r,s,c){return c=c!=null?c.concat([r]):null,Ja(4,4,tx.bind(null,s,r),c)}function bf(){}function rx(r,s){var c=Gt();s=s===void 0?null:s;var g=c.memoizedState;return g!==null&&s!==null&&vf(s,g[1])?g[0]:(c.memoizedState=[r,s],r)}function ix(r,s){var c=Gt();s=s===void 0?null:s;var g=c.memoizedState;return g!==null&&s!==null&&vf(s,g[1])?g[0]:(r=r(),c.memoizedState=[r,s],r)}function ox(r,s,c){return Kr&21?(en(c,s)||(c=O0(),Ge.lanes|=c,Yr|=c,r.baseState=!0),s):(r.baseState&&(r.baseState=!1,_t=!0),r.memoizedState=c)}function aA(r,s){var c=Oe;Oe=c!==0&&4>c?c:4,r(!0);var g=gf.transition;gf.transition={};try{r(!1),s()}finally{Oe=c,gf.transition=g}}function sx(){return Gt().memoizedState}function uA(r,s,c){var g=_r(r);if(c={lane:g,action:c,hasEagerState:!1,eagerState:null,next:null},ax(r))ux(s,c);else if(c=qw(r,s,c,g),c!==null){var y=vt();sn(c,r,g,y),lx(c,s,g)}}function lA(r,s,c){var g=_r(r),y={lane:g,action:c,hasEagerState:!1,eagerState:null,next:null};if(ax(r))ux(s,y);else{var b=r.alternate;if(r.lanes===0&&(b===null||b.lanes===0)&&(b=s.lastRenderedReducer,b!==null))try{var N=s.lastRenderedState,B=b(N,c);if(y.hasEagerState=!0,y.eagerState=B,en(B,N)){var Y=s.interleaved;Y===null?(y.next=y,lf(s)):(y.next=Y.next,Y.next=y),s.interleaved=y;return}}catch{}finally{}c=qw(r,s,y,g),c!==null&&(y=vt(),sn(c,r,g,y),lx(c,s,g))}}function ax(r){var s=r.alternate;return r===Ge||s!==null&&s===Ge}function ux(r,s){as=Qa=!0;var c=r.pending;c===null?s.next=s:(s.next=c.next,c.next=s),r.pending=s}function lx(r,s,c){if(c&4194240){var g=s.lanes;g&=r.pendingLanes,c|=g,s.lanes=c,Sc(r,c)}}var eu={readContext:Wt,useCallback:ft,useContext:ft,useEffect:ft,useImperativeHandle:ft,useInsertionEffect:ft,useLayoutEffect:ft,useMemo:ft,useReducer:ft,useRef:ft,useState:ft,useDebugValue:ft,useDeferredValue:ft,useTransition:ft,useMutableSource:ft,useSyncExternalStore:ft,useId:ft,unstable_isNewReconciler:!1},cA={readContext:Wt,useCallback:function(r,s){return Sn().memoizedState=[r,s===void 0?null:s],r},useContext:Wt,useEffect:Zw,useImperativeHandle:function(r,s,c){return c=c!=null?c.concat([r]):null,Za(4194308,4,tx.bind(null,s,r),c)},useLayoutEffect:function(r,s){return Za(4194308,4,r,s)},useInsertionEffect:function(r,s){return Za(4,2,r,s)},useMemo:function(r,s){var c=Sn();return s=s===void 0?null:s,r=r(),c.memoizedState=[r,s],r},useReducer:function(r,s,c){var g=Sn();return s=c!==void 0?c(s):s,g.memoizedState=g.baseState=s,r={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:r,lastRenderedState:s},g.queue=r,r=r.dispatch=uA.bind(null,Ge,r),[g.memoizedState,r]},useRef:function(r){var s=Sn();return r={current:r},s.memoizedState=r},useState:Xw,useDebugValue:bf,useDeferredValue:function(r){return Sn().memoizedState=r},useTransition:function(){var r=Xw(!1),s=r[0];return r=aA.bind(null,r[1]),Sn().memoizedState=r,[s,r]},useMutableSource:function(){},useSyncExternalStore:function(r,s,c){var g=Ge,y=Sn();if(Be){if(c===void 0)throw Error(n(407));c=c()}else{if(c=s(),st===null)throw Error(n(349));Kr&30||Uw(g,s,c)}y.memoizedState=c;var b={value:c,getSnapshot:s};return y.queue=b,Zw(Gw.bind(null,g,b,r),[r]),g.flags|=2048,cs(9,Ww.bind(null,g,b,c,s),void 0,null),c},useId:function(){var r=Sn(),s=st.identifierPrefix;if(Be){var c=qn,g=jn;c=(g&~(1<<32-Mt(g)-1)).toString(32)+c,s=":"+s+"R"+c,c=us++,0<c&&(s+="H"+c.toString(32)),s+=":"}else c=sA++,s=":"+s+"r"+c.toString(32)+":";return r.memoizedState=s},unstable_isNewReconciler:!1},fA={readContext:Wt,useCallback:rx,useContext:Wt,useEffect:_f,useImperativeHandle:nx,useInsertionEffect:Jw,useLayoutEffect:ex,useMemo:ix,useReducer:wf,useRef:Qw,useState:function(){return wf(ls)},useDebugValue:bf,useDeferredValue:function(r){var s=Gt();return ox(s,nt.memoizedState,r)},useTransition:function(){var r=wf(ls)[0],s=Gt().memoizedState;return[r,s]},useMutableSource:Vw,useSyncExternalStore:Hw,useId:sx,unstable_isNewReconciler:!1},dA={readContext:Wt,useCallback:rx,useContext:Wt,useEffect:_f,useImperativeHandle:nx,useInsertionEffect:Jw,useLayoutEffect:ex,useMemo:ix,useReducer:xf,useRef:Qw,useState:function(){return xf(ls)},useDebugValue:bf,useDeferredValue:function(r){var s=Gt();return nt===null?s.memoizedState=r:ox(s,nt.memoizedState,r)},useTransition:function(){var r=xf(ls)[0],s=Gt().memoizedState;return[r,s]},useMutableSource:Vw,useSyncExternalStore:Hw,useId:sx,unstable_isNewReconciler:!1};function nn(r,s){if(r&&r.defaultProps){s=K({},s),r=r.defaultProps;for(var c in r)s[c]===void 0&&(s[c]=r[c]);return s}return s}function Sf(r,s,c,g){s=r.memoizedState,c=c(g,s),c=c==null?s:K({},s,c),r.memoizedState=c,r.lanes===0&&(r.updateQueue.baseState=c)}var tu={isMounted:function(r){return(r=r._reactInternals)?xn(r)===r:!1},enqueueSetState:function(r,s,c){r=r._reactInternals;var g=vt(),y=_r(r),b=zn(g,y);b.payload=s,c!=null&&(b.callback=c),s=mr(r,b,y),s!==null&&(sn(s,r,y,g),Ga(s,r,y))},enqueueReplaceState:function(r,s,c){r=r._reactInternals;var g=vt(),y=_r(r),b=zn(g,y);b.tag=1,b.payload=s,c!=null&&(b.callback=c),s=mr(r,b,y),s!==null&&(sn(s,r,y,g),Ga(s,r,y))},enqueueForceUpdate:function(r,s){r=r._reactInternals;var c=vt(),g=_r(r),y=zn(c,g);y.tag=2,s!=null&&(y.callback=s),s=mr(r,y,g),s!==null&&(sn(s,r,g,c),Ga(s,r,g))}};function cx(r,s,c,g,y,b,N){return r=r.stateNode,typeof r.shouldComponentUpdate=="function"?r.shouldComponentUpdate(g,b,N):s.prototype&&s.prototype.isPureReactComponent?!Xo(c,g)||!Xo(y,b):!0}function fx(r,s,c){var g=!1,y=pr,b=s.contextType;return typeof b=="object"&&b!==null?b=Wt(b):(y=xt(s)?Vr:ct.current,g=s.contextTypes,b=(g=g!=null)?Oi(r,y):pr),s=new s(c,b),r.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,s.updater=tu,r.stateNode=s,s._reactInternals=r,g&&(r=r.stateNode,r.__reactInternalMemoizedUnmaskedChildContext=y,r.__reactInternalMemoizedMaskedChildContext=b),s}function dx(r,s,c,g){r=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(c,g),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(c,g),s.state!==r&&tu.enqueueReplaceState(s,s.state,null)}function Ef(r,s,c,g){var y=r.stateNode;y.props=c,y.state=r.memoizedState,y.refs={},cf(r);var b=s.contextType;typeof b=="object"&&b!==null?y.context=Wt(b):(b=xt(s)?Vr:ct.current,y.context=Oi(r,b)),y.state=r.memoizedState,b=s.getDerivedStateFromProps,typeof b=="function"&&(Sf(r,s,b,c),y.state=r.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof y.getSnapshotBeforeUpdate=="function"||typeof y.UNSAFE_componentWillMount!="function"&&typeof y.componentWillMount!="function"||(s=y.state,typeof y.componentWillMount=="function"&&y.componentWillMount(),typeof y.UNSAFE_componentWillMount=="function"&&y.UNSAFE_componentWillMount(),s!==y.state&&tu.enqueueReplaceState(y,y.state,null),Ka(r,c,y,g),y.state=r.memoizedState),typeof y.componentDidMount=="function"&&(r.flags|=4194308)}function Vi(r,s){try{var c="",g=s;do c+=G(g),g=g.return;while(g);var y=c}catch(b){y=`
|
|
39
|
-
Error generating stack: `+b.message+`
|
|
40
|
-
`+b.stack}return{value:r,source:s,stack:y,digest:null}}function Cf(r,s,c){return{value:r,source:null,stack:c??null,digest:s??null}}function kf(r,s){try{console.error(s.value)}catch(c){setTimeout(function(){throw c})}}var hA=typeof WeakMap=="function"?WeakMap:Map;function hx(r,s,c){c=zn(-1,c),c.tag=3,c.payload={element:null};var g=s.value;return c.callback=function(){uu||(uu=!0,$f=g),kf(r,s)},c}function px(r,s,c){c=zn(-1,c),c.tag=3;var g=r.type.getDerivedStateFromError;if(typeof g=="function"){var y=s.value;c.payload=function(){return g(y)},c.callback=function(){kf(r,s)}}var b=r.stateNode;return b!==null&&typeof b.componentDidCatch=="function"&&(c.callback=function(){kf(r,s),typeof g!="function"&&(wr===null?wr=new Set([this]):wr.add(this));var N=s.stack;this.componentDidCatch(s.value,{componentStack:N!==null?N:""})}),c}function gx(r,s,c){var g=r.pingCache;if(g===null){g=r.pingCache=new hA;var y=new Set;g.set(s,y)}else y=g.get(s),y===void 0&&(y=new Set,g.set(s,y));y.has(c)||(y.add(c),r=RA.bind(null,r,s,c),s.then(r,r))}function vx(r){do{var s;if((s=r.tag===13)&&(s=r.memoizedState,s=s!==null?s.dehydrated!==null:!0),s)return r;r=r.return}while(r!==null);return null}function mx(r,s,c,g,y){return r.mode&1?(r.flags|=65536,r.lanes=y,r):(r===s?r.flags|=65536:(r.flags|=128,c.flags|=131072,c.flags&=-52805,c.tag===1&&(c.alternate===null?c.tag=17:(s=zn(-1,1),s.tag=2,mr(c,s,1))),c.lanes|=1),r)}var pA=C.ReactCurrentOwner,_t=!1;function gt(r,s,c,g){s.child=r===null?jw(s,null,c,g):Fi(s,r.child,c,g)}function yx(r,s,c,g,y){c=c.render;var b=s.ref;return $i(s,y),g=mf(r,s,c,g,b,y),c=yf(),r!==null&&!_t?(s.updateQueue=r.updateQueue,s.flags&=-2053,r.lanes&=~y,$n(r,s,y)):(Be&&c&&Jc(s),s.flags|=1,gt(r,s,g,y),s.child)}function wx(r,s,c,g,y){if(r===null){var b=c.type;return typeof b=="function"&&!Kf(b)&&b.defaultProps===void 0&&c.compare===null&&c.defaultProps===void 0?(s.tag=15,s.type=b,xx(r,s,b,g,y)):(r=pu(c.type,null,g,s,s.mode,y),r.ref=s.ref,r.return=s,s.child=r)}if(b=r.child,!(r.lanes&y)){var N=b.memoizedProps;if(c=c.compare,c=c!==null?c:Xo,c(N,g)&&r.ref===s.ref)return $n(r,s,y)}return s.flags|=1,r=Sr(b,g),r.ref=s.ref,r.return=s,s.child=r}function xx(r,s,c,g,y){if(r!==null){var b=r.memoizedProps;if(Xo(b,g)&&r.ref===s.ref)if(_t=!1,s.pendingProps=g=b,(r.lanes&y)!==0)r.flags&131072&&(_t=!0);else return s.lanes=r.lanes,$n(r,s,y)}return Rf(r,s,c,g,y)}function _x(r,s,c){var g=s.pendingProps,y=g.children,b=r!==null?r.memoizedState:null;if(g.mode==="hidden")if(!(s.mode&1))s.memoizedState={baseLanes:0,cachePool:null,transitions:null},qe(Ui,Ot),Ot|=c;else{if(!(c&1073741824))return r=b!==null?b.baseLanes|c:c,s.lanes=s.childLanes=1073741824,s.memoizedState={baseLanes:r,cachePool:null,transitions:null},s.updateQueue=null,qe(Ui,Ot),Ot|=r,null;s.memoizedState={baseLanes:0,cachePool:null,transitions:null},g=b!==null?b.baseLanes:c,qe(Ui,Ot),Ot|=g}else b!==null?(g=b.baseLanes|c,s.memoizedState=null):g=c,qe(Ui,Ot),Ot|=g;return gt(r,s,y,c),s.child}function bx(r,s){var c=s.ref;(r===null&&c!==null||r!==null&&r.ref!==c)&&(s.flags|=512,s.flags|=2097152)}function Rf(r,s,c,g,y){var b=xt(c)?Vr:ct.current;return b=Oi(s,b),$i(s,y),c=mf(r,s,c,g,b,y),g=yf(),r!==null&&!_t?(s.updateQueue=r.updateQueue,s.flags&=-2053,r.lanes&=~y,$n(r,s,y)):(Be&&g&&Jc(s),s.flags|=1,gt(r,s,c,y),s.child)}function Sx(r,s,c,g,y){if(xt(c)){var b=!0;Fa(s)}else b=!1;if($i(s,y),s.stateNode===null)ru(r,s),fx(s,c,g),Ef(s,c,g,y),g=!0;else if(r===null){var N=s.stateNode,B=s.memoizedProps;N.props=B;var Y=N.context,ie=c.contextType;typeof ie=="object"&&ie!==null?ie=Wt(ie):(ie=xt(c)?Vr:ct.current,ie=Oi(s,ie));var ue=c.getDerivedStateFromProps,le=typeof ue=="function"||typeof N.getSnapshotBeforeUpdate=="function";le||typeof N.UNSAFE_componentWillReceiveProps!="function"&&typeof N.componentWillReceiveProps!="function"||(B!==g||Y!==ie)&&dx(s,N,g,ie),vr=!1;var ae=s.memoizedState;N.state=ae,Ka(s,g,N,y),Y=s.memoizedState,B!==g||ae!==Y||wt.current||vr?(typeof ue=="function"&&(Sf(s,c,ue,g),Y=s.memoizedState),(B=vr||cx(s,c,B,g,ae,Y,ie))?(le||typeof N.UNSAFE_componentWillMount!="function"&&typeof N.componentWillMount!="function"||(typeof N.componentWillMount=="function"&&N.componentWillMount(),typeof N.UNSAFE_componentWillMount=="function"&&N.UNSAFE_componentWillMount()),typeof N.componentDidMount=="function"&&(s.flags|=4194308)):(typeof N.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=g,s.memoizedState=Y),N.props=g,N.state=Y,N.context=ie,g=B):(typeof N.componentDidMount=="function"&&(s.flags|=4194308),g=!1)}else{N=s.stateNode,Fw(r,s),B=s.memoizedProps,ie=s.type===s.elementType?B:nn(s.type,B),N.props=ie,le=s.pendingProps,ae=N.context,Y=c.contextType,typeof Y=="object"&&Y!==null?Y=Wt(Y):(Y=xt(c)?Vr:ct.current,Y=Oi(s,Y));var pe=c.getDerivedStateFromProps;(ue=typeof pe=="function"||typeof N.getSnapshotBeforeUpdate=="function")||typeof N.UNSAFE_componentWillReceiveProps!="function"&&typeof N.componentWillReceiveProps!="function"||(B!==le||ae!==Y)&&dx(s,N,g,Y),vr=!1,ae=s.memoizedState,N.state=ae,Ka(s,g,N,y);var ye=s.memoizedState;B!==le||ae!==ye||wt.current||vr?(typeof pe=="function"&&(Sf(s,c,pe,g),ye=s.memoizedState),(ie=vr||cx(s,c,ie,g,ae,ye,Y)||!1)?(ue||typeof N.UNSAFE_componentWillUpdate!="function"&&typeof N.componentWillUpdate!="function"||(typeof N.componentWillUpdate=="function"&&N.componentWillUpdate(g,ye,Y),typeof N.UNSAFE_componentWillUpdate=="function"&&N.UNSAFE_componentWillUpdate(g,ye,Y)),typeof N.componentDidUpdate=="function"&&(s.flags|=4),typeof N.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof N.componentDidUpdate!="function"||B===r.memoizedProps&&ae===r.memoizedState||(s.flags|=4),typeof N.getSnapshotBeforeUpdate!="function"||B===r.memoizedProps&&ae===r.memoizedState||(s.flags|=1024),s.memoizedProps=g,s.memoizedState=ye),N.props=g,N.state=ye,N.context=Y,g=ie):(typeof N.componentDidUpdate!="function"||B===r.memoizedProps&&ae===r.memoizedState||(s.flags|=4),typeof N.getSnapshotBeforeUpdate!="function"||B===r.memoizedProps&&ae===r.memoizedState||(s.flags|=1024),g=!1)}return Pf(r,s,c,g,b,y)}function Pf(r,s,c,g,y,b){bx(r,s);var N=(s.flags&128)!==0;if(!g&&!N)return y&&Pw(s,c,!1),$n(r,s,b);g=s.stateNode,pA.current=s;var B=N&&typeof c.getDerivedStateFromError!="function"?null:g.render();return s.flags|=1,r!==null&&N?(s.child=Fi(s,r.child,null,b),s.child=Fi(s,null,B,b)):gt(r,s,B,b),s.memoizedState=g.state,y&&Pw(s,c,!0),s.child}function Ex(r){var s=r.stateNode;s.pendingContext?kw(r,s.pendingContext,s.pendingContext!==s.context):s.context&&kw(r,s.context,!1),ff(r,s.containerInfo)}function Cx(r,s,c,g,y){return qi(),rf(y),s.flags|=256,gt(r,s,c,g),s.child}var Nf={dehydrated:null,treeContext:null,retryLane:0};function Tf(r){return{baseLanes:r,cachePool:null,transitions:null}}function kx(r,s,c){var g=s.pendingProps,y=We.current,b=!1,N=(s.flags&128)!==0,B;if((B=N)||(B=r!==null&&r.memoizedState===null?!1:(y&2)!==0),B?(b=!0,s.flags&=-129):(r===null||r.memoizedState!==null)&&(y|=1),qe(We,y&1),r===null)return nf(s),r=s.memoizedState,r!==null&&(r=r.dehydrated,r!==null)?(s.mode&1?r.data==="$!"?s.lanes=8:s.lanes=1073741824:s.lanes=1,null):(N=g.children,r=g.fallback,b?(g=s.mode,b=s.child,N={mode:"hidden",children:N},!(g&1)&&b!==null?(b.childLanes=0,b.pendingProps=N):b=gu(N,g,0,null),r=Jr(r,g,c,null),b.return=s,r.return=s,b.sibling=r,s.child=b,s.child.memoizedState=Tf(c),s.memoizedState=Nf,r):Mf(s,N));if(y=r.memoizedState,y!==null&&(B=y.dehydrated,B!==null))return gA(r,s,N,g,B,y,c);if(b){b=g.fallback,N=s.mode,y=r.child,B=y.sibling;var Y={mode:"hidden",children:g.children};return!(N&1)&&s.child!==y?(g=s.child,g.childLanes=0,g.pendingProps=Y,s.deletions=null):(g=Sr(y,Y),g.subtreeFlags=y.subtreeFlags&14680064),B!==null?b=Sr(B,b):(b=Jr(b,N,c,null),b.flags|=2),b.return=s,g.return=s,g.sibling=b,s.child=g,g=b,b=s.child,N=r.child.memoizedState,N=N===null?Tf(c):{baseLanes:N.baseLanes|c,cachePool:null,transitions:N.transitions},b.memoizedState=N,b.childLanes=r.childLanes&~c,s.memoizedState=Nf,g}return b=r.child,r=b.sibling,g=Sr(b,{mode:"visible",children:g.children}),!(s.mode&1)&&(g.lanes=c),g.return=s,g.sibling=null,r!==null&&(c=s.deletions,c===null?(s.deletions=[r],s.flags|=16):c.push(r)),s.child=g,s.memoizedState=null,g}function Mf(r,s){return s=gu({mode:"visible",children:s},r.mode,0,null),s.return=r,r.child=s}function nu(r,s,c,g){return g!==null&&rf(g),Fi(s,r.child,null,c),r=Mf(s,s.pendingProps.children),r.flags|=2,s.memoizedState=null,r}function gA(r,s,c,g,y,b,N){if(c)return s.flags&256?(s.flags&=-257,g=Cf(Error(n(422))),nu(r,s,N,g)):s.memoizedState!==null?(s.child=r.child,s.flags|=128,null):(b=g.fallback,y=s.mode,g=gu({mode:"visible",children:g.children},y,0,null),b=Jr(b,y,N,null),b.flags|=2,g.return=s,b.return=s,g.sibling=b,s.child=g,s.mode&1&&Fi(s,r.child,null,N),s.child.memoizedState=Tf(N),s.memoizedState=Nf,b);if(!(s.mode&1))return nu(r,s,N,null);if(y.data==="$!"){if(g=y.nextSibling&&y.nextSibling.dataset,g)var B=g.dgst;return g=B,b=Error(n(419)),g=Cf(b,g,void 0),nu(r,s,N,g)}if(B=(N&r.childLanes)!==0,_t||B){if(g=st,g!==null){switch(N&-N){case 4:y=2;break;case 16:y=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:y=32;break;case 536870912:y=268435456;break;default:y=0}y=y&(g.suspendedLanes|N)?0:y,y!==0&&y!==b.retryLane&&(b.retryLane=y,Fn(r,y),sn(g,r,y,-1))}return Gf(),g=Cf(Error(n(421))),nu(r,s,N,g)}return y.data==="$?"?(s.flags|=128,s.child=r.child,s=PA.bind(null,r),y._reactRetry=s,null):(r=b.treeContext,Lt=dr(y.nextSibling),It=s,Be=!0,tn=null,r!==null&&(Ht[Ut++]=jn,Ht[Ut++]=qn,Ht[Ut++]=Hr,jn=r.id,qn=r.overflow,Hr=s),s=Mf(s,g.children),s.flags|=4096,s)}function Rx(r,s,c){r.lanes|=s;var g=r.alternate;g!==null&&(g.lanes|=s),uf(r.return,s,c)}function Af(r,s,c,g,y){var b=r.memoizedState;b===null?r.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:g,tail:c,tailMode:y}:(b.isBackwards=s,b.rendering=null,b.renderingStartTime=0,b.last=g,b.tail=c,b.tailMode=y)}function Px(r,s,c){var g=s.pendingProps,y=g.revealOrder,b=g.tail;if(gt(r,s,g.children,c),g=We.current,g&2)g=g&1|2,s.flags|=128;else{if(r!==null&&r.flags&128)e:for(r=s.child;r!==null;){if(r.tag===13)r.memoizedState!==null&&Rx(r,c,s);else if(r.tag===19)Rx(r,c,s);else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===s)break e;for(;r.sibling===null;){if(r.return===null||r.return===s)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}g&=1}if(qe(We,g),!(s.mode&1))s.memoizedState=null;else switch(y){case"forwards":for(c=s.child,y=null;c!==null;)r=c.alternate,r!==null&&Ya(r)===null&&(y=c),c=c.sibling;c=y,c===null?(y=s.child,s.child=null):(y=c.sibling,c.sibling=null),Af(s,!1,y,c,b);break;case"backwards":for(c=null,y=s.child,s.child=null;y!==null;){if(r=y.alternate,r!==null&&Ya(r)===null){s.child=y;break}r=y.sibling,y.sibling=c,c=y,y=r}Af(s,!0,c,null,b);break;case"together":Af(s,!1,null,null,void 0);break;default:s.memoizedState=null}return s.child}function ru(r,s){!(s.mode&1)&&r!==null&&(r.alternate=null,s.alternate=null,s.flags|=2)}function $n(r,s,c){if(r!==null&&(s.dependencies=r.dependencies),Yr|=s.lanes,!(c&s.childLanes))return null;if(r!==null&&s.child!==r.child)throw Error(n(153));if(s.child!==null){for(r=s.child,c=Sr(r,r.pendingProps),s.child=c,c.return=s;r.sibling!==null;)r=r.sibling,c=c.sibling=Sr(r,r.pendingProps),c.return=s;c.sibling=null}return s.child}function vA(r,s,c){switch(s.tag){case 3:Ex(s),qi();break;case 5:Bw(s);break;case 1:xt(s.type)&&Fa(s);break;case 4:ff(s,s.stateNode.containerInfo);break;case 10:var g=s.type._context,y=s.memoizedProps.value;qe(Ua,g._currentValue),g._currentValue=y;break;case 13:if(g=s.memoizedState,g!==null)return g.dehydrated!==null?(qe(We,We.current&1),s.flags|=128,null):c&s.child.childLanes?kx(r,s,c):(qe(We,We.current&1),r=$n(r,s,c),r!==null?r.sibling:null);qe(We,We.current&1);break;case 19:if(g=(c&s.childLanes)!==0,r.flags&128){if(g)return Px(r,s,c);s.flags|=128}if(y=s.memoizedState,y!==null&&(y.rendering=null,y.tail=null,y.lastEffect=null),qe(We,We.current),g)break;return null;case 22:case 23:return s.lanes=0,_x(r,s,c)}return $n(r,s,c)}var Nx,If,Tx,Mx;Nx=function(r,s){for(var c=s.child;c!==null;){if(c.tag===5||c.tag===6)r.appendChild(c.stateNode);else if(c.tag!==4&&c.child!==null){c.child.return=c,c=c.child;continue}if(c===s)break;for(;c.sibling===null;){if(c.return===null||c.return===s)return;c=c.return}c.sibling.return=c.return,c=c.sibling}},If=function(){},Tx=function(r,s,c,g){var y=r.memoizedProps;if(y!==g){r=s.stateNode,Gr(bn.current);var b=null;switch(c){case"input":y=be(r,y),g=be(r,g),b=[];break;case"select":y=K({},y,{value:void 0}),g=K({},g,{value:void 0}),b=[];break;case"textarea":y=Ye(r,y),g=Ye(r,g),b=[];break;default:typeof y.onClick!="function"&&typeof g.onClick=="function"&&(r.onclick=Da)}Po(c,g);var N;c=null;for(ie in y)if(!g.hasOwnProperty(ie)&&y.hasOwnProperty(ie)&&y[ie]!=null)if(ie==="style"){var B=y[ie];for(N in B)B.hasOwnProperty(N)&&(c||(c={}),c[N]="")}else ie!=="dangerouslySetInnerHTML"&&ie!=="children"&&ie!=="suppressContentEditableWarning"&&ie!=="suppressHydrationWarning"&&ie!=="autoFocus"&&(o.hasOwnProperty(ie)?b||(b=[]):(b=b||[]).push(ie,null));for(ie in g){var Y=g[ie];if(B=y!=null?y[ie]:void 0,g.hasOwnProperty(ie)&&Y!==B&&(Y!=null||B!=null))if(ie==="style")if(B){for(N in B)!B.hasOwnProperty(N)||Y&&Y.hasOwnProperty(N)||(c||(c={}),c[N]="");for(N in Y)Y.hasOwnProperty(N)&&B[N]!==Y[N]&&(c||(c={}),c[N]=Y[N])}else c||(b||(b=[]),b.push(ie,c)),c=Y;else ie==="dangerouslySetInnerHTML"?(Y=Y?Y.__html:void 0,B=B?B.__html:void 0,Y!=null&&B!==Y&&(b=b||[]).push(ie,Y)):ie==="children"?typeof Y!="string"&&typeof Y!="number"||(b=b||[]).push(ie,""+Y):ie!=="suppressContentEditableWarning"&&ie!=="suppressHydrationWarning"&&(o.hasOwnProperty(ie)?(Y!=null&&ie==="onScroll"&&Fe("scroll",r),b||B===Y||(b=[])):(b=b||[]).push(ie,Y))}c&&(b=b||[]).push("style",c);var ie=b;(s.updateQueue=ie)&&(s.flags|=4)}},Mx=function(r,s,c,g){c!==g&&(s.flags|=4)};function fs(r,s){if(!Be)switch(r.tailMode){case"hidden":s=r.tail;for(var c=null;s!==null;)s.alternate!==null&&(c=s),s=s.sibling;c===null?r.tail=null:c.sibling=null;break;case"collapsed":c=r.tail;for(var g=null;c!==null;)c.alternate!==null&&(g=c),c=c.sibling;g===null?s||r.tail===null?r.tail=null:r.tail.sibling=null:g.sibling=null}}function dt(r){var s=r.alternate!==null&&r.alternate.child===r.child,c=0,g=0;if(s)for(var y=r.child;y!==null;)c|=y.lanes|y.childLanes,g|=y.subtreeFlags&14680064,g|=y.flags&14680064,y.return=r,y=y.sibling;else for(y=r.child;y!==null;)c|=y.lanes|y.childLanes,g|=y.subtreeFlags,g|=y.flags,y.return=r,y=y.sibling;return r.subtreeFlags|=g,r.childLanes=c,s}function mA(r,s,c){var g=s.pendingProps;switch(ef(s),s.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return dt(s),null;case 1:return xt(s.type)&&qa(),dt(s),null;case 3:return g=s.stateNode,Bi(),ze(wt),ze(ct),pf(),g.pendingContext&&(g.context=g.pendingContext,g.pendingContext=null),(r===null||r.child===null)&&(Va(s)?s.flags|=4:r===null||r.memoizedState.isDehydrated&&!(s.flags&256)||(s.flags|=1024,tn!==null&&(Hf(tn),tn=null))),If(r,s),dt(s),null;case 5:df(s);var y=Gr(ss.current);if(c=s.type,r!==null&&s.stateNode!=null)Tx(r,s,c,g,y),r.ref!==s.ref&&(s.flags|=512,s.flags|=2097152);else{if(!g){if(s.stateNode===null)throw Error(n(166));return dt(s),null}if(r=Gr(bn.current),Va(s)){g=s.stateNode,c=s.type;var b=s.memoizedProps;switch(g[_n]=s,g[ts]=b,r=(s.mode&1)!==0,c){case"dialog":Fe("cancel",g),Fe("close",g);break;case"iframe":case"object":case"embed":Fe("load",g);break;case"video":case"audio":for(y=0;y<Zo.length;y++)Fe(Zo[y],g);break;case"source":Fe("error",g);break;case"img":case"image":case"link":Fe("error",g),Fe("load",g);break;case"details":Fe("toggle",g);break;case"input":we(g,b),Fe("invalid",g);break;case"select":g._wrapperState={wasMultiple:!!b.multiple},Fe("invalid",g);break;case"textarea":je(g,b),Fe("invalid",g)}Po(c,b),y=null;for(var N in b)if(b.hasOwnProperty(N)){var B=b[N];N==="children"?typeof B=="string"?g.textContent!==B&&(b.suppressHydrationWarning!==!0&&Oa(g.textContent,B,r),y=["children",B]):typeof B=="number"&&g.textContent!==""+B&&(b.suppressHydrationWarning!==!0&&Oa(g.textContent,B,r),y=["children",""+B]):o.hasOwnProperty(N)&&B!=null&&N==="onScroll"&&Fe("scroll",g)}switch(c){case"input":fe(g),it(g,b,!0);break;case"textarea":fe(g),pt(g);break;case"select":case"option":break;default:typeof b.onClick=="function"&&(g.onclick=Da)}g=y,s.updateQueue=g,g!==null&&(s.flags|=4)}else{N=y.nodeType===9?y:y.ownerDocument,r==="http://www.w3.org/1999/xhtml"&&(r=yn(c)),r==="http://www.w3.org/1999/xhtml"?c==="script"?(r=N.createElement("div"),r.innerHTML="<script><\/script>",r=r.removeChild(r.firstChild)):typeof g.is=="string"?r=N.createElement(c,{is:g.is}):(r=N.createElement(c),c==="select"&&(N=r,g.multiple?N.multiple=!0:g.size&&(N.size=g.size))):r=N.createElementNS(r,c),r[_n]=s,r[ts]=g,Nx(r,s,!1,!1),s.stateNode=r;e:{switch(N=No(c,g),c){case"dialog":Fe("cancel",r),Fe("close",r),y=g;break;case"iframe":case"object":case"embed":Fe("load",r),y=g;break;case"video":case"audio":for(y=0;y<Zo.length;y++)Fe(Zo[y],r);y=g;break;case"source":Fe("error",r),y=g;break;case"img":case"image":case"link":Fe("error",r),Fe("load",r),y=g;break;case"details":Fe("toggle",r),y=g;break;case"input":we(r,g),y=be(r,g),Fe("invalid",r);break;case"option":y=g;break;case"select":r._wrapperState={wasMultiple:!!g.multiple},y=K({},g,{value:void 0}),Fe("invalid",r);break;case"textarea":je(r,g),y=Ye(r,g),Fe("invalid",r);break;default:y=g}Po(c,y),B=y;for(b in B)if(B.hasOwnProperty(b)){var Y=B[b];b==="style"?Bt(r,Y):b==="dangerouslySetInnerHTML"?(Y=Y?Y.__html:void 0,Y!=null&&An(r,Y)):b==="children"?typeof Y=="string"?(c!=="textarea"||Y!=="")&&wn(r,Y):typeof Y=="number"&&wn(r,""+Y):b!=="suppressContentEditableWarning"&&b!=="suppressHydrationWarning"&&b!=="autoFocus"&&(o.hasOwnProperty(b)?Y!=null&&b==="onScroll"&&Fe("scroll",r):Y!=null&&E(r,b,Y,N))}switch(c){case"input":fe(r),it(r,g,!1);break;case"textarea":fe(r),pt(r);break;case"option":g.value!=null&&r.setAttribute("value",""+re(g.value));break;case"select":r.multiple=!!g.multiple,b=g.value,b!=null?Me(r,!!g.multiple,b,!1):g.defaultValue!=null&&Me(r,!!g.multiple,g.defaultValue,!0);break;default:typeof y.onClick=="function"&&(r.onclick=Da)}switch(c){case"button":case"input":case"select":case"textarea":g=!!g.autoFocus;break e;case"img":g=!0;break e;default:g=!1}}g&&(s.flags|=4)}s.ref!==null&&(s.flags|=512,s.flags|=2097152)}return dt(s),null;case 6:if(r&&s.stateNode!=null)Mx(r,s,r.memoizedProps,g);else{if(typeof g!="string"&&s.stateNode===null)throw Error(n(166));if(c=Gr(ss.current),Gr(bn.current),Va(s)){if(g=s.stateNode,c=s.memoizedProps,g[_n]=s,(b=g.nodeValue!==c)&&(r=It,r!==null))switch(r.tag){case 3:Oa(g.nodeValue,c,(r.mode&1)!==0);break;case 5:r.memoizedProps.suppressHydrationWarning!==!0&&Oa(g.nodeValue,c,(r.mode&1)!==0)}b&&(s.flags|=4)}else g=(c.nodeType===9?c:c.ownerDocument).createTextNode(g),g[_n]=s,s.stateNode=g}return dt(s),null;case 13:if(ze(We),g=s.memoizedState,r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){if(Be&&Lt!==null&&s.mode&1&&!(s.flags&128))Lw(),qi(),s.flags|=98560,b=!1;else if(b=Va(s),g!==null&&g.dehydrated!==null){if(r===null){if(!b)throw Error(n(318));if(b=s.memoizedState,b=b!==null?b.dehydrated:null,!b)throw Error(n(317));b[_n]=s}else qi(),!(s.flags&128)&&(s.memoizedState=null),s.flags|=4;dt(s),b=!1}else tn!==null&&(Hf(tn),tn=null),b=!0;if(!b)return s.flags&65536?s:null}return s.flags&128?(s.lanes=c,s):(g=g!==null,g!==(r!==null&&r.memoizedState!==null)&&g&&(s.child.flags|=8192,s.mode&1&&(r===null||We.current&1?rt===0&&(rt=3):Gf())),s.updateQueue!==null&&(s.flags|=4),dt(s),null);case 4:return Bi(),If(r,s),r===null&&Jo(s.stateNode.containerInfo),dt(s),null;case 10:return af(s.type._context),dt(s),null;case 17:return xt(s.type)&&qa(),dt(s),null;case 19:if(ze(We),b=s.memoizedState,b===null)return dt(s),null;if(g=(s.flags&128)!==0,N=b.rendering,N===null)if(g)fs(b,!1);else{if(rt!==0||r!==null&&r.flags&128)for(r=s.child;r!==null;){if(N=Ya(r),N!==null){for(s.flags|=128,fs(b,!1),g=N.updateQueue,g!==null&&(s.updateQueue=g,s.flags|=4),s.subtreeFlags=0,g=c,c=s.child;c!==null;)b=c,r=g,b.flags&=14680066,N=b.alternate,N===null?(b.childLanes=0,b.lanes=r,b.child=null,b.subtreeFlags=0,b.memoizedProps=null,b.memoizedState=null,b.updateQueue=null,b.dependencies=null,b.stateNode=null):(b.childLanes=N.childLanes,b.lanes=N.lanes,b.child=N.child,b.subtreeFlags=0,b.deletions=null,b.memoizedProps=N.memoizedProps,b.memoizedState=N.memoizedState,b.updateQueue=N.updateQueue,b.type=N.type,r=N.dependencies,b.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),c=c.sibling;return qe(We,We.current&1|2),s.child}r=r.sibling}b.tail!==null&&Ue()>Wi&&(s.flags|=128,g=!0,fs(b,!1),s.lanes=4194304)}else{if(!g)if(r=Ya(N),r!==null){if(s.flags|=128,g=!0,c=r.updateQueue,c!==null&&(s.updateQueue=c,s.flags|=4),fs(b,!0),b.tail===null&&b.tailMode==="hidden"&&!N.alternate&&!Be)return dt(s),null}else 2*Ue()-b.renderingStartTime>Wi&&c!==1073741824&&(s.flags|=128,g=!0,fs(b,!1),s.lanes=4194304);b.isBackwards?(N.sibling=s.child,s.child=N):(c=b.last,c!==null?c.sibling=N:s.child=N,b.last=N)}return b.tail!==null?(s=b.tail,b.rendering=s,b.tail=s.sibling,b.renderingStartTime=Ue(),s.sibling=null,c=We.current,qe(We,g?c&1|2:c&1),s):(dt(s),null);case 22:case 23:return Wf(),g=s.memoizedState!==null,r!==null&&r.memoizedState!==null!==g&&(s.flags|=8192),g&&s.mode&1?Ot&1073741824&&(dt(s),s.subtreeFlags&6&&(s.flags|=8192)):dt(s),null;case 24:return null;case 25:return null}throw Error(n(156,s.tag))}function yA(r,s){switch(ef(s),s.tag){case 1:return xt(s.type)&&qa(),r=s.flags,r&65536?(s.flags=r&-65537|128,s):null;case 3:return Bi(),ze(wt),ze(ct),pf(),r=s.flags,r&65536&&!(r&128)?(s.flags=r&-65537|128,s):null;case 5:return df(s),null;case 13:if(ze(We),r=s.memoizedState,r!==null&&r.dehydrated!==null){if(s.alternate===null)throw Error(n(340));qi()}return r=s.flags,r&65536?(s.flags=r&-65537|128,s):null;case 19:return ze(We),null;case 4:return Bi(),null;case 10:return af(s.type._context),null;case 22:case 23:return Wf(),null;case 24:return null;default:return null}}var iu=!1,ht=!1,wA=typeof WeakSet=="function"?WeakSet:Set,ve=null;function Hi(r,s){var c=r.ref;if(c!==null)if(typeof c=="function")try{c(null)}catch(g){Xe(r,s,g)}else c.current=null}function Lf(r,s,c){try{c()}catch(g){Xe(r,s,g)}}var Ax=!1;function xA(r,s){if(Uc=Ea,r=cw(),jc(r)){if("selectionStart"in r)var c={start:r.selectionStart,end:r.selectionEnd};else e:{c=(c=r.ownerDocument)&&c.defaultView||window;var g=c.getSelection&&c.getSelection();if(g&&g.rangeCount!==0){c=g.anchorNode;var y=g.anchorOffset,b=g.focusNode;g=g.focusOffset;try{c.nodeType,b.nodeType}catch{c=null;break e}var N=0,B=-1,Y=-1,ie=0,ue=0,le=r,ae=null;t:for(;;){for(var pe;le!==c||y!==0&&le.nodeType!==3||(B=N+y),le!==b||g!==0&&le.nodeType!==3||(Y=N+g),le.nodeType===3&&(N+=le.nodeValue.length),(pe=le.firstChild)!==null;)ae=le,le=pe;for(;;){if(le===r)break t;if(ae===c&&++ie===y&&(B=N),ae===b&&++ue===g&&(Y=N),(pe=le.nextSibling)!==null)break;le=ae,ae=le.parentNode}le=pe}c=B===-1||Y===-1?null:{start:B,end:Y}}else c=null}c=c||{start:0,end:0}}else c=null;for(Wc={focusedElem:r,selectionRange:c},Ea=!1,ve=s;ve!==null;)if(s=ve,r=s.child,(s.subtreeFlags&1028)!==0&&r!==null)r.return=s,ve=r;else for(;ve!==null;){s=ve;try{var ye=s.alternate;if(s.flags&1024)switch(s.tag){case 0:case 11:case 15:break;case 1:if(ye!==null){var xe=ye.memoizedProps,Ze=ye.memoizedState,ee=s.stateNode,J=ee.getSnapshotBeforeUpdate(s.elementType===s.type?xe:nn(s.type,xe),Ze);ee.__reactInternalSnapshotBeforeUpdate=J}break;case 3:var te=s.stateNode.containerInfo;te.nodeType===1?te.textContent="":te.nodeType===9&&te.documentElement&&te.removeChild(te.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(ce){Xe(s,s.return,ce)}if(r=s.sibling,r!==null){r.return=s.return,ve=r;break}ve=s.return}return ye=Ax,Ax=!1,ye}function ds(r,s,c){var g=s.updateQueue;if(g=g!==null?g.lastEffect:null,g!==null){var y=g=g.next;do{if((y.tag&r)===r){var b=y.destroy;y.destroy=void 0,b!==void 0&&Lf(s,c,b)}y=y.next}while(y!==g)}}function ou(r,s){if(s=s.updateQueue,s=s!==null?s.lastEffect:null,s!==null){var c=s=s.next;do{if((c.tag&r)===r){var g=c.create;c.destroy=g()}c=c.next}while(c!==s)}}function Of(r){var s=r.ref;if(s!==null){var c=r.stateNode;switch(r.tag){case 5:r=c;break;default:r=c}typeof s=="function"?s(r):s.current=r}}function Ix(r){var s=r.alternate;s!==null&&(r.alternate=null,Ix(s)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(s=r.stateNode,s!==null&&(delete s[_n],delete s[ts],delete s[Xc],delete s[nA],delete s[rA])),r.stateNode=null,r.return=null,r.dependencies=null,r.memoizedProps=null,r.memoizedState=null,r.pendingProps=null,r.stateNode=null,r.updateQueue=null}function Lx(r){return r.tag===5||r.tag===3||r.tag===4}function Ox(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||Lx(r.return))return null;r=r.return}for(r.sibling.return=r.return,r=r.sibling;r.tag!==5&&r.tag!==6&&r.tag!==18;){if(r.flags&2||r.child===null||r.tag===4)continue e;r.child.return=r,r=r.child}if(!(r.flags&2))return r.stateNode}}function Df(r,s,c){var g=r.tag;if(g===5||g===6)r=r.stateNode,s?c.nodeType===8?c.parentNode.insertBefore(r,s):c.insertBefore(r,s):(c.nodeType===8?(s=c.parentNode,s.insertBefore(r,c)):(s=c,s.appendChild(r)),c=c._reactRootContainer,c!=null||s.onclick!==null||(s.onclick=Da));else if(g!==4&&(r=r.child,r!==null))for(Df(r,s,c),r=r.sibling;r!==null;)Df(r,s,c),r=r.sibling}function jf(r,s,c){var g=r.tag;if(g===5||g===6)r=r.stateNode,s?c.insertBefore(r,s):c.appendChild(r);else if(g!==4&&(r=r.child,r!==null))for(jf(r,s,c),r=r.sibling;r!==null;)jf(r,s,c),r=r.sibling}var ut=null,rn=!1;function yr(r,s,c){for(c=c.child;c!==null;)Dx(r,s,c),c=c.sibling}function Dx(r,s,c){if(Vt&&typeof Vt.onCommitFiberUnmount=="function")try{Vt.onCommitFiberUnmount(bi,c)}catch{}switch(c.tag){case 5:ht||Hi(c,s);case 6:var g=ut,y=rn;ut=null,yr(r,s,c),ut=g,rn=y,ut!==null&&(rn?(r=ut,c=c.stateNode,r.nodeType===8?r.parentNode.removeChild(c):r.removeChild(c)):ut.removeChild(c.stateNode));break;case 18:ut!==null&&(rn?(r=ut,c=c.stateNode,r.nodeType===8?Yc(r.parentNode,c):r.nodeType===1&&Yc(r,c),Ho(r)):Yc(ut,c.stateNode));break;case 4:g=ut,y=rn,ut=c.stateNode.containerInfo,rn=!0,yr(r,s,c),ut=g,rn=y;break;case 0:case 11:case 14:case 15:if(!ht&&(g=c.updateQueue,g!==null&&(g=g.lastEffect,g!==null))){y=g=g.next;do{var b=y,N=b.destroy;b=b.tag,N!==void 0&&(b&2||b&4)&&Lf(c,s,N),y=y.next}while(y!==g)}yr(r,s,c);break;case 1:if(!ht&&(Hi(c,s),g=c.stateNode,typeof g.componentWillUnmount=="function"))try{g.props=c.memoizedProps,g.state=c.memoizedState,g.componentWillUnmount()}catch(B){Xe(c,s,B)}yr(r,s,c);break;case 21:yr(r,s,c);break;case 22:c.mode&1?(ht=(g=ht)||c.memoizedState!==null,yr(r,s,c),ht=g):yr(r,s,c);break;default:yr(r,s,c)}}function jx(r){var s=r.updateQueue;if(s!==null){r.updateQueue=null;var c=r.stateNode;c===null&&(c=r.stateNode=new wA),s.forEach(function(g){var y=NA.bind(null,r,g);c.has(g)||(c.add(g),g.then(y,y))})}}function on(r,s){var c=s.deletions;if(c!==null)for(var g=0;g<c.length;g++){var y=c[g];try{var b=r,N=s,B=N;e:for(;B!==null;){switch(B.tag){case 5:ut=B.stateNode,rn=!1;break e;case 3:ut=B.stateNode.containerInfo,rn=!0;break e;case 4:ut=B.stateNode.containerInfo,rn=!0;break e}B=B.return}if(ut===null)throw Error(n(160));Dx(b,N,y),ut=null,rn=!1;var Y=y.alternate;Y!==null&&(Y.return=null),y.return=null}catch(ie){Xe(y,s,ie)}}if(s.subtreeFlags&12854)for(s=s.child;s!==null;)qx(s,r),s=s.sibling}function qx(r,s){var c=r.alternate,g=r.flags;switch(r.tag){case 0:case 11:case 14:case 15:if(on(s,r),En(r),g&4){try{ds(3,r,r.return),ou(3,r)}catch(xe){Xe(r,r.return,xe)}try{ds(5,r,r.return)}catch(xe){Xe(r,r.return,xe)}}break;case 1:on(s,r),En(r),g&512&&c!==null&&Hi(c,c.return);break;case 5:if(on(s,r),En(r),g&512&&c!==null&&Hi(c,c.return),r.flags&32){var y=r.stateNode;try{wn(y,"")}catch(xe){Xe(r,r.return,xe)}}if(g&4&&(y=r.stateNode,y!=null)){var b=r.memoizedProps,N=c!==null?c.memoizedProps:b,B=r.type,Y=r.updateQueue;if(r.updateQueue=null,Y!==null)try{B==="input"&&b.type==="radio"&&b.name!=null&&De(y,b),No(B,N);var ie=No(B,b);for(N=0;N<Y.length;N+=2){var ue=Y[N],le=Y[N+1];ue==="style"?Bt(y,le):ue==="dangerouslySetInnerHTML"?An(y,le):ue==="children"?wn(y,le):E(y,ue,le,ie)}switch(B){case"input":Ce(y,b);break;case"textarea":Pt(y,b);break;case"select":var ae=y._wrapperState.wasMultiple;y._wrapperState.wasMultiple=!!b.multiple;var pe=b.value;pe!=null?Me(y,!!b.multiple,pe,!1):ae!==!!b.multiple&&(b.defaultValue!=null?Me(y,!!b.multiple,b.defaultValue,!0):Me(y,!!b.multiple,b.multiple?[]:"",!1))}y[ts]=b}catch(xe){Xe(r,r.return,xe)}}break;case 6:if(on(s,r),En(r),g&4){if(r.stateNode===null)throw Error(n(162));y=r.stateNode,b=r.memoizedProps;try{y.nodeValue=b}catch(xe){Xe(r,r.return,xe)}}break;case 3:if(on(s,r),En(r),g&4&&c!==null&&c.memoizedState.isDehydrated)try{Ho(s.containerInfo)}catch(xe){Xe(r,r.return,xe)}break;case 4:on(s,r),En(r);break;case 13:on(s,r),En(r),y=r.child,y.flags&8192&&(b=y.memoizedState!==null,y.stateNode.isHidden=b,!b||y.alternate!==null&&y.alternate.memoizedState!==null||(zf=Ue())),g&4&&jx(r);break;case 22:if(ue=c!==null&&c.memoizedState!==null,r.mode&1?(ht=(ie=ht)||ue,on(s,r),ht=ie):on(s,r),En(r),g&8192){if(ie=r.memoizedState!==null,(r.stateNode.isHidden=ie)&&!ue&&r.mode&1)for(ve=r,ue=r.child;ue!==null;){for(le=ve=ue;ve!==null;){switch(ae=ve,pe=ae.child,ae.tag){case 0:case 11:case 14:case 15:ds(4,ae,ae.return);break;case 1:Hi(ae,ae.return);var ye=ae.stateNode;if(typeof ye.componentWillUnmount=="function"){g=ae,c=ae.return;try{s=g,ye.props=s.memoizedProps,ye.state=s.memoizedState,ye.componentWillUnmount()}catch(xe){Xe(g,c,xe)}}break;case 5:Hi(ae,ae.return);break;case 22:if(ae.memoizedState!==null){$x(le);continue}}pe!==null?(pe.return=ae,ve=pe):$x(le)}ue=ue.sibling}e:for(ue=null,le=r;;){if(le.tag===5){if(ue===null){ue=le;try{y=le.stateNode,ie?(b=y.style,typeof b.setProperty=="function"?b.setProperty("display","none","important"):b.display="none"):(B=le.stateNode,Y=le.memoizedProps.style,N=Y!=null&&Y.hasOwnProperty("display")?Y.display:null,B.style.display=Tt("display",N))}catch(xe){Xe(r,r.return,xe)}}}else if(le.tag===6){if(ue===null)try{le.stateNode.nodeValue=ie?"":le.memoizedProps}catch(xe){Xe(r,r.return,xe)}}else if((le.tag!==22&&le.tag!==23||le.memoizedState===null||le===r)&&le.child!==null){le.child.return=le,le=le.child;continue}if(le===r)break e;for(;le.sibling===null;){if(le.return===null||le.return===r)break e;ue===le&&(ue=null),le=le.return}ue===le&&(ue=null),le.sibling.return=le.return,le=le.sibling}}break;case 19:on(s,r),En(r),g&4&&jx(r);break;case 21:break;default:on(s,r),En(r)}}function En(r){var s=r.flags;if(s&2){try{e:{for(var c=r.return;c!==null;){if(Lx(c)){var g=c;break e}c=c.return}throw Error(n(160))}switch(g.tag){case 5:var y=g.stateNode;g.flags&32&&(wn(y,""),g.flags&=-33);var b=Ox(r);jf(r,b,y);break;case 3:case 4:var N=g.stateNode.containerInfo,B=Ox(r);Df(r,B,N);break;default:throw Error(n(161))}}catch(Y){Xe(r,r.return,Y)}r.flags&=-3}s&4096&&(r.flags&=-4097)}function _A(r,s,c){ve=r,Fx(r)}function Fx(r,s,c){for(var g=(r.mode&1)!==0;ve!==null;){var y=ve,b=y.child;if(y.tag===22&&g){var N=y.memoizedState!==null||iu;if(!N){var B=y.alternate,Y=B!==null&&B.memoizedState!==null||ht;B=iu;var ie=ht;if(iu=N,(ht=Y)&&!ie)for(ve=y;ve!==null;)N=ve,Y=N.child,N.tag===22&&N.memoizedState!==null?Bx(y):Y!==null?(Y.return=N,ve=Y):Bx(y);for(;b!==null;)ve=b,Fx(b),b=b.sibling;ve=y,iu=B,ht=ie}zx(r)}else y.subtreeFlags&8772&&b!==null?(b.return=y,ve=b):zx(r)}}function zx(r){for(;ve!==null;){var s=ve;if(s.flags&8772){var c=s.alternate;try{if(s.flags&8772)switch(s.tag){case 0:case 11:case 15:ht||ou(5,s);break;case 1:var g=s.stateNode;if(s.flags&4&&!ht)if(c===null)g.componentDidMount();else{var y=s.elementType===s.type?c.memoizedProps:nn(s.type,c.memoizedProps);g.componentDidUpdate(y,c.memoizedState,g.__reactInternalSnapshotBeforeUpdate)}var b=s.updateQueue;b!==null&&$w(s,b,g);break;case 3:var N=s.updateQueue;if(N!==null){if(c=null,s.child!==null)switch(s.child.tag){case 5:c=s.child.stateNode;break;case 1:c=s.child.stateNode}$w(s,N,c)}break;case 5:var B=s.stateNode;if(c===null&&s.flags&4){c=B;var Y=s.memoizedProps;switch(s.type){case"button":case"input":case"select":case"textarea":Y.autoFocus&&c.focus();break;case"img":Y.src&&(c.src=Y.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(s.memoizedState===null){var ie=s.alternate;if(ie!==null){var ue=ie.memoizedState;if(ue!==null){var le=ue.dehydrated;le!==null&&Ho(le)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}ht||s.flags&512&&Of(s)}catch(ae){Xe(s,s.return,ae)}}if(s===r){ve=null;break}if(c=s.sibling,c!==null){c.return=s.return,ve=c;break}ve=s.return}}function $x(r){for(;ve!==null;){var s=ve;if(s===r){ve=null;break}var c=s.sibling;if(c!==null){c.return=s.return,ve=c;break}ve=s.return}}function Bx(r){for(;ve!==null;){var s=ve;try{switch(s.tag){case 0:case 11:case 15:var c=s.return;try{ou(4,s)}catch(Y){Xe(s,c,Y)}break;case 1:var g=s.stateNode;if(typeof g.componentDidMount=="function"){var y=s.return;try{g.componentDidMount()}catch(Y){Xe(s,y,Y)}}var b=s.return;try{Of(s)}catch(Y){Xe(s,b,Y)}break;case 5:var N=s.return;try{Of(s)}catch(Y){Xe(s,N,Y)}}}catch(Y){Xe(s,s.return,Y)}if(s===r){ve=null;break}var B=s.sibling;if(B!==null){B.return=s.return,ve=B;break}ve=s.return}}var bA=Math.ceil,su=C.ReactCurrentDispatcher,qf=C.ReactCurrentOwner,Kt=C.ReactCurrentBatchConfig,Ie=0,st=null,Je=null,lt=0,Ot=0,Ui=hr(0),rt=0,hs=null,Yr=0,au=0,Ff=0,ps=null,bt=null,zf=0,Wi=1/0,Bn=null,uu=!1,$f=null,wr=null,lu=!1,xr=null,cu=0,gs=0,Bf=null,fu=-1,du=0;function vt(){return Ie&6?Ue():fu!==-1?fu:fu=Ue()}function _r(r){return r.mode&1?Ie&2&<!==0?lt&-lt:oA.transition!==null?(du===0&&(du=O0()),du):(r=Oe,r!==0||(r=window.event,r=r===void 0?16:H0(r.type)),r):1}function sn(r,s,c,g){if(50<gs)throw gs=0,Bf=null,Error(n(185));Fo(r,c,g),(!(Ie&2)||r!==st)&&(r===st&&(!(Ie&2)&&(au|=c),rt===4&&br(r,lt)),St(r,g),c===1&&Ie===0&&!(s.mode&1)&&(Wi=Ue()+500,za&&gr()))}function St(r,s){var c=r.callbackNode;o2(r,s);var g=Ci(r,r===st?lt:0);if(g===0)c!==null&&wa(c),r.callbackNode=null,r.callbackPriority=0;else if(s=g&-g,r.callbackPriority!==s){if(c!=null&&wa(c),s===1)r.tag===0?iA(Hx.bind(null,r)):Nw(Hx.bind(null,r)),eA(function(){!(Ie&6)&&gr()}),c=null;else{switch(D0(g)){case 1:c=jo;break;case 4:c=_a;break;case 16:c=_i;break;case 536870912:c=qo;break;default:c=_i}c=Zx(c,Vx.bind(null,r))}r.callbackPriority=s,r.callbackNode=c}}function Vx(r,s){if(fu=-1,du=0,Ie&6)throw Error(n(327));var c=r.callbackNode;if(Gi()&&r.callbackNode!==c)return null;var g=Ci(r,r===st?lt:0);if(g===0)return null;if(g&30||g&r.expiredLanes||s)s=hu(r,g);else{s=g;var y=Ie;Ie|=2;var b=Wx();(st!==r||lt!==s)&&(Bn=null,Wi=Ue()+500,Qr(r,s));do try{CA();break}catch(B){Ux(r,B)}while(!0);sf(),su.current=b,Ie=y,Je!==null?s=0:(st=null,lt=0,s=rt)}if(s!==0){if(s===2&&(y=_c(r),y!==0&&(g=y,s=Vf(r,y))),s===1)throw c=hs,Qr(r,0),br(r,g),St(r,Ue()),c;if(s===6)br(r,g);else{if(y=r.current.alternate,!(g&30)&&!SA(y)&&(s=hu(r,g),s===2&&(b=_c(r),b!==0&&(g=b,s=Vf(r,b))),s===1))throw c=hs,Qr(r,0),br(r,g),St(r,Ue()),c;switch(r.finishedWork=y,r.finishedLanes=g,s){case 0:case 1:throw Error(n(345));case 2:Zr(r,bt,Bn);break;case 3:if(br(r,g),(g&130023424)===g&&(s=zf+500-Ue(),10<s)){if(Ci(r,0)!==0)break;if(y=r.suspendedLanes,(y&g)!==g){vt(),r.pingedLanes|=r.suspendedLanes&y;break}r.timeoutHandle=Kc(Zr.bind(null,r,bt,Bn),s);break}Zr(r,bt,Bn);break;case 4:if(br(r,g),(g&4194240)===g)break;for(s=r.eventTimes,y=-1;0<g;){var N=31-Mt(g);b=1<<N,N=s[N],N>y&&(y=N),g&=~b}if(g=y,g=Ue()-g,g=(120>g?120:480>g?480:1080>g?1080:1920>g?1920:3e3>g?3e3:4320>g?4320:1960*bA(g/1960))-g,10<g){r.timeoutHandle=Kc(Zr.bind(null,r,bt,Bn),g);break}Zr(r,bt,Bn);break;case 5:Zr(r,bt,Bn);break;default:throw Error(n(329))}}}return St(r,Ue()),r.callbackNode===c?Vx.bind(null,r):null}function Vf(r,s){var c=ps;return r.current.memoizedState.isDehydrated&&(Qr(r,s).flags|=256),r=hu(r,s),r!==2&&(s=bt,bt=c,s!==null&&Hf(s)),r}function Hf(r){bt===null?bt=r:bt.push.apply(bt,r)}function SA(r){for(var s=r;;){if(s.flags&16384){var c=s.updateQueue;if(c!==null&&(c=c.stores,c!==null))for(var g=0;g<c.length;g++){var y=c[g],b=y.getSnapshot;y=y.value;try{if(!en(b(),y))return!1}catch{return!1}}}if(c=s.child,s.subtreeFlags&16384&&c!==null)c.return=s,s=c;else{if(s===r)break;for(;s.sibling===null;){if(s.return===null||s.return===r)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function br(r,s){for(s&=~Ff,s&=~au,r.suspendedLanes|=s,r.pingedLanes&=~s,r=r.expirationTimes;0<s;){var c=31-Mt(s),g=1<<c;r[c]=-1,s&=~g}}function Hx(r){if(Ie&6)throw Error(n(327));Gi();var s=Ci(r,0);if(!(s&1))return St(r,Ue()),null;var c=hu(r,s);if(r.tag!==0&&c===2){var g=_c(r);g!==0&&(s=g,c=Vf(r,g))}if(c===1)throw c=hs,Qr(r,0),br(r,s),St(r,Ue()),c;if(c===6)throw Error(n(345));return r.finishedWork=r.current.alternate,r.finishedLanes=s,Zr(r,bt,Bn),St(r,Ue()),null}function Uf(r,s){var c=Ie;Ie|=1;try{return r(s)}finally{Ie=c,Ie===0&&(Wi=Ue()+500,za&&gr())}}function Xr(r){xr!==null&&xr.tag===0&&!(Ie&6)&&Gi();var s=Ie;Ie|=1;var c=Kt.transition,g=Oe;try{if(Kt.transition=null,Oe=1,r)return r()}finally{Oe=g,Kt.transition=c,Ie=s,!(Ie&6)&&gr()}}function Wf(){Ot=Ui.current,ze(Ui)}function Qr(r,s){r.finishedWork=null,r.finishedLanes=0;var c=r.timeoutHandle;if(c!==-1&&(r.timeoutHandle=-1,J2(c)),Je!==null)for(c=Je.return;c!==null;){var g=c;switch(ef(g),g.tag){case 1:g=g.type.childContextTypes,g!=null&&qa();break;case 3:Bi(),ze(wt),ze(ct),pf();break;case 5:df(g);break;case 4:Bi();break;case 13:ze(We);break;case 19:ze(We);break;case 10:af(g.type._context);break;case 22:case 23:Wf()}c=c.return}if(st=r,Je=r=Sr(r.current,null),lt=Ot=s,rt=0,hs=null,Ff=au=Yr=0,bt=ps=null,Wr!==null){for(s=0;s<Wr.length;s++)if(c=Wr[s],g=c.interleaved,g!==null){c.interleaved=null;var y=g.next,b=c.pending;if(b!==null){var N=b.next;b.next=y,g.next=N}c.pending=g}Wr=null}return r}function Ux(r,s){do{var c=Je;try{if(sf(),Xa.current=eu,Qa){for(var g=Ge.memoizedState;g!==null;){var y=g.queue;y!==null&&(y.pending=null),g=g.next}Qa=!1}if(Kr=0,ot=nt=Ge=null,as=!1,us=0,qf.current=null,c===null||c.return===null){rt=1,hs=s,Je=null;break}e:{var b=r,N=c.return,B=c,Y=s;if(s=lt,B.flags|=32768,Y!==null&&typeof Y=="object"&&typeof Y.then=="function"){var ie=Y,ue=B,le=ue.tag;if(!(ue.mode&1)&&(le===0||le===11||le===15)){var ae=ue.alternate;ae?(ue.updateQueue=ae.updateQueue,ue.memoizedState=ae.memoizedState,ue.lanes=ae.lanes):(ue.updateQueue=null,ue.memoizedState=null)}var pe=vx(N);if(pe!==null){pe.flags&=-257,mx(pe,N,B,b,s),pe.mode&1&&gx(b,ie,s),s=pe,Y=ie;var ye=s.updateQueue;if(ye===null){var xe=new Set;xe.add(Y),s.updateQueue=xe}else ye.add(Y);break e}else{if(!(s&1)){gx(b,ie,s),Gf();break e}Y=Error(n(426))}}else if(Be&&B.mode&1){var Ze=vx(N);if(Ze!==null){!(Ze.flags&65536)&&(Ze.flags|=256),mx(Ze,N,B,b,s),rf(Vi(Y,B));break e}}b=Y=Vi(Y,B),rt!==4&&(rt=2),ps===null?ps=[b]:ps.push(b),b=N;do{switch(b.tag){case 3:b.flags|=65536,s&=-s,b.lanes|=s;var ee=hx(b,Y,s);zw(b,ee);break e;case 1:B=Y;var J=b.type,te=b.stateNode;if(!(b.flags&128)&&(typeof J.getDerivedStateFromError=="function"||te!==null&&typeof te.componentDidCatch=="function"&&(wr===null||!wr.has(te)))){b.flags|=65536,s&=-s,b.lanes|=s;var ce=px(b,B,s);zw(b,ce);break e}}b=b.return}while(b!==null)}Kx(c)}catch(_e){s=_e,Je===c&&c!==null&&(Je=c=c.return);continue}break}while(!0)}function Wx(){var r=su.current;return su.current=eu,r===null?eu:r}function Gf(){(rt===0||rt===3||rt===2)&&(rt=4),st===null||!(Yr&268435455)&&!(au&268435455)||br(st,lt)}function hu(r,s){var c=Ie;Ie|=2;var g=Wx();(st!==r||lt!==s)&&(Bn=null,Qr(r,s));do try{EA();break}catch(y){Ux(r,y)}while(!0);if(sf(),Ie=c,su.current=g,Je!==null)throw Error(n(261));return st=null,lt=0,rt}function EA(){for(;Je!==null;)Gx(Je)}function CA(){for(;Je!==null&&!xa();)Gx(Je)}function Gx(r){var s=Qx(r.alternate,r,Ot);r.memoizedProps=r.pendingProps,s===null?Kx(r):Je=s,qf.current=null}function Kx(r){var s=r;do{var c=s.alternate;if(r=s.return,s.flags&32768){if(c=yA(c,s),c!==null){c.flags&=32767,Je=c;return}if(r!==null)r.flags|=32768,r.subtreeFlags=0,r.deletions=null;else{rt=6,Je=null;return}}else if(c=mA(c,s,Ot),c!==null){Je=c;return}if(s=s.sibling,s!==null){Je=s;return}Je=s=r}while(s!==null);rt===0&&(rt=5)}function Zr(r,s,c){var g=Oe,y=Kt.transition;try{Kt.transition=null,Oe=1,kA(r,s,c,g)}finally{Kt.transition=y,Oe=g}return null}function kA(r,s,c,g){do Gi();while(xr!==null);if(Ie&6)throw Error(n(327));c=r.finishedWork;var y=r.finishedLanes;if(c===null)return null;if(r.finishedWork=null,r.finishedLanes=0,c===r.current)throw Error(n(177));r.callbackNode=null,r.callbackPriority=0;var b=c.lanes|c.childLanes;if(s2(r,b),r===st&&(Je=st=null,lt=0),!(c.subtreeFlags&2064)&&!(c.flags&2064)||lu||(lu=!0,Zx(_i,function(){return Gi(),null})),b=(c.flags&15990)!==0,c.subtreeFlags&15990||b){b=Kt.transition,Kt.transition=null;var N=Oe;Oe=1;var B=Ie;Ie|=4,qf.current=null,xA(r,c),qx(c,r),W2(Wc),Ea=!!Uc,Wc=Uc=null,r.current=c,_A(c),pc(),Ie=B,Oe=N,Kt.transition=b}else r.current=c;if(lu&&(lu=!1,xr=r,cu=y),b=r.pendingLanes,b===0&&(wr=null),mc(c.stateNode),St(r,Ue()),s!==null)for(g=r.onRecoverableError,c=0;c<s.length;c++)y=s[c],g(y.value,{componentStack:y.stack,digest:y.digest});if(uu)throw uu=!1,r=$f,$f=null,r;return cu&1&&r.tag!==0&&Gi(),b=r.pendingLanes,b&1?r===Bf?gs++:(gs=0,Bf=r):gs=0,gr(),null}function Gi(){if(xr!==null){var r=D0(cu),s=Kt.transition,c=Oe;try{if(Kt.transition=null,Oe=16>r?16:r,xr===null)var g=!1;else{if(r=xr,xr=null,cu=0,Ie&6)throw Error(n(331));var y=Ie;for(Ie|=4,ve=r.current;ve!==null;){var b=ve,N=b.child;if(ve.flags&16){var B=b.deletions;if(B!==null){for(var Y=0;Y<B.length;Y++){var ie=B[Y];for(ve=ie;ve!==null;){var ue=ve;switch(ue.tag){case 0:case 11:case 15:ds(8,ue,b)}var le=ue.child;if(le!==null)le.return=ue,ve=le;else for(;ve!==null;){ue=ve;var ae=ue.sibling,pe=ue.return;if(Ix(ue),ue===ie){ve=null;break}if(ae!==null){ae.return=pe,ve=ae;break}ve=pe}}}var ye=b.alternate;if(ye!==null){var xe=ye.child;if(xe!==null){ye.child=null;do{var Ze=xe.sibling;xe.sibling=null,xe=Ze}while(xe!==null)}}ve=b}}if(b.subtreeFlags&2064&&N!==null)N.return=b,ve=N;else e:for(;ve!==null;){if(b=ve,b.flags&2048)switch(b.tag){case 0:case 11:case 15:ds(9,b,b.return)}var ee=b.sibling;if(ee!==null){ee.return=b.return,ve=ee;break e}ve=b.return}}var J=r.current;for(ve=J;ve!==null;){N=ve;var te=N.child;if(N.subtreeFlags&2064&&te!==null)te.return=N,ve=te;else e:for(N=J;ve!==null;){if(B=ve,B.flags&2048)try{switch(B.tag){case 0:case 11:case 15:ou(9,B)}}catch(_e){Xe(B,B.return,_e)}if(B===N){ve=null;break e}var ce=B.sibling;if(ce!==null){ce.return=B.return,ve=ce;break e}ve=B.return}}if(Ie=y,gr(),Vt&&typeof Vt.onPostCommitFiberRoot=="function")try{Vt.onPostCommitFiberRoot(bi,r)}catch{}g=!0}return g}finally{Oe=c,Kt.transition=s}}return!1}function Yx(r,s,c){s=Vi(c,s),s=hx(r,s,1),r=mr(r,s,1),s=vt(),r!==null&&(Fo(r,1,s),St(r,s))}function Xe(r,s,c){if(r.tag===3)Yx(r,r,c);else for(;s!==null;){if(s.tag===3){Yx(s,r,c);break}else if(s.tag===1){var g=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof g.componentDidCatch=="function"&&(wr===null||!wr.has(g))){r=Vi(c,r),r=px(s,r,1),s=mr(s,r,1),r=vt(),s!==null&&(Fo(s,1,r),St(s,r));break}}s=s.return}}function RA(r,s,c){var g=r.pingCache;g!==null&&g.delete(s),s=vt(),r.pingedLanes|=r.suspendedLanes&c,st===r&&(lt&c)===c&&(rt===4||rt===3&&(lt&130023424)===lt&&500>Ue()-zf?Qr(r,0):Ff|=c),St(r,s)}function Xx(r,s){s===0&&(r.mode&1?(s=Ei,Ei<<=1,!(Ei&130023424)&&(Ei=4194304)):s=1);var c=vt();r=Fn(r,s),r!==null&&(Fo(r,s,c),St(r,c))}function PA(r){var s=r.memoizedState,c=0;s!==null&&(c=s.retryLane),Xx(r,c)}function NA(r,s){var c=0;switch(r.tag){case 13:var g=r.stateNode,y=r.memoizedState;y!==null&&(c=y.retryLane);break;case 19:g=r.stateNode;break;default:throw Error(n(314))}g!==null&&g.delete(s),Xx(r,c)}var Qx;Qx=function(r,s,c){if(r!==null)if(r.memoizedProps!==s.pendingProps||wt.current)_t=!0;else{if(!(r.lanes&c)&&!(s.flags&128))return _t=!1,vA(r,s,c);_t=!!(r.flags&131072)}else _t=!1,Be&&s.flags&1048576&&Tw(s,Ba,s.index);switch(s.lanes=0,s.tag){case 2:var g=s.type;ru(r,s),r=s.pendingProps;var y=Oi(s,ct.current);$i(s,c),y=mf(null,s,g,r,y,c);var b=yf();return s.flags|=1,typeof y=="object"&&y!==null&&typeof y.render=="function"&&y.$$typeof===void 0?(s.tag=1,s.memoizedState=null,s.updateQueue=null,xt(g)?(b=!0,Fa(s)):b=!1,s.memoizedState=y.state!==null&&y.state!==void 0?y.state:null,cf(s),y.updater=tu,s.stateNode=y,y._reactInternals=s,Ef(s,g,r,c),s=Pf(null,s,g,!0,b,c)):(s.tag=0,Be&&b&&Jc(s),gt(null,s,y,c),s=s.child),s;case 16:g=s.elementType;e:{switch(ru(r,s),r=s.pendingProps,y=g._init,g=y(g._payload),s.type=g,y=s.tag=MA(g),r=nn(g,r),y){case 0:s=Rf(null,s,g,r,c);break e;case 1:s=Sx(null,s,g,r,c);break e;case 11:s=yx(null,s,g,r,c);break e;case 14:s=wx(null,s,g,nn(g.type,r),c);break e}throw Error(n(306,g,""))}return s;case 0:return g=s.type,y=s.pendingProps,y=s.elementType===g?y:nn(g,y),Rf(r,s,g,y,c);case 1:return g=s.type,y=s.pendingProps,y=s.elementType===g?y:nn(g,y),Sx(r,s,g,y,c);case 3:e:{if(Ex(s),r===null)throw Error(n(387));g=s.pendingProps,b=s.memoizedState,y=b.element,Fw(r,s),Ka(s,g,null,c);var N=s.memoizedState;if(g=N.element,b.isDehydrated)if(b={element:g,isDehydrated:!1,cache:N.cache,pendingSuspenseBoundaries:N.pendingSuspenseBoundaries,transitions:N.transitions},s.updateQueue.baseState=b,s.memoizedState=b,s.flags&256){y=Vi(Error(n(423)),s),s=Cx(r,s,g,c,y);break e}else if(g!==y){y=Vi(Error(n(424)),s),s=Cx(r,s,g,c,y);break e}else for(Lt=dr(s.stateNode.containerInfo.firstChild),It=s,Be=!0,tn=null,c=jw(s,null,g,c),s.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling;else{if(qi(),g===y){s=$n(r,s,c);break e}gt(r,s,g,c)}s=s.child}return s;case 5:return Bw(s),r===null&&nf(s),g=s.type,y=s.pendingProps,b=r!==null?r.memoizedProps:null,N=y.children,Gc(g,y)?N=null:b!==null&&Gc(g,b)&&(s.flags|=32),bx(r,s),gt(r,s,N,c),s.child;case 6:return r===null&&nf(s),null;case 13:return kx(r,s,c);case 4:return ff(s,s.stateNode.containerInfo),g=s.pendingProps,r===null?s.child=Fi(s,null,g,c):gt(r,s,g,c),s.child;case 11:return g=s.type,y=s.pendingProps,y=s.elementType===g?y:nn(g,y),yx(r,s,g,y,c);case 7:return gt(r,s,s.pendingProps,c),s.child;case 8:return gt(r,s,s.pendingProps.children,c),s.child;case 12:return gt(r,s,s.pendingProps.children,c),s.child;case 10:e:{if(g=s.type._context,y=s.pendingProps,b=s.memoizedProps,N=y.value,qe(Ua,g._currentValue),g._currentValue=N,b!==null)if(en(b.value,N)){if(b.children===y.children&&!wt.current){s=$n(r,s,c);break e}}else for(b=s.child,b!==null&&(b.return=s);b!==null;){var B=b.dependencies;if(B!==null){N=b.child;for(var Y=B.firstContext;Y!==null;){if(Y.context===g){if(b.tag===1){Y=zn(-1,c&-c),Y.tag=2;var ie=b.updateQueue;if(ie!==null){ie=ie.shared;var ue=ie.pending;ue===null?Y.next=Y:(Y.next=ue.next,ue.next=Y),ie.pending=Y}}b.lanes|=c,Y=b.alternate,Y!==null&&(Y.lanes|=c),uf(b.return,c,s),B.lanes|=c;break}Y=Y.next}}else if(b.tag===10)N=b.type===s.type?null:b.child;else if(b.tag===18){if(N=b.return,N===null)throw Error(n(341));N.lanes|=c,B=N.alternate,B!==null&&(B.lanes|=c),uf(N,c,s),N=b.sibling}else N=b.child;if(N!==null)N.return=b;else for(N=b;N!==null;){if(N===s){N=null;break}if(b=N.sibling,b!==null){b.return=N.return,N=b;break}N=N.return}b=N}gt(r,s,y.children,c),s=s.child}return s;case 9:return y=s.type,g=s.pendingProps.children,$i(s,c),y=Wt(y),g=g(y),s.flags|=1,gt(r,s,g,c),s.child;case 14:return g=s.type,y=nn(g,s.pendingProps),y=nn(g.type,y),wx(r,s,g,y,c);case 15:return xx(r,s,s.type,s.pendingProps,c);case 17:return g=s.type,y=s.pendingProps,y=s.elementType===g?y:nn(g,y),ru(r,s),s.tag=1,xt(g)?(r=!0,Fa(s)):r=!1,$i(s,c),fx(s,g,y),Ef(s,g,y,c),Pf(null,s,g,!0,r,c);case 19:return Px(r,s,c);case 22:return _x(r,s,c)}throw Error(n(156,s.tag))};function Zx(r,s){return ya(r,s)}function TA(r,s,c,g){this.tag=r,this.key=c,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=g,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Yt(r,s,c,g){return new TA(r,s,c,g)}function Kf(r){return r=r.prototype,!(!r||!r.isReactComponent)}function MA(r){if(typeof r=="function")return Kf(r)?1:0;if(r!=null){if(r=r.$$typeof,r===$)return 11;if(r===H)return 14}return 2}function Sr(r,s){var c=r.alternate;return c===null?(c=Yt(r.tag,s,r.key,r.mode),c.elementType=r.elementType,c.type=r.type,c.stateNode=r.stateNode,c.alternate=r,r.alternate=c):(c.pendingProps=s,c.type=r.type,c.flags=0,c.subtreeFlags=0,c.deletions=null),c.flags=r.flags&14680064,c.childLanes=r.childLanes,c.lanes=r.lanes,c.child=r.child,c.memoizedProps=r.memoizedProps,c.memoizedState=r.memoizedState,c.updateQueue=r.updateQueue,s=r.dependencies,c.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},c.sibling=r.sibling,c.index=r.index,c.ref=r.ref,c}function pu(r,s,c,g,y,b){var N=2;if(g=r,typeof r=="function")Kf(r)&&(N=1);else if(typeof r=="string")N=5;else e:switch(r){case T:return Jr(c.children,y,b,s);case L:N=8,y|=8;break;case O:return r=Yt(12,c,s,y|2),r.elementType=O,r.lanes=b,r;case W:return r=Yt(13,c,s,y),r.elementType=W,r.lanes=b,r;case I:return r=Yt(19,c,s,y),r.elementType=I,r.lanes=b,r;case Q:return gu(c,y,b,s);default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case q:N=10;break e;case F:N=9;break e;case $:N=11;break e;case H:N=14;break e;case z:N=16,g=null;break e}throw Error(n(130,r==null?r:typeof r,""))}return s=Yt(N,c,s,y),s.elementType=r,s.type=g,s.lanes=b,s}function Jr(r,s,c,g){return r=Yt(7,r,g,s),r.lanes=c,r}function gu(r,s,c,g){return r=Yt(22,r,g,s),r.elementType=Q,r.lanes=c,r.stateNode={isHidden:!1},r}function Yf(r,s,c){return r=Yt(6,r,null,s),r.lanes=c,r}function Xf(r,s,c){return s=Yt(4,r.children!==null?r.children:[],r.key,s),s.lanes=c,s.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},s}function AA(r,s,c,g,y){this.tag=s,this.containerInfo=r,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=bc(0),this.expirationTimes=bc(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=bc(0),this.identifierPrefix=g,this.onRecoverableError=y,this.mutableSourceEagerHydrationData=null}function Qf(r,s,c,g,y,b,N,B,Y){return r=new AA(r,s,c,B,Y),s===1?(s=1,b===!0&&(s|=8)):s=0,b=Yt(3,null,null,s),r.current=b,b.stateNode=r,b.memoizedState={element:g,isDehydrated:c,cache:null,transitions:null,pendingSuspenseBoundaries:null},cf(b),r}function IA(r,s,c){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:A,key:g==null?null:""+g,children:r,containerInfo:s,implementation:c}}function Jx(r){if(!r)return pr;r=r._reactInternals;e:{if(xn(r)!==r||r.tag!==1)throw Error(n(170));var s=r;do{switch(s.tag){case 3:s=s.stateNode.context;break e;case 1:if(xt(s.type)){s=s.stateNode.__reactInternalMemoizedMergedChildContext;break e}}s=s.return}while(s!==null);throw Error(n(171))}if(r.tag===1){var c=r.type;if(xt(c))return Rw(r,c,s)}return s}function e1(r,s,c,g,y,b,N,B,Y){return r=Qf(c,g,!0,r,y,b,N,B,Y),r.context=Jx(null),c=r.current,g=vt(),y=_r(c),b=zn(g,y),b.callback=s??null,mr(c,b,y),r.current.lanes=y,Fo(r,y,g),St(r,g),r}function vu(r,s,c,g){var y=s.current,b=vt(),N=_r(y);return c=Jx(c),s.context===null?s.context=c:s.pendingContext=c,s=zn(b,N),s.payload={element:r},g=g===void 0?null:g,g!==null&&(s.callback=g),r=mr(y,s,N),r!==null&&(sn(r,y,N,b),Ga(r,y,N)),N}function mu(r){if(r=r.current,!r.child)return null;switch(r.child.tag){case 5:return r.child.stateNode;default:return r.child.stateNode}}function t1(r,s){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var c=r.retryLane;r.retryLane=c!==0&&c<s?c:s}}function Zf(r,s){t1(r,s),(r=r.alternate)&&t1(r,s)}var n1=typeof reportError=="function"?reportError:function(r){console.error(r)};function Jf(r){this._internalRoot=r}yu.prototype.render=Jf.prototype.render=function(r){var s=this._internalRoot;if(s===null)throw Error(n(409));vu(r,s,null,null)},yu.prototype.unmount=Jf.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var s=r.containerInfo;Xr(function(){vu(null,r,null,null)}),s[On]=null}};function yu(r){this._internalRoot=r}yu.prototype.unstable_scheduleHydration=function(r){if(r){var s=F0();r={blockedOn:null,target:r,priority:s};for(var c=0;c<lr.length&&s!==0&&s<lr[c].priority;c++);lr.splice(c,0,r),c===0&&B0(r)}};function ed(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11)}function wu(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11&&(r.nodeType!==8||r.nodeValue!==" react-mount-point-unstable "))}function r1(){}function LA(r,s,c,g,y){if(y){if(typeof g=="function"){var b=g;g=function(){var ie=mu(N);b.call(ie)}}var N=e1(s,g,r,0,null,!1,!1,"",r1);return r._reactRootContainer=N,r[On]=N.current,Jo(r.nodeType===8?r.parentNode:r),Xr(),N}for(;y=r.lastChild;)r.removeChild(y);if(typeof g=="function"){var B=g;g=function(){var ie=mu(Y);B.call(ie)}}var Y=Qf(r,0,!1,null,null,!1,!1,"",r1);return r._reactRootContainer=Y,r[On]=Y.current,Jo(r.nodeType===8?r.parentNode:r),Xr(function(){vu(s,Y,c,g)}),Y}function xu(r,s,c,g,y){var b=c._reactRootContainer;if(b){var N=b;if(typeof y=="function"){var B=y;y=function(){var Y=mu(N);B.call(Y)}}vu(s,N,r,y)}else N=LA(c,s,r,y,g);return mu(N)}j0=function(r){switch(r.tag){case 3:var s=r.stateNode;if(s.current.memoizedState.isDehydrated){var c=Ln(s.pendingLanes);c!==0&&(Sc(s,c|1),St(s,Ue()),!(Ie&6)&&(Wi=Ue()+500,gr()))}break;case 13:Xr(function(){var g=Fn(r,1);if(g!==null){var y=vt();sn(g,r,1,y)}}),Zf(r,1)}},Ec=function(r){if(r.tag===13){var s=Fn(r,134217728);if(s!==null){var c=vt();sn(s,r,134217728,c)}Zf(r,134217728)}},q0=function(r){if(r.tag===13){var s=_r(r),c=Fn(r,s);if(c!==null){var g=vt();sn(c,r,s,g)}Zf(r,s)}},F0=function(){return Oe},z0=function(r,s){var c=Oe;try{return Oe=r,s()}finally{Oe=c}},Ao=function(r,s,c){switch(s){case"input":if(Ce(r,c),s=c.name,c.type==="radio"&&s!=null){for(c=r;c.parentNode;)c=c.parentNode;for(c=c.querySelectorAll("input[name="+JSON.stringify(""+s)+'][type="radio"]'),s=0;s<c.length;s++){var g=c[s];if(g!==r&&g.form===r.form){var y=ja(g);if(!y)throw Error(n(90));he(g),Ce(g,y)}}}break;case"textarea":Pt(r,c);break;case"select":s=c.value,s!=null&&Me(r,!!c.multiple,s,!1)}},ca=Uf,fa=Xr;var OA={usingClientEntryPoint:!1,Events:[ns,Ii,ja,Io,la,Uf]},vs={findFiberByHostInstance:Br,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},DA={bundleType:vs.bundleType,version:vs.version,rendererPackageName:vs.rendererPackageName,rendererConfig:vs.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:C.ReactCurrentDispatcher,findHostInstanceByFiber:function(r){return r=va(r),r===null?null:r.stateNode},findFiberByHostInstance:vs.findFiberByHostInstance,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var _u=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!_u.isDisabled&&_u.supportsFiber)try{bi=_u.inject(DA),Vt=_u}catch{}}return Et.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=OA,Et.createPortal=function(r,s){var c=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!ed(s))throw Error(n(200));return IA(r,s,null,c)},Et.createRoot=function(r,s){if(!ed(r))throw Error(n(299));var c=!1,g="",y=n1;return s!=null&&(s.unstable_strictMode===!0&&(c=!0),s.identifierPrefix!==void 0&&(g=s.identifierPrefix),s.onRecoverableError!==void 0&&(y=s.onRecoverableError)),s=Qf(r,1,!1,null,null,c,!1,g,y),r[On]=s.current,Jo(r.nodeType===8?r.parentNode:r),new Jf(s)},Et.findDOMNode=function(r){if(r==null)return null;if(r.nodeType===1)return r;var s=r._reactInternals;if(s===void 0)throw typeof r.render=="function"?Error(n(188)):(r=Object.keys(r).join(","),Error(n(268,r)));return r=va(s),r=r===null?null:r.stateNode,r},Et.flushSync=function(r){return Xr(r)},Et.hydrate=function(r,s,c){if(!wu(s))throw Error(n(200));return xu(null,r,s,!0,c)},Et.hydrateRoot=function(r,s,c){if(!ed(r))throw Error(n(405));var g=c!=null&&c.hydratedSources||null,y=!1,b="",N=n1;if(c!=null&&(c.unstable_strictMode===!0&&(y=!0),c.identifierPrefix!==void 0&&(b=c.identifierPrefix),c.onRecoverableError!==void 0&&(N=c.onRecoverableError)),s=e1(s,null,r,1,c??null,y,!1,b,N),r[On]=s.current,Jo(r),g)for(r=0;r<g.length;r++)c=g[r],y=c._getVersion,y=y(c._source),s.mutableSourceEagerHydrationData==null?s.mutableSourceEagerHydrationData=[c,y]:s.mutableSourceEagerHydrationData.push(c,y);return new yu(s)},Et.render=function(r,s,c){if(!wu(s))throw Error(n(200));return xu(null,r,s,!1,c)},Et.unmountComponentAtNode=function(r){if(!wu(r))throw Error(n(40));return r._reactRootContainer?(Xr(function(){xu(null,null,r,!1,function(){r._reactRootContainer=null,r[On]=null})}),!0):!1},Et.unstable_batchedUpdates=Uf,Et.unstable_renderSubtreeIntoContainer=function(r,s,c,g){if(!wu(c))throw Error(n(200));if(r==null||r._reactInternals===void 0)throw Error(n(38));return xu(r,s,c,!1,g)},Et.version="18.3.1-next-f1338f8080-20240426",Et}var f1;function CR(){if(f1)return rd.exports;f1=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),rd.exports=UA(),rd.exports}var d1;function WA(){if(d1)return Su;d1=1;var e=CR();return Su.createRoot=e.createRoot,Su.hydrateRoot=e.hydrateRoot,Su}var GA=WA();const ii="__TSR_index",h1="popstate",p1="beforeunload";function kR(e){let t=e.getLocation();const n=new Set,i=u=>{t=e.getLocation(),n.forEach(l=>l({location:t,action:u}))},o=u=>{e.notifyOnIndexChange??!0?i(u):t=e.getLocation()},a=async({task:u,navigateOpts:l,...f})=>{var d,h;if((l==null?void 0:l.ignoreBlocker)??!1){u();return}const v=((d=e.getBlockers)==null?void 0:d.call(e))??[],m=f.type==="PUSH"||f.type==="REPLACE";if(typeof document<"u"&&v.length&&m)for(const x of v){const w=Ls(f.path,f.state);if(await x.blockerFn({currentLocation:t,nextLocation:w,action:f.type})){(h=e.onBlocked)==null||h.call(e);return}}u()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:u=>(n.add(u),()=>{n.delete(u)}),push:(u,l,f)=>{const d=t.state[ii];l=iy(d+1,l),a({task:()=>{e.pushState(u,l),i({type:"PUSH"})},navigateOpts:f,type:"PUSH",path:u,state:l})},replace:(u,l,f)=>{const d=t.state[ii];l=iy(d,l),a({task:()=>{e.replaceState(u,l),i({type:"REPLACE"})},navigateOpts:f,type:"REPLACE",path:u,state:l})},go:(u,l)=>{a({task:()=>{e.go(u),o({type:"GO",index:u})},navigateOpts:l,type:"GO"})},back:u=>{a({task:()=>{e.back((u==null?void 0:u.ignoreBlocker)??!1),o({type:"BACK"})},navigateOpts:u,type:"BACK"})},forward:u=>{a({task:()=>{e.forward((u==null?void 0:u.ignoreBlocker)??!1),o({type:"FORWARD"})},navigateOpts:u,type:"FORWARD"})},canGoBack:()=>t.state[ii]!==0,createHref:u=>e.createHref(u),block:u=>{var l;if(!e.setBlockers)return()=>{};const f=((l=e.getBlockers)==null?void 0:l.call(e))??[];return e.setBlockers([...f,u]),()=>{var d,h;const p=((d=e.getBlockers)==null?void 0:d.call(e))??[];(h=e.setBlockers)==null||h.call(e,p.filter(v=>v!==u))}},flush:()=>{var u;return(u=e.flush)==null?void 0:u.call(e)},destroy:()=>{var u;return(u=e.destroy)==null?void 0:u.call(e)},notify:i}}function iy(e,t){return t||(t={}),{...t,key:XA(),[ii]:e}}function KA(e){const t=typeof document<"u"?window:void 0,n=t.history.pushState,i=t.history.replaceState;let o=[];const a=()=>o,u=L=>o=L,l=L=>L,f=()=>Ls(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state);let d=f(),h,p=!1,v=!1,m=!1,x=!1;const w=()=>d;let _,S;const k=()=>{_&&(T._ignoreSubscribers=!0,(_.isPush?t.history.pushState:t.history.replaceState)(_.state,"",_.href),T._ignoreSubscribers=!1,_=void 0,S=void 0,h=void 0)},E=(L,O,q)=>{const F=l(O);S||(h=d),d=Ls(O,q),_={href:F,state:q,isPush:(_==null?void 0:_.isPush)||L==="push"},S||(S=Promise.resolve().then(()=>k()))},C=L=>{d=f(),T.notify({type:L})},R=async()=>{if(v){v=!1;return}const L=f(),O=L.state[ii]-d.state[ii],q=O===1,F=O===-1,$=!q&&!F||p;p=!1;const W=$?"GO":F?"BACK":"FORWARD",I=$?{type:"GO",index:O}:{type:F?"BACK":"FORWARD"};if(m)m=!1;else{const H=a();if(typeof document<"u"&&H.length){for(const z of H)if(await z.blockerFn({currentLocation:d,nextLocation:L,action:W})){v=!0,t.history.go(1),T.notify(I);return}}}d=f(),T.notify(I)},A=L=>{if(x){x=!1;return}let O=!1;const q=a();if(typeof document<"u"&&q.length)for(const F of q){const $=F.enableBeforeUnload??!0;if($===!0){O=!0;break}if(typeof $=="function"&&$()===!0){O=!0;break}}if(O)return L.preventDefault(),L.returnValue=""},T=kR({getLocation:w,getLength:()=>t.history.length,pushState:(L,O)=>E("push",L,O),replaceState:(L,O)=>E("replace",L,O),back:L=>(L&&(m=!0),x=!0,t.history.back()),forward:L=>{L&&(m=!0),x=!0,t.history.forward()},go:L=>{p=!0,t.history.go(L)},createHref:L=>l(L),flush:k,destroy:()=>{t.history.pushState=n,t.history.replaceState=i,t.removeEventListener(p1,A,{capture:!0}),t.removeEventListener(h1,R)},onBlocked:()=>{h&&d!==h&&(d=h)},getBlockers:a,setBlockers:u,notifyOnIndexChange:!1});return t.addEventListener(p1,A,{capture:!0}),t.addEventListener(h1,R),t.history.pushState=function(...L){const O=n.apply(t.history,L);return T._ignoreSubscribers||C("PUSH"),O},t.history.replaceState=function(...L){const O=i.apply(t.history,L);return T._ignoreSubscribers||C("REPLACE"),O},T}function YA(e={initialEntries:["/"]}){const t=e.initialEntries;let n=e.initialIndex?Math.min(Math.max(e.initialIndex,0),t.length-1):t.length-1;const i=t.map((a,u)=>iy(u,void 0));return kR({getLocation:()=>Ls(t[n],i[n]),getLength:()=>t.length,pushState:(a,u)=>{n<t.length-1&&(t.splice(n+1),i.splice(n+1)),i.push(u),t.push(a),n=Math.max(t.length-1,0)},replaceState:(a,u)=>{i[n]=u,t[n]=a},back:()=>{n=Math.max(n-1,0)},forward:()=>{n=Math.min(n+1,t.length-1)},go:a=>{n=Math.min(Math.max(n+a,0),t.length-1)},createHref:a=>a})}function Ls(e,t){const n=e.indexOf("#"),i=e.indexOf("?");return{href:e,pathname:e.substring(0,n>0?i>0?Math.min(n,i):n:i>0?i:e.length),hash:n>-1?e.substring(n):"",search:i>-1?e.slice(i,n===-1?void 0:n):"",state:t||{[ii]:0}}}function XA(){return(Math.random()+1).toString(36).substring(7)}var QA="Invariant failed";function jt(e,t){if(!e)throw new Error(QA)}const sd=P.createContext(null);function RR(){return typeof document>"u"?sd:window.__TSR_ROUTER_CONTEXT__?window.__TSR_ROUTER_CONTEXT__:(window.__TSR_ROUTER_CONTEXT__=sd,sd)}function Zn(e){const t=P.useContext(RR());return e==null||e.warn,t}var ad={exports:{}},ud={},ld={exports:{}},cd={};/**
|
|
41
|
-
* @license React
|
|
42
|
-
* use-sync-external-store-shim.production.js
|
|
43
|
-
*
|
|
44
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
45
|
-
*
|
|
46
|
-
* This source code is licensed under the MIT license found in the
|
|
47
|
-
* LICENSE file in the root directory of this source tree.
|
|
48
|
-
*/var g1;function ZA(){if(g1)return cd;g1=1;var e=hi();function t(p,v){return p===v&&(p!==0||1/p===1/v)||p!==p&&v!==v}var n=typeof Object.is=="function"?Object.is:t,i=e.useState,o=e.useEffect,a=e.useLayoutEffect,u=e.useDebugValue;function l(p,v){var m=v(),x=i({inst:{value:m,getSnapshot:v}}),w=x[0].inst,_=x[1];return a(function(){w.value=m,w.getSnapshot=v,f(w)&&_({inst:w})},[p,m,v]),o(function(){return f(w)&&_({inst:w}),p(function(){f(w)&&_({inst:w})})},[p]),u(m),m}function f(p){var v=p.getSnapshot;p=p.value;try{var m=v();return!n(p,m)}catch{return!0}}function d(p,v){return v()}var h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?d:l;return cd.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:h,cd}var v1;function JA(){return v1||(v1=1,ld.exports=ZA()),ld.exports}/**
|
|
49
|
-
* @license React
|
|
50
|
-
* use-sync-external-store-shim/with-selector.production.js
|
|
51
|
-
*
|
|
52
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
53
|
-
*
|
|
54
|
-
* This source code is licensed under the MIT license found in the
|
|
55
|
-
* LICENSE file in the root directory of this source tree.
|
|
56
|
-
*/var m1;function eI(){if(m1)return ud;m1=1;var e=hi(),t=JA();function n(d,h){return d===h&&(d!==0||1/d===1/h)||d!==d&&h!==h}var i=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,a=e.useRef,u=e.useEffect,l=e.useMemo,f=e.useDebugValue;return ud.useSyncExternalStoreWithSelector=function(d,h,p,v,m){var x=a(null);if(x.current===null){var w={hasValue:!1,value:null};x.current=w}else w=x.current;x=l(function(){function S(A){if(!k){if(k=!0,E=A,A=v(A),m!==void 0&&w.hasValue){var T=w.value;if(m(T,A))return C=T}return C=A}if(T=C,i(E,A))return T;var L=v(A);return m!==void 0&&m(T,L)?(E=A,T):(E=A,C=L)}var k=!1,E,C,R=p===void 0?null:p;return[function(){return S(h())},R===null?void 0:function(){return S(R())}]},[h,p,v,m]);var _=o(d,x[0],x[1]);return u(function(){w.hasValue=!0,w.value=_},[_]),f(_),_},ud}var y1;function tI(){return y1||(y1=1,ad.exports=eI()),ad.exports}var nI=tI();const to=new WeakMap,Vu=new WeakMap,el={current:[]};let fd=!1,Ts=0;const bs=new Set,Eu=new Map;function PR(e){const t=Array.from(e).sort((n,i)=>n instanceof no&&n.options.deps.includes(i)?1:i instanceof no&&i.options.deps.includes(n)?-1:0);for(const n of t){if(el.current.includes(n))continue;el.current.push(n),n.recompute();const i=Vu.get(n);if(i)for(const o of i){const a=to.get(o);a&&PR(a)}}}function rI(e){e.listeners.forEach(t=>t({prevVal:e.prevState,currentVal:e.state}))}function iI(e){e.listeners.forEach(t=>t({prevVal:e.prevState,currentVal:e.state}))}function NR(e){if(Ts>0&&!Eu.has(e)&&Eu.set(e,e.prevState),bs.add(e),!(Ts>0)&&!fd)try{for(fd=!0;bs.size>0;){const t=Array.from(bs);bs.clear();for(const n of t){const i=Eu.get(n)??n.prevState;n.prevState=i,rI(n)}for(const n of t){const i=to.get(n);i&&(el.current.push(n),PR(i))}for(const n of t){const i=to.get(n);if(i)for(const o of i)iI(o)}}}finally{fd=!1,el.current=[],Eu.clear()}}function dd(e){Ts++;try{e()}finally{if(Ts--,Ts===0){const t=Array.from(bs)[0];t&&NR(t)}}}class oy{constructor(t,n){this.listeners=new Set,this.subscribe=i=>{var o,a;this.listeners.add(i);const u=(a=(o=this.options)==null?void 0:o.onSubscribe)==null?void 0:a.call(o,i,this);return()=>{this.listeners.delete(i),u==null||u()}},this.setState=i=>{var o,a,u;this.prevState=this.state,this.state=(o=this.options)!=null&&o.updateFn?this.options.updateFn(this.prevState)(i):i(this.prevState),(u=(a=this.options)==null?void 0:a.onUpdate)==null||u.call(a),NR(this)},this.prevState=t,this.state=t,this.options=n}}class no{constructor(t){this.listeners=new Set,this._subscriptions=[],this.lastSeenDepValues=[],this.getDepVals=()=>{const n=[],i=[];for(const o of this.options.deps)n.push(o.prevState),i.push(o.state);return this.lastSeenDepValues=i,{prevDepVals:n,currDepVals:i,prevVal:this.prevState??void 0}},this.recompute=()=>{var n,i;this.prevState=this.state;const{prevDepVals:o,currDepVals:a,prevVal:u}=this.getDepVals();this.state=this.options.fn({prevDepVals:o,currDepVals:a,prevVal:u}),(i=(n=this.options).onUpdate)==null||i.call(n)},this.checkIfRecalculationNeededDeeply=()=>{for(const a of this.options.deps)a instanceof no&&a.checkIfRecalculationNeededDeeply();let n=!1;const i=this.lastSeenDepValues,{currDepVals:o}=this.getDepVals();for(let a=0;a<o.length;a++)if(o[a]!==i[a]){n=!0;break}n&&this.recompute()},this.mount=()=>(this.registerOnGraph(),this.checkIfRecalculationNeededDeeply(),()=>{this.unregisterFromGraph();for(const n of this._subscriptions)n()}),this.subscribe=n=>{var i,o;this.listeners.add(n);const a=(o=(i=this.options).onSubscribe)==null?void 0:o.call(i,n,this);return()=>{this.listeners.delete(n),a==null||a()}},this.options=t,this.state=t.fn({prevDepVals:void 0,prevVal:void 0,currDepVals:this.getDepVals().currDepVals})}registerOnGraph(t=this.options.deps){for(const n of t)if(n instanceof no)n.registerOnGraph(),this.registerOnGraph(n.options.deps);else if(n instanceof oy){let i=to.get(n);i||(i=new Set,to.set(n,i)),i.add(this);let o=Vu.get(this);o||(o=new Set,Vu.set(this,o)),o.add(n)}}unregisterFromGraph(t=this.options.deps){for(const n of t)if(n instanceof no)this.unregisterFromGraph(n.options.deps);else if(n instanceof oy){const i=to.get(n);i&&i.delete(this);const o=Vu.get(this);o&&o.delete(n)}}}function oI(e,t=n=>n){return nI.useSyncExternalStoreWithSelector(e.subscribe,()=>e.state,()=>e.state,t,sI)}function sI(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[i,o]of e)if(!t.has(i)||!Object.is(o,t.get(i)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const i of e)if(!t.has(i))return!1;return!0}const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(let i=0;i<n.length;i++)if(!Object.prototype.hasOwnProperty.call(t,n[i])||!Object.is(e[n[i]],t[n[i]]))return!1;return!0}const Dt="__root__";function aI(e,t){let n,i,o,a="";for(n in e)if((o=e[n])!==void 0)if(Array.isArray(o))for(i=0;i<o.length;i++)a&&(a+="&"),a+=encodeURIComponent(n)+"="+encodeURIComponent(o[i]);else a&&(a+="&"),a+=encodeURIComponent(n)+"="+encodeURIComponent(o);return""+a}function w1(e){if(!e)return"";const t=decodeURIComponent(e);return t==="false"?!1:t==="true"?!0:+t*0===0&&+t+""===t?+t:t}function uI(e,t){let n,i;const o={},a=e.split("&");for(;n=a.shift();){const u=n.indexOf("=");if(u!==-1){i=n.slice(0,u),i=decodeURIComponent(i);const l=n.slice(u+1);o[i]!==void 0?o[i]=[].concat(o[i],w1(l)):o[i]=w1(l)}else i=n,i=decodeURIComponent(i),o[i]=""}return o}const lI=fI(JSON.parse),cI=dI(JSON.stringify,JSON.parse);function fI(e){return t=>{t.substring(0,1)==="?"&&(t=t.substring(1));const n=uI(t);for(const i in n){const o=n[i];if(typeof o=="string")try{n[i]=e(o)}catch{}}return n}}function dI(e,t){function n(i){if(typeof i=="object"&&i!==null)try{return e(i)}catch{}else if(typeof i=="string"&&typeof t=="function")try{return t(i),e(i)}catch{}return i}return i=>{i={...i},Object.keys(i).forEach(a=>{const u=i[a];typeof u>"u"||u===void 0?delete i[a]:i[a]=n(u)});const o=aI(i).toString();return o?`?${o}`:""}}function Ms(e){return e[e.length-1]}function hI(e){return typeof e=="function"}function Zi(e,t){return hI(e)?e(t):e}function Hu(e,t){return t.reduce((n,i)=>(n[i]=e[i],n),{})}function Xt(e,t){if(e===t)return e;const n=t,i=_1(e)&&_1(n);if(i||Ar(e)&&Ar(n)){const o=i?e:Object.keys(e),a=o.length,u=i?n:Object.keys(n),l=u.length,f=i?[]:{};let d=0;for(let h=0;h<l;h++){const p=i?h:u[h];(!i&&o.includes(p)||i)&&e[p]===void 0&&n[p]===void 0?(f[p]=void 0,d++):(f[p]=Xt(e[p],n[p]),f[p]===e[p]&&e[p]!==void 0&&d++)}return a===l&&d===a?e:f}return n}function Ar(e){if(!x1(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const n=t.prototype;return!(!x1(n)||!n.hasOwnProperty("isPrototypeOf"))}function x1(e){return Object.prototype.toString.call(e)==="[object Object]"}function _1(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function b1(e,t){let n=Object.keys(e);return t&&(n=n.filter(i=>e[i]!==void 0)),n}function ro(e,t,n){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(Ar(e)&&Ar(t)){const i=(n==null?void 0:n.ignoreUndefined)??!0,o=b1(e,i),a=b1(t,i);return!(n!=null&&n.partial)&&o.length!==a.length?!1:a.every(u=>ro(e[u],t[u],n))}return Array.isArray(e)&&Array.isArray(t)?e.length!==t.length?!1:!e.some((i,o)=>!ro(i,t[o],n)):!1}const Ss=typeof window<"u"?P.useLayoutEffect:P.useEffect;function Qi(e){let t,n;const i=new Promise((o,a)=>{t=o,n=a});return i.status="pending",i.resolve=o=>{i.status="resolved",i.value=o,t(o),e==null||e(o)},i.reject=o=>{i.status="rejected",n(o)},i}function hd(e){const t=P.useRef({value:e,prev:null}),n=t.current.value;return e!==n&&(t.current={value:e,prev:n}),t.current.prev}function pI(e,t,n={},i={}){const o=P.useRef(typeof IntersectionObserver=="function"),a=P.useRef(null);return P.useEffect(()=>{if(!(!e.current||!o.current||i.disabled))return a.current=new IntersectionObserver(([u])=>{t(u)},n),a.current.observe(e.current),()=>{var u;(u=a.current)==null||u.disconnect()}},[t,n,i.disabled,e]),a.current}function gI(e){const t=P.useRef(null);return P.useEffect(()=>{e&&(typeof e=="function"?e(t.current):e.current=t.current)}),t}function Wn(e){return _l(e.filter(t=>t!==void 0).join("/"))}function _l(e){return e.replace(/\/{2,}/g,"/")}function Iy(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function ni(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function vI(e){return ni(Iy(e))}function tl(e,t){return e.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function mI(e,t,n){return tl(e,n)===tl(t,n)}function yI({basepath:e,base:t,to:n,trailingSlash:i="never",caseSensitive:o}){var a,u;t=nl(e,t,o),n=nl(e,n,o);let l=lo(t);const f=lo(n);l.length>1&&((a=Ms(l))==null?void 0:a.value)==="/"&&l.pop(),f.forEach((h,p)=>{h.value==="/"?p?p===f.length-1&&l.push(h):l=[h]:h.value===".."?l.pop():h.value==="."||l.push(h)}),l.length>1&&(((u=Ms(l))==null?void 0:u.value)==="/"?i==="never"&&l.pop():i==="always"&&l.push({type:"pathname",value:"/"}));const d=Wn([e,...l.map(h=>h.value)]);return _l(d)}function lo(e){if(!e)return[];e=_l(e);const t=[];if(e.slice(0,1)==="/"&&(e=e.substring(1),t.push({type:"pathname",value:"/"})),!e)return t;const n=e.split("/").filter(Boolean);return t.push(...n.map(i=>i==="$"||i==="*"?{type:"wildcard",value:i}:i.charAt(0)==="$"?{type:"param",value:i}:{type:"pathname",value:decodeURI(i)})),e.slice(-1)==="/"&&(e=e.substring(1),t.push({type:"pathname",value:"/"})),t}function Cu({path:e,params:t,leaveWildcards:n,leaveParams:i,decodeCharMap:o}){const a=lo(e),u={};for(const[l,f]of Object.entries(t)){const d=typeof f=="string";["*","_splat"].includes(l)?u[l]=d?encodeURI(f):f:u[l]=d?wI(f,o):f}return Wn(a.map(l=>{if(l.type==="wildcard"){const f=u._splat;return n?`${l.value}${f??""}`:f}if(l.type==="param"){if(i){const f=u[l.value];return`${l.value}${f??""}`}return u[l.value.substring(1)]??"undefined"}return l.value}))}function wI(e,t){let n=encodeURIComponent(e);if(t)for(const[i,o]of t)n=n.replaceAll(i,o);return n}function ku(e,t,n){const i=xI(e,t,n);if(!(n.to&&!i))return i??{}}function nl(e,t,n=!1){const i=n?e:e.toLowerCase(),o=n?t:t.toLowerCase();switch(!0){case i==="/":return t;case o===i:return"";case t.length<e.length:return t;case o[i.length]!=="/":return t;case o.startsWith(i):return t.slice(e.length);default:return t}}function xI(e,t,n){if(e!=="/"&&!t.startsWith(e))return;t=nl(e,t,n.caseSensitive);const i=nl(e,`${n.to??"$"}`,n.caseSensitive),o=lo(t),a=lo(i);t.startsWith("/")||o.unshift({type:"pathname",value:"/"}),i.startsWith("/")||a.unshift({type:"pathname",value:"/"});const u={};return(()=>{for(let f=0;f<Math.max(o.length,a.length);f++){const d=o[f],h=a[f],p=f>=o.length-1,v=f>=a.length-1;if(h){if(h.type==="wildcard"){const m=decodeURI(Wn(o.slice(f).map(x=>x.value)));return u["*"]=m,u._splat=m,!0}if(h.type==="pathname"){if(h.value==="/"&&!(d!=null&&d.value))return!0;if(d){if(n.caseSensitive){if(h.value!==d.value)return!1}else if(h.value.toLowerCase()!==d.value.toLowerCase())return!1}}if(!d)return!1;if(h.type==="param"){if(d.value==="/")return!1;d.value.charAt(0)!=="$"&&(u[h.value.substring(1)]=decodeURIComponent(d.value))}}if(!p&&v)return u["**"]=Wn(o.slice(f+1).map(m=>m.value)),!!n.fuzzy&&(h==null?void 0:h.value)!=="/"}return!0})()?u:void 0}function ei(e){return!!(e!=null&&e.isRedirect)}function pd(e){return!!(e!=null&&e.isRedirect)&&e.href}function Ly(e){const t=e.errorComponent??bl;return M.jsx(_I,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:i})=>n?P.createElement(t,{error:n,reset:i}):e.children})}class _I extends P.Component{constructor(){super(...arguments),this.state={error:null}}static getDerivedStateFromProps(t){return{resetKey:t.getResetKey()}}static getDerivedStateFromError(t){return{error:t}}reset(){this.setState({error:null})}componentDidUpdate(t,n){n.error&&n.resetKey!==this.state.resetKey&&this.reset()}componentDidCatch(t,n){this.props.onCatch&&this.props.onCatch(t,n)}render(){return this.props.children({error:this.state.resetKey!==this.props.getResetKey()?null:this.state.error,reset:()=>{this.reset()}})}}function bl({error:e}){const[t,n]=P.useState(!1);return M.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[M.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[M.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),M.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>n(i=>!i),children:t?"Hide Error":"Show Error"})]}),M.jsx("div",{style:{height:".25rem"}}),t?M.jsx("div",{children:M.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?M.jsx("code",{children:e.message}):null})}):null]})}function mt(e){const t=Zn({warn:(e==null?void 0:e.router)===void 0}),n=(e==null?void 0:e.router)||t,i=P.useRef();return oI(n.__store,o=>{if(e!=null&&e.select){if(e.structuralSharing??n.options.defaultStructuralSharing){const a=Xt(i.current,e.select(o));return i.current=a,a}return e.select(o)}return o})}function an(e){return!!(e!=null&&e.isNotFound)}function bI(e){const t=mt({select:n=>`not-found-${n.location.pathname}-${n.status}`});return M.jsx(Ly,{getResetKey:()=>t,onCatch:(n,i)=>{var o;if(an(n))(o=e.onCatch)==null||o.call(e,n,i);else throw n},errorComponent:({error:n})=>{var i;if(an(n))return(i=e.fallback)==null?void 0:i.call(e,n);throw n},children:e.children})}function SI(){return M.jsx("p",{children:"Not Found"})}const Es={stringify:e=>JSON.stringify(e,function(n,i){const o=this[n],a=Ru.find(u=>u.stringifyCondition(o));return a?a.stringify(o):i}),parse:e=>JSON.parse(e,function(n,i){const o=this[n];if(Ar(o)){const a=Ru.find(u=>u.parseCondition(o));if(a)return a.parse(o)}return i}),encode:e=>{if(Array.isArray(e))return e.map(n=>Es.encode(n));if(Ar(e))return Object.fromEntries(Object.entries(e).map(([n,i])=>[n,Es.encode(i)]));const t=Ru.find(n=>n.stringifyCondition(e));return t?t.stringify(e):e},decode:e=>{if(Ar(e)){const t=Ru.find(n=>n.parseCondition(e));if(t)return t.parse(e)}return Array.isArray(e)?e.map(t=>Es.decode(t)):Ar(e)?Object.fromEntries(Object.entries(e).map(([t,n])=>[t,Es.decode(n)])):e}},gd=(e,t,n=o=>o,i=o=>o)=>({key:e,stringifyCondition:t,stringify:o=>({[`$${e}`]:n(o)}),parseCondition:o=>Object.hasOwn(o,`$${e}`),parse:o=>i(o[`$${e}`])}),Ru=[gd("undefined",e=>e===void 0,()=>0,()=>{}),gd("date",e=>e instanceof Date,e=>e.toISOString(),e=>new Date(e)),gd("error",e=>e instanceof Error,e=>({...e,message:e.message,stack:e.stack,cause:e.cause}),e=>Object.assign(new Error(e.message),e))],TR=["component","errorComponent","pendingComponent","notFoundComponent"];function EI(e){var t;for(const n of TR)if((t=e.options[n])!=null&&t.preload)return!0;return!1}function vd(e,t){if(e==null)return{};if("~standard"in e){const n=e["~standard"].validate(t);if(n instanceof Promise)throw new sy("Async validation not supported");if(n.issues)throw new sy(JSON.stringify(n.issues,void 0,2));return n.value}return"parse"in e?e.parse(t):typeof e=="function"?e(t):{}}function CI(e){return new kI(e)}class kI{constructor(t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.startReactTransition=n=>n(),this.update=n=>{var i;n.notFoundRoute&&console.warn("The notFoundRoute API is deprecated and will be removed in the next major version. See https://tanstack.com/router/v1/docs/guide/not-found-errors#migrating-from-notfoundroute for more info.");const o=this.options;this.options={...this.options,...n},this.isServer=this.options.isServer??typeof document>"u",this.pathParamsDecodeCharMap=this.options.pathParamsAllowedCharacters?new Map(this.options.pathParamsAllowedCharacters.map(a=>[encodeURIComponent(a),a])):void 0,(!this.basepath||n.basepath&&n.basepath!==o.basepath)&&(n.basepath===void 0||n.basepath===""||n.basepath==="/"?this.basepath="/":this.basepath=`/${vI(n.basepath)}`),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.history=this.options.history??(this.isServer?YA({initialEntries:[this.basepath||"/"]}):KA()),this.latestLocation=this.parseLocation()),this.options.routeTree!==this.routeTree&&(this.routeTree=this.options.routeTree,this.buildRouteTree()),this.__store||(this.__store=new oy(PI(this.latestLocation),{onUpdate:()=>{this.__store.state={...this.state,cachedMatches:this.state.cachedMatches.filter(a=>!["redirected"].includes(a.status))}}})),typeof window<"u"&&"CSS"in window&&typeof((i=window.CSS)==null?void 0:i.supports)=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a)"))},this.buildRouteTree=()=>{this.routesById={},this.routesByPath={};const n=this.options.notFoundRoute;n&&(n.init({originalIndex:99999999999,defaultSsr:this.options.defaultSsr}),this.routesById[n.id]=n);const i=u=>{u.forEach((l,f)=>{l.init({originalIndex:f,defaultSsr:this.options.defaultSsr});const d=this.routesById[l.id];if(jt(!d,`Duplicate routes found with id: ${String(l.id)}`),this.routesById[l.id]=l,!l.isRoot&&l.path){const p=ni(l.fullPath);(!this.routesByPath[p]||l.fullPath.endsWith("/"))&&(this.routesByPath[p]=l)}const h=l.children;h!=null&&h.length&&i(h)})};i([this.routeTree]);const o=[];Object.values(this.routesById).forEach((u,l)=>{var f;if(u.isRoot||!u.path)return;const d=Iy(u.fullPath),h=lo(d);for(;h.length>1&&((f=h[0])==null?void 0:f.value)==="/";)h.shift();const p=h.map(v=>v.value==="/"?.75:v.type==="param"?.5:v.type==="wildcard"?.25:1);o.push({child:u,trimmed:d,parsed:h,index:l,scores:p})}),this.flatRoutes=o.sort((u,l)=>{const f=Math.min(u.scores.length,l.scores.length);for(let d=0;d<f;d++)if(u.scores[d]!==l.scores[d])return l.scores[d]-u.scores[d];if(u.scores.length!==l.scores.length)return l.scores.length-u.scores.length;for(let d=0;d<f;d++)if(u.parsed[d].value!==l.parsed[d].value)return u.parsed[d].value>l.parsed[d].value?1:-1;return u.index-l.index}).map((u,l)=>(u.child.rank=l,u.child))},this.subscribe=(n,i)=>{const o={eventType:n,fn:i};return this.subscribers.add(o),()=>{this.subscribers.delete(o)}},this.emit=n=>{this.subscribers.forEach(i=>{i.eventType===n.type&&i.fn(n)})},this.parseLocation=(n,i)=>{const o=({pathname:f,search:d,hash:h,state:p})=>{const v=this.options.parseSearch(d),m=this.options.stringifySearch(v);return{pathname:f,searchStr:m,search:Xt(n==null?void 0:n.search,v),hash:h.split("#").reverse()[0]??"",href:`${f}${m}${h}`,state:Xt(n==null?void 0:n.state,p)}},a=o(i??this.history.location),{__tempLocation:u,__tempKey:l}=a.state;if(u&&(!l||l===this.tempLocationKey)){const f=o(u);return f.state.key=a.state.key,delete f.state.__tempLocation,{...f,maskedLocation:a}}return a},this.resolvePathWithBase=(n,i)=>yI({basepath:this.basepath,base:n,to:_l(i),trailingSlash:this.options.trailingSlash,caseSensitive:this.options.caseSensitive}),this.getMatchedRoutes=(n,i)=>{let o={};const a=ni(n.pathname),u=h=>ku(this.basepath,a,{to:h.fullPath,caseSensitive:h.options.caseSensitive??this.options.caseSensitive,fuzzy:!0});let l=(i==null?void 0:i.to)!==void 0?this.routesByPath[i.to]:void 0;l?o=u(l):l=this.flatRoutes.find(h=>{const p=u(h);return p?(o=p,!0):!1});let f=l||this.routesById[Dt];const d=[f];for(;f.parentRoute;)f=f.parentRoute,d.unshift(f);return{matchedRoutes:d,routeParams:o,foundRoute:l}},this.cancelMatch=n=>{const i=this.getMatch(n);i&&(i.abortController.abort(),clearTimeout(i.pendingTimeout))},this.cancelMatches=()=>{var n;(n=this.state.pendingMatches)==null||n.forEach(i=>{this.cancelMatch(i.id)})},this.buildLocation=n=>{const i=(a={},u)=>{var l,f,d,h,p,v;const m=a._fromLocation?this.matchRoutes(a._fromLocation,{_buildLocation:!0}):this.state.matches,x=a.from!=null?m.find(F=>ku(this.basepath,ni(F.pathname),{to:a.from,caseSensitive:!1,fuzzy:!1})):void 0,w=(x==null?void 0:x.pathname)||this.latestLocation.pathname;jt(a.from==null||x!=null,"Could not find match for from: "+a.from);const _=(l=this.state.pendingMatches)!=null&&l.length?(f=Ms(this.state.pendingMatches))==null?void 0:f.search:((d=Ms(m))==null?void 0:d.search)||this.latestLocation.search,S=u==null?void 0:u.matchedRoutes.filter(F=>m.find($=>$.routeId===F.id));let k;if(a.to)k=this.resolvePathWithBase(w,`${a.to}`);else{const F=this.routesById[(h=S==null?void 0:S.find($=>{const W=Cu({path:$.fullPath,params:(u==null?void 0:u.routeParams)??{},decodeCharMap:this.pathParamsDecodeCharMap});return Wn([this.basepath,W])===w}))==null?void 0:h.id];k=this.resolvePathWithBase(w,(F==null?void 0:F.to)??w)}const E={...(p=Ms(m))==null?void 0:p.params};let C=(a.params??!0)===!0?E:{...E,...Zi(a.params,E)};Object.keys(C).length>0&&(u==null||u.matchedRoutes.map(F=>{var $;return(($=F.options.params)==null?void 0:$.stringify)??F.options.stringifyParams}).filter(Boolean).forEach(F=>{C={...C,...F(C)}})),k=Cu({path:k,params:C??{},leaveWildcards:!1,leaveParams:n.leaveParams,decodeCharMap:this.pathParamsDecodeCharMap});let R=_;if(n._includeValidateSearch&&((v=this.options.search)!=null&&v.strict)){let F={};u==null||u.matchedRoutes.forEach($=>{try{$.options.validateSearch&&(F={...F,...vd($.options.validateSearch,{...F,...R})??{}})}catch{}}),R=F}R=(F=>{const $=(u==null?void 0:u.matchedRoutes.reduce((H,z)=>{var Q;const D=[];if("search"in z.options)(Q=z.options.search)!=null&&Q.middlewares&&D.push(...z.options.search.middlewares);else if(z.options.preSearchFilters||z.options.postSearchFilters){const U=({search:K,next:j})=>{let X=K;"preSearchFilters"in z.options&&z.options.preSearchFilters&&(X=z.options.preSearchFilters.reduce((V,G)=>G(V),K));const oe=j(X);return"postSearchFilters"in z.options&&z.options.postSearchFilters?z.options.postSearchFilters.reduce((V,G)=>G(V),oe):oe};D.push(U)}if(n._includeValidateSearch&&z.options.validateSearch){const U=({search:K,next:j})=>{try{const X=j(K);return{...X,...vd(z.options.validateSearch,X)??{}}}catch{}};D.push(U)}return H.concat(D)},[]))??[],W=({search:H})=>a.search?a.search===!0?H:Zi(a.search,H):{};$.push(W);const I=(H,z)=>{if(H>=$.length)return z;const Q=$[H];return Q({search:z,next:U=>I(H+1,U)})};return I(0,F)})(R),R=Xt(_,R);const T=this.options.stringifySearch(R),L=a.hash===!0?this.latestLocation.hash:a.hash?Zi(a.hash,this.latestLocation.hash):void 0,O=L?`#${L}`:"";let q=a.state===!0?this.latestLocation.state:a.state?Zi(a.state,this.latestLocation.state):{};return q=Xt(this.latestLocation.state,q),{pathname:k,search:R,searchStr:T,state:q,hash:L??"",href:`${k}${T}${O}`,unmaskOnReload:a.unmaskOnReload}},o=(a={},u)=>{var l;const f=i(a);let d=u?i(u):void 0;if(!d){let v={};const m=(l=this.options.routeMasks)==null?void 0:l.find(x=>{const w=ku(this.basepath,f.pathname,{to:x.from,caseSensitive:!1,fuzzy:!1});return w?(v=w,!0):!1});if(m){const{from:x,...w}=m;u={...Hu(n,["from"]),...w,params:v},d=i(u)}}const h=this.getMatchedRoutes(f,a),p=i(a,h);if(d){const v=this.getMatchedRoutes(d,u),m=i(u,v);p.maskedLocation=m}return p};return n.mask?o(n,{...Hu(n,["from"]),...n.mask}):o(n)},this.commitLocation=({viewTransition:n,ignoreBlocker:i,...o})=>{const a=()=>{o.state.key=this.latestLocation.state.key;const f=ro(o.state,this.latestLocation.state);return delete o.state.key,f},u=this.latestLocation.href===o.href,l=this.commitLocationPromise;if(this.commitLocationPromise=Qi(()=>{l==null||l.resolve()}),u&&a())this.load();else{let{maskedLocation:f,hashScrollIntoView:d,...h}=o;f&&(h={...f,state:{...f.state,__tempKey:void 0,__tempLocation:{...h,search:h.searchStr,state:{...h.state,__tempKey:void 0,__tempLocation:void 0,key:void 0}}}},(h.unmaskOnReload??this.options.unmaskOnReload??!1)&&(h.state.__tempKey=this.tempLocationKey)),h.state.__hashScrollIntoViewOptions=d??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=n,this.history[o.replace?"replace":"push"](h.href,h.state,{ignoreBlocker:i})}return this.resetNextScroll=o.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:n,resetScroll:i,hashScrollIntoView:o,viewTransition:a,ignoreBlocker:u,href:l,...f}={})=>{if(l){const h=this.history.location.state.__TSR_index,p=Ls(l,{__TSR_index:n?h:h+1});f.to=p.pathname,f.search=this.options.parseSearch(p.search),f.hash=p.hash.slice(1)}const d=this.buildLocation({...f,_includeValidateSearch:!0});return this.commitLocation({...d,viewTransition:a,replace:n,resetScroll:i,hashScrollIntoView:o,ignoreBlocker:u})},this.navigate=({to:n,reloadDocument:i,href:o,...a})=>{if(i){o||(o=this.buildLocation({to:n,...a}).href),a.replace?window.location.replace(o):window.location.href=o;return}return this.buildAndCommitLocation({...a,href:o,to:n})},this.load=async n=>{this.latestLocation=this.parseLocation(this.latestLocation);let i,o,a;for(a=new Promise(u=>{this.startReactTransition(async()=>{var l;try{const f=this.latestLocation,d=this.state.resolvedLocation,h=d.href!==f.href,p=d.pathname!==f.pathname;this.cancelMatches();let v;dd(()=>{v=this.matchRoutes(f),this.__store.setState(m=>({...m,status:"pending",isLoading:!0,location:f,pendingMatches:v,cachedMatches:m.cachedMatches.filter(x=>!v.find(w=>w.id===x.id))}))}),this.state.redirect||this.emit({type:"onBeforeNavigate",fromLocation:d,toLocation:f,pathChanged:p,hrefChanged:h}),this.emit({type:"onBeforeLoad",fromLocation:d,toLocation:f,pathChanged:p,hrefChanged:h}),await this.loadMatches({sync:n==null?void 0:n.sync,matches:v,location:f,onReady:async()=>{this.startViewTransition(async()=>{let m,x,w;dd(()=>{this.__store.setState(_=>{const S=_.matches,k=_.pendingMatches||_.matches;return m=S.filter(E=>!k.find(C=>C.id===E.id)),x=k.filter(E=>!S.find(C=>C.id===E.id)),w=S.filter(E=>k.find(C=>C.id===E.id)),{..._,isLoading:!1,loadedAt:Date.now(),matches:k,pendingMatches:void 0,cachedMatches:[..._.cachedMatches,...m.filter(E=>E.status!=="error")]}}),this.clearExpiredCache()}),[[m,"onLeave"],[x,"onEnter"],[w,"onStay"]].forEach(([_,S])=>{_.forEach(k=>{var E,C;(C=(E=this.looseRoutesById[k.routeId].options)[S])==null||C.call(E,k)})})})}})}catch(f){pd(f)?(i=f,this.isServer||this.navigate({...i,replace:!0,ignoreBlocker:!0})):an(f)&&(o=f),this.__store.setState(d=>({...d,statusCode:i?i.statusCode:o?404:d.matches.some(h=>h.status==="error")?500:200,redirect:i}))}this.latestLoadPromise===a&&((l=this.commitLocationPromise)==null||l.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),u()})}),this.latestLoadPromise=a,await a;this.latestLoadPromise&&a!==this.latestLoadPromise;)await this.latestLoadPromise},this.startViewTransition=n=>{const i=this.shouldViewTransition??this.options.defaultViewTransition;if(delete this.shouldViewTransition,i&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let o;typeof i=="object"&&this.isViewTransitionTypesSupported?o={update:n,types:i.types}:o=n,document.startViewTransition(o)}else n()},this.updateMatch=(n,i)=>{var o;let a;const u=(o=this.state.pendingMatches)==null?void 0:o.find(h=>h.id===n),l=this.state.matches.find(h=>h.id===n),f=this.state.cachedMatches.find(h=>h.id===n),d=u?"pendingMatches":l?"matches":f?"cachedMatches":"";return d&&this.__store.setState(h=>{var p;return{...h,[d]:(p=h[d])==null?void 0:p.map(v=>v.id===n?a=i(v):v)}}),a},this.getMatch=n=>[...this.state.cachedMatches,...this.state.pendingMatches??[],...this.state.matches].find(i=>i.id===n),this.loadMatches=async({location:n,matches:i,preload:o,onReady:a,updateMatch:u=this.updateMatch,sync:l})=>{let f,d=!1;const h=async()=>{d||(d=!0,await(a==null?void 0:a()))},p=m=>!!(o&&!this.state.matches.find(x=>x.id===m));!this.isServer&&!this.state.matches.length&&h();const v=(m,x)=>{var w,_,S;if(pd(x)&&!x.reloadDocument)throw x;if(ei(x)||an(x)){if(u(m.id,k=>({...k,status:ei(x)?"redirected":an(x)?"notFound":"error",isFetching:!1,error:x,beforeLoadPromise:void 0,loaderPromise:void 0})),x.routeId||(x.routeId=m.routeId),(w=m.beforeLoadPromise)==null||w.resolve(),(_=m.loaderPromise)==null||_.resolve(),(S=m.loadPromise)==null||S.resolve(),ei(x))throw d=!0,x=this.resolveRedirect({...x,_fromLocation:n}),x;if(an(x))throw this._handleNotFound(i,x,{updateMatch:u}),x}};try{await new Promise((m,x)=>{(async()=>{var w,_,S;try{const k=(R,A,T)=>{var L,O;const{id:q,routeId:F}=i[R],$=this.looseRoutesById[F];if(A instanceof Promise)throw A;A.routerCode=T,f=f??R,v(this.getMatch(q),A);try{(O=(L=$.options).onError)==null||O.call(L,A)}catch(W){A=W,v(this.getMatch(q),A)}u(q,W=>{var I,H;return(I=W.beforeLoadPromise)==null||I.resolve(),(H=W.loadPromise)==null||H.resolve(),{...W,error:A,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController,beforeLoadPromise:void 0}})};for(const[R,{id:A,routeId:T}]of i.entries()){const L=this.getMatch(A),O=(w=i[R-1])==null?void 0:w.id,q=this.looseRoutesById[T],F=q.options.pendingMs??this.options.defaultPendingMs,$=!!(a&&!this.isServer&&!p(A)&&(q.options.loader||q.options.beforeLoad)&&typeof F=="number"&&F!==1/0&&(q.options.pendingComponent??this.options.defaultPendingComponent));let W=!0;if((L.beforeLoadPromise||L.loaderPromise)&&($&&setTimeout(()=>{try{h()}catch{}},F),await L.beforeLoadPromise,W=this.getMatch(A).status!=="success"),W){try{u(A,Z=>({...Z,loadPromise:Qi(()=>{var ne;(ne=Z.loadPromise)==null||ne.resolve()}),beforeLoadPromise:Qi()}));const I=new AbortController;let H;$&&(H=setTimeout(()=>{try{h()}catch{}},F));const{paramsError:z,searchError:Q}=this.getMatch(A);z&&k(R,z,"PARSE_PARAMS"),Q&&k(R,Q,"VALIDATE_SEARCH");const D=()=>O?this.getMatch(O).context:this.options.context??{};u(A,Z=>({...Z,isFetching:"beforeLoad",fetchCount:Z.fetchCount+1,abortController:I,pendingTimeout:H,context:{...D(),...Z.__routeContext}}));const{search:U,params:K,context:j,cause:X}=this.getMatch(A),oe=p(A),V={search:U,abortController:I,params:K,preload:oe,context:j,location:n,navigate:Z=>this.navigate({...Z,_fromLocation:n}),buildLocation:this.buildLocation,cause:oe?"preload":X,matches:i};let G=await((S=(_=q.options).beforeLoad)==null?void 0:S.call(_,V))??{};this.serializeLoaderData&&(G=this.serializeLoaderData("__beforeLoadContext",G,{router:this,match:this.getMatch(A)})),(ei(G)||an(G))&&k(R,G,"BEFORE_LOAD"),u(A,Z=>({...Z,__beforeLoadContext:G,context:{...D(),...Z.__routeContext,...G},abortController:I}))}catch(I){k(R,I,"BEFORE_LOAD")}u(A,I=>{var H;return(H=I.beforeLoadPromise)==null||H.resolve(),{...I,beforeLoadPromise:void 0,isFetching:!1}})}}const E=i.slice(0,f),C=[];E.forEach(({id:R,routeId:A},T)=>{C.push((async()=>{const{loaderPromise:L}=this.getMatch(R);let O=!1,q=!1;if(L){await L;const F=this.getMatch(R);F.error&&v(F,F.error)}else{const F=C[T-1],$=this.looseRoutesById[A],W=()=>{const{params:X,loaderDeps:oe,abortController:V,context:G,cause:Z}=this.getMatch(R),ne=p(R);return{params:X,deps:oe,preload:!!ne,parentMatchPromise:F,abortController:V,context:G,location:n,navigate:re=>this.navigate({...re,_fromLocation:n}),cause:ne?"preload":Z,route:$}},I=Date.now()-this.getMatch(R).updatedAt,H=p(R),z=H?$.options.preloadStaleTime??this.options.defaultPreloadStaleTime??3e4:$.options.staleTime??this.options.defaultStaleTime??0,Q=$.options.shouldReload,D=typeof Q=="function"?Q(W()):Q;u(R,X=>({...X,loaderPromise:Qi(),preload:!!H&&!this.state.matches.find(oe=>oe.id===R)}));const U=async()=>{var X,oe,V,G,Z,ne,re,se;try{const de=async()=>{const fe=this.getMatch(R);fe.minPendingPromise&&await fe.minPendingPromise};try{this.loadRouteChunk($),u(R,Ce=>({...Ce,isFetching:"loader"}));let fe=await((oe=(X=$.options).loader)==null?void 0:oe.call(X,W()));this.serializeLoaderData&&(fe=this.serializeLoaderData("loaderData",fe,{router:this,match:this.getMatch(R)})),v(this.getMatch(R),fe),await $._lazyPromise,await de();const he=(G=(V=$.options).head)==null?void 0:G.call(V,{matches:i,match:this.getMatch(R),params:this.getMatch(R).params,loaderData:fe}),ge=he==null?void 0:he.meta,be=he==null?void 0:he.links,we=he==null?void 0:he.scripts,De=(ne=(Z=$.options).headers)==null?void 0:ne.call(Z,{loaderData:fe});u(R,Ce=>({...Ce,error:void 0,status:"success",isFetching:!1,updatedAt:Date.now(),loaderData:fe,meta:ge,links:be,scripts:we,headers:De}))}catch(fe){let he=fe;await de(),v(this.getMatch(R),fe);try{(se=(re=$.options).onError)==null||se.call(re,fe)}catch(ge){he=ge,v(this.getMatch(R),ge)}u(R,ge=>({...ge,error:he,status:"error",isFetching:!1}))}await $._componentsPromise}catch(de){u(R,fe=>({...fe,loaderPromise:void 0})),v(this.getMatch(R),de)}},{status:K,invalid:j}=this.getMatch(R);O=K==="success"&&(j||(D??I>z)),H&&$.options.preload===!1||(O&&!l?(q=!0,(async()=>{try{await U();const{loaderPromise:X,loadPromise:oe}=this.getMatch(R);X==null||X.resolve(),oe==null||oe.resolve(),u(R,V=>({...V,loaderPromise:void 0}))}catch(X){pd(X)&&await this.navigate(X)}})()):(K!=="success"||O&&l)&&await U())}if(!q){const{loaderPromise:F,loadPromise:$}=this.getMatch(R);F==null||F.resolve(),$==null||$.resolve()}return u(R,F=>({...F,isFetching:q?F.isFetching:!1,loaderPromise:q?F.loaderPromise:void 0,invalid:!1})),this.getMatch(R)})())}),await Promise.all(C),m()}catch(k){x(k)}})()}),await h()}catch(m){if(ei(m)||an(m))throw an(m)&&!o&&await h(),m}return i},this.invalidate=n=>{const i=o=>{var a;return((a=n==null?void 0:n.filter)==null?void 0:a.call(n,o))??!0?{...o,invalid:!0,...o.status==="error"?{status:"pending",error:void 0}:{}}:o};return this.__store.setState(o=>{var a;return{...o,matches:o.matches.map(i),cachedMatches:o.cachedMatches.map(i),pendingMatches:(a=o.pendingMatches)==null?void 0:a.map(i)}}),this.load({sync:n==null?void 0:n.sync})},this.resolveRedirect=n=>{const i=n;return i.href||(i.href=this.buildLocation(i).href),i},this.clearCache=n=>{const i=n==null?void 0:n.filter;i!==void 0?this.__store.setState(o=>({...o,cachedMatches:o.cachedMatches.filter(a=>!i(a))})):this.__store.setState(o=>({...o,cachedMatches:[]}))},this.clearExpiredCache=()=>{const n=i=>{const o=this.looseRoutesById[i.routeId];if(!o.options.loader)return!0;const a=(i.preload?o.options.preloadGcTime??this.options.defaultPreloadGcTime:o.options.gcTime??this.options.defaultGcTime)??5*60*1e3;return!(i.status!=="error"&&Date.now()-i.updatedAt<a)};this.clearCache({filter:n})},this.loadRouteChunk=n=>(n._lazyPromise===void 0&&(n.lazyFn?n._lazyPromise=n.lazyFn().then(i=>{const{id:o,...a}=i.options;Object.assign(n.options,a)}):n._lazyPromise=Promise.resolve()),n._componentsPromise===void 0&&(n._componentsPromise=n._lazyPromise.then(()=>Promise.all(TR.map(async i=>{const o=n.options[i];o!=null&&o.preload&&await o.preload()})))),n._componentsPromise),this.preloadRoute=async n=>{const i=this.buildLocation(n);let o=this.matchRoutes(i,{throwOnError:!0,preload:!0,dest:n});const a=new Set([...this.state.matches,...this.state.pendingMatches??[]].map(l=>l.id)),u=new Set([...a,...this.state.cachedMatches.map(l=>l.id)]);dd(()=>{o.forEach(l=>{u.has(l.id)||this.__store.setState(f=>({...f,cachedMatches:[...f.cachedMatches,l]}))})});try{return o=await this.loadMatches({matches:o,location:i,preload:!0,updateMatch:(l,f)=>{a.has(l)?o=o.map(d=>d.id===l?f(d):d):this.updateMatch(l,f)}}),o}catch(l){if(ei(l))return l.reloadDocument?void 0:await this.preloadRoute({...l,_fromLocation:i});console.error(l);return}},this.matchRoute=(n,i)=>{const o={...n,to:n.to?this.resolvePathWithBase(n.from||"",n.to):void 0,params:n.params||{},leaveParams:!0},a=this.buildLocation(o);if(i!=null&&i.pending&&this.state.status!=="pending")return!1;const l=((i==null?void 0:i.pending)===void 0?!this.state.isLoading:i.pending)?this.latestLocation:this.state.resolvedLocation,f=ku(this.basepath,l.pathname,{...i,to:a.pathname});return!f||n.params&&!ro(f,n.params,{partial:!0})?!1:f&&((i==null?void 0:i.includeSearch)??!0)?ro(l.search,a.search,{partial:!0})?f:!1:f},this.dehydrate=()=>{var n;const i=((n=this.options.errorSerializer)==null?void 0:n.serialize)??NI;return{state:{dehydratedMatches:this.state.matches.map(o=>({...Hu(o,["id","status","updatedAt"]),error:o.error?{data:i(o.error),__isServerError:!0}:void 0}))},manifest:this.manifest}},this.hydrate=()=>{var n,i,o;let a;typeof document<"u"&&(a=this.options.transformer.parse((n=window.__TSR__)==null?void 0:n.dehydrated)),jt(a),this.dehydratedData=a.payload,(o=(i=this.options).hydrate)==null||o.call(i,a.payload);const u=a.router.state,l=this.matchRoutes(this.state.location).map(f=>{const d=u.dehydratedMatches.find(h=>h.id===f.id);return jt(d,`Could not find a client-side match for dehydrated match with id: ${f.id}!`),{...f,...d}});this.__store.setState(f=>({...f,matches:l})),this.manifest=a.router.manifest},this.injectedHtml=[],this.injectHtml=n=>{const i=()=>(this.injectedHtml=this.injectedHtml.filter(o=>o!==i),n);this.injectedHtml.push(i)},this.injectScript=(n,i)=>{this.injectHtml(`<script class='tsr-once'>${n}; if (typeof __TSR__ !== 'undefined') __TSR__.cleanScripts()<\/script>`)},this.streamedKeys=new Set,this.getStreamedValue=n=>{var i;if(this.isServer)return;const o=(i=window.__TSR__)==null?void 0:i.streamedValues[n];if(o)return o.parsed||(o.parsed=this.options.transformer.parse(o.value)),o.parsed},this.streamValue=(n,i)=>{var o;this.streamedKeys.has(n),this.streamedKeys.add(n),this.injectScript(`__TSR__.streamedValues['${n}'] = { value: ${(o=this.serializer)==null?void 0:o.call(this,this.options.transformer.stringify(i))}}`)},this._handleNotFound=(n,i,{updateMatch:o=this.updateMatch}={})=>{const a=Object.fromEntries(n.map(f=>[f.routeId,f]));let u=(i.global?this.looseRoutesById[Dt]:this.looseRoutesById[i.routeId])||this.looseRoutesById[Dt];for(;!u.options.notFoundComponent&&!this.options.defaultNotFoundComponent&&u.id!==Dt;)u=u.parentRoute,jt(u);const l=a[u.id];jt(l,"Could not find match for route: "+u.id),o(l.id,f=>({...f,status:"notFound",error:i,isFetching:!1})),i.routerCode==="BEFORE_LOAD"&&u.parentRoute&&(i.routeId=u.parentRoute.id,this._handleNotFound(n,i,{updateMatch:o}))},this.hasNotFoundMatch=()=>this.__store.state.matches.some(n=>n.status==="notFound"||n.globalNotFound),this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...t,caseSensitive:t.caseSensitive??!1,notFoundMode:t.notFoundMode??"fuzzy",stringifySearch:t.stringifySearch??cI,parseSearch:t.parseSearch??lI,transformer:t.transformer??Es}),typeof document<"u"&&(window.__TSR__ROUTER__=this)}get state(){return this.__store.state}get looseRoutesById(){return this.routesById}matchRoutes(t,n,i){return typeof t=="string"?this.matchRoutesInternal({pathname:t,search:n},i):this.matchRoutesInternal(t,n)}matchRoutesInternal(t,n){const{foundRoute:i,matchedRoutes:o,routeParams:a}=this.getMatchedRoutes(t,n==null?void 0:n.dest);let u=!1;(i?i.path!=="/"&&a["**"]:ni(t.pathname))&&(this.options.notFoundRoute?o.push(this.options.notFoundRoute):u=!0);const l=(()=>{if(u){if(this.options.notFoundMode!=="root")for(let p=o.length-1;p>=0;p--){const v=o[p];if(v.children)return v.id}return Dt}})(),f=o.map(p=>{var v;let m;const x=((v=p.options.params)==null?void 0:v.parse)??p.options.parseParams;if(x)try{const w=x(a);Object.assign(a,w)}catch(w){if(m=new RI(w.message,{cause:w}),n!=null&&n.throwOnError)throw m;return m}}),d=[],h=p=>(p==null?void 0:p.id)?p.context??this.options.context??{}:this.options.context??{};return o.forEach((p,v)=>{var m,x,w,_;const S=d[v-1],[k,E]=(()=>{const W=(S==null?void 0:S.search)??t.search;try{const I=vd(p.options.validateSearch,W)??{};return[{...W,...I},void 0]}catch(I){const H=new sy(I.message,{cause:I});if(n!=null&&n.throwOnError)throw H;return[W,H]}})(),C=((x=(m=p.options).loaderDeps)==null?void 0:x.call(m,{search:k}))??"",R=C?JSON.stringify(C):"",A=Cu({path:p.fullPath,params:a,decodeCharMap:this.pathParamsDecodeCharMap}),T=Cu({path:p.id,params:a,leaveWildcards:!0,decodeCharMap:this.pathParamsDecodeCharMap})+R,L=this.getMatch(T),O=this.state.matches.find(W=>W.routeId===p.id),q=O?"stay":"enter";let F;if(L)F={...L,cause:q,params:O?Xt(O.params,a):a,search:Xt(O?O.search:L.search,k)};else{const W=p.options.loader||p.options.beforeLoad||p.lazyFn||EI(p)?"pending":"success";F={id:T,index:v,routeId:p.id,params:O?Xt(O.params,a):a,pathname:Wn([this.basepath,A]),updatedAt:Date.now(),search:O?Xt(O.search,k):k,searchError:void 0,status:W,isFetching:!1,error:void 0,paramsError:f[v],__routeContext:{},__beforeLoadContext:{},context:{},abortController:new AbortController,fetchCount:0,cause:q,loaderDeps:O?Xt(O.loaderDeps,C):C,invalid:!1,preload:!1,links:void 0,scripts:void 0,meta:void 0,staticData:p.options.staticData||{},loadPromise:Qi(),fullPath:p.fullPath}}F.status==="success"&&(F.headers=(_=(w=p.options).headers)==null?void 0:_.call(w,{loaderData:F.loaderData})),n!=null&&n.preload||(F.globalNotFound=l===p.id),F.searchError=E;const $=h(S);F.context={...$,...F.__routeContext,...F.__beforeLoadContext},d.push(F)}),d.forEach((p,v)=>{var m,x,w,_;const S=this.looseRoutesById[p.routeId];if(!this.getMatch(p.id)&&(n==null?void 0:n._buildLocation)!==!0){const C=d[v-1],R=h(C),A={deps:p.loaderDeps,params:p.params,context:R,location:t,navigate:T=>this.navigate({...T,_fromLocation:t}),buildLocation:this.buildLocation,cause:p.cause,abortController:p.abortController,preload:!!p.preload,matches:d};p.__routeContext=((x=(m=S.options).context)==null?void 0:x.call(m,A))??{},p.context={...R,...p.__routeContext,...p.__beforeLoadContext}}const E=(_=(w=S.options).head)==null?void 0:_.call(w,{matches:d,match:p,params:p.params,loaderData:p.loaderData??void 0});p.links=E==null?void 0:E.links,p.scripts=E==null?void 0:E.scripts,p.meta=E==null?void 0:E.meta}),d}}class sy extends Error{}class RI extends Error{}function PI(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:{...e},location:e,matches:[],pendingMatches:[],cachedMatches:[],statusCode:200}}function NI(e){return e instanceof Error?{name:e.name,message:e.message}:{data:e}}function S1(e){return!(typeof e=="object"&&e&&"data"in e)||!("__isServerError"in e&&e.__isServerError)||!(typeof e.data=="object"&&e.data)?!1:e.__isServerError===!0}function E1(e){if("name"in e&&"message"in e){const t=new Error(e.message);return t.name=e.name,t}return e.data}const Sl=P.createContext(void 0),TI=P.createContext(void 0);function ai(e){const t=P.useContext(e.from?TI:Sl);return mt({select:i=>{const o=i.matches.find(a=>e.from?e.from===a.routeId:a.id===t);if(jt(!((e.shouldThrow??!0)&&!o),`Could not find ${e.from?`an active match from "${e.from}"`:"a nearest match!"}`),o!==void 0)return e.select?e.select(o):o},structuralSharing:e.structuralSharing})}function MI(e){return ai({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function AI(e){const{select:t,...n}=e;return ai({...n,select:i=>t?t(i.loaderDeps):i.loaderDeps})}function II(e){return ai({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.params):t.params})}function LI(e){return ai({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function OI(e){const{navigate:t}=Zn();return P.useCallback(n=>t({...n}),[t])}let MR=class{constructor(t){this.init=n=>{var i,o;this.originalIndex=n.originalIndex;const a=this.options,u=!(a!=null&&a.path)&&!(a!=null&&a.id);this.parentRoute=(o=(i=this.options).getParentRoute)==null?void 0:o.call(i),u?this._path=Dt:jt(this.parentRoute);let l=u?Dt:a.path;l&&l!=="/"&&(l=Iy(l));const f=(a==null?void 0:a.id)||l;let d=u?Dt:Wn([this.parentRoute.id===Dt?"":this.parentRoute.id,f]);l===Dt&&(l="/"),d!==Dt&&(d=Wn(["/",d]));const h=d===Dt?"/":Wn([this.parentRoute.fullPath,l]);this._path=l,this._id=d,this._fullPath=h,this._to=h,this._ssr=(a==null?void 0:a.ssr)??n.defaultSsr??!0},this.updateLoader=n=>(Object.assign(this.options,n),this),this.update=n=>(Object.assign(this.options,n),this),this.lazy=n=>(this.lazyFn=n,this),this.useMatch=n=>ai({select:n==null?void 0:n.select,from:this.id,structuralSharing:n==null?void 0:n.structuralSharing}),this.useRouteContext=n=>ai({...n,from:this.id,select:i=>n!=null&&n.select?n.select(i.context):i.context}),this.useSearch=n=>LI({select:n==null?void 0:n.select,structuralSharing:n==null?void 0:n.structuralSharing,from:this.id}),this.useParams=n=>II({select:n==null?void 0:n.select,structuralSharing:n==null?void 0:n.structuralSharing,from:this.id}),this.useLoaderDeps=n=>AI({...n,from:this.id}),this.useLoaderData=n=>MI({...n,from:this.id}),this.useNavigate=()=>OI({from:this.id}),this.options=t||{},this.isRoot=!(t!=null&&t.getParentRoute),jt(!(t!=null&&t.id&&(t!=null&&t.path))),this.$$typeof=Symbol.for("react.memo")}get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}get ssr(){return this._ssr}addChildren(t){return this._addFileChildren(t)}_addFileChildren(t){return Array.isArray(t)&&(this.children=t),typeof t=="object"&&t!==null&&(this.children=Object.values(t)),this}};function DI(e){return new MR(e)}class jI extends MR{constructor(t){super(t)}addChildren(t){return super.addChildren(t),this}_addFileChildren(t){return super._addFileChildren(t),this}_addFileTypes(){return this}}function qI(e){return new jI(e)}function AR(e){return new FI(e,{silent:!0}).createRoute}class FI{constructor(t,n){this.path=t,this.createRoute=i=>{this.silent;const o=DI(i);return o.isRoot=!1,o},this.silent=n==null?void 0:n.silent}}function Uu(e){return M.jsx(M.Fragment,{children:e.children})}function IR(e,t,n){return t.options.notFoundComponent?M.jsx(t.options.notFoundComponent,{data:n}):e.options.defaultNotFoundComponent?M.jsx(e.options.defaultNotFoundComponent,{data:n}):M.jsx(SI,{})}const LR=P.memo(function({matchId:t}){var n,i;const o=Zn(),a=mt({select:_=>{var S;return(S=_.matches.find(k=>k.id===t))==null?void 0:S.routeId}});jt(a);const u=o.routesById[a],l=u.options.pendingComponent??o.options.defaultPendingComponent,f=l?M.jsx(l,{}):null,d=u.options.errorComponent??o.options.defaultErrorComponent,h=u.options.onCatch??o.options.defaultOnCatch,p=u.isRoot?u.options.notFoundComponent??((n=o.options.notFoundRoute)==null?void 0:n.options.component):u.options.notFoundComponent,v=(!u.isRoot||u.options.wrapInSuspense)&&(u.options.wrapInSuspense??l??((i=u.options.errorComponent)==null?void 0:i.preload))?P.Suspense:Uu,m=d?Ly:Uu,x=p?bI:Uu,w=mt({select:_=>_.loadedAt});return M.jsx(Sl.Provider,{value:t,children:M.jsx(v,{fallback:f,children:M.jsx(m,{getResetKey:()=>w,errorComponent:d||bl,onCatch:(_,S)=>{if(an(_))throw _;h==null||h(_,S)},children:M.jsx(x,{fallback:_=>{if(!p||_.routeId&&_.routeId!==a||!_.routeId&&!u.isRoot)throw _;return P.createElement(p,_)},children:M.jsx(zI,{matchId:t})})})})})}),zI=P.memo(function({matchId:t}){var n,i,o,a,u;const l=Zn(),{match:f,matchIndex:d,routeId:h}=mt({select:x=>{const w=x.matches.findIndex(k=>k.id===t),_=x.matches[w];return{routeId:_.routeId,matchIndex:w,match:Hu(_,["id","status","error"])}},structuralSharing:!0}),p=l.routesById[h],v=P.useMemo(()=>{const x=p.options.component??l.options.defaultComponent;return x?M.jsx(x,{}):M.jsx(OR,{})},[p.options.component,l.options.defaultComponent]),m=(p.options.errorComponent??l.options.defaultErrorComponent)||bl;if(f.status==="notFound"){let x;return S1(f.error)?x=(((n=l.options.errorSerializer)==null?void 0:n.deserialize)??E1)(f.error.data):x=f.error,jt(an(x)),IR(l,p,x)}if(f.status==="redirected")throw jt(ei(f.error)),(i=l.getMatch(f.id))==null?void 0:i.loadPromise;if(f.status==="error"){if(l.isServer)return M.jsx(m,{error:f.error,info:{componentStack:""}});throw S1(f.error)?(((o=l.options.errorSerializer)==null?void 0:o.deserialize)??E1)(f.error.data):f.error}if(f.status==="pending"){const x=p.options.pendingMinMs??l.options.defaultPendingMinMs;if(x&&!((a=l.getMatch(f.id))!=null&&a.minPendingPromise)&&!l.isServer){const w=Qi();Promise.resolve().then(()=>{l.updateMatch(f.id,_=>({..._,minPendingPromise:w}))}),setTimeout(()=>{w.resolve(),l.updateMatch(f.id,_=>({..._,minPendingPromise:void 0}))},x)}throw(u=l.getMatch(f.id))==null?void 0:u.loadPromise}return M.jsxs(M.Fragment,{children:[v,l.AfterEachMatch?M.jsx(l.AfterEachMatch,{match:f,matchIndex:d}):null]})}),OR=P.memo(function(){const t=Zn(),n=P.useContext(Sl),i=mt({select:d=>{var h;return(h=d.matches.find(p=>p.id===n))==null?void 0:h.routeId}}),o=t.routesById[i],a=mt({select:d=>{const p=d.matches.find(v=>v.id===n);return jt(p),p.globalNotFound}}),u=mt({select:d=>{var h;const p=d.matches,v=p.findIndex(m=>m.id===n);return(h=p[v+1])==null?void 0:h.id}});if(a)return IR(t,o,void 0);if(!u)return null;const l=M.jsx(LR,{matchId:u}),f=t.options.defaultPendingComponent?M.jsx(t.options.defaultPendingComponent,{}):null;return n===Dt?M.jsx(P.Suspense,{fallback:f,children:l}):l});var Ks=CR();const $I=xl(Ks),BI="Error preloading route! ☝️";function VI(e,t){const n=Zn(),[i,o]=P.useState(!1),a=P.useRef(!1),u=gI(t),{activeProps:l=()=>({className:"active"}),inactiveProps:f=()=>({}),activeOptions:d,to:h,preload:p,preloadDelay:v,hashScrollIntoView:m,replace:x,startTransition:w,resetScroll:_,viewTransition:S,children:k,target:E,disabled:C,style:R,className:A,onClick:T,onFocus:L,onMouseEnter:O,onMouseLeave:q,onTouchStart:F,ignoreBlocker:$,...W}=e,{params:I,search:H,hash:z,state:Q,mask:D,reloadDocument:U,...K}=W,j=P.useMemo(()=>{try{return new URL(`${h}`),"external"}catch{}return"internal"},[h]),X=mt({select:Pe=>Pe.location.search,structuralSharing:!0});e={from:ai({strict:!1,select:Pe=>Pe.pathname}),...e};const V=P.useMemo(()=>n.buildLocation(e),[n,e,X]),G=P.useMemo(()=>e.reloadDocument?!1:p??n.options.defaultPreload,[n.options.defaultPreload,p,e.reloadDocument]),Z=v??n.options.defaultPreloadDelay??0,ne=mt({select:Pe=>{if(d!=null&&d.exact){if(!mI(Pe.location.pathname,V.pathname,n.basepath))return!1}else{const Me=tl(Pe.location.pathname,n.basepath).split("/");if(!tl(V.pathname,n.basepath).split("/").every((Pt,pt)=>Pt===Me[pt]))return!1}return((d==null?void 0:d.includeSearch)??!0)&&!ro(Pe.location.search,V.search,{partial:!(d!=null&&d.exact),ignoreUndefined:!(d!=null&&d.explicitUndefined)})?!1:d!=null&&d.includeHash?Pe.location.hash===V.hash:!0}}),re=P.useCallback(()=>{n.preloadRoute(e).catch(Pe=>{console.warn(Pe),console.warn(BI)})},[e,n]),se=P.useCallback(Pe=>{Pe!=null&&Pe.isIntersecting&&re()},[re]);if(pI(u,se,{rootMargin:"100px"},{disabled:!!C||G!=="viewport"}),Ss(()=>{a.current||!C&&G==="render"&&(re(),a.current=!0)},[C,re,G]),j==="external")return{...K,ref:u,type:j,href:h,...k&&{children:k},...E&&{target:E},...C&&{disabled:C},...R&&{style:R},...A&&{className:A},...T&&{onClick:T},...L&&{onFocus:L},...O&&{onMouseEnter:O},...q&&{onMouseLeave:q},...F&&{onTouchStart:F}};const de=Pe=>{if(!C&&!UI(Pe)&&!Pe.defaultPrevented&&(!E||E==="_self")&&Pe.button===0){Pe.preventDefault(),Ks.flushSync(()=>{o(!0)});const Me=n.subscribe("onResolved",()=>{Me(),o(!1)});return n.navigate({...e,replace:x,resetScroll:_,hashScrollIntoView:m,startTransition:w,viewTransition:S,ignoreBlocker:$})}},fe=Pe=>{C||G&&re()},he=fe,ge=Pe=>{if(C)return;const Me=Pe.target||{};if(G){if(Me.preloadTimeout)return;Me.preloadTimeout=setTimeout(()=>{Me.preloadTimeout=null,re()},Z)}},be=Pe=>{if(C)return;const Me=Pe.target||{};Me.preloadTimeout&&(clearTimeout(Me.preloadTimeout),Me.preloadTimeout=null)},we=Pe=>Me=>{var Ye;(Ye=Me.persist)==null||Ye.call(Me),Pe.filter(Boolean).forEach(je=>{Me.defaultPrevented||je(Me)})},De=ne?Zi(l,{})??{}:{},Ce=ne?{}:Zi(f,{}),it=[A,De.className,Ce.className].filter(Boolean).join(" "),Ke={...R,...De.style,...Ce.style};return{...K,...De,...Ce,href:C?void 0:V.maskedLocation?n.history.createHref(V.maskedLocation.href):n.history.createHref(V.href),ref:u,onClick:we([T,de]),onFocus:we([L,fe]),onMouseEnter:we([O,ge]),onMouseLeave:we([q,be]),onTouchStart:we([F,he]),disabled:!!C,target:E,...Object.keys(Ke).length&&{style:Ke},...it&&{className:it},...C&&{role:"link","aria-disabled":!0},...ne&&{"data-status":"active","aria-current":"page"},...i&&{"data-transitioning":"transitioning"}}}const HI=P.forwardRef((e,t)=>{const{_asChild:n,...i}=e,{type:o,ref:a,...u}=VI(i,t),l=typeof i.children=="function"?i.children({isActive:u["data-status"]==="active"}):i.children;return typeof n>"u"&&delete u.disabled,P.createElement(n||"a",{...u,ref:a},l)});function UI(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function WI(){const e=Zn(),t=P.useRef({router:e,mounted:!1}),n=mt({select:({isLoading:p})=>p}),[i,o]=P.useState(!1),a=mt({select:p=>p.matches.some(v=>v.status==="pending"),structuralSharing:!0}),u=hd(n),l=n||i||a,f=hd(l),d=n||a,h=hd(d);return e.isServer||(e.startReactTransition=p=>{o(!0),P.startTransition(()=>{p(),o(!1)})}),P.useEffect(()=>{const p=e.history.subscribe(e.load),v=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return ni(e.latestLocation.href)!==ni(v.href)&&e.commitLocation({...v,replace:!0}),()=>{p()}},[e,e.history]),Ss(()=>{var p;if(typeof window<"u"&&((p=window.__TSR__)!=null&&p.dehydrated)||t.current.router===e&&t.current.mounted)return;t.current={router:e,mounted:!0},(async()=>{try{await e.load()}catch(m){console.error(m)}})()},[e]),Ss(()=>{if(u&&!n){const p=e.state.location,v=e.state.resolvedLocation,m=v.pathname!==p.pathname,x=v.href!==p.href;e.emit({type:"onLoad",fromLocation:v,toLocation:p,pathChanged:m,hrefChanged:x})}},[u,e,n]),Ss(()=>{if(h&&!d){const p=e.state.location,v=e.state.resolvedLocation,m=v.pathname!==p.pathname,x=v.href!==p.href;e.emit({type:"onBeforeRouteMount",fromLocation:v,toLocation:p,pathChanged:m,hrefChanged:x})}},[d,h,e]),Ss(()=>{if(f&&!l){const p=e.state.location,v=e.state.resolvedLocation,m=v.pathname!==p.pathname,x=v.href!==p.href;if(e.emit({type:"onResolved",fromLocation:v,toLocation:p,pathChanged:m,hrefChanged:x}),e.__store.setState(w=>({...w,status:"idle",resolvedLocation:w.location})),typeof document<"u"&&document.querySelector){const w=e.state.location.state.__hashScrollIntoViewOptions??!0;if(w&&e.state.location.hash!==""){const _=document.getElementById(e.state.location.hash);_&&_.scrollIntoView(w)}}}},[l,f,e]),null}function GI(){const e=Zn(),t=e.options.defaultPendingComponent?M.jsx(e.options.defaultPendingComponent,{}):null,n=e.isServer||typeof document<"u"&&window.__TSR__?Uu:P.Suspense,i=M.jsxs(n,{fallback:t,children:[M.jsx(WI,{}),M.jsx(KI,{})]});return e.options.InnerWrap?M.jsx(e.options.InnerWrap,{children:i}):i}function KI(){const e=mt({select:n=>{var i;return(i=n.matches[0])==null?void 0:i.id}}),t=mt({select:n=>n.loadedAt});return M.jsx(Sl.Provider,{value:e,children:M.jsx(Ly,{getResetKey:()=>t,errorComponent:bl,onCatch:n=>{n.message||n.toString()},children:e?M.jsx(LR,{matchId:e}):null})})}function YI(){const e=Zn();return mt({select:t=>[t.location.href,t.resolvedLocation.href,t.status],structuralSharing:!0}),P.useCallback(t=>{const{pending:n,caseSensitive:i,fuzzy:o,includeSearch:a,...u}=t;return e.matchRoute(u,{pending:n,caseSensitive:i,fuzzy:o,includeSearch:a})},[e])}function XI({router:e,children:t,...n}){e.update({...e.options,...n,context:{...e.options.context,...n.context}});const i=RR(),o=M.jsx(i.Provider,{value:e,children:t});return e.options.Wrap?M.jsx(e.options.Wrap,{children:o}):o}function QI({router:e,...t}){return M.jsx(XI,{router:e,...t,children:M.jsx(GI,{})})}const ZI=()=>{const[e,t]=P.useState(!0),[n,i]=P.useState([]);return P.useEffect(()=>{fetch("http://localhost:3000/workflows").then(o=>o.json()).then(i).finally(()=>t(!1))},[]),{workflows:n,isLoading:e}};function C1(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function DR(...e){return t=>{let n=!1;const i=e.map(o=>{const a=C1(o,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let o=0;o<i.length;o++){const a=i[o];typeof a=="function"?a():C1(e[o],null)}}}}function pn(...e){return P.useCallback(DR(...e),e)}var Jn=P.forwardRef((e,t)=>{const{children:n,...i}=e,o=P.Children.toArray(n),a=o.find(JI);if(a){const u=a.props.children,l=o.map(f=>f===a?P.Children.count(u)>1?P.Children.only(null):P.isValidElement(u)?u.props.children:null:f);return M.jsx(ay,{...i,ref:t,children:P.isValidElement(u)?P.cloneElement(u,void 0,l):null})}return M.jsx(ay,{...i,ref:t,children:n})});Jn.displayName="Slot";var ay=P.forwardRef((e,t)=>{const{children:n,...i}=e;if(P.isValidElement(n)){const o=tL(n);return P.cloneElement(n,{...eL(i,n.props),ref:t?DR(t,o):o})}return P.Children.count(n)>1?P.Children.only(null):null});ay.displayName="SlotClone";var jR=({children:e})=>M.jsx(M.Fragment,{children:e});function JI(e){return P.isValidElement(e)&&e.type===jR}function eL(e,t){const n={...t};for(const i in t){const o=e[i],a=t[i];/^on[A-Z]/.test(i)?o&&a?n[i]=(...l)=>{a(...l),o(...l)}:o&&(n[i]=o):i==="style"?n[i]={...o,...a}:i==="className"&&(n[i]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function tL(e){var i,o;let t=(i=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function qR(e){var t,n,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=qR(e[t]))&&(i&&(i+=" "),i+=n)}else for(n in e)e[n]&&(i&&(i+=" "),i+=n);return i}function Oy(){for(var e,t,n=0,i="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=qR(e))&&(i&&(i+=" "),i+=t);return i}const k1=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,R1=Oy,El=(e,t)=>n=>{var i;if((t==null?void 0:t.variants)==null)return R1(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:a}=t,u=Object.keys(o).map(d=>{const h=n==null?void 0:n[d],p=a==null?void 0:a[d];if(h===null)return null;const v=k1(h)||k1(p);return o[d][v]}),l=n&&Object.entries(n).reduce((d,h)=>{let[p,v]=h;return v===void 0||(d[p]=v),d},{}),f=t==null||(i=t.compoundVariants)===null||i===void 0?void 0:i.reduce((d,h)=>{let{class:p,className:v,...m}=h;return Object.entries(m).every(x=>{let[w,_]=x;return Array.isArray(_)?_.includes({...a,...l}[w]):{...a,...l}[w]===_})?[...d,p,v]:d},[]);return R1(e,u,f,n==null?void 0:n.class,n==null?void 0:n.className)};/**
|
|
57
|
-
* @license lucide-react v0.469.0 - ISC
|
|
58
|
-
*
|
|
59
|
-
* This source code is licensed under the ISC license.
|
|
60
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
61
|
-
*/const nL=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),FR=(...e)=>e.filter((t,n,i)=>!!t&&t.trim()!==""&&i.indexOf(t)===n).join(" ").trim();/**
|
|
62
|
-
* @license lucide-react v0.469.0 - ISC
|
|
63
|
-
*
|
|
64
|
-
* This source code is licensed under the ISC license.
|
|
65
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
66
|
-
*/var rL={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
67
|
-
* @license lucide-react v0.469.0 - ISC
|
|
68
|
-
*
|
|
69
|
-
* This source code is licensed under the ISC license.
|
|
70
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
71
|
-
*/const iL=P.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:i,className:o="",children:a,iconNode:u,...l},f)=>P.createElement("svg",{ref:f,...rL,width:t,height:t,stroke:e,strokeWidth:i?Number(n)*24/Number(t):n,className:FR("lucide",o),...l},[...u.map(([d,h])=>P.createElement(d,h)),...Array.isArray(a)?a:[a]]));/**
|
|
72
|
-
* @license lucide-react v0.469.0 - ISC
|
|
73
|
-
*
|
|
74
|
-
* This source code is licensed under the ISC license.
|
|
75
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
76
|
-
*/const jr=(e,t)=>{const n=P.forwardRef(({className:i,...o},a)=>P.createElement(iL,{ref:a,iconNode:t,className:FR(`lucide-${nL(e)}`,i),...o}));return n.displayName=`${e}`,n};/**
|
|
77
|
-
* @license lucide-react v0.469.0 - ISC
|
|
78
|
-
*
|
|
79
|
-
* This source code is licensed under the ISC license.
|
|
80
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
81
|
-
*/const oL=jr("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
|
|
82
|
-
* @license lucide-react v0.469.0 - ISC
|
|
83
|
-
*
|
|
84
|
-
* This source code is licensed under the ISC license.
|
|
85
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
86
|
-
*/const sL=jr("Eye",[["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"}]]);/**
|
|
87
|
-
* @license lucide-react v0.469.0 - ISC
|
|
88
|
-
*
|
|
89
|
-
* This source code is licensed under the ISC license.
|
|
90
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
91
|
-
*/const aL=jr("PanelLeft",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]]);/**
|
|
92
|
-
* @license lucide-react v0.469.0 - ISC
|
|
93
|
-
*
|
|
94
|
-
* This source code is licensed under the ISC license.
|
|
95
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
96
|
-
*/const uL=jr("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);/**
|
|
97
|
-
* @license lucide-react v0.469.0 - ISC
|
|
98
|
-
*
|
|
99
|
-
* This source code is licensed under the ISC license.
|
|
100
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
101
|
-
*/const lL=jr("Speech",[["path",{d:"M8.8 20v-4.1l1.9.2a2.3 2.3 0 0 0 2.164-2.1V8.3A5.37 5.37 0 0 0 2 8.25c0 2.8.656 3.054 1 4.55a5.77 5.77 0 0 1 .029 2.758L2 20",key:"11atix"}],["path",{d:"M19.8 17.8a7.5 7.5 0 0 0 .003-10.603",key:"yol142"}],["path",{d:"M17 15a3.5 3.5 0 0 0-.025-4.975",key:"ssbmkc"}]]);/**
|
|
102
|
-
* @license lucide-react v0.469.0 - ISC
|
|
103
|
-
*
|
|
104
|
-
* This source code is licensed under the ISC license.
|
|
105
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
106
|
-
*/const cL=jr("Webhook",[["path",{d:"M18 16.98h-5.99c-1.1 0-1.95.94-2.48 1.9A4 4 0 0 1 2 17c.01-.7.2-1.4.57-2",key:"q3hayz"}],["path",{d:"m6 17 3.13-5.78c.53-.97.1-2.18-.5-3.1a4 4 0 1 1 6.89-4.06",key:"1go1hn"}],["path",{d:"m12 6 3.13 5.73C15.66 12.7 16.9 13 18 13a4 4 0 0 1 0 8",key:"qlwsc0"}]]);/**
|
|
107
|
-
* @license lucide-react v0.469.0 - ISC
|
|
108
|
-
*
|
|
109
|
-
* This source code is licensed under the ISC license.
|
|
110
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
111
|
-
*/const fL=jr("Workflow",[["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"}]]);/**
|
|
112
|
-
* @license lucide-react v0.469.0 - ISC
|
|
113
|
-
*
|
|
114
|
-
* This source code is licensed under the ISC license.
|
|
115
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
116
|
-
*/const dL=jr("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),md=768;function hL(){const[e,t]=P.useState(void 0);return P.useEffect(()=>{const n=window.matchMedia(`(max-width: ${md-1}px)`),i=()=>{t(window.innerWidth<md)};return n.addEventListener("change",i),t(window.innerWidth<md),()=>n.removeEventListener("change",i)},[]),!!e}const Dy="-",pL=e=>{const t=vL(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:i}=e;return{getClassGroupId:u=>{const l=u.split(Dy);return l[0]===""&&l.length!==1&&l.shift(),zR(l,t)||gL(u)},getConflictingClassGroupIds:(u,l)=>{const f=n[u]||[];return l&&i[u]?[...f,...i[u]]:f}}},zR=(e,t)=>{var u;if(e.length===0)return t.classGroupId;const n=e[0],i=t.nextPart.get(n),o=i?zR(e.slice(1),i):void 0;if(o)return o;if(t.validators.length===0)return;const a=e.join(Dy);return(u=t.validators.find(({validator:l})=>l(a)))==null?void 0:u.classGroupId},P1=/^\[(.+)\]$/,gL=e=>{if(P1.test(e)){const t=P1.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},vL=e=>{const{theme:t,prefix:n}=e,i={nextPart:new Map,validators:[]};return yL(Object.entries(e.classGroups),n).forEach(([a,u])=>{uy(u,i,a,t)}),i},uy=(e,t,n,i)=>{e.forEach(o=>{if(typeof o=="string"){const a=o===""?t:N1(t,o);a.classGroupId=n;return}if(typeof o=="function"){if(mL(o)){uy(o(i),t,n,i);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([a,u])=>{uy(u,N1(t,a),n,i)})})},N1=(e,t)=>{let n=e;return t.split(Dy).forEach(i=>{n.nextPart.has(i)||n.nextPart.set(i,{nextPart:new Map,validators:[]}),n=n.nextPart.get(i)}),n},mL=e=>e.isThemeGetter,yL=(e,t)=>t?e.map(([n,i])=>{const o=i.map(a=>typeof a=="string"?t+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([u,l])=>[t+u,l])):a);return[n,o]}):e,wL=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,i=new Map;const o=(a,u)=>{n.set(a,u),t++,t>e&&(t=0,i=n,n=new Map)};return{get(a){let u=n.get(a);if(u!==void 0)return u;if((u=i.get(a))!==void 0)return o(a,u),u},set(a,u){n.has(a)?n.set(a,u):o(a,u)}}},$R="!",xL=e=>{const{separator:t,experimentalParseClassName:n}=e,i=t.length===1,o=t[0],a=t.length,u=l=>{const f=[];let d=0,h=0,p;for(let _=0;_<l.length;_++){let S=l[_];if(d===0){if(S===o&&(i||l.slice(_,_+a)===t)){f.push(l.slice(h,_)),h=_+a;continue}if(S==="/"){p=_;continue}}S==="["?d++:S==="]"&&d--}const v=f.length===0?l:l.substring(h),m=v.startsWith($R),x=m?v.substring(1):v,w=p&&p>h?p-h:void 0;return{modifiers:f,hasImportantModifier:m,baseClassName:x,maybePostfixModifierPosition:w}};return n?l=>n({className:l,parseClassName:u}):u},_L=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(i=>{i[0]==="["?(t.push(...n.sort(),i),n=[]):n.push(i)}),t.push(...n.sort()),t},bL=e=>({cache:wL(e.cacheSize),parseClassName:xL(e),...pL(e)}),SL=/\s+/,EL=(e,t)=>{const{parseClassName:n,getClassGroupId:i,getConflictingClassGroupIds:o}=t,a=[],u=e.trim().split(SL);let l="";for(let f=u.length-1;f>=0;f-=1){const d=u[f],{modifiers:h,hasImportantModifier:p,baseClassName:v,maybePostfixModifierPosition:m}=n(d);let x=!!m,w=i(x?v.substring(0,m):v);if(!w){if(!x){l=d+(l.length>0?" "+l:l);continue}if(w=i(v),!w){l=d+(l.length>0?" "+l:l);continue}x=!1}const _=_L(h).join(":"),S=p?_+$R:_,k=S+w;if(a.includes(k))continue;a.push(k);const E=o(w,x);for(let C=0;C<E.length;++C){const R=E[C];a.push(S+R)}l=d+(l.length>0?" "+l:l)}return l};function CL(){let e=0,t,n,i="";for(;e<arguments.length;)(t=arguments[e++])&&(n=BR(t))&&(i&&(i+=" "),i+=n);return i}const BR=e=>{if(typeof e=="string")return e;let t,n="";for(let i=0;i<e.length;i++)e[i]&&(t=BR(e[i]))&&(n&&(n+=" "),n+=t);return n};function kL(e,...t){let n,i,o,a=u;function u(f){const d=t.reduce((h,p)=>p(h),e());return n=bL(d),i=n.cache.get,o=n.cache.set,a=l,l(f)}function l(f){const d=i(f);if(d)return d;const h=EL(f,n);return o(f,h),h}return function(){return a(CL.apply(null,arguments))}}const $e=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},VR=/^\[(?:([a-z-]+):)?(.+)\]$/i,RL=/^\d+\/\d+$/,PL=new Set(["px","full","screen"]),NL=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,TL=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,ML=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,AL=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,IL=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Vn=e=>io(e)||PL.has(e)||RL.test(e),Cr=e=>wo(e,"length",$L),io=e=>!!e&&!Number.isNaN(Number(e)),yd=e=>wo(e,"number",io),ys=e=>!!e&&Number.isInteger(Number(e)),LL=e=>e.endsWith("%")&&io(e.slice(0,-1)),Re=e=>VR.test(e),kr=e=>NL.test(e),OL=new Set(["length","size","percentage"]),DL=e=>wo(e,OL,HR),jL=e=>wo(e,"position",HR),qL=new Set(["image","url"]),FL=e=>wo(e,qL,VL),zL=e=>wo(e,"",BL),ws=()=>!0,wo=(e,t,n)=>{const i=VR.exec(e);return i?i[1]?typeof t=="string"?i[1]===t:t.has(i[1]):n(i[2]):!1},$L=e=>TL.test(e)&&!ML.test(e),HR=()=>!1,BL=e=>AL.test(e),VL=e=>IL.test(e),HL=()=>{const e=$e("colors"),t=$e("spacing"),n=$e("blur"),i=$e("brightness"),o=$e("borderColor"),a=$e("borderRadius"),u=$e("borderSpacing"),l=$e("borderWidth"),f=$e("contrast"),d=$e("grayscale"),h=$e("hueRotate"),p=$e("invert"),v=$e("gap"),m=$e("gradientColorStops"),x=$e("gradientColorStopPositions"),w=$e("inset"),_=$e("margin"),S=$e("opacity"),k=$e("padding"),E=$e("saturate"),C=$e("scale"),R=$e("sepia"),A=$e("skew"),T=$e("space"),L=$e("translate"),O=()=>["auto","contain","none"],q=()=>["auto","hidden","clip","visible","scroll"],F=()=>["auto",Re,t],$=()=>[Re,t],W=()=>["",Vn,Cr],I=()=>["auto",io,Re],H=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],z=()=>["solid","dashed","dotted","double","none"],Q=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],D=()=>["start","end","center","between","around","evenly","stretch"],U=()=>["","0",Re],K=()=>["auto","avoid","all","avoid-page","page","left","right","column"],j=()=>[io,Re];return{cacheSize:500,separator:":",theme:{colors:[ws],spacing:[Vn,Cr],blur:["none","",kr,Re],brightness:j(),borderColor:[e],borderRadius:["none","","full",kr,Re],borderSpacing:$(),borderWidth:W(),contrast:j(),grayscale:U(),hueRotate:j(),invert:U(),gap:$(),gradientColorStops:[e],gradientColorStopPositions:[LL,Cr],inset:F(),margin:F(),opacity:j(),padding:$(),saturate:j(),scale:j(),sepia:U(),skew:j(),space:$(),translate:$()},classGroups:{aspect:[{aspect:["auto","square","video",Re]}],container:["container"],columns:[{columns:[kr]}],"break-after":[{"break-after":K()}],"break-before":[{"break-before":K()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...H(),Re]}],overflow:[{overflow:q()}],"overflow-x":[{"overflow-x":q()}],"overflow-y":[{"overflow-y":q()}],overscroll:[{overscroll:O()}],"overscroll-x":[{"overscroll-x":O()}],"overscroll-y":[{"overscroll-y":O()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[w]}],"inset-x":[{"inset-x":[w]}],"inset-y":[{"inset-y":[w]}],start:[{start:[w]}],end:[{end:[w]}],top:[{top:[w]}],right:[{right:[w]}],bottom:[{bottom:[w]}],left:[{left:[w]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",ys,Re]}],basis:[{basis:F()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Re]}],grow:[{grow:U()}],shrink:[{shrink:U()}],order:[{order:["first","last","none",ys,Re]}],"grid-cols":[{"grid-cols":[ws]}],"col-start-end":[{col:["auto",{span:["full",ys,Re]},Re]}],"col-start":[{"col-start":I()}],"col-end":[{"col-end":I()}],"grid-rows":[{"grid-rows":[ws]}],"row-start-end":[{row:["auto",{span:[ys,Re]},Re]}],"row-start":[{"row-start":I()}],"row-end":[{"row-end":I()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Re]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Re]}],gap:[{gap:[v]}],"gap-x":[{"gap-x":[v]}],"gap-y":[{"gap-y":[v]}],"justify-content":[{justify:["normal",...D()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...D(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...D(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[k]}],px:[{px:[k]}],py:[{py:[k]}],ps:[{ps:[k]}],pe:[{pe:[k]}],pt:[{pt:[k]}],pr:[{pr:[k]}],pb:[{pb:[k]}],pl:[{pl:[k]}],m:[{m:[_]}],mx:[{mx:[_]}],my:[{my:[_]}],ms:[{ms:[_]}],me:[{me:[_]}],mt:[{mt:[_]}],mr:[{mr:[_]}],mb:[{mb:[_]}],ml:[{ml:[_]}],"space-x":[{"space-x":[T]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[T]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Re,t]}],"min-w":[{"min-w":[Re,t,"min","max","fit"]}],"max-w":[{"max-w":[Re,t,"none","full","min","max","fit","prose",{screen:[kr]},kr]}],h:[{h:[Re,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Re,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Re,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Re,t,"auto","min","max","fit"]}],"font-size":[{text:["base",kr,Cr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",yd]}],"font-family":[{font:[ws]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Re]}],"line-clamp":[{"line-clamp":["none",io,yd]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Vn,Re]}],"list-image":[{"list-image":["none",Re]}],"list-style-type":[{list:["none","disc","decimal",Re]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[S]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[S]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...z(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Vn,Cr]}],"underline-offset":[{"underline-offset":["auto",Vn,Re]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:$()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Re]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Re]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[S]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...H(),jL]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",DL]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},FL]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[x]}],"gradient-via-pos":[{via:[x]}],"gradient-to-pos":[{to:[x]}],"gradient-from":[{from:[m]}],"gradient-via":[{via:[m]}],"gradient-to":[{to:[m]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[l]}],"border-w-x":[{"border-x":[l]}],"border-w-y":[{"border-y":[l]}],"border-w-s":[{"border-s":[l]}],"border-w-e":[{"border-e":[l]}],"border-w-t":[{"border-t":[l]}],"border-w-r":[{"border-r":[l]}],"border-w-b":[{"border-b":[l]}],"border-w-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[S]}],"border-style":[{border:[...z(),"hidden"]}],"divide-x":[{"divide-x":[l]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[l]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[S]}],"divide-style":[{divide:z()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...z()]}],"outline-offset":[{"outline-offset":[Vn,Re]}],"outline-w":[{outline:[Vn,Cr]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:W()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[S]}],"ring-offset-w":[{"ring-offset":[Vn,Cr]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",kr,zL]}],"shadow-color":[{shadow:[ws]}],opacity:[{opacity:[S]}],"mix-blend":[{"mix-blend":[...Q(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Q()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[i]}],contrast:[{contrast:[f]}],"drop-shadow":[{"drop-shadow":["","none",kr,Re]}],grayscale:[{grayscale:[d]}],"hue-rotate":[{"hue-rotate":[h]}],invert:[{invert:[p]}],saturate:[{saturate:[E]}],sepia:[{sepia:[R]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[i]}],"backdrop-contrast":[{"backdrop-contrast":[f]}],"backdrop-grayscale":[{"backdrop-grayscale":[d]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[h]}],"backdrop-invert":[{"backdrop-invert":[p]}],"backdrop-opacity":[{"backdrop-opacity":[S]}],"backdrop-saturate":[{"backdrop-saturate":[E]}],"backdrop-sepia":[{"backdrop-sepia":[R]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[u]}],"border-spacing-x":[{"border-spacing-x":[u]}],"border-spacing-y":[{"border-spacing-y":[u]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Re]}],duration:[{duration:j()}],ease:[{ease:["linear","in","out","in-out",Re]}],delay:[{delay:j()}],animate:[{animate:["none","spin","ping","pulse","bounce",Re]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[C]}],"scale-x":[{"scale-x":[C]}],"scale-y":[{"scale-y":[C]}],rotate:[{rotate:[ys,Re]}],"translate-x":[{"translate-x":[L]}],"translate-y":[{"translate-y":[L]}],"skew-x":[{"skew-x":[A]}],"skew-y":[{"skew-y":[A]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Re]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Re]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":$()}],"scroll-mx":[{"scroll-mx":$()}],"scroll-my":[{"scroll-my":$()}],"scroll-ms":[{"scroll-ms":$()}],"scroll-me":[{"scroll-me":$()}],"scroll-mt":[{"scroll-mt":$()}],"scroll-mr":[{"scroll-mr":$()}],"scroll-mb":[{"scroll-mb":$()}],"scroll-ml":[{"scroll-ml":$()}],"scroll-p":[{"scroll-p":$()}],"scroll-px":[{"scroll-px":$()}],"scroll-py":[{"scroll-py":$()}],"scroll-ps":[{"scroll-ps":$()}],"scroll-pe":[{"scroll-pe":$()}],"scroll-pt":[{"scroll-pt":$()}],"scroll-pr":[{"scroll-pr":$()}],"scroll-pb":[{"scroll-pb":$()}],"scroll-pl":[{"scroll-pl":$()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Re]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Vn,Cr,yd]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},UL=kL(HL);function Ae(...e){return UL(Oy(e))}const WL=El("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),UR=P.forwardRef(({className:e,variant:t,size:n,asChild:i=!1,...o},a)=>{const u=i?Jn:"button";return M.jsx(u,{className:Ae(WL({variant:t,size:n,className:e})),ref:a,...o})});UR.displayName="Button";const WR=P.forwardRef(({className:e,type:t,...n},i)=>M.jsx("input",{type:t,className:Ae("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:i,...n}));WR.displayName="Input";var GL=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],yt=GL.reduce((e,t)=>{const n=P.forwardRef((i,o)=>{const{asChild:a,...u}=i,l=a?Jn:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),M.jsx(l,{...u,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function KL(e,t){e&&Ks.flushSync(()=>e.dispatchEvent(t))}var YL="Separator",T1="horizontal",XL=["horizontal","vertical"],GR=P.forwardRef((e,t)=>{const{decorative:n,orientation:i=T1,...o}=e,a=QL(i)?i:T1,l=n?{role:"none"}:{"aria-orientation":a==="vertical"?a:void 0,role:"separator"};return M.jsx(yt.div,{"data-orientation":a,...l,...o,ref:t})});GR.displayName=YL;function QL(e){return XL.includes(e)}var KR=GR;const YR=P.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...i},o)=>M.jsx(KR,{ref:o,decorative:n,orientation:t,className:Ae("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...i}));YR.displayName=KR.displayName;function Ct(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function ZL(e,t){const n=P.createContext(t),i=a=>{const{children:u,...l}=a,f=P.useMemo(()=>l,Object.values(l));return M.jsx(n.Provider,{value:f,children:u})};i.displayName=e+"Provider";function o(a){const u=P.useContext(n);if(u)return u;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[i,o]}function jy(e,t=[]){let n=[];function i(a,u){const l=P.createContext(u),f=n.length;n=[...n,u];const d=p=>{var S;const{scope:v,children:m,...x}=p,w=((S=v==null?void 0:v[e])==null?void 0:S[f])||l,_=P.useMemo(()=>x,Object.values(x));return M.jsx(w.Provider,{value:_,children:m})};d.displayName=a+"Provider";function h(p,v){var w;const m=((w=v==null?void 0:v[e])==null?void 0:w[f])||l,x=P.useContext(m);if(x)return x;if(u!==void 0)return u;throw new Error(`\`${p}\` must be used within \`${a}\``)}return[d,h]}const o=()=>{const a=n.map(u=>P.createContext(u));return function(l){const f=(l==null?void 0:l[e])||a;return P.useMemo(()=>({[`__scope${e}`]:{...l,[e]:f}}),[l,f])}};return o.scopeName=e,[i,JL(o,...t)]}function JL(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const i=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(a){const u=i.reduce((l,{useScope:f,scopeName:d})=>{const p=f(a)[`__scope${d}`];return{...l,...p}},{});return P.useMemo(()=>({[`__scope${t.scopeName}`]:u}),[u])}};return n.scopeName=t.scopeName,n}var ui=globalThis!=null&&globalThis.document?P.useLayoutEffect:()=>{},eO=BA.useId||(()=>{}),tO=0;function Wu(e){const[t,n]=P.useState(eO());return ui(()=>{e||n(i=>i??String(tO++))},[e]),e||(t?`radix-${t}`:"")}function Ir(e){const t=P.useRef(e);return P.useEffect(()=>{t.current=e}),P.useMemo(()=>(...n)=>{var i;return(i=t.current)==null?void 0:i.call(t,...n)},[])}function XR({prop:e,defaultProp:t,onChange:n=()=>{}}){const[i,o]=nO({defaultProp:t,onChange:n}),a=e!==void 0,u=a?e:i,l=Ir(n),f=P.useCallback(d=>{if(a){const p=typeof d=="function"?d(e):d;p!==e&&l(p)}else o(d)},[a,e,o,l]);return[u,f]}function nO({defaultProp:e,onChange:t}){const n=P.useState(e),[i]=n,o=P.useRef(i),a=Ir(t);return P.useEffect(()=>{o.current!==i&&(a(i),o.current=i)},[i,o,a]),n}function rO(e,t=globalThis==null?void 0:globalThis.document){const n=Ir(e);P.useEffect(()=>{const i=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",i,{capture:!0}),()=>t.removeEventListener("keydown",i,{capture:!0})},[n,t])}var iO="DismissableLayer",ly="dismissableLayer.update",oO="dismissableLayer.pointerDownOutside",sO="dismissableLayer.focusOutside",M1,QR=P.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),qy=P.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:u,onDismiss:l,...f}=e,d=P.useContext(QR),[h,p]=P.useState(null),v=(h==null?void 0:h.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=P.useState({}),x=pn(t,T=>p(T)),w=Array.from(d.layers),[_]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),S=w.indexOf(_),k=h?w.indexOf(h):-1,E=d.layersWithOutsidePointerEventsDisabled.size>0,C=k>=S,R=lO(T=>{const L=T.target,O=[...d.branches].some(q=>q.contains(L));!C||O||(o==null||o(T),u==null||u(T),T.defaultPrevented||l==null||l())},v),A=cO(T=>{const L=T.target;[...d.branches].some(q=>q.contains(L))||(a==null||a(T),u==null||u(T),T.defaultPrevented||l==null||l())},v);return rO(T=>{k===d.layers.size-1&&(i==null||i(T),!T.defaultPrevented&&l&&(T.preventDefault(),l()))},v),P.useEffect(()=>{if(h)return n&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(M1=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(h)),d.layers.add(h),A1(),()=>{n&&d.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=M1)}},[h,v,n,d]),P.useEffect(()=>()=>{h&&(d.layers.delete(h),d.layersWithOutsidePointerEventsDisabled.delete(h),A1())},[h,d]),P.useEffect(()=>{const T=()=>m({});return document.addEventListener(ly,T),()=>document.removeEventListener(ly,T)},[]),M.jsx(yt.div,{...f,ref:x,style:{pointerEvents:E?C?"auto":"none":void 0,...e.style},onFocusCapture:Ct(e.onFocusCapture,A.onFocusCapture),onBlurCapture:Ct(e.onBlurCapture,A.onBlurCapture),onPointerDownCapture:Ct(e.onPointerDownCapture,R.onPointerDownCapture)})});qy.displayName=iO;var aO="DismissableLayerBranch",uO=P.forwardRef((e,t)=>{const n=P.useContext(QR),i=P.useRef(null),o=pn(t,i);return P.useEffect(()=>{const a=i.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),M.jsx(yt.div,{...e,ref:o})});uO.displayName=aO;function lO(e,t=globalThis==null?void 0:globalThis.document){const n=Ir(e),i=P.useRef(!1),o=P.useRef(()=>{});return P.useEffect(()=>{const a=l=>{if(l.target&&!i.current){let f=function(){ZR(oO,n,d,{discrete:!0})};const d={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=f,t.addEventListener("click",o.current,{once:!0})):f()}else t.removeEventListener("click",o.current);i.current=!1},u=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(u),t.removeEventListener("pointerdown",a),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>i.current=!0}}function cO(e,t=globalThis==null?void 0:globalThis.document){const n=Ir(e),i=P.useRef(!1);return P.useEffect(()=>{const o=a=>{a.target&&!i.current&&ZR(sO,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>i.current=!0,onBlurCapture:()=>i.current=!1}}function A1(){const e=new CustomEvent(ly);document.dispatchEvent(e)}function ZR(e,t,n,{discrete:i}){const o=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),i?KL(o,a):o.dispatchEvent(a)}var wd="focusScope.autoFocusOnMount",xd="focusScope.autoFocusOnUnmount",I1={bubbles:!1,cancelable:!0},fO="FocusScope",JR=P.forwardRef((e,t)=>{const{loop:n=!1,trapped:i=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...u}=e,[l,f]=P.useState(null),d=Ir(o),h=Ir(a),p=P.useRef(null),v=pn(t,w=>f(w)),m=P.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;P.useEffect(()=>{if(i){let w=function(E){if(m.paused||!l)return;const C=E.target;l.contains(C)?p.current=C:Nr(p.current,{select:!0})},_=function(E){if(m.paused||!l)return;const C=E.relatedTarget;C!==null&&(l.contains(C)||Nr(p.current,{select:!0}))},S=function(E){if(document.activeElement===document.body)for(const R of E)R.removedNodes.length>0&&Nr(l)};document.addEventListener("focusin",w),document.addEventListener("focusout",_);const k=new MutationObserver(S);return l&&k.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",w),document.removeEventListener("focusout",_),k.disconnect()}}},[i,l,m.paused]),P.useEffect(()=>{if(l){O1.add(m);const w=document.activeElement;if(!l.contains(w)){const S=new CustomEvent(wd,I1);l.addEventListener(wd,d),l.dispatchEvent(S),S.defaultPrevented||(dO(mO(eP(l)),{select:!0}),document.activeElement===w&&Nr(l))}return()=>{l.removeEventListener(wd,d),setTimeout(()=>{const S=new CustomEvent(xd,I1);l.addEventListener(xd,h),l.dispatchEvent(S),S.defaultPrevented||Nr(w??document.body,{select:!0}),l.removeEventListener(xd,h),O1.remove(m)},0)}}},[l,d,h,m]);const x=P.useCallback(w=>{if(!n&&!i||m.paused)return;const _=w.key==="Tab"&&!w.altKey&&!w.ctrlKey&&!w.metaKey,S=document.activeElement;if(_&&S){const k=w.currentTarget,[E,C]=hO(k);E&&C?!w.shiftKey&&S===C?(w.preventDefault(),n&&Nr(E,{select:!0})):w.shiftKey&&S===E&&(w.preventDefault(),n&&Nr(C,{select:!0})):S===k&&w.preventDefault()}},[n,i,m.paused]);return M.jsx(yt.div,{tabIndex:-1,...u,ref:v,onKeyDown:x})});JR.displayName=fO;function dO(e,{select:t=!1}={}){const n=document.activeElement;for(const i of e)if(Nr(i,{select:t}),document.activeElement!==n)return}function hO(e){const t=eP(e),n=L1(t,e),i=L1(t.reverse(),e);return[n,i]}function eP(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:i=>{const o=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||o?NodeFilter.FILTER_SKIP:i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function L1(e,t){for(const n of e)if(!pO(n,{upTo:t}))return n}function pO(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function gO(e){return e instanceof HTMLInputElement&&"select"in e}function Nr(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&gO(e)&&t&&e.select()}}var O1=vO();function vO(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=D1(e,t),e.unshift(t)},remove(t){var n;e=D1(e,t),(n=e[0])==null||n.resume()}}}function D1(e,t){const n=[...e],i=n.indexOf(t);return i!==-1&&n.splice(i,1),n}function mO(e){return e.filter(t=>t.tagName!=="A")}var yO="Portal",Fy=P.forwardRef((e,t)=>{var l;const{container:n,...i}=e,[o,a]=P.useState(!1);ui(()=>a(!0),[]);const u=n||o&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return u?$I.createPortal(M.jsx(yt.div,{...i,ref:t}),u):null});Fy.displayName=yO;function wO(e,t){return P.useReducer((n,i)=>t[n][i]??n,e)}var xo=e=>{const{present:t,children:n}=e,i=xO(t),o=typeof n=="function"?n({present:i.isPresent}):P.Children.only(n),a=pn(i.ref,_O(o));return typeof n=="function"||i.isPresent?P.cloneElement(o,{ref:a}):null};xo.displayName="Presence";function xO(e){const[t,n]=P.useState(),i=P.useRef({}),o=P.useRef(e),a=P.useRef("none"),u=e?"mounted":"unmounted",[l,f]=wO(u,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return P.useEffect(()=>{const d=Pu(i.current);a.current=l==="mounted"?d:"none"},[l]),ui(()=>{const d=i.current,h=o.current;if(h!==e){const v=a.current,m=Pu(d);e?f("MOUNT"):m==="none"||(d==null?void 0:d.display)==="none"?f("UNMOUNT"):f(h&&v!==m?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,f]),ui(()=>{if(t){let d;const h=t.ownerDocument.defaultView??window,p=m=>{const w=Pu(i.current).includes(m.animationName);if(m.target===t&&w&&(f("ANIMATION_END"),!o.current)){const _=t.style.animationFillMode;t.style.animationFillMode="forwards",d=h.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=_)})}},v=m=>{m.target===t&&(a.current=Pu(i.current))};return t.addEventListener("animationstart",v),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{h.clearTimeout(d),t.removeEventListener("animationstart",v),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else f("ANIMATION_END")},[t,f]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:P.useCallback(d=>{d&&(i.current=getComputedStyle(d)),n(d)},[])}}function Pu(e){return(e==null?void 0:e.animationName)||"none"}function _O(e){var i,o;let t=(i=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var _d=0;function bO(){P.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??j1()),document.body.insertAdjacentElement("beforeend",e[1]??j1()),_d++,()=>{_d===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),_d--}},[])}function j1(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Cn=function(){return Cn=Object.assign||function(t){for(var n,i=1,o=arguments.length;i<o;i++){n=arguments[i];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},Cn.apply(this,arguments)};function tP(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(e);o<i.length;o++)t.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(n[i[o]]=e[i[o]]);return n}function SO(e,t,n){if(n||arguments.length===2)for(var i=0,o=t.length,a;i<o;i++)(a||!(i in t))&&(a||(a=Array.prototype.slice.call(t,0,i)),a[i]=t[i]);return e.concat(a||Array.prototype.slice.call(t))}var Gu="right-scroll-bar-position",Ku="width-before-scroll-bar",EO="with-scroll-bars-hidden",CO="--removed-body-scroll-bar-size";function bd(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function kO(e,t){var n=P.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(i){var o=n.value;o!==i&&(n.value=i,n.callback(i,o))}}}})[0];return n.callback=t,n.facade}var RO=typeof window<"u"?P.useLayoutEffect:P.useEffect,q1=new WeakMap;function PO(e,t){var n=kO(null,function(i){return e.forEach(function(o){return bd(o,i)})});return RO(function(){var i=q1.get(n);if(i){var o=new Set(i),a=new Set(e),u=n.current;o.forEach(function(l){a.has(l)||bd(l,null)}),a.forEach(function(l){o.has(l)||bd(l,u)})}q1.set(n,e)},[e]),n}function NO(e){return e}function TO(e,t){t===void 0&&(t=NO);var n=[],i=!1,o={read:function(){if(i)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(a){var u=t(a,i);return n.push(u),function(){n=n.filter(function(l){return l!==u})}},assignSyncMedium:function(a){for(i=!0;n.length;){var u=n;n=[],u.forEach(a)}n={push:function(l){return a(l)},filter:function(){return n}}},assignMedium:function(a){i=!0;var u=[];if(n.length){var l=n;n=[],l.forEach(a),u=n}var f=function(){var h=u;u=[],h.forEach(a)},d=function(){return Promise.resolve().then(f)};d(),n={push:function(h){u.push(h),d()},filter:function(h){return u=u.filter(h),n}}}};return o}function MO(e){e===void 0&&(e={});var t=TO(null);return t.options=Cn({async:!0,ssr:!1},e),t}var nP=function(e){var t=e.sideCar,n=tP(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var i=t.read();if(!i)throw new Error("Sidecar medium not found");return P.createElement(i,Cn({},n))};nP.isSideCarExport=!0;function AO(e,t){return e.useMedium(t),nP}var rP=MO(),Sd=function(){},Cl=P.forwardRef(function(e,t){var n=P.useRef(null),i=P.useState({onScrollCapture:Sd,onWheelCapture:Sd,onTouchMoveCapture:Sd}),o=i[0],a=i[1],u=e.forwardProps,l=e.children,f=e.className,d=e.removeScrollBar,h=e.enabled,p=e.shards,v=e.sideCar,m=e.noIsolation,x=e.inert,w=e.allowPinchZoom,_=e.as,S=_===void 0?"div":_,k=e.gapMode,E=tP(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=v,R=PO([n,t]),A=Cn(Cn({},E),o);return P.createElement(P.Fragment,null,h&&P.createElement(C,{sideCar:rP,removeScrollBar:d,shards:p,noIsolation:m,inert:x,setCallbacks:a,allowPinchZoom:!!w,lockRef:n,gapMode:k}),u?P.cloneElement(P.Children.only(l),Cn(Cn({},A),{ref:R})):P.createElement(S,Cn({},A,{className:f,ref:R}),l))});Cl.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Cl.classNames={fullWidth:Ku,zeroRight:Gu};var IO=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function LO(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=IO();return t&&e.setAttribute("nonce",t),e}function OO(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function DO(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var jO=function(){var e=0,t=null;return{add:function(n){e==0&&(t=LO())&&(OO(t,n),DO(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},qO=function(){var e=jO();return function(t,n){P.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},iP=function(){var e=qO(),t=function(n){var i=n.styles,o=n.dynamic;return e(i,o),null};return t},FO={left:0,top:0,right:0,gap:0},Ed=function(e){return parseInt(e||"",10)||0},zO=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],i=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Ed(n),Ed(i),Ed(o)]},$O=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return FO;var t=zO(e),n=document.documentElement.clientWidth,i=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,i-n+t[2]-t[0])}},BO=iP(),oo="data-scroll-locked",VO=function(e,t,n,i){var o=e.left,a=e.top,u=e.right,l=e.gap;return n===void 0&&(n="margin"),`
|
|
117
|
-
.`.concat(EO,` {
|
|
118
|
-
overflow: hidden `).concat(i,`;
|
|
119
|
-
padding-right: `).concat(l,"px ").concat(i,`;
|
|
120
|
-
}
|
|
121
|
-
body[`).concat(oo,`] {
|
|
122
|
-
overflow: hidden `).concat(i,`;
|
|
123
|
-
overscroll-behavior: contain;
|
|
124
|
-
`).concat([t&&"position: relative ".concat(i,";"),n==="margin"&&`
|
|
125
|
-
padding-left: `.concat(o,`px;
|
|
126
|
-
padding-top: `).concat(a,`px;
|
|
127
|
-
padding-right: `).concat(u,`px;
|
|
128
|
-
margin-left:0;
|
|
129
|
-
margin-top:0;
|
|
130
|
-
margin-right: `).concat(l,"px ").concat(i,`;
|
|
131
|
-
`),n==="padding"&&"padding-right: ".concat(l,"px ").concat(i,";")].filter(Boolean).join(""),`
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
.`).concat(Gu,` {
|
|
135
|
-
right: `).concat(l,"px ").concat(i,`;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
.`).concat(Ku,` {
|
|
139
|
-
margin-right: `).concat(l,"px ").concat(i,`;
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
.`).concat(Gu," .").concat(Gu,` {
|
|
143
|
-
right: 0 `).concat(i,`;
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
.`).concat(Ku," .").concat(Ku,` {
|
|
147
|
-
margin-right: 0 `).concat(i,`;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
body[`).concat(oo,`] {
|
|
151
|
-
`).concat(CO,": ").concat(l,`px;
|
|
152
|
-
}
|
|
153
|
-
`)},F1=function(){var e=parseInt(document.body.getAttribute(oo)||"0",10);return isFinite(e)?e:0},HO=function(){P.useEffect(function(){return document.body.setAttribute(oo,(F1()+1).toString()),function(){var e=F1()-1;e<=0?document.body.removeAttribute(oo):document.body.setAttribute(oo,e.toString())}},[])},UO=function(e){var t=e.noRelative,n=e.noImportant,i=e.gapMode,o=i===void 0?"margin":i;HO();var a=P.useMemo(function(){return $O(o)},[o]);return P.createElement(BO,{styles:VO(a,!t,o,n?"":"!important")})},cy=!1;if(typeof window<"u")try{var Nu=Object.defineProperty({},"passive",{get:function(){return cy=!0,!0}});window.addEventListener("test",Nu,Nu),window.removeEventListener("test",Nu,Nu)}catch{cy=!1}var Ki=cy?{passive:!1}:!1,WO=function(e){return e.tagName==="TEXTAREA"},oP=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!WO(e)&&n[t]==="visible")},GO=function(e){return oP(e,"overflowY")},KO=function(e){return oP(e,"overflowX")},z1=function(e,t){var n=t.ownerDocument,i=t;do{typeof ShadowRoot<"u"&&i instanceof ShadowRoot&&(i=i.host);var o=sP(e,i);if(o){var a=aP(e,i),u=a[1],l=a[2];if(u>l)return!0}i=i.parentNode}while(i&&i!==n.body);return!1},YO=function(e){var t=e.scrollTop,n=e.scrollHeight,i=e.clientHeight;return[t,n,i]},XO=function(e){var t=e.scrollLeft,n=e.scrollWidth,i=e.clientWidth;return[t,n,i]},sP=function(e,t){return e==="v"?GO(t):KO(t)},aP=function(e,t){return e==="v"?YO(t):XO(t)},QO=function(e,t){return e==="h"&&t==="rtl"?-1:1},ZO=function(e,t,n,i,o){var a=QO(e,window.getComputedStyle(t).direction),u=a*i,l=n.target,f=t.contains(l),d=!1,h=u>0,p=0,v=0;do{var m=aP(e,l),x=m[0],w=m[1],_=m[2],S=w-_-a*x;(x||S)&&sP(e,l)&&(p+=S,v+=x),l instanceof ShadowRoot?l=l.host:l=l.parentNode}while(!f&&l!==document.body||f&&(t.contains(l)||t===l));return(h&&(Math.abs(p)<1||!o)||!h&&(Math.abs(v)<1||!o))&&(d=!0),d},Tu=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},$1=function(e){return[e.deltaX,e.deltaY]},B1=function(e){return e&&"current"in e?e.current:e},JO=function(e,t){return e[0]===t[0]&&e[1]===t[1]},eD=function(e){return`
|
|
154
|
-
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
155
|
-
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
156
|
-
`)},tD=0,Yi=[];function nD(e){var t=P.useRef([]),n=P.useRef([0,0]),i=P.useRef(),o=P.useState(tD++)[0],a=P.useState(iP)[0],u=P.useRef(e);P.useEffect(function(){u.current=e},[e]),P.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var w=SO([e.lockRef.current],(e.shards||[]).map(B1),!0).filter(Boolean);return w.forEach(function(_){return _.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),w.forEach(function(_){return _.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var l=P.useCallback(function(w,_){if("touches"in w&&w.touches.length===2||w.type==="wheel"&&w.ctrlKey)return!u.current.allowPinchZoom;var S=Tu(w),k=n.current,E="deltaX"in w?w.deltaX:k[0]-S[0],C="deltaY"in w?w.deltaY:k[1]-S[1],R,A=w.target,T=Math.abs(E)>Math.abs(C)?"h":"v";if("touches"in w&&T==="h"&&A.type==="range")return!1;var L=z1(T,A);if(!L)return!0;if(L?R=T:(R=T==="v"?"h":"v",L=z1(T,A)),!L)return!1;if(!i.current&&"changedTouches"in w&&(E||C)&&(i.current=R),!R)return!0;var O=i.current||R;return ZO(O,_,w,O==="h"?E:C,!0)},[]),f=P.useCallback(function(w){var _=w;if(!(!Yi.length||Yi[Yi.length-1]!==a)){var S="deltaY"in _?$1(_):Tu(_),k=t.current.filter(function(R){return R.name===_.type&&(R.target===_.target||_.target===R.shadowParent)&&JO(R.delta,S)})[0];if(k&&k.should){_.cancelable&&_.preventDefault();return}if(!k){var E=(u.current.shards||[]).map(B1).filter(Boolean).filter(function(R){return R.contains(_.target)}),C=E.length>0?l(_,E[0]):!u.current.noIsolation;C&&_.cancelable&&_.preventDefault()}}},[]),d=P.useCallback(function(w,_,S,k){var E={name:w,delta:_,target:S,should:k,shadowParent:rD(S)};t.current.push(E),setTimeout(function(){t.current=t.current.filter(function(C){return C!==E})},1)},[]),h=P.useCallback(function(w){n.current=Tu(w),i.current=void 0},[]),p=P.useCallback(function(w){d(w.type,$1(w),w.target,l(w,e.lockRef.current))},[]),v=P.useCallback(function(w){d(w.type,Tu(w),w.target,l(w,e.lockRef.current))},[]);P.useEffect(function(){return Yi.push(a),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:v}),document.addEventListener("wheel",f,Ki),document.addEventListener("touchmove",f,Ki),document.addEventListener("touchstart",h,Ki),function(){Yi=Yi.filter(function(w){return w!==a}),document.removeEventListener("wheel",f,Ki),document.removeEventListener("touchmove",f,Ki),document.removeEventListener("touchstart",h,Ki)}},[]);var m=e.removeScrollBar,x=e.inert;return P.createElement(P.Fragment,null,x?P.createElement(a,{styles:eD(o)}):null,m?P.createElement(UO,{gapMode:e.gapMode}):null)}function rD(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const iD=AO(rP,nD);var uP=P.forwardRef(function(e,t){return P.createElement(Cl,Cn({},e,{ref:t,sideCar:iD}))});uP.classNames=Cl.classNames;var oD=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Xi=new WeakMap,Mu=new WeakMap,Au={},Cd=0,lP=function(e){return e&&(e.host||lP(e.parentNode))},sD=function(e,t){return t.map(function(n){if(e.contains(n))return n;var i=lP(n);return i&&e.contains(i)?i:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},aD=function(e,t,n,i){var o=sD(t,Array.isArray(e)?e:[e]);Au[n]||(Au[n]=new WeakMap);var a=Au[n],u=[],l=new Set,f=new Set(o),d=function(p){!p||l.has(p)||(l.add(p),d(p.parentNode))};o.forEach(d);var h=function(p){!p||f.has(p)||Array.prototype.forEach.call(p.children,function(v){if(l.has(v))h(v);else try{var m=v.getAttribute(i),x=m!==null&&m!=="false",w=(Xi.get(v)||0)+1,_=(a.get(v)||0)+1;Xi.set(v,w),a.set(v,_),u.push(v),w===1&&x&&Mu.set(v,!0),_===1&&v.setAttribute(n,"true"),x||v.setAttribute(i,"true")}catch(S){console.error("aria-hidden: cannot operate on ",v,S)}})};return h(t),l.clear(),Cd++,function(){u.forEach(function(p){var v=Xi.get(p)-1,m=a.get(p)-1;Xi.set(p,v),a.set(p,m),v||(Mu.has(p)||p.removeAttribute(i),Mu.delete(p)),m||p.removeAttribute(n)}),Cd--,Cd||(Xi=new WeakMap,Xi=new WeakMap,Mu=new WeakMap,Au={})}},uD=function(e,t,n){n===void 0&&(n="data-aria-hidden");var i=Array.from(Array.isArray(e)?e:[e]),o=oD(e);return o?(i.push.apply(i,Array.from(o.querySelectorAll("[aria-live]"))),aD(i,o,n,"aria-hidden")):function(){return null}},zy="Dialog",[cP,l6]=jy(zy),[lD,gn]=cP(zy),fP=e=>{const{__scopeDialog:t,children:n,open:i,defaultOpen:o,onOpenChange:a,modal:u=!0}=e,l=P.useRef(null),f=P.useRef(null),[d=!1,h]=XR({prop:i,defaultProp:o,onChange:a});return M.jsx(lD,{scope:t,triggerRef:l,contentRef:f,contentId:Wu(),titleId:Wu(),descriptionId:Wu(),open:d,onOpenChange:h,onOpenToggle:P.useCallback(()=>h(p=>!p),[h]),modal:u,children:n})};fP.displayName=zy;var dP="DialogTrigger",cD=P.forwardRef((e,t)=>{const{__scopeDialog:n,...i}=e,o=gn(dP,n),a=pn(t,o.triggerRef);return M.jsx(yt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Vy(o.open),...i,ref:a,onClick:Ct(e.onClick,o.onOpenToggle)})});cD.displayName=dP;var $y="DialogPortal",[fD,hP]=cP($y,{forceMount:void 0}),pP=e=>{const{__scopeDialog:t,forceMount:n,children:i,container:o}=e,a=gn($y,t);return M.jsx(fD,{scope:t,forceMount:n,children:P.Children.map(i,u=>M.jsx(xo,{present:n||a.open,children:M.jsx(Fy,{asChild:!0,container:o,children:u})}))})};pP.displayName=$y;var rl="DialogOverlay",gP=P.forwardRef((e,t)=>{const n=hP(rl,e.__scopeDialog),{forceMount:i=n.forceMount,...o}=e,a=gn(rl,e.__scopeDialog);return a.modal?M.jsx(xo,{present:i||a.open,children:M.jsx(dD,{...o,ref:t})}):null});gP.displayName=rl;var dD=P.forwardRef((e,t)=>{const{__scopeDialog:n,...i}=e,o=gn(rl,n);return M.jsx(uP,{as:Jn,allowPinchZoom:!0,shards:[o.contentRef],children:M.jsx(yt.div,{"data-state":Vy(o.open),...i,ref:t,style:{pointerEvents:"auto",...i.style}})})}),li="DialogContent",vP=P.forwardRef((e,t)=>{const n=hP(li,e.__scopeDialog),{forceMount:i=n.forceMount,...o}=e,a=gn(li,e.__scopeDialog);return M.jsx(xo,{present:i||a.open,children:a.modal?M.jsx(hD,{...o,ref:t}):M.jsx(pD,{...o,ref:t})})});vP.displayName=li;var hD=P.forwardRef((e,t)=>{const n=gn(li,e.__scopeDialog),i=P.useRef(null),o=pn(t,n.contentRef,i);return P.useEffect(()=>{const a=i.current;if(a)return uD(a)},[]),M.jsx(mP,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ct(e.onCloseAutoFocus,a=>{var u;a.preventDefault(),(u=n.triggerRef.current)==null||u.focus()}),onPointerDownOutside:Ct(e.onPointerDownOutside,a=>{const u=a.detail.originalEvent,l=u.button===0&&u.ctrlKey===!0;(u.button===2||l)&&a.preventDefault()}),onFocusOutside:Ct(e.onFocusOutside,a=>a.preventDefault())})}),pD=P.forwardRef((e,t)=>{const n=gn(li,e.__scopeDialog),i=P.useRef(!1),o=P.useRef(!1);return M.jsx(mP,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var u,l;(u=e.onCloseAutoFocus)==null||u.call(e,a),a.defaultPrevented||(i.current||(l=n.triggerRef.current)==null||l.focus(),a.preventDefault()),i.current=!1,o.current=!1},onInteractOutside:a=>{var f,d;(f=e.onInteractOutside)==null||f.call(e,a),a.defaultPrevented||(i.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const u=a.target;((d=n.triggerRef.current)==null?void 0:d.contains(u))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),mP=P.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:i,onOpenAutoFocus:o,onCloseAutoFocus:a,...u}=e,l=gn(li,n),f=P.useRef(null),d=pn(t,f);return bO(),M.jsxs(M.Fragment,{children:[M.jsx(JR,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:o,onUnmountAutoFocus:a,children:M.jsx(qy,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":Vy(l.open),...u,ref:d,onDismiss:()=>l.onOpenChange(!1)})}),M.jsxs(M.Fragment,{children:[M.jsx(gD,{titleId:l.titleId}),M.jsx(mD,{contentRef:f,descriptionId:l.descriptionId})]})]})}),By="DialogTitle",yP=P.forwardRef((e,t)=>{const{__scopeDialog:n,...i}=e,o=gn(By,n);return M.jsx(yt.h2,{id:o.titleId,...i,ref:t})});yP.displayName=By;var wP="DialogDescription",xP=P.forwardRef((e,t)=>{const{__scopeDialog:n,...i}=e,o=gn(wP,n);return M.jsx(yt.p,{id:o.descriptionId,...i,ref:t})});xP.displayName=wP;var _P="DialogClose",bP=P.forwardRef((e,t)=>{const{__scopeDialog:n,...i}=e,o=gn(_P,n);return M.jsx(yt.button,{type:"button",...i,ref:t,onClick:Ct(e.onClick,()=>o.onOpenChange(!1))})});bP.displayName=_P;function Vy(e){return e?"open":"closed"}var SP="DialogTitleWarning",[c6,EP]=ZL(SP,{contentName:li,titleName:By,docsSlug:"dialog"}),gD=({titleId:e})=>{const t=EP(SP),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
157
|
-
|
|
158
|
-
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
159
|
-
|
|
160
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return P.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},vD="DialogDescriptionWarning",mD=({contentRef:e,descriptionId:t})=>{const i=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${EP(vD).contentName}}.`;return P.useEffect(()=>{var a;const o=(a=e.current)==null?void 0:a.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(i))},[i,e,t]),null},yD=fP,wD=pP,CP=gP,kP=vP,RP=yP,PP=xP,xD=bP;const _D=yD,bD=wD,NP=P.forwardRef(({className:e,...t},n)=>M.jsx(CP,{className:Ae("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n}));NP.displayName=CP.displayName;const SD=El("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),TP=P.forwardRef(({side:e="right",className:t,children:n,...i},o)=>M.jsxs(bD,{children:[M.jsx(NP,{}),M.jsxs(kP,{ref:o,className:Ae(SD({side:e}),t),...i,children:[M.jsxs(xD,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[M.jsx(dL,{className:"h-4 w-4"}),M.jsx("span",{className:"sr-only",children:"Close"})]}),n]})]}));TP.displayName=kP.displayName;const ED=P.forwardRef(({className:e,...t},n)=>M.jsx(RP,{ref:n,className:Ae("text-lg font-semibold text-foreground",e),...t}));ED.displayName=RP.displayName;const CD=P.forwardRef(({className:e,...t},n)=>M.jsx(PP,{ref:n,className:Ae("text-sm text-muted-foreground",e),...t}));CD.displayName=PP.displayName;function V1({className:e,...t}){return M.jsx("div",{className:Ae("animate-pulse rounded-md bg-primary/10",e),...t})}const kD=["top","right","bottom","left"],Lr=Math.min,qt=Math.max,il=Math.round,Iu=Math.floor,kn=e=>({x:e,y:e}),RD={left:"right",right:"left",bottom:"top",top:"bottom"},PD={start:"end",end:"start"};function fy(e,t,n){return qt(e,Lr(t,n))}function Yn(e,t){return typeof e=="function"?e(t):e}function Xn(e){return e.split("-")[0]}function _o(e){return e.split("-")[1]}function Hy(e){return e==="x"?"y":"x"}function Uy(e){return e==="y"?"height":"width"}function Or(e){return["top","bottom"].includes(Xn(e))?"y":"x"}function Wy(e){return Hy(Or(e))}function ND(e,t,n){n===void 0&&(n=!1);const i=_o(e),o=Wy(e),a=Uy(o);let u=o==="x"?i===(n?"end":"start")?"right":"left":i==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(u=ol(u)),[u,ol(u)]}function TD(e){const t=ol(e);return[dy(e),t,dy(t)]}function dy(e){return e.replace(/start|end/g,t=>PD[t])}function MD(e,t,n){const i=["left","right"],o=["right","left"],a=["top","bottom"],u=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:i:t?i:o;case"left":case"right":return t?a:u;default:return[]}}function AD(e,t,n,i){const o=_o(e);let a=MD(Xn(e),n==="start",i);return o&&(a=a.map(u=>u+"-"+o),t&&(a=a.concat(a.map(dy)))),a}function ol(e){return e.replace(/left|right|bottom|top/g,t=>RD[t])}function ID(e){return{top:0,right:0,bottom:0,left:0,...e}}function MP(e){return typeof e!="number"?ID(e):{top:e,right:e,bottom:e,left:e}}function sl(e){const{x:t,y:n,width:i,height:o}=e;return{width:i,height:o,top:n,left:t,right:t+i,bottom:n+o,x:t,y:n}}function H1(e,t,n){let{reference:i,floating:o}=e;const a=Or(t),u=Wy(t),l=Uy(u),f=Xn(t),d=a==="y",h=i.x+i.width/2-o.width/2,p=i.y+i.height/2-o.height/2,v=i[l]/2-o[l]/2;let m;switch(f){case"top":m={x:h,y:i.y-o.height};break;case"bottom":m={x:h,y:i.y+i.height};break;case"right":m={x:i.x+i.width,y:p};break;case"left":m={x:i.x-o.width,y:p};break;default:m={x:i.x,y:i.y}}switch(_o(t)){case"start":m[u]-=v*(n&&d?-1:1);break;case"end":m[u]+=v*(n&&d?-1:1);break}return m}const LD=async(e,t,n)=>{const{placement:i="bottom",strategy:o="absolute",middleware:a=[],platform:u}=n,l=a.filter(Boolean),f=await(u.isRTL==null?void 0:u.isRTL(t));let d=await u.getElementRects({reference:e,floating:t,strategy:o}),{x:h,y:p}=H1(d,i,f),v=i,m={},x=0;for(let w=0;w<l.length;w++){const{name:_,fn:S}=l[w],{x:k,y:E,data:C,reset:R}=await S({x:h,y:p,initialPlacement:i,placement:v,strategy:o,middlewareData:m,rects:d,platform:u,elements:{reference:e,floating:t}});h=k??h,p=E??p,m={...m,[_]:{...m[_],...C}},R&&x<=50&&(x++,typeof R=="object"&&(R.placement&&(v=R.placement),R.rects&&(d=R.rects===!0?await u.getElementRects({reference:e,floating:t,strategy:o}):R.rects),{x:h,y:p}=H1(d,v,f)),w=-1)}return{x:h,y:p,placement:v,strategy:o,middlewareData:m}};async function Os(e,t){var n;t===void 0&&(t={});const{x:i,y:o,platform:a,rects:u,elements:l,strategy:f}=e,{boundary:d="clippingAncestors",rootBoundary:h="viewport",elementContext:p="floating",altBoundary:v=!1,padding:m=0}=Yn(t,e),x=MP(m),_=l[v?p==="floating"?"reference":"floating":p],S=sl(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(_)))==null||n?_:_.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(l.floating)),boundary:d,rootBoundary:h,strategy:f})),k=p==="floating"?{x:i,y:o,width:u.floating.width,height:u.floating.height}:u.reference,E=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l.floating)),C=await(a.isElement==null?void 0:a.isElement(E))?await(a.getScale==null?void 0:a.getScale(E))||{x:1,y:1}:{x:1,y:1},R=sl(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:k,offsetParent:E,strategy:f}):k);return{top:(S.top-R.top+x.top)/C.y,bottom:(R.bottom-S.bottom+x.bottom)/C.y,left:(S.left-R.left+x.left)/C.x,right:(R.right-S.right+x.right)/C.x}}const OD=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:i,placement:o,rects:a,platform:u,elements:l,middlewareData:f}=t,{element:d,padding:h=0}=Yn(e,t)||{};if(d==null)return{};const p=MP(h),v={x:n,y:i},m=Wy(o),x=Uy(m),w=await u.getDimensions(d),_=m==="y",S=_?"top":"left",k=_?"bottom":"right",E=_?"clientHeight":"clientWidth",C=a.reference[x]+a.reference[m]-v[m]-a.floating[x],R=v[m]-a.reference[m],A=await(u.getOffsetParent==null?void 0:u.getOffsetParent(d));let T=A?A[E]:0;(!T||!await(u.isElement==null?void 0:u.isElement(A)))&&(T=l.floating[E]||a.floating[x]);const L=C/2-R/2,O=T/2-w[x]/2-1,q=Lr(p[S],O),F=Lr(p[k],O),$=q,W=T-w[x]-F,I=T/2-w[x]/2+L,H=fy($,I,W),z=!f.arrow&&_o(o)!=null&&I!==H&&a.reference[x]/2-(I<$?q:F)-w[x]/2<0,Q=z?I<$?I-$:I-W:0;return{[m]:v[m]+Q,data:{[m]:H,centerOffset:I-H-Q,...z&&{alignmentOffset:Q}},reset:z}}}),DD=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,i;const{placement:o,middlewareData:a,rects:u,initialPlacement:l,platform:f,elements:d}=t,{mainAxis:h=!0,crossAxis:p=!0,fallbackPlacements:v,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:x="none",flipAlignment:w=!0,..._}=Yn(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const S=Xn(o),k=Or(l),E=Xn(l)===l,C=await(f.isRTL==null?void 0:f.isRTL(d.floating)),R=v||(E||!w?[ol(l)]:TD(l)),A=x!=="none";!v&&A&&R.push(...AD(l,w,x,C));const T=[l,...R],L=await Os(t,_),O=[];let q=((i=a.flip)==null?void 0:i.overflows)||[];if(h&&O.push(L[S]),p){const I=ND(o,u,C);O.push(L[I[0]],L[I[1]])}if(q=[...q,{placement:o,overflows:O}],!O.every(I=>I<=0)){var F,$;const I=(((F=a.flip)==null?void 0:F.index)||0)+1,H=T[I];if(H)return{data:{index:I,overflows:q},reset:{placement:H}};let z=($=q.filter(Q=>Q.overflows[0]<=0).sort((Q,D)=>Q.overflows[1]-D.overflows[1])[0])==null?void 0:$.placement;if(!z)switch(m){case"bestFit":{var W;const Q=(W=q.filter(D=>{if(A){const U=Or(D.placement);return U===k||U==="y"}return!0}).map(D=>[D.placement,D.overflows.filter(U=>U>0).reduce((U,K)=>U+K,0)]).sort((D,U)=>D[1]-U[1])[0])==null?void 0:W[0];Q&&(z=Q);break}case"initialPlacement":z=l;break}if(o!==z)return{reset:{placement:z}}}return{}}}};function U1(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function W1(e){return kD.some(t=>e[t]>=0)}const jD=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:i="referenceHidden",...o}=Yn(e,t);switch(i){case"referenceHidden":{const a=await Os(t,{...o,elementContext:"reference"}),u=U1(a,n.reference);return{data:{referenceHiddenOffsets:u,referenceHidden:W1(u)}}}case"escaped":{const a=await Os(t,{...o,altBoundary:!0}),u=U1(a,n.floating);return{data:{escapedOffsets:u,escaped:W1(u)}}}default:return{}}}}};async function qD(e,t){const{placement:n,platform:i,elements:o}=e,a=await(i.isRTL==null?void 0:i.isRTL(o.floating)),u=Xn(n),l=_o(n),f=Or(n)==="y",d=["left","top"].includes(u)?-1:1,h=a&&f?-1:1,p=Yn(t,e);let{mainAxis:v,crossAxis:m,alignmentAxis:x}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return l&&typeof x=="number"&&(m=l==="end"?x*-1:x),f?{x:m*h,y:v*d}:{x:v*d,y:m*h}}const FD=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,i;const{x:o,y:a,placement:u,middlewareData:l}=t,f=await qD(t,e);return u===((n=l.offset)==null?void 0:n.placement)&&(i=l.arrow)!=null&&i.alignmentOffset?{}:{x:o+f.x,y:a+f.y,data:{...f,placement:u}}}}},zD=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:i,placement:o}=t,{mainAxis:a=!0,crossAxis:u=!1,limiter:l={fn:_=>{let{x:S,y:k}=_;return{x:S,y:k}}},...f}=Yn(e,t),d={x:n,y:i},h=await Os(t,f),p=Or(Xn(o)),v=Hy(p);let m=d[v],x=d[p];if(a){const _=v==="y"?"top":"left",S=v==="y"?"bottom":"right",k=m+h[_],E=m-h[S];m=fy(k,m,E)}if(u){const _=p==="y"?"top":"left",S=p==="y"?"bottom":"right",k=x+h[_],E=x-h[S];x=fy(k,x,E)}const w=l.fn({...t,[v]:m,[p]:x});return{...w,data:{x:w.x-n,y:w.y-i,enabled:{[v]:a,[p]:u}}}}}},$D=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:i,placement:o,rects:a,middlewareData:u}=t,{offset:l=0,mainAxis:f=!0,crossAxis:d=!0}=Yn(e,t),h={x:n,y:i},p=Or(o),v=Hy(p);let m=h[v],x=h[p];const w=Yn(l,t),_=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(f){const E=v==="y"?"height":"width",C=a.reference[v]-a.floating[E]+_.mainAxis,R=a.reference[v]+a.reference[E]-_.mainAxis;m<C?m=C:m>R&&(m=R)}if(d){var S,k;const E=v==="y"?"width":"height",C=["top","left"].includes(Xn(o)),R=a.reference[p]-a.floating[E]+(C&&((S=u.offset)==null?void 0:S[p])||0)+(C?0:_.crossAxis),A=a.reference[p]+a.reference[E]+(C?0:((k=u.offset)==null?void 0:k[p])||0)-(C?_.crossAxis:0);x<R?x=R:x>A&&(x=A)}return{[v]:m,[p]:x}}}},BD=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,i;const{placement:o,rects:a,platform:u,elements:l}=t,{apply:f=()=>{},...d}=Yn(e,t),h=await Os(t,d),p=Xn(o),v=_o(o),m=Or(o)==="y",{width:x,height:w}=a.floating;let _,S;p==="top"||p==="bottom"?(_=p,S=v===(await(u.isRTL==null?void 0:u.isRTL(l.floating))?"start":"end")?"left":"right"):(S=p,_=v==="end"?"top":"bottom");const k=w-h.top-h.bottom,E=x-h.left-h.right,C=Lr(w-h[_],k),R=Lr(x-h[S],E),A=!t.middlewareData.shift;let T=C,L=R;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(L=E),(i=t.middlewareData.shift)!=null&&i.enabled.y&&(T=k),A&&!v){const q=qt(h.left,0),F=qt(h.right,0),$=qt(h.top,0),W=qt(h.bottom,0);m?L=x-2*(q!==0||F!==0?q+F:qt(h.left,h.right)):T=w-2*($!==0||W!==0?$+W:qt(h.top,h.bottom))}await f({...t,availableWidth:L,availableHeight:T});const O=await u.getDimensions(l.floating);return x!==O.width||w!==O.height?{reset:{rects:!0}}:{}}}};function kl(){return typeof window<"u"}function bo(e){return AP(e)?(e.nodeName||"").toLowerCase():"#document"}function zt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Nn(e){var t;return(t=(AP(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function AP(e){return kl()?e instanceof Node||e instanceof zt(e).Node:!1}function fn(e){return kl()?e instanceof Element||e instanceof zt(e).Element:!1}function Pn(e){return kl()?e instanceof HTMLElement||e instanceof zt(e).HTMLElement:!1}function G1(e){return!kl()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof zt(e).ShadowRoot}function Ys(e){const{overflow:t,overflowX:n,overflowY:i,display:o}=dn(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+n)&&!["inline","contents"].includes(o)}function VD(e){return["table","td","th"].includes(bo(e))}function Rl(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Gy(e){const t=Ky(),n=fn(e)?dn(e):e;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(i=>(n.willChange||"").includes(i))||["paint","layout","strict","content"].some(i=>(n.contain||"").includes(i))}function HD(e){let t=Dr(e);for(;Pn(t)&&!co(t);){if(Gy(t))return t;if(Rl(t))return null;t=Dr(t)}return null}function Ky(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function co(e){return["html","body","#document"].includes(bo(e))}function dn(e){return zt(e).getComputedStyle(e)}function Pl(e){return fn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Dr(e){if(bo(e)==="html")return e;const t=e.assignedSlot||e.parentNode||G1(e)&&e.host||Nn(e);return G1(t)?t.host:t}function IP(e){const t=Dr(e);return co(t)?e.ownerDocument?e.ownerDocument.body:e.body:Pn(t)&&Ys(t)?t:IP(t)}function Ds(e,t,n){var i;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=IP(e),a=o===((i=e.ownerDocument)==null?void 0:i.body),u=zt(o);if(a){const l=hy(u);return t.concat(u,u.visualViewport||[],Ys(o)?o:[],l&&n?Ds(l):[])}return t.concat(o,Ds(o,[],n))}function hy(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function LP(e){const t=dn(e);let n=parseFloat(t.width)||0,i=parseFloat(t.height)||0;const o=Pn(e),a=o?e.offsetWidth:n,u=o?e.offsetHeight:i,l=il(n)!==a||il(i)!==u;return l&&(n=a,i=u),{width:n,height:i,$:l}}function Yy(e){return fn(e)?e:e.contextElement}function so(e){const t=Yy(e);if(!Pn(t))return kn(1);const n=t.getBoundingClientRect(),{width:i,height:o,$:a}=LP(t);let u=(a?il(n.width):n.width)/i,l=(a?il(n.height):n.height)/o;return(!u||!Number.isFinite(u))&&(u=1),(!l||!Number.isFinite(l))&&(l=1),{x:u,y:l}}const UD=kn(0);function OP(e){const t=zt(e);return!Ky()||!t.visualViewport?UD:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function WD(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==zt(e)?!1:t}function ci(e,t,n,i){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),a=Yy(e);let u=kn(1);t&&(i?fn(i)&&(u=so(i)):u=so(e));const l=WD(a,n,i)?OP(a):kn(0);let f=(o.left+l.x)/u.x,d=(o.top+l.y)/u.y,h=o.width/u.x,p=o.height/u.y;if(a){const v=zt(a),m=i&&fn(i)?zt(i):i;let x=v,w=hy(x);for(;w&&i&&m!==x;){const _=so(w),S=w.getBoundingClientRect(),k=dn(w),E=S.left+(w.clientLeft+parseFloat(k.paddingLeft))*_.x,C=S.top+(w.clientTop+parseFloat(k.paddingTop))*_.y;f*=_.x,d*=_.y,h*=_.x,p*=_.y,f+=E,d+=C,x=zt(w),w=hy(x)}}return sl({width:h,height:p,x:f,y:d})}function Xy(e,t){const n=Pl(e).scrollLeft;return t?t.left+n:ci(Nn(e)).left+n}function DP(e,t,n){n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=i.left+t.scrollLeft-(n?0:Xy(e,i)),a=i.top+t.scrollTop;return{x:o,y:a}}function GD(e){let{elements:t,rect:n,offsetParent:i,strategy:o}=e;const a=o==="fixed",u=Nn(i),l=t?Rl(t.floating):!1;if(i===u||l&&a)return n;let f={scrollLeft:0,scrollTop:0},d=kn(1);const h=kn(0),p=Pn(i);if((p||!p&&!a)&&((bo(i)!=="body"||Ys(u))&&(f=Pl(i)),Pn(i))){const m=ci(i);d=so(i),h.x=m.x+i.clientLeft,h.y=m.y+i.clientTop}const v=u&&!p&&!a?DP(u,f,!0):kn(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-f.scrollLeft*d.x+h.x+v.x,y:n.y*d.y-f.scrollTop*d.y+h.y+v.y}}function KD(e){return Array.from(e.getClientRects())}function YD(e){const t=Nn(e),n=Pl(e),i=e.ownerDocument.body,o=qt(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),a=qt(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight);let u=-n.scrollLeft+Xy(e);const l=-n.scrollTop;return dn(i).direction==="rtl"&&(u+=qt(t.clientWidth,i.clientWidth)-o),{width:o,height:a,x:u,y:l}}function XD(e,t){const n=zt(e),i=Nn(e),o=n.visualViewport;let a=i.clientWidth,u=i.clientHeight,l=0,f=0;if(o){a=o.width,u=o.height;const d=Ky();(!d||d&&t==="fixed")&&(l=o.offsetLeft,f=o.offsetTop)}return{width:a,height:u,x:l,y:f}}function QD(e,t){const n=ci(e,!0,t==="fixed"),i=n.top+e.clientTop,o=n.left+e.clientLeft,a=Pn(e)?so(e):kn(1),u=e.clientWidth*a.x,l=e.clientHeight*a.y,f=o*a.x,d=i*a.y;return{width:u,height:l,x:f,y:d}}function K1(e,t,n){let i;if(t==="viewport")i=XD(e,n);else if(t==="document")i=YD(Nn(e));else if(fn(t))i=QD(t,n);else{const o=OP(e);i={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return sl(i)}function jP(e,t){const n=Dr(e);return n===t||!fn(n)||co(n)?!1:dn(n).position==="fixed"||jP(n,t)}function ZD(e,t){const n=t.get(e);if(n)return n;let i=Ds(e,[],!1).filter(l=>fn(l)&&bo(l)!=="body"),o=null;const a=dn(e).position==="fixed";let u=a?Dr(e):e;for(;fn(u)&&!co(u);){const l=dn(u),f=Gy(u);!f&&l.position==="fixed"&&(o=null),(a?!f&&!o:!f&&l.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Ys(u)&&!f&&jP(e,u))?i=i.filter(h=>h!==u):o=l,u=Dr(u)}return t.set(e,i),i}function JD(e){let{element:t,boundary:n,rootBoundary:i,strategy:o}=e;const u=[...n==="clippingAncestors"?Rl(t)?[]:ZD(t,this._c):[].concat(n),i],l=u[0],f=u.reduce((d,h)=>{const p=K1(t,h,o);return d.top=qt(p.top,d.top),d.right=Lr(p.right,d.right),d.bottom=Lr(p.bottom,d.bottom),d.left=qt(p.left,d.left),d},K1(t,l,o));return{width:f.right-f.left,height:f.bottom-f.top,x:f.left,y:f.top}}function ej(e){const{width:t,height:n}=LP(e);return{width:t,height:n}}function tj(e,t,n){const i=Pn(t),o=Nn(t),a=n==="fixed",u=ci(e,!0,a,t);let l={scrollLeft:0,scrollTop:0};const f=kn(0);if(i||!i&&!a)if((bo(t)!=="body"||Ys(o))&&(l=Pl(t)),i){const v=ci(t,!0,a,t);f.x=v.x+t.clientLeft,f.y=v.y+t.clientTop}else o&&(f.x=Xy(o));const d=o&&!i&&!a?DP(o,l):kn(0),h=u.left+l.scrollLeft-f.x-d.x,p=u.top+l.scrollTop-f.y-d.y;return{x:h,y:p,width:u.width,height:u.height}}function kd(e){return dn(e).position==="static"}function Y1(e,t){if(!Pn(e)||dn(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Nn(e)===n&&(n=n.ownerDocument.body),n}function qP(e,t){const n=zt(e);if(Rl(e))return n;if(!Pn(e)){let o=Dr(e);for(;o&&!co(o);){if(fn(o)&&!kd(o))return o;o=Dr(o)}return n}let i=Y1(e,t);for(;i&&VD(i)&&kd(i);)i=Y1(i,t);return i&&co(i)&&kd(i)&&!Gy(i)?n:i||HD(e)||n}const nj=async function(e){const t=this.getOffsetParent||qP,n=this.getDimensions,i=await n(e.floating);return{reference:tj(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function rj(e){return dn(e).direction==="rtl"}const ij={convertOffsetParentRelativeRectToViewportRelativeRect:GD,getDocumentElement:Nn,getClippingRect:JD,getOffsetParent:qP,getElementRects:nj,getClientRects:KD,getDimensions:ej,getScale:so,isElement:fn,isRTL:rj};function oj(e,t){let n=null,i;const o=Nn(e);function a(){var l;clearTimeout(i),(l=n)==null||l.disconnect(),n=null}function u(l,f){l===void 0&&(l=!1),f===void 0&&(f=1),a();const{left:d,top:h,width:p,height:v}=e.getBoundingClientRect();if(l||t(),!p||!v)return;const m=Iu(h),x=Iu(o.clientWidth-(d+p)),w=Iu(o.clientHeight-(h+v)),_=Iu(d),k={rootMargin:-m+"px "+-x+"px "+-w+"px "+-_+"px",threshold:qt(0,Lr(1,f))||1};let E=!0;function C(R){const A=R[0].intersectionRatio;if(A!==f){if(!E)return u();A?u(!1,A):i=setTimeout(()=>{u(!1,1e-7)},1e3)}E=!1}try{n=new IntersectionObserver(C,{...k,root:o.ownerDocument})}catch{n=new IntersectionObserver(C,k)}n.observe(e)}return u(!0),a}function sj(e,t,n,i){i===void 0&&(i={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:u=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:f=!1}=i,d=Yy(e),h=o||a?[...d?Ds(d):[],...Ds(t)]:[];h.forEach(S=>{o&&S.addEventListener("scroll",n,{passive:!0}),a&&S.addEventListener("resize",n)});const p=d&&l?oj(d,n):null;let v=-1,m=null;u&&(m=new ResizeObserver(S=>{let[k]=S;k&&k.target===d&&m&&(m.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var E;(E=m)==null||E.observe(t)})),n()}),d&&!f&&m.observe(d),m.observe(t));let x,w=f?ci(e):null;f&&_();function _(){const S=ci(e);w&&(S.x!==w.x||S.y!==w.y||S.width!==w.width||S.height!==w.height)&&n(),w=S,x=requestAnimationFrame(_)}return n(),()=>{var S;h.forEach(k=>{o&&k.removeEventListener("scroll",n),a&&k.removeEventListener("resize",n)}),p==null||p(),(S=m)==null||S.disconnect(),m=null,f&&cancelAnimationFrame(x)}}const aj=FD,uj=zD,lj=DD,cj=BD,fj=jD,X1=OD,dj=$D,hj=(e,t,n)=>{const i=new Map,o={platform:ij,...n},a={...o.platform,_c:i};return LD(e,t,{...o,platform:a})};var Yu=typeof document<"u"?P.useLayoutEffect:P.useEffect;function al(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,i,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(i=n;i--!==0;)if(!al(e[i],t[i]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(i=n;i--!==0;)if(!{}.hasOwnProperty.call(t,o[i]))return!1;for(i=n;i--!==0;){const a=o[i];if(!(a==="_owner"&&e.$$typeof)&&!al(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function FP(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Q1(e,t){const n=FP(e);return Math.round(t*n)/n}function Rd(e){const t=P.useRef(e);return Yu(()=>{t.current=e}),t}function pj(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:i=[],platform:o,elements:{reference:a,floating:u}={},transform:l=!0,whileElementsMounted:f,open:d}=e,[h,p]=P.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[v,m]=P.useState(i);al(v,i)||m(i);const[x,w]=P.useState(null),[_,S]=P.useState(null),k=P.useCallback(D=>{D!==A.current&&(A.current=D,w(D))},[]),E=P.useCallback(D=>{D!==T.current&&(T.current=D,S(D))},[]),C=a||x,R=u||_,A=P.useRef(null),T=P.useRef(null),L=P.useRef(h),O=f!=null,q=Rd(f),F=Rd(o),$=Rd(d),W=P.useCallback(()=>{if(!A.current||!T.current)return;const D={placement:t,strategy:n,middleware:v};F.current&&(D.platform=F.current),hj(A.current,T.current,D).then(U=>{const K={...U,isPositioned:$.current!==!1};I.current&&!al(L.current,K)&&(L.current=K,Ks.flushSync(()=>{p(K)}))})},[v,t,n,F,$]);Yu(()=>{d===!1&&L.current.isPositioned&&(L.current.isPositioned=!1,p(D=>({...D,isPositioned:!1})))},[d]);const I=P.useRef(!1);Yu(()=>(I.current=!0,()=>{I.current=!1}),[]),Yu(()=>{if(C&&(A.current=C),R&&(T.current=R),C&&R){if(q.current)return q.current(C,R,W);W()}},[C,R,W,q,O]);const H=P.useMemo(()=>({reference:A,floating:T,setReference:k,setFloating:E}),[k,E]),z=P.useMemo(()=>({reference:C,floating:R}),[C,R]),Q=P.useMemo(()=>{const D={position:n,left:0,top:0};if(!z.floating)return D;const U=Q1(z.floating,h.x),K=Q1(z.floating,h.y);return l?{...D,transform:"translate("+U+"px, "+K+"px)",...FP(z.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:U,top:K}},[n,l,z.floating,h.x,h.y]);return P.useMemo(()=>({...h,update:W,refs:H,elements:z,floatingStyles:Q}),[h,W,H,z,Q])}const gj=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:i,padding:o}=typeof e=="function"?e(n):e;return i&&t(i)?i.current!=null?X1({element:i.current,padding:o}).fn(n):{}:i?X1({element:i,padding:o}).fn(n):{}}}},vj=(e,t)=>({...aj(e),options:[e,t]}),mj=(e,t)=>({...uj(e),options:[e,t]}),yj=(e,t)=>({...dj(e),options:[e,t]}),wj=(e,t)=>({...lj(e),options:[e,t]}),xj=(e,t)=>({...cj(e),options:[e,t]}),_j=(e,t)=>({...fj(e),options:[e,t]}),bj=(e,t)=>({...gj(e),options:[e,t]});var Sj="Arrow",zP=P.forwardRef((e,t)=>{const{children:n,width:i=10,height:o=5,...a}=e;return M.jsx(yt.svg,{...a,ref:t,width:i,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:M.jsx("polygon",{points:"0,0 30,0 15,10"})})});zP.displayName=Sj;var Ej=zP;function Cj(e){const[t,n]=P.useState(void 0);return ui(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const i=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const a=o[0];let u,l;if("borderBoxSize"in a){const f=a.borderBoxSize,d=Array.isArray(f)?f[0]:f;u=d.inlineSize,l=d.blockSize}else u=e.offsetWidth,l=e.offsetHeight;n({width:u,height:l})});return i.observe(e,{box:"border-box"}),()=>i.unobserve(e)}else n(void 0)},[e]),t}var Qy="Popper",[$P,BP]=jy(Qy),[kj,VP]=$P(Qy),HP=e=>{const{__scopePopper:t,children:n}=e,[i,o]=P.useState(null);return M.jsx(kj,{scope:t,anchor:i,onAnchorChange:o,children:n})};HP.displayName=Qy;var UP="PopperAnchor",WP=P.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:i,...o}=e,a=VP(UP,n),u=P.useRef(null),l=pn(t,u);return P.useEffect(()=>{a.onAnchorChange((i==null?void 0:i.current)||u.current)}),i?null:M.jsx(yt.div,{...o,ref:l})});WP.displayName=UP;var Zy="PopperContent",[Rj,Pj]=$P(Zy),GP=P.forwardRef((e,t)=>{var ne,re,se,de,fe,he;const{__scopePopper:n,side:i="bottom",sideOffset:o=0,align:a="center",alignOffset:u=0,arrowPadding:l=0,avoidCollisions:f=!0,collisionBoundary:d=[],collisionPadding:h=0,sticky:p="partial",hideWhenDetached:v=!1,updatePositionStrategy:m="optimized",onPlaced:x,...w}=e,_=VP(Zy,n),[S,k]=P.useState(null),E=pn(t,ge=>k(ge)),[C,R]=P.useState(null),A=Cj(C),T=(A==null?void 0:A.width)??0,L=(A==null?void 0:A.height)??0,O=i+(a!=="center"?"-"+a:""),q=typeof h=="number"?h:{top:0,right:0,bottom:0,left:0,...h},F=Array.isArray(d)?d:[d],$=F.length>0,W={padding:q,boundary:F.filter(Tj),altBoundary:$},{refs:I,floatingStyles:H,placement:z,isPositioned:Q,middlewareData:D}=pj({strategy:"fixed",placement:O,whileElementsMounted:(...ge)=>sj(...ge,{animationFrame:m==="always"}),elements:{reference:_.anchor},middleware:[vj({mainAxis:o+L,alignmentAxis:u}),f&&mj({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?yj():void 0,...W}),f&&wj({...W}),xj({...W,apply:({elements:ge,rects:be,availableWidth:we,availableHeight:De})=>{const{width:Ce,height:it}=be.reference,Ke=ge.floating.style;Ke.setProperty("--radix-popper-available-width",`${we}px`),Ke.setProperty("--radix-popper-available-height",`${De}px`),Ke.setProperty("--radix-popper-anchor-width",`${Ce}px`),Ke.setProperty("--radix-popper-anchor-height",`${it}px`)}}),C&&bj({element:C,padding:l}),Mj({arrowWidth:T,arrowHeight:L}),v&&_j({strategy:"referenceHidden",...W})]}),[U,K]=XP(z),j=Ir(x);ui(()=>{Q&&(j==null||j())},[Q,j]);const X=(ne=D.arrow)==null?void 0:ne.x,oe=(re=D.arrow)==null?void 0:re.y,V=((se=D.arrow)==null?void 0:se.centerOffset)!==0,[G,Z]=P.useState();return ui(()=>{S&&Z(window.getComputedStyle(S).zIndex)},[S]),M.jsx("div",{ref:I.setFloating,"data-radix-popper-content-wrapper":"",style:{...H,transform:Q?H.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:G,"--radix-popper-transform-origin":[(de=D.transformOrigin)==null?void 0:de.x,(fe=D.transformOrigin)==null?void 0:fe.y].join(" "),...((he=D.hide)==null?void 0:he.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:M.jsx(Rj,{scope:n,placedSide:U,onArrowChange:R,arrowX:X,arrowY:oe,shouldHideArrow:V,children:M.jsx(yt.div,{"data-side":U,"data-align":K,...w,ref:E,style:{...w.style,animation:Q?void 0:"none"}})})})});GP.displayName=Zy;var KP="PopperArrow",Nj={top:"bottom",right:"left",bottom:"top",left:"right"},YP=P.forwardRef(function(t,n){const{__scopePopper:i,...o}=t,a=Pj(KP,i),u=Nj[a.placedSide];return M.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[u]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:M.jsx(Ej,{...o,ref:n,style:{...o.style,display:"block"}})})});YP.displayName=KP;function Tj(e){return e!==null}var Mj=e=>({name:"transformOrigin",options:e,fn(t){var _,S,k;const{placement:n,rects:i,middlewareData:o}=t,u=((_=o.arrow)==null?void 0:_.centerOffset)!==0,l=u?0:e.arrowWidth,f=u?0:e.arrowHeight,[d,h]=XP(n),p={start:"0%",center:"50%",end:"100%"}[h],v=(((S=o.arrow)==null?void 0:S.x)??0)+l/2,m=(((k=o.arrow)==null?void 0:k.y)??0)+f/2;let x="",w="";return d==="bottom"?(x=u?p:`${v}px`,w=`${-f}px`):d==="top"?(x=u?p:`${v}px`,w=`${i.floating.height+f}px`):d==="right"?(x=`${-f}px`,w=u?p:`${m}px`):d==="left"&&(x=`${i.floating.width+f}px`,w=u?p:`${m}px`),{data:{x,y:w}}}});function XP(e){const[t,n="center"]=e.split("-");return[t,n]}var Aj=HP,Ij=WP,Lj=GP,Oj=YP,Dj="VisuallyHidden",QP=P.forwardRef((e,t)=>M.jsx(yt.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));QP.displayName=Dj;var jj=QP,[Nl,f6]=jy("Tooltip",[BP]),Tl=BP(),ZP="TooltipProvider",qj=700,py="tooltip.open",[Fj,Jy]=Nl(ZP),JP=e=>{const{__scopeTooltip:t,delayDuration:n=qj,skipDelayDuration:i=300,disableHoverableContent:o=!1,children:a}=e,[u,l]=P.useState(!0),f=P.useRef(!1),d=P.useRef(0);return P.useEffect(()=>{const h=d.current;return()=>window.clearTimeout(h)},[]),M.jsx(Fj,{scope:t,isOpenDelayed:u,delayDuration:n,onOpen:P.useCallback(()=>{window.clearTimeout(d.current),l(!1)},[]),onClose:P.useCallback(()=>{window.clearTimeout(d.current),d.current=window.setTimeout(()=>l(!0),i)},[i]),isPointerInTransitRef:f,onPointerInTransitChange:P.useCallback(h=>{f.current=h},[]),disableHoverableContent:o,children:a})};JP.displayName=ZP;var Ml="Tooltip",[zj,Xs]=Nl(Ml),eN=e=>{const{__scopeTooltip:t,children:n,open:i,defaultOpen:o=!1,onOpenChange:a,disableHoverableContent:u,delayDuration:l}=e,f=Jy(Ml,e.__scopeTooltip),d=Tl(t),[h,p]=P.useState(null),v=Wu(),m=P.useRef(0),x=u??f.disableHoverableContent,w=l??f.delayDuration,_=P.useRef(!1),[S=!1,k]=XR({prop:i,defaultProp:o,onChange:T=>{T?(f.onOpen(),document.dispatchEvent(new CustomEvent(py))):f.onClose(),a==null||a(T)}}),E=P.useMemo(()=>S?_.current?"delayed-open":"instant-open":"closed",[S]),C=P.useCallback(()=>{window.clearTimeout(m.current),m.current=0,_.current=!1,k(!0)},[k]),R=P.useCallback(()=>{window.clearTimeout(m.current),m.current=0,k(!1)},[k]),A=P.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>{_.current=!0,k(!0),m.current=0},w)},[w,k]);return P.useEffect(()=>()=>{m.current&&(window.clearTimeout(m.current),m.current=0)},[]),M.jsx(Aj,{...d,children:M.jsx(zj,{scope:t,contentId:v,open:S,stateAttribute:E,trigger:h,onTriggerChange:p,onTriggerEnter:P.useCallback(()=>{f.isOpenDelayed?A():C()},[f.isOpenDelayed,A,C]),onTriggerLeave:P.useCallback(()=>{x?R():(window.clearTimeout(m.current),m.current=0)},[R,x]),onOpen:C,onClose:R,disableHoverableContent:x,children:n})})};eN.displayName=Ml;var gy="TooltipTrigger",tN=P.forwardRef((e,t)=>{const{__scopeTooltip:n,...i}=e,o=Xs(gy,n),a=Jy(gy,n),u=Tl(n),l=P.useRef(null),f=pn(t,l,o.onTriggerChange),d=P.useRef(!1),h=P.useRef(!1),p=P.useCallback(()=>d.current=!1,[]);return P.useEffect(()=>()=>document.removeEventListener("pointerup",p),[p]),M.jsx(Ij,{asChild:!0,...u,children:M.jsx(yt.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...i,ref:f,onPointerMove:Ct(e.onPointerMove,v=>{v.pointerType!=="touch"&&!h.current&&!a.isPointerInTransitRef.current&&(o.onTriggerEnter(),h.current=!0)}),onPointerLeave:Ct(e.onPointerLeave,()=>{o.onTriggerLeave(),h.current=!1}),onPointerDown:Ct(e.onPointerDown,()=>{d.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:Ct(e.onFocus,()=>{d.current||o.onOpen()}),onBlur:Ct(e.onBlur,o.onClose),onClick:Ct(e.onClick,o.onClose)})})});tN.displayName=gy;var e0="TooltipPortal",[$j,Bj]=Nl(e0,{forceMount:void 0}),nN=e=>{const{__scopeTooltip:t,forceMount:n,children:i,container:o}=e,a=Xs(e0,t);return M.jsx($j,{scope:t,forceMount:n,children:M.jsx(xo,{present:n||a.open,children:M.jsx(Fy,{asChild:!0,container:o,children:i})})})};nN.displayName=e0;var fo="TooltipContent",rN=P.forwardRef((e,t)=>{const n=Bj(fo,e.__scopeTooltip),{forceMount:i=n.forceMount,side:o="top",...a}=e,u=Xs(fo,e.__scopeTooltip);return M.jsx(xo,{present:i||u.open,children:u.disableHoverableContent?M.jsx(iN,{side:o,...a,ref:t}):M.jsx(Vj,{side:o,...a,ref:t})})}),Vj=P.forwardRef((e,t)=>{const n=Xs(fo,e.__scopeTooltip),i=Jy(fo,e.__scopeTooltip),o=P.useRef(null),a=pn(t,o),[u,l]=P.useState(null),{trigger:f,onClose:d}=n,h=o.current,{onPointerInTransitChange:p}=i,v=P.useCallback(()=>{l(null),p(!1)},[p]),m=P.useCallback((x,w)=>{const _=x.currentTarget,S={x:x.clientX,y:x.clientY},k=Gj(S,_.getBoundingClientRect()),E=Kj(S,k),C=Yj(w.getBoundingClientRect()),R=Qj([...E,...C]);l(R),p(!0)},[p]);return P.useEffect(()=>()=>v(),[v]),P.useEffect(()=>{if(f&&h){const x=_=>m(_,h),w=_=>m(_,f);return f.addEventListener("pointerleave",x),h.addEventListener("pointerleave",w),()=>{f.removeEventListener("pointerleave",x),h.removeEventListener("pointerleave",w)}}},[f,h,m,v]),P.useEffect(()=>{if(u){const x=w=>{const _=w.target,S={x:w.clientX,y:w.clientY},k=(f==null?void 0:f.contains(_))||(h==null?void 0:h.contains(_)),E=!Xj(S,u);k?v():E&&(v(),d())};return document.addEventListener("pointermove",x),()=>document.removeEventListener("pointermove",x)}},[f,h,u,d,v]),M.jsx(iN,{...e,ref:a})}),[Hj,Uj]=Nl(Ml,{isInside:!1}),iN=P.forwardRef((e,t)=>{const{__scopeTooltip:n,children:i,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:u,...l}=e,f=Xs(fo,n),d=Tl(n),{onClose:h}=f;return P.useEffect(()=>(document.addEventListener(py,h),()=>document.removeEventListener(py,h)),[h]),P.useEffect(()=>{if(f.trigger){const p=v=>{const m=v.target;m!=null&&m.contains(f.trigger)&&h()};return window.addEventListener("scroll",p,{capture:!0}),()=>window.removeEventListener("scroll",p,{capture:!0})}},[f.trigger,h]),M.jsx(qy,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:u,onFocusOutside:p=>p.preventDefault(),onDismiss:h,children:M.jsxs(Lj,{"data-state":f.stateAttribute,...d,...l,ref:t,style:{...l.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[M.jsx(jR,{children:i}),M.jsx(Hj,{scope:n,isInside:!0,children:M.jsx(jj,{id:f.contentId,role:"tooltip",children:o||i})})]})})});rN.displayName=fo;var oN="TooltipArrow",Wj=P.forwardRef((e,t)=>{const{__scopeTooltip:n,...i}=e,o=Tl(n);return Uj(oN,n).isInside?null:M.jsx(Oj,{...o,...i,ref:t})});Wj.displayName=oN;function Gj(e,t){const n=Math.abs(t.top-e.y),i=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,i,o,a)){case a:return"left";case o:return"right";case n:return"top";case i:return"bottom";default:throw new Error("unreachable")}}function Kj(e,t,n=5){const i=[];switch(t){case"top":i.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":i.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":i.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":i.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return i}function Yj(e){const{top:t,right:n,bottom:i,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:i},{x:o,y:i}]}function Xj(e,t){const{x:n,y:i}=e;let o=!1;for(let a=0,u=t.length-1;a<t.length;u=a++){const l=t[a].x,f=t[a].y,d=t[u].x,h=t[u].y;f>i!=h>i&&n<(d-l)*(i-f)/(h-f)+l&&(o=!o)}return o}function Qj(e){const t=e.slice();return t.sort((n,i)=>n.x<i.x?-1:n.x>i.x?1:n.y<i.y?-1:n.y>i.y?1:0),Zj(t)}function Zj(e){if(e.length<=1)return e.slice();const t=[];for(let i=0;i<e.length;i++){const o=e[i];for(;t.length>=2;){const a=t[t.length-1],u=t[t.length-2];if((a.x-u.x)*(o.y-u.y)>=(a.y-u.y)*(o.x-u.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let i=e.length-1;i>=0;i--){const o=e[i];for(;n.length>=2;){const a=n[n.length-1],u=n[n.length-2];if((a.x-u.x)*(o.y-u.y)>=(a.y-u.y)*(o.x-u.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var Jj=JP,eq=eN,tq=tN,nq=nN,sN=rN;const rq=Jj,iq=eq,oq=tq,aN=P.forwardRef(({className:e,sideOffset:t=4,...n},i)=>M.jsx(nq,{children:M.jsx(sN,{ref:i,sideOffset:t,className:Ae("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));aN.displayName=sN.displayName;const sq="sidebar:state",aq=60*60*24*7,uq="16rem",lq="18rem",cq="3rem",fq="b",uN=P.createContext(null);function Al(){const e=P.useContext(uN);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}const lN=P.forwardRef(({defaultOpen:e=!0,open:t,onOpenChange:n,className:i,style:o,children:a,...u},l)=>{const f=hL(),[d,h]=P.useState(!1),[p,v]=P.useState(e),m=t??p,x=P.useCallback(k=>{const E=typeof k=="function"?k(m):k;n?n(E):v(E),document.cookie=`${sq}=${E}; path=/; max-age=${aq}`},[n,m]),w=P.useCallback(()=>f?h(k=>!k):x(k=>!k),[f,x,h]);P.useEffect(()=>{const k=E=>{E.key===fq&&(E.metaKey||E.ctrlKey)&&(E.preventDefault(),w())};return window.addEventListener("keydown",k),()=>window.removeEventListener("keydown",k)},[w]);const _=m?"expanded":"collapsed",S=P.useMemo(()=>({state:_,open:m,setOpen:x,isMobile:f,openMobile:d,setOpenMobile:h,toggleSidebar:w}),[_,m,x,f,d,h,w]);return M.jsx(uN.Provider,{value:S,children:M.jsx(rq,{delayDuration:0,children:M.jsx("div",{style:{"--sidebar-width":uq,"--sidebar-width-icon":cq,...o},className:Ae("group/sidebar-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-sidebar",i),ref:l,...u,children:a})})})});lN.displayName="SidebarProvider";const cN=P.forwardRef(({side:e="left",variant:t="sidebar",collapsible:n="offcanvas",className:i,children:o,...a},u)=>{const{isMobile:l,state:f,openMobile:d,setOpenMobile:h}=Al();return n==="none"?M.jsx("div",{className:Ae("flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",i),ref:u,...a,children:o}):l?M.jsx(_D,{open:d,onOpenChange:h,...a,children:M.jsx(TP,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":lq},side:e,children:M.jsx("div",{className:"flex h-full w-full flex-col",children:o})})}):M.jsxs("div",{ref:u,className:"group peer hidden md:block text-sidebar-foreground","data-state":f,"data-collapsible":f==="collapsed"?n:"","data-variant":t,"data-side":e,children:[M.jsx("div",{className:Ae("duration-200 relative h-svh w-[--sidebar-width] bg-transparent transition-[width] ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",t==="floating"||t==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon]")}),M.jsx("div",{className:Ae("duration-200 fixed inset-y-0 z-10 hidden h-svh w-[--sidebar-width] transition-[left,right,width] ease-linear md:flex",e==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",t==="floating"||t==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l",i),...a,children:M.jsx("div",{"data-sidebar":"sidebar",className:"flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow",children:o})})]})});cN.displayName="Sidebar";const dq=P.forwardRef(({className:e,onClick:t,...n},i)=>{const{toggleSidebar:o}=Al();return M.jsxs(UR,{ref:i,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:Ae("h-7 w-7",e),onClick:a=>{t==null||t(a),o()},...n,children:[M.jsx(aL,{}),M.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})});dq.displayName="SidebarTrigger";const hq=P.forwardRef(({className:e,...t},n)=>{const{toggleSidebar:i}=Al();return M.jsx("button",{ref:n,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:i,title:"Toggle Sidebar",className:Ae("absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex","[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...t})});hq.displayName="SidebarRail";const pq=P.forwardRef(({className:e,...t},n)=>M.jsx("main",{ref:n,className:Ae("relative flex min-h-svh flex-1 flex-col bg-background","peer-data-[variant=inset]:min-h-[calc(100svh-theme(spacing.4))] md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow",e),...t}));pq.displayName="SidebarInset";const gq=P.forwardRef(({className:e,...t},n)=>M.jsx(WR,{ref:n,"data-sidebar":"input",className:Ae("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",e),...t}));gq.displayName="SidebarInput";const fN=P.forwardRef(({className:e,...t},n)=>M.jsx("div",{ref:n,"data-sidebar":"header",className:Ae("flex flex-col gap-2 p-2",e),...t}));fN.displayName="SidebarHeader";const dN=P.forwardRef(({className:e,...t},n)=>M.jsx("div",{ref:n,"data-sidebar":"footer",className:Ae("flex flex-col gap-2 p-2",e),...t}));dN.displayName="SidebarFooter";const vq=P.forwardRef(({className:e,...t},n)=>M.jsx(YR,{ref:n,"data-sidebar":"separator",className:Ae("mx-2 w-auto bg-sidebar-border",e),...t}));vq.displayName="SidebarSeparator";const hN=P.forwardRef(({className:e,...t},n)=>M.jsx("div",{ref:n,"data-sidebar":"content",className:Ae("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t}));hN.displayName="SidebarContent";const pN=P.forwardRef(({className:e,...t},n)=>M.jsx("div",{ref:n,"data-sidebar":"group",className:Ae("relative flex w-full min-w-0 flex-col p-2",e),...t}));pN.displayName="SidebarGroup";const gN=P.forwardRef(({className:e,asChild:t=!1,...n},i)=>{const o=t?Jn:"div";return M.jsx(o,{ref:i,"data-sidebar":"group-label",className:Ae("duration-200 flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opa] ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",e),...n})});gN.displayName="SidebarGroupLabel";const mq=P.forwardRef(({className:e,asChild:t=!1,...n},i)=>{const o=t?Jn:"button";return M.jsx(o,{ref:i,"data-sidebar":"group-action",className:Ae("absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","group-data-[collapsible=icon]:hidden",e),...n})});mq.displayName="SidebarGroupAction";const vN=P.forwardRef(({className:e,...t},n)=>M.jsx("div",{ref:n,"data-sidebar":"group-content",className:Ae("w-full text-sm",e),...t}));vN.displayName="SidebarGroupContent";const mN=P.forwardRef(({className:e,...t},n)=>M.jsx("ul",{ref:n,"data-sidebar":"menu",className:Ae("flex w-full min-w-0 flex-col gap-1",e),...t}));mN.displayName="SidebarMenu";const yN=P.forwardRef(({className:e,...t},n)=>M.jsx("li",{ref:n,"data-sidebar":"menu-item",className:Ae("group/menu-item relative",e),...t}));yN.displayName="SidebarMenuItem";const yq=El("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:!p-0"}},defaultVariants:{variant:"default",size:"default"}}),wN=P.forwardRef(({asChild:e=!1,isActive:t=!1,variant:n="default",size:i="default",tooltip:o,className:a,...u},l)=>{const f=e?Jn:"button",{isMobile:d,state:h}=Al(),p=M.jsx(f,{ref:l,"data-sidebar":"menu-button","data-size":i,"data-active":t,className:Ae(yq({variant:n,size:i}),a),...u});return o?(typeof o=="string"&&(o={children:o}),M.jsxs(iq,{children:[M.jsx(oq,{asChild:!0,children:p}),M.jsx(aN,{side:"right",align:"center",hidden:h!=="collapsed"||d,...o})]})):p});wN.displayName="SidebarMenuButton";const wq=P.forwardRef(({className:e,asChild:t=!1,showOnHover:n=!1,...i},o)=>{const a=t?Jn:"button";return M.jsx(a,{ref:o,"data-sidebar":"menu-action",className:Ae("absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",n&&"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",e),...i})});wq.displayName="SidebarMenuAction";const xq=P.forwardRef(({className:e,...t},n)=>M.jsx("div",{ref:n,"data-sidebar":"menu-badge",className:Ae("absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground select-none pointer-events-none","peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",e),...t}));xq.displayName="SidebarMenuBadge";const _q=P.forwardRef(({className:e,showIcon:t=!1,...n},i)=>{const o=P.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return M.jsxs("div",{ref:i,"data-sidebar":"menu-skeleton",className:Ae("rounded-md h-8 flex gap-2 px-2 items-center",e),...n,children:[t&&M.jsx(V1,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),M.jsx(V1,{className:"h-4 flex-1 max-w-[--skeleton-width]","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":o}})]})});_q.displayName="SidebarMenuSkeleton";const bq=P.forwardRef(({className:e,...t},n)=>M.jsx("ul",{ref:n,"data-sidebar":"menu-sub",className:Ae("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",e),...t}));bq.displayName="SidebarMenuSub";const Sq=P.forwardRef(({...e},t)=>M.jsx("li",{ref:t,...e}));Sq.displayName="SidebarMenuSubItem";const Eq=P.forwardRef(({asChild:e=!1,size:t="md",isActive:n,className:i,...o},a)=>{const u=e?Jn:"a";return M.jsx(u,{ref:a,"data-sidebar":"menu-sub-button","data-size":t,"data-active":n,className:Ae("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",t==="sm"&&"text-xs",t==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",i),...o})});Eq.displayName="SidebarMenuSubButton";const Cq=()=>{const{workflows:e}=ZI(),t=YI(),n=i=>!!t({to:"/workflow/$id",params:{id:i}});return M.jsxs(cN,{children:[M.jsx(fN,{}),M.jsx(hN,{children:M.jsxs(pN,{children:[M.jsx(gN,{children:"Workflows"}),M.jsx(vN,{children:M.jsx(mN,{children:e.map(i=>M.jsx(yN,{children:M.jsx(wN,{asChild:!0,className:"cursor-pointer",isActive:n(i.id),children:M.jsxs(HI,{to:"/workflow/$id",params:{id:i.id},className:"flex items-center gap-2","data-testid":i.id,children:[M.jsx(fL,{}),M.jsx("span",{children:i.name})]})})},i.id))})})]})}),M.jsx(dN,{})]})},kq=({children:e})=>M.jsxs(lN,{children:[M.jsx(Cq,{}),e]}),Rq=()=>null,Pq=()=>M.jsxs(kq,{children:[M.jsx(OR,{}),M.jsx(P.Suspense,{children:M.jsx(Rq,{})})]}),t0=qI({component:Pq}),Nq=AR("/")({component:Tq});function Tq(){return M.jsx("div",{className:"flex items-center justify-center h-full",children:M.jsx("p",{className:"text-gray-500",children:"Select a workflow"})})}function et(e){if(typeof e=="string"||typeof e=="number")return""+e;let t="";if(Array.isArray(e))for(let n=0,i;n<e.length;n++)(i=et(e[n]))!==""&&(t+=(t&&" ")+i);else for(let n in e)e[n]&&(t+=(t&&" ")+n);return t}var Mq={value:()=>{}};function Il(){for(var e=0,t=arguments.length,n={},i;e<t;++e){if(!(i=arguments[e]+"")||i in n||/[\s.]/.test(i))throw new Error("illegal type: "+i);n[i]=[]}return new Xu(n)}function Xu(e){this._=e}function Aq(e,t){return e.trim().split(/^|\s+/).map(function(n){var i="",o=n.indexOf(".");if(o>=0&&(i=n.slice(o+1),n=n.slice(0,o)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:i}})}Xu.prototype=Il.prototype={constructor:Xu,on:function(e,t){var n=this._,i=Aq(e+"",n),o,a=-1,u=i.length;if(arguments.length<2){for(;++a<u;)if((o=(e=i[a]).type)&&(o=Iq(n[o],e.name)))return o;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++a<u;)if(o=(e=i[a]).type)n[o]=Z1(n[o],e.name,t);else if(t==null)for(o in n)n[o]=Z1(n[o],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new Xu(e)},call:function(e,t){if((o=arguments.length-2)>0)for(var n=new Array(o),i=0,o,a;i<o;++i)n[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(a=this._[e],i=0,o=a.length;i<o;++i)a[i].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var i=this._[e],o=0,a=i.length;o<a;++o)i[o].value.apply(t,n)}};function Iq(e,t){for(var n=0,i=e.length,o;n<i;++n)if((o=e[n]).name===t)return o.value}function Z1(e,t,n){for(var i=0,o=e.length;i<o;++i)if(e[i].name===t){e[i]=Mq,e=e.slice(0,i).concat(e.slice(i+1));break}return n!=null&&e.push({name:t,value:n}),e}var vy="http://www.w3.org/1999/xhtml";const J1={svg:"http://www.w3.org/2000/svg",xhtml:vy,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Ll(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),J1.hasOwnProperty(t)?{space:J1[t],local:e}:e}function Lq(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===vy&&t.documentElement.namespaceURI===vy?t.createElement(e):t.createElementNS(n,e)}}function Oq(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function xN(e){var t=Ll(e);return(t.local?Oq:Lq)(t)}function Dq(){}function n0(e){return e==null?Dq:function(){return this.querySelector(e)}}function jq(e){typeof e!="function"&&(e=n0(e));for(var t=this._groups,n=t.length,i=new Array(n),o=0;o<n;++o)for(var a=t[o],u=a.length,l=i[o]=new Array(u),f,d,h=0;h<u;++h)(f=a[h])&&(d=e.call(f,f.__data__,h,a))&&("__data__"in f&&(d.__data__=f.__data__),l[h]=d);return new $t(i,this._parents)}function qq(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function Fq(){return[]}function _N(e){return e==null?Fq:function(){return this.querySelectorAll(e)}}function zq(e){return function(){return qq(e.apply(this,arguments))}}function $q(e){typeof e=="function"?e=zq(e):e=_N(e);for(var t=this._groups,n=t.length,i=[],o=[],a=0;a<n;++a)for(var u=t[a],l=u.length,f,d=0;d<l;++d)(f=u[d])&&(i.push(e.call(f,f.__data__,d,u)),o.push(f));return new $t(i,o)}function bN(e){return function(){return this.matches(e)}}function SN(e){return function(t){return t.matches(e)}}var Bq=Array.prototype.find;function Vq(e){return function(){return Bq.call(this.children,e)}}function Hq(){return this.firstElementChild}function Uq(e){return this.select(e==null?Hq:Vq(typeof e=="function"?e:SN(e)))}var Wq=Array.prototype.filter;function Gq(){return Array.from(this.children)}function Kq(e){return function(){return Wq.call(this.children,e)}}function Yq(e){return this.selectAll(e==null?Gq:Kq(typeof e=="function"?e:SN(e)))}function Xq(e){typeof e!="function"&&(e=bN(e));for(var t=this._groups,n=t.length,i=new Array(n),o=0;o<n;++o)for(var a=t[o],u=a.length,l=i[o]=[],f,d=0;d<u;++d)(f=a[d])&&e.call(f,f.__data__,d,a)&&l.push(f);return new $t(i,this._parents)}function EN(e){return new Array(e.length)}function Qq(){return new $t(this._enter||this._groups.map(EN),this._parents)}function ul(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}ul.prototype={constructor:ul,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 Zq(e){return function(){return e}}function Jq(e,t,n,i,o,a){for(var u=0,l,f=t.length,d=a.length;u<d;++u)(l=t[u])?(l.__data__=a[u],i[u]=l):n[u]=new ul(e,a[u]);for(;u<f;++u)(l=t[u])&&(o[u]=l)}function e3(e,t,n,i,o,a,u){var l,f,d=new Map,h=t.length,p=a.length,v=new Array(h),m;for(l=0;l<h;++l)(f=t[l])&&(v[l]=m=u.call(f,f.__data__,l,t)+"",d.has(m)?o[l]=f:d.set(m,f));for(l=0;l<p;++l)m=u.call(e,a[l],l,a)+"",(f=d.get(m))?(i[l]=f,f.__data__=a[l],d.delete(m)):n[l]=new ul(e,a[l]);for(l=0;l<h;++l)(f=t[l])&&d.get(v[l])===f&&(o[l]=f)}function t3(e){return e.__data__}function n3(e,t){if(!arguments.length)return Array.from(this,t3);var n=t?e3:Jq,i=this._parents,o=this._groups;typeof e!="function"&&(e=Zq(e));for(var a=o.length,u=new Array(a),l=new Array(a),f=new Array(a),d=0;d<a;++d){var h=i[d],p=o[d],v=p.length,m=r3(e.call(h,h&&h.__data__,d,i)),x=m.length,w=l[d]=new Array(x),_=u[d]=new Array(x),S=f[d]=new Array(v);n(h,p,w,_,S,m,t);for(var k=0,E=0,C,R;k<x;++k)if(C=w[k]){for(k>=E&&(E=k+1);!(R=_[E])&&++E<x;);C._next=R||null}}return u=new $t(u,i),u._enter=l,u._exit=f,u}function r3(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function i3(){return new $t(this._exit||this._groups.map(EN),this._parents)}function o3(e,t,n){var i=this.enter(),o=this,a=this.exit();return typeof e=="function"?(i=e(i),i&&(i=i.selection())):i=i.append(e+""),t!=null&&(o=t(o),o&&(o=o.selection())),n==null?a.remove():n(a),i&&o?i.merge(o).order():o}function s3(e){for(var t=e.selection?e.selection():e,n=this._groups,i=t._groups,o=n.length,a=i.length,u=Math.min(o,a),l=new Array(o),f=0;f<u;++f)for(var d=n[f],h=i[f],p=d.length,v=l[f]=new Array(p),m,x=0;x<p;++x)(m=d[x]||h[x])&&(v[x]=m);for(;f<o;++f)l[f]=n[f];return new $t(l,this._parents)}function a3(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var i=e[t],o=i.length-1,a=i[o],u;--o>=0;)(u=i[o])&&(a&&u.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(u,a),a=u);return this}function u3(e){e||(e=l3);function t(p,v){return p&&v?e(p.__data__,v.__data__):!p-!v}for(var n=this._groups,i=n.length,o=new Array(i),a=0;a<i;++a){for(var u=n[a],l=u.length,f=o[a]=new Array(l),d,h=0;h<l;++h)(d=u[h])&&(f[h]=d);f.sort(t)}return new $t(o,this._parents).order()}function l3(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function c3(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function f3(){return Array.from(this)}function d3(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var i=e[t],o=0,a=i.length;o<a;++o){var u=i[o];if(u)return u}return null}function h3(){let e=0;for(const t of this)++e;return e}function p3(){return!this.node()}function g3(e){for(var t=this._groups,n=0,i=t.length;n<i;++n)for(var o=t[n],a=0,u=o.length,l;a<u;++a)(l=o[a])&&e.call(l,l.__data__,a,o);return this}function v3(e){return function(){this.removeAttribute(e)}}function m3(e){return function(){this.removeAttributeNS(e.space,e.local)}}function y3(e,t){return function(){this.setAttribute(e,t)}}function w3(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function x3(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function _3(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 b3(e,t){var n=Ll(e);if(arguments.length<2){var i=this.node();return n.local?i.getAttributeNS(n.space,n.local):i.getAttribute(n)}return this.each((t==null?n.local?m3:v3:typeof t=="function"?n.local?_3:x3:n.local?w3:y3)(n,t))}function CN(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function S3(e){return function(){this.style.removeProperty(e)}}function E3(e,t,n){return function(){this.style.setProperty(e,t,n)}}function C3(e,t,n){return function(){var i=t.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,n)}}function k3(e,t,n){return arguments.length>1?this.each((t==null?S3:typeof t=="function"?C3:E3)(e,t,n??"")):ho(this.node(),e)}function ho(e,t){return e.style.getPropertyValue(t)||CN(e).getComputedStyle(e,null).getPropertyValue(t)}function R3(e){return function(){delete this[e]}}function P3(e,t){return function(){this[e]=t}}function N3(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function T3(e,t){return arguments.length>1?this.each((t==null?R3:typeof t=="function"?N3:P3)(e,t)):this.node()[e]}function kN(e){return e.trim().split(/^|\s+/)}function r0(e){return e.classList||new RN(e)}function RN(e){this._node=e,this._names=kN(e.getAttribute("class")||"")}RN.prototype={add:function(e){var t=this._names.indexOf(e);t<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 PN(e,t){for(var n=r0(e),i=-1,o=t.length;++i<o;)n.add(t[i])}function NN(e,t){for(var n=r0(e),i=-1,o=t.length;++i<o;)n.remove(t[i])}function M3(e){return function(){PN(this,e)}}function A3(e){return function(){NN(this,e)}}function I3(e,t){return function(){(t.apply(this,arguments)?PN:NN)(this,e)}}function L3(e,t){var n=kN(e+"");if(arguments.length<2){for(var i=r0(this.node()),o=-1,a=n.length;++o<a;)if(!i.contains(n[o]))return!1;return!0}return this.each((typeof t=="function"?I3:t?M3:A3)(n,t))}function O3(){this.textContent=""}function D3(e){return function(){this.textContent=e}}function j3(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function q3(e){return arguments.length?this.each(e==null?O3:(typeof e=="function"?j3:D3)(e)):this.node().textContent}function F3(){this.innerHTML=""}function z3(e){return function(){this.innerHTML=e}}function $3(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function B3(e){return arguments.length?this.each(e==null?F3:(typeof e=="function"?$3:z3)(e)):this.node().innerHTML}function V3(){this.nextSibling&&this.parentNode.appendChild(this)}function H3(){return this.each(V3)}function U3(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function W3(){return this.each(U3)}function G3(e){var t=typeof e=="function"?e:xN(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function K3(){return null}function Y3(e,t){var n=typeof e=="function"?e:xN(e),i=t==null?K3:typeof t=="function"?t:n0(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),i.apply(this,arguments)||null)})}function X3(){var e=this.parentNode;e&&e.removeChild(this)}function Q3(){return this.each(X3)}function Z3(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function J3(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function eF(e){return this.select(e?J3:Z3)}function tF(e){return arguments.length?this.property("__data__",e):this.node().__data__}function nF(e){return function(t){e.call(this,t,this.__data__)}}function rF(e){return e.trim().split(/^|\s+/).map(function(t){var n="",i=t.indexOf(".");return i>=0&&(n=t.slice(i+1),t=t.slice(0,i)),{type:t,name:n}})}function iF(e){return function(){var t=this.__on;if(t){for(var n=0,i=-1,o=t.length,a;n<o;++n)a=t[n],(!e.type||a.type===e.type)&&a.name===e.name?this.removeEventListener(a.type,a.listener,a.options):t[++i]=a;++i?t.length=i:delete this.__on}}}function oF(e,t,n){return function(){var i=this.__on,o,a=nF(t);if(i){for(var u=0,l=i.length;u<l;++u)if((o=i[u]).type===e.type&&o.name===e.name){this.removeEventListener(o.type,o.listener,o.options),this.addEventListener(o.type,o.listener=a,o.options=n),o.value=t;return}}this.addEventListener(e.type,a,n),o={type:e.type,name:e.name,value:t,listener:a,options:n},i?i.push(o):this.__on=[o]}}function sF(e,t,n){var i=rF(e+""),o,a=i.length,u;if(arguments.length<2){var l=this.node().__on;if(l){for(var f=0,d=l.length,h;f<d;++f)for(o=0,h=l[f];o<a;++o)if((u=i[o]).type===h.type&&u.name===h.name)return h.value}return}for(l=t?oF:iF,o=0;o<a;++o)this.each(l(i[o],t,n));return this}function TN(e,t,n){var i=CN(e),o=i.CustomEvent;typeof o=="function"?o=new o(t,n):(o=i.document.createEvent("Event"),n?(o.initEvent(t,n.bubbles,n.cancelable),o.detail=n.detail):o.initEvent(t,!1,!1)),e.dispatchEvent(o)}function aF(e,t){return function(){return TN(this,e,t)}}function uF(e,t){return function(){return TN(this,e,t.apply(this,arguments))}}function lF(e,t){return this.each((typeof t=="function"?uF:aF)(e,t))}function*cF(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var i=e[t],o=0,a=i.length,u;o<a;++o)(u=i[o])&&(yield u)}var MN=[null];function $t(e,t){this._groups=e,this._parents=t}function Qs(){return new $t([[document.documentElement]],MN)}function fF(){return this}$t.prototype=Qs.prototype={constructor:$t,select:jq,selectAll:$q,selectChild:Uq,selectChildren:Yq,filter:Xq,data:n3,enter:Qq,exit:i3,join:o3,merge:s3,selection:fF,order:a3,sort:u3,call:c3,nodes:f3,node:d3,size:h3,empty:p3,each:g3,attr:b3,style:k3,property:T3,classed:L3,text:q3,html:B3,raise:H3,lower:W3,append:G3,insert:Y3,remove:Q3,clone:eF,datum:tF,on:sF,dispatch:lF,[Symbol.iterator]:cF};function Ft(e){return typeof e=="string"?new $t([[document.querySelector(e)]],[document.documentElement]):new $t([[e]],MN)}function dF(e){let t;for(;t=e.sourceEvent;)e=t;return e}function un(e,t){if(e=dF(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var i=n.createSVGPoint();return i.x=e.clientX,i.y=e.clientY,i=i.matrixTransform(t.getScreenCTM().inverse()),[i.x,i.y]}if(t.getBoundingClientRect){var o=t.getBoundingClientRect();return[e.clientX-o.left-t.clientLeft,e.clientY-o.top-t.clientTop]}}return[e.pageX,e.pageY]}const hF={passive:!1},js={capture:!0,passive:!1};function Pd(e){e.stopImmediatePropagation()}function ao(e){e.preventDefault(),e.stopImmediatePropagation()}function AN(e){var t=e.document.documentElement,n=Ft(e).on("dragstart.drag",ao,js);"onselectstart"in t?n.on("selectstart.drag",ao,js):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function IN(e,t){var n=e.document.documentElement,i=Ft(e).on("dragstart.drag",null);t&&(i.on("click.drag",ao,js),setTimeout(function(){i.on("click.drag",null)},0)),"onselectstart"in n?i.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const Lu=e=>()=>e;function my(e,{sourceEvent:t,subject:n,target:i,identifier:o,active:a,x:u,y:l,dx:f,dy:d,dispatch:h}){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:i,enumerable:!0,configurable:!0},identifier:{value:o,enumerable:!0,configurable:!0},active:{value:a,enumerable:!0,configurable:!0},x:{value:u,enumerable:!0,configurable:!0},y:{value:l,enumerable:!0,configurable:!0},dx:{value:f,enumerable:!0,configurable:!0},dy:{value:d,enumerable:!0,configurable:!0},_:{value:h}})}my.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function pF(e){return!e.ctrlKey&&!e.button}function gF(){return this.parentNode}function vF(e,t){return t??{x:e.x,y:e.y}}function mF(){return navigator.maxTouchPoints||"ontouchstart"in this}function LN(){var e=pF,t=gF,n=vF,i=mF,o={},a=Il("start","drag","end"),u=0,l,f,d,h,p=0;function v(C){C.on("mousedown.drag",m).filter(i).on("touchstart.drag",_).on("touchmove.drag",S,hF).on("touchend.drag touchcancel.drag",k).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function m(C,R){if(!(h||!e.call(this,C,R))){var A=E(this,t.call(this,C,R),C,R,"mouse");A&&(Ft(C.view).on("mousemove.drag",x,js).on("mouseup.drag",w,js),AN(C.view),Pd(C),d=!1,l=C.clientX,f=C.clientY,A("start",C))}}function x(C){if(ao(C),!d){var R=C.clientX-l,A=C.clientY-f;d=R*R+A*A>p}o.mouse("drag",C)}function w(C){Ft(C.view).on("mousemove.drag mouseup.drag",null),IN(C.view,d),ao(C),o.mouse("end",C)}function _(C,R){if(e.call(this,C,R)){var A=C.changedTouches,T=t.call(this,C,R),L=A.length,O,q;for(O=0;O<L;++O)(q=E(this,T,C,R,A[O].identifier,A[O]))&&(Pd(C),q("start",C,A[O]))}}function S(C){var R=C.changedTouches,A=R.length,T,L;for(T=0;T<A;++T)(L=o[R[T].identifier])&&(ao(C),L("drag",C,R[T]))}function k(C){var R=C.changedTouches,A=R.length,T,L;for(h&&clearTimeout(h),h=setTimeout(function(){h=null},500),T=0;T<A;++T)(L=o[R[T].identifier])&&(Pd(C),L("end",C,R[T]))}function E(C,R,A,T,L,O){var q=a.copy(),F=un(O||A,R),$,W,I;if((I=n.call(C,new my("beforestart",{sourceEvent:A,target:v,identifier:L,active:u,x:F[0],y:F[1],dx:0,dy:0,dispatch:q}),T))!=null)return $=I.x-F[0]||0,W=I.y-F[1]||0,function H(z,Q,D){var U=F,K;switch(z){case"start":o[L]=H,K=u++;break;case"end":delete o[L],--u;case"drag":F=un(D||Q,R),K=u;break}q.call(z,C,new my(z,{sourceEvent:Q,subject:I,target:v,identifier:L,active:K,x:F[0]+$,y:F[1]+W,dx:F[0]-U[0],dy:F[1]-U[1],dispatch:q}),T)}}return v.filter=function(C){return arguments.length?(e=typeof C=="function"?C:Lu(!!C),v):e},v.container=function(C){return arguments.length?(t=typeof C=="function"?C:Lu(C),v):t},v.subject=function(C){return arguments.length?(n=typeof C=="function"?C:Lu(C),v):n},v.touchable=function(C){return arguments.length?(i=typeof C=="function"?C:Lu(!!C),v):i},v.on=function(){var C=a.on.apply(a,arguments);return C===a?v:C},v.clickDistance=function(C){return arguments.length?(p=(C=+C)*C,v):Math.sqrt(p)},v}function i0(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function ON(e,t){var n=Object.create(e.prototype);for(var i in t)n[i]=t[i];return n}function Zs(){}var qs=.7,ll=1/qs,uo="\\s*([+-]?\\d+)\\s*",Fs="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Rn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",yF=/^#([0-9a-f]{3,8})$/,wF=new RegExp(`^rgb\\(${uo},${uo},${uo}\\)$`),xF=new RegExp(`^rgb\\(${Rn},${Rn},${Rn}\\)$`),_F=new RegExp(`^rgba\\(${uo},${uo},${uo},${Fs}\\)$`),bF=new RegExp(`^rgba\\(${Rn},${Rn},${Rn},${Fs}\\)$`),SF=new RegExp(`^hsl\\(${Fs},${Rn},${Rn}\\)$`),EF=new RegExp(`^hsla\\(${Fs},${Rn},${Rn},${Fs}\\)$`),e_={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};i0(Zs,zs,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:t_,formatHex:t_,formatHex8:CF,formatHsl:kF,formatRgb:n_,toString:n_});function t_(){return this.rgb().formatHex()}function CF(){return this.rgb().formatHex8()}function kF(){return DN(this).formatHsl()}function n_(){return this.rgb().formatRgb()}function zs(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=yF.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?r_(t):n===3?new kt(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Ou(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Ou(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=wF.exec(e))?new kt(t[1],t[2],t[3],1):(t=xF.exec(e))?new kt(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=_F.exec(e))?Ou(t[1],t[2],t[3],t[4]):(t=bF.exec(e))?Ou(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=SF.exec(e))?s_(t[1],t[2]/100,t[3]/100,1):(t=EF.exec(e))?s_(t[1],t[2]/100,t[3]/100,t[4]):e_.hasOwnProperty(e)?r_(e_[e]):e==="transparent"?new kt(NaN,NaN,NaN,0):null}function r_(e){return new kt(e>>16&255,e>>8&255,e&255,1)}function Ou(e,t,n,i){return i<=0&&(e=t=n=NaN),new kt(e,t,n,i)}function RF(e){return e instanceof Zs||(e=zs(e)),e?(e=e.rgb(),new kt(e.r,e.g,e.b,e.opacity)):new kt}function yy(e,t,n,i){return arguments.length===1?RF(e):new kt(e,t,n,i??1)}function kt(e,t,n,i){this.r=+e,this.g=+t,this.b=+n,this.opacity=+i}i0(kt,yy,ON(Zs,{brighter(e){return e=e==null?ll:Math.pow(ll,e),new kt(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?qs:Math.pow(qs,e),new kt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new kt(oi(this.r),oi(this.g),oi(this.b),cl(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:i_,formatHex:i_,formatHex8:PF,formatRgb:o_,toString:o_}));function i_(){return`#${ri(this.r)}${ri(this.g)}${ri(this.b)}`}function PF(){return`#${ri(this.r)}${ri(this.g)}${ri(this.b)}${ri((isNaN(this.opacity)?1:this.opacity)*255)}`}function o_(){const e=cl(this.opacity);return`${e===1?"rgb(":"rgba("}${oi(this.r)}, ${oi(this.g)}, ${oi(this.b)}${e===1?")":`, ${e})`}`}function cl(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function oi(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function ri(e){return e=oi(e),(e<16?"0":"")+e.toString(16)}function s_(e,t,n,i){return i<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new ln(e,t,n,i)}function DN(e){if(e instanceof ln)return new ln(e.h,e.s,e.l,e.opacity);if(e instanceof Zs||(e=zs(e)),!e)return new ln;if(e instanceof ln)return e;e=e.rgb();var t=e.r/255,n=e.g/255,i=e.b/255,o=Math.min(t,n,i),a=Math.max(t,n,i),u=NaN,l=a-o,f=(a+o)/2;return l?(t===a?u=(n-i)/l+(n<i)*6:n===a?u=(i-t)/l+2:u=(t-n)/l+4,l/=f<.5?a+o:2-a-o,u*=60):l=f>0&&f<1?0:u,new ln(u,l,f,e.opacity)}function NF(e,t,n,i){return arguments.length===1?DN(e):new ln(e,t,n,i??1)}function ln(e,t,n,i){this.h=+e,this.s=+t,this.l=+n,this.opacity=+i}i0(ln,NF,ON(Zs,{brighter(e){return e=e==null?ll:Math.pow(ll,e),new ln(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?qs:Math.pow(qs,e),new ln(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,i=n+(n<.5?n:1-n)*t,o=2*n-i;return new kt(Nd(e>=240?e-240:e+120,o,i),Nd(e,o,i),Nd(e<120?e+240:e-120,o,i),this.opacity)},clamp(){return new ln(a_(this.h),Du(this.s),Du(this.l),cl(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(){const e=cl(this.opacity);return`${e===1?"hsl(":"hsla("}${a_(this.h)}, ${Du(this.s)*100}%, ${Du(this.l)*100}%${e===1?")":`, ${e})`}`}}));function a_(e){return e=(e||0)%360,e<0?e+360:e}function Du(e){return Math.max(0,Math.min(1,e||0))}function Nd(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const jN=e=>()=>e;function TF(e,t){return function(n){return e+n*t}}function MF(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(i){return Math.pow(e+i*t,n)}}function AF(e){return(e=+e)==1?qN:function(t,n){return n-t?MF(t,n,e):jN(isNaN(t)?n:t)}}function qN(e,t){var n=t-e;return n?TF(e,n):jN(isNaN(e)?t:e)}const u_=function e(t){var n=AF(t);function i(o,a){var u=n((o=yy(o)).r,(a=yy(a)).r),l=n(o.g,a.g),f=n(o.b,a.b),d=qN(o.opacity,a.opacity);return function(h){return o.r=u(h),o.g=l(h),o.b=f(h),o.opacity=d(h),o+""}}return i.gamma=e,i}(1);function Tr(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}var wy=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Td=new RegExp(wy.source,"g");function IF(e){return function(){return e}}function LF(e){return function(t){return e(t)+""}}function OF(e,t){var n=wy.lastIndex=Td.lastIndex=0,i,o,a,u=-1,l=[],f=[];for(e=e+"",t=t+"";(i=wy.exec(e))&&(o=Td.exec(t));)(a=o.index)>n&&(a=t.slice(n,a),l[u]?l[u]+=a:l[++u]=a),(i=i[0])===(o=o[0])?l[u]?l[u]+=o:l[++u]=o:(l[++u]=null,f.push({i:u,x:Tr(i,o)})),n=Td.lastIndex;return n<t.length&&(a=t.slice(n),l[u]?l[u]+=a:l[++u]=a),l.length<2?f[0]?LF(f[0].x):IF(t):(t=f.length,function(d){for(var h=0,p;h<t;++h)l[(p=f[h]).i]=p.x(d);return l.join("")})}var l_=180/Math.PI,xy={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function FN(e,t,n,i,o,a){var u,l,f;return(u=Math.sqrt(e*e+t*t))&&(e/=u,t/=u),(f=e*n+t*i)&&(n-=e*f,i-=t*f),(l=Math.sqrt(n*n+i*i))&&(n/=l,i/=l,f/=l),e*i<t*n&&(e=-e,t=-t,f=-f,u=-u),{translateX:o,translateY:a,rotate:Math.atan2(t,e)*l_,skewX:Math.atan(f)*l_,scaleX:u,scaleY:l}}var ju;function DF(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?xy:FN(t.a,t.b,t.c,t.d,t.e,t.f)}function jF(e){return e==null||(ju||(ju=document.createElementNS("http://www.w3.org/2000/svg","g")),ju.setAttribute("transform",e),!(e=ju.transform.baseVal.consolidate()))?xy:(e=e.matrix,FN(e.a,e.b,e.c,e.d,e.e,e.f))}function zN(e,t,n,i){function o(d){return d.length?d.pop()+" ":""}function a(d,h,p,v,m,x){if(d!==p||h!==v){var w=m.push("translate(",null,t,null,n);x.push({i:w-4,x:Tr(d,p)},{i:w-2,x:Tr(h,v)})}else(p||v)&&m.push("translate("+p+t+v+n)}function u(d,h,p,v){d!==h?(d-h>180?h+=360:h-d>180&&(d+=360),v.push({i:p.push(o(p)+"rotate(",null,i)-2,x:Tr(d,h)})):h&&p.push(o(p)+"rotate("+h+i)}function l(d,h,p,v){d!==h?v.push({i:p.push(o(p)+"skewX(",null,i)-2,x:Tr(d,h)}):h&&p.push(o(p)+"skewX("+h+i)}function f(d,h,p,v,m,x){if(d!==p||h!==v){var w=m.push(o(m)+"scale(",null,",",null,")");x.push({i:w-4,x:Tr(d,p)},{i:w-2,x:Tr(h,v)})}else(p!==1||v!==1)&&m.push(o(m)+"scale("+p+","+v+")")}return function(d,h){var p=[],v=[];return d=e(d),h=e(h),a(d.translateX,d.translateY,h.translateX,h.translateY,p,v),u(d.rotate,h.rotate,p,v),l(d.skewX,h.skewX,p,v),f(d.scaleX,d.scaleY,h.scaleX,h.scaleY,p,v),d=h=null,function(m){for(var x=-1,w=v.length,_;++x<w;)p[(_=v[x]).i]=_.x(m);return p.join("")}}}var qF=zN(DF,"px, ","px)","deg)"),FF=zN(jF,", ",")",")"),zF=1e-12;function c_(e){return((e=Math.exp(e))+1/e)/2}function $F(e){return((e=Math.exp(e))-1/e)/2}function BF(e){return((e=Math.exp(2*e))-1)/(e+1)}const VF=function e(t,n,i){function o(a,u){var l=a[0],f=a[1],d=a[2],h=u[0],p=u[1],v=u[2],m=h-l,x=p-f,w=m*m+x*x,_,S;if(w<zF)S=Math.log(v/d)/t,_=function(T){return[l+T*m,f+T*x,d*Math.exp(t*T*S)]};else{var k=Math.sqrt(w),E=(v*v-d*d+i*w)/(2*d*n*k),C=(v*v-d*d-i*w)/(2*v*n*k),R=Math.log(Math.sqrt(E*E+1)-E),A=Math.log(Math.sqrt(C*C+1)-C);S=(A-R)/t,_=function(T){var L=T*S,O=c_(R),q=d/(n*k)*(O*BF(t*L+R)-$F(R));return[l+q*m,f+q*x,d*O/c_(t*L+R)]}}return _.duration=S*1e3*t/Math.SQRT2,_}return o.rho=function(a){var u=Math.max(.001,+a),l=u*u,f=l*l;return e(u,l,f)},o}(Math.SQRT2,2,4);var po=0,Cs=0,xs=0,$N=1e3,fl,ks,dl=0,fi=0,Ol=0,$s=typeof performance=="object"&&performance.now?performance:Date,BN=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function o0(){return fi||(BN(HF),fi=$s.now()+Ol)}function HF(){fi=0}function hl(){this._call=this._time=this._next=null}hl.prototype=VN.prototype={constructor:hl,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?o0():+n)+(t==null?0:+t),!this._next&&ks!==this&&(ks?ks._next=this:fl=this,ks=this),this._call=e,this._time=n,_y()},stop:function(){this._call&&(this._call=null,this._time=1/0,_y())}};function VN(e,t,n){var i=new hl;return i.restart(e,t,n),i}function UF(){o0(),++po;for(var e=fl,t;e;)(t=fi-e._time)>=0&&e._call.call(void 0,t),e=e._next;--po}function f_(){fi=(dl=$s.now())+Ol,po=Cs=0;try{UF()}finally{po=0,GF(),fi=0}}function WF(){var e=$s.now(),t=e-dl;t>$N&&(Ol-=t,dl=e)}function GF(){for(var e,t=fl,n,i=1/0;t;)t._call?(i>t._time&&(i=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:fl=n);ks=e,_y(i)}function _y(e){if(!po){Cs&&(Cs=clearTimeout(Cs));var t=e-fi;t>24?(e<1/0&&(Cs=setTimeout(f_,e-$s.now()-Ol)),xs&&(xs=clearInterval(xs))):(xs||(dl=$s.now(),xs=setInterval(WF,$N)),po=1,BN(f_))}}function d_(e,t,n){var i=new hl;return t=t==null?0:+t,i.restart(o=>{i.stop(),e(o+t)},t,n),i}var KF=Il("start","end","cancel","interrupt"),YF=[],HN=0,h_=1,by=2,Qu=3,p_=4,Sy=5,Zu=6;function Dl(e,t,n,i,o,a){var u=e.__transition;if(!u)e.__transition={};else if(n in u)return;XF(e,n,{name:t,index:i,group:o,on:KF,tween:YF,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:HN})}function s0(e,t){var n=vn(e,t);if(n.state>HN)throw new Error("too late; already scheduled");return n}function Tn(e,t){var n=vn(e,t);if(n.state>Qu)throw new Error("too late; already running");return n}function vn(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function XF(e,t,n){var i=e.__transition,o;i[t]=n,n.timer=VN(a,0,n.time);function a(d){n.state=h_,n.timer.restart(u,n.delay,n.time),n.delay<=d&&u(d-n.delay)}function u(d){var h,p,v,m;if(n.state!==h_)return f();for(h in i)if(m=i[h],m.name===n.name){if(m.state===Qu)return d_(u);m.state===p_?(m.state=Zu,m.timer.stop(),m.on.call("interrupt",e,e.__data__,m.index,m.group),delete i[h]):+h<t&&(m.state=Zu,m.timer.stop(),m.on.call("cancel",e,e.__data__,m.index,m.group),delete i[h])}if(d_(function(){n.state===Qu&&(n.state=p_,n.timer.restart(l,n.delay,n.time),l(d))}),n.state=by,n.on.call("start",e,e.__data__,n.index,n.group),n.state===by){for(n.state=Qu,o=new Array(v=n.tween.length),h=0,p=-1;h<v;++h)(m=n.tween[h].value.call(e,e.__data__,n.index,n.group))&&(o[++p]=m);o.length=p+1}}function l(d){for(var h=d<n.duration?n.ease.call(null,d/n.duration):(n.timer.restart(f),n.state=Sy,1),p=-1,v=o.length;++p<v;)o[p].call(e,h);n.state===Sy&&(n.on.call("end",e,e.__data__,n.index,n.group),f())}function f(){n.state=Zu,n.timer.stop(),delete i[t];for(var d in i)return;delete e.__transition}}function Ju(e,t){var n=e.__transition,i,o,a=!0,u;if(n){t=t==null?null:t+"";for(u in n){if((i=n[u]).name!==t){a=!1;continue}o=i.state>by&&i.state<Sy,i.state=Zu,i.timer.stop(),i.on.call(o?"interrupt":"cancel",e,e.__data__,i.index,i.group),delete n[u]}a&&delete e.__transition}}function QF(e){return this.each(function(){Ju(this,e)})}function ZF(e,t){var n,i;return function(){var o=Tn(this,e),a=o.tween;if(a!==n){i=n=a;for(var u=0,l=i.length;u<l;++u)if(i[u].name===t){i=i.slice(),i.splice(u,1);break}}o.tween=i}}function JF(e,t,n){var i,o;if(typeof n!="function")throw new Error;return function(){var a=Tn(this,e),u=a.tween;if(u!==i){o=(i=u).slice();for(var l={name:t,value:n},f=0,d=o.length;f<d;++f)if(o[f].name===t){o[f]=l;break}f===d&&o.push(l)}a.tween=o}}function ez(e,t){var n=this._id;if(e+="",arguments.length<2){for(var i=vn(this.node(),n).tween,o=0,a=i.length,u;o<a;++o)if((u=i[o]).name===e)return u.value;return null}return this.each((t==null?ZF:JF)(n,e,t))}function a0(e,t,n){var i=e._id;return e.each(function(){var o=Tn(this,i);(o.value||(o.value={}))[t]=n.apply(this,arguments)}),function(o){return vn(o,i).value[t]}}function UN(e,t){var n;return(typeof t=="number"?Tr:t instanceof zs?u_:(n=zs(t))?(t=n,u_):OF)(e,t)}function tz(e){return function(){this.removeAttribute(e)}}function nz(e){return function(){this.removeAttributeNS(e.space,e.local)}}function rz(e,t,n){var i,o=n+"",a;return function(){var u=this.getAttribute(e);return u===o?null:u===i?a:a=t(i=u,n)}}function iz(e,t,n){var i,o=n+"",a;return function(){var u=this.getAttributeNS(e.space,e.local);return u===o?null:u===i?a:a=t(i=u,n)}}function oz(e,t,n){var i,o,a;return function(){var u,l=n(this),f;return l==null?void this.removeAttribute(e):(u=this.getAttribute(e),f=l+"",u===f?null:u===i&&f===o?a:(o=f,a=t(i=u,l)))}}function sz(e,t,n){var i,o,a;return function(){var u,l=n(this),f;return l==null?void this.removeAttributeNS(e.space,e.local):(u=this.getAttributeNS(e.space,e.local),f=l+"",u===f?null:u===i&&f===o?a:(o=f,a=t(i=u,l)))}}function az(e,t){var n=Ll(e),i=n==="transform"?FF:UN;return this.attrTween(e,typeof t=="function"?(n.local?sz:oz)(n,i,a0(this,"attr."+e,t)):t==null?(n.local?nz:tz)(n):(n.local?iz:rz)(n,i,t))}function uz(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function lz(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function cz(e,t){var n,i;function o(){var a=t.apply(this,arguments);return a!==i&&(n=(i=a)&&lz(e,a)),n}return o._value=t,o}function fz(e,t){var n,i;function o(){var a=t.apply(this,arguments);return a!==i&&(n=(i=a)&&uz(e,a)),n}return o._value=t,o}function dz(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 new Error;var i=Ll(e);return this.tween(n,(i.local?cz:fz)(i,t))}function hz(e,t){return function(){s0(this,e).delay=+t.apply(this,arguments)}}function pz(e,t){return t=+t,function(){s0(this,e).delay=t}}function gz(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?hz:pz)(t,e)):vn(this.node(),t).delay}function vz(e,t){return function(){Tn(this,e).duration=+t.apply(this,arguments)}}function mz(e,t){return t=+t,function(){Tn(this,e).duration=t}}function yz(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?vz:mz)(t,e)):vn(this.node(),t).duration}function wz(e,t){if(typeof t!="function")throw new Error;return function(){Tn(this,e).ease=t}}function xz(e){var t=this._id;return arguments.length?this.each(wz(t,e)):vn(this.node(),t).ease}function _z(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;Tn(this,e).ease=n}}function bz(e){if(typeof e!="function")throw new Error;return this.each(_z(this._id,e))}function Sz(e){typeof e!="function"&&(e=bN(e));for(var t=this._groups,n=t.length,i=new Array(n),o=0;o<n;++o)for(var a=t[o],u=a.length,l=i[o]=[],f,d=0;d<u;++d)(f=a[d])&&e.call(f,f.__data__,d,a)&&l.push(f);return new Qn(i,this._parents,this._name,this._id)}function Ez(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,i=t.length,o=n.length,a=Math.min(i,o),u=new Array(i),l=0;l<a;++l)for(var f=t[l],d=n[l],h=f.length,p=u[l]=new Array(h),v,m=0;m<h;++m)(v=f[m]||d[m])&&(p[m]=v);for(;l<i;++l)u[l]=t[l];return new Qn(u,this._parents,this._name,this._id)}function Cz(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function kz(e,t,n){var i,o,a=Cz(t)?s0:Tn;return function(){var u=a(this,e),l=u.on;l!==i&&(o=(i=l).copy()).on(t,n),u.on=o}}function Rz(e,t){var n=this._id;return arguments.length<2?vn(this.node(),n).on.on(e):this.each(kz(n,e,t))}function Pz(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function Nz(){return this.on("end.remove",Pz(this._id))}function Tz(e){var t=this._name,n=this._id;typeof e!="function"&&(e=n0(e));for(var i=this._groups,o=i.length,a=new Array(o),u=0;u<o;++u)for(var l=i[u],f=l.length,d=a[u]=new Array(f),h,p,v=0;v<f;++v)(h=l[v])&&(p=e.call(h,h.__data__,v,l))&&("__data__"in h&&(p.__data__=h.__data__),d[v]=p,Dl(d[v],t,n,v,d,vn(h,n)));return new Qn(a,this._parents,t,n)}function Mz(e){var t=this._name,n=this._id;typeof e!="function"&&(e=_N(e));for(var i=this._groups,o=i.length,a=[],u=[],l=0;l<o;++l)for(var f=i[l],d=f.length,h,p=0;p<d;++p)if(h=f[p]){for(var v=e.call(h,h.__data__,p,f),m,x=vn(h,n),w=0,_=v.length;w<_;++w)(m=v[w])&&Dl(m,t,n,w,v,x);a.push(v),u.push(h)}return new Qn(a,u,t,n)}var Az=Qs.prototype.constructor;function Iz(){return new Az(this._groups,this._parents)}function Lz(e,t){var n,i,o;return function(){var a=ho(this,e),u=(this.style.removeProperty(e),ho(this,e));return a===u?null:a===n&&u===i?o:o=t(n=a,i=u)}}function WN(e){return function(){this.style.removeProperty(e)}}function Oz(e,t,n){var i,o=n+"",a;return function(){var u=ho(this,e);return u===o?null:u===i?a:a=t(i=u,n)}}function Dz(e,t,n){var i,o,a;return function(){var u=ho(this,e),l=n(this),f=l+"";return l==null&&(f=l=(this.style.removeProperty(e),ho(this,e))),u===f?null:u===i&&f===o?a:(o=f,a=t(i=u,l))}}function jz(e,t){var n,i,o,a="style."+t,u="end."+a,l;return function(){var f=Tn(this,e),d=f.on,h=f.value[a]==null?l||(l=WN(t)):void 0;(d!==n||o!==h)&&(i=(n=d).copy()).on(u,o=h),f.on=i}}function qz(e,t,n){var i=(e+="")=="transform"?qF:UN;return t==null?this.styleTween(e,Lz(e,i)).on("end.style."+e,WN(e)):typeof t=="function"?this.styleTween(e,Dz(e,i,a0(this,"style."+e,t))).each(jz(this._id,e)):this.styleTween(e,Oz(e,i,t),n).on("end.style."+e,null)}function Fz(e,t,n){return function(i){this.style.setProperty(e,t.call(this,i),n)}}function zz(e,t,n){var i,o;function a(){var u=t.apply(this,arguments);return u!==o&&(i=(o=u)&&Fz(e,u,n)),i}return a._value=t,a}function $z(e,t,n){var i="style."+(e+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(t==null)return this.tween(i,null);if(typeof t!="function")throw new Error;return this.tween(i,zz(e,t,n??""))}function Bz(e){return function(){this.textContent=e}}function Vz(e){return function(){var t=e(this);this.textContent=t??""}}function Hz(e){return this.tween("text",typeof e=="function"?Vz(a0(this,"text",e)):Bz(e==null?"":e+""))}function Uz(e){return function(t){this.textContent=e.call(this,t)}}function Wz(e){var t,n;function i(){var o=e.apply(this,arguments);return o!==n&&(t=(n=o)&&Uz(o)),t}return i._value=e,i}function Gz(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 new Error;return this.tween(t,Wz(e))}function Kz(){for(var e=this._name,t=this._id,n=GN(),i=this._groups,o=i.length,a=0;a<o;++a)for(var u=i[a],l=u.length,f,d=0;d<l;++d)if(f=u[d]){var h=vn(f,t);Dl(f,e,n,d,u,{time:h.time+h.delay+h.duration,delay:0,duration:h.duration,ease:h.ease})}return new Qn(i,this._parents,e,n)}function Yz(){var e,t,n=this,i=n._id,o=n.size();return new Promise(function(a,u){var l={value:u},f={value:function(){--o===0&&a()}};n.each(function(){var d=Tn(this,i),h=d.on;h!==e&&(t=(e=h).copy(),t._.cancel.push(l),t._.interrupt.push(l),t._.end.push(f)),d.on=t}),o===0&&a()})}var Xz=0;function Qn(e,t,n,i){this._groups=e,this._parents=t,this._name=n,this._id=i}function GN(){return++Xz}var Hn=Qs.prototype;Qn.prototype={constructor:Qn,select:Tz,selectAll:Mz,selectChild:Hn.selectChild,selectChildren:Hn.selectChildren,filter:Sz,merge:Ez,selection:Iz,transition:Kz,call:Hn.call,nodes:Hn.nodes,node:Hn.node,size:Hn.size,empty:Hn.empty,each:Hn.each,on:Rz,attr:az,attrTween:dz,style:qz,styleTween:$z,text:Hz,textTween:Gz,remove:Nz,tween:ez,delay:gz,duration:yz,ease:xz,easeVarying:bz,end:Yz,[Symbol.iterator]:Hn[Symbol.iterator]};function Qz(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var Zz={time:null,delay:0,duration:250,ease:Qz};function Jz(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function e4(e){var t,n;e instanceof Qn?(t=e._id,e=e._name):(t=GN(),(n=Zz).time=o0(),e=e==null?null:e+"");for(var i=this._groups,o=i.length,a=0;a<o;++a)for(var u=i[a],l=u.length,f,d=0;d<l;++d)(f=u[d])&&Dl(f,e,t,d,u,n||Jz(f,t));return new Qn(i,this._parents,e,t)}Qs.prototype.interrupt=QF;Qs.prototype.transition=e4;const qu=e=>()=>e;function t4(e,{sourceEvent:t,target:n,transform:i,dispatch:o}){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:i,enumerable:!0,configurable:!0},_:{value:o}})}function Un(e,t,n){this.k=e,this.x=t,this.y=n}Un.prototype={constructor:Un,scale:function(e){return e===1?this:new Un(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Un(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 jl=new Un(1,0,0);KN.prototype=Un.prototype;function KN(e){for(;!e.__zoom;)if(!(e=e.parentNode))return jl;return e.__zoom}function Md(e){e.stopImmediatePropagation()}function _s(e){e.preventDefault(),e.stopImmediatePropagation()}function n4(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function r4(){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 g_(){return this.__zoom||jl}function i4(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function o4(){return navigator.maxTouchPoints||"ontouchstart"in this}function s4(e,t,n){var i=e.invertX(t[0][0])-n[0][0],o=e.invertX(t[1][0])-n[1][0],a=e.invertY(t[0][1])-n[0][1],u=e.invertY(t[1][1])-n[1][1];return e.translate(o>i?(i+o)/2:Math.min(0,i)||Math.max(0,o),u>a?(a+u)/2:Math.min(0,a)||Math.max(0,u))}function YN(){var e=n4,t=r4,n=s4,i=i4,o=o4,a=[0,1/0],u=[[-1/0,-1/0],[1/0,1/0]],l=250,f=VF,d=Il("start","zoom","end"),h,p,v,m=500,x=150,w=0,_=10;function S(I){I.property("__zoom",g_).on("wheel.zoom",L,{passive:!1}).on("mousedown.zoom",O).on("dblclick.zoom",q).filter(o).on("touchstart.zoom",F).on("touchmove.zoom",$).on("touchend.zoom touchcancel.zoom",W).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}S.transform=function(I,H,z,Q){var D=I.selection?I.selection():I;D.property("__zoom",g_),I!==D?R(I,H,z,Q):D.interrupt().each(function(){A(this,arguments).event(Q).start().zoom(null,typeof H=="function"?H.apply(this,arguments):H).end()})},S.scaleBy=function(I,H,z,Q){S.scaleTo(I,function(){var D=this.__zoom.k,U=typeof H=="function"?H.apply(this,arguments):H;return D*U},z,Q)},S.scaleTo=function(I,H,z,Q){S.transform(I,function(){var D=t.apply(this,arguments),U=this.__zoom,K=z==null?C(D):typeof z=="function"?z.apply(this,arguments):z,j=U.invert(K),X=typeof H=="function"?H.apply(this,arguments):H;return n(E(k(U,X),K,j),D,u)},z,Q)},S.translateBy=function(I,H,z,Q){S.transform(I,function(){return n(this.__zoom.translate(typeof H=="function"?H.apply(this,arguments):H,typeof z=="function"?z.apply(this,arguments):z),t.apply(this,arguments),u)},null,Q)},S.translateTo=function(I,H,z,Q,D){S.transform(I,function(){var U=t.apply(this,arguments),K=this.__zoom,j=Q==null?C(U):typeof Q=="function"?Q.apply(this,arguments):Q;return n(jl.translate(j[0],j[1]).scale(K.k).translate(typeof H=="function"?-H.apply(this,arguments):-H,typeof z=="function"?-z.apply(this,arguments):-z),U,u)},Q,D)};function k(I,H){return H=Math.max(a[0],Math.min(a[1],H)),H===I.k?I:new Un(H,I.x,I.y)}function E(I,H,z){var Q=H[0]-z[0]*I.k,D=H[1]-z[1]*I.k;return Q===I.x&&D===I.y?I:new Un(I.k,Q,D)}function C(I){return[(+I[0][0]+ +I[1][0])/2,(+I[0][1]+ +I[1][1])/2]}function R(I,H,z,Q){I.on("start.zoom",function(){A(this,arguments).event(Q).start()}).on("interrupt.zoom end.zoom",function(){A(this,arguments).event(Q).end()}).tween("zoom",function(){var D=this,U=arguments,K=A(D,U).event(Q),j=t.apply(D,U),X=z==null?C(j):typeof z=="function"?z.apply(D,U):z,oe=Math.max(j[1][0]-j[0][0],j[1][1]-j[0][1]),V=D.__zoom,G=typeof H=="function"?H.apply(D,U):H,Z=f(V.invert(X).concat(oe/V.k),G.invert(X).concat(oe/G.k));return function(ne){if(ne===1)ne=G;else{var re=Z(ne),se=oe/re[2];ne=new Un(se,X[0]-re[0]*se,X[1]-re[1]*se)}K.zoom(null,ne)}})}function A(I,H,z){return!z&&I.__zooming||new T(I,H)}function T(I,H){this.that=I,this.args=H,this.active=0,this.sourceEvent=null,this.extent=t.apply(I,H),this.taps=0}T.prototype={event:function(I){return I&&(this.sourceEvent=I),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(I,H){return this.mouse&&I!=="mouse"&&(this.mouse[1]=H.invert(this.mouse[0])),this.touch0&&I!=="touch"&&(this.touch0[1]=H.invert(this.touch0[0])),this.touch1&&I!=="touch"&&(this.touch1[1]=H.invert(this.touch1[0])),this.that.__zoom=H,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(I){var H=Ft(this.that).datum();d.call(I,this.that,new t4(I,{sourceEvent:this.sourceEvent,target:S,type:I,transform:this.that.__zoom,dispatch:d}),H)}};function L(I,...H){if(!e.apply(this,arguments))return;var z=A(this,H).event(I),Q=this.__zoom,D=Math.max(a[0],Math.min(a[1],Q.k*Math.pow(2,i.apply(this,arguments)))),U=un(I);if(z.wheel)(z.mouse[0][0]!==U[0]||z.mouse[0][1]!==U[1])&&(z.mouse[1]=Q.invert(z.mouse[0]=U)),clearTimeout(z.wheel);else{if(Q.k===D)return;z.mouse=[U,Q.invert(U)],Ju(this),z.start()}_s(I),z.wheel=setTimeout(K,x),z.zoom("mouse",n(E(k(Q,D),z.mouse[0],z.mouse[1]),z.extent,u));function K(){z.wheel=null,z.end()}}function O(I,...H){if(v||!e.apply(this,arguments))return;var z=I.currentTarget,Q=A(this,H,!0).event(I),D=Ft(I.view).on("mousemove.zoom",X,!0).on("mouseup.zoom",oe,!0),U=un(I,z),K=I.clientX,j=I.clientY;AN(I.view),Md(I),Q.mouse=[U,this.__zoom.invert(U)],Ju(this),Q.start();function X(V){if(_s(V),!Q.moved){var G=V.clientX-K,Z=V.clientY-j;Q.moved=G*G+Z*Z>w}Q.event(V).zoom("mouse",n(E(Q.that.__zoom,Q.mouse[0]=un(V,z),Q.mouse[1]),Q.extent,u))}function oe(V){D.on("mousemove.zoom mouseup.zoom",null),IN(V.view,Q.moved),_s(V),Q.event(V).end()}}function q(I,...H){if(e.apply(this,arguments)){var z=this.__zoom,Q=un(I.changedTouches?I.changedTouches[0]:I,this),D=z.invert(Q),U=z.k*(I.shiftKey?.5:2),K=n(E(k(z,U),Q,D),t.apply(this,H),u);_s(I),l>0?Ft(this).transition().duration(l).call(R,K,Q,I):Ft(this).call(S.transform,K,Q,I)}}function F(I,...H){if(e.apply(this,arguments)){var z=I.touches,Q=z.length,D=A(this,H,I.changedTouches.length===Q).event(I),U,K,j,X;for(Md(I),K=0;K<Q;++K)j=z[K],X=un(j,this),X=[X,this.__zoom.invert(X),j.identifier],D.touch0?!D.touch1&&D.touch0[2]!==X[2]&&(D.touch1=X,D.taps=0):(D.touch0=X,U=!0,D.taps=1+!!h);h&&(h=clearTimeout(h)),U&&(D.taps<2&&(p=X[0],h=setTimeout(function(){h=null},m)),Ju(this),D.start())}}function $(I,...H){if(this.__zooming){var z=A(this,H).event(I),Q=I.changedTouches,D=Q.length,U,K,j,X;for(_s(I),U=0;U<D;++U)K=Q[U],j=un(K,this),z.touch0&&z.touch0[2]===K.identifier?z.touch0[0]=j:z.touch1&&z.touch1[2]===K.identifier&&(z.touch1[0]=j);if(K=z.that.__zoom,z.touch1){var oe=z.touch0[0],V=z.touch0[1],G=z.touch1[0],Z=z.touch1[1],ne=(ne=G[0]-oe[0])*ne+(ne=G[1]-oe[1])*ne,re=(re=Z[0]-V[0])*re+(re=Z[1]-V[1])*re;K=k(K,Math.sqrt(ne/re)),j=[(oe[0]+G[0])/2,(oe[1]+G[1])/2],X=[(V[0]+Z[0])/2,(V[1]+Z[1])/2]}else if(z.touch0)j=z.touch0[0],X=z.touch0[1];else return;z.zoom("touch",n(E(K,j,X),z.extent,u))}}function W(I,...H){if(this.__zooming){var z=A(this,H).event(I),Q=I.changedTouches,D=Q.length,U,K;for(Md(I),v&&clearTimeout(v),v=setTimeout(function(){v=null},m),U=0;U<D;++U)K=Q[U],z.touch0&&z.touch0[2]===K.identifier?delete z.touch0:z.touch1&&z.touch1[2]===K.identifier&&delete z.touch1;if(z.touch1&&!z.touch0&&(z.touch0=z.touch1,delete z.touch1),z.touch0)z.touch0[1]=this.__zoom.invert(z.touch0[0]);else if(z.end(),z.taps===2&&(K=un(K,this),Math.hypot(p[0]-K[0],p[1]-K[1])<_)){var j=Ft(this).on("dblclick.zoom");j&&j.apply(this,arguments)}}}return S.wheelDelta=function(I){return arguments.length?(i=typeof I=="function"?I:qu(+I),S):i},S.filter=function(I){return arguments.length?(e=typeof I=="function"?I:qu(!!I),S):e},S.touchable=function(I){return arguments.length?(o=typeof I=="function"?I:qu(!!I),S):o},S.extent=function(I){return arguments.length?(t=typeof I=="function"?I:qu([[+I[0][0],+I[0][1]],[+I[1][0],+I[1][1]]]),S):t},S.scaleExtent=function(I){return arguments.length?(a[0]=+I[0],a[1]=+I[1],S):[a[0],a[1]]},S.translateExtent=function(I){return arguments.length?(u[0][0]=+I[0][0],u[1][0]=+I[1][0],u[0][1]=+I[0][1],u[1][1]=+I[1][1],S):[[u[0][0],u[0][1]],[u[1][0],u[1][1]]]},S.constrain=function(I){return arguments.length?(n=I,S):n},S.duration=function(I){return arguments.length?(l=+I,S):l},S.interpolate=function(I){return arguments.length?(f=I,S):f},S.on=function(){var I=d.on.apply(d,arguments);return I===d?S:I},S.clickDistance=function(I){return arguments.length?(w=(I=+I)*I,S):Math.sqrt(w)},S.tapDistance=function(I){return arguments.length?(_=+I,S):_},S}const er={error001:()=>"[React Flow]: Seems like you have not used zustand provider as an ancestor. Help: https://reactflow.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 React Flow 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:i})=>`Couldn't create edge for ${e} handle id: "${e==="source"?n:i}", 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.`},Bs=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],XN=["Enter"," ","Escape"];var go;(function(e){e.Strict="strict",e.Loose="loose"})(go||(go={}));var si;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(si||(si={}));var Vs;(function(e){e.Partial="partial",e.Full="full"})(Vs||(Vs={}));const QN={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null};var Mr;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(Mr||(Mr={}));var pl;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(pl||(pl={}));var me;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(me||(me={}));const v_={[me.Left]:me.Right,[me.Right]:me.Left,[me.Top]:me.Bottom,[me.Bottom]:me.Top};function ZN(e){return e===null?null:e?"valid":"invalid"}const JN=e=>"id"in e&&"source"in e&&"target"in e,a4=e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),u0=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),Js=(e,t=[0,0])=>{const{width:n,height:i}=tr(e),o=e.origin??t,a=n*o[0],u=i*o[1];return{x:e.position.x-a,y:e.position.y-u}},u4=(e,t={nodeOrigin:[0,0],nodeLookup:void 0})=>{if(e.length===0)return{x:0,y:0,width:0,height:0};const n=e.reduce((i,o)=>{const a=typeof o=="string";let u=!t.nodeLookup&&!a?o:void 0;t.nodeLookup&&(u=a?t.nodeLookup.get(o):u0(o)?o:t.nodeLookup.get(o.id));const l=u?gl(u,t.nodeOrigin):{x:0,y:0,x2:0,y2:0};return ql(i,l)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return Fl(n)},ea=(e,t={})=>{if(e.size===0)return{x:0,y:0,width:0,height:0};let n={x:1/0,y:1/0,x2:-1/0,y2:-1/0};return e.forEach(i=>{if(t.filter===void 0||t.filter(i)){const o=gl(i);n=ql(n,o)}}),Fl(n)},eT=(e,t,[n,i,o]=[0,0,1],a=!1,u=!1)=>{const l={...ta(t,[n,i,o]),width:t.width/o,height:t.height/o},f=[];for(const d of e.values()){const{measured:h,selectable:p=!0,hidden:v=!1}=d;if(u&&!p||v)continue;const m=h.width??d.width??d.initialWidth??null,x=h.height??d.height??d.initialHeight??null,w=Hs(l,mo(d)),_=(m??0)*(x??0),S=a&&w>0;(!d.internals.handleBounds||S||w>=_||d.dragging)&&f.push(d)}return f},l4=(e,t)=>{const n=new Set;return e.forEach(i=>{n.add(i.id)}),t.filter(i=>n.has(i.source)||n.has(i.target))};function Ey(e,t){const n=new Map,i=t!=null&&t.nodes?new Set(t.nodes.map(o=>o.id)):null;return e.forEach(o=>{o.measured.width&&o.measured.height&&((t==null?void 0:t.includeHiddenNodes)||!o.hidden)&&(!i||i.has(o.id))&&n.set(o.id,o)}),n}async function Cy({nodes:e,width:t,height:n,panZoom:i,minZoom:o,maxZoom:a},u){if(e.size===0)return Promise.resolve(!1);const l=ea(e),f=l0(l,t,n,(u==null?void 0:u.minZoom)??o,(u==null?void 0:u.maxZoom)??a,(u==null?void 0:u.padding)??.1);return await i.setViewport(f,{duration:u==null?void 0:u.duration}),Promise.resolve(!0)}function tT({nodeId:e,nextPosition:t,nodeLookup:n,nodeOrigin:i=[0,0],nodeExtent:o,onError:a}){const u=n.get(e),l=u.parentId?n.get(u.parentId):void 0,{x:f,y:d}=l?l.internals.positionAbsolute:{x:0,y:0},h=u.origin??i;let p=o;if(u.extent==="parent"&&!u.expandParent)if(!l)a==null||a("005",er.error005());else{const m=l.measured.width,x=l.measured.height;m&&x&&(p=[[f,d],[f+m,d+x]])}else l&&yo(u.extent)&&(p=[[u.extent[0][0]+f,u.extent[0][1]+d],[u.extent[1][0]+f,u.extent[1][1]+d]]);const v=yo(p)?di(t,p,u.measured):t;return{position:{x:v.x-f+u.measured.width*h[0],y:v.y-d+u.measured.height*h[1]},positionAbsolute:v}}async function c4({nodesToRemove:e=[],edgesToRemove:t=[],nodes:n,edges:i,onBeforeDelete:o}){const a=new Set(e.map(v=>v.id)),u=[];for(const v of n){if(v.deletable===!1)continue;const m=a.has(v.id),x=!m&&v.parentId&&u.find(w=>w.id===v.parentId);(m||x)&&u.push(v)}const l=new Set(t.map(v=>v.id)),f=i.filter(v=>v.deletable!==!1),h=l4(u,f);for(const v of f)l.has(v.id)&&!h.find(x=>x.id===v.id)&&h.push(v);if(!o)return{edges:h,nodes:u};const p=await o({nodes:u,edges:h});return typeof p=="boolean"?p?{edges:h,nodes:u}:{edges:[],nodes:[]}:p}const vo=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),di=(e={x:0,y:0},t,n)=>({x:vo(e.x,t[0][0],t[1][0]-((n==null?void 0:n.width)??0)),y:vo(e.y,t[0][1],t[1][1]-((n==null?void 0:n.height)??0))});function nT(e,t,n){const{width:i,height:o}=tr(n),{x:a,y:u}=n.internals.positionAbsolute;return di(e,[[a,u],[a+i,u+o]],t)}const m_=(e,t,n)=>e<t?vo(Math.abs(e-t),1,t)/t:e>n?-vo(Math.abs(e-n),1,t)/t:0,rT=(e,t,n=15,i=40)=>{const o=m_(e.x,i,t.width-i)*n,a=m_(e.y,i,t.height-i)*n;return[o,a]},ql=(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)}),ky=({x:e,y:t,width:n,height:i})=>({x:e,y:t,x2:e+n,y2:t+i}),Fl=({x:e,y:t,x2:n,y2:i})=>({x:e,y:t,width:n-e,height:i-t}),mo=(e,t=[0,0])=>{var o,a;const{x:n,y:i}=u0(e)?e.internals.positionAbsolute:Js(e,t);return{x:n,y:i,width:((o=e.measured)==null?void 0:o.width)??e.width??e.initialWidth??0,height:((a=e.measured)==null?void 0:a.height)??e.height??e.initialHeight??0}},gl=(e,t=[0,0])=>{var o,a;const{x:n,y:i}=u0(e)?e.internals.positionAbsolute:Js(e,t);return{x:n,y:i,x2:n+(((o=e.measured)==null?void 0:o.width)??e.width??e.initialWidth??0),y2:i+(((a=e.measured)==null?void 0:a.height)??e.height??e.initialHeight??0)}},iT=(e,t)=>Fl(ql(ky(e),ky(t))),Hs=(e,t)=>{const n=Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x)),i=Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y));return Math.ceil(n*i)},y_=e=>cn(e.width)&&cn(e.height)&&cn(e.x)&&cn(e.y),cn=e=>!isNaN(e)&&isFinite(e),f4=(e,t)=>{},zl=(e,t=[1,1])=>({x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}),ta=({x:e,y:t},[n,i,o],a=!1,u=[1,1])=>{const l={x:(e-n)/o,y:(t-i)/o};return a?zl(l,u):l},oT=({x:e,y:t},[n,i,o])=>({x:e*o+n,y:t*o+i}),l0=(e,t,n,i,o,a)=>{const u=t/(e.width*(1+a)),l=n/(e.height*(1+a)),f=Math.min(u,l),d=vo(f,i,o),h=e.x+e.width/2,p=e.y+e.height/2,v=t/2-h*d,m=n/2-p*d;return{x:v,y:m,zoom:d}},vl=()=>{var e;return typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)==null?void 0:e.indexOf("Mac"))>=0};function yo(e){return e!==void 0&&e!=="parent"}function tr(e){var t,n;return{width:((t=e.measured)==null?void 0:t.width)??e.width??e.initialWidth??0,height:((n=e.measured)==null?void 0:n.height)??e.height??e.initialHeight??0}}function c0(e){var t,n;return(((t=e.measured)==null?void 0:t.width)??e.width??e.initialWidth)!==void 0&&(((n=e.measured)==null?void 0:n.height)??e.height??e.initialHeight)!==void 0}function sT(e,t={width:0,height:0},n,i,o){const a={...e},u=i.get(n);if(u){const l=u.origin||o;a.x+=u.internals.positionAbsolute.x-(t.width??0)*l[0],a.y+=u.internals.positionAbsolute.y-(t.height??0)*l[1]}return a}function As(e,{snapGrid:t=[0,0],snapToGrid:n=!1,transform:i,containerBounds:o}){const{x:a,y:u}=Gn(e),l=ta({x:a-((o==null?void 0:o.left)??0),y:u-((o==null?void 0:o.top)??0)},i),{x:f,y:d}=n?zl(l,t):l;return{xSnapped:f,ySnapped:d,...l}}const $l=e=>({width:e.offsetWidth,height:e.offsetHeight}),aT=e=>{var t;return((t=e.getRootNode)==null?void 0:t.call(e))||(window==null?void 0:window.document)},d4=["INPUT","SELECT","TEXTAREA"];function Ry(e){var i,o,a;const t=((o=(i=e.composedPath)==null?void 0:i.call(e))==null?void 0:o[0])||e.target;return d4.includes(t==null?void 0:t.nodeName)||((a=t==null?void 0:t.hasAttribute)==null?void 0:a.call(t,"contenteditable"))||!!(t!=null&&t.closest(".nokey"))}const uT=e=>"clientX"in e,Gn=(e,t)=>{var a,u;const n=uT(e),i=n?e.clientX:(a=e.touches)==null?void 0:a[0].clientX,o=n?e.clientY:(u=e.touches)==null?void 0:u[0].clientY;return{x:i-((t==null?void 0:t.left)??0),y:o-((t==null?void 0:t.top)??0)}},w_=(e,t,n,i,o)=>{const a=t.querySelectorAll(`.${e}`);return!a||!a.length?null:Array.from(a).map(u=>{const l=u.getBoundingClientRect();return{id:u.getAttribute("data-handleid"),type:e,nodeId:o,position:u.getAttribute("data-handlepos"),x:(l.left-n.left)/i,y:(l.top-n.top)/i,...$l(u)}})};function lT({sourceX:e,sourceY:t,targetX:n,targetY:i,sourceControlX:o,sourceControlY:a,targetControlX:u,targetControlY:l}){const f=e*.125+o*.375+u*.375+n*.125,d=t*.125+a*.375+l*.375+i*.125,h=Math.abs(f-e),p=Math.abs(d-t);return[f,d,h,p]}function Fu(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function x_({pos:e,x1:t,y1:n,x2:i,y2:o,c:a}){switch(e){case me.Left:return[t-Fu(t-i,a),n];case me.Right:return[t+Fu(i-t,a),n];case me.Top:return[t,n-Fu(n-o,a)];case me.Bottom:return[t,n+Fu(o-n,a)]}}function cT({sourceX:e,sourceY:t,sourcePosition:n=me.Bottom,targetX:i,targetY:o,targetPosition:a=me.Top,curvature:u=.25}){const[l,f]=x_({pos:n,x1:e,y1:t,x2:i,y2:o,c:u}),[d,h]=x_({pos:a,x1:i,y1:o,x2:e,y2:t,c:u}),[p,v,m,x]=lT({sourceX:e,sourceY:t,targetX:i,targetY:o,sourceControlX:l,sourceControlY:f,targetControlX:d,targetControlY:h});return[`M${e},${t} C${l},${f} ${d},${h} ${i},${o}`,p,v,m,x]}function fT({sourceX:e,sourceY:t,targetX:n,targetY:i}){const o=Math.abs(n-e)/2,a=n<e?n+o:n-o,u=Math.abs(i-t)/2,l=i<t?i+u:i-u;return[a,l,o,u]}function h4({sourceNode:e,targetNode:t,selected:n=!1,zIndex:i=0,elevateOnSelect:o=!1}){if(!o)return i;const a=n||t.selected||e.selected,u=Math.max(e.internals.z||0,t.internals.z||0,1e3);return i+(a?u:0)}function p4({sourceNode:e,targetNode:t,width:n,height:i,transform:o}){const a=ql(gl(e),gl(t));a.x===a.x2&&(a.x2+=1),a.y===a.y2&&(a.y2+=1);const u={x:-o[0]/o[2],y:-o[1]/o[2],width:n/o[2],height:i/o[2]};return Hs(u,Fl(a))>0}const g4=({source:e,sourceHandle:t,target:n,targetHandle:i})=>`xy-edge__${e}${t||""}-${n}${i||""}`,v4=(e,t)=>t.some(n=>n.source===e.source&&n.target===e.target&&(n.sourceHandle===e.sourceHandle||!n.sourceHandle&&!e.sourceHandle)&&(n.targetHandle===e.targetHandle||!n.targetHandle&&!e.targetHandle)),m4=(e,t)=>{if(!e.source||!e.target)return t;let n;return JN(e)?n={...e}:n={...e,id:g4(e)},v4(n,t)?t:(n.sourceHandle===null&&delete n.sourceHandle,n.targetHandle===null&&delete n.targetHandle,t.concat(n))};function dT({sourceX:e,sourceY:t,targetX:n,targetY:i}){const[o,a,u,l]=fT({sourceX:e,sourceY:t,targetX:n,targetY:i});return[`M ${e},${t}L ${n},${i}`,o,a,u,l]}const __={[me.Left]:{x:-1,y:0},[me.Right]:{x:1,y:0},[me.Top]:{x:0,y:-1},[me.Bottom]:{x:0,y:1}},y4=({source:e,sourcePosition:t=me.Bottom,target:n})=>t===me.Left||t===me.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},b_=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function w4({source:e,sourcePosition:t=me.Bottom,target:n,targetPosition:i=me.Top,center:o,offset:a}){const u=__[t],l=__[i],f={x:e.x+u.x*a,y:e.y+u.y*a},d={x:n.x+l.x*a,y:n.y+l.y*a},h=y4({source:f,sourcePosition:t,target:d}),p=h.x!==0?"x":"y",v=h[p];let m=[],x,w;const _={x:0,y:0},S={x:0,y:0},[k,E,C,R]=fT({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(u[p]*l[p]===-1){x=o.x??k,w=o.y??E;const T=[{x,y:f.y},{x,y:d.y}],L=[{x:f.x,y:w},{x:d.x,y:w}];u[p]===v?m=p==="x"?T:L:m=p==="x"?L:T}else{const T=[{x:f.x,y:d.y}],L=[{x:d.x,y:f.y}];if(p==="x"?m=u.x===v?L:T:m=u.y===v?T:L,t===i){const W=Math.abs(e[p]-n[p]);if(W<=a){const I=Math.min(a-1,a-W);u[p]===v?_[p]=(f[p]>e[p]?-1:1)*I:S[p]=(d[p]>n[p]?-1:1)*I}}if(t!==i){const W=p==="x"?"y":"x",I=u[p]===l[W],H=f[W]>d[W],z=f[W]<d[W];(u[p]===1&&(!I&&H||I&&z)||u[p]!==1&&(!I&&z||I&&H))&&(m=p==="x"?T:L)}const O={x:f.x+_.x,y:f.y+_.y},q={x:d.x+S.x,y:d.y+S.y},F=Math.max(Math.abs(O.x-m[0].x),Math.abs(q.x-m[0].x)),$=Math.max(Math.abs(O.y-m[0].y),Math.abs(q.y-m[0].y));F>=$?(x=(O.x+q.x)/2,w=m[0].y):(x=m[0].x,w=(O.y+q.y)/2)}return[[e,{x:f.x+_.x,y:f.y+_.y},...m,{x:d.x+S.x,y:d.y+S.y},n],x,w,C,R]}function x4(e,t,n,i){const o=Math.min(b_(e,t)/2,b_(t,n)/2,i),{x:a,y:u}=t;if(e.x===a&&a===n.x||e.y===u&&u===n.y)return`L${a} ${u}`;if(e.y===u){const d=e.x<n.x?-1:1,h=e.y<n.y?1:-1;return`L ${a+o*d},${u}Q ${a},${u} ${a},${u+o*h}`}const l=e.x<n.x?1:-1,f=e.y<n.y?-1:1;return`L ${a},${u+o*f}Q ${a},${u} ${a+o*l},${u}`}function ml({sourceX:e,sourceY:t,sourcePosition:n=me.Bottom,targetX:i,targetY:o,targetPosition:a=me.Top,borderRadius:u=5,centerX:l,centerY:f,offset:d=20}){const[h,p,v,m,x]=w4({source:{x:e,y:t},sourcePosition:n,target:{x:i,y:o},targetPosition:a,center:{x:l,y:f},offset:d});return[h.reduce((_,S,k)=>{let E="";return k>0&&k<h.length-1?E=x4(h[k-1],S,h[k+1],u):E=`${k===0?"M":"L"}${S.x} ${S.y}`,_+=E,_},""),p,v,m,x]}function S_(e){var t;return e&&!!(e.internals.handleBounds||(t=e.handles)!=null&&t.length)&&!!(e.measured.width||e.width||e.initialWidth)}function _4(e){var p;const{sourceNode:t,targetNode:n}=e;if(!S_(t)||!S_(n))return null;const i=t.internals.handleBounds||E_(t.handles),o=n.internals.handleBounds||E_(n.handles),a=C_((i==null?void 0:i.source)??[],e.sourceHandle),u=C_(e.connectionMode===go.Strict?(o==null?void 0:o.target)??[]:((o==null?void 0:o.target)??[]).concat((o==null?void 0:o.source)??[]),e.targetHandle);if(!a||!u)return(p=e.onError)==null||p.call(e,"008",er.error008(a?"target":"source",{id:e.id,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),null;const l=(a==null?void 0:a.position)||me.Bottom,f=(u==null?void 0:u.position)||me.Top,d=Us(t,a,l),h=Us(n,u,f);return{sourceX:d.x,sourceY:d.y,targetX:h.x,targetY:h.y,sourcePosition:l,targetPosition:f}}function E_(e){if(!e)return null;const t=[],n=[];for(const i of e)i.width=i.width??1,i.height=i.height??1,i.type==="source"?t.push(i):i.type==="target"&&n.push(i);return{source:t,target:n}}function Us(e,t,n=me.Left,i=!1){const o=((t==null?void 0:t.x)??0)+e.internals.positionAbsolute.x,a=((t==null?void 0:t.y)??0)+e.internals.positionAbsolute.y,{width:u,height:l}=t??tr(e);if(i)return{x:o+u/2,y:a+l/2};switch((t==null?void 0:t.position)??n){case me.Top:return{x:o+u/2,y:a};case me.Right:return{x:o+u,y:a+l/2};case me.Bottom:return{x:o+u/2,y:a+l};case me.Left:return{x:o,y:a+l/2}}}function C_(e,t){return e&&(t?e.find(n=>n.id===t):e[0])||null}function Py(e,t){return e?typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(i=>`${i}=${e[i]}`).join("&")}`:""}function b4(e,{id:t,defaultColor:n,defaultMarkerStart:i,defaultMarkerEnd:o}){const a=new Set;return e.reduce((u,l)=>([l.markerStart||i,l.markerEnd||o].forEach(f=>{if(f&&typeof f=="object"){const d=Py(f,t);a.has(d)||(u.push({id:d,color:f.color||n,...f}),a.add(d))}}),u),[]).sort((u,l)=>u.id.localeCompare(l.id))}const f0={nodeOrigin:[0,0],nodeExtent:Bs,elevateNodesOnSelect:!0,defaults:{}},S4={...f0,checkEquality:!0};function d0(e,t){const n={...e};for(const i in t)t[i]!==void 0&&(n[i]=t[i]);return n}function E4(e,t,n){const i=d0(f0,n);for(const o of e.values())if(o.parentId)h0(o,e,t,i);else{const a=Js(o,i.nodeOrigin),u=yo(o.extent)?o.extent:i.nodeExtent,l=di(a,u,tr(o));o.internals.positionAbsolute=l}}function Ny(e,t,n,i){var l,f;const o=d0(S4,i),a=new Map(t),u=o!=null&&o.elevateNodesOnSelect?1e3:0;t.clear(),n.clear();for(const d of e){let h=a.get(d.id);if(o.checkEquality&&d===(h==null?void 0:h.internals.userNode))t.set(d.id,h);else{const p=Js(d,o.nodeOrigin),v=yo(d.extent)?d.extent:o.nodeExtent,m=di(p,v,tr(d));h={...o.defaults,...d,measured:{width:(l=d.measured)==null?void 0:l.width,height:(f=d.measured)==null?void 0:f.height},internals:{positionAbsolute:m,handleBounds:d.measured?h==null?void 0:h.internals.handleBounds:void 0,z:hT(d,u),userNode:d}},t.set(d.id,h)}d.parentId&&h0(h,t,n,i)}}function C4(e,t){if(!e.parentId)return;const n=t.get(e.parentId);n?n.set(e.id,e):t.set(e.parentId,new Map([[e.id,e]]))}function h0(e,t,n,i){const{elevateNodesOnSelect:o,nodeOrigin:a,nodeExtent:u}=d0(f0,i),l=e.parentId,f=t.get(l);if(!f){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}C4(e,n);const d=o?1e3:0,{x:h,y:p,z:v}=k4(e,f,a,u,d),{positionAbsolute:m}=e.internals,x=h!==m.x||p!==m.y;(x||v!==e.internals.z)&&(e.internals={...e.internals,positionAbsolute:x?{x:h,y:p}:m,z:v})}function hT(e,t){return(cn(e.zIndex)?e.zIndex:0)+(e.selected?t:0)}function k4(e,t,n,i,o){const{x:a,y:u}=t.internals.positionAbsolute,l=tr(e),f=Js(e,n),d=yo(e.extent)?di(f,e.extent,l):f;let h=di({x:a+d.x,y:u+d.y},i,l);e.extent==="parent"&&(h=nT(h,l,t));const p=hT(e,o),v=t.internals.z??0;return{x:h.x,y:h.y,z:v>p?v:p}}function p0(e,t,n,i=[0,0]){var u;const o=[],a=new Map;for(const l of e){const f=t.get(l.parentId);if(!f)continue;const d=((u=a.get(l.parentId))==null?void 0:u.expandedRect)??mo(f),h=iT(d,l.rect);a.set(l.parentId,{expandedRect:h,parent:f})}return a.size>0&&a.forEach(({expandedRect:l,parent:f},d)=>{var E;const h=f.internals.positionAbsolute,p=tr(f),v=f.origin??i,m=l.x<h.x?Math.round(Math.abs(h.x-l.x)):0,x=l.y<h.y?Math.round(Math.abs(h.y-l.y)):0,w=Math.max(p.width,Math.round(l.width)),_=Math.max(p.height,Math.round(l.height)),S=(w-p.width)*v[0],k=(_-p.height)*v[1];(m>0||x>0||S||k)&&(o.push({id:d,type:"position",position:{x:f.position.x-m+S,y:f.position.y-x+k}}),(E=n.get(d))==null||E.forEach(C=>{e.some(R=>R.id===C.id)||o.push({id:C.id,type:"position",position:{x:C.position.x+m,y:C.position.y+x}})})),(p.width<l.width||p.height<l.height||m||x)&&o.push({id:d,type:"dimensions",setAttributes:!0,dimensions:{width:w+(m?v[0]*m-S:0),height:_+(x?v[1]*x-k:0)}})}),o}function R4(e,t,n,i,o,a){const u=i==null?void 0:i.querySelector(".xyflow__viewport");let l=!1;if(!u)return{changes:[],updatedInternals:l};const f=[],d=window.getComputedStyle(u),{m22:h}=new window.DOMMatrixReadOnly(d.transform),p=[];for(const v of e.values()){const m=t.get(v.id);if(m)if(m.hidden)m.internals={...m.internals,handleBounds:void 0},l=!0;else{const x=$l(v.nodeElement),w=m.measured.width!==x.width||m.measured.height!==x.height;if(!!(x.width&&x.height&&(w||!m.internals.handleBounds||v.force))){const S=v.nodeElement.getBoundingClientRect(),k=yo(m.extent)?m.extent:a;let{positionAbsolute:E}=m.internals;m.parentId&&m.extent==="parent"?E=nT(E,x,t.get(m.parentId)):k&&(E=di(E,k,x)),m.measured=x,m.internals={...m.internals,positionAbsolute:E,handleBounds:{source:w_("source",v.nodeElement,S,h,m.id),target:w_("target",v.nodeElement,S,h,m.id)}},m.parentId&&h0(m,t,n,{nodeOrigin:o}),l=!0,w&&(f.push({id:m.id,type:"dimensions",dimensions:x}),m.expandParent&&m.parentId&&p.push({id:m.id,parentId:m.parentId,rect:mo(m,o)}))}}}if(p.length>0){const v=p0(p,t,n,o);f.push(...v)}return{changes:f,updatedInternals:l}}async function P4({delta:e,panZoom:t,transform:n,translateExtent:i,width:o,height:a}){if(!t||!e.x&&!e.y)return Promise.resolve(!1);const u=await t.setViewportConstrained({x:n[0]+e.x,y:n[1]+e.y,zoom:n[2]},[[0,0],[o,a]],i),l=!!u&&(u.x!==n[0]||u.y!==n[1]||u.k!==n[2]);return Promise.resolve(l)}function pT(e,t,n){e.clear(),t.clear();for(const i of n){const{source:o,target:a,sourceHandle:u=null,targetHandle:l=null}=i,f=`${o}-source-${u}`,d=`${a}-target-${l}`,h=e.get(f)||new Map,p=e.get(d)||new Map,v={edgeId:i.id,source:o,target:a,sourceHandle:u,targetHandle:l};t.set(i.id,i),e.set(f,h.set(`${a}-${l}`,v)),e.set(d,p.set(`${o}-${u}`,v))}}function gT(e,t){if(!e.parentId)return!1;const n=t.get(e.parentId);return n?n.selected?!0:gT(n,t):!1}function k_(e,t,n){let i=e;do{if(i!=null&&i.matches(t))return!0;if(i===n)return!1;i=i.parentElement}while(i);return!1}function N4(e,t,n,i){const o=new Map;for(const[a,u]of e)if((u.selected||u.id===i)&&(!u.parentId||!gT(u,e))&&(u.draggable||t&&typeof u.draggable>"u")){const l=e.get(a);l&&o.set(a,{id:a,position:l.position||{x:0,y:0},distance:{x:n.x-l.internals.positionAbsolute.x,y:n.y-l.internals.positionAbsolute.y},extent:l.extent,parentId:l.parentId,origin:l.origin,expandParent:l.expandParent,internals:{positionAbsolute:l.internals.positionAbsolute||{x:0,y:0}},measured:{width:l.measured.width??0,height:l.measured.height??0}})}return o}function Ad({nodeId:e,dragItems:t,nodeLookup:n,dragging:i=!0}){var u,l,f;const o=[];for(const[d,h]of t){const p=(u=n.get(d))==null?void 0:u.internals.userNode;p&&o.push({...p,position:h.position,dragging:i})}if(!e)return[o[0],o];const a=(l=n.get(e))==null?void 0:l.internals.userNode;return[a?{...a,position:((f=t.get(e))==null?void 0:f.position)||a.position,dragging:i}:o[0],o]}function T4({onNodeMouseDown:e,getStoreItems:t,onDragStart:n,onDrag:i,onDragStop:o}){let a={x:null,y:null},u=0,l=new Map,f=!1,d={x:0,y:0},h=null,p=!1,v=null,m=!1;function x({noDragClassName:_,handleSelector:S,domNode:k,isSelectable:E,nodeId:C,nodeClickDistance:R=0}){v=Ft(k);function A({x:q,y:F},$){const{nodeLookup:W,nodeExtent:I,snapGrid:H,snapToGrid:z,nodeOrigin:Q,onNodeDrag:D,onSelectionDrag:U,onError:K,updateNodePositions:j}=t();a={x:q,y:F};let X=!1,oe={x:0,y:0,x2:0,y2:0};if(l.size>1&&I){const V=ea(l);oe=ky(V)}for(const[V,G]of l){if(!W.has(V))continue;let Z={x:q-G.distance.x,y:F-G.distance.y};z&&(Z=zl(Z,H));let ne=[[I[0][0],I[0][1]],[I[1][0],I[1][1]]];if(l.size>1&&I&&!G.extent){const{positionAbsolute:de}=G.internals,fe=de.x-oe.x+I[0][0],he=de.x+G.measured.width-oe.x2+I[1][0],ge=de.y-oe.y+I[0][1],be=de.y+G.measured.height-oe.y2+I[1][1];ne=[[fe,ge],[he,be]]}const{position:re,positionAbsolute:se}=tT({nodeId:V,nextPosition:Z,nodeLookup:W,nodeExtent:ne,nodeOrigin:Q,onError:K});X=X||G.position.x!==re.x||G.position.y!==re.y,G.position=re,G.internals.positionAbsolute=se}if(X&&(j(l,!0),$&&(i||D||!C&&U))){const[V,G]=Ad({nodeId:C,dragItems:l,nodeLookup:W});i==null||i($,l,V,G),D==null||D($,V,G),C||U==null||U($,G)}}async function T(){if(!h)return;const{transform:q,panBy:F,autoPanSpeed:$}=t(),[W,I]=rT(d,h,$);(W!==0||I!==0)&&(a.x=(a.x??0)-W/q[2],a.y=(a.y??0)-I/q[2],await F({x:W,y:I})&&A(a,null)),u=requestAnimationFrame(T)}function L(q){var X;const{nodeLookup:F,multiSelectionActive:$,nodesDraggable:W,transform:I,snapGrid:H,snapToGrid:z,selectNodesOnDrag:Q,onNodeDragStart:D,onSelectionDragStart:U,unselectNodesAndEdges:K}=t();p=!0,(!Q||!E)&&!$&&C&&((X=F.get(C))!=null&&X.selected||K()),E&&Q&&C&&(e==null||e(C));const j=As(q.sourceEvent,{transform:I,snapGrid:H,snapToGrid:z,containerBounds:h});if(a=j,l=N4(F,W,j,C),l.size>0&&(n||D||!C&&U)){const[oe,V]=Ad({nodeId:C,dragItems:l,nodeLookup:F});n==null||n(q.sourceEvent,l,oe,V),D==null||D(q.sourceEvent,oe,V),C||U==null||U(q.sourceEvent,V)}}const O=LN().clickDistance(R).on("start",q=>{const{domNode:F,nodeDragThreshold:$,transform:W,snapGrid:I,snapToGrid:H}=t();h=(F==null?void 0:F.getBoundingClientRect())||null,m=!1,$===0&&L(q),a=As(q.sourceEvent,{transform:W,snapGrid:I,snapToGrid:H,containerBounds:h}),d=Gn(q.sourceEvent,h)}).on("drag",q=>{const{autoPanOnNodeDrag:F,transform:$,snapGrid:W,snapToGrid:I,nodeDragThreshold:H,nodeLookup:z}=t(),Q=As(q.sourceEvent,{transform:$,snapGrid:W,snapToGrid:I,containerBounds:h});if((q.sourceEvent.type==="touchmove"&&q.sourceEvent.touches.length>1||C&&!z.has(C))&&(m=!0),!m){if(!f&&F&&p&&(f=!0,T()),!p){const D=Q.xSnapped-(a.x??0),U=Q.ySnapped-(a.y??0);Math.sqrt(D*D+U*U)>H&&L(q)}(a.x!==Q.xSnapped||a.y!==Q.ySnapped)&&l&&p&&(d=Gn(q.sourceEvent,h),A(Q,q.sourceEvent))}}).on("end",q=>{if(!(!p||m)&&(f=!1,p=!1,cancelAnimationFrame(u),l.size>0)){const{nodeLookup:F,updateNodePositions:$,onNodeDragStop:W,onSelectionDragStop:I}=t();if($(l,!1),o||W||!C&&I){const[H,z]=Ad({nodeId:C,dragItems:l,nodeLookup:F,dragging:!1});o==null||o(q.sourceEvent,l,H,z),W==null||W(q.sourceEvent,H,z),C||I==null||I(q.sourceEvent,z)}}}).filter(q=>{const F=q.target;return!q.button&&(!_||!k_(F,`.${_}`,k))&&(!S||k_(F,S,k))});v.call(O)}function w(){v==null||v.on(".drag",null)}return{update:x,destroy:w}}function M4(e,t,n){const i=[],o={x:e.x-n,y:e.y-n,width:n*2,height:n*2};for(const a of t.values())Hs(o,mo(a))>0&&i.push(a);return i}const A4=250;function I4(e,t,n,i){var l,f;let o=[],a=1/0;const u=M4(e,n,t+A4);for(const d of u){const h=[...((l=d.internals.handleBounds)==null?void 0:l.source)??[],...((f=d.internals.handleBounds)==null?void 0:f.target)??[]];for(const p of h){if(i.nodeId===p.nodeId&&i.type===p.type&&i.id===p.id)continue;const{x:v,y:m}=Us(d,p,p.position,!0),x=Math.sqrt(Math.pow(v-e.x,2)+Math.pow(m-e.y,2));x>t||(x<a?(o=[{...p,x:v,y:m}],a=x):x===a&&o.push({...p,x:v,y:m}))}}if(!o.length)return null;if(o.length>1){const d=i.type==="source"?"target":"source";return o.find(h=>h.type===d)??o[0]}return o[0]}function vT(e,t,n,i,o,a=!1){var d,h,p;const u=i.get(e);if(!u)return null;const l=o==="strict"?(d=u.internals.handleBounds)==null?void 0:d[t]:[...((h=u.internals.handleBounds)==null?void 0:h.source)??[],...((p=u.internals.handleBounds)==null?void 0:p.target)??[]],f=(n?l==null?void 0:l.find(v=>v.id===n):l==null?void 0:l[0])??null;return f&&a?{...f,...Us(u,f,f.position,!0)}:f}function mT(e,t){return e||(t!=null&&t.classList.contains("target")?"target":t!=null&&t.classList.contains("source")?"source":null)}function L4(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}const yT=()=>!0;function O4(e,{connectionMode:t,connectionRadius:n,handleId:i,nodeId:o,edgeUpdaterType:a,isTarget:u,domNode:l,nodeLookup:f,lib:d,autoPanOnConnect:h,flowId:p,panBy:v,cancelConnection:m,onConnectStart:x,onConnect:w,onConnectEnd:_,isValidConnection:S=yT,onReconnectEnd:k,updateConnection:E,getTransform:C,getFromHandle:R,autoPanSpeed:A}){const T=aT(e.target);let L=0,O;const{x:q,y:F}=Gn(e),$=T==null?void 0:T.elementFromPoint(q,F),W=mT(a,$),I=l==null?void 0:l.getBoundingClientRect();if(!I||!W)return;const H=vT(o,W,i,f,t);if(!H)return;let z=Gn(e,I),Q=!1,D=null,U=!1,K=null;function j(){if(!h||!I)return;const[se,de]=rT(z,I,A);v({x:se,y:de}),L=requestAnimationFrame(j)}const X={...H,nodeId:o,type:W,position:H.position},oe=f.get(o),G={inProgress:!0,isValid:null,from:Us(oe,X,me.Left,!0),fromHandle:X,fromPosition:X.position,fromNode:oe,to:z,toHandle:null,toPosition:v_[X.position],toNode:null};E(G);let Z=G;x==null||x(e,{nodeId:o,handleId:i,handleType:W});function ne(se){if(!R()||!X){re(se);return}const de=C();z=Gn(se,I),O=I4(ta(z,de,!1,[1,1]),n,f,X),Q||(j(),Q=!0);const fe=wT(se,{handle:O,connectionMode:t,fromNodeId:o,fromHandleId:i,fromType:u?"target":"source",isValidConnection:S,doc:T,lib:d,flowId:p,nodeLookup:f});K=fe.handleDomNode,D=fe.connection,U=L4(!!O,fe.isValid);const he={...Z,isValid:U,to:O&&U?oT({x:O.x,y:O.y},de):z,toHandle:fe.toHandle,toPosition:U&&fe.toHandle?fe.toHandle.position:v_[X.position],toNode:fe.toHandle?f.get(fe.toHandle.nodeId):null};U&&O&&Z.toHandle&&he.toHandle&&Z.toHandle.type===he.toHandle.type&&Z.toHandle.nodeId===he.toHandle.nodeId&&Z.toHandle.id===he.toHandle.id&&Z.to.x===he.to.x&&Z.to.y===he.to.y||(E(he),Z=he)}function re(se){(O||K)&&D&&U&&(w==null||w(D));const{inProgress:de,...fe}=Z,he={...fe,toPosition:Z.toHandle?Z.toPosition:null};_==null||_(se,he),a&&(k==null||k(se,he)),m(),cancelAnimationFrame(L),Q=!1,U=!1,D=null,K=null,T.removeEventListener("mousemove",ne),T.removeEventListener("mouseup",re),T.removeEventListener("touchmove",ne),T.removeEventListener("touchend",re)}T.addEventListener("mousemove",ne),T.addEventListener("mouseup",re),T.addEventListener("touchmove",ne),T.addEventListener("touchend",re)}function wT(e,{handle:t,connectionMode:n,fromNodeId:i,fromHandleId:o,fromType:a,doc:u,lib:l,flowId:f,isValidConnection:d=yT,nodeLookup:h}){const p=a==="target",v=t?u.querySelector(`.${l}-flow__handle[data-id="${f}-${t==null?void 0:t.nodeId}-${t==null?void 0:t.id}-${t==null?void 0:t.type}"]`):null,{x:m,y:x}=Gn(e),w=u.elementFromPoint(m,x),_=w!=null&&w.classList.contains(`${l}-flow__handle`)?w:v,S={handleDomNode:_,isValid:!1,connection:null,toHandle:null};if(_){const k=mT(void 0,_),E=_.getAttribute("data-nodeid"),C=_.getAttribute("data-handleid"),R=_.classList.contains("connectable"),A=_.classList.contains("connectableend");if(!E||!k)return S;const T={source:p?E:i,sourceHandle:p?C:o,target:p?i:E,targetHandle:p?o:C};S.connection=T;const O=R&&A&&(n===go.Strict?p&&k==="source"||!p&&k==="target":E!==i||C!==o);S.isValid=O&&d(T),S.toHandle=vT(E,k,C,h,n,!1)}return S}const Ty={onPointerDown:O4,isValid:wT};function D4({domNode:e,panZoom:t,getTransform:n,getViewScale:i}){const o=Ft(e);function a({translateExtent:l,width:f,height:d,zoomStep:h=10,pannable:p=!0,zoomable:v=!0,inversePan:m=!1}){const x=E=>{const C=n();if(E.sourceEvent.type!=="wheel"||!t)return;const R=-E.sourceEvent.deltaY*(E.sourceEvent.deltaMode===1?.05:E.sourceEvent.deltaMode?1:.002)*h,A=C[2]*Math.pow(2,R);t.scaleTo(A)};let w=[0,0];const _=E=>{(E.sourceEvent.type==="mousedown"||E.sourceEvent.type==="touchstart")&&(w=[E.sourceEvent.clientX??E.sourceEvent.touches[0].clientX,E.sourceEvent.clientY??E.sourceEvent.touches[0].clientY])},S=E=>{const C=n();if(E.sourceEvent.type!=="mousemove"&&E.sourceEvent.type!=="touchmove"||!t)return;const R=[E.sourceEvent.clientX??E.sourceEvent.touches[0].clientX,E.sourceEvent.clientY??E.sourceEvent.touches[0].clientY],A=[R[0]-w[0],R[1]-w[1]];w=R;const T=i()*Math.max(C[2],Math.log(C[2]))*(m?-1:1),L={x:C[0]-A[0]*T,y:C[1]-A[1]*T},O=[[0,0],[f,d]];t.setViewportConstrained({x:L.x,y:L.y,zoom:C[2]},O,l)},k=YN().on("start",_).on("zoom",p?S:null).on("zoom.wheel",v?x:null);o.call(k,{})}function u(){o.on("zoom",null)}return{update:a,destroy:u,pointer:un}}const j4=(e,t)=>e.x!==t.x||e.y!==t.y||e.zoom!==t.k,Bl=e=>({x:e.x,y:e.y,zoom:e.k}),Id=({x:e,y:t,zoom:n})=>jl.translate(e,t).scale(n),Ji=(e,t)=>e.target.closest(`.${t}`),xT=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),Ld=(e,t=0,n=()=>{})=>{const i=typeof t=="number"&&t>0;return i||n(),i?e.transition().duration(t).on("end",n):e},_T=e=>{const t=e.ctrlKey&&vl()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t};function q4({zoomPanValues:e,noWheelClassName:t,d3Selection:n,d3Zoom:i,panOnScrollMode:o,panOnScrollSpeed:a,zoomOnPinch:u,onPanZoomStart:l,onPanZoom:f,onPanZoomEnd:d}){return h=>{if(Ji(h,t))return!1;h.preventDefault(),h.stopImmediatePropagation();const p=n.property("__zoom").k||1;if(h.ctrlKey&&u){const _=un(h),S=_T(h),k=p*Math.pow(2,S);i.scaleTo(n,k,_,h);return}const v=h.deltaMode===1?20:1;let m=o===si.Vertical?0:h.deltaX*v,x=o===si.Horizontal?0:h.deltaY*v;!vl()&&h.shiftKey&&o!==si.Vertical&&(m=h.deltaY*v,x=0),i.translateBy(n,-(m/p)*a,-(x/p)*a,{internal:!0});const w=Bl(n.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling||(e.isPanScrolling=!0,l==null||l(h,w)),e.isPanScrolling&&(f==null||f(h,w),e.panScrollTimeout=setTimeout(()=>{d==null||d(h,w),e.isPanScrolling=!1},150))}}function F4({noWheelClassName:e,preventScrolling:t,d3ZoomHandler:n}){return function(i,o){if(!t&&i.type==="wheel"&&!i.ctrlKey||Ji(i,e))return null;i.preventDefault(),n.call(this,i,o)}}function z4({zoomPanValues:e,onDraggingChange:t,onPanZoomStart:n}){return i=>{var a,u,l;if((a=i.sourceEvent)!=null&&a.internal)return;const o=Bl(i.transform);e.mouseButton=((u=i.sourceEvent)==null?void 0:u.button)||0,e.isZoomingOrPanning=!0,e.prevViewport=o,((l=i.sourceEvent)==null?void 0:l.type)==="mousedown"&&t(!0),n&&(n==null||n(i.sourceEvent,o))}}function $4({zoomPanValues:e,panOnDrag:t,onPaneContextMenu:n,onTransformChange:i,onPanZoom:o}){return a=>{var u,l;e.usedRightMouseButton=!!(n&&xT(t,e.mouseButton??0)),(u=a.sourceEvent)!=null&&u.sync||i([a.transform.x,a.transform.y,a.transform.k]),o&&!((l=a.sourceEvent)!=null&&l.internal)&&(o==null||o(a.sourceEvent,Bl(a.transform)))}}function B4({zoomPanValues:e,panOnDrag:t,panOnScroll:n,onDraggingChange:i,onPanZoomEnd:o,onPaneContextMenu:a}){return u=>{var l;if(!((l=u.sourceEvent)!=null&&l.internal)&&(e.isZoomingOrPanning=!1,a&&xT(t,e.mouseButton??0)&&!e.usedRightMouseButton&&u.sourceEvent&&a(u.sourceEvent),e.usedRightMouseButton=!1,i(!1),o&&j4(e.prevViewport,u.transform))){const f=Bl(u.transform);e.prevViewport=f,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{o==null||o(u.sourceEvent,f)},n?150:0)}}}function V4({zoomActivationKeyPressed:e,zoomOnScroll:t,zoomOnPinch:n,panOnDrag:i,panOnScroll:o,zoomOnDoubleClick:a,userSelectionActive:u,noWheelClassName:l,noPanClassName:f,lib:d}){return h=>{var x;const p=e||t,v=n&&h.ctrlKey;if(h.button===1&&h.type==="mousedown"&&(Ji(h,`${d}-flow__node`)||Ji(h,`${d}-flow__edge`)))return!0;if(!i&&!p&&!o&&!a&&!n||u||Ji(h,l)&&h.type==="wheel"||Ji(h,f)&&(h.type!=="wheel"||o&&h.type==="wheel"&&!e)||!n&&h.ctrlKey&&h.type==="wheel")return!1;if(!n&&h.type==="touchstart"&&((x=h.touches)==null?void 0:x.length)>1)return h.preventDefault(),!1;if(!p&&!o&&!v&&h.type==="wheel"||!i&&(h.type==="mousedown"||h.type==="touchstart")||Array.isArray(i)&&!i.includes(h.button)&&h.type==="mousedown")return!1;const m=Array.isArray(i)&&i.includes(h.button)||!h.button||h.button<=1;return(!h.ctrlKey||h.type==="wheel")&&m}}function H4({domNode:e,minZoom:t,maxZoom:n,paneClickDistance:i,translateExtent:o,viewport:a,onPanZoom:u,onPanZoomStart:l,onPanZoomEnd:f,onDraggingChange:d}){const h={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{x:0,y:0,zoom:0},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},p=e.getBoundingClientRect(),v=YN().clickDistance(!cn(i)||i<0?0:i).scaleExtent([t,n]).translateExtent(o),m=Ft(e).call(v);E({x:a.x,y:a.y,zoom:vo(a.zoom,t,n)},[[0,0],[p.width,p.height]],o);const x=m.on("wheel.zoom"),w=m.on("dblclick.zoom");v.wheelDelta(_T);function _($,W){return m?new Promise(I=>{v==null||v.transform(Ld(m,W==null?void 0:W.duration,()=>I(!0)),$)}):Promise.resolve(!1)}function S({noWheelClassName:$,noPanClassName:W,onPaneContextMenu:I,userSelectionActive:H,panOnScroll:z,panOnDrag:Q,panOnScrollMode:D,panOnScrollSpeed:U,preventScrolling:K,zoomOnPinch:j,zoomOnScroll:X,zoomOnDoubleClick:oe,zoomActivationKeyPressed:V,lib:G,onTransformChange:Z}){H&&!h.isZoomingOrPanning&&k();const re=z&&!V&&!H?q4({zoomPanValues:h,noWheelClassName:$,d3Selection:m,d3Zoom:v,panOnScrollMode:D,panOnScrollSpeed:U,zoomOnPinch:j,onPanZoomStart:l,onPanZoom:u,onPanZoomEnd:f}):F4({noWheelClassName:$,preventScrolling:K,d3ZoomHandler:x});if(m.on("wheel.zoom",re,{passive:!1}),!H){const de=z4({zoomPanValues:h,onDraggingChange:d,onPanZoomStart:l});v.on("start",de);const fe=$4({zoomPanValues:h,panOnDrag:Q,onPaneContextMenu:!!I,onPanZoom:u,onTransformChange:Z});v.on("zoom",fe);const he=B4({zoomPanValues:h,panOnDrag:Q,panOnScroll:z,onPaneContextMenu:I,onPanZoomEnd:f,onDraggingChange:d});v.on("end",he)}const se=V4({zoomActivationKeyPressed:V,panOnDrag:Q,zoomOnScroll:X,panOnScroll:z,zoomOnDoubleClick:oe,zoomOnPinch:j,userSelectionActive:H,noPanClassName:W,noWheelClassName:$,lib:G});v.filter(se),oe?m.on("dblclick.zoom",w):m.on("dblclick.zoom",null)}function k(){v.on("zoom",null)}async function E($,W,I){const H=Id($),z=v==null?void 0:v.constrain()(H,W,I);return z&&await _(z),new Promise(Q=>Q(z))}async function C($,W){const I=Id($);return await _(I,W),new Promise(H=>H(I))}function R($){if(m){const W=Id($),I=m.property("__zoom");(I.k!==$.zoom||I.x!==$.x||I.y!==$.y)&&(v==null||v.transform(m,W,null,{sync:!0}))}}function A(){const $=m?KN(m.node()):{x:0,y:0,k:1};return{x:$.x,y:$.y,zoom:$.k}}function T($,W){return m?new Promise(I=>{v==null||v.scaleTo(Ld(m,W==null?void 0:W.duration,()=>I(!0)),$)}):Promise.resolve(!1)}function L($,W){return m?new Promise(I=>{v==null||v.scaleBy(Ld(m,W==null?void 0:W.duration,()=>I(!0)),$)}):Promise.resolve(!1)}function O($){v==null||v.scaleExtent($)}function q($){v==null||v.translateExtent($)}function F($){const W=!cn($)||$<0?0:$;v==null||v.clickDistance(W)}return{update:S,destroy:k,setViewport:C,setViewportConstrained:E,getViewport:A,scaleTo:T,scaleBy:L,setScaleExtent:O,setTranslateExtent:q,syncViewport:R,setClickDistance:F}}var Is;(function(e){e.Line="line",e.Handle="handle"})(Is||(Is={}));function U4({width:e,prevWidth:t,height:n,prevHeight:i,affectsX:o,affectsY:a}){const u=e-t,l=n-i,f=[u>0?1:u<0?-1:0,l>0?1:l<0?-1:0];return u&&o&&(f[0]=f[0]*-1),l&&a&&(f[1]=f[1]*-1),f}function W4(e){const t=e.includes("right")||e.includes("left"),n=e.includes("bottom")||e.includes("top"),i=e.includes("left"),o=e.includes("top");return{isHorizontal:t,isVertical:n,affectsX:i,affectsY:o}}function Rr(e,t){return Math.max(0,t-e)}function Pr(e,t){return Math.max(0,e-t)}function zu(e,t,n){return Math.max(0,t-e,e-n)}function R_(e,t){return e?!t:t}function G4(e,t,n,i,o,a,u,l){let{affectsX:f,affectsY:d}=t;const{isHorizontal:h,isVertical:p}=t,v=h&&p,{xSnapped:m,ySnapped:x}=n,{minWidth:w,maxWidth:_,minHeight:S,maxHeight:k}=i,{x:E,y:C,width:R,height:A,aspectRatio:T}=e;let L=Math.floor(h?m-e.pointerX:0),O=Math.floor(p?x-e.pointerY:0);const q=R+(f?-L:L),F=A+(d?-O:O),$=-a[0]*R,W=-a[1]*A;let I=zu(q,w,_),H=zu(F,S,k);if(u){let D=0,U=0;f&&L<0?D=Rr(E+L+$,u[0][0]):!f&&L>0&&(D=Pr(E+q+$,u[1][0])),d&&O<0?U=Rr(C+O+W,u[0][1]):!d&&O>0&&(U=Pr(C+F+W,u[1][1])),I=Math.max(I,D),H=Math.max(H,U)}if(l){let D=0,U=0;f&&L>0?D=Pr(E+L,l[0][0]):!f&&L<0&&(D=Rr(E+q,l[1][0])),d&&O>0?U=Pr(C+O,l[0][1]):!d&&O<0&&(U=Rr(C+F,l[1][1])),I=Math.max(I,D),H=Math.max(H,U)}if(o){if(h){const D=zu(q/T,S,k)*T;if(I=Math.max(I,D),u){let U=0;!f&&!d||f&&!d&&v?U=Pr(C+W+q/T,u[1][1])*T:U=Rr(C+W+(f?L:-L)/T,u[0][1])*T,I=Math.max(I,U)}if(l){let U=0;!f&&!d||f&&!d&&v?U=Rr(C+q/T,l[1][1])*T:U=Pr(C+(f?L:-L)/T,l[0][1])*T,I=Math.max(I,U)}}if(p){const D=zu(F*T,w,_)/T;if(H=Math.max(H,D),u){let U=0;!f&&!d||d&&!f&&v?U=Pr(E+F*T+$,u[1][0])/T:U=Rr(E+(d?O:-O)*T+$,u[0][0])/T,H=Math.max(H,U)}if(l){let U=0;!f&&!d||d&&!f&&v?U=Rr(E+F*T,l[1][0])/T:U=Pr(E+(d?O:-O)*T,l[0][0])/T,H=Math.max(H,U)}}}O=O+(O<0?H:-H),L=L+(L<0?I:-I),o&&(v?q>F*T?O=(R_(f,d)?-L:L)/T:L=(R_(f,d)?-O:O)*T:h?(O=L/T,d=f):(L=O*T,f=d));const z=f?E+L:E,Q=d?C+O:C;return{width:R+(f?-L:L),height:A+(d?-O:O),x:a[0]*L*(f?-1:1)+z,y:a[1]*O*(d?-1:1)+Q}}const bT={width:0,height:0,x:0,y:0},K4={...bT,pointerX:0,pointerY:0,aspectRatio:1};function Y4(e){return[[0,0],[e.measured.width,e.measured.height]]}function X4(e,t,n){const i=t.position.x+e.position.x,o=t.position.y+e.position.y,a=e.measured.width??0,u=e.measured.height??0,l=n[0]*a,f=n[1]*u;return[[i-l,o-f],[i+a-l,o+u-f]]}function Q4({domNode:e,nodeId:t,getStoreItems:n,onChange:i,onEnd:o}){const a=Ft(e);function u({controlPosition:f,boundaries:d,keepAspectRatio:h,onResizeStart:p,onResize:v,onResizeEnd:m,shouldResize:x}){let w={...bT},_={...K4};const S=W4(f);let k,E=null,C=[],R,A,T;const L=LN().on("start",O=>{const{nodeLookup:q,transform:F,snapGrid:$,snapToGrid:W,nodeOrigin:I,paneDomNode:H}=n();if(k=q.get(t),!k)return;E=(H==null?void 0:H.getBoundingClientRect())??null;const{xSnapped:z,ySnapped:Q}=As(O.sourceEvent,{transform:F,snapGrid:$,snapToGrid:W,containerBounds:E});w={width:k.measured.width??0,height:k.measured.height??0,x:k.position.x??0,y:k.position.y??0},_={...w,pointerX:z,pointerY:Q,aspectRatio:w.width/w.height},R=void 0,k.parentId&&(k.extent==="parent"||k.expandParent)&&(R=q.get(k.parentId),A=R&&k.extent==="parent"?Y4(R):void 0),C=[],T=void 0;for(const[D,U]of q)if(U.parentId===t&&(C.push({id:D,position:{...U.position},extent:U.extent}),U.extent==="parent"||U.expandParent)){const K=X4(U,k,U.origin??I);T?T=[[Math.min(K[0][0],T[0][0]),Math.min(K[0][1],T[0][1])],[Math.max(K[1][0],T[1][0]),Math.max(K[1][1],T[1][1])]]:T=K}p==null||p(O,{...w})}).on("drag",O=>{const{transform:q,snapGrid:F,snapToGrid:$,nodeOrigin:W}=n(),I=As(O.sourceEvent,{transform:q,snapGrid:F,snapToGrid:$,containerBounds:E}),H=[];if(!k)return;const{x:z,y:Q,width:D,height:U}=w,K={},j=k.origin??W,{width:X,height:oe,x:V,y:G}=G4(_,S,I,d,h,j,A,T),Z=X!==D,ne=oe!==U,re=V!==z&&Z,se=G!==Q&≠if(!re&&!se&&!Z&&!ne)return;if((re||se||j[0]===1||j[1]===1)&&(K.x=re?V:w.x,K.y=se?G:w.y,w.x=K.x,w.y=K.y,C.length>0)){const ge=V-z,be=G-Q;for(const we of C)we.position={x:we.position.x-ge+j[0]*(X-D),y:we.position.y-be+j[1]*(oe-U)},H.push(we)}if((Z||ne)&&(K.width=Z?X:w.width,K.height=ne?oe:w.height,w.width=K.width,w.height=K.height),R&&k.expandParent){const ge=j[0]*(K.width??0);K.x&&K.x<ge&&(w.x=ge,_.x=_.x-(K.x-ge));const be=j[1]*(K.height??0);K.y&&K.y<be&&(w.y=be,_.y=_.y-(K.y-be))}const de=U4({width:w.width,prevWidth:D,height:w.height,prevHeight:U,affectsX:S.affectsX,affectsY:S.affectsY}),fe={...w,direction:de};(x==null?void 0:x(O,fe))!==!1&&(v==null||v(O,fe),i(K,H))}).on("end",O=>{m==null||m(O,{...w}),o==null||o()});a.call(L)}function l(){a.on(".drag",null)}return{update:u,destroy:l}}var Od={exports:{}},Dd={},jd={exports:{}},qd={};/**
|
|
161
|
-
* @license React
|
|
162
|
-
* use-sync-external-store-shim.production.min.js
|
|
163
|
-
*
|
|
164
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
165
|
-
*
|
|
166
|
-
* This source code is licensed under the MIT license found in the
|
|
167
|
-
* LICENSE file in the root directory of this source tree.
|
|
168
|
-
*/var P_;function Z4(){if(P_)return qd;P_=1;var e=hi();function t(p,v){return p===v&&(p!==0||1/p===1/v)||p!==p&&v!==v}var n=typeof Object.is=="function"?Object.is:t,i=e.useState,o=e.useEffect,a=e.useLayoutEffect,u=e.useDebugValue;function l(p,v){var m=v(),x=i({inst:{value:m,getSnapshot:v}}),w=x[0].inst,_=x[1];return a(function(){w.value=m,w.getSnapshot=v,f(w)&&_({inst:w})},[p,m,v]),o(function(){return f(w)&&_({inst:w}),p(function(){f(w)&&_({inst:w})})},[p]),u(m),m}function f(p){var v=p.getSnapshot;p=p.value;try{var m=v();return!n(p,m)}catch{return!0}}function d(p,v){return v()}var h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?d:l;return qd.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:h,qd}var N_;function J4(){return N_||(N_=1,jd.exports=Z4()),jd.exports}/**
|
|
169
|
-
* @license React
|
|
170
|
-
* use-sync-external-store-shim/with-selector.production.min.js
|
|
171
|
-
*
|
|
172
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
173
|
-
*
|
|
174
|
-
* This source code is licensed under the MIT license found in the
|
|
175
|
-
* LICENSE file in the root directory of this source tree.
|
|
176
|
-
*/var T_;function e$(){if(T_)return Dd;T_=1;var e=hi(),t=J4();function n(d,h){return d===h&&(d!==0||1/d===1/h)||d!==d&&h!==h}var i=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,a=e.useRef,u=e.useEffect,l=e.useMemo,f=e.useDebugValue;return Dd.useSyncExternalStoreWithSelector=function(d,h,p,v,m){var x=a(null);if(x.current===null){var w={hasValue:!1,value:null};x.current=w}else w=x.current;x=l(function(){function S(A){if(!k){if(k=!0,E=A,A=v(A),m!==void 0&&w.hasValue){var T=w.value;if(m(T,A))return C=T}return C=A}if(T=C,i(E,A))return T;var L=v(A);return m!==void 0&&m(T,L)?T:(E=A,C=L)}var k=!1,E,C,R=p===void 0?null:p;return[function(){return S(h())},R===null?void 0:function(){return S(R())}]},[h,p,v,m]);var _=o(d,x[0],x[1]);return u(function(){w.hasValue=!0,w.value=_},[_]),f(_),_},Dd}var M_;function t$(){return M_||(M_=1,Od.exports=e$()),Od.exports}var n$=t$();const r$=xl(n$),A_=e=>{let t;const n=new Set,i=(h,p)=>{const v=typeof h=="function"?h(t):h;if(!Object.is(v,t)){const m=t;t=p??(typeof v!="object"||v===null)?v:Object.assign({},t,v),n.forEach(x=>x(t,m))}},o=()=>t,f={setState:i,getState:o,getInitialState:()=>d,subscribe:h=>(n.add(h),()=>n.delete(h)),destroy:()=>{n.clear()}},d=t=e(i,o,f);return f},i$=e=>e?A_(e):A_,{useDebugValue:o$}=ER,{useSyncExternalStoreWithSelector:s$}=r$,a$=e=>e;function ST(e,t=a$,n){const i=s$(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return o$(i),i}const I_=(e,t)=>{const n=i$(e),i=(o,a=t)=>ST(n,o,a);return Object.assign(i,n),i},u$=(e,t)=>e?I_(e,t):I_;function Qe(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[i,o]of e)if(!Object.is(o,t.get(i)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const i of e)if(!t.has(i))return!1;return!0}const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(const i of n)if(!Object.prototype.hasOwnProperty.call(t,i)||!Object.is(e[i],t[i]))return!1;return!0}const Vl=P.createContext(null),l$=Vl.Provider,ET=er.error001();function Te(e,t){const n=P.useContext(Vl);if(n===null)throw new Error(ET);return ST(n,e,t)}function Ve(){const e=P.useContext(Vl);if(e===null)throw new Error(ET);return P.useMemo(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}const L_={display:"none"},c$={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},CT="react-flow__node-desc",kT="react-flow__edge-desc",f$="react-flow__aria-live",d$=e=>e.ariaLiveMessage;function h$({rfId:e}){const t=Te(d$);return M.jsx("div",{id:`${f$}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:c$,children:t})}function p$({rfId:e,disableKeyboardA11y:t}){return M.jsxs(M.Fragment,{children:[M.jsxs("div",{id:`${CT}-${e}`,style:L_,children:["Press enter or space to select a node.",!t&&"You can then use the arrow keys to move the node around."," Press delete to remove it and escape to cancel."," "]}),M.jsx("div",{id:`${kT}-${e}`,style:L_,children:"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel."}),!t&&M.jsx(h$,{rfId:e})]})}const g$=e=>e.userSelectionActive?"none":"all",g0=P.forwardRef(({position:e="top-left",children:t,className:n,style:i,...o},a)=>{const u=Te(g$),l=`${e}`.split("-");return M.jsx("div",{className:et(["react-flow__panel",n,...l]),style:{...i,pointerEvents:u},ref:a,...o,children:t})});function v$({proOptions:e,position:t="bottom-right"}){return e!=null&&e.hideAttribution?null:M.jsx(g0,{position:t,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev",children:M.jsx("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const m$=e=>{const t=[],n=[];for(const[,i]of e.nodeLookup)i.selected&&t.push(i.internals.userNode);for(const[,i]of e.edgeLookup)i.selected&&n.push(i);return{selectedNodes:t,selectedEdges:n}},$u=e=>e.id;function y$(e,t){return Qe(e.selectedNodes.map($u),t.selectedNodes.map($u))&&Qe(e.selectedEdges.map($u),t.selectedEdges.map($u))}function w$({onSelectionChange:e}){const t=Ve(),{selectedNodes:n,selectedEdges:i}=Te(m$,y$);return P.useEffect(()=>{const o={nodes:n,edges:i};e==null||e(o),t.getState().onSelectionChangeHandlers.forEach(a=>a(o))},[n,i,e]),null}const x$=e=>!!e.onSelectionChangeHandlers;function _$({onSelectionChange:e}){const t=Te(x$);return e||t?M.jsx(w$,{onSelectionChange:e}):null}const RT=[0,0],b$={x:0,y:0,zoom:1},S$=["nodes","edges","defaultNodes","defaultEdges","onConnect","onConnectStart","onConnectEnd","onClickConnectStart","onClickConnectEnd","nodesDraggable","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","onBeforeDelete","debug","autoPanSpeed","paneClickDistance"],O_=[...S$,"rfId"],E$=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,setPaneClickDistance:e.setPaneClickDistance}),D_={translateExtent:Bs,nodeOrigin:RT,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1",paneClickDistance:0};function C$(e){const{setNodes:t,setEdges:n,setMinZoom:i,setMaxZoom:o,setTranslateExtent:a,setNodeExtent:u,reset:l,setDefaultNodesAndEdges:f,setPaneClickDistance:d}=Te(E$,Qe),h=Ve();P.useEffect(()=>(f(e.defaultNodes,e.defaultEdges),()=>{p.current=D_,l()}),[]);const p=P.useRef(D_);return P.useEffect(()=>{for(const v of O_){const m=e[v],x=p.current[v];m!==x&&(typeof e[v]>"u"||(v==="nodes"?t(m):v==="edges"?n(m):v==="minZoom"?i(m):v==="maxZoom"?o(m):v==="translateExtent"?a(m):v==="nodeExtent"?u(m):v==="paneClickDistance"?d(m):v==="fitView"?h.setState({fitViewOnInit:m}):v==="fitViewOptions"?h.setState({fitViewOnInitOptions:m}):h.setState({[v]:m})))}p.current=e},O_.map(v=>e[v])),null}function j_(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function k$(e){var i;const[t,n]=P.useState(e==="system"?null:e);return P.useEffect(()=>{if(e!=="system"){n(e);return}const o=j_(),a=()=>n(o!=null&&o.matches?"dark":"light");return a(),o==null||o.addEventListener("change",a),()=>{o==null||o.removeEventListener("change",a)}},[e]),t!==null?t:(i=j_())!=null&&i.matches?"dark":"light"}const q_=typeof document<"u"?document:null;function Ws(e=null,t={target:q_,actInsideInputWithModifier:!0}){const[n,i]=P.useState(!1),o=P.useRef(!1),a=P.useRef(new Set([])),[u,l]=P.useMemo(()=>{if(e!==null){const d=(Array.isArray(e)?e:[e]).filter(p=>typeof p=="string").map(p=>p.replace("+",`
|
|
177
|
-
`).replace(`
|
|
178
|
-
|
|
179
|
-
`,`
|
|
180
|
-
+`).split(`
|
|
181
|
-
`)),h=d.reduce((p,v)=>p.concat(...v),[]);return[d,h]}return[[],[]]},[e]);return P.useEffect(()=>{const f=(t==null?void 0:t.target)||q_;if(e!==null){const d=v=>{if(o.current=v.ctrlKey||v.metaKey||v.shiftKey,(!o.current||o.current&&!t.actInsideInputWithModifier)&&Ry(v))return!1;const x=z_(v.code,l);a.current.add(v[x]),F_(u,a.current,!1)&&(v.preventDefault(),i(!0))},h=v=>{if((!o.current||o.current&&!t.actInsideInputWithModifier)&&Ry(v))return!1;const x=z_(v.code,l);F_(u,a.current,!0)?(i(!1),a.current.clear()):a.current.delete(v[x]),v.key==="Meta"&&a.current.clear(),o.current=!1},p=()=>{a.current.clear(),i(!1)};return f==null||f.addEventListener("keydown",d),f==null||f.addEventListener("keyup",h),window.addEventListener("blur",p),window.addEventListener("contextmenu",p),()=>{f==null||f.removeEventListener("keydown",d),f==null||f.removeEventListener("keyup",h),window.removeEventListener("blur",p),window.removeEventListener("contextmenu",p)}}},[e,i]),n}function F_(e,t,n){return e.filter(i=>n||i.length===t.size).some(i=>i.every(o=>t.has(o)))}function z_(e,t){return t.includes(e)?"code":"key"}const R$=()=>{const e=Ve();return P.useMemo(()=>({zoomIn:t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1.2,{duration:t==null?void 0:t.duration}):Promise.resolve(!1)},zoomOut:t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1/1.2,{duration:t==null?void 0:t.duration}):Promise.resolve(!1)},zoomTo:(t,n)=>{const{panZoom:i}=e.getState();return i?i.scaleTo(t,{duration:n==null?void 0:n.duration}):Promise.resolve(!1)},getZoom:()=>e.getState().transform[2],setViewport:async(t,n)=>{const{transform:[i,o,a],panZoom:u}=e.getState();return u?(await u.setViewport({x:t.x??i,y:t.y??o,zoom:t.zoom??a},{duration:n==null?void 0:n.duration}),Promise.resolve(!0)):Promise.resolve(!1)},getViewport:()=>{const[t,n,i]=e.getState().transform;return{x:t,y:n,zoom:i}},fitView:t=>{const{nodeLookup:n,minZoom:i,maxZoom:o,panZoom:a,domNode:u}=e.getState();if(!a||!u)return Promise.resolve(!1);const l=Ey(n,t),{width:f,height:d}=$l(u);return Cy({nodes:l,width:f,height:d,minZoom:i,maxZoom:o,panZoom:a},t)},setCenter:async(t,n,i)=>{const{width:o,height:a,maxZoom:u,panZoom:l}=e.getState(),f=typeof(i==null?void 0:i.zoom)<"u"?i.zoom:u,d=o/2-t*f,h=a/2-n*f;return l?(await l.setViewport({x:d,y:h,zoom:f},{duration:i==null?void 0:i.duration}),Promise.resolve(!0)):Promise.resolve(!1)},fitBounds:async(t,n)=>{const{width:i,height:o,minZoom:a,maxZoom:u,panZoom:l}=e.getState(),f=l0(t,i,o,a,u,(n==null?void 0:n.padding)??.1);return l?(await l.setViewport(f,{duration:n==null?void 0:n.duration}),Promise.resolve(!0)):Promise.resolve(!1)},screenToFlowPosition:(t,n={snapToGrid:!0})=>{const{transform:i,snapGrid:o,domNode:a}=e.getState();if(!a)return t;const{x:u,y:l}=a.getBoundingClientRect(),f={x:t.x-u,y:t.y-l};return ta(f,i,n.snapToGrid,o)},flowToScreenPosition:t=>{const{transform:n,domNode:i}=e.getState();if(!i)return t;const{x:o,y:a}=i.getBoundingClientRect(),u=oT(t,n);return{x:u.x+o,y:u.y+a}}}),[])};function PT(e,t){const n=[],i=new Map,o=[];for(const a of e)if(a.type==="add"){o.push(a);continue}else if(a.type==="remove"||a.type==="replace")i.set(a.id,[a]);else{const u=i.get(a.id);u?u.push(a):i.set(a.id,[a])}for(const a of t){const u=i.get(a.id);if(!u){n.push(a);continue}if(u[0].type==="remove")continue;if(u[0].type==="replace"){n.push({...u[0].item});continue}const l={...a};for(const f of u)P$(f,l);n.push(l)}return o.length&&o.forEach(a=>{a.index!==void 0?n.splice(a.index,0,{...a.item}):n.push({...a.item})}),n}function P$(e,t){switch(e.type){case"select":{t.selected=e.selected;break}case"position":{typeof e.position<"u"&&(t.position=e.position),typeof e.dragging<"u"&&(t.dragging=e.dragging);break}case"dimensions":{typeof e.dimensions<"u"&&(t.measured??(t.measured={}),t.measured.width=e.dimensions.width,t.measured.height=e.dimensions.height,e.setAttributes&&(t.width=e.dimensions.width,t.height=e.dimensions.height)),typeof e.resizing=="boolean"&&(t.resizing=e.resizing);break}}}function NT(e,t){return PT(e,t)}function TT(e,t){return PT(e,t)}function ti(e,t){return{id:e,type:"select",selected:t}}function eo(e,t=new Set,n=!1){const i=[];for(const[o,a]of e){const u=t.has(o);!(a.selected===void 0&&!u)&&a.selected!==u&&(n&&(a.selected=u),i.push(ti(a.id,u)))}return i}function $_({items:e=[],lookup:t}){var o;const n=[],i=new Map(e.map(a=>[a.id,a]));for(const[a,u]of e.entries()){const l=t.get(u.id),f=((o=l==null?void 0:l.internals)==null?void 0:o.userNode)??l;f!==void 0&&f!==u&&n.push({id:u.id,item:u,type:"replace"}),f===void 0&&n.push({item:u,type:"add",index:a})}for(const[a]of t)i.get(a)===void 0&&n.push({id:a,type:"remove"});return n}function B_(e){return{id:e.id,type:"remove"}}const V_=e=>a4(e),N$=e=>JN(e);function MT(e){return P.forwardRef(e)}const T$=typeof window<"u"?P.useLayoutEffect:P.useEffect;function H_(e){const[t,n]=P.useState(BigInt(0)),[i]=P.useState(()=>M$(()=>n(o=>o+BigInt(1))));return T$(()=>{const o=i.get();o.length&&(e(o),i.reset())},[t]),i}function M$(e){let t=[];return{get:()=>t,reset:()=>{t=[]},push:n=>{t.push(n),e()}}}const AT=P.createContext(null);function A$({children:e}){const t=Ve(),n=P.useCallback(l=>{const{nodes:f=[],setNodes:d,hasDefaultNodes:h,onNodesChange:p,nodeLookup:v}=t.getState();let m=f;for(const x of l)m=typeof x=="function"?x(m):x;h?d(m):p&&p($_({items:m,lookup:v}))},[]),i=H_(n),o=P.useCallback(l=>{const{edges:f=[],setEdges:d,hasDefaultEdges:h,onEdgesChange:p,edgeLookup:v}=t.getState();let m=f;for(const x of l)m=typeof x=="function"?x(m):x;h?d(m):p&&p($_({items:m,lookup:v}))},[]),a=H_(o),u=P.useMemo(()=>({nodeQueue:i,edgeQueue:a}),[]);return M.jsx(AT.Provider,{value:u,children:e})}function I$(){const e=P.useContext(AT);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}const L$=e=>!!e.panZoom;function Hl(){const e=R$(),t=Ve(),n=I$(),i=Te(L$),o=P.useMemo(()=>{const a=p=>t.getState().nodeLookup.get(p),u=p=>{n.nodeQueue.push(p)},l=p=>{n.edgeQueue.push(p)},f=p=>{var S,k;const{nodeLookup:v,nodeOrigin:m}=t.getState(),x=V_(p)?p:v.get(p.id),w=x.parentId?sT(x.position,x.measured,x.parentId,v,m):x.position,_={...x,position:w,width:((S=x.measured)==null?void 0:S.width)??x.width,height:((k=x.measured)==null?void 0:k.height)??x.height};return mo(_)},d=(p,v,m={replace:!1})=>{u(x=>x.map(w=>{if(w.id===p){const _=typeof v=="function"?v(w):v;return m.replace&&V_(_)?_:{...w,..._}}return w}))},h=(p,v,m={replace:!1})=>{l(x=>x.map(w=>{if(w.id===p){const _=typeof v=="function"?v(w):v;return m.replace&&N$(_)?_:{...w,..._}}return w}))};return{getNodes:()=>t.getState().nodes.map(p=>({...p})),getNode:p=>{var v;return(v=a(p))==null?void 0:v.internals.userNode},getInternalNode:a,getEdges:()=>{const{edges:p=[]}=t.getState();return p.map(v=>({...v}))},getEdge:p=>t.getState().edgeLookup.get(p),setNodes:u,setEdges:l,addNodes:p=>{const v=Array.isArray(p)?p:[p];n.nodeQueue.push(m=>[...m,...v])},addEdges:p=>{const v=Array.isArray(p)?p:[p];n.edgeQueue.push(m=>[...m,...v])},toObject:()=>{const{nodes:p=[],edges:v=[],transform:m}=t.getState(),[x,w,_]=m;return{nodes:p.map(S=>({...S})),edges:v.map(S=>({...S})),viewport:{x,y:w,zoom:_}}},deleteElements:async({nodes:p=[],edges:v=[]})=>{const{nodes:m,edges:x,onNodesDelete:w,onEdgesDelete:_,triggerNodeChanges:S,triggerEdgeChanges:k,onDelete:E,onBeforeDelete:C}=t.getState(),{nodes:R,edges:A}=await c4({nodesToRemove:p,edgesToRemove:v,nodes:m,edges:x,onBeforeDelete:C}),T=A.length>0,L=R.length>0;if(T){const O=A.map(B_);_==null||_(A),k(O)}if(L){const O=R.map(B_);w==null||w(R),S(O)}return(L||T)&&(E==null||E({nodes:R,edges:A})),{deletedNodes:R,deletedEdges:A}},getIntersectingNodes:(p,v=!0,m)=>{const x=y_(p),w=x?p:f(p),_=m!==void 0;return w?(m||t.getState().nodes).filter(S=>{const k=t.getState().nodeLookup.get(S.id);if(k&&!x&&(S.id===p.id||!k.internals.positionAbsolute))return!1;const E=mo(_?S:k),C=Hs(E,w);return v&&C>0||C>=w.width*w.height}):[]},isNodeIntersecting:(p,v,m=!0)=>{const w=y_(p)?p:f(p);if(!w)return!1;const _=Hs(w,v);return m&&_>0||_>=w.width*w.height},updateNode:d,updateNodeData:(p,v,m={replace:!1})=>{d(p,x=>{const w=typeof v=="function"?v(x):v;return m.replace?{...x,data:w}:{...x,data:{...x.data,...w}}},m)},updateEdge:h,updateEdgeData:(p,v,m={replace:!1})=>{h(p,x=>{const w=typeof v=="function"?v(x):v;return m.replace?{...x,data:w}:{...x,data:{...x.data,...w}}},m)},getNodesBounds:p=>{const{nodeLookup:v,nodeOrigin:m}=t.getState();return u4(p,{nodeLookup:v,nodeOrigin:m})},getHandleConnections:({type:p,id:v,nodeId:m})=>{var x;return Array.from(((x=t.getState().connectionLookup.get(`${m}-${p}-${v??null}`))==null?void 0:x.values())??[])}}},[]);return P.useMemo(()=>({...o,...e,viewportInitialized:i}),[i])}const U_=e=>e.selected,O$={actInsideInputWithModifier:!1},D$=typeof window<"u"?window:void 0;function j$({deleteKeyCode:e,multiSelectionKeyCode:t}){const n=Ve(),{deleteElements:i}=Hl(),o=Ws(e,O$),a=Ws(t,{target:D$});P.useEffect(()=>{if(o){const{edges:u,nodes:l}=n.getState();i({nodes:l.filter(U_),edges:u.filter(U_)}),n.setState({nodesSelectionActive:!1})}},[o]),P.useEffect(()=>{n.setState({multiSelectionActive:a})},[a])}function q$(e){const t=Ve();P.useEffect(()=>{const n=()=>{var o,a;if(!e.current)return!1;const i=$l(e.current);(i.height===0||i.width===0)&&((a=(o=t.getState()).onError)==null||a.call(o,"004",er.error004())),t.setState({width:i.width||500,height:i.height||500})};if(e.current){n(),window.addEventListener("resize",n);const i=new ResizeObserver(()=>n());return i.observe(e.current),()=>{window.removeEventListener("resize",n),i&&e.current&&i.unobserve(e.current)}}},[])}const Ul={position:"absolute",width:"100%",height:"100%",top:0,left:0},F$=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib});function z$({onPaneContextMenu:e,zoomOnScroll:t=!0,zoomOnPinch:n=!0,panOnScroll:i=!1,panOnScrollSpeed:o=.5,panOnScrollMode:a=si.Free,zoomOnDoubleClick:u=!0,panOnDrag:l=!0,defaultViewport:f,translateExtent:d,minZoom:h,maxZoom:p,zoomActivationKeyCode:v,preventScrolling:m=!0,children:x,noWheelClassName:w,noPanClassName:_,onViewportChange:S,isControlledViewport:k,paneClickDistance:E}){const C=Ve(),R=P.useRef(null),{userSelectionActive:A,lib:T}=Te(F$,Qe),L=Ws(v),O=P.useRef();q$(R);const q=P.useCallback(F=>{S==null||S({x:F[0],y:F[1],zoom:F[2]}),k||C.setState({transform:F})},[S,k]);return P.useEffect(()=>{if(R.current){O.current=H4({domNode:R.current,minZoom:h,maxZoom:p,translateExtent:d,viewport:f,paneClickDistance:E,onDraggingChange:I=>C.setState({paneDragging:I}),onPanZoomStart:(I,H)=>{const{onViewportChangeStart:z,onMoveStart:Q}=C.getState();Q==null||Q(I,H),z==null||z(H)},onPanZoom:(I,H)=>{const{onViewportChange:z,onMove:Q}=C.getState();Q==null||Q(I,H),z==null||z(H)},onPanZoomEnd:(I,H)=>{const{onViewportChangeEnd:z,onMoveEnd:Q}=C.getState();Q==null||Q(I,H),z==null||z(H)}});const{x:F,y:$,zoom:W}=O.current.getViewport();return C.setState({panZoom:O.current,transform:[F,$,W],domNode:R.current.closest(".react-flow")}),()=>{var I;(I=O.current)==null||I.destroy()}}},[]),P.useEffect(()=>{var F;(F=O.current)==null||F.update({onPaneContextMenu:e,zoomOnScroll:t,zoomOnPinch:n,panOnScroll:i,panOnScrollSpeed:o,panOnScrollMode:a,zoomOnDoubleClick:u,panOnDrag:l,zoomActivationKeyPressed:L,preventScrolling:m,noPanClassName:_,userSelectionActive:A,noWheelClassName:w,lib:T,onTransformChange:q})},[e,t,n,i,o,a,u,l,L,m,_,A,w,T,q]),M.jsx("div",{className:"react-flow__renderer",ref:R,style:Ul,children:x})}const $$=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function B$(){const{userSelectionActive:e,userSelectionRect:t}=Te($$,Qe);return e&&t?M.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}const Fd=(e,t)=>n=>{n.target===t.current&&(e==null||e(n))},V$=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,dragging:e.paneDragging});function H$({isSelecting:e,selectionKeyPressed:t,selectionMode:n=Vs.Full,panOnDrag:i,selectionOnDrag:o,onSelectionStart:a,onSelectionEnd:u,onPaneClick:l,onPaneContextMenu:f,onPaneScroll:d,onPaneMouseEnter:h,onPaneMouseMove:p,onPaneMouseLeave:v,children:m}){const x=P.useRef(null),w=Ve(),_=P.useRef(0),S=P.useRef(0),k=P.useRef(),E=P.useRef(new Map),{userSelectionActive:C,elementsSelectable:R,dragging:A}=Te(V$,Qe),T=R&&(e||C),L=P.useRef(!1),O=P.useRef(!1),q=()=>{w.setState({userSelectionActive:!1,userSelectionRect:null}),_.current=0,S.current=0},F=D=>{if(L.current){L.current=!1;return}l==null||l(D),w.getState().resetSelectedElements(),w.setState({nodesSelectionActive:!1})},$=D=>{if(Array.isArray(i)&&(i!=null&&i.includes(2))){D.preventDefault();return}f==null||f(D)},W=d?D=>d(D):void 0,I=D=>{var V,G,Z,ne;const{resetSelectedElements:U,domNode:K,edgeLookup:j}=w.getState();if(k.current=K==null?void 0:K.getBoundingClientRect(),!R||!e||D.button!==0||D.target!==x.current||!k.current)return;(G=(V=D.target)==null?void 0:V.setPointerCapture)==null||G.call(V,D.pointerId),O.current=!0,L.current=!1,E.current=new Map;for(const[re,se]of j)E.current.set(se.source,((Z=E.current.get(se.source))==null?void 0:Z.add(re))||new Set([re])),E.current.set(se.target,((ne=E.current.get(se.target))==null?void 0:ne.add(re))||new Set([re]));const{x:X,y:oe}=Gn(D.nativeEvent,k.current);U(),w.setState({userSelectionRect:{width:0,height:0,startX:X,startY:oe,x:X,y:oe}}),a==null||a(D)},H=D=>{const{userSelectionRect:U,edgeLookup:K,transform:j,nodeLookup:X,triggerNodeChanges:oe,triggerEdgeChanges:V}=w.getState();if(!k.current||!U)return;L.current=!0;const{x:G,y:Z}=Gn(D.nativeEvent,k.current),{startX:ne,startY:re}=U,se={startX:ne,startY:re,x:G<ne?G:ne,y:Z<re?Z:re,width:Math.abs(G-ne),height:Math.abs(Z-re)},de=eT(X,se,j,n===Vs.Partial,!0),fe=new Set,he=new Set;for(const ge of de){he.add(ge.id);const be=E.current.get(ge.id);if(be)for(const we of be)fe.add(we)}if(_.current!==he.size){_.current=he.size;const ge=eo(X,he,!0);oe(ge)}if(S.current!==fe.size){S.current=fe.size;const ge=eo(K,fe);V(ge)}w.setState({userSelectionRect:se,userSelectionActive:!0,nodesSelectionActive:!1})},z=D=>{var K,j;if(D.button!==0||!O.current)return;(j=(K=D.target)==null?void 0:K.releasePointerCapture)==null||j.call(K,D.pointerId);const{userSelectionRect:U}=w.getState();!C&&U&&D.target===x.current&&(F==null||F(D)),_.current>0&&w.setState({nodesSelectionActive:!0}),q(),u==null||u(D),(t||o)&&(L.current=!1),O.current=!1},Q=i===!0||Array.isArray(i)&&i.includes(0);return M.jsxs("div",{className:et(["react-flow__pane",{draggable:Q,dragging:A,selection:e}]),onClick:T?void 0:Fd(F,x),onContextMenu:Fd($,x),onWheel:Fd(W,x),onPointerEnter:T?void 0:h,onPointerDown:T?I:p,onPointerMove:T?H:p,onPointerUp:T?z:void 0,onPointerLeave:v,ref:x,style:Ul,children:[m,M.jsx(B$,{})]})}function My({id:e,store:t,unselect:n=!1,nodeRef:i}){const{addSelectedNodes:o,unselectNodesAndEdges:a,multiSelectionActive:u,nodeLookup:l,onError:f}=t.getState(),d=l.get(e);if(!d){f==null||f("012",er.error012(e));return}t.setState({nodesSelectionActive:!1}),d.selected?(n||d.selected&&u)&&(a({nodes:[d],edges:[]}),requestAnimationFrame(()=>{var h;return(h=i==null?void 0:i.current)==null?void 0:h.blur()})):o([e])}function IT({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:i,nodeId:o,isSelectable:a,nodeClickDistance:u}){const l=Ve(),[f,d]=P.useState(!1),h=P.useRef();return P.useEffect(()=>{h.current=T4({getStoreItems:()=>l.getState(),onNodeMouseDown:p=>{My({id:p,store:l,nodeRef:e})},onDragStart:()=>{d(!0)},onDragStop:()=>{d(!1)}})},[]),P.useEffect(()=>{var p,v;if(t)(p=h.current)==null||p.destroy();else if(e.current)return(v=h.current)==null||v.update({noDragClassName:n,handleSelector:i,domNode:e.current,isSelectable:a,nodeId:o,nodeClickDistance:u}),()=>{var m;(m=h.current)==null||m.destroy()}},[n,i,t,a,e,o]),f}const U$=e=>t=>t.selected&&(t.draggable||e&&typeof t.draggable>"u");function LT(){const e=Ve();return P.useCallback(n=>{const{nodeExtent:i,snapToGrid:o,snapGrid:a,nodesDraggable:u,onError:l,updateNodePositions:f,nodeLookup:d,nodeOrigin:h}=e.getState(),p=new Map,v=U$(u),m=o?a[0]:5,x=o?a[1]:5,w=n.direction.x*m*n.factor,_=n.direction.y*x*n.factor;for(const[,S]of d){if(!v(S))continue;let k={x:S.internals.positionAbsolute.x+w,y:S.internals.positionAbsolute.y+_};o&&(k=zl(k,a));const{position:E,positionAbsolute:C}=tT({nodeId:S.id,nextPosition:k,nodeLookup:d,nodeExtent:i,nodeOrigin:h,onError:l});S.position=E,S.internals.positionAbsolute=C,p.set(S.id,S)}f(p)},[])}const v0=P.createContext(null),W$=v0.Provider;v0.Consumer;const OT=()=>P.useContext(v0),G$=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),K$=(e,t,n)=>i=>{const{connectionClickStartHandle:o,connectionMode:a,connection:u}=i,{fromHandle:l,toHandle:f,isValid:d}=u,h=(f==null?void 0:f.nodeId)===e&&(f==null?void 0:f.id)===t&&(f==null?void 0:f.type)===n;return{connectingFrom:(l==null?void 0:l.nodeId)===e&&(l==null?void 0:l.id)===t&&(l==null?void 0:l.type)===n,connectingTo:h,clickConnecting:(o==null?void 0:o.nodeId)===e&&(o==null?void 0:o.id)===t&&(o==null?void 0:o.type)===n,isPossibleEndHandle:a===go.Strict?(l==null?void 0:l.type)!==n:e!==(l==null?void 0:l.nodeId)||t!==(l==null?void 0:l.id),connectionInProcess:!!l,valid:h&&d}};function Y$({type:e="source",position:t=me.Top,isValidConnection:n,isConnectable:i=!0,isConnectableStart:o=!0,isConnectableEnd:a=!0,id:u,onConnect:l,children:f,className:d,onMouseDown:h,onTouchStart:p,...v},m){var I,H;const x=u||null,w=e==="target",_=Ve(),S=OT(),{connectOnClick:k,noPanClassName:E,rfId:C}=Te(G$,Qe),{connectingFrom:R,connectingTo:A,clickConnecting:T,isPossibleEndHandle:L,connectionInProcess:O,valid:q}=Te(K$(S,x,e),Qe);S||(H=(I=_.getState()).onError)==null||H.call(I,"010",er.error010());const F=z=>{const{defaultEdgeOptions:Q,onConnect:D,hasDefaultEdges:U}=_.getState(),K={...Q,...z};if(U){const{edges:j,setEdges:X}=_.getState();X(m4(K,j))}D==null||D(K),l==null||l(K)},$=z=>{if(!S)return;const Q=uT(z.nativeEvent);if(o&&(Q&&z.button===0||!Q)){const D=_.getState();Ty.onPointerDown(z.nativeEvent,{autoPanOnConnect:D.autoPanOnConnect,connectionMode:D.connectionMode,connectionRadius:D.connectionRadius,domNode:D.domNode,nodeLookup:D.nodeLookup,lib:D.lib,isTarget:w,handleId:x,nodeId:S,flowId:D.rfId,panBy:D.panBy,cancelConnection:D.cancelConnection,onConnectStart:D.onConnectStart,onConnectEnd:D.onConnectEnd,updateConnection:D.updateConnection,onConnect:F,isValidConnection:n||D.isValidConnection,getTransform:()=>_.getState().transform,getFromHandle:()=>_.getState().connection.fromHandle,autoPanSpeed:D.autoPanSpeed})}Q?h==null||h(z):p==null||p(z)},W=z=>{const{onClickConnectStart:Q,onClickConnectEnd:D,connectionClickStartHandle:U,connectionMode:K,isValidConnection:j,lib:X,rfId:oe,nodeLookup:V,connection:G}=_.getState();if(!S||!U&&!o)return;if(!U){Q==null||Q(z.nativeEvent,{nodeId:S,handleId:x,handleType:e}),_.setState({connectionClickStartHandle:{nodeId:S,type:e,id:x}});return}const Z=aT(z.target),ne=n||j,{connection:re,isValid:se}=Ty.isValid(z.nativeEvent,{handle:{nodeId:S,id:x,type:e},connectionMode:K,fromNodeId:U.nodeId,fromHandleId:U.id||null,fromType:U.type,isValidConnection:ne,flowId:oe,doc:Z,lib:X,nodeLookup:V});se&&re&&F(re);const de=structuredClone(G);delete de.inProgress,de.toPosition=de.toHandle?de.toHandle.position:null,D==null||D(z,de),_.setState({connectionClickStartHandle:null})};return M.jsx("div",{"data-handleid":x,"data-nodeid":S,"data-handlepos":t,"data-id":`${C}-${S}-${x}-${e}`,className:et(["react-flow__handle",`react-flow__handle-${t}`,"nodrag",E,d,{source:!w,target:w,connectable:i,connectablestart:o,connectableend:a,clickconnecting:T,connectingfrom:R,connectingto:A,valid:q,connectionindicator:i&&(!O||L)&&(O?a:o)}]),onMouseDown:$,onTouchStart:$,onClick:k?W:void 0,ref:m,...v,children:f})}const Gs=P.memo(MT(Y$));function X$({data:e,isConnectable:t,sourcePosition:n=me.Bottom}){return M.jsxs(M.Fragment,{children:[e==null?void 0:e.label,M.jsx(Gs,{type:"source",position:n,isConnectable:t})]})}function Q$({data:e,isConnectable:t,targetPosition:n=me.Top,sourcePosition:i=me.Bottom}){return M.jsxs(M.Fragment,{children:[M.jsx(Gs,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label,M.jsx(Gs,{type:"source",position:i,isConnectable:t})]})}function Z$(){return null}function J$({data:e,isConnectable:t,targetPosition:n=me.Top}){return M.jsxs(M.Fragment,{children:[M.jsx(Gs,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label]})}const yl={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},W_={input:X$,default:Q$,output:J$,group:Z$};function eB(e){var t,n,i,o;return e.internals.handleBounds===void 0?{width:e.width??e.initialWidth??((t=e.style)==null?void 0:t.width),height:e.height??e.initialHeight??((n=e.style)==null?void 0:n.height)}:{width:e.width??((i=e.style)==null?void 0:i.width),height:e.height??((o=e.style)==null?void 0:o.height)}}const tB=e=>{const{width:t,height:n,x:i,y:o}=ea(e.nodeLookup,{filter:a=>!!a.selected});return{width:cn(t)?t:null,height:cn(n)?n:null,userSelectionActive:e.userSelectionActive,transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]}) translate(${i}px,${o}px)`}};function nB({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){const i=Ve(),{width:o,height:a,transformString:u,userSelectionActive:l}=Te(tB,Qe),f=LT(),d=P.useRef(null);if(P.useEffect(()=>{var v;n||(v=d.current)==null||v.focus({preventScroll:!0})},[n]),IT({nodeRef:d}),l||!o||!a)return null;const h=e?v=>{const m=i.getState().nodes.filter(x=>x.selected);e(v,m)}:void 0,p=v=>{Object.prototype.hasOwnProperty.call(yl,v.key)&&(v.preventDefault(),f({direction:yl[v.key],factor:v.shiftKey?4:1}))};return M.jsx("div",{className:et(["react-flow__nodesselection","react-flow__container",t]),style:{transform:u},children:M.jsx("div",{ref:d,className:"react-flow__nodesselection-rect",onContextMenu:h,tabIndex:n?void 0:-1,onKeyDown:n?void 0:p,style:{width:o,height:a}})})}const G_=typeof window<"u"?window:void 0,rB=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function DT({children:e,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:i,onPaneMouseLeave:o,onPaneContextMenu:a,onPaneScroll:u,paneClickDistance:l,deleteKeyCode:f,selectionKeyCode:d,selectionOnDrag:h,selectionMode:p,onSelectionStart:v,onSelectionEnd:m,multiSelectionKeyCode:x,panActivationKeyCode:w,zoomActivationKeyCode:_,elementsSelectable:S,zoomOnScroll:k,zoomOnPinch:E,panOnScroll:C,panOnScrollSpeed:R,panOnScrollMode:A,zoomOnDoubleClick:T,panOnDrag:L,defaultViewport:O,translateExtent:q,minZoom:F,maxZoom:$,preventScrolling:W,onSelectionContextMenu:I,noWheelClassName:H,noPanClassName:z,disableKeyboardA11y:Q,onViewportChange:D,isControlledViewport:U}){const{nodesSelectionActive:K,userSelectionActive:j}=Te(rB),X=Ws(d,{target:G_}),oe=Ws(w,{target:G_}),V=oe||L,G=oe||C,Z=h&&V!==!0,ne=X||j||Z;return j$({deleteKeyCode:f,multiSelectionKeyCode:x}),M.jsx(z$,{onPaneContextMenu:a,elementsSelectable:S,zoomOnScroll:k,zoomOnPinch:E,panOnScroll:G,panOnScrollSpeed:R,panOnScrollMode:A,zoomOnDoubleClick:T,panOnDrag:!X&&V,defaultViewport:O,translateExtent:q,minZoom:F,maxZoom:$,zoomActivationKeyCode:_,preventScrolling:W,noWheelClassName:H,noPanClassName:z,onViewportChange:D,isControlledViewport:U,paneClickDistance:l,children:M.jsxs(H$,{onSelectionStart:v,onSelectionEnd:m,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:i,onPaneMouseLeave:o,onPaneContextMenu:a,onPaneScroll:u,panOnDrag:V,isSelecting:!!ne,selectionMode:p,selectionKeyPressed:X,selectionOnDrag:Z,children:[e,K&&M.jsx(nB,{onSelectionContextMenu:I,noPanClassName:z,disableKeyboardA11y:Q})]})})}DT.displayName="FlowRenderer";const iB=P.memo(DT),oB=e=>t=>e?eT(t.nodeLookup,{x:0,y:0,width:t.width,height:t.height},t.transform,!0).map(n=>n.id):Array.from(t.nodeLookup.keys());function sB(e){return Te(P.useCallback(oB(e),[e]),Qe)}const aB=e=>e.updateNodeInternals;function uB(){const e=Te(aB),[t]=P.useState(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(n=>{const i=new Map;n.forEach(o=>{const a=o.target.getAttribute("data-id");i.set(a,{id:a,nodeElement:o.target,force:!0})}),e(i)}));return P.useEffect(()=>()=>{t==null||t.disconnect()},[t]),t}function lB({node:e,nodeType:t,hasDimensions:n,resizeObserver:i}){const o=Ve(),a=P.useRef(null),u=P.useRef(null),l=P.useRef(e.sourcePosition),f=P.useRef(e.targetPosition),d=P.useRef(t),h=n&&!!e.internals.handleBounds;return P.useEffect(()=>{a.current&&!e.hidden&&(!h||u.current!==a.current)&&(u.current&&(i==null||i.unobserve(u.current)),i==null||i.observe(a.current),u.current=a.current)},[h,e.hidden]),P.useEffect(()=>()=>{u.current&&(i==null||i.unobserve(u.current),u.current=null)},[]),P.useEffect(()=>{if(a.current){const p=d.current!==t,v=l.current!==e.sourcePosition,m=f.current!==e.targetPosition;(p||v||m)&&(d.current=t,l.current=e.sourcePosition,f.current=e.targetPosition,o.getState().updateNodeInternals(new Map([[e.id,{id:e.id,nodeElement:a.current,force:!0}]])))}},[e.id,t,e.sourcePosition,e.targetPosition]),a}function cB({id:e,onClick:t,onMouseEnter:n,onMouseMove:i,onMouseLeave:o,onContextMenu:a,onDoubleClick:u,nodesDraggable:l,elementsSelectable:f,nodesConnectable:d,nodesFocusable:h,resizeObserver:p,noDragClassName:v,noPanClassName:m,disableKeyboardA11y:x,rfId:w,nodeTypes:_,nodeExtent:S,nodeClickDistance:k,onError:E}){const{node:C,internals:R,isParent:A}=Te(re=>{const se=re.nodeLookup.get(e),de=re.parentLookup.has(e);return{node:se,internals:se.internals,isParent:de}},Qe);let T=C.type||"default",L=(_==null?void 0:_[T])||W_[T];L===void 0&&(E==null||E("003",er.error003(T)),T="default",L=W_.default);const O=!!(C.draggable||l&&typeof C.draggable>"u"),q=!!(C.selectable||f&&typeof C.selectable>"u"),F=!!(C.connectable||d&&typeof C.connectable>"u"),$=!!(C.focusable||h&&typeof C.focusable>"u"),W=Ve(),I=c0(C),H=lB({node:C,nodeType:T,hasDimensions:I,resizeObserver:p}),z=IT({nodeRef:H,disabled:C.hidden||!O,noDragClassName:v,handleSelector:C.dragHandle,nodeId:e,isSelectable:q,nodeClickDistance:k}),Q=LT();if(C.hidden)return null;const D=tr(C),U=eB(C),K=q||O||t||n||i||o,j=n?re=>n(re,{...R.userNode}):void 0,X=i?re=>i(re,{...R.userNode}):void 0,oe=o?re=>o(re,{...R.userNode}):void 0,V=a?re=>a(re,{...R.userNode}):void 0,G=u?re=>u(re,{...R.userNode}):void 0,Z=re=>{const{selectNodesOnDrag:se,nodeDragThreshold:de}=W.getState();q&&(!se||!O||de>0)&&My({id:e,store:W,nodeRef:H}),t&&t(re,{...R.userNode})},ne=re=>{if(!(Ry(re.nativeEvent)||x))if(XN.includes(re.key)&&q){const se=re.key==="Escape";My({id:e,store:W,unselect:se,nodeRef:H})}else O&&C.selected&&Object.prototype.hasOwnProperty.call(yl,re.key)&&(re.preventDefault(),W.setState({ariaLiveMessage:`Moved selected node ${re.key.replace("Arrow","").toLowerCase()}. New position, x: ${~~R.positionAbsolute.x}, y: ${~~R.positionAbsolute.y}`}),Q({direction:yl[re.key],factor:re.shiftKey?4:1}))};return M.jsx("div",{className:et(["react-flow__node",`react-flow__node-${T}`,{[m]:O},C.className,{selected:C.selected,selectable:q,parent:A,draggable:O,dragging:z}]),ref:H,style:{zIndex:R.z,transform:`translate(${R.positionAbsolute.x}px,${R.positionAbsolute.y}px)`,pointerEvents:K?"all":"none",visibility:I?"visible":"hidden",...C.style,...U},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:j,onMouseMove:X,onMouseLeave:oe,onContextMenu:V,onClick:Z,onDoubleClick:G,onKeyDown:$?ne:void 0,tabIndex:$?0:void 0,role:$?"button":void 0,"aria-describedby":x?void 0:`${CT}-${w}`,"aria-label":C.ariaLabel,children:M.jsx(W$,{value:e,children:M.jsx(L,{id:e,data:C.data,type:T,positionAbsoluteX:R.positionAbsolute.x,positionAbsoluteY:R.positionAbsolute.y,selected:C.selected,selectable:q,draggable:O,deletable:C.deletable??!0,isConnectable:F,sourcePosition:C.sourcePosition,targetPosition:C.targetPosition,dragging:z,dragHandle:C.dragHandle,zIndex:R.z,parentId:C.parentId,...D})})})}const fB=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function jT(e){const{nodesDraggable:t,nodesConnectable:n,nodesFocusable:i,elementsSelectable:o,onError:a}=Te(fB,Qe),u=sB(e.onlyRenderVisibleElements),l=uB();return M.jsx("div",{className:"react-flow__nodes",style:Ul,children:u.map(f=>M.jsx(cB,{id:f,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:l,nodesDraggable:t,nodesConnectable:n,nodesFocusable:i,elementsSelectable:o,nodeClickDistance:e.nodeClickDistance,onError:a},f))})}jT.displayName="NodeRenderer";const dB=P.memo(jT);function hB(e){return Te(P.useCallback(n=>{if(!e)return n.edges.map(o=>o.id);const i=[];if(n.width&&n.height)for(const o of n.edges){const a=n.nodeLookup.get(o.source),u=n.nodeLookup.get(o.target);a&&u&&p4({sourceNode:a,targetNode:u,width:n.width,height:n.height,transform:n.transform})&&i.push(o.id)}return i},[e]),Qe)}const pB=({color:e="none",strokeWidth:t=1})=>M.jsx("polyline",{style:{stroke:e,strokeWidth:t},strokeLinecap:"round",strokeLinejoin:"round",fill:"none",points:"-5,-4 0,0 -5,4"}),gB=({color:e="none",strokeWidth:t=1})=>M.jsx("polyline",{style:{stroke:e,fill:e,strokeWidth:t},strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"}),K_={[pl.Arrow]:pB,[pl.ArrowClosed]:gB};function vB(e){const t=Ve();return P.useMemo(()=>{var o,a;return Object.prototype.hasOwnProperty.call(K_,e)?K_[e]:((a=(o=t.getState()).onError)==null||a.call(o,"009",er.error009(e)),null)},[e])}const mB=({id:e,type:t,color:n,width:i=12.5,height:o=12.5,markerUnits:a="strokeWidth",strokeWidth:u,orient:l="auto-start-reverse"})=>{const f=vB(t);return f?M.jsx("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${i}`,markerHeight:`${o}`,viewBox:"-10 -10 20 20",markerUnits:a,orient:l,refX:"0",refY:"0",children:M.jsx(f,{color:n,strokeWidth:u})}):null},qT=({defaultColor:e,rfId:t})=>{const n=Te(a=>a.edges),i=Te(a=>a.defaultEdgeOptions),o=P.useMemo(()=>b4(n,{id:t,defaultColor:e,defaultMarkerStart:i==null?void 0:i.markerStart,defaultMarkerEnd:i==null?void 0:i.markerEnd}),[n,i,t,e]);return o.length?M.jsx("svg",{className:"react-flow__marker",children:M.jsx("defs",{children:o.map(a=>M.jsx(mB,{id:a.id,type:a.type,color:a.color,width:a.width,height:a.height,markerUnits:a.markerUnits,strokeWidth:a.strokeWidth,orient:a.orient},a.id))})}):null};qT.displayName="MarkerDefinitions";var yB=P.memo(qT);function FT({x:e,y:t,label:n,labelStyle:i={},labelShowBg:o=!0,labelBgStyle:a={},labelBgPadding:u=[2,4],labelBgBorderRadius:l=2,children:f,className:d,...h}){const[p,v]=P.useState({x:1,y:0,width:0,height:0}),m=et(["react-flow__edge-textwrapper",d]),x=P.useRef(null);return P.useEffect(()=>{if(x.current){const w=x.current.getBBox();v({x:w.x,y:w.y,width:w.width,height:w.height})}},[n]),typeof n>"u"||!n?null:M.jsxs("g",{transform:`translate(${e-p.width/2} ${t-p.height/2})`,className:m,visibility:p.width?"visible":"hidden",...h,children:[o&&M.jsx("rect",{width:p.width+2*u[0],x:-u[0],y:-u[1],height:p.height+2*u[1],className:"react-flow__edge-textbg",style:a,rx:l,ry:l}),M.jsx("text",{className:"react-flow__edge-text",y:p.height/2,dy:"0.3em",ref:x,style:i,children:n}),f]})}FT.displayName="EdgeText";const wB=P.memo(FT);function na({path:e,labelX:t,labelY:n,label:i,labelStyle:o,labelShowBg:a,labelBgStyle:u,labelBgPadding:l,labelBgBorderRadius:f,interactionWidth:d=20,...h}){return M.jsxs(M.Fragment,{children:[M.jsx("path",{...h,d:e,fill:"none",className:et(["react-flow__edge-path",h.className])}),d&&M.jsx("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:d,className:"react-flow__edge-interaction"}),i&&cn(t)&&cn(n)?M.jsx(wB,{x:t,y:n,label:i,labelStyle:o,labelShowBg:a,labelBgStyle:u,labelBgPadding:l,labelBgBorderRadius:f}):null]})}function Y_({pos:e,x1:t,y1:n,x2:i,y2:o}){return e===me.Left||e===me.Right?[.5*(t+i),n]:[t,.5*(n+o)]}function zT({sourceX:e,sourceY:t,sourcePosition:n=me.Bottom,targetX:i,targetY:o,targetPosition:a=me.Top}){const[u,l]=Y_({pos:n,x1:e,y1:t,x2:i,y2:o}),[f,d]=Y_({pos:a,x1:i,y1:o,x2:e,y2:t}),[h,p,v,m]=lT({sourceX:e,sourceY:t,targetX:i,targetY:o,sourceControlX:u,sourceControlY:l,targetControlX:f,targetControlY:d});return[`M${e},${t} C${u},${l} ${f},${d} ${i},${o}`,h,p,v,m]}function $T(e){return P.memo(({id:t,sourceX:n,sourceY:i,targetX:o,targetY:a,sourcePosition:u=me.Bottom,targetPosition:l=me.Top,label:f,labelStyle:d,labelShowBg:h,labelBgStyle:p,labelBgPadding:v,labelBgBorderRadius:m,style:x,markerEnd:w,markerStart:_,interactionWidth:S})=>{const[k,E,C]=zT({sourceX:n,sourceY:i,sourcePosition:u,targetX:o,targetY:a,targetPosition:l}),R=e.isInternal?void 0:t;return M.jsx(na,{id:R,path:k,labelX:E,labelY:C,label:f,labelStyle:d,labelShowBg:h,labelBgStyle:p,labelBgPadding:v,labelBgBorderRadius:m,style:x,markerEnd:w,markerStart:_,interactionWidth:S})})}const xB=$T({isInternal:!1}),BT=$T({isInternal:!0});xB.displayName="SimpleBezierEdge";BT.displayName="SimpleBezierEdgeInternal";function VT(e){return P.memo(({id:t,sourceX:n,sourceY:i,targetX:o,targetY:a,label:u,labelStyle:l,labelShowBg:f,labelBgStyle:d,labelBgPadding:h,labelBgBorderRadius:p,style:v,sourcePosition:m=me.Bottom,targetPosition:x=me.Top,markerEnd:w,markerStart:_,pathOptions:S,interactionWidth:k})=>{const[E,C,R]=ml({sourceX:n,sourceY:i,sourcePosition:m,targetX:o,targetY:a,targetPosition:x,borderRadius:S==null?void 0:S.borderRadius,offset:S==null?void 0:S.offset}),A=e.isInternal?void 0:t;return M.jsx(na,{id:A,path:E,labelX:C,labelY:R,label:u,labelStyle:l,labelShowBg:f,labelBgStyle:d,labelBgPadding:h,labelBgBorderRadius:p,style:v,markerEnd:w,markerStart:_,interactionWidth:k})})}const HT=VT({isInternal:!1}),UT=VT({isInternal:!0});HT.displayName="SmoothStepEdge";UT.displayName="SmoothStepEdgeInternal";function WT(e){return P.memo(({id:t,...n})=>{var o;const i=e.isInternal?void 0:t;return M.jsx(HT,{...n,id:i,pathOptions:P.useMemo(()=>{var a;return{borderRadius:0,offset:(a=n.pathOptions)==null?void 0:a.offset}},[(o=n.pathOptions)==null?void 0:o.offset])})})}const _B=WT({isInternal:!1}),GT=WT({isInternal:!0});_B.displayName="StepEdge";GT.displayName="StepEdgeInternal";function KT(e){return P.memo(({id:t,sourceX:n,sourceY:i,targetX:o,targetY:a,label:u,labelStyle:l,labelShowBg:f,labelBgStyle:d,labelBgPadding:h,labelBgBorderRadius:p,style:v,markerEnd:m,markerStart:x,interactionWidth:w})=>{const[_,S,k]=dT({sourceX:n,sourceY:i,targetX:o,targetY:a}),E=e.isInternal?void 0:t;return M.jsx(na,{id:E,path:_,labelX:S,labelY:k,label:u,labelStyle:l,labelShowBg:f,labelBgStyle:d,labelBgPadding:h,labelBgBorderRadius:p,style:v,markerEnd:m,markerStart:x,interactionWidth:w})})}const bB=KT({isInternal:!1}),YT=KT({isInternal:!0});bB.displayName="StraightEdge";YT.displayName="StraightEdgeInternal";function XT(e){return P.memo(({id:t,sourceX:n,sourceY:i,targetX:o,targetY:a,sourcePosition:u=me.Bottom,targetPosition:l=me.Top,label:f,labelStyle:d,labelShowBg:h,labelBgStyle:p,labelBgPadding:v,labelBgBorderRadius:m,style:x,markerEnd:w,markerStart:_,pathOptions:S,interactionWidth:k})=>{const[E,C,R]=cT({sourceX:n,sourceY:i,sourcePosition:u,targetX:o,targetY:a,targetPosition:l,curvature:S==null?void 0:S.curvature}),A=e.isInternal?void 0:t;return M.jsx(na,{id:A,path:E,labelX:C,labelY:R,label:f,labelStyle:d,labelShowBg:h,labelBgStyle:p,labelBgPadding:v,labelBgBorderRadius:m,style:x,markerEnd:w,markerStart:_,interactionWidth:k})})}const SB=XT({isInternal:!1}),QT=XT({isInternal:!0});SB.displayName="BezierEdge";QT.displayName="BezierEdgeInternal";const X_={default:QT,straight:YT,step:GT,smoothstep:UT,simplebezier:BT},Q_={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},EB=(e,t,n)=>n===me.Left?e-t:n===me.Right?e+t:e,CB=(e,t,n)=>n===me.Top?e-t:n===me.Bottom?e+t:e,Z_="react-flow__edgeupdater";function J_({position:e,centerX:t,centerY:n,radius:i=10,onMouseDown:o,onMouseEnter:a,onMouseOut:u,type:l}){return M.jsx("circle",{onMouseDown:o,onMouseEnter:a,onMouseOut:u,className:et([Z_,`${Z_}-${l}`]),cx:EB(t,i,e),cy:CB(n,i,e),r:i,stroke:"transparent",fill:"transparent"})}function kB({isReconnectable:e,reconnectRadius:t,edge:n,sourceX:i,sourceY:o,targetX:a,targetY:u,sourcePosition:l,targetPosition:f,onReconnect:d,onReconnectStart:h,onReconnectEnd:p,setReconnecting:v,setUpdateHover:m}){const x=Ve(),w=(C,R)=>{if(C.button!==0)return;const{autoPanOnConnect:A,domNode:T,isValidConnection:L,connectionMode:O,connectionRadius:q,lib:F,onConnectStart:$,onConnectEnd:W,cancelConnection:I,nodeLookup:H,rfId:z,panBy:Q,updateConnection:D}=x.getState(),U=R.type==="target";v(!0),h==null||h(C,n,R.type);const K=(X,oe)=>{v(!1),p==null||p(X,n,R.type,oe)},j=X=>d==null?void 0:d(n,X);Ty.onPointerDown(C.nativeEvent,{autoPanOnConnect:A,connectionMode:O,connectionRadius:q,domNode:T,handleId:R.id,nodeId:R.nodeId,nodeLookup:H,isTarget:U,edgeUpdaterType:R.type,lib:F,flowId:z,cancelConnection:I,panBy:Q,isValidConnection:L,onConnect:j,onConnectStart:$,onConnectEnd:W,onReconnectEnd:K,updateConnection:D,getTransform:()=>x.getState().transform,getFromHandle:()=>x.getState().connection.fromHandle})},_=C=>w(C,{nodeId:n.target,id:n.targetHandle??null,type:"target"}),S=C=>w(C,{nodeId:n.source,id:n.sourceHandle??null,type:"source"}),k=()=>m(!0),E=()=>m(!1);return M.jsxs(M.Fragment,{children:[(e===!0||e==="source")&&M.jsx(J_,{position:l,centerX:i,centerY:o,radius:t,onMouseDown:_,onMouseEnter:k,onMouseOut:E,type:"source"}),(e===!0||e==="target")&&M.jsx(J_,{position:f,centerX:a,centerY:u,radius:t,onMouseDown:S,onMouseEnter:k,onMouseOut:E,type:"target"})]})}function RB({id:e,edgesFocusable:t,edgesReconnectable:n,elementsSelectable:i,onClick:o,onDoubleClick:a,onContextMenu:u,onMouseEnter:l,onMouseMove:f,onMouseLeave:d,reconnectRadius:h,onReconnect:p,onReconnectStart:v,onReconnectEnd:m,rfId:x,edgeTypes:w,noPanClassName:_,onError:S,disableKeyboardA11y:k}){let E=Te(he=>he.edgeLookup.get(e));const C=Te(he=>he.defaultEdgeOptions);E=C?{...C,...E}:E;let R=E.type||"default",A=(w==null?void 0:w[R])||X_[R];A===void 0&&(S==null||S("011",er.error011(R)),R="default",A=X_.default);const T=!!(E.focusable||t&&typeof E.focusable>"u"),L=typeof p<"u"&&(E.reconnectable||n&&typeof E.reconnectable>"u"),O=!!(E.selectable||i&&typeof E.selectable>"u"),q=P.useRef(null),[F,$]=P.useState(!1),[W,I]=P.useState(!1),H=Ve(),{zIndex:z,sourceX:Q,sourceY:D,targetX:U,targetY:K,sourcePosition:j,targetPosition:X}=Te(P.useCallback(he=>{const ge=he.nodeLookup.get(E.source),be=he.nodeLookup.get(E.target);if(!ge||!be)return{zIndex:E.zIndex,...Q_};const we=_4({id:e,sourceNode:ge,targetNode:be,sourceHandle:E.sourceHandle||null,targetHandle:E.targetHandle||null,connectionMode:he.connectionMode,onError:S});return{zIndex:h4({selected:E.selected,zIndex:E.zIndex,sourceNode:ge,targetNode:be,elevateOnSelect:he.elevateEdgesOnSelect}),...we||Q_}},[E.source,E.target,E.sourceHandle,E.targetHandle,E.selected,E.zIndex]),Qe),oe=P.useMemo(()=>E.markerStart?`url('#${Py(E.markerStart,x)}')`:void 0,[E.markerStart,x]),V=P.useMemo(()=>E.markerEnd?`url('#${Py(E.markerEnd,x)}')`:void 0,[E.markerEnd,x]);if(E.hidden||Q===null||D===null||U===null||K===null)return null;const G=he=>{var De;const{addSelectedEdges:ge,unselectNodesAndEdges:be,multiSelectionActive:we}=H.getState();O&&(H.setState({nodesSelectionActive:!1}),E.selected&&we?(be({nodes:[],edges:[E]}),(De=q.current)==null||De.blur()):ge([e])),o&&o(he,E)},Z=a?he=>{a(he,{...E})}:void 0,ne=u?he=>{u(he,{...E})}:void 0,re=l?he=>{l(he,{...E})}:void 0,se=f?he=>{f(he,{...E})}:void 0,de=d?he=>{d(he,{...E})}:void 0,fe=he=>{var ge;if(!k&&XN.includes(he.key)&&O){const{unselectNodesAndEdges:be,addSelectedEdges:we}=H.getState();he.key==="Escape"?((ge=q.current)==null||ge.blur(),be({edges:[E]})):we([e])}};return M.jsx("svg",{style:{zIndex:z},children:M.jsxs("g",{className:et(["react-flow__edge",`react-flow__edge-${R}`,E.className,_,{selected:E.selected,animated:E.animated,inactive:!O&&!o,updating:F,selectable:O}]),onClick:G,onDoubleClick:Z,onContextMenu:ne,onMouseEnter:re,onMouseMove:se,onMouseLeave:de,onKeyDown:T?fe:void 0,tabIndex:T?0:void 0,role:T?"button":"img","data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":E.ariaLabel===null?void 0:E.ariaLabel||`Edge from ${E.source} to ${E.target}`,"aria-describedby":T?`${kT}-${x}`:void 0,ref:q,children:[!W&&M.jsx(A,{id:e,source:E.source,target:E.target,type:E.type,selected:E.selected,animated:E.animated,selectable:O,deletable:E.deletable??!0,label:E.label,labelStyle:E.labelStyle,labelShowBg:E.labelShowBg,labelBgStyle:E.labelBgStyle,labelBgPadding:E.labelBgPadding,labelBgBorderRadius:E.labelBgBorderRadius,sourceX:Q,sourceY:D,targetX:U,targetY:K,sourcePosition:j,targetPosition:X,data:E.data,style:E.style,sourceHandleId:E.sourceHandle,targetHandleId:E.targetHandle,markerStart:oe,markerEnd:V,pathOptions:"pathOptions"in E?E.pathOptions:void 0,interactionWidth:E.interactionWidth}),L&&M.jsx(kB,{edge:E,isReconnectable:L,reconnectRadius:h,onReconnect:p,onReconnectStart:v,onReconnectEnd:m,sourceX:Q,sourceY:D,targetX:U,targetY:K,sourcePosition:j,targetPosition:X,setUpdateHover:$,setReconnecting:I})]})})}const PB=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function ZT({defaultMarkerColor:e,onlyRenderVisibleElements:t,rfId:n,edgeTypes:i,noPanClassName:o,onReconnect:a,onEdgeContextMenu:u,onEdgeMouseEnter:l,onEdgeMouseMove:f,onEdgeMouseLeave:d,onEdgeClick:h,reconnectRadius:p,onEdgeDoubleClick:v,onReconnectStart:m,onReconnectEnd:x,disableKeyboardA11y:w}){const{edgesFocusable:_,edgesReconnectable:S,elementsSelectable:k,onError:E}=Te(PB,Qe),C=hB(t);return M.jsxs("div",{className:"react-flow__edges",children:[M.jsx(yB,{defaultColor:e,rfId:n}),C.map(R=>M.jsx(RB,{id:R,edgesFocusable:_,edgesReconnectable:S,elementsSelectable:k,noPanClassName:o,onReconnect:a,onContextMenu:u,onMouseEnter:l,onMouseMove:f,onMouseLeave:d,onClick:h,reconnectRadius:p,onDoubleClick:v,onReconnectStart:m,onReconnectEnd:x,rfId:n,onError:E,edgeTypes:i,disableKeyboardA11y:w},R))]})}ZT.displayName="EdgeRenderer";const NB=P.memo(ZT),TB=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function MB({children:e}){const t=Te(TB);return M.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:t},children:e})}function AB(e){const t=Hl(),n=P.useRef(!1);P.useEffect(()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),n.current=!0)},[e,t.viewportInitialized])}const IB=e=>{var t;return(t=e.panZoom)==null?void 0:t.syncViewport};function LB(e){const t=Te(IB),n=Ve();return P.useEffect(()=>{e&&(t==null||t(e),n.setState({transform:[e.x,e.y,e.zoom]}))},[e,t]),null}function OB(e){return e.connection.inProgress?{...e.connection,to:ta(e.connection.to,e.transform)}:{...e.connection}}function DB(e){return OB}function jB(e){const t=DB();return Te(t,Qe)}const qB=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function FB({containerStyle:e,style:t,type:n,component:i}){const{nodesConnectable:o,width:a,height:u,isValid:l,inProgress:f}=Te(qB,Qe);return!(a&&o&&f)?null:M.jsx("svg",{style:e,width:a,height:u,className:"react-flow__connectionline react-flow__container",children:M.jsx("g",{className:et(["react-flow__connection",ZN(l)]),children:M.jsx(JT,{style:t,type:n,CustomComponent:i,isValid:l})})})}const JT=({style:e,type:t=Mr.Bezier,CustomComponent:n,isValid:i})=>{const{inProgress:o,from:a,fromNode:u,fromHandle:l,fromPosition:f,to:d,toNode:h,toHandle:p,toPosition:v}=jB();if(!o)return;if(n)return M.jsx(n,{connectionLineType:t,connectionLineStyle:e,fromNode:u,fromHandle:l,fromX:a.x,fromY:a.y,toX:d.x,toY:d.y,fromPosition:f,toPosition:v,connectionStatus:ZN(i),toNode:h,toHandle:p});let m="";const x={sourceX:a.x,sourceY:a.y,sourcePosition:f,targetX:d.x,targetY:d.y,targetPosition:v};switch(t){case Mr.Bezier:[m]=cT(x);break;case Mr.SimpleBezier:[m]=zT(x);break;case Mr.Step:[m]=ml({...x,borderRadius:0});break;case Mr.SmoothStep:[m]=ml(x);break;default:[m]=dT(x)}return M.jsx("path",{d:m,fill:"none",className:"react-flow__connection-path",style:e})};JT.displayName="ConnectionLine";const zB={};function eb(e=zB){P.useRef(e),Ve(),P.useEffect(()=>{},[e])}function $B(){Ve(),P.useRef(!1),P.useEffect(()=>{},[])}function eM({nodeTypes:e,edgeTypes:t,onInit:n,onNodeClick:i,onEdgeClick:o,onNodeDoubleClick:a,onEdgeDoubleClick:u,onNodeMouseEnter:l,onNodeMouseMove:f,onNodeMouseLeave:d,onNodeContextMenu:h,onSelectionContextMenu:p,onSelectionStart:v,onSelectionEnd:m,connectionLineType:x,connectionLineStyle:w,connectionLineComponent:_,connectionLineContainerStyle:S,selectionKeyCode:k,selectionOnDrag:E,selectionMode:C,multiSelectionKeyCode:R,panActivationKeyCode:A,zoomActivationKeyCode:T,deleteKeyCode:L,onlyRenderVisibleElements:O,elementsSelectable:q,defaultViewport:F,translateExtent:$,minZoom:W,maxZoom:I,preventScrolling:H,defaultMarkerColor:z,zoomOnScroll:Q,zoomOnPinch:D,panOnScroll:U,panOnScrollSpeed:K,panOnScrollMode:j,zoomOnDoubleClick:X,panOnDrag:oe,onPaneClick:V,onPaneMouseEnter:G,onPaneMouseMove:Z,onPaneMouseLeave:ne,onPaneScroll:re,onPaneContextMenu:se,paneClickDistance:de,nodeClickDistance:fe,onEdgeContextMenu:he,onEdgeMouseEnter:ge,onEdgeMouseMove:be,onEdgeMouseLeave:we,reconnectRadius:De,onReconnect:Ce,onReconnectStart:it,onReconnectEnd:Ke,noDragClassName:Pe,noWheelClassName:Me,noPanClassName:Ye,disableKeyboardA11y:je,nodeExtent:Pt,rfId:pt,viewport:yn,onViewportChange:Jt}){return eb(e),eb(t),$B(),AB(n),LB(yn),M.jsx(iB,{onPaneClick:V,onPaneMouseEnter:G,onPaneMouseMove:Z,onPaneMouseLeave:ne,onPaneContextMenu:se,onPaneScroll:re,paneClickDistance:de,deleteKeyCode:L,selectionKeyCode:k,selectionOnDrag:E,selectionMode:C,onSelectionStart:v,onSelectionEnd:m,multiSelectionKeyCode:R,panActivationKeyCode:A,zoomActivationKeyCode:T,elementsSelectable:q,zoomOnScroll:Q,zoomOnPinch:D,zoomOnDoubleClick:X,panOnScroll:U,panOnScrollSpeed:K,panOnScrollMode:j,panOnDrag:oe,defaultViewport:F,translateExtent:$,minZoom:W,maxZoom:I,onSelectionContextMenu:p,preventScrolling:H,noDragClassName:Pe,noWheelClassName:Me,noPanClassName:Ye,disableKeyboardA11y:je,onViewportChange:Jt,isControlledViewport:!!yn,children:M.jsxs(MB,{children:[M.jsx(NB,{edgeTypes:t,onEdgeClick:o,onEdgeDoubleClick:u,onReconnect:Ce,onReconnectStart:it,onReconnectEnd:Ke,onlyRenderVisibleElements:O,onEdgeContextMenu:he,onEdgeMouseEnter:ge,onEdgeMouseMove:be,onEdgeMouseLeave:we,reconnectRadius:De,defaultMarkerColor:z,noPanClassName:Ye,disableKeyboardA11y:je,rfId:pt}),M.jsx(FB,{style:w,type:x,component:_,containerStyle:S}),M.jsx("div",{className:"react-flow__edgelabel-renderer"}),M.jsx(dB,{nodeTypes:e,onNodeClick:i,onNodeDoubleClick:a,onNodeMouseEnter:l,onNodeMouseMove:f,onNodeMouseLeave:d,onNodeContextMenu:h,nodeClickDistance:fe,onlyRenderVisibleElements:O,noPanClassName:Ye,noDragClassName:Pe,disableKeyboardA11y:je,nodeExtent:Pt,rfId:pt}),M.jsx("div",{className:"react-flow__viewport-portal"})]})})}eM.displayName="GraphView";const BB=P.memo(eM),tb=({nodes:e,edges:t,defaultNodes:n,defaultEdges:i,width:o,height:a,fitView:u,nodeOrigin:l,nodeExtent:f}={})=>{const d=new Map,h=new Map,p=new Map,v=new Map,m=i??t??[],x=n??e??[],w=l??[0,0],_=f??Bs;pT(p,v,m),Ny(x,d,h,{nodeOrigin:w,nodeExtent:_,elevateNodesOnSelect:!1});let S=[0,0,1];if(u&&o&&a){const k=ea(d,{filter:A=>!!((A.width||A.initialWidth)&&(A.height||A.initialHeight))}),{x:E,y:C,zoom:R}=l0(k,o,a,.5,2,.1);S=[E,C,R]}return{rfId:"1",width:0,height:0,transform:S,nodes:x,nodeLookup:d,parentLookup:h,edges:m,edgeLookup:v,connectionLookup:p,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:n!==void 0,hasDefaultEdges:i!==void 0,panZoom:null,minZoom:.5,maxZoom:2,translateExtent:Bs,nodeExtent:_,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:go.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:w,nodeDragThreshold:1,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesReconnectable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,elevateEdgesOnSelect:!1,fitViewOnInit:!1,fitViewDone:!1,fitViewOnInitOptions:void 0,selectNodesOnDrag:!0,multiSelectionActive:!1,connection:{...QN},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanSpeed:15,connectionRadius:20,onError:f4,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1}},VB=({nodes:e,edges:t,defaultNodes:n,defaultEdges:i,width:o,height:a,fitView:u,nodeOrigin:l,nodeExtent:f})=>u$((d,h)=>({...tb({nodes:e,edges:t,width:o,height:a,fitView:u,nodeOrigin:l,nodeExtent:f,defaultNodes:n,defaultEdges:i}),setNodes:p=>{const{nodeLookup:v,parentLookup:m,nodeOrigin:x,elevateNodesOnSelect:w}=h();Ny(p,v,m,{nodeOrigin:x,nodeExtent:f,elevateNodesOnSelect:w,checkEquality:!0}),d({nodes:p})},setEdges:p=>{const{connectionLookup:v,edgeLookup:m}=h();pT(v,m,p),d({edges:p})},setDefaultNodesAndEdges:(p,v)=>{if(p){const{setNodes:m}=h();m(p),d({hasDefaultNodes:!0})}if(v){const{setEdges:m}=h();m(v),d({hasDefaultEdges:!0})}},updateNodeInternals:(p,v={triggerFitView:!0})=>{const{triggerNodeChanges:m,nodeLookup:x,parentLookup:w,fitViewOnInit:_,fitViewDone:S,fitViewOnInitOptions:k,domNode:E,nodeOrigin:C,nodeExtent:R,debug:A,fitViewSync:T}=h(),{changes:L,updatedInternals:O}=R4(p,x,w,E,C,R);if(O){if(E4(x,w,{nodeOrigin:C,nodeExtent:R}),v.triggerFitView){let q=S;!S&&_&&(q=T({...k,nodes:k==null?void 0:k.nodes})),d({fitViewDone:q})}else d({});(L==null?void 0:L.length)>0&&(A&&console.log("React Flow: trigger node changes",L),m==null||m(L))}},updateNodePositions:(p,v=!1)=>{const m=[],x=[];for(const[w,_]of p){const S=!!(_!=null&&_.expandParent&&(_!=null&&_.parentId)&&(_!=null&&_.position)),k={id:w,type:"position",position:S?{x:Math.max(0,_.position.x),y:Math.max(0,_.position.y)}:_.position,dragging:v};S&&m.push({id:w,parentId:_.parentId,rect:{..._.internals.positionAbsolute,width:_.measured.width,height:_.measured.height}}),x.push(k)}if(m.length>0){const{nodeLookup:w,parentLookup:_,nodeOrigin:S}=h(),k=p0(m,w,_,S);x.push(...k)}h().triggerNodeChanges(x)},triggerNodeChanges:p=>{const{onNodesChange:v,setNodes:m,nodes:x,hasDefaultNodes:w,debug:_}=h();if(p!=null&&p.length){if(w){const S=NT(p,x);m(S)}_&&console.log("React Flow: trigger node changes",p),v==null||v(p)}},triggerEdgeChanges:p=>{const{onEdgesChange:v,setEdges:m,edges:x,hasDefaultEdges:w,debug:_}=h();if(p!=null&&p.length){if(w){const S=TT(p,x);m(S)}_&&console.log("React Flow: trigger edge changes",p),v==null||v(p)}},addSelectedNodes:p=>{const{multiSelectionActive:v,edgeLookup:m,nodeLookup:x,triggerNodeChanges:w,triggerEdgeChanges:_}=h();if(v){const S=p.map(k=>ti(k,!0));w(S);return}w(eo(x,new Set([...p]),!0)),_(eo(m))},addSelectedEdges:p=>{const{multiSelectionActive:v,edgeLookup:m,nodeLookup:x,triggerNodeChanges:w,triggerEdgeChanges:_}=h();if(v){const S=p.map(k=>ti(k,!0));_(S);return}_(eo(m,new Set([...p]))),w(eo(x,new Set,!0))},unselectNodesAndEdges:({nodes:p,edges:v}={})=>{const{edges:m,nodes:x,nodeLookup:w,triggerNodeChanges:_,triggerEdgeChanges:S}=h(),k=p||x,E=v||m,C=k.map(A=>{const T=w.get(A.id);return T&&(T.selected=!1),ti(A.id,!1)}),R=E.map(A=>ti(A.id,!1));_(C),S(R)},setMinZoom:p=>{const{panZoom:v,maxZoom:m}=h();v==null||v.setScaleExtent([p,m]),d({minZoom:p})},setMaxZoom:p=>{const{panZoom:v,minZoom:m}=h();v==null||v.setScaleExtent([m,p]),d({maxZoom:p})},setTranslateExtent:p=>{var v;(v=h().panZoom)==null||v.setTranslateExtent(p),d({translateExtent:p})},setPaneClickDistance:p=>{var v;(v=h().panZoom)==null||v.setClickDistance(p)},resetSelectedElements:()=>{const{edges:p,nodes:v,triggerNodeChanges:m,triggerEdgeChanges:x}=h(),w=v.reduce((S,k)=>k.selected?[...S,ti(k.id,!1)]:S,[]),_=p.reduce((S,k)=>k.selected?[...S,ti(k.id,!1)]:S,[]);m(w),x(_)},setNodeExtent:p=>{const{nodes:v,nodeLookup:m,parentLookup:x,nodeOrigin:w,elevateNodesOnSelect:_,nodeExtent:S}=h();p[0][0]===S[0][0]&&p[0][1]===S[0][1]&&p[1][0]===S[1][0]&&p[1][1]===S[1][1]||(Ny(v,m,x,{nodeOrigin:w,nodeExtent:p,elevateNodesOnSelect:_,checkEquality:!1}),d({nodeExtent:p}))},panBy:p=>{const{transform:v,width:m,height:x,panZoom:w,translateExtent:_}=h();return P4({delta:p,panZoom:w,transform:v,translateExtent:_,width:m,height:x})},fitView:p=>{const{panZoom:v,width:m,height:x,minZoom:w,maxZoom:_,nodeLookup:S}=h();if(!v)return Promise.resolve(!1);const k=Ey(S,p);return Cy({nodes:k,width:m,height:x,panZoom:v,minZoom:w,maxZoom:_},p)},fitViewSync:p=>{const{panZoom:v,width:m,height:x,minZoom:w,maxZoom:_,nodeLookup:S}=h();if(!v)return!1;const k=Ey(S,p);return Cy({nodes:k,width:m,height:x,panZoom:v,minZoom:w,maxZoom:_},p),k.size>0},cancelConnection:()=>{d({connection:{...QN}})},updateConnection:p=>{d({connection:p})},reset:()=>d({...tb()})}),Object.is);function HB({initialNodes:e,initialEdges:t,defaultNodes:n,defaultEdges:i,initialWidth:o,initialHeight:a,fitView:u,nodeOrigin:l,nodeExtent:f,children:d}){const[h]=P.useState(()=>VB({nodes:e,edges:t,defaultNodes:n,defaultEdges:i,width:o,height:a,fitView:u,nodeOrigin:l,nodeExtent:f}));return M.jsx(l$,{value:h,children:M.jsx(A$,{children:d})})}function UB({children:e,nodes:t,edges:n,defaultNodes:i,defaultEdges:o,width:a,height:u,fitView:l,nodeOrigin:f,nodeExtent:d}){return P.useContext(Vl)?M.jsx(M.Fragment,{children:e}):M.jsx(HB,{initialNodes:t,initialEdges:n,defaultNodes:i,defaultEdges:o,initialWidth:a,initialHeight:u,fitView:l,nodeOrigin:f,nodeExtent:d,children:e})}const WB={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function GB({nodes:e,edges:t,defaultNodes:n,defaultEdges:i,className:o,nodeTypes:a,edgeTypes:u,onNodeClick:l,onEdgeClick:f,onInit:d,onMove:h,onMoveStart:p,onMoveEnd:v,onConnect:m,onConnectStart:x,onConnectEnd:w,onClickConnectStart:_,onClickConnectEnd:S,onNodeMouseEnter:k,onNodeMouseMove:E,onNodeMouseLeave:C,onNodeContextMenu:R,onNodeDoubleClick:A,onNodeDragStart:T,onNodeDrag:L,onNodeDragStop:O,onNodesDelete:q,onEdgesDelete:F,onDelete:$,onSelectionChange:W,onSelectionDragStart:I,onSelectionDrag:H,onSelectionDragStop:z,onSelectionContextMenu:Q,onSelectionStart:D,onSelectionEnd:U,onBeforeDelete:K,connectionMode:j,connectionLineType:X=Mr.Bezier,connectionLineStyle:oe,connectionLineComponent:V,connectionLineContainerStyle:G,deleteKeyCode:Z="Backspace",selectionKeyCode:ne="Shift",selectionOnDrag:re=!1,selectionMode:se=Vs.Full,panActivationKeyCode:de="Space",multiSelectionKeyCode:fe=vl()?"Meta":"Control",zoomActivationKeyCode:he=vl()?"Meta":"Control",snapToGrid:ge,snapGrid:be,onlyRenderVisibleElements:we=!1,selectNodesOnDrag:De,nodesDraggable:Ce,nodesConnectable:it,nodesFocusable:Ke,nodeOrigin:Pe=RT,edgesFocusable:Me,edgesReconnectable:Ye,elementsSelectable:je=!0,defaultViewport:Pt=b$,minZoom:pt=.5,maxZoom:yn=2,translateExtent:Jt=Bs,preventScrolling:Nt=!0,nodeExtent:An,defaultMarkerColor:wn="#b1b1b7",zoomOnScroll:In=!0,zoomOnPinch:yi=!0,panOnScroll:Tt=!1,panOnScrollSpeed:Bt=.5,panOnScrollMode:lc=si.Free,zoomOnDoubleClick:Po=!0,panOnDrag:No=!0,onPaneClick:To,onPaneMouseEnter:Mo,onPaneMouseMove:Ao,onPaneMouseLeave:ir,onPaneScroll:or,onPaneContextMenu:ua,paneClickDistance:Io=0,nodeClickDistance:la=0,children:ca,onReconnect:fa,onReconnectStart:Lo,onReconnectEnd:da,onEdgeContextMenu:Fr,onEdgeDoubleClick:Oo,onEdgeMouseEnter:zr,onEdgeMouseMove:cc,onEdgeMouseLeave:$r,reconnectRadius:wi=10,onNodesChange:xi,onEdgesChange:Do,noDragClassName:fc="nodrag",noWheelClassName:dc="nowheel",noPanClassName:ha="nopan",fitView:xn,fitViewOptions:pa,connectOnClick:ga,attributionPosition:hc,proOptions:va,defaultEdgeOptions:ma,elevateNodesOnSelect:ya,elevateEdgesOnSelect:wa,disableKeyboardA11y:xa=!1,autoPanOnConnect:pc,autoPanOnNodeDrag:Ue,autoPanSpeed:gc,connectionRadius:jo,isValidConnection:_a,onError:_i,style:vc,id:qo,nodeDragThreshold:bi,viewport:Vt,onViewportChange:mc,width:Mt,height:yc,colorMode:wc="light",debug:xc,...Si},Ei){const Ln=qo||"1",Ci=k$(wc);return M.jsx("div",{"data-testid":"rf__wrapper",...Si,style:{...vc,...WB},ref:Ei,className:et(["react-flow",o,Ci]),id:qo,children:M.jsxs(UB,{nodes:e,edges:t,width:Mt,height:yc,fitView:xn,nodeOrigin:Pe,nodeExtent:An,children:[M.jsx(BB,{onInit:d,onNodeClick:l,onEdgeClick:f,onNodeMouseEnter:k,onNodeMouseMove:E,onNodeMouseLeave:C,onNodeContextMenu:R,onNodeDoubleClick:A,nodeTypes:a,edgeTypes:u,connectionLineType:X,connectionLineStyle:oe,connectionLineComponent:V,connectionLineContainerStyle:G,selectionKeyCode:ne,selectionOnDrag:re,selectionMode:se,deleteKeyCode:Z,multiSelectionKeyCode:fe,panActivationKeyCode:de,zoomActivationKeyCode:he,onlyRenderVisibleElements:we,defaultViewport:Pt,translateExtent:Jt,minZoom:pt,maxZoom:yn,preventScrolling:Nt,zoomOnScroll:In,zoomOnPinch:yi,zoomOnDoubleClick:Po,panOnScroll:Tt,panOnScrollSpeed:Bt,panOnScrollMode:lc,panOnDrag:No,onPaneClick:To,onPaneMouseEnter:Mo,onPaneMouseMove:Ao,onPaneMouseLeave:ir,onPaneScroll:or,onPaneContextMenu:ua,paneClickDistance:Io,nodeClickDistance:la,onSelectionContextMenu:Q,onSelectionStart:D,onSelectionEnd:U,onReconnect:fa,onReconnectStart:Lo,onReconnectEnd:da,onEdgeContextMenu:Fr,onEdgeDoubleClick:Oo,onEdgeMouseEnter:zr,onEdgeMouseMove:cc,onEdgeMouseLeave:$r,reconnectRadius:wi,defaultMarkerColor:wn,noDragClassName:fc,noWheelClassName:dc,noPanClassName:ha,rfId:Ln,disableKeyboardA11y:xa,nodeExtent:An,viewport:Vt,onViewportChange:mc}),M.jsx(C$,{nodes:e,edges:t,defaultNodes:n,defaultEdges:i,onConnect:m,onConnectStart:x,onConnectEnd:w,onClickConnectStart:_,onClickConnectEnd:S,nodesDraggable:Ce,nodesConnectable:it,nodesFocusable:Ke,edgesFocusable:Me,edgesReconnectable:Ye,elementsSelectable:je,elevateNodesOnSelect:ya,elevateEdgesOnSelect:wa,minZoom:pt,maxZoom:yn,nodeExtent:An,onNodesChange:xi,onEdgesChange:Do,snapToGrid:ge,snapGrid:be,connectionMode:j,translateExtent:Jt,connectOnClick:ga,defaultEdgeOptions:ma,fitView:xn,fitViewOptions:pa,onNodesDelete:q,onEdgesDelete:F,onDelete:$,onNodeDragStart:T,onNodeDrag:L,onNodeDragStop:O,onSelectionDrag:H,onSelectionDragStart:I,onSelectionDragStop:z,onMove:h,onMoveStart:p,onMoveEnd:v,noPanClassName:ha,nodeOrigin:Pe,rfId:Ln,autoPanOnConnect:pc,autoPanOnNodeDrag:Ue,autoPanSpeed:gc,onError:_i,connectionRadius:jo,isValidConnection:_a,selectNodesOnDrag:De,nodeDragThreshold:bi,onBeforeDelete:K,paneClickDistance:Io,debug:xc}),M.jsx(_$,{onSelectionChange:W}),ca,M.jsx(v$,{proOptions:va,position:hc}),M.jsx(p$,{rfId:Ln,disableKeyboardA11y:xa})]})})}var KB=MT(GB);const YB=e=>{var t;return(t=e.domNode)==null?void 0:t.querySelector(".react-flow__edgelabel-renderer")};function XB({children:e}){const t=Te(YB);return t?Ks.createPortal(e,t):null}function QB(e){const[t,n]=P.useState(e),i=P.useCallback(o=>n(a=>NT(o,a)),[]);return[t,n,i]}function ZB(e){const[t,n]=P.useState(e),i=P.useCallback(o=>n(a=>TT(o,a)),[]);return[t,n,i]}const JB=e=>t=>{if(t.nodeLookup.size===0)return!1;for(const[,{hidden:n,internals:i}]of t.nodeLookup)if((e.includeHiddenNodes||!n)&&(i.handleBounds===void 0||!c0(i.userNode)))return!1;return!0},e5={includeHiddenNodes:!1};function t5(e=e5){return Te(JB(e))}function n5({dimensions:e,lineWidth:t,variant:n,className:i}){return M.jsx("path",{strokeWidth:t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:et(["react-flow__background-pattern",n,i])})}function r5({radius:e,className:t}){return M.jsx("circle",{cx:e,cy:e,r:e,className:et(["react-flow__background-pattern","dots",t])})}var Kn;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(Kn||(Kn={}));const i5={[Kn.Dots]:1,[Kn.Lines]:1,[Kn.Cross]:6},o5=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function tM({id:e,variant:t=Kn.Dots,gap:n=20,size:i,lineWidth:o=1,offset:a=0,color:u,bgColor:l,style:f,className:d,patternClassName:h}){const p=P.useRef(null),{transform:v,patternId:m}=Te(o5,Qe),x=i||i5[t],w=t===Kn.Dots,_=t===Kn.Cross,S=Array.isArray(n)?n:[n,n],k=[S[0]*v[2]||1,S[1]*v[2]||1],E=x*v[2],C=Array.isArray(a)?a:[a,a],R=_?[E,E]:k,A=[C[0]*v[2]||1+R[0]/2,C[1]*v[2]||1+R[1]/2],T=`${m}${e||""}`;return M.jsxs("svg",{className:et(["react-flow__background",d]),style:{...f,...Ul,"--xy-background-color-props":l,"--xy-background-pattern-color-props":u},ref:p,"data-testid":"rf__background",children:[M.jsx("pattern",{id:T,x:v[0]%k[0],y:v[1]%k[1],width:k[0],height:k[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${A[0]},-${A[1]})`,children:w?M.jsx(r5,{radius:E/2,className:h}):M.jsx(n5,{dimensions:R,lineWidth:o,variant:t,className:h})}),M.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${T})`})]})}tM.displayName="Background";const s5=P.memo(tM);function a5(){return M.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:M.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function u5(){return M.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:M.jsx("path",{d:"M0 0h32v4.2H0z"})})}function l5(){return M.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:M.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 c5(){return M.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:M.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 f5(){return M.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:M.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 Bu({children:e,className:t,...n}){return M.jsx("button",{type:"button",className:et(["react-flow__controls-button",t]),...n,children:e})}const d5=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom});function nM({style:e,showZoom:t=!0,showFitView:n=!0,showInteractive:i=!0,fitViewOptions:o,onZoomIn:a,onZoomOut:u,onFitView:l,onInteractiveChange:f,className:d,children:h,position:p="bottom-left",orientation:v="vertical","aria-label":m="React Flow controls"}){const x=Ve(),{isInteractive:w,minZoomReached:_,maxZoomReached:S}=Te(d5,Qe),{zoomIn:k,zoomOut:E,fitView:C}=Hl(),R=()=>{k(),a==null||a()},A=()=>{E(),u==null||u()},T=()=>{C(o),l==null||l()},L=()=>{x.setState({nodesDraggable:!w,nodesConnectable:!w,elementsSelectable:!w}),f==null||f(!w)},O=v==="horizontal"?"horizontal":"vertical";return M.jsxs(g0,{className:et(["react-flow__controls",O,d]),position:p,style:e,"data-testid":"rf__controls","aria-label":m,children:[t&&M.jsxs(M.Fragment,{children:[M.jsx(Bu,{onClick:R,className:"react-flow__controls-zoomin",title:"zoom in","aria-label":"zoom in",disabled:S,children:M.jsx(a5,{})}),M.jsx(Bu,{onClick:A,className:"react-flow__controls-zoomout",title:"zoom out","aria-label":"zoom out",disabled:_,children:M.jsx(u5,{})})]}),n&&M.jsx(Bu,{className:"react-flow__controls-fitview",onClick:T,title:"fit view","aria-label":"fit view",children:M.jsx(l5,{})}),i&&M.jsx(Bu,{className:"react-flow__controls-interactive",onClick:L,title:"toggle interactivity","aria-label":"toggle interactivity",children:w?M.jsx(f5,{}):M.jsx(c5,{})}),h]})}nM.displayName="Controls";P.memo(nM);function h5({id:e,x:t,y:n,width:i,height:o,style:a,color:u,strokeColor:l,strokeWidth:f,className:d,borderRadius:h,shapeRendering:p,selected:v,onClick:m}){const{background:x,backgroundColor:w}=a||{},_=u||x||w;return M.jsx("rect",{className:et(["react-flow__minimap-node",{selected:v},d]),x:t,y:n,rx:h,ry:h,width:i,height:o,style:{fill:_,stroke:l,strokeWidth:f},shapeRendering:p,onClick:m?S=>m(S,e):void 0})}const p5=P.memo(h5),g5=e=>e.nodes.map(t=>t.id),zd=e=>e instanceof Function?e:()=>e;function v5({nodeStrokeColor:e,nodeColor:t,nodeClassName:n="",nodeBorderRadius:i=5,nodeStrokeWidth:o,nodeComponent:a=p5,onClick:u}){const l=Te(g5,Qe),f=zd(t),d=zd(e),h=zd(n),p=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return M.jsx(M.Fragment,{children:l.map(v=>M.jsx(y5,{id:v,nodeColorFunc:f,nodeStrokeColorFunc:d,nodeClassNameFunc:h,nodeBorderRadius:i,nodeStrokeWidth:o,NodeComponent:a,onClick:u,shapeRendering:p},v))})}function m5({id:e,nodeColorFunc:t,nodeStrokeColorFunc:n,nodeClassNameFunc:i,nodeBorderRadius:o,nodeStrokeWidth:a,shapeRendering:u,NodeComponent:l,onClick:f}){const{node:d,x:h,y:p,width:v,height:m}=Te(x=>{const w=x.nodeLookup.get(e),{x:_,y:S}=w.internals.positionAbsolute,{width:k,height:E}=tr(w);return{node:w,x:_,y:S,width:k,height:E}},Qe);return!d||d.hidden||!c0(d)?null:M.jsx(l,{x:h,y:p,width:v,height:m,style:d.style,selected:!!d.selected,className:i(d),color:t(d),borderRadius:o,strokeColor:n(d),strokeWidth:a,shapeRendering:u,onClick:f,id:d.id})}const y5=P.memo(m5);var w5=P.memo(v5);const x5=200,_5=150,b5=e=>{const 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]};return{viewBB:t,boundingRect:e.nodeLookup.size>0?iT(ea(e.nodeLookup),t):t,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height}},S5="react-flow__minimap-desc";function rM({style:e,className:t,nodeStrokeColor:n,nodeColor:i,nodeClassName:o="",nodeBorderRadius:a=5,nodeStrokeWidth:u,nodeComponent:l,bgColor:f,maskColor:d,maskStrokeColor:h,maskStrokeWidth:p,position:v="bottom-right",onClick:m,onNodeClick:x,pannable:w=!1,zoomable:_=!1,ariaLabel:S="React Flow mini map",inversePan:k,zoomStep:E=10,offsetScale:C=5}){const R=Ve(),A=P.useRef(null),{boundingRect:T,viewBB:L,rfId:O,panZoom:q,translateExtent:F,flowWidth:$,flowHeight:W}=Te(b5,Qe),I=(e==null?void 0:e.width)??x5,H=(e==null?void 0:e.height)??_5,z=T.width/I,Q=T.height/H,D=Math.max(z,Q),U=D*I,K=D*H,j=C*D,X=T.x-(U-T.width)/2-j,oe=T.y-(K-T.height)/2-j,V=U+j*2,G=K+j*2,Z=`${S5}-${O}`,ne=P.useRef(0),re=P.useRef();ne.current=D,P.useEffect(()=>{if(A.current&&q)return re.current=D4({domNode:A.current,panZoom:q,getTransform:()=>R.getState().transform,getViewScale:()=>ne.current}),()=>{var fe;(fe=re.current)==null||fe.destroy()}},[q]),P.useEffect(()=>{var fe;(fe=re.current)==null||fe.update({translateExtent:F,width:$,height:W,inversePan:k,pannable:w,zoomStep:E,zoomable:_})},[w,_,k,E,F,$,W]);const se=m?fe=>{var be;const[he,ge]=((be=re.current)==null?void 0:be.pointer(fe))||[0,0];m(fe,{x:he,y:ge})}:void 0,de=x?P.useCallback((fe,he)=>{const ge=R.getState().nodeLookup.get(he);x(fe,ge)},[]):void 0;return M.jsx(g0,{position:v,style:{...e,"--xy-minimap-background-color-props":typeof f=="string"?f:void 0,"--xy-minimap-mask-background-color-props":typeof d=="string"?d:void 0,"--xy-minimap-mask-stroke-color-props":typeof h=="string"?h:void 0,"--xy-minimap-mask-stroke-width-props":typeof p=="number"?p*D:void 0,"--xy-minimap-node-background-color-props":typeof i=="string"?i:void 0,"--xy-minimap-node-stroke-color-props":typeof n=="string"?n:void 0,"--xy-minimap-node-stroke-width-props":typeof u=="string"?u:void 0},className:et(["react-flow__minimap",t]),"data-testid":"rf__minimap",children:M.jsxs("svg",{width:I,height:H,viewBox:`${X} ${oe} ${V} ${G}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":Z,ref:A,onClick:se,children:[S&&M.jsx("title",{id:Z,children:S}),M.jsx(w5,{onClick:de,nodeColor:i,nodeStrokeColor:n,nodeBorderRadius:a,nodeClassName:o,nodeStrokeWidth:u,nodeComponent:l}),M.jsx("path",{className:"react-flow__minimap-mask",d:`M${X-j},${oe-j}h${V+j*2}v${G+j*2}h${-V-j*2}z
|
|
182
|
-
M${L.x},${L.y}h${L.width}v${L.height}h${-L.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}rM.displayName="MiniMap";P.memo(rM);function E5({nodeId:e,position:t,variant:n=Is.Handle,className:i,style:o={},children:a,color:u,minWidth:l=10,minHeight:f=10,maxWidth:d=Number.MAX_VALUE,maxHeight:h=Number.MAX_VALUE,keepAspectRatio:p=!1,shouldResize:v,onResizeStart:m,onResize:x,onResizeEnd:w}){const _=OT(),S=typeof e=="string"?e:_,k=Ve(),E=P.useRef(null),C=n===Is.Line?"right":"bottom-right",R=t??C,A=P.useRef(null);P.useEffect(()=>{if(!(!E.current||!S))return A.current||(A.current=Q4({domNode:E.current,nodeId:S,getStoreItems:()=>{const{nodeLookup:q,transform:F,snapGrid:$,snapToGrid:W,nodeOrigin:I,domNode:H}=k.getState();return{nodeLookup:q,transform:F,snapGrid:$,snapToGrid:W,nodeOrigin:I,paneDomNode:H}},onChange:(q,F)=>{const{triggerNodeChanges:$,nodeLookup:W,parentLookup:I,nodeOrigin:H}=k.getState(),z=[],Q={x:q.x,y:q.y},D=W.get(S);if(D&&D.expandParent&&D.parentId){const U=D.origin??H,K=q.width??D.measured.width,j=q.height??D.measured.height,X={id:D.id,parentId:D.parentId,rect:{width:K,height:j,...sT({x:q.x??D.position.x,y:q.y??D.position.y},{width:K,height:j},D.parentId,W,U)}},oe=p0([X],W,I,H);z.push(...oe),Q.x=q.x?Math.max(U[0]*K,q.x):void 0,Q.y=q.y?Math.max(U[1]*j,q.y):void 0}if(Q.x!==void 0&&Q.y!==void 0){const U={id:S,type:"position",position:{...Q}};z.push(U)}if(q.width!==void 0&&q.height!==void 0){const U={id:S,type:"dimensions",resizing:!0,setAttributes:!0,dimensions:{width:q.width,height:q.height}};z.push(U)}for(const U of F){const K={...U,type:"position"};z.push(K)}$(z)},onEnd:()=>{const q={id:S,type:"dimensions",resizing:!1};k.getState().triggerNodeChanges([q])}})),A.current.update({controlPosition:R,boundaries:{minWidth:l,minHeight:f,maxWidth:d,maxHeight:h},keepAspectRatio:p,onResizeStart:m,onResize:x,onResizeEnd:w,shouldResize:v}),()=>{var q;(q=A.current)==null||q.destroy()}},[R,l,f,d,h,p,m,x,w,v]);const T=R.split("-"),L=n===Is.Line?"borderColor":"backgroundColor",O=u?{...o,[L]:u}:o;return M.jsx("div",{className:et(["react-flow__resize-control","nodrag",...T,n,i]),ref:E,style:O,children:a})}P.memo(E5);const C5=["!relative","!flex","!items-center","!w-9","!h-9","!bg-transparent","!transform","!border-0","!left-auto","after:!absolute","after:!top-[15px]","after:!left-[15px]","after:!w-1.5","after:!h-1.5","after:!content-[' ']","after:!bg-white","after:!rounded-full"].join(" "),Ay=e=>{const{isHidden:t,position:n,...i}=e;return M.jsx("div",{className:Oy("absolute w-6 h-6",n===me.Top&&"top-[-26px]",n===me.Bottom&&"bottom-[-13px]",n===me.Left&&"left-[-32px]",n===me.Right&&"right-[-20px]",[me.Top,me.Bottom].includes(n)&&"left-[calc(50%-20px)]",[me.Left,me.Right].includes(n)&&"bottom-[calc(50%+10px)]",t&&"hidden"),children:M.jsx("div",{className:"relative flex items-center w-9 h-9 bg-transparent border-0",children:M.jsx(Gs,{...i,position:n,className:C5})})})},k5=e=>typeof e=="string"?e:e.type,R5=({data:e})=>M.jsxs("div",{className:"bg-white rounded-md p-2 px-3 text-black",children:[M.jsxs("div",{className:"flex flex-col ",children:[M.jsxs("div",{className:"flex flex-col gap-1",children:[M.jsx("div",{className:"text-sm font-semibold",children:e.name}),M.jsx("div",{className:"text-xs",children:e.description})]}),M.jsxs("div",{className:"flex flex-col mt-2",children:[e.subscribes.length>0&&M.jsxs("div",{className:"flex gap-1 items-center",children:[M.jsx(sL,{className:"w-3 h-3 text-muted-foreground"}),M.jsx("div",{className:"text-xs font-mono","data-testid":e.subscribes.map(t=>`subscribes__${t}`).join(" "),children:e.subscribes.join(", ")})]}),e.emits.length>0&&M.jsxs("div",{className:"flex gap-1 items-center",children:[M.jsx(uL,{className:"w-3 h-3 text-muted-foreground"}),M.jsx("div",{className:"text-xs font-mono","data-testid":e.emits.map(t=>`emits__${t}`).join(" "),children:e.emits.map(k5).join(", ")})]})]})]}),M.jsx(Ay,{type:"target",position:me.Top}),e.emits.length>0&&M.jsx(Ay,{type:"source",position:me.Bottom})]}),P5=({data:e})=>M.jsx("div",{className:"border-[2px] border-dashed border-sky-900 rounded-[14px] p-[1px]",children:M.jsxs("div",{className:"bg-sky-500 text-black rounded-md p-2 px-3 rounded-[10px]",children:[M.jsxs("div",{className:"flex flex-col ",children:[M.jsxs("div",{className:"flex flex-col gap-1",children:[M.jsx("div",{className:"text-sm font-semibold",children:e.name}),M.jsx("div",{className:"text-xs",children:e.description})]}),M.jsxs("div",{className:"flex flex-col mt-2",children:[e.webhookUrl&&M.jsxs("div",{className:"flex gap-1 items-center",children:[M.jsx(cL,{className:"w-3 h-3 text-sky-950"}),M.jsx("div",{className:"text-xs font-mono",children:e.webhookUrl})]}),e.cron&&M.jsxs("div",{className:"flex gap-1 items-center",children:[M.jsx(oL,{className:"w-3 h-3 text-sky-950"}),M.jsx("div",{className:"text-xs font-mono",children:e.cron})]}),e.emits.length>0&&M.jsxs("div",{className:"flex gap-1 items-center",children:[M.jsx(lL,{className:"w-3 h-3 text-sky-950"}),M.jsx("div",{className:"text-xs font-mono","data-testid":e.emits.map(t=>`emits__${t}`).join(" "),children:e.emits.join(", ")})]})]})]}),M.jsx(Ay,{type:"source",position:me.Bottom})]})}),N5=e=>{const t=e.sourcePosition==="left"||e.sourcePosition==="right",n=e.sourcePosition==="right"?e.sourceX-6:e.sourcePosition==="left"?e.sourceX+6:e.sourceX,i=e.sourcePosition==="bottom"?e.sourceY-3:e.sourceY,o=e.targetPosition==="left"?e.targetX+4:e.targetX,a=e.targetPosition==="top"?e.targetY+4:e.targetY,u={borderRadius:10,offset:t?20:10,sourceX:n,sourceY:i,sourcePosition:e.sourcePosition,targetX:o,targetY:a,targetPosition:e.targetPosition};return ml(u)},T5=El("absolute pointer-events-all text-cs border p-1 px-2",{variants:{color:{default:"border-[#b3b3b3] bg-black text-gray-100 font-semibold border-solid rounded-full",conditional:"bg-amber-300 border-amber-950 text-amber-950 border-solid font-semibold italic rounded-lg"}},defaultVariants:{color:"default"}}),M5=e=>{const{label:t,selected:n}=e,o={strokeWidth:2,stroke:n?"#fff":"#b3b3b3"},[a,u,l]=N5(e),f=e.data;return M.jsxs(M.Fragment,{children:[M.jsx(na,{path:a,style:o,markerEnd:"url(#arrowhead)"}),t&&M.jsx(XB,{children:M.jsx("div",{className:Ae(T5({color:f==null?void 0:f.variant})),style:{transform:`translateX(-50%) translateY(-50%) translate(${u}px, ${l}px)`},children:M.jsx("div",{className:"text-xs font-mono",children:t})})})]})},A5=e=>M.jsxs("marker",{id:e.id,viewBox:"-5 -5 10 10",markerUnits:"strokeWidth",markerWidth:"10",markerHeight:"10",children:[M.jsx("line",{x1:0,y1:0,x2:2,y2:-2,stroke:e.color,strokeWidth:"1",strokeOpacity:"1",strokeLinecap:"round"}),M.jsx("line",{x1:-2,y1:-2,x2:0,y2:0,stroke:e.color,strokeWidth:"1",strokeOpacity:"1",strokeLinecap:"round"})]}),I5=e=>{const[t,n,i]=QB([]),[o,a,u]=ZB([]);return P.useEffect(()=>{if(!e)return;const l=e.steps.map(d=>({id:d.id,type:d.type,position:{x:0,y:0},data:d})),f=[];e.steps.forEach(d=>{const h=d.emits||[];e.steps.forEach(p=>{const v=p.subscribes||[];h.forEach(m=>{const x=typeof m=="string"?m:m.type;v.includes(x)&&f.push({id:`${d.id}-${p.id}`,type:"base",source:d.id,target:p.id,label:typeof m!="string"?m.label:void 0})})})}),n(l),a(f)},[e]),{nodes:t,edges:o,onNodesChange:i,onEdgesChange:u}};function m0(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var $d,nb;function L5(){if(nb)return $d;nb=1;function e(){this.__data__=[],this.size=0}return $d=e,$d}var Bd,rb;function So(){if(rb)return Bd;rb=1;function e(t,n){return t===n||t!==t&&n!==n}return Bd=e,Bd}var Vd,ib;function Wl(){if(ib)return Vd;ib=1;var e=So();function t(n,i){for(var o=n.length;o--;)if(e(n[o][0],i))return o;return-1}return Vd=t,Vd}var Hd,ob;function O5(){if(ob)return Hd;ob=1;var e=Wl(),t=Array.prototype,n=t.splice;function i(o){var a=this.__data__,u=e(a,o);if(u<0)return!1;var l=a.length-1;return u==l?a.pop():n.call(a,u,1),--this.size,!0}return Hd=i,Hd}var Ud,sb;function D5(){if(sb)return Ud;sb=1;var e=Wl();function t(n){var i=this.__data__,o=e(i,n);return o<0?void 0:i[o][1]}return Ud=t,Ud}var Wd,ab;function j5(){if(ab)return Wd;ab=1;var e=Wl();function t(n){return e(this.__data__,n)>-1}return Wd=t,Wd}var Gd,ub;function q5(){if(ub)return Gd;ub=1;var e=Wl();function t(n,i){var o=this.__data__,a=e(o,n);return a<0?(++this.size,o.push([n,i])):o[a][1]=i,this}return Gd=t,Gd}var Kd,lb;function Gl(){if(lb)return Kd;lb=1;var e=L5(),t=O5(),n=D5(),i=j5(),o=q5();function a(u){var l=-1,f=u==null?0:u.length;for(this.clear();++l<f;){var d=u[l];this.set(d[0],d[1])}}return a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=n,a.prototype.has=i,a.prototype.set=o,Kd=a,Kd}var Yd,cb;function F5(){if(cb)return Yd;cb=1;var e=Gl();function t(){this.__data__=new e,this.size=0}return Yd=t,Yd}var Xd,fb;function z5(){if(fb)return Xd;fb=1;function e(t){var n=this.__data__,i=n.delete(t);return this.size=n.size,i}return Xd=e,Xd}var Qd,db;function $5(){if(db)return Qd;db=1;function e(t){return this.__data__.get(t)}return Qd=e,Qd}var Zd,hb;function B5(){if(hb)return Zd;hb=1;function e(t){return this.__data__.has(t)}return Zd=e,Zd}var Jd,pb;function iM(){if(pb)return Jd;pb=1;var e=typeof bu=="object"&&bu&&bu.Object===Object&&bu;return Jd=e,Jd}var eh,gb;function mn(){if(gb)return eh;gb=1;var e=iM(),t=typeof self=="object"&&self&&self.Object===Object&&self,n=e||t||Function("return this")();return eh=n,eh}var th,vb;function Eo(){if(vb)return th;vb=1;var e=mn(),t=e.Symbol;return th=t,th}var nh,mb;function V5(){if(mb)return nh;mb=1;var e=Eo(),t=Object.prototype,n=t.hasOwnProperty,i=t.toString,o=e?e.toStringTag:void 0;function a(u){var l=n.call(u,o),f=u[o];try{u[o]=void 0;var d=!0}catch{}var h=i.call(u);return d&&(l?u[o]=f:delete u[o]),h}return nh=a,nh}var rh,yb;function H5(){if(yb)return rh;yb=1;var e=Object.prototype,t=e.toString;function n(i){return t.call(i)}return rh=n,rh}var ih,wb;function pi(){if(wb)return ih;wb=1;var e=Eo(),t=V5(),n=H5(),i="[object Null]",o="[object Undefined]",a=e?e.toStringTag:void 0;function u(l){return l==null?l===void 0?o:i:a&&a in Object(l)?t(l):n(l)}return ih=u,ih}var oh,xb;function Qt(){if(xb)return oh;xb=1;function e(t){var n=typeof t;return t!=null&&(n=="object"||n=="function")}return oh=e,oh}var sh,_b;function ra(){if(_b)return sh;_b=1;var e=pi(),t=Qt(),n="[object AsyncFunction]",i="[object Function]",o="[object GeneratorFunction]",a="[object Proxy]";function u(l){if(!t(l))return!1;var f=e(l);return f==i||f==o||f==n||f==a}return sh=u,sh}var ah,bb;function U5(){if(bb)return ah;bb=1;var e=mn(),t=e["__core-js_shared__"];return ah=t,ah}var uh,Sb;function W5(){if(Sb)return uh;Sb=1;var e=U5(),t=function(){var i=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""}();function n(i){return!!t&&t in i}return uh=n,uh}var lh,Eb;function oM(){if(Eb)return lh;Eb=1;var e=Function.prototype,t=e.toString;function n(i){if(i!=null){try{return t.call(i)}catch{}try{return i+""}catch{}}return""}return lh=n,lh}var ch,Cb;function G5(){if(Cb)return ch;Cb=1;var e=ra(),t=W5(),n=Qt(),i=oM(),o=/[\\^$.*+?()[\]{}|]/g,a=/^\[object .+?Constructor\]$/,u=Function.prototype,l=Object.prototype,f=u.toString,d=l.hasOwnProperty,h=RegExp("^"+f.call(d).replace(o,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function p(v){if(!n(v)||t(v))return!1;var m=e(v)?h:a;return m.test(i(v))}return ch=p,ch}var fh,kb;function K5(){if(kb)return fh;kb=1;function e(t,n){return t==null?void 0:t[n]}return fh=e,fh}var dh,Rb;function gi(){if(Rb)return dh;Rb=1;var e=G5(),t=K5();function n(i,o){var a=t(i,o);return e(a)?a:void 0}return dh=n,dh}var hh,Pb;function y0(){if(Pb)return hh;Pb=1;var e=gi(),t=mn(),n=e(t,"Map");return hh=n,hh}var ph,Nb;function Kl(){if(Nb)return ph;Nb=1;var e=gi(),t=e(Object,"create");return ph=t,ph}var gh,Tb;function Y5(){if(Tb)return gh;Tb=1;var e=Kl();function t(){this.__data__=e?e(null):{},this.size=0}return gh=t,gh}var vh,Mb;function X5(){if(Mb)return vh;Mb=1;function e(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n}return vh=e,vh}var mh,Ab;function Q5(){if(Ab)return mh;Ab=1;var e=Kl(),t="__lodash_hash_undefined__",n=Object.prototype,i=n.hasOwnProperty;function o(a){var u=this.__data__;if(e){var l=u[a];return l===t?void 0:l}return i.call(u,a)?u[a]:void 0}return mh=o,mh}var yh,Ib;function Z5(){if(Ib)return yh;Ib=1;var e=Kl(),t=Object.prototype,n=t.hasOwnProperty;function i(o){var a=this.__data__;return e?a[o]!==void 0:n.call(a,o)}return yh=i,yh}var wh,Lb;function J5(){if(Lb)return wh;Lb=1;var e=Kl(),t="__lodash_hash_undefined__";function n(i,o){var a=this.__data__;return this.size+=this.has(i)?0:1,a[i]=e&&o===void 0?t:o,this}return wh=n,wh}var xh,Ob;function e8(){if(Ob)return xh;Ob=1;var e=Y5(),t=X5(),n=Q5(),i=Z5(),o=J5();function a(u){var l=-1,f=u==null?0:u.length;for(this.clear();++l<f;){var d=u[l];this.set(d[0],d[1])}}return a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=n,a.prototype.has=i,a.prototype.set=o,xh=a,xh}var _h,Db;function t8(){if(Db)return _h;Db=1;var e=e8(),t=Gl(),n=y0();function i(){this.size=0,this.__data__={hash:new e,map:new(n||t),string:new e}}return _h=i,_h}var bh,jb;function n8(){if(jb)return bh;jb=1;function e(t){var n=typeof t;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?t!=="__proto__":t===null}return bh=e,bh}var Sh,qb;function Yl(){if(qb)return Sh;qb=1;var e=n8();function t(n,i){var o=n.__data__;return e(i)?o[typeof i=="string"?"string":"hash"]:o.map}return Sh=t,Sh}var Eh,Fb;function r8(){if(Fb)return Eh;Fb=1;var e=Yl();function t(n){var i=e(this,n).delete(n);return this.size-=i?1:0,i}return Eh=t,Eh}var Ch,zb;function i8(){if(zb)return Ch;zb=1;var e=Yl();function t(n){return e(this,n).get(n)}return Ch=t,Ch}var kh,$b;function o8(){if($b)return kh;$b=1;var e=Yl();function t(n){return e(this,n).has(n)}return kh=t,kh}var Rh,Bb;function s8(){if(Bb)return Rh;Bb=1;var e=Yl();function t(n,i){var o=e(this,n),a=o.size;return o.set(n,i),this.size+=o.size==a?0:1,this}return Rh=t,Rh}var Ph,Vb;function w0(){if(Vb)return Ph;Vb=1;var e=t8(),t=r8(),n=i8(),i=o8(),o=s8();function a(u){var l=-1,f=u==null?0:u.length;for(this.clear();++l<f;){var d=u[l];this.set(d[0],d[1])}}return a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=n,a.prototype.has=i,a.prototype.set=o,Ph=a,Ph}var Nh,Hb;function a8(){if(Hb)return Nh;Hb=1;var e=Gl(),t=y0(),n=w0(),i=200;function o(a,u){var l=this.__data__;if(l instanceof e){var f=l.__data__;if(!t||f.length<i-1)return f.push([a,u]),this.size=++l.size,this;l=this.__data__=new n(f)}return l.set(a,u),this.size=l.size,this}return Nh=o,Nh}var Th,Ub;function Xl(){if(Ub)return Th;Ub=1;var e=Gl(),t=F5(),n=z5(),i=$5(),o=B5(),a=a8();function u(l){var f=this.__data__=new e(l);this.size=f.size}return u.prototype.clear=t,u.prototype.delete=n,u.prototype.get=i,u.prototype.has=o,u.prototype.set=a,Th=u,Th}var Mh,Wb;function x0(){if(Wb)return Mh;Wb=1;function e(t,n){for(var i=-1,o=t==null?0:t.length;++i<o&&n(t[i],i,t)!==!1;);return t}return Mh=e,Mh}var Ah,Gb;function sM(){if(Gb)return Ah;Gb=1;var e=gi(),t=function(){try{var n=e(Object,"defineProperty");return n({},"",{}),n}catch{}}();return Ah=t,Ah}var Ih,Kb;function Ql(){if(Kb)return Ih;Kb=1;var e=sM();function t(n,i,o){i=="__proto__"&&e?e(n,i,{configurable:!0,enumerable:!0,value:o,writable:!0}):n[i]=o}return Ih=t,Ih}var Lh,Yb;function Zl(){if(Yb)return Lh;Yb=1;var e=Ql(),t=So(),n=Object.prototype,i=n.hasOwnProperty;function o(a,u,l){var f=a[u];(!(i.call(a,u)&&t(f,l))||l===void 0&&!(u in a))&&e(a,u,l)}return Lh=o,Lh}var Oh,Xb;function ia(){if(Xb)return Oh;Xb=1;var e=Zl(),t=Ql();function n(i,o,a,u){var l=!a;a||(a={});for(var f=-1,d=o.length;++f<d;){var h=o[f],p=u?u(a[h],i[h],h,a,i):void 0;p===void 0&&(p=i[h]),l?t(a,h,p):e(a,h,p)}return a}return Oh=n,Oh}var Dh,Qb;function u8(){if(Qb)return Dh;Qb=1;function e(t,n){for(var i=-1,o=Array(t);++i<t;)o[i]=n(i);return o}return Dh=e,Dh}var jh,Zb;function Mn(){if(Zb)return jh;Zb=1;function e(t){return t!=null&&typeof t=="object"}return jh=e,jh}var qh,Jb;function l8(){if(Jb)return qh;Jb=1;var e=pi(),t=Mn(),n="[object Arguments]";function i(o){return t(o)&&e(o)==n}return qh=i,qh}var Fh,eS;function oa(){if(eS)return Fh;eS=1;var e=l8(),t=Mn(),n=Object.prototype,i=n.hasOwnProperty,o=n.propertyIsEnumerable,a=e(function(){return arguments}())?e:function(u){return t(u)&&i.call(u,"callee")&&!o.call(u,"callee")};return Fh=a,Fh}var zh,tS;function tt(){if(tS)return zh;tS=1;var e=Array.isArray;return zh=e,zh}var Rs={exports:{}},$h,nS;function c8(){if(nS)return $h;nS=1;function e(){return!1}return $h=e,$h}Rs.exports;var rS;function Co(){return rS||(rS=1,function(e,t){var n=mn(),i=c8(),o=t&&!t.nodeType&&t,a=o&&!0&&e&&!e.nodeType&&e,u=a&&a.exports===o,l=u?n.Buffer:void 0,f=l?l.isBuffer:void 0,d=f||i;e.exports=d}(Rs,Rs.exports)),Rs.exports}var Bh,iS;function Jl(){if(iS)return Bh;iS=1;var e=9007199254740991,t=/^(?:0|[1-9]\d*)$/;function n(i,o){var a=typeof i;return o=o??e,!!o&&(a=="number"||a!="symbol"&&t.test(i))&&i>-1&&i%1==0&&i<o}return Bh=n,Bh}var Vh,oS;function _0(){if(oS)return Vh;oS=1;var e=9007199254740991;function t(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=e}return Vh=t,Vh}var Hh,sS;function f8(){if(sS)return Hh;sS=1;var e=pi(),t=_0(),n=Mn(),i="[object Arguments]",o="[object Array]",a="[object Boolean]",u="[object Date]",l="[object Error]",f="[object Function]",d="[object Map]",h="[object Number]",p="[object Object]",v="[object RegExp]",m="[object Set]",x="[object String]",w="[object WeakMap]",_="[object ArrayBuffer]",S="[object DataView]",k="[object Float32Array]",E="[object Float64Array]",C="[object Int8Array]",R="[object Int16Array]",A="[object Int32Array]",T="[object Uint8Array]",L="[object Uint8ClampedArray]",O="[object Uint16Array]",q="[object Uint32Array]",F={};F[k]=F[E]=F[C]=F[R]=F[A]=F[T]=F[L]=F[O]=F[q]=!0,F[i]=F[o]=F[_]=F[a]=F[S]=F[u]=F[l]=F[f]=F[d]=F[h]=F[p]=F[v]=F[m]=F[x]=F[w]=!1;function $(W){return n(W)&&t(W.length)&&!!F[e(W)]}return Hh=$,Hh}var Uh,aS;function ec(){if(aS)return Uh;aS=1;function e(t){return function(n){return t(n)}}return Uh=e,Uh}var Ps={exports:{}};Ps.exports;var uS;function b0(){return uS||(uS=1,function(e,t){var n=iM(),i=t&&!t.nodeType&&t,o=i&&!0&&e&&!e.nodeType&&e,a=o&&o.exports===i,u=a&&n.process,l=function(){try{var f=o&&o.require&&o.require("util").types;return f||u&&u.binding&&u.binding("util")}catch{}}();e.exports=l}(Ps,Ps.exports)),Ps.exports}var Wh,lS;function sa(){if(lS)return Wh;lS=1;var e=f8(),t=ec(),n=b0(),i=n&&n.isTypedArray,o=i?t(i):e;return Wh=o,Wh}var Gh,cS;function aM(){if(cS)return Gh;cS=1;var e=u8(),t=oa(),n=tt(),i=Co(),o=Jl(),a=sa(),u=Object.prototype,l=u.hasOwnProperty;function f(d,h){var p=n(d),v=!p&&t(d),m=!p&&!v&&i(d),x=!p&&!v&&!m&&a(d),w=p||v||m||x,_=w?e(d.length,String):[],S=_.length;for(var k in d)(h||l.call(d,k))&&!(w&&(k=="length"||m&&(k=="offset"||k=="parent")||x&&(k=="buffer"||k=="byteLength"||k=="byteOffset")||o(k,S)))&&_.push(k);return _}return Gh=f,Gh}var Kh,fS;function tc(){if(fS)return Kh;fS=1;var e=Object.prototype;function t(n){var i=n&&n.constructor,o=typeof i=="function"&&i.prototype||e;return n===o}return Kh=t,Kh}var Yh,dS;function uM(){if(dS)return Yh;dS=1;function e(t,n){return function(i){return t(n(i))}}return Yh=e,Yh}var Xh,hS;function d8(){if(hS)return Xh;hS=1;var e=uM(),t=e(Object.keys,Object);return Xh=t,Xh}var Qh,pS;function S0(){if(pS)return Qh;pS=1;var e=tc(),t=d8(),n=Object.prototype,i=n.hasOwnProperty;function o(a){if(!e(a))return t(a);var u=[];for(var l in Object(a))i.call(a,l)&&l!="constructor"&&u.push(l);return u}return Qh=o,Qh}var Zh,gS;function nr(){if(gS)return Zh;gS=1;var e=ra(),t=_0();function n(i){return i!=null&&t(i.length)&&!e(i)}return Zh=n,Zh}var Jh,vS;function qr(){if(vS)return Jh;vS=1;var e=aM(),t=S0(),n=nr();function i(o){return n(o)?e(o):t(o)}return Jh=i,Jh}var ep,mS;function h8(){if(mS)return ep;mS=1;var e=ia(),t=qr();function n(i,o){return i&&e(o,t(o),i)}return ep=n,ep}var tp,yS;function p8(){if(yS)return tp;yS=1;function e(t){var n=[];if(t!=null)for(var i in Object(t))n.push(i);return n}return tp=e,tp}var np,wS;function g8(){if(wS)return np;wS=1;var e=Qt(),t=tc(),n=p8(),i=Object.prototype,o=i.hasOwnProperty;function a(u){if(!e(u))return n(u);var l=t(u),f=[];for(var d in u)d=="constructor"&&(l||!o.call(u,d))||f.push(d);return f}return np=a,np}var rp,xS;function vi(){if(xS)return rp;xS=1;var e=aM(),t=g8(),n=nr();function i(o){return n(o)?e(o,!0):t(o)}return rp=i,rp}var ip,_S;function v8(){if(_S)return ip;_S=1;var e=ia(),t=vi();function n(i,o){return i&&e(o,t(o),i)}return ip=n,ip}var Ns={exports:{}};Ns.exports;var bS;function lM(){return bS||(bS=1,function(e,t){var n=mn(),i=t&&!t.nodeType&&t,o=i&&!0&&e&&!e.nodeType&&e,a=o&&o.exports===i,u=a?n.Buffer:void 0,l=u?u.allocUnsafe:void 0;function f(d,h){if(h)return d.slice();var p=d.length,v=l?l(p):new d.constructor(p);return d.copy(v),v}e.exports=f}(Ns,Ns.exports)),Ns.exports}var op,SS;function cM(){if(SS)return op;SS=1;function e(t,n){var i=-1,o=t.length;for(n||(n=Array(o));++i<o;)n[i]=t[i];return n}return op=e,op}var sp,ES;function fM(){if(ES)return sp;ES=1;function e(t,n){for(var i=-1,o=t==null?0:t.length,a=0,u=[];++i<o;){var l=t[i];n(l,i,t)&&(u[a++]=l)}return u}return sp=e,sp}var ap,CS;function dM(){if(CS)return ap;CS=1;function e(){return[]}return ap=e,ap}var up,kS;function E0(){if(kS)return up;kS=1;var e=fM(),t=dM(),n=Object.prototype,i=n.propertyIsEnumerable,o=Object.getOwnPropertySymbols,a=o?function(u){return u==null?[]:(u=Object(u),e(o(u),function(l){return i.call(u,l)}))}:t;return up=a,up}var lp,RS;function m8(){if(RS)return lp;RS=1;var e=ia(),t=E0();function n(i,o){return e(i,t(i),o)}return lp=n,lp}var cp,PS;function C0(){if(PS)return cp;PS=1;function e(t,n){for(var i=-1,o=n.length,a=t.length;++i<o;)t[a+i]=n[i];return t}return cp=e,cp}var fp,NS;function nc(){if(NS)return fp;NS=1;var e=uM(),t=e(Object.getPrototypeOf,Object);return fp=t,fp}var dp,TS;function hM(){if(TS)return dp;TS=1;var e=C0(),t=nc(),n=E0(),i=dM(),o=Object.getOwnPropertySymbols,a=o?function(u){for(var l=[];u;)e(l,n(u)),u=t(u);return l}:i;return dp=a,dp}var hp,MS;function y8(){if(MS)return hp;MS=1;var e=ia(),t=hM();function n(i,o){return e(i,t(i),o)}return hp=n,hp}var pp,AS;function pM(){if(AS)return pp;AS=1;var e=C0(),t=tt();function n(i,o,a){var u=o(i);return t(i)?u:e(u,a(i))}return pp=n,pp}var gp,IS;function gM(){if(IS)return gp;IS=1;var e=pM(),t=E0(),n=qr();function i(o){return e(o,n,t)}return gp=i,gp}var vp,LS;function w8(){if(LS)return vp;LS=1;var e=pM(),t=hM(),n=vi();function i(o){return e(o,n,t)}return vp=i,vp}var mp,OS;function x8(){if(OS)return mp;OS=1;var e=gi(),t=mn(),n=e(t,"DataView");return mp=n,mp}var yp,DS;function _8(){if(DS)return yp;DS=1;var e=gi(),t=mn(),n=e(t,"Promise");return yp=n,yp}var wp,jS;function vM(){if(jS)return wp;jS=1;var e=gi(),t=mn(),n=e(t,"Set");return wp=n,wp}var xp,qS;function b8(){if(qS)return xp;qS=1;var e=gi(),t=mn(),n=e(t,"WeakMap");return xp=n,xp}var _p,FS;function ko(){if(FS)return _p;FS=1;var e=x8(),t=y0(),n=_8(),i=vM(),o=b8(),a=pi(),u=oM(),l="[object Map]",f="[object Object]",d="[object Promise]",h="[object Set]",p="[object WeakMap]",v="[object DataView]",m=u(e),x=u(t),w=u(n),_=u(i),S=u(o),k=a;return(e&&k(new e(new ArrayBuffer(1)))!=v||t&&k(new t)!=l||n&&k(n.resolve())!=d||i&&k(new i)!=h||o&&k(new o)!=p)&&(k=function(E){var C=a(E),R=C==f?E.constructor:void 0,A=R?u(R):"";if(A)switch(A){case m:return v;case x:return l;case w:return d;case _:return h;case S:return p}return C}),_p=k,_p}var bp,zS;function S8(){if(zS)return bp;zS=1;var e=Object.prototype,t=e.hasOwnProperty;function n(i){var o=i.length,a=new i.constructor(o);return o&&typeof i[0]=="string"&&t.call(i,"index")&&(a.index=i.index,a.input=i.input),a}return bp=n,bp}var Sp,$S;function mM(){if($S)return Sp;$S=1;var e=mn(),t=e.Uint8Array;return Sp=t,Sp}var Ep,BS;function k0(){if(BS)return Ep;BS=1;var e=mM();function t(n){var i=new n.constructor(n.byteLength);return new e(i).set(new e(n)),i}return Ep=t,Ep}var Cp,VS;function E8(){if(VS)return Cp;VS=1;var e=k0();function t(n,i){var o=i?e(n.buffer):n.buffer;return new n.constructor(o,n.byteOffset,n.byteLength)}return Cp=t,Cp}var kp,HS;function C8(){if(HS)return kp;HS=1;var e=/\w*$/;function t(n){var i=new n.constructor(n.source,e.exec(n));return i.lastIndex=n.lastIndex,i}return kp=t,kp}var Rp,US;function k8(){if(US)return Rp;US=1;var e=Eo(),t=e?e.prototype:void 0,n=t?t.valueOf:void 0;function i(o){return n?Object(n.call(o)):{}}return Rp=i,Rp}var Pp,WS;function yM(){if(WS)return Pp;WS=1;var e=k0();function t(n,i){var o=i?e(n.buffer):n.buffer;return new n.constructor(o,n.byteOffset,n.length)}return Pp=t,Pp}var Np,GS;function R8(){if(GS)return Np;GS=1;var e=k0(),t=E8(),n=C8(),i=k8(),o=yM(),a="[object Boolean]",u="[object Date]",l="[object Map]",f="[object Number]",d="[object RegExp]",h="[object Set]",p="[object String]",v="[object Symbol]",m="[object ArrayBuffer]",x="[object DataView]",w="[object Float32Array]",_="[object Float64Array]",S="[object Int8Array]",k="[object Int16Array]",E="[object Int32Array]",C="[object Uint8Array]",R="[object Uint8ClampedArray]",A="[object Uint16Array]",T="[object Uint32Array]";function L(O,q,F){var $=O.constructor;switch(q){case m:return e(O);case a:case u:return new $(+O);case x:return t(O,F);case w:case _:case S:case k:case E:case C:case R:case A:case T:return o(O,F);case l:return new $;case f:case p:return new $(O);case d:return n(O);case h:return new $;case v:return i(O)}}return Np=L,Np}var Tp,KS;function wM(){if(KS)return Tp;KS=1;var e=Qt(),t=Object.create,n=function(){function i(){}return function(o){if(!e(o))return{};if(t)return t(o);i.prototype=o;var a=new i;return i.prototype=void 0,a}}();return Tp=n,Tp}var Mp,YS;function xM(){if(YS)return Mp;YS=1;var e=wM(),t=nc(),n=tc();function i(o){return typeof o.constructor=="function"&&!n(o)?e(t(o)):{}}return Mp=i,Mp}var Ap,XS;function P8(){if(XS)return Ap;XS=1;var e=ko(),t=Mn(),n="[object Map]";function i(o){return t(o)&&e(o)==n}return Ap=i,Ap}var Ip,QS;function N8(){if(QS)return Ip;QS=1;var e=P8(),t=ec(),n=b0(),i=n&&n.isMap,o=i?t(i):e;return Ip=o,Ip}var Lp,ZS;function T8(){if(ZS)return Lp;ZS=1;var e=ko(),t=Mn(),n="[object Set]";function i(o){return t(o)&&e(o)==n}return Lp=i,Lp}var Op,JS;function M8(){if(JS)return Op;JS=1;var e=T8(),t=ec(),n=b0(),i=n&&n.isSet,o=i?t(i):e;return Op=o,Op}var Dp,eE;function _M(){if(eE)return Dp;eE=1;var e=Xl(),t=x0(),n=Zl(),i=h8(),o=v8(),a=lM(),u=cM(),l=m8(),f=y8(),d=gM(),h=w8(),p=ko(),v=S8(),m=R8(),x=xM(),w=tt(),_=Co(),S=N8(),k=Qt(),E=M8(),C=qr(),R=vi(),A=1,T=2,L=4,O="[object Arguments]",q="[object Array]",F="[object Boolean]",$="[object Date]",W="[object Error]",I="[object Function]",H="[object GeneratorFunction]",z="[object Map]",Q="[object Number]",D="[object Object]",U="[object RegExp]",K="[object Set]",j="[object String]",X="[object Symbol]",oe="[object WeakMap]",V="[object ArrayBuffer]",G="[object DataView]",Z="[object Float32Array]",ne="[object Float64Array]",re="[object Int8Array]",se="[object Int16Array]",de="[object Int32Array]",fe="[object Uint8Array]",he="[object Uint8ClampedArray]",ge="[object Uint16Array]",be="[object Uint32Array]",we={};we[O]=we[q]=we[V]=we[G]=we[F]=we[$]=we[Z]=we[ne]=we[re]=we[se]=we[de]=we[z]=we[Q]=we[D]=we[U]=we[K]=we[j]=we[X]=we[fe]=we[he]=we[ge]=we[be]=!0,we[W]=we[I]=we[oe]=!1;function De(Ce,it,Ke,Pe,Me,Ye){var je,Pt=it&A,pt=it&T,yn=it&L;if(Ke&&(je=Me?Ke(Ce,Pe,Me,Ye):Ke(Ce)),je!==void 0)return je;if(!k(Ce))return Ce;var Jt=w(Ce);if(Jt){if(je=v(Ce),!Pt)return u(Ce,je)}else{var Nt=p(Ce),An=Nt==I||Nt==H;if(_(Ce))return a(Ce,Pt);if(Nt==D||Nt==O||An&&!Me){if(je=pt||An?{}:x(Ce),!Pt)return pt?f(Ce,o(je,Ce)):l(Ce,i(je,Ce))}else{if(!we[Nt])return Me?Ce:{};je=m(Ce,Nt,Pt)}}Ye||(Ye=new e);var wn=Ye.get(Ce);if(wn)return wn;Ye.set(Ce,je),E(Ce)?Ce.forEach(function(Tt){je.add(De(Tt,it,Ke,Tt,Ce,Ye))}):S(Ce)&&Ce.forEach(function(Tt,Bt){je.set(Bt,De(Tt,it,Ke,Bt,Ce,Ye))});var In=yn?pt?h:d:pt?R:C,yi=Jt?void 0:In(Ce);return t(yi||Ce,function(Tt,Bt){yi&&(Bt=Tt,Tt=Ce[Bt]),n(je,Bt,De(Tt,it,Ke,Bt,Ce,Ye))}),je}return Dp=De,Dp}var jp,tE;function A8(){if(tE)return jp;tE=1;var e=_M(),t=4;function n(i){return e(i,t)}return jp=n,jp}var qp,nE;function R0(){if(nE)return qp;nE=1;function e(t){return function(){return t}}return qp=e,qp}var Fp,rE;function I8(){if(rE)return Fp;rE=1;function e(t){return function(n,i,o){for(var a=-1,u=Object(n),l=o(n),f=l.length;f--;){var d=l[t?f:++a];if(i(u[d],d,u)===!1)break}return n}}return Fp=e,Fp}var zp,iE;function P0(){if(iE)return zp;iE=1;var e=I8(),t=e();return zp=t,zp}var $p,oE;function N0(){if(oE)return $p;oE=1;var e=P0(),t=qr();function n(i,o){return i&&e(i,o,t)}return $p=n,$p}var Bp,sE;function L8(){if(sE)return Bp;sE=1;var e=nr();function t(n,i){return function(o,a){if(o==null)return o;if(!e(o))return n(o,a);for(var u=o.length,l=i?u:-1,f=Object(o);(i?l--:++l<u)&&a(f[l],l,f)!==!1;);return o}}return Bp=t,Bp}var Vp,aE;function rc(){if(aE)return Vp;aE=1;var e=N0(),t=L8(),n=t(e);return Vp=n,Vp}var Hp,uE;function mi(){if(uE)return Hp;uE=1;function e(t){return t}return Hp=e,Hp}var Up,lE;function bM(){if(lE)return Up;lE=1;var e=mi();function t(n){return typeof n=="function"?n:e}return Up=t,Up}var Wp,cE;function SM(){if(cE)return Wp;cE=1;var e=x0(),t=rc(),n=bM(),i=tt();function o(a,u){var l=i(a)?e:t;return l(a,n(u))}return Wp=o,Wp}var Gp,fE;function EM(){return fE||(fE=1,Gp=SM()),Gp}var Kp,dE;function O8(){if(dE)return Kp;dE=1;var e=rc();function t(n,i){var o=[];return e(n,function(a,u,l){i(a,u,l)&&o.push(a)}),o}return Kp=t,Kp}var Yp,hE;function D8(){if(hE)return Yp;hE=1;var e="__lodash_hash_undefined__";function t(n){return this.__data__.set(n,e),this}return Yp=t,Yp}var Xp,pE;function j8(){if(pE)return Xp;pE=1;function e(t){return this.__data__.has(t)}return Xp=e,Xp}var Qp,gE;function CM(){if(gE)return Qp;gE=1;var e=w0(),t=D8(),n=j8();function i(o){var a=-1,u=o==null?0:o.length;for(this.__data__=new e;++a<u;)this.add(o[a])}return i.prototype.add=i.prototype.push=t,i.prototype.has=n,Qp=i,Qp}var Zp,vE;function q8(){if(vE)return Zp;vE=1;function e(t,n){for(var i=-1,o=t==null?0:t.length;++i<o;)if(n(t[i],i,t))return!0;return!1}return Zp=e,Zp}var Jp,mE;function kM(){if(mE)return Jp;mE=1;function e(t,n){return t.has(n)}return Jp=e,Jp}var eg,yE;function RM(){if(yE)return eg;yE=1;var e=CM(),t=q8(),n=kM(),i=1,o=2;function a(u,l,f,d,h,p){var v=f&i,m=u.length,x=l.length;if(m!=x&&!(v&&x>m))return!1;var w=p.get(u),_=p.get(l);if(w&&_)return w==l&&_==u;var S=-1,k=!0,E=f&o?new e:void 0;for(p.set(u,l),p.set(l,u);++S<m;){var C=u[S],R=l[S];if(d)var A=v?d(R,C,S,l,u,p):d(C,R,S,u,l,p);if(A!==void 0){if(A)continue;k=!1;break}if(E){if(!t(l,function(T,L){if(!n(E,L)&&(C===T||h(C,T,f,d,p)))return E.push(L)})){k=!1;break}}else if(!(C===R||h(C,R,f,d,p))){k=!1;break}}return p.delete(u),p.delete(l),k}return eg=a,eg}var tg,wE;function F8(){if(wE)return tg;wE=1;function e(t){var n=-1,i=Array(t.size);return t.forEach(function(o,a){i[++n]=[a,o]}),i}return tg=e,tg}var ng,xE;function T0(){if(xE)return ng;xE=1;function e(t){var n=-1,i=Array(t.size);return t.forEach(function(o){i[++n]=o}),i}return ng=e,ng}var rg,_E;function z8(){if(_E)return rg;_E=1;var e=Eo(),t=mM(),n=So(),i=RM(),o=F8(),a=T0(),u=1,l=2,f="[object Boolean]",d="[object Date]",h="[object Error]",p="[object Map]",v="[object Number]",m="[object RegExp]",x="[object Set]",w="[object String]",_="[object Symbol]",S="[object ArrayBuffer]",k="[object DataView]",E=e?e.prototype:void 0,C=E?E.valueOf:void 0;function R(A,T,L,O,q,F,$){switch(L){case k:if(A.byteLength!=T.byteLength||A.byteOffset!=T.byteOffset)return!1;A=A.buffer,T=T.buffer;case S:return!(A.byteLength!=T.byteLength||!F(new t(A),new t(T)));case f:case d:case v:return n(+A,+T);case h:return A.name==T.name&&A.message==T.message;case m:case w:return A==T+"";case p:var W=o;case x:var I=O&u;if(W||(W=a),A.size!=T.size&&!I)return!1;var H=$.get(A);if(H)return H==T;O|=l,$.set(A,T);var z=i(W(A),W(T),O,q,F,$);return $.delete(A),z;case _:if(C)return C.call(A)==C.call(T)}return!1}return rg=R,rg}var ig,bE;function $8(){if(bE)return ig;bE=1;var e=gM(),t=1,n=Object.prototype,i=n.hasOwnProperty;function o(a,u,l,f,d,h){var p=l&t,v=e(a),m=v.length,x=e(u),w=x.length;if(m!=w&&!p)return!1;for(var _=m;_--;){var S=v[_];if(!(p?S in u:i.call(u,S)))return!1}var k=h.get(a),E=h.get(u);if(k&&E)return k==u&&E==a;var C=!0;h.set(a,u),h.set(u,a);for(var R=p;++_<m;){S=v[_];var A=a[S],T=u[S];if(f)var L=p?f(T,A,S,u,a,h):f(A,T,S,a,u,h);if(!(L===void 0?A===T||d(A,T,l,f,h):L)){C=!1;break}R||(R=S=="constructor")}if(C&&!R){var O=a.constructor,q=u.constructor;O!=q&&"constructor"in a&&"constructor"in u&&!(typeof O=="function"&&O instanceof O&&typeof q=="function"&&q instanceof q)&&(C=!1)}return h.delete(a),h.delete(u),C}return ig=o,ig}var og,SE;function B8(){if(SE)return og;SE=1;var e=Xl(),t=RM(),n=z8(),i=$8(),o=ko(),a=tt(),u=Co(),l=sa(),f=1,d="[object Arguments]",h="[object Array]",p="[object Object]",v=Object.prototype,m=v.hasOwnProperty;function x(w,_,S,k,E,C){var R=a(w),A=a(_),T=R?h:o(w),L=A?h:o(_);T=T==d?p:T,L=L==d?p:L;var O=T==p,q=L==p,F=T==L;if(F&&u(w)){if(!u(_))return!1;R=!0,O=!1}if(F&&!O)return C||(C=new e),R||l(w)?t(w,_,S,k,E,C):n(w,_,T,S,k,E,C);if(!(S&f)){var $=O&&m.call(w,"__wrapped__"),W=q&&m.call(_,"__wrapped__");if($||W){var I=$?w.value():w,H=W?_.value():_;return C||(C=new e),E(I,H,S,k,C)}}return F?(C||(C=new e),i(w,_,S,k,E,C)):!1}return og=x,og}var sg,EE;function PM(){if(EE)return sg;EE=1;var e=B8(),t=Mn();function n(i,o,a,u,l){return i===o?!0:i==null||o==null||!t(i)&&!t(o)?i!==i&&o!==o:e(i,o,a,u,n,l)}return sg=n,sg}var ag,CE;function V8(){if(CE)return ag;CE=1;var e=Xl(),t=PM(),n=1,i=2;function o(a,u,l,f){var d=l.length,h=d,p=!f;if(a==null)return!h;for(a=Object(a);d--;){var v=l[d];if(p&&v[2]?v[1]!==a[v[0]]:!(v[0]in a))return!1}for(;++d<h;){v=l[d];var m=v[0],x=a[m],w=v[1];if(p&&v[2]){if(x===void 0&&!(m in a))return!1}else{var _=new e;if(f)var S=f(x,w,m,a,u,_);if(!(S===void 0?t(w,x,n|i,f,_):S))return!1}}return!0}return ag=o,ag}var ug,kE;function NM(){if(kE)return ug;kE=1;var e=Qt();function t(n){return n===n&&!e(n)}return ug=t,ug}var lg,RE;function H8(){if(RE)return lg;RE=1;var e=NM(),t=qr();function n(i){for(var o=t(i),a=o.length;a--;){var u=o[a],l=i[u];o[a]=[u,l,e(l)]}return o}return lg=n,lg}var cg,PE;function TM(){if(PE)return cg;PE=1;function e(t,n){return function(i){return i==null?!1:i[t]===n&&(n!==void 0||t in Object(i))}}return cg=e,cg}var fg,NE;function U8(){if(NE)return fg;NE=1;var e=V8(),t=H8(),n=TM();function i(o){var a=t(o);return a.length==1&&a[0][2]?n(a[0][0],a[0][1]):function(u){return u===o||e(u,o,a)}}return fg=i,fg}var dg,TE;function Ro(){if(TE)return dg;TE=1;var e=pi(),t=Mn(),n="[object Symbol]";function i(o){return typeof o=="symbol"||t(o)&&e(o)==n}return dg=i,dg}var hg,ME;function M0(){if(ME)return hg;ME=1;var e=tt(),t=Ro(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,i=/^\w*$/;function o(a,u){if(e(a))return!1;var l=typeof a;return l=="number"||l=="symbol"||l=="boolean"||a==null||t(a)?!0:i.test(a)||!n.test(a)||u!=null&&a in Object(u)}return hg=o,hg}var pg,AE;function W8(){if(AE)return pg;AE=1;var e=w0(),t="Expected a function";function n(i,o){if(typeof i!="function"||o!=null&&typeof o!="function")throw new TypeError(t);var a=function(){var u=arguments,l=o?o.apply(this,u):u[0],f=a.cache;if(f.has(l))return f.get(l);var d=i.apply(this,u);return a.cache=f.set(l,d)||f,d};return a.cache=new(n.Cache||e),a}return n.Cache=e,pg=n,pg}var gg,IE;function G8(){if(IE)return gg;IE=1;var e=W8(),t=500;function n(i){var o=e(i,function(u){return a.size===t&&a.clear(),u}),a=o.cache;return o}return gg=n,gg}var vg,LE;function K8(){if(LE)return vg;LE=1;var e=G8(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n=/\\(\\)?/g,i=e(function(o){var a=[];return o.charCodeAt(0)===46&&a.push(""),o.replace(t,function(u,l,f,d){a.push(f?d.replace(n,"$1"):l||u)}),a});return vg=i,vg}var mg,OE;function ic(){if(OE)return mg;OE=1;function e(t,n){for(var i=-1,o=t==null?0:t.length,a=Array(o);++i<o;)a[i]=n(t[i],i,t);return a}return mg=e,mg}var yg,DE;function Y8(){if(DE)return yg;DE=1;var e=Eo(),t=ic(),n=tt(),i=Ro(),o=1/0,a=e?e.prototype:void 0,u=a?a.toString:void 0;function l(f){if(typeof f=="string")return f;if(n(f))return t(f,l)+"";if(i(f))return u?u.call(f):"";var d=f+"";return d=="0"&&1/f==-o?"-0":d}return yg=l,yg}var wg,jE;function MM(){if(jE)return wg;jE=1;var e=Y8();function t(n){return n==null?"":e(n)}return wg=t,wg}var xg,qE;function oc(){if(qE)return xg;qE=1;var e=tt(),t=M0(),n=K8(),i=MM();function o(a,u){return e(a)?a:t(a,u)?[a]:n(i(a))}return xg=o,xg}var _g,FE;function aa(){if(FE)return _g;FE=1;var e=Ro(),t=1/0;function n(i){if(typeof i=="string"||e(i))return i;var o=i+"";return o=="0"&&1/i==-t?"-0":o}return _g=n,_g}var bg,zE;function sc(){if(zE)return bg;zE=1;var e=oc(),t=aa();function n(i,o){o=e(o,i);for(var a=0,u=o.length;i!=null&&a<u;)i=i[t(o[a++])];return a&&a==u?i:void 0}return bg=n,bg}var Sg,$E;function X8(){if($E)return Sg;$E=1;var e=sc();function t(n,i,o){var a=n==null?void 0:e(n,i);return a===void 0?o:a}return Sg=t,Sg}var Eg,BE;function Q8(){if(BE)return Eg;BE=1;function e(t,n){return t!=null&&n in Object(t)}return Eg=e,Eg}var Cg,VE;function AM(){if(VE)return Cg;VE=1;var e=oc(),t=oa(),n=tt(),i=Jl(),o=_0(),a=aa();function u(l,f,d){f=e(f,l);for(var h=-1,p=f.length,v=!1;++h<p;){var m=a(f[h]);if(!(v=l!=null&&d(l,m)))break;l=l[m]}return v||++h!=p?v:(p=l==null?0:l.length,!!p&&o(p)&&i(m,p)&&(n(l)||t(l)))}return Cg=u,Cg}var kg,HE;function IM(){if(HE)return kg;HE=1;var e=Q8(),t=AM();function n(i,o){return i!=null&&t(i,o,e)}return kg=n,kg}var Rg,UE;function Z8(){if(UE)return Rg;UE=1;var e=PM(),t=X8(),n=IM(),i=M0(),o=NM(),a=TM(),u=aa(),l=1,f=2;function d(h,p){return i(h)&&o(p)?a(u(h),p):function(v){var m=t(v,h);return m===void 0&&m===p?n(v,h):e(p,m,l|f)}}return Rg=d,Rg}var Pg,WE;function LM(){if(WE)return Pg;WE=1;function e(t){return function(n){return n==null?void 0:n[t]}}return Pg=e,Pg}var Ng,GE;function J8(){if(GE)return Ng;GE=1;var e=sc();function t(n){return function(i){return e(i,n)}}return Ng=t,Ng}var Tg,KE;function eV(){if(KE)return Tg;KE=1;var e=LM(),t=J8(),n=M0(),i=aa();function o(a){return n(a)?e(i(a)):t(a)}return Tg=o,Tg}var Mg,YE;function rr(){if(YE)return Mg;YE=1;var e=U8(),t=Z8(),n=mi(),i=tt(),o=eV();function a(u){return typeof u=="function"?u:u==null?n:typeof u=="object"?i(u)?t(u[0],u[1]):e(u):o(u)}return Mg=a,Mg}var Ag,XE;function OM(){if(XE)return Ag;XE=1;var e=fM(),t=O8(),n=rr(),i=tt();function o(a,u){var l=i(a)?e:t;return l(a,n(u,3))}return Ag=o,Ag}var Ig,QE;function tV(){if(QE)return Ig;QE=1;var e=Object.prototype,t=e.hasOwnProperty;function n(i,o){return i!=null&&t.call(i,o)}return Ig=n,Ig}var Lg,ZE;function DM(){if(ZE)return Lg;ZE=1;var e=tV(),t=AM();function n(i,o){return i!=null&&t(i,o,e)}return Lg=n,Lg}var Og,JE;function nV(){if(JE)return Og;JE=1;var e=S0(),t=ko(),n=oa(),i=tt(),o=nr(),a=Co(),u=tc(),l=sa(),f="[object Map]",d="[object Set]",h=Object.prototype,p=h.hasOwnProperty;function v(m){if(m==null)return!0;if(o(m)&&(i(m)||typeof m=="string"||typeof m.splice=="function"||a(m)||l(m)||n(m)))return!m.length;var x=t(m);if(x==f||x==d)return!m.size;if(u(m))return!e(m).length;for(var w in m)if(p.call(m,w))return!1;return!0}return Og=v,Og}var Dg,eC;function jM(){if(eC)return Dg;eC=1;function e(t){return t===void 0}return Dg=e,Dg}var jg,tC;function qM(){if(tC)return jg;tC=1;var e=rc(),t=nr();function n(i,o){var a=-1,u=t(i)?Array(i.length):[];return e(i,function(l,f,d){u[++a]=o(l,f,d)}),u}return jg=n,jg}var qg,nC;function FM(){if(nC)return qg;nC=1;var e=ic(),t=rr(),n=qM(),i=tt();function o(a,u){var l=i(a)?e:n;return l(a,t(u,3))}return qg=o,qg}var Fg,rC;function rV(){if(rC)return Fg;rC=1;function e(t,n,i,o){var a=-1,u=t==null?0:t.length;for(o&&u&&(i=t[++a]);++a<u;)i=n(i,t[a],a,t);return i}return Fg=e,Fg}var zg,iC;function iV(){if(iC)return zg;iC=1;function e(t,n,i,o,a){return a(t,function(u,l,f){i=o?(o=!1,u):n(i,u,l,f)}),i}return zg=e,zg}var $g,oC;function zM(){if(oC)return $g;oC=1;var e=rV(),t=rc(),n=rr(),i=iV(),o=tt();function a(u,l,f){var d=o(u)?e:i,h=arguments.length<3;return d(u,n(l,4),f,h,t)}return $g=a,$g}var Bg,sC;function oV(){if(sC)return Bg;sC=1;var e=pi(),t=tt(),n=Mn(),i="[object String]";function o(a){return typeof a=="string"||!t(a)&&n(a)&&e(a)==i}return Bg=o,Bg}var Vg,aC;function sV(){if(aC)return Vg;aC=1;var e=LM(),t=e("length");return Vg=t,Vg}var Hg,uC;function aV(){if(uC)return Hg;uC=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",i="\\u20d0-\\u20ff",o=t+n+i,a="\\ufe0e\\ufe0f",u="\\u200d",l=RegExp("["+u+e+o+a+"]");function f(d){return l.test(d)}return Hg=f,Hg}var Ug,lC;function uV(){if(lC)return Ug;lC=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",i="\\u20d0-\\u20ff",o=t+n+i,a="\\ufe0e\\ufe0f",u="["+e+"]",l="["+o+"]",f="\\ud83c[\\udffb-\\udfff]",d="(?:"+l+"|"+f+")",h="[^"+e+"]",p="(?:\\ud83c[\\udde6-\\uddff]){2}",v="[\\ud800-\\udbff][\\udc00-\\udfff]",m="\\u200d",x=d+"?",w="["+a+"]?",_="(?:"+m+"(?:"+[h,p,v].join("|")+")"+w+x+")*",S=w+x+_,k="(?:"+[h+l+"?",l,p,v,u].join("|")+")",E=RegExp(f+"(?="+f+")|"+k+S,"g");function C(R){for(var A=E.lastIndex=0;E.test(R);)++A;return A}return Ug=C,Ug}var Wg,cC;function lV(){if(cC)return Wg;cC=1;var e=sV(),t=aV(),n=uV();function i(o){return t(o)?n(o):e(o)}return Wg=i,Wg}var Gg,fC;function cV(){if(fC)return Gg;fC=1;var e=S0(),t=ko(),n=nr(),i=oV(),o=lV(),a="[object Map]",u="[object Set]";function l(f){if(f==null)return 0;if(n(f))return i(f)?o(f):f.length;var d=t(f);return d==a||d==u?f.size:e(f).length}return Gg=l,Gg}var Kg,dC;function fV(){if(dC)return Kg;dC=1;var e=x0(),t=wM(),n=N0(),i=rr(),o=nc(),a=tt(),u=Co(),l=ra(),f=Qt(),d=sa();function h(p,v,m){var x=a(p),w=x||u(p)||d(p);if(v=i(v,4),m==null){var _=p&&p.constructor;w?m=x?new _:[]:f(p)?m=l(_)?t(o(p)):{}:m={}}return(w?e:n)(p,function(S,k,E){return v(m,S,k,E)}),m}return Kg=h,Kg}var Yg,hC;function dV(){if(hC)return Yg;hC=1;var e=Eo(),t=oa(),n=tt(),i=e?e.isConcatSpreadable:void 0;function o(a){return n(a)||t(a)||!!(i&&a&&a[i])}return Yg=o,Yg}var Xg,pC;function A0(){if(pC)return Xg;pC=1;var e=C0(),t=dV();function n(i,o,a,u,l){var f=-1,d=i.length;for(a||(a=t),l||(l=[]);++f<d;){var h=i[f];o>0&&a(h)?o>1?n(h,o-1,a,u,l):e(l,h):u||(l[l.length]=h)}return l}return Xg=n,Xg}var Qg,gC;function hV(){if(gC)return Qg;gC=1;function e(t,n,i){switch(i.length){case 0:return t.call(n);case 1:return t.call(n,i[0]);case 2:return t.call(n,i[0],i[1]);case 3:return t.call(n,i[0],i[1],i[2])}return t.apply(n,i)}return Qg=e,Qg}var Zg,vC;function $M(){if(vC)return Zg;vC=1;var e=hV(),t=Math.max;function n(i,o,a){return o=t(o===void 0?i.length-1:o,0),function(){for(var u=arguments,l=-1,f=t(u.length-o,0),d=Array(f);++l<f;)d[l]=u[o+l];l=-1;for(var h=Array(o+1);++l<o;)h[l]=u[l];return h[o]=a(d),e(i,this,h)}}return Zg=n,Zg}var Jg,mC;function pV(){if(mC)return Jg;mC=1;var e=R0(),t=sM(),n=mi(),i=t?function(o,a){return t(o,"toString",{configurable:!0,enumerable:!1,value:e(a),writable:!0})}:n;return Jg=i,Jg}var ev,yC;function gV(){if(yC)return ev;yC=1;var e=800,t=16,n=Date.now;function i(o){var a=0,u=0;return function(){var l=n(),f=t-(l-u);if(u=l,f>0){if(++a>=e)return arguments[0]}else a=0;return o.apply(void 0,arguments)}}return ev=i,ev}var tv,wC;function BM(){if(wC)return tv;wC=1;var e=pV(),t=gV(),n=t(e);return tv=n,tv}var nv,xC;function ac(){if(xC)return nv;xC=1;var e=mi(),t=$M(),n=BM();function i(o,a){return n(t(o,a,e),o+"")}return nv=i,nv}var rv,_C;function VM(){if(_C)return rv;_C=1;function e(t,n,i,o){for(var a=t.length,u=i+(o?1:-1);o?u--:++u<a;)if(n(t[u],u,t))return u;return-1}return rv=e,rv}var iv,bC;function vV(){if(bC)return iv;bC=1;function e(t){return t!==t}return iv=e,iv}var ov,SC;function mV(){if(SC)return ov;SC=1;function e(t,n,i){for(var o=i-1,a=t.length;++o<a;)if(t[o]===n)return o;return-1}return ov=e,ov}var sv,EC;function yV(){if(EC)return sv;EC=1;var e=VM(),t=vV(),n=mV();function i(o,a,u){return a===a?n(o,a,u):e(o,t,u)}return sv=i,sv}var av,CC;function wV(){if(CC)return av;CC=1;var e=yV();function t(n,i){var o=n==null?0:n.length;return!!o&&e(n,i,0)>-1}return av=t,av}var uv,kC;function xV(){if(kC)return uv;kC=1;function e(t,n,i){for(var o=-1,a=t==null?0:t.length;++o<a;)if(i(n,t[o]))return!0;return!1}return uv=e,uv}var lv,RC;function _V(){if(RC)return lv;RC=1;function e(){}return lv=e,lv}var cv,PC;function bV(){if(PC)return cv;PC=1;var e=vM(),t=_V(),n=T0(),i=1/0,o=e&&1/n(new e([,-0]))[1]==i?function(a){return new e(a)}:t;return cv=o,cv}var fv,NC;function SV(){if(NC)return fv;NC=1;var e=CM(),t=wV(),n=xV(),i=kM(),o=bV(),a=T0(),u=200;function l(f,d,h){var p=-1,v=t,m=f.length,x=!0,w=[],_=w;if(h)x=!1,v=n;else if(m>=u){var S=d?null:o(f);if(S)return a(S);x=!1,v=i,_=new e}else _=d?[]:w;e:for(;++p<m;){var k=f[p],E=d?d(k):k;if(k=h||k!==0?k:0,x&&E===E){for(var C=_.length;C--;)if(_[C]===E)continue e;d&&_.push(E),w.push(k)}else v(_,E,h)||(_!==w&&_.push(E),w.push(k))}return w}return fv=l,fv}var dv,TC;function HM(){if(TC)return dv;TC=1;var e=nr(),t=Mn();function n(i){return t(i)&&e(i)}return dv=n,dv}var hv,MC;function EV(){if(MC)return hv;MC=1;var e=A0(),t=ac(),n=SV(),i=HM(),o=t(function(a){return n(e(a,1,i,!0))});return hv=o,hv}var pv,AC;function CV(){if(AC)return pv;AC=1;var e=ic();function t(n,i){return e(i,function(o){return n[o]})}return pv=t,pv}var gv,IC;function UM(){if(IC)return gv;IC=1;var e=CV(),t=qr();function n(i){return i==null?[]:e(i,t(i))}return gv=n,gv}var vv,LC;function Zt(){if(LC)return vv;LC=1;var e;if(typeof m0=="function")try{e={clone:A8(),constant:R0(),each:EM(),filter:OM(),has:DM(),isArray:tt(),isEmpty:nV(),isFunction:ra(),isUndefined:jM(),keys:qr(),map:FM(),reduce:zM(),size:cV(),transform:fV(),union:EV(),values:UM()}}catch{}return e||(e=window._),vv=e,vv}var mv,OC;function I0(){if(OC)return mv;OC=1;var e=Zt();mv=o;var t="\0",n="\0",i="";function o(h){this._isDirected=e.has(h,"directed")?h.directed:!0,this._isMultigraph=e.has(h,"multigraph")?h.multigraph:!1,this._isCompound=e.has(h,"compound")?h.compound:!1,this._label=void 0,this._defaultNodeLabelFn=e.constant(void 0),this._defaultEdgeLabelFn=e.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[n]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}o.prototype._nodeCount=0,o.prototype._edgeCount=0,o.prototype.isDirected=function(){return this._isDirected},o.prototype.isMultigraph=function(){return this._isMultigraph},o.prototype.isCompound=function(){return this._isCompound},o.prototype.setGraph=function(h){return this._label=h,this},o.prototype.graph=function(){return this._label},o.prototype.setDefaultNodeLabel=function(h){return e.isFunction(h)||(h=e.constant(h)),this._defaultNodeLabelFn=h,this},o.prototype.nodeCount=function(){return this._nodeCount},o.prototype.nodes=function(){return e.keys(this._nodes)},o.prototype.sources=function(){var h=this;return e.filter(this.nodes(),function(p){return e.isEmpty(h._in[p])})},o.prototype.sinks=function(){var h=this;return e.filter(this.nodes(),function(p){return e.isEmpty(h._out[p])})},o.prototype.setNodes=function(h,p){var v=arguments,m=this;return e.each(h,function(x){v.length>1?m.setNode(x,p):m.setNode(x)}),this},o.prototype.setNode=function(h,p){return e.has(this._nodes,h)?(arguments.length>1&&(this._nodes[h]=p),this):(this._nodes[h]=arguments.length>1?p:this._defaultNodeLabelFn(h),this._isCompound&&(this._parent[h]=n,this._children[h]={},this._children[n][h]=!0),this._in[h]={},this._preds[h]={},this._out[h]={},this._sucs[h]={},++this._nodeCount,this)},o.prototype.node=function(h){return this._nodes[h]},o.prototype.hasNode=function(h){return e.has(this._nodes,h)},o.prototype.removeNode=function(h){var p=this;if(e.has(this._nodes,h)){var v=function(m){p.removeEdge(p._edgeObjs[m])};delete this._nodes[h],this._isCompound&&(this._removeFromParentsChildList(h),delete this._parent[h],e.each(this.children(h),function(m){p.setParent(m)}),delete this._children[h]),e.each(e.keys(this._in[h]),v),delete this._in[h],delete this._preds[h],e.each(e.keys(this._out[h]),v),delete this._out[h],delete this._sucs[h],--this._nodeCount}return this},o.prototype.setParent=function(h,p){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(e.isUndefined(p))p=n;else{p+="";for(var v=p;!e.isUndefined(v);v=this.parent(v))if(v===h)throw new Error("Setting "+p+" as parent of "+h+" would create a cycle");this.setNode(p)}return this.setNode(h),this._removeFromParentsChildList(h),this._parent[h]=p,this._children[p][h]=!0,this},o.prototype._removeFromParentsChildList=function(h){delete this._children[this._parent[h]][h]},o.prototype.parent=function(h){if(this._isCompound){var p=this._parent[h];if(p!==n)return p}},o.prototype.children=function(h){if(e.isUndefined(h)&&(h=n),this._isCompound){var p=this._children[h];if(p)return e.keys(p)}else{if(h===n)return this.nodes();if(this.hasNode(h))return[]}},o.prototype.predecessors=function(h){var p=this._preds[h];if(p)return e.keys(p)},o.prototype.successors=function(h){var p=this._sucs[h];if(p)return e.keys(p)},o.prototype.neighbors=function(h){var p=this.predecessors(h);if(p)return e.union(p,this.successors(h))},o.prototype.isLeaf=function(h){var p;return this.isDirected()?p=this.successors(h):p=this.neighbors(h),p.length===0},o.prototype.filterNodes=function(h){var p=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});p.setGraph(this.graph());var v=this;e.each(this._nodes,function(w,_){h(_)&&p.setNode(_,w)}),e.each(this._edgeObjs,function(w){p.hasNode(w.v)&&p.hasNode(w.w)&&p.setEdge(w,v.edge(w))});var m={};function x(w){var _=v.parent(w);return _===void 0||p.hasNode(_)?(m[w]=_,_):_ in m?m[_]:x(_)}return this._isCompound&&e.each(p.nodes(),function(w){p.setParent(w,x(w))}),p},o.prototype.setDefaultEdgeLabel=function(h){return e.isFunction(h)||(h=e.constant(h)),this._defaultEdgeLabelFn=h,this},o.prototype.edgeCount=function(){return this._edgeCount},o.prototype.edges=function(){return e.values(this._edgeObjs)},o.prototype.setPath=function(h,p){var v=this,m=arguments;return e.reduce(h,function(x,w){return m.length>1?v.setEdge(x,w,p):v.setEdge(x,w),w}),this},o.prototype.setEdge=function(){var h,p,v,m,x=!1,w=arguments[0];typeof w=="object"&&w!==null&&"v"in w?(h=w.v,p=w.w,v=w.name,arguments.length===2&&(m=arguments[1],x=!0)):(h=w,p=arguments[1],v=arguments[3],arguments.length>2&&(m=arguments[2],x=!0)),h=""+h,p=""+p,e.isUndefined(v)||(v=""+v);var _=l(this._isDirected,h,p,v);if(e.has(this._edgeLabels,_))return x&&(this._edgeLabels[_]=m),this;if(!e.isUndefined(v)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(h),this.setNode(p),this._edgeLabels[_]=x?m:this._defaultEdgeLabelFn(h,p,v);var S=f(this._isDirected,h,p,v);return h=S.v,p=S.w,Object.freeze(S),this._edgeObjs[_]=S,a(this._preds[p],h),a(this._sucs[h],p),this._in[p][_]=S,this._out[h][_]=S,this._edgeCount++,this},o.prototype.edge=function(h,p,v){var m=arguments.length===1?d(this._isDirected,arguments[0]):l(this._isDirected,h,p,v);return this._edgeLabels[m]},o.prototype.hasEdge=function(h,p,v){var m=arguments.length===1?d(this._isDirected,arguments[0]):l(this._isDirected,h,p,v);return e.has(this._edgeLabels,m)},o.prototype.removeEdge=function(h,p,v){var m=arguments.length===1?d(this._isDirected,arguments[0]):l(this._isDirected,h,p,v),x=this._edgeObjs[m];return x&&(h=x.v,p=x.w,delete this._edgeLabels[m],delete this._edgeObjs[m],u(this._preds[p],h),u(this._sucs[h],p),delete this._in[p][m],delete this._out[h][m],this._edgeCount--),this},o.prototype.inEdges=function(h,p){var v=this._in[h];if(v){var m=e.values(v);return p?e.filter(m,function(x){return x.v===p}):m}},o.prototype.outEdges=function(h,p){var v=this._out[h];if(v){var m=e.values(v);return p?e.filter(m,function(x){return x.w===p}):m}},o.prototype.nodeEdges=function(h,p){var v=this.inEdges(h,p);if(v)return v.concat(this.outEdges(h,p))};function a(h,p){h[p]?h[p]++:h[p]=1}function u(h,p){--h[p]||delete h[p]}function l(h,p,v,m){var x=""+p,w=""+v;if(!h&&x>w){var _=x;x=w,w=_}return x+i+w+i+(e.isUndefined(m)?t:m)}function f(h,p,v,m){var x=""+p,w=""+v;if(!h&&x>w){var _=x;x=w,w=_}var S={v:x,w};return m&&(S.name=m),S}function d(h,p){return l(h,p.v,p.w,p.name)}return mv}var yv,DC;function kV(){return DC||(DC=1,yv="2.1.8"),yv}var wv,jC;function RV(){return jC||(jC=1,wv={Graph:I0(),version:kV()}),wv}var xv,qC;function PV(){if(qC)return xv;qC=1;var e=Zt(),t=I0();xv={write:n,read:a};function n(u){var l={options:{directed:u.isDirected(),multigraph:u.isMultigraph(),compound:u.isCompound()},nodes:i(u),edges:o(u)};return e.isUndefined(u.graph())||(l.value=e.clone(u.graph())),l}function i(u){return e.map(u.nodes(),function(l){var f=u.node(l),d=u.parent(l),h={v:l};return e.isUndefined(f)||(h.value=f),e.isUndefined(d)||(h.parent=d),h})}function o(u){return e.map(u.edges(),function(l){var f=u.edge(l),d={v:l.v,w:l.w};return e.isUndefined(l.name)||(d.name=l.name),e.isUndefined(f)||(d.value=f),d})}function a(u){var l=new t(u.options).setGraph(u.value);return e.each(u.nodes,function(f){l.setNode(f.v,f.value),f.parent&&l.setParent(f.v,f.parent)}),e.each(u.edges,function(f){l.setEdge({v:f.v,w:f.w,name:f.name},f.value)}),l}return xv}var _v,FC;function NV(){if(FC)return _v;FC=1;var e=Zt();_v=t;function t(n){var i={},o=[],a;function u(l){e.has(i,l)||(i[l]=!0,a.push(l),e.each(n.successors(l),u),e.each(n.predecessors(l),u))}return e.each(n.nodes(),function(l){a=[],u(l),a.length&&o.push(a)}),o}return _v}var bv,zC;function WM(){if(zC)return bv;zC=1;var e=Zt();bv=t;function t(){this._arr=[],this._keyIndices={}}return t.prototype.size=function(){return this._arr.length},t.prototype.keys=function(){return this._arr.map(function(n){return n.key})},t.prototype.has=function(n){return e.has(this._keyIndices,n)},t.prototype.priority=function(n){var i=this._keyIndices[n];if(i!==void 0)return this._arr[i].priority},t.prototype.min=function(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key},t.prototype.add=function(n,i){var o=this._keyIndices;if(n=String(n),!e.has(o,n)){var a=this._arr,u=a.length;return o[n]=u,a.push({key:n,priority:i}),this._decrease(u),!0}return!1},t.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var n=this._arr.pop();return delete this._keyIndices[n.key],this._heapify(0),n.key},t.prototype.decrease=function(n,i){var o=this._keyIndices[n];if(i>this._arr[o].priority)throw new Error("New priority is greater than current priority. Key: "+n+" Old: "+this._arr[o].priority+" New: "+i);this._arr[o].priority=i,this._decrease(o)},t.prototype._heapify=function(n){var i=this._arr,o=2*n,a=o+1,u=n;o<i.length&&(u=i[o].priority<i[u].priority?o:u,a<i.length&&(u=i[a].priority<i[u].priority?a:u),u!==n&&(this._swap(n,u),this._heapify(u)))},t.prototype._decrease=function(n){for(var i=this._arr,o=i[n].priority,a;n!==0&&(a=n>>1,!(i[a].priority<o));)this._swap(n,a),n=a},t.prototype._swap=function(n,i){var o=this._arr,a=this._keyIndices,u=o[n],l=o[i];o[n]=l,o[i]=u,a[l.key]=n,a[u.key]=i},bv}var Sv,$C;function GM(){if($C)return Sv;$C=1;var e=Zt(),t=WM();Sv=i;var n=e.constant(1);function i(a,u,l,f){return o(a,String(u),l||n,f||function(d){return a.outEdges(d)})}function o(a,u,l,f){var d={},h=new t,p,v,m=function(x){var w=x.v!==p?x.v:x.w,_=d[w],S=l(x),k=v.distance+S;if(S<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+x+" Weight: "+S);k<_.distance&&(_.distance=k,_.predecessor=p,h.decrease(w,k))};for(a.nodes().forEach(function(x){var w=x===u?0:Number.POSITIVE_INFINITY;d[x]={distance:w},h.add(x,w)});h.size()>0&&(p=h.removeMin(),v=d[p],v.distance!==Number.POSITIVE_INFINITY);)f(p).forEach(m);return d}return Sv}var Ev,BC;function TV(){if(BC)return Ev;BC=1;var e=GM(),t=Zt();Ev=n;function n(i,o,a){return t.transform(i.nodes(),function(u,l){u[l]=e(i,l,o,a)},{})}return Ev}var Cv,VC;function KM(){if(VC)return Cv;VC=1;var e=Zt();Cv=t;function t(n){var i=0,o=[],a={},u=[];function l(f){var d=a[f]={onStack:!0,lowlink:i,index:i++};if(o.push(f),n.successors(f).forEach(function(v){e.has(a,v)?a[v].onStack&&(d.lowlink=Math.min(d.lowlink,a[v].index)):(l(v),d.lowlink=Math.min(d.lowlink,a[v].lowlink))}),d.lowlink===d.index){var h=[],p;do p=o.pop(),a[p].onStack=!1,h.push(p);while(f!==p);u.push(h)}}return n.nodes().forEach(function(f){e.has(a,f)||l(f)}),u}return Cv}var kv,HC;function MV(){if(HC)return kv;HC=1;var e=Zt(),t=KM();kv=n;function n(i){return e.filter(t(i),function(o){return o.length>1||o.length===1&&i.hasEdge(o[0],o[0])})}return kv}var Rv,UC;function AV(){if(UC)return Rv;UC=1;var e=Zt();Rv=n;var t=e.constant(1);function n(o,a,u){return i(o,a||t,u||function(l){return o.outEdges(l)})}function i(o,a,u){var l={},f=o.nodes();return f.forEach(function(d){l[d]={},l[d][d]={distance:0},f.forEach(function(h){d!==h&&(l[d][h]={distance:Number.POSITIVE_INFINITY})}),u(d).forEach(function(h){var p=h.v===d?h.w:h.v,v=a(h);l[d][p]={distance:v,predecessor:d}})}),f.forEach(function(d){var h=l[d];f.forEach(function(p){var v=l[p];f.forEach(function(m){var x=v[d],w=h[m],_=v[m],S=x.distance+w.distance;S<_.distance&&(_.distance=S,_.predecessor=w.predecessor)})})}),l}return Rv}var Pv,WC;function YM(){if(WC)return Pv;WC=1;var e=Zt();Pv=t,t.CycleException=n;function t(i){var o={},a={},u=[];function l(f){if(e.has(a,f))throw new n;e.has(o,f)||(a[f]=!0,o[f]=!0,e.each(i.predecessors(f),l),delete a[f],u.push(f))}if(e.each(i.sinks(),l),e.size(o)!==i.nodeCount())throw new n;return u}function n(){}return n.prototype=new Error,Pv}var Nv,GC;function IV(){if(GC)return Nv;GC=1;var e=YM();Nv=t;function t(n){try{e(n)}catch(i){if(i instanceof e.CycleException)return!1;throw i}return!0}return Nv}var Tv,KC;function XM(){if(KC)return Tv;KC=1;var e=Zt();Tv=t;function t(i,o,a){e.isArray(o)||(o=[o]);var u=(i.isDirected()?i.successors:i.neighbors).bind(i),l=[],f={};return e.each(o,function(d){if(!i.hasNode(d))throw new Error("Graph does not have node: "+d);n(i,d,a==="post",f,u,l)}),l}function n(i,o,a,u,l,f){e.has(u,o)||(u[o]=!0,a||f.push(o),e.each(l(o),function(d){n(i,d,a,u,l,f)}),a&&f.push(o))}return Tv}var Mv,YC;function LV(){if(YC)return Mv;YC=1;var e=XM();Mv=t;function t(n,i){return e(n,i,"post")}return Mv}var Av,XC;function OV(){if(XC)return Av;XC=1;var e=XM();Av=t;function t(n,i){return e(n,i,"pre")}return Av}var Iv,QC;function DV(){if(QC)return Iv;QC=1;var e=Zt(),t=I0(),n=WM();Iv=i;function i(o,a){var u=new t,l={},f=new n,d;function h(v){var m=v.v===d?v.w:v.v,x=f.priority(m);if(x!==void 0){var w=a(v);w<x&&(l[m]=d,f.decrease(m,w))}}if(o.nodeCount()===0)return u;e.each(o.nodes(),function(v){f.add(v,Number.POSITIVE_INFINITY),u.setNode(v)}),f.decrease(o.nodes()[0],0);for(var p=!1;f.size()>0;){if(d=f.removeMin(),e.has(l,d))u.setEdge(d,l[d]);else{if(p)throw new Error("Input graph is not connected: "+o);p=!0}o.nodeEdges(d).forEach(h)}return u}return Iv}var Lv,ZC;function jV(){return ZC||(ZC=1,Lv={components:NV(),dijkstra:GM(),dijkstraAll:TV(),findCycles:MV(),floydWarshall:AV(),isAcyclic:IV(),postorder:LV(),preorder:OV(),prim:DV(),tarjan:KM(),topsort:YM()}),Lv}var Ov,JC;function qV(){if(JC)return Ov;JC=1;var e=RV();return Ov={Graph:e.Graph,json:PV(),alg:jV(),version:e.version},Ov}var Dv,ek;function hn(){if(ek)return Dv;ek=1;var e;if(typeof m0=="function")try{e=qV()}catch{}return e||(e=window.graphlib),Dv=e,Dv}var jv,tk;function FV(){if(tk)return jv;tk=1;var e=_M(),t=1,n=4;function i(o){return e(o,t|n)}return jv=i,jv}var qv,nk;function uc(){if(nk)return qv;nk=1;var e=So(),t=nr(),n=Jl(),i=Qt();function o(a,u,l){if(!i(l))return!1;var f=typeof u;return(f=="number"?t(l)&&n(u,l.length):f=="string"&&u in l)?e(l[u],a):!1}return qv=o,qv}var Fv,rk;function zV(){if(rk)return Fv;rk=1;var e=ac(),t=So(),n=uc(),i=vi(),o=Object.prototype,a=o.hasOwnProperty,u=e(function(l,f){l=Object(l);var d=-1,h=f.length,p=h>2?f[2]:void 0;for(p&&n(f[0],f[1],p)&&(h=1);++d<h;)for(var v=f[d],m=i(v),x=-1,w=m.length;++x<w;){var _=m[x],S=l[_];(S===void 0||t(S,o[_])&&!a.call(l,_))&&(l[_]=v[_])}return l});return Fv=u,Fv}var zv,ik;function $V(){if(ik)return zv;ik=1;var e=rr(),t=nr(),n=qr();function i(o){return function(a,u,l){var f=Object(a);if(!t(a)){var d=e(u,3);a=n(a),u=function(p){return d(f[p],p,f)}}var h=o(a,u,l);return h>-1?f[d?a[h]:h]:void 0}}return zv=i,zv}var $v,ok;function BV(){if(ok)return $v;ok=1;var e=/\s/;function t(n){for(var i=n.length;i--&&e.test(n.charAt(i)););return i}return $v=t,$v}var Bv,sk;function VV(){if(sk)return Bv;sk=1;var e=BV(),t=/^\s+/;function n(i){return i&&i.slice(0,e(i)+1).replace(t,"")}return Bv=n,Bv}var Vv,ak;function HV(){if(ak)return Vv;ak=1;var e=VV(),t=Qt(),n=Ro(),i=NaN,o=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,u=/^0o[0-7]+$/i,l=parseInt;function f(d){if(typeof d=="number")return d;if(n(d))return i;if(t(d)){var h=typeof d.valueOf=="function"?d.valueOf():d;d=t(h)?h+"":h}if(typeof d!="string")return d===0?d:+d;d=e(d);var p=a.test(d);return p||u.test(d)?l(d.slice(2),p?2:8):o.test(d)?i:+d}return Vv=f,Vv}var Hv,uk;function QM(){if(uk)return Hv;uk=1;var e=HV(),t=1/0,n=17976931348623157e292;function i(o){if(!o)return o===0?o:0;if(o=e(o),o===t||o===-t){var a=o<0?-1:1;return a*n}return o===o?o:0}return Hv=i,Hv}var Uv,lk;function UV(){if(lk)return Uv;lk=1;var e=QM();function t(n){var i=e(n),o=i%1;return i===i?o?i-o:i:0}return Uv=t,Uv}var Wv,ck;function WV(){if(ck)return Wv;ck=1;var e=VM(),t=rr(),n=UV(),i=Math.max;function o(a,u,l){var f=a==null?0:a.length;if(!f)return-1;var d=l==null?0:n(l);return d<0&&(d=i(f+d,0)),e(a,t(u,3),d)}return Wv=o,Wv}var Gv,fk;function GV(){if(fk)return Gv;fk=1;var e=$V(),t=WV(),n=e(t);return Gv=n,Gv}var Kv,dk;function ZM(){if(dk)return Kv;dk=1;var e=A0();function t(n){var i=n==null?0:n.length;return i?e(n,1):[]}return Kv=t,Kv}var Yv,hk;function KV(){if(hk)return Yv;hk=1;var e=P0(),t=bM(),n=vi();function i(o,a){return o==null?o:e(o,t(a),n)}return Yv=i,Yv}var Xv,pk;function YV(){if(pk)return Xv;pk=1;function e(t){var n=t==null?0:t.length;return n?t[n-1]:void 0}return Xv=e,Xv}var Qv,gk;function XV(){if(gk)return Qv;gk=1;var e=Ql(),t=N0(),n=rr();function i(o,a){var u={};return a=n(a,3),t(o,function(l,f,d){e(u,f,a(l,f,d))}),u}return Qv=i,Qv}var Zv,vk;function L0(){if(vk)return Zv;vk=1;var e=Ro();function t(n,i,o){for(var a=-1,u=n.length;++a<u;){var l=n[a],f=i(l);if(f!=null&&(d===void 0?f===f&&!e(f):o(f,d)))var d=f,h=l}return h}return Zv=t,Zv}var Jv,mk;function QV(){if(mk)return Jv;mk=1;function e(t,n){return t>n}return Jv=e,Jv}var em,yk;function ZV(){if(yk)return em;yk=1;var e=L0(),t=QV(),n=mi();function i(o){return o&&o.length?e(o,n,t):void 0}return em=i,em}var tm,wk;function JM(){if(wk)return tm;wk=1;var e=Ql(),t=So();function n(i,o,a){(a!==void 0&&!t(i[o],a)||a===void 0&&!(o in i))&&e(i,o,a)}return tm=n,tm}var nm,xk;function JV(){if(xk)return nm;xk=1;var e=pi(),t=nc(),n=Mn(),i="[object Object]",o=Function.prototype,a=Object.prototype,u=o.toString,l=a.hasOwnProperty,f=u.call(Object);function d(h){if(!n(h)||e(h)!=i)return!1;var p=t(h);if(p===null)return!0;var v=l.call(p,"constructor")&&p.constructor;return typeof v=="function"&&v instanceof v&&u.call(v)==f}return nm=d,nm}var rm,_k;function e2(){if(_k)return rm;_k=1;function e(t,n){if(!(n==="constructor"&&typeof t[n]=="function")&&n!="__proto__")return t[n]}return rm=e,rm}var im,bk;function eH(){if(bk)return im;bk=1;var e=ia(),t=vi();function n(i){return e(i,t(i))}return im=n,im}var om,Sk;function tH(){if(Sk)return om;Sk=1;var e=JM(),t=lM(),n=yM(),i=cM(),o=xM(),a=oa(),u=tt(),l=HM(),f=Co(),d=ra(),h=Qt(),p=JV(),v=sa(),m=e2(),x=eH();function w(_,S,k,E,C,R,A){var T=m(_,k),L=m(S,k),O=A.get(L);if(O){e(_,k,O);return}var q=R?R(T,L,k+"",_,S,A):void 0,F=q===void 0;if(F){var $=u(L),W=!$&&f(L),I=!$&&!W&&v(L);q=L,$||W||I?u(T)?q=T:l(T)?q=i(T):W?(F=!1,q=t(L,!0)):I?(F=!1,q=n(L,!0)):q=[]:p(L)||a(L)?(q=T,a(T)?q=x(T):(!h(T)||d(T))&&(q=o(L))):F=!1}F&&(A.set(L,q),C(q,L,E,R,A),A.delete(L)),e(_,k,q)}return om=w,om}var sm,Ek;function nH(){if(Ek)return sm;Ek=1;var e=Xl(),t=JM(),n=P0(),i=tH(),o=Qt(),a=vi(),u=e2();function l(f,d,h,p,v){f!==d&&n(d,function(m,x){if(v||(v=new e),o(m))i(f,d,x,h,l,p,v);else{var w=p?p(u(f,x),m,x+"",f,d,v):void 0;w===void 0&&(w=m),t(f,x,w)}},a)}return sm=l,sm}var am,Ck;function rH(){if(Ck)return am;Ck=1;var e=ac(),t=uc();function n(i){return e(function(o,a){var u=-1,l=a.length,f=l>1?a[l-1]:void 0,d=l>2?a[2]:void 0;for(f=i.length>3&&typeof f=="function"?(l--,f):void 0,d&&t(a[0],a[1],d)&&(f=l<3?void 0:f,l=1),o=Object(o);++u<l;){var h=a[u];h&&i(o,h,u,f)}return o})}return am=n,am}var um,kk;function iH(){if(kk)return um;kk=1;var e=nH(),t=rH(),n=t(function(i,o,a){e(i,o,a)});return um=n,um}var lm,Rk;function t2(){if(Rk)return lm;Rk=1;function e(t,n){return t<n}return lm=e,lm}var cm,Pk;function oH(){if(Pk)return cm;Pk=1;var e=L0(),t=t2(),n=mi();function i(o){return o&&o.length?e(o,n,t):void 0}return cm=i,cm}var fm,Nk;function sH(){if(Nk)return fm;Nk=1;var e=L0(),t=rr(),n=t2();function i(o,a){return o&&o.length?e(o,t(a,2),n):void 0}return fm=i,fm}var dm,Tk;function aH(){if(Tk)return dm;Tk=1;var e=mn(),t=function(){return e.Date.now()};return dm=t,dm}var hm,Mk;function uH(){if(Mk)return hm;Mk=1;var e=Zl(),t=oc(),n=Jl(),i=Qt(),o=aa();function a(u,l,f,d){if(!i(u))return u;l=t(l,u);for(var h=-1,p=l.length,v=p-1,m=u;m!=null&&++h<p;){var x=o(l[h]),w=f;if(x==="__proto__"||x==="constructor"||x==="prototype")return u;if(h!=v){var _=m[x];w=d?d(_,x,m):void 0,w===void 0&&(w=i(_)?_:n(l[h+1])?[]:{})}e(m,x,w),m=m[x]}return u}return hm=a,hm}var pm,Ak;function lH(){if(Ak)return pm;Ak=1;var e=sc(),t=uH(),n=oc();function i(o,a,u){for(var l=-1,f=a.length,d={};++l<f;){var h=a[l],p=e(o,h);u(p,h)&&t(d,n(h,o),p)}return d}return pm=i,pm}var gm,Ik;function cH(){if(Ik)return gm;Ik=1;var e=lH(),t=IM();function n(i,o){return e(i,o,function(a,u){return t(i,u)})}return gm=n,gm}var vm,Lk;function fH(){if(Lk)return vm;Lk=1;var e=ZM(),t=$M(),n=BM();function i(o){return n(t(o,void 0,e),o+"")}return vm=i,vm}var mm,Ok;function dH(){if(Ok)return mm;Ok=1;var e=cH(),t=fH(),n=t(function(i,o){return i==null?{}:e(i,o)});return mm=n,mm}var ym,Dk;function hH(){if(Dk)return ym;Dk=1;var e=Math.ceil,t=Math.max;function n(i,o,a,u){for(var l=-1,f=t(e((o-i)/(a||1)),0),d=Array(f);f--;)d[u?f:++l]=i,i+=a;return d}return ym=n,ym}var wm,jk;function pH(){if(jk)return wm;jk=1;var e=hH(),t=uc(),n=QM();function i(o){return function(a,u,l){return l&&typeof l!="number"&&t(a,u,l)&&(u=l=void 0),a=n(a),u===void 0?(u=a,a=0):u=n(u),l=l===void 0?a<u?1:-1:n(l),e(a,u,l,o)}}return wm=i,wm}var xm,qk;function gH(){if(qk)return xm;qk=1;var e=pH(),t=e();return xm=t,xm}var _m,Fk;function vH(){if(Fk)return _m;Fk=1;function e(t,n){var i=t.length;for(t.sort(n);i--;)t[i]=t[i].value;return t}return _m=e,_m}var bm,zk;function mH(){if(zk)return bm;zk=1;var e=Ro();function t(n,i){if(n!==i){var o=n!==void 0,a=n===null,u=n===n,l=e(n),f=i!==void 0,d=i===null,h=i===i,p=e(i);if(!d&&!p&&!l&&n>i||l&&f&&h&&!d&&!p||a&&f&&h||!o&&h||!u)return 1;if(!a&&!l&&!p&&n<i||p&&o&&u&&!a&&!l||d&&o&&u||!f&&u||!h)return-1}return 0}return bm=t,bm}var Sm,$k;function yH(){if($k)return Sm;$k=1;var e=mH();function t(n,i,o){for(var a=-1,u=n.criteria,l=i.criteria,f=u.length,d=o.length;++a<f;){var h=e(u[a],l[a]);if(h){if(a>=d)return h;var p=o[a];return h*(p=="desc"?-1:1)}}return n.index-i.index}return Sm=t,Sm}var Em,Bk;function wH(){if(Bk)return Em;Bk=1;var e=ic(),t=sc(),n=rr(),i=qM(),o=vH(),a=ec(),u=yH(),l=mi(),f=tt();function d(h,p,v){p.length?p=e(p,function(w){return f(w)?function(_){return t(_,w.length===1?w[0]:w)}:w}):p=[l];var m=-1;p=e(p,a(n));var x=i(h,function(w,_,S){var k=e(p,function(E){return E(w)});return{criteria:k,index:++m,value:w}});return o(x,function(w,_){return u(w,_,v)})}return Em=d,Em}var Cm,Vk;function xH(){if(Vk)return Cm;Vk=1;var e=A0(),t=wH(),n=ac(),i=uc(),o=n(function(a,u){if(a==null)return[];var l=u.length;return l>1&&i(a,u[0],u[1])?u=[]:l>2&&i(u[0],u[1],u[2])&&(u=[u[0]]),t(a,e(u,1),[])});return Cm=o,Cm}var km,Hk;function _H(){if(Hk)return km;Hk=1;var e=MM(),t=0;function n(i){var o=++t;return e(i)+o}return km=n,km}var Rm,Uk;function bH(){if(Uk)return Rm;Uk=1;function e(t,n,i){for(var o=-1,a=t.length,u=n.length,l={};++o<a;){var f=o<u?n[o]:void 0;i(l,t[o],f)}return l}return Rm=e,Rm}var Pm,Wk;function SH(){if(Wk)return Pm;Wk=1;var e=Zl(),t=bH();function n(i,o){return t(i||[],o||[],e)}return Pm=n,Pm}var Nm,Gk;function He(){if(Gk)return Nm;Gk=1;var e;if(typeof m0=="function")try{e={cloneDeep:FV(),constant:R0(),defaults:zV(),each:EM(),filter:OM(),find:GV(),flatten:ZM(),forEach:SM(),forIn:KV(),has:DM(),isUndefined:jM(),last:YV(),map:FM(),mapValues:XV(),max:ZV(),merge:iH(),min:oH(),minBy:sH(),now:aH(),pick:dH(),range:gH(),reduce:zM(),sortBy:xH(),uniqueId:_H(),values:UM(),zipObject:SH()}}catch{}return e||(e=window._),Nm=e,Nm}var Tm,Kk;function EH(){if(Kk)return Tm;Kk=1,Tm=e;function e(){var i={};i._next=i._prev=i,this._sentinel=i}e.prototype.dequeue=function(){var i=this._sentinel,o=i._prev;if(o!==i)return t(o),o},e.prototype.enqueue=function(i){var o=this._sentinel;i._prev&&i._next&&t(i),i._next=o._next,o._next._prev=i,o._next=i,i._prev=o},e.prototype.toString=function(){for(var i=[],o=this._sentinel,a=o._prev;a!==o;)i.push(JSON.stringify(a,n)),a=a._prev;return"["+i.join(", ")+"]"};function t(i){i._prev._next=i._next,i._next._prev=i._prev,delete i._next,delete i._prev}function n(i,o){if(i!=="_next"&&i!=="_prev")return o}return Tm}var Mm,Yk;function CH(){if(Yk)return Mm;Yk=1;var e=He(),t=hn().Graph,n=EH();Mm=o;var i=e.constant(1);function o(d,h){if(d.nodeCount()<=1)return[];var p=l(d,h||i),v=a(p.graph,p.buckets,p.zeroIdx);return e.flatten(e.map(v,function(m){return d.outEdges(m.v,m.w)}),!0)}function a(d,h,p){for(var v=[],m=h[h.length-1],x=h[0],w;d.nodeCount();){for(;w=x.dequeue();)u(d,h,p,w);for(;w=m.dequeue();)u(d,h,p,w);if(d.nodeCount()){for(var _=h.length-2;_>0;--_)if(w=h[_].dequeue(),w){v=v.concat(u(d,h,p,w,!0));break}}}return v}function u(d,h,p,v,m){var x=m?[]:void 0;return e.forEach(d.inEdges(v.v),function(w){var _=d.edge(w),S=d.node(w.v);m&&x.push({v:w.v,w:w.w}),S.out-=_,f(h,p,S)}),e.forEach(d.outEdges(v.v),function(w){var _=d.edge(w),S=w.w,k=d.node(S);k.in-=_,f(h,p,k)}),d.removeNode(v.v),x}function l(d,h){var p=new t,v=0,m=0;e.forEach(d.nodes(),function(_){p.setNode(_,{v:_,in:0,out:0})}),e.forEach(d.edges(),function(_){var S=p.edge(_.v,_.w)||0,k=h(_),E=S+k;p.setEdge(_.v,_.w,E),m=Math.max(m,p.node(_.v).out+=k),v=Math.max(v,p.node(_.w).in+=k)});var x=e.range(m+v+3).map(function(){return new n}),w=v+1;return e.forEach(p.nodes(),function(_){f(x,w,p.node(_))}),{graph:p,buckets:x,zeroIdx:w}}function f(d,h,p){p.out?p.in?d[p.out-p.in+h].enqueue(p):d[d.length-1].enqueue(p):d[0].enqueue(p)}return Mm}var Am,Xk;function kH(){if(Xk)return Am;Xk=1;var e=He(),t=CH();Am={run:n,undo:o};function n(a){var u=a.graph().acyclicer==="greedy"?t(a,l(a)):i(a);e.forEach(u,function(f){var d=a.edge(f);a.removeEdge(f),d.forwardName=f.name,d.reversed=!0,a.setEdge(f.w,f.v,d,e.uniqueId("rev"))});function l(f){return function(d){return f.edge(d).weight}}}function i(a){var u=[],l={},f={};function d(h){e.has(f,h)||(f[h]=!0,l[h]=!0,e.forEach(a.outEdges(h),function(p){e.has(l,p.w)?u.push(p):d(p.w)}),delete l[h])}return e.forEach(a.nodes(),d),u}function o(a){e.forEach(a.edges(),function(u){var l=a.edge(u);if(l.reversed){a.removeEdge(u);var f=l.forwardName;delete l.reversed,delete l.forwardName,a.setEdge(u.w,u.v,l,f)}})}return Am}var Im,Qk;function Rt(){if(Qk)return Im;Qk=1;var e=He(),t=hn().Graph;Im={addDummyNode:n,simplify:i,asNonCompoundGraph:o,successorWeights:a,predecessorWeights:u,intersectRect:l,buildLayerMatrix:f,normalizeRanks:d,removeEmptyRanks:h,addBorderNode:p,maxRank:v,partition:m,time:x,notime:w};function n(_,S,k,E){var C;do C=e.uniqueId(E);while(_.hasNode(C));return k.dummy=S,_.setNode(C,k),C}function i(_){var S=new t().setGraph(_.graph());return e.forEach(_.nodes(),function(k){S.setNode(k,_.node(k))}),e.forEach(_.edges(),function(k){var E=S.edge(k.v,k.w)||{weight:0,minlen:1},C=_.edge(k);S.setEdge(k.v,k.w,{weight:E.weight+C.weight,minlen:Math.max(E.minlen,C.minlen)})}),S}function o(_){var S=new t({multigraph:_.isMultigraph()}).setGraph(_.graph());return e.forEach(_.nodes(),function(k){_.children(k).length||S.setNode(k,_.node(k))}),e.forEach(_.edges(),function(k){S.setEdge(k,_.edge(k))}),S}function a(_){var S=e.map(_.nodes(),function(k){var E={};return e.forEach(_.outEdges(k),function(C){E[C.w]=(E[C.w]||0)+_.edge(C).weight}),E});return e.zipObject(_.nodes(),S)}function u(_){var S=e.map(_.nodes(),function(k){var E={};return e.forEach(_.inEdges(k),function(C){E[C.v]=(E[C.v]||0)+_.edge(C).weight}),E});return e.zipObject(_.nodes(),S)}function l(_,S){var k=_.x,E=_.y,C=S.x-k,R=S.y-E,A=_.width/2,T=_.height/2;if(!C&&!R)throw new Error("Not possible to find intersection inside of the rectangle");var L,O;return Math.abs(R)*A>Math.abs(C)*T?(R<0&&(T=-T),L=T*C/R,O=T):(C<0&&(A=-A),L=A,O=A*R/C),{x:k+L,y:E+O}}function f(_){var S=e.map(e.range(v(_)+1),function(){return[]});return e.forEach(_.nodes(),function(k){var E=_.node(k),C=E.rank;e.isUndefined(C)||(S[C][E.order]=k)}),S}function d(_){var S=e.min(e.map(_.nodes(),function(k){return _.node(k).rank}));e.forEach(_.nodes(),function(k){var E=_.node(k);e.has(E,"rank")&&(E.rank-=S)})}function h(_){var S=e.min(e.map(_.nodes(),function(R){return _.node(R).rank})),k=[];e.forEach(_.nodes(),function(R){var A=_.node(R).rank-S;k[A]||(k[A]=[]),k[A].push(R)});var E=0,C=_.graph().nodeRankFactor;e.forEach(k,function(R,A){e.isUndefined(R)&&A%C!==0?--E:E&&e.forEach(R,function(T){_.node(T).rank+=E})})}function p(_,S,k,E){var C={width:0,height:0};return arguments.length>=4&&(C.rank=k,C.order=E),n(_,"border",C,S)}function v(_){return e.max(e.map(_.nodes(),function(S){var k=_.node(S).rank;if(!e.isUndefined(k))return k}))}function m(_,S){var k={lhs:[],rhs:[]};return e.forEach(_,function(E){S(E)?k.lhs.push(E):k.rhs.push(E)}),k}function x(_,S){var k=e.now();try{return S()}finally{console.log(_+" time: "+(e.now()-k)+"ms")}}function w(_,S){return S()}return Im}var Lm,Zk;function RH(){if(Zk)return Lm;Zk=1;var e=He(),t=Rt();Lm={run:n,undo:o};function n(a){a.graph().dummyChains=[],e.forEach(a.edges(),function(u){i(a,u)})}function i(a,u){var l=u.v,f=a.node(l).rank,d=u.w,h=a.node(d).rank,p=u.name,v=a.edge(u),m=v.labelRank;if(h!==f+1){a.removeEdge(u);var x,w,_;for(_=0,++f;f<h;++_,++f)v.points=[],w={width:0,height:0,edgeLabel:v,edgeObj:u,rank:f},x=t.addDummyNode(a,"edge",w,"_d"),f===m&&(w.width=v.width,w.height=v.height,w.dummy="edge-label",w.labelpos=v.labelpos),a.setEdge(l,x,{weight:v.weight},p),_===0&&a.graph().dummyChains.push(x),l=x;a.setEdge(l,d,{weight:v.weight},p)}}function o(a){e.forEach(a.graph().dummyChains,function(u){var l=a.node(u),f=l.edgeLabel,d;for(a.setEdge(l.edgeObj,f);l.dummy;)d=a.successors(u)[0],a.removeNode(u),f.points.push({x:l.x,y:l.y}),l.dummy==="edge-label"&&(f.x=l.x,f.y=l.y,f.width=l.width,f.height=l.height),u=d,l=a.node(u)})}return Lm}var Om,Jk;function wl(){if(Jk)return Om;Jk=1;var e=He();Om={longestPath:t,slack:n};function t(i){var o={};function a(u){var l=i.node(u);if(e.has(o,u))return l.rank;o[u]=!0;var f=e.min(e.map(i.outEdges(u),function(d){return a(d.w)-i.edge(d).minlen}));return(f===Number.POSITIVE_INFINITY||f===void 0||f===null)&&(f=0),l.rank=f}e.forEach(i.sources(),a)}function n(i,o){return i.node(o.w).rank-i.node(o.v).rank-i.edge(o).minlen}return Om}var Dm,eR;function n2(){if(eR)return Dm;eR=1;var e=He(),t=hn().Graph,n=wl().slack;Dm=i;function i(l){var f=new t({directed:!1}),d=l.nodes()[0],h=l.nodeCount();f.setNode(d,{});for(var p,v;o(f,l)<h;)p=a(f,l),v=f.hasNode(p.v)?n(l,p):-n(l,p),u(f,l,v);return f}function o(l,f){function d(h){e.forEach(f.nodeEdges(h),function(p){var v=p.v,m=h===v?p.w:v;!l.hasNode(m)&&!n(f,p)&&(l.setNode(m,{}),l.setEdge(h,m,{}),d(m))})}return e.forEach(l.nodes(),d),l.nodeCount()}function a(l,f){return e.minBy(f.edges(),function(d){if(l.hasNode(d.v)!==l.hasNode(d.w))return n(f,d)})}function u(l,f,d){e.forEach(l.nodes(),function(h){f.node(h).rank+=d})}return Dm}var jm,tR;function PH(){if(tR)return jm;tR=1;var e=He(),t=n2(),n=wl().slack,i=wl().longestPath,o=hn().alg.preorder,a=hn().alg.postorder,u=Rt().simplify;jm=l,l.initLowLimValues=p,l.initCutValues=f,l.calcCutValue=h,l.leaveEdge=m,l.enterEdge=x,l.exchangeEdges=w;function l(E){E=u(E),i(E);var C=t(E);p(C),f(C,E);for(var R,A;R=m(C);)A=x(C,E,R),w(C,E,R,A)}function f(E,C){var R=a(E,E.nodes());R=R.slice(0,R.length-1),e.forEach(R,function(A){d(E,C,A)})}function d(E,C,R){var A=E.node(R),T=A.parent;E.edge(R,T).cutvalue=h(E,C,R)}function h(E,C,R){var A=E.node(R),T=A.parent,L=!0,O=C.edge(R,T),q=0;return O||(L=!1,O=C.edge(T,R)),q=O.weight,e.forEach(C.nodeEdges(R),function(F){var $=F.v===R,W=$?F.w:F.v;if(W!==T){var I=$===L,H=C.edge(F).weight;if(q+=I?H:-H,S(E,R,W)){var z=E.edge(R,W).cutvalue;q+=I?-z:z}}}),q}function p(E,C){arguments.length<2&&(C=E.nodes()[0]),v(E,{},1,C)}function v(E,C,R,A,T){var L=R,O=E.node(A);return C[A]=!0,e.forEach(E.neighbors(A),function(q){e.has(C,q)||(R=v(E,C,R,q,A))}),O.low=L,O.lim=R++,T?O.parent=T:delete O.parent,R}function m(E){return e.find(E.edges(),function(C){return E.edge(C).cutvalue<0})}function x(E,C,R){var A=R.v,T=R.w;C.hasEdge(A,T)||(A=R.w,T=R.v);var L=E.node(A),O=E.node(T),q=L,F=!1;L.lim>O.lim&&(q=O,F=!0);var $=e.filter(C.edges(),function(W){return F===k(E,E.node(W.v),q)&&F!==k(E,E.node(W.w),q)});return e.minBy($,function(W){return n(C,W)})}function w(E,C,R,A){var T=R.v,L=R.w;E.removeEdge(T,L),E.setEdge(A.v,A.w,{}),p(E),f(E,C),_(E,C)}function _(E,C){var R=e.find(E.nodes(),function(T){return!C.node(T).parent}),A=o(E,R);A=A.slice(1),e.forEach(A,function(T){var L=E.node(T).parent,O=C.edge(T,L),q=!1;O||(O=C.edge(L,T),q=!0),C.node(T).rank=C.node(L).rank+(q?O.minlen:-O.minlen)})}function S(E,C,R){return E.hasEdge(C,R)}function k(E,C,R){return R.low<=C.lim&&C.lim<=R.lim}return jm}var qm,nR;function NH(){if(nR)return qm;nR=1;var e=wl(),t=e.longestPath,n=n2(),i=PH();qm=o;function o(f){switch(f.graph().ranker){case"network-simplex":l(f);break;case"tight-tree":u(f);break;case"longest-path":a(f);break;default:l(f)}}var a=t;function u(f){t(f),n(f)}function l(f){i(f)}return qm}var Fm,rR;function TH(){if(rR)return Fm;rR=1;var e=He();Fm=t;function t(o){var a=i(o);e.forEach(o.graph().dummyChains,function(u){for(var l=o.node(u),f=l.edgeObj,d=n(o,a,f.v,f.w),h=d.path,p=d.lca,v=0,m=h[v],x=!0;u!==f.w;){if(l=o.node(u),x){for(;(m=h[v])!==p&&o.node(m).maxRank<l.rank;)v++;m===p&&(x=!1)}if(!x){for(;v<h.length-1&&o.node(m=h[v+1]).minRank<=l.rank;)v++;m=h[v]}o.setParent(u,m),u=o.successors(u)[0]}})}function n(o,a,u,l){var f=[],d=[],h=Math.min(a[u].low,a[l].low),p=Math.max(a[u].lim,a[l].lim),v,m;v=u;do v=o.parent(v),f.push(v);while(v&&(a[v].low>h||p>a[v].lim));for(m=v,v=l;(v=o.parent(v))!==m;)d.push(v);return{path:f.concat(d.reverse()),lca:m}}function i(o){var a={},u=0;function l(f){var d=u;e.forEach(o.children(f),l),a[f]={low:d,lim:u++}}return e.forEach(o.children(),l),a}return Fm}var zm,iR;function MH(){if(iR)return zm;iR=1;var e=He(),t=Rt();zm={run:n,cleanup:u};function n(l){var f=t.addDummyNode(l,"root",{},"_root"),d=o(l),h=e.max(e.values(d))-1,p=2*h+1;l.graph().nestingRoot=f,e.forEach(l.edges(),function(m){l.edge(m).minlen*=p});var v=a(l)+1;e.forEach(l.children(),function(m){i(l,f,p,v,h,d,m)}),l.graph().nodeRankFactor=p}function i(l,f,d,h,p,v,m){var x=l.children(m);if(!x.length){m!==f&&l.setEdge(f,m,{weight:0,minlen:d});return}var w=t.addBorderNode(l,"_bt"),_=t.addBorderNode(l,"_bb"),S=l.node(m);l.setParent(w,m),S.borderTop=w,l.setParent(_,m),S.borderBottom=_,e.forEach(x,function(k){i(l,f,d,h,p,v,k);var E=l.node(k),C=E.borderTop?E.borderTop:k,R=E.borderBottom?E.borderBottom:k,A=E.borderTop?h:2*h,T=C!==R?1:p-v[m]+1;l.setEdge(w,C,{weight:A,minlen:T,nestingEdge:!0}),l.setEdge(R,_,{weight:A,minlen:T,nestingEdge:!0})}),l.parent(m)||l.setEdge(f,w,{weight:0,minlen:p+v[m]})}function o(l){var f={};function d(h,p){var v=l.children(h);v&&v.length&&e.forEach(v,function(m){d(m,p+1)}),f[h]=p}return e.forEach(l.children(),function(h){d(h,1)}),f}function a(l){return e.reduce(l.edges(),function(f,d){return f+l.edge(d).weight},0)}function u(l){var f=l.graph();l.removeNode(f.nestingRoot),delete f.nestingRoot,e.forEach(l.edges(),function(d){var h=l.edge(d);h.nestingEdge&&l.removeEdge(d)})}return zm}var $m,oR;function AH(){if(oR)return $m;oR=1;var e=He(),t=Rt();$m=n;function n(o){function a(u){var l=o.children(u),f=o.node(u);if(l.length&&e.forEach(l,a),e.has(f,"minRank")){f.borderLeft=[],f.borderRight=[];for(var d=f.minRank,h=f.maxRank+1;d<h;++d)i(o,"borderLeft","_bl",u,f,d),i(o,"borderRight","_br",u,f,d)}}e.forEach(o.children(),a)}function i(o,a,u,l,f,d){var h={width:0,height:0,rank:d,borderType:a},p=f[a][d-1],v=t.addDummyNode(o,"border",h,u);f[a][d]=v,o.setParent(v,l),p&&o.setEdge(p,v,{weight:1})}return $m}var Bm,sR;function IH(){if(sR)return Bm;sR=1;var e=He();Bm={adjust:t,undo:n};function t(d){var h=d.graph().rankdir.toLowerCase();(h==="lr"||h==="rl")&&i(d)}function n(d){var h=d.graph().rankdir.toLowerCase();(h==="bt"||h==="rl")&&a(d),(h==="lr"||h==="rl")&&(l(d),i(d))}function i(d){e.forEach(d.nodes(),function(h){o(d.node(h))}),e.forEach(d.edges(),function(h){o(d.edge(h))})}function o(d){var h=d.width;d.width=d.height,d.height=h}function a(d){e.forEach(d.nodes(),function(h){u(d.node(h))}),e.forEach(d.edges(),function(h){var p=d.edge(h);e.forEach(p.points,u),e.has(p,"y")&&u(p)})}function u(d){d.y=-d.y}function l(d){e.forEach(d.nodes(),function(h){f(d.node(h))}),e.forEach(d.edges(),function(h){var p=d.edge(h);e.forEach(p.points,f),e.has(p,"x")&&f(p)})}function f(d){var h=d.x;d.x=d.y,d.y=h}return Bm}var Vm,aR;function LH(){if(aR)return Vm;aR=1;var e=He();Vm=t;function t(n){var i={},o=e.filter(n.nodes(),function(d){return!n.children(d).length}),a=e.max(e.map(o,function(d){return n.node(d).rank})),u=e.map(e.range(a+1),function(){return[]});function l(d){if(!e.has(i,d)){i[d]=!0;var h=n.node(d);u[h.rank].push(d),e.forEach(n.successors(d),l)}}var f=e.sortBy(o,function(d){return n.node(d).rank});return e.forEach(f,l),u}return Vm}var Hm,uR;function OH(){if(uR)return Hm;uR=1;var e=He();Hm=t;function t(i,o){for(var a=0,u=1;u<o.length;++u)a+=n(i,o[u-1],o[u]);return a}function n(i,o,a){for(var u=e.zipObject(a,e.map(a,function(v,m){return m})),l=e.flatten(e.map(o,function(v){return e.sortBy(e.map(i.outEdges(v),function(m){return{pos:u[m.w],weight:i.edge(m).weight}}),"pos")}),!0),f=1;f<a.length;)f<<=1;var d=2*f-1;f-=1;var h=e.map(new Array(d),function(){return 0}),p=0;return e.forEach(l.forEach(function(v){var m=v.pos+f;h[m]+=v.weight;for(var x=0;m>0;)m%2&&(x+=h[m+1]),m=m-1>>1,h[m]+=v.weight;p+=v.weight*x})),p}return Hm}var Um,lR;function DH(){if(lR)return Um;lR=1;var e=He();Um=t;function t(n,i){return e.map(i,function(o){var a=n.inEdges(o);if(a.length){var u=e.reduce(a,function(l,f){var d=n.edge(f),h=n.node(f.v);return{sum:l.sum+d.weight*h.order,weight:l.weight+d.weight}},{sum:0,weight:0});return{v:o,barycenter:u.sum/u.weight,weight:u.weight}}else return{v:o}})}return Um}var Wm,cR;function jH(){if(cR)return Wm;cR=1;var e=He();Wm=t;function t(o,a){var u={};e.forEach(o,function(f,d){var h=u[f.v]={indegree:0,in:[],out:[],vs:[f.v],i:d};e.isUndefined(f.barycenter)||(h.barycenter=f.barycenter,h.weight=f.weight)}),e.forEach(a.edges(),function(f){var d=u[f.v],h=u[f.w];!e.isUndefined(d)&&!e.isUndefined(h)&&(h.indegree++,d.out.push(u[f.w]))});var l=e.filter(u,function(f){return!f.indegree});return n(l)}function n(o){var a=[];function u(d){return function(h){h.merged||(e.isUndefined(h.barycenter)||e.isUndefined(d.barycenter)||h.barycenter>=d.barycenter)&&i(d,h)}}function l(d){return function(h){h.in.push(d),--h.indegree===0&&o.push(h)}}for(;o.length;){var f=o.pop();a.push(f),e.forEach(f.in.reverse(),u(f)),e.forEach(f.out,l(f))}return e.map(e.filter(a,function(d){return!d.merged}),function(d){return e.pick(d,["vs","i","barycenter","weight"])})}function i(o,a){var u=0,l=0;o.weight&&(u+=o.barycenter*o.weight,l+=o.weight),a.weight&&(u+=a.barycenter*a.weight,l+=a.weight),o.vs=a.vs.concat(o.vs),o.barycenter=u/l,o.weight=l,o.i=Math.min(a.i,o.i),a.merged=!0}return Wm}var Gm,fR;function qH(){if(fR)return Gm;fR=1;var e=He(),t=Rt();Gm=n;function n(a,u){var l=t.partition(a,function(w){return e.has(w,"barycenter")}),f=l.lhs,d=e.sortBy(l.rhs,function(w){return-w.i}),h=[],p=0,v=0,m=0;f.sort(o(!!u)),m=i(h,d,m),e.forEach(f,function(w){m+=w.vs.length,h.push(w.vs),p+=w.barycenter*w.weight,v+=w.weight,m=i(h,d,m)});var x={vs:e.flatten(h,!0)};return v&&(x.barycenter=p/v,x.weight=v),x}function i(a,u,l){for(var f;u.length&&(f=e.last(u)).i<=l;)u.pop(),a.push(f.vs),l++;return l}function o(a){return function(u,l){return u.barycenter<l.barycenter?-1:u.barycenter>l.barycenter?1:a?l.i-u.i:u.i-l.i}}return Gm}var Km,dR;function FH(){if(dR)return Km;dR=1;var e=He(),t=DH(),n=jH(),i=qH();Km=o;function o(l,f,d,h){var p=l.children(f),v=l.node(f),m=v?v.borderLeft:void 0,x=v?v.borderRight:void 0,w={};m&&(p=e.filter(p,function(R){return R!==m&&R!==x}));var _=t(l,p);e.forEach(_,function(R){if(l.children(R.v).length){var A=o(l,R.v,d,h);w[R.v]=A,e.has(A,"barycenter")&&u(R,A)}});var S=n(_,d);a(S,w);var k=i(S,h);if(m&&(k.vs=e.flatten([m,k.vs,x],!0),l.predecessors(m).length)){var E=l.node(l.predecessors(m)[0]),C=l.node(l.predecessors(x)[0]);e.has(k,"barycenter")||(k.barycenter=0,k.weight=0),k.barycenter=(k.barycenter*k.weight+E.order+C.order)/(k.weight+2),k.weight+=2}return k}function a(l,f){e.forEach(l,function(d){d.vs=e.flatten(d.vs.map(function(h){return f[h]?f[h].vs:h}),!0)})}function u(l,f){e.isUndefined(l.barycenter)?(l.barycenter=f.barycenter,l.weight=f.weight):(l.barycenter=(l.barycenter*l.weight+f.barycenter*f.weight)/(l.weight+f.weight),l.weight+=f.weight)}return Km}var Ym,hR;function zH(){if(hR)return Ym;hR=1;var e=He(),t=hn().Graph;Ym=n;function n(o,a,u){var l=i(o),f=new t({compound:!0}).setGraph({root:l}).setDefaultNodeLabel(function(d){return o.node(d)});return e.forEach(o.nodes(),function(d){var h=o.node(d),p=o.parent(d);(h.rank===a||h.minRank<=a&&a<=h.maxRank)&&(f.setNode(d),f.setParent(d,p||l),e.forEach(o[u](d),function(v){var m=v.v===d?v.w:v.v,x=f.edge(m,d),w=e.isUndefined(x)?0:x.weight;f.setEdge(m,d,{weight:o.edge(v).weight+w})}),e.has(h,"minRank")&&f.setNode(d,{borderLeft:h.borderLeft[a],borderRight:h.borderRight[a]}))}),f}function i(o){for(var a;o.hasNode(a=e.uniqueId("_root")););return a}return Ym}var Xm,pR;function $H(){if(pR)return Xm;pR=1;var e=He();Xm=t;function t(n,i,o){var a={},u;e.forEach(o,function(l){for(var f=n.parent(l),d,h;f;){if(d=n.parent(f),d?(h=a[d],a[d]=f):(h=u,u=f),h&&h!==f){i.setEdge(h,f);return}f=d}})}return Xm}var Qm,gR;function BH(){if(gR)return Qm;gR=1;var e=He(),t=LH(),n=OH(),i=FH(),o=zH(),a=$H(),u=hn().Graph,l=Rt();Qm=f;function f(v){var m=l.maxRank(v),x=d(v,e.range(1,m+1),"inEdges"),w=d(v,e.range(m-1,-1,-1),"outEdges"),_=t(v);p(v,_);for(var S=Number.POSITIVE_INFINITY,k,E=0,C=0;C<4;++E,++C){h(E%2?x:w,E%4>=2),_=l.buildLayerMatrix(v);var R=n(v,_);R<S&&(C=0,k=e.cloneDeep(_),S=R)}p(v,k)}function d(v,m,x){return e.map(m,function(w){return o(v,w,x)})}function h(v,m){var x=new u;e.forEach(v,function(w){var _=w.graph().root,S=i(w,_,x,m);e.forEach(S.vs,function(k,E){w.node(k).order=E}),a(w,x,S.vs)})}function p(v,m){e.forEach(m,function(x){e.forEach(x,function(w,_){v.node(w).order=_})})}return Qm}var Zm,vR;function VH(){if(vR)return Zm;vR=1;var e=He(),t=hn().Graph,n=Rt();Zm={positionX:x,findType1Conflicts:i,findType2Conflicts:o,addConflict:u,hasConflict:l,verticalAlignment:f,horizontalCompaction:d,alignCoordinates:v,findSmallestWidthAlignment:p,balance:m};function i(S,k){var E={};function C(R,A){var T=0,L=0,O=R.length,q=e.last(A);return e.forEach(A,function(F,$){var W=a(S,F),I=W?S.node(W).order:O;(W||F===q)&&(e.forEach(A.slice(L,$+1),function(H){e.forEach(S.predecessors(H),function(z){var Q=S.node(z),D=Q.order;(D<T||I<D)&&!(Q.dummy&&S.node(H).dummy)&&u(E,z,H)})}),L=$+1,T=I)}),A}return e.reduce(k,C),E}function o(S,k){var E={};function C(A,T,L,O,q){var F;e.forEach(e.range(T,L),function($){F=A[$],S.node(F).dummy&&e.forEach(S.predecessors(F),function(W){var I=S.node(W);I.dummy&&(I.order<O||I.order>q)&&u(E,W,F)})})}function R(A,T){var L=-1,O,q=0;return e.forEach(T,function(F,$){if(S.node(F).dummy==="border"){var W=S.predecessors(F);W.length&&(O=S.node(W[0]).order,C(T,q,$,L,O),q=$,L=O)}C(T,q,T.length,O,A.length)}),T}return e.reduce(k,R),E}function a(S,k){if(S.node(k).dummy)return e.find(S.predecessors(k),function(E){return S.node(E).dummy})}function u(S,k,E){if(k>E){var C=k;k=E,E=C}var R=S[k];R||(S[k]=R={}),R[E]=!0}function l(S,k,E){if(k>E){var C=k;k=E,E=C}return e.has(S[k],E)}function f(S,k,E,C){var R={},A={},T={};return e.forEach(k,function(L){e.forEach(L,function(O,q){R[O]=O,A[O]=O,T[O]=q})}),e.forEach(k,function(L){var O=-1;e.forEach(L,function(q){var F=C(q);if(F.length){F=e.sortBy(F,function(z){return T[z]});for(var $=(F.length-1)/2,W=Math.floor($),I=Math.ceil($);W<=I;++W){var H=F[W];A[q]===q&&O<T[H]&&!l(E,q,H)&&(A[H]=q,A[q]=R[q]=R[H],O=T[H])}}})}),{root:R,align:A}}function d(S,k,E,C,R){var A={},T=h(S,k,E,R),L=R?"borderLeft":"borderRight";function O($,W){for(var I=T.nodes(),H=I.pop(),z={};H;)z[H]?$(H):(z[H]=!0,I.push(H),I=I.concat(W(H))),H=I.pop()}function q($){A[$]=T.inEdges($).reduce(function(W,I){return Math.max(W,A[I.v]+T.edge(I))},0)}function F($){var W=T.outEdges($).reduce(function(H,z){return Math.min(H,A[z.w]-T.edge(z))},Number.POSITIVE_INFINITY),I=S.node($);W!==Number.POSITIVE_INFINITY&&I.borderType!==L&&(A[$]=Math.max(A[$],W))}return O(q,T.predecessors.bind(T)),O(F,T.successors.bind(T)),e.forEach(C,function($){A[$]=A[E[$]]}),A}function h(S,k,E,C){var R=new t,A=S.graph(),T=w(A.nodesep,A.edgesep,C);return e.forEach(k,function(L){var O;e.forEach(L,function(q){var F=E[q];if(R.setNode(F),O){var $=E[O],W=R.edge($,F);R.setEdge($,F,Math.max(T(S,q,O),W||0))}O=q})}),R}function p(S,k){return e.minBy(e.values(k),function(E){var C=Number.NEGATIVE_INFINITY,R=Number.POSITIVE_INFINITY;return e.forIn(E,function(A,T){var L=_(S,T)/2;C=Math.max(A+L,C),R=Math.min(A-L,R)}),C-R})}function v(S,k){var E=e.values(k),C=e.min(E),R=e.max(E);e.forEach(["u","d"],function(A){e.forEach(["l","r"],function(T){var L=A+T,O=S[L],q;if(O!==k){var F=e.values(O);q=T==="l"?C-e.min(F):R-e.max(F),q&&(S[L]=e.mapValues(O,function($){return $+q}))}})})}function m(S,k){return e.mapValues(S.ul,function(E,C){if(k)return S[k.toLowerCase()][C];var R=e.sortBy(e.map(S,C));return(R[1]+R[2])/2})}function x(S){var k=n.buildLayerMatrix(S),E=e.merge(i(S,k),o(S,k)),C={},R;e.forEach(["u","d"],function(T){R=T==="u"?k:e.values(k).reverse(),e.forEach(["l","r"],function(L){L==="r"&&(R=e.map(R,function($){return e.values($).reverse()}));var O=(T==="u"?S.predecessors:S.successors).bind(S),q=f(S,R,E,O),F=d(S,R,q.root,q.align,L==="r");L==="r"&&(F=e.mapValues(F,function($){return-$})),C[T+L]=F})});var A=p(S,C);return v(C,A),m(C,S.graph().align)}function w(S,k,E){return function(C,R,A){var T=C.node(R),L=C.node(A),O=0,q;if(O+=T.width/2,e.has(T,"labelpos"))switch(T.labelpos.toLowerCase()){case"l":q=-T.width/2;break;case"r":q=T.width/2;break}if(q&&(O+=E?q:-q),q=0,O+=(T.dummy?k:S)/2,O+=(L.dummy?k:S)/2,O+=L.width/2,e.has(L,"labelpos"))switch(L.labelpos.toLowerCase()){case"l":q=L.width/2;break;case"r":q=-L.width/2;break}return q&&(O+=E?q:-q),q=0,O}}function _(S,k){return S.node(k).width}return Zm}var Jm,mR;function HH(){if(mR)return Jm;mR=1;var e=He(),t=Rt(),n=VH().positionX;Jm=i;function i(a){a=t.asNonCompoundGraph(a),o(a),e.forEach(n(a),function(u,l){a.node(l).x=u})}function o(a){var u=t.buildLayerMatrix(a),l=a.graph().ranksep,f=0;e.forEach(u,function(d){var h=e.max(e.map(d,function(p){return a.node(p).height}));e.forEach(d,function(p){a.node(p).y=f+h/2}),f+=h+l})}return Jm}var ey,yR;function UH(){if(yR)return ey;yR=1;var e=He(),t=kH(),n=RH(),i=NH(),o=Rt().normalizeRanks,a=TH(),u=Rt().removeEmptyRanks,l=MH(),f=AH(),d=IH(),h=BH(),p=HH(),v=Rt(),m=hn().Graph;ey=x;function x(V,G){var Z=G&&G.debugTiming?v.time:v.notime;Z("layout",function(){var ne=Z(" buildLayoutGraph",function(){return O(V)});Z(" runLayout",function(){w(ne,Z)}),Z(" updateInputGraph",function(){_(V,ne)})})}function w(V,G){G(" makeSpaceForEdgeLabels",function(){q(V)}),G(" removeSelfEdges",function(){U(V)}),G(" acyclic",function(){t.run(V)}),G(" nestingGraph.run",function(){l.run(V)}),G(" rank",function(){i(v.asNonCompoundGraph(V))}),G(" injectEdgeLabelProxies",function(){F(V)}),G(" removeEmptyRanks",function(){u(V)}),G(" nestingGraph.cleanup",function(){l.cleanup(V)}),G(" normalizeRanks",function(){o(V)}),G(" assignRankMinMax",function(){$(V)}),G(" removeEdgeLabelProxies",function(){W(V)}),G(" normalize.run",function(){n.run(V)}),G(" parentDummyChains",function(){a(V)}),G(" addBorderSegments",function(){f(V)}),G(" order",function(){h(V)}),G(" insertSelfEdges",function(){K(V)}),G(" adjustCoordinateSystem",function(){d.adjust(V)}),G(" position",function(){p(V)}),G(" positionSelfEdges",function(){j(V)}),G(" removeBorderNodes",function(){D(V)}),G(" normalize.undo",function(){n.undo(V)}),G(" fixupEdgeLabelCoords",function(){z(V)}),G(" undoCoordinateSystem",function(){d.undo(V)}),G(" translateGraph",function(){I(V)}),G(" assignNodeIntersects",function(){H(V)}),G(" reversePoints",function(){Q(V)}),G(" acyclic.undo",function(){t.undo(V)})}function _(V,G){e.forEach(V.nodes(),function(Z){var ne=V.node(Z),re=G.node(Z);ne&&(ne.x=re.x,ne.y=re.y,G.children(Z).length&&(ne.width=re.width,ne.height=re.height))}),e.forEach(V.edges(),function(Z){var ne=V.edge(Z),re=G.edge(Z);ne.points=re.points,e.has(re,"x")&&(ne.x=re.x,ne.y=re.y)}),V.graph().width=G.graph().width,V.graph().height=G.graph().height}var S=["nodesep","edgesep","ranksep","marginx","marginy"],k={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},E=["acyclicer","ranker","rankdir","align"],C=["width","height"],R={width:0,height:0},A=["minlen","weight","width","height","labeloffset"],T={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},L=["labelpos"];function O(V){var G=new m({multigraph:!0,compound:!0}),Z=oe(V.graph());return G.setGraph(e.merge({},k,X(Z,S),e.pick(Z,E))),e.forEach(V.nodes(),function(ne){var re=oe(V.node(ne));G.setNode(ne,e.defaults(X(re,C),R)),G.setParent(ne,V.parent(ne))}),e.forEach(V.edges(),function(ne){var re=oe(V.edge(ne));G.setEdge(ne,e.merge({},T,X(re,A),e.pick(re,L)))}),G}function q(V){var G=V.graph();G.ranksep/=2,e.forEach(V.edges(),function(Z){var ne=V.edge(Z);ne.minlen*=2,ne.labelpos.toLowerCase()!=="c"&&(G.rankdir==="TB"||G.rankdir==="BT"?ne.width+=ne.labeloffset:ne.height+=ne.labeloffset)})}function F(V){e.forEach(V.edges(),function(G){var Z=V.edge(G);if(Z.width&&Z.height){var ne=V.node(G.v),re=V.node(G.w),se={rank:(re.rank-ne.rank)/2+ne.rank,e:G};v.addDummyNode(V,"edge-proxy",se,"_ep")}})}function $(V){var G=0;e.forEach(V.nodes(),function(Z){var ne=V.node(Z);ne.borderTop&&(ne.minRank=V.node(ne.borderTop).rank,ne.maxRank=V.node(ne.borderBottom).rank,G=e.max(G,ne.maxRank))}),V.graph().maxRank=G}function W(V){e.forEach(V.nodes(),function(G){var Z=V.node(G);Z.dummy==="edge-proxy"&&(V.edge(Z.e).labelRank=Z.rank,V.removeNode(G))})}function I(V){var G=Number.POSITIVE_INFINITY,Z=0,ne=Number.POSITIVE_INFINITY,re=0,se=V.graph(),de=se.marginx||0,fe=se.marginy||0;function he(ge){var be=ge.x,we=ge.y,De=ge.width,Ce=ge.height;G=Math.min(G,be-De/2),Z=Math.max(Z,be+De/2),ne=Math.min(ne,we-Ce/2),re=Math.max(re,we+Ce/2)}e.forEach(V.nodes(),function(ge){he(V.node(ge))}),e.forEach(V.edges(),function(ge){var be=V.edge(ge);e.has(be,"x")&&he(be)}),G-=de,ne-=fe,e.forEach(V.nodes(),function(ge){var be=V.node(ge);be.x-=G,be.y-=ne}),e.forEach(V.edges(),function(ge){var be=V.edge(ge);e.forEach(be.points,function(we){we.x-=G,we.y-=ne}),e.has(be,"x")&&(be.x-=G),e.has(be,"y")&&(be.y-=ne)}),se.width=Z-G+de,se.height=re-ne+fe}function H(V){e.forEach(V.edges(),function(G){var Z=V.edge(G),ne=V.node(G.v),re=V.node(G.w),se,de;Z.points?(se=Z.points[0],de=Z.points[Z.points.length-1]):(Z.points=[],se=re,de=ne),Z.points.unshift(v.intersectRect(ne,se)),Z.points.push(v.intersectRect(re,de))})}function z(V){e.forEach(V.edges(),function(G){var Z=V.edge(G);if(e.has(Z,"x"))switch((Z.labelpos==="l"||Z.labelpos==="r")&&(Z.width-=Z.labeloffset),Z.labelpos){case"l":Z.x-=Z.width/2+Z.labeloffset;break;case"r":Z.x+=Z.width/2+Z.labeloffset;break}})}function Q(V){e.forEach(V.edges(),function(G){var Z=V.edge(G);Z.reversed&&Z.points.reverse()})}function D(V){e.forEach(V.nodes(),function(G){if(V.children(G).length){var Z=V.node(G),ne=V.node(Z.borderTop),re=V.node(Z.borderBottom),se=V.node(e.last(Z.borderLeft)),de=V.node(e.last(Z.borderRight));Z.width=Math.abs(de.x-se.x),Z.height=Math.abs(re.y-ne.y),Z.x=se.x+Z.width/2,Z.y=ne.y+Z.height/2}}),e.forEach(V.nodes(),function(G){V.node(G).dummy==="border"&&V.removeNode(G)})}function U(V){e.forEach(V.edges(),function(G){if(G.v===G.w){var Z=V.node(G.v);Z.selfEdges||(Z.selfEdges=[]),Z.selfEdges.push({e:G,label:V.edge(G)}),V.removeEdge(G)}})}function K(V){var G=v.buildLayerMatrix(V);e.forEach(G,function(Z){var ne=0;e.forEach(Z,function(re,se){var de=V.node(re);de.order=se+ne,e.forEach(de.selfEdges,function(fe){v.addDummyNode(V,"selfedge",{width:fe.label.width,height:fe.label.height,rank:de.rank,order:se+ ++ne,e:fe.e,label:fe.label},"_se")}),delete de.selfEdges})})}function j(V){e.forEach(V.nodes(),function(G){var Z=V.node(G);if(Z.dummy==="selfedge"){var ne=V.node(Z.e.v),re=ne.x+ne.width/2,se=ne.y,de=Z.x-re,fe=ne.height/2;V.setEdge(Z.e,Z.label),V.removeNode(G),Z.label.points=[{x:re+2*de/3,y:se-fe},{x:re+5*de/6,y:se-fe},{x:re+de,y:se},{x:re+5*de/6,y:se+fe},{x:re+2*de/3,y:se+fe}],Z.label.x=Z.x,Z.label.y=Z.y}})}function X(V,G){return e.mapValues(e.pick(V,G),Number)}function oe(V){var G={};return e.forEach(V,function(Z,ne){G[ne.toLowerCase()]=Z}),G}return ey}var ty,wR;function WH(){if(wR)return ty;wR=1;var e=He(),t=Rt(),n=hn().Graph;ty={debugOrdering:i};function i(o){var a=t.buildLayerMatrix(o),u=new n({compound:!0,multigraph:!0}).setGraph({});return e.forEach(o.nodes(),function(l){u.setNode(l,{label:l}),u.setParent(l,"layer"+o.node(l).rank)}),e.forEach(o.edges(),function(l){u.setEdge(l.v,l.w,{},l.name)}),e.forEach(a,function(l,f){var d="layer"+f;u.setNode(d,{rank:"same"}),e.reduce(l,function(h,p){return u.setEdge(h,p,{style:"invis"}),p})}),u}return ty}var ny,xR;function GH(){return xR||(xR=1,ny="0.8.5"),ny}var ry,_R;function KH(){return _R||(_R=1,ry={graphlib:hn(),layout:UH(),debug:WH(),util:{time:Rt().time,notime:Rt().notime},version:GH()}),ry}var YH=KH();const bR=xl(YH),XH=(e,t)=>{const n=new bR.graphlib.Graph({compound:!0});return n.setDefaultEdgeLabel(()=>({})),n.setGraph({rankdir:"TB",ranksep:80,nodesep:60,edgesep:20,ranker:"tight-tree"}),e.forEach(i=>{var o,a;n.setNode(i.id,{width:(o=i.measured)==null?void 0:o.width,height:(a=i.measured)==null?void 0:a.height})}),t.forEach(i=>{typeof i.label=="string"?n.setEdge(i.source,i.target,{label:i.label??"",width:i.label.length*40,height:30,labelpos:"c"}):n.setEdge(i.source,i.target)}),bR.layout(n),e.map(i=>{var l,f;const{x:o,y:a}=n.node(i.id),u={x:o-(((l=i.measured)==null?void 0:l.width)??0)/2,y:a-(((f=i.measured)==null?void 0:f.height)??0)/2};return{...i,position:u}})},QH=({onInitialized:e})=>{const{setNodes:t,getNodes:n,getEdges:i,fitView:o}=Hl(),a=t5();return P.useEffect(()=>{if(console.log("nodesInitialized",a),a){const u=n(),l=i(),f=XH(u,l);t(f),e(),setTimeout(async()=>{await o()},1)}},[a,e]),null},ZH=()=>M.jsx("div",{className:"absolute z-10 inset-0 w-full h-full bg-[#060911]"}),JH={base:R5,trigger:P5},e6={base:M5},t6=({workflow:e})=>{const{nodes:t,edges:n,onNodesChange:i,onEdgesChange:o}=I5(e),[a,u]=P.useState(!1);P.useEffect(()=>u(!1),[e]);const l=P.useCallback(()=>{setTimeout(()=>u(!0),10)},[]);return M.jsxs("div",{className:"w-full h-full relative",children:[!a&&M.jsx(ZH,{}),M.jsxs(KB,{nodes:t,edges:n,nodeTypes:JH,edgeTypes:e6,onNodesChange:i,onEdgesChange:o,children:[M.jsx(s5,{variant:Kn.Dots,gap:20,size:1,color:"#444"}),M.jsx(QH,{onInitialized:l}),M.jsx("svg",{children:M.jsx("defs",{children:M.jsx(A5,{color:"#B3B3B3",id:"arrowhead"})})})]})]})},r2=AR("/workflow/$id")({component:n6,loader:async({params:e})=>fetch(`http://localhost:3000/workflows/${e.id}`).then(t=>t.json()).then(t=>({workflow:t}))});function n6(){const{workflow:e}=r2.useLoaderData();return M.jsx("div",{className:"w-screen h-screen",children:M.jsx(t6,{workflow:e})})}const r6=Nq.update({id:"/",path:"/",getParentRoute:()=>t0}),i6=r2.update({id:"/workflow/$id",path:"/workflow/$id",getParentRoute:()=>t0}),o6={IndexRoute:r6,WorkflowIdRoute:i6},s6=t0._addFileChildren(o6)._addFileTypes(),a6=CI({routeTree:s6}),SR=document.getElementById("root");SR.innerHTML||GA.createRoot(SR).render(M.jsx(P.StrictMode,{children:M.jsx(QI,{router:a6})}));
|