@widget-js/mindmap 0.0.1
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/constants/flow-constants.d.ts +14 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.es.js +60876 -0
- package/dist/index.umd.js +1313 -0
- package/dist/lib/utils.d.ts +3 -0
- package/dist/mind-map/algo-node.d.ts +14 -0
- package/dist/mind-map/delete-node-dialog.d.ts +10 -0
- package/dist/mind-map/index.d.ts +16 -0
- package/dist/mind-map/mind-map-toolbar.d.ts +14 -0
- package/dist/mind-map/registry.d.ts +2 -0
- package/dist/mind-map/rename-node-dialog.d.ts +11 -0
- package/dist/mind-map/use-graph-init.d.ts +22 -0
- package/dist/mind-map/use-graph-operations.d.ts +32 -0
- package/dist/mind-map/use-keyboard-shortcuts.d.ts +12 -0
- package/dist/mind-map/utils.d.ts +11 -0
- package/dist/types/MindNode.d.ts +12 -0
- package/dist/ui/button-group.d.ts +12 -0
- package/dist/ui/button.d.ts +11 -0
- package/dist/ui/context-menu.d.ts +26 -0
- package/dist/ui/dialog.d.ts +18 -0
- package/dist/ui/input.d.ts +3 -0
- package/dist/ui/kbd.d.ts +3 -0
- package/dist/ui/separator.d.ts +5 -0
- package/dist/ui/toggle.d.ts +10 -0
- package/package.json +59 -0
|
@@ -0,0 +1,1313 @@
|
|
|
1
|
+
(function(ei,Yt){typeof exports=="object"&&typeof module<"u"?Yt(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],Yt):(ei=typeof globalThis<"u"?globalThis:ei||self,Yt(ei.MindMapComponent={},ei.React,ei.ReactDOM))})(this,function(ei,Yt,Jx){"use strict";function z2(s){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(s){for(const e in s)if(e!=="default"){const n=Object.getOwnPropertyDescriptor(s,e);Object.defineProperty(t,e,n.get?n:{enumerable:!0,get:()=>s[e]})}}return t.default=s,Object.freeze(t)}const q=z2(Yt),N2=z2(Jx);function L2(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}var uE={exports:{}},qy={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-jsx-runtime.production.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Meta Platforms, Inc. and 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 j2;function DB(){if(j2)return qy;j2=1;var s=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function e(n,r,l){var f=null;if(l!==void 0&&(f=""+l),r.key!==void 0&&(f=""+r.key),"key"in r){l={};for(var h in r)h!=="key"&&(l[h]=r[h])}else l=r;return r=l.ref,{$$typeof:s,type:n,key:f,ref:r!==void 0?r:null,props:l}}return qy.Fragment=t,qy.jsx=e,qy.jsxs=e,qy}var Yy={};/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react-jsx-runtime.development.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Meta Platforms, Inc. and 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 _2;function RB(){return _2||(_2=1,process.env.NODE_ENV!=="production"&&function(){function s(nt){if(nt==null)return null;if(typeof nt=="function")return nt.$$typeof===ct?null:nt.displayName||nt.name||null;if(typeof nt=="string")return nt;switch(nt){case R:return"Fragment";case L:return"Profiler";case N:return"StrictMode";case Y:return"Suspense";case k:return"SuspenseList";case F:return"Activity"}if(typeof nt=="object")switch(typeof nt.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),nt.$$typeof){case D:return"Portal";case U:return nt.displayName||"Context";case _:return(nt._context.displayName||"Context")+".Consumer";case $:var St=nt.render;return nt=nt.displayName,nt||(nt=St.displayName||St.name||"",nt=nt!==""?"ForwardRef("+nt+")":"ForwardRef"),nt;case H:return St=nt.displayName||null,St!==null?St:s(nt.type)||"Memo";case J:St=nt._payload,nt=nt._init;try{return s(nt(St))}catch{}}return null}function t(nt){return""+nt}function e(nt){try{t(nt);var St=!1}catch{St=!0}if(St){St=console;var Tt=St.error,Et=typeof Symbol=="function"&&Symbol.toStringTag&&nt[Symbol.toStringTag]||nt.constructor.name||"Object";return Tt.call(St,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",Et),t(nt)}}function n(nt){if(nt===R)return"<>";if(typeof nt=="object"&&nt!==null&&nt.$$typeof===J)return"<...>";try{var St=s(nt);return St?"<"+St+">":"<...>"}catch{return"<...>"}}function r(){var nt=lt.A;return nt===null?null:nt.getOwner()}function l(){return Error("react-stack-top-frame")}function f(nt){if(vt.call(nt,"key")){var St=Object.getOwnPropertyDescriptor(nt,"key").get;if(St&&St.isReactWarning)return!1}return nt.key!==void 0}function h(nt,St){function Tt(){V||(V=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",St))}Tt.isReactWarning=!0,Object.defineProperty(nt,"key",{get:Tt,configurable:!0})}function p(){var nt=s(this.type);return ot[nt]||(ot[nt]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),nt=this.props.ref,nt!==void 0?nt:null}function y(nt,St,Tt,Et,Ht,ce){var Rt=Tt.ref;return nt={$$typeof:M,type:nt,key:St,props:Tt,_owner:Et},(Rt!==void 0?Rt:null)!==null?Object.defineProperty(nt,"ref",{enumerable:!1,get:p}):Object.defineProperty(nt,"ref",{enumerable:!1,value:null}),nt._store={},Object.defineProperty(nt._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(nt,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(nt,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:Ht}),Object.defineProperty(nt,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:ce}),Object.freeze&&(Object.freeze(nt.props),Object.freeze(nt)),nt}function x(nt,St,Tt,Et,Ht,ce){var Rt=St.children;if(Rt!==void 0)if(Et)if(Ot(Rt)){for(Et=0;Et<Rt.length;Et++)S(Rt[Et]);Object.freeze&&Object.freeze(Rt)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else S(Rt);if(vt.call(St,"key")){Rt=s(nt);var ue=Object.keys(St).filter(function(Be){return Be!=="key"});Et=0<ue.length?"{key: someKey, "+ue.join(": ..., ")+": ...}":"{key: someKey}",Mt[Rt+Et]||(ue=0<ue.length?"{"+ue.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
18
|
+
let props = %s;
|
|
19
|
+
<%s {...props} />
|
|
20
|
+
React keys must be passed directly to JSX without using spread:
|
|
21
|
+
let props = %s;
|
|
22
|
+
<%s key={someKey} {...props} />`,Et,Rt,ue,Rt),Mt[Rt+Et]=!0)}if(Rt=null,Tt!==void 0&&(e(Tt),Rt=""+Tt),f(St)&&(e(St.key),Rt=""+St.key),"key"in St){Tt={};for(var fe in St)fe!=="key"&&(Tt[fe]=St[fe])}else Tt=St;return Rt&&h(Tt,typeof nt=="function"?nt.displayName||nt.name||"Unknown":nt),y(nt,Rt,Tt,r(),Ht,ce)}function S(nt){w(nt)?nt._store&&(nt._store.validated=1):typeof nt=="object"&&nt!==null&&nt.$$typeof===J&&(nt._payload.status==="fulfilled"?w(nt._payload.value)&&nt._payload.value._store&&(nt._payload.value._store.validated=1):nt._store&&(nt._store.validated=1))}function w(nt){return typeof nt=="object"&&nt!==null&&nt.$$typeof===M}var T=Yt,M=Symbol.for("react.transitional.element"),D=Symbol.for("react.portal"),R=Symbol.for("react.fragment"),N=Symbol.for("react.strict_mode"),L=Symbol.for("react.profiler"),_=Symbol.for("react.consumer"),U=Symbol.for("react.context"),$=Symbol.for("react.forward_ref"),Y=Symbol.for("react.suspense"),k=Symbol.for("react.suspense_list"),H=Symbol.for("react.memo"),J=Symbol.for("react.lazy"),F=Symbol.for("react.activity"),ct=Symbol.for("react.client.reference"),lt=T.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,vt=Object.prototype.hasOwnProperty,Ot=Array.isArray,zt=console.createTask?console.createTask:function(){return null};T={react_stack_bottom_frame:function(nt){return nt()}};var V,ot={},tt=T.react_stack_bottom_frame.bind(T,l)(),yt=zt(n(l)),Mt={};Yy.Fragment=R,Yy.jsx=function(nt,St,Tt){var Et=1e4>lt.recentlyCreatedOwnerStacks++;return x(nt,St,Tt,!1,Et?Error("react-stack-top-frame"):tt,Et?zt(n(nt)):yt)},Yy.jsxs=function(nt,St,Tt){var Et=1e4>lt.recentlyCreatedOwnerStacks++;return x(nt,St,Tt,!0,Et?Error("react-stack-top-frame"):tt,Et?zt(n(nt)):yt)}}()),Yy}process.env.NODE_ENV==="production"?uE.exports=DB():uE.exports=RB();var W=uE.exports;/**
|
|
23
|
+
* @license lucide-react v0.563.0 - ISC
|
|
24
|
+
*
|
|
25
|
+
* This source code is licensed under the ISC license.
|
|
26
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
27
|
+
*/const B2=(...s)=>s.filter((t,e,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===e).join(" ").trim();/**
|
|
28
|
+
* @license lucide-react v0.563.0 - ISC
|
|
29
|
+
*
|
|
30
|
+
* This source code is licensed under the ISC license.
|
|
31
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
32
|
+
*/const zB=s=>s.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
|
|
33
|
+
* @license lucide-react v0.563.0 - ISC
|
|
34
|
+
*
|
|
35
|
+
* This source code is licensed under the ISC license.
|
|
36
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
37
|
+
*/const NB=s=>s.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,e,n)=>n?n.toUpperCase():e.toLowerCase());/**
|
|
38
|
+
* @license lucide-react v0.563.0 - ISC
|
|
39
|
+
*
|
|
40
|
+
* This source code is licensed under the ISC license.
|
|
41
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
42
|
+
*/const P2=s=>{const t=NB(s);return t.charAt(0).toUpperCase()+t.slice(1)};/**
|
|
43
|
+
* @license lucide-react v0.563.0 - ISC
|
|
44
|
+
*
|
|
45
|
+
* This source code is licensed under the ISC license.
|
|
46
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
47
|
+
*/var LB={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"};/**
|
|
48
|
+
* @license lucide-react v0.563.0 - ISC
|
|
49
|
+
*
|
|
50
|
+
* This source code is licensed under the ISC license.
|
|
51
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
52
|
+
*/const jB=s=>{for(const t in s)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};/**
|
|
53
|
+
* @license lucide-react v0.563.0 - ISC
|
|
54
|
+
*
|
|
55
|
+
* This source code is licensed under the ISC license.
|
|
56
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
57
|
+
*/const _B=Yt.forwardRef(({color:s="currentColor",size:t=24,strokeWidth:e=2,absoluteStrokeWidth:n,className:r="",children:l,iconNode:f,...h},p)=>Yt.createElement("svg",{ref:p,...LB,width:t,height:t,stroke:s,strokeWidth:n?Number(e)*24/Number(t):e,className:B2("lucide",r),...!l&&!jB(h)&&{"aria-hidden":"true"},...h},[...f.map(([y,x])=>Yt.createElement(y,x)),...Array.isArray(l)?l:[l]]));/**
|
|
58
|
+
* @license lucide-react v0.563.0 - ISC
|
|
59
|
+
*
|
|
60
|
+
* This source code is licensed under the ISC license.
|
|
61
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
62
|
+
*/const ia=(s,t)=>{const e=Yt.forwardRef(({className:n,...r},l)=>Yt.createElement(_B,{ref:l,iconNode:t,className:B2(`lucide-${zB(P2(s))}`,`lucide-${s}`,n),...r}));return e.displayName=P2(s),e};/**
|
|
63
|
+
* @license lucide-react v0.563.0 - ISC
|
|
64
|
+
*
|
|
65
|
+
* This source code is licensed under the ISC license.
|
|
66
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
67
|
+
*/const BB=ia("download",[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]);/**
|
|
68
|
+
* @license lucide-react v0.563.0 - ISC
|
|
69
|
+
*
|
|
70
|
+
* This source code is licensed under the ISC license.
|
|
71
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
72
|
+
*/const PB=ia("grid-3x3",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M15 3v18",key:"14nvp0"}]]);/**
|
|
73
|
+
* @license lucide-react v0.563.0 - ISC
|
|
74
|
+
*
|
|
75
|
+
* This source code is licensed under the ISC license.
|
|
76
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
77
|
+
*/const UB=ia("lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);/**
|
|
78
|
+
* @license lucide-react v0.563.0 - ISC
|
|
79
|
+
*
|
|
80
|
+
* This source code is licensed under the ISC license.
|
|
81
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
82
|
+
*/const HB=ia("maximize",[["path",{d:"M8 3H5a2 2 0 0 0-2 2v3",key:"1dcmit"}],["path",{d:"M21 8V5a2 2 0 0 0-2-2h-3",key:"1e4gt3"}],["path",{d:"M3 16v3a2 2 0 0 0 2 2h3",key:"wsl5sc"}],["path",{d:"M16 21h3a2 2 0 0 0 2-2v-3",key:"18trek"}]]);/**
|
|
83
|
+
* @license lucide-react v0.563.0 - ISC
|
|
84
|
+
*
|
|
85
|
+
* This source code is licensed under the ISC license.
|
|
86
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
87
|
+
*/const kB=ia("pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);/**
|
|
88
|
+
* @license lucide-react v0.563.0 - ISC
|
|
89
|
+
*
|
|
90
|
+
* This source code is licensed under the ISC license.
|
|
91
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
92
|
+
*/const VB=ia("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
|
|
93
|
+
* @license lucide-react v0.563.0 - ISC
|
|
94
|
+
*
|
|
95
|
+
* This source code is licensed under the ISC license.
|
|
96
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
97
|
+
*/const GB=ia("square-check-big",[["path",{d:"M21 10.656V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.344",key:"2acyp4"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
|
|
98
|
+
* @license lucide-react v0.563.0 - ISC
|
|
99
|
+
*
|
|
100
|
+
* This source code is licensed under the ISC license.
|
|
101
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
102
|
+
*/const $B=ia("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);/**
|
|
103
|
+
* @license lucide-react v0.563.0 - ISC
|
|
104
|
+
*
|
|
105
|
+
* This source code is licensed under the ISC license.
|
|
106
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
107
|
+
*/const qB=ia("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
|
|
108
|
+
* @license lucide-react v0.563.0 - ISC
|
|
109
|
+
*
|
|
110
|
+
* This source code is licensed under the ISC license.
|
|
111
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
112
|
+
*/const YB=ia("zoom-in",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"11",x2:"11",y1:"8",y2:"14",key:"1vmskp"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]);/**
|
|
113
|
+
* @license lucide-react v0.563.0 - ISC
|
|
114
|
+
*
|
|
115
|
+
* This source code is licensed under the ISC license.
|
|
116
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
117
|
+
*/const XB=ia("zoom-out",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]);function U2(s){var t,e,n="";if(typeof s=="string"||typeof s=="number")n+=s;else if(typeof s=="object")if(Array.isArray(s)){var r=s.length;for(t=0;t<r;t++)s[t]&&(e=U2(s[t]))&&(n&&(n+=" "),n+=e)}else for(e in s)s[e]&&(n&&(n+=" "),n+=e);return n}function H2(){for(var s,t,e=0,n="",r=arguments.length;e<r;e++)(s=arguments[e])&&(t=U2(s))&&(n&&(n+=" "),n+=t);return n}const IB=(s,t)=>{const e=new Array(s.length+t.length);for(let n=0;n<s.length;n++)e[n]=s[n];for(let n=0;n<t.length;n++)e[s.length+n]=t[n];return e},ZB=(s,t)=>({classGroupId:s,validator:t}),k2=(s=new Map,t=null,e)=>({nextPart:s,validators:t,classGroupId:e}),Kx="-",V2=[],QB="arbitrary..",FB=s=>{const t=KB(s),{conflictingClassGroups:e,conflictingClassGroupModifiers:n}=s;return{getClassGroupId:f=>{if(f.startsWith("[")&&f.endsWith("]"))return JB(f);const h=f.split(Kx),p=h[0]===""&&h.length>1?1:0;return G2(h,p,t)},getConflictingClassGroupIds:(f,h)=>{if(h){const p=n[f],y=e[f];return p?y?IB(y,p):p:y||V2}return e[f]||V2}}},G2=(s,t,e)=>{if(s.length-t===0)return e.classGroupId;const r=s[t],l=e.nextPart.get(r);if(l){const y=G2(s,t+1,l);if(y)return y}const f=e.validators;if(f===null)return;const h=t===0?s.join(Kx):s.slice(t).join(Kx),p=f.length;for(let y=0;y<p;y++){const x=f[y];if(x.validator(h))return x.classGroupId}},JB=s=>s.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=s.slice(1,-1),e=t.indexOf(":"),n=t.slice(0,e);return n?QB+n:void 0})(),KB=s=>{const{theme:t,classGroups:e}=s;return WB(e,t)},WB=(s,t)=>{const e=k2();for(const n in s){const r=s[n];fE(r,e,n,t)}return e},fE=(s,t,e,n)=>{const r=s.length;for(let l=0;l<r;l++){const f=s[l];t4(f,t,e,n)}},t4=(s,t,e,n)=>{if(typeof s=="string"){e4(s,t,e);return}if(typeof s=="function"){n4(s,t,e,n);return}i4(s,t,e,n)},e4=(s,t,e)=>{const n=s===""?t:$2(t,s);n.classGroupId=e},n4=(s,t,e,n)=>{if(s4(s)){fE(s(n),t,e,n);return}t.validators===null&&(t.validators=[]),t.validators.push(ZB(e,s))},i4=(s,t,e,n)=>{const r=Object.entries(s),l=r.length;for(let f=0;f<l;f++){const[h,p]=r[f];fE(p,$2(t,h),e,n)}},$2=(s,t)=>{let e=s;const n=t.split(Kx),r=n.length;for(let l=0;l<r;l++){const f=n[l];let h=e.nextPart.get(f);h||(h=k2(),e.nextPart.set(f,h)),e=h}return e},s4=s=>"isThemeGetter"in s&&s.isThemeGetter===!0,o4=s=>{if(s<1)return{get:()=>{},set:()=>{}};let t=0,e=Object.create(null),n=Object.create(null);const r=(l,f)=>{e[l]=f,t++,t>s&&(t=0,n=e,e=Object.create(null))};return{get(l){let f=e[l];if(f!==void 0)return f;if((f=n[l])!==void 0)return r(l,f),f},set(l,f){l in e?e[l]=f:r(l,f)}}},hE="!",q2=":",r4=[],Y2=(s,t,e,n,r)=>({modifiers:s,hasImportantModifier:t,baseClassName:e,maybePostfixModifierPosition:n,isExternal:r}),a4=s=>{const{prefix:t,experimentalParseClassName:e}=s;let n=r=>{const l=[];let f=0,h=0,p=0,y;const x=r.length;for(let D=0;D<x;D++){const R=r[D];if(f===0&&h===0){if(R===q2){l.push(r.slice(p,D)),p=D+1;continue}if(R==="/"){y=D;continue}}R==="["?f++:R==="]"?f--:R==="("?h++:R===")"&&h--}const S=l.length===0?r:r.slice(p);let w=S,T=!1;S.endsWith(hE)?(w=S.slice(0,-1),T=!0):S.startsWith(hE)&&(w=S.slice(1),T=!0);const M=y&&y>p?y-p:void 0;return Y2(l,T,w,M)};if(t){const r=t+q2,l=n;n=f=>f.startsWith(r)?l(f.slice(r.length)):Y2(r4,!1,f,void 0,!0)}if(e){const r=n;n=l=>e({className:l,parseClassName:r})}return n},l4=s=>{const t=new Map;return s.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{const n=[];let r=[];for(let l=0;l<e.length;l++){const f=e[l],h=f[0]==="[",p=t.has(f);h||p?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(f)):r.push(f)}return r.length>0&&(r.sort(),n.push(...r)),n}},c4=s=>({cache:o4(s.cacheSize),parseClassName:a4(s),sortModifiers:l4(s),...FB(s)}),u4=/\s+/,f4=(s,t)=>{const{parseClassName:e,getClassGroupId:n,getConflictingClassGroupIds:r,sortModifiers:l}=t,f=[],h=s.trim().split(u4);let p="";for(let y=h.length-1;y>=0;y-=1){const x=h[y],{isExternal:S,modifiers:w,hasImportantModifier:T,baseClassName:M,maybePostfixModifierPosition:D}=e(x);if(S){p=x+(p.length>0?" "+p:p);continue}let R=!!D,N=n(R?M.substring(0,D):M);if(!N){if(!R){p=x+(p.length>0?" "+p:p);continue}if(N=n(M),!N){p=x+(p.length>0?" "+p:p);continue}R=!1}const L=w.length===0?"":w.length===1?w[0]:l(w).join(":"),_=T?L+hE:L,U=_+N;if(f.indexOf(U)>-1)continue;f.push(U);const $=r(N,R);for(let Y=0;Y<$.length;++Y){const k=$[Y];f.push(_+k)}p=x+(p.length>0?" "+p:p)}return p},h4=(...s)=>{let t=0,e,n,r="";for(;t<s.length;)(e=s[t++])&&(n=X2(e))&&(r&&(r+=" "),r+=n);return r},X2=s=>{if(typeof s=="string")return s;let t,e="";for(let n=0;n<s.length;n++)s[n]&&(t=X2(s[n]))&&(e&&(e+=" "),e+=t);return e},d4=(s,...t)=>{let e,n,r,l;const f=p=>{const y=t.reduce((x,S)=>S(x),s());return e=c4(y),n=e.cache.get,r=e.cache.set,l=h,h(p)},h=p=>{const y=n(p);if(y)return y;const x=f4(p,e);return r(p,x),x};return l=f,(...p)=>l(h4(...p))},g4=[],bi=s=>{const t=e=>e[s]||g4;return t.isThemeGetter=!0,t},I2=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Z2=/^\((?:(\w[\w-]*):)?(.+)\)$/i,p4=/^\d+\/\d+$/,m4=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,y4=/\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$/,b4=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,v4=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,x4=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Dg=s=>p4.test(s),Ce=s=>!!s&&!Number.isNaN(Number(s)),Su=s=>!!s&&Number.isInteger(Number(s)),dE=s=>s.endsWith("%")&&Ce(s.slice(0,-1)),Ql=s=>m4.test(s),S4=()=>!0,w4=s=>y4.test(s)&&!b4.test(s),Q2=()=>!1,C4=s=>v4.test(s),E4=s=>x4.test(s),A4=s=>!kt(s)&&!Vt(s),T4=s=>Rg(s,tO,Q2),kt=s=>I2.test(s),Sh=s=>Rg(s,eO,w4),gE=s=>Rg(s,z4,Ce),F2=s=>Rg(s,K2,Q2),M4=s=>Rg(s,W2,E4),Wx=s=>Rg(s,nO,C4),Vt=s=>Z2.test(s),Xy=s=>zg(s,eO),O4=s=>zg(s,N4),J2=s=>zg(s,K2),D4=s=>zg(s,tO),R4=s=>zg(s,W2),t1=s=>zg(s,nO,!0),Rg=(s,t,e)=>{const n=I2.exec(s);return n?n[1]?t(n[1]):e(n[2]):!1},zg=(s,t,e=!1)=>{const n=Z2.exec(s);return n?n[1]?t(n[1]):e:!1},K2=s=>s==="position"||s==="percentage",W2=s=>s==="image"||s==="url",tO=s=>s==="length"||s==="size"||s==="bg-size",eO=s=>s==="length",z4=s=>s==="number",N4=s=>s==="family-name",nO=s=>s==="shadow",L4=d4(()=>{const s=bi("color"),t=bi("font"),e=bi("text"),n=bi("font-weight"),r=bi("tracking"),l=bi("leading"),f=bi("breakpoint"),h=bi("container"),p=bi("spacing"),y=bi("radius"),x=bi("shadow"),S=bi("inset-shadow"),w=bi("text-shadow"),T=bi("drop-shadow"),M=bi("blur"),D=bi("perspective"),R=bi("aspect"),N=bi("ease"),L=bi("animate"),_=()=>["auto","avoid","all","avoid-page","page","left","right","column"],U=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],$=()=>[...U(),Vt,kt],Y=()=>["auto","hidden","clip","visible","scroll"],k=()=>["auto","contain","none"],H=()=>[Vt,kt,p],J=()=>[Dg,"full","auto",...H()],F=()=>[Su,"none","subgrid",Vt,kt],ct=()=>["auto",{span:["full",Su,Vt,kt]},Su,Vt,kt],lt=()=>[Su,"auto",Vt,kt],vt=()=>["auto","min","max","fr",Vt,kt],Ot=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],zt=()=>["start","end","center","stretch","center-safe","end-safe"],V=()=>["auto",...H()],ot=()=>[Dg,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...H()],tt=()=>[s,Vt,kt],yt=()=>[...U(),J2,F2,{position:[Vt,kt]}],Mt=()=>["no-repeat",{repeat:["","x","y","space","round"]}],nt=()=>["auto","cover","contain",D4,T4,{size:[Vt,kt]}],St=()=>[dE,Xy,Sh],Tt=()=>["","none","full",y,Vt,kt],Et=()=>["",Ce,Xy,Sh],Ht=()=>["solid","dashed","dotted","double"],ce=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Rt=()=>[Ce,dE,J2,F2],ue=()=>["","none",M,Vt,kt],fe=()=>["none",Ce,Vt,kt],Be=()=>["none",Ce,Vt,kt],Lt=()=>[Ce,Vt,kt],Xi=()=>[Dg,"full",...H()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ql],breakpoint:[Ql],color:[S4],container:[Ql],"drop-shadow":[Ql],ease:["in","out","in-out"],font:[A4],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ql],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ql],shadow:[Ql],spacing:["px",Ce],text:[Ql],"text-shadow":[Ql],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Dg,kt,Vt,R]}],container:["container"],columns:[{columns:[Ce,kt,Vt,h]}],"break-after":[{"break-after":_()}],"break-before":[{"break-before":_()}],"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"],sr:["sr-only","not-sr-only"],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:$()}],overflow:[{overflow:Y()}],"overflow-x":[{"overflow-x":Y()}],"overflow-y":[{"overflow-y":Y()}],overscroll:[{overscroll:k()}],"overscroll-x":[{"overscroll-x":k()}],"overscroll-y":[{"overscroll-y":k()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:J()}],"inset-x":[{"inset-x":J()}],"inset-y":[{"inset-y":J()}],start:[{start:J()}],end:[{end:J()}],top:[{top:J()}],right:[{right:J()}],bottom:[{bottom:J()}],left:[{left:J()}],visibility:["visible","invisible","collapse"],z:[{z:[Su,"auto",Vt,kt]}],basis:[{basis:[Dg,"full","auto",h,...H()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ce,Dg,"auto","initial","none",kt]}],grow:[{grow:["",Ce,Vt,kt]}],shrink:[{shrink:["",Ce,Vt,kt]}],order:[{order:[Su,"first","last","none",Vt,kt]}],"grid-cols":[{"grid-cols":F()}],"col-start-end":[{col:ct()}],"col-start":[{"col-start":lt()}],"col-end":[{"col-end":lt()}],"grid-rows":[{"grid-rows":F()}],"row-start-end":[{row:ct()}],"row-start":[{"row-start":lt()}],"row-end":[{"row-end":lt()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":vt()}],"auto-rows":[{"auto-rows":vt()}],gap:[{gap:H()}],"gap-x":[{"gap-x":H()}],"gap-y":[{"gap-y":H()}],"justify-content":[{justify:[...Ot(),"normal"]}],"justify-items":[{"justify-items":[...zt(),"normal"]}],"justify-self":[{"justify-self":["auto",...zt()]}],"align-content":[{content:["normal",...Ot()]}],"align-items":[{items:[...zt(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...zt(),{baseline:["","last"]}]}],"place-content":[{"place-content":Ot()}],"place-items":[{"place-items":[...zt(),"baseline"]}],"place-self":[{"place-self":["auto",...zt()]}],p:[{p:H()}],px:[{px:H()}],py:[{py:H()}],ps:[{ps:H()}],pe:[{pe:H()}],pt:[{pt:H()}],pr:[{pr:H()}],pb:[{pb:H()}],pl:[{pl:H()}],m:[{m:V()}],mx:[{mx:V()}],my:[{my:V()}],ms:[{ms:V()}],me:[{me:V()}],mt:[{mt:V()}],mr:[{mr:V()}],mb:[{mb:V()}],ml:[{ml:V()}],"space-x":[{"space-x":H()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":H()}],"space-y-reverse":["space-y-reverse"],size:[{size:ot()}],w:[{w:[h,"screen",...ot()]}],"min-w":[{"min-w":[h,"screen","none",...ot()]}],"max-w":[{"max-w":[h,"screen","none","prose",{screen:[f]},...ot()]}],h:[{h:["screen","lh",...ot()]}],"min-h":[{"min-h":["screen","lh","none",...ot()]}],"max-h":[{"max-h":["screen","lh",...ot()]}],"font-size":[{text:["base",e,Xy,Sh]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,Vt,gE]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",dE,kt]}],"font-family":[{font:[O4,kt,t]}],"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:[r,Vt,kt]}],"line-clamp":[{"line-clamp":[Ce,"none",Vt,gE]}],leading:[{leading:[l,...H()]}],"list-image":[{"list-image":["none",Vt,kt]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Vt,kt]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:tt()}],"text-color":[{text:tt()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Ht(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ce,"from-font","auto",Vt,Sh]}],"text-decoration-color":[{decoration:tt()}],"underline-offset":[{"underline-offset":[Ce,"auto",Vt,kt]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:H()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Vt,kt]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Vt,kt]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:yt()}],"bg-repeat":[{bg:Mt()}],"bg-size":[{bg:nt()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Su,Vt,kt],radial:["",Vt,kt],conic:[Su,Vt,kt]},R4,M4]}],"bg-color":[{bg:tt()}],"gradient-from-pos":[{from:St()}],"gradient-via-pos":[{via:St()}],"gradient-to-pos":[{to:St()}],"gradient-from":[{from:tt()}],"gradient-via":[{via:tt()}],"gradient-to":[{to:tt()}],rounded:[{rounded:Tt()}],"rounded-s":[{"rounded-s":Tt()}],"rounded-e":[{"rounded-e":Tt()}],"rounded-t":[{"rounded-t":Tt()}],"rounded-r":[{"rounded-r":Tt()}],"rounded-b":[{"rounded-b":Tt()}],"rounded-l":[{"rounded-l":Tt()}],"rounded-ss":[{"rounded-ss":Tt()}],"rounded-se":[{"rounded-se":Tt()}],"rounded-ee":[{"rounded-ee":Tt()}],"rounded-es":[{"rounded-es":Tt()}],"rounded-tl":[{"rounded-tl":Tt()}],"rounded-tr":[{"rounded-tr":Tt()}],"rounded-br":[{"rounded-br":Tt()}],"rounded-bl":[{"rounded-bl":Tt()}],"border-w":[{border:Et()}],"border-w-x":[{"border-x":Et()}],"border-w-y":[{"border-y":Et()}],"border-w-s":[{"border-s":Et()}],"border-w-e":[{"border-e":Et()}],"border-w-t":[{"border-t":Et()}],"border-w-r":[{"border-r":Et()}],"border-w-b":[{"border-b":Et()}],"border-w-l":[{"border-l":Et()}],"divide-x":[{"divide-x":Et()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Et()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Ht(),"hidden","none"]}],"divide-style":[{divide:[...Ht(),"hidden","none"]}],"border-color":[{border:tt()}],"border-color-x":[{"border-x":tt()}],"border-color-y":[{"border-y":tt()}],"border-color-s":[{"border-s":tt()}],"border-color-e":[{"border-e":tt()}],"border-color-t":[{"border-t":tt()}],"border-color-r":[{"border-r":tt()}],"border-color-b":[{"border-b":tt()}],"border-color-l":[{"border-l":tt()}],"divide-color":[{divide:tt()}],"outline-style":[{outline:[...Ht(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ce,Vt,kt]}],"outline-w":[{outline:["",Ce,Xy,Sh]}],"outline-color":[{outline:tt()}],shadow:[{shadow:["","none",x,t1,Wx]}],"shadow-color":[{shadow:tt()}],"inset-shadow":[{"inset-shadow":["none",S,t1,Wx]}],"inset-shadow-color":[{"inset-shadow":tt()}],"ring-w":[{ring:Et()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:tt()}],"ring-offset-w":[{"ring-offset":[Ce,Sh]}],"ring-offset-color":[{"ring-offset":tt()}],"inset-ring-w":[{"inset-ring":Et()}],"inset-ring-color":[{"inset-ring":tt()}],"text-shadow":[{"text-shadow":["none",w,t1,Wx]}],"text-shadow-color":[{"text-shadow":tt()}],opacity:[{opacity:[Ce,Vt,kt]}],"mix-blend":[{"mix-blend":[...ce(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ce()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Ce]}],"mask-image-linear-from-pos":[{"mask-linear-from":Rt()}],"mask-image-linear-to-pos":[{"mask-linear-to":Rt()}],"mask-image-linear-from-color":[{"mask-linear-from":tt()}],"mask-image-linear-to-color":[{"mask-linear-to":tt()}],"mask-image-t-from-pos":[{"mask-t-from":Rt()}],"mask-image-t-to-pos":[{"mask-t-to":Rt()}],"mask-image-t-from-color":[{"mask-t-from":tt()}],"mask-image-t-to-color":[{"mask-t-to":tt()}],"mask-image-r-from-pos":[{"mask-r-from":Rt()}],"mask-image-r-to-pos":[{"mask-r-to":Rt()}],"mask-image-r-from-color":[{"mask-r-from":tt()}],"mask-image-r-to-color":[{"mask-r-to":tt()}],"mask-image-b-from-pos":[{"mask-b-from":Rt()}],"mask-image-b-to-pos":[{"mask-b-to":Rt()}],"mask-image-b-from-color":[{"mask-b-from":tt()}],"mask-image-b-to-color":[{"mask-b-to":tt()}],"mask-image-l-from-pos":[{"mask-l-from":Rt()}],"mask-image-l-to-pos":[{"mask-l-to":Rt()}],"mask-image-l-from-color":[{"mask-l-from":tt()}],"mask-image-l-to-color":[{"mask-l-to":tt()}],"mask-image-x-from-pos":[{"mask-x-from":Rt()}],"mask-image-x-to-pos":[{"mask-x-to":Rt()}],"mask-image-x-from-color":[{"mask-x-from":tt()}],"mask-image-x-to-color":[{"mask-x-to":tt()}],"mask-image-y-from-pos":[{"mask-y-from":Rt()}],"mask-image-y-to-pos":[{"mask-y-to":Rt()}],"mask-image-y-from-color":[{"mask-y-from":tt()}],"mask-image-y-to-color":[{"mask-y-to":tt()}],"mask-image-radial":[{"mask-radial":[Vt,kt]}],"mask-image-radial-from-pos":[{"mask-radial-from":Rt()}],"mask-image-radial-to-pos":[{"mask-radial-to":Rt()}],"mask-image-radial-from-color":[{"mask-radial-from":tt()}],"mask-image-radial-to-color":[{"mask-radial-to":tt()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":U()}],"mask-image-conic-pos":[{"mask-conic":[Ce]}],"mask-image-conic-from-pos":[{"mask-conic-from":Rt()}],"mask-image-conic-to-pos":[{"mask-conic-to":Rt()}],"mask-image-conic-from-color":[{"mask-conic-from":tt()}],"mask-image-conic-to-color":[{"mask-conic-to":tt()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:yt()}],"mask-repeat":[{mask:Mt()}],"mask-size":[{mask:nt()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Vt,kt]}],filter:[{filter:["","none",Vt,kt]}],blur:[{blur:ue()}],brightness:[{brightness:[Ce,Vt,kt]}],contrast:[{contrast:[Ce,Vt,kt]}],"drop-shadow":[{"drop-shadow":["","none",T,t1,Wx]}],"drop-shadow-color":[{"drop-shadow":tt()}],grayscale:[{grayscale:["",Ce,Vt,kt]}],"hue-rotate":[{"hue-rotate":[Ce,Vt,kt]}],invert:[{invert:["",Ce,Vt,kt]}],saturate:[{saturate:[Ce,Vt,kt]}],sepia:[{sepia:["",Ce,Vt,kt]}],"backdrop-filter":[{"backdrop-filter":["","none",Vt,kt]}],"backdrop-blur":[{"backdrop-blur":ue()}],"backdrop-brightness":[{"backdrop-brightness":[Ce,Vt,kt]}],"backdrop-contrast":[{"backdrop-contrast":[Ce,Vt,kt]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ce,Vt,kt]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ce,Vt,kt]}],"backdrop-invert":[{"backdrop-invert":["",Ce,Vt,kt]}],"backdrop-opacity":[{"backdrop-opacity":[Ce,Vt,kt]}],"backdrop-saturate":[{"backdrop-saturate":[Ce,Vt,kt]}],"backdrop-sepia":[{"backdrop-sepia":["",Ce,Vt,kt]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":H()}],"border-spacing-x":[{"border-spacing-x":H()}],"border-spacing-y":[{"border-spacing-y":H()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Vt,kt]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ce,"initial",Vt,kt]}],ease:[{ease:["linear","initial",N,Vt,kt]}],delay:[{delay:[Ce,Vt,kt]}],animate:[{animate:["none",L,Vt,kt]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[D,Vt,kt]}],"perspective-origin":[{"perspective-origin":$()}],rotate:[{rotate:fe()}],"rotate-x":[{"rotate-x":fe()}],"rotate-y":[{"rotate-y":fe()}],"rotate-z":[{"rotate-z":fe()}],scale:[{scale:Be()}],"scale-x":[{"scale-x":Be()}],"scale-y":[{"scale-y":Be()}],"scale-z":[{"scale-z":Be()}],"scale-3d":["scale-3d"],skew:[{skew:Lt()}],"skew-x":[{"skew-x":Lt()}],"skew-y":[{"skew-y":Lt()}],transform:[{transform:[Vt,kt,"","none","gpu","cpu"]}],"transform-origin":[{origin:$()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Xi()}],"translate-x":[{"translate-x":Xi()}],"translate-y":[{"translate-y":Xi()}],"translate-z":[{"translate-z":Xi()}],"translate-none":["translate-none"],accent:[{accent:tt()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:tt()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],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",Vt,kt]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":H()}],"scroll-mx":[{"scroll-mx":H()}],"scroll-my":[{"scroll-my":H()}],"scroll-ms":[{"scroll-ms":H()}],"scroll-me":[{"scroll-me":H()}],"scroll-mt":[{"scroll-mt":H()}],"scroll-mr":[{"scroll-mr":H()}],"scroll-mb":[{"scroll-mb":H()}],"scroll-ml":[{"scroll-ml":H()}],"scroll-p":[{"scroll-p":H()}],"scroll-px":[{"scroll-px":H()}],"scroll-py":[{"scroll-py":H()}],"scroll-ps":[{"scroll-ps":H()}],"scroll-pe":[{"scroll-pe":H()}],"scroll-pt":[{"scroll-pt":H()}],"scroll-pr":[{"scroll-pr":H()}],"scroll-pb":[{"scroll-pb":H()}],"scroll-pl":[{"scroll-pl":H()}],"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",Vt,kt]}],fill:[{fill:["none",...tt()]}],"stroke-w":[{stroke:[Ce,Xy,Sh,gE]}],stroke:[{stroke:["none",...tt()]}],"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-x","border-w-y","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-x","border-color-y","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"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"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"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function er(...s){return L4(H2(s))}function pE({className:s,...t}){return W.jsx("kbd",{"data-slot":"kbd",className:er("bg-muted text-muted-foreground pointer-events-none inline-flex h-5 w-fit min-w-5 items-center justify-center gap-1 rounded-sm px-1 font-sans text-xs font-medium select-none","[&_svg:not([class*='size-'])]:size-3","[[data-slot=tooltip-content]_&]:bg-background/20 [[data-slot=tooltip-content]_&]:text-background dark:[[data-slot=tooltip-content]_&]:bg-background/10",s),...t})}const iO=s=>typeof s=="boolean"?`${s}`:s===0?"0":s,sO=H2,mE=(s,t)=>e=>{var n;if((t==null?void 0:t.variants)==null)return sO(s,e==null?void 0:e.class,e==null?void 0:e.className);const{variants:r,defaultVariants:l}=t,f=Object.keys(r).map(y=>{const x=e==null?void 0:e[y],S=l==null?void 0:l[y];if(x===null)return null;const w=iO(x)||iO(S);return r[y][w]}),h=e&&Object.entries(e).reduce((y,x)=>{let[S,w]=x;return w===void 0||(y[S]=w),y},{}),p=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((y,x)=>{let{class:S,className:w,...T}=x;return Object.entries(T).every(M=>{let[D,R]=M;return Array.isArray(R)?R.includes({...l,...h}[D]):{...l,...h}[D]===R})?[...y,S,w]:y},[]);return sO(s,f,p,e==null?void 0:e.class,e==null?void 0:e.className)};function oO(s,t){if(typeof s=="function")return s(t);s!=null&&(s.current=t)}function yE(...s){return t=>{let e=!1;const n=s.map(r=>{const l=oO(r,t);return!e&&typeof l=="function"&&(e=!0),l});if(e)return()=>{for(let r=0;r<n.length;r++){const l=n[r];typeof l=="function"?l():oO(s[r],null)}}}}function Gi(...s){return q.useCallback(yE(...s),s)}function Ng(s){const t=_4(s),e=q.forwardRef((n,r)=>{const{children:l,...f}=n,h=q.Children.toArray(l),p=h.find(P4);if(p){const y=p.props.children,x=h.map(S=>S===p?q.Children.count(y)>1?q.Children.only(null):q.isValidElement(y)?y.props.children:null:S);return W.jsx(t,{...f,ref:r,children:q.isValidElement(y)?q.cloneElement(y,void 0,x):null})}return W.jsx(t,{...f,ref:r,children:l})});return e.displayName=`${s}.Slot`,e}var j4=Ng("Slot");function _4(s){const t=q.forwardRef((e,n)=>{const{children:r,...l}=e;if(q.isValidElement(r)){const f=H4(r),h=U4(l,r.props);return r.type!==q.Fragment&&(h.ref=n?yE(n,f):f),q.cloneElement(r,h)}return q.Children.count(r)>1?q.Children.only(null):null});return t.displayName=`${s}.SlotClone`,t}var B4=Symbol("radix.slottable");function P4(s){return q.isValidElement(s)&&typeof s.type=="function"&&"__radixId"in s.type&&s.type.__radixId===B4}function U4(s,t){const e={...t};for(const n in t){const r=s[n],l=t[n];/^on[A-Z]/.test(n)?r&&l?e[n]=(...h)=>{const p=l(...h);return r(...h),p}:r&&(e[n]=r):n==="style"?e[n]={...r,...l}:n==="className"&&(e[n]=[r,l].filter(Boolean).join(" "))}return{...s,...e}}function H4(s){var n,r;let t=(n=Object.getOwnPropertyDescriptor(s.props,"ref"))==null?void 0:n.get,e=t&&"isReactWarning"in t&&t.isReactWarning;return e?s.ref:(t=(r=Object.getOwnPropertyDescriptor(s,"ref"))==null?void 0:r.get,e=t&&"isReactWarning"in t&&t.isReactWarning,e?s.props.ref:s.props.ref||s.ref)}var k4=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Xn=k4.reduce((s,t)=>{const e=Ng(`Primitive.${t}`),n=q.forwardRef((r,l)=>{const{asChild:f,...h}=r,p=f?e:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),W.jsx(p,{...h,ref:l})});return n.displayName=`Primitive.${t}`,{...s,[t]:n}},{});function rO(s,t){s&&N2.flushSync(()=>s.dispatchEvent(t))}function V4(s,t){const e=q.createContext(t),n=l=>{const{children:f,...h}=l,p=q.useMemo(()=>h,Object.values(h));return W.jsx(e.Provider,{value:p,children:f})};n.displayName=s+"Provider";function r(l){const f=q.useContext(e);if(f)return f;if(t!==void 0)return t;throw new Error(`\`${l}\` must be used within \`${s}\``)}return[n,r]}function Lg(s,t=[]){let e=[];function n(l,f){const h=q.createContext(f),p=e.length;e=[...e,f];const y=S=>{var N;const{scope:w,children:T,...M}=S,D=((N=w==null?void 0:w[s])==null?void 0:N[p])||h,R=q.useMemo(()=>M,Object.values(M));return W.jsx(D.Provider,{value:R,children:T})};y.displayName=l+"Provider";function x(S,w){var D;const T=((D=w==null?void 0:w[s])==null?void 0:D[p])||h,M=q.useContext(T);if(M)return M;if(f!==void 0)return f;throw new Error(`\`${S}\` must be used within \`${l}\``)}return[y,x]}const r=()=>{const l=e.map(f=>q.createContext(f));return function(h){const p=(h==null?void 0:h[s])||l;return q.useMemo(()=>({[`__scope${s}`]:{...h,[s]:p}}),[h,p])}};return r.scopeName=s,[n,G4(r,...t)]}function G4(...s){const t=s[0];if(s.length===1)return t;const e=()=>{const n=s.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(l){const f=n.reduce((h,{useScope:p,scopeName:y})=>{const S=p(l)[`__scope${y}`];return{...h,...S}},{});return q.useMemo(()=>({[`__scope${t.scopeName}`]:f}),[f])}};return e.scopeName=t.scopeName,e}function aO(s){const t=s+"CollectionProvider",[e,n]=Lg(t),[r,l]=e(t,{collectionRef:{current:null},itemMap:new Map}),f=D=>{const{scope:R,children:N}=D,L=Yt.useRef(null),_=Yt.useRef(new Map).current;return W.jsx(r,{scope:R,itemMap:_,collectionRef:L,children:N})};f.displayName=t;const h=s+"CollectionSlot",p=Ng(h),y=Yt.forwardRef((D,R)=>{const{scope:N,children:L}=D,_=l(h,N),U=Gi(R,_.collectionRef);return W.jsx(p,{ref:U,children:L})});y.displayName=h;const x=s+"CollectionItemSlot",S="data-radix-collection-item",w=Ng(x),T=Yt.forwardRef((D,R)=>{const{scope:N,children:L,..._}=D,U=Yt.useRef(null),$=Gi(R,U),Y=l(x,N);return Yt.useEffect(()=>(Y.itemMap.set(U,{ref:U,..._}),()=>void Y.itemMap.delete(U))),W.jsx(w,{[S]:"",ref:$,children:L})});T.displayName=x;function M(D){const R=l(s+"CollectionConsumer",D);return Yt.useCallback(()=>{const L=R.collectionRef.current;if(!L)return[];const _=Array.from(L.querySelectorAll(`[${S}]`));return Array.from(R.itemMap.values()).sort((Y,k)=>_.indexOf(Y.ref.current)-_.indexOf(k.ref.current))},[R.collectionRef,R.itemMap])}return[{Provider:f,Slot:y,ItemSlot:T},M,n]}function ve(s,t,{checkForDefaultPrevented:e=!0}={}){return function(r){if(s==null||s(r),e===!1||!r.defaultPrevented)return t==null?void 0:t(r)}}var wu=globalThis!=null&&globalThis.document?q.useLayoutEffect:()=>{},$4=q[" useInsertionEffect ".trim().toString()]||wu;function bE({prop:s,defaultProp:t,onChange:e=()=>{},caller:n}){const[r,l,f]=q4({defaultProp:t,onChange:e}),h=s!==void 0,p=h?s:r;{const x=q.useRef(s!==void 0);q.useEffect(()=>{const S=x.current;S!==h&&console.warn(`${n} is changing from ${S?"controlled":"uncontrolled"} to ${h?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),x.current=h},[h,n])}const y=q.useCallback(x=>{var S;if(h){const w=Y4(x)?x(s):x;w!==s&&((S=f.current)==null||S.call(f,w))}else l(x)},[h,s,l,f]);return[p,y]}function q4({defaultProp:s,onChange:t}){const[e,n]=q.useState(s),r=q.useRef(e),l=q.useRef(t);return $4(()=>{l.current=t},[t]),q.useEffect(()=>{var f;r.current!==e&&((f=l.current)==null||f.call(l,e),r.current=e)},[e,r]),[e,n,l]}function Y4(s){return typeof s=="function"}function X4(s,t){return q.useReducer((e,n)=>t[e][n]??e,s)}var Cu=s=>{const{present:t,children:e}=s,n=I4(t),r=typeof e=="function"?e({present:n.isPresent}):q.Children.only(e),l=Gi(n.ref,Z4(r));return typeof e=="function"||n.isPresent?q.cloneElement(r,{ref:l}):null};Cu.displayName="Presence";function I4(s){const[t,e]=q.useState(),n=q.useRef(null),r=q.useRef(s),l=q.useRef("none"),f=s?"mounted":"unmounted",[h,p]=X4(f,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return q.useEffect(()=>{const y=e1(n.current);l.current=h==="mounted"?y:"none"},[h]),wu(()=>{const y=n.current,x=r.current;if(x!==s){const w=l.current,T=e1(y);s?p("MOUNT"):T==="none"||(y==null?void 0:y.display)==="none"?p("UNMOUNT"):p(x&&w!==T?"ANIMATION_OUT":"UNMOUNT"),r.current=s}},[s,p]),wu(()=>{if(t){let y;const x=t.ownerDocument.defaultView??window,S=T=>{const D=e1(n.current).includes(CSS.escape(T.animationName));if(T.target===t&&D&&(p("ANIMATION_END"),!r.current)){const R=t.style.animationFillMode;t.style.animationFillMode="forwards",y=x.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=R)})}},w=T=>{T.target===t&&(l.current=e1(n.current))};return t.addEventListener("animationstart",w),t.addEventListener("animationcancel",S),t.addEventListener("animationend",S),()=>{x.clearTimeout(y),t.removeEventListener("animationstart",w),t.removeEventListener("animationcancel",S),t.removeEventListener("animationend",S)}}else p("ANIMATION_END")},[t,p]),{isPresent:["mounted","unmountSuspended"].includes(h),ref:q.useCallback(y=>{n.current=y?getComputedStyle(y):null,e(y)},[])}}function e1(s){return(s==null?void 0:s.animationName)||"none"}function Z4(s){var n,r;let t=(n=Object.getOwnPropertyDescriptor(s.props,"ref"))==null?void 0:n.get,e=t&&"isReactWarning"in t&&t.isReactWarning;return e?s.ref:(t=(r=Object.getOwnPropertyDescriptor(s,"ref"))==null?void 0:r.get,e=t&&"isReactWarning"in t&&t.isReactWarning,e?s.props.ref:s.props.ref||s.ref)}var Q4=q[" useId ".trim().toString()]||(()=>{}),F4=0;function n1(s){const[t,e]=q.useState(Q4());return wu(()=>{e(n=>n??String(F4++))},[s]),s||(t?`radix-${t}`:"")}var J4=q.createContext(void 0);function lO(s){const t=q.useContext(J4);return s||t||"ltr"}function Za(s){const t=q.useRef(s);return q.useEffect(()=>{t.current=s}),q.useMemo(()=>(...e)=>{var n;return(n=t.current)==null?void 0:n.call(t,...e)},[])}function K4(s,t=globalThis==null?void 0:globalThis.document){const e=Za(s);q.useEffect(()=>{const n=r=>{r.key==="Escape"&&e(r)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[e,t])}var W4="DismissableLayer",vE="dismissableLayer.update",t5="dismissableLayer.pointerDownOutside",e5="dismissableLayer.focusOutside",cO,uO=q.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),xE=q.forwardRef((s,t)=>{const{disableOutsidePointerEvents:e=!1,onEscapeKeyDown:n,onPointerDownOutside:r,onFocusOutside:l,onInteractOutside:f,onDismiss:h,...p}=s,y=q.useContext(uO),[x,S]=q.useState(null),w=(x==null?void 0:x.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,T]=q.useState({}),M=Gi(t,k=>S(k)),D=Array.from(y.layers),[R]=[...y.layersWithOutsidePointerEventsDisabled].slice(-1),N=D.indexOf(R),L=x?D.indexOf(x):-1,_=y.layersWithOutsidePointerEventsDisabled.size>0,U=L>=N,$=s5(k=>{const H=k.target,J=[...y.branches].some(F=>F.contains(H));!U||J||(r==null||r(k),f==null||f(k),k.defaultPrevented||h==null||h())},w),Y=o5(k=>{const H=k.target;[...y.branches].some(F=>F.contains(H))||(l==null||l(k),f==null||f(k),k.defaultPrevented||h==null||h())},w);return K4(k=>{L===y.layers.size-1&&(n==null||n(k),!k.defaultPrevented&&h&&(k.preventDefault(),h()))},w),q.useEffect(()=>{if(x)return e&&(y.layersWithOutsidePointerEventsDisabled.size===0&&(cO=w.body.style.pointerEvents,w.body.style.pointerEvents="none"),y.layersWithOutsidePointerEventsDisabled.add(x)),y.layers.add(x),fO(),()=>{e&&y.layersWithOutsidePointerEventsDisabled.size===1&&(w.body.style.pointerEvents=cO)}},[x,w,e,y]),q.useEffect(()=>()=>{x&&(y.layers.delete(x),y.layersWithOutsidePointerEventsDisabled.delete(x),fO())},[x,y]),q.useEffect(()=>{const k=()=>T({});return document.addEventListener(vE,k),()=>document.removeEventListener(vE,k)},[]),W.jsx(Xn.div,{...p,ref:M,style:{pointerEvents:_?U?"auto":"none":void 0,...s.style},onFocusCapture:ve(s.onFocusCapture,Y.onFocusCapture),onBlurCapture:ve(s.onBlurCapture,Y.onBlurCapture),onPointerDownCapture:ve(s.onPointerDownCapture,$.onPointerDownCapture)})});xE.displayName=W4;var n5="DismissableLayerBranch",i5=q.forwardRef((s,t)=>{const e=q.useContext(uO),n=q.useRef(null),r=Gi(t,n);return q.useEffect(()=>{const l=n.current;if(l)return e.branches.add(l),()=>{e.branches.delete(l)}},[e.branches]),W.jsx(Xn.div,{...s,ref:r})});i5.displayName=n5;function s5(s,t=globalThis==null?void 0:globalThis.document){const e=Za(s),n=q.useRef(!1),r=q.useRef(()=>{});return q.useEffect(()=>{const l=h=>{if(h.target&&!n.current){let p=function(){hO(t5,e,y,{discrete:!0})};const y={originalEvent:h};h.pointerType==="touch"?(t.removeEventListener("click",r.current),r.current=p,t.addEventListener("click",r.current,{once:!0})):p()}else t.removeEventListener("click",r.current);n.current=!1},f=window.setTimeout(()=>{t.addEventListener("pointerdown",l)},0);return()=>{window.clearTimeout(f),t.removeEventListener("pointerdown",l),t.removeEventListener("click",r.current)}},[t,e]),{onPointerDownCapture:()=>n.current=!0}}function o5(s,t=globalThis==null?void 0:globalThis.document){const e=Za(s),n=q.useRef(!1);return q.useEffect(()=>{const r=l=>{l.target&&!n.current&&hO(e5,e,{originalEvent:l},{discrete:!1})};return t.addEventListener("focusin",r),()=>t.removeEventListener("focusin",r)},[t,e]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function fO(){const s=new CustomEvent(vE);document.dispatchEvent(s)}function hO(s,t,e,{discrete:n}){const r=e.originalEvent.target,l=new CustomEvent(s,{bubbles:!1,cancelable:!0,detail:e});t&&r.addEventListener(s,t,{once:!0}),n?rO(r,l):r.dispatchEvent(l)}var SE="focusScope.autoFocusOnMount",wE="focusScope.autoFocusOnUnmount",dO={bubbles:!1,cancelable:!0},r5="FocusScope",CE=q.forwardRef((s,t)=>{const{loop:e=!1,trapped:n=!1,onMountAutoFocus:r,onUnmountAutoFocus:l,...f}=s,[h,p]=q.useState(null),y=Za(r),x=Za(l),S=q.useRef(null),w=Gi(t,D=>p(D)),T=q.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;q.useEffect(()=>{if(n){let D=function(_){if(T.paused||!h)return;const U=_.target;h.contains(U)?S.current=U:Eu(S.current,{select:!0})},R=function(_){if(T.paused||!h)return;const U=_.relatedTarget;U!==null&&(h.contains(U)||Eu(S.current,{select:!0}))},N=function(_){if(document.activeElement===document.body)for(const $ of _)$.removedNodes.length>0&&Eu(h)};document.addEventListener("focusin",D),document.addEventListener("focusout",R);const L=new MutationObserver(N);return h&&L.observe(h,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",D),document.removeEventListener("focusout",R),L.disconnect()}}},[n,h,T.paused]),q.useEffect(()=>{if(h){mO.add(T);const D=document.activeElement;if(!h.contains(D)){const N=new CustomEvent(SE,dO);h.addEventListener(SE,y),h.dispatchEvent(N),N.defaultPrevented||(a5(h5(gO(h)),{select:!0}),document.activeElement===D&&Eu(h))}return()=>{h.removeEventListener(SE,y),setTimeout(()=>{const N=new CustomEvent(wE,dO);h.addEventListener(wE,x),h.dispatchEvent(N),N.defaultPrevented||Eu(D??document.body,{select:!0}),h.removeEventListener(wE,x),mO.remove(T)},0)}}},[h,y,x,T]);const M=q.useCallback(D=>{if(!e&&!n||T.paused)return;const R=D.key==="Tab"&&!D.altKey&&!D.ctrlKey&&!D.metaKey,N=document.activeElement;if(R&&N){const L=D.currentTarget,[_,U]=l5(L);_&&U?!D.shiftKey&&N===U?(D.preventDefault(),e&&Eu(_,{select:!0})):D.shiftKey&&N===_&&(D.preventDefault(),e&&Eu(U,{select:!0})):N===L&&D.preventDefault()}},[e,n,T.paused]);return W.jsx(Xn.div,{tabIndex:-1,...f,ref:w,onKeyDown:M})});CE.displayName=r5;function a5(s,{select:t=!1}={}){const e=document.activeElement;for(const n of s)if(Eu(n,{select:t}),document.activeElement!==e)return}function l5(s){const t=gO(s),e=pO(t,s),n=pO(t.reverse(),s);return[e,n]}function gO(s){const t=[],e=document.createTreeWalker(s,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const r=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||r?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;e.nextNode();)t.push(e.currentNode);return t}function pO(s,t){for(const e of s)if(!c5(e,{upTo:t}))return e}function c5(s,{upTo:t}){if(getComputedStyle(s).visibility==="hidden")return!0;for(;s;){if(t!==void 0&&s===t)return!1;if(getComputedStyle(s).display==="none")return!0;s=s.parentElement}return!1}function u5(s){return s instanceof HTMLInputElement&&"select"in s}function Eu(s,{select:t=!1}={}){if(s&&s.focus){const e=document.activeElement;s.focus({preventScroll:!0}),s!==e&&u5(s)&&t&&s.select()}}var mO=f5();function f5(){let s=[];return{add(t){const e=s[0];t!==e&&(e==null||e.pause()),s=yO(s,t),s.unshift(t)},remove(t){var e;s=yO(s,t),(e=s[0])==null||e.resume()}}}function yO(s,t){const e=[...s],n=e.indexOf(t);return n!==-1&&e.splice(n,1),e}function h5(s){return s.filter(t=>t.tagName!=="A")}var d5="Portal",EE=q.forwardRef((s,t)=>{var h;const{container:e,...n}=s,[r,l]=q.useState(!1);wu(()=>l(!0),[]);const f=e||r&&((h=globalThis==null?void 0:globalThis.document)==null?void 0:h.body);return f?Jx.createPortal(W.jsx(Xn.div,{...n,ref:t}),f):null});EE.displayName=d5;var AE=0;function bO(){q.useEffect(()=>{const s=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",s[0]??vO()),document.body.insertAdjacentElement("beforeend",s[1]??vO()),AE++,()=>{AE===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),AE--}},[])}function vO(){const s=document.createElement("span");return s.setAttribute("data-radix-focus-guard",""),s.tabIndex=0,s.style.outline="none",s.style.opacity="0",s.style.position="fixed",s.style.pointerEvents="none",s}var Qa=function(){return Qa=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var l in e)Object.prototype.hasOwnProperty.call(e,l)&&(t[l]=e[l])}return t},Qa.apply(this,arguments)};function re(s,t){var e={};for(var n in s)Object.prototype.hasOwnProperty.call(s,n)&&t.indexOf(n)<0&&(e[n]=s[n]);if(s!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,n=Object.getOwnPropertySymbols(s);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(s,n[r])&&(e[n[r]]=s[n[r]]);return e}function De(s,t,e,n){var r=arguments.length,l=r<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,e):n,f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(s,t,e,n);else for(var h=s.length-1;h>=0;h--)(f=s[h])&&(l=(r<3?f(l):r>3?f(t,e,l):f(t,e))||l);return r>3&&l&&Object.defineProperty(t,e,l),l}function TE(s,t,e,n){function r(l){return l instanceof e?l:new e(function(f){f(l)})}return new(e||(e=Promise))(function(l,f){function h(x){try{y(n.next(x))}catch(S){f(S)}}function p(x){try{y(n.throw(x))}catch(S){f(S)}}function y(x){x.done?l(x.value):r(x.value).then(h,p)}y((n=n.apply(s,t||[])).next())})}function g5(s,t,e){if(e||arguments.length===2)for(var n=0,r=t.length,l;n<r;n++)(l||!(n in t))&&(l||(l=Array.prototype.slice.call(t,0,n)),l[n]=t[n]);return s.concat(l||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var i1="right-scroll-bar-position",s1="width-before-scroll-bar",p5="with-scroll-bars-hidden",m5="--removed-body-scroll-bar-size";function ME(s,t){return typeof s=="function"?s(t):s&&(s.current=t),s}function y5(s,t){var e=Yt.useState(function(){return{value:s,callback:t,facade:{get current(){return e.value},set current(n){var r=e.value;r!==n&&(e.value=n,e.callback(n,r))}}}})[0];return e.callback=t,e.facade}var b5=typeof window<"u"?q.useLayoutEffect:q.useEffect,xO=new WeakMap;function v5(s,t){var e=y5(null,function(n){return s.forEach(function(r){return ME(r,n)})});return b5(function(){var n=xO.get(e);if(n){var r=new Set(n),l=new Set(s),f=e.current;r.forEach(function(h){l.has(h)||ME(h,null)}),l.forEach(function(h){r.has(h)||ME(h,f)})}xO.set(e,s)},[s]),e}function x5(s){return s}function S5(s,t){t===void 0&&(t=x5);var e=[],n=!1,r={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return e.length?e[e.length-1]:s},useMedium:function(l){var f=t(l,n);return e.push(f),function(){e=e.filter(function(h){return h!==f})}},assignSyncMedium:function(l){for(n=!0;e.length;){var f=e;e=[],f.forEach(l)}e={push:function(h){return l(h)},filter:function(){return e}}},assignMedium:function(l){n=!0;var f=[];if(e.length){var h=e;e=[],h.forEach(l),f=e}var p=function(){var x=f;f=[],x.forEach(l)},y=function(){return Promise.resolve().then(p)};y(),e={push:function(x){f.push(x),y()},filter:function(x){return f=f.filter(x),e}}}};return r}function w5(s){s===void 0&&(s={});var t=S5(null);return t.options=Qa({async:!0,ssr:!1},s),t}var SO=function(s){var t=s.sideCar,e=re(s,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return q.createElement(n,Qa({},e))};SO.isSideCarExport=!0;function C5(s,t){return s.useMedium(t),SO}var wO=w5(),OE=function(){},o1=q.forwardRef(function(s,t){var e=q.useRef(null),n=q.useState({onScrollCapture:OE,onWheelCapture:OE,onTouchMoveCapture:OE}),r=n[0],l=n[1],f=s.forwardProps,h=s.children,p=s.className,y=s.removeScrollBar,x=s.enabled,S=s.shards,w=s.sideCar,T=s.noRelative,M=s.noIsolation,D=s.inert,R=s.allowPinchZoom,N=s.as,L=N===void 0?"div":N,_=s.gapMode,U=re(s,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),$=w,Y=v5([e,t]),k=Qa(Qa({},U),r);return q.createElement(q.Fragment,null,x&&q.createElement($,{sideCar:wO,removeScrollBar:y,shards:S,noRelative:T,noIsolation:M,inert:D,setCallbacks:l,allowPinchZoom:!!R,lockRef:e,gapMode:_}),f?q.cloneElement(q.Children.only(h),Qa(Qa({},k),{ref:Y})):q.createElement(L,Qa({},k,{className:p,ref:Y}),h))});o1.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},o1.classNames={fullWidth:s1,zeroRight:i1};var E5=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function A5(){if(!document)return null;var s=document.createElement("style");s.type="text/css";var t=E5();return t&&s.setAttribute("nonce",t),s}function T5(s,t){s.styleSheet?s.styleSheet.cssText=t:s.appendChild(document.createTextNode(t))}function M5(s){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(s)}var O5=function(){var s=0,t=null;return{add:function(e){s==0&&(t=A5())&&(T5(t,e),M5(t)),s++},remove:function(){s--,!s&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},D5=function(){var s=O5();return function(t,e){q.useEffect(function(){return s.add(t),function(){s.remove()}},[t&&e])}},CO=function(){var s=D5(),t=function(e){var n=e.styles,r=e.dynamic;return s(n,r),null};return t},R5={left:0,top:0,right:0,gap:0},DE=function(s){return parseInt(s||"",10)||0},z5=function(s){var t=window.getComputedStyle(document.body),e=t[s==="padding"?"paddingLeft":"marginLeft"],n=t[s==="padding"?"paddingTop":"marginTop"],r=t[s==="padding"?"paddingRight":"marginRight"];return[DE(e),DE(n),DE(r)]},N5=function(s){if(s===void 0&&(s="margin"),typeof window>"u")return R5;var t=z5(s),e=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-e+t[2]-t[0])}},L5=CO(),jg="data-scroll-locked",j5=function(s,t,e,n){var r=s.left,l=s.top,f=s.right,h=s.gap;return e===void 0&&(e="margin"),`
|
|
118
|
+
.`.concat(p5,` {
|
|
119
|
+
overflow: hidden `).concat(n,`;
|
|
120
|
+
padding-right: `).concat(h,"px ").concat(n,`;
|
|
121
|
+
}
|
|
122
|
+
body[`).concat(jg,`] {
|
|
123
|
+
overflow: hidden `).concat(n,`;
|
|
124
|
+
overscroll-behavior: contain;
|
|
125
|
+
`).concat([t&&"position: relative ".concat(n,";"),e==="margin"&&`
|
|
126
|
+
padding-left: `.concat(r,`px;
|
|
127
|
+
padding-top: `).concat(l,`px;
|
|
128
|
+
padding-right: `).concat(f,`px;
|
|
129
|
+
margin-left:0;
|
|
130
|
+
margin-top:0;
|
|
131
|
+
margin-right: `).concat(h,"px ").concat(n,`;
|
|
132
|
+
`),e==="padding"&&"padding-right: ".concat(h,"px ").concat(n,";")].filter(Boolean).join(""),`
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.`).concat(i1,` {
|
|
136
|
+
right: `).concat(h,"px ").concat(n,`;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.`).concat(s1,` {
|
|
140
|
+
margin-right: `).concat(h,"px ").concat(n,`;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.`).concat(i1," .").concat(i1,` {
|
|
144
|
+
right: 0 `).concat(n,`;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.`).concat(s1," .").concat(s1,` {
|
|
148
|
+
margin-right: 0 `).concat(n,`;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
body[`).concat(jg,`] {
|
|
152
|
+
`).concat(m5,": ").concat(h,`px;
|
|
153
|
+
}
|
|
154
|
+
`)},EO=function(){var s=parseInt(document.body.getAttribute(jg)||"0",10);return isFinite(s)?s:0},_5=function(){q.useEffect(function(){return document.body.setAttribute(jg,(EO()+1).toString()),function(){var s=EO()-1;s<=0?document.body.removeAttribute(jg):document.body.setAttribute(jg,s.toString())}},[])},B5=function(s){var t=s.noRelative,e=s.noImportant,n=s.gapMode,r=n===void 0?"margin":n;_5();var l=q.useMemo(function(){return N5(r)},[r]);return q.createElement(L5,{styles:j5(l,!t,r,e?"":"!important")})},RE=!1;if(typeof window<"u")try{var r1=Object.defineProperty({},"passive",{get:function(){return RE=!0,!0}});window.addEventListener("test",r1,r1),window.removeEventListener("test",r1,r1)}catch{RE=!1}var _g=RE?{passive:!1}:!1,P5=function(s){return s.tagName==="TEXTAREA"},AO=function(s,t){if(!(s instanceof Element))return!1;var e=window.getComputedStyle(s);return e[t]!=="hidden"&&!(e.overflowY===e.overflowX&&!P5(s)&&e[t]==="visible")},U5=function(s){return AO(s,"overflowY")},H5=function(s){return AO(s,"overflowX")},TO=function(s,t){var e=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=MO(s,n);if(r){var l=OO(s,n),f=l[1],h=l[2];if(f>h)return!0}n=n.parentNode}while(n&&n!==e.body);return!1},k5=function(s){var t=s.scrollTop,e=s.scrollHeight,n=s.clientHeight;return[t,e,n]},V5=function(s){var t=s.scrollLeft,e=s.scrollWidth,n=s.clientWidth;return[t,e,n]},MO=function(s,t){return s==="v"?U5(t):H5(t)},OO=function(s,t){return s==="v"?k5(t):V5(t)},G5=function(s,t){return s==="h"&&t==="rtl"?-1:1},$5=function(s,t,e,n,r){var l=G5(s,window.getComputedStyle(t).direction),f=l*n,h=e.target,p=t.contains(h),y=!1,x=f>0,S=0,w=0;do{if(!h)break;var T=OO(s,h),M=T[0],D=T[1],R=T[2],N=D-R-l*M;(M||N)&&MO(s,h)&&(S+=N,w+=M);var L=h.parentNode;h=L&&L.nodeType===Node.DOCUMENT_FRAGMENT_NODE?L.host:L}while(!p&&h!==document.body||p&&(t.contains(h)||t===h));return(x&&Math.abs(S)<1||!x&&Math.abs(w)<1)&&(y=!0),y},a1=function(s){return"changedTouches"in s?[s.changedTouches[0].clientX,s.changedTouches[0].clientY]:[0,0]},DO=function(s){return[s.deltaX,s.deltaY]},RO=function(s){return s&&"current"in s?s.current:s},q5=function(s,t){return s[0]===t[0]&&s[1]===t[1]},Y5=function(s){return`
|
|
155
|
+
.block-interactivity-`.concat(s,` {pointer-events: none;}
|
|
156
|
+
.allow-interactivity-`).concat(s,` {pointer-events: all;}
|
|
157
|
+
`)},X5=0,Bg=[];function I5(s){var t=q.useRef([]),e=q.useRef([0,0]),n=q.useRef(),r=q.useState(X5++)[0],l=q.useState(CO)[0],f=q.useRef(s);q.useEffect(function(){f.current=s},[s]),q.useEffect(function(){if(s.inert){document.body.classList.add("block-interactivity-".concat(r));var D=g5([s.lockRef.current],(s.shards||[]).map(RO),!0).filter(Boolean);return D.forEach(function(R){return R.classList.add("allow-interactivity-".concat(r))}),function(){document.body.classList.remove("block-interactivity-".concat(r)),D.forEach(function(R){return R.classList.remove("allow-interactivity-".concat(r))})}}},[s.inert,s.lockRef.current,s.shards]);var h=q.useCallback(function(D,R){if("touches"in D&&D.touches.length===2||D.type==="wheel"&&D.ctrlKey)return!f.current.allowPinchZoom;var N=a1(D),L=e.current,_="deltaX"in D?D.deltaX:L[0]-N[0],U="deltaY"in D?D.deltaY:L[1]-N[1],$,Y=D.target,k=Math.abs(_)>Math.abs(U)?"h":"v";if("touches"in D&&k==="h"&&Y.type==="range")return!1;var H=window.getSelection(),J=H&&H.anchorNode,F=J?J===Y||J.contains(Y):!1;if(F)return!1;var ct=TO(k,Y);if(!ct)return!0;if(ct?$=k:($=k==="v"?"h":"v",ct=TO(k,Y)),!ct)return!1;if(!n.current&&"changedTouches"in D&&(_||U)&&(n.current=$),!$)return!0;var lt=n.current||$;return $5(lt,R,D,lt==="h"?_:U)},[]),p=q.useCallback(function(D){var R=D;if(!(!Bg.length||Bg[Bg.length-1]!==l)){var N="deltaY"in R?DO(R):a1(R),L=t.current.filter(function($){return $.name===R.type&&($.target===R.target||R.target===$.shadowParent)&&q5($.delta,N)})[0];if(L&&L.should){R.cancelable&&R.preventDefault();return}if(!L){var _=(f.current.shards||[]).map(RO).filter(Boolean).filter(function($){return $.contains(R.target)}),U=_.length>0?h(R,_[0]):!f.current.noIsolation;U&&R.cancelable&&R.preventDefault()}}},[]),y=q.useCallback(function(D,R,N,L){var _={name:D,delta:R,target:N,should:L,shadowParent:Z5(N)};t.current.push(_),setTimeout(function(){t.current=t.current.filter(function(U){return U!==_})},1)},[]),x=q.useCallback(function(D){e.current=a1(D),n.current=void 0},[]),S=q.useCallback(function(D){y(D.type,DO(D),D.target,h(D,s.lockRef.current))},[]),w=q.useCallback(function(D){y(D.type,a1(D),D.target,h(D,s.lockRef.current))},[]);q.useEffect(function(){return Bg.push(l),s.setCallbacks({onScrollCapture:S,onWheelCapture:S,onTouchMoveCapture:w}),document.addEventListener("wheel",p,_g),document.addEventListener("touchmove",p,_g),document.addEventListener("touchstart",x,_g),function(){Bg=Bg.filter(function(D){return D!==l}),document.removeEventListener("wheel",p,_g),document.removeEventListener("touchmove",p,_g),document.removeEventListener("touchstart",x,_g)}},[]);var T=s.removeScrollBar,M=s.inert;return q.createElement(q.Fragment,null,M?q.createElement(l,{styles:Y5(r)}):null,T?q.createElement(B5,{noRelative:s.noRelative,gapMode:s.gapMode}):null)}function Z5(s){for(var t=null;s!==null;)s instanceof ShadowRoot&&(t=s.host,s=s.host),s=s.parentNode;return t}const Q5=C5(wO,I5);var zE=q.forwardRef(function(s,t){return q.createElement(o1,Qa({},s,{ref:t,sideCar:Q5}))});zE.classNames=o1.classNames;var F5=function(s){if(typeof document>"u")return null;var t=Array.isArray(s)?s[0]:s;return t.ownerDocument.body},Pg=new WeakMap,l1=new WeakMap,c1={},NE=0,zO=function(s){return s&&(s.host||zO(s.parentNode))},J5=function(s,t){return t.map(function(e){if(s.contains(e))return e;var n=zO(e);return n&&s.contains(n)?n:(console.error("aria-hidden",e,"in not contained inside",s,". Doing nothing"),null)}).filter(function(e){return!!e})},K5=function(s,t,e,n){var r=J5(t,Array.isArray(s)?s:[s]);c1[e]||(c1[e]=new WeakMap);var l=c1[e],f=[],h=new Set,p=new Set(r),y=function(S){!S||h.has(S)||(h.add(S),y(S.parentNode))};r.forEach(y);var x=function(S){!S||p.has(S)||Array.prototype.forEach.call(S.children,function(w){if(h.has(w))x(w);else try{var T=w.getAttribute(n),M=T!==null&&T!=="false",D=(Pg.get(w)||0)+1,R=(l.get(w)||0)+1;Pg.set(w,D),l.set(w,R),f.push(w),D===1&&M&&l1.set(w,!0),R===1&&w.setAttribute(e,"true"),M||w.setAttribute(n,"true")}catch(N){console.error("aria-hidden: cannot operate on ",w,N)}})};return x(t),h.clear(),NE++,function(){f.forEach(function(S){var w=Pg.get(S)-1,T=l.get(S)-1;Pg.set(S,w),l.set(S,T),w||(l1.has(S)||S.removeAttribute(n),l1.delete(S)),T||S.removeAttribute(e)}),NE--,NE||(Pg=new WeakMap,Pg=new WeakMap,l1=new WeakMap,c1={})}},NO=function(s,t,e){e===void 0&&(e="data-aria-hidden");var n=Array.from(Array.isArray(s)?s:[s]),r=F5(s);return r?(n.push.apply(n,Array.from(r.querySelectorAll("[aria-live], script"))),K5(n,r,e,"aria-hidden")):function(){return null}},u1="Dialog",[LO]=Lg(u1),[W5,sa]=LO(u1),jO=s=>{const{__scopeDialog:t,children:e,open:n,defaultOpen:r,onOpenChange:l,modal:f=!0}=s,h=q.useRef(null),p=q.useRef(null),[y,x]=bE({prop:n,defaultProp:r??!1,onChange:l,caller:u1});return W.jsx(W5,{scope:t,triggerRef:h,contentRef:p,contentId:n1(),titleId:n1(),descriptionId:n1(),open:y,onOpenChange:x,onOpenToggle:q.useCallback(()=>x(S=>!S),[x]),modal:f,children:e})};jO.displayName=u1;var _O="DialogTrigger",tP=q.forwardRef((s,t)=>{const{__scopeDialog:e,...n}=s,r=sa(_O,e),l=Gi(t,r.triggerRef);return W.jsx(Xn.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":_E(r.open),...n,ref:l,onClick:ve(s.onClick,r.onOpenToggle)})});tP.displayName=_O;var LE="DialogPortal",[eP,BO]=LO(LE,{forceMount:void 0}),PO=s=>{const{__scopeDialog:t,forceMount:e,children:n,container:r}=s,l=sa(LE,t);return W.jsx(eP,{scope:t,forceMount:e,children:q.Children.map(n,f=>W.jsx(Cu,{present:e||l.open,children:W.jsx(EE,{asChild:!0,container:r,children:f})}))})};PO.displayName=LE;var f1="DialogOverlay",UO=q.forwardRef((s,t)=>{const e=BO(f1,s.__scopeDialog),{forceMount:n=e.forceMount,...r}=s,l=sa(f1,s.__scopeDialog);return l.modal?W.jsx(Cu,{present:n||l.open,children:W.jsx(iP,{...r,ref:t})}):null});UO.displayName=f1;var nP=Ng("DialogOverlay.RemoveScroll"),iP=q.forwardRef((s,t)=>{const{__scopeDialog:e,...n}=s,r=sa(f1,e);return W.jsx(zE,{as:nP,allowPinchZoom:!0,shards:[r.contentRef],children:W.jsx(Xn.div,{"data-state":_E(r.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),wh="DialogContent",HO=q.forwardRef((s,t)=>{const e=BO(wh,s.__scopeDialog),{forceMount:n=e.forceMount,...r}=s,l=sa(wh,s.__scopeDialog);return W.jsx(Cu,{present:n||l.open,children:l.modal?W.jsx(sP,{...r,ref:t}):W.jsx(oP,{...r,ref:t})})});HO.displayName=wh;var sP=q.forwardRef((s,t)=>{const e=sa(wh,s.__scopeDialog),n=q.useRef(null),r=Gi(t,e.contentRef,n);return q.useEffect(()=>{const l=n.current;if(l)return NO(l)},[]),W.jsx(kO,{...s,ref:r,trapFocus:e.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ve(s.onCloseAutoFocus,l=>{var f;l.preventDefault(),(f=e.triggerRef.current)==null||f.focus()}),onPointerDownOutside:ve(s.onPointerDownOutside,l=>{const f=l.detail.originalEvent,h=f.button===0&&f.ctrlKey===!0;(f.button===2||h)&&l.preventDefault()}),onFocusOutside:ve(s.onFocusOutside,l=>l.preventDefault())})}),oP=q.forwardRef((s,t)=>{const e=sa(wh,s.__scopeDialog),n=q.useRef(!1),r=q.useRef(!1);return W.jsx(kO,{...s,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:l=>{var f,h;(f=s.onCloseAutoFocus)==null||f.call(s,l),l.defaultPrevented||(n.current||(h=e.triggerRef.current)==null||h.focus(),l.preventDefault()),n.current=!1,r.current=!1},onInteractOutside:l=>{var p,y;(p=s.onInteractOutside)==null||p.call(s,l),l.defaultPrevented||(n.current=!0,l.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const f=l.target;((y=e.triggerRef.current)==null?void 0:y.contains(f))&&l.preventDefault(),l.detail.originalEvent.type==="focusin"&&r.current&&l.preventDefault()}})}),kO=q.forwardRef((s,t)=>{const{__scopeDialog:e,trapFocus:n,onOpenAutoFocus:r,onCloseAutoFocus:l,...f}=s,h=sa(wh,e),p=q.useRef(null),y=Gi(t,p);return bO(),W.jsxs(W.Fragment,{children:[W.jsx(CE,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:r,onUnmountAutoFocus:l,children:W.jsx(xE,{role:"dialog",id:h.contentId,"aria-describedby":h.descriptionId,"aria-labelledby":h.titleId,"data-state":_E(h.open),...f,ref:y,onDismiss:()=>h.onOpenChange(!1)})}),W.jsxs(W.Fragment,{children:[W.jsx(aP,{titleId:h.titleId}),W.jsx(cP,{contentRef:p,descriptionId:h.descriptionId})]})]})}),jE="DialogTitle",VO=q.forwardRef((s,t)=>{const{__scopeDialog:e,...n}=s,r=sa(jE,e);return W.jsx(Xn.h2,{id:r.titleId,...n,ref:t})});VO.displayName=jE;var GO="DialogDescription",rP=q.forwardRef((s,t)=>{const{__scopeDialog:e,...n}=s,r=sa(GO,e);return W.jsx(Xn.p,{id:r.descriptionId,...n,ref:t})});rP.displayName=GO;var $O="DialogClose",qO=q.forwardRef((s,t)=>{const{__scopeDialog:e,...n}=s,r=sa($O,e);return W.jsx(Xn.button,{type:"button",...n,ref:t,onClick:ve(s.onClick,()=>r.onOpenChange(!1))})});qO.displayName=$O;function _E(s){return s?"open":"closed"}var YO="DialogTitleWarning",[Rtt,XO]=V4(YO,{contentName:wh,titleName:jE,docsSlug:"dialog"}),aP=({titleId:s})=>{const t=XO(YO),e=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
158
|
+
|
|
159
|
+
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
160
|
+
|
|
161
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return q.useEffect(()=>{s&&(document.getElementById(s)||console.error(e))},[e,s]),null},lP="DialogDescriptionWarning",cP=({contentRef:s,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${XO(lP).contentName}}.`;return q.useEffect(()=>{var l;const r=(l=s.current)==null?void 0:l.getAttribute("aria-describedby");t&&r&&(document.getElementById(t)||console.warn(n))},[n,s,t]),null},uP=jO,fP=PO,hP=UO,dP=HO,gP=VO,BE=qO;function pP(s){const[t,e]=q.useState(void 0);return wu(()=>{if(s){e({width:s.offsetWidth,height:s.offsetHeight});const n=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;const l=r[0];let f,h;if("borderBoxSize"in l){const p=l.borderBoxSize,y=Array.isArray(p)?p[0]:p;f=y.inlineSize,h=y.blockSize}else f=s.offsetWidth,h=s.offsetHeight;e({width:f,height:h})});return n.observe(s,{box:"border-box"}),()=>n.unobserve(s)}else e(void 0)},[s]),t}const mP=["top","right","bottom","left"],Au=Math.min,vo=Math.max,h1=Math.round,d1=Math.floor,Fa=s=>({x:s,y:s}),yP={left:"right",right:"left",bottom:"top",top:"bottom"},bP={start:"end",end:"start"};function PE(s,t,e){return vo(s,Au(t,e))}function Fl(s,t){return typeof s=="function"?s(t):s}function Jl(s){return s.split("-")[0]}function Ug(s){return s.split("-")[1]}function UE(s){return s==="x"?"y":"x"}function HE(s){return s==="y"?"height":"width"}const vP=new Set(["top","bottom"]);function Ja(s){return vP.has(Jl(s))?"y":"x"}function kE(s){return UE(Ja(s))}function xP(s,t,e){e===void 0&&(e=!1);const n=Ug(s),r=kE(s),l=HE(r);let f=r==="x"?n===(e?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[l]>t.floating[l]&&(f=g1(f)),[f,g1(f)]}function SP(s){const t=g1(s);return[VE(s),t,VE(t)]}function VE(s){return s.replace(/start|end/g,t=>bP[t])}const IO=["left","right"],ZO=["right","left"],wP=["top","bottom"],CP=["bottom","top"];function EP(s,t,e){switch(s){case"top":case"bottom":return e?t?ZO:IO:t?IO:ZO;case"left":case"right":return t?wP:CP;default:return[]}}function AP(s,t,e,n){const r=Ug(s);let l=EP(Jl(s),e==="start",n);return r&&(l=l.map(f=>f+"-"+r),t&&(l=l.concat(l.map(VE)))),l}function g1(s){return s.replace(/left|right|bottom|top/g,t=>yP[t])}function TP(s){return{top:0,right:0,bottom:0,left:0,...s}}function QO(s){return typeof s!="number"?TP(s):{top:s,right:s,bottom:s,left:s}}function p1(s){const{x:t,y:e,width:n,height:r}=s;return{width:n,height:r,top:e,left:t,right:t+n,bottom:e+r,x:t,y:e}}function FO(s,t,e){let{reference:n,floating:r}=s;const l=Ja(t),f=kE(t),h=HE(f),p=Jl(t),y=l==="y",x=n.x+n.width/2-r.width/2,S=n.y+n.height/2-r.height/2,w=n[h]/2-r[h]/2;let T;switch(p){case"top":T={x,y:n.y-r.height};break;case"bottom":T={x,y:n.y+n.height};break;case"right":T={x:n.x+n.width,y:S};break;case"left":T={x:n.x-r.width,y:S};break;default:T={x:n.x,y:n.y}}switch(Ug(t)){case"start":T[f]-=w*(e&&y?-1:1);break;case"end":T[f]+=w*(e&&y?-1:1);break}return T}async function MP(s,t){var e;t===void 0&&(t={});const{x:n,y:r,platform:l,rects:f,elements:h,strategy:p}=s,{boundary:y="clippingAncestors",rootBoundary:x="viewport",elementContext:S="floating",altBoundary:w=!1,padding:T=0}=Fl(t,s),M=QO(T),R=h[w?S==="floating"?"reference":"floating":S],N=p1(await l.getClippingRect({element:(e=await(l.isElement==null?void 0:l.isElement(R)))==null||e?R:R.contextElement||await(l.getDocumentElement==null?void 0:l.getDocumentElement(h.floating)),boundary:y,rootBoundary:x,strategy:p})),L=S==="floating"?{x:n,y:r,width:f.floating.width,height:f.floating.height}:f.reference,_=await(l.getOffsetParent==null?void 0:l.getOffsetParent(h.floating)),U=await(l.isElement==null?void 0:l.isElement(_))?await(l.getScale==null?void 0:l.getScale(_))||{x:1,y:1}:{x:1,y:1},$=p1(l.convertOffsetParentRelativeRectToViewportRelativeRect?await l.convertOffsetParentRelativeRectToViewportRelativeRect({elements:h,rect:L,offsetParent:_,strategy:p}):L);return{top:(N.top-$.top+M.top)/U.y,bottom:($.bottom-N.bottom+M.bottom)/U.y,left:(N.left-$.left+M.left)/U.x,right:($.right-N.right+M.right)/U.x}}const OP=async(s,t,e)=>{const{placement:n="bottom",strategy:r="absolute",middleware:l=[],platform:f}=e,h=l.filter(Boolean),p=await(f.isRTL==null?void 0:f.isRTL(t));let y=await f.getElementRects({reference:s,floating:t,strategy:r}),{x,y:S}=FO(y,n,p),w=n,T={},M=0;for(let R=0;R<h.length;R++){var D;const{name:N,fn:L}=h[R],{x:_,y:U,data:$,reset:Y}=await L({x,y:S,initialPlacement:n,placement:w,strategy:r,middlewareData:T,rects:y,platform:{...f,detectOverflow:(D=f.detectOverflow)!=null?D:MP},elements:{reference:s,floating:t}});x=_??x,S=U??S,T={...T,[N]:{...T[N],...$}},Y&&M<=50&&(M++,typeof Y=="object"&&(Y.placement&&(w=Y.placement),Y.rects&&(y=Y.rects===!0?await f.getElementRects({reference:s,floating:t,strategy:r}):Y.rects),{x,y:S}=FO(y,w,p)),R=-1)}return{x,y:S,placement:w,strategy:r,middlewareData:T}},DP=s=>({name:"arrow",options:s,async fn(t){const{x:e,y:n,placement:r,rects:l,platform:f,elements:h,middlewareData:p}=t,{element:y,padding:x=0}=Fl(s,t)||{};if(y==null)return{};const S=QO(x),w={x:e,y:n},T=kE(r),M=HE(T),D=await f.getDimensions(y),R=T==="y",N=R?"top":"left",L=R?"bottom":"right",_=R?"clientHeight":"clientWidth",U=l.reference[M]+l.reference[T]-w[T]-l.floating[M],$=w[T]-l.reference[T],Y=await(f.getOffsetParent==null?void 0:f.getOffsetParent(y));let k=Y?Y[_]:0;(!k||!await(f.isElement==null?void 0:f.isElement(Y)))&&(k=h.floating[_]||l.floating[M]);const H=U/2-$/2,J=k/2-D[M]/2-1,F=Au(S[N],J),ct=Au(S[L],J),lt=F,vt=k-D[M]-ct,Ot=k/2-D[M]/2+H,zt=PE(lt,Ot,vt),V=!p.arrow&&Ug(r)!=null&&Ot!==zt&&l.reference[M]/2-(Ot<lt?F:ct)-D[M]/2<0,ot=V?Ot<lt?Ot-lt:Ot-vt:0;return{[T]:w[T]+ot,data:{[T]:zt,centerOffset:Ot-zt-ot,...V&&{alignmentOffset:ot}},reset:V}}}),RP=function(s){return s===void 0&&(s={}),{name:"flip",options:s,async fn(t){var e,n;const{placement:r,middlewareData:l,rects:f,initialPlacement:h,platform:p,elements:y}=t,{mainAxis:x=!0,crossAxis:S=!0,fallbackPlacements:w,fallbackStrategy:T="bestFit",fallbackAxisSideDirection:M="none",flipAlignment:D=!0,...R}=Fl(s,t);if((e=l.arrow)!=null&&e.alignmentOffset)return{};const N=Jl(r),L=Ja(h),_=Jl(h)===h,U=await(p.isRTL==null?void 0:p.isRTL(y.floating)),$=w||(_||!D?[g1(h)]:SP(h)),Y=M!=="none";!w&&Y&&$.push(...AP(h,D,M,U));const k=[h,...$],H=await p.detectOverflow(t,R),J=[];let F=((n=l.flip)==null?void 0:n.overflows)||[];if(x&&J.push(H[N]),S){const Ot=xP(r,f,U);J.push(H[Ot[0]],H[Ot[1]])}if(F=[...F,{placement:r,overflows:J}],!J.every(Ot=>Ot<=0)){var ct,lt;const Ot=(((ct=l.flip)==null?void 0:ct.index)||0)+1,zt=k[Ot];if(zt&&(!(S==="alignment"?L!==Ja(zt):!1)||F.every(tt=>Ja(tt.placement)===L?tt.overflows[0]>0:!0)))return{data:{index:Ot,overflows:F},reset:{placement:zt}};let V=(lt=F.filter(ot=>ot.overflows[0]<=0).sort((ot,tt)=>ot.overflows[1]-tt.overflows[1])[0])==null?void 0:lt.placement;if(!V)switch(T){case"bestFit":{var vt;const ot=(vt=F.filter(tt=>{if(Y){const yt=Ja(tt.placement);return yt===L||yt==="y"}return!0}).map(tt=>[tt.placement,tt.overflows.filter(yt=>yt>0).reduce((yt,Mt)=>yt+Mt,0)]).sort((tt,yt)=>tt[1]-yt[1])[0])==null?void 0:vt[0];ot&&(V=ot);break}case"initialPlacement":V=h;break}if(r!==V)return{reset:{placement:V}}}return{}}}};function JO(s,t){return{top:s.top-t.height,right:s.right-t.width,bottom:s.bottom-t.height,left:s.left-t.width}}function KO(s){return mP.some(t=>s[t]>=0)}const zP=function(s){return s===void 0&&(s={}),{name:"hide",options:s,async fn(t){const{rects:e,platform:n}=t,{strategy:r="referenceHidden",...l}=Fl(s,t);switch(r){case"referenceHidden":{const f=await n.detectOverflow(t,{...l,elementContext:"reference"}),h=JO(f,e.reference);return{data:{referenceHiddenOffsets:h,referenceHidden:KO(h)}}}case"escaped":{const f=await n.detectOverflow(t,{...l,altBoundary:!0}),h=JO(f,e.floating);return{data:{escapedOffsets:h,escaped:KO(h)}}}default:return{}}}}},WO=new Set(["left","top"]);async function NP(s,t){const{placement:e,platform:n,elements:r}=s,l=await(n.isRTL==null?void 0:n.isRTL(r.floating)),f=Jl(e),h=Ug(e),p=Ja(e)==="y",y=WO.has(f)?-1:1,x=l&&p?-1:1,S=Fl(t,s);let{mainAxis:w,crossAxis:T,alignmentAxis:M}=typeof S=="number"?{mainAxis:S,crossAxis:0,alignmentAxis:null}:{mainAxis:S.mainAxis||0,crossAxis:S.crossAxis||0,alignmentAxis:S.alignmentAxis};return h&&typeof M=="number"&&(T=h==="end"?M*-1:M),p?{x:T*x,y:w*y}:{x:w*y,y:T*x}}const LP=function(s){return s===void 0&&(s=0),{name:"offset",options:s,async fn(t){var e,n;const{x:r,y:l,placement:f,middlewareData:h}=t,p=await NP(t,s);return f===((e=h.offset)==null?void 0:e.placement)&&(n=h.arrow)!=null&&n.alignmentOffset?{}:{x:r+p.x,y:l+p.y,data:{...p,placement:f}}}}},jP=function(s){return s===void 0&&(s={}),{name:"shift",options:s,async fn(t){const{x:e,y:n,placement:r,platform:l}=t,{mainAxis:f=!0,crossAxis:h=!1,limiter:p={fn:N=>{let{x:L,y:_}=N;return{x:L,y:_}}},...y}=Fl(s,t),x={x:e,y:n},S=await l.detectOverflow(t,y),w=Ja(Jl(r)),T=UE(w);let M=x[T],D=x[w];if(f){const N=T==="y"?"top":"left",L=T==="y"?"bottom":"right",_=M+S[N],U=M-S[L];M=PE(_,M,U)}if(h){const N=w==="y"?"top":"left",L=w==="y"?"bottom":"right",_=D+S[N],U=D-S[L];D=PE(_,D,U)}const R=p.fn({...t,[T]:M,[w]:D});return{...R,data:{x:R.x-e,y:R.y-n,enabled:{[T]:f,[w]:h}}}}}},_P=function(s){return s===void 0&&(s={}),{options:s,fn(t){const{x:e,y:n,placement:r,rects:l,middlewareData:f}=t,{offset:h=0,mainAxis:p=!0,crossAxis:y=!0}=Fl(s,t),x={x:e,y:n},S=Ja(r),w=UE(S);let T=x[w],M=x[S];const D=Fl(h,t),R=typeof D=="number"?{mainAxis:D,crossAxis:0}:{mainAxis:0,crossAxis:0,...D};if(p){const _=w==="y"?"height":"width",U=l.reference[w]-l.floating[_]+R.mainAxis,$=l.reference[w]+l.reference[_]-R.mainAxis;T<U?T=U:T>$&&(T=$)}if(y){var N,L;const _=w==="y"?"width":"height",U=WO.has(Jl(r)),$=l.reference[S]-l.floating[_]+(U&&((N=f.offset)==null?void 0:N[S])||0)+(U?0:R.crossAxis),Y=l.reference[S]+l.reference[_]+(U?0:((L=f.offset)==null?void 0:L[S])||0)-(U?R.crossAxis:0);M<$?M=$:M>Y&&(M=Y)}return{[w]:T,[S]:M}}}},BP=function(s){return s===void 0&&(s={}),{name:"size",options:s,async fn(t){var e,n;const{placement:r,rects:l,platform:f,elements:h}=t,{apply:p=()=>{},...y}=Fl(s,t),x=await f.detectOverflow(t,y),S=Jl(r),w=Ug(r),T=Ja(r)==="y",{width:M,height:D}=l.floating;let R,N;S==="top"||S==="bottom"?(R=S,N=w===(await(f.isRTL==null?void 0:f.isRTL(h.floating))?"start":"end")?"left":"right"):(N=S,R=w==="end"?"top":"bottom");const L=D-x.top-x.bottom,_=M-x.left-x.right,U=Au(D-x[R],L),$=Au(M-x[N],_),Y=!t.middlewareData.shift;let k=U,H=$;if((e=t.middlewareData.shift)!=null&&e.enabled.x&&(H=_),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(k=L),Y&&!w){const F=vo(x.left,0),ct=vo(x.right,0),lt=vo(x.top,0),vt=vo(x.bottom,0);T?H=M-2*(F!==0||ct!==0?F+ct:vo(x.left,x.right)):k=D-2*(lt!==0||vt!==0?lt+vt:vo(x.top,x.bottom))}await p({...t,availableWidth:H,availableHeight:k});const J=await f.getDimensions(h.floating);return M!==J.width||D!==J.height?{reset:{rects:!0}}:{}}}};function m1(){return typeof window<"u"}function Hg(s){return tD(s)?(s.nodeName||"").toLowerCase():"#document"}function xo(s){var t;return(s==null||(t=s.ownerDocument)==null?void 0:t.defaultView)||window}function Ka(s){var t;return(t=(tD(s)?s.ownerDocument:s.document)||window.document)==null?void 0:t.documentElement}function tD(s){return m1()?s instanceof Node||s instanceof xo(s).Node:!1}function oa(s){return m1()?s instanceof Element||s instanceof xo(s).Element:!1}function Wa(s){return m1()?s instanceof HTMLElement||s instanceof xo(s).HTMLElement:!1}function eD(s){return!m1()||typeof ShadowRoot>"u"?!1:s instanceof ShadowRoot||s instanceof xo(s).ShadowRoot}const PP=new Set(["inline","contents"]);function Iy(s){const{overflow:t,overflowX:e,overflowY:n,display:r}=ra(s);return/auto|scroll|overlay|hidden|clip/.test(t+n+e)&&!PP.has(r)}const UP=new Set(["table","td","th"]);function HP(s){return UP.has(Hg(s))}const kP=[":popover-open",":modal"];function y1(s){return kP.some(t=>{try{return s.matches(t)}catch{return!1}})}const VP=["transform","translate","scale","rotate","perspective"],GP=["transform","translate","scale","rotate","perspective","filter"],$P=["paint","layout","strict","content"];function GE(s){const t=$E(),e=oa(s)?ra(s):s;return VP.some(n=>e[n]?e[n]!=="none":!1)||(e.containerType?e.containerType!=="normal":!1)||!t&&(e.backdropFilter?e.backdropFilter!=="none":!1)||!t&&(e.filter?e.filter!=="none":!1)||GP.some(n=>(e.willChange||"").includes(n))||$P.some(n=>(e.contain||"").includes(n))}function qP(s){let t=Tu(s);for(;Wa(t)&&!kg(t);){if(GE(t))return t;if(y1(t))return null;t=Tu(t)}return null}function $E(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const YP=new Set(["html","body","#document"]);function kg(s){return YP.has(Hg(s))}function ra(s){return xo(s).getComputedStyle(s)}function b1(s){return oa(s)?{scrollLeft:s.scrollLeft,scrollTop:s.scrollTop}:{scrollLeft:s.scrollX,scrollTop:s.scrollY}}function Tu(s){if(Hg(s)==="html")return s;const t=s.assignedSlot||s.parentNode||eD(s)&&s.host||Ka(s);return eD(t)?t.host:t}function nD(s){const t=Tu(s);return kg(t)?s.ownerDocument?s.ownerDocument.body:s.body:Wa(t)&&Iy(t)?t:nD(t)}function Zy(s,t,e){var n;t===void 0&&(t=[]),e===void 0&&(e=!0);const r=nD(s),l=r===((n=s.ownerDocument)==null?void 0:n.body),f=xo(r);if(l){const h=qE(f);return t.concat(f,f.visualViewport||[],Iy(r)?r:[],h&&e?Zy(h):[])}return t.concat(r,Zy(r,[],e))}function qE(s){return s.parent&&Object.getPrototypeOf(s.parent)?s.frameElement:null}function iD(s){const t=ra(s);let e=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const r=Wa(s),l=r?s.offsetWidth:e,f=r?s.offsetHeight:n,h=h1(e)!==l||h1(n)!==f;return h&&(e=l,n=f),{width:e,height:n,$:h}}function YE(s){return oa(s)?s:s.contextElement}function Vg(s){const t=YE(s);if(!Wa(t))return Fa(1);const e=t.getBoundingClientRect(),{width:n,height:r,$:l}=iD(t);let f=(l?h1(e.width):e.width)/n,h=(l?h1(e.height):e.height)/r;return(!f||!Number.isFinite(f))&&(f=1),(!h||!Number.isFinite(h))&&(h=1),{x:f,y:h}}const XP=Fa(0);function sD(s){const t=xo(s);return!$E()||!t.visualViewport?XP:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function IP(s,t,e){return t===void 0&&(t=!1),!e||t&&e!==xo(s)?!1:t}function Ch(s,t,e,n){t===void 0&&(t=!1),e===void 0&&(e=!1);const r=s.getBoundingClientRect(),l=YE(s);let f=Fa(1);t&&(n?oa(n)&&(f=Vg(n)):f=Vg(s));const h=IP(l,e,n)?sD(l):Fa(0);let p=(r.left+h.x)/f.x,y=(r.top+h.y)/f.y,x=r.width/f.x,S=r.height/f.y;if(l){const w=xo(l),T=n&&oa(n)?xo(n):n;let M=w,D=qE(M);for(;D&&n&&T!==M;){const R=Vg(D),N=D.getBoundingClientRect(),L=ra(D),_=N.left+(D.clientLeft+parseFloat(L.paddingLeft))*R.x,U=N.top+(D.clientTop+parseFloat(L.paddingTop))*R.y;p*=R.x,y*=R.y,x*=R.x,S*=R.y,p+=_,y+=U,M=xo(D),D=qE(M)}}return p1({width:x,height:S,x:p,y})}function v1(s,t){const e=b1(s).scrollLeft;return t?t.left+e:Ch(Ka(s)).left+e}function oD(s,t){const e=s.getBoundingClientRect(),n=e.left+t.scrollLeft-v1(s,e),r=e.top+t.scrollTop;return{x:n,y:r}}function ZP(s){let{elements:t,rect:e,offsetParent:n,strategy:r}=s;const l=r==="fixed",f=Ka(n),h=t?y1(t.floating):!1;if(n===f||h&&l)return e;let p={scrollLeft:0,scrollTop:0},y=Fa(1);const x=Fa(0),S=Wa(n);if((S||!S&&!l)&&((Hg(n)!=="body"||Iy(f))&&(p=b1(n)),Wa(n))){const T=Ch(n);y=Vg(n),x.x=T.x+n.clientLeft,x.y=T.y+n.clientTop}const w=f&&!S&&!l?oD(f,p):Fa(0);return{width:e.width*y.x,height:e.height*y.y,x:e.x*y.x-p.scrollLeft*y.x+x.x+w.x,y:e.y*y.y-p.scrollTop*y.y+x.y+w.y}}function QP(s){return Array.from(s.getClientRects())}function FP(s){const t=Ka(s),e=b1(s),n=s.ownerDocument.body,r=vo(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),l=vo(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let f=-e.scrollLeft+v1(s);const h=-e.scrollTop;return ra(n).direction==="rtl"&&(f+=vo(t.clientWidth,n.clientWidth)-r),{width:r,height:l,x:f,y:h}}const rD=25;function JP(s,t){const e=xo(s),n=Ka(s),r=e.visualViewport;let l=n.clientWidth,f=n.clientHeight,h=0,p=0;if(r){l=r.width,f=r.height;const x=$E();(!x||x&&t==="fixed")&&(h=r.offsetLeft,p=r.offsetTop)}const y=v1(n);if(y<=0){const x=n.ownerDocument,S=x.body,w=getComputedStyle(S),T=x.compatMode==="CSS1Compat"&&parseFloat(w.marginLeft)+parseFloat(w.marginRight)||0,M=Math.abs(n.clientWidth-S.clientWidth-T);M<=rD&&(l-=M)}else y<=rD&&(l+=y);return{width:l,height:f,x:h,y:p}}const KP=new Set(["absolute","fixed"]);function WP(s,t){const e=Ch(s,!0,t==="fixed"),n=e.top+s.clientTop,r=e.left+s.clientLeft,l=Wa(s)?Vg(s):Fa(1),f=s.clientWidth*l.x,h=s.clientHeight*l.y,p=r*l.x,y=n*l.y;return{width:f,height:h,x:p,y}}function aD(s,t,e){let n;if(t==="viewport")n=JP(s,e);else if(t==="document")n=FP(Ka(s));else if(oa(t))n=WP(t,e);else{const r=sD(s);n={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return p1(n)}function lD(s,t){const e=Tu(s);return e===t||!oa(e)||kg(e)?!1:ra(e).position==="fixed"||lD(e,t)}function tU(s,t){const e=t.get(s);if(e)return e;let n=Zy(s,[],!1).filter(h=>oa(h)&&Hg(h)!=="body"),r=null;const l=ra(s).position==="fixed";let f=l?Tu(s):s;for(;oa(f)&&!kg(f);){const h=ra(f),p=GE(f);!p&&h.position==="fixed"&&(r=null),(l?!p&&!r:!p&&h.position==="static"&&!!r&&KP.has(r.position)||Iy(f)&&!p&&lD(s,f))?n=n.filter(x=>x!==f):r=h,f=Tu(f)}return t.set(s,n),n}function eU(s){let{element:t,boundary:e,rootBoundary:n,strategy:r}=s;const f=[...e==="clippingAncestors"?y1(t)?[]:tU(t,this._c):[].concat(e),n],h=f[0],p=f.reduce((y,x)=>{const S=aD(t,x,r);return y.top=vo(S.top,y.top),y.right=Au(S.right,y.right),y.bottom=Au(S.bottom,y.bottom),y.left=vo(S.left,y.left),y},aD(t,h,r));return{width:p.right-p.left,height:p.bottom-p.top,x:p.left,y:p.top}}function nU(s){const{width:t,height:e}=iD(s);return{width:t,height:e}}function iU(s,t,e){const n=Wa(t),r=Ka(t),l=e==="fixed",f=Ch(s,!0,l,t);let h={scrollLeft:0,scrollTop:0};const p=Fa(0);function y(){p.x=v1(r)}if(n||!n&&!l)if((Hg(t)!=="body"||Iy(r))&&(h=b1(t)),n){const T=Ch(t,!0,l,t);p.x=T.x+t.clientLeft,p.y=T.y+t.clientTop}else r&&y();l&&!n&&r&&y();const x=r&&!n&&!l?oD(r,h):Fa(0),S=f.left+h.scrollLeft-p.x-x.x,w=f.top+h.scrollTop-p.y-x.y;return{x:S,y:w,width:f.width,height:f.height}}function XE(s){return ra(s).position==="static"}function cD(s,t){if(!Wa(s)||ra(s).position==="fixed")return null;if(t)return t(s);let e=s.offsetParent;return Ka(s)===e&&(e=e.ownerDocument.body),e}function uD(s,t){const e=xo(s);if(y1(s))return e;if(!Wa(s)){let r=Tu(s);for(;r&&!kg(r);){if(oa(r)&&!XE(r))return r;r=Tu(r)}return e}let n=cD(s,t);for(;n&&HP(n)&&XE(n);)n=cD(n,t);return n&&kg(n)&&XE(n)&&!GE(n)?e:n||qP(s)||e}const sU=async function(s){const t=this.getOffsetParent||uD,e=this.getDimensions,n=await e(s.floating);return{reference:iU(s.reference,await t(s.floating),s.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function oU(s){return ra(s).direction==="rtl"}const rU={convertOffsetParentRelativeRectToViewportRelativeRect:ZP,getDocumentElement:Ka,getClippingRect:eU,getOffsetParent:uD,getElementRects:sU,getClientRects:QP,getDimensions:nU,getScale:Vg,isElement:oa,isRTL:oU};function fD(s,t){return s.x===t.x&&s.y===t.y&&s.width===t.width&&s.height===t.height}function aU(s,t){let e=null,n;const r=Ka(s);function l(){var h;clearTimeout(n),(h=e)==null||h.disconnect(),e=null}function f(h,p){h===void 0&&(h=!1),p===void 0&&(p=1),l();const y=s.getBoundingClientRect(),{left:x,top:S,width:w,height:T}=y;if(h||t(),!w||!T)return;const M=d1(S),D=d1(r.clientWidth-(x+w)),R=d1(r.clientHeight-(S+T)),N=d1(x),_={rootMargin:-M+"px "+-D+"px "+-R+"px "+-N+"px",threshold:vo(0,Au(1,p))||1};let U=!0;function $(Y){const k=Y[0].intersectionRatio;if(k!==p){if(!U)return f();k?f(!1,k):n=setTimeout(()=>{f(!1,1e-7)},1e3)}k===1&&!fD(y,s.getBoundingClientRect())&&f(),U=!1}try{e=new IntersectionObserver($,{..._,root:r.ownerDocument})}catch{e=new IntersectionObserver($,_)}e.observe(s)}return f(!0),l}function lU(s,t,e,n){n===void 0&&(n={});const{ancestorScroll:r=!0,ancestorResize:l=!0,elementResize:f=typeof ResizeObserver=="function",layoutShift:h=typeof IntersectionObserver=="function",animationFrame:p=!1}=n,y=YE(s),x=r||l?[...y?Zy(y):[],...Zy(t)]:[];x.forEach(N=>{r&&N.addEventListener("scroll",e,{passive:!0}),l&&N.addEventListener("resize",e)});const S=y&&h?aU(y,e):null;let w=-1,T=null;f&&(T=new ResizeObserver(N=>{let[L]=N;L&&L.target===y&&T&&(T.unobserve(t),cancelAnimationFrame(w),w=requestAnimationFrame(()=>{var _;(_=T)==null||_.observe(t)})),e()}),y&&!p&&T.observe(y),T.observe(t));let M,D=p?Ch(s):null;p&&R();function R(){const N=Ch(s);D&&!fD(D,N)&&e(),D=N,M=requestAnimationFrame(R)}return e(),()=>{var N;x.forEach(L=>{r&&L.removeEventListener("scroll",e),l&&L.removeEventListener("resize",e)}),S==null||S(),(N=T)==null||N.disconnect(),T=null,p&&cancelAnimationFrame(M)}}const cU=LP,uU=jP,fU=RP,hU=BP,dU=zP,hD=DP,gU=_P,pU=(s,t,e)=>{const n=new Map,r={platform:rU,...e},l={...r.platform,_c:n};return OP(s,t,{...r,platform:l})};var mU=typeof document<"u",yU=function(){},x1=mU?Yt.useLayoutEffect:yU;function S1(s,t){if(s===t)return!0;if(typeof s!=typeof t)return!1;if(typeof s=="function"&&s.toString()===t.toString())return!0;let e,n,r;if(s&&t&&typeof s=="object"){if(Array.isArray(s)){if(e=s.length,e!==t.length)return!1;for(n=e;n--!==0;)if(!S1(s[n],t[n]))return!1;return!0}if(r=Object.keys(s),e=r.length,e!==Object.keys(t).length)return!1;for(n=e;n--!==0;)if(!{}.hasOwnProperty.call(t,r[n]))return!1;for(n=e;n--!==0;){const l=r[n];if(!(l==="_owner"&&s.$$typeof)&&!S1(s[l],t[l]))return!1}return!0}return s!==s&&t!==t}function dD(s){return typeof window>"u"?1:(s.ownerDocument.defaultView||window).devicePixelRatio||1}function gD(s,t){const e=dD(s);return Math.round(t*e)/e}function IE(s){const t=q.useRef(s);return x1(()=>{t.current=s}),t}function bU(s){s===void 0&&(s={});const{placement:t="bottom",strategy:e="absolute",middleware:n=[],platform:r,elements:{reference:l,floating:f}={},transform:h=!0,whileElementsMounted:p,open:y}=s,[x,S]=q.useState({x:0,y:0,strategy:e,placement:t,middlewareData:{},isPositioned:!1}),[w,T]=q.useState(n);S1(w,n)||T(n);const[M,D]=q.useState(null),[R,N]=q.useState(null),L=q.useCallback(tt=>{tt!==Y.current&&(Y.current=tt,D(tt))},[]),_=q.useCallback(tt=>{tt!==k.current&&(k.current=tt,N(tt))},[]),U=l||M,$=f||R,Y=q.useRef(null),k=q.useRef(null),H=q.useRef(x),J=p!=null,F=IE(p),ct=IE(r),lt=IE(y),vt=q.useCallback(()=>{if(!Y.current||!k.current)return;const tt={placement:t,strategy:e,middleware:w};ct.current&&(tt.platform=ct.current),pU(Y.current,k.current,tt).then(yt=>{const Mt={...yt,isPositioned:lt.current!==!1};Ot.current&&!S1(H.current,Mt)&&(H.current=Mt,N2.flushSync(()=>{S(Mt)}))})},[w,t,e,ct,lt]);x1(()=>{y===!1&&H.current.isPositioned&&(H.current.isPositioned=!1,S(tt=>({...tt,isPositioned:!1})))},[y]);const Ot=q.useRef(!1);x1(()=>(Ot.current=!0,()=>{Ot.current=!1}),[]),x1(()=>{if(U&&(Y.current=U),$&&(k.current=$),U&&$){if(F.current)return F.current(U,$,vt);vt()}},[U,$,vt,F,J]);const zt=q.useMemo(()=>({reference:Y,floating:k,setReference:L,setFloating:_}),[L,_]),V=q.useMemo(()=>({reference:U,floating:$}),[U,$]),ot=q.useMemo(()=>{const tt={position:e,left:0,top:0};if(!V.floating)return tt;const yt=gD(V.floating,x.x),Mt=gD(V.floating,x.y);return h?{...tt,transform:"translate("+yt+"px, "+Mt+"px)",...dD(V.floating)>=1.5&&{willChange:"transform"}}:{position:e,left:yt,top:Mt}},[e,h,V.floating,x.x,x.y]);return q.useMemo(()=>({...x,update:vt,refs:zt,elements:V,floatingStyles:ot}),[x,vt,zt,V,ot])}const vU=s=>{function t(e){return{}.hasOwnProperty.call(e,"current")}return{name:"arrow",options:s,fn(e){const{element:n,padding:r}=typeof s=="function"?s(e):s;return n&&t(n)?n.current!=null?hD({element:n.current,padding:r}).fn(e):{}:n?hD({element:n,padding:r}).fn(e):{}}}},xU=(s,t)=>({...cU(s),options:[s,t]}),SU=(s,t)=>({...uU(s),options:[s,t]}),wU=(s,t)=>({...gU(s),options:[s,t]}),CU=(s,t)=>({...fU(s),options:[s,t]}),EU=(s,t)=>({...hU(s),options:[s,t]}),AU=(s,t)=>({...dU(s),options:[s,t]}),TU=(s,t)=>({...vU(s),options:[s,t]});var MU="Arrow",pD=q.forwardRef((s,t)=>{const{children:e,width:n=10,height:r=5,...l}=s;return W.jsx(Xn.svg,{...l,ref:t,width:n,height:r,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:s.asChild?e:W.jsx("polygon",{points:"0,0 30,0 15,10"})})});pD.displayName=MU;var OU=pD,ZE="Popper",[mD,yD]=Lg(ZE),[DU,bD]=mD(ZE),vD=s=>{const{__scopePopper:t,children:e}=s,[n,r]=q.useState(null);return W.jsx(DU,{scope:t,anchor:n,onAnchorChange:r,children:e})};vD.displayName=ZE;var xD="PopperAnchor",SD=q.forwardRef((s,t)=>{const{__scopePopper:e,virtualRef:n,...r}=s,l=bD(xD,e),f=q.useRef(null),h=Gi(t,f),p=q.useRef(null);return q.useEffect(()=>{const y=p.current;p.current=(n==null?void 0:n.current)||f.current,y!==p.current&&l.onAnchorChange(p.current)}),n?null:W.jsx(Xn.div,{...r,ref:h})});SD.displayName=xD;var QE="PopperContent",[RU,zU]=mD(QE),wD=q.forwardRef((s,t)=>{var Rt,ue,fe,Be,Lt,Xi;const{__scopePopper:e,side:n="bottom",sideOffset:r=0,align:l="center",alignOffset:f=0,arrowPadding:h=0,avoidCollisions:p=!0,collisionBoundary:y=[],collisionPadding:x=0,sticky:S="partial",hideWhenDetached:w=!1,updatePositionStrategy:T="optimized",onPlaced:M,...D}=s,R=bD(QE,e),[N,L]=q.useState(null),_=Gi(t,Co=>L(Co)),[U,$]=q.useState(null),Y=pP(U),k=(Y==null?void 0:Y.width)??0,H=(Y==null?void 0:Y.height)??0,J=n+(l!=="center"?"-"+l:""),F=typeof x=="number"?x:{top:0,right:0,bottom:0,left:0,...x},ct=Array.isArray(y)?y:[y],lt=ct.length>0,vt={padding:F,boundary:ct.filter(LU),altBoundary:lt},{refs:Ot,floatingStyles:zt,placement:V,isPositioned:ot,middlewareData:tt}=bU({strategy:"fixed",placement:J,whileElementsMounted:(...Co)=>lU(...Co,{animationFrame:T==="always"}),elements:{reference:R.anchor},middleware:[xU({mainAxis:r+H,alignmentAxis:f}),p&&SU({mainAxis:!0,crossAxis:!1,limiter:S==="partial"?wU():void 0,...vt}),p&&CU({...vt}),EU({...vt,apply:({elements:Co,rects:Os,availableWidth:ma,availableHeight:qe})=>{const{width:Gh,height:Vu}=Os.reference,rl=Co.floating.style;rl.setProperty("--radix-popper-available-width",`${ma}px`),rl.setProperty("--radix-popper-available-height",`${qe}px`),rl.setProperty("--radix-popper-anchor-width",`${Gh}px`),rl.setProperty("--radix-popper-anchor-height",`${Vu}px`)}}),U&&TU({element:U,padding:h}),jU({arrowWidth:k,arrowHeight:H}),w&&AU({strategy:"referenceHidden",...vt})]}),[yt,Mt]=AD(V),nt=Za(M);wu(()=>{ot&&(nt==null||nt())},[ot,nt]);const St=(Rt=tt.arrow)==null?void 0:Rt.x,Tt=(ue=tt.arrow)==null?void 0:ue.y,Et=((fe=tt.arrow)==null?void 0:fe.centerOffset)!==0,[Ht,ce]=q.useState();return wu(()=>{N&&ce(window.getComputedStyle(N).zIndex)},[N]),W.jsx("div",{ref:Ot.setFloating,"data-radix-popper-content-wrapper":"",style:{...zt,transform:ot?zt.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Ht,"--radix-popper-transform-origin":[(Be=tt.transformOrigin)==null?void 0:Be.x,(Lt=tt.transformOrigin)==null?void 0:Lt.y].join(" "),...((Xi=tt.hide)==null?void 0:Xi.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:s.dir,children:W.jsx(RU,{scope:e,placedSide:yt,onArrowChange:$,arrowX:St,arrowY:Tt,shouldHideArrow:Et,children:W.jsx(Xn.div,{"data-side":yt,"data-align":Mt,...D,ref:_,style:{...D.style,animation:ot?void 0:"none"}})})})});wD.displayName=QE;var CD="PopperArrow",NU={top:"bottom",right:"left",bottom:"top",left:"right"},ED=q.forwardRef(function(t,e){const{__scopePopper:n,...r}=t,l=zU(CD,n),f=NU[l.placedSide];return W.jsx("span",{ref:l.onArrowChange,style:{position:"absolute",left:l.arrowX,top:l.arrowY,[f]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[l.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[l.placedSide],visibility:l.shouldHideArrow?"hidden":void 0},children:W.jsx(OU,{...r,ref:e,style:{...r.style,display:"block"}})})});ED.displayName=CD;function LU(s){return s!==null}var jU=s=>({name:"transformOrigin",options:s,fn(t){var R,N,L;const{placement:e,rects:n,middlewareData:r}=t,f=((R=r.arrow)==null?void 0:R.centerOffset)!==0,h=f?0:s.arrowWidth,p=f?0:s.arrowHeight,[y,x]=AD(e),S={start:"0%",center:"50%",end:"100%"}[x],w=(((N=r.arrow)==null?void 0:N.x)??0)+h/2,T=(((L=r.arrow)==null?void 0:L.y)??0)+p/2;let M="",D="";return y==="bottom"?(M=f?S:`${w}px`,D=`${-p}px`):y==="top"?(M=f?S:`${w}px`,D=`${n.floating.height+p}px`):y==="right"?(M=`${-p}px`,D=f?S:`${T}px`):y==="left"&&(M=`${n.floating.width+p}px`,D=f?S:`${T}px`),{data:{x:M,y:D}}}});function AD(s){const[t,e="center"]=s.split("-");return[t,e]}var _U=vD,BU=SD,PU=wD,UU=ED,FE="rovingFocusGroup.onEntryFocus",HU={bubbles:!1,cancelable:!0},Qy="RovingFocusGroup",[JE,TD,kU]=aO(Qy),[VU,MD]=Lg(Qy,[kU]),[GU,$U]=VU(Qy),OD=q.forwardRef((s,t)=>W.jsx(JE.Provider,{scope:s.__scopeRovingFocusGroup,children:W.jsx(JE.Slot,{scope:s.__scopeRovingFocusGroup,children:W.jsx(qU,{...s,ref:t})})}));OD.displayName=Qy;var qU=q.forwardRef((s,t)=>{const{__scopeRovingFocusGroup:e,orientation:n,loop:r=!1,dir:l,currentTabStopId:f,defaultCurrentTabStopId:h,onCurrentTabStopIdChange:p,onEntryFocus:y,preventScrollOnEntryFocus:x=!1,...S}=s,w=q.useRef(null),T=Gi(t,w),M=lO(l),[D,R]=bE({prop:f,defaultProp:h??null,onChange:p,caller:Qy}),[N,L]=q.useState(!1),_=Za(y),U=TD(e),$=q.useRef(!1),[Y,k]=q.useState(0);return q.useEffect(()=>{const H=w.current;if(H)return H.addEventListener(FE,_),()=>H.removeEventListener(FE,_)},[_]),W.jsx(GU,{scope:e,orientation:n,dir:M,loop:r,currentTabStopId:D,onItemFocus:q.useCallback(H=>R(H),[R]),onItemShiftTab:q.useCallback(()=>L(!0),[]),onFocusableItemAdd:q.useCallback(()=>k(H=>H+1),[]),onFocusableItemRemove:q.useCallback(()=>k(H=>H-1),[]),children:W.jsx(Xn.div,{tabIndex:N||Y===0?-1:0,"data-orientation":n,...S,ref:T,style:{outline:"none",...s.style},onMouseDown:ve(s.onMouseDown,()=>{$.current=!0}),onFocus:ve(s.onFocus,H=>{const J=!$.current;if(H.target===H.currentTarget&&J&&!N){const F=new CustomEvent(FE,HU);if(H.currentTarget.dispatchEvent(F),!F.defaultPrevented){const ct=U().filter(V=>V.focusable),lt=ct.find(V=>V.active),vt=ct.find(V=>V.id===D),zt=[lt,vt,...ct].filter(Boolean).map(V=>V.ref.current);zD(zt,x)}}$.current=!1}),onBlur:ve(s.onBlur,()=>L(!1))})})}),DD="RovingFocusGroupItem",RD=q.forwardRef((s,t)=>{const{__scopeRovingFocusGroup:e,focusable:n=!0,active:r=!1,tabStopId:l,children:f,...h}=s,p=n1(),y=l||p,x=$U(DD,e),S=x.currentTabStopId===y,w=TD(e),{onFocusableItemAdd:T,onFocusableItemRemove:M,currentTabStopId:D}=x;return q.useEffect(()=>{if(n)return T(),()=>M()},[n,T,M]),W.jsx(JE.ItemSlot,{scope:e,id:y,focusable:n,active:r,children:W.jsx(Xn.span,{tabIndex:S?0:-1,"data-orientation":x.orientation,...h,ref:t,onMouseDown:ve(s.onMouseDown,R=>{n?x.onItemFocus(y):R.preventDefault()}),onFocus:ve(s.onFocus,()=>x.onItemFocus(y)),onKeyDown:ve(s.onKeyDown,R=>{if(R.key==="Tab"&&R.shiftKey){x.onItemShiftTab();return}if(R.target!==R.currentTarget)return;const N=IU(R,x.orientation,x.dir);if(N!==void 0){if(R.metaKey||R.ctrlKey||R.altKey||R.shiftKey)return;R.preventDefault();let _=w().filter(U=>U.focusable).map(U=>U.ref.current);if(N==="last")_.reverse();else if(N==="prev"||N==="next"){N==="prev"&&_.reverse();const U=_.indexOf(R.currentTarget);_=x.loop?ZU(_,U+1):_.slice(U+1)}setTimeout(()=>zD(_))}}),children:typeof f=="function"?f({isCurrentTabStop:S,hasTabStop:D!=null}):f})})});RD.displayName=DD;var YU={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function XU(s,t){return t!=="rtl"?s:s==="ArrowLeft"?"ArrowRight":s==="ArrowRight"?"ArrowLeft":s}function IU(s,t,e){const n=XU(s.key,e);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return YU[n]}function zD(s,t=!1){const e=document.activeElement;for(const n of s)if(n===e||(n.focus({preventScroll:t}),document.activeElement!==e))return}function ZU(s,t){return s.map((e,n)=>s[(t+n)%s.length])}var QU=OD,FU=RD,KE=["Enter"," "],JU=["ArrowDown","PageUp","Home"],ND=["ArrowUp","PageDown","End"],KU=[...JU,...ND],WU={ltr:[...KE,"ArrowRight"],rtl:[...KE,"ArrowLeft"]},tH={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Fy="Menu",[Jy,eH,nH]=aO(Fy),[Eh,LD]=Lg(Fy,[nH,yD,MD]),w1=yD(),jD=MD(),[iH,Ah]=Eh(Fy),[sH,Ky]=Eh(Fy),_D=s=>{const{__scopeMenu:t,open:e=!1,children:n,dir:r,onOpenChange:l,modal:f=!0}=s,h=w1(t),[p,y]=q.useState(null),x=q.useRef(!1),S=Za(l),w=lO(r);return q.useEffect(()=>{const T=()=>{x.current=!0,document.addEventListener("pointerdown",M,{capture:!0,once:!0}),document.addEventListener("pointermove",M,{capture:!0,once:!0})},M=()=>x.current=!1;return document.addEventListener("keydown",T,{capture:!0}),()=>{document.removeEventListener("keydown",T,{capture:!0}),document.removeEventListener("pointerdown",M,{capture:!0}),document.removeEventListener("pointermove",M,{capture:!0})}},[]),W.jsx(_U,{...h,children:W.jsx(iH,{scope:t,open:e,onOpenChange:S,content:p,onContentChange:y,children:W.jsx(sH,{scope:t,onClose:q.useCallback(()=>S(!1),[S]),isUsingKeyboardRef:x,dir:w,modal:f,children:n})})})};_D.displayName=Fy;var oH="MenuAnchor",WE=q.forwardRef((s,t)=>{const{__scopeMenu:e,...n}=s,r=w1(e);return W.jsx(BU,{...r,...n,ref:t})});WE.displayName=oH;var tA="MenuPortal",[rH,BD]=Eh(tA,{forceMount:void 0}),PD=s=>{const{__scopeMenu:t,forceMount:e,children:n,container:r}=s,l=Ah(tA,t);return W.jsx(rH,{scope:t,forceMount:e,children:W.jsx(Cu,{present:e||l.open,children:W.jsx(EE,{asChild:!0,container:r,children:n})})})};PD.displayName=tA;var nr="MenuContent",[aH,eA]=Eh(nr),UD=q.forwardRef((s,t)=>{const e=BD(nr,s.__scopeMenu),{forceMount:n=e.forceMount,...r}=s,l=Ah(nr,s.__scopeMenu),f=Ky(nr,s.__scopeMenu);return W.jsx(Jy.Provider,{scope:s.__scopeMenu,children:W.jsx(Cu,{present:n||l.open,children:W.jsx(Jy.Slot,{scope:s.__scopeMenu,children:f.modal?W.jsx(lH,{...r,ref:t}):W.jsx(cH,{...r,ref:t})})})})}),lH=q.forwardRef((s,t)=>{const e=Ah(nr,s.__scopeMenu),n=q.useRef(null),r=Gi(t,n);return q.useEffect(()=>{const l=n.current;if(l)return NO(l)},[]),W.jsx(nA,{...s,ref:r,trapFocus:e.open,disableOutsidePointerEvents:e.open,disableOutsideScroll:!0,onFocusOutside:ve(s.onFocusOutside,l=>l.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>e.onOpenChange(!1)})}),cH=q.forwardRef((s,t)=>{const e=Ah(nr,s.__scopeMenu);return W.jsx(nA,{...s,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>e.onOpenChange(!1)})}),uH=Ng("MenuContent.ScrollLock"),nA=q.forwardRef((s,t)=>{const{__scopeMenu:e,loop:n=!1,trapFocus:r,onOpenAutoFocus:l,onCloseAutoFocus:f,disableOutsidePointerEvents:h,onEntryFocus:p,onEscapeKeyDown:y,onPointerDownOutside:x,onFocusOutside:S,onInteractOutside:w,onDismiss:T,disableOutsideScroll:M,...D}=s,R=Ah(nr,e),N=Ky(nr,e),L=w1(e),_=jD(e),U=eH(e),[$,Y]=q.useState(null),k=q.useRef(null),H=Gi(t,k,R.onContentChange),J=q.useRef(0),F=q.useRef(""),ct=q.useRef(0),lt=q.useRef(null),vt=q.useRef("right"),Ot=q.useRef(0),zt=M?zE:q.Fragment,V=M?{as:uH,allowPinchZoom:!0}:void 0,ot=yt=>{var Rt,ue;const Mt=F.current+yt,nt=U().filter(fe=>!fe.disabled),St=document.activeElement,Tt=(Rt=nt.find(fe=>fe.ref.current===St))==null?void 0:Rt.textValue,Et=nt.map(fe=>fe.textValue),Ht=wH(Et,Mt,Tt),ce=(ue=nt.find(fe=>fe.textValue===Ht))==null?void 0:ue.ref.current;(function fe(Be){F.current=Be,window.clearTimeout(J.current),Be!==""&&(J.current=window.setTimeout(()=>fe(""),1e3))})(Mt),ce&&setTimeout(()=>ce.focus())};q.useEffect(()=>()=>window.clearTimeout(J.current),[]),bO();const tt=q.useCallback(yt=>{var nt,St;return vt.current===((nt=lt.current)==null?void 0:nt.side)&&EH(yt,(St=lt.current)==null?void 0:St.area)},[]);return W.jsx(aH,{scope:e,searchRef:F,onItemEnter:q.useCallback(yt=>{tt(yt)&&yt.preventDefault()},[tt]),onItemLeave:q.useCallback(yt=>{var Mt;tt(yt)||((Mt=k.current)==null||Mt.focus(),Y(null))},[tt]),onTriggerLeave:q.useCallback(yt=>{tt(yt)&&yt.preventDefault()},[tt]),pointerGraceTimerRef:ct,onPointerGraceIntentChange:q.useCallback(yt=>{lt.current=yt},[]),children:W.jsx(zt,{...V,children:W.jsx(CE,{asChild:!0,trapped:r,onMountAutoFocus:ve(l,yt=>{var Mt;yt.preventDefault(),(Mt=k.current)==null||Mt.focus({preventScroll:!0})}),onUnmountAutoFocus:f,children:W.jsx(xE,{asChild:!0,disableOutsidePointerEvents:h,onEscapeKeyDown:y,onPointerDownOutside:x,onFocusOutside:S,onInteractOutside:w,onDismiss:T,children:W.jsx(QU,{asChild:!0,..._,dir:N.dir,orientation:"vertical",loop:n,currentTabStopId:$,onCurrentTabStopIdChange:Y,onEntryFocus:ve(p,yt=>{N.isUsingKeyboardRef.current||yt.preventDefault()}),preventScrollOnEntryFocus:!0,children:W.jsx(PU,{role:"menu","aria-orientation":"vertical","data-state":eR(R.open),"data-radix-menu-content":"",dir:N.dir,...L,...D,ref:H,style:{outline:"none",...D.style},onKeyDown:ve(D.onKeyDown,yt=>{const nt=yt.target.closest("[data-radix-menu-content]")===yt.currentTarget,St=yt.ctrlKey||yt.altKey||yt.metaKey,Tt=yt.key.length===1;nt&&(yt.key==="Tab"&&yt.preventDefault(),!St&&Tt&&ot(yt.key));const Et=k.current;if(yt.target!==Et||!KU.includes(yt.key))return;yt.preventDefault();const ce=U().filter(Rt=>!Rt.disabled).map(Rt=>Rt.ref.current);ND.includes(yt.key)&&ce.reverse(),xH(ce)}),onBlur:ve(s.onBlur,yt=>{yt.currentTarget.contains(yt.target)||(window.clearTimeout(J.current),F.current="")}),onPointerMove:ve(s.onPointerMove,tb(yt=>{const Mt=yt.target,nt=Ot.current!==yt.clientX;if(yt.currentTarget.contains(Mt)&&nt){const St=yt.clientX>Ot.current?"right":"left";vt.current=St,Ot.current=yt.clientX}}))})})})})})})});UD.displayName=nr;var fH="MenuGroup",iA=q.forwardRef((s,t)=>{const{__scopeMenu:e,...n}=s;return W.jsx(Xn.div,{role:"group",...n,ref:t})});iA.displayName=fH;var hH="MenuLabel",HD=q.forwardRef((s,t)=>{const{__scopeMenu:e,...n}=s;return W.jsx(Xn.div,{...n,ref:t})});HD.displayName=hH;var C1="MenuItem",kD="menu.itemSelect",E1=q.forwardRef((s,t)=>{const{disabled:e=!1,onSelect:n,...r}=s,l=q.useRef(null),f=Ky(C1,s.__scopeMenu),h=eA(C1,s.__scopeMenu),p=Gi(t,l),y=q.useRef(!1),x=()=>{const S=l.current;if(!e&&S){const w=new CustomEvent(kD,{bubbles:!0,cancelable:!0});S.addEventListener(kD,T=>n==null?void 0:n(T),{once:!0}),rO(S,w),w.defaultPrevented?y.current=!1:f.onClose()}};return W.jsx(VD,{...r,ref:p,disabled:e,onClick:ve(s.onClick,x),onPointerDown:S=>{var w;(w=s.onPointerDown)==null||w.call(s,S),y.current=!0},onPointerUp:ve(s.onPointerUp,S=>{var w;y.current||(w=S.currentTarget)==null||w.click()}),onKeyDown:ve(s.onKeyDown,S=>{const w=h.searchRef.current!=="";e||w&&S.key===" "||KE.includes(S.key)&&(S.currentTarget.click(),S.preventDefault())})})});E1.displayName=C1;var VD=q.forwardRef((s,t)=>{const{__scopeMenu:e,disabled:n=!1,textValue:r,...l}=s,f=eA(C1,e),h=jD(e),p=q.useRef(null),y=Gi(t,p),[x,S]=q.useState(!1),[w,T]=q.useState("");return q.useEffect(()=>{const M=p.current;M&&T((M.textContent??"").trim())},[l.children]),W.jsx(Jy.ItemSlot,{scope:e,disabled:n,textValue:r??w,children:W.jsx(FU,{asChild:!0,...h,focusable:!n,children:W.jsx(Xn.div,{role:"menuitem","data-highlighted":x?"":void 0,"aria-disabled":n||void 0,"data-disabled":n?"":void 0,...l,ref:y,onPointerMove:ve(s.onPointerMove,tb(M=>{n?f.onItemLeave(M):(f.onItemEnter(M),M.defaultPrevented||M.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:ve(s.onPointerLeave,tb(M=>f.onItemLeave(M))),onFocus:ve(s.onFocus,()=>S(!0)),onBlur:ve(s.onBlur,()=>S(!1))})})})}),dH="MenuCheckboxItem",GD=q.forwardRef((s,t)=>{const{checked:e=!1,onCheckedChange:n,...r}=s;return W.jsx(ID,{scope:s.__scopeMenu,checked:e,children:W.jsx(E1,{role:"menuitemcheckbox","aria-checked":A1(e)?"mixed":e,...r,ref:t,"data-state":oA(e),onSelect:ve(r.onSelect,()=>n==null?void 0:n(A1(e)?!0:!e),{checkForDefaultPrevented:!1})})})});GD.displayName=dH;var $D="MenuRadioGroup",[gH,pH]=Eh($D,{value:void 0,onValueChange:()=>{}}),qD=q.forwardRef((s,t)=>{const{value:e,onValueChange:n,...r}=s,l=Za(n);return W.jsx(gH,{scope:s.__scopeMenu,value:e,onValueChange:l,children:W.jsx(iA,{...r,ref:t})})});qD.displayName=$D;var YD="MenuRadioItem",XD=q.forwardRef((s,t)=>{const{value:e,...n}=s,r=pH(YD,s.__scopeMenu),l=e===r.value;return W.jsx(ID,{scope:s.__scopeMenu,checked:l,children:W.jsx(E1,{role:"menuitemradio","aria-checked":l,...n,ref:t,"data-state":oA(l),onSelect:ve(n.onSelect,()=>{var f;return(f=r.onValueChange)==null?void 0:f.call(r,e)},{checkForDefaultPrevented:!1})})})});XD.displayName=YD;var sA="MenuItemIndicator",[ID,mH]=Eh(sA,{checked:!1}),ZD=q.forwardRef((s,t)=>{const{__scopeMenu:e,forceMount:n,...r}=s,l=mH(sA,e);return W.jsx(Cu,{present:n||A1(l.checked)||l.checked===!0,children:W.jsx(Xn.span,{...r,ref:t,"data-state":oA(l.checked)})})});ZD.displayName=sA;var yH="MenuSeparator",QD=q.forwardRef((s,t)=>{const{__scopeMenu:e,...n}=s;return W.jsx(Xn.div,{role:"separator","aria-orientation":"horizontal",...n,ref:t})});QD.displayName=yH;var bH="MenuArrow",FD=q.forwardRef((s,t)=>{const{__scopeMenu:e,...n}=s,r=w1(e);return W.jsx(UU,{...r,...n,ref:t})});FD.displayName=bH;var vH="MenuSub",[ztt,JD]=Eh(vH),Wy="MenuSubTrigger",KD=q.forwardRef((s,t)=>{const e=Ah(Wy,s.__scopeMenu),n=Ky(Wy,s.__scopeMenu),r=JD(Wy,s.__scopeMenu),l=eA(Wy,s.__scopeMenu),f=q.useRef(null),{pointerGraceTimerRef:h,onPointerGraceIntentChange:p}=l,y={__scopeMenu:s.__scopeMenu},x=q.useCallback(()=>{f.current&&window.clearTimeout(f.current),f.current=null},[]);return q.useEffect(()=>x,[x]),q.useEffect(()=>{const S=h.current;return()=>{window.clearTimeout(S),p(null)}},[h,p]),W.jsx(WE,{asChild:!0,...y,children:W.jsx(VD,{id:r.triggerId,"aria-haspopup":"menu","aria-expanded":e.open,"aria-controls":r.contentId,"data-state":eR(e.open),...s,ref:yE(t,r.onTriggerChange),onClick:S=>{var w;(w=s.onClick)==null||w.call(s,S),!(s.disabled||S.defaultPrevented)&&(S.currentTarget.focus(),e.open||e.onOpenChange(!0))},onPointerMove:ve(s.onPointerMove,tb(S=>{l.onItemEnter(S),!S.defaultPrevented&&!s.disabled&&!e.open&&!f.current&&(l.onPointerGraceIntentChange(null),f.current=window.setTimeout(()=>{e.onOpenChange(!0),x()},100))})),onPointerLeave:ve(s.onPointerLeave,tb(S=>{var T,M;x();const w=(T=e.content)==null?void 0:T.getBoundingClientRect();if(w){const D=(M=e.content)==null?void 0:M.dataset.side,R=D==="right",N=R?-5:5,L=w[R?"left":"right"],_=w[R?"right":"left"];l.onPointerGraceIntentChange({area:[{x:S.clientX+N,y:S.clientY},{x:L,y:w.top},{x:_,y:w.top},{x:_,y:w.bottom},{x:L,y:w.bottom}],side:D}),window.clearTimeout(h.current),h.current=window.setTimeout(()=>l.onPointerGraceIntentChange(null),300)}else{if(l.onTriggerLeave(S),S.defaultPrevented)return;l.onPointerGraceIntentChange(null)}})),onKeyDown:ve(s.onKeyDown,S=>{var T;const w=l.searchRef.current!=="";s.disabled||w&&S.key===" "||WU[n.dir].includes(S.key)&&(e.onOpenChange(!0),(T=e.content)==null||T.focus(),S.preventDefault())})})})});KD.displayName=Wy;var WD="MenuSubContent",tR=q.forwardRef((s,t)=>{const e=BD(nr,s.__scopeMenu),{forceMount:n=e.forceMount,...r}=s,l=Ah(nr,s.__scopeMenu),f=Ky(nr,s.__scopeMenu),h=JD(WD,s.__scopeMenu),p=q.useRef(null),y=Gi(t,p);return W.jsx(Jy.Provider,{scope:s.__scopeMenu,children:W.jsx(Cu,{present:n||l.open,children:W.jsx(Jy.Slot,{scope:s.__scopeMenu,children:W.jsx(nA,{id:h.contentId,"aria-labelledby":h.triggerId,...r,ref:y,align:"start",side:f.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:x=>{var S;f.isUsingKeyboardRef.current&&((S=p.current)==null||S.focus()),x.preventDefault()},onCloseAutoFocus:x=>x.preventDefault(),onFocusOutside:ve(s.onFocusOutside,x=>{x.target!==h.trigger&&l.onOpenChange(!1)}),onEscapeKeyDown:ve(s.onEscapeKeyDown,x=>{f.onClose(),x.preventDefault()}),onKeyDown:ve(s.onKeyDown,x=>{var T;const S=x.currentTarget.contains(x.target),w=tH[f.dir].includes(x.key);S&&w&&(l.onOpenChange(!1),(T=h.trigger)==null||T.focus(),x.preventDefault())})})})})})});tR.displayName=WD;function eR(s){return s?"open":"closed"}function A1(s){return s==="indeterminate"}function oA(s){return A1(s)?"indeterminate":s?"checked":"unchecked"}function xH(s){const t=document.activeElement;for(const e of s)if(e===t||(e.focus(),document.activeElement!==t))return}function SH(s,t){return s.map((e,n)=>s[(t+n)%s.length])}function wH(s,t,e){const r=t.length>1&&Array.from(t).every(y=>y===t[0])?t[0]:t,l=e?s.indexOf(e):-1;let f=SH(s,Math.max(l,0));r.length===1&&(f=f.filter(y=>y!==e));const p=f.find(y=>y.toLowerCase().startsWith(r.toLowerCase()));return p!==e?p:void 0}function CH(s,t){const{x:e,y:n}=s;let r=!1;for(let l=0,f=t.length-1;l<t.length;f=l++){const h=t[l],p=t[f],y=h.x,x=h.y,S=p.x,w=p.y;x>n!=w>n&&e<(S-y)*(n-x)/(w-x)+y&&(r=!r)}return r}function EH(s,t){if(!t)return!1;const e={x:s.clientX,y:s.clientY};return CH(e,t)}function tb(s){return t=>t.pointerType==="mouse"?s(t):void 0}var AH=_D,TH=WE,MH=PD,OH=UD,DH=iA,RH=HD,zH=E1,NH=GD,LH=qD,jH=XD,_H=ZD,BH=QD,PH=FD,UH=KD,HH=tR,rA="ContextMenu",[kH]=Lg(rA,[LD]),Cs=LD(),[VH,nR]=kH(rA),iR=s=>{const{__scopeContextMenu:t,children:e,onOpenChange:n,dir:r,modal:l=!0}=s,[f,h]=q.useState(!1),p=Cs(t),y=Za(n),x=q.useCallback(S=>{h(S),y(S)},[y]);return W.jsx(VH,{scope:t,open:f,onOpenChange:x,modal:l,children:W.jsx(AH,{...p,dir:r,open:f,onOpenChange:x,modal:l,children:e})})};iR.displayName=rA;var sR="ContextMenuTrigger",oR=q.forwardRef((s,t)=>{const{__scopeContextMenu:e,disabled:n=!1,...r}=s,l=nR(sR,e),f=Cs(e),h=q.useRef({x:0,y:0}),p=q.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...h.current})}),y=q.useRef(0),x=q.useCallback(()=>window.clearTimeout(y.current),[]),S=w=>{h.current={x:w.clientX,y:w.clientY},l.onOpenChange(!0)};return q.useEffect(()=>x,[x]),q.useEffect(()=>void(n&&x()),[n,x]),W.jsxs(W.Fragment,{children:[W.jsx(TH,{...f,virtualRef:p}),W.jsx(Xn.span,{"data-state":l.open?"open":"closed","data-disabled":n?"":void 0,...r,ref:t,style:{WebkitTouchCallout:"none",...s.style},onContextMenu:n?s.onContextMenu:ve(s.onContextMenu,w=>{x(),S(w),w.preventDefault()}),onPointerDown:n?s.onPointerDown:ve(s.onPointerDown,T1(w=>{x(),y.current=window.setTimeout(()=>S(w),700)})),onPointerMove:n?s.onPointerMove:ve(s.onPointerMove,T1(x)),onPointerCancel:n?s.onPointerCancel:ve(s.onPointerCancel,T1(x)),onPointerUp:n?s.onPointerUp:ve(s.onPointerUp,T1(x))})]})});oR.displayName=sR;var GH="ContextMenuPortal",rR=s=>{const{__scopeContextMenu:t,...e}=s,n=Cs(t);return W.jsx(MH,{...n,...e})};rR.displayName=GH;var aR="ContextMenuContent",lR=q.forwardRef((s,t)=>{const{__scopeContextMenu:e,...n}=s,r=nR(aR,e),l=Cs(e),f=q.useRef(!1);return W.jsx(OH,{...l,...n,ref:t,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:h=>{var p;(p=s.onCloseAutoFocus)==null||p.call(s,h),!h.defaultPrevented&&f.current&&h.preventDefault(),f.current=!1},onInteractOutside:h=>{var p;(p=s.onInteractOutside)==null||p.call(s,h),!h.defaultPrevented&&!r.modal&&(f.current=!0)},style:{...s.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});lR.displayName=aR;var $H="ContextMenuGroup",qH=q.forwardRef((s,t)=>{const{__scopeContextMenu:e,...n}=s,r=Cs(e);return W.jsx(DH,{...r,...n,ref:t})});qH.displayName=$H;var YH="ContextMenuLabel",XH=q.forwardRef((s,t)=>{const{__scopeContextMenu:e,...n}=s,r=Cs(e);return W.jsx(RH,{...r,...n,ref:t})});XH.displayName=YH;var IH="ContextMenuItem",cR=q.forwardRef((s,t)=>{const{__scopeContextMenu:e,...n}=s,r=Cs(e);return W.jsx(zH,{...r,...n,ref:t})});cR.displayName=IH;var ZH="ContextMenuCheckboxItem",QH=q.forwardRef((s,t)=>{const{__scopeContextMenu:e,...n}=s,r=Cs(e);return W.jsx(NH,{...r,...n,ref:t})});QH.displayName=ZH;var FH="ContextMenuRadioGroup",JH=q.forwardRef((s,t)=>{const{__scopeContextMenu:e,...n}=s,r=Cs(e);return W.jsx(LH,{...r,...n,ref:t})});JH.displayName=FH;var KH="ContextMenuRadioItem",WH=q.forwardRef((s,t)=>{const{__scopeContextMenu:e,...n}=s,r=Cs(e);return W.jsx(jH,{...r,...n,ref:t})});WH.displayName=KH;var tk="ContextMenuItemIndicator",ek=q.forwardRef((s,t)=>{const{__scopeContextMenu:e,...n}=s,r=Cs(e);return W.jsx(_H,{...r,...n,ref:t})});ek.displayName=tk;var nk="ContextMenuSeparator",ik=q.forwardRef((s,t)=>{const{__scopeContextMenu:e,...n}=s,r=Cs(e);return W.jsx(BH,{...r,...n,ref:t})});ik.displayName=nk;var sk="ContextMenuArrow",ok=q.forwardRef((s,t)=>{const{__scopeContextMenu:e,...n}=s,r=Cs(e);return W.jsx(PH,{...r,...n,ref:t})});ok.displayName=sk;var rk="ContextMenuSubTrigger",ak=q.forwardRef((s,t)=>{const{__scopeContextMenu:e,...n}=s,r=Cs(e);return W.jsx(UH,{...r,...n,ref:t})});ak.displayName=rk;var lk="ContextMenuSubContent",ck=q.forwardRef((s,t)=>{const{__scopeContextMenu:e,...n}=s,r=Cs(e);return W.jsx(HH,{...r,...n,ref:t,style:{...s.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});ck.displayName=lk;function T1(s){return t=>t.pointerType!=="mouse"?s(t):void 0}var uk=iR,fk=oR,hk=rR,dk=lR,gk=cR,uR="Toggle",fR=q.forwardRef((s,t)=>{const{pressed:e,defaultPressed:n,onPressedChange:r,...l}=s,[f,h]=bE({prop:e,onChange:r,defaultProp:n??!1,caller:uR});return W.jsx(Xn.button,{type:"button","aria-pressed":f,"data-state":f?"on":"off","data-disabled":s.disabled?"":void 0,...l,ref:t,onClick:ve(s.onClick,()=>{s.disabled||h(!f)})})});fR.displayName=uR;var pk=fR;const mk=mE("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",xs:"h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-xs":"size-6 rounded-md [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function Kl({className:s,variant:t="default",size:e="default",asChild:n=!1,...r}){const l=n?j4:"button";return W.jsx(l,{"data-slot":"button","data-variant":t,"data-size":e,className:er(mk({variant:t,size:e,className:s})),...r})}function hR({...s}){return W.jsx(uP,{"data-slot":"dialog",...s})}function yk({...s}){return W.jsx(fP,{"data-slot":"dialog-portal",...s})}function dR({...s}){return W.jsx(BE,{"data-slot":"dialog-close",...s})}function bk({className:s,...t}){return W.jsx(hP,{"data-slot":"dialog-overlay",className:er("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",s),...t})}function gR({className:s,children:t,showCloseButton:e=!0,...n}){return W.jsxs(yk,{"data-slot":"dialog-portal",children:[W.jsx(bk,{}),W.jsxs(dP,{"data-slot":"dialog-content",className:er("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 outline-none sm:max-w-lg",s),...n,children:[t,e&&W.jsxs(BE,{"data-slot":"dialog-close",className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[W.jsx(qB,{}),W.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function pR({className:s,...t}){return W.jsx("div",{"data-slot":"dialog-header",className:er("flex flex-col gap-2 text-center sm:text-left",s),...t})}function mR({className:s,showCloseButton:t=!1,children:e,...n}){return W.jsxs("div",{"data-slot":"dialog-footer",className:er("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",s),...n,children:[e,t&&W.jsx(BE,{asChild:!0,children:W.jsx(Kl,{variant:"outline",children:"Close"})})]})}function yR({className:s,...t}){return W.jsx(gP,{"data-slot":"dialog-title",className:er("text-lg leading-none font-semibold",s),...t})}const vk=({open:s,onOpenChange:t,nodeName:e,onConfirm:n})=>W.jsx(hR,{open:s,onOpenChange:t,children:W.jsxs(gR,{children:[W.jsx(pR,{children:W.jsx(yR,{children:"删除节点"})}),W.jsxs("div",{className:"text-sm text-muted-foreground",children:["确认删除“",e||"未命名","”吗?该操作不可撤销。"]}),W.jsxs(mR,{children:[W.jsx(dR,{asChild:!0,children:W.jsx(Kl,{variant:"outline",children:"取消"})}),W.jsx(Kl,{variant:"destructive",onClick:n,children:"删除"})]})]})}),xk=mE("flex w-fit items-stretch [&>*]:focus-visible:z-10 [&>*]:focus-visible:relative [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-md has-[>[data-slot=button-group]]:gap-2",{variants:{orientation:{horizontal:"[&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:border-l-0 [&>*:not(:last-child)]:rounded-r-none",vertical:"flex-col [&>*:not(:first-child)]:rounded-t-none [&>*:not(:first-child)]:border-t-0 [&>*:not(:last-child)]:rounded-b-none"}},defaultVariants:{orientation:"horizontal"}});function bR({className:s,orientation:t,...e}){return W.jsx("div",{role:"group","data-slot":"button-group","data-orientation":t,className:er(xk({orientation:t}),s),...e})}const Sk=mE("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground"},size:{default:"h-9 px-2 min-w-9",sm:"h-8 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}});function vR({className:s,variant:t,size:e,...n}){return W.jsx(pk,{"data-slot":"toggle",className:er(Sk({variant:t,size:e,className:s})),...n})}const wk=({zoomIn:s,zoomOut:t,zoomToOne:e,exportGraph:n,showCheckboxes:r,onToggleCheckboxes:l,showGrid:f,onToggleGrid:h})=>W.jsxs("div",{className:"absolute top-5 right-5 z-[100] flex gap-2",children:[W.jsxs(bR,{className:"shadow-sm bg-background rounded-md overflow-hidden",children:[W.jsx(vR,{pressed:r,onPressedChange:l,variant:"outline",size:"sm",title:"Toggle Checkboxes",children:W.jsx(GB,{className:"h-4 w-4"})}),W.jsx(vR,{pressed:f,onPressedChange:h,variant:"outline",size:"sm",title:"Toggle Grid",children:W.jsx(PB,{className:"h-4 w-4"})})]}),W.jsxs(bR,{className:"shadow-sm bg-background rounded-md overflow-hidden",children:[W.jsx(Kl,{variant:"outline",size:"sm",onClick:s,title:"Zoom In",children:W.jsx(YB,{className:"h-4 w-4 mr-1"})}),W.jsx(Kl,{variant:"outline",size:"sm",onClick:t,title:"Zoom Out",children:W.jsx(XB,{className:"h-4 w-4 mr-1"})}),W.jsx(Kl,{variant:"outline",size:"sm",onClick:e,title:"Fit to View",children:W.jsx(HB,{className:"h-4 w-4 mr-1"})}),W.jsx(Kl,{variant:"outline",size:"sm",onClick:n,title:"Export Graph",children:W.jsx(BB,{className:"h-4 w-4 mr-1"})})]})]});function Ck(s){s.forEach(t=>{Object.hasOwn(t,"append")||Object.defineProperty(t,"append",{configurable:!0,enumerable:!0,writable:!0,value(...e){const n=document.createDocumentFragment();e.forEach(r=>{const l=r instanceof Node;n.appendChild(l?r:document.createTextNode(String(r)))}),this.appendChild(n)}})})}typeof window=="object"&&window.NodeList&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach),typeof window<"u"&&(s=>{Ck(s)})([Element.prototype,Document.prototype,DocumentFragment.prototype]);var xR=typeof global=="object"&&global&&global.Object===Object&&global,Ek=typeof self=="object"&&self&&self.Object===Object&&self,aa=xR||Ek||Function("return this")(),ir=aa.Symbol,SR=Object.prototype,Ak=SR.hasOwnProperty,Tk=SR.toString,eb=ir?ir.toStringTag:void 0;function Mk(s){var t=Ak.call(s,eb),e=s[eb];try{s[eb]=void 0;var n=!0}catch{}var r=Tk.call(s);return n&&(t?s[eb]=e:delete s[eb]),r}var Ok=Object.prototype,Dk=Ok.toString;function Rk(s){return Dk.call(s)}var zk="[object Null]",Nk="[object Undefined]",wR=ir?ir.toStringTag:void 0;function Mu(s){return s==null?s===void 0?Nk:zk:wR&&wR in Object(s)?Mk(s):Rk(s)}function la(s){return s!=null&&typeof s=="object"}var Lk="[object Symbol]";function tl(s){return typeof s=="symbol"||la(s)&&Mu(s)==Lk}function M1(s,t){for(var e=-1,n=s==null?0:s.length,r=Array(n);++e<n;)r[e]=t(s[e],e,s);return r}var $i=Array.isArray,CR=ir?ir.prototype:void 0,ER=CR?CR.toString:void 0;function AR(s){if(typeof s=="string")return s;if($i(s))return M1(s,AR)+"";if(tl(s))return ER?ER.call(s):"";var t=s+"";return t=="0"&&1/s==-1/0?"-0":t}var jk=/\s/;function _k(s){for(var t=s.length;t--&&jk.test(s.charAt(t)););return t}var Bk=/^\s+/;function Pk(s){return s&&s.slice(0,_k(s)+1).replace(Bk,"")}function Vn(s){var t=typeof s;return s!=null&&(t=="object"||t=="function")}var TR=NaN,Uk=/^[-+]0x[0-9a-f]+$/i,Hk=/^0b[01]+$/i,kk=/^0o[0-7]+$/i,Vk=parseInt;function nb(s){if(typeof s=="number")return s;if(tl(s))return TR;if(Vn(s)){var t=typeof s.valueOf=="function"?s.valueOf():s;s=Vn(t)?t+"":t}if(typeof s!="string")return s===0?s:+s;s=Pk(s);var e=Hk.test(s);return e||kk.test(s)?Vk(s.slice(2),e?2:8):Uk.test(s)?TR:+s}function Gg(s){return s}var Gk="[object AsyncFunction]",$k="[object Function]",qk="[object GeneratorFunction]",Yk="[object Proxy]";function aA(s){if(!Vn(s))return!1;var t=Mu(s);return t==$k||t==qk||t==Gk||t==Yk}var lA=aa["__core-js_shared__"],MR=function(){var s=/[^.]+$/.exec(lA&&lA.keys&&lA.keys.IE_PROTO||"");return s?"Symbol(src)_1."+s:""}();function Xk(s){return!!MR&&MR in s}var Ik=Function.prototype,Zk=Ik.toString;function Th(s){if(s!=null){try{return Zk.call(s)}catch{}try{return s+""}catch{}}return""}var Qk=/[\\^$.*+?()[\]{}|]/g,Fk=/^\[object .+?Constructor\]$/,Jk=Function.prototype,Kk=Object.prototype,Wk=Jk.toString,t8=Kk.hasOwnProperty,e8=RegExp("^"+Wk.call(t8).replace(Qk,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function n8(s){if(!Vn(s)||Xk(s))return!1;var t=aA(s)?e8:Fk;return t.test(Th(s))}function i8(s,t){return s==null?void 0:s[t]}function Mh(s,t){var e=i8(s,t);return n8(e)?e:void 0}var cA=Mh(aa,"WeakMap"),OR=Object.create,s8=function(){function s(){}return function(t){if(!Vn(t))return{};if(OR)return OR(t);s.prototype=t;var e=new s;return s.prototype=void 0,e}}();function DR(s,t,e){switch(e.length){case 0:return s.call(t);case 1:return s.call(t,e[0]);case 2:return s.call(t,e[0],e[1]);case 3:return s.call(t,e[0],e[1],e[2])}return s.apply(t,e)}function o8(){}function RR(s,t){var e=-1,n=s.length;for(t||(t=Array(n));++e<n;)t[e]=s[e];return t}var r8=800,a8=16,l8=Date.now;function c8(s){var t=0,e=0;return function(){var n=l8(),r=a8-(n-e);if(e=n,r>0){if(++t>=r8)return arguments[0]}else t=0;return s.apply(void 0,arguments)}}function u8(s){return function(){return s}}var O1=function(){try{var s=Mh(Object,"defineProperty");return s({},"",{}),s}catch{}}(),f8=O1?function(s,t){return O1(s,"toString",{configurable:!0,enumerable:!1,value:u8(t),writable:!0})}:Gg,zR=c8(f8);function h8(s,t){for(var e=-1,n=s==null?0:s.length;++e<n&&t(s[e],e,s)!==!1;);return s}function d8(s,t,e,n){for(var r=s.length,l=e+-1;++l<r;)if(t(s[l],l,s))return l;return-1}function g8(s){return s!==s}function p8(s,t,e){for(var n=e-1,r=s.length;++n<r;)if(s[n]===t)return n;return-1}function m8(s,t,e){return t===t?p8(s,t,e):d8(s,g8,e)}function NR(s,t){var e=s==null?0:s.length;return!!e&&m8(s,t,0)>-1}var y8=9007199254740991,b8=/^(?:0|[1-9]\d*)$/;function D1(s,t){var e=typeof s;return t=t??y8,!!t&&(e=="number"||e!="symbol"&&b8.test(s))&&s>-1&&s%1==0&&s<t}function R1(s,t,e){t=="__proto__"&&O1?O1(s,t,{configurable:!0,enumerable:!0,value:e,writable:!0}):s[t]=e}function $g(s,t){return s===t||s!==s&&t!==t}var v8=Object.prototype,x8=v8.hasOwnProperty;function uA(s,t,e){var n=s[t];(!(x8.call(s,t)&&$g(n,e))||e===void 0&&!(t in s))&&R1(s,t,e)}function ib(s,t,e,n){var r=!e;e||(e={});for(var l=-1,f=t.length;++l<f;){var h=t[l],p=void 0;p===void 0&&(p=s[h]),r?R1(e,h,p):uA(e,h,p)}return e}var LR=Math.max;function jR(s,t,e){return t=LR(t===void 0?s.length-1:t,0),function(){for(var n=arguments,r=-1,l=LR(n.length-t,0),f=Array(l);++r<l;)f[r]=n[t+r];r=-1;for(var h=Array(t+1);++r<t;)h[r]=n[r];return h[t]=e(f),DR(s,this,h)}}function qg(s,t){return zR(jR(s,t,Gg),s+"")}var S8=9007199254740991;function fA(s){return typeof s=="number"&&s>-1&&s%1==0&&s<=S8}function Oh(s){return s!=null&&fA(s.length)&&!aA(s)}function z1(s,t,e){if(!Vn(e))return!1;var n=typeof t;return(n=="number"?Oh(e)&&D1(t,e.length):n=="string"&&t in e)?$g(e[t],s):!1}function _R(s){return qg(function(t,e){var n=-1,r=e.length,l=r>1?e[r-1]:void 0,f=r>2?e[2]:void 0;for(l=s.length>3&&typeof l=="function"?(r--,l):void 0,f&&z1(e[0],e[1],f)&&(l=r<3?void 0:l,r=1),t=Object(t);++n<r;){var h=e[n];h&&s(t,h,n,l)}return t})}var w8=Object.prototype;function N1(s){var t=s&&s.constructor,e=typeof t=="function"&&t.prototype||w8;return s===e}function C8(s,t){for(var e=-1,n=Array(s);++e<s;)n[e]=t(e);return n}var E8="[object Arguments]";function BR(s){return la(s)&&Mu(s)==E8}var PR=Object.prototype,A8=PR.hasOwnProperty,T8=PR.propertyIsEnumerable,Yg=BR(function(){return arguments}())?BR:function(s){return la(s)&&A8.call(s,"callee")&&!T8.call(s,"callee")};function M8(){return!1}var UR=typeof ei=="object"&&ei&&!ei.nodeType&&ei,HR=UR&&typeof module=="object"&&module&&!module.nodeType&&module,O8=HR&&HR.exports===UR,kR=O8?aa.Buffer:void 0,D8=kR?kR.isBuffer:void 0,Xg=D8||M8,R8="[object Arguments]",z8="[object Array]",N8="[object Boolean]",L8="[object Date]",j8="[object Error]",_8="[object Function]",B8="[object Map]",P8="[object Number]",U8="[object Object]",H8="[object RegExp]",k8="[object Set]",V8="[object String]",G8="[object WeakMap]",$8="[object ArrayBuffer]",q8="[object DataView]",Y8="[object Float32Array]",X8="[object Float64Array]",I8="[object Int8Array]",Z8="[object Int16Array]",Q8="[object Int32Array]",F8="[object Uint8Array]",J8="[object Uint8ClampedArray]",K8="[object Uint16Array]",W8="[object Uint32Array]",Sn={};Sn[Y8]=Sn[X8]=Sn[I8]=Sn[Z8]=Sn[Q8]=Sn[F8]=Sn[J8]=Sn[K8]=Sn[W8]=!0,Sn[R8]=Sn[z8]=Sn[$8]=Sn[N8]=Sn[q8]=Sn[L8]=Sn[j8]=Sn[_8]=Sn[B8]=Sn[P8]=Sn[U8]=Sn[H8]=Sn[k8]=Sn[V8]=Sn[G8]=!1;function tV(s){return la(s)&&fA(s.length)&&!!Sn[Mu(s)]}function L1(s){return function(t){return s(t)}}var VR=typeof ei=="object"&&ei&&!ei.nodeType&&ei,sb=VR&&typeof module=="object"&&module&&!module.nodeType&&module,eV=sb&&sb.exports===VR,hA=eV&&xR.process,Ig=function(){try{var s=sb&&sb.require&&sb.require("util").types;return s||hA&&hA.binding&&hA.binding("util")}catch{}}(),GR=Ig&&Ig.isTypedArray,j1=GR?L1(GR):tV,nV=Object.prototype,iV=nV.hasOwnProperty;function $R(s,t){var e=$i(s),n=!e&&Yg(s),r=!e&&!n&&Xg(s),l=!e&&!n&&!r&&j1(s),f=e||n||r||l,h=f?C8(s.length,String):[],p=h.length;for(var y in s)(t||iV.call(s,y))&&!(f&&(y=="length"||r&&(y=="offset"||y=="parent")||l&&(y=="buffer"||y=="byteLength"||y=="byteOffset")||D1(y,p)))&&h.push(y);return h}function qR(s,t){return function(e){return s(t(e))}}var sV=qR(Object.keys,Object),oV=Object.prototype,rV=oV.hasOwnProperty;function YR(s){if(!N1(s))return sV(s);var t=[];for(var e in Object(s))rV.call(s,e)&&e!="constructor"&&t.push(e);return t}function ob(s){return Oh(s)?$R(s):YR(s)}function aV(s){var t=[];if(s!=null)for(var e in Object(s))t.push(e);return t}var lV=Object.prototype,cV=lV.hasOwnProperty;function uV(s){if(!Vn(s))return aV(s);var t=N1(s),e=[];for(var n in s)n=="constructor"&&(t||!cV.call(s,n))||e.push(n);return e}function Zg(s){return Oh(s)?$R(s,!0):uV(s)}var fV=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,hV=/^\w*$/;function dA(s,t){if($i(s))return!1;var e=typeof s;return e=="number"||e=="symbol"||e=="boolean"||s==null||tl(s)?!0:hV.test(s)||!fV.test(s)||t!=null&&s in Object(t)}var rb=Mh(Object,"create");function dV(){this.__data__=rb?rb(null):{},this.size=0}function gV(s){var t=this.has(s)&&delete this.__data__[s];return this.size-=t?1:0,t}var pV="__lodash_hash_undefined__",mV=Object.prototype,yV=mV.hasOwnProperty;function bV(s){var t=this.__data__;if(rb){var e=t[s];return e===pV?void 0:e}return yV.call(t,s)?t[s]:void 0}var vV=Object.prototype,xV=vV.hasOwnProperty;function SV(s){var t=this.__data__;return rb?t[s]!==void 0:xV.call(t,s)}var wV="__lodash_hash_undefined__";function CV(s,t){var e=this.__data__;return this.size+=this.has(s)?0:1,e[s]=rb&&t===void 0?wV:t,this}function Dh(s){var t=-1,e=s==null?0:s.length;for(this.clear();++t<e;){var n=s[t];this.set(n[0],n[1])}}Dh.prototype.clear=dV,Dh.prototype.delete=gV,Dh.prototype.get=bV,Dh.prototype.has=SV,Dh.prototype.set=CV;function EV(){this.__data__=[],this.size=0}function _1(s,t){for(var e=s.length;e--;)if($g(s[e][0],t))return e;return-1}var AV=Array.prototype,TV=AV.splice;function MV(s){var t=this.__data__,e=_1(t,s);if(e<0)return!1;var n=t.length-1;return e==n?t.pop():TV.call(t,e,1),--this.size,!0}function OV(s){var t=this.__data__,e=_1(t,s);return e<0?void 0:t[e][1]}function DV(s){return _1(this.__data__,s)>-1}function RV(s,t){var e=this.__data__,n=_1(e,s);return n<0?(++this.size,e.push([s,t])):e[n][1]=t,this}function Wl(s){var t=-1,e=s==null?0:s.length;for(this.clear();++t<e;){var n=s[t];this.set(n[0],n[1])}}Wl.prototype.clear=EV,Wl.prototype.delete=MV,Wl.prototype.get=OV,Wl.prototype.has=DV,Wl.prototype.set=RV;var ab=Mh(aa,"Map");function zV(){this.size=0,this.__data__={hash:new Dh,map:new(ab||Wl),string:new Dh}}function NV(s){var t=typeof s;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?s!=="__proto__":s===null}function B1(s,t){var e=s.__data__;return NV(t)?e[typeof t=="string"?"string":"hash"]:e.map}function LV(s){var t=B1(this,s).delete(s);return this.size-=t?1:0,t}function jV(s){return B1(this,s).get(s)}function _V(s){return B1(this,s).has(s)}function BV(s,t){var e=B1(this,s),n=e.size;return e.set(s,t),this.size+=e.size==n?0:1,this}function tc(s){var t=-1,e=s==null?0:s.length;for(this.clear();++t<e;){var n=s[t];this.set(n[0],n[1])}}tc.prototype.clear=zV,tc.prototype.delete=LV,tc.prototype.get=jV,tc.prototype.has=_V,tc.prototype.set=BV;var PV="Expected a function";function gA(s,t){if(typeof s!="function"||t!=null&&typeof t!="function")throw new TypeError(PV);var e=function(){var n=arguments,r=t?t.apply(this,n):n[0],l=e.cache;if(l.has(r))return l.get(r);var f=s.apply(this,n);return e.cache=l.set(r,f)||l,f};return e.cache=new(gA.Cache||tc),e}gA.Cache=tc;var UV=500;function HV(s){var t=gA(s,function(n){return e.size===UV&&e.clear(),n}),e=t.cache;return t}var kV=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,VV=/\\(\\)?/g,GV=HV(function(s){var t=[];return s.charCodeAt(0)===46&&t.push(""),s.replace(kV,function(e,n,r,l){t.push(r?l.replace(VV,"$1"):n||e)}),t});function Qg(s){return s==null?"":AR(s)}function P1(s,t){return $i(s)?s:dA(s,t)?[s]:GV(Qg(s))}function lb(s){if(typeof s=="string"||tl(s))return s;var t=s+"";return t=="0"&&1/s==-1/0?"-0":t}function U1(s,t){t=P1(t,s);for(var e=0,n=t.length;s!=null&&e<n;)s=s[lb(t[e++])];return e&&e==n?s:void 0}function $V(s,t,e){var n=s==null?void 0:U1(s,t);return n===void 0?e:n}function pA(s,t){for(var e=-1,n=t.length,r=s.length;++e<n;)s[r+e]=t[e];return s}var XR=ir?ir.isConcatSpreadable:void 0;function qV(s){return $i(s)||Yg(s)||!!(XR&&s&&s[XR])}function H1(s,t,e,n,r){var l=-1,f=s.length;for(e||(e=qV),r||(r=[]);++l<f;){var h=s[l];e(h)?pA(r,h):n||(r[r.length]=h)}return r}function YV(s){var t=s==null?0:s.length;return t?H1(s):[]}function XV(s){return zR(jR(s,void 0,YV),s+"")}var mA=qR(Object.getPrototypeOf,Object),IV="[object Object]",ZV=Function.prototype,QV=Object.prototype,IR=ZV.toString,FV=QV.hasOwnProperty,JV=IR.call(Object);function ca(s){if(!la(s)||Mu(s)!=IV)return!1;var t=mA(s);if(t===null)return!0;var e=FV.call(t,"constructor")&&t.constructor;return typeof e=="function"&&e instanceof e&&IR.call(e)==JV}function KV(s,t,e){var n=-1,r=s.length;t<0&&(t=-t>r?0:r+t),e=e>r?r:e,e<0&&(e+=r),r=t>e?0:e-t>>>0,t>>>=0;for(var l=Array(r);++n<r;)l[n]=s[n+t];return l}function WV(s,t,e){var n=s.length;return e=e===void 0?n:e,!t&&e>=n?s:KV(s,t,e)}var tG="\\ud800-\\udfff",eG="\\u0300-\\u036f",nG="\\ufe20-\\ufe2f",iG="\\u20d0-\\u20ff",sG=eG+nG+iG,oG="\\ufe0e\\ufe0f",rG="\\u200d",aG=RegExp("["+rG+tG+sG+oG+"]");function ZR(s){return aG.test(s)}function lG(s){return s.split("")}var QR="\\ud800-\\udfff",cG="\\u0300-\\u036f",uG="\\ufe20-\\ufe2f",fG="\\u20d0-\\u20ff",hG=cG+uG+fG,dG="\\ufe0e\\ufe0f",gG="["+QR+"]",yA="["+hG+"]",bA="\\ud83c[\\udffb-\\udfff]",pG="(?:"+yA+"|"+bA+")",FR="[^"+QR+"]",JR="(?:\\ud83c[\\udde6-\\uddff]){2}",KR="[\\ud800-\\udbff][\\udc00-\\udfff]",mG="\\u200d",WR=pG+"?",tz="["+dG+"]?",yG="(?:"+mG+"(?:"+[FR,JR,KR].join("|")+")"+tz+WR+")*",bG=tz+WR+yG,vG="(?:"+[FR+yA+"?",yA,JR,KR,gG].join("|")+")",xG=RegExp(bA+"(?="+bA+")|"+vG+bG,"g");function SG(s){return s.match(xG)||[]}function wG(s){return ZR(s)?SG(s):lG(s)}function ez(s){return function(t){t=Qg(t);var e=ZR(t)?wG(t):void 0,n=e?e[0]:t.charAt(0),r=e?WV(e,1).join(""):t.slice(1);return n[s]()+r}}var k1=ez("toUpperCase");function CG(s){return k1(Qg(s).toLowerCase())}function EG(s,t,e,n){for(var r=-1,l=s==null?0:s.length;++r<l;)e=t(e,s[r],r,s);return e}function AG(s){return function(t){return s==null?void 0:s[t]}}var TG={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},MG=AG(TG),OG=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,DG="\\u0300-\\u036f",RG="\\ufe20-\\ufe2f",zG="\\u20d0-\\u20ff",NG=DG+RG+zG,LG="["+NG+"]",jG=RegExp(LG,"g");function _G(s){return s=Qg(s),s&&s.replace(OG,MG).replace(jG,"")}var BG=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function PG(s){return s.match(BG)||[]}var UG=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function HG(s){return UG.test(s)}var nz="\\ud800-\\udfff",kG="\\u0300-\\u036f",VG="\\ufe20-\\ufe2f",GG="\\u20d0-\\u20ff",$G=kG+VG+GG,iz="\\u2700-\\u27bf",sz="a-z\\xdf-\\xf6\\xf8-\\xff",qG="\\xac\\xb1\\xd7\\xf7",YG="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",XG="\\u2000-\\u206f",IG=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",oz="A-Z\\xc0-\\xd6\\xd8-\\xde",ZG="\\ufe0e\\ufe0f",rz=qG+YG+XG+IG,az="['’]",lz="["+rz+"]",QG="["+$G+"]",cz="\\d+",FG="["+iz+"]",uz="["+sz+"]",fz="[^"+nz+rz+cz+iz+sz+oz+"]",JG="\\ud83c[\\udffb-\\udfff]",KG="(?:"+QG+"|"+JG+")",WG="[^"+nz+"]",hz="(?:\\ud83c[\\udde6-\\uddff]){2}",dz="[\\ud800-\\udbff][\\udc00-\\udfff]",Fg="["+oz+"]",t7="\\u200d",gz="(?:"+uz+"|"+fz+")",e7="(?:"+Fg+"|"+fz+")",pz="(?:"+az+"(?:d|ll|m|re|s|t|ve))?",mz="(?:"+az+"(?:D|LL|M|RE|S|T|VE))?",yz=KG+"?",bz="["+ZG+"]?",n7="(?:"+t7+"(?:"+[WG,hz,dz].join("|")+")"+bz+yz+")*",i7="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",s7="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",o7=bz+yz+n7,r7="(?:"+[FG,hz,dz].join("|")+")"+o7,a7=RegExp([Fg+"?"+uz+"+"+pz+"(?="+[lz,Fg,"$"].join("|")+")",e7+"+"+mz+"(?="+[lz,Fg+gz,"$"].join("|")+")",Fg+"?"+gz+"+"+pz,Fg+"+"+mz,s7,i7,cz,r7].join("|"),"g");function l7(s){return s.match(a7)||[]}function c7(s,t,e){return s=Qg(s),t=t,t===void 0?HG(s)?l7(s):PG(s):s.match(t)||[]}var u7="['’]",f7=RegExp(u7,"g");function vz(s){return function(t){return EG(c7(_G(t).replace(f7,"")),s,"")}}var cb=vz(function(s,t,e){return t=t.toLowerCase(),s+(e?CG(t):t)});function xz(){if(!arguments.length)return[];var s=arguments[0];return $i(s)?s:[s]}function h7(s,t,e){return s===s&&(e!==void 0&&(s=s<=e?s:e),t!==void 0&&(s=s>=t?s:t)),s}function Rh(s,t,e){return e===void 0&&(e=t,t=void 0),e!==void 0&&(e=nb(e),e=e===e?e:0),t!==void 0&&(t=nb(t),t=t===t?t:0),h7(nb(s),t,e)}function d7(){this.__data__=new Wl,this.size=0}function g7(s){var t=this.__data__,e=t.delete(s);return this.size=t.size,e}function p7(s){return this.__data__.get(s)}function m7(s){return this.__data__.has(s)}var y7=200;function b7(s,t){var e=this.__data__;if(e instanceof Wl){var n=e.__data__;if(!ab||n.length<y7-1)return n.push([s,t]),this.size=++e.size,this;e=this.__data__=new tc(n)}return e.set(s,t),this.size=e.size,this}function ua(s){var t=this.__data__=new Wl(s);this.size=t.size}ua.prototype.clear=d7,ua.prototype.delete=g7,ua.prototype.get=p7,ua.prototype.has=m7,ua.prototype.set=b7;function v7(s,t){return s&&ib(t,ob(t),s)}function x7(s,t){return s&&ib(t,Zg(t),s)}var Sz=typeof ei=="object"&&ei&&!ei.nodeType&&ei,wz=Sz&&typeof module=="object"&&module&&!module.nodeType&&module,S7=wz&&wz.exports===Sz,Cz=S7?aa.Buffer:void 0,Ez=Cz?Cz.allocUnsafe:void 0;function Az(s,t){if(t)return s.slice();var e=s.length,n=Ez?Ez(e):new s.constructor(e);return s.copy(n),n}function w7(s,t){for(var e=-1,n=s==null?0:s.length,r=0,l=[];++e<n;){var f=s[e];t(f,e,s)&&(l[r++]=f)}return l}function Tz(){return[]}var C7=Object.prototype,E7=C7.propertyIsEnumerable,Mz=Object.getOwnPropertySymbols,vA=Mz?function(s){return s==null?[]:(s=Object(s),w7(Mz(s),function(t){return E7.call(s,t)}))}:Tz;function A7(s,t){return ib(s,vA(s),t)}var T7=Object.getOwnPropertySymbols,Oz=T7?function(s){for(var t=[];s;)pA(t,vA(s)),s=mA(s);return t}:Tz;function M7(s,t){return ib(s,Oz(s),t)}function Dz(s,t,e){var n=t(s);return $i(s)?n:pA(n,e(s))}function xA(s){return Dz(s,ob,vA)}function O7(s){return Dz(s,Zg,Oz)}var SA=Mh(aa,"DataView"),wA=Mh(aa,"Promise"),Jg=Mh(aa,"Set"),Rz="[object Map]",D7="[object Object]",zz="[object Promise]",Nz="[object Set]",Lz="[object WeakMap]",jz="[object DataView]",R7=Th(SA),z7=Th(ab),N7=Th(wA),L7=Th(Jg),j7=Th(cA),sr=Mu;(SA&&sr(new SA(new ArrayBuffer(1)))!=jz||ab&&sr(new ab)!=Rz||wA&&sr(wA.resolve())!=zz||Jg&&sr(new Jg)!=Nz||cA&&sr(new cA)!=Lz)&&(sr=function(s){var t=Mu(s),e=t==D7?s.constructor:void 0,n=e?Th(e):"";if(n)switch(n){case R7:return jz;case z7:return Rz;case N7:return zz;case L7:return Nz;case j7:return Lz}return t});var _7=Object.prototype,B7=_7.hasOwnProperty;function P7(s){var t=s.length,e=new s.constructor(t);return t&&typeof s[0]=="string"&&B7.call(s,"index")&&(e.index=s.index,e.input=s.input),e}var V1=aa.Uint8Array;function CA(s){var t=new s.constructor(s.byteLength);return new V1(t).set(new V1(s)),t}function U7(s,t){var e=t?CA(s.buffer):s.buffer;return new s.constructor(e,s.byteOffset,s.byteLength)}var H7=/\w*$/;function k7(s){var t=new s.constructor(s.source,H7.exec(s));return t.lastIndex=s.lastIndex,t}var _z=ir?ir.prototype:void 0,Bz=_z?_z.valueOf:void 0;function V7(s){return Bz?Object(Bz.call(s)):{}}function Pz(s,t){var e=t?CA(s.buffer):s.buffer;return new s.constructor(e,s.byteOffset,s.length)}var G7="[object Boolean]",$7="[object Date]",q7="[object Map]",Y7="[object Number]",X7="[object RegExp]",I7="[object Set]",Z7="[object String]",Q7="[object Symbol]",F7="[object ArrayBuffer]",J7="[object DataView]",K7="[object Float32Array]",W7="[object Float64Array]",t9="[object Int8Array]",e9="[object Int16Array]",n9="[object Int32Array]",i9="[object Uint8Array]",s9="[object Uint8ClampedArray]",o9="[object Uint16Array]",r9="[object Uint32Array]";function a9(s,t,e){var n=s.constructor;switch(t){case F7:return CA(s);case G7:case $7:return new n(+s);case J7:return U7(s,e);case K7:case W7:case t9:case e9:case n9:case i9:case s9:case o9:case r9:return Pz(s,e);case q7:return new n;case Y7:case Z7:return new n(s);case X7:return k7(s);case I7:return new n;case Q7:return V7(s)}}function Uz(s){return typeof s.constructor=="function"&&!N1(s)?s8(mA(s)):{}}var l9="[object Map]";function c9(s){return la(s)&&sr(s)==l9}var Hz=Ig&&Ig.isMap,u9=Hz?L1(Hz):c9,f9="[object Set]";function h9(s){return la(s)&&sr(s)==f9}var kz=Ig&&Ig.isSet,d9=kz?L1(kz):h9,g9=1,p9=2,m9=4,Vz="[object Arguments]",y9="[object Array]",b9="[object Boolean]",v9="[object Date]",x9="[object Error]",Gz="[object Function]",S9="[object GeneratorFunction]",w9="[object Map]",C9="[object Number]",$z="[object Object]",E9="[object RegExp]",A9="[object Set]",T9="[object String]",M9="[object Symbol]",O9="[object WeakMap]",D9="[object ArrayBuffer]",R9="[object DataView]",z9="[object Float32Array]",N9="[object Float64Array]",L9="[object Int8Array]",j9="[object Int16Array]",_9="[object Int32Array]",B9="[object Uint8Array]",P9="[object Uint8ClampedArray]",U9="[object Uint16Array]",H9="[object Uint32Array]",hn={};hn[Vz]=hn[y9]=hn[D9]=hn[R9]=hn[b9]=hn[v9]=hn[z9]=hn[N9]=hn[L9]=hn[j9]=hn[_9]=hn[w9]=hn[C9]=hn[$z]=hn[E9]=hn[A9]=hn[T9]=hn[M9]=hn[B9]=hn[P9]=hn[U9]=hn[H9]=!0,hn[x9]=hn[Gz]=hn[O9]=!1;function ub(s,t,e,n,r,l){var f,h=t&g9,p=t&p9,y=t&m9;if(f!==void 0)return f;if(!Vn(s))return s;var x=$i(s);if(x){if(f=P7(s),!h)return RR(s,f)}else{var S=sr(s),w=S==Gz||S==S9;if(Xg(s))return Az(s,h);if(S==$z||S==Vz||w&&!r){if(f=p||w?{}:Uz(s),!h)return p?M7(s,x7(f,s)):A7(s,v7(f,s))}else{if(!hn[S])return r?s:{};f=a9(s,S,h)}}l||(l=new ua);var T=l.get(s);if(T)return T;l.set(s,f),d9(s)?s.forEach(function(R){f.add(ub(R,t,e,R,s,l))}):u9(s)&&s.forEach(function(R,N){f.set(N,ub(R,t,e,N,s,l))});var M=y?p?O7:xA:p?Zg:ob,D=x?void 0:M(s);return h8(D||s,function(R,N){D&&(N=R,R=s[N]),uA(f,N,ub(R,t,e,N,s,l))}),f}var k9=4;function EA(s){return ub(s,k9)}var V9=1,G9=4;function wn(s){return ub(s,V9|G9)}var $9="__lodash_hash_undefined__";function q9(s){return this.__data__.set(s,$9),this}function Y9(s){return this.__data__.has(s)}function Kg(s){var t=-1,e=s==null?0:s.length;for(this.__data__=new tc;++t<e;)this.add(s[t])}Kg.prototype.add=Kg.prototype.push=q9,Kg.prototype.has=Y9;function X9(s,t){for(var e=-1,n=s==null?0:s.length;++e<n;)if(t(s[e],e,s))return!0;return!1}function AA(s,t){return s.has(t)}var I9=1,Z9=2;function qz(s,t,e,n,r,l){var f=e&I9,h=s.length,p=t.length;if(h!=p&&!(f&&p>h))return!1;var y=l.get(s),x=l.get(t);if(y&&x)return y==t&&x==s;var S=-1,w=!0,T=e&Z9?new Kg:void 0;for(l.set(s,t),l.set(t,s);++S<h;){var M=s[S],D=t[S];if(n)var R=f?n(D,M,S,t,s,l):n(M,D,S,s,t,l);if(R!==void 0){if(R)continue;w=!1;break}if(T){if(!X9(t,function(N,L){if(!AA(T,L)&&(M===N||r(M,N,e,n,l)))return T.push(L)})){w=!1;break}}else if(!(M===D||r(M,D,e,n,l))){w=!1;break}}return l.delete(s),l.delete(t),w}function Q9(s){var t=-1,e=Array(s.size);return s.forEach(function(n,r){e[++t]=[r,n]}),e}function TA(s){var t=-1,e=Array(s.size);return s.forEach(function(n){e[++t]=n}),e}var F9=1,J9=2,K9="[object Boolean]",W9="[object Date]",t$="[object Error]",e$="[object Map]",n$="[object Number]",i$="[object RegExp]",s$="[object Set]",o$="[object String]",r$="[object Symbol]",a$="[object ArrayBuffer]",l$="[object DataView]",Yz=ir?ir.prototype:void 0,MA=Yz?Yz.valueOf:void 0;function c$(s,t,e,n,r,l,f){switch(e){case l$:if(s.byteLength!=t.byteLength||s.byteOffset!=t.byteOffset)return!1;s=s.buffer,t=t.buffer;case a$:return!(s.byteLength!=t.byteLength||!l(new V1(s),new V1(t)));case K9:case W9:case n$:return $g(+s,+t);case t$:return s.name==t.name&&s.message==t.message;case i$:case o$:return s==t+"";case e$:var h=Q9;case s$:var p=n&F9;if(h||(h=TA),s.size!=t.size&&!p)return!1;var y=f.get(s);if(y)return y==t;n|=J9,f.set(s,t);var x=qz(h(s),h(t),n,r,l,f);return f.delete(s),x;case r$:if(MA)return MA.call(s)==MA.call(t)}return!1}var u$=1,f$=Object.prototype,h$=f$.hasOwnProperty;function d$(s,t,e,n,r,l){var f=e&u$,h=xA(s),p=h.length,y=xA(t),x=y.length;if(p!=x&&!f)return!1;for(var S=p;S--;){var w=h[S];if(!(f?w in t:h$.call(t,w)))return!1}var T=l.get(s),M=l.get(t);if(T&&M)return T==t&&M==s;var D=!0;l.set(s,t),l.set(t,s);for(var R=f;++S<p;){w=h[S];var N=s[w],L=t[w];if(n)var _=f?n(L,N,w,t,s,l):n(N,L,w,s,t,l);if(!(_===void 0?N===L||r(N,L,e,n,l):_)){D=!1;break}R||(R=w=="constructor")}if(D&&!R){var U=s.constructor,$=t.constructor;U!=$&&"constructor"in s&&"constructor"in t&&!(typeof U=="function"&&U instanceof U&&typeof $=="function"&&$ instanceof $)&&(D=!1)}return l.delete(s),l.delete(t),D}var g$=1,Xz="[object Arguments]",Iz="[object Array]",G1="[object Object]",p$=Object.prototype,Zz=p$.hasOwnProperty;function m$(s,t,e,n,r,l){var f=$i(s),h=$i(t),p=f?Iz:sr(s),y=h?Iz:sr(t);p=p==Xz?G1:p,y=y==Xz?G1:y;var x=p==G1,S=y==G1,w=p==y;if(w&&Xg(s)){if(!Xg(t))return!1;f=!0,x=!1}if(w&&!x)return l||(l=new ua),f||j1(s)?qz(s,t,e,n,r,l):c$(s,t,p,e,n,r,l);if(!(e&g$)){var T=x&&Zz.call(s,"__wrapped__"),M=S&&Zz.call(t,"__wrapped__");if(T||M){var D=T?s.value():s,R=M?t.value():t;return l||(l=new ua),r(D,R,e,n,l)}}return w?(l||(l=new ua),d$(s,t,e,n,r,l)):!1}function $1(s,t,e,n,r){return s===t?!0:s==null||t==null||!la(s)&&!la(t)?s!==s&&t!==t:m$(s,t,e,n,$1,r)}var y$=1,b$=2;function v$(s,t,e,n){var r=e.length,l=r;if(s==null)return!l;for(s=Object(s);r--;){var f=e[r];if(f[2]?f[1]!==s[f[0]]:!(f[0]in s))return!1}for(;++r<l;){f=e[r];var h=f[0],p=s[h],y=f[1];if(f[2]){if(p===void 0&&!(h in s))return!1}else{var x=new ua,S;if(!(S===void 0?$1(y,p,y$|b$,n,x):S))return!1}}return!0}function Qz(s){return s===s&&!Vn(s)}function x$(s){for(var t=ob(s),e=t.length;e--;){var n=t[e],r=s[n];t[e]=[n,r,Qz(r)]}return t}function Fz(s,t){return function(e){return e==null?!1:e[s]===t&&(t!==void 0||s in Object(e))}}function S$(s){var t=x$(s);return t.length==1&&t[0][2]?Fz(t[0][0],t[0][1]):function(e){return e===s||v$(e,s,t)}}function w$(s,t){return s!=null&&t in Object(s)}function Jz(s,t,e){t=P1(t,s);for(var n=-1,r=t.length,l=!1;++n<r;){var f=lb(t[n]);if(!(l=s!=null&&e(s,f)))break;s=s[f]}return l||++n!=r?l:(r=s==null?0:s.length,!!r&&fA(r)&&D1(f,r)&&($i(s)||Yg(s)))}function Kz(s,t){return s!=null&&Jz(s,t,w$)}var C$=1,E$=2;function A$(s,t){return dA(s)&&Qz(t)?Fz(lb(s),t):function(e){var n=$V(e,s);return n===void 0&&n===t?Kz(e,s):$1(t,n,C$|E$)}}function T$(s){return function(t){return t==null?void 0:t[s]}}function M$(s){return function(t){return U1(t,s)}}function O$(s){return dA(s)?T$(lb(s)):M$(s)}function Wz(s){return typeof s=="function"?s:s==null?Gg:typeof s=="object"?$i(s)?A$(s[0],s[1]):S$(s):O$(s)}function D$(s,t,e,n){for(var r=-1,l=s==null?0:s.length;++r<l;){var f=s[r];t(n,f,e(f),s)}return n}function R$(s){return function(t,e,n){for(var r=-1,l=Object(t),f=n(t),h=f.length;h--;){var p=f[++r];if(e(l[p],p,l)===!1)break}return t}}var tN=R$();function z$(s,t){return s&&tN(s,t,ob)}function N$(s,t){return function(e,n){if(e==null)return e;if(!Oh(e))return s(e,n);for(var r=e.length,l=-1,f=Object(e);++l<r&&n(f[l],l,f)!==!1;);return e}}var eN=N$(z$);function L$(s,t,e,n){return eN(s,function(r,l,f){t(n,r,e(r),f)}),n}function j$(s,t){return function(e,n){var r=$i(e)?D$:L$,l=t?t():{};return r(e,s,Wz(n),l)}}var OA=function(){return aa.Date.now()},_$="Expected a function",B$=Math.max,P$=Math.min;function q1(s,t,e){var n,r,l,f,h,p,y=0,x=!1,S=!1,w=!0;if(typeof s!="function")throw new TypeError(_$);t=nb(t)||0,Vn(e)&&(x=!!e.leading,S="maxWait"in e,l=S?B$(nb(e.maxWait)||0,t):l,w="trailing"in e?!!e.trailing:w);function T(Y){var k=n,H=r;return n=r=void 0,y=Y,f=s.apply(H,k),f}function M(Y){return y=Y,h=setTimeout(N,t),x?T(Y):f}function D(Y){var k=Y-p,H=Y-y,J=t-k;return S?P$(J,l-H):J}function R(Y){var k=Y-p,H=Y-y;return p===void 0||k>=t||k<0||S&&H>=l}function N(){var Y=OA();if(R(Y))return L(Y);h=setTimeout(N,D(Y))}function L(Y){return h=void 0,w&&n?T(Y):(n=r=void 0,f)}function _(){h!==void 0&&clearTimeout(h),y=0,n=p=r=h=void 0}function U(){return h===void 0?f:L(OA())}function $(){var Y=OA(),k=R(Y);if(n=arguments,r=this,p=Y,k){if(h===void 0)return M(p);if(S)return clearTimeout(h),h=setTimeout(N,t),T(p)}return h===void 0&&(h=setTimeout(N,t)),f}return $.cancel=_,$.flush=U,$}var nN=Object.prototype,U$=nN.hasOwnProperty,H$=qg(function(s,t){s=Object(s);var e=-1,n=t.length,r=n>2?t[2]:void 0;for(r&&z1(t[0],t[1],r)&&(n=1);++e<n;)for(var l=t[e],f=Zg(l),h=-1,p=f.length;++h<p;){var y=f[h],x=s[y];(x===void 0||$g(x,nN[y])&&!U$.call(s,y))&&(s[y]=l[y])}return s});function DA(s,t,e){(e!==void 0&&!$g(s[t],e)||e===void 0&&!(t in s))&&R1(s,t,e)}function Y1(s){return la(s)&&Oh(s)}function RA(s,t){if(!(t==="constructor"&&typeof s[t]=="function")&&t!="__proto__")return s[t]}function k$(s){return ib(s,Zg(s))}function V$(s,t,e,n,r,l,f){var h=RA(s,e),p=RA(t,e),y=f.get(p);if(y){DA(s,e,y);return}var x=l?l(h,p,e+"",s,t,f):void 0,S=x===void 0;if(S){var w=$i(p),T=!w&&Xg(p),M=!w&&!T&&j1(p);x=p,w||T||M?$i(h)?x=h:Y1(h)?x=RR(h):T?(S=!1,x=Az(p,!0)):M?(S=!1,x=Pz(p,!0)):x=[]:ca(p)||Yg(p)?(x=h,Yg(h)?x=k$(h):(!Vn(h)||aA(h))&&(x=Uz(p))):S=!1}S&&(f.set(p,x),r(x,p,n,l,f),f.delete(p)),DA(s,e,x)}function X1(s,t,e,n,r){s!==t&&tN(t,function(l,f){if(r||(r=new ua),Vn(l))V$(s,t,f,e,X1,n,r);else{var h=n?n(RA(s,f),l,f+"",s,t,r):void 0;h===void 0&&(h=l),DA(s,f,h)}},Zg)}function iN(s,t,e,n,r,l){return Vn(s)&&Vn(t)&&(l.set(t,s),X1(s,t,void 0,iN,l),l.delete(t)),s}var G$=_R(function(s,t,e,n){X1(s,t,e,n)}),sN=qg(function(s){return s.push(void 0,iN),DR(G$,void 0,s)}),$$=200;function q$(s,t,e,n){var r=-1,l=NR,f=!0,h=s.length,p=[],y=t.length;if(!h)return p;t.length>=$$&&(l=AA,f=!1,t=new Kg(t));t:for(;++r<h;){var x=s[r],S=x;if(x=x!==0?x:0,f&&S===S){for(var w=y;w--;)if(t[w]===S)continue t;p.push(x)}else l(t,S,n)||p.push(x)}return p}var Y$=qg(function(s,t){return Y1(s)?q$(s,H1(t,1,Y1,!0)):[]});function X$(s,t){var e=-1,n=Oh(s)?Array(s.length):[];return eN(s,function(r,l,f){n[++e]=t(r,l,f)}),n}var I$=Object.prototype,Z$=I$.hasOwnProperty,oN=j$(function(s,t,e){Z$.call(s,e)?s[e].push(t):R1(s,e,[t])});function Q$(s,t){return s>t}var F$=Object.prototype,J$=F$.hasOwnProperty;function K$(s,t){return s!=null&&J$.call(s,t)}function I1(s,t){return s!=null&&Jz(s,t,K$)}var W$="[object Map]",tq="[object Set]",eq=Object.prototype,nq=eq.hasOwnProperty;function zA(s){if(s==null)return!0;if(Oh(s)&&($i(s)||typeof s=="string"||typeof s.splice=="function"||Xg(s)||j1(s)||Yg(s)))return!s.length;var t=sr(s);if(t==W$||t==tq)return!s.size;if(N1(s))return!YR(s).length;for(var e in s)if(nq.call(s,e))return!1;return!0}function ec(s,t){return $1(s,t)}var iq="[object Number]";function nc(s){return typeof s=="number"||la(s)&&Mu(s)==iq}var sq=ez("toLowerCase");function oq(s,t,e){for(var n=-1,r=s.length;++n<r;){var l=s[n],f=t(l);if(f!=null&&(h===void 0?f===f&&!tl(f):e(f,h)))var h=f,p=l}return p}function rq(s){return s&&s.length?oq(s,Gg,Q$):void 0}var Mn=_R(function(s,t,e){X1(s,t,e)});function aq(s,t,e,n){if(!Vn(s))return s;t=P1(t,s);for(var r=-1,l=t.length,f=l-1,h=s;h!=null&&++r<l;){var p=lb(t[r]),y=e;if(p==="__proto__"||p==="constructor"||p==="prototype")return s;if(r!=f){var x=h[p];y=void 0,y===void 0&&(y=Vn(x)?x:D1(t[r+1])?[]:{})}uA(h,p,y),h=h[p]}return s}function lq(s,t,e){for(var n=-1,r=t.length,l={};++n<r;){var f=t[n],h=U1(s,f);e(h,f)&&aq(l,P1(f,s),h)}return l}function cq(s,t){var e=s.length;for(s.sort(t);e--;)s[e]=s[e].value;return s}function uq(s,t){if(s!==t){var e=s!==void 0,n=s===null,r=s===s,l=tl(s),f=t!==void 0,h=t===null,p=t===t,y=tl(t);if(!h&&!y&&!l&&s>t||l&&f&&p&&!h&&!y||n&&f&&p||!e&&p||!r)return 1;if(!n&&!l&&!y&&s<t||y&&e&&r&&!n&&!l||h&&e&&r||!f&&r||!p)return-1}return 0}function fq(s,t,e){for(var n=-1,r=s.criteria,l=t.criteria,f=r.length,h=e.length;++n<f;){var p=uq(r[n],l[n]);if(p){if(n>=h)return p;var y=e[n];return p*(y=="desc"?-1:1)}}return s.index-t.index}function hq(s,t,e){t.length?t=M1(t,function(l){return $i(l)?function(f){return U1(f,l.length===1?l[0]:l)}:l}):t=[Gg];var n=-1;t=M1(t,L1(Wz));var r=X$(s,function(l,f,h){var p=M1(t,function(y){return y(l)});return{criteria:p,index:++n,value:l}});return cq(r,function(l,f){return fq(l,f,e)})}function dq(s,t){return lq(s,t,function(e,n){return Kz(s,n)})}var rN=XV(function(s,t){return s==null?{}:dq(s,t)}),NA=qg(function(s,t){if(s==null)return[];var e=t.length;return e>1&&z1(s,t[0],t[1])?t=[]:e>2&&z1(t[0],t[1],t[2])&&(t=[t[0]]),hq(s,H1(t),[])}),gq=4294967295,pq=gq-1,mq=Math.floor,yq=Math.min;function bq(s,t,e,n){var r=0,l=s==null?0:s.length;if(l===0)return 0;t=e(t);for(var f=t!==t,h=t===null,p=tl(t),y=t===void 0;r<l;){var x=mq((r+l)/2),S=e(s[x]),w=S!==void 0,T=S===null,M=S===S,D=tl(S);if(f)var R=M;else y?R=M&&w:h?R=M&&w&&!T:p?R=M&&w&&!T&&!D:T||D?R=!1:R=S<t;R?r=x+1:l=x}return yq(l,pq)}var vq=4294967295,xq=vq>>>1;function Sq(s,t,e){var n=0,r=s==null?n:s.length;if(typeof t=="number"&&t===t&&r<=xq){for(;n<r;){var l=n+r>>>1,f=s[l];f!==null&&!tl(f)&&f<t?n=l+1:r=l}return r}return bq(s,t,Gg)}function wq(s,t){return Sq(s,t)}var Cq=vz(function(s,t,e){return s+(e?" ":"")+k1(t)}),Eq="Expected a function";function Aq(s,t,e){var n=!0,r=!0;if(typeof s!="function")throw new TypeError(Eq);return Vn(e)&&(n="leading"in e?!0:n,r="trailing"in e?!!e.trailing:r),q1(s,t,{leading:n,maxWait:t,trailing:r})}var Tq=1/0,Mq=Jg&&1/TA(new Jg([,-0]))[1]==Tq?function(s){return new Jg(s)}:o8,Oq=200;function aN(s,t,e){var n=-1,r=NR,l=s.length,f=!0,h=[],p=h;if(l>=Oq){var y=Mq(s);if(y)return TA(y);f=!1,r=AA,p=new Kg}else p=h;t:for(;++n<l;){var x=s[n],S=x;if(x=x!==0?x:0,f&&S===S){for(var w=p.length;w--;)if(p[w]===S)continue t;h.push(x)}else r(p,S,e)||(p!==h&&p.push(S),h.push(x))}return h}var lN=qg(function(s){return aN(H1(s,1,Y1,!0))});function cN(s){return s&&s.length?aN(s):[]}var Dq=0;function Rq(s){var t=++Dq;return Qg(s)+t}function ic(s){return typeof s=="string"&&s.slice(-1)==="%"}function So(s,t){if(s==null)return 0;let e;if(typeof s=="string"){if(e=parseFloat(s),ic(s)&&(e/=100,Number.isFinite(e)))return e*t}else e=s;return Number.isFinite(e)?e>0&&e<1?e*t:e:0}function fa(s){if(typeof s=="object"){let e=0,n=0,r=0,l=0;return s.vertical!=null&&Number.isFinite(s.vertical)&&(n=l=s.vertical),s.horizontal!=null&&Number.isFinite(s.horizontal)&&(r=e=s.horizontal),s.left!=null&&Number.isFinite(s.left)&&(e=s.left),s.top!=null&&Number.isFinite(s.top)&&(n=s.top),s.right!=null&&Number.isFinite(s.right)&&(r=s.right),s.bottom!=null&&Number.isFinite(s.bottom)&&(l=s.bottom),{top:n,right:r,bottom:l,left:e}}let t=0;return s!=null&&Number.isFinite(s)&&(t=s),{top:t,right:t,bottom:t,left:t}}let uN=!1,fN=!1,hN=!1,zq=!1,dN=!1;if(typeof navigator=="object"){const s=navigator.userAgent;s.indexOf("Macintosh")>=0,s.match(/(iPad|iPhone|iPod)/g),s.indexOf("Windows")>=0,uN=s.indexOf("MSIE")>=0,s.match(/Trident\/7\./),fN=!!s.match(/Edge\//),s.indexOf("Mozilla/")>=0&&s.indexOf("MSIE")<0&&s.indexOf("Edge/")<0,s.indexOf("Chrome/")>=0&&s.indexOf("Edge/")<0,s.indexOf("Opera/")>=0||s.indexOf("OPR/")>=0,s.indexOf("Firefox/")>=0,hN=s.indexOf("AppleWebKit/")>=0&&s.indexOf("Chrome/")<0&&s.indexOf("Edge/")<0,typeof document=="object"&&(dN=!document.createElementNS||`${document.createElementNS("http://www.w3.org/2000/svg","foreignObject")}`!="[object SVGForeignObjectElement]"||s.indexOf("Opera/")>=0)}if(typeof window=="object"&&window.chrome!=null&&window.chrome.app!=null&&window.chrome.app.runtime!=null,typeof document=="object")try{const s=Object.defineProperty({},"passive",{get(){zq=!0}}),t=document.createElement("div");t.addEventListener&&t.addEventListener("click",()=>{},s)}catch{}const gN=uN,pN=fN,Nq=hN,Lq=!dN;function jq(){const s=window.module;return s!=null&&s.hot!=null&&s.hot.status!=null?s.hot.status():"unkonwn"}function mN(){return jq()==="apply"}const _q={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};function Bq(s){const t=document.createElement(_q[s]||"div"),e=`on${s}`;let n=e in t;return n||(t.setAttribute(e,"return;"),n=typeof t[e]=="function"),n}const fb=[];function Ou(s,t){const e=fb.find(n=>n.name===s);if(!(e&&(e.loadTimes+=1,e.loadTimes>1))&&!mN()){const n=document.createElement("style");n.setAttribute("type","text/css"),n.textContent=t;const r=document.querySelector("head");r&&r.insertBefore(n,r.firstChild),fb.push({name:s,loadTimes:1,styleElement:n})}}function Du(s){const t=fb.findIndex(e=>e.name===s);if(t>-1){const e=fb[t];if(e.loadTimes-=1,e.loadTimes>0)return;let n=e.styleElement;n&&n.parentNode&&n.parentNode.removeChild(n),n=null,fb.splice(t,1)}}function Pq(s){const t=s.match(/<svg[^>]*viewBox\s*=\s*(["']?)(.+?)\1[^>]*>/i);return t&&t[2]?t[2].replace(/\s+/," ").split(" "):null}function yN(s){const t=parseFloat(s);return Number.isNaN(t)?null:t}function Uq(s){const t="data:";return s.substr(0,t.length)===t}function Hq(s,t){if(!s||Uq(s)){setTimeout(()=>t(null,s));return}const e=()=>{t(new Error(`Failed to load image: ${s}`))},n=window.FileReader?l=>{if(l.status===200){const f=new FileReader;f.onload=h=>{const p=h.target.result;t(null,p)},f.onerror=e,f.readAsDataURL(l.response)}else e()}:l=>{const f=h=>{const y=[];for(let x=0;x<h.length;x+=32768)y.push(String.fromCharCode.apply(null,h.subarray(x,x+32768)));return y.join("")};if(l.status===200){let h=s.split(".").pop()||"png";h==="svg"&&(h="svg+xml");const p=`data:image/${h};base64,`,y=new Uint8Array(l.response),x=p+btoa(f(y));t(null,x)}else e()},r=new XMLHttpRequest;r.responseType=window.FileReader?"blob":"arraybuffer",r.open("GET",s,!0),r.addEventListener("error",e),r.addEventListener("load",()=>n(r)),r.send()}function kq(s){let t=s.replace(/\s/g,"");t=decodeURIComponent(t);const e=t.indexOf(","),n=t.slice(0,e),r=n.split(":")[1].split(";")[0],l=t.slice(e+1);let f;n.indexOf("base64")>=0?f=atob(l):f=unescape(encodeURIComponent(l));const h=new Uint8Array(f.length);for(let p=0;p<f.length;p+=1)h[p]=f.charCodeAt(p);return new Blob([h],{type:r})}function Vq(s,t){const e=window.navigator.msSaveBlob;if(e)e(s,t);else{const n=window.URL.createObjectURL(s),r=document.createElement("a");r.href=n,r.download=t,document.body.appendChild(r),r.click(),document.body.removeChild(r),window.URL.revokeObjectURL(n)}}function LA(s,t){const e=kq(s);Vq(e,t)}function Gq(s,t={}){let e=null;const n=x=>(e==null&&(e=Pq(s)),e!=null?yN(e[x]):null),r=x=>{const S=s.match(x);return S&&S[2]?yN(S[2]):null};let l=t.width;if(l==null&&(l=r(/<svg[^>]*width\s*=\s*(["']?)(.+?)\1[^>]*>/i)),l==null&&(l=n(2)),l==null)throw new Error("Can not parse width from svg string");let f=t.height;if(f==null&&(f=r(/<svg[^>]*height\s*=\s*(["']?)(.+?)\1[^>]*>/i)),f==null&&(f=n(3)),f==null)throw new Error("Can not parse height from svg string");return`data:image/svg+xml,${encodeURIComponent(s).replace(/'/g,"%27").replace(/"/g,"%22")}`}function $q(s){return typeof s=="object"&&s.then&&typeof s.then=="function"}function jA(s){return s!=null&&(s instanceof Promise||$q(s))}function _A(...s){const t=[];if(s.forEach(n=>{Array.isArray(n)?t.push(...n):t.push(n)}),t.some(n=>jA(n))){const n=t.map(r=>jA(r)?r:Promise.resolve(r!==!1));return Promise.all(n).then(r=>r.reduce((l,f)=>f!==!1&&l,!0))}return t.every(n=>n!==!1)}function qq(...s){const t=_A(s);return typeof t=="boolean"?Promise.resolve(t):t}function bN(s,t,e){if(e)switch(e.length){case 0:return s.call(t);case 1:return s.call(t,e[0]);case 2:return s.call(t,e[0],e[1]);case 3:return s.call(t,e[0],e[1],e[2]);case 4:return s.call(t,e[0],e[1],e[2],e[3]);case 5:return s.call(t,e[0],e[1],e[2],e[3],e[4]);case 6:return s.call(t,e[0],e[1],e[2],e[3],e[4],e[5]);default:return s.apply(t,e)}return s.call(t)}function Gt(s,t,...e){return bN(s,t,e)}function vN(s){return 180*s/Math.PI%360}const fs=function(s,t=!1){return(t?s:s%360)*Math.PI/180};function Es(s){return s%360+(s<0?360:0)}function zh(s,t=0){return Number.isInteger(s)?s:+s.toFixed(t)}function xN(s,t){let e,n;if(t==null?(n=s??1,e=0):(n=t,e=s??0),n<e){const r=e;e=n,n=r}return Math.floor(Math.random()*(n-e+1)+e)}function Wg(s,t,e){return Number.isNaN(s)?NaN:Number.isNaN(t)||Number.isNaN(e)?0:s<t?t:s>e?e:s}function ha(s,t){return t*Math.round(s/t)}function SN(s,t){return t!=null&&s!=null&&t.x>=s.x&&t.x<=s.x+s.width&&t.y>=s.y&&t.y<=s.y+s.height}function wN(s,t){const e=s.x-t.x,n=s.y-t.y;return e*e+n*n}class Ru{valueOf(){return this.toJSON()}toString(){return JSON.stringify(this.toJSON())}}class G extends Ru{static create(t,e){return t==null||typeof t=="number"?new G(t,e):G.clone(t)}static clone(t){return G.isPoint(t)?new G(t.x,t.y):Array.isArray(t)?new G(t[0],t[1]):new G(t.x,t.y)}static equals(t,e){return t===e?!0:t!=null&&e!=null?t.x===e.x&&t.y===e.y:!1}static rotateEx(t,e,n,r=new G){const l=G.clone(t),f=G.clone(r),h=l.x-f.x,p=l.y-f.y,y=h*e-p*n,x=p*e+h*n;return new G(y+f.x,x+f.y)}static toJSON(t){return G.isPoint(t)?{x:t.x,y:t.y}:Array.isArray(t)?{x:t[0],y:t[1]}:{x:t.x,y:t.y}}static fromPolar(t,e,n=new G){let r=Math.abs(t*Math.cos(e)),l=Math.abs(t*Math.sin(e));const f=G.clone(n),h=Es(vN(e));return h<90?l=-l:h<180?(r=-r,l=-l):h<270&&(r=-r),new G(f.x+r,f.y+l)}static toPolar(t,e=new G){const n=G.clone(t),r=G.clone(e),l=n.x-r.x,f=n.y-r.y;return new G(Math.sqrt(l*l+f*f),fs(r.theta(n)))}static equalPoints(t,e){if(t==null&&e!=null||t!=null&&e==null||t!=null&&e!=null&&t.length!==e.length)return!1;if(t!=null&&e!=null){for(let n=0,r=t.length;n<r;n+=1)if(!G.equals(t[n],e[n]))return!1}return!0}static random(t,e,n,r){return new G(xN(t,e),xN(n,r))}static rotate(t,e,n){const r=fs(Es(-e)),l=Math.sin(r),f=Math.cos(r);return G.rotateEx(t,f,l,n)}static isPoint(t){return t!=null&&t instanceof G}static isPointLike(t){return t!=null&&typeof t=="object"&&typeof t.x=="number"&&typeof t.y=="number"}static isPointData(t){return t!=null&&Array.isArray(t)&&t.length===2&&typeof t[0]=="number"&&typeof t[1]=="number"}constructor(t,e){super(),this.x=t??0,this.y=e??0}round(t=0){return this.x=zh(this.x,t),this.y=zh(this.y,t),this}add(t,e){const n=G.create(t,e);return this.x+=n.x,this.y+=n.y,this}update(t,e){const n=G.create(t,e);return this.x=n.x,this.y=n.y,this}translate(t,e){const n=G.create(t,e);return this.x+=n.x,this.y+=n.y,this}rotate(t,e){const n=G.rotate(this,t,e);return this.x=n.x,this.y=n.y,this}scale(t,e,n=new G){const r=G.create(n);return this.x=r.x+t*(this.x-r.x),this.y=r.y+e*(this.y-r.y),this}closest(t){if(t.length===1)return G.create(t[0]);let e=null,n=1/0;return t.forEach(r=>{const l=this.squaredDistance(r);l<n&&(e=r,n=l)}),e?G.create(e):null}distance(t){return Math.sqrt(this.squaredDistance(t))}squaredDistance(t){const e=G.create(t),n=this.x-e.x,r=this.y-e.y;return n*n+r*r}manhattanDistance(t){const e=G.create(t);return Math.abs(e.x-this.x)+Math.abs(e.y-this.y)}magnitude(){return Math.sqrt(this.x*this.x+this.y*this.y)||.01}theta(t=new G){const e=G.create(t),n=-(e.y-this.y),r=e.x-this.x;let l=Math.atan2(n,r);return l<0&&(l=2*Math.PI+l),180*l/Math.PI}angleBetween(t,e){if(this.equals(t)||this.equals(e))return NaN;let n=this.theta(e)-this.theta(t);return n<0&&(n+=360),n}vectorAngle(t){return new G(0,0).angleBetween(this,t)}toPolar(t){return this.update(G.toPolar(this,t)),this}changeInAngle(t,e,n=new G){return this.clone().translate(-t,-e).theta(n)-this.theta(n)}adhereToRect(t){return SN(t,this)||(this.x=Math.min(Math.max(this.x,t.x),t.x+t.width),this.y=Math.min(Math.max(this.y,t.y),t.y+t.height)),this}bearing(t){const e=G.create(t),n=fs(this.y),r=fs(e.y),l=this.x,f=e.x,h=fs(f-l),p=Math.sin(h)*Math.cos(r),y=Math.cos(n)*Math.sin(r)-Math.sin(n)*Math.cos(r)*Math.cos(h),x=vN(Math.atan2(p,y)),S=["NE","E","SE","S","SW","W","NW","N"];let w=x-22.5;return w<0&&(w+=360),w=parseInt(w/45,10),S[w]}cross(t,e){if(t!=null&&e!=null){const n=G.create(t),r=G.create(e);return(r.x-this.x)*(n.y-this.y)-(r.y-this.y)*(n.x-this.x)}return NaN}dot(t){const e=G.create(t);return this.x*e.x+this.y*e.y}diff(t,e){if(typeof t=="number")return new G(this.x-t,this.y-e);const n=G.create(t);return new G(this.x-n.x,this.y-n.y)}lerp(t,e){const n=G.create(t);return new G((1-e)*this.x+e*n.x,(1-e)*this.y+e*n.y)}normalize(t=1){const e=t/this.magnitude();return this.scale(e,e)}move(t,e){const n=G.create(t),r=fs(n.theta(this));return this.translate(Math.cos(r)*e,-Math.sin(r)*e)}reflection(t){return G.create(t).move(this,this.distance(t))}snapToGrid(t,e){return this.x=ha(this.x,t),this.y=ha(this.y,e??t),this}equals(t){const e=G.create(t);return e!=null&&e.x===this.x&&e.y===this.y}clone(){return G.clone(this)}toJSON(){return G.toJSON(this)}serialize(){return`${this.x} ${this.y}`}}class Dt extends Ru{static isRectangle(t){return t!=null&&t instanceof Dt}static isRectangleLike(t){return t!=null&&typeof t=="object"&&typeof t.x=="number"&&typeof t.y=="number"&&typeof t.width=="number"&&typeof t.height=="number"}static create(t,e,n,r){return t==null||typeof t=="number"?new Dt(t,e,n,r):Dt.clone(t)}static clone(t){return Dt.isRectangle(t)?t.clone():Array.isArray(t)?new Dt(t[0],t[1],t[2],t[3]):new Dt(t.x,t.y,t.width,t.height)}static fromEllipse(t){return new Dt(t.x-t.a,t.y-t.b,2*t.a,2*t.b)}static fromSize(t){return new Dt(0,0,t.width,t.height)}static fromPositionAndSize(t,e){return new Dt(t.x,t.y,e.width,e.height)}get left(){return this.x}get top(){return this.y}get right(){return this.x+this.width}get bottom(){return this.y+this.height}get origin(){return new G(this.x,this.y)}get topLeft(){return new G(this.x,this.y)}get topCenter(){return new G(this.x+this.width/2,this.y)}get topRight(){return new G(this.x+this.width,this.y)}get center(){return new G(this.x+this.width/2,this.y+this.height/2)}get bottomLeft(){return new G(this.x,this.y+this.height)}get bottomCenter(){return new G(this.x+this.width/2,this.y+this.height)}get bottomRight(){return new G(this.x+this.width,this.y+this.height)}get corner(){return new G(this.x+this.width,this.y+this.height)}get rightMiddle(){return new G(this.x+this.width,this.y+this.height/2)}get leftMiddle(){return new G(this.x,this.y+this.height/2)}get topLine(){return new Pt(this.topLeft,this.topRight)}get rightLine(){return new Pt(this.topRight,this.bottomRight)}get bottomLine(){return new Pt(this.bottomLeft,this.bottomRight)}get leftLine(){return new Pt(this.topLeft,this.bottomLeft)}constructor(t,e,n,r){super(),this.x=t??0,this.y=e??0,this.width=n??0,this.height=r??0}getOrigin(){return this.origin}getTopLeft(){return this.topLeft}getTopCenter(){return this.topCenter}getTopRight(){return this.topRight}getCenter(){return this.center}getCenterX(){return this.x+this.width/2}getCenterY(){return this.y+this.height/2}getBottomLeft(){return this.bottomLeft}getBottomCenter(){return this.bottomCenter}getBottomRight(){return this.bottomRight}getCorner(){return this.corner}getRightMiddle(){return this.rightMiddle}getLeftMiddle(){return this.leftMiddle}getTopLine(){return this.topLine}getRightLine(){return this.rightLine}getBottomLine(){return this.bottomLine}getLeftLine(){return this.leftLine}bbox(t){if(!t)return this.clone();const e=fs(t),n=Math.abs(Math.sin(e)),r=Math.abs(Math.cos(e)),l=this.width*r+this.height*n,f=this.width*n+this.height*r;return new Dt(this.x+(this.width-l)/2,this.y+(this.height-f)/2,l,f)}round(t=0){return this.x=zh(this.x,t),this.y=zh(this.y,t),this.width=zh(this.width,t),this.height=zh(this.height,t),this}add(t,e,n,r){const l=Dt.create(t,e,n,r),f=Math.min(this.x,l.x),h=Math.min(this.y,l.y),p=Math.max(this.x+this.width,l.x+l.width),y=Math.max(this.y+this.height,l.y+l.height);return this.x=f,this.y=h,this.width=p-f,this.height=y-h,this}update(t,e,n,r){const l=Dt.create(t,e,n,r);return this.x=l.x,this.y=l.y,this.width=l.width,this.height=l.height,this}inflate(t,e){const n=t,r=e??t;return this.x-=n,this.y-=r,this.width+=2*n,this.height+=2*r,this}snapToGrid(t,e){const n=this.origin.snapToGrid(t,e),r=this.corner.snapToGrid(t,e);return this.x=n.x,this.y=n.y,this.width=r.x-n.x,this.height=r.y-n.y,this}translate(t,e){const n=G.create(t,e);return this.x+=n.x,this.y+=n.y,this}scale(t,e,n=new G){const r=this.origin.scale(t,e,n);return this.x=r.x,this.y=r.y,this.width*=t,this.height*=e,this}rotate(t,e=this.getCenter()){if(t!==0){const n=fs(t),r=Math.cos(n),l=Math.sin(n);let f=this.getOrigin(),h=this.getTopRight(),p=this.getBottomRight(),y=this.getBottomLeft();f=G.rotateEx(f,r,l,e),h=G.rotateEx(h,r,l,e),p=G.rotateEx(p,r,l,e),y=G.rotateEx(y,r,l,e);const x=new Dt(f.x,f.y,0,0);x.add(h.x,h.y,0,0),x.add(p.x,p.y,0,0),x.add(y.x,y.y,0,0),this.update(x)}return this}rotate90(){const t=(this.width-this.height)/2;this.x+=t,this.y-=t;const e=this.width;return this.width=this.height,this.height=e,this}moveAndExpand(t){const e=Dt.clone(t);return this.x+=e.x||0,this.y+=e.y||0,this.width+=e.width||0,this.height+=e.height||0,this}getMaxScaleToFit(t,e=this.center){const n=Dt.clone(t),r=e.x,l=e.y;let f=1/0,h=1/0,p=1/0,y=1/0,x=1/0,S=1/0,w=1/0,T=1/0;const M=n.topLeft;M.x<r&&(f=(this.x-r)/(M.x-r)),M.y<l&&(x=(this.y-l)/(M.y-l));const D=n.bottomRight;D.x>r&&(h=(this.x+this.width-r)/(D.x-r)),D.y>l&&(S=(this.y+this.height-l)/(D.y-l));const R=n.topRight;R.x>r&&(p=(this.x+this.width-r)/(R.x-r)),R.y<l&&(w=(this.y-l)/(R.y-l));const N=n.bottomLeft;return N.x<r&&(y=(this.x-r)/(N.x-r)),N.y>l&&(T=(this.y+this.height-l)/(N.y-l)),{sx:Math.min(f,h,p,y),sy:Math.min(x,S,w,T)}}getMaxUniformScaleToFit(t,e=this.center){const n=this.getMaxScaleToFit(t,e);return Math.min(n.sx,n.sy)}containsPoint(t,e){return SN(this,G.create(t,e))}containsRect(t,e,n,r){const l=Dt.create(t,e,n,r),f=this.x,h=this.y,p=this.width,y=this.height,x=l.x,S=l.y,w=l.width,T=l.height;return p===0||y===0||w===0||T===0?!1:x>=f&&S>=h&&x+w<=f+p&&S+T<=h+y}intersectsWithLine(t){const e=[this.topLine,this.rightLine,this.bottomLine,this.leftLine],n=[],r=[];return e.forEach(l=>{const f=t.intersectsWithLine(l);f!==null&&r.indexOf(f.toString())<0&&(n.push(f),r.push(f.toString()))}),n.length>0?n:null}intersectsWithLineFromCenterToPoint(t,e){const n=G.clone(t),r=this.center;let l=null;e!=null&&e!==0&&n.rotate(e,r);const f=[this.topLine,this.rightLine,this.bottomLine,this.leftLine],h=new Pt(r,n);for(let p=f.length-1;p>=0;p-=1){const y=f[p].intersectsWithLine(h);if(y!==null){l=y;break}}return l&&e!=null&&e!==0&&l.rotate(-e,r),l}intersectsWithRect(t,e,n,r){const l=Dt.create(t,e,n,r);if(!this.isIntersectWithRect(l))return null;const f=this.origin,h=this.corner,p=l.origin,y=l.corner,x=Math.max(f.x,p.x),S=Math.max(f.y,p.y);return new Dt(x,S,Math.min(h.x,y.x)-x,Math.min(h.y,y.y)-S)}isIntersectWithRect(t,e,n,r){const l=Dt.create(t,e,n,r),f=this.origin,h=this.corner,p=l.origin,y=l.corner;return!(y.x<=f.x||y.y<=f.y||p.x>=h.x||p.y>=h.y)}normalize(){let t=this.x,e=this.y,n=this.width,r=this.height;return this.width<0&&(t=this.x+this.width,n=-this.width),this.height<0&&(e=this.y+this.height,r=-this.height),this.x=t,this.y=e,this.width=n,this.height=r,this}union(t){const e=Dt.clone(t),n=this.origin,r=this.corner,l=e.origin,f=e.corner,h=Math.min(n.x,l.x),p=Math.min(n.y,l.y),y=Math.max(r.x,f.x),x=Math.max(r.y,f.y);return new Dt(h,p,y-h,x-p)}getNearestSideToPoint(t){const e=G.clone(t),n=e.x-this.x,r=this.x+this.width-e.x,l=e.y-this.y,f=this.y+this.height-e.y;let h=n,p="left";return r<h&&(h=r,p="right"),l<h&&(h=l,p="top"),f<h&&(p="bottom"),p}getNearestPointToPoint(t){const e=G.clone(t);if(this.containsPoint(e)){const n=this.getNearestSideToPoint(e);if(n==="left")return new G(this.x,e.y);if(n==="top")return new G(e.x,this.y);if(n==="right")return new G(this.x+this.width,e.y);if(n==="bottom")return new G(e.x,this.y+this.height)}return e.adhereToRect(this)}equals(t){return t!=null&&t.x===this.x&&t.y===this.y&&t.width===this.width&&t.height===this.height}clone(){return new Dt(this.x,this.y,this.width,this.height)}toJSON(){return{x:this.x,y:this.y,width:this.width,height:this.height}}serialize(){return`${this.x} ${this.y} ${this.width} ${this.height}`}}class Pt extends Ru{static isLine(t){return t!=null&&t instanceof Pt}get center(){return new G((this.start.x+this.end.x)/2,(this.start.y+this.end.y)/2)}constructor(t,e,n,r){super(),typeof t=="number"&&typeof e=="number"?(this.start=new G(t,e),this.end=new G(n,r)):(this.start=G.create(t),this.end=G.create(e))}getCenter(){return this.center}round(t=0){return this.start.round(t),this.end.round(t),this}translate(t,e){return typeof t=="number"?(this.start.translate(t,e),this.end.translate(t,e)):(this.start.translate(t),this.end.translate(t)),this}rotate(t,e){return this.start.rotate(t,e),this.end.rotate(t,e),this}scale(t,e,n){return this.start.scale(t,e,n),this.end.scale(t,e,n),this}length(){return Math.sqrt(this.squaredLength())}squaredLength(){const t=this.start.x-this.end.x,e=this.start.y-this.end.y;return t*t+e*e}setLength(t){const e=this.length();if(!e)return this;const n=t/e;return this.scale(n,n,this.start)}parallel(t){const e=this.clone();if(!e.isDifferentiable())return e;const{start:n,end:r}=e,l=n.clone().rotate(270,r),f=r.clone().rotate(90,n);return n.move(f,t),r.move(l,t),e}vector(){return new G(this.end.x-this.start.x,this.end.y-this.start.y)}angle(){const t=new G(this.start.x+1,this.start.y);return this.start.angleBetween(this.end,t)}bbox(){const t=Math.min(this.start.x,this.end.x),e=Math.min(this.start.y,this.end.y),n=Math.max(this.start.x,this.end.x),r=Math.max(this.start.y,this.end.y);return new Dt(t,e,n-t,r-e)}bearing(){return this.start.bearing(this.end)}closestPoint(t){return this.pointAt(this.closestPointNormalizedLength(t))}closestPointLength(t){return this.closestPointNormalizedLength(t)*this.length()}closestPointTangent(t){return this.tangentAt(this.closestPointNormalizedLength(t))}closestPointNormalizedLength(t){const e=this.vector().dot(new Pt(this.start,t).vector()),n=Math.min(1,Math.max(0,e/this.squaredLength()));return Number.isNaN(n)?0:n}pointAt(t){const e=this.start,n=this.end;return t<=0?e.clone():t>=1?n.clone():e.lerp(n,t)}pointAtLength(t){const e=this.start,n=this.end;let r=!0;t<0&&(r=!1,t=-t);const l=this.length();if(t>=l)return r?n.clone():e.clone();const f=(r?t:l-t)/l;return this.pointAt(f)}divideAt(t){const e=this.pointAt(t);return[new Pt(this.start,e),new Pt(e,this.end)]}divideAtLength(t){const e=this.pointAtLength(t);return[new Pt(this.start,e),new Pt(e,this.end)]}containsPoint(t){const e=this.start,n=this.end;if(e.cross(t,n)!==0)return!1;const r=this.length();return!(new Pt(e,t).length()>r||new Pt(t,n).length()>r)}intersect(t,e){const n=t.intersectsWithLine(this,e);return n?Array.isArray(n)?n:[n]:null}intersectsWithLine(t){const e=new G(this.end.x-this.start.x,this.end.y-this.start.y),n=new G(t.end.x-t.start.x,t.end.y-t.start.y),r=e.x*n.y-e.y*n.x,l=new G(t.start.x-this.start.x,t.start.y-this.start.y),f=l.x*n.y-l.y*n.x,h=l.x*e.y-l.y*e.x;if(r===0||f*r<0||h*r<0)return null;if(r>0){if(f>r||h>r)return null}else if(f<r||h<r)return null;return new G(this.start.x+f*e.x/r,this.start.y+f*e.y/r)}isDifferentiable(){return!this.start.equals(this.end)}pointOffset(t){const e=G.clone(t),n=this.start,r=this.end;return((r.x-n.x)*(e.y-n.y)-(r.y-n.y)*(e.x-n.x))/this.length()}pointSquaredDistance(t,e){const n=G.create(t,e);return this.closestPoint(n).squaredDistance(n)}pointDistance(t,e){const n=G.create(t,e);return this.closestPoint(n).distance(n)}tangentAt(t){if(!this.isDifferentiable())return null;const e=this.start,n=this.end,r=this.pointAt(t),l=new Pt(e,n);return l.translate(r.x-e.x,r.y-e.y),l}tangentAtLength(t){if(!this.isDifferentiable())return null;const e=this.start,n=this.end,r=this.pointAtLength(t),l=new Pt(e,n);return l.translate(r.x-e.x,r.y-e.y),l}relativeCcw(t,e){const n=G.create(t,e);let r=n.x-this.start.x,l=n.y-this.start.y;const f=this.end.x-this.start.x,h=this.end.y-this.start.y;let p=r*h-l*f;return p===0&&(p=r*f+l*h,p>0&&(r-=f,l-=h,p=r*f+l*h,p<0&&(p=0))),p<0?-1:p>0?1:0}equals(t){return t!=null&&this.start.x===t.start.x&&this.start.y===t.start.y&&this.end.x===t.end.x&&this.end.y===t.end.y}clone(){return new Pt(this.start,this.end)}toJSON(){return{start:this.start.toJSON(),end:this.end.toJSON()}}serialize(){return[this.start.serialize(),this.end.serialize()].join(" ")}}class Ws extends Ru{static isEllipse(t){return t!=null&&t instanceof Ws}static create(t,e,n,r){return t==null||typeof t=="number"?new Ws(t,e,n,r):Ws.parse(t)}static parse(t){return Ws.isEllipse(t)?t.clone():Array.isArray(t)?new Ws(t[0],t[1],t[2],t[3]):new Ws(t.x,t.y,t.a,t.b)}static fromRect(t){const e=t.center;return new Ws(e.x,e.y,t.width/2,t.height/2)}get center(){return new G(this.x,this.y)}constructor(t,e,n,r){super(),this.x=t??0,this.y=e??0,this.a=n??0,this.b=r??0}bbox(){return Dt.fromEllipse(this)}getCenter(){return this.center}inflate(t,e){const n=t,r=e??t;return this.a+=2*n,this.b+=2*r,this}normalizedDistance(t,e){const n=G.create(t,e),r=n.x-this.x,l=n.y-this.y,f=this.a,h=this.b;return r*r/(f*f)+l*l/(h*h)}containsPoint(t,e){return this.normalizedDistance(t,e)<=1}intersectsWithLine(t){const e=[],n=this.a,r=this.b,l=t.start,f=t.end,h=t.vector(),p=l.diff(new G(this.x,this.y)),y=new G(h.x/(n*n),h.y/(r*r)),x=new G(p.x/(n*n),p.y/(r*r)),S=h.dot(y),w=h.dot(x),T=p.dot(x)-1,M=w*w-S*T;if(M<0)return null;if(M>0){const D=Math.sqrt(M),R=(-w-D)/S,N=(-w+D)/S;if((R<0||R>1)&&(N<0||N>1))return null;R>=0&&R<=1&&e.push(l.lerp(f,R)),N>=0&&N<=1&&e.push(l.lerp(f,N))}else{const D=-w/S;if(D>=0&&D<=1)e.push(l.lerp(f,D));else return null}return e}intersectsWithLineFromCenterToPoint(t,e=0){const n=G.clone(t);e&&n.rotate(e,this.getCenter());const r=n.x-this.x,l=n.y-this.y;let f;if(r===0)return f=this.bbox().getNearestPointToPoint(n),e?f.rotate(-e,this.getCenter()):f;const h=l/r,p=h*h,y=this.a*this.a,x=this.b*this.b;let S=Math.sqrt(1/(1/y+p/x));S=r<0?-S:S;const w=h*S;return f=new G(this.x+S,this.y+w),e?f.rotate(-e,this.getCenter()):f}tangentTheta(t){const e=G.clone(t),n=e.x,r=e.y,l=this.a,f=this.b,h=this.bbox().center,p=h.x,y=h.y,x=30,S=n>h.x+l/2,w=n<h.x-l/2;let T,M;return S||w?(M=n>h.x?r-x:r+x,T=l*l/(n-p)-l*l*(r-y)*(M-y)/(f*f*(n-p))+p):(T=r>h.y?n+x:n-x,M=f*f/(r-y)-f*f*(n-p)*(T-p)/(l*l*(r-y))+y),new G(T,M).theta(e)}scale(t,e){return this.a*=t,this.b*=e,this}rotate(t,e){const n=Dt.fromEllipse(this);n.rotate(t,e);const r=Ws.fromRect(n);return this.a=r.a,this.b=r.b,this.x=r.x,this.y=r.y,this}translate(t,e){const n=G.create(t,e);return this.x+=n.x,this.y+=n.y,this}equals(t){return t!=null&&t.x===this.x&&t.y===this.y&&t.a===this.a&&t.b===this.b}clone(){return new Ws(this.x,this.y,this.a,this.b)}toJSON(){return{x:this.x,y:this.y,a:this.a,b:this.b}}serialize(){return`${this.x} ${this.y} ${this.a} ${this.b}`}}const Yq=new RegExp("^[\\s\\dLMCZz,.]*$");function Xq(s){return typeof s!="string"?!1:Yq.test(s)}function BA(s,t){return(s%t+t)%t}function Iq(s,t,e,n,r){if(!s||s.length===0)return"";const l=[],f=s[s.length-1],h=t!=null&&t>0,p=t||0;if(n&&h){s=s.slice();const S=s[0],w=new G(f.x+(S.x-f.x)/2,f.y+(S.y-f.y)/2);s.splice(0,0,w)}let y=s[0],x=1;for(e?l.push("M",y.x,y.y):l.push("L",y.x,y.y);x<(n?s.length:s.length-1);){let S=s[BA(x,s.length)],w=y.x-S.x,T=y.y-S.y;if(h&&(w!==0||T!==0)&&(r==null||r.indexOf(x-1)<0)){let M=Math.sqrt(w*w+T*T);const D=w*Math.min(p,M/2)/M,R=T*Math.min(p,M/2)/M,N=S.x+D,L=S.y+R;l.push("L",N,L);let _=s[BA(x+1,s.length)];for(;x<s.length-2&&Math.round(_.x-S.x)===0&&Math.round(_.y-S.y)===0;)_=s[BA(x+2,s.length)],x+=1;w=_.x-S.x,T=_.y-S.y,M=Math.max(1,Math.sqrt(w*w+T*T));const U=w*Math.min(p,M/2)/M,$=T*Math.min(p,M/2)/M,Y=S.x+U,k=S.y+$;l.push("Q",S.x,S.y,Y,k),S=new G(Y,k)}else l.push("L",S.x,S.y);y=S,x+=1}return n?l.push("Z"):l.push("L",f.x,f.y),l.map(S=>typeof S=="string"?S:+S.toFixed(3)).join(" ")}function Zq(s,t={}){const e=[];return s&&s.length&&s.forEach(n=>{Array.isArray(n)?e.push({x:n[0],y:n[1]}):e.push({x:n.x,y:n.y})}),Iq(e,t.round,t.initialMove==null||t.initialMove,t.close,t.exclude)}function CN(s,t,e,n,r=0,l=0,f=0,h,p){if(e===0||n===0)return[];h-=s,p-=t,e=Math.abs(e),n=Math.abs(n);const y=-h/2,x=-p/2,S=Math.cos(r*Math.PI/180),w=Math.sin(r*Math.PI/180),T=S*y+w*x,M=-1*w*y+S*x,D=T*T,R=M*M,N=e*e,L=n*n,_=D/N+R/L;let U;if(_>1)e=Math.sqrt(_)*e,n=Math.sqrt(_)*n,U=0;else{let Rt=1;l===f&&(Rt=-1),U=Rt*Math.sqrt((N*L-N*R-L*D)/(N*R+L*D))}const $=U*e*M/n,Y=-1*U*n*T/e,k=S*$-w*Y+h/2,H=w*$+S*Y+p/2;let J=Math.atan2((M-Y)/n,(T-$)/e)-Math.atan2(0,1),F=J>=0?J:2*Math.PI+J;J=Math.atan2((-M-Y)/n,(-T-$)/e)-Math.atan2((M-Y)/n,(T-$)/e);let ct=J>=0?J:2*Math.PI+J;f===0&&ct>0?ct-=2*Math.PI:f!==0&&ct<0&&(ct+=2*Math.PI);const lt=ct*2/Math.PI,vt=Math.ceil(lt<0?-1*lt:lt),Ot=ct/vt,zt=8/3*Math.sin(Ot/4)*Math.sin(Ot/4)/Math.sin(Ot/2),V=S*e,ot=S*n,tt=w*e,yt=w*n;let Mt=Math.cos(F),nt=Math.sin(F),St=-zt*(V*nt+yt*Mt),Tt=-zt*(tt*nt-ot*Mt),Et=0,Ht=0;const ce=[];for(let Rt=0;Rt<vt;Rt+=1){F+=Ot,Mt=Math.cos(F),nt=Math.sin(F),Et=V*Mt-yt*nt+k,Ht=tt*Mt+ot*nt+H;const ue=-zt*(V*nt+yt*Mt),fe=-zt*(tt*nt-ot*Mt),Be=Rt*6;ce[Be]=Number(St+s),ce[Be+1]=Number(Tt+t),ce[Be+2]=Number(Et-ue+s),ce[Be+3]=Number(Ht-fe+t),ce[Be+4]=Number(Et+s),ce[Be+5]=Number(Ht+t),St=Et+ue,Tt=Ht+fe}return ce.map(Rt=>+Rt.toFixed(2))}class Oi extends Ru{static isPolyline(t){return t!=null&&t instanceof Oi}static parse(t){const e=t.trim();if(e==="")return new Oi;const n=[],r=e.split(/\s*,\s*|\s+/);for(let l=0,f=r.length;l<f;l+=2)n.push({x:+r[l],y:+r[l+1]});return new Oi(n)}get start(){return this.points[0]||null}get end(){return this.points[this.points.length-1]||null}constructor(t){if(super(),t!=null){if(typeof t=="string")return Oi.parse(t);this.points=t.map(e=>G.create(e))}else this.points=[]}scale(t,e,n=new G){return this.points.forEach(r=>r.scale(t,e,n)),this}rotate(t,e){return this.points.forEach(n=>n.rotate(t,e)),this}translate(t,e){const n=G.create(t,e);return this.points.forEach(r=>r.translate(n.x,n.y)),this}round(t=0){return this.points.forEach(e=>e.round(t)),this}bbox(){if(this.points.length===0)return new Dt;let t=1/0,e=-1/0,n=1/0,r=-1/0;const l=this.points;for(let f=0,h=l.length;f<h;f+=1){const p=l[f],y=p.x,x=p.y;y<t&&(t=y),y>e&&(e=y),x<n&&(n=x),x>r&&(r=x)}return new Dt(t,n,e-t,r-n)}closestPoint(t){const e=this.closestPointLength(t);return this.pointAtLength(e)}closestPointLength(t){const e=this.points,n=e.length;if(n===0||n===1)return 0;let r=0,l=0,f=1/0;for(let h=0,p=n-1;h<p;h+=1){const y=new Pt(e[h],e[h+1]),x=y.length(),S=y.closestPointNormalizedLength(t),T=y.pointAt(S).squaredDistance(t);T<f&&(f=T,l=r+S*x),r+=x}return l}closestPointNormalizedLength(t){const e=this.length();return e===0?0:this.closestPointLength(t)/e}closestPointTangent(t){const e=this.closestPointLength(t);return this.tangentAtLength(e)}containsPoint(t){if(this.points.length===0)return!1;const e=G.clone(t),n=e.x,r=e.y,l=this.points,f=l.length;let h=f-1,p=0;for(let y=0;y<f;y+=1){const x=l[h],S=l[y];if(e.equals(x))return!0;const w=new Pt(x,S);if(w.containsPoint(t))return!0;if(r<=x.y&&r>S.y||r>x.y&&r<=S.y){const T=x.x-n>S.x-n?x.x-n:S.x-n;if(T>=0){const M=new G(n+T,r),D=new Pt(t,M);w.intersectsWithLine(D)&&(p+=1)}}h=y}return p%2===1}intersectsWithLine(t){const e=[];for(let n=0,r=this.points.length-1;n<r;n+=1){const l=this.points[n],f=this.points[n+1],h=t.intersectsWithLine(new Pt(l,f));h&&e.push(h)}return e.length>0?e:null}isDifferentiable(){for(let t=0,e=this.points.length-1;t<e;t+=1){const n=this.points[t],r=this.points[t+1];if(new Pt(n,r).isDifferentiable())return!0}return!1}length(){let t=0;for(let e=0,n=this.points.length-1;e<n;e+=1){const r=this.points[e],l=this.points[e+1];t+=r.distance(l)}return t}pointAt(t){const e=this.points,n=e.length;if(n===0)return null;if(n===1||t<=0)return e[0].clone();if(t>=1)return e[n-1].clone();const l=this.length()*t;return this.pointAtLength(l)}pointAtLength(t){const e=this.points,n=e.length;if(n===0)return null;if(n===1)return e[0].clone();let r=!0;t<0&&(r=!1,t=-t);let l=0;for(let h=0,p=n-1;h<p;h+=1){const y=r?h:p-1-h,x=e[y],S=e[y+1],w=new Pt(x,S),T=x.distance(S);if(t<=l+T)return w.pointAtLength((r?1:-1)*(t-l));l+=T}return(r?e[n-1]:e[0]).clone()}tangentAt(t){const n=this.points.length;if(n===0||n===1)return null;t<0&&(t=0),t>1&&(t=1);const l=this.length()*t;return this.tangentAtLength(l)}tangentAtLength(t){const e=this.points,n=e.length;if(n===0||n===1)return null;let r=!0;t<0&&(r=!1,t=-t);let l,f=0;for(let h=0,p=n-1;h<p;h+=1){const y=r?h:p-1-h,x=e[y],S=e[y+1],w=new Pt(x,S),T=x.distance(S);if(w.isDifferentiable()){if(t<=f+T)return w.tangentAtLength((r?1:-1)*(t-f));l=w}f+=T}if(l){const h=r?1:0;return l.tangentAt(h)}return null}simplify(t={}){const e=this.points;if(e.length<3)return this;const n=t.threshold||0;let r=0;for(;e[r+2];){const l=r,f=r+1,h=r+2,p=e[l],y=e[f],x=e[h];new Pt(p,x).closestPoint(y).distance(y)<=n?e.splice(f,1):r+=1}return this}toHull(){const t=this.points,e=t.length;if(e===0)return new Oi;let n=t[0];for(let w=1;w<e;w+=1)(t[w].y<n.y||t[w].y===n.y&&t[w].x>n.x)&&(n=t[w]);const r=[];for(let w=0;w<e;w+=1){let T=n.theta(t[w]);T===0&&(T=360),r.push([t[w],w,T])}if(r.sort((w,T)=>{let M=w[2]-T[2];return M===0&&(M=T[1]-w[1]),M}),r.length>2){const w=r[r.length-1];r.unshift(w)}const l={},f=[],h=w=>`${w[0].toString()}@${w[1]}`;for(;r.length!==0;){const w=r.pop(),T=w[0];if(l[h(w)])continue;let M=!1;for(;!M;)if(f.length<2)f.push(w),M=!0;else{const D=f.pop(),R=D[0],N=f.pop(),L=N[0],_=L.cross(R,T);if(_<0)f.push(N),f.push(D),f.push(w),M=!0;else if(_===0){const $=R.angleBetween(L,T);Math.abs($-180)<1e-10||R.equals(T)||L.equals(R)?(l[h(D)]=R,f.push(N)):Math.abs(($+1)%360-1)<1e-10&&(f.push(N),r.push(D))}else l[h(D)]=R,f.push(N)}}f.length>2&&f.pop();let p,y=-1;for(let w=0,T=f.length;w<T;w+=1){const M=f[w][1];(p===void 0||M<p)&&(p=M,y=w)}let x=[];if(y>0){const w=f.slice(y),T=f.slice(0,y);x=w.concat(T)}else x=f;const S=[];for(let w=0,T=x.length;w<T;w+=1)S.push(x[w][0]);return new Oi(S)}equals(t){return t==null||t.points.length!==this.points.length?!1:t.points.every((e,n)=>e.equals(this.points[n]))}clone(){return new Oi(this.points.map(t=>t.clone()))}toJSON(){return this.points.map(t=>t.toJSON())}serialize(){return this.points.map(t=>`${t.serialize()}`).join(" ")}}class ni extends Ru{static isCurve(t){return t!=null&&t instanceof ni}static throughPoints(t){if(t==null||Array.isArray(t)&&t.length<2)throw new Error("At least 2 points are required");const e=Qq(t),n=[];for(let r=0,l=e[0].length;r<l;r+=1){const f=new G(e[0][r].x,e[0][r].y),h=new G(e[1][r].x,e[1][r].y);n.push(new ni(t[r],f,h,t[r+1]))}return n}constructor(t,e,n,r){super(),this.PRECISION=3,this.start=G.create(t),this.controlPoint1=G.create(e),this.controlPoint2=G.create(n),this.end=G.create(r)}bbox(){const t=this.start,e=this.controlPoint1,n=this.controlPoint2,r=this.end,l=t.x,f=t.y,h=e.x,p=e.y,y=n.x,x=n.y,S=r.x,w=r.y,T=[],M=[[],[]];let D,R,N,L,_,U,$,Y;for(let V=0;V<2;V+=1){if(V===0?(R=6*l-12*h+6*y,D=-3*l+9*h-9*y+3*S,N=3*h-3*l):(R=6*f-12*p+6*x,D=-3*f+9*p-9*x+3*w,N=3*p-3*f),Math.abs(D)<1e-12){if(Math.abs(R)<1e-12)continue;L=-N/R,L>0&&L<1&&T.push(L);continue}$=R*R-4*N*D,Y=Math.sqrt($),!($<0)&&(_=(-R+Y)/(2*D),_>0&&_<1&&T.push(_),U=(-R-Y)/(2*D),U>0&&U<1&&T.push(U))}let k,H,J,F=T.length;const ct=F;for(;F;)F-=1,L=T[F],J=1-L,k=J*J*J*l+3*J*J*L*h+3*J*L*L*y+L*L*L*S,M[0][F]=k,H=J*J*J*f+3*J*J*L*p+3*J*L*L*x+L*L*L*w,M[1][F]=H;T[ct]=0,T[ct+1]=1,M[0][ct]=l,M[1][ct]=f,M[0][ct+1]=S,M[1][ct+1]=w,T.length=ct+2,M[0].length=ct+2,M[1].length=ct+2;const lt=Math.min.apply(null,M[0]),vt=Math.min.apply(null,M[1]),Ot=Math.max.apply(null,M[0]),zt=Math.max.apply(null,M[1]);return new Dt(lt,vt,Ot-lt,zt-vt)}closestPoint(t,e={}){return this.pointAtT(this.closestPointT(t,e))}closestPointLength(t,e={}){const n=this.getOptions(e);return this.lengthAtT(this.closestPointT(t,n),n)}closestPointNormalizedLength(t,e={}){const n=this.getOptions(e),r=this.closestPointLength(t,n);if(!r)return 0;const l=this.length(n);return l===0?0:r/l}closestPointT(t,e={}){const n=this.getPrecision(e),r=this.getDivisions(e),l=Math.pow(10,-n);let f=null,h=0,p=0,y=0,x=0,S=0,w=null;const T=r.length;let M=T>0?1/T:0;for(r.forEach((D,R)=>{const N=D.start.distance(t),L=D.end.distance(t),_=N+L;(w==null||_<w)&&(f=D,h=R*M,p=(R+1)*M,y=N,x=L,w=_,S=D.endpointDistance())});;){const D=y?Math.abs(y-x)/y:0,R=x!=null?Math.abs(y-x)/x:0,N=D<l||R<l,L=y?y<S*l:!0,_=x?x<S*l:!0;if(N||(L||_))return y<=x?h:p;const $=f.divide(.5);M/=2;const Y=$[0].start.distance(t),k=$[0].end.distance(t),H=Y+k,J=$[1].start.distance(t),F=$[1].end.distance(t),ct=J+F;H<=ct?(f=$[0],p-=M,y=Y,x=k):(f=$[1],h+=M,y=J,x=F)}}closestPointTangent(t,e={}){return this.tangentAtT(this.closestPointT(t,e))}containsPoint(t,e={}){return this.toPolyline(e).containsPoint(t)}divideAt(t,e={}){if(t<=0)return this.divideAtT(0);if(t>=1)return this.divideAtT(1);const n=this.tAt(t,e);return this.divideAtT(n)}divideAtLength(t,e={}){const n=this.tAtLength(t,e);return this.divideAtT(n)}divide(t){return this.divideAtT(t)}divideAtT(t){const e=this.start,n=this.controlPoint1,r=this.controlPoint2,l=this.end;if(t<=0)return[new ni(e,e,e,e),new ni(e,n,r,l)];if(t>=1)return[new ni(e,n,r,l),new ni(l,l,l,l)];const f=this.getSkeletonPoints(t),h=f.startControlPoint1,p=f.startControlPoint2,y=f.divider,x=f.dividerControlPoint1,S=f.dividerControlPoint2;return[new ni(e,h,p,y),new ni(y,x,S,l)]}endpointDistance(){return this.start.distance(this.end)}getSkeletonPoints(t){const e=this.start,n=this.controlPoint1,r=this.controlPoint2,l=this.end;if(t<=0)return{startControlPoint1:e.clone(),startControlPoint2:e.clone(),divider:e.clone(),dividerControlPoint1:n.clone(),dividerControlPoint2:r.clone()};if(t>=1)return{startControlPoint1:n.clone(),startControlPoint2:r.clone(),divider:l.clone(),dividerControlPoint1:l.clone(),dividerControlPoint2:l.clone()};const f=new Pt(e,n).pointAt(t),h=new Pt(n,r).pointAt(t),p=new Pt(r,l).pointAt(t),y=new Pt(f,h).pointAt(t),x=new Pt(h,p).pointAt(t),S=new Pt(y,x).pointAt(t);return{startControlPoint1:f,startControlPoint2:y,divider:S,dividerControlPoint1:x,dividerControlPoint2:p}}getSubdivisions(t={}){const e=this.getPrecision(t);let n=[new ni(this.start,this.controlPoint1,this.controlPoint2,this.end)];if(e===0)return n;let r=this.endpointDistance();const l=Math.pow(10,-e);let f=0;for(;;){f+=1;const h=[];n.forEach(x=>{const S=x.divide(.5);h.push(S[0],S[1])});const p=h.reduce((x,S)=>x+S.endpointDistance(),0),y=p!==0?(p-r)/p:0;if(f>1&&y<l)return h;n=h,r=p}}length(t={}){return this.getDivisions(t).reduce((n,r)=>n+r.endpointDistance(),0)}lengthAtT(t,e={}){if(t<=0)return 0;const n=e.precision===void 0?this.PRECISION:e.precision;return this.divide(t)[0].length({precision:n})}pointAt(t,e={}){if(t<=0)return this.start.clone();if(t>=1)return this.end.clone();const n=this.tAt(t,e);return this.pointAtT(n)}pointAtLength(t,e={}){const n=this.tAtLength(t,e);return this.pointAtT(n)}pointAtT(t){return t<=0?this.start.clone():t>=1?this.end.clone():this.getSkeletonPoints(t).divider}isDifferentiable(){const t=this.start,e=this.controlPoint1,n=this.controlPoint2,r=this.end;return!(t.equals(e)&&e.equals(n)&&n.equals(r))}tangentAt(t,e={}){if(!this.isDifferentiable())return null;t<0?t=0:t>1&&(t=1);const n=this.tAt(t,e);return this.tangentAtT(n)}tangentAtLength(t,e={}){if(!this.isDifferentiable())return null;const n=this.tAtLength(t,e);return this.tangentAtT(n)}tangentAtT(t){if(!this.isDifferentiable())return null;t<0&&(t=0),t>1&&(t=1);const e=this.getSkeletonPoints(t),n=e.startControlPoint2,r=e.dividerControlPoint1,l=e.divider,f=new Pt(n,r);return f.translate(l.x-n.x,l.y-n.y),f}getPrecision(t={}){return t.precision==null?this.PRECISION:t.precision}getDivisions(t={}){if(t.subdivisions!=null)return t.subdivisions;const e=this.getPrecision(t);return this.getSubdivisions({precision:e})}getOptions(t={}){const e=this.getPrecision(t),n=this.getDivisions(t);return{precision:e,subdivisions:n}}tAt(t,e={}){if(t<=0)return 0;if(t>=1)return 1;const n=this.getOptions(e),l=this.length(n)*t;return this.tAtLength(l,n)}tAtLength(t,e={}){let n=!0;t<0&&(n=!1,t=-t);const r=this.getPrecision(e),l=this.getDivisions(e),f={precision:r,subdivisions:l};let h=null,p,y,x=0,S=0,w=0;const T=l.length;let M=T>0?1/T:0;for(let N=0;N<T;N+=1){const L=n?N:T-1-N,_=l[N],U=_.endpointDistance();if(t<=w+U){h=_,p=L*M,y=(L+1)*M,x=n?t-w:U+w-t,S=n?U+w-t:t-w;break}w+=U}if(h==null)return n?1:0;const D=this.length(f),R=Math.pow(10,-r);for(;;){let N;if(N=D!==0?x/D:0,N<R)return p;if(N=D!==0?S/D:0,N<R)return y;let L,_;const U=h.divide(.5);M/=2;const $=U[0].endpointDistance(),Y=U[1].endpointDistance();x<=$?(h=U[0],y-=M,L=x,_=$-L):(h=U[1],p+=M,L=x-$,_=Y-L),x=L,S=_}}toPoints(t={}){const e=this.getDivisions(t),n=[e[0].start.clone()];return e.forEach(r=>n.push(r.end.clone())),n}toPolyline(t={}){return new Oi(this.toPoints(t))}scale(t,e,n){return this.start.scale(t,e,n),this.controlPoint1.scale(t,e,n),this.controlPoint2.scale(t,e,n),this.end.scale(t,e,n),this}rotate(t,e){return this.start.rotate(t,e),this.controlPoint1.rotate(t,e),this.controlPoint2.rotate(t,e),this.end.rotate(t,e),this}translate(t,e){return typeof t=="number"?(this.start.translate(t,e),this.controlPoint1.translate(t,e),this.controlPoint2.translate(t,e),this.end.translate(t,e)):(this.start.translate(t),this.controlPoint1.translate(t),this.controlPoint2.translate(t),this.end.translate(t)),this}equals(t){return t!=null&&this.start.equals(t.start)&&this.controlPoint1.equals(t.controlPoint1)&&this.controlPoint2.equals(t.controlPoint2)&&this.end.equals(t.end)}clone(){return new ni(this.start,this.controlPoint1,this.controlPoint2,this.end)}toJSON(){return{start:this.start.toJSON(),controlPoint1:this.controlPoint1.toJSON(),controlPoint2:this.controlPoint2.toJSON(),end:this.end.toJSON()}}serialize(){return[this.start.serialize(),this.controlPoint1.serialize(),this.controlPoint2.serialize(),this.end.serialize()].join(" ")}}function EN(s){const t=s.length,e=[],n=[];let r=2;e[0]=s[0]/r;for(let l=1;l<t;l+=1)n[l]=1/r,r=(l<t-1?4:3.5)-n[l],e[l]=(s[l]-e[l-1])/r;for(let l=1;l<t;l+=1)e[t-l-1]-=n[t-l]*e[t-l];return e}function Qq(s){const t=s.map(p=>G.clone(p)),e=[],n=[],r=t.length-1;if(r===1)return e[0]=new G((2*t[0].x+t[1].x)/3,(2*t[0].y+t[1].y)/3),n[0]=new G(2*e[0].x-t[0].x,2*e[0].y-t[0].y),[e,n];const l=[];for(let p=1;p<r-1;p+=1)l[p]=4*t[p].x+2*t[p+1].x;l[0]=t[0].x+2*t[1].x,l[r-1]=(8*t[r-1].x+t[r].x)/2;const f=EN(l);for(let p=1;p<r-1;p+=1)l[p]=4*t[p].y+2*t[p+1].y;l[0]=t[0].y+2*t[1].y,l[r-1]=(8*t[r-1].y+t[r].y)/2;const h=EN(l);for(let p=0;p<r;p+=1)e.push(new G(f[p],h[p])),p<r-1?n.push(new G(2*t[p+1].x-f[p+1],2*t[p+1].y-h[p+1])):n.push(new G((t[r].x+f[r-1])/2,(t[r].y+h[r-1])/2));return[e,n]}class Z1 extends Ru{constructor(){super(...arguments),this.isVisible=!0,this.isSegment=!0,this.isSubpathStart=!1}get end(){return this.endPoint}get start(){if(this.previousSegment==null)throw new Error("Missing previous segment. (This segment cannot be the first segment of a path, or segment has not yet been added to a path.)");return this.previousSegment.end}closestPointT(t,e){if(this.closestPointNormalizedLength)return this.closestPointNormalizedLength(t);throw new Error("Neither `closestPointT` nor `closestPointNormalizedLength` method is implemented.")}lengthAtT(t,e){if(t<=0)return 0;const n=this.length();return t>=1?n:n*t}divideAtT(t){if(this.divideAt)return this.divideAt(t);throw new Error("Neither `divideAtT` nor `divideAt` method is implemented.")}pointAtT(t){if(this.pointAt)return this.pointAt(t);throw new Error("Neither `pointAtT` nor `pointAt` method is implemented.")}tangentAtT(t){if(this.tangentAt)return this.tangentAt(t);throw new Error("Neither `tangentAtT` nor `tangentAt` method is implemented.")}}class vi extends Z1{static create(...t){const e=t.length,n=t[0];if(Pt.isLine(n))return new vi(n);if(G.isPointLike(n))return e===1?new vi(n):t.map(l=>new vi(l));if(e===2)return new vi(+t[0],+t[1]);const r=[];for(let l=0;l<e;l+=2){const f=+t[l],h=+t[l+1];r.push(new vi(f,h))}return r}constructor(t,e){super(),Pt.isLine(t)?this.endPoint=t.end.clone().round(2):this.endPoint=G.create(t,e).round(2)}get type(){return"L"}get line(){return new Pt(this.start,this.end)}bbox(){return this.line.bbox()}closestPoint(t){return this.line.closestPoint(t)}closestPointLength(t){return this.line.closestPointLength(t)}closestPointNormalizedLength(t){return this.line.closestPointNormalizedLength(t)}closestPointTangent(t){return this.line.closestPointTangent(t)}length(){return this.line.length()}divideAt(t){const e=this.line.divideAt(t);return[new vi(e[0]),new vi(e[1])]}divideAtLength(t){const e=this.line.divideAtLength(t);return[new vi(e[0]),new vi(e[1])]}getSubdivisions(){return[]}pointAt(t){return this.line.pointAt(t)}pointAtLength(t){return this.line.pointAtLength(t)}tangentAt(t){return this.line.tangentAt(t)}tangentAtLength(t){return this.line.tangentAtLength(t)}isDifferentiable(){return this.previousSegment==null?!1:!this.start.equals(this.end)}clone(){return new vi(this.end)}scale(t,e,n){return this.end.scale(t,e,n),this}rotate(t,e){return this.end.rotate(t,e),this}translate(t,e){return typeof t=="number"?this.end.translate(t,e):this.end.translate(t),this}equals(t){return this.type===t.type&&this.start.equals(t.start)&&this.end.equals(t.end)}toJSON(){return{type:this.type,start:this.start.toJSON(),end:this.end.toJSON()}}serialize(){const t=this.end;return`${this.type} ${t.x} ${t.y}`}}class hb extends Z1{static create(){return new hb}get end(){if(!this.subpathStartSegment)throw new Error("Missing subpath start segment. (This segment needs a subpath start segment (e.g. MoveTo), or segment has not yet been added to a path.)");return this.subpathStartSegment.end}get type(){return"Z"}get line(){return new Pt(this.start,this.end)}bbox(){return this.line.bbox()}closestPoint(t){return this.line.closestPoint(t)}closestPointLength(t){return this.line.closestPointLength(t)}closestPointNormalizedLength(t){return this.line.closestPointNormalizedLength(t)}closestPointTangent(t){return this.line.closestPointTangent(t)}length(){return this.line.length()}divideAt(t){const e=this.line.divideAt(t);return[e[1].isDifferentiable()?new vi(e[0]):this.clone(),new vi(e[1])]}divideAtLength(t){const e=this.line.divideAtLength(t);return[e[1].isDifferentiable()?new vi(e[0]):this.clone(),new vi(e[1])]}getSubdivisions(){return[]}pointAt(t){return this.line.pointAt(t)}pointAtLength(t){return this.line.pointAtLength(t)}tangentAt(t){return this.line.tangentAt(t)}tangentAtLength(t){return this.line.tangentAtLength(t)}isDifferentiable(){return!this.previousSegment||!this.subpathStartSegment?!1:!this.start.equals(this.end)}scale(){return this}rotate(){return this}translate(){return this}equals(t){return this.type===t.type&&this.start.equals(t.start)&&this.end.equals(t.end)}clone(){return new hb}toJSON(){return{type:this.type,start:this.start.toJSON(),end:this.end.toJSON()}}serialize(){return this.type}}class el extends Z1{static create(...t){const e=t.length,n=t[0];if(Pt.isLine(n))return new el(n);if(ni.isCurve(n))return new el(n);if(G.isPointLike(n)){if(e===1)return new el(n);const l=[];for(let f=0;f<e;f+=1)f===0?l.push(new el(t[f])):l.push(new vi(t[f]));return l}if(e===2)return new el(+t[0],+t[1]);const r=[];for(let l=0;l<e;l+=2){const f=+t[l],h=+t[l+1];l===0?r.push(new el(f,h)):r.push(new vi(f,h))}return r}constructor(t,e){super(),this.isVisible=!1,this.isSubpathStart=!0,Pt.isLine(t)||ni.isCurve(t)?this.endPoint=t.end.clone().round(2):this.endPoint=G.create(t,e).round(2)}get start(){throw new Error("Illegal access. Moveto segments should not need a start property.")}get type(){return"M"}bbox(){return null}closestPoint(){return this.end.clone()}closestPointLength(){return 0}closestPointNormalizedLength(){return 0}closestPointT(){return 1}closestPointTangent(){return null}length(){return 0}lengthAtT(){return 0}divideAt(){return[this.clone(),this.clone()]}divideAtLength(){return[this.clone(),this.clone()]}getSubdivisions(){return[]}pointAt(){return this.end.clone()}pointAtLength(){return this.end.clone()}pointAtT(){return this.end.clone()}tangentAt(){return null}tangentAtLength(){return null}tangentAtT(){return null}isDifferentiable(){return!1}scale(t,e,n){return this.end.scale(t,e,n),this}rotate(t,e){return this.end.rotate(t,e),this}translate(t,e){return typeof t=="number"?this.end.translate(t,e):this.end.translate(t),this}clone(){return new el(this.end)}equals(t){return this.type===t.type&&this.end.equals(t.end)}toJSON(){return{type:this.type,end:this.end.toJSON()}}serialize(){const t=this.end;return`${this.type} ${t.x} ${t.y}`}}class As extends Z1{static create(...t){const e=t.length,n=t[0];if(ni.isCurve(n))return new As(n);if(G.isPointLike(n)){if(e===3)return new As(t[0],t[1],t[2]);const l=[];for(let f=0;f<e;f+=3)l.push(new As(t[f],t[f+1],t[f+2]));return l}if(e===6)return new As(t[0],t[1],t[2],t[3],t[4],t[5]);const r=[];for(let l=0;l<e;l+=6)r.push(new As(t[l],t[l+1],t[l+2],t[l+3],t[l+4],t[l+5]));return r}constructor(t,e,n,r,l,f){super(),ni.isCurve(t)?(this.controlPoint1=t.controlPoint1.clone().round(2),this.controlPoint2=t.controlPoint2.clone().round(2),this.endPoint=t.end.clone().round(2)):typeof t=="number"?(this.controlPoint1=new G(t,e).round(2),this.controlPoint2=new G(n,r).round(2),this.endPoint=new G(l,f).round(2)):(this.controlPoint1=G.create(t).round(2),this.controlPoint2=G.create(e).round(2),this.endPoint=G.create(n).round(2))}get type(){return"C"}get curve(){return new ni(this.start,this.controlPoint1,this.controlPoint2,this.end)}bbox(){return this.curve.bbox()}closestPoint(t){return this.curve.closestPoint(t)}closestPointLength(t){return this.curve.closestPointLength(t)}closestPointNormalizedLength(t){return this.curve.closestPointNormalizedLength(t)}closestPointTangent(t){return this.curve.closestPointTangent(t)}length(){return this.curve.length()}divideAt(t,e={}){const n=this.curve.divideAt(t,e);return[new As(n[0]),new As(n[1])]}divideAtLength(t,e={}){const n=this.curve.divideAtLength(t,e);return[new As(n[0]),new As(n[1])]}divideAtT(t){const e=this.curve.divideAtT(t);return[new As(e[0]),new As(e[1])]}getSubdivisions(){return[]}pointAt(t){return this.curve.pointAt(t)}pointAtLength(t){return this.curve.pointAtLength(t)}tangentAt(t){return this.curve.tangentAt(t)}tangentAtLength(t){return this.curve.tangentAtLength(t)}isDifferentiable(){if(!this.previousSegment)return!1;const t=this.start,e=this.controlPoint1,n=this.controlPoint2,r=this.end;return!(t.equals(e)&&e.equals(n)&&n.equals(r))}scale(t,e,n){return this.controlPoint1.scale(t,e,n),this.controlPoint2.scale(t,e,n),this.end.scale(t,e,n),this}rotate(t,e){return this.controlPoint1.rotate(t,e),this.controlPoint2.rotate(t,e),this.end.rotate(t,e),this}translate(t,e){return typeof t=="number"?(this.controlPoint1.translate(t,e),this.controlPoint2.translate(t,e),this.end.translate(t,e)):(this.controlPoint1.translate(t),this.controlPoint2.translate(t),this.end.translate(t)),this}equals(t){return this.start.equals(t.start)&&this.end.equals(t.end)&&this.controlPoint1.equals(t.controlPoint1)&&this.controlPoint2.equals(t.controlPoint2)}clone(){return new As(this.controlPoint1,this.controlPoint2,this.end)}toJSON(){return{type:this.type,start:this.start.toJSON(),controlPoint1:this.controlPoint1.toJSON(),controlPoint2:this.controlPoint2.toJSON(),end:this.end.toJSON()}}serialize(){const t=this.controlPoint1,e=this.controlPoint2,n=this.end;return[this.type,t.x,t.y,e.x,e.y,n.x,n.y].join(" ")}}function Q1(s,t,e){return{x:s*Math.cos(e)-t*Math.sin(e),y:s*Math.sin(e)+t*Math.cos(e)}}function AN(s,t,e,n,r,l){const f=.3333333333333333,h=2/3;return[f*s+h*e,f*t+h*n,f*r+h*e,f*l+h*n,r,l]}function TN(s,t,e,n,r,l,f,h,p,y){const x=Math.PI*120/180,S=Math.PI/180*(+r||0);let w=[],T,M,D,R,N;if(y)M=y[0],D=y[1],R=y[2],N=y[3];else{T=Q1(s,t,-S),s=T.x,t=T.y,T=Q1(h,p,-S),h=T.x,p=T.y;const Ot=(s-h)/2,zt=(t-p)/2;let V=Ot*Ot/(e*e)+zt*zt/(n*n);V>1&&(V=Math.sqrt(V),e=V*e,n=V*n);const ot=e*e,tt=n*n,yt=(l===f?-1:1)*Math.sqrt(Math.abs((ot*tt-ot*zt*zt-tt*Ot*Ot)/(ot*zt*zt+tt*Ot*Ot)));R=yt*e*zt/n+(s+h)/2,N=yt*-n*Ot/e+(t+p)/2,M=Math.asin((t-N)/n),D=Math.asin((p-N)/n),M=s<R?Math.PI-M:M,D=h<R?Math.PI-D:D,M<0&&(M=Math.PI*2+M),D<0&&(D=Math.PI*2+D),f&&M>D&&(M-=Math.PI*2),!f&&D>M&&(D-=Math.PI*2)}let L=D-M;if(Math.abs(L)>x){const Ot=D,zt=h,V=p;D=M+x*(f&&D>M?1:-1),h=R+e*Math.cos(D),p=N+n*Math.sin(D),w=TN(h,p,e,n,r,0,f,zt,V,[D,Ot,R,N])}L=D-M;const _=Math.cos(M),U=Math.sin(M),$=Math.cos(D),Y=Math.sin(D),k=Math.tan(L/4),H=4/3*(e*k),J=4/3*(n*k),F=[s,t],ct=[s+H*U,t-J*_],lt=[h+H*Y,p-J*$],vt=[h,p];if(ct[0]=2*F[0]-ct[0],ct[1]=2*F[1]-ct[1],y)return[ct,lt,vt].concat(w);{w=[ct,lt,vt].concat(w).join().split(",");const Ot=[],zt=w.length;for(let V=0;V<zt;V+=1)Ot[V]=V%2?Q1(+w[V-1],+w[V],S).y:Q1(+w[V],+w[V+1],S).x;return Ot}}function Fq(s){if(!s)return null;const t=`
|
|
162
|
+
\v\f\r \u2028\u2029`,e=new RegExp(`([a-z])[${t},]*((-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?[${t}]*,?[${t}]*)+)`,"ig"),n=new RegExp(`(-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?)[${t}]*,?[${t}]*`,"ig"),r={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},l=[];return s.replace(e,(f,h,p)=>{const y=[];let x=h.toLowerCase();p.replace(n,(w,T)=>(T&&y.push(+T),w)),x==="m"&&y.length>2&&(l.push([h,...y.splice(0,2)]),x="l",h=h==="m"?"l":"L");const S=r[x];for(;y.length>=S&&(l.push([h,...y.splice(0,S)]),!!S););return f}),l}function Jq(s){const t=Fq(s);if(!t||!t.length)return[["M",0,0]];let e=0,n=0,r=0,l=0;const f=[];for(let h=0,p=t.length;h<p;h+=1){const y=[];f.push(y);const x=t[h],S=x[0];if(S!==S.toUpperCase())switch(y[0]=S.toUpperCase(),y[0]){case"A":y[1]=x[1],y[2]=x[2],y[3]=x[3],y[4]=x[4],y[5]=x[5],y[6]=+x[6]+e,y[7]=+x[7]+n;break;case"V":y[1]=+x[1]+n;break;case"H":y[1]=+x[1]+e;break;case"M":r=+x[1]+e,l=+x[2]+n;for(let w=1,T=x.length;w<T;w+=1)y[w]=+x[w]+(w%2?e:n);break;default:for(let w=1,T=x.length;w<T;w+=1)y[w]=+x[w]+(w%2?e:n);break}else for(let w=0,T=x.length;w<T;w+=1)y[w]=x[w];switch(y[0]){case"Z":e=+r,n=+l;break;case"H":e=y[1];break;case"V":n=y[1];break;case"M":r=y[y.length-2],l=y[y.length-1],e=y[y.length-2],n=y[y.length-1];break;default:e=y[y.length-2],n=y[y.length-1];break}}return f}function Kq(s){const t=Jq(s),e={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null};function n(p,y,x){let S,w;if(!p)return["C",y.x,y.y,y.x,y.y,y.x,y.y];switch(p[0]in{T:1,Q:1}||(y.qx=null,y.qy=null),p[0]){case"M":y.X=p[1],y.Y=p[2];break;case"A":return parseFloat(p[1])===0||parseFloat(p[2])===0?["L",p[6],p[7]]:["C"].concat(TN.apply(0,[y.x,y.y].concat(p.slice(1))));case"S":return x==="C"||x==="S"?(S=y.x*2-y.bx,w=y.y*2-y.by):(S=y.x,w=y.y),["C",S,w].concat(p.slice(1));case"T":return x==="Q"||x==="T"?(y.qx=y.x*2-y.qx,y.qy=y.y*2-y.qy):(y.qx=y.x,y.qy=y.y),["C"].concat(AN(y.x,y.y,y.qx,y.qy,p[1],p[2]));case"Q":return y.qx=p[1],y.qy=p[2],["C"].concat(AN(y.x,y.y,p[1],p[2],p[3],p[4]));case"H":return["L"].concat(p[1],y.y);case"V":return["L"].concat(y.x,p[1])}return p}function r(p,y){if(p[y].length>7){p[y].shift();const x=p[y];for(;x.length;)l[y]="A",y+=1,p.splice(y,0,["C"].concat(x.splice(0,6)));p.splice(y,1),h=t.length}}const l=[];let f="",h=t.length;for(let p=0;p<h;p+=1){let y="";t[p]&&(y=t[p][0]),y!=="C"&&(l[p]=y,p>0&&(f=l[p-1])),t[p]=n(t[p],e,f),l[p]!=="A"&&y==="C"&&(l[p]="C"),r(t,p);const x=t[p],S=x.length;e.x=x[S-2],e.y=x[S-1],e.bx=parseFloat(x[S-4])||e.x,e.by=parseFloat(x[S-3])||e.y}return(!t[0][0]||t[0][0]!=="M")&&t.unshift(["M",0,0]),t}function MN(s){return Kq(s).map(t=>t.map(e=>typeof e=="string"?e:zh(e,2))).join(",").split(",").join(" ")}class Ft extends Ru{static isPath(t){return t!=null&&t instanceof Ft}static parse(t){if(!t)return new Ft;const e=new Ft,n=/(?:[a-zA-Z] *)(?:(?:-?\d+(?:\.\d+)?(?:e[-+]?\d+)? *,? *)|(?:-?\.\d+ *,? *))+|(?:[a-zA-Z] *)(?! |\d|-|\.)/g,r=MN(t).match(n);if(r!=null)for(let l=0,f=r.length;l<f;l+=1){const h=r[l],p=/(?:[a-zA-Z])|(?:(?:-?\d+(?:\.\d+)?(?:e[-+]?\d+)?))|(?:(?:-?\.\d+))/g,y=h.match(p);if(y!=null){const x=y[0],S=y.slice(1).map(T=>+T),w=Ft.createSegment.call(null,x,...S);e.appendSegment(w)}}return e}static createSegment(t,...e){if(t==="M")return el.create.call(null,...e);if(t==="L")return vi.create.call(null,...e);if(t==="C")return As.create.call(null,...e);if(t==="z"||t==="Z")return hb.create();throw new Error(`Invalid path segment type "${t}"`)}constructor(t){if(super(),this.PRECISION=3,this.segments=[],Array.isArray(t))if(Pt.isLine(t[0])||ni.isCurve(t[0])){let e=null;t.forEach((r,l)=>{l===0&&this.appendSegment(Ft.createSegment("M",r.start)),e!=null&&!e.end.equals(r.start)&&this.appendSegment(Ft.createSegment("M",r.start)),Pt.isLine(r)?this.appendSegment(Ft.createSegment("L",r.end)):ni.isCurve(r)&&this.appendSegment(Ft.createSegment("C",r.controlPoint1,r.controlPoint2,r.end)),e=r})}else t.forEach(n=>{n.isSegment&&this.appendSegment(n)});else t!=null&&(Pt.isLine(t)?(this.appendSegment(Ft.createSegment("M",t.start)),this.appendSegment(Ft.createSegment("L",t.end))):ni.isCurve(t)?(this.appendSegment(Ft.createSegment("M",t.start)),this.appendSegment(Ft.createSegment("C",t.controlPoint1,t.controlPoint2,t.end))):Oi.isPolyline(t)?t.points&&t.points.length&&t.points.forEach((e,n)=>{const r=n===0?Ft.createSegment("M",e):Ft.createSegment("L",e);this.appendSegment(r)}):t.isSegment&&this.appendSegment(t))}get start(){const t=this.segments,e=t.length;if(e===0)return null;for(let n=0;n<e;n+=1){const r=t[n];if(r.isVisible)return r.start}return t[e-1].end}get end(){const t=this.segments,e=t.length;if(e===0)return null;for(let n=e-1;n>=0;n-=1){const r=t[n];if(r.isVisible)return r.end}return t[e-1].end}moveTo(...t){return this.appendSegment(el.create.call(null,...t))}lineTo(...t){return this.appendSegment(vi.create.call(null,...t))}curveTo(...t){return this.appendSegment(As.create.call(null,...t))}arcTo(t,e,n,r,l,f,h){const p=this.end||new G,y=typeof f=="number"?CN(p.x,p.y,t,e,n,r,l,f,h):CN(p.x,p.y,t,e,n,r,l,f.x,f.y);if(y!=null)for(let x=0,S=y.length;x<S;x+=6)this.curveTo(y[x],y[x+1],y[x+2],y[x+3],y[x+4],y[x+5]);return this}quadTo(t,e,n,r){const l=this.end||new G,f=["M",l.x,l.y];if(typeof t=="number")f.push("Q",t,e,n,r);else{const p=e;f.push("Q",t.x,t.y,p.x,p.y)}const h=Ft.parse(f.join(" "));return this.appendSegment(h.segments.slice(1)),this}close(){return this.appendSegment(hb.create())}drawPoints(t,e={}){const n=Zq(t,e),r=Ft.parse(n);r&&r.segments&&this.appendSegment(r.segments)}bbox(){const t=this.segments,e=t.length;if(e===0)return null;let n;for(let l=0;l<e;l+=1){const f=t[l];if(f.isVisible){const h=f.bbox();h!=null&&(n=n?n.union(h):h)}}if(n!=null)return n;const r=t[e-1];return new Dt(r.end.x,r.end.y,0,0)}appendSegment(t){const e=this.segments.length;let n=e!==0?this.segments[e-1]:null,r;const l=null;if(Array.isArray(t))for(let f=0,h=t.length;f<h;f+=1){const p=t[f];r=this.prepareSegment(p,n,l),this.segments.push(r),n=r}else t!=null&&t.isSegment&&(r=this.prepareSegment(t,n,l),this.segments.push(r));return this}insertSegment(t,e){const n=this.segments.length;if(t<0&&(t=n+t+1),t>n||t<0)throw new Error("Index out of range.");let r,l=null,f=null;if(n!==0&&(t>=1?(l=this.segments[t-1],f=l.nextSegment):(l=null,f=this.segments[0])),!Array.isArray(e))r=this.prepareSegment(e,l,f),this.segments.splice(t,0,r);else for(let h=0,p=e.length;h<p;h+=1){const y=e[h];r=this.prepareSegment(y,l,f),this.segments.splice(t+h,0,r),l=r}return this}removeSegment(t){const e=this.fixIndex(t),n=this.segments.splice(e,1)[0],r=n.previousSegment,l=n.nextSegment;return r&&(r.nextSegment=l),l&&(l.previousSegment=r),n.isSubpathStart&&l&&this.updateSubpathStartSegment(l),n}replaceSegment(t,e){const n=this.fixIndex(t);let r;const l=this.segments[n];let f=l.previousSegment;const h=l.nextSegment;let p=l.isSubpathStart;if(!Array.isArray(e))r=this.prepareSegment(e,f,h),this.segments.splice(n,1,r),p&&r.isSubpathStart&&(p=!1);else{this.segments.splice(t,1);for(let y=0,x=e.length;y<x;y+=1){const S=e[y];r=this.prepareSegment(S,f,h),this.segments.splice(t+y,0,r),f=r,p&&r.isSubpathStart&&(p=!1)}}p&&h&&this.updateSubpathStartSegment(h)}getSegment(t){const e=this.fixIndex(t);return this.segments[e]}fixIndex(t){const e=this.segments.length;if(e===0)throw new Error("Path has no segments.");let n=t;for(;n<0;)n=e+n;if(n>=e||n<0)throw new Error("Index out of range.");return n}segmentAt(t,e={}){const n=this.segmentIndexAt(t,e);return n?this.getSegment(n):null}segmentAtLength(t,e={}){const n=this.segmentIndexAtLength(t,e);return n?this.getSegment(n):null}segmentIndexAt(t,e={}){if(this.segments.length===0)return null;const n=Wg(t,0,1),r=this.getOptions(e),f=this.length(r)*n;return this.segmentIndexAtLength(f,r)}segmentIndexAtLength(t,e={}){const n=this.segments.length;if(n===0)return null;let r=!0;t<0&&(r=!1,t=-t);const l=this.getPrecision(e),f=this.getSubdivisions(e);let h=0,p=null;for(let y=0;y<n;y+=1){const x=r?y:n-1-y,S=this.segments[x],w=f[x],T=S.length({precision:l,subdivisions:w});if(S.isVisible){if(t<=h+T)return x;p=x}h+=T}return p}getSegmentSubdivisions(t={}){const e=this.getPrecision(t),n=[];for(let r=0,l=this.segments.length;r<l;r+=1){const h=this.segments[r].getSubdivisions({precision:e});n.push(h)}return n}updateSubpathStartSegment(t){let e=t.previousSegment,n=t;for(;n&&!n.isSubpathStart;)e!=null?n.subpathStartSegment=e.subpathStartSegment:n.subpathStartSegment=null,e=n,n=n.nextSegment}prepareSegment(t,e,n){t.previousSegment=e,t.nextSegment=n,e!=null&&(e.nextSegment=t),n!=null&&(n.previousSegment=t);let r=t;return t.isSubpathStart&&(t.subpathStartSegment=t,r=n),r!=null&&this.updateSubpathStartSegment(r),t}closestPoint(t,e={}){const n=this.closestPointT(t,e);return n?this.pointAtT(n):null}closestPointLength(t,e={}){const n=this.getOptions(e),r=this.closestPointT(t,n);return r?this.lengthAtT(r,n):0}closestPointNormalizedLength(t,e={}){const n=this.getOptions(e),r=this.closestPointLength(t,n);if(r===0)return 0;const l=this.length(n);return l===0?0:r/l}closestPointT(t,e={}){if(this.segments.length===0)return null;const n=this.getPrecision(e),r=this.getSubdivisions(e);let l,f=1/0;for(let h=0,p=this.segments.length;h<p;h+=1){const y=this.segments[h],x=r[h];if(y.isVisible){const S=y.closestPointT(t,{precision:n,subdivisions:x}),w=y.pointAtT(S),T=wN(w,t);T<f&&(l={segmentIndex:h,value:S},f=T)}}return l||{segmentIndex:this.segments.length-1,value:1}}closestPointTangent(t,e={}){if(this.segments.length===0)return null;const n=this.getPrecision(e),r=this.getSubdivisions(e);let l,f=1/0;for(let h=0,p=this.segments.length;h<p;h+=1){const y=this.segments[h],x=r[h];if(y.isDifferentiable()){const S=y.closestPointT(t,{precision:n,subdivisions:x}),w=y.pointAtT(S),T=wN(w,t);T<f&&(l=y.tangentAtT(S),f=T)}}return l||null}containsPoint(t,e={}){const n=this.toPolylines(e);if(!n)return!1;let r=0;for(let l=0,f=n.length;l<f;l+=1)n[l].containsPoint(t)&&(r+=1);return r%2===1}pointAt(t,e={}){if(this.segments.length===0)return null;if(t<=0)return this.start.clone();if(t>=1)return this.end.clone();const n=this.getOptions(e),l=this.length(n)*t;return this.pointAtLength(l,n)}pointAtLength(t,e={}){if(this.segments.length===0)return null;if(t===0)return this.start.clone();let n=!0;t<0&&(n=!1,t=-t);const r=this.getPrecision(e),l=this.getSubdivisions(e);let f,h=0;for(let y=0,x=this.segments.length;y<x;y+=1){const S=n?y:x-1-y,w=this.segments[S],T=l[S],M=w.length({precision:r,subdivisions:T});if(w.isVisible){if(t<=h+M)return w.pointAtLength((n?1:-1)*(t-h),{precision:r,subdivisions:T});f=w}h+=M}return f?n?f.end:f.start:this.segments[this.segments.length-1].end.clone()}pointAtT(t){const e=this.segments,n=e.length;if(n===0)return null;const r=t.segmentIndex;if(r<0)return e[0].pointAtT(0);if(r>=n)return e[n-1].pointAtT(1);const l=Wg(t.value,0,1);return e[r].pointAtT(l)}divideAt(t,e={}){if(this.segments.length===0)return null;const n=Wg(t,0,1),r=this.getOptions(e),f=this.length(r)*n;return this.divideAtLength(f,r)}divideAtLength(t,e={}){if(this.segments.length===0)return null;let n=!0;t<0&&(n=!1,t=-t);const r=this.getPrecision(e),l=this.getSubdivisions(e);let f=0,h,p,y,x,S;for(let $=0,Y=this.segments.length;$<Y;$+=1){const k=n?$:Y-1-$,H=this.getSegment(k),J=l[k],F={precision:r,subdivisions:J},ct=H.length(F);if(H.isDifferentiable()&&(y=H,x=k,t<=f+ct)){p=k,h=H.divideAtLength((n?1:-1)*(t-f),F);break}f+=ct}if(!y)return null;h||(p=x,S=n?1:0,h=y.divideAtT(S));const w=this.clone(),T=p;w.replaceSegment(T,h);const M=T;let D=T+1,R=T+2;h[0].isDifferentiable()||(w.removeSegment(M),D-=1,R-=1);const N=w.getSegment(D).start;w.insertSegment(D,Ft.createSegment("M",N)),R+=1,h[1].isDifferentiable()||(w.removeSegment(R-1),R-=1);const L=R-M-1;for(let $=R,Y=w.segments.length;$<Y;$+=1){const k=this.getSegment($-L),H=w.getSegment($);if(H.type==="Z"&&!k.subpathStartSegment.end.equals(H.subpathStartSegment.end)){const J=Ft.createSegment("L",k.end);w.replaceSegment($,J)}}const _=new Ft(w.segments.slice(0,D)),U=new Ft(w.segments.slice(D));return[_,U]}intersectsWithLine(t,e={}){const n=this.toPolylines(e);if(n==null)return null;let r=null;for(let l=0,f=n.length;l<f;l+=1){const h=n[l],p=t.intersect(h);p&&(r==null&&(r=[]),Array.isArray(p)?r.push(...p):r.push(p))}return r}isDifferentiable(){for(let t=0,e=this.segments.length;t<e;t+=1)if(this.segments[t].isDifferentiable())return!0;return!1}isValid(){const t=this.segments;return t.length===0||t[0].type==="M"}length(t={}){if(this.segments.length===0)return 0;const e=this.getSubdivisions(t);let n=0;for(let r=0,l=this.segments.length;r<l;r+=1){const f=this.segments[r],h=e[r];n+=f.length({subdivisions:h})}return n}lengthAtT(t,e={}){const n=this.segments.length;if(n===0)return 0;let r=t.segmentIndex;if(r<0)return 0;let l=Wg(t.value,0,1);r>=n&&(r=n-1,l=1);const f=this.getPrecision(e),h=this.getSubdivisions(e);let p=0;for(let S=0;S<r;S+=1){const w=this.segments[S],T=h[S];p+=w.length({precision:f,subdivisions:T})}const y=this.segments[r],x=h[r];return p+=y.lengthAtT(l,{precision:f,subdivisions:x}),p}tangentAt(t,e={}){if(this.segments.length===0)return null;const n=Wg(t,0,1),r=this.getOptions(e),f=this.length(r)*n;return this.tangentAtLength(f,r)}tangentAtLength(t,e={}){if(this.segments.length===0)return null;let n=!0;t<0&&(n=!1,t=-t);const r=this.getPrecision(e),l=this.getSubdivisions(e);let f,h=0;for(let p=0,y=this.segments.length;p<y;p+=1){const x=n?p:y-1-p,S=this.segments[x],w=l[x],T=S.length({precision:r,subdivisions:w});if(S.isDifferentiable()){if(t<=h+T)return S.tangentAtLength((n?1:-1)*(t-h),{precision:r,subdivisions:w});f=S}h+=T}if(f){const p=n?1:0;return f.tangentAtT(p)}return null}tangentAtT(t){const e=this.segments.length;if(e===0)return null;const n=t.segmentIndex;if(n<0)return this.segments[0].tangentAtT(0);if(n>=e)return this.segments[e-1].tangentAtT(1);const r=Wg(t.value,0,1);return this.segments[n].tangentAtT(r)}getPrecision(t={}){return t.precision==null?this.PRECISION:t.precision}getSubdivisions(t={}){if(t.segmentSubdivisions==null){const e=this.getPrecision(t);return this.getSegmentSubdivisions({precision:e})}return t.segmentSubdivisions}getOptions(t={}){const e=this.getPrecision(t),n=this.getSubdivisions(t);return{precision:e,segmentSubdivisions:n}}toPoints(t={}){const e=this.segments,n=e.length;if(n===0)return null;const r=this.getSubdivisions(t),l=[];let f=[];for(let h=0;h<n;h+=1){const p=e[h];if(p.isVisible){const y=r[h];y.length>0?y.forEach(x=>f.push(x.start)):f.push(p.start)}else f.length>0&&(f.push(e[h-1].end),l.push(f),f=[])}return f.length>0&&(f.push(this.end),l.push(f)),l}toPolylines(t={}){const e=this.toPoints(t);return e?e.map(n=>new Oi(n)):null}scale(t,e,n){return this.segments.forEach(r=>r.scale(t,e,n)),this}rotate(t,e){return this.segments.forEach(n=>n.rotate(t,e)),this}translate(t,e){return typeof t=="number"?this.segments.forEach(n=>n.translate(t,e)):this.segments.forEach(n=>n.translate(t)),this}clone(){const t=new Ft;return this.segments.forEach(e=>t.appendSegment(e.clone())),t}equals(t){if(t==null)return!1;const e=this.segments,n=t.segments,r=e.length;if(n.length!==r)return!1;for(let l=0;l<r;l+=1){const f=e[l],h=n[l];if(f.type!==h.type||!f.equals(h))return!1}return!0}toJSON(){return this.segments.map(t=>t.toJSON())}serialize(){if(!this.isValid())throw new Error("Invalid path segments.");return this.segments.map(t=>t.serialize()).join(" ")}toString(){return this.serialize()}}function tp(s,t,e){let n,r;typeof t=="object"?(n=t.x,r=t.y):(n=t,r=e);const l=Ft.parse(s),f=l.bbox();if(f){let h=-f.height/2-f.y,p=-f.width/2-f.x;typeof n=="number"&&(p-=n),typeof r=="number"&&(h-=r),l.translate(p,h)}return l.serialize()}const PA=/[\t\r\n\f]/g,UA=/\S+/g,ep=s=>` ${s} `;function np(s){return s&&s.getAttribute&&s.getAttribute("class")||""}function nl(s,t){if(s==null||t==null)return!1;const e=ep(np(s)),n=ep(t);return s.nodeType===1?e.replace(PA," ").includes(n):!1}function _t(s,t){if(!(s==null||t==null)){if(typeof t=="function")return _t(s,t(np(s)));if(typeof t=="string"&&s.nodeType===1){const e=t.match(UA)||[],n=ep(np(s)).replace(PA," ");let r=e.reduce((l,f)=>l.indexOf(ep(f))<0?`${l}${f} `:l,n);r=r.trim(),n!==r&&s.setAttribute("class",r)}}}function dn(s,t){if(s!=null){if(typeof t=="function")return dn(s,t(np(s)));if((!t||typeof t=="string")&&s.nodeType===1){const e=(t||"").match(UA)||[],n=ep(np(s)).replace(PA," ");let r=e.reduce((l,f)=>{const h=ep(f);return l.indexOf(h)>-1?l.replace(h," "):l},n);r=t?r.trim():"",n!==r&&s.setAttribute("class",r)}}}function da(s,t,e){if(!(s==null||t==null)){if(e!=null&&typeof t=="string"){e?_t(s,t):dn(s,t);return}if(typeof t=="function")return da(s,t(np(s),e),e);typeof t=="string"&&(t.match(UA)||[]).forEach(r=>{nl(s,r)?dn(s,r):_t(s,r)})}}let ON=0;function Wq(){return ON+=1,`v${ON}`}function HA(s){return(s.id==null||s.id==="")&&(s.id=Wq()),s.id}function zu(s){return s==null?!1:typeof s.getScreenCTM=="function"&&s instanceof SVGElement}const Di={svg:"http://www.w3.org/2000/svg",xmlns:"http://www.w3.org/2000/xmlns/",xml:"http://www.w3.org/XML/1998/namespace",xlink:"http://www.w3.org/1999/xlink",xhtml:"http://www.w3.org/1999/xhtml"},DN="1.1";function RN(s,t=document){return t.createElement(s)}function kA(s,t=Di.xhtml,e=document){return e.createElementNS(t,s)}function ga(s,t=document){return kA(s,Di.svg,t)}function F1(s){if(s){const e=`<svg xmlns="${Di.svg}" xmlns:xlink="${Di.xlink}" version="${DN}">${s}</svg>`,{documentElement:n}=tY(e,{async:!1});return n}const t=document.createElementNS(Di.svg,"svg");return t.setAttributeNS(Di.xmlns,"xmlns:xlink",Di.xlink),t.setAttribute("version",DN),t}function tY(s,t={}){let e;try{const n=new DOMParser;if(t.async!=null){const r=n;r.async=t.async}e=n.parseFromString(s,t.mimeType||"text/xml")}catch{e=void 0}if(!e||e.getElementsByTagName("parsererror").length)throw new Error(`Invalid XML: ${s}`);return e}function eY(s,t=!0){const e=s.nodeName;return t?e.toLowerCase():e.toUpperCase()}function VA(s){let t=0,e=s.previousSibling;for(;e;)e.nodeType===1&&(t+=1),e=e.previousSibling;return t}function nY(s,t){return s.querySelectorAll(t)}function iY(s,t){return s.querySelector(t)}function zN(s,t,e){const n=s.ownerSVGElement;let r=s.parentNode;for(;r&&r!==e&&r!==n;){if(nl(r,t))return r;r=r.parentNode}return null}function GA(s,t){const e=t&&t.parentNode;return s===e||!!(e&&e.nodeType===1&&s.compareDocumentPosition(e)&16)}function or(s){s&&(Array.isArray(s)?s:[s]).forEach(e=>{e.parentNode&&e.parentNode.removeChild(e)})}function db(s){for(;s.firstChild;)s.removeChild(s.firstChild)}function qi(s,t){(Array.isArray(t)?t:[t]).forEach(n=>{n!=null&&s.appendChild(n)})}function NN(s,t){const e=s.firstChild;return e?gb(e,t):qi(s,t)}function gb(s,t){const e=s.parentNode;e&&(Array.isArray(t)?t:[t]).forEach(r=>{r!=null&&e.insertBefore(r,s)})}function sY(s,t){const e=s.parentNode;e&&(Array.isArray(t)?t:[t]).forEach(r=>{r!=null&&e.insertBefore(r,s.nextSibling)})}function rr(s,t){t!=null&&t.appendChild(s)}function oY(s){return!!s&&s.nodeType===1}function LN(s){try{return s instanceof HTMLElement}catch{return typeof s=="object"&&s.nodeType===1&&typeof s.style=="object"&&typeof s.ownerDocument=="object"}}function rY(s,t){const e=[];let n=s.firstChild;for(;n;n=n.nextSibling)n.nodeType===1&&(!t||nl(n,t))&&e.push(n);return e}const jN=s=>{const t=Object.create(null);return e=>t[e]||(t[e]=s(e))},_N=jN(s=>s.replace(/\B([A-Z])/g,"-$1").toLowerCase()),$A=jN(s=>Cq(cb(s)).replace(/ /g,"")),BN=["viewBox","attributeName","attributeType","repeatCount","textLength","lengthAdjust","gradientUnits","preserveAspectRatio"];function aY(s,t){return s.getAttribute(t)}function qA(s,t){const e=UN(t);e.ns?s.hasAttributeNS(e.ns,e.local)&&s.removeAttributeNS(e.ns,e.local):s.hasAttribute(t)&&s.removeAttribute(t)}function YA(s,t,e){if(e==null)return qA(s,t);const n=UN(t);n.ns&&typeof e=="string"?s.setAttributeNS(n.ns,t,e):t==="id"?s.id=`${e}`:s.setAttribute(t,`${e}`)}function PN(s,t){Object.keys(t).forEach(e=>{YA(s,e,t[e])})}function Te(s,t,e){if(t==null){const n=s.attributes,r={};for(let l=0;l<n.length;l+=1)r[n[l].name]=n[l].value;return r}if(typeof t=="string"&&e===void 0)return s.getAttribute(t);typeof t=="object"?PN(s,t):YA(s,t,e)}function UN(s){if(s.indexOf(":")!==-1){const t=s.split(":");return{ns:Di[t[0]],local:t[1]}}return{ns:null,local:s}}function pb(s){const t={};return Object.keys(s).forEach(e=>{const n=BN.includes(e)?e:_N(e);t[n]=s[e]}),t}function J1(s){const t={};return s.split(";").forEach(n=>{const r=n.trim();if(r){const l=r.split("=");l.length&&(t[l[0].trim()]=l[1]?l[1].trim():"")}}),t}function XA(s,t){return Object.keys(t).forEach(e=>{if(e==="class")s[e]=s[e]?`${s[e]} ${t[e]}`:t[e];else if(e==="style"){const n=typeof s[e]=="object",r=typeof t[e]=="object";let l,f;n&&r?(l=s[e],f=t[e]):n?(l=s[e],f=J1(t[e])):r?(l=J1(s[e]),f=t[e]):(l=J1(s[e]),f=J1(t[e])),s[e]=XA(l,f)}else s[e]=t[e]}),s}const lY=/-(.)/g;function cY(s){return s.replace(lY,(t,e)=>e.toUpperCase())}const IA={},HN=["webkit","ms","moz","o"],kN=typeof document<"u"?document.createElement("div").style:{};function uY(s){for(let t=0;t<HN.length;t+=1){const e=HN[t]+s;if(e in kN)return e}return null}function fY(s){const t=cY(s);if(IA[t]==null){const e=t.charAt(0).toUpperCase()+t.slice(1);IA[t]=t in kN?t:uY(e)}return IA[t]}function VN(s,t){const e=s.ownerDocument&&s.ownerDocument.defaultView&&s.ownerDocument.defaultView.opener?s.ownerDocument.defaultView.getComputedStyle(s,null):window.getComputedStyle(s,null);return e&&t?e.getPropertyValue(t)||e[t]:e}const hY={animationIterationCount:!0,columnCount:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0};function dY(s){return/^--/.test(s)}function K1(s,t,e){const n=window.getComputedStyle(s,null);return e?n.getPropertyValue(t)||void 0:n[t]||s.style[t]}function W1(s,t){return parseInt(K1(s,t),10)||0}function gY(s,t){return!hY[s]&&typeof t=="number"?`${t}px`:t}function $e(s,t,e){if(typeof t=="string"){const n=dY(t);if(n||(t=fY(t)),e===void 0)return K1(s,t,n);n||(e=gY(t,e));const r=s.style;n?r.setProperty(t,e):r[t]=e;return}for(const n in t)$e(s,n,t[n])}function ZA(s){let t=2166136261,e=!1,n=s;for(let r=0,l=n.length;r<l;r+=1){let f=n.charCodeAt(r);f>127&&!e&&(n=unescape(encodeURIComponent(n)),f=n.charCodeAt(r),e=!0),t^=f,t+=(t<<1)+(t<<4)+(t<<7)+(t<<8)+(t<<24)}return t>>>0}function QA(){let s="";const t="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx";for(let e=0,n=t.length;e<n;e+=1){const r=t[e],l=Math.random()*16|0,f=r==="x"?l:r==="y"?l&3|8:r;s+=f.toString(16)}return s}function pY(s,t,e){const n=Math.min(2,Math.floor(s.length*.34));let r=Math.floor(s.length*.4)+1,l,f=!1;const h=s.toLowerCase();for(const p of t){const y=e(p);if(y!==void 0&&Math.abs(y.length-h.length)<=n){const x=y.toLowerCase();if(x===h){if(y===s)continue;return p}if(f||y.length<3)continue;const S=mY(h,x,r-1);if(S===void 0)continue;S<3?(f=!0,l=p):(r=S,l=p)}}return l}function mY(s,t,e){let n=new Array(t.length+1),r=new Array(t.length+1);const l=e+1;for(let h=0;h<=t.length;h+=1)n[h]=h;for(let h=1;h<=s.length;h+=1){const p=s.charCodeAt(h-1),y=h>e?h-e:1,x=t.length>e+h?e+h:t.length;r[0]=h;let S=h;for(let T=1;T<y;T+=1)r[T]=l;for(let T=y;T<=x;T+=1){const M=p===t.charCodeAt(T-1)?n[T-1]:Math.min(n[T]+1,r[T-1]+1,n[T-1]+2);r[T]=M,S=Math.min(S,M)}for(let T=x+1;T<=t.length;T+=1)r[T]=l;if(S>e)return;const w=n;n=r,r=w}const f=n[t.length];return f>e?void 0:f}const tS=new WeakMap;function yY(s,t){const e=cb(t),n=tS.get(s);if(n)return n[e]}function bY(s,t,e){const n=cb(t),r=tS.get(s);r?r[n]=e:tS.set(s,{[n]:e})}function Nh(s,t,e){if(!t)return tS.get(s);if(typeof t=="string"){if(e===void 0)return yY(s,t);bY(s,t,e);return}for(const n in t)Nh(s,n,t[n])}const vY={class:"className",contenteditable:"contentEditable",for:"htmlFor",readonly:"readOnly",maxlength:"maxLength",tabindex:"tabIndex",colspan:"colSpan",rowspan:"rowSpan",usemap:"useMap"};function FA(s,t,e){if(t){if(typeof t=="string"){if(t=vY[t]||t,arguments.length<3)return s[t];s[t]=e;return}for(const n in t)FA(s,n,t[n])}}function xY(s,...t){t.forEach(e=>{Object.getOwnPropertyNames(e.prototype).forEach(n=>{n!=="constructor"&&Object.defineProperty(s.prototype,n,Object.getOwnPropertyDescriptor(e.prototype,n))})})}const SY=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,t){s.__proto__=t}||function(s,t){for(const e in t)Object.prototype.hasOwnProperty.call(t,e)&&(s[e]=t[e])};function wY(s,t){SY(s,t);function e(){this.constructor=s}s.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}let CY=class{};const EY=/^\s*class\s+/.test(`${CY}`)||/^\s*class\s*\{/.test(`${class{}}`);function JA(s,t){let e;return EY?e=class extends t{}:(e=function(){return t.apply(this,arguments)},wY(e,t)),Object.defineProperty(e,"name",{value:s}),e}function GN(s){return s==="__proto__"}function KA(s,t,e="/"){let n;const r=Array.isArray(t)?t:t.split(e);if(r.length)for(n=s;r.length;){const l=r.shift();if(Object(n)===n&&l&&l in n)n=n[l];else return}return n}function ip(s,t,e,n="/"){const r=Array.isArray(t)?t:t.split(n),l=r.pop();if(l&&!GN(l)){let f=s;r.forEach(h=>{GN(h)||(f[h]==null&&(f[h]={}),f=f[h])}),f[l]=e}return s}function $N(s,t,e="/"){const n=Array.isArray(t)?t.slice():t.split(e),r=n.pop();if(r)if(n.length>0){const l=KA(s,n);l&&delete l[r]}else delete s[r];return s}function AY(s,t,e={}){const n=e.offset||0,r=[],l=[];let f,h,p=null;for(let y=0;y<s.length;y+=1){f=l[y]=s[y];for(let x=0,S=t.length;x<S;x+=1){const w=t[x],T=w.start+n,M=w.end+n;y>=T&&y<M&&(typeof f=="string"?f=l[y]={t:s[y],attrs:w.attrs}:f.attrs=XA(XA({},f.attrs),w.attrs),e.includeAnnotationIndices&&(f.annotations==null&&(f.annotations=[]),f.annotations.push(x)))}h=l[y-1],h?Vn(f)&&Vn(h)?(p=p,JSON.stringify(f.attrs)===JSON.stringify(h.attrs)?p.t+=f.t:(r.push(p),p=f)):Vn(f)||Vn(h)?(p=p,r.push(p),p=f):p=String(p||"")+String(f):p=f}return p!=null&&r.push(p),r}function TY(s){return s.replace(/ /g," ")}class Xt{get[Symbol.toStringTag](){return qN}get type(){return this.node.nodeName}get id(){return this.node.id}set id(t){this.node.id=t}static isVector(t){if(t==null)return!1;if(t instanceof Xt)return!0;const e=t[Symbol.toStringTag],n=t;return(e==null||e===qN)&&n.node instanceof SVGElement&&typeof n.sample=="function"&&typeof n.toPath=="function"}static create(t,e,n){return new Xt(t,e,n)}static createVectors(t){if(t[0]==="<"){const e=F1(t),n=[];for(let r=0,l=e.childNodes.length;r<l;r+=1){const f=e.childNodes[r];n.push(Xt.create(document.importNode(f,!0)))}return n}return[Xt.create(t)]}static toNode(t){return Xt.isVector(t)?t.node:t}static toNodes(t){return Array.isArray(t)?t.map(e=>Xt.toNode(e)):[Xt.toNode(t)]}constructor(t,e,n){if(!t)throw new TypeError("Invalid element to create vector");let r;if(Xt.isVector(t))r=t.node;else if(typeof t=="string")if(t.toLowerCase()==="svg")r=F1();else if(t[0]==="<"){const l=F1(t);r=document.importNode(l.firstChild,!0)}else r=document.createElementNS(Di.svg,t);else r=t;this.node=r,e&&this.setAttributes(e),n&&this.append(n)}transform(t,e){return t==null?sp(this.node):(sp(this.node,t,e),this)}translate(t,e=0,n={}){return t==null?WN(this.node):(WN(this.node,t,e,n),this)}rotate(t,e,n,r={}){return t==null?eT(this.node):(eT(this.node,t,e,n,r),this)}scale(t,e){return t==null?t3(this.node):(t3(this.node,t,e),this)}getTransformToElement(t){const e=Xt.toNode(t);return nT(this.node,e)}removeAttribute(t){return qA(this.node,t),this}getAttribute(t){return aY(this.node,t)}setAttribute(t,e){return YA(this.node,t,e),this}setAttributes(t){return PN(this.node,t),this}attr(t,e){return t==null?Te(this.node):typeof t=="string"&&e===void 0?Te(this.node,t):(typeof t=="object"?Te(this.node,t):Te(this.node,t,e),this)}svg(){return this.node instanceof SVGSVGElement?this:Xt.create(this.node.ownerSVGElement)}defs(){const t=this.svg()||this,e=t.node.getElementsByTagName("defs")[0];return e?Xt.create(e):Xt.create("defs").appendTo(t)}text(t,e={}){return XN(this.node,t,e),this}tagName(){return eY(this.node)}clone(){return Xt.create(this.node.cloneNode(!0))}remove(){return or(this.node),this}empty(){return db(this.node),this}append(t){return qi(this.node,Xt.toNodes(t)),this}appendTo(t){return rr(this.node,Xt.isVector(t)?t.node:t),this}prepend(t){return NN(this.node,Xt.toNodes(t)),this}before(t){return gb(this.node,Xt.toNodes(t)),this}replace(t){return this.node.parentNode&&this.node.parentNode.replaceChild(Xt.toNode(t),this.node),Xt.create(t)}first(){return this.node.firstChild?Xt.create(this.node.firstChild):null}last(){return this.node.lastChild?Xt.create(this.node.lastChild):null}get(t){const e=this.node.childNodes[t];return e?Xt.create(e):null}indexOf(t){return Array.prototype.slice.call(this.node.childNodes).indexOf(Xt.toNode(t))}find(t){const e=[],n=nY(this.node,t);if(n)for(let r=0,l=n.length;r<l;r+=1)e.push(Xt.create(n[r]));return e}findOne(t){const e=iY(this.node,t);return e?Xt.create(e):null}findParentByClass(t,e){const n=zN(this.node,t,e);return n?Xt.create(n):null}matches(t){const e=this.node;this.node.matches;const n=e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.oMatchesSelector||null;return n&&n.call(e,t)}contains(t){return GA(this.node,Xt.isVector(t)?t.node:t)}wrap(t){const e=Xt.create(t),n=this.node.parentNode;return n!=null&&n.insertBefore(e.node,this.node),e.append(this)}parent(t){let e=this;if(e.node.parentNode==null)return null;if(e=Xt.create(e.node.parentNode),t==null)return e;do if(typeof t=="string"?e.matches(t):e instanceof t)return e;while(e=Xt.create(e.node.parentNode));return e}children(){const t=this.node.childNodes,e=[];for(let n=0;n<t.length;n+=1)t[n].nodeType===1&&e.push(Xt.create(t[n]));return e}eachChild(t,e){const n=this.children();for(let r=0,l=n.length;r<l;r+=1)t.call(n[r],n[r],r,n),e&&n[r].eachChild(t,e);return this}index(){return VA(this.node)}hasClass(t){return nl(this.node,t)}addClass(t){return _t(this.node,t),this}removeClass(t){return dn(this.node,t),this}toggleClass(t,e){return da(this.node,t,e),this}toLocalPoint(t,e){return IY(this.node,t,e)}sample(t=1){return this.node instanceof SVGPathElement?RY(this.node,t):[]}toPath(){return Xt.create(PY(this.node))}toPathData(){return JN(this.node)}}const qN=`X6.${Xt.name}`;function MY(s,t){const e=Xt.create(t),n=Xt.create("textPath"),r=s.d;if(r&&s["xlink:href"]===void 0){const l=Xt.create("path").attr("d",r).appendTo(e.defs());n.attr("xlink:href",`#${l.id}`)}return typeof s=="object"&&n.attr(s),n.node}function OY(s,t,e){const n=e.eol,r=e.baseSize,l=e.lineHeight;let f=0,h;const p={},y=t.length-1;for(let x=0;x<=y;x+=1){let S=t[x],w=null;if(typeof S=="object"){const T=S.attrs,M=Xt.create("tspan",T);h=M.node;let D=S.t;n&&x===y&&(D+=n),h.textContent=D;const R=T.class;R&&M.addClass(R),e.includeAnnotationIndices&&M.attr("annotations",S.annotations.join(",")),w=parseFloat(T["font-size"]),w===void 0&&(w=r),w&&w>f&&(f=w)}else n&&x===y&&(S+=n),h=document.createTextNode(S||" "),r&&r>f&&(f=r);s.appendChild(h)}return f&&(p.maxFontSize=f),l?p.lineHeight=l:f&&(p.lineHeight=f*1.2),p}const YN=/em$/;function eS(s,t){const e=parseFloat(s);return YN.test(s)?e*t:e}function DY(s,t,e,n){if(!Array.isArray(t))return 0;const r=t.length;if(!r)return 0;let l=t[0];const f=eS(l.maxFontSize,e)||e;let h=0;const p=eS(n,e);for(let S=1;S<r;S+=1){l=t[S];const w=eS(l.lineHeight,e)||p;h+=w}const y=eS(l.maxFontSize,e)||e;let x;switch(s){case"middle":x=f/2-.15*y-h/2;break;case"bottom":x=-(.25*y)-h;break;case"top":default:x=.8*f;break}return x}function XN(s,t,e={}){t=TY(t);const n=e.eol;let r=e.textPath;const l=e.textVerticalAnchor,f=l==="middle"||l==="bottom"||l==="top";let h=e.x;h===void 0&&(h=s.getAttribute("x")||0);const p=e.includeAnnotationIndices;let y=e.annotations;y&&!Array.isArray(y)&&(y=[y]);const x=e.lineHeight,S=x==="auto",w=S?"1.5em":x||"1em";let T=!0;const M=s.childNodes;if(M.length===1){const J=M[0];J&&J.tagName.toUpperCase()==="TITLE"&&(T=!1)}T&&db(s),Te(s,{"xml:space":"preserve",display:t||e.displayEmpty?null:"none"});const D=Te(s,"font-size");let R=parseFloat(D);R||(R=16,(f||y)&&!D&&Te(s,"font-size",`${R}`));let N;r?(typeof r=="string"&&(r={d:r}),N=MY(r,s)):N=document.createDocumentFragment();let L,_=0,U;const $=t.split(`
|
|
163
|
+
`),Y=[],k=$.length-1;for(let J=0;J<=k;J+=1){L=w;let F="v-line";const ct=ga("tspan");let lt,vt=$[J];if(vt)if(y){const Ot=AY(vt,y,{offset:-_,includeAnnotationIndices:p});lt=OY(ct,Ot,{eol:J!==k&&n,baseSize:R,lineHeight:S?null:w,includeAnnotationIndices:p});const zt=lt.lineHeight;zt&&S&&J!==0&&(L=zt),J===0&&(U=lt.maxFontSize*.8)}else n&&J!==k&&(vt+=n),ct.textContent=vt;else{ct.textContent="-",F+=" v-empty-line";const Ot=ct.style;Ot.fillOpacity=0,Ot.strokeOpacity=0,y&&(lt={})}lt&&Y.push(lt),J>0&&ct.setAttribute("dy",L),(J>0||r)&&ct.setAttribute("x",h),ct.className.baseVal=F,N.appendChild(ct),_+=vt.length+1}if(f)if(y)L=DY(l,Y,R,w);else if(l==="top")L="0.8em";else{let J;switch(k>0?(J=parseFloat(w)||1,J*=k,YN.test(w)||(J/=R)):J=0,l){case"middle":L=`${.3-J/2}em`;break;case"bottom":L=`${-J-.3}em`;break}}else l===0?L="0em":l?L=l:(L=0,s.getAttribute("y")==null&&s.setAttribute("y",`${U||"0.8em"}`));N.firstChild.setAttribute("dy",L),s.appendChild(N)}function mb(s,t={}){const e=document.createElement("canvas").getContext("2d");if(!s)return{width:0};const n=[],r=t["font-size"]?`${parseFloat(t["font-size"])}px`:"14px";return n.push(t["font-style"]||"normal"),n.push(t["font-variant"]||"normal"),n.push(t["font-weight"]||400),n.push(r),n.push(t["font-family"]||"sans-serif"),e.font=n.join(" "),e.measureText(s)}function IN(s,t,e,n={}){if(t>=e)return[s,""];const r=s.length,l={};let f=Math.round(t/e*r-1);for(f<0&&(f=0);f>=0&&f<r;){const h=s.slice(0,f),p=l[h]||mb(h,n).width,y=s.slice(0,f+1),x=l[y]||mb(y,n).width;if(l[h]=p,l[y]=x,p>t)f-=1;else if(x<=t)f+=1;else break}return[s.slice(0,f),s.slice(f)]}function ZN(s,t,e={},n={}){const r=t.width,l=t.height,f=n.eol||`
|
|
164
|
+
`,h=e.fontSize||14,p=e.lineHeight?parseFloat(e.lineHeight):Math.ceil(h*1.4),y=Math.floor(l/p);if(s.indexOf(f)>-1){const R=QA(),N=[];return s.split(f).forEach(L=>{const _=ZN(L,Object.assign(Object.assign({},t),{height:Number.MAX_SAFE_INTEGER}),e,Object.assign(Object.assign({},n),{eol:R}));_&&N.push(..._.split(R))}),N.slice(0,y).join(f)}const{width:x}=mb(s,e);if(x<r)return s;const S=[];let w=s,T=x,M=n.ellipsis,D=0;M&&(typeof M!="string"&&(M="…"),D=mb(M,e).width);for(let R=0;R<y;R+=1)if(T>r)if(R===y-1){const[L]=IN(w,r-D,T,e);S.push(M?`${L}${M}`:L)}else{const[L,_]=IN(w,r,T,e);S.push(L),w=_,T=mb(w,e).width}else{S.push(w);break}return S.join(f)}const WA=.551784;function Yi(s,t,e=NaN){const n=s.getAttribute(t);if(n==null)return e;const r=parseFloat(n);return Number.isNaN(r)?e:r}function RY(s,t=1){const e=s.getTotalLength(),n=[];let r=0,l;for(;r<e;)l=s.getPointAtLength(r),n.push({distance:r,x:l.x,y:l.y}),r+=t;return n}function zY(s){return["M",Yi(s,"x1"),Yi(s,"y1"),"L",Yi(s,"x2"),Yi(s,"y2")].join(" ")}function NY(s){const t=nS(s);return t.length===0?null:`${QN(t)} Z`}function LY(s){const t=nS(s);return t.length===0?null:QN(t)}function QN(s){return`M ${s.map(e=>`${e.x} ${e.y}`).join(" L")}`}function nS(s){const t=[],e=s.points;if(e)for(let n=0,r=e.numberOfItems;n<r;n+=1)t.push(e.getItem(n));return t}function jY(s){const t=Yi(s,"cx",0),e=Yi(s,"cy",0),n=Yi(s,"r"),r=n*WA;return["M",t,e-n,"C",t+r,e-n,t+n,e-r,t+n,e,"C",t+n,e+r,t+r,e+n,t,e+n,"C",t-r,e+n,t-n,e+r,t-n,e,"C",t-n,e-r,t-r,e-n,t,e-n,"Z"].join(" ")}function _Y(s){const t=Yi(s,"cx",0),e=Yi(s,"cy",0),n=Yi(s,"rx"),r=Yi(s,"ry")||n,l=n*WA,f=r*WA;return["M",t,e-r,"C",t+l,e-r,t+n,e-f,t+n,e,"C",t+n,e+f,t+l,e+r,t,e+r,"C",t-l,e+r,t-n,e+f,t-n,e,"C",t-n,e-f,t-l,e-r,t,e-r,"Z"].join(" ")}function BY(s){return FN({x:Yi(s,"x",0),y:Yi(s,"y",0),width:Yi(s,"width",0),height:Yi(s,"height",0),rx:Yi(s,"rx",0),ry:Yi(s,"ry",0)})}function FN(s){let t;const e=s.x,n=s.y,r=s.width,l=s.height,f=Math.min(s.rx||s["top-rx"]||0,r/2),h=Math.min(s.rx||s["bottom-rx"]||0,r/2),p=Math.min(s.ry||s["top-ry"]||0,l/2),y=Math.min(s.ry||s["bottom-ry"]||0,l/2);return f||h||p||y?t=["M",e,n+p,"v",l-p-y,"a",h,y,0,0,0,h,y,"h",r-2*h,"a",h,y,0,0,0,h,-y,"v",-(l-y-p),"a",f,p,0,0,0,-f,-p,"h",-(r-2*f),"a",f,p,0,0,0,-f,p,"Z"]:t=["M",e,n,"H",e+r,"V",n+l,"H",e,"V",n,"Z"],t.join(" ")}function PY(s){const t=ga("path");Te(t,Te(s));const e=JN(s);return e&&t.setAttribute("d",e),t}function JN(s){const t=s.tagName.toLowerCase();switch(t){case"path":return s.getAttribute("d");case"line":return zY(s);case"polygon":return NY(s);case"polyline":return LY(s);case"ellipse":return _Y(s);case"circle":return jY(s);case"rect":return BY(s)}throw new Error(`"${t}" cannot be converted to svg path element.`)}const UY=/(\w+)\(([^,)]+),?([^)]+)?\)/gi,KN=/[ ,]+/,HY=/^(\w+)\((.*)\)/;function kY(s,t){const n=ga("svg").createSVGPoint();return n.x=s,n.y=t,n}function Ri(s){const e=ga("svg").createSVGMatrix();if(s!=null){const n=s,r=["a","b","c","d","e","f"];for(const l of r)n[l]!==void 0&&(e[l]=n[l])}return e}function VY(s){const t=ga("svg");return s!=null?(s instanceof DOMMatrix||(s=Ri(s)),t.createSVGTransformFromMatrix(s)):t.createSVGTransform()}function yb(s){let t=Ri();const e=s!=null&&s.match(UY);if(!e)return t;for(let n=0,r=e.length;n<r;n+=1){const f=e[n].match(HY);if(f){let h,p,y,x,S,w=Ri();const T=f[2].split(KN);switch(f[1].toLowerCase()){case"scale":h=parseFloat(T[0]),p=T[1]===void 0?h:parseFloat(T[1]),w=w.scaleNonUniform(h,p);break;case"translate":y=parseFloat(T[0]),x=parseFloat(T[1]),w=w.translate(y,x);break;case"rotate":S=parseFloat(T[0]),y=parseFloat(T[1])||0,x=parseFloat(T[2])||0,y!==0||x!==0?w=w.translate(y,x).rotate(S).translate(-y,-x):w=w.rotate(S);break;case"skewx":S=parseFloat(T[0]),w=w.skewX(S);break;case"skewy":S=parseFloat(T[0]),w=w.skewY(S);break;case"matrix":w.a=parseFloat(T[0]),w.b=parseFloat(T[1]),w.c=parseFloat(T[2]),w.d=parseFloat(T[3]),w.e=parseFloat(T[4]),w.f=parseFloat(T[5]);break;default:continue}t=t.multiply(w)}}return t}function bb(s){const t=s||{},e=t.a!=null?t.a:1,n=t.b!=null?t.b:0,r=t.c!=null?t.c:0,l=t.d!=null?t.d:1,f=t.e!=null?t.e:0,h=t.f!=null?t.f:0;return`matrix(${e},${n},${r},${l},${f},${h})`}function iS(s){let t,e,n;if(s){const l=KN;if(s.trim().indexOf("matrix")>=0){const f=yb(s),h=GY(f);t=[h.translateX,h.translateY],e=[h.rotation],n=[h.scaleX,h.scaleY];const p=[];(t[0]!==0||t[1]!==0)&&p.push(`translate(${t.join(",")})`),(n[0]!==1||n[1]!==1)&&p.push(`scale(${n.join(",")})`),e[0]!==0&&p.push(`rotate(${e[0]})`),s=p.join(" ")}else{const f=s.match(/translate\((.*?)\)/);f&&(t=f[1].split(l));const h=s.match(/rotate\((.*?)\)/);h&&(e=h[1].split(l));const p=s.match(/scale\((.*?)\)/);p&&(n=p[1].split(l))}}const r=n&&n[0]?parseFloat(n[0]):1;return{raw:s||"",translation:{tx:t&&t[0]?parseInt(t[0],10):0,ty:t&&t[1]?parseInt(t[1],10):0},rotation:{angle:e&&e[0]?parseInt(e[0],10):0,cx:e&&e[1]?parseInt(e[1],10):void 0,cy:e&&e[2]?parseInt(e[2],10):void 0},scale:{sx:r,sy:n&&n[1]?parseFloat(n[1]):r}}}function tT(s,t){const e=t.x*s.a+t.y*s.c+0,n=t.x*s.b+t.y*s.d+0;return{x:e,y:n}}function GY(s){const t=tT(s,{x:0,y:1}),e=tT(s,{x:1,y:0}),n=180/Math.PI*Math.atan2(t.y,t.x)-90,r=180/Math.PI*Math.atan2(e.y,e.x);return{skewX:n,skewY:r,translateX:s.e,translateY:s.f,scaleX:Math.sqrt(s.a*s.a+s.b*s.b),scaleY:Math.sqrt(s.c*s.c+s.d*s.d),rotation:n}}function $Y(s){let t,e,n,r;return s?(t=s.a==null?1:s.a,r=s.d==null?1:s.d,e=s.b,n=s.c):t=r=1,{sx:e?Math.sqrt(t*t+e*e):t,sy:n?Math.sqrt(n*n+r*r):r}}function qY(s){let t={x:0,y:1};s&&(t=tT(s,t));const e=180*Math.atan2(t.y,t.x)/Math.PI%360-90;return{angle:e%360+(e<0?360:0)}}function YY(s){return{tx:s&&s.e||0,ty:s&&s.f||0}}function sp(s,t,e={}){if(t==null)return yb(Te(s,"transform"));if(e.absolute){s.setAttribute("transform",bb(t));return}const n=s.transform,r=VY(t);n.baseVal.appendItem(r)}function WN(s,t,e=0,n={}){let r=Te(s,"transform");const l=iS(r);if(t==null)return l.translation;r=l.raw,r=r.replace(/translate\([^)]*\)/g,"").trim();const f=n.absolute?t:l.translation.tx+t,h=n.absolute?e:l.translation.ty+e,p=`translate(${f},${h})`;s.setAttribute("transform",`${p} ${r}`.trim())}function eT(s,t,e,n,r={}){let l=Te(s,"transform");const f=iS(l);if(t==null)return f.rotation;l=f.raw,l=l.replace(/rotate\([^)]*\)/g,"").trim(),t%=360;const h=r.absolute?t:f.rotation.angle+t,p=e!=null&&n!=null?`,${e},${n}`:"",y=`rotate(${h}${p})`;s.setAttribute("transform",`${l} ${y}`.trim())}function t3(s,t,e){let n=Te(s,"transform");const r=iS(n);if(t==null)return r.scale;e=e??t,n=r.raw,n=n.replace(/scale\([^)]*\)/g,"").trim();const l=`scale(${t},${e})`;s.setAttribute("transform",`${n} ${l}`.trim())}function nT(s,t){if(zu(t)&&zu(s)){const e=t.getScreenCTM(),n=s.getScreenCTM();if(e&&n)return e.inverse().multiply(n)}return Ri()}function XY(s,t){let e=Ri();if(zu(t)&&zu(s)){let n=s;const r=[];for(;n&&n!==t;){const l=n.getAttribute("transform")||null,f=yb(l);r.push(f),n=n.parentNode}r.reverse().forEach(l=>{e=e.multiply(l)})}return e}function IY(s,t,e){const n=s instanceof SVGSVGElement?s:s.ownerSVGElement,r=n.createSVGPoint();r.x=t,r.y=e;try{const l=n.getScreenCTM(),f=r.matrixTransform(l.inverse()),h=nT(s,n).inverse();return f.matrixTransform(h)}catch{return r}}const e3={};function op(s){return e3[s]||{}}function sS(s,t){e3[s]=t}const vb=new WeakMap;function ZY(s){return vb.has(s)||vb.set(s,{events:Object.create(null)}),vb.get(s)}function iT(s){return vb.get(s)}function QY(s){return vb.delete(s)}const oS=()=>!0,rp=()=>!1;function n3(s){s.stopPropagation()}function FY(s,t,e){s.addEventListener!=null&&s.addEventListener(t,e)}function JY(s,t,e){s.removeEventListener!=null&&s.removeEventListener(t,e)}const KY=/[^\x20\t\r\n\f]+/g,WY=/^([^.]*)(?:\.(.+)|)/;function i3(s){return(s||"").match(KY)||[""]}function s3(s){const t=WY.exec(s)||[];return{originType:t[1]?t[1].trim():t[1],namespaces:t[2]?t[2].split(".").map(e=>e.trim()).sort():[]}}function sT(s){return s.nodeType===1||s.nodeType===9||!+s.nodeType}let o3=0;const ap=new WeakMap;function r3(s){return ap.has(s)||(ap.set(s,o3),o3+=1),ap.get(s)}function tX(s){return ap.get(s)}function eX(s){return ap.delete(s)}function a3(s,t){return ap.set(s,t)}function nX(s,t){const e=[],n=iT(s),r=n&&n.events&&n.events[t.type],l=r&&r.handlers||[],f=r?r.delegateCount:0;if(f>0&&!(t.type==="click"&&typeof t.button=="number"&&t.button>=1)){for(let h=t.target;h!==s;h=h.parentNode||s)if(h.nodeType===1&&!(t.type==="click"&&h.disabled===!0)){const p=[],y={};for(let x=0;x<f;x+=1){const S=l[x],w=S.selector;if(w!=null&&y[w]==null){const T=s,M=[];T.querySelectorAll(w).forEach(D=>{M.push(D)}),y[w]=M.includes(h)}y[w]&&p.push(S)}p.length&&e.push({elem:h,handlers:p})}}return f<l.length&&e.push({elem:s,handlers:l.slice(f)}),e}function l3(s){return s!=null&&s===s.window}function c3(s,t){const e=s.nodeType===9?s.documentElement:s,n=t&&t.parentNode;return s===n||!!(n&&n.nodeType===1&&(e.contains?e.contains(n):s.compareDocumentPosition&&s.compareDocumentPosition(n)&16))}class sc{static create(t){return t instanceof sc?t:new sc(t)}static addProperty(t,e){Object.defineProperty(sc.prototype,t,{enumerable:!0,configurable:!0,get:typeof e=="function"?function(){if(this.originalEvent)return e(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[t]},set(n){Object.defineProperty(this,t,{enumerable:!0,configurable:!0,writable:!0,value:n})}})}constructor(t,e){this.isDefaultPrevented=rp,this.isPropagationStopped=rp,this.isImmediatePropagationStopped=rp,this.isSimulated=!1,this.preventDefault=()=>{const n=this.originalEvent;this.isDefaultPrevented=oS,n&&!this.isSimulated&&n.preventDefault()},this.stopPropagation=()=>{const n=this.originalEvent;this.isPropagationStopped=oS,n&&!this.isSimulated&&n.stopPropagation()},this.stopImmediatePropagation=()=>{const n=this.originalEvent;this.isImmediatePropagationStopped=oS,n&&!this.isSimulated&&n.stopImmediatePropagation(),this.stopPropagation()},typeof t=="string"?this.type=t:t.type&&(this.originalEvent=t,this.type=t.type,this.isDefaultPrevented=t.defaultPrevented?oS:rp,this.target=t.target,this.currentTarget=t.currentTarget,this.relatedTarget=t.relatedTarget,this.timeStamp=t.timeStamp),e&&Object.assign(this,e),this.timeStamp||(this.timeStamp=Date.now())}}const u3={bubbles:!0,cancelable:!0,eventPhase:!0,detail:!0,view:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pageX:!0,pageY:!0,screenX:!0,screenY:!0,toElement:!0,pointerId:!0,pointerType:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,touches:!0,changedTouches:!0,targetTouches:!0,which:!0,altKey:!0,ctrlKey:!0,metaKey:!0,shiftKey:!0};Object.keys(u3).forEach(s=>sc.addProperty(s,u3[s])),sS("load",{noBubble:!0}),sS("beforeunload",{postDispatch(s,t){t.result!==void 0&&t.originalEvent&&(t.originalEvent.returnValue=t.result)}}),sS("mouseenter",{delegateType:"mouseover",bindType:"mouseover",handle(s,t){let e;const n=t.relatedTarget,r=t.handleObj;return(!n||n!==s&&!c3(s,n))&&(t.type=r.originType,e=r.handler.call(s,t),t.type="mouseover"),e}}),sS("mouseleave",{delegateType:"mouseout",bindType:"mouseout",handle(s,t){let e;const n=t.relatedTarget,r=t.handleObj;return(!n||n!==s&&!c3(s,n))&&(t.type=r.originType,e=r.handler.call(s,t),t.type="mouseout"),e}});let oT;function iX(s,t,e,n,r){if(!sT(s))return;let l;if(typeof e!="function"){const{handler:y,selector:x}=e,S=re(e,["handler","selector"]);e=y,r=x,l=S}const f=ZY(s);let h=f.handler;h==null&&(h=f.handler=function(y,...x){return oT!==y.type?sX(s,y,...x):void 0});const p=r3(e);i3(t).forEach(y=>{const{originType:x,namespaces:S}=s3(y);if(!x)return;let w=x,T=op(w);w=(r?T.delegateType:T.bindType)||w,T=op(w);const M=Object.assign({type:w,originType:x,data:n,selector:r,guid:p,handler:e,namespace:S.join(".")},l),D=f.events;let R=D[w];R||(R=D[w]={handlers:[],delegateCount:0},(!T.setup||T.setup(s,n,S,h)===!1)&&FY(s,w,h)),T.add&&(eX(M.handler),T.add(s,M),a3(M.handler,p)),r?(R.handlers.splice(R.delegateCount,0,M),R.delegateCount+=1):R.handlers.push(M)})}function f3(s,t,e,n,r){const l=iT(s);if(!l)return;const f=l.events;f&&(i3(t).forEach(h=>{const{originType:p,namespaces:y}=s3(h);if(!p){Object.keys(f).forEach(D=>{f3(s,D+h,e,n,!0)});return}let x=p;const S=op(x);x=(n?S.delegateType:S.bindType)||x;const w=f[x];if(!w)return;const T=y.length>0?new RegExp(`(^|\\.)${y.join("\\.(?:.*\\.|)")}(\\.|$)`):null,M=w.handlers.length;for(let D=w.handlers.length-1;D>=0;D-=1){const R=w.handlers[D];(r||p===R.originType)&&(!e||tX(e)===R.guid)&&(T==null||R.namespace&&T.test(R.namespace))&&(n==null||n===R.selector||n==="**"&&R.selector)&&(w.handlers.splice(D,1),R.selector&&(w.delegateCount-=1),S.remove&&S.remove(s,R))}M&&w.handlers.length===0&&((!S.teardown||S.teardown(s,y,l.handler)===!1)&&JY(s,x,l.handler),delete f[x])}),Object.keys(f).length===0&&QY(s))}function sX(s,t,...e){const n=sc.create(t);n.delegateTarget=s;const r=op(n.type);if(r.preDispatch&&r.preDispatch(s,n)===!1)return;const l=nX(s,n);for(let f=0,h=l.length;f<h&&!n.isPropagationStopped();f+=1){const p=l[f];n.currentTarget=p.elem;for(let y=0,x=p.handlers.length;y<x&&!n.isImmediatePropagationStopped();y+=1){const S=p.handlers[y];if(n.rnamespace==null||S.namespace&&n.rnamespace.test(S.namespace)){n.handleObj=S,n.data=S.data;const w=op(S.originType).handle,T=w?w(p.elem,n,...e):S.handler.call(p.elem,n,...e);T!==void 0&&(n.result=T,T===!1&&(n.preventDefault(),n.stopPropagation()))}}}return r.postDispatch&&r.postDispatch(s,n),n.result}function oX(s,t,e,n){let r=s,l=typeof s=="string"?s:s.type,f=typeof s=="string"||r.namespace==null?[]:r.namespace.split(".");const h=e;if(h.nodeType===3||h.nodeType===8)return;l.indexOf(".")>-1&&(f=l.split("."),l=f.shift(),f.sort());const p=l.indexOf(":")<0&&`on${l}`;r=s instanceof sc?s:new sc(l,typeof s=="object"?s:null),r.namespace=f.join("."),r.rnamespace=r.namespace?new RegExp(`(^|\\.)${f.join("\\.(?:.*\\.|)")}(\\.|$)`):null,r.result=void 0,r.target||(r.target=h);const y=[r];Array.isArray(t)?y.push(...t):y.push(t);const x=op(l);if(!n&&x.trigger&&x.trigger(h,r,t)===!1)return;let S;const w=[h];if(!n&&!x.noBubble&&!l3(h)){S=x.delegateType||l;let M=h,D=h.parentNode;for(;D!=null;)w.push(D),M=D,D=D.parentNode;const R=h.ownerDocument||document;if(M===R){const N=M.defaultView||M.parentWindow||window;w.push(N)}}let T=h;for(let M=0,D=w.length;M<D&&!r.isPropagationStopped();M+=1){const R=w[M];T=R,r.type=M>1?S:x.bindType||l;const N=iT(R);N&&N.events[r.type]&&N.handler&&N.handler.call(R,...y);const L=p&&R[p]||null;L&&sT(R)&&(r.result=L.call(R,...y),r.result===!1&&r.preventDefault())}if(r.type=l,!n&&!r.isDefaultPrevented()){const M=x.preventDefault;if((M==null||M(w.pop(),r,t)===!1)&&sT(h)&&p&&typeof h[l]=="function"&&!l3(h)){const D=h[p];D&&(h[p]=null),oT=l,r.isPropagationStopped()&&T.addEventListener(l,n3),h[l](),r.isPropagationStopped()&&T.removeEventListener(l,n3),oT=void 0,D&&(h[p]=D)}}return r.result}class nn{static on(t,e,n,r,l){return xb.on(t,e,n,r,l),t}static once(t,e,n,r,l){return xb.on(t,e,n,r,l,!0),t}static off(t,e,n,r){return xb.off(t,e,n,r),t}static trigger(t,e,n,r){return oX(e,n,t,r),t}}var xb;(function(s){function t(n,r,l,f,h,p){if(typeof r=="object"){typeof l!="string"&&(f=f||l,l=void 0),Object.keys(r).forEach(y=>t(n,y,l,f,r[y],p));return}if(f==null&&h==null?(h=l,f=l=void 0):h==null&&(typeof l=="string"?(h=f,f=void 0):(h=f,f=l,l=void 0)),h===!1)h=rp;else if(!h)return;if(p){const y=h;h=function(x,...S){return s.off(n,x),y.call(this,x,...S)},a3(h,r3(y))}iX(n,r,h,f,l)}s.on=t;function e(n,r,l,f){const h=r;if(h&&h.preventDefault!=null&&h.handleObj!=null){const p=h.handleObj;e(h.delegateTarget,p.namespace?`${p.originType}.${p.namespace}`:p.originType,p.selector,p.handler);return}if(typeof r=="object"){const p=r;Object.keys(p).forEach(y=>e(n,y,l,p[y]));return}(l===!1||typeof l=="function")&&(f=l,l=void 0),f===!1&&(f=rp),f3(n,r,f,l)}s.off=e})(xb||(xb={}));class h3{constructor(t,e,n){this.animationFrameId=0,this.deltaX=0,this.deltaY=0,this.eventName=Bq("wheel")?"wheel":"mousewheel",this.target=t,this.onWheelCallback=e,this.onWheelGuard=n,this.onWheel=this.onWheel.bind(this),this.didWheel=this.didWheel.bind(this)}enable(){this.target.addEventListener(this.eventName,this.onWheel,{passive:!1})}disable(){this.target.removeEventListener(this.eventName,this.onWheel)}onWheel(t){if(this.onWheelGuard!=null&&!this.onWheelGuard(t))return;this.deltaX+=t.deltaX,this.deltaY+=t.deltaY,t.preventDefault();let e;(this.deltaX!==0||this.deltaY!==0)&&(t.stopPropagation(),e=!0),e===!0&&this.animationFrameId===0&&(this.animationFrameId=requestAnimationFrame(()=>{this.didWheel(t)}))}didWheel(t){this.animationFrameId=0,this.onWheelCallback(t,this.deltaX,this.deltaY),this.deltaX=0,this.deltaY=0}}function lp(s){const t=s.getBoundingClientRect(),e=s.ownerDocument.defaultView;return{top:t.top+e.pageYOffset,left:t.left+e.pageXOffset}}function rX(s){return s.getBoundingClientRect().width}function aX(s){return s.getBoundingClientRect().height}function lX(s){const t=K1(s,"position")==="fixed";let e;if(t){const n=s.getBoundingClientRect();e={left:n.left,top:n.top}}else e=lp(s);if(!t){const n=s.ownerDocument;let r=s.offsetParent||n.documentElement;for(;(r===n.body||r===n.documentElement)&&K1(r,"position")==="static";)r=r.parentNode;if(r!==s&&oY(r)){const l=lp(r);e.top-=l.top+W1(r,"borderTopWidth"),e.left-=l.left+W1(r,"borderLeftWidth")}}return{top:e.top-W1(s,"marginTop"),left:e.left-W1(s,"marginLeft")}}function oc(s,t){const e=kY(s.x,s.y).matrixTransform(t);return new G(e.x,e.y)}function cX(s,t){return new Pt(oc(s.start,t),oc(s.end,t))}function ar(s,t){const n=ga("svg").createSVGPoint();n.x=s.x,n.y=s.y;const r=n.matrixTransform(t);n.x=s.x+s.width,n.y=s.y;const l=n.matrixTransform(t);n.x=s.x+s.width,n.y=s.y+s.height;const f=n.matrixTransform(t);n.x=s.x,n.y=s.y+s.height;const h=n.matrixTransform(t),p=Math.min(r.x,l.x,f.x,h.x),y=Math.max(r.x,l.x,f.x,h.x),x=Math.min(r.y,l.y,f.y,h.y),S=Math.max(r.y,l.y,f.y,h.y);return new Dt(p,x,y-p,S-x)}function d3(s,t,e){let n=null;if(!s.ownerSVGElement)return new Dt(0,0,0,0);try{n=s.getBBox()}catch{n={x:s.clientLeft,y:s.clientTop,width:s.clientWidth,height:s.clientHeight}}return Dt.create(n)}function il(s,t={}){let e=null;if(!s.ownerSVGElement||!zu(s)){if(LN(s)){const{left:f,top:h,width:p,height:y}=g3(s);return new Dt(f,h,p,y)}return new Dt(0,0,0,0)}let r=t.target;if(!t.recursive){try{e=s.getBBox()}catch{e={x:s.clientLeft,y:s.clientTop,width:s.clientWidth,height:s.clientHeight}}if(!r)return Dt.create(e);const f=nT(s,r);return ar(e,f)}{const f=s.childNodes,h=f.length;if(h===0)return il(s,{target:r});r||(r=s);let p=null;for(let y=0;y<h;y+=1){const x=f[y];let S=null;x.childNodes.length===0?S=il(x,{target:r}):S=il(x,{target:r,recursive:!0}),p?p=p.union(S):p=Dt.create(S)}return p||new Dt(0,0,0,0)}}function g3(s){let t=0,e=0,n=0,r=0;if(s){let l=s;for(;l;)t+=l.offsetLeft,e+=l.offsetTop,l=l.offsetParent,l&&(t+=parseInt(VN(l,"borderLeft"),10),e+=parseInt(VN(l,"borderTop"),10));n=s.offsetWidth,r=s.offsetHeight}return{left:t,top:e,width:n,height:r}}function p3(s){const t=e=>{const n=s.getAttribute(e),r=n?parseFloat(n):0;return Number.isNaN(r)?0:r};switch(s instanceof SVGElement&&s.nodeName.toLowerCase()){case"rect":return new Dt(t("x"),t("y"),t("width"),t("height"));case"circle":return new Ws(t("cx"),t("cy"),t("r"),t("r"));case"ellipse":return new Ws(t("cx"),t("cy"),t("rx"),t("ry"));case"polyline":{const e=nS(s);return new Oi(e)}case"polygon":{const e=nS(s);return e.length>1&&e.push(e[0]),new Oi(e)}case"path":{let e=s.getAttribute("d");return Xq(e)||(e=MN(e)),Ft.parse(e)}case"line":return new Pt(t("x1"),t("y1"),t("x2"),t("y2"))}return il(s)}function uX(s){if(s==null)return null;let t=s;do{let e=t.tagName;if(typeof e!="string")return null;if(e=e.toUpperCase(),nl(t,"x6-port"))t=t.nextElementSibling;else if(e==="G")t=t.firstElementChild;else if(e==="TITLE")t=t.nextElementSibling;else break}while(t);return t}function fX(s){const t=uX(s);if(!zu(t)){if(LN(s)){const{left:r,top:l,width:f,height:h}=g3(s);return new Dt(r,l,f,h)}return new Dt(0,0,0,0)}return p3(t).bbox()||Dt.create()}const hX=(s,t)=>s-t;class dX{constructor(t={}){this.comparator=t.comparator||hX,this.index={},this.data=t.data||[],this.heapify()}isEmpty(){return this.data.length===0}insert(t,e,n){const r={priority:t,value:e},l=this.data.length;return n&&(r.id=n,this.index[n]=l),this.data.push(r),this.bubbleUp(l),this}peek(){return this.data[0]?this.data[0].value:null}peekPriority(){return this.data[0]?this.data[0].priority:null}updatePriority(t,e){const n=this.index[t];if(typeof n>"u")throw new Error(`Node with id '${t}' was not found in the heap.`);const r=this.data,l=r[n].priority,f=this.comparator(e,l);f<0?(r[n].priority=e,this.bubbleUp(n)):f>0&&(r[n].priority=e,this.bubbleDown(n))}remove(){const t=this.data,e=t[0],n=t.pop();return e!=null&&e.id&&delete this.index[e.id],t.length>0&&(t[0]=n,n.id&&(this.index[n.id]=0),this.bubbleDown(0)),e?e.value:null}heapify(){for(let t=0;t<this.data.length;t+=1)this.bubbleUp(t)}bubbleUp(t){const e=this.data;let n,r,l=t;for(;l>0&&(r=l-1>>>1,this.comparator(e[l].priority,e[r].priority)<0);){n=e[r],e[r]=e[l];let f=e[l].id;f!=null&&(this.index[f]=r),e[l]=n,f=e[l].id,f!=null&&(this.index[f]=l),l=r}}bubbleDown(t){const e=this.data,n=e.length-1;let r=t;for(;;){const l=(r<<1)+1,f=l+1;let h=r;if(l<=n&&this.comparator(e[l].priority,e[h].priority)<0&&(h=l),f<=n&&this.comparator(e[f].priority,e[h].priority)<0&&(h=f),h!==r){const p=e[h];e[h]=e[r];let y=e[r].id;y!=null&&(this.index[y]=h),e[r]=p,y=e[r].id,y!=null&&(this.index[y]=r),r=h}else break}}}function gX(s,t,e=(n,r)=>1){const n={},r={},l={},f=new dX;for(n[t]=0,Object.keys(s).forEach(h=>{h!==t&&(n[h]=1/0),f.insert(n[h],h,h)});!f.isEmpty();){const h=f.remove();l[h]=!0;const p=s[h];for(let y=0;y<p.length;y+=1){const x=p[y];if(!l[x]){const S=n[h]+e(h,x);S<n[x]&&(n[x]=S,r[x]=h,f.updatePriority(x,S))}}}return r}const Sb=/(-?(?:\d*\.\d+|\d+))\s*(px|em|rem|ch|vh|vw|vmin|vmax|%|cm|mm|in|pt|pc|ex|fr|deg|rad|turn)$/,m3=(s,t)=>{const e=t-s;return n=>s+e*n},y3=(s,t)=>{const e=Sb,n=e.exec(s),r=e.exec(t),l=r?r[1]:"",f=n?+n[1]:0,h=r?+r[1]:0,p=l.indexOf("."),y=p>0?l[1].length-p-1:0,x=h-f,S=n?n[2]:"";return w=>(f+x*w).toFixed(y)+S},pX=(s,t)=>{const e=parseInt(s.slice(1),16),n=parseInt(t.slice(1),16),r=e&255,l=(n&255)-r,f=e&65280,h=(n&65280)-f,p=e&16711680,y=(n&16711680)-p;return x=>{const S=r+l*x&255,w=f+h*x&65280,T=p+y*x&16711680;return`#${(1<<24|S|w|T).toString(16).slice(1)}`}},mX=(s,t)=>{const e=l=>{const f=[];if(!l)return f;const h=/(\w+)\(([^)]+)\)/g;let p=h.exec(l);for(;p!==null;)p[1]&&p[2]&&f.push({name:p[1],values:p[2].split(/\s*,\s*/).filter(Boolean)}),p=h.exec(l);return f},n=e(s),r=e(t);return n.length===0||r.length===0?()=>s:l=>{const f=[];for(let h=0;h<Math.min(n.length,r.length);h++){const p=n[h],y=r[h];if(!(!p||!y)&&p.name===y.name&&p.values.length>0&&p.values.length===y.values.length){const x=[];for(let S=0;S<p.values.length;S++){const w=p.values[S],T=y.values[S];if(!(w===void 0||T===void 0))if(Sb.test(w)||Sb.test(T)){const M=y3(w,T);x.push(M(l))}else if(!Number.isNaN(parseFloat(w))&&!Number.isNaN(parseFloat(T))){const M=m3(parseFloat(w),parseFloat(T));x.push(M(l).toString())}else x.push(w)}x.length>0&&f.push(`${p.name}(${x.join(", ")})`)}}return f.length>0?f.join(" "):s}},b3=s=>s,yX=s=>s*s,bX=s=>s*s*s,vX=s=>{if(s<=0)return 0;if(s>=1)return 1;const t=s*s,e=t*s;return 4*(s<.5?e:3*(s-t)+e-.75)},xX=s=>Math.pow(2,10*(s-1)),SX=s=>{for(let t=0,e=1;;t+=e,e/=2)if(s>=(7-4*t)/11){const n=(11-6*t-11*s)/4;return-n*n+e*e}},wX={reverse(s){return t=>1-s(1-t)},reflect(s){return t=>.5*(t<.5?s(2*t):2-s(2-2*t))},clamp(s,t=0,e=1){return n=>{const r=s(n);return r<t?t:r>e?e:r}},back(s=1.70158){return t=>t*t*((s+1)*t-s)},elastic(s=1.5){return t=>Math.pow(2,10*(t-1))*Math.cos(20*Math.PI*s/3*t)}};function CX(s){return-1*Math.cos(s*(Math.PI/2))+1}function EX(s){return Math.sin(s*(Math.PI/2))}function AX(s){return-.5*(Math.cos(Math.PI*s)-1)}function TX(s){return s*s}function MX(s){return s*(2-s)}function OX(s){return s<.5?2*s*s:-1+(4-2*s)*s}function DX(s){return s*s*s}function RX(s){const t=s-1;return t*t*t+1}function zX(s){return s<.5?4*s*s*s:(s-1)*(2*s-2)*(2*s-2)+1}function NX(s){return s*s*s*s}function LX(s){const t=s-1;return 1-t*t*t*t}function jX(s){const t=s-1;return s<.5?8*s*s*s*s:1-8*t*t*t*t}function _X(s){return s*s*s*s*s}function BX(s){const t=s-1;return 1+t*t*t*t*t}function PX(s){const t=s-1;return s<.5?16*s*s*s*s*s:1+16*t*t*t*t*t}function UX(s){return s===0?0:Math.pow(2,10*(s-1))}function HX(s){return s===1?1:-Math.pow(2,-10*s)+1}function kX(s){if(s===0||s===1)return s;const t=s*2,e=t-1;return t<1?.5*Math.pow(2,10*e):.5*(-Math.pow(2,-10*e)+2)}function VX(s){const t=s/1;return-1*(Math.sqrt(1-t*s)-1)}function GX(s){const t=s-1;return Math.sqrt(1-t*t)}function $X(s){const t=s*2,e=t-2;return t<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-e*e)+1)}function qX(s,t=1.70158){return s*s*((t+1)*s-t)}function YX(s,t=1.70158){const e=s/1-1;return e*e*((t+1)*e+t)+1}function XX(s,t=1.70158){const e=s*2,n=e-2,r=t*1.525;return e<1?.5*e*e*((r+1)*e-r):.5*(n*n*((r+1)*n+r)+2)}function IX(s,t=.7){if(s===0||s===1)return s;const n=s/1-1,r=1-t,l=r/(2*Math.PI)*Math.asin(1);return-(Math.pow(2,10*n)*Math.sin((n-l)*(2*Math.PI)/r))}function ZX(s,t=.7){const e=1-t,n=s*2;if(s===0||s===1)return s;const r=e/(2*Math.PI)*Math.asin(1);return Math.pow(2,-10*n)*Math.sin((n-r)*(2*Math.PI)/e)+1}function QX(s,t=.65){const e=1-t;if(s===0||s===1)return s;const n=s*2,r=n-1,l=e/(2*Math.PI)*Math.asin(1);return n<1?-.5*(Math.pow(2,10*r)*Math.sin((r-l)*(2*Math.PI)/e)):Math.pow(2,-10*r)*Math.sin((r-l)*(2*Math.PI)/e)*.5+1}function rT(s){const t=s/1;if(t<1/2.75)return 7.5625*t*t;if(t<2/2.75){const e=t-.5454545454545454;return 7.5625*e*e+.75}if(t<2.5/2.75){const e=t-.8181818181818182;return 7.5625*e*e+.9375}{const e=t-.9545454545454546;return 7.5625*e*e+.984375}}function v3(s){return 1-rT(1-s)}function FX(s){return s<.5?v3(s*2)*.5:rT(s*2-1)*.5+.5}const JX=Object.freeze(Object.defineProperty({__proto__:null,bounce:SX,cubic:bX,decorators:wX,easeInBack:qX,easeInBounce:v3,easeInCirc:VX,easeInCubic:DX,easeInElastic:IX,easeInExpo:UX,easeInOutBack:XX,easeInOutBounce:FX,easeInOutCirc:$X,easeInOutCubic:zX,easeInOutElastic:QX,easeInOutExpo:kX,easeInOutQuad:OX,easeInOutQuart:jX,easeInOutQuint:PX,easeInOutSine:AX,easeInQuad:TX,easeInQuart:NX,easeInQuint:_X,easeInSine:CX,easeOutBack:YX,easeOutBounce:rT,easeOutCirc:GX,easeOutCubic:RX,easeOutElastic:ZX,easeOutExpo:HX,easeOutQuad:MX,easeOutQuart:LX,easeOutQuint:BX,easeOutSine:EX,exponential:xX,inout:vX,linear:b3,quad:yX},Symbol.toStringTag,{value:"Module"}));function aT(s,t){const e=[];for(let n=0;n<s.length;n+=2){const r=s[n],l=s[n+1],f=Array.isArray(t)?t:[t],h=bN(r,l,f);e.push(h)}return _A(e)}class KX{constructor(){this.listeners={}}on(t,e,n){return e==null?this:(this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push(e,n),this)}once(t,e,n){const r=(...l)=>(this.off(t,r),aT([e,n],l));return this.on(t,r,this)}off(t,e,n){if(!(t||e||n))return this.listeners={},this;const r=this.listeners;return(t?[t]:Object.keys(r)).forEach(f=>{const h=r[f];if(h){if(!(e||n)){delete r[f];return}for(let p=h.length-2;p>=0;p-=2)e&&h[p]!==e||n&&h[p+1]!==n||h.splice(p,2)}}),this}trigger(t,...e){let n=!0;if(t!=="*"){const l=this.listeners[t];l!=null&&(n=aT([...l],e))}const r=this.listeners["*"];return r!=null?_A([n,aT([...r],[t,...e])]):n}emit(t,...e){return this.trigger(t,...e)}}class cp{get disposed(){return this._disposed===!0}dispose(){this._disposed=!0}}function Re(){return(s,t,e)=>{const n=e.value,r=s.__proto__;e.value=function(...l){this.disposed||(n.call(this,...l),r.dispose.call(this))}}}class Ts extends KX{dispose(){this.off()}}De([Re()],Ts.prototype,"dispose",null),xY(Ts,cp);class lT{constructor(){this.clear()}clear(){this.map=new WeakMap,this.arr=[]}has(t){return this.map.has(t)}get(t){return this.map.get(t)}set(t,e){this.map.set(t,e),this.arr.push(t)}delete(t){const e=this.arr.indexOf(t);e>=0&&this.arr.splice(e,1);const n=this.map.get(t);return this.map.delete(t),n}each(t){this.arr.forEach(e=>{const n=this.map.get(e);t(n,e)})}dispose(){this.clear()}}function cT(s){const t=[],e=[];return Array.isArray(s)?t.push(...s):s.split("|").forEach(n=>{n.indexOf("&")===-1?t.push(n):e.push(...n.split("&"))}),{or:t,and:e}}function WX(s,t){if(s!=null&&t!=null){const e=cT(s),n=cT(t),r=e.or.sort(),l=n.or.sort(),f=e.and.sort(),h=n.and.sort(),p=(y,x)=>y.length===x.length&&(y.length===0||y.every((S,w)=>S===x[w]));return p(r,l)&&p(f,h)}return s==null&&t==null}function Nu(s,t,e){if(t==null||Array.isArray(t)&&t.length===0)return e?s.altKey!==!0&&s.ctrlKey!==!0&&s.metaKey!==!0&&s.shiftKey!==!0:!0;const{or:n,and:r}=cT(t),l=f=>{const h=`${f.toLowerCase()}Key`;return s[h]===!0};return n.some(f=>l(f))&&r.every(f=>l(f))}class In{static create(t){return new In(t)}constructor(t){this.options=Object.assign({},t),this.data=this.options.data||{},this.register=this.register.bind(this),this.unregister=this.unregister.bind(this)}get names(){return Object.keys(this.data)}register(t,e,n=!1){if(typeof t=="object"){Object.entries(t).forEach(([f,h])=>{this.register(f,h,e)});return}this.exist(t)&&!n&&!mN()&&this.onDuplicated(t);const r=this.options.process,l=r?Gt(r,this,t,e):e;return this.data[t]=l,l}unregister(t){const e=t?this.data[t]:null;return delete this.data[t],e}get(t){return t?this.data[t]:null}exist(t){return t?this.data[t]!=null:!1}onDuplicated(t){try{throw this.options.onConflict&&Gt(this.options.onConflict,this,t),new Error(`${k1(this.options.type)} with name '${t}' already registered.`)}catch(e){throw e}}onNotFound(t,e){throw new Error(this.getSpellingSuggestion(t,e))}getSpellingSuggestion(t,e){const n=this.getSpellingSuggestionForName(t),r=e?`${e} ${sq(this.options.type)}`:this.options.type;return`${k1(r)} with name '${t}' does not exist.${n?` Did you mean '${n}'?`:""}`}getSpellingSuggestionForName(t){return pY(t,Object.keys(this.data),e=>e)}}const tI={},x3={position:rS("x","width","origin")},S3={position:rS("y","height","origin")},eI={position:rS("x","width","corner")},nI={position:rS("y","height","corner")},w3={set:Lu("width","width")},C3={set:Lu("height","height")},iI={set:Lu("rx","width")},sI={set:Lu("ry","height")},E3={set:(s=>{const t=Lu(s,"width"),e=Lu(s,"height");return function(n,r){const l=r.refBBox,f=l.height>l.width?t:e;return Gt(f,this,n,r)}})("r")},oI={set(s,{refBBox:t}){let e=parseFloat(s);const n=ic(s);n&&(e/=100);const r=Math.sqrt(t.height*t.height+t.width*t.width);let l;return Number.isFinite(e)&&(n||e>=0&&e<=1?l=e*r:l=Math.max(e+r,0)),{r:l}}},rI={set:Lu("cx","width")},aI={set:Lu("cy","height")},A3={set:O3({resetOffset:!0})},lI={set:O3({resetOffset:!1})},T3={set:D3({resetOffset:!0})},cI={set:D3({resetOffset:!1})},uI=E3,fI=A3,hI=T3,dI=x3,gI=S3,pI=w3,mI=C3;function rS(s,t,e){return(n,{refBBox:r})=>{if(n==null)return null;let l=parseFloat(n);const f=ic(n);f&&(l/=100);let h;if(Number.isFinite(l)){const y=r[e];f||l>0&&l<1?h=y[s]+r[t]*l:h=y[s]+l}const p=new G;return p[s]=h||0,p}}function Lu(s,t){return(e,{refBBox:n})=>{let r=parseFloat(e);const l=ic(e);l&&(r/=100);const f={};if(Number.isFinite(r)){const h=l||r>=0&&r<=1?r*n[t]:Math.max(r+n[t],0);f[s]=h}return f}}function M3(s,t){const e="x6-shape",n=t&&t.resetOffset;return(r,{elem:l,refBBox:f})=>{let h=Nh(l,e);if(!h||h.value!==r){const D=s(r);h={value:r,shape:D,shapeBBox:D.bbox()},Nh(l,e,h)}const p=h.shape.clone(),y=h.shapeBBox.clone(),x=y.getOrigin(),S=f.getOrigin();y.x=S.x,y.y=S.y;const w=f.getMaxScaleToFit(y,S),T=y.width===0||f.width===0?1:w.sx,M=y.height===0||f.height===0?1:w.sy;return p.scale(T,M,x),n&&p.translate(-x.x,-x.y),p}}function O3(s){function t(n){return Ft.parse(n)}const e=M3(t,s);return(n,r)=>({d:e(n,r).serialize()})}function D3(s){const t=M3(e=>new Oi(e),s);return(e,n)=>({points:t(e,n).serialize()})}const yI={qualify:ca,set(s,{view:t}){return`url(#${t.graph.defineGradient(s)})`}},bI={qualify:ca,set(s,{view:t}){const e=t.cell,n=Object.assign({},s);if(e.isEdge()&&n.type==="linearGradient"){const r=t,l=r.sourcePoint,f=r.targetPoint;n.id=`gradient-${n.type}-${e.id}`,n.attrs=Object.assign(Object.assign({},n.attrs),{x1:l.x,y1:l.y,x2:f.x,y2:f.y,gradientUnits:"userSpaceOnUse"}),t.graph.defs.remove(n.id)}return`url(#${t.graph.defineGradient(n)})`}},R3={qualify(s,{attrs:t}){return t.textWrap==null||!ca(t.textWrap)},set(s,{view:t,elem:e,attrs:n}){const r="x6-text",l=Nh(e,r),f=x=>{try{if(typeof x=="string")return JSON.parse(x)}catch{}return x},h={x:n.x,eol:n.eol,annotations:f(n.annotations),textPath:f(n["text-path"]||n.textPath),textVerticalAnchor:n["text-vertical-anchor"]||n.textVerticalAnchor,displayEmpty:(n["display-empty"]||n.displayEmpty)==="true",lineHeight:n["line-height"]||n.lineHeight},p=n["font-size"]||n.fontSize,y=JSON.stringify([s,h]);if(p&&e.setAttribute("font-size",p),l==null||l!==y){const x=h.textPath;if(x!=null&&typeof x=="object"){const S=x.selector;if(typeof S=="string"){const w=t.find(S)[0];w instanceof SVGPathElement&&(HA(w),h.textPath=Object.assign({"xlink:href":`#${w.id}`},x))}}XN(e,`${s}`,h),Nh(e,r,y)}}},vI={qualify:ca,set(s,{view:t,elem:e,attrs:n,refBBox:r}){var l,f;const h=s,p=h.width||0;ic(p)?r.width*=parseFloat(p)/100:p<=0?r.width+=p:r.width=p;const y=h.height||0;ic(y)?r.height*=parseFloat(y)/100:y<=0?r.height+=y:r.height=y;let x;const S=(f=(l=h.text)!==null&&l!==void 0?l:n.text)!==null&&f!==void 0?f:e==null?void 0:e.textContent;S!=null?x=ZN(`${S}`,r,{"font-weight":n["font-weight"]||n.fontWeight,"font-size":n["font-size"]||n.fontSize,"font-family":n["font-family"]||n.fontFamily,lineHeight:n.lineHeight},{ellipsis:h.ellipsis}):x="",Gt(R3.set,this,x,{view:t,elem:e,attrs:n,refBBox:r,cell:t.cell})}},up=(s,{attrs:t})=>t.text!==void 0,xI={qualify:up},SI={qualify:up},wI={qualify:up},CI={qualify:up},EI={qualify:up},AI={qualify:up},TI={qualify(s,{elem:t}){return t instanceof SVGElement},set(s,{elem:t}){const e="x6-title",n=`${s}`,r=Nh(t,e);if(r==null||r!==n){Nh(t,e,n);const l=t.firstChild;if(l&&l.tagName.toUpperCase()==="TITLE"){const f=l;f.textContent=n}else{const f=document.createElementNS(t.namespaceURI,"title");f.textContent=n,t.insertBefore(f,l)}}}},MI={offset:z3("x","width","right")},OI={offset:z3("y","height","bottom")},DI={offset(s,{refBBox:t}){return s?{x:-t.x,y:-t.y}:{x:0,y:0}}};function z3(s,t,e){return(n,{refBBox:r})=>{const l=new G;let f;return n==="middle"?f=r[t]/2:n===e?f=r[t]:typeof n=="number"&&Number.isFinite(n)?f=n>-1&&n<1?-r[t]*n:-n:ic(n)?f=r[t]*parseFloat(n)/100:f=0,l[s]=-(r[s]+f),l}}const RI={qualify:ca,set(s,{elem:t}){$e(t,s)}},zI={set(s,{elem:t}){t.innerHTML=`${s}`}},NI={qualify:ca,set(s,{view:t}){return`url(#${t.graph.defineFilter(s)})`}},LI={set(s){return s!=null&&typeof s=="object"&&s.id?s.id:s}},jI=s=>{var{size:t,width:e,height:n,offset:r,open:l}=s,f=re(s,["size","width","height","offset","open"]);return N3({size:t,width:e,height:n,offset:r},l===!0,!0,void 0,f)},_I=s=>{var{size:t,width:e,height:n,offset:r,factor:l}=s,f=re(s,["size","width","height","offset","factor"]);return N3({size:t,width:e,height:n,offset:r},!1,!1,l,f)};function N3(s,t,e,n=3/4,r={}){const l=s.size||10,f=s.width||l,h=s.height||l,p=new Ft,y={};if(t)p.moveTo(f,0).lineTo(0,h/2).lineTo(f,h),y.fill="none";else{if(p.moveTo(0,h/2),p.lineTo(f,0),!e){const x=Rh(n,0,1);p.lineTo(f*x,h/2)}p.lineTo(f,h),p.close()}return Object.assign(Object.assign(Object.assign({},y),r),{tagName:"path",d:tp(p.serialize(),{x:s.offset!=null?s.offset:-f/2})})}const BI=s=>{var{size:t,width:e,height:n,offset:r}=s,l=re(s,["size","width","height","offset"]);const f=t||10,h=e||f,p=n||f,y=new Ft;return y.moveTo(0,p/2).lineTo(h/2,0).lineTo(h,p/2).lineTo(h/2,p).close(),Object.assign(Object.assign({},l),{tagName:"path",d:tp(y.serialize(),r??-h/2)})},PI=s=>{var{d:t,offsetX:e,offsetY:n}=s,r=re(s,["d","offsetX","offsetY"]);return Object.assign(Object.assign({},r),{tagName:"path",d:tp(t,e,n)})},UI=s=>{var{size:t,width:e,height:n,offset:r}=s,l=re(s,["size","width","height","offset"]);const f=t||10,h=e||f,p=n||f,y=new Ft;return y.moveTo(0,0).lineTo(h,p).moveTo(0,p).lineTo(h,0),Object.assign(Object.assign({},l),{tagName:"path",fill:"none",d:tp(y.serialize(),r||-h/2)})},HI=s=>{var{width:t,height:e,offset:n,open:r,flip:l}=s,f=re(s,["width","height","offset","open","flip"]);let h=e||6;const p=t||10,y=r===!0,x=l===!0,S=Object.assign(Object.assign({},f),{tagName:"path"});x&&(h=-h);const w=new Ft;return w.moveTo(0,h).lineTo(p,0),y?S.fill="none":(w.lineTo(p,h),w.close()),S.d=tp(w.serialize(),{x:n||-p/2,y:h/2}),S},L3=s=>{var{r:t}=s,e=re(s,["r"]);const n=t||5;return Object.assign(Object.assign({cx:n},e),{tagName:"circle",r:n})},kI=Object.freeze(Object.defineProperty({__proto__:null,async:HI,block:jI,circle:L3,circlePlus:s=>{var{r:t}=s,e=re(s,["r"]);const n=t||5,r=new Ft;return r.moveTo(n,0).lineTo(n,n*2),r.moveTo(0,n).lineTo(n*2,n),{children:[Object.assign(Object.assign({},L3({r:n})),{fill:"none"}),Object.assign(Object.assign({},e),{tagName:"path",d:tp(r.serialize(),-n)})]}},classic:_I,cross:UI,diamond:BI,ellipse:s=>{var{rx:t,ry:e}=s,n=re(s,["rx","ry"]);const r=t||5,l=e||5;return Object.assign(Object.assign({cx:r},n),{tagName:"ellipse",rx:r,ry:l})},path:PI},Symbol.toStringTag,{value:"Module"})),wb=In.create({type:"marker"});wb.register(kI,!0);function uT(s){return typeof s=="string"||ca(s)}const VI={qualify:uT,set(s,{view:t,attrs:e}){return fT("marker-start",s,t,e)}},GI={qualify:uT,set(s,{view:t,attrs:e}){return fT("marker-end",s,t,e,{transform:"rotate(180)"})}},$I={qualify:uT,set(s,{view:t,attrs:e}){return fT("marker-mid",s,t,e)}};function fT(s,t,e,n,r={}){const l=typeof t=="string"?{name:t}:t,{name:f,args:h}=l,p=re(l,["name","args"]);let y=p;if(f&&typeof f=="string"){const S=wb.get(f);if(S)y=S(Object.assign(Object.assign({},p),h));else return wb.onNotFound(f)}const x=Object.assign(Object.assign(Object.assign({},qI(n,s)),r),y);return{[s]:`url(#${e.graph.defineMarker(x)})`}}function qI(s,t){const e={},n=s.stroke;if(typeof n=="string"&&(e.stroke=n,e.fill=n),t!=="marker-mid"){const r=parseFloat(s.strokeWidth||s["stroke-width"]);if(Number.isFinite(r)&&r>1){const l=Math.ceil(r/2);e.refX=t==="marker-start"?l:-l}}return e}const Cb=(s,{view:t})=>t.cell.isEdge(),YI={qualify:Cb,set(s,t){var e,n,r,l;const f=t.view,h=s.reverse||!1,p=s.stubs||0;let y;if(Number.isFinite(p)&&p!==0)if(h){let x,S;const w=f.getConnectionLength()||0;p<0?(x=(w+p)/2,S=-p):(x=p,S=w-p*2);const T=f.getConnection();y=(l=(r=(n=(e=T==null?void 0:T.divideAtLength(x))===null||e===void 0?void 0:e[1])===null||n===void 0?void 0:n.divideAtLength(S))===null||r===void 0?void 0:r[0])===null||l===void 0?void 0:l.serialize()}else{let x;p<0?x=((f.getConnectionLength()||0)+p)/2:x=p;const S=f.getConnection();if(S){const w=S.divideAtLength(x),T=S.divideAtLength(-x);w&&T&&(y=`${w[0].serialize()} ${T[1].serialize()}`)}}return{d:y||f.getConnectionPathData()}}},j3={qualify:Cb,set:aS("getTangentAtLength",{rotate:!0})},XI={qualify:Cb,set:aS("getTangentAtLength",{rotate:!1})},_3={qualify:Cb,set:aS("getTangentAtRatio",{rotate:!0})},II={qualify:Cb,set:aS("getTangentAtRatio",{rotate:!1})},ZI=j3,QI=_3;function aS(s,t){const e={x:1,y:0};return(n,r)=>{let l,f;const h=r.view,p=h[s](Number(n));return p?(f=t.rotate?p.vector().vectorAngle(e):0,l=p.start):(l=h.path.start,f=0),f===0||Number.isNaN(f)?{transform:`translate(${l.x},${l.y})`}:{transform:`translate(${l.x},${l.y}) rotate(${f})`}}}const FI=Object.freeze(Object.defineProperty({__proto__:null,annotations:CI,atConnectionLength:ZI,atConnectionLengthIgnoreGradient:XI,atConnectionLengthKeepGradient:j3,atConnectionRatio:QI,atConnectionRatioIgnoreGradient:II,atConnectionRatioKeepGradient:_3,connection:YI,displayEmpty:AI,eol:EI,fill:yI,filter:NI,html:zI,lineHeight:xI,port:LI,ref:tI,refCx:rI,refCy:aI,refD:fI,refDKeepOffset:lI,refDResetOffset:A3,refDx:eI,refDy:nI,refHeight:C3,refHeight2:mI,refPoints:hI,refPointsKeepOffset:cI,refPointsResetOffset:T3,refR:uI,refRCircumscribed:oI,refRInscribed:E3,refRx:iI,refRy:sI,refWidth:w3,refWidth2:pI,refX:x3,refX2:dI,refY:S3,refY2:gI,resetOffset:DI,sourceMarker:VI,stroke:bI,style:RI,targetMarker:GI,text:R3,textPath:wI,textVerticalAnchor:SI,textWrap:vI,title:TI,vertexMarker:$I,xAlign:MI,yAlign:OI},Symbol.toStringTag,{value:"Module"})),JI={xlinkHref:"xlink:href",xlinkShow:"xlink:show",xlinkRole:"xlink:role",xlinkType:"xlink:type",xlinkArcrole:"xlink:arcrole",xlinkTitle:"xlink:title",xlinkActuate:"xlink:actuate",xmlSpace:"xml:space",xmlBase:"xml:base",xmlLang:"xml:lang",preserveAspectRatio:"preserveAspectRatio",requiredExtension:"requiredExtension",requiredFeatures:"requiredFeatures",systemLanguage:"systemLanguage",externalResourcesRequired:"externalResourceRequired"};function KI(s,t,e){return!!(s!=null&&(typeof s=="string"||typeof s.qualify!="function"||Gt(s.qualify,this,t,e)))}const B3=Object.assign(Object.assign({},JI),FI),Eb=In.create({type:"attribute definition"});Eb.register(B3,!0);const P3=s=>{const t=document.createElement("canvas"),e=s.width,n=s.height;t.width=e*2,t.height=n;const r=t.getContext("2d");return r.drawImage(s,0,0,e,n),r.translate(2*e,0),r.scale(-1,1),r.drawImage(s,0,0,e,n),t},U3=s=>{const t=document.createElement("canvas"),e=s.width,n=s.height;t.width=e,t.height=n*2;const r=t.getContext("2d");return r.drawImage(s,0,0,e,n),r.translate(0,2*n),r.scale(1,-1),r.drawImage(s,0,0,e,n),t},H3=s=>{const t=document.createElement("canvas"),e=s.width,n=s.height;t.width=2*e,t.height=2*n;const r=t.getContext("2d");return r.drawImage(s,0,0,e,n),r.setTransform(-1,0,0,-1,t.width,t.height),r.drawImage(s,0,0,e,n),r.setTransform(-1,0,0,1,t.width,0),r.drawImage(s,0,0,e,n),r.setTransform(1,0,0,-1,0,t.height),r.drawImage(s,0,0,e,n),t},lS=Object.assign({},Object.freeze(Object.defineProperty({__proto__:null,flipX:P3,flipXY:H3,flipY:U3,watermark:(s,t)=>{const e=s.width,n=s.height,r=document.createElement("canvas");r.width=e*3,r.height=n*3;const l=r.getContext("2d"),f=t.angle!=null?-t.angle:-20,h=fs(f),p=r.width/4,y=r.height/4;for(let x=0;x<4;x+=1)for(let S=0;S<4;S+=1)(x+S)%2>0&&(l.setTransform(1,0,0,1,(2*x-1)*p,(2*S-1)*y),l.rotate(h),l.drawImage(s,-e/2,-n/2,e,n));return r}},Symbol.toStringTag,{value:"Module"})));lS["flip-x"]=P3,lS["flip-y"]=U3,lS["flip-xy"]=H3;const cS=In.create({type:"background pattern"});cS.register(lS,!0);function uS(s,t,e){let n;if(typeof e=="object"){if(Number.isFinite(e.y)){const l=new Pt(t,s),{start:f,end:h}=l.parallel(e.y);t=f,s=h}n=e.x}else n=e;if(n==null||!Number.isFinite(n))return s;const r=s.distance(t);return n===0&&r>0?s:s.move(t,-Math.min(n,r-1))}function fS(s){const t=s.getAttribute("stroke-width");return t===null?0:parseFloat(t)||0}function WI(s){if(s==null)return null;let t=s;do{let e=t.tagName;if(typeof e!="string")return null;if(e=e.toUpperCase(),e==="G")t=t.firstElementChild;else if(e==="TITLE")t=t.nextElementSibling;else break}while(t);return t}const k3=(s,t,e,n)=>{const r=t.getBBoxOfElement(e);n.stroked&&r.inflate(fS(e)/2);const l=s.intersect(r),f=l&&l.length?s.start.closest(l):s.end;return uS(f,s.start,n.offset)},tZ=function(s,t,e,n,r){const l=t.cell,f=l.isNode()?l.getAngle():0;if(f===0)return Gt(k3,this,s,t,e,n,r);const h=t.getUnrotatedBBoxOfElement(e);n.stroked&&h.inflate(fS(e)/2);const p=h.getCenter(),y=s.clone().rotate(f,p),x=y.setLength(1e6).intersect(h),S=x&&x.length?y.start.closest(x).rotate(-f,p):s.end;return uS(S,s.start,n.offset)},eZ=(s,t,e,n)=>{let r,l;const f=s.end,h=n.selector;if(typeof h=="string"?r=t.findOne(h):Array.isArray(h)?r=KA(e,h):r=WI(e),!zu(r)){if(r===e||!zu(e))return f;r=e}const p=t.getShapeOfElement(r),y=t.getMatrixOfElement(r),x=t.getRootTranslatedMatrix(),S=t.getRootRotatedMatrix(),w=x.multiply(S).multiply(y),T=w.inverse(),M=cX(s,T),D=M.start.clone(),R=t.getDataOfElement(r);if(n.insideout===!1){R.shapeBBox==null&&(R.shapeBBox=p.bbox());const U=R.shapeBBox;if(U!=null&&U.containsPoint(D))return f}n.extrapolate===!0&&M.setLength(1e6);let N;if(Ft.isPath(p)){const U=n.precision||2;R.segmentSubdivisions==null&&(R.segmentSubdivisions=p.getSegmentSubdivisions({precision:U})),N={precision:U,segmentSubdivisions:R.segmentSubdivisions},l=M.intersect(p,N)}else l=M.intersect(p);l?Array.isArray(l)&&(l=D.closest(l)):n.sticky===!0&&(Dt.isRectangle(p)?l=p.getNearestPointToPoint(D):Ws.isEllipse(p)?l=p.intersectsWithLineFromCenterToPoint(D):l=p.closestPoint(D,N));const L=l?oc(l,w):f;let _=n.offset||0;return n.stroked!==!1&&(typeof _=="object"?(_=Object.assign({},_),_.x==null&&(_.x=0),_.x+=fS(r)/2):_+=fS(r)/2),uS(L,s.start,_)};function nZ(s,t,e=0){const{start:n,end:r}=s;let l,f,h,p;switch(t){case"left":p="x",l=r,f=n,h=-1;break;case"right":p="x",l=n,f=r,h=1;break;case"top":p="y",l=r,f=n,h=-1;break;case"bottom":p="y",l=n,f=r,h=1;break;default:return}n[p]<r[p]?l[p]=f[p]:f[p]=l[p],Number.isFinite(e)&&(l[p]+=h*e,f[p]+=h*e)}const iZ=Object.freeze(Object.defineProperty({__proto__:null,anchor:(s,t,e,n)=>{const{alignOffset:r,align:l}=n;return l&&nZ(s,l,r),uS(s.end,s.start,n.offset)},bbox:k3,boundary:eZ,rect:tZ},Symbol.toStringTag,{value:"Module"})),Ab=In.create({type:"connection point"});Ab.register(iZ,!0);const V3=1,hS=1/3,dS=2/3;let Tb=[],gS=[];function sZ(s){let t=s.graph._jumpOverUpdateList;if(t==null&&(t=s.graph._jumpOverUpdateList=[],s.graph.on("cell:mouseup",()=>{const e=s.graph._jumpOverUpdateList;setTimeout(()=>{for(let n=0;n<e.length;n+=1)e[n].update()})}),s.graph.on("model:reseted",()=>{t=s.graph._jumpOverUpdateList=[]})),t.indexOf(s)<0){t.push(s);const e=()=>t.splice(t.indexOf(s),1);s.cell.once("change:connector",e),s.cell.once("removed",e)}}function hT(s,t,e=[]){const n=[s,...e,t],r=[];return n.forEach((l,f)=>{const h=n[f+1];h!=null&&r.push(new Pt(l,h))}),r}function oZ(s,t){const e=[];return t.forEach(n=>{const r=s.intersectsWithLine(n);if(r){const{x:l,y:f}=r,{start:h,end:p}=n,y=Math.round(h.x)===Math.round(l)&&Math.round(h.y)===Math.round(f),x=Math.round(p.x)===Math.round(l)&&Math.round(p.y)===Math.round(f);if(y||x)return;e.push(r)}}),e}function G3(s,t){return new Pt(s,t).squaredLength()}function rZ(s,t,e){return t.reduce((n,r,l)=>{if(gS.includes(r))return n;const f=n.pop()||s,h=G.create(r).move(f.start,-e);let p=G.create(r).move(f.start,+e);const y=t[l+1];if(y!=null){const w=p.distance(y);w<=e&&(p=y.move(f.start,w),gS.push(y))}else if(h.distance(f.end)<e*2+V3)return n.push(f),n;if(p.distance(f.start)<e*2+V3)return n.push(f),n;const S=new Pt(h,p);return Tb.push(S),n.push(new Pt(f.start,h),S,new Pt(p,f.end)),n},[])}function $3(s,t,e,n){const r=new Ft;let l;return l=Ft.createSegment("M",s[0].start),r.appendSegment(l),s.forEach((f,h)=>{if(Tb.includes(f)){let p,y,x,S;if(e==="arc"){p=-90,y=f.start.diff(f.end),(y.x<0||y.x===0&&y.y<0)&&(p+=180);const T=f.getCenter(),M=new Pt(T,f.end).rotate(p,T);let D;D=new Pt(f.start,T),x=D.pointAt(2/3).rotate(p,f.start),S=M.pointAt(1/3).rotate(-p,M.end),l=Ft.createSegment("C",x,S,M.end),r.appendSegment(l),D=new Pt(T,f.end),x=M.pointAt(1/3).rotate(p,M.end),S=D.pointAt(1/3).rotate(-p,f.end),l=Ft.createSegment("C",x,S,f.end),r.appendSegment(l)}else if(e==="gap")l=Ft.createSegment("M",f.end),r.appendSegment(l);else if(e==="cubic"){p=f.start.theta(f.end);const w=t*.6;let T=t*1.35;y=f.start.diff(f.end),(y.x<0||y.x===0&&y.y<0)&&(T*=-1),x=new G(f.start.x+w,f.start.y+T).rotate(p,f.start),S=new G(f.end.x-w,f.end.y+T).rotate(p,f.end),l=Ft.createSegment("C",x,S,f.end),r.appendSegment(l)}}else{const p=s[h+1];n===0||!p||Tb.includes(p)?(l=Ft.createSegment("L",f.end),r.appendSegment(l)):aZ(n,r,f.end,f.start,p.end)}}),r}function aZ(s,t,e,n,r){const l=e.distance(n)/2,f=e.distance(r)/2,h=-Math.min(s,l),p=-Math.min(s,f),y=e.clone().move(n,h).round(),x=e.clone().move(r,p).round(),S=new G(hS*y.x+dS*e.x,dS*e.y+hS*y.y),w=new G(hS*x.x+dS*e.x,dS*e.y+hS*x.y);let T;T=Ft.createSegment("L",y),t.appendSegment(T),T=Ft.createSegment("C",S,w,x),t.appendSegment(T)}const q3=Object.freeze(Object.defineProperty({__proto__:null,jumpover:function(s,t,e,n={}){Tb=[],gS=[],sZ(this);const r=n.size||5,l=n.type||"arc",f=n.radius||0,h=n.ignoreConnectors||["smooth"],p=this.graph,x=p.model.getEdges();if(x.length===1)return $3(hT(s,t,e),r,l,f);const S=this.cell,w=x.indexOf(S),T=p.options.connecting.connector||{},M=x.filter((U,$)=>{const Y=U.getConnector()||T;return h.includes(Y.name)?!1:$>w?Y.name!=="jumpover":!0}),D=M.map(U=>p.findViewByCell(U)),R=hT(s,t,e),N=D.map(U=>U==null?[]:U===this?R:hT(U.sourcePoint,U.targetPoint,U.routePoints)),L=[];R.forEach(U=>{const $=M.reduce((Y,k,H)=>{if(k!==S){const J=oZ(U,N[H]);Y.push(...J)}return Y},[]).sort((Y,k)=>G3(U.start,Y)-G3(U.start,k));$.length>0?L.push(...rZ(U,$,r)):L.push(U)});const _=$3(L,r,l,f);return Tb=[],gS=[],n.raw?_:_.serialize()},loop:(s,t,e,n={})=>{const r=e.length===3?0:1,l=G.create(e[0+r]),f=G.create(e[2+r]),h=G.create(e[1+r]);if(!G.equals(s,t)){const y=new G((s.x+t.x)/2,(s.y+t.y)/2),x=y.angleBetween(G.create(s).rotate(90,y),h);x>1&&(l.rotate(180-x,y),f.rotate(180-x,y),h.rotate(180-x,y))}const p=`
|
|
165
|
+
M ${s.x} ${s.y}
|
|
166
|
+
Q ${l.x} ${l.y} ${h.x} ${h.y}
|
|
167
|
+
Q ${f.x} ${f.y} ${t.x} ${t.y}
|
|
168
|
+
`;return n.raw?Ft.parse(p):p},normal:(s,t,e,n={})=>{const r=[s,...e,t],l=new Oi(r),f=new Ft(l);return n.raw?f:f.serialize()},rounded:(s,t,e,n={})=>{const r=new Ft;r.appendSegment(Ft.createSegment("M",s));const l=1/3,f=2/3,h=n.radius||10;let p,y;for(let x=0,S=e.length;x<S;x+=1){const w=G.create(e[x]),T=e[x-1]||s,M=e[x+1]||t;p=y||w.distance(T)/2,y=w.distance(M)/2;const D=-Math.min(h,p),R=-Math.min(h,y),N=w.clone().move(T,D).round(),L=w.clone().move(M,R).round(),_=new G(l*N.x+f*w.x,f*w.y+l*N.y),U=new G(l*L.x+f*w.x,f*w.y+l*L.y);r.appendSegment(Ft.createSegment("L",N)),r.appendSegment(Ft.createSegment("C",_,U,L))}return r.appendSegment(Ft.createSegment("L",t)),n.raw?r:r.serialize()},smooth:(s,t,e,n={})=>{let r,l=n.direction;if(e&&e.length!==0){const f=[s,...e,t],h=ni.throughPoints(f);r=new Ft(h)}else if(r=new Ft,r.appendSegment(Ft.createSegment("M",s)),l||(l=Math.abs(s.x-t.x)>=Math.abs(s.y-t.y)?"H":"V"),l==="H"){const f=(s.x+t.x)/2;r.appendSegment(Ft.createSegment("C",f,s.y,f,t.y,t.x,t.y))}else{const f=(s.y+t.y)/2;r.appendSegment(Ft.createSegment("C",s.x,f,t.x,f,t.x,t.y))}return n.raw?r:r.serialize()}},Symbol.toStringTag,{value:"Module"})),Mb=In.create({type:"connector"});Mb.register(q3,!0);function pS(s){return function(t,e,n,r){if(n instanceof Element){const l=this.graph.findViewByElem(n);let f;if(l)if(l.isEdgeElement(n)){const h=r.fixedAt!=null?r.fixedAt:"50%";f=Y3(l,h)}else f=l.getBBoxOfElement(n).getCenter();else f=new G;return s.call(this,t,e,f,r)}return s.apply(this,arguments)}}function Y3(s,t){const e=ic(t),n=typeof t=="string"?parseFloat(t):t;return e?s.getPointAtRatio(n/100):s.getPointAtLength(n)}const X3=(s,t,e,n)=>{const r=s.getClosestPoint(e);return r??new G},lZ=pS(X3),cZ=(s,t,e,n)=>{const r=n.length!=null?n.length:20;return s.getPointAtLength(r)},uZ=pS(function(s,t,e,n){const l=s.getConnection(),f=s.getConnectionSubdivisions(),h=new Pt(e.clone().translate(0,1e6),e.clone().translate(0,-1e6)),p=new Pt(e.clone().translate(1e6,0),e.clone().translate(-1e6,0)),y=h.intersect(l,{segmentSubdivisions:f}),x=p.intersect(l,{segmentSubdivisions:f}),S=[];return y&&S.push(...y),x&&S.push(...x),S.length>0?e.closest(S):n.fallbackAt!=null?Y3(s,n.fallbackAt):Gt(X3,this,s,t,e,n)}),fZ=Object.freeze(Object.defineProperty({__proto__:null,closest:lZ,length:cZ,orth:uZ,ratio:(s,t,e,n)=>{let r=n.ratio!=null?n.ratio:.5;return r>1&&(r/=100),s.getPointAtRatio(r)}},Symbol.toStringTag,{value:"Module"})),Ob=In.create({type:"edge endpoint"});Ob.register(fZ,!0);function dT(s,t){return s??t}function zi(s,t){return s!=null&&Number.isFinite(s)?s:t}function hZ(s={}){const t=dT(s.color,"blue"),e=zi(s.width,1),n=zi(s.margin,2),r=zi(s.opacity,1),l=n,f=n+e;return`
|
|
169
|
+
<filter>
|
|
170
|
+
<feFlood flood-color="${t}" flood-opacity="${r}" result="colored"/>
|
|
171
|
+
<feMorphology in="SourceAlpha" result="morphedOuter" operator="dilate" radius="${f}" />
|
|
172
|
+
<feMorphology in="SourceAlpha" result="morphedInner" operator="dilate" radius="${l}" />
|
|
173
|
+
<feComposite result="morphedOuterColored" in="colored" in2="morphedOuter" operator="in"/>
|
|
174
|
+
<feComposite operator="xor" in="morphedOuterColored" in2="morphedInner" result="outline"/>
|
|
175
|
+
<feMerge>
|
|
176
|
+
<feMergeNode in="outline"/>
|
|
177
|
+
<feMergeNode in="SourceGraphic"/>
|
|
178
|
+
</feMerge>
|
|
179
|
+
</filter>
|
|
180
|
+
`.trim()}function dZ(s={}){const t=dT(s.color,"red"),e=zi(s.blur,0),n=zi(s.width,1),r=zi(s.opacity,1);return`
|
|
181
|
+
<filter>
|
|
182
|
+
<feFlood flood-color="${t}" flood-opacity="${r}" result="colored"/>
|
|
183
|
+
<feMorphology result="morphed" in="SourceGraphic" operator="dilate" radius="${n}"/>
|
|
184
|
+
<feComposite result="composed" in="colored" in2="morphed" operator="in"/>
|
|
185
|
+
<feGaussianBlur result="blured" in="composed" stdDeviation="${e}"/>
|
|
186
|
+
<feBlend in="SourceGraphic" in2="blured" mode="normal"/>
|
|
187
|
+
</filter>
|
|
188
|
+
`.trim()}function gZ(s={}){const t=zi(s.x,2);return`
|
|
189
|
+
<filter>
|
|
190
|
+
<feGaussianBlur stdDeviation="${s.y!=null&&Number.isFinite(s.y)?[t,s.y]:t}"/>
|
|
191
|
+
</filter>
|
|
192
|
+
`.trim()}function pZ(s={}){const t=zi(s.dx,0),e=zi(s.dy,0),n=dT(s.color,"black"),r=zi(s.blur,4),l=zi(s.opacity,1);return"SVGFEDropShadowElement"in window?`<filter>
|
|
193
|
+
<feDropShadow stdDeviation="${r}" dx="${t}" dy="${e}" flood-color="${n}" flood-opacity="${l}" />
|
|
194
|
+
</filter>`.trim():`<filter>
|
|
195
|
+
<feGaussianBlur in="SourceAlpha" stdDeviation="${r}" />
|
|
196
|
+
<feOffset dx="${t}" dy="${e}" result="offsetblur" />
|
|
197
|
+
<feFlood flood-color="${n}" />
|
|
198
|
+
<feComposite in2="offsetblur" operator="in" />
|
|
199
|
+
<feComponentTransfer>
|
|
200
|
+
<feFuncA type="linear" slope="${l}" />
|
|
201
|
+
</feComponentTransfer>
|
|
202
|
+
<feMerge>
|
|
203
|
+
<feMergeNode/>
|
|
204
|
+
<feMergeNode in="SourceGraphic"/>
|
|
205
|
+
</feMerge>
|
|
206
|
+
</filter>`.trim()}function mZ(s={}){const t=zi(s.amount,1),e=.2126+.7874*(1-t),n=.7152-.7152*(1-t),r=.0722-.0722*(1-t),l=.2126-.2126*(1-t),f=.7152+.2848*(1-t),h=.0722-.0722*(1-t),p=.2126-.2126*(1-t),y=.0722+.9278*(1-t);return`
|
|
207
|
+
<filter>
|
|
208
|
+
<feColorMatrix type="matrix" values="${e} ${n} ${r} 0 0 ${l} ${f} ${h} 0 0 ${p} ${n} ${y} 0 0 0 0 0 1 0"/>
|
|
209
|
+
</filter>
|
|
210
|
+
`.trim()}function yZ(s={}){const t=zi(s.amount,1),e=.393+.607*(1-t),n=.769-.769*(1-t),r=.189-.189*(1-t),l=.349-.349*(1-t),f=.686+.314*(1-t),h=.168-.168*(1-t),p=.272-.272*(1-t),y=.534-.534*(1-t),x=.131+.869*(1-t);return`
|
|
211
|
+
<filter>
|
|
212
|
+
<feColorMatrix type="matrix" values="${e} ${n} ${r} 0 0 ${l} ${f} ${h} 0 0 ${p} ${y} ${x} 0 0 0 0 0 1 0"/>
|
|
213
|
+
</filter>
|
|
214
|
+
`.trim()}function bZ(s={}){return`
|
|
215
|
+
<filter>
|
|
216
|
+
<feColorMatrix type="saturate" values="${1-zi(s.amount,1)}"/>
|
|
217
|
+
</filter>
|
|
218
|
+
`.trim()}function vZ(s={}){return`
|
|
219
|
+
<filter>
|
|
220
|
+
<feColorMatrix type="hueRotate" values="${zi(s.angle,0)}"/>
|
|
221
|
+
</filter>
|
|
222
|
+
`.trim()}function xZ(s={}){const t=zi(s.amount,1),e=1-t;return`
|
|
223
|
+
<filter>
|
|
224
|
+
<feComponentTransfer>
|
|
225
|
+
<feFuncR type="table" tableValues="${t} ${e}"/>
|
|
226
|
+
<feFuncG type="table" tableValues="${t} ${e}"/>
|
|
227
|
+
<feFuncB type="table" tableValues="${t} ${e}"/>
|
|
228
|
+
</feComponentTransfer>
|
|
229
|
+
</filter>
|
|
230
|
+
`.trim()}function SZ(s={}){const t=zi(s.amount,1);return`
|
|
231
|
+
<filter>
|
|
232
|
+
<feComponentTransfer>
|
|
233
|
+
<feFuncR type="linear" slope="${t}"/>
|
|
234
|
+
<feFuncG type="linear" slope="${t}"/>
|
|
235
|
+
<feFuncB type="linear" slope="${t}"/>
|
|
236
|
+
</feComponentTransfer>
|
|
237
|
+
</filter>
|
|
238
|
+
`.trim()}function wZ(s={}){const t=zi(s.amount,1),e=.5-t/2;return`
|
|
239
|
+
<filter>
|
|
240
|
+
<feComponentTransfer>
|
|
241
|
+
<feFuncR type="linear" slope="${t}" intercept="${e}"/>
|
|
242
|
+
<feFuncG type="linear" slope="${t}" intercept="${e}"/>
|
|
243
|
+
<feFuncB type="linear" slope="${t}" intercept="${e}"/>
|
|
244
|
+
</feComponentTransfer>
|
|
245
|
+
</filter>
|
|
246
|
+
`.trim()}const CZ=Object.freeze(Object.defineProperty({__proto__:null,blur:gZ,brightness:SZ,contrast:wZ,dropShadow:pZ,grayScale:mZ,highlight:dZ,hueRotate:vZ,invert:xZ,outline:hZ,saturate:bZ,sepia:yZ},Symbol.toStringTag,{value:"Module"})),Db=In.create({type:"filter"});Db.register(CZ,!0);const EZ=Object.freeze(Object.defineProperty({__proto__:null,dot:{color:"#aaaaaa",thickness:1,markup:"rect",update(s,t){const e=t.thickness*t.sx,n=t.thickness*t.sy;Te(s,{width:e,height:n,rx:e,ry:n,fill:t.color})}},doubleMesh:[{color:"rgba(224,224,224,1)",thickness:1,markup:"path",update(s,t){let e;const n=t.width,r=t.height,l=t.thickness;n-l>=0&&r-l>=0?e=["M",n,0,"H0 M0 0 V0",r].join(" "):e="M 0 0 0 0",Te(s,{d:e,stroke:t.color,"stroke-width":t.thickness})}},{color:"rgba(224,224,224,0.2)",thickness:3,factor:4,markup:"path",update(s,t){let e;const n=t.factor||1,r=t.width*n,l=t.height*n,f=t.thickness;r-f>=0&&l-f>=0?e=["M",r,0,"H0 M0 0 V0",l].join(" "):e="M 0 0 0 0",t.width=r,t.height=l,Te(s,{d:e,stroke:t.color,"stroke-width":t.thickness})}}],fixedDot:{color:"#aaaaaa",thickness:1,markup:"rect",update(s,t){const e=t.sx<=1?t.thickness*t.sx:t.thickness;Te(s,{width:e,height:e,rx:e,ry:e,fill:t.color})}},mesh:{color:"rgba(224,224,224,1)",thickness:1,markup:"path",update(s,t){let e;const n=t.width,r=t.height,l=t.thickness;n-l>=0&&r-l>=0?e=["M",n,0,"H0 M0 0 V0",r].join(" "):e="M 0 0 0 0",Te(s,{d:e,stroke:t.color,"stroke-width":t.thickness})}}},Symbol.toStringTag,{value:"Module"}));class AZ{constructor(){this.patterns={},this.root=Xt.create(F1(),{width:"100%",height:"100%"},[ga("defs")]).node}add(t,e){const n=this.root.childNodes[0];n&&n.appendChild(e),this.patterns[t]=e,Xt.create("rect",{width:"100%",height:"100%",fill:`url(#${t})`}).appendTo(this.root)}get(t){return this.patterns[t]}has(t){return this.patterns[t]!=null}}const I3=EZ,Rb=In.create({type:"grid"});Rb.register(I3,!0);const He={prefixCls:"x6",autoInsertCSS:!0,useCSSSelector:!0,prefix(s){return`${He.prefixCls}-${s}`}},Z3=He.prefix("highlighted"),TZ={highlight(s,t,e){const n=e&&e.className||Z3;_t(t,n)},unhighlight(s,t,e){const n=e&&e.className||Z3;dn(t,n)}},Q3=He.prefix("highlight-opacity"),MZ={highlight(s,t){_t(t,Q3)},unhighlight(s,t){dn(t,Q3)}},OZ={padding:3,rx:0,ry:0,attrs:{"stroke-width":3,stroke:"#FEB663"}},DZ={highlight(s,t,e){const n=F3(t,e);if(zZ(n))return;e=sN({},e,OZ);const r=Xt.create(t);let l,f;try{l=r.toPathData()}catch{f=d3(r.node),l=FN(Object.assign(Object.assign({},e),f))}const h=ga("path");if(Te(h,Object.assign({d:l,"pointer-events":"none","vector-effect":"non-scaling-stroke",fill:"none"},e.attrs?pb(e.attrs):null)),s.isEdgeElement(t))Te(h,"d",s.getConnectionPathData());else{let x=r.getTransformToElement(s.container);const S=e.padding;if(S){f==null&&(f=d3(r.node));const w=f.x+f.width/2,T=f.y+f.height/2;f=ar(f,x);const M=Math.max(f.width,1),D=Math.max(f.height,1),R=(M+S)/M,N=(D+S)/D,L=Ri({a:R,b:0,c:0,d:N,e:w-R*w,f:T-N*T});x=x.multiply(L)}sp(h,x)}_t(h,He.prefix("highlight-stroke"));const p=s.cell,y=()=>J3(n);p.on("removed",y),p.model&&p.model.on("reseted",y),s.container.appendChild(h),RZ(n,h)},unhighlight(s,t,e){J3(F3(t,e))}};function F3(s,t){return HA(s),s.id+JSON.stringify(t)}const mS={};function RZ(s,t){mS[s]=t}function zZ(s){return mS[s]!=null}function J3(s){const t=mS[s];t&&(or(t),delete mS[s])}const NZ=Object.freeze(Object.defineProperty({__proto__:null,className:TZ,opacity:MZ,stroke:DZ},Symbol.toStringTag,{value:"Module"}));function LZ(s,t){if(typeof t.highlight!="function")throw new Error(`Highlighter '${s}' is missing required \`highlight()\` method`);if(typeof t.unhighlight!="function")throw new Error(`Highlighter '${s}' is missing required \`unhighlight()\` method`)}const jZ=NZ,zb=In.create({type:"highlighter"});zb.register(jZ,!0);const _Z=rc("center"),BZ=rc("topCenter"),PZ=rc("bottomCenter"),UZ=rc("leftMiddle"),HZ=rc("rightMiddle"),kZ=rc("topLeft"),VZ=rc("topRight"),GZ=rc("bottomLeft"),$Z=rc("bottomRight");function rc(s){return(t,e,n,r={})=>{let l;t.cell.visible?l=r.rotate?t.getUnrotatedBBoxOfElement(e):t.getBBoxOfElement(e):l=t.cell.getBBox();const f=l[s];f.x+=So(r.dx,l.width),f.y+=So(r.dy,l.height);const h=t.cell;return r.rotate?f.rotate(-h.getAngle(),h.getBBox().getCenter()):f}}const qZ=pS((s,t,e,n)=>{const r=Es(s.cell.getAngle()),l=s.cell.visible?s.getBBoxOfElement(t):s.cell.getBBox(),f=l.getCenter(),h=l.getTopLeft(),p=l.getBottomRight();let y=n.padding;if(Number.isFinite(y)||(y=0),h.y+y<=e.y&&e.y<=p.y-y){const x=e.y-f.y;f.x+=r===0||r===180?0:x*1/Math.tan(fs(r)),f.y+=x}else if(h.x+y<=e.x&&e.x<=p.x-y){const x=e.x-f.x;f.y+=r===90||r===270?0:x*Math.tan(fs(r)),f.x+=x}return f}),YZ=function(s,t,e,n,r){const l=s.cell.getConnectionPoint(this.cell,r);return(n.dx||n.dy)&&l.translate(n.dx||0,n.dy||0),l},XZ=pS((s,t,e,n)=>{let r,l=0,f;const h=s.cell;n.rotate?(r=s.getUnrotatedBBoxOfElement(t),f=h.getBBox().getCenter(),l=h.getAngle()):h.visible?r=s.getBBoxOfElement(t):r=s.cell.getBBox();const p=n.padding;p!=null&&Number.isFinite(p)&&r.inflate(p),n.rotate&&e.rotate(l,f);const y=r.getNearestSideToPoint(e);let x;switch(y){case"left":x=r.getLeftMiddle();break;case"right":x=r.getRightMiddle();break;case"top":x=r.getTopCenter();break;case"bottom":x=r.getBottomCenter();break}const S=n.direction;return S==="H"?(y==="top"||y==="bottom")&&(e.x<=r.x+r.width?x=r.getLeftMiddle():x=r.getRightMiddle()):S==="V"&&(e.y<=r.y+r.height?x=r.getTopCenter():x=r.getBottomCenter()),n.rotate?x.rotate(-l,f):x}),IZ=Object.freeze(Object.defineProperty({__proto__:null,bottom:PZ,bottomLeft:GZ,bottomRight:$Z,center:_Z,left:UZ,midSide:XZ,nodeCenter:YZ,orth:qZ,right:HZ,top:BZ,topLeft:kZ,topRight:VZ},Symbol.toStringTag,{value:"Module"})),Nb=In.create({type:"node endpoint"});Nb.register(IZ,!0);const ZZ={position:{x:0,y:0},angle:0,attrs:{".":{y:"0","text-anchor":"start"}}};function ju(s,t){const{x:e,y:n,angle:r,attrs:l}=t||{};return sN({},{angle:r,attrs:l,position:{x:e,y:n}},s,ZZ)}const QZ=(s,t,e)=>ju({position:t.getTopLeft()},e),FZ=(s,t,e)=>ju({position:{x:-15,y:0},attrs:{".":{y:".3em","text-anchor":"end"}}},e),JZ=(s,t,e)=>ju({position:{x:15,y:0},attrs:{".":{y:".3em","text-anchor":"start"}}},e),KZ=(s,t,e)=>ju({position:{x:0,y:-15},attrs:{".":{"text-anchor":"middle"}}},e),WZ=(s,t,e)=>ju({position:{x:0,y:15},attrs:{".":{y:".6em","text-anchor":"middle"}}},e),tQ=(s,t,e)=>K3(s,t,!1,e),eQ=(s,t,e)=>K3(s,t,!0,e),nQ=(s,t,e)=>W3(s,t,!1,e),iQ=(s,t,e)=>W3(s,t,!0,e);function K3(s,t,e,n){const r=n.offset!=null?n.offset:15,l=t.getCenter().theta(s),f=tL(t);let h,p,y,x,S=0;return l<f[1]||l>f[2]?(h=".3em",p=r,y=0,x="start"):l<f[0]?(h="0",p=0,y=-r,e?(S=-90,x="start"):x="middle"):l<f[3]?(h=".3em",p=-r,y=0,x="end"):(h=".6em",p=0,y=r,e?(S=90,x="start"):x="middle"),ju({position:{x:Math.round(p),y:Math.round(y)},angle:S,attrs:{".":{y:h,"text-anchor":x}}},n)}function W3(s,t,e,n){const r=n.offset!=null?n.offset:15,l=t.getCenter().theta(s),f=tL(t);let h,p,y,x,S=0;return l<f[1]||l>f[2]?(h=".3em",p=-r,y=0,x="end"):l<f[0]?(h=".6em",p=0,y=r,e?(S=90,x="start"):x="middle"):l<f[3]?(h=".3em",p=r,y=0,x="start"):(h="0em",p=0,y=-r,e?(S=-90,x="start"):x="middle"),ju({position:{x:Math.round(p),y:Math.round(y)},angle:S,attrs:{".":{y:h,"text-anchor":x}}},n)}function tL(s){const t=s.getCenter(),e=t.theta(s.getTopLeft()),n=t.theta(s.getBottomLeft()),r=t.theta(s.getBottomRight()),l=t.theta(s.getTopRight());return[e,l,r,n]}const sQ=(s,t,e)=>eL(s.diff(t.getCenter()),!1,e),oQ=(s,t,e)=>eL(s.diff(t.getCenter()),!0,e);function eL(s,t,e){const n=e.offset!=null?e.offset:20,r=new G(0,0),l=-s.theta(r),f=s.clone().move(r,n).diff(s).round();let h=".3em",p,y=l;return(l+90)%180===0?(p=t?"end":"middle",!t&&l===-270&&(h="0em")):l>-270&&l<-90?(p="start",y=l-180):p="end",ju({position:f.round().toJSON(),angle:t?y:0,attrs:{".":{y:h,"text-anchor":p}}},e)}const nL=Object.freeze(Object.defineProperty({__proto__:null,bottom:WZ,inside:nQ,insideOriented:iQ,left:FZ,manual:QZ,outside:tQ,outsideOriented:eQ,radial:sQ,radialOriented:oQ,right:JZ,top:KZ},Symbol.toStringTag,{value:"Module"})),yS=In.create({type:"port label layout"});yS.register(nL,!0);function gT(s,t={}){return new G(So(t.x,s.width),So(t.y,s.height))}function pT(s,t,e){return Object.assign({angle:t,position:s.toJSON()},e)}const rQ=(s,t)=>s.map(({x:e,y:n,angle:r})=>pT(gT(t,{x:e,y:n}),r||0)),aQ=(s,t,e)=>{const n=e.start||0,r=e.step||20;return iL(s,t,n,(l,f)=>(l+.5-f/2)*r)},lQ=(s,t,e)=>{const n=e.start||0,r=e.step||360/s.length;return iL(s,t,n,l=>l*r)};function iL(s,t,e,n){const r=t.getCenter(),l=t.getTopCenter(),f=t.width/t.height,h=Ws.fromRect(t),p=s.length;return s.map((y,x)=>{const S=e+n(x,p),w=l.clone().rotate(-S,r).scale(f,1,r),T=y.compensateRotate?-h.tangentTheta(w):0;return(y.dx||y.dy)&&w.translate(y.dx||0,y.dy||0),y.dr&&w.move(r,y.dr),pT(w.round(),T,y)})}const cQ=(s,t,e)=>{const n=gT(t,e.start||t.getOrigin()),r=gT(t,e.end||t.getCorner());return Lb(s,n,r,e)},uQ=(s,t,e)=>Lb(s,t.getTopLeft(),t.getBottomLeft(),e),fQ=(s,t,e)=>Lb(s,t.getTopRight(),t.getBottomRight(),e),hQ=(s,t,e)=>Lb(s,t.getTopLeft(),t.getTopRight(),e),dQ=(s,t,e)=>Lb(s,t.getBottomLeft(),t.getBottomRight(),e);function Lb(s,t,e,n){const r=new Pt(t,e),l=s.length;return s.map((f,h)=>{var{strict:p}=f,y=re(f,["strict"]);const x=p||n.strict?(h+1)/(l+1):(h+.5)/l,S=r.pointAt(x);return(y.dx||y.dy)&&S.translate(y.dx||0,y.dy||0),pT(S.round(),0,y)})}const sL=Object.freeze(Object.defineProperty({__proto__:null,absolute:rQ,bottom:dQ,ellipse:aQ,ellipseSpread:lQ,left:uQ,line:cQ,right:fQ,top:hQ},Symbol.toStringTag,{value:"Module"})),jb=In.create({type:"port layout"});jb.register(sL,!0);const gQ=s=>[...s],pQ=(s,t,e)=>{const n=t.side||"bottom",r=fa(t.padding||40),l=e.sourceBBox,f=e.targetBBox,h=l.getCenter(),p=f.getCenter();let y,x,S;switch(n){case"top":S=-1,y="y",x="height";break;case"left":S=-1,y="x",x="width";break;case"right":S=1,y="x",x="width";break;case"bottom":default:S=1,y="y",x="height";break}return h[y]+=S*(l[x]/2+r[n]),p[y]+=S*(f[x]/2+r[n]),S*(h[y]-p[y])>0?p[y]=h[y]:h[y]=p[y],[h.toJSON(),...s,p.toJSON()]};function bS(s){return new Dt(s.x,s.y,0,0)}function vS(s={}){const t=fa(s.padding||20);return{x:-t.left,y:-t.top,width:t.left+t.right,height:t.top+t.bottom}}function oL(s,t={}){return s.sourceBBox.clone().moveAndExpand(vS(t))}function rL(s,t={}){return s.targetBBox.clone().moveAndExpand(vS(t))}function mQ(s,t={}){return s.sourceAnchor?s.sourceAnchor:oL(s,t).getCenter()}function yQ(s,t={}){return s.targetAnchor?s.targetAnchor:rL(s,t).getCenter()}const aL=(s,t,e)=>{let n=oL(e,t),r=rL(e,t);const l=mQ(e,t),f=yQ(e,t);n=n.union(bS(l)),r=r.union(bS(f));const h=s.map(x=>G.create(x));h.unshift(l),h.push(f);let p=null;const y=[];for(let x=0,S=h.length-1;x<S;x+=1){let w=null;const T=h[x],M=h[x+1],D=Ms(T,M)!=null;if(x===0)x+1===S?n.intersectsWithRect(r.clone().inflate(1))?w=yT(T,M,n,r):D||(w=SQ(T,M,n,r)):n.containsPoint(M)?w=yT(T,M,n,bS(M).moveAndExpand(vS(t))):D||(w=SS(T,M,n));else if(x+1===S){const R=D&&Ms(M,T)===p;r.containsPoint(T)||R?w=yT(T,M,bS(T).moveAndExpand(vS(t)),r,p):D||(w=xQ(T,M,r,p))}else D||(w=lL(T,M,p));w?(y.push(...w.points),p=w.direction):p=Ms(T,M),x+1<S&&y.push(M)}return y},bQ={N:"S",S:"N",E:"W",W:"E"},vQ={N:-Math.PI/2*3,S:-Math.PI/2,E:0,W:Math.PI};function xS(s,t,e){let n=new G(s.x,t.y);return e.containsPoint(n)&&(n=new G(t.x,s.y)),n}function mT(s,t){return s[t==="W"||t==="E"?"width":"height"]}function Ms(s,t){return s.x===t.x?s.y>t.y?"N":"S":s.y===t.y?s.x>t.x?"W":"E":null}function lL(s,t,e){const n=new G(s.x,t.y),r=new G(t.x,s.y),l=Ms(s,n),f=Ms(s,r),h=e?bQ[e]:null,p=l===e||l!==h&&(f===h||f!==e)?n:r;return{points:[p],direction:Ms(p,t)}}function SS(s,t,e){const n=xS(s,t,e);return{points:[n],direction:Ms(n,t)}}function xQ(s,t,e,n){const r=[new G(s.x,t.y),new G(t.x,s.y)],l=r.filter(p=>!e.containsPoint(p)),f=l.filter(p=>Ms(p,s)!==n);let h;if(f.length>0)return h=f.filter(p=>Ms(s,p)===n).pop(),h=h||f[0],{points:[h],direction:Ms(h,t)};{h=Y$(r,l)[0];const p=G.create(t).move(h,-mT(e,n)/2);return{points:[xS(p,s,e),p],direction:Ms(p,t)}}}function SQ(s,t,e,n){let r=SS(t,s,n);const l=r.points[0];if(e.containsPoint(l)){r=SS(s,t,e);const f=r.points[0];if(n.containsPoint(f)){const h=G.create(s).move(f,-mT(e,Ms(s,f))/2),p=G.create(t).move(l,-mT(n,Ms(t,l))/2),y=new Pt(h,p).getCenter(),x=SS(s,y,e),S=lL(y,t,x.direction);r.points=[x.points[0],S.points[0]],r.direction=S.direction}}return r}function yT(s,t,e,n,r){const l=e.union(n).inflate(1),f=l.getCenter(),h=f.distance(t)>f.distance(s),p=h?t:s,y=h?s:t;let x,S,w;r?(x=G.fromPolar(l.width+l.height,vQ[r],p),x=l.getNearestPointToPoint(x).move(x,-1)):x=l.getNearestPointToPoint(p).move(p,1),S=xS(x,y,l);let T;x.round().equals(S.round())?(S=G.fromPolar(l.width+l.height,fs(x.theta(p))+Math.PI/2,y),S=l.getNearestPointToPoint(S).move(y,1).round(),w=xS(x,S,l),T=h?[S,w,x]:[x,w,S]):T=h?[S,x]:[x,S];const M=Ms(h?x:S,t);return{points:T,direction:M}}const wQ={step:10,maxLoopCount:2e3,precision:1,maxDirectionChange:90,perpendicular:!0,excludeTerminals:[],excludeNodes:[],excludeShapes:[],startDirections:["top","right","bottom","left"],endDirections:["top","right","bottom","left"],directionMap:{top:{x:0,y:-1},right:{x:1,y:0},bottom:{x:0,y:1},left:{x:-1,y:0}},cost(){return _u(this.step,this)},directions(){const s=_u(this.step,this),t=_u(this.cost,this);return[{cost:t,offsetX:s,offsetY:0},{cost:t,offsetX:-s,offsetY:0},{cost:t,offsetX:0,offsetY:s},{cost:t,offsetX:0,offsetY:-s}]},penalties(){const s=_u(this.step,this);return{0:0,45:s/2,90:s/2}},paddingBox(){const s=_u(this.step,this);return{x:-s,y:-s,width:2*s,height:2*s}},fallbackRouter:aL,draggingRouter:null,snapToGrid:!0};function _u(s,t){return typeof s=="function"?s.call(t):s}function CQ(s){const t=Object.keys(s).reduce((e,n)=>{const r=e;return n==="fallbackRouter"||n==="draggingRouter"||n==="fallbackRoute"?r[n]=s[n]:r[n]=_u(s[n],s),e},{});if(t.padding){const e=fa(t.padding);t.paddingBox={x:-e.left,y:-e.top,width:e.left+e.right,height:e.top+e.bottom}}return t.directions.forEach(e=>{const n=new G(0,0),r=new G(e.offsetX,e.offsetY);e.angle=Es(n.theta(r))}),t}class cL{constructor(t){this.options=t,this.mapGridSize=100,this.map={}}build(t,e){const n=this.options,r=n.excludeTerminals.reduce((y,x)=>{const S=e[x];if(S){const w=t.getCell(S.cell);w&&y.push(w)}return y},[]);let l=[];const f=t.getCell(e.getSourceCellId());f&&(l=lN(l,f.getAncestors().map(y=>y.id)));const h=t.getCell(e.getTargetCellId());h&&(l=lN(l,h.getAncestors().map(y=>y.id)));const p=this.mapGridSize;return t.getNodes().reduce((y,x)=>{const S=r.some(R=>R.id===x.id),w=x.shape?n.excludeShapes.includes(x.shape):!1,T=n.excludeNodes.some(R=>typeof R=="string"?x.id===R:R===x),M=l.includes(x.id),D=w||S||T||M;if(x.isVisible()&&!D){const R=x.getBBox().moveAndExpand(n.paddingBox),N=R.getOrigin().snapToGrid(p),L=R.getCorner().snapToGrid(p);for(let _=N.x;_<=L.x;_+=p)for(let U=N.y;U<=L.y;U+=p){const $=new G(_,U).toString();y[$]==null&&(y[$]=[]),y[$].push(R)}}return y},this.map),this}isAccessible(t){const e=t.clone().snapToGrid(this.mapGridSize).toString(),n=this.map[e];return n?n.every(r=>!r.containsPoint(t)):!0}}const wS=new WeakMap;function Bu(s){const t=wS.get(s);t&&(t.dirty=!0)}function EQ(s){const t=wS.get(s);!t||t.installed||(s.on("reseted",()=>Bu(s)),s.on("updated",()=>Bu(s)),s.on("cell:added",()=>Bu(s)),s.on("cell:removed",()=>Bu(s)),s.on("cell:change:position",()=>Bu(s)),s.on("cell:change:size",()=>Bu(s)),s.on("edge:change:source",()=>Bu(s)),s.on("edge:change:target",()=>Bu(s)),t.installed=!0)}function uL(s){const t=s.paddingBox,e=t==null?"none":`${t.x},${t.y},${t.width},${t.height}`,n=(s.excludeTerminals||[]).map(f=>f).sort().join("|"),r=(s.excludeShapes||[]).slice().sort().join("|"),l=(s.excludeNodes||[]).map(f=>typeof f=="string"?f:(f==null?void 0:f.id)||"node").slice().sort().join("|");return`${e}#${n}#${r}#${l}`}function AQ(s,t,e){let n=wS.get(s);if(!n){const l=new cL(e).build(s,t);return n={map:l,dirty:!1,installed:!1,optionsKey:uL(e)},wS.set(s,n),EQ(s),l}const r=uL(e);return(n.dirty||n.optionsKey!==r)&&(n.map=new cL(e).build(s,t),n.dirty=!1,n.optionsKey=r),n.map}const bT=1,fL=2;class TQ{constructor(){this.items=[],this.hash={},this.values={},this.indexes={}}swap(t,e){const n=this.items[t],r=this.items[e];this.items[t]=r,this.items[e]=n,this.indexes[r]=t,this.indexes[n]=e}less(t,e){const n=this.items[t],r=this.items[e];return this.values[n]<this.values[r]}bubbleUp(t){for(;t>0;){const e=t-1>>1;if(this.less(t,e))this.swap(t,e),t=e;else break}}bubbleDown(t){const e=this.items.length;for(;;){const n=(t<<1)+1,r=n+1;let l=t;if(n<e&&this.less(n,l)&&(l=n),r<e&&this.less(r,l)&&(l=r),l!==t)this.swap(t,l),t=l;else break}}add(t,e){const n=this.hash[t]===bT;if(this.values[t]=e,n){const r=this.indexes[t];r!=null&&(this.bubbleUp(r),this.bubbleDown(r))}else{this.hash[t]=bT,this.items.push(t);const r=this.items.length-1;this.indexes[t]=r,this.bubbleUp(r)}}pop(){if(this.items.length===0)return;const t=this.items[0];this.hash[t]=fL;const e=this.items.pop();return delete this.indexes[t],this.items.length>0&&e!=null&&(this.items[0]=e,this.indexes[e]=0,this.bubbleDown(0)),t}isOpen(t){return this.hash[t]===bT}isClose(t){return this.hash[t]===fL}isEmpty(){return this.items.length===0}}function hL(s,t){const e=s.sourceBBox.clone();return t&&t.paddingBox?e.moveAndExpand(t.paddingBox):e}function dL(s,t){const e=s.targetBBox.clone();return t&&t.paddingBox?e.moveAndExpand(t.paddingBox):e}function gL(s,t){return s.sourceAnchor?s.sourceAnchor:hL(s,t).getCenter()}function MQ(s,t){return s.targetAnchor?s.targetAnchor:dL(s,t).getCenter()}function vT(s,t,e,n,r){const l=360/e,f=s.theta(OQ(s,t,n,r)),h=Es(f+l/2);return l*Math.floor(h/l)}function OQ(s,t,e,n){const r=n.step,l=t.x-s.x,f=t.y-s.y,h=l/e.x,p=f/e.y,y=h*r,x=p*r;return new G(s.x+y,s.y+x)}function pL(s,t){const e=Math.abs(s-t);return e>180?360-e:e}function DQ(s,t){const e=t.step;return t.directions.forEach(n=>{n.gridOffsetX=n.offsetX/e*s.x,n.gridOffsetY=n.offsetY/e*s.y}),t.directions}function RQ(s,t,e){return{source:t.clone(),x:mL(e.x-t.x,s),y:mL(e.y-t.y,s)}}function mL(s,t){if(!s)return t;const e=Math.abs(s),n=Math.round(e/t);if(!n)return e;const r=n*t,f=(e-r)/n;return t+f}function zQ(s,t){const e=t.source,n=ha(s.x-e.x,t.x)+e.x,r=ha(s.y-e.y,t.y)+e.y;return new G(n,r)}function _b(s,t){return s.round(t)}function CS(s,t,e){return _b(zQ(s.clone(),t),e)}function Bb(s){return s.toString()}function xT(s){return new G(s.x===0?0:Math.abs(s.x)/s.x,s.y===0?0:Math.abs(s.y)/s.y)}function yL(s,t){let e=1/0;for(let n=0,r=t.length;n<r;n+=1){const l=s.manhattanDistance(t[n]);l<e&&(e=l)}return e}function bL(s,t,e,n,r){const l=r.precision,f=r.directionMap,h=s.diff(t.getCenter()),p=Object.keys(f).reduce((y,x)=>{if(e.includes(x)){const S=f[x],w=new G(s.x+S.x*(Math.abs(h.x)+t.width),s.y+S.y*(Math.abs(h.y)+t.height)),M=new Pt(s,w).intersect(t)||[];let D,R=null;for(let N=0;N<M.length;N+=1){const L=M[N],_=s.squaredDistance(L);(D==null||_>D)&&(D=_,R=L)}if(R){let N=CS(R,n,l);t.containsPoint(N)&&(N=CS(N.translate(S.x*n.x,S.y*n.y),n,l)),y.push(N)}}return y},[]);return t.containsPoint(s)||p.push(CS(s,n,l)),p}function NQ(s,t,e,n,r){const l=[];let f=xT(r.diff(e)),h=Bb(e),p=s[h],y;for(;p;){y=t[h];const w=xT(y.diff(p));w.equals(f)||(l.unshift(y),f=w),h=Bb(p),p=s[h]}const x=t[h];return xT(x.diff(n)).equals(f)||l.unshift(x),l}function LQ(s,t,e,n,r){var l;const f=r.precision;let h,p;Dt.isRectangle(t)?h=_b(gL(s,r).clone(),f):h=_b(t.clone(),f),Dt.isRectangle(e)?p=_b(MQ(s,r).clone(),f):p=_b(e.clone(),f);const y=RQ(r.step,h,p),x=h,S=p;let w,T;if(Dt.isRectangle(t)?w=bL(x,t,r.startDirections,y,r):w=[x],Dt.isRectangle(e)?T=bL(p,e,r.endDirections,y,r):T=[S],w=w.filter(M=>n.isAccessible(M)),T=T.filter(M=>n.isAccessible(M)),w.length>0&&T.length>0){const M=new TQ,D={},R={},N={};for(let ct=0,lt=w.length;ct<lt;ct+=1){const vt=w[ct],Ot=Bb(vt);M.add(Ot,yL(vt,T)),D[Ot]=vt,N[Ot]=0}const L=r.previousDirectionAngle,_=L===void 0;let U,$;const Y=DQ(y,r),k=Y.length,H=T.map(ct=>Bb(ct)),J=G.equalPoints(w,T);let F=r.maxLoopCount;for(;!M.isEmpty()&&F>0;){const ct=M.pop();if(ct==null)break;const lt=D[ct],vt=R[ct],Ot=N[ct],zt=lt.equals(x),V=vt==null;let ot;if(V?_?zt?ot=null:ot=vT(x,lt,k,y,r):ot=L:ot=vT(vt,lt,k,y,r),!(V&&J)&&H.indexOf(ct)>=0)return r.previousDirectionAngle=ot,NQ(R,D,lt,x,S);for(let yt=0;yt<k;yt+=1){U=Y[yt];const Mt=(l=U.angle)!==null&&l!==void 0?l:0;if($=ot==null?0:pL(ot,Mt),!(_&&zt)&&$>r.maxDirectionChange)continue;const nt=CS(lt.clone().translate(U.gridOffsetX||0,U.gridOffsetY||0),y,f),St=Bb(nt);if(M.isClose(St)||!n.isAccessible(nt))continue;if(H.indexOf(St)>=0&&!nt.equals(S)){const Rt=vT(nt,S,k,y,r);if(pL(Mt,Rt)>r.maxDirectionChange)continue}const Tt=U.cost,Et=zt?0:r.penalties[$],Ht=Ot+Tt+Et;(!M.isOpen(St)||Ht<N[St])&&(D[St]=nt,R[St]=lt,N[St]=Ht,M.add(St,Ht+yL(nt,T)))}F-=1}}return r.fallbackRoute?Gt(r.fallbackRoute,this,x,S,r):null}function jQ(s,t=10){if(s.length<=1)return s;for(let e=0,n=s.length;e<n-1;e+=1){const r=s[e],l=s[e+1];if(r.x===l.x){const f=t*Math.round(r.x/t);r.x!==f&&(r.x=f,l.x=f)}else if(r.y===l.y){const f=t*Math.round(r.y/t);r.y!==f&&(r.y=f,l.y=f)}}return s}const _Q=function(s,t,e){const n=CQ(t),r=hL(e,n),l=dL(e,n),f=gL(e,n),h=AQ(e.graph.model,e.cell,n),p=s.map(T=>G.create(T)),y=[];let x=f,S,w;for(let T=0,M=p.length;T<=M;T+=1){let D=null;if(S=w||r,w=p[T],w==null){w=l;const N=e.cell;if((N.getSourceCellId()==null||N.getTargetCellId()==null)&&typeof n.draggingRouter=="function"){const _=S===r?f:S,U=w.getOrigin();D=Gt(n.draggingRouter,e,_,U,n)}}if(D==null&&(D=LQ(e,S,w,h,n)),D===null)return console.warn("Unable to execute manhattan algorithm, use orth instead"),Gt(n.fallbackRouter,this,s,n,e);const R=D[0];R!=null&&R.equals(x)&&D.shift(),x=D[D.length-1]||x,y.push(...D)}return n.snapToGrid?jQ(y,e.graph.grid.getGridSize()):y},vL=function(s,t,e){return Gt(_Q,this,s,Object.assign(Object.assign({},wQ),t),e)},BQ={maxDirectionChange:45,directions(){const s=_u(this.step,this),t=_u(this.cost,this),e=Math.ceil(Math.sqrt(s*s<<1));return[{cost:t,offsetX:s,offsetY:0},{cost:e,offsetX:s,offsetY:s},{cost:t,offsetX:0,offsetY:s},{cost:e,offsetX:-s,offsetY:s},{cost:t,offsetX:-s,offsetY:0},{cost:e,offsetX:-s,offsetY:-s},{cost:t,offsetX:0,offsetY:-s},{cost:e,offsetX:s,offsetY:-s}]},fallbackRoute:PQ};function PQ(s,t,e){const n=s.theta(t),r=[];let l={x:t.x,y:s.y},f={x:s.x,y:t.y};if(n%180>90){const L=l;l=f,f=L}const h=n%90<45?l:f,p=new Pt(s,h),y=90*Math.ceil(n/90),x=G.fromPolar(p.squaredLength(),fs(y+135),h),S=new Pt(t,x),w=p.intersectsWithLine(S),T=w||s,M=360/e.directions.length,D=T.theta(t),R=Es(D+M/2),N=M*Math.floor(R/M);return e.previousDirectionAngle=N,w&&!w.equals(s)&&!w.equals(t)&&r.push(w.round()),r}const UQ=function(s,t,e){return Gt(vL,this,s,Object.assign(Object.assign({},BQ),t),e)},HQ=(s,t,e)=>{const n=t.offset||32,r=t.min==null?16:t.min;let l=0,f=t.direction;const h=e.sourceBBox,p=e.targetBBox,y=h.getCenter(),x=p.getCenter();if(typeof n=="number"&&(l=n),f==null){let N=p.left-h.right,L=p.top-h.bottom;N>=0&&L>=0?f=N>=L?"L":"T":N<=0&&L>=0?(N=h.left-p.right,N>=0?f=N>=L?"R":"T":f="T"):N>=0&&L<=0?(L=h.top-p.bottom,L>=0?f=N>=L?"L":"B":f="L"):(N=h.left-p.right,L=h.top-p.bottom,N>=0&&L>=0?f=N>=L?"R":"B":N<=0&&L>=0?f="B":N>=0&&L<=0?f="R":f=Math.abs(N)>Math.abs(L)?"R":"B")}f==="H"?f=x.x-y.x>=0?"L":"R":f==="V"&&(f=x.y-y.y>=0?"T":"B"),n==="center"&&(f==="L"?l=(p.left-h.right)/2:f==="R"?l=(h.left-p.right)/2:f==="T"?l=(p.top-h.bottom)/2:f==="B"&&(l=(h.top-p.bottom)/2));let S,w,T;const M=f==="L"||f==="R";if(M){if(x.y===y.y)return[...s];T=f==="L"?1:-1,S="x",w="width"}else{if(x.x===y.x)return[...s];T=f==="T"?1:-1,S="y",w="height"}const D=y.clone(),R=x.clone();if(D[S]+=T*(h[w]/2+l),R[S]-=T*(p[w]/2+l),M){const N=D.x,L=R.x,_=h.width/2+r,U=p.width/2+r;x.x>y.x?L<=N&&(D.x=Math.max(L,y.x+_),R.x=Math.min(N,x.x-U)):L>=N&&(D.x=Math.min(L,y.x-_),R.x=Math.max(N,x.x+U))}else{const N=D.y,L=R.y,_=h.height/2+r,U=p.height/2+r;x.y>y.y?L<=N&&(D.y=Math.max(L,y.y+_),R.y=Math.min(N,x.y-U)):L>=N&&(D.y=Math.min(L,y.y-_),R.y=Math.max(N,x.y+U))}return[D.toJSON(),...s,R.toJSON()]};function fp(s,t){if(t!=null&&t!==!1){const e=typeof t=="boolean"?0:t;if(e>0){const n=G.create(s[1]).move(s[2],e),r=G.create(s[1]).move(s[0],e);return[n.toJSON(),...s,r.toJSON()]}{const n=s[1];return[Object.assign({},n),...s,Object.assign({},n)]}}return s}const ST=Object.freeze(Object.defineProperty({__proto__:null,er:HQ,loop:(s,t,e)=>{const n=t.width||50,l=(t.height||80)/2,f=t.angle||"auto",h=e.sourceAnchor,p=e.targetAnchor,y=e.sourceBBox,x=e.targetBBox;if(h.equals(p)){const S=N=>{const L=fs(N),_=Math.sin(L),U=Math.cos(L),$=new G(h.x+U*n,h.y+_*n),Y=new G($.x-U*l,$.y-_*l),k=Y.clone().rotate(-90,$),H=Y.clone().rotate(90,$);return[k.toJSON(),$.toJSON(),H.toJSON()]},w=N=>{const L=h.clone().move(N,-1),_=new Pt(L,N);return!y.containsPoint(N)&&!y.intersectsWithLine(_)},T=[0,90,180,270,45,135,225,315];if(typeof f=="number")return fp(S(f),t.merge);const M=y.getCenter();if(M.equals(h))return fp(S(0),t.merge);const D=M.angleBetween(h,M.clone().translate(1,0));let R=S(D);if(w(R[1]))return fp(R,t.merge);for(let N=1,L=T.length;N<L;N+=1)if(R=S(D+T[N]),w(R[1]))return fp(R,t.merge);return fp(R,t.merge)}{const S=new Pt(h,p);let w=S.parallel(-n),T=w.getCenter(),M=w.start.clone().move(w.end,l),D=w.end.clone().move(w.start,l);const R=S.parallel(-1),N=new Pt(R.start,T),L=new Pt(R.end,T);if((y.containsPoint(T)||x.containsPoint(T)||y.intersectsWithLine(N)||y.intersectsWithLine(L)||x.intersectsWithLine(N)||x.intersectsWithLine(L))&&(w=S.parallel(n),T=w.getCenter(),M=w.start.clone().move(w.end,l),D=w.end.clone().move(w.start,l)),t.merge){const _=new Pt(h,p),U=new Pt(T,_.center).setLength(Number.MAX_SAFE_INTEGER),$=y.intersectsWithLine(U),Y=x.intersectsWithLine(U),k=$?Array.isArray($)?$:[$]:[];Y&&(Array.isArray(Y)?k.push(...Y):k.push(Y));const H=_.center.closest(k);H?(e.sourceAnchor=H.clone(),e.targetAnchor=H.clone()):(e.sourceAnchor=_.center.clone(),e.targetAnchor=_.center.clone())}return fp([M.toJSON(),T.toJSON(),D.toJSON()],t.merge)}},manhattan:vL,metro:UQ,normal:gQ,oneSide:pQ,orth:aL},Symbol.toStringTag,{value:"Module"})),hp=In.create({type:"router"});hp.register(ST,!0);function kQ(s){return s!=null&&!ES(s)}function ES(s){return s!=null&&typeof s=="string"}function VQ(s){return s==null||ES(s)?s:wn(s)}function GQ(s){return`${s}`.trim().replace(/[\r|\n]/g," ").replace(/>\s+</g,"><")}function xL(s,t={ns:Di.svg}){const e=document.createDocumentFragment(),n={},r={},l=[{markup:Array.isArray(s)?s:[s],parent:e,ns:t.ns}];for(;l.length>0;){const f=l.pop();let h=f.ns||Di.svg;const p=f.markup,y=f.parent;p.forEach(x=>{const S=x.tagName;if(!S)throw new TypeError("Invalid tagName");x.ns&&(h=x.ns);const w=h?kA(S,h):RN(S),T=x.attrs;T&&Te(w,pb(T));const M=x.style;M&&$e(w,M);const D=x.className;D!=null&&w.setAttribute("class",Array.isArray(D)?D.join(" "):D),x.textContent&&(w.textContent=x.textContent);const R=x.selector;if(R!=null){if(r[R])throw new TypeError("Selector must be unique");r[R]=w}if(x.groupSelector){let L=x.groupSelector;Array.isArray(L)||(L=[L]),L.forEach(_=>{n[_]||(n[_]=[]),n[_].push(w)})}y.appendChild(w);const N=x.children;Array.isArray(N)&&l.push({ns:h,markup:N,parent:w})})}return Object.keys(n).forEach(f=>{if(r[f])throw new Error("Ambiguous group selector");r[f]=n[f]}),{fragment:e,selectors:r,groups:n}}function wT(s){return s instanceof SVGElement?ga("g"):RN("div")}function $Q(s){if(ES(s)){const r=Xt.createVectors(s),l=r.length;if(l===1)return{elem:r[0].node};if(l>1){const f=wT(r[0].node);return r.forEach(h=>{f.appendChild(h.node)}),{elem:f}}return{}}const t=xL(s),e=t.fragment;let n=null;return e.childNodes.length>1?(n=wT(e.firstChild),n.appendChild(e)):n=e.firstChild,{elem:n,selectors:t.selectors}}function qQ(s){const t=Xt.createVectors(s),e=document.createDocumentFragment();for(let n=0,r=t.length;n<r;n+=1){const l=t[n].node;e.appendChild(l)}return{fragment:e,selectors:{}}}function SL(s,t,e){if(s!=null){let n;const r=s.tagName.toLowerCase();if(s===t)return typeof e=="string"?n=`> ${r} > ${e}`:n=`> ${r}`,n;const l=s.parentNode;if(l&&l.childNodes.length>1){const f=VA(s)+1;n=`${r}:nth-child(${f})`}else n=r;return e&&(n+=` > ${e}`),SL(s.parentNode,t,n)}return e}function YQ(){return"g"}function XQ(){return{tagName:"circle",selector:"circle",attrs:{r:10,fill:"#FFFFFF",stroke:"#000000"}}}function IQ(){return{tagName:"text",selector:"text",attrs:{fill:"#000000"}}}function ZQ(){return[{tagName:"path",selector:"wrap",groupSelector:"lines",attrs:{fill:"none",cursor:"pointer",stroke:"transparent",strokeLinecap:"round"}},{tagName:"path",selector:"line",groupSelector:"lines",attrs:{fill:"none",pointerEvents:"none"}}]}function QQ(s=!1){return{tagName:"foreignObject",selector:"fo",children:[{ns:Di.xhtml,tagName:"body",selector:"foBody",attrs:{xmlns:Di.xhtml},style:{width:"100%",height:"100%",background:"transparent"},children:s?[]:[{tagName:"div",selector:"foContent",style:{width:"100%",height:"100%"}}]}]}}const hs={isJSONMarkup:kQ,isStringMarkup:ES,clone:VQ,sanitize:GQ,parseJSONMarkup:xL,createContainer:wT,renderMarkup:$Q,parseLabelStringMarkup:qQ,getSelector:SL,getPortContainerMarkup:YQ,getPortMarkup:XQ,getPortLabelMarkup:IQ,getEdgeMarkup:ZQ,getForeignObjectMarkup:QQ};function aet(s,t){}function cet(s){}function Lh(s,t){return t?ga(s||"g"):kA(s||"div")}function wL(s,t,e){if(!s||s===".")return{elems:[t]};if(e){const n=e[s];if(n)return{elems:Array.isArray(n)?n:[n]}}{const n=s.includes(">")?`:scope ${s}`:s;return{isCSSSelector:!0,elems:Array.prototype.slice.call(t.querySelectorAll(n))}}}function FQ(s){var t;let e=s;const n=s.originalEvent,r=(t=n==null?void 0:n.changedTouches)===null||t===void 0?void 0:t[0];if(r){for(const l in s)r[l]===void 0&&(r[l]=s[l]);e=r}return e}let to=class extends Ts{get priority(){return 2}get disposeContainer(){return!0}constructor(){super(),this.cid=Rq("v"),this.cid}confirmUpdate(t,e){return 0}empty(t=this.container){return db(t),this}unmount(t=this.container){return or(t),this}remove(t=this.container){return t===this.container?(this.removeEventListeners(document),this.onRemove(),this.cid,this.disposeContainer&&this.unmount(t)):this.unmount(t),this}onRemove(){}setClass(t,e=this.container){e.classList.value=Array.isArray(t)?t.join(" "):t}addClass(t,e=this.container){return _t(e,Array.isArray(t)?t.join(" "):t),this}removeClass(t,e=this.container){return dn(e,Array.isArray(t)?t.join(" "):t),this}setStyle(t,e=this.container){return $e(e,t),this}setAttrs(t,e=this.container){return t!=null&&e!=null&&Te(e,t),this}findAttr(t,e=this.container){let n=e;for(;n&&n.nodeType===1;){const r=n.getAttribute(t);if(r!=null)return r;if(n===this.container)return null;n=n.parentNode}return null}find(t,e=this.container,n=this.selectors){return wL(t,e,n).elems}findOne(t,e=this.container,n=this.selectors){const r=this.find(t,e,n);return r.length>0?r[0]:null}findByAttr(t,e=this.container){let n=e;for(;n!=null&&n.getAttribute;){const r=n.getAttribute(t);if((r!=null||n===this.container)&&r!=="false")return n;n=n.parentNode}return null}getSelector(t,e){let n;if(t===this.container)return typeof e=="string"&&(n=`> ${e}`),n;if(t){const r=VA(t)+1;n=`${t.tagName.toLowerCase()}:nth-child(${r})`,e&&(n+=` > ${e}`),n=this.getSelector(t.parentNode,n)}return n}prefixClassName(t){return He.prefix(t)}delegateEvents(t,e){if(t==null)return this;e||this.undelegateEvents();const n=/^(\S+)\s*(.*)$/;return Object.keys(t).forEach(r=>{const l=r.match(n);if(l==null)return;const f=this.getEventHandler(t[r]);typeof f=="function"&&this.delegateEvent(l[1],l[2],f)}),this}undelegateEvents(){return nn.off(this.container,this.getEventNamespace()),this}delegateDocumentEvents(t,e){return this.addEventListeners(document,t,e),this}undelegateDocumentEvents(){return this.removeEventListeners(document),this}delegateEvent(t,e,n){return nn.on(this.container,t+this.getEventNamespace(),e,n),this}undelegateEvent(t,e,n){const r=t+this.getEventNamespace();return e==null?nn.off(this.container,r):typeof e=="string"?nn.off(this.container,r,e,n):nn.off(this.container,r,e),this}addEventListeners(t,e,n){if(e==null)return this;const r=this.getEventNamespace();return Object.keys(e).forEach(l=>{const f=this.getEventHandler(e[l]);typeof f=="function"&&nn.on(t,l+r,n,f)}),this}removeEventListeners(t){return t!=null&&nn.off(t,this.getEventNamespace()),this}getEventNamespace(){return`.${He.prefixCls}-event-${this.cid}`}getEventHandler(t){let e;if(typeof t=="string"){const n=this[t];typeof n=="function"&&(e=(...r)=>n.call(this,...r))}else e=(...n)=>t.call(this,...n);return e}getEventTarget(t,e={}){const{target:n,type:r,clientX:l=0,clientY:f=0}=t;return e.fromPoint||r==="touchmove"||r==="touchend"?document.elementFromPoint(l,f):n}stopPropagation(t){return this.setEventData(t,{propagationStopped:!0}),this}isPropagationStopped(t){return this.getEventData(t).propagationStopped===!0}getEventData(t){return this.eventData(t)}setEventData(t,e){return this.eventData(t,e)}eventData(t,e){if(t==null)throw new TypeError("Event object required");let n=t.data;const r=`__${this.cid}__`;return e==null?n==null?{}:n[r]||{}:(n==null&&(n=t.data={}),n[r]==null?n[r]=Object.assign({},e):n[r]=Object.assign(Object.assign({},n[r]),e),n[r])}normalizeEvent(t){return FQ(t)}dispose(){this.remove()}};De([Re()],to.prototype,"dispose",null);let CL=0;function JQ(s){return s?$A(s):(CL+=1,`CustomTool${CL}`)}class On extends to{static isToolItem(t){if(t==null)return!1;if(t instanceof On)return!0;const e=t[Symbol.toStringTag],n=t;return(e==null||e===EL)&&n.graph!=null&&n.cell!=null&&typeof n.config=="function"&&typeof n.update=="function"&&typeof n.focus=="function"&&typeof n.blur=="function"&&typeof n.show=="function"&&typeof n.hide=="function"&&typeof n.isVisible=="function"}static define(t){const e=this,n=JA(JQ(t.name),e);return n.config(t),n}static getDefaults(){return this.defaults}static config(t){this.defaults=this.getOptions(t)}static getOptions(t){return Mn(wn(this.getDefaults()),t)}get graph(){return this.cellView.graph}get cell(){return this.cellView.cell}get name(){return this.options.name}get[Symbol.toStringTag](){return EL}constructor(t={}){super(),this.visible=!0,this.options=this.getOptions(t),this.container=Lh(this.options.tagName||"g",this.options.isSVGElement!==!1),_t(this.container,this.prefixClassName("cell-tool")),typeof this.options.className=="string"&&_t(this.container,this.options.className),this.init()}init(){}getOptions(t){return this.constructor.getOptions(t)}delegateEvents(){return this.options.events&&super.delegateEvents(this.options.events),this}config(t,e){return this.cellView=t,this.parent=e,this.stamp(this.container),this.cell.isEdge()?_t(this.container,this.prefixClassName("edge-tool")):this.cell.isNode()&&_t(this.container,this.prefixClassName("node-tool")),this.name&&this.container.setAttribute("data-tool-name",this.name),this.delegateEvents(),this}render(){this.empty();const t=this.options.markup;if(t){const e=hs.parseJSONMarkup(t);this.container.appendChild(e.fragment),this.childNodes=e.selectors}return this.onRender(),this}onRender(){}update(){return this}stamp(t){t&&t.setAttribute("data-cell-id",this.cellView.cell.id)}show(){return this.container.style.display="",this.visible=!0,this}hide(){return this.container.style.display="none",this.visible=!1,this}isVisible(){return this.visible}focus(){const t=this.options.focusOpacity;return t!=null&&Number.isFinite(t)&&(this.container.style.opacity=`${t}`),this.parent.focus(this),this}blur(){return this.container.style.opacity="",this.parent.blur(this),this}guard(t){return this.graph==null||this.cellView==null?!0:this.graph.view.guard(t,this.cellView)}}On.toStringTag=`X6.${On.name}`,On.defaults={isSVGElement:!0,tagName:"g"};const EL=`X6.${On.name}`;class KQ{constructor(t){this.view=t}get cell(){return this.view.cell}getDefinition(t){return this.cell.getAttrDefinition(t)}processAttrs(t,e){let n,r,l,f;const h=[];return Object.keys(e).forEach(p=>{const y=e[p],x=this.getDefinition(p),S=Gt(KI,this.view,x,y,{elem:t,attrs:e,cell:this.cell,view:this.view});if(x&&S)typeof x=="string"?(n==null&&(n={}),n[x]=y):y!==null&&h.push({name:p,definition:x});else{n==null&&(n={});const w=BN.includes(p)?p:_N(p);n[w]=y}}),h.forEach(({name:p,definition:y})=>{const x=e[p];typeof y.set=="function"&&(r==null&&(r={}),r[p]=x),typeof y.offset=="function"&&(l==null&&(l={}),l[p]=x),typeof y.position=="function"&&(f==null&&(f={}),f[p]=x)}),{raw:e,normal:n,set:r,offset:l,position:f}}mergeProcessedAttrs(t,e){var n;t.set=Object.assign(Object.assign({},t.set),e.set),t.position=Object.assign(Object.assign({},t.position),e.position),t.offset=Object.assign(Object.assign({},t.offset),e.offset);const r=(n=t.normal)===null||n===void 0?void 0:n.transform;r!=null&&e.normal&&(e.normal.transform=r),t.normal=e.normal}findAttrs(t,e,n,r){const l=[],f=new lT;return Object.keys(t).forEach(h=>{const p=t[h];if(!ca(p))return;const{isCSSSelector:y,elems:x}=wL(h,e,r);n[h]=x;for(let S=0,w=x.length;S<w;S+=1){const T=x[S],M=r&&r[h]===T,D=f.get(T);if(D){D.array||(l.push(T),D.array=!0,D.attrs=[D.attrs],D.priority=[D.priority]);const R=D.attrs,N=D.priority;if(M)R.unshift(p),N.unshift(-1);else{const L=wq(N,y?-1:w);R.splice(L,0,p),N.splice(L,0,w)}}else f.set(T,{elem:T,attrs:p,priority:M?-1:w,array:!1})}}),l.forEach(h=>{const p=f.get(h),y=p.attrs;p.attrs=y.reduceRight((x,S)=>Mn(x,S),{})}),f}updateRelativeAttrs(t,e,n){const r=e.raw||{};let l=e.normal||{};const f=e.set,h=e.position,p=e.offset,y=()=>({elem:t,cell:this.cell,view:this.view,attrs:r,refBBox:n.clone()});if(f!=null&&Object.keys(f).forEach(R=>{const N=f[R],L=this.getDefinition(R);if(L!=null){const _=Gt(L.set,this.view,N,y());typeof _=="object"?l=Object.assign(Object.assign({},l),_):_!=null&&(l[R]=_)}}),t instanceof HTMLElement){this.view.setAttrs(l,t);return}const x=l.transform,S=x?`${x}`:null,w=yb(S),T=new G(w.e,w.f);x&&(delete l.transform,w.e=0,w.f=0);let M=!1;h!=null&&Object.keys(h).forEach(R=>{const N=h[R],L=this.getDefinition(R);if(L!=null){const _=Gt(L.position,this.view,N,y());_!=null&&(M=!0,T.translate(G.create(_)))}}),this.view.setAttrs(l,t);let D=!1;if(p!=null){const R=this.view.getBoundingRectOfElement(t);if(R.width>0&&R.height>0){const N=ar(R,w);Object.keys(p).forEach(L=>{const _=p[L],U=this.getDefinition(L);if(U!=null){const $=Gt(U.offset,this.view,_,{elem:t,cell:this.cell,view:this.view,attrs:r,refBBox:N});$!=null&&(D=!0,T.translate(G.create($)))}})}}(x!=null||M||D)&&(T.round(1),w.e=T.x,w.f=T.y,t.setAttribute("transform",bb(w)))}update(t,e,n){const r={},l=this.findAttrs(n.attrs||e,t,r,n.selectors),f=n.attrs?this.findAttrs(e,t,r,n.selectors):l,h=[];l.each(x=>{const S=x.elem,w=x.attrs,T=this.processAttrs(S,w);if(T.set==null&&T.position==null&&T.offset==null)this.view.setAttrs(T.normal,S);else{const M=f.get(S),D=M?M.attrs:null,R=D&&w.ref==null?D.ref:w.ref;let N;if(R){if(N=(r[R]||this.view.find(R,t,n.selectors))[0],!N)throw new Error(`"${R}" reference does not exist.`)}else N=null;const L={node:S,refNode:N,attributes:D,processedAttributes:T},_=h.findIndex(U=>U.refNode===S);_>-1?h.splice(_,0,L):h.push(L)}});const p=new lT;let y;h.forEach(x=>{const S=x.node,w=x.refNode;let T;const M=w!=null&&n.rotatableNode!=null&&GA(n.rotatableNode,w);if(w&&(T=p.get(w)),!T){const N=M?n.rotatableNode:t;T=w?il(w,{target:N}):n.rootBBox,w&&p.set(w,T)}let D;n.attrs&&x.attributes?(D=this.processAttrs(S,x.attributes),this.mergeProcessedAttrs(D,x.processedAttributes)):D=x.processedAttributes;let R=T;M&&n.rotatableNode!=null&&!n.rotatableNode.contains(S)&&(y||(y=yb(Te(n.rotatableNode,"transform"))),R=ar(T,y)),this.updateRelativeAttrs(S,D,R)})}}class WQ{constructor(t){this.view=t,this.clean()}clean(){this.elemCache&&this.elemCache.dispose(),this.elemCache=new lT,this.pathCache={}}get(t){return this.elemCache.has(t)||this.elemCache.set(t,{}),this.elemCache.get(t)}getData(t){const e=this.get(t);return e.data||(e.data={}),e.data}getMatrix(t){const e=this.get(t);if(e.matrix==null){const n=this.view.container;e.matrix=XY(t,n)}return Ri(e.matrix)}getShape(t){const e=this.get(t);return e.shape==null&&(e.shape=p3(t)),e.shape.clone()}getBoundingRect(t){const e=this.get(t);return e.boundingRect==null&&(e.boundingRect=fX(t)),e.boundingRect.clone()}}class tF{get cell(){return this.view.cell}constructor(t,e,n=[]){this.view=t;const r={},l={};let f=0;Object.keys(e).forEach(p=>{let y=e[p];Array.isArray(y)||(y=[y]),y.forEach(x=>{let S=r[x];S||(f+=1,S=r[x]=1<<f),l[p]|=S})});let h=n;if(Array.isArray(h)||(h=[h]),h.forEach(p=>{r[p]||(f+=1,r[p]=1<<f)}),f>25)throw new Error("Maximum number of flags exceeded.");this.flags=r,this.attrs=l,this.bootstrap=n}getFlag(t){const e=this.flags;return e==null?0:Array.isArray(t)?t.reduce((n,r)=>n|e[r],0):e[t]|0}hasAction(t,e){return t&this.getFlag(e)}removeAction(t,e){return t^t&this.getFlag(e)}getBootstrapFlag(){return this.getFlag(this.bootstrap)}getChangedFlag(){let t=0;return this.attrs&&Object.keys(this.attrs).forEach(e=>{this.cell.hasChanged(e)&&(t|=this.attrs[e])}),t}}class Ni extends to{static getDefaults(){return Ni.defaults}static isCellView(t){if(t==null)return!1;if(t instanceof Ni)return!0;const e=t[Symbol.toStringTag],n=t;return(e==null||e===AL)&&typeof n.isNodeView=="function"&&typeof n.isEdgeView=="function"&&typeof n.confirmUpdate=="function"}static config(t){Ni.defaults=Ni.getOptions(t)}static getOptions(t){const e=(y,x)=>x!=null?cN([...Array.isArray(y)?y:[y],...Array.isArray(x)?x:[x]]):Array.isArray(y)?[...y]:[y],n=wn(Ni.getDefaults()),{bootstrap:r,actions:l,events:f,documentEvents:h}=t,p=re(t,["bootstrap","actions","events","documentEvents"]);return r&&(n.bootstrap=e(n.bootstrap,r)),l&&Object.entries(l).forEach(([y,x])=>{const S=n.actions[y];x&&S?n.actions[y]=e(S,x):x&&(n.actions[y]=e(x))}),f&&(n.events=Object.assign(Object.assign({},n.events),f)),t.documentEvents&&(n.documentEvents=Object.assign(Object.assign({},n.documentEvents),h)),Mn(n,p)}get[Symbol.toStringTag](){return AL}constructor(t,e={}){super(),this.cell=t,this.options=this.ensureOptions(e),this.graph=this.options.graph,this.attr=new KQ(this),this.flag=new tF(this,this.options.actions,this.options.bootstrap),this.cache=new WQ(this),this.setContainer(this.ensureContainer()),this.setup(),this.init()}init(){}onRemove(){this.removeTools()}get priority(){return this.options.priority}get rootSelector(){return this.options.rootSelector}getConstructor(){return this.constructor}ensureOptions(t){return this.getConstructor().getOptions(t)}getContainerTagName(){return this.options.isSvgElement?"g":"div"}getContainerStyle(){}getContainerAttrs(){return{"data-cell-id":this.cell.id,"data-shape":this.cell.shape}}getContainerClassName(){return this.prefixClassName("cell")}ensureContainer(){return Lh(this.getContainerTagName(),this.options.isSvgElement)}setContainer(t){if(this.container!==t){this.undelegateEvents(),this.container=t,this.options.events!=null&&this.delegateEvents(this.options.events);const e=this.getContainerAttrs();e!=null&&this.setAttrs(e,t);const n=this.getContainerStyle();n!=null&&this.setStyle(n,t);const r=this.getContainerClassName();r!=null&&this.addClass(r,t)}return this}isNodeView(){return!1}isEdgeView(){return!1}render(){return this}confirmUpdate(t,e={}){return 0}getBootstrapFlag(){return this.flag.getBootstrapFlag()}getFlag(t){return this.flag.getFlag(t)}hasAction(t,e){return this.flag.hasAction(t,e)}removeAction(t,e){return this.flag.removeAction(t,e)}handleAction(t,e,n,r){if(this.hasAction(t,e)){n();const l=[e];return r&&(typeof r=="string"?l.push(r):l.push(...r)),this.removeAction(t,l)}return t}setup(){this.cell.on("changed",this.onCellChanged,this)}onCellChanged({options:t}){this.onAttrsChange(t)}onAttrsChange(t){let e=this.flag.getChangedFlag();t.updated||!e||(t.dirty&&this.hasAction(e,"update")&&(e|=this.getFlag("render")),t.toolId&&(t.async=!1),this.graph!=null&&this.graph.renderer.requestViewUpdate(this,e,t))}parseJSONMarkup(t,e){const n=hs.parseJSONMarkup(t),r=n.selectors,l=this.rootSelector;if(e&&l){if(r[l])throw new Error("Invalid root selector");r[l]=e}return n}can(t){let e=this.graph.options.interacting;if(typeof e=="function"&&(e=Gt(e,this.graph,this)),typeof e=="object"){let n=e[t];return typeof n=="function"&&(n=Gt(n,this.graph,this)),n!==!1}return typeof e=="boolean"?e:!1}cleanCache(){return this.cache.clean(),this}getCache(t){return this.cache.get(t)}getDataOfElement(t){return this.cache.getData(t)}getMatrixOfElement(t){return this.cache.getMatrix(t)}getShapeOfElement(t){return this.cache.getShape(t)}getBoundingRectOfElement(t){return this.cache.getBoundingRect(t)}getBBoxOfElement(t){const e=this.getBoundingRectOfElement(t),n=this.getMatrixOfElement(t),r=this.getRootRotatedMatrix(),l=this.getRootTranslatedMatrix();return ar(e,l.multiply(r).multiply(n))}getUnrotatedBBoxOfElement(t){const e=this.getBoundingRectOfElement(t),n=this.getMatrixOfElement(t),r=this.getRootTranslatedMatrix();return ar(e,r.multiply(n))}getBBox(t={}){let e;if(t.useCellGeometry){const n=this.cell,r=n.isNode()?n.getAngle():0;e=n.getBBox().bbox(r)}else e=this.getBBoxOfElement(this.container);return this.graph.coord.localToGraphRect(e)}getRootTranslatedMatrix(){const t=this.cell,e=t.isNode()?t.getPosition():{x:0,y:0};return Ri().translate(e.x,e.y)}getRootRotatedMatrix(){let t=Ri();const e=this.cell,n=e.isNode()?e.getAngle():0;if(n){const r=e.getBBox(),l=r.width/2,f=r.height/2;t=t.translate(l,f).rotate(n).translate(-l,-f)}return t}findMagnet(t=this.container){return this.findByAttr("magnet",t)}updateAttrs(t,e,n={}){n.rootBBox==null&&(n.rootBBox=new Dt),n.selectors==null&&(n.selectors=this.selectors),this.attr.update(t,e,n)}isEdgeElement(t){return this.cell.isEdge()&&(t==null||t===this.container)}prepareHighlight(t,e={}){const n=t||this.container;return e.partial=n===this.container,n}highlight(t,e={}){const n=this.prepareHighlight(t,e);return this.notify("cell:highlight",{magnet:n,options:e,view:this,cell:this.cell}),this.isEdgeView()?this.notify("edge:highlight",{magnet:n,options:e,view:this,edge:this.cell,cell:this.cell}):this.isNodeView()&&this.notify("node:highlight",{magnet:n,options:e,view:this,node:this.cell,cell:this.cell}),this}unhighlight(t,e={}){const n=this.prepareHighlight(t,e);return this.notify("cell:unhighlight",{magnet:n,options:e,view:this,cell:this.cell}),this.isNodeView()?this.notify("node:unhighlight",{magnet:n,options:e,view:this,node:this.cell,cell:this.cell}):this.isEdgeView()&&this.notify("edge:unhighlight",{magnet:n,options:e,view:this,edge:this.cell,cell:this.cell}),this}notifyUnhighlight(t,e){}getEdgeTerminal(t,e,n,r,l){const f=this.cell,h=this.findAttr("port",t),p=t.getAttribute("data-selector"),y={cell:f.id};return p!=null&&(y.magnet=p),h!=null?(y.port=h,f.isNode()&&!f.hasPort(h)&&p==null&&(y.selector=this.getSelector(t))):p==null&&this.container!==t&&(y.selector=this.getSelector(t)),y}getMagnetFromEdgeTerminal(t){const e=this.cell,n=this.container,r=t.port;let l=t.magnet,f;return r!=null&&e.isNode()&&e.hasPort(r)?f=this.findPortElem(r,l)||n:(l||(l=t.selector),!l&&r!=null&&(l=`[port="${r}"]`),f=this.findOne(l,n,this.selectors)),f}hasTools(t){const e=this.tools;return e==null?!1:t==null?!0:e.name===t}addTools(t){if(this.removeTools(),t){if(!this.can("toolsAddable"))return this;const e=jh.isToolsView(t)?t:new jh(t);this.tools=e,e.config({view:this}),e.mount()}return this}updateTools(t={}){return this.tools&&this.tools.update(t),this}removeTools(){return this.tools&&(this.tools.remove(),this.tools=null),this}hideTools(){return this.tools&&this.tools.hide(),this}showTools(){return this.tools&&this.tools.show(),this}renderTools(){const t=this.cell.getTools();return this.addTools(t),this}notify(t,e){return this.trigger(t,e),this.graph.trigger(t,e),this}getEventArgs(t,e,n){const r=this,l=r.cell;return e==null||n==null?{e:t,view:r,cell:l}:{e:t,x:e,y:n,view:r,cell:l}}onClick(t,e,n){this.notify("cell:click",this.getEventArgs(t,e,n))}onDblClick(t,e,n){this.notify("cell:dblclick",this.getEventArgs(t,e,n))}onContextMenu(t,e,n){this.notify("cell:contextmenu",this.getEventArgs(t,e,n))}onMouseDown(t,e,n){this.cell.model&&(this.cachedModelForMouseEvent=this.cell.model,this.cachedModelForMouseEvent.startBatch("mouse")),this.notify("cell:mousedown",this.getEventArgs(t,e,n))}onMouseUp(t,e,n){this.notify("cell:mouseup",this.getEventArgs(t,e,n)),this.cachedModelForMouseEvent&&(this.cachedModelForMouseEvent.stopBatch("mouse",{cell:this.cell}),this.cachedModelForMouseEvent=null)}onMouseMove(t,e,n){this.notify("cell:mousemove",this.getEventArgs(t,e,n))}onMouseOver(t){this.notify("cell:mouseover",this.getEventArgs(t))}onMouseOut(t){this.notify("cell:mouseout",this.getEventArgs(t))}onMouseEnter(t){this.notify("cell:mouseenter",this.getEventArgs(t))}onMouseLeave(t){this.notify("cell:mouseleave",this.getEventArgs(t))}onMouseWheel(t,e,n,r){this.notify("cell:mousewheel",Object.assign({delta:r},this.getEventArgs(t,e,n)))}onCustomEvent(t,e,n,r){this.notify("cell:customevent",Object.assign({name:e},this.getEventArgs(t,n,r))),this.notify(e,Object.assign({},this.getEventArgs(t,n,r)))}onMagnetMouseDown(t,e,n,r){}onMagnetDblClick(t,e,n,r){}onMagnetContextMenu(t,e,n,r){}onLabelMouseDown(t,e,n){}checkMouseleave(t){const e=this.getEventTarget(t,{fromPoint:!0}),n=this.graph.findViewByElem(e);n!==this&&(this.onMouseLeave(t),n&&n.onMouseEnter(t))}dispose(){this.cell.off("changed",this.onCellChanged,this)}}Ni.defaults={isSvgElement:!0,rootSelector:"root",priority:0,bootstrap:[],actions:{}},Ni.registry=In.create({type:"view"}),De([Re()],Ni.prototype,"dispose",null);const AL=`X6.${Ni.name}`;class jh extends to{static isToolsView(t){if(t==null)return!1;if(t instanceof jh)return!0;const e=t[Symbol.toStringTag],n=t;return(e==null||e===TL)&&n.graph!=null&&n.cell!=null&&typeof n.config=="function"&&typeof n.update=="function"&&typeof n.focus=="function"&&typeof n.blur=="function"&&typeof n.show=="function"&&typeof n.hide=="function"}get name(){return this.options.name}get graph(){return this.cellView.graph}get cell(){return this.cellView.cell}get[Symbol.toStringTag](){return TL}constructor(t={}){super(),this.svgContainer=this.createContainer(!0,t),this.htmlContainer=this.createContainer(!1,t),this.config(t)}createContainer(t,e){const n=t?Lh("g",!0):Lh("div",!1);return _t(n,this.prefixClassName("cell-tools")),e.className&&_t(n,e.className),n}config(t){if(this.options=Object.assign(Object.assign({},this.options),t),!Ni.isCellView(t.view)||t.view===this.cellView)return this;this.cellView=t.view,this.cell.isEdge()?(_t(this.svgContainer,this.prefixClassName("edge-tools")),_t(this.htmlContainer,this.prefixClassName("edge-tools"))):this.cell.isNode()&&(_t(this.svgContainer,this.prefixClassName("node-tools")),_t(this.htmlContainer,this.prefixClassName("node-tools"))),this.svgContainer.setAttribute("data-cell-id",this.cell.id),this.htmlContainer.setAttribute("data-cell-id",this.cell.id),this.name&&(this.svgContainer.setAttribute("data-tools-name",this.name),this.htmlContainer.setAttribute("data-tools-name",this.name));const e=this.options.items;if(!Array.isArray(e))return this;this.tools=[];const n=[];e.forEach(r=>{On.isToolItem(r)?r.name==="vertices"?n.unshift(r):n.push(r):(typeof r=="object"?r.name:r)==="vertices"?n.unshift(r):n.push(r)});for(let r=0;r<n.length;r+=1){const l=n[r];let f;if(On.isToolItem(l))f=l;else{const h=typeof l=="object"?l.name:l,p=typeof l=="object"?l.args||{}:{};if(h){if(this.cell.isNode()){const y=Vb.get(h);if(y)f=new y(p);else return Vb.onNotFound(h)}else if(this.cell.isEdge()){const y=Gb.get(h);if(y)f=new y(p);else return Gb.onNotFound(h)}}}f&&(f.config(this.cellView,this),f.render(),(f.options.isSVGElement!==!1?this.svgContainer:this.htmlContainer).appendChild(f.container),this.tools.push(f))}return this}update(t={}){const e=this.tools;return e&&e.forEach(n=>{t.toolId!==n.cid&&n.isVisible()&&n.update()}),this}focus(t){const e=this.tools;return e&&e.forEach(n=>{t===n?n.show():n.hide()}),this}blur(t){const e=this.tools;return e&&e.forEach(n=>{n!==t&&!n.isVisible()&&(n.show(),n.update())}),this}hide(){return this.focus(null)}show(){return this.blur(null)}remove(){const t=this.tools;return t&&(t.forEach(e=>e.remove()),this.tools=null),or(this.svgContainer),or(this.htmlContainer),super.remove()}mount(){const t=this.tools,e=this.cellView;if(e&&t){const n=t.some(l=>l.options.isSVGElement!==!1),r=t.some(l=>l.options.isSVGElement===!1);n&&(this.options.local?e.container:e.graph.view.decorator).appendChild(this.svgContainer),r&&this.graph.container.appendChild(this.htmlContainer)}return this}}jh.toStringTag=`X6.${jh.name}`;const TL=`X6.${jh.name}`,eF=s=>s;function ML(s,t){return t===0?"0%":`${Math.round(s/t*100)}%`}function OL(s){return(e,n,r,l)=>n.isEdgeElement(r)?iF(s,e,n,r,l):nF(s,e,n,r,l)}function nF(s,t,e,n,r){const l=e.cell,f=l.getAngle(),h=e.getUnrotatedBBoxOfElement(n),p=l.getBBox().getCenter(),y=G.create(r).rotate(f,p);let x=y.x-h.x,S=y.y-h.y;return s&&(x=ML(x,h.width),S=ML(S,h.height)),t.anchor={name:"topLeft",args:{dx:x,dy:S,rotate:!0}},t}function iF(s,t,e,n,r){const l=e.getConnection();if(!l)return t;const f=l.closestPointLength(r);if(s){const h=l.length();t.anchor={name:"ratio",args:{ratio:f/h}}}else t.anchor={name:"length",args:{length:f}};return t}const sF=OL(!0),oF=OL(!1),DL=Object.freeze(Object.defineProperty({__proto__:null,noop:eF,pinAbsolute:oF,pinRelative:sF},Symbol.toStringTag,{value:"Module"}));In.create({type:"connection strategy"}).register(DL,!0);function RL(s,t,e,n){return Gt(DL.pinRelative,this.graph,{},t,e,s,this.cell,n,{}).anchor}function zL(s,t){return t?s.cell.getBBox():s.cell.isEdge()?s.getConnection().bbox():s.getUnrotatedBBoxOfElement(s.container)}class Pb extends On{get type(){return this.options.type}onRender(){_t(this.container,this.prefixClassName(`edge-tool-${this.type}-anchor`)),this.toggleArea(!1),this.update()}update(){const t=this.type;return this.cellView.getTerminalView(t)?(this.updateAnchor(),this.updateArea(),this.container.style.display=""):this.container.style.display="none",this}updateAnchor(){const t=this.childNodes;if(!t)return;const e=t.anchor;if(!e)return;const n=this.type,r=this.cellView,l=this.options,f=r.getTerminalAnchor(n),h=r.cell.prop([n,"anchor"]);e.setAttribute("transform",`translate(${f.x}, ${f.y})`);const p=h?l.customAnchorAttrs:l.defaultAnchorAttrs;p&&Object.keys(p).forEach(y=>{e.setAttribute(y,p[y])})}updateArea(){const t=this.childNodes;if(!t)return;const e=t.area;if(!e)return;const n=this.type,r=this.cellView,l=r.getTerminalView(n);if(l){const f=l.cell,h=r.getTerminalMagnet(n);let p=this.options.areaPadding||0;Number.isFinite(p)||(p=0);let y,x,S;l.isEdgeElement(h)?(y=l.getBBox(),x=0,S=y.getCenter()):(y=l.getUnrotatedBBoxOfElement(h),x=f.getAngle(),S=y.getCenter(),x&&S.rotate(-x,f.getBBox().getCenter())),y.inflate(p),Te(e,{x:-y.width/2,y:-y.height/2,width:y.width,height:y.height,transform:`translate(${S.x}, ${S.y}) rotate(${x})`})}}toggleArea(t){if(this.childNodes){const e=this.childNodes.area;e&&(e.style.display=t?"":"none")}}onMouseDown(t){this.guard(t)||(t.stopPropagation(),t.preventDefault(),this.graph.view.undelegateEvents(),this.options.documentEvents&&this.delegateDocumentEvents(this.options.documentEvents),this.focus(),this.toggleArea(this.options.restrictArea),this.cell.startBatch("move-anchor",{ui:!0,toolId:this.cid}))}resetAnchor(t){const e=this.type,n=this.cell;t?n.prop([e,"anchor"],t,{rewrite:!0,ui:!0,toolId:this.cid}):n.removeProp([e,"anchor"],{ui:!0,toolId:this.cid})}onMouseMove(t){const e=this.type,n=this.cellView,r=n.getTerminalView(e);if(r==null)return;const l=this.normalizeEvent(t),f=r.cell,h=n.getTerminalMagnet(e);let p=this.graph.coord.clientToLocalPoint(l.clientX,l.clientY);const y=this.options.snap;if(typeof y=="function"){const w=Gt(y,n,p,r,h,e,n,this);p=G.create(w)}if(this.options.restrictArea)if(r.isEdgeElement(h)){const w=r.getClosestPoint(p);w&&(p=w)}else{const w=r.getUnrotatedBBoxOfElement(h),T=f.getAngle(),M=f.getBBox().getCenter(),D=p.clone().rotate(T,M);w.containsPoint(D)||(p=w.getNearestPointToPoint(D).rotate(-T,M))}let x;const S=this.options.anchor;typeof S=="function"&&(x=Gt(S,n,p,r,h,e,n,this)),this.resetAnchor(x),this.update()}onMouseUp(t){this.graph.view.delegateEvents(),this.undelegateDocumentEvents(),this.blur(),this.toggleArea(!1);const e=this.cellView;this.options.removeRedundancies&&e.removeRedundantLinearVertices({ui:!0,toolId:this.cid}),this.cell.stopBatch("move-anchor",{ui:!0,toolId:this.cid})}onDblClick(){const t=this.options.resetAnchor;t&&this.resetAnchor(t===!0?void 0:t),this.update()}}Pb.defaults=Object.assign(Object.assign({},On.getDefaults()),{tagName:"g",markup:[{tagName:"circle",selector:"anchor",attrs:{cursor:"pointer"}},{tagName:"rect",selector:"area",attrs:{"pointer-events":"none",fill:"none",stroke:"#33334F","stroke-dasharray":"2,4",rx:5,ry:5}}],events:{mousedown:"onMouseDown",touchstart:"onMouseDown",dblclick:"onDblClick"},documentEvents:{mousemove:"onMouseMove",touchmove:"onMouseMove",mouseup:"onMouseUp",touchend:"onMouseUp",touchcancel:"onMouseUp"},customAnchorAttrs:{"stroke-width":4,stroke:"#33334F",fill:"#FFFFFF",r:5},defaultAnchorAttrs:{"stroke-width":2,stroke:"#FFFFFF",fill:"#33334F",r:6},areaPadding:6,snapRadius:10,resetAnchor:!0,restrictArea:!0,removeRedundancies:!0,anchor:RL,snap(s,t,e,n,r,l){const f=l.options.snapRadius||0,h=n==="source",p=h?0:-1,y=this.cell.getVertexAt(p)||this.getTerminalAnchor(h?"target":"source");return y&&(Math.abs(y.x-s.x)<f&&(s.x=y.x),Math.abs(y.y-s.y)<f&&(s.y=y.y)),s}});class NL extends Pb{}NL.defaults=Object.assign(Object.assign({},Pb.getDefaults()),{name:"source-anchor",type:"source"});class LL extends Pb{}LL.defaults=Object.assign(Object.assign({},Pb.getDefaults()),{name:"target-anchor",type:"target"});class Ub extends On{get type(){return this.options.type}get ratio(){return this.options.ratio}init(){if(this.options.attrs){const t=this.options.attrs,{class:e}=t,n=re(t,["class"]);this.setAttrs(n,this.container),e&&_t(this.container,e)}}onRender(){_t(this.container,this.prefixClassName(`edge-tool-${this.type}-arrowhead`)),this.update()}update(){const t=this.ratio,e=this.cellView,n=e.getTangentAtRatio(t),r=n?n.start:e.getPointAtRatio(t),l=n&&n.vector().vectorAngle(new G(1,0))||0;if(!r)return this;const f=Ri().translate(r.x,r.y).rotate(l);return sp(this.container,f,{absolute:!0}),this}onMouseDown(t){if(this.guard(t))return;t.stopPropagation(),t.preventDefault();const e=this.cellView;if(e.can("arrowheadMovable")){e.cell.startBatch("move-arrowhead",{ui:!0,toolId:this.cid});const n=this.graph.snapToGrid(t.clientX,t.clientY),r=e.prepareArrowheadDragging(this.type,{x:n.x,y:n.y,options:Object.assign(Object.assign({},this.options),{toolId:this.cid})});this.cellView.setEventData(t,r),this.delegateDocumentEvents(this.options.documentEvents,t.data),e.graph.view.undelegateEvents(),this.container.style.pointerEvents="none"}this.focus()}onMouseMove(t){const e=this.normalizeEvent(t),n=this.graph.snapToGrid(e.clientX,e.clientY);this.cellView.onMouseMove(e,n.x,n.y),this.update()}onMouseUp(t){this.undelegateDocumentEvents();const e=this.normalizeEvent(t),n=this.cellView,r=this.graph.snapToGrid(e.clientX,e.clientY);n.onMouseUp(e,r.x,r.y),this.graph.view.delegateEvents(),this.blur(),this.container.style.pointerEvents="",n.cell.stopBatch("move-arrowhead",{ui:!0,toolId:this.cid})}}Ub.defaults=Object.assign(Object.assign({},On.getDefaults()),{tagName:"path",isSVGElement:!0,events:{mousedown:"onMouseDown",touchstart:"onMouseDown"},documentEvents:{mousemove:"onMouseMove",touchmove:"onMouseMove",mouseup:"onMouseUp",touchend:"onMouseUp",touchcancel:"onMouseUp"}});class jL extends Ub{}jL.defaults=Object.assign(Object.assign({},Ub.getDefaults()),{name:"source-arrowhead",type:"source",ratio:0,attrs:{d:"M 10 -8 -10 0 10 8 Z",fill:"#333",stroke:"#fff","stroke-width":2,cursor:"move"}});class _L extends Ub{}_L.defaults=Object.assign(Object.assign({},Ub.getDefaults()),{name:"target-arrowhead",type:"target",ratio:1,attrs:{d:"M -10 -8 10 0 -10 8 Z",fill:"#333",stroke:"#fff","stroke-width":2,cursor:"move"}});class CT extends On{onRender(){if(_t(this.container,this.prefixClassName("cell-tool-boundary")),this.options.attrs){const t=this.options.attrs,{class:e}=t,n=re(t,["class"]);Te(this.container,pb(n)),e&&_t(this.container,e)}this.update()}update(){const t=this.cellView,e=this.options,{useCellGeometry:n,rotate:r}=e,l=fa(e.padding);let f=zL(t,n);this.parent.options.local&&(f=f.translate({x:-f.x,y:-f.y})),f=f.moveAndExpand({x:-l.left,y:-l.top,width:l.left+l.right,height:l.top+l.bottom});const h=t.cell;if(h.isNode()){const p=h.getAngle();if(p!=null)if(r&&!this.parent.options.local){const y=h.getBBox().getCenter();eT(this.container,p,y.x,y.y,{absolute:!0})}else r||(f=f.bbox(p))}return Te(this.container,f.toJSON()),this}}CT.defaults=Object.assign(Object.assign({},On.getDefaults()),{name:"boundary",tagName:"rect",padding:10,useCellGeometry:!0,attrs:{fill:"none",stroke:"#333","stroke-width":.5,"stroke-dasharray":"5, 5","pointer-events":"none"}});class Hb extends On{onRender(){_t(this.container,this.prefixClassName("cell-tool-button")),this.update()}update(){return this.updatePosition(),this}updatePosition(){const e=this.cellView.cell.isEdge()?this.getEdgeMatrix():this.getNodeMatrix();sp(this.container,e,{absolute:!0})}getNodeMatrix(){const t=this.cellView,e=this.options;let{x:n=0,y:r=0}=e;const{offset:l,useCellGeometry:f,rotate:h}=e;let p=zL(t,f);const y=t.cell.getAngle();h||(p=p.bbox(y));let x=0,S=0;typeof l=="number"?(x=l,S=l):typeof l=="object"&&(x=l.x,S=l.y),n=So(n,p.width),r=So(r,p.height);let w=Ri();return this.parent.options.local?w=w.translate(p.width/2,p.height/2):w=w.translate(p.x+p.width/2,p.y+p.height/2),h&&(w=w.rotate(y)),w=w.translate(n+x-p.width/2,r+S-p.height/2),w}getEdgeMatrix(){const t=this.cellView,e=this.options,{offset:n=0,distance:r=0,rotate:l}=e,f=So(r,1),h=f>=0&&f<=1?t.getTangentAtRatio(f):t.getTangentAtLength(f),p=h?h.start:t.getConnection().start,y=h&&h.vector().vectorAngle(new G(1,0))||0;let x=Ri().translate(p.x,p.y).rotate(y);return typeof n=="object"?x=x.translate(n.x||0,n.y||0):x=x.translate(0,n),l||(x=x.rotate(-y)),x}onMouseDown(t){if(this.guard(t))return;t.stopPropagation(),t.preventDefault();const e=this.options.onClick;typeof e=="function"&&Gt(e,this.cellView,{e:t,view:this.cellView,cell:this.cellView.cell,btn:this})}}Hb.defaults=Object.assign(Object.assign({},On.getDefaults()),{name:"button",useCellGeometry:!0,events:{mousedown:"onMouseDown",touchstart:"onMouseDown"}});class ET extends Hb{}ET.defaults=Object.assign(Object.assign({},Hb.getDefaults()),{name:"button-remove",markup:[{tagName:"circle",selector:"button",attrs:{r:7,fill:"#FF1D00",cursor:"pointer"}},{tagName:"path",selector:"icon",attrs:{d:"M -3 -3 3 3 M -3 3 3 -3",fill:"none",stroke:"#FFFFFF","stroke-width":2,"pointer-events":"none"}}],distance:60,offset:0,useCellGeometry:!0,onClick({view:s,btn:t}){t.parent.remove(),s.cell.remove({ui:!0,toolId:t.cid})}});class kb extends On{constructor(){super(...arguments),this.labelIndex=-1,this.distance=.5,this.dblClick=this.onCellDblClick.bind(this)}onRender(){const t=this.cellView;t&&t.on("cell:dblclick",this.dblClick)}createElement(){const t=[this.prefixClassName(`${this.cell.isEdge()?"edge":"node"}-tool-editor`),this.prefixClassName("cell-tool-editor")];this.editor=Lh("div",!1),this.addClass(t,this.editor),this.editor.contentEditable="true",this.container.appendChild(this.editor)}removeElement(){this.undelegateDocumentEvents(),this.editor&&(this.container.removeChild(this.editor),this.editor=null)}updateEditor(){const{cell:t,editor:e}=this;if(!e)return;const{style:n}=e;t.isNode()?this.updateNodeEditorTransform():t.isEdge()&&this.updateEdgeEditorTransform();const{attrs:r}=this.options;n.fontSize=`${r.fontSize}px`,n.fontFamily=r.fontFamily,n.color=r.color,n.backgroundColor=r.backgroundColor;const l=this.getCellText()||"";return e.innerText=l,this.setCellText(""),this}updateNodeEditorTransform(){const{graph:t,cell:e,editor:n}=this;if(!n)return;let r=G.create(),l=20,f="",{x:h,y:p}=this.options;const{width:y,height:x}=this.options;if(typeof h<"u"&&typeof p<"u"){const T=e.getBBox();h=So(h,T.width),p=So(p,T.height),r=T.topLeft.translate(h,p),l=T.width-h*2}else{const T=e.getBBox();r=T.center,l=T.width-4,f="translate(-50%, -50%)"}const S=t.scale(),{style:w}=n;r=t.localToGraph(r),w.left=`${r.x}px`,w.top=`${r.y}px`,w.transform=`scale(${S.sx}, ${S.sy}) ${f}`,w.minWidth=`${l}px`,typeof y=="number"&&(w.width=`${y}px`),typeof x=="number"&&(w.height=`${x}px`)}updateEdgeEditorTransform(){if(!this.event)return;const{graph:t,editor:e}=this;if(!e)return;let n=G.create(),r=20;const{style:l}=e,f=this.event.target,h=f.parentElement;if(h&&nl(h,this.prefixClassName("edge-label"))){const x=h.getAttribute("data-index")||"0";this.labelIndex=parseInt(x,10);const S=h.getAttribute("transform"),{translation:w}=iS(S);n=new G(w.tx,w.ty),r=il(f).width}else{if(!this.options.labelAddable)return this;n=t.clientToLocal(G.create(this.event.clientX,this.event.clientY));const S=this.cellView.path.closestPointLength(n);this.distance=S,this.labelIndex=-1}n=t.localToGraph(n);const y=t.scale();l.left=`${n.x}px`,l.top=`${n.y}px`,l.minWidth=`${r}px`,l.transform=`scale(${y.sx}, ${y.sy}) translate(-50%, -50%)`}updateCell(){const t=this.editor.innerText.replace(/\n$/,"")||"";this.setCellText(t!==""?t:null),this.removeElement()}onDocumentMouseUp(t){this.editor&&t.target!==this.editor&&this.updateCell()}onCellDblClick({e:t}){if(!this.editor){t.stopPropagation(),this.removeElement(),this.event=t,this.createElement(),this.updateEditor(),this.autoFocus();const e=this.options.documentEvents;e&&this.delegateDocumentEvents(e)}}onMouseDown(t){t.stopPropagation()}autoFocus(){setTimeout(()=>{this.editor&&(this.editor.focus(),this.selectText())})}selectText(){if(window.getSelection&&this.editor){const t=document.createRange();t.selectNodeContents(this.editor);const e=window.getSelection();e==null||e.removeAllRanges(),e==null||e.addRange(t)}}getCellText(){const{getText:t}=this.options;if(typeof t=="function")return Gt(t,this.cellView,{cell:this.cell,index:this.labelIndex});if(typeof t=="string"){if(this.cell.isNode())return this.cell.attr(t);if(this.cell.isEdge()&&this.labelIndex!==-1)return this.cell.prop(`labels/${this.labelIndex}/attrs/${t}`)}}setCellText(t){const e=this.options.setText;if(typeof e=="function"){Gt(e,this.cellView,{cell:this.cell,value:t,index:this.labelIndex,distance:this.distance});return}if(typeof e=="string"){if(this.cell.isNode()){this.cell.attr(e,t===null?"":t);return}if(this.cell.isEdge()){const n=this.cell;if(this.labelIndex===-1){if(t){const r={position:{distance:this.distance},attrs:{}};ip(r,`attrs/${e}`,t),n.appendLabel(r)}}else t!==null?n.prop(`labels/${this.labelIndex}/attrs/${e}`,t):n.removeLabelAt(this.labelIndex)}}}onRemove(){const t=this.cellView;t&&t.off("cell:dblclick",this.dblClick),this.removeElement()}}kb.defaults=Object.assign(Object.assign({},On.getDefaults()),{tagName:"div",isSVGElement:!1,events:{mousedown:"onMouseDown",touchstart:"onMouseDown"},documentEvents:{mouseup:"onDocumentMouseUp",touchend:"onDocumentMouseUp",touchcancel:"onDocumentMouseUp"}});class BL extends kb{}BL.defaults=Mn({},kb.defaults,{attrs:{fontSize:14,fontFamily:"Arial, helvetica, sans-serif",color:"#000",backgroundColor:"#fff"},getText:"text/text",setText:"text/text"});class PL extends kb{}PL.defaults=Mn({},kb.defaults,{attrs:{fontSize:14,fontFamily:"Arial, helvetica, sans-serif",color:"#000",backgroundColor:"#fff"},labelAddable:!0,getText:"label/text",setText:"label/text"});class AT extends On{constructor(){super(...arguments),this.handles=[]}get vertices(){return this.cellView.cell.getVertices()}update(){return this.render(),this}getPoints(){const e=this.cellView.routePoints;if(e.length<=2)return e;const n=[e[0]];for(let r=1;r<e.length-1;r++){const l=n[n.length-1],f=e[r],h=e[r+1];(f.x-l.x)*(h.y-l.y)-(f.y-l.y)*(h.x-l.x)!==0&&n.push(f)}return n.push(e[e.length-1]),n}onRender(){_t(this.container,this.prefixClassName("edge-tool-segments")),this.resetHandles();const t=this.cellView,e=[...this.getPoints()];e.unshift(t.sourcePoint),e.push(t.targetPoint);for(let n=0,r=e.length;n<r-1;n+=1){const l=e[n],f=e[n+1],h=this.renderHandle(l,f,n);this.stamp(h.container),this.handles.push(h)}return this}renderHandle(t,e,n){const r=this.options.createHandle({index:n,graph:this.graph,guard:l=>this.guard(l),attrs:this.options.attrs||{}});return this.options.processHandle&&this.options.processHandle(r),this.updateHandle(r,t,e),this.container.appendChild(r.container),this.startHandleListening(r),r}startHandleListening(t){t.on("change",this.onHandleChange,this),t.on("changing",this.onHandleChanging,this),t.on("changed",this.onHandleChanged,this)}stopHandleListening(t){t.off("change",this.onHandleChange,this),t.off("changing",this.onHandleChanging,this),t.off("changed",this.onHandleChanged,this)}resetHandles(){const t=this.handles;this.handles=[],t&&t.forEach(e=>{this.stopHandleListening(e),e.remove()})}shiftHandleIndexes(t){const e=this.handles;for(let n=0,r=e.length;n<r;n+=1)e[n].options.index+=t}resetAnchor(t,e){const n=this.cellView.cell,r={ui:!0,toolId:this.cid};e?n.prop([t,"anchor"],e,r):n.removeProp([t,"anchor"],r)}snapHandle(t,e,n){const r=t.options.axis,l=t.options.index,p=this.cellView.cell.getVertices(),y=p[l-2]||n.sourceAnchor,x=p[l+1]||n.targetAnchor,S=this.options.snapRadius;return Math.abs(e[r]-y[r])<S?e[r]=y[r]:Math.abs(e[r]-x[r])<S&&(e[r]=x[r]),e}onHandleChanging({handle:t,e}){const n=this.graph,r=this.options,l=this.cellView,f=r.anchor,h=t.options.axis,p=t.options.index-1,y=this.getEventData(e),x=this.normalizeEvent(e),S=n.snapToGrid(x.clientX,x.clientY),w=this.snapHandle(t,S.clone(),y),T=wn(this.vertices);let M=T[p],D=T[p+1];const R=l.sourceView,N=l.sourceBBox;let L=!1,_=!1;if(M?p===0?N.containsPoint(M)?(T.shift(),this.shiftHandleIndexes(-1),L=!0):(M[h]=w[h],_=!0):M[h]=w[h]:(M=l.sourceAnchor.toJSON(),M[h]=w[h],N.containsPoint(M)?L=!0:(T.unshift(M),this.shiftHandleIndexes(1),_=!0)),typeof f=="function"&&R){if(L){const H=y.sourceAnchor.clone();H[h]=w[h];const J=Gt(f,l,H,R,l.sourceMagnet||R.container,"source",l,this);this.resetAnchor("source",J)}_&&this.resetAnchor("source",y.sourceAnchorDef)}const U=l.targetView,$=l.targetBBox;let Y=!1,k=!1;if(D?p===T.length-2?$.containsPoint(D)?(T.pop(),Y=!0):(D[h]=w[h],k=!0):D[h]=w[h]:(D=l.targetAnchor.toJSON(),D[h]=w[h],$.containsPoint(D)?Y=!0:(T.push(D),k=!0)),typeof f=="function"&&U){if(Y){const H=y.targetAnchor.clone();H[h]=w[h];const J=Gt(f,l,H,U,l.targetMagnet||U.container,"target",l,this);this.resetAnchor("target",J)}k&&this.resetAnchor("target",y.targetAnchorDef)}G.equalPoints(T,this.vertices)||this.cellView.cell.setVertices(T,{ui:!0,toolId:this.cid}),this.updateHandle(t,M,D,0),r.stopPropagation||l.notifyMouseMove(x,S.x,S.y)}onHandleChange({handle:t,e}){const n=this.options,r=this.handles,l=this.cellView,f=t.options.index;if(Array.isArray(r)){for(let h=0,p=r.length;h<p;h+=1)h!==f&&r[h].hide();if(this.focus(),this.setEventData(e,{sourceAnchor:l.sourceAnchor.clone(),targetAnchor:l.targetAnchor.clone(),sourceAnchorDef:wn(this.cell.prop(["source","anchor"])),targetAnchorDef:wn(this.cell.prop(["target","anchor"]))}),this.cell.startBatch("move-segment",{ui:!0,toolId:this.cid}),!n.stopPropagation){const h=this.normalizeEvent(e),p=this.graph.snapToGrid(h.clientX,h.clientY);l.notifyMouseDown(h,p.x,p.y)}}}onHandleChanged({e:t}){const e=this.options,n=this.cellView;e.removeRedundancies&&n.removeRedundantLinearVertices({ui:!0,toolId:this.cid});const r=this.normalizeEvent(t),l=this.graph.snapToGrid(r.clientX,r.clientY);this.render(),this.blur(),this.cell.stopBatch("move-segment",{ui:!0,toolId:this.cid}),e.stopPropagation||n.notifyMouseUp(r,l.x,l.y),n.checkMouseleave(r),e.onChanged&&e.onChanged({edge:n.cell,edgeView:n})}updateHandle(t,e,n,r=0){const l=this.options.precision||0,f=Math.abs(e.x-n.x)<l,h=Math.abs(e.y-n.y)<l;if(f||h){const p=new Pt(e,n);if(p.length()<this.options.threshold)t.hide();else{const x=p.getCenter(),S=f?"x":"y";x[S]+=r||0;const w=p.vector().vectorAngle(new G(1,0));t.updatePosition(x.x,x.y,w,this.cellView),t.show(),t.options.axis=S}}else t.hide()}onRemove(){this.resetHandles()}}AT.defaults=Object.assign(Object.assign({},On.defaults),{name:"segments",precision:.5,threshold:40,snapRadius:10,stopPropagation:!0,removeRedundancies:!0,attrs:{width:20,height:8,x:-10,y:-4,rx:4,ry:4,fill:"#333",stroke:"#fff","stroke-width":2},createHandle:s=>new rF(s),anchor:RL});let rF=class extends to{constructor(t){super(),this.options=t,this.render(),this.delegateEvents({mousedown:"onMouseDown",touchstart:"onMouseDown"})}render(){this.container=Lh("rect",!0);const t=this.options.attrs;if(typeof t=="function"){const e=AT.getDefaults();this.setAttrs(Object.assign(Object.assign({},e.attrs),t(this)))}else this.setAttrs(t);this.addClass(this.prefixClassName("edge-tool-segment"))}updatePosition(t,e,n,r){const l=r.getClosestPoint(new G(t,e))||new G(t,e);let f=Ri().translate(l.x,l.y);if(l.equals({x:t,y:e}))f=f.rotate(n);else{let p=new Pt(t,e,l.x,l.y).vector().vectorAngle(new G(1,0));p!==0&&(p+=90),f=f.rotate(p)}this.setAttrs({transform:bb(f),cursor:n%180===0?"row-resize":"col-resize"})}onMouseDown(t){this.options.guard(t)||(this.trigger("change",{e:t,handle:this}),t.stopPropagation(),t.preventDefault(),this.options.graph.view.undelegateEvents(),this.delegateDocumentEvents({mousemove:"onMouseMove",touchmove:"onMouseMove",mouseup:"onMouseUp",touchend:"onMouseUp",touchcancel:"onMouseUp"},t.data))}onMouseMove(t){this.emit("changing",{e:t,handle:this})}onMouseUp(t){this.emit("changed",{e:t,handle:this}),this.undelegateDocumentEvents(),this.options.graph.view.delegateEvents()}show(){this.container.style.display=""}hide(){this.container.style.display="none"}};const TT=He.prefix("edge-tool-vertex-path");class MT extends On{constructor(){super(...arguments),this.handles=[]}get vertices(){return this.cellView.cell.getVertices()}onRender(){return this.addClass(this.prefixClassName("edge-tool-vertices")),this.options.addable&&this.updatePath(),this.resetHandles(),this.renderHandles(),this}update(){return this.vertices.length===this.handles.length?this.updateHandles():(this.resetHandles(),this.renderHandles()),this.options.addable&&this.updatePath(),this}resetHandles(){const t=this.handles;this.handles=[],t&&t.forEach(e=>{this.stopHandleListening(e),e.remove()})}renderHandles(){const t=this.vertices;for(let e=0,n=t.length;e<n;e+=1){const r=t[e],l=this.options.createHandle,f=this.options.processHandle,h=l({index:e,graph:this.graph,guard:p=>this.guard(p),attrs:this.options.attrs||{}});f&&f(h),h.updatePosition(r.x,r.y),this.stamp(h.container),this.container.appendChild(h.container),this.handles.push(h),this.startHandleListening(h)}}updateHandles(){const t=this.vertices;for(let e=0,n=t.length;e<n;e+=1){const r=t[e],l=this.handles[e];l&&l.updatePosition(r.x,r.y)}}updatePath(){const t=this.childNodes.connection;t&&t.setAttribute("d",this.cellView.getConnectionPathData())}startHandleListening(t){const e=this.cellView;e.can("vertexMovable")&&(t.on("change",this.onHandleChange,this),t.on("changing",this.onHandleChanging,this),t.on("changed",this.onHandleChanged,this)),e.can("vertexDeletable")&&t.on("remove",this.onHandleRemove,this)}stopHandleListening(t){const e=this.cellView;e.can("vertexMovable")&&(t.off("change",this.onHandleChange,this),t.off("changing",this.onHandleChanging,this),t.off("changed",this.onHandleChanged,this)),e.can("vertexDeletable")&&t.off("remove",this.onHandleRemove,this)}getNeighborPoints(t){const e=this.cellView,n=this.vertices,r=t>0?n[t-1]:e.sourceAnchor,l=t<n.length-1?n[t+1]:e.targetAnchor;return{prev:G.create(r),next:G.create(l)}}getMouseEventArgs(t){const e=this.normalizeEvent(t),{x:n,y:r}=this.graph.snapToGrid(e.clientX,e.clientY);return{e,x:n,y:r}}onHandleChange({e:t}){this.focus();const e=this.cellView;if(e.cell.startBatch("move-vertex",{ui:!0,toolId:this.cid}),!this.options.stopPropagation){const{e:n,x:r,y:l}=this.getMouseEventArgs(t);this.eventData(n,{start:{x:r,y:l}}),e.notifyMouseDown(n,r,l)}}onHandleChanging({handle:t,e}){const n=this.cellView,r=t.options.index,{e:l,x:f,y:h}=this.getMouseEventArgs(e),p={x:f,y:h};this.snapVertex(p,r),n.cell.setVertexAt(r,p,{ui:!0,toolId:this.cid}),t.updatePosition(p.x,p.y),this.options.stopPropagation||n.notifyMouseMove(l,f,h)}stopBatch(t){this.cell.stopBatch("move-vertex",{ui:!0,toolId:this.cid}),t&&this.cell.stopBatch("add-vertex",{ui:!0,toolId:this.cid})}onHandleChanged({e:t}){const e=this.options,n=this.cellView;e.addable&&this.updatePath(),e.removeRedundancies&&n.removeRedundantLinearVertices({ui:!0,toolId:this.cid})&&this.render(),this.blur(),this.stopBatch(this.eventData(t).vertexAdded);const{e:r,x:l,y:f}=this.getMouseEventArgs(t);if(!this.options.stopPropagation){n.notifyMouseUp(r,l,f);const{start:h}=this.eventData(r);if(h){const{x:p,y}=h;p===l&&y===f&&n.onClick(r,l,f)}}n.checkMouseleave(r),e.onChanged&&e.onChanged({edge:n.cell,edgeView:n})}snapVertex(t,e){const n=this.options.snapRadius||0;if(n>0){const r=this.getNeighborPoints(e),l=r.prev,f=r.next;Math.abs(t.x-l.x)<n?t.x=l.x:Math.abs(t.x-f.x)<n&&(t.x=f.x),Math.abs(t.y-l.y)<n?t.y=r.prev.y:Math.abs(t.y-f.y)<n&&(t.y=f.y)}}onHandleRemove({handle:t,e}){if(this.options.removable){const n=t.options.index,r=this.cellView;r.cell.removeVertexAt(n,{ui:!0}),this.options.addable&&this.updatePath(),r.checkMouseleave(this.normalizeEvent(e))}}allowAddVertex(t){const e=this.guard(t),n=this.options.addable&&this.cellView.can("vertexAddable"),r=this.options.modifiers?Nu(t,this.options.modifiers):!0;return!e&&n&&r}onPathMouseDown(t){const e=this.cellView;if(!this.allowAddVertex(t))return;t.stopPropagation(),t.preventDefault();const n=this.normalizeEvent(t),r=this.graph.snapToGrid(n.clientX,n.clientY).toJSON();e.cell.startBatch("add-vertex",{ui:!0,toolId:this.cid});const l=e.getVertexIndex(r.x,r.y);this.snapVertex(r,l),e.cell.insertVertex(r,l,{ui:!0,toolId:this.cid}),this.render();const f=this.handles[l];this.eventData(n,{vertexAdded:!0}),f.onMouseDown(n)}onRemove(){this.resetHandles()}}MT.defaults=Object.assign(Object.assign({},On.getDefaults()),{name:"vertices",snapRadius:20,addable:!0,removable:!0,removeRedundancies:!0,stopPropagation:!0,attrs:{r:6,fill:"#333",stroke:"#fff",cursor:"move","stroke-width":2},createHandle:s=>new aF(s),markup:[{tagName:"path",selector:"connection",className:TT,attrs:{fill:"none",stroke:"transparent","stroke-width":10,cursor:"pointer"}}],events:{[`mousedown .${TT}`]:"onPathMouseDown",[`touchstart .${TT}`]:"onPathMouseDown"}});class aF extends to{get graph(){return this.options.graph}constructor(t){super(),this.options=t,this.render(),this.delegateEvents({mousedown:"onMouseDown",touchstart:"onMouseDown",dblclick:"onDoubleClick"})}render(){this.container=Lh("circle",!0);const t=this.options.attrs;if(typeof t=="function"){const e=MT.getDefaults();this.setAttrs(Object.assign(Object.assign({},e.attrs),t(this)))}else this.setAttrs(t);this.addClass(this.prefixClassName("edge-tool-vertex"))}updatePosition(t,e){this.setAttrs({cx:t,cy:e})}onMouseDown(t){this.options.guard(t)||(t.stopPropagation(),t.preventDefault(),this.graph.view.undelegateEvents(),this.delegateDocumentEvents({mousemove:"onMouseMove",touchmove:"onMouseMove",mouseup:"onMouseUp",touchend:"onMouseUp",touchcancel:"onMouseUp"},t.data),this.emit("change",{e:t,handle:this}))}onMouseMove(t){this.emit("changing",{e:t,handle:this})}onMouseUp(t){this.emit("changed",{e:t,handle:this}),this.undelegateDocumentEvents(),this.graph.view.delegateEvents()}onDoubleClick(t){this.emit("remove",{e:t,handle:this})}}const lF={boundary:CT,button:Hb,"button-remove":ET,"node-editor":BL},Vb=In.create({type:"node tool",process(s,t){if(typeof t=="function")return t;let e=On;const{inherit:n}=t,r=re(t,["inherit"]);if(n){const l=this.get(n);l==null?this.onNotFound(n,"inherited"):e=l}return r.name==null&&(r.name=s),e.define.call(e,r)}});Vb.register(lF,!0);const cF={boundary:CT,vertices:MT,segments:AT,button:Hb,"button-remove":ET,"source-anchor":NL,"target-anchor":LL,"source-arrowhead":jL,"target-arrowhead":_L,"edge-editor":PL},Gb=In.create({type:"edge tool",process(s,t){if(typeof t=="function")return t;let e=On;const{inherit:n}=t,r=re(t,["inherit"]);if(n){const l=this.get(n);l==null?this.onNotFound(n,"inherited"):e=l}return r.name==null&&(r.name=s),e.define.call(e,r)}});Gb.register(cF,!0);class UL{constructor(t,e,n,r){var l;this.target=t,this.cell=(l=this.target.effect)===null||l===void 0?void 0:l.target,this.type=e,this.bubbles=!1,this.currentTarget=t,this.defaultPrevented=!1,this.eventPhase=0,this.timeStamp=performance.now(),this.currentTime=n,this.timelineTime=r}}function AS(s){return s!=="offset"&&s!=="easing"&&s!=="composite"&&s!=="computedOffset"}function HL(s,t){return s==="reverse"||s==="alternate"&&t%2===1||s==="alternate-reverse"&&t%2===0}class uF{constructor(t,e){this._effect=null,this._currentTime=null,this._playbackRate=1,this._playState="idle",this._rafId=null,this._startTime=null,this._pausedTime=null,this._timeline=null,this.id="",this.onfinish=null,this.oncancel=null,this._effect=t,this._timeline=e??document.timeline}get effect(){return this._effect}get currentTime(){return this._currentTime}set currentTime(t){const e=this._timeline.currentTime;nc(e)&&(this._startTime=e-t,this._currentTime=t)}get playbackRate(){return this._playbackRate}set playbackRate(t){const e=this._playbackRate;this._playbackRate=t;const n=this._timeline.currentTime;if(this._playState==="running"&&this._startTime!=null&&nc(n)){const r=(n-this._startTime)*e;this._startTime=n-r/t}}get playState(){return this._playState}get timeline(){return this._timeline}play(){if(this._playState==="running"||!this._effect)return;const t=this._timeline.currentTime;nc(t)&&(this._playState==="paused"?(this._startTime=t-this._pausedTime/this._playbackRate,this._pausedTime=null):(this._currentTime=0,this._startTime=t),this._playState="running",this._tick())}pause(){this._playState==="running"&&(this._rafId&&(cancelAnimationFrame(this._rafId),this._rafId=null),this._pausedTime=this._currentTime,this._playState="paused")}finish(){var t;if(!this._effect)return;const e=this._effect.getComputedTiming(),n=this._playbackRate<0,{duration:r,endTime:l,direction:f,fill:h,iterations:p}=e;if(h==="forwards"||h==="both"){const x=n?0:p-1,S=HL(f,x);this._effect.apply(S||n?0:r)}else(h==="none"||h==="backwards")&&this._effect.apply(null);this._currentTime=n?0:l,this._playState="finished",this._rafId&&(cancelAnimationFrame(this._rafId),this._rafId=null);const y=new UL(this,"finish",this._currentTime,this._timeline.currentTime);(t=this.onfinish)===null||t===void 0||t.call(this,y),this._effect.target.notify("animation:finish",y)}cancel(){var t;if(!this._effect)return;this._rafId&&(cancelAnimationFrame(this._rafId),this._rafId=null),this._playState="idle",this._currentTime=null,this._startTime=null,this._pausedTime=null,this._effect.apply(null);const e=new UL(this,"cancel",this._currentTime,this._timeline.currentTime);(t=this.oncancel)===null||t===void 0||t.call(this,e),this._effect.target.notify("animation:cancel",e)}updatePlaybackRate(t){this.playbackRate=t}reverse(){this.playbackRate=this.playbackRate*-1}_tick(){const t=this._timeline.currentTime;if(this._playState!=="running"||!this._effect||!nc(t))return;const e=this._effect.getComputedTiming(),{duration:n,delay:r,iterations:l,direction:f,endTime:h}=e,p=(t-this._startTime)*this._playbackRate,y=p-r;let x=Math.floor(y/n);if(p>=h||p<0||n<=0){this.finish();return}if(p>=r){let S=y%n;x=Math.min(x,l-1),HL(f,x)&&(S=n-S),this._effect.apply(S)}this._currentTime=p,this._rafId=requestAnimationFrame(()=>this._tick())}}class fF{constructor(){this.animations=[]}addAnimation(t){this.animations.push(t)}getAnimations(){return this.animations}cancelAnimations(){this.animations.forEach(t=>{t.cancel()})}}class hF{constructor(t,e,n){this._originProps={},this._target=t,this._options=nc(n)?{duration:n}:Object.assign({},n),this.setKeyframes(e)}get target(){return this._target}getKeyframes(){if(!this._keyframes||this._keyframes.length===0)return[];let t=[];if(Array.isArray(this._keyframes)&&(t=[...this._keyframes]),ca(this._keyframes)){const n=Object.values(this._keyframes).map(l=>xz(l).length),r=Math.max(...n);for(let l=0;l<r;l++){const f={};Object.entries(this._keyframes).forEach(([h,p])=>{const y=xz(p)[l];AS(h)&&y!=null&&(f[h]=y)}),t.push(f)}}return t=t.map((e,n,r)=>{var l,f,h;const p=e??{},y={};return y.offset=p.offset,y.easing=(h=(l=p.easing)!==null&&l!==void 0?l:(f=r[n-1])===null||f===void 0?void 0:f.easing)!==null&&h!==void 0?h:this.getComputedTiming().easing,Object.keys(p).forEach(x=>{AS(x)&&(y[x]=p[x])}),y}),t=t.map((e,n)=>(e.offset==null?n===t.length-1?e.computedOffset=1:n===0?e.computedOffset=0:e.computedOffset=n/(t.length-1):e.computedOffset=e.offset,e)),t}setKeyframes(t){this._keyframes=t,this._computedKeyframes=this.getKeyframes(),this._computedKeyframes.forEach(e=>{Object.keys(e).forEach(n=>{AS(n)&&this._originProps[n]==null&&(this._originProps[n]=this.target.getPropByPath(n))})})}getTiming(){return H$(this._options,dF)}getComputedTiming(){const t=this.getTiming(),e=t.duration*t.iterations;return Object.assign(Object.assign({},t),{activeDuration:e,endTime:e+t.delay})}apply(t){var e,n,r,l;if(!this._target||!this._computedKeyframes.length)return;if(t==null){Object.entries(this._originProps).forEach(([L,_])=>{this.target.setPropByPath(L,_)});return}const h=this.getComputedTiming().duration;if(h<0)return;const p=Math.min(t/h,1),y=this._computedKeyframes;if(y.length===0)return;let x={computedOffset:0},S={computedOffset:1};for(const L of y)if(p===0&&L.computedOffset===0&&(x=L),p===1&&L.computedOffset===1&&(S=L),L.computedOffset<p&&(x=L),L.computedOffset>p){S=L;break}const w=x.computedOffset,T=S.computedOffset,M=(p-w)/(T-w),D=(e=x.easing)!==null&&e!==void 0?e:S.easing,R=cb(D),N=(n=JX[R])!==null&&n!==void 0?n:b3;for(const L in Object.assign(Object.assign({},x),S))if(AS(L)&&(x[L]!=null||S[L]!=null)){const _=(r=x[L])!==null&&r!==void 0?r:this._originProps[L],U=(l=S[L])!==null&&l!==void 0?l:this._originProps[L];let $;String(_).startsWith("#")?$=pX:L.endsWith("transform")&&!nc(_)?$=mX:Sb.test(String(_))||Sb.test(String(U))?$=y3:$=m3;const k=$(_,U)(N(M));this.target.setPropByPath(L,k)}}}const dF={delay:0,direction:"normal",duration:0,easing:"linear",fill:"none",iterations:1};class kL extends Ts{constructor(t={}){super(),this.pending=!1,this.changing=!1,this.data={},this.mutate(wn(t)),this.changed={}}mutate(t,e={}){const n=e.unset===!0,r=e.silent===!0,l=[],f=this.changing;this.changing=!0,f||(this.previous=wn(this.data),this.changed={});const h=this.data,p=this.previous,y=this.changed;if(Object.keys(t).forEach(x=>{const S=x,w=t[S];ec(h[S],w)||l.push(S),ec(p[S],w)?delete y[S]:y[S]=w,n?delete h[S]:h[S]=w}),!r&&l.length>0&&(this.pending=!0,this.pendingOptions=e,l.forEach(x=>{this.emit("change:*",{key:x,options:e,store:this,current:h[x],previous:p[x]})})),f)return this;if(!r)for(;this.pending;)this.pending=!1,this.emit("changed",{current:h,previous:p,store:this,options:this.pendingOptions});return this.pending=!1,this.changing=!1,this.pendingOptions=null,this}get(t,e){if(t==null)return this.data;const n=this.data[t];return n??e}getPrevious(t){if(this.previous){const e=this.previous[t];return e??void 0}}set(t,e,n){return t!=null&&(typeof t=="object"?this.mutate(t,e):this.mutate({[t]:e},n)),this}remove(t,e){const r={};let l;if(typeof t=="string")r[t]=void 0,l=e;else if(Array.isArray(t))t.forEach(f=>r[f]=void 0),l=e;else{for(const f in this.data)r[f]=void 0;l=t}return this.mutate(r,Object.assign(Object.assign({},l),{unset:!0})),this}getByPath(t){return KA(this.data,t,"/")}setByPath(t,e,n={}){const r="/",l=Array.isArray(t)?[...t]:t.split(r),f=Array.isArray(t)?t.join(r):t,h=l[0],p=l.length;if(n.propertyPath=f,n.propertyValue=e,n.propertyPathArray=l,p===1)this.set(h,e,n);else{const y={};let x=y,S=h;for(let M=1;M<p;M+=1){const D=l[M],R=Number.isFinite(Number(D));x=x[S]=R?[]:{},S=D}ip(y,l,e,r);const w=wn(this.data);n.rewrite&&$N(w,t,r);const T=Mn(w,y);this.set(h,T[h],n)}return this}removeByPath(t,e){const n=Array.isArray(t)?t:t.split("/"),r=n[0];if(n.length===1)this.remove(r,e);else{const l=n.slice(1),f=wn(this.get(r));f&&$N(f,l),this.set(r,f,e)}return this}hasChanged(t){return t==null?Object.keys(this.changed).length>0:t in this.changed}getChanges(t){if(t==null)return this.hasChanged()?wn(this.changed):null;const e=this.changing?this.previous:this.data,n={};let r;for(const l in t){const f=t[l];ec(e[l],f)||(n[l]=f,r=!0)}return r?wn(n):null}toJSON(){return wn(this.data)}clone(){const t=this.constructor;return new t(this.data)}dispose(){this.off(),this.data={},this.previous={},this.changed={},this.pending=!1,this.changing=!1,this.pendingOptions=null,this.trigger("disposed",{store:this})}}De([Re()],kL.prototype,"dispose",null);class Me extends Ts{static isCell(t){if(t==null)return!1;if(t instanceof Me)return!0;const e=t[Symbol.toStringTag],n=t;return(e==null||e===Me.toStringTag)&&typeof n.isNode=="function"&&typeof n.isEdge=="function"&&typeof n.prop=="function"&&typeof n.attr=="function"}static normalizeTools(t){if(typeof t=="string")return{items:[t]};if(Array.isArray(t))return{items:t};if(t.items)return t;if(Reflect.has(t,"local")){const e=t,{local:n}=e,r=re(e,["local"]);return{local:n,items:[r]}}return{items:[t]}}static getCommonAncestor(...t){const e=t.filter(r=>r!=null).map(r=>r.getAncestors()).sort((r,l)=>r.length-l.length);return e.shift().find(r=>e.every(l=>l.includes(r)))||null}static getCellsBBox(t,e={}){let n=null;for(let r=0,l=t.length;r<l;r+=1){const f=t[r];let h=f.getBBox(e);if(h){if(f.isNode()){const p=f.getAngle();p!=null&&p!==0&&(h=h.bbox(p))}n=n==null?h:n.union(h)}}return n}static deepClone(t){const e=[t,...t.getDescendants({deep:!0})];return Me.cloneCells(e)}static cloneCells(t){const e=cN(t),n=e.reduce((r,l)=>(r[l.id]=l.clone(),r),{});return e.forEach(r=>{const l=n[r.id];if(l.isEdge()){const p=l.getSourceCellId(),y=l.getTargetCellId();p&&n[p]&&l.setSource(Object.assign(Object.assign({},l.getSource()),{cell:n[p].id})),y&&n[y]&&l.setTarget(Object.assign(Object.assign({},l.getTarget()),{cell:n[y].id}))}const f=r.getParent();f&&n[f.id]&&l.setParent(n[f.id]);const h=r.getChildren();if(h&&h.length){const p=h.reduce((y,x)=>(n[x.id]&&y.push(n[x.id]),y),[]);p.length>0&&l.setChildren(p)}}),n}static config(t){const{markup:e,propHooks:n,attrHooks:r}=t,l=re(t,["markup","propHooks","attrHooks"]);e!=null&&(this.markup=e),n&&(this.propHooks=this.propHooks.slice(),Array.isArray(n)?this.propHooks.push(...n):typeof n=="function"?this.propHooks.push(n):Object.values(n).forEach(f=>{typeof f=="function"&&this.propHooks.push(f)})),r&&(this.attrHooks=Object.assign(Object.assign({},this.attrHooks),r)),this.defaults=Mn({},this.defaults,l)}static getMarkup(){return this.markup}static getDefaults(t){return t?this.defaults:wn(this.defaults)}static getAttrHooks(){return this.attrHooks}static applyPropHooks(t,e){return this.propHooks.reduce((n,r)=>r?Gt(r,t,n):n,e)}static generateId(t={}){return QA()}get[Symbol.toStringTag](){return Me.toStringTag}constructor(t={}){super();const n=this.constructor.getDefaults(!0),r=Mn({},this.preprocess(n),this.preprocess(t));this.id=r.id||Me.generateId(t),this.store=new kL(r),this.animationManager=new fF,this.setup(),this.init(),this.postprocess(t)}init(){}get model(){return this._model}set model(t){this._model!==t&&(this._model=t)}preprocess(t,e){const n=t.id,l=this.constructor.applyPropHooks(this,t);return n==null&&e!==!0&&(l.id=Me.generateId(t)),l}postprocess(t){}setup(){this.store.on("change:*",t=>{const{key:e,current:n,previous:r,options:l}=t;this.notify("change:*",{key:e,options:l,current:n,previous:r,cell:this}),this.notify(`change:${e}`,{options:l,current:n,previous:r,cell:this});const f=e;(f==="source"||f==="target")&&this.notify("change:terminal",{type:f,current:n,previous:r,options:l,cell:this})}),this.store.on("changed",({options:t})=>this.notify("changed",{options:t,cell:this})),this.on("added",({cell:t})=>{const e=this.store.get("animation");zA(e)||e.forEach(n=>{t.animate(...n)})})}notify(t,e){this.trigger(t,e);const n=this.model;return n&&(n.notify(`cell:${t}`,e),this.isNode()?n.notify(`node:${t}`,Object.assign(Object.assign({},e),{node:this})):this.isEdge()&&n.notify(`edge:${t}`,Object.assign(Object.assign({},e),{edge:this}))),this}isNode(){return!1}isEdge(){return!1}isSameStore(t){return this.store===t.store}get view(){return this.store.get("view")}get shape(){return this.store.get("shape","")}getProp(t,e){return t==null?this.store.get():this.store.get(t,e)}setProp(t,e,n){if(typeof t=="string")this.store.set(t,e,n);else{const r=this.preprocess(t,!0);this.store.set(Mn({},this.getProp(),r),e),this.postprocess(t)}return this}removeProp(t,e){return typeof t=="string"||Array.isArray(t)?this.store.removeByPath(t,e):this.store.remove(e),this}hasChanged(t){return t==null?this.store.hasChanged():this.store.hasChanged(t)}getPropByPath(t){return this.store.getByPath(t)}setPropByPath(t,e,n={}){return this.model&&(t==="children"?this._children=e?e.map(r=>this.model.getCell(r)).filter(r=>r!=null):null:t==="parent"&&(this._parent=e?this.model.getCell(e):null)),this.store.setByPath(t,e,n),this}removePropByPath(t,e={}){const n=Array.isArray(t)?t:t.split("/");return n[0]==="attrs"&&(e.dirty=!0),this.store.removeByPath(n,e),this}prop(t,e,n){return t==null?this.getProp():typeof t=="string"||Array.isArray(t)?arguments.length===1?this.getPropByPath(t):e==null?this.removePropByPath(t,n||{}):this.setPropByPath(t,e,n||{}):this.setProp(t,e||{})}previous(t){return this.store.getPrevious(t)}get zIndex(){return this.getZIndex()}set zIndex(t){t==null?this.removeZIndex():this.setZIndex(t)}getZIndex(){return this.store.get("zIndex")}setZIndex(t,e={}){return this.store.set("zIndex",t,e),this}removeZIndex(t={}){return this.store.remove("zIndex",t),this}toFront(t={}){const e=this.model;if(e){let n=e.getMaxZIndex(),r;t.deep?(r=this.getDescendants({deep:!0,breadthFirst:!0}),r.unshift(this)):r=[this],n=n-r.length+1;const l=e.total();let f=e.indexOf(this)!==l-r.length;f||(f=r.some((h,p)=>h.getZIndex()!==n+p)),f&&this.batchUpdate("to-front",()=>{n+=r.length,r.forEach((h,p)=>{h.setZIndex(n+p,t)})})}return this}toBack(t={}){const e=this.model;if(e){let n=e.getMinZIndex(),r;t.deep?(r=this.getDescendants({deep:!0,breadthFirst:!0}),r.unshift(this)):r=[this];let l=e.indexOf(this)!==0;l||(l=r.some((f,h)=>f.getZIndex()!==n+h)),l&&this.batchUpdate("to-back",()=>{n-=r.length,r.forEach((f,h)=>{f.setZIndex(n+h,t)})})}return this}get markup(){return this.getMarkup()}set markup(t){t==null?this.removeMarkup():this.setMarkup(t)}getMarkup(){let t=this.store.get("markup");return t==null&&(t=this.constructor.getMarkup()),t}setMarkup(t,e={}){return this.store.set("markup",t,e),this}removeMarkup(t={}){return this.store.remove("markup",t),this}get attrs(){return this.getAttrs()}set attrs(t){t==null?this.removeAttrs():this.setAttrs(t)}getAttrs(){const t=this.store.get("attrs");return t?Object.assign({},t):{}}setAttrs(t,e={}){if(t==null)this.removeAttrs(e);else{const n=r=>this.store.set("attrs",r,e);if(e.overwrite===!0)n(t);else{const r=this.getAttrs();e.deep===!1?n(Object.assign(Object.assign({},r),t)):n(Mn({},r,t))}}return this}replaceAttrs(t,e={}){return this.setAttrs(t,Object.assign(Object.assign({},e),{overwrite:!0}))}updateAttrs(t,e={}){return this.setAttrs(t,Object.assign(Object.assign({},e),{deep:!1}))}removeAttrs(t={}){return this.store.remove("attrs",t),this}getAttrDefinition(t){if(!t)return null;const n=this.constructor.getAttrHooks()||{};let r=n[t]||Eb.get(t);if(!r){const l=cb(t);r=n[l]||Eb.get(l)}return r||null}getAttrByPath(t){return t==null||t===""?this.getAttrs():this.getPropByPath(this.prefixAttrPath(t))}setAttrByPath(t,e,n={}){return this.setPropByPath(this.prefixAttrPath(t),e,n),this}removeAttrByPath(t,e={}){return this.removePropByPath(this.prefixAttrPath(t),e),this}prefixAttrPath(t){return Array.isArray(t)?["attrs"].concat(t):`attrs/${t}`}attr(t,e,n){return t==null?this.getAttrByPath():typeof t=="string"||Array.isArray(t)?arguments.length===1?this.getAttrByPath(t):e==null?this.removeAttrByPath(t,n||{}):this.setAttrByPath(t,e,n||{}):this.setAttrs(t,e||{})}get visible(){return this.isVisible()}set visible(t){this.setVisible(t)}setVisible(t,e={}){return this.store.set("visible",t,e),this}isVisible(){return this.store.get("visible")!==!1}show(t={}){return this.isVisible()||this.setVisible(!0,t),this}hide(t={}){return this.isVisible()&&this.setVisible(!1,t),this}toggleVisible(t,e={}){const n=typeof t=="boolean"?t:!this.isVisible(),r=typeof t=="boolean"?e:t;return n?this.show(r):this.hide(r),this}get data(){return this.getData()}set data(t){this.setData(t)}getData(){return this.store.get("data")}setData(t,e={}){if(t==null)this.removeData(e);else{const n=r=>this.store.set("data",r,e);if(e.overwrite===!0)n(t);else{const r=this.getData();e.deep===!1?n(typeof t=="object"?Object.assign(Object.assign({},r),t):t):n(Mn({},r,t))}}return this}replaceData(t,e={}){return this.setData(t,Object.assign(Object.assign({},e),{overwrite:!0}))}updateData(t,e={}){return this.setData(t,Object.assign(Object.assign({},e),{deep:!1}))}removeData(t={}){return this.store.remove("data",t),this}get parent(){return this.getParent()}get children(){return this.getChildren()}getParentId(){return this.store.get("parent")}getParent(){const t=this.getParentId();if(t&&this.model){const e=this.model.getCell(t);return this._parent=e,e}return null}getChildren(){const t=this.store.get("children");if(t&&t.length&&this.model){const e=t.map(n=>{var r;return(r=this.model)===null||r===void 0?void 0:r.getCell(n)}).filter(n=>n!=null);return this._children=e,[...e]}return null}hasParent(){return this.parent!=null}isParentOf(t){return t!=null&&t.getParent()===this}isChildOf(t){return t!=null&&this.getParent()===t}eachChild(t,e){return this.children&&this.children.forEach(t,e),this}filterChild(t,e){return this.children?this.children.filter(t,e):[]}getChildCount(){return this.children==null?0:this.children.length}getChildIndex(t){return this.children==null?-1:this.children.indexOf(t)}getChildAt(t){return this.children!=null&&t>=0?this.children[t]:null}getAncestors(t={}){const e=[];let n=this.getParent();for(;n;)e.push(n),n=t.deep!==!1?n.getParent():null;return e}getDescendants(t={}){if(t.deep!==!1){if(t.breadthFirst){const e=[],n=this.getChildren()||[];for(;n.length>0;){const r=n.shift(),l=r.getChildren();e.push(r),l&&n.push(...l)}return e}{const e=this.getChildren()||[];return e.forEach(n=>{e.push(...n.getDescendants(t))}),e}}return this.getChildren()||[]}isDescendantOf(t,e={}){if(t==null)return!1;if(e.deep!==!1){let n=this.getParent();for(;n;){if(n===t)return!0;n=n.getParent()}return!1}return this.isChildOf(t)}isAncestorOf(t,e={}){return t==null?!1:t.isDescendantOf(this,e)}contains(t){return this.isAncestorOf(t)}getCommonAncestor(...t){return Me.getCommonAncestor(this,...t)}setParent(t,e={}){return this._parent=t,t?this.store.set("parent",t.id,e):this.store.remove("parent",e),this}setChildren(t,e={}){return this._children=t,t!=null?this.store.set("children",t.map(n=>n.id),e):this.store.remove("children",e),this}unembed(t,e={}){const n=this.children;if(n!=null&&t!=null){const r=this.getChildIndex(t);r!==-1&&(n.splice(r,1),t.setParent(null,e),this.setChildren(n,e))}return this}embed(t,e={}){return t.addTo(this,e),this}addTo(t,e={}){return Me.isCell(t)?t.addChild(this,e):t.addCell(this,e),this}insertTo(t,e,n={}){return t.insertChild(this,e,n),this}addChild(t,e={}){return this.insertChild(t,void 0,e)}insertChild(t,e,n={}){if(t!=null&&t!==this){const r=t.getParent(),l=this!==r;let f=e;if(f==null&&(f=this.getChildCount(),l||(f-=1)),r){const p=r.getChildren();if(p){const y=p.indexOf(t);y>=0&&(t.setParent(null,n),p.splice(y,1),r.setChildren(p,n))}}let h=this.children;if(h==null?(h=[],h.push(t)):h.splice(f,0,t),t.setParent(this,n),this.setChildren(h,n),l&&this.model){const p=this.model.getIncomingEdges(this),y=this.model.getOutgoingEdges(this);p&&p.forEach(x=>{x.updateParent(n)}),y&&y.forEach(x=>{x.updateParent(n)})}this.model&&this.model.addCell(t,n)}return this}removeFromParent(t={}){const e=this.getParent();if(e!=null){const n=e.getChildIndex(this);e.removeChildAt(n,t)}return this}removeChild(t,e={}){const n=this.getChildIndex(t);return this.removeChildAt(n,e)}removeChildAt(t,e={}){const n=this.getChildAt(t);return this.children!=null&&n!=null&&(this.unembed(n,e),n.remove(e)),n}remove(t={}){return this.batchUpdate("remove",()=>{const e=this.getParentId(),n=e&&this.model?this.model.getCell(e):this._parent;if(n){const r=n.store.get("children");if(r&&r.length){const l=r.filter(f=>f!==this.id);l.length!==r.length&&(l.length?n.store.set("children",l,t):n.store.remove("children",t))}}this.setParent(null,t),t.deep!==!1&&this.eachChild(r=>r.remove(t)),this.model&&this.model.removeCell(this,t),this.dispose()}),this}animate(t,e){var n;const r=nc(e)?{duration:e}:Object.assign({},e),l=new hF(this,t,r),f=new uF(l,r.timeline);return this.animationManager.addAnimation(f),f.id=(n=r.id)!==null&&n!==void 0?n:"",f.play(),f}getAnimations(){return this.animationManager.getAnimations()}translate(t,e,n){return this}scale(t,e,n,r){return this}addTools(t,e,n){const r=Array.isArray(t)?t:[t],l=typeof e=="string"?e:null,f=typeof e=="object"?e:typeof n=="object"?n:{};if(f.reset)return this.setTools({name:l,items:r,local:f.local},f);let h=wn(this.getTools());if(h==null||l==null||h.name===l)return h==null&&(h={}),h.items||(h.items=[]),h.name=l,h.items=[...h.items,...r],this.setTools(Object.assign({},h),f)}setTools(t,e={}){return t==null?this.removeTools():this.store.set("tools",Me.normalizeTools(t),e),this}getTools(){return this.store.get("tools")}removeTools(t={}){return this.store.remove("tools",t),this}hasTools(t){const e=this.getTools();return e==null?!1:t==null?!0:e.name===t}hasTool(t){const e=this.getTools();return e==null?!1:e.items.some(n=>typeof n=="string"?n===t:n.name===t)}removeTool(t,e={}){const n=wn(this.getTools());if(n){let r=!1;const l=n.items.slice(),f=h=>{l.splice(h,1),r=!0};if(typeof t=="number")f(t);else for(let h=l.length-1;h>=0;h-=1){const p=l[h];(typeof p=="string"?p===t:p.name===t)&&f(h)}r&&(n.items=l,this.setTools(n,e))}return this}getBBox(t){return new Dt}getConnectionPoint(t,e){return new G}toJSON(t={}){const e=Object.assign({},this.store.get()),n=Object.prototype.toString,r=this.isNode()?"node":this.isEdge()?"edge":"cell";if(!e.shape){const M=this.constructor;throw new Error(`Unable to serialize ${r} missing "shape" prop, check the ${r} "${M.name||n.call(M)}"`)}const l=this.constructor,f=t.diff===!0,h=e.attrs||{},p=l.getDefaults(!0),y=f?this.preprocess(p,!0):p,x=y.attrs||{},S={};Object.entries(e).forEach(([M,D])=>{if(D!=null&&!Array.isArray(D)&&typeof D=="object"&&!ca(D))throw new Error(`Can only serialize ${r} with plain-object props, but got a "${toString.call(D)}" type of key "${M}" on ${r} "${this.id}"`);if(M!=="attrs"&&M!=="shape"&&f){const R=y[M];ec(D,R)&&delete e[M]}}),Object.keys(h).forEach(M=>{const D=h[M],R=x[M];Object.keys(D).forEach(N=>{const L=D[N],_=R?R[N]:null;L!=null&&typeof L=="object"&&!Array.isArray(L)?Object.keys(L).forEach(U=>{const $=L[U];if(R==null||_==null||!Vn(_)||!ec(_[U],$)){S[M]==null&&(S[M]={}),S[M][N]==null&&(S[M][N]={});const Y=S[M][N];Y[U]=$}}):(R==null||!ec(_,L))&&(S[M]==null&&(S[M]={}),S[M][N]=L)})});const w=Object.assign(Object.assign({},e),{attrs:zA(S)?void 0:S});w.attrs==null&&delete w.attrs;const T=w;return T.angle===0&&delete T.angle,wn(T)}clone(t={}){if(!t.deep){const n=Object.assign({},this.store.get());t.keepId||delete n.id,delete n.parent,delete n.children;const r=this.constructor;return new r(n)}return Me.deepClone(this)[this.id]}findView(t){return t.findViewByCell(this)}startBatch(t,e={},n=this.model){return this.notify("batch:start",{name:t,data:e,cell:this}),n&&n.startBatch(t,Object.assign(Object.assign({},e),{cell:this})),this}stopBatch(t,e={},n=this.model){return n&&n.stopBatch(t,Object.assign(Object.assign({},e),{cell:this})),this.notify("batch:stop",{name:t,data:e,cell:this}),this}batchUpdate(t,e,n){const r=this.model;this.startBatch(t,n,r);const l=e();return this.stopBatch(t,n,r),l}dispose(){this.removeFromParent(),this.animationManager.cancelAnimations(),this.store.dispose()}}Me.toStringTag="X6.cell",Me.defaults={},Me.attrHooks={},Me.propHooks=[],De([Re()],Me.prototype,"dispose",null),Me.config({propHooks(s){var{tools:t}=s,e=re(s,["tools"]);return t&&(e.tools=Me.normalizeTools(t)),e}});class gF{constructor(t){this.ports=[],this.groups={},this.init(wn(t))}getPorts(){return this.ports}getGroup(t){return t!=null?this.groups[t]:null}getPortsByGroup(t){return this.ports.filter(e=>e.group===t||e.group==null&&t==null)}getPortsLayoutByGroup(t,e){const n=this.getPortsByGroup(t),r=t?this.getGroup(t):null,l=r?r.position:null,f=l?l.name:null;let h;if(f!=null){const S=jb.get(f);if(S==null)return jb.onNotFound(f);h=S}else h=sL.left;const p=n.map(S=>S&&S.position&&S.position.args||{}),y=l&&l.args||{};return h(p,e,y).map((S,w)=>{const T=n[w];return{portLayout:S,portId:T.id,portSize:T.size,portAttrs:T.attrs,labelSize:T.label.size,labelLayout:this.getPortLabelLayout(T,G.create(S.position),e)}})}init(t){const{groups:e,items:n}=t;e!=null&&Object.keys(e).forEach(r=>{this.groups[r]=this.parseGroup(e[r])}),Array.isArray(n)&&n.forEach(r=>{this.ports.push(this.parsePort(r))})}parseGroup(t){return Object.assign(Object.assign({},t),{label:this.getLabel(t,!0),position:this.getPortPosition(t.position,!0)})}parsePort(t){const e=Object.assign({},t),n=this.getGroup(t.group)||{};return e.markup=e.markup||n.markup,e.attrs=Mn({},n.attrs,e.attrs),e.position=this.createPosition(n,e),e.label=Mn({},n.label,this.getLabel(e)),e.zIndex=this.getZIndex(n,e),e.size=Object.assign(Object.assign({},n.size),e.size),e}getZIndex(t,e){return typeof e.zIndex=="number"?e.zIndex:typeof t.zIndex=="number"||t.zIndex==="auto"?t.zIndex:"auto"}createPosition(t,e){return Mn({name:"left",args:{}},t.position,{args:e.args})}getPortPosition(t,e=!1){if(t==null){if(e)return{name:"left",args:{}}}else{if(typeof t=="string")return{name:t,args:{}};if(Array.isArray(t))return{name:"absolute",args:{x:t[0],y:t[1]}};if(typeof t=="object")return t}return{args:{}}}getPortLabelPosition(t,e=!1){if(t==null){if(e)return{name:"left",args:{}}}else{if(typeof t=="string")return{name:t,args:{}};if(typeof t=="object")return t}return{args:{}}}getLabel(t,e=!1){const n=t.label||{};return n.position=this.getPortLabelPosition(n.position,e),n}getPortLabelLayout(t,e,n){const r=t.label.position.name||"left",l=t.label.position.args||{},f=yS.get(r)||nL.left;return f?f(e,n,l):null}}let OT,DT;function VL(s,t){return t?OT!=null&&OT.exist(s):DT!=null&&DT.exist(s)}function pF(s){OT=s}function mF(s){DT=s}const GL="X6.node";let $L=0;function yF(s){return s?$A(s):($L+=1,`CustomNode${$L}`)}let Li=class Gy extends Me{static isNode(t){if(t==null)return!1;if(t instanceof Gy)return!0;const e=t[Symbol.toStringTag],n=t;return(e==null||e===GL)&&typeof n.isNode=="function"&&typeof n.isEdge=="function"&&typeof n.prop=="function"&&typeof n.attr=="function"&&typeof n.size=="function"&&typeof n.position=="function"}static define(t){const{constructorName:e,overwrite:n}=t,r=re(t,["constructorName","overwrite"]),l=JA(yF(e||r.shape),this);return l.config(r),r.shape&&Gy.registry.register(r.shape,l,n),l}static create(t){const e=t.shape||"rect",n=Gy.registry.get(e);return n?new n(t):Gy.registry.onNotFound(e)}get[Symbol.toStringTag](){return Gy.toStringTag}constructor(t={}){super(t),this.initPorts()}preprocess(t,e){const{x:n,y:r,width:l,height:f}=t,h=re(t,["x","y","width","height"]);if(n!=null||r!=null){const p=h.position;h.position=Object.assign(Object.assign({},p),{x:n??(p?p.x:0),y:r??(p?p.y:0)})}if(l!=null||f!=null){const p=h.size;h.size=Object.assign(Object.assign({},p),{width:l??(p?p.width:0),height:f??(p?p.height:0)})}return super.preprocess(h,e)}isNode(){return!0}size(t,e,n){return t===void 0?this.getSize():typeof t=="number"?this.setSize(t,e,n):this.setSize(t,e)}getSize(){const t=this.store.get("size");return t?Object.assign({},t):{width:1,height:1}}setSize(t,e,n){return typeof t=="object"?this.resize(t.width,t.height,e):this.resize(t,e,n),this}resize(t,e,n={}){this.startBatch("resize",n);const r=n.direction;if(r){const l=this.getSize();switch(r){case"left":case"right":e=l.height;break;case"top":case"bottom":t=l.width;break}let h={right:0,"top-right":0,top:1,"top-left":1,left:2,"bottom-left":2,bottom:3,"bottom-right":3}[r];const p=Es(this.getAngle()||0);n.absolute&&(h+=Math.floor((p+45)/90),h%=4);const y=this.getBBox();let x;h===0?x=y.getBottomLeft():h===1?x=y.getCorner():h===2?x=y.getTopRight():x=y.getOrigin();const S=x.clone().rotate(-p,y.getCenter()),w=Math.sqrt(t*t+e*e)/2;let T=h*Math.PI/2;T+=Math.atan(h%2===0?e/t:t/e),T-=fs(p);const D=G.fromPolar(w,T,S).clone().translate(t/-2,e/-2);this.store.set("size",{width:t,height:e},n),this.setPosition(D.x,D.y,n)}else this.store.set("size",{width:t,height:e},n);return this.stopBatch("resize",n),this}scale(t,e,n,r={}){const l=this.getBBox().scale(t,e,n??void 0);return this.startBatch("scale",r),this.setPosition(l.x,l.y,r),this.resize(l.width,l.height,r),this.stopBatch("scale"),this}position(t,e,n){return typeof t=="number"?this.setPosition(t,e,n):this.getPosition(t)}getPosition(t={}){if(t.relative){const n=this.getParent();if(n!=null&&n.isNode()){const r=this.getPosition(),l=n.getPosition();return{x:r.x-l.x,y:r.y-l.y}}}const e=this.store.get("position");return e?Object.assign({},e):{x:0,y:0}}setPosition(t,e,n={}){let r,l,f;if(typeof t=="object"?(r=t.x,l=t.y,f=e||{}):(r=t,l=e,f=n||{}),f.relative){const h=this.getParent();if(h!=null&&h.isNode()){const p=h.getPosition();r+=p.x,l+=p.y}}if(f.deep){const h=this.getPosition();this.translate(r-h.x,l-h.y,f)}else this.store.set("position",{x:r,y:l},f);return this}translate(t=0,e=0,n={}){if(t===0&&e===0)return this;n.translateBy=n.translateBy||this.id;const r=this.getPosition();if(n.restrict!=null&&n.translateBy===this.id){const f=this.getBBox({deep:!0}),h=n.restrict,p=r.x-f.x,y=r.y-f.y,x=Math.max(h.x+p,Math.min(h.x+h.width+p-f.width,r.x+t)),S=Math.max(h.y+y,Math.min(h.y+h.height+y-f.height,r.y+e));t=x-r.x,e=S-r.y}const l={x:r.x+t,y:r.y+e};if(n.tx=t,n.ty=e,n.transition){let f=typeof n.transition!="object"?{}:Object.assign({},n.transition);f=Object.assign({duration:100,fill:"forwards"},f),this.animate({"position/x":l.x,"position/y":l.y},f),this.eachChild(h=>{var p;((p=n.exclude)===null||p===void 0?void 0:p.includes(h))||h.translate(t,e,n)})}else this.startBatch("translate",n),this.store.set("position",l,n),this.eachChild(f=>{var h;((h=n.exclude)===null||h===void 0?void 0:h.includes(f))||f.translate(t,e,n)}),this.stopBatch("translate",n);return this}angle(t,e){return t==null?this.getAngle():this.rotate(t,e)}getAngle(){return this.store.get("angle",0)}rotate(t,e={}){const n=this.getAngle();if(e.center){const r=this.getSize(),l=this.getPosition(),f=this.getBBox().getCenter();f.rotate(n-t,e.center);const h=f.x-r.width/2-l.x,p=f.y-r.height/2-l.y;this.startBatch("rotate",{angle:t,options:e}),this.setPosition(l.x+h,l.y+p,e),this.rotate(t,Object.assign(Object.assign({},e),{center:null})),this.stopBatch("rotate")}else this.store.set("angle",e.absolute?t:(n+t)%360,e);return this}getBBox(t={}){if(t.deep){const e=this.getDescendants({deep:!0,breadthFirst:!0});return e.push(this),Me.getCellsBBox(e)}return Dt.fromPositionAndSize(this.getPosition(),this.getSize())}getConnectionPoint(t,e){const n=this.getBBox(),r=n.getCenter(),l=t.getTerminal(e);if(l==null)return r;const f=l.port;if(!f||!this.hasPort(f))return r;const h=this.getPort(f);if(!h||!h.group)return r;const y=this.getPortsPosition(h.group)[f].position,x=G.create(y).translate(n.getOrigin()),S=this.getAngle();return S&&x.rotate(-S,r),x}fit(t={}){const n=(this.getChildren()||[]).filter(y=>y.isNode());if(n.length===0)return this;this.startBatch("fit-embeds",t),t.deep&&n.forEach(y=>{y.fit(t)});let{x:r,y:l,width:f,height:h}=Me.getCellsBBox(n);const p=fa(t.padding);return r-=p.left,l-=p.top,f+=p.left+p.right,h+=p.bottom+p.top,this.store.set({position:{x:r,y:l},size:{width:f,height:h}},t),this.stopBatch("fit-embeds"),this}get portContainerMarkup(){return this.getPortContainerMarkup()}set portContainerMarkup(t){this.setPortContainerMarkup(t)}getDefaultPortContainerMarkup(){return this.store.get("defaultPortContainerMarkup")||hs.getPortContainerMarkup()}getPortContainerMarkup(){return this.store.get("portContainerMarkup")||this.getDefaultPortContainerMarkup()}setPortContainerMarkup(t,e={}){return this.store.set("portContainerMarkup",hs.clone(t),e),this}get portMarkup(){return this.getPortMarkup()}set portMarkup(t){this.setPortMarkup(t)}getDefaultPortMarkup(){return this.store.get("defaultPortMarkup")||hs.getPortMarkup()}getPortMarkup(){return this.store.get("portMarkup")||this.getDefaultPortMarkup()}setPortMarkup(t,e={}){return this.store.set("portMarkup",hs.clone(t),e),this}get portLabelMarkup(){return this.getPortLabelMarkup()}set portLabelMarkup(t){this.setPortLabelMarkup(t)}getDefaultPortLabelMarkup(){return this.store.get("defaultPortLabelMarkup")||hs.getPortLabelMarkup()}getPortLabelMarkup(){return this.store.get("portLabelMarkup")||this.getDefaultPortLabelMarkup()}setPortLabelMarkup(t,e={}){return this.store.set("portLabelMarkup",hs.clone(t),e),this}get ports(){const t=this.store.get("ports",{items:[]});return t.items==null&&(t.items=[]),t}getPorts(){return wn(this.ports.items)}getPortsByGroup(t){return this.getPorts().filter(e=>e.group===t)}getPort(t){return wn(this.ports.items.find(e=>e.id&&e.id===t))}getPortAt(t){return this.ports.items[t]||null}hasPorts(){return this.ports.items.length>0}hasPort(t){return this.getPortIndex(t)!==-1}getPortIndex(t){const e=typeof t=="string"?t:t.id;return e!=null?this.ports.items.findIndex(n=>n.id===e):-1}getPortsPosition(t){const e=this.getSize();return this.port.getPortsLayoutByGroup(t,new Dt(0,0,e.width,e.height)).reduce((r,l)=>{const f=l.portLayout;return r[l.portId]={position:Object.assign({},f.position),angle:f.angle||0},r},{})}getPortProp(t,e){return this.getPropByPath(this.prefixPortPath(t,e))}setPortProp(t,e,n,r){if(typeof e=="string"||Array.isArray(e)){const h=this.prefixPortPath(t,e),p=n;return this.setPropByPath(h,p,r)}const l=this.prefixPortPath(t),f=e;return this.setPropByPath(l,f,n)}removePortProp(t,e,n){return typeof e=="string"||Array.isArray(e)?this.removePropByPath(this.prefixPortPath(t,e),n):this.removePropByPath(this.prefixPortPath(t),e)}portProp(t,e,n,r){return e==null?this.getPortProp(t):typeof e=="string"||Array.isArray(e)?arguments.length===2?this.getPortProp(t,e):n==null?this.removePortProp(t,e,r):this.setPortProp(t,e,n,r):this.setPortProp(t,e,n)}prefixPortPath(t,e){const n=this.getPortIndex(t);if(n===-1)throw new Error(`Unable to find port with id: "${t}"`);return e==null||e===""?["ports","items",`${n}`]:Array.isArray(e)?["ports","items",`${n}`,...e]:`ports/items/${n}/${e}`}addPort(t,e){const n=[...this.ports.items];return n.push(t),this.setPropByPath("ports/items",n,e),this}addPorts(t,e){return this.setPropByPath("ports/items",[...this.ports.items,...t],e),this}insertPort(t,e,n){const r=[...this.ports.items];return r.splice(t,0,e),this.setPropByPath("ports/items",r,n),this}removePort(t,e={}){return this.removePortAt(this.getPortIndex(t),e)}removePortAt(t,e={}){if(t>=0){const n=[...this.ports.items];n.splice(t,1),e.rewrite=!0,this.setPropByPath("ports/items",n,e)}return this}removePorts(t,e){let n;if(Array.isArray(t)){if(n=e||{},t.length){n.rewrite=!0;const l=[...this.ports.items].filter(f=>!t.some(h=>{const p=typeof h=="string"?h:h.id;return f.id===p}));this.setPropByPath("ports/items",l,n)}}else n=t||{},n.rewrite=!0,this.setPropByPath("ports/items",[],n);return this}getParsedPorts(){return this.port.getPorts()}getParsedGroups(){return this.port.groups}getPortsLayoutByGroup(t,e){return this.port.getPortsLayoutByGroup(t,e)}initPorts(){this.updatePortData(),this.on("change:ports",()=>{this.processRemovedPort(),this.updatePortData()})}processRemovedPort(){const t=this.ports,e={};t.items.forEach(f=>{f.id&&(e[f.id]=!0)});const n={};(this.store.getPrevious("ports")||{items:[]}).items.forEach(f=>{f.id&&!e[f.id]&&(n[f.id]=!0)});const l=this.model;l&&!zA(n)&&(l.getConnectedEdges(this,{incoming:!0}).forEach(p=>{const y=p.getTargetPortId();y&&n[y]&&p.remove()}),l.getConnectedEdges(this,{outgoing:!0}).forEach(p=>{const y=p.getSourcePortId();y&&n[y]&&p.remove()}))}validatePorts(){const t={},e=[];return this.ports.items.forEach(n=>{typeof n!="object"&&e.push(`Invalid port ${n}.`),n.id==null&&(n.id=this.generatePortId()),t[n.id]&&e.push("Duplicitied port id."),t[n.id]=!0}),e}generatePortId(){return QA()}updatePortData(){const t=this.validatePorts();if(t.length>0)throw this.store.set("ports",this.store.getPrevious("ports")),new Error(t.join(" "));const e=this.port?this.port.getPorts():null;this.port=new gF(this.ports);const n=this.port.getPorts(),r=e?n.filter(f=>e.find(h=>h.id===f.id)?null:f):[...n],l=e?e.filter(f=>n.find(h=>h.id===f.id)?null:f):[];r.length>0&&this.notify("ports:added",{added:r,cell:this,node:this}),l.length>0&&this.notify("ports:removed",{removed:l,cell:this,node:this})}};Li.toStringTag=GL,Li.registry=In.create({type:"node",process(s,t){if(VL(s,!0))throw new Error(`Node with name '${s}' was registered by anthor Edge`);if(typeof t=="function")return t.config({shape:s}),t;let e=Li;const{inherit:n}=t,r=re(t,["inherit"]);if(n)if(typeof n=="string"){const f=this.get(n);f==null?this.onNotFound(n,"inherited"):e=f}else e=n;r.constructorName==null&&(r.constructorName=s);const l=e.define.call(e,r);return l.config({shape:s}),l}}),Li.defaults={angle:0,position:{x:0,y:0},size:{width:1,height:1}},Li.config({markup:[{tagName:"rect",selector:"body"},{tagName:"text",selector:"label"}],propHooks(s){var{ports:t}=s,e=re(s,["ports"]);return t&&(e.ports=Array.isArray(t)?{items:t}:t),e}}),mF(Li.registry);const qL="X6.edge",YL="basic.edge";let XL=0;function bF(s){return s?$A(s):(XL+=1,`CustomEdge${XL}`)}let xi=class $y extends Me{static parseStringLabel(t){return{attrs:{label:{text:t}}}}static isEdge(t){if(t==null)return!1;if(t instanceof $y)return!0;const e=t[Symbol.toStringTag],n=t;return(e==null||e===qL)&&typeof n.isNode=="function"&&typeof n.isEdge=="function"&&typeof n.prop=="function"&&typeof n.attr=="function"&&typeof n.disconnect=="function"&&typeof n.getSource=="function"&&typeof n.getTarget=="function"}static equalTerminals(t,e){const n=t,r=e;return n.cell===r.cell?n.port===r.port||n.port==null&&r.port==null:!1}static define(t){const{constructorName:e,overwrite:n}=t,r=re(t,["constructorName","overwrite"]),l=JA(bF(e||r.shape),this);return l.config(r),r.shape&&$y.registry.register(r.shape,l,n),l}static create(t){const e=t.shape||"edge",n=$y.registry.get(e);return n?new n(t):$y.registry.onNotFound(e)}get[Symbol.toStringTag](){return $y.toStringTag}constructor(t={}){super(t)}preprocess(t,e){const{source:n,sourceCell:r,sourcePort:l,sourcePoint:f,target:h,targetCell:p,targetPort:y,targetPoint:x}=t,w=re(t,["source","sourceCell","sourcePort","sourcePoint","target","targetCell","targetPort","targetPoint"]),T=M=>typeof M=="string"||typeof M=="number";if(n!=null)if(Me.isCell(n))w.source={cell:n.id};else if(T(n))w.source={cell:n};else if(G.isPoint(n))w.source=n.toJSON();else if(Array.isArray(n))w.source={x:n[0],y:n[1]};else{const M=n.cell;Me.isCell(M)?w.source=Object.assign(Object.assign({},n),{cell:M.id}):w.source=n}if(r!=null||l!=null){let M=w.source;if(r!=null){const D=T(r)?r:r.id;M?M.cell=D:M=w.source={cell:D}}l!=null&&M&&(M.port=l)}else f!=null&&(w.source=G.create(f).toJSON());if(h!=null)if(Me.isCell(h))w.target={cell:h.id};else if(T(h))w.target={cell:h};else if(G.isPoint(h))w.target=h.toJSON();else if(Array.isArray(h))w.target={x:h[0],y:h[1]};else{const M=h.cell;Me.isCell(M)?w.target=Object.assign(Object.assign({},h),{cell:M.id}):w.target=h}if(p!=null||y!=null){let M=w.target;if(p!=null){const D=T(p)?p:p.id;M?M.cell=D:M=w.target={cell:D}}y!=null&&M&&(M.port=y)}else x!=null&&(w.target=G.create(x).toJSON());return super.preprocess(w,e)}setup(){super.setup(),this.on("change:labels",t=>this.onLabelsChanged(t)),this.on("change:vertices",t=>this.onVertexsChanged(t))}isEdge(){return!0}disconnect(t={}){return this.store.set({source:{x:0,y:0},target:{x:0,y:0}},t),this}get source(){return this.getSource()}set source(t){this.setSource(t)}getSource(){return this.getTerminal("source")}getSourceCellId(){return this.source.cell}getSourcePortId(){return this.source.port}setSource(t,e,n={}){return this.setTerminal("source",t,e,n)}get target(){return this.getTarget()}set target(t){this.setTarget(t)}getTarget(){return this.getTerminal("target")}getTargetCellId(){return this.target.cell}getTargetPortId(){return this.target.port}setTarget(t,e,n={}){return this.setTerminal("target",t,e,n)}getTerminal(t){return Object.assign({},this.store.get(t))}setTerminal(t,e,n,r={}){if(Me.isCell(e))return this.store.set(t,Mn({},n,{cell:e.id}),r),this;const l=e;return G.isPoint(e)||l.x!=null&&l.y!=null?(this.store.set(t,Mn({},n,{x:l.x,y:l.y}),r),this):(this.store.set(t,wn(e),r),this)}getSourcePoint(){return this.getTerminalPoint("source")}getTargetPoint(){return this.getTerminalPoint("target")}getTerminalPoint(t){const e=this[t];if(G.isPointLike(e))return G.create(e);const n=this.getTerminalCell(t);return n?n.getConnectionPoint(this,t):new G}getSourceCell(){return this.getTerminalCell("source")}getTargetCell(){return this.getTerminalCell("target")}getTerminalCell(t){if(this.model){const e=t==="source"?this.getSourceCellId():this.getTargetCellId();if(e)return this.model.getCell(e)}return null}getSourceNode(){return this.getTerminalNode("source")}getTargetNode(){return this.getTerminalNode("target")}getTerminalNode(t){let e=this;const n={};for(;e&&e.isEdge();){if(n[e.id])return null;n[e.id]=!0,e=e.getTerminalCell(t)}return e&&e.isNode()?e:null}get router(){return this.getRouter()}set router(t){t==null?this.removeRouter():this.setRouter(t)}getRouter(){return this.store.get("router")}setRouter(t,e,n){return typeof t=="object"?this.store.set("router",t,e):this.store.set("router",{name:t,args:e},n),this}removeRouter(t={}){return this.store.remove("router",t),this}get connector(){return this.getConnector()}set connector(t){t==null?this.removeConnector():this.setConnector(t)}getConnector(){return this.store.get("connector")}setConnector(t,e,n){return typeof t=="object"?this.store.set("connector",t,e):this.store.set("connector",{name:t,args:e},n),this}removeConnector(t={}){return this.store.remove("connector",t)}getDefaultLabel(){const t=this.constructor,e=this.store.get("defaultLabel")||t.defaultLabel||{};return wn(e)}get labels(){return this.getLabels()}set labels(t){this.setLabels(t)}getLabels(){return[...this.store.get("labels",[])].map(t=>this.parseLabel(t))}setLabels(t,e={}){return this.store.set("labels",Array.isArray(t)?t:[t],e),this}insertLabel(t,e,n={}){const r=this.getLabels(),l=r.length;let f=e!=null&&Number.isFinite(e)?e:l;return f<0&&(f=l+f+1),r.splice(f,0,this.parseLabel(t)),this.setLabels(r,n)}appendLabel(t,e={}){return this.insertLabel(t,-1,e)}getLabelAt(t){const e=this.getLabels();return t!=null&&Number.isFinite(t)?this.parseLabel(e[t]):null}setLabelAt(t,e,n={}){if(t!=null&&Number.isFinite(t)){const r=this.getLabels();r[t]=this.parseLabel(e),this.setLabels(r,n)}return this}removeLabelAt(t,e={}){const n=this.getLabels(),r=t!=null&&Number.isFinite(t)?t:-1,l=n.splice(r,1);return this.setLabels(n,e),l.length?l[0]:null}parseLabel(t){return typeof t=="string"?this.constructor.parseStringLabel(t):t}onLabelsChanged({previous:t,current:e}){const n=t&&e?e.filter(l=>t.find(f=>l===f||ec(l,f))?null:l):e?[...e]:[],r=t&&e?t.filter(l=>e.find(f=>l===f||ec(l,f))?null:l):t?[...t]:[];n.length>0&&this.notify("labels:added",{added:n,cell:this,edge:this}),r.length>0&&this.notify("labels:removed",{removed:r,cell:this,edge:this})}get vertices(){return this.getVertices()}set vertices(t){this.setVertices(t)}getVertices(){return[...this.store.get("vertices",[])]}setVertices(t,e={}){const n=Array.isArray(t)?t:[t];return this.store.set("vertices",n.map(r=>G.toJSON(r)),e),this}insertVertex(t,e,n={}){const r=this.getVertices(),l=r.length;let f=e!=null&&Number.isFinite(e)?e:l;return f<0&&(f=l+f+1),r.splice(f,0,G.toJSON(t)),this.setVertices(r,n)}appendVertex(t,e={}){return this.insertVertex(t,-1,e)}getVertexAt(t){return t!=null&&Number.isFinite(t)?this.getVertices()[t]:null}setVertexAt(t,e,n={}){if(t!=null&&Number.isFinite(t)){const r=this.getVertices();r[t]=e,this.setVertices(r,n)}return this}removeVertexAt(t,e={}){const n=this.getVertices(),r=t!=null&&Number.isFinite(t)?t:-1;return n.splice(r,1),this.setVertices(n,e)}onVertexsChanged({previous:t,current:e}){const n=t&&e?e.filter(l=>t.find(f=>G.equals(l,f))?null:l):e?[...e]:[],r=t&&e?t.filter(l=>e.find(f=>G.equals(l,f))?null:l):t?[...t]:[];n.length>0&&this.notify("vertexs:added",{added:n,cell:this,edge:this}),r.length>0&&this.notify("vertexs:removed",{removed:r,cell:this,edge:this})}getDefaultMarkup(){return this.store.get("defaultMarkup")||hs.getEdgeMarkup()}getMarkup(){return super.getMarkup()||this.getDefaultMarkup()}translate(t,e,n={}){return n.translateBy=n.translateBy||this.id,n.tx=t,n.ty=e,this.applyToPoints(r=>({x:(r.x||0)+t,y:(r.y||0)+e}),n)}scale(t,e,n,r={}){return this.applyToPoints(l=>G.create(l).scale(t,e,n).toJSON(),r)}applyToPoints(t,e={}){const n={},r=this.getSource(),l=this.getTarget();G.isPointLike(r)&&(n.source=t(r)),G.isPointLike(l)&&(n.target=t(l));const f=this.getVertices();return f.length>0&&(n.vertices=f.map(t)),this.store.set(n,e),this}getBBox(){return this.getPolyline().bbox()}getConnectionPoint(){return this.getPolyline().pointAt(.5)}getPolyline(){const t=[this.getSourcePoint(),...this.getVertices().map(e=>G.create(e)),this.getTargetPoint()];return new Oi(t)}updateParent(t){let e=null;const n=this.getSourceCell(),r=this.getTargetCell(),l=this.getParent();return n&&r&&(n===r||n.isDescendantOf(r)?e=r:r.isDescendantOf(n)?e=n:e=Me.getCommonAncestor(n,r)),l&&e&&e.id!==l.id&&l.unembed(this,t),e&&(!l||l.id!==e.id)&&e.embed(this,t),e}hasLoop(t={}){const e=this.getSource(),n=this.getTarget(),r=e.cell,l=n.cell;if(!r||!l)return!1;let f=r===l;if(!f&&t.deep&&this._model){const h=this.getSourceCell(),p=this.getTargetCell();h&&p&&(f=h.isAncestorOf(p,t)||p.isAncestorOf(h,t))}return f}getFragmentAncestor(){const t=[this,this.getSourceNode(),this.getTargetNode()].filter(e=>e!=null);return this.getCommonAncestor(...t)}isFragmentDescendantOf(t){const e=this.getFragmentAncestor();return!!e&&(e.id===t.id||e.isDescendantOf(t))}};xi.toStringTag=qL,xi.defaultLabel={markup:[{tagName:"rect",selector:"body"},{tagName:"text",selector:"label"}],attrs:{text:{fill:"#000",fontSize:14,textAnchor:"middle",textVerticalAnchor:"middle",pointerEvents:"none"},rect:{ref:"label",fill:"#fff",rx:3,ry:3,refWidth:1,refHeight:1,refX:0,refY:0}},position:{distance:.5}},xi.registry=In.create({type:"edge",process(s,t){if(VL(s,!1))throw new Error(`Edge with name '${s}' was registered by anthor Node`);if(typeof t=="function")return t.config({shape:s}),t;let e=xi;const{inherit:n="edge"}=t,r=re(t,["inherit"]);if(typeof n=="string"){const f=this.get(n||"edge");f==null&&n?this.onNotFound(n,"inherited"):e=f}else e=n;r.constructorName==null&&(r.constructorName=s);const l=e.define.call(e,r);return l.config({shape:s}),l}}),xi.defaults={},pF(xi.registry),xi.config({shape:YL,propHooks(s){const{label:t,vertices:e}=s,n=re(s,["label","vertices"]);if(t){n.labels==null&&(n.labels=[]);const r=typeof t=="string"?xi.parseStringLabel(t):t;n.labels.push(r)}return e&&Array.isArray(e)&&(n.vertices=e.map(r=>G.create(r).toJSON())),n}}),xi.registry.register(YL,xi);class RT extends Ts{constructor(t,e={}){super(),this.length=0,this.comparator=e.comparator||"zIndex",this.clean(),t&&this.reset(t,{silent:!0})}toJSON(){return this.cells.map(t=>t.toJSON())}add(t,e,n){let r,l;typeof e=="number"?(r=e,l=Object.assign({merge:!1},n)):(r=this.length,l=Object.assign({merge:!1},e)),r>this.length&&(r=this.length),r<0&&(r+=this.length+1);const f=Array.isArray(t)?t:[t],h=this.comparator&&typeof e!="number"&&l.sort!==!1,p=this.comparator||null;let y=!1;const x=[],S=[];return f.forEach(w=>{const T=this.get(w);T?l.merge&&!w.isSameStore(T)&&(T.setProp(w.getProp(),n),S.push(T),h&&!y&&(p==null||typeof p=="function"?y=T.hasChanged():typeof p=="string"?y=T.hasChanged(p):y=p.some(M=>T.hasChanged(M)))):(x.push(w),this.reference(w))}),x.length&&(h&&(y=!0),this.cells.splice(r,0,...x),this.length=this.cells.length),y&&this.sort({silent:!0}),l.silent||(x.forEach((w,T)=>{const M={cell:w,index:r+T,options:l};this.trigger("added",M),l.dryrun||w.notify("added",Object.assign({},M))}),y&&this.trigger("sorted"),(x.length||S.length)&&this.trigger("updated",{added:x,merged:S,removed:[],options:l})),this}remove(t,e={}){const n=Array.isArray(t)?t:[t],r=this.removeCells(n,e);return!e.silent&&r.length>0&&this.trigger("updated",{options:e,removed:r,added:[],merged:[]}),Array.isArray(t)?r:r[0]}removeCells(t,e){const n=[];for(let r=0;r<t.length;r+=1){const l=this.get(t[r]);if(l==null)continue;const f=this.cells.indexOf(l);this.cells.splice(f,1),this.length-=1,delete this.map[l.id],n.push(l),this.unreference(l),e.silent||(this.trigger("removed",{cell:l,index:f,options:e}),e.dryrun||l.notify("removed",{cell:l,index:f,options:e})),e.dryrun||l.remove()}return n}reset(t,e={}){const n=this.cells.slice();if(e.diff||(n.forEach(r=>{this.unreference(r),r.remove()}),this.clean()),this.add(t,Object.assign({silent:!0},e)),!e.silent){const r=this.cells.slice();this.trigger("reseted",{options:e,previous:n,current:r});const l=[],f=[];r.forEach(h=>{n.some(y=>y.id===h.id)||l.push(h)}),n.forEach(h=>{r.some(y=>y.id===h.id)||f.push(h)}),this.trigger("updated",{options:e,added:l,removed:f,merged:[]})}return this}push(t,e){return this.add(t,this.length,e)}pop(t){const e=this.at(this.length-1);return e?this.remove(e,t):null}unshift(t,e){return this.add(t,0,e)}shift(t){const e=this.at(0);return e?this.remove(e,t):null}get(t){if(t==null)return null;const e=typeof t=="string"||typeof t=="number"?t:t.id;return this.map[e]||null}has(t){return this.get(t)!=null}at(t){return t<0&&(t+=this.length),this.cells[t]||null}first(){return this.at(0)}last(){return this.at(-1)}indexOf(t){return this.cells.indexOf(t)}toArray(){return this.cells.slice()}sort(t={}){return this.comparator!=null&&(this.cells=NA(this.cells,this.comparator),t.silent||this.trigger("sorted")),this}clone(){const t=this.constructor;return new t(this.cells.slice(),{comparator:this.comparator})}reference(t){this.map[t.id]=t,t.on("*",this.notifyCellEvent,this)}unreference(t){t.off("*",this.notifyCellEvent,this),delete this.map[t.id]}notifyCellEvent(t,e){const n=e.cell;this.trigger(`cell:${t}`,e),n&&(n.isNode()?this.trigger(`node:${t}`,Object.assign(Object.assign({},e),{node:n})):n.isEdge()&&this.trigger(`edge:${t}`,Object.assign(Object.assign({},e),{edge:n})))}clean(){this.length=0,this.cells=[],this.map={}}dispose(){this.reset([])}}De([Re()],RT.prototype,"dispose",null);const vF="X6.Model";class wo extends Ts{static isModel(t){if(t==null)return!1;if(t instanceof wo)return!0;const e=t[Symbol.toStringTag],n=t;return(e==null||e===vF)&&typeof n.addNode=="function"&&typeof n.addEdge=="function"&&n.collection!=null}static toJSON(t,e={}){return{cells:t.map(n=>n.toJSON(e))}}static fromJSON(t){const e=[];return Array.isArray(t)?e.push(...t):(t.cells&&e.push(...t.cells),t.nodes&&t.nodes.forEach(n=>{n.shape==null&&(n.shape="rect"),e.push(n)}),t.edges&&t.edges.forEach(n=>{n.shape==null&&(n.shape="edge"),e.push(n)})),e.map(n=>{const r=n.shape;if(r){if(Li.registry.exist(r))return Li.create(n);if(xi.registry.exist(r))return xi.create(n)}throw new Error("The `shape` should be specified when creating a node/edge instance")})}constructor(t=[]){super(),this.batches={},this.addings=new WeakMap,this.nodes={},this.edges={},this.outgoings={},this.incomings={},this.collection=new RT(t),this.setup()}notify(t,e){this.trigger(t,e);const n=this.graph;return n&&(t==="sorted"||t==="reseted"||t==="updated"?n.trigger(`model:${t}`,e):n.trigger(t,e)),this}setup(){const t=this.collection;t.on("sorted",()=>this.notify("sorted",null)),t.on("updated",e=>this.notify("updated",e)),t.on("cell:change:zIndex",()=>this.sortOnChangeZ()),t.on("added",({cell:e})=>{this.onCellAdded(e)}),t.on("removed",e=>{const n=e.cell;this.onCellRemoved(n,e.options),this.notify("cell:removed",e),n.isNode()?this.notify("node:removed",Object.assign(Object.assign({},e),{node:n})):n.isEdge()&&this.notify("edge:removed",Object.assign(Object.assign({},e),{edge:n}))}),t.on("reseted",e=>{this.onReset(e.current),this.notify("reseted",e)}),t.on("edge:change:source",({edge:e})=>this.onEdgeTerminalChanged(e,"source")),t.on("edge:change:target",({edge:e})=>{this.onEdgeTerminalChanged(e,"target")})}sortOnChangeZ(){this.collection.sort()}onCellAdded(t){const e=t.id;t.isEdge()?(t.updateParent(),this.edges[e]=!0,this.onEdgeTerminalChanged(t,"source"),this.onEdgeTerminalChanged(t,"target")):this.nodes[e]=!0}onCellRemoved(t,e){const n=t.id;if(t.isEdge()){delete this.edges[n];const r=t.getSource(),l=t.getTarget();if(r!=null&&r.cell){const f=this.outgoings[r.cell],h=f?f.indexOf(n):-1;h>=0&&(f.splice(h,1),f.length===0&&delete this.outgoings[r.cell])}if(l!=null&&l.cell){const f=this.incomings[l.cell],h=f?f.indexOf(n):-1;h>=0&&(f.splice(h,1),f.length===0&&delete this.incomings[l.cell])}}else delete this.nodes[n];e.clear||(e.disconnectEdges?this.disconnectConnectedEdges(t,e):this.removeConnectedEdges(t,e)),t.model===this&&(t.model=null)}onReset(t){this.nodes={},this.edges={},this.outgoings={},this.incomings={},t.forEach(e=>{this.onCellAdded(e)})}onEdgeTerminalChanged(t,e){const n=e==="source"?this.outgoings:this.incomings,r=t.previous(e);if(r!=null&&r.cell){const f=Me.isCell(r.cell)?r.cell.id:r.cell,h=n[f],p=h?h.indexOf(t.id):-1;p>=0&&(h.splice(p,1),h.length===0&&delete n[f])}const l=t.getTerminal(e);if(l!=null&&l.cell){const f=Me.isCell(l.cell)?l.cell.id:l.cell,h=n[f]||[];h.indexOf(t.id)===-1&&h.push(t.id),n[f]=h}}prepareCell(t,e){return!t.model&&(!e||!e.dryrun)&&(t.model=this),t.zIndex==null&&t.setZIndex(this.getMaxZIndex()+1,{silent:!0}),t}resetCells(t,e={}){return t.map(n=>this.prepareCell(n,Object.assign(Object.assign({},e),{dryrun:!0}))),this.collection.reset(t,e),t.map(n=>this.prepareCell(n,{options:e})),this}clear(t={}){const e=this.getCells();if(e.length===0)return this;const n=Object.assign(Object.assign({},t),{clear:!0});return this.batchUpdate("clear",()=>{const r=e.sort((l,f)=>{const h=l.isEdge()?1:2,p=f.isEdge()?1:2;return h-p});for(;r.length>0;){const l=r.shift();l&&l.remove(n)}},n),this}addNode(t,e={}){const n=Li.isNode(t)?t:this.createNode(t);return this.addCell(n,e),n}updateNode(t,e={}){const n=this.createNode(t),r=n.getProp();return n.dispose(),this.updateCell(r,e)}createNode(t){return Li.create(t)}addEdge(t,e={}){const n=xi.isEdge(t)?t:this.createEdge(t);return this.addCell(n,e),n}createEdge(t){return xi.create(t)}updateEdge(t,e={}){const n=this.createEdge(t),r=n.getProp();return n.dispose(),this.updateCell(r,e)}addCell(t,e={}){return Array.isArray(t)?this.addCells(t,e):(!this.collection.has(t)&&!this.addings.has(t)&&(this.addings.set(t,!0),this.collection.add(this.prepareCell(t,e),e),t.eachChild(n=>this.addCell(n,e)),this.addings.delete(t)),this)}addCells(t,e={}){const n=t.length;if(n===0)return this;const r=Object.assign(Object.assign({},e),{position:n-1,maxPosition:n-1});return this.startBatch("add",Object.assign(Object.assign({},r),{cells:t})),t.forEach(l=>{this.addCell(l,r),r.position-=1}),this.stopBatch("add",Object.assign(Object.assign({},r),{cells:t})),this}updateCell(t,e={}){const n=t.id&&this.getCell(t.id);return n?this.batchUpdate("update",()=>(Object.entries(t).forEach(([r,l])=>{n.setProp(r,l,e)}),!0),t):!1}removeCell(t,e={}){const n=typeof t=="string"?this.getCell(t):t;return n&&this.has(n)?this.collection.remove(n,e):null}updateCellId(t,e){if(t.id===e)return;this.startBatch("update",{id:e}),t.prop("id",e);const n=t.clone({keepId:!0});return this.addCell(n),this.getConnectedEdges(t).forEach(l=>{const f=l.getSourceCell(),h=l.getTargetCell();f===t&&l.setSource(Object.assign(Object.assign({},l.getSource()),{cell:e})),h===t&&l.setTarget(Object.assign(Object.assign({},l.getTarget()),{cell:e}))}),this.removeCell(t),this.stopBatch("update",{id:e}),n}removeCells(t,e={}){return t.length?this.batchUpdate("remove",()=>t.map(n=>this.removeCell(n,e))):[]}removeConnectedEdges(t,e={}){const n=this.getConnectedEdges(t);return n.forEach(r=>{r.remove(e)}),n}disconnectConnectedEdges(t,e={}){const n=typeof t=="string"?t:t.id;this.getConnectedEdges(t).forEach(r=>{const l=r.getSourceCellId(),f=r.getTargetCellId();l===n&&r.setSource({x:0,y:0},e),f===n&&r.setTarget({x:0,y:0},e)})}has(t){return this.collection.has(t)}total(){return this.collection.length}indexOf(t){return this.collection.indexOf(t)}getCell(t){return this.collection.get(t)}getCells(){return this.collection.toArray()}getFirstCell(){return this.collection.first()}getLastCell(){return this.collection.last()}getMinZIndex(){const t=this.collection.first();return t&&t.getZIndex()||0}getMaxZIndex(){const t=this.collection.last();return t&&t.getZIndex()||0}getCellsFromCache(t){return t?Object.keys(t).map(e=>this.getCell(e)).filter(e=>e!=null):[]}getNodes(){return this.getCellsFromCache(this.nodes)}getEdges(){return this.getCellsFromCache(this.edges)}getOutgoingEdges(t){const e=typeof t=="string"?t:t.id,n=this.outgoings[e];return n?n.map(r=>this.getCell(r)).filter(r=>r==null?void 0:r.isEdge()):null}getIncomingEdges(t){const e=typeof t=="string"?t:t.id,n=this.incomings[e];return n?n.map(r=>this.getCell(r)).filter(r=>r==null?void 0:r.isEdge()):null}getConnectedEdges(t,e={}){const n=[],r=typeof t=="string"?this.getCell(t):t;if(r==null)return n;const l={},f=e.indirect;let h=e.incoming,p=e.outgoing;h==null&&p==null&&(h=p=!0);const y=(x,S)=>{const w=S?this.getOutgoingEdges(x):this.getIncomingEdges(x);if(w!=null&&w.forEach(T=>{l[T.id]||(n.push(T),l[T.id]=!0,f&&(h&&y(T,!1),p&&y(T,!0)))}),f&&x.isEdge()){const T=S?x.getTargetCell():x.getSourceCell();T!=null&&T.isEdge()&&(l[T.id]||(n.push(T),y(T,S)))}};if(p&&y(r,!0),h&&y(r,!1),e.deep){const x=r.getDescendants({deep:!0}),S={};x.forEach(T=>{T.isNode()&&(S[T.id]=!0)});const w=(T,M)=>{const D=M?this.getOutgoingEdges(T.id):this.getIncomingEdges(T.id);D!=null&&D.forEach(R=>{if(!l[R.id]){const N=R.getSourceCell(),L=R.getTargetCell();if(!e.enclosed&&N&&S[N.id]&&L&&S[L.id])return;n.push(R),l[R.id]=!0}})};x.forEach(T=>{T.isEdge()||(p&&w(T,!0),h&&w(T,!1))})}return n}isBoundary(t,e){const n=typeof t=="string"?this.getCell(t):t,r=e?this.getIncomingEdges(n):this.getOutgoingEdges(n);return r==null||r.length===0}getBoundaryNodes(t){const e=[];return Object.keys(this.nodes).forEach(n=>{if(this.isBoundary(n,t)){const r=this.getCell(n);r&&e.push(r)}}),e}getRoots(){return this.getBoundaryNodes(!0)}getLeafs(){return this.getBoundaryNodes(!1)}isRoot(t){return this.isBoundary(t,!0)}isLeaf(t){return this.isBoundary(t,!1)}getNeighbors(t,e={}){let n=e.incoming,r=e.outgoing;n==null&&r==null&&(n=r=!0);const f=this.getConnectedEdges(t,e).reduce((h,p)=>{const y=p.hasLoop(e),x=p.getSourceCell(),S=p.getTargetCell();return n&&x&&x.isNode()&&!h[x.id]&&(y||x!==t&&(!e.deep||!x.isDescendantOf(t)))&&(h[x.id]=x),r&&S&&S.isNode()&&!h[S.id]&&(y||S!==t&&(!e.deep||!S.isDescendantOf(t)))&&(h[S.id]=S),h},{});if(t.isEdge()){if(n){const h=t.getSourceCell();h!=null&&h.isNode()&&!f[h.id]&&(f[h.id]=h)}if(r){const h=t.getTargetCell();h!=null&&h.isNode()&&!f[h.id]&&(f[h.id]=h)}}return Object.keys(f).map(h=>f[h])}isNeighbor(t,e,n={}){let r=n.incoming,l=n.outgoing;return r==null&&l==null&&(r=l=!0),this.getConnectedEdges(t,n).some(f=>{const h=f.getSourceCell(),p=f.getTargetCell();return!!(r&&h&&h.id===e.id||l&&p&&p.id===e.id)})}getSuccessors(t,e={}){const n=[];return this.search(t,(r,l)=>{r!==t&&this.matchDistance(l,e.distance)&&n.push(r)},Object.assign(Object.assign({},e),{outgoing:!0})),n}isSuccessor(t,e,n={}){let r=!1;return this.search(t,(l,f)=>{if(l===e&&l!==t&&this.matchDistance(f,n.distance))return r=!0,!1},Object.assign(Object.assign({},n),{outgoing:!0})),r}getPredecessors(t,e={}){const n=[];return this.search(t,(r,l)=>{r!==t&&this.matchDistance(l,e.distance)&&n.push(r)},Object.assign(Object.assign({},e),{incoming:!0})),n}isPredecessor(t,e,n={}){let r=!1;return this.search(t,(l,f)=>{if(l===e&&l!==t&&this.matchDistance(f,n.distance))return r=!0,!1},Object.assign(Object.assign({},n),{incoming:!0})),r}matchDistance(t,e){return e==null?!0:typeof e=="function"?e(t):Array.isArray(e)&&e.includes(t)?!0:t===e}getCommonAncestor(...t){const e=[];return t.forEach(n=>{n&&(Array.isArray(n)?e.push(...n):e.push(n))}),Me.getCommonAncestor(...e)}getSubGraph(t,e={}){const n=[],r={},l=[],f=[],h=p=>{r[p.id]||(n.push(p),r[p.id]=p,p.isEdge()&&f.push(p),p.isNode()&&l.push(p))};return t.forEach(p=>{h(p),e.deep&&p.getDescendants({deep:!0}).forEach(x=>{h(x)})}),f.forEach(p=>{const y=p.getSourceCell(),x=p.getTargetCell();y&&!r[y.id]&&(n.push(y),r[y.id]=y,y.isNode()&&l.push(y)),x&&!r[x.id]&&(n.push(x),r[x.id]=x,x.isNode()&&l.push(x))}),l.forEach(p=>{this.getConnectedEdges(p,e).forEach(x=>{const S=x.getSourceCell(),w=x.getTargetCell();!r[x.id]&&S&&r[S.id]&&w&&r[w.id]&&(n.push(x),r[x.id]=x)})}),n}cloneSubGraph(t,e={}){const n=this.getSubGraph(t,e);return this.cloneCells(n)}cloneCells(t){return Me.cloneCells(t)}getNodesFromPoint(t,e){const n=typeof t=="number"?{x:t,y:e||0}:t;return this.getNodes().filter(r=>r.getBBox().containsPoint(n))}getNodesInArea(t,e,n,r,l){const f=typeof t=="number"?new Dt(t,e,n,r):Dt.create(t),h=typeof t=="number"?l:e,p=h==null?void 0:h.strict;return this.getNodes().filter(y=>{const x=y.angle(),S=y.getBBox().bbox(x);return p?f.containsRect(S):f.isIntersectWithRect(S)})}getEdgesInArea(t,e,n,r,l){const f=typeof t=="number"?new Dt(t,e,n,r):Dt.create(t),h=typeof t=="number"?l:e,p=h==null?void 0:h.strict;return this.getEdges().filter(y=>{const x=y.getBBox();return x.width===0?x.inflate(1,0):x.height===0&&x.inflate(0,1),p?f.containsRect(x):f.isIntersectWithRect(x)})}getNodesUnderNode(t,e={}){const n=t.getBBox();return(e.by==null||e.by==="bbox"?this.getNodesInArea(n):this.getNodesFromPoint(n[e.by])).filter(l=>t.id!==l.id&&!l.isDescendantOf(t))}getAllCellsBBox(){return this.getCellsBBox(this.getCells())}getCellsBBox(t,e={}){return Me.getCellsBBox(t,e)}search(t,e,n={}){n.breadthFirst?this.breadthFirstSearch(t,e,n):this.depthFirstSearch(t,e,n)}breadthFirstSearch(t,e,n={}){const r=[],l={},f={};for(r.push(t),f[t.id]=0;r.length>0;){const h=r.shift();if(h==null||l[h.id]||(l[h.id]=!0,Gt(e,this,h,f[h.id])===!1))continue;this.getNeighbors(h,n).forEach(y=>{f[y.id]=f[h.id]+1,r.push(y)})}}depthFirstSearch(t,e,n={}){const r=[],l={},f={};for(r.push(t),f[t.id]=0;r.length>0;){const h=r.pop();if(h==null||l[h.id]||(l[h.id]=!0,Gt(e,this,h,f[h.id])===!1))continue;const p=this.getNeighbors(h,n),y=r.length;p.forEach(x=>{f[x.id]=f[h.id]+1,r.splice(y,0,x)})}}getShortestPath(t,e,n={}){const r={};this.getEdges().forEach(y=>{const x=y.getSourceCellId(),S=y.getTargetCellId();x&&S&&(r[x]||(r[x]=[]),r[S]||(r[S]=[]),r[x].push(S),n.directed||r[S].push(x))});const l=typeof t=="string"?t:t.id,f=gX(r,l,n.weight),h=[];let p=typeof e=="string"?e:e.id;for(f[p]&&h.push(p);f[p];){const y=f[p];h.unshift(y),p=y}return h}translate(t,e,n){return this.getCells().filter(r=>!r.hasParent()).forEach(r=>{r.translate(t,e,n)}),this}resize(t,e,n){return this.resizeCells(t,e,this.getCells(),n)}resizeCells(t,e,n,r={}){const l=this.getCellsBBox(n);if(l){const f=Math.max(t/l.width,0),h=Math.max(e/l.height,0),p=l.getOrigin();n.forEach(y=>{y.scale(f,h,p,r)})}return this}toJSON(t={}){return wo.toJSON(this.getCells(),t)}parseJSON(t){return wo.fromJSON(t)}fromJSON(t,e={}){let n=[];if(!e.diff)n=this.parseJSON(t);else{const r=t,{nodes:l=[],edges:f=[]}=r,h=re(r,["nodes","edges"]),p=l.filter(x=>!this.nodes[x.id])||[],y=f.filter(x=>!this.edges[x.id])||[];n=this.parseJSON(Object.assign(Object.assign({},h),{nodes:p,edges:y}))}return this.resetCells(n,e),this}startBatch(t,e={}){return this.batches[t]=(this.batches[t]||0)+1,this.notify("batch:start",{name:t,data:e}),this}stopBatch(t,e={}){return this.batches[t]=(this.batches[t]||0)-1,this.notify("batch:stop",{name:t,data:e}),this}batchUpdate(t,e,n={}){this.startBatch(t,n);const r=e();return this.stopBatch(t,n),r}hasActiveBatch(t=Object.keys(this.batches)){return(Array.isArray(t)?t:[t]).some(n=>this.batches[n]>0)}dispose(){this.collection.dispose()}}De([Re()],wo.prototype,"dispose",null);const IL={fill:"#ffffff",stroke:"#333333",strokeWidth:2},xF={fontSize:14,fill:"#000000",refX:.5,refY:.5,textAnchor:"middle",textVerticalAnchor:"middle",fontFamily:"Arial, helvetica, sans-serif"};let $b=class extends Li{get label(){return this.getLabel()}set label(t){this.setLabel(t)}getLabel(){return this.getAttrByPath("text/text")}setLabel(t,e){return t==null?this.removeLabel():this.setAttrByPath("text/text",t,e),this}removeLabel(){return this.removeAttrByPath("text/text"),this}};$b.config({attrs:{text:Object.assign({},xF)},propHooks(s){const{label:t}=s,e=re(s,["label"]);return t&&ip(e,"attrs/text/text",t),e},visible:!0});function SF(s,t="body"){return[{tagName:s,selector:t},{tagName:"text",selector:"label"}]}function wF(s="xlink:href"){return e=>{const{imageUrl:n,imageWidth:r,imageHeight:l}=e,f=re(e,["imageUrl","imageWidth","imageHeight"]);if(n!=null||r!=null||l!=null){const h=()=>{if(f.attrs){const p=f.attrs.image;n!=null&&(p[s]=n),r!=null&&(p.width=r),l!=null&&(p.height=l),f.attrs.image=p}};f.attrs?(f.attrs.image==null&&(f.attrs.image={}),h()):(f.attrs={image:{}},h())}return f}}function dp(s,t,e={}){const n={constructorName:s,markup:SF(s,e.selector),attrs:{[s]:Object.assign({},IL)}};return(e.parent||$b).define(Mn(n,t,{shape:s}))}function ZL(s){return typeof s=="string"?s:s.map(t=>Array.isArray(t)?t.join(","):G.isPointLike(t)?`${t.x}, ${t.y}`:"").join(" ")}dp("circle",{attrs:{body:{refCx:"50%",refCy:"50%",refR:"50%"}}});const CF=xi.define({shape:"edge",markup:[{tagName:"path",selector:"wrap",groupSelector:"lines",attrs:{fill:"none",cursor:"pointer",stroke:"transparent",strokeLinecap:"round"}},{tagName:"path",selector:"line",groupSelector:"lines",attrs:{fill:"none",pointerEvents:"none"}}],attrs:{lines:{connection:!0,strokeLinejoin:"round"},wrap:{strokeWidth:10},line:{stroke:"#333",strokeWidth:2,targetMarker:"classic"}}});dp("ellipse",{attrs:{body:{refCx:"50%",refCy:"50%",refRx:"50%",refRy:"50%"}}});class lr extends cp{get options(){return this.graph.options}get model(){return this.graph.model}get view(){return this.graph.view}constructor(t){super(),this.graph=t,this.init()}init(){}}const QL={mousemove:"onMouseMove",touchmove:"onMouseMove",mouseup:"onMouseUp",touchend:"onMouseUp",touchcancel:"onDragEnd"},_h=1<<30,EF=1<<29;class cr extends Ni{constructor(){super(...arguments),this.portsCache={}}static isNodeView(t){if(t==null)return!1;if(t instanceof cr)return!0;const e=t[Symbol.toStringTag],n=t;return(e==null||e===FL)&&typeof n.isNodeView=="function"&&typeof n.isEdgeView=="function"&&typeof n.confirmUpdate=="function"&&typeof n.update=="function"&&typeof n.findPortElem=="function"&&typeof n.resize=="function"&&typeof n.rotate=="function"&&typeof n.translate=="function"}get[Symbol.toStringTag](){return FL}getContainerClassName(){const t=[super.getContainerClassName(),this.prefixClassName("node")];return this.can("nodeMovable")||t.push(this.prefixClassName("node-immovable")),t.join(" ")}updateClassName(t){const e=t.target;if(e.hasAttribute("magnet")){const n=this.prefixClassName("port-unconnectable");this.can("magnetConnectable")?dn(e,n):_t(e,n)}else{const n=this.prefixClassName("node-immovable");this.can("nodeMovable")?this.removeClass(n):this.addClass(n)}}isNodeView(){return!0}confirmUpdate(t,e={}){let n=t;const r=this.hasAction(t,["resize","translate","rotate"]);return this.hasAction(n,"ports")&&(this.removePorts(),this.cleanPortsCache()),this.hasAction(n,"render")?(this.render(),n=this.removeAction(n,["render","update","resize","translate","rotate","ports","tools"])):(n=this.handleAction(n,"resize",()=>this.resize(),"update"),n=this.handleAction(n,"update",()=>this.update(),"ports"),n=this.handleAction(n,"translate",()=>this.translate()),n=this.handleAction(n,"rotate",()=>this.rotate()),n=this.handleAction(n,"ports",()=>this.renderPorts()),n=this.handleAction(n,"tools",()=>{const l=this.cell.getTools()!=null;!r||this.tools==null||!l?this.renderTools():this.updateTools(e)})),n}update(t){this.cleanCache(),this.removePorts();const e=this.cell,n=e.getSize(),r=e.getAttrs();this.updateAttrs(this.container,r,{attrs:t===r?null:t,rootBBox:new Dt(0,0,n.width,n.height),selectors:this.selectors}),this.renderPorts()}renderMarkup(){const t=this.cell.markup;if(t){if(typeof t=="string")throw new TypeError("Not support string markup.");return this.renderJSONMarkup(t)}throw new TypeError("Invalid node markup.")}renderJSONMarkup(t){const e=this.parseJSONMarkup(t,this.container);this.selectors=e.selectors,this.container.appendChild(e.fragment)}render(){return this.empty(),this.renderMarkup(),this.resize(),this.updateTransform(),this.renderTools(),this.notify("view:render",{view:this}),this}resize(){this.cell.getAngle()&&this.rotate(),this.update()}translate(){this.updateTransform()}rotate(){this.updateTransform()}getTranslationString(){const t=this.cell.getPosition();return`translate(${t.x},${t.y})`}getRotationString(){const t=this.cell.getAngle();if(t){const e=this.cell.getSize();return`rotate(${t},${e.width/2},${e.height/2})`}}updateTransform(){let t=this.getTranslationString();const e=this.getRotationString();e&&(t+=` ${e}`),this.container.setAttribute("transform",t)}findPortElem(t,e){const n=t?this.portsCache[t]:null;if(!n)return null;const r=n.portContentElement,l=n.portContentSelectors||{};return this.findOne(e,r,l)}cleanPortsCache(){this.portsCache={}}removePorts(){Object.values(this.portsCache).forEach(t=>{or(t.portElement)})}renderPorts(){const t=this.container,e=[];t.childNodes.forEach(f=>{e.push(f)});const n=this.cell.getParsedPorts(),r=oN(n,"zIndex"),l="auto";r[l]&&r[l].forEach(f=>{const h=this.getPortElement(f);t.append(h),e.push(h)}),Object.keys(r).forEach(f=>{if(f!==l){const h=parseInt(f,10);this.appendPorts(r[f],h,e)}}),this.updatePorts()}appendPorts(t,e,n){const r=t.map(l=>this.getPortElement(l));n[e]||e<0?gb(n[Math.max(e,0)],r):qi(this.container,r)}getPortElement(t){const e=this.portsCache[t.id];return e?e.portElement:this.createPortElement(t)}createPortElement(t){let e=hs.renderMarkup(this.cell.getPortContainerMarkup());const n=e.elem;if(n==null)throw new Error("Invalid port container markup.");e=hs.renderMarkup(this.getPortMarkup(t));const r=e.elem,l=e.selectors;if(r==null)throw new Error("Invalid port markup.");this.setAttrs({port:t.id,"port-group":t.group},r);let f="x6-port";t.group&&(f+=` x6-port-${t.group}`),_t(n,f),_t(n,"x6-port"),_t(r,"x6-port-body"),n.appendChild(r);let h=l,p,y;if(this.existPortLabel(t)){if(e=hs.renderMarkup(this.getPortLabelMarkup(t.label)),p=e.elem,y=e.selectors,p==null)throw new Error("Invalid port label markup.");if(l&&y){for(const S in y)if(l[S]&&S!==this.rootSelector)throw new Error("Selectors within port must be unique.");h=Object.assign(Object.assign({},l),y)}_t(p,"x6-port-label"),n.appendChild(p)}return this.portsCache[t.id]={portElement:n,portSelectors:h,portLabelElement:p,portLabelSelectors:y,portContentElement:r,portContentSelectors:l},this.graph.options.onPortRendered&&this.graph.options.onPortRendered({port:t,node:this.cell,container:n,selectors:h,labelContainer:p,labelSelectors:y,contentContainer:r,contentSelectors:l}),n}updatePorts(){const t=this.cell.getParsedGroups(),e=Object.keys(t);e.length===0?this.updatePortGroup():e.forEach(n=>{this.updatePortGroup(n)})}updatePortGroup(t){const e=Dt.fromSize(this.cell.getSize()),n=this.cell.getPortsLayoutByGroup(t,e);for(let r=0,l=n.length;r<l;r+=1){const f=n[r],h=f.portId,p=this.portsCache[h]||{},y=f.portLayout;if(this.applyPortTransform(p.portElement,y),f.portAttrs!=null){const S={selectors:p.portSelectors||{}};f.portSize&&(S.rootBBox=Dt.fromSize(f.portSize)),this.updateAttrs(p.portElement,f.portAttrs,S)}const x=f.labelLayout;if(x&&p.portLabelElement&&(this.applyPortTransform(p.portLabelElement,x,-(y.angle||0)),x.attrs)){const S={selectors:p.portLabelSelectors||{}};f.labelSize&&(S.rootBBox=Dt.fromSize(f.labelSize)),this.updateAttrs(p.portLabelElement,x.attrs,S)}}}applyPortTransform(t,e,n=0){const r=e.angle,l=e.position,f=Ri().rotate(n).translate(l.x||0,l.y||0).rotate(r||0);sp(t,f,{absolute:!0})}getPortMarkup(t){return t.markup||this.cell.portMarkup}getPortLabelMarkup(t){return t.markup||this.cell.portLabelMarkup}existPortLabel(t){return t.attrs&&t.attrs.text}getEventArgs(t,e,n){const r=this,l=r.cell,f=l;return e==null||n==null?{e:t,view:r,node:l,cell:f}:{e:t,x:e,y:n,view:r,node:l,cell:f}}getPortEventArgs(t,e,n){const r=this,l=r.cell,f=l;return n?{e:t,x:n.x,y:n.y,view:r,node:l,cell:f,port:e}:{e:t,view:r,node:l,cell:f,port:e}}notifyMouseDown(t,e,n){super.onMouseDown(t,e,n),this.notify("node:mousedown",this.getEventArgs(t,e,n))}notifyMouseMove(t,e,n){super.onMouseMove(t,e,n),this.notify("node:mousemove",this.getEventArgs(t,e,n))}notifyMouseUp(t,e,n){super.onMouseUp(t,e,n),this.notify("node:mouseup",this.getEventArgs(t,e,n))}notifyPortEvent(t,e,n){const r=this.findAttr("port",e.target);if(r){const l=e.type;t==="node:port:mouseenter"?e.type="mouseenter":t==="node:port:mouseleave"&&(e.type="mouseleave"),this.notify(t,this.getPortEventArgs(e,r,n)),e.type=l}}onClick(t,e,n){super.onClick(t,e,n),this.notify("node:click",this.getEventArgs(t,e,n)),this.notifyPortEvent("node:port:click",t,{x:e,y:n})}onDblClick(t,e,n){super.onDblClick(t,e,n),this.notify("node:dblclick",this.getEventArgs(t,e,n)),this.notifyPortEvent("node:port:dblclick",t,{x:e,y:n})}onContextMenu(t,e,n){super.onContextMenu(t,e,n),this.notify("node:contextmenu",this.getEventArgs(t,e,n)),this.notifyPortEvent("node:port:contextmenu",t,{x:e,y:n})}onMouseDown(t,e,n){this.isPropagationStopped(t)||(this.notifyMouseDown(t,e,n),this.notifyPortEvent("node:port:mousedown",t,{x:e,y:n}),this.startNodeDragging(t,e,n))}onMouseMove(t,e,n){const r=this.getEventData(t),l=r.action;if(l==="magnet")this.dragMagnet(t,e,n);else{if(l==="move"){const h=r.targetView||this;h.dragNode(t,e,n),h.notify("node:moving",{e:t,x:e,y:n,view:h,cell:h.cell,node:h.cell})}this.notifyMouseMove(t,e,n),this.notifyPortEvent("node:port:mousemove",t,{x:e,y:n})}this.setEventData(t,r)}onMouseUp(t,e,n){const r=this.getEventData(t),l=r.action;l==="magnet"?this.stopMagnetDragging(t,e,n):(this.notifyMouseUp(t,e,n),this.notifyPortEvent("node:port:mouseup",t,{x:e,y:n}),l==="move"&&(r.targetView||this).stopNodeDragging(t,e,n));const f=r.targetMagnet;f&&this.onMagnetClick(t,f,e,n),this.checkMouseleave(t)}onMouseOver(t){super.onMouseOver(t),this.notify("node:mouseover",this.getEventArgs(t)),this.notifyPortEvent("node:port:mouseenter",t),this.notifyPortEvent("node:port:mouseover",t)}onMouseOut(t){super.onMouseOut(t),this.notify("node:mouseout",this.getEventArgs(t)),this.notifyPortEvent("node:port:mouseleave",t),this.notifyPortEvent("node:port:mouseout",t)}onMouseEnter(t){this.updateClassName(t),super.onMouseEnter(t),this.notify("node:mouseenter",this.getEventArgs(t))}onMouseLeave(t){super.onMouseLeave(t),this.notify("node:mouseleave",this.getEventArgs(t))}onMouseWheel(t,e,n,r){super.onMouseWheel(t,e,n,r),this.notify("node:mousewheel",Object.assign({delta:r},this.getEventArgs(t,e,n)))}onMagnetClick(t,e,n,r){const l=this.graph;l.view.getMouseMovedCount(t)>l.options.clickThreshold||this.notify("node:magnet:click",Object.assign({magnet:e},this.getEventArgs(t,n,r)))}onMagnetDblClick(t,e,n,r){this.notify("node:magnet:dblclick",Object.assign({magnet:e},this.getEventArgs(t,n,r)))}onMagnetContextMenu(t,e,n,r){this.notify("node:magnet:contextmenu",Object.assign({magnet:e},this.getEventArgs(t,n,r)))}onMagnetMouseDown(t,e,n,r){this.startMagnetDragging(t,n,r)}onCustomEvent(t,e,n,r){this.notify("node:customevent",Object.assign({name:e},this.getEventArgs(t,n,r))),super.onCustomEvent(t,e,n,r)}prepareEmbedding(t){const e=this.graph,r=this.getEventData(t).cell||this.cell,l=e.findViewByCell(r),f=e.snapToGrid(t.clientX,t.clientY);this.notify("node:embed",{e:t,node:r,view:l,cell:r,x:f.x,y:f.y,currentParent:r.getParent()})}processEmbedding(t,e){const n=e.cell||this.cell,r=e.graph||this.graph,l=r.options.embedding,f=l.findParent;let h=typeof f=="function"?Gt(f,r,{view:this,node:this.cell}).filter(w=>Me.isCell(w)&&this.cell.id!==w.id&&!w.isDescendantOf(this.cell)):r.model.getNodesUnderNode(n,{by:f});if(l.frontOnly&&h.length>0){const w=oN(h,"zIndex"),T=rq(Object.keys(w).map(M=>parseInt(M,10)));T&&(h=w[T])}h=h.filter(w=>w.visible);let p=null;const y=e.candidateEmbedView,x=l.validate;for(let w=h.length-1;w>=0;w-=1){const T=h[w];if(y&&y.cell.id===T.id){p=y;break}else{const M=T.findView(r);if(x&&Gt(x,r,{child:this.cell,parent:M.cell,childView:this,parentView:M})){p=M;break}}}this.clearEmbedding(e),p&&p.highlight(null,{type:"embedding"}),e.candidateEmbedView=p;const S=r.snapToGrid(t.clientX,t.clientY);this.notify("node:embedding",{e:t,cell:n,node:n,view:r.findViewByCell(n),x:S.x,y:S.y,currentParent:n.getParent(),candidateParent:p?p.cell:null})}clearEmbedding(t){const e=t.candidateEmbedView;e&&(e.unhighlight(null,{type:"embedding"}),t.candidateEmbedView=null)}finalizeEmbedding(t,e){this.graph.startBatch("embedding");const n=e.cell||this.cell,r=e.graph||this.graph,l=r.findViewByCell(n),f=n.getParent(),h=e.candidateEmbedView;if(h?(h.unhighlight(null,{type:"embedding"}),e.candidateEmbedView=null,(f==null||f.id!==h.cell.id)&&h.cell.insertChild(n,void 0,{ui:!0})):f&&f.unembed(n,{ui:!0}),r.model.getConnectedEdges(n,{deep:!0}).forEach(p=>{p.updateParent({ui:!0})}),l&&h){const p=r.snapToGrid(t.clientX,t.clientY);l.notify("node:embedded",{e:t,cell:n,x:p.x,y:p.y,node:n,view:r.findViewByCell(n),previousParent:f,currentParent:n.getParent()})}this.graph.stopBatch("embedding")}getDelegatedView(){let t=this.cell,e=this;for(;e&&!t.isEdge();){if(!t.hasParent()||e.can("stopDelegateOnDragging"))return e;t=t.getParent(),e=this.graph.findViewByCell(t)}return null}validateMagnet(t,e,n){if(e.getAttribute("magnet")!=="passive"){const r=this.graph.options.connecting.validateMagnet;return r?Gt(r,this.graph,{e:n,magnet:e,view:t,cell:t.cell}):!0}return!1}startMagnetDragging(t,e,n){if(!this.can("magnetConnectable"))return;t.stopPropagation();const r=t.currentTarget,l=this.graph;this.setEventData(t,{targetMagnet:r}),this.validateMagnet(this,r,t)?(l.options.magnetThreshold<=0&&this.startConnectting(t,r,e,n),this.setEventData(t,{action:"magnet"}),this.stopPropagation(t)):this.onMouseDown(t,e,n),l.view.delegateDragEvents(t,this)}startConnectting(t,e,n,r){this.graph.model.startBatch("add-edge");const l=this.createEdgeFromMagnet(e,n,r);l.setEventData(t,l.prepareArrowheadDragging("target",{x:n,y:r,isNewEdge:!0,fallbackAction:"remove"})),this.setEventData(t,{edgeView:l}),l.notifyMouseDown(t,n,r)}getDefaultEdge(t,e){let n;const r=this.graph.options.connecting.createEdge;return r&&(n=Gt(r,this.graph,{sourceMagnet:e,sourceView:t,sourceCell:t.cell})),n}createEdgeFromMagnet(t,e,n){const r=this.graph,l=r.model,f=this.getDefaultEdge(this,t);return f.setSource(Object.assign(Object.assign({},f.getSource()),this.getEdgeTerminal(t,e,n,f,"source"))),f.setTarget(Object.assign(Object.assign({},f.getTarget()),{x:e,y:n})),f.addTo(l,{async:!1,ui:!0}),f.findView(r)}dragMagnet(t,e,n){const r=this.getEventData(t),l=r.edgeView;if(l)l.onMouseMove(t,e,n),this.autoScrollGraph(t.clientX,t.clientY);else{const f=this.graph,h=f.options.magnetThreshold,p=this.getEventTarget(t),y=r.targetMagnet;if(h==="onleave"){if(y===p||y.contains(p))return}else if(f.view.getMouseMovedCount(t)<=h)return;this.startConnectting(t,y,e,n)}}stopMagnetDragging(t,e,n){const l=this.eventData(t).edgeView;l&&(l.onMouseUp(t,e,n),this.graph.model.stopBatch("add-edge"))}notifyUnhandledMouseDown(t,e,n){this.notify("node:unhandled:mousedown",{e:t,x:e,y:n,view:this,cell:this.cell,node:this.cell})}notifyNodeMove(t,e,n,r,l){let f=[l];const h=this.graph.getPlugin("selection");if(h&&h.isSelectionMovable()){const p=h.getSelectedCells();p.includes(l)&&(f=p.filter(y=>y.isNode()))}f.forEach(p=>{this.notify(t,{e,x:n,y:r,cell:p,node:p,view:p.findView(this.graph)})})}getRestrictArea(t){const e=this.graph.options.translating.restrict,n=typeof e=="function"?Gt(e,this.graph,t):e;return typeof n=="number"?this.graph.transform.getGraphArea().inflate(n):n===!0?this.graph.transform.getGraphArea():n||null}startNodeDragging(t,e,n){const r=this.getDelegatedView();if(r==null||!r.can("nodeMovable"))return this.notifyUnhandledMouseDown(t,e,n);this.setEventData(t,{targetView:r,action:"move"});const l=G.create(r.cell.getPosition());r.setEventData(t,{moving:!1,offset:l.diff(e,n),restrict:this.getRestrictArea(r)})}dragNode(t,e,n){const r=this.cell,l=this.graph,f=l.getGridSize(),h=this.getEventData(t),p=h.offset,y=h.restrict;h.moving||(h.moving=!0,this.addClass("node-moving"),this.notifyNodeMove("node:move",t,e,n,this.cell)),this.autoScrollGraph(t.clientX,t.clientY);const x=ha(e+p.x,f),S=ha(n+p.y,f);r.setPosition(x,S,{restrict:y,deep:!0,ui:!0}),l.options.embedding.enabled&&(h.embedding||(this.prepareEmbedding(t),h.embedding=!0),this.processEmbedding(t,h))}autoOffsetNode(){const t=this.cell,e=this.graph,n=Object.assign({id:t.id},t.getPosition()),l=e.getNodes().map(y=>{const x=y.getPosition();return{id:y.id,x:x.x,y:x.y}}).filter(y=>y.id!==n.id),f=[[1,1],[1,-1],[-1,1],[-1,-1]];let h=e.getGridSize();const p=y=>l.some(x=>x.x===y.x&&x.y===y.y);for(;p(n);){let y=!1;for(let x=0;x<f.length;x+=1){const S=f[x],w={x:n.x+S[0]*h,y:n.y+S[1]*h};if(!p(w)){t.translate(S[0]*h,S[1]*h),y=!0;break}}if(y)break;h+=e.getGridSize()}}stopNodeDragging(t,e,n){const r=this.getEventData(t),l=this.graph;r.embedding&&this.finalizeEmbedding(t,r),r.moving&&(l.options.translating.autoOffset&&this.autoOffsetNode(),this.removeClass("node-moving"),this.notifyNodeMove("node:moved",t,e,n,this.cell)),r.moving=!1,r.embedding=!1}autoScrollGraph(t,e){const n=this.graph.getPlugin("scroller");n&&n.autoScroll(t,e)}}const FL=`X6.${cr.name}`;cr.config({isSvgElement:!0,priority:0,bootstrap:["render"],actions:{view:["render"],markup:["render"],attrs:["update"],size:["resize","ports","tools"],angle:["rotate","tools"],position:["translate","tools"],ports:["ports"],tools:["tools"]}}),cr.registry.register("node",cr,!0);class Pu extends Ni{constructor(){super(...arguments),this.POINT_ROUNDING=2,this.labelDestroyFn={}}static isEdgeView(t){if(t==null)return!1;if(t instanceof Pu)return!0;const e=t[Symbol.toStringTag],n=t;return(e==null||e===JL)&&typeof n.isNodeView=="function"&&typeof n.isEdgeView=="function"&&typeof n.confirmUpdate=="function"&&typeof n.update=="function"&&typeof n.getConnection=="function"}get[Symbol.toStringTag](){return JL}getContainerClassName(){return[super.getContainerClassName(),this.prefixClassName("edge")].join(" ")}get sourceBBox(){const t=this.sourceView;if(!t||!this.graph.renderer.isViewMounted(t)){const n=this.cell.getSourceCell();if(n)return n.getBBox();const r=this.cell.getSourcePoint();return new Dt(r.x,r.y)}const e=this.sourceMagnet;return t.isEdgeElement(e)?new Dt(this.sourceAnchor.x,this.sourceAnchor.y):t.getBBoxOfElement(e||t.container)}get targetBBox(){const t=this.targetView;if(!t||!this.graph.renderer.isViewMounted(t)){const n=this.cell.getTargetCell();if(n)return n.getBBox();const r=this.cell.getTargetPoint();return new Dt(r.x,r.y)}const e=this.targetMagnet;return t.isEdgeElement(e)?new Dt(this.targetAnchor.x,this.targetAnchor.y):t.getBBoxOfElement(e||t.container)}isEdgeView(){return!0}confirmUpdate(t,e={}){let n=t;if(this.hasAction(n,"source")){if(!this.updateTerminalProperties("source"))return n;n=this.removeAction(n,"source")}if(this.hasAction(n,"target")){if(!this.updateTerminalProperties("target"))return n;n=this.removeAction(n,"target")}return this.hasAction(n,"render")?(this.render(),n=this.removeAction(n,["render","update","labels","tools"]),n):(n=this.handleAction(n,"update",()=>this.update(e)),n=this.handleAction(n,"labels",()=>this.onLabelsChange(e)),n=this.handleAction(n,"tools",()=>this.renderTools()),n)}render(){return this.empty(),this.renderMarkup(),this.labelContainer=null,this.renderLabels(),this.update(),this.renderTools(),this.notify("view:render",{view:this}),this}renderMarkup(){const t=this.cell.markup;if(t){if(typeof t=="string")throw new TypeError("Not support string markup.");return this.renderJSONMarkup(t)}throw new TypeError("Invalid edge markup.")}renderJSONMarkup(t){const e=this.parseJSONMarkup(t,this.container);this.selectors=e.selectors,this.container.append(e.fragment)}customizeLabels(){if(this.labelContainer){const t=this.cell,e=t.labels;for(let n=0,r=e.length;n<r;n+=1){const l=e[n],f=this.labelCache[n],h=this.labelSelectors[n],p=this.graph.options.onEdgeLabelRendered;if(p){const y=p({edge:t,label:l,container:f,selectors:h});y&&(this.labelDestroyFn[n]=y)}}}}destroyCustomizeLabels(){const t=this.cell.labels;if(this.labelCache&&this.labelSelectors&&this.labelDestroyFn)for(let e=0,n=t.length;e<n;e+=1){const r=this.labelDestroyFn[e],l=this.labelCache[e],f=this.labelSelectors[e];r&&l&&f&&r({edge:this.cell,label:t[e],container:l,selectors:f})}this.labelDestroyFn={}}renderLabels(){const t=this.cell,e=t.getLabels(),n=e.length;let r=this.labelContainer;if(this.labelCache={},this.labelSelectors={},n<=0)return r!=null&&r.parentNode&&r.parentNode.removeChild(r),this;r?this.empty(r):(r=ga("g"),this.addClass(this.prefixClassName("edge-labels"),r),this.labelContainer=r);for(let l=0,f=e.length;l<f;l+=1){const h=e[l],p=this.normalizeLabelMarkup(this.parseLabelMarkup(h.markup));let y,x;if(p)y=p.node,x=p.selectors;else{const w=t.getDefaultLabel(),T=this.normalizeLabelMarkup(this.parseLabelMarkup(w.markup));y=T.node,x=T.selectors}y.setAttribute("data-index",`${l}`),r.appendChild(y);const S=this.rootSelector;if(x[S])throw new Error("Ambiguous label root selector.");x[S]=y,this.labelCache[l]=y,this.labelSelectors[l]=x}return r.parentNode==null&&this.container.appendChild(r),this.updateLabels(),this.customizeLabels(),this}onLabelsChange(t={}){this.destroyCustomizeLabels(),this.shouldRerenderLabels(t)?this.renderLabels():this.updateLabels(),this.updateLabelPositions()}shouldRerenderLabels(t={}){const e=this.cell.previous("labels");if(e==null)return!0;if("propertyPathArray"in t&&"propertyValue"in t){const n=t.propertyPathArray||[],r=n.length;if(r>1){const l=n[1];if(e[l]){if(r===2)return typeof t.propertyValue=="object"&&I1(t.propertyValue,"markup");if(n[2]!=="markup")return!1}}}return!0}parseLabelMarkup(t){return t?typeof t=="string"?this.parseLabelStringMarkup(t):this.parseJSONMarkup(t):null}parseLabelStringMarkup(t){const e=Xt.createVectors(t),n=document.createDocumentFragment();for(let r=0,l=e.length;r<l;r+=1){const f=e[r].node;n.appendChild(f)}return{fragment:n,selectors:{}}}normalizeLabelMarkup(t){if(t==null)return;const e=t.fragment;if(!(e instanceof DocumentFragment)||!e.hasChildNodes())throw new Error("Invalid label markup.");let n;const r=e.childNodes;return r.length>1||r[0].nodeName.toUpperCase()!=="G"?n=Xt.create("g").append(e):n=Xt.create(r[0]),n.addClass(this.prefixClassName("edge-label")),{node:n.node,selectors:t.selectors}}updateLabels(){if(this.labelContainer){const t=this.cell,e=t.labels,n=this.can("edgeLabelMovable"),r=t.getDefaultLabel();for(let l=0,f=e.length;l<f;l+=1){const h=this.labelCache[l],p=this.labelSelectors[l];h.setAttribute("cursor",n?"move":"default");const y=e[l],x=Mn({},r.attrs,y.attrs);this.updateAttrs(h,x,{selectors:p,rootBBox:y.size?Dt.fromSize(y.size):void 0})}}}renderTools(){const t=this.cell.getTools();return this.addTools(t),this}update(t={}){var e;this.cleanCache(),this.updateConnection(t);const n=this.cell.getAttrs(),{text:r}=n,l=re(n,["text"]);if(l!=null){if(((e=this.container)===null||e===void 0?void 0:e.tagName)==="g"&&this.isEdgeElement(this.container)&&Nq){const f=this.container.parentNode;if(f){const h=this.container.nextSibling;f.removeChild(this.container),f.insertBefore(this.container,h)}}this.updateAttrs(this.container,l,{selectors:this.selectors})}return this.updateLabelPositions(),this.updateTools(t),this}removeRedundantLinearVertices(t={}){const e=this.cell,n=e.getVertices(),r=[this.sourceAnchor,...n,this.targetAnchor],l=r.length,f=new Oi(r);f.simplify({threshold:.01});const h=f.points.map(y=>y.toJSON()),p=h.length;return l===p?0:(e.setVertices(h.slice(1,p-1),t),l-p)}getTerminalView(t){switch(t){case"source":return this.sourceView||null;case"target":return this.targetView||null;default:throw new Error(`Unknown terminal type '${t}'`)}}getTerminalAnchor(t){switch(t){case"source":return G.create(this.sourceAnchor);case"target":return G.create(this.targetAnchor);default:throw new Error(`Unknown terminal type '${t}'`)}}getTerminalConnectionPoint(t){switch(t){case"source":return G.create(this.sourcePoint);case"target":return G.create(this.targetPoint);default:throw new Error(`Unknown terminal type '${t}'`)}}getTerminalMagnet(t,e={}){switch(t){case"source":{if(e.raw)return this.sourceMagnet;const n=this.sourceView;return n?this.sourceMagnet||n.container:null}case"target":{if(e.raw)return this.targetMagnet;const n=this.targetView;return n?this.targetMagnet||n.container:null}default:throw new Error(`Unknown terminal type '${t}'`)}}updateConnection(t={}){const e=this.cell;if(t.translateBy&&e.isFragmentDescendantOf(t.translateBy)){const n=t.tx||0,r=t.ty||0;this.routePoints=new Oi(this.routePoints).translate(n,r).points,this.translateConnectionPoints(n,r),this.path.translate(n,r)}else{const n=e.getVertices(),r=this.findAnchors(n);this.sourceAnchor=r.source,this.targetAnchor=r.target,this.routePoints=this.findRoutePoints(n);const l=this.findConnectionPoints(this.routePoints,this.sourceAnchor,this.targetAnchor);this.sourcePoint=l.source,this.targetPoint=l.target;const f=this.findMarkerPoints(this.routePoints,this.sourcePoint,this.targetPoint);this.path=this.findPath(this.routePoints,f.source||this.sourcePoint,f.target||this.targetPoint)}this.cleanCache()}findAnchors(t){const e=this.cell,n=e.source,r=e.target,l=t[0],f=t[t.length-1];return r.priority&&!n.priority?this.findAnchorsOrdered("target",f,"source",l):this.findAnchorsOrdered("source",l,"target",f)}findAnchorsOrdered(t,e,n,r){let l,f;const h=this.cell,p=h[t],y=h[n],x=this.getTerminalView(t),S=this.getTerminalView(n),w=this.getTerminalMagnet(t),T=this.getTerminalMagnet(n);if(x){let M;e?M=G.create(e):S?M=T:M=G.create(y),l=this.getAnchor(p.anchor,x,w,M,t)}else l=G.create(p);if(S){const M=G.create(r||l);f=this.getAnchor(y.anchor,S,T,M,n)}else f=G.isPointLike(y)?G.create(y):new G;return{[t]:l,[n]:f}}getAnchor(t,e,n,r,l){const f=e.isEdgeElement(n),h=this.graph.options.connecting;let p=typeof t=="string"?{name:t}:t;if(!p){const S=f?(l==="source"?h.sourceEdgeAnchor:h.targetEdgeAnchor)||h.edgeAnchor:(l==="source"?h.sourceAnchor:h.targetAnchor)||h.anchor;p=typeof S=="string"?{name:S}:S}if(!p)throw new Error("Anchor should be specified.");let y;const x=p.name;if(f){const S=Ob.get(x);if(typeof S!="function")return Ob.onNotFound(x);y=Gt(S,this,e,n,r,p.args||{},l)}else{const S=Nb.get(x);if(typeof S!="function")return Nb.onNotFound(x);y=Gt(S,this,e,n,r,p.args||{},l)}return y?y.round(this.POINT_ROUNDING):new G}findRoutePoints(t=[]){const e=this.graph.options.connecting.router||ST.normal,n=this.cell.getRouter()||e;let r;if(typeof n=="function")r=Gt(n,this,t,{},this);else{const l=typeof n=="string"?n:n.name,f=typeof n=="string"?{}:n.args||{},h=l?hp.get(l):ST.normal;if(typeof h!="function")return hp.onNotFound(l);r=Gt(h,this,t,f,this)}return r==null?t.map(l=>G.create(l)):r.map(l=>G.create(l))}findConnectionPoints(t,e,n){const r=this.cell,l=this.graph.options.connecting,f=r.getSource(),h=r.getTarget(),p=this.sourceView,y=this.targetView,x=t[0],S=t[t.length-1];let w;if(p&&!p.isEdgeElement(this.sourceMagnet)){const M=this.sourceMagnet||p.container,D=x||n,R=new Pt(D,e),N=f.connectionPoint||l.sourceConnectionPoint||l.connectionPoint;w=this.getConnectionPoint(N,p,M,R,"source")}else w=e;let T;if(y&&!y.isEdgeElement(this.targetMagnet)){const M=this.targetMagnet||y.container,D=h.connectionPoint||l.targetConnectionPoint||l.connectionPoint,R=S||e,N=new Pt(R,n);T=this.getConnectionPoint(D,y,M,N,"target")}else T=n;return{source:w,target:T}}getConnectionPoint(t,e,n,r,l){const f=r.end;if(t==null)return f;const h=typeof t=="string"?t:t.name,p=typeof t=="string"?{}:t.args,y=Ab.get(h);if(typeof y!="function")return Ab.onNotFound(h);const x=Gt(y,this,r,e,n,p||{},l);return x?x.round(this.POINT_ROUNDING):f}findMarkerPoints(t,e,n){const r=S=>{const w=this.cell.getAttrs(),T=Object.keys(w);for(let M=0,D=T.length;M<D;M+=1){const R=w[T[M]];if(R[`${S}Marker`]||R[`${S}-marker`]){const N=R.strokeWidth||R["stroke-width"];if(N)return parseFloat(N);break}}return null},l=t[0],f=t[t.length-1];let h,p;const y=r("source");y&&(h=e.clone().move(l||n,-y));const x=r("target");return x&&(p=n.clone().move(f||e,-x)),this.sourceMarkerPoint=h||e.clone(),this.targetMarkerPoint=p||n.clone(),{source:h,target:p}}findPath(t,e,n){const r=this.cell.getConnector()||this.graph.options.connecting.connector;let l,f,h;if(typeof r=="string"?l=r:(l=r.name,f=r.args),l){const y=Mb.get(l);if(typeof y!="function")return Mb.onNotFound(l);h=y}else h=q3.normal;const p=Gt(h,this,e,n,t,Object.assign(Object.assign({},f),{raw:!0}),this);return typeof p=="string"?Ft.parse(p):p}translateConnectionPoints(t,e){this.sourcePoint.translate(t,e),this.targetPoint.translate(t,e),this.sourceAnchor.translate(t,e),this.targetAnchor.translate(t,e),this.sourceMarkerPoint.translate(t,e),this.targetMarkerPoint.translate(t,e)}updateLabelPositions(){if(this.labelContainer==null)return this;if(!this.path)return this;const e=this.cell,n=e.getLabels();if(n.length===0)return this;const r=e.getDefaultLabel(),l=this.normalizeLabelPosition(r.position);for(let f=0,h=n.length;f<h;f+=1){const p=n[f],y=this.labelCache[f];if(!y)continue;const x=this.normalizeLabelPosition(p.position),S=Mn({},l,x),w=this.getLabelTransformationMatrix(S);y.setAttribute("transform",bb(w))}return this}updateTerminalProperties(t){const e=this.cell,n=this.graph,r=e[t],l=r&&r.cell,f=`${t}View`;if(!l)return this[f]=null,this.updateTerminalMagnet(t),!0;const h=n.getCellById(l);if(!h)throw new Error(`Edge's ${t} node with id "${l}" not exists`);const p=h.findView(n);return p?(this[f]=p,this.updateTerminalMagnet(t),!0):!1}updateTerminalMagnet(t){const e=`${t}Magnet`,n=this.getTerminalView(t);if(n){let r=n.getMagnetFromEdgeTerminal(this.cell[t]);r===n.container&&(r=null),this[e]=r}else this[e]=null}getLabelPositionAngle(t){const e=this.cell.getLabelAt(t);return e&&e.position&&typeof e.position=="object"&&e.position.angle||0}getLabelPositionArgs(t){const e=this.cell.getLabelAt(t);if(e&&e.position&&typeof e.position=="object")return e.position.options}getDefaultLabelPositionArgs(){const t=this.cell.getDefaultLabel();if(t&&t.position&&typeof t.position=="object")return t.position.options}mergeLabelPositionArgs(t,e){return t===null?null:t===void 0?e===null?null:e:Mn({},e,t)}getConnection(){return this.path!=null?this.path.clone():null}getConnectionPathData(){if(this.path==null)return"";const t=this.cache.pathCache;return I1(t,"data")||(t.data=this.path.serialize()),t.data||""}getConnectionSubdivisions(){if(this.path==null)return null;const t=this.cache.pathCache;return I1(t,"segmentSubdivisions")||(t.segmentSubdivisions=this.path.getSegmentSubdivisions()),t.segmentSubdivisions}getConnectionLength(){if(this.path==null)return 0;const t=this.cache.pathCache;return I1(t,"length")||(t.length=this.path.length({segmentSubdivisions:this.getConnectionSubdivisions()})),t.length}getPointAtLength(t){return this.path==null?null:this.path.pointAtLength(t,{segmentSubdivisions:this.getConnectionSubdivisions()})}getPointAtRatio(t){return this.path==null?null:(ic(t)&&(t=parseFloat(t)/100),this.path.pointAt(t,{segmentSubdivisions:this.getConnectionSubdivisions()}))}getTangentAtLength(t){return this.path==null?null:this.path.tangentAtLength(t,{segmentSubdivisions:this.getConnectionSubdivisions()})}getTangentAtRatio(t){return this.path==null?null:this.path.tangentAt(t,{segmentSubdivisions:this.getConnectionSubdivisions()})}getClosestPoint(t){return this.path==null?null:this.path.closestPoint(t,{segmentSubdivisions:this.getConnectionSubdivisions()})}getClosestPointLength(t){return this.path==null?null:this.path.closestPointLength(t,{segmentSubdivisions:this.getConnectionSubdivisions()})}getClosestPointRatio(t){return this.path==null?null:this.path.closestPointNormalizedLength(t,{segmentSubdivisions:this.getConnectionSubdivisions()})}getLabelPosition(t,e,n,r){var l;const f={distance:0};let h=0,p;typeof n=="number"?(h=n,p=r):p=n,p!=null&&(f.options=p);const y=p==null?void 0:p.absoluteOffset,x=!(p!=null&&p.absoluteDistance),S=(p==null?void 0:p.absoluteDistance)&&p.reverseDistance,w=this.path,T={segmentSubdivisions:this.getConnectionSubdivisions()},M=new G(t,e),D=(l=w.closestPointT(M,T))!==null&&l!==void 0?l:0,R=this.getConnectionLength()||0;let N=w.lengthAtT(D,T);x&&(N=R>0?N/R:0),S&&(N=-1*(R-N)||1),f.distance=N;let L;y||(L=w.tangentAtT(D));let _;if(L)_=L.pointOffset(M);else{const U=w.pointAtT(D);if(U){const $=M.diff(U);_={x:$.x,y:$.y}}else _={x:0,y:0}}return f.offset=_,f.angle=h,f}normalizeLabelPosition(t){return typeof t=="number"?{distance:t}:t}getLabelTransformationMatrix(t){const e=this.normalizeLabelPosition(t),n=e.options||{},r=e.angle||0,l=e.distance,f=l>0&&l<=1;let h=0;const p={x:0,y:0},y=e.offset;y&&(typeof y=="number"?h=y:(y.x!=null&&(p.x=y.x),y.y!=null&&(p.y=y.y)));const x=p.x!==0||p.y!==0||h===0,S=n.keepGradient,w=n.ensureLegibility,T=this.path,M={segmentSubdivisions:this.getConnectionSubdivisions()},D=f?l*(this.getConnectionLength()||0):l,R=T.tangentAtLength(D,M);let N,L=r;if(R){if(x)N=R.start,N.translate(p);else{const _=R.clone();_.rotate(-90,R.start),_.setLength(h),N=_.end}S&&(L=R.angle()+r,w&&(L=Es((L+90)%180-90)))}else N=T.pointAtLength(0,M)||new G,x&&N.translate(p);return Ri().translate(N.x,N.y).rotate(L)}getVertexIndex(t,e){const r=this.cell.getVertices(),l=this.getClosestPointLength(new G(t,e));let f=0;if(l!=null)for(const h=r.length;f<h;f+=1){const p=r[f],y=this.getClosestPointLength(p);if(y!=null&&l<y)break}return f}getEventArgs(t,e,n){const r=this,l=r.cell,f=l;return e==null||n==null?{e:t,view:r,edge:l,cell:f}:{e:t,x:e,y:n,view:r,edge:l,cell:f}}notifyUnhandledMouseDown(t,e,n){this.notify("edge:unhandled:mousedown",{e:t,x:e,y:n,view:this,cell:this.cell,edge:this.cell})}notifyMouseDown(t,e,n){super.onMouseDown(t,e,n),this.notify("edge:mousedown",this.getEventArgs(t,e,n))}notifyMouseMove(t,e,n){super.onMouseMove(t,e,n),this.notify("edge:mousemove",this.getEventArgs(t,e,n))}notifyMouseUp(t,e,n){super.onMouseUp(t,e,n),this.notify("edge:mouseup",this.getEventArgs(t,e,n))}onClick(t,e,n){super.onClick(t,e,n),this.notify("edge:click",this.getEventArgs(t,e,n))}onDblClick(t,e,n){super.onDblClick(t,e,n),this.notify("edge:dblclick",this.getEventArgs(t,e,n))}onContextMenu(t,e,n){super.onContextMenu(t,e,n),this.notify("edge:contextmenu",this.getEventArgs(t,e,n))}onMouseDown(t,e,n){this.notifyMouseDown(t,e,n),this.startEdgeDragging(t,e,n)}onMouseMove(t,e,n){const r=this.getEventData(t);switch(r.action){case"drag-label":{this.dragLabel(t,e,n);break}case"drag-arrowhead":{this.dragArrowhead(t,e,n);break}case"drag-edge":{this.dragEdge(t,e,n);break}}return this.notifyMouseMove(t,e,n),r}onMouseUp(t,e,n){const r=this.getEventData(t);switch(r.action){case"drag-label":{this.stopLabelDragging(t,e,n);break}case"drag-arrowhead":{this.stopArrowheadDragging(t,e,n);break}case"drag-edge":{this.stopEdgeDragging(t,e,n);break}}return this.notifyMouseUp(t,e,n),this.checkMouseleave(t),r}onMouseOver(t){super.onMouseOver(t),this.notify("edge:mouseover",this.getEventArgs(t))}onMouseOut(t){super.onMouseOut(t),this.notify("edge:mouseout",this.getEventArgs(t))}onMouseEnter(t){super.onMouseEnter(t),this.notify("edge:mouseenter",this.getEventArgs(t))}onMouseLeave(t){super.onMouseLeave(t),this.notify("edge:mouseleave",this.getEventArgs(t))}onMouseWheel(t,e,n,r){super.onMouseWheel(t,e,n,r),this.notify("edge:mousewheel",Object.assign({delta:r},this.getEventArgs(t,e,n)))}onCustomEvent(t,e,n,r){if(zN(t.target,"edge-tool",this.container)){if(t.stopPropagation(),this.can("useEdgeTools")){if(e==="edge:remove"){this.cell.remove({ui:!0});return}this.notify("edge:customevent",Object.assign({name:e},this.getEventArgs(t,n,r)))}this.notifyMouseDown(t,n,r)}else this.notify("edge:customevent",Object.assign({name:e},this.getEventArgs(t,n,r))),super.onCustomEvent(t,e,n,r)}onLabelMouseDown(t,e,n){this.notifyMouseDown(t,e,n),this.startLabelDragging(t,e,n),this.getEventData(t).stopPropagation&&t.stopPropagation()}startEdgeDragging(t,e,n){if(!this.can("edgeMovable")){this.notifyUnhandledMouseDown(t,e,n);return}this.setEventData(t,{x:e,y:n,moving:!1,action:"drag-edge"})}dragEdge(t,e,n){const r=this.getEventData(t);r.moving||(r.moving=!0,this.addClass("edge-moving"),this.notify("edge:move",{e:t,x:e,y:n,view:this,cell:this.cell,edge:this.cell})),this.cell.translate(e-r.x,n-r.y,{ui:!0}),this.setEventData(t,{x:e,y:n}),this.notify("edge:moving",{e:t,x:e,y:n,view:this,cell:this.cell,edge:this.cell})}stopEdgeDragging(t,e,n){const r=this.getEventData(t);r.moving&&(this.removeClass("edge-moving"),this.notify("edge:moved",{e:t,x:e,y:n,view:this,cell:this.cell,edge:this.cell})),r.moving=!1}prepareArrowheadDragging(t,e){const n=this.getTerminalMagnet(t),r={action:"drag-arrowhead",x:e.x,y:e.y,isNewEdge:e.isNewEdge===!0,terminalType:t,initialMagnet:n,initialTerminal:EA(this.cell[t]),fallbackAction:e.fallbackAction||"revert",getValidateConnectionArgs:this.createValidateConnectionArgs(t),options:e.options};return this.beforeArrowheadDragging(r),r}createValidateConnectionArgs(t){const e=[void 0,void 0,void 0,void 0,t,this];let n,r=0,l=0;t==="source"?(r=2,n="target"):(l=2,n="source");const f=this.cell[n],h=f.cell;if(h){let p;const y=this.graph.findViewByCell(h);e[r]=y,y&&(p=y.getMagnetFromEdgeTerminal(f),p===y.container&&(p=void 0)),e[r+1]=p}return(p,y)=>(e[l]=p,e[l+1]=p.container===y?void 0:y,e)}beforeArrowheadDragging(t){t.zIndex=this.cell.zIndex,this.cell.toFront();const e=this.container.style;t.pointerEvents=e.pointerEvents,e.pointerEvents="none",this.graph.options.connecting.highlight&&this.highlightAvailableMagnets(t)}afterArrowheadDragging(t){t.zIndex!=null&&(this.cell.setZIndex(t.zIndex,{ui:!0}),t.zIndex=null);const e=this.container;e.style.pointerEvents=t.pointerEvents||"",this.graph.options.connecting.highlight&&this.unhighlightAvailableMagnets(t)}validateConnection(t,e,n,r,l,f,h){const p=this.graph.options.connecting,y=p.allowLoop,x=p.allowNode,S=p.allowEdge,w=p.allowPort,T=p.allowMulti,M=p.validateConnection,D=f?f.cell:null,R=l==="target"?n:t,N=l==="target"?r:e;let L=!0;const _=U=>{const $=l==="source"?h?h.port:null:D?D.getSourcePortId():null,Y=l==="target"?h?h.port:null:D?D.getTargetPortId():null;return Gt(U,this.graph,{edge:D,edgeView:f,sourceView:t,targetView:n,sourcePort:$,targetPort:Y,sourceMagnet:e,targetMagnet:r,sourceCell:t?t.cell:null,targetCell:n?n.cell:null,type:l})};if(y!=null&&t!=null&&t===n&&(typeof y=="boolean"?y||(L=!1):L=_(y)),L&&w!=null&&(typeof w=="boolean"?!w&&N&&(L=!1):L=_(w)),L&&S!=null&&(typeof S=="boolean"?!S&&Pu.isEdgeView(R)&&(L=!1):L=_(S)),L&&x!=null&&N==null&&(typeof x=="boolean"?!x&&cr.isNodeView(R)&&(L=!1):L=_(x)),L&&T!=null&&f){const U=f.cell,$=l==="source"?h:U.getSource(),Y=l==="target"?h:U.getTarget(),k=h?this.graph.getCellById(h.cell):null;if($&&Y&&$.cell&&Y.cell&&k)if(typeof T=="function")L=_(T);else{const H=this.graph.model.getConnectedEdges(k,{outgoing:l==="source",incoming:l==="target"});H.length&&(T==="withPort"?H.some(F=>{const ct=F.getSource(),lt=F.getTarget();return ct&<&&ct.cell===$.cell&<.cell===Y.cell&&ct.port!=null&&ct.port===$.port&<.port!=null&<.port===Y.port})&&(L=!1):T||H.some(F=>{const ct=F.getSource(),lt=F.getTarget();return ct&<&&ct.cell===$.cell&<.cell===Y.cell})&&(L=!1))}}return L&&M!=null&&(L=_(M)),L}allowConnectToBlank(t){const e=this.graph,r=e.options.connecting.allowBlank;if(typeof r!="function")return!!r;const l=e.findViewByCell(t),f=t.getSourceCell(),h=t.getTargetCell(),p=e.findViewByCell(f),y=e.findViewByCell(h);return Gt(r,e,{edge:t,edgeView:l,sourceCell:f,targetCell:h,sourceView:p,targetView:y,sourcePort:t.getSourcePortId(),targetPort:t.getTargetPortId(),sourceMagnet:l.sourceMagnet,targetMagnet:l.targetMagnet})}validateEdge(t,e,n){const r=this.graph;if(!this.allowConnectToBlank(t)){const f=t.getSourceCellId(),h=t.getTargetCellId();if(!(f&&h))return!1}const l=r.options.connecting.validateEdge;return l?Gt(l,r,{edge:t,type:e,previous:n}):!0}arrowheadDragging(t,e,n,r){r.x=e,r.y=n,r.currentTarget!==t&&(r.currentMagnet&&r.currentView&&r.currentView.unhighlight(r.currentMagnet,{type:"magnetAdsorbed"}),r.currentView=this.graph.findViewByElem(t),r.currentView?(r.currentMagnet=r.currentView.findMagnet(t),r.currentMagnet&&this.validateConnection(...r.getValidateConnectionArgs(r.currentView,r.currentMagnet),r.currentView.getEdgeTerminal(r.currentMagnet,e,n,this.cell,r.terminalType))?r.currentView.highlight(r.currentMagnet,{type:"magnetAdsorbed"}):r.currentMagnet=null):r.currentMagnet=null),r.currentTarget=t,this.cell.prop(r.terminalType,{x:e,y:n},Object.assign(Object.assign({},r.options),{ui:!0}))}arrowheadDragged(t,e,n){const r=t.currentView,l=t.currentMagnet;if(!l||!r)return;r.unhighlight(l,{type:"magnetAdsorbed"});const f=t.terminalType,h=r.getEdgeTerminal(l,e,n,this.cell,f);this.cell.setTerminal(f,h,{ui:!0})}snapArrowhead(t,e,n){const r=this.graph,{snap:l,allowEdge:f}=r.options.connecting,h=typeof l=="object"&&l.radius||50,p=typeof l=="object"&&l.anchor||"center",y=r.renderer.findViewsInArea({x:t-h,y:e-h,width:2*h,height:2*h},{nodeOnly:!0});if(f){const _=r.renderer.findEdgeViewsFromPoint({x:t,y:e},h).filter(U=>U!==this);y.push(..._)}const x=n.closestView||null,S=n.closestMagnet||null;n.closestView=null,n.closestMagnet=null;let w,T=Number.MAX_SAFE_INTEGER;const M=new G(t,e);y.forEach(_=>{if(_.container.getAttribute("magnet")!=="false"){if(_.isNodeView())w=p==="center"?_.cell.getBBox().getCenter().distance(M):_.cell.getBBox().getNearestPointToPoint(M).distance(M);else if(_.isEdgeView()){const U=_.getClosestPoint(M);U?w=U.distance(M):w=Number.MAX_SAFE_INTEGER}w<h&&w<T&&(S===_.container||this.validateConnection(...n.getValidateConnectionArgs(_,null),_.getEdgeTerminal(_.container,t,e,this.cell,n.terminalType)))&&(T=w,n.closestView=_,n.closestMagnet=_.container)}_.container.querySelectorAll("[magnet]").forEach(U=>{if(U.getAttribute("magnet")!=="false"){const $=_.getBBoxOfElement(U);w=p==="center"?M.distance($.getCenter()):M.distance($.getNearestPointToPoint(M)),w<h&&w<T&&(S===U||this.validateConnection(...n.getValidateConnectionArgs(_,U),_.getEdgeTerminal(U,t,e,this.cell,n.terminalType)))&&(T=w,n.closestView=_,n.closestMagnet=U)}})});const D=n.terminalType,R=n.closestView,N=n.closestMagnet,L=S!==N;if(x&&L&&x.unhighlight(S,{type:"magnetAdsorbed"}),R){if(!L)return;R.highlight(N,{type:"magnetAdsorbed"}),this.cell.setTerminal(D,R.getEdgeTerminal(N,t,e,this.cell,D),{},Object.assign(Object.assign({},n.options),{ui:!0}))}else this.cell.setTerminal(D,{x:t,y:e},{},Object.assign(Object.assign({},n.options),{ui:!0}))}snapArrowheadEnd(t){const e=t.closestView,n=t.closestMagnet;e&&n&&(e.unhighlight(n,{type:"magnetAdsorbed"}),t.currentMagnet=e.findMagnet(n)),t.closestView=null,t.closestMagnet=null}finishEmbedding(t){this.graph.options.embedding.enabled&&this.cell.updateParent()&&(t.zIndex=null)}fallbackConnection(t){switch(t.fallbackAction){case"remove":this.cell.remove({ui:!0});break;case"revert":default:this.cell.prop(t.terminalType,t.initialTerminal,{ui:!0});break}}notifyConnectionEvent(t,e){const n=t.terminalType,r=t.initialTerminal,l=this.cell[n];if(l&&!xi.equalTerminals(r,l)){const h=this.graph,p=r,y=p.cell?h.getCellById(p.cell):null,x=p.port,S=y?h.findViewByCell(y):null,w=y||t.isNewEdge?null:G.create(r).toJSON(),T=l,M=T.cell?h.getCellById(T.cell):null,D=T.port,R=M?h.findViewByCell(M):null,N=M?null:G.create(l).toJSON();this.notify("edge:connected",{e,previousCell:y,previousPort:x,previousView:S,previousPoint:w,currentCell:M,currentView:R,currentPort:D,currentPoint:N,previousMagnet:t.initialMagnet,currentMagnet:t.currentMagnet,edge:this.cell,view:this,type:n,isNew:t.isNewEdge})}}highlightAvailableMagnets(t){const e=this.graph,n=e.model.getCells();t.marked={};for(let r=0,l=n.length;r<l;r+=1){const f=e.findViewByCell(n[r]);if(!f||f.cell.id===this.cell.id)continue;const h=Array.prototype.slice.call(f.container.querySelectorAll("[magnet]"));f.container.getAttribute("magnet")!=="false"&&h.push(f.container);const p=h.filter(y=>this.validateConnection(...t.getValidateConnectionArgs(f,y),f.getEdgeTerminal(y,t.x,t.y,this.cell,t.terminalType)));if(p.length>0){for(let y=0,x=p.length;y<x;y+=1)f.highlight(p[y],{type:"magnetAvailable"});f.highlight(null,{type:"nodeAvailable"}),t.marked[f.cell.id]=p}}}unhighlightAvailableMagnets(t){const e=t.marked||{};Object.keys(e).forEach(n=>{const r=this.graph.findViewByCell(n);r&&(e[n].forEach(f=>{r.unhighlight(f,{type:"magnetAvailable"})}),r.unhighlight(null,{type:"nodeAvailable"}))}),t.marked=null}startArrowheadDragging(t,e,n){if(!this.can("arrowheadMovable")){this.notifyUnhandledMouseDown(t,e,n);return}const l=t.target.getAttribute("data-terminal"),f=this.prepareArrowheadDragging(l,{x:e,y:n});this.setEventData(t,f)}dragArrowhead(t,e,n){const r=this.getEventData(t);this.graph.options.connecting.snap?this.snapArrowhead(e,n,r):this.arrowheadDragging(this.getEventTarget(t),e,n,r)}stopArrowheadDragging(t,e,n){const r=this.graph,l=this.getEventData(t);r.options.connecting.snap?this.snapArrowheadEnd(l):this.arrowheadDragged(l,e,n),this.validateEdge(this.cell,l.terminalType,l.initialTerminal)?(this.finishEmbedding(l),this.notifyConnectionEvent(l,t)):this.fallbackConnection(l),this.afterArrowheadDragging(l)}startLabelDragging(t,e,n){if(this.can("edgeLabelMovable")){const r=t.currentTarget,l=parseInt(r.getAttribute("data-index"),10),f=this.getLabelPositionAngle(l),h=this.getLabelPositionArgs(l),p=this.getDefaultLabelPositionArgs(),y=this.mergeLabelPositionArgs(h,p);this.setEventData(t,{index:l,positionAngle:f,positionArgs:y,stopPropagation:!0,action:"drag-label"})}else this.setEventData(t,{stopPropagation:!0});this.graph.view.delegateDragEvents(t,this)}dragLabel(t,e,n){const r=this.getEventData(t),l=this.cell.getLabelAt(r.index),f=Mn({},l,{position:this.getLabelPosition(e,n,r.positionAngle,r.positionArgs)});this.cell.setLabelAt(r.index,f)}stopLabelDragging(t,e,n){}}const JL=`X6.${Pu.name}`;Pu.config({isSvgElement:!0,priority:1,bootstrap:["render","source","target"],actions:{view:["render"],markup:["render"],attrs:["update"],source:["source","update"],target:["target","update"],router:["update"],connector:["update"],labels:["labels"],defaultLabel:["labels"],tools:["tools"],vertices:["vertices","update"]}}),Pu.registry.register("edge",Pu,!0);const gp={idle:"idle",raf:"raf",timeout:"timeout"};class AF{constructor(){this.isFlushing=!1,this.isFlushPending=!1,this.scheduleId=0,this.queue=[],this.frameInterval=16,this.initialTime=Date.now(),this.pendingJobs=new Map,this.scheduleMode=null}queueJob(t){if(t.priority&ac.PRIOR)t.cb();else{const e=this.pendingJobs.get(t.id);if(e){if(e.cb=t.cb,t.priority!==e.priority){e.priority=t.priority;const n=this.queue.indexOf(e);if(n>=0){this.queue.splice(n,1);const r=this.findInsertionIndex(e);this.queue.splice(r,0,e)}}}else{const n=this.findInsertionIndex(t);this.queue.splice(n,0,t),this.pendingJobs.set(t.id,t)}}}queueFlush(){!this.isFlushing&&!this.isFlushPending&&(this.isFlushPending=!0,this.scheduleJob())}queueFlushSync(){!this.isFlushing&&!this.isFlushPending&&(this.isFlushPending=!0,this.flushJobsSync())}clearJobs(){this.queue.length=0,this.pendingJobs.clear(),this.isFlushing=!1,this.isFlushPending=!1,this.cancelScheduleJob()}flushJobs(t){this.isFlushPending=!1,this.isFlushing=!0;const e=this.getCurrentTime();let n=this.frameInterval;if(t&&typeof t.timeRemaining=="function"){const r=t.timeRemaining();n=Math.max(0,Math.min(n,r))}for(;this.queue.length>0;){const r=this.queue.shift();if(r.cb(),this.pendingJobs.delete(r.id),this.getCurrentTime()-e>=n)break}this.isFlushing=!1,this.queue.length&&this.queueFlush()}flushJobsSync(){for(this.isFlushPending=!1,this.isFlushing=!0;this.queue.length>0;){const t=this.queue.shift();try{t.cb()}catch(e){console.error(e)}this.pendingJobs.delete(t.id)}this.isFlushing=!1}findInsertionIndex(t){let e=0,n=this.queue.length,r=n-1;const l=t.priority;for(;e<=r;){const f=(r-e>>1)+e;l<=this.queue[f].priority?e=f+1:(n=f,r=f-1)}return n}scheduleJob(){this.scheduleId&&this.cancelScheduleJob(),"requestAnimationFrame"in window?(this.scheduleMode=gp.raf,this.scheduleId=window.requestAnimationFrame(()=>this.flushJobs())):"requestIdleCallback"in window?(this.scheduleMode=gp.idle,this.scheduleId=window.requestIdleCallback(t=>this.flushJobs(t),{timeout:100})):(this.scheduleMode=gp.timeout,this.scheduleId=window.setTimeout(()=>this.flushJobs()))}cancelScheduleJob(){if(!this.scheduleId)return;const t={[gp.idle]:window==null?void 0:window.cancelIdleCallback,[gp.raf]:window==null?void 0:window.cancelAnimationFrame,[gp.timeout]:window==null?void 0:window.clearTimeout},e=this.scheduleMode,n=e?t[e]:void 0;typeof n=="function"&&n(this.scheduleId),this.scheduleId=0,this.scheduleMode=null}getCurrentTime(){return typeof performance=="object"&&typeof performance.now=="function"?performance.now():Date.now()-this.initialTime}}var ac;(function(s){s[s.Update=2]="Update",s[s.RenderEdge=4]="RenderEdge",s[s.RenderNode=8]="RenderNode",s[s.PRIOR=1048576]="PRIOR"})(ac||(ac={}));var sl;(function(s){s[s.CREATED=0]="CREATED",s[s.MOUNTED=1]="MOUNTED",s[s.WAITING=2]="WAITING"})(sl||(sl={}));class KL extends cp{get model(){return this.graph.model}get container(){return this.graph.view.stage}constructor(t){super(),this.views={},this.willRemoveViews={},this.queue=new AF,this.graph=t,this.init()}init(){this.startListening(),this.renderViews(this.model.getCells())}startListening(){this.model.on("reseted",this.onModelReseted,this),this.model.on("cell:added",this.onCellAdded,this),this.model.on("cell:removed",this.onCellRemoved,this),this.model.on("cell:change:zIndex",this.onCellZIndexChanged,this),this.model.on("cell:change:visible",this.onCellVisibleChanged,this)}stopListening(){this.model.off("reseted",this.onModelReseted,this),this.model.off("cell:added",this.onCellAdded,this),this.model.off("cell:removed",this.onCellRemoved,this),this.model.off("cell:change:zIndex",this.onCellZIndexChanged,this),this.model.off("cell:change:visible",this.onCellVisibleChanged,this)}onModelReseted({options:t,previous:e}){let n=this.model.getCells();if(!(t!=null&&t.diff))this.queue.clearJobs(),this.removeZPivots(),this.resetViews();else{const r=new Set(e);n=n.filter(l=>!r.has(l))}this.renderViews(n,Object.assign(Object.assign({},t),{queue:n.map(r=>r.id)}))}onCellAdded({cell:t,options:e}){this.renderViews([t],e)}onCellRemoved({cell:t}){this.removeViews([t])}onCellZIndexChanged({cell:t,options:e}){const n=this.views[t.id];n&&this.requestViewUpdate(n.view,_h,e,ac.Update,!0)}onCellVisibleChanged({cell:t,current:e}){this.toggleVisible(t,!!e)}requestViewUpdate(t,e,n={},r=ac.Update,l=!0){const f=t.cell.id,h=this.views[f];if(!h)return;const p=h.flag|e;h.flag=p;const y=h.options||{},x=n||{};y.queue&&x.queue==null&&(x.queue=y.queue),(y.async===!1||x.async===!1)&&(x.async=!1),h.options=x,(t.hasAction(e,["translate","resize","rotate"])||x.async===!1)&&(r=ac.PRIOR,l=!1),this.queue.queueJob({id:f,priority:r,cb:()=>{const T=this.views[f];if(!T)return;const M=T.options||{};this.renderViewInArea(T.view,T.flag,M);const D=M.queue;if(D){const R=D.indexOf(T.view.cell.id);R>=0&&D.splice(R,1),D.length===0&&this.graph.trigger("render:done")}}}),this.getEffectedEdges(t).forEach(T=>{this.requestViewUpdate(T.view,T.flag,n,r,!1)}),l&&this.flush()}setRenderArea(t){this.renderArea=t,Object.values(this.views).forEach(e=>{if(!e)return;const{view:n}=e;e.state===sl.MOUNTED&&(this.isUpdatable(n)||(n.remove(),this.graph.trigger("view:unmounted",{view:n}),e.state=sl.WAITING,e.flag|=_h|n.getBootstrapFlag()))}),this.flushWaitingViews()}isViewMounted(t){if(t==null)return!1;const e=this.views[t.cell.id];return e?e.state===sl.MOUNTED:!1}renderViews(t,e={}){t.sort((n,r)=>n.isNode()&&r.isEdge()?-1:0),t.forEach(n=>{const r=n.id,l=this.views;let f=0,h=l[r];if(h)f=_h;else{const p=this.createCellView(n);p&&(p.graph=this.graph,f=_h|p.getBootstrapFlag(),h={view:p,flag:f,options:e,state:sl.CREATED},this.views[r]=h)}h&&this.requestViewUpdate(h.view,f,e,this.getRenderPriority(h.view),!1)}),this.flush()}renderViewInArea(t,e,n={}){const r=t.cell,l=r.id,f=this.views[l];if(!f)return;let h=0;this.isUpdatable(t)?(h=this.updateView(t,e,n),f.flag=h):(f.state===sl.MOUNTED&&(t.remove(),this.graph.trigger("view:unmounted",{view:t}),h=0),f.state=sl.WAITING,f.flag=e|_h|t.getBootstrapFlag()),h&&r.isEdge()&&!(h&t.getFlag(["source","target"]))&&this.queue.queueJob({id:l,priority:ac.RenderEdge,cb:()=>{this.updateView(t,e,n)}})}removeViews(t){t.forEach(e=>{const n=e.id,r=this.views[n];r&&(this.willRemoveViews[n]=r,delete this.views[n],this.queue.queueJob({id:n,priority:this.getRenderPriority(r.view),cb:()=>{this.removeView(r.view)}}))}),this.flush()}flush(){this.graph.options.async?this.queue.queueFlush():this.queue.queueFlushSync()}flushWaitingViews(){Object.values(this.views).forEach(t=>{if(t&&t.state===sl.WAITING){const{view:e,flag:n,options:r}=t;this.requestViewUpdate(e,n,r,this.getRenderPriority(e),!1)}}),this.flush()}updateView(t,e,n={}){if(t==null)return 0;if(Ni.isCellView(t)){if(e&EF)return this.removeView(t),0;e&_h&&(this.insertView(t),e^=_h)}return e?t.confirmUpdate(e,n):0}insertView(t){const e=this.views[t.cell.id];if(e){const n=t.cell.getZIndex(),r=this.addZPivot(n);this.container.insertBefore(t.container,r),t.cell.isVisible()||this.toggleVisible(t.cell,!1),e.state=sl.MOUNTED,this.graph.trigger("view:mounted",{view:t})}}resetViews(){this.willRemoveViews=Object.assign(Object.assign({},this.views),this.willRemoveViews),Object.values(this.willRemoveViews).forEach(t=>{t&&this.removeView(t.view)}),this.views={},this.willRemoveViews={}}removeView(t){const e=t.cell,n=this.willRemoveViews[e.id];n&&t&&(n.view.remove(),delete this.willRemoveViews[e.id],this.graph.trigger("view:unmounted",{view:t}))}toggleVisible(t,e){const n=this.model.getConnectedEdges(t);for(let l=0,f=n.length;l<f;l+=1){const h=n[l];if(e){const p=h.getSourceCell(),y=h.getTargetCell();if(p&&!p.isVisible()||y&&!y.isVisible())continue;this.toggleVisible(h,!0)}else this.toggleVisible(h,!1)}const r=this.views[t.id];r&&$e(r.view.container,{display:e?"unset":"none"})}addZPivot(t=0){this.zPivots==null&&(this.zPivots={});const e=this.zPivots;let n=e[t];if(n)return n;n=e[t]=document.createComment(`z-index:${t+1}`);let r=-1/0;for(const f in e){const h=+f;h<t&&h>r&&(r=h)}const l=this.container;if(r!==-1/0){const f=e[r];l.insertBefore(n,f.nextSibling)}else l.insertBefore(n,l.firstChild);return n}removeZPivots(){this.zPivots&&Object.values(this.zPivots).forEach(t=>{t&&t.parentNode&&t.parentNode.removeChild(t)}),this.zPivots={}}createCellView(t){const e={graph:this.graph},n=this.graph.options.createCellView;if(n){const l=Gt(n,this.graph,t);if(l)return new l(t,e);if(l===null)return null}const r=t.view;if(r!=null&&typeof r=="string"){const l=Ni.registry.get(r);return l?new l(t,e):Ni.registry.onNotFound(r)}return t.isNode()?new cr(t,e):t.isEdge()?new Pu(t,e):null}getEffectedEdges(t){const e=[],n=t.cell,r=this.model.getConnectedEdges(n);for(let l=0,f=r.length;l<f;l+=1){const h=r[l],p=this.views[h.id];if(!p)continue;const y=p.view;if(!this.isViewMounted(y))continue;const x=["update"];h.getTargetCell()===n&&x.push("target"),h.getSourceCell()===n&&x.push("source"),e.push({id:h.id,view:y,flag:y.getFlag(x)})}return e}isUpdatable(t){if(t.isNodeView())return this.renderArea?this.renderArea.isIntersectWithRect(t.cell.getBBox()):!0;if(t.isEdgeView()){const e=t.cell,n=this.renderArea?this.renderArea.isIntersectWithRect(e.getBBox()):!0;if(this.graph.virtualRender.isVirtualEnabled())return n;const r=e.getSourceCell(),l=e.getTargetCell();if(this.renderArea&&r&&l)return this.renderArea.isIntersectWithRect(r.getBBox())||this.renderArea.isIntersectWithRect(l.getBBox())}return!0}getRenderPriority(t){return t.cell.isNode()?ac.RenderNode:ac.RenderEdge}dispose(){this.stopListening(),Object.keys(this.views).forEach(t=>{this.views[t].view.dispose()}),this.views={}}}De([Re()],KL.prototype,"dispose",null);class WL extends lr{constructor(){super(...arguments),this.schedule=new KL(this.graph)}requestViewUpdate(t,e,n={}){this.schedule.requestViewUpdate(t,e,n)}isViewMounted(t){return this.schedule.isViewMounted(t)}setRenderArea(t){this.schedule.setRenderArea(t)}findViewByElem(t){if(t==null)return null;const e=this.options.container,n=typeof t=="string"?e.querySelector(t):t instanceof Element?t:t[0];if(n){const r=this.graph.view.findAttr("data-cell-id",n);if(r){const l=this.schedule.views;if(l[r])return l[r].view}}return null}findViewByCell(t){if(t==null)return null;const e=Me.isCell(t)?t.id:t,n=this.schedule.views;return n[e]?n[e].view:null}findViewsFromPoint(t){const e={x:t.x,y:t.y};return this.model.getCells().map(n=>this.findViewByCell(n)).filter(n=>n!=null?il(n.container,{target:this.view.stage}).containsPoint(e):!1)}findEdgeViewsFromPoint(t,e=5){return this.model.getEdges().map(n=>this.findViewByCell(n)).filter(n=>{if(n!=null){const r=n.getClosestPoint(t);if(r)return r.distance(t)<=e}return!1})}findViewsInArea(t,e={}){const n=Dt.create(t);return this.model.getCells().map(r=>this.findViewByCell(r)).filter(r=>{if(r){if(e.nodeOnly&&!r.isNodeView())return!1;const l=il(r.container,{target:this.view.stage});return l.width===0?l.inflate(1,0):l.height===0&&l.inflate(0,1),e.strict?n.containsRect(l):n.isIntersectWithRect(l)}return!1})}dispose(){this.schedule.dispose()}}De([Re()],WL.prototype,"dispose",null);class zT extends lr{get elem(){return this.view.background}init(){this.startListening(),this.options.background&&this.draw(this.options.background)}startListening(){this.graph.on("scale",this.update,this),this.graph.on("translate",this.update,this)}stopListening(){this.graph.off("scale",this.update,this),this.graph.off("translate",this.update,this)}updateBackgroundImage(t={}){let e=t.size||"auto auto",n=t.position||"center";const r=this.graph.transform.getScale(),l=this.graph.translate();if(typeof n=="object"){const f=l.tx+r.sx*(n.x||0),h=l.ty+r.sy*(n.y||0);n=`${f}px ${h}px`}typeof e=="object"&&(e=Dt.fromSize(e).scale(r.sx,r.sy),e=`${e.width}px ${e.height}px`),this.elem.style.backgroundSize=e,this.elem.style.backgroundPosition=n}drawBackgroundImage(t,e={}){if(!(t instanceof HTMLImageElement)){this.elem.style.backgroundImage="";return}const n=this.optionsCache;if(n&&n.image!==e.image)return;let r;const l=e.opacity,f=e.size;let h=e.repeat||"no-repeat";const p=cS.get(h);if(typeof p=="function"){const x=e.quality||1;t.width*=x,t.height*=x;const S=p(t,e);if(!(S instanceof HTMLCanvasElement))throw new Error("Background pattern must return an HTML Canvas instance");r=S.toDataURL("image/png"),e.repeat&&h!==e.repeat?h=e.repeat:h="repeat",typeof f=="object"?(f.width*=S.width/t.width,f.height*=S.height/t.height):f===void 0&&(e.size={width:S.width/x,height:S.height/x})}else r=t.src,f===void 0&&(e.size={width:t.width,height:t.height});n!=null&&typeof e.size=="object"&&e.image===n.image&&e.repeat===n.repeat&&e.quality===n.quality&&(n.size=EA(e.size));const y=this.elem.style;y.backgroundImage=`url(${r})`,y.backgroundRepeat=h,y.opacity=l==null||l>=1?"":`${l}`,this.updateBackgroundImage(e)}updateBackgroundColor(t){this.elem.style.backgroundColor=t||""}updateBackgroundOptions(t){this.graph.options.background=t}update(){this.optionsCache&&this.updateBackgroundImage(this.optionsCache)}draw(t){const e=t||{};if(this.updateBackgroundOptions(t),this.updateBackgroundColor(e.color),e.image){this.optionsCache=EA(e);const n=document.createElement("img");n.onload=()=>this.drawBackgroundImage(n,t),n.setAttribute("crossorigin","anonymous"),n.src=e.image}else this.drawBackgroundImage(null),this.optionsCache=null}clear(){this.draw()}dispose(){this.clear(),this.stopListening()}}De([Re()],zT.prototype,"dispose",null);class TF extends lr{getClientMatrix(){return Ri(this.view.stage.getScreenCTM())}getClientOffset(){const t=this.view.svg.getBoundingClientRect();return new G(t.left,t.top)}getPageOffset(){return this.getClientOffset().translate(window.scrollX,window.scrollY)}snapToGrid(t,e){return(typeof t=="number"?this.clientToLocalPoint(t,e):this.clientToLocalPoint(t.x,t.y)).snapToGrid(this.graph.getGridSize())}localToGraphPoint(t,e){const n=G.create(t,e);return oc(n,this.graph.matrix())}localToClientPoint(t,e){const n=G.create(t,e);return oc(n,this.getClientMatrix())}localToPagePoint(t,e){return(typeof t=="number"?this.localToGraphPoint(t,e):this.localToGraphPoint(t)).translate(this.getPageOffset())}localToGraphRect(t,e,n,r){const l=Dt.create(t,e,n,r);return ar(l,this.graph.matrix())}localToClientRect(t,e,n,r){const l=Dt.create(t,e,n,r);return ar(l,this.getClientMatrix())}localToPageRect(t,e,n,r){return(typeof t=="number"?this.localToGraphRect(t,e,n,r):this.localToGraphRect(t)).translate(this.getPageOffset())}graphToLocalPoint(t,e){const n=G.create(t,e);return oc(n,this.graph.matrix().inverse())}clientToLocalPoint(t,e){const n=G.create(t,e);return oc(n,this.getClientMatrix().inverse())}clientToGraphPoint(t,e){const n=G.create(t,e);return oc(n,this.graph.matrix().multiply(this.getClientMatrix().inverse()))}pageToLocalPoint(t,e){const r=G.create(t,e).diff(this.getPageOffset());return this.graphToLocalPoint(r)}graphToLocalRect(t,e,n,r){const l=Dt.create(t,e,n,r);return ar(l,this.graph.matrix().inverse())}clientToLocalRect(t,e,n,r){const l=Dt.create(t,e,n,r);return ar(l,this.getClientMatrix().inverse())}clientToGraphRect(t,e,n,r){const l=Dt.create(t,e,n,r);return ar(l,this.graph.matrix().multiply(this.getClientMatrix().inverse()))}pageToLocalRect(t,e,n,r){const l=Dt.create(t,e,n,r),f=this.getPageOffset();return l.x-=f.x,l.y-=f.y,this.graphToLocalRect(l)}}const MF=`.x6-graph {
|
|
247
|
+
position: relative;
|
|
248
|
+
overflow: hidden;
|
|
249
|
+
outline: none;
|
|
250
|
+
touch-action: none;
|
|
251
|
+
}
|
|
252
|
+
.x6-graph-background,
|
|
253
|
+
.x6-graph-grid,
|
|
254
|
+
.x6-graph-svg {
|
|
255
|
+
position: absolute;
|
|
256
|
+
top: 0;
|
|
257
|
+
right: 0;
|
|
258
|
+
bottom: 0;
|
|
259
|
+
left: 0;
|
|
260
|
+
}
|
|
261
|
+
.x6-graph-background-stage,
|
|
262
|
+
.x6-graph-grid-stage,
|
|
263
|
+
.x6-graph-svg-stage {
|
|
264
|
+
user-select: none;
|
|
265
|
+
}
|
|
266
|
+
.x6-graph.x6-graph-pannable {
|
|
267
|
+
cursor: grab;
|
|
268
|
+
cursor: -moz-grab;
|
|
269
|
+
cursor: -webkit-grab;
|
|
270
|
+
}
|
|
271
|
+
.x6-graph.x6-graph-panning {
|
|
272
|
+
cursor: grabbing;
|
|
273
|
+
cursor: -moz-grabbing;
|
|
274
|
+
cursor: -webkit-grabbing;
|
|
275
|
+
user-select: none;
|
|
276
|
+
}
|
|
277
|
+
.x6-node {
|
|
278
|
+
cursor: move;
|
|
279
|
+
/* stylelint-disable-next-line */
|
|
280
|
+
}
|
|
281
|
+
.x6-node.x6-node-immovable {
|
|
282
|
+
cursor: default;
|
|
283
|
+
}
|
|
284
|
+
.x6-node * {
|
|
285
|
+
-webkit-user-drag: none;
|
|
286
|
+
}
|
|
287
|
+
.x6-node .scalable * {
|
|
288
|
+
vector-effect: non-scaling-stroke;
|
|
289
|
+
}
|
|
290
|
+
.x6-node [magnet='true'] {
|
|
291
|
+
cursor: crosshair;
|
|
292
|
+
transition: opacity 0.3s;
|
|
293
|
+
}
|
|
294
|
+
.x6-node [magnet='true']:hover {
|
|
295
|
+
opacity: 0.7;
|
|
296
|
+
}
|
|
297
|
+
.x6-node foreignObject {
|
|
298
|
+
display: block;
|
|
299
|
+
overflow: visible;
|
|
300
|
+
background-color: transparent;
|
|
301
|
+
}
|
|
302
|
+
.x6-node foreignObject > body {
|
|
303
|
+
position: static;
|
|
304
|
+
width: 100%;
|
|
305
|
+
height: 100%;
|
|
306
|
+
margin: 0;
|
|
307
|
+
padding: 0;
|
|
308
|
+
overflow: visible;
|
|
309
|
+
background-color: transparent;
|
|
310
|
+
}
|
|
311
|
+
.x6-edge .source-marker,
|
|
312
|
+
.x6-edge .target-marker {
|
|
313
|
+
vector-effect: non-scaling-stroke;
|
|
314
|
+
}
|
|
315
|
+
.x6-edge .connection {
|
|
316
|
+
stroke-linejoin: round;
|
|
317
|
+
fill: none;
|
|
318
|
+
}
|
|
319
|
+
.x6-edge .connection-wrap {
|
|
320
|
+
cursor: move;
|
|
321
|
+
opacity: 0;
|
|
322
|
+
fill: none;
|
|
323
|
+
stroke: #000;
|
|
324
|
+
stroke-width: 15;
|
|
325
|
+
stroke-linecap: round;
|
|
326
|
+
stroke-linejoin: round;
|
|
327
|
+
}
|
|
328
|
+
.x6-edge .connection-wrap:hover {
|
|
329
|
+
opacity: 0.4;
|
|
330
|
+
stroke-opacity: 0.4;
|
|
331
|
+
}
|
|
332
|
+
.x6-edge .vertices {
|
|
333
|
+
cursor: move;
|
|
334
|
+
opacity: 0;
|
|
335
|
+
}
|
|
336
|
+
.x6-edge .vertices .vertex {
|
|
337
|
+
fill: #1abc9c;
|
|
338
|
+
}
|
|
339
|
+
.x6-edge .vertices .vertex :hover {
|
|
340
|
+
fill: #34495e;
|
|
341
|
+
stroke: none;
|
|
342
|
+
}
|
|
343
|
+
.x6-edge .vertices .vertex-remove {
|
|
344
|
+
cursor: pointer;
|
|
345
|
+
fill: #fff;
|
|
346
|
+
}
|
|
347
|
+
.x6-edge .vertices .vertex-remove-area {
|
|
348
|
+
cursor: pointer;
|
|
349
|
+
opacity: 0.1;
|
|
350
|
+
}
|
|
351
|
+
.x6-edge .vertices .vertex-group:hover .vertex-remove-area {
|
|
352
|
+
opacity: 1;
|
|
353
|
+
}
|
|
354
|
+
.x6-edge .arrowheads {
|
|
355
|
+
cursor: move;
|
|
356
|
+
opacity: 0;
|
|
357
|
+
}
|
|
358
|
+
.x6-edge .arrowheads .arrowhead {
|
|
359
|
+
fill: #1abc9c;
|
|
360
|
+
}
|
|
361
|
+
.x6-edge .arrowheads .arrowhead :hover {
|
|
362
|
+
fill: #f39c12;
|
|
363
|
+
stroke: none;
|
|
364
|
+
}
|
|
365
|
+
.x6-edge .tools {
|
|
366
|
+
cursor: pointer;
|
|
367
|
+
opacity: 0;
|
|
368
|
+
}
|
|
369
|
+
.x6-edge .tools .tool-options {
|
|
370
|
+
display: none;
|
|
371
|
+
}
|
|
372
|
+
.x6-edge .tools .tool-remove circle {
|
|
373
|
+
fill: #f00;
|
|
374
|
+
}
|
|
375
|
+
.x6-edge .tools .tool-remove path {
|
|
376
|
+
fill: #fff;
|
|
377
|
+
}
|
|
378
|
+
.x6-edge:hover .vertices,
|
|
379
|
+
.x6-edge:hover .arrowheads,
|
|
380
|
+
.x6-edge:hover .tools {
|
|
381
|
+
opacity: 1;
|
|
382
|
+
}
|
|
383
|
+
.x6-highlight-opacity {
|
|
384
|
+
opacity: 0.3;
|
|
385
|
+
}
|
|
386
|
+
.x6-cell-tool-editor {
|
|
387
|
+
position: relative;
|
|
388
|
+
display: inline-block;
|
|
389
|
+
min-height: 1em;
|
|
390
|
+
margin: 0;
|
|
391
|
+
padding: 0;
|
|
392
|
+
line-height: 1;
|
|
393
|
+
white-space: normal;
|
|
394
|
+
text-align: center;
|
|
395
|
+
vertical-align: top;
|
|
396
|
+
overflow-wrap: normal;
|
|
397
|
+
outline: none;
|
|
398
|
+
transform-origin: 0 0;
|
|
399
|
+
-webkit-user-drag: none;
|
|
400
|
+
cursor: text;
|
|
401
|
+
}
|
|
402
|
+
.x6-edge-tool-editor {
|
|
403
|
+
border: 1px solid #275fc5;
|
|
404
|
+
border-radius: 2px;
|
|
405
|
+
}
|
|
406
|
+
`;class t6 extends lr{init(){Ou("core",MF)}dispose(){Du("core")}}De([Re()],t6.prototype,"dispose",null);class OF extends lr{get cid(){return this.graph.view.cid}get svg(){return this.view.svg}get defs(){return this.view.defs}isDefined(t){return this.svg.getElementById(t)!=null}filter(t){let e=t.id;const n=t.name;if(e||(e=`filter-${n}-${this.cid}-${ZA(JSON.stringify(t))}`),!this.isDefined(e)){const r=Db.get(n);if(r==null)return Db.onNotFound(n);const l=r(t.args||{}),f=Object.assign(Object.assign({x:-1,y:-1,width:3,height:3,filterUnits:"objectBoundingBox"},t.attrs),{id:e});Xt.create(hs.sanitize(l),f).appendTo(this.defs)}return e}gradient(t){let e=t.id;const n=t.type;if(e||(e=`gradient-${n}-${this.cid}-${ZA(JSON.stringify(t))}`),!this.isDefined(e)){const l=t.stops.map(p=>{const y=p.opacity!=null&&Number.isFinite(p.opacity)?p.opacity:1;return`<stop offset="${p.offset}" stop-color="${p.color}" stop-opacity="${y}"/>`}),f=`<${n}>${l.join("")}</${n}>`,h=Object.assign({id:e},t.attrs);Xt.create(f,h).appendTo(this.defs)}return e}marker(t){const{id:e,refX:n,refY:r,markerUnits:l,markerOrient:f,tagName:h,children:p}=t,y=re(t,["id","refX","refY","markerUnits","markerOrient","tagName","children"]);let x=e;if(x||(x=`marker-${this.cid}-${ZA(JSON.stringify(t))}`),!this.isDefined(x)){h!=="path"&&delete y.d;const S=Xt.create("marker",{refX:n,refY:r,id:x,overflow:"visible",orient:f??"auto",markerUnits:l||"userSpaceOnUse"},p?p.map(w=>{var{tagName:T}=w,M=re(w,["tagName"]);return Xt.create(`${T}`||"path",pb(Object.assign(Object.assign({},y),M)))}):[Xt.create(h||"path",pb(y))]);this.defs.appendChild(S.node)}return x}remove(t){const e=this.svg.getElementById(t);e&&e.parentNode&&e.parentNode.removeChild(e)}}class e6 extends lr{get elem(){return this.view.grid}get grid(){return this.options.grid}init(){this.startListening(),this.draw(this.grid)}startListening(){this.graph.on("scale",this.update,this),this.graph.on("translate",this.update,this)}stopListening(){this.graph.off("scale",this.update,this),this.graph.off("translate",this.update,this)}setVisible(t){this.grid.visible!==t&&(this.grid.visible=t,this.update())}getGridSize(){return this.grid.size}setGridSize(t){this.grid.size=Math.max(t,1),this.update()}show(){this.setVisible(!0),this.update()}hide(){this.setVisible(!1),this.update()}clear(){this.elem.style.backgroundImage=""}draw(t){this.clear(),this.instance=null,Object.assign(this.grid,t),this.patterns=this.resolveGrid(t),this.update()}update(t={}){const e=this.grid.size;if(e<=1||!this.grid.visible)return this.clear();const n=this.graph.matrix(),r=this.getInstance(),l=Array.isArray(t)?t:[t];this.patterns.forEach((p,y)=>{const x=`pattern_${y}`,S=n.a||1,w=n.d||1,{update:T,markup:M}=p,D=re(p,["update","markup"]),R=Object.assign(Object.assign(Object.assign({},D),l[y]),{sx:S,sy:w,ox:n.e||0,oy:n.f||0,width:e*S,height:e*w});r.has(x)||r.add(x,Xt.create("pattern",{id:x,patternUnits:"userSpaceOnUse"},Xt.createVectors(M)).node);const N=r.get(x);typeof T=="function"&&T(N.childNodes[0],R);let L=R.ox%R.width;L<0&&(L+=R.width);let _=R.oy%R.height;_<0&&(_+=R.height),Te(N,{x:L,y:_,width:R.width,height:R.height})});const f=new XMLSerializer().serializeToString(r.root),h=`url(data:image/svg+xml;base64,${btoa(f)})`;this.elem.style.backgroundImage=h}getInstance(){return this.instance||(this.instance=new AZ),this.instance}resolveGrid(t){if(!t)return[];const e=t.type;if(e==null)return[Object.assign(Object.assign({},I3.dot),t.args)];const n=Rb.get(e);if(n){let r=t.args||[];return Array.isArray(r)||(r=[r]),Array.isArray(n)?n.map((l,f)=>Object.assign(Object.assign({},l),r[f])):[Object.assign(Object.assign({},n),r[0])]}return Rb.onNotFound(e)}dispose(){this.stopListening(),this.clear()}}De([Re()],e6.prototype,"dispose",null);class n6 extends lr{constructor(){super(...arguments),this.highlights={}}init(){this.startListening()}startListening(){this.graph.on("cell:highlight",this.onCellHighlight,this),this.graph.on("cell:unhighlight",this.onCellUnhighlight,this)}stopListening(){this.graph.off("cell:highlight",this.onCellHighlight,this),this.graph.off("cell:unhighlight",this.onCellUnhighlight,this)}onCellHighlight({view:t,magnet:e,options:n={}}){const r=this.resolveHighlighter(n);if(!r)return;const l=this.getHighlighterId(e,r);if(!this.highlights[l]){const f=r.highlighter;f.highlight(t,e,Object.assign({},r.args)),this.highlights[l]={cellView:t,magnet:e,highlighter:f,args:r.args}}}onCellUnhighlight({magnet:t,options:e={}}){const n=this.resolveHighlighter(e);if(!n)return;const r=this.getHighlighterId(t,n);this.unhighlight(r)}resolveHighlighter(t){const e=this.options;let n=t.highlighter;if(n==null){const h=t.type;n=h&&e.highlighting[h]||e.highlighting.default}if(n==null)return null;const r=typeof n=="string"?{name:n}:n,l=r.name,f=zb.get(l);return f==null?zb.onNotFound(l):(LZ(l,f),{name:l,highlighter:f,args:r.args||{}})}getHighlighterId(t,e){return HA(t),e.name+t.id+JSON.stringify(e.args)}unhighlight(t){const e=this.highlights[t];e&&(e.highlighter.unhighlight(e.cellView,e.magnet,e.args),delete this.highlights[t])}dispose(){Object.keys(this.highlights).forEach(t=>this.unhighlight(t)),this.stopListening()}}De([Re()],n6.prototype,"dispose",null);class i6 extends lr{constructor(){super(...arguments),this.cumulatedFactor=1}get widgetOptions(){return this.options.mousewheel}init(){this.container=this.graph.container,this.target=this.widgetOptions.global?document:this.container,this.mousewheelHandle=new h3(this.target,this.onMouseWheel.bind(this),this.allowMouseWheel.bind(this)),this.widgetOptions.enabled&&this.enable(!0)}get disabled(){return this.widgetOptions.enabled!==!0}enable(t){(this.disabled||t)&&(this.widgetOptions.enabled=!0,this.mousewheelHandle.enable())}disable(){this.disabled||(this.widgetOptions.enabled=!1,this.mousewheelHandle.disable())}allowMouseWheel(t){const e=this.widgetOptions.guard;return(e==null||e(t))&&Nu(t,this.widgetOptions.modifiers)}onMouseWheel(t){const e=this.widgetOptions.guard;if((e==null||e(t))&&Nu(t,this.widgetOptions.modifiers)){const n=this.widgetOptions.factor||1.2;this.currentScale==null&&(this.startPos={x:t.clientX,y:t.clientY},this.currentScale=this.graph.transform.getScale().sx),t.deltaY<0?(this.currentScale<.15?this.cumulatedFactor=(this.currentScale+.01)/this.currentScale:this.cumulatedFactor=Math.round(this.currentScale*n*20)/20/this.currentScale,this.cumulatedFactor<=1&&(this.cumulatedFactor=1.05)):(this.currentScale<=.15?this.cumulatedFactor=(this.currentScale-.01)/this.currentScale:this.cumulatedFactor=Math.round(this.currentScale*(1/n)*20)/20/this.currentScale,this.cumulatedFactor>=1&&(this.cumulatedFactor=.95)),this.cumulatedFactor=Math.max(.01,Math.min(this.currentScale*this.cumulatedFactor,160)/this.currentScale);const l=this.currentScale;let f=this.graph.transform.clampScale(l*this.cumulatedFactor);const h=this.widgetOptions.minScale||Number.MIN_SAFE_INTEGER,p=this.widgetOptions.maxScale||Number.MAX_SAFE_INTEGER;if(f=Rh(f,h,p),f!==l)if(this.widgetOptions.zoomAtMousePosition){const x=!!this.graph.getPlugin("scroller")?this.graph.clientToLocal(this.startPos):this.graph.clientToGraph(this.startPos);this.graph.zoom(f,{absolute:!0,center:x.clone()})}else this.graph.zoom(f,{absolute:!0});this.currentScale=null,this.cumulatedFactor=1}}dispose(){this.disable()}}De([Re()],i6.prototype,"dispose",null);function DF(s){const{grid:t,panning:e,mousewheel:n,embedding:r}=s,l=re(s,["grid","panning","mousewheel","embedding"]),f=s.container;if(f!=null)l.width==null&&(l.width=f.clientWidth),l.height==null&&(l.height=f.clientHeight);else throw new Error("Ensure the container of the graph is specified and valid");const h=Mn({},RF,l),p={size:10,visible:!1};return typeof t=="number"?h.grid={size:t,visible:!1}:typeof t=="boolean"?h.grid=Object.assign(Object.assign({},p),{visible:t}):h.grid=Object.assign(Object.assign({},p),t),["panning","mousewheel","embedding"].forEach(x=>{const S=s[x];typeof S=="boolean"?h[x].enabled=S:S!=null&&(h[x]=Object.assign(Object.assign({},h[x]),S))}),h}const RF={x:0,y:0,scaling:{min:.01,max:16},grid:{size:10,visible:!1},background:!1,panning:{enabled:!0,eventTypes:["leftMouseDown"]},mousewheel:{enabled:!1,factor:1.2,zoomAtMousePosition:!0},highlighting:{default:{name:"stroke",args:{padding:3}},nodeAvailable:{name:"className",args:{className:He.prefix("available-node")}},magnetAvailable:{name:"className",args:{className:He.prefix("available-magnet")}}},connecting:{snap:!1,allowLoop:!0,allowNode:!0,allowEdge:!1,allowPort:!0,allowBlank:!0,allowMulti:!0,highlight:!1,anchor:"center",edgeAnchor:"ratio",connectionPoint:"boundary",router:"normal",connector:"normal",validateConnection({type:s,sourceView:t,targetView:e}){return(s==="target"?e:t)!=null},createEdge(){return new CF}},translating:{restrict:!1},embedding:{enabled:!1,findParent:"bbox",frontOnly:!0,validate:()=>!0},moveThreshold:0,clickThreshold:0,magnetThreshold:0,preventDefaultDblClick:!0,preventDefaultMouseDown:!1,preventDefaultContextMenu:!0,preventDefaultBlankAction:!0,interacting:{edgeLabelMovable:!1},async:!0,virtual:!1,guard:()=>!1};class s6 extends lr{get widgetOptions(){return this.options.panning}get pannable(){return this.widgetOptions&&this.widgetOptions.enabled===!0}init(){this.onRightMouseDown=this.onRightMouseDown.bind(this),this.onKeyDown=this.onKeyDown.bind(this),this.onKeyUp=this.onKeyUp.bind(this),this.startListening(),this.updateClassName()}startListening(){this.graph.on("blank:mousedown",this.onMouseDown,this),this.graph.on("node:unhandled:mousedown",this.onMouseDown,this),this.graph.on("edge:unhandled:mousedown",this.onMouseDown,this),nn.on(this.graph.container,"mousedown",this.onRightMouseDown),nn.on(document.body,{keydown:this.onKeyDown,keyup:this.onKeyUp}),this.mousewheelHandle=new h3(this.graph.container,this.onMouseWheel.bind(this),this.allowMouseWheel.bind(this)),this.mousewheelHandle.enable()}stopListening(){this.graph.off("blank:mousedown",this.onMouseDown,this),this.graph.off("node:unhandled:mousedown",this.onMouseDown,this),this.graph.off("edge:unhandled:mousedown",this.onMouseDown,this),nn.off(this.graph.container,"mousedown",this.onRightMouseDown),nn.off(document.body,{keydown:this.onKeyDown,keyup:this.onKeyUp}),this.mousewheelHandle&&this.mousewheelHandle.disable()}allowPanning(t,e){return t.spaceKey=this.isSpaceKeyPressed,this.pannable&&Nu(t,this.widgetOptions.modifiers,e)}startPanning(t){const e=this.view.normalizeEvent(t);this.clientX=e.clientX,this.clientY=e.clientY,this.panning=!0,this.updateClassName(t),nn.on(document.body,{"mousemove.panning touchmove.panning":this.pan.bind(this),"mouseup.panning touchend.panning":this.stopPanning.bind(this),"mouseleave.panning":this.stopPanning.bind(this)}),nn.on(window,"mouseup.panning",this.stopPanning.bind(this))}pan(t){const e=this.view.normalizeEvent(t),n=e.clientX-this.clientX,r=e.clientY-this.clientY;this.clientX=e.clientX,this.clientY=e.clientY,this.graph.translateBy(n,r)}stopPanning(t){this.panning=!1,this.updateClassName(t),nn.off(document.body,".panning"),nn.off(window,".panning")}updateClassName(t){const e=this.widgetOptions.eventTypes;if((e==null?void 0:e.length)===1&&e.includes("mouseWheel"))return;const n=this.view.container,r=this.view.prefixClassName("graph-panning"),l=this.view.prefixClassName("graph-pannable"),f=this.graph.getPlugin("selection"),h=f&&f.allowRubberband(t,!0),p=(e==null?void 0:e.includes("leftMouseDown"))&&!h;this.allowPanning(t??{},!0)||this.allowPanning(t??{})&&p?this.panning?(_t(n,r),dn(n,l)):(dn(n,r),_t(n,l)):this.panning||(dn(n,r),dn(n,l))}onMouseDown({e:t}){if(!this.allowBlankMouseDown(t))return;const e=this.graph.getPlugin("selection"),n=e&&e.allowRubberband(t,!0);(this.allowPanning(t,!0)||this.allowPanning(t)&&!n)&&this.startPanning(t)}onRightMouseDown(t){const e=this.widgetOptions.eventTypes;e!=null&&e.includes("rightMouseDown")&&t.button===2&&this.allowPanning(t,!0)&&this.startPanning(t)}onMouseWheel(t,e,n){this.graph.translateBy(-e,-n)}onKeyDown(t){t.which===32&&(this.isSpaceKeyPressed=!0),this.updateClassName(t)}onKeyUp(t){t.which===32&&(this.isSpaceKeyPressed=!1),this.updateClassName(t)}allowBlankMouseDown(t){const e=this.widgetOptions.eventTypes;return typeof t.type=="string"&&t.type.startsWith("touch")||t.pointerType==="touch"?e==null?void 0:e.includes("leftMouseDown"):(e==null?void 0:e.includes("leftMouseDown"))&&t.button===0||(e==null?void 0:e.includes("mouseWheelDown"))&&t.button===1}allowMouseWheel(t){var e;return this.pannable&&!t.ctrlKey&&((e=this.widgetOptions.eventTypes)===null||e===void 0?void 0:e.includes("mouseWheel"))}autoPanning(t,e){const r=this.graph.getGraphArea();let l=0,f=0;t<=r.left+10&&(l=-10),e<=r.top+10&&(f=-10),t>=r.right-10&&(l=10),e>=r.bottom-10&&(f=10),(l!==0||f!==0)&&this.graph.translateBy(-l,-f)}enablePanning(){this.pannable||(this.widgetOptions.enabled=!0,this.updateClassName())}disablePanning(){this.pannable&&(this.widgetOptions.enabled=!1,this.updateClassName())}dispose(){this.stopListening()}}De([Re()],s6.prototype,"dispose",null);class o6 extends lr{getScroller(){const t=this.graph.getPlugin("scroller");return t&&t.options.enabled?t:null}getContainer(){const t=this.getScroller();return t?t.container.parentElement:this.graph.container.parentElement}getSensorTarget(){const t=this.options.autoResize;if(t)return typeof t=="boolean"?this.getContainer()||void 0:t}init(){if(this.options.autoResize){const e=this.getSensorTarget();if(e){if(typeof ResizeObserver>"u")return;this.ro=new ResizeObserver(l=>{if(!l||l.length===0)return;const{width:f,height:h}=l[0].contentRect;this.resize(Math.round(f),Math.round(h))}),this.ro.observe(e);const n=e.offsetWidth,r=e.offsetHeight;this.resize(n,r)}}}resize(t,e){const n=this.getScroller();n?n.resize(t,e):this.graph.transform.resize(t,e)}dispose(){this.ro&&(this.ro.disconnect(),this.ro=void 0)}}De([Re()],o6.prototype,"dispose",null);class zF extends lr{get container(){return this.graph.view.container}get viewport(){return this.graph.view.viewport}get stage(){return this.graph.view.stage}init(){this.resize()}getMatrix(){const t=this.viewport.getAttribute("transform");return t!==this.viewportTransformString&&(this.viewportMatrix=this.viewport.getCTM(),this.viewportTransformString=t),Ri(this.viewportMatrix)}setMatrix(t){const e=Ri(t),n=bb(e);this.viewport.setAttribute("transform",n),this.viewportMatrix=e,this.viewportTransformString=n}resize(t,e){let n=t===void 0?this.options.width:t,r=e===void 0?this.options.height:e;this.options.width=n,this.options.height=r,typeof n=="number"&&(n=Math.round(n)),typeof r=="number"&&(r=Math.round(r)),this.container.style.width=n==null?"":`${n}px`,this.container.style.height=r==null?"":`${r}px`;const l=this.getComputedSize();return this.graph.trigger("resize",Object.assign({},l)),this}getComputedSize(){let t=this.options.width,e=this.options.height;return nc(t)||(t=this.container.clientWidth),nc(e)||(e=this.container.clientHeight),{width:t,height:e}}getScale(){return $Y(this.getMatrix())}scale(t,e=t,n=0,r=0,l=!0){if(t=this.clampScale(t),e=this.clampScale(e),l&&(n||r)){const h=this.getTranslation(),p=this.getScale(),y=n-(n-h.tx)*(t/p.sx),x=r-(r-h.ty)*(e/p.sy);(y!==h.tx||x!==h.ty)&&this.translate(y,x)}const f=this.getMatrix();return f.a=t,f.d=e,this.setMatrix(f),this.graph.trigger("scale",{sx:t,sy:e,ox:n,oy:r}),this}clampScale(t){const e=this.graph.options.scaling;return Rh(t,e.min||.01,e.max||16)}getZoom(){return this.getScale().sx}zoom(t,e){e=e||{};let n=t,r=t;const l=this.getScale(),f=this.getComputedSize();let h=f.width/2,p=f.height/2;return e.absolute||(n+=l.sx,r+=l.sy),e.scaleGrid&&(n=Math.round(n/e.scaleGrid)*e.scaleGrid,r=Math.round(r/e.scaleGrid)*e.scaleGrid),e.maxScale&&(n=Math.min(e.maxScale,n),r=Math.min(e.maxScale,r)),e.minScale&&(n=Math.max(e.minScale,n),r=Math.max(e.minScale,r)),e.center&&(h=e.center.x,p=e.center.y),n=this.clampScale(n),r=this.clampScale(r),this.scale(n,r,h,p),this}getRotation(){return qY(this.getMatrix())}rotate(t,e,n){if(e==null||n==null){const l=il(this.stage);e=l.width/2,n=l.height/2}const r=this.getMatrix().translate(e,n).rotate(t).translate(-e,-n);return this.setMatrix(r),this}getTranslation(){return YY(this.getMatrix())}translate(t,e){const n=this.getMatrix();n.e=t||0,n.f=e||0,this.setMatrix(n);const r=this.getTranslation();return this.options.x=r.tx,this.options.y=r.ty,this.graph.trigger("translate",Object.assign({},r)),this}setOrigin(t,e){return this.translate(t||0,e||0)}fitToContent(t,e,n,r){if(typeof t=="object"){const _=t;t=_.gridWidth||1,e=_.gridHeight||1,n=_.padding||0,r=_}else t=t||1,e=e||1,n=n||0,r==null&&(r={});const l=fa(n),f=r.border||0,h=r.contentArea?Dt.create(r.contentArea):this.getContentArea(r);f>0&&h.inflate(f);const p=this.getScale(),y=this.getTranslation(),x=p.sx,S=p.sy;h.x*=x,h.y*=S,h.width*=x,h.height*=S;let w=Math.max(Math.ceil((h.width+h.x)/t),1)*t,T=Math.max(Math.ceil((h.height+h.y)/e),1)*e,M=0,D=0;(r.allowNewOrigin==="negative"&&h.x<0||r.allowNewOrigin==="positive"&&h.x>=0||r.allowNewOrigin==="any")&&(M=Math.ceil(-h.x/t)*t,M+=l.left,w+=M),(r.allowNewOrigin==="negative"&&h.y<0||r.allowNewOrigin==="positive"&&h.y>=0||r.allowNewOrigin==="any")&&(D=Math.ceil(-h.y/e)*e,D+=l.top,T+=D),w+=l.right,T+=l.bottom,w=Math.max(w,r.minWidth||0),T=Math.max(T,r.minHeight||0),w=Math.min(w,r.maxWidth||Number.MAX_SAFE_INTEGER),T=Math.min(T,r.maxHeight||Number.MAX_SAFE_INTEGER);const R=this.getComputedSize(),N=w!==R.width||T!==R.height;return(M!==y.tx||D!==y.ty)&&this.translate(M,D),N&&this.resize(w,T),new Dt(-M/x,-D/S,w/x,T/S)}scaleContentToFit(t={}){this.scaleContentToFitImpl(t)}scaleContentToFitImpl(t={},e=!0){let n,r;if(t.contentArea){const N=t.contentArea;n=this.graph.localToGraph(N),r=G.create(N)}else n=this.getContentBBox(t),r=this.graph.graphToLocal(n);if(!n.width||!n.height)return;const l=fa(t.padding),f=t.minScale||0,h=t.maxScale||Number.MAX_SAFE_INTEGER,p=t.minScaleX||f,y=t.maxScaleX||h,x=t.minScaleY||f,S=t.maxScaleY||h;let w;if(t.viewportArea)w=t.viewportArea;else{const N=this.getComputedSize(),L=this.getTranslation();w={x:L.tx,y:L.ty,width:N.width,height:N.height}}w=Dt.create(w).moveAndExpand({x:l.left,y:l.top,width:-l.left-l.right,height:-l.top-l.bottom});const T=this.getScale();let M=w.width/n.width*T.sx,D=w.height/n.height*T.sy;t.preserveAspectRatio!==!1&&(M=D=Math.min(M,D));const R=t.scaleGrid;if(R&&(M=R*Math.floor(M/R),D=R*Math.floor(D/R)),M=Rh(M,p,y),D=Rh(D,x,S),this.scale(M,D),e){const N=this.options,L=w.x-r.x*M-N.x,_=w.y-r.y*D-N.y;this.translate(L,_)}}getContentArea(t={}){return t.useCellGeometry!==!1?this.model.getAllCellsBBox()||new Dt:il(this.stage)}getContentBBox(t={}){return this.graph.localToGraph(this.getContentArea(t))}getGraphArea(){const t=Dt.fromSize(this.getComputedSize());return this.graph.graphToLocal(t)}zoomToRect(t,e={}){const n=Dt.create(t),r=this.graph;e.contentArea=n,e.viewportArea==null&&(e.viewportArea={x:r.options.x,y:r.options.y,width:this.options.width,height:this.options.height}),this.scaleContentToFitImpl(e,!1);const l=n.getCenter();return this.centerPoint(l.x,l.y),this}zoomToFit(t={}){return this.zoomToRect(this.getContentArea(t),t)}centerPoint(t,e){const n=this.getComputedSize(),r=this.getScale(),l=this.getTranslation(),f=n.width/2,h=n.height/2;t=typeof t=="number"?t:f,e=typeof e=="number"?e:h,t=f-t*r.sx,e=h-e*r.sy,(l.tx!==t||l.ty!==e)&&this.translate(t,e)}centerContent(t){const n=this.graph.getContentArea(t).getCenter();this.centerPoint(n.x,n.y)}centerCell(t){return this.positionCell(t,"center")}positionPoint(t,e,n){const r=this.getComputedSize();e=So(e,Math.max(0,r.width)),e<0&&(e=r.width+e),n=So(n,Math.max(0,r.height)),n<0&&(n=r.height+n);const l=this.getTranslation(),f=this.getScale(),h=e-t.x*f.sx,p=n-t.y*f.sy;(l.tx!==h||l.ty!==p)&&this.translate(h,p)}positionRect(t,e){const n=Dt.create(t);switch(e){case"center":return this.positionPoint(n.getCenter(),"50%","50%");case"top":return this.positionPoint(n.getTopCenter(),"50%",0);case"top-right":return this.positionPoint(n.getTopRight(),"100%",0);case"right":return this.positionPoint(n.getRightMiddle(),"100%","50%");case"bottom-right":return this.positionPoint(n.getBottomRight(),"100%","100%");case"bottom":return this.positionPoint(n.getBottomCenter(),"50%","100%");case"bottom-left":return this.positionPoint(n.getBottomLeft(),0,"100%");case"left":return this.positionPoint(n.getLeftMiddle(),0,"50%");case"top-left":return this.positionPoint(n.getTopLeft(),0,0);default:return this}}positionCell(t,e){const n=t.getBBox();return this.positionRect(n,e)}positionContent(t,e){const n=this.graph.getContentArea(e);return this.positionRect(n,t)}}const Uu=`${He.prefixCls}-graph`;class lc extends to{static snapshoot(t){const e=t.cloneNode();return t.childNodes.forEach(n=>{e.appendChild(n)}),()=>{for(db(t);t.attributes.length>0;)t.removeAttribute(t.attributes[0].name);for(let n=0,r=e.attributes.length;n<r;n+=1){const l=e.attributes[n];t.setAttribute(l.name,l.value)}e.childNodes.forEach(n=>{t.appendChild(n)})}}get disposeContainer(){return!1}get options(){return this.graph.options}constructor(t){super(),this.graph=t;const{selectors:e,fragment:n}=hs.parseJSONMarkup(lc.markup);this.background=e.background,this.grid=e.grid,this.svg=e.svg,this.defs=e.defs,this.viewport=e.viewport,this.primer=e.primer,this.stage=e.stage,this.decorator=e.decorator,this.overlay=e.overlay,this.container=this.options.container,this.restore=lc.snapshoot(this.container),_t(this.container,this.prefixClassName("graph")),qi(this.container,n),this.delegateEvents()}delegateEvents(){const t=this.constructor;return super.delegateEvents(t.events),this}guard(t,e){return t.type==="mousedown"&&t.button===2||this.options.guard&&this.options.guard(t,e)?!0:t.data&&t.data.guarded!==void 0?t.data.guarded:!(e&&e.cell&&Me.isCell(e.cell)||this.svg===t.target||this.container===t.target||this.svg.contains(t.target))}findView(t){return this.graph.findViewByElem(t)}onDblClick(t){this.options.preventDefaultDblClick&&t.preventDefault();const e=this.normalizeEvent(t),n=this.findView(e.target);if(this.guard(e,n))return;const r=this.graph.snapToGrid(e.clientX,e.clientY);n?n.onDblClick(e,r.x,r.y):this.graph.trigger("blank:dblclick",{e,x:r.x,y:r.y})}onClick(t){if(this.getMouseMovedCount(t)<=this.options.clickThreshold){const e=this.normalizeEvent(t),n=this.findView(e.target);if(this.guard(e,n))return;const r=this.graph.snapToGrid(e.clientX,e.clientY);n?n.onClick(e,r.x,r.y):this.graph.trigger("blank:click",{e,x:r.x,y:r.y})}}isPreventDefaultContextMenu(t){let e=this.options.preventDefaultContextMenu;return typeof e=="function"&&(e=Gt(e,this.graph,{view:t})),e}onContextMenu(t){const e=this.normalizeEvent(t),n=this.findView(e.target);if(this.isPreventDefaultContextMenu(n)&&t.preventDefault(),this.guard(e,n))return;const r=this.graph.snapToGrid(e.clientX,e.clientY);n?n.onContextMenu(e,r.x,r.y):this.graph.trigger("blank:contextmenu",{e,x:r.x,y:r.y})}delegateDragEvents(t,e){t.data==null&&(t.data={}),this.setEventData(t,{currentView:e||null,mouseMovedCount:0,startPosition:{x:t.clientX,y:t.clientY}});const n=this.constructor;this.delegateDocumentEvents(n.documentEvents,t.data),this.undelegateEvents()}getMouseMovedCount(t){return this.getEventData(t).mouseMovedCount||0}onMouseDown(t){const e=this.normalizeEvent(t),n=this.findView(e.target);if(this.guard(e,n))return;this.options.preventDefaultMouseDown&&t.preventDefault();const r=this.graph.snapToGrid(e.clientX,e.clientY);n?n.onMouseDown(e,r.x,r.y):(this.options.preventDefaultBlankAction&&["touchstart"].includes(e.type)&&t.preventDefault(),this.graph.trigger("blank:mousedown",{e,x:r.x,y:r.y})),this.delegateDragEvents(e,n)}onMouseMove(t){const e=this.getEventData(t),n=e.startPosition;if(n&&n.x===t.clientX&&n.y===t.clientY||(e.mouseMovedCount==null&&(e.mouseMovedCount=0),e.mouseMovedCount+=1,e.mouseMovedCount<=this.options.moveThreshold))return;const l=this.normalizeEvent(t),f=this.graph.snapToGrid(l.clientX,l.clientY),h=e.currentView;h?h.onMouseMove(l,f.x,f.y):this.graph.trigger("blank:mousemove",{e:l,x:f.x,y:f.y}),this.setEventData(l,e)}onMouseUp(t){this.undelegateDocumentEvents();const e=this.normalizeEvent(t),n=this.graph.snapToGrid(e.clientX,e.clientY),l=this.getEventData(t).currentView;if(l?l.onMouseUp(e,n.x,n.y):this.graph.trigger("blank:mouseup",{e,x:n.x,y:n.y}),!t.isPropagationStopped()){const f=new sc(t,{type:"click",data:t.data});this.onClick(f)}t.stopImmediatePropagation(),this.delegateEvents()}onMouseOver(t){const e=this.normalizeEvent(t),n=this.findView(e.target);if(!this.guard(e,n))if(n)n.onMouseOver(e);else{if(this.container===e.target)return;this.graph.trigger("blank:mouseover",{e})}}onMouseOut(t){const e=this.normalizeEvent(t),n=this.findView(e.target);if(!this.guard(e,n))if(n)n.onMouseOut(e);else{if(this.container===e.target)return;this.graph.trigger("blank:mouseout",{e})}}onMouseEnter(t){const e=this.normalizeEvent(t),n=this.findView(e.target);if(this.guard(e,n))return;const r=this.graph.findViewByElem(e.relatedTarget);if(n){if(r===n)return;n.onMouseEnter(e)}else{if(r)return;this.graph.trigger("graph:mouseenter",{e})}}onMouseLeave(t){const e=this.normalizeEvent(t),n=this.findView(e.target);if(this.guard(e,n))return;const r=this.graph.findViewByElem(e.relatedTarget);if(n){if(r===n)return;n.onMouseLeave(e)}else{if(r)return;this.graph.trigger("graph:mouseleave",{e})}}onMouseWheel(t){const e=this.normalizeEvent(t),n=this.findView(e.target);if(this.guard(e,n))return;const r=e.originalEvent,l=this.graph.snapToGrid(r.clientX,r.clientY),f=Math.max(-1,Math.min(1,r.wheelDelta||-r.detail));n?n.onMouseWheel(e,l.x,l.y,f):this.graph.trigger("blank:mousewheel",{e,delta:f,x:l.x,y:l.y})}onCustomEvent(t){const e=t.currentTarget,n=e.getAttribute("event")||e.getAttribute("data-event");if(n){const r=this.findView(e);if(r){const l=this.normalizeEvent(t);if(this.guard(l,r))return;const f=this.graph.snapToGrid(l.clientX,l.clientY);r.onCustomEvent(l,n,f.x,f.y)}}}handleMagnetEvent(t,e){const n=t.currentTarget,r=n.getAttribute("magnet");if(r&&r.toLowerCase()!=="false"){const l=this.findView(n);if(l){const f=this.normalizeEvent(t);if(this.guard(f,l))return;const h=this.graph.snapToGrid(f.clientX,f.clientY);Gt(e,this.graph,l,f,n,h.x,h.y)}}}onMagnetMouseDown(t){this.handleMagnetEvent(t,(e,n,r,l,f)=>{e.onMagnetMouseDown(n,r,l,f)})}onMagnetDblClick(t){this.handleMagnetEvent(t,(e,n,r,l,f)=>{e.onMagnetDblClick(n,r,l,f)})}onMagnetContextMenu(t){const e=this.findView(t.target);this.isPreventDefaultContextMenu(e)&&t.preventDefault(),this.handleMagnetEvent(t,(n,r,l,f,h)=>{n.onMagnetContextMenu(r,l,f,h)})}onLabelMouseDown(t){const e=t.currentTarget,n=this.findView(e);if(n){const r=this.normalizeEvent(t);if(this.guard(r,n))return;const l=this.graph.snapToGrid(r.clientX,r.clientY);n.onLabelMouseDown(r,l.x,l.y)}}onImageDragStart(){return!1}dispose(){this.undelegateEvents(),this.undelegateDocumentEvents(),this.restore(),this.restore=()=>{}}}lc.markup=[{ns:Di.xhtml,tagName:"div",selector:"background",className:`${Uu}-background`},{ns:Di.xhtml,tagName:"div",selector:"grid",className:`${Uu}-grid`},{ns:Di.svg,tagName:"svg",selector:"svg",className:`${Uu}-svg`,attrs:{width:"100%",height:"100%","xmlns:xlink":Di.xlink},children:[{tagName:"defs",selector:"defs"},{tagName:"g",selector:"viewport",className:`${Uu}-svg-viewport`,children:[{tagName:"g",selector:"primer",className:`${Uu}-svg-primer`},{tagName:"g",selector:"stage",className:`${Uu}-svg-stage`},{tagName:"g",selector:"decorator",className:`${Uu}-svg-decorator`},{tagName:"g",selector:"overlay",className:`${Uu}-svg-overlay`}]}]}],lc.events={dblclick:"onDblClick",contextmenu:"onContextMenu",touchstart:"onMouseDown",mousedown:"onMouseDown",mouseover:"onMouseOver",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",mousewheel:"onMouseWheel",DOMMouseScroll:"onMouseWheel",[`mouseenter .${He.prefixCls}-cell`]:"onMouseEnter",[`mouseleave .${He.prefixCls}-cell`]:"onMouseLeave",[`mouseenter .${He.prefixCls}-cell-tools`]:"onMouseEnter",[`mouseleave .${He.prefixCls}-cell-tools`]:"onMouseLeave",[`mousedown .${He.prefixCls}-cell [event]`]:"onCustomEvent",[`touchstart .${He.prefixCls}-cell [event]`]:"onCustomEvent",[`mousedown .${He.prefixCls}-cell [data-event]`]:"onCustomEvent",[`touchstart .${He.prefixCls}-cell [data-event]`]:"onCustomEvent",[`dblclick .${He.prefixCls}-cell [magnet]`]:"onMagnetDblClick",[`contextmenu .${He.prefixCls}-cell [magnet]`]:"onMagnetContextMenu",[`mousedown .${He.prefixCls}-cell [magnet]`]:"onMagnetMouseDown",[`touchstart .${He.prefixCls}-cell [magnet]`]:"onMagnetMouseDown",[`dblclick .${He.prefixCls}-cell [data-magnet]`]:"onMagnetDblClick",[`contextmenu .${He.prefixCls}-cell [data-magnet]`]:"onMagnetContextMenu",[`mousedown .${He.prefixCls}-cell [data-magnet]`]:"onMagnetMouseDown",[`touchstart .${He.prefixCls}-cell [data-magnet]`]:"onMagnetMouseDown",[`dragstart .${He.prefixCls}-cell image`]:"onImageDragStart",[`mousedown .${He.prefixCls}-edge .${He.prefixCls}-edge-label`]:"onLabelMouseDown",[`touchstart .${He.prefixCls}-edge .${He.prefixCls}-edge-label`]:"onLabelMouseDown"},lc.documentEvents={mousemove:"onMouseMove",touchmove:"onMouseMove",mouseup:"onMouseUp",touchend:"onMouseUp",touchcancel:"onMouseUp"},De([Re()],lc.prototype,"dispose",null);const r6=120;class a6 extends lr{init(){this.resetRenderArea=Aq(this.resetRenderArea,200,{leading:!0}),this.resetRenderArea(),this.startListening()}bindScrollerEvents(t){this.scrollerRef=t,typeof t.on=="function"&&(t.on("pan:start",this.resetRenderArea,this),t.on("panning",this.resetRenderArea,this),t.on("pan:stop",this.resetRenderArea,this));const e=t.container;e&&(this.scrollerScrollHandler=n=>{this.resetRenderArea()},nn.on(e,"scroll",this.scrollerScrollHandler))}startListening(){this.graph.on("translate",this.resetRenderArea,this),this.graph.on("scale",this.resetRenderArea,this),this.graph.on("resize",this.resetRenderArea,this);const t=this.graph.getPlugin("scroller");t&&this.bindScrollerEvents(t)}stopListening(){this.graph.off("translate",this.resetRenderArea,this),this.graph.off("scale",this.resetRenderArea,this),this.graph.off("resize",this.resetRenderArea,this),this.unbindScroller()}onScrollerReady(t){this.scrollerRef!==t&&(this.unbindScroller(),this.bindScrollerEvents(t),this.resetRenderArea())}unbindScroller(){if(this.scrollerRef){typeof this.scrollerRef.off=="function"&&(this.scrollerRef.off("pan:start",this.resetRenderArea,this),this.scrollerRef.off("panning",this.resetRenderArea,this),this.scrollerRef.off("pan:stop",this.resetRenderArea,this));const t=this.scrollerRef.container;t&&this.scrollerScrollHandler&&nn.off(t,"scroll",this.scrollerScrollHandler),this.scrollerRef=void 0,this.scrollerScrollHandler=void 0}}setVirtualEnabled(t){const e=this.options.virtual;if(typeof e=="object"){const n=e;this.options.virtual=Object.assign(Object.assign({},n),{enabled:t})}else this.options.virtual=t}enableVirtualRender(){this.setVirtualEnabled(!0),this.resetRenderArea()}disableVirtualRender(){this.setVirtualEnabled(!1),this.graph.renderer.setRenderArea(void 0)}isVirtualEnabled(){const t=this.options.virtual;return t!=null&&typeof t=="object"?t.enabled!==!1:!!t}getVirtualMargin(){const t=this.options.virtual;if(typeof t=="object"){const e=t.margin;return typeof e=="number"?e:r6}return r6}resetRenderArea(){if(this.isVirtualEnabled()){const e=this.graph.getGraphArea();if(e){const n=this.getVirtualMargin(),r=e.clone();r.inflate(n,n),this.graph.renderer.setRenderArea(r);return}}}dispose(){this.stopListening()}}De([Re()],a6.prototype,"dispose",null);class dt extends Ts{static isGraph(t){if(t==null)return!1;if(t instanceof dt)return!0;const e=t[Symbol.toStringTag];return e==null||e===dt.toStringTag}static render(t,e){const n=t instanceof HTMLElement?new dt({container:t}):new dt(t);return e!=null&&n.fromJSON(e),n}get container(){return this.options.container}get[Symbol.toStringTag](){return dt.toStringTag}constructor(t){super(),this.installedPlugins=new Set,this.options=DF(t),this.css=new t6(this),this.view=new lc(this),this.defs=new OF(this),this.coord=new TF(this),this.transform=new zF(this),this.highlight=new n6(this),this.grid=new e6(this),this.background=new zT(this),this.options.model?this.model=this.options.model:(this.model=new wo,this.model.graph=this),this.renderer=new WL(this),this.panning=new s6(this),this.mousewheel=new i6(this),this.virtualRender=new a6(this),this.size=new o6(this)}isNode(t){return t.isNode()}isEdge(t){return t.isEdge()}resetCells(t,e={}){return this.model.resetCells(t,e),this}clearCells(t={}){return this.model.clear(t),this}toJSON(t={}){return this.model.toJSON(t)}parseJSON(t){return this.model.parseJSON(t)}fromJSON(t,e={}){return this.model.fromJSON(t,e),this}getCellById(t){return this.model.getCell(t)}addNode(t,e={}){return this.model.addNode(t,e)}addNodes(t,e={}){return this.addCell(t.map(n=>Li.isNode(n)?n:this.createNode(n)),e)}createNode(t){return this.model.createNode(t)}removeNode(t,e={}){return this.model.removeCell(t,e)}addEdge(t,e={}){return this.model.addEdge(t,e)}addEdges(t,e={}){return this.addCell(t.map(n=>xi.isEdge(n)?n:this.createEdge(n)),e)}removeEdge(t,e={}){return this.model.removeCell(t,e)}createEdge(t){return this.model.createEdge(t)}addCell(t,e={}){return this.model.addCell(t,e),this}removeCell(t,e={}){return this.model.removeCell(t,e)}removeCells(t,e={}){return this.model.removeCells(t,e)}removeConnectedEdges(t,e={}){return this.model.removeConnectedEdges(t,e)}disconnectConnectedEdges(t,e={}){return this.model.disconnectConnectedEdges(t,e),this}hasCell(t){return this.model.has(t)}getCells(){return this.model.getCells()}getCellCount(){return this.model.total()}getNodes(){return this.model.getNodes()}getEdges(){return this.model.getEdges()}getOutgoingEdges(t){return this.model.getOutgoingEdges(t)}getIncomingEdges(t){return this.model.getIncomingEdges(t)}getConnectedEdges(t,e={}){return this.model.getConnectedEdges(t,e)}getRootNodes(){return this.model.getRoots()}getLeafNodes(){return this.model.getLeafs()}isRootNode(t){return this.model.isRoot(t)}isLeafNode(t){return this.model.isLeaf(t)}getNeighbors(t,e={}){return this.model.getNeighbors(t,e)}isNeighbor(t,e,n={}){return this.model.isNeighbor(t,e,n)}getSuccessors(t,e={}){return this.model.getSuccessors(t,e)}isSuccessor(t,e,n={}){return this.model.isSuccessor(t,e,n)}getPredecessors(t,e={}){return this.model.getPredecessors(t,e)}isPredecessor(t,e,n={}){return this.model.isPredecessor(t,e,n)}getCommonAncestor(...t){return this.model.getCommonAncestor(...t)}getSubGraph(t,e={}){return this.model.getSubGraph(t,e)}cloneSubGraph(t,e={}){return this.model.cloneSubGraph(t,e)}cloneCells(t){return this.model.cloneCells(t)}getNodesFromPoint(t,e){return this.model.getNodesFromPoint(t,e)}getNodesInArea(t,e,n,r,l){return this.model.getNodesInArea(t,e,n,r,l)}getNodesUnderNode(t,e={}){return this.model.getNodesUnderNode(t,e)}searchCell(t,e,n={}){return this.model.search(t,e,n),this}getShortestPath(t,e,n={}){return this.model.getShortestPath(t,e,n)}getAllCellsBBox(){return this.model.getAllCellsBBox()}getCellsBBox(t,e={}){return this.model.getCellsBBox(t,e)}startBatch(t,e={}){this.model.startBatch(t,e)}stopBatch(t,e={}){this.model.stopBatch(t,e)}batchUpdate(t,e,n){const r=typeof t=="string"?t:"update",l=typeof t=="string"?e:t,f=typeof e=="function"?n:e;this.startBatch(r,f);const h=l();return this.stopBatch(r,f),h}updateCellId(t,e){return this.model.updateCellId(t,e)}findView(t){return Me.isCell(t)?this.findViewByCell(t):this.findViewByElem(t)}findViews(t){return Dt.isRectangleLike(t)?this.findViewsInArea(t):G.isPointLike(t)?this.findViewsFromPoint(t):[]}findViewByCell(t){return this.renderer.findViewByCell(t)}findViewByElem(t){return this.renderer.findViewByElem(t)}findViewsFromPoint(t,e){const n=typeof t=="number"?{x:t,y:e}:t;return this.renderer.findViewsFromPoint(n)}findViewsInArea(t,e,n,r,l){const f=typeof t=="number"?{x:t,y:e,width:n,height:r}:t,h=typeof t=="number"?l:e;return this.renderer.findViewsInArea(f,h)}matrix(t){return typeof t>"u"?this.transform.getMatrix():(this.transform.setMatrix(t),this)}resize(t,e){const n=this.getPlugin("scroller");return n?n.resize(t,e):this.transform.resize(t,e),this}scale(t,e=t,n=0,r=0){return typeof t>"u"?this.transform.getScale():(this.transform.scale(t,e,n,r),this)}zoom(t,e){const n=this.getPlugin("scroller");if(n){if(typeof t>"u")return n.zoom();n.zoom(t,e)}else{if(typeof t>"u")return this.transform.getZoom();this.transform.zoom(t,e)}return this}zoomTo(t,e={}){const n=this.getPlugin("scroller");return n?n.zoom(t,Object.assign(Object.assign({},e),{absolute:!0})):this.transform.zoom(t,Object.assign(Object.assign({},e),{absolute:!0})),this}zoomToRect(t,e={}){const n=this.getPlugin("scroller");return n?n.zoomToRect(t,e):this.transform.zoomToRect(t,e),this}zoomToFit(t={}){const e=this.getPlugin("scroller");return e?e.zoomToFit(t):this.transform.zoomToFit(t),this}rotate(t,e,n){return typeof t>"u"?this.transform.getRotation():(this.transform.rotate(t,e,n),this)}translate(t,e){return typeof t>"u"?this.transform.getTranslation():(this.transform.translate(t,e),this)}translateBy(t,e){const n=this.translate(),r=n.tx+t,l=n.ty+e;return this.translate(r,l)}getGraphArea(){var t;const e=this.getPlugin("scroller");if(e){const n=(t=e.getVisibleArea)===null||t===void 0?void 0:t.call(e);if(n)return n}return this.transform.getGraphArea()}getContentArea(t={}){return this.transform.getContentArea(t)}getContentBBox(t={}){return this.transform.getContentBBox(t)}fitToContent(t,e,n,r){return this.transform.fitToContent(t,e,n,r)}scaleContentToFit(t={}){return this.transform.scaleContentToFit(t),this}center(t){return this.centerPoint(t)}centerPoint(t,e,n){const r=this.getPlugin("scroller");return r?r.centerPoint(t,e,n):this.transform.centerPoint(t,e),this}centerContent(t){const e=this.getPlugin("scroller");return e?e.centerContent(t):this.transform.centerContent(t),this}centerCell(t,e){const n=this.getPlugin("scroller");return n?n.centerCell(t,e):this.transform.centerCell(t),this}positionPoint(t,e,n,r={}){const l=this.getPlugin("scroller");return l?l.positionPoint(t,e,n,r):this.transform.positionPoint(t,e,n),this}positionRect(t,e,n){const r=this.getPlugin("scroller");return r?r.positionRect(t,e,n):this.transform.positionRect(t,e),this}positionCell(t,e,n){const r=this.getPlugin("scroller");return r?r.positionCell(t,e,n):this.transform.positionCell(t,e),this}positionContent(t,e){const n=this.getPlugin("scroller");return n?n.positionContent(t,e):this.transform.positionContent(t,e),this}snapToGrid(t,e){return this.coord.snapToGrid(t,e)}pageToLocal(t,e,n,r){return Dt.isRectangleLike(t)?this.coord.pageToLocalRect(t):typeof t=="number"&&typeof e=="number"&&typeof n=="number"&&typeof r=="number"?this.coord.pageToLocalRect(t,e,n,r):this.coord.pageToLocalPoint(t,e)}localToPage(t,e,n,r){return Dt.isRectangleLike(t)?this.coord.localToPageRect(t):typeof t=="number"&&typeof e=="number"&&typeof n=="number"&&typeof r=="number"?this.coord.localToPageRect(t,e,n,r):this.coord.localToPagePoint(t,e)}clientToLocal(t,e,n,r){return Dt.isRectangleLike(t)?this.coord.clientToLocalRect(t):typeof t=="number"&&typeof e=="number"&&typeof n=="number"&&typeof r=="number"?this.coord.clientToLocalRect(t,e,n,r):this.coord.clientToLocalPoint(t,e)}localToClient(t,e,n,r){return Dt.isRectangleLike(t)?this.coord.localToClientRect(t):typeof t=="number"&&typeof e=="number"&&typeof n=="number"&&typeof r=="number"?this.coord.localToClientRect(t,e,n,r):this.coord.localToClientPoint(t,e)}localToGraph(t,e,n,r){return Dt.isRectangleLike(t)?this.coord.localToGraphRect(t):typeof t=="number"&&typeof e=="number"&&typeof n=="number"&&typeof r=="number"?this.coord.localToGraphRect(t,e,n,r):this.coord.localToGraphPoint(t,e)}graphToLocal(t,e,n,r){return Dt.isRectangleLike(t)?this.coord.graphToLocalRect(t):typeof t=="number"&&typeof e=="number"&&typeof n=="number"&&typeof r=="number"?this.coord.graphToLocalRect(t,e,n,r):this.coord.graphToLocalPoint(t,e)}clientToGraph(t,e,n,r){return Dt.isRectangleLike(t)?this.coord.clientToGraphRect(t):typeof t=="number"&&typeof e=="number"&&typeof n=="number"&&typeof r=="number"?this.coord.clientToGraphRect(t,e,n,r):this.coord.clientToGraphPoint(t,e)}defineFilter(t){return this.defs.filter(t)}defineGradient(t){return this.defs.gradient(t)}defineMarker(t){return this.defs.marker(t)}getGridSize(){return this.grid.getGridSize()}setGridSize(t){return this.grid.setGridSize(t),this}showGrid(){return this.grid.show(),this}hideGrid(){return this.grid.hide(),this}clearGrid(){return this.grid.clear(),this}drawGrid(t){return this.grid.draw(t),this}updateBackground(){return this.background.update(),this}drawBackground(t,e){const n=this.getPlugin("scroller");return n!=null&&(this.options.background==null||!e)?n.drawBackground(t,e):this.background.draw(t),this}clearBackground(t){const e=this.getPlugin("scroller");return e!=null&&(this.options.background==null||!t)?e.clearBackground(t):this.background.clear(),this}enableVirtualRender(){return this.virtualRender.enableVirtualRender(),this}disableVirtualRender(){return this.virtualRender.disableVirtualRender(),this}isMouseWheelEnabled(){return!this.mousewheel.disabled}enableMouseWheel(){return this.mousewheel.enable(),this}disableMouseWheel(){return this.mousewheel.disable(),this}toggleMouseWheel(t){return t==null?this.isMouseWheelEnabled()?this.disableMouseWheel():this.enableMouseWheel():t?this.enableMouseWheel():this.disableMouseWheel(),this}isPannable(){const t=this.getPlugin("scroller");return t?t.isPannable():this.panning.pannable}enablePanning(){const t=this.getPlugin("scroller");return t?t.enablePanning():this.panning.enablePanning(),this}disablePanning(){const t=this.getPlugin("scroller");return t?t.disablePanning():this.panning.disablePanning(),this}togglePanning(t){return t==null?this.isPannable()?this.disablePanning():this.enablePanning():t!==this.isPannable()&&(t?this.enablePanning():this.disablePanning()),this}handleScrollerPluginStateChange(t,e){t.name==="scroller"&&(e?this.virtualRender.onScrollerReady(t):this.virtualRender.unbindScroller())}use(t,...e){return this.installedPlugins.has(t)||(this.installedPlugins.add(t),t.init(this,...e),this.handleScrollerPluginStateChange(t,!0)),this}getPlugin(t){return Array.from(this.installedPlugins).find(e=>e.name===t)}getPlugins(t){return Array.from(this.installedPlugins).filter(e=>t.includes(e.name))}enablePlugins(t){let e=t;Array.isArray(e)||(e=[e]);const n=this.getPlugins(e);return n==null||n.forEach(r=>{var l;(l=r==null?void 0:r.enable)===null||l===void 0||l.call(r),this.handleScrollerPluginStateChange(r,!0)}),this}disablePlugins(t){let e=t;Array.isArray(e)||(e=[e]);const n=this.getPlugins(e);return n==null||n.forEach(r=>{var l;(l=r==null?void 0:r.disable)===null||l===void 0||l.call(r),this.handleScrollerPluginStateChange(r,!1)}),this}isPluginEnabled(t){var e;const n=this.getPlugin(t);return(e=n==null?void 0:n.isEnabled)===null||e===void 0?void 0:e.call(n)}disposePlugins(t){let e=t;Array.isArray(e)||(e=[e]);const n=this.getPlugins(e);return n==null||n.forEach(r=>{r.dispose(),this.handleScrollerPluginStateChange(r,!1),this.installedPlugins.delete(r)}),this}dispose(t=!0){t&&this.model.dispose(),this.css.dispose(),this.defs.dispose(),this.grid.dispose(),this.coord.dispose(),this.transform.dispose(),this.highlight.dispose(),this.background.dispose(),this.mousewheel.dispose(),this.panning.dispose(),this.view.dispose(),this.renderer.dispose(),this.installedPlugins.forEach(e=>{e.dispose()})}}dt.toStringTag=`X6.${dt.name}`,dt.registerNode=Li.registry.register,dt.registerEdge=xi.registry.register,dt.registerView=Ni.registry.register,dt.registerAttr=Eb.register,dt.registerGrid=Rb.register,dt.registerFilter=Db.register,dt.registerNodeTool=Vb.register,dt.registerEdgeTool=Gb.register,dt.registerBackground=cS.register,dt.registerHighlighter=zb.register,dt.registerPortLayout=jb.register,dt.registerPortLabelLayout=yS.register,dt.registerMarker=wb.register,dt.registerRouter=hp.register,dt.registerConnector=Mb.register,dt.registerAnchor=Nb.register,dt.registerEdgeAnchor=Ob.register,dt.registerConnectionPoint=Ab.register,dt.unregisterNode=Li.registry.unregister,dt.unregisterEdge=xi.registry.unregister,dt.unregisterView=Ni.registry.unregister,dt.unregisterAttr=Eb.unregister,dt.unregisterGrid=Rb.unregister,dt.unregisterFilter=Db.unregister,dt.unregisterNodeTool=Vb.unregister,dt.unregisterEdgeTool=Gb.unregister,dt.unregisterBackground=cS.unregister,dt.unregisterHighlighter=zb.unregister,dt.unregisterPortLayout=jb.unregister,dt.unregisterPortLabelLayout=yS.unregister,dt.unregisterMarker=wb.unregister,dt.unregisterRouter=hp.unregister,dt.unregisterConnector=Mb.unregister,dt.unregisterAnchor=Nb.unregister,dt.unregisterEdgeAnchor=Ob.unregister,dt.unregisterConnectionPoint=Ab.unregister,De([Re()],dt.prototype,"dispose",null);const NT="html",LT={};class l6 extends Li{static register(t){const{shape:e,html:n,effect:r,inherit:l}=t,f=re(t,["shape","html","effect","inherit"]);if(!e)throw new Error("HTML.register should specify `shape` in config.");LT[e]={html:n,effect:r},dt.registerNode(e,Object.assign({inherit:l||"html"},f),!0)}}l6.config({view:"html-view",markup:[{tagName:"rect",selector:"body"},Object.assign({},hs.getForeignObjectMarkup()),{tagName:"text",selector:"label"}],attrs:{body:{fill:"none",stroke:"none",refWidth:"100%",refHeight:"100%"},fo:{refWidth:"100%",refHeight:"100%"}}}),Li.registry.register("html",l6,!0);class jT extends cr{init(){super.init(),this.cell.on("change:*",this.onCellChangeAny,this)}onCellChangeAny({key:t}){const e=LT[this.cell.shape];if(e){const{effect:n}=e;(!n||n.includes(t))&&this.renderHTMLComponent()}}confirmUpdate(t){const e=super.confirmUpdate(t);return this.handleAction(e,NT,()=>this.renderHTMLComponent())}renderHTMLComponent(){const t=this.selectors&&this.selectors.foContent;if(t){db(t);const e=LT[this.cell.shape];if(!e)return;let{html:n}=e;typeof n=="function"&&(n=n(this.cell)),n&&(typeof n=="string"?t.innerHTML=n:qi(t,n))}}dispose(){this.cell.off("change:*",this.onCellChangeAny,this)}}De([Re()],jT.prototype,"dispose",null),jT.config({bootstrap:[NT],actions:{html:NT}}),cr.registry.register("html-view",jT,!0),dp("image",{attrs:{image:{refWidth:"100%",refHeight:"100%"}},propHooks:wF()},{selector:"image"}),$b.define({shape:"path",markup:[{tagName:"rect",selector:"bg"},{tagName:"path",selector:"body"},{tagName:"text",selector:"label"}],attrs:{bg:{refWidth:"100%",refHeight:"100%",fill:"none",stroke:"none",pointerEvents:"all"},body:{fill:"none",stroke:"#000",strokeWidth:2}},propHooks(s){const{path:t}=s,e=re(s,["path"]);return t&&ip(e,"attrs/body/refD",t),e}});class _T extends $b{get points(){return this.getPoints()}set points(t){this.setPoints(t)}getPoints(){return this.getAttrByPath("body/refPoints")}setPoints(t,e){return t==null?this.removePoints():this.setAttrByPath("body/refPoints",ZL(t),e),this}removePoints(){return this.removeAttrByPath("body/refPoints"),this}}_T.config({propHooks(s){const{points:t}=s,e=re(s,["points"]);if(t){const n=ZL(t);n&&ip(e,"attrs/body/refPoints",n)}return e}}),dp("polygon",{},{parent:_T}),dp("polyline",{},{parent:_T}),dp("rect",{attrs:{body:{refWidth:"100%",refHeight:"100%"}}});function NF(s){return s?{tagName:"foreignObject",selector:"foreignObject",children:[{tagName:"div",ns:Di.xhtml,selector:"label",style:{width:"100%",height:"100%",position:"static",backgroundColor:"transparent",textAlign:"center",margin:0,padding:"0px 5px",boxSizing:"border-box",display:"flex",alignItems:"center",justifyContent:"center"}}]}:{tagName:"text",selector:"label",attrs:{textAnchor:"middle"}}}const LF={shape:"text-block",markup:[{tagName:"rect",selector:"body"},NF(Lq)],attrs:{body:Object.assign(Object.assign({},IL),{refWidth:"100%",refHeight:"100%"}),foreignObject:{refWidth:"100%",refHeight:"100%"},label:{style:{fontSize:14}}},propHooks(s){const{text:t}=s,e=re(s,["text"]);return t&&ip(e,"attrs/label/text",t),e},attrHooks:{text:{set(s,{cell:t,view:e,refBBox:n,elem:r,attrs:l}){if(r instanceof HTMLElement)r.textContent=s;else{const f=l.style||{},h={text:s,width:-5,height:"100%"},p=Object.assign({textVerticalAnchor:"middle"},f),y=B3.textWrap;return Gt(y.set,this,h,{cell:t,view:e,elem:r,refBBox:n,attrs:p}),{fill:f.color||null}}},position(s,{refBBox:t,elem:e}){if(e instanceof SVGElement)return t.getCenter()}}}};$b.define(LF);const BT=`${He.prefixCls}.clipboard.cells`;function jF(s){if(window.localStorage){const t=s.map(e=>e.toJSON());localStorage.setItem(BT,JSON.stringify(t))}}function _F(){if(window.localStorage){const s=localStorage.getItem(BT),t=s?JSON.parse(s):[];if(t)return wo.fromJSON(t)}}function BF(){window.localStorage&&localStorage.removeItem(BT)}class PF{constructor(){this.cells=[]}copy(t,e,n={}){this.options=Object.assign({},n);const l=(wo.isModel(e)?e:e.model).cloneSubGraph(t,n);this.cells=NA(Object.keys(l).map(f=>l[f]),f=>f.isEdge()?2:1),this.serialize(n)}cut(t,e,n={}){this.copy(t,e,n),(dt.isGraph(e)?e.model:e).batchUpdate("cut",()=>{t.forEach(l=>l.remove())})}paste(t,e={}){const n=Object.assign(Object.assign({},this.options),e),{offset:r,edgeProps:l,nodeProps:f}=n;let h=20,p=20;r&&(h=typeof r=="number"?r:r.dx,p=typeof r=="number"?r:r.dy),this.deserialize(n);const y=this.cells;y.forEach(S=>{S.model=null,S.removeProp("zIndex"),(h||p)&&S.translate(h,p),f&&S.isNode()&&S.prop(f),l&&S.isEdge()&&S.prop(l)});const x=dt.isGraph(t)?t.model:t;return x.batchUpdate("paste",()=>{x.addCells(this.cells)}),this.copy(y,t,e),y}serialize(t){t.useLocalStorage!==!1&&jF(this.cells)}deserialize(t){if(t.useLocalStorage){const e=_F();e&&(this.cells=e)}}isEmpty(t={}){return t.useLocalStorage&&this.deserialize(t),this.cells.length<=0}clean(){this.options={},this.cells=[],BF()}}dt.prototype.isClipboardEnabled=function(){const s=this.getPlugin("clipboard");return s?s.isEnabled():!1},dt.prototype.enableClipboard=function(){const s=this.getPlugin("clipboard");return s&&s.enable(),this},dt.prototype.disableClipboard=function(){const s=this.getPlugin("clipboard");return s&&s.disable(),this},dt.prototype.toggleClipboard=function(s){const t=this.getPlugin("clipboard");return t&&t.toggleEnabled(s),this},dt.prototype.isClipboardEmpty=function(s){const t=this.getPlugin("clipboard");return t?t.isEmpty(s):!0},dt.prototype.getCellsInClipboard=function(){const s=this.getPlugin("clipboard");return s?s.getCellsInClipboard():[]},dt.prototype.cleanClipboard=function(){const s=this.getPlugin("clipboard");return s&&s.clean(),this},dt.prototype.copy=function(s,t){const e=this.getPlugin("clipboard");return e&&e.copy(s,t),this},dt.prototype.cut=function(s,t){const e=this.getPlugin("clipboard");return e&&e.cut(s,t),this},dt.prototype.paste=function(s,t){const e=this.getPlugin("clipboard");return e?e.paste(s,t):[]};class UF extends Ts{get disabled(){return this.options.enabled!==!0}get cells(){return this.clipboardImpl.cells}constructor(t={}){super(),this.name="clipboard",this.options=Object.assign({enabled:!0},t)}init(t){this.graph=t,this.clipboardImpl=new PF,this.clipboardImpl.deserialize(this.options)}isEnabled(){return!this.disabled}enable(){this.disabled&&(this.options.enabled=!0)}disable(){this.disabled||(this.options.enabled=!1)}toggleEnabled(t){return t===void 0&&(t=!this.isEnabled()),t?this.enable():this.disable(),this}isEmpty(t={}){return this.clipboardImpl.isEmpty(t)}getCellsInClipboard(){return this.cells}clean(t){return(!this.disabled||t)&&(this.clipboardImpl.clean(),this.notify("clipboard:changed",{cells:[]})),this}copy(t,e={}){return this.disabled||(this.clipboardImpl.copy(t,this.graph,Object.assign(Object.assign({},this.commonOptions),e)),this.notify("clipboard:changed",{cells:t})),this}cut(t,e={}){return this.disabled||(this.clipboardImpl.cut(t,this.graph,Object.assign(Object.assign({},this.commonOptions),e)),this.notify("clipboard:changed",{cells:t})),this}paste(t={},e=this.graph){return this.disabled?[]:this.clipboardImpl.paste(e,Object.assign(Object.assign({},this.commonOptions),t))}get commonOptions(){const t=this.options,{enabled:e}=t;return re(t,["enabled"])}notify(t,e){this.trigger(t,e),this.graph.trigger(t,e)}dispose(){this.clean(!0),this.off()}}De([Re()],UF.prototype,"dispose",null);function c6(s,t){var e=Object.keys(s);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(s);t&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(s,r).enumerable})),e.push.apply(e,n)}return e}function u6(s){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?c6(Object(e),!0).forEach(function(n){HF(s,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(e)):c6(Object(e)).forEach(function(n){Object.defineProperty(s,n,Object.getOwnPropertyDescriptor(e,n))})}return s}function PT(s){"@babel/helpers - typeof";return PT=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},PT(s)}function HF(s,t,e){return t in s?Object.defineProperty(s,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):s[t]=e,s}var qb,kF={Webkit:"-webkit-",Moz:"-moz-",ms:"-ms-",O:"-o-"};function TS(){if(qb!==void 0)return qb;qb="";var s=document.createElement("p").style,t="Transform";for(var e in kF)e+t in s&&(qb=e);return qb}function f6(){return TS()?"".concat(TS(),"TransitionProperty"):"transitionProperty"}function MS(){return TS()?"".concat(TS(),"Transform"):"transform"}function h6(s,t){var e=f6();e&&(s.style[e]=t,e!=="transitionProperty"&&(s.style.transitionProperty=t))}function UT(s,t){var e=MS();e&&(s.style[e]=t,e!=="transform"&&(s.style.transform=t))}function VF(s){return s.style.transitionProperty||s.style[f6()]}function GF(s){var t=window.getComputedStyle(s,null),e=t.getPropertyValue("transform")||t.getPropertyValue(MS());if(e&&e!=="none"){var n=e.replace(/[^0-9\-.,]/g,"").split(",");return{x:parseFloat(n[12]||n[4],0),y:parseFloat(n[13]||n[5],0)}}return{x:0,y:0}}var $F=/matrix\((.*)\)/,qF=/matrix3d\((.*)\)/;function YF(s,t){var e=window.getComputedStyle(s,null),n=e.getPropertyValue("transform")||e.getPropertyValue(MS());if(n&&n!=="none"){var r,l=n.match($F);if(l)l=l[1],r=l.split(",").map(function(h){return parseFloat(h,10)}),r[4]=t.x,r[5]=t.y,UT(s,"matrix(".concat(r.join(","),")"));else{var f=n.match(qF)[1];r=f.split(",").map(function(h){return parseFloat(h,10)}),r[12]=t.x,r[13]=t.y,UT(s,"matrix3d(".concat(r.join(","),")"))}}else UT(s,"translateX(".concat(t.x,"px) translateY(").concat(t.y,"px) translateZ(0)"))}var XF=/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source,Yb;function d6(s){var t=s.style.display;s.style.display="none",s.offsetHeight,s.style.display=t}function pp(s,t,e){var n=e;if(PT(t)==="object"){for(var r in t)t.hasOwnProperty(r)&&pp(s,r,t[r]);return}if(typeof n<"u"){typeof n=="number"&&(n="".concat(n,"px")),s.style[t]=n;return}return Yb(s,t)}function IF(s){var t,e,n,r=s.ownerDocument,l=r.body,f=r&&r.documentElement;return t=s.getBoundingClientRect(),e=Math.floor(t.left),n=Math.floor(t.top),e-=f.clientLeft||l.clientLeft||0,n-=f.clientTop||l.clientTop||0,{left:e,top:n}}function g6(s,t){var e=s["page".concat(t?"Y":"X","Offset")],n="scroll".concat(t?"Top":"Left");if(typeof e!="number"){var r=s.document;e=r.documentElement[n],typeof e!="number"&&(e=r.body[n])}return e}function p6(s){return g6(s)}function m6(s){return g6(s,!0)}function Xb(s){var t=IF(s),e=s.ownerDocument,n=e.defaultView||e.parentWindow;return t.left+=p6(n),t.top+=m6(n),t}function HT(s){return s!=null&&s==s.window}function y6(s){return HT(s)?s.document:s.nodeType===9?s:s.ownerDocument}function ZF(s,t,e){var n=e,r="",l=y6(s);return n=n||l.defaultView.getComputedStyle(s,null),n&&(r=n.getPropertyValue(t)||n[t]),r}var QF=new RegExp("^(".concat(XF,")(?!px)[a-z%]+$"),"i"),FF=/^(top|right|bottom|left)$/,kT="currentStyle",VT="runtimeStyle",Bh="left",JF="px";function KF(s,t){var e=s[kT]&&s[kT][t];if(QF.test(e)&&!FF.test(t)){var n=s.style,r=n[Bh],l=s[VT][Bh];s[VT][Bh]=s[kT][Bh],n[Bh]=t==="fontSize"?"1em":e||0,e=n.pixelLeft+JF,n[Bh]=r,s[VT][Bh]=l}return e===""?"auto":e}typeof window<"u"&&(Yb=window.getComputedStyle?ZF:KF);function OS(s,t){return s==="left"?t.useCssRight?"right":s:t.useCssBottom?"bottom":s}function b6(s){if(s==="left")return"right";if(s==="right")return"left";if(s==="top")return"bottom";if(s==="bottom")return"top"}function v6(s,t,e){pp(s,"position")==="static"&&(s.style.position="relative");var n=-999,r=-999,l=OS("left",e),f=OS("top",e),h=b6(l),p=b6(f);l!=="left"&&(n=999),f!=="top"&&(r=999);var y="",x=Xb(s);("left"in t||"top"in t)&&(y=VF(s)||"",h6(s,"none")),"left"in t&&(s.style[h]="",s.style[l]="".concat(n,"px")),"top"in t&&(s.style[p]="",s.style[f]="".concat(r,"px")),d6(s);var S=Xb(s),w={};for(var T in t)if(t.hasOwnProperty(T)){var M=OS(T,e),D=T==="left"?n:r,R=x[T]-S[T];M===T?w[M]=D+R:w[M]=D-R}pp(s,w),d6(s),("left"in t||"top"in t)&&h6(s,y);var N={};for(var L in t)if(t.hasOwnProperty(L)){var _=OS(L,e),U=t[L]-x[L];L===_?N[_]=w[_]+U:N[_]=w[_]-U}pp(s,N)}function WF(s,t){var e=Xb(s),n=GF(s),r={x:n.x,y:n.y};"left"in t&&(r.x=n.x+t.left-e.left),"top"in t&&(r.y=n.y+t.top-e.top),YF(s,r)}function tJ(s,t,e){if(e.ignoreShake){var n=Xb(s),r=n.left.toFixed(0),l=n.top.toFixed(0),f=t.left.toFixed(0),h=t.top.toFixed(0);if(r===f&&l===h)return}e.useCssRight||e.useCssBottom?v6(s,t,e):e.useCssTransform&&MS()in document.body.style?WF(s,t):v6(s,t,e)}function GT(s,t){for(var e=0;e<s.length;e++)t(s[e])}function x6(s){return Yb(s,"boxSizing")==="border-box"}var eJ=["margin","border","padding"],$T=-1,nJ=2,qT=1,iJ=0;function sJ(s,t,e){var n={},r=s.style,l;for(l in t)t.hasOwnProperty(l)&&(n[l]=r[l],r[l]=t[l]);e.call(s);for(l in t)t.hasOwnProperty(l)&&(r[l]=n[l])}function Ib(s,t,e){var n=0,r,l,f;for(l=0;l<t.length;l++)if(r=t[l],r)for(f=0;f<e.length;f++){var h=void 0;r==="border"?h="".concat(r).concat(e[f],"Width"):h=r+e[f],n+=parseFloat(Yb(s,h))||0}return n}var ol={getParent:function(t){var e=t;do e.nodeType===11&&e.host?e=e.host:e=e.parentNode;while(e&&e.nodeType!==1&&e.nodeType!==9);return e}};GT(["Width","Height"],function(s){ol["doc".concat(s)]=function(t){var e=t.document;return Math.max(e.documentElement["scroll".concat(s)],e.body["scroll".concat(s)],ol["viewport".concat(s)](e))},ol["viewport".concat(s)]=function(t){var e="client".concat(s),n=t.document,r=n.body,l=n.documentElement,f=l[e];return n.compatMode==="CSS1Compat"&&f||r&&r[e]||f}});function S6(s,t,e){var n=e;if(HT(s))return t==="width"?ol.viewportWidth(s):ol.viewportHeight(s);if(s.nodeType===9)return t==="width"?ol.docWidth(s):ol.docHeight(s);var r=t==="width"?["Left","Right"]:["Top","Bottom"],l=Math.floor(t==="width"?s.getBoundingClientRect().width:s.getBoundingClientRect().height),f=x6(s),h=0;(l==null||l<=0)&&(l=void 0,h=Yb(s,t),(h==null||Number(h)<0)&&(h=s.style[t]||0),h=Math.floor(parseFloat(h))||0),n===void 0&&(n=f?qT:$T);var p=l!==void 0||f,y=l||h;return n===$T?p?y-Ib(s,["border","padding"],r):h:p?n===qT?y:y+(n===nJ?-Ib(s,["border"],r):Ib(s,["margin"],r)):h+Ib(s,eJ.slice(n),r)}var oJ={position:"absolute",visibility:"hidden",display:"block"};function w6(){for(var s=arguments.length,t=new Array(s),e=0;e<s;e++)t[e]=arguments[e];var n,r=t[0];return r.offsetWidth!==0?n=S6.apply(void 0,t):sJ(r,oJ,function(){n=S6.apply(void 0,t)}),n}GT(["width","height"],function(s){var t=s.charAt(0).toUpperCase()+s.slice(1);ol["outer".concat(t)]=function(n,r){return n&&w6(n,s,r?iJ:qT)};var e=s==="width"?["Left","Right"]:["Top","Bottom"];ol[s]=function(n,r){var l=r;if(l!==void 0){if(n){var f=x6(n);return f&&(l+=Ib(n,["padding","border"],e)),pp(n,s,l)}return}return n&&w6(n,s,$T)}});function C6(s,t){for(var e in t)t.hasOwnProperty(e)&&(s[e]=t[e]);return s}var le={getWindow:function(t){if(t&&t.document&&t.setTimeout)return t;var e=t.ownerDocument||t;return e.defaultView||e.parentWindow},getDocument:y6,offset:function(t,e,n){if(typeof e<"u")tJ(t,e,n||{});else return Xb(t)},isWindow:HT,each:GT,css:pp,clone:function(t){var e,n={};for(e in t)t.hasOwnProperty(e)&&(n[e]=t[e]);var r=t.overflow;if(r)for(e in t)t.hasOwnProperty(e)&&(n.overflow[e]=t.overflow[e]);return n},mix:C6,getWindowScrollLeft:function(t){return p6(t)},getWindowScrollTop:function(t){return m6(t)},merge:function(){for(var t={},e=0;e<arguments.length;e++)le.mix(t,e<0||arguments.length<=e?void 0:arguments[e]);return t},viewportWidth:0,viewportHeight:0};C6(le,ol);var YT=le.getParent;function E6(s){if(le.isWindow(s)||s.nodeType===9)return null;var t=le.getDocument(s),e=t.body,n,r=le.css(s,"position"),l=r==="fixed"||r==="absolute";if(!l)return s.nodeName.toLowerCase()==="html"?null:YT(s);for(n=YT(s);n&&n!==e&&n.nodeType!==9;n=YT(n))if(r=le.css(n,"position"),r!=="static")return n;return null}var A6=le.getParent;function rJ(s){if(le.isWindow(s)||s.nodeType===9)return!1;var t=le.getDocument(s),e=t.body,n=null;for(n=A6(s);n&&n!==e&&n!==t;n=A6(n)){var r=le.css(n,"position");if(r==="fixed")return!0}return!1}function aJ(s,t){for(var e={left:0,right:1/0,top:0,bottom:1/0},n=E6(s),r=le.getDocument(s),l=r.defaultView||r.parentWindow,f=r.body,h=r.documentElement;n;){if((navigator.userAgent.indexOf("MSIE")===-1||n.clientWidth!==0)&&n!==f&&n!==h&&le.css(n,"overflow")!=="visible"){var p=le.offset(n);p.left+=n.clientLeft,p.top+=n.clientTop,e.top=Math.max(e.top,p.top),e.right=Math.min(e.right,p.left+n.clientWidth),e.bottom=Math.min(e.bottom,p.top+n.clientHeight),e.left=Math.max(e.left,p.left)}else if(n===f||n===h)break;n=E6(n)}var y=null;if(!le.isWindow(s)&&s.nodeType!==9){y=s.style.position;var x=le.css(s,"position");x==="absolute"&&(s.style.position="fixed")}var S=le.getWindowScrollLeft(l),w=le.getWindowScrollTop(l),T=le.viewportWidth(l),M=le.viewportHeight(l),D=h.scrollWidth,R=h.scrollHeight,N=window.getComputedStyle(f);if(N.overflowX==="hidden"&&(D=l.innerWidth),N.overflowY==="hidden"&&(R=l.innerHeight),s.style&&(s.style.position=y),t||rJ(s))e.left=Math.max(e.left,S),e.top=Math.max(e.top,w),e.right=Math.min(e.right,S+T),e.bottom=Math.min(e.bottom,w+M);else{var L=Math.max(D,S+T);e.right=Math.min(e.right,L);var _=Math.max(R,w+M);e.bottom=Math.min(e.bottom,_)}return e.top>=0&&e.left>=0&&e.bottom>e.top&&e.right>e.left?e:null}function lJ(s,t,e,n){var r=le.clone(s),l={width:t.width,height:t.height};return n.adjustX&&r.left<e.left&&(r.left=e.left),n.resizeWidth&&r.left>=e.left&&r.left+l.width>e.right&&(l.width-=r.left+l.width-e.right),n.adjustX&&r.left+l.width>e.right&&(r.left=Math.max(e.right-l.width,e.left)),n.adjustY&&r.top<e.top&&(r.top=e.top),n.resizeHeight&&r.top>=e.top&&r.top+l.height>e.bottom&&(l.height-=r.top+l.height-e.bottom),n.adjustY&&r.top+l.height>e.bottom&&(r.top=Math.max(e.bottom-l.height,e.top)),le.mix(r,l)}function cJ(s){var t,e,n;if(!le.isWindow(s)&&s.nodeType!==9)t=le.offset(s),e=le.outerWidth(s),n=le.outerHeight(s);else{var r=le.getWindow(s);t={left:le.getWindowScrollLeft(r),top:le.getWindowScrollTop(r)},e=le.viewportWidth(r),n=le.viewportHeight(r)}return t.width=e,t.height=n,t}function T6(s,t){var e=t.charAt(0),n=t.charAt(1),r=s.width,l=s.height,f=s.left,h=s.top;return e==="c"?h+=l/2:e==="b"&&(h+=l),n==="c"?f+=r/2:n==="r"&&(f+=r),{left:f,top:h}}function DS(s,t,e,n,r){var l=T6(t,e[1]),f=T6(s,e[0]),h=[f.left-l.left,f.top-l.top];return{left:Math.round(s.left-h[0]+n[0]-r[0]),top:Math.round(s.top-h[1]+n[1]-r[1])}}function M6(s,t,e){return s.left<e.left||s.left+t.width>e.right}function O6(s,t,e){return s.top<e.top||s.top+t.height>e.bottom}function uJ(s,t,e){return s.left>e.right||s.left+t.width<e.left}function fJ(s,t,e){return s.top>e.bottom||s.top+t.height<e.top}function RS(s,t,e){var n=[];return le.each(s,function(r){n.push(r.replace(t,function(l){return e[l]}))}),n}function zS(s,t){return s[t]=-s[t],s}function D6(s,t){var e;return/%$/.test(s)?e=parseInt(s.substring(0,s.length-1),10)/100*t:e=parseInt(s,10),e||0}function R6(s,t){s[0]=D6(s[0],t.width),s[1]=D6(s[1],t.height)}function hJ(s,t,e,n){var r=e.points,l=e.offset||[0,0],f=e.targetOffset||[0,0],h=e.overflow,p=e.source||s;l=[].concat(l),f=[].concat(f),h=h||{};var y={},x=0,S=!!(h&&h.alwaysByViewport),w=aJ(p,S),T=cJ(p);R6(l,T),R6(f,t);var M=DS(T,t,r,l,f),D=le.merge(T,M);if(w&&(h.adjustX||h.adjustY)&&n){if(h.adjustX&&M6(M,T,w)){var R=RS(r,/[lr]/gi,{l:"r",r:"l"}),N=zS(l,0),L=zS(f,0),_=DS(T,t,R,N,L);uJ(_,T,w)||(x=1,r=R,l=N,f=L)}if(h.adjustY&&O6(M,T,w)){var U=RS(r,/[tb]/gi,{t:"b",b:"t"}),$=zS(l,1),Y=zS(f,1),k=DS(T,t,U,$,Y);fJ(k,T,w)||(x=1,r=U,l=$,f=Y)}x&&(M=DS(T,t,r,l,f),le.mix(D,M));var H=M6(M,T,w),J=O6(M,T,w);if(H||J){var F=r;H&&(F=RS(r,/[lr]/gi,{l:"r",r:"l"})),J&&(F=RS(r,/[tb]/gi,{t:"b",b:"t"})),r=F,l=e.offset||[0,0],f=e.targetOffset||[0,0]}y.adjustX=h.adjustX&&H,y.adjustY=h.adjustY&&J,(y.adjustX||y.adjustY)&&(D=lJ(M,T,w,y))}return D.width!==T.width&&le.css(p,"width",le.width(p)+D.width-T.width),D.height!==T.height&&le.css(p,"height",le.height(p)+D.height-T.height),le.offset(p,{left:D.left,top:D.top},{useCssRight:e.useCssRight,useCssBottom:e.useCssBottom,useCssTransform:e.useCssTransform,ignoreShake:e.ignoreShake}),{points:r,offset:l,targetOffset:f,overflow:y}}function dJ(s,t,e){var n,r,l=le.getDocument(s),f=l.defaultView||l.parentWindow,h=le.getWindowScrollLeft(f),p=le.getWindowScrollTop(f),y=le.viewportWidth(f),x=le.viewportHeight(f);"pageX"in t?n=t.pageX:n=h+t.clientX,"pageY"in t?r=t.pageY:r=p+t.clientY;var S={left:n,top:r,width:0,height:0},w=n>=0&&n<=h+y&&r>=0&&r<=p+x,T=[e.points[0],"cc"];return hJ(s,S,u6(u6({},e),{},{points:T}),w)}const gJ=`.x6-widget-dnd {
|
|
407
|
+
position: absolute;
|
|
408
|
+
top: -10000px;
|
|
409
|
+
left: -10000px;
|
|
410
|
+
z-index: 999999;
|
|
411
|
+
display: none;
|
|
412
|
+
cursor: move;
|
|
413
|
+
opacity: 0.7;
|
|
414
|
+
}
|
|
415
|
+
.x6-widget-dnd.dragging {
|
|
416
|
+
display: inline-block;
|
|
417
|
+
}
|
|
418
|
+
.x6-widget-dnd.dragging * {
|
|
419
|
+
pointer-events: none !important;
|
|
420
|
+
}
|
|
421
|
+
.x6-widget-dnd .x6-graph {
|
|
422
|
+
background: transparent;
|
|
423
|
+
box-shadow: none;
|
|
424
|
+
}
|
|
425
|
+
`,z6={getDragNode:s=>s.clone(),getDropNode:s=>s.clone()};class N6 extends to{get targetScroller(){return this.options.target.getPlugin("scroller")}get targetGraph(){return this.options.target}get targetModel(){return this.targetGraph.model}get snapline(){return this.options.target.getPlugin("snapline")}constructor(t){super(),this.name="dnd",this.options=Object.assign(Object.assign({},z6),t),this.init()}init(){Ou(this.name,gJ),this.container=document.createElement("div"),_t(this.container,this.prefixClassName("widget-dnd")),this.draggingGraph=new dt(Object.assign(Object.assign({},this.options.delegateGraphOptions),{container:document.createElement("div"),width:1,height:1,async:!1})),qi(this.container,this.draggingGraph.container)}start(t,e){var n;const r=e;r.preventDefault(),this.targetModel.startBatch("dnd"),_t(this.container,"dragging"),rr(this.container,this.options.draggingContainer||document.body),this.sourceNode=t,this.prepareDragging(t,r.clientX,r.clientY);const l=this.updateNodePosition(r.clientX,r.clientY);this.isSnaplineEnabled()&&(this.snapline.captureCursorOffset({e:r,node:t,cell:t,view:this.draggingView,x:l.x,y:l.y}),(n=this.draggingNode)===null||n===void 0||n.on("change:position",this.snap,this)),this.delegateDocumentEvents(QL,r.data)}isSnaplineEnabled(){var t;return(t=this.snapline)===null||t===void 0?void 0:t.isEnabled()}prepareDragging(t,e,n){const r=this.draggingGraph,l=r.model,f=this.options.getDragNode(t,{sourceNode:t,draggingGraph:r,targetGraph:this.targetGraph});f.position(0,0);let h=5;if(this.isSnaplineEnabled()&&(h+=this.snapline.options.tolerance||0),this.isSnaplineEnabled()||this.options.scaled){const x=this.targetGraph.transform.getScale();r.scale(x.sx,x.sy),h*=Math.max(x.sx,x.sy)}else r.scale(1,1);this.clearDragging(),l.resetCells([f]);const p=r.findViewByCell(f);p.undelegateEvents(),p.cell.off("changed"),r.fitToContent({padding:h,allowNewOrigin:"any",useCellGeometry:!1});const y=p.getBBox();this.geometryBBox=p.getBBox({useCellGeometry:!0}),this.delta=this.geometryBBox.getTopLeft().diff(y.getTopLeft()),this.draggingNode=f,this.draggingView=p,this.draggingBBox=f.getBBox(),this.padding=h,this.updateGraphPosition(e,n)}updateGraphPosition(t,e){const n=this.delta,r=this.geometryBBox,l=this.padding||5,f={left:t-n.x-r.width/2-l,top:e-n.y-r.height/2-l};this.draggingGraph&&dJ(this.container,{clientX:f.left,clientY:f.top},{points:["tl"]})}updateNodePosition(t,e){const n=this.targetGraph.clientToLocal(t,e),r=this.draggingBBox;return r&&(n.x-=r.width/2,n.y-=r.height/2,this.draggingNode.position(n.x,n.y)),n}snap({cell:t,current:e,options:n}){const r=t;if(n.snapped){const l=this.draggingBBox;r.position(l.x+n.tx,l.y+n.ty,{silent:!0}),this.draggingView.translate(),r.position(e.x,e.y,{silent:!0}),this.snapOffset={x:n.tx,y:n.ty}}else this.snapOffset=null}onMouseMove(t){this.onDragging(t)}onMouseUp(t){this.onDragEnd(t)}onDragging(t){const e=this.draggingView;if(e){t.preventDefault();const n=this.normalizeEvent(t),r=n.clientX,l=n.clientY;this.updateGraphPosition(r,l);const f=this.updateNodePosition(r,l),h=this.targetGraph.options.embedding.enabled,p=(h||this.isSnaplineEnabled())&&this.isInsideValidArea({x:r,y:l});if(h){e.setEventData(n,{graph:this.targetGraph,candidateEmbedView:this.candidateEmbedView});const y=e.getEventData(n);p?e.processEmbedding(n,y):e.clearEmbedding(y),this.candidateEmbedView=y.candidateEmbedView}this.isSnaplineEnabled()&&(p?this.snapline.snapOnMoving({e:n,view:e,x:f.x,y:f.y}):this.snapline.hide())}}onDragEnd(t){const e=this.draggingNode;if(e){const n=this.normalizeEvent(t),r=this.draggingView,l=this.draggingBBox,f=this.snapOffset;let h=l.x,p=l.y;f&&(h+=f.x,p+=f.y),e.position(h,p,{silent:!0});const y=this.drop(e,{x:n.clientX,y:n.clientY}),x=S=>{S?(this.onDropped(e),this.targetGraph.options.embedding.enabled&&r&&(r.setEventData(n,{cell:S,graph:this.targetGraph,candidateEmbedView:this.candidateEmbedView}),r.finalizeEmbedding(n,r.getEventData(n)))):this.onDropInvalid(),this.candidateEmbedView=null,this.targetModel.stopBatch("dnd")};jA(y)?(this.undelegateDocumentEvents(),y.then(x)):x(y)}}clearDragging(){this.draggingNode&&(this.sourceNode=null,this.draggingNode.remove(),this.draggingNode=null,this.draggingView=null,this.delta=null,this.padding=null,this.snapOffset=null,this.undelegateDocumentEvents())}onDropped(t){this.draggingNode===t&&(this.clearDragging(),dn(this.container,"dragging"),or(this.container))}onDropInvalid(){const t=this.draggingNode;t&&this.onDropped(t)}isInsideValidArea(t){let e,n=null;const r=this.targetGraph,l=this.targetScroller;this.options.dndContainer&&(n=this.getDropArea(this.options.dndContainer));const f=n==null?void 0:n.containsPoint(t);if(l)if(l.options.autoResize)e=this.getDropArea(l.container);else{const h=this.getDropArea(l.container);e=this.getDropArea(r.container).intersectsWithRect(h)}else e=this.getDropArea(r.container);return!f&&e&&e.containsPoint(t)}getDropArea(t){const e=lp(t),n=document.body.scrollTop||document.documentElement.scrollTop,r=document.body.scrollLeft||document.documentElement.scrollLeft;return Dt.create({x:e.left+parseInt($e(t,"border-left-width"),10)-r,y:e.top+parseInt($e(t,"border-top-width"),10)-n,width:t.clientWidth,height:t.clientHeight})}drop(t,e){if(this.isInsideValidArea(e)){const n=this.targetGraph,r=n.model,l=n.clientToLocal(e),f=this.sourceNode,h=this.options.getDropNode(t,{sourceNode:f,draggingNode:t,targetGraph:this.targetGraph,draggingGraph:this.draggingGraph}),p=h.getBBox();l.x+=p.x-p.width/2,l.y+=p.y-p.height/2;const y=this.snapOffset?1:n.getGridSize();h.position(ha(l.x,y),ha(l.y,y)),h.removeZIndex();const x=this.options.validateNode,S=x?x(h,{sourceNode:f,draggingNode:t,droppingNode:h,targetGraph:n,draggingGraph:this.draggingGraph}):!0;return typeof S=="boolean"?S?(r.addCell(h,{stencil:this.cid}),h):null:qq(S).then(w=>w?(r.addCell(h,{stencil:this.cid}),h):null)}return null}onRemove(){this.draggingGraph&&(this.draggingGraph.view.remove(),this.draggingGraph.dispose())}dispose(){this.remove(),Du(this.name)}}De([Re()],N6.prototype,"dispose",null),dt.prototype.toSVG=function(s,t){const e=this.getPlugin("export");e&&e.toSVG(s,t)},dt.prototype.toSVGAsync=function(s){return TE(this,void 0,void 0,function*(){return new Promise(t=>{this.toSVG(t,s)})})},dt.prototype.toPNG=function(s,t){const e=this.getPlugin("export");e&&e.toPNG(s,t)},dt.prototype.toPNGAsync=function(s){return TE(this,void 0,void 0,function*(){return new Promise(t=>{this.toPNG(t,s)})})},dt.prototype.toJPEG=function(s,t){const e=this.getPlugin("export");e&&e.toJPEG(s,t)},dt.prototype.toJPEGAsync=function(s){return TE(this,void 0,void 0,function*(){return new Promise(t=>{this.toJPEG(t,s)})})},dt.prototype.exportPNG=function(s,t){const e=this.getPlugin("export");e&&e.exportPNG(s,t)},dt.prototype.exportJPEG=function(s,t){const e=this.getPlugin("export");e&&e.exportJPEG(s,t)},dt.prototype.exportSVG=function(s,t){const e=this.getPlugin("export");e&&e.exportSVG(s,t)};class L6 extends Ts{constructor(){super(...arguments),this.name="export"}get view(){return this.graph.view}init(t){this.graph=t}exportPNG(t="chart",e={}){this.toPNG(n=>{LA(n,t)},e)}exportJPEG(t="chart",e={}){this.toJPEG(n=>{LA(n,t)},e)}exportSVG(t="chart",e={}){this.toSVG(n=>{LA(Gq(n),t)},e)}toSVG(t,e={}){this.notify("before:export",e),Object.hasOwn(e,"copyStyles")||(e.copyStyles=!0),Object.hasOwn(e,"serializeImages")||(e.serializeImages=!0);const n=this.view.svg,r=Xt.create(n).clone();let l=r.node;const f=r.findOne(`.${this.view.prefixClassName("graph-svg-stage")}`),h=e.viewBox||this.graph.graphToLocal(this.graph.getContentBBox()),p=e.preserveDimensions;if(p){const S=typeof p=="boolean"?h:p;r.attr({width:S.width,height:S.height})}if(r.removeAttribute("style").attr("viewBox",[h.x,h.y,h.width,h.height].join(" ")),f.removeAttribute("transform"),e.copyStyles){const S=n.ownerDocument,w=Array.from(n.querySelectorAll("*")),T=Array.from(l.querySelectorAll("*")),M=S.implementation.createHTMLDocument("x6-export-defaults"),D=M.importNode(n,!0);M.body.appendChild(D);const R=Array.from(D.querySelectorAll("*")),N={};R.forEach((_,U)=>{const $=window.getComputedStyle(_,null),Y={};for(let k=0;k<$.length;k+=1){const H=$[k],J=$.getPropertyValue(H);Y[H]=J}N[U]=Y});const L={};w.forEach((_,U)=>{const $=window.getComputedStyle(_,null),Y=N[U]||{},k={};for(let H=0;H<$.length;H+=1){const J=$[H],F=$.getPropertyValue(J);F!==Y[J]&&(k[J]=F)}L[U]=k}),T.forEach((_,U)=>{$e(_,L[U])})}const y=e.stylesheet;if(typeof y=="string"){const S=n.ownerDocument.implementation.createDocument(null,"xml",null).createCDATASection(y);r.prepend(Xt.create("style",{type:"text/css"},[S]))}const x=()=>{const S=e.beforeSerialize;if(typeof S=="function"){const T=Gt(S,this.graph,l);T instanceof SVGSVGElement&&(l=T)}const w=new XMLSerializer().serializeToString(l).replace(/ /g," ");this.notify("after:export",e),t(w)};if(e.serializeImages){const S=r.find("image").map(w=>new Promise(T=>{const M=w.attr("xlink:href")||w.attr("href");Hq(M,(D,R)=>{!D&&R&&(w.attr("xlink:href",R),w.attr("href",R)),T()})}));Promise.all(S).then(x)}else x()}toDataURL(t,e){let n=e.viewBox||this.graph.getContentBBox();const r=fa(e.padding);e.width&&e.height&&(r.left+r.right>=e.width&&(r.left=r.right=0),r.top+r.bottom>=e.height&&(r.top=r.bottom=0));const l=new Dt(-r.left,-r.top,r.left+r.right,r.top+r.bottom);if(e.width&&e.height){const x=n.width+r.left+r.right,S=n.height+r.top+r.bottom;l.scale(x/e.width,S/e.height)}n=Dt.create(n).moveAndExpand(l);const f=typeof e.width=="number"&&typeof e.height=="number"?{width:e.width,height:e.height}:n;let h=e.ratio?e.ratio:1;(!Number.isFinite(h)||h===0)&&(h=1);const p={width:Math.max(Math.round(f.width*h),1),height:Math.max(Math.round(f.height*h),1)};{const x=document.createElement("canvas"),S=x.getContext("2d");x.width=p.width,x.height=p.height;const w=p.width-1,T=p.height-1;S.fillStyle="rgb(1,1,1)",S.fillRect(w,T,1,1);const M=S.getImageData(w,T,1,1).data;if(M[0]!==1||M[1]!==1||M[2]!==1)throw new Error("size exceeded")}const y=new Image;y.onload=()=>{const x=document.createElement("canvas");x.width=p.width,x.height=p.height;const S=x.getContext("2d");S.fillStyle=e.backgroundColor||"white",S.fillRect(0,0,p.width,p.height);try{S.drawImage(y,0,0,p.width,p.height);const w=x.toDataURL(e.type,e.quality);t(w)}catch{}},this.toSVG(x=>{y.src=`data:image/svg+xml,${encodeURIComponent(x)}`},Object.assign(Object.assign({},e),{viewBox:n,serializeImages:!0,preserveDimensions:Object.assign({},p)}))}toPNG(t,e={}){this.toDataURL(t,Object.assign(Object.assign({},e),{type:"image/png"}))}toJPEG(t,e={}){this.toDataURL(t,Object.assign(Object.assign({},e),{type:"image/jpeg"}))}notify(t,e){this.trigger(t,e),this.graph.trigger(t,e)}dispose(){this.off()}}De([Re()],L6.prototype,"dispose",null);function Hu(s){return s==="cell:added"}function Ph(s){return s==="cell:removed"}function Zb(s){return s!=null&&s.startsWith("cell:change:")}function pJ(s){const t=["cell:added","cell:removed","cell:change:*"],e=["batch:start","batch:stop"],n=s.eventNames?s.eventNames.filter(r=>!(Zb(r)||t.includes(r)||e.includes(r))):t;return Object.assign(Object.assign({enabled:!0},s),{eventNames:n,applyOptionsList:s.applyOptionsList||["propertyPath"],revertOptionsList:s.revertOptionsList||["propertyPath"]})}function j6(s){const t=[];for(let e=0,n=s.length;e<n;e+=1){const r=s[e];let l=null;if(Hu(r.event)){const f=r.data.id;for(let h=0;h<e;h+=1)if(s[h].data.id===f){l=h;break}}l!==null?t.splice(l,0,r):t.push(r)}return t}class _6 extends Ts{constructor(t){super(),this.map={},this.command=t.history,this.cancelInvalid=t.cancelInvalid!==!1,this.command.on("add",this.onCommandAdded,this)}onCommandAdded({cmds:t}){return Array.isArray(t)?t.every(e=>this.isValidCommand(e)):this.isValidCommand(t)}isValidCommand(t){if(t.options&&t.options.validation===!1)return!0;const e=t.event&&this.map[t.event]||[];let n=null;return e.forEach(r=>{let l=0;const f=h=>{const p=r[l];l+=1;try{p?p(h,t,f):n=h}catch(y){f(y)}};f(n)}),n?(this.cancelInvalid&&this.command.cancel(),this.emit("invalid",{err:n}),!1):!0}validate(t,...e){const n=Array.isArray(t)?t:t.split(/\s+/);return e.forEach(r=>{if(typeof r!="function")throw new Error(`${n.join(" ")} requires callback functions.`)}),n.forEach(r=>{this.map[r]==null&&(this.map[r]=[]),this.map[r].push(e)}),this}dispose(){this.command.off("add",this.onCommandAdded,this)}}De([Re()],_6.prototype,"dispose",null),dt.prototype.isHistoryEnabled=function(){const s=this.getPlugin("history");return s?s.isEnabled():!1},dt.prototype.enableHistory=function(){const s=this.getPlugin("history");return s&&s.enable(),this},dt.prototype.disableHistory=function(){const s=this.getPlugin("history");return s&&s.disable(),this},dt.prototype.toggleHistory=function(s){const t=this.getPlugin("history");return t&&t.toggleEnabled(s),this},dt.prototype.undo=function(s){const t=this.getPlugin("history");return t&&t.undo(s),this},dt.prototype.redo=function(s){const t=this.getPlugin("history");return t&&t.redo(s),this},dt.prototype.undoAndCancel=function(s){const t=this.getPlugin("history");return t&&t.cancel(s),this},dt.prototype.canUndo=function(){const s=this.getPlugin("history");return s?s.canUndo():!1},dt.prototype.canRedo=function(){const s=this.getPlugin("history");return s?s.canRedo():!1},dt.prototype.cleanHistory=function(s){const t=this.getPlugin("history");return t&&t.clean(s),this},dt.prototype.getHistoryStackSize=function(){return this.getPlugin("history").getSize()},dt.prototype.getUndoStackSize=function(){return this.getPlugin("history").getUndoSize()},dt.prototype.getRedoStackSize=function(){return this.getPlugin("history").getRedoSize()},dt.prototype.getUndoRemainSize=function(){return this.getPlugin("history").getUndoRemainSize()};class mJ extends Ts{constructor(t={}){super(),this.name="history",this.batchCommands=null,this.batchLevel=0,this.lastBatchIndex=-1,this.freezed=!1,this.stackSize=0,this.handlers=[];const{stackSize:e=0}=t;this.stackSize=e,this.options=pJ(t),this.validator=new _6({history:this,cancelInvalid:this.options.cancelInvalid})}init(t){this.graph=t,this.model=this.graph.model,this.clean(),this.startListening()}isEnabled(){return!this.disabled}enable(){this.disabled&&(this.options.enabled=!0)}disable(){this.disabled||(this.options.enabled=!1)}toggleEnabled(t){return t!=null?t!==this.isEnabled()&&(t?this.enable():this.disable()):this.isEnabled()?this.disable():this.enable(),this}undo(t={}){if(!this.disabled){const e=this.undoStack.pop();e&&(this.revertCommand(e,t),this.redoStack.push(e),this.notify("undo",e,t))}return this}redo(t={}){if(!this.disabled){const e=this.redoStack.pop();e&&(this.applyCommand(e,t),this.undoStackPush(e),this.notify("redo",e,t))}return this}cancel(t={}){if(!this.disabled){const e=this.undoStack.pop();e&&(this.revertCommand(e,t),this.redoStack=[],this.notify("cancel",e,t))}return this}getSize(){return this.stackSize}getUndoRemainSize(){const t=this.undoStack.length;return this.stackSize-t}getUndoSize(){return this.undoStack.length}getRedoSize(){return this.redoStack.length}canUndo(){return!this.disabled&&this.undoStack.length>0}canRedo(){return!this.disabled&&this.redoStack.length>0}clean(t={}){return this.undoStack=[],this.redoStack=[],this.notify("clean",null,t),this}get disabled(){return this.options.enabled!==!0}validate(t,...e){return this.validator.validate(t,...e),this}startListening(){this.model.on("batch:start",this.initBatchCommand,this),this.model.on("batch:stop",this.storeBatchCommand,this),this.options.eventNames&&this.options.eventNames.forEach((t,e)=>{this.handlers[e]=this.addCommand.bind(this,t),this.model.on(t,this.handlers[e])}),this.validator.on("invalid",t=>this.trigger("invalid",t))}stopListening(){this.model.off("batch:start",this.initBatchCommand,this),this.model.off("batch:stop",this.storeBatchCommand,this),this.options.eventNames&&(this.options.eventNames.forEach((t,e)=>{this.model.off(t,this.handlers[e])}),this.handlers.length=0),this.validator.off("invalid")}createCommand(t){return{batch:t?t.batch:!1,data:{}}}revertCommand(t,e){this.freezed=!0;const n=Array.isArray(t)?j6(t):[t];for(let r=n.length-1;r>=0;r-=1){const l=n[r],f=Object.assign(Object.assign({},e),rN(l.options,this.options.revertOptionsList||[]));this.executeCommand(l,!0,f)}this.freezed=!1}applyCommand(t,e){this.freezed=!0;const n=Array.isArray(t)?j6(t):[t];for(let r=0;r<n.length;r+=1){const l=n[r],f=Object.assign(Object.assign({},e),rN(l.options,this.options.applyOptionsList||[]));this.executeCommand(l,!1,f)}this.freezed=!1}executeCommand(t,e,n){const r=this.model,l=r.getCell(t.data.id),f=t.event;if(Hu(f)&&e||Ph(f)&&!e)l&&l.remove(n);else if(Hu(f)&&!e||Ph(f)&&e){const h=t.data;h.node?r.addNode(h.props,n):h.edge&&r.addEdge(h.props,n)}else if(Zb(f)){const h=t.data,p=h.key;if(p&&l){const y=e?h.prev[p]:h.next[p];h.key==="attrs"&&this.ensureUndefinedAttrs(y,e?h.next[p]:h.prev[p])&&(n.dirty=!0),l.prop(p,y,n)}}else{const h=this.options.executeCommand;h&&Gt(h,this,t,e,n)}}addCommand(t,e){if(this.freezed||this.disabled)return;const n=e,r=n.options||{};if(r.dryrun||Hu(t)&&this.options.ignoreAdd||Ph(t)&&this.options.ignoreRemove||Zb(t)&&this.options.ignoreChange)return;const l=this.options.beforeAddCommand;if(l!=null&&Gt(l,this,t,e)===!1)return;t==="cell:change:*"&&(t=`cell:change:${n.key}`);const f=n.cell,h=wo.isModel(f);let p;if(this.batchCommands){p=this.batchCommands[Math.max(this.lastBatchIndex,0)];const x=h&&!p.modelChange||p.data.id!==f.id,S=p.event!==t;if(this.lastBatchIndex>=0&&(x||S)){const w=this.batchCommands.findIndex(T=>(h&&T.modelChange||T.data.id===f.id)&&T.event===t);w<0||Hu(t)||Ph(t)?p=this.createCommand({batch:!0}):(p=this.batchCommands[w],this.batchCommands.splice(w,1)),this.batchCommands.push(p),this.lastBatchIndex=this.batchCommands.length-1}}else p=this.createCommand({batch:!1});if(Hu(t)||Ph(t)){const x=p.data;return p.event=t,p.options=r,x.id=f.id,x.props=wn(f.toJSON()),f.isEdge()?x.edge=!0:f.isNode()&&(x.node=!0),this.push(p,r)}if(Zb(t)){const x=e.key,S=p.data;return(!p.batch||!p.event)&&(p.event=t,p.options=r,S.key=x,S.prev==null&&(S.prev={}),S.prev[x]=wn(f.previous(x)),h?p.modelChange=!0:S.id=f.id),S.next==null&&(S.next={}),S.next[x]=wn(f.prop(x)),this.push(p,r)}const y=this.options.afterAddCommand;y&&Gt(y,this,t,e,p),this.push(p,r)}initBatchCommand(t){this.freezed||(this.batchCommands?this.batchLevel+=1:(this.batchCommands=[this.createCommand({batch:!0})],this.batchLevel=0,this.lastBatchIndex=-1))}storeBatchCommand(t){if(!this.freezed)if(this.batchCommands&&this.batchLevel<=0){const e=this.filterBatchCommand(this.batchCommands);e.length>0&&(this.redoStack=[],this.undoStackPush(e),this.consolidateCommands(),this.notify("add",e,t)),this.batchCommands=null,this.lastBatchIndex=-1,this.batchLevel=0}else this.batchCommands&&this.batchLevel>0&&(this.batchLevel-=1)}filterBatchCommand(t){let e=t.slice();const n=[];for(;e.length>0;){const r=e.shift(),l=r.event,f=r.data.id;if(l!=null&&(f!=null||r.modelChange)){if(Hu(l)){const h=e.findIndex(p=>Ph(p.event)&&p.data.id===f);if(h>=0){e=e.filter((p,y)=>h<y||p.data.id!==f);continue}}else if(Ph(l)){const h=e.findIndex(p=>Hu(p.event)&&p.data.id===f);if(h>=0){e.splice(h,1);continue}}else if(Zb(l)){const h=r.data;if(ec(h.prev,h.next))continue}n.push(r)}}return n}notify(t,e,n){const r=e==null?null:Array.isArray(e)?e:[e];this.emit(t,{cmds:r,options:n}),this.graph.trigger(`history:${t}`,{cmds:r,options:n}),this.emit("change",{cmds:r,options:n}),this.graph.trigger("history:change",{cmds:r,options:n})}push(t,e){this.redoStack=[],t.batch?(this.lastBatchIndex=Math.max(this.lastBatchIndex,0),this.emit("batch",{cmd:t,options:e})):(this.undoStackPush(t),this.consolidateCommands(),this.notify("add",t,e))}consolidateCommands(){var t;const e=this.undoStack[this.undoStack.length-1],n=this.undoStack[this.undoStack.length-2];if(!Array.isArray(e))return;const r=new Set(e.map(f=>f.event));if(r.size!==2||!r.has("cell:change:parent")||!r.has("cell:change:children")||!e.every(f=>{var h;return f.batch&&((h=f.options)===null||h===void 0?void 0:h.ui)})||!Array.isArray(n)||n.length!==1)return;const l=n[0];l.event!=="cell:change:position"||!(!((t=l.options)===null||t===void 0)&&t.ui)||(n.push(...e),this.undoStack.pop())}undoStackPush(t){if(this.stackSize===0){this.undoStack.push(t);return}this.undoStack.length>=this.stackSize&&this.undoStack.shift(),this.undoStack.push(t)}ensureUndefinedAttrs(t,e){let n=!1;return t!==null&&e!==null&&typeof t=="object"&&typeof e=="object"&&Object.keys(e).forEach(r=>{t[r]===void 0&&e[r]!==void 0?(t[r]=void 0,n=!0):typeof t[r]=="object"&&typeof e[r]=="object"&&(n=this.ensureUndefinedAttrs(t[r],e[r]))}),n}dispose(){this.validator.dispose(),this.clean(),this.stopListening(),this.off()}}De([Re()],mJ.prototype,"dispose",null);var B6={exports:{}};(function(s){(function(t,e,n){if(!t)return;for(var r={8:"backspace",9:"tab",13:"enter",16:"shift",17:"ctrl",18:"alt",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"ins",46:"del",91:"meta",93:"meta",224:"meta"},l={106:"*",107:"+",109:"-",110:".",111:"/",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},f={"~":"`","!":"1","@":"2","#":"3",$:"4","%":"5","^":"6","&":"7","*":"8","(":"9",")":"0",_:"-","+":"=",":":";",'"':"'","<":",",">":".","?":"/","|":"\\"},h={option:"alt",command:"meta",return:"enter",escape:"esc",plus:"+",mod:/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"meta":"ctrl"},p,y=1;y<20;++y)r[111+y]="f"+y;for(y=0;y<=9;++y)r[y+96]=y.toString();function x(k,H,J){if(k.addEventListener){k.addEventListener(H,J,!1);return}k.attachEvent("on"+H,J)}function S(k){if(k.type=="keypress"){var H=String.fromCharCode(k.which);return k.shiftKey||(H=H.toLowerCase()),H}return r[k.which]?r[k.which]:l[k.which]?l[k.which]:String.fromCharCode(k.which).toLowerCase()}function w(k,H){return k.sort().join(",")===H.sort().join(",")}function T(k){var H=[];return k.shiftKey&&H.push("shift"),k.altKey&&H.push("alt"),k.ctrlKey&&H.push("ctrl"),k.metaKey&&H.push("meta"),H}function M(k){if(k.preventDefault){k.preventDefault();return}k.returnValue=!1}function D(k){if(k.stopPropagation){k.stopPropagation();return}k.cancelBubble=!0}function R(k){return k=="shift"||k=="ctrl"||k=="alt"||k=="meta"}function N(){if(!p){p={};for(var k in r)k>95&&k<112||r.hasOwnProperty(k)&&(p[r[k]]=k)}return p}function L(k,H,J){return J||(J=N()[k]?"keydown":"keypress"),J=="keypress"&&H.length&&(J="keydown"),J}function _(k){return k==="+"?["+"]:(k=k.replace(/\+{2}/g,"+plus"),k.split("+"))}function U(k,H){var J,F,ct,lt=[];for(J=_(k),ct=0;ct<J.length;++ct)F=J[ct],h[F]&&(F=h[F]),H&&H!="keypress"&&f[F]&&(F=f[F],lt.push("shift")),R(F)&<.push(F);return H=L(F,lt,H),{key:F,modifiers:lt,action:H}}function $(k,H){return k===null||k===e?!1:k===H?!0:$(k.parentNode,H)}function Y(k){var H=this;if(k=k||e,!(H instanceof Y))return new Y(k);H.target=k,H._callbacks={},H._directMap={};var J={},F,ct=!1,lt=!1,vt=!1;function Ot(nt){nt=nt||{};var St=!1,Tt;for(Tt in J){if(nt[Tt]){St=!0;continue}J[Tt]=0}St||(vt=!1)}function zt(nt,St,Tt,Et,Ht,ce){var Rt,ue,fe=[],Be=Tt.type;if(!H._callbacks[nt])return[];for(Be=="keyup"&&R(nt)&&(St=[nt]),Rt=0;Rt<H._callbacks[nt].length;++Rt)if(ue=H._callbacks[nt][Rt],!(!Et&&ue.seq&&J[ue.seq]!=ue.level)&&Be==ue.action&&(Be=="keypress"&&!Tt.metaKey&&!Tt.ctrlKey||w(St,ue.modifiers))){var Lt=!Et&&ue.combo==Ht,Xi=Et&&ue.seq==Et&&ue.level==ce;(Lt||Xi)&&H._callbacks[nt].splice(Rt,1),fe.push(ue)}return fe}function V(nt,St,Tt,Et){H.stopCallback(St,St.target||St.srcElement,Tt,Et)||nt(St,Tt)===!1&&(M(St),D(St))}H._handleKey=function(nt,St,Tt){var Et=zt(nt,St,Tt),Ht,ce={},Rt=0,ue=!1;for(Ht=0;Ht<Et.length;++Ht)Et[Ht].seq&&(Rt=Math.max(Rt,Et[Ht].level));for(Ht=0;Ht<Et.length;++Ht){if(Et[Ht].seq){if(Et[Ht].level!=Rt)continue;ue=!0,ce[Et[Ht].seq]=1,V(Et[Ht].callback,Tt,Et[Ht].combo,Et[Ht].seq);continue}ue||V(Et[Ht].callback,Tt,Et[Ht].combo)}var fe=Tt.type=="keypress"&<Tt.type==vt&&!R(nt)&&!fe&&Ot(ce),lt=ue&&Tt.type=="keydown"};function ot(nt){typeof nt.which!="number"&&(nt.which=nt.keyCode);var St=S(nt);if(St){if(nt.type=="keyup"&&ct===St){ct=!1;return}H.handleKey(St,T(nt),nt)}}function tt(){clearTimeout(F),F=setTimeout(Ot,1e3)}function yt(nt,St,Tt,Et){J[nt]=0;function Ht(Be){return function(){vt=Be,++J[nt],tt()}}function ce(Be){V(Tt,Be,nt),Et!=="keyup"&&(ct=S(Be)),setTimeout(Ot,10)}for(var Rt=0;Rt<St.length;++Rt){var ue=Rt+1===St.length,fe=ue?ce:Ht(Et||U(St[Rt+1]).action);Mt(St[Rt],fe,Et,nt,Rt)}}function Mt(nt,St,Tt,Et,Ht){H._directMap[nt+":"+Tt]=St,nt=nt.replace(/\s+/g," ");var ce=nt.split(" "),Rt;if(ce.length>1){yt(nt,ce,St,Tt);return}Rt=U(nt,Tt),H._callbacks[Rt.key]=H._callbacks[Rt.key]||[],zt(Rt.key,Rt.modifiers,{type:Rt.action},Et,nt,Ht),H._callbacks[Rt.key][Et?"unshift":"push"]({callback:St,modifiers:Rt.modifiers,action:Rt.action,seq:Et,level:Ht,combo:nt})}H._bindMultiple=function(nt,St,Tt){for(var Et=0;Et<nt.length;++Et)Mt(nt[Et],St,Tt)},x(k,"keypress",ot),x(k,"keydown",ot),x(k,"keyup",ot)}Y.prototype.bind=function(k,H,J){var F=this;return k=k instanceof Array?k:[k],F._bindMultiple.call(F,k,H,J),F},Y.prototype.unbind=function(k,H){var J=this;return J.bind.call(J,k,function(){},H)},Y.prototype.trigger=function(k,H){var J=this;return J._directMap[k+":"+H]&&J._directMap[k+":"+H]({},k),J},Y.prototype.reset=function(){var k=this;return k._callbacks={},k._directMap={},k},Y.prototype.stopCallback=function(k,H){var J=this;if((" "+H.className+" ").indexOf(" mousetrap ")>-1||$(H,J.target))return!1;if("composedPath"in k&&typeof k.composedPath=="function"){var F=k.composedPath()[0];F!==k.target&&(H=F)}return H.tagName=="INPUT"||H.tagName=="SELECT"||H.tagName=="TEXTAREA"||H.isContentEditable},Y.prototype.handleKey=function(){var k=this;return k._handleKey.apply(k,arguments)},Y.addKeycodes=function(k){for(var H in k)k.hasOwnProperty(H)&&(r[H]=k[H]);p=null},Y.init=function(){var k=Y(e);for(var H in k)H.charAt(0)!=="_"&&(Y[H]=function(J){return function(){return k[J].apply(k,arguments)}}(H))},Y.init(),t.Mousetrap=Y,s.exports&&(s.exports=Y)})(typeof window<"u"?window:null,typeof window<"u"?document:null)})(B6);var yJ=B6.exports;const bJ=L2(yJ);function P6(s,t,e){const n=s.toLocaleLowerCase().replace(/\s/g,"").replace("delete","del").replace("cmd","command").replace("arrowup","up").replace("arrowright","right").replace("arrowdown","down").replace("arrowleft","left");return t?Gt(t,e,n):n}function U6(s){var t;const e=s.target,n=(t=e==null?void 0:e.tagName)===null||t===void 0?void 0:t.toLowerCase();let r=["input","textarea"].includes(n);return Te(e,"contenteditable")==="true"&&(r=!0),r}function vJ(s,t,e){const n=s.target,r=s.currentTarget;return n?n===t||r===t||n===document.body?!0:GA(e,n):!1}function xJ(s){const t=new bJ(s.target),e=t.stopCallback;return t.stopCallback=(n,r,l)=>s.isEnabledForEvent(n)?e?e.call(t,n,r,l):!1:!0,t}class H6 extends cp{get graph(){return this.options.graph}constructor(t){super(),this.options=t;const e=this.graph.getPlugin("scroller");this.container=e?e.container:this.graph.container,t.global?this.target=document:(this.target=this.container,this.disabled||this.target.setAttribute("tabindex","-1"),this.graph.on("cell:mouseup",this.focus.bind(this),this),this.graph.on("blank:mouseup",this.focus.bind(this),this)),this.mousetrap=xJ(this)}get disabled(){return this.options.enabled!==!0}enable(){this.disabled&&(this.options.enabled=!0,this.target instanceof HTMLElement&&this.target.setAttribute("tabindex","-1"))}disable(){this.disabled||(this.options.enabled=!1,this.target instanceof HTMLElement&&this.target.removeAttribute("tabindex"))}on(t,e,n){this.mousetrap.bind(this.getKeys(t),e,n)}off(t,e){this.mousetrap.unbind(this.getKeys(t),e)}clear(){this.mousetrap.reset()}trigger(t,e){this.mousetrap.trigger(P6(t,this.options.format,this.graph),e)}focus(t){if(U6(t.e))return;this.target.focus({preventScroll:!0})}getKeys(t){return(Array.isArray(t)?t:[t]).map(e=>P6(e,this.options.format,this.graph))}isEnabledForEvent(t){const e=!this.disabled&&vJ(t,this.target,this.container),n=U6(t);if(e){if(n&&(t.key==="Backspace"||t.key==="Delete"))return!1;if(this.options.guard)return Gt(this.options.guard,this.graph,t)}return e}dispose(){this.mousetrap.reset()}}De([Re()],H6.prototype,"dispose",null),dt.prototype.isKeyboardEnabled=function(){const s=this.getPlugin("keyboard");return s?s.isEnabled():!1},dt.prototype.enableKeyboard=function(){const s=this.getPlugin("keyboard");return s&&s.enable(),this},dt.prototype.disableKeyboard=function(){const s=this.getPlugin("keyboard");return s&&s.disable(),this},dt.prototype.toggleKeyboard=function(s){const t=this.getPlugin("keyboard");return t&&t.toggleEnabled(s),this},dt.prototype.bindKey=function(s,t,e){const n=this.getPlugin("keyboard");return n&&n.bindKey(s,t,e),this},dt.prototype.unbindKey=function(s,t){const e=this.getPlugin("keyboard");return e&&e.unbindKey(s,t),this},dt.prototype.clearKeys=function(){const s=this.getPlugin("keyboard");return s&&s.clear(),this},dt.prototype.triggerKey=function(s,t){const e=this.getPlugin("keyboard");return e&&e.trigger(s,t),this};class SJ extends cp{constructor(t={}){super(),this.name="keyboard",this.options=Object.assign({enabled:!0},t)}init(t){this.keyboardImpl=new H6(Object.assign(Object.assign({},this.options),{graph:t}))}isEnabled(){return!this.keyboardImpl.disabled}enable(){this.keyboardImpl.enable()}disable(){this.keyboardImpl.disable()}toggleEnabled(t){return t===void 0&&(t=!this.isEnabled()),t?this.enable():this.disable(),this}bindKey(t,e,n){return this.keyboardImpl.on(t,e,n),this}trigger(t,e){return this.keyboardImpl.trigger(t,e),this}clear(){return this.keyboardImpl.clear(),this}unbindKey(t,e){return this.keyboardImpl.off(t,e),this}dispose(){this.keyboardImpl.dispose()}}De([Re()],SJ.prototype,"dispose",null);class ur extends to{get graph(){return this.options.graph}get boxClassName(){return this.prefixClassName(pa.box)}get $boxes(){return rY(this.container,this.boxClassName)}get handleOptions(){return this.options}constructor(t){super(),this.updateThrottleTimer=null,this.isDragging=!1,this.batchUpdating=!1,this.dragRafId=null,this.transformRafId=null,this.dragPendingOffset=null,this.containerOffsetX=0,this.containerOffsetY=0,this.translatingCache=null,this.movingRouterRestoreCache=null,this.movingRouterRestoreTimer=null,this.lastMovingTs=null,this.movingDegradeActivatedTs=null,this.options=t,this.options.model&&(this.options.collection=this.options.model.collection),this.options.collection?this.collection=this.options.collection:(this.collection=new RT([],{comparator:wJ}),this.options.collection=this.collection),this.boxCount=0,this.boxesUpdated=!1,this.createContainer(),this.startListening()}startListening(){const t=this.graph,e=this.collection;this.delegateEvents({[`mousedown .${this.boxClassName}`]:"onSelectionBoxMouseDown",[`touchstart .${this.boxClassName}`]:"onSelectionBoxMouseDown",[`mousedown .${this.prefixClassName(pa.inner)}`]:"onSelectionContainerMouseDown",[`touchstart .${this.prefixClassName(pa.inner)}`]:"onSelectionContainerMouseDown"},!0),t.on("scale",this.onGraphTransformed,this),t.on("translate",this.onGraphTransformed,this),t.model.on("updated",this.onModelUpdated,this),e.on("added",this.onCellAdded,this),e.on("removed",this.onCellRemoved,this),e.on("reseted",this.onReseted,this),e.on("updated",this.onCollectionUpdated,this),e.on("node:change:position",this.onNodePositionChanged,this),e.on("cell:changed",this.onCellChanged,this)}stopListening(){const t=this.graph,e=this.collection;this.undelegateEvents(),t.off("scale",this.onGraphTransformed,this),t.off("translate",this.onGraphTransformed,this),this.transformRafId!=null&&(cancelAnimationFrame(this.transformRafId),this.transformRafId=null),this.updateThrottleTimer&&(clearTimeout(this.updateThrottleTimer),this.updateThrottleTimer=null),t.model.off("updated",this.onModelUpdated,this),e.off("added",this.onCellAdded,this),e.off("removed",this.onCellRemoved,this),e.off("reseted",this.onReseted,this),e.off("updated",this.onCollectionUpdated,this),e.off("node:change:position",this.onNodePositionChanged,this),e.off("cell:changed",this.onCellChanged,this)}onRemove(){this.stopListening()}onGraphTransformed(){this.updateThrottleTimer&&(clearTimeout(this.updateThrottleTimer),this.updateThrottleTimer=null),this.transformRafId==null&&(this.transformRafId=window.requestAnimationFrame(()=>{this.transformRafId=null,!this.isDragging&&this.collection.length>0&&this.refreshSelectionBoxes()}))}onCellChanged(){this.updateSelectionBoxes()}onNodePositionChanged({node:t,options:e}){const{showNodeSelectionBox:n,pointerEvents:r}=this.options,{ui:l,selection:f,translateBy:h,snapped:p}=e,y=(n!==!0||r&&this.getPointerEventsValue(r)==="none")&&!this.translating&&!f,x=l&&h&&t.id===h;if(y&&(x||p)){this.translating=!0;const S=t.position(),w=t.previous("position");if(w){const T=S.x-w.x,M=S.y-w.y;(T!==0||M!==0)&&this.translateSelectedNodes(T,M,t,e)}this.translating=!1}}onModelUpdated({removed:t}){t!=null&&t.length&&this.unselect(t)}isEmpty(){return this.length<=0}isSelected(t){return this.collection.has(t)}get length(){return this.collection.length}get cells(){return this.collection.toArray()}select(t,e={}){e.dryrun=!0;const n=this.filter(Array.isArray(t)?t:[t]);return this.collection.add(n,e),this}unselect(t,e={}){return e.dryrun=!0,this.collection.remove(Array.isArray(t)?t:[t],e),this}reset(t,e={}){if(t){this.batchUpdating=!!e.batch;const n=this.cells,r=this.filter(Array.isArray(t)?t:[t]),l={},f={};for(const y of n)l[y.id]=y;for(const y of r)f[y.id]=y;const h=[],p=[];return r.forEach(y=>{l[y.id]||h.push(y)}),n.forEach(y=>{f[y.id]||p.push(y)}),p.length&&this.unselect(p,Object.assign(Object.assign({},e),{ui:!0})),h.length&&this.select(h,Object.assign(Object.assign({},e),{ui:!0})),this.updateContainer(),this.batchUpdating=!1,this}return this.clean(e)}clean(t={}){return this.length&&this.unselect(this.cells,t),this.containerOffsetX=0,this.containerOffsetY=0,$e(this.container,"transform",""),this}setFilter(t){this.options.filter=t}setContent(t){this.options.content=t}startSelecting(t){t=this.normalizeEvent(t),this.clean();let e,n;const r=this.graph.container;if(t.offsetX!=null&&t.offsetY!=null&&r.contains(t.target))e=t.offsetX,n=t.offsetY;else{const l=lp(r),f=r.scrollLeft,h=r.scrollTop;e=t.clientX-l.left+window.pageXOffset+f,n=t.clientY-l.top+window.pageYOffset+h}$e(this.container,{top:n,left:e,width:1,height:1}),this.setEventData(t,{action:"selecting",clientX:t.clientX,clientY:t.clientY,offsetX:e,offsetY:n,scrollerX:0,scrollerY:0,moving:!1}),this.delegateDocumentEvents(k6,t.data)}filter(t){const e=this.options.filter;return t.filter(n=>Array.isArray(e)?e.some(r=>typeof r=="string"?n.shape===r:n.id===r.id):typeof e=="function"?Gt(e,this.graph,n):!0)}stopSelecting(t){this.isDragging=!1,this.boxesUpdated=!1,this.updateThrottleTimer&&(clearTimeout(this.updateThrottleTimer),this.updateThrottleTimer=null);const e=this.graph;switch(this.getEventData(t).action){case"selecting":{let l=rX(this.container),f=aX(this.container);const h=lp(this.container),p=e.pageToLocal(h.left,h.top),y=e.transform.getScale();l/=y.sx,f/=y.sy;const x=new Dt(p.x,p.y,l,f),S=this.getCellViewsInArea(x).map(w=>w.cell);this.reset(S,{batch:!0}),this.hideRubberband();break}case"translating":{const l=e.snapToGrid(t.clientX,t.clientY);if(this.dragPendingOffset){const f=this.dragPendingOffset;this.dragPendingOffset=null,this.translateSelectedNodes(f.dx,f.dy),this.updateContainerPosition(f)}this.dragRafId!=null&&(cancelAnimationFrame(this.dragRafId),this.dragRafId=null),this.containerOffsetX=0,this.containerOffsetY=0,$e(this.container,"transform",""),this.movingRouterRestoreTimer&&(clearTimeout(this.movingRouterRestoreTimer),this.movingRouterRestoreTimer=null),this.restoreMovingRouters(),this.graph.model.stopBatch("move-selection"),this.translatingCache=null,this.notifyBoxEvent("box:mouseup",t,l.x,l.y),this.repositionSelectionBoxesInPlace();break}default:{this.clean();break}}this.undelegateDocumentEvents()}onMouseUp(t){const e=this.normalizeEvent(t);this.getEventData(e)&&this.stopSelecting(t)}onSelectionBoxMouseDown(t){this.handleSelectionMouseDown(t,!0)}onSelectionContainerMouseDown(t){this.handleSelectionMouseDown(t,!1)}handleSelectionMouseDown(t,e){var n;t.stopPropagation(),(n=t.preventDefault)===null||n===void 0||n.call(t);const r=this.normalizeEvent(t),l=this.graph.snapToGrid(r.clientX,r.clientY);if(!e&&Nu(r,this.options.multipleSelectionModifiers)){const p=this.graph.findViewsFromPoint(l.x,l.y).find(y=>y.isNodeView());if(p){const y=p.cell;this.isSelected(y)?this.unselect(y,{ui:!0}):this.options.multiple===!1?this.reset(y,{ui:!0}):this.select(y,{ui:!0})}return}this.options.movable&&this.startTranslating(r);let f=e?this.getCellViewFromElem(r.target):null;if(!f&&(f=this.graph.findViewsFromPoint(l.x,l.y).filter(p=>this.isSelected(p.cell))[0]||null,!f)){const p=this.collection.first();p&&(f=this.graph.renderer.findViewByCell(p))}f&&(this.setEventData(r,{activeView:f}),e&&this.notifyBoxEvent("box:mousedown",r,l.x,l.y),this.delegateDocumentEvents(k6,r.data))}startTranslating(t){this.graph.model.startBatch("move-selection");const e=this.graph.snapToGrid(t.clientX,t.clientY);this.setEventData(t,{action:"translating",clientX:e.x,clientY:e.y,originX:e.x,originY:e.y}),this.prepareTranslatingCache()}getRestrictArea(){const t=this.graph.options.translating.restrict,e=typeof t=="function"?Gt(t,this.graph,null):t;return typeof e=="number"?this.graph.transform.getGraphArea().inflate(e):e===!0?this.graph.transform.getGraphArea():e||null}prepareTranslatingCache(){const t=this.collection.toArray().filter(f=>f.isNode()),e=new Set(t.map(f=>f.id)),n=this.collection.toArray().filter(f=>f.isEdge()),r=new Set,l=f=>f.getVertices().length>0||!f.getSourceCellId()||!f.getTargetCellId();this.graph.model.getEdges().forEach(f=>{const h=f.getSourceCellId(),p=f.getTargetCellId();(h!=null&&e.has(h)||p!=null&&e.has(p))&&l(f)&&r.add(f)}),n.forEach(f=>{l(f)&&r.add(f)}),this.translatingCache={selectedNodes:t,nodeIdSet:e,edgesToTranslate:Array.from(r)}}applyMovingRouterFallback(){var t;if(this.movingRouterRestoreCache)return;const e=(t=this.translatingCache)===null||t===void 0?void 0:t.selectedNodes;if(!e||e.length<2)return;const n=this.options.movingRouterFallback;if(!n||!hp.exist(n))return;const r={name:n},l={},f=new Set;e.forEach(h=>{this.graph.model.getConnectedEdges(h).forEach(p=>{if(f.has(p.id))return;f.add(p.id);const y=p.getRouter();l[p.id]=y,p.setRouter(r,{silent:!0})})}),this.movingRouterRestoreCache=l,this.movingDegradeActivatedTs=Date.now()}restoreMovingRouters(){const t=this.movingRouterRestoreCache;t&&(Object.keys(t).forEach(e=>{const n=this.graph.getCellById(e);if(!n||!n.isEdge())return;const r=t[e];r==null?n.removeRouter({silent:!0}):n.setRouter(r,{silent:!0});const l=this.graph.findViewByCell(n);l&&this.graph.renderer.requestViewUpdate(l,l.getFlag("update"),{async:!0})}),this.movingRouterRestoreCache=null)}scheduleMovingRouterRestoreThrottle(){this.movingRouterRestoreTimer&&(clearTimeout(this.movingRouterRestoreTimer),this.movingRouterRestoreTimer=null),this.movingRouterRestoreTimer=setTimeout(()=>{const t=Date.now(),e=this.lastMovingTs||0,n=t-e,r=this.movingDegradeActivatedTs!=null?t-this.movingDegradeActivatedTs:1/0;if(n<ur.RESTORE_IDLE_TIME||r<ur.RESTORE_HOLD_TIME){const l=Math.max(ur.RESTORE_IDLE_TIME-n,ur.RESTORE_HOLD_TIME-r,ur.MIN_RESTORE_WAIT_TIME);this.movingRouterRestoreTimer=setTimeout(()=>{this.movingRouterRestoreTimer=null,this.restoreMovingRouters()},l);return}this.movingRouterRestoreTimer=null,this.restoreMovingRouters()},ur.RESTORE_IDLE_TIME)}getSelectionOffset(t,e){let n=t.x-e.clientX,r=t.y-e.clientY;const l=this.getRestrictArea();if(l){const f=this.collection.toArray(),h=Me.getCellsBBox(f,{deep:!0})||Dt.create(),p=l.x-h.x,y=l.y-h.y,x=l.x+l.width-(h.x+h.width),S=l.y+l.height-(h.y+h.height);if(n<p&&(n=p),r<y&&(r=y),x<n&&(n=x),S<r&&(r=S),!this.options.following){const w=t.x-e.originX,T=t.y-e.originY;n=w<=p||w>=x?0:n,r=T<=y||T>=S?0:r}}return{dx:n,dy:r}}updateSelectedNodesPosition(t){t.dx===0&&t.dy===0||(this.dragPendingOffset?(this.dragPendingOffset.dx+=t.dx,this.dragPendingOffset.dy+=t.dy):this.dragPendingOffset={dx:t.dx,dy:t.dy},this.dragRafId==null&&(this.dragRafId=requestAnimationFrame(()=>{const e=this.dragPendingOffset||{dx:0,dy:0};this.dragPendingOffset=null,this.dragRafId=null,this.translateSelectedNodes(e.dx,e.dy),this.updateContainerPosition(e),this.boxesUpdated=!0,this.isDragging=!0})))}autoScrollGraph(t,e){const n=this.graph.getPlugin("scroller");return n!=null&&n.autoScroll?n.autoScroll(t,e):{scrollerX:0,scrollerY:0}}adjustSelection(t){const e=this.normalizeEvent(t),n=this.getEventData(e);switch(n.action){case"selecting":{const l=n;l.moving!==!0&&(rr(this.container,this.graph.container),this.showRubberband(),l.moving=!0);const{scrollerX:f,scrollerY:h}=this.autoScrollGraph(e.clientX,e.clientY);l.scrollerX+=f,l.scrollerY+=h;const p=e.clientX-l.clientX+l.scrollerX,y=e.clientY-l.clientY+l.scrollerY;$e(this.container,{left:p<0?l.offsetX+p:l.offsetX,top:y<0?l.offsetY+y:l.offsetY,width:Math.abs(p),height:Math.abs(y)});break}case"translating":{this.isDragging=!0;const l=this.graph.snapToGrid(e.clientX,e.clientY),f=n,h=this.getSelectionOffset(l,f);this.options.following?this.updateSelectedNodesPosition(h):this.updateContainerPosition(h),h.dx&&(f.clientX=l.x),h.dy&&(f.clientY=l.y),(h.dx!==0||h.dy!==0)&&(this.lastMovingTs=Date.now(),this.applyMovingRouterFallback(),this.scheduleMovingRouterRestoreThrottle()),this.notifyBoxEvent("box:mousemove",t,l.x,l.y);break}}this.boxesUpdated=!1}translateSelectedNodes(t,e,n,r){var l,f;const h={},p=[];if(n&&(h[n.id]=!0),this.collection.toArray().forEach(D=>{D.getDescendants({deep:!0}).forEach(R=>{h[R.id]=!0})}),r!=null&&r.translateBy){const D=this.graph.getCellById(r.translateBy);D&&(h[D.id]=!0,D.getDescendants({deep:!0}).forEach(R=>{h[R.id]=!0}),p.push(D))}const y=Object.assign(Object.assign({},r),{selection:this.cid,exclude:p}),x=(l=this.translatingCache)===null||l===void 0?void 0:l.selectedNodes,S=(x??this.collection.toArray().filter(D=>D.isNode())).filter(D=>!h[D.id]);S.forEach(D=>{D.translate(t,e,y)});const w=(f=this.translatingCache)===null||f===void 0?void 0:f.edgesToTranslate,T=new Set;if(w)w.forEach(D=>{T.add(D)});else{const D=new Set(S.map(R=>R.id));this.graph.model.getEdges().forEach(R=>{const N=R.getSourceCellId(),L=R.getTargetCellId(),_=N?D.has(N):!1,U=L?D.has(L):!1;(_||U)&&(R.getVertices().length>0||(!N||!L))&&T.add(R)})}this.collection.toArray().filter(D=>D.isEdge()&&!h[D.id]).forEach(D=>{const R=D.getVertices().length>0,N=!D.getSourceCellId()||!D.getTargetCellId();(R||N)&&T.add(D)}),T.forEach(D=>{D.translate(t,e,y)})}getCellViewsInArea(t){const e=this.graph,n={strict:this.options.strict};let r=[];return this.options.rubberNode&&(r=r.concat(e.model.getNodesInArea(t,n).map(l=>e.renderer.findViewByCell(l)).filter(l=>l!=null))),this.options.rubberEdge&&(r=r.concat(e.model.getEdgesInArea(t,n).map(l=>e.renderer.findViewByCell(l)).filter(l=>l!=null))),r}notifyBoxEvent(t,e,n,r){const f=this.getEventData(e).activeView;this.trigger(t,{e,view:f,x:n,y:r,cell:f.cell})}getSelectedClassName(t){return this.prefixClassName(`${t.isNode()?"node":"edge"}-selected`)}addCellSelectedClassName(t){const e=this.graph.renderer.findViewByCell(t);e&&e.addClass(this.getSelectedClassName(t))}removeCellUnSelectedClassName(t){const e=this.graph.renderer.findViewByCell(t);e&&e.removeClass(this.getSelectedClassName(t))}destroySelectionBox(t){this.removeCellUnSelectedClassName(t),this.canShowSelectionBox(t)&&(or(this.container.querySelector(`[data-cell-id="${t.id}"]`)),this.$boxes.length===0&&this.hide(),this.boxCount=Math.max(0,this.boxCount-1))}destroyAllSelectionBoxes(t){t.forEach(e=>{this.removeCellUnSelectedClassName(e)}),this.hide(),or(this.$boxes),this.boxCount=0}hide(){dn(this.container,this.prefixClassName(pa.rubberband)),dn(this.container,this.prefixClassName(pa.selected))}showRubberband(){_t(this.container,this.prefixClassName(pa.rubberband))}hideRubberband(){dn(this.container,this.prefixClassName(pa.rubberband))}showSelected(){qA(this.container,"style"),_t(this.container,this.prefixClassName(pa.selected))}createContainer(){this.container=document.createElement("div"),_t(this.container,this.prefixClassName(pa.root)),this.options.className&&_t(this.container,this.options.className),$e(this.container,{willChange:"transform"}),this.selectionContainer=document.createElement("div"),_t(this.selectionContainer,this.prefixClassName(pa.inner)),this.selectionContent=document.createElement("div"),_t(this.selectionContent,this.prefixClassName(pa.content)),qi(this.selectionContainer,this.selectionContent),Te(this.selectionContainer,"data-selection-length",this.collection.length),NN(this.container,this.selectionContainer)}updateContainerPosition(t){if(t.dx||t.dy){const e=this.graph.transform.getScale();this.containerOffsetX+=t.dx*e.sx,this.containerOffsetY+=t.dy*e.sy,$e(this.container,"transform",`translate3d(${this.containerOffsetX}px, ${this.containerOffsetY}px, 0)`)}}updateContainer(){const t={x:1/0,y:1/0},e={x:0,y:0};this.collection.toArray().filter(l=>this.canShowSelectionBox(l)).forEach(l=>{const f=this.graph.renderer.findViewByCell(l);if(f){const h=f.getBBox({useCellGeometry:!0});t.x=Math.min(t.x,h.x),t.y=Math.min(t.y,h.y),e.x=Math.max(e.x,h.x+h.width),e.y=Math.max(e.y,h.y+h.height)}}),$e(this.selectionContainer,{position:"absolute",pointerEvents:this.options.movable?"auto":"none",cursor:this.options.movable?"move":"default",left:t.x,top:t.y,width:e.x-t.x,height:e.y-t.y}),Te(this.selectionContainer,"data-selection-length",this.collection.length);const r=this.options.content;if(r)if(typeof r=="function"){const l=Gt(r,this.graph,this,this.selectionContent);l&&(this.selectionContent.innerHTML=l)}else this.selectionContent.innerHTML=r;this.collection.length>0&&!this.container.parentNode?rr(this.container,this.graph.container):this.collection.length<=0&&this.container.parentNode&&this.container.parentNode.removeChild(this.container)}canShowSelectionBox(t){return t.isNode()&&this.options.showNodeSelectionBox===!0||t.isEdge()&&this.options.showEdgeSelectionBox===!0}getPointerEventsValue(t){return typeof t=="string"?t:t(this.cells)}createSelectionBox(t){if(this.addCellSelectedClassName(t),this.canShowSelectionBox(t)){const e=this.graph.renderer.findViewByCell(t);if(e){const n=e.getBBox({useCellGeometry:!0}),r=this.boxClassName,l=document.createElement("div"),f=this.options.pointerEvents;_t(l,r),_t(l,`${r}-${t.isNode()?"node":"edge"}`),Te(l,"data-cell-id",t.id),$e(l,{position:"absolute",left:n.x,top:n.y,width:n.width,height:n.height,pointerEvents:f?this.getPointerEventsValue(f):"auto"}),rr(l,this.container),this.showSelected(),this.boxCount+=1}}}updateSelectionBoxes(){if(this.collection.length>0){if(this.isDragging)return;this.updateThrottleTimer&&clearTimeout(this.updateThrottleTimer),this.updateThrottleTimer=setTimeout(()=>{this.refreshSelectionBoxes(),this.updateThrottleTimer=null},16)}}refreshSelectionBoxes(){or(this.$boxes),this.boxCount=0,this.collection.toArray().forEach(t=>{this.createSelectionBox(t)}),this.updateContainer(),this.boxesUpdated=!0}repositionSelectionBoxesInPlace(){const t=this.$boxes;if(t.length===0){this.refreshSelectionBoxes();return}for(const e of t){const n=e.getAttribute("data-cell-id");if(!n)continue;const r=this.collection.get(n);if(!r)continue;const l=this.graph.renderer.findViewByCell(r);if(!l)continue;const f=l.getBBox({useCellGeometry:!0});$e(e,{left:f.x,top:f.y,width:f.width,height:f.height})}this.updateContainer(),this.boxesUpdated=!0}getCellViewFromElem(t){const e=t.getAttribute("data-cell-id");if(e){const n=this.collection.get(e);if(n)return this.graph.renderer.findViewByCell(n)}return null}onCellRemoved({cell:t}){this.destroySelectionBox(t),this.batchUpdating||this.updateContainer()}onReseted({previous:t,current:e}){this.destroyAllSelectionBoxes(t),e.forEach(n=>{this.listenCellRemoveEvent(n),this.createSelectionBox(n)}),this.updateContainer()}onCellAdded({cell:t}){this.listenCellRemoveEvent(t),this.createSelectionBox(t),this.batchUpdating||this.updateContainer()}listenCellRemoveEvent(t){t.off("removed",this.onCellRemoved,this),t.on("removed",this.onCellRemoved,this)}onCollectionUpdated({added:t,removed:e,options:n}){t.forEach(l=>{this.trigger("cell:selected",{cell:l,options:n}),l.isNode()?this.trigger("node:selected",{cell:l,options:n,node:l}):l.isEdge()&&this.trigger("edge:selected",{cell:l,options:n,edge:l})}),e.forEach(l=>{this.trigger("cell:unselected",{cell:l,options:n}),l.isNode()?this.trigger("node:unselected",{cell:l,options:n,node:l}):l.isEdge()&&this.trigger("edge:unselected",{cell:l,options:n,edge:l})});const r={added:t,removed:e,options:n,selected:this.cells.filter(l=>!!this.graph.getCellById(l.id))};this.trigger("selection:changed",r)}dispose(){this.clean(),this.remove(),this.off()}}ur.RESTORE_IDLE_TIME=100,ur.RESTORE_HOLD_TIME=150,ur.MIN_RESTORE_WAIT_TIME=50,De([Re()],ur.prototype,"dispose",null);const mp="widget-selection",pa={root:mp,inner:`${mp}-inner`,box:`${mp}-box`,content:`${mp}-content`,rubberband:`${mp}-rubberband`,selected:`${mp}-selected`},k6={mousemove:"adjustSelection",touchmove:"adjustSelection",mouseup:"onMouseUp",touchend:"onMouseUp",touchcancel:"onMouseUp"};function wJ(s){return s.getAncestors().length}const CJ=`.x6-widget-selection {
|
|
426
|
+
position: absolute;
|
|
427
|
+
top: 0;
|
|
428
|
+
left: 0;
|
|
429
|
+
display: none;
|
|
430
|
+
width: 0;
|
|
431
|
+
height: 0;
|
|
432
|
+
touch-action: none;
|
|
433
|
+
}
|
|
434
|
+
.x6-widget-selection-rubberband {
|
|
435
|
+
display: block;
|
|
436
|
+
overflow: visible;
|
|
437
|
+
opacity: 0.3;
|
|
438
|
+
}
|
|
439
|
+
.x6-widget-selection-selected {
|
|
440
|
+
display: block;
|
|
441
|
+
}
|
|
442
|
+
.x6-widget-selection-box {
|
|
443
|
+
cursor: move;
|
|
444
|
+
}
|
|
445
|
+
.x6-widget-selection-inner[data-selection-length='0'],
|
|
446
|
+
.x6-widget-selection-inner[data-selection-length='1'] {
|
|
447
|
+
display: none;
|
|
448
|
+
}
|
|
449
|
+
.x6-widget-selection-content {
|
|
450
|
+
position: absolute;
|
|
451
|
+
top: 100%;
|
|
452
|
+
right: -20px;
|
|
453
|
+
left: -20px;
|
|
454
|
+
margin-top: 30px;
|
|
455
|
+
padding: 6px;
|
|
456
|
+
line-height: 14px;
|
|
457
|
+
text-align: center;
|
|
458
|
+
border-radius: 6px;
|
|
459
|
+
}
|
|
460
|
+
.x6-widget-selection-content:empty {
|
|
461
|
+
display: none;
|
|
462
|
+
}
|
|
463
|
+
.x6-widget-selection-rubberband {
|
|
464
|
+
background-color: #3498db;
|
|
465
|
+
border: 2px solid #2980b9;
|
|
466
|
+
}
|
|
467
|
+
.x6-widget-selection-box {
|
|
468
|
+
box-sizing: content-box !important;
|
|
469
|
+
margin-top: -4px;
|
|
470
|
+
margin-left: -4px;
|
|
471
|
+
padding-right: 4px;
|
|
472
|
+
padding-bottom: 4px;
|
|
473
|
+
border: 2px dashed #feb663;
|
|
474
|
+
box-shadow: 2px 2px 5px #d3d3d3;
|
|
475
|
+
}
|
|
476
|
+
.x6-widget-selection-inner {
|
|
477
|
+
box-sizing: content-box !important;
|
|
478
|
+
margin-top: -8px;
|
|
479
|
+
margin-left: -8px;
|
|
480
|
+
padding-right: 12px;
|
|
481
|
+
padding-bottom: 12px;
|
|
482
|
+
border: 2px solid #feb663;
|
|
483
|
+
box-shadow: 2px 2px 5px #d3d3d3;
|
|
484
|
+
}
|
|
485
|
+
.x6-widget-selection-content {
|
|
486
|
+
color: #fff;
|
|
487
|
+
font-size: 10px;
|
|
488
|
+
background-color: #6a6b8a;
|
|
489
|
+
}
|
|
490
|
+
`;dt.prototype.isSelectionEnabled=function(){const s=this.getPlugin("selection");return s?s.isEnabled():!1},dt.prototype.enableSelection=function(){const s=this.getPlugin("selection");return s&&s.enable(),this},dt.prototype.disableSelection=function(){const s=this.getPlugin("selection");return s&&s.disable(),this},dt.prototype.toggleSelection=function(s){const t=this.getPlugin("selection");return t&&t.toggleEnabled(s),this},dt.prototype.isMultipleSelection=function(){const s=this.getPlugin("selection");return s?s.isMultipleSelection():!1},dt.prototype.enableMultipleSelection=function(){const s=this.getPlugin("selection");return s&&s.enableMultipleSelection(),this},dt.prototype.disableMultipleSelection=function(){const s=this.getPlugin("selection");return s&&s.disableMultipleSelection(),this},dt.prototype.toggleMultipleSelection=function(s){const t=this.getPlugin("selection");return t&&t.toggleMultipleSelection(s),this},dt.prototype.isSelectionMovable=function(){const s=this.getPlugin("selection");return s?s.isSelectionMovable():!1},dt.prototype.enableSelectionMovable=function(){const s=this.getPlugin("selection");return s&&s.enableSelectionMovable(),this},dt.prototype.disableSelectionMovable=function(){const s=this.getPlugin("selection");return s&&s.disableSelectionMovable(),this},dt.prototype.toggleSelectionMovable=function(s){const t=this.getPlugin("selection");return t&&t.toggleSelectionMovable(s),this},dt.prototype.isRubberbandEnabled=function(){const s=this.getPlugin("selection");return s?s.isRubberbandEnabled():!1},dt.prototype.enableRubberband=function(){const s=this.getPlugin("selection");return s&&s.enableRubberband(),this},dt.prototype.disableRubberband=function(){const s=this.getPlugin("selection");return s&&s.disableRubberband(),this},dt.prototype.toggleRubberband=function(s){const t=this.getPlugin("selection");return t&&t.toggleRubberband(s),this},dt.prototype.isStrictRubberband=function(){const s=this.getPlugin("selection");return s?s.isStrictRubberband():!1},dt.prototype.enableStrictRubberband=function(){const s=this.getPlugin("selection");return s&&s.enableStrictRubberband(),this},dt.prototype.disableStrictRubberband=function(){const s=this.getPlugin("selection");return s&&s.disableStrictRubberband(),this},dt.prototype.toggleStrictRubberband=function(s){const t=this.getPlugin("selection");return t&&t.toggleStrictRubberband(s),this},dt.prototype.setRubberbandModifiers=function(s){const t=this.getPlugin("selection");return t&&t.setRubberbandModifiers(s),this},dt.prototype.setSelectionFilter=function(s){const t=this.getPlugin("selection");return t&&t.setSelectionFilter(s),this},dt.prototype.setSelectionDisplayContent=function(s){const t=this.getPlugin("selection");return t&&t.setSelectionDisplayContent(s),this},dt.prototype.isSelectionEmpty=function(){const s=this.getPlugin("selection");return s?s.isEmpty():!0},dt.prototype.cleanSelection=function(s){const t=this.getPlugin("selection");return t&&t.clean(s),this},dt.prototype.resetSelection=function(s,t){const e=this.getPlugin("selection");return e&&e.reset(s,t),this},dt.prototype.getSelectedCells=function(){const s=this.getPlugin("selection");return s?s.getSelectedCells():[]},dt.prototype.getSelectedCellCount=function(){const s=this.getPlugin("selection");return s?s.getSelectedCellCount():0},dt.prototype.isSelected=function(s){const t=this.getPlugin("selection");return t?t.isSelected(s):!1},dt.prototype.select=function(s,t){const e=this.getPlugin("selection");return e&&e.select(s,t),this},dt.prototype.unselect=function(s,t){const e=this.getPlugin("selection");return e&&e.unselect(s,t),this};const EJ={rubberband:!1,rubberNode:!0,rubberEdge:!1,pointerEvents:"auto",multiple:!0,multipleSelectionModifiers:["ctrl","meta"],movable:!0,strict:!1,selectCellOnMoved:!1,selectNodeOnMoved:!1,selectEdgeOnMoved:!1,following:!0,content:null,eventTypes:["leftMouseDown","mouseWheelDown"]};class V6 extends Ts{get rubberbandDisabled(){return this.options.enabled!==!0||this.options.rubberband!==!0}get disabled(){return this.options.enabled!==!0}get length(){return this.selectionImpl.length}get cells(){return this.selectionImpl.cells}constructor(t={}){super(),this.name="selection",this.movedMap=new WeakMap,this.unselectMap=new WeakMap,this.options=Object.assign(Object.assign({enabled:!0},EJ),t),Ou(this.name,CJ)}init(t){this.graph=t,this.selectionImpl=new ur(Object.assign(Object.assign({},this.options),{graph:t})),this.resolvePanningSelectionConflict(),this.setup(),this.startListening()}isEnabled(){return!this.disabled}enable(){this.disabled&&(this.options.enabled=!0)}disable(){this.disabled||(this.options.enabled=!1)}toggleEnabled(t){return t!=null?t!==this.isEnabled()&&(t?this.enable():this.disable()):this.isEnabled()?this.disable():this.enable(),this}isMultipleSelection(){return this.isMultiple()}enableMultipleSelection(){return this.enableMultiple(),this}disableMultipleSelection(){return this.disableMultiple(),this}toggleMultipleSelection(t){return t!=null?t!==this.isMultipleSelection()&&(t?this.enableMultipleSelection():this.disableMultipleSelection()):this.isMultipleSelection()?this.disableMultipleSelection():this.enableMultipleSelection(),this}isSelectionMovable(){return this.options.movable!==!1}enableSelectionMovable(){return this.selectionImpl.options.movable=!0,this}disableSelectionMovable(){return this.selectionImpl.options.movable=!1,this}toggleSelectionMovable(t){return t!=null?t!==this.isSelectionMovable()&&(t?this.enableSelectionMovable():this.disableSelectionMovable()):this.isSelectionMovable()?this.disableSelectionMovable():this.enableSelectionMovable(),this}isRubberbandEnabled(){return!this.rubberbandDisabled}enableRubberband(){return this.rubberbandDisabled&&(this.options.rubberband=!0),this}disableRubberband(){return this.rubberbandDisabled||(this.options.rubberband=!1),this}toggleRubberband(t){return t!=null?t!==this.isRubberbandEnabled()&&(t?this.enableRubberband():this.disableRubberband()):this.isRubberbandEnabled()?this.disableRubberband():this.enableRubberband(),this}isStrictRubberband(){return this.selectionImpl.options.strict===!0}enableStrictRubberband(){return this.selectionImpl.options.strict=!0,this}disableStrictRubberband(){return this.selectionImpl.options.strict=!1,this}toggleStrictRubberband(t){return t!=null?t!==this.isStrictRubberband()&&(t?this.enableStrictRubberband():this.disableStrictRubberband()):this.isStrictRubberband()?this.disableStrictRubberband():this.enableStrictRubberband(),this}setRubberbandModifiers(t){this.setModifiers(t)}setSelectionFilter(t){return this.setFilter(t),this}setSelectionDisplayContent(t){return this.setContent(t),this}isEmpty(){return this.length<=0}clean(t={}){return this.selectionImpl.clean(t),this}reset(t,e={}){return this.selectionImpl.reset(t?this.getCells(t):[],e),this}getSelectedCells(){return this.cells}getSelectedCellCount(){return this.length}isSelected(t){return this.selectionImpl.isSelected(t)}select(t,e={}){const n=this.getCells(t);return n.length&&(this.isMultiple()?this.selectionImpl.select(n,e):this.reset(n.slice(0,1),e)),this}unselect(t,e={}){return this.selectionImpl.unselect(this.getCells(t),e),this}setup(){this.selectionImpl.on("*",(t,e)=>{this.trigger(t,e),this.graph.trigger(t,e)})}startListening(){this.graph.on("blank:mousedown",this.onBlankMouseDown,this),this.graph.on("blank:click",this.onBlankClick,this),this.graph.on("cell:mousemove",this.onCellMouseMove,this),this.graph.on("cell:mouseup",this.onCellMouseUp,this),this.selectionImpl.on("box:mousedown",this.onBoxMouseDown,this)}stopListening(){this.graph.off("blank:mousedown",this.onBlankMouseDown,this),this.graph.off("blank:click",this.onBlankClick,this),this.graph.off("cell:mousemove",this.onCellMouseMove,this),this.graph.off("cell:mouseup",this.onCellMouseUp,this),this.selectionImpl.off("box:mousedown",this.onBoxMouseDown,this)}onBlankMouseDown({e:t}){if(!this.allowBlankMouseDown(t))return;const e=this.graph.panning.allowPanning(t,!0),n=this.graph.getPlugin("scroller"),r=n&&n.allowPanning(t,!0);(this.allowRubberband(t,!0)||this.allowRubberband(t)&&!r&&!e)&&this.startRubberband(t)}allowBlankMouseDown(t){const e=this.options.eventTypes;return typeof t.type=="string"&&t.type.startsWith("touch")||t.pointerType==="touch"?e==null?void 0:e.includes("leftMouseDown"):(e==null?void 0:e.includes("leftMouseDown"))&&t.button===0||(e==null?void 0:e.includes("mouseWheelDown"))&&t.button===1}onBlankClick(){this.clean()}allowRubberband(t,e){const n=t??{altKey:!1,ctrlKey:!1,metaKey:!1,shiftKey:!1};return!this.rubberbandDisabled&&Nu(n,this.options.modifiers,e)}resolvePanningSelectionConflict(){if(this.options.enabled!==!0||this.options.rubberband!==!0)return;const t=this.graph.options.panning;if(!t||t.enabled===!1)return;(()=>{var n,r;const l=(n=this.options.eventTypes)!==null&&n!==void 0?n:[],f=(r=t.eventTypes)!==null&&r!==void 0?r:[],h=new Set(f),p=l.some(x=>h.has(x)),y=WX(t.modifiers,this.options.modifiers);return p&&y})()&&this.graph.panning.disablePanning()}allowMultipleSelection(t){return this.isMultiple()&&Nu(t,this.options.multipleSelectionModifiers)}onCellMouseMove({cell:t}){this.movedMap.set(t,!0)}onCellMouseUp({e:t,cell:e}){const n=this.options;let r=this.disabled;!r&&this.movedMap.has(e)&&(r=n.selectCellOnMoved===!1,r||(r=n.selectNodeOnMoved===!1&&e.isNode()),r||(r=n.selectEdgeOnMoved===!1&&e.isEdge())),r||(this.allowMultipleSelection(t)?this.unselectMap.has(e)?this.unselectMap.delete(e):this.isSelected(e)?this.unselect(e):this.select(e):this.reset(e)),this.movedMap.delete(e)}onBoxMouseDown({e:t,cell:e}){this.disabled||this.allowMultipleSelection(t)&&(this.unselect(e),this.unselectMap.set(e,!0))}getCells(t){return(Array.isArray(t)?t:[t]).map(e=>typeof e=="string"?this.graph.getCellById(e):e).filter(e=>e!=null)}startRubberband(t){return this.rubberbandDisabled||this.selectionImpl.startSelecting(t),this}isMultiple(){return this.options.multiple!==!1}enableMultiple(){return this.options.multiple=!0,this}disableMultiple(){return this.options.multiple=!1,this}setModifiers(t){return this.options.modifiers=t,this}setContent(t){return this.selectionImpl.setContent(t),this}setFilter(t){return this.selectionImpl.setFilter(t),this}dispose(){this.stopListening(),this.off(),this.selectionImpl.dispose(),Du(this.name)}}De([Re()],V6.prototype,"dispose",null);const AJ=`.x6-widget-minimap {
|
|
491
|
+
position: relative;
|
|
492
|
+
display: table-cell;
|
|
493
|
+
box-sizing: border-box;
|
|
494
|
+
overflow: hidden;
|
|
495
|
+
text-align: center;
|
|
496
|
+
vertical-align: middle;
|
|
497
|
+
background-color: #fff;
|
|
498
|
+
user-select: none;
|
|
499
|
+
}
|
|
500
|
+
.x6-widget-minimap .x6-graph {
|
|
501
|
+
display: inline-block;
|
|
502
|
+
box-shadow: 0 0 4px 0 #eee;
|
|
503
|
+
cursor: pointer;
|
|
504
|
+
}
|
|
505
|
+
.x6-widget-minimap .x6-graph > svg {
|
|
506
|
+
pointer-events: none;
|
|
507
|
+
shape-rendering: optimizespeed;
|
|
508
|
+
}
|
|
509
|
+
.x6-widget-minimap .x6-graph .x6-node * {
|
|
510
|
+
/* stylelint-disable-next-line */
|
|
511
|
+
vector-effect: initial;
|
|
512
|
+
}
|
|
513
|
+
.x6-widget-minimap-viewport {
|
|
514
|
+
position: absolute;
|
|
515
|
+
box-sizing: content-box !important;
|
|
516
|
+
margin: -2px 0 0 -2px;
|
|
517
|
+
border: 2px solid #31d0c6;
|
|
518
|
+
cursor: move;
|
|
519
|
+
}
|
|
520
|
+
.x6-widget-minimap-viewport-zoom {
|
|
521
|
+
position: absolute;
|
|
522
|
+
right: 0;
|
|
523
|
+
bottom: 0;
|
|
524
|
+
box-sizing: border-box;
|
|
525
|
+
width: 12px;
|
|
526
|
+
height: 12px;
|
|
527
|
+
margin: 0 -6px -6px 0;
|
|
528
|
+
background-color: #fff;
|
|
529
|
+
border: 2px solid #31d0c6;
|
|
530
|
+
border-radius: 50%;
|
|
531
|
+
cursor: nwse-resize;
|
|
532
|
+
}
|
|
533
|
+
`,TJ={width:300,height:200,padding:10,scalable:!0,minScale:.01,maxScale:16,graphOptions:{},createGraph:s=>new dt(s)},MJ={mousemove:"doAction",touchmove:"doAction",mouseup:"stopAction",touchend:"stopAction"},G6="widget-minimap",$6=`${G6}-viewport`,OJ=`${$6}-zoom`;class DJ extends to{get scroller(){return this.graph.getPlugin("scroller")}get graphContainer(){return this.scroller?this.scroller.container:this.graph.container}constructor(t){super(),this.name="minimap",this.options=Object.assign(Object.assign({},TJ),t),Ou(this.name,AJ)}init(t){this.graph=t,this.updateViewport=q1(this.updateViewport.bind(this),0),this.container=document.createElement("div"),_t(this.container,this.prefixClassName(G6));const e=document.createElement("div");this.container.appendChild(e),this.viewport=document.createElement("div"),_t(this.viewport,this.prefixClassName($6)),this.options.scalable&&(this.zoomHandle=document.createElement("div"),_t(this.zoomHandle,this.prefixClassName(OJ)),rr(this.zoomHandle,this.viewport)),qi(this.container,this.viewport),$e(this.container,{width:this.options.width,height:this.options.height,padding:this.options.padding}),this.options.container&&this.options.container.appendChild(this.container),this.sourceGraph=this.graph;const n=Object.assign(Object.assign({},this.options.graphOptions),{container:e,model:this.sourceGraph.model,interacting:!1,grid:!1,background:!1,embedding:!1,panning:!1});this.targetGraph=this.options.createGraph?this.options.createGraph(n):new dt(n),this.updatePaper(this.sourceGraph.options.width,this.sourceGraph.options.height),this.startListening()}startListening(){this.scroller?nn.on(this.graphContainer,`scroll${this.getEventNamespace()}`,this.updateViewport):(this.sourceGraph.on("translate",this.onTransform,this),this.sourceGraph.on("scale",this.onTransform,this),this.sourceGraph.on("model:updated",this.onModelUpdated,this)),this.sourceGraph.on("resize",this.updatePaper,this),this.delegateEvents({mousedown:"startAction",touchstart:"startAction",[`mousedown .${this.prefixClassName("graph")}`]:"scrollTo",[`touchstart .${this.prefixClassName("graph")}`]:"scrollTo"})}stopListening(){this.scroller?nn.off(this.graphContainer,this.getEventNamespace()):(this.sourceGraph.off("translate",this.onTransform,this),this.sourceGraph.off("scale",this.onTransform,this),this.sourceGraph.off("model:updated",this.onModelUpdated,this)),this.sourceGraph.off("resize",this.updatePaper,this),this.undelegateEvents()}onRemove(){this.stopListening(),this.targetGraph.dispose(!1)}onTransform(t){(t.ui||this.targetGraphTransforming||!this.scroller)&&this.updateViewport()}onModelUpdated(){this.targetGraph.zoomToFit()}updatePaper(t,e){let n,r;typeof t=="object"?(n=t.width,r=t.height):(n=t,r=e);const l=this.sourceGraph.options,f=this.sourceGraph.transform.getScale(),h=this.options.width-2*this.options.padding,p=this.options.height-2*this.options.padding;n/=f.sx,r/=f.sy,this.ratio=Math.min(h/n,p/r);const y=this.ratio,x=l.x*y/f.sx,S=l.y*y/f.sy;return n*=y,r*=y,this.targetGraph.resize(n,r),this.targetGraph.translate(x,S),this.scroller?this.targetGraph.scale(y,y):this.targetGraph.zoomToFit(),this.updateViewport(),this}updateViewport(){const t=this.sourceGraph.transform.getScale(),e=this.targetGraph.transform.getScale(),n=this.scroller?this.scroller.clientToLocalPoint(0,0):this.graph.graphToLocal(0,0),r=lX(this.targetGraph.container),l=this.targetGraph.translate();l.ty=l.ty||0,this.geometry={top:r.top+n.y*e.sy+l.ty,left:r.left+n.x*e.sx+l.tx,width:this.graphContainer.clientWidth*e.sx/t.sx,height:this.graphContainer.clientHeight*e.sy/t.sy},$e(this.viewport,this.geometry)}startAction(t){const e=this.normalizeEvent(t),n=e.target===this.zoomHandle?"zooming":"panning",{tx:r,ty:l}=this.sourceGraph.translate(),f={action:n,clientX:e.clientX,clientY:e.clientY,scrollLeft:this.graphContainer.scrollLeft,scrollTop:this.graphContainer.scrollTop,zoom:this.sourceGraph.zoom(),scale:this.sourceGraph.transform.getScale(),geometry:this.geometry,translateX:r,translateY:l};this.targetGraphTransforming=!0,this.delegateDocumentEvents(MJ,f)}doAction(t){const e=this.normalizeEvent(t),n=e.clientX,r=e.clientY,l=e.data;switch(l.action){case"panning":{const f=this.sourceGraph.transform.getScale(),h=(n-l.clientX)*f.sx,p=(r-l.clientY)*f.sy;this.scroller?(this.graphContainer.scrollLeft=l.scrollLeft+h/this.ratio,this.graphContainer.scrollTop=l.scrollTop+p/this.ratio):this.sourceGraph.translate(l.translateX-h/this.ratio,l.translateY-p/this.ratio);break}case"zooming":{const f=l.scale,h=l.geometry,p=1+(l.clientX-n)/h.width/f.sx;l.frameId&&cancelAnimationFrame(l.frameId),l.frameId=requestAnimationFrame(()=>{this.sourceGraph.zoom(p*l.zoom,{absolute:!0,minScale:this.options.minScale,maxScale:this.options.maxScale})});break}}}stopAction(){this.undelegateDocumentEvents(),this.targetGraphTransforming=!1}scrollTo(t){const e=this.normalizeEvent(t);let n,r;const l=this.targetGraph.translate();if(l.ty=l.ty||0,e.offsetX==null){const p=lp(this.targetGraph.container);n=e.pageX-p.left,r=e.pageY-p.top}else n=e.offsetX,r=e.offsetY;const f=(n-l.tx)/this.ratio,h=(r-l.ty)/this.ratio;this.sourceGraph.centerPoint(f,h)}dispose(){this.remove(),Du(this.name)}}De([Re()],DJ.prototype,"dispose",null);const NS="graph-scroller",RJ=`${NS}-paged`,zJ=`${NS}-content`,NJ=`${NS}-background`,q6="transition-in-progress",XT="transitionend.graph-scroller-transition",LJ={padding(){const s=this.getClientSize(),t=Math.max(this.options.minVisibleWidth||0,1)||1,e=Math.max(this.options.minVisibleHeight||0,1)||1,n=Math.max(s.width-t,0),r=Math.max(s.height-e,0);return{left:n,top:r,right:n,bottom:r}},minVisibleWidth:50,minVisibleHeight:50,pageVisible:!1,pageBreak:!1,autoResize:!0};function Y6(s){const t=Mn({},LJ,s);t.pageWidth==null&&(t.pageWidth=s.graph.options.width),t.pageHeight==null&&(t.pageHeight=s.graph.options.height);const e=s.graph.options;return e.background&&t.enabled&&t.background==null&&(t.background=e.background,s.graph.background.clear()),t}class X6 extends to{get graph(){return this.options.graph}get model(){return this.graph.model}constructor(t){super(),this.padding={left:0,top:0,right:0,bottom:0},this.options=Y6(t),this.onUpdate=q1(this.onUpdate,200);const e=this.graph.transform.getScale();this.sx=e.sx,this.sy=e.sy;const n=this.options.width||this.graph.options.width,r=this.options.height||this.graph.options.height;this.container=document.createElement("div"),_t(this.container,this.prefixClassName(NS)),$e(this.container,{width:n,height:r}),this.options.pageVisible&&_t(this.container,this.prefixClassName(RJ)),this.options.className&&_t(this.container,this.options.className);const l=this.graph.container;l.parentNode&&gb(l,this.container),this.content=document.createElement("div"),_t(this.content,this.prefixClassName(zJ)),$e(this.content,{width:this.graph.options.width,height:this.graph.options.height}),this.background=document.createElement("div"),_t(this.background,this.prefixClassName(NJ)),qi(this.content,this.background),this.options.pageVisible||qi(this.content,this.graph.view.grid),qi(this.content,l),rr(this.content,this.container),this.startListening(),this.options.pageVisible||this.graph.grid.update(),this.backgroundManager=new jJ(this),this.options.autoResize||this.update()}startListening(){const t=this.graph,e=this.model;t.on("scale",this.onScale,this),t.on("resize",this.onResize,this),t.on("before:print",this.storeScrollPosition,this),t.on("before:export",this.storeScrollPosition,this),t.on("after:print",this.restoreScrollPosition,this),t.on("after:export",this.restoreScrollPosition,this),e.on("reseted",this.onUpdate,this),e.on("cell:added",this.onUpdate,this),e.on("cell:removed",this.onUpdate,this),e.on("cell:changed",this.onUpdate,this),this.delegateBackgroundEvents()}stopListening(){const t=this.graph,e=this.model;t.off("scale",this.onScale,this),t.off("resize",this.onResize,this),t.off("beforeprint",this.storeScrollPosition,this),t.off("beforeexport",this.storeScrollPosition,this),t.off("afterprint",this.restoreScrollPosition,this),t.off("afterexport",this.restoreScrollPosition,this),e.off("reseted",this.onUpdate,this),e.off("cell:added",this.onUpdate,this),e.off("cell:removed",this.onUpdate,this),e.off("cell:changed",this.onUpdate,this),this.undelegateBackgroundEvents()}enableAutoResize(){this.options.autoResize=!0}disableAutoResize(){this.options.autoResize=!1}onUpdate(){this.options.autoResize&&this.update()}delegateBackgroundEvents(t){const e=t||lc.events;this.delegatedHandlers=Object.keys(e).reduce((n,r)=>{const l=e[r];if(r.indexOf(" ")===-1)if(typeof l=="function")n[r]=l;else{let f=this.graph.view[l];typeof f=="function"&&(f=f.bind(this.graph.view),n[r]=f)}return n},{}),this.onBackgroundEvent=this.onBackgroundEvent.bind(this),Object.keys(this.delegatedHandlers).forEach(n=>{this.delegateEvent(n,{guarded:!1},this.onBackgroundEvent)})}undelegateBackgroundEvents(){Object.keys(this.delegatedHandlers).forEach(t=>{this.undelegateEvent(t,this.onBackgroundEvent)})}onBackgroundEvent(t){let e=!1;const n=t.target;if(this.options.pageVisible)this.options.background?e=this.background===n:e=this.content===n;else{const r=this.graph.view;e=r.background===n||r.grid===n}if(e){const r=this.delegatedHandlers[t.type];typeof r=="function"&&r.apply(this.graph,arguments)}}onResize(){this.cachedCenterPoint&&(this.centerPoint(this.cachedCenterPoint.x,this.cachedCenterPoint.y),this.updatePageBreak())}onScale({sx:t,sy:e,ox:n,oy:r}){this.updateScale(t,e),(n||r)&&(this.centerPoint(n,r),this.updatePageBreak()),typeof this.options.autoResizeOptions=="function"&&this.update()}storeScrollPosition(){this.cachedScrollLeft=this.container.scrollLeft,this.cachedScrollTop=this.container.scrollTop}restoreScrollPosition(){this.container.scrollLeft=this.cachedScrollLeft,this.container.scrollTop=this.cachedScrollTop,this.cachedScrollLeft=null,this.cachedScrollTop=null}storeClientSize(){this.cachedClientSize={width:this.container.clientWidth,height:this.container.clientHeight}}restoreClientSize(){this.cachedClientSize=null}beforeManipulation(){(gN||pN)&&$e(this.container,{visibility:"hidden"})}afterManipulation(){(gN||pN)&&$e(this.container,{visibility:"visible"})}updatePageSize(t,e){t!=null&&(this.options.pageWidth=t),e!=null&&(this.options.pageHeight=e),this.updatePageBreak()}updatePageBreak(){if(this.pageBreak&&this.pageBreak.parentNode&&this.pageBreak.parentNode.removeChild(this.pageBreak),this.pageBreak=null,this.options.pageVisible&&this.options.pageBreak){const t=this.graph.options.width,e=this.graph.options.height,n=this.options.pageWidth*this.sx,r=this.options.pageHeight*this.sy;if(n===0||r===0)return;if(t>n||e>r){let l=!1;const f=document.createElement("div");for(let h=1,p=Math.floor(t/n);h<p;h+=1){const y=document.createElement("div");_t(y,this.prefixClassName("graph-pagebreak-vertical")),$e(y,{left:h*n}),rr(y,f),l=!0}for(let h=1,p=Math.floor(e/r);h<p;h+=1){const y=document.createElement("div");_t(y,this.prefixClassName("graph-pagebreak-horizontal")),$e(y,{top:h*r}),rr(y,f),l=!0}l&&(_t(f,this.prefixClassName("graph-pagebreak")),sY(this.graph.view.grid,f),this.pageBreak=f)}}}update(){const t=this.getClientSize();this.cachedCenterPoint=this.clientToLocalPoint(t.width/2,t.height/2);let e=this.options.autoResizeOptions;typeof e=="function"&&(e=Gt(e,this,this));const n=Object.assign({gridWidth:this.options.pageWidth,gridHeight:this.options.pageHeight,allowNewOrigin:"negative"},e);this.graph.fitToContent(this.getFitToContentOptions(n))}getFitToContentOptions(t){const e=this.sx,n=this.sy;return t.gridWidth&&(t.gridWidth*=e),t.gridHeight&&(t.gridHeight*=n),t.minWidth&&(t.minWidth*=e),t.minHeight&&(t.minHeight*=n),typeof t.padding=="object"?t.padding={left:(t.padding.left||0)*e,right:(t.padding.right||0)*e,top:(t.padding.top||0)*n,bottom:(t.padding.bottom||0)*n}:typeof t.padding=="number"&&(t.padding*=e),this.options.autoResize||(t.contentArea=Dt.create()),t}updateScale(t,e){const n=this.graph.options,r=t/this.sx,l=e/this.sy;this.sx=t,this.sy=e,this.graph.translate(n.x*r,n.y*l),this.graph.transform.resize(n.width*r,n.height*l)}scrollbarPosition(t,e){if(t==null&&e==null)return{left:this.container.scrollLeft,top:this.container.scrollTop};const n={};return typeof t=="number"&&(n.scrollLeft=t),typeof e=="number"&&(n.scrollTop=e),FA(this.container,n),this}scrollToPoint(t,e){const n=this.getClientSize(),r=this.graph.matrix(),l={};return typeof t=="number"&&(l.scrollLeft=t-n.width/2+r.e+(this.padding.left||0)),typeof e=="number"&&(l.scrollTop=e-n.height/2+r.f+(this.padding.top||0)),FA(this.container,l),this}scrollToContent(){const t=this.sx,e=this.sy,n=this.graph.getContentArea().getCenter();return this.scrollToPoint(n.x*t,n.y*e)}scrollToCell(t){const e=this.sx,n=this.sy,r=t.getBBox().getCenter();return this.scrollToPoint(r.x*e,r.y*n)}center(t){return this.centerPoint(t)}centerPoint(t,e,n){const r=this.graph.matrix(),l=r.a,f=r.d,h=-r.e,p=-r.f,y=h+this.graph.options.width,x=p+this.graph.options.height;let S;if(this.storeClientSize(),typeof t=="number"||typeof e=="number"){S=n;const $=this.getVisibleArea().getCenter();typeof t=="number"?t*=l:t=$.x,typeof e=="number"?e*=f:e=$.y}else S=t,t=(h+y)/2,e=(p+x)/2;if(S&&S.padding)return this.positionPoint({x:t,y:e},"50%","50%",S);const w=this.getPadding(),T=this.getClientSize(),M=T.width/2,D=T.height/2,R=M-w.left-t+h,N=M-w.right+t-y,L=D-w.top-e+p,_=D-w.bottom+e-x;this.addPadding(Math.max(R,0),Math.max(N,0),Math.max(L,0),Math.max(_,0));const U=this.scrollToPoint(t,e);return this.restoreClientSize(),U}centerContent(t){return this.positionContent("center",t)}centerCell(t,e){return this.positionCell(t,"center",e)}positionContent(t,e){const n=this.graph.getContentArea(e);return this.positionRect(n,t,e)}positionCell(t,e,n){const r=t.getBBox();return this.positionRect(r,e,n)}positionRect(t,e,n){const r=Dt.create(t);switch(e){case"center":return this.positionPoint(r.getCenter(),"50%","50%",n);case"top":return this.positionPoint(r.getTopCenter(),"50%",0,n);case"top-right":return this.positionPoint(r.getTopRight(),"100%",0,n);case"right":return this.positionPoint(r.getRightMiddle(),"100%","50%",n);case"bottom-right":return this.positionPoint(r.getBottomRight(),"100%","100%",n);case"bottom":return this.positionPoint(r.getBottomCenter(),"50%","100%",n);case"bottom-left":return this.positionPoint(r.getBottomLeft(),0,"100%",n);case"left":return this.positionPoint(r.getLeftMiddle(),0,"50%",n);case"top-left":return this.positionPoint(r.getTopLeft(),0,0,n);default:return this}}positionPoint(t,e,n,r={}){const{padding:l}=r,f=re(r,["padding"]),h=fa(l),p=Dt.fromSize(this.getClientSize()),y=p.clone().moveAndExpand({x:h.left,y:h.top,width:-h.right-h.left,height:-h.top-h.bottom});e=So(e,Math.max(0,y.width)),e<0&&(e=y.width+e),n=So(n,Math.max(0,y.height)),n<0&&(n=y.height+n);const x=y.getTopLeft().translate(e,n),S=p.getCenter().diff(x),w=this.zoom(),T=S.scale(1/w,1/w),M=G.create(t).translate(T);return this.centerPoint(M.x,M.y,f)}zoom(t,e){if(t==null)return this.sx;e=e||{};let n,r;const l=this.getClientSize(),f=this.clientToLocalPoint(l.width/2,l.height/2);let h=t,p=t;if(e.absolute||(h+=this.sx,p+=this.sy),e.scaleGrid&&(h=Math.round(h/e.scaleGrid)*e.scaleGrid,p=Math.round(p/e.scaleGrid)*e.scaleGrid),e.maxScale&&(h=Math.min(e.maxScale,h),p=Math.min(e.maxScale,p)),e.minScale&&(h=Math.max(e.minScale,h),p=Math.max(e.minScale,p)),h=this.graph.transform.clampScale(h),p=this.graph.transform.clampScale(p),e.center){const y=h/this.sx,x=p/this.sy;n=e.center.x-(e.center.x-f.x)/y,r=e.center.y-(e.center.y-f.y)/x}else n=f.x,r=f.y;return this.beforeManipulation(),this.graph.transform.scale(h,p,n,r,!1),this.centerPoint(n,r),this.afterManipulation(),this}zoomToRect(t,e={}){const n=Dt.create(t),r=this.graph;if(e.contentArea=n,e.viewportArea==null){const f=this.container.getBoundingClientRect();e.viewportArea={x:r.options.x,y:r.options.y,width:f.width,height:f.height}}this.beforeManipulation(),r.transform.scaleContentToFitImpl(e,!1);const l=n.getCenter();return this.centerPoint(l.x,l.y),this.afterManipulation(),this}zoomToFit(t={}){return this.zoomToRect(this.graph.getContentArea(t),t)}transitionToPoint(t,e,n){typeof t=="object"?(n=e,e=t.y,t=t.x):e=e,n==null&&(n={});let r,l;const f=this.sx,h=Math.max(n.scale||f,1e-6),p=this.getClientSize(),y=new G(t,e),x=this.clientToLocalPoint(p.width/2,p.height/2);if(f===h){const w=x.diff(y).scale(f,f).round();r=`translate(${w.x}px,${w.y}px)`}else{const w=h/(f-h)*y.distance(x),T=x.clone().move(y,w),M=this.localToBackgroundPoint(T).round();r=`scale(${h/f})`,l=`${M.x}px ${M.y}px`}const S=n.onTransitionEnd;return _t(this.container,q6),nn.off(this.content,XT),nn.on(this.content,XT,w=>{this.syncTransition(h,{x:t,y:e}),typeof S=="function"&&Gt(S,this,w.originalEvent)}),$e(this.content,{transform:r,transformOrigin:l,transition:"transform",transitionDuration:n.duration||"1s",transitionDelay:n.delay,transitionTimingFunction:n.timing}),this}syncTransition(t,e){return this.beforeManipulation(),this.graph.scale(t),this.removeTransition(),this.centerPoint(e.x,e.y),this.afterManipulation(),this}removeTransition(){return dn(this.container,q6),nn.off(this.content,XT),$e(this.content,{transform:"",transformOrigin:"",transition:"",transitionDuration:"",transitionDelay:"",transitionTimingFunction:""}),this}transitionToRect(t,e={}){const n=Dt.create(t),r=e.maxScale||1/0,l=e.minScale||Number.MIN_VALUE,f=e.scaleGrid||null,h=e.visibility||1,p=e.center?G.create(e.center):n.getCenter(),y=this.getClientSize(),x=y.width*h,S=y.height*h;let w=new Dt(p.x-x/2,p.y-S/2,x,S).getMaxUniformScaleToFit(n,p);return w=Math.min(w,r),f&&(w=Math.floor(w/f)*f),w=Math.max(l,w),this.transitionToPoint(p,Object.assign({scale:w},e))}startPanning(t){const e=this.normalizeEvent(t);this.clientX=e.clientX,this.clientY=e.clientY,this.trigger("pan:start",{e}),nn.on(document.body,{"mousemove.panning touchmove.panning":this.pan.bind(this),"mouseup.panning touchend.panning":this.stopPanning.bind(this),"mouseleave.panning":this.stopPanning.bind(this)}),nn.on(window,"mouseup.panning",this.stopPanning.bind(this))}pan(t){const e=this.normalizeEvent(t),n=e.clientX-this.clientX,r=e.clientY-this.clientY;this.container.scrollTop-=r,this.container.scrollLeft-=n,this.clientX=e.clientX,this.clientY=e.clientY,this.trigger("panning",{e})}stopPanning(t){nn.off(document.body,".panning"),nn.off(window,".panning"),this.trigger("pan:stop",{e:t})}clientToLocalPoint(t,e){let n=typeof t=="object"?t.x:t,r=typeof t=="object"?t.y:e;const l=this.graph.matrix();return n+=this.container.scrollLeft-this.padding.left-l.e,r+=this.container.scrollTop-this.padding.top-l.f,new G(n/l.a,r/l.d)}localToBackgroundPoint(t,e){const n=typeof t=="object"?G.create(t):new G(t,e),r=this.graph.matrix(),l=this.padding;return oc(n,r).translate(l.left,l.top)}resize(t,e){let n=t??this.container.offsetWidth,r=e??this.container.offsetHeight;typeof n=="number"&&(n=Math.round(n)),typeof r=="number"&&(r=Math.round(r)),this.options.width=n,this.options.height=r,$e(this.container,{width:n,height:r}),this.update()}getClientSize(){return this.cachedClientSize?this.cachedClientSize:{width:this.container.clientWidth,height:this.container.clientHeight}}autoScroll(t,e){const r=this.container,l=r.getBoundingClientRect();let f=0,h=0;return t<=l.left+10&&(f=-10),e<=l.top+10&&(h=-10),t>=l.right-10&&(f=10),e>=l.bottom-10&&(h=10),f!==0&&(r.scrollLeft+=f),h!==0&&(r.scrollTop+=h),{scrollerX:f,scrollerY:h}}addPadding(t,e,n,r){let l=this.getPadding();this.padding={left:Math.round(l.left+(t||0)),top:Math.round(l.top+(n||0)),bottom:Math.round(l.bottom+(r||0)),right:Math.round(l.right+(e||0))},l=this.padding,$e(this.content,{width:l.left+this.graph.options.width+l.right,height:l.top+this.graph.options.height+l.bottom});const f=this.graph.container;return f.style.left=`${this.padding.left}px`,f.style.top=`${this.padding.top}px`,this}getPadding(){const t=this.options.padding;return fa(typeof t=="function"?Gt(t,this,this):t)}getVisibleArea(){const t=this.graph.matrix(),e=this.getClientSize(),n={x:this.container.scrollLeft||0,y:this.container.scrollTop||0,width:e.width,height:e.height},r=ar(n,t.inverse());return r.x-=(this.padding.left||0)/this.sx,r.y-=(this.padding.top||0)/this.sy,r}isCellVisible(t,e={}){const n=t.getBBox(),r=this.getVisibleArea();return e.strict?r.containsRect(n):r.isIntersectWithRect(n)}isPointVisible(t){return this.getVisibleArea().containsPoint(t)}lock(){return $e(this.container,{overflow:"hidden"}),this}unlock(){return $e(this.container,{overflow:"scroll"}),this}onRemove(){this.stopListening()}dispose(){gb(this.container,this.graph.container),this.remove()}}De([Re()],X6.prototype,"dispose",null);class jJ extends zT{get elem(){return this.scroller.background}constructor(t){super(t.graph),this.scroller=t,t.options.background&&this.draw(t.options.background)}init(){this.graph.on("scale",this.update,this),this.graph.on("translate",this.update,this)}updateBackgroundOptions(t){this.scroller.options.background=t}}const _J=`.x6-graph-scroller {
|
|
534
|
+
position: relative;
|
|
535
|
+
box-sizing: border-box;
|
|
536
|
+
overflow: scroll;
|
|
537
|
+
outline: none;
|
|
538
|
+
}
|
|
539
|
+
.x6-graph-scroller-content {
|
|
540
|
+
position: relative;
|
|
541
|
+
}
|
|
542
|
+
.x6-graph-scroller-background {
|
|
543
|
+
position: absolute;
|
|
544
|
+
top: 0;
|
|
545
|
+
right: 0;
|
|
546
|
+
bottom: 0;
|
|
547
|
+
left: 0;
|
|
548
|
+
}
|
|
549
|
+
.x6-graph-scroller .x6-graph {
|
|
550
|
+
position: absolute;
|
|
551
|
+
display: inline-block;
|
|
552
|
+
margin: 0;
|
|
553
|
+
box-shadow: none;
|
|
554
|
+
}
|
|
555
|
+
.x6-graph-scroller .x6-graph > svg {
|
|
556
|
+
display: block;
|
|
557
|
+
}
|
|
558
|
+
.x6-graph-scroller.x6-graph-scroller-paged .x6-graph {
|
|
559
|
+
box-shadow: 0 0 4px 0 #eee;
|
|
560
|
+
}
|
|
561
|
+
.x6-graph-scroller.x6-graph-scroller-pannable[data-panning='false'] {
|
|
562
|
+
cursor: grab;
|
|
563
|
+
}
|
|
564
|
+
.x6-graph-scroller.x6-graph-scroller-pannable[data-panning='true'] {
|
|
565
|
+
cursor: grabbing;
|
|
566
|
+
user-select: none;
|
|
567
|
+
}
|
|
568
|
+
.x6-graph-pagebreak {
|
|
569
|
+
position: absolute;
|
|
570
|
+
top: 0;
|
|
571
|
+
right: 0;
|
|
572
|
+
bottom: 0;
|
|
573
|
+
left: 0;
|
|
574
|
+
}
|
|
575
|
+
.x6-graph-pagebreak-vertical {
|
|
576
|
+
position: absolute;
|
|
577
|
+
top: 0;
|
|
578
|
+
bottom: 0;
|
|
579
|
+
box-sizing: border-box;
|
|
580
|
+
width: 1px;
|
|
581
|
+
border-left: 1px dashed #bdbdbd;
|
|
582
|
+
}
|
|
583
|
+
.x6-graph-pagebreak-horizontal {
|
|
584
|
+
position: absolute;
|
|
585
|
+
right: 0;
|
|
586
|
+
left: 0;
|
|
587
|
+
box-sizing: border-box;
|
|
588
|
+
height: 1px;
|
|
589
|
+
border-top: 1px dashed #bdbdbd;
|
|
590
|
+
}
|
|
591
|
+
`;dt.prototype.lockScroller=function(){const s=this.getPlugin("scroller");return s&&s.lockScroller(),this},dt.prototype.unlockScroller=function(){const s=this.getPlugin("scroller");return s&&s.unlockScroller(),this},dt.prototype.updateScroller=function(){const s=this.getPlugin("scroller");return s&&s.updateScroller(),this},dt.prototype.getScrollbarPosition=function(){const s=this.getPlugin("scroller");return s?s.getScrollbarPosition():{left:0,top:0}},dt.prototype.setScrollbarPosition=function(s,t){const e=this.getPlugin("scroller");return e&&e.setScrollbarPosition(s,t),this};class BJ extends Ts{get pannable(){return this.options?typeof this.options.pannable=="object"?this.options.pannable.enabled:!!this.options.pannable:!1}get container(){return this.scrollerImpl.container}constructor(t={}){super(),this.name="scroller",this.options=t,Ou(this.name,_J)}init(t){this.graph=t;const e=Y6(Object.assign(Object.assign({enabled:!0},this.options),{graph:t}));this.options=e,this.scrollerImpl=new X6(e),this.setup(),this.autoDisableGraphPanning(),this.startListening(),this.updateClassName(),this.scrollerImpl.center()}resize(t,e){this.scrollerImpl.resize(t,e)}resizePage(t,e){this.scrollerImpl.updatePageSize(t,e)}zoom(t,e){return typeof t>"u"?this.scrollerImpl.zoom():(this.scrollerImpl.zoom(t,e),this)}zoomTo(t,e={}){return this.scrollerImpl.zoom(t,Object.assign(Object.assign({},e),{absolute:!0})),this}zoomToRect(t,e={}){return this.scrollerImpl.zoomToRect(t,e),this}zoomToFit(t={}){return this.scrollerImpl.zoomToFit(t),this}center(t){return this.centerPoint(t)}centerPoint(t,e,n){return this.scrollerImpl.centerPoint(t,e,n),this}centerContent(t){return this.scrollerImpl.centerContent(t),this}centerCell(t,e){return this.scrollerImpl.centerCell(t,e),this}positionPoint(t,e,n,r={}){return this.scrollerImpl.positionPoint(t,e,n,r),this}positionRect(t,e,n){return this.scrollerImpl.positionRect(t,e,n),this}positionCell(t,e,n){return this.scrollerImpl.positionCell(t,e,n),this}positionContent(t,e){return this.scrollerImpl.positionContent(t,e),this}drawBackground(t,e){return(this.graph.options.background==null||!e)&&this.scrollerImpl.backgroundManager.draw(t),this}clearBackground(t){return(this.graph.options.background==null||!t)&&this.scrollerImpl.backgroundManager.clear(),this}isPannable(){return this.pannable}enablePanning(){this.pannable||(this.options.pannable=!0,this.updateClassName())}disablePanning(){this.pannable&&(this.options.pannable=!1,this.updateClassName())}togglePanning(t){return t==null?this.isPannable()?this.disablePanning():this.enablePanning():t!==this.isPannable()&&(t?this.enablePanning():this.disablePanning()),this}lockScroller(){return this.scrollerImpl.lock(),this}unlockScroller(){return this.scrollerImpl.unlock(),this}updateScroller(){return this.scrollerImpl.update(),this}getScrollbarPosition(){return this.scrollerImpl.scrollbarPosition()}setScrollbarPosition(t,e){return this.scrollerImpl.scrollbarPosition(t,e),this}scrollToPoint(t,e){return this.scrollerImpl.scrollToPoint(t,e),this}scrollToContent(){return this.scrollerImpl.scrollToContent(),this}scrollToCell(t){return this.scrollerImpl.scrollToCell(t),this}transitionToPoint(t,e,n){return this.scrollerImpl.transitionToPoint(t,e,n),this}transitionToRect(t,e={}){return this.scrollerImpl.transitionToRect(t,e),this}enableAutoResize(){this.scrollerImpl.enableAutoResize()}disableAutoResize(){this.scrollerImpl.disableAutoResize()}autoScroll(t,e){return this.scrollerImpl.autoScroll(t,e)}clientToLocalPoint(t,e){return this.scrollerImpl.clientToLocalPoint(t,e)}getVisibleArea(){return this.scrollerImpl.getVisibleArea()}isCellVisible(t,e={}){return this.scrollerImpl.isCellVisible(t,e)}isPointVisible(t){return this.scrollerImpl.isPointVisible(t)}setup(){this.scrollerImpl.on("*",(t,e)=>{this.trigger(t,e)})}startListening(){let t=[];const e=this.options.pannable;typeof e=="object"?t=e.eventTypes||[]:t=["leftMouseDown"],t.includes("leftMouseDown")&&(this.graph.on("blank:mousedown",this.preparePanning,this),this.graph.on("node:unhandled:mousedown",this.preparePanning,this),this.graph.on("edge:unhandled:mousedown",this.preparePanning,this)),t.includes("rightMouseDown")&&(this.onRightMouseDown=this.onRightMouseDown.bind(this),nn.on(this.scrollerImpl.container,"mousedown",this.onRightMouseDown))}stopListening(){let t=[];const e=this.options.pannable;typeof e=="object"?t=e.eventTypes||[]:t=["leftMouseDown"],t.includes("leftMouseDown")&&(this.graph.off("blank:mousedown",this.preparePanning,this),this.graph.off("node:unhandled:mousedown",this.preparePanning,this),this.graph.off("edge:unhandled:mousedown",this.preparePanning,this)),t.includes("rightMouseDown")&&nn.off(this.scrollerImpl.container,"mousedown",this.onRightMouseDown)}onRightMouseDown(t){t.button===2&&this.allowPanning(t,!0)&&(this.updateClassName(!0),this.scrollerImpl.startPanning(t),this.scrollerImpl.once("pan:stop",()=>this.updateClassName(!1)))}preparePanning({e:t}){const e=this.allowPanning(t,!0),n=this.graph.getPlugin("selection"),r=n&&n.allowRubberband(t,!0);(e||this.allowPanning(t)&&!r)&&(this.updateClassName(!0),this.scrollerImpl.startPanning(t),this.scrollerImpl.once("pan:stop",()=>this.updateClassName(!1)))}allowPanning(t,e){return this.pannable&&Nu(t,this.options.modifiers,e)}updateClassName(t){const e=this.scrollerImpl.container,n=He.prefix("graph-scroller-pannable");this.pannable?(_t(e,n),e.dataset.panning=(!!t).toString()):dn(e,n)}autoDisableGraphPanning(){var t;const e=(t=this.graph)===null||t===void 0?void 0:t.panning;e!=null&&e.pannable&&(e.disablePanning(),console.warn("Detected Scroller plugin; Graph panning has been disabled by default to avoid conflicts."))}dispose(){this.scrollerImpl.dispose(),this.stopListening(),this.off(),Du(this.name)}}De([Re()],BJ.prototype,"dispose",null);function LS(s,t){return s.reduce((e,n)=>Math.max(n==null?void 0:n.getSize()[t],e),0)}function PJ(s,t,e){const n=[];for(let r=e*t,l=r+e;r<l;r+=1)s[r]&&n.push(s[r]);return n}function UJ(s,t,e){const n=[];for(let r=t,l=s.length;r<l;r+=e)s[r]&&n.push(s[r]);return n}function I6(s,t){return s.reduce((e,n,r)=>(e.push(e[r]+n),e),[t||0])}function HJ(s,t={}){const e=wo.isModel(s)?s:new wo().resetCells(s,{sort:!1,dryrun:!0}),n=e.getNodes(),r=t.columns||1,l=Math.ceil(n.length/r),f=t.dx||0,h=t.dy||0,p=t.center!==!1,y=t.resizeToFit===!0,x=t.marginX||0,S=t.marginY||0,w=[];let T=t.columnWidth;if(T==="compact")for(let L=0;L<r;L+=1){const _=UJ(n,L,r);w.push(LS(_,"width")+f)}else{(T==null||T==="auto")&&(T=LS(n,"width")+f);for(let L=0;L<r;L+=1)w.push(T)}const M=I6(w,x),D=[];let R=t.rowHeight;if(R==="compact")for(let L=0;L<l;L+=1){const _=PJ(n,L,r);D.push(LS(_,"height")+h)}else{(R==null||R==="auto")&&(R=LS(n,"height")+h);for(let L=0;L<l;L+=1)D.push(R)}const N=I6(D,S);e.startBatch("layout"),n.forEach((L,_)=>{const U=_%r,$=Math.floor(_/r),Y=w[U],k=D[$];let H=0,J=0,F=L.getSize();if(y){let ct=Y-2*f,lt=k-2*h;const vt=F.height*(F.width?ct/F.width:1),Ot=F.width*(F.height?lt/F.height:1);k<vt?ct=Ot:lt=vt,F={width:ct,height:lt},L.setSize(F,t)}p&&(H=(Y-F.width)/2,J=(k-F.height)/2),L.position(M[U]+f+H,N[$]+h+J,t)}),e.stopBatch("layout")}const kJ=`.x6-widget-dnd {
|
|
592
|
+
position: absolute;
|
|
593
|
+
top: -10000px;
|
|
594
|
+
left: -10000px;
|
|
595
|
+
z-index: 999999;
|
|
596
|
+
display: none;
|
|
597
|
+
cursor: move;
|
|
598
|
+
opacity: 0.7;
|
|
599
|
+
pointer-events: 'cursor';
|
|
600
|
+
}
|
|
601
|
+
.x6-widget-dnd.dragging {
|
|
602
|
+
display: inline-block;
|
|
603
|
+
}
|
|
604
|
+
.x6-widget-dnd.dragging * {
|
|
605
|
+
pointer-events: none !important;
|
|
606
|
+
}
|
|
607
|
+
.x6-widget-dnd .x6-graph {
|
|
608
|
+
background: transparent;
|
|
609
|
+
box-shadow: none;
|
|
610
|
+
}
|
|
611
|
+
.x6-widget-stencil {
|
|
612
|
+
position: absolute;
|
|
613
|
+
top: 0;
|
|
614
|
+
right: 0;
|
|
615
|
+
bottom: 0;
|
|
616
|
+
left: 0;
|
|
617
|
+
}
|
|
618
|
+
.x6-widget-stencil::after {
|
|
619
|
+
position: absolute;
|
|
620
|
+
top: 0;
|
|
621
|
+
display: block;
|
|
622
|
+
width: 100%;
|
|
623
|
+
height: 20px;
|
|
624
|
+
padding: 8px 0;
|
|
625
|
+
line-height: 20px;
|
|
626
|
+
text-align: center;
|
|
627
|
+
opacity: 0;
|
|
628
|
+
transition: top 0.1s linear, opacity 0.1s linear;
|
|
629
|
+
content: ' ';
|
|
630
|
+
pointer-events: none;
|
|
631
|
+
}
|
|
632
|
+
.x6-widget-stencil-content {
|
|
633
|
+
position: absolute;
|
|
634
|
+
top: 0;
|
|
635
|
+
right: 0;
|
|
636
|
+
bottom: 0;
|
|
637
|
+
left: 0;
|
|
638
|
+
height: auto;
|
|
639
|
+
overflow-x: hidden;
|
|
640
|
+
overflow-y: auto;
|
|
641
|
+
}
|
|
642
|
+
.x6-widget-stencil .x6-node [magnet]:not([magnet='passive']) {
|
|
643
|
+
pointer-events: none;
|
|
644
|
+
}
|
|
645
|
+
.x6-widget-stencil-group {
|
|
646
|
+
padding: 0;
|
|
647
|
+
padding-bottom: 8px;
|
|
648
|
+
overflow: hidden;
|
|
649
|
+
user-select: none;
|
|
650
|
+
}
|
|
651
|
+
.x6-widget-stencil-group.collapsed {
|
|
652
|
+
height: auto;
|
|
653
|
+
padding-bottom: 0;
|
|
654
|
+
}
|
|
655
|
+
.x6-widget-stencil-group-title {
|
|
656
|
+
position: relative;
|
|
657
|
+
margin-top: 0;
|
|
658
|
+
margin-bottom: 0;
|
|
659
|
+
padding: 4px;
|
|
660
|
+
cursor: pointer;
|
|
661
|
+
}
|
|
662
|
+
.x6-widget-stencil-title,
|
|
663
|
+
.x6-widget-stencil-group > .x6-widget-stencil-group-title {
|
|
664
|
+
overflow: hidden;
|
|
665
|
+
white-space: nowrap;
|
|
666
|
+
text-overflow: ellipsis;
|
|
667
|
+
user-select: none;
|
|
668
|
+
}
|
|
669
|
+
.x6-widget-stencil .unmatched {
|
|
670
|
+
opacity: 0.3;
|
|
671
|
+
}
|
|
672
|
+
.x6-widget-stencil .x6-node.unmatched {
|
|
673
|
+
display: none;
|
|
674
|
+
}
|
|
675
|
+
.x6-widget-stencil-group.unmatched {
|
|
676
|
+
display: none;
|
|
677
|
+
}
|
|
678
|
+
.x6-widget-stencil-search-text {
|
|
679
|
+
position: relative;
|
|
680
|
+
z-index: 1;
|
|
681
|
+
box-sizing: border-box;
|
|
682
|
+
width: 100%;
|
|
683
|
+
height: 30px;
|
|
684
|
+
max-height: 30px;
|
|
685
|
+
line-height: 30px;
|
|
686
|
+
outline: 0;
|
|
687
|
+
}
|
|
688
|
+
.x6-widget-stencil.not-found::after {
|
|
689
|
+
opacity: 1;
|
|
690
|
+
content: attr(data-not-found-text);
|
|
691
|
+
}
|
|
692
|
+
.x6-widget-stencil.not-found.searchable::after {
|
|
693
|
+
top: 30px;
|
|
694
|
+
}
|
|
695
|
+
.x6-widget-stencil.not-found.searchable.collapsable::after {
|
|
696
|
+
top: 50px;
|
|
697
|
+
}
|
|
698
|
+
.x6-widget-stencil {
|
|
699
|
+
color: #333;
|
|
700
|
+
background: #f5f5f5;
|
|
701
|
+
}
|
|
702
|
+
.x6-widget-stencil-content {
|
|
703
|
+
position: absolute;
|
|
704
|
+
top: 32px;
|
|
705
|
+
}
|
|
706
|
+
.x6-widget-stencil.searchable > .x6-widget-stencil-content {
|
|
707
|
+
top: 80px;
|
|
708
|
+
}
|
|
709
|
+
.x6-widget-stencil.not-found::after {
|
|
710
|
+
position: absolute;
|
|
711
|
+
}
|
|
712
|
+
.x6-widget-stencil.not-found.searchable.collapsable::after {
|
|
713
|
+
top: 80px;
|
|
714
|
+
}
|
|
715
|
+
.x6-widget-stencil.not-found.searchable::after {
|
|
716
|
+
top: 60px;
|
|
717
|
+
}
|
|
718
|
+
.x6-widget-stencil-group {
|
|
719
|
+
height: auto;
|
|
720
|
+
margin-bottom: 1px;
|
|
721
|
+
padding: 0;
|
|
722
|
+
transition: none;
|
|
723
|
+
}
|
|
724
|
+
.x6-widget-stencil-group .x6-graph {
|
|
725
|
+
background: transparent;
|
|
726
|
+
box-shadow: none;
|
|
727
|
+
}
|
|
728
|
+
|
|
729
|
+
.x6-widget-stencil .x6-node.x6-node-immovable {
|
|
730
|
+
cursor: move;
|
|
731
|
+
}
|
|
732
|
+
.x6-widget-stencil-group.collapsed {
|
|
733
|
+
height: auto;
|
|
734
|
+
max-height: 32px;
|
|
735
|
+
}
|
|
736
|
+
.x6-widget-stencil-title,
|
|
737
|
+
.x6-widget-stencil-group > .x6-widget-stencil-group-title {
|
|
738
|
+
position: relative;
|
|
739
|
+
left: 0;
|
|
740
|
+
box-sizing: border-box;
|
|
741
|
+
width: 100%;
|
|
742
|
+
height: 32px;
|
|
743
|
+
padding: 0 5px 0 8px;
|
|
744
|
+
color: #666;
|
|
745
|
+
font-weight: 700;
|
|
746
|
+
font-size: 12px;
|
|
747
|
+
line-height: 32px;
|
|
748
|
+
cursor: default;
|
|
749
|
+
transition: all 0.3;
|
|
750
|
+
}
|
|
751
|
+
.x6-widget-stencil-title:hover,
|
|
752
|
+
.x6-widget-stencil-group > .x6-widget-stencil-group-title:hover {
|
|
753
|
+
color: #444;
|
|
754
|
+
}
|
|
755
|
+
.x6-widget-stencil-title {
|
|
756
|
+
background: #e9e9e9;
|
|
757
|
+
}
|
|
758
|
+
.x6-widget-stencil-group > .x6-widget-stencil-group-title {
|
|
759
|
+
background: #ededed;
|
|
760
|
+
}
|
|
761
|
+
.x6-widget-stencil.collapsable > .x6-widget-stencil-title,
|
|
762
|
+
.x6-widget-stencil-group.collapsable > .x6-widget-stencil-group-title {
|
|
763
|
+
padding-left: 32px;
|
|
764
|
+
cursor: pointer;
|
|
765
|
+
}
|
|
766
|
+
.x6-widget-stencil.collapsable > .x6-widget-stencil-title::before,
|
|
767
|
+
.x6-widget-stencil-group.collapsable > .x6-widget-stencil-group-title::before {
|
|
768
|
+
position: absolute;
|
|
769
|
+
top: 6px;
|
|
770
|
+
left: 8px;
|
|
771
|
+
display: block;
|
|
772
|
+
width: 18px;
|
|
773
|
+
height: 18px;
|
|
774
|
+
margin: 0;
|
|
775
|
+
padding: 0;
|
|
776
|
+
background-color: transparent;
|
|
777
|
+
background-repeat: no-repeat;
|
|
778
|
+
background-position: 0 0;
|
|
779
|
+
border: none;
|
|
780
|
+
content: ' ';
|
|
781
|
+
}
|
|
782
|
+
.x6-widget-stencil.collapsable > .x6-widget-stencil-title::before,
|
|
783
|
+
.x6-widget-stencil-group.collapsable > .x6-widget-stencil-group-title::before {
|
|
784
|
+
background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJub256ZXJvIj48cGF0aCBkPSJNOS4zNzUuNUM0LjY4Ny41Ljg3NSA0LjMxMy44NzUgOWMwIDQuNjg4IDMuODEyIDguNSA4LjUgOC41IDQuNjg3IDAgOC41LTMuODEyIDguNS04LjUgMC00LjY4Ny0zLjgxMy04LjUtOC41LTguNXptMCAxNS44ODZDNS4zMDMgMTYuMzg2IDEuOTkgMTMuMDcyIDEuOTkgOXMzLjMxMi03LjM4NSA3LjM4NS03LjM4NVMxNi43NiA0LjkyOCAxNi43NiA5YzAgNC4wNzItMy4zMTMgNy4zODYtNy4zODUgNy4zODZ6Ii8+PHBhdGggZD0iTTEyLjc1MyA4LjQ0M0g1Ljk5N2EuNTU4LjU1OCAwIDAwMCAxLjExNmg2Ljc1NmEuNTU4LjU1OCAwIDAwMC0xLjExNnoiLz48L2c+PC9zdmc+');
|
|
785
|
+
opacity: 0.4;
|
|
786
|
+
transition: all 0.3s;
|
|
787
|
+
}
|
|
788
|
+
.x6-widget-stencil.collapsable > .x6-widget-stencil-title:hover::before,
|
|
789
|
+
.x6-widget-stencil-group.collapsable > .x6-widget-stencil-group-title:hover::before {
|
|
790
|
+
opacity: 0.6;
|
|
791
|
+
}
|
|
792
|
+
.x6-widget-stencil.collapsable.collapsed > .x6-widget-stencil-title::before,
|
|
793
|
+
.x6-widget-stencil-group.collapsable.collapsed > .x6-widget-stencil-group-title::before {
|
|
794
|
+
background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJub256ZXJvIj48cGF0aCBkPSJNOS4zNzUuNUM0LjY4Ny41Ljg3NSA0LjMxMy44NzUgOWMwIDQuNjg4IDMuODEyIDguNSA4LjUgOC41IDQuNjg3IDAgOC41LTMuODEyIDguNS04LjUgMC00LjY4Ny0zLjgxMy04LjUtOC41LTguNXptMCAxNS44ODZDNS4zMDMgMTYuMzg2IDEuOTkgMTMuMDcyIDEuOTkgOXMzLjMxMi03LjM4NSA3LjM4NS03LjM4NVMxNi43NiA0LjkyOCAxNi43NiA5YzAgNC4wNzItMy4zMTMgNy4zODYtNy4zODUgNy4zODZ6Ii8+PHBhdGggZD0iTTEyLjc1MyA4LjQ0M0g1Ljk5N2EuNTU4LjU1OCAwIDAwMCAxLjExNmg2Ljc1NmEuNTU4LjU1OCAwIDAwMC0xLjExNnoiLz48cGF0aCBkPSJNOC44MTcgNS42MjN2Ni43NTZhLjU1OC41NTggMCAwMDEuMTE2IDBWNS42MjNhLjU1OC41NTggMCAxMC0xLjExNiAweiIvPjwvZz48L3N2Zz4=');
|
|
795
|
+
opacity: 0.4;
|
|
796
|
+
}
|
|
797
|
+
.x6-widget-stencil.collapsable.collapsed > .x6-widget-stencil-title:hover::before,
|
|
798
|
+
.x6-widget-stencil-group.collapsable.collapsed > .x6-widget-stencil-group-title:hover::before {
|
|
799
|
+
opacity: 0.6;
|
|
800
|
+
}
|
|
801
|
+
.x6-widget-stencil input[type='search'] {
|
|
802
|
+
appearance: textfield;
|
|
803
|
+
}
|
|
804
|
+
.x6-widget-stencil input[type='search']::-webkit-search-cancel-button,
|
|
805
|
+
.x6-widget-stencil input[type='search']::-webkit-search-decoration {
|
|
806
|
+
appearance: none;
|
|
807
|
+
}
|
|
808
|
+
.x6-widget-stencil-search-text {
|
|
809
|
+
display: block;
|
|
810
|
+
width: 90%;
|
|
811
|
+
margin: 8px 5%;
|
|
812
|
+
padding-left: 8px;
|
|
813
|
+
color: #333;
|
|
814
|
+
background: #fff;
|
|
815
|
+
border: 1px solid #e9e9e9;
|
|
816
|
+
border-radius: 12px;
|
|
817
|
+
outline: 0;
|
|
818
|
+
}
|
|
819
|
+
.x6-widget-stencil-search-text:focus {
|
|
820
|
+
outline: 0;
|
|
821
|
+
}
|
|
822
|
+
.x6-widget-stencil::after {
|
|
823
|
+
color: #808080;
|
|
824
|
+
font-weight: 600;
|
|
825
|
+
font-size: 12px;
|
|
826
|
+
background: 0 0;
|
|
827
|
+
}
|
|
828
|
+
`,fr={base:"widget-stencil",title:"widget-stencil-title",search:"widget-stencil-search",searchText:"widget-stencil-search-text",content:"widget-stencil-content",group:"widget-stencil-group",groupTitle:"widget-stencil-group-title",groupContent:"widget-stencil-group-content"},IT="__default__",VJ=Object.assign({stencilGraphWidth:200,stencilGraphHeight:800,title:"Stencil",collapsable:!1,placeholder:"Search",notFoundText:"No matches found",layout(s,t){const e={columnWidth:this.options.stencilGraphWidth/2-10,columns:2,rowHeight:80,resizeToFit:!1,dx:10,dy:10};HJ(s,Object.assign(Object.assign(Object.assign({},e),this.options.layoutOptions),t?t.layoutOptions:{}))}},z6);class GJ extends to{get targetScroller(){return this.options.target.getPlugin("scroller")}get targetGraph(){return this.options.target}get targetModel(){return this.targetGraph.model}constructor(t={}){super(),this.name="stencil",Ou(this.name,kJ),this.graphs={},this.groups={},this.options=Object.assign(Object.assign({},VJ),t),this.init()}init(){this.dnd=new N6(this.options),this.onSearch=q1(this.onSearch,200),this.initContainer(),this.initSearch(),this.initContent(),this.initGroups(),this.setTitle(),this.startListening()}load(t,e){return Array.isArray(t)?this.loadGroup(t,e):this.options.groups&&Object.keys(this.options.groups).forEach(n=>{t[n]&&this.loadGroup(t[n],n)}),this}unload(t,e){return Array.isArray(t)?this.loadGroup(t,e,!0):this.options.groups&&Object.keys(this.options.groups).forEach(n=>{t[n]&&this.loadGroup(t[n],n,!0)}),this}toggleGroup(t){return this.isGroupCollapsed(t)?this.expandGroup(t):this.collapseGroup(t),this}collapseGroup(t){if(this.isGroupCollapsable(t)){const e=this.groups[t];e&&!this.isGroupCollapsed(t)&&(this.trigger("group:collapse",{name:t}),_t(e,"collapsed"))}return this}expandGroup(t){if(this.isGroupCollapsable(t)){const e=this.groups[t];e&&this.isGroupCollapsed(t)&&(this.trigger("group:expand",{name:t}),dn(e,"collapsed"))}return this}isGroupCollapsable(t){const e=this.groups[t];return nl(e,"collapsable")}isGroupCollapsed(t){const e=this.groups[t];return e&&nl(e,"collapsed")}collapseGroups(){return Object.keys(this.groups).forEach(t=>{this.collapseGroup(t)}),this}expandGroups(){return Object.keys(this.groups).forEach(t=>{this.expandGroup(t)}),this}resizeGroup(t,e){const n=this.graphs[t];return n&&n.resize(e.width,e.height),this}addGroup(t){const e=Array.isArray(t)?t:[t];this.options.groups?this.options.groups.push(...e):this.options.groups=e,e.forEach(n=>{this.initGroup(n)})}removeGroup(t){const e=Array.isArray(t)?t:[t];this.options.groups&&(this.options.groups=this.options.groups.filter(n=>!e.includes(n.name)),e.forEach(n=>{const r=this.graphs[n];this.unregisterGraphEvents(r),r.dispose(),delete this.graphs[n];const l=this.groups[n];or(l),delete this.groups[n]}))}initContainer(){this.container=document.createElement("div"),_t(this.container,this.prefixClassName(fr.base)),Te(this.container,"data-not-found-text",this.options.notFoundText||"No matches found")}initContent(){this.content=document.createElement("div"),_t(this.content,this.prefixClassName(fr.content)),rr(this.content,this.container)}buildGraphConfig(t){const e=this.options.stencilGraphOptions||{},n=t==null?void 0:t.graphOptions,r=Object.assign(Object.assign({},e),n);r.panning==null&&(r.panning=!1);const l=t&&t.graphWidth||this.options.stencilGraphWidth,f=t&&t.graphHeight||this.options.stencilGraphHeight,h=r.model||new wo;return{mergedGraphOptions:r,width:l,height:f,model:h}}createStencilGraph(t,e,n,r){const l=new dt(Object.assign(Object.assign({},t),{container:document.createElement("div"),model:r,width:e,height:n,interacting:!1,preventDefaultBlankAction:!1}));return this.registerGraphEvents(l),l}initSearch(){this.options.search&&(_t(this.container,"searchable"),qi(this.container,this.renderSearch()))}initGroup(t){const e=document.createElement("div");_t(e,this.prefixClassName(fr.group)),Te(e,"data-name",t.name),(t.collapsable==null&&this.options.collapsable||t.collapsable!==!1)&&_t(e,"collapsable"),da(e,"collapsed",t.collapsed===!0);const n=document.createElement("h3");_t(n,this.prefixClassName(fr.groupTitle)),n.innerHTML=t.title||t.name;const r=document.createElement("div");_t(r,this.prefixClassName(fr.groupContent));const{mergedGraphOptions:l,width:f,height:h,model:p}=this.buildGraphConfig(t),y=this.createStencilGraph(l,f,h,p);qi(r,y.container),qi(e,[n,r]),rr(e,this.content),this.groups[t.name]=e,this.graphs[t.name]=y}initGroups(){if(this.clearGroups(),this.setCollapsableState(),this.options.groups&&this.options.groups.length)this.options.groups.forEach(t=>{this.initGroup(t)});else{const{mergedGraphOptions:t,width:e,height:n,model:r}=this.buildGraphConfig(),l=this.createStencilGraph(t,e,n,r);qi(this.content,l.container),this.graphs[IT]=l}}setCollapsableState(){this.options.collapsable=this.options.collapsable&&this.options.groups&&this.options.groups.some(t=>t.collapsable!==!1),this.options.collapsable?(_t(this.container,"collapsable"),this.options.groups&&this.options.groups.every(e=>e.collapsed||e.collapsable===!1)?_t(this.container,"collapsed"):dn(this.container,"collapsed")):dn(this.container,"collapsable")}setTitle(){const t=document.createElement("div");_t(t,this.prefixClassName(fr.title)),t.innerHTML=this.options.title,rr(t,this.container)}renderSearch(){const t=document.createElement("div");_t(t,this.prefixClassName(fr.search));const e=document.createElement("input");return Te(e,{type:"search",placeholder:this.options.placeholder||"Search"}),_t(e,this.prefixClassName(fr.searchText)),qi(t,e),t}startListening(){const t=this.prefixClassName(fr.title),e=this.prefixClassName(fr.searchText),n=this.prefixClassName(fr.groupTitle);this.delegateEvents({[`click .${t}`]:"onTitleClick",[`touchstart .${t}`]:"onTitleClick",[`click .${n}`]:"onGroupTitleClick",[`touchstart .${n}`]:"onGroupTitleClick",[`input .${e}`]:"onSearch",[`focusin .${e}`]:"onSearchFocusIn",[`focusout .${e}`]:"onSearchFocusOut"})}stopListening(){this.undelegateEvents()}registerGraphEvents(t){t.on("cell:mousedown",this.onDragStart,this)}unregisterGraphEvents(t){t.off("cell:mousedown",this.onDragStart,this)}getGraphHeight(t){const e=this.getGroup(t);return e&&e.graphHeight!=null?e.graphHeight:this.options.stencilGraphHeight}loadGroup(t,e,n){const r=this.getModel(e);if(r){const p=t.map(y=>Li.isNode(y)?y:Li.create(y));n===!0?r.removeCells(p):r.resetCells(p)}const l=this.getGroup(e),f=this.getGraphHeight(e),h=l&&l.layout||this.options.layout;if(h&&r&&Gt(h,this,r,l),!f){const p=this.getGraph(e);p.fitToContent({minWidth:p.options.width,gridHeight:1,padding:l&&l.graphPadding||this.options.stencilGraphPadding||10})}return this}onDragStart(t){const{e,node:n}=t,r=this.getGroupByNode(n);if(r&&r.nodeMovable===!1)return;const l=this.getGraph(r?r.name:void 0),f=l&&typeof l.isPannable=="function"?l.isPannable():!1;f&&l.disablePanning();const h=()=>{f&&l.enablePanning(),this.undelegateDocumentEvents()};this.delegateDocumentEvents({mouseup:h,touchend:h,touchcancel:h}),this.dnd.start(n,e)}filter(t,e){const n=Object.keys(this.graphs).reduce((r,l)=>{const f=this.graphs[l],h=l===IT?null:l,p=f.model.getNodes().filter(T=>{let M=!1;typeof e=="function"?M=Gt(e,this,T,t,h,this):typeof e=="boolean"?M=e:M=this.isCellMatched(T,t,e,t.toLowerCase()!==t);const D=f.renderer.findViewByCell(T);return D&&da(D.container,"unmatched",!M),M}),y=p.length>0,x=this.options,S=new wo;return S.resetCells(p),x.layout&&Gt(x.layout,this,S,this.getGroup(l)),this.groups[l]&&da(this.groups[l],"unmatched",!y),this.getGraphHeight(l)||f.fitToContent({gridWidth:1,gridHeight:1,padding:x.stencilGraphPadding||10,contentArea:S.getAllCellsBBox()||{x:0,y:0,width:0,height:0}}),r||y},!1);da(this.container,"not-found",!n)}isCellMatched(t,e,n,r){return e&&n?Object.keys(n).some(l=>{if(l==="*"||t.shape===l){const f=n[l];return typeof f=="boolean"?f:(Array.isArray(f)?f:[f]).some(p=>{let y=t.getPropByPath(p);return y!=null?(y=`${y}`,r||(y=y.toLowerCase()),y.indexOf(e)>=0):!1})}return!1}):!0}onSearch(t){this.filter(t.target.value,this.options.search)}onSearchFocusIn(){_t(this.container,"is-focused")}onSearchFocusOut(){dn(this.container,"is-focused")}onTitleClick(){this.options.collapsable&&(da(this.container,"collapsed"),nl(this.container,"collapsed")?this.collapseGroups():this.expandGroups())}onGroupTitleClick(t){const e=t.target.closest(`.${this.prefixClassName(fr.group)}`);e&&this.toggleGroup(Te(e,"data-name")||"");const n=Object.keys(this.groups).every(r=>{const l=this.getGroup(r),f=this.groups[r];return l&&l.collapsable===!1||nl(f,"collapsed")});da(this.container,"collapsed",n)}getModel(t){const e=this.getGraph(t);return e?e.model:null}getGraph(t){return this.graphs[t||IT]}getGroup(t){const e=this.options.groups;return t!=null&&e&&e.length?e.find(n=>n.name===t):null}getGroupByNode(t){const e=this.options.groups;return e?e.find(n=>{const r=this.getModel(n.name);return r?r.has(t.id):!1}):null}clearGroups(){Object.keys(this.graphs).forEach(t=>{const e=this.graphs[t];this.unregisterGraphEvents(e),e.dispose()}),Object.keys(this.groups).forEach(t=>{const e=this.groups[t];or(e)}),this.graphs={},this.groups={}}onRemove(){this.clearGroups(),this.dnd.remove(),this.stopListening(),this.undelegateDocumentEvents()}dispose(){this.remove(),Du(this.name)}}De([Re()],GJ.prototype,"dispose",null);class Z6 extends to{get model(){return this.graph.model}get containerClassName(){return this.prefixClassName("widget-snapline")}get verticalClassName(){return`${this.containerClassName}-vertical`}get horizontalClassName(){return`${this.containerClassName}-horizontal`}constructor(t){super();const{graph:e}=t,n=re(t,["graph"]);this.graph=e,this.options=Object.assign({},n),this.offset={x:0,y:0},this.render(),this.disabled||this.startListening()}get disabled(){return this.options.enabled!==!0}enable(){this.disabled&&(this.options.enabled=!0,this.startListening())}disable(){this.disabled||(this.options.enabled=!1,this.stopListening())}setFilter(t){this.options.filter=t}render(){const t=this.containerWrapper=new Xt("svg"),e=this.horizontal=new Xt("line"),n=this.vertical=new Xt("line");t.addClass(this.containerClassName),e.addClass(this.horizontalClassName),n.addClass(this.verticalClassName),t.setAttribute("width","100%"),t.setAttribute("height","100%"),e.setAttribute("display","none"),n.setAttribute("display","none"),t.append([e,n]),this.options.className&&t.addClass(this.options.className),this.container=this.containerWrapper.node}startListening(){this.stopListening(),this.graph.on("node:mousedown",this.captureCursorOffset,this),this.graph.on("node:mousemove",this.snapOnMoving,this),this.model.on("batch:stop",this.onBatchStop,this),this.delegateDocumentEvents({mouseup:"hide",touchend:"hide"})}stopListening(){this.graph.off("node:mousedown",this.captureCursorOffset,this),this.graph.off("node:mousemove",this.snapOnMoving,this),this.model.off("batch:stop",this.onBatchStop,this),this.undelegateDocumentEvents()}onBatchStop({name:t,data:e}){t==="resize"&&this.snapOnResizing(e.cell,e)}captureCursorOffset({view:t,x:e,y:n}){const r=t.getDelegatedView();if(r&&this.isNodeMovable(r)){const l=t.cell.getPosition();this.offset={x:e-l.x,y:n-l.y}}}isNodeMovable(t){return t&&t.cell.isNode()&&t.can("nodeMovable")}getRestrictArea(t){const e=this.graph.options.translating.restrict,n=typeof e=="function"?Gt(e,this.graph,t):e;return typeof n=="number"?this.graph.transform.getGraphArea().inflate(n):n===!0?this.graph.transform.getGraphArea():n||null}snapOnResizing(t,e){if(this.options.resizing&&!e.snapped&&e.ui&&e.direction&&e.trueDirection){const n=this.graph.renderer.findViewByCell(t);if(n&&n.cell.isNode()){const r=t.getBBox(),l=r.bbox(t.getAngle()),f=l.getTopLeft(),h=l.getBottomRight(),p=Es(t.getAngle()),y=this.options.tolerance||0;let x,S,w,T,M,D;const R={vertical:0,horizontal:0},N=e.direction,L=e.trueDirection,_=e.relativeDirection;L.indexOf("right")!==-1?R.vertical=h.x:R.vertical=f.x,L.indexOf("bottom")!==-1?R.horizontal=h.y:R.horizontal=f.y,this.model.getNodes().some(lt=>{if(this.isIgnored(t,lt))return!1;const vt=lt.getBBox().bbox(lt.getAngle()),Ot=vt.getTopLeft(),zt=vt.getBottomRight(),V={vertical:[Ot.x,zt.x],horizontal:[Ot.y,zt.y]},ot={};return Object.keys(V).forEach(tt=>{const yt=tt,Mt=V[yt].map(nt=>({position:nt,distance:Math.abs(nt-R[yt])})).filter(nt=>nt.distance<=y);ot[yt]=NA(Mt,nt=>nt.distance)}),x==null&&ot.vertical.length>0&&(x=ot.vertical[0].position,S=Math.min(l.y,vt.y),w=Math.max(h.y,zt.y)-S),T==null&&ot.horizontal.length>0&&(T=ot.horizontal[0].position,M=Math.min(l.x,vt.x),D=Math.max(h.x,zt.x)-M),x!=null&&T!=null}),this.hide();let U=0,$=0;(T!=null||x!=null)&&(x!=null&&(U=L.indexOf("right")!==-1?x-h.x:f.x-x),T!=null&&($=L.indexOf("bottom")!==-1?T-h.y:f.y-T));let Y=0,k=0;if(p%90===0)p===90||p===270?(Y=$,k=U):(Y=U,k=$);else{const lt=p>=0&&p<90?1:p>=90&&p<180?4:p>=180&&p<270?3:2;T!=null&&x!=null&&(U<$?($=0,T=void 0):(U=0,x=void 0));const vt=fs(p%90);U&&(Y=lt===3?U/Math.cos(vt):U/Math.sin(vt)),$&&(k=lt===3?$/Math.cos(vt):$/Math.sin(vt));const Ot=lt===1||lt===3;switch(_){case"top":case"bottom":k=$?$/(Ot?Math.cos(vt):Math.sin(vt)):U/(Ot?Math.sin(vt):Math.cos(vt));break;case"left":case"right":Y=U?U/(Ot?Math.cos(vt):Math.sin(vt)):$/(Ot?Math.sin(vt):Math.cos(vt));break}}switch(_){case"top":case"bottom":Y=0;break;case"left":case"right":k=0;break}const H=this.graph.getGridSize();let J=Math.max(r.width+Y,H),F=Math.max(r.height+k,H);e.minWidth&&e.minWidth>H&&(J=Math.max(J,e.minWidth)),e.minHeight&&e.minHeight>H&&(F=Math.max(F,e.minHeight)),e.maxWidth&&(J=Math.min(J,e.maxWidth)),e.maxHeight&&(F=Math.min(F,e.maxHeight)),e.preserveAspectRatio&&(k<Y?F=J*(r.height/r.width):J=F*(r.width/r.height)),(J!==r.width||F!==r.height)&&(t.resize(J,F,{direction:N,relativeDirection:_,trueDirection:L,snapped:!0,snaplines:this.cid,restrict:this.getRestrictArea(n)}),w&&(w+=F-r.height),D&&(D+=J-r.width));const ct=t.getBBox().bbox(p);x&&Math.abs(ct.x-x)>1&&Math.abs(ct.width+ct.x-x)>1&&(x=void 0),T&&Math.abs(ct.y-T)>1&&Math.abs(ct.height+ct.y-T)>1&&(T=void 0),this.update({verticalLeft:x,verticalTop:S,verticalHeight:w,horizontalTop:T,horizontalLeft:M,horizontalWidth:D})}}}snapOnMoving({view:t,e,x:n,y:r}){const l=t.getEventData(e).delegatedView||t;if(!this.isNodeMovable(l))return;const f=l.cell,h=f.getSize(),p=f.getPosition(),y=new Dt(n-this.offset.x,r-this.offset.y,h.width,h.height),x=f.getAngle(),S=y.getCenter(),w=y.bbox(x),T=w.getTopLeft(),M=w.getBottomRight(),D=this.options.tolerance||0;let R,N,L,_,U,$,Y=0,k=0;if(this.model.getNodes().some(H=>{if(this.isIgnored(f,H))return!1;const J=H.getBBox().bbox(H.getAngle()),F=J.getCenter(),ct=J.getTopLeft(),lt=J.getBottomRight();return R==null&&(Math.abs(F.x-S.x)<D?(R=F.x,Y=.5):Math.abs(ct.x-T.x)<D?(R=ct.x,Y=0):Math.abs(ct.x-M.x)<D?(R=ct.x,Y=1):Math.abs(lt.x-M.x)<D?(R=lt.x,Y=1):Math.abs(lt.x-T.x)<D&&(R=lt.x),R!=null&&(N=Math.min(w.y,J.y),L=Math.max(M.y,lt.y)-N)),_==null&&(Math.abs(F.y-S.y)<D?(_=F.y,k=.5):Math.abs(ct.y-T.y)<D?_=ct.y:Math.abs(ct.y-M.y)<D?(_=ct.y,k=1):Math.abs(lt.y-M.y)<D?(_=lt.y,k=1):Math.abs(lt.y-T.y)<D&&(_=lt.y),_!=null&&(U=Math.min(w.x,J.x),$=Math.max(M.x,lt.x)-U)),R!=null&&_!=null}),this.hide(),_!=null||R!=null){_!=null&&(w.y=_-k*w.height),R!=null&&(w.x=R-Y*w.width);const H=w.getCenter(),J=H.x-y.width/2,F=H.y-y.height/2,ct=J-p.x,lt=F-p.y;(ct!==0||lt!==0)&&(f.translate(ct,lt,{snapped:!0,restrict:this.getRestrictArea(l)}),$&&($+=ct),L&&(L+=lt)),this.update({verticalLeft:R,verticalTop:N,verticalHeight:L,horizontalTop:_,horizontalLeft:U,horizontalWidth:$})}}isIgnored(t,e){return e.id===t.id||e.isDescendantOf(t)||!this.filter(e)}filter(t){const e=this.options.filter;return Array.isArray(e)?e.some(n=>typeof n=="string"?t.shape===n:t.id===n.id):typeof e=="function"?Gt(e,this.graph,t):!0}update(t){if(t.horizontalTop){const e=this.graph.localToGraph(new G(t.horizontalLeft,t.horizontalTop)),n=this.graph.localToGraph(new G(t.horizontalLeft+t.horizontalWidth,t.horizontalTop));this.horizontal.setAttributes({x1:this.options.sharp?`${e.x}`:"0",y1:`${e.y}`,x2:this.options.sharp?`${n.x}`:"100%",y2:`${n.y}`,display:"inherit"})}else this.horizontal.setAttribute("display","none");if(t.verticalLeft){const e=this.graph.localToGraph(new G(t.verticalLeft,t.verticalTop)),n=this.graph.localToGraph(new G(t.verticalLeft,t.verticalTop+t.verticalHeight));this.vertical.setAttributes({x1:`${e.x}`,y1:this.options.sharp?`${e.y}`:"0",x2:`${n.x}`,y2:this.options.sharp?`${n.y}`:"100%",display:"inherit"})}else this.vertical.setAttribute("display","none");this.show()}resetTimer(){this.timer&&(clearTimeout(this.timer),this.timer=null)}show(){return this.resetTimer(),this.container.parentNode==null&&this.graph.container.appendChild(this.container),this}hide(){this.resetTimer(),this.vertical.setAttribute("display","none"),this.horizontal.setAttribute("display","none");const t=this.options.clean,e=typeof t=="number"?t:t!==!1?3e3:0;return e>0&&(this.timer=window.setTimeout(()=>{this.container.parentNode!==null&&this.unmount()},e)),this}onRemove(){this.stopListening(),this.hide()}dispose(){this.remove()}}De([Re()],Z6.prototype,"dispose",null);const $J=`.x6-widget-snapline {
|
|
829
|
+
position: absolute;
|
|
830
|
+
top: 0;
|
|
831
|
+
right: 0;
|
|
832
|
+
bottom: 0;
|
|
833
|
+
left: 0;
|
|
834
|
+
pointer-events: none;
|
|
835
|
+
}
|
|
836
|
+
.x6-widget-snapline-vertical,
|
|
837
|
+
.x6-widget-snapline-horizontal {
|
|
838
|
+
stroke: #2ecc71;
|
|
839
|
+
stroke-width: 1px;
|
|
840
|
+
}
|
|
841
|
+
`;dt.prototype.isSnaplineEnabled=function(){const s=this.getPlugin("snapline");return s?s.isEnabled():!1},dt.prototype.enableSnapline=function(){const s=this.getPlugin("snapline");return s&&s.enable(),this},dt.prototype.disableSnapline=function(){const s=this.getPlugin("snapline");return s&&s.disable(),this},dt.prototype.toggleSnapline=function(){const s=this.getPlugin("snapline");return s&&s.toggleEnabled(),this},dt.prototype.hideSnapline=function(){const s=this.getPlugin("snapline");return s&&s.hide(),this},dt.prototype.setSnaplineFilter=function(s){const t=this.getPlugin("snapline");return t&&t.setFilter(s),this},dt.prototype.isSnaplineOnResizingEnabled=function(){const s=this.getPlugin("snapline");return s?s.isOnResizingEnabled():!1},dt.prototype.enableSnaplineOnResizing=function(){const s=this.getPlugin("snapline");return s&&s.enableOnResizing(),this},dt.prototype.disableSnaplineOnResizing=function(){const s=this.getPlugin("snapline");return s&&s.disableOnResizing(),this},dt.prototype.toggleSnaplineOnResizing=function(s){const t=this.getPlugin("snapline");return t&&t.toggleOnResizing(s),this},dt.prototype.isSharpSnapline=function(){const s=this.getPlugin("snapline");return s?s.isSharp():!1},dt.prototype.enableSharpSnapline=function(){const s=this.getPlugin("snapline");return s&&s.enableSharp(),this},dt.prototype.disableSharpSnapline=function(){const s=this.getPlugin("snapline");return s&&s.disableSharp(),this},dt.prototype.toggleSharpSnapline=function(s){const t=this.getPlugin("snapline");return t&&t.toggleSharp(s),this},dt.prototype.getSnaplineTolerance=function(){const s=this.getPlugin("snapline");if(s)return s.getTolerance()},dt.prototype.setSnaplineTolerance=function(s){const t=this.getPlugin("snapline");return t&&t.setTolerance(s),this};class qJ extends cp{constructor(t={}){super(),this.name="snapline",this.options=Object.assign({enabled:!0,tolerance:10},t),Ou(this.name,$J)}init(t){this.snaplineImpl=new Z6(Object.assign(Object.assign({},this.options),{graph:t}))}isEnabled(){return!this.snaplineImpl.disabled}enable(){this.snaplineImpl.enable()}disable(){this.snaplineImpl.disable()}toggleEnabled(t){if(t!=null)t!==this.isEnabled()&&(t?this.enable():this.disable());else return this.isEnabled()?this.disable():this.enable(),this}hide(){return this.snaplineImpl.hide(),this}setFilter(t){return this.snaplineImpl.setFilter(t),this}isOnResizingEnabled(){return this.snaplineImpl.options.resizing===!0}enableOnResizing(){return this.snaplineImpl.options.resizing=!0,this}disableOnResizing(){return this.snaplineImpl.options.resizing=!1,this}toggleOnResizing(t){return t!=null?t!==this.isOnResizingEnabled()&&(t?this.enableOnResizing():this.disableOnResizing()):this.isOnResizingEnabled()?this.disableOnResizing():this.enableOnResizing(),this}isSharp(){return this.snaplineImpl.options.sharp===!0}enableSharp(){return this.snaplineImpl.options.sharp=!0,this}disableSharp(){return this.snaplineImpl.options.sharp=!1,this}toggleSharp(t){return t!=null?t!==this.isSharp()&&(t?this.enableSharp():this.disableSharp()):this.isSharp()?this.disableSharp():this.enableSharp(),this}getTolerance(){return this.snaplineImpl.options.tolerance}setTolerance(t){return this.snaplineImpl.options.tolerance=t,this}captureCursorOffset(t){this.snaplineImpl.captureCursorOffset(t)}snapOnMoving(t){this.snaplineImpl.snapOnMoving(t)}dispose(){this.snaplineImpl.dispose(),Du(this.name)}}De([Re()],qJ.prototype,"dispose",null);const YJ=`.x6-widget-transform {
|
|
842
|
+
position: absolute;
|
|
843
|
+
box-sizing: content-box !important;
|
|
844
|
+
margin: -5px 0 0 -5px;
|
|
845
|
+
padding: 4px;
|
|
846
|
+
border: 1px dashed #000;
|
|
847
|
+
border-radius: 5px;
|
|
848
|
+
user-select: none;
|
|
849
|
+
pointer-events: none;
|
|
850
|
+
}
|
|
851
|
+
.x6-widget-transform > div {
|
|
852
|
+
position: absolute;
|
|
853
|
+
box-sizing: border-box;
|
|
854
|
+
background-color: #fff;
|
|
855
|
+
border: 1px solid #000;
|
|
856
|
+
transition: background-color 0.2s;
|
|
857
|
+
pointer-events: auto;
|
|
858
|
+
-webkit-user-drag: none;
|
|
859
|
+
user-drag: none;
|
|
860
|
+
/* stylelint-disable-line */
|
|
861
|
+
}
|
|
862
|
+
.x6-widget-transform > div:hover {
|
|
863
|
+
background-color: #d3d3d3;
|
|
864
|
+
}
|
|
865
|
+
.x6-widget-transform-cursor-n {
|
|
866
|
+
cursor: n-resize;
|
|
867
|
+
}
|
|
868
|
+
.x6-widget-transform-cursor-s {
|
|
869
|
+
cursor: s-resize;
|
|
870
|
+
}
|
|
871
|
+
.x6-widget-transform-cursor-e {
|
|
872
|
+
cursor: e-resize;
|
|
873
|
+
}
|
|
874
|
+
.x6-widget-transform-cursor-w {
|
|
875
|
+
cursor: w-resize;
|
|
876
|
+
}
|
|
877
|
+
.x6-widget-transform-cursor-ne {
|
|
878
|
+
cursor: ne-resize;
|
|
879
|
+
}
|
|
880
|
+
.x6-widget-transform-cursor-nw {
|
|
881
|
+
cursor: nw-resize;
|
|
882
|
+
}
|
|
883
|
+
.x6-widget-transform-cursor-se {
|
|
884
|
+
cursor: se-resize;
|
|
885
|
+
}
|
|
886
|
+
.x6-widget-transform-cursor-sw {
|
|
887
|
+
cursor: sw-resize;
|
|
888
|
+
}
|
|
889
|
+
.x6-widget-transform-resize {
|
|
890
|
+
width: 10px;
|
|
891
|
+
height: 10px;
|
|
892
|
+
border-radius: 6px;
|
|
893
|
+
}
|
|
894
|
+
.x6-widget-transform-resize[data-position='top-left'] {
|
|
895
|
+
top: -5px;
|
|
896
|
+
left: -5px;
|
|
897
|
+
}
|
|
898
|
+
.x6-widget-transform-resize[data-position='top-right'] {
|
|
899
|
+
top: -5px;
|
|
900
|
+
right: -5px;
|
|
901
|
+
}
|
|
902
|
+
.x6-widget-transform-resize[data-position='bottom-left'] {
|
|
903
|
+
bottom: -5px;
|
|
904
|
+
left: -5px;
|
|
905
|
+
}
|
|
906
|
+
.x6-widget-transform-resize[data-position='bottom-right'] {
|
|
907
|
+
right: -5px;
|
|
908
|
+
bottom: -5px;
|
|
909
|
+
}
|
|
910
|
+
.x6-widget-transform-resize[data-position='top'] {
|
|
911
|
+
top: -5px;
|
|
912
|
+
left: 50%;
|
|
913
|
+
margin-left: -5px;
|
|
914
|
+
}
|
|
915
|
+
.x6-widget-transform-resize[data-position='bottom'] {
|
|
916
|
+
bottom: -5px;
|
|
917
|
+
left: 50%;
|
|
918
|
+
margin-left: -5px;
|
|
919
|
+
}
|
|
920
|
+
.x6-widget-transform-resize[data-position='left'] {
|
|
921
|
+
top: 50%;
|
|
922
|
+
left: -5px;
|
|
923
|
+
margin-top: -5px;
|
|
924
|
+
}
|
|
925
|
+
.x6-widget-transform-resize[data-position='right'] {
|
|
926
|
+
top: 50%;
|
|
927
|
+
right: -5px;
|
|
928
|
+
margin-top: -5px;
|
|
929
|
+
}
|
|
930
|
+
.x6-widget-transform.prevent-aspect-ratio .x6-widget-transform-resize[data-position='top'],
|
|
931
|
+
.x6-widget-transform.prevent-aspect-ratio .x6-widget-transform-resize[data-position='bottom'],
|
|
932
|
+
.x6-widget-transform.prevent-aspect-ratio .x6-widget-transform-resize[data-position='left'],
|
|
933
|
+
.x6-widget-transform.prevent-aspect-ratio .x6-widget-transform-resize[data-position='right'] {
|
|
934
|
+
display: none;
|
|
935
|
+
}
|
|
936
|
+
.x6-widget-transform.no-orth-resize .x6-widget-transform-resize[data-position='bottom'],
|
|
937
|
+
.x6-widget-transform.no-orth-resize .x6-widget-transform-resize[data-position='left'],
|
|
938
|
+
.x6-widget-transform.no-orth-resize .x6-widget-transform-resize[data-position='right'],
|
|
939
|
+
.x6-widget-transform.no-orth-resize .x6-widget-transform-resize[data-position='top'] {
|
|
940
|
+
display: none;
|
|
941
|
+
}
|
|
942
|
+
.x6-widget-transform.no-resize .x6-widget-transform-resize {
|
|
943
|
+
display: none;
|
|
944
|
+
}
|
|
945
|
+
.x6-widget-transform-rotate {
|
|
946
|
+
top: -20px;
|
|
947
|
+
left: -20px;
|
|
948
|
+
width: 12px;
|
|
949
|
+
height: 12px;
|
|
950
|
+
border-radius: 6px;
|
|
951
|
+
cursor: crosshair;
|
|
952
|
+
}
|
|
953
|
+
.x6-widget-transform.no-rotate .x6-widget-transform-rotate {
|
|
954
|
+
display: none;
|
|
955
|
+
}
|
|
956
|
+
.x6-widget-transform-active {
|
|
957
|
+
border-color: transparent;
|
|
958
|
+
pointer-events: all;
|
|
959
|
+
}
|
|
960
|
+
.x6-widget-transform-active > div {
|
|
961
|
+
display: none;
|
|
962
|
+
}
|
|
963
|
+
.x6-widget-transform-active > .x6-widget-transform-active-handle {
|
|
964
|
+
display: block;
|
|
965
|
+
background-color: #808080;
|
|
966
|
+
}
|
|
967
|
+
`,Q6="has-widget-transform",yp=["nw","n","ne","e","se","s","sw","w"],Uh=["top-left","top","top-right","right","bottom-right","bottom","bottom-left","left"],XJ={minWidth:0,minHeight:0,maxWidth:1/0,maxHeight:1/0,rotateGrid:15,rotatable:!0,preserveAspectRatio:!1,orthogonalResizing:!0,restrictedResizing:!1,autoScrollOnResizing:!0,allowReverse:!0};class F6 extends to{get model(){return this.graph.model}get view(){return this.graph.renderer.findViewByCell(this.node)}get containerClassName(){return this.prefixClassName("widget-transform")}get resizeClassName(){return`${this.containerClassName}-resize`}get rotateClassName(){return`${this.containerClassName}-rotate`}constructor(t,e,n){super(),this.node=e,this.graph=n,this.options=Object.assign(Object.assign({},XJ),t),this.render(),this.startListening()}startListening(){this.delegateEvents({[`mousedown .${this.resizeClassName}`]:"startResizing",[`touchstart .${this.resizeClassName}`]:"startResizing",[`mousedown .${this.rotateClassName}`]:"startRotating",[`touchstart .${this.rotateClassName}`]:"startRotating"}),this.model.on("*",this.update,this),this.graph.on("scale",this.update,this),this.graph.on("translate",this.update,this),this.node.on("removed",this.remove,this),this.model.on("reseted",this.remove,this),this.view.on("cell:knob:mousedown",this.onKnobMouseDown,this),this.view.on("cell:knob:mouseup",this.onKnobMouseUp,this)}stopListening(){this.undelegateEvents(),this.model.off("*",this.update,this),this.graph.off("scale",this.update,this),this.graph.off("translate",this.update,this),this.node.off("removed",this.remove,this),this.model.off("reseted",this.remove,this),this.view.off("cell:knob:mousedown",this.onKnobMouseDown,this),this.view.off("cell:knob:mouseup",this.onKnobMouseUp,this)}renderHandles(){this.container=document.createElement("div");const t=document.createElement("div");Te(t,"draggable","false");const e=t.cloneNode(!0);_t(e,this.rotateClassName);const n=Uh.map(r=>{const l=t.cloneNode(!0);return _t(l,this.resizeClassName),Te(l,"data-position",r),l});this.empty(),qi(this.container,[...n,e])}render(){return this.renderHandles(),this.view&&this.view.addClass(Q6),_t(this.container,this.containerClassName),da(this.container,"no-orth-resize",this.options.preserveAspectRatio||!this.options.orthogonalResizing),da(this.container,"no-resize",!this.options.resizable),da(this.container,"no-rotate",!this.options.rotatable),this.options.className&&_t(this.container,this.options.className),this.graph.container.appendChild(this.container),this.update()}update(){const t=this.graph.matrix(),e=this.node.getBBox();e.x*=t.a,e.x+=t.e,e.y*=t.d,e.y+=t.f,e.width*=t.a,e.height*=t.d;const n=Es(this.node.getAngle()),r=n!==0?`rotate(${n}deg)`:"";return $e(this.container,{transform:r,width:e.width,height:e.height,left:e.x,top:e.y}),this.updateResizerDirections(),this}remove(){return this.view&&this.view.removeClass(Q6),super.remove()}onKnobMouseDown(){this.startHandle()}onKnobMouseUp(){this.stopHandle()}updateResizerDirections(){const t=Es(this.node.getAngle()),e=Math.floor(t*(yp.length/360));if(e!==this.prevShift){const n=yp.slice(e).concat(yp.slice(0,e)),r=f=>`${this.containerClassName}-cursor-${f}`;this.container.querySelectorAll(`.${this.resizeClassName}`).forEach((f,h)=>{dn(f,yp.map(p=>r(p)).join(" ")),_t(f,r(n[h]))}),this.prevShift=e}}getTrueDirection(t){const e=Es(this.node.getAngle());let n=Uh.indexOf(t);return n+=Math.floor(e*(Uh.length/360)),n%=Uh.length,Uh[n]}toValidResizeDirection(t){return{top:"top-left",bottom:"bottom-right",left:"bottom-left",right:"top-right"}[t]||t}startResizing(t){t.stopPropagation(),this.model.startBatch("resize",{cid:this.cid});const e=Te(t.target,"data-position");this.prepareResizing(t,e),this.startAction(t)}prepareResizing(t,e){const n=this.getTrueDirection(e);let r=0,l=0;e.split("-").forEach(y=>{r={left:-1,right:1}[y]||r,l={top:-1,bottom:1}[y]||l});const f=this.toValidResizeDirection(e),h={"top-right":"bottomLeft","top-left":"bottomRight","bottom-left":"topRight","bottom-right":"topLeft"}[f],p=Es(this.node.getAngle());this.setEventData(t,{selector:h,direction:f,trueDirection:n,relativeDirection:e,angle:p,resizeX:r,resizeY:l,action:"resizing"})}startRotating(t){t.stopPropagation(),this.model.startBatch("rotate",{cid:this.cid});const e=this.node.getBBox().getCenter(),n=this.normalizeEvent(t),r=this.graph.snapToGrid(n.clientX,n.clientY);this.setEventData(t,{center:e,action:"rotating",angle:Es(this.node.getAngle()),start:G.create(r).theta(e)}),this.startAction(t)}onMouseMove(t){const e=this.graph.findViewByCell(this.node);let n=this.getEventData(t);if(n.action){const r=this.normalizeEvent(t);let l=r.clientX,f=r.clientY;const h=this.graph.getPlugin("scroller"),p=this.options.restrictedResizing;if(p===!0||typeof p=="number"){const T=p===!0?0:p,M=h?Math.max(T,8):T,D=this.graph.container.getBoundingClientRect();l=Rh(l,D.left+M,D.right-M),f=Rh(f,D.top+M,D.bottom-M)}else this.options.autoScrollOnResizing&&h&&h.autoScroll(l,f);const y=this.graph.snapToGrid(l,f),x=this.graph.getGridSize(),S=this.node,w=this.options;if(n.action==="resizing"){n=n,n.resized||(e&&(e.addClass("node-resizing"),this.notify("node:resize",t,e)),n.resized=!0);const T=S.getBBox(),M=G.create(y).rotate(n.angle,T.getCenter()).diff(T[n.selector]);let D=n.resizeX?M.x*n.resizeX:T.width,R=n.resizeY?M.y*n.resizeY:T.height;const N=D,L=R;if(D=ha(D,x),R=ha(R,x),D=Math.max(D,w.minWidth||x),R=Math.max(R,w.minHeight||x),D=Math.min(D,w.maxWidth||1/0),R=Math.min(R,w.maxHeight||1/0),w.preserveAspectRatio){const U=T.width*R/T.height,$=T.height*D/T.width;D<U?R=$:D=U}const _=n.relativeDirection;if(w.allowReverse&&(N<=-D||L<=-R)){let U;_==="left"?N<=-D&&(U="right"):_==="right"?N<=-D&&(U="left"):_==="top"?L<=-R&&(U="bottom"):_==="bottom"?L<=-R&&(U="top"):_==="top-left"?N<=-D&&L<=-R?U="bottom-right":N<=-D?U="top-right":L<=-R&&(U="bottom-left"):_==="top-right"?N<=-D&&L<=-R?U="bottom-left":N<=-D?U="top-left":L<=-R&&(U="bottom-right"):_==="bottom-left"?N<=-D&&L<=-R?U="top-right":N<=-D?U="bottom-right":L<=-R&&(U="top-left"):_==="bottom-right"&&(N<=-D&&L<=-R?U="top-left":N<=-D?U="bottom-left":L<=-R&&(U="top-right"));const $=U;this.stopHandle();const Y=this.container.querySelector(`.${this.resizeClassName}[data-position="${$}"]`);this.startHandle(Y),this.prepareResizing(t,$),this.onMouseMove(t)}if(T.width!==D||T.height!==R){const U={ui:!0,direction:n.direction,relativeDirection:n.relativeDirection,trueDirection:n.trueDirection,minWidth:w.minWidth,minHeight:w.minHeight,maxWidth:w.maxWidth,maxHeight:w.maxHeight,preserveAspectRatio:w.preserveAspectRatio===!0};S.resize(D,R,U),this.notify("node:resizing",t,e)}}else if(n.action==="rotating"){n=n,n.rotated||(e&&(e.addClass("node-rotating"),this.notify("node:rotate",t,e)),n.rotated=!0);const T=S.getAngle(),M=n.start-G.create(y).theta(n.center);let D=n.angle+M;w.rotateGrid&&(D=ha(D,w.rotateGrid)),D=Es(D),T!==D&&(S.rotate(D,{absolute:!0}),this.notify("node:rotating",t,e))}}}onMouseUp(t){const e=this.getEventData(t);e.action&&(this.stopAction(t),this.model.stopBatch(e.action==="resizing"?"resize":"rotate",{cid:this.cid}))}startHandle(t){if(this.handle=t||null,_t(this.container,`${this.containerClassName}-active`),t){_t(t,`${this.containerClassName}-active-handle`);const e=t.getAttribute("data-position");if(e){const n=yp[Uh.indexOf(e)];_t(this.container,`${this.containerClassName}-cursor-${n}`)}}}stopHandle(){if(dn(this.container,`${this.containerClassName}-active`),this.handle){dn(this.handle,`${this.containerClassName}-active-handle`);const t=this.handle.getAttribute("data-position");if(t){const e=yp[Uh.indexOf(t)];dn(this.container,`${this.containerClassName}-cursor-${e}`)}this.handle=null}}startAction(t){this.startHandle(t.target),this.graph.view.undelegateEvents(),this.delegateDocumentEvents(QL,t.data)}stopAction(t){this.stopHandle(),this.undelegateDocumentEvents(),this.graph.view.delegateEvents();const e=this.graph.findViewByCell(this.node),n=this.getEventData(t);e&&(e.removeClass(`node-${n.action}`),n.action==="resizing"&&n.resized?this.notify("node:resized",t,e):n.action==="rotating"&&n.rotated&&this.notify("node:rotated",t,e))}notify(t,e,n,r={}){if(n){const l=n.graph,f=l.view.normalizeEvent(e),h=l.snapToGrid(f.clientX,f.clientY);this.trigger(t,Object.assign({e:f,view:n,node:n.cell,cell:n.cell,x:h.x,y:h.y},r))}}dispose(){this.stopListening(),this.remove(),this.off()}}De([Re()],F6.prototype,"dispose",null),dt.prototype.createTransformWidget=function(s){const t=this.getPlugin("transform");return t&&t.createWidget(s),this},dt.prototype.clearTransformWidgets=function(){const s=this.getPlugin("transform");return s&&s.clearWidgets(),this};class IJ extends Ts{constructor(t={}){super(),this.name="transform",this.widgets=new Map,this.disabled=!1,this.options=t,Ou(this.name,YJ)}init(t){this.graph=t,!this.disabled&&this.startListening()}startListening(){this.graph.on("node:click",this.onNodeClick,this),this.graph.on("blank:mousedown",this.onBlankMouseDown,this)}stopListening(){this.graph.off("node:click",this.onNodeClick,this),this.graph.off("blank:mousedown",this.onBlankMouseDown,this)}enable(){this.disabled&&(this.disabled=!1,this.startListening())}disable(){this.disabled||(this.disabled=!0,this.stopListening())}isEnabled(){return!this.disabled}createWidget(t){this.clearWidgets();const e=this.createTransform(t);e&&(this.widgets.set(t,e),e.on("*",(n,r)=>{this.trigger(n,r),this.graph.trigger(n,r)}))}onNodeClick({node:t}){this.createWidget(t)}onBlankMouseDown(){this.clearWidgets()}createTransform(t){const e=this.getTransformOptions(t);return e.resizable||e.rotatable?new F6(e,t,this.graph):null}parseOptionGroup(t,e,n){const r={};return Object.keys(n||{}).forEach(l=>{const f=n[l];r[l]=typeof f=="function"?f.call(t,e):f}),r}getTransformOptions(t){this.options.resizing||(this.options.resizing={enabled:!1}),this.options.rotating||(this.options.rotating={enabled:!1}),typeof this.options.resizing=="boolean"&&(this.options.resizing={enabled:this.options.resizing}),typeof this.options.rotating=="boolean"&&(this.options.rotating={enabled:this.options.rotating});const e=this.parseOptionGroup(this.graph,t,this.options.resizing),n=this.parseOptionGroup(this.graph,t,this.options.rotating);return{resizable:!!e.enabled,minWidth:e.minWidth||0,maxWidth:e.maxWidth||Number.MAX_SAFE_INTEGER,minHeight:e.minHeight||0,maxHeight:e.maxHeight||Number.MAX_SAFE_INTEGER,orthogonalResizing:typeof e.orthogonal=="boolean"?e.orthogonal:!0,restrictedResizing:!!e.restrict,autoScrollOnResizing:typeof e.autoScroll=="boolean"?e.autoScroll:!0,preserveAspectRatio:!!e.preserveAspectRatio,allowReverse:typeof e.allowReverse=="boolean"?e.allowReverse:!0,rotatable:!!n.enabled,rotateGrid:n.grid||15}}clearWidgets(){this.widgets.forEach((t,e)=>{this.graph.getCellById(e.id)&&t.dispose()}),this.widgets.clear()}dispose(){this.clearWidgets(),this.stopListening(),this.off(),Du(this.name)}}De([Re()],IJ.prototype,"dispose",null);const bp={light:{bgColor:"#F2F7FA",lineColor:"#C2C8D5",gridPrimary:"#eee",gridSecondary:"#ddd"},dark:{bgColor:"#1a1a1a",lineColor:"#555",gridPrimary:"#333",gridSecondary:"#444"}};function ZJ(){dt.registerConnector("algo-connector",(s,t)=>{const n=Math.abs(t.x-s.x),r=Math.floor(n/3*2),l={x:s.x+4+r,y:s.y},f={x:t.x-4-r,y:t.y};return Ft.parse(`
|
|
968
|
+
M ${s.x} ${s.y}
|
|
969
|
+
L ${s.x+4} ${s.y}
|
|
970
|
+
C ${l.x} ${l.y} ${f.x} ${f.y} ${t.x-4} ${t.y}
|
|
971
|
+
L ${t.x} ${t.y}
|
|
972
|
+
`).serialize()},!0)}function J6(s="light"){const t=bp[s];dt.registerEdge("dag-edge",{inherit:"edge",attrs:{line:{stroke:t.lineColor,strokeWidth:1,targetMarker:null}}},!0)}function QJ({className:s,type:t,...e}){return W.jsx("input",{type:t,"data-slot":"input",className:er("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",s),...e})}const FJ=({open:s,onOpenChange:t,value:e,onChange:n,onConfirm:r})=>W.jsx(hR,{open:s,onOpenChange:t,children:W.jsxs(gR,{children:[W.jsx(pR,{children:W.jsx(yR,{children:"修改节点"})}),W.jsx(QJ,{value:e,autoFocus:!0,onChange:l=>n(l.target.value),onKeyDown:l=>{l.key==="Enter"&&(l.preventDefault(),r())},placeholder:"请输入节点名称"}),W.jsxs(mR,{children:[W.jsx(dR,{asChild:!0,children:W.jsx(Kl,{variant:"outline",children:"取消"})}),W.jsx(Kl,{onClick:r,disabled:!e.trim(),children:"保存"})]})]})});function K6(s,t,e,n="height"){const r=s[n],l=t[n];return e==="center"?(r+l)/2:s.height}const Hh=Object.assign,JJ={getId:s=>s.id||s.name,getPreH:s=>s.preH||0,getPreV:s=>s.preV||0,getHGap:s=>s.hgap||18,getVGap:s=>s.vgap||18,getChildren:s=>s.children,getHeight:s=>s.height||36,getWidth(s){const t=s.label||" ";return s.width||18*t.split("").length}};class jS{constructor(t,e){if(this.x=0,this.y=0,this.depth=0,this.children=[],this.hgap=0,this.vgap=0,t instanceof jS||"x"in t&&"y"in t&&"children"in t){const l=t;return this.data=l.data,this.id=l.id,this.x=l.x,this.y=l.y,this.width=l.width,this.height=l.height,this.depth=l.depth,this.children=l.children,this.parent=l.parent,this.hgap=l.hgap,this.vgap=l.vgap,this.preH=l.preH,void(this.preV=l.preV)}this.data=t;const n=e.getHGap(t),r=e.getVGap(t);this.preH=e.getPreH(t),this.preV=e.getPreV(t),this.width=e.getWidth(t),this.height=e.getHeight(t),this.width+=this.preH,this.height+=this.preV,this.id=e.getId(t),this.addGap(n,r)}isRoot(){return this.depth===0}isLeaf(){return this.children.length===0}addGap(t,e){this.hgap+=t,this.vgap+=e,this.width+=2*t,this.height+=2*e}eachNode(t){let e,n=[this];for(;e=n.shift();)t(e),n=e.children.concat(n)}DFTraverse(t){this.eachNode(t)}BFTraverse(t){let e,n=[this];for(;e=n.shift();)t(e),n=n.concat(e.children)}getBoundingBox(){const t={left:Number.MAX_VALUE,top:Number.MAX_VALUE,width:0,height:0};return this.eachNode(e=>{t.left=Math.min(t.left,e.x),t.top=Math.min(t.top,e.y),t.width=Math.max(t.width,e.x+e.width),t.height=Math.max(t.height,e.y+e.height)}),t}translate(t=0,e=0){this.eachNode(n=>{n.x+=t,n.y+=e,n.x+=n.preH,n.y+=n.preV})}right2left(){const t=this.getBoundingBox();this.eachNode(e=>{e.x=e.x-2*(e.x-t.left)-e.width}),this.translate(t.width,0)}bottom2top(){const t=this.getBoundingBox();this.eachNode(e=>{e.y=e.y-2*(e.y-t.top)-e.height}),this.translate(0,t.height)}}function ZT(s,t={},e){t=Hh({},JJ,t);const n=new jS(s,t),r=[n];let l;if(!e&&!s.collapsed){for(;l=r.shift();)if(!l.data.collapsed){const f=t.getChildren(l.data),h=f?f.length:0;if(l.children=new Array(h),f&&h)for(let p=0;p<h;p++){const y=new jS(f[p],t);l.children[p]=y,r.push(y),y.parent=l,y.depth=l.depth+1}}}return n}class _S{constructor(t,e={}){this.options=e,this.rootNode=ZT(t,e)}execute(){throw new Error("please override this method")}}let KJ=class cE{constructor(t=0,e=0,n=0,r=[]){this.x=0,this.prelim=0,this.mod=0,this.shift=0,this.change=0,this.tl=null,this.tr=null,this.el=null,this.er=null,this.msel=0,this.mser=0,this.w=t||0,this.h=e||0,this.y=n||0,this.c=r||[],this.cs=r.length}static fromNode(t,e){if(!t)return null;const n=[];return t.children.forEach(r=>{const l=cE.fromNode(r,e);l&&n.push(l)}),e?new cE(t.height,t.width,t.x,n):new cE(t.width,t.height,t.y,n)}};function W6(s,t,e){e?s.y+=t:s.x+=t,s.children.forEach(n=>{W6(n,t,e)})}function tj(s,t){let e=t?s.y:s.x;return s.children.forEach(n=>{e=Math.min(tj(n,t),e)}),e}function WJ(s,t){W6(s,-tj(s,t),t)}function ej(s,t,e){e?t.y=s.x:t.x=s.x,s.c.forEach((n,r)=>{ej(n,t.children[r],e)})}function nj(s,t,e=0){t?(s.x=e,e+=s.width):(s.y=e,e+=s.height),s.children.forEach(n=>{nj(n,t,e)})}function tK(s,t={}){const e=t.isHorizontal;function n(S){S.cs===0?(S.el=S,S.er=S,S.msel=S.mser=0):(S.el=S.c[0].el,S.msel=S.c[0].msel,S.er=S.c[S.cs-1].er,S.mser=S.c[S.cs-1].mser)}function r(S,w,T){let M=S.c[w-1],D=M.mod,R=S.c[w],N=R.mod;for(;M!==null&&R!==null;){T&&p(M)>T.low&&(T=T.nxt);const L=D+M.prelim+M.w-(N+R.prelim);L>0&&(N+=L,T&&l(S,w,T.index,L));const _=p(M),U=p(R);_<=U&&(M=h(M),M!==null&&(D+=M.mod)),_>=U&&(R=f(R),R!==null&&(N+=R.mod))}!M&&R?function(L,_,U,$){const Y=L.c[0].el;Y.tl=U;const k=$-U.mod-L.c[0].msel;Y.mod+=k,Y.prelim-=k,L.c[0].el=L.c[_].el,L.c[0].msel=L.c[_].msel}(S,w,R,N):M&&!R&&function(L,_,U,$){const Y=L.c[_].er;Y.tr=U;const k=$-U.mod-L.c[_].mser;Y.mod+=k,Y.prelim-=k,L.c[_].er=L.c[_-1].er,L.c[_].mser=L.c[_-1].mser}(S,w,M,D)}function l(S,w,T,M){S.c[w].mod+=M,S.c[w].msel+=M,S.c[w].mser+=M,function(D,R,N,L){if(N!==R-1){const _=R-N;D.c[N+1].shift+=L/_,D.c[R].shift-=L/_,D.c[R].change-=L-L/_}}(S,w,T,M)}function f(S){return S.cs===0?S.tl:S.c[0]}function h(S){return S.cs===0?S.tr:S.c[S.cs-1]}function p(S){return S.y+S.h}function y(S,w,T){for(;T!==null&&S>=T.low;)T=T.nxt;return{low:S,index:w,nxt:T}}nj(s,e);const x=KJ.fromNode(s,e);return x&&(function S(w){if(w.cs===0)return void n(w);S(w.c[0]);let T=y(p(w.c[0].el),0,null);for(let M=1;M<w.cs;++M){S(w.c[M]);const D=p(w.c[M].er);r(w,M,T),T=y(D,M,T)}(function(M){M.prelim=(M.c[0].prelim+M.c[0].mod+M.c[M.cs-1].mod+M.c[M.cs-1].prelim+M.c[M.cs-1].w)/2-M.w/2})(w),n(w)}(x),function S(w,T){T+=w.mod,w.x=w.prelim+T,function(M){let D=0,R=0;for(let N=0;N<M.cs;N++)D+=M.c[N].shift,R+=D+M.c[N].change,M.c[N].mod+=R}(w);for(let M=0;M<w.cs;M++)S(w.c[M],T)}(x,0),ej(x,s,e),WJ(s,e)),s}function ij(s,t){const e=ZT(s.data,t,!0),n=ZT(s.data,t,!0),r=s.children.length,l=Math.round(r/2),f=t.getSide||function(h,p){return p<l?"right":"left"};for(let h=0;h<r;h++){const p=s.children[h];f(p,h)==="right"?n.children.push(p):e.children.push(p)}return e.eachNode(h=>{h.isRoot()||(h.side="left")}),n.eachNode(h=>{h.isRoot()||(h.side="right")}),{left:e,right:n}}const ku=["LR","RL","TB","BT","H","V"],eK=["LR","RL","H"],nK=ku[0];function QT(s,t,e){const n=t.direction||nK;if(t.isHorizontal=(l=>eK.indexOf(l)>-1)(n),ku.indexOf(n)===-1)throw new TypeError(`Invalid direction: ${n}`);if(n===ku[0])e(s,t);else if(n===ku[1])e(s,t),s.right2left();else if(n===ku[2])e(s,t);else if(n===ku[3])e(s,t),s.bottom2top();else if(n===ku[4]||n===ku[5]){const{left:l,right:f}=ij(s,t);e(l,t),e(f,t),t.isHorizontal?l.right2left():l.bottom2top(),f.translate(l.x-f.x,l.y-f.y),s.x=l.x,s.y=f.y;const h=s.getBoundingBox();t.isHorizontal?h.top<0&&s.translate(0,-h.top):h.left<0&&s.translate(-h.left,0)}let r=t.fixedRoot;return r===void 0&&(r=!0),r&&s.translate(-(s.x+s.width/2+s.hgap),-(s.y+s.height/2+s.vgap)),function(l,f){if(f.radial){const[h,p]=f.isHorizontal?["x","y"]:["y","x"],y={x:1/0,y:1/0},x={x:-1/0,y:-1/0};let S=0;l.DFTraverse(M=>{S++;const{x:D,y:R}=M;y.x=Math.min(y.x,D),y.y=Math.min(y.y,R),x.x=Math.max(x.x,D),x.y=Math.max(x.y,R)});const w=x[p]-y[p];if(w===0)return;const T=2*Math.PI/S;l.DFTraverse(M=>{const D=M[p],R=y[p],N=M[h],L=l[h],_=(D-R)/w*(2*Math.PI-T)+T,U=N-L;M.x=Math.cos(_)*U,M.y=Math.sin(_)*U})}}(s,t),s}class iK extends _S{execute(){return QT(this.rootNode,this.options,tK)}}const sK={};function oK(s,t){const e=Hh({},sK,t);return new iK(s,e).execute()}class rK{constructor(t=0,e=[]){this.x=0,this.y=0,this.leftChild=null,this.rightChild=null,this.isLeaf=!1,this.height=t,this.children=e}}const aK={isHorizontal:!0,nodeSep:20,nodeSize:20,rankSep:200,subTreeSep:10};function sj(s,t,e){e?(t.x=s.x,t.y=s.y):(t.x=s.y,t.y=s.x),s.children.forEach((n,r)=>{sj(n,t.children[r],e)})}function lK(s,t={}){const e=Hh({},aK,t);let n=0,r=null;const l=function f(h){h.width=0,h.depth&&h.depth>n&&(n=h.depth);const p=h.children,y=p.length,x=new rK(0,[]);return p.forEach((S,w)=>{const T=f(S);x.children.push(T),w===0&&(x.leftChild=T),w===y-1&&(x.rightChild=T)}),x.originNode=h,x.isLeaf=h.isLeaf(),x}(s);return function f(h){if(h.isLeaf||h.children.length===0)h.drawingDepth=n;else{const p=h.children.map(x=>f(x)),y=Math.min(...p);h.drawingDepth=y-1}return h.drawingDepth}(l),function f(h){h.x=h.drawingDepth*e.rankSep,h.isLeaf?(h.y=0,r&&(h.y=r.y+r.height+e.nodeSep,h.originNode.parent!==r.originNode.parent&&(h.y+=e.subTreeSep)),r=h):(h.children.forEach(p=>{f(p)}),h.y=(h.leftChild.y+h.rightChild.y)/2)}(l),sj(l,s,e.isHorizontal),s}class cK extends _S{execute(){return this.rootNode.width=0,QT(this.rootNode,this.options,lK)}}const uK={};function fK(s,t){const e=Hh({},uK,t);return new cK(s,e).execute()}function BS(s,t,e,n){let r=null;s.eachNode(l=>{(function(f,h,p,y,x){const S=(typeof p=="function"?p(f):p)*f.depth;if(!y)try{if(f.parent&&f.id===f.parent.children[0].id)return f.x+=S,void(f.y=h?h.y:0)}catch{}if(f.x+=S,h){if(f.y=h.y+K6(h,f,x),h.parent&&f.parent&&f.parent.id!==h.parent.id){const w=h.parent,T=w.y+K6(w,f,x);f.y=T>f.y?T:f.y}}else f.y=0})(l,r,t,e,n),r=l})}const Qb=["LR","RL","H"],hK=Qb[0];class dK extends _S{execute(){const t=this.options,e=this.rootNode;t.isHorizontal=!0;const{indent:n=20,dropCap:r=!0,direction:l=hK,align:f}=t;if(l&&Qb.indexOf(l)===-1)throw new TypeError(`Invalid direction: ${l}`);if(l===Qb[0])BS(e,n,r,f);else if(l===Qb[1])BS(e,n,r,f),e.right2left();else if(l===Qb[2]){const{left:h,right:p}=ij(e,t);BS(h,n,r,f),h.right2left(),BS(p,n,r,f);const y=h.getBoundingBox();p.translate(y.width,0),e.x=p.x-e.width/2}return e}}const gK={};function pK(s,t){const e=Hh({},gK,t);return new dK(s,e).execute()}function oj(s,t){let e=0;return s.children.length?s.children.forEach(n=>{e+=oj(n,t)}):e=s.height,s._subTreeSep=t.getSubTreeSep(s.data),s.totalHeight=Math.max(s.height,e)+2*s._subTreeSep,s.totalHeight}function rj(s){const t=s.children,e=t.length;if(e){t.forEach(h=>{rj(h)});const n=t[0],r=t[e-1],l=r.y-n.y+r.height;let f=0;if(t.forEach(h=>{f+=h.totalHeight}),l>s.height)s.y=n.y+l/2-s.height/2;else if(t.length!==1||s.height>f){const h=s.y+(s.height-l)/2-n.y;t.forEach(p=>{p.translate(0,h)})}else s.y=(n.y+n.height/2+r.y+r.height/2)/2-s.height/2}}const mK={getSubTreeSep:()=>0};function yK(s,t={}){return t=Hh({},mK,t),s.parent={x:0,width:0,height:0,y:0},s.BFTraverse(e=>{e.x=e.parent.x+e.parent.width}),s.parent=void 0,oj(s,t),s.startY=0,s.y=s.totalHeight/2-s.height/2,s.eachNode(e=>{const n=e.children,r=n.length;if(r){const l=n[0];if(l.startY=e.startY+e._subTreeSep,r===1)l.y=e.y+e.height/2-l.height/2;else{l.y=l.startY+l.totalHeight/2-l.height/2;for(let f=1;f<r;f++){const h=n[f];h.startY=n[f-1].startY+n[f-1].totalHeight,h.y=h.startY+h.totalHeight/2-h.height/2}}}}),rj(s),s}class bK extends _S{execute(){return QT(this.rootNode,this.options,yK)}}const vK={};function xK(s,t){const e=Hh({},vK,t);return new bK(s,e).execute()}const SK={compactBox:oK,dendrogram:fK,indented:pK,mindmap:xK};function cc(s){var e;const{...t}=s.data||{};return{...t,id:s.id,checked:s.checked??t.checked,collapsed:s.collapsed,children:((e=s.children)==null?void 0:e.map(cc))||[]}}function kh(s,t){if(!s)return null;if(s.id===t)return s;if(s.children)for(const e of s.children){const n=kh(e,t);if(n)return n}return null}function FT(s,t,e=null){if(!s)return null;if(s.id===t)return{node:s,parent:e,index:-1};if(s.children)for(let n=0;n<s.children.length;n++){const r=s.children[n];if(r.id===t)return{node:r,parent:s,index:n};const l=FT(r,t,s);if(l)return l}return null}function aj(s){const t={id:s.id||Math.random().toString(36).slice(2),data:{...s},children:[],collapsed:s.collapsed??!1};return s.children&&(t.children=s.children.map(e=>aj(e))),t}function lj(s){return{...s,children:s.collapsed?[]:(s.children||[]).map(lj)}}function wK({containerRef:s,graphRef:t,treeDataRef:e,renderRef:n,selectedNodeIdRef:r,themeRef:l,data:f,isDarkMode:h,showCheckboxes:p,showGrid:y,readonly:x,onNodeChange:S,openCreateDialog:w,openDeleteDialog:T,openRenameDialog:M}){Yt.useEffect(()=>{l.current=h?"dark":"light";const D=bp[l.current],R=t.current;R&&(R.drawBackground({color:D.bgColor}),R.drawGrid({args:[{color:D.gridPrimary,thickness:1},{color:D.gridSecondary,thickness:1,factor:4}]}),y?R.showGrid():R.hideGrid(),R.getEdges().forEach(L=>{L.attr("line/stroke")!=="#1890ff"&&L.attr("line/stroke",D.lineColor)}),J6(l.current))},[h,y]),Yt.useEffect(()=>{if(!s.current)return;J6(l.current);const D=new dt({container:s.current,autoResize:!0,background:{color:bp[l.current].bgColor},grid:{visible:!0,type:"doubleMesh",args:[{color:bp[l.current].gridPrimary,thickness:1},{color:bp[l.current].gridSecondary,thickness:1,factor:4}]},panning:!0,mousewheel:!0,connecting:{snap:!0,allowBlank:!1,allowLoop:!1,highlight:!0,connector:"algo-connector",connectionPoint:"anchor",anchor:"center",createEdge(){return D.createEdge({shape:"dag-edge",attrs:{line:{strokeDasharray:"5 5"}},zIndex:-1})}}});t.current=D,D.use(new L6),D.use(new V6({enabled:!0,multiple:!1,rubberband:!1})),D.on("selection:changed",({selected:N})=>{const L=N.find(_=>_.isNode());r.current=L?L.id:null}),e.current=aj(f);const R=()=>{const N=e.current,L=lj(N),_=SK.mindmap(L,{direction:"H",getHeight:()=>36,getWidth:()=>180,getHGap:()=>60,getVGap:()=>10,getSide:()=>"right"}),U=[],$=Y=>{if(Y){const k=kh(e.current,Y.id),H=k&&k.children&&k.children.length>0,J=D.createNode({id:Y.id,shape:"dag-node",x:Y.x,y:Y.y,data:{label:Y.data.data.name,checked:(k==null?void 0:k.checked)||!1,collapsed:(k==null?void 0:k.collapsed)||!1,hasChildren:H,showCheckboxes:p,readonly:x,onAddChild:()=>w(Y.id),onDeleteNode:()=>T(Y.id),onEditNode:()=>M(Y.id)},ports:[{id:"left",group:"left"},{id:"right",group:"right"}]});U.push(J),Y.children&&Y.children.forEach(F=>{$(F);const ct=D.createEdge({source:{cell:Y.id,port:"right"},target:{cell:F.id,port:"left"},shape:"dag-edge",connector:{name:"algo-connector"},attrs:{line:{strokeDasharray:"5 5"}}});U.push(ct)})}};if($(_),D.resetCells(U),r.current){const Y=D.getCellById(r.current);Y&&Y.isNode()?D.resetSelection(Y):D.cleanSelection()}D.centerContent()};return n.current=R,R(),D.on("node:change:data",({node:N,current:L,previous:_})=>{const U=kh(e.current,N.id);if(U){if(L.collapsed!==(_==null?void 0:_.collapsed)){U.collapsed=L.collapsed,R(),S==null||S(cc(e.current),"collapse");return}if(L.checked!==(_==null?void 0:_.checked)){const $=L.checked;U.checked=$;const Y=(H,J)=>{H.children&&H.children.forEach(F=>{F.checked=J,Y(F,J)})};Y(U,$);const k=D.getOutgoingEdges(N);k&&k.forEach(H=>{const J=H.getTargetCell();if(J&&J.isNode()){const F=J.getData();F.checked!==$&&J.setData({...F,checked:$})}}),S==null||S(cc(e.current),"check")}L.label!==(_==null?void 0:_.label)&&(U.data=U.data||{},U.data.name=L.label,S==null||S(cc(e.current),"update"))}}),D.on("node:mouseenter",({node:N})=>{const L=[];let _=N;for(;_;){const U=D.getIncomingEdges(_);if(U&&U.length>0){const $=U[0];L.push($),_=$.getSourceCell()}else break}L.forEach(U=>{U.attr("line/stroke","#1890ff"),U.attr("line/strokeDasharray",5),U.attr("line/style/animation","ant-line-flow 30s linear infinite")})}),D.on("node:mouseleave",({node:N})=>{const L=[];let _=N;for(;_;){const U=D.getIncomingEdges(_);if(U&&U.length>0){const $=U[0];L.push($),_=$.getSourceCell()}else break}L.forEach(U=>{U.attr("line/stroke",bp[l.current].lineColor),U.attr("line/strokeDasharray","5 5"),U.attr("line/style/animation","")})}),()=>{n.current=null,D.dispose()}},[f]),Yt.useEffect(()=>{const D=t.current;D&&D.getNodes().forEach(N=>{const L=N.getData();N.setData({...L,showCheckboxes:p,readonly:x})})},[p,x])}function CK(s){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],e=document.createElement("style");e.type="text/css",t.appendChild(e),e.styleSheet?e.styleSheet.cssText=s:e.appendChild(document.createTextNode(s))}Array(12).fill(0);let JT=1;class EK{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const e=this.subscribers.indexOf(t);this.subscribers.splice(e,1)}),this.publish=t=>{this.subscribers.forEach(e=>e(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var e;const{message:n,...r}=t,l=typeof(t==null?void 0:t.id)=="number"||((e=t.id)==null?void 0:e.length)>0?t.id:JT++,f=this.toasts.find(p=>p.id===l),h=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(l)&&this.dismissedToasts.delete(l),f?this.toasts=this.toasts.map(p=>p.id===l?(this.publish({...p,...t,id:l,title:n}),{...p,...t,id:l,dismissible:h,title:n}):p):this.addToast({title:n,...r,dismissible:h,id:l}),l},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(e=>e({id:t,dismiss:!0})))):this.toasts.forEach(e=>{this.subscribers.forEach(n=>n({id:e.id,dismiss:!0}))}),t),this.message=(t,e)=>this.create({...e,message:t}),this.error=(t,e)=>this.create({...e,message:t,type:"error"}),this.success=(t,e)=>this.create({...e,type:"success",message:t}),this.info=(t,e)=>this.create({...e,type:"info",message:t}),this.warning=(t,e)=>this.create({...e,type:"warning",message:t}),this.loading=(t,e)=>this.create({...e,type:"loading",message:t}),this.promise=(t,e)=>{if(!e)return;let n;e.loading!==void 0&&(n=this.create({...e,promise:t,type:"loading",message:e.loading,description:typeof e.description!="function"?e.description:void 0}));const r=Promise.resolve(t instanceof Function?t():t);let l=n!==void 0,f;const h=r.then(async y=>{if(f=["resolve",y],Yt.isValidElement(y))l=!1,this.create({id:n,type:"default",message:y});else if(TK(y)&&!y.ok){l=!1;const S=typeof e.error=="function"?await e.error(`HTTP error! status: ${y.status}`):e.error,w=typeof e.description=="function"?await e.description(`HTTP error! status: ${y.status}`):e.description,M=typeof S=="object"&&!Yt.isValidElement(S)?S:{message:S};this.create({id:n,type:"error",description:w,...M})}else if(y instanceof Error){l=!1;const S=typeof e.error=="function"?await e.error(y):e.error,w=typeof e.description=="function"?await e.description(y):e.description,M=typeof S=="object"&&!Yt.isValidElement(S)?S:{message:S};this.create({id:n,type:"error",description:w,...M})}else if(e.success!==void 0){l=!1;const S=typeof e.success=="function"?await e.success(y):e.success,w=typeof e.description=="function"?await e.description(y):e.description,M=typeof S=="object"&&!Yt.isValidElement(S)?S:{message:S};this.create({id:n,type:"success",description:w,...M})}}).catch(async y=>{if(f=["reject",y],e.error!==void 0){l=!1;const x=typeof e.error=="function"?await e.error(y):e.error,S=typeof e.description=="function"?await e.description(y):e.description,T=typeof x=="object"&&!Yt.isValidElement(x)?x:{message:x};this.create({id:n,type:"error",description:S,...T})}}).finally(()=>{l&&(this.dismiss(n),n=void 0),e.finally==null||e.finally.call(e)}),p=()=>new Promise((y,x)=>h.then(()=>f[0]==="reject"?x(f[1]):y(f[1])).catch(x));return typeof n!="string"&&typeof n!="number"?{unwrap:p}:Object.assign(n,{unwrap:p})},this.custom=(t,e)=>{const n=(e==null?void 0:e.id)||JT++;return this.create({jsx:t(n),id:n,...e}),n},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const hr=new EK,AK=(s,t)=>{const e=(t==null?void 0:t.id)||JT++;return hr.addToast({title:s,...t,id:e}),e},TK=s=>s&&typeof s=="object"&&"ok"in s&&typeof s.ok=="boolean"&&"status"in s&&typeof s.status=="number",MK=AK,OK=()=>hr.toasts,DK=()=>hr.getActiveToasts(),RK=Object.assign(MK,{success:hr.success,info:hr.info,warning:hr.warning,error:hr.error,custom:hr.custom,message:hr.message,promise:hr.promise,dismiss:hr.dismiss,loading:hr.loading},{getHistory:OK,getToasts:DK});CK("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function zK({graphRef:s,treeDataRef:t,renderRef:e,selectedNodeIdRef:n,onNodeChange:r}){const[l,f]=Yt.useState(!1),[h,p]=Yt.useState(null),[y,x]=Yt.useState(""),[S,w]=Yt.useState(!1),[T,M]=Yt.useState(null),[D,R]=Yt.useState(""),N=H=>{var F;const J=kh(t.current,H);J&&(p(H),x(((F=J.data)==null?void 0:F.name)??""),f(!0))},L=(H,J)=>{var V;const F=H;if(!F)return;const ct=J?J.trim():"新节点";if(!ct)return;const lt=kh(t.current,F);if(!lt)return;const vt=Math.random().toString(36).slice(2),Ot={id:vt,name:ct,children:[]},zt={id:vt,data:{...Ot},children:[],collapsed:!1};lt.children=lt.children||[],lt.children.push(zt),lt.data=lt.data||{},lt.data.children=lt.data.children||[],lt.data.children.push(Ot),lt.collapsed=!1,(V=e.current)==null||V.call(e),r==null||r(cc(t.current),"create"),H&&J&&setTimeout(()=>{const ot=s.current;if(ot){const tt=ot.getCellById(vt);tt&&tt.isNode()&&(ot.resetSelection(tt),tt.setData({...tt.getData(),editing:!0}))}},100)};return{renameOpen:l,setRenameOpen:f,renameNodeId:h,setRenameNodeId:p,renameValue:y,setRenameValue:x,deleteOpen:S,setDeleteOpen:w,deleteNodeId:T,setDeleteNodeId:M,deleteNodeName:D,setDeleteNodeName:R,openRenameDialog:N,openCreateDialog:H=>{L(H,"新节点")},openDeleteDialog:H=>{var F,ct;if(((F=t.current)==null?void 0:F.id)===H)return;const J=kh(t.current,H);J&&(M(H),R(((ct=J.data)==null?void 0:ct.name)??""),w(!0))},applyRename:()=>{var F;if(!h)return;const H=y.trim();if(!H)return;const J=kh(t.current,h);J&&(J.data=J.data||{},J.data.name=H,f(!1),p(null),(F=e.current)==null||F.call(e),r==null||r(cc(t.current),"update"))},applyDelete:()=>{var vt,Ot,zt,V;if(!T||((vt=t.current)==null?void 0:vt.id)===T)return;const H=FT(t.current,T);if(!H||!H.parent)return;const{node:J,parent:F,index:ct}=H,lt=((Ot=J.data)==null?void 0:Ot.name)||"";F.children.splice(ct,1),(zt=F.data)!=null&&zt.children&&(F.data.children=F.data.children.filter(ot=>(ot==null?void 0:ot.id)!==T)),n.current===T&&(n.current=null),w(!1),M(null),(V=e.current)==null||V.call(e),r==null||r(cc(t.current),"delete"),RK(`已删除 ${lt}`,{action:{label:"撤回",onClick:()=>{var ot;F.children.splice(ct,0,J),F.data&&(F.data.children=F.data.children||[],F.data.children.splice(ct,0,J.data)),(ot=e.current)==null||ot.call(e),r==null||r(cc(t.current),"undo")}}})},applyCreateChild:L,applyCreateSibling:(H,J)=>{var ot;const F=J.trim();if(!F)return;const ct=FT(t.current,H);if(!ct||!ct.parent)return;const{parent:lt,index:vt}=ct,Ot=Math.random().toString(36).slice(2),zt={id:Ot,name:F,children:[]},V={id:Ot,data:{...zt},children:[],collapsed:!1};lt.children=lt.children||[],lt.children.splice(vt+1,0,V),lt.data=lt.data||{},lt.data.children=lt.data.children||[],lt.data.children.splice(vt+1,0,zt),(ot=e.current)==null||ot.call(e),r==null||r(cc(t.current),"create"),setTimeout(()=>{const tt=s.current;if(tt){const yt=tt.getCellById(Ot);yt&&yt.isNode()&&(tt.resetSelection(yt),yt.setData({...yt.getData(),editing:!0}))}},100)}}}function NK({renameOpen:s,readonly:t,selectedNodeIdRef:e,applyCreateSibling:n,applyCreateChild:r,openDeleteDialog:l}){Yt.useEffect(()=>{const f=h=>{if(s)return;const p=h.target;if(p){const x=p.tagName;if(x==="INPUT"||x==="TEXTAREA"||p.isContentEditable)return}const y=e.current;y&&(t||(h.key==="Enter"&&(h.preventDefault(),n(y,"新节点")),h.key==="Tab"&&(h.preventDefault(),r(y,"新节点")),h.key==="Delete"&&(h.preventDefault(),l(y))))};return window.addEventListener("keydown",f),()=>{window.removeEventListener("keydown",f)}},[s,t,e,n,r,l])}function cj(s){const t=hs.getForeignObjectMarkup();return s?[{tagName:s,selector:"body"},t]:[t]}dt.registerNode("react-shape",{view:"react-shape-view",markup:cj(),attrs:{body:{fill:"none",stroke:"none",refWidth:"100%",refHeight:"100%"},fo:{refWidth:"100%",refHeight:"100%"}},propHooks(s){if(s.markup==null){const t=s.primer;if(t){s.markup=cj(t);let e={};switch(t){case"circle":e={refCx:"50%",refCy:"50%",refR:"50%"};break;case"ellipse":e={refCx:"50%",refCy:"50%",refRx:"50%",refRy:"50%"};break}s.attrs=Mn({},{body:Object.assign({refWidth:null,refHeight:null},e)},s.attrs||{})}}return s}},!0);var KT={exports:{}},Fb={},PS={exports:{}},WT={};/**
|
|
973
|
+
* @license React
|
|
974
|
+
* scheduler.production.js
|
|
975
|
+
*
|
|
976
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
977
|
+
*
|
|
978
|
+
* This source code is licensed under the MIT license found in the
|
|
979
|
+
* LICENSE file in the root directory of this source tree.
|
|
980
|
+
*/var uj;function LK(){return uj||(uj=1,function(s){function t(V,ot){var tt=V.length;V.push(ot);t:for(;0<tt;){var yt=tt-1>>>1,Mt=V[yt];if(0<r(Mt,ot))V[yt]=ot,V[tt]=Mt,tt=yt;else break t}}function e(V){return V.length===0?null:V[0]}function n(V){if(V.length===0)return null;var ot=V[0],tt=V.pop();if(tt!==ot){V[0]=tt;t:for(var yt=0,Mt=V.length,nt=Mt>>>1;yt<nt;){var St=2*(yt+1)-1,Tt=V[St],Et=St+1,Ht=V[Et];if(0>r(Tt,tt))Et<Mt&&0>r(Ht,Tt)?(V[yt]=Ht,V[Et]=tt,yt=Et):(V[yt]=Tt,V[St]=tt,yt=St);else if(Et<Mt&&0>r(Ht,tt))V[yt]=Ht,V[Et]=tt,yt=Et;else break t}}return ot}function r(V,ot){var tt=V.sortIndex-ot.sortIndex;return tt!==0?tt:V.id-ot.id}if(s.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var l=performance;s.unstable_now=function(){return l.now()}}else{var f=Date,h=f.now();s.unstable_now=function(){return f.now()-h}}var p=[],y=[],x=1,S=null,w=3,T=!1,M=!1,D=!1,R=!1,N=typeof setTimeout=="function"?setTimeout:null,L=typeof clearTimeout=="function"?clearTimeout:null,_=typeof setImmediate<"u"?setImmediate:null;function U(V){for(var ot=e(y);ot!==null;){if(ot.callback===null)n(y);else if(ot.startTime<=V)n(y),ot.sortIndex=ot.expirationTime,t(p,ot);else break;ot=e(y)}}function $(V){if(D=!1,U(V),!M)if(e(p)!==null)M=!0,Y||(Y=!0,lt());else{var ot=e(y);ot!==null&&zt($,ot.startTime-V)}}var Y=!1,k=-1,H=5,J=-1;function F(){return R?!0:!(s.unstable_now()-J<H)}function ct(){if(R=!1,Y){var V=s.unstable_now();J=V;var ot=!0;try{t:{M=!1,D&&(D=!1,L(k),k=-1),T=!0;var tt=w;try{e:{for(U(V),S=e(p);S!==null&&!(S.expirationTime>V&&F());){var yt=S.callback;if(typeof yt=="function"){S.callback=null,w=S.priorityLevel;var Mt=yt(S.expirationTime<=V);if(V=s.unstable_now(),typeof Mt=="function"){S.callback=Mt,U(V),ot=!0;break e}S===e(p)&&n(p),U(V)}else n(p);S=e(p)}if(S!==null)ot=!0;else{var nt=e(y);nt!==null&&zt($,nt.startTime-V),ot=!1}}break t}finally{S=null,w=tt,T=!1}ot=void 0}}finally{ot?lt():Y=!1}}}var lt;if(typeof _=="function")lt=function(){_(ct)};else if(typeof MessageChannel<"u"){var vt=new MessageChannel,Ot=vt.port2;vt.port1.onmessage=ct,lt=function(){Ot.postMessage(null)}}else lt=function(){N(ct,0)};function zt(V,ot){k=N(function(){V(s.unstable_now())},ot)}s.unstable_IdlePriority=5,s.unstable_ImmediatePriority=1,s.unstable_LowPriority=4,s.unstable_NormalPriority=3,s.unstable_Profiling=null,s.unstable_UserBlockingPriority=2,s.unstable_cancelCallback=function(V){V.callback=null},s.unstable_forceFrameRate=function(V){0>V||125<V?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):H=0<V?Math.floor(1e3/V):5},s.unstable_getCurrentPriorityLevel=function(){return w},s.unstable_next=function(V){switch(w){case 1:case 2:case 3:var ot=3;break;default:ot=w}var tt=w;w=ot;try{return V()}finally{w=tt}},s.unstable_requestPaint=function(){R=!0},s.unstable_runWithPriority=function(V,ot){switch(V){case 1:case 2:case 3:case 4:case 5:break;default:V=3}var tt=w;w=V;try{return ot()}finally{w=tt}},s.unstable_scheduleCallback=function(V,ot,tt){var yt=s.unstable_now();switch(typeof tt=="object"&&tt!==null?(tt=tt.delay,tt=typeof tt=="number"&&0<tt?yt+tt:yt):tt=yt,V){case 1:var Mt=-1;break;case 2:Mt=250;break;case 5:Mt=1073741823;break;case 4:Mt=1e4;break;default:Mt=5e3}return Mt=tt+Mt,V={id:x++,callback:ot,priorityLevel:V,startTime:tt,expirationTime:Mt,sortIndex:-1},tt>yt?(V.sortIndex=tt,t(y,V),e(p)===null&&V===e(y)&&(D?(L(k),k=-1):D=!0,zt($,tt-yt))):(V.sortIndex=Mt,t(p,V),M||T||(M=!0,Y||(Y=!0,lt()))),V},s.unstable_shouldYield=F,s.unstable_wrapCallback=function(V){var ot=w;return function(){var tt=w;w=ot;try{return V.apply(this,arguments)}finally{w=tt}}}}(WT)),WT}var tM={};/**
|
|
981
|
+
* @license React
|
|
982
|
+
* scheduler.development.js
|
|
983
|
+
*
|
|
984
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
985
|
+
*
|
|
986
|
+
* This source code is licensed under the MIT license found in the
|
|
987
|
+
* LICENSE file in the root directory of this source tree.
|
|
988
|
+
*/var fj;function jK(){return fj||(fj=1,function(s){process.env.NODE_ENV!=="production"&&function(){function t(){if($=!1,J){var V=s.unstable_now();lt=V;var ot=!0;try{t:{_=!1,U&&(U=!1,k(F),F=-1),L=!0;var tt=N;try{e:{for(f(V),R=n(T);R!==null&&!(R.expirationTime>V&&p());){var yt=R.callback;if(typeof yt=="function"){R.callback=null,N=R.priorityLevel;var Mt=yt(R.expirationTime<=V);if(V=s.unstable_now(),typeof Mt=="function"){R.callback=Mt,f(V),ot=!0;break e}R===n(T)&&r(T),f(V)}else r(T);R=n(T)}if(R!==null)ot=!0;else{var nt=n(M);nt!==null&&y(h,nt.startTime-V),ot=!1}}break t}finally{R=null,N=tt,L=!1}ot=void 0}}finally{ot?vt():J=!1}}}function e(V,ot){var tt=V.length;V.push(ot);t:for(;0<tt;){var yt=tt-1>>>1,Mt=V[yt];if(0<l(Mt,ot))V[yt]=ot,V[tt]=Mt,tt=yt;else break t}}function n(V){return V.length===0?null:V[0]}function r(V){if(V.length===0)return null;var ot=V[0],tt=V.pop();if(tt!==ot){V[0]=tt;t:for(var yt=0,Mt=V.length,nt=Mt>>>1;yt<nt;){var St=2*(yt+1)-1,Tt=V[St],Et=St+1,Ht=V[Et];if(0>l(Tt,tt))Et<Mt&&0>l(Ht,Tt)?(V[yt]=Ht,V[Et]=tt,yt=Et):(V[yt]=Tt,V[St]=tt,yt=St);else if(Et<Mt&&0>l(Ht,tt))V[yt]=Ht,V[Et]=tt,yt=Et;else break t}}return ot}function l(V,ot){var tt=V.sortIndex-ot.sortIndex;return tt!==0?tt:V.id-ot.id}function f(V){for(var ot=n(M);ot!==null;){if(ot.callback===null)r(M);else if(ot.startTime<=V)r(M),ot.sortIndex=ot.expirationTime,e(T,ot);else break;ot=n(M)}}function h(V){if(U=!1,f(V),!_)if(n(T)!==null)_=!0,J||(J=!0,vt());else{var ot=n(M);ot!==null&&y(h,ot.startTime-V)}}function p(){return $?!0:!(s.unstable_now()-lt<ct)}function y(V,ot){F=Y(function(){V(s.unstable_now())},ot)}if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error()),s.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var x=performance;s.unstable_now=function(){return x.now()}}else{var S=Date,w=S.now();s.unstable_now=function(){return S.now()-w}}var T=[],M=[],D=1,R=null,N=3,L=!1,_=!1,U=!1,$=!1,Y=typeof setTimeout=="function"?setTimeout:null,k=typeof clearTimeout=="function"?clearTimeout:null,H=typeof setImmediate<"u"?setImmediate:null,J=!1,F=-1,ct=5,lt=-1;if(typeof H=="function")var vt=function(){H(t)};else if(typeof MessageChannel<"u"){var Ot=new MessageChannel,zt=Ot.port2;Ot.port1.onmessage=t,vt=function(){zt.postMessage(null)}}else vt=function(){Y(t,0)};s.unstable_IdlePriority=5,s.unstable_ImmediatePriority=1,s.unstable_LowPriority=4,s.unstable_NormalPriority=3,s.unstable_Profiling=null,s.unstable_UserBlockingPriority=2,s.unstable_cancelCallback=function(V){V.callback=null},s.unstable_forceFrameRate=function(V){0>V||125<V?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ct=0<V?Math.floor(1e3/V):5},s.unstable_getCurrentPriorityLevel=function(){return N},s.unstable_next=function(V){switch(N){case 1:case 2:case 3:var ot=3;break;default:ot=N}var tt=N;N=ot;try{return V()}finally{N=tt}},s.unstable_requestPaint=function(){$=!0},s.unstable_runWithPriority=function(V,ot){switch(V){case 1:case 2:case 3:case 4:case 5:break;default:V=3}var tt=N;N=V;try{return ot()}finally{N=tt}},s.unstable_scheduleCallback=function(V,ot,tt){var yt=s.unstable_now();switch(typeof tt=="object"&&tt!==null?(tt=tt.delay,tt=typeof tt=="number"&&0<tt?yt+tt:yt):tt=yt,V){case 1:var Mt=-1;break;case 2:Mt=250;break;case 5:Mt=1073741823;break;case 4:Mt=1e4;break;default:Mt=5e3}return Mt=tt+Mt,V={id:D++,callback:ot,priorityLevel:V,startTime:tt,expirationTime:Mt,sortIndex:-1},tt>yt?(V.sortIndex=tt,e(M,V),n(T)===null&&V===n(M)&&(U?(k(F),F=-1):U=!0,y(h,tt-yt))):(V.sortIndex=Mt,e(T,V),_||L||(_=!0,J||(J=!0,vt()))),V},s.unstable_shouldYield=p,s.unstable_wrapCallback=function(V){var ot=N;return function(){var tt=N;N=ot;try{return V.apply(this,arguments)}finally{N=tt}}},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()}(tM)),tM}var hj;function dj(){return hj||(hj=1,process.env.NODE_ENV==="production"?PS.exports=LK():PS.exports=jK()),PS.exports}/**
|
|
989
|
+
* @license React
|
|
990
|
+
* react-dom-client.production.js
|
|
991
|
+
*
|
|
992
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
993
|
+
*
|
|
994
|
+
* This source code is licensed under the MIT license found in the
|
|
995
|
+
* LICENSE file in the root directory of this source tree.
|
|
996
|
+
*/var gj;function _K(){if(gj)return Fb;gj=1;var s=dj(),t=Yt,e=Jx;function n(a){var u="https://react.dev/errors/"+a;if(1<arguments.length){u+="?args[]="+encodeURIComponent(arguments[1]);for(var d=2;d<arguments.length;d++)u+="&args[]="+encodeURIComponent(arguments[d])}return"Minified React error #"+a+"; visit "+u+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(a){return!(!a||a.nodeType!==1&&a.nodeType!==9&&a.nodeType!==11)}function l(a){var u=a,d=a;if(a.alternate)for(;u.return;)u=u.return;else{a=u;do u=a,u.flags&4098&&(d=u.return),a=u.return;while(a)}return u.tag===3?d:null}function f(a){if(a.tag===13){var u=a.memoizedState;if(u===null&&(a=a.alternate,a!==null&&(u=a.memoizedState)),u!==null)return u.dehydrated}return null}function h(a){if(a.tag===31){var u=a.memoizedState;if(u===null&&(a=a.alternate,a!==null&&(u=a.memoizedState)),u!==null)return u.dehydrated}return null}function p(a){if(l(a)!==a)throw Error(n(188))}function y(a){var u=a.alternate;if(!u){if(u=l(a),u===null)throw Error(n(188));return u!==a?null:a}for(var d=a,m=u;;){var C=d.return;if(C===null)break;var E=C.alternate;if(E===null){if(m=C.return,m!==null){d=m;continue}break}if(C.child===E.child){for(E=C.child;E;){if(E===d)return p(C),a;if(E===m)return p(C),u;E=E.sibling}throw Error(n(188))}if(d.return!==m.return)d=C,m=E;else{for(var z=!1,P=C.child;P;){if(P===d){z=!0,d=C,m=E;break}if(P===m){z=!0,m=C,d=E;break}P=P.sibling}if(!z){for(P=E.child;P;){if(P===d){z=!0,d=E,m=C;break}if(P===m){z=!0,m=E,d=C;break}P=P.sibling}if(!z)throw Error(n(189))}}if(d.alternate!==m)throw Error(n(190))}if(d.tag!==3)throw Error(n(188));return d.stateNode.current===d?a:u}function x(a){var u=a.tag;if(u===5||u===26||u===27||u===6)return a;for(a=a.child;a!==null;){if(u=x(a),u!==null)return u;a=a.sibling}return null}var S=Object.assign,w=Symbol.for("react.element"),T=Symbol.for("react.transitional.element"),M=Symbol.for("react.portal"),D=Symbol.for("react.fragment"),R=Symbol.for("react.strict_mode"),N=Symbol.for("react.profiler"),L=Symbol.for("react.consumer"),_=Symbol.for("react.context"),U=Symbol.for("react.forward_ref"),$=Symbol.for("react.suspense"),Y=Symbol.for("react.suspense_list"),k=Symbol.for("react.memo"),H=Symbol.for("react.lazy"),J=Symbol.for("react.activity"),F=Symbol.for("react.memo_cache_sentinel"),ct=Symbol.iterator;function lt(a){return a===null||typeof a!="object"?null:(a=ct&&a[ct]||a["@@iterator"],typeof a=="function"?a:null)}var vt=Symbol.for("react.client.reference");function Ot(a){if(a==null)return null;if(typeof a=="function")return a.$$typeof===vt?null:a.displayName||a.name||null;if(typeof a=="string")return a;switch(a){case D:return"Fragment";case N:return"Profiler";case R:return"StrictMode";case $:return"Suspense";case Y:return"SuspenseList";case J:return"Activity"}if(typeof a=="object")switch(a.$$typeof){case M:return"Portal";case _:return a.displayName||"Context";case L:return(a._context.displayName||"Context")+".Consumer";case U:var u=a.render;return a=a.displayName,a||(a=u.displayName||u.name||"",a=a!==""?"ForwardRef("+a+")":"ForwardRef"),a;case k:return u=a.displayName||null,u!==null?u:Ot(a.type)||"Memo";case H:u=a._payload,a=a._init;try{return Ot(a(u))}catch{}}return null}var zt=Array.isArray,V=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ot=e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,tt={pending:!1,data:null,method:null,action:null},yt=[],Mt=-1;function nt(a){return{current:a}}function St(a){0>Mt||(a.current=yt[Mt],yt[Mt]=null,Mt--)}function Tt(a,u){Mt++,yt[Mt]=a.current,a.current=u}var Et=nt(null),Ht=nt(null),ce=nt(null),Rt=nt(null);function ue(a,u){switch(Tt(ce,u),Tt(Ht,a),Tt(Et,null),u.nodeType){case 9:case 11:a=(a=u.documentElement)&&(a=a.namespaceURI)?tC(a):0;break;default:if(a=u.tagName,u=u.namespaceURI)u=tC(u),a=Xv(u,a);else switch(a){case"svg":a=1;break;case"math":a=2;break;default:a=0}}St(Et),Tt(Et,a)}function fe(){St(Et),St(Ht),St(ce)}function Be(a){a.memoizedState!==null&&Tt(Rt,a);var u=Et.current,d=Xv(u,a.type);u!==d&&(Tt(Ht,a),Tt(Et,d))}function Lt(a){Ht.current===a&&(St(Et),St(Ht)),Rt.current===a&&(St(Rt),ng._currentValue=tt)}var Xi,Co;function Os(a){if(Xi===void 0)try{throw Error()}catch(d){var u=d.stack.trim().match(/\n( *(at )?)/);Xi=u&&u[1]||"",Co=-1<d.stack.indexOf(`
|
|
997
|
+
at`)?" (<anonymous>)":-1<d.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
998
|
+
`+Xi+a+Co}var ma=!1;function qe(a,u){if(!a||ma)return"";ma=!0;var d=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var m={DetermineComponentFrameRoot:function(){try{if(u){var Ct=function(){throw Error()};if(Object.defineProperty(Ct.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Ct,[])}catch(mt){var ft=mt}Reflect.construct(a,[],Ct)}else{try{Ct.call()}catch(mt){ft=mt}a.call(Ct.prototype)}}else{try{throw Error()}catch(mt){ft=mt}(Ct=a())&&typeof Ct.catch=="function"&&Ct.catch(function(){})}}catch(mt){if(mt&&ft&&typeof mt.stack=="string")return[mt.stack,ft.stack]}return[null,null]}};m.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var C=Object.getOwnPropertyDescriptor(m.DetermineComponentFrameRoot,"name");C&&C.configurable&&Object.defineProperty(m.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var E=m.DetermineComponentFrameRoot(),z=E[0],P=E[1];if(z&&P){var Q=z.split(`
|
|
999
|
+
`),ut=P.split(`
|
|
1000
|
+
`);for(C=m=0;m<Q.length&&!Q[m].includes("DetermineComponentFrameRoot");)m++;for(;C<ut.length&&!ut[C].includes("DetermineComponentFrameRoot");)C++;if(m===Q.length||C===ut.length)for(m=Q.length-1,C=ut.length-1;1<=m&&0<=C&&Q[m]!==ut[C];)C--;for(;1<=m&&0<=C;m--,C--)if(Q[m]!==ut[C]){if(m!==1||C!==1)do if(m--,C--,0>C||Q[m]!==ut[C]){var bt=`
|
|
1001
|
+
`+Q[m].replace(" at new "," at ");return a.displayName&&bt.includes("<anonymous>")&&(bt=bt.replace("<anonymous>",a.displayName)),bt}while(1<=m&&0<=C);break}}}finally{ma=!1,Error.prepareStackTrace=d}return(d=a?a.displayName||a.name:"")?Os(d):""}function Gh(a,u){switch(a.tag){case 26:case 27:case 5:return Os(a.type);case 16:return Os("Lazy");case 13:return a.child!==u&&u!==null?Os("Suspense Fallback"):Os("Suspense");case 19:return Os("SuspenseList");case 0:case 15:return qe(a.type,!1);case 11:return qe(a.type.render,!1);case 1:return qe(a.type,!0);case 31:return Os("Activity");default:return""}}function Vu(a){try{var u="",d=null;do u+=Gh(a,d),d=a,a=a.return;while(a);return u}catch(m){return`
|
|
1002
|
+
Error generating stack: `+m.message+`
|
|
1003
|
+
`+m.stack}}var rl=Object.prototype.hasOwnProperty,sn=s.unstable_scheduleCallback,Wb=s.unstable_cancelCallback,uc=s.unstable_shouldYield,vp=s.unstable_requestPaint,Si=s.unstable_now,sM=s.unstable_getCurrentPriorityLevel,xp=s.unstable_ImmediatePriority,Sp=s.unstable_UserBlockingPriority,al=s.unstable_NormalPriority,oM=s.unstable_LowPriority,t0=s.unstable_IdlePriority,US=s.log,HS=s.unstable_setDisableYieldValue,fc=null,ds=null;function ya(a){if(typeof US=="function"&&HS(a),ds&&typeof ds.setStrictMode=="function")try{ds.setStrictMode(fc,a)}catch{}}var Ii=Math.clz32?Math.clz32:e0,kS=Math.log,VS=Math.LN2;function e0(a){return a>>>=0,a===0?32:31-(kS(a)/VS|0)|0}var ba=256,Eo=262144,ll=4194304;function eo(a){var u=a&42;if(u!==0)return u;switch(a&-a){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return a&261888;case 262144:case 524288:case 1048576:case 2097152:return a&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return a&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return a}}function jn(a,u,d){var m=a.pendingLanes;if(m===0)return 0;var C=0,E=a.suspendedLanes,z=a.pingedLanes;a=a.warmLanes;var P=m&134217727;return P!==0?(m=P&~E,m!==0?C=eo(m):(z&=P,z!==0?C=eo(z):d||(d=P&~a,d!==0&&(C=eo(d))))):(P=m&~E,P!==0?C=eo(P):z!==0?C=eo(z):d||(d=m&~a,d!==0&&(C=eo(d)))),C===0?0:u!==0&&u!==C&&!(u&E)&&(E=C&-C,d=u&-u,E>=d||E===32&&(d&4194048)!==0)?u:C}function Ao(a,u){return(a.pendingLanes&~(a.suspendedLanes&~a.pingedLanes)&u)===0}function Gu(a,u){switch(a){case 1:case 2:case 4:case 8:case 64:return u+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return u+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function hc(){var a=ll;return ll<<=1,!(ll&62914560)&&(ll=4194304),a}function $h(a){for(var u=[],d=0;31>d;d++)u.push(a);return u}function $u(a,u){a.pendingLanes|=u,u!==268435456&&(a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0)}function wp(a,u,d,m,C,E){var z=a.pendingLanes;a.pendingLanes=d,a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0,a.expiredLanes&=d,a.entangledLanes&=d,a.errorRecoveryDisabledLanes&=d,a.shellSuspendCounter=0;var P=a.entanglements,Q=a.expirationTimes,ut=a.hiddenUpdates;for(d=z&~d;0<d;){var bt=31-Ii(d),Ct=1<<bt;P[bt]=0,Q[bt]=-1;var ft=ut[bt];if(ft!==null)for(ut[bt]=null,bt=0;bt<ft.length;bt++){var mt=ft[bt];mt!==null&&(mt.lane&=-536870913)}d&=~Ct}m!==0&&qh(a,m,0),E!==0&&C===0&&a.tag!==0&&(a.suspendedLanes|=E&~(z&~u))}function qh(a,u,d){a.pendingLanes|=u,a.suspendedLanes&=~u;var m=31-Ii(u);a.entangledLanes|=u,a.entanglements[m]=a.entanglements[m]|1073741824|d&261930}function dr(a,u){var d=a.entangledLanes|=u;for(a=a.entanglements;d;){var m=31-Ii(d),C=1<<m;C&u|a[m]&u&&(a[m]|=u),d&=~C}}function Ds(a,u){var d=u&-u;return d=d&42?1:Cp(d),d&(a.suspendedLanes|u)?0:d}function Cp(a){switch(a){case 2:a=1;break;case 8:a=4;break;case 32:a=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:a=128;break;case 268435456:a=134217728;break;default:a=0}return a}function n0(a){return a&=-a,2<a?8<a?a&134217727?32:268435456:8:2}function Ep(){var a=ot.p;return a!==0?a:(a=window.event,a===void 0?32:ig(a.type))}function i0(a,u){var d=ot.p;try{return ot.p=a,u()}finally{ot.p=d}}var To=Math.random().toString(36).slice(2),Fe="__reactFiber$"+To,Zi="__reactProps$"+To,cl="__reactContainer$"+To,Ap="__reactEvents$"+To,s0="__reactListeners$"+To,GS="__reactHandles$"+To,o0="__reactResources$"+To,gr="__reactMarker$"+To;function Tp(a){delete a[Fe],delete a[Zi],delete a[Ap],delete a[s0],delete a[GS]}function dc(a){var u=a[Fe];if(u)return u;for(var d=a.parentNode;d;){if(u=d[cl]||d[Fe]){if(d=u.alternate,u.child!==null||d!==null&&d.child!==null)for(a=Io(a);a!==null;){if(d=a[Fe])return d;a=Io(a)}return u}a=d,d=a.parentNode}return null}function gc(a){if(a=a[Fe]||a[cl]){var u=a.tag;if(u===5||u===6||u===13||u===31||u===26||u===27||u===3)return a}return null}function qu(a){var u=a.tag;if(u===5||u===26||u===27||u===6)return a.stateNode;throw Error(n(33))}function pc(a){var u=a[o0];return u||(u=a[o0]={hoistableStyles:new Map,hoistableScripts:new Map}),u}function Ye(a){a[gr]=!0}var mc=new Set,ul={};function fl(a,u){pr(a,u),pr(a+"Capture",u)}function pr(a,u){for(ul[a]=u,a=0;a<u.length;a++)mc.add(u[a])}var Mp=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Op={},Yu={};function Xu(a){return rl.call(Yu,a)?!0:rl.call(Op,a)?!1:Mp.test(a)?Yu[a]=!0:(Op[a]=!0,!1)}function Iu(a,u,d){if(Xu(u))if(d===null)a.removeAttribute(u);else{switch(typeof d){case"undefined":case"function":case"symbol":a.removeAttribute(u);return;case"boolean":var m=u.toLowerCase().slice(0,5);if(m!=="data-"&&m!=="aria-"){a.removeAttribute(u);return}}a.setAttribute(u,""+d)}}function Dp(a,u,d){if(d===null)a.removeAttribute(u);else{switch(typeof d){case"undefined":case"function":case"symbol":case"boolean":a.removeAttribute(u);return}a.setAttribute(u,""+d)}}function va(a,u,d,m){if(m===null)a.removeAttribute(d);else{switch(typeof m){case"undefined":case"function":case"symbol":case"boolean":a.removeAttribute(d);return}a.setAttributeNS(u,d,""+m)}}function Rs(a){switch(typeof a){case"bigint":case"boolean":case"number":case"string":case"undefined":return a;case"object":return a;default:return""}}function Rp(a){var u=a.type;return(a=a.nodeName)&&a.toLowerCase()==="input"&&(u==="checkbox"||u==="radio")}function r0(a,u,d){var m=Object.getOwnPropertyDescriptor(a.constructor.prototype,u);if(!a.hasOwnProperty(u)&&typeof m<"u"&&typeof m.get=="function"&&typeof m.set=="function"){var C=m.get,E=m.set;return Object.defineProperty(a,u,{configurable:!0,get:function(){return C.call(this)},set:function(z){d=""+z,E.call(this,z)}}),Object.defineProperty(a,u,{enumerable:m.enumerable}),{getValue:function(){return d},setValue:function(z){d=""+z},stopTracking:function(){a._valueTracker=null,delete a[u]}}}}function zp(a){if(!a._valueTracker){var u=Rp(a)?"checked":"value";a._valueTracker=r0(a,u,""+a[u])}}function a0(a){if(!a)return!1;var u=a._valueTracker;if(!u)return!0;var d=u.getValue(),m="";return a&&(m=Rp(a)?a.checked?"true":"false":a.value),a=m,a!==d?(u.setValue(a),!0):!1}function Yh(a){if(a=a||(typeof document<"u"?document:void 0),typeof a>"u")return null;try{return a.activeElement||a.body}catch{return a.body}}var rM=/[\n"\\]/g;function zs(a){return a.replace(rM,function(u){return"\\"+u.charCodeAt(0).toString(16)+" "})}function Xh(a,u,d,m,C,E,z,P){a.name="",z!=null&&typeof z!="function"&&typeof z!="symbol"&&typeof z!="boolean"?a.type=z:a.removeAttribute("type"),u!=null?z==="number"?(u===0&&a.value===""||a.value!=u)&&(a.value=""+Rs(u)):a.value!==""+Rs(u)&&(a.value=""+Rs(u)):z!=="submit"&&z!=="reset"||a.removeAttribute("value"),u!=null?yc(a,z,Rs(u)):d!=null?yc(a,z,Rs(d)):m!=null&&a.removeAttribute("value"),C==null&&E!=null&&(a.defaultChecked=!!E),C!=null&&(a.checked=C&&typeof C!="function"&&typeof C!="symbol"),P!=null&&typeof P!="function"&&typeof P!="symbol"&&typeof P!="boolean"?a.name=""+Rs(P):a.removeAttribute("name")}function Ih(a,u,d,m,C,E,z,P){if(E!=null&&typeof E!="function"&&typeof E!="symbol"&&typeof E!="boolean"&&(a.type=E),u!=null||d!=null){if(!(E!=="submit"&&E!=="reset"||u!=null)){zp(a);return}d=d!=null?""+Rs(d):"",u=u!=null?""+Rs(u):d,P||u===a.value||(a.value=u),a.defaultValue=u}m=m??C,m=typeof m!="function"&&typeof m!="symbol"&&!!m,a.checked=P?a.checked:!!m,a.defaultChecked=!!m,z!=null&&typeof z!="function"&&typeof z!="symbol"&&typeof z!="boolean"&&(a.name=z),zp(a)}function yc(a,u,d){u==="number"&&Yh(a.ownerDocument)===a||a.defaultValue===""+d||(a.defaultValue=""+d)}function Zu(a,u,d,m){if(a=a.options,u){u={};for(var C=0;C<d.length;C++)u["$"+d[C]]=!0;for(d=0;d<a.length;d++)C=u.hasOwnProperty("$"+a[d].value),a[d].selected!==C&&(a[d].selected=C),C&&m&&(a[d].defaultSelected=!0)}else{for(d=""+Rs(d),u=null,C=0;C<a.length;C++){if(a[C].value===d){a[C].selected=!0,m&&(a[C].defaultSelected=!0);return}u!==null||a[C].disabled||(u=a[C])}u!==null&&(u.selected=!0)}}function l0(a,u,d){if(u!=null&&(u=""+Rs(u),u!==a.value&&(a.value=u),d==null)){a.defaultValue!==u&&(a.defaultValue=u);return}a.defaultValue=d!=null?""+Rs(d):""}function c0(a,u,d,m){if(u==null){if(m!=null){if(d!=null)throw Error(n(92));if(zt(m)){if(1<m.length)throw Error(n(93));m=m[0]}d=m}d==null&&(d=""),u=d}d=Rs(u),a.defaultValue=d,m=a.textContent,m===d&&m!==""&&m!==null&&(a.value=m),zp(a)}function mr(a,u){if(u){var d=a.firstChild;if(d&&d===a.lastChild&&d.nodeType===3){d.nodeValue=u;return}}a.textContent=u}var $S=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function qS(a,u,d){var m=u.indexOf("--")===0;d==null||typeof d=="boolean"||d===""?m?a.setProperty(u,""):u==="float"?a.cssFloat="":a[u]="":m?a.setProperty(u,d):typeof d!="number"||d===0||$S.has(u)?u==="float"?a.cssFloat=d:a[u]=(""+d).trim():a[u]=d+"px"}function YS(a,u,d){if(u!=null&&typeof u!="object")throw Error(n(62));if(a=a.style,d!=null){for(var m in d)!d.hasOwnProperty(m)||u!=null&&u.hasOwnProperty(m)||(m.indexOf("--")===0?a.setProperty(m,""):m==="float"?a.cssFloat="":a[m]="");for(var C in u)m=u[C],u.hasOwnProperty(C)&&d[C]!==m&&qS(a,C,m)}else for(var E in u)u.hasOwnProperty(E)&&qS(a,E,u[E])}function u0(a){if(a.indexOf("-")===-1)return!1;switch(a){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 aM=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Zh=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function no(a){return Zh.test(""+a)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":a}function Mo(){}var Np=null;function Lp(a){return a=a.target||a.srcElement||window,a.correspondingUseElement&&(a=a.correspondingUseElement),a.nodeType===3?a.parentNode:a}var yr=null,bc=null;function Qh(a){var u=gc(a);if(u&&(a=u.stateNode)){var d=a[Zi]||null;t:switch(a=u.stateNode,u.type){case"input":if(Xh(a,d.value,d.defaultValue,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name),u=d.name,d.type==="radio"&&u!=null){for(d=a;d.parentNode;)d=d.parentNode;for(d=d.querySelectorAll('input[name="'+zs(""+u)+'"][type="radio"]'),u=0;u<d.length;u++){var m=d[u];if(m!==a&&m.form===a.form){var C=m[Zi]||null;if(!C)throw Error(n(90));Xh(m,C.value,C.defaultValue,C.defaultValue,C.checked,C.defaultChecked,C.type,C.name)}}for(u=0;u<d.length;u++)m=d[u],m.form===a.form&&a0(m)}break t;case"textarea":l0(a,d.value,d.defaultValue);break t;case"select":u=d.value,u!=null&&Zu(a,!!d.multiple,u,!1)}}}var Qu=!1;function f0(a,u,d){if(Qu)return a(u,d);Qu=!0;try{var m=a(u);return m}finally{if(Qu=!1,(yr!==null||bc!==null)&&(Nf(),yr&&(u=yr,a=bc,bc=yr=null,Qh(u),a)))for(u=0;u<a.length;u++)Qh(a[u])}}function ii(a,u){var d=a.stateNode;if(d===null)return null;var m=d[Zi]||null;if(m===null)return null;d=m[u];t:switch(u){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(m=!m.disabled)||(a=a.type,m=!(a==="button"||a==="input"||a==="select"||a==="textarea")),a=!m;break t;default:a=!1}if(a)return null;if(d&&typeof d!="function")throw Error(n(231,u,typeof d));return d}var xa=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Fh=!1;if(xa)try{var Fu={};Object.defineProperty(Fu,"passive",{get:function(){Fh=!0}}),window.addEventListener("test",Fu,Fu),window.removeEventListener("test",Fu,Fu)}catch{Fh=!1}var Sa=null,h0=null,jp=null;function d0(){if(jp)return jp;var a,u=h0,d=u.length,m,C="value"in Sa?Sa.value:Sa.textContent,E=C.length;for(a=0;a<d&&u[a]===C[a];a++);var z=d-a;for(m=1;m<=z&&u[d-m]===C[E-m];m++);return jp=C.slice(a,1<m?1-m:void 0)}function _p(a){var u=a.keyCode;return"charCode"in a?(a=a.charCode,a===0&&u===13&&(a=13)):a=u,a===10&&(a=13),32<=a||a===13?a:0}function Jh(){return!0}function XS(){return!1}function wi(a){function u(d,m,C,E,z){this._reactName=d,this._targetInst=C,this.type=m,this.nativeEvent=E,this.target=z,this.currentTarget=null;for(var P in a)a.hasOwnProperty(P)&&(d=a[P],this[P]=d?d(E):E[P]);return this.isDefaultPrevented=(E.defaultPrevented!=null?E.defaultPrevented:E.returnValue===!1)?Jh:XS,this.isPropagationStopped=XS,this}return S(u.prototype,{preventDefault:function(){this.defaultPrevented=!0;var d=this.nativeEvent;d&&(d.preventDefault?d.preventDefault():typeof d.returnValue!="unknown"&&(d.returnValue=!1),this.isDefaultPrevented=Jh)},stopPropagation:function(){var d=this.nativeEvent;d&&(d.stopPropagation?d.stopPropagation():typeof d.cancelBubble!="unknown"&&(d.cancelBubble=!0),this.isPropagationStopped=Jh)},persist:function(){},isPersistent:Jh}),u}var hl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Kh=wi(hl),Ju=S({},hl,{view:0,detail:0}),lM=wi(Ju),g0,p0,Wh,Bp=S({},Ju,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:io,button:0,buttons:0,relatedTarget:function(a){return a.relatedTarget===void 0?a.fromElement===a.srcElement?a.toElement:a.fromElement:a.relatedTarget},movementX:function(a){return"movementX"in a?a.movementX:(a!==Wh&&(Wh&&a.type==="mousemove"?(g0=a.screenX-Wh.screenX,p0=a.screenY-Wh.screenY):p0=g0=0,Wh=a),g0)},movementY:function(a){return"movementY"in a?a.movementY:p0}}),Ku=wi(Bp),IS=S({},Bp,{dataTransfer:0}),ZS=wi(IS),QS=S({},Ju,{relatedTarget:0}),Pp=wi(QS),m0=S({},hl,{animationName:0,elapsedTime:0,pseudoElement:0}),FS=wi(m0),vc=S({},hl,{clipboardData:function(a){return"clipboardData"in a?a.clipboardData:window.clipboardData}}),xc=wi(vc),Oo=S({},hl,{data:0}),JS=wi(Oo),y0={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},br={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"},KS={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Do(a){var u=this.nativeEvent;return u.getModifierState?u.getModifierState(a):(a=KS[a])?!!u[a]:!1}function io(){return Do}var Up=S({},Ju,{key:function(a){if(a.key){var u=y0[a.key]||a.key;if(u!=="Unidentified")return u}return a.type==="keypress"?(a=_p(a),a===13?"Enter":String.fromCharCode(a)):a.type==="keydown"||a.type==="keyup"?br[a.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:io,charCode:function(a){return a.type==="keypress"?_p(a):0},keyCode:function(a){return a.type==="keydown"||a.type==="keyup"?a.keyCode:0},which:function(a){return a.type==="keypress"?_p(a):a.type==="keydown"||a.type==="keyup"?a.keyCode:0}}),Hp=wi(Up),b0=S({},Bp,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ro=wi(b0),cM=S({},Ju,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:io}),WS=wi(cM),tw=S({},hl,{propertyName:0,elapsedTime:0,pseudoElement:0}),uM=wi(tw),v0=S({},Bp,{deltaX:function(a){return"deltaX"in a?a.deltaX:"wheelDeltaX"in a?-a.wheelDeltaX:0},deltaY:function(a){return"deltaY"in a?a.deltaY:"wheelDeltaY"in a?-a.wheelDeltaY:"wheelDelta"in a?-a.wheelDelta:0},deltaZ:0,deltaMode:0}),fM=wi(v0),ew=S({},hl,{newState:0,oldState:0}),x0=wi(ew),kp=[9,13,27,32],Wu=xa&&"CompositionEvent"in window,Sc=null;xa&&"documentMode"in document&&(Sc=document.documentMode);var ji=xa&&"TextEvent"in window&&!Sc,S0=xa&&(!Wu||Sc&&8<Sc&&11>=Sc),td=" ",dl=!1;function Vp(a,u){switch(a){case"keyup":return kp.indexOf(u.keyCode)!==-1;case"keydown":return u.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function w0(a){return a=a.detail,typeof a=="object"&&"data"in a?a.data:null}var wc=!1;function nw(a,u){switch(a){case"compositionend":return w0(u);case"keypress":return u.which!==32?null:(dl=!0,td);case"textInput":return a=u.data,a===td&&dl?null:a;default:return null}}function hM(a,u){if(wc)return a==="compositionend"||!Wu&&Vp(a,u)?(a=d0(),jp=h0=Sa=null,wc=!1,a):null;switch(a){case"paste":return null;case"keypress":if(!(u.ctrlKey||u.altKey||u.metaKey)||u.ctrlKey&&u.altKey){if(u.char&&1<u.char.length)return u.char;if(u.which)return String.fromCharCode(u.which)}return null;case"compositionend":return S0&&u.locale!=="ko"?null:u.data;default:return null}}var C0={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 vr(a){var u=a&&a.nodeName&&a.nodeName.toLowerCase();return u==="input"?!!C0[a.type]:u==="textarea"}function E0(a,u,d,m){yr?bc?bc.push(m):bc=[m]:yr=m,u=Fd(u,"onChange"),0<u.length&&(d=new Kh("onChange","change",null,d,m),a.push({event:d,listeners:u}))}var Cc=null,gl=null;function Ec(a){Jw(a,0)}function tf(a){var u=qu(a);if(a0(u))return a}function A0(a,u){if(a==="change")return u}var Gp=!1;if(xa){var Qi;if(xa){var zo="oninput"in document;if(!zo){var T0=document.createElement("div");T0.setAttribute("oninput","return;"),zo=typeof T0.oninput=="function"}Qi=zo}else Qi=!1;Gp=Qi&&(!document.documentMode||9<document.documentMode)}function $p(){Cc&&(Cc.detachEvent("onpropertychange",qp),gl=Cc=null)}function qp(a){if(a.propertyName==="value"&&tf(gl)){var u=[];E0(u,gl,a,Lp(a)),f0(Ec,u)}}function iw(a,u,d){a==="focusin"?($p(),Cc=u,gl=d,Cc.attachEvent("onpropertychange",qp)):a==="focusout"&&$p()}function sw(a){if(a==="selectionchange"||a==="keyup"||a==="keydown")return tf(gl)}function pl(a,u){if(a==="click")return tf(u)}function Ac(a,u){if(a==="input"||a==="change")return tf(u)}function ow(a,u){return a===u&&(a!==0||1/a===1/u)||a!==a&&u!==u}var _i=typeof Object.is=="function"?Object.is:ow;function so(a,u){if(_i(a,u))return!0;if(typeof a!="object"||a===null||typeof u!="object"||u===null)return!1;var d=Object.keys(a),m=Object.keys(u);if(d.length!==m.length)return!1;for(m=0;m<d.length;m++){var C=d[m];if(!rl.call(u,C)||!_i(a[C],u[C]))return!1}return!0}function M0(a){for(;a&&a.firstChild;)a=a.firstChild;return a}function O0(a,u){var d=M0(a);a=0;for(var m;d;){if(d.nodeType===3){if(m=a+d.textContent.length,a<=u&&m>=u)return{node:d,offset:u-a};a=m}t:{for(;d;){if(d.nextSibling){d=d.nextSibling;break t}d=d.parentNode}d=void 0}d=M0(d)}}function Tc(a,u){return a&&u?a===u?!0:a&&a.nodeType===3?!1:u&&u.nodeType===3?Tc(a,u.parentNode):"contains"in a?a.contains(u):a.compareDocumentPosition?!!(a.compareDocumentPosition(u)&16):!1:!1}function ml(a){a=a!=null&&a.ownerDocument!=null&&a.ownerDocument.defaultView!=null?a.ownerDocument.defaultView:window;for(var u=Yh(a.document);u instanceof a.HTMLIFrameElement;){try{var d=typeof u.contentWindow.location.href=="string"}catch{d=!1}if(d)a=u.contentWindow;else break;u=Yh(a.document)}return u}function ed(a){var u=a&&a.nodeName&&a.nodeName.toLowerCase();return u&&(u==="input"&&(a.type==="text"||a.type==="search"||a.type==="tel"||a.type==="url"||a.type==="password")||u==="textarea"||a.contentEditable==="true")}var nd=xa&&"documentMode"in document&&11>=document.documentMode,yl=null,ef=null,oo=null,No=!1;function Yp(a,u,d){var m=d.window===d?d.document:d.nodeType===9?d:d.ownerDocument;No||yl==null||yl!==Yh(m)||(m=yl,"selectionStart"in m&&ed(m)?m={start:m.selectionStart,end:m.selectionEnd}:(m=(m.ownerDocument&&m.ownerDocument.defaultView||window).getSelection(),m={anchorNode:m.anchorNode,anchorOffset:m.anchorOffset,focusNode:m.focusNode,focusOffset:m.focusOffset}),oo&&so(oo,m)||(oo=m,m=Fd(ef,"onSelect"),0<m.length&&(u=new Kh("onSelect","select",null,u,d),a.push({event:u,listeners:m}),u.target=yl)))}function wa(a,u){var d={};return d[a.toLowerCase()]=u.toLowerCase(),d["Webkit"+a]="webkit"+u,d["Moz"+a]="moz"+u,d}var Lo={animationend:wa("Animation","AnimationEnd"),animationiteration:wa("Animation","AnimationIteration"),animationstart:wa("Animation","AnimationStart"),transitionrun:wa("Transition","TransitionRun"),transitionstart:wa("Transition","TransitionStart"),transitioncancel:wa("Transition","TransitionCancel"),transitionend:wa("Transition","TransitionEnd")},nf={},bl={};xa&&(bl=document.createElement("div").style,"AnimationEvent"in window||(delete Lo.animationend.animation,delete Lo.animationiteration.animation,delete Lo.animationstart.animation),"TransitionEvent"in window||delete Lo.transitionend.transition);function ke(a){if(nf[a])return nf[a];if(!Lo[a])return a;var u=Lo[a],d;for(d in u)if(u.hasOwnProperty(d)&&d in bl)return nf[a]=u[d];return a}var id=ke("animationend"),D0=ke("animationiteration"),Xp=ke("animationstart"),Mc=ke("transitionrun"),sd=ke("transitionstart"),xr=ke("transitioncancel"),rw=ke("transitionend"),Sr=new Map,sf="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");sf.push("scrollEnd");function Fi(a,u){Sr.set(a,u),fl(u,[a])}var Oc=typeof reportError=="function"?reportError:function(a){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var u=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof a=="object"&&a!==null&&typeof a.message=="string"?String(a.message):String(a),error:a});if(!window.dispatchEvent(u))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",a);return}console.error(a)},gn=[],si=0,ro=0;function Ns(){for(var a=si,u=ro=si=0;u<a;){var d=gn[u];gn[u++]=null;var m=gn[u];gn[u++]=null;var C=gn[u];gn[u++]=null;var E=gn[u];if(gn[u++]=null,m!==null&&C!==null){var z=m.pending;z===null?C.next=C:(C.next=z.next,z.next=C),m.pending=C}E!==0&&Ip(d,C,E)}}function Ls(a,u,d,m){gn[si++]=a,gn[si++]=u,gn[si++]=d,gn[si++]=m,ro|=m,a.lanes|=m,a=a.alternate,a!==null&&(a.lanes|=m)}function ao(a,u,d,m){return Ls(a,u,d,m),od(a)}function Ca(a,u){return Ls(a,null,null,u),od(a)}function Ip(a,u,d){a.lanes|=d;var m=a.alternate;m!==null&&(m.lanes|=d);for(var C=!1,E=a.return;E!==null;)E.childLanes|=d,m=E.alternate,m!==null&&(m.childLanes|=d),E.tag===22&&(a=E.stateNode,a===null||a._visibility&1||(C=!0)),a=E,E=E.return;return a.tag===3?(E=a.stateNode,C&&u!==null&&(C=31-Ii(d),a=E.hiddenUpdates,m=a[C],m===null?a[C]=[u]:m.push(u),u.lane=d|536870912),E):null}function od(a){if(50<zf)throw zf=0,Vd=null,Error(n(185));for(var u=a.return;u!==null;)a=u,u=a.return;return a.tag===3?a.stateNode:null}var Ji={};function aw(a,u,d,m){this.tag=a,this.key=d,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=u,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=m,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Dn(a,u,d,m){return new aw(a,u,d,m)}function Dc(a){return a=a.prototype,!(!a||!a.isReactComponent)}function Ea(a,u){var d=a.alternate;return d===null?(d=Dn(a.tag,u,a.key,a.mode),d.elementType=a.elementType,d.type=a.type,d.stateNode=a.stateNode,d.alternate=a,a.alternate=d):(d.pendingProps=u,d.type=a.type,d.flags=0,d.subtreeFlags=0,d.deletions=null),d.flags=a.flags&65011712,d.childLanes=a.childLanes,d.lanes=a.lanes,d.child=a.child,d.memoizedProps=a.memoizedProps,d.memoizedState=a.memoizedState,d.updateQueue=a.updateQueue,u=a.dependencies,d.dependencies=u===null?null:{lanes:u.lanes,firstContext:u.firstContext},d.sibling=a.sibling,d.index=a.index,d.ref=a.ref,d.refCleanup=a.refCleanup,d}function R0(a,u){a.flags&=65011714;var d=a.alternate;return d===null?(a.childLanes=0,a.lanes=u,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=d.childLanes,a.lanes=d.lanes,a.child=d.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=d.memoizedProps,a.memoizedState=d.memoizedState,a.updateQueue=d.updateQueue,a.type=d.type,u=d.dependencies,a.dependencies=u===null?null:{lanes:u.lanes,firstContext:u.firstContext}),a}function Zp(a,u,d,m,C,E){var z=0;if(m=a,typeof a=="function")Dc(a)&&(z=1);else if(typeof a=="string")z=Wv(a,d,Et.current)?26:a==="html"||a==="head"||a==="body"?27:5;else t:switch(a){case J:return a=Dn(31,d,u,C),a.elementType=J,a.lanes=E,a;case D:return Aa(d.children,C,E,u);case R:z=8,C|=24;break;case N:return a=Dn(12,d,u,C|2),a.elementType=N,a.lanes=E,a;case $:return a=Dn(13,d,u,C),a.elementType=$,a.lanes=E,a;case Y:return a=Dn(19,d,u,C),a.elementType=Y,a.lanes=E,a;default:if(typeof a=="object"&&a!==null)switch(a.$$typeof){case _:z=10;break t;case L:z=9;break t;case U:z=11;break t;case k:z=14;break t;case H:z=16,m=null;break t}z=29,d=Error(n(130,a===null?"null":typeof a,"")),m=null}return u=Dn(z,d,u,C),u.elementType=a,u.type=m,u.lanes=E,u}function Aa(a,u,d,m){return a=Dn(7,a,m,u),a.lanes=d,a}function of(a,u,d){return a=Dn(6,a,null,u),a.lanes=d,a}function z0(a){var u=Dn(18,null,null,0);return u.stateNode=a,u}function Qp(a,u,d){return u=Dn(4,a.children!==null?a.children:[],a.key,u),u.lanes=d,u.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation},u}var N0=new WeakMap;function js(a,u){if(typeof a=="object"&&a!==null){var d=N0.get(a);return d!==void 0?d:(u={value:a,source:u,stack:Vu(u)},N0.set(a,u),u)}return{value:a,source:u,stack:Vu(u)}}var _s=[],Rc=0,rd=null,_n=0,gs=[],Ki=0,jo=null,ps=1,_o="";function lo(a,u){_s[Rc++]=_n,_s[Rc++]=rd,rd=a,_n=u}function L0(a,u,d){gs[Ki++]=ps,gs[Ki++]=_o,gs[Ki++]=jo,jo=a;var m=ps;a=_o;var C=32-Ii(m)-1;m&=~(1<<C),d+=1;var E=32-Ii(u)+C;if(30<E){var z=C-C%5;E=(m&(1<<z)-1).toString(32),m>>=z,C-=z,ps=1<<32-Ii(u)+C|d<<C|m,_o=E+a}else ps=1<<E|d<<C|m,_o=a}function rf(a){a.return!==null&&(lo(a,1),L0(a,1,0))}function Fp(a){for(;a===rd;)rd=_s[--Rc],_s[Rc]=null,_n=_s[--Rc],_s[Rc]=null;for(;a===jo;)jo=gs[--Ki],gs[Ki]=null,_o=gs[--Ki],gs[Ki]=null,ps=gs[--Ki],gs[Ki]=null}function ad(a,u){gs[Ki++]=ps,gs[Ki++]=_o,gs[Ki++]=jo,ps=u.id,_o=u.overflow,jo=a}var oi=null,on=null,Ee=!1,wr=null,Zn=!1,Cr=Error(n(519));function co(a){var u=Error(n(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw lf(js(u,a)),Cr}function ld(a){var u=a.stateNode,d=a.type,m=a.memoizedProps;switch(u[Fe]=a,u[Zi]=m,d){case"dialog":we("cancel",u),we("close",u);break;case"iframe":case"object":case"embed":we("load",u);break;case"video":case"audio":for(d=0;d<Pf.length;d++)we(Pf[d],u);break;case"source":we("error",u);break;case"img":case"image":case"link":we("error",u),we("load",u);break;case"details":we("toggle",u);break;case"input":we("invalid",u),Ih(u,m.value,m.defaultValue,m.checked,m.defaultChecked,m.type,m.name,!0);break;case"select":we("invalid",u);break;case"textarea":we("invalid",u),c0(u,m.value,m.defaultValue,m.children)}d=m.children,typeof d!="string"&&typeof d!="number"&&typeof d!="bigint"||u.textContent===""+d||m.suppressHydrationWarning===!0||Gv(u.textContent,d)?(m.popover!=null&&(we("beforetoggle",u),we("toggle",u)),m.onScroll!=null&&we("scroll",u),m.onScrollEnd!=null&&we("scrollend",u),m.onClick!=null&&(u.onclick=Mo),u=!0):u=!1,u||co(a,!0)}function af(a){for(oi=a.return;oi;)switch(oi.tag){case 5:case 31:case 13:Zn=!1;return;case 27:case 3:Zn=!0;return;default:oi=oi.return}}function Er(a){if(a!==oi)return!1;if(!Ee)return af(a),Ee=!0,!1;var u=a.tag,d;if((d=u!==3&&u!==27)&&((d=u===5)&&(d=a.type,d=!(d!=="form"&&d!=="button")||Hf(a.type,a.memoizedProps)),d=!d),d&&on&&co(a),af(a),u===13){if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(n(317));on=Wm(a)}else if(u===31){if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(n(317));on=Wm(a)}else u===27?(u=on,Xo(a.type)?(a=Wd,Wd=null,on=a):on=u):on=oi?ls(a.stateNode.nextSibling):null;return!0}function vl(){on=oi=null,Ee=!1}function j0(){var a=wr;return a!==null&&(An===null?An=a:An.push.apply(An,a),wr=null),a}function lf(a){wr===null?wr=[a]:wr.push(a)}var Jp=nt(null),Ta=null,Bo=null;function Wi(a,u,d){Tt(Jp,u._currentValue),u._currentValue=d}function Po(a){a._currentValue=Jp.current,St(Jp)}function Kp(a,u,d){for(;a!==null;){var m=a.alternate;if((a.childLanes&u)!==u?(a.childLanes|=u,m!==null&&(m.childLanes|=u)):m!==null&&(m.childLanes&u)!==u&&(m.childLanes|=u),a===d)break;a=a.return}}function Ar(a,u,d,m){var C=a.child;for(C!==null&&(C.return=a);C!==null;){var E=C.dependencies;if(E!==null){var z=C.child;E=E.firstContext;t:for(;E!==null;){var P=E;E=C;for(var Q=0;Q<u.length;Q++)if(P.context===u[Q]){E.lanes|=d,P=E.alternate,P!==null&&(P.lanes|=d),Kp(E.return,d,a),m||(z=null);break t}E=P.next}}else if(C.tag===18){if(z=C.return,z===null)throw Error(n(341));z.lanes|=d,E=z.alternate,E!==null&&(E.lanes|=d),Kp(z,d,a),z=null}else z=C.child;if(z!==null)z.return=C;else for(z=C;z!==null;){if(z===a){z=null;break}if(C=z.sibling,C!==null){C.return=z.return,z=C;break}z=z.return}C=z}}function ri(a,u,d,m){a=null;for(var C=u,E=!1;C!==null;){if(!E){if(C.flags&524288)E=!0;else if(C.flags&262144)break}if(C.tag===10){var z=C.alternate;if(z===null)throw Error(n(387));if(z=z.memoizedProps,z!==null){var P=C.type;_i(C.pendingProps.value,z.value)||(a!==null?a.push(P):a=[P])}}else if(C===Rt.current){if(z=C.alternate,z===null)throw Error(n(387));z.memoizedState.memoizedState!==C.memoizedState.memoizedState&&(a!==null?a.push(ng):a=[ng])}C=C.return}a!==null&&Ar(u,a,d,m),u.flags|=262144}function zc(a){for(a=a.firstContext;a!==null;){if(!_i(a.context._currentValue,a.memoizedValue))return!0;a=a.next}return!1}function ne(a){Ta=a,Bo=null,a=a.dependencies,a!==null&&(a.firstContext=null)}function At(a){return cd(Ta,a)}function Ma(a,u){return Ta===null&&ne(a),cd(a,u)}function cd(a,u){var d=u._currentValue;if(u={context:u,memoizedValue:d,next:null},Bo===null){if(a===null)throw Error(n(308));Bo=u,a.dependencies={lanes:0,firstContext:u},a.flags|=524288}else Bo=Bo.next=u;return d}var Rn=typeof AbortController<"u"?AbortController:function(){var a=[],u=this.signal={aborted:!1,addEventListener:function(d,m){a.push(m)}};this.abort=function(){u.aborted=!0,a.forEach(function(d){return d()})}},_0=s.unstable_scheduleCallback,B0=s.unstable_NormalPriority,Bn={$$typeof:_,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ud(){return{controller:new Rn,data:new Map,refCount:0}}function fd(a){a.refCount--,a.refCount===0&&_0(B0,function(){a.controller.abort()})}var Nc=null,hd=0,xl=0,Gn=null;function Xe(a,u){if(Nc===null){var d=Nc=[];hd=0,xl=Ym(),Gn={status:"pending",value:void 0,then:function(m){d.push(m)}}}return hd++,u.then(dd,dd),u}function dd(){if(--hd===0&&Nc!==null){Gn!==null&&(Gn.status="fulfilled");var a=Nc;Nc=null,xl=0,Gn=null;for(var u=0;u<a.length;u++)(0,a[u])()}}function gd(a,u){var d=[],m={status:"pending",value:null,reason:null,then:function(C){d.push(C)}};return a.then(function(){m.status="fulfilled",m.value=u;for(var C=0;C<d.length;C++)(0,d[C])(u)},function(C){for(m.status="rejected",m.reason=C,C=0;C<d.length;C++)(0,d[C])(void 0)}),m}var Oa=V.S;V.S=function(a,u){Dv=Si(),typeof u=="object"&&u!==null&&typeof u.then=="function"&&Xe(a,u),Oa!==null&&Oa(a,u)};var Bs=nt(null);function Ps(){var a=Bs.current;return a!==null?a:Ke.pooledCache}function cf(a,u){u===null?Tt(Bs,Bs.current):Tt(Bs,u.pool)}function Lc(){var a=Ps();return a===null?null:{parent:Bn._currentValue,pool:a}}var Sl=Error(n(460)),jc=Error(n(474)),uf=Error(n(542)),_c={then:function(){}};function P0(a){return a=a.status,a==="fulfilled"||a==="rejected"}function U0(a,u,d){switch(d=a[d],d===void 0?a.push(u):d!==u&&(u.then(Mo,Mo),u=d),u.status){case"fulfilled":return u.value;case"rejected":throw a=u.reason,Wp(a),a;default:if(typeof u.status=="string")u.then(Mo,Mo);else{if(a=Ke,a!==null&&100<a.shellSuspendCounter)throw Error(n(482));a=u,a.status="pending",a.then(function(m){if(u.status==="pending"){var C=u;C.status="fulfilled",C.value=m}},function(m){if(u.status==="pending"){var C=u;C.status="rejected",C.reason=m}})}switch(u.status){case"fulfilled":return u.value;case"rejected":throw a=u.reason,Wp(a),a}throw Cl=u,Sl}}function wl(a){try{var u=a._init;return u(a._payload)}catch(d){throw d!==null&&typeof d=="object"&&typeof d.then=="function"?(Cl=d,Sl):d}}var Cl=null;function H0(){if(Cl===null)throw Error(n(459));var a=Cl;return Cl=null,a}function Wp(a){if(a===Sl||a===uf)throw Error(n(483))}var El=null,Bc=0;function pd(a){var u=Bc;return Bc+=1,El===null&&(El=[]),U0(El,a,u)}function ff(a,u){u=u.props.ref,a.ref=u!==void 0?u:null}function md(a,u){throw u.$$typeof===w?Error(n(525)):(a=Object.prototype.toString.call(u),Error(n(31,a==="[object Object]"?"object with keys {"+Object.keys(u).join(", ")+"}":a)))}function lw(a){function u(rt,it){if(a){var at=rt.deletions;at===null?(rt.deletions=[it],rt.flags|=16):at.push(it)}}function d(rt,it){if(!a)return null;for(;it!==null;)u(rt,it),it=it.sibling;return null}function m(rt){for(var it=new Map;rt!==null;)rt.key!==null?it.set(rt.key,rt):it.set(rt.index,rt),rt=rt.sibling;return it}function C(rt,it){return rt=Ea(rt,it),rt.index=0,rt.sibling=null,rt}function E(rt,it,at){return rt.index=at,a?(at=rt.alternate,at!==null?(at=at.index,at<it?(rt.flags|=67108866,it):at):(rt.flags|=67108866,it)):(rt.flags|=1048576,it)}function z(rt){return a&&rt.alternate===null&&(rt.flags|=67108866),rt}function P(rt,it,at,wt){return it===null||it.tag!==6?(it=of(at,rt.mode,wt),it.return=rt,it):(it=C(it,at),it.return=rt,it)}function Q(rt,it,at,wt){var It=at.type;return It===D?bt(rt,it,at.props.children,wt,at.key):it!==null&&(it.elementType===It||typeof It=="object"&&It!==null&&It.$$typeof===H&&wl(It)===it.type)?(it=C(it,at.props),ff(it,at),it.return=rt,it):(it=Zp(at.type,at.key,at.props,null,rt.mode,wt),ff(it,at),it.return=rt,it)}function ut(rt,it,at,wt){return it===null||it.tag!==4||it.stateNode.containerInfo!==at.containerInfo||it.stateNode.implementation!==at.implementation?(it=Qp(at,rt.mode,wt),it.return=rt,it):(it=C(it,at.children||[]),it.return=rt,it)}function bt(rt,it,at,wt,It){return it===null||it.tag!==7?(it=Aa(at,rt.mode,wt,It),it.return=rt,it):(it=C(it,at),it.return=rt,it)}function Ct(rt,it,at){if(typeof it=="string"&&it!==""||typeof it=="number"||typeof it=="bigint")return it=of(""+it,rt.mode,at),it.return=rt,it;if(typeof it=="object"&&it!==null){switch(it.$$typeof){case T:return at=Zp(it.type,it.key,it.props,null,rt.mode,at),ff(at,it),at.return=rt,at;case M:return it=Qp(it,rt.mode,at),it.return=rt,it;case H:return it=wl(it),Ct(rt,it,at)}if(zt(it)||lt(it))return it=Aa(it,rt.mode,at,null),it.return=rt,it;if(typeof it.then=="function")return Ct(rt,pd(it),at);if(it.$$typeof===_)return Ct(rt,Ma(rt,it),at);md(rt,it)}return null}function ft(rt,it,at,wt){var It=it!==null?it.key:null;if(typeof at=="string"&&at!==""||typeof at=="number"||typeof at=="bigint")return It!==null?null:P(rt,it,""+at,wt);if(typeof at=="object"&&at!==null){switch(at.$$typeof){case T:return at.key===It?Q(rt,it,at,wt):null;case M:return at.key===It?ut(rt,it,at,wt):null;case H:return at=wl(at),ft(rt,it,at,wt)}if(zt(at)||lt(at))return It!==null?null:bt(rt,it,at,wt,null);if(typeof at.then=="function")return ft(rt,it,pd(at),wt);if(at.$$typeof===_)return ft(rt,it,Ma(rt,at),wt);md(rt,at)}return null}function mt(rt,it,at,wt,It){if(typeof wt=="string"&&wt!==""||typeof wt=="number"||typeof wt=="bigint")return rt=rt.get(at)||null,P(it,rt,""+wt,It);if(typeof wt=="object"&&wt!==null){switch(wt.$$typeof){case T:return rt=rt.get(wt.key===null?at:wt.key)||null,Q(it,rt,wt,It);case M:return rt=rt.get(wt.key===null?at:wt.key)||null,ut(it,rt,wt,It);case H:return wt=wl(wt),mt(rt,it,at,wt,It)}if(zt(wt)||lt(wt))return rt=rt.get(at)||null,bt(it,rt,wt,It,null);if(typeof wt.then=="function")return mt(rt,it,at,pd(wt),It);if(wt.$$typeof===_)return mt(rt,it,at,Ma(it,wt),It);md(it,wt)}return null}function Ut(rt,it,at,wt){for(var It=null,je=null,$t=it,oe=it=0,de=null;$t!==null&&oe<at.length;oe++){$t.index>oe?(de=$t,$t=null):de=$t.sibling;var Ue=ft(rt,$t,at[oe],wt);if(Ue===null){$t===null&&($t=de);break}a&&$t&&Ue.alternate===null&&u(rt,$t),it=E(Ue,it,oe),je===null?It=Ue:je.sibling=Ue,je=Ue,$t=de}if(oe===at.length)return d(rt,$t),Ee&&lo(rt,oe),It;if($t===null){for(;oe<at.length;oe++)$t=Ct(rt,at[oe],wt),$t!==null&&(it=E($t,it,oe),je===null?It=$t:je.sibling=$t,je=$t);return Ee&&lo(rt,oe),It}for($t=m($t);oe<at.length;oe++)de=mt($t,rt,oe,at[oe],wt),de!==null&&(a&&de.alternate!==null&&$t.delete(de.key===null?oe:de.key),it=E(de,it,oe),je===null?It=de:je.sibling=de,je=de);return a&&$t.forEach(function(Qo){return u(rt,Qo)}),Ee&&lo(rt,oe),It}function Jt(rt,it,at,wt){if(at==null)throw Error(n(151));for(var It=null,je=null,$t=it,oe=it=0,de=null,Ue=at.next();$t!==null&&!Ue.done;oe++,Ue=at.next()){$t.index>oe?(de=$t,$t=null):de=$t.sibling;var Qo=ft(rt,$t,Ue.value,wt);if(Qo===null){$t===null&&($t=de);break}a&&$t&&Qo.alternate===null&&u(rt,$t),it=E(Qo,it,oe),je===null?It=Qo:je.sibling=Qo,je=Qo,$t=de}if(Ue.done)return d(rt,$t),Ee&&lo(rt,oe),It;if($t===null){for(;!Ue.done;oe++,Ue=at.next())Ue=Ct(rt,Ue.value,wt),Ue!==null&&(it=E(Ue,it,oe),je===null?It=Ue:je.sibling=Ue,je=Ue);return Ee&&lo(rt,oe),It}for($t=m($t);!Ue.done;oe++,Ue=at.next())Ue=mt($t,rt,oe,Ue.value,wt),Ue!==null&&(a&&Ue.alternate!==null&&$t.delete(Ue.key===null?oe:Ue.key),it=E(Ue,it,oe),je===null?It=Ue:je.sibling=Ue,je=Ue);return a&&$t.forEach(function(hC){return u(rt,hC)}),Ee&&lo(rt,oe),It}function tn(rt,it,at,wt){if(typeof at=="object"&&at!==null&&at.type===D&&at.key===null&&(at=at.props.children),typeof at=="object"&&at!==null){switch(at.$$typeof){case T:t:{for(var It=at.key;it!==null;){if(it.key===It){if(It=at.type,It===D){if(it.tag===7){d(rt,it.sibling),wt=C(it,at.props.children),wt.return=rt,rt=wt;break t}}else if(it.elementType===It||typeof It=="object"&&It!==null&&It.$$typeof===H&&wl(It)===it.type){d(rt,it.sibling),wt=C(it,at.props),ff(wt,at),wt.return=rt,rt=wt;break t}d(rt,it);break}else u(rt,it);it=it.sibling}at.type===D?(wt=Aa(at.props.children,rt.mode,wt,at.key),wt.return=rt,rt=wt):(wt=Zp(at.type,at.key,at.props,null,rt.mode,wt),ff(wt,at),wt.return=rt,rt=wt)}return z(rt);case M:t:{for(It=at.key;it!==null;){if(it.key===It)if(it.tag===4&&it.stateNode.containerInfo===at.containerInfo&&it.stateNode.implementation===at.implementation){d(rt,it.sibling),wt=C(it,at.children||[]),wt.return=rt,rt=wt;break t}else{d(rt,it);break}else u(rt,it);it=it.sibling}wt=Qp(at,rt.mode,wt),wt.return=rt,rt=wt}return z(rt);case H:return at=wl(at),tn(rt,it,at,wt)}if(zt(at))return Ut(rt,it,at,wt);if(lt(at)){if(It=lt(at),typeof It!="function")throw Error(n(150));return at=It.call(at),Jt(rt,it,at,wt)}if(typeof at.then=="function")return tn(rt,it,pd(at),wt);if(at.$$typeof===_)return tn(rt,it,Ma(rt,at),wt);md(rt,at)}return typeof at=="string"&&at!==""||typeof at=="number"||typeof at=="bigint"?(at=""+at,it!==null&&it.tag===6?(d(rt,it.sibling),wt=C(it,at),wt.return=rt,rt=wt):(d(rt,it),wt=of(at,rt.mode,wt),wt.return=rt,rt=wt),z(rt)):d(rt,it)}return function(rt,it,at,wt){try{Bc=0;var It=tn(rt,it,at,wt);return El=null,It}catch($t){if($t===Sl||$t===uf)throw $t;var je=Dn(29,$t,null,rt.mode);return je.lanes=wt,je.return=rt,je}finally{}}}var Al=lw(!0),k0=lw(!1),Da=!1;function yd(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function tm(a,u){a=a.updateQueue,u.updateQueue===a&&(u.updateQueue={baseState:a.baseState,firstBaseUpdate:a.firstBaseUpdate,lastBaseUpdate:a.lastBaseUpdate,shared:a.shared,callbacks:null})}function Ra(a){return{lane:a,tag:0,payload:null,callback:null,next:null}}function Us(a,u,d){var m=a.updateQueue;if(m===null)return null;if(m=m.shared,Pe&2){var C=m.pending;return C===null?u.next=u:(u.next=C.next,C.next=u),m.pending=u,u=od(a),Ip(a,null,d),u}return Ls(a,m,u,d),od(a)}function Tl(a,u,d){if(u=u.updateQueue,u!==null&&(u=u.shared,(d&4194048)!==0)){var m=u.lanes;m&=a.pendingLanes,d|=m,u.lanes=d,dr(a,d)}}function em(a,u){var d=a.updateQueue,m=a.alternate;if(m!==null&&(m=m.updateQueue,d===m)){var C=null,E=null;if(d=d.firstBaseUpdate,d!==null){do{var z={lane:d.lane,tag:d.tag,payload:d.payload,callback:null,next:null};E===null?C=E=z:E=E.next=z,d=d.next}while(d!==null);E===null?C=E=u:E=E.next=u}else C=E=u;d={baseState:m.baseState,firstBaseUpdate:C,lastBaseUpdate:E,shared:m.shared,callbacks:m.callbacks},a.updateQueue=d;return}a=d.lastBaseUpdate,a===null?d.firstBaseUpdate=u:a.next=u,d.lastBaseUpdate=u}var V0=!1;function Ml(){if(V0){var a=Gn;if(a!==null)throw a}}function Tr(a,u,d,m){V0=!1;var C=a.updateQueue;Da=!1;var E=C.firstBaseUpdate,z=C.lastBaseUpdate,P=C.shared.pending;if(P!==null){C.shared.pending=null;var Q=P,ut=Q.next;Q.next=null,z===null?E=ut:z.next=ut,z=Q;var bt=a.alternate;bt!==null&&(bt=bt.updateQueue,P=bt.lastBaseUpdate,P!==z&&(P===null?bt.firstBaseUpdate=ut:P.next=ut,bt.lastBaseUpdate=Q))}if(E!==null){var Ct=C.baseState;z=0,bt=ut=Q=null,P=E;do{var ft=P.lane&-536870913,mt=ft!==P.lane;if(mt?(xe&ft)===ft:(m&ft)===ft){ft!==0&&ft===xl&&(V0=!0),bt!==null&&(bt=bt.next={lane:0,tag:P.tag,payload:P.payload,callback:null,next:null});t:{var Ut=a,Jt=P;ft=u;var tn=d;switch(Jt.tag){case 1:if(Ut=Jt.payload,typeof Ut=="function"){Ct=Ut.call(tn,Ct,ft);break t}Ct=Ut;break t;case 3:Ut.flags=Ut.flags&-65537|128;case 0:if(Ut=Jt.payload,ft=typeof Ut=="function"?Ut.call(tn,Ct,ft):Ut,ft==null)break t;Ct=S({},Ct,ft);break t;case 2:Da=!0}}ft=P.callback,ft!==null&&(a.flags|=64,mt&&(a.flags|=8192),mt=C.callbacks,mt===null?C.callbacks=[ft]:mt.push(ft))}else mt={lane:ft,tag:P.tag,payload:P.payload,callback:P.callback,next:null},bt===null?(ut=bt=mt,Q=Ct):bt=bt.next=mt,z|=ft;if(P=P.next,P===null){if(P=C.shared.pending,P===null)break;mt=P,P=mt.next,mt.next=null,C.lastBaseUpdate=mt,C.shared.pending=null}}while(!0);bt===null&&(Q=Ct),C.baseState=Q,C.firstBaseUpdate=ut,C.lastBaseUpdate=bt,E===null&&(C.shared.lanes=0),qo|=z,a.lanes=z,a.memoizedState=Ct}}function nm(a,u){if(typeof a!="function")throw Error(n(191,a));a.call(u)}function Ol(a,u){var d=a.callbacks;if(d!==null)for(a.callbacks=null,a=0;a<d.length;a++)nm(d[a],u)}var Qn=nt(null),Pc=nt(0);function cw(a,u){a=$o,Tt(Pc,a),Tt(Qn,u),$o=a|u.baseLanes}function bd(){Tt(Pc,$o),Tt(Qn,Qn.current)}function hf(){$o=Pc.current,St(Qn),St(Pc)}var ts=nt(null),Hs=null;function Mr(a){var u=a.alternate;Tt(pn,pn.current&1),Tt(ts,a),Hs===null&&(u===null||Qn.current!==null||u.memoizedState!==null)&&(Hs=a)}function df(a){Tt(pn,pn.current),Tt(ts,a),Hs===null&&(Hs=a)}function im(a){a.tag===22?(Tt(pn,pn.current),Tt(ts,a),Hs===null&&(Hs=a)):Uo()}function Uo(){Tt(pn,pn.current),Tt(ts,ts.current)}function es(a){St(ts),Hs===a&&(Hs=null),St(pn)}var pn=nt(0);function gf(a){for(var u=a;u!==null;){if(u.tag===13){var d=u.memoizedState;if(d!==null&&(d=d.dehydrated,d===null||go(d)||kl(d)))return u}else if(u.tag===19&&(u.memoizedProps.revealOrder==="forwards"||u.memoizedProps.revealOrder==="backwards"||u.memoizedProps.revealOrder==="unstable_legacy-backwards"||u.memoizedProps.revealOrder==="together")){if(u.flags&128)return u}else if(u.child!==null){u.child.return=u,u=u.child;continue}if(u===a)break;for(;u.sibling===null;){if(u.return===null||u.return===a)return null;u=u.return}u.sibling.return=u.return,u=u.sibling}return null}var Or=0,ae=null,Ie=null,Pn=null,Uc=!1,Hc=!1,za=!1,vd=0,pf=0,Dl=null,uw=0;function Cn(){throw Error(n(321))}function Na(a,u){if(u===null)return!1;for(var d=0;d<u.length&&d<a.length;d++)if(!_i(a[d],u[d]))return!1;return!0}function xd(a,u,d,m,C,E){return Or=E,ae=u,u.memoizedState=null,u.updateQueue=null,u.lanes=0,V.H=a===null||a.memoizedState===null?bw:xm,za=!1,E=d(m,C),za=!1,Hc&&(E=fw(u,d,m,C)),sm(a),E}function sm(a){V.H=Dd;var u=Ie!==null&&Ie.next!==null;if(Or=0,Pn=Ie=ae=null,Uc=!1,pf=0,Dl=null,u)throw Error(n(300));a===null||Un||(a=a.dependencies,a!==null&&zc(a)&&(Un=!0))}function fw(a,u,d,m){ae=a;var C=0;do{if(Hc&&(Dl=null),pf=0,Hc=!1,25<=C)throw Error(n(301));if(C+=1,Pn=Ie=null,a.updateQueue!=null){var E=a.updateQueue;E.lastEffect=null,E.events=null,E.stores=null,E.memoCache!=null&&(E.memoCache.index=0)}V.H=vw,E=u(d,m)}while(Hc);return E}function dM(){var a=V.H,u=a.useState()[0];return u=typeof u.then=="function"?Vc(u):u,a=a.useState()[0],(Ie!==null?Ie.memoizedState:null)!==a&&(ae.flags|=1024),u}function om(){var a=vd!==0;return vd=0,a}function kc(a,u,d){u.updateQueue=a.updateQueue,u.flags&=-2053,a.lanes&=~d}function Sd(a){if(Uc){for(a=a.memoizedState;a!==null;){var u=a.queue;u!==null&&(u.pending=null),a=a.next}Uc=!1}Or=0,Pn=Ie=ae=null,Hc=!1,pf=vd=0,Dl=null}function ai(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Pn===null?ae.memoizedState=Pn=a:Pn=Pn.next=a,Pn}function zn(){if(Ie===null){var a=ae.alternate;a=a!==null?a.memoizedState:null}else a=Ie.next;var u=Pn===null?ae.memoizedState:Pn.next;if(u!==null)Pn=u,Ie=a;else{if(a===null)throw ae.alternate===null?Error(n(467)):Error(n(310));Ie=a,a={memoizedState:Ie.memoizedState,baseState:Ie.baseState,baseQueue:Ie.baseQueue,queue:Ie.queue,next:null},Pn===null?ae.memoizedState=Pn=a:Pn=Pn.next=a}return Pn}function wd(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Vc(a){var u=pf;return pf+=1,Dl===null&&(Dl=[]),a=U0(Dl,a,u),u=ae,(Pn===null?u.memoizedState:Pn.next)===null&&(u=u.alternate,V.H=u===null||u.memoizedState===null?bw:xm),a}function mf(a){if(a!==null&&typeof a=="object"){if(typeof a.then=="function")return Vc(a);if(a.$$typeof===_)return At(a)}throw Error(n(438,String(a)))}function rm(a){var u=null,d=ae.updateQueue;if(d!==null&&(u=d.memoCache),u==null){var m=ae.alternate;m!==null&&(m=m.updateQueue,m!==null&&(m=m.memoCache,m!=null&&(u={data:m.data.map(function(C){return C.slice()}),index:0})))}if(u==null&&(u={data:[],index:0}),d===null&&(d=wd(),ae.updateQueue=d),d.memoCache=u,d=u.data[u.index],d===void 0)for(d=u.data[u.index]=Array(a),m=0;m<a;m++)d[m]=F;return u.index++,d}function Dr(a,u){return typeof u=="function"?u(a):u}function Rr(a){var u=zn();return am(u,Ie,a)}function am(a,u,d){var m=a.queue;if(m===null)throw Error(n(311));m.lastRenderedReducer=d;var C=a.baseQueue,E=m.pending;if(E!==null){if(C!==null){var z=C.next;C.next=E.next,E.next=z}u.baseQueue=C=E,m.pending=null}if(E=a.baseState,C===null)a.memoizedState=E;else{u=C.next;var P=z=null,Q=null,ut=u,bt=!1;do{var Ct=ut.lane&-536870913;if(Ct!==ut.lane?(xe&Ct)===Ct:(Or&Ct)===Ct){var ft=ut.revertLane;if(ft===0)Q!==null&&(Q=Q.next={lane:0,revertLane:0,gesture:null,action:ut.action,hasEagerState:ut.hasEagerState,eagerState:ut.eagerState,next:null}),Ct===xl&&(bt=!0);else if((Or&ft)===ft){ut=ut.next,ft===xl&&(bt=!0);continue}else Ct={lane:0,revertLane:ut.revertLane,gesture:null,action:ut.action,hasEagerState:ut.hasEagerState,eagerState:ut.eagerState,next:null},Q===null?(P=Q=Ct,z=E):Q=Q.next=Ct,ae.lanes|=ft,qo|=ft;Ct=ut.action,za&&d(E,Ct),E=ut.hasEagerState?ut.eagerState:d(E,Ct)}else ft={lane:Ct,revertLane:ut.revertLane,gesture:ut.gesture,action:ut.action,hasEagerState:ut.hasEagerState,eagerState:ut.eagerState,next:null},Q===null?(P=Q=ft,z=E):Q=Q.next=ft,ae.lanes|=Ct,qo|=Ct;ut=ut.next}while(ut!==null&&ut!==u);if(Q===null?z=E:Q.next=P,!_i(E,a.memoizedState)&&(Un=!0,bt&&(d=Gn,d!==null)))throw d;a.memoizedState=E,a.baseState=z,a.baseQueue=Q,m.lastRenderedState=E}return C===null&&(m.lanes=0),[a.memoizedState,m.dispatch]}function lm(a){var u=zn(),d=u.queue;if(d===null)throw Error(n(311));d.lastRenderedReducer=a;var m=d.dispatch,C=d.pending,E=u.memoizedState;if(C!==null){d.pending=null;var z=C=C.next;do E=a(E,z.action),z=z.next;while(z!==C);_i(E,u.memoizedState)||(Un=!0),u.memoizedState=E,u.baseQueue===null&&(u.baseState=E),d.lastRenderedState=E}return[E,m]}function G0(a,u,d){var m=ae,C=zn(),E=Ee;if(E){if(d===void 0)throw Error(n(407));d=d()}else d=u();var z=!_i((Ie||C).memoizedState,d);if(z&&(C.memoizedState=d,Un=!0),C=C.queue,dm(cm.bind(null,m,C,a),[a]),C.getSnapshot!==u||z||Pn!==null&&Pn.memoizedState.tag&1){if(m.flags|=2048,$c(9,{destroy:void 0},$0.bind(null,m,C,d,u),null),Ke===null)throw Error(n(349));E||Or&127||Cd(m,u,d)}return d}function Cd(a,u,d){a.flags|=16384,a={getSnapshot:u,value:d},u=ae.updateQueue,u===null?(u=wd(),ae.updateQueue=u,u.stores=[a]):(d=u.stores,d===null?u.stores=[a]:d.push(a))}function $0(a,u,d,m){u.value=d,u.getSnapshot=m,um(u)&&fm(a)}function cm(a,u,d){return d(function(){um(u)&&fm(a)})}function um(a){var u=a.getSnapshot;a=a.value;try{var d=u();return!_i(a,d)}catch{return!0}}function fm(a){var u=Ca(a,2);u!==null&&as(u,a,2)}function q0(a){var u=ai();if(typeof a=="function"){var d=a;if(a=d(),za){ya(!0);try{d()}finally{ya(!1)}}}return u.memoizedState=u.baseState=a,u.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Dr,lastRenderedState:a},u}function li(a,u,d,m){return a.baseState=d,am(a,Ie,typeof m=="function"?m:Dr)}function hw(a,u,d,m,C){if(Od(a))throw Error(n(485));if(a=u.action,a!==null){var E={payload:C,action:a,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(z){E.listeners.push(z)}};V.T!==null?d(!0):E.isTransition=!1,m(E),d=u.pending,d===null?(E.next=u.pending=E,Y0(u,E)):(E.next=d.next,u.pending=d.next=E)}}function Y0(a,u){var d=u.action,m=u.payload,C=a.state;if(u.isTransition){var E=V.T,z={};V.T=z;try{var P=d(C,m),Q=V.S;Q!==null&&Q(z,P),X0(a,u,P)}catch(ut){Gc(a,u,ut)}finally{E!==null&&z.types!==null&&(E.types=z.types),V.T=E}}else try{E=d(C,m),X0(a,u,E)}catch(ut){Gc(a,u,ut)}}function X0(a,u,d){d!==null&&typeof d=="object"&&typeof d.then=="function"?d.then(function(m){I0(a,u,m)},function(m){return Gc(a,u,m)}):I0(a,u,d)}function I0(a,u,d){u.status="fulfilled",u.value=d,Z0(u),a.state=d,u=a.pending,u!==null&&(d=u.next,d===u?a.pending=null:(d=d.next,u.next=d,Y0(a,d)))}function Gc(a,u,d){var m=a.pending;if(a.pending=null,m!==null){m=m.next;do u.status="rejected",u.reason=d,Z0(u),u=u.next;while(u!==m)}a.action=null}function Z0(a){a=a.listeners;for(var u=0;u<a.length;u++)(0,a[u])()}function Ed(a,u){return u}function Q0(a,u){if(Ee){var d=Ke.formState;if(d!==null){t:{var m=ae;if(Ee){if(on){e:{for(var C=on,E=Zn;C.nodeType!==8;){if(!E){C=null;break e}if(C=ls(C.nextSibling),C===null){C=null;break e}}E=C.data,C=E==="F!"||E==="F"?C:null}if(C){on=ls(C.nextSibling),m=C.data==="F!";break t}}co(m)}m=!1}m&&(u=d[0])}}return d=ai(),d.memoizedState=d.baseState=u,m={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ed,lastRenderedState:u},d.queue=m,d=bm.bind(null,ae,m),m.dispatch=d,m=q0(!1),E=Rl.bind(null,ae,!1,m.queue),m=ai(),C={state:u,dispatch:null,action:a,pending:null},m.queue=C,d=hw.bind(null,ae,C,E,d),C.dispatch=d,m.memoizedState=a,[u,d,!1]}function dw(a){var u=zn();return Ad(u,Ie,a)}function Ad(a,u,d){if(u=am(a,u,Ed)[0],a=Rr(Dr)[0],typeof u=="object"&&u!==null&&typeof u.then=="function")try{var m=Vc(u)}catch(z){throw z===Sl?uf:z}else m=u;u=zn();var C=u.queue,E=C.dispatch;return d!==u.memoizedState&&(ae.flags|=2048,$c(9,{destroy:void 0},F0.bind(null,C,d),null)),[m,E,a]}function F0(a,u){a.action=u}function J0(a){var u=zn(),d=Ie;if(d!==null)return Ad(u,d,a);zn(),u=u.memoizedState,d=zn();var m=d.queue.dispatch;return d.memoizedState=a,[u,m,!1]}function $c(a,u,d,m){return a={tag:a,create:d,deps:m,inst:u,next:null},u=ae.updateQueue,u===null&&(u=wd(),ae.updateQueue=u),d=u.lastEffect,d===null?u.lastEffect=a.next=a:(m=d.next,d.next=a,a.next=m,u.lastEffect=a),a}function K0(){return zn().memoizedState}function yf(a,u,d,m){var C=ai();ae.flags|=a,C.memoizedState=$c(1|u,{destroy:void 0},d,m===void 0?null:m)}function bf(a,u,d,m){var C=zn();m=m===void 0?null:m;var E=C.memoizedState.inst;Ie!==null&&m!==null&&Na(m,Ie.memoizedState.deps)?C.memoizedState=$c(u,E,d,m):(ae.flags|=a,C.memoizedState=$c(1|u,E,d,m))}function hm(a,u){yf(8390656,8,a,u)}function dm(a,u){bf(2048,8,a,u)}function W0(a){ae.flags|=4;var u=ae.updateQueue;if(u===null)u=wd(),ae.updateQueue=u,u.events=[a];else{var d=u.events;d===null?u.events=[a]:d.push(a)}}function Td(a){var u=zn().memoizedState;return W0({ref:u,nextImpl:a}),function(){if(Pe&2)throw Error(n(440));return u.impl.apply(void 0,arguments)}}function gm(a,u){return bf(4,2,a,u)}function tv(a,u){return bf(4,4,a,u)}function pm(a,u){if(typeof u=="function"){a=a();var d=u(a);return function(){typeof d=="function"?d():u(null)}}if(u!=null)return a=a(),u.current=a,function(){u.current=null}}function ev(a,u,d){d=d!=null?d.concat([a]):null,bf(4,4,pm.bind(null,u,a),d)}function Ho(){}function mm(a,u){var d=zn();u=u===void 0?null:u;var m=d.memoizedState;return u!==null&&Na(u,m[1])?m[0]:(d.memoizedState=[a,u],a)}function gw(a,u){var d=zn();u=u===void 0?null:u;var m=d.memoizedState;if(u!==null&&Na(u,m[1]))return m[0];if(m=a(),za){ya(!0);try{a()}finally{ya(!1)}}return d.memoizedState=[m,u],m}function Md(a,u,d){return d===void 0||Or&1073741824&&!(xe&261930)?a.memoizedState=u:(a.memoizedState=d,a=Dw(),ae.lanes|=a,qo|=a,d)}function zr(a,u,d,m){return _i(d,u)?d:Qn.current!==null?(a=Md(a,d,m),_i(a,u)||(Un=!0),a):!(Or&42)||Or&1073741824&&!(xe&261930)?(Un=!0,a.memoizedState=d):(a=Dw(),ae.lanes|=a,qo|=a,u)}function ym(a,u,d,m,C){var E=ot.p;ot.p=E!==0&&8>E?E:8;var z=V.T,P={};V.T=P,Rl(a,!1,u,d);try{var Q=C(),ut=V.S;if(ut!==null&&ut(P,Q),Q!==null&&typeof Q=="object"&&typeof Q.then=="function"){var bt=gd(Q,m);La(a,u,bt,vs(a))}else La(a,u,m,vs(a))}catch(Ct){La(a,u,{then:function(){},status:"rejected",reason:Ct},vs())}finally{ot.p=E,z!==null&&P.types!==null&&(z.types=P.types),V.T=z}}function pw(){}function vf(a,u,d,m){if(a.tag!==5)throw Error(n(476));var C=xf(a).queue;ym(a,C,u,tt,d===null?pw:function(){return Je(a),d(m)})}function xf(a){var u=a.memoizedState;if(u!==null)return u;u={memoizedState:tt,baseState:tt,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Dr,lastRenderedState:tt},next:null};var d={};return u.next={memoizedState:d,baseState:d,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Dr,lastRenderedState:d},next:null},a.memoizedState=u,a=a.alternate,a!==null&&(a.memoizedState=u),u}function Je(a){var u=xf(a);u.next===null&&(u=a.alternate.memoizedState),La(a,u.next.queue,{},vs())}function nv(){return At(ng)}function mw(){return zn().memoizedState}function iv(){return zn().memoizedState}function Nr(a){for(var u=a.return;u!==null;){switch(u.tag){case 24:case 3:var d=vs();a=Ra(d);var m=Us(u,a,d);m!==null&&(as(m,u,d),Tl(m,u,d)),u={cache:ud()},a.payload=u;return}u=u.return}}function yw(a,u,d){var m=vs();d={lane:m,revertLane:0,gesture:null,action:d,hasEagerState:!1,eagerState:null,next:null},Od(a)?vm(u,d):(d=ao(a,u,d,m),d!==null&&(as(d,a,m),sv(d,u,m)))}function bm(a,u,d){var m=vs();La(a,u,d,m)}function La(a,u,d,m){var C={lane:m,revertLane:0,gesture:null,action:d,hasEagerState:!1,eagerState:null,next:null};if(Od(a))vm(u,C);else{var E=a.alternate;if(a.lanes===0&&(E===null||E.lanes===0)&&(E=u.lastRenderedReducer,E!==null))try{var z=u.lastRenderedState,P=E(z,d);if(C.hasEagerState=!0,C.eagerState=P,_i(P,z))return Ls(a,u,C,0),Ke===null&&Ns(),!1}catch{}finally{}if(d=ao(a,u,C,m),d!==null)return as(d,a,m),sv(d,u,m),!0}return!1}function Rl(a,u,d,m){if(m={lane:2,revertLane:Ym(),gesture:null,action:m,hasEagerState:!1,eagerState:null,next:null},Od(a)){if(u)throw Error(n(479))}else u=ao(a,d,m,2),u!==null&&as(u,a,2)}function Od(a){var u=a.alternate;return a===ae||u!==null&&u===ae}function vm(a,u){Hc=Uc=!0;var d=a.pending;d===null?u.next=u:(u.next=d.next,d.next=u),a.pending=u}function sv(a,u,d){if(d&4194048){var m=u.lanes;m&=a.pendingLanes,d|=m,u.lanes=d,dr(a,d)}}var Dd={readContext:At,use:mf,useCallback:Cn,useContext:Cn,useEffect:Cn,useImperativeHandle:Cn,useLayoutEffect:Cn,useInsertionEffect:Cn,useMemo:Cn,useReducer:Cn,useRef:Cn,useState:Cn,useDebugValue:Cn,useDeferredValue:Cn,useTransition:Cn,useSyncExternalStore:Cn,useId:Cn,useHostTransitionStatus:Cn,useFormState:Cn,useActionState:Cn,useOptimistic:Cn,useMemoCache:Cn,useCacheRefresh:Cn};Dd.useEffectEvent=Cn;var bw={readContext:At,use:mf,useCallback:function(a,u){return ai().memoizedState=[a,u===void 0?null:u],a},useContext:At,useEffect:hm,useImperativeHandle:function(a,u,d){d=d!=null?d.concat([a]):null,yf(4194308,4,pm.bind(null,u,a),d)},useLayoutEffect:function(a,u){return yf(4194308,4,a,u)},useInsertionEffect:function(a,u){yf(4,2,a,u)},useMemo:function(a,u){var d=ai();u=u===void 0?null:u;var m=a();if(za){ya(!0);try{a()}finally{ya(!1)}}return d.memoizedState=[m,u],m},useReducer:function(a,u,d){var m=ai();if(d!==void 0){var C=d(u);if(za){ya(!0);try{d(u)}finally{ya(!1)}}}else C=u;return m.memoizedState=m.baseState=C,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:C},m.queue=a,a=a.dispatch=yw.bind(null,ae,a),[m.memoizedState,a]},useRef:function(a){var u=ai();return a={current:a},u.memoizedState=a},useState:function(a){a=q0(a);var u=a.queue,d=bm.bind(null,ae,u);return u.dispatch=d,[a.memoizedState,d]},useDebugValue:Ho,useDeferredValue:function(a,u){var d=ai();return Md(d,a,u)},useTransition:function(){var a=q0(!1);return a=ym.bind(null,ae,a.queue,!0,!1),ai().memoizedState=a,[!1,a]},useSyncExternalStore:function(a,u,d){var m=ae,C=ai();if(Ee){if(d===void 0)throw Error(n(407));d=d()}else{if(d=u(),Ke===null)throw Error(n(349));xe&127||Cd(m,u,d)}C.memoizedState=d;var E={value:d,getSnapshot:u};return C.queue=E,hm(cm.bind(null,m,E,a),[a]),m.flags|=2048,$c(9,{destroy:void 0},$0.bind(null,m,E,d,u),null),d},useId:function(){var a=ai(),u=Ke.identifierPrefix;if(Ee){var d=_o,m=ps;d=(m&~(1<<32-Ii(m)-1)).toString(32)+d,u="_"+u+"R_"+d,d=vd++,0<d&&(u+="H"+d.toString(32)),u+="_"}else d=uw++,u="_"+u+"r_"+d.toString(32)+"_";return a.memoizedState=u},useHostTransitionStatus:nv,useFormState:Q0,useActionState:Q0,useOptimistic:function(a){var u=ai();u.memoizedState=u.baseState=a;var d={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return u.queue=d,u=Rl.bind(null,ae,!0,d),d.dispatch=u,[a,u]},useMemoCache:rm,useCacheRefresh:function(){return ai().memoizedState=Nr.bind(null,ae)},useEffectEvent:function(a){var u=ai(),d={impl:a};return u.memoizedState=d,function(){if(Pe&2)throw Error(n(440));return d.impl.apply(void 0,arguments)}}},xm={readContext:At,use:mf,useCallback:mm,useContext:At,useEffect:dm,useImperativeHandle:ev,useInsertionEffect:gm,useLayoutEffect:tv,useMemo:gw,useReducer:Rr,useRef:K0,useState:function(){return Rr(Dr)},useDebugValue:Ho,useDeferredValue:function(a,u){var d=zn();return zr(d,Ie.memoizedState,a,u)},useTransition:function(){var a=Rr(Dr)[0],u=zn().memoizedState;return[typeof a=="boolean"?a:Vc(a),u]},useSyncExternalStore:G0,useId:mw,useHostTransitionStatus:nv,useFormState:dw,useActionState:dw,useOptimistic:function(a,u){var d=zn();return li(d,Ie,a,u)},useMemoCache:rm,useCacheRefresh:iv};xm.useEffectEvent=Td;var vw={readContext:At,use:mf,useCallback:mm,useContext:At,useEffect:dm,useImperativeHandle:ev,useInsertionEffect:gm,useLayoutEffect:tv,useMemo:gw,useReducer:lm,useRef:K0,useState:function(){return lm(Dr)},useDebugValue:Ho,useDeferredValue:function(a,u){var d=zn();return Ie===null?Md(d,a,u):zr(d,Ie.memoizedState,a,u)},useTransition:function(){var a=lm(Dr)[0],u=zn().memoizedState;return[typeof a=="boolean"?a:Vc(a),u]},useSyncExternalStore:G0,useId:mw,useHostTransitionStatus:nv,useFormState:J0,useActionState:J0,useOptimistic:function(a,u){var d=zn();return Ie!==null?li(d,Ie,a,u):(d.baseState=a,[a,d.queue.dispatch])},useMemoCache:rm,useCacheRefresh:iv};vw.useEffectEvent=Td;function qc(a,u,d,m){u=a.memoizedState,d=d(m,u),d=d==null?u:S({},u,d),a.memoizedState=d,a.lanes===0&&(a.updateQueue.baseState=d)}var uo={enqueueSetState:function(a,u,d){a=a._reactInternals;var m=vs(),C=Ra(m);C.payload=u,d!=null&&(C.callback=d),u=Us(a,C,m),u!==null&&(as(u,a,m),Tl(u,a,m))},enqueueReplaceState:function(a,u,d){a=a._reactInternals;var m=vs(),C=Ra(m);C.tag=1,C.payload=u,d!=null&&(C.callback=d),u=Us(a,C,m),u!==null&&(as(u,a,m),Tl(u,a,m))},enqueueForceUpdate:function(a,u){a=a._reactInternals;var d=vs(),m=Ra(d);m.tag=2,u!=null&&(m.callback=u),u=Us(a,m,d),u!==null&&(as(u,a,d),Tl(u,a,d))}};function ov(a,u,d,m,C,E,z){return a=a.stateNode,typeof a.shouldComponentUpdate=="function"?a.shouldComponentUpdate(m,E,z):u.prototype&&u.prototype.isPureReactComponent?!so(d,m)||!so(C,E):!0}function xw(a,u,d,m){a=u.state,typeof u.componentWillReceiveProps=="function"&&u.componentWillReceiveProps(d,m),typeof u.UNSAFE_componentWillReceiveProps=="function"&&u.UNSAFE_componentWillReceiveProps(d,m),u.state!==a&&uo.enqueueReplaceState(u,u.state,null)}function zl(a,u){var d=u;if("ref"in u){d={};for(var m in u)m!=="ref"&&(d[m]=u[m])}if(a=a.defaultProps){d===u&&(d=S({},d));for(var C in a)d[C]===void 0&&(d[C]=a[C])}return d}function Sm(a){Oc(a)}function rv(a){console.error(a)}function wm(a){Oc(a)}function Sf(a,u){try{var d=a.onUncaughtError;d(u.value,{componentStack:u.stack})}catch(m){setTimeout(function(){throw m})}}function Rd(a,u,d){try{var m=a.onCaughtError;m(d.value,{componentStack:d.stack,errorBoundary:u.tag===1?u.stateNode:null})}catch(C){setTimeout(function(){throw C})}}function av(a,u,d){return d=Ra(d),d.tag=3,d.payload={element:null},d.callback=function(){Sf(a,u)},d}function lv(a){return a=Ra(a),a.tag=3,a}function cv(a,u,d,m){var C=d.type.getDerivedStateFromError;if(typeof C=="function"){var E=m.value;a.payload=function(){return C(E)},a.callback=function(){Rd(u,d,m)}}var z=d.stateNode;z!==null&&typeof z.componentDidCatch=="function"&&(a.callback=function(){Rd(u,d,m),typeof C!="function"&&(mn===null?mn=new Set([this]):mn.add(this));var P=m.stack;this.componentDidCatch(m.value,{componentStack:P!==null?P:""})})}function gM(a,u,d,m,C){if(d.flags|=32768,m!==null&&typeof m=="object"&&typeof m.then=="function"){if(u=d.alternate,u!==null&&ri(u,d,C,!0),d=ts.current,d!==null){switch(d.tag){case 31:case 13:return Hs===null?Vm():d.alternate===null&&an===0&&(an=3),d.flags&=-257,d.flags|=65536,d.lanes=C,m===_c?d.flags|=16384:(u=d.updateQueue,u===null?d.updateQueue=new Set([m]):u.add(m),qd(a,m,C)),!1;case 22:return d.flags|=65536,m===_c?d.flags|=16384:(u=d.updateQueue,u===null?(u={transitions:null,markerInstances:null,retryQueue:new Set([m])},d.updateQueue=u):(d=u.retryQueue,d===null?u.retryQueue=new Set([m]):d.add(m)),qd(a,m,C)),!1}throw Error(n(435,d.tag))}return qd(a,m,C),Vm(),!1}if(Ee)return u=ts.current,u!==null?(!(u.flags&65536)&&(u.flags|=256),u.flags|=65536,u.lanes=C,m!==Cr&&(a=Error(n(422),{cause:m}),lf(js(a,d)))):(m!==Cr&&(u=Error(n(423),{cause:m}),lf(js(u,d))),a=a.current.alternate,a.flags|=65536,C&=-C,a.lanes|=C,m=js(m,d),C=av(a.stateNode,m,C),em(a,C),an!==4&&(an=2)),!1;var E=Error(n(520),{cause:m});if(E=js(E,d),kd===null?kd=[E]:kd.push(E),an!==4&&(an=2),u===null)return!0;m=js(m,d),d=u;do{switch(d.tag){case 3:return d.flags|=65536,a=C&-C,d.lanes|=a,a=av(d.stateNode,m,a),em(d,a),!1;case 1:if(u=d.type,E=d.stateNode,(d.flags&128)===0&&(typeof u.getDerivedStateFromError=="function"||E!==null&&typeof E.componentDidCatch=="function"&&(mn===null||!mn.has(E))))return d.flags|=65536,C&=-C,d.lanes|=C,C=lv(C),cv(C,a,d,m),em(d,C),!1}d=d.return}while(d!==null);return!1}var Cm=Error(n(461)),Un=!1;function un(a,u,d,m){u.child=a===null?k0(u,null,d,m):Al(u,a.child,d,m)}function uv(a,u,d,m,C){d=d.render;var E=u.ref;if("ref"in m){var z={};for(var P in m)P!=="ref"&&(z[P]=m[P])}else z=m;return ne(u),m=xd(a,u,d,z,E,C),P=om(),a!==null&&!Un?(kc(a,u,C),Gs(a,u,C)):(Ee&&P&&rf(u),u.flags|=1,un(a,u,m,C),u.child)}function fv(a,u,d,m,C){if(a===null){var E=d.type;return typeof E=="function"&&!Dc(E)&&E.defaultProps===void 0&&d.compare===null?(u.tag=15,u.type=E,hv(a,u,E,m,C)):(a=Zp(d.type,null,m,u,u.mode,C),a.ref=u.ref,a.return=u,u.child=a)}if(E=a.child,!Tm(a,C)){var z=E.memoizedProps;if(d=d.compare,d=d!==null?d:so,d(z,m)&&a.ref===u.ref)return Gs(a,u,C)}return u.flags|=1,a=Ea(E,m),a.ref=u.ref,a.return=u,u.child=a}function hv(a,u,d,m,C){if(a!==null){var E=a.memoizedProps;if(so(E,m)&&a.ref===u.ref)if(Un=!1,u.pendingProps=m=E,Tm(a,C))a.flags&131072&&(Un=!0);else return u.lanes=a.lanes,Gs(a,u,C)}return Em(a,u,d,m,C)}function Sw(a,u,d,m){var C=m.children,E=a!==null?a.memoizedState:null;if(a===null&&u.stateNode===null&&(u.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),m.mode==="hidden"){if(u.flags&128){if(E=E!==null?E.baseLanes|d:d,a!==null){for(m=u.child=a.child,C=0;m!==null;)C=C|m.lanes|m.childLanes,m=m.sibling;m=C&~E}else m=0,u.child=null;return ns(a,u,E,d,m)}if(d&536870912)u.memoizedState={baseLanes:0,cachePool:null},a!==null&&cf(u,E!==null?E.cachePool:null),E!==null?cw(u,E):bd(),im(u);else return m=u.lanes=536870912,ns(a,u,E!==null?E.baseLanes|d:d,d,m)}else E!==null?(cf(u,E.cachePool),cw(u,E),Uo(),u.memoizedState=null):(a!==null&&cf(u,null),bd(),Uo());return un(a,u,C,d),u.child}function Nl(a,u){return a!==null&&a.tag===22||u.stateNode!==null||(u.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),u.sibling}function ns(a,u,d,m,C){var E=Ps();return E=E===null?null:{parent:Bn._currentValue,pool:E},u.memoizedState={baseLanes:d,cachePool:E},a!==null&&cf(u,null),bd(),im(u),a!==null&&ri(a,u,m,!0),u.childLanes=C,null}function zd(a,u){return u=jd({mode:u.mode,children:u.children},a.mode),u.ref=a.ref,a.child=u,u.return=a,u}function is(a,u,d){return Al(u,a.child,null,d),a=zd(u,u.pendingProps),a.flags|=2,es(u),u.memoizedState=null,a}function ww(a,u,d){var m=u.pendingProps,C=(u.flags&128)!==0;if(u.flags&=-129,a===null){if(Ee){if(m.mode==="hidden")return a=zd(u,m),u.lanes=536870912,Nl(null,a);if(df(u),(a=on)?(a=iC(a,Zn),a=a!==null&&a.data==="&"?a:null,a!==null&&(u.memoizedState={dehydrated:a,treeContext:jo!==null?{id:ps,overflow:_o}:null,retryLane:536870912,hydrationErrors:null},d=z0(a),d.return=u,u.child=d,oi=u,on=null)):a=null,a===null)throw co(u);return u.lanes=536870912,null}return zd(u,m)}var E=a.memoizedState;if(E!==null){var z=E.dehydrated;if(df(u),C)if(u.flags&256)u.flags&=-257,u=is(a,u,d);else if(u.memoizedState!==null)u.child=a.child,u.flags|=128,u=null;else throw Error(n(558));else if(Un||ri(a,u,d,!1),C=(d&a.childLanes)!==0,Un||C){if(m=Ke,m!==null&&(z=Ds(m,d),z!==0&&z!==E.retryLane))throw E.retryLane=z,Ca(a,z),as(m,a,z),Cm;Vm(),u=is(a,u,d)}else a=E.treeContext,on=ls(z.nextSibling),oi=u,Ee=!0,wr=null,Zn=!1,a!==null&&ad(u,a),u=zd(u,m),u.flags|=4096;return u}return a=Ea(a.child,{mode:m.mode,children:m.children}),a.ref=u.ref,u.child=a,a.return=u,a}function ks(a,u){var d=u.ref;if(d===null)a!==null&&a.ref!==null&&(u.flags|=4194816);else{if(typeof d!="function"&&typeof d!="object")throw Error(n(284));(a===null||a.ref!==d)&&(u.flags|=4194816)}}function Em(a,u,d,m,C){return ne(u),d=xd(a,u,d,m,void 0,C),m=om(),a!==null&&!Un?(kc(a,u,C),Gs(a,u,C)):(Ee&&m&&rf(u),u.flags|=1,un(a,u,d,C),u.child)}function Ll(a,u,d,m,C,E){return ne(u),u.updateQueue=null,d=fw(u,m,d,C),sm(a),m=om(),a!==null&&!Un?(kc(a,u,E),Gs(a,u,E)):(Ee&&m&&rf(u),u.flags|=1,un(a,u,d,E),u.child)}function dv(a,u,d,m,C){if(ne(u),u.stateNode===null){var E=Ji,z=d.contextType;typeof z=="object"&&z!==null&&(E=At(z)),E=new d(m,E),u.memoizedState=E.state!==null&&E.state!==void 0?E.state:null,E.updater=uo,u.stateNode=E,E._reactInternals=u,E=u.stateNode,E.props=m,E.state=u.memoizedState,E.refs={},yd(u),z=d.contextType,E.context=typeof z=="object"&&z!==null?At(z):Ji,E.state=u.memoizedState,z=d.getDerivedStateFromProps,typeof z=="function"&&(qc(u,d,z,m),E.state=u.memoizedState),typeof d.getDerivedStateFromProps=="function"||typeof E.getSnapshotBeforeUpdate=="function"||typeof E.UNSAFE_componentWillMount!="function"&&typeof E.componentWillMount!="function"||(z=E.state,typeof E.componentWillMount=="function"&&E.componentWillMount(),typeof E.UNSAFE_componentWillMount=="function"&&E.UNSAFE_componentWillMount(),z!==E.state&&uo.enqueueReplaceState(E,E.state,null),Tr(u,m,E,C),Ml(),E.state=u.memoizedState),typeof E.componentDidMount=="function"&&(u.flags|=4194308),m=!0}else if(a===null){E=u.stateNode;var P=u.memoizedProps,Q=zl(d,P);E.props=Q;var ut=E.context,bt=d.contextType;z=Ji,typeof bt=="object"&&bt!==null&&(z=At(bt));var Ct=d.getDerivedStateFromProps;bt=typeof Ct=="function"||typeof E.getSnapshotBeforeUpdate=="function",P=u.pendingProps!==P,bt||typeof E.UNSAFE_componentWillReceiveProps!="function"&&typeof E.componentWillReceiveProps!="function"||(P||ut!==z)&&xw(u,E,m,z),Da=!1;var ft=u.memoizedState;E.state=ft,Tr(u,m,E,C),Ml(),ut=u.memoizedState,P||ft!==ut||Da?(typeof Ct=="function"&&(qc(u,d,Ct,m),ut=u.memoizedState),(Q=Da||ov(u,d,Q,m,ft,ut,z))?(bt||typeof E.UNSAFE_componentWillMount!="function"&&typeof E.componentWillMount!="function"||(typeof E.componentWillMount=="function"&&E.componentWillMount(),typeof E.UNSAFE_componentWillMount=="function"&&E.UNSAFE_componentWillMount()),typeof E.componentDidMount=="function"&&(u.flags|=4194308)):(typeof E.componentDidMount=="function"&&(u.flags|=4194308),u.memoizedProps=m,u.memoizedState=ut),E.props=m,E.state=ut,E.context=z,m=Q):(typeof E.componentDidMount=="function"&&(u.flags|=4194308),m=!1)}else{E=u.stateNode,tm(a,u),z=u.memoizedProps,bt=zl(d,z),E.props=bt,Ct=u.pendingProps,ft=E.context,ut=d.contextType,Q=Ji,typeof ut=="object"&&ut!==null&&(Q=At(ut)),P=d.getDerivedStateFromProps,(ut=typeof P=="function"||typeof E.getSnapshotBeforeUpdate=="function")||typeof E.UNSAFE_componentWillReceiveProps!="function"&&typeof E.componentWillReceiveProps!="function"||(z!==Ct||ft!==Q)&&xw(u,E,m,Q),Da=!1,ft=u.memoizedState,E.state=ft,Tr(u,m,E,C),Ml();var mt=u.memoizedState;z!==Ct||ft!==mt||Da||a!==null&&a.dependencies!==null&&zc(a.dependencies)?(typeof P=="function"&&(qc(u,d,P,m),mt=u.memoizedState),(bt=Da||ov(u,d,bt,m,ft,mt,Q)||a!==null&&a.dependencies!==null&&zc(a.dependencies))?(ut||typeof E.UNSAFE_componentWillUpdate!="function"&&typeof E.componentWillUpdate!="function"||(typeof E.componentWillUpdate=="function"&&E.componentWillUpdate(m,mt,Q),typeof E.UNSAFE_componentWillUpdate=="function"&&E.UNSAFE_componentWillUpdate(m,mt,Q)),typeof E.componentDidUpdate=="function"&&(u.flags|=4),typeof E.getSnapshotBeforeUpdate=="function"&&(u.flags|=1024)):(typeof E.componentDidUpdate!="function"||z===a.memoizedProps&&ft===a.memoizedState||(u.flags|=4),typeof E.getSnapshotBeforeUpdate!="function"||z===a.memoizedProps&&ft===a.memoizedState||(u.flags|=1024),u.memoizedProps=m,u.memoizedState=mt),E.props=m,E.state=mt,E.context=Q,m=bt):(typeof E.componentDidUpdate!="function"||z===a.memoizedProps&&ft===a.memoizedState||(u.flags|=4),typeof E.getSnapshotBeforeUpdate!="function"||z===a.memoizedProps&&ft===a.memoizedState||(u.flags|=1024),m=!1)}return E=m,ks(a,u),m=(u.flags&128)!==0,E||m?(E=u.stateNode,d=m&&typeof d.getDerivedStateFromError!="function"?null:E.render(),u.flags|=1,a!==null&&m?(u.child=Al(u,a.child,null,C),u.child=Al(u,null,d,C)):un(a,u,d,C),u.memoizedState=E.state,a=u.child):a=Gs(a,u,C),a}function ko(a,u,d,m){return vl(),u.flags|=256,un(a,u,d,m),u.child}var Nd={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Ld(a){return{baseLanes:a,cachePool:Lc()}}function Vs(a,u,d){return a=a!==null?a.childLanes&~d:0,u&&(a|=rs),a}function gv(a,u,d){var m=u.pendingProps,C=!1,E=(u.flags&128)!==0,z;if((z=E)||(z=a!==null&&a.memoizedState===null?!1:(pn.current&2)!==0),z&&(C=!0,u.flags&=-129),z=(u.flags&32)!==0,u.flags&=-33,a===null){if(Ee){if(C?Mr(u):Uo(),(a=on)?(a=iC(a,Zn),a=a!==null&&a.data!=="&"?a:null,a!==null&&(u.memoizedState={dehydrated:a,treeContext:jo!==null?{id:ps,overflow:_o}:null,retryLane:536870912,hydrationErrors:null},d=z0(a),d.return=u,u.child=d,oi=u,on=null)):a=null,a===null)throw co(u);return kl(a)?u.lanes=32:u.lanes=536870912,null}var P=m.children;return m=m.fallback,C?(Uo(),C=u.mode,P=jd({mode:"hidden",children:P},C),m=Aa(m,C,d,null),P.return=u,m.return=u,P.sibling=m,u.child=P,m=u.child,m.memoizedState=Ld(d),m.childLanes=Vs(a,z,d),u.memoizedState=Nd,Nl(null,m)):(Mr(u),jl(u,P))}var Q=a.memoizedState;if(Q!==null&&(P=Q.dehydrated,P!==null)){if(E)u.flags&256?(Mr(u),u.flags&=-257,u=Yc(a,u,d)):u.memoizedState!==null?(Uo(),u.child=a.child,u.flags|=128,u=null):(Uo(),P=m.fallback,C=u.mode,m=jd({mode:"visible",children:m.children},C),P=Aa(P,C,d,null),P.flags|=2,m.return=u,P.return=u,m.sibling=P,u.child=m,Al(u,a.child,null,d),m=u.child,m.memoizedState=Ld(d),m.childLanes=Vs(a,z,d),u.memoizedState=Nd,u=Nl(null,m));else if(Mr(u),kl(P)){if(z=P.nextSibling&&P.nextSibling.dataset,z)var ut=z.dgst;z=ut,m=Error(n(419)),m.stack="",m.digest=z,lf({value:m,source:null,stack:null}),u=Yc(a,u,d)}else if(Un||ri(a,u,d,!1),z=(d&a.childLanes)!==0,Un||z){if(z=Ke,z!==null&&(m=Ds(z,d),m!==0&&m!==Q.retryLane))throw Q.retryLane=m,Ca(a,m),as(z,a,m),Cm;go(P)||Vm(),u=Yc(a,u,d)}else go(P)?(u.flags|=192,u.child=a.child,u=null):(a=Q.treeContext,on=ls(P.nextSibling),oi=u,Ee=!0,wr=null,Zn=!1,a!==null&&ad(u,a),u=jl(u,m.children),u.flags|=4096);return u}return C?(Uo(),P=m.fallback,C=u.mode,Q=a.child,ut=Q.sibling,m=Ea(Q,{mode:"hidden",children:m.children}),m.subtreeFlags=Q.subtreeFlags&65011712,ut!==null?P=Ea(ut,P):(P=Aa(P,C,d,null),P.flags|=2),P.return=u,m.return=u,m.sibling=P,u.child=m,Nl(null,m),m=u.child,P=a.child.memoizedState,P===null?P=Ld(d):(C=P.cachePool,C!==null?(Q=Bn._currentValue,C=C.parent!==Q?{parent:Q,pool:Q}:C):C=Lc(),P={baseLanes:P.baseLanes|d,cachePool:C}),m.memoizedState=P,m.childLanes=Vs(a,z,d),u.memoizedState=Nd,Nl(a.child,m)):(Mr(u),d=a.child,a=d.sibling,d=Ea(d,{mode:"visible",children:m.children}),d.return=u,d.sibling=null,a!==null&&(z=u.deletions,z===null?(u.deletions=[a],u.flags|=16):z.push(a)),u.child=d,u.memoizedState=null,d)}function jl(a,u){return u=jd({mode:"visible",children:u},a.mode),u.return=a,a.child=u}function jd(a,u){return a=Dn(22,a,null,u),a.lanes=0,a}function Yc(a,u,d){return Al(u,a.child,null,d),a=jl(u,u.pendingProps.children),a.flags|=2,u.memoizedState=null,a}function Xc(a,u,d){a.lanes|=u;var m=a.alternate;m!==null&&(m.lanes|=u),Kp(a.return,u,d)}function Am(a,u,d,m,C,E){var z=a.memoizedState;z===null?a.memoizedState={isBackwards:u,rendering:null,renderingStartTime:0,last:m,tail:d,tailMode:C,treeForkCount:E}:(z.isBackwards=u,z.rendering=null,z.renderingStartTime=0,z.last=m,z.tail=d,z.tailMode=C,z.treeForkCount=E)}function pv(a,u,d){var m=u.pendingProps,C=m.revealOrder,E=m.tail;m=m.children;var z=pn.current,P=(z&2)!==0;if(P?(z=z&1|2,u.flags|=128):z&=1,Tt(pn,z),un(a,u,m,d),m=Ee?_n:0,!P&&a!==null&&a.flags&128)t:for(a=u.child;a!==null;){if(a.tag===13)a.memoizedState!==null&&Xc(a,d,u);else if(a.tag===19)Xc(a,d,u);else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===u)break t;for(;a.sibling===null;){if(a.return===null||a.return===u)break t;a=a.return}a.sibling.return=a.return,a=a.sibling}switch(C){case"forwards":for(d=u.child,C=null;d!==null;)a=d.alternate,a!==null&&gf(a)===null&&(C=d),d=d.sibling;d=C,d===null?(C=u.child,u.child=null):(C=d.sibling,d.sibling=null),Am(u,!1,C,d,E,m);break;case"backwards":case"unstable_legacy-backwards":for(d=null,C=u.child,u.child=null;C!==null;){if(a=C.alternate,a!==null&&gf(a)===null){u.child=C;break}a=C.sibling,C.sibling=d,d=C,C=a}Am(u,!0,d,null,E,m);break;case"together":Am(u,!1,null,null,void 0,m);break;default:u.memoizedState=null}return u.child}function Gs(a,u,d){if(a!==null&&(u.dependencies=a.dependencies),qo|=u.lanes,!(d&u.childLanes))if(a!==null){if(ri(a,u,d,!1),(d&u.childLanes)===0)return null}else return null;if(a!==null&&u.child!==a.child)throw Error(n(153));if(u.child!==null){for(a=u.child,d=Ea(a,a.pendingProps),u.child=d,d.return=u;a.sibling!==null;)a=a.sibling,d=d.sibling=Ea(a,a.pendingProps),d.return=u;d.sibling=null}return u.child}function Tm(a,u){return a.lanes&u?!0:(a=a.dependencies,!!(a!==null&&zc(a)))}function Mm(a,u,d){switch(u.tag){case 3:ue(u,u.stateNode.containerInfo),Wi(u,Bn,a.memoizedState.cache),vl();break;case 27:case 5:Be(u);break;case 4:ue(u,u.stateNode.containerInfo);break;case 10:Wi(u,u.type,u.memoizedProps.value);break;case 31:if(u.memoizedState!==null)return u.flags|=128,df(u),null;break;case 13:var m=u.memoizedState;if(m!==null)return m.dehydrated!==null?(Mr(u),u.flags|=128,null):d&u.child.childLanes?gv(a,u,d):(Mr(u),a=Gs(a,u,d),a!==null?a.sibling:null);Mr(u);break;case 19:var C=(a.flags&128)!==0;if(m=(d&u.childLanes)!==0,m||(ri(a,u,d,!1),m=(d&u.childLanes)!==0),C){if(m)return pv(a,u,d);u.flags|=128}if(C=u.memoizedState,C!==null&&(C.rendering=null,C.tail=null,C.lastEffect=null),Tt(pn,pn.current),m)break;return null;case 22:return u.lanes=0,Sw(a,u,d,u.pendingProps);case 24:Wi(u,Bn,a.memoizedState.cache)}return Gs(a,u,d)}function mv(a,u,d){if(a!==null)if(a.memoizedProps!==u.pendingProps)Un=!0;else{if(!Tm(a,d)&&!(u.flags&128))return Un=!1,Mm(a,u,d);Un=!!(a.flags&131072)}else Un=!1,Ee&&u.flags&1048576&&L0(u,_n,u.index);switch(u.lanes=0,u.tag){case 16:t:{var m=u.pendingProps;if(a=wl(u.elementType),u.type=a,typeof a=="function")Dc(a)?(m=zl(a,m),u.tag=1,u=dv(null,u,a,m,d)):(u.tag=0,u=Em(null,u,a,m,d));else{if(a!=null){var C=a.$$typeof;if(C===U){u.tag=11,u=uv(null,u,a,m,d);break t}else if(C===k){u.tag=14,u=fv(null,u,a,m,d);break t}}throw u=Ot(a)||a,Error(n(306,u,""))}}return u;case 0:return Em(a,u,u.type,u.pendingProps,d);case 1:return m=u.type,C=zl(m,u.pendingProps),dv(a,u,m,C,d);case 3:t:{if(ue(u,u.stateNode.containerInfo),a===null)throw Error(n(387));m=u.pendingProps;var E=u.memoizedState;C=E.element,tm(a,u),Tr(u,m,null,d);var z=u.memoizedState;if(m=z.cache,Wi(u,Bn,m),m!==E.cache&&Ar(u,[Bn],d,!0),Ml(),m=z.element,E.isDehydrated)if(E={element:m,isDehydrated:!1,cache:z.cache},u.updateQueue.baseState=E,u.memoizedState=E,u.flags&256){u=ko(a,u,m,d);break t}else if(m!==C){C=js(Error(n(424)),u),lf(C),u=ko(a,u,m,d);break t}else{switch(a=u.stateNode.containerInfo,a.nodeType){case 9:a=a.body;break;default:a=a.nodeName==="HTML"?a.ownerDocument.body:a}for(on=ls(a.firstChild),oi=u,Ee=!0,wr=null,Zn=!0,d=k0(u,null,m,d),u.child=d;d;)d.flags=d.flags&-3|4096,d=d.sibling}else{if(vl(),m===C){u=Gs(a,u,d);break t}un(a,u,m,d)}u=u.child}return u;case 26:return ks(a,u),a===null?(d=$f(u.type,null,u.pendingProps,null))?u.memoizedState=d:Ee||(d=u.type,a=u.pendingProps,m=Hl(ce.current).createElement(d),m[Fe]=u,m[Zi]=a,Ci(m,d,a),Ye(m),u.stateNode=m):u.memoizedState=$f(u.type,a.memoizedProps,u.pendingProps,a.memoizedState),null;case 27:return Be(u),a===null&&Ee&&(m=u.stateNode=Vf(u.type,u.pendingProps,ce.current),oi=u,Zn=!0,C=on,Xo(u.type)?(Wd=C,on=ls(m.firstChild)):on=C),un(a,u,u.pendingProps.children,d),ks(a,u),a===null&&(u.flags|=4194304),u.child;case 5:return a===null&&Ee&&((C=m=on)&&(m=yM(m,u.type,u.pendingProps,Zn),m!==null?(u.stateNode=m,oi=u,on=ls(m.firstChild),Zn=!1,C=!0):C=!1),C||co(u)),Be(u),C=u.type,E=u.pendingProps,z=a!==null?a.memoizedProps:null,m=E.children,Hf(C,E)?m=null:z!==null&&Hf(C,z)&&(u.flags|=32),u.memoizedState!==null&&(C=xd(a,u,dM,null,null,d),ng._currentValue=C),ks(a,u),un(a,u,m,d),u.child;case 6:return a===null&&Ee&&((a=d=on)&&(d=pe(d,u.pendingProps,Zn),d!==null?(u.stateNode=d,oi=u,on=null,a=!0):a=!1),a||co(u)),null;case 13:return gv(a,u,d);case 4:return ue(u,u.stateNode.containerInfo),m=u.pendingProps,a===null?u.child=Al(u,null,m,d):un(a,u,m,d),u.child;case 11:return uv(a,u,u.type,u.pendingProps,d);case 7:return un(a,u,u.pendingProps,d),u.child;case 8:return un(a,u,u.pendingProps.children,d),u.child;case 12:return un(a,u,u.pendingProps.children,d),u.child;case 10:return m=u.pendingProps,Wi(u,u.type,m.value),un(a,u,m.children,d),u.child;case 9:return C=u.type._context,m=u.pendingProps.children,ne(u),C=At(C),m=m(C),u.flags|=1,un(a,u,m,d),u.child;case 14:return fv(a,u,u.type,u.pendingProps,d);case 15:return hv(a,u,u.type,u.pendingProps,d);case 19:return pv(a,u,d);case 31:return ww(a,u,d);case 22:return Sw(a,u,d,u.pendingProps);case 24:return ne(u),m=At(Bn),a===null?(C=Ps(),C===null&&(C=Ke,E=ud(),C.pooledCache=E,E.refCount++,E!==null&&(C.pooledCacheLanes|=d),C=E),u.memoizedState={parent:m,cache:C},yd(u),Wi(u,Bn,C)):(a.lanes&d&&(tm(a,u),Tr(u,null,null,d),Ml()),C=a.memoizedState,E=u.memoizedState,C.parent!==m?(C={parent:m,cache:m},u.memoizedState=C,u.lanes===0&&(u.memoizedState=u.updateQueue.baseState=C),Wi(u,Bn,m)):(m=E.cache,Wi(u,Bn,m),m!==C.cache&&Ar(u,[Bn],d,!0))),un(a,u,u.pendingProps.children,d),u.child;case 29:throw u.pendingProps}throw Error(n(156,u.tag))}function Lr(a){a.flags|=4}function yv(a,u,d,m,C){if((u=(a.mode&32)!==0)&&(u=!1),u){if(a.flags|=16777216,(C&335544128)===C)if(a.stateNode.complete)a.flags|=8192;else if(Nw())a.flags|=8192;else throw Cl=_c,jc}else a.flags&=-16777217}function bv(a,u){if(u.type!=="stylesheet"||u.state.loading&4)a.flags&=-16777217;else if(a.flags|=16777216,!Ss(u))if(Nw())a.flags|=8192;else throw Cl=_c,jc}function Bi(a,u){u!==null&&(a.flags|=4),a.flags&16384&&(u=a.tag!==22?hc():536870912,a.lanes|=u,En|=u)}function wf(a,u){if(!Ee)switch(a.tailMode){case"hidden":u=a.tail;for(var d=null;u!==null;)u.alternate!==null&&(d=u),u=u.sibling;d===null?a.tail=null:d.sibling=null;break;case"collapsed":d=a.tail;for(var m=null;d!==null;)d.alternate!==null&&(m=d),d=d.sibling;m===null?u||a.tail===null?a.tail=null:a.tail.sibling=null:m.sibling=null}}function ee(a){var u=a.alternate!==null&&a.alternate.child===a.child,d=0,m=0;if(u)for(var C=a.child;C!==null;)d|=C.lanes|C.childLanes,m|=C.subtreeFlags&65011712,m|=C.flags&65011712,C.return=a,C=C.sibling;else for(C=a.child;C!==null;)d|=C.lanes|C.childLanes,m|=C.subtreeFlags,m|=C.flags,C.return=a,C=C.sibling;return a.subtreeFlags|=m,a.childLanes=d,u}function Cw(a,u,d){var m=u.pendingProps;switch(Fp(u),u.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ee(u),null;case 1:return ee(u),null;case 3:return d=u.stateNode,m=null,a!==null&&(m=a.memoizedState.cache),u.memoizedState.cache!==m&&(u.flags|=2048),Po(Bn),fe(),d.pendingContext&&(d.context=d.pendingContext,d.pendingContext=null),(a===null||a.child===null)&&(Er(u)?Lr(u):a===null||a.memoizedState.isDehydrated&&!(u.flags&256)||(u.flags|=1024,j0())),ee(u),null;case 26:var C=u.type,E=u.memoizedState;return a===null?(Lr(u),E!==null?(ee(u),bv(u,E)):(ee(u),yv(u,C,null,m,d))):E?E!==a.memoizedState?(Lr(u),ee(u),bv(u,E)):(ee(u),u.flags&=-16777217):(a=a.memoizedProps,a!==m&&Lr(u),ee(u),yv(u,C,a,m,d)),null;case 27:if(Lt(u),d=ce.current,C=u.type,a!==null&&u.stateNode!=null)a.memoizedProps!==m&&Lr(u);else{if(!m){if(u.stateNode===null)throw Error(n(166));return ee(u),null}a=Et.current,Er(u)?ld(u):(a=Vf(C,m,d),u.stateNode=a,Lr(u))}return ee(u),null;case 5:if(Lt(u),C=u.type,a!==null&&u.stateNode!=null)a.memoizedProps!==m&&Lr(u);else{if(!m){if(u.stateNode===null)throw Error(n(166));return ee(u),null}if(E=Et.current,Er(u))ld(u);else{var z=Hl(ce.current);switch(E){case 1:E=z.createElementNS("http://www.w3.org/2000/svg",C);break;case 2:E=z.createElementNS("http://www.w3.org/1998/Math/MathML",C);break;default:switch(C){case"svg":E=z.createElementNS("http://www.w3.org/2000/svg",C);break;case"math":E=z.createElementNS("http://www.w3.org/1998/Math/MathML",C);break;case"script":E=z.createElement("div"),E.innerHTML="<script><\/script>",E=E.removeChild(E.firstChild);break;case"select":E=typeof m.is=="string"?z.createElement("select",{is:m.is}):z.createElement("select"),m.multiple?E.multiple=!0:m.size&&(E.size=m.size);break;default:E=typeof m.is=="string"?z.createElement(C,{is:m.is}):z.createElement(C)}}E[Fe]=u,E[Zi]=m;t:for(z=u.child;z!==null;){if(z.tag===5||z.tag===6)E.appendChild(z.stateNode);else if(z.tag!==4&&z.tag!==27&&z.child!==null){z.child.return=z,z=z.child;continue}if(z===u)break t;for(;z.sibling===null;){if(z.return===null||z.return===u)break t;z=z.return}z.sibling.return=z.return,z=z.sibling}u.stateNode=E;t:switch(Ci(E,C,m),C){case"button":case"input":case"select":case"textarea":m=!!m.autoFocus;break t;case"img":m=!0;break t;default:m=!1}m&&Lr(u)}}return ee(u),yv(u,u.type,a===null?null:a.memoizedProps,u.pendingProps,d),null;case 6:if(a&&u.stateNode!=null)a.memoizedProps!==m&&Lr(u);else{if(typeof m!="string"&&u.stateNode===null)throw Error(n(166));if(a=ce.current,Er(u)){if(a=u.stateNode,d=u.memoizedProps,m=null,C=oi,C!==null)switch(C.tag){case 27:case 5:m=C.memoizedProps}a[Fe]=u,a=!!(a.nodeValue===d||m!==null&&m.suppressHydrationWarning===!0||Gv(a.nodeValue,d)),a||co(u,!0)}else a=Hl(a).createTextNode(m),a[Fe]=u,u.stateNode=a}return ee(u),null;case 31:if(d=u.memoizedState,a===null||a.memoizedState!==null){if(m=Er(u),d!==null){if(a===null){if(!m)throw Error(n(318));if(a=u.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(n(557));a[Fe]=u}else vl(),!(u.flags&128)&&(u.memoizedState=null),u.flags|=4;ee(u),a=!1}else d=j0(),a!==null&&a.memoizedState!==null&&(a.memoizedState.hydrationErrors=d),a=!0;if(!a)return u.flags&256?(es(u),u):(es(u),null);if(u.flags&128)throw Error(n(558))}return ee(u),null;case 13:if(m=u.memoizedState,a===null||a.memoizedState!==null&&a.memoizedState.dehydrated!==null){if(C=Er(u),m!==null&&m.dehydrated!==null){if(a===null){if(!C)throw Error(n(318));if(C=u.memoizedState,C=C!==null?C.dehydrated:null,!C)throw Error(n(317));C[Fe]=u}else vl(),!(u.flags&128)&&(u.memoizedState=null),u.flags|=4;ee(u),C=!1}else C=j0(),a!==null&&a.memoizedState!==null&&(a.memoizedState.hydrationErrors=C),C=!0;if(!C)return u.flags&256?(es(u),u):(es(u),null)}return es(u),u.flags&128?(u.lanes=d,u):(d=m!==null,a=a!==null&&a.memoizedState!==null,d&&(m=u.child,C=null,m.alternate!==null&&m.alternate.memoizedState!==null&&m.alternate.memoizedState.cachePool!==null&&(C=m.alternate.memoizedState.cachePool.pool),E=null,m.memoizedState!==null&&m.memoizedState.cachePool!==null&&(E=m.memoizedState.cachePool.pool),E!==C&&(m.flags|=2048)),d!==a&&d&&(u.child.flags|=8192),Bi(u,u.updateQueue),ee(u),null);case 4:return fe(),a===null&&Uf(u.stateNode.containerInfo),ee(u),null;case 10:return Po(u.type),ee(u),null;case 19:if(St(pn),m=u.memoizedState,m===null)return ee(u),null;if(C=(u.flags&128)!==0,E=m.rendering,E===null)if(C)wf(m,!1);else{if(an!==0||a!==null&&a.flags&128)for(a=u.child;a!==null;){if(E=gf(a),E!==null){for(u.flags|=128,wf(m,!1),a=E.updateQueue,u.updateQueue=a,Bi(u,a),u.subtreeFlags=0,a=d,d=u.child;d!==null;)R0(d,a),d=d.sibling;return Tt(pn,pn.current&1|2),Ee&&lo(u,m.treeForkCount),u.child}a=a.sibling}m.tail!==null&&Si()>Ve&&(u.flags|=128,C=!0,wf(m,!1),u.lanes=4194304)}else{if(!C)if(a=gf(E),a!==null){if(u.flags|=128,C=!0,a=a.updateQueue,u.updateQueue=a,Bi(u,a),wf(m,!0),m.tail===null&&m.tailMode==="hidden"&&!E.alternate&&!Ee)return ee(u),null}else 2*Si()-m.renderingStartTime>Ve&&d!==536870912&&(u.flags|=128,C=!0,wf(m,!1),u.lanes=4194304);m.isBackwards?(E.sibling=u.child,u.child=E):(a=m.last,a!==null?a.sibling=E:u.child=E,m.last=E)}return m.tail!==null?(a=m.tail,m.rendering=a,m.tail=a.sibling,m.renderingStartTime=Si(),a.sibling=null,d=pn.current,Tt(pn,C?d&1|2:d&1),Ee&&lo(u,m.treeForkCount),a):(ee(u),null);case 22:case 23:return es(u),hf(),m=u.memoizedState!==null,a!==null?a.memoizedState!==null!==m&&(u.flags|=8192):m&&(u.flags|=8192),m?d&536870912&&!(u.flags&128)&&(ee(u),u.subtreeFlags&6&&(u.flags|=8192)):ee(u),d=u.updateQueue,d!==null&&Bi(u,d.retryQueue),d=null,a!==null&&a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(d=a.memoizedState.cachePool.pool),m=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(m=u.memoizedState.cachePool.pool),m!==d&&(u.flags|=2048),a!==null&&St(Bs),null;case 24:return d=null,a!==null&&(d=a.memoizedState.cache),u.memoizedState.cache!==d&&(u.flags|=2048),Po(Bn),ee(u),null;case 25:return null;case 30:return null}throw Error(n(156,u.tag))}function Ew(a,u){switch(Fp(u),u.tag){case 1:return a=u.flags,a&65536?(u.flags=a&-65537|128,u):null;case 3:return Po(Bn),fe(),a=u.flags,a&65536&&!(a&128)?(u.flags=a&-65537|128,u):null;case 26:case 27:case 5:return Lt(u),null;case 31:if(u.memoizedState!==null){if(es(u),u.alternate===null)throw Error(n(340));vl()}return a=u.flags,a&65536?(u.flags=a&-65537|128,u):null;case 13:if(es(u),a=u.memoizedState,a!==null&&a.dehydrated!==null){if(u.alternate===null)throw Error(n(340));vl()}return a=u.flags,a&65536?(u.flags=a&-65537|128,u):null;case 19:return St(pn),null;case 4:return fe(),null;case 10:return Po(u.type),null;case 22:case 23:return es(u),hf(),a!==null&&St(Bs),a=u.flags,a&65536?(u.flags=a&-65537|128,u):null;case 24:return Po(Bn),null;case 25:return null;default:return null}}function Aw(a,u){switch(Fp(u),u.tag){case 3:Po(Bn),fe();break;case 26:case 27:case 5:Lt(u);break;case 4:fe();break;case 31:u.memoizedState!==null&&es(u);break;case 13:es(u);break;case 19:St(pn);break;case 10:Po(u.type);break;case 22:case 23:es(u),hf(),a!==null&&St(Bs);break;case 24:Po(Bn)}}function fo(a,u){try{var d=u.updateQueue,m=d!==null?d.lastEffect:null;if(m!==null){var C=m.next;d=C;do{if((d.tag&a)===a){m=void 0;var E=d.create,z=d.inst;m=E(),z.destroy=m}d=d.next}while(d!==C)}}catch(P){Qe(u,u.return,P)}}function $s(a,u,d){try{var m=u.updateQueue,C=m!==null?m.lastEffect:null;if(C!==null){var E=C.next;m=E;do{if((m.tag&a)===a){var z=m.inst,P=z.destroy;if(P!==void 0){z.destroy=void 0,C=u;var Q=d,ut=P;try{ut()}catch(bt){Qe(C,Q,bt)}}}m=m.next}while(m!==E)}}catch(bt){Qe(u,u.return,bt)}}function Om(a){var u=a.updateQueue;if(u!==null){var d=a.stateNode;try{Ol(u,d)}catch(m){Qe(a,a.return,m)}}}function _l(a,u,d){d.props=zl(a.type,a.memoizedProps),d.state=a.memoizedState;try{d.componentWillUnmount()}catch(m){Qe(a,u,m)}}function jr(a,u){try{var d=a.ref;if(d!==null){switch(a.tag){case 26:case 27:case 5:var m=a.stateNode;break;case 30:m=a.stateNode;break;default:m=a.stateNode}typeof d=="function"?a.refCleanup=d(m):d.current=m}}catch(C){Qe(a,u,C)}}function Vo(a,u){var d=a.ref,m=a.refCleanup;if(d!==null)if(typeof m=="function")try{m()}catch(C){Qe(a,u,C)}finally{a.refCleanup=null,a=a.alternate,a!=null&&(a.refCleanup=null)}else if(typeof d=="function")try{d(null)}catch(C){Qe(a,u,C)}else d.current=null}function vv(a){var u=a.type,d=a.memoizedProps,m=a.stateNode;try{t:switch(u){case"button":case"input":case"select":case"textarea":d.autoFocus&&m.focus();break t;case"img":d.src?m.src=d.src:d.srcSet&&(m.srcset=d.srcSet)}}catch(C){Qe(a,a.return,C)}}function Dm(a,u,d){try{var m=a.stateNode;qv(m,a.type,d,u),m[Zi]=u}catch(C){Qe(a,a.return,C)}}function xv(a){return a.tag===5||a.tag===3||a.tag===26||a.tag===27&&Xo(a.type)||a.tag===4}function Cf(a){t:for(;;){for(;a.sibling===null;){if(a.return===null||xv(a.return))return null;a=a.return}for(a.sibling.return=a.return,a=a.sibling;a.tag!==5&&a.tag!==6&&a.tag!==18;){if(a.tag===27&&Xo(a.type)||a.flags&2||a.child===null||a.tag===4)continue t;a.child.return=a,a=a.child}if(!(a.flags&2))return a.stateNode}}function Ef(a,u,d){var m=a.tag;if(m===5||m===6)a=a.stateNode,u?(d.nodeType===9?d.body:d.nodeName==="HTML"?d.ownerDocument.body:d).insertBefore(a,u):(u=d.nodeType===9?d.body:d.nodeName==="HTML"?d.ownerDocument.body:d,u.appendChild(a),d=d._reactRootContainer,d!=null||u.onclick!==null||(u.onclick=Mo));else if(m!==4&&(m===27&&Xo(a.type)&&(d=a.stateNode,u=null),a=a.child,a!==null))for(Ef(a,u,d),a=a.sibling;a!==null;)Ef(a,u,d),a=a.sibling}function Af(a,u,d){var m=a.tag;if(m===5||m===6)a=a.stateNode,u?d.insertBefore(a,u):d.appendChild(a);else if(m!==4&&(m===27&&Xo(a.type)&&(d=a.stateNode),a=a.child,a!==null))for(Af(a,u,d),a=a.sibling;a!==null;)Af(a,u,d),a=a.sibling}function Sv(a){var u=a.stateNode,d=a.memoizedProps;try{for(var m=a.type,C=u.attributes;C.length;)u.removeAttributeNode(C[0]);Ci(u,m,d),u[Fe]=a,u[Zi]=d}catch(E){Qe(a,a.return,E)}}var ja=!1,$n=!1,Rm=!1,wv=typeof WeakSet=="function"?WeakSet:Set,ci=null;function Tf(a,u){if(a=a.containerInfo,Fm=Jn,a=ml(a),ed(a)){if("selectionStart"in a)var d={start:a.selectionStart,end:a.selectionEnd};else t:{d=(d=a.ownerDocument)&&d.defaultView||window;var m=d.getSelection&&d.getSelection();if(m&&m.rangeCount!==0){d=m.anchorNode;var C=m.anchorOffset,E=m.focusNode;m=m.focusOffset;try{d.nodeType,E.nodeType}catch{d=null;break t}var z=0,P=-1,Q=-1,ut=0,bt=0,Ct=a,ft=null;e:for(;;){for(var mt;Ct!==d||C!==0&&Ct.nodeType!==3||(P=z+C),Ct!==E||m!==0&&Ct.nodeType!==3||(Q=z+m),Ct.nodeType===3&&(z+=Ct.nodeValue.length),(mt=Ct.firstChild)!==null;)ft=Ct,Ct=mt;for(;;){if(Ct===a)break e;if(ft===d&&++ut===C&&(P=z),ft===E&&++bt===m&&(Q=z),(mt=Ct.nextSibling)!==null)break;Ct=ft,ft=Ct.parentNode}Ct=mt}d=P===-1||Q===-1?null:{start:P,end:Q}}else d=null}d=d||{start:0,end:0}}else d=null;for(Jm={focusedElem:a,selectionRange:d},Jn=!1,ci=u;ci!==null;)if(u=ci,a=u.child,(u.subtreeFlags&1028)!==0&&a!==null)a.return=u,ci=a;else for(;ci!==null;){switch(u=ci,E=u.alternate,a=u.flags,u.tag){case 0:if(a&4&&(a=u.updateQueue,a=a!==null?a.events:null,a!==null))for(d=0;d<a.length;d++)C=a[d],C.ref.impl=C.nextImpl;break;case 11:case 15:break;case 1:if(a&1024&&E!==null){a=void 0,d=u,C=E.memoizedProps,E=E.memoizedState,m=d.stateNode;try{var Ut=zl(d.type,C);a=m.getSnapshotBeforeUpdate(Ut,E),m.__reactInternalSnapshotBeforeUpdate=a}catch(Jt){Qe(d,d.return,Jt)}}break;case 3:if(a&1024){if(a=u.stateNode.containerInfo,d=a.nodeType,d===9)Kd(a);else if(d===1)switch(a.nodeName){case"HEAD":case"HTML":case"BODY":Kd(a);break;default:a.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(a&1024)throw Error(n(163))}if(a=u.sibling,a!==null){a.return=u.return,ci=a;break}ci=u.return}}function _d(a,u,d){var m=d.flags;switch(d.tag){case 0:case 11:case 15:_a(a,d),m&4&&fo(5,d);break;case 1:if(_a(a,d),m&4)if(a=d.stateNode,u===null)try{a.componentDidMount()}catch(z){Qe(d,d.return,z)}else{var C=zl(d.type,u.memoizedProps);u=u.memoizedState;try{a.componentDidUpdate(C,u,a.__reactInternalSnapshotBeforeUpdate)}catch(z){Qe(d,d.return,z)}}m&64&&Om(d),m&512&&jr(d,d.return);break;case 3:if(_a(a,d),m&64&&(a=d.updateQueue,a!==null)){if(u=null,d.child!==null)switch(d.child.tag){case 27:case 5:u=d.child.stateNode;break;case 1:u=d.child.stateNode}try{Ol(a,u)}catch(z){Qe(d,d.return,z)}}break;case 27:u===null&&m&4&&Sv(d);case 26:case 5:_a(a,d),u===null&&m&4&&vv(d),m&512&&jr(d,d.return);break;case 12:_a(a,d);break;case 31:_a(a,d),m&4&&Tw(a,d);break;case 13:_a(a,d),m&4&&Av(a,d),m&64&&(a=d.memoizedState,a!==null&&(a=a.dehydrated,a!==null&&(d=qs.bind(null,d),kf(a,d))));break;case 22:if(m=d.memoizedState!==null||ja,!m){u=u!==null&&u.memoizedState!==null||$n,C=ja;var E=$n;ja=m,($n=u)&&!E?Go(a,d,(d.subtreeFlags&8772)!==0):_a(a,d),ja=C,$n=E}break;case 30:break;default:_a(a,d)}}function Cv(a){var u=a.alternate;u!==null&&(a.alternate=null,Cv(u)),a.child=null,a.deletions=null,a.sibling=null,a.tag===5&&(u=a.stateNode,u!==null&&Tp(u)),a.stateNode=null,a.return=null,a.dependencies=null,a.memoizedProps=null,a.memoizedState=null,a.pendingProps=null,a.stateNode=null,a.updateQueue=null}var rn=null,ss=!1;function _r(a,u,d){for(d=d.child;d!==null;)Ev(a,u,d),d=d.sibling}function Ev(a,u,d){if(ds&&typeof ds.onCommitFiberUnmount=="function")try{ds.onCommitFiberUnmount(fc,d)}catch{}switch(d.tag){case 26:$n||Vo(d,u),_r(a,u,d),d.memoizedState?d.memoizedState.count--:d.stateNode&&(d=d.stateNode,d.parentNode.removeChild(d));break;case 27:$n||Vo(d,u);var m=rn,C=ss;Xo(d.type)&&(rn=d.stateNode,ss=!1),_r(a,u,d),tu(d.stateNode),rn=m,ss=C;break;case 5:$n||Vo(d,u);case 6:if(m=rn,C=ss,rn=null,_r(a,u,d),rn=m,ss=C,rn!==null)if(ss)try{(rn.nodeType===9?rn.body:rn.nodeName==="HTML"?rn.ownerDocument.body:rn).removeChild(d.stateNode)}catch(E){Qe(d,u,E)}else try{rn.removeChild(d.stateNode)}catch(E){Qe(d,u,E)}break;case 18:rn!==null&&(ss?(a=rn,Zv(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,d.stateNode),Jf(a)):Zv(rn,d.stateNode));break;case 4:m=rn,C=ss,rn=d.stateNode.containerInfo,ss=!0,_r(a,u,d),rn=m,ss=C;break;case 0:case 11:case 14:case 15:$s(2,d,u),$n||$s(4,d,u),_r(a,u,d);break;case 1:$n||(Vo(d,u),m=d.stateNode,typeof m.componentWillUnmount=="function"&&_l(d,u,m)),_r(a,u,d);break;case 21:_r(a,u,d);break;case 22:$n=(m=$n)||d.memoizedState!==null,_r(a,u,d),$n=m;break;default:_r(a,u,d)}}function Tw(a,u){if(u.memoizedState===null&&(a=u.alternate,a!==null&&(a=a.memoizedState,a!==null))){a=a.dehydrated;try{Jf(a)}catch(d){Qe(u,u.return,d)}}}function Av(a,u){if(u.memoizedState===null&&(a=u.alternate,a!==null&&(a=a.memoizedState,a!==null&&(a=a.dehydrated,a!==null))))try{Jf(a)}catch(d){Qe(u,u.return,d)}}function Bd(a){switch(a.tag){case 31:case 13:case 19:var u=a.stateNode;return u===null&&(u=a.stateNode=new wv),u;case 22:return a=a.stateNode,u=a._retryCache,u===null&&(u=a._retryCache=new wv),u;default:throw Error(n(435,a.tag))}}function Pd(a,u){var d=Bd(a);u.forEach(function(m){if(!d.has(m)){d.add(m);var C=Iw.bind(null,a,m);m.then(C,C)}})}function os(a,u){var d=u.deletions;if(d!==null)for(var m=0;m<d.length;m++){var C=d[m],E=a,z=u,P=z;t:for(;P!==null;){switch(P.tag){case 27:if(Xo(P.type)){rn=P.stateNode,ss=!1;break t}break;case 5:rn=P.stateNode,ss=!1;break t;case 3:case 4:rn=P.stateNode.containerInfo,ss=!0;break t}P=P.return}if(rn===null)throw Error(n(160));Ev(E,z,C),rn=null,ss=!1,E=C.alternate,E!==null&&(E.return=null),C.return=null}if(u.subtreeFlags&13886)for(u=u.child;u!==null;)zm(u,a),u=u.sibling}var he=null;function zm(a,u){var d=a.alternate,m=a.flags;switch(a.tag){case 0:case 11:case 14:case 15:os(u,a),ms(a),m&4&&($s(3,a,a.return),fo(3,a),$s(5,a,a.return));break;case 1:os(u,a),ms(a),m&512&&($n||d===null||Vo(d,d.return)),m&64&&ja&&(a=a.updateQueue,a!==null&&(m=a.callbacks,m!==null&&(d=a.shared.hiddenCallbacks,a.shared.hiddenCallbacks=d===null?m:d.concat(m))));break;case 26:var C=he;if(os(u,a),ms(a),m&512&&($n||d===null||Vo(d,d.return)),m&4){var E=d!==null?d.memoizedState:null;if(m=a.memoizedState,d===null)if(m===null)if(a.stateNode===null){t:{m=a.type,d=a.memoizedProps,C=C.ownerDocument||C;e:switch(m){case"title":E=C.getElementsByTagName("title")[0],(!E||E[gr]||E[Fe]||E.namespaceURI==="http://www.w3.org/2000/svg"||E.hasAttribute("itemprop"))&&(E=C.createElement(m),C.head.insertBefore(E,C.querySelector("head > title"))),Ci(E,m,d),E[Fe]=a,Ye(E),m=E;break t;case"link":var z=Kv("link","href",C).get(m+(d.href||""));if(z){for(var P=0;P<z.length;P++)if(E=z[P],E.getAttribute("href")===(d.href==null||d.href===""?null:d.href)&&E.getAttribute("rel")===(d.rel==null?null:d.rel)&&E.getAttribute("title")===(d.title==null?null:d.title)&&E.getAttribute("crossorigin")===(d.crossOrigin==null?null:d.crossOrigin)){z.splice(P,1);break e}}E=C.createElement(m),Ci(E,m,d),C.head.appendChild(E);break;case"meta":if(z=Kv("meta","content",C).get(m+(d.content||""))){for(P=0;P<z.length;P++)if(E=z[P],E.getAttribute("content")===(d.content==null?null:""+d.content)&&E.getAttribute("name")===(d.name==null?null:d.name)&&E.getAttribute("property")===(d.property==null?null:d.property)&&E.getAttribute("http-equiv")===(d.httpEquiv==null?null:d.httpEquiv)&&E.getAttribute("charset")===(d.charSet==null?null:d.charSet)){z.splice(P,1);break e}}E=C.createElement(m),Ci(E,m,d),C.head.appendChild(E);break;default:throw Error(n(468,m))}E[Fe]=a,Ye(E),m=E}a.stateNode=m}else ny(C,a.type,a.stateNode);else a.stateNode=Jv(C,m,a.memoizedProps);else E!==m?(E===null?d.stateNode!==null&&(d=d.stateNode,d.parentNode.removeChild(d)):E.count--,m===null?ny(C,a.type,a.stateNode):Jv(C,m,a.memoizedProps)):m===null&&a.stateNode!==null&&Dm(a,a.memoizedProps,d.memoizedProps)}break;case 27:os(u,a),ms(a),m&512&&($n||d===null||Vo(d,d.return)),d!==null&&m&4&&Dm(a,a.memoizedProps,d.memoizedProps);break;case 5:if(os(u,a),ms(a),m&512&&($n||d===null||Vo(d,d.return)),a.flags&32){C=a.stateNode;try{mr(C,"")}catch(Ut){Qe(a,a.return,Ut)}}m&4&&a.stateNode!=null&&(C=a.memoizedProps,Dm(a,C,d!==null?d.memoizedProps:C)),m&1024&&(Rm=!0);break;case 6:if(os(u,a),ms(a),m&4){if(a.stateNode===null)throw Error(n(162));m=a.memoizedProps,d=a.stateNode;try{d.nodeValue=m}catch(Ut){Qe(a,a.return,Ut)}}break;case 3:if(Xf=null,C=he,he=Pi(u.containerInfo),os(u,a),he=C,ms(a),m&4&&d!==null&&d.memoizedState.isDehydrated)try{Jf(u.containerInfo)}catch(Ut){Qe(a,a.return,Ut)}Rm&&(Rm=!1,Tv(a));break;case 4:m=he,he=Pi(a.stateNode.containerInfo),os(u,a),ms(a),he=m;break;case 12:os(u,a),ms(a);break;case 31:os(u,a),ms(a),m&4&&(m=a.updateQueue,m!==null&&(a.updateQueue=null,Pd(a,m)));break;case 13:os(u,a),ms(a),a.child.flags&8192&&a.memoizedState!==null!=(d!==null&&d.memoizedState!==null)&&(Yo=Si()),m&4&&(m=a.updateQueue,m!==null&&(a.updateQueue=null,Pd(a,m)));break;case 22:C=a.memoizedState!==null;var Q=d!==null&&d.memoizedState!==null,ut=ja,bt=$n;if(ja=ut||C,$n=bt||Q,os(u,a),$n=bt,ja=ut,ms(a),m&8192)t:for(u=a.stateNode,u._visibility=C?u._visibility&-2:u._visibility|1,C&&(d===null||Q||ja||$n||Ic(a)),d=null,u=a;;){if(u.tag===5||u.tag===26){if(d===null){Q=d=u;try{if(E=Q.stateNode,C)z=E.style,typeof z.setProperty=="function"?z.setProperty("display","none","important"):z.display="none";else{P=Q.stateNode;var Ct=Q.memoizedProps.style,ft=Ct!=null&&Ct.hasOwnProperty("display")?Ct.display:null;P.style.display=ft==null||typeof ft=="boolean"?"":(""+ft).trim()}}catch(Ut){Qe(Q,Q.return,Ut)}}}else if(u.tag===6){if(d===null){Q=u;try{Q.stateNode.nodeValue=C?"":Q.memoizedProps}catch(Ut){Qe(Q,Q.return,Ut)}}}else if(u.tag===18){if(d===null){Q=u;try{var mt=Q.stateNode;C?Hn(mt,!0):Hn(Q.stateNode,!1)}catch(Ut){Qe(Q,Q.return,Ut)}}}else if((u.tag!==22&&u.tag!==23||u.memoizedState===null||u===a)&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===a)break t;for(;u.sibling===null;){if(u.return===null||u.return===a)break t;d===u&&(d=null),u=u.return}d===u&&(d=null),u.sibling.return=u.return,u=u.sibling}m&4&&(m=a.updateQueue,m!==null&&(d=m.retryQueue,d!==null&&(m.retryQueue=null,Pd(a,d))));break;case 19:os(u,a),ms(a),m&4&&(m=a.updateQueue,m!==null&&(a.updateQueue=null,Pd(a,m)));break;case 30:break;case 21:break;default:os(u,a),ms(a)}}function ms(a){var u=a.flags;if(u&2){try{for(var d,m=a.return;m!==null;){if(xv(m)){d=m;break}m=m.return}if(d==null)throw Error(n(160));switch(d.tag){case 27:var C=d.stateNode,E=Cf(a);Af(a,E,C);break;case 5:var z=d.stateNode;d.flags&32&&(mr(z,""),d.flags&=-33);var P=Cf(a);Af(a,P,z);break;case 3:case 4:var Q=d.stateNode.containerInfo,ut=Cf(a);Ef(a,ut,Q);break;default:throw Error(n(161))}}catch(bt){Qe(a,a.return,bt)}a.flags&=-3}u&4096&&(a.flags&=-4097)}function Tv(a){if(a.subtreeFlags&1024)for(a=a.child;a!==null;){var u=a;Tv(u),u.tag===5&&u.flags&1024&&u.stateNode.reset(),a=a.sibling}}function _a(a,u){if(u.subtreeFlags&8772)for(u=u.child;u!==null;)_d(a,u.alternate,u),u=u.sibling}function Ic(a){for(a=a.child;a!==null;){var u=a;switch(u.tag){case 0:case 11:case 14:case 15:$s(4,u,u.return),Ic(u);break;case 1:Vo(u,u.return);var d=u.stateNode;typeof d.componentWillUnmount=="function"&&_l(u,u.return,d),Ic(u);break;case 27:tu(u.stateNode);case 26:case 5:Vo(u,u.return),Ic(u);break;case 22:u.memoizedState===null&&Ic(u);break;case 30:Ic(u);break;default:Ic(u)}a=a.sibling}}function Go(a,u,d){for(d=d&&(u.subtreeFlags&8772)!==0,u=u.child;u!==null;){var m=u.alternate,C=a,E=u,z=E.flags;switch(E.tag){case 0:case 11:case 15:Go(C,E,d),fo(4,E);break;case 1:if(Go(C,E,d),m=E,C=m.stateNode,typeof C.componentDidMount=="function")try{C.componentDidMount()}catch(ut){Qe(m,m.return,ut)}if(m=E,C=m.updateQueue,C!==null){var P=m.stateNode;try{var Q=C.shared.hiddenCallbacks;if(Q!==null)for(C.shared.hiddenCallbacks=null,C=0;C<Q.length;C++)nm(Q[C],P)}catch(ut){Qe(m,m.return,ut)}}d&&z&64&&Om(E),jr(E,E.return);break;case 27:Sv(E);case 26:case 5:Go(C,E,d),d&&m===null&&z&4&&vv(E),jr(E,E.return);break;case 12:Go(C,E,d);break;case 31:Go(C,E,d),d&&z&4&&Tw(C,E);break;case 13:Go(C,E,d),d&&z&4&&Av(C,E);break;case 22:E.memoizedState===null&&Go(C,E,d),jr(E,E.return);break;case 30:break;default:Go(C,E,d)}u=u.sibling}}function Nm(a,u){var d=null;a!==null&&a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(d=a.memoizedState.cachePool.pool),a=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(a=u.memoizedState.cachePool.pool),a!==d&&(a!=null&&a.refCount++,d!=null&&fd(d))}function Lm(a,u){a=null,u.alternate!==null&&(a=u.alternate.memoizedState.cache),u=u.memoizedState.cache,u!==a&&(u.refCount++,a!=null&&fd(a))}function ho(a,u,d,m){if(u.subtreeFlags&10256)for(u=u.child;u!==null;)Mf(a,u,d,m),u=u.sibling}function Mf(a,u,d,m){var C=u.flags;switch(u.tag){case 0:case 11:case 15:ho(a,u,d,m),C&2048&&fo(9,u);break;case 1:ho(a,u,d,m);break;case 3:ho(a,u,d,m),C&2048&&(a=null,u.alternate!==null&&(a=u.alternate.memoizedState.cache),u=u.memoizedState.cache,u!==a&&(u.refCount++,a!=null&&fd(a)));break;case 12:if(C&2048){ho(a,u,d,m),a=u.stateNode;try{var E=u.memoizedProps,z=E.id,P=E.onPostCommit;typeof P=="function"&&P(z,u.alternate===null?"mount":"update",a.passiveEffectDuration,-0)}catch(Q){Qe(u,u.return,Q)}}else ho(a,u,d,m);break;case 31:ho(a,u,d,m);break;case 13:ho(a,u,d,m);break;case 23:break;case 22:E=u.stateNode,z=u.alternate,u.memoizedState!==null?E._visibility&2?ho(a,u,d,m):Ud(a,u):E._visibility&2?ho(a,u,d,m):(E._visibility|=2,Of(a,u,d,m,(u.subtreeFlags&10256)!==0||!1)),C&2048&&Nm(z,u);break;case 24:ho(a,u,d,m),C&2048&&Lm(u.alternate,u);break;default:ho(a,u,d,m)}}function Of(a,u,d,m,C){for(C=C&&((u.subtreeFlags&10256)!==0||!1),u=u.child;u!==null;){var E=a,z=u,P=d,Q=m,ut=z.flags;switch(z.tag){case 0:case 11:case 15:Of(E,z,P,Q,C),fo(8,z);break;case 23:break;case 22:var bt=z.stateNode;z.memoizedState!==null?bt._visibility&2?Of(E,z,P,Q,C):Ud(E,z):(bt._visibility|=2,Of(E,z,P,Q,C)),C&&ut&2048&&Nm(z.alternate,z);break;case 24:Of(E,z,P,Q,C),C&&ut&2048&&Lm(z.alternate,z);break;default:Of(E,z,P,Q,C)}u=u.sibling}}function Ud(a,u){if(u.subtreeFlags&10256)for(u=u.child;u!==null;){var d=a,m=u,C=m.flags;switch(m.tag){case 22:Ud(d,m),C&2048&&Nm(m.alternate,m);break;case 24:Ud(d,m),C&2048&&Lm(m.alternate,m);break;default:Ud(d,m)}u=u.sibling}}var ys=8192;function Br(a,u,d){if(a.subtreeFlags&ys)for(a=a.child;a!==null;)Mw(a,u,d),a=a.sibling}function Mw(a,u,d){switch(a.tag){case 26:Br(a,u,d),a.flags&ys&&a.memoizedState!==null&&Vr(d,he,a.memoizedState,a.memoizedProps);break;case 5:Br(a,u,d);break;case 3:case 4:var m=he;he=Pi(a.stateNode.containerInfo),Br(a,u,d),he=m;break;case 22:a.memoizedState===null&&(m=a.alternate,m!==null&&m.memoizedState!==null?(m=ys,ys=16777216,Br(a,u,d),ys=m):Br(a,u,d));break;default:Br(a,u,d)}}function jm(a){var u=a.alternate;if(u!==null&&(a=u.child,a!==null)){u.child=null;do u=a.sibling,a.sibling=null,a=u;while(a!==null)}}function Df(a){var u=a.deletions;if(a.flags&16){if(u!==null)for(var d=0;d<u.length;d++){var m=u[d];ci=m,_m(m,a)}jm(a)}if(a.subtreeFlags&10256)for(a=a.child;a!==null;)Mv(a),a=a.sibling}function Mv(a){switch(a.tag){case 0:case 11:case 15:Df(a),a.flags&2048&&$s(9,a,a.return);break;case 3:Df(a);break;case 12:Df(a);break;case 22:var u=a.stateNode;a.memoizedState!==null&&u._visibility&2&&(a.return===null||a.return.tag!==13)?(u._visibility&=-3,Hd(a)):Df(a);break;default:Df(a)}}function Hd(a){var u=a.deletions;if(a.flags&16){if(u!==null)for(var d=0;d<u.length;d++){var m=u[d];ci=m,_m(m,a)}jm(a)}for(a=a.child;a!==null;){switch(u=a,u.tag){case 0:case 11:case 15:$s(8,u,u.return),Hd(u);break;case 22:d=u.stateNode,d._visibility&2&&(d._visibility&=-3,Hd(u));break;default:Hd(u)}a=a.sibling}}function _m(a,u){for(;ci!==null;){var d=ci;switch(d.tag){case 0:case 11:case 15:$s(8,d,u);break;case 23:case 22:if(d.memoizedState!==null&&d.memoizedState.cachePool!==null){var m=d.memoizedState.cachePool.pool;m!=null&&m.refCount++}break;case 24:fd(d.memoizedState.cache)}if(m=d.child,m!==null)m.return=d,ci=m;else t:for(d=a;ci!==null;){m=ci;var C=m.sibling,E=m.return;if(Cv(m),m===d){ci=null;break t}if(C!==null){C.return=E,ci=C;break t}ci=E}}}var Ow={getCacheForType:function(a){var u=At(Bn),d=u.data.get(a);return d===void 0&&(d=a(),u.data.set(a,d)),d},cacheSignal:function(){return At(Bn).controller.signal}},Ov=typeof WeakMap=="function"?WeakMap:Map,Pe=0,Ke=null,Ae=null,xe=0,Ze=0,Wt=null,Pr=!1,Bl=!1,Bm=!1,$o=0,an=0,qo=0,Zc=0,Pm=0,rs=0,En=0,kd=null,An=null,Um=!1,Yo=0,Dv=0,Ve=1/0,Rf=null,mn=null,Fn=0,Ba=null,Pl=null,Ur=0,bs=0,Hm=null,km=null,zf=0,Vd=null;function vs(){return Pe&2&&xe!==0?xe&-xe:V.T!==null?Ym():Ep()}function Dw(){if(rs===0)if(!(xe&536870912)||Ee){var a=Eo;Eo<<=1,!(Eo&3932160)&&(Eo=262144),rs=a}else rs=536870912;return a=ts.current,a!==null&&(a.flags|=32),rs}function as(a,u,d){(a===Ke&&(Ze===2||Ze===9)||a.cancelPendingCommit!==null)&&(Hr(a,0),Pa(a,xe,rs,!1)),$u(a,d),(!(Pe&2)||a!==Ke)&&(a===Ke&&(!(Pe&2)&&(Zc|=d),an===4&&Pa(a,xe,rs,!1)),kr(a))}function Rw(a,u,d){if(Pe&6)throw Error(n(327));var m=!d&&(u&127)===0&&(u&a.expiredLanes)===0||Ao(a,u),C=m?_w(a,u):Gm(a,u,!0),E=m;do{if(C===0){Bl&&!m&&Pa(a,u,0,!1);break}else{if(d=a.current.alternate,E&&!zw(d)){C=Gm(a,u,!1),E=!1;continue}if(C===2){if(E=u,a.errorRecoveryDisabledLanes&E)var z=0;else z=a.pendingLanes&-536870913,z=z!==0?z:z&536870912?536870912:0;if(z!==0){u=z;t:{var P=a;C=kd;var Q=P.current.memoizedState.isDehydrated;if(Q&&(Hr(P,z).flags|=256),z=Gm(P,z,!1),z!==2){if(Bm&&!Q){P.errorRecoveryDisabledLanes|=E,Zc|=E,C=4;break t}E=An,An=C,E!==null&&(An===null?An=E:An.push.apply(An,E))}C=z}if(E=!1,C!==2)continue}}if(C===1){Hr(a,0),Pa(a,u,0,!0);break}t:{switch(m=a,E=C,E){case 0:case 1:throw Error(n(345));case 4:if((u&4194048)!==u)break;case 6:Pa(m,u,rs,!Pr);break t;case 2:An=null;break;case 3:case 5:break;default:throw Error(n(329))}if((u&62914560)===u&&(C=Yo+300-Si(),10<C)){if(Pa(m,u,rs,!Pr),jn(m,0,!0)!==0)break t;Ur=u,m.timeoutHandle=Jd(Gd.bind(null,m,d,An,Rf,Um,u,rs,Zc,En,Pr,E,"Throttled",-0,0),C);break t}Gd(m,d,An,Rf,Um,u,rs,Zc,En,Pr,E,null,-0,0)}}break}while(!0);kr(a)}function Gd(a,u,d,m,C,E,z,P,Q,ut,bt,Ct,ft,mt){if(a.timeoutHandle=-1,Ct=u.subtreeFlags,Ct&8192||(Ct&16785408)===16785408){Ct={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Mo},Mw(u,E,Ct);var Ut=(E&62914560)===E?Yo-Si():(E&4194048)===E?Dv-Si():0;if(Ut=tx(Ct,Ut),Ut!==null){Ur=E,a.cancelPendingCommit=Ut(Hw.bind(null,a,u,E,d,m,C,z,P,Q,bt,Ct,null,ft,mt)),Pa(a,E,z,!ut);return}}Hw(a,u,E,d,m,C,z,P,Q)}function zw(a){for(var u=a;;){var d=u.tag;if((d===0||d===11||d===15)&&u.flags&16384&&(d=u.updateQueue,d!==null&&(d=d.stores,d!==null)))for(var m=0;m<d.length;m++){var C=d[m],E=C.getSnapshot;C=C.value;try{if(!_i(E(),C))return!1}catch{return!1}}if(d=u.child,u.subtreeFlags&16384&&d!==null)d.return=u,u=d;else{if(u===a)break;for(;u.sibling===null;){if(u.return===null||u.return===a)return!0;u=u.return}u.sibling.return=u.return,u=u.sibling}}return!0}function Pa(a,u,d,m){u&=~Pm,u&=~Zc,a.suspendedLanes|=u,a.pingedLanes&=~u,m&&(a.warmLanes|=u),m=a.expirationTimes;for(var C=u;0<C;){var E=31-Ii(C),z=1<<E;m[E]=-1,C&=~z}d!==0&&qh(a,d,u)}function Nf(){return Pe&6?!0:(Ha(0),!1)}function Rv(){if(Ae!==null){if(Ze===0)var a=Ae.return;else a=Ae,Bo=Ta=null,Sd(a),El=null,Bc=0,a=Ae;for(;a!==null;)Aw(a.alternate,a),a=a.return;Ae=null}}function Hr(a,u){var d=a.timeoutHandle;d!==-1&&(a.timeoutHandle=-1,eC(d)),d=a.cancelPendingCommit,d!==null&&(a.cancelPendingCommit=null,d()),Ur=0,Rv(),Ke=a,Ae=d=Ea(a.current,null),xe=u,Ze=0,Wt=null,Pr=!1,Bl=Ao(a,u),Bm=!1,En=rs=Pm=Zc=qo=an=0,An=kd=null,Um=!1,u&8&&(u|=u&32);var m=a.entangledLanes;if(m!==0)for(a=a.entanglements,m&=u;0<m;){var C=31-Ii(m),E=1<<C;u|=a[C],m&=~E}return $o=u,Ns(),d}function Lf(a,u){ae=null,V.H=Dd,u===Sl||u===uf?(u=H0(),Ze=3):u===jc?(u=H0(),Ze=4):Ze=u===Cm?8:u!==null&&typeof u=="object"&&typeof u.then=="function"?6:1,Wt=u,Ae===null&&(an=1,Sf(a,js(u,a.current)))}function Nw(){var a=ts.current;return a===null?!0:(xe&4194048)===xe?Hs===null:(xe&62914560)===xe||xe&536870912?a===Hs:!1}function Lw(){var a=V.H;return V.H=Dd,a===null?Dd:a}function jw(){var a=V.A;return V.A=Ow,a}function Vm(){an=4,Pr||(xe&4194048)!==xe&&ts.current!==null||(Bl=!0),!(qo&134217727)&&!(Zc&134217727)||Ke===null||Pa(Ke,xe,rs,!1)}function Gm(a,u,d){var m=Pe;Pe|=2;var C=Lw(),E=jw();(Ke!==a||xe!==u)&&(Rf=null,Hr(a,u)),u=!1;var z=an;t:do try{if(Ze!==0&&Ae!==null){var P=Ae,Q=Wt;switch(Ze){case 8:Rv(),z=6;break t;case 3:case 2:case 9:case 6:ts.current===null&&(u=!0);var ut=Ze;if(Ze=0,Wt=null,Qc(a,P,Q,ut),d&&Bl){z=0;break t}break;default:ut=Ze,Ze=0,Wt=null,Qc(a,P,Q,ut)}}pM(),z=an;break}catch(bt){Lf(a,bt)}while(!0);return u&&a.shellSuspendCounter++,Bo=Ta=null,Pe=m,V.H=C,V.A=E,Ae===null&&(Ke=null,xe=0,Ns()),z}function pM(){for(;Ae!==null;)Bw(Ae)}function _w(a,u){var d=Pe;Pe|=2;var m=Lw(),C=jw();Ke!==a||xe!==u?(Rf=null,Ve=Si()+500,Hr(a,u)):Bl=Ao(a,u);t:do try{if(Ze!==0&&Ae!==null){u=Ae;var E=Wt;e:switch(Ze){case 1:Ze=0,Wt=null,Qc(a,u,E,1);break;case 2:case 9:if(P0(E)){Ze=0,Wt=null,Pw(u);break}u=function(){Ze!==2&&Ze!==9||Ke!==a||(Ze=7),kr(a)},E.then(u,u);break t;case 3:Ze=7;break t;case 4:Ze=5;break t;case 7:P0(E)?(Ze=0,Wt=null,Pw(u)):(Ze=0,Wt=null,Qc(a,u,E,7));break;case 5:var z=null;switch(Ae.tag){case 26:z=Ae.memoizedState;case 5:case 27:var P=Ae;if(z?Ss(z):P.stateNode.complete){Ze=0,Wt=null;var Q=P.sibling;if(Q!==null)Ae=Q;else{var ut=P.return;ut!==null?(Ae=ut,$d(ut)):Ae=null}break e}}Ze=0,Wt=null,Qc(a,u,E,5);break;case 6:Ze=0,Wt=null,Qc(a,u,E,6);break;case 8:Rv(),an=6;break t;default:throw Error(n(462))}}Ul();break}catch(bt){Lf(a,bt)}while(!0);return Bo=Ta=null,V.H=m,V.A=C,Pe=d,Ae!==null?0:(Ke=null,xe=0,Ns(),an)}function Ul(){for(;Ae!==null&&!uc();)Bw(Ae)}function Bw(a){var u=mv(a.alternate,a,$o);a.memoizedProps=a.pendingProps,u===null?$d(a):Ae=u}function Pw(a){var u=a,d=u.alternate;switch(u.tag){case 15:case 0:u=Ll(d,u,u.pendingProps,u.type,void 0,xe);break;case 11:u=Ll(d,u,u.pendingProps,u.type.render,u.ref,xe);break;case 5:Sd(u);default:Aw(d,u),u=Ae=R0(u,$o),u=mv(d,u,$o)}a.memoizedProps=a.pendingProps,u===null?$d(a):Ae=u}function Qc(a,u,d,m){Bo=Ta=null,Sd(u),El=null,Bc=0;var C=u.return;try{if(gM(a,C,u,d,xe)){an=1,Sf(a,js(d,a.current)),Ae=null;return}}catch(E){if(C!==null)throw Ae=C,E;an=1,Sf(a,js(d,a.current)),Ae=null;return}u.flags&32768?(Ee||m===1?a=!0:Bl||xe&536870912?a=!1:(Pr=a=!0,(m===2||m===9||m===3||m===6)&&(m=ts.current,m!==null&&m.tag===13&&(m.flags|=16384))),Uw(u,a)):$d(u)}function $d(a){var u=a;do{if(u.flags&32768){Uw(u,Pr);return}a=u.return;var d=Cw(u.alternate,u,$o);if(d!==null){Ae=d;return}if(u=u.sibling,u!==null){Ae=u;return}Ae=u=a}while(u!==null);an===0&&(an=5)}function Uw(a,u){do{var d=Ew(a.alternate,a);if(d!==null){d.flags&=32767,Ae=d;return}if(d=a.return,d!==null&&(d.flags|=32768,d.subtreeFlags=0,d.deletions=null),!u&&(a=a.sibling,a!==null)){Ae=a;return}Ae=a=d}while(a!==null);an=6,Ae=null}function Hw(a,u,d,m,C,E,z,P,Q){a.cancelPendingCommit=null;do jf();while(Fn!==0);if(Pe&6)throw Error(n(327));if(u!==null){if(u===a.current)throw Error(n(177));if(E=u.lanes|u.childLanes,E|=ro,wp(a,d,E,z,P,Q),a===Ke&&(Ae=Ke=null,xe=0),Pl=u,Ba=a,Ur=d,bs=E,Hm=C,km=m,u.subtreeFlags&10256||u.flags&10256?(a.callbackNode=null,a.callbackPriority=0,Zw(al,function(){return qw(),null})):(a.callbackNode=null,a.callbackPriority=0),m=(u.flags&13878)!==0,u.subtreeFlags&13878||m){m=V.T,V.T=null,C=ot.p,ot.p=2,z=Pe,Pe|=4;try{Tf(a,u,d)}finally{Pe=z,ot.p=C,V.T=m}}Fn=1,kw(),Vw(),Gw()}}function kw(){if(Fn===1){Fn=0;var a=Ba,u=Pl,d=(u.flags&13878)!==0;if(u.subtreeFlags&13878||d){d=V.T,V.T=null;var m=ot.p;ot.p=2;var C=Pe;Pe|=4;try{zm(u,a);var E=Jm,z=ml(a.containerInfo),P=E.focusedElem,Q=E.selectionRange;if(z!==P&&P&&P.ownerDocument&&Tc(P.ownerDocument.documentElement,P)){if(Q!==null&&ed(P)){var ut=Q.start,bt=Q.end;if(bt===void 0&&(bt=ut),"selectionStart"in P)P.selectionStart=ut,P.selectionEnd=Math.min(bt,P.value.length);else{var Ct=P.ownerDocument||document,ft=Ct&&Ct.defaultView||window;if(ft.getSelection){var mt=ft.getSelection(),Ut=P.textContent.length,Jt=Math.min(Q.start,Ut),tn=Q.end===void 0?Jt:Math.min(Q.end,Ut);!mt.extend&&Jt>tn&&(z=tn,tn=Jt,Jt=z);var rt=O0(P,Jt),it=O0(P,tn);if(rt&&it&&(mt.rangeCount!==1||mt.anchorNode!==rt.node||mt.anchorOffset!==rt.offset||mt.focusNode!==it.node||mt.focusOffset!==it.offset)){var at=Ct.createRange();at.setStart(rt.node,rt.offset),mt.removeAllRanges(),Jt>tn?(mt.addRange(at),mt.extend(it.node,it.offset)):(at.setEnd(it.node,it.offset),mt.addRange(at))}}}}for(Ct=[],mt=P;mt=mt.parentNode;)mt.nodeType===1&&Ct.push({element:mt,left:mt.scrollLeft,top:mt.scrollTop});for(typeof P.focus=="function"&&P.focus(),P=0;P<Ct.length;P++){var wt=Ct[P];wt.element.scrollLeft=wt.left,wt.element.scrollTop=wt.top}}Jn=!!Fm,Jm=Fm=null}finally{Pe=C,ot.p=m,V.T=d}}a.current=u,Fn=2}}function Vw(){if(Fn===2){Fn=0;var a=Ba,u=Pl,d=(u.flags&8772)!==0;if(u.subtreeFlags&8772||d){d=V.T,V.T=null;var m=ot.p;ot.p=2;var C=Pe;Pe|=4;try{_d(a,u.alternate,u)}finally{Pe=C,ot.p=m,V.T=d}}Fn=3}}function Gw(){if(Fn===4||Fn===3){Fn=0,vp();var a=Ba,u=Pl,d=Ur,m=km;u.subtreeFlags&10256||u.flags&10256?Fn=5:(Fn=0,Pl=Ba=null,$w(a,a.pendingLanes));var C=a.pendingLanes;if(C===0&&(mn=null),n0(d),u=u.stateNode,ds&&typeof ds.onCommitFiberRoot=="function")try{ds.onCommitFiberRoot(fc,u,void 0,(u.current.flags&128)===128)}catch{}if(m!==null){u=V.T,C=ot.p,ot.p=2,V.T=null;try{for(var E=a.onRecoverableError,z=0;z<m.length;z++){var P=m[z];E(P.value,{componentStack:P.stack})}}finally{V.T=u,ot.p=C}}Ur&3&&jf(),kr(a),C=a.pendingLanes,d&261930&&C&42?a===Vd?zf++:(zf=0,Vd=a):zf=0,Ha(0)}}function $w(a,u){(a.pooledCacheLanes&=u)===0&&(u=a.pooledCache,u!=null&&(a.pooledCache=null,fd(u)))}function jf(){return kw(),Vw(),Gw(),qw()}function qw(){if(Fn!==5)return!1;var a=Ba,u=bs;bs=0;var d=n0(Ur),m=V.T,C=ot.p;try{ot.p=32>d?32:d,V.T=null,d=Hm,Hm=null;var E=Ba,z=Ur;if(Fn=0,Pl=Ba=null,Ur=0,Pe&6)throw Error(n(331));var P=Pe;if(Pe|=4,Mv(E.current),Mf(E,E.current,z,d),Pe=P,Ha(0,!1),ds&&typeof ds.onPostCommitFiberRoot=="function")try{ds.onPostCommitFiberRoot(fc,E)}catch{}return!0}finally{ot.p=C,V.T=m,$w(a,u)}}function Yw(a,u,d){u=js(d,u),u=av(a.stateNode,u,2),a=Us(a,u,2),a!==null&&($u(a,2),kr(a))}function Qe(a,u,d){if(a.tag===3)Yw(a,a,d);else for(;u!==null;){if(u.tag===3){Yw(u,a,d);break}else if(u.tag===1){var m=u.stateNode;if(typeof u.type.getDerivedStateFromError=="function"||typeof m.componentDidCatch=="function"&&(mn===null||!mn.has(m))){a=js(d,a),d=lv(2),m=Us(u,d,2),m!==null&&(cv(d,m,u,a),$u(m,2),kr(m));break}}u=u.return}}function qd(a,u,d){var m=a.pingCache;if(m===null){m=a.pingCache=new Ov;var C=new Set;m.set(u,C)}else C=m.get(u),C===void 0&&(C=new Set,m.set(u,C));C.has(d)||(Bm=!0,C.add(d),a=zv.bind(null,a,u,d),u.then(a,a))}function zv(a,u,d){var m=a.pingCache;m!==null&&m.delete(u),a.pingedLanes|=a.suspendedLanes&d,a.warmLanes&=~d,Ke===a&&(xe&d)===d&&(an===4||an===3&&(xe&62914560)===xe&&300>Si()-Yo?!(Pe&2)&&Hr(a,0):Pm|=d,En===xe&&(En=0)),kr(a)}function Xw(a,u){u===0&&(u=hc()),a=Ca(a,u),a!==null&&($u(a,u),kr(a))}function qs(a){var u=a.memoizedState,d=0;u!==null&&(d=u.retryLane),Xw(a,d)}function Iw(a,u){var d=0;switch(a.tag){case 31:case 13:var m=a.stateNode,C=a.memoizedState;C!==null&&(d=C.retryLane);break;case 19:m=a.stateNode;break;case 22:m=a.stateNode._retryCache;break;default:throw Error(n(314))}m!==null&&m.delete(u),Xw(a,d)}function Zw(a,u){return sn(a,u)}var _f=null,Fc=null,Nv=!1,$m=!1,Lv=!1,Ua=0;function kr(a){a!==Fc&&a.next===null&&(Fc===null?_f=Fc=a:Fc=Fc.next=a),$m=!0,Nv||(Nv=!0,Xd())}function Ha(a,u){if(!Lv&&$m){Lv=!0;do for(var d=!1,m=_f;m!==null;){if(a!==0){var C=m.pendingLanes;if(C===0)var E=0;else{var z=m.suspendedLanes,P=m.pingedLanes;E=(1<<31-Ii(42|a)+1)-1,E&=C&~(z&~P),E=E&201326741?E&201326741|1:E?E|2:0}E!==0&&(d=!0,Jc(m,E))}else E=xe,E=jn(m,m===Ke?E:0,m.cancelPendingCommit!==null||m.timeoutHandle!==-1),!(E&3)||Ao(m,E)||(d=!0,Jc(m,E));m=m.next}while(d);Lv=!1}}function qm(){jv()}function jv(){$m=Nv=!1;var a=0;Ua!==0&&mM()&&(a=Ua);for(var u=Si(),d=null,m=_f;m!==null;){var C=m.next,E=_v(m,u);E===0?(m.next=null,d===null?_f=C:d.next=C,C===null&&(Fc=d)):(d=m,(a!==0||E&3)&&($m=!0)),m=C}Fn!==0&&Fn!==5||Ha(a),Ua!==0&&(Ua=0)}function _v(a,u){for(var d=a.suspendedLanes,m=a.pingedLanes,C=a.expirationTimes,E=a.pendingLanes&-62914561;0<E;){var z=31-Ii(E),P=1<<z,Q=C[z];Q===-1?(!(P&d)||P&m)&&(C[z]=Gu(P,u)):Q<=u&&(a.expiredLanes|=P),E&=~P}if(u=Ke,d=xe,d=jn(a,a===u?d:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),m=a.callbackNode,d===0||a===u&&(Ze===2||Ze===9)||a.cancelPendingCommit!==null)return m!==null&&m!==null&&Wb(m),a.callbackNode=null,a.callbackPriority=0;if(!(d&3)||Ao(a,d)){if(u=d&-d,u===a.callbackPriority)return u;switch(m!==null&&Wb(m),n0(d)){case 2:case 8:d=Sp;break;case 32:d=al;break;case 268435456:d=t0;break;default:d=al}return m=Yd.bind(null,a),d=sn(d,m),a.callbackPriority=u,a.callbackNode=d,u}return m!==null&&m!==null&&Wb(m),a.callbackPriority=2,a.callbackNode=null,2}function Yd(a,u){if(Fn!==0&&Fn!==5)return a.callbackNode=null,a.callbackPriority=0,null;var d=a.callbackNode;if(jf()&&a.callbackNode!==d)return null;var m=xe;return m=jn(a,a===Ke?m:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),m===0?null:(Rw(a,m,u),_v(a,Si()),a.callbackNode!=null&&a.callbackNode===d?Yd.bind(null,a):null)}function Jc(a,u){if(jf())return null;Rw(a,u,!0)}function Xd(){nC(function(){Pe&6?sn(xp,qm):jv()})}function Ym(){if(Ua===0){var a=xl;a===0&&(a=ba,ba<<=1,!(ba&261888)&&(ba=256)),Ua=a}return Ua}function Qw(a){return a==null||typeof a=="symbol"||typeof a=="boolean"?null:typeof a=="function"?a:no(""+a)}function Kc(a,u){var d=u.ownerDocument.createElement("input");return d.name=u.name,d.value=u.value,a.id&&d.setAttribute("form",a.id),u.parentNode.insertBefore(d,u),a=new FormData(a),d.parentNode.removeChild(d),a}function Id(a,u,d,m,C){if(u==="submit"&&d&&d.stateNode===C){var E=Qw((C[Zi]||null).action),z=m.submitter;z&&(u=(u=z[Zi]||null)?Qw(u.formAction):z.getAttribute("formAction"),u!==null&&(E=u,z=null));var P=new Kh("action","action",null,m,C);a.push({event:P,listeners:[{instance:null,listener:function(){if(m.defaultPrevented){if(Ua!==0){var Q=z?Kc(C,z):new FormData(C);vf(d,{pending:!0,data:Q,method:C.method,action:E},null,Q)}}else typeof E=="function"&&(P.preventDefault(),Q=z?Kc(C,z):new FormData(C),vf(d,{pending:!0,data:Q,method:C.method,action:E},E,Q))},currentTarget:C}]})}}for(var Xm=0;Xm<sf.length;Xm++){var Bf=sf[Xm],Bv=Bf.toLowerCase(),Pv=Bf[0].toUpperCase()+Bf.slice(1);Fi(Bv,"on"+Pv)}Fi(id,"onAnimationEnd"),Fi(D0,"onAnimationIteration"),Fi(Xp,"onAnimationStart"),Fi("dblclick","onDoubleClick"),Fi("focusin","onFocus"),Fi("focusout","onBlur"),Fi(Mc,"onTransitionRun"),Fi(sd,"onTransitionStart"),Fi(xr,"onTransitionCancel"),Fi(rw,"onTransitionEnd"),pr("onMouseEnter",["mouseout","mouseover"]),pr("onMouseLeave",["mouseout","mouseover"]),pr("onPointerEnter",["pointerout","pointerover"]),pr("onPointerLeave",["pointerout","pointerover"]),fl("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),fl("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),fl("onBeforeInput",["compositionend","keypress","textInput","paste"]),fl("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),fl("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),fl("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Pf="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(" "),Fw=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Pf));function Jw(a,u){u=(u&4)!==0;for(var d=0;d<a.length;d++){var m=a[d],C=m.event;m=m.listeners;t:{var E=void 0;if(u)for(var z=m.length-1;0<=z;z--){var P=m[z],Q=P.instance,ut=P.currentTarget;if(P=P.listener,Q!==E&&C.isPropagationStopped())break t;E=P,C.currentTarget=ut;try{E(C)}catch(bt){Oc(bt)}C.currentTarget=null,E=Q}else for(z=0;z<m.length;z++){if(P=m[z],Q=P.instance,ut=P.currentTarget,P=P.listener,Q!==E&&C.isPropagationStopped())break t;E=P,C.currentTarget=ut;try{E(C)}catch(bt){Oc(bt)}C.currentTarget=null,E=Q}}}}function we(a,u){var d=u[Ap];d===void 0&&(d=u[Ap]=new Set);var m=a+"__bubble";d.has(m)||(Zd(u,a,2,!1),d.add(m))}function Uv(a,u,d){var m=0;u&&(m|=4),Zd(d,a,m,u)}var Im="_reactListening"+Math.random().toString(36).slice(2);function Uf(a){if(!a[Im]){a[Im]=!0,mc.forEach(function(d){d!=="selectionchange"&&(Fw.has(d)||Uv(d,!1,a),Uv(d,!0,a))});var u=a.nodeType===9?a:a.ownerDocument;u===null||u[Im]||(u[Im]=!0,Uv("selectionchange",!1,u))}}function Zd(a,u,d,m){switch(ig(u)){case 2:var C=Gr;break;case 8:C=$r;break;default:C=Ei}d=C.bind(null,u,d,a),C=void 0,!Fh||u!=="touchstart"&&u!=="touchmove"&&u!=="wheel"||(C=!0),m?C!==void 0?a.addEventListener(u,d,{capture:!0,passive:C}):a.addEventListener(u,d,!0):C!==void 0?a.addEventListener(u,d,{passive:C}):a.addEventListener(u,d,!1)}function Hv(a,u,d,m,C){var E=m;if(!(u&1)&&!(u&2)&&m!==null)t:for(;;){if(m===null)return;var z=m.tag;if(z===3||z===4){var P=m.stateNode.containerInfo;if(P===C)break;if(z===4)for(z=m.return;z!==null;){var Q=z.tag;if((Q===3||Q===4)&&z.stateNode.containerInfo===C)return;z=z.return}for(;P!==null;){if(z=dc(P),z===null)return;if(Q=z.tag,Q===5||Q===6||Q===26||Q===27){m=E=z;continue t}P=P.parentNode}}m=m.return}f0(function(){var ut=E,bt=Lp(d),Ct=[];t:{var ft=Sr.get(a);if(ft!==void 0){var mt=Kh,Ut=a;switch(a){case"keypress":if(_p(d)===0)break t;case"keydown":case"keyup":mt=Hp;break;case"focusin":Ut="focus",mt=Pp;break;case"focusout":Ut="blur",mt=Pp;break;case"beforeblur":case"afterblur":mt=Pp;break;case"click":if(d.button===2)break t;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":mt=Ku;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":mt=ZS;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":mt=WS;break;case id:case D0:case Xp:mt=FS;break;case rw:mt=uM;break;case"scroll":case"scrollend":mt=lM;break;case"wheel":mt=fM;break;case"copy":case"cut":case"paste":mt=xc;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":mt=Ro;break;case"toggle":case"beforetoggle":mt=x0}var Jt=(u&4)!==0,tn=!Jt&&(a==="scroll"||a==="scrollend"),rt=Jt?ft!==null?ft+"Capture":null:ft;Jt=[];for(var it=ut,at;it!==null;){var wt=it;if(at=wt.stateNode,wt=wt.tag,wt!==5&&wt!==26&&wt!==27||at===null||rt===null||(wt=ii(it,rt),wt!=null&&Jt.push(Qd(it,wt,at))),tn)break;it=it.return}0<Jt.length&&(ft=new mt(ft,Ut,null,d,bt),Ct.push({event:ft,listeners:Jt}))}}if(!(u&7)){t:{if(ft=a==="mouseover"||a==="pointerover",mt=a==="mouseout"||a==="pointerout",ft&&d!==Np&&(Ut=d.relatedTarget||d.fromElement)&&(dc(Ut)||Ut[cl]))break t;if((mt||ft)&&(ft=bt.window===bt?bt:(ft=bt.ownerDocument)?ft.defaultView||ft.parentWindow:window,mt?(Ut=d.relatedTarget||d.toElement,mt=ut,Ut=Ut?dc(Ut):null,Ut!==null&&(tn=l(Ut),Jt=Ut.tag,Ut!==tn||Jt!==5&&Jt!==27&&Jt!==6)&&(Ut=null)):(mt=null,Ut=ut),mt!==Ut)){if(Jt=Ku,wt="onMouseLeave",rt="onMouseEnter",it="mouse",(a==="pointerout"||a==="pointerover")&&(Jt=Ro,wt="onPointerLeave",rt="onPointerEnter",it="pointer"),tn=mt==null?ft:qu(mt),at=Ut==null?ft:qu(Ut),ft=new Jt(wt,it+"leave",mt,d,bt),ft.target=tn,ft.relatedTarget=at,wt=null,dc(bt)===ut&&(Jt=new Jt(rt,it+"enter",Ut,d,bt),Jt.target=at,Jt.relatedTarget=tn,wt=Jt),tn=wt,mt&&Ut)e:{for(Jt=Kw,rt=mt,it=Ut,at=0,wt=rt;wt;wt=Jt(wt))at++;wt=0;for(var It=it;It;It=Jt(It))wt++;for(;0<at-wt;)rt=Jt(rt),at--;for(;0<wt-at;)it=Jt(it),wt--;for(;at--;){if(rt===it||it!==null&&rt===it.alternate){Jt=rt;break e}rt=Jt(rt),it=Jt(it)}Jt=null}else Jt=null;mt!==null&&Zm(Ct,ft,mt,Jt,!1),Ut!==null&&tn!==null&&Zm(Ct,tn,Ut,Jt,!0)}}t:{if(ft=ut?qu(ut):window,mt=ft.nodeName&&ft.nodeName.toLowerCase(),mt==="select"||mt==="input"&&ft.type==="file")var je=A0;else if(vr(ft))if(Gp)je=Ac;else{je=sw;var $t=iw}else mt=ft.nodeName,!mt||mt.toLowerCase()!=="input"||ft.type!=="checkbox"&&ft.type!=="radio"?ut&&u0(ut.elementType)&&(je=A0):je=pl;if(je&&(je=je(a,ut))){E0(Ct,je,d,bt);break t}$t&&$t(a,ft,ut),a==="focusout"&&ut&&ft.type==="number"&&ut.memoizedProps.value!=null&&yc(ft,"number",ft.value)}switch($t=ut?qu(ut):window,a){case"focusin":(vr($t)||$t.contentEditable==="true")&&(yl=$t,ef=ut,oo=null);break;case"focusout":oo=ef=yl=null;break;case"mousedown":No=!0;break;case"contextmenu":case"mouseup":case"dragend":No=!1,Yp(Ct,d,bt);break;case"selectionchange":if(nd)break;case"keydown":case"keyup":Yp(Ct,d,bt)}var oe;if(Wu)t:{switch(a){case"compositionstart":var de="onCompositionStart";break t;case"compositionend":de="onCompositionEnd";break t;case"compositionupdate":de="onCompositionUpdate";break t}de=void 0}else wc?Vp(a,d)&&(de="onCompositionEnd"):a==="keydown"&&d.keyCode===229&&(de="onCompositionStart");de&&(S0&&d.locale!=="ko"&&(wc||de!=="onCompositionStart"?de==="onCompositionEnd"&&wc&&(oe=d0()):(Sa=bt,h0="value"in Sa?Sa.value:Sa.textContent,wc=!0)),$t=Fd(ut,de),0<$t.length&&(de=new JS(de,a,null,d,bt),Ct.push({event:de,listeners:$t}),oe?de.data=oe:(oe=w0(d),oe!==null&&(de.data=oe)))),(oe=ji?nw(a,d):hM(a,d))&&(de=Fd(ut,"onBeforeInput"),0<de.length&&($t=new JS("onBeforeInput","beforeinput",null,d,bt),Ct.push({event:$t,listeners:de}),$t.data=oe)),Id(Ct,a,ut,d,bt)}Jw(Ct,u)})}function Qd(a,u,d){return{instance:a,listener:u,currentTarget:d}}function Fd(a,u){for(var d=u+"Capture",m=[];a!==null;){var C=a,E=C.stateNode;if(C=C.tag,C!==5&&C!==26&&C!==27||E===null||(C=ii(a,d),C!=null&&m.unshift(Qd(a,C,E)),C=ii(a,u),C!=null&&m.push(Qd(a,C,E))),a.tag===3)return m;a=a.return}return[]}function Kw(a){if(a===null)return null;do a=a.return;while(a&&a.tag!==5&&a.tag!==27);return a||null}function Zm(a,u,d,m,C){for(var E=u._reactName,z=[];d!==null&&d!==m;){var P=d,Q=P.alternate,ut=P.stateNode;if(P=P.tag,Q!==null&&Q===m)break;P!==5&&P!==26&&P!==27||ut===null||(Q=ut,C?(ut=ii(d,E),ut!=null&&z.unshift(Qd(d,ut,Q))):C||(ut=ii(d,E),ut!=null&&z.push(Qd(d,ut,Q)))),d=d.return}z.length!==0&&a.push({event:u,listeners:z})}var Ww=/\r\n?/g,kv=/\u0000|\uFFFD/g;function Vv(a){return(typeof a=="string"?a:""+a).replace(Ww,`
|
|
1004
|
+
`).replace(kv,"")}function Gv(a,u){return u=Vv(u),Vv(a)===u}function We(a,u,d,m,C,E){switch(d){case"children":typeof m=="string"?u==="body"||u==="textarea"&&m===""||mr(a,m):(typeof m=="number"||typeof m=="bigint")&&u!=="body"&&mr(a,""+m);break;case"className":Dp(a,"class",m);break;case"tabIndex":Dp(a,"tabindex",m);break;case"dir":case"role":case"viewBox":case"width":case"height":Dp(a,d,m);break;case"style":YS(a,m,E);break;case"data":if(u!=="object"){Dp(a,"data",m);break}case"src":case"href":if(m===""&&(u!=="a"||d!=="href")){a.removeAttribute(d);break}if(m==null||typeof m=="function"||typeof m=="symbol"||typeof m=="boolean"){a.removeAttribute(d);break}m=no(""+m),a.setAttribute(d,m);break;case"action":case"formAction":if(typeof m=="function"){a.setAttribute(d,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof E=="function"&&(d==="formAction"?(u!=="input"&&We(a,u,"name",C.name,C,null),We(a,u,"formEncType",C.formEncType,C,null),We(a,u,"formMethod",C.formMethod,C,null),We(a,u,"formTarget",C.formTarget,C,null)):(We(a,u,"encType",C.encType,C,null),We(a,u,"method",C.method,C,null),We(a,u,"target",C.target,C,null)));if(m==null||typeof m=="symbol"||typeof m=="boolean"){a.removeAttribute(d);break}m=no(""+m),a.setAttribute(d,m);break;case"onClick":m!=null&&(a.onclick=Mo);break;case"onScroll":m!=null&&we("scroll",a);break;case"onScrollEnd":m!=null&&we("scrollend",a);break;case"dangerouslySetInnerHTML":if(m!=null){if(typeof m!="object"||!("__html"in m))throw Error(n(61));if(d=m.__html,d!=null){if(C.children!=null)throw Error(n(60));a.innerHTML=d}}break;case"multiple":a.multiple=m&&typeof m!="function"&&typeof m!="symbol";break;case"muted":a.muted=m&&typeof m!="function"&&typeof m!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(m==null||typeof m=="function"||typeof m=="boolean"||typeof m=="symbol"){a.removeAttribute("xlink:href");break}d=no(""+m),a.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",d);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":m!=null&&typeof m!="function"&&typeof m!="symbol"?a.setAttribute(d,""+m):a.removeAttribute(d);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":m&&typeof m!="function"&&typeof m!="symbol"?a.setAttribute(d,""):a.removeAttribute(d);break;case"capture":case"download":m===!0?a.setAttribute(d,""):m!==!1&&m!=null&&typeof m!="function"&&typeof m!="symbol"?a.setAttribute(d,m):a.removeAttribute(d);break;case"cols":case"rows":case"size":case"span":m!=null&&typeof m!="function"&&typeof m!="symbol"&&!isNaN(m)&&1<=m?a.setAttribute(d,m):a.removeAttribute(d);break;case"rowSpan":case"start":m==null||typeof m=="function"||typeof m=="symbol"||isNaN(m)?a.removeAttribute(d):a.setAttribute(d,m);break;case"popover":we("beforetoggle",a),we("toggle",a),Iu(a,"popover",m);break;case"xlinkActuate":va(a,"http://www.w3.org/1999/xlink","xlink:actuate",m);break;case"xlinkArcrole":va(a,"http://www.w3.org/1999/xlink","xlink:arcrole",m);break;case"xlinkRole":va(a,"http://www.w3.org/1999/xlink","xlink:role",m);break;case"xlinkShow":va(a,"http://www.w3.org/1999/xlink","xlink:show",m);break;case"xlinkTitle":va(a,"http://www.w3.org/1999/xlink","xlink:title",m);break;case"xlinkType":va(a,"http://www.w3.org/1999/xlink","xlink:type",m);break;case"xmlBase":va(a,"http://www.w3.org/XML/1998/namespace","xml:base",m);break;case"xmlLang":va(a,"http://www.w3.org/XML/1998/namespace","xml:lang",m);break;case"xmlSpace":va(a,"http://www.w3.org/XML/1998/namespace","xml:space",m);break;case"is":Iu(a,"is",m);break;case"innerText":case"textContent":break;default:(!(2<d.length)||d[0]!=="o"&&d[0]!=="O"||d[1]!=="n"&&d[1]!=="N")&&(d=aM.get(d)||d,Iu(a,d,m))}}function $v(a,u,d,m,C,E){switch(d){case"style":YS(a,m,E);break;case"dangerouslySetInnerHTML":if(m!=null){if(typeof m!="object"||!("__html"in m))throw Error(n(61));if(d=m.__html,d!=null){if(C.children!=null)throw Error(n(60));a.innerHTML=d}}break;case"children":typeof m=="string"?mr(a,m):(typeof m=="number"||typeof m=="bigint")&&mr(a,""+m);break;case"onScroll":m!=null&&we("scroll",a);break;case"onScrollEnd":m!=null&&we("scrollend",a);break;case"onClick":m!=null&&(a.onclick=Mo);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!ul.hasOwnProperty(d))t:{if(d[0]==="o"&&d[1]==="n"&&(C=d.endsWith("Capture"),u=d.slice(2,C?d.length-7:void 0),E=a[Zi]||null,E=E!=null?E[d]:null,typeof E=="function"&&a.removeEventListener(u,E,C),typeof m=="function")){typeof E!="function"&&E!==null&&(d in a?a[d]=null:a.hasAttribute(d)&&a.removeAttribute(d)),a.addEventListener(u,m,C);break t}d in a?a[d]=m:m===!0?a.setAttribute(d,""):Iu(a,d,m)}}}function Ci(a,u,d){switch(u){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":we("error",a),we("load",a);var m=!1,C=!1,E;for(E in d)if(d.hasOwnProperty(E)){var z=d[E];if(z!=null)switch(E){case"src":m=!0;break;case"srcSet":C=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(n(137,u));default:We(a,u,E,z,d,null)}}C&&We(a,u,"srcSet",d.srcSet,d,null),m&&We(a,u,"src",d.src,d,null);return;case"input":we("invalid",a);var P=E=z=C=null,Q=null,ut=null;for(m in d)if(d.hasOwnProperty(m)){var bt=d[m];if(bt!=null)switch(m){case"name":C=bt;break;case"type":z=bt;break;case"checked":Q=bt;break;case"defaultChecked":ut=bt;break;case"value":E=bt;break;case"defaultValue":P=bt;break;case"children":case"dangerouslySetInnerHTML":if(bt!=null)throw Error(n(137,u));break;default:We(a,u,m,bt,d,null)}}Ih(a,E,P,Q,ut,z,C,!1);return;case"select":we("invalid",a),m=z=E=null;for(C in d)if(d.hasOwnProperty(C)&&(P=d[C],P!=null))switch(C){case"value":E=P;break;case"defaultValue":z=P;break;case"multiple":m=P;default:We(a,u,C,P,d,null)}u=E,d=z,a.multiple=!!m,u!=null?Zu(a,!!m,u,!1):d!=null&&Zu(a,!!m,d,!0);return;case"textarea":we("invalid",a),E=C=m=null;for(z in d)if(d.hasOwnProperty(z)&&(P=d[z],P!=null))switch(z){case"value":m=P;break;case"defaultValue":C=P;break;case"children":E=P;break;case"dangerouslySetInnerHTML":if(P!=null)throw Error(n(91));break;default:We(a,u,z,P,d,null)}c0(a,m,C,E);return;case"option":for(Q in d)if(d.hasOwnProperty(Q)&&(m=d[Q],m!=null))switch(Q){case"selected":a.selected=m&&typeof m!="function"&&typeof m!="symbol";break;default:We(a,u,Q,m,d,null)}return;case"dialog":we("beforetoggle",a),we("toggle",a),we("cancel",a),we("close",a);break;case"iframe":case"object":we("load",a);break;case"video":case"audio":for(m=0;m<Pf.length;m++)we(Pf[m],a);break;case"image":we("error",a),we("load",a);break;case"details":we("toggle",a);break;case"embed":case"source":case"link":we("error",a),we("load",a);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(ut in d)if(d.hasOwnProperty(ut)&&(m=d[ut],m!=null))switch(ut){case"children":case"dangerouslySetInnerHTML":throw Error(n(137,u));default:We(a,u,ut,m,d,null)}return;default:if(u0(u)){for(bt in d)d.hasOwnProperty(bt)&&(m=d[bt],m!==void 0&&$v(a,u,bt,m,d,void 0));return}}for(P in d)d.hasOwnProperty(P)&&(m=d[P],m!=null&&We(a,u,P,m,d,null))}function qv(a,u,d,m){switch(u){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var C=null,E=null,z=null,P=null,Q=null,ut=null,bt=null;for(mt in d){var Ct=d[mt];if(d.hasOwnProperty(mt)&&Ct!=null)switch(mt){case"checked":break;case"value":break;case"defaultValue":Q=Ct;default:m.hasOwnProperty(mt)||We(a,u,mt,null,m,Ct)}}for(var ft in m){var mt=m[ft];if(Ct=d[ft],m.hasOwnProperty(ft)&&(mt!=null||Ct!=null))switch(ft){case"type":E=mt;break;case"name":C=mt;break;case"checked":ut=mt;break;case"defaultChecked":bt=mt;break;case"value":z=mt;break;case"defaultValue":P=mt;break;case"children":case"dangerouslySetInnerHTML":if(mt!=null)throw Error(n(137,u));break;default:mt!==Ct&&We(a,u,ft,mt,m,Ct)}}Xh(a,z,P,Q,ut,bt,E,C);return;case"select":mt=z=P=ft=null;for(E in d)if(Q=d[E],d.hasOwnProperty(E)&&Q!=null)switch(E){case"value":break;case"multiple":mt=Q;default:m.hasOwnProperty(E)||We(a,u,E,null,m,Q)}for(C in m)if(E=m[C],Q=d[C],m.hasOwnProperty(C)&&(E!=null||Q!=null))switch(C){case"value":ft=E;break;case"defaultValue":P=E;break;case"multiple":z=E;default:E!==Q&&We(a,u,C,E,m,Q)}u=P,d=z,m=mt,ft!=null?Zu(a,!!d,ft,!1):!!m!=!!d&&(u!=null?Zu(a,!!d,u,!0):Zu(a,!!d,d?[]:"",!1));return;case"textarea":mt=ft=null;for(P in d)if(C=d[P],d.hasOwnProperty(P)&&C!=null&&!m.hasOwnProperty(P))switch(P){case"value":break;case"children":break;default:We(a,u,P,null,m,C)}for(z in m)if(C=m[z],E=d[z],m.hasOwnProperty(z)&&(C!=null||E!=null))switch(z){case"value":ft=C;break;case"defaultValue":mt=C;break;case"children":break;case"dangerouslySetInnerHTML":if(C!=null)throw Error(n(91));break;default:C!==E&&We(a,u,z,C,m,E)}l0(a,ft,mt);return;case"option":for(var Ut in d)if(ft=d[Ut],d.hasOwnProperty(Ut)&&ft!=null&&!m.hasOwnProperty(Ut))switch(Ut){case"selected":a.selected=!1;break;default:We(a,u,Ut,null,m,ft)}for(Q in m)if(ft=m[Q],mt=d[Q],m.hasOwnProperty(Q)&&ft!==mt&&(ft!=null||mt!=null))switch(Q){case"selected":a.selected=ft&&typeof ft!="function"&&typeof ft!="symbol";break;default:We(a,u,Q,ft,m,mt)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Jt in d)ft=d[Jt],d.hasOwnProperty(Jt)&&ft!=null&&!m.hasOwnProperty(Jt)&&We(a,u,Jt,null,m,ft);for(ut in m)if(ft=m[ut],mt=d[ut],m.hasOwnProperty(ut)&&ft!==mt&&(ft!=null||mt!=null))switch(ut){case"children":case"dangerouslySetInnerHTML":if(ft!=null)throw Error(n(137,u));break;default:We(a,u,ut,ft,m,mt)}return;default:if(u0(u)){for(var tn in d)ft=d[tn],d.hasOwnProperty(tn)&&ft!==void 0&&!m.hasOwnProperty(tn)&&$v(a,u,tn,void 0,m,ft);for(bt in m)ft=m[bt],mt=d[bt],!m.hasOwnProperty(bt)||ft===mt||ft===void 0&&mt===void 0||$v(a,u,bt,ft,m,mt);return}}for(var rt in d)ft=d[rt],d.hasOwnProperty(rt)&&ft!=null&&!m.hasOwnProperty(rt)&&We(a,u,rt,null,m,ft);for(Ct in m)ft=m[Ct],mt=d[Ct],!m.hasOwnProperty(Ct)||ft===mt||ft==null&&mt==null||We(a,u,Ct,ft,m,mt)}function Qm(a){switch(a){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Yv(){if(typeof performance.getEntriesByType=="function"){for(var a=0,u=0,d=performance.getEntriesByType("resource"),m=0;m<d.length;m++){var C=d[m],E=C.transferSize,z=C.initiatorType,P=C.duration;if(E&&P&&Qm(z)){for(z=0,P=C.responseEnd,m+=1;m<d.length;m++){var Q=d[m],ut=Q.startTime;if(ut>P)break;var bt=Q.transferSize,Ct=Q.initiatorType;bt&&Qm(Ct)&&(Q=Q.responseEnd,z+=bt*(Q<P?1:(P-ut)/(Q-ut)))}if(--m,u+=8*(E+z)/(C.duration/1e3),a++,10<a)break}}if(0<a)return u/a/1e6}return navigator.connection&&(a=navigator.connection.downlink,typeof a=="number")?a:5}var Fm=null,Jm=null;function Hl(a){return a.nodeType===9?a:a.ownerDocument}function tC(a){switch(a){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Xv(a,u){if(a===0)switch(u){case"svg":return 1;case"math":return 2;default:return 0}return a===1&&u==="foreignObject"?0:a}function Hf(a,u){return a==="textarea"||a==="noscript"||typeof u.children=="string"||typeof u.children=="number"||typeof u.children=="bigint"||typeof u.dangerouslySetInnerHTML=="object"&&u.dangerouslySetInnerHTML!==null&&u.dangerouslySetInnerHTML.__html!=null}var Km=null;function mM(){var a=window.event;return a&&a.type==="popstate"?a===Km?!1:(Km=a,!0):(Km=null,!1)}var Jd=typeof setTimeout=="function"?setTimeout:void 0,eC=typeof clearTimeout=="function"?clearTimeout:void 0,Wc=typeof Promise=="function"?Promise:void 0,nC=typeof queueMicrotask=="function"?queueMicrotask:typeof Wc<"u"?function(a){return Wc.resolve(null).then(a).catch(Iv)}:Jd;function Iv(a){setTimeout(function(){throw a})}function Xo(a){return a==="head"}function Zv(a,u){var d=u,m=0;do{var C=d.nextSibling;if(a.removeChild(d),C&&C.nodeType===8)if(d=C.data,d==="/$"||d==="/&"){if(m===0){a.removeChild(C),Jf(u);return}m--}else if(d==="$"||d==="$?"||d==="$~"||d==="$!"||d==="&")m++;else if(d==="html")tu(a.ownerDocument.documentElement);else if(d==="head"){d=a.ownerDocument.head,tu(d);for(var E=d.firstChild;E;){var z=E.nextSibling,P=E.nodeName;E[gr]||P==="SCRIPT"||P==="STYLE"||P==="LINK"&&E.rel.toLowerCase()==="stylesheet"||d.removeChild(E),E=z}}else d==="body"&&tu(a.ownerDocument.body);d=C}while(d);Jf(u)}function Hn(a,u){var d=a;a=0;do{var m=d.nextSibling;if(d.nodeType===1?u?(d._stashedDisplay=d.style.display,d.style.display="none"):(d.style.display=d._stashedDisplay||"",d.getAttribute("style")===""&&d.removeAttribute("style")):d.nodeType===3&&(u?(d._stashedText=d.nodeValue,d.nodeValue=""):d.nodeValue=d._stashedText||""),m&&m.nodeType===8)if(d=m.data,d==="/$"){if(a===0)break;a--}else d!=="$"&&d!=="$?"&&d!=="$~"&&d!=="$!"||a++;d=m}while(d)}function Kd(a){var u=a.firstChild;for(u&&u.nodeType===10&&(u=u.nextSibling);u;){var d=u;switch(u=u.nextSibling,d.nodeName){case"HTML":case"HEAD":case"BODY":Kd(d),Tp(d);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(d.rel.toLowerCase()==="stylesheet")continue}a.removeChild(d)}}function yM(a,u,d,m){for(;a.nodeType===1;){var C=d;if(a.nodeName.toLowerCase()!==u.toLowerCase()){if(!m&&(a.nodeName!=="INPUT"||a.type!=="hidden"))break}else if(m){if(!a[gr])switch(u){case"meta":if(!a.hasAttribute("itemprop"))break;return a;case"link":if(E=a.getAttribute("rel"),E==="stylesheet"&&a.hasAttribute("data-precedence"))break;if(E!==C.rel||a.getAttribute("href")!==(C.href==null||C.href===""?null:C.href)||a.getAttribute("crossorigin")!==(C.crossOrigin==null?null:C.crossOrigin)||a.getAttribute("title")!==(C.title==null?null:C.title))break;return a;case"style":if(a.hasAttribute("data-precedence"))break;return a;case"script":if(E=a.getAttribute("src"),(E!==(C.src==null?null:C.src)||a.getAttribute("type")!==(C.type==null?null:C.type)||a.getAttribute("crossorigin")!==(C.crossOrigin==null?null:C.crossOrigin))&&E&&a.hasAttribute("async")&&!a.hasAttribute("itemprop"))break;return a;default:return a}}else if(u==="input"&&a.type==="hidden"){var E=C.name==null?null:""+C.name;if(C.type==="hidden"&&a.getAttribute("name")===E)return a}else return a;if(a=ls(a.nextSibling),a===null)break}return null}function pe(a,u,d){if(u==="")return null;for(;a.nodeType!==3;)if((a.nodeType!==1||a.nodeName!=="INPUT"||a.type!=="hidden")&&!d||(a=ls(a.nextSibling),a===null))return null;return a}function iC(a,u){for(;a.nodeType!==8;)if((a.nodeType!==1||a.nodeName!=="INPUT"||a.type!=="hidden")&&!u||(a=ls(a.nextSibling),a===null))return null;return a}function go(a){return a.data==="$?"||a.data==="$~"}function kl(a){return a.data==="$!"||a.data==="$?"&&a.ownerDocument.readyState!=="loading"}function kf(a,u){var d=a.ownerDocument;if(a.data==="$~")a._reactRetry=u;else if(a.data!=="$?"||d.readyState!=="loading")u();else{var m=function(){u(),d.removeEventListener("DOMContentLoaded",m)};d.addEventListener("DOMContentLoaded",m),a._reactRetry=m}}function ls(a){for(;a!=null;a=a.nextSibling){var u=a.nodeType;if(u===1||u===3)break;if(u===8){if(u=a.data,u==="$"||u==="$!"||u==="$?"||u==="$~"||u==="&"||u==="F!"||u==="F")break;if(u==="/$"||u==="/&")return null}}return a}var Wd=null;function Wm(a){a=a.nextSibling;for(var u=0;a;){if(a.nodeType===8){var d=a.data;if(d==="/$"||d==="/&"){if(u===0)return ls(a.nextSibling);u--}else d!=="$"&&d!=="$!"&&d!=="$?"&&d!=="$~"&&d!=="&"||u++}a=a.nextSibling}return null}function Io(a){a=a.previousSibling;for(var u=0;a;){if(a.nodeType===8){var d=a.data;if(d==="$"||d==="$!"||d==="$?"||d==="$~"||d==="&"){if(u===0)return a;u--}else d!=="/$"&&d!=="/&"||u++}a=a.previousSibling}return null}function Vf(a,u,d){switch(u=Hl(d),a){case"html":if(a=u.documentElement,!a)throw Error(n(452));return a;case"head":if(a=u.head,!a)throw Error(n(453));return a;case"body":if(a=u.body,!a)throw Error(n(454));return a;default:throw Error(n(451))}}function tu(a){for(var u=a.attributes;u.length;)a.removeAttributeNode(u[0]);Tp(a)}var xs=new Map,tg=new Set;function Pi(a){return typeof a.getRootNode=="function"?a.getRootNode():a.nodeType===9?a:a.ownerDocument}var Zo=ot.d;ot.d={f:bM,r:sC,D:pt,C:Ge,L:vM,m:Qv,X:ka,S:Fv,M:Vl};function bM(){var a=Zo.f(),u=Nf();return a||u}function sC(a){var u=gc(a);u!==null&&u.tag===5&&u.type==="form"?Je(u):Zo.r(a)}var Gf=typeof document>"u"?null:document;function qn(a,u,d){var m=Gf;if(m&&typeof u=="string"&&u){var C=zs(u);C='link[rel="'+a+'"][href="'+C+'"]',typeof d=="string"&&(C+='[crossorigin="'+d+'"]'),tg.has(C)||(tg.add(C),a={rel:a,crossOrigin:d,href:u},m.querySelector(C)===null&&(u=m.createElement("link"),Ci(u,"link",a),Ye(u),m.head.appendChild(u)))}}function pt(a){Zo.D(a),qn("dns-prefetch",a,null)}function Ge(a,u){Zo.C(a,u),qn("preconnect",a,u)}function vM(a,u,d){Zo.L(a,u,d);var m=Gf;if(m&&a&&u){var C='link[rel="preload"][as="'+zs(u)+'"]';u==="image"&&d&&d.imageSrcSet?(C+='[imagesrcset="'+zs(d.imageSrcSet)+'"]',typeof d.imageSizes=="string"&&(C+='[imagesizes="'+zs(d.imageSizes)+'"]')):C+='[href="'+zs(a)+'"]';var E=C;switch(u){case"style":E=Ys(a);break;case"script":E=eu(a)}xs.has(E)||(a=S({rel:"preload",href:u==="image"&&d&&d.imageSrcSet?void 0:a,as:u},d),xs.set(E,a),m.querySelector(C)!==null||u==="style"&&m.querySelector(Gl(E))||u==="script"&&m.querySelector(Yf(E))||(u=m.createElement("link"),Ci(u,"link",a),Ye(u),m.head.appendChild(u)))}}function Qv(a,u){Zo.m(a,u);var d=Gf;if(d&&a){var m=u&&typeof u.as=="string"?u.as:"script",C='link[rel="modulepreload"][as="'+zs(m)+'"][href="'+zs(a)+'"]',E=C;switch(m){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":E=eu(a)}if(!xs.has(E)&&(a=S({rel:"modulepreload",href:a},u),xs.set(E,a),d.querySelector(C)===null)){switch(m){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(d.querySelector(Yf(E)))return}m=d.createElement("link"),Ci(m,"link",a),Ye(m),d.head.appendChild(m)}}}function Fv(a,u,d){Zo.S(a,u,d);var m=Gf;if(m&&a){var C=pc(m).hoistableStyles,E=Ys(a);u=u||"default";var z=C.get(E);if(!z){var P={loading:0,preload:null};if(z=m.querySelector(Gl(E)))P.loading=5;else{a=S({rel:"stylesheet",href:a,"data-precedence":u},d),(d=xs.get(E))&&ty(a,d);var Q=z=m.createElement("link");Ye(Q),Ci(Q,"link",a),Q._p=new Promise(function(ut,bt){Q.onload=ut,Q.onerror=bt}),Q.addEventListener("load",function(){P.loading|=1}),Q.addEventListener("error",function(){P.loading|=2}),P.loading|=4,eg(z,u,m)}z={type:"stylesheet",instance:z,count:1,state:P},C.set(E,z)}}}function ka(a,u){Zo.X(a,u);var d=Gf;if(d&&a){var m=pc(d).hoistableScripts,C=eu(a),E=m.get(C);E||(E=d.querySelector(Yf(C)),E||(a=S({src:a,async:!0},u),(u=xs.get(C))&&ey(a,u),E=d.createElement("script"),Ye(E),Ci(E,"link",a),d.head.appendChild(E)),E={type:"script",instance:E,count:1,state:null},m.set(C,E))}}function Vl(a,u){Zo.M(a,u);var d=Gf;if(d&&a){var m=pc(d).hoistableScripts,C=eu(a),E=m.get(C);E||(E=d.querySelector(Yf(C)),E||(a=S({src:a,async:!0,type:"module"},u),(u=xs.get(C))&&ey(a,u),E=d.createElement("script"),Ye(E),Ci(E,"link",a),d.head.appendChild(E)),E={type:"script",instance:E,count:1,state:null},m.set(C,E))}}function $f(a,u,d,m){var C=(C=ce.current)?Pi(C):null;if(!C)throw Error(n(446));switch(a){case"meta":case"title":return null;case"style":return typeof d.precedence=="string"&&typeof d.href=="string"?(u=Ys(d.href),d=pc(C).hoistableStyles,m=d.get(u),m||(m={type:"style",instance:null,count:0,state:null},d.set(u,m)),m):{type:"void",instance:null,count:0,state:null};case"link":if(d.rel==="stylesheet"&&typeof d.href=="string"&&typeof d.precedence=="string"){a=Ys(d.href);var E=pc(C).hoistableStyles,z=E.get(a);if(z||(C=C.ownerDocument||C,z={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},E.set(a,z),(E=C.querySelector(Gl(a)))&&!E._p&&(z.instance=E,z.state.loading=5),xs.has(a)||(d={rel:"preload",as:"style",href:d.href,crossOrigin:d.crossOrigin,integrity:d.integrity,media:d.media,hrefLang:d.hrefLang,referrerPolicy:d.referrerPolicy},xs.set(a,d),E||oC(C,a,d,z.state))),u&&m===null)throw Error(n(528,""));return z}if(u&&m!==null)throw Error(n(529,""));return null;case"script":return u=d.async,d=d.src,typeof d=="string"&&u&&typeof u!="function"&&typeof u!="symbol"?(u=eu(d),d=pc(C).hoistableScripts,m=d.get(u),m||(m={type:"script",instance:null,count:0,state:null},d.set(u,m)),m):{type:"void",instance:null,count:0,state:null};default:throw Error(n(444,a))}}function Ys(a){return'href="'+zs(a)+'"'}function Gl(a){return'link[rel="stylesheet"]['+a+"]"}function qf(a){return S({},a,{"data-precedence":a.precedence,precedence:null})}function oC(a,u,d,m){a.querySelector('link[rel="preload"][as="style"]['+u+"]")?m.loading=1:(u=a.createElement("link"),m.preload=u,u.addEventListener("load",function(){return m.loading|=1}),u.addEventListener("error",function(){return m.loading|=2}),Ci(u,"link",d),Ye(u),a.head.appendChild(u))}function eu(a){return'[src="'+zs(a)+'"]'}function Yf(a){return"script[async]"+a}function Jv(a,u,d){if(u.count++,u.instance===null)switch(u.type){case"style":var m=a.querySelector('style[data-href~="'+zs(d.href)+'"]');if(m)return u.instance=m,Ye(m),m;var C=S({},d,{"data-href":d.href,"data-precedence":d.precedence,href:null,precedence:null});return m=(a.ownerDocument||a).createElement("style"),Ye(m),Ci(m,"style",C),eg(m,d.precedence,a),u.instance=m;case"stylesheet":C=Ys(d.href);var E=a.querySelector(Gl(C));if(E)return u.state.loading|=4,u.instance=E,Ye(E),E;m=qf(d),(C=xs.get(C))&&ty(m,C),E=(a.ownerDocument||a).createElement("link"),Ye(E);var z=E;return z._p=new Promise(function(P,Q){z.onload=P,z.onerror=Q}),Ci(E,"link",m),u.state.loading|=4,eg(E,d.precedence,a),u.instance=E;case"script":return E=eu(d.src),(C=a.querySelector(Yf(E)))?(u.instance=C,Ye(C),C):(m=d,(C=xs.get(E))&&(m=S({},d),ey(m,C)),a=a.ownerDocument||a,C=a.createElement("script"),Ye(C),Ci(C,"link",m),a.head.appendChild(C),u.instance=C);case"void":return null;default:throw Error(n(443,u.type))}else u.type==="stylesheet"&&!(u.state.loading&4)&&(m=u.instance,u.state.loading|=4,eg(m,d.precedence,a));return u.instance}function eg(a,u,d){for(var m=d.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),C=m.length?m[m.length-1]:null,E=C,z=0;z<m.length;z++){var P=m[z];if(P.dataset.precedence===u)E=P;else if(E!==C)break}E?E.parentNode.insertBefore(a,E.nextSibling):(u=d.nodeType===9?d.head:d,u.insertBefore(a,u.firstChild))}function ty(a,u){a.crossOrigin==null&&(a.crossOrigin=u.crossOrigin),a.referrerPolicy==null&&(a.referrerPolicy=u.referrerPolicy),a.title==null&&(a.title=u.title)}function ey(a,u){a.crossOrigin==null&&(a.crossOrigin=u.crossOrigin),a.referrerPolicy==null&&(a.referrerPolicy=u.referrerPolicy),a.integrity==null&&(a.integrity=u.integrity)}var Xf=null;function Kv(a,u,d){if(Xf===null){var m=new Map,C=Xf=new Map;C.set(d,m)}else C=Xf,m=C.get(d),m||(m=new Map,C.set(d,m));if(m.has(a))return m;for(m.set(a,null),d=d.getElementsByTagName(a),C=0;C<d.length;C++){var E=d[C];if(!(E[gr]||E[Fe]||a==="link"&&E.getAttribute("rel")==="stylesheet")&&E.namespaceURI!=="http://www.w3.org/2000/svg"){var z=E.getAttribute(u)||"";z=a+z;var P=m.get(z);P?P.push(E):m.set(z,[E])}}return m}function ny(a,u,d){a=a.ownerDocument||a,a.head.insertBefore(d,u==="title"?a.querySelector("head > title"):null)}function Wv(a,u,d){if(d===1||u.itemProp!=null)return!1;switch(a){case"meta":case"title":return!0;case"style":if(typeof u.precedence!="string"||typeof u.href!="string"||u.href==="")break;return!0;case"link":if(typeof u.rel!="string"||typeof u.href!="string"||u.href===""||u.onLoad||u.onError)break;switch(u.rel){case"stylesheet":return a=u.disabled,typeof u.precedence=="string"&&a==null;default:return!0}case"script":if(u.async&&typeof u.async!="function"&&typeof u.async!="symbol"&&!u.onLoad&&!u.onError&&u.src&&typeof u.src=="string")return!0}return!1}function Ss(a){return!(a.type==="stylesheet"&&!(a.state.loading&3))}function Vr(a,u,d,m){if(d.type==="stylesheet"&&(typeof m.media!="string"||matchMedia(m.media).matches!==!1)&&!(d.state.loading&4)){if(d.instance===null){var C=Ys(m.href),E=u.querySelector(Gl(C));if(E){u=E._p,u!==null&&typeof u=="object"&&typeof u.then=="function"&&(a.count++,a=iy.bind(a),u.then(a,a)),d.state.loading|=4,d.instance=E,Ye(E);return}E=u.ownerDocument||u,m=qf(m),(C=xs.get(C))&&ty(m,C),E=E.createElement("link"),Ye(E);var z=E;z._p=new Promise(function(P,Q){z.onload=P,z.onerror=Q}),Ci(E,"link",m),d.instance=E}a.stylesheets===null&&(a.stylesheets=new Map),a.stylesheets.set(d,u),(u=d.state.preload)&&!(d.state.loading&3)&&(a.count++,d=iy.bind(a),u.addEventListener("load",d),u.addEventListener("error",d))}}var Xs=0;function tx(a,u){return a.stylesheets&&a.count===0&&oy(a,a.stylesheets),0<a.count||0<a.imgCount?function(d){var m=setTimeout(function(){if(a.stylesheets&&oy(a,a.stylesheets),a.unsuspend){var E=a.unsuspend;a.unsuspend=null,E()}},6e4+u);0<a.imgBytes&&Xs===0&&(Xs=62500*Yv());var C=setTimeout(function(){if(a.waitingForImages=!1,a.count===0&&(a.stylesheets&&oy(a,a.stylesheets),a.unsuspend)){var E=a.unsuspend;a.unsuspend=null,E()}},(a.imgBytes>Xs?50:800)+u);return a.unsuspend=d,function(){a.unsuspend=null,clearTimeout(m),clearTimeout(C)}}:null}function iy(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)oy(this,this.stylesheets);else if(this.unsuspend){var a=this.unsuspend;this.unsuspend=null,a()}}}var sy=null;function oy(a,u){a.stylesheets=null,a.unsuspend!==null&&(a.count++,sy=new Map,u.forEach(ui,a),sy=null,iy.call(a))}function ui(a,u){if(!(u.state.loading&4)){var d=sy.get(a);if(d)var m=d.get(null);else{d=new Map,sy.set(a,d);for(var C=a.querySelectorAll("link[data-precedence],style[data-precedence]"),E=0;E<C.length;E++){var z=C[E];(z.nodeName==="LINK"||z.getAttribute("media")!=="not all")&&(d.set(z.dataset.precedence,z),m=z)}m&&d.set(null,m)}C=u.instance,z=C.getAttribute("data-precedence"),E=d.get(z)||m,E===m&&d.set(null,C),d.set(z,C),this.count++,m=iy.bind(this),C.addEventListener("load",m),C.addEventListener("error",m),E?E.parentNode.insertBefore(C,E.nextSibling):(a=a.nodeType===9?a.head:a,a.insertBefore(C,a.firstChild)),u.state.loading|=4}}var ng={$$typeof:_,Provider:null,Consumer:null,_currentValue:tt,_currentValue2:tt,_threadCount:0};function ex(a,u,d,m,C,E,z,P,Q){this.tag=1,this.containerInfo=a,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=$h(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=$h(0),this.hiddenUpdates=$h(null),this.identifierPrefix=m,this.onUncaughtError=C,this.onCaughtError=E,this.onRecoverableError=z,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=Q,this.incompleteTransitions=new Map}function ry(a,u,d,m,C,E,z,P,Q,ut,bt,Ct){return a=new ex(a,u,d,z,Q,ut,bt,Ct,P),u=1,E===!0&&(u|=24),E=Dn(3,null,null,u),a.current=E,E.stateNode=a,u=ud(),u.refCount++,a.pooledCache=u,u.refCount++,E.memoizedState={element:m,isDehydrated:d,cache:u},yd(E),a}function nu(a){return a?(a=Ji,a):Ji}function rC(a,u,d,m,C,E){C=nu(C),m.context===null?m.context=C:m.pendingContext=C,m=Ra(u),m.payload={element:d},E=E===void 0?null:E,E!==null&&(m.callback=E),d=Us(a,m,u),d!==null&&(as(d,a,u),Tl(d,a,u))}function ay(a,u){if(a=a.memoizedState,a!==null&&a.dehydrated!==null){var d=a.retryLane;a.retryLane=d!==0&&d<u?d:u}}function nx(a,u){ay(a,u),(a=a.alternate)&&ay(a,u)}function aC(a){if(a.tag===13||a.tag===31){var u=Ca(a,67108864);u!==null&&as(u,a,67108864),nx(a,67108864)}}function iu(a){if(a.tag===13||a.tag===31){var u=vs();u=Cp(u);var d=Ca(a,u);d!==null&&as(d,a,u),nx(a,u)}}var Jn=!0;function Gr(a,u,d,m){var C=V.T;V.T=null;var E=ot.p;try{ot.p=2,Ei(a,u,d,m)}finally{ot.p=E,V.T=C}}function $r(a,u,d,m){var C=V.T;V.T=null;var E=ot.p;try{ot.p=8,Ei(a,u,d,m)}finally{ot.p=E,V.T=C}}function Ei(a,u,d,m){if(Jn){var C=ix(m);if(C===null)Hv(a,u,m,ly,d),Va(a,m);else if(xM(C,a,u,d,m))m.stopPropagation();else if(Va(a,m),u&4&&-1<cs.indexOf(a)){for(;C!==null;){var E=gc(C);if(E!==null)switch(E.tag){case 3:if(E=E.stateNode,E.current.memoizedState.isDehydrated){var z=eo(E.pendingLanes);if(z!==0){var P=E;for(P.pendingLanes|=2,P.entangledLanes|=2;z;){var Q=1<<31-Ii(z);P.entanglements[1]|=Q,z&=~Q}kr(E),!(Pe&6)&&(Ve=Si()+500,Ha(0))}}break;case 31:case 13:P=Ca(E,2),P!==null&&as(P,E,2),Nf(),nx(E,2)}if(E=ix(m),E===null&&Hv(a,u,m,ly,d),E===C)break;C=E}C!==null&&m.stopPropagation()}else Hv(a,u,m,null,d)}}function ix(a){return a=Lp(a),If(a)}var ly=null;function If(a){if(ly=null,a=dc(a),a!==null){var u=l(a);if(u===null)a=null;else{var d=u.tag;if(d===13){if(a=f(u),a!==null)return a;a=null}else if(d===31){if(a=h(u),a!==null)return a;a=null}else if(d===3){if(u.stateNode.current.memoizedState.isDehydrated)return u.tag===3?u.stateNode.containerInfo:null;a=null}else u!==a&&(a=null)}}return ly=a,null}function ig(a){switch(a){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(sM()){case xp:return 2;case Sp:return 8;case al:case oM:return 32;case t0:return 268435456;default:return 32}default:return 32}}var Zf=!1,Kn=null,Ai=null,Ui=null,$l=new Map,po=new Map,yn=[],cs="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function Va(a,u){switch(a){case"focusin":case"focusout":Kn=null;break;case"dragenter":case"dragleave":Ai=null;break;case"mouseover":case"mouseout":Ui=null;break;case"pointerover":case"pointerout":$l.delete(u.pointerId);break;case"gotpointercapture":case"lostpointercapture":po.delete(u.pointerId)}}function su(a,u,d,m,C,E){return a===null||a.nativeEvent!==E?(a={blockedOn:u,domEventName:d,eventSystemFlags:m,nativeEvent:E,targetContainers:[C]},u!==null&&(u=gc(u),u!==null&&aC(u)),a):(a.eventSystemFlags|=m,u=a.targetContainers,C!==null&&u.indexOf(C)===-1&&u.push(C),a)}function xM(a,u,d,m,C){switch(u){case"focusin":return Kn=su(Kn,a,u,d,m,C),!0;case"dragenter":return Ai=su(Ai,a,u,d,m,C),!0;case"mouseover":return Ui=su(Ui,a,u,d,m,C),!0;case"pointerover":var E=C.pointerId;return $l.set(E,su($l.get(E)||null,a,u,d,m,C)),!0;case"gotpointercapture":return E=C.pointerId,po.set(E,su(po.get(E)||null,a,u,d,m,C)),!0}return!1}function lC(a){var u=dc(a.target);if(u!==null){var d=l(u);if(d!==null){if(u=d.tag,u===13){if(u=f(d),u!==null){a.blockedOn=u,i0(a.priority,function(){iu(d)});return}}else if(u===31){if(u=h(d),u!==null){a.blockedOn=u,i0(a.priority,function(){iu(d)});return}}else if(u===3&&d.stateNode.current.memoizedState.isDehydrated){a.blockedOn=d.tag===3?d.stateNode.containerInfo:null;return}}}a.blockedOn=null}function sg(a){if(a.blockedOn!==null)return!1;for(var u=a.targetContainers;0<u.length;){var d=ix(a.nativeEvent);if(d===null){d=a.nativeEvent;var m=new d.constructor(d.type,d);Np=m,d.target.dispatchEvent(m),Np=null}else return u=gc(d),u!==null&&aC(u),a.blockedOn=d,!1;u.shift()}return!0}function Qf(a,u,d){sg(a)&&d.delete(u)}function cC(){Zf=!1,Kn!==null&&sg(Kn)&&(Kn=null),Ai!==null&&sg(Ai)&&(Ai=null),Ui!==null&&sg(Ui)&&(Ui=null),$l.forEach(Qf),po.forEach(Qf)}function qr(a,u){a.blockedOn===u&&(a.blockedOn=null,Zf||(Zf=!0,s.unstable_scheduleCallback(s.unstable_NormalPriority,cC)))}var Ff=null;function uC(a){Ff!==a&&(Ff=a,s.unstable_scheduleCallback(s.unstable_NormalPriority,function(){Ff===a&&(Ff=null);for(var u=0;u<a.length;u+=3){var d=a[u],m=a[u+1],C=a[u+2];if(typeof m!="function"){if(If(m||d)===null)continue;break}var E=gc(d);E!==null&&(a.splice(u,3),u-=3,vf(E,{pending:!0,data:C,method:d.method,action:m},m,C))}}))}function Jf(a){function u(Q){return qr(Q,a)}Kn!==null&&qr(Kn,a),Ai!==null&&qr(Ai,a),Ui!==null&&qr(Ui,a),$l.forEach(u),po.forEach(u);for(var d=0;d<yn.length;d++){var m=yn[d];m.blockedOn===a&&(m.blockedOn=null)}for(;0<yn.length&&(d=yn[0],d.blockedOn===null);)lC(d),d.blockedOn===null&&yn.shift();if(d=(a.ownerDocument||a).$$reactFormReplay,d!=null)for(m=0;m<d.length;m+=3){var C=d[m],E=d[m+1],z=C[Zi]||null;if(typeof E=="function")z||uC(d);else if(z){var P=null;if(E&&E.hasAttribute("formAction")){if(C=E,z=E[Zi]||null)P=z.formAction;else if(If(C)!==null)continue}else P=z.action;typeof P=="function"?d[m+1]=P:(d.splice(m,3),m-=3),uC(d)}}}function sx(){function a(E){E.canIntercept&&E.info==="react-transition"&&E.intercept({handler:function(){return new Promise(function(z){return C=z})},focusReset:"manual",scroll:"manual"})}function u(){C!==null&&(C(),C=null),m||setTimeout(d,20)}function d(){if(!m&&!navigation.transition){var E=navigation.currentEntry;E&&E.url!=null&&navigation.navigate(E.url,{state:E.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var m=!1,C=null;return navigation.addEventListener("navigate",a),navigation.addEventListener("navigatesuccess",u),navigation.addEventListener("navigateerror",u),setTimeout(d,100),function(){m=!0,navigation.removeEventListener("navigate",a),navigation.removeEventListener("navigatesuccess",u),navigation.removeEventListener("navigateerror",u),C!==null&&(C(),C=null)}}}function cy(a){this._internalRoot=a}uy.prototype.render=cy.prototype.render=function(a){var u=this._internalRoot;if(u===null)throw Error(n(409));var d=u.current,m=vs();rC(d,m,a,u,null,null)},uy.prototype.unmount=cy.prototype.unmount=function(){var a=this._internalRoot;if(a!==null){this._internalRoot=null;var u=a.containerInfo;rC(a.current,2,null,a,null,null),Nf(),u[cl]=null}};function uy(a){this._internalRoot=a}uy.prototype.unstable_scheduleHydration=function(a){if(a){var u=Ep();a={blockedOn:null,target:a,priority:u};for(var d=0;d<yn.length&&u!==0&&u<yn[d].priority;d++);yn.splice(d,0,a),d===0&&lC(a)}};var ox=t.version;if(ox!=="19.2.4")throw Error(n(527,ox,"19.2.4"));ot.findDOMNode=function(a){var u=a._reactInternals;if(u===void 0)throw typeof a.render=="function"?Error(n(188)):(a=Object.keys(a).join(","),Error(n(268,a)));return a=y(u),a=a!==null?x(a):null,a=a===null?null:a.stateNode,a};var fC={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:V,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var og=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!og.isDisabled&&og.supportsFiber)try{fc=og.inject(fC),ds=og}catch{}}return Fb.createRoot=function(a,u){if(!r(a))throw Error(n(299));var d=!1,m="",C=Sm,E=rv,z=wm;return u!=null&&(u.unstable_strictMode===!0&&(d=!0),u.identifierPrefix!==void 0&&(m=u.identifierPrefix),u.onUncaughtError!==void 0&&(C=u.onUncaughtError),u.onCaughtError!==void 0&&(E=u.onCaughtError),u.onRecoverableError!==void 0&&(z=u.onRecoverableError)),u=ry(a,1,!1,null,null,d,m,null,C,E,z,sx),a[cl]=u.current,Uf(a),new cy(u)},Fb.hydrateRoot=function(a,u,d){if(!r(a))throw Error(n(299));var m=!1,C="",E=Sm,z=rv,P=wm,Q=null;return d!=null&&(d.unstable_strictMode===!0&&(m=!0),d.identifierPrefix!==void 0&&(C=d.identifierPrefix),d.onUncaughtError!==void 0&&(E=d.onUncaughtError),d.onCaughtError!==void 0&&(z=d.onCaughtError),d.onRecoverableError!==void 0&&(P=d.onRecoverableError),d.formState!==void 0&&(Q=d.formState)),u=ry(a,1,!0,u,d??null,m,C,Q,E,z,P,sx),u.context=nu(null),d=u.current,m=vs(),m=Cp(m),C=Ra(m),C.callback=null,Us(d,C,m),d=m,u.current.lanes=d,$u(u,d),kr(u),a[cl]=u.current,Uf(a),new uy(u)},Fb.version="19.2.4",Fb}var Jb={};/**
|
|
1005
|
+
* @license React
|
|
1006
|
+
* react-dom-client.development.js
|
|
1007
|
+
*
|
|
1008
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
1009
|
+
*
|
|
1010
|
+
* This source code is licensed under the MIT license found in the
|
|
1011
|
+
* LICENSE file in the root directory of this source tree.
|
|
1012
|
+
*/var pj;function BK(){return pj||(pj=1,process.env.NODE_ENV!=="production"&&function(){function s(i,o){for(i=i.memoizedState;i!==null&&0<o;)i=i.next,o--;return i}function t(i,o,c,g){if(c>=o.length)return g;var b=o[c],v=qn(i)?i.slice():pe({},i);return v[b]=t(i[b],o,c+1,g),v}function e(i,o,c){if(o.length!==c.length)console.warn("copyWithRename() expects paths of the same length");else{for(var g=0;g<c.length-1;g++)if(o[g]!==c[g]){console.warn("copyWithRename() expects paths to be the same except for the deepest key");return}return n(i,o,c,0)}}function n(i,o,c,g){var b=o[g],v=qn(i)?i.slice():pe({},i);return g+1===o.length?(v[c[g]]=v[b],qn(v)?v.splice(b,1):delete v[b]):v[b]=n(i[b],o,c,g+1),v}function r(i,o,c){var g=o[c],b=qn(i)?i.slice():pe({},i);return c+1===o.length?(qn(b)?b.splice(g,1):delete b[g],b):(b[g]=r(i[g],o,c+1),b)}function l(){return!1}function f(){return null}function h(){console.error("Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. You can only call Hooks at the top level of your React function. For more information, see https://react.dev/link/rules-of-hooks")}function p(){console.error("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().")}function y(){}function x(){}function S(i){var o=[];return i.forEach(function(c){o.push(c)}),o.sort().join(", ")}function w(i,o,c,g){return new hM(i,o,c,g)}function T(i,o){i.context===eh&&(Zm(i.current,2,o,i,null,null),$s())}function M(i,o){if(Ir!==null){var c=o.staleFamilies;o=o.updatedFamilies,Bd(),nw(i.current,o,c),$s()}}function D(i){Ir=i}function R(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function N(i){var o=i,c=i;if(i.alternate)for(;o.return;)o=o.return;else{i=o;do o=i,o.flags&4098&&(c=o.return),i=o.return;while(i)}return o.tag===3?c:null}function L(i){if(i.tag===13){var o=i.memoizedState;if(o===null&&(i=i.alternate,i!==null&&(o=i.memoizedState)),o!==null)return o.dehydrated}return null}function _(i){if(i.tag===31){var o=i.memoizedState;if(o===null&&(i=i.alternate,i!==null&&(o=i.memoizedState)),o!==null)return o.dehydrated}return null}function U(i){if(N(i)!==i)throw Error("Unable to find node on an unmounted component.")}function $(i){var o=i.alternate;if(!o){if(o=N(i),o===null)throw Error("Unable to find node on an unmounted component.");return o!==i?null:i}for(var c=i,g=o;;){var b=c.return;if(b===null)break;var v=b.alternate;if(v===null){if(g=b.return,g!==null){c=g;continue}break}if(b.child===v.child){for(v=b.child;v;){if(v===c)return U(b),i;if(v===g)return U(b),o;v=v.sibling}throw Error("Unable to find node on an unmounted component.")}if(c.return!==g.return)c=b,g=v;else{for(var A=!1,O=b.child;O;){if(O===c){A=!0,c=b,g=v;break}if(O===g){A=!0,g=b,c=v;break}O=O.sibling}if(!A){for(O=v.child;O;){if(O===c){A=!0,c=v,g=b;break}if(O===g){A=!0,g=v,c=b;break}O=O.sibling}if(!A)throw Error("Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue.")}}if(c.alternate!==g)throw Error("Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue.")}if(c.tag!==3)throw Error("Unable to find node on an unmounted component.");return c.stateNode.current===c?i:o}function Y(i){var o=i.tag;if(o===5||o===26||o===27||o===6)return i;for(i=i.child;i!==null;){if(o=Y(i),o!==null)return o;i=i.sibling}return null}function k(i){return i===null||typeof i!="object"?null:(i=sC&&i[sC]||i["@@iterator"],typeof i=="function"?i:null)}function H(i){if(i==null)return null;if(typeof i=="function")return i.$$typeof===Gf?null:i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case kf:return"Fragment";case Wd:return"Profiler";case ls:return"StrictMode";case tu:return"Suspense";case xs:return"SuspenseList";case Zo:return"Activity"}if(typeof i=="object")switch(typeof i.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),i.$$typeof){case kl:return"Portal";case Io:return i.displayName||"Context";case Wm:return(i._context.displayName||"Context")+".Consumer";case Vf:var o=i.render;return i=i.displayName,i||(i=o.displayName||o.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case tg:return o=i.displayName||null,o!==null?o:H(i.type)||"Memo";case Pi:o=i._payload,i=i._init;try{return H(i(o))}catch{}}return null}function J(i){return typeof i.tag=="number"?F(i):typeof i.name=="string"?i.name:null}function F(i){var o=i.type;switch(i.tag){case 31:return"Activity";case 24:return"Cache";case 9:return(o._context.displayName||"Context")+".Consumer";case 10:return o.displayName||"Context";case 18:return"DehydratedFragment";case 11:return i=o.render,i=i.displayName||i.name||"",o.displayName||(i!==""?"ForwardRef("+i+")":"ForwardRef");case 7:return"Fragment";case 26:case 27:case 5:return o;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return H(o);case 8:return o===ls?"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 14:case 15:if(typeof o=="function")return o.displayName||o.name||null;if(typeof o=="string")return o;break;case 29:if(o=i._debugInfo,o!=null){for(var c=o.length-1;0<=c;c--)if(typeof o[c].name=="string")return o[c].name}if(i.return!==null)return F(i.return)}return null}function ct(i){return{current:i}}function lt(i,o){0>ka?console.error("Unexpected pop."):(o!==Fv[ka]&&console.error("Unexpected Fiber popped."),i.current=Qv[ka],Qv[ka]=null,Fv[ka]=null,ka--)}function vt(i,o,c){ka++,Qv[ka]=i.current,Fv[ka]=c,i.current=o}function Ot(i){return i===null&&console.error("Expected host context to exist. This error is likely caused by a bug in React. Please file an issue."),i}function zt(i,o){vt(Ys,o,i),vt($f,i,i),vt(Vl,null,i);var c=o.nodeType;switch(c){case 9:case 11:c=c===9?"#document":"#fragment",o=(o=o.documentElement)&&(o=o.namespaceURI)?zw(o):bu;break;default:if(c=o.tagName,o=o.namespaceURI)o=zw(o),o=Pa(o,c);else switch(c){case"svg":o=ky;break;case"math":o=nE;break;default:o=bu}}c=c.toLowerCase(),c=a0(null,c),c={context:o,ancestorInfo:c},lt(Vl,i),vt(Vl,c,i)}function V(i){lt(Vl,i),lt($f,i),lt(Ys,i)}function ot(){return Ot(Vl.current)}function tt(i){i.memoizedState!==null&&vt(Gl,i,i);var o=Ot(Vl.current),c=i.type,g=Pa(o.context,c);c=a0(o.ancestorInfo,c),g={context:g,ancestorInfo:c},o!==g&&(vt($f,i,i),vt(Vl,g,i))}function yt(i){$f.current===i&&(lt(Vl,i),lt($f,i)),Gl.current===i&&(lt(Gl,i),Zx._currentValue=Og)}function Mt(){}function nt(){if(qf===0){oC=console.log,eu=console.info,Yf=console.warn,Jv=console.error,eg=console.group,ty=console.groupCollapsed,ey=console.groupEnd;var i={configurable:!0,enumerable:!0,value:Mt,writable:!0};Object.defineProperties(console,{info:i,log:i,warn:i,error:i,group:i,groupCollapsed:i,groupEnd:i})}qf++}function St(){if(qf--,qf===0){var i={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:pe({},i,{value:oC}),info:pe({},i,{value:eu}),warn:pe({},i,{value:Yf}),error:pe({},i,{value:Jv}),group:pe({},i,{value:eg}),groupCollapsed:pe({},i,{value:ty}),groupEnd:pe({},i,{value:ey})})}0>qf&&console.error("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}function Tt(i){var o=Error.prepareStackTrace;if(Error.prepareStackTrace=void 0,i=i.stack,Error.prepareStackTrace=o,i.startsWith(`Error: react-stack-top-frame
|
|
1013
|
+
`)&&(i=i.slice(29)),o=i.indexOf(`
|
|
1014
|
+
`),o!==-1&&(i=i.slice(o+1)),o=i.indexOf("react_stack_bottom_frame"),o!==-1&&(o=i.lastIndexOf(`
|
|
1015
|
+
`,o)),o!==-1)i=i.slice(0,o);else return"";return i}function Et(i){if(Xf===void 0)try{throw Error()}catch(c){var o=c.stack.trim().match(/\n( *(at )?)/);Xf=o&&o[1]||"",Kv=-1<c.stack.indexOf(`
|
|
1016
|
+
at`)?" (<anonymous>)":-1<c.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
1017
|
+
`+Xf+i+Kv}function Ht(i,o){if(!i||ny)return"";var c=Wv.get(i);if(c!==void 0)return c;ny=!0,c=Error.prepareStackTrace,Error.prepareStackTrace=void 0;var g=null;g=pt.H,pt.H=null,nt();try{var b={DetermineComponentFrameRoot:function(){try{if(o){var I=function(){throw Error()};if(Object.defineProperty(I.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(I,[])}catch(Nt){var ht=Nt}Reflect.construct(i,[],I)}else{try{I.call()}catch(Nt){ht=Nt}i.call(I.prototype)}}else{try{throw Error()}catch(Nt){ht=Nt}(I=i())&&typeof I.catch=="function"&&I.catch(function(){})}}catch(Nt){if(Nt&&ht&&typeof Nt.stack=="string")return[Nt.stack,ht.stack]}return[null,null]}};b.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var v=Object.getOwnPropertyDescriptor(b.DetermineComponentFrameRoot,"name");v&&v.configurable&&Object.defineProperty(b.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var A=b.DetermineComponentFrameRoot(),O=A[0],j=A[1];if(O&&j){var B=O.split(`
|
|
1018
|
+
`),et=j.split(`
|
|
1019
|
+
`);for(A=v=0;v<B.length&&!B[v].includes("DetermineComponentFrameRoot");)v++;for(;A<et.length&&!et[A].includes("DetermineComponentFrameRoot");)A++;if(v===B.length||A===et.length)for(v=B.length-1,A=et.length-1;1<=v&&0<=A&&B[v]!==et[A];)A--;for(;1<=v&&0<=A;v--,A--)if(B[v]!==et[A]){if(v!==1||A!==1)do if(v--,A--,0>A||B[v]!==et[A]){var st=`
|
|
1020
|
+
`+B[v].replace(" at new "," at ");return i.displayName&&st.includes("<anonymous>")&&(st=st.replace("<anonymous>",i.displayName)),typeof i=="function"&&Wv.set(i,st),st}while(1<=v&&0<=A);break}}}finally{ny=!1,pt.H=g,St(),Error.prepareStackTrace=c}return B=(B=i?i.displayName||i.name:"")?Et(B):"",typeof i=="function"&&Wv.set(i,B),B}function ce(i,o){switch(i.tag){case 26:case 27:case 5:return Et(i.type);case 16:return Et("Lazy");case 13:return i.child!==o&&o!==null?Et("Suspense Fallback"):Et("Suspense");case 19:return Et("SuspenseList");case 0:case 15:return Ht(i.type,!1);case 11:return Ht(i.type.render,!1);case 1:return Ht(i.type,!0);case 31:return Et("Activity");default:return""}}function Rt(i){try{var o="",c=null;do{o+=ce(i,c);var g=i._debugInfo;if(g)for(var b=g.length-1;0<=b;b--){var v=g[b];if(typeof v.name=="string"){var A=o;t:{var O=v.name,j=v.env,B=v.debugLocation;if(B!=null){var et=Tt(B),st=et.lastIndexOf(`
|
|
1021
|
+
`),I=st===-1?et:et.slice(st+1);if(I.indexOf(O)!==-1){var ht=`
|
|
1022
|
+
`+I;break t}}ht=Et(O+(j?" ["+j+"]":""))}o=A+ht}}c=i,i=i.return}while(i);return o}catch(Nt){return`
|
|
1023
|
+
Error generating stack: `+Nt.message+`
|
|
1024
|
+
`+Nt.stack}}function ue(i){return(i=i?i.displayName||i.name:"")?Et(i):""}function fe(){if(Ss===null)return null;var i=Ss._debugOwner;return i!=null?J(i):null}function Be(){if(Ss===null)return"";var i=Ss;try{var o="";switch(i.tag===6&&(i=i.return),i.tag){case 26:case 27:case 5:o+=Et(i.type);break;case 13:o+=Et("Suspense");break;case 19:o+=Et("SuspenseList");break;case 31:o+=Et("Activity");break;case 30:case 0:case 15:case 1:i._debugOwner||o!==""||(o+=ue(i.type));break;case 11:i._debugOwner||o!==""||(o+=ue(i.type.render))}for(;i;)if(typeof i.tag=="number"){var c=i;i=c._debugOwner;var g=c._debugStack;if(i&&g){var b=Tt(g);b!==""&&(o+=`
|
|
1025
|
+
`+b)}}else if(i.debugStack!=null){var v=i.debugStack;(i=i.owner)&&v&&(o+=`
|
|
1026
|
+
`+Tt(v))}else break;var A=o}catch(O){A=`
|
|
1027
|
+
Error generating stack: `+O.message+`
|
|
1028
|
+
`+O.stack}return A}function Lt(i,o,c,g,b,v,A){var O=Ss;Xi(i);try{return i!==null&&i._debugTask?i._debugTask.run(o.bind(null,c,g,b,v,A)):o(c,g,b,v,A)}finally{Xi(O)}throw Error("runWithFiberInDEV should never be called in production. This is a bug in React.")}function Xi(i){pt.getCurrentStack=i===null?null:Be,Vr=!1,Ss=i}function Co(i){return typeof Symbol=="function"&&Symbol.toStringTag&&i[Symbol.toStringTag]||i.constructor.name||"Object"}function Os(i){try{return ma(i),!1}catch{return!0}}function ma(i){return""+i}function qe(i,o){if(Os(i))return console.error("The provided `%s` attribute is an unsupported type %s. This value must be coerced to a string before using it here.",o,Co(i)),ma(i)}function Gh(i,o){if(Os(i))return console.error("The provided `%s` CSS property is an unsupported type %s. This value must be coerced to a string before using it here.",o,Co(i)),ma(i)}function Vu(i){if(Os(i))return console.error("Form field values (value, checked, defaultValue, or defaultChecked props) must be strings, not %s. This value must be coerced to a string before using it here.",Co(i)),ma(i)}function rl(i){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")return!1;var o=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(o.isDisabled)return!0;if(!o.supportsFiber)return console.error("The installed version of React DevTools is too old and will not work with the current version of React. Please update React DevTools. https://react.dev/link/react-devtools"),!0;try{iu=o.inject(i),Jn=o}catch(c){console.error("React instrumentation encountered an error: %o.",c)}return!!o.checkDCE}function sn(i){if(typeof nx=="function"&&aC(i),Jn&&typeof Jn.setStrictMode=="function")try{Jn.setStrictMode(iu,i)}catch(o){Gr||(Gr=!0,console.error("React instrumentation encountered an error: %o",o))}}function Wb(i){return i>>>=0,i===0?32:31-(ix(i)/ly|0)|0}function uc(i){var o=i&42;if(o!==0)return o;switch(i&-i){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return i&261888;case 262144:case 524288:case 1048576:case 2097152:return i&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return i&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return console.error("Should have found matching lanes. This is a bug in React."),i}}function vp(i,o,c){var g=i.pendingLanes;if(g===0)return 0;var b=0,v=i.suspendedLanes,A=i.pingedLanes;i=i.warmLanes;var O=g&134217727;return O!==0?(g=O&~v,g!==0?b=uc(g):(A&=O,A!==0?b=uc(A):c||(c=O&~i,c!==0&&(b=uc(c))))):(O=g&~v,O!==0?b=uc(O):A!==0?b=uc(A):c||(c=g&~i,c!==0&&(b=uc(c)))),b===0?0:o!==0&&o!==b&&!(o&v)&&(v=b&-b,c=o&-o,v>=c||v===32&&(c&4194048)!==0)?o:b}function Si(i,o){return(i.pendingLanes&~(i.suspendedLanes&~i.pingedLanes)&o)===0}function sM(i,o){switch(i){case 1:case 2:case 4:case 8:case 64:return o+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return o+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return console.error("Should have found matching lanes. This is a bug in React."),-1}}function xp(){var i=Zf;return Zf<<=1,!(Zf&62914560)&&(Zf=4194304),i}function Sp(i){for(var o=[],c=0;31>c;c++)o.push(i);return o}function al(i,o){i.pendingLanes|=o,o!==268435456&&(i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0)}function oM(i,o,c,g,b,v){var A=i.pendingLanes;i.pendingLanes=c,i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0,i.expiredLanes&=c,i.entangledLanes&=c,i.errorRecoveryDisabledLanes&=c,i.shellSuspendCounter=0;var O=i.entanglements,j=i.expirationTimes,B=i.hiddenUpdates;for(c=A&~c;0<c;){var et=31-Ei(c),st=1<<et;O[et]=0,j[et]=-1;var I=B[et];if(I!==null)for(B[et]=null,et=0;et<I.length;et++){var ht=I[et];ht!==null&&(ht.lane&=-536870913)}c&=~st}g!==0&&t0(i,g,0),v!==0&&b===0&&i.tag!==0&&(i.suspendedLanes|=v&~(A&~o))}function t0(i,o,c){i.pendingLanes|=o,i.suspendedLanes&=~o;var g=31-Ei(o);i.entangledLanes|=o,i.entanglements[g]=i.entanglements[g]|1073741824|c&261930}function US(i,o){var c=i.entangledLanes|=o;for(i=i.entanglements;c;){var g=31-Ei(c),b=1<<g;b&o|i[g]&o&&(i[g]|=o),c&=~b}}function HS(i,o){var c=o&-o;return c=c&42?1:fc(c),c&(i.suspendedLanes|o)?0:c}function fc(i){switch(i){case 2:i=1;break;case 8:i=4;break;case 32:i=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:i=128;break;case 268435456:i=134217728;break;default:i=0}return i}function ds(i,o,c){if($r)for(i=i.pendingUpdatersLaneMap;0<c;){var g=31-Ei(c),b=1<<g;i[g].add(o),c&=~b}}function ya(i,o){if($r)for(var c=i.pendingUpdatersLaneMap,g=i.memoizedUpdaters;0<o;){var b=31-Ei(o);i=1<<b,b=c[b],0<b.size&&(b.forEach(function(v){var A=v.alternate;A!==null&&g.has(A)||g.add(v)}),b.clear()),o&=~i}}function Ii(i){return i&=-i,Kn<i?Ai<i?i&134217727?Ui:$l:Ai:Kn}function kS(){var i=Ge.p;return i!==0?i:(i=window.event,i===void 0?Ui:Fm(i.type))}function VS(i,o){var c=Ge.p;try{return Ge.p=i,o()}finally{Ge.p=c}}function e0(i){delete i[yn],delete i[cs],delete i[su],delete i[xM],delete i[lC]}function ba(i){var o=i[yn];if(o)return o;for(var c=i.parentNode;c;){if(o=c[Va]||c[yn]){if(c=o.alternate,o.child!==null||c!==null&&c.child!==null)for(i=Fc(i);i!==null;){if(c=i[yn])return c;i=Fc(i)}return o}i=c,c=i.parentNode}return null}function Eo(i){if(i=i[yn]||i[Va]){var o=i.tag;if(o===5||o===6||o===13||o===31||o===26||o===27||o===3)return i}return null}function ll(i){var o=i.tag;if(o===5||o===26||o===27||o===6)return i.stateNode;throw Error("getNodeFromInstance: Invalid argument.")}function eo(i){var o=i[sg];return o||(o=i[sg]={hoistableStyles:new Map,hoistableScripts:new Map}),o}function jn(i){i[Qf]=!0}function Ao(i,o){Gu(i,o),Gu(i+"Capture",o)}function Gu(i,o){qr[i]&&console.error("EventRegistry: More than one plugin attempted to publish the same registration name, `%s`.",i),qr[i]=o;var c=i.toLowerCase();for(Ff[c]=i,i==="onDoubleClick"&&(Ff.ondblclick=i),i=0;i<o.length;i++)cC.add(o[i])}function hc(i,o){uC[o.type]||o.onChange||o.onInput||o.readOnly||o.disabled||o.value==null||console.error(i==="select"?"You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set `onChange`.":"You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`."),o.onChange||o.readOnly||o.disabled||o.checked==null||console.error("You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.")}function $h(i){return Xs.call(cy,i)?!0:Xs.call(sx,i)?!1:Jf.test(i)?cy[i]=!0:(sx[i]=!0,console.error("Invalid attribute name: `%s`",i),!1)}function $u(i,o,c){if($h(o)){if(!i.hasAttribute(o)){switch(typeof c){case"symbol":case"object":return c;case"function":return c;case"boolean":if(c===!1)return c}return c===void 0?void 0:null}return i=i.getAttribute(o),i===""&&c===!0?!0:(qe(c,o),i===""+c?c:i)}}function wp(i,o,c){if($h(o))if(c===null)i.removeAttribute(o);else{switch(typeof c){case"undefined":case"function":case"symbol":i.removeAttribute(o);return;case"boolean":var g=o.toLowerCase().slice(0,5);if(g!=="data-"&&g!=="aria-"){i.removeAttribute(o);return}}qe(c,o),i.setAttribute(o,""+c)}}function qh(i,o,c){if(c===null)i.removeAttribute(o);else{switch(typeof c){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(o);return}qe(c,o),i.setAttribute(o,""+c)}}function dr(i,o,c,g){if(g===null)i.removeAttribute(c);else{switch(typeof g){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(c);return}qe(g,c),i.setAttributeNS(o,c,""+g)}}function Ds(i){switch(typeof i){case"bigint":case"boolean":case"number":case"string":case"undefined":return i;case"object":return Vu(i),i;default:return""}}function Cp(i){var o=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(o==="checkbox"||o==="radio")}function n0(i,o,c){var g=Object.getOwnPropertyDescriptor(i.constructor.prototype,o);if(!i.hasOwnProperty(o)&&typeof g<"u"&&typeof g.get=="function"&&typeof g.set=="function"){var b=g.get,v=g.set;return Object.defineProperty(i,o,{configurable:!0,get:function(){return b.call(this)},set:function(A){Vu(A),c=""+A,v.call(this,A)}}),Object.defineProperty(i,o,{enumerable:g.enumerable}),{getValue:function(){return c},setValue:function(A){Vu(A),c=""+A},stopTracking:function(){i._valueTracker=null,delete i[o]}}}}function Ep(i){if(!i._valueTracker){var o=Cp(i)?"checked":"value";i._valueTracker=n0(i,o,""+i[o])}}function i0(i){if(!i)return!1;var o=i._valueTracker;if(!o)return!0;var c=o.getValue(),g="";return i&&(g=Cp(i)?i.checked?"true":"false":i.value),i=g,i!==c?(o.setValue(i),!0):!1}function To(i){if(i=i||(typeof document<"u"?document:void 0),typeof i>"u")return null;try{return i.activeElement||i.body}catch{return i.body}}function Fe(i){return i.replace(uy,function(o){return"\\"+o.charCodeAt(0).toString(16)+" "})}function Zi(i,o){o.checked===void 0||o.defaultChecked===void 0||fC||(console.error("%s contains an input of type %s with both checked and defaultChecked props. Input elements must be either controlled or uncontrolled (specify either the checked prop, or the defaultChecked prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://react.dev/link/controlled-components",fe()||"A component",o.type),fC=!0),o.value===void 0||o.defaultValue===void 0||ox||(console.error("%s contains an input of type %s with both value and defaultValue props. Input elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://react.dev/link/controlled-components",fe()||"A component",o.type),ox=!0)}function cl(i,o,c,g,b,v,A,O){i.name="",A!=null&&typeof A!="function"&&typeof A!="symbol"&&typeof A!="boolean"?(qe(A,"type"),i.type=A):i.removeAttribute("type"),o!=null?A==="number"?(o===0&&i.value===""||i.value!=o)&&(i.value=""+Ds(o)):i.value!==""+Ds(o)&&(i.value=""+Ds(o)):A!=="submit"&&A!=="reset"||i.removeAttribute("value"),o!=null?s0(i,A,Ds(o)):c!=null?s0(i,A,Ds(c)):g!=null&&i.removeAttribute("value"),b==null&&v!=null&&(i.defaultChecked=!!v),b!=null&&(i.checked=b&&typeof b!="function"&&typeof b!="symbol"),O!=null&&typeof O!="function"&&typeof O!="symbol"&&typeof O!="boolean"?(qe(O,"name"),i.name=""+Ds(O)):i.removeAttribute("name")}function Ap(i,o,c,g,b,v,A,O){if(v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"&&(qe(v,"type"),i.type=v),o!=null||c!=null){if(!(v!=="submit"&&v!=="reset"||o!=null)){Ep(i);return}c=c!=null?""+Ds(c):"",o=o!=null?""+Ds(o):c,O||o===i.value||(i.value=o),i.defaultValue=o}g=g??b,g=typeof g!="function"&&typeof g!="symbol"&&!!g,i.checked=O?i.checked:!!g,i.defaultChecked=!!g,A!=null&&typeof A!="function"&&typeof A!="symbol"&&typeof A!="boolean"&&(qe(A,"name"),i.name=A),Ep(i)}function s0(i,o,c){o==="number"&&To(i.ownerDocument)===i||i.defaultValue===""+c||(i.defaultValue=""+c)}function GS(i,o){o.value==null&&(typeof o.children=="object"&&o.children!==null?Kd.Children.forEach(o.children,function(c){c==null||typeof c=="string"||typeof c=="number"||typeof c=="bigint"||a||(a=!0,console.error("Cannot infer the option value of complex children. Pass a `value` prop or use a plain string as children to <option>."))}):o.dangerouslySetInnerHTML==null||u||(u=!0,console.error("Pass a `value` prop if you set dangerouslyInnerHTML so React knows which value should be selected."))),o.selected==null||og||(console.error("Use the `defaultValue` or `value` props on <select> instead of setting `selected` on <option>."),og=!0)}function o0(){var i=fe();return i?`
|
|
1029
|
+
|
|
1030
|
+
Check the render method of \``+i+"`.":""}function gr(i,o,c,g){if(i=i.options,o){o={};for(var b=0;b<c.length;b++)o["$"+c[b]]=!0;for(c=0;c<i.length;c++)b=o.hasOwnProperty("$"+i[c].value),i[c].selected!==b&&(i[c].selected=b),b&&g&&(i[c].defaultSelected=!0)}else{for(c=""+Ds(c),o=null,b=0;b<i.length;b++){if(i[b].value===c){i[b].selected=!0,g&&(i[b].defaultSelected=!0);return}o!==null||i[b].disabled||(o=i[b])}o!==null&&(o.selected=!0)}}function Tp(i,o){for(i=0;i<m.length;i++){var c=m[i];if(o[c]!=null){var g=qn(o[c]);o.multiple&&!g?console.error("The `%s` prop supplied to <select> must be an array if `multiple` is true.%s",c,o0()):!o.multiple&&g&&console.error("The `%s` prop supplied to <select> must be a scalar value if `multiple` is false.%s",c,o0())}}o.value===void 0||o.defaultValue===void 0||d||(console.error("Select elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled select element and remove one of these props. More info: https://react.dev/link/controlled-components"),d=!0)}function dc(i,o){o.value===void 0||o.defaultValue===void 0||C||(console.error("%s contains a textarea with both value and defaultValue props. Textarea elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled textarea and remove one of these props. More info: https://react.dev/link/controlled-components",fe()||"A component"),C=!0),o.children!=null&&o.value==null&&console.error("Use the `defaultValue` or `value` props instead of setting children on <textarea>.")}function gc(i,o,c){if(o!=null&&(o=""+Ds(o),o!==i.value&&(i.value=o),c==null)){i.defaultValue!==o&&(i.defaultValue=o);return}i.defaultValue=c!=null?""+Ds(c):""}function qu(i,o,c,g){if(o==null){if(g!=null){if(c!=null)throw Error("If you supply `defaultValue` on a <textarea>, do not pass children.");if(qn(g)){if(1<g.length)throw Error("<textarea> can only have at most one child.");g=g[0]}c=g}c==null&&(c=""),o=c}c=Ds(o),i.defaultValue=c,g=i.textContent,g===c&&g!==""&&g!==null&&(i.value=g),Ep(i)}function pc(i,o){return i.serverProps===void 0&&i.serverTail.length===0&&i.children.length===1&&3<i.distanceFromLeaf&&i.distanceFromLeaf>15-o?pc(i.children[0],o):i}function Ye(i){return" "+" ".repeat(i)}function mc(i){return"+ "+" ".repeat(i)}function ul(i){return"- "+" ".repeat(i)}function fl(i){switch(i.tag){case 26:case 27:case 5:return i.type;case 16:return"Lazy";case 31:return"Activity";case 13:return"Suspense";case 19:return"SuspenseList";case 0:case 15:return i=i.type,i.displayName||i.name||null;case 11:return i=i.type.render,i.displayName||i.name||null;case 1:return i=i.type,i.displayName||i.name||null;default:return null}}function pr(i,o){return E.test(i)?(i=JSON.stringify(i),i.length>o-2?8>o?'{"..."}':"{"+i.slice(0,o-7)+'..."}':"{"+i+"}"):i.length>o?5>o?'{"..."}':i.slice(0,o-3)+"...":i}function Mp(i,o,c){var g=120-2*c;if(o===null)return mc(c)+pr(i,g)+`
|
|
1031
|
+
`;if(typeof o=="string"){for(var b=0;b<o.length&&b<i.length&&o.charCodeAt(b)===i.charCodeAt(b);b++);return b>g-8&&10<b&&(i="..."+i.slice(b-8),o="..."+o.slice(b-8)),mc(c)+pr(i,g)+`
|
|
1032
|
+
`+ul(c)+pr(o,g)+`
|
|
1033
|
+
`}return Ye(c)+pr(i,g)+`
|
|
1034
|
+
`}function Op(i){return Object.prototype.toString.call(i).replace(/^\[object (.*)\]$/,function(o,c){return c})}function Yu(i,o){switch(typeof i){case"string":return i=JSON.stringify(i),i.length>o?5>o?'"..."':i.slice(0,o-4)+'..."':i;case"object":if(i===null)return"null";if(qn(i))return"[...]";if(i.$$typeof===go)return(o=H(i.type))?"<"+o+">":"<...>";var c=Op(i);if(c==="Object"){c="",o-=2;for(var g in i)if(i.hasOwnProperty(g)){var b=JSON.stringify(g);if(b!=='"'+g+'"'&&(g=b),o-=g.length-2,b=Yu(i[g],15>o?o:15),o-=b.length,0>o){c+=c===""?"...":", ...";break}c+=(c===""?"":",")+g+":"+b}return"{"+c+"}"}return c;case"function":return(o=i.displayName||i.name)?"function "+o:"function";default:return String(i)}}function Xu(i,o){return typeof i!="string"||E.test(i)?"{"+Yu(i,o-2)+"}":i.length>o-2?5>o?'"..."':'"'+i.slice(0,o-5)+'..."':'"'+i+'"'}function Iu(i,o,c){var g=120-c.length-i.length,b=[],v;for(v in o)if(o.hasOwnProperty(v)&&v!=="children"){var A=Xu(o[v],120-c.length-v.length-1);g-=v.length+A.length+2,b.push(v+"="+A)}return b.length===0?c+"<"+i+`>
|
|
1035
|
+
`:0<g?c+"<"+i+" "+b.join(" ")+`>
|
|
1036
|
+
`:c+"<"+i+`
|
|
1037
|
+
`+c+" "+b.join(`
|
|
1038
|
+
`+c+" ")+`
|
|
1039
|
+
`+c+`>
|
|
1040
|
+
`}function Dp(i,o,c){var g="",b=pe({},o),v;for(v in i)if(i.hasOwnProperty(v)){delete b[v];var A=120-2*c-v.length-2,O=Yu(i[v],A);o.hasOwnProperty(v)?(A=Yu(o[v],A),g+=mc(c)+v+": "+O+`
|
|
1041
|
+
`,g+=ul(c)+v+": "+A+`
|
|
1042
|
+
`):g+=mc(c)+v+": "+O+`
|
|
1043
|
+
`}for(var j in b)b.hasOwnProperty(j)&&(i=Yu(b[j],120-2*c-j.length-2),g+=ul(c)+j+": "+i+`
|
|
1044
|
+
`);return g}function va(i,o,c,g){var b="",v=new Map;for(B in c)c.hasOwnProperty(B)&&v.set(B.toLowerCase(),B);if(v.size===1&&v.has("children"))b+=Iu(i,o,Ye(g));else{for(var A in o)if(o.hasOwnProperty(A)&&A!=="children"){var O=120-2*(g+1)-A.length-1,j=v.get(A.toLowerCase());if(j!==void 0){v.delete(A.toLowerCase());var B=o[A];j=c[j];var et=Xu(B,O);O=Xu(j,O),typeof B=="object"&&B!==null&&typeof j=="object"&&j!==null&&Op(B)==="Object"&&Op(j)==="Object"&&(2<Object.keys(B).length||2<Object.keys(j).length||-1<et.indexOf("...")||-1<O.indexOf("..."))?b+=Ye(g+1)+A+`={{
|
|
1045
|
+
`+Dp(B,j,g+2)+Ye(g+1)+`}}
|
|
1046
|
+
`:(b+=mc(g+1)+A+"="+et+`
|
|
1047
|
+
`,b+=ul(g+1)+A+"="+O+`
|
|
1048
|
+
`)}else b+=Ye(g+1)+A+"="+Xu(o[A],O)+`
|
|
1049
|
+
`}v.forEach(function(st){if(st!=="children"){var I=120-2*(g+1)-st.length-1;b+=ul(g+1)+st+"="+Xu(c[st],I)+`
|
|
1050
|
+
`}}),b=b===""?Ye(g)+"<"+i+`>
|
|
1051
|
+
`:Ye(g)+"<"+i+`
|
|
1052
|
+
`+b+Ye(g)+`>
|
|
1053
|
+
`}return i=c.children,o=o.children,typeof i=="string"||typeof i=="number"||typeof i=="bigint"?(v="",(typeof o=="string"||typeof o=="number"||typeof o=="bigint")&&(v=""+o),b+=Mp(v,""+i,g+1)):(typeof o=="string"||typeof o=="number"||typeof o=="bigint")&&(b=i==null?b+Mp(""+o,null,g+1):b+Mp(""+o,void 0,g+1)),b}function Rs(i,o){var c=fl(i);if(c===null){for(c="",i=i.child;i;)c+=Rs(i,o),i=i.sibling;return c}return Ye(o)+"<"+c+`>
|
|
1054
|
+
`}function Rp(i,o){var c=pc(i,o);if(c!==i&&(i.children.length!==1||i.children[0]!==c))return Ye(o)+`...
|
|
1055
|
+
`+Rp(c,o+1);c="";var g=i.fiber._debugInfo;if(g)for(var b=0;b<g.length;b++){var v=g[b].name;typeof v=="string"&&(c+=Ye(o)+"<"+v+`>
|
|
1056
|
+
`,o++)}if(g="",b=i.fiber.pendingProps,i.fiber.tag===6)g=Mp(b,i.serverProps,o),o++;else if(v=fl(i.fiber),v!==null)if(i.serverProps===void 0){g=o;var A=120-2*g-v.length-2,O="";for(B in b)if(b.hasOwnProperty(B)&&B!=="children"){var j=Xu(b[B],15);if(A-=B.length+j.length+2,0>A){O+=" ...";break}O+=" "+B+"="+j}g=Ye(g)+"<"+v+O+`>
|
|
1057
|
+
`,o++}else i.serverProps===null?(g=Iu(v,b,mc(o)),o++):typeof i.serverProps=="string"?console.error("Should not have matched a non HostText fiber to a Text node. This is a bug in React."):(g=va(v,b,i.serverProps,o),o++);var B="";for(b=i.fiber.child,v=0;b&&v<i.children.length;)A=i.children[v],A.fiber===b?(B+=Rp(A,o),v++):B+=Rs(b,o),b=b.sibling;for(b&&0<i.children.length&&(B+=Ye(o)+`...
|
|
1058
|
+
`),b=i.serverTail,i.serverProps===null&&o--,i=0;i<b.length;i++)v=b[i],B=typeof v=="string"?B+(ul(o)+pr(v,120-2*o)+`
|
|
1059
|
+
`):B+Iu(v.type,v.props,ul(o));return c+g+B}function r0(i){try{return`
|
|
1060
|
+
|
|
1061
|
+
`+Rp(i,0)}catch{return""}}function zp(i,o,c){for(var g=o,b=null,v=0;g;)g===i&&(v=0),b={fiber:g,children:b!==null?[b]:[],serverProps:g===o?c:g===i?null:void 0,serverTail:[],distanceFromLeaf:v},v++,g=g.return;return b!==null?r0(b).replaceAll(/^[+-]/gm,">"):""}function a0(i,o){var c=pe({},i||bt),g={tag:o};return P.indexOf(o)!==-1&&(c.aTagInScope=null,c.buttonTagInScope=null,c.nobrTagInScope=null),Q.indexOf(o)!==-1&&(c.pTagInButtonScope=null),z.indexOf(o)!==-1&&o!=="address"&&o!=="div"&&o!=="p"&&(c.listItemTagAutoclosing=null,c.dlItemTagAutoclosing=null),c.current=g,o==="form"&&(c.formTag=g),o==="a"&&(c.aTagInScope=g),o==="button"&&(c.buttonTagInScope=g),o==="nobr"&&(c.nobrTagInScope=g),o==="p"&&(c.pTagInButtonScope=g),o==="li"&&(c.listItemTagAutoclosing=g),(o==="dd"||o==="dt")&&(c.dlItemTagAutoclosing=g),o==="#document"||o==="html"?c.containerTagInScope=null:c.containerTagInScope||(c.containerTagInScope=g),i!==null||o!=="#document"&&o!=="html"&&o!=="body"?c.implicitRootScope===!0&&(c.implicitRootScope=!1):c.implicitRootScope=!0,c}function Yh(i,o,c){switch(o){case"select":return i==="hr"||i==="option"||i==="optgroup"||i==="script"||i==="template"||i==="#text";case"optgroup":return i==="option"||i==="#text";case"option":return i==="#text";case"tr":return i==="th"||i==="td"||i==="style"||i==="script"||i==="template";case"tbody":case"thead":case"tfoot":return i==="tr"||i==="style"||i==="script"||i==="template";case"colgroup":return i==="col"||i==="template";case"table":return i==="caption"||i==="colgroup"||i==="tbody"||i==="tfoot"||i==="thead"||i==="style"||i==="script"||i==="template";case"head":return i==="base"||i==="basefont"||i==="bgsound"||i==="link"||i==="meta"||i==="title"||i==="noscript"||i==="noframes"||i==="style"||i==="script"||i==="template";case"html":if(c)break;return i==="head"||i==="body"||i==="frameset";case"frameset":return i==="frame";case"#document":if(!c)return i==="html"}switch(i){case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":return o!=="h1"&&o!=="h2"&&o!=="h3"&&o!=="h4"&&o!=="h5"&&o!=="h6";case"rp":case"rt":return ut.indexOf(o)===-1;case"caption":case"col":case"colgroup":case"frameset":case"frame":case"tbody":case"td":case"tfoot":case"th":case"thead":case"tr":return o==null;case"head":return c||o===null;case"html":return c&&o==="#document"||o===null;case"body":return c&&(o==="#document"||o==="html")||o===null}return!0}function rM(i,o){switch(i){case"address":case"article":case"aside":case"blockquote":case"center":case"details":case"dialog":case"dir":case"div":case"dl":case"fieldset":case"figcaption":case"figure":case"footer":case"header":case"hgroup":case"main":case"menu":case"nav":case"ol":case"p":case"section":case"summary":case"ul":case"pre":case"listing":case"table":case"hr":case"xmp":case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":return o.pTagInButtonScope;case"form":return o.formTag||o.pTagInButtonScope;case"li":return o.listItemTagAutoclosing;case"dd":case"dt":return o.dlItemTagAutoclosing;case"button":return o.buttonTagInScope;case"a":return o.aTagInScope;case"nobr":return o.nobrTagInScope}return null}function zs(i,o){for(;i;){switch(i.tag){case 5:case 26:case 27:if(i.type===o)return i}i=i.return}return null}function Xh(i,o){o=o||bt;var c=o.current;if(o=(c=Yh(i,c&&c.tag,o.implicitRootScope)?null:c)?null:rM(i,o),o=c||o,!o)return!0;var g=o.tag;if(o=String(!!c)+"|"+i+"|"+g,Ct[o])return!1;Ct[o]=!0;var b=(o=Ss)?zs(o.return,g):null,v=o!==null&&b!==null?zp(b,o,null):"",A="<"+i+">";return c?(c="",g==="table"&&i==="tr"&&(c+=" Add a <tbody>, <thead> or <tfoot> to your code to match the DOM tree generated by the browser."),console.error(`In HTML, %s cannot be a child of <%s>.%s
|
|
1062
|
+
This will cause a hydration error.%s`,A,g,c,v)):console.error(`In HTML, %s cannot be a descendant of <%s>.
|
|
1063
|
+
This will cause a hydration error.%s`,A,g,v),o&&(i=o.return,b===null||i===null||b===i&&i._debugOwner===o._debugOwner||Lt(b,function(){console.error(`<%s> cannot contain a nested %s.
|
|
1064
|
+
See this log for the ancestor stack trace.`,g,A)})),!1}function Ih(i,o,c){if(c||Yh("#text",o,!1))return!0;if(c="#text|"+o,Ct[c])return!1;Ct[c]=!0;var g=(c=Ss)?zs(c,o):null;return c=c!==null&&g!==null?zp(g,c,c.tag!==6?{children:null}:null):"",/\S/.test(i)?console.error(`In HTML, text nodes cannot be a child of <%s>.
|
|
1065
|
+
This will cause a hydration error.%s`,o,c):console.error(`In HTML, whitespace text nodes cannot be a child of <%s>. Make sure you don't have any extra whitespace between tags on each line of your source code.
|
|
1066
|
+
This will cause a hydration error.%s`,o,c),!1}function yc(i,o){if(o){var c=i.firstChild;if(c&&c===i.lastChild&&c.nodeType===3){c.nodeValue=o;return}}i.textContent=o}function Zu(i){return i.replace(rt,function(o,c){return c.toUpperCase()})}function l0(i,o,c){var g=o.indexOf("--")===0;g||(-1<o.indexOf("-")?at.hasOwnProperty(o)&&at[o]||(at[o]=!0,console.error("Unsupported style property %s. Did you mean %s?",o,Zu(o.replace(tn,"ms-")))):Jt.test(o)?at.hasOwnProperty(o)&&at[o]||(at[o]=!0,console.error("Unsupported vendor-prefixed style property %s. Did you mean %s?",o,o.charAt(0).toUpperCase()+o.slice(1))):!it.test(c)||wt.hasOwnProperty(c)&&wt[c]||(wt[c]=!0,console.error(`Style property values shouldn't contain a semicolon. Try "%s: %s" instead.`,o,c.replace(it,""))),typeof c=="number"&&(isNaN(c)?It||(It=!0,console.error("`NaN` is an invalid value for the `%s` css style property.",o)):isFinite(c)||je||(je=!0,console.error("`Infinity` is an invalid value for the `%s` css style property.",o)))),c==null||typeof c=="boolean"||c===""?g?i.setProperty(o,""):o==="float"?i.cssFloat="":i[o]="":g?i.setProperty(o,c):typeof c!="number"||c===0||$t.has(o)?o==="float"?i.cssFloat=c:(Gh(c,o),i[o]=(""+c).trim()):i[o]=c+"px"}function c0(i,o,c){if(o!=null&&typeof o!="object")throw Error("The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.");if(o&&Object.freeze(o),i=i.style,c!=null){if(o){var g={};if(c){for(var b in c)if(c.hasOwnProperty(b)&&!o.hasOwnProperty(b))for(var v=ft[b]||[b],A=0;A<v.length;A++)g[v[A]]=b}for(var O in o)if(o.hasOwnProperty(O)&&(!c||c[O]!==o[O]))for(b=ft[O]||[O],v=0;v<b.length;v++)g[b[v]]=O;O={};for(var j in o)for(b=ft[j]||[j],v=0;v<b.length;v++)O[b[v]]=j;j={};for(var B in g)if(b=g[B],(v=O[B])&&b!==v&&(A=b+","+v,!j[A])){j[A]=!0,A=console;var et=o[b];A.error.call(A,"%s a style property during rerender (%s) when a conflicting property is set (%s) can lead to styling bugs. To avoid this, don't mix shorthand and non-shorthand properties for the same value; instead, replace the shorthand with separate values.",et==null||typeof et=="boolean"||et===""?"Removing":"Updating",b,v)}}for(var st in c)!c.hasOwnProperty(st)||o!=null&&o.hasOwnProperty(st)||(st.indexOf("--")===0?i.setProperty(st,""):st==="float"?i.cssFloat="":i[st]="");for(var I in o)B=o[I],o.hasOwnProperty(I)&&c[I]!==B&&l0(i,I,B)}else for(g in o)o.hasOwnProperty(g)&&l0(i,g,o[g])}function mr(i){if(i.indexOf("-")===-1)return!1;switch(i){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}}function $S(i){return Ue.get(i)||i}function qS(i,o){if(Xs.call(fy,o)&&fy[o])return!0;if(JK.test(o)){if(i="aria-"+o.slice(4).toLowerCase(),i=hC.hasOwnProperty(i)?i:null,i==null)return console.error("Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.",o),fy[o]=!0;if(o!==i)return console.error("Invalid ARIA attribute `%s`. Did you mean `%s`?",o,i),fy[o]=!0}if(FK.test(o)){if(i=o.toLowerCase(),i=hC.hasOwnProperty(i)?i:null,i==null)return fy[o]=!0,!1;o!==i&&(console.error("Unknown ARIA attribute `%s`. Did you mean `%s`?",o,i),fy[o]=!0)}return!0}function YS(i,o){var c=[],g;for(g in o)qS(i,g)||c.push(g);o=c.map(function(b){return"`"+b+"`"}).join(", "),c.length===1?console.error("Invalid aria prop %s on <%s> tag. For details, see https://react.dev/link/invalid-aria-props",o,i):1<c.length&&console.error("Invalid aria props %s on <%s> tag. For details, see https://react.dev/link/invalid-aria-props",o,i)}function u0(i,o,c,g){if(Xs.call(Is,o)&&Is[o])return!0;var b=o.toLowerCase();if(b==="onfocusin"||b==="onfocusout")return console.error("React uses onFocus and onBlur instead of onFocusIn and onFocusOut. All React events are normalized to bubble, so onFocusIn and onFocusOut are not needed/supported by React."),Is[o]=!0;if(typeof c=="function"&&(i==="form"&&o==="action"||i==="input"&&o==="formAction"||i==="button"&&o==="formAction"))return!0;if(g!=null){if(i=g.possibleRegistrationNames,g.registrationNameDependencies.hasOwnProperty(o))return!0;if(g=i.hasOwnProperty(b)?i[b]:null,g!=null)return console.error("Invalid event handler property `%s`. Did you mean `%s`?",o,g),Is[o]=!0;if(xj.test(o))return console.error("Unknown event handler property `%s`. It will be ignored.",o),Is[o]=!0}else if(xj.test(o))return KK.test(o)&&console.error("Invalid event handler property `%s`. React events use the camelCase naming convention, for example `onClick`.",o),Is[o]=!0;if(WK.test(o)||tW.test(o))return!0;if(b==="innerhtml")return console.error("Directly setting property `innerHTML` is not permitted. For more information, lookup documentation on `dangerouslySetInnerHTML`."),Is[o]=!0;if(b==="aria")return console.error("The `aria` attribute is reserved for future use in React. Pass individual `aria-` attributes instead."),Is[o]=!0;if(b==="is"&&c!==null&&c!==void 0&&typeof c!="string")return console.error("Received a `%s` for a string attribute `is`. If this is expected, cast the value to a string.",typeof c),Is[o]=!0;if(typeof c=="number"&&isNaN(c))return console.error("Received NaN for the `%s` attribute. If this is expected, cast the value to a string.",o),Is[o]=!0;if(Qo.hasOwnProperty(b)){if(b=Qo[b],b!==o)return console.error("Invalid DOM property `%s`. Did you mean `%s`?",o,b),Is[o]=!0}else if(o!==b)return console.error("React does not recognize the `%s` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `%s` instead. If you accidentally passed it from a parent component, remove it from the DOM element.",o,b),Is[o]=!0;switch(o){case"dangerouslySetInnerHTML":case"children":case"style":case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":return!0;case"innerText":case"textContent":return!0}switch(typeof c){case"boolean":switch(o){case"autoFocus":case"checked":case"multiple":case"muted":case"selected":case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":case"capture":case"download":case"inert":return!0;default:return b=o.toLowerCase().slice(0,5),b==="data-"||b==="aria-"?!0:(c?console.error('Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.',c,o,o,c,o):console.error('Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.\n\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.',c,o,o,c,o,o,o),Is[o]=!0)}case"function":case"symbol":return Is[o]=!0,!1;case"string":if(c==="false"||c==="true"){switch(o){case"checked":case"selected":case"multiple":case"muted":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":case"inert":break;default:return!0}console.error("Received the string `%s` for the boolean attribute `%s`. %s Did you mean %s={%s}?",c,o,c==="false"?"The browser will interpret it as a truthy value.":'Although this works, it will not work as expected if you pass the string "false".',o,c),Is[o]=!0}}return!0}function aM(i,o,c){var g=[],b;for(b in o)u0(i,b,o[b],c)||g.push(b);o=g.map(function(v){return"`"+v+"`"}).join(", "),g.length===1?console.error("Invalid value for prop %s on <%s> tag. Either remove it from the element, or pass a string or number value to keep it in the DOM. For details, see https://react.dev/link/attribute-behavior ",o,i):1<g.length&&console.error("Invalid values for props %s on <%s> tag. Either remove them from the element, or pass a string or number value to keep them in the DOM. For details, see https://react.dev/link/attribute-behavior ",o,i)}function Zh(i){return eW.test(""+i)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":i}function no(){}function Mo(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}function Np(i){var o=Eo(i);if(o&&(i=o.stateNode)){var c=i[cs]||null;t:switch(i=o.stateNode,o.type){case"input":if(cl(i,c.value,c.defaultValue,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name),o=c.name,c.type==="radio"&&o!=null){for(c=i;c.parentNode;)c=c.parentNode;for(qe(o,"name"),c=c.querySelectorAll('input[name="'+Fe(""+o)+'"][type="radio"]'),o=0;o<c.length;o++){var g=c[o];if(g!==i&&g.form===i.form){var b=g[cs]||null;if(!b)throw Error("ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported.");cl(g,b.value,b.defaultValue,b.defaultValue,b.checked,b.defaultChecked,b.type,b.name)}}for(o=0;o<c.length;o++)g=c[o],g.form===i.form&&i0(g)}break t;case"textarea":gc(i,c.value,c.defaultValue);break t;case"select":o=c.value,o!=null&&gr(i,!!c.multiple,o,!1)}}}function Lp(i,o,c){if(SM)return i(o,c);SM=!0;try{var g=i(o);return g}finally{if(SM=!1,(hy!==null||dy!==null)&&($s(),hy&&(o=hy,i=dy,dy=hy=null,Np(o),i)))for(o=0;o<i.length;o++)Np(i[o])}}function yr(i,o){var c=i.stateNode;if(c===null)return null;var g=c[cs]||null;if(g===null)return null;c=g[o];t:switch(o){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)||(i=i.type,g=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!g;break t;default:i=!1}if(i)return null;if(c&&typeof c!="function")throw Error("Expected `"+o+"` listener to be a function, instead got a value of `"+typeof c+"` type.");return c}function bc(){if(dC)return dC;var i,o=CM,c=o.length,g,b="value"in Kf?Kf.value:Kf.textContent,v=b.length;for(i=0;i<c&&o[i]===b[i];i++);var A=c-i;for(g=1;g<=A&&o[c-g]===b[v-g];g++);return dC=b.slice(i,1<g?1-g:void 0)}function Qh(i){var o=i.keyCode;return"charCode"in i?(i=i.charCode,i===0&&o===13&&(i=13)):i=o,i===10&&(i=13),32<=i||i===13?i:0}function Qu(){return!0}function f0(){return!1}function ii(i){function o(c,g,b,v,A){this._reactName=c,this._targetInst=b,this.type=g,this.nativeEvent=v,this.target=A,this.currentTarget=null;for(var O in i)i.hasOwnProperty(O)&&(c=i[O],this[O]=c?c(v):v[O]);return this.isDefaultPrevented=(v.defaultPrevented!=null?v.defaultPrevented:v.returnValue===!1)?Qu:f0,this.isPropagationStopped=f0,this}return pe(o.prototype,{preventDefault:function(){this.defaultPrevented=!0;var c=this.nativeEvent;c&&(c.preventDefault?c.preventDefault():typeof c.returnValue!="unknown"&&(c.returnValue=!1),this.isDefaultPrevented=Qu)},stopPropagation:function(){var c=this.nativeEvent;c&&(c.stopPropagation?c.stopPropagation():typeof c.cancelBubble!="unknown"&&(c.cancelBubble=!0),this.isPropagationStopped=Qu)},persist:function(){},isPersistent:Qu}),o}function xa(i){var o=this.nativeEvent;return o.getModifierState?o.getModifierState(i):(i=gW[i])?!!o[i]:!1}function Fh(){return xa}function Fu(i,o){switch(i){case"keyup":return TW.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==Ej;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Sa(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}function h0(i,o){switch(i){case"compositionend":return Sa(o);case"keypress":return o.which!==Tj?null:(Oj=!0,Mj);case"textInput":return i=o.data,i===Mj&&Oj?null:i;default:return null}}function jp(i,o){if(gy)return i==="compositionend"||!MM&&Fu(i,o)?(i=bc(),dC=CM=Kf=null,gy=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(o.ctrlKey||o.altKey||o.metaKey)||o.ctrlKey&&o.altKey){if(o.char&&1<o.char.length)return o.char;if(o.which)return String.fromCharCode(o.which)}return null;case"compositionend":return Aj&&o.locale!=="ko"?null:o.data;default:return null}}function d0(i){var o=i&&i.nodeName&&i.nodeName.toLowerCase();return o==="input"?!!OW[i.type]:o==="textarea"}function _p(i){if(!ql)return!1;i="on"+i;var o=i in document;return o||(o=document.createElement("div"),o.setAttribute(i,"return;"),o=typeof o[i]=="function"),o}function Jh(i,o,c,g){hy?dy?dy.push(g):dy=[g]:hy=g,o=qo(o,"onChange"),0<o.length&&(c=new gC("onChange","change",null,c,g),i.push({event:c,listeners:o}))}function XS(i){Ze(i,0)}function wi(i){var o=ll(i);if(i0(o))return i}function hl(i,o){if(i==="change")return o}function Kh(){fx&&(fx.detachEvent("onpropertychange",Ju),hx=fx=null)}function Ju(i){if(i.propertyName==="value"&&wi(hx)){var o=[];Jh(o,hx,i,Mo(i)),Lp(XS,o)}}function lM(i,o,c){i==="focusin"?(Kh(),fx=o,hx=c,fx.attachEvent("onpropertychange",Ju)):i==="focusout"&&Kh()}function g0(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return wi(hx)}function p0(i,o){if(i==="click")return wi(o)}function Wh(i,o){if(i==="input"||i==="change")return wi(o)}function Bp(i,o){return i===o&&(i!==0||1/i===1/o)||i!==i&&o!==o}function Ku(i,o){if(Zs(i,o))return!0;if(typeof i!="object"||i===null||typeof o!="object"||o===null)return!1;var c=Object.keys(i),g=Object.keys(o);if(c.length!==g.length)return!1;for(g=0;g<c.length;g++){var b=c[g];if(!Xs.call(o,b)||!Zs(i[b],o[b]))return!1}return!0}function IS(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function ZS(i,o){var c=IS(i);i=0;for(var g;c;){if(c.nodeType===3){if(g=i+c.textContent.length,i<=o&&g>=o)return{node:c,offset:o-i};i=g}t:{for(;c;){if(c.nextSibling){c=c.nextSibling;break t}c=c.parentNode}c=void 0}c=IS(c)}}function QS(i,o){return i&&o?i===o?!0:i&&i.nodeType===3?!1:o&&o.nodeType===3?QS(i,o.parentNode):"contains"in i?i.contains(o):i.compareDocumentPosition?!!(i.compareDocumentPosition(o)&16):!1:!1}function Pp(i){i=i!=null&&i.ownerDocument!=null&&i.ownerDocument.defaultView!=null?i.ownerDocument.defaultView:window;for(var o=To(i.document);o instanceof i.HTMLIFrameElement;){try{var c=typeof o.contentWindow.location.href=="string"}catch{c=!1}if(c)i=o.contentWindow;else break;o=To(i.document)}return o}function m0(i){var o=i&&i.nodeName&&i.nodeName.toLowerCase();return o&&(o==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||o==="textarea"||i.contentEditable==="true")}function FS(i,o,c){var g=c.window===c?c.document:c.nodeType===9?c:c.ownerDocument;DM||py==null||py!==To(g)||(g=py,"selectionStart"in g&&m0(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}),dx&&Ku(dx,g)||(dx=g,g=qo(OM,"onSelect"),0<g.length&&(o=new gC("onSelect","select",null,o,c),i.push({event:o,listeners:g}),o.target=py)))}function vc(i,o){var c={};return c[i.toLowerCase()]=o.toLowerCase(),c["Webkit"+i]="webkit"+o,c["Moz"+i]="moz"+o,c}function xc(i){if(RM[i])return RM[i];if(!my[i])return i;var o=my[i],c;for(c in o)if(o.hasOwnProperty(c)&&c in Rj)return RM[i]=o[c];return i}function Oo(i,o){_j.set(i,o),Ao(o,[i])}function JS(i){for(var o=mC,c=0;c<i.length;c++){var g=i[c];if(typeof g=="object"&&g!==null)if(qn(g)&&g.length===2&&typeof g[0]=="string"){if(o!==mC&&o!==_M)return LM;o=_M}else return LM;else{if(typeof g=="function"||typeof g=="string"&&50<g.length||o!==mC&&o!==jM)return LM;o=jM}}return o}function y0(i,o,c,g){for(var b in i)Xs.call(i,b)&&b[0]!=="_"&&br(b,i[b],o,c,g)}function br(i,o,c,g,b){switch(typeof o){case"object":if(o===null){o="null";break}else{if(o.$$typeof===go){var v=H(o.type)||"…",A=o.key;o=o.props;var O=Object.keys(o),j=O.length;if(A==null&&j===0){o="<"+v+" />";break}if(3>g||j===1&&O[0]==="children"&&A==null){o="<"+v+" … />";break}c.push([b+" ".repeat(g)+i,"<"+v]),A!==null&&br("key",A,c,g+1,b),i=!1;for(var B in o)B==="children"?o.children!=null&&(!qn(o.children)||0<o.children.length)&&(i=!0):Xs.call(o,B)&&B[0]!=="_"&&br(B,o[B],c,g+1,b);c.push(["",i?">…</"+v+">":"/>"]);return}if(v=Object.prototype.toString.call(o),v=v.slice(8,v.length-1),v==="Array"){if(B=JS(o),B===jM||B===mC){o=JSON.stringify(o);break}else if(B===_M){for(c.push([b+" ".repeat(g)+i,""]),i=0;i<o.length;i++)v=o[i],br(v[0],v[1],c,g+1,b);return}}if(v==="Promise"){if(o.status==="fulfilled"){if(v=c.length,br(i,o.value,c,g,b),c.length>v){c=c[v],c[1]="Promise<"+(c[1]||"Object")+">";return}}else if(o.status==="rejected"&&(v=c.length,br(i,o.reason,c,g,b),c.length>v)){c=c[v],c[1]="Rejected Promise<"+c[1]+">";return}c.push([" ".repeat(g)+i,"Promise"]);return}v==="Object"&&(B=Object.getPrototypeOf(o))&&typeof B.constructor=="function"&&(v=B.constructor.name),c.push([b+" ".repeat(g)+i,v==="Object"?3>g?"":"…":v]),3>g&&y0(o,c,g+1,b);return}case"function":o=o.name===""?"() => {}":o.name+"() {}";break;case"string":o=o===_W?"…":JSON.stringify(o);break;case"undefined":o="undefined";break;case"boolean":o=o?"true":"false";break;default:o=String(o)}c.push([b+" ".repeat(g)+i,o])}function KS(i,o,c,g){var b=!0;for(A in i)A in o||(c.push([yC+" ".repeat(g)+A,"…"]),b=!1);for(var v in o)if(v in i){var A=i[v],O=o[v];if(A!==O){if(g===0&&v==="children")b=" ".repeat(g)+v,c.push([yC+b,"…"],[bC+b,"…"]);else{if(!(3<=g)){if(typeof A=="object"&&typeof O=="object"&&A!==null&&O!==null&&A.$$typeof===O.$$typeof)if(O.$$typeof===go){if(A.type===O.type&&A.key===O.key){A=H(O.type)||"…",b=" ".repeat(g)+v,A="<"+A+" … />",c.push([yC+b,A],[bC+b,A]),b=!1;continue}}else{var j=Object.prototype.toString.call(A),B=Object.prototype.toString.call(O);if(j===B&&(B==="[object Object]"||B==="[object Array]")){j=[Uj+" ".repeat(g)+v,B==="[object Array]"?"Array":""],c.push(j),B=c.length,KS(A,O,c,g+1)?B===c.length&&(j[1]="Referentially unequal but deeply equal objects. Consider memoization."):b=!1;continue}}else if(typeof A=="function"&&typeof O=="function"&&A.name===O.name&&A.length===O.length&&(j=Function.prototype.toString.call(A),B=Function.prototype.toString.call(O),j===B)){A=O.name===""?"() => {}":O.name+"() {}",c.push([Uj+" ".repeat(g)+v,A+" Referentially unequal function closure. Consider memoization."]);continue}}br(v,A,c,g,yC),br(v,O,c,g,bC)}b=!1}}else c.push([bC+" ".repeat(g)+v,"…"]),b=!1;return b}function Do(i){Le=i&63?"Blocking":i&64?"Gesture":i&4194176?"Transition":i&62914560?"Suspense":i&2080374784?"Idle":"Other"}function io(i,o,c,g){bn&&(th.start=o,th.end=c,ou.color="warning",ou.tooltipText=g,ou.properties=null,(i=i._debugTask)?i.run(performance.measure.bind(performance,g,th)):performance.measure(g,th))}function Up(i,o,c){io(i,o,c,"Reconnect")}function Hp(i,o,c,g,b){var v=F(i);if(v!==null&&bn){var A=i.alternate,O=i.actualDuration;if(A===null||A.child!==i.child)for(var j=i.child;j!==null;j=j.sibling)O-=j.actualDuration;g=.5>O?g?"tertiary-light":"primary-light":10>O?g?"tertiary":"primary":100>O?g?"tertiary-dark":"primary-dark":"error";var B=i.memoizedProps;O=i._debugTask,B!==null&&A!==null&&A.memoizedProps!==B?(j=[BW],B=KS(A.memoizedProps,B,j,0),1<j.length&&(B&&!Wf&&!(A.lanes&b)&&100<i.actualDuration?(Wf=!0,j[0]=PW,ou.color="warning",ou.tooltipText=Hj):(ou.color=g,ou.tooltipText=v),ou.properties=j,th.start=o,th.end=c,O!=null?O.run(performance.measure.bind(performance,""+v,th)):performance.measure(""+v,th))):O!=null?O.run(console.timeStamp.bind(console,v,o,c,Yr,void 0,g)):console.timeStamp(v,o,c,Yr,void 0,g)}}function b0(i,o,c,g){if(bn){var b=F(i);if(b!==null){for(var v=null,A=[],O=0;O<g.length;O++){var j=g[O];v==null&&j.source!==null&&(v=j.source._debugTask),j=j.value,A.push(["Error",typeof j=="object"&&j!==null&&typeof j.message=="string"?String(j.message):String(j)])}i.key!==null&&br("key",i.key,A,0,""),i.memoizedProps!==null&&y0(i.memoizedProps,A,0,""),v==null&&(v=i._debugTask),i={start:o,end:c,detail:{devtools:{color:"error",track:Yr,tooltipText:i.tag===13?"Hydration failed":"Error boundary caught an error",properties:A}}},v?v.run(performance.measure.bind(performance,""+b,i)):performance.measure(""+b,i)}}}function Ro(i,o,c,g,b){if(b!==null){if(bn){var v=F(i);if(v!==null){g=[];for(var A=0;A<b.length;A++){var O=b[A].value;g.push(["Error",typeof O=="object"&&O!==null&&typeof O.message=="string"?String(O.message):String(O)])}i.key!==null&&br("key",i.key,g,0,""),i.memoizedProps!==null&&y0(i.memoizedProps,g,0,""),o={start:o,end:c,detail:{devtools:{color:"error",track:Yr,tooltipText:"A lifecycle or effect errored",properties:g}}},(i=i._debugTask)?i.run(performance.measure.bind(performance,""+v,o)):performance.measure(""+v,o)}}}else v=F(i),v!==null&&bn&&(b=1>g?"secondary-light":100>g?"secondary":500>g?"secondary-dark":"error",(i=i._debugTask)?i.run(console.timeStamp.bind(console,v,o,c,Yr,void 0,b)):console.timeStamp(v,o,c,Yr,void 0,b))}function cM(i,o,c,g){if(bn&&!(o<=i)){var b=(c&738197653)===c?"tertiary-dark":"primary-dark";c=(c&536870912)===c?"Prepared":(c&201326741)===c?"Hydrated":"Render",g?g.run(console.timeStamp.bind(console,c,i,o,Le,ze,b)):console.timeStamp(c,i,o,Le,ze,b)}}function WS(i,o,c,g){!bn||o<=i||(c=(c&738197653)===c?"tertiary-dark":"primary-dark",g?g.run(console.timeStamp.bind(console,"Prewarm",i,o,Le,ze,c)):console.timeStamp("Prewarm",i,o,Le,ze,c))}function tw(i,o,c,g){!bn||o<=i||(c=(c&738197653)===c?"tertiary-dark":"primary-dark",g?g.run(console.timeStamp.bind(console,"Suspended",i,o,Le,ze,c)):console.timeStamp("Suspended",i,o,Le,ze,c))}function uM(i,o,c,g,b,v){if(bn&&!(o<=i)){c=[];for(var A=0;A<g.length;A++){var O=g[A].value;c.push(["Recoverable Error",typeof O=="object"&&O!==null&&typeof O.message=="string"?String(O.message):String(O)])}i={start:i,end:o,detail:{devtools:{color:"primary-dark",track:Le,trackGroup:ze,tooltipText:b?"Hydration Failed":"Recovered after Error",properties:c}}},v?v.run(performance.measure.bind(performance,"Recovered",i)):performance.measure("Recovered",i)}}function v0(i,o,c,g){!bn||o<=i||(g?g.run(console.timeStamp.bind(console,"Errored",i,o,Le,ze,"error")):console.timeStamp("Errored",i,o,Le,ze,"error"))}function fM(i,o,c,g){!bn||o<=i||(g?g.run(console.timeStamp.bind(console,c,i,o,Le,ze,"secondary-light")):console.timeStamp(c,i,o,Le,ze,"secondary-light"))}function ew(i,o,c,g,b){if(bn&&!(o<=i)){for(var v=[],A=0;A<c.length;A++){var O=c[A].value;v.push(["Error",typeof O=="object"&&O!==null&&typeof O.message=="string"?String(O.message):String(O)])}i={start:i,end:o,detail:{devtools:{color:"error",track:Le,trackGroup:ze,tooltipText:g?"Remaining Effects Errored":"Commit Errored",properties:v}}},b?b.run(performance.measure.bind(performance,"Errored",i)):performance.measure("Errored",i)}}function x0(i,o,c){!bn||o<=i||console.timeStamp("Animating",i,o,Le,ze,"secondary-dark")}function kp(){for(var i=yy,o=BM=yy=0;o<i;){var c=Xr[o];Xr[o++]=null;var g=Xr[o];Xr[o++]=null;var b=Xr[o];Xr[o++]=null;var v=Xr[o];if(Xr[o++]=null,g!==null&&b!==null){var A=g.pending;A===null?b.next=b:(b.next=A.next,A.next=b),g.pending=b}v!==0&&S0(c,b,v)}}function Wu(i,o,c,g){Xr[yy++]=i,Xr[yy++]=o,Xr[yy++]=c,Xr[yy++]=g,BM|=g,i.lanes|=g,i=i.alternate,i!==null&&(i.lanes|=g)}function Sc(i,o,c,g){return Wu(i,o,c,g),td(i)}function ji(i,o){return Wu(i,null,null,o),td(i)}function S0(i,o,c){i.lanes|=c;var g=i.alternate;g!==null&&(g.lanes|=c);for(var b=!1,v=i.return;v!==null;)v.childLanes|=c,g=v.alternate,g!==null&&(g.childLanes|=c),v.tag===22&&(i=v.stateNode,i===null||i._visibility&gx||(b=!0)),i=v,v=v.return;return i.tag===3?(v=i.stateNode,b&&o!==null&&(b=31-Ei(c),i=v.hiddenUpdates,g=i[b],g===null?i[b]=[o]:g.push(o),o.lane=c|536870912),v):null}function td(i){if(Vx>WW)throw wg=Vx=0,Gx=p2=null,Error("Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.");wg>ttt&&(wg=0,Gx=null,console.error("Maximum update depth exceeded. This can happen when a component calls setState inside useEffect, but useEffect either doesn't have a dependency array, or one of the dependencies changes on every render.")),i.alternate===null&&i.flags&4098&&ho(i);for(var o=i,c=o.return;c!==null;)o.alternate===null&&o.flags&4098&&ho(i),o=c,c=o.return;return o.tag===3?o.stateNode:null}function dl(i){if(Ir===null)return i;var o=Ir(i);return o===void 0?i:o.current}function Vp(i){if(Ir===null)return i;var o=Ir(i);return o===void 0?i!=null&&typeof i.render=="function"&&(o=dl(i.render),i.render!==o)?(o={$$typeof:Vf,render:o},i.displayName!==void 0&&(o.displayName=i.displayName),o):i:o.current}function w0(i,o){if(Ir===null)return!1;var c=i.elementType;o=o.type;var g=!1,b=typeof o=="object"&&o!==null?o.$$typeof:null;switch(i.tag){case 1:typeof o=="function"&&(g=!0);break;case 0:(typeof o=="function"||b===Pi)&&(g=!0);break;case 11:(b===Vf||b===Pi)&&(g=!0);break;case 14:case 15:(b===tg||b===Pi)&&(g=!0);break;default:return!1}return!!(g&&(i=Ir(c),i!==void 0&&i===Ir(o)))}function wc(i){Ir!==null&&typeof WeakSet=="function"&&(by===null&&(by=new WeakSet),by.add(i))}function nw(i,o,c){do{var g=i,b=g.alternate,v=g.child,A=g.sibling,O=g.tag;g=g.type;var j=null;switch(O){case 0:case 15:case 1:j=g;break;case 11:j=g.render}if(Ir===null)throw Error("Expected resolveFamily to be set during hot reload.");var B=!1;if(g=!1,j!==null&&(j=Ir(j),j!==void 0&&(c.has(j)?g=!0:o.has(j)&&(O===1?g=!0:B=!0))),by!==null&&(by.has(i)||b!==null&&by.has(b))&&(g=!0),g&&(i._debugNeedsRemount=!0),(g||B)&&(b=ji(i,2),b!==null&&ee(b,i,2)),v===null||g||nw(v,o,c),A===null)break;i=A}while(!0)}function hM(i,o,c,g){this.tag=i,this.key=c,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=o,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,this.actualDuration=-0,this.actualStartTime=-1.1,this.treeBaseDuration=this.selfBaseDuration=-0,this._debugTask=this._debugStack=this._debugOwner=this._debugInfo=null,this._debugNeedsRemount=!1,this._debugHookTypes=null,kj||typeof Object.preventExtensions!="function"||Object.preventExtensions(this)}function C0(i){return i=i.prototype,!(!i||!i.isReactComponent)}function vr(i,o){var c=i.alternate;switch(c===null?(c=w(i.tag,o,i.key,i.mode),c.elementType=i.elementType,c.type=i.type,c.stateNode=i.stateNode,c._debugOwner=i._debugOwner,c._debugStack=i._debugStack,c._debugTask=i._debugTask,c._debugHookTypes=i._debugHookTypes,c.alternate=i,i.alternate=c):(c.pendingProps=o,c.type=i.type,c.flags=0,c.subtreeFlags=0,c.deletions=null,c.actualDuration=-0,c.actualStartTime=-1.1),c.flags=i.flags&65011712,c.childLanes=i.childLanes,c.lanes=i.lanes,c.child=i.child,c.memoizedProps=i.memoizedProps,c.memoizedState=i.memoizedState,c.updateQueue=i.updateQueue,o=i.dependencies,c.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext,_debugThenableState:o._debugThenableState},c.sibling=i.sibling,c.index=i.index,c.ref=i.ref,c.refCleanup=i.refCleanup,c.selfBaseDuration=i.selfBaseDuration,c.treeBaseDuration=i.treeBaseDuration,c._debugInfo=i._debugInfo,c._debugNeedsRemount=i._debugNeedsRemount,c.tag){case 0:case 15:c.type=dl(i.type);break;case 1:c.type=dl(i.type);break;case 11:c.type=Vp(i.type)}return c}function E0(i,o){i.flags&=65011714;var c=i.alternate;return c===null?(i.childLanes=0,i.lanes=o,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null,i.selfBaseDuration=0,i.treeBaseDuration=0):(i.childLanes=c.childLanes,i.lanes=c.lanes,i.child=c.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=c.memoizedProps,i.memoizedState=c.memoizedState,i.updateQueue=c.updateQueue,i.type=c.type,o=c.dependencies,i.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext,_debugThenableState:o._debugThenableState},i.selfBaseDuration=c.selfBaseDuration,i.treeBaseDuration=c.treeBaseDuration),i}function Cc(i,o,c,g,b,v){var A=0,O=i;if(typeof i=="function")C0(i)&&(A=1),O=dl(O);else if(typeof i=="string")A=ot(),A=Jw(i,c,A)?26:i==="html"||i==="head"||i==="body"?27:5;else t:switch(i){case Zo:return o=w(31,c,o,b),o.elementType=Zo,o.lanes=v,o;case kf:return Ec(c.children,b,v,o);case ls:A=8,b|=ws,b|=Ga;break;case Wd:return i=c,g=b,typeof i.id!="string"&&console.error('Profiler must specify an "id" of type `string` as a prop. Received the type `%s` instead.',typeof i.id),o=w(12,i,o,g|me),o.elementType=Wd,o.lanes=v,o.stateNode={effectDuration:0,passiveEffectDuration:0},o;case tu:return o=w(13,c,o,b),o.elementType=tu,o.lanes=v,o;case xs:return o=w(19,c,o,b),o.elementType=xs,o.lanes=v,o;default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case Io:A=10;break t;case Wm:A=9;break t;case Vf:A=11,O=Vp(O);break t;case tg:A=14;break t;case Pi:A=16,O=null;break t}O="",(i===void 0||typeof i=="object"&&i!==null&&Object.keys(i).length===0)&&(O+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."),i===null?c="null":qn(i)?c="array":i!==void 0&&i.$$typeof===go?(c="<"+(H(i.type)||"Unknown")+" />",O=" Did you accidentally export a JSX literal instead of a component?"):c=typeof i,(A=g?J(g):null)&&(O+=`
|
|
1067
|
+
|
|
1068
|
+
Check the render method of \``+A+"`."),A=29,c=Error("Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: "+(c+"."+O)),O=null}return o=w(A,c,o,b),o.elementType=i,o.type=O,o.lanes=v,o._debugOwner=g,o}function gl(i,o,c){return o=Cc(i.type,i.key,i.props,i._owner,o,c),o._debugOwner=i._owner,o._debugStack=i._debugStack,o._debugTask=i._debugTask,o}function Ec(i,o,c,g){return i=w(7,i,g,o),i.lanes=c,i}function tf(i,o,c){return i=w(6,i,null,o),i.lanes=c,i}function A0(i){var o=w(18,null,null,te);return o.stateNode=i,o}function Gp(i,o,c){return o=w(4,i.children!==null?i.children:[],i.key,o),o.lanes=c,o.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},o}function Qi(i,o){if(typeof i=="object"&&i!==null){var c=PM.get(i);return c!==void 0?c:(o={value:i,source:o,stack:Rt(o)},PM.set(i,o),o)}return{value:i,source:o,stack:Rt(o)}}function zo(i,o){pl(),vy[xy++]=px,vy[xy++]=vC,vC=i,px=o}function T0(i,o,c){pl(),Zr[Qr++]=au,Zr[Qr++]=lu,Zr[Qr++]=ag,ag=i;var g=au;i=lu;var b=32-Ei(g)-1;g&=~(1<<b),c+=1;var v=32-Ei(o)+b;if(30<v){var A=b-b%5;v=(g&(1<<A)-1).toString(32),g>>=A,b-=A,au=1<<32-Ei(o)+b|c<<b|g,lu=v+i}else au=1<<v|c<<b|g,lu=i}function $p(i){pl(),i.return!==null&&(zo(i,1),T0(i,1,0))}function qp(i){for(;i===vC;)vC=vy[--xy],vy[xy]=null,px=vy[--xy],vy[xy]=null;for(;i===ag;)ag=Zr[--Qr],Zr[Qr]=null,lu=Zr[--Qr],Zr[Qr]=null,au=Zr[--Qr],Zr[Qr]=null}function iw(){return pl(),ag!==null?{id:au,overflow:lu}:null}function sw(i,o){pl(),Zr[Qr++]=au,Zr[Qr++]=lu,Zr[Qr++]=ag,au=o.id,lu=o.overflow,ag=i}function pl(){Oe||console.error("Expected to be hydrating. This is a bug in React. Please file an issue.")}function Ac(i,o){if(i.return===null){if(Fo===null)Fo={fiber:i,children:[],serverProps:void 0,serverTail:[],distanceFromLeaf:o};else{if(Fo.fiber!==i)throw Error("Saw multiple hydration diff roots in a pass. This is a bug in React.");Fo.distanceFromLeaf>o&&(Fo.distanceFromLeaf=o)}return Fo}var c=Ac(i.return,o+1).children;return 0<c.length&&c[c.length-1].fiber===i?(c=c[c.length-1],c.distanceFromLeaf>o&&(c.distanceFromLeaf=o),c):(o={fiber:i,children:[],serverProps:void 0,serverTail:[],distanceFromLeaf:o},c.push(o),o)}function ow(){Oe&&console.error("We should not be hydrating here. This is a bug in React. Please file a bug.")}function _i(i,o){Yl||(i=Ac(i,0),i.serverProps=null,o!==null&&(o=Iw(o),i.serverTail.push(o)))}function so(i){var o=1<arguments.length&&arguments[1]!==void 0?arguments[1]:!1,c="",g=Fo;throw g!==null&&(Fo=null,c=r0(g)),nd(Qi(Error("Hydration failed because the server rendered "+(o?"text":"HTML")+` didn't match the client. As a result this tree will be regenerated on the client. This can happen if a SSR-ed Client Component used:
|
|
1069
|
+
|
|
1070
|
+
- A server/client branch \`if (typeof window !== 'undefined')\`.
|
|
1071
|
+
- Variable input such as \`Date.now()\` or \`Math.random()\` which changes each time it's called.
|
|
1072
|
+
- Date formatting in a user's locale which doesn't match the server.
|
|
1073
|
+
- External changing data without sending a snapshot of it along with the HTML.
|
|
1074
|
+
- Invalid HTML tag nesting.
|
|
1075
|
+
|
|
1076
|
+
It can also happen if the client has a browser extension installed which messes with the HTML before React loaded.
|
|
1077
|
+
|
|
1078
|
+
https://react.dev/link/hydration-mismatch`+c),i)),UM}function M0(i){var o=i.stateNode,c=i.type,g=i.memoizedProps;switch(o[yn]=i,o[cs]=g,rs(c,g),c){case"dialog":Wt("cancel",o),Wt("close",o);break;case"iframe":case"object":case"embed":Wt("load",o);break;case"video":case"audio":for(c=0;c<$x.length;c++)Wt($x[c],o);break;case"source":Wt("error",o);break;case"img":case"image":case"link":Wt("error",o),Wt("load",o);break;case"details":Wt("toggle",o);break;case"input":hc("input",g),Wt("invalid",o),Zi(o,g),Ap(o,g.value,g.defaultValue,g.checked,g.defaultChecked,g.type,g.name,!0);break;case"option":GS(o,g);break;case"select":hc("select",g),Wt("invalid",o),Tp(o,g);break;case"textarea":hc("textarea",g),Wt("invalid",o),dc(o,g),qu(o,g.value,g.defaultValue,g.children)}c=g.children,typeof c!="string"&&typeof c!="number"&&typeof c!="bigint"||o.textContent===""+c||g.suppressHydrationWarning===!0||Dv(o.textContent,c)?(g.popover!=null&&(Wt("beforetoggle",o),Wt("toggle",o)),g.onScroll!=null&&Wt("scroll",o),g.onScrollEnd!=null&&Wt("scrollend",o),g.onClick!=null&&(o.onclick=no),o=!0):o=!1,o||so(i,!0)}function O0(i){for(us=i.return;us;)switch(us.tag){case 5:case 31:case 13:Fr=!1;return;case 27:case 3:Fr=!0;return;default:us=us.return}}function Tc(i){if(i!==us)return!1;if(!Oe)return O0(i),Oe=!0,!1;var o=i.tag,c;if((c=o!==3&&o!==27)&&((c=o===5)&&(c=i.type,c=!(c!=="form"&&c!=="button")||Nf(i.type,i.memoizedProps)),c=!c),c&&vn){for(c=vn;c;){var g=Ac(i,0),b=Iw(c);g.serverTail.push(b),c=b.type==="Suspense"?_f(c):qs(c.nextSibling)}so(i)}if(O0(i),o===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");vn=_f(i)}else if(o===31){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");vn=_f(i)}else o===27?(o=vn,Ul(i.type)?(i=M2,M2=null,vn=i):vn=o):vn=us?qs(i.stateNode.nextSibling):null;return!0}function ml(){vn=us=null,Yl=Oe=!1}function ed(){var i=nh;return i!==null&&(Ks===null?Ks=i:Ks.push.apply(Ks,i),nh=null),i}function nd(i){nh===null?nh=[i]:nh.push(i)}function yl(){var i=Fo;if(i!==null){Fo=null;for(var o=r0(i);0<i.children.length;)i=i.children[0];Lt(i.fiber,function(){console.error(`A tree hydrated but some attributes of the server rendered HTML didn't match the client properties. This won't be patched up. This can happen if a SSR-ed Client Component used:
|
|
1079
|
+
|
|
1080
|
+
- A server/client branch \`if (typeof window !== 'undefined')\`.
|
|
1081
|
+
- Variable input such as \`Date.now()\` or \`Math.random()\` which changes each time it's called.
|
|
1082
|
+
- Date formatting in a user's locale which doesn't match the server.
|
|
1083
|
+
- External changing data without sending a snapshot of it along with the HTML.
|
|
1084
|
+
- Invalid HTML tag nesting.
|
|
1085
|
+
|
|
1086
|
+
It can also happen if the client has a browser extension installed which messes with the HTML before React loaded.
|
|
1087
|
+
|
|
1088
|
+
%s%s`,"https://react.dev/link/hydration-mismatch",o)})}}function ef(){Sy=xC=null,wy=!1}function oo(i,o,c){vt(HM,o._currentValue,i),o._currentValue=c,vt(kM,o._currentRenderer,i),o._currentRenderer!==void 0&&o._currentRenderer!==null&&o._currentRenderer!==Gj&&console.error("Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."),o._currentRenderer=Gj}function No(i,o){i._currentValue=HM.current;var c=kM.current;lt(kM,o),i._currentRenderer=c,lt(HM,o)}function Yp(i,o,c){for(;i!==null;){var g=i.alternate;if((i.childLanes&o)!==o?(i.childLanes|=o,g!==null&&(g.childLanes|=o)):g!==null&&(g.childLanes&o)!==o&&(g.childLanes|=o),i===c)break;i=i.return}i!==c&&console.error("Expected to find the propagation root when scheduling context work. This error is likely caused by a bug in React. Please file an issue.")}function wa(i,o,c,g){var b=i.child;for(b!==null&&(b.return=i);b!==null;){var v=b.dependencies;if(v!==null){var A=b.child;v=v.firstContext;t:for(;v!==null;){var O=v;v=b;for(var j=0;j<o.length;j++)if(O.context===o[j]){v.lanes|=c,O=v.alternate,O!==null&&(O.lanes|=c),Yp(v.return,c,i),g||(A=null);break t}v=O.next}}else if(b.tag===18){if(A=b.return,A===null)throw Error("We just came from a parent so we must have had a parent. This is a bug in React.");A.lanes|=c,v=A.alternate,v!==null&&(v.lanes|=c),Yp(A,c,i),A=null}else A=b.child;if(A!==null)A.return=b;else for(A=b;A!==null;){if(A===i){A=null;break}if(b=A.sibling,b!==null){b.return=A.return,A=b;break}A=A.return}b=A}}function Lo(i,o,c,g){i=null;for(var b=o,v=!1;b!==null;){if(!v){if(b.flags&524288)v=!0;else if(b.flags&262144)break}if(b.tag===10){var A=b.alternate;if(A===null)throw Error("Should have a current fiber. This is a bug in React.");if(A=A.memoizedProps,A!==null){var O=b.type;Zs(b.pendingProps.value,A.value)||(i!==null?i.push(O):i=[O])}}else if(b===Gl.current){if(A=b.alternate,A===null)throw Error("Should have a current fiber. This is a bug in React.");A.memoizedState.memoizedState!==b.memoizedState.memoizedState&&(i!==null?i.push(Zx):i=[Zx])}b=b.return}i!==null&&wa(o,i,c,g),o.flags|=262144}function nf(i){for(i=i.firstContext;i!==null;){if(!Zs(i.context._currentValue,i.memoizedValue))return!0;i=i.next}return!1}function bl(i){xC=i,Sy=null,i=i.dependencies,i!==null&&(i.firstContext=null)}function ke(i){return wy&&console.error("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()."),D0(xC,i)}function id(i,o){return xC===null&&bl(i),D0(i,o)}function D0(i,o){var c=o._currentValue;if(o={context:o,memoizedValue:c,next:null},Sy===null){if(i===null)throw Error("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().");Sy=o,i.dependencies={lanes:0,firstContext:o,_debugThenableState:null},i.flags|=524288}else Sy=Sy.next=o;return c}function Xp(){return{controller:new kW,data:new Map,refCount:0}}function Mc(i){i.controller.signal.aborted&&console.warn("A cache instance was retained after it was already freed. This likely indicates a bug in React."),i.refCount++}function sd(i){i.refCount--,0>i.refCount&&console.warn("A cache instance was released after it was already freed. This likely indicates a bug in React."),i.refCount===0&&VW(GW,function(){i.controller.abort()})}function xr(i,o,c){i&127?0>Xl&&(Xl=hi(),yx=SC(o),VM=o,c!=null&&(GM=F(c)),(_e&(Mi|Wo))!==Vi&&(kn=!0,sh=mx),i=Lf(),o=Hr(),i!==Cy||o!==bx?Cy=-1.1:o!==null&&(sh=mx),ug=i,bx=o):i&4194048&&0>Jr&&(Jr=hi(),vx=SC(o),$j=o,c!=null&&(qj=F(c)),0>hu)&&(i=Lf(),o=Hr(),(i!==rh||o!==fg)&&(rh=-1.1),oh=i,fg=o)}function rw(i){if(0>Xl){Xl=hi(),yx=i._debugTask!=null?i._debugTask:null,(_e&(Mi|Wo))!==Vi&&(sh=mx);var o=Lf(),c=Hr();o!==Cy||c!==bx?Cy=-1.1:c!==null&&(sh=mx),ug=o,bx=c}0>Jr&&(Jr=hi(),vx=i._debugTask!=null?i._debugTask:null,0>hu)&&(i=Lf(),o=Hr(),(i!==rh||o!==fg)&&(rh=-1.1),oh=i,fg=o)}function Sr(){var i=lg;return lg=0,i}function sf(i){var o=lg;return lg=i,o}function Fi(i){var o=lg;return lg+=i,o}function Oc(){Kt=Qt=-1.1}function gn(){var i=Qt;return Qt=-1.1,i}function si(i){0<=i&&(Qt=i)}function ro(){var i=Nn;return Nn=-0,i}function Ns(i){0<=i&&(Nn=i)}function Ls(){var i=Tn;return Tn=null,i}function ao(){var i=kn;return kn=!1,i}function Ca(i){Qs=hi(),0>i.actualStartTime&&(i.actualStartTime=Qs)}function Ip(i){if(0<=Qs){var o=hi()-Qs;i.actualDuration+=o,i.selfBaseDuration=o,Qs=-1}}function od(i){if(0<=Qs){var o=hi()-Qs;i.actualDuration+=o,Qs=-1}}function Ji(){if(0<=Qs){var i=hi(),o=i-Qs;Qs=-1,lg+=o,Nn+=o,Kt=i}}function aw(i){Tn===null&&(Tn=[]),Tn.push(i),uu===null&&(uu=[]),uu.push(i)}function Dn(){Qs=hi(),0>Qt&&(Qt=Qs)}function Dc(i){for(var o=i.child;o;)i.actualDuration+=o.actualDuration,o=o.sibling}function Ea(i,o){if(Sx===null){var c=Sx=[];qM=0,hg=Ov(),Ey={status:"pending",value:void 0,then:function(g){c.push(g)}}}return qM++,o.then(R0,R0),o}function R0(){if(--qM===0&&(-1<Jr||(hu=-1.1),Sx!==null)){Ey!==null&&(Ey.status="fulfilled");var i=Sx;Sx=null,hg=0,Ey=null;for(var o=0;o<i.length;o++)(0,i[o])()}}function Zp(i,o){var c=[],g={status:"pending",value:null,reason:null,then:function(b){c.push(b)}};return i.then(function(){g.status="fulfilled",g.value=o;for(var b=0;b<c.length;b++)(0,c[b])(o)},function(b){for(g.status="rejected",g.reason=b,b=0;b<c.length;b++)(0,c[b])(void 0)}),g}function Aa(){var i=dg.current;return i!==null?i:cn.pooledCache}function of(i,o){o===null?vt(dg,dg.current,i):vt(dg,o.pool,i)}function z0(){var i=Aa();return i===null?null:{parent:fi._currentValue,pool:i}}function Qp(){return{didWarnAboutUncachedPromise:!1,thenables:[]}}function N0(i){return i=i.status,i==="fulfilled"||i==="rejected"}function js(i,o,c){pt.actQueue!==null&&(pt.didUsePromise=!0);var g=i.thenables;if(c=g[c],c===void 0?g.push(o):c!==o&&(i.didWarnAboutUncachedPromise||(i.didWarnAboutUncachedPromise=!0,console.error("A component was suspended by an uncached promise. Creating promises inside a Client Component or hook is not yet supported, except via a Suspense-compatible library or framework.")),o.then(no,no),o=c),o._debugInfo===void 0){i=performance.now(),g=o.displayName;var b={name:typeof g=="string"?g:"Promise",start:i,end:i,value:o};o._debugInfo=[{awaited:b}],o.status!=="fulfilled"&&o.status!=="rejected"&&(i=function(){b.end=performance.now()},o.then(i,i))}switch(o.status){case"fulfilled":return o.value;case"rejected":throw i=o.reason,rd(i),i;default:if(typeof o.status=="string")o.then(no,no);else{if(i=cn,i!==null&&100<i.shellSuspendCounter)throw Error("An unknown Component is an async Client Component. Only Server Components can be async at the moment. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server.");i=o,i.status="pending",i.then(function(v){if(o.status==="pending"){var A=o;A.status="fulfilled",A.value=v}},function(v){if(o.status==="pending"){var A=o;A.status="rejected",A.reason=v}})}switch(o.status){case"fulfilled":return o.value;case"rejected":throw i=o.reason,rd(i),i}throw pg=o,Ox=!0,Ay}}function _s(i){try{return IW(i)}catch(o){throw o!==null&&typeof o=="object"&&typeof o.then=="function"?(pg=o,Ox=!0,Ay):o}}function Rc(){if(pg===null)throw Error("Expected a suspended thenable. This is a bug in React. Please file an issue.");var i=pg;return pg=null,Ox=!1,i}function rd(i){if(i===Ay||i===DC)throw Error("Hooks are not supported inside an async component. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server.")}function _n(i){var o=ye;return i!=null&&(ye=o===null?i:o.concat(i)),o}function gs(){var i=ye;if(i!=null){for(var o=i.length-1;0<=o;o--)if(i[o].name!=null){var c=i[o].debugTask;if(c!=null)return c}}return null}function Ki(i,o,c){for(var g=Object.keys(i.props),b=0;b<g.length;b++){var v=g[b];if(v!=="children"&&v!=="key"){o===null&&(o=gl(i,c.mode,0),o._debugInfo=ye,o.return=c),Lt(o,function(A){console.error("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",A)},v);break}}}function jo(i){var o=Dx;return Dx+=1,Ty===null&&(Ty=Qp()),js(Ty,i,o)}function ps(i,o){o=o.props.ref,i.ref=o!==void 0?o:null}function _o(i,o){throw o.$$typeof===iC?Error(`A React Element from an older version of React was rendered. This is not supported. It can happen if:
|
|
1089
|
+
- Multiple copies of the "react" package is used.
|
|
1090
|
+
- A library pre-bundled an old copy of "react" or "react/jsx-runtime".
|
|
1091
|
+
- A compiler tries to "inline" JSX instead of using the runtime.`):(i=Object.prototype.toString.call(o),Error("Objects are not valid as a React child (found: "+(i==="[object Object]"?"object with keys {"+Object.keys(o).join(", ")+"}":i)+"). If you meant to render a collection of children, use an array instead."))}function lo(i,o){var c=gs();c!==null?c.run(_o.bind(null,i,o)):_o(i,o)}function L0(i,o){var c=F(i)||"Component";u_[c]||(u_[c]=!0,o=o.displayName||o.name||"Component",i.tag===3?console.error(`Functions are not valid as a React child. This may happen if you return %s instead of <%s /> from render. Or maybe you meant to call this function rather than return it.
|
|
1092
|
+
root.render(%s)`,o,o,o):console.error(`Functions are not valid as a React child. This may happen if you return %s instead of <%s /> from render. Or maybe you meant to call this function rather than return it.
|
|
1093
|
+
<%s>{%s}</%s>`,o,o,c,o,c))}function rf(i,o){var c=gs();c!==null?c.run(L0.bind(null,i,o)):L0(i,o)}function Fp(i,o){var c=F(i)||"Component";f_[c]||(f_[c]=!0,o=String(o),i.tag===3?console.error(`Symbols are not valid as a React child.
|
|
1094
|
+
root.render(%s)`,o):console.error(`Symbols are not valid as a React child.
|
|
1095
|
+
<%s>%s</%s>`,c,o,c))}function ad(i,o){var c=gs();c!==null?c.run(Fp.bind(null,i,o)):Fp(i,o)}function oi(i){function o(X,Z){if(i){var K=X.deletions;K===null?(X.deletions=[Z],X.flags|=16):K.push(Z)}}function c(X,Z){if(!i)return null;for(;Z!==null;)o(X,Z),Z=Z.sibling;return null}function g(X){for(var Z=new Map;X!==null;)X.key!==null?Z.set(X.key,X):Z.set(X.index,X),X=X.sibling;return Z}function b(X,Z){return X=vr(X,Z),X.index=0,X.sibling=null,X}function v(X,Z,K){return X.index=K,i?(K=X.alternate,K!==null?(K=K.index,K<Z?(X.flags|=67108866,Z):K):(X.flags|=67108866,Z)):(X.flags|=1048576,Z)}function A(X){return i&&X.alternate===null&&(X.flags|=67108866),X}function O(X,Z,K,xt){return Z===null||Z.tag!==6?(Z=tf(K,X.mode,xt),Z.return=X,Z._debugOwner=X,Z._debugTask=X._debugTask,Z._debugInfo=ye,Z):(Z=b(Z,K),Z.return=X,Z._debugInfo=ye,Z)}function j(X,Z,K,xt){var jt=K.type;return jt===kf?(Z=et(X,Z,K.props.children,xt,K.key),Ki(K,Z,X),Z):Z!==null&&(Z.elementType===jt||w0(Z,K)||typeof jt=="object"&&jt!==null&&jt.$$typeof===Pi&&_s(jt)===Z.type)?(Z=b(Z,K.props),ps(Z,K),Z.return=X,Z._debugOwner=K._owner,Z._debugInfo=ye,Z):(Z=gl(K,X.mode,xt),ps(Z,K),Z.return=X,Z._debugInfo=ye,Z)}function B(X,Z,K,xt){return Z===null||Z.tag!==4||Z.stateNode.containerInfo!==K.containerInfo||Z.stateNode.implementation!==K.implementation?(Z=Gp(K,X.mode,xt),Z.return=X,Z._debugInfo=ye,Z):(Z=b(Z,K.children||[]),Z.return=X,Z._debugInfo=ye,Z)}function et(X,Z,K,xt,jt){return Z===null||Z.tag!==7?(Z=Ec(K,X.mode,xt,jt),Z.return=X,Z._debugOwner=X,Z._debugTask=X._debugTask,Z._debugInfo=ye,Z):(Z=b(Z,K),Z.return=X,Z._debugInfo=ye,Z)}function st(X,Z,K){if(typeof Z=="string"&&Z!==""||typeof Z=="number"||typeof Z=="bigint")return Z=tf(""+Z,X.mode,K),Z.return=X,Z._debugOwner=X,Z._debugTask=X._debugTask,Z._debugInfo=ye,Z;if(typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case go:return K=gl(Z,X.mode,K),ps(K,Z),K.return=X,X=_n(Z._debugInfo),K._debugInfo=ye,ye=X,K;case kl:return Z=Gp(Z,X.mode,K),Z.return=X,Z._debugInfo=ye,Z;case Pi:var xt=_n(Z._debugInfo);return Z=_s(Z),X=st(X,Z,K),ye=xt,X}if(qn(Z)||k(Z))return K=Ec(Z,X.mode,K,null),K.return=X,K._debugOwner=X,K._debugTask=X._debugTask,X=_n(Z._debugInfo),K._debugInfo=ye,ye=X,K;if(typeof Z.then=="function")return xt=_n(Z._debugInfo),X=st(X,jo(Z),K),ye=xt,X;if(Z.$$typeof===Io)return st(X,id(X,Z),K);lo(X,Z)}return typeof Z=="function"&&rf(X,Z),typeof Z=="symbol"&&ad(X,Z),null}function I(X,Z,K,xt){var jt=Z!==null?Z.key:null;if(typeof K=="string"&&K!==""||typeof K=="number"||typeof K=="bigint")return jt!==null?null:O(X,Z,""+K,xt);if(typeof K=="object"&&K!==null){switch(K.$$typeof){case go:return K.key===jt?(jt=_n(K._debugInfo),X=j(X,Z,K,xt),ye=jt,X):null;case kl:return K.key===jt?B(X,Z,K,xt):null;case Pi:return jt=_n(K._debugInfo),K=_s(K),X=I(X,Z,K,xt),ye=jt,X}if(qn(K)||k(K))return jt!==null?null:(jt=_n(K._debugInfo),X=et(X,Z,K,xt,null),ye=jt,X);if(typeof K.then=="function")return jt=_n(K._debugInfo),X=I(X,Z,jo(K),xt),ye=jt,X;if(K.$$typeof===Io)return I(X,Z,id(X,K),xt);lo(X,K)}return typeof K=="function"&&rf(X,K),typeof K=="symbol"&&ad(X,K),null}function ht(X,Z,K,xt,jt){if(typeof xt=="string"&&xt!==""||typeof xt=="number"||typeof xt=="bigint")return X=X.get(K)||null,O(Z,X,""+xt,jt);if(typeof xt=="object"&&xt!==null){switch(xt.$$typeof){case go:return K=X.get(xt.key===null?K:xt.key)||null,X=_n(xt._debugInfo),Z=j(Z,K,xt,jt),ye=X,Z;case kl:return X=X.get(xt.key===null?K:xt.key)||null,B(Z,X,xt,jt);case Pi:var se=_n(xt._debugInfo);return xt=_s(xt),Z=ht(X,Z,K,xt,jt),ye=se,Z}if(qn(xt)||k(xt))return K=X.get(K)||null,X=_n(xt._debugInfo),Z=et(Z,K,xt,jt,null),ye=X,Z;if(typeof xt.then=="function")return se=_n(xt._debugInfo),Z=ht(X,Z,K,jo(xt),jt),ye=se,Z;if(xt.$$typeof===Io)return ht(X,Z,K,id(Z,xt),jt);lo(Z,xt)}return typeof xt=="function"&&rf(Z,xt),typeof xt=="symbol"&&ad(Z,xt),null}function Nt(X,Z,K,xt){if(typeof K!="object"||K===null)return xt;switch(K.$$typeof){case go:case kl:x(X,Z,K);var jt=K.key;if(typeof jt!="string")break;if(xt===null){xt=new Set,xt.add(jt);break}if(!xt.has(jt)){xt.add(jt);break}Lt(Z,function(){console.error("Encountered two children with the same key, `%s`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted — the behavior is unsupported and could change in a future version.",jt)});break;case Pi:K=_s(K),Nt(X,Z,K,xt)}return xt}function Bt(X,Z,K,xt){for(var jt=null,se=null,Zt=null,qt=Z,ge=Z=0,xn=null;qt!==null&&ge<K.length;ge++){qt.index>ge?(xn=qt,qt=null):xn=qt.sibling;var ti=I(X,qt,K[ge],xt);if(ti===null){qt===null&&(qt=xn);break}jt=Nt(X,ti,K[ge],jt),i&&qt&&ti.alternate===null&&o(X,qt),Z=v(ti,Z,ge),Zt===null?se=ti:Zt.sibling=ti,Zt=ti,qt=xn}if(ge===K.length)return c(X,qt),Oe&&zo(X,ge),se;if(qt===null){for(;ge<K.length;ge++)qt=st(X,K[ge],xt),qt!==null&&(jt=Nt(X,qt,K[ge],jt),Z=v(qt,Z,ge),Zt===null?se=qt:Zt.sibling=qt,Zt=qt);return Oe&&zo(X,ge),se}for(qt=g(qt);ge<K.length;ge++)xn=ht(qt,X,ge,K[ge],xt),xn!==null&&(jt=Nt(X,xn,K[ge],jt),i&&xn.alternate!==null&&qt.delete(xn.key===null?ge:xn.key),Z=v(xn,Z,ge),Zt===null?se=xn:Zt.sibling=xn,Zt=xn);return i&&qt.forEach(function(xu){return o(X,xu)}),Oe&&zo(X,ge),se}function fn(X,Z,K,xt){if(K==null)throw Error("An iterable object provided no iterator.");for(var jt=null,se=null,Zt=Z,qt=Z=0,ge=null,xn=null,ti=K.next();Zt!==null&&!ti.done;qt++,ti=K.next()){Zt.index>qt?(ge=Zt,Zt=null):ge=Zt.sibling;var xu=I(X,Zt,ti.value,xt);if(xu===null){Zt===null&&(Zt=ge);break}xn=Nt(X,xu,ti.value,xn),i&&Zt&&xu.alternate===null&&o(X,Zt),Z=v(xu,Z,qt),se===null?jt=xu:se.sibling=xu,se=xu,Zt=ge}if(ti.done)return c(X,Zt),Oe&&zo(X,qt),jt;if(Zt===null){for(;!ti.done;qt++,ti=K.next())Zt=st(X,ti.value,xt),Zt!==null&&(xn=Nt(X,Zt,ti.value,xn),Z=v(Zt,Z,qt),se===null?jt=Zt:se.sibling=Zt,se=Zt);return Oe&&zo(X,qt),jt}for(Zt=g(Zt);!ti.done;qt++,ti=K.next())ge=ht(Zt,X,qt,ti.value,xt),ge!==null&&(xn=Nt(X,ge,ti.value,xn),i&&ge.alternate!==null&&Zt.delete(ge.key===null?qt:ge.key),Z=v(ge,Z,qt),se===null?jt=ge:se.sibling=ge,se=ge);return i&&Zt.forEach(function(ytt){return o(X,ytt)}),Oe&&zo(X,qt),jt}function Ne(X,Z,K,xt){if(typeof K=="object"&&K!==null&&K.type===kf&&K.key===null&&(Ki(K,null,X),K=K.props.children),typeof K=="object"&&K!==null){switch(K.$$typeof){case go:var jt=_n(K._debugInfo);t:{for(var se=K.key;Z!==null;){if(Z.key===se){if(se=K.type,se===kf){if(Z.tag===7){c(X,Z.sibling),xt=b(Z,K.props.children),xt.return=X,xt._debugOwner=K._owner,xt._debugInfo=ye,Ki(K,xt,X),X=xt;break t}}else if(Z.elementType===se||w0(Z,K)||typeof se=="object"&&se!==null&&se.$$typeof===Pi&&_s(se)===Z.type){c(X,Z.sibling),xt=b(Z,K.props),ps(xt,K),xt.return=X,xt._debugOwner=K._owner,xt._debugInfo=ye,X=xt;break t}c(X,Z);break}else o(X,Z);Z=Z.sibling}K.type===kf?(xt=Ec(K.props.children,X.mode,xt,K.key),xt.return=X,xt._debugOwner=X,xt._debugTask=X._debugTask,xt._debugInfo=ye,Ki(K,xt,X),X=xt):(xt=gl(K,X.mode,xt),ps(xt,K),xt.return=X,xt._debugInfo=ye,X=xt)}return X=A(X),ye=jt,X;case kl:t:{for(jt=K,K=jt.key;Z!==null;){if(Z.key===K)if(Z.tag===4&&Z.stateNode.containerInfo===jt.containerInfo&&Z.stateNode.implementation===jt.implementation){c(X,Z.sibling),xt=b(Z,jt.children||[]),xt.return=X,X=xt;break t}else{c(X,Z);break}else o(X,Z);Z=Z.sibling}xt=Gp(jt,X.mode,xt),xt.return=X,X=xt}return A(X);case Pi:return jt=_n(K._debugInfo),K=_s(K),X=Ne(X,Z,K,xt),ye=jt,X}if(qn(K))return jt=_n(K._debugInfo),X=Bt(X,Z,K,xt),ye=jt,X;if(k(K)){if(jt=_n(K._debugInfo),se=k(K),typeof se!="function")throw Error("An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.");var Zt=se.call(K);return Zt===K?(X.tag!==0||Object.prototype.toString.call(X.type)!=="[object GeneratorFunction]"||Object.prototype.toString.call(Zt)!=="[object Generator]")&&(l_||console.error("Using Iterators as children is unsupported and will likely yield unexpected results because enumerating a generator mutates it. You may convert it to an array with `Array.from()` or the `[...spread]` operator before rendering. You can also use an Iterable that can iterate multiple times over the same items."),l_=!0):K.entries!==se||ZM||(console.error("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),ZM=!0),X=fn(X,Z,Zt,xt),ye=jt,X}if(typeof K.then=="function")return jt=_n(K._debugInfo),X=Ne(X,Z,jo(K),xt),ye=jt,X;if(K.$$typeof===Io)return Ne(X,Z,id(X,K),xt);lo(X,K)}return typeof K=="string"&&K!==""||typeof K=="number"||typeof K=="bigint"?(jt=""+K,Z!==null&&Z.tag===6?(c(X,Z.sibling),xt=b(Z,jt),xt.return=X,X=xt):(c(X,Z),xt=tf(jt,X.mode,xt),xt.return=X,xt._debugOwner=X,xt._debugTask=X._debugTask,xt._debugInfo=ye,X=xt),A(X)):(typeof K=="function"&&rf(X,K),typeof K=="symbol"&&ad(X,K),c(X,Z))}return function(X,Z,K,xt){var jt=ye;ye=null;try{Dx=0;var se=Ne(X,Z,K,xt);return Ty=null,se}catch(xn){if(xn===Ay||xn===DC)throw xn;var Zt=w(29,xn,null,X.mode);Zt.lanes=xt,Zt.return=X;var qt=Zt._debugInfo=ye;if(Zt._debugOwner=X._debugOwner,Zt._debugTask=X._debugTask,qt!=null){for(var ge=qt.length-1;0<=ge;ge--)if(typeof qt[ge].stack=="string"){Zt._debugOwner=qt[ge],Zt._debugTask=qt[ge].debugTask;break}}return Zt}finally{ye=jt}}}function on(i,o){var c=qn(i);return i=!c&&typeof k(i)=="function",c||i?(c=c?"array":"iterable",console.error("A nested %s was passed to row #%s in <SuspenseList />. Wrap it in an additional SuspenseList to configure its revealOrder: <SuspenseList revealOrder=...> ... <SuspenseList revealOrder=...>{%s}</SuspenseList> ... </SuspenseList>",c,o,c),!1):!0}function Ee(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function wr(i,o){i=i.updateQueue,o.updateQueue===i&&(o.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,callbacks:null})}function Zn(i){return{lane:i,tag:d_,payload:null,callback:null,next:null}}function Cr(i,o,c){var g=i.updateQueue;if(g===null)return null;if(g=g.shared,FM===g&&!m_){var b=F(i);console.error(`An update (setState, replaceState, or forceUpdate) was scheduled from inside an update function. Update functions should be pure, with zero side-effects. Consider using componentDidUpdate or a callback.
|
|
1096
|
+
|
|
1097
|
+
Please update the following component: %s`,b),m_=!0}return(_e&Mi)!==Vi?(b=g.pending,b===null?o.next=o:(o.next=b.next,b.next=o),g.pending=o,o=td(i),S0(i,null,c),o):(Wu(i,g,o,c),td(i))}function co(i,o,c){if(o=o.updateQueue,o!==null&&(o=o.shared,(c&4194048)!==0)){var g=o.lanes;g&=i.pendingLanes,c|=g,o.lanes=c,US(i,c)}}function ld(i,o){var c=i.updateQueue,g=i.alternate;if(g!==null&&(g=g.updateQueue,c===g)){var b=null,v=null;if(c=c.firstBaseUpdate,c!==null){do{var A={lane:c.lane,tag:c.tag,payload:c.payload,callback:null,next:null};v===null?b=v=A:v=v.next=A,c=c.next}while(c!==null);v===null?b=v=o:v=v.next=o}else b=v=o;c={baseState:g.baseState,firstBaseUpdate:b,lastBaseUpdate:v,shared:g.shared,callbacks:g.callbacks},i.updateQueue=c;return}i=c.lastBaseUpdate,i===null?c.firstBaseUpdate=o:i.next=o,c.lastBaseUpdate=o}function af(){if(JM){var i=Ey;if(i!==null)throw i}}function Er(i,o,c,g){JM=!1;var b=i.updateQueue;ah=!1,FM=b.shared;var v=b.firstBaseUpdate,A=b.lastBaseUpdate,O=b.shared.pending;if(O!==null){b.shared.pending=null;var j=O,B=j.next;j.next=null,A===null?v=B:A.next=B,A=j;var et=i.alternate;et!==null&&(et=et.updateQueue,O=et.lastBaseUpdate,O!==A&&(O===null?et.firstBaseUpdate=B:O.next=B,et.lastBaseUpdate=j))}if(v!==null){var st=b.baseState;A=0,et=B=j=null,O=v;do{var I=O.lane&-536870913,ht=I!==O.lane;if(ht?(be&I)===I:(g&I)===I){I!==0&&I===hg&&(JM=!0),et!==null&&(et=et.next={lane:0,tag:O.tag,payload:O.payload,callback:null,next:null});t:{I=i;var Nt=O,Bt=o,fn=c;switch(Nt.tag){case g_:if(Nt=Nt.payload,typeof Nt=="function"){wy=!0;var Ne=Nt.call(fn,st,Bt);if(I.mode&ws){sn(!0);try{Nt.call(fn,st,Bt)}finally{sn(!1)}}wy=!1,st=Ne;break t}st=Nt;break t;case QM:I.flags=I.flags&-65537|128;case d_:if(Ne=Nt.payload,typeof Ne=="function"){if(wy=!0,Nt=Ne.call(fn,st,Bt),I.mode&ws){sn(!0);try{Ne.call(fn,st,Bt)}finally{sn(!1)}}wy=!1}else Nt=Ne;if(Nt==null)break t;st=pe({},st,Nt);break t;case p_:ah=!0}}I=O.callback,I!==null&&(i.flags|=64,ht&&(i.flags|=8192),ht=b.callbacks,ht===null?b.callbacks=[I]:ht.push(I))}else ht={lane:I,tag:O.tag,payload:O.payload,callback:O.callback,next:null},et===null?(B=et=ht,j=st):et=et.next=ht,A|=I;if(O=O.next,O===null){if(O=b.shared.pending,O===null)break;ht=O,O=ht.next,ht.next=null,b.lastBaseUpdate=ht,b.shared.pending=null}}while(!0);et===null&&(j=st),b.baseState=j,b.firstBaseUpdate=B,b.lastBaseUpdate=et,v===null&&(b.shared.lanes=0),uh|=A,i.lanes=A,i.memoizedState=st}FM=null}function vl(i,o){if(typeof i!="function")throw Error("Invalid argument passed as callback. Expected a function. Instead received: "+i);i.call(o)}function j0(i,o){var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)vl(c[i],o)}function lf(i,o){var c=i.callbacks;if(c!==null)for(i.callbacks=null,i=0;i<c.length;i++)vl(c[i],o)}function Jp(i,o){var c=Zl;vt(zC,c,i),vt(My,o,i),Zl=c|o.baseLanes}function Ta(i){vt(zC,Zl,i),vt(My,My.current,i)}function Bo(i){Zl=zC.current,lt(My,i),lt(zC,i)}function Wi(i){var o=i.alternate;vt(Wn,Wn.current&Oy,i),vt(Jo,i,i),Kr===null&&(o===null||My.current!==null||o.memoizedState!==null)&&(Kr=i)}function Po(i){vt(Wn,Wn.current,i),vt(Jo,i,i),Kr===null&&(Kr=i)}function Kp(i){i.tag===22?(vt(Wn,Wn.current,i),vt(Jo,i,i),Kr===null&&(Kr=i)):Ar(i)}function Ar(i){vt(Wn,Wn.current,i),vt(Jo,Jo.current,i)}function ri(i){lt(Jo,i),Kr===i&&(Kr=null),lt(Wn,i)}function zc(i){for(var o=i;o!==null;){if(o.tag===13){var c=o.memoizedState;if(c!==null&&(c=c.dehydrated,c===null||qd(c)||zv(c)))return o}else if(o.tag===19&&(o.memoizedProps.revealOrder==="forwards"||o.memoizedProps.revealOrder==="backwards"||o.memoizedProps.revealOrder==="unstable_legacy-backwards"||o.memoizedProps.revealOrder==="together")){if(o.flags&128)return o}else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===i)break;for(;o.sibling===null;){if(o.return===null||o.return===i)return null;o=o.return}o.sibling.return=o.return,o=o.sibling}return null}function ne(){var i=gt;ta===null?ta=[i]:ta.push(i)}function At(){var i=gt;if(ta!==null&&(pu++,ta[pu]!==i)){var o=F(ie);if(!y_.has(o)&&(y_.add(o),ta!==null)){for(var c="",g=0;g<=pu;g++){var b=ta[g],v=g===pu?i:b;for(b=g+1+". "+b;30>b.length;)b+=" ";b+=v+`
|
|
1098
|
+
`,c+=b}console.error(`React has detected a change in the order of Hooks called by %s. This will lead to bugs and errors if not fixed. For more information, read the Rules of Hooks: https://react.dev/link/rules-of-hooks
|
|
1099
|
+
|
|
1100
|
+
Previous render Next render
|
|
1101
|
+
------------------------------------------------------
|
|
1102
|
+
%s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
1103
|
+
`,o,c)}}}function Ma(i){i==null||qn(i)||console.error("%s received a final argument that is not an array (instead, received `%s`). When specified, the final argument must be an array.",gt,typeof i)}function cd(){var i=F(ie);v_.has(i)||(v_.add(i),console.error("ReactDOM.useFormState has been renamed to React.useActionState. Please update %s to use React.useActionState.",i))}function Rn(){throw Error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
|
|
1104
|
+
1. You might have mismatching versions of React and the renderer (such as React DOM)
|
|
1105
|
+
2. You might be breaking the Rules of Hooks
|
|
1106
|
+
3. You might have more than one copy of React in the same app
|
|
1107
|
+
See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`)}function _0(i,o){if(Nx)return!1;if(o===null)return console.error("%s received a final argument during this render, but not during the previous render. Even though the final argument is optional, its type cannot change between renders.",gt),!1;i.length!==o.length&&console.error(`The final argument passed to %s changed size between renders. The order and size of this array must remain constant.
|
|
1108
|
+
|
|
1109
|
+
Previous: %s
|
|
1110
|
+
Incoming: %s`,gt,"["+o.join(", ")+"]","["+i.join(", ")+"]");for(var c=0;c<o.length&&c<i.length;c++)if(!Zs(i[c],o[c]))return!1;return!0}function B0(i,o,c,g,b,v){du=v,ie=o,ta=i!==null?i._debugHookTypes:null,pu=-1,Nx=i!==null&&i.type!==o.type,(Object.prototype.toString.call(c)==="[object AsyncFunction]"||Object.prototype.toString.call(c)==="[object AsyncGeneratorFunction]")&&(v=F(ie),KM.has(v)||(KM.add(v),console.error("%s is an async Client Component. Only Server Components can be async at the moment. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server.",v===null?"An unknown Component":"<"+v+">"))),o.memoizedState=null,o.updateQueue=null,o.lanes=0,pt.H=i!==null&&i.memoizedState!==null?t2:ta!==null?x_:WM,yg=v=(o.mode&ws)!==te;var A=YM(c,g,b);if(yg=!1,Ry&&(A=ud(o,c,g,b)),v){sn(!0);try{A=ud(o,c,g,b)}finally{sn(!1)}}return Bn(i,o),A}function Bn(i,o){o._debugHookTypes=ta,o.dependencies===null?gu!==null&&(o.dependencies={lanes:0,firstContext:null,_debugThenableState:gu}):o.dependencies._debugThenableState=gu,pt.H=Lx;var c=ln!==null&&ln.next!==null;if(du=0,ta=gt=di=ln=ie=null,pu=-1,i!==null&&(i.flags&65011712)!==(o.flags&65011712)&&console.error("Internal React error: Expected static flag was missing. Please notify the React team."),LC=!1,zx=0,gu=null,c)throw Error("Rendered fewer hooks than expected. This may be caused by an accidental early return statement.");i===null||gi||(i=i.dependencies,i!==null&&nf(i)&&(gi=!0)),Ox?(Ox=!1,i=!0):i=!1,i&&(o=F(o)||"Unknown",b_.has(o)||KM.has(o)||(b_.add(o),console.error("`use` was called from inside a try/catch block. This is not allowed and can lead to unexpected behavior. To handle errors triggered by `use`, wrap your component in a error boundary.")))}function ud(i,o,c,g){ie=i;var b=0;do{if(Ry&&(gu=null),zx=0,Ry=!1,b>=QW)throw Error("Too many re-renders. React limits the number of renders to prevent an infinite loop.");if(b+=1,Nx=!1,di=ln=null,i.updateQueue!=null){var v=i.updateQueue;v.lastEffect=null,v.events=null,v.stores=null,v.memoCache!=null&&(v.memoCache.index=0)}pu=-1,pt.H=S_,v=YM(o,c,g)}while(Ry);return v}function fd(){var i=pt.H,o=i.useState()[0];return o=typeof o.then=="function"?gd(o):o,i=i.useState()[0],(ln!==null?ln.memoizedState:null)!==i&&(ie.flags|=1024),o}function Nc(){var i=jC!==0;return jC=0,i}function hd(i,o,c){o.updateQueue=i.updateQueue,o.flags=(o.mode&Ga)!==te?o.flags&-402655237:o.flags&-2053,i.lanes&=~c}function xl(i){if(LC){for(i=i.memoizedState;i!==null;){var o=i.queue;o!==null&&(o.pending=null),i=i.next}LC=!1}du=0,ta=di=ln=ie=null,pu=-1,gt=null,Ry=!1,zx=jC=0,gu=null}function Gn(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return di===null?ie.memoizedState=di=i:di=di.next=i,di}function Xe(){if(ln===null){var i=ie.alternate;i=i!==null?i.memoizedState:null}else i=ln.next;var o=di===null?ie.memoizedState:di.next;if(o!==null)di=o,ln=i;else{if(i===null)throw ie.alternate===null?Error("Update hook called on initial render. This is likely a bug in React. Please file an issue."):Error("Rendered more hooks than during the previous render.");ln=i,i={memoizedState:ln.memoizedState,baseState:ln.baseState,baseQueue:ln.baseQueue,queue:ln.queue,next:null},di===null?ie.memoizedState=di=i:di=di.next=i}return di}function dd(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function gd(i){var o=zx;return zx+=1,gu===null&&(gu=Qp()),i=js(gu,i,o),o=ie,(di===null?o.memoizedState:di.next)===null&&(o=o.alternate,pt.H=o!==null&&o.memoizedState!==null?t2:WM),i}function Oa(i){if(i!==null&&typeof i=="object"){if(typeof i.then=="function")return gd(i);if(i.$$typeof===Io)return ke(i)}throw Error("An unsupported type was passed to use(): "+String(i))}function Bs(i){var o=null,c=ie.updateQueue;if(c!==null&&(o=c.memoCache),o==null){var g=ie.alternate;g!==null&&(g=g.updateQueue,g!==null&&(g=g.memoCache,g!=null&&(o={data:g.data.map(function(b){return b.slice()}),index:0})))}if(o==null&&(o={data:[],index:0}),c===null&&(c=dd(),ie.updateQueue=c),c.memoCache=o,c=o.data[o.index],c===void 0||Nx)for(c=o.data[o.index]=Array(i),g=0;g<i;g++)c[g]=bM;else c.length!==i&&console.error("Expected a constant size argument for each invocation of useMemoCache. The previous cache was allocated with size %s but size %s was requested.",c.length,i);return o.index++,c}function Ps(i,o){return typeof o=="function"?o(i):o}function cf(i,o,c){var g=Gn();if(c!==void 0){var b=c(o);if(yg){sn(!0);try{c(o)}finally{sn(!1)}}}else b=o;return g.memoizedState=g.baseState=b,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:b},g.queue=i,i=i.dispatch=dM.bind(null,ie,i),[g.memoizedState,i]}function Lc(i){var o=Xe();return Sl(o,ln,i)}function Sl(i,o,c){var g=i.queue;if(g===null)throw Error("Should have a queue. You are likely calling Hooks conditionally, which is not allowed. (https://react.dev/link/invalid-hook-call)");g.lastRenderedReducer=c;var b=i.baseQueue,v=g.pending;if(v!==null){if(b!==null){var A=b.next;b.next=v.next,v.next=A}o.baseQueue!==b&&console.error("Internal error: Expected work-in-progress queue to be a clone. This is a bug in React."),o.baseQueue=b=v,g.pending=null}if(v=i.baseState,b===null)i.memoizedState=v;else{o=b.next;var O=A=null,j=null,B=o,et=!1;do{var st=B.lane&-536870913;if(st!==B.lane?(be&st)===st:(du&st)===st){var I=B.revertLane;if(I===0)j!==null&&(j=j.next={lane:0,revertLane:0,gesture:null,action:B.action,hasEagerState:B.hasEagerState,eagerState:B.eagerState,next:null}),st===hg&&(et=!0);else if((du&I)===I){B=B.next,I===hg&&(et=!0);continue}else st={lane:0,revertLane:B.revertLane,gesture:null,action:B.action,hasEagerState:B.hasEagerState,eagerState:B.eagerState,next:null},j===null?(O=j=st,A=v):j=j.next=st,ie.lanes|=I,uh|=I;st=B.action,yg&&c(v,st),v=B.hasEagerState?B.eagerState:c(v,st)}else I={lane:st,revertLane:B.revertLane,gesture:B.gesture,action:B.action,hasEagerState:B.hasEagerState,eagerState:B.eagerState,next:null},j===null?(O=j=I,A=v):j=j.next=I,ie.lanes|=st,uh|=st;B=B.next}while(B!==null&&B!==o);if(j===null?A=v:j.next=O,!Zs(v,i.memoizedState)&&(gi=!0,et&&(c=Ey,c!==null)))throw c;i.memoizedState=v,i.baseState=A,i.baseQueue=j,g.lastRenderedState=v}return b===null&&(g.lanes=0),[i.memoizedState,g.dispatch]}function jc(i){var o=Xe(),c=o.queue;if(c===null)throw Error("Should have a queue. You are likely calling Hooks conditionally, which is not allowed. (https://react.dev/link/invalid-hook-call)");c.lastRenderedReducer=i;var g=c.dispatch,b=c.pending,v=o.memoizedState;if(b!==null){c.pending=null;var A=b=b.next;do v=i(v,A.action),A=A.next;while(A!==b);Zs(v,o.memoizedState)||(gi=!0),o.memoizedState=v,o.baseQueue===null&&(o.baseState=v),c.lastRenderedState=v}return[v,g]}function uf(i,o,c){var g=ie,b=Gn();if(Oe){if(c===void 0)throw Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");var v=c();Dy||v===c()||(console.error("The result of getServerSnapshot should be cached to avoid an infinite loop"),Dy=!0)}else{if(v=o(),Dy||(c=o(),Zs(v,c)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),Dy=!0)),cn===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");be&127||P0(g,o,v)}return b.memoizedState=v,c={value:v,getSnapshot:o},b.queue=c,Pc(wl.bind(null,g,c,i),[i]),g.flags|=2048,Tr(Wr|Js,{destroy:void 0},U0.bind(null,g,c,v,o),null),v}function _c(i,o,c){var g=ie,b=Xe(),v=Oe;if(v){if(c===void 0)throw Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");c=c()}else if(c=o(),!Dy){var A=o();Zs(c,A)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),Dy=!0)}(A=!Zs((ln||b).memoizedState,c))&&(b.memoizedState=c,gi=!0),b=b.queue;var O=wl.bind(null,g,b,i);if(Qn(2048,Js,O,[i]),b.getSnapshot!==o||A||di!==null&&di.memoizedState.tag&Wr){if(g.flags|=2048,Tr(Wr|Js,{destroy:void 0},U0.bind(null,g,b,c,o),null),cn===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");v||du&127||P0(g,o,c)}return c}function P0(i,o,c){i.flags|=16384,i={getSnapshot:o,value:c},o=ie.updateQueue,o===null?(o=dd(),ie.updateQueue=o,o.stores=[i]):(c=o.stores,c===null?o.stores=[i]:c.push(i))}function U0(i,o,c,g){o.value=c,o.getSnapshot=g,Cl(o)&&H0(i)}function wl(i,o,c){return c(function(){Cl(o)&&(xr(2,"updateSyncExternalStore()",i),H0(i))})}function Cl(i){var o=i.getSnapshot;i=i.value;try{var c=o();return!Zs(i,c)}catch{return!0}}function H0(i){var o=ji(i,2);o!==null&&ee(o,i,2)}function Wp(i){var o=Gn();if(typeof i=="function"){var c=i;if(i=c(),yg){sn(!0);try{c()}finally{sn(!1)}}}return o.memoizedState=o.baseState=i,o.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ps,lastRenderedState:i},o}function El(i){i=Wp(i);var o=i.queue,c=om.bind(null,ie,o);return o.dispatch=c,[i.memoizedState,c]}function Bc(i){var o=Gn();o.memoizedState=o.baseState=i;var c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return o.queue=c,o=Sd.bind(null,ie,!0,c),c.dispatch=o,[i,o]}function pd(i,o){var c=Xe();return ff(c,ln,i,o)}function ff(i,o,c,g){return i.baseState=c,Sl(i,ln,typeof g=="function"?g:Ps)}function md(i,o){var c=Xe();return ln!==null?ff(c,ln,i,o):(c.baseState=i,[i,c.queue.dispatch])}function lw(i,o,c,g,b){if(ai(i))throw Error("Cannot update form state while rendering.");if(i=o.action,i!==null){var v={payload:b,action:i,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(A){v.listeners.push(A)}};pt.T!==null?c(!0):v.isTransition=!1,g(v),c=o.pending,c===null?(v.next=o.pending=v,Al(o,v)):(v.next=c.next,o.pending=c.next=v)}}function Al(i,o){var c=o.action,g=o.payload,b=i.state;if(o.isTransition){var v=pt.T,A={};A._updatedFibers=new Set,pt.T=A;try{var O=c(b,g),j=pt.S;j!==null&&j(A,O),k0(i,o,O)}catch(B){yd(i,o,B)}finally{v!==null&&A.types!==null&&(v.types!==null&&v.types!==A.types&&console.error("We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React."),v.types=A.types),pt.T=v,v===null&&A._updatedFibers&&(i=A._updatedFibers.size,A._updatedFibers.clear(),10<i&&console.warn("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."))}}else try{A=c(b,g),k0(i,o,A)}catch(B){yd(i,o,B)}}function k0(i,o,c){c!==null&&typeof c=="object"&&typeof c.then=="function"?(pt.asyncTransitions++,c.then(Uc,Uc),c.then(function(g){Da(i,o,g)},function(g){return yd(i,o,g)}),o.isTransition||console.error("An async function with useActionState was called outside of a transition. This is likely not what you intended (for example, isPending will not update correctly). Either call the returned function inside startTransition, or pass it to an `action` or `formAction` prop.")):Da(i,o,c)}function Da(i,o,c){o.status="fulfilled",o.value=c,tm(o),i.state=c,o=i.pending,o!==null&&(c=o.next,c===o?i.pending=null:(c=c.next,o.next=c,Al(i,c)))}function yd(i,o,c){var g=i.pending;if(i.pending=null,g!==null){g=g.next;do o.status="rejected",o.reason=c,tm(o),o=o.next;while(o!==g)}i.action=null}function tm(i){i=i.listeners;for(var o=0;o<i.length;o++)(0,i[o])()}function Ra(i,o){return o}function Us(i,o){if(Oe){var c=cn.formState;if(c!==null){t:{var g=ie;if(Oe){if(vn){e:{for(var b=vn,v=Fr;b.nodeType!==8;){if(!v){b=null;break e}if(b=qs(b.nextSibling),b===null){b=null;break e}}v=b.data,b=v===C2||v===rB?b:null}if(b){vn=qs(b.nextSibling),g=b.data===C2;break t}}so(g)}g=!1}g&&(o=c[0])}}return c=Gn(),c.memoizedState=c.baseState=o,g={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ra,lastRenderedState:o},c.queue=g,c=om.bind(null,ie,g),g.dispatch=c,g=Wp(!1),v=Sd.bind(null,ie,!1,g.queue),g=Gn(),b={state:o,dispatch:null,action:i,pending:null},g.queue=b,c=lw.bind(null,ie,b,v,c),b.dispatch=c,g.memoizedState=i,[o,c,!1]}function Tl(i){var o=Xe();return em(o,ln,i)}function em(i,o,c){if(o=Sl(i,o,Ra)[0],i=Lc(Ps)[0],typeof o=="object"&&o!==null&&typeof o.then=="function")try{var g=gd(o)}catch(A){throw A===Ay?DC:A}else g=o;o=Xe();var b=o.queue,v=b.dispatch;return c!==o.memoizedState&&(ie.flags|=2048,Tr(Wr|Js,{destroy:void 0},V0.bind(null,b,c),null)),[g,v,i]}function V0(i,o){i.action=o}function Ml(i){var o=Xe(),c=ln;if(c!==null)return em(o,c,i);Xe(),o=o.memoizedState,c=Xe();var g=c.queue.dispatch;return c.memoizedState=i,[o,g,!1]}function Tr(i,o,c,g){return i={tag:i,create:c,deps:g,inst:o,next:null},o=ie.updateQueue,o===null&&(o=dd(),ie.updateQueue=o),c=o.lastEffect,c===null?o.lastEffect=i.next=i:(g=c.next,c.next=i,i.next=g,o.lastEffect=i),i}function nm(i){var o=Gn();return i={current:i},o.memoizedState=i}function Ol(i,o,c,g){var b=Gn();ie.flags|=i,b.memoizedState=Tr(Wr|o,{destroy:void 0},c,g===void 0?null:g)}function Qn(i,o,c,g){var b=Xe();g=g===void 0?null:g;var v=b.memoizedState.inst;ln!==null&&g!==null&&_0(g,ln.memoizedState.deps)?b.memoizedState=Tr(o,v,c,g):(ie.flags|=i,b.memoizedState=Tr(Wr|o,v,c,g))}function Pc(i,o){(ie.mode&Ga)!==te?Ol(276826112,Js,i,o):Ol(8390656,Js,i,o)}function cw(i){ie.flags|=4;var o=ie.updateQueue;if(o===null)o=dd(),ie.updateQueue=o,o.events=[i];else{var c=o.events;c===null?o.events=[i]:c.push(i)}}function bd(i){var o=Gn(),c={impl:i};return o.memoizedState=c,function(){if((_e&Mi)!==Vi)throw Error("A function wrapped in useEffectEvent can't be called during rendering.");return c.impl.apply(void 0,arguments)}}function hf(i){var o=Xe().memoizedState;return cw({ref:o,nextImpl:i}),function(){if((_e&Mi)!==Vi)throw Error("A function wrapped in useEffectEvent can't be called during rendering.");return o.impl.apply(void 0,arguments)}}function ts(i,o){var c=4194308;return(ie.mode&Ga)!==te&&(c|=134217728),Ol(c,Ko,i,o)}function Hs(i,o){if(typeof o=="function"){i=i();var c=o(i);return function(){typeof c=="function"?c():o(null)}}if(o!=null)return o.hasOwnProperty("current")||console.error("Expected useImperativeHandle() first argument to either be a ref callback or React.createRef() object. Instead received: %s.","an object with keys {"+Object.keys(o).join(", ")+"}"),i=i(),o.current=i,function(){o.current=null}}function Mr(i,o,c){typeof o!="function"&&console.error("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",o!==null?typeof o:"null"),c=c!=null?c.concat([i]):null;var g=4194308;(ie.mode&Ga)!==te&&(g|=134217728),Ol(g,Ko,Hs.bind(null,o,i),c)}function df(i,o,c){typeof o!="function"&&console.error("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",o!==null?typeof o:"null"),c=c!=null?c.concat([i]):null,Qn(4,Ko,Hs.bind(null,o,i),c)}function im(i,o){return Gn().memoizedState=[i,o===void 0?null:o],i}function Uo(i,o){var c=Xe();o=o===void 0?null:o;var g=c.memoizedState;return o!==null&&_0(o,g[1])?g[0]:(c.memoizedState=[i,o],i)}function es(i,o){var c=Gn();o=o===void 0?null:o;var g=i();if(yg){sn(!0);try{i()}finally{sn(!1)}}return c.memoizedState=[g,o],g}function pn(i,o){var c=Xe();o=o===void 0?null:o;var g=c.memoizedState;if(o!==null&&_0(o,g[1]))return g[0];if(g=i(),yg){sn(!0);try{i()}finally{sn(!1)}}return c.memoizedState=[g,o],g}function gf(i,o){var c=Gn();return Ie(c,i,o)}function Or(i,o){var c=Xe();return Pn(c,ln.memoizedState,i,o)}function ae(i,o){var c=Xe();return ln===null?Ie(c,i,o):Pn(c,ln.memoizedState,i,o)}function Ie(i,o,c){return c===void 0||du&1073741824&&!(be&261930)?i.memoizedState=o:(i.memoizedState=c,i=wf(),ie.lanes|=i,uh|=i,c)}function Pn(i,o,c,g){return Zs(c,o)?c:My.current!==null?(i=Ie(i,c,g),Zs(i,o)||(gi=!0),i):!(du&42)||du&1073741824&&!(be&261930)?(gi=!0,i.memoizedState=c):(i=wf(),ie.lanes|=i,uh|=i,o)}function Uc(){pt.asyncTransitions--}function Hc(i,o,c,g,b){var v=Ge.p;Ge.p=v!==0&&v<Ai?v:Ai;var A=pt.T,O={};O._updatedFibers=new Set,pt.T=O,Sd(i,!1,o,c);try{var j=b(),B=pt.S;if(B!==null&&B(O,j),j!==null&&typeof j=="object"&&typeof j.then=="function"){pt.asyncTransitions++,j.then(Uc,Uc);var et=Zp(j,g);kc(i,o,et,Bi(i))}else kc(i,o,g,Bi(i))}catch(st){kc(i,o,{then:function(){},status:"rejected",reason:st},Bi(i))}finally{Ge.p=v,A!==null&&O.types!==null&&(A.types!==null&&A.types!==O.types&&console.error("We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React."),A.types=O.types),pt.T=A,A===null&&O._updatedFibers&&(i=O._updatedFibers.size,O._updatedFibers.clear(),10<i&&console.warn("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."))}}function za(i,o,c,g){if(i.tag!==5)throw Error("Expected the form instance to be a HostComponent. This is a bug in React.");var b=vd(i).queue;rw(i),Hc(i,b,o,Og,c===null?y:function(){return pf(i),c(g)})}function vd(i){var o=i.memoizedState;if(o!==null)return o;o={memoizedState:Og,baseState:Og,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ps,lastRenderedState:Og},next:null};var c={};return o.next={memoizedState:c,baseState:c,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ps,lastRenderedState:c},next:null},i.memoizedState=o,i=i.alternate,i!==null&&(i.memoizedState=o),o}function pf(i){pt.T===null&&console.error("requestFormReset was called outside a transition or action. To fix, move to an action, or wrap with startTransition.");var o=vd(i);o.next===null&&(o=i.alternate.memoizedState),kc(i,o.next.queue,{},Bi(i))}function Dl(){var i=Wp(!1);return i=Hc.bind(null,ie,i.queue,!0,!1),Gn().memoizedState=i,[!1,i]}function uw(){var i=Lc(Ps)[0],o=Xe().memoizedState;return[typeof i=="boolean"?i:gd(i),o]}function Cn(){var i=jc(Ps)[0],o=Xe().memoizedState;return[typeof i=="boolean"?i:gd(i),o]}function Na(){return ke(Zx)}function xd(){var i=Gn(),o=cn.identifierPrefix;if(Oe){var c=lu,g=au;c=(g&~(1<<32-Ei(g)-1)).toString(32)+c,o="_"+o+"R_"+c,c=jC++,0<c&&(o+="H"+c.toString(32)),o+="_"}else c=ZW++,o="_"+o+"r_"+c.toString(32)+"_";return i.memoizedState=o}function sm(){return Gn().memoizedState=fw.bind(null,ie)}function fw(i,o){for(var c=i.return;c!==null;){switch(c.tag){case 24:case 3:var g=Bi(c),b=Zn(g),v=Cr(c,b,g);v!==null&&(xr(g,"refresh()",i),ee(v,c,g),co(v,c,g)),i=Xp(),o!=null&&v!==null&&console.error("The seed argument is not enabled outside experimental channels."),b.payload={cache:i};return}c=c.return}}function dM(i,o,c){var g=arguments;typeof g[3]=="function"&&console.error("State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect()."),g=Bi(i);var b={lane:g,revertLane:0,gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null};ai(i)?zn(o,b):(b=Sc(i,o,b,g),b!==null&&(xr(g,"dispatch()",i),ee(b,i,g),wd(b,o,g)))}function om(i,o,c){var g=arguments;typeof g[3]=="function"&&console.error("State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect()."),g=Bi(i),kc(i,o,c,g)&&xr(g,"setState()",i)}function kc(i,o,c,g){var b={lane:g,revertLane:0,gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null};if(ai(i))zn(o,b);else{var v=i.alternate;if(i.lanes===0&&(v===null||v.lanes===0)&&(v=o.lastRenderedReducer,v!==null)){var A=pt.H;pt.H=qa;try{var O=o.lastRenderedState,j=v(O,c);if(b.hasEagerState=!0,b.eagerState=j,Zs(j,O))return Wu(i,o,b,0),cn===null&&kp(),!1}catch{}finally{pt.H=A}}if(c=Sc(i,o,b,g),c!==null)return ee(c,i,g),wd(c,o,g),!0}return!1}function Sd(i,o,c,g){if(pt.T===null&&hg===0&&console.error("An optimistic state update occurred outside a transition or action. To fix, move the update to an action, or wrap with startTransition."),g={lane:2,revertLane:Ov(),gesture:null,action:g,hasEagerState:!1,eagerState:null,next:null},ai(i)){if(o)throw Error("Cannot update optimistic state while rendering.");console.error("Cannot call startTransition while rendering.")}else o=Sc(i,c,g,2),o!==null&&(xr(2,"setOptimistic()",i),ee(o,i,2))}function ai(i){var o=i.alternate;return i===ie||o!==null&&o===ie}function zn(i,o){Ry=LC=!0;var c=i.pending;c===null?o.next=o:(o.next=c.next,c.next=o),i.pending=o}function wd(i,o,c){if(c&4194048){var g=o.lanes;g&=i.pendingLanes,c|=g,o.lanes=c,US(i,c)}}function Vc(i){if(i!==null&&typeof i!="function"){var o=String(i);N_.has(o)||(N_.add(o),console.error("Expected the last optional `callback` argument to be a function. Instead received: %s.",i))}}function mf(i,o,c,g){var b=i.memoizedState,v=c(g,b);if(i.mode&ws){sn(!0);try{v=c(g,b)}finally{sn(!1)}}v===void 0&&(o=H(o)||"Component",O_.has(o)||(O_.add(o),console.error("%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. You have returned undefined.",o))),b=v==null?b:pe({},b,v),i.memoizedState=b,i.lanes===0&&(i.updateQueue.baseState=b)}function rm(i,o,c,g,b,v,A){var O=i.stateNode;if(typeof O.shouldComponentUpdate=="function"){if(c=O.shouldComponentUpdate(g,v,A),i.mode&ws){sn(!0);try{c=O.shouldComponentUpdate(g,v,A)}finally{sn(!1)}}return c===void 0&&console.error("%s.shouldComponentUpdate(): Returned undefined instead of a boolean value. Make sure to return true or false.",H(o)||"Component"),c}return o.prototype&&o.prototype.isPureReactComponent?!Ku(c,g)||!Ku(b,v):!0}function Dr(i,o,c,g){var b=o.state;typeof o.componentWillReceiveProps=="function"&&o.componentWillReceiveProps(c,g),typeof o.UNSAFE_componentWillReceiveProps=="function"&&o.UNSAFE_componentWillReceiveProps(c,g),o.state!==b&&(i=F(i)||"Component",C_.has(i)||(C_.add(i),console.error("%s.componentWillReceiveProps(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",i)),e2.enqueueReplaceState(o,o.state,null))}function Rr(i,o){var c=o;if("ref"in o){c={};for(var g in o)g!=="ref"&&(c[g]=o[g])}if(i=i.defaultProps){c===o&&(c=pe({},c));for(var b in i)c[b]===void 0&&(c[b]=i[b])}return c}function am(i){NM(i),console.warn(`%s
|
|
1111
|
+
|
|
1112
|
+
%s
|
|
1113
|
+
`,zy?"An error occurred in the <"+zy+"> component.":"An error occurred in one of your React components.",`Consider adding an error boundary to your tree to customize error handling behavior.
|
|
1114
|
+
Visit https://react.dev/link/error-boundaries to learn more about error boundaries.`)}function lm(i){var o=zy?"The above error occurred in the <"+zy+"> component.":"The above error occurred in one of your React components.",c="React will try to recreate this component tree from scratch using the error boundary you provided, "+((n2||"Anonymous")+".");if(typeof i=="object"&&i!==null&&typeof i.environmentName=="string"){var g=i.environmentName;i=[`%o
|
|
1115
|
+
|
|
1116
|
+
%s
|
|
1117
|
+
|
|
1118
|
+
%s
|
|
1119
|
+
`,i,o,c].slice(0),typeof i[0]=="string"?i.splice(0,1,gB+" "+i[0],pB,oE+g+oE,mB):i.splice(0,0,gB,pB,oE+g+oE,mB),i.unshift(console),g=ptt.apply(console.error,i),g()}else console.error(`%o
|
|
1120
|
+
|
|
1121
|
+
%s
|
|
1122
|
+
|
|
1123
|
+
%s
|
|
1124
|
+
`,i,o,c)}function G0(i){NM(i)}function Cd(i,o){try{zy=o.source?F(o.source):null,n2=null;var c=o.value;if(pt.actQueue!==null)pt.thrownErrors.push(c);else{var g=i.onUncaughtError;g(c,{componentStack:o.stack})}}catch(b){setTimeout(function(){throw b})}}function $0(i,o,c){try{zy=c.source?F(c.source):null,n2=F(o);var g=i.onCaughtError;g(c.value,{componentStack:c.stack,errorBoundary:o.tag===1?o.stateNode:null})}catch(b){setTimeout(function(){throw b})}}function cm(i,o,c){return c=Zn(c),c.tag=QM,c.payload={element:null},c.callback=function(){Lt(o.source,Cd,i,o)},c}function um(i){return i=Zn(i),i.tag=QM,i}function fm(i,o,c,g){var b=c.type.getDerivedStateFromError;if(typeof b=="function"){var v=g.value;i.payload=function(){return b(v)},i.callback=function(){wc(c),Lt(g.source,$0,o,c,g)}}var A=c.stateNode;A!==null&&typeof A.componentDidCatch=="function"&&(i.callback=function(){wc(c),Lt(g.source,$0,o,c,g),typeof b!="function"&&(hh===null?hh=new Set([this]):hh.add(this)),qW(this,g),typeof b=="function"||!(c.lanes&2)&&console.error("%s: Error boundaries should implement getDerivedStateFromError(). In that method, return a state update to display an error message or fallback UI.",F(c)||"Unknown")})}function q0(i,o,c,g,b){if(c.flags|=32768,$r&&Mf(i,b),g!==null&&typeof g=="object"&&typeof g.then=="function"){if(o=c.alternate,o!==null&&Lo(o,c,b,!0),Oe&&(Yl=!0),c=Jo.current,c!==null){switch(c.tag){case 31:case 13:return Kr===null?Ef():c.alternate===null&&Ln===yu&&(Ln=PC),c.flags&=-257,c.flags|=65536,c.lanes=b,g===RC?c.flags|=16384:(o=c.updateQueue,o===null?c.updateQueue=new Set([g]):o.add(g),zm(i,g,b)),!1;case 22:return c.flags|=65536,g===RC?c.flags|=16384:(o=c.updateQueue,o===null?(o={transitions:null,markerInstances:null,retryQueue:new Set([g])},c.updateQueue=o):(c=o.retryQueue,c===null?o.retryQueue=new Set([g]):c.add(g)),zm(i,g,b)),!1}throw Error("Unexpected Suspense handler tag ("+c.tag+"). This is a bug in React.")}return zm(i,g,b),Ef(),!1}if(Oe)return Yl=!0,o=Jo.current,o!==null?(!(o.flags&65536)&&(o.flags|=256),o.flags|=65536,o.lanes=b,g!==UM&&nd(Qi(Error("There was an error while hydrating but React was able to recover by instead client rendering from the nearest Suspense boundary.",{cause:g}),c))):(g!==UM&&nd(Qi(Error("There was an error while hydrating but React was able to recover by instead client rendering the entire root.",{cause:g}),c)),i=i.current.alternate,i.flags|=65536,b&=-b,i.lanes|=b,g=Qi(g,c),b=cm(i.stateNode,g,b),ld(i,b),Ln!==lh&&(Ln=bg)),!1;var v=Qi(Error("There was an error during concurrent rendering but React was able to recover by instead synchronously rendering the entire root.",{cause:g}),c);if(Hx===null?Hx=[v]:Hx.push(v),Ln!==lh&&(Ln=bg),o===null)return!0;g=Qi(g,c),c=o;do{switch(c.tag){case 3:return c.flags|=65536,i=b&-b,c.lanes|=i,i=cm(c.stateNode,g,i),ld(c,i),!1;case 1:if(o=c.type,v=c.stateNode,(c.flags&128)===0&&(typeof o.getDerivedStateFromError=="function"||v!==null&&typeof v.componentDidCatch=="function"&&(hh===null||!hh.has(v))))return c.flags|=65536,b&=-b,c.lanes|=b,b=um(b),fm(b,i,c,g),ld(c,b),!1}c=c.return}while(c!==null);return!1}function li(i,o,c,g){o.child=i===null?h_(o,null,c,g):mg(o,i.child,c,g)}function hw(i,o,c,g,b){c=c.render;var v=o.ref;if("ref"in g){var A={};for(var O in g)O!=="ref"&&(A[O]=g[O])}else A=g;return bl(o),g=B0(i,o,c,A,v,b),O=Nc(),i!==null&&!gi?(hd(i,o,b),Ho(i,o,b)):(Oe&&O&&$p(o),o.flags|=1,li(i,o,g,b),o.child)}function Y0(i,o,c,g,b){if(i===null){var v=c.type;return typeof v=="function"&&!C0(v)&&v.defaultProps===void 0&&c.compare===null?(c=dl(v),o.tag=15,o.type=c,yf(o,v),X0(i,o,c,g,b)):(i=Cc(c.type,null,g,o,o.mode,b),i.ref=o.ref,i.return=o,o.child=i)}if(v=i.child,!mm(i,b)){var A=v.memoizedProps;if(c=c.compare,c=c!==null?c:Ku,c(A,g)&&i.ref===o.ref)return Ho(i,o,b)}return o.flags|=1,i=vr(v,g),i.ref=o.ref,i.return=o,o.child=i}function X0(i,o,c,g,b){if(i!==null){var v=i.memoizedProps;if(Ku(v,g)&&i.ref===o.ref&&o.type===i.type)if(gi=!1,o.pendingProps=g=v,mm(i,b))i.flags&131072&&(gi=!0);else return o.lanes=i.lanes,Ho(i,o,b)}return F0(i,o,c,g,b)}function I0(i,o,c,g){var b=g.children,v=i!==null?i.memoizedState:null;if(i===null&&o.stateNode===null&&(o.stateNode={_visibility:gx,_pendingMarkers:null,_retryCache:null,_transitions:null}),g.mode==="hidden"){if(o.flags&128){if(v=v!==null?v.baseLanes|c:c,i!==null){for(g=o.child=i.child,b=0;g!==null;)b=b|g.lanes|g.childLanes,g=g.sibling;g=b&~v}else g=0,o.child=null;return Z0(i,o,v,c,g)}if(c&536870912)o.memoizedState={baseLanes:0,cachePool:null},i!==null&&of(o,v!==null?v.cachePool:null),v!==null?Jp(o,v):Ta(o),Kp(o);else return g=o.lanes=536870912,Z0(i,o,v!==null?v.baseLanes|c:c,c,g)}else v!==null?(of(o,v.cachePool),Jp(o,v),Ar(o),o.memoizedState=null):(i!==null&&of(o,null),Ta(o),Ar(o));return li(i,o,b,c),o.child}function Gc(i,o){return i!==null&&i.tag===22||o.stateNode!==null||(o.stateNode={_visibility:gx,_pendingMarkers:null,_retryCache:null,_transitions:null}),o.sibling}function Z0(i,o,c,g,b){var v=Aa();return v=v===null?null:{parent:fi._currentValue,pool:v},o.memoizedState={baseLanes:c,cachePool:v},i!==null&&of(o,null),Ta(o),Kp(o),i!==null&&Lo(i,o,g,!0),o.childLanes=b,null}function Ed(i,o){var c=o.hidden;return c!==void 0&&console.error(`<Activity> doesn't accept a hidden prop. Use mode="hidden" instead.
|
|
1125
|
+
- <Activity %s>
|
|
1126
|
+
+ <Activity %s>`,c===!0?"hidden":c===!1?"hidden={false}":"hidden={...}",c?'mode="hidden"':'mode="visible"'),o=Td({mode:o.mode,children:o.children},i.mode),o.ref=i.ref,i.child=o,o.return=i,o}function Q0(i,o,c){return mg(o,i.child,null,c),i=Ed(o,o.pendingProps),i.flags|=2,ri(o),o.memoizedState=null,i}function dw(i,o,c){var g=o.pendingProps,b=(o.flags&128)!==0;if(o.flags&=-129,i===null){if(Oe){if(g.mode==="hidden")return i=Ed(o,g),o.lanes=536870912,Gc(null,i);if(Po(o),(i=vn)?(c=Qe(i,Fr),c=c!==null&&c.data===Eg?c:null,c!==null&&(g={dehydrated:c,treeContext:iw(),retryLane:536870912,hydrationErrors:null},o.memoizedState=g,g=A0(c),g.return=o,o.child=g,us=o,vn=null)):c=null,c===null)throw _i(o,i),so(o);return o.lanes=536870912,null}return Ed(o,g)}var v=i.memoizedState;if(v!==null){var A=v.dehydrated;if(Po(o),b)if(o.flags&256)o.flags&=-257,o=Q0(i,o,c);else if(o.memoizedState!==null)o.child=i.child,o.flags|=128,o=null;else throw Error("Client rendering an Activity suspended it again. This is a bug in React.");else if(ow(),c&536870912&&Cf(o),gi||Lo(i,o,c,!1),b=(c&i.childLanes)!==0,gi||b){if(g=cn,g!==null&&(A=HS(g,c),A!==0&&A!==v.retryLane))throw v.retryLane=A,ji(i,A),ee(g,i,A),i2;Ef(),o=Q0(i,o,c)}else i=v.treeContext,vn=qs(A.nextSibling),us=o,Oe=!0,nh=null,Yl=!1,Fo=null,Fr=!1,i!==null&&sw(o,i),o=Ed(o,g),o.flags|=4096;return o}return v=i.child,g={mode:g.mode,children:g.children},c&536870912&&c&i.lanes&&Cf(o),i=vr(v,g),i.ref=o.ref,o.child=i,i.return=o,i}function Ad(i,o){var c=o.ref;if(c===null)i!==null&&i.ref!==null&&(o.flags|=4194816);else{if(typeof c!="function"&&typeof c!="object")throw Error("Expected ref to be a function, an object returned by React.createRef(), or undefined/null.");(i===null||i.ref!==c)&&(o.flags|=4194816)}}function F0(i,o,c,g,b){if(c.prototype&&typeof c.prototype.render=="function"){var v=H(c)||"Unknown";L_[v]||(console.error("The <%s /> component appears to have a render method, but doesn't extend React.Component. This is likely to cause errors. Change %s to extend React.Component instead.",v,v),L_[v]=!0)}return o.mode&ws&&$a.recordLegacyContextWarning(o,null),i===null&&(yf(o,o.type),c.contextTypes&&(v=H(c)||"Unknown",__[v]||(__[v]=!0,console.error("%s uses the legacy contextTypes API which was removed in React 19. Use React.createContext() with React.useContext() instead. (https://react.dev/link/legacy-context)",v)))),bl(o),c=B0(i,o,c,g,void 0,b),g=Nc(),i!==null&&!gi?(hd(i,o,b),Ho(i,o,b)):(Oe&&g&&$p(o),o.flags|=1,li(i,o,c,b),o.child)}function J0(i,o,c,g,b,v){return bl(o),pu=-1,Nx=i!==null&&i.type!==o.type,o.updateQueue=null,c=ud(o,g,c,b),Bn(i,o),g=Nc(),i!==null&&!gi?(hd(i,o,v),Ho(i,o,v)):(Oe&&g&&$p(o),o.flags|=1,li(i,o,c,v),o.child)}function $c(i,o,c,g,b){switch(f(o)){case!1:var v=o.stateNode,A=new o.type(o.memoizedProps,v.context).state;v.updater.enqueueSetState(v,A,null);break;case!0:o.flags|=128,o.flags|=65536,v=Error("Simulated error coming from DevTools");var O=b&-b;if(o.lanes|=O,A=cn,A===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");O=um(O),fm(O,A,o,Qi(v,o)),ld(o,O)}if(bl(o),o.stateNode===null){if(A=eh,v=c.contextType,"contextType"in c&&v!==null&&(v===void 0||v.$$typeof!==Io)&&!z_.has(c)&&(z_.add(c),O=v===void 0?" However, it is set to undefined. This can be caused by a typo or by mixing up named and default imports. This can also happen due to a circular dependency, so try moving the createContext() call to a separate file.":typeof v!="object"?" However, it is set to a "+typeof v+".":v.$$typeof===Wm?" Did you accidentally pass the Context.Consumer instead?":" However, it is set to an object with keys {"+Object.keys(v).join(", ")+"}.",console.error("%s defines an invalid contextType. contextType should point to the Context object returned by React.createContext().%s",H(c)||"Component",O)),typeof v=="object"&&v!==null&&(A=ke(v)),v=new c(g,A),o.mode&ws){sn(!0);try{v=new c(g,A)}finally{sn(!1)}}if(A=o.memoizedState=v.state!==null&&v.state!==void 0?v.state:null,v.updater=e2,o.stateNode=v,v._reactInternals=o,v._reactInternalInstance=w_,typeof c.getDerivedStateFromProps=="function"&&A===null&&(A=H(c)||"Component",E_.has(A)||(E_.add(A),console.error("`%s` uses `getDerivedStateFromProps` but its initial state is %s. This is not recommended. Instead, define the initial state by assigning an object to `this.state` in the constructor of `%s`. This ensures that `getDerivedStateFromProps` arguments have a consistent shape.",A,v.state===null?"null":"undefined",A))),typeof c.getDerivedStateFromProps=="function"||typeof v.getSnapshotBeforeUpdate=="function"){var j=O=A=null;if(typeof v.componentWillMount=="function"&&v.componentWillMount.__suppressDeprecationWarning!==!0?A="componentWillMount":typeof v.UNSAFE_componentWillMount=="function"&&(A="UNSAFE_componentWillMount"),typeof v.componentWillReceiveProps=="function"&&v.componentWillReceiveProps.__suppressDeprecationWarning!==!0?O="componentWillReceiveProps":typeof v.UNSAFE_componentWillReceiveProps=="function"&&(O="UNSAFE_componentWillReceiveProps"),typeof v.componentWillUpdate=="function"&&v.componentWillUpdate.__suppressDeprecationWarning!==!0?j="componentWillUpdate":typeof v.UNSAFE_componentWillUpdate=="function"&&(j="UNSAFE_componentWillUpdate"),A!==null||O!==null||j!==null){v=H(c)||"Component";var B=typeof c.getDerivedStateFromProps=="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";T_.has(v)||(T_.add(v),console.error(`Unsafe legacy lifecycles will not be called for components using new component APIs.
|
|
1127
|
+
|
|
1128
|
+
%s uses %s but also contains the following legacy lifecycles:%s%s%s
|
|
1129
|
+
|
|
1130
|
+
The above lifecycles should be removed. Learn more about this warning here:
|
|
1131
|
+
https://react.dev/link/unsafe-component-lifecycles`,v,B,A!==null?`
|
|
1132
|
+
`+A:"",O!==null?`
|
|
1133
|
+
`+O:"",j!==null?`
|
|
1134
|
+
`+j:""))}}v=o.stateNode,A=H(c)||"Component",v.render||(c.prototype&&typeof c.prototype.render=="function"?console.error("No `render` method found on the %s instance: did you accidentally return an object from the constructor?",A):console.error("No `render` method found on the %s instance: you may have forgotten to define `render`.",A)),!v.getInitialState||v.getInitialState.isReactClassApproved||v.state||console.error("getInitialState was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Did you mean to define a state property instead?",A),v.getDefaultProps&&!v.getDefaultProps.isReactClassApproved&&console.error("getDefaultProps was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Use a static property to define defaultProps instead.",A),v.contextType&&console.error("contextType was defined as an instance property on %s. Use a static property to define contextType instead.",A),c.childContextTypes&&!R_.has(c)&&(R_.add(c),console.error("%s uses the legacy childContextTypes API which was removed in React 19. Use React.createContext() instead. (https://react.dev/link/legacy-context)",A)),c.contextTypes&&!D_.has(c)&&(D_.add(c),console.error("%s uses the legacy contextTypes API which was removed in React 19. Use React.createContext() with static contextType instead. (https://react.dev/link/legacy-context)",A)),typeof v.componentShouldUpdate=="function"&&console.error("%s has a method called componentShouldUpdate(). Did you mean shouldComponentUpdate()? The name is phrased as a question because the function is expected to return a value.",A),c.prototype&&c.prototype.isPureReactComponent&&typeof v.shouldComponentUpdate<"u"&&console.error("%s has a method called shouldComponentUpdate(). shouldComponentUpdate should not be used when extending React.PureComponent. Please extend React.Component if shouldComponentUpdate is used.",H(c)||"A pure component"),typeof v.componentDidUnmount=="function"&&console.error("%s has a method called componentDidUnmount(). But there is no such lifecycle method. Did you mean componentWillUnmount()?",A),typeof v.componentDidReceiveProps=="function"&&console.error("%s has a method called componentDidReceiveProps(). But there is no such lifecycle method. If you meant to update the state in response to changing props, use componentWillReceiveProps(). If you meant to fetch data or run side-effects or mutations after React has updated the UI, use componentDidUpdate().",A),typeof v.componentWillRecieveProps=="function"&&console.error("%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?",A),typeof v.UNSAFE_componentWillRecieveProps=="function"&&console.error("%s has a method called UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?",A),O=v.props!==g,v.props!==void 0&&O&&console.error("When calling super() in `%s`, make sure to pass up the same props that your component's constructor was passed.",A),v.defaultProps&&console.error("Setting defaultProps as an instance property on %s is not supported and will be ignored. Instead, define defaultProps as a static property on %s.",A,A),typeof v.getSnapshotBeforeUpdate!="function"||typeof v.componentDidUpdate=="function"||A_.has(c)||(A_.add(c),console.error("%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). This component defines getSnapshotBeforeUpdate() only.",H(c))),typeof v.getDerivedStateFromProps=="function"&&console.error("%s: getDerivedStateFromProps() is defined as an instance method and will be ignored. Instead, declare it as a static method.",A),typeof v.getDerivedStateFromError=="function"&&console.error("%s: getDerivedStateFromError() is defined as an instance method and will be ignored. Instead, declare it as a static method.",A),typeof c.getSnapshotBeforeUpdate=="function"&&console.error("%s: getSnapshotBeforeUpdate() is defined as a static method and will be ignored. Instead, declare it as an instance method.",A),(O=v.state)&&(typeof O!="object"||qn(O))&&console.error("%s.state: must be set to an object or null",A),typeof v.getChildContext=="function"&&typeof c.childContextTypes!="object"&&console.error("%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().",A),v=o.stateNode,v.props=g,v.state=o.memoizedState,v.refs={},Ee(o),A=c.contextType,v.context=typeof A=="object"&&A!==null?ke(A):eh,v.state===g&&(A=H(c)||"Component",M_.has(A)||(M_.add(A),console.error("%s: It is not recommended to assign props directly to state because updates to props won't be reflected in state. In most cases, it is better to use props directly.",A))),o.mode&ws&&$a.recordLegacyContextWarning(o,v),$a.recordUnsafeLifecycleWarnings(o,v),v.state=o.memoizedState,A=c.getDerivedStateFromProps,typeof A=="function"&&(mf(o,c,A,g),v.state=o.memoizedState),typeof c.getDerivedStateFromProps=="function"||typeof v.getSnapshotBeforeUpdate=="function"||typeof v.UNSAFE_componentWillMount!="function"&&typeof v.componentWillMount!="function"||(A=v.state,typeof v.componentWillMount=="function"&&v.componentWillMount(),typeof v.UNSAFE_componentWillMount=="function"&&v.UNSAFE_componentWillMount(),A!==v.state&&(console.error("%s.componentWillMount(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",F(o)||"Component"),e2.enqueueReplaceState(v,v.state,null)),Er(o,g,v,b),af(),v.state=o.memoizedState),typeof v.componentDidMount=="function"&&(o.flags|=4194308),(o.mode&Ga)!==te&&(o.flags|=134217728),v=!0}else if(i===null){v=o.stateNode;var et=o.memoizedProps;O=Rr(c,et),v.props=O;var st=v.context;j=c.contextType,A=eh,typeof j=="object"&&j!==null&&(A=ke(j)),B=c.getDerivedStateFromProps,j=typeof B=="function"||typeof v.getSnapshotBeforeUpdate=="function",et=o.pendingProps!==et,j||typeof v.UNSAFE_componentWillReceiveProps!="function"&&typeof v.componentWillReceiveProps!="function"||(et||st!==A)&&Dr(o,v,g,A),ah=!1;var I=o.memoizedState;v.state=I,Er(o,g,v,b),af(),st=o.memoizedState,et||I!==st||ah?(typeof B=="function"&&(mf(o,c,B,g),st=o.memoizedState),(O=ah||rm(o,c,O,g,I,st,A))?(j||typeof v.UNSAFE_componentWillMount!="function"&&typeof v.componentWillMount!="function"||(typeof v.componentWillMount=="function"&&v.componentWillMount(),typeof v.UNSAFE_componentWillMount=="function"&&v.UNSAFE_componentWillMount()),typeof v.componentDidMount=="function"&&(o.flags|=4194308),(o.mode&Ga)!==te&&(o.flags|=134217728)):(typeof v.componentDidMount=="function"&&(o.flags|=4194308),(o.mode&Ga)!==te&&(o.flags|=134217728),o.memoizedProps=g,o.memoizedState=st),v.props=g,v.state=st,v.context=A,v=O):(typeof v.componentDidMount=="function"&&(o.flags|=4194308),(o.mode&Ga)!==te&&(o.flags|=134217728),v=!1)}else{v=o.stateNode,wr(i,o),A=o.memoizedProps,j=Rr(c,A),v.props=j,B=o.pendingProps,I=v.context,st=c.contextType,O=eh,typeof st=="object"&&st!==null&&(O=ke(st)),et=c.getDerivedStateFromProps,(st=typeof et=="function"||typeof v.getSnapshotBeforeUpdate=="function")||typeof v.UNSAFE_componentWillReceiveProps!="function"&&typeof v.componentWillReceiveProps!="function"||(A!==B||I!==O)&&Dr(o,v,g,O),ah=!1,I=o.memoizedState,v.state=I,Er(o,g,v,b),af();var ht=o.memoizedState;A!==B||I!==ht||ah||i!==null&&i.dependencies!==null&&nf(i.dependencies)?(typeof et=="function"&&(mf(o,c,et,g),ht=o.memoizedState),(j=ah||rm(o,c,j,g,I,ht,O)||i!==null&&i.dependencies!==null&&nf(i.dependencies))?(st||typeof v.UNSAFE_componentWillUpdate!="function"&&typeof v.componentWillUpdate!="function"||(typeof v.componentWillUpdate=="function"&&v.componentWillUpdate(g,ht,O),typeof v.UNSAFE_componentWillUpdate=="function"&&v.UNSAFE_componentWillUpdate(g,ht,O)),typeof v.componentDidUpdate=="function"&&(o.flags|=4),typeof v.getSnapshotBeforeUpdate=="function"&&(o.flags|=1024)):(typeof v.componentDidUpdate!="function"||A===i.memoizedProps&&I===i.memoizedState||(o.flags|=4),typeof v.getSnapshotBeforeUpdate!="function"||A===i.memoizedProps&&I===i.memoizedState||(o.flags|=1024),o.memoizedProps=g,o.memoizedState=ht),v.props=g,v.state=ht,v.context=O,v=j):(typeof v.componentDidUpdate!="function"||A===i.memoizedProps&&I===i.memoizedState||(o.flags|=4),typeof v.getSnapshotBeforeUpdate!="function"||A===i.memoizedProps&&I===i.memoizedState||(o.flags|=1024),v=!1)}if(O=v,Ad(i,o),A=(o.flags&128)!==0,O||A){if(O=o.stateNode,Xi(o),A&&typeof c.getDerivedStateFromError!="function")c=null,Qs=-1;else if(c=Kj(O),o.mode&ws){sn(!0);try{Kj(O)}finally{sn(!1)}}o.flags|=1,i!==null&&A?(o.child=mg(o,i.child,null,b),o.child=mg(o,null,c,b)):li(i,o,c,b),o.memoizedState=O.state,i=o.child}else i=Ho(i,o,b);return b=o.stateNode,v&&b.props!==g&&(Ny||console.error("It looks like %s is reassigning its own `this.props` while rendering. This is not supported and can lead to confusing bugs.",F(o)||"a component"),Ny=!0),i}function K0(i,o,c,g){return ml(),o.flags|=256,li(i,o,c,g),o.child}function yf(i,o){o&&o.childContextTypes&&console.error(`childContextTypes cannot be defined on a function component.
|
|
1135
|
+
%s.childContextTypes = ...`,o.displayName||o.name||"Component"),typeof o.getDerivedStateFromProps=="function"&&(i=H(o)||"Unknown",B_[i]||(console.error("%s: Function components do not support getDerivedStateFromProps.",i),B_[i]=!0)),typeof o.contextType=="object"&&o.contextType!==null&&(o=H(o)||"Unknown",j_[o]||(console.error("%s: Function components do not support contextType.",o),j_[o]=!0))}function bf(i){return{baseLanes:i,cachePool:z0()}}function hm(i,o,c){return i=i!==null?i.childLanes&~c:0,o&&(i|=bo),i}function dm(i,o,c){var g,b=o.pendingProps;l(o)&&(o.flags|=128);var v=!1,A=(o.flags&128)!==0;if((g=A)||(g=i!==null&&i.memoizedState===null?!1:(Wn.current&Rx)!==0),g&&(v=!0,o.flags&=-129),g=(o.flags&32)!==0,o.flags&=-33,i===null){if(Oe){if(v?Wi(o):Ar(o),(i=vn)?(c=Qe(i,Fr),c=c!==null&&c.data!==Eg?c:null,c!==null&&(g={dehydrated:c,treeContext:iw(),retryLane:536870912,hydrationErrors:null},o.memoizedState=g,g=A0(c),g.return=o,o.child=g,us=o,vn=null)):c=null,c===null)throw _i(o,i),so(o);return zv(c)?o.lanes=32:o.lanes=536870912,null}var O=b.children;if(b=b.fallback,v){Ar(o);var j=o.mode;return O=Td({mode:"hidden",children:O},j),b=Ec(b,j,c,null),O.return=o,b.return=o,O.sibling=b,o.child=O,b=o.child,b.memoizedState=bf(c),b.childLanes=hm(i,g,c),o.memoizedState=s2,Gc(null,b)}return Wi(o),W0(o,O)}var B=i.memoizedState;if(B!==null){var et=B.dehydrated;if(et!==null){if(A)o.flags&256?(Wi(o),o.flags&=-257,o=gm(i,o,c)):o.memoizedState!==null?(Ar(o),o.child=i.child,o.flags|=128,o=null):(Ar(o),O=b.fallback,j=o.mode,b=Td({mode:"visible",children:b.children},j),O=Ec(O,j,c,null),O.flags|=2,b.return=o,O.return=o,b.sibling=O,o.child=b,mg(o,i.child,null,c),b=o.child,b.memoizedState=bf(c),b.childLanes=hm(i,g,c),o.memoizedState=s2,o=Gc(null,b));else if(Wi(o),ow(),c&536870912&&Cf(o),zv(et)){if(g=et.nextSibling&&et.nextSibling.dataset,g){O=g.dgst;var st=g.msg;j=g.stck;var I=g.cstck}v=st,g=O,b=j,et=I,O=v,j=et,O=Error(O||"The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering."),O.stack=b||"",O.digest=g,g=j===void 0?null:j,b={value:O,source:null,stack:g},typeof g=="string"&&PM.set(O,b),nd(b),o=gm(i,o,c)}else if(gi||Lo(i,o,c,!1),g=(c&i.childLanes)!==0,gi||g){if(g=cn,g!==null&&(b=HS(g,c),b!==0&&b!==B.retryLane))throw B.retryLane=b,ji(i,b),ee(g,i,b),i2;qd(et)||Ef(),o=gm(i,o,c)}else qd(et)?(o.flags|=192,o.child=i.child,o=null):(i=B.treeContext,vn=qs(et.nextSibling),us=o,Oe=!0,nh=null,Yl=!1,Fo=null,Fr=!1,i!==null&&sw(o,i),o=W0(o,b.children),o.flags|=4096);return o}}return v?(Ar(o),O=b.fallback,j=o.mode,I=i.child,et=I.sibling,b=vr(I,{mode:"hidden",children:b.children}),b.subtreeFlags=I.subtreeFlags&65011712,et!==null?O=vr(et,O):(O=Ec(O,j,c,null),O.flags|=2),O.return=o,b.return=o,b.sibling=O,o.child=b,Gc(null,b),b=o.child,O=i.child.memoizedState,O===null?O=bf(c):(j=O.cachePool,j!==null?(I=fi._currentValue,j=j.parent!==I?{parent:I,pool:I}:j):j=z0(),O={baseLanes:O.baseLanes|c,cachePool:j}),b.memoizedState=O,b.childLanes=hm(i,g,c),o.memoizedState=s2,Gc(i.child,b)):(B!==null&&(c&62914560)===c&&c&i.lanes&&Cf(o),Wi(o),c=i.child,i=c.sibling,c=vr(c,{mode:"visible",children:b.children}),c.return=o,c.sibling=null,i!==null&&(g=o.deletions,g===null?(o.deletions=[i],o.flags|=16):g.push(i)),o.child=c,o.memoizedState=null,c)}function W0(i,o){return o=Td({mode:"visible",children:o},i.mode),o.return=i,i.child=o}function Td(i,o){return i=w(22,i,null,o),i.lanes=0,i}function gm(i,o,c){return mg(o,i.child,null,c),i=W0(o,o.pendingProps.children),i.flags|=2,o.memoizedState=null,i}function tv(i,o,c){i.lanes|=o;var g=i.alternate;g!==null&&(g.lanes|=o),Yp(i.return,o,c)}function pm(i,o,c,g,b,v){var A=i.memoizedState;A===null?i.memoizedState={isBackwards:o,rendering:null,renderingStartTime:0,last:g,tail:c,tailMode:b,treeForkCount:v}:(A.isBackwards=o,A.rendering=null,A.renderingStartTime=0,A.last=g,A.tail=c,A.tailMode=b,A.treeForkCount=v)}function ev(i,o,c){var g=o.pendingProps,b=g.revealOrder,v=g.tail,A=g.children,O=Wn.current;if((g=(O&Rx)!==0)?(O=O&Oy|Rx,o.flags|=128):O&=Oy,vt(Wn,O,o),O=b??"null",b!=="forwards"&&b!=="unstable_legacy-backwards"&&b!=="together"&&b!=="independent"&&!P_[O])if(P_[O]=!0,b==null)console.error('The default for the <SuspenseList revealOrder="..."> prop is changing. To be future compatible you must explictly specify either "independent" (the current default), "together", "forwards" or "legacy_unstable-backwards".');else if(b==="backwards")console.error('The rendering order of <SuspenseList revealOrder="backwards"> is changing. To be future compatible you must specify revealOrder="legacy_unstable-backwards" instead.');else if(typeof b=="string")switch(b.toLowerCase()){case"together":case"forwards":case"backwards":case"independent":console.error('"%s" is not a valid value for revealOrder on <SuspenseList />. Use lowercase "%s" instead.',b,b.toLowerCase());break;case"forward":case"backward":console.error('"%s" is not a valid value for revealOrder on <SuspenseList />. React uses the -s suffix in the spelling. Use "%ss" instead.',b,b.toLowerCase());break;default:console.error('"%s" is not a supported revealOrder on <SuspenseList />. Did you mean "independent", "together", "forwards" or "backwards"?',b)}else console.error('%s is not a supported value for revealOrder on <SuspenseList />. Did you mean "independent", "together", "forwards" or "backwards"?',b);O=v??"null",BC[O]||(v==null?(b==="forwards"||b==="backwards"||b==="unstable_legacy-backwards")&&(BC[O]=!0,console.error('The default for the <SuspenseList tail="..."> prop is changing. To be future compatible you must explictly specify either "visible" (the current default), "collapsed" or "hidden".')):v!=="visible"&&v!=="collapsed"&&v!=="hidden"?(BC[O]=!0,console.error('"%s" is not a supported value for tail on <SuspenseList />. Did you mean "visible", "collapsed" or "hidden"?',v)):b!=="forwards"&&b!=="backwards"&&b!=="unstable_legacy-backwards"&&(BC[O]=!0,console.error('<SuspenseList tail="%s" /> is only valid if revealOrder is "forwards" or "backwards". Did you mean to specify revealOrder="forwards"?',v)));t:if((b==="forwards"||b==="backwards"||b==="unstable_legacy-backwards")&&A!==void 0&&A!==null&&A!==!1)if(qn(A)){for(O=0;O<A.length;O++)if(!on(A[O],O))break t}else if(O=k(A),typeof O=="function"){if(O=O.call(A))for(var j=O.next(),B=0;!j.done;j=O.next()){if(!on(j.value,B))break t;B++}}else console.error('A single row was passed to a <SuspenseList revealOrder="%s" />. This is not useful since it needs multiple rows. Did you mean to pass multiple children or an array?',b);if(li(i,o,A,c),Oe?(pl(),A=px):A=0,!g&&i!==null&&i.flags&128)t:for(i=o.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&tv(i,c,o);else if(i.tag===19)tv(i,c,o);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===o)break t;for(;i.sibling===null;){if(i.return===null||i.return===o)break t;i=i.return}i.sibling.return=i.return,i=i.sibling}switch(b){case"forwards":for(c=o.child,b=null;c!==null;)i=c.alternate,i!==null&&zc(i)===null&&(b=c),c=c.sibling;c=b,c===null?(b=o.child,o.child=null):(b=c.sibling,c.sibling=null),pm(o,!1,b,c,v,A);break;case"backwards":case"unstable_legacy-backwards":for(c=null,b=o.child,o.child=null;b!==null;){if(i=b.alternate,i!==null&&zc(i)===null){o.child=b;break}i=b.sibling,b.sibling=c,c=b,b=i}pm(o,!0,c,null,v,A);break;case"together":pm(o,!1,null,null,void 0,A);break;default:o.memoizedState=null}return o.child}function Ho(i,o,c){if(i!==null&&(o.dependencies=i.dependencies),Qs=-1,uh|=o.lanes,!(c&o.childLanes))if(i!==null){if(Lo(i,o,c,!1),(c&o.childLanes)===0)return null}else return null;if(i!==null&&o.child!==i.child)throw Error("Resuming work not yet implemented.");if(o.child!==null){for(i=o.child,c=vr(i,i.pendingProps),o.child=c,c.return=o;i.sibling!==null;)i=i.sibling,c=c.sibling=vr(i,i.pendingProps),c.return=o;c.sibling=null}return o.child}function mm(i,o){return i.lanes&o?!0:(i=i.dependencies,!!(i!==null&&nf(i)))}function gw(i,o,c){switch(o.tag){case 3:zt(o,o.stateNode.containerInfo),oo(o,fi,i.memoizedState.cache),ml();break;case 27:case 5:tt(o);break;case 4:zt(o,o.stateNode.containerInfo);break;case 10:oo(o,o.type,o.memoizedProps.value);break;case 12:c&o.childLanes&&(o.flags|=4),o.flags|=2048;var g=o.stateNode;g.effectDuration=-0,g.passiveEffectDuration=-0;break;case 31:if(o.memoizedState!==null)return o.flags|=128,Po(o),null;break;case 13:if(g=o.memoizedState,g!==null)return g.dehydrated!==null?(Wi(o),o.flags|=128,null):c&o.child.childLanes?dm(i,o,c):(Wi(o),i=Ho(i,o,c),i!==null?i.sibling:null);Wi(o);break;case 19:var b=(i.flags&128)!==0;if(g=(c&o.childLanes)!==0,g||(Lo(i,o,c,!1),g=(c&o.childLanes)!==0),b){if(g)return ev(i,o,c);o.flags|=128}if(b=o.memoizedState,b!==null&&(b.rendering=null,b.tail=null,b.lastEffect=null),vt(Wn,Wn.current,o),g)break;return null;case 22:return o.lanes=0,I0(i,o,c,o.pendingProps);case 24:oo(o,fi,i.memoizedState.cache)}return Ho(i,o,c)}function Md(i,o,c){if(o._debugNeedsRemount&&i!==null){c=Cc(o.type,o.key,o.pendingProps,o._debugOwner||null,o.mode,o.lanes),c._debugStack=o._debugStack,c._debugTask=o._debugTask;var g=o.return;if(g===null)throw Error("Cannot swap the root fiber.");if(i.alternate=null,o.alternate=null,c.index=o.index,c.sibling=o.sibling,c.return=o.return,c.ref=o.ref,c._debugInfo=o._debugInfo,o===g.child)g.child=c;else{var b=g.child;if(b===null)throw Error("Expected parent to have a child.");for(;b.sibling!==o;)if(b=b.sibling,b===null)throw Error("Expected to find the previous sibling.");b.sibling=c}return o=g.deletions,o===null?(g.deletions=[i],g.flags|=16):o.push(i),c.flags|=2,c}if(i!==null)if(i.memoizedProps!==o.pendingProps||o.type!==i.type)gi=!0;else{if(!mm(i,c)&&!(o.flags&128))return gi=!1,gw(i,o,c);gi=!!(i.flags&131072)}else gi=!1,(g=Oe)&&(pl(),g=(o.flags&1048576)!==0),g&&(g=o.index,pl(),T0(o,px,g));switch(o.lanes=0,o.tag){case 16:t:if(g=o.pendingProps,i=_s(o.elementType),o.type=i,typeof i=="function")C0(i)?(g=Rr(i,g),o.tag=1,o.type=i=dl(i),o=$c(null,o,i,g,c)):(o.tag=0,yf(o,i),o.type=i=dl(i),o=F0(null,o,i,g,c));else{if(i!=null){if(b=i.$$typeof,b===Vf){o.tag=11,o.type=i=Vp(i),o=hw(null,o,i,g,c);break t}else if(b===tg){o.tag=14,o=Y0(null,o,i,g,c);break t}}throw o="",i!==null&&typeof i=="object"&&i.$$typeof===Pi&&(o=" Did you wrap a component in React.lazy() more than once?"),c=H(i)||i,Error("Element type is invalid. Received a promise that resolves to: "+c+". Lazy element type must resolve to a class or function."+o)}return o;case 0:return F0(i,o,o.type,o.pendingProps,c);case 1:return g=o.type,b=Rr(g,o.pendingProps),$c(i,o,g,b,c);case 3:t:{if(zt(o,o.stateNode.containerInfo),i===null)throw Error("Should have a current fiber. This is a bug in React.");g=o.pendingProps;var v=o.memoizedState;b=v.element,wr(i,o),Er(o,g,null,c);var A=o.memoizedState;if(g=A.cache,oo(o,fi,g),g!==v.cache&&wa(o,[fi],c,!0),af(),g=A.element,v.isDehydrated)if(v={element:g,isDehydrated:!1,cache:A.cache},o.updateQueue.baseState=v,o.memoizedState=v,o.flags&256){o=K0(i,o,g,c);break t}else if(g!==b){b=Qi(Error("This root received an early update, before anything was able hydrate. Switched the entire root to client rendering."),o),nd(b),o=K0(i,o,g,c);break t}else{switch(i=o.stateNode.containerInfo,i.nodeType){case 9:i=i.body;break;default:i=i.nodeName==="HTML"?i.ownerDocument.body:i}for(vn=qs(i.firstChild),us=o,Oe=!0,nh=null,Yl=!1,Fo=null,Fr=!0,c=h_(o,null,g,c),o.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling}else{if(ml(),g===b){o=Ho(i,o,c);break t}li(i,o,g,c)}o=o.child}return o;case 26:return Ad(i,o),i===null?(c=_v(o.type,null,o.pendingProps,null))?o.memoizedState=c:Oe||(c=o.type,i=o.pendingProps,g=Ot(Ys.current),g=Gd(g).createElement(c),g[yn]=o,g[cs]=i,mn(g,c,i),jn(g),o.stateNode=g):o.memoizedState=_v(o.type,i.memoizedProps,o.pendingProps,i.memoizedState),null;case 27:return tt(o),i===null&&Oe&&(g=Ot(Ys.current),b=ot(),g=o.stateNode=Ua(o.type,o.pendingProps,g,b,!1),Yl||(b=vs(g,o.type,o.pendingProps,b),b!==null&&(Ac(o,0).serverProps=b)),us=o,Fr=!0,b=vn,Ul(o.type)?(M2=b,vn=qs(g.firstChild)):vn=b),li(i,o,o.pendingProps.children,c),Ad(i,o),i===null&&(o.flags|=4194304),o.child;case 5:return i===null&&Oe&&(v=ot(),g=Xh(o.type,v.ancestorInfo),b=vn,(A=!b)||(A=qw(b,o.type,o.pendingProps,Fr),A!==null?(o.stateNode=A,Yl||(v=vs(A,o.type,o.pendingProps,v),v!==null&&(Ac(o,0).serverProps=v)),us=o,vn=qs(A.firstChild),Fr=!1,v=!0):v=!1,A=!v),A&&(g&&_i(o,b),so(o))),tt(o),b=o.type,v=o.pendingProps,A=i!==null?i.memoizedProps:null,g=v.children,Nf(b,v)?g=null:A!==null&&Nf(b,A)&&(o.flags|=32),o.memoizedState!==null&&(b=B0(i,o,fd,null,null,c),Zx._currentValue=b),Ad(i,o),li(i,o,g,c),o.child;case 6:return i===null&&Oe&&(c=o.pendingProps,i=ot(),g=i.ancestorInfo.current,c=g!=null?Ih(c,g.tag,i.ancestorInfo.implicitRootScope):!0,i=vn,(g=!i)||(g=Yw(i,o.pendingProps,Fr),g!==null?(o.stateNode=g,us=o,vn=null,g=!0):g=!1,g=!g),g&&(c&&_i(o,i),so(o))),null;case 13:return dm(i,o,c);case 4:return zt(o,o.stateNode.containerInfo),g=o.pendingProps,i===null?o.child=mg(o,null,g,c):li(i,o,g,c),o.child;case 11:return hw(i,o,o.type,o.pendingProps,c);case 7:return li(i,o,o.pendingProps,c),o.child;case 8:return li(i,o,o.pendingProps.children,c),o.child;case 12:return o.flags|=4,o.flags|=2048,g=o.stateNode,g.effectDuration=-0,g.passiveEffectDuration=-0,li(i,o,o.pendingProps.children,c),o.child;case 10:return g=o.type,b=o.pendingProps,v=b.value,"value"in b||U_||(U_=!0,console.error("The `value` prop is required for the `<Context.Provider>`. Did you misspell it or forget to pass it?")),oo(o,g,v),li(i,o,b.children,c),o.child;case 9:return b=o.type._context,g=o.pendingProps.children,typeof g!="function"&&console.error("A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it."),bl(o),b=ke(b),g=YM(g,b,void 0),o.flags|=1,li(i,o,g,c),o.child;case 14:return Y0(i,o,o.type,o.pendingProps,c);case 15:return X0(i,o,o.type,o.pendingProps,c);case 19:return ev(i,o,c);case 31:return dw(i,o,c);case 22:return I0(i,o,c,o.pendingProps);case 24:return bl(o),g=ke(fi),i===null?(b=Aa(),b===null&&(b=cn,v=Xp(),b.pooledCache=v,Mc(v),v!==null&&(b.pooledCacheLanes|=c),b=v),o.memoizedState={parent:g,cache:b},Ee(o),oo(o,fi,b)):(i.lanes&c&&(wr(i,o),Er(o,null,null,c),af()),b=i.memoizedState,v=o.memoizedState,b.parent!==g?(b={parent:g,cache:g},o.memoizedState=b,o.lanes===0&&(o.memoizedState=o.updateQueue.baseState=b),oo(o,fi,g)):(g=v.cache,oo(o,fi,g),g!==b.cache&&wa(o,[fi],c,!0))),li(i,o,o.pendingProps.children,c),o.child;case 29:throw o.pendingProps}throw Error("Unknown unit of work tag ("+o.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function zr(i){i.flags|=4}function ym(i,o,c,g,b){if((o=(i.mode&HW)!==te)&&(o=!1),o){if(i.flags|=16777216,(b&335544128)===b)if(i.stateNode.complete)i.flags|=8192;else if(vv())i.flags|=8192;else throw pg=RC,IM}else i.flags&=-16777217}function pw(i,o){if(o.type!=="stylesheet"||(o.state.loading&ea)!==Mg)i.flags&=-16777217;else if(i.flags|=16777216,!we(o))if(vv())i.flags|=8192;else throw pg=RC,IM}function vf(i,o){o!==null&&(i.flags|=4),i.flags&16384&&(o=i.tag!==22?xp():536870912,i.lanes|=o,Sg|=o)}function xf(i,o){if(!Oe)switch(i.tailMode){case"hidden":o=i.tail;for(var c=null;o!==null;)o.alternate!==null&&(c=o),o=o.sibling;c===null?i.tail=null:c.sibling=null;break;case"collapsed":c=i.tail;for(var g=null;c!==null;)c.alternate!==null&&(g=c),c=c.sibling;g===null?o||i.tail===null?i.tail=null:i.tail.sibling=null:g.sibling=null}}function Je(i){var o=i.alternate!==null&&i.alternate.child===i.child,c=0,g=0;if(o)if((i.mode&me)!==te){for(var b=i.selfBaseDuration,v=i.child;v!==null;)c|=v.lanes|v.childLanes,g|=v.subtreeFlags&65011712,g|=v.flags&65011712,b+=v.treeBaseDuration,v=v.sibling;i.treeBaseDuration=b}else for(b=i.child;b!==null;)c|=b.lanes|b.childLanes,g|=b.subtreeFlags&65011712,g|=b.flags&65011712,b.return=i,b=b.sibling;else if((i.mode&me)!==te){b=i.actualDuration,v=i.selfBaseDuration;for(var A=i.child;A!==null;)c|=A.lanes|A.childLanes,g|=A.subtreeFlags,g|=A.flags,b+=A.actualDuration,v+=A.treeBaseDuration,A=A.sibling;i.actualDuration=b,i.treeBaseDuration=v}else for(b=i.child;b!==null;)c|=b.lanes|b.childLanes,g|=b.subtreeFlags,g|=b.flags,b.return=i,b=b.sibling;return i.subtreeFlags|=g,i.childLanes=c,o}function nv(i,o,c){var g=o.pendingProps;switch(qp(o),o.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Je(o),null;case 1:return Je(o),null;case 3:return c=o.stateNode,g=null,i!==null&&(g=i.memoizedState.cache),o.memoizedState.cache!==g&&(o.flags|=2048),No(fi,o),V(o),c.pendingContext&&(c.context=c.pendingContext,c.pendingContext=null),(i===null||i.child===null)&&(Tc(o)?(yl(),zr(o)):i===null||i.memoizedState.isDehydrated&&!(o.flags&256)||(o.flags|=1024,ed())),Je(o),null;case 26:var b=o.type,v=o.memoizedState;return i===null?(zr(o),v!==null?(Je(o),pw(o,v)):(Je(o),ym(o,b,null,g,c))):v?v!==i.memoizedState?(zr(o),Je(o),pw(o,v)):(Je(o),o.flags&=-16777217):(i=i.memoizedProps,i!==g&&zr(o),Je(o),ym(o,b,i,g,c)),null;case 27:if(yt(o),c=Ot(Ys.current),b=o.type,i!==null&&o.stateNode!=null)i.memoizedProps!==g&&zr(o);else{if(!g){if(o.stateNode===null)throw Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");return Je(o),null}i=ot(),Tc(o)?M0(o):(i=Ua(b,g,c,i,!0),o.stateNode=i,zr(o))}return Je(o),null;case 5:if(yt(o),b=o.type,i!==null&&o.stateNode!=null)i.memoizedProps!==g&&zr(o);else{if(!g){if(o.stateNode===null)throw Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");return Je(o),null}var A=ot();if(Tc(o))M0(o);else{switch(v=Ot(Ys.current),Xh(b,A.ancestorInfo),A=A.context,v=Gd(v),A){case ky:v=v.createElementNS(de,b);break;case nE:v=v.createElementNS(oe,b);break;default:switch(b){case"svg":v=v.createElementNS(de,b);break;case"math":v=v.createElementNS(oe,b);break;case"script":v=v.createElement("div"),v.innerHTML="<script><\/script>",v=v.removeChild(v.firstChild);break;case"select":v=typeof g.is=="string"?v.createElement("select",{is:g.is}):v.createElement("select"),g.multiple?v.multiple=!0:g.size&&(v.size=g.size);break;default:v=typeof g.is=="string"?v.createElement(b,{is:g.is}):v.createElement(b),b.indexOf("-")===-1&&(b!==b.toLowerCase()&&console.error("<%s /> is using incorrect casing. Use PascalCase for React components, or lowercase for HTML elements.",b),Object.prototype.toString.call(v)!=="[object HTMLUnknownElement]"||Xs.call(lB,b)||(lB[b]=!0,console.error("The tag <%s> is unrecognized in this browser. If you meant to render a React component, start its name with an uppercase letter.",b)))}}v[yn]=o,v[cs]=g;t:for(A=o.child;A!==null;){if(A.tag===5||A.tag===6)v.appendChild(A.stateNode);else if(A.tag!==4&&A.tag!==27&&A.child!==null){A.child.return=A,A=A.child;continue}if(A===o)break t;for(;A.sibling===null;){if(A.return===null||A.return===o)break t;A=A.return}A.sibling.return=A.return,A=A.sibling}o.stateNode=v;t:switch(mn(v,b,g),b){case"button":case"input":case"select":case"textarea":g=!!g.autoFocus;break t;case"img":g=!0;break t;default:g=!1}g&&zr(o)}}return Je(o),ym(o,o.type,i===null?null:i.memoizedProps,o.pendingProps,c),null;case 6:if(i&&o.stateNode!=null)i.memoizedProps!==g&&zr(o);else{if(typeof g!="string"&&o.stateNode===null)throw Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");if(i=Ot(Ys.current),c=ot(),Tc(o)){if(i=o.stateNode,c=o.memoizedProps,b=!Yl,g=null,v=us,v!==null)switch(v.tag){case 3:b&&(b=Zw(i,c,g),b!==null&&(Ac(o,0).serverProps=b));break;case 27:case 5:g=v.memoizedProps,b&&(b=Zw(i,c,g),b!==null&&(Ac(o,0).serverProps=b))}i[yn]=o,i=!!(i.nodeValue===c||g!==null&&g.suppressHydrationWarning===!0||Dv(i.nodeValue,c)),i||so(o,!0)}else b=c.ancestorInfo.current,b!=null&&Ih(g,b.tag,c.ancestorInfo.implicitRootScope),i=Gd(i).createTextNode(g),i[yn]=o,o.stateNode=i}return Je(o),null;case 31:if(c=o.memoizedState,i===null||i.memoizedState!==null){if(g=Tc(o),c!==null){if(i===null){if(!g)throw Error("A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React.");if(i=o.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error("Expected to have a hydrated activity instance. This error is likely caused by a bug in React. Please file an issue.");i[yn]=o,Je(o),(o.mode&me)!==te&&c!==null&&(i=o.child,i!==null&&(o.treeBaseDuration-=i.treeBaseDuration))}else yl(),ml(),!(o.flags&128)&&(c=o.memoizedState=null),o.flags|=4,Je(o),(o.mode&me)!==te&&c!==null&&(i=o.child,i!==null&&(o.treeBaseDuration-=i.treeBaseDuration));i=!1}else c=ed(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=c),i=!0;if(!i)return o.flags&256?(ri(o),o):(ri(o),null);if(o.flags&128)throw Error("Client rendering an Activity suspended it again. This is a bug in React.")}return Je(o),null;case 13:if(g=o.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(b=g,v=Tc(o),b!==null&&b.dehydrated!==null){if(i===null){if(!v)throw Error("A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React.");if(v=o.memoizedState,v=v!==null?v.dehydrated:null,!v)throw Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");v[yn]=o,Je(o),(o.mode&me)!==te&&b!==null&&(b=o.child,b!==null&&(o.treeBaseDuration-=b.treeBaseDuration))}else yl(),ml(),!(o.flags&128)&&(b=o.memoizedState=null),o.flags|=4,Je(o),(o.mode&me)!==te&&b!==null&&(b=o.child,b!==null&&(o.treeBaseDuration-=b.treeBaseDuration));b=!1}else b=ed(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=b),b=!0;if(!b)return o.flags&256?(ri(o),o):(ri(o),null)}return ri(o),o.flags&128?(o.lanes=c,(o.mode&me)!==te&&Dc(o),o):(c=g!==null,i=i!==null&&i.memoizedState!==null,c&&(g=o.child,b=null,g.alternate!==null&&g.alternate.memoizedState!==null&&g.alternate.memoizedState.cachePool!==null&&(b=g.alternate.memoizedState.cachePool.pool),v=null,g.memoizedState!==null&&g.memoizedState.cachePool!==null&&(v=g.memoizedState.cachePool.pool),v!==b&&(g.flags|=2048)),c!==i&&c&&(o.child.flags|=8192),vf(o,o.updateQueue),Je(o),(o.mode&me)!==te&&c&&(i=o.child,i!==null&&(o.treeBaseDuration-=i.treeBaseDuration)),null);case 4:return V(o),i===null&&Bl(o.stateNode.containerInfo),Je(o),null;case 10:return No(o.type,o),Je(o),null;case 19:if(lt(Wn,o),g=o.memoizedState,g===null)return Je(o),null;if(b=(o.flags&128)!==0,v=g.rendering,v===null)if(b)xf(g,!1);else{if(Ln!==yu||i!==null&&i.flags&128)for(i=o.child;i!==null;){if(v=zc(i),v!==null){for(o.flags|=128,xf(g,!1),i=v.updateQueue,o.updateQueue=i,vf(o,i),o.subtreeFlags=0,i=c,c=o.child;c!==null;)E0(c,i),c=c.sibling;return vt(Wn,Wn.current&Oy|Rx,o),Oe&&zo(o,g.treeForkCount),o.child}i=i.sibling}g.tail!==null&&ui()>$C&&(o.flags|=128,b=!0,xf(g,!1),o.lanes=4194304)}else{if(!b)if(i=zc(v),i!==null){if(o.flags|=128,b=!0,i=i.updateQueue,o.updateQueue=i,vf(o,i),xf(g,!0),g.tail===null&&g.tailMode==="hidden"&&!v.alternate&&!Oe)return Je(o),null}else 2*ui()-g.renderingStartTime>$C&&c!==536870912&&(o.flags|=128,b=!0,xf(g,!1),o.lanes=4194304);g.isBackwards?(v.sibling=o.child,o.child=v):(i=g.last,i!==null?i.sibling=v:o.child=v,g.last=v)}return g.tail!==null?(i=g.tail,g.rendering=i,g.tail=i.sibling,g.renderingStartTime=ui(),i.sibling=null,c=Wn.current,c=b?c&Oy|Rx:c&Oy,vt(Wn,c,o),Oe&&zo(o,g.treeForkCount),i):(Je(o),null);case 22:case 23:return ri(o),Bo(o),g=o.memoizedState!==null,i!==null?i.memoizedState!==null!==g&&(o.flags|=8192):g&&(o.flags|=8192),g?c&536870912&&!(o.flags&128)&&(Je(o),o.subtreeFlags&6&&(o.flags|=8192)):Je(o),c=o.updateQueue,c!==null&&vf(o,c.retryQueue),c=null,i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(c=i.memoizedState.cachePool.pool),g=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(g=o.memoizedState.cachePool.pool),g!==c&&(o.flags|=2048),i!==null&<(dg,o),null;case 24:return c=null,i!==null&&(c=i.memoizedState.cache),o.memoizedState.cache!==c&&(o.flags|=2048),No(fi,o),Je(o),null;case 25:return null;case 30:return null}throw Error("Unknown unit of work tag ("+o.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function mw(i,o){switch(qp(o),o.tag){case 1:return i=o.flags,i&65536?(o.flags=i&-65537|128,(o.mode&me)!==te&&Dc(o),o):null;case 3:return No(fi,o),V(o),i=o.flags,i&65536&&!(i&128)?(o.flags=i&-65537|128,o):null;case 26:case 27:case 5:return yt(o),null;case 31:if(o.memoizedState!==null){if(ri(o),o.alternate===null)throw Error("Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue.");ml()}return i=o.flags,i&65536?(o.flags=i&-65537|128,(o.mode&me)!==te&&Dc(o),o):null;case 13:if(ri(o),i=o.memoizedState,i!==null&&i.dehydrated!==null){if(o.alternate===null)throw Error("Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue.");ml()}return i=o.flags,i&65536?(o.flags=i&-65537|128,(o.mode&me)!==te&&Dc(o),o):null;case 19:return lt(Wn,o),null;case 4:return V(o),null;case 10:return No(o.type,o),null;case 22:case 23:return ri(o),Bo(o),i!==null&<(dg,o),i=o.flags,i&65536?(o.flags=i&-65537|128,(o.mode&me)!==te&&Dc(o),o):null;case 24:return No(fi,o),null;case 25:return null;default:return null}}function iv(i,o){switch(qp(o),o.tag){case 3:No(fi,o),V(o);break;case 26:case 27:case 5:yt(o);break;case 4:V(o);break;case 31:o.memoizedState!==null&&ri(o);break;case 13:ri(o);break;case 19:lt(Wn,o);break;case 10:No(o.type,o);break;case 22:case 23:ri(o),Bo(o),i!==null&<(dg,o);break;case 24:No(fi,o)}}function Nr(i){return(i.mode&me)!==te}function yw(i,o){Nr(i)?(Dn(),La(o,i),Ji()):La(o,i)}function bm(i,o,c){Nr(i)?(Dn(),Rl(c,i,o),Ji()):Rl(c,i,o)}function La(i,o){try{var c=o.updateQueue,g=c!==null?c.lastEffect:null;if(g!==null){var b=g.next;c=b;do{if((c.tag&i)===i&&(g=void 0,(i&Fs)!==NC&&(Py=!0),g=Lt(o,YW,c),(i&Fs)!==NC&&(Py=!1),g!==void 0&&typeof g!="function")){var v=void 0;v=c.tag&Ko?"useLayoutEffect":c.tag&Fs?"useInsertionEffect":"useEffect";var A=void 0;A=g===null?" You returned null. If your effect does not require clean up, return undefined (or nothing).":typeof g.then=="function"?`
|
|
1136
|
+
|
|
1137
|
+
It looks like you wrote `+v+`(async () => ...) or returned a Promise. Instead, write the async function inside your effect and call it immediately:
|
|
1138
|
+
|
|
1139
|
+
`+v+`(() => {
|
|
1140
|
+
async function fetchData() {
|
|
1141
|
+
// You can await here
|
|
1142
|
+
const response = await MyAPI.getData(someId);
|
|
1143
|
+
// ...
|
|
1144
|
+
}
|
|
1145
|
+
fetchData();
|
|
1146
|
+
}, [someId]); // Or [] if effect doesn't need props or state
|
|
1147
|
+
|
|
1148
|
+
Learn more about data fetching with Hooks: https://react.dev/link/hooks-data-fetching`:" You returned: "+g,Lt(o,function(O,j){console.error("%s must not return anything besides a function, which is used for clean-up.%s",O,j)},v,A)}c=c.next}while(c!==b)}}catch(O){he(o,o.return,O)}}function Rl(i,o,c){try{var g=o.updateQueue,b=g!==null?g.lastEffect:null;if(b!==null){var v=b.next;g=v;do{if((g.tag&i)===i){var A=g.inst,O=A.destroy;O!==void 0&&(A.destroy=void 0,(i&Fs)!==NC&&(Py=!0),b=o,Lt(b,XW,b,c,O),(i&Fs)!==NC&&(Py=!1))}g=g.next}while(g!==v)}}catch(j){he(o,o.return,j)}}function Od(i,o){Nr(i)?(Dn(),La(o,i),Ji()):La(o,i)}function vm(i,o,c){Nr(i)?(Dn(),Rl(c,i,o),Ji()):Rl(c,i,o)}function sv(i){var o=i.updateQueue;if(o!==null){var c=i.stateNode;i.type.defaultProps||"ref"in i.memoizedProps||Ny||(c.props!==i.memoizedProps&&console.error("Expected %s props to match memoized props before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",F(i)||"instance"),c.state!==i.memoizedState&&console.error("Expected %s state to match memoized state before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",F(i)||"instance"));try{Lt(i,lf,o,c)}catch(g){he(i,i.return,g)}}}function Dd(i,o,c){return i.getSnapshotBeforeUpdate(o,c)}function bw(i,o){var c=o.memoizedProps,g=o.memoizedState;o=i.stateNode,i.type.defaultProps||"ref"in i.memoizedProps||Ny||(o.props!==i.memoizedProps&&console.error("Expected %s props to match memoized props before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",F(i)||"instance"),o.state!==i.memoizedState&&console.error("Expected %s state to match memoized state before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",F(i)||"instance"));try{var b=Rr(i.type,c),v=Lt(i,Dd,o,b,g);c=H_,v!==void 0||c.has(i.type)||(c.add(i.type),Lt(i,function(){console.error("%s.getSnapshotBeforeUpdate(): A snapshot value (or null) must be returned. You have returned undefined.",F(i))})),o.__reactInternalSnapshotBeforeUpdate=v}catch(A){he(i,i.return,A)}}function xm(i,o,c){c.props=Rr(i.type,i.memoizedProps),c.state=i.memoizedState,Nr(i)?(Dn(),Lt(i,s_,i,o,c),Ji()):Lt(i,s_,i,o,c)}function vw(i){var o=i.ref;if(o!==null){switch(i.tag){case 26:case 27:case 5:var c=i.stateNode;break;case 30:c=i.stateNode;break;default:c=i.stateNode}if(typeof o=="function")if(Nr(i))try{Dn(),i.refCleanup=o(c)}finally{Ji()}else i.refCleanup=o(c);else typeof o=="string"?console.error("String refs are no longer supported."):o.hasOwnProperty("current")||console.error("Unexpected ref object provided for %s. Use either a ref-setter function or React.createRef().",F(i)),o.current=c}}function qc(i,o){try{Lt(i,vw,i)}catch(c){he(i,o,c)}}function uo(i,o){var c=i.ref,g=i.refCleanup;if(c!==null)if(typeof g=="function")try{if(Nr(i))try{Dn(),Lt(i,g)}finally{Ji(i)}else Lt(i,g)}catch(b){he(i,o,b)}finally{i.refCleanup=null,i=i.alternate,i!=null&&(i.refCleanup=null)}else if(typeof c=="function")try{if(Nr(i))try{Dn(),Lt(i,c,null)}finally{Ji(i)}else Lt(i,c,null)}catch(b){he(i,o,b)}else c.current=null}function ov(i,o,c,g){var b=i.memoizedProps,v=b.id,A=b.onCommit;b=b.onRender,o=o===null?"mount":"update",TC&&(o="nested-update"),typeof b=="function"&&b(v,o,i.actualDuration,i.treeBaseDuration,i.actualStartTime,c),typeof A=="function"&&A(v,o,g,c)}function xw(i,o,c,g){var b=i.memoizedProps;i=b.id,b=b.onPostCommit,o=o===null?"mount":"update",TC&&(o="nested-update"),typeof b=="function"&&b(i,o,g,c)}function zl(i){var o=i.type,c=i.memoizedProps,g=i.stateNode;try{Lt(i,Lw,g,o,c,i)}catch(b){he(i,i.return,b)}}function Sm(i,o,c){try{Lt(i,Vm,i.stateNode,i.type,c,o,i)}catch(g){he(i,i.return,g)}}function rv(i){return i.tag===5||i.tag===3||i.tag===26||i.tag===27&&Ul(i.type)||i.tag===4}function wm(i){t:for(;;){for(;i.sibling===null;){if(i.return===null||rv(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.tag===27&&Ul(i.type)||i.flags&2||i.child===null||i.tag===4)continue t;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function Sf(i,o,c){var g=i.tag;if(g===5||g===6)i=i.stateNode,o?(_w(c),(c.nodeType===9?c.body:c.nodeName==="HTML"?c.ownerDocument.body:c).insertBefore(i,o)):(_w(c),o=c.nodeType===9?c.body:c.nodeName==="HTML"?c.ownerDocument.body:c,o.appendChild(i),c=c._reactRootContainer,c!=null||o.onclick!==null||(o.onclick=no));else if(g!==4&&(g===27&&Ul(i.type)&&(c=i.stateNode,o=null),i=i.child,i!==null))for(Sf(i,o,c),i=i.sibling;i!==null;)Sf(i,o,c),i=i.sibling}function Rd(i,o,c){var g=i.tag;if(g===5||g===6)i=i.stateNode,o?c.insertBefore(i,o):c.appendChild(i);else if(g!==4&&(g===27&&Ul(i.type)&&(c=i.stateNode),i=i.child,i!==null))for(Rd(i,o,c),i=i.sibling;i!==null;)Rd(i,o,c),i=i.sibling}function av(i){for(var o,c=i.return;c!==null;){if(rv(c)){o=c;break}c=c.return}if(o==null)throw Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.");switch(o.tag){case 27:o=o.stateNode,c=wm(i),Rd(i,c,o);break;case 5:c=o.stateNode,o.flags&32&&(Gm(c),o.flags&=-33),o=wm(i),Rd(i,o,c);break;case 3:case 4:o=o.stateNode.containerInfo,c=wm(i),Sf(i,c,o);break;default:throw Error("Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue.")}}function lv(i){var o=i.stateNode,c=i.memoizedProps;try{Lt(i,kr,i.type,c,o,i)}catch(g){he(i,i.return,g)}}function cv(i,o){return o.tag===31?(o=o.memoizedState,i.memoizedState!==null&&o===null):o.tag===13?(i=i.memoizedState,o=o.memoizedState,i!==null&&i.dehydrated!==null&&(o===null||o.dehydrated===null)):o.tag===3?i.memoizedState.isDehydrated&&(o.flags&256)===0:!1}function gM(i,o){if(i=i.containerInfo,E2=rE,i=Pp(i),m0(i)){if("selectionStart"in i)var c={start:i.selectionStart,end:i.selectionEnd};else t:{c=(c=i.ownerDocument)&&c.defaultView||window;var g=c.getSelection&&c.getSelection();if(g&&g.rangeCount!==0){c=g.anchorNode;var b=g.anchorOffset,v=g.focusNode;g=g.focusOffset;try{c.nodeType,v.nodeType}catch{c=null;break t}var A=0,O=-1,j=-1,B=0,et=0,st=i,I=null;e:for(;;){for(var ht;st!==c||b!==0&&st.nodeType!==3||(O=A+b),st!==v||g!==0&&st.nodeType!==3||(j=A+g),st.nodeType===3&&(A+=st.nodeValue.length),(ht=st.firstChild)!==null;)I=st,st=ht;for(;;){if(st===i)break e;if(I===c&&++B===b&&(O=A),I===v&&++et===g&&(j=A),(ht=st.nextSibling)!==null)break;st=I,I=st.parentNode}st=ht}c=O===-1||j===-1?null:{start:O,end:j}}else c=null}c=c||{start:0,end:0}}else c=null;for(A2={focusedElem:i,selectionRange:c},rE=!1,ki=o;ki!==null;)if(o=ki,i=o.child,(o.subtreeFlags&1028)!==0&&i!==null)i.return=o,ki=i;else for(;ki!==null;){switch(i=o=ki,c=i.alternate,b=i.flags,i.tag){case 0:if(b&4&&(i=i.updateQueue,i=i!==null?i.events:null,i!==null))for(c=0;c<i.length;c++)b=i[c],b.ref.impl=b.nextImpl;break;case 11:case 15:break;case 1:b&1024&&c!==null&&bw(i,c);break;case 3:if(b&1024){if(i=i.stateNode.containerInfo,c=i.nodeType,c===9)jf(i);else if(c===1)switch(i.nodeName){case"HEAD":case"HTML":case"BODY":jf(i);break;default:i.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(b&1024)throw Error("This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.")}if(i=o.sibling,i!==null){i.return=o.return,ki=i;break}ki=o.return}}function Cm(i,o,c){var g=gn(),b=ro(),v=Ls(),A=ao(),O=c.flags;switch(c.tag){case 0:case 11:case 15:ks(i,c),O&4&&yw(c,Ko|Wr);break;case 1:if(ks(i,c),O&4)if(i=c.stateNode,o===null)c.type.defaultProps||"ref"in c.memoizedProps||Ny||(i.props!==c.memoizedProps&&console.error("Expected %s props to match memoized props before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",F(c)||"instance"),i.state!==c.memoizedState&&console.error("Expected %s state to match memoized state before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",F(c)||"instance")),Nr(c)?(Dn(),Lt(c,XM,c,i),Ji()):Lt(c,XM,c,i);else{var j=Rr(c.type,o.memoizedProps);o=o.memoizedState,c.type.defaultProps||"ref"in c.memoizedProps||Ny||(i.props!==c.memoizedProps&&console.error("Expected %s props to match memoized props before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",F(c)||"instance"),i.state!==c.memoizedState&&console.error("Expected %s state to match memoized state before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",F(c)||"instance")),Nr(c)?(Dn(),Lt(c,e_,c,i,j,o,i.__reactInternalSnapshotBeforeUpdate),Ji()):Lt(c,e_,c,i,j,o,i.__reactInternalSnapshotBeforeUpdate)}O&64&&sv(c),O&512&&qc(c,c.return);break;case 3:if(o=Sr(),ks(i,c),O&64&&(O=c.updateQueue,O!==null)){if(j=null,c.child!==null)switch(c.child.tag){case 27:case 5:j=c.child.stateNode;break;case 1:j=c.child.stateNode}try{Lt(c,lf,O,j)}catch(et){he(c,c.return,et)}}i.effectDuration+=sf(o);break;case 27:o===null&&O&4&&lv(c);case 26:case 5:if(ks(i,c),o===null){if(O&4)zl(c);else if(O&64){i=c.type,o=c.memoizedProps,j=c.stateNode;try{Lt(c,jw,j,i,o,c)}catch(et){he(c,c.return,et)}}}O&512&&qc(c,c.return);break;case 12:if(O&4){O=Sr(),ks(i,c),i=c.stateNode,i.effectDuration+=Fi(O);try{Lt(c,ov,c,o,ih,i.effectDuration)}catch(et){he(c,c.return,et)}}else ks(i,c);break;case 31:ks(i,c),O&4&&fv(i,c);break;case 13:ks(i,c),O&4&&hv(i,c),O&64&&(i=c.memoizedState,i!==null&&(i=i.dehydrated,i!==null&&(O=_a.bind(null,c),Xw(i,O))));break;case 22:if(O=c.memoizedState!==null||mu,!O){o=o!==null&&o.memoizedState!==null||pi,j=mu;var B=pi;mu=O,(pi=o)&&!B?(ko(i,c,(c.subtreeFlags&8772)!==0),(c.mode&me)!==te&&0<=Qt&&0<=Kt&&.05<Kt-Qt&&Up(c,Qt,Kt)):ks(i,c),mu=j,pi=B}break;case 30:break;default:ks(i,c)}(c.mode&me)!==te&&0<=Qt&&0<=Kt&&((kn||.05<Nn)&&Ro(c,Qt,Kt,Nn,Tn),c.alternate===null&&c.return!==null&&c.return.alternate!==null&&.05<Kt-Qt&&(cv(c.return.alternate,c.return)||io(c,Qt,Kt,"Mount"))),si(g),Ns(b),Tn=v,kn=A}function Un(i){var o=i.alternate;o!==null&&(i.alternate=null,Un(o)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(o=i.stateNode,o!==null&&e0(o)),i.stateNode=null,i._debugOwner=null,i.return=null,i.dependencies=null,i.memoizedProps=null,i.memoizedState=null,i.pendingProps=null,i.stateNode=null,i.updateQueue=null}function un(i,o,c){for(c=c.child;c!==null;)uv(i,o,c),c=c.sibling}function uv(i,o,c){if(Jn&&typeof Jn.onCommitFiberUnmount=="function")try{Jn.onCommitFiberUnmount(iu,c)}catch(B){Gr||(Gr=!0,console.error("React instrumentation encountered an error: %o",B))}var g=gn(),b=ro(),v=Ls(),A=ao();switch(c.tag){case 26:pi||uo(c,o),un(i,o,c),c.memoizedState?c.memoizedState.count--:c.stateNode&&(i=c.stateNode,i.parentNode.removeChild(i));break;case 27:pi||uo(c,o);var O=mi,j=mo;Ul(c.type)&&(mi=c.stateNode,mo=!1),un(i,o,c),Lt(c,Ha,c.stateNode),mi=O,mo=j;break;case 5:pi||uo(c,o);case 6:if(O=mi,j=mo,mi=null,un(i,o,c),mi=O,mo=j,mi!==null)if(mo)try{Lt(c,Pw,mi,c.stateNode)}catch(B){he(c,o,B)}else try{Lt(c,Bw,mi,c.stateNode)}catch(B){he(c,o,B)}break;case 18:mi!==null&&(mo?(i=mi,Qc(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,c.stateNode),Wc(i)):Qc(mi,c.stateNode));break;case 4:O=mi,j=mo,mi=c.stateNode.containerInfo,mo=!0,un(i,o,c),mi=O,mo=j;break;case 0:case 11:case 14:case 15:Rl(Fs,c,o),pi||bm(c,o,Ko),un(i,o,c);break;case 1:pi||(uo(c,o),O=c.stateNode,typeof O.componentWillUnmount=="function"&&xm(c,o,O)),un(i,o,c);break;case 21:un(i,o,c);break;case 22:pi=(O=pi)||c.memoizedState!==null,un(i,o,c),pi=O;break;default:un(i,o,c)}(c.mode&me)!==te&&0<=Qt&&0<=Kt&&(kn||.05<Nn)&&Ro(c,Qt,Kt,Nn,Tn),si(g),Ns(b),Tn=v,kn=A}function fv(i,o){if(o.memoizedState===null&&(i=o.alternate,i!==null&&(i=i.memoizedState,i!==null))){i=i.dehydrated;try{Lt(o,$m,i)}catch(c){he(o,o.return,c)}}}function hv(i,o){if(o.memoizedState===null&&(i=o.alternate,i!==null&&(i=i.memoizedState,i!==null&&(i=i.dehydrated,i!==null))))try{Lt(o,Lv,i)}catch(c){he(o,o.return,c)}}function Sw(i){switch(i.tag){case 31:case 13:case 19:var o=i.stateNode;return o===null&&(o=i.stateNode=new k_),o;case 22:return i=i.stateNode,o=i._retryCache,o===null&&(o=i._retryCache=new k_),o;default:throw Error("Unexpected Suspense handler tag ("+i.tag+"). This is a bug in React.")}}function Nl(i,o){var c=Sw(i);o.forEach(function(g){if(!c.has(g)){if(c.add(g),$r)if(Ly!==null&&jy!==null)Mf(jy,Ly);else throw Error("Expected finished root and lanes to be set. This is a bug in React.");var b=Ic.bind(null,i,g);g.then(b,b)}})}function ns(i,o){var c=o.deletions;if(c!==null)for(var g=0;g<c.length;g++){var b=i,v=o,A=c[g],O=gn(),j=v;t:for(;j!==null;){switch(j.tag){case 27:if(Ul(j.type)){mi=j.stateNode,mo=!1;break t}break;case 5:mi=j.stateNode,mo=!1;break t;case 3:case 4:mi=j.stateNode.containerInfo,mo=!0;break t}j=j.return}if(mi===null)throw Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.");uv(b,v,A),mi=null,mo=!1,(A.mode&me)!==te&&0<=Qt&&0<=Kt&&.05<Kt-Qt&&io(A,Qt,Kt,"Unmount"),si(O),b=A,v=b.alternate,v!==null&&(v.return=null),b.return=null}if(o.subtreeFlags&13886)for(o=o.child;o!==null;)zd(o,i),o=o.sibling}function zd(i,o){var c=gn(),g=ro(),b=Ls(),v=ao(),A=i.alternate,O=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:ns(o,i),is(i),O&4&&(Rl(Fs|Wr,i,i.return),La(Fs|Wr,i),bm(i,i.return,Ko|Wr));break;case 1:if(ns(o,i),is(i),O&512&&(pi||A===null||uo(A,A.return)),O&64&&mu&&(O=i.updateQueue,O!==null&&(A=O.callbacks,A!==null))){var j=O.shared.hiddenCallbacks;O.shared.hiddenCallbacks=j===null?A:j.concat(A)}break;case 26:if(j=Ya,ns(o,i),is(i),O&512&&(pi||A===null||uo(A,A.return)),O&4){var B=A!==null?A.memoizedState:null;if(O=i.memoizedState,A===null)if(O===null)if(i.stateNode===null){t:{O=i.type,A=i.memoizedProps,j=j.ownerDocument||j;e:switch(O){case"title":B=j.getElementsByTagName("title")[0],(!B||B[Qf]||B[yn]||B.namespaceURI===de||B.hasAttribute("itemprop"))&&(B=j.createElement(O),j.head.insertBefore(B,j.querySelector("head > title"))),mn(B,O,A),B[yn]=i,jn(B),O=B;break t;case"link":var et=Pf("link","href",j).get(O+(A.href||""));if(et){for(var st=0;st<et.length;st++)if(B=et[st],B.getAttribute("href")===(A.href==null||A.href===""?null:A.href)&&B.getAttribute("rel")===(A.rel==null?null:A.rel)&&B.getAttribute("title")===(A.title==null?null:A.title)&&B.getAttribute("crossorigin")===(A.crossOrigin==null?null:A.crossOrigin)){et.splice(st,1);break e}}B=j.createElement(O),mn(B,O,A),j.head.appendChild(B);break;case"meta":if(et=Pf("meta","content",j).get(O+(A.content||""))){for(st=0;st<et.length;st++)if(B=et[st],qe(A.content,"content"),B.getAttribute("content")===(A.content==null?null:""+A.content)&&B.getAttribute("name")===(A.name==null?null:A.name)&&B.getAttribute("property")===(A.property==null?null:A.property)&&B.getAttribute("http-equiv")===(A.httpEquiv==null?null:A.httpEquiv)&&B.getAttribute("charset")===(A.charSet==null?null:A.charSet)){et.splice(st,1);break e}}B=j.createElement(O),mn(B,O,A),j.head.appendChild(B);break;default:throw Error('getNodesForType encountered a type it did not expect: "'+O+'". This is a bug in React.')}B[yn]=i,jn(B),O=B}i.stateNode=O}else Fw(j,i.type,i.stateNode);else i.stateNode=Xm(j,O,i.memoizedProps);else B!==O?(B===null?A.stateNode!==null&&(A=A.stateNode,A.parentNode.removeChild(A)):B.count--,O===null?Fw(j,i.type,i.stateNode):Xm(j,O,i.memoizedProps)):O===null&&i.stateNode!==null&&Sm(i,i.memoizedProps,A.memoizedProps)}break;case 27:ns(o,i),is(i),O&512&&(pi||A===null||uo(A,A.return)),A!==null&&O&4&&Sm(i,i.memoizedProps,A.memoizedProps);break;case 5:if(ns(o,i),is(i),O&512&&(pi||A===null||uo(A,A.return)),i.flags&32){j=i.stateNode;try{Lt(i,Gm,j)}catch(Bt){he(i,i.return,Bt)}}O&4&&i.stateNode!=null&&(j=i.memoizedProps,Sm(i,j,A!==null?A.memoizedProps:j)),O&1024&&(o2=!0,i.type!=="form"&&console.error("Unexpected host component type. Expected a form. This is a bug in React."));break;case 6:if(ns(o,i),is(i),O&4){if(i.stateNode===null)throw Error("This should have a text node initialized. This error is likely caused by a bug in React. Please file an issue.");O=i.memoizedProps,A=A!==null?A.memoizedProps:O,j=i.stateNode;try{Lt(i,pM,j,A,O)}catch(Bt){he(i,i.return,Bt)}}break;case 3:if(j=Sr(),iE=null,B=Ya,Ya=qm(o.containerInfo),ns(o,i),Ya=B,is(i),O&4&&A!==null&&A.memoizedState.isDehydrated)try{Lt(i,Nv,o.containerInfo)}catch(Bt){he(i,i.return,Bt)}o2&&(o2=!1,ww(i)),o.effectDuration+=sf(j);break;case 4:O=Ya,Ya=qm(i.stateNode.containerInfo),ns(o,i),is(i),Ya=O;break;case 12:O=Sr(),ns(o,i),is(i),i.stateNode.effectDuration+=Fi(O);break;case 31:ns(o,i),is(i),O&4&&(O=i.updateQueue,O!==null&&(i.updateQueue=null,Nl(i,O)));break;case 13:ns(o,i),is(i),i.child.flags&8192&&i.memoizedState!==null!=(A!==null&&A.memoizedState!==null)&&(GC=ui()),O&4&&(O=i.updateQueue,O!==null&&(i.updateQueue=null,Nl(i,O)));break;case 22:j=i.memoizedState!==null;var I=A!==null&&A.memoizedState!==null,ht=mu,Nt=pi;if(mu=ht||j,pi=Nt||I,ns(o,i),pi=Nt,mu=ht,I&&!j&&!ht&&!Nt&&(i.mode&me)!==te&&0<=Qt&&0<=Kt&&.05<Kt-Qt&&Up(i,Qt,Kt),is(i),O&8192)t:for(o=i.stateNode,o._visibility=j?o._visibility&~gx:o._visibility|gx,!j||A===null||I||mu||pi||(Ll(i),(i.mode&me)!==te&&0<=Qt&&0<=Kt&&.05<Kt-Qt&&io(i,Qt,Kt,"Disconnect")),A=null,o=i;;){if(o.tag===5||o.tag===26){if(A===null){I=A=o;try{B=I.stateNode,j?Lt(I,Hw,B):Lt(I,Gw,I.stateNode,I.memoizedProps)}catch(Bt){he(I,I.return,Bt)}}}else if(o.tag===6){if(A===null){I=o;try{et=I.stateNode,j?Lt(I,kw,et):Lt(I,$w,et,I.memoizedProps)}catch(Bt){he(I,I.return,Bt)}}}else if(o.tag===18){if(A===null){I=o;try{st=I.stateNode,j?Lt(I,Uw,st):Lt(I,Vw,I.stateNode)}catch(Bt){he(I,I.return,Bt)}}}else if((o.tag!==22&&o.tag!==23||o.memoizedState===null||o===i)&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===i)break t;for(;o.sibling===null;){if(o.return===null||o.return===i)break t;A===o&&(A=null),o=o.return}A===o&&(A=null),o.sibling.return=o.return,o=o.sibling}O&4&&(O=i.updateQueue,O!==null&&(A=O.retryQueue,A!==null&&(O.retryQueue=null,Nl(i,A))));break;case 19:ns(o,i),is(i),O&4&&(O=i.updateQueue,O!==null&&(i.updateQueue=null,Nl(i,O)));break;case 30:break;case 21:break;default:ns(o,i),is(i)}(i.mode&me)!==te&&0<=Qt&&0<=Kt&&((kn||.05<Nn)&&Ro(i,Qt,Kt,Nn,Tn),i.alternate===null&&i.return!==null&&i.return.alternate!==null&&.05<Kt-Qt&&(cv(i.return.alternate,i.return)||io(i,Qt,Kt,"Mount"))),si(c),Ns(g),Tn=b,kn=v}function is(i){var o=i.flags;if(o&2){try{Lt(i,av,i)}catch(c){he(i,i.return,c)}i.flags&=-3}o&4096&&(i.flags&=-4097)}function ww(i){if(i.subtreeFlags&1024)for(i=i.child;i!==null;){var o=i;ww(o),o.tag===5&&o.flags&1024&&o.stateNode.reset(),i=i.sibling}}function ks(i,o){if(o.subtreeFlags&8772)for(o=o.child;o!==null;)Cm(i,o.alternate,o),o=o.sibling}function Em(i){var o=gn(),c=ro(),g=Ls(),b=ao();switch(i.tag){case 0:case 11:case 14:case 15:bm(i,i.return,Ko),Ll(i);break;case 1:uo(i,i.return);var v=i.stateNode;typeof v.componentWillUnmount=="function"&&xm(i,i.return,v),Ll(i);break;case 27:Lt(i,Ha,i.stateNode);case 26:case 5:uo(i,i.return),Ll(i);break;case 22:i.memoizedState===null&&Ll(i);break;case 30:Ll(i);break;default:Ll(i)}(i.mode&me)!==te&&0<=Qt&&0<=Kt&&(kn||.05<Nn)&&Ro(i,Qt,Kt,Nn,Tn),si(o),Ns(c),Tn=g,kn=b}function Ll(i){for(i=i.child;i!==null;)Em(i),i=i.sibling}function dv(i,o,c,g){var b=gn(),v=ro(),A=Ls(),O=ao(),j=c.flags;switch(c.tag){case 0:case 11:case 15:ko(i,c,g),yw(c,Ko);break;case 1:if(ko(i,c,g),o=c.stateNode,typeof o.componentDidMount=="function"&&Lt(c,XM,c,o),o=c.updateQueue,o!==null){i=c.stateNode;try{Lt(c,j0,o,i)}catch(B){he(c,c.return,B)}}g&&j&64&&sv(c),qc(c,c.return);break;case 27:lv(c);case 26:case 5:ko(i,c,g),g&&o===null&&j&4&&zl(c),qc(c,c.return);break;case 12:if(g&&j&4){j=Sr(),ko(i,c,g),g=c.stateNode,g.effectDuration+=Fi(j);try{Lt(c,ov,c,o,ih,g.effectDuration)}catch(B){he(c,c.return,B)}}else ko(i,c,g);break;case 31:ko(i,c,g),g&&j&4&&fv(i,c);break;case 13:ko(i,c,g),g&&j&4&&hv(i,c);break;case 22:c.memoizedState===null&&ko(i,c,g),qc(c,c.return);break;case 30:break;default:ko(i,c,g)}(c.mode&me)!==te&&0<=Qt&&0<=Kt&&(kn||.05<Nn)&&Ro(c,Qt,Kt,Nn,Tn),si(b),Ns(v),Tn=A,kn=O}function ko(i,o,c){for(c=c&&(o.subtreeFlags&8772)!==0,o=o.child;o!==null;)dv(i,o.alternate,o,c),o=o.sibling}function Nd(i,o){var c=null;i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(c=i.memoizedState.cachePool.pool),i=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(i=o.memoizedState.cachePool.pool),i!==c&&(i!=null&&Mc(i),c!=null&&sd(c))}function Ld(i,o){i=null,o.alternate!==null&&(i=o.alternate.memoizedState.cache),o=o.memoizedState.cache,o!==i&&(Mc(o),i!=null&&sd(i))}function Vs(i,o,c,g,b){if(o.subtreeFlags&10256||o.actualDuration!==0&&(o.alternate===null||o.alternate.child!==o.child))for(o=o.child;o!==null;){var v=o.sibling;gv(i,o,c,g,v!==null?v.actualStartTime:b),o=v}}function gv(i,o,c,g,b){var v=gn(),A=ro(),O=Ls(),j=ao(),B=Wf,et=o.flags;switch(o.tag){case 0:case 11:case 15:(o.mode&me)!==te&&0<o.actualStartTime&&o.flags&1&&Hp(o,o.actualStartTime,b,Ti,c),Vs(i,o,c,g,b),et&2048&&Od(o,Js|Wr);break;case 1:(o.mode&me)!==te&&0<o.actualStartTime&&(o.flags&128?b0(o,o.actualStartTime,b,[]):o.flags&1&&Hp(o,o.actualStartTime,b,Ti,c)),Vs(i,o,c,g,b);break;case 3:var st=Sr(),I=Ti;Ti=o.alternate!==null&&o.alternate.memoizedState.isDehydrated&&(o.flags&256)===0,Vs(i,o,c,g,b),Ti=I,et&2048&&(c=null,o.alternate!==null&&(c=o.alternate.memoizedState.cache),g=o.memoizedState.cache,g!==c&&(Mc(g),c!=null&&sd(c))),i.passiveEffectDuration+=sf(st);break;case 12:if(et&2048){et=Sr(),Vs(i,o,c,g,b),i=o.stateNode,i.passiveEffectDuration+=Fi(et);try{Lt(o,xw,o,o.alternate,ih,i.passiveEffectDuration)}catch(ht){he(o,o.return,ht)}}else Vs(i,o,c,g,b);break;case 31:et=Ti,st=o.alternate!==null?o.alternate.memoizedState:null,I=o.memoizedState,st!==null&&I===null?(I=o.deletions,I!==null&&0<I.length&&I[0].tag===18?(Ti=!1,st=st.hydrationErrors,st!==null&&b0(o,o.actualStartTime,b,st)):Ti=!0):Ti=!1,Vs(i,o,c,g,b),Ti=et;break;case 13:et=Ti,st=o.alternate!==null?o.alternate.memoizedState:null,I=o.memoizedState,st===null||st.dehydrated===null||I!==null&&I.dehydrated!==null?Ti=!1:(I=o.deletions,I!==null&&0<I.length&&I[0].tag===18?(Ti=!1,st=st.hydrationErrors,st!==null&&b0(o,o.actualStartTime,b,st)):Ti=!0),Vs(i,o,c,g,b),Ti=et;break;case 23:break;case 22:I=o.stateNode,st=o.alternate,o.memoizedState!==null?I._visibility&ru?Vs(i,o,c,g,b):Yc(i,o,c,g,b):I._visibility&ru?Vs(i,o,c,g,b):(I._visibility|=ru,jl(i,o,c,g,(o.subtreeFlags&10256)!==0||o.actualDuration!==0&&(o.alternate===null||o.alternate.child!==o.child),b),(o.mode&me)===te||Ti||(i=o.actualStartTime,0<=i&&.05<b-i&&Up(o,i,b),0<=Qt&&0<=Kt&&.05<Kt-Qt&&Up(o,Qt,Kt))),et&2048&&Nd(st,o);break;case 24:Vs(i,o,c,g,b),et&2048&&Ld(o.alternate,o);break;default:Vs(i,o,c,g,b)}(o.mode&me)!==te&&((i=!Ti&&o.alternate===null&&o.return!==null&&o.return.alternate!==null)&&(c=o.actualStartTime,0<=c&&.05<b-c&&io(o,c,b,"Mount")),0<=Qt&&0<=Kt&&((kn||.05<Nn)&&Ro(o,Qt,Kt,Nn,Tn),i&&.05<Kt-Qt&&io(o,Qt,Kt,"Mount"))),si(v),Ns(A),Tn=O,kn=j,Wf=B}function jl(i,o,c,g,b,v){for(b=b&&((o.subtreeFlags&10256)!==0||o.actualDuration!==0&&(o.alternate===null||o.alternate.child!==o.child)),o=o.child;o!==null;){var A=o.sibling;jd(i,o,c,g,b,A!==null?A.actualStartTime:v),o=A}}function jd(i,o,c,g,b,v){var A=gn(),O=ro(),j=Ls(),B=ao(),et=Wf;b&&(o.mode&me)!==te&&0<o.actualStartTime&&o.flags&1&&Hp(o,o.actualStartTime,v,Ti,c);var st=o.flags;switch(o.tag){case 0:case 11:case 15:jl(i,o,c,g,b,v),Od(o,Js);break;case 23:break;case 22:var I=o.stateNode;o.memoizedState!==null?I._visibility&ru?jl(i,o,c,g,b,v):Yc(i,o,c,g,v):(I._visibility|=ru,jl(i,o,c,g,b,v)),b&&st&2048&&Nd(o.alternate,o);break;case 24:jl(i,o,c,g,b,v),b&&st&2048&&Ld(o.alternate,o);break;default:jl(i,o,c,g,b,v)}(o.mode&me)!==te&&0<=Qt&&0<=Kt&&(kn||.05<Nn)&&Ro(o,Qt,Kt,Nn,Tn),si(A),Ns(O),Tn=j,kn=B,Wf=et}function Yc(i,o,c,g,b){if(o.subtreeFlags&10256||o.actualDuration!==0&&(o.alternate===null||o.alternate.child!==o.child))for(var v=o.child;v!==null;){o=v.sibling;var A=i,O=c,j=g,B=o!==null?o.actualStartTime:b,et=Wf;(v.mode&me)!==te&&0<v.actualStartTime&&v.flags&1&&Hp(v,v.actualStartTime,B,Ti,O);var st=v.flags;switch(v.tag){case 22:Yc(A,v,O,j,B),st&2048&&Nd(v.alternate,v);break;case 24:Yc(A,v,O,j,B),st&2048&&Ld(v.alternate,v);break;default:Yc(A,v,O,j,B)}Wf=et,v=o}}function Xc(i,o,c){if(i.subtreeFlags&jx)for(i=i.child;i!==null;)Am(i,o,c),i=i.sibling}function Am(i,o,c){switch(i.tag){case 26:Xc(i,o,c),i.flags&jx&&i.memoizedState!==null&&Uv(c,Ya,i.memoizedState,i.memoizedProps);break;case 5:Xc(i,o,c);break;case 3:case 4:var g=Ya;Ya=qm(i.stateNode.containerInfo),Xc(i,o,c),Ya=g;break;case 22:i.memoizedState===null&&(g=i.alternate,g!==null&&g.memoizedState!==null?(g=jx,jx=16777216,Xc(i,o,c),jx=g):Xc(i,o,c));break;default:Xc(i,o,c)}}function pv(i){var o=i.alternate;if(o!==null&&(i=o.child,i!==null)){o.child=null;do o=i.sibling,i.sibling=null,i=o;while(i!==null)}}function Gs(i){var o=i.deletions;if(i.flags&16){if(o!==null)for(var c=0;c<o.length;c++){var g=o[c],b=gn();ki=g,Lr(g,i),(g.mode&me)!==te&&0<=Qt&&0<=Kt&&.05<Kt-Qt&&io(g,Qt,Kt,"Unmount"),si(b)}pv(i)}if(i.subtreeFlags&10256)for(i=i.child;i!==null;)Tm(i),i=i.sibling}function Tm(i){var o=gn(),c=ro(),g=Ls(),b=ao();switch(i.tag){case 0:case 11:case 15:Gs(i),i.flags&2048&&vm(i,i.return,Js|Wr);break;case 3:var v=Sr();Gs(i),i.stateNode.passiveEffectDuration+=sf(v);break;case 12:v=Sr(),Gs(i),i.stateNode.passiveEffectDuration+=Fi(v);break;case 22:v=i.stateNode,i.memoizedState!==null&&v._visibility&ru&&(i.return===null||i.return.tag!==13)?(v._visibility&=~ru,Mm(i),(i.mode&me)!==te&&0<=Qt&&0<=Kt&&.05<Kt-Qt&&io(i,Qt,Kt,"Disconnect")):Gs(i);break;default:Gs(i)}(i.mode&me)!==te&&0<=Qt&&0<=Kt&&(kn||.05<Nn)&&Ro(i,Qt,Kt,Nn,Tn),si(o),Ns(c),kn=b,Tn=g}function Mm(i){var o=i.deletions;if(i.flags&16){if(o!==null)for(var c=0;c<o.length;c++){var g=o[c],b=gn();ki=g,Lr(g,i),(g.mode&me)!==te&&0<=Qt&&0<=Kt&&.05<Kt-Qt&&io(g,Qt,Kt,"Unmount"),si(b)}pv(i)}for(i=i.child;i!==null;)mv(i),i=i.sibling}function mv(i){var o=gn(),c=ro(),g=Ls(),b=ao();switch(i.tag){case 0:case 11:case 15:vm(i,i.return,Js),Mm(i);break;case 22:var v=i.stateNode;v._visibility&ru&&(v._visibility&=~ru,Mm(i));break;default:Mm(i)}(i.mode&me)!==te&&0<=Qt&&0<=Kt&&(kn||.05<Nn)&&Ro(i,Qt,Kt,Nn,Tn),si(o),Ns(c),kn=b,Tn=g}function Lr(i,o){for(;ki!==null;){var c=ki,g=c,b=o,v=gn(),A=ro(),O=Ls(),j=ao();switch(g.tag){case 0:case 11:case 15:vm(g,b,Js);break;case 23:case 22:g.memoizedState!==null&&g.memoizedState.cachePool!==null&&(b=g.memoizedState.cachePool.pool,b!=null&&Mc(b));break;case 24:sd(g.memoizedState.cache)}if((g.mode&me)!==te&&0<=Qt&&0<=Kt&&(kn||.05<Nn)&&Ro(g,Qt,Kt,Nn,Tn),si(v),Ns(A),kn=j,Tn=O,g=c.child,g!==null)g.return=c,ki=g;else t:for(c=i;ki!==null;){if(g=ki,v=g.sibling,A=g.return,Un(g),g===c){ki=null;break t}if(v!==null){v.return=A,ki=v;break t}ki=A}}}function yv(){JW.forEach(function(i){return i()})}function bv(){var i=typeof IS_REACT_ACT_ENVIRONMENT<"u"?IS_REACT_ACT_ENVIRONMENT:void 0;return i||pt.actQueue===null||console.error("The current testing environment is not configured to support act(...)"),i}function Bi(i){if((_e&Mi)!==Vi&&be!==0)return be&-be;var o=pt.T;return o!==null?(o._updatedFibers||(o._updatedFibers=new Set),o._updatedFibers.add(i),Ov()):kS()}function wf(){if(bo===0)if(!(be&536870912)||Oe){var i=ig;ig<<=1,!(ig&3932160)&&(ig=262144),bo=i}else bo=536870912;return i=Jo.current,i!==null&&(i.flags|=32),bo}function ee(i,o,c){if(Py&&console.error("useInsertionEffect must not schedule updates."),m2&&(XC=!0),(i===cn&&(en===vg||en===xg)||i.cancelPendingCommit!==null)&&(jr(i,0),fo(i,be,bo,!1)),al(i,c),(_e&Mi)!==Vi&&i===cn){if(Vr)switch(o.tag){case 0:case 11:case 15:i=Se&&F(Se)||"Unknown",eB.has(i)||(eB.add(i),o=F(o)||"Unknown",console.error("Cannot update a component (`%s`) while rendering a different component (`%s`). To locate the bad setState() call inside `%s`, follow the stack trace as described in https://react.dev/link/setstate-in-render",o,i,i));break;case 1:tB||(console.error("Cannot update during an existing state transition (such as within `render`). Render methods should be a pure function of props and state."),tB=!0)}}else $r&&ds(i,o,c),Ud(o),i===cn&&((_e&Mi)===Vi&&(fh|=c),Ln===lh&&fo(i,be,bo,!1)),ys(i)}function Cw(i,o,c){if((_e&(Mi|Wo))!==Vi)throw Error("Should not already be working.");if(be!==0&&Se!==null){var g=Se,b=ui();switch(Ij){case Px:case vg:var v=xx;bn&&((g=g._debugTask)?g.run(console.timeStamp.bind(console,"Suspended",v,b,Yr,void 0,"primary-light")):console.timeStamp("Suspended",v,b,Yr,void 0,"primary-light"));break;case xg:v=xx,bn&&((g=g._debugTask)?g.run(console.timeStamp.bind(console,"Action",v,b,Yr,void 0,"primary-light")):console.timeStamp("Action",v,b,Yr,void 0,"primary-light"));break;default:bn&&(g=b-xx,3>g||console.timeStamp("Blocked",xx,b,Yr,void 0,5>g?"primary-light":10>g?"primary":100>g?"primary-dark":"error"))}}v=(c=!c&&(o&127)===0&&(o&i.expiredLanes)===0||Si(i,o))?ja(i,o):Af(i,o,!0);var A=c;do{if(v===yu){_y&&!c&&fo(i,o,0,!1),o=en,xx=hi(),Ij=o;break}else{if(g=ui(),b=i.current.alternate,A&&!Aw(b)){Do(o),b=Hi,v=g,!bn||v<=b||(Yn?Yn.run(console.timeStamp.bind(console,"Teared Render",b,v,Le,ze,"error")):console.timeStamp("Teared Render",b,v,Le,ze,"error")),_l(o,g),v=Af(i,o,!1),A=!1;continue}if(v===bg){if(A=o,i.errorRecoveryDisabledLanes&A)var O=0;else O=i.pendingLanes&-536870913,O=O!==0?O:O&536870912?536870912:0;if(O!==0){Do(o),v0(Hi,g,o,Yn),_l(o,g),o=O;t:{g=i,v=A,A=Hx;var j=g.current.memoizedState.isDehydrated;if(j&&(jr(g,O).flags|=256),O=Af(g,O,!1),O!==bg){if(l2&&!j){g.errorRecoveryDisabledLanes|=v,fh|=v,v=lh;break t}g=Ks,Ks=A,g!==null&&(Ks===null?Ks=g:Ks.push.apply(Ks,g))}v=O}if(A=!1,v!==bg)continue;g=ui()}}if(v===Bx){Do(o),v0(Hi,g,o,Yn),_l(o,g),jr(i,0),fo(i,o,0,!0);break}t:{switch(c=i,v){case yu:case Bx:throw Error("Root did not complete. This is a bug in React.");case lh:if((o&4194048)!==o)break;case UC:Do(o),WS(Hi,g,o,Yn),_l(o,g),b=o,b&127?CC=g:b&4194048&&(EC=g),fo(c,o,bo,!ch);break t;case bg:Ks=null;break;case PC:case V_:break;default:throw Error("Unknown root exit status.")}if(pt.actQueue!==null)rn(c,b,o,Ks,kx,VC,bo,fh,Sg,v,null,null,Hi,g);else{if((o&62914560)===o&&(A=GC+q_-ui(),10<A)){if(fo(c,o,bo,!ch),vp(c,0,!0)!==0)break t;Xa=o,c.timeoutHandle=cB(Ew.bind(null,c,b,Ks,kx,VC,o,bo,fh,Sg,ch,v,"Throttled",Hi,g),A);break t}Ew(c,b,Ks,kx,VC,o,bo,fh,Sg,ch,v,null,Hi,g)}}}break}while(!0);ys(i)}function Ew(i,o,c,g,b,v,A,O,j,B,et,st,I,ht){i.timeoutHandle=Tg;var Nt=o.subtreeFlags,Bt=null;if((Nt&8192||(Nt&16785408)===16785408)&&(Bt={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:no},Am(o,v,Bt),Nt=(v&62914560)===v?GC-ui():(v&4194048)===v?$_-ui():0,Nt=Im(Bt,Nt),Nt!==null)){Xa=v,i.cancelPendingCommit=Nt(rn.bind(null,i,o,v,c,g,b,A,O,j,et,Bt,Bt.waitingForViewTransition?"Waiting for the previous Animation":0<Bt.count?0<Bt.imgCount?"Suspended on CSS and Images":"Suspended on CSS":Bt.imgCount===1?"Suspended on an Image":0<Bt.imgCount?"Suspended on Images":null,I,ht)),fo(i,v,A,!B);return}rn(i,o,v,c,g,b,A,O,j,et,Bt,st,I,ht)}function Aw(i){for(var o=i;;){var c=o.tag;if((c===0||c===11||c===15)&&o.flags&16384&&(c=o.updateQueue,c!==null&&(c=c.stores,c!==null)))for(var g=0;g<c.length;g++){var b=c[g],v=b.getSnapshot;b=b.value;try{if(!Zs(v(),b))return!1}catch{return!1}}if(c=o.child,o.subtreeFlags&16384&&c!==null)c.return=o,o=c;else{if(o===i)break;for(;o.sibling===null;){if(o.return===null||o.return===i)return!0;o=o.return}o.sibling.return=o.return,o=o.sibling}}return!0}function fo(i,o,c,g){o&=~c2,o&=~fh,i.suspendedLanes|=o,i.pingedLanes&=~o,g&&(i.warmLanes|=o),g=i.expirationTimes;for(var b=o;0<b;){var v=31-Ei(b),A=1<<v;g[v]=-1,b&=~A}c!==0&&t0(i,c,o)}function $s(){return(_e&(Mi|Wo))===Vi?(Br(0),!1):!0}function Om(){if(Se!==null){if(en===yo)var i=Se.return;else i=Se,ef(),xl(i),Ty=null,Dx=0,i=Se;for(;i!==null;)iv(i.alternate,i),i=i.return;Se=null}}function _l(i,o){i&127&&(cg=o),i&4194048&&(fu=o),i&62914560&&(Yj=o),i&2080374784&&(Xj=o)}function jr(i,o){bn&&(console.timeStamp("Blocking Track",.003,.003,"Blocking",ze,"primary-light"),console.timeStamp("Transition Track",.003,.003,"Transition",ze,"primary-light"),console.timeStamp("Suspense Track",.003,.003,"Suspense",ze,"primary-light"),console.timeStamp("Idle Track",.003,.003,"Idle",ze,"primary-light"));var c=Hi;if(Hi=hi(),be!==0&&0<c){if(Do(be),Ln===PC||Ln===lh)WS(c,Hi,o,Yn);else{var g=Hi,b=Yn;if(bn&&!(g<=c)){var v=(o&738197653)===o?"tertiary-dark":"primary-dark",A=(o&536870912)===o?"Prewarm":(o&201326741)===o?"Interrupted Hydration":"Interrupted Render";b?b.run(console.timeStamp.bind(console,A,c,g,Le,ze,v)):console.timeStamp(A,c,g,Le,ze,v)}}_l(be,Hi)}if(c=Yn,Yn=null,o&127){Yn=yx,b=0<=Xl&&Xl<cg?cg:Xl,g=0<=ug&&ug<cg?cg:ug,v=0<=g?g:0<=b?b:Hi,0<=CC?(Do(2),tw(CC,v,o,c)):AC&127,c=b;var O=g,j=bx,B=0<Cy,et=sh===mx,st=sh===wC;if(b=Hi,g=yx,v=VM,A=GM,bn){if(Le="Blocking",0<c?c>b&&(c=b):c=b,0<O?O>c&&(O=c):O=c,j!==null&&c>O){var I=B?"secondary-light":"warning";g?g.run(console.timeStamp.bind(console,B?"Consecutive":"Event: "+j,O,c,Le,ze,I)):console.timeStamp(B?"Consecutive":"Event: "+j,O,c,Le,ze,I)}b>c&&(O=et?"error":(o&738197653)===o?"tertiary-light":"primary-light",et=st?"Promise Resolved":et?"Cascading Update":5<b-c?"Update Blocked":"Update",st=[],A!=null&&st.push(["Component name",A]),v!=null&&st.push(["Method name",v]),c={start:c,end:b,detail:{devtools:{properties:st,track:Le,trackGroup:ze,color:O}}},g?g.run(performance.measure.bind(performance,et,c)):performance.measure(et,c))}Xl=-1.1,sh=0,GM=VM=null,CC=-1.1,Cy=ug,ug=-1.1,cg=hi()}if(o&4194048&&(Yn=vx,b=0<=hu&&hu<fu?fu:hu,c=0<=Jr&&Jr<fu?fu:Jr,g=0<=oh&&oh<fu?fu:oh,v=0<=g?g:0<=c?c:Hi,0<=EC?(Do(256),tw(EC,v,o,Yn)):AC&4194048,st=g,O=fg,j=0<rh,B=$M===wC,v=Hi,g=vx,A=$j,et=qj,bn&&(Le="Transition",0<c?c>v&&(c=v):c=v,0<b?b>c&&(b=c):b=c,0<st?st>b&&(st=b):st=b,b>st&&O!==null&&(I=j?"secondary-light":"warning",g?g.run(console.timeStamp.bind(console,j?"Consecutive":"Event: "+O,st,b,Le,ze,I)):console.timeStamp(j?"Consecutive":"Event: "+O,st,b,Le,ze,I)),c>b&&(g?g.run(console.timeStamp.bind(console,"Action",b,c,Le,ze,"primary-dark")):console.timeStamp("Action",b,c,Le,ze,"primary-dark")),v>c&&(b=B?"Promise Resolved":5<v-c?"Update Blocked":"Update",st=[],et!=null&&st.push(["Component name",et]),A!=null&&st.push(["Method name",A]),c={start:c,end:v,detail:{devtools:{properties:st,track:Le,trackGroup:ze,color:"primary-light"}}},g?g.run(performance.measure.bind(performance,b,c)):performance.measure(b,c))),Jr=hu=-1.1,$M=0,EC=-1.1,rh=oh,oh=-1.1,fu=hi()),o&62914560&&AC&62914560&&(Do(4194304),x0(Yj,Hi)),o&2080374784&&AC&2080374784&&(Do(268435456),x0(Xj,Hi)),c=i.timeoutHandle,c!==Tg&&(i.timeoutHandle=Tg,utt(c)),c=i.cancelPendingCommit,c!==null&&(i.cancelPendingCommit=null,c()),Xa=0,Om(),cn=i,Se=c=vr(i.current,null),be=o,en=yo,tr=null,ch=!1,_y=Si(i,o),l2=!1,Ln=yu,Sg=bo=c2=fh=uh=0,Ks=Hx=null,VC=!1,o&8&&(o|=o&32),g=i.entangledLanes,g!==0)for(i=i.entanglements,g&=o;0<g;)b=31-Ei(g),v=1<<b,o|=i[b],g&=~v;return Zl=o,kp(),i=Pj(),1e3<i-Bj&&(pt.recentlyCreatedOwnerStacks=0,Bj=i),$a.discardPendingWarnings(),c}function Vo(i,o){ie=null,pt.H=Lx,pt.getCurrentStack=null,Vr=!1,Ss=null,o===Ay||o===DC?(o=Rc(),en=Px):o===IM?(o=Rc(),en=G_):en=o===i2?a2:o!==null&&typeof o=="object"&&typeof o.then=="function"?Ux:HC,tr=o;var c=Se;c===null?(Ln=Bx,Cd(i,Qi(o,i.current))):c.mode&me&&Ip(c)}function vv(){var i=Jo.current;return i===null?!0:(be&4194048)===be?Kr===null:(be&62914560)===be||be&536870912?i===Kr:!1}function Dm(){var i=pt.H;return pt.H=Lx,i===null?Lx:i}function xv(){var i=pt.A;return pt.A=FW,i}function Cf(i){Yn===null&&(Yn=i._debugTask==null?null:i._debugTask)}function Ef(){Ln=lh,ch||(be&4194048)!==be&&Jo.current!==null||(_y=!0),!(uh&134217727)&&!(fh&134217727)||cn===null||fo(cn,be,bo,!1)}function Af(i,o,c){var g=_e;_e|=Mi;var b=Dm(),v=xv();if(cn!==i||be!==o){if($r){var A=i.memoizedUpdaters;0<A.size&&(Mf(i,be),A.clear()),ya(i,o)}kx=null,jr(i,o)}o=!1,A=Ln;t:do try{if(en!==yo&&Se!==null){var O=Se,j=tr;switch(en){case a2:Om(),A=UC;break t;case Px:case vg:case xg:case Ux:Jo.current===null&&(o=!0);var B=en;if(en=yo,tr=null,Tf(i,O,j,B),c&&_y){A=yu;break t}break;default:B=en,en=yo,tr=null,Tf(i,O,j,B)}}Sv(),A=Ln;break}catch(et){Vo(i,et)}while(!0);return o&&i.shellSuspendCounter++,ef(),_e=g,pt.H=b,pt.A=v,Se===null&&(cn=null,be=0,kp()),A}function Sv(){for(;Se!==null;)Rm(Se)}function ja(i,o){var c=_e;_e|=Mi;var g=Dm(),b=xv();if(cn!==i||be!==o){if($r){var v=i.memoizedUpdaters;0<v.size&&(Mf(i,be),v.clear()),ya(i,o)}kx=null,$C=ui()+Y_,jr(i,o)}else _y=Si(i,o);t:do try{if(en!==yo&&Se!==null)e:switch(o=Se,v=tr,en){case HC:en=yo,tr=null,Tf(i,o,v,HC);break;case vg:case xg:if(N0(v)){en=yo,tr=null,wv(o);break}o=function(){en!==vg&&en!==xg||cn!==i||(en=kC),ys(i)},v.then(o,o);break t;case Px:en=kC;break t;case G_:en=r2;break t;case kC:N0(v)?(en=yo,tr=null,wv(o)):(en=yo,tr=null,Tf(i,o,v,kC));break;case r2:var A=null;switch(Se.tag){case 26:A=Se.memoizedState;case 5:case 27:var O=Se;if(A?we(A):O.stateNode.complete){en=yo,tr=null;var j=O.sibling;if(j!==null)Se=j;else{var B=O.return;B!==null?(Se=B,_d(B)):Se=null}break e}break;default:console.error("Unexpected type of fiber triggered a suspensey commit. This is a bug in React.")}en=yo,tr=null,Tf(i,o,v,r2);break;case Ux:en=yo,tr=null,Tf(i,o,v,Ux);break;case a2:Om(),Ln=UC;break t;default:throw Error("Unexpected SuspendedReason. This is a bug in React.")}pt.actQueue!==null?Sv():$n();break}catch(et){Vo(i,et)}while(!0);return ef(),pt.H=g,pt.A=b,_e=c,Se!==null?yu:(cn=null,be=0,kp(),Ln)}function $n(){for(;Se!==null&&!sy();)Rm(Se)}function Rm(i){var o=i.alternate;(i.mode&me)!==te?(Ca(i),o=Lt(i,Md,o,i,Zl),Ip(i)):o=Lt(i,Md,o,i,Zl),i.memoizedProps=i.pendingProps,o===null?_d(i):Se=o}function wv(i){var o=Lt(i,ci,i);i.memoizedProps=i.pendingProps,o===null?_d(i):Se=o}function ci(i){var o=i.alternate,c=(i.mode&me)!==te;switch(c&&Ca(i),i.tag){case 15:case 0:o=J0(o,i,i.pendingProps,i.type,void 0,be);break;case 11:o=J0(o,i,i.pendingProps,i.type.render,i.ref,be);break;case 5:xl(i);default:iv(o,i),i=Se=E0(i,Zl),o=Md(o,i,Zl)}return c&&Ip(i),o}function Tf(i,o,c,g){ef(),xl(o),Ty=null,Dx=0;var b=o.return;try{if(q0(i,b,o,c,be)){Ln=Bx,Cd(i,Qi(c,i.current)),Se=null;return}}catch(v){if(b!==null)throw Se=b,v;Ln=Bx,Cd(i,Qi(c,i.current)),Se=null;return}o.flags&32768?(Oe||g===HC?i=!0:_y||be&536870912?i=!1:(ch=i=!0,(g===vg||g===xg||g===Px||g===Ux)&&(g=Jo.current,g!==null&&g.tag===13&&(g.flags|=16384))),Cv(o,i)):_d(o)}function _d(i){var o=i;do{if(o.flags&32768){Cv(o,ch);return}var c=o.alternate;if(i=o.return,Ca(o),c=Lt(o,nv,c,o,Zl),(o.mode&me)!==te&&od(o),c!==null){Se=c;return}if(o=o.sibling,o!==null){Se=o;return}Se=o=i}while(o!==null);Ln===yu&&(Ln=V_)}function Cv(i,o){do{var c=mw(i.alternate,i);if(c!==null){c.flags&=32767,Se=c;return}if((i.mode&me)!==te){od(i),c=i.actualDuration;for(var g=i.child;g!==null;)c+=g.actualDuration,g=g.sibling;i.actualDuration=c}if(c=i.return,c!==null&&(c.flags|=32768,c.subtreeFlags=0,c.deletions=null),!o&&(i=i.sibling,i!==null)){Se=i;return}Se=i=c}while(i!==null);Ln=UC,Se=null}function rn(i,o,c,g,b,v,A,O,j,B,et,st,I,ht){i.cancelPendingCommit=null;do Bd();while(yi!==dh);if($a.flushLegacyContextWarning(),$a.flushPendingUnsafeLifecycleWarnings(),(_e&(Mi|Wo))!==Vi)throw Error("Should not already be working.");if(Do(c),B===bg?v0(I,ht,c,Yn):g!==null?uM(I,ht,c,g,o!==null&&o.alternate!==null&&o.alternate.memoizedState.isDehydrated&&(o.flags&256)!==0,Yn):cM(I,ht,c,Yn),o!==null){if(c===0&&console.error("finishedLanes should not be empty during a commit. This is a bug in React."),o===i.current)throw Error("Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue.");if(v=o.lanes|o.childLanes,v|=BM,oM(i,c,v,A,O,j),i===cn&&(Se=cn=null,be=0),By=o,gh=i,Xa=c,h2=v,g2=b,J_=g,d2=ht,K_=st,Ia=qC,W_=null,o.actualDuration!==0||o.subtreeFlags&10256||o.flags&10256?(i.callbackNode=null,i.callbackPriority=0,Of(nu,function(){return Xx=window.event,Ia===qC&&(Ia=f2),Pd(),null})):(i.callbackNode=null,i.callbackPriority=0),uu=null,ih=hi(),st!==null&&fM(ht,ih,st,Yn),g=(o.flags&13878)!==0,o.subtreeFlags&13878||g){g=pt.T,pt.T=null,b=Ge.p,Ge.p=Kn,A=_e,_e|=Wo;try{gM(i,o,c)}finally{_e=A,Ge.p=b,pt.T=g}}yi=I_,ss(),_r(),Ev()}}function ss(){if(yi===I_){yi=dh;var i=gh,o=By,c=Xa,g=(o.flags&13878)!==0;if(o.subtreeFlags&13878||g){g=pt.T,pt.T=null;var b=Ge.p;Ge.p=Kn;var v=_e;_e|=Wo;try{Ly=c,jy=i,Oc(),zd(o,i),jy=Ly=null,c=A2;var A=Pp(i.containerInfo),O=c.focusedElem,j=c.selectionRange;if(A!==O&&O&&O.ownerDocument&&QS(O.ownerDocument.documentElement,O)){if(j!==null&&m0(O)){var B=j.start,et=j.end;if(et===void 0&&(et=B),"selectionStart"in O)O.selectionStart=B,O.selectionEnd=Math.min(et,O.value.length);else{var st=O.ownerDocument||document,I=st&&st.defaultView||window;if(I.getSelection){var ht=I.getSelection(),Nt=O.textContent.length,Bt=Math.min(j.start,Nt),fn=j.end===void 0?Bt:Math.min(j.end,Nt);!ht.extend&&Bt>fn&&(A=fn,fn=Bt,Bt=A);var Ne=ZS(O,Bt),X=ZS(O,fn);if(Ne&&X&&(ht.rangeCount!==1||ht.anchorNode!==Ne.node||ht.anchorOffset!==Ne.offset||ht.focusNode!==X.node||ht.focusOffset!==X.offset)){var Z=st.createRange();Z.setStart(Ne.node,Ne.offset),ht.removeAllRanges(),Bt>fn?(ht.addRange(Z),ht.extend(X.node,X.offset)):(Z.setEnd(X.node,X.offset),ht.addRange(Z))}}}}for(st=[],ht=O;ht=ht.parentNode;)ht.nodeType===1&&st.push({element:ht,left:ht.scrollLeft,top:ht.scrollTop});for(typeof O.focus=="function"&&O.focus(),O=0;O<st.length;O++){var K=st[O];K.element.scrollLeft=K.left,K.element.scrollTop=K.top}}rE=!!E2,A2=E2=null}finally{_e=v,Ge.p=b,pt.T=g}}i.current=o,yi=Z_}}function _r(){if(yi===Z_){yi=dh;var i=W_;if(i!==null){ih=hi();var o=cu,c=ih;!bn||c<=o||console.timeStamp(i,o,c,Le,ze,"secondary-light")}i=gh,o=By,c=Xa;var g=(o.flags&8772)!==0;if(o.subtreeFlags&8772||g){g=pt.T,pt.T=null;var b=Ge.p;Ge.p=Kn;var v=_e;_e|=Wo;try{Ly=c,jy=i,Oc(),Cm(i,o.alternate,o),jy=Ly=null}finally{_e=v,Ge.p=b,pt.T=g}}i=d2,o=K_,cu=hi(),i=o===null?i:ih,o=cu,c=Ia===u2,g=Yn,uu!==null?ew(i,o,uu,!1,g):!bn||o<=i||(g?g.run(console.timeStamp.bind(console,c?"Commit Interrupted View Transition":"Commit",i,o,Le,ze,c?"error":"secondary-dark")):console.timeStamp(c?"Commit Interrupted View Transition":"Commit",i,o,Le,ze,c?"error":"secondary-dark")),yi=Q_}}function Ev(){if(yi===F_||yi===Q_){if(yi===F_){var i=cu;cu=hi();var o=cu,c=Ia===u2;!bn||o<=i||console.timeStamp(c?"Interrupted View Transition":"Starting Animation",i,o,Le,ze,c?" error":"secondary-light"),Ia!==u2&&(Ia=X_)}yi=dh,oy(),i=gh;var g=By;o=Xa,c=J_;var b=g.actualDuration!==0||(g.subtreeFlags&10256)!==0||(g.flags&10256)!==0;b?yi=YC:(yi=dh,By=gh=null,Av(i,i.pendingLanes),wg=0,Gx=null);var v=i.pendingLanes;if(v===0&&(hh=null),b||Lm(i),v=Ii(o),g=g.stateNode,Jn&&typeof Jn.onCommitFiberRoot=="function")try{var A=(g.current.flags&128)===128;switch(v){case Kn:var O=ex;break;case Ai:O=ry;break;case Ui:O=nu;break;case $l:O=ay;break;default:O=nu}Jn.onCommitFiberRoot(iu,g,O,A)}catch(st){Gr||(Gr=!0,console.error("React instrumentation encountered an error: %o",st))}if($r&&i.memoizedUpdaters.clear(),yv(),c!==null){A=pt.T,O=Ge.p,Ge.p=Kn,pt.T=null;try{var j=i.onRecoverableError;for(g=0;g<c.length;g++){var B=c[g],et=Tw(B.stack);Lt(B.source,j,B.value,et)}}finally{pt.T=A,Ge.p=O}}Xa&3&&Bd(),ys(i),v=i.pendingLanes,o&261930&&v&42?(MC=!0,i===p2?Vx++:(Vx=0,p2=i)):Vx=0,b||_l(o,cu),Br(0)}}function Tw(i){return i={componentStack:i},Object.defineProperty(i,"digest",{get:function(){console.error('You are accessing "digest" from the errorInfo object passed to onRecoverableError. This property is no longer provided as part of errorInfo but can be accessed as a property of the Error instance itself.')}}),i}function Av(i,o){(i.pooledCacheLanes&=o)===0&&(o=i.pooledCache,o!=null&&(i.pooledCache=null,sd(o)))}function Bd(){return ss(),_r(),Ev(),Pd()}function Pd(){if(yi!==YC)return!1;var i=gh,o=h2;h2=0;var c=Ii(Xa),g=Ui>c?Ui:c;c=pt.T;var b=Ge.p;try{Ge.p=g,pt.T=null;var v=g2;g2=null,g=gh;var A=Xa;if(yi=dh,By=gh=null,Xa=0,(_e&(Mi|Wo))!==Vi)throw Error("Cannot flush passive effects while already rendering.");Do(A),m2=!0,XC=!1;var O=0;if(uu=null,O=ui(),Ia===X_)x0(cu,O,$W);else{var j=cu,B=O,et=Ia===f2;!bn||B<=j||(Yn?Yn.run(console.timeStamp.bind(console,et?"Waiting for Paint":"Waiting",j,B,Le,ze,"secondary-light")):console.timeStamp(et?"Waiting for Paint":"Waiting",j,B,Le,ze,"secondary-light"))}j=_e,_e|=Wo;var st=g.current;Oc(),Tm(st);var I=g.current;st=d2,Oc(),gv(g,I,A,v,st),Lm(g),_e=j;var ht=ui();if(I=O,st=Yn,uu!==null?ew(I,ht,uu,!0,st):!bn||ht<=I||(st?st.run(console.timeStamp.bind(console,"Remaining Effects",I,ht,Le,ze,"secondary-dark")):console.timeStamp("Remaining Effects",I,ht,Le,ze,"secondary-dark")),_l(A,ht),Br(0,!1),XC?g===Gx?wg++:(wg=0,Gx=g):wg=0,XC=m2=!1,Jn&&typeof Jn.onPostCommitFiberRoot=="function")try{Jn.onPostCommitFiberRoot(iu,g)}catch(Bt){Gr||(Gr=!0,console.error("React instrumentation encountered an error: %o",Bt))}var Nt=g.current.stateNode;return Nt.effectDuration=0,Nt.passiveEffectDuration=0,!0}finally{Ge.p=b,pt.T=c,Av(i,o)}}function os(i,o,c){o=Qi(c,o),aw(o),o=cm(i.stateNode,o,2),i=Cr(i,o,2),i!==null&&(al(i,2),ys(i))}function he(i,o,c){if(Py=!1,i.tag===3)os(i,i,c);else{for(;o!==null;){if(o.tag===3){os(o,i,c);return}if(o.tag===1){var g=o.stateNode;if(typeof o.type.getDerivedStateFromError=="function"||typeof g.componentDidCatch=="function"&&(hh===null||!hh.has(g))){i=Qi(c,i),aw(i),c=um(2),g=Cr(o,c,2),g!==null&&(fm(c,g,o,i),al(g,2),ys(g));return}}o=o.return}console.error(`Internal React error: Attempted to capture a commit phase error inside a detached tree. This indicates a bug in React. Potential causes include deleting the same fiber more than once, committing an already-finished tree, or an inconsistent return pointer.
|
|
1149
|
+
|
|
1150
|
+
Error message:
|
|
1151
|
+
|
|
1152
|
+
%s`,c)}}function zm(i,o,c){var g=i.pingCache;if(g===null){g=i.pingCache=new KW;var b=new Set;g.set(o,b)}else b=g.get(o),b===void 0&&(b=new Set,g.set(o,b));b.has(c)||(l2=!0,b.add(c),g=ms.bind(null,i,o,c),$r&&Mf(i,c),o.then(g,g))}function ms(i,o,c){var g=i.pingCache;g!==null&&g.delete(o),i.pingedLanes|=i.suspendedLanes&c,i.warmLanes&=~c,c&127?0>Xl&&(cg=Xl=hi(),yx=SC("Promise Resolved"),sh=wC):c&4194048&&0>Jr&&(fu=Jr=hi(),vx=SC("Promise Resolved"),$M=wC),bv()&&pt.actQueue===null&&console.error(`A suspended resource finished loading inside a test, but the event was not wrapped in act(...).
|
|
1153
|
+
|
|
1154
|
+
When testing, code that resolves suspended data should be wrapped into act(...):
|
|
1155
|
+
|
|
1156
|
+
act(() => {
|
|
1157
|
+
/* finish loading suspended data */
|
|
1158
|
+
});
|
|
1159
|
+
/* assert on the output */
|
|
1160
|
+
|
|
1161
|
+
This ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act`),cn===i&&(be&c)===c&&(Ln===lh||Ln===PC&&(be&62914560)===be&&ui()-GC<q_?(_e&Mi)===Vi&&jr(i,0):c2|=c,Sg===be&&(Sg=0)),ys(i)}function Tv(i,o){o===0&&(o=xp()),i=ji(i,o),i!==null&&(al(i,o),ys(i))}function _a(i){var o=i.memoizedState,c=0;o!==null&&(c=o.retryLane),Tv(i,c)}function Ic(i,o){var c=0;switch(i.tag){case 31:case 13:var g=i.stateNode,b=i.memoizedState;b!==null&&(c=b.retryLane);break;case 19:g=i.stateNode;break;case 22:g=i.stateNode._retryCache;break;default:throw Error("Pinged unknown suspense boundary type. This is probably a bug in React.")}g!==null&&g.delete(o),Tv(i,c)}function Go(i,o,c){if(o.subtreeFlags&67117056)for(o=o.child;o!==null;){var g=i,b=o,v=b.type===ls;v=c||v,b.tag!==22?b.flags&67108864?v&&Lt(b,Nm,g,b):Go(g,b,v):b.memoizedState===null&&(v&&b.flags&8192?Lt(b,Nm,g,b):b.subtreeFlags&67108864&&Lt(b,Go,g,b,v)),o=o.sibling}}function Nm(i,o){sn(!0);try{Em(o),mv(o),dv(i,o.alternate,o,!1),jd(i,o,0,null,!1,0)}finally{sn(!1)}}function Lm(i){var o=!0;i.current.mode&(ws|Ga)||(o=!1),Go(i,i.current,o)}function ho(i){if((_e&Mi)===Vi){var o=i.tag;if(o===3||o===1||o===0||o===11||o===14||o===15){if(o=F(i)||"ReactComponent",IC!==null){if(IC.has(o))return;IC.add(o)}else IC=new Set([o]);Lt(i,function(){console.error("Can't perform a React state update on a component that hasn't mounted yet. This indicates that you have a side-effect in your render function that asynchronously tries to update the component. Move this work to useEffect instead.")})}}}function Mf(i,o){$r&&i.memoizedUpdaters.forEach(function(c){ds(i,c,o)})}function Of(i,o){var c=pt.actQueue;return c!==null?(c.push(o),ett):tx(i,o)}function Ud(i){bv()&&pt.actQueue===null&&Lt(i,function(){console.error(`An update to %s inside a test was not wrapped in act(...).
|
|
1162
|
+
|
|
1163
|
+
When testing, code that causes React state updates should be wrapped into act(...):
|
|
1164
|
+
|
|
1165
|
+
act(() => {
|
|
1166
|
+
/* fire events that update state */
|
|
1167
|
+
});
|
|
1168
|
+
/* assert on the output */
|
|
1169
|
+
|
|
1170
|
+
This ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act`,F(i))})}function ys(i){i!==Uy&&i.next===null&&(Uy===null?ZC=Uy=i:Uy=Uy.next=i),QC=!0,pt.actQueue!==null?b2||(b2=!0,Ow()):y2||(y2=!0,Ow())}function Br(i,o){if(!v2&&QC){v2=!0;do for(var c=!1,g=ZC;g!==null;){if(i!==0){var b=g.pendingLanes;if(b===0)var v=0;else{var A=g.suspendedLanes,O=g.pingedLanes;v=(1<<31-Ei(42|i)+1)-1,v&=b&~(A&~O),v=v&201326741?v&201326741|1:v?v|2:0}v!==0&&(c=!0,Hd(g,v))}else v=be,v=vp(g,g===cn?v:0,g.cancelPendingCommit!==null||g.timeoutHandle!==Tg),!(v&3)||Si(g,v)||(c=!0,Hd(g,v));g=g.next}while(c);v2=!1}}function Mw(){Xx=window.event,jm()}function jm(){QC=b2=y2=!1;var i=0;ph!==0&&Rv()&&(i=ph);for(var o=ui(),c=null,g=ZC;g!==null;){var b=g.next,v=Df(g,o);v===0?(g.next=null,c===null?ZC=b:c.next=b,b===null&&(Uy=c)):(c=g,(i!==0||v&3)&&(QC=!0)),g=b}yi!==dh&&yi!==YC||Br(i),ph!==0&&(ph=0)}function Df(i,o){for(var c=i.suspendedLanes,g=i.pingedLanes,b=i.expirationTimes,v=i.pendingLanes&-62914561;0<v;){var A=31-Ei(v),O=1<<A,j=b[A];j===-1?(!(O&c)||O&g)&&(b[A]=sM(O,o)):j<=o&&(i.expiredLanes|=O),v&=~O}if(o=cn,c=be,c=vp(i,i===o?c:0,i.cancelPendingCommit!==null||i.timeoutHandle!==Tg),g=i.callbackNode,c===0||i===o&&(en===vg||en===xg)||i.cancelPendingCommit!==null)return g!==null&&_m(g),i.callbackNode=null,i.callbackPriority=0;if(!(c&3)||Si(i,c)){if(o=c&-c,o!==i.callbackPriority||pt.actQueue!==null&&g!==x2)_m(g);else return o;switch(Ii(c)){case Kn:case Ai:c=ry;break;case Ui:c=nu;break;case $l:c=ay;break;default:c=nu}return g=Mv.bind(null,i),pt.actQueue!==null?(pt.actQueue.push(g),c=x2):c=tx(c,g),i.callbackPriority=o,i.callbackNode=c,o}return g!==null&&_m(g),i.callbackPriority=2,i.callbackNode=null,2}function Mv(i,o){if(MC=TC=!1,Xx=window.event,yi!==dh&&yi!==YC)return i.callbackNode=null,i.callbackPriority=0,null;var c=i.callbackNode;if(Ia===qC&&(Ia=f2),Bd()&&i.callbackNode!==c)return null;var g=be;return g=vp(i,i===cn?g:0,i.cancelPendingCommit!==null||i.timeoutHandle!==Tg),g===0?null:(Cw(i,g,o),Df(i,ui()),i.callbackNode!=null&&i.callbackNode===c?Mv.bind(null,i):null)}function Hd(i,o){if(Bd())return null;TC=MC,MC=!1,Cw(i,o,!0)}function _m(i){i!==x2&&i!==null&&iy(i)}function Ow(){pt.actQueue!==null&&pt.actQueue.push(function(){return jm(),null}),ftt(function(){(_e&(Mi|Wo))!==Vi?tx(ex,Mw):jm()})}function Ov(){if(ph===0){var i=hg;i===0&&(i=If,If<<=1,!(If&261888)&&(If=256)),ph=i}return ph}function Pe(i){return i==null||typeof i=="symbol"||typeof i=="boolean"?null:typeof i=="function"?i:(qe(i,"action"),Zh(""+i))}function Ke(i,o){var c=o.ownerDocument.createElement("input");return c.name=o.name,c.value=o.value,i.id&&c.setAttribute("form",i.id),o.parentNode.insertBefore(c,o),i=new FormData(i),c.parentNode.removeChild(c),i}function Ae(i,o,c,g,b){if(o==="submit"&&c&&c.stateNode===b){var v=Pe((b[cs]||null).action),A=g.submitter;A&&(o=(o=A[cs]||null)?Pe(o.formAction):A.getAttribute("formAction"),o!==null&&(v=o,A=null));var O=new gC("action","action",null,g,b);i.push({event:O,listeners:[{instance:null,listener:function(){if(g.defaultPrevented){if(ph!==0){var j=A?Ke(b,A):new FormData(b),B={pending:!0,data:j,method:b.method,action:v};Object.freeze(B),za(c,B,null,j)}}else typeof v=="function"&&(O.preventDefault(),j=A?Ke(b,A):new FormData(b),B={pending:!0,data:j,method:b.method,action:v},Object.freeze(B),za(c,B,v,j))},currentTarget:b}]})}}function xe(i,o,c){i.currentTarget=c;try{o(i)}catch(g){NM(g)}i.currentTarget=null}function Ze(i,o){o=(o&4)!==0;for(var c=0;c<i.length;c++){var g=i[c];t:{var b=void 0,v=g.event;if(g=g.listeners,o)for(var A=g.length-1;0<=A;A--){var O=g[A],j=O.instance,B=O.currentTarget;if(O=O.listener,j!==b&&v.isPropagationStopped())break t;j!==null?Lt(j,xe,v,O,B):xe(v,O,B),b=j}else for(A=0;A<g.length;A++){if(O=g[A],j=O.instance,B=O.currentTarget,O=O.listener,j!==b&&v.isPropagationStopped())break t;j!==null?Lt(j,xe,v,O,B):xe(v,O,B),b=j}}}}function Wt(i,o){S2.has(i)||console.error('Did not expect a listenToNonDelegatedEvent() call for "%s". This is a bug in React. Please file an issue.',i);var c=o[su];c===void 0&&(c=o[su]=new Set);var g=i+"__bubble";c.has(g)||(Bm(o,i,2,!1),c.add(g))}function Pr(i,o,c){S2.has(i)&&!o&&console.error('Did not expect a listenToNativeEvent() call for "%s" in the bubble phase. This is a bug in React. Please file an issue.',i);var g=0;o&&(g|=4),Bm(c,i,g,o)}function Bl(i){if(!i[FC]){i[FC]=!0,cC.forEach(function(c){c!=="selectionchange"&&(S2.has(c)||Pr(c,!1,i),Pr(c,!0,i))});var o=i.nodeType===9?i:i.ownerDocument;o===null||o[FC]||(o[FC]=!0,Pr("selectionchange",!1,o))}}function Bm(i,o,c,g){switch(Fm(o)){case Kn:var b=$v;break;case Ai:b=Ci;break;default:b=qv}c=b.bind(null,o,c,i),b=void 0,!wM||o!=="touchstart"&&o!=="touchmove"&&o!=="wheel"||(b=!0),g?b!==void 0?i.addEventListener(o,c,{capture:!0,passive:b}):i.addEventListener(o,c,!0):b!==void 0?i.addEventListener(o,c,{passive:b}):i.addEventListener(o,c,!1)}function $o(i,o,c,g,b){var v=g;if(!(o&1)&&!(o&2)&&g!==null)t:for(;;){if(g===null)return;var A=g.tag;if(A===3||A===4){var O=g.stateNode.containerInfo;if(O===b)break;if(A===4)for(A=g.return;A!==null;){var j=A.tag;if((j===3||j===4)&&A.stateNode.containerInfo===b)return;A=A.return}for(;O!==null;){if(A=ba(O),A===null)return;if(j=A.tag,j===5||j===6||j===26||j===27){g=v=A;continue t}O=O.parentNode}}g=g.return}Lp(function(){var B=v,et=Mo(c),st=[];t:{var I=_j.get(i);if(I!==void 0){var ht=gC,Nt=i;switch(i){case"keypress":if(Qh(c)===0)break t;case"keydown":case"keyup":ht=mW;break;case"focusin":Nt="focus",ht=TM;break;case"focusout":Nt="blur",ht=TM;break;case"beforeblur":case"afterblur":ht=TM;break;case"click":if(c.button===2)break t;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ht=Sj;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ht=sW;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ht=vW;break;case zj:case Nj:case Lj:ht=aW;break;case jj:ht=SW;break;case"scroll":case"scrollend":ht=nW;break;case"wheel":ht=CW;break;case"copy":case"cut":case"paste":ht=cW;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ht=Cj;break;case"toggle":case"beforetoggle":ht=AW}var Bt=(o&4)!==0,fn=!Bt&&(i==="scroll"||i==="scrollend"),Ne=Bt?I!==null?I+"Capture":null:I;Bt=[];for(var X=B,Z;X!==null;){var K=X;if(Z=K.stateNode,K=K.tag,K!==5&&K!==26&&K!==27||Z===null||Ne===null||(K=yr(X,Ne),K!=null&&Bt.push(an(X,K,Z))),fn)break;X=X.return}0<Bt.length&&(I=new ht(I,Nt,null,c,et),st.push({event:I,listeners:Bt}))}}if(!(o&7)){t:{if(I=i==="mouseover"||i==="pointerover",ht=i==="mouseout"||i==="pointerout",I&&c!==rx&&(Nt=c.relatedTarget||c.fromElement)&&(ba(Nt)||Nt[Va]))break t;if((ht||I)&&(I=et.window===et?et:(I=et.ownerDocument)?I.defaultView||I.parentWindow:window,ht?(Nt=c.relatedTarget||c.toElement,ht=B,Nt=Nt?ba(Nt):null,Nt!==null&&(fn=N(Nt),Bt=Nt.tag,Nt!==fn||Bt!==5&&Bt!==27&&Bt!==6)&&(Nt=null)):(ht=null,Nt=B),ht!==Nt)){if(Bt=Sj,K="onMouseLeave",Ne="onMouseEnter",X="mouse",(i==="pointerout"||i==="pointerover")&&(Bt=Cj,K="onPointerLeave",Ne="onPointerEnter",X="pointer"),fn=ht==null?I:ll(ht),Z=Nt==null?I:ll(Nt),I=new Bt(K,X+"leave",ht,c,et),I.target=fn,I.relatedTarget=Z,K=null,ba(et)===B&&(Bt=new Bt(Ne,X+"enter",Nt,c,et),Bt.target=Z,Bt.relatedTarget=fn,K=Bt),fn=K,ht&&Nt)e:{for(Bt=Zc,Ne=ht,X=Nt,Z=0,K=Ne;K;K=Bt(K))Z++;K=0;for(var xt=X;xt;xt=Bt(xt))K++;for(;0<Z-K;)Ne=Bt(Ne),Z--;for(;0<K-Z;)X=Bt(X),K--;for(;Z--;){if(Ne===X||X!==null&&Ne===X.alternate){Bt=Ne;break e}Ne=Bt(Ne),X=Bt(X)}Bt=null}else Bt=null;ht!==null&&Pm(st,I,ht,Bt,!1),Nt!==null&&fn!==null&&Pm(st,fn,Nt,Bt,!0)}}t:{if(I=B?ll(B):window,ht=I.nodeName&&I.nodeName.toLowerCase(),ht==="select"||ht==="input"&&I.type==="file")var jt=hl;else if(d0(I))if(Dj)jt=Wh;else{jt=g0;var se=lM}else ht=I.nodeName,!ht||ht.toLowerCase()!=="input"||I.type!=="checkbox"&&I.type!=="radio"?B&&mr(B.elementType)&&(jt=hl):jt=p0;if(jt&&(jt=jt(i,B))){Jh(st,jt,c,et);break t}se&&se(i,I,B),i==="focusout"&&B&&I.type==="number"&&B.memoizedProps.value!=null&&s0(I,"number",I.value)}switch(se=B?ll(B):window,i){case"focusin":(d0(se)||se.contentEditable==="true")&&(py=se,OM=B,dx=null);break;case"focusout":dx=OM=py=null;break;case"mousedown":DM=!0;break;case"contextmenu":case"mouseup":case"dragend":DM=!1,FS(st,c,et);break;case"selectionchange":if(DW)break;case"keydown":case"keyup":FS(st,c,et)}var Zt;if(MM)t:{switch(i){case"compositionstart":var qt="onCompositionStart";break t;case"compositionend":qt="onCompositionEnd";break t;case"compositionupdate":qt="onCompositionUpdate";break t}qt=void 0}else gy?Fu(i,c)&&(qt="onCompositionEnd"):i==="keydown"&&c.keyCode===Ej&&(qt="onCompositionStart");qt&&(Aj&&c.locale!=="ko"&&(gy||qt!=="onCompositionStart"?qt==="onCompositionEnd"&&gy&&(Zt=bc()):(Kf=et,CM="value"in Kf?Kf.value:Kf.textContent,gy=!0)),se=qo(B,qt),0<se.length&&(qt=new wj(qt,i,null,c,et),st.push({event:qt,listeners:se}),Zt?qt.data=Zt:(Zt=Sa(c),Zt!==null&&(qt.data=Zt)))),(Zt=MW?h0(i,c):jp(i,c))&&(qt=qo(B,"onBeforeInput"),0<qt.length&&(se=new fW("onBeforeInput","beforeinput",null,c,et),st.push({event:se,listeners:qt}),se.data=Zt)),Ae(st,i,B,c,et)}Ze(st,o)})}function an(i,o,c){return{instance:i,listener:o,currentTarget:c}}function qo(i,o){for(var c=o+"Capture",g=[];i!==null;){var b=i,v=b.stateNode;if(b=b.tag,b!==5&&b!==26&&b!==27||v===null||(b=yr(i,c),b!=null&&g.unshift(an(i,b,v)),b=yr(i,o),b!=null&&g.push(an(i,b,v))),i.tag===3)return g;i=i.return}return[]}function Zc(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5&&i.tag!==27);return i||null}function Pm(i,o,c,g,b){for(var v=o._reactName,A=[];c!==null&&c!==g;){var O=c,j=O.alternate,B=O.stateNode;if(O=O.tag,j!==null&&j===g)break;O!==5&&O!==26&&O!==27||B===null||(j=B,b?(B=yr(c,v),B!=null&&A.unshift(an(c,B,j))):b||(B=yr(c,v),B!=null&&A.push(an(c,B,j)))),c=c.return}A.length!==0&&i.push({event:o,listeners:A})}function rs(i,o){YS(i,o),i!=="input"&&i!=="textarea"&&i!=="select"||o==null||o.value!==null||vj||(vj=!0,i==="select"&&o.multiple?console.error("`value` prop on `%s` should not be null. Consider using an empty array when `multiple` is set to `true` to clear the component or `undefined` for uncontrolled components.",i):console.error("`value` prop on `%s` should not be null. Consider using an empty string to clear the component or `undefined` for uncontrolled components.",i));var c={registrationNameDependencies:qr,possibleRegistrationNames:Ff};mr(i)||typeof o.is=="string"||aM(i,o,c),o.contentEditable&&!o.suppressContentEditableWarning&&o.children!=null&&console.error("A component is `contentEditable` and contains `children` managed by React. It is now your responsibility to guarantee that none of those nodes are unexpectedly modified or duplicated. This is probably not intentional.")}function En(i,o,c,g){o!==c&&(c=Yo(c),Yo(o)!==c&&(g[i]=o))}function kd(i,o,c){o.forEach(function(g){c[Ba(g)]=g==="style"?Pl(i):i.getAttribute(g)})}function An(i,o){o===!1?console.error("Expected `%s` listener to be a function, instead got `false`.\n\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.",i,i,i):console.error("Expected `%s` listener to be a function, instead got a value of `%s` type.",i,typeof o)}function Um(i,o){return i=i.namespaceURI===oe||i.namespaceURI===de?i.ownerDocument.createElementNS(i.namespaceURI,i.tagName):i.ownerDocument.createElement(i.tagName),i.innerHTML=o,i.innerHTML}function Yo(i){return Os(i)&&(console.error("The provided HTML markup uses a value of unsupported type %s. This value must be coerced to a string before using it here.",Co(i)),ma(i)),(typeof i=="string"?i:""+i).replace(ntt,`
|
|
1171
|
+
`).replace(itt,"")}function Dv(i,o){return o=Yo(o),Yo(i)===o}function Ve(i,o,c,g,b,v){switch(c){case"children":typeof g=="string"?(Ih(g,o,!1),o==="body"||o==="textarea"&&g===""||yc(i,g)):(typeof g=="number"||typeof g=="bigint")&&(Ih(""+g,o,!1),o!=="body"&&yc(i,""+g));break;case"className":qh(i,"class",g);break;case"tabIndex":qh(i,"tabindex",g);break;case"dir":case"role":case"viewBox":case"width":case"height":qh(i,c,g);break;case"style":c0(i,g,v);break;case"data":if(o!=="object"){qh(i,"data",g);break}case"src":case"href":if(g===""&&(o!=="a"||c!=="href")){console.error(c==="src"?'An empty string ("") was passed to the %s attribute. This may cause the browser to download the whole page again over the network. To fix this, either do not render the element at all or pass null to %s instead of an empty string.':'An empty string ("") was passed to the %s attribute. To fix this, either do not render the element at all or pass null to %s instead of an empty string.',c,c),i.removeAttribute(c);break}if(g==null||typeof g=="function"||typeof g=="symbol"||typeof g=="boolean"){i.removeAttribute(c);break}qe(g,c),g=Zh(""+g),i.setAttribute(c,g);break;case"action":case"formAction":if(g!=null&&(o==="form"?c==="formAction"?console.error("You can only pass the formAction prop to <input> or <button>. Use the action prop on <form>."):typeof g=="function"&&(b.encType==null&&b.method==null||WC||(WC=!0,console.error("Cannot specify a encType or method for a form that specifies a function as the action. React provides those automatically. They will get overridden.")),b.target==null||KC||(KC=!0,console.error("Cannot specify a target for a form that specifies a function as the action. The function will always be executed in the same window."))):o==="input"||o==="button"?c==="action"?console.error("You can only pass the action prop to <form>. Use the formAction prop on <input> or <button>."):o!=="input"||b.type==="submit"||b.type==="image"||JC?o!=="button"||b.type==null||b.type==="submit"||JC?typeof g=="function"&&(b.name==null||sB||(sB=!0,console.error('Cannot specify a "name" prop for a button that specifies a function as a formAction. React needs it to encode which action should be invoked. It will get overridden.')),b.formEncType==null&&b.formMethod==null||WC||(WC=!0,console.error("Cannot specify a formEncType or formMethod for a button that specifies a function as a formAction. React provides those automatically. They will get overridden.")),b.formTarget==null||KC||(KC=!0,console.error("Cannot specify a formTarget for a button that specifies a function as a formAction. The function will always be executed in the same window."))):(JC=!0,console.error('A button can only specify a formAction along with type="submit" or no type.')):(JC=!0,console.error('An input can only specify a formAction along with type="submit" or type="image".')):console.error(c==="action"?"You can only pass the action prop to <form>.":"You can only pass the formAction prop to <input> or <button>.")),typeof g=="function"){i.setAttribute(c,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof v=="function"&&(c==="formAction"?(o!=="input"&&Ve(i,o,"name",b.name,b,null),Ve(i,o,"formEncType",b.formEncType,b,null),Ve(i,o,"formMethod",b.formMethod,b,null),Ve(i,o,"formTarget",b.formTarget,b,null)):(Ve(i,o,"encType",b.encType,b,null),Ve(i,o,"method",b.method,b,null),Ve(i,o,"target",b.target,b,null)));if(g==null||typeof g=="symbol"||typeof g=="boolean"){i.removeAttribute(c);break}qe(g,c),g=Zh(""+g),i.setAttribute(c,g);break;case"onClick":g!=null&&(typeof g!="function"&&An(c,g),i.onclick=no);break;case"onScroll":g!=null&&(typeof g!="function"&&An(c,g),Wt("scroll",i));break;case"onScrollEnd":g!=null&&(typeof g!="function"&&An(c,g),Wt("scrollend",i));break;case"dangerouslySetInnerHTML":if(g!=null){if(typeof g!="object"||!("__html"in g))throw Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://react.dev/link/dangerously-set-inner-html for more information.");if(c=g.__html,c!=null){if(b.children!=null)throw Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");i.innerHTML=c}}break;case"multiple":i.multiple=g&&typeof g!="function"&&typeof g!="symbol";break;case"muted":i.muted=g&&typeof g!="function"&&typeof g!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(g==null||typeof g=="function"||typeof g=="boolean"||typeof g=="symbol"){i.removeAttribute("xlink:href");break}qe(g,c),c=Zh(""+g),i.setAttributeNS(Cg,"xlink:href",c);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":g!=null&&typeof g!="function"&&typeof g!="symbol"?(qe(g,c),i.setAttribute(c,""+g)):i.removeAttribute(c);break;case"inert":g!==""||tE[c]||(tE[c]=!0,console.error("Received an empty string for a boolean attribute `%s`. This will treat the attribute as if it were false. Either pass `false` to silence this warning, or pass `true` if you used an empty string in earlier versions of React to indicate this attribute is true.",c));case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":g&&typeof g!="function"&&typeof g!="symbol"?i.setAttribute(c,""):i.removeAttribute(c);break;case"capture":case"download":g===!0?i.setAttribute(c,""):g!==!1&&g!=null&&typeof g!="function"&&typeof g!="symbol"?(qe(g,c),i.setAttribute(c,g)):i.removeAttribute(c);break;case"cols":case"rows":case"size":case"span":g!=null&&typeof g!="function"&&typeof g!="symbol"&&!isNaN(g)&&1<=g?(qe(g,c),i.setAttribute(c,g)):i.removeAttribute(c);break;case"rowSpan":case"start":g==null||typeof g=="function"||typeof g=="symbol"||isNaN(g)?i.removeAttribute(c):(qe(g,c),i.setAttribute(c,g));break;case"popover":Wt("beforetoggle",i),Wt("toggle",i),wp(i,"popover",g);break;case"xlinkActuate":dr(i,Cg,"xlink:actuate",g);break;case"xlinkArcrole":dr(i,Cg,"xlink:arcrole",g);break;case"xlinkRole":dr(i,Cg,"xlink:role",g);break;case"xlinkShow":dr(i,Cg,"xlink:show",g);break;case"xlinkTitle":dr(i,Cg,"xlink:title",g);break;case"xlinkType":dr(i,Cg,"xlink:type",g);break;case"xmlBase":dr(i,w2,"xml:base",g);break;case"xmlLang":dr(i,w2,"xml:lang",g);break;case"xmlSpace":dr(i,w2,"xml:space",g);break;case"is":v!=null&&console.error('Cannot update the "is" prop after it has been initialized.'),wp(i,"is",g);break;case"innerText":case"textContent":break;case"popoverTarget":oB||g==null||typeof g!="object"||(oB=!0,console.error("The `popoverTarget` prop expects the ID of an Element as a string. Received %s instead.",g));default:!(2<c.length)||c[0]!=="o"&&c[0]!=="O"||c[1]!=="n"&&c[1]!=="N"?(c=$S(c),wp(i,c,g)):qr.hasOwnProperty(c)&&g!=null&&typeof g!="function"&&An(c,g)}}function Rf(i,o,c,g,b,v){switch(c){case"style":c0(i,g,v);break;case"dangerouslySetInnerHTML":if(g!=null){if(typeof g!="object"||!("__html"in g))throw Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://react.dev/link/dangerously-set-inner-html for more information.");if(c=g.__html,c!=null){if(b.children!=null)throw Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");i.innerHTML=c}}break;case"children":typeof g=="string"?yc(i,g):(typeof g=="number"||typeof g=="bigint")&&yc(i,""+g);break;case"onScroll":g!=null&&(typeof g!="function"&&An(c,g),Wt("scroll",i));break;case"onScrollEnd":g!=null&&(typeof g!="function"&&An(c,g),Wt("scrollend",i));break;case"onClick":g!=null&&(typeof g!="function"&&An(c,g),i.onclick=no);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(qr.hasOwnProperty(c))g!=null&&typeof g!="function"&&An(c,g);else t:{if(c[0]==="o"&&c[1]==="n"&&(b=c.endsWith("Capture"),o=c.slice(2,b?c.length-7:void 0),v=i[cs]||null,v=v!=null?v[c]:null,typeof v=="function"&&i.removeEventListener(o,v,b),typeof g=="function")){typeof v!="function"&&v!==null&&(c in i?i[c]=null:i.hasAttribute(c)&&i.removeAttribute(c)),i.addEventListener(o,g,b);break t}c in i?i[c]=g:g===!0?i.setAttribute(c,""):wp(i,c,g)}}}function mn(i,o,c){switch(rs(o,c),o){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Wt("error",i),Wt("load",i);var g=!1,b=!1,v;for(v in c)if(c.hasOwnProperty(v)){var A=c[v];if(A!=null)switch(v){case"src":g=!0;break;case"srcSet":b=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");default:Ve(i,o,v,A,c,null)}}b&&Ve(i,o,"srcSet",c.srcSet,c,null),g&&Ve(i,o,"src",c.src,c,null);return;case"input":hc("input",c),Wt("invalid",i);var O=v=A=b=null,j=null,B=null;for(g in c)if(c.hasOwnProperty(g)){var et=c[g];if(et!=null)switch(g){case"name":b=et;break;case"type":A=et;break;case"checked":j=et;break;case"defaultChecked":B=et;break;case"value":v=et;break;case"defaultValue":O=et;break;case"children":case"dangerouslySetInnerHTML":if(et!=null)throw Error(o+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");break;default:Ve(i,o,g,et,c,null)}}Zi(i,c),Ap(i,v,O,j,B,A,b,!1);return;case"select":hc("select",c),Wt("invalid",i),g=A=v=null;for(b in c)if(c.hasOwnProperty(b)&&(O=c[b],O!=null))switch(b){case"value":v=O;break;case"defaultValue":A=O;break;case"multiple":g=O;default:Ve(i,o,b,O,c,null)}Tp(i,c),o=v,c=A,i.multiple=!!g,o!=null?gr(i,!!g,o,!1):c!=null&&gr(i,!!g,c,!0);return;case"textarea":hc("textarea",c),Wt("invalid",i),v=b=g=null;for(A in c)if(c.hasOwnProperty(A)&&(O=c[A],O!=null))switch(A){case"value":g=O;break;case"defaultValue":b=O;break;case"children":v=O;break;case"dangerouslySetInnerHTML":if(O!=null)throw Error("`dangerouslySetInnerHTML` does not make sense on <textarea>.");break;default:Ve(i,o,A,O,c,null)}dc(i,c),qu(i,g,b,v);return;case"option":GS(i,c);for(j in c)if(c.hasOwnProperty(j)&&(g=c[j],g!=null))switch(j){case"selected":i.selected=g&&typeof g!="function"&&typeof g!="symbol";break;default:Ve(i,o,j,g,c,null)}return;case"dialog":Wt("beforetoggle",i),Wt("toggle",i),Wt("cancel",i),Wt("close",i);break;case"iframe":case"object":Wt("load",i);break;case"video":case"audio":for(g=0;g<$x.length;g++)Wt($x[g],i);break;case"image":Wt("error",i),Wt("load",i);break;case"details":Wt("toggle",i);break;case"embed":case"source":case"link":Wt("error",i),Wt("load",i);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(B in c)if(c.hasOwnProperty(B)&&(g=c[B],g!=null))switch(B){case"children":case"dangerouslySetInnerHTML":throw Error(o+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");default:Ve(i,o,B,g,c,null)}return;default:if(mr(o)){for(et in c)c.hasOwnProperty(et)&&(g=c[et],g!==void 0&&Rf(i,o,et,g,c,void 0));return}}for(O in c)c.hasOwnProperty(O)&&(g=c[O],g!=null&&Ve(i,o,O,g,c,null))}function Fn(i,o,c,g){switch(rs(o,g),o){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var b=null,v=null,A=null,O=null,j=null,B=null,et=null;for(ht in c){var st=c[ht];if(c.hasOwnProperty(ht)&&st!=null)switch(ht){case"checked":break;case"value":break;case"defaultValue":j=st;default:g.hasOwnProperty(ht)||Ve(i,o,ht,null,g,st)}}for(var I in g){var ht=g[I];if(st=c[I],g.hasOwnProperty(I)&&(ht!=null||st!=null))switch(I){case"type":v=ht;break;case"name":b=ht;break;case"checked":B=ht;break;case"defaultChecked":et=ht;break;case"value":A=ht;break;case"defaultValue":O=ht;break;case"children":case"dangerouslySetInnerHTML":if(ht!=null)throw Error(o+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");break;default:ht!==st&&Ve(i,o,I,ht,g,st)}}o=c.type==="checkbox"||c.type==="radio"?c.checked!=null:c.value!=null,g=g.type==="checkbox"||g.type==="radio"?g.checked!=null:g.value!=null,o||!g||iB||(console.error("A component is changing an uncontrolled input to be controlled. This is likely caused by the value changing from undefined to a defined value, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://react.dev/link/controlled-components"),iB=!0),!o||g||nB||(console.error("A component is changing a controlled input to be uncontrolled. This is likely caused by the value changing from a defined to undefined, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://react.dev/link/controlled-components"),nB=!0),cl(i,A,O,j,B,et,v,b);return;case"select":ht=A=O=I=null;for(v in c)if(j=c[v],c.hasOwnProperty(v)&&j!=null)switch(v){case"value":break;case"multiple":ht=j;default:g.hasOwnProperty(v)||Ve(i,o,v,null,g,j)}for(b in g)if(v=g[b],j=c[b],g.hasOwnProperty(b)&&(v!=null||j!=null))switch(b){case"value":I=v;break;case"defaultValue":O=v;break;case"multiple":A=v;default:v!==j&&Ve(i,o,b,v,g,j)}g=O,o=A,c=ht,I!=null?gr(i,!!o,I,!1):!!c!=!!o&&(g!=null?gr(i,!!o,g,!0):gr(i,!!o,o?[]:"",!1));return;case"textarea":ht=I=null;for(O in c)if(b=c[O],c.hasOwnProperty(O)&&b!=null&&!g.hasOwnProperty(O))switch(O){case"value":break;case"children":break;default:Ve(i,o,O,null,g,b)}for(A in g)if(b=g[A],v=c[A],g.hasOwnProperty(A)&&(b!=null||v!=null))switch(A){case"value":I=b;break;case"defaultValue":ht=b;break;case"children":break;case"dangerouslySetInnerHTML":if(b!=null)throw Error("`dangerouslySetInnerHTML` does not make sense on <textarea>.");break;default:b!==v&&Ve(i,o,A,b,g,v)}gc(i,I,ht);return;case"option":for(var Nt in c)if(I=c[Nt],c.hasOwnProperty(Nt)&&I!=null&&!g.hasOwnProperty(Nt))switch(Nt){case"selected":i.selected=!1;break;default:Ve(i,o,Nt,null,g,I)}for(j in g)if(I=g[j],ht=c[j],g.hasOwnProperty(j)&&I!==ht&&(I!=null||ht!=null))switch(j){case"selected":i.selected=I&&typeof I!="function"&&typeof I!="symbol";break;default:Ve(i,o,j,I,g,ht)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Bt in c)I=c[Bt],c.hasOwnProperty(Bt)&&I!=null&&!g.hasOwnProperty(Bt)&&Ve(i,o,Bt,null,g,I);for(B in g)if(I=g[B],ht=c[B],g.hasOwnProperty(B)&&I!==ht&&(I!=null||ht!=null))switch(B){case"children":case"dangerouslySetInnerHTML":if(I!=null)throw Error(o+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");break;default:Ve(i,o,B,I,g,ht)}return;default:if(mr(o)){for(var fn in c)I=c[fn],c.hasOwnProperty(fn)&&I!==void 0&&!g.hasOwnProperty(fn)&&Rf(i,o,fn,void 0,g,I);for(et in g)I=g[et],ht=c[et],!g.hasOwnProperty(et)||I===ht||I===void 0&&ht===void 0||Rf(i,o,et,I,g,ht);return}}for(var Ne in c)I=c[Ne],c.hasOwnProperty(Ne)&&I!=null&&!g.hasOwnProperty(Ne)&&Ve(i,o,Ne,null,g,I);for(st in g)I=g[st],ht=c[st],!g.hasOwnProperty(st)||I===ht||I==null&&ht==null||Ve(i,o,st,I,g,ht)}function Ba(i){switch(i){case"class":return"className";case"for":return"htmlFor";default:return i}}function Pl(i){var o={};i=i.style;for(var c=0;c<i.length;c++){var g=i[c];o[g]=i.getPropertyValue(g)}return o}function Ur(i,o,c){if(o!=null&&typeof o!="object")console.error("The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.");else{var g,b=g="",v;for(v in o)if(o.hasOwnProperty(v)){var A=o[v];A!=null&&typeof A!="boolean"&&A!==""&&(v.indexOf("--")===0?(Gh(A,v),g+=b+v+":"+(""+A).trim()):typeof A!="number"||A===0||$t.has(v)?(Gh(A,v),g+=b+v.replace(mt,"-$1").toLowerCase().replace(Ut,"-ms-")+":"+(""+A).trim()):g+=b+v.replace(mt,"-$1").toLowerCase().replace(Ut,"-ms-")+":"+A+"px",b=";")}g=g||null,o=i.getAttribute("style"),o!==g&&(g=Yo(g),Yo(o)!==g&&(c.style=Pl(i)))}}function bs(i,o,c,g,b,v){if(b.delete(c),i=i.getAttribute(c),i===null)switch(typeof g){case"undefined":case"function":case"symbol":case"boolean":return}else if(g!=null)switch(typeof g){case"function":case"symbol":case"boolean":break;default:if(qe(g,o),i===""+g)return}En(o,i,g,v)}function Hm(i,o,c,g,b,v){if(b.delete(c),i=i.getAttribute(c),i===null){switch(typeof g){case"function":case"symbol":return}if(!g)return}else switch(typeof g){case"function":case"symbol":break;default:if(g)return}En(o,i,g,v)}function km(i,o,c,g,b,v){if(b.delete(c),i=i.getAttribute(c),i===null)switch(typeof g){case"undefined":case"function":case"symbol":return}else if(g!=null)switch(typeof g){case"function":case"symbol":break;default:if(qe(g,c),i===""+g)return}En(o,i,g,v)}function zf(i,o,c,g,b,v){if(b.delete(c),i=i.getAttribute(c),i===null)switch(typeof g){case"undefined":case"function":case"symbol":case"boolean":return;default:if(isNaN(g))return}else if(g!=null)switch(typeof g){case"function":case"symbol":case"boolean":break;default:if(!isNaN(g)&&(qe(g,o),i===""+g))return}En(o,i,g,v)}function Vd(i,o,c,g,b,v){if(b.delete(c),i=i.getAttribute(c),i===null)switch(typeof g){case"undefined":case"function":case"symbol":case"boolean":return}else if(g!=null)switch(typeof g){case"function":case"symbol":case"boolean":break;default:if(qe(g,o),c=Zh(""+g),i===c)return}En(o,i,g,v)}function vs(i,o,c,g){for(var b={},v=new Set,A=i.attributes,O=0;O<A.length;O++)switch(A[O].name.toLowerCase()){case"value":break;case"checked":break;case"selected":break;default:v.add(A[O].name)}if(mr(o)){for(var j in c)if(c.hasOwnProperty(j)){var B=c[j];if(B!=null){if(qr.hasOwnProperty(j))typeof B!="function"&&An(j,B);else if(c.suppressHydrationWarning!==!0)switch(j){case"children":typeof B!="string"&&typeof B!="number"||En("children",i.textContent,B,b);continue;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":continue;case"dangerouslySetInnerHTML":A=i.innerHTML,B=B?B.__html:void 0,B!=null&&(B=Um(i,B),En(j,A,B,b));continue;case"style":v.delete(j),Ur(i,B,b);continue;case"offsetParent":case"offsetTop":case"offsetLeft":case"offsetWidth":case"offsetHeight":case"isContentEditable":case"outerText":case"outerHTML":v.delete(j.toLowerCase()),console.error("Assignment to read-only property will result in a no-op: `%s`",j);continue;case"className":v.delete("class"),A=$u(i,"class",B),En("className",A,B,b);continue;default:g.context===bu&&o!=="svg"&&o!=="math"?v.delete(j.toLowerCase()):v.delete(j),A=$u(i,j,B),En(j,A,B,b)}}}}else for(B in c)if(c.hasOwnProperty(B)&&(j=c[B],j!=null)){if(qr.hasOwnProperty(B))typeof j!="function"&&An(B,j);else if(c.suppressHydrationWarning!==!0)switch(B){case"children":typeof j!="string"&&typeof j!="number"||En("children",i.textContent,j,b);continue;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"value":case"checked":case"selected":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":continue;case"dangerouslySetInnerHTML":A=i.innerHTML,j=j?j.__html:void 0,j!=null&&(j=Um(i,j),A!==j&&(b[B]={__html:A}));continue;case"className":bs(i,B,"class",j,v,b);continue;case"tabIndex":bs(i,B,"tabindex",j,v,b);continue;case"style":v.delete(B),Ur(i,j,b);continue;case"multiple":v.delete(B),En(B,i.multiple,j,b);continue;case"muted":v.delete(B),En(B,i.muted,j,b);continue;case"autoFocus":v.delete("autofocus"),En(B,i.autofocus,j,b);continue;case"data":if(o!=="object"){v.delete(B),A=i.getAttribute("data"),En(B,A,j,b);continue}case"src":case"href":if(!(j!==""||o==="a"&&B==="href"||o==="object"&&B==="data")){console.error(B==="src"?'An empty string ("") was passed to the %s attribute. This may cause the browser to download the whole page again over the network. To fix this, either do not render the element at all or pass null to %s instead of an empty string.':'An empty string ("") was passed to the %s attribute. To fix this, either do not render the element at all or pass null to %s instead of an empty string.',B,B);continue}Vd(i,B,B,j,v,b);continue;case"action":case"formAction":if(A=i.getAttribute(B),typeof j=="function"){v.delete(B.toLowerCase()),B==="formAction"?(v.delete("name"),v.delete("formenctype"),v.delete("formmethod"),v.delete("formtarget")):(v.delete("enctype"),v.delete("method"),v.delete("target"));continue}else if(A===stt){v.delete(B.toLowerCase()),En(B,"function",j,b);continue}Vd(i,B,B.toLowerCase(),j,v,b);continue;case"xlinkHref":Vd(i,B,"xlink:href",j,v,b);continue;case"contentEditable":km(i,B,"contenteditable",j,v,b);continue;case"spellCheck":km(i,B,"spellcheck",j,v,b);continue;case"draggable":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":km(i,B,B,j,v,b);continue;case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":Hm(i,B,B.toLowerCase(),j,v,b);continue;case"capture":case"download":t:{O=i;var et=A=B,st=b;if(v.delete(et),O=O.getAttribute(et),O===null)switch(typeof j){case"undefined":case"function":case"symbol":break t;default:if(j===!1)break t}else if(j!=null)switch(typeof j){case"function":case"symbol":break;case"boolean":if(j===!0&&O==="")break t;break;default:if(qe(j,A),O===""+j)break t}En(A,O,j,st)}continue;case"cols":case"rows":case"size":case"span":t:{if(O=i,et=A=B,st=b,v.delete(et),O=O.getAttribute(et),O===null)switch(typeof j){case"undefined":case"function":case"symbol":case"boolean":break t;default:if(isNaN(j)||1>j)break t}else if(j!=null)switch(typeof j){case"function":case"symbol":case"boolean":break;default:if(!(isNaN(j)||1>j)&&(qe(j,A),O===""+j))break t}En(A,O,j,st)}continue;case"rowSpan":zf(i,B,"rowspan",j,v,b);continue;case"start":zf(i,B,B,j,v,b);continue;case"xHeight":bs(i,B,"x-height",j,v,b);continue;case"xlinkActuate":bs(i,B,"xlink:actuate",j,v,b);continue;case"xlinkArcrole":bs(i,B,"xlink:arcrole",j,v,b);continue;case"xlinkRole":bs(i,B,"xlink:role",j,v,b);continue;case"xlinkShow":bs(i,B,"xlink:show",j,v,b);continue;case"xlinkTitle":bs(i,B,"xlink:title",j,v,b);continue;case"xlinkType":bs(i,B,"xlink:type",j,v,b);continue;case"xmlBase":bs(i,B,"xml:base",j,v,b);continue;case"xmlLang":bs(i,B,"xml:lang",j,v,b);continue;case"xmlSpace":bs(i,B,"xml:space",j,v,b);continue;case"inert":j!==""||tE[B]||(tE[B]=!0,console.error("Received an empty string for a boolean attribute `%s`. This will treat the attribute as if it were false. Either pass `false` to silence this warning, or pass `true` if you used an empty string in earlier versions of React to indicate this attribute is true.",B)),Hm(i,B,B,j,v,b);continue;default:if(!(2<B.length)||B[0]!=="o"&&B[0]!=="O"||B[1]!=="n"&&B[1]!=="N"){O=$S(B),A=!1,g.context===bu&&o!=="svg"&&o!=="math"?v.delete(O.toLowerCase()):(et=B.toLowerCase(),et=Qo.hasOwnProperty(et)&&Qo[et]||null,et!==null&&et!==B&&(A=!0,v.delete(et)),v.delete(O));t:if(et=i,st=O,O=j,$h(st))if(et.hasAttribute(st))et=et.getAttribute(st),qe(O,st),O=et===""+O?O:et;else{switch(typeof O){case"function":case"symbol":break t;case"boolean":if(et=st.toLowerCase().slice(0,5),et!=="data-"&&et!=="aria-")break t}O=O===void 0?void 0:null}else O=void 0;A||En(B,O,j,b)}}}return 0<v.size&&c.suppressHydrationWarning!==!0&&kd(i,v,b),Object.keys(b).length===0?null:b}function Dw(i,o){switch(i.length){case 0:return"";case 1:return i[0];case 2:return i[0]+" "+o+" "+i[1];default:return i.slice(0,-1).join(", ")+", "+o+" "+i[i.length-1]}}function as(i){switch(i){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Rw(){if(typeof performance.getEntriesByType=="function"){for(var i=0,o=0,c=performance.getEntriesByType("resource"),g=0;g<c.length;g++){var b=c[g],v=b.transferSize,A=b.initiatorType,O=b.duration;if(v&&O&&as(A)){for(A=0,O=b.responseEnd,g+=1;g<c.length;g++){var j=c[g],B=j.startTime;if(B>O)break;var et=j.transferSize,st=j.initiatorType;et&&as(st)&&(j=j.responseEnd,A+=et*(j<O?1:(O-B)/(j-B)))}if(--g,o+=8*(v+A)/(b.duration/1e3),i++,10<i)break}}if(0<i)return o/i/1e6}return navigator.connection&&(i=navigator.connection.downlink,typeof i=="number")?i:5}function Gd(i){return i.nodeType===9?i:i.ownerDocument}function zw(i){switch(i){case de:return ky;case oe:return nE;default:return bu}}function Pa(i,o){if(i===bu)switch(o){case"svg":return ky;case"math":return nE;default:return bu}return i===ky&&o==="foreignObject"?bu:i}function Nf(i,o){return i==="textarea"||i==="noscript"||typeof o.children=="string"||typeof o.children=="number"||typeof o.children=="bigint"||typeof o.dangerouslySetInnerHTML=="object"&&o.dangerouslySetInnerHTML!==null&&o.dangerouslySetInnerHTML.__html!=null}function Rv(){var i=window.event;return i&&i.type==="popstate"?i===T2?!1:(T2=i,!0):(T2=null,!1)}function Hr(){var i=window.event;return i&&i!==Xx?i.type:null}function Lf(){var i=window.event;return i&&i!==Xx?i.timeStamp:-1.1}function Nw(i){setTimeout(function(){throw i})}function Lw(i,o,c){switch(o){case"button":case"input":case"select":case"textarea":c.autoFocus&&i.focus();break;case"img":c.src?i.src=c.src:c.srcSet&&(i.srcset=c.srcSet)}}function jw(){}function Vm(i,o,c,g){Fn(i,o,c,g),i[cs]=g}function Gm(i){yc(i,"")}function pM(i,o,c){i.nodeValue=c}function _w(i){if(!i.__reactWarnedAboutChildrenConflict){var o=i[cs]||null;if(o!==null){var c=Eo(i);c!==null&&(typeof o.children=="string"||typeof o.children=="number"?(i.__reactWarnedAboutChildrenConflict=!0,Lt(c,function(){console.error('Cannot use a ref on a React element as a container to `createRoot` or `createPortal` if that element also sets "children" text content using React. It should be a leaf with no children. Otherwise it\'s ambiguous which children should be used.')})):o.dangerouslySetInnerHTML!=null&&(i.__reactWarnedAboutChildrenConflict=!0,Lt(c,function(){console.error('Cannot use a ref on a React element as a container to `createRoot` or `createPortal` if that element also sets "dangerouslySetInnerHTML" using React. It should be a leaf with no children. Otherwise it\'s ambiguous which children should be used.')})))}}}function Ul(i){return i==="head"}function Bw(i,o){i.removeChild(o)}function Pw(i,o){(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i).removeChild(o)}function Qc(i,o){var c=o,g=0;do{var b=c.nextSibling;if(i.removeChild(c),b&&b.nodeType===8)if(c=b.data,c===Yx||c===eE){if(g===0){i.removeChild(b),Wc(o);return}g--}else if(c===qx||c===mh||c===Ag||c===Hy||c===Eg)g++;else if(c===rtt)Ha(i.ownerDocument.documentElement);else if(c===ltt){c=i.ownerDocument.head,Ha(c);for(var v=c.firstChild;v;){var A=v.nextSibling,O=v.nodeName;v[Qf]||O==="SCRIPT"||O==="STYLE"||O==="LINK"&&v.rel.toLowerCase()==="stylesheet"||c.removeChild(v),v=A}}else c===att&&Ha(i.ownerDocument.body);c=b}while(c);Wc(o)}function $d(i,o){var c=i;i=0;do{var g=c.nextSibling;if(c.nodeType===1?o?(c._stashedDisplay=c.style.display,c.style.display="none"):(c.style.display=c._stashedDisplay||"",c.getAttribute("style")===""&&c.removeAttribute("style")):c.nodeType===3&&(o?(c._stashedText=c.nodeValue,c.nodeValue=""):c.nodeValue=c._stashedText||""),g&&g.nodeType===8)if(c=g.data,c===Yx){if(i===0)break;i--}else c!==qx&&c!==mh&&c!==Ag&&c!==Hy||i++;c=g}while(c)}function Uw(i){$d(i,!0)}function Hw(i){i=i.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"}function kw(i){i.nodeValue=""}function Vw(i){$d(i,!1)}function Gw(i,o){o=o[ctt],o=o!=null&&o.hasOwnProperty("display")?o.display:null,i.style.display=o==null||typeof o=="boolean"?"":(""+o).trim()}function $w(i,o){i.nodeValue=o}function jf(i){var o=i.firstChild;for(o&&o.nodeType===10&&(o=o.nextSibling);o;){var c=o;switch(o=o.nextSibling,c.nodeName){case"HTML":case"HEAD":case"BODY":jf(c),e0(c);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(c.rel.toLowerCase()==="stylesheet")continue}i.removeChild(c)}}function qw(i,o,c,g){for(;i.nodeType===1;){var b=c;if(i.nodeName.toLowerCase()!==o.toLowerCase()){if(!g&&(i.nodeName!=="INPUT"||i.type!=="hidden"))break}else if(g){if(!i[Qf])switch(o){case"meta":if(!i.hasAttribute("itemprop"))break;return i;case"link":if(v=i.getAttribute("rel"),v==="stylesheet"&&i.hasAttribute("data-precedence"))break;if(v!==b.rel||i.getAttribute("href")!==(b.href==null||b.href===""?null:b.href)||i.getAttribute("crossorigin")!==(b.crossOrigin==null?null:b.crossOrigin)||i.getAttribute("title")!==(b.title==null?null:b.title))break;return i;case"style":if(i.hasAttribute("data-precedence"))break;return i;case"script":if(v=i.getAttribute("src"),(v!==(b.src==null?null:b.src)||i.getAttribute("type")!==(b.type==null?null:b.type)||i.getAttribute("crossorigin")!==(b.crossOrigin==null?null:b.crossOrigin))&&v&&i.hasAttribute("async")&&!i.hasAttribute("itemprop"))break;return i;default:return i}}else if(o==="input"&&i.type==="hidden"){qe(b.name,"name");var v=b.name==null?null:""+b.name;if(b.type==="hidden"&&i.getAttribute("name")===v)return i}else return i;if(i=qs(i.nextSibling),i===null)break}return null}function Yw(i,o,c){if(o==="")return null;for(;i.nodeType!==3;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!c||(i=qs(i.nextSibling),i===null))return null;return i}function Qe(i,o){for(;i.nodeType!==8;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!o||(i=qs(i.nextSibling),i===null))return null;return i}function qd(i){return i.data===mh||i.data===Ag}function zv(i){return i.data===Hy||i.data===mh&&i.ownerDocument.readyState!==aB}function Xw(i,o){var c=i.ownerDocument;if(i.data===Ag)i._reactRetry=o;else if(i.data!==mh||c.readyState!==aB)o();else{var g=function(){o(),c.removeEventListener("DOMContentLoaded",g)};c.addEventListener("DOMContentLoaded",g),i._reactRetry=g}}function qs(i){for(;i!=null;i=i.nextSibling){var o=i.nodeType;if(o===1||o===3)break;if(o===8){if(o=i.data,o===qx||o===Hy||o===mh||o===Ag||o===Eg||o===C2||o===rB)break;if(o===Yx||o===eE)return null}}return i}function Iw(i){if(i.nodeType===1){for(var o=i.nodeName.toLowerCase(),c={},g=i.attributes,b=0;b<g.length;b++){var v=g[b];c[Ba(v.name)]=v.name.toLowerCase()==="style"?Pl(i):v.value}return{type:o,props:c}}return i.nodeType===8?i.data===Eg?{type:"Activity",props:{}}:{type:"Suspense",props:{}}:i.nodeValue}function Zw(i,o,c){return c===null||c[ott]!==!0?(i.nodeValue===o?i=null:(o=Yo(o),i=Yo(i.nodeValue)===o?null:i.nodeValue),i):null}function _f(i){i=i.nextSibling;for(var o=0;i;){if(i.nodeType===8){var c=i.data;if(c===Yx||c===eE){if(o===0)return qs(i.nextSibling);o--}else c!==qx&&c!==Hy&&c!==mh&&c!==Ag&&c!==Eg||o++}i=i.nextSibling}return null}function Fc(i){i=i.previousSibling;for(var o=0;i;){if(i.nodeType===8){var c=i.data;if(c===qx||c===Hy||c===mh||c===Ag||c===Eg){if(o===0)return i;o--}else c!==Yx&&c!==eE||o++}i=i.previousSibling}return null}function Nv(i){Wc(i)}function $m(i){Wc(i)}function Lv(i){Wc(i)}function Ua(i,o,c,g,b){switch(b&&Xh(i,g.ancestorInfo),o=Gd(c),i){case"html":if(i=o.documentElement,!i)throw Error("React expected an <html> element (document.documentElement) to exist in the Document but one was not found. React never removes the documentElement for any Document it renders into so the cause is likely in some other script running on this page.");return i;case"head":if(i=o.head,!i)throw Error("React expected a <head> element (document.head) to exist in the Document but one was not found. React never removes the head for any Document it renders into so the cause is likely in some other script running on this page.");return i;case"body":if(i=o.body,!i)throw Error("React expected a <body> element (document.body) to exist in the Document but one was not found. React never removes the body for any Document it renders into so the cause is likely in some other script running on this page.");return i;default:throw Error("resolveSingletonInstance was called with an element type that is not supported. This is a bug in React.")}}function kr(i,o,c,g){if(!c[Va]&&Eo(c)){var b=c.tagName.toLowerCase();console.error("You are mounting a new %s component when a previous one has not first unmounted. It is an error to render more than one %s component at a time and attributes and children of these components will likely fail in unpredictable ways. Please only render a single instance of <%s> and if you need to mount a new one, ensure any previous ones have unmounted first.",b,b,b)}switch(i){case"html":case"head":case"body":break;default:console.error("acquireSingletonInstance was called with an element type that is not supported. This is a bug in React.")}for(b=c.attributes;b.length;)c.removeAttributeNode(b[0]);mn(c,i,o),c[yn]=g,c[cs]=o}function Ha(i){for(var o=i.attributes;o.length;)i.removeAttributeNode(o[0]);e0(i)}function qm(i){return typeof i.getRootNode=="function"?i.getRootNode():i.nodeType===9?i:i.ownerDocument}function jv(i,o,c){var g=Vy;if(g&&typeof o=="string"&&o){var b=Fe(o);b='link[rel="'+i+'"][href="'+b+'"]',typeof c=="string"&&(b+='[crossorigin="'+c+'"]'),dB.has(b)||(dB.add(b),i={rel:i,crossOrigin:c,href:o},g.querySelector(b)===null&&(o=g.createElement("link"),mn(o,"link",i),jn(o),g.head.appendChild(o)))}}function _v(i,o,c,g){var b=(b=Ys.current)?qm(b):null;if(!b)throw Error('"resourceRoot" was expected to exist. This is a bug in React.');switch(i){case"meta":case"title":return null;case"style":return typeof c.precedence=="string"&&typeof c.href=="string"?(c=Jc(c.href),o=eo(b).hoistableStyles,g=o.get(c),g||(g={type:"style",instance:null,count:0,state:null},o.set(c,g)),g):{type:"void",instance:null,count:0,state:null};case"link":if(c.rel==="stylesheet"&&typeof c.href=="string"&&typeof c.precedence=="string"){i=Jc(c.href);var v=eo(b).hoistableStyles,A=v.get(i);if(!A&&(b=b.ownerDocument||b,A={type:"stylesheet",instance:null,count:0,state:{loading:Mg,preload:null}},v.set(i,A),(v=b.querySelector(Xd(i)))&&!v._p&&(A.instance=v,A.state.loading=Ix|ea),!na.has(i))){var O={rel:"preload",as:"style",href:c.href,crossOrigin:c.crossOrigin,integrity:c.integrity,media:c.media,hrefLang:c.hrefLang,referrerPolicy:c.referrerPolicy};na.set(i,O),v||Qw(b,i,O,A.state)}if(o&&g===null)throw c=`
|
|
1172
|
+
|
|
1173
|
+
- `+Yd(o)+`
|
|
1174
|
+
+ `+Yd(c),Error("Expected <link> not to update to be updated to a stylesheet with precedence. Check the `rel`, `href`, and `precedence` props of this component. Alternatively, check whether two different <link> components render in the same slot or share the same key."+c);return A}if(o&&g!==null)throw c=`
|
|
1175
|
+
|
|
1176
|
+
- `+Yd(o)+`
|
|
1177
|
+
+ `+Yd(c),Error("Expected stylesheet with precedence to not be updated to a different kind of <link>. Check the `rel`, `href`, and `precedence` props of this component. Alternatively, check whether two different <link> components render in the same slot or share the same key."+c);return null;case"script":return o=c.async,c=c.src,typeof c=="string"&&o&&typeof o!="function"&&typeof o!="symbol"?(c=Kc(c),o=eo(b).hoistableScripts,g=o.get(c),g||(g={type:"script",instance:null,count:0,state:null},o.set(c,g)),g):{type:"void",instance:null,count:0,state:null};default:throw Error('getResource encountered a type it did not expect: "'+i+'". this is a bug in React.')}}function Yd(i){var o=0,c="<link";return typeof i.rel=="string"?(o++,c+=' rel="'+i.rel+'"'):Xs.call(i,"rel")&&(o++,c+=' rel="'+(i.rel===null?"null":"invalid type "+typeof i.rel)+'"'),typeof i.href=="string"?(o++,c+=' href="'+i.href+'"'):Xs.call(i,"href")&&(o++,c+=' href="'+(i.href===null?"null":"invalid type "+typeof i.href)+'"'),typeof i.precedence=="string"?(o++,c+=' precedence="'+i.precedence+'"'):Xs.call(i,"precedence")&&(o++,c+=" precedence={"+(i.precedence===null?"null":"invalid type "+typeof i.precedence)+"}"),Object.getOwnPropertyNames(i).length>o&&(c+=" ..."),c+" />"}function Jc(i){return'href="'+Fe(i)+'"'}function Xd(i){return'link[rel="stylesheet"]['+i+"]"}function Ym(i){return pe({},i,{"data-precedence":i.precedence,precedence:null})}function Qw(i,o,c,g){i.querySelector('link[rel="preload"][as="style"]['+o+"]")?g.loading=Ix:(o=i.createElement("link"),g.preload=o,o.addEventListener("load",function(){return g.loading|=Ix}),o.addEventListener("error",function(){return g.loading|=fB}),mn(o,"link",c),jn(o),i.head.appendChild(o))}function Kc(i){return'[src="'+Fe(i)+'"]'}function Id(i){return"script[async]"+i}function Xm(i,o,c){if(o.count++,o.instance===null)switch(o.type){case"style":var g=i.querySelector('style[data-href~="'+Fe(c.href)+'"]');if(g)return o.instance=g,jn(g),g;var b=pe({},c,{"data-href":c.href,"data-precedence":c.precedence,href:null,precedence:null});return g=(i.ownerDocument||i).createElement("style"),jn(g),mn(g,"style",b),Bf(g,c.precedence,i),o.instance=g;case"stylesheet":b=Jc(c.href);var v=i.querySelector(Xd(b));if(v)return o.state.loading|=ea,o.instance=v,jn(v),v;g=Ym(c),(b=na.get(b))&&Bv(g,b),v=(i.ownerDocument||i).createElement("link"),jn(v);var A=v;return A._p=new Promise(function(O,j){A.onload=O,A.onerror=j}),mn(v,"link",g),o.state.loading|=ea,Bf(v,c.precedence,i),o.instance=v;case"script":return v=Kc(c.src),(b=i.querySelector(Id(v)))?(o.instance=b,jn(b),b):(g=c,(b=na.get(v))&&(g=pe({},c),Pv(g,b)),i=i.ownerDocument||i,b=i.createElement("script"),jn(b),mn(b,"link",g),i.head.appendChild(b),o.instance=b);case"void":return null;default:throw Error('acquireResource encountered a resource type it did not expect: "'+o.type+'". this is a bug in React.')}else o.type==="stylesheet"&&(o.state.loading&ea)===Mg&&(g=o.instance,o.state.loading|=ea,Bf(g,c.precedence,i));return o.instance}function Bf(i,o,c){for(var g=c.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),b=g.length?g[g.length-1]:null,v=b,A=0;A<g.length;A++){var O=g[A];if(O.dataset.precedence===o)v=O;else if(v!==b)break}v?v.parentNode.insertBefore(i,v.nextSibling):(o=c.nodeType===9?c.head:c,o.insertBefore(i,o.firstChild))}function Bv(i,o){i.crossOrigin==null&&(i.crossOrigin=o.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=o.referrerPolicy),i.title==null&&(i.title=o.title)}function Pv(i,o){i.crossOrigin==null&&(i.crossOrigin=o.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=o.referrerPolicy),i.integrity==null&&(i.integrity=o.integrity)}function Pf(i,o,c){if(iE===null){var g=new Map,b=iE=new Map;b.set(c,g)}else b=iE,g=b.get(c),g||(g=new Map,b.set(c,g));if(g.has(i))return g;for(g.set(i,null),c=c.getElementsByTagName(i),b=0;b<c.length;b++){var v=c[b];if(!(v[Qf]||v[yn]||i==="link"&&v.getAttribute("rel")==="stylesheet")&&v.namespaceURI!==de){var A=v.getAttribute(o)||"";A=i+A;var O=g.get(A);O?O.push(v):g.set(A,[v])}}return g}function Fw(i,o,c){i=i.ownerDocument||i,i.head.insertBefore(c,o==="title"?i.querySelector("head > title"):null)}function Jw(i,o,c){var g=!c.ancestorInfo.containerTagInScope;if(c.context===ky||o.itemProp!=null)return!g||o.itemProp==null||i!=="meta"&&i!=="title"&&i!=="style"&&i!=="link"&&i!=="script"||console.error("Cannot render a <%s> outside the main document if it has an `itemProp` prop. `itemProp` suggests the tag belongs to an `itemScope` which can appear anywhere in the DOM. If you were intending for React to hoist this <%s> remove the `itemProp` prop. Otherwise, try moving this tag into the <head> or <body> of the Document.",i,i),!1;switch(i){case"meta":case"title":return!0;case"style":if(typeof o.precedence!="string"||typeof o.href!="string"||o.href===""){g&&console.error('Cannot render a <style> outside the main document without knowing its precedence and a unique href key. React can hoist and deduplicate <style> tags if you provide a `precedence` prop along with an `href` prop that does not conflict with the `href` values used in any other hoisted <style> or <link rel="stylesheet" ...> tags. Note that hoisting <style> tags is considered an advanced feature that most will not use directly. Consider moving the <style> tag to the <head> or consider adding a `precedence="default"` and `href="some unique resource identifier"`.');break}return!0;case"link":if(typeof o.rel!="string"||typeof o.href!="string"||o.href===""||o.onLoad||o.onError){if(o.rel==="stylesheet"&&typeof o.precedence=="string"){i=o.href;var b=o.onError,v=o.disabled;c=[],o.onLoad&&c.push("`onLoad`"),b&&c.push("`onError`"),v!=null&&c.push("`disabled`"),b=Dw(c,"and"),b+=c.length===1?" prop":" props",v=c.length===1?"an "+b:"the "+b,c.length&&console.error('React encountered a <link rel="stylesheet" href="%s" ... /> with a `precedence` prop that also included %s. The presence of loading and error handlers indicates an intent to manage the stylesheet loading state from your from your Component code and React will not hoist or deduplicate this stylesheet. If your intent was to have React hoist and deduplciate this stylesheet using the `precedence` prop remove the %s, otherwise remove the `precedence` prop.',i,v,b)}g&&(typeof o.rel!="string"||typeof o.href!="string"||o.href===""?console.error("Cannot render a <link> outside the main document without a `rel` and `href` prop. Try adding a `rel` and/or `href` prop to this <link> or moving the link into the <head> tag"):(o.onError||o.onLoad)&&console.error("Cannot render a <link> with onLoad or onError listeners outside the main document. Try removing onLoad={...} and onError={...} or moving it into the root <head> tag or somewhere in the <body>."));break}switch(o.rel){case"stylesheet":return i=o.precedence,o=o.disabled,typeof i!="string"&&g&&console.error('Cannot render a <link rel="stylesheet" /> outside the main document without knowing its precedence. Consider adding precedence="default" or moving it into the root <head> tag.'),typeof i=="string"&&o==null;default:return!0}case"script":if(i=o.async&&typeof o.async!="function"&&typeof o.async!="symbol",!i||o.onLoad||o.onError||!o.src||typeof o.src!="string"){g&&(i?o.onLoad||o.onError?console.error("Cannot render a <script> with onLoad or onError listeners outside the main document. Try removing onLoad={...} and onError={...} or moving it into the root <head> tag or somewhere in the <body>."):console.error("Cannot render a <script> outside the main document without `async={true}` and a non-empty `src` prop. Ensure there is a valid `src` and either make the script async or move it into the root <head> tag or somewhere in the <body>."):console.error('Cannot render a sync or defer <script> outside the main document without knowing its order. Try adding async="" or moving it into the root <head> tag.'));break}return!0;case"noscript":case"template":g&&console.error("Cannot render <%s> outside the main document. Try moving it into the root <head> tag.",i)}return!1}function we(i){return!(i.type==="stylesheet"&&(i.state.loading&hB)===Mg)}function Uv(i,o,c,g){if(c.type==="stylesheet"&&(typeof g.media!="string"||matchMedia(g.media).matches!==!1)&&(c.state.loading&ea)===Mg){if(c.instance===null){var b=Jc(g.href),v=o.querySelector(Xd(b));if(v){o=v._p,o!==null&&typeof o=="object"&&typeof o.then=="function"&&(i.count++,i=Uf.bind(i),o.then(i,i)),c.state.loading|=ea,c.instance=v,jn(v);return}v=o.ownerDocument||o,g=Ym(g),(b=na.get(b))&&Bv(g,b),v=v.createElement("link"),jn(v);var A=v;A._p=new Promise(function(O,j){A.onload=O,A.onerror=j}),mn(v,"link",g),c.instance=v}i.stylesheets===null&&(i.stylesheets=new Map),i.stylesheets.set(c,o),(o=c.state.preload)&&(c.state.loading&hB)===Mg&&(i.count++,c=Uf.bind(i),o.addEventListener("load",c),o.addEventListener("error",c))}}function Im(i,o){return i.stylesheets&&i.count===0&&Zd(i,i.stylesheets),0<i.count||0<i.imgCount?function(c){var g=setTimeout(function(){if(i.stylesheets&&Zd(i,i.stylesheets),i.unsuspend){var v=i.unsuspend;i.unsuspend=null,v()}},htt+o);0<i.imgBytes&&O2===0&&(O2=125*Rw()*gtt);var b=setTimeout(function(){if(i.waitingForImages=!1,i.count===0&&(i.stylesheets&&Zd(i,i.stylesheets),i.unsuspend)){var v=i.unsuspend;i.unsuspend=null,v()}},(i.imgBytes>O2?50:dtt)+o);return i.unsuspend=c,function(){i.unsuspend=null,clearTimeout(g),clearTimeout(b)}}:null}function Uf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Zd(this,this.stylesheets);else if(this.unsuspend){var i=this.unsuspend;this.unsuspend=null,i()}}}function Zd(i,o){i.stylesheets=null,i.unsuspend!==null&&(i.count++,sE=new Map,o.forEach(Hv,i),sE=null,Uf.call(i))}function Hv(i,o){if(!(o.state.loading&ea)){var c=sE.get(i);if(c)var g=c.get(D2);else{c=new Map,sE.set(i,c);for(var b=i.querySelectorAll("link[data-precedence],style[data-precedence]"),v=0;v<b.length;v++){var A=b[v];(A.nodeName==="LINK"||A.getAttribute("media")!=="not all")&&(c.set(A.dataset.precedence,A),g=A)}g&&c.set(D2,g)}b=o.instance,A=b.getAttribute("data-precedence"),v=c.get(A)||g,v===g&&c.set(D2,b),c.set(A,b),this.count++,g=Uf.bind(this),b.addEventListener("load",g),b.addEventListener("error",g),v?v.parentNode.insertBefore(b,v.nextSibling):(i=i.nodeType===9?i.head:i,i.insertBefore(b,i.firstChild)),o.state.loading|=ea}}function Qd(i,o,c,g,b,v,A,O,j){for(this.tag=1,this.containerInfo=i,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=Tg,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Sp(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Sp(0),this.hiddenUpdates=Sp(null),this.identifierPrefix=g,this.onUncaughtError=b,this.onCaughtError=v,this.onRecoverableError=A,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=j,this.incompleteTransitions=new Map,this.passiveEffectDuration=this.effectDuration=-0,this.memoizedUpdaters=new Set,i=this.pendingUpdatersLaneMap=[],o=0;31>o;o++)i.push(new Set);this._debugRootType=c?"hydrateRoot()":"createRoot()"}function Fd(i,o,c,g,b,v,A,O,j,B,et,st){return i=new Qd(i,o,c,A,j,B,et,st,O),o=UW,v===!0&&(o|=ws|Ga),o|=me,v=w(3,null,null,o),i.current=v,v.stateNode=i,o=Xp(),Mc(o),i.pooledCache=o,Mc(o),v.memoizedState={element:g,isDehydrated:c,cache:o},Ee(v),i}function Kw(i){return i?(i=eh,i):eh}function Zm(i,o,c,g,b,v){if(Jn&&typeof Jn.onScheduleFiberRoot=="function")try{Jn.onScheduleFiberRoot(iu,g,c)}catch(A){Gr||(Gr=!0,console.error("React instrumentation encountered an error: %o",A))}b=Kw(b),g.context===null?g.context=b:g.pendingContext=b,Vr&&Ss!==null&&!yB&&(yB=!0,console.error(`Render methods should be a pure function of props and state; triggering nested component updates from render is not allowed. If necessary, trigger nested updates in componentDidUpdate.
|
|
1178
|
+
|
|
1179
|
+
Check the render method of %s.`,F(Ss)||"Unknown")),g=Zn(o),g.payload={element:c},v=v===void 0?null:v,v!==null&&(typeof v!="function"&&console.error("Expected the last optional `callback` argument to be a function. Instead received: %s.",v),g.callback=v),c=Cr(i,g,o),c!==null&&(xr(o,"root.render()",null),ee(c,i,o),co(c,i,o))}function Ww(i,o){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var c=i.retryLane;i.retryLane=c!==0&&c<o?c:o}}function kv(i,o){Ww(i,o),(i=i.alternate)&&Ww(i,o)}function Vv(i){if(i.tag===13||i.tag===31){var o=ji(i,67108864);o!==null&&ee(o,i,67108864),kv(i,67108864)}}function Gv(i){if(i.tag===13||i.tag===31){var o=Bi(i);o=fc(o);var c=ji(i,o);c!==null&&ee(c,i,o),kv(i,o)}}function We(){return Ss}function $v(i,o,c,g){var b=pt.T;pt.T=null;var v=Ge.p;try{Ge.p=Kn,qv(i,o,c,g)}finally{Ge.p=v,pt.T=b}}function Ci(i,o,c,g){var b=pt.T;pt.T=null;var v=Ge.p;try{Ge.p=Ai,qv(i,o,c,g)}finally{Ge.p=v,pt.T=b}}function qv(i,o,c,g){if(rE){var b=Qm(g);if(b===null)$o(i,o,g,aE,c),Jm(i,g);else if(tC(b,i,o,c,g))g.stopPropagation();else if(Jm(i,g),o&4&&-1<mtt.indexOf(i)){for(;b!==null;){var v=Eo(b);if(v!==null)switch(v.tag){case 3:if(v=v.stateNode,v.current.memoizedState.isDehydrated){var A=uc(v.pendingLanes);if(A!==0){var O=v;for(O.pendingLanes|=2,O.entangledLanes|=2;A;){var j=1<<31-Ei(A);O.entanglements[1]|=j,A&=~j}ys(v),(_e&(Mi|Wo))===Vi&&($C=ui()+Y_,Br(0))}}break;case 31:case 13:O=ji(v,2),O!==null&&ee(O,v,2),$s(),kv(v,2)}if(v=Qm(g),v===null&&$o(i,o,g,aE,c),v===b)break;b=v}b!==null&&g.stopPropagation()}else $o(i,o,g,null,c)}}function Qm(i){return i=Mo(i),Yv(i)}function Yv(i){if(aE=null,i=ba(i),i!==null){var o=N(i);if(o===null)i=null;else{var c=o.tag;if(c===13){if(i=L(o),i!==null)return i;i=null}else if(c===31){if(i=_(o),i!==null)return i;i=null}else if(c===3){if(o.stateNode.current.memoizedState.isDehydrated)return o.tag===3?o.stateNode.containerInfo:null;i=null}else o!==i&&(i=null)}}return aE=i,null}function Fm(i){switch(i){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return Kn;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return Ai;case"message":switch(ng()){case ex:return Kn;case ry:return Ai;case nu:case rC:return Ui;case ay:return $l;default:return Ui}default:return Ui}}function Jm(i,o){switch(i){case"focusin":case"focusout":yh=null;break;case"dragenter":case"dragleave":bh=null;break;case"mouseover":case"mouseout":vh=null;break;case"pointerover":case"pointerout":Qx.delete(o.pointerId);break;case"gotpointercapture":case"lostpointercapture":Fx.delete(o.pointerId)}}function Hl(i,o,c,g,b,v){return i===null||i.nativeEvent!==v?(i={blockedOn:o,domEventName:c,eventSystemFlags:g,nativeEvent:v,targetContainers:[b]},o!==null&&(o=Eo(o),o!==null&&Vv(o)),i):(i.eventSystemFlags|=g,o=i.targetContainers,b!==null&&o.indexOf(b)===-1&&o.push(b),i)}function tC(i,o,c,g,b){switch(o){case"focusin":return yh=Hl(yh,i,o,c,g,b),!0;case"dragenter":return bh=Hl(bh,i,o,c,g,b),!0;case"mouseover":return vh=Hl(vh,i,o,c,g,b),!0;case"pointerover":var v=b.pointerId;return Qx.set(v,Hl(Qx.get(v)||null,i,o,c,g,b)),!0;case"gotpointercapture":return v=b.pointerId,Fx.set(v,Hl(Fx.get(v)||null,i,o,c,g,b)),!0}return!1}function Xv(i){var o=ba(i.target);if(o!==null){var c=N(o);if(c!==null){if(o=c.tag,o===13){if(o=L(c),o!==null){i.blockedOn=o,VS(i.priority,function(){Gv(c)});return}}else if(o===31){if(o=_(c),o!==null){i.blockedOn=o,VS(i.priority,function(){Gv(c)});return}}else if(o===3&&c.stateNode.current.memoizedState.isDehydrated){i.blockedOn=c.tag===3?c.stateNode.containerInfo:null;return}}}i.blockedOn=null}function Hf(i){if(i.blockedOn!==null)return!1;for(var o=i.targetContainers;0<o.length;){var c=Qm(i.nativeEvent);if(c===null){c=i.nativeEvent;var g=new c.constructor(c.type,c),b=g;rx!==null&&console.error("Expected currently replaying event to be null. This error is likely caused by a bug in React. Please file an issue."),rx=b,c.target.dispatchEvent(g),rx===null&&console.error("Expected currently replaying event to not be null. This error is likely caused by a bug in React. Please file an issue."),rx=null}else return o=Eo(c),o!==null&&Vv(o),i.blockedOn=c,!1;o.shift()}return!0}function Km(i,o,c){Hf(i)&&c.delete(o)}function mM(){R2=!1,yh!==null&&Hf(yh)&&(yh=null),bh!==null&&Hf(bh)&&(bh=null),vh!==null&&Hf(vh)&&(vh=null),Qx.forEach(Km),Fx.forEach(Km)}function Jd(i,o){i.blockedOn===o&&(i.blockedOn=null,R2||(R2=!0,Hn.unstable_scheduleCallback(Hn.unstable_NormalPriority,mM)))}function eC(i){lE!==i&&(lE=i,Hn.unstable_scheduleCallback(Hn.unstable_NormalPriority,function(){lE===i&&(lE=null);for(var o=0;o<i.length;o+=3){var c=i[o],g=i[o+1],b=i[o+2];if(typeof g!="function"){if(Yv(g||c)===null)continue;break}var v=Eo(c);v!==null&&(i.splice(o,3),o-=3,c={pending:!0,data:b,method:c.method,action:g},Object.freeze(c),za(v,c,g,b))}}))}function Wc(i){function o(j){return Jd(j,i)}yh!==null&&Jd(yh,i),bh!==null&&Jd(bh,i),vh!==null&&Jd(vh,i),Qx.forEach(o),Fx.forEach(o);for(var c=0;c<xh.length;c++){var g=xh[c];g.blockedOn===i&&(g.blockedOn=null)}for(;0<xh.length&&(c=xh[0],c.blockedOn===null);)Xv(c),c.blockedOn===null&&xh.shift();if(c=(i.ownerDocument||i).$$reactFormReplay,c!=null)for(g=0;g<c.length;g+=3){var b=c[g],v=c[g+1],A=b[cs]||null;if(typeof v=="function")A||eC(c);else if(A){var O=null;if(v&&v.hasAttribute("formAction")){if(b=v,A=v[cs]||null)O=A.formAction;else if(Yv(b)!==null)continue}else O=A.action;typeof O=="function"?c[g+1]=O:(c.splice(g,3),g-=3),eC(c)}}}function nC(){function i(v){v.canIntercept&&v.info==="react-transition"&&v.intercept({handler:function(){return new Promise(function(A){return b=A})},focusReset:"manual",scroll:"manual"})}function o(){b!==null&&(b(),b=null),g||setTimeout(c,20)}function c(){if(!g&&!navigation.transition){var v=navigation.currentEntry;v&&v.url!=null&&navigation.navigate(v.url,{state:v.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var g=!1,b=null;return navigation.addEventListener("navigate",i),navigation.addEventListener("navigatesuccess",o),navigation.addEventListener("navigateerror",o),setTimeout(c,100),function(){g=!0,navigation.removeEventListener("navigate",i),navigation.removeEventListener("navigatesuccess",o),navigation.removeEventListener("navigateerror",o),b!==null&&(b(),b=null)}}}function Iv(i){this._internalRoot=i}function Xo(i){this._internalRoot=i}function Zv(i){i[Va]&&(i._reactRootContainer?console.error("You are calling ReactDOMClient.createRoot() on a container that was previously passed to ReactDOM.render(). This is not supported."):console.error("You are calling ReactDOMClient.createRoot() on a container that has already been passed to createRoot() before. Instead, call root.render() on the existing root instead if you want to update it."))}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var Hn=dj(),Kd=Yt,yM=Jx,pe=Object.assign,iC=Symbol.for("react.element"),go=Symbol.for("react.transitional.element"),kl=Symbol.for("react.portal"),kf=Symbol.for("react.fragment"),ls=Symbol.for("react.strict_mode"),Wd=Symbol.for("react.profiler"),Wm=Symbol.for("react.consumer"),Io=Symbol.for("react.context"),Vf=Symbol.for("react.forward_ref"),tu=Symbol.for("react.suspense"),xs=Symbol.for("react.suspense_list"),tg=Symbol.for("react.memo"),Pi=Symbol.for("react.lazy"),Zo=Symbol.for("react.activity"),bM=Symbol.for("react.memo_cache_sentinel"),sC=Symbol.iterator,Gf=Symbol.for("react.client.reference"),qn=Array.isArray,pt=Kd.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Ge=yM.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,vM=Object.freeze({pending:!1,data:null,method:null,action:null}),Qv=[],Fv=[],ka=-1,Vl=ct(null),$f=ct(null),Ys=ct(null),Gl=ct(null),qf=0,oC,eu,Yf,Jv,eg,ty,ey;Mt.__reactDisabledLog=!0;var Xf,Kv,ny=!1,Wv=new(typeof WeakMap=="function"?WeakMap:Map),Ss=null,Vr=!1,Xs=Object.prototype.hasOwnProperty,tx=Hn.unstable_scheduleCallback,iy=Hn.unstable_cancelCallback,sy=Hn.unstable_shouldYield,oy=Hn.unstable_requestPaint,ui=Hn.unstable_now,ng=Hn.unstable_getCurrentPriorityLevel,ex=Hn.unstable_ImmediatePriority,ry=Hn.unstable_UserBlockingPriority,nu=Hn.unstable_NormalPriority,rC=Hn.unstable_LowPriority,ay=Hn.unstable_IdlePriority,nx=Hn.log,aC=Hn.unstable_setDisableYieldValue,iu=null,Jn=null,Gr=!1,$r=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u",Ei=Math.clz32?Math.clz32:Wb,ix=Math.log,ly=Math.LN2,If=256,ig=262144,Zf=4194304,Kn=2,Ai=8,Ui=32,$l=268435456,po=Math.random().toString(36).slice(2),yn="__reactFiber$"+po,cs="__reactProps$"+po,Va="__reactContainer$"+po,su="__reactEvents$"+po,xM="__reactListeners$"+po,lC="__reactHandles$"+po,sg="__reactResources$"+po,Qf="__reactMarker$"+po,cC=new Set,qr={},Ff={},uC={button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0},Jf=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),sx={},cy={},uy=/[\n"\\]/g,ox=!1,fC=!1,og=!1,a=!1,u=!1,d=!1,m=["value","defaultValue"],C=!1,E=/["'&<>\n\t]|^\s|\s$/,z="address applet area article aside base basefont bgsound blockquote body br button caption center col colgroup dd details dir div dl dt embed fieldset figcaption figure footer form frame frameset h1 h2 h3 h4 h5 h6 head header hgroup hr html iframe img input isindex li link listing main marquee menu menuitem meta nav noembed noframes noscript object ol p param plaintext pre script section select source style summary table tbody td template textarea tfoot th thead title tr track ul wbr xmp".split(" "),P="applet caption html table td th marquee object template foreignObject desc title".split(" "),Q=P.concat(["button"]),ut="dd dt li option optgroup p rp rt".split(" "),bt={current:null,formTag:null,aTagInScope:null,buttonTagInScope:null,nobrTagInScope:null,pTagInButtonScope:null,listItemTagAutoclosing:null,dlItemTagAutoclosing:null,containerTagInScope:null,implicitRootScope:!1},Ct={},ft={animation:"animationDelay animationDirection animationDuration animationFillMode animationIterationCount animationName animationPlayState animationTimingFunction".split(" "),background:"backgroundAttachment backgroundClip backgroundColor backgroundImage backgroundOrigin backgroundPositionX backgroundPositionY backgroundRepeat backgroundSize".split(" "),backgroundPosition:["backgroundPositionX","backgroundPositionY"],border:"borderBottomColor borderBottomStyle borderBottomWidth borderImageOutset borderImageRepeat borderImageSlice borderImageSource borderImageWidth borderLeftColor borderLeftStyle borderLeftWidth borderRightColor borderRightStyle borderRightWidth borderTopColor borderTopStyle borderTopWidth".split(" "),borderBlockEnd:["borderBlockEndColor","borderBlockEndStyle","borderBlockEndWidth"],borderBlockStart:["borderBlockStartColor","borderBlockStartStyle","borderBlockStartWidth"],borderBottom:["borderBottomColor","borderBottomStyle","borderBottomWidth"],borderColor:["borderBottomColor","borderLeftColor","borderRightColor","borderTopColor"],borderImage:["borderImageOutset","borderImageRepeat","borderImageSlice","borderImageSource","borderImageWidth"],borderInlineEnd:["borderInlineEndColor","borderInlineEndStyle","borderInlineEndWidth"],borderInlineStart:["borderInlineStartColor","borderInlineStartStyle","borderInlineStartWidth"],borderLeft:["borderLeftColor","borderLeftStyle","borderLeftWidth"],borderRadius:["borderBottomLeftRadius","borderBottomRightRadius","borderTopLeftRadius","borderTopRightRadius"],borderRight:["borderRightColor","borderRightStyle","borderRightWidth"],borderStyle:["borderBottomStyle","borderLeftStyle","borderRightStyle","borderTopStyle"],borderTop:["borderTopColor","borderTopStyle","borderTopWidth"],borderWidth:["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth"],columnRule:["columnRuleColor","columnRuleStyle","columnRuleWidth"],columns:["columnCount","columnWidth"],flex:["flexBasis","flexGrow","flexShrink"],flexFlow:["flexDirection","flexWrap"],font:"fontFamily fontFeatureSettings fontKerning fontLanguageOverride fontSize fontSizeAdjust fontStretch fontStyle fontVariant fontVariantAlternates fontVariantCaps fontVariantEastAsian fontVariantLigatures fontVariantNumeric fontVariantPosition fontWeight lineHeight".split(" "),fontVariant:"fontVariantAlternates fontVariantCaps fontVariantEastAsian fontVariantLigatures fontVariantNumeric fontVariantPosition".split(" "),gap:["columnGap","rowGap"],grid:"gridAutoColumns gridAutoFlow gridAutoRows gridTemplateAreas gridTemplateColumns gridTemplateRows".split(" "),gridArea:["gridColumnEnd","gridColumnStart","gridRowEnd","gridRowStart"],gridColumn:["gridColumnEnd","gridColumnStart"],gridColumnGap:["columnGap"],gridGap:["columnGap","rowGap"],gridRow:["gridRowEnd","gridRowStart"],gridRowGap:["rowGap"],gridTemplate:["gridTemplateAreas","gridTemplateColumns","gridTemplateRows"],listStyle:["listStyleImage","listStylePosition","listStyleType"],margin:["marginBottom","marginLeft","marginRight","marginTop"],marker:["markerEnd","markerMid","markerStart"],mask:"maskClip maskComposite maskImage maskMode maskOrigin maskPositionX maskPositionY maskRepeat maskSize".split(" "),maskPosition:["maskPositionX","maskPositionY"],outline:["outlineColor","outlineStyle","outlineWidth"],overflow:["overflowX","overflowY"],padding:["paddingBottom","paddingLeft","paddingRight","paddingTop"],placeContent:["alignContent","justifyContent"],placeItems:["alignItems","justifyItems"],placeSelf:["alignSelf","justifySelf"],textDecoration:["textDecorationColor","textDecorationLine","textDecorationStyle"],textEmphasis:["textEmphasisColor","textEmphasisStyle"],transition:["transitionDelay","transitionDuration","transitionProperty","transitionTimingFunction"],wordWrap:["overflowWrap"]},mt=/([A-Z])/g,Ut=/^ms-/,Jt=/^(?:webkit|moz|o)[A-Z]/,tn=/^-ms-/,rt=/-(.)/g,it=/;\s*$/,at={},wt={},It=!1,je=!1,$t=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" ")),oe="http://www.w3.org/1998/Math/MathML",de="http://www.w3.org/2000/svg",Ue=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Qo={accept:"accept",acceptcharset:"acceptCharset","accept-charset":"acceptCharset",accesskey:"accessKey",action:"action",allowfullscreen:"allowFullScreen",alt:"alt",as:"as",async:"async",autocapitalize:"autoCapitalize",autocomplete:"autoComplete",autocorrect:"autoCorrect",autofocus:"autoFocus",autoplay:"autoPlay",autosave:"autoSave",capture:"capture",cellpadding:"cellPadding",cellspacing:"cellSpacing",challenge:"challenge",charset:"charSet",checked:"checked",children:"children",cite:"cite",class:"className",classid:"classID",classname:"className",cols:"cols",colspan:"colSpan",content:"content",contenteditable:"contentEditable",contextmenu:"contextMenu",controls:"controls",controlslist:"controlsList",coords:"coords",crossorigin:"crossOrigin",dangerouslysetinnerhtml:"dangerouslySetInnerHTML",data:"data",datetime:"dateTime",default:"default",defaultchecked:"defaultChecked",defaultvalue:"defaultValue",defer:"defer",dir:"dir",disabled:"disabled",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback",download:"download",draggable:"draggable",enctype:"encType",enterkeyhint:"enterKeyHint",fetchpriority:"fetchPriority",for:"htmlFor",form:"form",formmethod:"formMethod",formaction:"formAction",formenctype:"formEncType",formnovalidate:"formNoValidate",formtarget:"formTarget",frameborder:"frameBorder",headers:"headers",height:"height",hidden:"hidden",high:"high",href:"href",hreflang:"hrefLang",htmlfor:"htmlFor",httpequiv:"httpEquiv","http-equiv":"httpEquiv",icon:"icon",id:"id",imagesizes:"imageSizes",imagesrcset:"imageSrcSet",inert:"inert",innerhtml:"innerHTML",inputmode:"inputMode",integrity:"integrity",is:"is",itemid:"itemID",itemprop:"itemProp",itemref:"itemRef",itemscope:"itemScope",itemtype:"itemType",keyparams:"keyParams",keytype:"keyType",kind:"kind",label:"label",lang:"lang",list:"list",loop:"loop",low:"low",manifest:"manifest",marginwidth:"marginWidth",marginheight:"marginHeight",max:"max",maxlength:"maxLength",media:"media",mediagroup:"mediaGroup",method:"method",min:"min",minlength:"minLength",multiple:"multiple",muted:"muted",name:"name",nomodule:"noModule",nonce:"nonce",novalidate:"noValidate",open:"open",optimum:"optimum",pattern:"pattern",placeholder:"placeholder",playsinline:"playsInline",poster:"poster",preload:"preload",profile:"profile",radiogroup:"radioGroup",readonly:"readOnly",referrerpolicy:"referrerPolicy",rel:"rel",required:"required",reversed:"reversed",role:"role",rows:"rows",rowspan:"rowSpan",sandbox:"sandbox",scope:"scope",scoped:"scoped",scrolling:"scrolling",seamless:"seamless",selected:"selected",shape:"shape",size:"size",sizes:"sizes",span:"span",spellcheck:"spellCheck",src:"src",srcdoc:"srcDoc",srclang:"srcLang",srcset:"srcSet",start:"start",step:"step",style:"style",summary:"summary",tabindex:"tabIndex",target:"target",title:"title",type:"type",usemap:"useMap",value:"value",width:"width",wmode:"wmode",wrap:"wrap",about:"about",accentheight:"accentHeight","accent-height":"accentHeight",accumulate:"accumulate",additive:"additive",alignmentbaseline:"alignmentBaseline","alignment-baseline":"alignmentBaseline",allowreorder:"allowReorder",alphabetic:"alphabetic",amplitude:"amplitude",arabicform:"arabicForm","arabic-form":"arabicForm",ascent:"ascent",attributename:"attributeName",attributetype:"attributeType",autoreverse:"autoReverse",azimuth:"azimuth",basefrequency:"baseFrequency",baselineshift:"baselineShift","baseline-shift":"baselineShift",baseprofile:"baseProfile",bbox:"bbox",begin:"begin",bias:"bias",by:"by",calcmode:"calcMode",capheight:"capHeight","cap-height":"capHeight",clip:"clip",clippath:"clipPath","clip-path":"clipPath",clippathunits:"clipPathUnits",cliprule:"clipRule","clip-rule":"clipRule",color:"color",colorinterpolation:"colorInterpolation","color-interpolation":"colorInterpolation",colorinterpolationfilters:"colorInterpolationFilters","color-interpolation-filters":"colorInterpolationFilters",colorprofile:"colorProfile","color-profile":"colorProfile",colorrendering:"colorRendering","color-rendering":"colorRendering",contentscripttype:"contentScriptType",contentstyletype:"contentStyleType",cursor:"cursor",cx:"cx",cy:"cy",d:"d",datatype:"datatype",decelerate:"decelerate",descent:"descent",diffuseconstant:"diffuseConstant",direction:"direction",display:"display",divisor:"divisor",dominantbaseline:"dominantBaseline","dominant-baseline":"dominantBaseline",dur:"dur",dx:"dx",dy:"dy",edgemode:"edgeMode",elevation:"elevation",enablebackground:"enableBackground","enable-background":"enableBackground",end:"end",exponent:"exponent",externalresourcesrequired:"externalResourcesRequired",fill:"fill",fillopacity:"fillOpacity","fill-opacity":"fillOpacity",fillrule:"fillRule","fill-rule":"fillRule",filter:"filter",filterres:"filterRes",filterunits:"filterUnits",floodopacity:"floodOpacity","flood-opacity":"floodOpacity",floodcolor:"floodColor","flood-color":"floodColor",focusable:"focusable",fontfamily:"fontFamily","font-family":"fontFamily",fontsize:"fontSize","font-size":"fontSize",fontsizeadjust:"fontSizeAdjust","font-size-adjust":"fontSizeAdjust",fontstretch:"fontStretch","font-stretch":"fontStretch",fontstyle:"fontStyle","font-style":"fontStyle",fontvariant:"fontVariant","font-variant":"fontVariant",fontweight:"fontWeight","font-weight":"fontWeight",format:"format",from:"from",fx:"fx",fy:"fy",g1:"g1",g2:"g2",glyphname:"glyphName","glyph-name":"glyphName",glyphorientationhorizontal:"glyphOrientationHorizontal","glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphorientationvertical:"glyphOrientationVertical","glyph-orientation-vertical":"glyphOrientationVertical",glyphref:"glyphRef",gradienttransform:"gradientTransform",gradientunits:"gradientUnits",hanging:"hanging",horizadvx:"horizAdvX","horiz-adv-x":"horizAdvX",horizoriginx:"horizOriginX","horiz-origin-x":"horizOriginX",ideographic:"ideographic",imagerendering:"imageRendering","image-rendering":"imageRendering",in2:"in2",in:"in",inlist:"inlist",intercept:"intercept",k1:"k1",k2:"k2",k3:"k3",k4:"k4",k:"k",kernelmatrix:"kernelMatrix",kernelunitlength:"kernelUnitLength",kerning:"kerning",keypoints:"keyPoints",keysplines:"keySplines",keytimes:"keyTimes",lengthadjust:"lengthAdjust",letterspacing:"letterSpacing","letter-spacing":"letterSpacing",lightingcolor:"lightingColor","lighting-color":"lightingColor",limitingconeangle:"limitingConeAngle",local:"local",markerend:"markerEnd","marker-end":"markerEnd",markerheight:"markerHeight",markermid:"markerMid","marker-mid":"markerMid",markerstart:"markerStart","marker-start":"markerStart",markerunits:"markerUnits",markerwidth:"markerWidth",mask:"mask",maskcontentunits:"maskContentUnits",maskunits:"maskUnits",mathematical:"mathematical",mode:"mode",numoctaves:"numOctaves",offset:"offset",opacity:"opacity",operator:"operator",order:"order",orient:"orient",orientation:"orientation",origin:"origin",overflow:"overflow",overlineposition:"overlinePosition","overline-position":"overlinePosition",overlinethickness:"overlineThickness","overline-thickness":"overlineThickness",paintorder:"paintOrder","paint-order":"paintOrder",panose1:"panose1","panose-1":"panose1",pathlength:"pathLength",patterncontentunits:"patternContentUnits",patterntransform:"patternTransform",patternunits:"patternUnits",pointerevents:"pointerEvents","pointer-events":"pointerEvents",points:"points",pointsatx:"pointsAtX",pointsaty:"pointsAtY",pointsatz:"pointsAtZ",popover:"popover",popovertarget:"popoverTarget",popovertargetaction:"popoverTargetAction",prefix:"prefix",preservealpha:"preserveAlpha",preserveaspectratio:"preserveAspectRatio",primitiveunits:"primitiveUnits",property:"property",r:"r",radius:"radius",refx:"refX",refy:"refY",renderingintent:"renderingIntent","rendering-intent":"renderingIntent",repeatcount:"repeatCount",repeatdur:"repeatDur",requiredextensions:"requiredExtensions",requiredfeatures:"requiredFeatures",resource:"resource",restart:"restart",result:"result",results:"results",rotate:"rotate",rx:"rx",ry:"ry",scale:"scale",security:"security",seed:"seed",shaperendering:"shapeRendering","shape-rendering":"shapeRendering",slope:"slope",spacing:"spacing",specularconstant:"specularConstant",specularexponent:"specularExponent",speed:"speed",spreadmethod:"spreadMethod",startoffset:"startOffset",stddeviation:"stdDeviation",stemh:"stemh",stemv:"stemv",stitchtiles:"stitchTiles",stopcolor:"stopColor","stop-color":"stopColor",stopopacity:"stopOpacity","stop-opacity":"stopOpacity",strikethroughposition:"strikethroughPosition","strikethrough-position":"strikethroughPosition",strikethroughthickness:"strikethroughThickness","strikethrough-thickness":"strikethroughThickness",string:"string",stroke:"stroke",strokedasharray:"strokeDasharray","stroke-dasharray":"strokeDasharray",strokedashoffset:"strokeDashoffset","stroke-dashoffset":"strokeDashoffset",strokelinecap:"strokeLinecap","stroke-linecap":"strokeLinecap",strokelinejoin:"strokeLinejoin","stroke-linejoin":"strokeLinejoin",strokemiterlimit:"strokeMiterlimit","stroke-miterlimit":"strokeMiterlimit",strokewidth:"strokeWidth","stroke-width":"strokeWidth",strokeopacity:"strokeOpacity","stroke-opacity":"strokeOpacity",suppresscontenteditablewarning:"suppressContentEditableWarning",suppresshydrationwarning:"suppressHydrationWarning",surfacescale:"surfaceScale",systemlanguage:"systemLanguage",tablevalues:"tableValues",targetx:"targetX",targety:"targetY",textanchor:"textAnchor","text-anchor":"textAnchor",textdecoration:"textDecoration","text-decoration":"textDecoration",textlength:"textLength",textrendering:"textRendering","text-rendering":"textRendering",to:"to",transform:"transform",transformorigin:"transformOrigin","transform-origin":"transformOrigin",typeof:"typeof",u1:"u1",u2:"u2",underlineposition:"underlinePosition","underline-position":"underlinePosition",underlinethickness:"underlineThickness","underline-thickness":"underlineThickness",unicode:"unicode",unicodebidi:"unicodeBidi","unicode-bidi":"unicodeBidi",unicoderange:"unicodeRange","unicode-range":"unicodeRange",unitsperem:"unitsPerEm","units-per-em":"unitsPerEm",unselectable:"unselectable",valphabetic:"vAlphabetic","v-alphabetic":"vAlphabetic",values:"values",vectoreffect:"vectorEffect","vector-effect":"vectorEffect",version:"version",vertadvy:"vertAdvY","vert-adv-y":"vertAdvY",vertoriginx:"vertOriginX","vert-origin-x":"vertOriginX",vertoriginy:"vertOriginY","vert-origin-y":"vertOriginY",vhanging:"vHanging","v-hanging":"vHanging",videographic:"vIdeographic","v-ideographic":"vIdeographic",viewbox:"viewBox",viewtarget:"viewTarget",visibility:"visibility",vmathematical:"vMathematical","v-mathematical":"vMathematical",vocab:"vocab",widths:"widths",wordspacing:"wordSpacing","word-spacing":"wordSpacing",writingmode:"writingMode","writing-mode":"writingMode",x1:"x1",x2:"x2",x:"x",xchannelselector:"xChannelSelector",xheight:"xHeight","x-height":"xHeight",xlinkactuate:"xlinkActuate","xlink:actuate":"xlinkActuate",xlinkarcrole:"xlinkArcrole","xlink:arcrole":"xlinkArcrole",xlinkhref:"xlinkHref","xlink:href":"xlinkHref",xlinkrole:"xlinkRole","xlink:role":"xlinkRole",xlinkshow:"xlinkShow","xlink:show":"xlinkShow",xlinktitle:"xlinkTitle","xlink:title":"xlinkTitle",xlinktype:"xlinkType","xlink:type":"xlinkType",xmlbase:"xmlBase","xml:base":"xmlBase",xmllang:"xmlLang","xml:lang":"xmlLang",xmlns:"xmlns","xml:space":"xmlSpace",xmlnsxlink:"xmlnsXlink","xmlns:xlink":"xmlnsXlink",xmlspace:"xmlSpace",y1:"y1",y2:"y2",y:"y",ychannelselector:"yChannelSelector",z:"z",zoomandpan:"zoomAndPan"},hC={"aria-current":0,"aria-description":0,"aria-details":0,"aria-disabled":0,"aria-hidden":0,"aria-invalid":0,"aria-keyshortcuts":0,"aria-label":0,"aria-roledescription":0,"aria-autocomplete":0,"aria-checked":0,"aria-expanded":0,"aria-haspopup":0,"aria-level":0,"aria-modal":0,"aria-multiline":0,"aria-multiselectable":0,"aria-orientation":0,"aria-placeholder":0,"aria-pressed":0,"aria-readonly":0,"aria-required":0,"aria-selected":0,"aria-sort":0,"aria-valuemax":0,"aria-valuemin":0,"aria-valuenow":0,"aria-valuetext":0,"aria-atomic":0,"aria-busy":0,"aria-live":0,"aria-relevant":0,"aria-dropeffect":0,"aria-grabbed":0,"aria-activedescendant":0,"aria-colcount":0,"aria-colindex":0,"aria-colspan":0,"aria-controls":0,"aria-describedby":0,"aria-errormessage":0,"aria-flowto":0,"aria-labelledby":0,"aria-owns":0,"aria-posinset":0,"aria-rowcount":0,"aria-rowindex":0,"aria-rowspan":0,"aria-setsize":0,"aria-braillelabel":0,"aria-brailleroledescription":0,"aria-colindextext":0,"aria-rowindextext":0},fy={},FK=RegExp("^(aria)-[: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]*$"),JK=RegExp("^(aria)[A-Z][: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]*$"),vj=!1,Is={},xj=/^on./,KK=/^on[^A-Z]/,WK=RegExp("^(aria)-[: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]*$"),tW=RegExp("^(aria)[A-Z][: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]*$"),eW=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i,rx=null,hy=null,dy=null,SM=!1,ql=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),wM=!1;if(ql)try{var ax={};Object.defineProperty(ax,"passive",{get:function(){wM=!0}}),window.addEventListener("test",ax,ax),window.removeEventListener("test",ax,ax)}catch{wM=!1}var Kf=null,CM=null,dC=null,rg={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},gC=ii(rg),lx=pe({},rg,{view:0,detail:0}),nW=ii(lx),EM,AM,cx,pC=pe({},lx,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Fh,button:0,buttons:0,relatedTarget:function(i){return i.relatedTarget===void 0?i.fromElement===i.srcElement?i.toElement:i.fromElement:i.relatedTarget},movementX:function(i){return"movementX"in i?i.movementX:(i!==cx&&(cx&&i.type==="mousemove"?(EM=i.screenX-cx.screenX,AM=i.screenY-cx.screenY):AM=EM=0,cx=i),EM)},movementY:function(i){return"movementY"in i?i.movementY:AM}}),Sj=ii(pC),iW=pe({},pC,{dataTransfer:0}),sW=ii(iW),oW=pe({},lx,{relatedTarget:0}),TM=ii(oW),rW=pe({},rg,{animationName:0,elapsedTime:0,pseudoElement:0}),aW=ii(rW),lW=pe({},rg,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),cW=ii(lW),uW=pe({},rg,{data:0}),wj=ii(uW),fW=wj,hW={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},dW={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"},gW={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"},pW=pe({},lx,{key:function(i){if(i.key){var o=hW[i.key]||i.key;if(o!=="Unidentified")return o}return i.type==="keypress"?(i=Qh(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?dW[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Fh,charCode:function(i){return i.type==="keypress"?Qh(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?Qh(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),mW=ii(pW),yW=pe({},pC,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Cj=ii(yW),bW=pe({},lx,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Fh}),vW=ii(bW),xW=pe({},rg,{propertyName:0,elapsedTime:0,pseudoElement:0}),SW=ii(xW),wW=pe({},pC,{deltaX:function(i){return"deltaX"in i?i.deltaX:"wheelDeltaX"in i?-i.wheelDeltaX:0},deltaY:function(i){return"deltaY"in i?i.deltaY:"wheelDeltaY"in i?-i.wheelDeltaY:"wheelDelta"in i?-i.wheelDelta:0},deltaZ:0,deltaMode:0}),CW=ii(wW),EW=pe({},rg,{newState:0,oldState:0}),AW=ii(EW),TW=[9,13,27,32],Ej=229,MM=ql&&"CompositionEvent"in window,ux=null;ql&&"documentMode"in document&&(ux=document.documentMode);var MW=ql&&"TextEvent"in window&&!ux,Aj=ql&&(!MM||ux&&8<ux&&11>=ux),Tj=32,Mj=String.fromCharCode(Tj),Oj=!1,gy=!1,OW={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},fx=null,hx=null,Dj=!1;ql&&(Dj=_p("input")&&(!document.documentMode||9<document.documentMode));var Zs=typeof Object.is=="function"?Object.is:Bp,DW=ql&&"documentMode"in document&&11>=document.documentMode,py=null,OM=null,dx=null,DM=!1,my={animationend:vc("Animation","AnimationEnd"),animationiteration:vc("Animation","AnimationIteration"),animationstart:vc("Animation","AnimationStart"),transitionrun:vc("Transition","TransitionRun"),transitionstart:vc("Transition","TransitionStart"),transitioncancel:vc("Transition","TransitionCancel"),transitionend:vc("Transition","TransitionEnd")},RM={},Rj={};ql&&(Rj=document.createElement("div").style,"AnimationEvent"in window||(delete my.animationend.animation,delete my.animationiteration.animation,delete my.animationstart.animation),"TransitionEvent"in window||delete my.transitionend.transition);var zj=xc("animationend"),Nj=xc("animationiteration"),Lj=xc("animationstart"),RW=xc("transitionrun"),zW=xc("transitionstart"),NW=xc("transitioncancel"),jj=xc("transitionend"),_j=new Map,zM="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");zM.push("scrollEnd");var Bj=0;if(typeof performance=="object"&&typeof performance.now=="function")var LW=performance,Pj=function(){return LW.now()};else{var jW=Date;Pj=function(){return jW.now()}}var NM=typeof reportError=="function"?reportError:function(i){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var o=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof i=="object"&&i!==null&&typeof i.message=="string"?String(i.message):String(i),error:i});if(!window.dispatchEvent(o))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",i);return}console.error(i)},_W="This object has been omitted by React in the console log to avoid sending too much data from the server. Try logging smaller or more specific objects.",mC=0,LM=1,jM=2,_M=3,yC="– ",bC="+ ",Uj=" ",bn=typeof console<"u"&&typeof console.timeStamp=="function"&&typeof performance<"u"&&typeof performance.measure=="function",Yr="Components ⚛",ze="Scheduler ⚛",Le="Blocking",Wf=!1,ou={color:"primary",properties:null,tooltipText:"",track:Yr},th={start:-0,end:-0,detail:{devtools:ou}},BW=["Changed Props",""],Hj="This component received deeply equal props. It might benefit from useMemo or the React Compiler in its owner.",PW=["Changed Props",Hj],gx=1,ru=2,Xr=[],yy=0,BM=0,eh={};Object.freeze(eh);var Ir=null,by=null,te=0,UW=1,me=2,ws=8,Ga=16,HW=32,kj=!1;try{var Vj=Object.preventExtensions({})}catch{kj=!0}var PM=new WeakMap,vy=[],xy=0,vC=null,px=0,Zr=[],Qr=0,ag=null,au=1,lu="",us=null,vn=null,Oe=!1,Yl=!1,Fo=null,nh=null,Fr=!1,UM=Error("Hydration Mismatch Exception: This is not a real error, and should not leak into userspace. If you're seeing this, it's likely a bug in React."),HM=ct(null),kM=ct(null),Gj={},xC=null,Sy=null,wy=!1,kW=typeof AbortController<"u"?AbortController:function(){var i=[],o=this.signal={aborted:!1,addEventListener:function(c,g){i.push(g)}};this.abort=function(){o.aborted=!0,i.forEach(function(c){return c()})}},VW=Hn.unstable_scheduleCallback,GW=Hn.unstable_NormalPriority,fi={$$typeof:Io,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0,_currentRenderer:null,_currentRenderer2:null},hi=Hn.unstable_now,SC=console.createTask?console.createTask:function(){return null},mx=1,wC=2,Hi=-0,ih=-0,cu=-0,uu=null,Qs=-1.1,lg=-0,Nn=-0,Qt=-1.1,Kt=-1.1,Tn=null,kn=!1,cg=-0,Xl=-1.1,yx=null,sh=0,VM=null,GM=null,ug=-1.1,bx=null,Cy=-1.1,CC=-1.1,fu=-0,hu=-1.1,Jr=-1.1,$M=0,vx=null,$j=null,qj=null,oh=-1.1,fg=null,rh=-1.1,EC=-1.1,Yj=-0,Xj=-0,AC=0,$W=null,Ij=0,xx=-1.1,TC=!1,MC=!1,Sx=null,qM=0,hg=0,Ey=null,Zj=pt.S;pt.S=function(i,o){if($_=ui(),typeof o=="object"&&o!==null&&typeof o.then=="function"){if(0>hu&&0>Jr){hu=hi();var c=Lf(),g=Hr();(c!==rh||g!==fg)&&(rh=-1.1),oh=c,fg=g}Ea(i,o)}Zj!==null&&Zj(i,o)};var dg=ct(null),$a={recordUnsafeLifecycleWarnings:function(){},flushPendingUnsafeLifecycleWarnings:function(){},recordLegacyContextWarning:function(){},flushLegacyContextWarning:function(){},discardPendingWarnings:function(){}},wx=[],Cx=[],Ex=[],Ax=[],Tx=[],Mx=[],gg=new Set;$a.recordUnsafeLifecycleWarnings=function(i,o){gg.has(i.type)||(typeof o.componentWillMount=="function"&&o.componentWillMount.__suppressDeprecationWarning!==!0&&wx.push(i),i.mode&ws&&typeof o.UNSAFE_componentWillMount=="function"&&Cx.push(i),typeof o.componentWillReceiveProps=="function"&&o.componentWillReceiveProps.__suppressDeprecationWarning!==!0&&Ex.push(i),i.mode&ws&&typeof o.UNSAFE_componentWillReceiveProps=="function"&&Ax.push(i),typeof o.componentWillUpdate=="function"&&o.componentWillUpdate.__suppressDeprecationWarning!==!0&&Tx.push(i),i.mode&ws&&typeof o.UNSAFE_componentWillUpdate=="function"&&Mx.push(i))},$a.flushPendingUnsafeLifecycleWarnings=function(){var i=new Set;0<wx.length&&(wx.forEach(function(O){i.add(F(O)||"Component"),gg.add(O.type)}),wx=[]);var o=new Set;0<Cx.length&&(Cx.forEach(function(O){o.add(F(O)||"Component"),gg.add(O.type)}),Cx=[]);var c=new Set;0<Ex.length&&(Ex.forEach(function(O){c.add(F(O)||"Component"),gg.add(O.type)}),Ex=[]);var g=new Set;0<Ax.length&&(Ax.forEach(function(O){g.add(F(O)||"Component"),gg.add(O.type)}),Ax=[]);var b=new Set;0<Tx.length&&(Tx.forEach(function(O){b.add(F(O)||"Component"),gg.add(O.type)}),Tx=[]);var v=new Set;if(0<Mx.length&&(Mx.forEach(function(O){v.add(F(O)||"Component"),gg.add(O.type)}),Mx=[]),0<o.size){var A=S(o);console.error(`Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. See https://react.dev/link/unsafe-component-lifecycles for details.
|
|
1180
|
+
|
|
1181
|
+
* Move code with side effects to componentDidMount, and set initial state in the constructor.
|
|
1182
|
+
|
|
1183
|
+
Please update the following components: %s`,A)}0<g.size&&(A=S(g),console.error(`Using UNSAFE_componentWillReceiveProps in strict mode is not recommended and may indicate bugs in your code. See https://react.dev/link/unsafe-component-lifecycles for details.
|
|
1184
|
+
|
|
1185
|
+
* Move data fetching code or side effects to componentDidUpdate.
|
|
1186
|
+
* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://react.dev/link/derived-state
|
|
1187
|
+
|
|
1188
|
+
Please update the following components: %s`,A)),0<v.size&&(A=S(v),console.error(`Using UNSAFE_componentWillUpdate in strict mode is not recommended and may indicate bugs in your code. See https://react.dev/link/unsafe-component-lifecycles for details.
|
|
1189
|
+
|
|
1190
|
+
* Move data fetching code or side effects to componentDidUpdate.
|
|
1191
|
+
|
|
1192
|
+
Please update the following components: %s`,A)),0<i.size&&(A=S(i),console.warn(`componentWillMount has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details.
|
|
1193
|
+
|
|
1194
|
+
* Move code with side effects to componentDidMount, and set initial state in the constructor.
|
|
1195
|
+
* Rename componentWillMount to UNSAFE_componentWillMount to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder.
|
|
1196
|
+
|
|
1197
|
+
Please update the following components: %s`,A)),0<c.size&&(A=S(c),console.warn(`componentWillReceiveProps has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details.
|
|
1198
|
+
|
|
1199
|
+
* Move data fetching code or side effects to componentDidUpdate.
|
|
1200
|
+
* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://react.dev/link/derived-state
|
|
1201
|
+
* Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder.
|
|
1202
|
+
|
|
1203
|
+
Please update the following components: %s`,A)),0<b.size&&(A=S(b),console.warn(`componentWillUpdate has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details.
|
|
1204
|
+
|
|
1205
|
+
* Move data fetching code or side effects to componentDidUpdate.
|
|
1206
|
+
* Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder.
|
|
1207
|
+
|
|
1208
|
+
Please update the following components: %s`,A))};var OC=new Map,Qj=new Set;$a.recordLegacyContextWarning=function(i,o){for(var c=null,g=i;g!==null;)g.mode&ws&&(c=g),g=g.return;c===null?console.error("Expected to find a StrictMode component in a strict mode tree. This error is likely caused by a bug in React. Please file an issue."):!Qj.has(i.type)&&(g=OC.get(c),i.type.contextTypes!=null||i.type.childContextTypes!=null||o!==null&&typeof o.getChildContext=="function")&&(g===void 0&&(g=[],OC.set(c,g)),g.push(i))},$a.flushLegacyContextWarning=function(){OC.forEach(function(i){if(i.length!==0){var o=i[0],c=new Set;i.forEach(function(b){c.add(F(b)||"Component"),Qj.add(b.type)});var g=S(c);Lt(o,function(){console.error(`Legacy context API has been detected within a strict-mode tree.
|
|
1209
|
+
|
|
1210
|
+
The old API will be supported in all 16.x releases, but applications using it should migrate to the new version.
|
|
1211
|
+
|
|
1212
|
+
Please update the following components: %s
|
|
1213
|
+
|
|
1214
|
+
Learn more about this warning here: https://react.dev/link/legacy-context`,g)})}})},$a.discardPendingWarnings=function(){wx=[],Cx=[],Ex=[],Ax=[],Tx=[],Mx=[],OC=new Map};var Fj={react_stack_bottom_frame:function(i,o,c){var g=Vr;Vr=!0;try{return i(o,c)}finally{Vr=g}}},YM=Fj.react_stack_bottom_frame.bind(Fj),Jj={react_stack_bottom_frame:function(i){var o=Vr;Vr=!0;try{return i.render()}finally{Vr=o}}},Kj=Jj.react_stack_bottom_frame.bind(Jj),Wj={react_stack_bottom_frame:function(i,o){try{o.componentDidMount()}catch(c){he(i,i.return,c)}}},XM=Wj.react_stack_bottom_frame.bind(Wj),t_={react_stack_bottom_frame:function(i,o,c,g,b){try{o.componentDidUpdate(c,g,b)}catch(v){he(i,i.return,v)}}},e_=t_.react_stack_bottom_frame.bind(t_),n_={react_stack_bottom_frame:function(i,o){var c=o.stack;i.componentDidCatch(o.value,{componentStack:c!==null?c:""})}},qW=n_.react_stack_bottom_frame.bind(n_),i_={react_stack_bottom_frame:function(i,o,c){try{c.componentWillUnmount()}catch(g){he(i,o,g)}}},s_=i_.react_stack_bottom_frame.bind(i_),o_={react_stack_bottom_frame:function(i){var o=i.create;return i=i.inst,o=o(),i.destroy=o}},YW=o_.react_stack_bottom_frame.bind(o_),r_={react_stack_bottom_frame:function(i,o,c){try{c()}catch(g){he(i,o,g)}}},XW=r_.react_stack_bottom_frame.bind(r_),a_={react_stack_bottom_frame:function(i){var o=i._init;return o(i._payload)}},IW=a_.react_stack_bottom_frame.bind(a_),Ay=Error("Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`."),IM=Error("Suspense Exception: This is not a real error, and should not leak into userspace. If you're seeing this, it's likely a bug in React."),DC=Error("Suspense Exception: This is not a real error! It's an implementation detail of `useActionState` to interrupt the current render. You must either rethrow it immediately, or move the `useActionState` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary."),RC={then:function(){console.error('Internal React error: A listener was unexpectedly attached to a "noop" thenable. This is a bug in React. Please file an issue.')}},pg=null,Ox=!1,Ty=null,Dx=0,ye=null,ZM,l_=ZM=!1,c_={},u_={},f_={};x=function(i,o,c){if(c!==null&&typeof c=="object"&&c._store&&(!c._store.validated&&c.key==null||c._store.validated===2)){if(typeof c._store!="object")throw Error("React Component in warnForMissingKey should have a _store. This error is likely caused by a bug in React. Please file an issue.");c._store.validated=1;var g=F(i),b=g||"null";if(!c_[b]){c_[b]=!0,c=c._owner,i=i._debugOwner;var v="";i&&typeof i.tag=="number"&&(b=F(i))&&(v=`
|
|
1215
|
+
|
|
1216
|
+
Check the render method of \``+b+"`."),v||g&&(v=`
|
|
1217
|
+
|
|
1218
|
+
Check the top-level render call using <`+g+">.");var A="";c!=null&&i!==c&&(g=null,typeof c.tag=="number"?g=F(c):typeof c.name=="string"&&(g=c.name),g&&(A=" It was passed a child from "+g+".")),Lt(o,function(){console.error('Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',v,A)})}}};var mg=oi(!0),h_=oi(!1),d_=0,g_=1,p_=2,QM=3,ah=!1,m_=!1,FM=null,JM=!1,My=ct(null),zC=ct(0),Jo=ct(null),Kr=null,Oy=1,Rx=2,Wn=ct(0),NC=0,Wr=1,Fs=2,Ko=4,Js=8,Dy,y_=new Set,b_=new Set,KM=new Set,v_=new Set,du=0,ie=null,ln=null,di=null,LC=!1,Ry=!1,yg=!1,jC=0,zx=0,gu=null,ZW=0,QW=25,gt=null,ta=null,pu=-1,Nx=!1,Lx={readContext:ke,use:Oa,useCallback:Rn,useContext:Rn,useEffect:Rn,useImperativeHandle:Rn,useLayoutEffect:Rn,useInsertionEffect:Rn,useMemo:Rn,useReducer:Rn,useRef:Rn,useState:Rn,useDebugValue:Rn,useDeferredValue:Rn,useTransition:Rn,useSyncExternalStore:Rn,useId:Rn,useHostTransitionStatus:Rn,useFormState:Rn,useActionState:Rn,useOptimistic:Rn,useMemoCache:Rn,useCacheRefresh:Rn};Lx.useEffectEvent=Rn;var WM=null,x_=null,t2=null,S_=null,Il=null,qa=null,_C=null;WM={readContext:function(i){return ke(i)},use:Oa,useCallback:function(i,o){return gt="useCallback",ne(),Ma(o),im(i,o)},useContext:function(i){return gt="useContext",ne(),ke(i)},useEffect:function(i,o){return gt="useEffect",ne(),Ma(o),Pc(i,o)},useImperativeHandle:function(i,o,c){return gt="useImperativeHandle",ne(),Ma(c),Mr(i,o,c)},useInsertionEffect:function(i,o){gt="useInsertionEffect",ne(),Ma(o),Ol(4,Fs,i,o)},useLayoutEffect:function(i,o){return gt="useLayoutEffect",ne(),Ma(o),ts(i,o)},useMemo:function(i,o){gt="useMemo",ne(),Ma(o);var c=pt.H;pt.H=Il;try{return es(i,o)}finally{pt.H=c}},useReducer:function(i,o,c){gt="useReducer",ne();var g=pt.H;pt.H=Il;try{return cf(i,o,c)}finally{pt.H=g}},useRef:function(i){return gt="useRef",ne(),nm(i)},useState:function(i){gt="useState",ne();var o=pt.H;pt.H=Il;try{return El(i)}finally{pt.H=o}},useDebugValue:function(){gt="useDebugValue",ne()},useDeferredValue:function(i,o){return gt="useDeferredValue",ne(),gf(i,o)},useTransition:function(){return gt="useTransition",ne(),Dl()},useSyncExternalStore:function(i,o,c){return gt="useSyncExternalStore",ne(),uf(i,o,c)},useId:function(){return gt="useId",ne(),xd()},useFormState:function(i,o){return gt="useFormState",ne(),cd(),Us(i,o)},useActionState:function(i,o){return gt="useActionState",ne(),Us(i,o)},useOptimistic:function(i){return gt="useOptimistic",ne(),Bc(i)},useHostTransitionStatus:Na,useMemoCache:Bs,useCacheRefresh:function(){return gt="useCacheRefresh",ne(),sm()},useEffectEvent:function(i){return gt="useEffectEvent",ne(),bd(i)}},x_={readContext:function(i){return ke(i)},use:Oa,useCallback:function(i,o){return gt="useCallback",At(),im(i,o)},useContext:function(i){return gt="useContext",At(),ke(i)},useEffect:function(i,o){return gt="useEffect",At(),Pc(i,o)},useImperativeHandle:function(i,o,c){return gt="useImperativeHandle",At(),Mr(i,o,c)},useInsertionEffect:function(i,o){gt="useInsertionEffect",At(),Ol(4,Fs,i,o)},useLayoutEffect:function(i,o){return gt="useLayoutEffect",At(),ts(i,o)},useMemo:function(i,o){gt="useMemo",At();var c=pt.H;pt.H=Il;try{return es(i,o)}finally{pt.H=c}},useReducer:function(i,o,c){gt="useReducer",At();var g=pt.H;pt.H=Il;try{return cf(i,o,c)}finally{pt.H=g}},useRef:function(i){return gt="useRef",At(),nm(i)},useState:function(i){gt="useState",At();var o=pt.H;pt.H=Il;try{return El(i)}finally{pt.H=o}},useDebugValue:function(){gt="useDebugValue",At()},useDeferredValue:function(i,o){return gt="useDeferredValue",At(),gf(i,o)},useTransition:function(){return gt="useTransition",At(),Dl()},useSyncExternalStore:function(i,o,c){return gt="useSyncExternalStore",At(),uf(i,o,c)},useId:function(){return gt="useId",At(),xd()},useActionState:function(i,o){return gt="useActionState",At(),Us(i,o)},useFormState:function(i,o){return gt="useFormState",At(),cd(),Us(i,o)},useOptimistic:function(i){return gt="useOptimistic",At(),Bc(i)},useHostTransitionStatus:Na,useMemoCache:Bs,useCacheRefresh:function(){return gt="useCacheRefresh",At(),sm()},useEffectEvent:function(i){return gt="useEffectEvent",At(),bd(i)}},t2={readContext:function(i){return ke(i)},use:Oa,useCallback:function(i,o){return gt="useCallback",At(),Uo(i,o)},useContext:function(i){return gt="useContext",At(),ke(i)},useEffect:function(i,o){gt="useEffect",At(),Qn(2048,Js,i,o)},useImperativeHandle:function(i,o,c){return gt="useImperativeHandle",At(),df(i,o,c)},useInsertionEffect:function(i,o){return gt="useInsertionEffect",At(),Qn(4,Fs,i,o)},useLayoutEffect:function(i,o){return gt="useLayoutEffect",At(),Qn(4,Ko,i,o)},useMemo:function(i,o){gt="useMemo",At();var c=pt.H;pt.H=qa;try{return pn(i,o)}finally{pt.H=c}},useReducer:function(i,o,c){gt="useReducer",At();var g=pt.H;pt.H=qa;try{return Lc(i,o,c)}finally{pt.H=g}},useRef:function(){return gt="useRef",At(),Xe().memoizedState},useState:function(){gt="useState",At();var i=pt.H;pt.H=qa;try{return Lc(Ps)}finally{pt.H=i}},useDebugValue:function(){gt="useDebugValue",At()},useDeferredValue:function(i,o){return gt="useDeferredValue",At(),Or(i,o)},useTransition:function(){return gt="useTransition",At(),uw()},useSyncExternalStore:function(i,o,c){return gt="useSyncExternalStore",At(),_c(i,o,c)},useId:function(){return gt="useId",At(),Xe().memoizedState},useFormState:function(i){return gt="useFormState",At(),cd(),Tl(i)},useActionState:function(i){return gt="useActionState",At(),Tl(i)},useOptimistic:function(i,o){return gt="useOptimistic",At(),pd(i,o)},useHostTransitionStatus:Na,useMemoCache:Bs,useCacheRefresh:function(){return gt="useCacheRefresh",At(),Xe().memoizedState},useEffectEvent:function(i){return gt="useEffectEvent",At(),hf(i)}},S_={readContext:function(i){return ke(i)},use:Oa,useCallback:function(i,o){return gt="useCallback",At(),Uo(i,o)},useContext:function(i){return gt="useContext",At(),ke(i)},useEffect:function(i,o){gt="useEffect",At(),Qn(2048,Js,i,o)},useImperativeHandle:function(i,o,c){return gt="useImperativeHandle",At(),df(i,o,c)},useInsertionEffect:function(i,o){return gt="useInsertionEffect",At(),Qn(4,Fs,i,o)},useLayoutEffect:function(i,o){return gt="useLayoutEffect",At(),Qn(4,Ko,i,o)},useMemo:function(i,o){gt="useMemo",At();var c=pt.H;pt.H=_C;try{return pn(i,o)}finally{pt.H=c}},useReducer:function(i,o,c){gt="useReducer",At();var g=pt.H;pt.H=_C;try{return jc(i,o,c)}finally{pt.H=g}},useRef:function(){return gt="useRef",At(),Xe().memoizedState},useState:function(){gt="useState",At();var i=pt.H;pt.H=_C;try{return jc(Ps)}finally{pt.H=i}},useDebugValue:function(){gt="useDebugValue",At()},useDeferredValue:function(i,o){return gt="useDeferredValue",At(),ae(i,o)},useTransition:function(){return gt="useTransition",At(),Cn()},useSyncExternalStore:function(i,o,c){return gt="useSyncExternalStore",At(),_c(i,o,c)},useId:function(){return gt="useId",At(),Xe().memoizedState},useFormState:function(i){return gt="useFormState",At(),cd(),Ml(i)},useActionState:function(i){return gt="useActionState",At(),Ml(i)},useOptimistic:function(i,o){return gt="useOptimistic",At(),md(i,o)},useHostTransitionStatus:Na,useMemoCache:Bs,useCacheRefresh:function(){return gt="useCacheRefresh",At(),Xe().memoizedState},useEffectEvent:function(i){return gt="useEffectEvent",At(),hf(i)}},Il={readContext:function(i){return p(),ke(i)},use:function(i){return h(),Oa(i)},useCallback:function(i,o){return gt="useCallback",h(),ne(),im(i,o)},useContext:function(i){return gt="useContext",h(),ne(),ke(i)},useEffect:function(i,o){return gt="useEffect",h(),ne(),Pc(i,o)},useImperativeHandle:function(i,o,c){return gt="useImperativeHandle",h(),ne(),Mr(i,o,c)},useInsertionEffect:function(i,o){gt="useInsertionEffect",h(),ne(),Ol(4,Fs,i,o)},useLayoutEffect:function(i,o){return gt="useLayoutEffect",h(),ne(),ts(i,o)},useMemo:function(i,o){gt="useMemo",h(),ne();var c=pt.H;pt.H=Il;try{return es(i,o)}finally{pt.H=c}},useReducer:function(i,o,c){gt="useReducer",h(),ne();var g=pt.H;pt.H=Il;try{return cf(i,o,c)}finally{pt.H=g}},useRef:function(i){return gt="useRef",h(),ne(),nm(i)},useState:function(i){gt="useState",h(),ne();var o=pt.H;pt.H=Il;try{return El(i)}finally{pt.H=o}},useDebugValue:function(){gt="useDebugValue",h(),ne()},useDeferredValue:function(i,o){return gt="useDeferredValue",h(),ne(),gf(i,o)},useTransition:function(){return gt="useTransition",h(),ne(),Dl()},useSyncExternalStore:function(i,o,c){return gt="useSyncExternalStore",h(),ne(),uf(i,o,c)},useId:function(){return gt="useId",h(),ne(),xd()},useFormState:function(i,o){return gt="useFormState",h(),ne(),Us(i,o)},useActionState:function(i,o){return gt="useActionState",h(),ne(),Us(i,o)},useOptimistic:function(i){return gt="useOptimistic",h(),ne(),Bc(i)},useMemoCache:function(i){return h(),Bs(i)},useHostTransitionStatus:Na,useCacheRefresh:function(){return gt="useCacheRefresh",ne(),sm()},useEffectEvent:function(i){return gt="useEffectEvent",h(),ne(),bd(i)}},qa={readContext:function(i){return p(),ke(i)},use:function(i){return h(),Oa(i)},useCallback:function(i,o){return gt="useCallback",h(),At(),Uo(i,o)},useContext:function(i){return gt="useContext",h(),At(),ke(i)},useEffect:function(i,o){gt="useEffect",h(),At(),Qn(2048,Js,i,o)},useImperativeHandle:function(i,o,c){return gt="useImperativeHandle",h(),At(),df(i,o,c)},useInsertionEffect:function(i,o){return gt="useInsertionEffect",h(),At(),Qn(4,Fs,i,o)},useLayoutEffect:function(i,o){return gt="useLayoutEffect",h(),At(),Qn(4,Ko,i,o)},useMemo:function(i,o){gt="useMemo",h(),At();var c=pt.H;pt.H=qa;try{return pn(i,o)}finally{pt.H=c}},useReducer:function(i,o,c){gt="useReducer",h(),At();var g=pt.H;pt.H=qa;try{return Lc(i,o,c)}finally{pt.H=g}},useRef:function(){return gt="useRef",h(),At(),Xe().memoizedState},useState:function(){gt="useState",h(),At();var i=pt.H;pt.H=qa;try{return Lc(Ps)}finally{pt.H=i}},useDebugValue:function(){gt="useDebugValue",h(),At()},useDeferredValue:function(i,o){return gt="useDeferredValue",h(),At(),Or(i,o)},useTransition:function(){return gt="useTransition",h(),At(),uw()},useSyncExternalStore:function(i,o,c){return gt="useSyncExternalStore",h(),At(),_c(i,o,c)},useId:function(){return gt="useId",h(),At(),Xe().memoizedState},useFormState:function(i){return gt="useFormState",h(),At(),Tl(i)},useActionState:function(i){return gt="useActionState",h(),At(),Tl(i)},useOptimistic:function(i,o){return gt="useOptimistic",h(),At(),pd(i,o)},useMemoCache:function(i){return h(),Bs(i)},useHostTransitionStatus:Na,useCacheRefresh:function(){return gt="useCacheRefresh",At(),Xe().memoizedState},useEffectEvent:function(i){return gt="useEffectEvent",h(),At(),hf(i)}},_C={readContext:function(i){return p(),ke(i)},use:function(i){return h(),Oa(i)},useCallback:function(i,o){return gt="useCallback",h(),At(),Uo(i,o)},useContext:function(i){return gt="useContext",h(),At(),ke(i)},useEffect:function(i,o){gt="useEffect",h(),At(),Qn(2048,Js,i,o)},useImperativeHandle:function(i,o,c){return gt="useImperativeHandle",h(),At(),df(i,o,c)},useInsertionEffect:function(i,o){return gt="useInsertionEffect",h(),At(),Qn(4,Fs,i,o)},useLayoutEffect:function(i,o){return gt="useLayoutEffect",h(),At(),Qn(4,Ko,i,o)},useMemo:function(i,o){gt="useMemo",h(),At();var c=pt.H;pt.H=qa;try{return pn(i,o)}finally{pt.H=c}},useReducer:function(i,o,c){gt="useReducer",h(),At();var g=pt.H;pt.H=qa;try{return jc(i,o,c)}finally{pt.H=g}},useRef:function(){return gt="useRef",h(),At(),Xe().memoizedState},useState:function(){gt="useState",h(),At();var i=pt.H;pt.H=qa;try{return jc(Ps)}finally{pt.H=i}},useDebugValue:function(){gt="useDebugValue",h(),At()},useDeferredValue:function(i,o){return gt="useDeferredValue",h(),At(),ae(i,o)},useTransition:function(){return gt="useTransition",h(),At(),Cn()},useSyncExternalStore:function(i,o,c){return gt="useSyncExternalStore",h(),At(),_c(i,o,c)},useId:function(){return gt="useId",h(),At(),Xe().memoizedState},useFormState:function(i){return gt="useFormState",h(),At(),Ml(i)},useActionState:function(i){return gt="useActionState",h(),At(),Ml(i)},useOptimistic:function(i,o){return gt="useOptimistic",h(),At(),md(i,o)},useMemoCache:function(i){return h(),Bs(i)},useHostTransitionStatus:Na,useCacheRefresh:function(){return gt="useCacheRefresh",At(),Xe().memoizedState},useEffectEvent:function(i){return gt="useEffectEvent",h(),At(),hf(i)}};var w_={},C_=new Set,E_=new Set,A_=new Set,T_=new Set,M_=new Set,O_=new Set,D_=new Set,R_=new Set,z_=new Set,N_=new Set;Object.freeze(w_);var e2={enqueueSetState:function(i,o,c){i=i._reactInternals;var g=Bi(i),b=Zn(g);b.payload=o,c!=null&&(Vc(c),b.callback=c),o=Cr(i,b,g),o!==null&&(xr(g,"this.setState()",i),ee(o,i,g),co(o,i,g))},enqueueReplaceState:function(i,o,c){i=i._reactInternals;var g=Bi(i),b=Zn(g);b.tag=g_,b.payload=o,c!=null&&(Vc(c),b.callback=c),o=Cr(i,b,g),o!==null&&(xr(g,"this.replaceState()",i),ee(o,i,g),co(o,i,g))},enqueueForceUpdate:function(i,o){i=i._reactInternals;var c=Bi(i),g=Zn(c);g.tag=p_,o!=null&&(Vc(o),g.callback=o),o=Cr(i,g,c),o!==null&&(xr(c,"this.forceUpdate()",i),ee(o,i,c),co(o,i,c))}},zy=null,n2=null,i2=Error("This is not a real error. It's an implementation detail of React's selective hydration feature. If this leaks into userspace, it's a bug in React. Please file an issue."),gi=!1,L_={},j_={},__={},B_={},Ny=!1,P_={},BC={},s2={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null},U_=!1,H_=null;H_=new Set;var mu=!1,pi=!1,o2=!1,k_=typeof WeakSet=="function"?WeakSet:Set,ki=null,Ly=null,jy=null,mi=null,mo=!1,Ya=null,Ti=!1,jx=8192,FW={getCacheForType:function(i){var o=ke(fi),c=o.data.get(i);return c===void 0&&(c=i(),o.data.set(i,c)),c},cacheSignal:function(){return ke(fi).controller.signal},getOwner:function(){return Ss}};if(typeof Symbol=="function"&&Symbol.for){var _x=Symbol.for;_x("selector.component"),_x("selector.has_pseudo_class"),_x("selector.role"),_x("selector.test_id"),_x("selector.text")}var JW=[],KW=typeof WeakMap=="function"?WeakMap:Map,Vi=0,Mi=2,Wo=4,yu=0,Bx=1,bg=2,PC=3,lh=4,UC=6,V_=5,_e=Vi,cn=null,Se=null,be=0,yo=0,HC=1,vg=2,Px=3,G_=4,r2=5,Ux=6,kC=7,a2=8,xg=9,en=yo,tr=null,ch=!1,_y=!1,l2=!1,Zl=0,Ln=yu,uh=0,fh=0,c2=0,bo=0,Sg=0,Hx=null,Ks=null,VC=!1,GC=0,$_=0,q_=300,$C=1/0,Y_=500,kx=null,Yn=null,hh=null,qC=0,u2=1,f2=2,X_=3,dh=0,I_=1,Z_=2,Q_=3,F_=4,YC=5,yi=0,gh=null,By=null,Xa=0,h2=0,d2=-0,g2=null,J_=null,K_=null,Ia=qC,W_=null,WW=50,Vx=0,p2=null,m2=!1,XC=!1,ttt=50,wg=0,Gx=null,Py=!1,IC=null,tB=!1,eB=new Set,ett={},ZC=null,Uy=null,y2=!1,b2=!1,QC=!1,v2=!1,ph=0,x2={};(function(){for(var i=0;i<zM.length;i++){var o=zM[i],c=o.toLowerCase();o=o[0].toUpperCase()+o.slice(1),Oo(c,"on"+o)}Oo(zj,"onAnimationEnd"),Oo(Nj,"onAnimationIteration"),Oo(Lj,"onAnimationStart"),Oo("dblclick","onDoubleClick"),Oo("focusin","onFocus"),Oo("focusout","onBlur"),Oo(RW,"onTransitionRun"),Oo(zW,"onTransitionStart"),Oo(NW,"onTransitionCancel"),Oo(jj,"onTransitionEnd")})(),Gu("onMouseEnter",["mouseout","mouseover"]),Gu("onMouseLeave",["mouseout","mouseover"]),Gu("onPointerEnter",["pointerout","pointerover"]),Gu("onPointerLeave",["pointerout","pointerover"]),Ao("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ao("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ao("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ao("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ao("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ao("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var $x="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(" "),S2=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat($x)),FC="_reactListening"+Math.random().toString(36).slice(2),nB=!1,iB=!1,JC=!1,sB=!1,KC=!1,WC=!1,oB=!1,tE={},ntt=/\r\n?/g,itt=/\u0000|\uFFFD/g,Cg="http://www.w3.org/1999/xlink",w2="http://www.w3.org/XML/1998/namespace",stt="javascript:throw new Error('React form unexpectedly submitted.')",ott="suppressHydrationWarning",Eg="&",eE="/&",qx="$",Yx="/$",mh="$?",Ag="$~",Hy="$!",rtt="html",att="body",ltt="head",C2="F!",rB="F",aB="loading",ctt="style",bu=0,ky=1,nE=2,E2=null,A2=null,lB={dialog:!0,webview:!0},T2=null,Xx=void 0,cB=typeof setTimeout=="function"?setTimeout:void 0,utt=typeof clearTimeout=="function"?clearTimeout:void 0,Tg=-1,uB=typeof Promise=="function"?Promise:void 0,ftt=typeof queueMicrotask=="function"?queueMicrotask:typeof uB<"u"?function(i){return uB.resolve(null).then(i).catch(Nw)}:cB,M2=null,Mg=0,Ix=1,fB=2,hB=3,ea=4,na=new Map,dB=new Set,vu=Ge.d;Ge.d={f:function(){var i=vu.f(),o=$s();return i||o},r:function(i){var o=Eo(i);o!==null&&o.tag===5&&o.type==="form"?pf(o):vu.r(i)},D:function(i){vu.D(i),jv("dns-prefetch",i,null)},C:function(i,o){vu.C(i,o),jv("preconnect",i,o)},L:function(i,o,c){vu.L(i,o,c);var g=Vy;if(g&&i&&o){var b='link[rel="preload"][as="'+Fe(o)+'"]';o==="image"&&c&&c.imageSrcSet?(b+='[imagesrcset="'+Fe(c.imageSrcSet)+'"]',typeof c.imageSizes=="string"&&(b+='[imagesizes="'+Fe(c.imageSizes)+'"]')):b+='[href="'+Fe(i)+'"]';var v=b;switch(o){case"style":v=Jc(i);break;case"script":v=Kc(i)}na.has(v)||(i=pe({rel:"preload",href:o==="image"&&c&&c.imageSrcSet?void 0:i,as:o},c),na.set(v,i),g.querySelector(b)!==null||o==="style"&&g.querySelector(Xd(v))||o==="script"&&g.querySelector(Id(v))||(o=g.createElement("link"),mn(o,"link",i),jn(o),g.head.appendChild(o)))}},m:function(i,o){vu.m(i,o);var c=Vy;if(c&&i){var g=o&&typeof o.as=="string"?o.as:"script",b='link[rel="modulepreload"][as="'+Fe(g)+'"][href="'+Fe(i)+'"]',v=b;switch(g){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":v=Kc(i)}if(!na.has(v)&&(i=pe({rel:"modulepreload",href:i},o),na.set(v,i),c.querySelector(b)===null)){switch(g){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(c.querySelector(Id(v)))return}g=c.createElement("link"),mn(g,"link",i),jn(g),c.head.appendChild(g)}}},X:function(i,o){vu.X(i,o);var c=Vy;if(c&&i){var g=eo(c).hoistableScripts,b=Kc(i),v=g.get(b);v||(v=c.querySelector(Id(b)),v||(i=pe({src:i,async:!0},o),(o=na.get(b))&&Pv(i,o),v=c.createElement("script"),jn(v),mn(v,"link",i),c.head.appendChild(v)),v={type:"script",instance:v,count:1,state:null},g.set(b,v))}},S:function(i,o,c){vu.S(i,o,c);var g=Vy;if(g&&i){var b=eo(g).hoistableStyles,v=Jc(i);o=o||"default";var A=b.get(v);if(!A){var O={loading:Mg,preload:null};if(A=g.querySelector(Xd(v)))O.loading=Ix|ea;else{i=pe({rel:"stylesheet",href:i,"data-precedence":o},c),(c=na.get(v))&&Bv(i,c);var j=A=g.createElement("link");jn(j),mn(j,"link",i),j._p=new Promise(function(B,et){j.onload=B,j.onerror=et}),j.addEventListener("load",function(){O.loading|=Ix}),j.addEventListener("error",function(){O.loading|=fB}),O.loading|=ea,Bf(A,o,g)}A={type:"stylesheet",instance:A,count:1,state:O},b.set(v,A)}}},M:function(i,o){vu.M(i,o);var c=Vy;if(c&&i){var g=eo(c).hoistableScripts,b=Kc(i),v=g.get(b);v||(v=c.querySelector(Id(b)),v||(i=pe({src:i,async:!0,type:"module"},o),(o=na.get(b))&&Pv(i,o),v=c.createElement("script"),jn(v),mn(v,"link",i),c.head.appendChild(v)),v={type:"script",instance:v,count:1,state:null},g.set(b,v))}}};var Vy=typeof document>"u"?null:document,iE=null,htt=6e4,dtt=800,gtt=500,O2=0,D2=null,sE=null,Og=vM,Zx={$$typeof:Io,Provider:null,Consumer:null,_currentValue:Og,_currentValue2:Og,_threadCount:0},gB="%c%s%c",pB="background: #e6e6e6;background: light-dark(rgba(0,0,0,0.1), rgba(255,255,255,0.25));color: #000000;color: light-dark(#000000, #ffffff);border-radius: 2px",mB="",oE=" ",ptt=Function.prototype.bind,yB=!1,bB=null,vB=null,xB=null,SB=null,wB=null,CB=null,EB=null,AB=null,TB=null,MB=null;bB=function(i,o,c,g){o=s(i,o),o!==null&&(c=t(o.memoizedState,c,0,g),o.memoizedState=c,o.baseState=c,i.memoizedProps=pe({},i.memoizedProps),c=ji(i,2),c!==null&&ee(c,i,2))},vB=function(i,o,c){o=s(i,o),o!==null&&(c=r(o.memoizedState,c,0),o.memoizedState=c,o.baseState=c,i.memoizedProps=pe({},i.memoizedProps),c=ji(i,2),c!==null&&ee(c,i,2))},xB=function(i,o,c,g){o=s(i,o),o!==null&&(c=e(o.memoizedState,c,g),o.memoizedState=c,o.baseState=c,i.memoizedProps=pe({},i.memoizedProps),c=ji(i,2),c!==null&&ee(c,i,2))},SB=function(i,o,c){i.pendingProps=t(i.memoizedProps,o,0,c),i.alternate&&(i.alternate.pendingProps=i.pendingProps),o=ji(i,2),o!==null&&ee(o,i,2)},wB=function(i,o){i.pendingProps=r(i.memoizedProps,o,0),i.alternate&&(i.alternate.pendingProps=i.pendingProps),o=ji(i,2),o!==null&&ee(o,i,2)},CB=function(i,o,c){i.pendingProps=e(i.memoizedProps,o,c),i.alternate&&(i.alternate.pendingProps=i.pendingProps),o=ji(i,2),o!==null&&ee(o,i,2)},EB=function(i){var o=ji(i,2);o!==null&&ee(o,i,2)},AB=function(i){var o=xp(),c=ji(i,o);c!==null&&ee(c,i,o)},TB=function(i){f=i},MB=function(i){l=i};var rE=!0,aE=null,R2=!1,yh=null,bh=null,vh=null,Qx=new Map,Fx=new Map,xh=[],mtt="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" "),lE=null;if(Xo.prototype.render=Iv.prototype.render=function(i){var o=this._internalRoot;if(o===null)throw Error("Cannot update an unmounted root.");var c=arguments;typeof c[1]=="function"?console.error("does not support the second callback argument. To execute a side effect after rendering, declare it in a component body with useEffect()."):R(c[1])?console.error("You passed a container to the second argument of root.render(...). You don't need to pass it again since you already passed it to create the root."):typeof c[1]<"u"&&console.error("You passed a second argument to root.render(...) but it only accepts one argument."),c=i;var g=o.current,b=Bi(g);Zm(g,b,c,o,null,null)},Xo.prototype.unmount=Iv.prototype.unmount=function(){var i=arguments;if(typeof i[0]=="function"&&console.error("does not support a callback argument. To execute a side effect after rendering, declare it in a component body with useEffect()."),i=this._internalRoot,i!==null){this._internalRoot=null;var o=i.containerInfo;(_e&(Mi|Wo))!==Vi&&console.error("Attempted to synchronously unmount a root while React was already rendering. React cannot finish unmounting the root until the current render has completed, which may lead to a race condition."),Zm(i.current,2,null,i,null,null),$s(),o[Va]=null}},Xo.prototype.unstable_scheduleHydration=function(i){if(i){var o=kS();i={blockedOn:null,target:i,priority:o};for(var c=0;c<xh.length&&o!==0&&o<xh[c].priority;c++);xh.splice(c,0,i),c===0&&Xv(i)}},function(){var i=Kd.version;if(i!=="19.2.4")throw Error(`Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:
|
|
1219
|
+
- react: `+(i+`
|
|
1220
|
+
- react-dom: 19.2.4
|
|
1221
|
+
Learn more: https://react.dev/warnings/version-mismatch`))}(),typeof Map=="function"&&Map.prototype!=null&&typeof Map.prototype.forEach=="function"&&typeof Set=="function"&&Set.prototype!=null&&typeof Set.prototype.clear=="function"&&typeof Set.prototype.forEach=="function"||console.error("React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://react.dev/link/react-polyfills"),Ge.findDOMNode=function(i){var o=i._reactInternals;if(o===void 0)throw typeof i.render=="function"?Error("Unable to find node on an unmounted component."):(i=Object.keys(i).join(","),Error("Argument appears to not be a ReactComponent. Keys: "+i));return i=$(o),i=i!==null?Y(i):null,i=i===null?null:i.stateNode,i},!function(){var i={bundleType:1,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:pt,reconcilerVersion:"19.2.4"};return i.overrideHookState=bB,i.overrideHookStateDeletePath=vB,i.overrideHookStateRenamePath=xB,i.overrideProps=SB,i.overridePropsDeletePath=wB,i.overridePropsRenamePath=CB,i.scheduleUpdate=EB,i.scheduleRetry=AB,i.setErrorHandler=TB,i.setSuspenseHandler=MB,i.scheduleRefresh=M,i.scheduleRoot=T,i.setRefreshHandler=D,i.getCurrentFiber=We,rl(i)}()&&ql&&window.top===window.self&&(-1<navigator.userAgent.indexOf("Chrome")&&navigator.userAgent.indexOf("Edge")===-1||-1<navigator.userAgent.indexOf("Firefox"))){var OB=window.location.protocol;/^(https?|file):$/.test(OB)&&console.info("%cDownload the React DevTools for a better development experience: https://react.dev/link/react-devtools"+(OB==="file:"?`
|
|
1222
|
+
You might need to use a local HTTP server (instead of file://): https://react.dev/link/react-devtools-faq`:""),"font-weight:bold")}Jb.createRoot=function(i,o){if(!R(i))throw Error("Target container is not a DOM element.");Zv(i);var c=!1,g="",b=am,v=lm,A=G0;return o!=null&&(o.hydrate?console.warn("hydrate through createRoot is deprecated. Use ReactDOMClient.hydrateRoot(container, <App />) instead."):typeof o=="object"&&o!==null&&o.$$typeof===go&&console.error(`You passed a JSX element to createRoot. You probably meant to call root.render instead. Example usage:
|
|
1223
|
+
|
|
1224
|
+
let root = createRoot(domContainer);
|
|
1225
|
+
root.render(<App />);`),o.unstable_strictMode===!0&&(c=!0),o.identifierPrefix!==void 0&&(g=o.identifierPrefix),o.onUncaughtError!==void 0&&(b=o.onUncaughtError),o.onCaughtError!==void 0&&(v=o.onCaughtError),o.onRecoverableError!==void 0&&(A=o.onRecoverableError)),o=Fd(i,1,!1,null,null,c,g,null,b,v,A,nC),i[Va]=o.current,Bl(i),new Iv(o)},Jb.hydrateRoot=function(i,o,c){if(!R(i))throw Error("Target container is not a DOM element.");Zv(i),o===void 0&&console.error("Must provide initial children as second argument to hydrateRoot. Example usage: hydrateRoot(domContainer, <App />)");var g=!1,b="",v=am,A=lm,O=G0,j=null;return c!=null&&(c.unstable_strictMode===!0&&(g=!0),c.identifierPrefix!==void 0&&(b=c.identifierPrefix),c.onUncaughtError!==void 0&&(v=c.onUncaughtError),c.onCaughtError!==void 0&&(A=c.onCaughtError),c.onRecoverableError!==void 0&&(O=c.onRecoverableError),c.formState!==void 0&&(j=c.formState)),o=Fd(i,1,!0,o,c??null,g,b,j,v,A,O,nC),o.context=Kw(null),c=o.current,g=Bi(c),g=fc(g),b=Zn(g),b.callback=null,Cr(c,b,g),xr(g,"hydrateRoot()",null),c=g,o.current.lanes=c,al(o,c),ys(o),i[Va]=o.current,Bl(i),new Xo(o)},Jb.version="19.2.4",typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),Jb}function mj(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function")){if(process.env.NODE_ENV!=="production")throw new Error("^_^");try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(mj)}catch(s){console.error(s)}}}process.env.NODE_ENV==="production"?(mj(),KT.exports=_K()):KT.exports=BK();var PK=KT.exports,UK=function(s,t){var e={};for(var n in s)Object.prototype.hasOwnProperty.call(s,n)&&t.indexOf(n)<0&&(e[n]=s[n]);if(s!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,n=Object.getOwnPropertySymbols(s);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(s,n[r])&&(e[n[r]]=s[n[r]]);return e};const eM={};function HK(s){const{shape:t,component:e,effect:n,inherit:r}=s,l=UK(s,["shape","component","effect","inherit"]);if(!t)throw new Error("should specify shape in config");eM[t]={component:e,effect:n},dt.registerNode(t,Object.assign({inherit:r||"react-shape"},l),!0)}class kK extends Yt.PureComponent{constructor(t){super(t),this.state={tick:0}}componentDidMount(){const{node:t}=this.props;t.on("change:*",({key:e})=>{const n=eM[t.shape];if(n){const{effect:r}=n,l=String(e);(!r||r.includes(l))&&this.setState({tick:this.state.tick+1})}})}clone(t){const{node:e,graph:n}=this.props;return typeof t.type=="string"?Yt.cloneElement(t):Yt.cloneElement(t,{node:e,graph:n})}render(){const{node:t}=this.props,e=eM[t.shape];if(!e)return null;const{component:n}=e;if(Yt.isValidElement(n))return this.clone(n);const r=n;return this.clone(Yt.createElement(r,null))}}class Vh extends cr{targetId(){return`${this.graph.view.cid}:${this.cell.id}`}getComponentContainer(){return this.selectors&&this.selectors.foContent}confirmUpdate(t){const e=super.confirmUpdate(t);return this.handleAction(e,Vh.action,()=>{this.renderReactComponent()})}renderReactComponent(){this.unmountReactComponent();const t=this.getComponentContainer(),e=this.cell;if(t){const n=Yt.createElement(kK,{node:e,graph:this.graph});this.root=PK.createRoot(t),this.root.render(n)}}unmountReactComponent(){this.getComponentContainer()&&this.root&&(this.root.unmount(),this.root=void 0)}onMouseDown(t,e,n){const r=t.target;if(r.tagName.toLowerCase()==="input"){const f=r.getAttribute("type");if(f==null||["text","password","number","email","search","tel","url"].includes(f))return}super.onMouseDown(t,e,n)}unmount(){return this.unmountReactComponent(),super.unmount(),this}}Vh.action="react",Vh.config({bootstrap:[Vh.action],actions:{component:Vh.action}}),cr.registry.register("react-shape-view",Vh,!0);var nM={exports:{}},yj=[],Kb=[],VK="insert-css: You need to provide a CSS string. Usage: insertCss(cssString[, options]).";function bj(s,t){if(t=t||{},s===void 0)throw new Error(VK);var e=t.prepend===!0?"prepend":"append",n=t.container!==void 0?t.container:document.querySelector("head"),r=yj.indexOf(n);r===-1&&(r=yj.push(n)-1,Kb[r]={});var l;return Kb[r]!==void 0&&Kb[r][e]!==void 0?l=Kb[r][e]:(l=Kb[r][e]=GK(),e==="prepend"?n.insertBefore(l,n.childNodes[0]):n.appendChild(l)),s.charCodeAt(0)===65279&&(s=s.substr(1,s.length)),l.styleSheet?l.styleSheet.cssText+=s:l.textContent+=s,l}function GK(){var s=document.createElement("style");return s.setAttribute("type","text/css"),s}nM.exports=bj,nM.exports.insertCss=bj;var $K=nM.exports;const qK=L2($K);function YK({...s}){return W.jsx(uk,{"data-slot":"context-menu",...s})}function XK({...s}){return W.jsx(fk,{"data-slot":"context-menu-trigger",...s})}function IK({className:s,...t}){return W.jsx(hk,{children:W.jsx(dk,{"data-slot":"context-menu-content",className:er("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-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 z-50 max-h-(--radix-context-menu-content-available-height) min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",s),...t})})}function iM({className:s,inset:t,variant:e="default",...n}){return W.jsx(gk,{"data-slot":"context-menu-item","data-inset":t,"data-variant":e,className:er("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",s),...n})}function ZK(s){const{node:t}=s,e=t==null?void 0:t.getData(),{label:n,checked:r=!1,collapsed:l=!1,readonly:f=!1}=e,h=e.showCheckboxes!==!1,p=e.onAddChild,y=e.onDeleteNode,x=e.onEditNode,[S,w]=Yt.useState(e.editing||!1),[T,M]=Yt.useState(n||""),D=Yt.useRef(null);Yt.useEffect(()=>{e.editing!==void 0&&w(e.editing)},[e.editing]),Yt.useEffect(()=>{M(n||"")},[n]),Yt.useEffect(()=>{S&&D.current&&(D.current.focus(),D.current.select())},[S]);const R=H=>{t.setData({...e,checked:H.target.checked})},N=H=>{H.stopPropagation(),t.setData({...e,collapsed:!l})},L=H=>{H.stopPropagation(),!f&&w(!0)},_=H=>{M(H.target.value)},U=()=>{w(!1),T!==n?t.setData({...e,label:T,editing:!1}):t.setData({...e,editing:!1})},$=H=>{H.key==="Enter"&&U()},Y=e.hasChildren,k=W.jsxs("div",{className:`node ${r?"checked":""}`,children:[h&&W.jsx("span",{className:"checkbox-wrapper",children:W.jsx("input",{type:"checkbox",checked:r,disabled:f,onChange:R,onMouseDown:H=>H.stopPropagation()})}),S?W.jsx("input",{ref:D,className:"label-input",value:T,onChange:_,onBlur:U,onKeyDown:$,onMouseDown:H=>H.stopPropagation()}):W.jsx("span",{className:"label",onDoubleClick:L,children:n}),W.jsx("span",{className:"status",children:Y&&W.jsx("button",{className:"collapse-btn",onClick:N,onMouseDown:H=>H.stopPropagation(),children:l?"+":"-"})})]});return f?k:W.jsxs(YK,{children:[W.jsx(XK,{asChild:!0,children:k}),W.jsxs(IK,{children:[W.jsxs(iM,{onSelect:H=>{H.preventDefault(),p==null||p()},children:[W.jsx(VB,{}),"添加"]}),W.jsxs(iM,{onSelect:H=>{H.preventDefault(),y==null||y()},children:[W.jsx($B,{}),"删除"]}),W.jsxs(iM,{onSelect:H=>{H.preventDefault(),x==null||x()},children:[W.jsx(kB,{}),"修改"]})]})]})}HK({shape:"dag-node",width:180,height:36,component:ZK,ports:{groups:{left:{position:"left",attrs:{circle:{r:0,magnet:!0,stroke:"transparent",strokeWidth:0,fill:"transparent"}}},right:{position:"right",attrs:{circle:{r:0,magnet:!0,stroke:"transparent",strokeWidth:0,fill:"transparent"}}}}}}),qK(`
|
|
1226
|
+
.node {
|
|
1227
|
+
display: flex;
|
|
1228
|
+
align-items: center;
|
|
1229
|
+
width: 100%;
|
|
1230
|
+
height: 100%;
|
|
1231
|
+
background-color: var(--node-bg);
|
|
1232
|
+
border: 1px solid var(--node-border);
|
|
1233
|
+
border-left: 4px solid #5F95FF;
|
|
1234
|
+
border-radius: 4px;
|
|
1235
|
+
box-shadow: 0 2px 5px 1px var(--shadow-color);
|
|
1236
|
+
transition: all 0.3s;
|
|
1237
|
+
}
|
|
1238
|
+
.checkbox-wrapper {
|
|
1239
|
+
display: flex;
|
|
1240
|
+
align-items: center;
|
|
1241
|
+
margin-left: 8px;
|
|
1242
|
+
}
|
|
1243
|
+
.node .label {
|
|
1244
|
+
display: inline-block;
|
|
1245
|
+
flex: 1;
|
|
1246
|
+
margin-left: 8px;
|
|
1247
|
+
color: var(--node-text);
|
|
1248
|
+
font-size: 12px;
|
|
1249
|
+
white-space: nowrap;
|
|
1250
|
+
overflow: hidden;
|
|
1251
|
+
text-overflow: ellipsis;
|
|
1252
|
+
cursor: text;
|
|
1253
|
+
}
|
|
1254
|
+
.label-input {
|
|
1255
|
+
flex: 1;
|
|
1256
|
+
margin-left: 8px;
|
|
1257
|
+
font-size: 12px;
|
|
1258
|
+
border: 1px solid #1890ff;
|
|
1259
|
+
border-radius: 2px;
|
|
1260
|
+
outline: none;
|
|
1261
|
+
padding: 2px 4px;
|
|
1262
|
+
color: var(--node-text);
|
|
1263
|
+
background: var(--node-bg);
|
|
1264
|
+
height: 24px;
|
|
1265
|
+
width: 100%;
|
|
1266
|
+
}
|
|
1267
|
+
.node .status {
|
|
1268
|
+
flex-shrink: 0;
|
|
1269
|
+
margin-right: 8px;
|
|
1270
|
+
display: flex;
|
|
1271
|
+
align-items: center;
|
|
1272
|
+
}
|
|
1273
|
+
.node.checked {
|
|
1274
|
+
border-left: 4px solid #52c41a;
|
|
1275
|
+
}
|
|
1276
|
+
.collapse-btn {
|
|
1277
|
+
margin-left: 8px;
|
|
1278
|
+
width: 16px;
|
|
1279
|
+
height: 16px;
|
|
1280
|
+
line-height: 14px;
|
|
1281
|
+
text-align: center;
|
|
1282
|
+
border: 1px solid var(--btn-border);
|
|
1283
|
+
background: var(--btn-bg);
|
|
1284
|
+
color: var(--text-color);
|
|
1285
|
+
cursor: pointer;
|
|
1286
|
+
padding: 0;
|
|
1287
|
+
font-size: 12px;
|
|
1288
|
+
border-radius: 2px;
|
|
1289
|
+
}
|
|
1290
|
+
.collapse-btn:hover {
|
|
1291
|
+
background-color: var(--btn-hover);
|
|
1292
|
+
border-color: var(--node-text);
|
|
1293
|
+
}
|
|
1294
|
+
.x6-node-selected .node {
|
|
1295
|
+
border-color: #1890ff;
|
|
1296
|
+
border-radius: 2px;
|
|
1297
|
+
box-shadow: 0 0 0 4px #d4e8fe;
|
|
1298
|
+
}
|
|
1299
|
+
.x6-node-selected .node.checked {
|
|
1300
|
+
border-color: #52c41a;
|
|
1301
|
+
border-radius: 2px;
|
|
1302
|
+
box-shadow: 0 0 0 4px #ccecc0;
|
|
1303
|
+
}
|
|
1304
|
+
.x6-edge:hover path:nth-child(2){
|
|
1305
|
+
stroke: #1890ff;
|
|
1306
|
+
stroke-width: 1px;
|
|
1307
|
+
}
|
|
1308
|
+
|
|
1309
|
+
.x6-edge-selected path:nth-child(2){
|
|
1310
|
+
stroke: #1890ff;
|
|
1311
|
+
stroke-width: 1.5px !important;
|
|
1312
|
+
}
|
|
1313
|
+
`),ZJ();const QK=Yt.forwardRef(({data:s,isDarkMode:t=!1,title:e="思维导图",readonly:n=!1,onNodeChange:r},l)=>{const f=Yt.useRef(null),h=Yt.useRef(null),p=Yt.useRef(null),y=Yt.useRef(null),x=Yt.useRef(null),S=Yt.useRef(t?"dark":"light"),[w,T]=Yt.useState(!0),[M,D]=Yt.useState(!0),{renameOpen:R,setRenameOpen:N,setRenameNodeId:L,renameValue:_,setRenameValue:U,deleteOpen:$,setDeleteOpen:Y,setDeleteNodeId:k,deleteNodeName:H,openCreateDialog:J,openDeleteDialog:F,openRenameDialog:ct,applyRename:lt,applyDelete:vt,applyCreateChild:Ot,applyCreateSibling:zt}=zK({graphRef:h,treeDataRef:p,renderRef:y,selectedNodeIdRef:x,onNodeChange:r});wK({containerRef:f,graphRef:h,treeDataRef:p,renderRef:y,selectedNodeIdRef:x,themeRef:S,data:s,isDarkMode:t,showCheckboxes:w,showGrid:M,readonly:n,onNodeChange:r,openCreateDialog:J,openDeleteDialog:F,openRenameDialog:ct}),NK({renameOpen:R,readonly:n,selectedNodeIdRef:x,applyCreateSibling:zt,applyCreateChild:Ot,openDeleteDialog:F});const V=()=>{const Mt=h.current;Mt&&Mt.exportPNG("flow-chart",{padding:20,backgroundColor:"transparent",quality:1})};Yt.useImperativeHandle(l,()=>({exportGraph:V}));const ot=()=>{const Mt=h.current;Mt&&Mt.zoom(.1)},tt=()=>{const Mt=h.current;Mt&&Mt.zoom(-.1)},yt=()=>{const Mt=h.current;Mt&&(Mt.zoomToFit({padding:20}),Mt.centerContent())};return W.jsxs("div",{style:{position:"relative",width:"100%",height:"100%"},children:[W.jsx("div",{ref:f,style:{width:"100%",height:"100%"}}),W.jsxs("div",{className:"absolute top-5 left-5 z-[100] text-xl font-bold text-foreground pointer-events-none select-none flex items-center gap-2",children:[e,n&&W.jsx(UB,{className:"w-4 h-4"})]}),W.jsx(wk,{zoomIn:ot,zoomOut:tt,zoomToOne:yt,exportGraph:V,showCheckboxes:w,onToggleCheckboxes:T,showGrid:M,onToggleGrid:D}),!n&&W.jsxs("div",{className:"absolute bottom-5 left-5 z-[100] text-xs text-muted-foreground pointer-events-none select-none p-3",children:[W.jsx("div",{className:"mb-2 font-medium text-foreground",children:"选中节点后:"}),W.jsxs("div",{className:"flex flex-col gap-1.5",children:[W.jsxs("div",{className:"flex items-center gap-2",children:[W.jsx(pE,{children:"Tab"}),W.jsx("span",{children:"创建子节点"})]}),W.jsxs("div",{className:"flex items-center gap-2",children:[W.jsx(pE,{children:"Enter"}),W.jsx("span",{children:"创建同级节点"})]}),W.jsxs("div",{className:"flex items-center gap-2",children:[W.jsx(pE,{children:"Delete"}),W.jsx("span",{children:"删除节点"})]})]})]}),W.jsx(FJ,{open:R,onOpenChange:Mt=>{N(Mt),Mt||L(null)},value:_,onChange:U,onConfirm:lt}),W.jsx(vk,{open:$,onOpenChange:Mt=>{Y(Mt),Mt||k(null)},nodeName:H,onConfirm:vt})]})});ei.MindMap=QK,Object.defineProperty(ei,Symbol.toStringTag,{value:"Module"})});
|