@tuongaz/seeflow 0.1.14 → 0.1.15

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.
@@ -37,7 +37,7 @@ var Zge=Object.defineProperty;var Xge=(e,t,n)=>t in e?Zge(e,t,{enumerable:!0,con
37
37
  `+i[o].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}while(1<=o&&0<=s);break}}}finally{xz=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?q0(e):""}function Cme(e){switch(e.tag){case 5:return q0(e.type);case 16:return q0("Lazy");case 13:return q0("Suspense");case 19:return q0("SuspenseList");case 0:case 2:case 15:return e=wz(e.type,!1),e;case 11:return e=wz(e.type.render,!1),e;case 1:return e=wz(e.type,!0),e;default:return""}}function s$(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case I2:return"Fragment";case L2:return"Portal";case i$:return"Profiler";case kG:return"StrictMode";case a$:return"Suspense";case o$:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case ace:return(e.displayName||"Context")+".Consumer";case ice:return(e._context.displayName||"Context")+".Provider";case xG:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case wG:return t=e.displayName||null,t!==null?t:s$(e.type)||"Memo";case Rc:t=e._payload,e=e._init;try{return s$(e(t))}catch{}}return null}function Lme(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return s$(t);case 8:return t===kG?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function nl(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function sce(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Ime(e){var t=sce(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(o){r=""+o,a.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function jg(e){e._valueTracker||(e._valueTracker=Ime(e))}function cce(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=sce(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function vT(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function c$(e,t){var n=t.checked;return fr({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function OX(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=nl(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function lce(e,t){t=t.checked,t!=null&&vG(e,"checked",t,!1)}function l$(e,t){lce(e,t);var n=nl(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?u$(e,t.type,n):t.hasOwnProperty("defaultValue")&&u$(e,t.type,nl(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function FX(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function u$(e,t,n){(t!=="number"||vT(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var z0=Array.isArray;function H2(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+nl(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function d$(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(Je(91));return fr({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function BX(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(Je(92));if(z0(n)){if(1<n.length)throw Error(Je(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:nl(n)}}function uce(e,t){var n=nl(t.value),r=nl(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function HX(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function dce(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function h$(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?dce(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Tg,hce=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Tg=Tg||document.createElement("div"),Tg.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Tg.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function $p(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Y0={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Ame=["Webkit","ms","Moz","O"];Object.keys(Y0).forEach(function(e){Ame.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Y0[t]=Y0[e]})});function fce(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Y0.hasOwnProperty(e)&&Y0[e]?(""+t).trim():t+"px"}function pce(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=fce(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var _me=fr({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function f$(e,t){if(t){if(_me[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Je(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Je(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Je(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Je(62))}}function p$(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var y$=null;function bG(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var g$=null,V2=null,U2=null;function VX(e){if(e=_y(e)){if(typeof g$!="function")throw Error(Je(280));var t=e.stateNode;t&&(t=ED(t),g$(e.stateNode,e.type,t))}}function yce(e){V2?U2?U2.push(e):U2=[e]:V2=e}function gce(){if(V2){var e=V2,t=U2;if(U2=V2=null,VX(e),t)for(e=0;e<t.length;e++)VX(t[e])}}function mce(e,t){return e(t)}function vce(){}var bz=!1;function kce(e,t,n){if(bz)return e(t,n);bz=!0;try{return mce(e,t,n)}finally{bz=!1,(V2!==null||U2!==null)&&(vce(),gce())}}function Wp(e,t){var n=e.stateNode;if(n===null)return null;var r=ED(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(Je(231,t,typeof n));return n}var m$=!1;if(Ys)try{var v0={};Object.defineProperty(v0,"passive",{get:function(){m$=!0}}),window.addEventListener("test",v0,v0),window.removeEventListener("test",v0,v0)}catch{m$=!1}function Eme(e,t,n,r,i,a,o,s,c){var l=Array.prototype.slice.call(arguments,3);try{t.apply(n,l)}catch(u){this.onError(u)}}var J0=!1,kT=null,xT=!1,v$=null,Pme={onError:function(e){J0=!0,kT=e}};function Nme(e,t,n,r,i,a,o,s,c){J0=!1,kT=null,Eme.apply(Pme,arguments)}function Rme(e,t,n,r,i,a,o,s,c){if(Nme.apply(this,arguments),J0){if(J0){var l=kT;J0=!1,kT=null}else throw Error(Je(198));xT||(xT=!0,v$=l)}}function Oh(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function xce(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function UX(e){if(Oh(e)!==e)throw Error(Je(188))}function jme(e){var t=e.alternate;if(!t){if(t=Oh(e),t===null)throw Error(Je(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var a=i.alternate;if(a===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===a.child){for(a=i.child;a;){if(a===n)return UX(i),e;if(a===r)return UX(i),t;a=a.sibling}throw Error(Je(188))}if(n.return!==r.return)n=i,r=a;else{for(var o=!1,s=i.child;s;){if(s===n){o=!0,n=i,r=a;break}if(s===r){o=!0,r=i,n=a;break}s=s.sibling}if(!o){for(s=a.child;s;){if(s===n){o=!0,n=a,r=i;break}if(s===r){o=!0,r=a,n=i;break}s=s.sibling}if(!o)throw Error(Je(189))}}if(n.alternate!==r)throw Error(Je(190))}if(n.tag!==3)throw Error(Je(188));return n.stateNode.current===n?e:t}function wce(e){return e=jme(e),e!==null?bce(e):null}function bce(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=bce(e);if(t!==null)return t;e=e.sibling}return null}var Mce=Ba.unstable_scheduleCallback,$X=Ba.unstable_cancelCallback,Tme=Ba.unstable_shouldYield,Dme=Ba.unstable_requestPaint,_r=Ba.unstable_now,qme=Ba.unstable_getCurrentPriorityLevel,MG=Ba.unstable_ImmediatePriority,Sce=Ba.unstable_UserBlockingPriority,wT=Ba.unstable_NormalPriority,zme=Ba.unstable_LowPriority,Cce=Ba.unstable_IdlePriority,LD=null,fs=null;function Ome(e){if(fs&&typeof fs.onCommitFiberRoot=="function")try{fs.onCommitFiberRoot(LD,e,void 0,(e.current.flags&128)===128)}catch{}}var Ro=Math.clz32?Math.clz32:Hme,Fme=Math.log,Bme=Math.LN2;function Hme(e){return e>>>=0,e===0?32:31-(Fme(e)/Bme|0)|0}var Dg=64,qg=4194304;function O0(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function bT(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,a=e.pingedLanes,o=n&268435455;if(o!==0){var s=o&~i;s!==0?r=O0(s):(a&=o,a!==0&&(r=O0(a)))}else o=n&~i,o!==0?r=O0(o):a!==0&&(r=O0(a));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,a=t&-t,i>=a||i===16&&(a&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Ro(t),i=1<<n,r|=e[n],t&=~i;return r}function Vme(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Ume(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes;0<a;){var o=31-Ro(a),s=1<<o,c=i[o];c===-1?(!(s&n)||s&r)&&(i[o]=Vme(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}}function k$(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Lce(){var e=Dg;return Dg<<=1,!(Dg&4194240)&&(Dg=64),e}function Mz(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Iy(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ro(t),e[t]=n}function $me(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-Ro(n),a=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~a}}function SG(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Ro(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var xn=0;function Ice(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Ace,CG,_ce,Ece,Pce,x$=!1,zg=[],Uc=null,$c=null,Wc=null,Gp=new Map,Kp=new Map,Dc=[],Wme="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function WX(e,t){switch(e){case"focusin":case"focusout":Uc=null;break;case"dragenter":case"dragleave":$c=null;break;case"mouseover":case"mouseout":Wc=null;break;case"pointerover":case"pointerout":Gp.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Kp.delete(t.pointerId)}}function k0(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=_y(t),t!==null&&CG(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Gme(e,t,n,r,i){switch(t){case"focusin":return Uc=k0(Uc,e,t,n,r,i),!0;case"dragenter":return $c=k0($c,e,t,n,r,i),!0;case"mouseover":return Wc=k0(Wc,e,t,n,r,i),!0;case"pointerover":var a=i.pointerId;return Gp.set(a,k0(Gp.get(a)||null,e,t,n,r,i)),!0;case"gotpointercapture":return a=i.pointerId,Kp.set(a,k0(Kp.get(a)||null,e,t,n,r,i)),!0}return!1}function Nce(e){var t=hh(e.target);if(t!==null){var n=Oh(t);if(n!==null){if(t=n.tag,t===13){if(t=xce(n),t!==null){e.blockedOn=t,Pce(e.priority,function(){_ce(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Tm(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=w$(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);y$=r,n.target.dispatchEvent(r),y$=null}else return t=_y(n),t!==null&&CG(t),e.blockedOn=n,!1;t.shift()}return!0}function GX(e,t,n){Tm(e)&&n.delete(t)}function Kme(){x$=!1,Uc!==null&&Tm(Uc)&&(Uc=null),$c!==null&&Tm($c)&&($c=null),Wc!==null&&Tm(Wc)&&(Wc=null),Gp.forEach(GX),Kp.forEach(GX)}function x0(e,t){e.blockedOn===t&&(e.blockedOn=null,x$||(x$=!0,Ba.unstable_scheduleCallback(Ba.unstable_NormalPriority,Kme)))}function Zp(e){function t(i){return x0(i,e)}if(0<zg.length){x0(zg[0],e);for(var n=1;n<zg.length;n++){var r=zg[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Uc!==null&&x0(Uc,e),$c!==null&&x0($c,e),Wc!==null&&x0(Wc,e),Gp.forEach(t),Kp.forEach(t),n=0;n<Dc.length;n++)r=Dc[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Dc.length&&(n=Dc[0],n.blockedOn===null);)Nce(n),n.blockedOn===null&&Dc.shift()}var $2=ac.ReactCurrentBatchConfig,MT=!0;function Zme(e,t,n,r){var i=xn,a=$2.transition;$2.transition=null;try{xn=1,LG(e,t,n,r)}finally{xn=i,$2.transition=a}}function Xme(e,t,n,r){var i=xn,a=$2.transition;$2.transition=null;try{xn=4,LG(e,t,n,r)}finally{xn=i,$2.transition=a}}function LG(e,t,n,r){if(MT){var i=w$(e,t,n,r);if(i===null)Rz(e,t,r,ST,n),WX(e,r);else if(Gme(i,e,t,n,r))r.stopPropagation();else if(WX(e,r),t&4&&-1<Wme.indexOf(e)){for(;i!==null;){var a=_y(i);if(a!==null&&Ace(a),a=w$(e,t,n,r),a===null&&Rz(e,t,r,ST,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Rz(e,t,r,null,n)}}var ST=null;function w$(e,t,n,r){if(ST=null,e=bG(r),e=hh(e),e!==null)if(t=Oh(e),t===null)e=null;else if(n=t.tag,n===13){if(e=xce(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return ST=e,null}function Rce(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(qme()){case MG:return 1;case Sce:return 4;case wT:case zme:return 16;case Cce:return 536870912;default:return 16}default:return 16}}var Bc=null,IG=null,Dm=null;function jce(){if(Dm)return Dm;var e,t=IG,n=t.length,r,i="value"in Bc?Bc.value:Bc.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return Dm=i.slice(e,1<r?1-r:void 0)}function qm(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Og(){return!0}function KX(){return!1}function Ua(e){function t(n,r,i,a,o){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=a,this.target=o,this.currentTarget=null;for(var s in e)e.hasOwnProperty(s)&&(n=e[s],this[s]=n?n(a):a[s]);return this.isDefaultPrevented=(a.defaultPrevented!=null?a.defaultPrevented:a.returnValue===!1)?Og:KX,this.isPropagationStopped=KX,this}return fr(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Og)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Og)},persist:function(){},isPersistent:Og}),t}var Tf={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},AG=Ua(Tf),Ay=fr({},Tf,{view:0,detail:0}),Yme=Ua(Ay),Sz,Cz,w0,ID=fr({},Ay,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:_G,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==w0&&(w0&&e.type==="mousemove"?(Sz=e.screenX-w0.screenX,Cz=e.screenY-w0.screenY):Cz=Sz=0,w0=e),Sz)},movementY:function(e){return"movementY"in e?e.movementY:Cz}}),ZX=Ua(ID),Jme=fr({},ID,{dataTransfer:0}),Qme=Ua(Jme),e5e=fr({},Ay,{relatedTarget:0}),Lz=Ua(e5e),t5e=fr({},Tf,{animationName:0,elapsedTime:0,pseudoElement:0}),n5e=Ua(t5e),r5e=fr({},Tf,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),i5e=Ua(r5e),a5e=fr({},Tf,{data:0}),XX=Ua(a5e),o5e={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},s5e={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"},c5e={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function l5e(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=c5e[e])?!!t[e]:!1}function _G(){return l5e}var u5e=fr({},Ay,{key:function(e){if(e.key){var t=o5e[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=qm(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?s5e[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:_G,charCode:function(e){return e.type==="keypress"?qm(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?qm(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),d5e=Ua(u5e),h5e=fr({},ID,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),YX=Ua(h5e),f5e=fr({},Ay,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:_G}),p5e=Ua(f5e),y5e=fr({},Tf,{propertyName:0,elapsedTime:0,pseudoElement:0}),g5e=Ua(y5e),m5e=fr({},ID,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),v5e=Ua(m5e),k5e=[9,13,27,32],EG=Ys&&"CompositionEvent"in window,Q0=null;Ys&&"documentMode"in document&&(Q0=document.documentMode);var x5e=Ys&&"TextEvent"in window&&!Q0,Tce=Ys&&(!EG||Q0&&8<Q0&&11>=Q0),JX=" ",QX=!1;function Dce(e,t){switch(e){case"keyup":return k5e.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function qce(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var A2=!1;function w5e(e,t){switch(e){case"compositionend":return qce(t);case"keypress":return t.which!==32?null:(QX=!0,JX);case"textInput":return e=t.data,e===JX&&QX?null:e;default:return null}}function b5e(e,t){if(A2)return e==="compositionend"||!EG&&Dce(e,t)?(e=jce(),Dm=IG=Bc=null,A2=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Tce&&t.locale!=="ko"?null:t.data;default:return null}}var M5e={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 eY(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!M5e[e.type]:t==="textarea"}function zce(e,t,n,r){yce(r),t=CT(t,"onChange"),0<t.length&&(n=new AG("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var ep=null,Xp=null;function S5e(e){Zce(e,0)}function AD(e){var t=P2(e);if(cce(t))return e}function C5e(e,t){if(e==="change")return t}var Oce=!1;if(Ys){var Iz;if(Ys){var Az="oninput"in document;if(!Az){var tY=document.createElement("div");tY.setAttribute("oninput","return;"),Az=typeof tY.oninput=="function"}Iz=Az}else Iz=!1;Oce=Iz&&(!document.documentMode||9<document.documentMode)}function nY(){ep&&(ep.detachEvent("onpropertychange",Fce),Xp=ep=null)}function Fce(e){if(e.propertyName==="value"&&AD(Xp)){var t=[];zce(t,Xp,e,bG(e)),kce(S5e,t)}}function L5e(e,t,n){e==="focusin"?(nY(),ep=t,Xp=n,ep.attachEvent("onpropertychange",Fce)):e==="focusout"&&nY()}function I5e(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return AD(Xp)}function A5e(e,t){if(e==="click")return AD(t)}function _5e(e,t){if(e==="input"||e==="change")return AD(t)}function E5e(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Do=typeof Object.is=="function"?Object.is:E5e;function Yp(e,t){if(Do(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!r$.call(t,i)||!Do(e[i],t[i]))return!1}return!0}function rY(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function iY(e,t){var n=rY(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=rY(n)}}function Bce(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Bce(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Hce(){for(var e=window,t=vT();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=vT(e.document)}return t}function PG(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function P5e(e){var t=Hce(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Bce(n.ownerDocument.documentElement,n)){if(r!==null&&PG(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,a=Math.min(r.start,i);r=r.end===void 0?a:Math.min(r.end,i),!e.extend&&a>r&&(i=r,r=a,a=i),i=iY(n,a);var o=iY(n,r);i&&o&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),a>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var N5e=Ys&&"documentMode"in document&&11>=document.documentMode,_2=null,b$=null,tp=null,M$=!1;function aY(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;M$||_2==null||_2!==vT(r)||(r=_2,"selectionStart"in r&&PG(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),tp&&Yp(tp,r)||(tp=r,r=CT(b$,"onSelect"),0<r.length&&(t=new AG("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=_2)))}function Fg(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var E2={animationend:Fg("Animation","AnimationEnd"),animationiteration:Fg("Animation","AnimationIteration"),animationstart:Fg("Animation","AnimationStart"),transitionend:Fg("Transition","TransitionEnd")},_z={},Vce={};Ys&&(Vce=document.createElement("div").style,"AnimationEvent"in window||(delete E2.animationend.animation,delete E2.animationiteration.animation,delete E2.animationstart.animation),"TransitionEvent"in window||delete E2.transitionend.transition);function _D(e){if(_z[e])return _z[e];if(!E2[e])return e;var t=E2[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Vce)return _z[e]=t[n];return e}var Uce=_D("animationend"),$ce=_D("animationiteration"),Wce=_D("animationstart"),Gce=_D("transitionend"),Kce=new Map,oY="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function dl(e,t){Kce.set(e,t),zh(t,[e])}for(var Ez=0;Ez<oY.length;Ez++){var Pz=oY[Ez],R5e=Pz.toLowerCase(),j5e=Pz[0].toUpperCase()+Pz.slice(1);dl(R5e,"on"+j5e)}dl(Uce,"onAnimationEnd");dl($ce,"onAnimationIteration");dl(Wce,"onAnimationStart");dl("dblclick","onDoubleClick");dl("focusin","onFocus");dl("focusout","onBlur");dl(Gce,"onTransitionEnd");df("onMouseEnter",["mouseout","mouseover"]);df("onMouseLeave",["mouseout","mouseover"]);df("onPointerEnter",["pointerout","pointerover"]);df("onPointerLeave",["pointerout","pointerover"]);zh("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));zh("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));zh("onBeforeInput",["compositionend","keypress","textInput","paste"]);zh("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));zh("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));zh("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var F0="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(" "),T5e=new Set("cancel close invalid load scroll toggle".split(" ").concat(F0));function sY(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,Rme(r,t,void 0,e),e.currentTarget=null}function Zce(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break e;sY(i,s,l),a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break e;sY(i,s,l),a=c}}}if(xT)throw e=v$,xT=!1,v$=null,e}function Gn(e,t){var n=t[A$];n===void 0&&(n=t[A$]=new Set);var r=e+"__bubble";n.has(r)||(Xce(t,e,2,!1),n.add(r))}function Nz(e,t,n){var r=0;t&&(r|=4),Xce(n,e,r,t)}var Bg="_reactListening"+Math.random().toString(36).slice(2);function Jp(e){if(!e[Bg]){e[Bg]=!0,rce.forEach(function(n){n!=="selectionchange"&&(T5e.has(n)||Nz(n,!1,e),Nz(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Bg]||(t[Bg]=!0,Nz("selectionchange",!1,t))}}function Xce(e,t,n,r){switch(Rce(t)){case 1:var i=Zme;break;case 4:i=Xme;break;default:i=LG}n=i.bind(null,t,n,e),i=void 0,!m$||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),r?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function Rz(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var s=r.stateNode.containerInfo;if(s===i||s.nodeType===8&&s.parentNode===i)break;if(o===4)for(o=r.return;o!==null;){var c=o.tag;if((c===3||c===4)&&(c=o.stateNode.containerInfo,c===i||c.nodeType===8&&c.parentNode===i))return;o=o.return}for(;s!==null;){if(o=hh(s),o===null)return;if(c=o.tag,c===5||c===6){r=a=o;continue e}s=s.parentNode}}r=r.return}kce(function(){var l=a,u=bG(n),d=[];e:{var f=Kce.get(e);if(f!==void 0){var h=AG,y=e;switch(e){case"keypress":if(qm(n)===0)break e;case"keydown":case"keyup":h=d5e;break;case"focusin":y="focus",h=Lz;break;case"focusout":y="blur",h=Lz;break;case"beforeblur":case"afterblur":h=Lz;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":h=ZX;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=Qme;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=p5e;break;case Uce:case $ce:case Wce:h=n5e;break;case Gce:h=g5e;break;case"scroll":h=Yme;break;case"wheel":h=v5e;break;case"copy":case"cut":case"paste":h=i5e;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=YX}var v=(t&4)!==0,k=!v&&e==="scroll",g=v?f!==null?f+"Capture":null:f;v=[];for(var S=l,w;S!==null;){w=S;var C=w.stateNode;if(w.tag===5&&C!==null&&(w=C,g!==null&&(C=Wp(S,g),C!=null&&v.push(Qp(S,C,w)))),k)break;S=S.return}0<v.length&&(f=new h(f,y,null,n,u),d.push({event:f,listeners:v}))}}if(!(t&7)){e:{if(f=e==="mouseover"||e==="pointerover",h=e==="mouseout"||e==="pointerout",f&&n!==y$&&(y=n.relatedTarget||n.fromElement)&&(hh(y)||y[Js]))break e;if((h||f)&&(f=u.window===u?u:(f=u.ownerDocument)?f.defaultView||f.parentWindow:window,h?(y=n.relatedTarget||n.toElement,h=l,y=y?hh(y):null,y!==null&&(k=Oh(y),y!==k||y.tag!==5&&y.tag!==6)&&(y=null)):(h=null,y=l),h!==y)){if(v=ZX,C="onMouseLeave",g="onMouseEnter",S="mouse",(e==="pointerout"||e==="pointerover")&&(v=YX,C="onPointerLeave",g="onPointerEnter",S="pointer"),k=h==null?f:P2(h),w=y==null?f:P2(y),f=new v(C,S+"leave",h,n,u),f.target=k,f.relatedTarget=w,C=null,hh(u)===l&&(v=new v(g,S+"enter",y,n,u),v.target=w,v.relatedTarget=k,C=v),k=C,h&&y)t:{for(v=h,g=y,S=0,w=v;w;w=s2(w))S++;for(w=0,C=g;C;C=s2(C))w++;for(;0<S-w;)v=s2(v),S--;for(;0<w-S;)g=s2(g),w--;for(;S--;){if(v===g||g!==null&&v===g.alternate)break t;v=s2(v),g=s2(g)}v=null}else v=null;h!==null&&cY(d,f,h,v,!1),y!==null&&k!==null&&cY(d,k,y,v,!0)}}e:{if(f=l?P2(l):window,h=f.nodeName&&f.nodeName.toLowerCase(),h==="select"||h==="input"&&f.type==="file")var _=C5e;else if(eY(f))if(Oce)_=_5e;else{_=I5e;var A=L5e}else(h=f.nodeName)&&h.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(_=A5e);if(_&&(_=_(e,l))){zce(d,_,n,u);break e}A&&A(e,f,l),e==="focusout"&&(A=f._wrapperState)&&A.controlled&&f.type==="number"&&u$(f,"number",f.value)}switch(A=l?P2(l):window,e){case"focusin":(eY(A)||A.contentEditable==="true")&&(_2=A,b$=l,tp=null);break;case"focusout":tp=b$=_2=null;break;case"mousedown":M$=!0;break;case"contextmenu":case"mouseup":case"dragend":M$=!1,aY(d,n,u);break;case"selectionchange":if(N5e)break;case"keydown":case"keyup":aY(d,n,u)}var j;if(EG)e:{switch(e){case"compositionstart":var O="onCompositionStart";break e;case"compositionend":O="onCompositionEnd";break e;case"compositionupdate":O="onCompositionUpdate";break e}O=void 0}else A2?Dce(e,n)&&(O="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(O="onCompositionStart");O&&(Tce&&n.locale!=="ko"&&(A2||O!=="onCompositionStart"?O==="onCompositionEnd"&&A2&&(j=jce()):(Bc=u,IG="value"in Bc?Bc.value:Bc.textContent,A2=!0)),A=CT(l,O),0<A.length&&(O=new XX(O,e,null,n,u),d.push({event:O,listeners:A}),j?O.data=j:(j=qce(n),j!==null&&(O.data=j)))),(j=x5e?w5e(e,n):b5e(e,n))&&(l=CT(l,"onBeforeInput"),0<l.length&&(u=new XX("onBeforeInput","beforeinput",null,n,u),d.push({event:u,listeners:l}),u.data=j))}Zce(d,t)})}function Qp(e,t,n){return{instance:e,listener:t,currentTarget:n}}function CT(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,a=i.stateNode;i.tag===5&&a!==null&&(i=a,a=Wp(e,n),a!=null&&r.unshift(Qp(e,a,i)),a=Wp(e,t),a!=null&&r.push(Qp(e,a,i))),e=e.return}return r}function s2(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function cY(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(c!==null&&c===r)break;s.tag===5&&l!==null&&(s=l,i?(c=Wp(n,a),c!=null&&o.unshift(Qp(n,c,s))):i||(c=Wp(n,a),c!=null&&o.push(Qp(n,c,s)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var D5e=/\r\n?/g,q5e=/\u0000|\uFFFD/g;function lY(e){return(typeof e=="string"?e:""+e).replace(D5e,`
38
38
  `).replace(q5e,"")}function Hg(e,t,n){if(t=lY(t),lY(e)!==t&&n)throw Error(Je(425))}function LT(){}var S$=null,C$=null;function L$(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var I$=typeof setTimeout=="function"?setTimeout:void 0,z5e=typeof clearTimeout=="function"?clearTimeout:void 0,uY=typeof Promise=="function"?Promise:void 0,O5e=typeof queueMicrotask=="function"?queueMicrotask:typeof uY<"u"?function(e){return uY.resolve(null).then(e).catch(F5e)}:I$;function F5e(e){setTimeout(function(){throw e})}function jz(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){e.removeChild(i),Zp(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);Zp(t)}function Gc(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function dY(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Df=Math.random().toString(36).slice(2),ss="__reactFiber$"+Df,ey="__reactProps$"+Df,Js="__reactContainer$"+Df,A$="__reactEvents$"+Df,B5e="__reactListeners$"+Df,H5e="__reactHandles$"+Df;function hh(e){var t=e[ss];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Js]||n[ss]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=dY(e);e!==null;){if(n=e[ss])return n;e=dY(e)}return t}e=n,n=e.parentNode}return null}function _y(e){return e=e[ss]||e[Js],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function P2(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(Je(33))}function ED(e){return e[ey]||null}var _$=[],N2=-1;function hl(e){return{current:e}}function Zn(e){0>N2||(e.current=_$[N2],_$[N2]=null,N2--)}function Bn(e,t){N2++,_$[N2]=e.current,e.current=t}var rl={},Ri=hl(rl),ca=hl(!1),bh=rl;function hf(e,t){var n=e.type.contextTypes;if(!n)return rl;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},a;for(a in n)i[a]=t[a];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function la(e){return e=e.childContextTypes,e!=null}function IT(){Zn(ca),Zn(Ri)}function hY(e,t,n){if(Ri.current!==rl)throw Error(Je(168));Bn(Ri,t),Bn(ca,n)}function Yce(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(Je(108,Lme(e)||"Unknown",i));return fr({},n,r)}function AT(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||rl,bh=Ri.current,Bn(Ri,e),Bn(ca,ca.current),!0}function fY(e,t,n){var r=e.stateNode;if(!r)throw Error(Je(169));n?(e=Yce(e,t,bh),r.__reactInternalMemoizedMergedChildContext=e,Zn(ca),Zn(Ri),Bn(Ri,e)):Zn(ca),Bn(ca,n)}var Vs=null,PD=!1,Tz=!1;function Jce(e){Vs===null?Vs=[e]:Vs.push(e)}function V5e(e){PD=!0,Jce(e)}function fl(){if(!Tz&&Vs!==null){Tz=!0;var e=0,t=xn;try{var n=Vs;for(xn=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Vs=null,PD=!1}catch(i){throw Vs!==null&&(Vs=Vs.slice(e+1)),Mce(MG,fl),i}finally{xn=t,Tz=!1}}return null}var R2=[],j2=0,_T=null,ET=0,Qa=[],eo=0,Mh=null,$s=1,Ws="";function jl(e,t){R2[j2++]=ET,R2[j2++]=_T,_T=e,ET=t}function Qce(e,t,n){Qa[eo++]=$s,Qa[eo++]=Ws,Qa[eo++]=Mh,Mh=e;var r=$s;e=Ws;var i=32-Ro(r)-1;r&=~(1<<i),n+=1;var a=32-Ro(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,$s=1<<32-Ro(t)+i|n<<i|r,Ws=a+e}else $s=1<<a|n<<i|r,Ws=e}function NG(e){e.return!==null&&(jl(e,1),Qce(e,1,0))}function RG(e){for(;e===_T;)_T=R2[--j2],R2[j2]=null,ET=R2[--j2],R2[j2]=null;for(;e===Mh;)Mh=Qa[--eo],Qa[eo]=null,Ws=Qa[--eo],Qa[eo]=null,$s=Qa[--eo],Qa[eo]=null}var za=null,Da=null,tr=!1,_o=null;function ele(e,t){var n=ro(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function pY(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,za=e,Da=Gc(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,za=e,Da=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Mh!==null?{id:$s,overflow:Ws}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=ro(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,za=e,Da=null,!0):!1;default:return!1}}function E$(e){return(e.mode&1)!==0&&(e.flags&128)===0}function P$(e){if(tr){var t=Da;if(t){var n=t;if(!pY(e,t)){if(E$(e))throw Error(Je(418));t=Gc(n.nextSibling);var r=za;t&&pY(e,t)?ele(r,n):(e.flags=e.flags&-4097|2,tr=!1,za=e)}}else{if(E$(e))throw Error(Je(418));e.flags=e.flags&-4097|2,tr=!1,za=e}}}function yY(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;za=e}function Vg(e){if(e!==za)return!1;if(!tr)return yY(e),tr=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!L$(e.type,e.memoizedProps)),t&&(t=Da)){if(E$(e))throw tle(),Error(Je(418));for(;t;)ele(e,t),t=Gc(t.nextSibling)}if(yY(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(Je(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Da=Gc(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Da=null}}else Da=za?Gc(e.stateNode.nextSibling):null;return!0}function tle(){for(var e=Da;e;)e=Gc(e.nextSibling)}function ff(){Da=za=null,tr=!1}function jG(e){_o===null?_o=[e]:_o.push(e)}var U5e=ac.ReactCurrentBatchConfig;function b0(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(Je(309));var r=n.stateNode}if(!r)throw Error(Je(147,e));var i=r,a=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===a?t.ref:(t=function(o){var s=i.refs;o===null?delete s[a]:s[a]=o},t._stringRef=a,t)}if(typeof e!="string")throw Error(Je(284));if(!n._owner)throw Error(Je(290,e))}return e}function Ug(e,t){throw e=Object.prototype.toString.call(t),Error(Je(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function gY(e){var t=e._init;return t(e._payload)}function nle(e){function t(g,S){if(e){var w=g.deletions;w===null?(g.deletions=[S],g.flags|=16):w.push(S)}}function n(g,S){if(!e)return null;for(;S!==null;)t(g,S),S=S.sibling;return null}function r(g,S){for(g=new Map;S!==null;)S.key!==null?g.set(S.key,S):g.set(S.index,S),S=S.sibling;return g}function i(g,S){return g=Yc(g,S),g.index=0,g.sibling=null,g}function a(g,S,w){return g.index=w,e?(w=g.alternate,w!==null?(w=w.index,w<S?(g.flags|=2,S):w):(g.flags|=2,S)):(g.flags|=1048576,S)}function o(g){return e&&g.alternate===null&&(g.flags|=2),g}function s(g,S,w,C){return S===null||S.tag!==6?(S=Hz(w,g.mode,C),S.return=g,S):(S=i(S,w),S.return=g,S)}function c(g,S,w,C){var _=w.type;return _===I2?u(g,S,w.props.children,C,w.key):S!==null&&(S.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===Rc&&gY(_)===S.type)?(C=i(S,w.props),C.ref=b0(g,S,w),C.return=g,C):(C=Um(w.type,w.key,w.props,null,g.mode,C),C.ref=b0(g,S,w),C.return=g,C)}function l(g,S,w,C){return S===null||S.tag!==4||S.stateNode.containerInfo!==w.containerInfo||S.stateNode.implementation!==w.implementation?(S=Vz(w,g.mode,C),S.return=g,S):(S=i(S,w.children||[]),S.return=g,S)}function u(g,S,w,C,_){return S===null||S.tag!==7?(S=vh(w,g.mode,C,_),S.return=g,S):(S=i(S,w),S.return=g,S)}function d(g,S,w){if(typeof S=="string"&&S!==""||typeof S=="number")return S=Hz(""+S,g.mode,w),S.return=g,S;if(typeof S=="object"&&S!==null){switch(S.$$typeof){case Rg:return w=Um(S.type,S.key,S.props,null,g.mode,w),w.ref=b0(g,null,S),w.return=g,w;case L2:return S=Vz(S,g.mode,w),S.return=g,S;case Rc:var C=S._init;return d(g,C(S._payload),w)}if(z0(S)||m0(S))return S=vh(S,g.mode,w,null),S.return=g,S;Ug(g,S)}return null}function f(g,S,w,C){var _=S!==null?S.key:null;if(typeof w=="string"&&w!==""||typeof w=="number")return _!==null?null:s(g,S,""+w,C);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case Rg:return w.key===_?c(g,S,w,C):null;case L2:return w.key===_?l(g,S,w,C):null;case Rc:return _=w._init,f(g,S,_(w._payload),C)}if(z0(w)||m0(w))return _!==null?null:u(g,S,w,C,null);Ug(g,w)}return null}function h(g,S,w,C,_){if(typeof C=="string"&&C!==""||typeof C=="number")return g=g.get(w)||null,s(S,g,""+C,_);if(typeof C=="object"&&C!==null){switch(C.$$typeof){case Rg:return g=g.get(C.key===null?w:C.key)||null,c(S,g,C,_);case L2:return g=g.get(C.key===null?w:C.key)||null,l(S,g,C,_);case Rc:var A=C._init;return h(g,S,w,A(C._payload),_)}if(z0(C)||m0(C))return g=g.get(w)||null,u(S,g,C,_,null);Ug(S,C)}return null}function y(g,S,w,C){for(var _=null,A=null,j=S,O=S=0,T=null;j!==null&&O<w.length;O++){j.index>O?(T=j,j=null):T=j.sibling;var D=f(g,j,w[O],C);if(D===null){j===null&&(j=T);break}e&&j&&D.alternate===null&&t(g,j),S=a(D,S,O),A===null?_=D:A.sibling=D,A=D,j=T}if(O===w.length)return n(g,j),tr&&jl(g,O),_;if(j===null){for(;O<w.length;O++)j=d(g,w[O],C),j!==null&&(S=a(j,S,O),A===null?_=j:A.sibling=j,A=j);return tr&&jl(g,O),_}for(j=r(g,j);O<w.length;O++)T=h(j,g,O,w[O],C),T!==null&&(e&&T.alternate!==null&&j.delete(T.key===null?O:T.key),S=a(T,S,O),A===null?_=T:A.sibling=T,A=T);return e&&j.forEach(function(I){return t(g,I)}),tr&&jl(g,O),_}function v(g,S,w,C){var _=m0(w);if(typeof _!="function")throw Error(Je(150));if(w=_.call(w),w==null)throw Error(Je(151));for(var A=_=null,j=S,O=S=0,T=null,D=w.next();j!==null&&!D.done;O++,D=w.next()){j.index>O?(T=j,j=null):T=j.sibling;var I=f(g,j,D.value,C);if(I===null){j===null&&(j=T);break}e&&j&&I.alternate===null&&t(g,j),S=a(I,S,O),A===null?_=I:A.sibling=I,A=I,j=T}if(D.done)return n(g,j),tr&&jl(g,O),_;if(j===null){for(;!D.done;O++,D=w.next())D=d(g,D.value,C),D!==null&&(S=a(D,S,O),A===null?_=D:A.sibling=D,A=D);return tr&&jl(g,O),_}for(j=r(g,j);!D.done;O++,D=w.next())D=h(j,g,O,D.value,C),D!==null&&(e&&D.alternate!==null&&j.delete(D.key===null?O:D.key),S=a(D,S,O),A===null?_=D:A.sibling=D,A=D);return e&&j.forEach(function(R){return t(g,R)}),tr&&jl(g,O),_}function k(g,S,w,C){if(typeof w=="object"&&w!==null&&w.type===I2&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case Rg:e:{for(var _=w.key,A=S;A!==null;){if(A.key===_){if(_=w.type,_===I2){if(A.tag===7){n(g,A.sibling),S=i(A,w.props.children),S.return=g,g=S;break e}}else if(A.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===Rc&&gY(_)===A.type){n(g,A.sibling),S=i(A,w.props),S.ref=b0(g,A,w),S.return=g,g=S;break e}n(g,A);break}else t(g,A);A=A.sibling}w.type===I2?(S=vh(w.props.children,g.mode,C,w.key),S.return=g,g=S):(C=Um(w.type,w.key,w.props,null,g.mode,C),C.ref=b0(g,S,w),C.return=g,g=C)}return o(g);case L2:e:{for(A=w.key;S!==null;){if(S.key===A)if(S.tag===4&&S.stateNode.containerInfo===w.containerInfo&&S.stateNode.implementation===w.implementation){n(g,S.sibling),S=i(S,w.children||[]),S.return=g,g=S;break e}else{n(g,S);break}else t(g,S);S=S.sibling}S=Vz(w,g.mode,C),S.return=g,g=S}return o(g);case Rc:return A=w._init,k(g,S,A(w._payload),C)}if(z0(w))return y(g,S,w,C);if(m0(w))return v(g,S,w,C);Ug(g,w)}return typeof w=="string"&&w!==""||typeof w=="number"?(w=""+w,S!==null&&S.tag===6?(n(g,S.sibling),S=i(S,w),S.return=g,g=S):(n(g,S),S=Hz(w,g.mode,C),S.return=g,g=S),o(g)):n(g,S)}return k}var pf=nle(!0),rle=nle(!1),PT=hl(null),NT=null,T2=null,TG=null;function DG(){TG=T2=NT=null}function qG(e){var t=PT.current;Zn(PT),e._currentValue=t}function N$(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function W2(e,t){NT=e,TG=T2=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(oa=!0),e.firstContext=null)}function oo(e){var t=e._currentValue;if(TG!==e)if(e={context:e,memoizedValue:t,next:null},T2===null){if(NT===null)throw Error(Je(308));T2=e,NT.dependencies={lanes:0,firstContext:e}}else T2=T2.next=e;return t}var fh=null;function zG(e){fh===null?fh=[e]:fh.push(e)}function ile(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,zG(t)):(n.next=i.next,i.next=n),t.interleaved=n,Qs(e,r)}function Qs(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var jc=!1;function OG(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function ale(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Xs(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Kc(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,hn&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,Qs(e,n)}return i=r.interleaved,i===null?(t.next=t,zG(r)):(t.next=i.next,i.next=t),r.interleaved=t,Qs(e,n)}function zm(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,SG(e,n)}}function mY(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function RT(e,t,n,r){var i=e.updateQueue;jc=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane,h=s.eventTime;if((r&f)===f){u!==null&&(u=u.next={eventTime:h,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var y=e,v=s;switch(f=t,h=n,v.tag){case 1:if(y=v.payload,typeof y=="function"){d=y.call(h,d,f);break e}d=y;break e;case 3:y.flags=y.flags&-65537|128;case 0:if(y=v.payload,f=typeof y=="function"?y.call(h,d,f):y,f==null)break e;d=fr({},d,f);break e;case 2:jc=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,f=i.effects,f===null?i.effects=[s]:f.push(s))}else h={eventTime:h,lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=h,c=d):u=u.next=h,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;f=s,s=f.next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}while(!0);if(u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,t=i.shared.interleaved,t!==null){i=t;do o|=i.lane,i=i.next;while(i!==t)}else a===null&&(i.shared.lanes=0);Ch|=o,e.lanes=o,e.memoizedState=d}}function vY(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(Je(191,i));i.call(r)}}}var Ey={},ps=hl(Ey),ty=hl(Ey),ny=hl(Ey);function ph(e){if(e===Ey)throw Error(Je(174));return e}function FG(e,t){switch(Bn(ny,t),Bn(ty,e),Bn(ps,Ey),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:h$(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=h$(t,e)}Zn(ps),Bn(ps,t)}function yf(){Zn(ps),Zn(ty),Zn(ny)}function ole(e){ph(ny.current);var t=ph(ps.current),n=h$(t,e.type);t!==n&&(Bn(ty,e),Bn(ps,n))}function BG(e){ty.current===e&&(Zn(ps),Zn(ty))}var ur=hl(0);function jT(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Dz=[];function HG(){for(var e=0;e<Dz.length;e++)Dz[e]._workInProgressVersionPrimary=null;Dz.length=0}var Om=ac.ReactCurrentDispatcher,qz=ac.ReactCurrentBatchConfig,Sh=0,hr=null,Yr=null,ii=null,TT=!1,np=!1,ry=0,$5e=0;function Ci(){throw Error(Je(321))}function VG(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Do(e[n],t[n]))return!1;return!0}function UG(e,t,n,r,i,a){if(Sh=a,hr=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Om.current=e===null||e.memoizedState===null?Z5e:X5e,e=n(r,i),np){a=0;do{if(np=!1,ry=0,25<=a)throw Error(Je(301));a+=1,ii=Yr=null,t.updateQueue=null,Om.current=Y5e,e=n(r,i)}while(np)}if(Om.current=DT,t=Yr!==null&&Yr.next!==null,Sh=0,ii=Yr=hr=null,TT=!1,t)throw Error(Je(300));return e}function $G(){var e=ry!==0;return ry=0,e}function rs(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ii===null?hr.memoizedState=ii=e:ii=ii.next=e,ii}function so(){if(Yr===null){var e=hr.alternate;e=e!==null?e.memoizedState:null}else e=Yr.next;var t=ii===null?hr.memoizedState:ii.next;if(t!==null)ii=t,Yr=e;else{if(e===null)throw Error(Je(310));Yr=e,e={memoizedState:Yr.memoizedState,baseState:Yr.baseState,baseQueue:Yr.baseQueue,queue:Yr.queue,next:null},ii===null?hr.memoizedState=ii=e:ii=ii.next=e}return ii}function iy(e,t){return typeof t=="function"?t(e):t}function zz(e){var t=so(),n=t.queue;if(n===null)throw Error(Je(311));n.lastRenderedReducer=e;var r=Yr,i=r.baseQueue,a=n.pending;if(a!==null){if(i!==null){var o=i.next;i.next=a.next,a.next=o}r.baseQueue=i=a,n.pending=null}if(i!==null){a=i.next,r=r.baseState;var s=o=null,c=null,l=a;do{var u=l.lane;if((Sh&u)===u)c!==null&&(c=c.next={lane:0,action:l.action,hasEagerState:l.hasEagerState,eagerState:l.eagerState,next:null}),r=l.hasEagerState?l.eagerState:e(r,l.action);else{var d={lane:u,action:l.action,hasEagerState:l.hasEagerState,eagerState:l.eagerState,next:null};c===null?(s=c=d,o=r):c=c.next=d,hr.lanes|=u,Ch|=u}l=l.next}while(l!==null&&l!==a);c===null?o=r:c.next=s,Do(r,t.memoizedState)||(oa=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=c,n.lastRenderedState=r}if(e=n.interleaved,e!==null){i=e;do a=i.lane,hr.lanes|=a,Ch|=a,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Oz(e){var t=so(),n=t.queue;if(n===null)throw Error(Je(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,a=t.memoizedState;if(i!==null){n.pending=null;var o=i=i.next;do a=e(a,o.action),o=o.next;while(o!==i);Do(a,t.memoizedState)||(oa=!0),t.memoizedState=a,t.baseQueue===null&&(t.baseState=a),n.lastRenderedState=a}return[a,r]}function sle(){}function cle(e,t){var n=hr,r=so(),i=t(),a=!Do(r.memoizedState,i);if(a&&(r.memoizedState=i,oa=!0),r=r.queue,WG(dle.bind(null,n,r,e),[e]),r.getSnapshot!==t||a||ii!==null&&ii.memoizedState.tag&1){if(n.flags|=2048,ay(9,ule.bind(null,n,r,i,t),void 0,null),si===null)throw Error(Je(349));Sh&30||lle(n,t,i)}return i}function lle(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=hr.updateQueue,t===null?(t={lastEffect:null,stores:null},hr.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function ule(e,t,n,r){t.value=n,t.getSnapshot=r,hle(t)&&fle(e)}function dle(e,t,n){return n(function(){hle(t)&&fle(e)})}function hle(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Do(e,n)}catch{return!0}}function fle(e){var t=Qs(e,1);t!==null&&jo(t,e,1,-1)}function kY(e){var t=rs();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:iy,lastRenderedState:e},t.queue=e,e=e.dispatch=K5e.bind(null,hr,e),[t.memoizedState,e]}function ay(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=hr.updateQueue,t===null?(t={lastEffect:null,stores:null},hr.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function ple(){return so().memoizedState}function Fm(e,t,n,r){var i=rs();hr.flags|=e,i.memoizedState=ay(1|t,n,void 0,r===void 0?null:r)}function ND(e,t,n,r){var i=so();r=r===void 0?null:r;var a=void 0;if(Yr!==null){var o=Yr.memoizedState;if(a=o.destroy,r!==null&&VG(r,o.deps)){i.memoizedState=ay(t,n,a,r);return}}hr.flags|=e,i.memoizedState=ay(1|t,n,a,r)}function xY(e,t){return Fm(8390656,8,e,t)}function WG(e,t){return ND(2048,8,e,t)}function yle(e,t){return ND(4,2,e,t)}function gle(e,t){return ND(4,4,e,t)}function mle(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function vle(e,t,n){return n=n!=null?n.concat([e]):null,ND(4,4,mle.bind(null,t,e),n)}function GG(){}function kle(e,t){var n=so();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&VG(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function xle(e,t){var n=so();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&VG(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function wle(e,t,n){return Sh&21?(Do(n,t)||(n=Lce(),hr.lanes|=n,Ch|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,oa=!0),e.memoizedState=n)}function W5e(e,t){var n=xn;xn=n!==0&&4>n?n:4,e(!0);var r=qz.transition;qz.transition={};try{e(!1),t()}finally{xn=n,qz.transition=r}}function ble(){return so().memoizedState}function G5e(e,t,n){var r=Xc(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Mle(e))Sle(t,n);else if(n=ile(e,t,n,r),n!==null){var i=Gi();jo(n,e,r,i),Cle(n,t,r)}}function K5e(e,t,n){var r=Xc(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Mle(e))Sle(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Do(s,o)){var c=t.interleaved;c===null?(i.next=i,zG(t)):(i.next=c.next,c.next=i),t.interleaved=i;return}}catch{}finally{}n=ile(e,t,i,r),n!==null&&(i=Gi(),jo(n,e,r,i),Cle(n,t,r))}}function Mle(e){var t=e.alternate;return e===hr||t!==null&&t===hr}function Sle(e,t){np=TT=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Cle(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,SG(e,n)}}var DT={readContext:oo,useCallback:Ci,useContext:Ci,useEffect:Ci,useImperativeHandle:Ci,useInsertionEffect:Ci,useLayoutEffect:Ci,useMemo:Ci,useReducer:Ci,useRef:Ci,useState:Ci,useDebugValue:Ci,useDeferredValue:Ci,useTransition:Ci,useMutableSource:Ci,useSyncExternalStore:Ci,useId:Ci,unstable_isNewReconciler:!1},Z5e={readContext:oo,useCallback:function(e,t){return rs().memoizedState=[e,t===void 0?null:t],e},useContext:oo,useEffect:xY,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Fm(4194308,4,mle.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Fm(4194308,4,e,t)},useInsertionEffect:function(e,t){return Fm(4,2,e,t)},useMemo:function(e,t){var n=rs();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=rs();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=G5e.bind(null,hr,e),[r.memoizedState,e]},useRef:function(e){var t=rs();return e={current:e},t.memoizedState=e},useState:kY,useDebugValue:GG,useDeferredValue:function(e){return rs().memoizedState=e},useTransition:function(){var e=kY(!1),t=e[0];return e=W5e.bind(null,e[1]),rs().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=hr,i=rs();if(tr){if(n===void 0)throw Error(Je(407));n=n()}else{if(n=t(),si===null)throw Error(Je(349));Sh&30||lle(r,t,n)}i.memoizedState=n;var a={value:n,getSnapshot:t};return i.queue=a,xY(dle.bind(null,r,a,e),[e]),r.flags|=2048,ay(9,ule.bind(null,r,a,n,t),void 0,null),n},useId:function(){var e=rs(),t=si.identifierPrefix;if(tr){var n=Ws,r=$s;n=(r&~(1<<32-Ro(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=ry++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=$5e++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},X5e={readContext:oo,useCallback:kle,useContext:oo,useEffect:WG,useImperativeHandle:vle,useInsertionEffect:yle,useLayoutEffect:gle,useMemo:xle,useReducer:zz,useRef:ple,useState:function(){return zz(iy)},useDebugValue:GG,useDeferredValue:function(e){var t=so();return wle(t,Yr.memoizedState,e)},useTransition:function(){var e=zz(iy)[0],t=so().memoizedState;return[e,t]},useMutableSource:sle,useSyncExternalStore:cle,useId:ble,unstable_isNewReconciler:!1},Y5e={readContext:oo,useCallback:kle,useContext:oo,useEffect:WG,useImperativeHandle:vle,useInsertionEffect:yle,useLayoutEffect:gle,useMemo:xle,useReducer:Oz,useRef:ple,useState:function(){return Oz(iy)},useDebugValue:GG,useDeferredValue:function(e){var t=so();return Yr===null?t.memoizedState=e:wle(t,Yr.memoizedState,e)},useTransition:function(){var e=Oz(iy)[0],t=so().memoizedState;return[e,t]},useMutableSource:sle,useSyncExternalStore:cle,useId:ble,unstable_isNewReconciler:!1};function Lo(e,t){if(e&&e.defaultProps){t=fr({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function R$(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:fr({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var RD={isMounted:function(e){return(e=e._reactInternals)?Oh(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Gi(),i=Xc(e),a=Xs(r,i);a.payload=t,n!=null&&(a.callback=n),t=Kc(e,a,i),t!==null&&(jo(t,e,i,r),zm(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Gi(),i=Xc(e),a=Xs(r,i);a.tag=1,a.payload=t,n!=null&&(a.callback=n),t=Kc(e,a,i),t!==null&&(jo(t,e,i,r),zm(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Gi(),r=Xc(e),i=Xs(n,r);i.tag=2,t!=null&&(i.callback=t),t=Kc(e,i,r),t!==null&&(jo(t,e,r,n),zm(t,e,r))}};function wY(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!Yp(n,r)||!Yp(i,a):!0}function Lle(e,t,n){var r=!1,i=rl,a=t.contextType;return typeof a=="object"&&a!==null?a=oo(a):(i=la(t)?bh:Ri.current,r=t.contextTypes,a=(r=r!=null)?hf(e,i):rl),t=new t(n,a),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=RD,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=a),t}function bY(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&RD.enqueueReplaceState(t,t.state,null)}function j$(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},OG(e);var a=t.contextType;typeof a=="object"&&a!==null?i.context=oo(a):(a=la(t)?bh:Ri.current,i.context=hf(e,a)),i.state=e.memoizedState,a=t.getDerivedStateFromProps,typeof a=="function"&&(R$(e,t,a,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&RD.enqueueReplaceState(i,i.state,null),RT(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function gf(e,t){try{var n="",r=t;do n+=Cme(r),r=r.return;while(r);var i=n}catch(a){i=`
39
39
  Error generating stack: `+a.message+`
40
- `+a.stack}return{value:e,source:t,stack:i,digest:null}}function Fz(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function T$(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var J5e=typeof WeakMap=="function"?WeakMap:Map;function Ile(e,t,n){n=Xs(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){zT||(zT=!0,$$=r),T$(e,t)},n}function Ale(e,t,n){n=Xs(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){T$(e,t)}}var a=e.stateNode;return a!==null&&typeof a.componentDidCatch=="function"&&(n.callback=function(){T$(e,t),typeof r!="function"&&(Zc===null?Zc=new Set([this]):Zc.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function MY(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new J5e;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=hve.bind(null,e,t,n),t.then(e,e))}function SY(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function CY(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Xs(-1,1),t.tag=2,Kc(n,t,1))),n.lanes|=1),e)}var Q5e=ac.ReactCurrentOwner,oa=!1;function $i(e,t,n,r){t.child=e===null?rle(t,null,n,r):pf(t,e.child,n,r)}function LY(e,t,n,r,i){n=n.render;var a=t.ref;return W2(t,i),r=UG(e,t,n,r,a,i),n=$G(),e!==null&&!oa?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,ec(e,t,i)):(tr&&n&&NG(t),t.flags|=1,$i(e,t,r,i),t.child)}function IY(e,t,n,r,i){if(e===null){var a=n.type;return typeof a=="function"&&!tK(a)&&a.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=a,_le(e,t,a,r,i)):(e=Um(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!(e.lanes&i)){var o=a.memoizedProps;if(n=n.compare,n=n!==null?n:Yp,n(o,r)&&e.ref===t.ref)return ec(e,t,i)}return t.flags|=1,e=Yc(a,r),e.ref=t.ref,e.return=t,t.child=e}function _le(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Yp(a,r)&&e.ref===t.ref)if(oa=!1,t.pendingProps=r=a,(e.lanes&i)!==0)e.flags&131072&&(oa=!0);else return t.lanes=e.lanes,ec(e,t,i)}return D$(e,t,n,r,i)}function Ele(e,t,n){var r=t.pendingProps,i=r.children,a=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Bn(q2,Na),Na|=n;else{if(!(n&1073741824))return e=a!==null?a.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Bn(q2,Na),Na|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=a!==null?a.baseLanes:n,Bn(q2,Na),Na|=r}else a!==null?(r=a.baseLanes|n,t.memoizedState=null):r=n,Bn(q2,Na),Na|=r;return $i(e,t,i,n),t.child}function Ple(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function D$(e,t,n,r,i){var a=la(n)?bh:Ri.current;return a=hf(t,a),W2(t,i),n=UG(e,t,n,r,a,i),r=$G(),e!==null&&!oa?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,ec(e,t,i)):(tr&&r&&NG(t),t.flags|=1,$i(e,t,n,i),t.child)}function AY(e,t,n,r,i){if(la(n)){var a=!0;AT(t)}else a=!1;if(W2(t,i),t.stateNode===null)Bm(e,t),Lle(t,n,r),j$(t,n,r,i),r=!0;else if(e===null){var o=t.stateNode,s=t.memoizedProps;o.props=s;var c=o.context,l=n.contextType;typeof l=="object"&&l!==null?l=oo(l):(l=la(n)?bh:Ri.current,l=hf(t,l));var u=n.getDerivedStateFromProps,d=typeof u=="function"||typeof o.getSnapshotBeforeUpdate=="function";d||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(s!==r||c!==l)&&bY(t,o,r,l),jc=!1;var f=t.memoizedState;o.state=f,RT(t,r,o,i),c=t.memoizedState,s!==r||f!==c||ca.current||jc?(typeof u=="function"&&(R$(t,n,u,r),c=t.memoizedState),(s=jc||wY(t,n,s,r,f,c,l))?(d||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),o.props=r,o.state=c,o.context=l,r=s):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,ale(e,t),s=t.memoizedProps,l=t.type===t.elementType?s:Lo(t.type,s),o.props=l,d=t.pendingProps,f=o.context,c=n.contextType,typeof c=="object"&&c!==null?c=oo(c):(c=la(n)?bh:Ri.current,c=hf(t,c));var h=n.getDerivedStateFromProps;(u=typeof h=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(s!==d||f!==c)&&bY(t,o,r,c),jc=!1,f=t.memoizedState,o.state=f,RT(t,r,o,i);var y=t.memoizedState;s!==d||f!==y||ca.current||jc?(typeof h=="function"&&(R$(t,n,h,r),y=t.memoizedState),(l=jc||wY(t,n,l,r,f,y,c)||!1)?(u||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,y,c),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,y,c)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=y),o.props=r,o.state=y,o.context=c,r=l):(typeof o.componentDidUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return q$(e,t,n,r,a,i)}function q$(e,t,n,r,i,a){Ple(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return i&&fY(t,n,!1),ec(e,t,a);r=t.stateNode,Q5e.current=t;var s=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&o?(t.child=pf(t,e.child,null,a),t.child=pf(t,null,s,a)):$i(e,t,s,a),t.memoizedState=r.state,i&&fY(t,n,!0),t.child}function Nle(e){var t=e.stateNode;t.pendingContext?hY(e,t.pendingContext,t.pendingContext!==t.context):t.context&&hY(e,t.context,!1),FG(e,t.containerInfo)}function _Y(e,t,n,r,i){return ff(),jG(i),t.flags|=256,$i(e,t,n,r),t.child}var z$={dehydrated:null,treeContext:null,retryLane:0};function O$(e){return{baseLanes:e,cachePool:null,transitions:null}}function Rle(e,t,n){var r=t.pendingProps,i=ur.current,a=!1,o=(t.flags&128)!==0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(i&2)!==0),s?(a=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),Bn(ur,i&1),e===null)return P$(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(o=r.children,e=r.fallback,a?(r=t.mode,a=t.child,o={mode:"hidden",children:o},!(r&1)&&a!==null?(a.childLanes=0,a.pendingProps=o):a=DD(o,r,0,null),e=vh(e,r,n,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=O$(n),t.memoizedState=z$,e):KG(t,o));if(i=e.memoizedState,i!==null&&(s=i.dehydrated,s!==null))return eve(e,t,o,r,s,i,n);if(a){a=r.fallback,o=t.mode,i=e.child,s=i.sibling;var c={mode:"hidden",children:r.children};return!(o&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=c,t.deletions=null):(r=Yc(i,c),r.subtreeFlags=i.subtreeFlags&14680064),s!==null?a=Yc(s,a):(a=vh(a,o,n,null),a.flags|=2),a.return=t,r.return=t,r.sibling=a,t.child=r,r=a,a=t.child,o=e.child.memoizedState,o=o===null?O$(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},a.memoizedState=o,a.childLanes=e.childLanes&~n,t.memoizedState=z$,r}return a=e.child,e=a.sibling,r=Yc(a,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function KG(e,t){return t=DD({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function $g(e,t,n,r){return r!==null&&jG(r),pf(t,e.child,null,n),e=KG(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function eve(e,t,n,r,i,a,o){if(n)return t.flags&256?(t.flags&=-257,r=Fz(Error(Je(422))),$g(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(a=r.fallback,i=t.mode,r=DD({mode:"visible",children:r.children},i,0,null),a=vh(a,i,o,null),a.flags|=2,r.return=t,a.return=t,r.sibling=a,t.child=r,t.mode&1&&pf(t,e.child,null,o),t.child.memoizedState=O$(o),t.memoizedState=z$,a);if(!(t.mode&1))return $g(e,t,o,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var s=r.dgst;return r=s,a=Error(Je(419)),r=Fz(a,r,void 0),$g(e,t,o,r)}if(s=(o&e.childLanes)!==0,oa||s){if(r=si,r!==null){switch(o&-o){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|o)?0:i,i!==0&&i!==a.retryLane&&(a.retryLane=i,Qs(e,i),jo(r,e,i,-1))}return eK(),r=Fz(Error(Je(421))),$g(e,t,o,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=fve.bind(null,e),i._reactRetry=t,null):(e=a.treeContext,Da=Gc(i.nextSibling),za=t,tr=!0,_o=null,e!==null&&(Qa[eo++]=$s,Qa[eo++]=Ws,Qa[eo++]=Mh,$s=e.id,Ws=e.overflow,Mh=t),t=KG(t,r.children),t.flags|=4096,t)}function EY(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),N$(e.return,t,n)}function Bz(e,t,n,r,i){var a=e.memoizedState;a===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=i)}function jle(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;if($i(e,t,r.children,n),r=ur.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&EY(e,n,t);else if(e.tag===19)EY(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Bn(ur,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&jT(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Bz(t,!1,i,n,a);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&jT(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Bz(t,!0,n,null,a);break;case"together":Bz(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Bm(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function ec(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Ch|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(Je(153));if(t.child!==null){for(e=t.child,n=Yc(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Yc(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function tve(e,t,n){switch(t.tag){case 3:Nle(t),ff();break;case 5:ole(t);break;case 1:la(t.type)&&AT(t);break;case 4:FG(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;Bn(PT,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Bn(ur,ur.current&1),t.flags|=128,null):n&t.child.childLanes?Rle(e,t,n):(Bn(ur,ur.current&1),e=ec(e,t,n),e!==null?e.sibling:null);Bn(ur,ur.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return jle(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Bn(ur,ur.current),r)break;return null;case 22:case 23:return t.lanes=0,Ele(e,t,n)}return ec(e,t,n)}var Tle,F$,Dle,qle;Tle=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};F$=function(){};Dle=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,ph(ps.current);var a=null;switch(n){case"input":i=c$(e,i),r=c$(e,r),a=[];break;case"select":i=fr({},i,{value:void 0}),r=fr({},r,{value:void 0}),a=[];break;case"textarea":i=d$(e,i),r=d$(e,r),a=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=LT)}f$(n,r);var o;n=null;for(l in i)if(!r.hasOwnProperty(l)&&i.hasOwnProperty(l)&&i[l]!=null)if(l==="style"){var s=i[l];for(o in s)s.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else l!=="dangerouslySetInnerHTML"&&l!=="children"&&l!=="suppressContentEditableWarning"&&l!=="suppressHydrationWarning"&&l!=="autoFocus"&&(Up.hasOwnProperty(l)?a||(a=[]):(a=a||[]).push(l,null));for(l in r){var c=r[l];if(s=i!=null?i[l]:void 0,r.hasOwnProperty(l)&&c!==s&&(c!=null||s!=null))if(l==="style")if(s){for(o in s)!s.hasOwnProperty(o)||c&&c.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in c)c.hasOwnProperty(o)&&s[o]!==c[o]&&(n||(n={}),n[o]=c[o])}else n||(a||(a=[]),a.push(l,n)),n=c;else l==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,s=s?s.__html:void 0,c!=null&&s!==c&&(a=a||[]).push(l,c)):l==="children"?typeof c!="string"&&typeof c!="number"||(a=a||[]).push(l,""+c):l!=="suppressContentEditableWarning"&&l!=="suppressHydrationWarning"&&(Up.hasOwnProperty(l)?(c!=null&&l==="onScroll"&&Gn("scroll",e),a||s===c||(a=[])):(a=a||[]).push(l,c))}n&&(a=a||[]).push("style",n);var l=a;(t.updateQueue=l)&&(t.flags|=4)}};qle=function(e,t,n,r){n!==r&&(t.flags|=4)};function M0(e,t){if(!tr)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Li(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function nve(e,t,n){var r=t.pendingProps;switch(RG(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Li(t),null;case 1:return la(t.type)&&IT(),Li(t),null;case 3:return r=t.stateNode,yf(),Zn(ca),Zn(Ri),HG(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Vg(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,_o!==null&&(K$(_o),_o=null))),F$(e,t),Li(t),null;case 5:BG(t);var i=ph(ny.current);if(n=t.type,e!==null&&t.stateNode!=null)Dle(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(Je(166));return Li(t),null}if(e=ph(ps.current),Vg(t)){r=t.stateNode,n=t.type;var a=t.memoizedProps;switch(r[ss]=t,r[ey]=a,e=(t.mode&1)!==0,n){case"dialog":Gn("cancel",r),Gn("close",r);break;case"iframe":case"object":case"embed":Gn("load",r);break;case"video":case"audio":for(i=0;i<F0.length;i++)Gn(F0[i],r);break;case"source":Gn("error",r);break;case"img":case"image":case"link":Gn("error",r),Gn("load",r);break;case"details":Gn("toggle",r);break;case"input":OX(r,a),Gn("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!a.multiple},Gn("invalid",r);break;case"textarea":BX(r,a),Gn("invalid",r)}f$(n,a),i=null;for(var o in a)if(a.hasOwnProperty(o)){var s=a[o];o==="children"?typeof s=="string"?r.textContent!==s&&(a.suppressHydrationWarning!==!0&&Hg(r.textContent,s,e),i=["children",s]):typeof s=="number"&&r.textContent!==""+s&&(a.suppressHydrationWarning!==!0&&Hg(r.textContent,s,e),i=["children",""+s]):Up.hasOwnProperty(o)&&s!=null&&o==="onScroll"&&Gn("scroll",r)}switch(n){case"input":jg(r),FX(r,a,!0);break;case"textarea":jg(r),HX(r);break;case"select":case"option":break;default:typeof a.onClick=="function"&&(r.onclick=LT)}r=i,t.updateQueue=r,r!==null&&(t.flags|=4)}else{o=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=dce(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=o.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[ss]=t,e[ey]=r,Tle(e,t,!1,!1),t.stateNode=e;e:{switch(o=p$(n,r),n){case"dialog":Gn("cancel",e),Gn("close",e),i=r;break;case"iframe":case"object":case"embed":Gn("load",e),i=r;break;case"video":case"audio":for(i=0;i<F0.length;i++)Gn(F0[i],e);i=r;break;case"source":Gn("error",e),i=r;break;case"img":case"image":case"link":Gn("error",e),Gn("load",e),i=r;break;case"details":Gn("toggle",e),i=r;break;case"input":OX(e,r),i=c$(e,r),Gn("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=fr({},r,{value:void 0}),Gn("invalid",e);break;case"textarea":BX(e,r),i=d$(e,r),Gn("invalid",e);break;default:i=r}f$(n,i),s=i;for(a in s)if(s.hasOwnProperty(a)){var c=s[a];a==="style"?pce(e,c):a==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,c!=null&&hce(e,c)):a==="children"?typeof c=="string"?(n!=="textarea"||c!=="")&&$p(e,c):typeof c=="number"&&$p(e,""+c):a!=="suppressContentEditableWarning"&&a!=="suppressHydrationWarning"&&a!=="autoFocus"&&(Up.hasOwnProperty(a)?c!=null&&a==="onScroll"&&Gn("scroll",e):c!=null&&vG(e,a,c,o))}switch(n){case"input":jg(e),FX(e,r,!1);break;case"textarea":jg(e),HX(e);break;case"option":r.value!=null&&e.setAttribute("value",""+nl(r.value));break;case"select":e.multiple=!!r.multiple,a=r.value,a!=null?H2(e,!!r.multiple,a,!1):r.defaultValue!=null&&H2(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=LT)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Li(t),null;case 6:if(e&&t.stateNode!=null)qle(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(Je(166));if(n=ph(ny.current),ph(ps.current),Vg(t)){if(r=t.stateNode,n=t.memoizedProps,r[ss]=t,(a=r.nodeValue!==n)&&(e=za,e!==null))switch(e.tag){case 3:Hg(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Hg(r.nodeValue,n,(e.mode&1)!==0)}a&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[ss]=t,t.stateNode=r}return Li(t),null;case 13:if(Zn(ur),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(tr&&Da!==null&&t.mode&1&&!(t.flags&128))tle(),ff(),t.flags|=98560,a=!1;else if(a=Vg(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(Je(318));if(a=t.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(Je(317));a[ss]=t}else ff(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Li(t),a=!1}else _o!==null&&(K$(_o),_o=null),a=!0;if(!a)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||ur.current&1?Jr===0&&(Jr=3):eK())),t.updateQueue!==null&&(t.flags|=4),Li(t),null);case 4:return yf(),F$(e,t),e===null&&Jp(t.stateNode.containerInfo),Li(t),null;case 10:return qG(t.type._context),Li(t),null;case 17:return la(t.type)&&IT(),Li(t),null;case 19:if(Zn(ur),a=t.memoizedState,a===null)return Li(t),null;if(r=(t.flags&128)!==0,o=a.rendering,o===null)if(r)M0(a,!1);else{if(Jr!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=jT(e),o!==null){for(t.flags|=128,M0(a,!1),r=o.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)a=n,e=r,a.flags&=14680066,o=a.alternate,o===null?(a.childLanes=0,a.lanes=e,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=o.childLanes,a.lanes=o.lanes,a.child=o.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=o.memoizedProps,a.memoizedState=o.memoizedState,a.updateQueue=o.updateQueue,a.type=o.type,e=o.dependencies,a.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Bn(ur,ur.current&1|2),t.child}e=e.sibling}a.tail!==null&&_r()>mf&&(t.flags|=128,r=!0,M0(a,!1),t.lanes=4194304)}else{if(!r)if(e=jT(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),M0(a,!0),a.tail===null&&a.tailMode==="hidden"&&!o.alternate&&!tr)return Li(t),null}else 2*_r()-a.renderingStartTime>mf&&n!==1073741824&&(t.flags|=128,r=!0,M0(a,!1),t.lanes=4194304);a.isBackwards?(o.sibling=t.child,t.child=o):(n=a.last,n!==null?n.sibling=o:t.child=o,a.last=o)}return a.tail!==null?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=_r(),t.sibling=null,n=ur.current,Bn(ur,r?n&1|2:n&1),t):(Li(t),null);case 22:case 23:return QG(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Na&1073741824&&(Li(t),t.subtreeFlags&6&&(t.flags|=8192)):Li(t),null;case 24:return null;case 25:return null}throw Error(Je(156,t.tag))}function rve(e,t){switch(RG(t),t.tag){case 1:return la(t.type)&&IT(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return yf(),Zn(ca),Zn(Ri),HG(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return BG(t),null;case 13:if(Zn(ur),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Je(340));ff()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Zn(ur),null;case 4:return yf(),null;case 10:return qG(t.type._context),null;case 22:case 23:return QG(),null;case 24:return null;default:return null}}var Wg=!1,Pi=!1,ive=typeof WeakSet=="function"?WeakSet:Set,yt=null;function D2(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){wr(e,t,r)}else n.current=null}function B$(e,t,n){try{n()}catch(r){wr(e,t,r)}}var PY=!1;function ave(e,t){if(S$=MT,e=Hce(),PG(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,a=r.focusNode;r=r.focusOffset;try{n.nodeType,a.nodeType}catch{n=null;break e}var o=0,s=-1,c=-1,l=0,u=0,d=e,f=null;t:for(;;){for(var h;d!==n||i!==0&&d.nodeType!==3||(s=o+i),d!==a||r!==0&&d.nodeType!==3||(c=o+r),d.nodeType===3&&(o+=d.nodeValue.length),(h=d.firstChild)!==null;)f=d,d=h;for(;;){if(d===e)break t;if(f===n&&++l===i&&(s=o),f===a&&++u===r&&(c=o),(h=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=h}n=s===-1||c===-1?null:{start:s,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(C$={focusedElem:e,selectionRange:n},MT=!1,yt=t;yt!==null;)if(t=yt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,yt=e;else for(;yt!==null;){t=yt;try{var y=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var v=y.memoizedProps,k=y.memoizedState,g=t.stateNode,S=g.getSnapshotBeforeUpdate(t.elementType===t.type?v:Lo(t.type,v),k);g.__reactInternalSnapshotBeforeUpdate=S}break;case 3:var w=t.stateNode.containerInfo;w.nodeType===1?w.textContent="":w.nodeType===9&&w.documentElement&&w.removeChild(w.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Je(163))}}catch(C){wr(t,t.return,C)}if(e=t.sibling,e!==null){e.return=t.return,yt=e;break}yt=t.return}return y=PY,PY=!1,y}function rp(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var a=i.destroy;i.destroy=void 0,a!==void 0&&B$(t,n,a)}i=i.next}while(i!==r)}}function jD(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function H$(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function zle(e){var t=e.alternate;t!==null&&(e.alternate=null,zle(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[ss],delete t[ey],delete t[A$],delete t[B5e],delete t[H5e])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Ole(e){return e.tag===5||e.tag===3||e.tag===4}function NY(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Ole(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function V$(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=LT));else if(r!==4&&(e=e.child,e!==null))for(V$(e,t,n),e=e.sibling;e!==null;)V$(e,t,n),e=e.sibling}function U$(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(U$(e,t,n),e=e.sibling;e!==null;)U$(e,t,n),e=e.sibling}var fi=null,Io=!1;function Mc(e,t,n){for(n=n.child;n!==null;)Fle(e,t,n),n=n.sibling}function Fle(e,t,n){if(fs&&typeof fs.onCommitFiberUnmount=="function")try{fs.onCommitFiberUnmount(LD,n)}catch{}switch(n.tag){case 5:Pi||D2(n,t);case 6:var r=fi,i=Io;fi=null,Mc(e,t,n),fi=r,Io=i,fi!==null&&(Io?(e=fi,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):fi.removeChild(n.stateNode));break;case 18:fi!==null&&(Io?(e=fi,n=n.stateNode,e.nodeType===8?jz(e.parentNode,n):e.nodeType===1&&jz(e,n),Zp(e)):jz(fi,n.stateNode));break;case 4:r=fi,i=Io,fi=n.stateNode.containerInfo,Io=!0,Mc(e,t,n),fi=r,Io=i;break;case 0:case 11:case 14:case 15:if(!Pi&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var a=i,o=a.destroy;a=a.tag,o!==void 0&&(a&2||a&4)&&B$(n,t,o),i=i.next}while(i!==r)}Mc(e,t,n);break;case 1:if(!Pi&&(D2(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){wr(n,t,s)}Mc(e,t,n);break;case 21:Mc(e,t,n);break;case 22:n.mode&1?(Pi=(r=Pi)||n.memoizedState!==null,Mc(e,t,n),Pi=r):Mc(e,t,n);break;default:Mc(e,t,n)}}function RY(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new ive),t.forEach(function(r){var i=pve.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function bo(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var a=e,o=t,s=o;e:for(;s!==null;){switch(s.tag){case 5:fi=s.stateNode,Io=!1;break e;case 3:fi=s.stateNode.containerInfo,Io=!0;break e;case 4:fi=s.stateNode.containerInfo,Io=!0;break e}s=s.return}if(fi===null)throw Error(Je(160));Fle(a,o,i),fi=null,Io=!1;var c=i.alternate;c!==null&&(c.return=null),i.return=null}catch(l){wr(i,t,l)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Ble(t,e),t=t.sibling}function Ble(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(bo(t,e),Xo(e),r&4){try{rp(3,e,e.return),jD(3,e)}catch(v){wr(e,e.return,v)}try{rp(5,e,e.return)}catch(v){wr(e,e.return,v)}}break;case 1:bo(t,e),Xo(e),r&512&&n!==null&&D2(n,n.return);break;case 5:if(bo(t,e),Xo(e),r&512&&n!==null&&D2(n,n.return),e.flags&32){var i=e.stateNode;try{$p(i,"")}catch(v){wr(e,e.return,v)}}if(r&4&&(i=e.stateNode,i!=null)){var a=e.memoizedProps,o=n!==null?n.memoizedProps:a,s=e.type,c=e.updateQueue;if(e.updateQueue=null,c!==null)try{s==="input"&&a.type==="radio"&&a.name!=null&&lce(i,a),p$(s,o);var l=p$(s,a);for(o=0;o<c.length;o+=2){var u=c[o],d=c[o+1];u==="style"?pce(i,d):u==="dangerouslySetInnerHTML"?hce(i,d):u==="children"?$p(i,d):vG(i,u,d,l)}switch(s){case"input":l$(i,a);break;case"textarea":uce(i,a);break;case"select":var f=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!a.multiple;var h=a.value;h!=null?H2(i,!!a.multiple,h,!1):f!==!!a.multiple&&(a.defaultValue!=null?H2(i,!!a.multiple,a.defaultValue,!0):H2(i,!!a.multiple,a.multiple?[]:"",!1))}i[ey]=a}catch(v){wr(e,e.return,v)}}break;case 6:if(bo(t,e),Xo(e),r&4){if(e.stateNode===null)throw Error(Je(162));i=e.stateNode,a=e.memoizedProps;try{i.nodeValue=a}catch(v){wr(e,e.return,v)}}break;case 3:if(bo(t,e),Xo(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Zp(t.containerInfo)}catch(v){wr(e,e.return,v)}break;case 4:bo(t,e),Xo(e);break;case 13:bo(t,e),Xo(e),i=e.child,i.flags&8192&&(a=i.memoizedState!==null,i.stateNode.isHidden=a,!a||i.alternate!==null&&i.alternate.memoizedState!==null||(YG=_r())),r&4&&RY(e);break;case 22:if(u=n!==null&&n.memoizedState!==null,e.mode&1?(Pi=(l=Pi)||u,bo(t,e),Pi=l):bo(t,e),Xo(e),r&8192){if(l=e.memoizedState!==null,(e.stateNode.isHidden=l)&&!u&&e.mode&1)for(yt=e,u=e.child;u!==null;){for(d=yt=u;yt!==null;){switch(f=yt,h=f.child,f.tag){case 0:case 11:case 14:case 15:rp(4,f,f.return);break;case 1:D2(f,f.return);var y=f.stateNode;if(typeof y.componentWillUnmount=="function"){r=f,n=f.return;try{t=r,y.props=t.memoizedProps,y.state=t.memoizedState,y.componentWillUnmount()}catch(v){wr(r,n,v)}}break;case 5:D2(f,f.return);break;case 22:if(f.memoizedState!==null){TY(d);continue}}h!==null?(h.return=f,yt=h):TY(d)}u=u.sibling}e:for(u=null,d=e;;){if(d.tag===5){if(u===null){u=d;try{i=d.stateNode,l?(a=i.style,typeof a.setProperty=="function"?a.setProperty("display","none","important"):a.display="none"):(s=d.stateNode,c=d.memoizedProps.style,o=c!=null&&c.hasOwnProperty("display")?c.display:null,s.style.display=fce("display",o))}catch(v){wr(e,e.return,v)}}}else if(d.tag===6){if(u===null)try{d.stateNode.nodeValue=l?"":d.memoizedProps}catch(v){wr(e,e.return,v)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===e)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;d.sibling===null;){if(d.return===null||d.return===e)break e;u===d&&(u=null),d=d.return}u===d&&(u=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:bo(t,e),Xo(e),r&4&&RY(e);break;case 21:break;default:bo(t,e),Xo(e)}}function Xo(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Ole(n)){var r=n;break e}n=n.return}throw Error(Je(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&($p(i,""),r.flags&=-33);var a=NY(e);U$(e,a,i);break;case 3:case 4:var o=r.stateNode.containerInfo,s=NY(e);V$(e,s,o);break;default:throw Error(Je(161))}}catch(c){wr(e,e.return,c)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function ove(e,t,n){yt=e,Hle(e)}function Hle(e,t,n){for(var r=(e.mode&1)!==0;yt!==null;){var i=yt,a=i.child;if(i.tag===22&&r){var o=i.memoizedState!==null||Wg;if(!o){var s=i.alternate,c=s!==null&&s.memoizedState!==null||Pi;s=Wg;var l=Pi;if(Wg=o,(Pi=c)&&!l)for(yt=i;yt!==null;)o=yt,c=o.child,o.tag===22&&o.memoizedState!==null?DY(i):c!==null?(c.return=o,yt=c):DY(i);for(;a!==null;)yt=a,Hle(a),a=a.sibling;yt=i,Wg=s,Pi=l}jY(e)}else i.subtreeFlags&8772&&a!==null?(a.return=i,yt=a):jY(e)}}function jY(e){for(;yt!==null;){var t=yt;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Pi||jD(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Pi)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:Lo(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var a=t.updateQueue;a!==null&&vY(t,a,r);break;case 3:var o=t.updateQueue;if(o!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}vY(t,o,n)}break;case 5:var s=t.stateNode;if(n===null&&t.flags&4){n=s;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&n.focus();break;case"img":c.src&&(n.src=c.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var l=t.alternate;if(l!==null){var u=l.memoizedState;if(u!==null){var d=u.dehydrated;d!==null&&Zp(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(Je(163))}Pi||t.flags&512&&H$(t)}catch(f){wr(t,t.return,f)}}if(t===e){yt=null;break}if(n=t.sibling,n!==null){n.return=t.return,yt=n;break}yt=t.return}}function TY(e){for(;yt!==null;){var t=yt;if(t===e){yt=null;break}var n=t.sibling;if(n!==null){n.return=t.return,yt=n;break}yt=t.return}}function DY(e){for(;yt!==null;){var t=yt;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{jD(4,t)}catch(c){wr(t,n,c)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(c){wr(t,i,c)}}var a=t.return;try{H$(t)}catch(c){wr(t,a,c)}break;case 5:var o=t.return;try{H$(t)}catch(c){wr(t,o,c)}}}catch(c){wr(t,t.return,c)}if(t===e){yt=null;break}var s=t.sibling;if(s!==null){s.return=t.return,yt=s;break}yt=t.return}}var sve=Math.ceil,qT=ac.ReactCurrentDispatcher,ZG=ac.ReactCurrentOwner,io=ac.ReactCurrentBatchConfig,hn=0,si=null,Vr=null,pi=0,Na=0,q2=hl(0),Jr=0,oy=null,Ch=0,TD=0,XG=0,ip=null,aa=null,YG=0,mf=1/0,Hs=null,zT=!1,$$=null,Zc=null,Gg=!1,Hc=null,OT=0,ap=0,W$=null,Hm=-1,Vm=0;function Gi(){return hn&6?_r():Hm!==-1?Hm:Hm=_r()}function Xc(e){return e.mode&1?hn&2&&pi!==0?pi&-pi:U5e.transition!==null?(Vm===0&&(Vm=Lce()),Vm):(e=xn,e!==0||(e=window.event,e=e===void 0?16:Rce(e.type)),e):1}function jo(e,t,n,r){if(50<ap)throw ap=0,W$=null,Error(Je(185));Iy(e,n,r),(!(hn&2)||e!==si)&&(e===si&&(!(hn&2)&&(TD|=n),Jr===4&&qc(e,pi)),ua(e,r),n===1&&hn===0&&!(t.mode&1)&&(mf=_r()+500,PD&&fl()))}function ua(e,t){var n=e.callbackNode;Ume(e,t);var r=bT(e,e===si?pi:0);if(r===0)n!==null&&$X(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&$X(n),t===1)e.tag===0?V5e(qY.bind(null,e)):Jce(qY.bind(null,e)),O5e(function(){!(hn&6)&&fl()}),n=null;else{switch(Ice(r)){case 1:n=MG;break;case 4:n=Sce;break;case 16:n=wT;break;case 536870912:n=Cce;break;default:n=wT}n=Xle(n,Vle.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Vle(e,t){if(Hm=-1,Vm=0,hn&6)throw Error(Je(327));var n=e.callbackNode;if(G2()&&e.callbackNode!==n)return null;var r=bT(e,e===si?pi:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=FT(e,r);else{t=r;var i=hn;hn|=2;var a=$le();(si!==e||pi!==t)&&(Hs=null,mf=_r()+500,mh(e,t));do try{uve();break}catch(s){Ule(e,s)}while(!0);DG(),qT.current=a,hn=i,Vr!==null?t=0:(si=null,pi=0,t=Jr)}if(t!==0){if(t===2&&(i=k$(e),i!==0&&(r=i,t=G$(e,i))),t===1)throw n=oy,mh(e,0),qc(e,r),ua(e,_r()),n;if(t===6)qc(e,r);else{if(i=e.current.alternate,!(r&30)&&!cve(i)&&(t=FT(e,r),t===2&&(a=k$(e),a!==0&&(r=a,t=G$(e,a))),t===1))throw n=oy,mh(e,0),qc(e,r),ua(e,_r()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(Je(345));case 2:Tl(e,aa,Hs);break;case 3:if(qc(e,r),(r&130023424)===r&&(t=YG+500-_r(),10<t)){if(bT(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){Gi(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=I$(Tl.bind(null,e,aa,Hs),t);break}Tl(e,aa,Hs);break;case 4:if(qc(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var o=31-Ro(r);a=1<<o,o=t[o],o>i&&(i=o),r&=~a}if(r=i,r=_r()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*sve(r/1960))-r,10<r){e.timeoutHandle=I$(Tl.bind(null,e,aa,Hs),r);break}Tl(e,aa,Hs);break;case 5:Tl(e,aa,Hs);break;default:throw Error(Je(329))}}}return ua(e,_r()),e.callbackNode===n?Vle.bind(null,e):null}function G$(e,t){var n=ip;return e.current.memoizedState.isDehydrated&&(mh(e,t).flags|=256),e=FT(e,t),e!==2&&(t=aa,aa=n,t!==null&&K$(t)),e}function K$(e){aa===null?aa=e:aa.push.apply(aa,e)}function cve(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!Do(a(),i))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function qc(e,t){for(t&=~XG,t&=~TD,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Ro(t),r=1<<n;e[n]=-1,t&=~r}}function qY(e){if(hn&6)throw Error(Je(327));G2();var t=bT(e,0);if(!(t&1))return ua(e,_r()),null;var n=FT(e,t);if(e.tag!==0&&n===2){var r=k$(e);r!==0&&(t=r,n=G$(e,r))}if(n===1)throw n=oy,mh(e,0),qc(e,t),ua(e,_r()),n;if(n===6)throw Error(Je(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Tl(e,aa,Hs),ua(e,_r()),null}function JG(e,t){var n=hn;hn|=1;try{return e(t)}finally{hn=n,hn===0&&(mf=_r()+500,PD&&fl())}}function Lh(e){Hc!==null&&Hc.tag===0&&!(hn&6)&&G2();var t=hn;hn|=1;var n=io.transition,r=xn;try{if(io.transition=null,xn=1,e)return e()}finally{xn=r,io.transition=n,hn=t,!(hn&6)&&fl()}}function QG(){Na=q2.current,Zn(q2)}function mh(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,z5e(n)),Vr!==null)for(n=Vr.return;n!==null;){var r=n;switch(RG(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&IT();break;case 3:yf(),Zn(ca),Zn(Ri),HG();break;case 5:BG(r);break;case 4:yf();break;case 13:Zn(ur);break;case 19:Zn(ur);break;case 10:qG(r.type._context);break;case 22:case 23:QG()}n=n.return}if(si=e,Vr=e=Yc(e.current,null),pi=Na=t,Jr=0,oy=null,XG=TD=Ch=0,aa=ip=null,fh!==null){for(t=0;t<fh.length;t++)if(n=fh[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,a=n.pending;if(a!==null){var o=a.next;a.next=i,r.next=o}n.pending=r}fh=null}return e}function Ule(e,t){do{var n=Vr;try{if(DG(),Om.current=DT,TT){for(var r=hr.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}TT=!1}if(Sh=0,ii=Yr=hr=null,np=!1,ry=0,ZG.current=null,n===null||n.return===null){Jr=1,oy=t,Vr=null;break}e:{var a=e,o=n.return,s=n,c=t;if(t=pi,s.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){var l=c,u=s,d=u.tag;if(!(u.mode&1)&&(d===0||d===11||d===15)){var f=u.alternate;f?(u.updateQueue=f.updateQueue,u.memoizedState=f.memoizedState,u.lanes=f.lanes):(u.updateQueue=null,u.memoizedState=null)}var h=SY(o);if(h!==null){h.flags&=-257,CY(h,o,s,a,t),h.mode&1&&MY(a,l,t),t=h,c=l;var y=t.updateQueue;if(y===null){var v=new Set;v.add(c),t.updateQueue=v}else y.add(c);break e}else{if(!(t&1)){MY(a,l,t),eK();break e}c=Error(Je(426))}}else if(tr&&s.mode&1){var k=SY(o);if(k!==null){!(k.flags&65536)&&(k.flags|=256),CY(k,o,s,a,t),jG(gf(c,s));break e}}a=c=gf(c,s),Jr!==4&&(Jr=2),ip===null?ip=[a]:ip.push(a),a=o;do{switch(a.tag){case 3:a.flags|=65536,t&=-t,a.lanes|=t;var g=Ile(a,c,t);mY(a,g);break e;case 1:s=c;var S=a.type,w=a.stateNode;if(!(a.flags&128)&&(typeof S.getDerivedStateFromError=="function"||w!==null&&typeof w.componentDidCatch=="function"&&(Zc===null||!Zc.has(w)))){a.flags|=65536,t&=-t,a.lanes|=t;var C=Ale(a,s,t);mY(a,C);break e}}a=a.return}while(a!==null)}Gle(n)}catch(_){t=_,Vr===n&&n!==null&&(Vr=n=n.return);continue}break}while(!0)}function $le(){var e=qT.current;return qT.current=DT,e===null?DT:e}function eK(){(Jr===0||Jr===3||Jr===2)&&(Jr=4),si===null||!(Ch&268435455)&&!(TD&268435455)||qc(si,pi)}function FT(e,t){var n=hn;hn|=2;var r=$le();(si!==e||pi!==t)&&(Hs=null,mh(e,t));do try{lve();break}catch(i){Ule(e,i)}while(!0);if(DG(),hn=n,qT.current=r,Vr!==null)throw Error(Je(261));return si=null,pi=0,Jr}function lve(){for(;Vr!==null;)Wle(Vr)}function uve(){for(;Vr!==null&&!Tme();)Wle(Vr)}function Wle(e){var t=Zle(e.alternate,e,Na);e.memoizedProps=e.pendingProps,t===null?Gle(e):Vr=t,ZG.current=null}function Gle(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=rve(n,t),n!==null){n.flags&=32767,Vr=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Jr=6,Vr=null;return}}else if(n=nve(n,t,Na),n!==null){Vr=n;return}if(t=t.sibling,t!==null){Vr=t;return}Vr=t=e}while(t!==null);Jr===0&&(Jr=5)}function Tl(e,t,n){var r=xn,i=io.transition;try{io.transition=null,xn=1,dve(e,t,n,r)}finally{io.transition=i,xn=r}return null}function dve(e,t,n,r){do G2();while(Hc!==null);if(hn&6)throw Error(Je(327));n=e.finishedWork;var i=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(Je(177));e.callbackNode=null,e.callbackPriority=0;var a=n.lanes|n.childLanes;if($me(e,a),e===si&&(Vr=si=null,pi=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Gg||(Gg=!0,Xle(wT,function(){return G2(),null})),a=(n.flags&15990)!==0,n.subtreeFlags&15990||a){a=io.transition,io.transition=null;var o=xn;xn=1;var s=hn;hn|=4,ZG.current=null,ave(e,n),Ble(n,e),P5e(C$),MT=!!S$,C$=S$=null,e.current=n,ove(n),Dme(),hn=s,xn=o,io.transition=a}else e.current=n;if(Gg&&(Gg=!1,Hc=e,OT=i),a=e.pendingLanes,a===0&&(Zc=null),Ome(n.stateNode),ua(e,_r()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(zT)throw zT=!1,e=$$,$$=null,e;return OT&1&&e.tag!==0&&G2(),a=e.pendingLanes,a&1?e===W$?ap++:(ap=0,W$=e):ap=0,fl(),null}function G2(){if(Hc!==null){var e=Ice(OT),t=io.transition,n=xn;try{if(io.transition=null,xn=16>e?16:e,Hc===null)var r=!1;else{if(e=Hc,Hc=null,OT=0,hn&6)throw Error(Je(331));var i=hn;for(hn|=4,yt=e.current;yt!==null;){var a=yt,o=a.child;if(yt.flags&16){var s=a.deletions;if(s!==null){for(var c=0;c<s.length;c++){var l=s[c];for(yt=l;yt!==null;){var u=yt;switch(u.tag){case 0:case 11:case 15:rp(8,u,a)}var d=u.child;if(d!==null)d.return=u,yt=d;else for(;yt!==null;){u=yt;var f=u.sibling,h=u.return;if(zle(u),u===l){yt=null;break}if(f!==null){f.return=h,yt=f;break}yt=h}}}var y=a.alternate;if(y!==null){var v=y.child;if(v!==null){y.child=null;do{var k=v.sibling;v.sibling=null,v=k}while(v!==null)}}yt=a}}if(a.subtreeFlags&2064&&o!==null)o.return=a,yt=o;else e:for(;yt!==null;){if(a=yt,a.flags&2048)switch(a.tag){case 0:case 11:case 15:rp(9,a,a.return)}var g=a.sibling;if(g!==null){g.return=a.return,yt=g;break e}yt=a.return}}var S=e.current;for(yt=S;yt!==null;){o=yt;var w=o.child;if(o.subtreeFlags&2064&&w!==null)w.return=o,yt=w;else e:for(o=S;yt!==null;){if(s=yt,s.flags&2048)try{switch(s.tag){case 0:case 11:case 15:jD(9,s)}}catch(_){wr(s,s.return,_)}if(s===o){yt=null;break e}var C=s.sibling;if(C!==null){C.return=s.return,yt=C;break e}yt=s.return}}if(hn=i,fl(),fs&&typeof fs.onPostCommitFiberRoot=="function")try{fs.onPostCommitFiberRoot(LD,e)}catch{}r=!0}return r}finally{xn=n,io.transition=t}}return!1}function zY(e,t,n){t=gf(n,t),t=Ile(e,t,1),e=Kc(e,t,1),t=Gi(),e!==null&&(Iy(e,1,t),ua(e,t))}function wr(e,t,n){if(e.tag===3)zY(e,e,n);else for(;t!==null;){if(t.tag===3){zY(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Zc===null||!Zc.has(r))){e=gf(n,e),e=Ale(t,e,1),t=Kc(t,e,1),e=Gi(),t!==null&&(Iy(t,1,e),ua(t,e));break}}t=t.return}}function hve(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Gi(),e.pingedLanes|=e.suspendedLanes&n,si===e&&(pi&n)===n&&(Jr===4||Jr===3&&(pi&130023424)===pi&&500>_r()-YG?mh(e,0):XG|=n),ua(e,t)}function Kle(e,t){t===0&&(e.mode&1?(t=qg,qg<<=1,!(qg&130023424)&&(qg=4194304)):t=1);var n=Gi();e=Qs(e,t),e!==null&&(Iy(e,t,n),ua(e,n))}function fve(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Kle(e,n)}function pve(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(Je(314))}r!==null&&r.delete(t),Kle(e,n)}var Zle;Zle=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||ca.current)oa=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return oa=!1,tve(e,t,n);oa=!!(e.flags&131072)}else oa=!1,tr&&t.flags&1048576&&Qce(t,ET,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Bm(e,t),e=t.pendingProps;var i=hf(t,Ri.current);W2(t,n),i=UG(null,t,r,e,i,n);var a=$G();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,la(r)?(a=!0,AT(t)):a=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,OG(t),i.updater=RD,t.stateNode=i,i._reactInternals=t,j$(t,r,e,n),t=q$(null,t,r,!0,a,n)):(t.tag=0,tr&&a&&NG(t),$i(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Bm(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=gve(r),e=Lo(r,e),i){case 0:t=D$(null,t,r,e,n);break e;case 1:t=AY(null,t,r,e,n);break e;case 11:t=LY(null,t,r,e,n);break e;case 14:t=IY(null,t,r,Lo(r.type,e),n);break e}throw Error(Je(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Lo(r,i),D$(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Lo(r,i),AY(e,t,r,i,n);case 3:e:{if(Nle(t),e===null)throw Error(Je(387));r=t.pendingProps,a=t.memoizedState,i=a.element,ale(e,t),RT(t,r,null,n);var o=t.memoizedState;if(r=o.element,a.isDehydrated)if(a={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){i=gf(Error(Je(423)),t),t=_Y(e,t,r,n,i);break e}else if(r!==i){i=gf(Error(Je(424)),t),t=_Y(e,t,r,n,i);break e}else for(Da=Gc(t.stateNode.containerInfo.firstChild),za=t,tr=!0,_o=null,n=rle(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(ff(),r===i){t=ec(e,t,n);break e}$i(e,t,r,n)}t=t.child}return t;case 5:return ole(t),e===null&&P$(t),r=t.type,i=t.pendingProps,a=e!==null?e.memoizedProps:null,o=i.children,L$(r,i)?o=null:a!==null&&L$(r,a)&&(t.flags|=32),Ple(e,t),$i(e,t,o,n),t.child;case 6:return e===null&&P$(t),null;case 13:return Rle(e,t,n);case 4:return FG(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=pf(t,null,r,n):$i(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Lo(r,i),LY(e,t,r,i,n);case 7:return $i(e,t,t.pendingProps,n),t.child;case 8:return $i(e,t,t.pendingProps.children,n),t.child;case 12:return $i(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,a=t.memoizedProps,o=i.value,Bn(PT,r._currentValue),r._currentValue=o,a!==null)if(Do(a.value,o)){if(a.children===i.children&&!ca.current){t=ec(e,t,n);break e}}else for(a=t.child,a!==null&&(a.return=t);a!==null;){var s=a.dependencies;if(s!==null){o=a.child;for(var c=s.firstContext;c!==null;){if(c.context===r){if(a.tag===1){c=Xs(-1,n&-n),c.tag=2;var l=a.updateQueue;if(l!==null){l=l.shared;var u=l.pending;u===null?c.next=c:(c.next=u.next,u.next=c),l.pending=c}}a.lanes|=n,c=a.alternate,c!==null&&(c.lanes|=n),N$(a.return,n,t),s.lanes|=n;break}c=c.next}}else if(a.tag===10)o=a.type===t.type?null:a.child;else if(a.tag===18){if(o=a.return,o===null)throw Error(Je(341));o.lanes|=n,s=o.alternate,s!==null&&(s.lanes|=n),N$(o,n,t),o=a.sibling}else o=a.child;if(o!==null)o.return=a;else for(o=a;o!==null;){if(o===t){o=null;break}if(a=o.sibling,a!==null){a.return=o.return,o=a;break}o=o.return}a=o}$i(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,W2(t,n),i=oo(i),r=r(i),t.flags|=1,$i(e,t,r,n),t.child;case 14:return r=t.type,i=Lo(r,t.pendingProps),i=Lo(r.type,i),IY(e,t,r,i,n);case 15:return _le(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Lo(r,i),Bm(e,t),t.tag=1,la(r)?(e=!0,AT(t)):e=!1,W2(t,n),Lle(t,r,i),j$(t,r,i,n),q$(null,t,r,!0,e,n);case 19:return jle(e,t,n);case 22:return Ele(e,t,n)}throw Error(Je(156,t.tag))};function Xle(e,t){return Mce(e,t)}function yve(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ro(e,t,n,r){return new yve(e,t,n,r)}function tK(e){return e=e.prototype,!(!e||!e.isReactComponent)}function gve(e){if(typeof e=="function")return tK(e)?1:0;if(e!=null){if(e=e.$$typeof,e===xG)return 11;if(e===wG)return 14}return 2}function Yc(e,t){var n=e.alternate;return n===null?(n=ro(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Um(e,t,n,r,i,a){var o=2;if(r=e,typeof e=="function")tK(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case I2:return vh(n.children,i,a,t);case kG:o=8,i|=8;break;case i$:return e=ro(12,n,t,i|2),e.elementType=i$,e.lanes=a,e;case a$:return e=ro(13,n,t,i),e.elementType=a$,e.lanes=a,e;case o$:return e=ro(19,n,t,i),e.elementType=o$,e.lanes=a,e;case oce:return DD(n,i,a,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case ice:o=10;break e;case ace:o=9;break e;case xG:o=11;break e;case wG:o=14;break e;case Rc:o=16,r=null;break e}throw Error(Je(130,e==null?e:typeof e,""))}return t=ro(o,n,t,i),t.elementType=e,t.type=r,t.lanes=a,t}function vh(e,t,n,r){return e=ro(7,e,r,t),e.lanes=n,e}function DD(e,t,n,r){return e=ro(22,e,r,t),e.elementType=oce,e.lanes=n,e.stateNode={isHidden:!1},e}function Hz(e,t,n){return e=ro(6,e,null,t),e.lanes=n,e}function Vz(e,t,n){return t=ro(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function mve(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Mz(0),this.expirationTimes=Mz(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Mz(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function nK(e,t,n,r,i,a,o,s,c){return e=new mve(e,t,n,s,c),t===1?(t=1,a===!0&&(t|=8)):t=0,a=ro(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},OG(a),e}function vve(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:L2,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Yle(e){if(!e)return rl;e=e._reactInternals;e:{if(Oh(e)!==e||e.tag!==1)throw Error(Je(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(la(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(Je(171))}if(e.tag===1){var n=e.type;if(la(n))return Yce(e,n,t)}return t}function Jle(e,t,n,r,i,a,o,s,c){return e=nK(n,r,!0,e,i,a,o,s,c),e.context=Yle(null),n=e.current,r=Gi(),i=Xc(n),a=Xs(r,i),a.callback=t??null,Kc(n,a,i),e.current.lanes=i,Iy(e,i,r),ua(e,r),e}function qD(e,t,n,r){var i=t.current,a=Gi(),o=Xc(i);return n=Yle(n),t.context===null?t.context=n:t.pendingContext=n,t=Xs(a,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Kc(i,t,o),e!==null&&(jo(e,i,o,a),zm(e,i,o)),o}function BT(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function OY(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function rK(e,t){OY(e,t),(e=e.alternate)&&OY(e,t)}function kve(){return null}var Qle=typeof reportError=="function"?reportError:function(e){console.error(e)};function iK(e){this._internalRoot=e}zD.prototype.render=iK.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(Je(409));qD(e,t,null,null)};zD.prototype.unmount=iK.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Lh(function(){qD(null,e,null,null)}),t[Js]=null}};function zD(e){this._internalRoot=e}zD.prototype.unstable_scheduleHydration=function(e){if(e){var t=Ece();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Dc.length&&t!==0&&t<Dc[n].priority;n++);Dc.splice(n,0,e),n===0&&Nce(e)}};function aK(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function OD(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function FY(){}function xve(e,t,n,r,i){if(i){if(typeof r=="function"){var a=r;r=function(){var l=BT(o);a.call(l)}}var o=Jle(t,r,e,0,null,!1,!1,"",FY);return e._reactRootContainer=o,e[Js]=o.current,Jp(e.nodeType===8?e.parentNode:e),Lh(),o}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var s=r;r=function(){var l=BT(c);s.call(l)}}var c=nK(e,0,!1,null,null,!1,!1,"",FY);return e._reactRootContainer=c,e[Js]=c.current,Jp(e.nodeType===8?e.parentNode:e),Lh(function(){qD(t,c,n,r)}),c}function FD(e,t,n,r,i){var a=n._reactRootContainer;if(a){var o=a;if(typeof i=="function"){var s=i;i=function(){var c=BT(o);s.call(c)}}qD(t,o,e,i)}else o=xve(n,t,e,i,r);return BT(o)}Ace=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=O0(t.pendingLanes);n!==0&&(SG(t,n|1),ua(t,_r()),!(hn&6)&&(mf=_r()+500,fl()))}break;case 13:Lh(function(){var r=Qs(e,1);if(r!==null){var i=Gi();jo(r,e,1,i)}}),rK(e,1)}};CG=function(e){if(e.tag===13){var t=Qs(e,134217728);if(t!==null){var n=Gi();jo(t,e,134217728,n)}rK(e,134217728)}};_ce=function(e){if(e.tag===13){var t=Xc(e),n=Qs(e,t);if(n!==null){var r=Gi();jo(n,e,t,r)}rK(e,t)}};Ece=function(){return xn};Pce=function(e,t){var n=xn;try{return xn=e,t()}finally{xn=n}};g$=function(e,t,n){switch(t){case"input":if(l$(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=ED(r);if(!i)throw Error(Je(90));cce(r),l$(r,i)}}}break;case"textarea":uce(e,n);break;case"select":t=n.value,t!=null&&H2(e,!!n.multiple,t,!1)}};mce=JG;vce=Lh;var wve={usingClientEntryPoint:!1,Events:[_y,P2,ED,yce,gce,JG]},S0={findFiberByHostInstance:hh,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},bve={bundleType:S0.bundleType,version:S0.version,rendererPackageName:S0.rendererPackageName,rendererConfig:S0.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:ac.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=wce(e),e===null?null:e.stateNode},findFiberByHostInstance:S0.findFiberByHostInstance||kve,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Kg=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Kg.isDisabled&&Kg.supportsFiber)try{LD=Kg.inject(bve),fs=Kg}catch{}}Va.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=wve;Va.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!aK(t))throw Error(Je(200));return vve(e,t,null,n)};Va.createRoot=function(e,t){if(!aK(e))throw Error(Je(299));var n=!1,r="",i=Qle;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=nK(e,1,!1,null,null,n,!1,r,i),e[Js]=t.current,Jp(e.nodeType===8?e.parentNode:e),new iK(t)};Va.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(Je(188)):(e=Object.keys(e).join(","),Error(Je(268,e)));return e=wce(t),e=e===null?null:e.stateNode,e};Va.flushSync=function(e){return Lh(e)};Va.hydrate=function(e,t,n){if(!OD(t))throw Error(Je(200));return FD(null,e,t,!0,n)};Va.hydrateRoot=function(e,t,n){if(!aK(e))throw Error(Je(405));var r=n!=null&&n.hydratedSources||null,i=!1,a="",o=Qle;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(a=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=Jle(t,null,e,1,n??null,i,!1,a,o),e[Js]=t.current,Jp(e),r)for(e=0;e<r.length;e++)n=r[e],i=n._getVersion,i=i(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new zD(t)};Va.render=function(e,t,n){if(!OD(t))throw Error(Je(200));return FD(null,e,t,!1,n)};Va.unmountComponentAtNode=function(e){if(!OD(e))throw Error(Je(40));return e._reactRootContainer?(Lh(function(){FD(null,null,e,!1,function(){e._reactRootContainer=null,e[Js]=null})}),!0):!1};Va.unstable_batchedUpdates=JG;Va.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!OD(n))throw Error(Je(200));if(e==null||e._reactInternals===void 0)throw Error(Je(38));return FD(e,t,n,!1,r)};Va.version="18.3.1-next-f1338f8080-20240426";function eue(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(eue)}catch(e){console.error(e)}}eue(),ece.exports=Va;var qf=ece.exports;const Mve=Rf(qf);var BY=qf;n$.createRoot=BY.createRoot,n$.hydrateRoot=BY.hydrateRoot;function HY(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function ms(...e){return t=>{let n=!1;const r=e.map(i=>{const a=HY(i,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let i=0;i<r.length;i++){const a=r[i];typeof a=="function"?a():HY(e[i],null)}}}}function Nn(...e){return M.useCallback(ms(...e),e)}var Sve=Symbol.for("react.lazy"),HT=yG[" use ".trim().toString()];function Cve(e){return typeof e=="object"&&e!==null&&"then"in e}function tue(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===Sve&&"_payload"in e&&Cve(e._payload)}function Lve(e){const t=Ave(e),n=M.forwardRef((r,i)=>{let{children:a,...o}=r;tue(a)&&typeof HT=="function"&&(a=HT(a._payload));const s=M.Children.toArray(a),c=s.find(Eve);if(c){const l=c.props.children,u=s.map(d=>d===c?M.Children.count(l)>1?M.Children.only(null):M.isValidElement(l)?l.props.children:null:d);return x.jsx(t,{...o,ref:i,children:M.isValidElement(l)?M.cloneElement(l,void 0,u):null})}return x.jsx(t,{...o,ref:i,children:a})});return n.displayName=`${e}.Slot`,n}var Ive=Lve("Slot");function Ave(e){const t=M.forwardRef((n,r)=>{let{children:i,...a}=n;if(tue(i)&&typeof HT=="function"&&(i=HT(i._payload)),M.isValidElement(i)){const o=Nve(i),s=Pve(a,i.props);return i.type!==M.Fragment&&(s.ref=r?ms(r,o):o),M.cloneElement(i,s)}return M.Children.count(i)>1?M.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var _ve=Symbol("radix.slottable");function Eve(e){return M.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===_ve}function Pve(e,t){const n={...t};for(const r in t){const i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...s)=>{const c=a(...s);return i(...s),c}:i&&(n[r]=i):r==="style"?n[r]={...i,...a}:r==="className"&&(n[r]=[i,a].filter(Boolean).join(" "))}return{...e,...n}}function Nve(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function nue(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=nue(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function rue(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=nue(e))&&(r&&(r+=" "),r+=t);return r}const VY=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,UY=rue,iue=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return UY(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:i,defaultVariants:a}=t,o=Object.keys(i).map(l=>{const u=n==null?void 0:n[l],d=a==null?void 0:a[l];if(u===null)return null;const f=VY(u)||VY(d);return i[l][f]}),s=n&&Object.entries(n).reduce((l,u)=>{let[d,f]=u;return f===void 0||(l[d]=f),l},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((l,u)=>{let{class:d,className:f,...h}=u;return Object.entries(h).every(y=>{let[v,k]=y;return Array.isArray(k)?k.includes({...a,...s}[v]):{...a,...s}[v]===k})?[...l,d,f]:l},[]);return UY(e,o,c,n==null?void 0:n.class,n==null?void 0:n.className)},oK="-",Rve=e=>{const t=Tve(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:o=>{const s=o.split(oK);return s[0]===""&&s.length!==1&&s.shift(),aue(s,t)||jve(o)},getConflictingClassGroupIds:(o,s)=>{const c=n[o]||[];return s&&r[o]?[...c,...r[o]]:c}}},aue=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),i=r?aue(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;const a=e.join(oK);return(o=t.validators.find(({validator:s})=>s(a)))==null?void 0:o.classGroupId},$Y=/^\[(.+)\]$/,jve=e=>{if($Y.test(e)){const t=$Y.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},Tve=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return qve(Object.entries(e.classGroups),n).forEach(([a,o])=>{Z$(o,r,a,t)}),r},Z$=(e,t,n,r)=>{e.forEach(i=>{if(typeof i=="string"){const a=i===""?t:WY(t,i);a.classGroupId=n;return}if(typeof i=="function"){if(Dve(i)){Z$(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([a,o])=>{Z$(o,WY(t,a),n,r)})})},WY=(e,t)=>{let n=e;return t.split(oK).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},Dve=e=>e.isThemeGetter,qve=(e,t)=>t?e.map(([n,r])=>{const i=r.map(a=>typeof a=="string"?t+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([o,s])=>[t+o,s])):a);return[n,i]}):e,zve=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const i=(a,o)=>{n.set(a,o),t++,t>e&&(t=0,r=n,n=new Map)};return{get(a){let o=n.get(a);if(o!==void 0)return o;if((o=r.get(a))!==void 0)return i(a,o),o},set(a,o){n.has(a)?n.set(a,o):i(a,o)}}},oue="!",Ove=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,i=t[0],a=t.length,o=s=>{const c=[];let l=0,u=0,d;for(let k=0;k<s.length;k++){let g=s[k];if(l===0){if(g===i&&(r||s.slice(k,k+a)===t)){c.push(s.slice(u,k)),u=k+a;continue}if(g==="/"){d=k;continue}}g==="["?l++:g==="]"&&l--}const f=c.length===0?s:s.substring(u),h=f.startsWith(oue),y=h?f.substring(1):f,v=d&&d>u?d-u:void 0;return{modifiers:c,hasImportantModifier:h,baseClassName:y,maybePostfixModifierPosition:v}};return n?s=>n({className:s,parseClassName:o}):o},Fve=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},Bve=e=>({cache:zve(e.cacheSize),parseClassName:Ove(e),...Rve(e)}),Hve=/\s+/,Vve=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i}=t,a=[],o=e.trim().split(Hve);let s="";for(let c=o.length-1;c>=0;c-=1){const l=o[c],{modifiers:u,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:h}=n(l);let y=!!h,v=r(y?f.substring(0,h):f);if(!v){if(!y){s=l+(s.length>0?" "+s:s);continue}if(v=r(f),!v){s=l+(s.length>0?" "+s:s);continue}y=!1}const k=Fve(u).join(":"),g=d?k+oue:k,S=g+v;if(a.includes(S))continue;a.push(S);const w=i(v,y);for(let C=0;C<w.length;++C){const _=w[C];a.push(g+_)}s=l+(s.length>0?" "+s:s)}return s};function Uve(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=sue(t))&&(r&&(r+=" "),r+=n);return r}const sue=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=sue(e[r]))&&(n&&(n+=" "),n+=t);return n};function $ve(e,...t){let n,r,i,a=o;function o(c){const l=t.reduce((u,d)=>d(u),e());return n=Bve(l),r=n.cache.get,i=n.cache.set,a=s,s(c)}function s(c){const l=r(c);if(l)return l;const u=Vve(c,n);return i(c,u),u}return function(){return a(Uve.apply(null,arguments))}}const Wn=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},cue=/^\[(?:([a-z-]+):)?(.+)\]$/i,Wve=/^\d+\/\d+$/,Gve=new Set(["px","full","screen"]),Kve=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Zve=/\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$/,Xve=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Yve=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Jve=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,js=e=>K2(e)||Gve.has(e)||Wve.test(e),Sc=e=>zf(e,"length",oke),K2=e=>!!e&&!Number.isNaN(Number(e)),Uz=e=>zf(e,"number",K2),C0=e=>!!e&&Number.isInteger(Number(e)),Qve=e=>e.endsWith("%")&&K2(e.slice(0,-1)),Kt=e=>cue.test(e),Cc=e=>Kve.test(e),eke=new Set(["length","size","percentage"]),tke=e=>zf(e,eke,lue),nke=e=>zf(e,"position",lue),rke=new Set(["image","url"]),ike=e=>zf(e,rke,cke),ake=e=>zf(e,"",ske),L0=()=>!0,zf=(e,t,n)=>{const r=cue.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},oke=e=>Zve.test(e)&&!Xve.test(e),lue=()=>!1,ske=e=>Yve.test(e),cke=e=>Jve.test(e),lke=()=>{const e=Wn("colors"),t=Wn("spacing"),n=Wn("blur"),r=Wn("brightness"),i=Wn("borderColor"),a=Wn("borderRadius"),o=Wn("borderSpacing"),s=Wn("borderWidth"),c=Wn("contrast"),l=Wn("grayscale"),u=Wn("hueRotate"),d=Wn("invert"),f=Wn("gap"),h=Wn("gradientColorStops"),y=Wn("gradientColorStopPositions"),v=Wn("inset"),k=Wn("margin"),g=Wn("opacity"),S=Wn("padding"),w=Wn("saturate"),C=Wn("scale"),_=Wn("sepia"),A=Wn("skew"),j=Wn("space"),O=Wn("translate"),T=()=>["auto","contain","none"],D=()=>["auto","hidden","clip","visible","scroll"],I=()=>["auto",Kt,t],R=()=>[Kt,t],U=()=>["",js,Sc],q=()=>["auto",K2,Kt],K=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],Z=()=>["solid","dashed","dotted","double","none"],$=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],B=()=>["start","end","center","between","around","evenly","stretch"],V=()=>["","0",Kt],F=()=>["auto","avoid","all","avoid-page","page","left","right","column"],ie=()=>[K2,Kt];return{cacheSize:500,separator:":",theme:{colors:[L0],spacing:[js,Sc],blur:["none","",Cc,Kt],brightness:ie(),borderColor:[e],borderRadius:["none","","full",Cc,Kt],borderSpacing:R(),borderWidth:U(),contrast:ie(),grayscale:V(),hueRotate:ie(),invert:V(),gap:R(),gradientColorStops:[e],gradientColorStopPositions:[Qve,Sc],inset:I(),margin:I(),opacity:ie(),padding:R(),saturate:ie(),scale:ie(),sepia:V(),skew:ie(),space:R(),translate:R()},classGroups:{aspect:[{aspect:["auto","square","video",Kt]}],container:["container"],columns:[{columns:[Cc]}],"break-after":[{"break-after":F()}],"break-before":[{"break-before":F()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...K(),Kt]}],overflow:[{overflow:D()}],"overflow-x":[{"overflow-x":D()}],"overflow-y":[{"overflow-y":D()}],overscroll:[{overscroll:T()}],"overscroll-x":[{"overscroll-x":T()}],"overscroll-y":[{"overscroll-y":T()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[v]}],"inset-x":[{"inset-x":[v]}],"inset-y":[{"inset-y":[v]}],start:[{start:[v]}],end:[{end:[v]}],top:[{top:[v]}],right:[{right:[v]}],bottom:[{bottom:[v]}],left:[{left:[v]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",C0,Kt]}],basis:[{basis:I()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Kt]}],grow:[{grow:V()}],shrink:[{shrink:V()}],order:[{order:["first","last","none",C0,Kt]}],"grid-cols":[{"grid-cols":[L0]}],"col-start-end":[{col:["auto",{span:["full",C0,Kt]},Kt]}],"col-start":[{"col-start":q()}],"col-end":[{"col-end":q()}],"grid-rows":[{"grid-rows":[L0]}],"row-start-end":[{row:["auto",{span:[C0,Kt]},Kt]}],"row-start":[{"row-start":q()}],"row-end":[{"row-end":q()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Kt]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Kt]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...B()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...B(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...B(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[S]}],px:[{px:[S]}],py:[{py:[S]}],ps:[{ps:[S]}],pe:[{pe:[S]}],pt:[{pt:[S]}],pr:[{pr:[S]}],pb:[{pb:[S]}],pl:[{pl:[S]}],m:[{m:[k]}],mx:[{mx:[k]}],my:[{my:[k]}],ms:[{ms:[k]}],me:[{me:[k]}],mt:[{mt:[k]}],mr:[{mr:[k]}],mb:[{mb:[k]}],ml:[{ml:[k]}],"space-x":[{"space-x":[j]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[j]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Kt,t]}],"min-w":[{"min-w":[Kt,t,"min","max","fit"]}],"max-w":[{"max-w":[Kt,t,"none","full","min","max","fit","prose",{screen:[Cc]},Cc]}],h:[{h:[Kt,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Kt,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Kt,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Kt,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Cc,Sc]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Uz]}],"font-family":[{font:[L0]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Kt]}],"line-clamp":[{"line-clamp":["none",K2,Uz]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",js,Kt]}],"list-image":[{"list-image":["none",Kt]}],"list-style-type":[{list:["none","disc","decimal",Kt]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[g]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[g]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Z(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",js,Sc]}],"underline-offset":[{"underline-offset":["auto",js,Kt]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:R()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Kt]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Kt]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[g]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...K(),nke]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",tke]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},ike]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[y]}],"gradient-via-pos":[{via:[y]}],"gradient-to-pos":[{to:[y]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[g]}],"border-style":[{border:[...Z(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[g]}],"divide-style":[{divide:Z()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...Z()]}],"outline-offset":[{"outline-offset":[js,Kt]}],"outline-w":[{outline:[js,Sc]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:U()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[g]}],"ring-offset-w":[{"ring-offset":[js,Sc]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Cc,ake]}],"shadow-color":[{shadow:[L0]}],opacity:[{opacity:[g]}],"mix-blend":[{"mix-blend":[...$(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":$()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",Cc,Kt]}],grayscale:[{grayscale:[l]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[w]}],sepia:[{sepia:[_]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[l]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[g]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"backdrop-sepia":[{"backdrop-sepia":[_]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Kt]}],duration:[{duration:ie()}],ease:[{ease:["linear","in","out","in-out",Kt]}],delay:[{delay:ie()}],animate:[{animate:["none","spin","ping","pulse","bounce",Kt]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[C]}],"scale-x":[{"scale-x":[C]}],"scale-y":[{"scale-y":[C]}],rotate:[{rotate:[C0,Kt]}],"translate-x":[{"translate-x":[O]}],"translate-y":[{"translate-y":[O]}],"skew-x":[{"skew-x":[A]}],"skew-y":[{"skew-y":[A]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Kt]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Kt]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":R()}],"scroll-mx":[{"scroll-mx":R()}],"scroll-my":[{"scroll-my":R()}],"scroll-ms":[{"scroll-ms":R()}],"scroll-me":[{"scroll-me":R()}],"scroll-mt":[{"scroll-mt":R()}],"scroll-mr":[{"scroll-mr":R()}],"scroll-mb":[{"scroll-mb":R()}],"scroll-ml":[{"scroll-ml":R()}],"scroll-p":[{"scroll-p":R()}],"scroll-px":[{"scroll-px":R()}],"scroll-py":[{"scroll-py":R()}],"scroll-ps":[{"scroll-ps":R()}],"scroll-pe":[{"scroll-pe":R()}],"scroll-pt":[{"scroll-pt":R()}],"scroll-pr":[{"scroll-pr":R()}],"scroll-pb":[{"scroll-pb":R()}],"scroll-pl":[{"scroll-pl":R()}],"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",Kt]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[js,Sc,Uz]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},uke=$ve(lke);function Ze(...e){return uke(rue(e))}const dke=iue("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),oi=M.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...i},a)=>{const o=r?Ive:"button";return x.jsx(o,{className:Ze(dke({variant:t,size:n,className:e})),ref:a,...i})});oi.displayName="Button";function St(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function hke(e,t){const n=M.createContext(t),r=a=>{const{children:o,...s}=a,c=M.useMemo(()=>s,Object.values(s));return x.jsx(n.Provider,{value:c,children:o})};r.displayName=e+"Provider";function i(a){const o=M.useContext(n);if(o)return o;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[r,i]}function xs(e,t=[]){let n=[];function r(a,o){const s=M.createContext(o),c=n.length;n=[...n,o];const l=d=>{var g;const{scope:f,children:h,...y}=d,v=((g=f==null?void 0:f[e])==null?void 0:g[c])||s,k=M.useMemo(()=>y,Object.values(y));return x.jsx(v.Provider,{value:k,children:h})};l.displayName=a+"Provider";function u(d,f){var v;const h=((v=f==null?void 0:f[e])==null?void 0:v[c])||s,y=M.useContext(h);if(y)return y;if(o!==void 0)return o;throw new Error(`\`${d}\` must be used within \`${a}\``)}return[l,u]}const i=()=>{const a=n.map(o=>M.createContext(o));return function(s){const c=(s==null?void 0:s[e])||a;return M.useMemo(()=>({[`__scope${e}`]:{...s,[e]:c}}),[s,c])}};return i.scopeName=e,[r,fke(i,...t)]}function fke(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(a){const o=r.reduce((s,{useScope:c,scopeName:l})=>{const d=c(a)[`__scope${l}`];return{...s,...d}},{});return M.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}var il=globalThis!=null&&globalThis.document?M.useLayoutEffect:()=>{},pke=yG[" useId ".trim().toString()]||(()=>{}),yke=0;function da(e){const[t,n]=M.useState(pke());return il(()=>{n(r=>r??String(yke++))},[e]),t?`radix-${t}`:""}var gke=yG[" useInsertionEffect ".trim().toString()]||il;function Of({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[i,a,o]=mke({defaultProp:t,onChange:n}),s=e!==void 0,c=s?e:i;{const u=M.useRef(e!==void 0);M.useEffect(()=>{const d=u.current;d!==s&&console.warn(`${r} is changing from ${d?"controlled":"uncontrolled"} to ${s?"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.`),u.current=s},[s,r])}const l=M.useCallback(u=>{var d;if(s){const f=vke(u)?u(e):u;f!==e&&((d=o.current)==null||d.call(o,f))}else a(u)},[s,e,a,o]);return[c,l]}function mke({defaultProp:e,onChange:t}){const[n,r]=M.useState(e),i=M.useRef(n),a=M.useRef(t);return gke(()=>{a.current=t},[t]),M.useEffect(()=>{var o;i.current!==n&&((o=a.current)==null||o.call(a,n),i.current=n)},[n,i]),[n,r,a]}function vke(e){return typeof e=="function"}function vf(e){const t=kke(e),n=M.forwardRef((r,i)=>{const{children:a,...o}=r,s=M.Children.toArray(a),c=s.find(wke);if(c){const l=c.props.children,u=s.map(d=>d===c?M.Children.count(l)>1?M.Children.only(null):M.isValidElement(l)?l.props.children:null:d);return x.jsx(t,{...o,ref:i,children:M.isValidElement(l)?M.cloneElement(l,void 0,u):null})}return x.jsx(t,{...o,ref:i,children:a})});return n.displayName=`${e}.Slot`,n}function kke(e){const t=M.forwardRef((n,r)=>{const{children:i,...a}=n;if(M.isValidElement(i)){const o=Mke(i),s=bke(a,i.props);return i.type!==M.Fragment&&(s.ref=r?ms(r,o):o),M.cloneElement(i,s)}return M.Children.count(i)>1?M.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var uue=Symbol("radix.slottable");function xke(e){const t=({children:n})=>x.jsx(x.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=uue,t}function wke(e){return M.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===uue}function bke(e,t){const n={...t};for(const r in t){const i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...s)=>{const c=a(...s);return i(...s),c}:i&&(n[r]=i):r==="style"?n[r]={...i,...a}:r==="className"&&(n[r]=[i,a].filter(Boolean).join(" "))}return{...e,...n}}function Mke(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Ske=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Jt=Ske.reduce((e,t)=>{const n=vf(`Primitive.${t}`),r=M.forwardRef((i,a)=>{const{asChild:o,...s}=i,c=o?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),x.jsx(c,{...s,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function due(e,t){e&&qf.flushSync(()=>e.dispatchEvent(t))}function vs(e){const t=M.useRef(e);return M.useEffect(()=>{t.current=e}),M.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function Cke(e,t=globalThis==null?void 0:globalThis.document){const n=vs(e);M.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Lke="DismissableLayer",X$="dismissableLayer.update",Ike="dismissableLayer.pointerDownOutside",Ake="dismissableLayer.focusOutside",GY,hue=M.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Py=M.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,onDismiss:s,...c}=e,l=M.useContext(hue),[u,d]=M.useState(null),f=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=M.useState({}),y=Nn(t,j=>d(j)),v=Array.from(l.layers),[k]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),g=v.indexOf(k),S=u?v.indexOf(u):-1,w=l.layersWithOutsidePointerEventsDisabled.size>0,C=S>=g,_=Pke(j=>{const O=j.target,T=[...l.branches].some(D=>D.contains(O));!C||T||(i==null||i(j),o==null||o(j),j.defaultPrevented||s==null||s())},f),A=Nke(j=>{const O=j.target;[...l.branches].some(D=>D.contains(O))||(a==null||a(j),o==null||o(j),j.defaultPrevented||s==null||s())},f);return Cke(j=>{S===l.layers.size-1&&(r==null||r(j),!j.defaultPrevented&&s&&(j.preventDefault(),s()))},f),M.useEffect(()=>{if(u)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(GY=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(u)),l.layers.add(u),KY(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=GY)}},[u,f,n,l]),M.useEffect(()=>()=>{u&&(l.layers.delete(u),l.layersWithOutsidePointerEventsDisabled.delete(u),KY())},[u,l]),M.useEffect(()=>{const j=()=>h({});return document.addEventListener(X$,j),()=>document.removeEventListener(X$,j)},[]),x.jsx(Jt.div,{...c,ref:y,style:{pointerEvents:w?C?"auto":"none":void 0,...e.style},onFocusCapture:St(e.onFocusCapture,A.onFocusCapture),onBlurCapture:St(e.onBlurCapture,A.onBlurCapture),onPointerDownCapture:St(e.onPointerDownCapture,_.onPointerDownCapture)})});Py.displayName=Lke;var _ke="DismissableLayerBranch",Eke=M.forwardRef((e,t)=>{const n=M.useContext(hue),r=M.useRef(null),i=Nn(t,r);return M.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),x.jsx(Jt.div,{...e,ref:i})});Eke.displayName=_ke;function Pke(e,t=globalThis==null?void 0:globalThis.document){const n=vs(e),r=M.useRef(!1),i=M.useRef(()=>{});return M.useEffect(()=>{const a=s=>{if(s.target&&!r.current){let c=function(){fue(Ike,n,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=c,t.addEventListener("click",i.current,{once:!0})):c()}else t.removeEventListener("click",i.current);r.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",a),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Nke(e,t=globalThis==null?void 0:globalThis.document){const n=vs(e),r=M.useRef(!1);return M.useEffect(()=>{const i=a=>{a.target&&!r.current&&fue(Ake,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function KY(){const e=new CustomEvent(X$);document.dispatchEvent(e)}function fue(e,t,n,{discrete:r}){const i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?due(i,a):i.dispatchEvent(a)}var $z="focusScope.autoFocusOnMount",Wz="focusScope.autoFocusOnUnmount",ZY={bubbles:!1,cancelable:!0},Rke="FocusScope",BD=M.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=M.useState(null),l=vs(i),u=vs(a),d=M.useRef(null),f=Nn(t,v=>c(v)),h=M.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;M.useEffect(()=>{if(r){let v=function(w){if(h.paused||!s)return;const C=w.target;s.contains(C)?d.current=C:Nc(d.current,{select:!0})},k=function(w){if(h.paused||!s)return;const C=w.relatedTarget;C!==null&&(s.contains(C)||Nc(d.current,{select:!0}))},g=function(w){if(document.activeElement===document.body)for(const _ of w)_.removedNodes.length>0&&Nc(s)};document.addEventListener("focusin",v),document.addEventListener("focusout",k);const S=new MutationObserver(g);return s&&S.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",k),S.disconnect()}}},[r,s,h.paused]),M.useEffect(()=>{if(s){YY.add(h);const v=document.activeElement;if(!s.contains(v)){const g=new CustomEvent($z,ZY);s.addEventListener($z,l),s.dispatchEvent(g),g.defaultPrevented||(jke(Oke(pue(s)),{select:!0}),document.activeElement===v&&Nc(s))}return()=>{s.removeEventListener($z,l),setTimeout(()=>{const g=new CustomEvent(Wz,ZY);s.addEventListener(Wz,u),s.dispatchEvent(g),g.defaultPrevented||Nc(v??document.body,{select:!0}),s.removeEventListener(Wz,u),YY.remove(h)},0)}}},[s,l,u,h]);const y=M.useCallback(v=>{if(!n&&!r||h.paused)return;const k=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,g=document.activeElement;if(k&&g){const S=v.currentTarget,[w,C]=Tke(S);w&&C?!v.shiftKey&&g===C?(v.preventDefault(),n&&Nc(w,{select:!0})):v.shiftKey&&g===w&&(v.preventDefault(),n&&Nc(C,{select:!0})):g===S&&v.preventDefault()}},[n,r,h.paused]);return x.jsx(Jt.div,{tabIndex:-1,...o,ref:f,onKeyDown:y})});BD.displayName=Rke;function jke(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Nc(r,{select:t}),document.activeElement!==n)return}function Tke(e){const t=pue(e),n=XY(t,e),r=XY(t.reverse(),e);return[n,r]}function pue(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function XY(e,t){for(const n of e)if(!Dke(n,{upTo:t}))return n}function Dke(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function qke(e){return e instanceof HTMLInputElement&&"select"in e}function Nc(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&qke(e)&&t&&e.select()}}var YY=zke();function zke(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=JY(e,t),e.unshift(t)},remove(t){var n;e=JY(e,t),(n=e[0])==null||n.resume()}}}function JY(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Oke(e){return e.filter(t=>t.tagName!=="A")}var Fke="Portal",Ny=M.forwardRef((e,t)=>{var s;const{container:n,...r}=e,[i,a]=M.useState(!1);il(()=>a(!0),[]);const o=n||i&&((s=globalThis==null?void 0:globalThis.document)==null?void 0:s.body);return o?Mve.createPortal(x.jsx(Jt.div,{...r,ref:t}),o):null});Ny.displayName=Fke;function Bke(e,t){return M.useReducer((n,r)=>t[n][r]??n,e)}var lo=e=>{const{present:t,children:n}=e,r=Hke(t),i=typeof n=="function"?n({present:r.isPresent}):M.Children.only(n),a=Nn(r.ref,Vke(i));return typeof n=="function"||r.isPresent?M.cloneElement(i,{ref:a}):null};lo.displayName="Presence";function Hke(e){const[t,n]=M.useState(),r=M.useRef(null),i=M.useRef(e),a=M.useRef("none"),o=e?"mounted":"unmounted",[s,c]=Bke(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return M.useEffect(()=>{const l=Zg(r.current);a.current=s==="mounted"?l:"none"},[s]),il(()=>{const l=r.current,u=i.current;if(u!==e){const f=a.current,h=Zg(l);e?c("MOUNT"):h==="none"||(l==null?void 0:l.display)==="none"?c("UNMOUNT"):c(u&&f!==h?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,c]),il(()=>{if(t){let l;const u=t.ownerDocument.defaultView??window,d=h=>{const v=Zg(r.current).includes(CSS.escape(h.animationName));if(h.target===t&&v&&(c("ANIMATION_END"),!i.current)){const k=t.style.animationFillMode;t.style.animationFillMode="forwards",l=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=k)})}},f=h=>{h.target===t&&(a.current=Zg(r.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{u.clearTimeout(l),t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:M.useCallback(l=>{r.current=l?getComputedStyle(l):null,n(l)},[])}}function Zg(e){return(e==null?void 0:e.animationName)||"none"}function Vke(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Gz=0;function sK(){M.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??QY()),document.body.insertAdjacentElement("beforeend",e[1]??QY()),Gz++,()=>{Gz===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Gz--}},[])}function QY(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var cs=function(){return cs=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},cs.apply(this,arguments)};function yue(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function Uke(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var $m="right-scroll-bar-position",Wm="width-before-scroll-bar",$ke="with-scroll-bars-hidden",Wke="--removed-body-scroll-bar-size";function Kz(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Gke(e,t){var n=M.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}var Kke=typeof window<"u"?M.useLayoutEffect:M.useEffect,eJ=new WeakMap;function Zke(e,t){var n=Gke(null,function(r){return e.forEach(function(i){return Kz(i,r)})});return Kke(function(){var r=eJ.get(n);if(r){var i=new Set(r),a=new Set(e),o=n.current;i.forEach(function(s){a.has(s)||Kz(s,null)}),a.forEach(function(s){i.has(s)||Kz(s,o)})}eJ.set(n,e)},[e]),n}function Xke(e){return e}function Yke(e,t){t===void 0&&(t=Xke);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(a){var o=t(a,r);return n.push(o),function(){n=n.filter(function(s){return s!==o})}},assignSyncMedium:function(a){for(r=!0;n.length;){var o=n;n=[],o.forEach(a)}n={push:function(s){return a(s)},filter:function(){return n}}},assignMedium:function(a){r=!0;var o=[];if(n.length){var s=n;n=[],s.forEach(a),o=n}var c=function(){var u=o;o=[],u.forEach(a)},l=function(){return Promise.resolve().then(c)};l(),n={push:function(u){o.push(u),l()},filter:function(u){return o=o.filter(u),n}}}};return i}function Jke(e){e===void 0&&(e={});var t=Yke(null);return t.options=cs({async:!0,ssr:!1},e),t}var gue=function(e){var t=e.sideCar,n=yue(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return M.createElement(r,cs({},n))};gue.isSideCarExport=!0;function Qke(e,t){return e.useMedium(t),gue}var mue=Jke(),Zz=function(){},HD=M.forwardRef(function(e,t){var n=M.useRef(null),r=M.useState({onScrollCapture:Zz,onWheelCapture:Zz,onTouchMoveCapture:Zz}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,h=e.noRelative,y=e.noIsolation,v=e.inert,k=e.allowPinchZoom,g=e.as,S=g===void 0?"div":g,w=e.gapMode,C=yue(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),_=f,A=Zke([n,t]),j=cs(cs({},C),i);return M.createElement(M.Fragment,null,u&&M.createElement(_,{sideCar:mue,removeScrollBar:l,shards:d,noRelative:h,noIsolation:y,inert:v,setCallbacks:a,allowPinchZoom:!!k,lockRef:n,gapMode:w}),o?M.cloneElement(M.Children.only(s),cs(cs({},j),{ref:A})):M.createElement(S,cs({},j,{className:c,ref:A}),s))});HD.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};HD.classNames={fullWidth:Wm,zeroRight:$m};var e4e=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function t4e(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=e4e();return t&&e.setAttribute("nonce",t),e}function n4e(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function r4e(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var i4e=function(){var e=0,t=null;return{add:function(n){e==0&&(t=t4e())&&(n4e(t,n),r4e(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},a4e=function(){var e=i4e();return function(t,n){M.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},vue=function(){var e=a4e(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},o4e={left:0,top:0,right:0,gap:0},Xz=function(e){return parseInt(e||"",10)||0},s4e=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[Xz(n),Xz(r),Xz(i)]},c4e=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return o4e;var t=s4e(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},l4e=vue(),Z2="data-scroll-locked",u4e=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n="margin"),`
40
+ `+a.stack}return{value:e,source:t,stack:i,digest:null}}function Fz(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function T$(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var J5e=typeof WeakMap=="function"?WeakMap:Map;function Ile(e,t,n){n=Xs(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){zT||(zT=!0,$$=r),T$(e,t)},n}function Ale(e,t,n){n=Xs(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){T$(e,t)}}var a=e.stateNode;return a!==null&&typeof a.componentDidCatch=="function"&&(n.callback=function(){T$(e,t),typeof r!="function"&&(Zc===null?Zc=new Set([this]):Zc.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function MY(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new J5e;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=hve.bind(null,e,t,n),t.then(e,e))}function SY(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function CY(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Xs(-1,1),t.tag=2,Kc(n,t,1))),n.lanes|=1),e)}var Q5e=ac.ReactCurrentOwner,oa=!1;function $i(e,t,n,r){t.child=e===null?rle(t,null,n,r):pf(t,e.child,n,r)}function LY(e,t,n,r,i){n=n.render;var a=t.ref;return W2(t,i),r=UG(e,t,n,r,a,i),n=$G(),e!==null&&!oa?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,ec(e,t,i)):(tr&&n&&NG(t),t.flags|=1,$i(e,t,r,i),t.child)}function IY(e,t,n,r,i){if(e===null){var a=n.type;return typeof a=="function"&&!tK(a)&&a.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=a,_le(e,t,a,r,i)):(e=Um(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!(e.lanes&i)){var o=a.memoizedProps;if(n=n.compare,n=n!==null?n:Yp,n(o,r)&&e.ref===t.ref)return ec(e,t,i)}return t.flags|=1,e=Yc(a,r),e.ref=t.ref,e.return=t,t.child=e}function _le(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Yp(a,r)&&e.ref===t.ref)if(oa=!1,t.pendingProps=r=a,(e.lanes&i)!==0)e.flags&131072&&(oa=!0);else return t.lanes=e.lanes,ec(e,t,i)}return D$(e,t,n,r,i)}function Ele(e,t,n){var r=t.pendingProps,i=r.children,a=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Bn(q2,Na),Na|=n;else{if(!(n&1073741824))return e=a!==null?a.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Bn(q2,Na),Na|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=a!==null?a.baseLanes:n,Bn(q2,Na),Na|=r}else a!==null?(r=a.baseLanes|n,t.memoizedState=null):r=n,Bn(q2,Na),Na|=r;return $i(e,t,i,n),t.child}function Ple(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function D$(e,t,n,r,i){var a=la(n)?bh:Ri.current;return a=hf(t,a),W2(t,i),n=UG(e,t,n,r,a,i),r=$G(),e!==null&&!oa?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,ec(e,t,i)):(tr&&r&&NG(t),t.flags|=1,$i(e,t,n,i),t.child)}function AY(e,t,n,r,i){if(la(n)){var a=!0;AT(t)}else a=!1;if(W2(t,i),t.stateNode===null)Bm(e,t),Lle(t,n,r),j$(t,n,r,i),r=!0;else if(e===null){var o=t.stateNode,s=t.memoizedProps;o.props=s;var c=o.context,l=n.contextType;typeof l=="object"&&l!==null?l=oo(l):(l=la(n)?bh:Ri.current,l=hf(t,l));var u=n.getDerivedStateFromProps,d=typeof u=="function"||typeof o.getSnapshotBeforeUpdate=="function";d||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(s!==r||c!==l)&&bY(t,o,r,l),jc=!1;var f=t.memoizedState;o.state=f,RT(t,r,o,i),c=t.memoizedState,s!==r||f!==c||ca.current||jc?(typeof u=="function"&&(R$(t,n,u,r),c=t.memoizedState),(s=jc||wY(t,n,s,r,f,c,l))?(d||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),o.props=r,o.state=c,o.context=l,r=s):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,ale(e,t),s=t.memoizedProps,l=t.type===t.elementType?s:Lo(t.type,s),o.props=l,d=t.pendingProps,f=o.context,c=n.contextType,typeof c=="object"&&c!==null?c=oo(c):(c=la(n)?bh:Ri.current,c=hf(t,c));var h=n.getDerivedStateFromProps;(u=typeof h=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(s!==d||f!==c)&&bY(t,o,r,c),jc=!1,f=t.memoizedState,o.state=f,RT(t,r,o,i);var y=t.memoizedState;s!==d||f!==y||ca.current||jc?(typeof h=="function"&&(R$(t,n,h,r),y=t.memoizedState),(l=jc||wY(t,n,l,r,f,y,c)||!1)?(u||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,y,c),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,y,c)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=y),o.props=r,o.state=y,o.context=c,r=l):(typeof o.componentDidUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return q$(e,t,n,r,a,i)}function q$(e,t,n,r,i,a){Ple(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return i&&fY(t,n,!1),ec(e,t,a);r=t.stateNode,Q5e.current=t;var s=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&o?(t.child=pf(t,e.child,null,a),t.child=pf(t,null,s,a)):$i(e,t,s,a),t.memoizedState=r.state,i&&fY(t,n,!0),t.child}function Nle(e){var t=e.stateNode;t.pendingContext?hY(e,t.pendingContext,t.pendingContext!==t.context):t.context&&hY(e,t.context,!1),FG(e,t.containerInfo)}function _Y(e,t,n,r,i){return ff(),jG(i),t.flags|=256,$i(e,t,n,r),t.child}var z$={dehydrated:null,treeContext:null,retryLane:0};function O$(e){return{baseLanes:e,cachePool:null,transitions:null}}function Rle(e,t,n){var r=t.pendingProps,i=ur.current,a=!1,o=(t.flags&128)!==0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(i&2)!==0),s?(a=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),Bn(ur,i&1),e===null)return P$(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(o=r.children,e=r.fallback,a?(r=t.mode,a=t.child,o={mode:"hidden",children:o},!(r&1)&&a!==null?(a.childLanes=0,a.pendingProps=o):a=DD(o,r,0,null),e=vh(e,r,n,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=O$(n),t.memoizedState=z$,e):KG(t,o));if(i=e.memoizedState,i!==null&&(s=i.dehydrated,s!==null))return eve(e,t,o,r,s,i,n);if(a){a=r.fallback,o=t.mode,i=e.child,s=i.sibling;var c={mode:"hidden",children:r.children};return!(o&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=c,t.deletions=null):(r=Yc(i,c),r.subtreeFlags=i.subtreeFlags&14680064),s!==null?a=Yc(s,a):(a=vh(a,o,n,null),a.flags|=2),a.return=t,r.return=t,r.sibling=a,t.child=r,r=a,a=t.child,o=e.child.memoizedState,o=o===null?O$(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},a.memoizedState=o,a.childLanes=e.childLanes&~n,t.memoizedState=z$,r}return a=e.child,e=a.sibling,r=Yc(a,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function KG(e,t){return t=DD({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function $g(e,t,n,r){return r!==null&&jG(r),pf(t,e.child,null,n),e=KG(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function eve(e,t,n,r,i,a,o){if(n)return t.flags&256?(t.flags&=-257,r=Fz(Error(Je(422))),$g(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(a=r.fallback,i=t.mode,r=DD({mode:"visible",children:r.children},i,0,null),a=vh(a,i,o,null),a.flags|=2,r.return=t,a.return=t,r.sibling=a,t.child=r,t.mode&1&&pf(t,e.child,null,o),t.child.memoizedState=O$(o),t.memoizedState=z$,a);if(!(t.mode&1))return $g(e,t,o,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var s=r.dgst;return r=s,a=Error(Je(419)),r=Fz(a,r,void 0),$g(e,t,o,r)}if(s=(o&e.childLanes)!==0,oa||s){if(r=si,r!==null){switch(o&-o){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|o)?0:i,i!==0&&i!==a.retryLane&&(a.retryLane=i,Qs(e,i),jo(r,e,i,-1))}return eK(),r=Fz(Error(Je(421))),$g(e,t,o,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=fve.bind(null,e),i._reactRetry=t,null):(e=a.treeContext,Da=Gc(i.nextSibling),za=t,tr=!0,_o=null,e!==null&&(Qa[eo++]=$s,Qa[eo++]=Ws,Qa[eo++]=Mh,$s=e.id,Ws=e.overflow,Mh=t),t=KG(t,r.children),t.flags|=4096,t)}function EY(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),N$(e.return,t,n)}function Bz(e,t,n,r,i){var a=e.memoizedState;a===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=i)}function jle(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;if($i(e,t,r.children,n),r=ur.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&EY(e,n,t);else if(e.tag===19)EY(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Bn(ur,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&jT(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Bz(t,!1,i,n,a);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&jT(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Bz(t,!0,n,null,a);break;case"together":Bz(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Bm(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function ec(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Ch|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(Je(153));if(t.child!==null){for(e=t.child,n=Yc(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Yc(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function tve(e,t,n){switch(t.tag){case 3:Nle(t),ff();break;case 5:ole(t);break;case 1:la(t.type)&&AT(t);break;case 4:FG(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;Bn(PT,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Bn(ur,ur.current&1),t.flags|=128,null):n&t.child.childLanes?Rle(e,t,n):(Bn(ur,ur.current&1),e=ec(e,t,n),e!==null?e.sibling:null);Bn(ur,ur.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return jle(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Bn(ur,ur.current),r)break;return null;case 22:case 23:return t.lanes=0,Ele(e,t,n)}return ec(e,t,n)}var Tle,F$,Dle,qle;Tle=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};F$=function(){};Dle=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,ph(ps.current);var a=null;switch(n){case"input":i=c$(e,i),r=c$(e,r),a=[];break;case"select":i=fr({},i,{value:void 0}),r=fr({},r,{value:void 0}),a=[];break;case"textarea":i=d$(e,i),r=d$(e,r),a=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=LT)}f$(n,r);var o;n=null;for(l in i)if(!r.hasOwnProperty(l)&&i.hasOwnProperty(l)&&i[l]!=null)if(l==="style"){var s=i[l];for(o in s)s.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else l!=="dangerouslySetInnerHTML"&&l!=="children"&&l!=="suppressContentEditableWarning"&&l!=="suppressHydrationWarning"&&l!=="autoFocus"&&(Up.hasOwnProperty(l)?a||(a=[]):(a=a||[]).push(l,null));for(l in r){var c=r[l];if(s=i!=null?i[l]:void 0,r.hasOwnProperty(l)&&c!==s&&(c!=null||s!=null))if(l==="style")if(s){for(o in s)!s.hasOwnProperty(o)||c&&c.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in c)c.hasOwnProperty(o)&&s[o]!==c[o]&&(n||(n={}),n[o]=c[o])}else n||(a||(a=[]),a.push(l,n)),n=c;else l==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,s=s?s.__html:void 0,c!=null&&s!==c&&(a=a||[]).push(l,c)):l==="children"?typeof c!="string"&&typeof c!="number"||(a=a||[]).push(l,""+c):l!=="suppressContentEditableWarning"&&l!=="suppressHydrationWarning"&&(Up.hasOwnProperty(l)?(c!=null&&l==="onScroll"&&Gn("scroll",e),a||s===c||(a=[])):(a=a||[]).push(l,c))}n&&(a=a||[]).push("style",n);var l=a;(t.updateQueue=l)&&(t.flags|=4)}};qle=function(e,t,n,r){n!==r&&(t.flags|=4)};function M0(e,t){if(!tr)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Li(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function nve(e,t,n){var r=t.pendingProps;switch(RG(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Li(t),null;case 1:return la(t.type)&&IT(),Li(t),null;case 3:return r=t.stateNode,yf(),Zn(ca),Zn(Ri),HG(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Vg(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,_o!==null&&(K$(_o),_o=null))),F$(e,t),Li(t),null;case 5:BG(t);var i=ph(ny.current);if(n=t.type,e!==null&&t.stateNode!=null)Dle(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(Je(166));return Li(t),null}if(e=ph(ps.current),Vg(t)){r=t.stateNode,n=t.type;var a=t.memoizedProps;switch(r[ss]=t,r[ey]=a,e=(t.mode&1)!==0,n){case"dialog":Gn("cancel",r),Gn("close",r);break;case"iframe":case"object":case"embed":Gn("load",r);break;case"video":case"audio":for(i=0;i<F0.length;i++)Gn(F0[i],r);break;case"source":Gn("error",r);break;case"img":case"image":case"link":Gn("error",r),Gn("load",r);break;case"details":Gn("toggle",r);break;case"input":OX(r,a),Gn("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!a.multiple},Gn("invalid",r);break;case"textarea":BX(r,a),Gn("invalid",r)}f$(n,a),i=null;for(var o in a)if(a.hasOwnProperty(o)){var s=a[o];o==="children"?typeof s=="string"?r.textContent!==s&&(a.suppressHydrationWarning!==!0&&Hg(r.textContent,s,e),i=["children",s]):typeof s=="number"&&r.textContent!==""+s&&(a.suppressHydrationWarning!==!0&&Hg(r.textContent,s,e),i=["children",""+s]):Up.hasOwnProperty(o)&&s!=null&&o==="onScroll"&&Gn("scroll",r)}switch(n){case"input":jg(r),FX(r,a,!0);break;case"textarea":jg(r),HX(r);break;case"select":case"option":break;default:typeof a.onClick=="function"&&(r.onclick=LT)}r=i,t.updateQueue=r,r!==null&&(t.flags|=4)}else{o=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=dce(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=o.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[ss]=t,e[ey]=r,Tle(e,t,!1,!1),t.stateNode=e;e:{switch(o=p$(n,r),n){case"dialog":Gn("cancel",e),Gn("close",e),i=r;break;case"iframe":case"object":case"embed":Gn("load",e),i=r;break;case"video":case"audio":for(i=0;i<F0.length;i++)Gn(F0[i],e);i=r;break;case"source":Gn("error",e),i=r;break;case"img":case"image":case"link":Gn("error",e),Gn("load",e),i=r;break;case"details":Gn("toggle",e),i=r;break;case"input":OX(e,r),i=c$(e,r),Gn("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=fr({},r,{value:void 0}),Gn("invalid",e);break;case"textarea":BX(e,r),i=d$(e,r),Gn("invalid",e);break;default:i=r}f$(n,i),s=i;for(a in s)if(s.hasOwnProperty(a)){var c=s[a];a==="style"?pce(e,c):a==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,c!=null&&hce(e,c)):a==="children"?typeof c=="string"?(n!=="textarea"||c!=="")&&$p(e,c):typeof c=="number"&&$p(e,""+c):a!=="suppressContentEditableWarning"&&a!=="suppressHydrationWarning"&&a!=="autoFocus"&&(Up.hasOwnProperty(a)?c!=null&&a==="onScroll"&&Gn("scroll",e):c!=null&&vG(e,a,c,o))}switch(n){case"input":jg(e),FX(e,r,!1);break;case"textarea":jg(e),HX(e);break;case"option":r.value!=null&&e.setAttribute("value",""+nl(r.value));break;case"select":e.multiple=!!r.multiple,a=r.value,a!=null?H2(e,!!r.multiple,a,!1):r.defaultValue!=null&&H2(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=LT)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Li(t),null;case 6:if(e&&t.stateNode!=null)qle(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(Je(166));if(n=ph(ny.current),ph(ps.current),Vg(t)){if(r=t.stateNode,n=t.memoizedProps,r[ss]=t,(a=r.nodeValue!==n)&&(e=za,e!==null))switch(e.tag){case 3:Hg(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Hg(r.nodeValue,n,(e.mode&1)!==0)}a&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[ss]=t,t.stateNode=r}return Li(t),null;case 13:if(Zn(ur),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(tr&&Da!==null&&t.mode&1&&!(t.flags&128))tle(),ff(),t.flags|=98560,a=!1;else if(a=Vg(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(Je(318));if(a=t.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(Je(317));a[ss]=t}else ff(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Li(t),a=!1}else _o!==null&&(K$(_o),_o=null),a=!0;if(!a)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||ur.current&1?Jr===0&&(Jr=3):eK())),t.updateQueue!==null&&(t.flags|=4),Li(t),null);case 4:return yf(),F$(e,t),e===null&&Jp(t.stateNode.containerInfo),Li(t),null;case 10:return qG(t.type._context),Li(t),null;case 17:return la(t.type)&&IT(),Li(t),null;case 19:if(Zn(ur),a=t.memoizedState,a===null)return Li(t),null;if(r=(t.flags&128)!==0,o=a.rendering,o===null)if(r)M0(a,!1);else{if(Jr!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=jT(e),o!==null){for(t.flags|=128,M0(a,!1),r=o.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)a=n,e=r,a.flags&=14680066,o=a.alternate,o===null?(a.childLanes=0,a.lanes=e,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=o.childLanes,a.lanes=o.lanes,a.child=o.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=o.memoizedProps,a.memoizedState=o.memoizedState,a.updateQueue=o.updateQueue,a.type=o.type,e=o.dependencies,a.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Bn(ur,ur.current&1|2),t.child}e=e.sibling}a.tail!==null&&_r()>mf&&(t.flags|=128,r=!0,M0(a,!1),t.lanes=4194304)}else{if(!r)if(e=jT(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),M0(a,!0),a.tail===null&&a.tailMode==="hidden"&&!o.alternate&&!tr)return Li(t),null}else 2*_r()-a.renderingStartTime>mf&&n!==1073741824&&(t.flags|=128,r=!0,M0(a,!1),t.lanes=4194304);a.isBackwards?(o.sibling=t.child,t.child=o):(n=a.last,n!==null?n.sibling=o:t.child=o,a.last=o)}return a.tail!==null?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=_r(),t.sibling=null,n=ur.current,Bn(ur,r?n&1|2:n&1),t):(Li(t),null);case 22:case 23:return QG(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Na&1073741824&&(Li(t),t.subtreeFlags&6&&(t.flags|=8192)):Li(t),null;case 24:return null;case 25:return null}throw Error(Je(156,t.tag))}function rve(e,t){switch(RG(t),t.tag){case 1:return la(t.type)&&IT(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return yf(),Zn(ca),Zn(Ri),HG(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return BG(t),null;case 13:if(Zn(ur),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Je(340));ff()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Zn(ur),null;case 4:return yf(),null;case 10:return qG(t.type._context),null;case 22:case 23:return QG(),null;case 24:return null;default:return null}}var Wg=!1,Pi=!1,ive=typeof WeakSet=="function"?WeakSet:Set,yt=null;function D2(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){wr(e,t,r)}else n.current=null}function B$(e,t,n){try{n()}catch(r){wr(e,t,r)}}var PY=!1;function ave(e,t){if(S$=MT,e=Hce(),PG(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,a=r.focusNode;r=r.focusOffset;try{n.nodeType,a.nodeType}catch{n=null;break e}var o=0,s=-1,c=-1,l=0,u=0,d=e,f=null;t:for(;;){for(var h;d!==n||i!==0&&d.nodeType!==3||(s=o+i),d!==a||r!==0&&d.nodeType!==3||(c=o+r),d.nodeType===3&&(o+=d.nodeValue.length),(h=d.firstChild)!==null;)f=d,d=h;for(;;){if(d===e)break t;if(f===n&&++l===i&&(s=o),f===a&&++u===r&&(c=o),(h=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=h}n=s===-1||c===-1?null:{start:s,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(C$={focusedElem:e,selectionRange:n},MT=!1,yt=t;yt!==null;)if(t=yt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,yt=e;else for(;yt!==null;){t=yt;try{var y=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var v=y.memoizedProps,k=y.memoizedState,g=t.stateNode,S=g.getSnapshotBeforeUpdate(t.elementType===t.type?v:Lo(t.type,v),k);g.__reactInternalSnapshotBeforeUpdate=S}break;case 3:var w=t.stateNode.containerInfo;w.nodeType===1?w.textContent="":w.nodeType===9&&w.documentElement&&w.removeChild(w.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Je(163))}}catch(C){wr(t,t.return,C)}if(e=t.sibling,e!==null){e.return=t.return,yt=e;break}yt=t.return}return y=PY,PY=!1,y}function rp(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var a=i.destroy;i.destroy=void 0,a!==void 0&&B$(t,n,a)}i=i.next}while(i!==r)}}function jD(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function H$(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function zle(e){var t=e.alternate;t!==null&&(e.alternate=null,zle(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[ss],delete t[ey],delete t[A$],delete t[B5e],delete t[H5e])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Ole(e){return e.tag===5||e.tag===3||e.tag===4}function NY(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Ole(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function V$(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=LT));else if(r!==4&&(e=e.child,e!==null))for(V$(e,t,n),e=e.sibling;e!==null;)V$(e,t,n),e=e.sibling}function U$(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(U$(e,t,n),e=e.sibling;e!==null;)U$(e,t,n),e=e.sibling}var fi=null,Io=!1;function Mc(e,t,n){for(n=n.child;n!==null;)Fle(e,t,n),n=n.sibling}function Fle(e,t,n){if(fs&&typeof fs.onCommitFiberUnmount=="function")try{fs.onCommitFiberUnmount(LD,n)}catch{}switch(n.tag){case 5:Pi||D2(n,t);case 6:var r=fi,i=Io;fi=null,Mc(e,t,n),fi=r,Io=i,fi!==null&&(Io?(e=fi,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):fi.removeChild(n.stateNode));break;case 18:fi!==null&&(Io?(e=fi,n=n.stateNode,e.nodeType===8?jz(e.parentNode,n):e.nodeType===1&&jz(e,n),Zp(e)):jz(fi,n.stateNode));break;case 4:r=fi,i=Io,fi=n.stateNode.containerInfo,Io=!0,Mc(e,t,n),fi=r,Io=i;break;case 0:case 11:case 14:case 15:if(!Pi&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var a=i,o=a.destroy;a=a.tag,o!==void 0&&(a&2||a&4)&&B$(n,t,o),i=i.next}while(i!==r)}Mc(e,t,n);break;case 1:if(!Pi&&(D2(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){wr(n,t,s)}Mc(e,t,n);break;case 21:Mc(e,t,n);break;case 22:n.mode&1?(Pi=(r=Pi)||n.memoizedState!==null,Mc(e,t,n),Pi=r):Mc(e,t,n);break;default:Mc(e,t,n)}}function RY(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new ive),t.forEach(function(r){var i=pve.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function bo(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var a=e,o=t,s=o;e:for(;s!==null;){switch(s.tag){case 5:fi=s.stateNode,Io=!1;break e;case 3:fi=s.stateNode.containerInfo,Io=!0;break e;case 4:fi=s.stateNode.containerInfo,Io=!0;break e}s=s.return}if(fi===null)throw Error(Je(160));Fle(a,o,i),fi=null,Io=!1;var c=i.alternate;c!==null&&(c.return=null),i.return=null}catch(l){wr(i,t,l)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Ble(t,e),t=t.sibling}function Ble(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(bo(t,e),Xo(e),r&4){try{rp(3,e,e.return),jD(3,e)}catch(v){wr(e,e.return,v)}try{rp(5,e,e.return)}catch(v){wr(e,e.return,v)}}break;case 1:bo(t,e),Xo(e),r&512&&n!==null&&D2(n,n.return);break;case 5:if(bo(t,e),Xo(e),r&512&&n!==null&&D2(n,n.return),e.flags&32){var i=e.stateNode;try{$p(i,"")}catch(v){wr(e,e.return,v)}}if(r&4&&(i=e.stateNode,i!=null)){var a=e.memoizedProps,o=n!==null?n.memoizedProps:a,s=e.type,c=e.updateQueue;if(e.updateQueue=null,c!==null)try{s==="input"&&a.type==="radio"&&a.name!=null&&lce(i,a),p$(s,o);var l=p$(s,a);for(o=0;o<c.length;o+=2){var u=c[o],d=c[o+1];u==="style"?pce(i,d):u==="dangerouslySetInnerHTML"?hce(i,d):u==="children"?$p(i,d):vG(i,u,d,l)}switch(s){case"input":l$(i,a);break;case"textarea":uce(i,a);break;case"select":var f=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!a.multiple;var h=a.value;h!=null?H2(i,!!a.multiple,h,!1):f!==!!a.multiple&&(a.defaultValue!=null?H2(i,!!a.multiple,a.defaultValue,!0):H2(i,!!a.multiple,a.multiple?[]:"",!1))}i[ey]=a}catch(v){wr(e,e.return,v)}}break;case 6:if(bo(t,e),Xo(e),r&4){if(e.stateNode===null)throw Error(Je(162));i=e.stateNode,a=e.memoizedProps;try{i.nodeValue=a}catch(v){wr(e,e.return,v)}}break;case 3:if(bo(t,e),Xo(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Zp(t.containerInfo)}catch(v){wr(e,e.return,v)}break;case 4:bo(t,e),Xo(e);break;case 13:bo(t,e),Xo(e),i=e.child,i.flags&8192&&(a=i.memoizedState!==null,i.stateNode.isHidden=a,!a||i.alternate!==null&&i.alternate.memoizedState!==null||(YG=_r())),r&4&&RY(e);break;case 22:if(u=n!==null&&n.memoizedState!==null,e.mode&1?(Pi=(l=Pi)||u,bo(t,e),Pi=l):bo(t,e),Xo(e),r&8192){if(l=e.memoizedState!==null,(e.stateNode.isHidden=l)&&!u&&e.mode&1)for(yt=e,u=e.child;u!==null;){for(d=yt=u;yt!==null;){switch(f=yt,h=f.child,f.tag){case 0:case 11:case 14:case 15:rp(4,f,f.return);break;case 1:D2(f,f.return);var y=f.stateNode;if(typeof y.componentWillUnmount=="function"){r=f,n=f.return;try{t=r,y.props=t.memoizedProps,y.state=t.memoizedState,y.componentWillUnmount()}catch(v){wr(r,n,v)}}break;case 5:D2(f,f.return);break;case 22:if(f.memoizedState!==null){TY(d);continue}}h!==null?(h.return=f,yt=h):TY(d)}u=u.sibling}e:for(u=null,d=e;;){if(d.tag===5){if(u===null){u=d;try{i=d.stateNode,l?(a=i.style,typeof a.setProperty=="function"?a.setProperty("display","none","important"):a.display="none"):(s=d.stateNode,c=d.memoizedProps.style,o=c!=null&&c.hasOwnProperty("display")?c.display:null,s.style.display=fce("display",o))}catch(v){wr(e,e.return,v)}}}else if(d.tag===6){if(u===null)try{d.stateNode.nodeValue=l?"":d.memoizedProps}catch(v){wr(e,e.return,v)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===e)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;d.sibling===null;){if(d.return===null||d.return===e)break e;u===d&&(u=null),d=d.return}u===d&&(u=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:bo(t,e),Xo(e),r&4&&RY(e);break;case 21:break;default:bo(t,e),Xo(e)}}function Xo(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Ole(n)){var r=n;break e}n=n.return}throw Error(Je(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&($p(i,""),r.flags&=-33);var a=NY(e);U$(e,a,i);break;case 3:case 4:var o=r.stateNode.containerInfo,s=NY(e);V$(e,s,o);break;default:throw Error(Je(161))}}catch(c){wr(e,e.return,c)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function ove(e,t,n){yt=e,Hle(e)}function Hle(e,t,n){for(var r=(e.mode&1)!==0;yt!==null;){var i=yt,a=i.child;if(i.tag===22&&r){var o=i.memoizedState!==null||Wg;if(!o){var s=i.alternate,c=s!==null&&s.memoizedState!==null||Pi;s=Wg;var l=Pi;if(Wg=o,(Pi=c)&&!l)for(yt=i;yt!==null;)o=yt,c=o.child,o.tag===22&&o.memoizedState!==null?DY(i):c!==null?(c.return=o,yt=c):DY(i);for(;a!==null;)yt=a,Hle(a),a=a.sibling;yt=i,Wg=s,Pi=l}jY(e)}else i.subtreeFlags&8772&&a!==null?(a.return=i,yt=a):jY(e)}}function jY(e){for(;yt!==null;){var t=yt;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Pi||jD(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Pi)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:Lo(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var a=t.updateQueue;a!==null&&vY(t,a,r);break;case 3:var o=t.updateQueue;if(o!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}vY(t,o,n)}break;case 5:var s=t.stateNode;if(n===null&&t.flags&4){n=s;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&n.focus();break;case"img":c.src&&(n.src=c.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var l=t.alternate;if(l!==null){var u=l.memoizedState;if(u!==null){var d=u.dehydrated;d!==null&&Zp(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(Je(163))}Pi||t.flags&512&&H$(t)}catch(f){wr(t,t.return,f)}}if(t===e){yt=null;break}if(n=t.sibling,n!==null){n.return=t.return,yt=n;break}yt=t.return}}function TY(e){for(;yt!==null;){var t=yt;if(t===e){yt=null;break}var n=t.sibling;if(n!==null){n.return=t.return,yt=n;break}yt=t.return}}function DY(e){for(;yt!==null;){var t=yt;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{jD(4,t)}catch(c){wr(t,n,c)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(c){wr(t,i,c)}}var a=t.return;try{H$(t)}catch(c){wr(t,a,c)}break;case 5:var o=t.return;try{H$(t)}catch(c){wr(t,o,c)}}}catch(c){wr(t,t.return,c)}if(t===e){yt=null;break}var s=t.sibling;if(s!==null){s.return=t.return,yt=s;break}yt=t.return}}var sve=Math.ceil,qT=ac.ReactCurrentDispatcher,ZG=ac.ReactCurrentOwner,io=ac.ReactCurrentBatchConfig,hn=0,si=null,Vr=null,pi=0,Na=0,q2=hl(0),Jr=0,oy=null,Ch=0,TD=0,XG=0,ip=null,aa=null,YG=0,mf=1/0,Hs=null,zT=!1,$$=null,Zc=null,Gg=!1,Hc=null,OT=0,ap=0,W$=null,Hm=-1,Vm=0;function Gi(){return hn&6?_r():Hm!==-1?Hm:Hm=_r()}function Xc(e){return e.mode&1?hn&2&&pi!==0?pi&-pi:U5e.transition!==null?(Vm===0&&(Vm=Lce()),Vm):(e=xn,e!==0||(e=window.event,e=e===void 0?16:Rce(e.type)),e):1}function jo(e,t,n,r){if(50<ap)throw ap=0,W$=null,Error(Je(185));Iy(e,n,r),(!(hn&2)||e!==si)&&(e===si&&(!(hn&2)&&(TD|=n),Jr===4&&qc(e,pi)),ua(e,r),n===1&&hn===0&&!(t.mode&1)&&(mf=_r()+500,PD&&fl()))}function ua(e,t){var n=e.callbackNode;Ume(e,t);var r=bT(e,e===si?pi:0);if(r===0)n!==null&&$X(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&$X(n),t===1)e.tag===0?V5e(qY.bind(null,e)):Jce(qY.bind(null,e)),O5e(function(){!(hn&6)&&fl()}),n=null;else{switch(Ice(r)){case 1:n=MG;break;case 4:n=Sce;break;case 16:n=wT;break;case 536870912:n=Cce;break;default:n=wT}n=Xle(n,Vle.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Vle(e,t){if(Hm=-1,Vm=0,hn&6)throw Error(Je(327));var n=e.callbackNode;if(G2()&&e.callbackNode!==n)return null;var r=bT(e,e===si?pi:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=FT(e,r);else{t=r;var i=hn;hn|=2;var a=$le();(si!==e||pi!==t)&&(Hs=null,mf=_r()+500,mh(e,t));do try{uve();break}catch(s){Ule(e,s)}while(!0);DG(),qT.current=a,hn=i,Vr!==null?t=0:(si=null,pi=0,t=Jr)}if(t!==0){if(t===2&&(i=k$(e),i!==0&&(r=i,t=G$(e,i))),t===1)throw n=oy,mh(e,0),qc(e,r),ua(e,_r()),n;if(t===6)qc(e,r);else{if(i=e.current.alternate,!(r&30)&&!cve(i)&&(t=FT(e,r),t===2&&(a=k$(e),a!==0&&(r=a,t=G$(e,a))),t===1))throw n=oy,mh(e,0),qc(e,r),ua(e,_r()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(Je(345));case 2:Tl(e,aa,Hs);break;case 3:if(qc(e,r),(r&130023424)===r&&(t=YG+500-_r(),10<t)){if(bT(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){Gi(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=I$(Tl.bind(null,e,aa,Hs),t);break}Tl(e,aa,Hs);break;case 4:if(qc(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var o=31-Ro(r);a=1<<o,o=t[o],o>i&&(i=o),r&=~a}if(r=i,r=_r()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*sve(r/1960))-r,10<r){e.timeoutHandle=I$(Tl.bind(null,e,aa,Hs),r);break}Tl(e,aa,Hs);break;case 5:Tl(e,aa,Hs);break;default:throw Error(Je(329))}}}return ua(e,_r()),e.callbackNode===n?Vle.bind(null,e):null}function G$(e,t){var n=ip;return e.current.memoizedState.isDehydrated&&(mh(e,t).flags|=256),e=FT(e,t),e!==2&&(t=aa,aa=n,t!==null&&K$(t)),e}function K$(e){aa===null?aa=e:aa.push.apply(aa,e)}function cve(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!Do(a(),i))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function qc(e,t){for(t&=~XG,t&=~TD,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Ro(t),r=1<<n;e[n]=-1,t&=~r}}function qY(e){if(hn&6)throw Error(Je(327));G2();var t=bT(e,0);if(!(t&1))return ua(e,_r()),null;var n=FT(e,t);if(e.tag!==0&&n===2){var r=k$(e);r!==0&&(t=r,n=G$(e,r))}if(n===1)throw n=oy,mh(e,0),qc(e,t),ua(e,_r()),n;if(n===6)throw Error(Je(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Tl(e,aa,Hs),ua(e,_r()),null}function JG(e,t){var n=hn;hn|=1;try{return e(t)}finally{hn=n,hn===0&&(mf=_r()+500,PD&&fl())}}function Lh(e){Hc!==null&&Hc.tag===0&&!(hn&6)&&G2();var t=hn;hn|=1;var n=io.transition,r=xn;try{if(io.transition=null,xn=1,e)return e()}finally{xn=r,io.transition=n,hn=t,!(hn&6)&&fl()}}function QG(){Na=q2.current,Zn(q2)}function mh(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,z5e(n)),Vr!==null)for(n=Vr.return;n!==null;){var r=n;switch(RG(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&IT();break;case 3:yf(),Zn(ca),Zn(Ri),HG();break;case 5:BG(r);break;case 4:yf();break;case 13:Zn(ur);break;case 19:Zn(ur);break;case 10:qG(r.type._context);break;case 22:case 23:QG()}n=n.return}if(si=e,Vr=e=Yc(e.current,null),pi=Na=t,Jr=0,oy=null,XG=TD=Ch=0,aa=ip=null,fh!==null){for(t=0;t<fh.length;t++)if(n=fh[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,a=n.pending;if(a!==null){var o=a.next;a.next=i,r.next=o}n.pending=r}fh=null}return e}function Ule(e,t){do{var n=Vr;try{if(DG(),Om.current=DT,TT){for(var r=hr.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}TT=!1}if(Sh=0,ii=Yr=hr=null,np=!1,ry=0,ZG.current=null,n===null||n.return===null){Jr=1,oy=t,Vr=null;break}e:{var a=e,o=n.return,s=n,c=t;if(t=pi,s.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){var l=c,u=s,d=u.tag;if(!(u.mode&1)&&(d===0||d===11||d===15)){var f=u.alternate;f?(u.updateQueue=f.updateQueue,u.memoizedState=f.memoizedState,u.lanes=f.lanes):(u.updateQueue=null,u.memoizedState=null)}var h=SY(o);if(h!==null){h.flags&=-257,CY(h,o,s,a,t),h.mode&1&&MY(a,l,t),t=h,c=l;var y=t.updateQueue;if(y===null){var v=new Set;v.add(c),t.updateQueue=v}else y.add(c);break e}else{if(!(t&1)){MY(a,l,t),eK();break e}c=Error(Je(426))}}else if(tr&&s.mode&1){var k=SY(o);if(k!==null){!(k.flags&65536)&&(k.flags|=256),CY(k,o,s,a,t),jG(gf(c,s));break e}}a=c=gf(c,s),Jr!==4&&(Jr=2),ip===null?ip=[a]:ip.push(a),a=o;do{switch(a.tag){case 3:a.flags|=65536,t&=-t,a.lanes|=t;var g=Ile(a,c,t);mY(a,g);break e;case 1:s=c;var S=a.type,w=a.stateNode;if(!(a.flags&128)&&(typeof S.getDerivedStateFromError=="function"||w!==null&&typeof w.componentDidCatch=="function"&&(Zc===null||!Zc.has(w)))){a.flags|=65536,t&=-t,a.lanes|=t;var C=Ale(a,s,t);mY(a,C);break e}}a=a.return}while(a!==null)}Gle(n)}catch(_){t=_,Vr===n&&n!==null&&(Vr=n=n.return);continue}break}while(!0)}function $le(){var e=qT.current;return qT.current=DT,e===null?DT:e}function eK(){(Jr===0||Jr===3||Jr===2)&&(Jr=4),si===null||!(Ch&268435455)&&!(TD&268435455)||qc(si,pi)}function FT(e,t){var n=hn;hn|=2;var r=$le();(si!==e||pi!==t)&&(Hs=null,mh(e,t));do try{lve();break}catch(i){Ule(e,i)}while(!0);if(DG(),hn=n,qT.current=r,Vr!==null)throw Error(Je(261));return si=null,pi=0,Jr}function lve(){for(;Vr!==null;)Wle(Vr)}function uve(){for(;Vr!==null&&!Tme();)Wle(Vr)}function Wle(e){var t=Zle(e.alternate,e,Na);e.memoizedProps=e.pendingProps,t===null?Gle(e):Vr=t,ZG.current=null}function Gle(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=rve(n,t),n!==null){n.flags&=32767,Vr=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Jr=6,Vr=null;return}}else if(n=nve(n,t,Na),n!==null){Vr=n;return}if(t=t.sibling,t!==null){Vr=t;return}Vr=t=e}while(t!==null);Jr===0&&(Jr=5)}function Tl(e,t,n){var r=xn,i=io.transition;try{io.transition=null,xn=1,dve(e,t,n,r)}finally{io.transition=i,xn=r}return null}function dve(e,t,n,r){do G2();while(Hc!==null);if(hn&6)throw Error(Je(327));n=e.finishedWork;var i=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(Je(177));e.callbackNode=null,e.callbackPriority=0;var a=n.lanes|n.childLanes;if($me(e,a),e===si&&(Vr=si=null,pi=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Gg||(Gg=!0,Xle(wT,function(){return G2(),null})),a=(n.flags&15990)!==0,n.subtreeFlags&15990||a){a=io.transition,io.transition=null;var o=xn;xn=1;var s=hn;hn|=4,ZG.current=null,ave(e,n),Ble(n,e),P5e(C$),MT=!!S$,C$=S$=null,e.current=n,ove(n),Dme(),hn=s,xn=o,io.transition=a}else e.current=n;if(Gg&&(Gg=!1,Hc=e,OT=i),a=e.pendingLanes,a===0&&(Zc=null),Ome(n.stateNode),ua(e,_r()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(zT)throw zT=!1,e=$$,$$=null,e;return OT&1&&e.tag!==0&&G2(),a=e.pendingLanes,a&1?e===W$?ap++:(ap=0,W$=e):ap=0,fl(),null}function G2(){if(Hc!==null){var e=Ice(OT),t=io.transition,n=xn;try{if(io.transition=null,xn=16>e?16:e,Hc===null)var r=!1;else{if(e=Hc,Hc=null,OT=0,hn&6)throw Error(Je(331));var i=hn;for(hn|=4,yt=e.current;yt!==null;){var a=yt,o=a.child;if(yt.flags&16){var s=a.deletions;if(s!==null){for(var c=0;c<s.length;c++){var l=s[c];for(yt=l;yt!==null;){var u=yt;switch(u.tag){case 0:case 11:case 15:rp(8,u,a)}var d=u.child;if(d!==null)d.return=u,yt=d;else for(;yt!==null;){u=yt;var f=u.sibling,h=u.return;if(zle(u),u===l){yt=null;break}if(f!==null){f.return=h,yt=f;break}yt=h}}}var y=a.alternate;if(y!==null){var v=y.child;if(v!==null){y.child=null;do{var k=v.sibling;v.sibling=null,v=k}while(v!==null)}}yt=a}}if(a.subtreeFlags&2064&&o!==null)o.return=a,yt=o;else e:for(;yt!==null;){if(a=yt,a.flags&2048)switch(a.tag){case 0:case 11:case 15:rp(9,a,a.return)}var g=a.sibling;if(g!==null){g.return=a.return,yt=g;break e}yt=a.return}}var S=e.current;for(yt=S;yt!==null;){o=yt;var w=o.child;if(o.subtreeFlags&2064&&w!==null)w.return=o,yt=w;else e:for(o=S;yt!==null;){if(s=yt,s.flags&2048)try{switch(s.tag){case 0:case 11:case 15:jD(9,s)}}catch(_){wr(s,s.return,_)}if(s===o){yt=null;break e}var C=s.sibling;if(C!==null){C.return=s.return,yt=C;break e}yt=s.return}}if(hn=i,fl(),fs&&typeof fs.onPostCommitFiberRoot=="function")try{fs.onPostCommitFiberRoot(LD,e)}catch{}r=!0}return r}finally{xn=n,io.transition=t}}return!1}function zY(e,t,n){t=gf(n,t),t=Ile(e,t,1),e=Kc(e,t,1),t=Gi(),e!==null&&(Iy(e,1,t),ua(e,t))}function wr(e,t,n){if(e.tag===3)zY(e,e,n);else for(;t!==null;){if(t.tag===3){zY(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Zc===null||!Zc.has(r))){e=gf(n,e),e=Ale(t,e,1),t=Kc(t,e,1),e=Gi(),t!==null&&(Iy(t,1,e),ua(t,e));break}}t=t.return}}function hve(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Gi(),e.pingedLanes|=e.suspendedLanes&n,si===e&&(pi&n)===n&&(Jr===4||Jr===3&&(pi&130023424)===pi&&500>_r()-YG?mh(e,0):XG|=n),ua(e,t)}function Kle(e,t){t===0&&(e.mode&1?(t=qg,qg<<=1,!(qg&130023424)&&(qg=4194304)):t=1);var n=Gi();e=Qs(e,t),e!==null&&(Iy(e,t,n),ua(e,n))}function fve(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Kle(e,n)}function pve(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(Je(314))}r!==null&&r.delete(t),Kle(e,n)}var Zle;Zle=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||ca.current)oa=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return oa=!1,tve(e,t,n);oa=!!(e.flags&131072)}else oa=!1,tr&&t.flags&1048576&&Qce(t,ET,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Bm(e,t),e=t.pendingProps;var i=hf(t,Ri.current);W2(t,n),i=UG(null,t,r,e,i,n);var a=$G();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,la(r)?(a=!0,AT(t)):a=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,OG(t),i.updater=RD,t.stateNode=i,i._reactInternals=t,j$(t,r,e,n),t=q$(null,t,r,!0,a,n)):(t.tag=0,tr&&a&&NG(t),$i(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Bm(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=gve(r),e=Lo(r,e),i){case 0:t=D$(null,t,r,e,n);break e;case 1:t=AY(null,t,r,e,n);break e;case 11:t=LY(null,t,r,e,n);break e;case 14:t=IY(null,t,r,Lo(r.type,e),n);break e}throw Error(Je(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Lo(r,i),D$(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Lo(r,i),AY(e,t,r,i,n);case 3:e:{if(Nle(t),e===null)throw Error(Je(387));r=t.pendingProps,a=t.memoizedState,i=a.element,ale(e,t),RT(t,r,null,n);var o=t.memoizedState;if(r=o.element,a.isDehydrated)if(a={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){i=gf(Error(Je(423)),t),t=_Y(e,t,r,n,i);break e}else if(r!==i){i=gf(Error(Je(424)),t),t=_Y(e,t,r,n,i);break e}else for(Da=Gc(t.stateNode.containerInfo.firstChild),za=t,tr=!0,_o=null,n=rle(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(ff(),r===i){t=ec(e,t,n);break e}$i(e,t,r,n)}t=t.child}return t;case 5:return ole(t),e===null&&P$(t),r=t.type,i=t.pendingProps,a=e!==null?e.memoizedProps:null,o=i.children,L$(r,i)?o=null:a!==null&&L$(r,a)&&(t.flags|=32),Ple(e,t),$i(e,t,o,n),t.child;case 6:return e===null&&P$(t),null;case 13:return Rle(e,t,n);case 4:return FG(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=pf(t,null,r,n):$i(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Lo(r,i),LY(e,t,r,i,n);case 7:return $i(e,t,t.pendingProps,n),t.child;case 8:return $i(e,t,t.pendingProps.children,n),t.child;case 12:return $i(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,a=t.memoizedProps,o=i.value,Bn(PT,r._currentValue),r._currentValue=o,a!==null)if(Do(a.value,o)){if(a.children===i.children&&!ca.current){t=ec(e,t,n);break e}}else for(a=t.child,a!==null&&(a.return=t);a!==null;){var s=a.dependencies;if(s!==null){o=a.child;for(var c=s.firstContext;c!==null;){if(c.context===r){if(a.tag===1){c=Xs(-1,n&-n),c.tag=2;var l=a.updateQueue;if(l!==null){l=l.shared;var u=l.pending;u===null?c.next=c:(c.next=u.next,u.next=c),l.pending=c}}a.lanes|=n,c=a.alternate,c!==null&&(c.lanes|=n),N$(a.return,n,t),s.lanes|=n;break}c=c.next}}else if(a.tag===10)o=a.type===t.type?null:a.child;else if(a.tag===18){if(o=a.return,o===null)throw Error(Je(341));o.lanes|=n,s=o.alternate,s!==null&&(s.lanes|=n),N$(o,n,t),o=a.sibling}else o=a.child;if(o!==null)o.return=a;else for(o=a;o!==null;){if(o===t){o=null;break}if(a=o.sibling,a!==null){a.return=o.return,o=a;break}o=o.return}a=o}$i(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,W2(t,n),i=oo(i),r=r(i),t.flags|=1,$i(e,t,r,n),t.child;case 14:return r=t.type,i=Lo(r,t.pendingProps),i=Lo(r.type,i),IY(e,t,r,i,n);case 15:return _le(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Lo(r,i),Bm(e,t),t.tag=1,la(r)?(e=!0,AT(t)):e=!1,W2(t,n),Lle(t,r,i),j$(t,r,i,n),q$(null,t,r,!0,e,n);case 19:return jle(e,t,n);case 22:return Ele(e,t,n)}throw Error(Je(156,t.tag))};function Xle(e,t){return Mce(e,t)}function yve(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ro(e,t,n,r){return new yve(e,t,n,r)}function tK(e){return e=e.prototype,!(!e||!e.isReactComponent)}function gve(e){if(typeof e=="function")return tK(e)?1:0;if(e!=null){if(e=e.$$typeof,e===xG)return 11;if(e===wG)return 14}return 2}function Yc(e,t){var n=e.alternate;return n===null?(n=ro(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Um(e,t,n,r,i,a){var o=2;if(r=e,typeof e=="function")tK(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case I2:return vh(n.children,i,a,t);case kG:o=8,i|=8;break;case i$:return e=ro(12,n,t,i|2),e.elementType=i$,e.lanes=a,e;case a$:return e=ro(13,n,t,i),e.elementType=a$,e.lanes=a,e;case o$:return e=ro(19,n,t,i),e.elementType=o$,e.lanes=a,e;case oce:return DD(n,i,a,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case ice:o=10;break e;case ace:o=9;break e;case xG:o=11;break e;case wG:o=14;break e;case Rc:o=16,r=null;break e}throw Error(Je(130,e==null?e:typeof e,""))}return t=ro(o,n,t,i),t.elementType=e,t.type=r,t.lanes=a,t}function vh(e,t,n,r){return e=ro(7,e,r,t),e.lanes=n,e}function DD(e,t,n,r){return e=ro(22,e,r,t),e.elementType=oce,e.lanes=n,e.stateNode={isHidden:!1},e}function Hz(e,t,n){return e=ro(6,e,null,t),e.lanes=n,e}function Vz(e,t,n){return t=ro(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function mve(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Mz(0),this.expirationTimes=Mz(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Mz(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function nK(e,t,n,r,i,a,o,s,c){return e=new mve(e,t,n,s,c),t===1?(t=1,a===!0&&(t|=8)):t=0,a=ro(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},OG(a),e}function vve(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:L2,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Yle(e){if(!e)return rl;e=e._reactInternals;e:{if(Oh(e)!==e||e.tag!==1)throw Error(Je(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(la(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(Je(171))}if(e.tag===1){var n=e.type;if(la(n))return Yce(e,n,t)}return t}function Jle(e,t,n,r,i,a,o,s,c){return e=nK(n,r,!0,e,i,a,o,s,c),e.context=Yle(null),n=e.current,r=Gi(),i=Xc(n),a=Xs(r,i),a.callback=t??null,Kc(n,a,i),e.current.lanes=i,Iy(e,i,r),ua(e,r),e}function qD(e,t,n,r){var i=t.current,a=Gi(),o=Xc(i);return n=Yle(n),t.context===null?t.context=n:t.pendingContext=n,t=Xs(a,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Kc(i,t,o),e!==null&&(jo(e,i,o,a),zm(e,i,o)),o}function BT(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function OY(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function rK(e,t){OY(e,t),(e=e.alternate)&&OY(e,t)}function kve(){return null}var Qle=typeof reportError=="function"?reportError:function(e){console.error(e)};function iK(e){this._internalRoot=e}zD.prototype.render=iK.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(Je(409));qD(e,t,null,null)};zD.prototype.unmount=iK.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Lh(function(){qD(null,e,null,null)}),t[Js]=null}};function zD(e){this._internalRoot=e}zD.prototype.unstable_scheduleHydration=function(e){if(e){var t=Ece();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Dc.length&&t!==0&&t<Dc[n].priority;n++);Dc.splice(n,0,e),n===0&&Nce(e)}};function aK(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function OD(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function FY(){}function xve(e,t,n,r,i){if(i){if(typeof r=="function"){var a=r;r=function(){var l=BT(o);a.call(l)}}var o=Jle(t,r,e,0,null,!1,!1,"",FY);return e._reactRootContainer=o,e[Js]=o.current,Jp(e.nodeType===8?e.parentNode:e),Lh(),o}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var s=r;r=function(){var l=BT(c);s.call(l)}}var c=nK(e,0,!1,null,null,!1,!1,"",FY);return e._reactRootContainer=c,e[Js]=c.current,Jp(e.nodeType===8?e.parentNode:e),Lh(function(){qD(t,c,n,r)}),c}function FD(e,t,n,r,i){var a=n._reactRootContainer;if(a){var o=a;if(typeof i=="function"){var s=i;i=function(){var c=BT(o);s.call(c)}}qD(t,o,e,i)}else o=xve(n,t,e,i,r);return BT(o)}Ace=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=O0(t.pendingLanes);n!==0&&(SG(t,n|1),ua(t,_r()),!(hn&6)&&(mf=_r()+500,fl()))}break;case 13:Lh(function(){var r=Qs(e,1);if(r!==null){var i=Gi();jo(r,e,1,i)}}),rK(e,1)}};CG=function(e){if(e.tag===13){var t=Qs(e,134217728);if(t!==null){var n=Gi();jo(t,e,134217728,n)}rK(e,134217728)}};_ce=function(e){if(e.tag===13){var t=Xc(e),n=Qs(e,t);if(n!==null){var r=Gi();jo(n,e,t,r)}rK(e,t)}};Ece=function(){return xn};Pce=function(e,t){var n=xn;try{return xn=e,t()}finally{xn=n}};g$=function(e,t,n){switch(t){case"input":if(l$(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=ED(r);if(!i)throw Error(Je(90));cce(r),l$(r,i)}}}break;case"textarea":uce(e,n);break;case"select":t=n.value,t!=null&&H2(e,!!n.multiple,t,!1)}};mce=JG;vce=Lh;var wve={usingClientEntryPoint:!1,Events:[_y,P2,ED,yce,gce,JG]},S0={findFiberByHostInstance:hh,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},bve={bundleType:S0.bundleType,version:S0.version,rendererPackageName:S0.rendererPackageName,rendererConfig:S0.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:ac.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=wce(e),e===null?null:e.stateNode},findFiberByHostInstance:S0.findFiberByHostInstance||kve,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Kg=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Kg.isDisabled&&Kg.supportsFiber)try{LD=Kg.inject(bve),fs=Kg}catch{}}Va.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=wve;Va.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!aK(t))throw Error(Je(200));return vve(e,t,null,n)};Va.createRoot=function(e,t){if(!aK(e))throw Error(Je(299));var n=!1,r="",i=Qle;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=nK(e,1,!1,null,null,n,!1,r,i),e[Js]=t.current,Jp(e.nodeType===8?e.parentNode:e),new iK(t)};Va.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(Je(188)):(e=Object.keys(e).join(","),Error(Je(268,e)));return e=wce(t),e=e===null?null:e.stateNode,e};Va.flushSync=function(e){return Lh(e)};Va.hydrate=function(e,t,n){if(!OD(t))throw Error(Je(200));return FD(null,e,t,!0,n)};Va.hydrateRoot=function(e,t,n){if(!aK(e))throw Error(Je(405));var r=n!=null&&n.hydratedSources||null,i=!1,a="",o=Qle;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(a=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=Jle(t,null,e,1,n??null,i,!1,a,o),e[Js]=t.current,Jp(e),r)for(e=0;e<r.length;e++)n=r[e],i=n._getVersion,i=i(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new zD(t)};Va.render=function(e,t,n){if(!OD(t))throw Error(Je(200));return FD(null,e,t,!1,n)};Va.unmountComponentAtNode=function(e){if(!OD(e))throw Error(Je(40));return e._reactRootContainer?(Lh(function(){FD(null,null,e,!1,function(){e._reactRootContainer=null,e[Js]=null})}),!0):!1};Va.unstable_batchedUpdates=JG;Va.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!OD(n))throw Error(Je(200));if(e==null||e._reactInternals===void 0)throw Error(Je(38));return FD(e,t,n,!1,r)};Va.version="18.3.1-next-f1338f8080-20240426";function eue(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(eue)}catch(e){console.error(e)}}eue(),ece.exports=Va;var qf=ece.exports;const Mve=Rf(qf);var BY=qf;n$.createRoot=BY.createRoot,n$.hydrateRoot=BY.hydrateRoot;function HY(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function ms(...e){return t=>{let n=!1;const r=e.map(i=>{const a=HY(i,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let i=0;i<r.length;i++){const a=r[i];typeof a=="function"?a():HY(e[i],null)}}}}function Nn(...e){return M.useCallback(ms(...e),e)}var Sve=Symbol.for("react.lazy"),HT=yG[" use ".trim().toString()];function Cve(e){return typeof e=="object"&&e!==null&&"then"in e}function tue(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===Sve&&"_payload"in e&&Cve(e._payload)}function Lve(e){const t=Ave(e),n=M.forwardRef((r,i)=>{let{children:a,...o}=r;tue(a)&&typeof HT=="function"&&(a=HT(a._payload));const s=M.Children.toArray(a),c=s.find(Eve);if(c){const l=c.props.children,u=s.map(d=>d===c?M.Children.count(l)>1?M.Children.only(null):M.isValidElement(l)?l.props.children:null:d);return x.jsx(t,{...o,ref:i,children:M.isValidElement(l)?M.cloneElement(l,void 0,u):null})}return x.jsx(t,{...o,ref:i,children:a})});return n.displayName=`${e}.Slot`,n}var Ive=Lve("Slot");function Ave(e){const t=M.forwardRef((n,r)=>{let{children:i,...a}=n;if(tue(i)&&typeof HT=="function"&&(i=HT(i._payload)),M.isValidElement(i)){const o=Nve(i),s=Pve(a,i.props);return i.type!==M.Fragment&&(s.ref=r?ms(r,o):o),M.cloneElement(i,s)}return M.Children.count(i)>1?M.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var _ve=Symbol("radix.slottable");function Eve(e){return M.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===_ve}function Pve(e,t){const n={...t};for(const r in t){const i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...s)=>{const c=a(...s);return i(...s),c}:i&&(n[r]=i):r==="style"?n[r]={...i,...a}:r==="className"&&(n[r]=[i,a].filter(Boolean).join(" "))}return{...e,...n}}function Nve(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function nue(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=nue(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function rue(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=nue(e))&&(r&&(r+=" "),r+=t);return r}const VY=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,UY=rue,iue=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return UY(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:i,defaultVariants:a}=t,o=Object.keys(i).map(l=>{const u=n==null?void 0:n[l],d=a==null?void 0:a[l];if(u===null)return null;const f=VY(u)||VY(d);return i[l][f]}),s=n&&Object.entries(n).reduce((l,u)=>{let[d,f]=u;return f===void 0||(l[d]=f),l},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((l,u)=>{let{class:d,className:f,...h}=u;return Object.entries(h).every(y=>{let[v,k]=y;return Array.isArray(k)?k.includes({...a,...s}[v]):{...a,...s}[v]===k})?[...l,d,f]:l},[]);return UY(e,o,c,n==null?void 0:n.class,n==null?void 0:n.className)},oK="-",Rve=e=>{const t=Tve(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:o=>{const s=o.split(oK);return s[0]===""&&s.length!==1&&s.shift(),aue(s,t)||jve(o)},getConflictingClassGroupIds:(o,s)=>{const c=n[o]||[];return s&&r[o]?[...c,...r[o]]:c}}},aue=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),i=r?aue(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;const a=e.join(oK);return(o=t.validators.find(({validator:s})=>s(a)))==null?void 0:o.classGroupId},$Y=/^\[(.+)\]$/,jve=e=>{if($Y.test(e)){const t=$Y.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},Tve=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return qve(Object.entries(e.classGroups),n).forEach(([a,o])=>{Z$(o,r,a,t)}),r},Z$=(e,t,n,r)=>{e.forEach(i=>{if(typeof i=="string"){const a=i===""?t:WY(t,i);a.classGroupId=n;return}if(typeof i=="function"){if(Dve(i)){Z$(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([a,o])=>{Z$(o,WY(t,a),n,r)})})},WY=(e,t)=>{let n=e;return t.split(oK).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},Dve=e=>e.isThemeGetter,qve=(e,t)=>t?e.map(([n,r])=>{const i=r.map(a=>typeof a=="string"?t+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([o,s])=>[t+o,s])):a);return[n,i]}):e,zve=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const i=(a,o)=>{n.set(a,o),t++,t>e&&(t=0,r=n,n=new Map)};return{get(a){let o=n.get(a);if(o!==void 0)return o;if((o=r.get(a))!==void 0)return i(a,o),o},set(a,o){n.has(a)?n.set(a,o):i(a,o)}}},oue="!",Ove=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,i=t[0],a=t.length,o=s=>{const c=[];let l=0,u=0,d;for(let k=0;k<s.length;k++){let g=s[k];if(l===0){if(g===i&&(r||s.slice(k,k+a)===t)){c.push(s.slice(u,k)),u=k+a;continue}if(g==="/"){d=k;continue}}g==="["?l++:g==="]"&&l--}const f=c.length===0?s:s.substring(u),h=f.startsWith(oue),y=h?f.substring(1):f,v=d&&d>u?d-u:void 0;return{modifiers:c,hasImportantModifier:h,baseClassName:y,maybePostfixModifierPosition:v}};return n?s=>n({className:s,parseClassName:o}):o},Fve=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},Bve=e=>({cache:zve(e.cacheSize),parseClassName:Ove(e),...Rve(e)}),Hve=/\s+/,Vve=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i}=t,a=[],o=e.trim().split(Hve);let s="";for(let c=o.length-1;c>=0;c-=1){const l=o[c],{modifiers:u,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:h}=n(l);let y=!!h,v=r(y?f.substring(0,h):f);if(!v){if(!y){s=l+(s.length>0?" "+s:s);continue}if(v=r(f),!v){s=l+(s.length>0?" "+s:s);continue}y=!1}const k=Fve(u).join(":"),g=d?k+oue:k,S=g+v;if(a.includes(S))continue;a.push(S);const w=i(v,y);for(let C=0;C<w.length;++C){const _=w[C];a.push(g+_)}s=l+(s.length>0?" "+s:s)}return s};function Uve(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=sue(t))&&(r&&(r+=" "),r+=n);return r}const sue=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=sue(e[r]))&&(n&&(n+=" "),n+=t);return n};function $ve(e,...t){let n,r,i,a=o;function o(c){const l=t.reduce((u,d)=>d(u),e());return n=Bve(l),r=n.cache.get,i=n.cache.set,a=s,s(c)}function s(c){const l=r(c);if(l)return l;const u=Vve(c,n);return i(c,u),u}return function(){return a(Uve.apply(null,arguments))}}const Wn=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},cue=/^\[(?:([a-z-]+):)?(.+)\]$/i,Wve=/^\d+\/\d+$/,Gve=new Set(["px","full","screen"]),Kve=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Zve=/\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$/,Xve=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Yve=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Jve=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,js=e=>K2(e)||Gve.has(e)||Wve.test(e),Sc=e=>zf(e,"length",oke),K2=e=>!!e&&!Number.isNaN(Number(e)),Uz=e=>zf(e,"number",K2),C0=e=>!!e&&Number.isInteger(Number(e)),Qve=e=>e.endsWith("%")&&K2(e.slice(0,-1)),Kt=e=>cue.test(e),Cc=e=>Kve.test(e),eke=new Set(["length","size","percentage"]),tke=e=>zf(e,eke,lue),nke=e=>zf(e,"position",lue),rke=new Set(["image","url"]),ike=e=>zf(e,rke,cke),ake=e=>zf(e,"",ske),L0=()=>!0,zf=(e,t,n)=>{const r=cue.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},oke=e=>Zve.test(e)&&!Xve.test(e),lue=()=>!1,ske=e=>Yve.test(e),cke=e=>Jve.test(e),lke=()=>{const e=Wn("colors"),t=Wn("spacing"),n=Wn("blur"),r=Wn("brightness"),i=Wn("borderColor"),a=Wn("borderRadius"),o=Wn("borderSpacing"),s=Wn("borderWidth"),c=Wn("contrast"),l=Wn("grayscale"),u=Wn("hueRotate"),d=Wn("invert"),f=Wn("gap"),h=Wn("gradientColorStops"),y=Wn("gradientColorStopPositions"),v=Wn("inset"),k=Wn("margin"),g=Wn("opacity"),S=Wn("padding"),w=Wn("saturate"),C=Wn("scale"),_=Wn("sepia"),A=Wn("skew"),j=Wn("space"),O=Wn("translate"),T=()=>["auto","contain","none"],D=()=>["auto","hidden","clip","visible","scroll"],I=()=>["auto",Kt,t],R=()=>[Kt,t],U=()=>["",js,Sc],q=()=>["auto",K2,Kt],K=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],Z=()=>["solid","dashed","dotted","double","none"],$=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],B=()=>["start","end","center","between","around","evenly","stretch"],V=()=>["","0",Kt],F=()=>["auto","avoid","all","avoid-page","page","left","right","column"],ie=()=>[K2,Kt];return{cacheSize:500,separator:":",theme:{colors:[L0],spacing:[js,Sc],blur:["none","",Cc,Kt],brightness:ie(),borderColor:[e],borderRadius:["none","","full",Cc,Kt],borderSpacing:R(),borderWidth:U(),contrast:ie(),grayscale:V(),hueRotate:ie(),invert:V(),gap:R(),gradientColorStops:[e],gradientColorStopPositions:[Qve,Sc],inset:I(),margin:I(),opacity:ie(),padding:R(),saturate:ie(),scale:ie(),sepia:V(),skew:ie(),space:R(),translate:R()},classGroups:{aspect:[{aspect:["auto","square","video",Kt]}],container:["container"],columns:[{columns:[Cc]}],"break-after":[{"break-after":F()}],"break-before":[{"break-before":F()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...K(),Kt]}],overflow:[{overflow:D()}],"overflow-x":[{"overflow-x":D()}],"overflow-y":[{"overflow-y":D()}],overscroll:[{overscroll:T()}],"overscroll-x":[{"overscroll-x":T()}],"overscroll-y":[{"overscroll-y":T()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[v]}],"inset-x":[{"inset-x":[v]}],"inset-y":[{"inset-y":[v]}],start:[{start:[v]}],end:[{end:[v]}],top:[{top:[v]}],right:[{right:[v]}],bottom:[{bottom:[v]}],left:[{left:[v]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",C0,Kt]}],basis:[{basis:I()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Kt]}],grow:[{grow:V()}],shrink:[{shrink:V()}],order:[{order:["first","last","none",C0,Kt]}],"grid-cols":[{"grid-cols":[L0]}],"col-start-end":[{col:["auto",{span:["full",C0,Kt]},Kt]}],"col-start":[{"col-start":q()}],"col-end":[{"col-end":q()}],"grid-rows":[{"grid-rows":[L0]}],"row-start-end":[{row:["auto",{span:[C0,Kt]},Kt]}],"row-start":[{"row-start":q()}],"row-end":[{"row-end":q()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Kt]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Kt]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...B()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...B(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...B(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[S]}],px:[{px:[S]}],py:[{py:[S]}],ps:[{ps:[S]}],pe:[{pe:[S]}],pt:[{pt:[S]}],pr:[{pr:[S]}],pb:[{pb:[S]}],pl:[{pl:[S]}],m:[{m:[k]}],mx:[{mx:[k]}],my:[{my:[k]}],ms:[{ms:[k]}],me:[{me:[k]}],mt:[{mt:[k]}],mr:[{mr:[k]}],mb:[{mb:[k]}],ml:[{ml:[k]}],"space-x":[{"space-x":[j]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[j]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Kt,t]}],"min-w":[{"min-w":[Kt,t,"min","max","fit"]}],"max-w":[{"max-w":[Kt,t,"none","full","min","max","fit","prose",{screen:[Cc]},Cc]}],h:[{h:[Kt,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Kt,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Kt,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Kt,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Cc,Sc]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Uz]}],"font-family":[{font:[L0]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Kt]}],"line-clamp":[{"line-clamp":["none",K2,Uz]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",js,Kt]}],"list-image":[{"list-image":["none",Kt]}],"list-style-type":[{list:["none","disc","decimal",Kt]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[g]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[g]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Z(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",js,Sc]}],"underline-offset":[{"underline-offset":["auto",js,Kt]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:R()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Kt]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Kt]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[g]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...K(),nke]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",tke]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},ike]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[y]}],"gradient-via-pos":[{via:[y]}],"gradient-to-pos":[{to:[y]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[g]}],"border-style":[{border:[...Z(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[g]}],"divide-style":[{divide:Z()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...Z()]}],"outline-offset":[{"outline-offset":[js,Kt]}],"outline-w":[{outline:[js,Sc]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:U()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[g]}],"ring-offset-w":[{"ring-offset":[js,Sc]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Cc,ake]}],"shadow-color":[{shadow:[L0]}],opacity:[{opacity:[g]}],"mix-blend":[{"mix-blend":[...$(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":$()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",Cc,Kt]}],grayscale:[{grayscale:[l]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[w]}],sepia:[{sepia:[_]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[l]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[g]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"backdrop-sepia":[{"backdrop-sepia":[_]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Kt]}],duration:[{duration:ie()}],ease:[{ease:["linear","in","out","in-out",Kt]}],delay:[{delay:ie()}],animate:[{animate:["none","spin","ping","pulse","bounce",Kt]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[C]}],"scale-x":[{"scale-x":[C]}],"scale-y":[{"scale-y":[C]}],rotate:[{rotate:[C0,Kt]}],"translate-x":[{"translate-x":[O]}],"translate-y":[{"translate-y":[O]}],"skew-x":[{"skew-x":[A]}],"skew-y":[{"skew-y":[A]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Kt]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Kt]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":R()}],"scroll-mx":[{"scroll-mx":R()}],"scroll-my":[{"scroll-my":R()}],"scroll-ms":[{"scroll-ms":R()}],"scroll-me":[{"scroll-me":R()}],"scroll-mt":[{"scroll-mt":R()}],"scroll-mr":[{"scroll-mr":R()}],"scroll-mb":[{"scroll-mb":R()}],"scroll-ml":[{"scroll-ml":R()}],"scroll-p":[{"scroll-p":R()}],"scroll-px":[{"scroll-px":R()}],"scroll-py":[{"scroll-py":R()}],"scroll-ps":[{"scroll-ps":R()}],"scroll-pe":[{"scroll-pe":R()}],"scroll-pt":[{"scroll-pt":R()}],"scroll-pr":[{"scroll-pr":R()}],"scroll-pb":[{"scroll-pb":R()}],"scroll-pl":[{"scroll-pl":R()}],"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",Kt]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[js,Sc,Uz]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},uke=$ve(lke);function Ze(...e){return uke(rue(e))}const dke=iue("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground font-semibold hover:bg-emerald-400",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-secondary hover:text-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"text-muted-foreground hover:bg-muted hover:text-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),oi=M.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...i},a)=>{const o=r?Ive:"button";return x.jsx(o,{className:Ze(dke({variant:t,size:n,className:e})),ref:a,...i})});oi.displayName="Button";function St(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function hke(e,t){const n=M.createContext(t),r=a=>{const{children:o,...s}=a,c=M.useMemo(()=>s,Object.values(s));return x.jsx(n.Provider,{value:c,children:o})};r.displayName=e+"Provider";function i(a){const o=M.useContext(n);if(o)return o;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[r,i]}function xs(e,t=[]){let n=[];function r(a,o){const s=M.createContext(o),c=n.length;n=[...n,o];const l=d=>{var g;const{scope:f,children:h,...y}=d,v=((g=f==null?void 0:f[e])==null?void 0:g[c])||s,k=M.useMemo(()=>y,Object.values(y));return x.jsx(v.Provider,{value:k,children:h})};l.displayName=a+"Provider";function u(d,f){var v;const h=((v=f==null?void 0:f[e])==null?void 0:v[c])||s,y=M.useContext(h);if(y)return y;if(o!==void 0)return o;throw new Error(`\`${d}\` must be used within \`${a}\``)}return[l,u]}const i=()=>{const a=n.map(o=>M.createContext(o));return function(s){const c=(s==null?void 0:s[e])||a;return M.useMemo(()=>({[`__scope${e}`]:{...s,[e]:c}}),[s,c])}};return i.scopeName=e,[r,fke(i,...t)]}function fke(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(a){const o=r.reduce((s,{useScope:c,scopeName:l})=>{const d=c(a)[`__scope${l}`];return{...s,...d}},{});return M.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}var il=globalThis!=null&&globalThis.document?M.useLayoutEffect:()=>{},pke=yG[" useId ".trim().toString()]||(()=>{}),yke=0;function da(e){const[t,n]=M.useState(pke());return il(()=>{n(r=>r??String(yke++))},[e]),t?`radix-${t}`:""}var gke=yG[" useInsertionEffect ".trim().toString()]||il;function Of({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[i,a,o]=mke({defaultProp:t,onChange:n}),s=e!==void 0,c=s?e:i;{const u=M.useRef(e!==void 0);M.useEffect(()=>{const d=u.current;d!==s&&console.warn(`${r} is changing from ${d?"controlled":"uncontrolled"} to ${s?"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.`),u.current=s},[s,r])}const l=M.useCallback(u=>{var d;if(s){const f=vke(u)?u(e):u;f!==e&&((d=o.current)==null||d.call(o,f))}else a(u)},[s,e,a,o]);return[c,l]}function mke({defaultProp:e,onChange:t}){const[n,r]=M.useState(e),i=M.useRef(n),a=M.useRef(t);return gke(()=>{a.current=t},[t]),M.useEffect(()=>{var o;i.current!==n&&((o=a.current)==null||o.call(a,n),i.current=n)},[n,i]),[n,r,a]}function vke(e){return typeof e=="function"}function vf(e){const t=kke(e),n=M.forwardRef((r,i)=>{const{children:a,...o}=r,s=M.Children.toArray(a),c=s.find(wke);if(c){const l=c.props.children,u=s.map(d=>d===c?M.Children.count(l)>1?M.Children.only(null):M.isValidElement(l)?l.props.children:null:d);return x.jsx(t,{...o,ref:i,children:M.isValidElement(l)?M.cloneElement(l,void 0,u):null})}return x.jsx(t,{...o,ref:i,children:a})});return n.displayName=`${e}.Slot`,n}function kke(e){const t=M.forwardRef((n,r)=>{const{children:i,...a}=n;if(M.isValidElement(i)){const o=Mke(i),s=bke(a,i.props);return i.type!==M.Fragment&&(s.ref=r?ms(r,o):o),M.cloneElement(i,s)}return M.Children.count(i)>1?M.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var uue=Symbol("radix.slottable");function xke(e){const t=({children:n})=>x.jsx(x.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=uue,t}function wke(e){return M.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===uue}function bke(e,t){const n={...t};for(const r in t){const i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...s)=>{const c=a(...s);return i(...s),c}:i&&(n[r]=i):r==="style"?n[r]={...i,...a}:r==="className"&&(n[r]=[i,a].filter(Boolean).join(" "))}return{...e,...n}}function Mke(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Ske=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Jt=Ske.reduce((e,t)=>{const n=vf(`Primitive.${t}`),r=M.forwardRef((i,a)=>{const{asChild:o,...s}=i,c=o?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),x.jsx(c,{...s,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function due(e,t){e&&qf.flushSync(()=>e.dispatchEvent(t))}function vs(e){const t=M.useRef(e);return M.useEffect(()=>{t.current=e}),M.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function Cke(e,t=globalThis==null?void 0:globalThis.document){const n=vs(e);M.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Lke="DismissableLayer",X$="dismissableLayer.update",Ike="dismissableLayer.pointerDownOutside",Ake="dismissableLayer.focusOutside",GY,hue=M.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Py=M.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,onDismiss:s,...c}=e,l=M.useContext(hue),[u,d]=M.useState(null),f=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=M.useState({}),y=Nn(t,j=>d(j)),v=Array.from(l.layers),[k]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),g=v.indexOf(k),S=u?v.indexOf(u):-1,w=l.layersWithOutsidePointerEventsDisabled.size>0,C=S>=g,_=Pke(j=>{const O=j.target,T=[...l.branches].some(D=>D.contains(O));!C||T||(i==null||i(j),o==null||o(j),j.defaultPrevented||s==null||s())},f),A=Nke(j=>{const O=j.target;[...l.branches].some(D=>D.contains(O))||(a==null||a(j),o==null||o(j),j.defaultPrevented||s==null||s())},f);return Cke(j=>{S===l.layers.size-1&&(r==null||r(j),!j.defaultPrevented&&s&&(j.preventDefault(),s()))},f),M.useEffect(()=>{if(u)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(GY=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(u)),l.layers.add(u),KY(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=GY)}},[u,f,n,l]),M.useEffect(()=>()=>{u&&(l.layers.delete(u),l.layersWithOutsidePointerEventsDisabled.delete(u),KY())},[u,l]),M.useEffect(()=>{const j=()=>h({});return document.addEventListener(X$,j),()=>document.removeEventListener(X$,j)},[]),x.jsx(Jt.div,{...c,ref:y,style:{pointerEvents:w?C?"auto":"none":void 0,...e.style},onFocusCapture:St(e.onFocusCapture,A.onFocusCapture),onBlurCapture:St(e.onBlurCapture,A.onBlurCapture),onPointerDownCapture:St(e.onPointerDownCapture,_.onPointerDownCapture)})});Py.displayName=Lke;var _ke="DismissableLayerBranch",Eke=M.forwardRef((e,t)=>{const n=M.useContext(hue),r=M.useRef(null),i=Nn(t,r);return M.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),x.jsx(Jt.div,{...e,ref:i})});Eke.displayName=_ke;function Pke(e,t=globalThis==null?void 0:globalThis.document){const n=vs(e),r=M.useRef(!1),i=M.useRef(()=>{});return M.useEffect(()=>{const a=s=>{if(s.target&&!r.current){let c=function(){fue(Ike,n,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=c,t.addEventListener("click",i.current,{once:!0})):c()}else t.removeEventListener("click",i.current);r.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",a),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Nke(e,t=globalThis==null?void 0:globalThis.document){const n=vs(e),r=M.useRef(!1);return M.useEffect(()=>{const i=a=>{a.target&&!r.current&&fue(Ake,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function KY(){const e=new CustomEvent(X$);document.dispatchEvent(e)}function fue(e,t,n,{discrete:r}){const i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?due(i,a):i.dispatchEvent(a)}var $z="focusScope.autoFocusOnMount",Wz="focusScope.autoFocusOnUnmount",ZY={bubbles:!1,cancelable:!0},Rke="FocusScope",BD=M.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=M.useState(null),l=vs(i),u=vs(a),d=M.useRef(null),f=Nn(t,v=>c(v)),h=M.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;M.useEffect(()=>{if(r){let v=function(w){if(h.paused||!s)return;const C=w.target;s.contains(C)?d.current=C:Nc(d.current,{select:!0})},k=function(w){if(h.paused||!s)return;const C=w.relatedTarget;C!==null&&(s.contains(C)||Nc(d.current,{select:!0}))},g=function(w){if(document.activeElement===document.body)for(const _ of w)_.removedNodes.length>0&&Nc(s)};document.addEventListener("focusin",v),document.addEventListener("focusout",k);const S=new MutationObserver(g);return s&&S.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",k),S.disconnect()}}},[r,s,h.paused]),M.useEffect(()=>{if(s){YY.add(h);const v=document.activeElement;if(!s.contains(v)){const g=new CustomEvent($z,ZY);s.addEventListener($z,l),s.dispatchEvent(g),g.defaultPrevented||(jke(Oke(pue(s)),{select:!0}),document.activeElement===v&&Nc(s))}return()=>{s.removeEventListener($z,l),setTimeout(()=>{const g=new CustomEvent(Wz,ZY);s.addEventListener(Wz,u),s.dispatchEvent(g),g.defaultPrevented||Nc(v??document.body,{select:!0}),s.removeEventListener(Wz,u),YY.remove(h)},0)}}},[s,l,u,h]);const y=M.useCallback(v=>{if(!n&&!r||h.paused)return;const k=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,g=document.activeElement;if(k&&g){const S=v.currentTarget,[w,C]=Tke(S);w&&C?!v.shiftKey&&g===C?(v.preventDefault(),n&&Nc(w,{select:!0})):v.shiftKey&&g===w&&(v.preventDefault(),n&&Nc(C,{select:!0})):g===S&&v.preventDefault()}},[n,r,h.paused]);return x.jsx(Jt.div,{tabIndex:-1,...o,ref:f,onKeyDown:y})});BD.displayName=Rke;function jke(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Nc(r,{select:t}),document.activeElement!==n)return}function Tke(e){const t=pue(e),n=XY(t,e),r=XY(t.reverse(),e);return[n,r]}function pue(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function XY(e,t){for(const n of e)if(!Dke(n,{upTo:t}))return n}function Dke(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function qke(e){return e instanceof HTMLInputElement&&"select"in e}function Nc(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&qke(e)&&t&&e.select()}}var YY=zke();function zke(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=JY(e,t),e.unshift(t)},remove(t){var n;e=JY(e,t),(n=e[0])==null||n.resume()}}}function JY(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Oke(e){return e.filter(t=>t.tagName!=="A")}var Fke="Portal",Ny=M.forwardRef((e,t)=>{var s;const{container:n,...r}=e,[i,a]=M.useState(!1);il(()=>a(!0),[]);const o=n||i&&((s=globalThis==null?void 0:globalThis.document)==null?void 0:s.body);return o?Mve.createPortal(x.jsx(Jt.div,{...r,ref:t}),o):null});Ny.displayName=Fke;function Bke(e,t){return M.useReducer((n,r)=>t[n][r]??n,e)}var lo=e=>{const{present:t,children:n}=e,r=Hke(t),i=typeof n=="function"?n({present:r.isPresent}):M.Children.only(n),a=Nn(r.ref,Vke(i));return typeof n=="function"||r.isPresent?M.cloneElement(i,{ref:a}):null};lo.displayName="Presence";function Hke(e){const[t,n]=M.useState(),r=M.useRef(null),i=M.useRef(e),a=M.useRef("none"),o=e?"mounted":"unmounted",[s,c]=Bke(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return M.useEffect(()=>{const l=Zg(r.current);a.current=s==="mounted"?l:"none"},[s]),il(()=>{const l=r.current,u=i.current;if(u!==e){const f=a.current,h=Zg(l);e?c("MOUNT"):h==="none"||(l==null?void 0:l.display)==="none"?c("UNMOUNT"):c(u&&f!==h?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,c]),il(()=>{if(t){let l;const u=t.ownerDocument.defaultView??window,d=h=>{const v=Zg(r.current).includes(CSS.escape(h.animationName));if(h.target===t&&v&&(c("ANIMATION_END"),!i.current)){const k=t.style.animationFillMode;t.style.animationFillMode="forwards",l=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=k)})}},f=h=>{h.target===t&&(a.current=Zg(r.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{u.clearTimeout(l),t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:M.useCallback(l=>{r.current=l?getComputedStyle(l):null,n(l)},[])}}function Zg(e){return(e==null?void 0:e.animationName)||"none"}function Vke(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Gz=0;function sK(){M.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??QY()),document.body.insertAdjacentElement("beforeend",e[1]??QY()),Gz++,()=>{Gz===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Gz--}},[])}function QY(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var cs=function(){return cs=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},cs.apply(this,arguments)};function yue(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function Uke(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var $m="right-scroll-bar-position",Wm="width-before-scroll-bar",$ke="with-scroll-bars-hidden",Wke="--removed-body-scroll-bar-size";function Kz(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Gke(e,t){var n=M.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}var Kke=typeof window<"u"?M.useLayoutEffect:M.useEffect,eJ=new WeakMap;function Zke(e,t){var n=Gke(null,function(r){return e.forEach(function(i){return Kz(i,r)})});return Kke(function(){var r=eJ.get(n);if(r){var i=new Set(r),a=new Set(e),o=n.current;i.forEach(function(s){a.has(s)||Kz(s,null)}),a.forEach(function(s){i.has(s)||Kz(s,o)})}eJ.set(n,e)},[e]),n}function Xke(e){return e}function Yke(e,t){t===void 0&&(t=Xke);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(a){var o=t(a,r);return n.push(o),function(){n=n.filter(function(s){return s!==o})}},assignSyncMedium:function(a){for(r=!0;n.length;){var o=n;n=[],o.forEach(a)}n={push:function(s){return a(s)},filter:function(){return n}}},assignMedium:function(a){r=!0;var o=[];if(n.length){var s=n;n=[],s.forEach(a),o=n}var c=function(){var u=o;o=[],u.forEach(a)},l=function(){return Promise.resolve().then(c)};l(),n={push:function(u){o.push(u),l()},filter:function(u){return o=o.filter(u),n}}}};return i}function Jke(e){e===void 0&&(e={});var t=Yke(null);return t.options=cs({async:!0,ssr:!1},e),t}var gue=function(e){var t=e.sideCar,n=yue(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return M.createElement(r,cs({},n))};gue.isSideCarExport=!0;function Qke(e,t){return e.useMedium(t),gue}var mue=Jke(),Zz=function(){},HD=M.forwardRef(function(e,t){var n=M.useRef(null),r=M.useState({onScrollCapture:Zz,onWheelCapture:Zz,onTouchMoveCapture:Zz}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,h=e.noRelative,y=e.noIsolation,v=e.inert,k=e.allowPinchZoom,g=e.as,S=g===void 0?"div":g,w=e.gapMode,C=yue(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),_=f,A=Zke([n,t]),j=cs(cs({},C),i);return M.createElement(M.Fragment,null,u&&M.createElement(_,{sideCar:mue,removeScrollBar:l,shards:d,noRelative:h,noIsolation:y,inert:v,setCallbacks:a,allowPinchZoom:!!k,lockRef:n,gapMode:w}),o?M.cloneElement(M.Children.only(s),cs(cs({},j),{ref:A})):M.createElement(S,cs({},j,{className:c,ref:A}),s))});HD.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};HD.classNames={fullWidth:Wm,zeroRight:$m};var e4e=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function t4e(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=e4e();return t&&e.setAttribute("nonce",t),e}function n4e(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function r4e(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var i4e=function(){var e=0,t=null;return{add:function(n){e==0&&(t=t4e())&&(n4e(t,n),r4e(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},a4e=function(){var e=i4e();return function(t,n){M.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},vue=function(){var e=a4e(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},o4e={left:0,top:0,right:0,gap:0},Xz=function(e){return parseInt(e||"",10)||0},s4e=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[Xz(n),Xz(r),Xz(i)]},c4e=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return o4e;var t=s4e(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},l4e=vue(),Z2="data-scroll-locked",u4e=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n="margin"),`
41
41
  .`.concat($ke,` {
42
42
  overflow: hidden `).concat(r,`;
43
43
  padding-right: `).concat(s,"px ").concat(r,`;
@@ -7781,7 +7781,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
7781
7781
  *
7782
7782
  * This source code is licensed under the ISC license.
7783
7783
  * See the LICENSE file in the root directory of this source tree.
7784
- */const H4e=Object.freeze(Object.defineProperty({__proto__:null,AArrowDown:Gm,AArrowDownIcon:Gm,AArrowUp:Km,AArrowUpIcon:Km,ALargeSmall:Zm,ALargeSmallIcon:Zm,Accessibility:Xm,AccessibilityIcon:Xm,Activity:Ym,ActivityIcon:Ym,ActivitySquare:W1,ActivitySquareIcon:W1,AirVent:Jm,AirVentIcon:Jm,Airplay:Qm,AirplayIcon:Qm,AlarmCheck:Dl,AlarmCheckIcon:Dl,AlarmClock:t5,AlarmClockCheck:Dl,AlarmClockCheckIcon:Dl,AlarmClockIcon:t5,AlarmClockMinus:ql,AlarmClockMinusIcon:ql,AlarmClockOff:e5,AlarmClockOffIcon:e5,AlarmClockPlus:zl,AlarmClockPlusIcon:zl,AlarmMinus:ql,AlarmMinusIcon:ql,AlarmPlus:zl,AlarmPlusIcon:zl,AlarmSmoke:n5,AlarmSmokeIcon:n5,Album:r5,AlbumIcon:r5,AlertCircle:du,AlertCircleIcon:du,AlertOctagon:b1,AlertOctagonIcon:b1,AlertTriangle:Kd,AlertTriangleIcon:Kd,AlignCenter:o5,AlignCenterHorizontal:i5,AlignCenterHorizontalIcon:i5,AlignCenterIcon:o5,AlignCenterVertical:a5,AlignCenterVerticalIcon:a5,AlignEndHorizontal:s5,AlignEndHorizontalIcon:s5,AlignEndVertical:c5,AlignEndVerticalIcon:c5,AlignHorizontalDistributeCenter:l5,AlignHorizontalDistributeCenterIcon:l5,AlignHorizontalDistributeEnd:u5,AlignHorizontalDistributeEndIcon:u5,AlignHorizontalDistributeStart:d5,AlignHorizontalDistributeStartIcon:d5,AlignHorizontalJustifyCenter:h5,AlignHorizontalJustifyCenterIcon:h5,AlignHorizontalJustifyEnd:f5,AlignHorizontalJustifyEndIcon:f5,AlignHorizontalJustifyStart:p5,AlignHorizontalJustifyStartIcon:p5,AlignHorizontalSpaceAround:y5,AlignHorizontalSpaceAroundIcon:y5,AlignHorizontalSpaceBetween:g5,AlignHorizontalSpaceBetweenIcon:g5,AlignJustify:m5,AlignJustifyIcon:m5,AlignLeft:v5,AlignLeftIcon:v5,AlignRight:k5,AlignRightIcon:k5,AlignStartHorizontal:x5,AlignStartHorizontalIcon:x5,AlignStartVertical:w5,AlignStartVerticalIcon:w5,AlignVerticalDistributeCenter:b5,AlignVerticalDistributeCenterIcon:b5,AlignVerticalDistributeEnd:M5,AlignVerticalDistributeEndIcon:M5,AlignVerticalDistributeStart:S5,AlignVerticalDistributeStartIcon:S5,AlignVerticalJustifyCenter:C5,AlignVerticalJustifyCenterIcon:C5,AlignVerticalJustifyEnd:L5,AlignVerticalJustifyEndIcon:L5,AlignVerticalJustifyStart:I5,AlignVerticalJustifyStartIcon:I5,AlignVerticalSpaceAround:A5,AlignVerticalSpaceAroundIcon:A5,AlignVerticalSpaceBetween:_5,AlignVerticalSpaceBetweenIcon:_5,Ambulance:E5,AmbulanceIcon:E5,Ampersand:P5,AmpersandIcon:P5,Ampersands:N5,AmpersandsIcon:N5,Amphora:R5,AmphoraIcon:R5,Anchor:j5,AnchorIcon:j5,Angry:T5,AngryIcon:T5,Annoyed:D5,AnnoyedIcon:D5,Antenna:q5,AntennaIcon:q5,Anvil:z5,AnvilIcon:z5,Aperture:O5,ApertureIcon:O5,AppWindow:B5,AppWindowIcon:B5,AppWindowMac:F5,AppWindowMacIcon:F5,Apple:H5,AppleIcon:H5,Archive:$5,ArchiveIcon:$5,ArchiveRestore:V5,ArchiveRestoreIcon:V5,ArchiveX:U5,ArchiveXIcon:U5,AreaChart:Jl,AreaChartIcon:Jl,Armchair:W5,ArmchairIcon:W5,ArrowBigDown:K5,ArrowBigDownDash:G5,ArrowBigDownDashIcon:G5,ArrowBigDownIcon:K5,ArrowBigLeft:X5,ArrowBigLeftDash:Z5,ArrowBigLeftDashIcon:Z5,ArrowBigLeftIcon:X5,ArrowBigRight:J5,ArrowBigRightDash:Y5,ArrowBigRightDashIcon:Y5,ArrowBigRightIcon:J5,ArrowBigUp:ev,ArrowBigUpDash:Q5,ArrowBigUpDashIcon:Q5,ArrowBigUpIcon:ev,ArrowDown:uv,ArrowDown01:tv,ArrowDown01Icon:tv,ArrowDown10:nv,ArrowDown10Icon:nv,ArrowDownAZ:Ol,ArrowDownAZIcon:Ol,ArrowDownAz:Ol,ArrowDownAzIcon:Ol,ArrowDownCircle:hu,ArrowDownCircleIcon:hu,ArrowDownFromLine:rv,ArrowDownFromLineIcon:rv,ArrowDownIcon:uv,ArrowDownLeft:iv,ArrowDownLeftFromCircle:pu,ArrowDownLeftFromCircleIcon:pu,ArrowDownLeftFromSquare:Y1,ArrowDownLeftFromSquareIcon:Y1,ArrowDownLeftIcon:iv,ArrowDownLeftSquare:G1,ArrowDownLeftSquareIcon:G1,ArrowDownNarrowWide:av,ArrowDownNarrowWideIcon:av,ArrowDownRight:ov,ArrowDownRightFromCircle:yu,ArrowDownRightFromCircleIcon:yu,ArrowDownRightFromSquare:J1,ArrowDownRightFromSquareIcon:J1,ArrowDownRightIcon:ov,ArrowDownRightSquare:K1,ArrowDownRightSquareIcon:K1,ArrowDownSquare:Z1,ArrowDownSquareIcon:Z1,ArrowDownToDot:sv,ArrowDownToDotIcon:sv,ArrowDownToLine:cv,ArrowDownToLineIcon:cv,ArrowDownUp:lv,ArrowDownUpIcon:lv,ArrowDownWideNarrow:Fl,ArrowDownWideNarrowIcon:Fl,ArrowDownZA:Bl,ArrowDownZAIcon:Bl,ArrowDownZa:Bl,ArrowDownZaIcon:Bl,ArrowLeft:fv,ArrowLeftCircle:fu,ArrowLeftCircleIcon:fu,ArrowLeftFromLine:dv,ArrowLeftFromLineIcon:dv,ArrowLeftIcon:fv,ArrowLeftRight:op,ArrowLeftRightIcon:op,ArrowLeftSquare:X1,ArrowLeftSquareIcon:X1,ArrowLeftToLine:hv,ArrowLeftToLineIcon:hv,ArrowRight:X2,ArrowRightCircle:vu,ArrowRightCircleIcon:vu,ArrowRightFromLine:pv,ArrowRightFromLineIcon:pv,ArrowRightIcon:X2,ArrowRightLeft:yv,ArrowRightLeftIcon:yv,ArrowRightSquare:td,ArrowRightSquareIcon:td,ArrowRightToLine:gv,ArrowRightToLineIcon:gv,ArrowUp:Lv,ArrowUp01:mv,ArrowUp01Icon:mv,ArrowUp10:vv,ArrowUp10Icon:vv,ArrowUpAZ:Hl,ArrowUpAZIcon:Hl,ArrowUpAz:Hl,ArrowUpAzIcon:Hl,ArrowUpCircle:ku,ArrowUpCircleIcon:ku,ArrowUpDown:kv,ArrowUpDownIcon:kv,ArrowUpFromDot:xv,ArrowUpFromDotIcon:xv,ArrowUpFromLine:wv,ArrowUpFromLineIcon:wv,ArrowUpIcon:Lv,ArrowUpLeft:bv,ArrowUpLeftFromCircle:gu,ArrowUpLeftFromCircleIcon:gu,ArrowUpLeftFromSquare:Q1,ArrowUpLeftFromSquareIcon:Q1,ArrowUpLeftIcon:bv,ArrowUpLeftSquare:nd,ArrowUpLeftSquareIcon:nd,ArrowUpNarrowWide:Vl,ArrowUpNarrowWideIcon:Vl,ArrowUpRight:Mv,ArrowUpRightFromCircle:mu,ArrowUpRightFromCircleIcon:mu,ArrowUpRightFromSquare:ed,ArrowUpRightFromSquareIcon:ed,ArrowUpRightIcon:Mv,ArrowUpRightSquare:rd,ArrowUpRightSquareIcon:rd,ArrowUpSquare:id,ArrowUpSquareIcon:id,ArrowUpToLine:Sv,ArrowUpToLineIcon:Sv,ArrowUpWideNarrow:Cv,ArrowUpWideNarrowIcon:Cv,ArrowUpZA:Ul,ArrowUpZAIcon:Ul,ArrowUpZa:Ul,ArrowUpZaIcon:Ul,ArrowsUpFromLine:Iv,ArrowsUpFromLineIcon:Iv,Asterisk:Av,AsteriskIcon:Av,AsteriskSquare:ad,AsteriskSquareIcon:ad,AtSign:_v,AtSignIcon:_v,Atom:Ev,AtomIcon:Ev,AudioLines:Pv,AudioLinesIcon:Pv,AudioWaveform:Nv,AudioWaveformIcon:Nv,Award:Rv,AwardIcon:Rv,Axe:jv,AxeIcon:jv,Axis3D:$l,Axis3DIcon:$l,Axis3d:$l,Axis3dIcon:$l,Baby:Tv,BabyIcon:Tv,Backpack:Dv,BackpackIcon:Dv,Badge:Jv,BadgeAlert:qv,BadgeAlertIcon:qv,BadgeCent:zv,BadgeCentIcon:zv,BadgeCheck:Wl,BadgeCheckIcon:Wl,BadgeDollarSign:Ov,BadgeDollarSignIcon:Ov,BadgeEuro:Fv,BadgeEuroIcon:Fv,BadgeHelp:Bv,BadgeHelpIcon:Bv,BadgeIcon:Jv,BadgeIndianRupee:Hv,BadgeIndianRupeeIcon:Hv,BadgeInfo:Vv,BadgeInfoIcon:Vv,BadgeJapaneseYen:Uv,BadgeJapaneseYenIcon:Uv,BadgeMinus:$v,BadgeMinusIcon:$v,BadgePercent:Wv,BadgePercentIcon:Wv,BadgePlus:Gv,BadgePlusIcon:Gv,BadgePoundSterling:Kv,BadgePoundSterlingIcon:Kv,BadgeRussianRuble:Zv,BadgeRussianRubleIcon:Zv,BadgeSwissFranc:Xv,BadgeSwissFrancIcon:Xv,BadgeX:Yv,BadgeXIcon:Yv,BaggageClaim:Qv,BaggageClaimIcon:Qv,Ban:ek,BanIcon:ek,Banana:tk,BananaIcon:tk,Bandage:nk,BandageIcon:nk,Banknote:rk,BanknoteIcon:rk,BarChart:ou,BarChart2:su,BarChart2Icon:su,BarChart3:iu,BarChart3Icon:iu,BarChart4:ru,BarChart4Icon:ru,BarChartBig:nu,BarChartBigIcon:nu,BarChartHorizontal:eu,BarChartHorizontalBig:Ql,BarChartHorizontalBigIcon:Ql,BarChartHorizontalIcon:eu,BarChartIcon:ou,Barcode:ik,BarcodeIcon:ik,Baseline:ak,BaselineIcon:ak,Bath:ok,BathIcon:ok,Battery:hk,BatteryCharging:sk,BatteryChargingIcon:sk,BatteryFull:ck,BatteryFullIcon:ck,BatteryIcon:hk,BatteryLow:lk,BatteryLowIcon:lk,BatteryMedium:uk,BatteryMediumIcon:uk,BatteryWarning:dk,BatteryWarningIcon:dk,Beaker:fk,BeakerIcon:fk,Bean:yk,BeanIcon:yk,BeanOff:pk,BeanOffIcon:pk,Bed:vk,BedDouble:gk,BedDoubleIcon:gk,BedIcon:vk,BedSingle:mk,BedSingleIcon:mk,Beef:kk,BeefIcon:kk,Beer:wk,BeerIcon:wk,BeerOff:xk,BeerOffIcon:xk,Bell:Ak,BellDot:bk,BellDotIcon:bk,BellElectric:Mk,BellElectricIcon:Mk,BellIcon:Ak,BellMinus:Sk,BellMinusIcon:Sk,BellOff:Ck,BellOffIcon:Ck,BellPlus:Lk,BellPlusIcon:Lk,BellRing:Ik,BellRingIcon:Ik,BetweenHorizonalEnd:Gl,BetweenHorizonalEndIcon:Gl,BetweenHorizonalStart:Kl,BetweenHorizonalStartIcon:Kl,BetweenHorizontalEnd:Gl,BetweenHorizontalEndIcon:Gl,BetweenHorizontalStart:Kl,BetweenHorizontalStartIcon:Kl,BetweenVerticalEnd:_k,BetweenVerticalEndIcon:_k,BetweenVerticalStart:Ek,BetweenVerticalStartIcon:Ek,BicepsFlexed:Pk,BicepsFlexedIcon:Pk,Bike:Nk,BikeIcon:Nk,Binary:Rk,BinaryIcon:Rk,Binoculars:jk,BinocularsIcon:jk,Biohazard:Tk,BiohazardIcon:Tk,Bird:Dk,BirdIcon:Dk,Bitcoin:qk,BitcoinIcon:qk,Blend:zk,BlendIcon:zk,Blinds:Ok,BlindsIcon:Ok,Blocks:Fk,BlocksIcon:Fk,Bluetooth:Uk,BluetoothConnected:Bk,BluetoothConnectedIcon:Bk,BluetoothIcon:Uk,BluetoothOff:Hk,BluetoothOffIcon:Hk,BluetoothSearching:Vk,BluetoothSearchingIcon:Vk,Bold:$k,BoldIcon:$k,Bolt:Wk,BoltIcon:Wk,Bomb:Gk,BombIcon:Gk,Bone:Kk,BoneIcon:Kk,Book:m4,BookA:Zk,BookAIcon:Zk,BookAudio:Xk,BookAudioIcon:Xk,BookCheck:Yk,BookCheckIcon:Yk,BookCopy:Jk,BookCopyIcon:Jk,BookDashed:Zl,BookDashedIcon:Zl,BookDown:Qk,BookDownIcon:Qk,BookHeadphones:e4,BookHeadphonesIcon:e4,BookHeart:t4,BookHeartIcon:t4,BookIcon:m4,BookImage:n4,BookImageIcon:n4,BookKey:r4,BookKeyIcon:r4,BookLock:i4,BookLockIcon:i4,BookMarked:a4,BookMarkedIcon:a4,BookMinus:o4,BookMinusIcon:o4,BookOpen:l4,BookOpenCheck:s4,BookOpenCheckIcon:s4,BookOpenIcon:l4,BookOpenText:c4,BookOpenTextIcon:c4,BookPlus:u4,BookPlusIcon:u4,BookTemplate:Zl,BookTemplateIcon:Zl,BookText:d4,BookTextIcon:d4,BookType:h4,BookTypeIcon:h4,BookUp:p4,BookUp2:f4,BookUp2Icon:f4,BookUpIcon:p4,BookUser:y4,BookUserIcon:y4,BookX:g4,BookXIcon:g4,Bookmark:b4,BookmarkCheck:v4,BookmarkCheckIcon:v4,BookmarkIcon:b4,BookmarkMinus:k4,BookmarkMinusIcon:k4,BookmarkPlus:x4,BookmarkPlusIcon:x4,BookmarkX:w4,BookmarkXIcon:w4,BoomBox:M4,BoomBoxIcon:M4,Bot:L4,BotIcon:L4,BotMessageSquare:S4,BotMessageSquareIcon:S4,BotOff:C4,BotOffIcon:C4,Box:I4,BoxIcon:I4,BoxSelect:gd,BoxSelectIcon:gd,Boxes:A4,BoxesIcon:A4,Braces:Xl,BracesIcon:Xl,Brackets:_4,BracketsIcon:_4,Brain:N4,BrainCircuit:E4,BrainCircuitIcon:E4,BrainCog:P4,BrainCogIcon:P4,BrainIcon:N4,BrickWall:R4,BrickWallIcon:R4,Briefcase:q4,BriefcaseBusiness:j4,BriefcaseBusinessIcon:j4,BriefcaseConveyorBelt:T4,BriefcaseConveyorBeltIcon:T4,BriefcaseIcon:q4,BriefcaseMedical:D4,BriefcaseMedicalIcon:D4,BringToFront:z4,BringToFrontIcon:z4,Brush:O4,BrushIcon:O4,Bug:H4,BugIcon:H4,BugOff:F4,BugOffIcon:F4,BugPlay:B4,BugPlayIcon:B4,Building:U4,Building2:V4,Building2Icon:V4,BuildingIcon:U4,Bus:W4,BusFront:$4,BusFrontIcon:$4,BusIcon:W4,Cable:K4,CableCar:G4,CableCarIcon:G4,CableIcon:K4,Cake:X4,CakeIcon:X4,CakeSlice:Z4,CakeSliceIcon:Z4,Calculator:Y4,CalculatorIcon:Y4,Calendar:m3,Calendar1:J4,Calendar1Icon:J4,CalendarArrowDown:Q4,CalendarArrowDownIcon:Q4,CalendarArrowUp:e3,CalendarArrowUpIcon:e3,CalendarCheck:n3,CalendarCheck2:t3,CalendarCheck2Icon:t3,CalendarCheckIcon:n3,CalendarClock:r3,CalendarClockIcon:r3,CalendarCog:i3,CalendarCogIcon:i3,CalendarDays:a3,CalendarDaysIcon:a3,CalendarFold:o3,CalendarFoldIcon:o3,CalendarHeart:s3,CalendarHeartIcon:s3,CalendarIcon:m3,CalendarMinus:l3,CalendarMinus2:c3,CalendarMinus2Icon:c3,CalendarMinusIcon:l3,CalendarOff:u3,CalendarOffIcon:u3,CalendarPlus:h3,CalendarPlus2:d3,CalendarPlus2Icon:d3,CalendarPlusIcon:h3,CalendarRange:f3,CalendarRangeIcon:f3,CalendarSearch:p3,CalendarSearchIcon:p3,CalendarX:g3,CalendarX2:y3,CalendarX2Icon:y3,CalendarXIcon:g3,Camera:k3,CameraIcon:k3,CameraOff:v3,CameraOffIcon:v3,CandlestickChart:tu,CandlestickChartIcon:tu,Candy:b3,CandyCane:x3,CandyCaneIcon:x3,CandyIcon:b3,CandyOff:w3,CandyOffIcon:w3,Cannabis:M3,CannabisIcon:M3,Captions:Yl,CaptionsIcon:Yl,CaptionsOff:S3,CaptionsOffIcon:S3,Car:I3,CarFront:C3,CarFrontIcon:C3,CarIcon:I3,CarTaxiFront:L3,CarTaxiFrontIcon:L3,Caravan:A3,CaravanIcon:A3,Carrot:_3,CarrotIcon:_3,CaseLower:E3,CaseLowerIcon:E3,CaseSensitive:P3,CaseSensitiveIcon:P3,CaseUpper:N3,CaseUpperIcon:N3,CassetteTape:R3,CassetteTapeIcon:R3,Cast:j3,CastIcon:j3,Castle:T3,CastleIcon:T3,Cat:D3,CatIcon:D3,Cctv:q3,CctvIcon:q3,ChartArea:Jl,ChartAreaIcon:Jl,ChartBar:eu,ChartBarBig:Ql,ChartBarBigIcon:Ql,ChartBarDecreasing:z3,ChartBarDecreasingIcon:z3,ChartBarIcon:eu,ChartBarIncreasing:O3,ChartBarIncreasingIcon:O3,ChartBarStacked:F3,ChartBarStackedIcon:F3,ChartCandlestick:tu,ChartCandlestickIcon:tu,ChartColumn:iu,ChartColumnBig:nu,ChartColumnBigIcon:nu,ChartColumnDecreasing:B3,ChartColumnDecreasingIcon:B3,ChartColumnIcon:iu,ChartColumnIncreasing:ru,ChartColumnIncreasingIcon:ru,ChartColumnStacked:H3,ChartColumnStackedIcon:H3,ChartGantt:V3,ChartGanttIcon:V3,ChartLine:au,ChartLineIcon:au,ChartNetwork:U3,ChartNetworkIcon:U3,ChartNoAxesColumn:su,ChartNoAxesColumnDecreasing:$3,ChartNoAxesColumnDecreasingIcon:$3,ChartNoAxesColumnIcon:su,ChartNoAxesColumnIncreasing:ou,ChartNoAxesColumnIncreasingIcon:ou,ChartNoAxesCombined:W3,ChartNoAxesCombinedIcon:W3,ChartNoAxesGantt:cu,ChartNoAxesGanttIcon:cu,ChartPie:lu,ChartPieIcon:lu,ChartScatter:uu,ChartScatterIcon:uu,ChartSpline:G3,ChartSplineIcon:G3,Check:Jc,CheckCheck:K3,CheckCheckIcon:K3,CheckCircle:xu,CheckCircle2:wu,CheckCircle2Icon:wu,CheckCircleIcon:xu,CheckIcon:Jc,CheckSquare:sd,CheckSquare2:cd,CheckSquare2Icon:cd,CheckSquareIcon:sd,ChefHat:Z3,ChefHatIcon:Z3,Cherry:X3,CherryIcon:X3,ChevronDown:Y3,ChevronDownCircle:bu,ChevronDownCircleIcon:bu,ChevronDownIcon:Y3,ChevronDownSquare:ld,ChevronDownSquareIcon:ld,ChevronFirst:J3,ChevronFirstIcon:J3,ChevronLast:Q3,ChevronLastIcon:Q3,ChevronLeft:ex,ChevronLeftCircle:Mu,ChevronLeftCircleIcon:Mu,ChevronLeftIcon:ex,ChevronLeftSquare:ud,ChevronLeftSquareIcon:ud,ChevronRight:tx,ChevronRightCircle:Su,ChevronRightCircleIcon:Su,ChevronRightIcon:tx,ChevronRightSquare:dd,ChevronRightSquareIcon:dd,ChevronUp:nx,ChevronUpCircle:Cu,ChevronUpCircleIcon:Cu,ChevronUpIcon:nx,ChevronUpSquare:hd,ChevronUpSquareIcon:hd,ChevronsDown:ix,ChevronsDownIcon:ix,ChevronsDownUp:rx,ChevronsDownUpIcon:rx,ChevronsLeft:sx,ChevronsLeftIcon:sx,ChevronsLeftRight:ox,ChevronsLeftRightEllipsis:ax,ChevronsLeftRightEllipsisIcon:ax,ChevronsLeftRightIcon:ox,ChevronsRight:lx,ChevronsRightIcon:lx,ChevronsRightLeft:cx,ChevronsRightLeftIcon:cx,ChevronsUp:ux,ChevronsUpDown:sp,ChevronsUpDownIcon:sp,ChevronsUpIcon:ux,Chrome:dx,ChromeIcon:dx,Church:hx,ChurchIcon:hx,Cigarette:px,CigaretteIcon:px,CigaretteOff:fx,CigaretteOffIcon:fx,Circle:cp,CircleAlert:du,CircleAlertIcon:du,CircleArrowDown:hu,CircleArrowDownIcon:hu,CircleArrowLeft:fu,CircleArrowLeftIcon:fu,CircleArrowOutDownLeft:pu,CircleArrowOutDownLeftIcon:pu,CircleArrowOutDownRight:yu,CircleArrowOutDownRightIcon:yu,CircleArrowOutUpLeft:gu,CircleArrowOutUpLeftIcon:gu,CircleArrowOutUpRight:mu,CircleArrowOutUpRightIcon:mu,CircleArrowRight:vu,CircleArrowRightIcon:vu,CircleArrowUp:ku,CircleArrowUpIcon:ku,CircleCheck:wu,CircleCheckBig:xu,CircleCheckBigIcon:xu,CircleCheckIcon:wu,CircleChevronDown:bu,CircleChevronDownIcon:bu,CircleChevronLeft:Mu,CircleChevronLeftIcon:Mu,CircleChevronRight:Su,CircleChevronRightIcon:Su,CircleChevronUp:Cu,CircleChevronUpIcon:Cu,CircleDashed:yx,CircleDashedIcon:yx,CircleDivide:Lu,CircleDivideIcon:Lu,CircleDollarSign:gx,CircleDollarSignIcon:gx,CircleDot:vx,CircleDotDashed:mx,CircleDotDashedIcon:mx,CircleDotIcon:vx,CircleEllipsis:kx,CircleEllipsisIcon:kx,CircleEqual:xx,CircleEqualIcon:xx,CircleFadingArrowUp:wx,CircleFadingArrowUpIcon:wx,CircleFadingPlus:bx,CircleFadingPlusIcon:bx,CircleGauge:Iu,CircleGaugeIcon:Iu,CircleHelp:Au,CircleHelpIcon:Au,CircleIcon:cp,CircleMinus:_u,CircleMinusIcon:_u,CircleOff:Mx,CircleOffIcon:Mx,CircleParking:Pu,CircleParkingIcon:Pu,CircleParkingOff:Eu,CircleParkingOffIcon:Eu,CirclePause:Nu,CirclePauseIcon:Nu,CirclePercent:Ru,CirclePercentIcon:Ru,CirclePlay:ju,CirclePlayIcon:ju,CirclePlus:Tu,CirclePlusIcon:Tu,CirclePower:Du,CirclePowerIcon:Du,CircleSlash:Sx,CircleSlash2:qu,CircleSlash2Icon:qu,CircleSlashIcon:Sx,CircleSlashed:qu,CircleSlashedIcon:qu,CircleStop:zu,CircleStopIcon:zu,CircleUser:Fu,CircleUserIcon:Fu,CircleUserRound:Ou,CircleUserRoundIcon:Ou,CircleX:Bu,CircleXIcon:Bu,CircuitBoard:Cx,CircuitBoardIcon:Cx,Citrus:Lx,CitrusIcon:Lx,Clapperboard:Ix,ClapperboardIcon:Ix,Clipboard:Dx,ClipboardCheck:Ax,ClipboardCheckIcon:Ax,ClipboardCopy:_x,ClipboardCopyIcon:_x,ClipboardEdit:Vu,ClipboardEditIcon:Vu,ClipboardIcon:Dx,ClipboardList:Ex,ClipboardListIcon:Ex,ClipboardMinus:Px,ClipboardMinusIcon:Px,ClipboardPaste:Nx,ClipboardPasteIcon:Nx,ClipboardPen:Vu,ClipboardPenIcon:Vu,ClipboardPenLine:Hu,ClipboardPenLineIcon:Hu,ClipboardPlus:Rx,ClipboardPlusIcon:Rx,ClipboardSignature:Hu,ClipboardSignatureIcon:Hu,ClipboardType:jx,ClipboardTypeIcon:jx,ClipboardX:Tx,ClipboardXIcon:Tx,Clock:Jx,Clock1:qx,Clock10:zx,Clock10Icon:zx,Clock11:Ox,Clock11Icon:Ox,Clock12:Fx,Clock12Icon:Fx,Clock1Icon:qx,Clock2:Bx,Clock2Icon:Bx,Clock3:Hx,Clock3Icon:Hx,Clock4:Vx,Clock4Icon:Vx,Clock5:Ux,Clock5Icon:Ux,Clock6:$x,Clock6Icon:$x,Clock7:Wx,Clock7Icon:Wx,Clock8:Gx,Clock8Icon:Gx,Clock9:Kx,Clock9Icon:Kx,ClockAlert:Zx,ClockAlertIcon:Zx,ClockArrowDown:Xx,ClockArrowDownIcon:Xx,ClockArrowUp:Yx,ClockArrowUpIcon:Yx,ClockIcon:Jx,Cloud:lp,CloudCog:Qx,CloudCogIcon:Qx,CloudDownload:Uu,CloudDownloadIcon:Uu,CloudDrizzle:ew,CloudDrizzleIcon:ew,CloudFog:tw,CloudFogIcon:tw,CloudHail:nw,CloudHailIcon:nw,CloudIcon:lp,CloudLightning:rw,CloudLightningIcon:rw,CloudMoon:aw,CloudMoonIcon:aw,CloudMoonRain:iw,CloudMoonRainIcon:iw,CloudOff:ow,CloudOffIcon:ow,CloudRain:cw,CloudRainIcon:cw,CloudRainWind:sw,CloudRainWindIcon:sw,CloudSnow:lw,CloudSnowIcon:lw,CloudSun:dw,CloudSunIcon:dw,CloudSunRain:uw,CloudSunRainIcon:uw,CloudUpload:$u,CloudUploadIcon:$u,Cloudy:hw,CloudyIcon:hw,Clover:fw,CloverIcon:fw,Club:pw,ClubIcon:pw,Code:yw,Code2:Wu,Code2Icon:Wu,CodeIcon:yw,CodeSquare:fd,CodeSquareIcon:fd,CodeXml:Wu,CodeXmlIcon:Wu,Codepen:gw,CodepenIcon:gw,Codesandbox:mw,CodesandboxIcon:mw,Coffee:vw,CoffeeIcon:vw,Cog:kw,CogIcon:kw,Coins:xw,CoinsIcon:xw,Columns:Gu,Columns2:Gu,Columns2Icon:Gu,Columns3:Tc,Columns3Icon:Tc,Columns4:ww,Columns4Icon:ww,ColumnsIcon:Gu,Combine:bw,CombineIcon:bw,Command:Mw,CommandIcon:Mw,Compass:Sw,CompassIcon:Sw,Component:Cw,ComponentIcon:Cw,Computer:Lw,ComputerIcon:Lw,ConciergeBell:Iw,ConciergeBellIcon:Iw,Cone:Aw,ConeIcon:Aw,Construction:_w,ConstructionIcon:_w,Contact:Ew,Contact2:Ku,Contact2Icon:Ku,ContactIcon:Ew,ContactRound:Ku,ContactRoundIcon:Ku,Container:Pw,ContainerIcon:Pw,Contrast:Nw,ContrastIcon:Nw,Cookie:Rw,CookieIcon:Rw,CookingPot:jw,CookingPotIcon:jw,Copy:Y2,CopyCheck:Tw,CopyCheckIcon:Tw,CopyIcon:Y2,CopyMinus:Dw,CopyMinusIcon:Dw,CopyPlus:qw,CopyPlusIcon:qw,CopySlash:zw,CopySlashIcon:zw,CopyX:Ow,CopyXIcon:Ow,Copyleft:Fw,CopyleftIcon:Fw,Copyright:Bw,CopyrightIcon:Bw,CornerDownLeft:Hw,CornerDownLeftIcon:Hw,CornerDownRight:Vw,CornerDownRightIcon:Vw,CornerLeftDown:Uw,CornerLeftDownIcon:Uw,CornerLeftUp:$w,CornerLeftUpIcon:$w,CornerRightDown:Ww,CornerRightDownIcon:Ww,CornerRightUp:Gw,CornerRightUpIcon:Gw,CornerUpLeft:Kw,CornerUpLeftIcon:Kw,CornerUpRight:Zw,CornerUpRightIcon:Zw,Cpu:Xw,CpuIcon:Xw,CreativeCommons:Yw,CreativeCommonsIcon:Yw,CreditCard:Jw,CreditCardIcon:Jw,Croissant:Qw,CroissantIcon:Qw,Crop:e6,CropIcon:e6,Cross:t6,CrossIcon:t6,Crosshair:n6,CrosshairIcon:n6,Crown:r6,CrownIcon:r6,Cuboid:i6,CuboidIcon:i6,CupSoda:a6,CupSodaIcon:a6,CurlyBraces:Xl,CurlyBracesIcon:Xl,Currency:o6,CurrencyIcon:o6,Cylinder:s6,CylinderIcon:s6,Dam:c6,DamIcon:c6,Database:up,DatabaseBackup:l6,DatabaseBackupIcon:l6,DatabaseIcon:up,DatabaseZap:u6,DatabaseZapIcon:u6,Delete:d6,DeleteIcon:d6,Dessert:h6,DessertIcon:h6,Diameter:f6,DiameterIcon:f6,Diamond:g6,DiamondIcon:g6,DiamondMinus:p6,DiamondMinusIcon:p6,DiamondPercent:Zu,DiamondPercentIcon:Zu,DiamondPlus:y6,DiamondPlusIcon:y6,Dice1:m6,Dice1Icon:m6,Dice2:v6,Dice2Icon:v6,Dice3:k6,Dice3Icon:k6,Dice4:x6,Dice4Icon:x6,Dice5:w6,Dice5Icon:w6,Dice6:b6,Dice6Icon:b6,Dices:M6,DicesIcon:M6,Diff:S6,DiffIcon:S6,Disc:A6,Disc2:C6,Disc2Icon:C6,Disc3:L6,Disc3Icon:L6,DiscAlbum:I6,DiscAlbumIcon:I6,DiscIcon:A6,Divide:_6,DivideCircle:Lu,DivideCircleIcon:Lu,DivideIcon:_6,DivideSquare:md,DivideSquareIcon:md,Dna:P6,DnaIcon:P6,DnaOff:E6,DnaOffIcon:E6,Dock:N6,DockIcon:N6,Dog:R6,DogIcon:R6,DollarSign:j6,DollarSignIcon:j6,Donut:T6,DonutIcon:T6,DoorClosed:D6,DoorClosedIcon:D6,DoorOpen:q6,DoorOpenIcon:q6,Dot:z6,DotIcon:z6,DotSquare:vd,DotSquareIcon:vd,Download:O6,DownloadCloud:Uu,DownloadCloudIcon:Uu,DownloadIcon:O6,DraftingCompass:F6,DraftingCompassIcon:F6,Drama:B6,DramaIcon:B6,Dribbble:H6,DribbbleIcon:H6,Drill:V6,DrillIcon:V6,Droplet:U6,DropletIcon:U6,Droplets:$6,DropletsIcon:$6,Drum:W6,DrumIcon:W6,Drumstick:G6,DrumstickIcon:G6,Dumbbell:K6,DumbbellIcon:K6,Ear:X6,EarIcon:X6,EarOff:Z6,EarOffIcon:Z6,Earth:Xu,EarthIcon:Xu,EarthLock:Y6,EarthLockIcon:Y6,Eclipse:J6,EclipseIcon:J6,Edit:Ea,Edit2:T1,Edit2Icon:T1,Edit3:j1,Edit3Icon:j1,EditIcon:Ea,Egg:t8,EggFried:Q6,EggFriedIcon:Q6,EggIcon:t8,EggOff:e8,EggOffIcon:e8,Ellipsis:Ju,EllipsisIcon:Ju,EllipsisVertical:Yu,EllipsisVerticalIcon:Yu,Equal:r8,EqualIcon:r8,EqualNot:n8,EqualNotIcon:n8,EqualSquare:kd,EqualSquareIcon:kd,Eraser:i8,EraserIcon:i8,EthernetPort:a8,EthernetPortIcon:a8,Euro:o8,EuroIcon:o8,Expand:s8,ExpandIcon:s8,ExternalLink:dp,ExternalLinkIcon:dp,Eye:u8,EyeClosed:c8,EyeClosedIcon:c8,EyeIcon:u8,EyeOff:l8,EyeOffIcon:l8,Facebook:d8,FacebookIcon:d8,Factory:h8,FactoryIcon:h8,Fan:f8,FanIcon:f8,FastForward:p8,FastForwardIcon:p8,Feather:y8,FeatherIcon:y8,Fence:g8,FenceIcon:g8,FerrisWheel:m8,FerrisWheelIcon:m8,Figma:v8,FigmaIcon:v8,File:pb,FileArchive:k8,FileArchiveIcon:k8,FileAudio:w8,FileAudio2:x8,FileAudio2Icon:x8,FileAudioIcon:w8,FileAxis3D:Qu,FileAxis3DIcon:Qu,FileAxis3d:Qu,FileAxis3dIcon:Qu,FileBadge:M8,FileBadge2:b8,FileBadge2Icon:b8,FileBadgeIcon:M8,FileBarChart:e1,FileBarChart2:t1,FileBarChart2Icon:t1,FileBarChartIcon:e1,FileBox:S8,FileBoxIcon:S8,FileChartColumn:t1,FileChartColumnIcon:t1,FileChartColumnIncreasing:e1,FileChartColumnIncreasingIcon:e1,FileChartLine:n1,FileChartLineIcon:n1,FileChartPie:r1,FileChartPieIcon:r1,FileCheck:L8,FileCheck2:C8,FileCheck2Icon:C8,FileCheckIcon:L8,FileClock:I8,FileClockIcon:I8,FileCode:_8,FileCode2:A8,FileCode2Icon:A8,FileCodeIcon:_8,FileCog:i1,FileCog2:i1,FileCog2Icon:i1,FileCogIcon:i1,FileDiff:E8,FileDiffIcon:E8,FileDigit:P8,FileDigitIcon:P8,FileDown:hp,FileDownIcon:hp,FileEdit:o1,FileEditIcon:o1,FileHeart:N8,FileHeartIcon:N8,FileIcon:pb,FileImage:R8,FileImageIcon:R8,FileInput:j8,FileInputIcon:j8,FileJson:D8,FileJson2:T8,FileJson2Icon:T8,FileJsonIcon:D8,FileKey:z8,FileKey2:q8,FileKey2Icon:q8,FileKeyIcon:z8,FileLineChart:n1,FileLineChartIcon:n1,FileLock:F8,FileLock2:O8,FileLock2Icon:O8,FileLockIcon:F8,FileMinus:H8,FileMinus2:B8,FileMinus2Icon:B8,FileMinusIcon:H8,FileMusic:V8,FileMusicIcon:V8,FileOutput:U8,FileOutputIcon:U8,FilePen:o1,FilePenIcon:o1,FilePenLine:a1,FilePenLineIcon:a1,FilePieChart:r1,FilePieChartIcon:r1,FilePlus:W8,FilePlus2:$8,FilePlus2Icon:$8,FilePlusIcon:W8,FileQuestion:G8,FileQuestionIcon:G8,FileScan:K8,FileScanIcon:K8,FileSearch:X8,FileSearch2:Z8,FileSearch2Icon:Z8,FileSearchIcon:X8,FileSignature:a1,FileSignatureIcon:a1,FileSliders:Y8,FileSlidersIcon:Y8,FileSpreadsheet:J8,FileSpreadsheetIcon:J8,FileStack:Q8,FileStackIcon:Q8,FileSymlink:eb,FileSymlinkIcon:eb,FileTerminal:tb,FileTerminalIcon:tb,FileText:nb,FileTextIcon:nb,FileType:ib,FileType2:rb,FileType2Icon:rb,FileTypeIcon:ib,FileUp:ab,FileUpIcon:ab,FileUser:ob,FileUserIcon:ob,FileVideo:cb,FileVideo2:sb,FileVideo2Icon:sb,FileVideoIcon:cb,FileVolume:ub,FileVolume2:lb,FileVolume2Icon:lb,FileVolumeIcon:ub,FileWarning:db,FileWarningIcon:db,FileX:fb,FileX2:hb,FileX2Icon:hb,FileXIcon:fb,Files:yb,FilesIcon:yb,Film:gb,FilmIcon:gb,Filter:vb,FilterIcon:vb,FilterX:mb,FilterXIcon:mb,Fingerprint:kb,FingerprintIcon:kb,FireExtinguisher:xb,FireExtinguisherIcon:xb,Fish:Mb,FishIcon:Mb,FishOff:wb,FishOffIcon:wb,FishSymbol:bb,FishSymbolIcon:bb,Flag:Ib,FlagIcon:Ib,FlagOff:Sb,FlagOffIcon:Sb,FlagTriangleLeft:Cb,FlagTriangleLeftIcon:Cb,FlagTriangleRight:Lb,FlagTriangleRightIcon:Lb,Flame:_b,FlameIcon:_b,FlameKindling:Ab,FlameKindlingIcon:Ab,Flashlight:Pb,FlashlightIcon:Pb,FlashlightOff:Eb,FlashlightOffIcon:Eb,FlaskConical:Rb,FlaskConicalIcon:Rb,FlaskConicalOff:Nb,FlaskConicalOffIcon:Nb,FlaskRound:jb,FlaskRoundIcon:jb,FlipHorizontal:Db,FlipHorizontal2:Tb,FlipHorizontal2Icon:Tb,FlipHorizontalIcon:Db,FlipVertical:zb,FlipVertical2:qb,FlipVertical2Icon:qb,FlipVerticalIcon:zb,Flower:Fb,Flower2:Ob,Flower2Icon:Ob,FlowerIcon:Fb,Focus:Bb,FocusIcon:Bb,FoldHorizontal:Hb,FoldHorizontalIcon:Hb,FoldVertical:Vb,FoldVerticalIcon:Vb,Folder:g7,FolderArchive:Ub,FolderArchiveIcon:Ub,FolderCheck:$b,FolderCheckIcon:$b,FolderClock:Wb,FolderClockIcon:Wb,FolderClosed:Gb,FolderClosedIcon:Gb,FolderCode:Kb,FolderCodeIcon:Kb,FolderCog:s1,FolderCog2:s1,FolderCog2Icon:s1,FolderCogIcon:s1,FolderDot:Zb,FolderDotIcon:Zb,FolderDown:Xb,FolderDownIcon:Xb,FolderEdit:c1,FolderEditIcon:c1,FolderGit:Jb,FolderGit2:Yb,FolderGit2Icon:Yb,FolderGitIcon:Jb,FolderHeart:Qb,FolderHeartIcon:Qb,FolderIcon:g7,FolderInput:e7,FolderInputIcon:e7,FolderKanban:t7,FolderKanbanIcon:t7,FolderKey:n7,FolderKeyIcon:n7,FolderLock:r7,FolderLockIcon:r7,FolderMinus:i7,FolderMinusIcon:i7,FolderOpen:fp,FolderOpenDot:a7,FolderOpenDotIcon:a7,FolderOpenIcon:fp,FolderOutput:o7,FolderOutputIcon:o7,FolderPen:c1,FolderPenIcon:c1,FolderPlus:s7,FolderPlusIcon:s7,FolderRoot:c7,FolderRootIcon:c7,FolderSearch:u7,FolderSearch2:l7,FolderSearch2Icon:l7,FolderSearchIcon:u7,FolderSymlink:d7,FolderSymlinkIcon:d7,FolderSync:h7,FolderSyncIcon:h7,FolderTree:f7,FolderTreeIcon:f7,FolderUp:p7,FolderUpIcon:p7,FolderX:y7,FolderXIcon:y7,Folders:m7,FoldersIcon:m7,Footprints:v7,FootprintsIcon:v7,ForkKnife:ah,ForkKnifeCrossed:ih,ForkKnifeCrossedIcon:ih,ForkKnifeIcon:ah,Forklift:k7,ForkliftIcon:k7,FormInput:q1,FormInputIcon:q1,Forward:x7,ForwardIcon:x7,Frame:w7,FrameIcon:w7,Framer:b7,FramerIcon:b7,Frown:M7,FrownIcon:M7,Fuel:S7,FuelIcon:S7,Fullscreen:C7,FullscreenIcon:C7,FunctionSquare:xd,FunctionSquareIcon:xd,GalleryHorizontal:I7,GalleryHorizontalEnd:L7,GalleryHorizontalEndIcon:L7,GalleryHorizontalIcon:I7,GalleryThumbnails:A7,GalleryThumbnailsIcon:A7,GalleryVertical:E7,GalleryVerticalEnd:_7,GalleryVerticalEndIcon:_7,GalleryVerticalIcon:E7,Gamepad:N7,Gamepad2:P7,Gamepad2Icon:P7,GamepadIcon:N7,GanttChart:cu,GanttChartIcon:cu,GanttChartSquare:ts,GanttChartSquareIcon:ts,Gauge:R7,GaugeCircle:Iu,GaugeCircleIcon:Iu,GaugeIcon:R7,Gavel:j7,GavelIcon:j7,Gem:T7,GemIcon:T7,Ghost:D7,GhostIcon:D7,Gift:q7,GiftIcon:q7,GitBranch:O7,GitBranchIcon:O7,GitBranchPlus:z7,GitBranchPlusIcon:z7,GitCommit:l1,GitCommitHorizontal:l1,GitCommitHorizontalIcon:l1,GitCommitIcon:l1,GitCommitVertical:F7,GitCommitVerticalIcon:F7,GitCompare:H7,GitCompareArrows:B7,GitCompareArrowsIcon:B7,GitCompareIcon:H7,GitFork:V7,GitForkIcon:V7,GitGraph:U7,GitGraphIcon:U7,GitMerge:$7,GitMergeIcon:$7,GitPullRequest:Y7,GitPullRequestArrow:W7,GitPullRequestArrowIcon:W7,GitPullRequestClosed:G7,GitPullRequestClosedIcon:G7,GitPullRequestCreate:Z7,GitPullRequestCreateArrow:K7,GitPullRequestCreateArrowIcon:K7,GitPullRequestCreateIcon:Z7,GitPullRequestDraft:X7,GitPullRequestDraftIcon:X7,GitPullRequestIcon:Y7,Github:J7,GithubIcon:J7,Gitlab:Q7,GitlabIcon:Q7,GlassWater:eM,GlassWaterIcon:eM,Glasses:tM,GlassesIcon:tM,Globe:rM,Globe2:Xu,Globe2Icon:Xu,GlobeIcon:rM,GlobeLock:nM,GlobeLockIcon:nM,Goal:iM,GoalIcon:iM,Grab:aM,GrabIcon:aM,GraduationCap:oM,GraduationCapIcon:oM,Grape:sM,GrapeIcon:sM,Grid:es,Grid2X2:u1,Grid2X2Icon:u1,Grid2x2:u1,Grid2x2Check:cM,Grid2x2CheckIcon:cM,Grid2x2Icon:u1,Grid2x2Plus:lM,Grid2x2PlusIcon:lM,Grid2x2X:uM,Grid2x2XIcon:uM,Grid3X3:es,Grid3X3Icon:es,Grid3x3:es,Grid3x3Icon:es,GridIcon:es,Grip:fM,GripHorizontal:dM,GripHorizontalIcon:dM,GripIcon:fM,GripVertical:hM,GripVerticalIcon:hM,Group:pM,GroupIcon:pM,Guitar:yM,GuitarIcon:yM,Ham:gM,HamIcon:gM,Hammer:mM,HammerIcon:mM,Hand:bM,HandCoins:vM,HandCoinsIcon:vM,HandHeart:kM,HandHeartIcon:kM,HandHelping:d1,HandHelpingIcon:d1,HandIcon:bM,HandMetal:xM,HandMetalIcon:xM,HandPlatter:wM,HandPlatterIcon:wM,Handshake:MM,HandshakeIcon:MM,HardDrive:LM,HardDriveDownload:SM,HardDriveDownloadIcon:SM,HardDriveIcon:LM,HardDriveUpload:CM,HardDriveUploadIcon:CM,HardHat:IM,HardHatIcon:IM,Hash:AM,HashIcon:AM,Haze:_M,HazeIcon:_M,HdmiPort:EM,HdmiPortIcon:EM,Heading:qM,Heading1:PM,Heading1Icon:PM,Heading2:NM,Heading2Icon:NM,Heading3:RM,Heading3Icon:RM,Heading4:jM,Heading4Icon:jM,Heading5:TM,Heading5Icon:TM,Heading6:DM,Heading6Icon:DM,HeadingIcon:qM,HeadphoneOff:zM,HeadphoneOffIcon:zM,Headphones:OM,HeadphonesIcon:OM,Headset:FM,HeadsetIcon:FM,Heart:$M,HeartCrack:BM,HeartCrackIcon:BM,HeartHandshake:HM,HeartHandshakeIcon:HM,HeartIcon:$M,HeartOff:VM,HeartOffIcon:VM,HeartPulse:UM,HeartPulseIcon:UM,Heater:WM,HeaterIcon:WM,HelpCircle:Au,HelpCircleIcon:Au,HelpingHand:d1,HelpingHandIcon:d1,Hexagon:GM,HexagonIcon:GM,Highlighter:KM,HighlighterIcon:KM,History:ZM,HistoryIcon:ZM,Home:h1,HomeIcon:h1,Hop:YM,HopIcon:YM,HopOff:XM,HopOffIcon:XM,Hospital:JM,HospitalIcon:JM,Hotel:QM,HotelIcon:QM,Hourglass:e9,HourglassIcon:e9,House:h1,HouseIcon:h1,HousePlug:t9,HousePlugIcon:t9,HousePlus:n9,HousePlusIcon:n9,IceCream:p1,IceCream2:f1,IceCream2Icon:f1,IceCreamBowl:f1,IceCreamBowlIcon:f1,IceCreamCone:p1,IceCreamConeIcon:p1,IceCreamIcon:p1,Icon:Fue,IdCard:r9,IdCardIcon:r9,Image:pp,ImageDown:i9,ImageDownIcon:i9,ImageIcon:pp,ImageMinus:a9,ImageMinusIcon:a9,ImageOff:o9,ImageOffIcon:o9,ImagePlay:s9,ImagePlayIcon:s9,ImagePlus:c9,ImagePlusIcon:c9,ImageUp:l9,ImageUpIcon:l9,Images:u9,ImagesIcon:u9,Import:d9,ImportIcon:d9,Inbox:h9,InboxIcon:h9,Indent:g1,IndentDecrease:y1,IndentDecreaseIcon:y1,IndentIcon:g1,IndentIncrease:g1,IndentIncreaseIcon:g1,IndianRupee:f9,IndianRupeeIcon:f9,Infinity:p9,InfinityIcon:p9,Info:y9,InfoIcon:y9,Inspect:Ld,InspectIcon:Ld,InspectionPanel:g9,InspectionPanelIcon:g9,Instagram:m9,InstagramIcon:m9,Italic:v9,ItalicIcon:v9,IterationCcw:k9,IterationCcwIcon:k9,IterationCw:x9,IterationCwIcon:x9,JapaneseYen:w9,JapaneseYenIcon:w9,Joystick:b9,JoystickIcon:b9,Kanban:M9,KanbanIcon:M9,KanbanSquare:wd,KanbanSquareDashed:pd,KanbanSquareDashedIcon:pd,KanbanSquareIcon:wd,Key:L9,KeyIcon:L9,KeyRound:S9,KeyRoundIcon:S9,KeySquare:C9,KeySquareIcon:C9,Keyboard:_9,KeyboardIcon:_9,KeyboardMusic:I9,KeyboardMusicIcon:I9,KeyboardOff:A9,KeyboardOffIcon:A9,Lamp:T9,LampCeiling:E9,LampCeilingIcon:E9,LampDesk:P9,LampDeskIcon:P9,LampFloor:N9,LampFloorIcon:N9,LampIcon:T9,LampWallDown:R9,LampWallDownIcon:R9,LampWallUp:j9,LampWallUpIcon:j9,LandPlot:D9,LandPlotIcon:D9,Landmark:q9,LandmarkIcon:q9,Languages:z9,LanguagesIcon:z9,Laptop:O9,Laptop2:m1,Laptop2Icon:m1,LaptopIcon:O9,LaptopMinimal:m1,LaptopMinimalIcon:m1,Lasso:B9,LassoIcon:B9,LassoSelect:F9,LassoSelectIcon:F9,Laugh:H9,LaughIcon:H9,Layers:$9,Layers2:V9,Layers2Icon:V9,Layers3:U9,Layers3Icon:U9,LayersIcon:$9,Layout:R1,LayoutDashboard:yp,LayoutDashboardIcon:yp,LayoutGrid:W9,LayoutGridIcon:W9,LayoutIcon:R1,LayoutList:G9,LayoutListIcon:G9,LayoutPanelLeft:K9,LayoutPanelLeftIcon:K9,LayoutPanelTop:Z9,LayoutPanelTopIcon:Z9,LayoutTemplate:X9,LayoutTemplateIcon:X9,Leaf:Y9,LeafIcon:Y9,LeafyGreen:J9,LeafyGreenIcon:J9,Lectern:Q9,LecternIcon:Q9,LetterText:eS,LetterTextIcon:eS,Library:nS,LibraryBig:tS,LibraryBigIcon:tS,LibraryIcon:nS,LibrarySquare:bd,LibrarySquareIcon:bd,LifeBuoy:rS,LifeBuoyIcon:rS,Ligature:iS,LigatureIcon:iS,Lightbulb:oS,LightbulbIcon:oS,LightbulbOff:aS,LightbulbOffIcon:aS,LineChart:au,LineChartIcon:au,Link:lS,Link2:cS,Link2Icon:cS,Link2Off:sS,Link2OffIcon:sS,LinkIcon:lS,Linkedin:uS,LinkedinIcon:uS,List:LS,ListCheck:dS,ListCheckIcon:dS,ListChecks:hS,ListChecksIcon:hS,ListCollapse:fS,ListCollapseIcon:fS,ListEnd:pS,ListEndIcon:pS,ListFilter:yS,ListFilterIcon:yS,ListIcon:LS,ListMinus:gS,ListMinusIcon:gS,ListMusic:mS,ListMusicIcon:mS,ListOrdered:vS,ListOrderedIcon:vS,ListPlus:kS,ListPlusIcon:kS,ListRestart:xS,ListRestartIcon:xS,ListStart:wS,ListStartIcon:wS,ListTodo:bS,ListTodoIcon:bS,ListTree:MS,ListTreeIcon:MS,ListVideo:SS,ListVideoIcon:SS,ListX:CS,ListXIcon:CS,Loader:AS,Loader2:to,Loader2Icon:to,LoaderCircle:to,LoaderCircleIcon:to,LoaderIcon:AS,LoaderPinwheel:IS,LoaderPinwheelIcon:IS,Locate:PS,LocateFixed:_S,LocateFixedIcon:_S,LocateIcon:PS,LocateOff:ES,LocateOffIcon:ES,Lock:gp,LockIcon:gp,LockKeyhole:NS,LockKeyholeIcon:NS,LockKeyholeOpen:v1,LockKeyholeOpenIcon:v1,LockOpen:k1,LockOpenIcon:k1,LogIn:RS,LogInIcon:RS,LogOut:jS,LogOutIcon:jS,Logs:TS,LogsIcon:TS,Lollipop:DS,LollipopIcon:DS,LucideAArrowDown:Gm,LucideAArrowUp:Km,LucideALargeSmall:Zm,LucideAccessibility:Xm,LucideActivity:Ym,LucideActivitySquare:W1,LucideAirVent:Jm,LucideAirplay:Qm,LucideAlarmCheck:Dl,LucideAlarmClock:t5,LucideAlarmClockCheck:Dl,LucideAlarmClockMinus:ql,LucideAlarmClockOff:e5,LucideAlarmClockPlus:zl,LucideAlarmMinus:ql,LucideAlarmPlus:zl,LucideAlarmSmoke:n5,LucideAlbum:r5,LucideAlertCircle:du,LucideAlertOctagon:b1,LucideAlertTriangle:Kd,LucideAlignCenter:o5,LucideAlignCenterHorizontal:i5,LucideAlignCenterVertical:a5,LucideAlignEndHorizontal:s5,LucideAlignEndVertical:c5,LucideAlignHorizontalDistributeCenter:l5,LucideAlignHorizontalDistributeEnd:u5,LucideAlignHorizontalDistributeStart:d5,LucideAlignHorizontalJustifyCenter:h5,LucideAlignHorizontalJustifyEnd:f5,LucideAlignHorizontalJustifyStart:p5,LucideAlignHorizontalSpaceAround:y5,LucideAlignHorizontalSpaceBetween:g5,LucideAlignJustify:m5,LucideAlignLeft:v5,LucideAlignRight:k5,LucideAlignStartHorizontal:x5,LucideAlignStartVertical:w5,LucideAlignVerticalDistributeCenter:b5,LucideAlignVerticalDistributeEnd:M5,LucideAlignVerticalDistributeStart:S5,LucideAlignVerticalJustifyCenter:C5,LucideAlignVerticalJustifyEnd:L5,LucideAlignVerticalJustifyStart:I5,LucideAlignVerticalSpaceAround:A5,LucideAlignVerticalSpaceBetween:_5,LucideAmbulance:E5,LucideAmpersand:P5,LucideAmpersands:N5,LucideAmphora:R5,LucideAnchor:j5,LucideAngry:T5,LucideAnnoyed:D5,LucideAntenna:q5,LucideAnvil:z5,LucideAperture:O5,LucideAppWindow:B5,LucideAppWindowMac:F5,LucideApple:H5,LucideArchive:$5,LucideArchiveRestore:V5,LucideArchiveX:U5,LucideAreaChart:Jl,LucideArmchair:W5,LucideArrowBigDown:K5,LucideArrowBigDownDash:G5,LucideArrowBigLeft:X5,LucideArrowBigLeftDash:Z5,LucideArrowBigRight:J5,LucideArrowBigRightDash:Y5,LucideArrowBigUp:ev,LucideArrowBigUpDash:Q5,LucideArrowDown:uv,LucideArrowDown01:tv,LucideArrowDown10:nv,LucideArrowDownAZ:Ol,LucideArrowDownAz:Ol,LucideArrowDownCircle:hu,LucideArrowDownFromLine:rv,LucideArrowDownLeft:iv,LucideArrowDownLeftFromCircle:pu,LucideArrowDownLeftFromSquare:Y1,LucideArrowDownLeftSquare:G1,LucideArrowDownNarrowWide:av,LucideArrowDownRight:ov,LucideArrowDownRightFromCircle:yu,LucideArrowDownRightFromSquare:J1,LucideArrowDownRightSquare:K1,LucideArrowDownSquare:Z1,LucideArrowDownToDot:sv,LucideArrowDownToLine:cv,LucideArrowDownUp:lv,LucideArrowDownWideNarrow:Fl,LucideArrowDownZA:Bl,LucideArrowDownZa:Bl,LucideArrowLeft:fv,LucideArrowLeftCircle:fu,LucideArrowLeftFromLine:dv,LucideArrowLeftRight:op,LucideArrowLeftSquare:X1,LucideArrowLeftToLine:hv,LucideArrowRight:X2,LucideArrowRightCircle:vu,LucideArrowRightFromLine:pv,LucideArrowRightLeft:yv,LucideArrowRightSquare:td,LucideArrowRightToLine:gv,LucideArrowUp:Lv,LucideArrowUp01:mv,LucideArrowUp10:vv,LucideArrowUpAZ:Hl,LucideArrowUpAz:Hl,LucideArrowUpCircle:ku,LucideArrowUpDown:kv,LucideArrowUpFromDot:xv,LucideArrowUpFromLine:wv,LucideArrowUpLeft:bv,LucideArrowUpLeftFromCircle:gu,LucideArrowUpLeftFromSquare:Q1,LucideArrowUpLeftSquare:nd,LucideArrowUpNarrowWide:Vl,LucideArrowUpRight:Mv,LucideArrowUpRightFromCircle:mu,LucideArrowUpRightFromSquare:ed,LucideArrowUpRightSquare:rd,LucideArrowUpSquare:id,LucideArrowUpToLine:Sv,LucideArrowUpWideNarrow:Cv,LucideArrowUpZA:Ul,LucideArrowUpZa:Ul,LucideArrowsUpFromLine:Iv,LucideAsterisk:Av,LucideAsteriskSquare:ad,LucideAtSign:_v,LucideAtom:Ev,LucideAudioLines:Pv,LucideAudioWaveform:Nv,LucideAward:Rv,LucideAxe:jv,LucideAxis3D:$l,LucideAxis3d:$l,LucideBaby:Tv,LucideBackpack:Dv,LucideBadge:Jv,LucideBadgeAlert:qv,LucideBadgeCent:zv,LucideBadgeCheck:Wl,LucideBadgeDollarSign:Ov,LucideBadgeEuro:Fv,LucideBadgeHelp:Bv,LucideBadgeIndianRupee:Hv,LucideBadgeInfo:Vv,LucideBadgeJapaneseYen:Uv,LucideBadgeMinus:$v,LucideBadgePercent:Wv,LucideBadgePlus:Gv,LucideBadgePoundSterling:Kv,LucideBadgeRussianRuble:Zv,LucideBadgeSwissFranc:Xv,LucideBadgeX:Yv,LucideBaggageClaim:Qv,LucideBan:ek,LucideBanana:tk,LucideBandage:nk,LucideBanknote:rk,LucideBarChart:ou,LucideBarChart2:su,LucideBarChart3:iu,LucideBarChart4:ru,LucideBarChartBig:nu,LucideBarChartHorizontal:eu,LucideBarChartHorizontalBig:Ql,LucideBarcode:ik,LucideBaseline:ak,LucideBath:ok,LucideBattery:hk,LucideBatteryCharging:sk,LucideBatteryFull:ck,LucideBatteryLow:lk,LucideBatteryMedium:uk,LucideBatteryWarning:dk,LucideBeaker:fk,LucideBean:yk,LucideBeanOff:pk,LucideBed:vk,LucideBedDouble:gk,LucideBedSingle:mk,LucideBeef:kk,LucideBeer:wk,LucideBeerOff:xk,LucideBell:Ak,LucideBellDot:bk,LucideBellElectric:Mk,LucideBellMinus:Sk,LucideBellOff:Ck,LucideBellPlus:Lk,LucideBellRing:Ik,LucideBetweenHorizonalEnd:Gl,LucideBetweenHorizonalStart:Kl,LucideBetweenHorizontalEnd:Gl,LucideBetweenHorizontalStart:Kl,LucideBetweenVerticalEnd:_k,LucideBetweenVerticalStart:Ek,LucideBicepsFlexed:Pk,LucideBike:Nk,LucideBinary:Rk,LucideBinoculars:jk,LucideBiohazard:Tk,LucideBird:Dk,LucideBitcoin:qk,LucideBlend:zk,LucideBlinds:Ok,LucideBlocks:Fk,LucideBluetooth:Uk,LucideBluetoothConnected:Bk,LucideBluetoothOff:Hk,LucideBluetoothSearching:Vk,LucideBold:$k,LucideBolt:Wk,LucideBomb:Gk,LucideBone:Kk,LucideBook:m4,LucideBookA:Zk,LucideBookAudio:Xk,LucideBookCheck:Yk,LucideBookCopy:Jk,LucideBookDashed:Zl,LucideBookDown:Qk,LucideBookHeadphones:e4,LucideBookHeart:t4,LucideBookImage:n4,LucideBookKey:r4,LucideBookLock:i4,LucideBookMarked:a4,LucideBookMinus:o4,LucideBookOpen:l4,LucideBookOpenCheck:s4,LucideBookOpenText:c4,LucideBookPlus:u4,LucideBookTemplate:Zl,LucideBookText:d4,LucideBookType:h4,LucideBookUp:p4,LucideBookUp2:f4,LucideBookUser:y4,LucideBookX:g4,LucideBookmark:b4,LucideBookmarkCheck:v4,LucideBookmarkMinus:k4,LucideBookmarkPlus:x4,LucideBookmarkX:w4,LucideBoomBox:M4,LucideBot:L4,LucideBotMessageSquare:S4,LucideBotOff:C4,LucideBox:I4,LucideBoxSelect:gd,LucideBoxes:A4,LucideBraces:Xl,LucideBrackets:_4,LucideBrain:N4,LucideBrainCircuit:E4,LucideBrainCog:P4,LucideBrickWall:R4,LucideBriefcase:q4,LucideBriefcaseBusiness:j4,LucideBriefcaseConveyorBelt:T4,LucideBriefcaseMedical:D4,LucideBringToFront:z4,LucideBrush:O4,LucideBug:H4,LucideBugOff:F4,LucideBugPlay:B4,LucideBuilding:U4,LucideBuilding2:V4,LucideBus:W4,LucideBusFront:$4,LucideCable:K4,LucideCableCar:G4,LucideCake:X4,LucideCakeSlice:Z4,LucideCalculator:Y4,LucideCalendar:m3,LucideCalendar1:J4,LucideCalendarArrowDown:Q4,LucideCalendarArrowUp:e3,LucideCalendarCheck:n3,LucideCalendarCheck2:t3,LucideCalendarClock:r3,LucideCalendarCog:i3,LucideCalendarDays:a3,LucideCalendarFold:o3,LucideCalendarHeart:s3,LucideCalendarMinus:l3,LucideCalendarMinus2:c3,LucideCalendarOff:u3,LucideCalendarPlus:h3,LucideCalendarPlus2:d3,LucideCalendarRange:f3,LucideCalendarSearch:p3,LucideCalendarX:g3,LucideCalendarX2:y3,LucideCamera:k3,LucideCameraOff:v3,LucideCandlestickChart:tu,LucideCandy:b3,LucideCandyCane:x3,LucideCandyOff:w3,LucideCannabis:M3,LucideCaptions:Yl,LucideCaptionsOff:S3,LucideCar:I3,LucideCarFront:C3,LucideCarTaxiFront:L3,LucideCaravan:A3,LucideCarrot:_3,LucideCaseLower:E3,LucideCaseSensitive:P3,LucideCaseUpper:N3,LucideCassetteTape:R3,LucideCast:j3,LucideCastle:T3,LucideCat:D3,LucideCctv:q3,LucideChartArea:Jl,LucideChartBar:eu,LucideChartBarBig:Ql,LucideChartBarDecreasing:z3,LucideChartBarIncreasing:O3,LucideChartBarStacked:F3,LucideChartCandlestick:tu,LucideChartColumn:iu,LucideChartColumnBig:nu,LucideChartColumnDecreasing:B3,LucideChartColumnIncreasing:ru,LucideChartColumnStacked:H3,LucideChartGantt:V3,LucideChartLine:au,LucideChartNetwork:U3,LucideChartNoAxesColumn:su,LucideChartNoAxesColumnDecreasing:$3,LucideChartNoAxesColumnIncreasing:ou,LucideChartNoAxesCombined:W3,LucideChartNoAxesGantt:cu,LucideChartPie:lu,LucideChartScatter:uu,LucideChartSpline:G3,LucideCheck:Jc,LucideCheckCheck:K3,LucideCheckCircle:xu,LucideCheckCircle2:wu,LucideCheckSquare:sd,LucideCheckSquare2:cd,LucideChefHat:Z3,LucideCherry:X3,LucideChevronDown:Y3,LucideChevronDownCircle:bu,LucideChevronDownSquare:ld,LucideChevronFirst:J3,LucideChevronLast:Q3,LucideChevronLeft:ex,LucideChevronLeftCircle:Mu,LucideChevronLeftSquare:ud,LucideChevronRight:tx,LucideChevronRightCircle:Su,LucideChevronRightSquare:dd,LucideChevronUp:nx,LucideChevronUpCircle:Cu,LucideChevronUpSquare:hd,LucideChevronsDown:ix,LucideChevronsDownUp:rx,LucideChevronsLeft:sx,LucideChevronsLeftRight:ox,LucideChevronsLeftRightEllipsis:ax,LucideChevronsRight:lx,LucideChevronsRightLeft:cx,LucideChevronsUp:ux,LucideChevronsUpDown:sp,LucideChrome:dx,LucideChurch:hx,LucideCigarette:px,LucideCigaretteOff:fx,LucideCircle:cp,LucideCircleAlert:du,LucideCircleArrowDown:hu,LucideCircleArrowLeft:fu,LucideCircleArrowOutDownLeft:pu,LucideCircleArrowOutDownRight:yu,LucideCircleArrowOutUpLeft:gu,LucideCircleArrowOutUpRight:mu,LucideCircleArrowRight:vu,LucideCircleArrowUp:ku,LucideCircleCheck:wu,LucideCircleCheckBig:xu,LucideCircleChevronDown:bu,LucideCircleChevronLeft:Mu,LucideCircleChevronRight:Su,LucideCircleChevronUp:Cu,LucideCircleDashed:yx,LucideCircleDivide:Lu,LucideCircleDollarSign:gx,LucideCircleDot:vx,LucideCircleDotDashed:mx,LucideCircleEllipsis:kx,LucideCircleEqual:xx,LucideCircleFadingArrowUp:wx,LucideCircleFadingPlus:bx,LucideCircleGauge:Iu,LucideCircleHelp:Au,LucideCircleMinus:_u,LucideCircleOff:Mx,LucideCircleParking:Pu,LucideCircleParkingOff:Eu,LucideCirclePause:Nu,LucideCirclePercent:Ru,LucideCirclePlay:ju,LucideCirclePlus:Tu,LucideCirclePower:Du,LucideCircleSlash:Sx,LucideCircleSlash2:qu,LucideCircleSlashed:qu,LucideCircleStop:zu,LucideCircleUser:Fu,LucideCircleUserRound:Ou,LucideCircleX:Bu,LucideCircuitBoard:Cx,LucideCitrus:Lx,LucideClapperboard:Ix,LucideClipboard:Dx,LucideClipboardCheck:Ax,LucideClipboardCopy:_x,LucideClipboardEdit:Vu,LucideClipboardList:Ex,LucideClipboardMinus:Px,LucideClipboardPaste:Nx,LucideClipboardPen:Vu,LucideClipboardPenLine:Hu,LucideClipboardPlus:Rx,LucideClipboardSignature:Hu,LucideClipboardType:jx,LucideClipboardX:Tx,LucideClock:Jx,LucideClock1:qx,LucideClock10:zx,LucideClock11:Ox,LucideClock12:Fx,LucideClock2:Bx,LucideClock3:Hx,LucideClock4:Vx,LucideClock5:Ux,LucideClock6:$x,LucideClock7:Wx,LucideClock8:Gx,LucideClock9:Kx,LucideClockAlert:Zx,LucideClockArrowDown:Xx,LucideClockArrowUp:Yx,LucideCloud:lp,LucideCloudCog:Qx,LucideCloudDownload:Uu,LucideCloudDrizzle:ew,LucideCloudFog:tw,LucideCloudHail:nw,LucideCloudLightning:rw,LucideCloudMoon:aw,LucideCloudMoonRain:iw,LucideCloudOff:ow,LucideCloudRain:cw,LucideCloudRainWind:sw,LucideCloudSnow:lw,LucideCloudSun:dw,LucideCloudSunRain:uw,LucideCloudUpload:$u,LucideCloudy:hw,LucideClover:fw,LucideClub:pw,LucideCode:yw,LucideCode2:Wu,LucideCodeSquare:fd,LucideCodeXml:Wu,LucideCodepen:gw,LucideCodesandbox:mw,LucideCoffee:vw,LucideCog:kw,LucideCoins:xw,LucideColumns:Gu,LucideColumns2:Gu,LucideColumns3:Tc,LucideColumns4:ww,LucideCombine:bw,LucideCommand:Mw,LucideCompass:Sw,LucideComponent:Cw,LucideComputer:Lw,LucideConciergeBell:Iw,LucideCone:Aw,LucideConstruction:_w,LucideContact:Ew,LucideContact2:Ku,LucideContactRound:Ku,LucideContainer:Pw,LucideContrast:Nw,LucideCookie:Rw,LucideCookingPot:jw,LucideCopy:Y2,LucideCopyCheck:Tw,LucideCopyMinus:Dw,LucideCopyPlus:qw,LucideCopySlash:zw,LucideCopyX:Ow,LucideCopyleft:Fw,LucideCopyright:Bw,LucideCornerDownLeft:Hw,LucideCornerDownRight:Vw,LucideCornerLeftDown:Uw,LucideCornerLeftUp:$w,LucideCornerRightDown:Ww,LucideCornerRightUp:Gw,LucideCornerUpLeft:Kw,LucideCornerUpRight:Zw,LucideCpu:Xw,LucideCreativeCommons:Yw,LucideCreditCard:Jw,LucideCroissant:Qw,LucideCrop:e6,LucideCross:t6,LucideCrosshair:n6,LucideCrown:r6,LucideCuboid:i6,LucideCupSoda:a6,LucideCurlyBraces:Xl,LucideCurrency:o6,LucideCylinder:s6,LucideDam:c6,LucideDatabase:up,LucideDatabaseBackup:l6,LucideDatabaseZap:u6,LucideDelete:d6,LucideDessert:h6,LucideDiameter:f6,LucideDiamond:g6,LucideDiamondMinus:p6,LucideDiamondPercent:Zu,LucideDiamondPlus:y6,LucideDice1:m6,LucideDice2:v6,LucideDice3:k6,LucideDice4:x6,LucideDice5:w6,LucideDice6:b6,LucideDices:M6,LucideDiff:S6,LucideDisc:A6,LucideDisc2:C6,LucideDisc3:L6,LucideDiscAlbum:I6,LucideDivide:_6,LucideDivideCircle:Lu,LucideDivideSquare:md,LucideDna:P6,LucideDnaOff:E6,LucideDock:N6,LucideDog:R6,LucideDollarSign:j6,LucideDonut:T6,LucideDoorClosed:D6,LucideDoorOpen:q6,LucideDot:z6,LucideDotSquare:vd,LucideDownload:O6,LucideDownloadCloud:Uu,LucideDraftingCompass:F6,LucideDrama:B6,LucideDribbble:H6,LucideDrill:V6,LucideDroplet:U6,LucideDroplets:$6,LucideDrum:W6,LucideDrumstick:G6,LucideDumbbell:K6,LucideEar:X6,LucideEarOff:Z6,LucideEarth:Xu,LucideEarthLock:Y6,LucideEclipse:J6,LucideEdit:Ea,LucideEdit2:T1,LucideEdit3:j1,LucideEgg:t8,LucideEggFried:Q6,LucideEggOff:e8,LucideEllipsis:Ju,LucideEllipsisVertical:Yu,LucideEqual:r8,LucideEqualNot:n8,LucideEqualSquare:kd,LucideEraser:i8,LucideEthernetPort:a8,LucideEuro:o8,LucideExpand:s8,LucideExternalLink:dp,LucideEye:u8,LucideEyeClosed:c8,LucideEyeOff:l8,LucideFacebook:d8,LucideFactory:h8,LucideFan:f8,LucideFastForward:p8,LucideFeather:y8,LucideFence:g8,LucideFerrisWheel:m8,LucideFigma:v8,LucideFile:pb,LucideFileArchive:k8,LucideFileAudio:w8,LucideFileAudio2:x8,LucideFileAxis3D:Qu,LucideFileAxis3d:Qu,LucideFileBadge:M8,LucideFileBadge2:b8,LucideFileBarChart:e1,LucideFileBarChart2:t1,LucideFileBox:S8,LucideFileChartColumn:t1,LucideFileChartColumnIncreasing:e1,LucideFileChartLine:n1,LucideFileChartPie:r1,LucideFileCheck:L8,LucideFileCheck2:C8,LucideFileClock:I8,LucideFileCode:_8,LucideFileCode2:A8,LucideFileCog:i1,LucideFileCog2:i1,LucideFileDiff:E8,LucideFileDigit:P8,LucideFileDown:hp,LucideFileEdit:o1,LucideFileHeart:N8,LucideFileImage:R8,LucideFileInput:j8,LucideFileJson:D8,LucideFileJson2:T8,LucideFileKey:z8,LucideFileKey2:q8,LucideFileLineChart:n1,LucideFileLock:F8,LucideFileLock2:O8,LucideFileMinus:H8,LucideFileMinus2:B8,LucideFileMusic:V8,LucideFileOutput:U8,LucideFilePen:o1,LucideFilePenLine:a1,LucideFilePieChart:r1,LucideFilePlus:W8,LucideFilePlus2:$8,LucideFileQuestion:G8,LucideFileScan:K8,LucideFileSearch:X8,LucideFileSearch2:Z8,LucideFileSignature:a1,LucideFileSliders:Y8,LucideFileSpreadsheet:J8,LucideFileStack:Q8,LucideFileSymlink:eb,LucideFileTerminal:tb,LucideFileText:nb,LucideFileType:ib,LucideFileType2:rb,LucideFileUp:ab,LucideFileUser:ob,LucideFileVideo:cb,LucideFileVideo2:sb,LucideFileVolume:ub,LucideFileVolume2:lb,LucideFileWarning:db,LucideFileX:fb,LucideFileX2:hb,LucideFiles:yb,LucideFilm:gb,LucideFilter:vb,LucideFilterX:mb,LucideFingerprint:kb,LucideFireExtinguisher:xb,LucideFish:Mb,LucideFishOff:wb,LucideFishSymbol:bb,LucideFlag:Ib,LucideFlagOff:Sb,LucideFlagTriangleLeft:Cb,LucideFlagTriangleRight:Lb,LucideFlame:_b,LucideFlameKindling:Ab,LucideFlashlight:Pb,LucideFlashlightOff:Eb,LucideFlaskConical:Rb,LucideFlaskConicalOff:Nb,LucideFlaskRound:jb,LucideFlipHorizontal:Db,LucideFlipHorizontal2:Tb,LucideFlipVertical:zb,LucideFlipVertical2:qb,LucideFlower:Fb,LucideFlower2:Ob,LucideFocus:Bb,LucideFoldHorizontal:Hb,LucideFoldVertical:Vb,LucideFolder:g7,LucideFolderArchive:Ub,LucideFolderCheck:$b,LucideFolderClock:Wb,LucideFolderClosed:Gb,LucideFolderCode:Kb,LucideFolderCog:s1,LucideFolderCog2:s1,LucideFolderDot:Zb,LucideFolderDown:Xb,LucideFolderEdit:c1,LucideFolderGit:Jb,LucideFolderGit2:Yb,LucideFolderHeart:Qb,LucideFolderInput:e7,LucideFolderKanban:t7,LucideFolderKey:n7,LucideFolderLock:r7,LucideFolderMinus:i7,LucideFolderOpen:fp,LucideFolderOpenDot:a7,LucideFolderOutput:o7,LucideFolderPen:c1,LucideFolderPlus:s7,LucideFolderRoot:c7,LucideFolderSearch:u7,LucideFolderSearch2:l7,LucideFolderSymlink:d7,LucideFolderSync:h7,LucideFolderTree:f7,LucideFolderUp:p7,LucideFolderX:y7,LucideFolders:m7,LucideFootprints:v7,LucideForkKnife:ah,LucideForkKnifeCrossed:ih,LucideForklift:k7,LucideFormInput:q1,LucideForward:x7,LucideFrame:w7,LucideFramer:b7,LucideFrown:M7,LucideFuel:S7,LucideFullscreen:C7,LucideFunctionSquare:xd,LucideGalleryHorizontal:I7,LucideGalleryHorizontalEnd:L7,LucideGalleryThumbnails:A7,LucideGalleryVertical:E7,LucideGalleryVerticalEnd:_7,LucideGamepad:N7,LucideGamepad2:P7,LucideGanttChart:cu,LucideGanttChartSquare:ts,LucideGauge:R7,LucideGaugeCircle:Iu,LucideGavel:j7,LucideGem:T7,LucideGhost:D7,LucideGift:q7,LucideGitBranch:O7,LucideGitBranchPlus:z7,LucideGitCommit:l1,LucideGitCommitHorizontal:l1,LucideGitCommitVertical:F7,LucideGitCompare:H7,LucideGitCompareArrows:B7,LucideGitFork:V7,LucideGitGraph:U7,LucideGitMerge:$7,LucideGitPullRequest:Y7,LucideGitPullRequestArrow:W7,LucideGitPullRequestClosed:G7,LucideGitPullRequestCreate:Z7,LucideGitPullRequestCreateArrow:K7,LucideGitPullRequestDraft:X7,LucideGithub:J7,LucideGitlab:Q7,LucideGlassWater:eM,LucideGlasses:tM,LucideGlobe:rM,LucideGlobe2:Xu,LucideGlobeLock:nM,LucideGoal:iM,LucideGrab:aM,LucideGraduationCap:oM,LucideGrape:sM,LucideGrid:es,LucideGrid2X2:u1,LucideGrid2x2:u1,LucideGrid2x2Check:cM,LucideGrid2x2Plus:lM,LucideGrid2x2X:uM,LucideGrid3X3:es,LucideGrid3x3:es,LucideGrip:fM,LucideGripHorizontal:dM,LucideGripVertical:hM,LucideGroup:pM,LucideGuitar:yM,LucideHam:gM,LucideHammer:mM,LucideHand:bM,LucideHandCoins:vM,LucideHandHeart:kM,LucideHandHelping:d1,LucideHandMetal:xM,LucideHandPlatter:wM,LucideHandshake:MM,LucideHardDrive:LM,LucideHardDriveDownload:SM,LucideHardDriveUpload:CM,LucideHardHat:IM,LucideHash:AM,LucideHaze:_M,LucideHdmiPort:EM,LucideHeading:qM,LucideHeading1:PM,LucideHeading2:NM,LucideHeading3:RM,LucideHeading4:jM,LucideHeading5:TM,LucideHeading6:DM,LucideHeadphoneOff:zM,LucideHeadphones:OM,LucideHeadset:FM,LucideHeart:$M,LucideHeartCrack:BM,LucideHeartHandshake:HM,LucideHeartOff:VM,LucideHeartPulse:UM,LucideHeater:WM,LucideHelpCircle:Au,LucideHelpingHand:d1,LucideHexagon:GM,LucideHighlighter:KM,LucideHistory:ZM,LucideHome:h1,LucideHop:YM,LucideHopOff:XM,LucideHospital:JM,LucideHotel:QM,LucideHourglass:e9,LucideHouse:h1,LucideHousePlug:t9,LucideHousePlus:n9,LucideIceCream:p1,LucideIceCream2:f1,LucideIceCreamBowl:f1,LucideIceCreamCone:p1,LucideIdCard:r9,LucideImage:pp,LucideImageDown:i9,LucideImageMinus:a9,LucideImageOff:o9,LucideImagePlay:s9,LucideImagePlus:c9,LucideImageUp:l9,LucideImages:u9,LucideImport:d9,LucideInbox:h9,LucideIndent:g1,LucideIndentDecrease:y1,LucideIndentIncrease:g1,LucideIndianRupee:f9,LucideInfinity:p9,LucideInfo:y9,LucideInspect:Ld,LucideInspectionPanel:g9,LucideInstagram:m9,LucideItalic:v9,LucideIterationCcw:k9,LucideIterationCw:x9,LucideJapaneseYen:w9,LucideJoystick:b9,LucideKanban:M9,LucideKanbanSquare:wd,LucideKanbanSquareDashed:pd,LucideKey:L9,LucideKeyRound:S9,LucideKeySquare:C9,LucideKeyboard:_9,LucideKeyboardMusic:I9,LucideKeyboardOff:A9,LucideLamp:T9,LucideLampCeiling:E9,LucideLampDesk:P9,LucideLampFloor:N9,LucideLampWallDown:R9,LucideLampWallUp:j9,LucideLandPlot:D9,LucideLandmark:q9,LucideLanguages:z9,LucideLaptop:O9,LucideLaptop2:m1,LucideLaptopMinimal:m1,LucideLasso:B9,LucideLassoSelect:F9,LucideLaugh:H9,LucideLayers:$9,LucideLayers2:V9,LucideLayers3:U9,LucideLayout:R1,LucideLayoutDashboard:yp,LucideLayoutGrid:W9,LucideLayoutList:G9,LucideLayoutPanelLeft:K9,LucideLayoutPanelTop:Z9,LucideLayoutTemplate:X9,LucideLeaf:Y9,LucideLeafyGreen:J9,LucideLectern:Q9,LucideLetterText:eS,LucideLibrary:nS,LucideLibraryBig:tS,LucideLibrarySquare:bd,LucideLifeBuoy:rS,LucideLigature:iS,LucideLightbulb:oS,LucideLightbulbOff:aS,LucideLineChart:au,LucideLink:lS,LucideLink2:cS,LucideLink2Off:sS,LucideLinkedin:uS,LucideList:LS,LucideListCheck:dS,LucideListChecks:hS,LucideListCollapse:fS,LucideListEnd:pS,LucideListFilter:yS,LucideListMinus:gS,LucideListMusic:mS,LucideListOrdered:vS,LucideListPlus:kS,LucideListRestart:xS,LucideListStart:wS,LucideListTodo:bS,LucideListTree:MS,LucideListVideo:SS,LucideListX:CS,LucideLoader:AS,LucideLoader2:to,LucideLoaderCircle:to,LucideLoaderPinwheel:IS,LucideLocate:PS,LucideLocateFixed:_S,LucideLocateOff:ES,LucideLock:gp,LucideLockKeyhole:NS,LucideLockKeyholeOpen:v1,LucideLockOpen:k1,LucideLogIn:RS,LucideLogOut:jS,LucideLogs:TS,LucideLollipop:DS,LucideLuggage:qS,LucideMSquare:Md,LucideMagnet:zS,LucideMail:GS,LucideMailCheck:OS,LucideMailMinus:FS,LucideMailOpen:BS,LucideMailPlus:HS,LucideMailQuestion:VS,LucideMailSearch:US,LucideMailWarning:$S,LucideMailX:WS,LucideMailbox:KS,LucideMails:ZS,LucideMap:cC,LucideMapPin:oC,LucideMapPinCheck:YS,LucideMapPinCheckInside:XS,LucideMapPinHouse:JS,LucideMapPinMinus:eC,LucideMapPinMinusInside:QS,LucideMapPinOff:tC,LucideMapPinPlus:rC,LucideMapPinPlusInside:nC,LucideMapPinX:aC,LucideMapPinXInside:iC,LucideMapPinned:sC,LucideMartini:lC,LucideMaximize:uC,LucideMaximize2:mp,LucideMedal:dC,LucideMegaphone:fC,LucideMegaphoneOff:hC,LucideMeh:pC,LucideMemoryStick:yC,LucideMenu:gC,LucideMenuSquare:Sd,LucideMerge:mC,LucideMessageCircle:AC,LucideMessageCircleCode:vC,LucideMessageCircleDashed:kC,LucideMessageCircleHeart:xC,LucideMessageCircleMore:wC,LucideMessageCircleOff:bC,LucideMessageCirclePlus:MC,LucideMessageCircleQuestion:SC,LucideMessageCircleReply:CC,LucideMessageCircleWarning:LC,LucideMessageCircleX:IC,LucideMessageSquare:UC,LucideMessageSquareCode:_C,LucideMessageSquareDashed:EC,LucideMessageSquareDiff:PC,LucideMessageSquareDot:NC,LucideMessageSquareHeart:RC,LucideMessageSquareLock:jC,LucideMessageSquareMore:TC,LucideMessageSquareOff:DC,LucideMessageSquarePlus:qC,LucideMessageSquareQuote:zC,LucideMessageSquareReply:OC,LucideMessageSquareShare:FC,LucideMessageSquareText:BC,LucideMessageSquareWarning:HC,LucideMessageSquareX:VC,LucideMessagesSquare:$C,LucideMic:GC,LucideMic2:x1,LucideMicOff:WC,LucideMicVocal:x1,LucideMicrochip:KC,LucideMicroscope:ZC,LucideMicrowave:XC,LucideMilestone:YC,LucideMilk:QC,LucideMilkOff:JC,LucideMinimize:tL,LucideMinimize2:eL,LucideMinus:vp,LucideMinusCircle:_u,LucideMinusSquare:Cd,LucideMonitor:pL,LucideMonitorCheck:nL,LucideMonitorCog:rL,LucideMonitorDot:iL,LucideMonitorDown:aL,LucideMonitorOff:oL,LucideMonitorPause:sL,LucideMonitorPlay:cL,LucideMonitorSmartphone:lL,LucideMonitorSpeaker:uL,LucideMonitorStop:dL,LucideMonitorUp:hL,LucideMonitorX:fL,LucideMoon:gL,LucideMoonStar:yL,LucideMoreHorizontal:Ju,LucideMoreVertical:Yu,LucideMountain:vL,LucideMountainSnow:mL,LucideMouse:SL,LucideMouseOff:kL,LucideMousePointer:ML,LucideMousePointer2:xL,LucideMousePointerBan:wL,LucideMousePointerClick:bL,LucideMousePointerSquareDashed:yd,LucideMove:DL,LucideMove3D:w1,LucideMove3d:w1,LucideMoveDiagonal:LL,LucideMoveDiagonal2:CL,LucideMoveDown:_L,LucideMoveDownLeft:IL,LucideMoveDownRight:AL,LucideMoveHorizontal:EL,LucideMoveLeft:kp,LucideMoveRight:PL,LucideMoveUp:jL,LucideMoveUpLeft:NL,LucideMoveUpRight:RL,LucideMoveVertical:TL,LucideMusic:FL,LucideMusic2:qL,LucideMusic3:zL,LucideMusic4:OL,LucideNavigation:UL,LucideNavigation2:HL,LucideNavigation2Off:BL,LucideNavigationOff:VL,LucideNetwork:$L,LucideNewspaper:WL,LucideNfc:GL,LucideNotebook:YL,LucideNotebookPen:KL,LucideNotebookTabs:ZL,LucideNotebookText:XL,LucideNotepadText:QL,LucideNotepadTextDashed:JL,LucideNut:tI,LucideNutOff:eI,LucideOctagon:rI,LucideOctagonAlert:b1,LucideOctagonMinus:nI,LucideOctagonPause:M1,LucideOctagonX:S1,LucideOmega:iI,LucideOption:aI,LucideOrbit:oI,LucideOrigami:sI,LucideOutdent:y1,LucidePackage:yI,LucidePackage2:cI,LucidePackageCheck:lI,LucidePackageMinus:uI,LucidePackageOpen:dI,LucidePackagePlus:hI,LucidePackageSearch:fI,LucidePackageX:pI,LucidePaintBucket:gI,LucidePaintRoller:mI,LucidePaintbrush:vI,LucidePaintbrush2:C1,LucidePaintbrushVertical:C1,LucidePalette:kI,LucidePalmtree:Gd,LucidePanelBottom:bI,LucidePanelBottomClose:xI,LucidePanelBottomDashed:L1,LucidePanelBottomInactive:L1,LucidePanelBottomOpen:wI,LucidePanelLeft:E1,LucidePanelLeftClose:I1,LucidePanelLeftDashed:A1,LucidePanelLeftInactive:A1,LucidePanelLeftOpen:_1,LucidePanelRight:CI,LucidePanelRightClose:MI,LucidePanelRightDashed:P1,LucidePanelRightInactive:P1,LucidePanelRightOpen:SI,LucidePanelTop:AI,LucidePanelTopClose:LI,LucidePanelTopDashed:N1,LucidePanelTopInactive:N1,LucidePanelTopOpen:II,LucidePanelsLeftBottom:_I,LucidePanelsLeftRight:Tc,LucidePanelsRightBottom:EI,LucidePanelsTopBottom:F1,LucidePanelsTopLeft:R1,LucidePaperclip:PI,LucideParentheses:NI,LucideParkingCircle:Pu,LucideParkingCircleOff:Eu,LucideParkingMeter:RI,LucideParkingSquare:Ad,LucideParkingSquareOff:Id,LucidePartyPopper:jI,LucidePause:TI,LucidePauseCircle:Nu,LucidePauseOctagon:M1,LucidePawPrint:DI,LucidePcCase:qI,LucidePen:T1,LucidePenBox:Ea,LucidePenLine:j1,LucidePenOff:zI,LucidePenSquare:Ea,LucidePenTool:OI,LucidePencil:HI,LucidePencilLine:xp,LucidePencilOff:FI,LucidePencilRuler:BI,LucidePentagon:VI,LucidePercent:UI,LucidePercentCircle:Ru,LucidePercentDiamond:Zu,LucidePercentSquare:_d,LucidePersonStanding:$I,LucidePhilippinePeso:WI,LucidePhone:QI,LucidePhoneCall:GI,LucidePhoneForwarded:KI,LucidePhoneIncoming:ZI,LucidePhoneMissed:XI,LucidePhoneOff:YI,LucidePhoneOutgoing:JI,LucidePi:eA,LucidePiSquare:Ed,LucidePiano:tA,LucidePickaxe:nA,LucidePictureInPicture:iA,LucidePictureInPicture2:rA,LucidePieChart:lu,LucidePiggyBank:aA,LucidePilcrow:cA,LucidePilcrowLeft:oA,LucidePilcrowRight:sA,LucidePilcrowSquare:Pd,LucidePill:uA,LucidePillBottle:lA,LucidePin:hA,LucidePinOff:dA,LucidePipette:fA,LucidePizza:pA,LucidePlane:mA,LucidePlaneLanding:yA,LucidePlaneTakeoff:gA,LucidePlay:wp,LucidePlayCircle:ju,LucidePlaySquare:Nd,LucidePlug:kA,LucidePlug2:vA,LucidePlugZap:D1,LucidePlugZap2:D1,LucidePlus:bp,LucidePlusCircle:Tu,LucidePlusSquare:Rd,LucidePocket:wA,LucidePocketKnife:xA,LucidePodcast:bA,LucidePointer:SA,LucidePointerOff:MA,LucidePopcorn:CA,LucidePopsicle:LA,LucidePoundSterling:IA,LucidePower:_A,LucidePowerCircle:Du,LucidePowerOff:AA,LucidePowerSquare:jd,LucidePresentation:EA,LucidePrinter:NA,LucidePrinterCheck:PA,LucideProjector:RA,LucideProportions:jA,LucidePuzzle:TA,LucidePyramid:DA,LucideQrCode:qA,LucideQuote:zA,LucideRabbit:OA,LucideRadar:FA,LucideRadiation:BA,LucideRadical:HA,LucideRadio:$A,LucideRadioReceiver:VA,LucideRadioTower:UA,LucideRadius:WA,LucideRailSymbol:GA,LucideRainbow:KA,LucideRat:ZA,LucideRatio:XA,LucideReceipt:a_,LucideReceiptCent:YA,LucideReceiptEuro:JA,LucideReceiptIndianRupee:QA,LucideReceiptJapaneseYen:e_,LucideReceiptPoundSterling:t_,LucideReceiptRussianRuble:n_,LucideReceiptSwissFranc:r_,LucideReceiptText:i_,LucideRectangleEllipsis:q1,LucideRectangleHorizontal:o_,LucideRectangleVertical:s_,LucideRecycle:c_,LucideRedo:d_,LucideRedo2:l_,LucideRedoDot:u_,LucideRefreshCcw:f_,LucideRefreshCcwDot:h_,LucideRefreshCw:Mp,LucideRefreshCwOff:p_,LucideRefrigerator:y_,LucideRegex:g_,LucideRemoveFormatting:m_,LucideRepeat:x_,LucideRepeat1:v_,LucideRepeat2:k_,LucideReplace:b_,LucideReplaceAll:w_,LucideReply:S_,LucideReplyAll:M_,LucideRewind:C_,LucideRibbon:L_,LucideRocket:I_,LucideRockingChair:A_,LucideRollerCoaster:__,LucideRotate3D:z1,LucideRotate3d:z1,LucideRotateCcw:P_,LucideRotateCcwSquare:E_,LucideRotateCw:R_,LucideRotateCwSquare:N_,LucideRoute:T_,LucideRouteOff:j_,LucideRouter:D_,LucideRows:O1,LucideRows2:O1,LucideRows3:F1,LucideRows4:q_,LucideRss:z_,LucideRuler:O_,LucideRussianRuble:F_,LucideSailboat:B_,LucideSalad:H_,LucideSandwich:V_,LucideSatellite:$_,LucideSatelliteDish:U_,LucideSave:K_,LucideSaveAll:W_,LucideSaveOff:G_,LucideScale:Z_,LucideScale3D:B1,LucideScale3d:B1,LucideScaling:X_,LucideScan:iE,LucideScanBarcode:Y_,LucideScanEye:J_,LucideScanFace:Q_,LucideScanLine:eE,LucideScanQrCode:tE,LucideScanSearch:nE,LucideScanText:rE,LucideScatterChart:uu,LucideSchool:aE,LucideSchool2:Xd,LucideScissors:sE,LucideScissorsLineDashed:oE,LucideScissorsSquare:Td,LucideScissorsSquareDashedBottom:od,LucideScreenShare:lE,LucideScreenShareOff:cE,LucideScroll:dE,LucideScrollText:uE,LucideSearch:Sp,LucideSearchCheck:hE,LucideSearchCode:fE,LucideSearchSlash:pE,LucideSearchX:yE,LucideSection:gE,LucideSend:vE,LucideSendHorizonal:H1,LucideSendHorizontal:H1,LucideSendToBack:mE,LucideSeparatorHorizontal:kE,LucideSeparatorVertical:xE,LucideServer:Cp,LucideServerCog:wE,LucideServerCrash:bE,LucideServerOff:ME,LucideSettings:CE,LucideSettings2:SE,LucideShapes:Lp,LucideShare:LE,LucideShare2:Ip,LucideSheet:IE,LucideShell:AE,LucideShield:zE,LucideShieldAlert:_E,LucideShieldBan:EE,LucideShieldCheck:PE,LucideShieldClose:V1,LucideShieldEllipsis:NE,LucideShieldHalf:RE,LucideShieldMinus:jE,LucideShieldOff:TE,LucideShieldPlus:DE,LucideShieldQuestion:qE,LucideShieldX:V1,LucideShip:FE,LucideShipWheel:OE,LucideShirt:BE,LucideShoppingBag:HE,LucideShoppingBasket:VE,LucideShoppingCart:UE,LucideShovel:$E,LucideShowerHead:WE,LucideShrink:GE,LucideShrub:KE,LucideShuffle:ZE,LucideSidebar:E1,LucideSidebarClose:I1,LucideSidebarOpen:_1,LucideSigma:XE,LucideSigmaSquare:Dd,LucideSignal:tP,LucideSignalHigh:YE,LucideSignalLow:JE,LucideSignalMedium:QE,LucideSignalZero:eP,LucideSignature:nP,LucideSignpost:iP,LucideSignpostBig:rP,LucideSiren:aP,LucideSkipBack:oP,LucideSkipForward:sP,LucideSkull:cP,LucideSlack:lP,LucideSlash:uP,LucideSlashSquare:qd,LucideSlice:dP,LucideSliders:U1,LucideSlidersHorizontal:hP,LucideSlidersVertical:U1,LucideSmartphone:yP,LucideSmartphoneCharging:fP,LucideSmartphoneNfc:pP,LucideSmile:mP,LucideSmilePlus:gP,LucideSnail:vP,LucideSnowflake:kP,LucideSofa:xP,LucideSortAsc:Vl,LucideSortDesc:Fl,LucideSoup:wP,LucideSpace:bP,LucideSpade:MP,LucideSparkle:SP,LucideSparkles:$1,LucideSpeaker:CP,LucideSpeech:LP,LucideSpellCheck:AP,LucideSpellCheck2:IP,LucideSpline:_P,LucideSplit:EP,LucideSplitSquareHorizontal:zd,LucideSplitSquareVertical:Od,LucideSprayCan:PP,LucideSprout:NP,LucideSquare:Ap,LucideSquareActivity:W1,LucideSquareArrowDown:Z1,LucideSquareArrowDownLeft:G1,LucideSquareArrowDownRight:K1,LucideSquareArrowLeft:X1,LucideSquareArrowOutDownLeft:Y1,LucideSquareArrowOutDownRight:J1,LucideSquareArrowOutUpLeft:Q1,LucideSquareArrowOutUpRight:ed,LucideSquareArrowRight:td,LucideSquareArrowUp:id,LucideSquareArrowUpLeft:nd,LucideSquareArrowUpRight:rd,LucideSquareAsterisk:ad,LucideSquareBottomDashedScissors:od,LucideSquareChartGantt:ts,LucideSquareCheck:cd,LucideSquareCheckBig:sd,LucideSquareChevronDown:ld,LucideSquareChevronLeft:ud,LucideSquareChevronRight:dd,LucideSquareChevronUp:hd,LucideSquareCode:fd,LucideSquareDashed:gd,LucideSquareDashedBottom:jP,LucideSquareDashedBottomCode:RP,LucideSquareDashedKanban:pd,LucideSquareDashedMousePointer:yd,LucideSquareDivide:md,LucideSquareDot:vd,LucideSquareEqual:kd,LucideSquareFunction:xd,LucideSquareGanttChart:ts,LucideSquareKanban:wd,LucideSquareLibrary:bd,LucideSquareM:Md,LucideSquareMenu:Sd,LucideSquareMinus:Cd,LucideSquareMousePointer:Ld,LucideSquareParking:Ad,LucideSquareParkingOff:Id,LucideSquarePen:Ea,LucideSquarePercent:_d,LucideSquarePi:Ed,LucideSquarePilcrow:Pd,LucideSquarePlay:Nd,LucideSquarePlus:Rd,LucideSquarePower:jd,LucideSquareRadical:TP,LucideSquareScissors:Td,LucideSquareSigma:Dd,LucideSquareSlash:qd,LucideSquareSplitHorizontal:zd,LucideSquareSplitVertical:Od,LucideSquareSquare:DP,LucideSquareStack:qP,LucideSquareTerminal:Fd,LucideSquareUser:Hd,LucideSquareUserRound:Bd,LucideSquareX:Vd,LucideSquircle:J2,LucideSquirrel:zP,LucideStamp:OP,LucideStar:HP,LucideStarHalf:FP,LucideStarOff:BP,LucideStars:$1,LucideStepBack:VP,LucideStepForward:UP,LucideStethoscope:$P,LucideSticker:Q2,LucideStickyNote:_p,LucideStopCircle:zu,LucideStore:WP,LucideStretchHorizontal:GP,LucideStretchVertical:KP,LucideStrikethrough:ZP,LucideSubscript:XP,LucideSubtitles:Yl,LucideSun:tN,LucideSunDim:YP,LucideSunMedium:JP,LucideSunMoon:QP,LucideSunSnow:eN,LucideSunrise:nN,LucideSunset:rN,LucideSuperscript:iN,LucideSwatchBook:aN,LucideSwissFranc:oN,LucideSwitchCamera:sN,LucideSword:cN,LucideSwords:lN,LucideSyringe:uN,LucideTable:vN,LucideTable2:dN,LucideTableCellsMerge:hN,LucideTableCellsSplit:fN,LucideTableColumnsSplit:pN,LucideTableOfContents:yN,LucideTableProperties:gN,LucideTableRowsSplit:mN,LucideTablet:xN,LucideTabletSmartphone:kN,LucideTablets:wN,LucideTag:bN,LucideTags:MN,LucideTally1:SN,LucideTally2:CN,LucideTally3:LN,LucideTally4:IN,LucideTally5:AN,LucideTangent:_N,LucideTarget:EN,LucideTelescope:PN,LucideTent:RN,LucideTentTree:NN,LucideTerminal:Ep,LucideTerminalSquare:Fd,LucideTestTube:jN,LucideTestTube2:Ud,LucideTestTubeDiagonal:Ud,LucideTestTubes:TN,LucideText:FN,LucideTextCursor:qN,LucideTextCursorInput:DN,LucideTextQuote:zN,LucideTextSearch:ON,LucideTextSelect:$d,LucideTextSelection:$d,LucideTheater:BN,LucideThermometer:UN,LucideThermometerSnowflake:HN,LucideThermometerSun:VN,LucideThumbsDown:$N,LucideThumbsUp:WN,LucideTicket:QN,LucideTicketCheck:GN,LucideTicketMinus:KN,LucideTicketPercent:ZN,LucideTicketPlus:XN,LucideTicketSlash:YN,LucideTicketX:JN,LucideTickets:tR,LucideTicketsPlane:eR,LucideTimer:iR,LucideTimerOff:nR,LucideTimerReset:rR,LucideToggleLeft:aR,LucideToggleRight:oR,LucideTornado:sR,LucideTorus:cR,LucideTouchpad:uR,LucideTouchpadOff:lR,LucideTowerControl:dR,LucideToyBrick:hR,LucideTractor:fR,LucideTrafficCone:pR,LucideTrain:Wd,LucideTrainFront:gR,LucideTrainFrontTunnel:yR,LucideTrainTrack:mR,LucideTramFront:Wd,LucideTrash:vR,LucideTrash2:Pp,LucideTreeDeciduous:kR,LucideTreePalm:Gd,LucideTreePine:xR,LucideTrees:wR,LucideTrello:bR,LucideTrendingDown:MR,LucideTrendingUp:CR,LucideTrendingUpDown:SR,LucideTriangle:IR,LucideTriangleAlert:Kd,LucideTriangleRight:LR,LucideTrophy:AR,LucideTruck:_R,LucideTurtle:ER,LucideTv:NR,LucideTv2:Zd,LucideTvMinimal:Zd,LucideTvMinimalPlay:PR,LucideTwitch:RR,LucideTwitter:jR,LucideType:ef,LucideTypeOutline:TR,LucideUmbrella:qR,LucideUmbrellaOff:DR,LucideUnderline:zR,LucideUndo:BR,LucideUndo2:OR,LucideUndoDot:FR,LucideUnfoldHorizontal:HR,LucideUnfoldVertical:VR,LucideUngroup:UR,LucideUniversity:Xd,LucideUnlink:WR,LucideUnlink2:$R,LucideUnlock:k1,LucideUnlockKeyhole:v1,LucideUnplug:GR,LucideUpload:Np,LucideUploadCloud:$u,LucideUsb:KR,LucideUser:Rp,LucideUser2:nh,LucideUserCheck:ZR,LucideUserCheck2:Yd,LucideUserCircle:Fu,LucideUserCircle2:Ou,LucideUserCog:XR,LucideUserCog2:Jd,LucideUserMinus:YR,LucideUserMinus2:Qd,LucideUserPen:JR,LucideUserPlus:QR,LucideUserPlus2:eh,LucideUserRound:nh,LucideUserRoundCheck:Yd,LucideUserRoundCog:Jd,LucideUserRoundMinus:Qd,LucideUserRoundPen:ej,LucideUserRoundPlus:eh,LucideUserRoundSearch:tj,LucideUserRoundX:th,LucideUserSearch:nj,LucideUserSquare:Hd,LucideUserSquare2:Bd,LucideUserX:rj,LucideUserX2:th,LucideUsers:ij,LucideUsers2:rh,LucideUsersRound:rh,LucideUtensils:ah,LucideUtensilsCrossed:ih,LucideUtilityPole:aj,LucideVariable:oj,LucideVault:sj,LucideVegan:cj,LucideVenetianMask:lj,LucideVerified:Wl,LucideVibrate:dj,LucideVibrateOff:uj,LucideVideo:fj,LucideVideoOff:hj,LucideVideotape:pj,LucideView:yj,LucideVoicemail:gj,LucideVolleyball:mj,LucideVolume:bj,LucideVolume1:vj,LucideVolume2:kj,LucideVolumeOff:xj,LucideVolumeX:wj,LucideVote:Mj,LucideWallet:Cj,LucideWallet2:oh,LucideWalletCards:Sj,LucideWalletMinimal:oh,LucideWallpaper:Lj,LucideWand:Ij,LucideWand2:sh,LucideWandSparkles:sh,LucideWarehouse:Aj,LucideWashingMachine:_j,LucideWatch:Ej,LucideWaves:Pj,LucideWaypoints:Nj,LucideWebcam:Rj,LucideWebhook:Tj,LucideWebhookOff:jj,LucideWeight:Dj,LucideWheat:zj,LucideWheatOff:qj,LucideWholeWord:Oj,LucideWifi:Uj,LucideWifiHigh:Fj,LucideWifiLow:Bj,LucideWifiOff:Hj,LucideWifiZero:Vj,LucideWind:$j,LucideWine:Gj,LucideWineOff:Wj,LucideWorkflow:jp,LucideWorm:Kj,LucideWrapText:Zj,LucideWrench:Xj,LucideX:tf,LucideXCircle:Bu,LucideXOctagon:S1,LucideXSquare:Vd,LucideYoutube:Yj,LucideZap:Qj,LucideZapOff:Jj,LucideZoomIn:eT,LucideZoomOut:tT,Luggage:qS,LuggageIcon:qS,MSquare:Md,MSquareIcon:Md,Magnet:zS,MagnetIcon:zS,Mail:GS,MailCheck:OS,MailCheckIcon:OS,MailIcon:GS,MailMinus:FS,MailMinusIcon:FS,MailOpen:BS,MailOpenIcon:BS,MailPlus:HS,MailPlusIcon:HS,MailQuestion:VS,MailQuestionIcon:VS,MailSearch:US,MailSearchIcon:US,MailWarning:$S,MailWarningIcon:$S,MailX:WS,MailXIcon:WS,Mailbox:KS,MailboxIcon:KS,Mails:ZS,MailsIcon:ZS,Map:cC,MapIcon:cC,MapPin:oC,MapPinCheck:YS,MapPinCheckIcon:YS,MapPinCheckInside:XS,MapPinCheckInsideIcon:XS,MapPinHouse:JS,MapPinHouseIcon:JS,MapPinIcon:oC,MapPinMinus:eC,MapPinMinusIcon:eC,MapPinMinusInside:QS,MapPinMinusInsideIcon:QS,MapPinOff:tC,MapPinOffIcon:tC,MapPinPlus:rC,MapPinPlusIcon:rC,MapPinPlusInside:nC,MapPinPlusInsideIcon:nC,MapPinX:aC,MapPinXIcon:aC,MapPinXInside:iC,MapPinXInsideIcon:iC,MapPinned:sC,MapPinnedIcon:sC,Martini:lC,MartiniIcon:lC,Maximize:uC,Maximize2:mp,Maximize2Icon:mp,MaximizeIcon:uC,Medal:dC,MedalIcon:dC,Megaphone:fC,MegaphoneIcon:fC,MegaphoneOff:hC,MegaphoneOffIcon:hC,Meh:pC,MehIcon:pC,MemoryStick:yC,MemoryStickIcon:yC,Menu:gC,MenuIcon:gC,MenuSquare:Sd,MenuSquareIcon:Sd,Merge:mC,MergeIcon:mC,MessageCircle:AC,MessageCircleCode:vC,MessageCircleCodeIcon:vC,MessageCircleDashed:kC,MessageCircleDashedIcon:kC,MessageCircleHeart:xC,MessageCircleHeartIcon:xC,MessageCircleIcon:AC,MessageCircleMore:wC,MessageCircleMoreIcon:wC,MessageCircleOff:bC,MessageCircleOffIcon:bC,MessageCirclePlus:MC,MessageCirclePlusIcon:MC,MessageCircleQuestion:SC,MessageCircleQuestionIcon:SC,MessageCircleReply:CC,MessageCircleReplyIcon:CC,MessageCircleWarning:LC,MessageCircleWarningIcon:LC,MessageCircleX:IC,MessageCircleXIcon:IC,MessageSquare:UC,MessageSquareCode:_C,MessageSquareCodeIcon:_C,MessageSquareDashed:EC,MessageSquareDashedIcon:EC,MessageSquareDiff:PC,MessageSquareDiffIcon:PC,MessageSquareDot:NC,MessageSquareDotIcon:NC,MessageSquareHeart:RC,MessageSquareHeartIcon:RC,MessageSquareIcon:UC,MessageSquareLock:jC,MessageSquareLockIcon:jC,MessageSquareMore:TC,MessageSquareMoreIcon:TC,MessageSquareOff:DC,MessageSquareOffIcon:DC,MessageSquarePlus:qC,MessageSquarePlusIcon:qC,MessageSquareQuote:zC,MessageSquareQuoteIcon:zC,MessageSquareReply:OC,MessageSquareReplyIcon:OC,MessageSquareShare:FC,MessageSquareShareIcon:FC,MessageSquareText:BC,MessageSquareTextIcon:BC,MessageSquareWarning:HC,MessageSquareWarningIcon:HC,MessageSquareX:VC,MessageSquareXIcon:VC,MessagesSquare:$C,MessagesSquareIcon:$C,Mic:GC,Mic2:x1,Mic2Icon:x1,MicIcon:GC,MicOff:WC,MicOffIcon:WC,MicVocal:x1,MicVocalIcon:x1,Microchip:KC,MicrochipIcon:KC,Microscope:ZC,MicroscopeIcon:ZC,Microwave:XC,MicrowaveIcon:XC,Milestone:YC,MilestoneIcon:YC,Milk:QC,MilkIcon:QC,MilkOff:JC,MilkOffIcon:JC,Minimize:tL,Minimize2:eL,Minimize2Icon:eL,MinimizeIcon:tL,Minus:vp,MinusCircle:_u,MinusCircleIcon:_u,MinusIcon:vp,MinusSquare:Cd,MinusSquareIcon:Cd,Monitor:pL,MonitorCheck:nL,MonitorCheckIcon:nL,MonitorCog:rL,MonitorCogIcon:rL,MonitorDot:iL,MonitorDotIcon:iL,MonitorDown:aL,MonitorDownIcon:aL,MonitorIcon:pL,MonitorOff:oL,MonitorOffIcon:oL,MonitorPause:sL,MonitorPauseIcon:sL,MonitorPlay:cL,MonitorPlayIcon:cL,MonitorSmartphone:lL,MonitorSmartphoneIcon:lL,MonitorSpeaker:uL,MonitorSpeakerIcon:uL,MonitorStop:dL,MonitorStopIcon:dL,MonitorUp:hL,MonitorUpIcon:hL,MonitorX:fL,MonitorXIcon:fL,Moon:gL,MoonIcon:gL,MoonStar:yL,MoonStarIcon:yL,MoreHorizontal:Ju,MoreHorizontalIcon:Ju,MoreVertical:Yu,MoreVerticalIcon:Yu,Mountain:vL,MountainIcon:vL,MountainSnow:mL,MountainSnowIcon:mL,Mouse:SL,MouseIcon:SL,MouseOff:kL,MouseOffIcon:kL,MousePointer:ML,MousePointer2:xL,MousePointer2Icon:xL,MousePointerBan:wL,MousePointerBanIcon:wL,MousePointerClick:bL,MousePointerClickIcon:bL,MousePointerIcon:ML,MousePointerSquareDashed:yd,MousePointerSquareDashedIcon:yd,Move:DL,Move3D:w1,Move3DIcon:w1,Move3d:w1,Move3dIcon:w1,MoveDiagonal:LL,MoveDiagonal2:CL,MoveDiagonal2Icon:CL,MoveDiagonalIcon:LL,MoveDown:_L,MoveDownIcon:_L,MoveDownLeft:IL,MoveDownLeftIcon:IL,MoveDownRight:AL,MoveDownRightIcon:AL,MoveHorizontal:EL,MoveHorizontalIcon:EL,MoveIcon:DL,MoveLeft:kp,MoveLeftIcon:kp,MoveRight:PL,MoveRightIcon:PL,MoveUp:jL,MoveUpIcon:jL,MoveUpLeft:NL,MoveUpLeftIcon:NL,MoveUpRight:RL,MoveUpRightIcon:RL,MoveVertical:TL,MoveVerticalIcon:TL,Music:FL,Music2:qL,Music2Icon:qL,Music3:zL,Music3Icon:zL,Music4:OL,Music4Icon:OL,MusicIcon:FL,Navigation:UL,Navigation2:HL,Navigation2Icon:HL,Navigation2Off:BL,Navigation2OffIcon:BL,NavigationIcon:UL,NavigationOff:VL,NavigationOffIcon:VL,Network:$L,NetworkIcon:$L,Newspaper:WL,NewspaperIcon:WL,Nfc:GL,NfcIcon:GL,Notebook:YL,NotebookIcon:YL,NotebookPen:KL,NotebookPenIcon:KL,NotebookTabs:ZL,NotebookTabsIcon:ZL,NotebookText:XL,NotebookTextIcon:XL,NotepadText:QL,NotepadTextDashed:JL,NotepadTextDashedIcon:JL,NotepadTextIcon:QL,Nut:tI,NutIcon:tI,NutOff:eI,NutOffIcon:eI,Octagon:rI,OctagonAlert:b1,OctagonAlertIcon:b1,OctagonIcon:rI,OctagonMinus:nI,OctagonMinusIcon:nI,OctagonPause:M1,OctagonPauseIcon:M1,OctagonX:S1,OctagonXIcon:S1,Omega:iI,OmegaIcon:iI,Option:aI,OptionIcon:aI,Orbit:oI,OrbitIcon:oI,Origami:sI,OrigamiIcon:sI,Outdent:y1,OutdentIcon:y1,Package:yI,Package2:cI,Package2Icon:cI,PackageCheck:lI,PackageCheckIcon:lI,PackageIcon:yI,PackageMinus:uI,PackageMinusIcon:uI,PackageOpen:dI,PackageOpenIcon:dI,PackagePlus:hI,PackagePlusIcon:hI,PackageSearch:fI,PackageSearchIcon:fI,PackageX:pI,PackageXIcon:pI,PaintBucket:gI,PaintBucketIcon:gI,PaintRoller:mI,PaintRollerIcon:mI,Paintbrush:vI,Paintbrush2:C1,Paintbrush2Icon:C1,PaintbrushIcon:vI,PaintbrushVertical:C1,PaintbrushVerticalIcon:C1,Palette:kI,PaletteIcon:kI,Palmtree:Gd,PalmtreeIcon:Gd,PanelBottom:bI,PanelBottomClose:xI,PanelBottomCloseIcon:xI,PanelBottomDashed:L1,PanelBottomDashedIcon:L1,PanelBottomIcon:bI,PanelBottomInactive:L1,PanelBottomInactiveIcon:L1,PanelBottomOpen:wI,PanelBottomOpenIcon:wI,PanelLeft:E1,PanelLeftClose:I1,PanelLeftCloseIcon:I1,PanelLeftDashed:A1,PanelLeftDashedIcon:A1,PanelLeftIcon:E1,PanelLeftInactive:A1,PanelLeftInactiveIcon:A1,PanelLeftOpen:_1,PanelLeftOpenIcon:_1,PanelRight:CI,PanelRightClose:MI,PanelRightCloseIcon:MI,PanelRightDashed:P1,PanelRightDashedIcon:P1,PanelRightIcon:CI,PanelRightInactive:P1,PanelRightInactiveIcon:P1,PanelRightOpen:SI,PanelRightOpenIcon:SI,PanelTop:AI,PanelTopClose:LI,PanelTopCloseIcon:LI,PanelTopDashed:N1,PanelTopDashedIcon:N1,PanelTopIcon:AI,PanelTopInactive:N1,PanelTopInactiveIcon:N1,PanelTopOpen:II,PanelTopOpenIcon:II,PanelsLeftBottom:_I,PanelsLeftBottomIcon:_I,PanelsLeftRight:Tc,PanelsLeftRightIcon:Tc,PanelsRightBottom:EI,PanelsRightBottomIcon:EI,PanelsTopBottom:F1,PanelsTopBottomIcon:F1,PanelsTopLeft:R1,PanelsTopLeftIcon:R1,Paperclip:PI,PaperclipIcon:PI,Parentheses:NI,ParenthesesIcon:NI,ParkingCircle:Pu,ParkingCircleIcon:Pu,ParkingCircleOff:Eu,ParkingCircleOffIcon:Eu,ParkingMeter:RI,ParkingMeterIcon:RI,ParkingSquare:Ad,ParkingSquareIcon:Ad,ParkingSquareOff:Id,ParkingSquareOffIcon:Id,PartyPopper:jI,PartyPopperIcon:jI,Pause:TI,PauseCircle:Nu,PauseCircleIcon:Nu,PauseIcon:TI,PauseOctagon:M1,PauseOctagonIcon:M1,PawPrint:DI,PawPrintIcon:DI,PcCase:qI,PcCaseIcon:qI,Pen:T1,PenBox:Ea,PenBoxIcon:Ea,PenIcon:T1,PenLine:j1,PenLineIcon:j1,PenOff:zI,PenOffIcon:zI,PenSquare:Ea,PenSquareIcon:Ea,PenTool:OI,PenToolIcon:OI,Pencil:HI,PencilIcon:HI,PencilLine:xp,PencilLineIcon:xp,PencilOff:FI,PencilOffIcon:FI,PencilRuler:BI,PencilRulerIcon:BI,Pentagon:VI,PentagonIcon:VI,Percent:UI,PercentCircle:Ru,PercentCircleIcon:Ru,PercentDiamond:Zu,PercentDiamondIcon:Zu,PercentIcon:UI,PercentSquare:_d,PercentSquareIcon:_d,PersonStanding:$I,PersonStandingIcon:$I,PhilippinePeso:WI,PhilippinePesoIcon:WI,Phone:QI,PhoneCall:GI,PhoneCallIcon:GI,PhoneForwarded:KI,PhoneForwardedIcon:KI,PhoneIcon:QI,PhoneIncoming:ZI,PhoneIncomingIcon:ZI,PhoneMissed:XI,PhoneMissedIcon:XI,PhoneOff:YI,PhoneOffIcon:YI,PhoneOutgoing:JI,PhoneOutgoingIcon:JI,Pi:eA,PiIcon:eA,PiSquare:Ed,PiSquareIcon:Ed,Piano:tA,PianoIcon:tA,Pickaxe:nA,PickaxeIcon:nA,PictureInPicture:iA,PictureInPicture2:rA,PictureInPicture2Icon:rA,PictureInPictureIcon:iA,PieChart:lu,PieChartIcon:lu,PiggyBank:aA,PiggyBankIcon:aA,Pilcrow:cA,PilcrowIcon:cA,PilcrowLeft:oA,PilcrowLeftIcon:oA,PilcrowRight:sA,PilcrowRightIcon:sA,PilcrowSquare:Pd,PilcrowSquareIcon:Pd,Pill:uA,PillBottle:lA,PillBottleIcon:lA,PillIcon:uA,Pin:hA,PinIcon:hA,PinOff:dA,PinOffIcon:dA,Pipette:fA,PipetteIcon:fA,Pizza:pA,PizzaIcon:pA,Plane:mA,PlaneIcon:mA,PlaneLanding:yA,PlaneLandingIcon:yA,PlaneTakeoff:gA,PlaneTakeoffIcon:gA,Play:wp,PlayCircle:ju,PlayCircleIcon:ju,PlayIcon:wp,PlaySquare:Nd,PlaySquareIcon:Nd,Plug:kA,Plug2:vA,Plug2Icon:vA,PlugIcon:kA,PlugZap:D1,PlugZap2:D1,PlugZap2Icon:D1,PlugZapIcon:D1,Plus:bp,PlusCircle:Tu,PlusCircleIcon:Tu,PlusIcon:bp,PlusSquare:Rd,PlusSquareIcon:Rd,Pocket:wA,PocketIcon:wA,PocketKnife:xA,PocketKnifeIcon:xA,Podcast:bA,PodcastIcon:bA,Pointer:SA,PointerIcon:SA,PointerOff:MA,PointerOffIcon:MA,Popcorn:CA,PopcornIcon:CA,Popsicle:LA,PopsicleIcon:LA,PoundSterling:IA,PoundSterlingIcon:IA,Power:_A,PowerCircle:Du,PowerCircleIcon:Du,PowerIcon:_A,PowerOff:AA,PowerOffIcon:AA,PowerSquare:jd,PowerSquareIcon:jd,Presentation:EA,PresentationIcon:EA,Printer:NA,PrinterCheck:PA,PrinterCheckIcon:PA,PrinterIcon:NA,Projector:RA,ProjectorIcon:RA,Proportions:jA,ProportionsIcon:jA,Puzzle:TA,PuzzleIcon:TA,Pyramid:DA,PyramidIcon:DA,QrCode:qA,QrCodeIcon:qA,Quote:zA,QuoteIcon:zA,Rabbit:OA,RabbitIcon:OA,Radar:FA,RadarIcon:FA,Radiation:BA,RadiationIcon:BA,Radical:HA,RadicalIcon:HA,Radio:$A,RadioIcon:$A,RadioReceiver:VA,RadioReceiverIcon:VA,RadioTower:UA,RadioTowerIcon:UA,Radius:WA,RadiusIcon:WA,RailSymbol:GA,RailSymbolIcon:GA,Rainbow:KA,RainbowIcon:KA,Rat:ZA,RatIcon:ZA,Ratio:XA,RatioIcon:XA,Receipt:a_,ReceiptCent:YA,ReceiptCentIcon:YA,ReceiptEuro:JA,ReceiptEuroIcon:JA,ReceiptIcon:a_,ReceiptIndianRupee:QA,ReceiptIndianRupeeIcon:QA,ReceiptJapaneseYen:e_,ReceiptJapaneseYenIcon:e_,ReceiptPoundSterling:t_,ReceiptPoundSterlingIcon:t_,ReceiptRussianRuble:n_,ReceiptRussianRubleIcon:n_,ReceiptSwissFranc:r_,ReceiptSwissFrancIcon:r_,ReceiptText:i_,ReceiptTextIcon:i_,RectangleEllipsis:q1,RectangleEllipsisIcon:q1,RectangleHorizontal:o_,RectangleHorizontalIcon:o_,RectangleVertical:s_,RectangleVerticalIcon:s_,Recycle:c_,RecycleIcon:c_,Redo:d_,Redo2:l_,Redo2Icon:l_,RedoDot:u_,RedoDotIcon:u_,RedoIcon:d_,RefreshCcw:f_,RefreshCcwDot:h_,RefreshCcwDotIcon:h_,RefreshCcwIcon:f_,RefreshCw:Mp,RefreshCwIcon:Mp,RefreshCwOff:p_,RefreshCwOffIcon:p_,Refrigerator:y_,RefrigeratorIcon:y_,Regex:g_,RegexIcon:g_,RemoveFormatting:m_,RemoveFormattingIcon:m_,Repeat:x_,Repeat1:v_,Repeat1Icon:v_,Repeat2:k_,Repeat2Icon:k_,RepeatIcon:x_,Replace:b_,ReplaceAll:w_,ReplaceAllIcon:w_,ReplaceIcon:b_,Reply:S_,ReplyAll:M_,ReplyAllIcon:M_,ReplyIcon:S_,Rewind:C_,RewindIcon:C_,Ribbon:L_,RibbonIcon:L_,Rocket:I_,RocketIcon:I_,RockingChair:A_,RockingChairIcon:A_,RollerCoaster:__,RollerCoasterIcon:__,Rotate3D:z1,Rotate3DIcon:z1,Rotate3d:z1,Rotate3dIcon:z1,RotateCcw:P_,RotateCcwIcon:P_,RotateCcwSquare:E_,RotateCcwSquareIcon:E_,RotateCw:R_,RotateCwIcon:R_,RotateCwSquare:N_,RotateCwSquareIcon:N_,Route:T_,RouteIcon:T_,RouteOff:j_,RouteOffIcon:j_,Router:D_,RouterIcon:D_,Rows:O1,Rows2:O1,Rows2Icon:O1,Rows3:F1,Rows3Icon:F1,Rows4:q_,Rows4Icon:q_,RowsIcon:O1,Rss:z_,RssIcon:z_,Ruler:O_,RulerIcon:O_,RussianRuble:F_,RussianRubleIcon:F_,Sailboat:B_,SailboatIcon:B_,Salad:H_,SaladIcon:H_,Sandwich:V_,SandwichIcon:V_,Satellite:$_,SatelliteDish:U_,SatelliteDishIcon:U_,SatelliteIcon:$_,Save:K_,SaveAll:W_,SaveAllIcon:W_,SaveIcon:K_,SaveOff:G_,SaveOffIcon:G_,Scale:Z_,Scale3D:B1,Scale3DIcon:B1,Scale3d:B1,Scale3dIcon:B1,ScaleIcon:Z_,Scaling:X_,ScalingIcon:X_,Scan:iE,ScanBarcode:Y_,ScanBarcodeIcon:Y_,ScanEye:J_,ScanEyeIcon:J_,ScanFace:Q_,ScanFaceIcon:Q_,ScanIcon:iE,ScanLine:eE,ScanLineIcon:eE,ScanQrCode:tE,ScanQrCodeIcon:tE,ScanSearch:nE,ScanSearchIcon:nE,ScanText:rE,ScanTextIcon:rE,ScatterChart:uu,ScatterChartIcon:uu,School:aE,School2:Xd,School2Icon:Xd,SchoolIcon:aE,Scissors:sE,ScissorsIcon:sE,ScissorsLineDashed:oE,ScissorsLineDashedIcon:oE,ScissorsSquare:Td,ScissorsSquareDashedBottom:od,ScissorsSquareDashedBottomIcon:od,ScissorsSquareIcon:Td,ScreenShare:lE,ScreenShareIcon:lE,ScreenShareOff:cE,ScreenShareOffIcon:cE,Scroll:dE,ScrollIcon:dE,ScrollText:uE,ScrollTextIcon:uE,Search:Sp,SearchCheck:hE,SearchCheckIcon:hE,SearchCode:fE,SearchCodeIcon:fE,SearchIcon:Sp,SearchSlash:pE,SearchSlashIcon:pE,SearchX:yE,SearchXIcon:yE,Section:gE,SectionIcon:gE,Send:vE,SendHorizonal:H1,SendHorizonalIcon:H1,SendHorizontal:H1,SendHorizontalIcon:H1,SendIcon:vE,SendToBack:mE,SendToBackIcon:mE,SeparatorHorizontal:kE,SeparatorHorizontalIcon:kE,SeparatorVertical:xE,SeparatorVerticalIcon:xE,Server:Cp,ServerCog:wE,ServerCogIcon:wE,ServerCrash:bE,ServerCrashIcon:bE,ServerIcon:Cp,ServerOff:ME,ServerOffIcon:ME,Settings:CE,Settings2:SE,Settings2Icon:SE,SettingsIcon:CE,Shapes:Lp,ShapesIcon:Lp,Share:LE,Share2:Ip,Share2Icon:Ip,ShareIcon:LE,Sheet:IE,SheetIcon:IE,Shell:AE,ShellIcon:AE,Shield:zE,ShieldAlert:_E,ShieldAlertIcon:_E,ShieldBan:EE,ShieldBanIcon:EE,ShieldCheck:PE,ShieldCheckIcon:PE,ShieldClose:V1,ShieldCloseIcon:V1,ShieldEllipsis:NE,ShieldEllipsisIcon:NE,ShieldHalf:RE,ShieldHalfIcon:RE,ShieldIcon:zE,ShieldMinus:jE,ShieldMinusIcon:jE,ShieldOff:TE,ShieldOffIcon:TE,ShieldPlus:DE,ShieldPlusIcon:DE,ShieldQuestion:qE,ShieldQuestionIcon:qE,ShieldX:V1,ShieldXIcon:V1,Ship:FE,ShipIcon:FE,ShipWheel:OE,ShipWheelIcon:OE,Shirt:BE,ShirtIcon:BE,ShoppingBag:HE,ShoppingBagIcon:HE,ShoppingBasket:VE,ShoppingBasketIcon:VE,ShoppingCart:UE,ShoppingCartIcon:UE,Shovel:$E,ShovelIcon:$E,ShowerHead:WE,ShowerHeadIcon:WE,Shrink:GE,ShrinkIcon:GE,Shrub:KE,ShrubIcon:KE,Shuffle:ZE,ShuffleIcon:ZE,Sidebar:E1,SidebarClose:I1,SidebarCloseIcon:I1,SidebarIcon:E1,SidebarOpen:_1,SidebarOpenIcon:_1,Sigma:XE,SigmaIcon:XE,SigmaSquare:Dd,SigmaSquareIcon:Dd,Signal:tP,SignalHigh:YE,SignalHighIcon:YE,SignalIcon:tP,SignalLow:JE,SignalLowIcon:JE,SignalMedium:QE,SignalMediumIcon:QE,SignalZero:eP,SignalZeroIcon:eP,Signature:nP,SignatureIcon:nP,Signpost:iP,SignpostBig:rP,SignpostBigIcon:rP,SignpostIcon:iP,Siren:aP,SirenIcon:aP,SkipBack:oP,SkipBackIcon:oP,SkipForward:sP,SkipForwardIcon:sP,Skull:cP,SkullIcon:cP,Slack:lP,SlackIcon:lP,Slash:uP,SlashIcon:uP,SlashSquare:qd,SlashSquareIcon:qd,Slice:dP,SliceIcon:dP,Sliders:U1,SlidersHorizontal:hP,SlidersHorizontalIcon:hP,SlidersIcon:U1,SlidersVertical:U1,SlidersVerticalIcon:U1,Smartphone:yP,SmartphoneCharging:fP,SmartphoneChargingIcon:fP,SmartphoneIcon:yP,SmartphoneNfc:pP,SmartphoneNfcIcon:pP,Smile:mP,SmileIcon:mP,SmilePlus:gP,SmilePlusIcon:gP,Snail:vP,SnailIcon:vP,Snowflake:kP,SnowflakeIcon:kP,Sofa:xP,SofaIcon:xP,SortAsc:Vl,SortAscIcon:Vl,SortDesc:Fl,SortDescIcon:Fl,Soup:wP,SoupIcon:wP,Space:bP,SpaceIcon:bP,Spade:MP,SpadeIcon:MP,Sparkle:SP,SparkleIcon:SP,Sparkles:$1,SparklesIcon:$1,Speaker:CP,SpeakerIcon:CP,Speech:LP,SpeechIcon:LP,SpellCheck:AP,SpellCheck2:IP,SpellCheck2Icon:IP,SpellCheckIcon:AP,Spline:_P,SplineIcon:_P,Split:EP,SplitIcon:EP,SplitSquareHorizontal:zd,SplitSquareHorizontalIcon:zd,SplitSquareVertical:Od,SplitSquareVerticalIcon:Od,SprayCan:PP,SprayCanIcon:PP,Sprout:NP,SproutIcon:NP,Square:Ap,SquareActivity:W1,SquareActivityIcon:W1,SquareArrowDown:Z1,SquareArrowDownIcon:Z1,SquareArrowDownLeft:G1,SquareArrowDownLeftIcon:G1,SquareArrowDownRight:K1,SquareArrowDownRightIcon:K1,SquareArrowLeft:X1,SquareArrowLeftIcon:X1,SquareArrowOutDownLeft:Y1,SquareArrowOutDownLeftIcon:Y1,SquareArrowOutDownRight:J1,SquareArrowOutDownRightIcon:J1,SquareArrowOutUpLeft:Q1,SquareArrowOutUpLeftIcon:Q1,SquareArrowOutUpRight:ed,SquareArrowOutUpRightIcon:ed,SquareArrowRight:td,SquareArrowRightIcon:td,SquareArrowUp:id,SquareArrowUpIcon:id,SquareArrowUpLeft:nd,SquareArrowUpLeftIcon:nd,SquareArrowUpRight:rd,SquareArrowUpRightIcon:rd,SquareAsterisk:ad,SquareAsteriskIcon:ad,SquareBottomDashedScissors:od,SquareBottomDashedScissorsIcon:od,SquareChartGantt:ts,SquareChartGanttIcon:ts,SquareCheck:cd,SquareCheckBig:sd,SquareCheckBigIcon:sd,SquareCheckIcon:cd,SquareChevronDown:ld,SquareChevronDownIcon:ld,SquareChevronLeft:ud,SquareChevronLeftIcon:ud,SquareChevronRight:dd,SquareChevronRightIcon:dd,SquareChevronUp:hd,SquareChevronUpIcon:hd,SquareCode:fd,SquareCodeIcon:fd,SquareDashed:gd,SquareDashedBottom:jP,SquareDashedBottomCode:RP,SquareDashedBottomCodeIcon:RP,SquareDashedBottomIcon:jP,SquareDashedIcon:gd,SquareDashedKanban:pd,SquareDashedKanbanIcon:pd,SquareDashedMousePointer:yd,SquareDashedMousePointerIcon:yd,SquareDivide:md,SquareDivideIcon:md,SquareDot:vd,SquareDotIcon:vd,SquareEqual:kd,SquareEqualIcon:kd,SquareFunction:xd,SquareFunctionIcon:xd,SquareGanttChart:ts,SquareGanttChartIcon:ts,SquareIcon:Ap,SquareKanban:wd,SquareKanbanIcon:wd,SquareLibrary:bd,SquareLibraryIcon:bd,SquareM:Md,SquareMIcon:Md,SquareMenu:Sd,SquareMenuIcon:Sd,SquareMinus:Cd,SquareMinusIcon:Cd,SquareMousePointer:Ld,SquareMousePointerIcon:Ld,SquareParking:Ad,SquareParkingIcon:Ad,SquareParkingOff:Id,SquareParkingOffIcon:Id,SquarePen:Ea,SquarePenIcon:Ea,SquarePercent:_d,SquarePercentIcon:_d,SquarePi:Ed,SquarePiIcon:Ed,SquarePilcrow:Pd,SquarePilcrowIcon:Pd,SquarePlay:Nd,SquarePlayIcon:Nd,SquarePlus:Rd,SquarePlusIcon:Rd,SquarePower:jd,SquarePowerIcon:jd,SquareRadical:TP,SquareRadicalIcon:TP,SquareScissors:Td,SquareScissorsIcon:Td,SquareSigma:Dd,SquareSigmaIcon:Dd,SquareSlash:qd,SquareSlashIcon:qd,SquareSplitHorizontal:zd,SquareSplitHorizontalIcon:zd,SquareSplitVertical:Od,SquareSplitVerticalIcon:Od,SquareSquare:DP,SquareSquareIcon:DP,SquareStack:qP,SquareStackIcon:qP,SquareTerminal:Fd,SquareTerminalIcon:Fd,SquareUser:Hd,SquareUserIcon:Hd,SquareUserRound:Bd,SquareUserRoundIcon:Bd,SquareX:Vd,SquareXIcon:Vd,Squircle:J2,SquircleIcon:J2,Squirrel:zP,SquirrelIcon:zP,Stamp:OP,StampIcon:OP,Star:HP,StarHalf:FP,StarHalfIcon:FP,StarIcon:HP,StarOff:BP,StarOffIcon:BP,Stars:$1,StarsIcon:$1,StepBack:VP,StepBackIcon:VP,StepForward:UP,StepForwardIcon:UP,Stethoscope:$P,StethoscopeIcon:$P,Sticker:Q2,StickerIcon:Q2,StickyNote:_p,StickyNoteIcon:_p,StopCircle:zu,StopCircleIcon:zu,Store:WP,StoreIcon:WP,StretchHorizontal:GP,StretchHorizontalIcon:GP,StretchVertical:KP,StretchVerticalIcon:KP,Strikethrough:ZP,StrikethroughIcon:ZP,Subscript:XP,SubscriptIcon:XP,Subtitles:Yl,SubtitlesIcon:Yl,Sun:tN,SunDim:YP,SunDimIcon:YP,SunIcon:tN,SunMedium:JP,SunMediumIcon:JP,SunMoon:QP,SunMoonIcon:QP,SunSnow:eN,SunSnowIcon:eN,Sunrise:nN,SunriseIcon:nN,Sunset:rN,SunsetIcon:rN,Superscript:iN,SuperscriptIcon:iN,SwatchBook:aN,SwatchBookIcon:aN,SwissFranc:oN,SwissFrancIcon:oN,SwitchCamera:sN,SwitchCameraIcon:sN,Sword:cN,SwordIcon:cN,Swords:lN,SwordsIcon:lN,Syringe:uN,SyringeIcon:uN,Table:vN,Table2:dN,Table2Icon:dN,TableCellsMerge:hN,TableCellsMergeIcon:hN,TableCellsSplit:fN,TableCellsSplitIcon:fN,TableColumnsSplit:pN,TableColumnsSplitIcon:pN,TableIcon:vN,TableOfContents:yN,TableOfContentsIcon:yN,TableProperties:gN,TablePropertiesIcon:gN,TableRowsSplit:mN,TableRowsSplitIcon:mN,Tablet:xN,TabletIcon:xN,TabletSmartphone:kN,TabletSmartphoneIcon:kN,Tablets:wN,TabletsIcon:wN,Tag:bN,TagIcon:bN,Tags:MN,TagsIcon:MN,Tally1:SN,Tally1Icon:SN,Tally2:CN,Tally2Icon:CN,Tally3:LN,Tally3Icon:LN,Tally4:IN,Tally4Icon:IN,Tally5:AN,Tally5Icon:AN,Tangent:_N,TangentIcon:_N,Target:EN,TargetIcon:EN,Telescope:PN,TelescopeIcon:PN,Tent:RN,TentIcon:RN,TentTree:NN,TentTreeIcon:NN,Terminal:Ep,TerminalIcon:Ep,TerminalSquare:Fd,TerminalSquareIcon:Fd,TestTube:jN,TestTube2:Ud,TestTube2Icon:Ud,TestTubeDiagonal:Ud,TestTubeDiagonalIcon:Ud,TestTubeIcon:jN,TestTubes:TN,TestTubesIcon:TN,Text:FN,TextCursor:qN,TextCursorIcon:qN,TextCursorInput:DN,TextCursorInputIcon:DN,TextIcon:FN,TextQuote:zN,TextQuoteIcon:zN,TextSearch:ON,TextSearchIcon:ON,TextSelect:$d,TextSelectIcon:$d,TextSelection:$d,TextSelectionIcon:$d,Theater:BN,TheaterIcon:BN,Thermometer:UN,ThermometerIcon:UN,ThermometerSnowflake:HN,ThermometerSnowflakeIcon:HN,ThermometerSun:VN,ThermometerSunIcon:VN,ThumbsDown:$N,ThumbsDownIcon:$N,ThumbsUp:WN,ThumbsUpIcon:WN,Ticket:QN,TicketCheck:GN,TicketCheckIcon:GN,TicketIcon:QN,TicketMinus:KN,TicketMinusIcon:KN,TicketPercent:ZN,TicketPercentIcon:ZN,TicketPlus:XN,TicketPlusIcon:XN,TicketSlash:YN,TicketSlashIcon:YN,TicketX:JN,TicketXIcon:JN,Tickets:tR,TicketsIcon:tR,TicketsPlane:eR,TicketsPlaneIcon:eR,Timer:iR,TimerIcon:iR,TimerOff:nR,TimerOffIcon:nR,TimerReset:rR,TimerResetIcon:rR,ToggleLeft:aR,ToggleLeftIcon:aR,ToggleRight:oR,ToggleRightIcon:oR,Tornado:sR,TornadoIcon:sR,Torus:cR,TorusIcon:cR,Touchpad:uR,TouchpadIcon:uR,TouchpadOff:lR,TouchpadOffIcon:lR,TowerControl:dR,TowerControlIcon:dR,ToyBrick:hR,ToyBrickIcon:hR,Tractor:fR,TractorIcon:fR,TrafficCone:pR,TrafficConeIcon:pR,Train:Wd,TrainFront:gR,TrainFrontIcon:gR,TrainFrontTunnel:yR,TrainFrontTunnelIcon:yR,TrainIcon:Wd,TrainTrack:mR,TrainTrackIcon:mR,TramFront:Wd,TramFrontIcon:Wd,Trash:vR,Trash2:Pp,Trash2Icon:Pp,TrashIcon:vR,TreeDeciduous:kR,TreeDeciduousIcon:kR,TreePalm:Gd,TreePalmIcon:Gd,TreePine:xR,TreePineIcon:xR,Trees:wR,TreesIcon:wR,Trello:bR,TrelloIcon:bR,TrendingDown:MR,TrendingDownIcon:MR,TrendingUp:CR,TrendingUpDown:SR,TrendingUpDownIcon:SR,TrendingUpIcon:CR,Triangle:IR,TriangleAlert:Kd,TriangleAlertIcon:Kd,TriangleIcon:IR,TriangleRight:LR,TriangleRightIcon:LR,Trophy:AR,TrophyIcon:AR,Truck:_R,TruckIcon:_R,Turtle:ER,TurtleIcon:ER,Tv:NR,Tv2:Zd,Tv2Icon:Zd,TvIcon:NR,TvMinimal:Zd,TvMinimalIcon:Zd,TvMinimalPlay:PR,TvMinimalPlayIcon:PR,Twitch:RR,TwitchIcon:RR,Twitter:jR,TwitterIcon:jR,Type:ef,TypeIcon:ef,TypeOutline:TR,TypeOutlineIcon:TR,Umbrella:qR,UmbrellaIcon:qR,UmbrellaOff:DR,UmbrellaOffIcon:DR,Underline:zR,UnderlineIcon:zR,Undo:BR,Undo2:OR,Undo2Icon:OR,UndoDot:FR,UndoDotIcon:FR,UndoIcon:BR,UnfoldHorizontal:HR,UnfoldHorizontalIcon:HR,UnfoldVertical:VR,UnfoldVerticalIcon:VR,Ungroup:UR,UngroupIcon:UR,University:Xd,UniversityIcon:Xd,Unlink:WR,Unlink2:$R,Unlink2Icon:$R,UnlinkIcon:WR,Unlock:k1,UnlockIcon:k1,UnlockKeyhole:v1,UnlockKeyholeIcon:v1,Unplug:GR,UnplugIcon:GR,Upload:Np,UploadCloud:$u,UploadCloudIcon:$u,UploadIcon:Np,Usb:KR,UsbIcon:KR,User:Rp,User2:nh,User2Icon:nh,UserCheck:ZR,UserCheck2:Yd,UserCheck2Icon:Yd,UserCheckIcon:ZR,UserCircle:Fu,UserCircle2:Ou,UserCircle2Icon:Ou,UserCircleIcon:Fu,UserCog:XR,UserCog2:Jd,UserCog2Icon:Jd,UserCogIcon:XR,UserIcon:Rp,UserMinus:YR,UserMinus2:Qd,UserMinus2Icon:Qd,UserMinusIcon:YR,UserPen:JR,UserPenIcon:JR,UserPlus:QR,UserPlus2:eh,UserPlus2Icon:eh,UserPlusIcon:QR,UserRound:nh,UserRoundCheck:Yd,UserRoundCheckIcon:Yd,UserRoundCog:Jd,UserRoundCogIcon:Jd,UserRoundIcon:nh,UserRoundMinus:Qd,UserRoundMinusIcon:Qd,UserRoundPen:ej,UserRoundPenIcon:ej,UserRoundPlus:eh,UserRoundPlusIcon:eh,UserRoundSearch:tj,UserRoundSearchIcon:tj,UserRoundX:th,UserRoundXIcon:th,UserSearch:nj,UserSearchIcon:nj,UserSquare:Hd,UserSquare2:Bd,UserSquare2Icon:Bd,UserSquareIcon:Hd,UserX:rj,UserX2:th,UserX2Icon:th,UserXIcon:rj,Users:ij,Users2:rh,Users2Icon:rh,UsersIcon:ij,UsersRound:rh,UsersRoundIcon:rh,Utensils:ah,UtensilsCrossed:ih,UtensilsCrossedIcon:ih,UtensilsIcon:ah,UtilityPole:aj,UtilityPoleIcon:aj,Variable:oj,VariableIcon:oj,Vault:sj,VaultIcon:sj,Vegan:cj,VeganIcon:cj,VenetianMask:lj,VenetianMaskIcon:lj,Verified:Wl,VerifiedIcon:Wl,Vibrate:dj,VibrateIcon:dj,VibrateOff:uj,VibrateOffIcon:uj,Video:fj,VideoIcon:fj,VideoOff:hj,VideoOffIcon:hj,Videotape:pj,VideotapeIcon:pj,View:yj,ViewIcon:yj,Voicemail:gj,VoicemailIcon:gj,Volleyball:mj,VolleyballIcon:mj,Volume:bj,Volume1:vj,Volume1Icon:vj,Volume2:kj,Volume2Icon:kj,VolumeIcon:bj,VolumeOff:xj,VolumeOffIcon:xj,VolumeX:wj,VolumeXIcon:wj,Vote:Mj,VoteIcon:Mj,Wallet:Cj,Wallet2:oh,Wallet2Icon:oh,WalletCards:Sj,WalletCardsIcon:Sj,WalletIcon:Cj,WalletMinimal:oh,WalletMinimalIcon:oh,Wallpaper:Lj,WallpaperIcon:Lj,Wand:Ij,Wand2:sh,Wand2Icon:sh,WandIcon:Ij,WandSparkles:sh,WandSparklesIcon:sh,Warehouse:Aj,WarehouseIcon:Aj,WashingMachine:_j,WashingMachineIcon:_j,Watch:Ej,WatchIcon:Ej,Waves:Pj,WavesIcon:Pj,Waypoints:Nj,WaypointsIcon:Nj,Webcam:Rj,WebcamIcon:Rj,Webhook:Tj,WebhookIcon:Tj,WebhookOff:jj,WebhookOffIcon:jj,Weight:Dj,WeightIcon:Dj,Wheat:zj,WheatIcon:zj,WheatOff:qj,WheatOffIcon:qj,WholeWord:Oj,WholeWordIcon:Oj,Wifi:Uj,WifiHigh:Fj,WifiHighIcon:Fj,WifiIcon:Uj,WifiLow:Bj,WifiLowIcon:Bj,WifiOff:Hj,WifiOffIcon:Hj,WifiZero:Vj,WifiZeroIcon:Vj,Wind:$j,WindIcon:$j,Wine:Gj,WineIcon:Gj,WineOff:Wj,WineOffIcon:Wj,Workflow:jp,WorkflowIcon:jp,Worm:Kj,WormIcon:Kj,WrapText:Zj,WrapTextIcon:Zj,Wrench:Xj,WrenchIcon:Xj,X:tf,XCircle:Bu,XCircleIcon:Bu,XIcon:tf,XOctagon:S1,XOctagonIcon:S1,XSquare:Vd,XSquareIcon:Vd,Youtube:Yj,YoutubeIcon:Yj,Zap:Qj,ZapIcon:Qj,ZapOff:Jj,ZapOffIcon:Jj,ZoomIn:eT,ZoomInIcon:eT,ZoomOut:tT,ZoomOutIcon:tT,createLucideIcon:p,icons:B4e},Symbol.toStringTag,{value:"Module"})),hK=$D,V4e=WD,Bue=M.forwardRef(({className:e,...t},n)=>x.jsx(Ry,{ref:n,className:Ze("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));Bue.displayName=Ry.displayName;const ZD=M.forwardRef(({className:e,children:t,...n},r)=>x.jsxs(V4e,{children:[x.jsx(Bue,{}),x.jsxs(Ff,{ref:r,className:Ze("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...n,children:[t,x.jsxs(zue,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[x.jsx(tf,{className:"h-4 w-4"}),x.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));ZD.displayName=Ff.displayName;const XD=({className:e,...t})=>x.jsx("div",{className:Ze("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});XD.displayName="DialogHeader";const sy=({className:e,...t})=>x.jsx("div",{className:Ze("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});sy.displayName="DialogFooter";const YD=M.forwardRef(({className:e,...t},n)=>x.jsx(GD,{ref:n,className:Ze("text-lg font-semibold leading-none tracking-tight",e),...t}));YD.displayName=GD.displayName;const JD=M.forwardRef(({className:e,...t},n)=>x.jsx(KD,{ref:n,className:Ze("text-sm text-muted-foreground",e),...t}));JD.displayName=KD.displayName;const U4e=async()=>{const e=await fetch("/api/demos");if(!e.ok)throw new Error(`GET /api/demos failed: ${e.status}`);return await e.json()},Hue=async e=>{const t=await fetch(`/api/demos/${e}`);if(!t.ok)throw new Error(`GET /api/demos/${e} failed: ${t.status}`);return await t.json()},Ts=async(e,t,n)=>{const r=await fetch(`/api/demos/${e}/nodes/${t}/position`,{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify(n)});if(!r.ok){let i=null;try{i=await r.json()}catch{}throw new Error((i==null?void 0:i.error)??`PATCH /api/demos/${e}/nodes/${t}/position → ${r.status}`)}return await r.json()},_n=async(e,t,n)=>{const r=await fetch(`/api/demos/${e}/nodes/${t}`,{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify(n)});if(!r.ok){let i=null;try{i=await r.json()}catch{}throw new Error((i==null?void 0:i.error)??`PATCH /api/demos/${e}/nodes/${t} → ${r.status}`)}return await r.json()},Ui=async(e,t,n)=>{const r=await fetch(`/api/demos/${e}/connectors/${t}`,{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify(n)});if(!r.ok){let i=null;try{i=await r.json()}catch{}throw new Error((i==null?void 0:i.error)??`PATCH /api/demos/${e}/connectors/${t} → ${r.status}`)}return await r.json()},Ia=async(e,t)=>{const n=await fetch(`/api/demos/${e}/nodes`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(t)});if(!n.ok){let r=null;try{r=await n.json()}catch{}throw new Error((r==null?void 0:r.error)??`POST /api/demos/${e}/nodes → ${n.status}`)}return await n.json()},Ds=async(e,t)=>{const n=await fetch(`/api/demos/${e}/connectors`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(t)});if(!n.ok){let r=null;try{r=await n.json()}catch{}throw new Error((r==null?void 0:r.error)??`POST /api/demos/${e}/connectors → ${n.status}`)}return await n.json()},Jz=async(e,t,n)=>{const r=await fetch(`/api/demos/${e}/nodes/${t}/order`,{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify(n)});if(!r.ok){let i=null;try{i=await r.json()}catch{}throw new Error((i==null?void 0:i.error)??`PATCH /api/demos/${e}/nodes/${t}/order → ${r.status}`)}return await r.json()},Yo=async(e,t)=>{const n=await fetch(`/api/demos/${e}/nodes/${t}`,{method:"DELETE"});if(!n.ok){let r=null;try{r=await n.json()}catch{}throw new Error((r==null?void 0:r.error)??`DELETE /api/demos/${e}/nodes/${t} → ${n.status}`)}return await n.json()},Pl=async(e,t)=>{const n=await fetch(`/api/demos/${e}/connectors/${t}`,{method:"DELETE"});if(!n.ok){let r=null;try{r=await n.json()}catch{}throw new Error((r==null?void 0:r.error)??`DELETE /api/demos/${e}/connectors/${t} → ${n.status}`)}return await n.json()},$4e=async e=>{const t=await fetch(`/api/demos/${encodeURIComponent(e)}`,{method:"DELETE"});if(!t.ok){let n=null;try{n=await t.json()}catch{}throw new Error((n==null?void 0:n.error)??`DELETE /api/demos/${e} → ${t.status}`)}return await t.json()},W4e=async e=>{const t=await fetch("/api/projects",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(e)});if(!t.ok){let n=null;try{n=await t.json()}catch{}throw new Error((n==null?void 0:n.error)??`POST /api/projects → ${t.status}`)}return await t.json()},G4e=async e=>{const t=await fetch(`/api/demos/${e}/reset`,{method:"POST",headers:{"content-type":"application/json"},body:"{}"});if(!t.ok){let n=null;try{n=await t.json()}catch{}throw new Error((n==null?void 0:n.error)??`POST /api/demos/${e}/reset → ${t.status}`)}return await t.json()},Vue=async(e,t,n)=>{const r=await fetch(`/api/projects/${encodeURIComponent(e)}/files/${t}`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({path:n})});let i=null;try{i=await r.json()}catch{}if(r.ok)return{ok:(i==null?void 0:i.ok)===!0,absPath:typeof(i==null?void 0:i.absPath)=="string"?i.absPath:"",error:typeof(i==null?void 0:i.error)=="string"?i.error:void 0};if(r.status===404&&typeof(i==null?void 0:i.absPath)=="string")return{ok:!1,absPath:i.absPath,error:typeof(i==null?void 0:i.error)=="string"?i.error:"file not found"};const a=typeof(i==null?void 0:i.error)=="string"?i.error:void 0;throw new Error(a??`POST /api/projects/${e}/files/${t} → ${r.status}`)},K4e=async(e,t)=>Vue(e,"open",t),Z4e=async(e,t)=>Vue(e,"reveal",t),X4e=async(e,t,n)=>{const r=new FormData;r.append("file",t),r.append("filename",n);const i=await fetch(`/api/projects/${encodeURIComponent(e)}/files/upload`,{method:"POST",body:r});if(!i.ok){let a=null;try{a=await i.json()}catch{}throw new Error((a==null?void 0:a.error)??`POST /api/projects/${e}/files/upload → ${i.status}`)}return await i.json()},Y4e=async(e,t)=>{const n=await fetch(`/api/demos/${e}/play/${t}`,{method:"POST",headers:{"content-type":"application/json"},body:"{}"});if(!n.ok){let r=null;try{r=await n.json()}catch{}throw new Error((r==null?void 0:r.error)??`POST /api/demos/${e}/play/${t} → ${n.status}`)}return await n.json()};function J4e({open:e,onOpenChange:t,onCreated:n}){const[r,i]=M.useState(""),[a,o]=M.useState(null),[s,c]=M.useState(!1);M.useEffect(()=>{e&&(i(""),o(null),c(!1))},[e]);const l=r.trim(),u=l.length>0&&!s,d=async f=>{if(f.preventDefault(),!!u){c(!0),o(null);try{const h=await W4e({name:l});n(h),t(!1)}catch(h){o(h instanceof Error?h.message:String(h)),c(!1)}}};return x.jsx(hK,{open:e,onOpenChange:t,children:x.jsxs(ZD,{className:"sm:max-w-md","data-testid":"create-project-dialog",onOpenAutoFocus:f=>{f.preventDefault();const h=document.querySelector('[data-testid="create-project-name-input"]');h==null||h.focus()},children:[x.jsxs(XD,{children:[x.jsx(YD,{children:"Create new project"}),x.jsxs(JD,{children:["The project will be created at ",x.jsx("code",{children:"~/.seeflow/<slug>"}),"."]})]}),x.jsxs("form",{onSubmit:d,className:"flex flex-col gap-4",children:[x.jsxs("label",{className:"flex flex-col gap-1.5 text-sm",children:[x.jsx("span",{className:"font-medium",children:"Project name"}),x.jsx("input",{type:"text",required:!0,autoComplete:"off",spellCheck:!1,value:r,onChange:f=>i(f.target.value),"data-testid":"create-project-name-input",className:"rounded-md border bg-background px-3 py-2 text-sm outline-none ring-offset-background focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2"})]}),a?x.jsx("div",{role:"alert","data-testid":"create-project-error",className:"rounded-md border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive",children:a}):null,x.jsxs(sy,{children:[x.jsx(oi,{type:"button",variant:"ghost",onClick:()=>t(!1),disabled:s,children:"Cancel"}),x.jsx(oi,{type:"submit",disabled:!u,"data-testid":"create-project-submit",children:s?"Creating…":"Create project"})]})]})]})})}var aJ=1,Q4e=.9,e3e=.8,t3e=.17,Qz=.1,eO=.999,n3e=.9999,r3e=.99,i3e=/[\\\/_+.#"@\[\(\{&]/,a3e=/[\\\/_+.#"@\[\(\{&]/g,o3e=/[\s-]/,Uue=/[\s-]/g;function J$(e,t,n,r,i,a,o){if(a===t.length)return i===e.length?aJ:r3e;var s=`${i},${a}`;if(o[s]!==void 0)return o[s];for(var c=r.charAt(a),l=n.indexOf(c,i),u=0,d,f,h,y;l>=0;)d=J$(e,t,n,r,l+1,a+1,o),d>u&&(l===i?d*=aJ:i3e.test(e.charAt(l-1))?(d*=e3e,h=e.slice(i,l-1).match(a3e),h&&i>0&&(d*=Math.pow(eO,h.length))):o3e.test(e.charAt(l-1))?(d*=Q4e,y=e.slice(i,l-1).match(Uue),y&&i>0&&(d*=Math.pow(eO,y.length))):(d*=t3e,i>0&&(d*=Math.pow(eO,l-i))),e.charAt(l)!==t.charAt(a)&&(d*=n3e)),(d<Qz&&n.charAt(l-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(l-1)!==r.charAt(a))&&(f=J$(e,t,n,r,l+1,a+2,o),f*Qz>d&&(d=f*Qz)),d>u&&(u=d),l=n.indexOf(c,l+1);return o[s]=u,u}function oJ(e){return e.toLowerCase().replace(Uue," ")}function s3e(e,t,n){return e=n&&n.length>0?`${e+" "+n.join(" ")}`:e,J$(e,t,oJ(e),oJ(t),0,0,{})}var I0='[cmdk-group=""]',tO='[cmdk-group-items=""]',c3e='[cmdk-group-heading=""]',$ue='[cmdk-item=""]',sJ=`${$ue}:not([aria-disabled="true"])`,Q$="cmdk-item-select",x2="data-value",l3e=(e,t,n)=>s3e(e,t,n),Wue=M.createContext(void 0),jy=()=>M.useContext(Wue),Gue=M.createContext(void 0),fK=()=>M.useContext(Gue),Kue=M.createContext(void 0),Zue=M.forwardRef((e,t)=>{let n=w2(()=>{var N,P;return{search:"",value:(P=(N=e.value)!=null?N:e.defaultValue)!=null?P:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=w2(()=>new Set),i=w2(()=>new Map),a=w2(()=>new Map),o=w2(()=>new Set),s=Xue(e),{label:c,children:l,value:u,onValueChange:d,filter:f,shouldFilter:h,loop:y,disablePointerSelection:v=!1,vimBindings:k=!0,...g}=e,S=da(),w=da(),C=da(),_=M.useRef(null),A=x3e();Ah(()=>{if(u!==void 0){let N=u.trim();n.current.value=N,j.emit()}},[u]),Ah(()=>{A(6,U)},[]);let j=M.useMemo(()=>({subscribe:N=>(o.current.add(N),()=>o.current.delete(N)),snapshot:()=>n.current,setState:(N,P,G)=>{var J,X,ae,re;if(!Object.is(n.current[N],P)){if(n.current[N]=P,N==="search")R(),D(),A(1,I);else if(N==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let fe=document.getElementById(C);fe?fe.focus():(J=document.getElementById(S))==null||J.focus()}if(A(7,()=>{var fe;n.current.selectedItemId=(fe=q())==null?void 0:fe.id,j.emit()}),G||A(5,U),((X=s.current)==null?void 0:X.value)!==void 0){let fe=P??"";(re=(ae=s.current).onValueChange)==null||re.call(ae,fe);return}}j.emit()}},emit:()=>{o.current.forEach(N=>N())}}),[]),O=M.useMemo(()=>({value:(N,P,G)=>{var J;P!==((J=a.current.get(N))==null?void 0:J.value)&&(a.current.set(N,{value:P,keywords:G}),n.current.filtered.items.set(N,T(P,G)),A(2,()=>{D(),j.emit()}))},item:(N,P)=>(r.current.add(N),P&&(i.current.has(P)?i.current.get(P).add(N):i.current.set(P,new Set([N]))),A(3,()=>{R(),D(),n.current.value||I(),j.emit()}),()=>{a.current.delete(N),r.current.delete(N),n.current.filtered.items.delete(N);let G=q();A(4,()=>{R(),(G==null?void 0:G.getAttribute("id"))===N&&I(),j.emit()})}),group:N=>(i.current.has(N)||i.current.set(N,new Set),()=>{a.current.delete(N),i.current.delete(N)}),filter:()=>s.current.shouldFilter,label:c||e["aria-label"],getDisablePointerSelection:()=>s.current.disablePointerSelection,listId:S,inputId:C,labelId:w,listInnerRef:_}),[]);function T(N,P){var G,J;let X=(J=(G=s.current)==null?void 0:G.filter)!=null?J:l3e;return N?X(N,n.current.search,P):0}function D(){if(!n.current.search||s.current.shouldFilter===!1)return;let N=n.current.filtered.items,P=[];n.current.filtered.groups.forEach(J=>{let X=i.current.get(J),ae=0;X.forEach(re=>{let fe=N.get(re);ae=Math.max(fe,ae)}),P.push([J,ae])});let G=_.current;K().sort((J,X)=>{var ae,re;let fe=J.getAttribute("id"),ke=X.getAttribute("id");return((ae=N.get(ke))!=null?ae:0)-((re=N.get(fe))!=null?re:0)}).forEach(J=>{let X=J.closest(tO);X?X.appendChild(J.parentElement===X?J:J.closest(`${tO} > *`)):G.appendChild(J.parentElement===G?J:J.closest(`${tO} > *`))}),P.sort((J,X)=>X[1]-J[1]).forEach(J=>{var X;let ae=(X=_.current)==null?void 0:X.querySelector(`${I0}[${x2}="${encodeURIComponent(J[0])}"]`);ae==null||ae.parentElement.appendChild(ae)})}function I(){let N=K().find(G=>G.getAttribute("aria-disabled")!=="true"),P=N==null?void 0:N.getAttribute(x2);j.setState("value",P||void 0)}function R(){var N,P,G,J;if(!n.current.search||s.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let X=0;for(let ae of r.current){let re=(P=(N=a.current.get(ae))==null?void 0:N.value)!=null?P:"",fe=(J=(G=a.current.get(ae))==null?void 0:G.keywords)!=null?J:[],ke=T(re,fe);n.current.filtered.items.set(ae,ke),ke>0&&X++}for(let[ae,re]of i.current)for(let fe of re)if(n.current.filtered.items.get(fe)>0){n.current.filtered.groups.add(ae);break}n.current.filtered.count=X}function U(){var N,P,G;let J=q();J&&(((N=J.parentElement)==null?void 0:N.firstChild)===J&&((G=(P=J.closest(I0))==null?void 0:P.querySelector(c3e))==null||G.scrollIntoView({block:"nearest"})),J.scrollIntoView({block:"nearest"}))}function q(){var N;return(N=_.current)==null?void 0:N.querySelector(`${$ue}[aria-selected="true"]`)}function K(){var N;return Array.from(((N=_.current)==null?void 0:N.querySelectorAll(sJ))||[])}function Z(N){let P=K()[N];P&&j.setState("value",P.getAttribute(x2))}function $(N){var P;let G=q(),J=K(),X=J.findIndex(re=>re===G),ae=J[X+N];(P=s.current)!=null&&P.loop&&(ae=X+N<0?J[J.length-1]:X+N===J.length?J[0]:J[X+N]),ae&&j.setState("value",ae.getAttribute(x2))}function B(N){let P=q(),G=P==null?void 0:P.closest(I0),J;for(;G&&!J;)G=N>0?v3e(G,I0):k3e(G,I0),J=G==null?void 0:G.querySelector(sJ);J?j.setState("value",J.getAttribute(x2)):$(N)}let V=()=>Z(K().length-1),F=N=>{N.preventDefault(),N.metaKey?V():N.altKey?B(1):$(1)},ie=N=>{N.preventDefault(),N.metaKey?Z(0):N.altKey?B(-1):$(-1)};return M.createElement(Jt.div,{ref:t,tabIndex:-1,...g,"cmdk-root":"",onKeyDown:N=>{var P;(P=g.onKeyDown)==null||P.call(g,N);let G=N.nativeEvent.isComposing||N.keyCode===229;if(!(N.defaultPrevented||G))switch(N.key){case"n":case"j":{k&&N.ctrlKey&&F(N);break}case"ArrowDown":{F(N);break}case"p":case"k":{k&&N.ctrlKey&&ie(N);break}case"ArrowUp":{ie(N);break}case"Home":{N.preventDefault(),Z(0);break}case"End":{N.preventDefault(),V();break}case"Enter":{N.preventDefault();let J=q();if(J){let X=new Event(Q$);J.dispatchEvent(X)}}}}},M.createElement("label",{"cmdk-label":"",htmlFor:O.inputId,id:O.labelId,style:b3e},c),QD(e,N=>M.createElement(Gue.Provider,{value:j},M.createElement(Wue.Provider,{value:O},N))))}),u3e=M.forwardRef((e,t)=>{var n,r;let i=da(),a=M.useRef(null),o=M.useContext(Kue),s=jy(),c=Xue(e),l=(r=(n=c.current)==null?void 0:n.forceMount)!=null?r:o==null?void 0:o.forceMount;Ah(()=>{if(!l)return s.item(i,o==null?void 0:o.id)},[l]);let u=Yue(i,a,[e.value,e.children,a],e.keywords),d=fK(),f=al(A=>A.value&&A.value===u.current),h=al(A=>l||s.filter()===!1?!0:A.search?A.filtered.items.get(i)>0:!0);M.useEffect(()=>{let A=a.current;if(!(!A||e.disabled))return A.addEventListener(Q$,y),()=>A.removeEventListener(Q$,y)},[h,e.onSelect,e.disabled]);function y(){var A,j;v(),(j=(A=c.current).onSelect)==null||j.call(A,u.current)}function v(){d.setState("value",u.current,!0)}if(!h)return null;let{disabled:k,value:g,onSelect:S,forceMount:w,keywords:C,..._}=e;return M.createElement(Jt.div,{ref:ms(a,t),..._,id:i,"cmdk-item":"",role:"option","aria-disabled":!!k,"aria-selected":!!f,"data-disabled":!!k,"data-selected":!!f,onPointerMove:k||s.getDisablePointerSelection()?void 0:v,onClick:k?void 0:y},e.children)}),d3e=M.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:i,...a}=e,o=da(),s=M.useRef(null),c=M.useRef(null),l=da(),u=jy(),d=al(h=>i||u.filter()===!1?!0:h.search?h.filtered.groups.has(o):!0);Ah(()=>u.group(o),[]),Yue(o,s,[e.value,e.heading,c]);let f=M.useMemo(()=>({id:o,forceMount:i}),[i]);return M.createElement(Jt.div,{ref:ms(s,t),...a,"cmdk-group":"",role:"presentation",hidden:d?void 0:!0},n&&M.createElement("div",{ref:c,"cmdk-group-heading":"","aria-hidden":!0,id:l},n),QD(e,h=>M.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?l:void 0},M.createElement(Kue.Provider,{value:f},h))))}),h3e=M.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,i=M.useRef(null),a=al(o=>!o.search);return!n&&!a?null:M.createElement(Jt.div,{ref:ms(i,t),...r,"cmdk-separator":"",role:"separator"})}),f3e=M.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,i=e.value!=null,a=fK(),o=al(l=>l.search),s=al(l=>l.selectedItemId),c=jy();return M.useEffect(()=>{e.value!=null&&a.setState("search",e.value)},[e.value]),M.createElement(Jt.input,{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":c.listId,"aria-labelledby":c.labelId,"aria-activedescendant":s,id:c.inputId,type:"text",value:i?e.value:o,onChange:l=>{i||a.setState("search",l.target.value),n==null||n(l.target.value)}})}),p3e=M.forwardRef((e,t)=>{let{children:n,label:r="Suggestions",...i}=e,a=M.useRef(null),o=M.useRef(null),s=al(l=>l.selectedItemId),c=jy();return M.useEffect(()=>{if(o.current&&a.current){let l=o.current,u=a.current,d,f=new ResizeObserver(()=>{d=requestAnimationFrame(()=>{let h=l.offsetHeight;u.style.setProperty("--cmdk-list-height",h.toFixed(1)+"px")})});return f.observe(l),()=>{cancelAnimationFrame(d),f.unobserve(l)}}},[]),M.createElement(Jt.div,{ref:ms(a,t),...i,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":s,"aria-label":r,id:c.listId},QD(e,l=>M.createElement("div",{ref:ms(o,c.listInnerRef),"cmdk-list-sizer":""},l)))}),y3e=M.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:i,contentClassName:a,container:o,...s}=e;return M.createElement($D,{open:n,onOpenChange:r},M.createElement(WD,{container:o},M.createElement(Ry,{"cmdk-overlay":"",className:i}),M.createElement(Ff,{"aria-label":e.label,"cmdk-dialog":"",className:a},M.createElement(Zue,{ref:t,...s}))))}),g3e=M.forwardRef((e,t)=>al(n=>n.filtered.count===0)?M.createElement(Jt.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),m3e=M.forwardRef((e,t)=>{let{progress:n,children:r,label:i="Loading...",...a}=e;return M.createElement(Jt.div,{ref:t,...a,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},QD(e,o=>M.createElement("div",{"aria-hidden":!0},o)))}),pa=Object.assign(Zue,{List:p3e,Item:u3e,Input:f3e,Group:d3e,Separator:h3e,Dialog:y3e,Empty:g3e,Loading:m3e});function v3e(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function k3e(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function Xue(e){let t=M.useRef(e);return Ah(()=>{t.current=e}),t}var Ah=typeof window>"u"?M.useEffect:M.useLayoutEffect;function w2(e){let t=M.useRef();return t.current===void 0&&(t.current=e()),t}function al(e){let t=fK(),n=()=>e(t.snapshot());return M.useSyncExternalStore(t.subscribe,n,n)}function Yue(e,t,n,r=[]){let i=M.useRef(),a=jy();return Ah(()=>{var o;let s=(()=>{var l;for(let u of n){if(typeof u=="string")return u.trim();if(typeof u=="object"&&"current"in u)return u.current?(l=u.current.textContent)==null?void 0:l.trim():i.current}})(),c=r.map(l=>l.trim());a.value(e,s,c),(o=t.current)==null||o.setAttribute(x2,s),i.current=s}),i}var x3e=()=>{let[e,t]=M.useState(),n=w2(()=>new Map);return Ah(()=>{n.current.forEach(r=>r()),n.current=new Map},[e]),(r,i)=>{n.current.set(r,i),t({})}};function w3e(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function QD({asChild:e,children:t},n){return e&&M.isValidElement(t)?M.cloneElement(w3e(t),{ref:t.ref},n(t.props.children)):n(t)}var b3e={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const Jue=M.forwardRef(({className:e,...t},n)=>x.jsx(pa,{ref:n,className:Ze("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));Jue.displayName=pa.displayName;const Que=M.forwardRef(({className:e,...t},n)=>x.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[x.jsx(Sp,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),x.jsx(pa.Input,{ref:n,className:Ze("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}));Que.displayName=pa.Input.displayName;const e1e=M.forwardRef(({className:e,...t},n)=>x.jsx(pa.List,{ref:n,className:Ze("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));e1e.displayName=pa.List.displayName;const t1e=M.forwardRef((e,t)=>x.jsx(pa.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));t1e.displayName=pa.Empty.displayName;const eW=M.forwardRef(({className:e,...t},n)=>x.jsx(pa.Group,{ref:n,className:Ze("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t}));eW.displayName=pa.Group.displayName;const n1e=M.forwardRef(({className:e,...t},n)=>x.jsx(pa.Separator,{ref:n,className:Ze("-mx-1 h-px bg-border",e),...t}));n1e.displayName=pa.Separator.displayName;const tW=M.forwardRef(({className:e,...t},n)=>x.jsx(pa.Item,{ref:n,className:Ze("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none aria-selected:bg-accent aria-selected:text-accent-foreground data-[disabled='true']:pointer-events-none data-[disabled='true']:opacity-50",e),...t}));tW.displayName=pa.Item.displayName;const r1e=({className:e,...t})=>x.jsx("span",{className:Ze("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});r1e.displayName="CommandShortcut";const M3e=["top","right","bottom","left"],ol=Math.min,ja=Math.max,UT=Math.round,em=Math.floor,ys=e=>({x:e,y:e}),S3e={left:"right",right:"left",bottom:"top",top:"bottom"};function nW(e,t,n){return ja(e,ol(t,n))}function tc(e,t){return typeof e=="function"?e(t):e}function nc(e){return e.split("-")[0]}function Bf(e){return e.split("-")[1]}function pK(e){return e==="x"?"y":"x"}function yK(e){return e==="y"?"height":"width"}function ls(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function gK(e){return pK(ls(e))}function C3e(e,t,n){n===void 0&&(n=!1);const r=Bf(e),i=gK(e),a=yK(i);let o=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(o=$T(o)),[o,$T(o)]}function L3e(e){const t=$T(e);return[rW(e),t,rW(t)]}function rW(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const cJ=["left","right"],lJ=["right","left"],I3e=["top","bottom"],A3e=["bottom","top"];function _3e(e,t,n){switch(e){case"top":case"bottom":return n?t?lJ:cJ:t?cJ:lJ;case"left":case"right":return t?I3e:A3e;default:return[]}}function E3e(e,t,n,r){const i=Bf(e);let a=_3e(nc(e),n==="start",r);return i&&(a=a.map(o=>o+"-"+i),t&&(a=a.concat(a.map(rW)))),a}function $T(e){const t=nc(e);return S3e[t]+e.slice(t.length)}function P3e(e){return{top:0,right:0,bottom:0,left:0,...e}}function i1e(e){return typeof e!="number"?P3e(e):{top:e,right:e,bottom:e,left:e}}function WT(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function uJ(e,t,n){let{reference:r,floating:i}=e;const a=ls(t),o=gK(t),s=yK(o),c=nc(t),l=a==="y",u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2;let h;switch(c){case"top":h={x:u,y:r.y-i.height};break;case"bottom":h={x:u,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:d};break;case"left":h={x:r.x-i.width,y:d};break;default:h={x:r.x,y:r.y}}switch(Bf(t)){case"start":h[o]-=f*(n&&l?-1:1);break;case"end":h[o]+=f*(n&&l?-1:1);break}return h}async function N3e(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:a,rects:o,elements:s,strategy:c}=e,{boundary:l="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:h=0}=tc(t,e),y=i1e(h),k=s[f?d==="floating"?"reference":"floating":d],g=WT(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(k)))==null||n?k:k.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(s.floating)),boundary:l,rootBoundary:u,strategy:c})),S=d==="floating"?{x:r,y:i,width:o.floating.width,height:o.floating.height}:o.reference,w=await(a.getOffsetParent==null?void 0:a.getOffsetParent(s.floating)),C=await(a.isElement==null?void 0:a.isElement(w))?await(a.getScale==null?void 0:a.getScale(w))||{x:1,y:1}:{x:1,y:1},_=WT(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:S,offsetParent:w,strategy:c}):S);return{top:(g.top-_.top+y.top)/C.y,bottom:(_.bottom-g.bottom+y.bottom)/C.y,left:(g.left-_.left+y.left)/C.x,right:(_.right-g.right+y.right)/C.x}}const R3e=50,j3e=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:N3e},c=await(o.isRTL==null?void 0:o.isRTL(t));let l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=uJ(l,r,c),f=r,h=0;const y={};for(let v=0;v<a.length;v++){const k=a[v];if(!k)continue;const{name:g,fn:S}=k,{x:w,y:C,data:_,reset:A}=await S({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:y,rects:l,platform:s,elements:{reference:e,floating:t}});u=w??u,d=C??d,y[g]={...y[g],..._},A&&h<R3e&&(h++,typeof A=="object"&&(A.placement&&(f=A.placement),A.rects&&(l=A.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):A.rects),{x:u,y:d}=uJ(l,f,c)),v=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:y}},T3e=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=tc(e,t)||{};if(l==null)return{};const d=i1e(u),f={x:n,y:r},h=gK(i),y=yK(h),v=await o.getDimensions(l),k=h==="y",g=k?"top":"left",S=k?"bottom":"right",w=k?"clientHeight":"clientWidth",C=a.reference[y]+a.reference[h]-f[h]-a.floating[y],_=f[h]-a.reference[h],A=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l));let j=A?A[w]:0;(!j||!await(o.isElement==null?void 0:o.isElement(A)))&&(j=s.floating[w]||a.floating[y]);const O=C/2-_/2,T=j/2-v[y]/2-1,D=ol(d[g],T),I=ol(d[S],T),R=D,U=j-v[y]-I,q=j/2-v[y]/2+O,K=nW(R,q,U),Z=!c.arrow&&Bf(i)!=null&&q!==K&&a.reference[y]/2-(q<R?D:I)-v[y]/2<0,$=Z?q<R?q-R:q-U:0;return{[h]:f[h]+$,data:{[h]:K,centerOffset:q-K-$,...Z&&{alignmentOffset:$}},reset:Z}}}),D3e=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:a,rects:o,initialPlacement:s,platform:c,elements:l}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:v=!0,...k}=tc(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const g=nc(i),S=ls(s),w=nc(s)===s,C=await(c.isRTL==null?void 0:c.isRTL(l.floating)),_=f||(w||!v?[$T(s)]:L3e(s)),A=y!=="none";!f&&A&&_.push(...E3e(s,v,y,C));const j=[s,..._],O=await c.detectOverflow(t,k),T=[];let D=((r=a.flip)==null?void 0:r.overflows)||[];if(u&&T.push(O[g]),d){const q=C3e(i,o,C);T.push(O[q[0]],O[q[1]])}if(D=[...D,{placement:i,overflows:T}],!T.every(q=>q<=0)){var I,R;const q=(((I=a.flip)==null?void 0:I.index)||0)+1,K=j[q];if(K&&(!(d==="alignment"?S!==ls(K):!1)||D.every(B=>ls(B.placement)===S?B.overflows[0]>0:!0)))return{data:{index:q,overflows:D},reset:{placement:K}};let Z=(R=D.filter($=>$.overflows[0]<=0).sort(($,B)=>$.overflows[1]-B.overflows[1])[0])==null?void 0:R.placement;if(!Z)switch(h){case"bestFit":{var U;const $=(U=D.filter(B=>{if(A){const V=ls(B.placement);return V===S||V==="y"}return!0}).map(B=>[B.placement,B.overflows.filter(V=>V>0).reduce((V,F)=>V+F,0)]).sort((B,V)=>B[1]-V[1])[0])==null?void 0:U[0];$&&(Z=$);break}case"initialPlacement":Z=s;break}if(i!==Z)return{reset:{placement:Z}}}return{}}}};function dJ(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function hJ(e){return M3e.some(t=>e[t]>=0)}const q3e=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:i="referenceHidden",...a}=tc(e,t);switch(i){case"referenceHidden":{const o=await r.detectOverflow(t,{...a,elementContext:"reference"}),s=dJ(o,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:hJ(s)}}}case"escaped":{const o=await r.detectOverflow(t,{...a,altBoundary:!0}),s=dJ(o,n.floating);return{data:{escapedOffsets:s,escaped:hJ(s)}}}default:return{}}}}},a1e=new Set(["left","top"]);async function z3e(e,t){const{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=nc(n),s=Bf(n),c=ls(n)==="y",l=a1e.has(o)?-1:1,u=a&&c?-1:1,d=tc(t,e);let{mainAxis:f,crossAxis:h,alignmentAxis:y}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof y=="number"&&(h=s==="end"?y*-1:y),c?{x:h*u,y:f*l}:{x:f*l,y:h*u}}const O3e=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:a,placement:o,middlewareData:s}=t,c=await z3e(t,e);return o===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:i+c.x,y:a+c.y,data:{...c,placement:o}}}}},F3e=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:g=>{let{x:S,y:w}=g;return{x:S,y:w}}},...l}=tc(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=ls(nc(i)),h=pK(f);let y=u[h],v=u[f];if(o){const g=h==="y"?"top":"left",S=h==="y"?"bottom":"right",w=y+d[g],C=y-d[S];y=nW(w,y,C)}if(s){const g=f==="y"?"top":"left",S=f==="y"?"bottom":"right",w=v+d[g],C=v-d[S];v=nW(w,v,C)}const k=c.fn({...t,[h]:y,[f]:v});return{...k,data:{x:k.x-n,y:k.y-r,enabled:{[h]:o,[f]:s}}}}}},B3e=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=tc(e,t),u={x:n,y:r},d=ls(i),f=pK(d);let h=u[f],y=u[d];const v=tc(s,t),k=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(c){const w=f==="y"?"height":"width",C=a.reference[f]-a.floating[w]+k.mainAxis,_=a.reference[f]+a.reference[w]-k.mainAxis;h<C?h=C:h>_&&(h=_)}if(l){var g,S;const w=f==="y"?"width":"height",C=a1e.has(nc(i)),_=a.reference[d]-a.floating[w]+(C&&((g=o.offset)==null?void 0:g[d])||0)+(C?0:k.crossAxis),A=a.reference[d]+a.reference[w]+(C?0:((S=o.offset)==null?void 0:S[d])||0)-(C?k.crossAxis:0);y<_?y=_:y>A&&(y=A)}return{[f]:h,[d]:y}}}},H3e=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=tc(e,t),u=await o.detectOverflow(t,l),d=nc(i),f=Bf(i),h=ls(i)==="y",{width:y,height:v}=a.floating;let k,g;d==="top"||d==="bottom"?(k=d,g=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?"start":"end")?"left":"right"):(g=d,k=f==="end"?"top":"bottom");const S=v-u.top-u.bottom,w=y-u.left-u.right,C=ol(v-u[k],S),_=ol(y-u[g],w),A=!t.middlewareData.shift;let j=C,O=_;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(O=w),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(j=S),A&&!f){const D=ja(u.left,0),I=ja(u.right,0),R=ja(u.top,0),U=ja(u.bottom,0);h?O=y-2*(D!==0||I!==0?D+I:ja(u.left,u.right)):j=v-2*(R!==0||U!==0?R+U:ja(u.top,u.bottom))}await c({...t,availableWidth:O,availableHeight:j});const T=await o.getDimensions(s.floating);return y!==T.width||v!==T.height?{reset:{rects:!0}}:{}}}};function eq(){return typeof window<"u"}function Hf(e){return o1e(e)?(e.nodeName||"").toLowerCase():"#document"}function Oa(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ws(e){var t;return(t=(o1e(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function o1e(e){return eq()?e instanceof Node||e instanceof Oa(e).Node:!1}function qo(e){return eq()?e instanceof Element||e instanceof Oa(e).Element:!1}function oc(e){return eq()?e instanceof HTMLElement||e instanceof Oa(e).HTMLElement:!1}function fJ(e){return!eq()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Oa(e).ShadowRoot}function Ty(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=zo(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!=="inline"&&i!=="contents"}function V3e(e){return/^(table|td|th)$/.test(Hf(e))}function tq(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const U3e=/transform|translate|scale|rotate|perspective|filter/,$3e=/paint|layout|strict|content/,Nl=e=>!!e&&e!=="none";let nO;function mK(e){const t=qo(e)?zo(e):e;return Nl(t.transform)||Nl(t.translate)||Nl(t.scale)||Nl(t.rotate)||Nl(t.perspective)||!vK()&&(Nl(t.backdropFilter)||Nl(t.filter))||U3e.test(t.willChange||"")||$3e.test(t.contain||"")}function W3e(e){let t=sl(e);for(;oc(t)&&!kf(t);){if(mK(t))return t;if(tq(t))return null;t=sl(t)}return null}function vK(){return nO==null&&(nO=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),nO}function kf(e){return/^(html|body|#document)$/.test(Hf(e))}function zo(e){return Oa(e).getComputedStyle(e)}function nq(e){return qo(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function sl(e){if(Hf(e)==="html")return e;const t=e.assignedSlot||e.parentNode||fJ(e)&&e.host||ws(e);return fJ(t)?t.host:t}function s1e(e){const t=sl(e);return kf(t)?e.ownerDocument?e.ownerDocument.body:e.body:oc(t)&&Ty(t)?t:s1e(t)}function cy(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=s1e(e),a=i===((r=e.ownerDocument)==null?void 0:r.body),o=Oa(i);if(a){const s=iW(o);return t.concat(o,o.visualViewport||[],Ty(i)?i:[],s&&n?cy(s):[])}else return t.concat(i,cy(i,[],n))}function iW(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function c1e(e){const t=zo(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=oc(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=UT(n)!==a||UT(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function kK(e){return qo(e)?e:e.contextElement}function nf(e){const t=kK(e);if(!oc(t))return ys(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:a}=c1e(t);let o=(a?UT(n.width):n.width)/r,s=(a?UT(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}const G3e=ys(0);function l1e(e){const t=Oa(e);return!vK()||!t.visualViewport?G3e:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function K3e(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Oa(e)?!1:t}function _h(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),a=kK(e);let o=ys(1);t&&(r?qo(r)&&(o=nf(r)):o=nf(e));const s=K3e(a,n,r)?l1e(a):ys(0);let c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){const f=Oa(a),h=r&&qo(r)?Oa(r):r;let y=f,v=iW(y);for(;v&&r&&h!==y;){const k=nf(v),g=v.getBoundingClientRect(),S=zo(v),w=g.left+(v.clientLeft+parseFloat(S.paddingLeft))*k.x,C=g.top+(v.clientTop+parseFloat(S.paddingTop))*k.y;c*=k.x,l*=k.y,u*=k.x,d*=k.y,c+=w,l+=C,y=Oa(v),v=iW(y)}}return WT({width:u,height:d,x:c,y:l})}function rq(e,t){const n=nq(e).scrollLeft;return t?t.left+n:_h(ws(e)).left+n}function u1e(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-rq(e,n),i=n.top+t.scrollTop;return{x:r,y:i}}function Z3e(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const a=i==="fixed",o=ws(r),s=t?tq(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=ys(1);const u=ys(0),d=oc(r);if((d||!d&&!a)&&((Hf(r)!=="body"||Ty(o))&&(c=nq(r)),d)){const h=_h(r);l=nf(r),u.x=h.x+r.clientLeft,u.y=h.y+r.clientTop}const f=o&&!d&&!a?u1e(o,c):ys(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function X3e(e){return Array.from(e.getClientRects())}function Y3e(e){const t=ws(e),n=nq(e),r=e.ownerDocument.body,i=ja(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=ja(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+rq(e);const s=-n.scrollTop;return zo(r).direction==="rtl"&&(o+=ja(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}const pJ=25;function J3e(e,t){const n=Oa(e),r=ws(e),i=n.visualViewport;let a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;const u=vK();(!u||u&&t==="fixed")&&(s=i.offsetLeft,c=i.offsetTop)}const l=rq(r);if(l<=0){const u=r.ownerDocument,d=u.body,f=getComputedStyle(d),h=u.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,y=Math.abs(r.clientWidth-d.clientWidth-h);y<=pJ&&(a-=y)}else l<=pJ&&(a+=l);return{width:a,height:o,x:s,y:c}}function Q3e(e,t){const n=_h(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=oc(e)?nf(e):ys(1),o=e.clientWidth*a.x,s=e.clientHeight*a.y,c=i*a.x,l=r*a.y;return{width:o,height:s,x:c,y:l}}function yJ(e,t,n){let r;if(t==="viewport")r=J3e(e,n);else if(t==="document")r=Y3e(ws(e));else if(qo(t))r=Q3e(t,n);else{const i=l1e(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return WT(r)}function d1e(e,t){const n=sl(e);return n===t||!qo(n)||kf(n)?!1:zo(n).position==="fixed"||d1e(n,t)}function exe(e,t){const n=t.get(e);if(n)return n;let r=cy(e,[],!1).filter(s=>qo(s)&&Hf(s)!=="body"),i=null;const a=zo(e).position==="fixed";let o=a?sl(e):e;for(;qo(o)&&!kf(o);){const s=zo(o),c=mK(o);!c&&s.position==="fixed"&&(i=null),(a?!c&&!i:!c&&s.position==="static"&&!!i&&(i.position==="absolute"||i.position==="fixed")||Ty(o)&&!c&&d1e(e,o))?r=r.filter(u=>u!==o):i=s,o=sl(o)}return t.set(e,r),r}function txe(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const o=[...n==="clippingAncestors"?tq(t)?[]:exe(t,this._c):[].concat(n),r],s=yJ(t,o[0],i);let c=s.top,l=s.right,u=s.bottom,d=s.left;for(let f=1;f<o.length;f++){const h=yJ(t,o[f],i);c=ja(h.top,c),l=ol(h.right,l),u=ol(h.bottom,u),d=ja(h.left,d)}return{width:l-d,height:u-c,x:d,y:c}}function nxe(e){const{width:t,height:n}=c1e(e);return{width:t,height:n}}function rxe(e,t,n){const r=oc(t),i=ws(t),a=n==="fixed",o=_h(e,!0,a,t);let s={scrollLeft:0,scrollTop:0};const c=ys(0);function l(){c.x=rq(i)}if(r||!r&&!a)if((Hf(t)!=="body"||Ty(i))&&(s=nq(t)),r){const h=_h(t,!0,a,t);c.x=h.x+t.clientLeft,c.y=h.y+t.clientTop}else i&&l();a&&!r&&i&&l();const u=i&&!r&&!a?u1e(i,s):ys(0),d=o.left+s.scrollLeft-c.x-u.x,f=o.top+s.scrollTop-c.y-u.y;return{x:d,y:f,width:o.width,height:o.height}}function rO(e){return zo(e).position==="static"}function gJ(e,t){if(!oc(e)||zo(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ws(e)===n&&(n=n.ownerDocument.body),n}function h1e(e,t){const n=Oa(e);if(tq(e))return n;if(!oc(e)){let i=sl(e);for(;i&&!kf(i);){if(qo(i)&&!rO(i))return i;i=sl(i)}return n}let r=gJ(e,t);for(;r&&V3e(r)&&rO(r);)r=gJ(r,t);return r&&kf(r)&&rO(r)&&!mK(r)?n:r||W3e(e)||n}const ixe=async function(e){const t=this.getOffsetParent||h1e,n=this.getDimensions,r=await n(e.floating);return{reference:rxe(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function axe(e){return zo(e).direction==="rtl"}const oxe={convertOffsetParentRelativeRectToViewportRelativeRect:Z3e,getDocumentElement:ws,getClippingRect:txe,getOffsetParent:h1e,getElementRects:ixe,getClientRects:X3e,getDimensions:nxe,getScale:nf,isElement:qo,isRTL:axe};function f1e(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function sxe(e,t){let n=null,r;const i=ws(e);function a(){var s;clearTimeout(r),(s=n)==null||s.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();const l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:h}=l;if(s||t(),!f||!h)return;const y=em(d),v=em(i.clientWidth-(u+f)),k=em(i.clientHeight-(d+h)),g=em(u),w={rootMargin:-y+"px "+-v+"px "+-k+"px "+-g+"px",threshold:ja(0,ol(1,c))||1};let C=!0;function _(A){const j=A[0].intersectionRatio;if(j!==c){if(!C)return o();j?o(!1,j):r=setTimeout(()=>{o(!1,1e-7)},1e3)}j===1&&!f1e(l,e.getBoundingClientRect())&&o(),C=!1}try{n=new IntersectionObserver(_,{...w,root:i.ownerDocument})}catch{n=new IntersectionObserver(_,w)}n.observe(e)}return o(!0),a}function cxe(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,l=kK(e),u=i||a?[...l?cy(l):[],...t?cy(t):[]]:[];u.forEach(g=>{i&&g.addEventListener("scroll",n,{passive:!0}),a&&g.addEventListener("resize",n)});const d=l&&s?sxe(l,n):null;let f=-1,h=null;o&&(h=new ResizeObserver(g=>{let[S]=g;S&&S.target===l&&h&&t&&(h.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var w;(w=h)==null||w.observe(t)})),n()}),l&&!c&&h.observe(l),t&&h.observe(t));let y,v=c?_h(e):null;c&&k();function k(){const g=_h(e);v&&!f1e(v,g)&&n(),v=g,y=requestAnimationFrame(k)}return n(),()=>{var g;u.forEach(S=>{i&&S.removeEventListener("scroll",n),a&&S.removeEventListener("resize",n)}),d==null||d(),(g=h)==null||g.disconnect(),h=null,c&&cancelAnimationFrame(y)}}const lxe=O3e,uxe=F3e,dxe=D3e,hxe=H3e,fxe=q3e,mJ=T3e,pxe=B3e,yxe=(e,t,n)=>{const r=new Map,i={platform:oxe,...n},a={...i.platform,_c:r};return j3e(e,t,{...i,platform:a})};var gxe=typeof document<"u",mxe=function(){},nT=gxe?M.useLayoutEffect:mxe;function GT(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!GT(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const a=i[r];if(!(a==="_owner"&&e.$$typeof)&&!GT(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function p1e(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function vJ(e,t){const n=p1e(e);return Math.round(t*n)/n}function iO(e){const t=M.useRef(e);return nT(()=>{t.current=e}),t}function vxe(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=M.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,h]=M.useState(r);GT(f,r)||h(r);const[y,v]=M.useState(null),[k,g]=M.useState(null),S=M.useCallback(B=>{B!==A.current&&(A.current=B,v(B))},[]),w=M.useCallback(B=>{B!==j.current&&(j.current=B,g(B))},[]),C=a||y,_=o||k,A=M.useRef(null),j=M.useRef(null),O=M.useRef(u),T=c!=null,D=iO(c),I=iO(i),R=iO(l),U=M.useCallback(()=>{if(!A.current||!j.current)return;const B={placement:t,strategy:n,middleware:f};I.current&&(B.platform=I.current),yxe(A.current,j.current,B).then(V=>{const F={...V,isPositioned:R.current!==!1};q.current&&!GT(O.current,F)&&(O.current=F,qf.flushSync(()=>{d(F)}))})},[f,t,n,I,R]);nT(()=>{l===!1&&O.current.isPositioned&&(O.current.isPositioned=!1,d(B=>({...B,isPositioned:!1})))},[l]);const q=M.useRef(!1);nT(()=>(q.current=!0,()=>{q.current=!1}),[]),nT(()=>{if(C&&(A.current=C),_&&(j.current=_),C&&_){if(D.current)return D.current(C,_,U);U()}},[C,_,U,D,T]);const K=M.useMemo(()=>({reference:A,floating:j,setReference:S,setFloating:w}),[S,w]),Z=M.useMemo(()=>({reference:C,floating:_}),[C,_]),$=M.useMemo(()=>{const B={position:n,left:0,top:0};if(!Z.floating)return B;const V=vJ(Z.floating,u.x),F=vJ(Z.floating,u.y);return s?{...B,transform:"translate("+V+"px, "+F+"px)",...p1e(Z.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:V,top:F}},[n,s,Z.floating,u.x,u.y]);return M.useMemo(()=>({...u,update:U,refs:K,elements:Z,floatingStyles:$}),[u,U,K,Z,$])}const kxe=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:i}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?mJ({element:r.current,padding:i}).fn(n):{}:r?mJ({element:r,padding:i}).fn(n):{}}}},xxe=(e,t)=>{const n=lxe(e);return{name:n.name,fn:n.fn,options:[e,t]}},wxe=(e,t)=>{const n=uxe(e);return{name:n.name,fn:n.fn,options:[e,t]}},bxe=(e,t)=>({fn:pxe(e).fn,options:[e,t]}),Mxe=(e,t)=>{const n=dxe(e);return{name:n.name,fn:n.fn,options:[e,t]}},Sxe=(e,t)=>{const n=hxe(e);return{name:n.name,fn:n.fn,options:[e,t]}},Cxe=(e,t)=>{const n=fxe(e);return{name:n.name,fn:n.fn,options:[e,t]}},Lxe=(e,t)=>{const n=kxe(e);return{name:n.name,fn:n.fn,options:[e,t]}};var Ixe="Arrow",y1e=M.forwardRef((e,t)=>{const{children:n,width:r=10,height:i=5,...a}=e;return x.jsx(Jt.svg,{...a,ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:x.jsx("polygon",{points:"0,0 30,0 15,10"})})});y1e.displayName=Ixe;var Axe=y1e;function g1e(e){const[t,n]=M.useState(void 0);return il(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const a=i[0];let o,s;if("borderBoxSize"in a){const c=a.borderBoxSize,l=Array.isArray(c)?c[0]:c;o=l.inlineSize,s=l.blockSize}else o=e.offsetWidth,s=e.offsetHeight;n({width:o,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var xK="Popper",[m1e,Vf]=xs(xK),[_xe,v1e]=m1e(xK),k1e=e=>{const{__scopePopper:t,children:n}=e,[r,i]=M.useState(null);return x.jsx(_xe,{scope:t,anchor:r,onAnchorChange:i,children:n})};k1e.displayName=xK;var x1e="PopperAnchor",w1e=M.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,a=v1e(x1e,n),o=M.useRef(null),s=Nn(t,o),c=M.useRef(null);return M.useEffect(()=>{const l=c.current;c.current=(r==null?void 0:r.current)||o.current,l!==c.current&&a.onAnchorChange(c.current)}),r?null:x.jsx(Jt.div,{...i,ref:s})});w1e.displayName=x1e;var wK="PopperContent",[Exe,Pxe]=m1e(wK),b1e=M.forwardRef((e,t)=>{var ae,re,fe,ke,Ne,je;const{__scopePopper:n,side:r="bottom",sideOffset:i=0,align:a="center",alignOffset:o=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:d="partial",hideWhenDetached:f=!1,updatePositionStrategy:h="optimized",onPlaced:y,...v}=e,k=v1e(wK,n),[g,S]=M.useState(null),w=Nn(t,Re=>S(Re)),[C,_]=M.useState(null),A=g1e(C),j=(A==null?void 0:A.width)??0,O=(A==null?void 0:A.height)??0,T=r+(a!=="center"?"-"+a:""),D=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},I=Array.isArray(l)?l:[l],R=I.length>0,U={padding:D,boundary:I.filter(Rxe),altBoundary:R},{refs:q,floatingStyles:K,placement:Z,isPositioned:$,middlewareData:B}=vxe({strategy:"fixed",placement:T,whileElementsMounted:(...Re)=>cxe(...Re,{animationFrame:h==="always"}),elements:{reference:k.anchor},middleware:[xxe({mainAxis:i+O,alignmentAxis:o}),c&&wxe({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?bxe():void 0,...U}),c&&Mxe({...U}),Sxe({...U,apply:({elements:Re,rects:$e,availableWidth:ee,availableHeight:qe})=>{const{width:Ke,height:_e}=$e.reference,Se=Re.floating.style;Se.setProperty("--radix-popper-available-width",`${ee}px`),Se.setProperty("--radix-popper-available-height",`${qe}px`),Se.setProperty("--radix-popper-anchor-width",`${Ke}px`),Se.setProperty("--radix-popper-anchor-height",`${_e}px`)}}),C&&Lxe({element:C,padding:s}),jxe({arrowWidth:j,arrowHeight:O}),f&&Cxe({strategy:"referenceHidden",...U})]}),[V,F]=C1e(Z),ie=vs(y);il(()=>{$&&(ie==null||ie())},[$,ie]);const N=(ae=B.arrow)==null?void 0:ae.x,P=(re=B.arrow)==null?void 0:re.y,G=((fe=B.arrow)==null?void 0:fe.centerOffset)!==0,[J,X]=M.useState();return il(()=>{g&&X(window.getComputedStyle(g).zIndex)},[g]),x.jsx("div",{ref:q.setFloating,"data-radix-popper-content-wrapper":"",style:{...K,transform:$?K.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:J,"--radix-popper-transform-origin":[(ke=B.transformOrigin)==null?void 0:ke.x,(Ne=B.transformOrigin)==null?void 0:Ne.y].join(" "),...((je=B.hide)==null?void 0:je.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:x.jsx(Exe,{scope:n,placedSide:V,onArrowChange:_,arrowX:N,arrowY:P,shouldHideArrow:G,children:x.jsx(Jt.div,{"data-side":V,"data-align":F,...v,ref:w,style:{...v.style,animation:$?void 0:"none"}})})})});b1e.displayName=wK;var M1e="PopperArrow",Nxe={top:"bottom",right:"left",bottom:"top",left:"right"},S1e=M.forwardRef(function(t,n){const{__scopePopper:r,...i}=t,a=Pxe(M1e,r),o=Nxe[a.placedSide];return x.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:x.jsx(Axe,{...i,ref:n,style:{...i.style,display:"block"}})})});S1e.displayName=M1e;function Rxe(e){return e!==null}var jxe=e=>({name:"transformOrigin",options:e,fn(t){var k,g,S;const{placement:n,rects:r,middlewareData:i}=t,o=((k=i.arrow)==null?void 0:k.centerOffset)!==0,s=o?0:e.arrowWidth,c=o?0:e.arrowHeight,[l,u]=C1e(n),d={start:"0%",center:"50%",end:"100%"}[u],f=(((g=i.arrow)==null?void 0:g.x)??0)+s/2,h=(((S=i.arrow)==null?void 0:S.y)??0)+c/2;let y="",v="";return l==="bottom"?(y=o?d:`${f}px`,v=`${-c}px`):l==="top"?(y=o?d:`${f}px`,v=`${r.floating.height+c}px`):l==="right"?(y=`${-c}px`,v=o?d:`${h}px`):l==="left"&&(y=`${r.floating.width+c}px`,v=o?d:`${h}px`),{data:{x:y,y:v}}}});function C1e(e){const[t,n="center"]=e.split("-");return[t,n]}var bK=k1e,iq=w1e,MK=b1e,SK=S1e,aq="Popover",[L1e]=xs(aq,[Vf]),Dy=Vf(),[Txe,pl]=L1e(aq),I1e=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!1}=e,s=Dy(t),c=M.useRef(null),[l,u]=M.useState(!1),[d,f]=Of({prop:r,defaultProp:i??!1,onChange:a,caller:aq});return x.jsx(bK,{...s,children:x.jsx(Txe,{scope:t,contentId:da(),triggerRef:c,open:d,onOpenChange:f,onOpenToggle:M.useCallback(()=>f(h=>!h),[f]),hasCustomAnchor:l,onCustomAnchorAdd:M.useCallback(()=>u(!0),[]),onCustomAnchorRemove:M.useCallback(()=>u(!1),[]),modal:o,children:n})})};I1e.displayName=aq;var A1e="PopoverAnchor",_1e=M.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=pl(A1e,n),a=Dy(n),{onCustomAnchorAdd:o,onCustomAnchorRemove:s}=i;return M.useEffect(()=>(o(),()=>s()),[o,s]),x.jsx(iq,{...a,...r,ref:t})});_1e.displayName=A1e;var E1e="PopoverTrigger",P1e=M.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=pl(E1e,n),a=Dy(n),o=Nn(t,i.triggerRef),s=x.jsx(Jt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":D1e(i.open),...r,ref:o,onClick:St(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?s:x.jsx(iq,{asChild:!0,...a,children:s})});P1e.displayName=E1e;var CK="PopoverPortal",[Dxe,qxe]=L1e(CK,{forceMount:void 0}),N1e=e=>{const{__scopePopover:t,forceMount:n,children:r,container:i}=e,a=pl(CK,t);return x.jsx(Dxe,{scope:t,forceMount:n,children:x.jsx(lo,{present:n||a.open,children:x.jsx(Ny,{asChild:!0,container:i,children:r})})})};N1e.displayName=CK;var xf="PopoverContent",R1e=M.forwardRef((e,t)=>{const n=qxe(xf,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,a=pl(xf,e.__scopePopover);return x.jsx(lo,{present:r||a.open,children:a.modal?x.jsx(Oxe,{...i,ref:t}):x.jsx(Fxe,{...i,ref:t})})});R1e.displayName=xf;var zxe=vf("PopoverContent.RemoveScroll"),Oxe=M.forwardRef((e,t)=>{const n=pl(xf,e.__scopePopover),r=M.useRef(null),i=Nn(t,r),a=M.useRef(!1);return M.useEffect(()=>{const o=r.current;if(o)return cK(o)},[]),x.jsx(VD,{as:zxe,allowPinchZoom:!0,children:x.jsx(j1e,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:St(e.onCloseAutoFocus,o=>{var s;o.preventDefault(),a.current||(s=n.triggerRef.current)==null||s.focus()}),onPointerDownOutside:St(e.onPointerDownOutside,o=>{const s=o.detail.originalEvent,c=s.button===0&&s.ctrlKey===!0,l=s.button===2||c;a.current=l},{checkForDefaultPrevented:!1}),onFocusOutside:St(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1})})})}),Fxe=M.forwardRef((e,t)=>{const n=pl(xf,e.__scopePopover),r=M.useRef(!1),i=M.useRef(!1);return x.jsx(j1e,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var o,s;(o=e.onCloseAutoFocus)==null||o.call(e,a),a.defaultPrevented||(r.current||(s=n.triggerRef.current)==null||s.focus(),a.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:a=>{var c,l;(c=e.onInteractOutside)==null||c.call(e,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const o=a.target;((l=n.triggerRef.current)==null?void 0:l.contains(o))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&i.current&&a.preventDefault()}})}),j1e=M.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:o,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onInteractOutside:u,...d}=e,f=pl(xf,n),h=Dy(n);return sK(),x.jsx(BD,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:x.jsx(Py,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:u,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onDismiss:()=>f.onOpenChange(!1),children:x.jsx(MK,{"data-state":D1e(f.open),role:"dialog",id:f.contentId,...h,...d,ref:t,style:{...d.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),T1e="PopoverClose",Bxe=M.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=pl(T1e,n);return x.jsx(Jt.button,{type:"button",...r,ref:t,onClick:St(e.onClick,()=>i.onOpenChange(!1))})});Bxe.displayName=T1e;var Hxe="PopoverArrow",Vxe=M.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=Dy(n);return x.jsx(SK,{...i,...r,ref:t})});Vxe.displayName=Hxe;function D1e(e){return e?"open":"closed"}var Uxe=I1e,$xe=_1e,Wxe=P1e,Gxe=N1e,q1e=R1e;const Uf=Uxe,qy=Wxe,Kxe=$xe,Fh=M.forwardRef(({className:e,align:t="center",sideOffset:n=4,...r},i)=>x.jsx(Gxe,{children:x.jsx(q1e,{ref:i,align:t,sideOffset:n,className:Ze("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none 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",e),...r})}));Fh.displayName=q1e.displayName;const aW="seeflow:navigate",Zxe=e=>(window.addEventListener("popstate",e),window.addEventListener(aW,e),()=>{window.removeEventListener("popstate",e),window.removeEventListener(aW,e)}),kJ=()=>window.location.pathname,Xxe=()=>M.useSyncExternalStore(Zxe,kJ,kJ),wf=e=>{e!==window.location.pathname&&(window.history.pushState({},"",e),window.dispatchEvent(new Event(aW)))};function Yxe({demos:e,currentSlug:t,onProjectCreated:n,onProjectUnregistered:r}){const[i,a]=M.useState(!1),[o,s]=M.useState(!1),[c,l]=M.useState(null),[u,d]=M.useState(!1),[f,h]=M.useState(null);M.useEffect(()=>{const w=C=>{C.key==="k"&&(C.metaKey||C.ctrlKey)&&(C.preventDefault(),a(_=>!_))};return document.addEventListener("keydown",w),()=>document.removeEventListener("keydown",w)},[]);const y=e.find(w=>w.slug===t),v=w=>{n==null||n(w),wf(`/d/${w.slug}`)},k=w=>{l(w),h(null)},g=()=>{u||(l(null),h(null))},S=async()=>{if(c){d(!0),h(null);try{await $4e(c.id);const w=c.id;l(null),r==null||r(w)}catch(w){h(w instanceof Error?w.message:String(w))}finally{d(!1)}}};return x.jsxs(x.Fragment,{children:[x.jsxs(Uf,{open:i,onOpenChange:a,children:[x.jsx(qy,{asChild:!0,children:x.jsxs(oi,{type:"button",variant:"outline",size:"sm","aria-label":"Switch demo","aria-expanded":i,className:"gap-2","data-testid":"project-switcher-trigger",children:[x.jsx("span",{className:"max-w-[180px] truncate text-sm",children:(y==null?void 0:y.name)??"Select demo"}),x.jsx(r1e,{children:"⌘K"}),x.jsx(sp,{className:"h-3.5 w-3.5 opacity-60"})]})}),x.jsx(Fh,{align:"end",sideOffset:6,className:"w-[320px] p-0","data-testid":"project-switcher-popover",children:x.jsxs(Jue,{children:[x.jsx(Que,{placeholder:"Search demos..."}),x.jsxs(e1e,{children:[x.jsx(t1e,{children:"No demos."}),e.length>0?x.jsx(eW,{heading:"Demos",children:e.map(w=>x.jsxs(tW,{value:`${w.name} ${w.slug}`,onSelect:()=>{a(!1),wf(`/d/${w.slug}`)},className:"group flex items-center justify-between gap-2",children:[x.jsxs("div",{className:"flex min-w-0 flex-col items-start gap-0.5",children:[x.jsx("span",{className:"font-medium",children:w.name}),x.jsx("span",{className:"w-full truncate text-xs text-muted-foreground",children:w.repoPath})]}),x.jsx("button",{type:"button","aria-label":`Unregister ${w.name}`,className:"shrink-0 rounded p-0.5 opacity-0 transition-opacity hover:text-destructive group-hover:opacity-100 focus-visible:opacity-100 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",onClick:C=>{C.stopPropagation(),a(!1),k(w)},children:x.jsx(Pp,{className:"h-3.5 w-3.5"})})]},w.id))}):null,e.length>0?x.jsx(n1e,{}):null,x.jsx(eW,{children:x.jsxs(tW,{value:"+ create new project",onSelect:()=>{a(!1),s(!0)},"data-testid":"project-switcher-create",className:"flex items-center gap-2 text-sm",children:[x.jsx(bp,{className:"h-4 w-4 opacity-70"}),x.jsx("span",{className:"font-medium",children:"Create new project"})]})})]})]})})]}),x.jsx(J4e,{open:o,onOpenChange:s,onCreated:v}),x.jsx(hK,{open:c!==null,onOpenChange:w=>{w||g()},children:x.jsxs(ZD,{className:"sm:max-w-md","data-testid":"unregister-project-dialog",children:[x.jsxs(XD,{children:[x.jsx(YD,{children:"Unregister project?"}),x.jsxs(JD,{children:["This removes ",x.jsx("strong",{children:c==null?void 0:c.name})," from SeeFlow. Your files at"," ",x.jsx("code",{className:"text-xs",children:c==null?void 0:c.repoPath})," will not be deleted."]})]}),f?x.jsx("div",{role:"alert","data-testid":"unregister-project-error",className:"rounded-md border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive",children:f}):null,x.jsxs(sy,{children:[x.jsx(oi,{type:"button",variant:"ghost",onClick:g,disabled:u,children:"Cancel"}),x.jsx(oi,{type:"button",variant:"destructive",onClick:S,disabled:u,"data-testid":"unregister-project-confirm",children:u?"Unregistering…":"Unregister"})]})]})})]})}function Jxe({demos:e,currentSlug:t,onProjectCreated:n,onProjectUnregistered:r}){return x.jsxs("header",{className:"flex h-12 shrink-0 items-center justify-between border-b bg-background px-4",children:[x.jsxs("button",{type:"button",onClick:()=>wf("/"),style:{display:"flex",alignItems:"center",gap:6,fontWeight:700,fontSize:16,color:"#0f172a",letterSpacing:"-0.02em",background:"none",border:"none",cursor:"pointer",padding:0},children:[x.jsx(jp,{size:20,color:"#34d399",strokeWidth:2}),"SeeFlow"]}),x.jsx("div",{className:"flex items-center gap-3",children:x.jsx(Yxe,{demos:e,currentSlug:t,onProjectCreated:n,onProjectUnregistered:r})})]})}var Qxe=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),ewe="VisuallyHidden",z1e=M.forwardRef((e,t)=>x.jsx(Jt.span,{...e,ref:t,style:{...Qxe,...e.style}}));z1e.displayName=ewe;var twe=z1e,[oq]=xs("Tooltip",[Vf]),sq=Vf(),O1e="TooltipProvider",nwe=700,oW="tooltip.open",[rwe,LK]=oq(O1e),F1e=e=>{const{__scopeTooltip:t,delayDuration:n=nwe,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:a}=e,o=M.useRef(!0),s=M.useRef(!1),c=M.useRef(0);return M.useEffect(()=>{const l=c.current;return()=>window.clearTimeout(l)},[]),x.jsx(rwe,{scope:t,isOpenDelayedRef:o,delayDuration:n,onOpen:M.useCallback(()=>{window.clearTimeout(c.current),o.current=!1},[]),onClose:M.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>o.current=!0,r)},[r]),isPointerInTransitRef:s,onPointerInTransitChange:M.useCallback(l=>{s.current=l},[]),disableHoverableContent:i,children:a})};F1e.displayName=O1e;var ly="Tooltip",[iwe,zy]=oq(ly),B1e=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:i,onOpenChange:a,disableHoverableContent:o,delayDuration:s}=e,c=LK(ly,e.__scopeTooltip),l=sq(t),[u,d]=M.useState(null),f=da(),h=M.useRef(0),y=o??c.disableHoverableContent,v=s??c.delayDuration,k=M.useRef(!1),[g,S]=Of({prop:r,defaultProp:i??!1,onChange:j=>{j?(c.onOpen(),document.dispatchEvent(new CustomEvent(oW))):c.onClose(),a==null||a(j)},caller:ly}),w=M.useMemo(()=>g?k.current?"delayed-open":"instant-open":"closed",[g]),C=M.useCallback(()=>{window.clearTimeout(h.current),h.current=0,k.current=!1,S(!0)},[S]),_=M.useCallback(()=>{window.clearTimeout(h.current),h.current=0,S(!1)},[S]),A=M.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{k.current=!0,S(!0),h.current=0},v)},[v,S]);return M.useEffect(()=>()=>{h.current&&(window.clearTimeout(h.current),h.current=0)},[]),x.jsx(bK,{...l,children:x.jsx(iwe,{scope:t,contentId:f,open:g,stateAttribute:w,trigger:u,onTriggerChange:d,onTriggerEnter:M.useCallback(()=>{c.isOpenDelayedRef.current?A():C()},[c.isOpenDelayedRef,A,C]),onTriggerLeave:M.useCallback(()=>{y?_():(window.clearTimeout(h.current),h.current=0)},[_,y]),onOpen:C,onClose:_,disableHoverableContent:y,children:n})})};B1e.displayName=ly;var sW="TooltipTrigger",H1e=M.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=zy(sW,n),a=LK(sW,n),o=sq(n),s=M.useRef(null),c=Nn(t,s,i.onTriggerChange),l=M.useRef(!1),u=M.useRef(!1),d=M.useCallback(()=>l.current=!1,[]);return M.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),x.jsx(iq,{asChild:!0,...o,children:x.jsx(Jt.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:c,onPointerMove:St(e.onPointerMove,f=>{f.pointerType!=="touch"&&!u.current&&!a.isPointerInTransitRef.current&&(i.onTriggerEnter(),u.current=!0)}),onPointerLeave:St(e.onPointerLeave,()=>{i.onTriggerLeave(),u.current=!1}),onPointerDown:St(e.onPointerDown,()=>{i.open&&i.onClose(),l.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:St(e.onFocus,()=>{l.current||i.onOpen()}),onBlur:St(e.onBlur,i.onClose),onClick:St(e.onClick,i.onClose)})})});H1e.displayName=sW;var IK="TooltipPortal",[awe,owe]=oq(IK,{forceMount:void 0}),V1e=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,a=zy(IK,t);return x.jsx(awe,{scope:t,forceMount:n,children:x.jsx(lo,{present:n||a.open,children:x.jsx(Ny,{asChild:!0,container:i,children:r})})})};V1e.displayName=IK;var bf="TooltipContent",U1e=M.forwardRef((e,t)=>{const n=owe(bf,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i="top",...a}=e,o=zy(bf,e.__scopeTooltip);return x.jsx(lo,{present:r||o.open,children:o.disableHoverableContent?x.jsx($1e,{side:i,...a,ref:t}):x.jsx(swe,{side:i,...a,ref:t})})}),swe=M.forwardRef((e,t)=>{const n=zy(bf,e.__scopeTooltip),r=LK(bf,e.__scopeTooltip),i=M.useRef(null),a=Nn(t,i),[o,s]=M.useState(null),{trigger:c,onClose:l}=n,u=i.current,{onPointerInTransitChange:d}=r,f=M.useCallback(()=>{s(null),d(!1)},[d]),h=M.useCallback((y,v)=>{const k=y.currentTarget,g={x:y.clientX,y:y.clientY},S=hwe(g,k.getBoundingClientRect()),w=fwe(g,S),C=pwe(v.getBoundingClientRect()),_=gwe([...w,...C]);s(_),d(!0)},[d]);return M.useEffect(()=>()=>f(),[f]),M.useEffect(()=>{if(c&&u){const y=k=>h(k,u),v=k=>h(k,c);return c.addEventListener("pointerleave",y),u.addEventListener("pointerleave",v),()=>{c.removeEventListener("pointerleave",y),u.removeEventListener("pointerleave",v)}}},[c,u,h,f]),M.useEffect(()=>{if(o){const y=v=>{const k=v.target,g={x:v.clientX,y:v.clientY},S=(c==null?void 0:c.contains(k))||(u==null?void 0:u.contains(k)),w=!ywe(g,o);S?f():w&&(f(),l())};return document.addEventListener("pointermove",y),()=>document.removeEventListener("pointermove",y)}},[c,u,o,l,f]),x.jsx($1e,{...e,ref:a})}),[cwe,lwe]=oq(ly,{isInside:!1}),uwe=xke("TooltipContent"),$1e=M.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:a,onPointerDownOutside:o,...s}=e,c=zy(bf,n),l=sq(n),{onClose:u}=c;return M.useEffect(()=>(document.addEventListener(oW,u),()=>document.removeEventListener(oW,u)),[u]),M.useEffect(()=>{if(c.trigger){const d=f=>{const h=f.target;h!=null&&h.contains(c.trigger)&&u()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[c.trigger,u]),x.jsx(Py,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:d=>d.preventDefault(),onDismiss:u,children:x.jsxs(MK,{"data-state":c.stateAttribute,...l,...s,ref:t,style:{...s.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[x.jsx(uwe,{children:r}),x.jsx(cwe,{scope:n,isInside:!0,children:x.jsx(twe,{id:c.contentId,role:"tooltip",children:i||r})})]})})});U1e.displayName=bf;var W1e="TooltipArrow",dwe=M.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=sq(n);return lwe(W1e,n).isInside?null:x.jsx(SK,{...i,...r,ref:t})});dwe.displayName=W1e;function hwe(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,i,a)){case a:return"left";case i:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function fwe(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function pwe(e){const{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function ywe(e,t){const{x:n,y:r}=e;let i=!1;for(let a=0,o=t.length-1;a<t.length;o=a++){const s=t[a],c=t[o],l=s.x,u=s.y,d=c.x,f=c.y;u>r!=f>r&&n<(d-l)*(r-u)/(f-u)+l&&(i=!i)}return i}function gwe(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),mwe(t)}function mwe(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const i=e[r];for(;t.length>=2;){const a=t[t.length-1],o=t[t.length-2];if((a.x-o.x)*(i.y-o.y)>=(a.y-o.y)*(i.x-o.x))t.pop();else break}t.push(i)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const i=e[r];for(;n.length>=2;){const a=n[n.length-1],o=n[n.length-2];if((a.x-o.x)*(i.y-o.y)>=(a.y-o.y)*(i.x-o.x))n.pop();else break}n.push(i)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var vwe=F1e,kwe=B1e,xwe=H1e,wwe=V1e,G1e=U1e;const Tp=vwe,Oy=kwe,Fy=xwe,$f=M.forwardRef(({className:e,sideOffset:t=4,...n},r)=>x.jsx(wwe,{children:x.jsx(G1e,{ref:r,sideOffset:t,className:Ze("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));$f.displayName=G1e.displayName;const bwe=e=>{const[t,n]=M.useState(null),[r,i]=M.useState(e!==null),[a,o]=M.useState(null),s=M.useCallback(()=>{e&&(i(!0),Hue(e).then(c=>{n(c),o(null)}).catch(c=>{console.error("[useDemoData] failed",c),o(String(c))}).finally(()=>i(!1)))},[e]);return M.useEffect(()=>{if(!e){n(null),i(!1);return}s()},[e,s]),{detail:t,loading:r,error:a,refresh:s}},Mwe=()=>{const[e,t]=M.useState(null),[n,r]=M.useState(null),i=M.useCallback(()=>U4e().then(a=>{t(a),r(null)}).catch(a=>{console.error("[useDemos] failed",a),t([]),r(String(a))}),[]);return M.useEffect(()=>{i()},[i]),{demos:e,error:n,refresh:i}},Swe=5,Cwe={"node:running":"running","node:done":"done","node:error":"error"},Lwe=(e,t)=>{if(t.type==="reset")return{};const n=e[t.nodeId]??[],r=[t.entry,...n].slice(0,Swe);return{...e,[t.nodeId]:r}},Iwe=e=>{const[t,n]=M.useReducer(Lwe,{}),r=M.useRef(n);r.current=n,M.useEffect(()=>{r.current({type:"reset"})},[e]);const i=M.useCallback(o=>{const s=Cwe[o.type];if(!s)return;const c=typeof o.nodeId=="string"?o.nodeId:null;if(!c)return;const l=typeof o.runId=="string"?o.runId:void 0,u=typeof o.ts=="number"?o.ts:Date.now();r.current({type:"append",nodeId:c,entry:{status:s,ts:u,runId:l}})},[]),a=M.useCallback(()=>{r.current({type:"reset"})},[]);return{events:t,apply:i,reset:a}},Awe=(e,t)=>{var n,r;switch(t.type){case"reset":return{};case"running":return{...e,[t.nodeId]:{status:"running",runId:t.runId,ts:t.ts??Date.now()}};case"done":return{...e,[t.nodeId]:{...e[t.nodeId],status:"done",runId:t.runId??((n=e[t.nodeId])==null?void 0:n.runId),responseStatus:t.responseStatus,body:t.body,ts:t.ts??Date.now()}};case"error":return{...e,[t.nodeId]:{...e[t.nodeId],status:"error",runId:t.runId??((r=e[t.nodeId])==null?void 0:r.runId),error:t.message,ts:t.ts??Date.now()}}}},_we=e=>{const[t,n]=M.useReducer(Awe,{}),r=M.useRef(n);r.current=n,M.useEffect(()=>{r.current({type:"reset"})},[e]);const i=M.useCallback(o=>{const s=typeof o.nodeId=="string"?o.nodeId:null;if(!s)return;const c=typeof o.runId=="string"?o.runId:void 0;if(o.type==="node:running"){r.current({type:"running",nodeId:s,runId:c,ts:o.ts});return}if(o.type==="node:done"){const l=typeof o.status=="number"?o.status:void 0;r.current({type:"done",nodeId:s,runId:c,responseStatus:l,body:o.body,ts:o.ts});return}if(o.type==="node:error"){const l=typeof o.message=="string"?o.message:void 0;r.current({type:"error",nodeId:s,runId:c,message:l,ts:o.ts})}},[]),a=M.useCallback(()=>{r.current({type:"reset"})},[]);return{runs:t,apply:i,reset:a}},Ewe=new Set(["ok","warn","error","pending"]),Pwe=(e,t)=>{if(t.type!=="node:status")return e;const n=typeof t.nodeId=="string"?t.nodeId:null;if(!n||typeof t.state!="string"||!Ewe.has(t.state))return e;const r=typeof t.summary=="string"?t.summary:void 0,i=typeof t.detail=="string"?t.detail:void 0,a=t.data&&typeof t.data=="object"&&!Array.isArray(t.data)?t.data:void 0,o=typeof t.ts=="number"?t.ts:Date.now();return{...e,[n]:{state:t.state,summary:r,detail:i,data:a,ts:o}}},Nwe=(e,t)=>{switch(t.type){case"reset":return{};case"event":return Pwe(e,t.event)}},Rwe=e=>{const[t,n]=M.useReducer(Nwe,{}),r=M.useRef(n);r.current=n,M.useEffect(()=>{r.current({type:"reset"})},[e]);const i=M.useCallback(o=>{r.current({type:"event",event:o})},[]),a=M.useCallback(()=>{r.current({type:"reset"})},[]);return{statusByNode:t,apply:i,reset:a}},jwe=(e,t={})=>{const[n,r]=M.useState(null),[i,a]=M.useState(!1),{onReload:o,onEvent:s}=t;return M.useEffect(()=>{if(!e){r(null),a(!1);return}const c=`/api/events?demoId=${encodeURIComponent(e)}`,l=new EventSource(c);l.addEventListener("open",()=>a(!0)),l.addEventListener("error",()=>a(!1)),l.addEventListener("hello",()=>{o==null||o()}),l.addEventListener("demo:reload",u=>{const d=xJ(u,"demo:reload");r(d),s==null||s(d),o==null||o()});for(const u of["node:running","node:done","node:error","node:status"])l.addEventListener(u,d=>{s==null||s(xJ(d,u))});return()=>{l.close()}},[e,o,s]),{lastReload:n,connected:i}},xJ=(e,t)=>{try{const n=JSON.parse(e.data);return{type:t,ts:Date.now(),...n}}catch{return{type:t,ts:Date.now()}}},K1e="seeflow:last-project",Twe=()=>{if(typeof window>"u")return null;try{return window.localStorage.getItem(K1e)}catch{return null}},wJ=e=>{if(!(typeof window>"u"))try{window.localStorage.setItem(K1e,e)}catch{}},Dwe=(e,t)=>{if(e.length===0)return null;if(e.length===1)return e[0]??null;if(t){const n=e.find(r=>r.id===t);if(n)return n}return null},qwe=typeof navigator<"u"&&typeof navigator.platform=="string"&&navigator.platform.toLowerCase().includes("mac"),zwe=e=>e.length===1?e.toUpperCase():e==="Escape"?"Esc":e,Ar=(e,t=qwe)=>{const n=zwe(e.key);if(t){let i="";return e.meta&&(i+="⌘"),e.alt&&(i+="⌥"),e.shift&&(i+="⇧"),`${i}${n}`}const r=[];return e.meta&&r.push("Ctrl"),e.shift&&r.push("Shift"),e.alt&&r.push("Alt"),r.push(n),r.join("+")},AK=[{id:"tool.select",label:"Select tool",description:"Switch to the selection / pan tool",category:"Tools",shortcut:Ar({key:"V"})},{id:"tool.rectangle",label:"Rectangle",description:"Draw rectangle nodes",category:"Tools",shortcut:Ar({key:"R"})},{id:"tool.ellipse",label:"Ellipse",description:"Draw ellipse nodes",category:"Tools",shortcut:Ar({key:"O"})},{id:"tool.text",label:"Text",description:"Add a text node",category:"Tools",shortcut:Ar({key:"T"})},{id:"tool.sticky",label:"Sticky note",description:"Add a sticky note",category:"Tools",shortcut:Ar({key:"S"})},{id:"tool.database",label:"Database",description:"Add a database node",category:"Tools",shortcut:Ar({key:"D"})},{id:"tool.server",label:"Server",description:"Add a server node",category:"Tools"},{id:"tool.user",label:"User",description:"Add a user node",category:"Tools"},{id:"tool.queue",label:"Queue",description:"Add a queue node",category:"Tools"},{id:"tool.cloud",label:"Cloud",description:"Add a cloud node",category:"Tools"},{id:"edit.undo",label:"Undo",category:"Edit",shortcut:Ar({meta:!0,key:"Z"}),enabled:e=>e.canUndo},{id:"edit.redo",label:"Redo",category:"Edit",shortcut:Ar({meta:!0,shift:!0,key:"Z"}),enabled:e=>e.canRedo},{id:"edit.copy",label:"Copy",category:"Edit",shortcut:Ar({meta:!0,key:"C"}),enabled:e=>e.hasSelection},{id:"edit.paste",label:"Paste",category:"Edit",shortcut:Ar({meta:!0,key:"V"}),enabled:e=>e.hasClipboard},{id:"edit.duplicate",label:"Duplicate",category:"Edit",shortcut:Ar({meta:!0,key:"D"}),enabled:e=>e.hasSelection},{id:"edit.delete",label:"Delete",category:"Edit",shortcut:Ar({key:"Delete"}),enabled:e=>e.hasSelection},{id:"edit.selectAll",label:"Select all",category:"Edit",shortcut:Ar({meta:!0,key:"A"})},{id:"view.fit",label:"Fit view",description:"Fit everything in the viewport",category:"View",shortcut:Ar({meta:!0,key:"0"})},{id:"view.zoomIn",label:"Zoom in",category:"View",shortcut:Ar({meta:!0,key:"="})},{id:"view.zoomOut",label:"Zoom out",category:"View",shortcut:Ar({meta:!0,key:"-"})},{id:"view.zoom100",label:"Zoom to 100%",category:"View",shortcut:Ar({key:"1"})},{id:"view.zoomToSelection",label:"Zoom to selection",category:"View",shortcut:Ar({key:"F"}),enabled:e=>e.hasSelection},{id:"layout.tidy",label:"Tidy layout",description:"Auto-layout the canvas or current selection",category:"Layout",shortcut:Ar({meta:!0,shift:!0,key:"L"})},{id:"selection.deselect",label:"Deselect",description:"Clear selection and exit draw mode",category:"Selection",shortcut:Ar({key:"Escape"})},{id:"help.commandPalette",label:"Open command palette",category:"Help",shortcut:Ar({meta:!0,key:"P"})},{id:"export.pdf",label:"Export to PDF",description:"Download the current canvas as a PDF",category:"File",enabled:e=>e.canExportDemo},{id:"export.png",label:"Export as image",description:"Download the current canvas as a PNG",category:"File",enabled:e=>e.canExportDemo},{id:"session.reset",label:"Restart the demo",description:"Stop running scripts and re-run the reset script",category:"File",enabled:e=>e.canResetSession}],bJ=e=>{const t=AK.find(n=>n.id===e);return t?t.shortcut?`${t.label} (${t.shortcut})`:t.label:""},Owe=1,Fwe=10,Bwe=e=>{if(e.metaKey||e.ctrlKey||e.altKey)return null;const t=e.shiftKey?Fwe:Owe;switch(e.key){case"ArrowLeft":return{dx:-t,dy:0};case"ArrowRight":return{dx:t,dy:0};case"ArrowUp":return{dx:0,dy:-t};case"ArrowDown":return{dx:0,dy:t};default:return null}},Hwe=e=>{if(!(e.metaKey||e.ctrlKey)||e.altKey)return null;switch(e.key){case"0":return"fit";case"=":case"+":return"in";case"-":case"_":return"out";default:return null}},Vwe=(e,t,n)=>{if(t.length===0)return[];const r=new Map(n.map(a=>[a.id,a])),i=[];for(const a of t){const o=r.get(a);o&&i.push({id:a,position:{x:o.position.x+e.dx,y:o.position.y+e.dy}})}return i},Uwe=({event:e,isEditableActive:t,hasNodes:n,hasConnectors:r,selectedIds:i,hasClipboard:a})=>{if(!(e.metaKey||e.ctrlKey))return{type:"noop"};if(e.shiftKey||e.altKey)return{type:"noop"};const o=e.key.toLowerCase();return o!=="a"&&o!=="c"&&o!=="v"&&o!=="d"?{type:"noop"}:t?{type:"noop"}:o==="a"?!n&&!r?{type:"noop"}:{type:"selectAll"}:o==="c"?i.length===0?{type:"noop"}:{type:"copy",ids:i}:o==="d"?i.length===0?{type:"noop"}:{type:"duplicate",ids:i}:a?{type:"paste"}:{type:"noop"}},$we=e=>{if(e.metaKey||e.ctrlKey||e.shiftKey||e.altKey)return null;switch(e.key.toLowerCase()){case"v":return"select";case"r":return"rectangle";case"o":return"ellipse";case"t":return"text";case"s":return"sticky";case"d":return"database";default:return null}},MJ=["File","Edit","View","Tools","Layout","Selection","Help"],Z1e="seeflow:command-palette:recent",X1e=5,Y1e=new Map(AK.map(e=>[e.id,e])),Wwe=e=>typeof e=="string"&&Y1e.has(e),SJ=()=>{if(typeof window>"u")return[];try{const e=window.localStorage.getItem(Z1e);if(!e)return[];const t=JSON.parse(e);return Array.isArray(t)?t.filter(Wwe).slice(0,X1e):[]}catch{return[]}},Gwe=e=>{if(!(typeof window>"u"))try{window.localStorage.setItem(Z1e,JSON.stringify(e))}catch{}},CJ=(e,t)=>e.enabled?e.enabled(t):!0,Kwe=(e,t)=>t.length===0?!0:`${e.label} ${e.description??""}`.toLowerCase().includes(t);function Zwe({open:e,onOpenChange:t,runCommand:n,ctx:r}){const[i,a]=M.useState(""),[o,s]=M.useState(0),[c,l]=M.useState(()=>SJ()),u=M.useRef(null),d=M.useRef(null);M.useEffect(()=>{e&&(a(""),s(0),l(SJ()))},[e]);const{groups:f,flat:h}=M.useMemo(()=>{const C=i.trim().toLowerCase();if(C.length===0){if(c.length===0)return{groups:[],flat:[]};const T=[];for(const I of c){const R=Y1e.get(I);R&&T.push({cmd:R,enabled:CJ(R,r)})}return{groups:[{category:"Recent",rows:T}],flat:T}}const _=new Map;for(const T of AK){if(!Kwe(T,C))continue;const D={cmd:T,enabled:CJ(T,r)},I=_.get(T.category);I?I.push(D):_.set(T.category,[D])}const j=[...MJ.filter(T=>_.has(T)),...Array.from(_.keys()).filter(T=>!MJ.includes(T))].map(T=>({category:T,rows:_.get(T)??[]})),O=j.flatMap(T=>T.rows);return{groups:j,flat:O}},[i,r,c]);M.useEffect(()=>{if(h.length===0){s(0);return}s(C=>{var A;let _=C;if(_>=h.length&&(_=0),!((A=h[_])!=null&&A.enabled)){const j=h.findIndex(O=>O.enabled);j!==-1&&(_=j)}return _})},[h]);const y=M.useCallback(C=>{h.length!==0&&s(_=>{var j;let A=_;for(let O=0;O<h.length;O++)if(A=(A+C+h.length)%h.length,(j=h[A])!=null&&j.enabled)return A;return _})},[h]),v=M.useCallback(C=>{l(_=>{const A=[C,..._.filter(j=>j!==C)].slice(0,X1e);return Gwe(A),A})},[]),k=M.useCallback(C=>{const _=h[C];!_||!_.enabled||(v(_.cmd.id),n(_.cmd.id),t(!1))},[h,t,v,n]),g=M.useCallback(C=>{if(C.key==="ArrowDown"){C.preventDefault(),y(1);return}if(C.key==="ArrowUp"){C.preventDefault(),y(-1);return}C.key==="Enter"&&(C.preventDefault(),k(o))},[k,o,y]);M.useEffect(()=>{if(!e)return;const C=d.current;if(!C)return;const _=C.querySelector(`[data-command-row-index="${o}"]`);_&&typeof _.scrollIntoView=="function"&&_.scrollIntoView({block:"nearest"})},[o,e]);const w=i.trim().length>0;return x.jsx($D,{open:e,onOpenChange:t,children:x.jsx(WD,{children:x.jsxs(Ff,{className:Ze("fixed left-0 right-0 top-[20%] z-50 mx-auto w-[480px] max-w-[90vw] border bg-background shadow-lg duration-200","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","sm:rounded-lg"),"data-testid":"command-palette",onOpenAutoFocus:C=>{var _;C.preventDefault(),(_=u.current)==null||_.focus()},children:[x.jsx("div",{className:Ze("border-b",h.length===0&&!w&&"border-b-0"),children:x.jsx("input",{ref:u,type:"text",value:i,onChange:C=>a(C.target.value),onKeyDown:g,placeholder:"Type a command…","data-testid":"command-palette-input","aria-label":"Search commands",autoComplete:"off",spellCheck:!1,className:"w-full bg-transparent px-4 py-3 text-sm outline-none placeholder:text-muted-foreground"})}),x.jsx("div",{ref:d,"data-testid":"command-palette-list","data-empty":h.length===0?"true":"false",className:Ze("max-h-[50vh] overflow-y-auto",h.length>0?"py-1":"","seeflow-no-scrollbar"),children:h.length===0?w?x.jsxs("div",{"data-testid":"command-palette-empty",className:"px-4 py-6 text-center text-sm text-muted-foreground",children:['No commands match "',i,'"']}):null:(()=>{let C=-1;return f.map(_=>x.jsxs("div",{className:"py-1",children:[x.jsx("div",{className:"px-3 pb-1 pt-2 text-xs font-medium uppercase tracking-wide text-muted-foreground",children:_.category}),_.rows.map(A=>{C+=1;const j=C,O=j===o;return x.jsxs("button",{type:"button","data-testid":`command-palette-row-${A.cmd.id}`,"data-command-row-index":j,"data-highlighted":O?"true":"false","aria-disabled":A.enabled?void 0:!0,disabled:!A.enabled,onMouseEnter:()=>{A.enabled&&s(j)},onClick:()=>k(j),className:Ze("flex w-full items-center justify-between gap-3 px-3 py-2 text-left text-sm outline-none",A.enabled?"cursor-pointer text-foreground hover:bg-accent":"cursor-not-allowed text-muted-foreground/50",O&&A.enabled?"bg-accent":""),children:[x.jsxs("div",{className:"flex min-w-0 flex-col",children:[x.jsx("span",{className:"truncate font-medium",children:A.cmd.label}),A.cmd.description?x.jsx("span",{className:"truncate text-xs text-muted-foreground",children:A.cmd.description}):null]}),A.cmd.shortcut?x.jsx("kbd",{"data-testid":`command-palette-shortcut-${A.cmd.id}`,className:"shrink-0 rounded border bg-muted px-1.5 py-0.5 font-mono text-[11px] text-muted-foreground",children:A.cmd.shortcut}):null]},A.cmd.id)})]},_.category))})()})]})})})}const J1e="seeflow:icon-recents",Xwe=16;function Q1e(){if(typeof window>"u")return[];try{const e=window.localStorage.getItem(J1e);if(e===null)return[];const t=JSON.parse(e);return Array.isArray(t)?t.every(n=>typeof n=="string")?t:[]:[]}catch{return[]}}function Ywe(e){if(!(typeof window>"u"))try{const n=Q1e().filter(i=>i!==e),r=[e,...n].slice(0,Xwe);window.localStorage.setItem(J1e,JSON.stringify(r))}catch{}}const Jwe=new Set(["createLucideIcon","Icon","icons","default"]),Qwe=Symbol.for("react.forward_ref");function e6e(e){return typeof e=="function"?!0:e!==null&&typeof e=="object"?e.$$typeof===Qwe:!1}function t6e(e){return e.replace(/[A-Z]/g,(t,n)=>n===0?t.toLowerCase():`-${t.toLowerCase()}`)}function n6e(){const e={};for(const[t,n]of Object.entries(H4e))Jwe.has(t)||e6e(n)&&(e[t6e(t)]=n);return e}const KT=n6e(),r6e=Object.keys(KT).sort(),A0=8,tm=32,aO=256,LJ=2;function i6e(e,t){const n=t.trim().toLowerCase();return n===""?e.slice():e.filter(r=>r.toLowerCase().includes(n))}function a6e({open:e,onOpenChange:t,anchor:n,onPick:r}){const[i,a]=M.useState(""),o=M.useMemo(()=>e?Q1e():[],[e]);return M.useEffect(()=>{e||a("")},[e]),x.jsxs(Uf,{open:e,onOpenChange:t,children:[x.jsx(qy,{asChild:!0,children:n}),x.jsx(Fh,{align:"start",side:"bottom",sideOffset:6,className:"w-[340px] p-0","data-testid":"icon-picker-popover",children:x.jsx(o6e,{query:i,onQueryChange:a,recents:o,onPick:r})})]})}function o6e({query:e,onQueryChange:t,recents:n,onPick:r}){const i=M.useMemo(()=>i6e(r6e,e),[e]),a=e.trim()===""&&n.length>0,[o,s]=M.useState(0),c=Math.max(1,Math.ceil(i.length/A0)),l=c*tm,u=Math.ceil(aO/tm)+LJ*2,d=Math.max(0,Math.floor(o/tm)-LJ),f=Math.min(c,d+u),h=d*A0,y=Math.min(i.length,f*A0),v=i.slice(h,y);return x.jsxs("div",{className:"flex w-full flex-col",children:[x.jsx("div",{className:"border-b border-border p-2",children:x.jsx("input",{type:"text",value:e,placeholder:"Search icons…","aria-label":"Search icons","data-testid":"icon-picker-search",className:Ze("flex h-8 w-full rounded-md border border-input bg-background px-3 text-sm","placeholder:text-muted-foreground","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1"),onChange:k=>t(k.target.value)})}),a?x.jsxs("div",{className:"border-b border-border p-2","data-testid":"icon-picker-recents",children:[x.jsx("div",{className:"mb-1 px-1 text-[11px] font-medium uppercase tracking-wide text-muted-foreground",children:"Recent"}),x.jsx("div",{className:"grid gap-1",style:{gridTemplateColumns:`repeat(${A0}, minmax(0, 1fr))`},children:n.map(k=>IJ(k,r,`icon-picker-recent-${k}`))})]}):null,x.jsxs("div",{className:"p-2",children:[x.jsx("div",{className:"mb-1 px-1 text-[11px] font-medium uppercase tracking-wide text-muted-foreground",children:"All icons"}),i.length===0?x.jsx("div",{className:"flex items-center justify-center text-xs text-muted-foreground",style:{height:aO},"data-testid":"icon-picker-empty",children:"No icons match."}):x.jsx("div",{"data-testid":"icon-picker-all",className:"overflow-y-auto",style:{height:aO},onScroll:k=>s(k.currentTarget.scrollTop),children:x.jsx("div",{style:{height:l,position:"relative"},children:x.jsx("div",{style:{position:"absolute",top:d*tm,left:0,right:0},children:x.jsx("div",{className:"grid gap-1",style:{gridTemplateColumns:`repeat(${A0}, minmax(0, 1fr))`},children:v.map(k=>IJ(k,r,`icon-picker-tile-${k}`))})})})})]})]})}function IJ(e,t,n){const r=KT[e];return x.jsx("button",{type:"button",title:e,"aria-label":e,"data-testid":n,"data-icon-name":e,onClick:()=>t(e),className:Ze("inline-flex h-7 w-7 items-center justify-center rounded-md text-muted-foreground transition-colors","hover:bg-accent hover:text-accent-foreground","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1"),children:r?x.jsx(r,{className:"h-4 w-4","aria-hidden":"true"}):null},n)}const AJ="application/x-seeflow-create-html-block",ede=[{shape:"rectangle",label:"Rectangle",commandId:"tool.rectangle",Icon:Ap},{shape:"ellipse",label:"Ellipse",commandId:"tool.ellipse",Icon:cp}],tde=[{shape:"sticky",label:"Sticky note",commandId:"tool.sticky",Icon:_p},{shape:"text",label:"Text",commandId:"tool.text",Icon:ef}],cW=[{shape:"database",label:"Database",commandId:"tool.database",Icon:up},{shape:"server",label:"Server",commandId:"tool.server",Icon:Cp},{shape:"user",label:"User",commandId:"tool.user",Icon:Rp},{shape:"queue",label:"Queue",commandId:"tool.queue",Icon:Tc},{shape:"cloud",label:"Cloud",commandId:"tool.cloud",Icon:lp}],s6e=[...ede,...tde,...cW],_J="Insert icon",EJ="Shape";function c6e({activeShape:e,onSelectShape:t,iconPickerOpen:n,onOpenIconPicker:r,onCloseIconPicker:i,onPickIcon:a}){const[o,s]=M.useState(!1),c=e!==null&&cW.some(u=>u.shape===e),l=({shape:u,commandId:d,Icon:f})=>{const h=e===u,y=bJ(d);return x.jsx("button",{type:"button","data-testid":`toolbar-shape-${u}`,"data-active":h?"true":"false","aria-pressed":h,"aria-label":y,title:y,onClick:()=>t(h?null:u),className:Ze("inline-flex h-8 w-8 items-center justify-center rounded-md text-muted-foreground transition-colors",h?"bg-primary text-primary-foreground hover:bg-primary/90":"hover:bg-accent hover:text-accent-foreground"),children:x.jsx(f,{className:"h-4 w-4"})},u)};return x.jsxs("div",{"data-testid":"canvas-toolbar",className:"pointer-events-auto flex flex-col items-center gap-1 rounded-lg border border-border bg-background/95 p-1 shadow-md backdrop-blur",children:[ede.map(l),x.jsxs(Uf,{open:o,onOpenChange:s,children:[x.jsx(qy,{asChild:!0,children:x.jsx("button",{type:"button","data-testid":"toolbar-shape-picker","aria-label":EJ,"aria-pressed":o||c,title:EJ,className:Ze("inline-flex h-8 w-8 items-center justify-center rounded-md text-muted-foreground transition-colors",o||c?"bg-primary text-primary-foreground hover:bg-primary/90":"hover:bg-accent hover:text-accent-foreground"),children:x.jsx(Lp,{className:"h-4 w-4","aria-hidden":"true"})})}),x.jsx(Fh,{align:"start",side:"right",sideOffset:6,className:"w-auto p-1","data-testid":"shape-picker-popover",onOpenAutoFocus:u=>{u.preventDefault()},children:x.jsx("div",{role:"menu","aria-label":"More shapes",className:"flex flex-col gap-0.5",children:cW.map(({shape:u,label:d,commandId:f,Icon:h})=>{const y=e===u,v=bJ(f);return x.jsxs("button",{type:"button",role:"menuitem","data-testid":`shape-picker-${u}`,"data-active":y?"true":"false","aria-pressed":y,"aria-label":v,title:v,onClick:()=>{t(y?null:u),s(!1)},className:Ze("flex items-center gap-2 rounded-sm px-2 py-1.5 text-left text-sm",y?"bg-primary text-primary-foreground":"hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none"),children:[x.jsx(h,{className:"h-4 w-4 text-muted-foreground","aria-hidden":"true"}),x.jsx("span",{children:d})]},u)})})})]}),a?x.jsx(a6e,{open:n??!1,onOpenChange:u=>{u?r==null||r():i==null||i()},anchor:x.jsx("button",{type:"button","data-testid":"toolbar-insert-icon","aria-label":_J,"aria-pressed":n??!1,title:_J,className:Ze("inline-flex h-8 w-8 items-center justify-center rounded-md text-muted-foreground transition-colors",n?"bg-primary text-primary-foreground hover:bg-primary/90":"hover:bg-accent hover:text-accent-foreground"),children:x.jsx(Q2,{className:"h-4 w-4","aria-hidden":"true"})}),onPick:a}):null,x.jsx("div",{className:"my-1 h-px w-6 bg-border","aria-hidden":"true"}),tde.map(l)]})}const l6e=(e,t={})=>{const n=t.setTimer??((l,u)=>globalThis.setTimeout(l,u)),r=t.clearTimer??(l=>{globalThis.clearTimeout(l)});let i=null,a=null;return{schedule:l=>{i!==null&&r(i),a=l,i=n(()=>{i=null;const u=a;a=null,u&&u()},e)},flush:()=>{i!==null&&(r(i),i=null);const l=a;a=null,l&&l()},cancel:()=>{i!==null&&(r(i),i=null),a=null},get pending(){return i!==null}}};function us({initialValue:e,onCommit:t,onExit:n,multiline:r=!1,commitMode:i="enter-commits",required:a=!1,field:o,className:s,style:c,placeholder:l}){const u=r||i==="blur-only",d=M.useRef(null),[f,h]=M.useState(!1),[y,v]=M.useState(e.length===0),k=M.useRef(l6e(400)),g=M.useRef(e),S=M.useRef(!1);M.useEffect(()=>{const I=d.current;if(!I)return;I.textContent=e,I.focus();const R=window.getSelection();if(R){const q=document.createRange();q.selectNodeContents(I),R.removeAllRanges(),R.addRange(q)}const U=k.current;return()=>{U.cancel()}},[]);const w=()=>{const I=d.current;return I?u?I.innerText:I.textContent??"":""},C=I=>{k.current.cancel(),I!==g.current&&(g.current=I,t(I))},_=()=>{const I=w();if(v(I.length===0),a&&I.trim().length===0){k.current.cancel();return}k.current.schedule(()=>C(I))},A=()=>{k.current.cancel();const I=w();if(a&&I.trim().length===0){const R=d.current;R&&(R.textContent=e),h(!0),setTimeout(()=>h(!1),320),n();return}C(I),n()},j=()=>{k.current.cancel();const I=d.current;I&&(I.textContent=e),n()},O=I=>{if(I.stopPropagation(),I.nativeEvent.stopPropagation(),I.key==="Enter"){if(i==="blur-only"||r&&I.shiftKey){I.preventDefault(),document.execCommand("insertText",!1,`
7784
+ */const H4e=Object.freeze(Object.defineProperty({__proto__:null,AArrowDown:Gm,AArrowDownIcon:Gm,AArrowUp:Km,AArrowUpIcon:Km,ALargeSmall:Zm,ALargeSmallIcon:Zm,Accessibility:Xm,AccessibilityIcon:Xm,Activity:Ym,ActivityIcon:Ym,ActivitySquare:W1,ActivitySquareIcon:W1,AirVent:Jm,AirVentIcon:Jm,Airplay:Qm,AirplayIcon:Qm,AlarmCheck:Dl,AlarmCheckIcon:Dl,AlarmClock:t5,AlarmClockCheck:Dl,AlarmClockCheckIcon:Dl,AlarmClockIcon:t5,AlarmClockMinus:ql,AlarmClockMinusIcon:ql,AlarmClockOff:e5,AlarmClockOffIcon:e5,AlarmClockPlus:zl,AlarmClockPlusIcon:zl,AlarmMinus:ql,AlarmMinusIcon:ql,AlarmPlus:zl,AlarmPlusIcon:zl,AlarmSmoke:n5,AlarmSmokeIcon:n5,Album:r5,AlbumIcon:r5,AlertCircle:du,AlertCircleIcon:du,AlertOctagon:b1,AlertOctagonIcon:b1,AlertTriangle:Kd,AlertTriangleIcon:Kd,AlignCenter:o5,AlignCenterHorizontal:i5,AlignCenterHorizontalIcon:i5,AlignCenterIcon:o5,AlignCenterVertical:a5,AlignCenterVerticalIcon:a5,AlignEndHorizontal:s5,AlignEndHorizontalIcon:s5,AlignEndVertical:c5,AlignEndVerticalIcon:c5,AlignHorizontalDistributeCenter:l5,AlignHorizontalDistributeCenterIcon:l5,AlignHorizontalDistributeEnd:u5,AlignHorizontalDistributeEndIcon:u5,AlignHorizontalDistributeStart:d5,AlignHorizontalDistributeStartIcon:d5,AlignHorizontalJustifyCenter:h5,AlignHorizontalJustifyCenterIcon:h5,AlignHorizontalJustifyEnd:f5,AlignHorizontalJustifyEndIcon:f5,AlignHorizontalJustifyStart:p5,AlignHorizontalJustifyStartIcon:p5,AlignHorizontalSpaceAround:y5,AlignHorizontalSpaceAroundIcon:y5,AlignHorizontalSpaceBetween:g5,AlignHorizontalSpaceBetweenIcon:g5,AlignJustify:m5,AlignJustifyIcon:m5,AlignLeft:v5,AlignLeftIcon:v5,AlignRight:k5,AlignRightIcon:k5,AlignStartHorizontal:x5,AlignStartHorizontalIcon:x5,AlignStartVertical:w5,AlignStartVerticalIcon:w5,AlignVerticalDistributeCenter:b5,AlignVerticalDistributeCenterIcon:b5,AlignVerticalDistributeEnd:M5,AlignVerticalDistributeEndIcon:M5,AlignVerticalDistributeStart:S5,AlignVerticalDistributeStartIcon:S5,AlignVerticalJustifyCenter:C5,AlignVerticalJustifyCenterIcon:C5,AlignVerticalJustifyEnd:L5,AlignVerticalJustifyEndIcon:L5,AlignVerticalJustifyStart:I5,AlignVerticalJustifyStartIcon:I5,AlignVerticalSpaceAround:A5,AlignVerticalSpaceAroundIcon:A5,AlignVerticalSpaceBetween:_5,AlignVerticalSpaceBetweenIcon:_5,Ambulance:E5,AmbulanceIcon:E5,Ampersand:P5,AmpersandIcon:P5,Ampersands:N5,AmpersandsIcon:N5,Amphora:R5,AmphoraIcon:R5,Anchor:j5,AnchorIcon:j5,Angry:T5,AngryIcon:T5,Annoyed:D5,AnnoyedIcon:D5,Antenna:q5,AntennaIcon:q5,Anvil:z5,AnvilIcon:z5,Aperture:O5,ApertureIcon:O5,AppWindow:B5,AppWindowIcon:B5,AppWindowMac:F5,AppWindowMacIcon:F5,Apple:H5,AppleIcon:H5,Archive:$5,ArchiveIcon:$5,ArchiveRestore:V5,ArchiveRestoreIcon:V5,ArchiveX:U5,ArchiveXIcon:U5,AreaChart:Jl,AreaChartIcon:Jl,Armchair:W5,ArmchairIcon:W5,ArrowBigDown:K5,ArrowBigDownDash:G5,ArrowBigDownDashIcon:G5,ArrowBigDownIcon:K5,ArrowBigLeft:X5,ArrowBigLeftDash:Z5,ArrowBigLeftDashIcon:Z5,ArrowBigLeftIcon:X5,ArrowBigRight:J5,ArrowBigRightDash:Y5,ArrowBigRightDashIcon:Y5,ArrowBigRightIcon:J5,ArrowBigUp:ev,ArrowBigUpDash:Q5,ArrowBigUpDashIcon:Q5,ArrowBigUpIcon:ev,ArrowDown:uv,ArrowDown01:tv,ArrowDown01Icon:tv,ArrowDown10:nv,ArrowDown10Icon:nv,ArrowDownAZ:Ol,ArrowDownAZIcon:Ol,ArrowDownAz:Ol,ArrowDownAzIcon:Ol,ArrowDownCircle:hu,ArrowDownCircleIcon:hu,ArrowDownFromLine:rv,ArrowDownFromLineIcon:rv,ArrowDownIcon:uv,ArrowDownLeft:iv,ArrowDownLeftFromCircle:pu,ArrowDownLeftFromCircleIcon:pu,ArrowDownLeftFromSquare:Y1,ArrowDownLeftFromSquareIcon:Y1,ArrowDownLeftIcon:iv,ArrowDownLeftSquare:G1,ArrowDownLeftSquareIcon:G1,ArrowDownNarrowWide:av,ArrowDownNarrowWideIcon:av,ArrowDownRight:ov,ArrowDownRightFromCircle:yu,ArrowDownRightFromCircleIcon:yu,ArrowDownRightFromSquare:J1,ArrowDownRightFromSquareIcon:J1,ArrowDownRightIcon:ov,ArrowDownRightSquare:K1,ArrowDownRightSquareIcon:K1,ArrowDownSquare:Z1,ArrowDownSquareIcon:Z1,ArrowDownToDot:sv,ArrowDownToDotIcon:sv,ArrowDownToLine:cv,ArrowDownToLineIcon:cv,ArrowDownUp:lv,ArrowDownUpIcon:lv,ArrowDownWideNarrow:Fl,ArrowDownWideNarrowIcon:Fl,ArrowDownZA:Bl,ArrowDownZAIcon:Bl,ArrowDownZa:Bl,ArrowDownZaIcon:Bl,ArrowLeft:fv,ArrowLeftCircle:fu,ArrowLeftCircleIcon:fu,ArrowLeftFromLine:dv,ArrowLeftFromLineIcon:dv,ArrowLeftIcon:fv,ArrowLeftRight:op,ArrowLeftRightIcon:op,ArrowLeftSquare:X1,ArrowLeftSquareIcon:X1,ArrowLeftToLine:hv,ArrowLeftToLineIcon:hv,ArrowRight:X2,ArrowRightCircle:vu,ArrowRightCircleIcon:vu,ArrowRightFromLine:pv,ArrowRightFromLineIcon:pv,ArrowRightIcon:X2,ArrowRightLeft:yv,ArrowRightLeftIcon:yv,ArrowRightSquare:td,ArrowRightSquareIcon:td,ArrowRightToLine:gv,ArrowRightToLineIcon:gv,ArrowUp:Lv,ArrowUp01:mv,ArrowUp01Icon:mv,ArrowUp10:vv,ArrowUp10Icon:vv,ArrowUpAZ:Hl,ArrowUpAZIcon:Hl,ArrowUpAz:Hl,ArrowUpAzIcon:Hl,ArrowUpCircle:ku,ArrowUpCircleIcon:ku,ArrowUpDown:kv,ArrowUpDownIcon:kv,ArrowUpFromDot:xv,ArrowUpFromDotIcon:xv,ArrowUpFromLine:wv,ArrowUpFromLineIcon:wv,ArrowUpIcon:Lv,ArrowUpLeft:bv,ArrowUpLeftFromCircle:gu,ArrowUpLeftFromCircleIcon:gu,ArrowUpLeftFromSquare:Q1,ArrowUpLeftFromSquareIcon:Q1,ArrowUpLeftIcon:bv,ArrowUpLeftSquare:nd,ArrowUpLeftSquareIcon:nd,ArrowUpNarrowWide:Vl,ArrowUpNarrowWideIcon:Vl,ArrowUpRight:Mv,ArrowUpRightFromCircle:mu,ArrowUpRightFromCircleIcon:mu,ArrowUpRightFromSquare:ed,ArrowUpRightFromSquareIcon:ed,ArrowUpRightIcon:Mv,ArrowUpRightSquare:rd,ArrowUpRightSquareIcon:rd,ArrowUpSquare:id,ArrowUpSquareIcon:id,ArrowUpToLine:Sv,ArrowUpToLineIcon:Sv,ArrowUpWideNarrow:Cv,ArrowUpWideNarrowIcon:Cv,ArrowUpZA:Ul,ArrowUpZAIcon:Ul,ArrowUpZa:Ul,ArrowUpZaIcon:Ul,ArrowsUpFromLine:Iv,ArrowsUpFromLineIcon:Iv,Asterisk:Av,AsteriskIcon:Av,AsteriskSquare:ad,AsteriskSquareIcon:ad,AtSign:_v,AtSignIcon:_v,Atom:Ev,AtomIcon:Ev,AudioLines:Pv,AudioLinesIcon:Pv,AudioWaveform:Nv,AudioWaveformIcon:Nv,Award:Rv,AwardIcon:Rv,Axe:jv,AxeIcon:jv,Axis3D:$l,Axis3DIcon:$l,Axis3d:$l,Axis3dIcon:$l,Baby:Tv,BabyIcon:Tv,Backpack:Dv,BackpackIcon:Dv,Badge:Jv,BadgeAlert:qv,BadgeAlertIcon:qv,BadgeCent:zv,BadgeCentIcon:zv,BadgeCheck:Wl,BadgeCheckIcon:Wl,BadgeDollarSign:Ov,BadgeDollarSignIcon:Ov,BadgeEuro:Fv,BadgeEuroIcon:Fv,BadgeHelp:Bv,BadgeHelpIcon:Bv,BadgeIcon:Jv,BadgeIndianRupee:Hv,BadgeIndianRupeeIcon:Hv,BadgeInfo:Vv,BadgeInfoIcon:Vv,BadgeJapaneseYen:Uv,BadgeJapaneseYenIcon:Uv,BadgeMinus:$v,BadgeMinusIcon:$v,BadgePercent:Wv,BadgePercentIcon:Wv,BadgePlus:Gv,BadgePlusIcon:Gv,BadgePoundSterling:Kv,BadgePoundSterlingIcon:Kv,BadgeRussianRuble:Zv,BadgeRussianRubleIcon:Zv,BadgeSwissFranc:Xv,BadgeSwissFrancIcon:Xv,BadgeX:Yv,BadgeXIcon:Yv,BaggageClaim:Qv,BaggageClaimIcon:Qv,Ban:ek,BanIcon:ek,Banana:tk,BananaIcon:tk,Bandage:nk,BandageIcon:nk,Banknote:rk,BanknoteIcon:rk,BarChart:ou,BarChart2:su,BarChart2Icon:su,BarChart3:iu,BarChart3Icon:iu,BarChart4:ru,BarChart4Icon:ru,BarChartBig:nu,BarChartBigIcon:nu,BarChartHorizontal:eu,BarChartHorizontalBig:Ql,BarChartHorizontalBigIcon:Ql,BarChartHorizontalIcon:eu,BarChartIcon:ou,Barcode:ik,BarcodeIcon:ik,Baseline:ak,BaselineIcon:ak,Bath:ok,BathIcon:ok,Battery:hk,BatteryCharging:sk,BatteryChargingIcon:sk,BatteryFull:ck,BatteryFullIcon:ck,BatteryIcon:hk,BatteryLow:lk,BatteryLowIcon:lk,BatteryMedium:uk,BatteryMediumIcon:uk,BatteryWarning:dk,BatteryWarningIcon:dk,Beaker:fk,BeakerIcon:fk,Bean:yk,BeanIcon:yk,BeanOff:pk,BeanOffIcon:pk,Bed:vk,BedDouble:gk,BedDoubleIcon:gk,BedIcon:vk,BedSingle:mk,BedSingleIcon:mk,Beef:kk,BeefIcon:kk,Beer:wk,BeerIcon:wk,BeerOff:xk,BeerOffIcon:xk,Bell:Ak,BellDot:bk,BellDotIcon:bk,BellElectric:Mk,BellElectricIcon:Mk,BellIcon:Ak,BellMinus:Sk,BellMinusIcon:Sk,BellOff:Ck,BellOffIcon:Ck,BellPlus:Lk,BellPlusIcon:Lk,BellRing:Ik,BellRingIcon:Ik,BetweenHorizonalEnd:Gl,BetweenHorizonalEndIcon:Gl,BetweenHorizonalStart:Kl,BetweenHorizonalStartIcon:Kl,BetweenHorizontalEnd:Gl,BetweenHorizontalEndIcon:Gl,BetweenHorizontalStart:Kl,BetweenHorizontalStartIcon:Kl,BetweenVerticalEnd:_k,BetweenVerticalEndIcon:_k,BetweenVerticalStart:Ek,BetweenVerticalStartIcon:Ek,BicepsFlexed:Pk,BicepsFlexedIcon:Pk,Bike:Nk,BikeIcon:Nk,Binary:Rk,BinaryIcon:Rk,Binoculars:jk,BinocularsIcon:jk,Biohazard:Tk,BiohazardIcon:Tk,Bird:Dk,BirdIcon:Dk,Bitcoin:qk,BitcoinIcon:qk,Blend:zk,BlendIcon:zk,Blinds:Ok,BlindsIcon:Ok,Blocks:Fk,BlocksIcon:Fk,Bluetooth:Uk,BluetoothConnected:Bk,BluetoothConnectedIcon:Bk,BluetoothIcon:Uk,BluetoothOff:Hk,BluetoothOffIcon:Hk,BluetoothSearching:Vk,BluetoothSearchingIcon:Vk,Bold:$k,BoldIcon:$k,Bolt:Wk,BoltIcon:Wk,Bomb:Gk,BombIcon:Gk,Bone:Kk,BoneIcon:Kk,Book:m4,BookA:Zk,BookAIcon:Zk,BookAudio:Xk,BookAudioIcon:Xk,BookCheck:Yk,BookCheckIcon:Yk,BookCopy:Jk,BookCopyIcon:Jk,BookDashed:Zl,BookDashedIcon:Zl,BookDown:Qk,BookDownIcon:Qk,BookHeadphones:e4,BookHeadphonesIcon:e4,BookHeart:t4,BookHeartIcon:t4,BookIcon:m4,BookImage:n4,BookImageIcon:n4,BookKey:r4,BookKeyIcon:r4,BookLock:i4,BookLockIcon:i4,BookMarked:a4,BookMarkedIcon:a4,BookMinus:o4,BookMinusIcon:o4,BookOpen:l4,BookOpenCheck:s4,BookOpenCheckIcon:s4,BookOpenIcon:l4,BookOpenText:c4,BookOpenTextIcon:c4,BookPlus:u4,BookPlusIcon:u4,BookTemplate:Zl,BookTemplateIcon:Zl,BookText:d4,BookTextIcon:d4,BookType:h4,BookTypeIcon:h4,BookUp:p4,BookUp2:f4,BookUp2Icon:f4,BookUpIcon:p4,BookUser:y4,BookUserIcon:y4,BookX:g4,BookXIcon:g4,Bookmark:b4,BookmarkCheck:v4,BookmarkCheckIcon:v4,BookmarkIcon:b4,BookmarkMinus:k4,BookmarkMinusIcon:k4,BookmarkPlus:x4,BookmarkPlusIcon:x4,BookmarkX:w4,BookmarkXIcon:w4,BoomBox:M4,BoomBoxIcon:M4,Bot:L4,BotIcon:L4,BotMessageSquare:S4,BotMessageSquareIcon:S4,BotOff:C4,BotOffIcon:C4,Box:I4,BoxIcon:I4,BoxSelect:gd,BoxSelectIcon:gd,Boxes:A4,BoxesIcon:A4,Braces:Xl,BracesIcon:Xl,Brackets:_4,BracketsIcon:_4,Brain:N4,BrainCircuit:E4,BrainCircuitIcon:E4,BrainCog:P4,BrainCogIcon:P4,BrainIcon:N4,BrickWall:R4,BrickWallIcon:R4,Briefcase:q4,BriefcaseBusiness:j4,BriefcaseBusinessIcon:j4,BriefcaseConveyorBelt:T4,BriefcaseConveyorBeltIcon:T4,BriefcaseIcon:q4,BriefcaseMedical:D4,BriefcaseMedicalIcon:D4,BringToFront:z4,BringToFrontIcon:z4,Brush:O4,BrushIcon:O4,Bug:H4,BugIcon:H4,BugOff:F4,BugOffIcon:F4,BugPlay:B4,BugPlayIcon:B4,Building:U4,Building2:V4,Building2Icon:V4,BuildingIcon:U4,Bus:W4,BusFront:$4,BusFrontIcon:$4,BusIcon:W4,Cable:K4,CableCar:G4,CableCarIcon:G4,CableIcon:K4,Cake:X4,CakeIcon:X4,CakeSlice:Z4,CakeSliceIcon:Z4,Calculator:Y4,CalculatorIcon:Y4,Calendar:m3,Calendar1:J4,Calendar1Icon:J4,CalendarArrowDown:Q4,CalendarArrowDownIcon:Q4,CalendarArrowUp:e3,CalendarArrowUpIcon:e3,CalendarCheck:n3,CalendarCheck2:t3,CalendarCheck2Icon:t3,CalendarCheckIcon:n3,CalendarClock:r3,CalendarClockIcon:r3,CalendarCog:i3,CalendarCogIcon:i3,CalendarDays:a3,CalendarDaysIcon:a3,CalendarFold:o3,CalendarFoldIcon:o3,CalendarHeart:s3,CalendarHeartIcon:s3,CalendarIcon:m3,CalendarMinus:l3,CalendarMinus2:c3,CalendarMinus2Icon:c3,CalendarMinusIcon:l3,CalendarOff:u3,CalendarOffIcon:u3,CalendarPlus:h3,CalendarPlus2:d3,CalendarPlus2Icon:d3,CalendarPlusIcon:h3,CalendarRange:f3,CalendarRangeIcon:f3,CalendarSearch:p3,CalendarSearchIcon:p3,CalendarX:g3,CalendarX2:y3,CalendarX2Icon:y3,CalendarXIcon:g3,Camera:k3,CameraIcon:k3,CameraOff:v3,CameraOffIcon:v3,CandlestickChart:tu,CandlestickChartIcon:tu,Candy:b3,CandyCane:x3,CandyCaneIcon:x3,CandyIcon:b3,CandyOff:w3,CandyOffIcon:w3,Cannabis:M3,CannabisIcon:M3,Captions:Yl,CaptionsIcon:Yl,CaptionsOff:S3,CaptionsOffIcon:S3,Car:I3,CarFront:C3,CarFrontIcon:C3,CarIcon:I3,CarTaxiFront:L3,CarTaxiFrontIcon:L3,Caravan:A3,CaravanIcon:A3,Carrot:_3,CarrotIcon:_3,CaseLower:E3,CaseLowerIcon:E3,CaseSensitive:P3,CaseSensitiveIcon:P3,CaseUpper:N3,CaseUpperIcon:N3,CassetteTape:R3,CassetteTapeIcon:R3,Cast:j3,CastIcon:j3,Castle:T3,CastleIcon:T3,Cat:D3,CatIcon:D3,Cctv:q3,CctvIcon:q3,ChartArea:Jl,ChartAreaIcon:Jl,ChartBar:eu,ChartBarBig:Ql,ChartBarBigIcon:Ql,ChartBarDecreasing:z3,ChartBarDecreasingIcon:z3,ChartBarIcon:eu,ChartBarIncreasing:O3,ChartBarIncreasingIcon:O3,ChartBarStacked:F3,ChartBarStackedIcon:F3,ChartCandlestick:tu,ChartCandlestickIcon:tu,ChartColumn:iu,ChartColumnBig:nu,ChartColumnBigIcon:nu,ChartColumnDecreasing:B3,ChartColumnDecreasingIcon:B3,ChartColumnIcon:iu,ChartColumnIncreasing:ru,ChartColumnIncreasingIcon:ru,ChartColumnStacked:H3,ChartColumnStackedIcon:H3,ChartGantt:V3,ChartGanttIcon:V3,ChartLine:au,ChartLineIcon:au,ChartNetwork:U3,ChartNetworkIcon:U3,ChartNoAxesColumn:su,ChartNoAxesColumnDecreasing:$3,ChartNoAxesColumnDecreasingIcon:$3,ChartNoAxesColumnIcon:su,ChartNoAxesColumnIncreasing:ou,ChartNoAxesColumnIncreasingIcon:ou,ChartNoAxesCombined:W3,ChartNoAxesCombinedIcon:W3,ChartNoAxesGantt:cu,ChartNoAxesGanttIcon:cu,ChartPie:lu,ChartPieIcon:lu,ChartScatter:uu,ChartScatterIcon:uu,ChartSpline:G3,ChartSplineIcon:G3,Check:Jc,CheckCheck:K3,CheckCheckIcon:K3,CheckCircle:xu,CheckCircle2:wu,CheckCircle2Icon:wu,CheckCircleIcon:xu,CheckIcon:Jc,CheckSquare:sd,CheckSquare2:cd,CheckSquare2Icon:cd,CheckSquareIcon:sd,ChefHat:Z3,ChefHatIcon:Z3,Cherry:X3,CherryIcon:X3,ChevronDown:Y3,ChevronDownCircle:bu,ChevronDownCircleIcon:bu,ChevronDownIcon:Y3,ChevronDownSquare:ld,ChevronDownSquareIcon:ld,ChevronFirst:J3,ChevronFirstIcon:J3,ChevronLast:Q3,ChevronLastIcon:Q3,ChevronLeft:ex,ChevronLeftCircle:Mu,ChevronLeftCircleIcon:Mu,ChevronLeftIcon:ex,ChevronLeftSquare:ud,ChevronLeftSquareIcon:ud,ChevronRight:tx,ChevronRightCircle:Su,ChevronRightCircleIcon:Su,ChevronRightIcon:tx,ChevronRightSquare:dd,ChevronRightSquareIcon:dd,ChevronUp:nx,ChevronUpCircle:Cu,ChevronUpCircleIcon:Cu,ChevronUpIcon:nx,ChevronUpSquare:hd,ChevronUpSquareIcon:hd,ChevronsDown:ix,ChevronsDownIcon:ix,ChevronsDownUp:rx,ChevronsDownUpIcon:rx,ChevronsLeft:sx,ChevronsLeftIcon:sx,ChevronsLeftRight:ox,ChevronsLeftRightEllipsis:ax,ChevronsLeftRightEllipsisIcon:ax,ChevronsLeftRightIcon:ox,ChevronsRight:lx,ChevronsRightIcon:lx,ChevronsRightLeft:cx,ChevronsRightLeftIcon:cx,ChevronsUp:ux,ChevronsUpDown:sp,ChevronsUpDownIcon:sp,ChevronsUpIcon:ux,Chrome:dx,ChromeIcon:dx,Church:hx,ChurchIcon:hx,Cigarette:px,CigaretteIcon:px,CigaretteOff:fx,CigaretteOffIcon:fx,Circle:cp,CircleAlert:du,CircleAlertIcon:du,CircleArrowDown:hu,CircleArrowDownIcon:hu,CircleArrowLeft:fu,CircleArrowLeftIcon:fu,CircleArrowOutDownLeft:pu,CircleArrowOutDownLeftIcon:pu,CircleArrowOutDownRight:yu,CircleArrowOutDownRightIcon:yu,CircleArrowOutUpLeft:gu,CircleArrowOutUpLeftIcon:gu,CircleArrowOutUpRight:mu,CircleArrowOutUpRightIcon:mu,CircleArrowRight:vu,CircleArrowRightIcon:vu,CircleArrowUp:ku,CircleArrowUpIcon:ku,CircleCheck:wu,CircleCheckBig:xu,CircleCheckBigIcon:xu,CircleCheckIcon:wu,CircleChevronDown:bu,CircleChevronDownIcon:bu,CircleChevronLeft:Mu,CircleChevronLeftIcon:Mu,CircleChevronRight:Su,CircleChevronRightIcon:Su,CircleChevronUp:Cu,CircleChevronUpIcon:Cu,CircleDashed:yx,CircleDashedIcon:yx,CircleDivide:Lu,CircleDivideIcon:Lu,CircleDollarSign:gx,CircleDollarSignIcon:gx,CircleDot:vx,CircleDotDashed:mx,CircleDotDashedIcon:mx,CircleDotIcon:vx,CircleEllipsis:kx,CircleEllipsisIcon:kx,CircleEqual:xx,CircleEqualIcon:xx,CircleFadingArrowUp:wx,CircleFadingArrowUpIcon:wx,CircleFadingPlus:bx,CircleFadingPlusIcon:bx,CircleGauge:Iu,CircleGaugeIcon:Iu,CircleHelp:Au,CircleHelpIcon:Au,CircleIcon:cp,CircleMinus:_u,CircleMinusIcon:_u,CircleOff:Mx,CircleOffIcon:Mx,CircleParking:Pu,CircleParkingIcon:Pu,CircleParkingOff:Eu,CircleParkingOffIcon:Eu,CirclePause:Nu,CirclePauseIcon:Nu,CirclePercent:Ru,CirclePercentIcon:Ru,CirclePlay:ju,CirclePlayIcon:ju,CirclePlus:Tu,CirclePlusIcon:Tu,CirclePower:Du,CirclePowerIcon:Du,CircleSlash:Sx,CircleSlash2:qu,CircleSlash2Icon:qu,CircleSlashIcon:Sx,CircleSlashed:qu,CircleSlashedIcon:qu,CircleStop:zu,CircleStopIcon:zu,CircleUser:Fu,CircleUserIcon:Fu,CircleUserRound:Ou,CircleUserRoundIcon:Ou,CircleX:Bu,CircleXIcon:Bu,CircuitBoard:Cx,CircuitBoardIcon:Cx,Citrus:Lx,CitrusIcon:Lx,Clapperboard:Ix,ClapperboardIcon:Ix,Clipboard:Dx,ClipboardCheck:Ax,ClipboardCheckIcon:Ax,ClipboardCopy:_x,ClipboardCopyIcon:_x,ClipboardEdit:Vu,ClipboardEditIcon:Vu,ClipboardIcon:Dx,ClipboardList:Ex,ClipboardListIcon:Ex,ClipboardMinus:Px,ClipboardMinusIcon:Px,ClipboardPaste:Nx,ClipboardPasteIcon:Nx,ClipboardPen:Vu,ClipboardPenIcon:Vu,ClipboardPenLine:Hu,ClipboardPenLineIcon:Hu,ClipboardPlus:Rx,ClipboardPlusIcon:Rx,ClipboardSignature:Hu,ClipboardSignatureIcon:Hu,ClipboardType:jx,ClipboardTypeIcon:jx,ClipboardX:Tx,ClipboardXIcon:Tx,Clock:Jx,Clock1:qx,Clock10:zx,Clock10Icon:zx,Clock11:Ox,Clock11Icon:Ox,Clock12:Fx,Clock12Icon:Fx,Clock1Icon:qx,Clock2:Bx,Clock2Icon:Bx,Clock3:Hx,Clock3Icon:Hx,Clock4:Vx,Clock4Icon:Vx,Clock5:Ux,Clock5Icon:Ux,Clock6:$x,Clock6Icon:$x,Clock7:Wx,Clock7Icon:Wx,Clock8:Gx,Clock8Icon:Gx,Clock9:Kx,Clock9Icon:Kx,ClockAlert:Zx,ClockAlertIcon:Zx,ClockArrowDown:Xx,ClockArrowDownIcon:Xx,ClockArrowUp:Yx,ClockArrowUpIcon:Yx,ClockIcon:Jx,Cloud:lp,CloudCog:Qx,CloudCogIcon:Qx,CloudDownload:Uu,CloudDownloadIcon:Uu,CloudDrizzle:ew,CloudDrizzleIcon:ew,CloudFog:tw,CloudFogIcon:tw,CloudHail:nw,CloudHailIcon:nw,CloudIcon:lp,CloudLightning:rw,CloudLightningIcon:rw,CloudMoon:aw,CloudMoonIcon:aw,CloudMoonRain:iw,CloudMoonRainIcon:iw,CloudOff:ow,CloudOffIcon:ow,CloudRain:cw,CloudRainIcon:cw,CloudRainWind:sw,CloudRainWindIcon:sw,CloudSnow:lw,CloudSnowIcon:lw,CloudSun:dw,CloudSunIcon:dw,CloudSunRain:uw,CloudSunRainIcon:uw,CloudUpload:$u,CloudUploadIcon:$u,Cloudy:hw,CloudyIcon:hw,Clover:fw,CloverIcon:fw,Club:pw,ClubIcon:pw,Code:yw,Code2:Wu,Code2Icon:Wu,CodeIcon:yw,CodeSquare:fd,CodeSquareIcon:fd,CodeXml:Wu,CodeXmlIcon:Wu,Codepen:gw,CodepenIcon:gw,Codesandbox:mw,CodesandboxIcon:mw,Coffee:vw,CoffeeIcon:vw,Cog:kw,CogIcon:kw,Coins:xw,CoinsIcon:xw,Columns:Gu,Columns2:Gu,Columns2Icon:Gu,Columns3:Tc,Columns3Icon:Tc,Columns4:ww,Columns4Icon:ww,ColumnsIcon:Gu,Combine:bw,CombineIcon:bw,Command:Mw,CommandIcon:Mw,Compass:Sw,CompassIcon:Sw,Component:Cw,ComponentIcon:Cw,Computer:Lw,ComputerIcon:Lw,ConciergeBell:Iw,ConciergeBellIcon:Iw,Cone:Aw,ConeIcon:Aw,Construction:_w,ConstructionIcon:_w,Contact:Ew,Contact2:Ku,Contact2Icon:Ku,ContactIcon:Ew,ContactRound:Ku,ContactRoundIcon:Ku,Container:Pw,ContainerIcon:Pw,Contrast:Nw,ContrastIcon:Nw,Cookie:Rw,CookieIcon:Rw,CookingPot:jw,CookingPotIcon:jw,Copy:Y2,CopyCheck:Tw,CopyCheckIcon:Tw,CopyIcon:Y2,CopyMinus:Dw,CopyMinusIcon:Dw,CopyPlus:qw,CopyPlusIcon:qw,CopySlash:zw,CopySlashIcon:zw,CopyX:Ow,CopyXIcon:Ow,Copyleft:Fw,CopyleftIcon:Fw,Copyright:Bw,CopyrightIcon:Bw,CornerDownLeft:Hw,CornerDownLeftIcon:Hw,CornerDownRight:Vw,CornerDownRightIcon:Vw,CornerLeftDown:Uw,CornerLeftDownIcon:Uw,CornerLeftUp:$w,CornerLeftUpIcon:$w,CornerRightDown:Ww,CornerRightDownIcon:Ww,CornerRightUp:Gw,CornerRightUpIcon:Gw,CornerUpLeft:Kw,CornerUpLeftIcon:Kw,CornerUpRight:Zw,CornerUpRightIcon:Zw,Cpu:Xw,CpuIcon:Xw,CreativeCommons:Yw,CreativeCommonsIcon:Yw,CreditCard:Jw,CreditCardIcon:Jw,Croissant:Qw,CroissantIcon:Qw,Crop:e6,CropIcon:e6,Cross:t6,CrossIcon:t6,Crosshair:n6,CrosshairIcon:n6,Crown:r6,CrownIcon:r6,Cuboid:i6,CuboidIcon:i6,CupSoda:a6,CupSodaIcon:a6,CurlyBraces:Xl,CurlyBracesIcon:Xl,Currency:o6,CurrencyIcon:o6,Cylinder:s6,CylinderIcon:s6,Dam:c6,DamIcon:c6,Database:up,DatabaseBackup:l6,DatabaseBackupIcon:l6,DatabaseIcon:up,DatabaseZap:u6,DatabaseZapIcon:u6,Delete:d6,DeleteIcon:d6,Dessert:h6,DessertIcon:h6,Diameter:f6,DiameterIcon:f6,Diamond:g6,DiamondIcon:g6,DiamondMinus:p6,DiamondMinusIcon:p6,DiamondPercent:Zu,DiamondPercentIcon:Zu,DiamondPlus:y6,DiamondPlusIcon:y6,Dice1:m6,Dice1Icon:m6,Dice2:v6,Dice2Icon:v6,Dice3:k6,Dice3Icon:k6,Dice4:x6,Dice4Icon:x6,Dice5:w6,Dice5Icon:w6,Dice6:b6,Dice6Icon:b6,Dices:M6,DicesIcon:M6,Diff:S6,DiffIcon:S6,Disc:A6,Disc2:C6,Disc2Icon:C6,Disc3:L6,Disc3Icon:L6,DiscAlbum:I6,DiscAlbumIcon:I6,DiscIcon:A6,Divide:_6,DivideCircle:Lu,DivideCircleIcon:Lu,DivideIcon:_6,DivideSquare:md,DivideSquareIcon:md,Dna:P6,DnaIcon:P6,DnaOff:E6,DnaOffIcon:E6,Dock:N6,DockIcon:N6,Dog:R6,DogIcon:R6,DollarSign:j6,DollarSignIcon:j6,Donut:T6,DonutIcon:T6,DoorClosed:D6,DoorClosedIcon:D6,DoorOpen:q6,DoorOpenIcon:q6,Dot:z6,DotIcon:z6,DotSquare:vd,DotSquareIcon:vd,Download:O6,DownloadCloud:Uu,DownloadCloudIcon:Uu,DownloadIcon:O6,DraftingCompass:F6,DraftingCompassIcon:F6,Drama:B6,DramaIcon:B6,Dribbble:H6,DribbbleIcon:H6,Drill:V6,DrillIcon:V6,Droplet:U6,DropletIcon:U6,Droplets:$6,DropletsIcon:$6,Drum:W6,DrumIcon:W6,Drumstick:G6,DrumstickIcon:G6,Dumbbell:K6,DumbbellIcon:K6,Ear:X6,EarIcon:X6,EarOff:Z6,EarOffIcon:Z6,Earth:Xu,EarthIcon:Xu,EarthLock:Y6,EarthLockIcon:Y6,Eclipse:J6,EclipseIcon:J6,Edit:Ea,Edit2:T1,Edit2Icon:T1,Edit3:j1,Edit3Icon:j1,EditIcon:Ea,Egg:t8,EggFried:Q6,EggFriedIcon:Q6,EggIcon:t8,EggOff:e8,EggOffIcon:e8,Ellipsis:Ju,EllipsisIcon:Ju,EllipsisVertical:Yu,EllipsisVerticalIcon:Yu,Equal:r8,EqualIcon:r8,EqualNot:n8,EqualNotIcon:n8,EqualSquare:kd,EqualSquareIcon:kd,Eraser:i8,EraserIcon:i8,EthernetPort:a8,EthernetPortIcon:a8,Euro:o8,EuroIcon:o8,Expand:s8,ExpandIcon:s8,ExternalLink:dp,ExternalLinkIcon:dp,Eye:u8,EyeClosed:c8,EyeClosedIcon:c8,EyeIcon:u8,EyeOff:l8,EyeOffIcon:l8,Facebook:d8,FacebookIcon:d8,Factory:h8,FactoryIcon:h8,Fan:f8,FanIcon:f8,FastForward:p8,FastForwardIcon:p8,Feather:y8,FeatherIcon:y8,Fence:g8,FenceIcon:g8,FerrisWheel:m8,FerrisWheelIcon:m8,Figma:v8,FigmaIcon:v8,File:pb,FileArchive:k8,FileArchiveIcon:k8,FileAudio:w8,FileAudio2:x8,FileAudio2Icon:x8,FileAudioIcon:w8,FileAxis3D:Qu,FileAxis3DIcon:Qu,FileAxis3d:Qu,FileAxis3dIcon:Qu,FileBadge:M8,FileBadge2:b8,FileBadge2Icon:b8,FileBadgeIcon:M8,FileBarChart:e1,FileBarChart2:t1,FileBarChart2Icon:t1,FileBarChartIcon:e1,FileBox:S8,FileBoxIcon:S8,FileChartColumn:t1,FileChartColumnIcon:t1,FileChartColumnIncreasing:e1,FileChartColumnIncreasingIcon:e1,FileChartLine:n1,FileChartLineIcon:n1,FileChartPie:r1,FileChartPieIcon:r1,FileCheck:L8,FileCheck2:C8,FileCheck2Icon:C8,FileCheckIcon:L8,FileClock:I8,FileClockIcon:I8,FileCode:_8,FileCode2:A8,FileCode2Icon:A8,FileCodeIcon:_8,FileCog:i1,FileCog2:i1,FileCog2Icon:i1,FileCogIcon:i1,FileDiff:E8,FileDiffIcon:E8,FileDigit:P8,FileDigitIcon:P8,FileDown:hp,FileDownIcon:hp,FileEdit:o1,FileEditIcon:o1,FileHeart:N8,FileHeartIcon:N8,FileIcon:pb,FileImage:R8,FileImageIcon:R8,FileInput:j8,FileInputIcon:j8,FileJson:D8,FileJson2:T8,FileJson2Icon:T8,FileJsonIcon:D8,FileKey:z8,FileKey2:q8,FileKey2Icon:q8,FileKeyIcon:z8,FileLineChart:n1,FileLineChartIcon:n1,FileLock:F8,FileLock2:O8,FileLock2Icon:O8,FileLockIcon:F8,FileMinus:H8,FileMinus2:B8,FileMinus2Icon:B8,FileMinusIcon:H8,FileMusic:V8,FileMusicIcon:V8,FileOutput:U8,FileOutputIcon:U8,FilePen:o1,FilePenIcon:o1,FilePenLine:a1,FilePenLineIcon:a1,FilePieChart:r1,FilePieChartIcon:r1,FilePlus:W8,FilePlus2:$8,FilePlus2Icon:$8,FilePlusIcon:W8,FileQuestion:G8,FileQuestionIcon:G8,FileScan:K8,FileScanIcon:K8,FileSearch:X8,FileSearch2:Z8,FileSearch2Icon:Z8,FileSearchIcon:X8,FileSignature:a1,FileSignatureIcon:a1,FileSliders:Y8,FileSlidersIcon:Y8,FileSpreadsheet:J8,FileSpreadsheetIcon:J8,FileStack:Q8,FileStackIcon:Q8,FileSymlink:eb,FileSymlinkIcon:eb,FileTerminal:tb,FileTerminalIcon:tb,FileText:nb,FileTextIcon:nb,FileType:ib,FileType2:rb,FileType2Icon:rb,FileTypeIcon:ib,FileUp:ab,FileUpIcon:ab,FileUser:ob,FileUserIcon:ob,FileVideo:cb,FileVideo2:sb,FileVideo2Icon:sb,FileVideoIcon:cb,FileVolume:ub,FileVolume2:lb,FileVolume2Icon:lb,FileVolumeIcon:ub,FileWarning:db,FileWarningIcon:db,FileX:fb,FileX2:hb,FileX2Icon:hb,FileXIcon:fb,Files:yb,FilesIcon:yb,Film:gb,FilmIcon:gb,Filter:vb,FilterIcon:vb,FilterX:mb,FilterXIcon:mb,Fingerprint:kb,FingerprintIcon:kb,FireExtinguisher:xb,FireExtinguisherIcon:xb,Fish:Mb,FishIcon:Mb,FishOff:wb,FishOffIcon:wb,FishSymbol:bb,FishSymbolIcon:bb,Flag:Ib,FlagIcon:Ib,FlagOff:Sb,FlagOffIcon:Sb,FlagTriangleLeft:Cb,FlagTriangleLeftIcon:Cb,FlagTriangleRight:Lb,FlagTriangleRightIcon:Lb,Flame:_b,FlameIcon:_b,FlameKindling:Ab,FlameKindlingIcon:Ab,Flashlight:Pb,FlashlightIcon:Pb,FlashlightOff:Eb,FlashlightOffIcon:Eb,FlaskConical:Rb,FlaskConicalIcon:Rb,FlaskConicalOff:Nb,FlaskConicalOffIcon:Nb,FlaskRound:jb,FlaskRoundIcon:jb,FlipHorizontal:Db,FlipHorizontal2:Tb,FlipHorizontal2Icon:Tb,FlipHorizontalIcon:Db,FlipVertical:zb,FlipVertical2:qb,FlipVertical2Icon:qb,FlipVerticalIcon:zb,Flower:Fb,Flower2:Ob,Flower2Icon:Ob,FlowerIcon:Fb,Focus:Bb,FocusIcon:Bb,FoldHorizontal:Hb,FoldHorizontalIcon:Hb,FoldVertical:Vb,FoldVerticalIcon:Vb,Folder:g7,FolderArchive:Ub,FolderArchiveIcon:Ub,FolderCheck:$b,FolderCheckIcon:$b,FolderClock:Wb,FolderClockIcon:Wb,FolderClosed:Gb,FolderClosedIcon:Gb,FolderCode:Kb,FolderCodeIcon:Kb,FolderCog:s1,FolderCog2:s1,FolderCog2Icon:s1,FolderCogIcon:s1,FolderDot:Zb,FolderDotIcon:Zb,FolderDown:Xb,FolderDownIcon:Xb,FolderEdit:c1,FolderEditIcon:c1,FolderGit:Jb,FolderGit2:Yb,FolderGit2Icon:Yb,FolderGitIcon:Jb,FolderHeart:Qb,FolderHeartIcon:Qb,FolderIcon:g7,FolderInput:e7,FolderInputIcon:e7,FolderKanban:t7,FolderKanbanIcon:t7,FolderKey:n7,FolderKeyIcon:n7,FolderLock:r7,FolderLockIcon:r7,FolderMinus:i7,FolderMinusIcon:i7,FolderOpen:fp,FolderOpenDot:a7,FolderOpenDotIcon:a7,FolderOpenIcon:fp,FolderOutput:o7,FolderOutputIcon:o7,FolderPen:c1,FolderPenIcon:c1,FolderPlus:s7,FolderPlusIcon:s7,FolderRoot:c7,FolderRootIcon:c7,FolderSearch:u7,FolderSearch2:l7,FolderSearch2Icon:l7,FolderSearchIcon:u7,FolderSymlink:d7,FolderSymlinkIcon:d7,FolderSync:h7,FolderSyncIcon:h7,FolderTree:f7,FolderTreeIcon:f7,FolderUp:p7,FolderUpIcon:p7,FolderX:y7,FolderXIcon:y7,Folders:m7,FoldersIcon:m7,Footprints:v7,FootprintsIcon:v7,ForkKnife:ah,ForkKnifeCrossed:ih,ForkKnifeCrossedIcon:ih,ForkKnifeIcon:ah,Forklift:k7,ForkliftIcon:k7,FormInput:q1,FormInputIcon:q1,Forward:x7,ForwardIcon:x7,Frame:w7,FrameIcon:w7,Framer:b7,FramerIcon:b7,Frown:M7,FrownIcon:M7,Fuel:S7,FuelIcon:S7,Fullscreen:C7,FullscreenIcon:C7,FunctionSquare:xd,FunctionSquareIcon:xd,GalleryHorizontal:I7,GalleryHorizontalEnd:L7,GalleryHorizontalEndIcon:L7,GalleryHorizontalIcon:I7,GalleryThumbnails:A7,GalleryThumbnailsIcon:A7,GalleryVertical:E7,GalleryVerticalEnd:_7,GalleryVerticalEndIcon:_7,GalleryVerticalIcon:E7,Gamepad:N7,Gamepad2:P7,Gamepad2Icon:P7,GamepadIcon:N7,GanttChart:cu,GanttChartIcon:cu,GanttChartSquare:ts,GanttChartSquareIcon:ts,Gauge:R7,GaugeCircle:Iu,GaugeCircleIcon:Iu,GaugeIcon:R7,Gavel:j7,GavelIcon:j7,Gem:T7,GemIcon:T7,Ghost:D7,GhostIcon:D7,Gift:q7,GiftIcon:q7,GitBranch:O7,GitBranchIcon:O7,GitBranchPlus:z7,GitBranchPlusIcon:z7,GitCommit:l1,GitCommitHorizontal:l1,GitCommitHorizontalIcon:l1,GitCommitIcon:l1,GitCommitVertical:F7,GitCommitVerticalIcon:F7,GitCompare:H7,GitCompareArrows:B7,GitCompareArrowsIcon:B7,GitCompareIcon:H7,GitFork:V7,GitForkIcon:V7,GitGraph:U7,GitGraphIcon:U7,GitMerge:$7,GitMergeIcon:$7,GitPullRequest:Y7,GitPullRequestArrow:W7,GitPullRequestArrowIcon:W7,GitPullRequestClosed:G7,GitPullRequestClosedIcon:G7,GitPullRequestCreate:Z7,GitPullRequestCreateArrow:K7,GitPullRequestCreateArrowIcon:K7,GitPullRequestCreateIcon:Z7,GitPullRequestDraft:X7,GitPullRequestDraftIcon:X7,GitPullRequestIcon:Y7,Github:J7,GithubIcon:J7,Gitlab:Q7,GitlabIcon:Q7,GlassWater:eM,GlassWaterIcon:eM,Glasses:tM,GlassesIcon:tM,Globe:rM,Globe2:Xu,Globe2Icon:Xu,GlobeIcon:rM,GlobeLock:nM,GlobeLockIcon:nM,Goal:iM,GoalIcon:iM,Grab:aM,GrabIcon:aM,GraduationCap:oM,GraduationCapIcon:oM,Grape:sM,GrapeIcon:sM,Grid:es,Grid2X2:u1,Grid2X2Icon:u1,Grid2x2:u1,Grid2x2Check:cM,Grid2x2CheckIcon:cM,Grid2x2Icon:u1,Grid2x2Plus:lM,Grid2x2PlusIcon:lM,Grid2x2X:uM,Grid2x2XIcon:uM,Grid3X3:es,Grid3X3Icon:es,Grid3x3:es,Grid3x3Icon:es,GridIcon:es,Grip:fM,GripHorizontal:dM,GripHorizontalIcon:dM,GripIcon:fM,GripVertical:hM,GripVerticalIcon:hM,Group:pM,GroupIcon:pM,Guitar:yM,GuitarIcon:yM,Ham:gM,HamIcon:gM,Hammer:mM,HammerIcon:mM,Hand:bM,HandCoins:vM,HandCoinsIcon:vM,HandHeart:kM,HandHeartIcon:kM,HandHelping:d1,HandHelpingIcon:d1,HandIcon:bM,HandMetal:xM,HandMetalIcon:xM,HandPlatter:wM,HandPlatterIcon:wM,Handshake:MM,HandshakeIcon:MM,HardDrive:LM,HardDriveDownload:SM,HardDriveDownloadIcon:SM,HardDriveIcon:LM,HardDriveUpload:CM,HardDriveUploadIcon:CM,HardHat:IM,HardHatIcon:IM,Hash:AM,HashIcon:AM,Haze:_M,HazeIcon:_M,HdmiPort:EM,HdmiPortIcon:EM,Heading:qM,Heading1:PM,Heading1Icon:PM,Heading2:NM,Heading2Icon:NM,Heading3:RM,Heading3Icon:RM,Heading4:jM,Heading4Icon:jM,Heading5:TM,Heading5Icon:TM,Heading6:DM,Heading6Icon:DM,HeadingIcon:qM,HeadphoneOff:zM,HeadphoneOffIcon:zM,Headphones:OM,HeadphonesIcon:OM,Headset:FM,HeadsetIcon:FM,Heart:$M,HeartCrack:BM,HeartCrackIcon:BM,HeartHandshake:HM,HeartHandshakeIcon:HM,HeartIcon:$M,HeartOff:VM,HeartOffIcon:VM,HeartPulse:UM,HeartPulseIcon:UM,Heater:WM,HeaterIcon:WM,HelpCircle:Au,HelpCircleIcon:Au,HelpingHand:d1,HelpingHandIcon:d1,Hexagon:GM,HexagonIcon:GM,Highlighter:KM,HighlighterIcon:KM,History:ZM,HistoryIcon:ZM,Home:h1,HomeIcon:h1,Hop:YM,HopIcon:YM,HopOff:XM,HopOffIcon:XM,Hospital:JM,HospitalIcon:JM,Hotel:QM,HotelIcon:QM,Hourglass:e9,HourglassIcon:e9,House:h1,HouseIcon:h1,HousePlug:t9,HousePlugIcon:t9,HousePlus:n9,HousePlusIcon:n9,IceCream:p1,IceCream2:f1,IceCream2Icon:f1,IceCreamBowl:f1,IceCreamBowlIcon:f1,IceCreamCone:p1,IceCreamConeIcon:p1,IceCreamIcon:p1,Icon:Fue,IdCard:r9,IdCardIcon:r9,Image:pp,ImageDown:i9,ImageDownIcon:i9,ImageIcon:pp,ImageMinus:a9,ImageMinusIcon:a9,ImageOff:o9,ImageOffIcon:o9,ImagePlay:s9,ImagePlayIcon:s9,ImagePlus:c9,ImagePlusIcon:c9,ImageUp:l9,ImageUpIcon:l9,Images:u9,ImagesIcon:u9,Import:d9,ImportIcon:d9,Inbox:h9,InboxIcon:h9,Indent:g1,IndentDecrease:y1,IndentDecreaseIcon:y1,IndentIcon:g1,IndentIncrease:g1,IndentIncreaseIcon:g1,IndianRupee:f9,IndianRupeeIcon:f9,Infinity:p9,InfinityIcon:p9,Info:y9,InfoIcon:y9,Inspect:Ld,InspectIcon:Ld,InspectionPanel:g9,InspectionPanelIcon:g9,Instagram:m9,InstagramIcon:m9,Italic:v9,ItalicIcon:v9,IterationCcw:k9,IterationCcwIcon:k9,IterationCw:x9,IterationCwIcon:x9,JapaneseYen:w9,JapaneseYenIcon:w9,Joystick:b9,JoystickIcon:b9,Kanban:M9,KanbanIcon:M9,KanbanSquare:wd,KanbanSquareDashed:pd,KanbanSquareDashedIcon:pd,KanbanSquareIcon:wd,Key:L9,KeyIcon:L9,KeyRound:S9,KeyRoundIcon:S9,KeySquare:C9,KeySquareIcon:C9,Keyboard:_9,KeyboardIcon:_9,KeyboardMusic:I9,KeyboardMusicIcon:I9,KeyboardOff:A9,KeyboardOffIcon:A9,Lamp:T9,LampCeiling:E9,LampCeilingIcon:E9,LampDesk:P9,LampDeskIcon:P9,LampFloor:N9,LampFloorIcon:N9,LampIcon:T9,LampWallDown:R9,LampWallDownIcon:R9,LampWallUp:j9,LampWallUpIcon:j9,LandPlot:D9,LandPlotIcon:D9,Landmark:q9,LandmarkIcon:q9,Languages:z9,LanguagesIcon:z9,Laptop:O9,Laptop2:m1,Laptop2Icon:m1,LaptopIcon:O9,LaptopMinimal:m1,LaptopMinimalIcon:m1,Lasso:B9,LassoIcon:B9,LassoSelect:F9,LassoSelectIcon:F9,Laugh:H9,LaughIcon:H9,Layers:$9,Layers2:V9,Layers2Icon:V9,Layers3:U9,Layers3Icon:U9,LayersIcon:$9,Layout:R1,LayoutDashboard:yp,LayoutDashboardIcon:yp,LayoutGrid:W9,LayoutGridIcon:W9,LayoutIcon:R1,LayoutList:G9,LayoutListIcon:G9,LayoutPanelLeft:K9,LayoutPanelLeftIcon:K9,LayoutPanelTop:Z9,LayoutPanelTopIcon:Z9,LayoutTemplate:X9,LayoutTemplateIcon:X9,Leaf:Y9,LeafIcon:Y9,LeafyGreen:J9,LeafyGreenIcon:J9,Lectern:Q9,LecternIcon:Q9,LetterText:eS,LetterTextIcon:eS,Library:nS,LibraryBig:tS,LibraryBigIcon:tS,LibraryIcon:nS,LibrarySquare:bd,LibrarySquareIcon:bd,LifeBuoy:rS,LifeBuoyIcon:rS,Ligature:iS,LigatureIcon:iS,Lightbulb:oS,LightbulbIcon:oS,LightbulbOff:aS,LightbulbOffIcon:aS,LineChart:au,LineChartIcon:au,Link:lS,Link2:cS,Link2Icon:cS,Link2Off:sS,Link2OffIcon:sS,LinkIcon:lS,Linkedin:uS,LinkedinIcon:uS,List:LS,ListCheck:dS,ListCheckIcon:dS,ListChecks:hS,ListChecksIcon:hS,ListCollapse:fS,ListCollapseIcon:fS,ListEnd:pS,ListEndIcon:pS,ListFilter:yS,ListFilterIcon:yS,ListIcon:LS,ListMinus:gS,ListMinusIcon:gS,ListMusic:mS,ListMusicIcon:mS,ListOrdered:vS,ListOrderedIcon:vS,ListPlus:kS,ListPlusIcon:kS,ListRestart:xS,ListRestartIcon:xS,ListStart:wS,ListStartIcon:wS,ListTodo:bS,ListTodoIcon:bS,ListTree:MS,ListTreeIcon:MS,ListVideo:SS,ListVideoIcon:SS,ListX:CS,ListXIcon:CS,Loader:AS,Loader2:to,Loader2Icon:to,LoaderCircle:to,LoaderCircleIcon:to,LoaderIcon:AS,LoaderPinwheel:IS,LoaderPinwheelIcon:IS,Locate:PS,LocateFixed:_S,LocateFixedIcon:_S,LocateIcon:PS,LocateOff:ES,LocateOffIcon:ES,Lock:gp,LockIcon:gp,LockKeyhole:NS,LockKeyholeIcon:NS,LockKeyholeOpen:v1,LockKeyholeOpenIcon:v1,LockOpen:k1,LockOpenIcon:k1,LogIn:RS,LogInIcon:RS,LogOut:jS,LogOutIcon:jS,Logs:TS,LogsIcon:TS,Lollipop:DS,LollipopIcon:DS,LucideAArrowDown:Gm,LucideAArrowUp:Km,LucideALargeSmall:Zm,LucideAccessibility:Xm,LucideActivity:Ym,LucideActivitySquare:W1,LucideAirVent:Jm,LucideAirplay:Qm,LucideAlarmCheck:Dl,LucideAlarmClock:t5,LucideAlarmClockCheck:Dl,LucideAlarmClockMinus:ql,LucideAlarmClockOff:e5,LucideAlarmClockPlus:zl,LucideAlarmMinus:ql,LucideAlarmPlus:zl,LucideAlarmSmoke:n5,LucideAlbum:r5,LucideAlertCircle:du,LucideAlertOctagon:b1,LucideAlertTriangle:Kd,LucideAlignCenter:o5,LucideAlignCenterHorizontal:i5,LucideAlignCenterVertical:a5,LucideAlignEndHorizontal:s5,LucideAlignEndVertical:c5,LucideAlignHorizontalDistributeCenter:l5,LucideAlignHorizontalDistributeEnd:u5,LucideAlignHorizontalDistributeStart:d5,LucideAlignHorizontalJustifyCenter:h5,LucideAlignHorizontalJustifyEnd:f5,LucideAlignHorizontalJustifyStart:p5,LucideAlignHorizontalSpaceAround:y5,LucideAlignHorizontalSpaceBetween:g5,LucideAlignJustify:m5,LucideAlignLeft:v5,LucideAlignRight:k5,LucideAlignStartHorizontal:x5,LucideAlignStartVertical:w5,LucideAlignVerticalDistributeCenter:b5,LucideAlignVerticalDistributeEnd:M5,LucideAlignVerticalDistributeStart:S5,LucideAlignVerticalJustifyCenter:C5,LucideAlignVerticalJustifyEnd:L5,LucideAlignVerticalJustifyStart:I5,LucideAlignVerticalSpaceAround:A5,LucideAlignVerticalSpaceBetween:_5,LucideAmbulance:E5,LucideAmpersand:P5,LucideAmpersands:N5,LucideAmphora:R5,LucideAnchor:j5,LucideAngry:T5,LucideAnnoyed:D5,LucideAntenna:q5,LucideAnvil:z5,LucideAperture:O5,LucideAppWindow:B5,LucideAppWindowMac:F5,LucideApple:H5,LucideArchive:$5,LucideArchiveRestore:V5,LucideArchiveX:U5,LucideAreaChart:Jl,LucideArmchair:W5,LucideArrowBigDown:K5,LucideArrowBigDownDash:G5,LucideArrowBigLeft:X5,LucideArrowBigLeftDash:Z5,LucideArrowBigRight:J5,LucideArrowBigRightDash:Y5,LucideArrowBigUp:ev,LucideArrowBigUpDash:Q5,LucideArrowDown:uv,LucideArrowDown01:tv,LucideArrowDown10:nv,LucideArrowDownAZ:Ol,LucideArrowDownAz:Ol,LucideArrowDownCircle:hu,LucideArrowDownFromLine:rv,LucideArrowDownLeft:iv,LucideArrowDownLeftFromCircle:pu,LucideArrowDownLeftFromSquare:Y1,LucideArrowDownLeftSquare:G1,LucideArrowDownNarrowWide:av,LucideArrowDownRight:ov,LucideArrowDownRightFromCircle:yu,LucideArrowDownRightFromSquare:J1,LucideArrowDownRightSquare:K1,LucideArrowDownSquare:Z1,LucideArrowDownToDot:sv,LucideArrowDownToLine:cv,LucideArrowDownUp:lv,LucideArrowDownWideNarrow:Fl,LucideArrowDownZA:Bl,LucideArrowDownZa:Bl,LucideArrowLeft:fv,LucideArrowLeftCircle:fu,LucideArrowLeftFromLine:dv,LucideArrowLeftRight:op,LucideArrowLeftSquare:X1,LucideArrowLeftToLine:hv,LucideArrowRight:X2,LucideArrowRightCircle:vu,LucideArrowRightFromLine:pv,LucideArrowRightLeft:yv,LucideArrowRightSquare:td,LucideArrowRightToLine:gv,LucideArrowUp:Lv,LucideArrowUp01:mv,LucideArrowUp10:vv,LucideArrowUpAZ:Hl,LucideArrowUpAz:Hl,LucideArrowUpCircle:ku,LucideArrowUpDown:kv,LucideArrowUpFromDot:xv,LucideArrowUpFromLine:wv,LucideArrowUpLeft:bv,LucideArrowUpLeftFromCircle:gu,LucideArrowUpLeftFromSquare:Q1,LucideArrowUpLeftSquare:nd,LucideArrowUpNarrowWide:Vl,LucideArrowUpRight:Mv,LucideArrowUpRightFromCircle:mu,LucideArrowUpRightFromSquare:ed,LucideArrowUpRightSquare:rd,LucideArrowUpSquare:id,LucideArrowUpToLine:Sv,LucideArrowUpWideNarrow:Cv,LucideArrowUpZA:Ul,LucideArrowUpZa:Ul,LucideArrowsUpFromLine:Iv,LucideAsterisk:Av,LucideAsteriskSquare:ad,LucideAtSign:_v,LucideAtom:Ev,LucideAudioLines:Pv,LucideAudioWaveform:Nv,LucideAward:Rv,LucideAxe:jv,LucideAxis3D:$l,LucideAxis3d:$l,LucideBaby:Tv,LucideBackpack:Dv,LucideBadge:Jv,LucideBadgeAlert:qv,LucideBadgeCent:zv,LucideBadgeCheck:Wl,LucideBadgeDollarSign:Ov,LucideBadgeEuro:Fv,LucideBadgeHelp:Bv,LucideBadgeIndianRupee:Hv,LucideBadgeInfo:Vv,LucideBadgeJapaneseYen:Uv,LucideBadgeMinus:$v,LucideBadgePercent:Wv,LucideBadgePlus:Gv,LucideBadgePoundSterling:Kv,LucideBadgeRussianRuble:Zv,LucideBadgeSwissFranc:Xv,LucideBadgeX:Yv,LucideBaggageClaim:Qv,LucideBan:ek,LucideBanana:tk,LucideBandage:nk,LucideBanknote:rk,LucideBarChart:ou,LucideBarChart2:su,LucideBarChart3:iu,LucideBarChart4:ru,LucideBarChartBig:nu,LucideBarChartHorizontal:eu,LucideBarChartHorizontalBig:Ql,LucideBarcode:ik,LucideBaseline:ak,LucideBath:ok,LucideBattery:hk,LucideBatteryCharging:sk,LucideBatteryFull:ck,LucideBatteryLow:lk,LucideBatteryMedium:uk,LucideBatteryWarning:dk,LucideBeaker:fk,LucideBean:yk,LucideBeanOff:pk,LucideBed:vk,LucideBedDouble:gk,LucideBedSingle:mk,LucideBeef:kk,LucideBeer:wk,LucideBeerOff:xk,LucideBell:Ak,LucideBellDot:bk,LucideBellElectric:Mk,LucideBellMinus:Sk,LucideBellOff:Ck,LucideBellPlus:Lk,LucideBellRing:Ik,LucideBetweenHorizonalEnd:Gl,LucideBetweenHorizonalStart:Kl,LucideBetweenHorizontalEnd:Gl,LucideBetweenHorizontalStart:Kl,LucideBetweenVerticalEnd:_k,LucideBetweenVerticalStart:Ek,LucideBicepsFlexed:Pk,LucideBike:Nk,LucideBinary:Rk,LucideBinoculars:jk,LucideBiohazard:Tk,LucideBird:Dk,LucideBitcoin:qk,LucideBlend:zk,LucideBlinds:Ok,LucideBlocks:Fk,LucideBluetooth:Uk,LucideBluetoothConnected:Bk,LucideBluetoothOff:Hk,LucideBluetoothSearching:Vk,LucideBold:$k,LucideBolt:Wk,LucideBomb:Gk,LucideBone:Kk,LucideBook:m4,LucideBookA:Zk,LucideBookAudio:Xk,LucideBookCheck:Yk,LucideBookCopy:Jk,LucideBookDashed:Zl,LucideBookDown:Qk,LucideBookHeadphones:e4,LucideBookHeart:t4,LucideBookImage:n4,LucideBookKey:r4,LucideBookLock:i4,LucideBookMarked:a4,LucideBookMinus:o4,LucideBookOpen:l4,LucideBookOpenCheck:s4,LucideBookOpenText:c4,LucideBookPlus:u4,LucideBookTemplate:Zl,LucideBookText:d4,LucideBookType:h4,LucideBookUp:p4,LucideBookUp2:f4,LucideBookUser:y4,LucideBookX:g4,LucideBookmark:b4,LucideBookmarkCheck:v4,LucideBookmarkMinus:k4,LucideBookmarkPlus:x4,LucideBookmarkX:w4,LucideBoomBox:M4,LucideBot:L4,LucideBotMessageSquare:S4,LucideBotOff:C4,LucideBox:I4,LucideBoxSelect:gd,LucideBoxes:A4,LucideBraces:Xl,LucideBrackets:_4,LucideBrain:N4,LucideBrainCircuit:E4,LucideBrainCog:P4,LucideBrickWall:R4,LucideBriefcase:q4,LucideBriefcaseBusiness:j4,LucideBriefcaseConveyorBelt:T4,LucideBriefcaseMedical:D4,LucideBringToFront:z4,LucideBrush:O4,LucideBug:H4,LucideBugOff:F4,LucideBugPlay:B4,LucideBuilding:U4,LucideBuilding2:V4,LucideBus:W4,LucideBusFront:$4,LucideCable:K4,LucideCableCar:G4,LucideCake:X4,LucideCakeSlice:Z4,LucideCalculator:Y4,LucideCalendar:m3,LucideCalendar1:J4,LucideCalendarArrowDown:Q4,LucideCalendarArrowUp:e3,LucideCalendarCheck:n3,LucideCalendarCheck2:t3,LucideCalendarClock:r3,LucideCalendarCog:i3,LucideCalendarDays:a3,LucideCalendarFold:o3,LucideCalendarHeart:s3,LucideCalendarMinus:l3,LucideCalendarMinus2:c3,LucideCalendarOff:u3,LucideCalendarPlus:h3,LucideCalendarPlus2:d3,LucideCalendarRange:f3,LucideCalendarSearch:p3,LucideCalendarX:g3,LucideCalendarX2:y3,LucideCamera:k3,LucideCameraOff:v3,LucideCandlestickChart:tu,LucideCandy:b3,LucideCandyCane:x3,LucideCandyOff:w3,LucideCannabis:M3,LucideCaptions:Yl,LucideCaptionsOff:S3,LucideCar:I3,LucideCarFront:C3,LucideCarTaxiFront:L3,LucideCaravan:A3,LucideCarrot:_3,LucideCaseLower:E3,LucideCaseSensitive:P3,LucideCaseUpper:N3,LucideCassetteTape:R3,LucideCast:j3,LucideCastle:T3,LucideCat:D3,LucideCctv:q3,LucideChartArea:Jl,LucideChartBar:eu,LucideChartBarBig:Ql,LucideChartBarDecreasing:z3,LucideChartBarIncreasing:O3,LucideChartBarStacked:F3,LucideChartCandlestick:tu,LucideChartColumn:iu,LucideChartColumnBig:nu,LucideChartColumnDecreasing:B3,LucideChartColumnIncreasing:ru,LucideChartColumnStacked:H3,LucideChartGantt:V3,LucideChartLine:au,LucideChartNetwork:U3,LucideChartNoAxesColumn:su,LucideChartNoAxesColumnDecreasing:$3,LucideChartNoAxesColumnIncreasing:ou,LucideChartNoAxesCombined:W3,LucideChartNoAxesGantt:cu,LucideChartPie:lu,LucideChartScatter:uu,LucideChartSpline:G3,LucideCheck:Jc,LucideCheckCheck:K3,LucideCheckCircle:xu,LucideCheckCircle2:wu,LucideCheckSquare:sd,LucideCheckSquare2:cd,LucideChefHat:Z3,LucideCherry:X3,LucideChevronDown:Y3,LucideChevronDownCircle:bu,LucideChevronDownSquare:ld,LucideChevronFirst:J3,LucideChevronLast:Q3,LucideChevronLeft:ex,LucideChevronLeftCircle:Mu,LucideChevronLeftSquare:ud,LucideChevronRight:tx,LucideChevronRightCircle:Su,LucideChevronRightSquare:dd,LucideChevronUp:nx,LucideChevronUpCircle:Cu,LucideChevronUpSquare:hd,LucideChevronsDown:ix,LucideChevronsDownUp:rx,LucideChevronsLeft:sx,LucideChevronsLeftRight:ox,LucideChevronsLeftRightEllipsis:ax,LucideChevronsRight:lx,LucideChevronsRightLeft:cx,LucideChevronsUp:ux,LucideChevronsUpDown:sp,LucideChrome:dx,LucideChurch:hx,LucideCigarette:px,LucideCigaretteOff:fx,LucideCircle:cp,LucideCircleAlert:du,LucideCircleArrowDown:hu,LucideCircleArrowLeft:fu,LucideCircleArrowOutDownLeft:pu,LucideCircleArrowOutDownRight:yu,LucideCircleArrowOutUpLeft:gu,LucideCircleArrowOutUpRight:mu,LucideCircleArrowRight:vu,LucideCircleArrowUp:ku,LucideCircleCheck:wu,LucideCircleCheckBig:xu,LucideCircleChevronDown:bu,LucideCircleChevronLeft:Mu,LucideCircleChevronRight:Su,LucideCircleChevronUp:Cu,LucideCircleDashed:yx,LucideCircleDivide:Lu,LucideCircleDollarSign:gx,LucideCircleDot:vx,LucideCircleDotDashed:mx,LucideCircleEllipsis:kx,LucideCircleEqual:xx,LucideCircleFadingArrowUp:wx,LucideCircleFadingPlus:bx,LucideCircleGauge:Iu,LucideCircleHelp:Au,LucideCircleMinus:_u,LucideCircleOff:Mx,LucideCircleParking:Pu,LucideCircleParkingOff:Eu,LucideCirclePause:Nu,LucideCirclePercent:Ru,LucideCirclePlay:ju,LucideCirclePlus:Tu,LucideCirclePower:Du,LucideCircleSlash:Sx,LucideCircleSlash2:qu,LucideCircleSlashed:qu,LucideCircleStop:zu,LucideCircleUser:Fu,LucideCircleUserRound:Ou,LucideCircleX:Bu,LucideCircuitBoard:Cx,LucideCitrus:Lx,LucideClapperboard:Ix,LucideClipboard:Dx,LucideClipboardCheck:Ax,LucideClipboardCopy:_x,LucideClipboardEdit:Vu,LucideClipboardList:Ex,LucideClipboardMinus:Px,LucideClipboardPaste:Nx,LucideClipboardPen:Vu,LucideClipboardPenLine:Hu,LucideClipboardPlus:Rx,LucideClipboardSignature:Hu,LucideClipboardType:jx,LucideClipboardX:Tx,LucideClock:Jx,LucideClock1:qx,LucideClock10:zx,LucideClock11:Ox,LucideClock12:Fx,LucideClock2:Bx,LucideClock3:Hx,LucideClock4:Vx,LucideClock5:Ux,LucideClock6:$x,LucideClock7:Wx,LucideClock8:Gx,LucideClock9:Kx,LucideClockAlert:Zx,LucideClockArrowDown:Xx,LucideClockArrowUp:Yx,LucideCloud:lp,LucideCloudCog:Qx,LucideCloudDownload:Uu,LucideCloudDrizzle:ew,LucideCloudFog:tw,LucideCloudHail:nw,LucideCloudLightning:rw,LucideCloudMoon:aw,LucideCloudMoonRain:iw,LucideCloudOff:ow,LucideCloudRain:cw,LucideCloudRainWind:sw,LucideCloudSnow:lw,LucideCloudSun:dw,LucideCloudSunRain:uw,LucideCloudUpload:$u,LucideCloudy:hw,LucideClover:fw,LucideClub:pw,LucideCode:yw,LucideCode2:Wu,LucideCodeSquare:fd,LucideCodeXml:Wu,LucideCodepen:gw,LucideCodesandbox:mw,LucideCoffee:vw,LucideCog:kw,LucideCoins:xw,LucideColumns:Gu,LucideColumns2:Gu,LucideColumns3:Tc,LucideColumns4:ww,LucideCombine:bw,LucideCommand:Mw,LucideCompass:Sw,LucideComponent:Cw,LucideComputer:Lw,LucideConciergeBell:Iw,LucideCone:Aw,LucideConstruction:_w,LucideContact:Ew,LucideContact2:Ku,LucideContactRound:Ku,LucideContainer:Pw,LucideContrast:Nw,LucideCookie:Rw,LucideCookingPot:jw,LucideCopy:Y2,LucideCopyCheck:Tw,LucideCopyMinus:Dw,LucideCopyPlus:qw,LucideCopySlash:zw,LucideCopyX:Ow,LucideCopyleft:Fw,LucideCopyright:Bw,LucideCornerDownLeft:Hw,LucideCornerDownRight:Vw,LucideCornerLeftDown:Uw,LucideCornerLeftUp:$w,LucideCornerRightDown:Ww,LucideCornerRightUp:Gw,LucideCornerUpLeft:Kw,LucideCornerUpRight:Zw,LucideCpu:Xw,LucideCreativeCommons:Yw,LucideCreditCard:Jw,LucideCroissant:Qw,LucideCrop:e6,LucideCross:t6,LucideCrosshair:n6,LucideCrown:r6,LucideCuboid:i6,LucideCupSoda:a6,LucideCurlyBraces:Xl,LucideCurrency:o6,LucideCylinder:s6,LucideDam:c6,LucideDatabase:up,LucideDatabaseBackup:l6,LucideDatabaseZap:u6,LucideDelete:d6,LucideDessert:h6,LucideDiameter:f6,LucideDiamond:g6,LucideDiamondMinus:p6,LucideDiamondPercent:Zu,LucideDiamondPlus:y6,LucideDice1:m6,LucideDice2:v6,LucideDice3:k6,LucideDice4:x6,LucideDice5:w6,LucideDice6:b6,LucideDices:M6,LucideDiff:S6,LucideDisc:A6,LucideDisc2:C6,LucideDisc3:L6,LucideDiscAlbum:I6,LucideDivide:_6,LucideDivideCircle:Lu,LucideDivideSquare:md,LucideDna:P6,LucideDnaOff:E6,LucideDock:N6,LucideDog:R6,LucideDollarSign:j6,LucideDonut:T6,LucideDoorClosed:D6,LucideDoorOpen:q6,LucideDot:z6,LucideDotSquare:vd,LucideDownload:O6,LucideDownloadCloud:Uu,LucideDraftingCompass:F6,LucideDrama:B6,LucideDribbble:H6,LucideDrill:V6,LucideDroplet:U6,LucideDroplets:$6,LucideDrum:W6,LucideDrumstick:G6,LucideDumbbell:K6,LucideEar:X6,LucideEarOff:Z6,LucideEarth:Xu,LucideEarthLock:Y6,LucideEclipse:J6,LucideEdit:Ea,LucideEdit2:T1,LucideEdit3:j1,LucideEgg:t8,LucideEggFried:Q6,LucideEggOff:e8,LucideEllipsis:Ju,LucideEllipsisVertical:Yu,LucideEqual:r8,LucideEqualNot:n8,LucideEqualSquare:kd,LucideEraser:i8,LucideEthernetPort:a8,LucideEuro:o8,LucideExpand:s8,LucideExternalLink:dp,LucideEye:u8,LucideEyeClosed:c8,LucideEyeOff:l8,LucideFacebook:d8,LucideFactory:h8,LucideFan:f8,LucideFastForward:p8,LucideFeather:y8,LucideFence:g8,LucideFerrisWheel:m8,LucideFigma:v8,LucideFile:pb,LucideFileArchive:k8,LucideFileAudio:w8,LucideFileAudio2:x8,LucideFileAxis3D:Qu,LucideFileAxis3d:Qu,LucideFileBadge:M8,LucideFileBadge2:b8,LucideFileBarChart:e1,LucideFileBarChart2:t1,LucideFileBox:S8,LucideFileChartColumn:t1,LucideFileChartColumnIncreasing:e1,LucideFileChartLine:n1,LucideFileChartPie:r1,LucideFileCheck:L8,LucideFileCheck2:C8,LucideFileClock:I8,LucideFileCode:_8,LucideFileCode2:A8,LucideFileCog:i1,LucideFileCog2:i1,LucideFileDiff:E8,LucideFileDigit:P8,LucideFileDown:hp,LucideFileEdit:o1,LucideFileHeart:N8,LucideFileImage:R8,LucideFileInput:j8,LucideFileJson:D8,LucideFileJson2:T8,LucideFileKey:z8,LucideFileKey2:q8,LucideFileLineChart:n1,LucideFileLock:F8,LucideFileLock2:O8,LucideFileMinus:H8,LucideFileMinus2:B8,LucideFileMusic:V8,LucideFileOutput:U8,LucideFilePen:o1,LucideFilePenLine:a1,LucideFilePieChart:r1,LucideFilePlus:W8,LucideFilePlus2:$8,LucideFileQuestion:G8,LucideFileScan:K8,LucideFileSearch:X8,LucideFileSearch2:Z8,LucideFileSignature:a1,LucideFileSliders:Y8,LucideFileSpreadsheet:J8,LucideFileStack:Q8,LucideFileSymlink:eb,LucideFileTerminal:tb,LucideFileText:nb,LucideFileType:ib,LucideFileType2:rb,LucideFileUp:ab,LucideFileUser:ob,LucideFileVideo:cb,LucideFileVideo2:sb,LucideFileVolume:ub,LucideFileVolume2:lb,LucideFileWarning:db,LucideFileX:fb,LucideFileX2:hb,LucideFiles:yb,LucideFilm:gb,LucideFilter:vb,LucideFilterX:mb,LucideFingerprint:kb,LucideFireExtinguisher:xb,LucideFish:Mb,LucideFishOff:wb,LucideFishSymbol:bb,LucideFlag:Ib,LucideFlagOff:Sb,LucideFlagTriangleLeft:Cb,LucideFlagTriangleRight:Lb,LucideFlame:_b,LucideFlameKindling:Ab,LucideFlashlight:Pb,LucideFlashlightOff:Eb,LucideFlaskConical:Rb,LucideFlaskConicalOff:Nb,LucideFlaskRound:jb,LucideFlipHorizontal:Db,LucideFlipHorizontal2:Tb,LucideFlipVertical:zb,LucideFlipVertical2:qb,LucideFlower:Fb,LucideFlower2:Ob,LucideFocus:Bb,LucideFoldHorizontal:Hb,LucideFoldVertical:Vb,LucideFolder:g7,LucideFolderArchive:Ub,LucideFolderCheck:$b,LucideFolderClock:Wb,LucideFolderClosed:Gb,LucideFolderCode:Kb,LucideFolderCog:s1,LucideFolderCog2:s1,LucideFolderDot:Zb,LucideFolderDown:Xb,LucideFolderEdit:c1,LucideFolderGit:Jb,LucideFolderGit2:Yb,LucideFolderHeart:Qb,LucideFolderInput:e7,LucideFolderKanban:t7,LucideFolderKey:n7,LucideFolderLock:r7,LucideFolderMinus:i7,LucideFolderOpen:fp,LucideFolderOpenDot:a7,LucideFolderOutput:o7,LucideFolderPen:c1,LucideFolderPlus:s7,LucideFolderRoot:c7,LucideFolderSearch:u7,LucideFolderSearch2:l7,LucideFolderSymlink:d7,LucideFolderSync:h7,LucideFolderTree:f7,LucideFolderUp:p7,LucideFolderX:y7,LucideFolders:m7,LucideFootprints:v7,LucideForkKnife:ah,LucideForkKnifeCrossed:ih,LucideForklift:k7,LucideFormInput:q1,LucideForward:x7,LucideFrame:w7,LucideFramer:b7,LucideFrown:M7,LucideFuel:S7,LucideFullscreen:C7,LucideFunctionSquare:xd,LucideGalleryHorizontal:I7,LucideGalleryHorizontalEnd:L7,LucideGalleryThumbnails:A7,LucideGalleryVertical:E7,LucideGalleryVerticalEnd:_7,LucideGamepad:N7,LucideGamepad2:P7,LucideGanttChart:cu,LucideGanttChartSquare:ts,LucideGauge:R7,LucideGaugeCircle:Iu,LucideGavel:j7,LucideGem:T7,LucideGhost:D7,LucideGift:q7,LucideGitBranch:O7,LucideGitBranchPlus:z7,LucideGitCommit:l1,LucideGitCommitHorizontal:l1,LucideGitCommitVertical:F7,LucideGitCompare:H7,LucideGitCompareArrows:B7,LucideGitFork:V7,LucideGitGraph:U7,LucideGitMerge:$7,LucideGitPullRequest:Y7,LucideGitPullRequestArrow:W7,LucideGitPullRequestClosed:G7,LucideGitPullRequestCreate:Z7,LucideGitPullRequestCreateArrow:K7,LucideGitPullRequestDraft:X7,LucideGithub:J7,LucideGitlab:Q7,LucideGlassWater:eM,LucideGlasses:tM,LucideGlobe:rM,LucideGlobe2:Xu,LucideGlobeLock:nM,LucideGoal:iM,LucideGrab:aM,LucideGraduationCap:oM,LucideGrape:sM,LucideGrid:es,LucideGrid2X2:u1,LucideGrid2x2:u1,LucideGrid2x2Check:cM,LucideGrid2x2Plus:lM,LucideGrid2x2X:uM,LucideGrid3X3:es,LucideGrid3x3:es,LucideGrip:fM,LucideGripHorizontal:dM,LucideGripVertical:hM,LucideGroup:pM,LucideGuitar:yM,LucideHam:gM,LucideHammer:mM,LucideHand:bM,LucideHandCoins:vM,LucideHandHeart:kM,LucideHandHelping:d1,LucideHandMetal:xM,LucideHandPlatter:wM,LucideHandshake:MM,LucideHardDrive:LM,LucideHardDriveDownload:SM,LucideHardDriveUpload:CM,LucideHardHat:IM,LucideHash:AM,LucideHaze:_M,LucideHdmiPort:EM,LucideHeading:qM,LucideHeading1:PM,LucideHeading2:NM,LucideHeading3:RM,LucideHeading4:jM,LucideHeading5:TM,LucideHeading6:DM,LucideHeadphoneOff:zM,LucideHeadphones:OM,LucideHeadset:FM,LucideHeart:$M,LucideHeartCrack:BM,LucideHeartHandshake:HM,LucideHeartOff:VM,LucideHeartPulse:UM,LucideHeater:WM,LucideHelpCircle:Au,LucideHelpingHand:d1,LucideHexagon:GM,LucideHighlighter:KM,LucideHistory:ZM,LucideHome:h1,LucideHop:YM,LucideHopOff:XM,LucideHospital:JM,LucideHotel:QM,LucideHourglass:e9,LucideHouse:h1,LucideHousePlug:t9,LucideHousePlus:n9,LucideIceCream:p1,LucideIceCream2:f1,LucideIceCreamBowl:f1,LucideIceCreamCone:p1,LucideIdCard:r9,LucideImage:pp,LucideImageDown:i9,LucideImageMinus:a9,LucideImageOff:o9,LucideImagePlay:s9,LucideImagePlus:c9,LucideImageUp:l9,LucideImages:u9,LucideImport:d9,LucideInbox:h9,LucideIndent:g1,LucideIndentDecrease:y1,LucideIndentIncrease:g1,LucideIndianRupee:f9,LucideInfinity:p9,LucideInfo:y9,LucideInspect:Ld,LucideInspectionPanel:g9,LucideInstagram:m9,LucideItalic:v9,LucideIterationCcw:k9,LucideIterationCw:x9,LucideJapaneseYen:w9,LucideJoystick:b9,LucideKanban:M9,LucideKanbanSquare:wd,LucideKanbanSquareDashed:pd,LucideKey:L9,LucideKeyRound:S9,LucideKeySquare:C9,LucideKeyboard:_9,LucideKeyboardMusic:I9,LucideKeyboardOff:A9,LucideLamp:T9,LucideLampCeiling:E9,LucideLampDesk:P9,LucideLampFloor:N9,LucideLampWallDown:R9,LucideLampWallUp:j9,LucideLandPlot:D9,LucideLandmark:q9,LucideLanguages:z9,LucideLaptop:O9,LucideLaptop2:m1,LucideLaptopMinimal:m1,LucideLasso:B9,LucideLassoSelect:F9,LucideLaugh:H9,LucideLayers:$9,LucideLayers2:V9,LucideLayers3:U9,LucideLayout:R1,LucideLayoutDashboard:yp,LucideLayoutGrid:W9,LucideLayoutList:G9,LucideLayoutPanelLeft:K9,LucideLayoutPanelTop:Z9,LucideLayoutTemplate:X9,LucideLeaf:Y9,LucideLeafyGreen:J9,LucideLectern:Q9,LucideLetterText:eS,LucideLibrary:nS,LucideLibraryBig:tS,LucideLibrarySquare:bd,LucideLifeBuoy:rS,LucideLigature:iS,LucideLightbulb:oS,LucideLightbulbOff:aS,LucideLineChart:au,LucideLink:lS,LucideLink2:cS,LucideLink2Off:sS,LucideLinkedin:uS,LucideList:LS,LucideListCheck:dS,LucideListChecks:hS,LucideListCollapse:fS,LucideListEnd:pS,LucideListFilter:yS,LucideListMinus:gS,LucideListMusic:mS,LucideListOrdered:vS,LucideListPlus:kS,LucideListRestart:xS,LucideListStart:wS,LucideListTodo:bS,LucideListTree:MS,LucideListVideo:SS,LucideListX:CS,LucideLoader:AS,LucideLoader2:to,LucideLoaderCircle:to,LucideLoaderPinwheel:IS,LucideLocate:PS,LucideLocateFixed:_S,LucideLocateOff:ES,LucideLock:gp,LucideLockKeyhole:NS,LucideLockKeyholeOpen:v1,LucideLockOpen:k1,LucideLogIn:RS,LucideLogOut:jS,LucideLogs:TS,LucideLollipop:DS,LucideLuggage:qS,LucideMSquare:Md,LucideMagnet:zS,LucideMail:GS,LucideMailCheck:OS,LucideMailMinus:FS,LucideMailOpen:BS,LucideMailPlus:HS,LucideMailQuestion:VS,LucideMailSearch:US,LucideMailWarning:$S,LucideMailX:WS,LucideMailbox:KS,LucideMails:ZS,LucideMap:cC,LucideMapPin:oC,LucideMapPinCheck:YS,LucideMapPinCheckInside:XS,LucideMapPinHouse:JS,LucideMapPinMinus:eC,LucideMapPinMinusInside:QS,LucideMapPinOff:tC,LucideMapPinPlus:rC,LucideMapPinPlusInside:nC,LucideMapPinX:aC,LucideMapPinXInside:iC,LucideMapPinned:sC,LucideMartini:lC,LucideMaximize:uC,LucideMaximize2:mp,LucideMedal:dC,LucideMegaphone:fC,LucideMegaphoneOff:hC,LucideMeh:pC,LucideMemoryStick:yC,LucideMenu:gC,LucideMenuSquare:Sd,LucideMerge:mC,LucideMessageCircle:AC,LucideMessageCircleCode:vC,LucideMessageCircleDashed:kC,LucideMessageCircleHeart:xC,LucideMessageCircleMore:wC,LucideMessageCircleOff:bC,LucideMessageCirclePlus:MC,LucideMessageCircleQuestion:SC,LucideMessageCircleReply:CC,LucideMessageCircleWarning:LC,LucideMessageCircleX:IC,LucideMessageSquare:UC,LucideMessageSquareCode:_C,LucideMessageSquareDashed:EC,LucideMessageSquareDiff:PC,LucideMessageSquareDot:NC,LucideMessageSquareHeart:RC,LucideMessageSquareLock:jC,LucideMessageSquareMore:TC,LucideMessageSquareOff:DC,LucideMessageSquarePlus:qC,LucideMessageSquareQuote:zC,LucideMessageSquareReply:OC,LucideMessageSquareShare:FC,LucideMessageSquareText:BC,LucideMessageSquareWarning:HC,LucideMessageSquareX:VC,LucideMessagesSquare:$C,LucideMic:GC,LucideMic2:x1,LucideMicOff:WC,LucideMicVocal:x1,LucideMicrochip:KC,LucideMicroscope:ZC,LucideMicrowave:XC,LucideMilestone:YC,LucideMilk:QC,LucideMilkOff:JC,LucideMinimize:tL,LucideMinimize2:eL,LucideMinus:vp,LucideMinusCircle:_u,LucideMinusSquare:Cd,LucideMonitor:pL,LucideMonitorCheck:nL,LucideMonitorCog:rL,LucideMonitorDot:iL,LucideMonitorDown:aL,LucideMonitorOff:oL,LucideMonitorPause:sL,LucideMonitorPlay:cL,LucideMonitorSmartphone:lL,LucideMonitorSpeaker:uL,LucideMonitorStop:dL,LucideMonitorUp:hL,LucideMonitorX:fL,LucideMoon:gL,LucideMoonStar:yL,LucideMoreHorizontal:Ju,LucideMoreVertical:Yu,LucideMountain:vL,LucideMountainSnow:mL,LucideMouse:SL,LucideMouseOff:kL,LucideMousePointer:ML,LucideMousePointer2:xL,LucideMousePointerBan:wL,LucideMousePointerClick:bL,LucideMousePointerSquareDashed:yd,LucideMove:DL,LucideMove3D:w1,LucideMove3d:w1,LucideMoveDiagonal:LL,LucideMoveDiagonal2:CL,LucideMoveDown:_L,LucideMoveDownLeft:IL,LucideMoveDownRight:AL,LucideMoveHorizontal:EL,LucideMoveLeft:kp,LucideMoveRight:PL,LucideMoveUp:jL,LucideMoveUpLeft:NL,LucideMoveUpRight:RL,LucideMoveVertical:TL,LucideMusic:FL,LucideMusic2:qL,LucideMusic3:zL,LucideMusic4:OL,LucideNavigation:UL,LucideNavigation2:HL,LucideNavigation2Off:BL,LucideNavigationOff:VL,LucideNetwork:$L,LucideNewspaper:WL,LucideNfc:GL,LucideNotebook:YL,LucideNotebookPen:KL,LucideNotebookTabs:ZL,LucideNotebookText:XL,LucideNotepadText:QL,LucideNotepadTextDashed:JL,LucideNut:tI,LucideNutOff:eI,LucideOctagon:rI,LucideOctagonAlert:b1,LucideOctagonMinus:nI,LucideOctagonPause:M1,LucideOctagonX:S1,LucideOmega:iI,LucideOption:aI,LucideOrbit:oI,LucideOrigami:sI,LucideOutdent:y1,LucidePackage:yI,LucidePackage2:cI,LucidePackageCheck:lI,LucidePackageMinus:uI,LucidePackageOpen:dI,LucidePackagePlus:hI,LucidePackageSearch:fI,LucidePackageX:pI,LucidePaintBucket:gI,LucidePaintRoller:mI,LucidePaintbrush:vI,LucidePaintbrush2:C1,LucidePaintbrushVertical:C1,LucidePalette:kI,LucidePalmtree:Gd,LucidePanelBottom:bI,LucidePanelBottomClose:xI,LucidePanelBottomDashed:L1,LucidePanelBottomInactive:L1,LucidePanelBottomOpen:wI,LucidePanelLeft:E1,LucidePanelLeftClose:I1,LucidePanelLeftDashed:A1,LucidePanelLeftInactive:A1,LucidePanelLeftOpen:_1,LucidePanelRight:CI,LucidePanelRightClose:MI,LucidePanelRightDashed:P1,LucidePanelRightInactive:P1,LucidePanelRightOpen:SI,LucidePanelTop:AI,LucidePanelTopClose:LI,LucidePanelTopDashed:N1,LucidePanelTopInactive:N1,LucidePanelTopOpen:II,LucidePanelsLeftBottom:_I,LucidePanelsLeftRight:Tc,LucidePanelsRightBottom:EI,LucidePanelsTopBottom:F1,LucidePanelsTopLeft:R1,LucidePaperclip:PI,LucideParentheses:NI,LucideParkingCircle:Pu,LucideParkingCircleOff:Eu,LucideParkingMeter:RI,LucideParkingSquare:Ad,LucideParkingSquareOff:Id,LucidePartyPopper:jI,LucidePause:TI,LucidePauseCircle:Nu,LucidePauseOctagon:M1,LucidePawPrint:DI,LucidePcCase:qI,LucidePen:T1,LucidePenBox:Ea,LucidePenLine:j1,LucidePenOff:zI,LucidePenSquare:Ea,LucidePenTool:OI,LucidePencil:HI,LucidePencilLine:xp,LucidePencilOff:FI,LucidePencilRuler:BI,LucidePentagon:VI,LucidePercent:UI,LucidePercentCircle:Ru,LucidePercentDiamond:Zu,LucidePercentSquare:_d,LucidePersonStanding:$I,LucidePhilippinePeso:WI,LucidePhone:QI,LucidePhoneCall:GI,LucidePhoneForwarded:KI,LucidePhoneIncoming:ZI,LucidePhoneMissed:XI,LucidePhoneOff:YI,LucidePhoneOutgoing:JI,LucidePi:eA,LucidePiSquare:Ed,LucidePiano:tA,LucidePickaxe:nA,LucidePictureInPicture:iA,LucidePictureInPicture2:rA,LucidePieChart:lu,LucidePiggyBank:aA,LucidePilcrow:cA,LucidePilcrowLeft:oA,LucidePilcrowRight:sA,LucidePilcrowSquare:Pd,LucidePill:uA,LucidePillBottle:lA,LucidePin:hA,LucidePinOff:dA,LucidePipette:fA,LucidePizza:pA,LucidePlane:mA,LucidePlaneLanding:yA,LucidePlaneTakeoff:gA,LucidePlay:wp,LucidePlayCircle:ju,LucidePlaySquare:Nd,LucidePlug:kA,LucidePlug2:vA,LucidePlugZap:D1,LucidePlugZap2:D1,LucidePlus:bp,LucidePlusCircle:Tu,LucidePlusSquare:Rd,LucidePocket:wA,LucidePocketKnife:xA,LucidePodcast:bA,LucidePointer:SA,LucidePointerOff:MA,LucidePopcorn:CA,LucidePopsicle:LA,LucidePoundSterling:IA,LucidePower:_A,LucidePowerCircle:Du,LucidePowerOff:AA,LucidePowerSquare:jd,LucidePresentation:EA,LucidePrinter:NA,LucidePrinterCheck:PA,LucideProjector:RA,LucideProportions:jA,LucidePuzzle:TA,LucidePyramid:DA,LucideQrCode:qA,LucideQuote:zA,LucideRabbit:OA,LucideRadar:FA,LucideRadiation:BA,LucideRadical:HA,LucideRadio:$A,LucideRadioReceiver:VA,LucideRadioTower:UA,LucideRadius:WA,LucideRailSymbol:GA,LucideRainbow:KA,LucideRat:ZA,LucideRatio:XA,LucideReceipt:a_,LucideReceiptCent:YA,LucideReceiptEuro:JA,LucideReceiptIndianRupee:QA,LucideReceiptJapaneseYen:e_,LucideReceiptPoundSterling:t_,LucideReceiptRussianRuble:n_,LucideReceiptSwissFranc:r_,LucideReceiptText:i_,LucideRectangleEllipsis:q1,LucideRectangleHorizontal:o_,LucideRectangleVertical:s_,LucideRecycle:c_,LucideRedo:d_,LucideRedo2:l_,LucideRedoDot:u_,LucideRefreshCcw:f_,LucideRefreshCcwDot:h_,LucideRefreshCw:Mp,LucideRefreshCwOff:p_,LucideRefrigerator:y_,LucideRegex:g_,LucideRemoveFormatting:m_,LucideRepeat:x_,LucideRepeat1:v_,LucideRepeat2:k_,LucideReplace:b_,LucideReplaceAll:w_,LucideReply:S_,LucideReplyAll:M_,LucideRewind:C_,LucideRibbon:L_,LucideRocket:I_,LucideRockingChair:A_,LucideRollerCoaster:__,LucideRotate3D:z1,LucideRotate3d:z1,LucideRotateCcw:P_,LucideRotateCcwSquare:E_,LucideRotateCw:R_,LucideRotateCwSquare:N_,LucideRoute:T_,LucideRouteOff:j_,LucideRouter:D_,LucideRows:O1,LucideRows2:O1,LucideRows3:F1,LucideRows4:q_,LucideRss:z_,LucideRuler:O_,LucideRussianRuble:F_,LucideSailboat:B_,LucideSalad:H_,LucideSandwich:V_,LucideSatellite:$_,LucideSatelliteDish:U_,LucideSave:K_,LucideSaveAll:W_,LucideSaveOff:G_,LucideScale:Z_,LucideScale3D:B1,LucideScale3d:B1,LucideScaling:X_,LucideScan:iE,LucideScanBarcode:Y_,LucideScanEye:J_,LucideScanFace:Q_,LucideScanLine:eE,LucideScanQrCode:tE,LucideScanSearch:nE,LucideScanText:rE,LucideScatterChart:uu,LucideSchool:aE,LucideSchool2:Xd,LucideScissors:sE,LucideScissorsLineDashed:oE,LucideScissorsSquare:Td,LucideScissorsSquareDashedBottom:od,LucideScreenShare:lE,LucideScreenShareOff:cE,LucideScroll:dE,LucideScrollText:uE,LucideSearch:Sp,LucideSearchCheck:hE,LucideSearchCode:fE,LucideSearchSlash:pE,LucideSearchX:yE,LucideSection:gE,LucideSend:vE,LucideSendHorizonal:H1,LucideSendHorizontal:H1,LucideSendToBack:mE,LucideSeparatorHorizontal:kE,LucideSeparatorVertical:xE,LucideServer:Cp,LucideServerCog:wE,LucideServerCrash:bE,LucideServerOff:ME,LucideSettings:CE,LucideSettings2:SE,LucideShapes:Lp,LucideShare:LE,LucideShare2:Ip,LucideSheet:IE,LucideShell:AE,LucideShield:zE,LucideShieldAlert:_E,LucideShieldBan:EE,LucideShieldCheck:PE,LucideShieldClose:V1,LucideShieldEllipsis:NE,LucideShieldHalf:RE,LucideShieldMinus:jE,LucideShieldOff:TE,LucideShieldPlus:DE,LucideShieldQuestion:qE,LucideShieldX:V1,LucideShip:FE,LucideShipWheel:OE,LucideShirt:BE,LucideShoppingBag:HE,LucideShoppingBasket:VE,LucideShoppingCart:UE,LucideShovel:$E,LucideShowerHead:WE,LucideShrink:GE,LucideShrub:KE,LucideShuffle:ZE,LucideSidebar:E1,LucideSidebarClose:I1,LucideSidebarOpen:_1,LucideSigma:XE,LucideSigmaSquare:Dd,LucideSignal:tP,LucideSignalHigh:YE,LucideSignalLow:JE,LucideSignalMedium:QE,LucideSignalZero:eP,LucideSignature:nP,LucideSignpost:iP,LucideSignpostBig:rP,LucideSiren:aP,LucideSkipBack:oP,LucideSkipForward:sP,LucideSkull:cP,LucideSlack:lP,LucideSlash:uP,LucideSlashSquare:qd,LucideSlice:dP,LucideSliders:U1,LucideSlidersHorizontal:hP,LucideSlidersVertical:U1,LucideSmartphone:yP,LucideSmartphoneCharging:fP,LucideSmartphoneNfc:pP,LucideSmile:mP,LucideSmilePlus:gP,LucideSnail:vP,LucideSnowflake:kP,LucideSofa:xP,LucideSortAsc:Vl,LucideSortDesc:Fl,LucideSoup:wP,LucideSpace:bP,LucideSpade:MP,LucideSparkle:SP,LucideSparkles:$1,LucideSpeaker:CP,LucideSpeech:LP,LucideSpellCheck:AP,LucideSpellCheck2:IP,LucideSpline:_P,LucideSplit:EP,LucideSplitSquareHorizontal:zd,LucideSplitSquareVertical:Od,LucideSprayCan:PP,LucideSprout:NP,LucideSquare:Ap,LucideSquareActivity:W1,LucideSquareArrowDown:Z1,LucideSquareArrowDownLeft:G1,LucideSquareArrowDownRight:K1,LucideSquareArrowLeft:X1,LucideSquareArrowOutDownLeft:Y1,LucideSquareArrowOutDownRight:J1,LucideSquareArrowOutUpLeft:Q1,LucideSquareArrowOutUpRight:ed,LucideSquareArrowRight:td,LucideSquareArrowUp:id,LucideSquareArrowUpLeft:nd,LucideSquareArrowUpRight:rd,LucideSquareAsterisk:ad,LucideSquareBottomDashedScissors:od,LucideSquareChartGantt:ts,LucideSquareCheck:cd,LucideSquareCheckBig:sd,LucideSquareChevronDown:ld,LucideSquareChevronLeft:ud,LucideSquareChevronRight:dd,LucideSquareChevronUp:hd,LucideSquareCode:fd,LucideSquareDashed:gd,LucideSquareDashedBottom:jP,LucideSquareDashedBottomCode:RP,LucideSquareDashedKanban:pd,LucideSquareDashedMousePointer:yd,LucideSquareDivide:md,LucideSquareDot:vd,LucideSquareEqual:kd,LucideSquareFunction:xd,LucideSquareGanttChart:ts,LucideSquareKanban:wd,LucideSquareLibrary:bd,LucideSquareM:Md,LucideSquareMenu:Sd,LucideSquareMinus:Cd,LucideSquareMousePointer:Ld,LucideSquareParking:Ad,LucideSquareParkingOff:Id,LucideSquarePen:Ea,LucideSquarePercent:_d,LucideSquarePi:Ed,LucideSquarePilcrow:Pd,LucideSquarePlay:Nd,LucideSquarePlus:Rd,LucideSquarePower:jd,LucideSquareRadical:TP,LucideSquareScissors:Td,LucideSquareSigma:Dd,LucideSquareSlash:qd,LucideSquareSplitHorizontal:zd,LucideSquareSplitVertical:Od,LucideSquareSquare:DP,LucideSquareStack:qP,LucideSquareTerminal:Fd,LucideSquareUser:Hd,LucideSquareUserRound:Bd,LucideSquareX:Vd,LucideSquircle:J2,LucideSquirrel:zP,LucideStamp:OP,LucideStar:HP,LucideStarHalf:FP,LucideStarOff:BP,LucideStars:$1,LucideStepBack:VP,LucideStepForward:UP,LucideStethoscope:$P,LucideSticker:Q2,LucideStickyNote:_p,LucideStopCircle:zu,LucideStore:WP,LucideStretchHorizontal:GP,LucideStretchVertical:KP,LucideStrikethrough:ZP,LucideSubscript:XP,LucideSubtitles:Yl,LucideSun:tN,LucideSunDim:YP,LucideSunMedium:JP,LucideSunMoon:QP,LucideSunSnow:eN,LucideSunrise:nN,LucideSunset:rN,LucideSuperscript:iN,LucideSwatchBook:aN,LucideSwissFranc:oN,LucideSwitchCamera:sN,LucideSword:cN,LucideSwords:lN,LucideSyringe:uN,LucideTable:vN,LucideTable2:dN,LucideTableCellsMerge:hN,LucideTableCellsSplit:fN,LucideTableColumnsSplit:pN,LucideTableOfContents:yN,LucideTableProperties:gN,LucideTableRowsSplit:mN,LucideTablet:xN,LucideTabletSmartphone:kN,LucideTablets:wN,LucideTag:bN,LucideTags:MN,LucideTally1:SN,LucideTally2:CN,LucideTally3:LN,LucideTally4:IN,LucideTally5:AN,LucideTangent:_N,LucideTarget:EN,LucideTelescope:PN,LucideTent:RN,LucideTentTree:NN,LucideTerminal:Ep,LucideTerminalSquare:Fd,LucideTestTube:jN,LucideTestTube2:Ud,LucideTestTubeDiagonal:Ud,LucideTestTubes:TN,LucideText:FN,LucideTextCursor:qN,LucideTextCursorInput:DN,LucideTextQuote:zN,LucideTextSearch:ON,LucideTextSelect:$d,LucideTextSelection:$d,LucideTheater:BN,LucideThermometer:UN,LucideThermometerSnowflake:HN,LucideThermometerSun:VN,LucideThumbsDown:$N,LucideThumbsUp:WN,LucideTicket:QN,LucideTicketCheck:GN,LucideTicketMinus:KN,LucideTicketPercent:ZN,LucideTicketPlus:XN,LucideTicketSlash:YN,LucideTicketX:JN,LucideTickets:tR,LucideTicketsPlane:eR,LucideTimer:iR,LucideTimerOff:nR,LucideTimerReset:rR,LucideToggleLeft:aR,LucideToggleRight:oR,LucideTornado:sR,LucideTorus:cR,LucideTouchpad:uR,LucideTouchpadOff:lR,LucideTowerControl:dR,LucideToyBrick:hR,LucideTractor:fR,LucideTrafficCone:pR,LucideTrain:Wd,LucideTrainFront:gR,LucideTrainFrontTunnel:yR,LucideTrainTrack:mR,LucideTramFront:Wd,LucideTrash:vR,LucideTrash2:Pp,LucideTreeDeciduous:kR,LucideTreePalm:Gd,LucideTreePine:xR,LucideTrees:wR,LucideTrello:bR,LucideTrendingDown:MR,LucideTrendingUp:CR,LucideTrendingUpDown:SR,LucideTriangle:IR,LucideTriangleAlert:Kd,LucideTriangleRight:LR,LucideTrophy:AR,LucideTruck:_R,LucideTurtle:ER,LucideTv:NR,LucideTv2:Zd,LucideTvMinimal:Zd,LucideTvMinimalPlay:PR,LucideTwitch:RR,LucideTwitter:jR,LucideType:ef,LucideTypeOutline:TR,LucideUmbrella:qR,LucideUmbrellaOff:DR,LucideUnderline:zR,LucideUndo:BR,LucideUndo2:OR,LucideUndoDot:FR,LucideUnfoldHorizontal:HR,LucideUnfoldVertical:VR,LucideUngroup:UR,LucideUniversity:Xd,LucideUnlink:WR,LucideUnlink2:$R,LucideUnlock:k1,LucideUnlockKeyhole:v1,LucideUnplug:GR,LucideUpload:Np,LucideUploadCloud:$u,LucideUsb:KR,LucideUser:Rp,LucideUser2:nh,LucideUserCheck:ZR,LucideUserCheck2:Yd,LucideUserCircle:Fu,LucideUserCircle2:Ou,LucideUserCog:XR,LucideUserCog2:Jd,LucideUserMinus:YR,LucideUserMinus2:Qd,LucideUserPen:JR,LucideUserPlus:QR,LucideUserPlus2:eh,LucideUserRound:nh,LucideUserRoundCheck:Yd,LucideUserRoundCog:Jd,LucideUserRoundMinus:Qd,LucideUserRoundPen:ej,LucideUserRoundPlus:eh,LucideUserRoundSearch:tj,LucideUserRoundX:th,LucideUserSearch:nj,LucideUserSquare:Hd,LucideUserSquare2:Bd,LucideUserX:rj,LucideUserX2:th,LucideUsers:ij,LucideUsers2:rh,LucideUsersRound:rh,LucideUtensils:ah,LucideUtensilsCrossed:ih,LucideUtilityPole:aj,LucideVariable:oj,LucideVault:sj,LucideVegan:cj,LucideVenetianMask:lj,LucideVerified:Wl,LucideVibrate:dj,LucideVibrateOff:uj,LucideVideo:fj,LucideVideoOff:hj,LucideVideotape:pj,LucideView:yj,LucideVoicemail:gj,LucideVolleyball:mj,LucideVolume:bj,LucideVolume1:vj,LucideVolume2:kj,LucideVolumeOff:xj,LucideVolumeX:wj,LucideVote:Mj,LucideWallet:Cj,LucideWallet2:oh,LucideWalletCards:Sj,LucideWalletMinimal:oh,LucideWallpaper:Lj,LucideWand:Ij,LucideWand2:sh,LucideWandSparkles:sh,LucideWarehouse:Aj,LucideWashingMachine:_j,LucideWatch:Ej,LucideWaves:Pj,LucideWaypoints:Nj,LucideWebcam:Rj,LucideWebhook:Tj,LucideWebhookOff:jj,LucideWeight:Dj,LucideWheat:zj,LucideWheatOff:qj,LucideWholeWord:Oj,LucideWifi:Uj,LucideWifiHigh:Fj,LucideWifiLow:Bj,LucideWifiOff:Hj,LucideWifiZero:Vj,LucideWind:$j,LucideWine:Gj,LucideWineOff:Wj,LucideWorkflow:jp,LucideWorm:Kj,LucideWrapText:Zj,LucideWrench:Xj,LucideX:tf,LucideXCircle:Bu,LucideXOctagon:S1,LucideXSquare:Vd,LucideYoutube:Yj,LucideZap:Qj,LucideZapOff:Jj,LucideZoomIn:eT,LucideZoomOut:tT,Luggage:qS,LuggageIcon:qS,MSquare:Md,MSquareIcon:Md,Magnet:zS,MagnetIcon:zS,Mail:GS,MailCheck:OS,MailCheckIcon:OS,MailIcon:GS,MailMinus:FS,MailMinusIcon:FS,MailOpen:BS,MailOpenIcon:BS,MailPlus:HS,MailPlusIcon:HS,MailQuestion:VS,MailQuestionIcon:VS,MailSearch:US,MailSearchIcon:US,MailWarning:$S,MailWarningIcon:$S,MailX:WS,MailXIcon:WS,Mailbox:KS,MailboxIcon:KS,Mails:ZS,MailsIcon:ZS,Map:cC,MapIcon:cC,MapPin:oC,MapPinCheck:YS,MapPinCheckIcon:YS,MapPinCheckInside:XS,MapPinCheckInsideIcon:XS,MapPinHouse:JS,MapPinHouseIcon:JS,MapPinIcon:oC,MapPinMinus:eC,MapPinMinusIcon:eC,MapPinMinusInside:QS,MapPinMinusInsideIcon:QS,MapPinOff:tC,MapPinOffIcon:tC,MapPinPlus:rC,MapPinPlusIcon:rC,MapPinPlusInside:nC,MapPinPlusInsideIcon:nC,MapPinX:aC,MapPinXIcon:aC,MapPinXInside:iC,MapPinXInsideIcon:iC,MapPinned:sC,MapPinnedIcon:sC,Martini:lC,MartiniIcon:lC,Maximize:uC,Maximize2:mp,Maximize2Icon:mp,MaximizeIcon:uC,Medal:dC,MedalIcon:dC,Megaphone:fC,MegaphoneIcon:fC,MegaphoneOff:hC,MegaphoneOffIcon:hC,Meh:pC,MehIcon:pC,MemoryStick:yC,MemoryStickIcon:yC,Menu:gC,MenuIcon:gC,MenuSquare:Sd,MenuSquareIcon:Sd,Merge:mC,MergeIcon:mC,MessageCircle:AC,MessageCircleCode:vC,MessageCircleCodeIcon:vC,MessageCircleDashed:kC,MessageCircleDashedIcon:kC,MessageCircleHeart:xC,MessageCircleHeartIcon:xC,MessageCircleIcon:AC,MessageCircleMore:wC,MessageCircleMoreIcon:wC,MessageCircleOff:bC,MessageCircleOffIcon:bC,MessageCirclePlus:MC,MessageCirclePlusIcon:MC,MessageCircleQuestion:SC,MessageCircleQuestionIcon:SC,MessageCircleReply:CC,MessageCircleReplyIcon:CC,MessageCircleWarning:LC,MessageCircleWarningIcon:LC,MessageCircleX:IC,MessageCircleXIcon:IC,MessageSquare:UC,MessageSquareCode:_C,MessageSquareCodeIcon:_C,MessageSquareDashed:EC,MessageSquareDashedIcon:EC,MessageSquareDiff:PC,MessageSquareDiffIcon:PC,MessageSquareDot:NC,MessageSquareDotIcon:NC,MessageSquareHeart:RC,MessageSquareHeartIcon:RC,MessageSquareIcon:UC,MessageSquareLock:jC,MessageSquareLockIcon:jC,MessageSquareMore:TC,MessageSquareMoreIcon:TC,MessageSquareOff:DC,MessageSquareOffIcon:DC,MessageSquarePlus:qC,MessageSquarePlusIcon:qC,MessageSquareQuote:zC,MessageSquareQuoteIcon:zC,MessageSquareReply:OC,MessageSquareReplyIcon:OC,MessageSquareShare:FC,MessageSquareShareIcon:FC,MessageSquareText:BC,MessageSquareTextIcon:BC,MessageSquareWarning:HC,MessageSquareWarningIcon:HC,MessageSquareX:VC,MessageSquareXIcon:VC,MessagesSquare:$C,MessagesSquareIcon:$C,Mic:GC,Mic2:x1,Mic2Icon:x1,MicIcon:GC,MicOff:WC,MicOffIcon:WC,MicVocal:x1,MicVocalIcon:x1,Microchip:KC,MicrochipIcon:KC,Microscope:ZC,MicroscopeIcon:ZC,Microwave:XC,MicrowaveIcon:XC,Milestone:YC,MilestoneIcon:YC,Milk:QC,MilkIcon:QC,MilkOff:JC,MilkOffIcon:JC,Minimize:tL,Minimize2:eL,Minimize2Icon:eL,MinimizeIcon:tL,Minus:vp,MinusCircle:_u,MinusCircleIcon:_u,MinusIcon:vp,MinusSquare:Cd,MinusSquareIcon:Cd,Monitor:pL,MonitorCheck:nL,MonitorCheckIcon:nL,MonitorCog:rL,MonitorCogIcon:rL,MonitorDot:iL,MonitorDotIcon:iL,MonitorDown:aL,MonitorDownIcon:aL,MonitorIcon:pL,MonitorOff:oL,MonitorOffIcon:oL,MonitorPause:sL,MonitorPauseIcon:sL,MonitorPlay:cL,MonitorPlayIcon:cL,MonitorSmartphone:lL,MonitorSmartphoneIcon:lL,MonitorSpeaker:uL,MonitorSpeakerIcon:uL,MonitorStop:dL,MonitorStopIcon:dL,MonitorUp:hL,MonitorUpIcon:hL,MonitorX:fL,MonitorXIcon:fL,Moon:gL,MoonIcon:gL,MoonStar:yL,MoonStarIcon:yL,MoreHorizontal:Ju,MoreHorizontalIcon:Ju,MoreVertical:Yu,MoreVerticalIcon:Yu,Mountain:vL,MountainIcon:vL,MountainSnow:mL,MountainSnowIcon:mL,Mouse:SL,MouseIcon:SL,MouseOff:kL,MouseOffIcon:kL,MousePointer:ML,MousePointer2:xL,MousePointer2Icon:xL,MousePointerBan:wL,MousePointerBanIcon:wL,MousePointerClick:bL,MousePointerClickIcon:bL,MousePointerIcon:ML,MousePointerSquareDashed:yd,MousePointerSquareDashedIcon:yd,Move:DL,Move3D:w1,Move3DIcon:w1,Move3d:w1,Move3dIcon:w1,MoveDiagonal:LL,MoveDiagonal2:CL,MoveDiagonal2Icon:CL,MoveDiagonalIcon:LL,MoveDown:_L,MoveDownIcon:_L,MoveDownLeft:IL,MoveDownLeftIcon:IL,MoveDownRight:AL,MoveDownRightIcon:AL,MoveHorizontal:EL,MoveHorizontalIcon:EL,MoveIcon:DL,MoveLeft:kp,MoveLeftIcon:kp,MoveRight:PL,MoveRightIcon:PL,MoveUp:jL,MoveUpIcon:jL,MoveUpLeft:NL,MoveUpLeftIcon:NL,MoveUpRight:RL,MoveUpRightIcon:RL,MoveVertical:TL,MoveVerticalIcon:TL,Music:FL,Music2:qL,Music2Icon:qL,Music3:zL,Music3Icon:zL,Music4:OL,Music4Icon:OL,MusicIcon:FL,Navigation:UL,Navigation2:HL,Navigation2Icon:HL,Navigation2Off:BL,Navigation2OffIcon:BL,NavigationIcon:UL,NavigationOff:VL,NavigationOffIcon:VL,Network:$L,NetworkIcon:$L,Newspaper:WL,NewspaperIcon:WL,Nfc:GL,NfcIcon:GL,Notebook:YL,NotebookIcon:YL,NotebookPen:KL,NotebookPenIcon:KL,NotebookTabs:ZL,NotebookTabsIcon:ZL,NotebookText:XL,NotebookTextIcon:XL,NotepadText:QL,NotepadTextDashed:JL,NotepadTextDashedIcon:JL,NotepadTextIcon:QL,Nut:tI,NutIcon:tI,NutOff:eI,NutOffIcon:eI,Octagon:rI,OctagonAlert:b1,OctagonAlertIcon:b1,OctagonIcon:rI,OctagonMinus:nI,OctagonMinusIcon:nI,OctagonPause:M1,OctagonPauseIcon:M1,OctagonX:S1,OctagonXIcon:S1,Omega:iI,OmegaIcon:iI,Option:aI,OptionIcon:aI,Orbit:oI,OrbitIcon:oI,Origami:sI,OrigamiIcon:sI,Outdent:y1,OutdentIcon:y1,Package:yI,Package2:cI,Package2Icon:cI,PackageCheck:lI,PackageCheckIcon:lI,PackageIcon:yI,PackageMinus:uI,PackageMinusIcon:uI,PackageOpen:dI,PackageOpenIcon:dI,PackagePlus:hI,PackagePlusIcon:hI,PackageSearch:fI,PackageSearchIcon:fI,PackageX:pI,PackageXIcon:pI,PaintBucket:gI,PaintBucketIcon:gI,PaintRoller:mI,PaintRollerIcon:mI,Paintbrush:vI,Paintbrush2:C1,Paintbrush2Icon:C1,PaintbrushIcon:vI,PaintbrushVertical:C1,PaintbrushVerticalIcon:C1,Palette:kI,PaletteIcon:kI,Palmtree:Gd,PalmtreeIcon:Gd,PanelBottom:bI,PanelBottomClose:xI,PanelBottomCloseIcon:xI,PanelBottomDashed:L1,PanelBottomDashedIcon:L1,PanelBottomIcon:bI,PanelBottomInactive:L1,PanelBottomInactiveIcon:L1,PanelBottomOpen:wI,PanelBottomOpenIcon:wI,PanelLeft:E1,PanelLeftClose:I1,PanelLeftCloseIcon:I1,PanelLeftDashed:A1,PanelLeftDashedIcon:A1,PanelLeftIcon:E1,PanelLeftInactive:A1,PanelLeftInactiveIcon:A1,PanelLeftOpen:_1,PanelLeftOpenIcon:_1,PanelRight:CI,PanelRightClose:MI,PanelRightCloseIcon:MI,PanelRightDashed:P1,PanelRightDashedIcon:P1,PanelRightIcon:CI,PanelRightInactive:P1,PanelRightInactiveIcon:P1,PanelRightOpen:SI,PanelRightOpenIcon:SI,PanelTop:AI,PanelTopClose:LI,PanelTopCloseIcon:LI,PanelTopDashed:N1,PanelTopDashedIcon:N1,PanelTopIcon:AI,PanelTopInactive:N1,PanelTopInactiveIcon:N1,PanelTopOpen:II,PanelTopOpenIcon:II,PanelsLeftBottom:_I,PanelsLeftBottomIcon:_I,PanelsLeftRight:Tc,PanelsLeftRightIcon:Tc,PanelsRightBottom:EI,PanelsRightBottomIcon:EI,PanelsTopBottom:F1,PanelsTopBottomIcon:F1,PanelsTopLeft:R1,PanelsTopLeftIcon:R1,Paperclip:PI,PaperclipIcon:PI,Parentheses:NI,ParenthesesIcon:NI,ParkingCircle:Pu,ParkingCircleIcon:Pu,ParkingCircleOff:Eu,ParkingCircleOffIcon:Eu,ParkingMeter:RI,ParkingMeterIcon:RI,ParkingSquare:Ad,ParkingSquareIcon:Ad,ParkingSquareOff:Id,ParkingSquareOffIcon:Id,PartyPopper:jI,PartyPopperIcon:jI,Pause:TI,PauseCircle:Nu,PauseCircleIcon:Nu,PauseIcon:TI,PauseOctagon:M1,PauseOctagonIcon:M1,PawPrint:DI,PawPrintIcon:DI,PcCase:qI,PcCaseIcon:qI,Pen:T1,PenBox:Ea,PenBoxIcon:Ea,PenIcon:T1,PenLine:j1,PenLineIcon:j1,PenOff:zI,PenOffIcon:zI,PenSquare:Ea,PenSquareIcon:Ea,PenTool:OI,PenToolIcon:OI,Pencil:HI,PencilIcon:HI,PencilLine:xp,PencilLineIcon:xp,PencilOff:FI,PencilOffIcon:FI,PencilRuler:BI,PencilRulerIcon:BI,Pentagon:VI,PentagonIcon:VI,Percent:UI,PercentCircle:Ru,PercentCircleIcon:Ru,PercentDiamond:Zu,PercentDiamondIcon:Zu,PercentIcon:UI,PercentSquare:_d,PercentSquareIcon:_d,PersonStanding:$I,PersonStandingIcon:$I,PhilippinePeso:WI,PhilippinePesoIcon:WI,Phone:QI,PhoneCall:GI,PhoneCallIcon:GI,PhoneForwarded:KI,PhoneForwardedIcon:KI,PhoneIcon:QI,PhoneIncoming:ZI,PhoneIncomingIcon:ZI,PhoneMissed:XI,PhoneMissedIcon:XI,PhoneOff:YI,PhoneOffIcon:YI,PhoneOutgoing:JI,PhoneOutgoingIcon:JI,Pi:eA,PiIcon:eA,PiSquare:Ed,PiSquareIcon:Ed,Piano:tA,PianoIcon:tA,Pickaxe:nA,PickaxeIcon:nA,PictureInPicture:iA,PictureInPicture2:rA,PictureInPicture2Icon:rA,PictureInPictureIcon:iA,PieChart:lu,PieChartIcon:lu,PiggyBank:aA,PiggyBankIcon:aA,Pilcrow:cA,PilcrowIcon:cA,PilcrowLeft:oA,PilcrowLeftIcon:oA,PilcrowRight:sA,PilcrowRightIcon:sA,PilcrowSquare:Pd,PilcrowSquareIcon:Pd,Pill:uA,PillBottle:lA,PillBottleIcon:lA,PillIcon:uA,Pin:hA,PinIcon:hA,PinOff:dA,PinOffIcon:dA,Pipette:fA,PipetteIcon:fA,Pizza:pA,PizzaIcon:pA,Plane:mA,PlaneIcon:mA,PlaneLanding:yA,PlaneLandingIcon:yA,PlaneTakeoff:gA,PlaneTakeoffIcon:gA,Play:wp,PlayCircle:ju,PlayCircleIcon:ju,PlayIcon:wp,PlaySquare:Nd,PlaySquareIcon:Nd,Plug:kA,Plug2:vA,Plug2Icon:vA,PlugIcon:kA,PlugZap:D1,PlugZap2:D1,PlugZap2Icon:D1,PlugZapIcon:D1,Plus:bp,PlusCircle:Tu,PlusCircleIcon:Tu,PlusIcon:bp,PlusSquare:Rd,PlusSquareIcon:Rd,Pocket:wA,PocketIcon:wA,PocketKnife:xA,PocketKnifeIcon:xA,Podcast:bA,PodcastIcon:bA,Pointer:SA,PointerIcon:SA,PointerOff:MA,PointerOffIcon:MA,Popcorn:CA,PopcornIcon:CA,Popsicle:LA,PopsicleIcon:LA,PoundSterling:IA,PoundSterlingIcon:IA,Power:_A,PowerCircle:Du,PowerCircleIcon:Du,PowerIcon:_A,PowerOff:AA,PowerOffIcon:AA,PowerSquare:jd,PowerSquareIcon:jd,Presentation:EA,PresentationIcon:EA,Printer:NA,PrinterCheck:PA,PrinterCheckIcon:PA,PrinterIcon:NA,Projector:RA,ProjectorIcon:RA,Proportions:jA,ProportionsIcon:jA,Puzzle:TA,PuzzleIcon:TA,Pyramid:DA,PyramidIcon:DA,QrCode:qA,QrCodeIcon:qA,Quote:zA,QuoteIcon:zA,Rabbit:OA,RabbitIcon:OA,Radar:FA,RadarIcon:FA,Radiation:BA,RadiationIcon:BA,Radical:HA,RadicalIcon:HA,Radio:$A,RadioIcon:$A,RadioReceiver:VA,RadioReceiverIcon:VA,RadioTower:UA,RadioTowerIcon:UA,Radius:WA,RadiusIcon:WA,RailSymbol:GA,RailSymbolIcon:GA,Rainbow:KA,RainbowIcon:KA,Rat:ZA,RatIcon:ZA,Ratio:XA,RatioIcon:XA,Receipt:a_,ReceiptCent:YA,ReceiptCentIcon:YA,ReceiptEuro:JA,ReceiptEuroIcon:JA,ReceiptIcon:a_,ReceiptIndianRupee:QA,ReceiptIndianRupeeIcon:QA,ReceiptJapaneseYen:e_,ReceiptJapaneseYenIcon:e_,ReceiptPoundSterling:t_,ReceiptPoundSterlingIcon:t_,ReceiptRussianRuble:n_,ReceiptRussianRubleIcon:n_,ReceiptSwissFranc:r_,ReceiptSwissFrancIcon:r_,ReceiptText:i_,ReceiptTextIcon:i_,RectangleEllipsis:q1,RectangleEllipsisIcon:q1,RectangleHorizontal:o_,RectangleHorizontalIcon:o_,RectangleVertical:s_,RectangleVerticalIcon:s_,Recycle:c_,RecycleIcon:c_,Redo:d_,Redo2:l_,Redo2Icon:l_,RedoDot:u_,RedoDotIcon:u_,RedoIcon:d_,RefreshCcw:f_,RefreshCcwDot:h_,RefreshCcwDotIcon:h_,RefreshCcwIcon:f_,RefreshCw:Mp,RefreshCwIcon:Mp,RefreshCwOff:p_,RefreshCwOffIcon:p_,Refrigerator:y_,RefrigeratorIcon:y_,Regex:g_,RegexIcon:g_,RemoveFormatting:m_,RemoveFormattingIcon:m_,Repeat:x_,Repeat1:v_,Repeat1Icon:v_,Repeat2:k_,Repeat2Icon:k_,RepeatIcon:x_,Replace:b_,ReplaceAll:w_,ReplaceAllIcon:w_,ReplaceIcon:b_,Reply:S_,ReplyAll:M_,ReplyAllIcon:M_,ReplyIcon:S_,Rewind:C_,RewindIcon:C_,Ribbon:L_,RibbonIcon:L_,Rocket:I_,RocketIcon:I_,RockingChair:A_,RockingChairIcon:A_,RollerCoaster:__,RollerCoasterIcon:__,Rotate3D:z1,Rotate3DIcon:z1,Rotate3d:z1,Rotate3dIcon:z1,RotateCcw:P_,RotateCcwIcon:P_,RotateCcwSquare:E_,RotateCcwSquareIcon:E_,RotateCw:R_,RotateCwIcon:R_,RotateCwSquare:N_,RotateCwSquareIcon:N_,Route:T_,RouteIcon:T_,RouteOff:j_,RouteOffIcon:j_,Router:D_,RouterIcon:D_,Rows:O1,Rows2:O1,Rows2Icon:O1,Rows3:F1,Rows3Icon:F1,Rows4:q_,Rows4Icon:q_,RowsIcon:O1,Rss:z_,RssIcon:z_,Ruler:O_,RulerIcon:O_,RussianRuble:F_,RussianRubleIcon:F_,Sailboat:B_,SailboatIcon:B_,Salad:H_,SaladIcon:H_,Sandwich:V_,SandwichIcon:V_,Satellite:$_,SatelliteDish:U_,SatelliteDishIcon:U_,SatelliteIcon:$_,Save:K_,SaveAll:W_,SaveAllIcon:W_,SaveIcon:K_,SaveOff:G_,SaveOffIcon:G_,Scale:Z_,Scale3D:B1,Scale3DIcon:B1,Scale3d:B1,Scale3dIcon:B1,ScaleIcon:Z_,Scaling:X_,ScalingIcon:X_,Scan:iE,ScanBarcode:Y_,ScanBarcodeIcon:Y_,ScanEye:J_,ScanEyeIcon:J_,ScanFace:Q_,ScanFaceIcon:Q_,ScanIcon:iE,ScanLine:eE,ScanLineIcon:eE,ScanQrCode:tE,ScanQrCodeIcon:tE,ScanSearch:nE,ScanSearchIcon:nE,ScanText:rE,ScanTextIcon:rE,ScatterChart:uu,ScatterChartIcon:uu,School:aE,School2:Xd,School2Icon:Xd,SchoolIcon:aE,Scissors:sE,ScissorsIcon:sE,ScissorsLineDashed:oE,ScissorsLineDashedIcon:oE,ScissorsSquare:Td,ScissorsSquareDashedBottom:od,ScissorsSquareDashedBottomIcon:od,ScissorsSquareIcon:Td,ScreenShare:lE,ScreenShareIcon:lE,ScreenShareOff:cE,ScreenShareOffIcon:cE,Scroll:dE,ScrollIcon:dE,ScrollText:uE,ScrollTextIcon:uE,Search:Sp,SearchCheck:hE,SearchCheckIcon:hE,SearchCode:fE,SearchCodeIcon:fE,SearchIcon:Sp,SearchSlash:pE,SearchSlashIcon:pE,SearchX:yE,SearchXIcon:yE,Section:gE,SectionIcon:gE,Send:vE,SendHorizonal:H1,SendHorizonalIcon:H1,SendHorizontal:H1,SendHorizontalIcon:H1,SendIcon:vE,SendToBack:mE,SendToBackIcon:mE,SeparatorHorizontal:kE,SeparatorHorizontalIcon:kE,SeparatorVertical:xE,SeparatorVerticalIcon:xE,Server:Cp,ServerCog:wE,ServerCogIcon:wE,ServerCrash:bE,ServerCrashIcon:bE,ServerIcon:Cp,ServerOff:ME,ServerOffIcon:ME,Settings:CE,Settings2:SE,Settings2Icon:SE,SettingsIcon:CE,Shapes:Lp,ShapesIcon:Lp,Share:LE,Share2:Ip,Share2Icon:Ip,ShareIcon:LE,Sheet:IE,SheetIcon:IE,Shell:AE,ShellIcon:AE,Shield:zE,ShieldAlert:_E,ShieldAlertIcon:_E,ShieldBan:EE,ShieldBanIcon:EE,ShieldCheck:PE,ShieldCheckIcon:PE,ShieldClose:V1,ShieldCloseIcon:V1,ShieldEllipsis:NE,ShieldEllipsisIcon:NE,ShieldHalf:RE,ShieldHalfIcon:RE,ShieldIcon:zE,ShieldMinus:jE,ShieldMinusIcon:jE,ShieldOff:TE,ShieldOffIcon:TE,ShieldPlus:DE,ShieldPlusIcon:DE,ShieldQuestion:qE,ShieldQuestionIcon:qE,ShieldX:V1,ShieldXIcon:V1,Ship:FE,ShipIcon:FE,ShipWheel:OE,ShipWheelIcon:OE,Shirt:BE,ShirtIcon:BE,ShoppingBag:HE,ShoppingBagIcon:HE,ShoppingBasket:VE,ShoppingBasketIcon:VE,ShoppingCart:UE,ShoppingCartIcon:UE,Shovel:$E,ShovelIcon:$E,ShowerHead:WE,ShowerHeadIcon:WE,Shrink:GE,ShrinkIcon:GE,Shrub:KE,ShrubIcon:KE,Shuffle:ZE,ShuffleIcon:ZE,Sidebar:E1,SidebarClose:I1,SidebarCloseIcon:I1,SidebarIcon:E1,SidebarOpen:_1,SidebarOpenIcon:_1,Sigma:XE,SigmaIcon:XE,SigmaSquare:Dd,SigmaSquareIcon:Dd,Signal:tP,SignalHigh:YE,SignalHighIcon:YE,SignalIcon:tP,SignalLow:JE,SignalLowIcon:JE,SignalMedium:QE,SignalMediumIcon:QE,SignalZero:eP,SignalZeroIcon:eP,Signature:nP,SignatureIcon:nP,Signpost:iP,SignpostBig:rP,SignpostBigIcon:rP,SignpostIcon:iP,Siren:aP,SirenIcon:aP,SkipBack:oP,SkipBackIcon:oP,SkipForward:sP,SkipForwardIcon:sP,Skull:cP,SkullIcon:cP,Slack:lP,SlackIcon:lP,Slash:uP,SlashIcon:uP,SlashSquare:qd,SlashSquareIcon:qd,Slice:dP,SliceIcon:dP,Sliders:U1,SlidersHorizontal:hP,SlidersHorizontalIcon:hP,SlidersIcon:U1,SlidersVertical:U1,SlidersVerticalIcon:U1,Smartphone:yP,SmartphoneCharging:fP,SmartphoneChargingIcon:fP,SmartphoneIcon:yP,SmartphoneNfc:pP,SmartphoneNfcIcon:pP,Smile:mP,SmileIcon:mP,SmilePlus:gP,SmilePlusIcon:gP,Snail:vP,SnailIcon:vP,Snowflake:kP,SnowflakeIcon:kP,Sofa:xP,SofaIcon:xP,SortAsc:Vl,SortAscIcon:Vl,SortDesc:Fl,SortDescIcon:Fl,Soup:wP,SoupIcon:wP,Space:bP,SpaceIcon:bP,Spade:MP,SpadeIcon:MP,Sparkle:SP,SparkleIcon:SP,Sparkles:$1,SparklesIcon:$1,Speaker:CP,SpeakerIcon:CP,Speech:LP,SpeechIcon:LP,SpellCheck:AP,SpellCheck2:IP,SpellCheck2Icon:IP,SpellCheckIcon:AP,Spline:_P,SplineIcon:_P,Split:EP,SplitIcon:EP,SplitSquareHorizontal:zd,SplitSquareHorizontalIcon:zd,SplitSquareVertical:Od,SplitSquareVerticalIcon:Od,SprayCan:PP,SprayCanIcon:PP,Sprout:NP,SproutIcon:NP,Square:Ap,SquareActivity:W1,SquareActivityIcon:W1,SquareArrowDown:Z1,SquareArrowDownIcon:Z1,SquareArrowDownLeft:G1,SquareArrowDownLeftIcon:G1,SquareArrowDownRight:K1,SquareArrowDownRightIcon:K1,SquareArrowLeft:X1,SquareArrowLeftIcon:X1,SquareArrowOutDownLeft:Y1,SquareArrowOutDownLeftIcon:Y1,SquareArrowOutDownRight:J1,SquareArrowOutDownRightIcon:J1,SquareArrowOutUpLeft:Q1,SquareArrowOutUpLeftIcon:Q1,SquareArrowOutUpRight:ed,SquareArrowOutUpRightIcon:ed,SquareArrowRight:td,SquareArrowRightIcon:td,SquareArrowUp:id,SquareArrowUpIcon:id,SquareArrowUpLeft:nd,SquareArrowUpLeftIcon:nd,SquareArrowUpRight:rd,SquareArrowUpRightIcon:rd,SquareAsterisk:ad,SquareAsteriskIcon:ad,SquareBottomDashedScissors:od,SquareBottomDashedScissorsIcon:od,SquareChartGantt:ts,SquareChartGanttIcon:ts,SquareCheck:cd,SquareCheckBig:sd,SquareCheckBigIcon:sd,SquareCheckIcon:cd,SquareChevronDown:ld,SquareChevronDownIcon:ld,SquareChevronLeft:ud,SquareChevronLeftIcon:ud,SquareChevronRight:dd,SquareChevronRightIcon:dd,SquareChevronUp:hd,SquareChevronUpIcon:hd,SquareCode:fd,SquareCodeIcon:fd,SquareDashed:gd,SquareDashedBottom:jP,SquareDashedBottomCode:RP,SquareDashedBottomCodeIcon:RP,SquareDashedBottomIcon:jP,SquareDashedIcon:gd,SquareDashedKanban:pd,SquareDashedKanbanIcon:pd,SquareDashedMousePointer:yd,SquareDashedMousePointerIcon:yd,SquareDivide:md,SquareDivideIcon:md,SquareDot:vd,SquareDotIcon:vd,SquareEqual:kd,SquareEqualIcon:kd,SquareFunction:xd,SquareFunctionIcon:xd,SquareGanttChart:ts,SquareGanttChartIcon:ts,SquareIcon:Ap,SquareKanban:wd,SquareKanbanIcon:wd,SquareLibrary:bd,SquareLibraryIcon:bd,SquareM:Md,SquareMIcon:Md,SquareMenu:Sd,SquareMenuIcon:Sd,SquareMinus:Cd,SquareMinusIcon:Cd,SquareMousePointer:Ld,SquareMousePointerIcon:Ld,SquareParking:Ad,SquareParkingIcon:Ad,SquareParkingOff:Id,SquareParkingOffIcon:Id,SquarePen:Ea,SquarePenIcon:Ea,SquarePercent:_d,SquarePercentIcon:_d,SquarePi:Ed,SquarePiIcon:Ed,SquarePilcrow:Pd,SquarePilcrowIcon:Pd,SquarePlay:Nd,SquarePlayIcon:Nd,SquarePlus:Rd,SquarePlusIcon:Rd,SquarePower:jd,SquarePowerIcon:jd,SquareRadical:TP,SquareRadicalIcon:TP,SquareScissors:Td,SquareScissorsIcon:Td,SquareSigma:Dd,SquareSigmaIcon:Dd,SquareSlash:qd,SquareSlashIcon:qd,SquareSplitHorizontal:zd,SquareSplitHorizontalIcon:zd,SquareSplitVertical:Od,SquareSplitVerticalIcon:Od,SquareSquare:DP,SquareSquareIcon:DP,SquareStack:qP,SquareStackIcon:qP,SquareTerminal:Fd,SquareTerminalIcon:Fd,SquareUser:Hd,SquareUserIcon:Hd,SquareUserRound:Bd,SquareUserRoundIcon:Bd,SquareX:Vd,SquareXIcon:Vd,Squircle:J2,SquircleIcon:J2,Squirrel:zP,SquirrelIcon:zP,Stamp:OP,StampIcon:OP,Star:HP,StarHalf:FP,StarHalfIcon:FP,StarIcon:HP,StarOff:BP,StarOffIcon:BP,Stars:$1,StarsIcon:$1,StepBack:VP,StepBackIcon:VP,StepForward:UP,StepForwardIcon:UP,Stethoscope:$P,StethoscopeIcon:$P,Sticker:Q2,StickerIcon:Q2,StickyNote:_p,StickyNoteIcon:_p,StopCircle:zu,StopCircleIcon:zu,Store:WP,StoreIcon:WP,StretchHorizontal:GP,StretchHorizontalIcon:GP,StretchVertical:KP,StretchVerticalIcon:KP,Strikethrough:ZP,StrikethroughIcon:ZP,Subscript:XP,SubscriptIcon:XP,Subtitles:Yl,SubtitlesIcon:Yl,Sun:tN,SunDim:YP,SunDimIcon:YP,SunIcon:tN,SunMedium:JP,SunMediumIcon:JP,SunMoon:QP,SunMoonIcon:QP,SunSnow:eN,SunSnowIcon:eN,Sunrise:nN,SunriseIcon:nN,Sunset:rN,SunsetIcon:rN,Superscript:iN,SuperscriptIcon:iN,SwatchBook:aN,SwatchBookIcon:aN,SwissFranc:oN,SwissFrancIcon:oN,SwitchCamera:sN,SwitchCameraIcon:sN,Sword:cN,SwordIcon:cN,Swords:lN,SwordsIcon:lN,Syringe:uN,SyringeIcon:uN,Table:vN,Table2:dN,Table2Icon:dN,TableCellsMerge:hN,TableCellsMergeIcon:hN,TableCellsSplit:fN,TableCellsSplitIcon:fN,TableColumnsSplit:pN,TableColumnsSplitIcon:pN,TableIcon:vN,TableOfContents:yN,TableOfContentsIcon:yN,TableProperties:gN,TablePropertiesIcon:gN,TableRowsSplit:mN,TableRowsSplitIcon:mN,Tablet:xN,TabletIcon:xN,TabletSmartphone:kN,TabletSmartphoneIcon:kN,Tablets:wN,TabletsIcon:wN,Tag:bN,TagIcon:bN,Tags:MN,TagsIcon:MN,Tally1:SN,Tally1Icon:SN,Tally2:CN,Tally2Icon:CN,Tally3:LN,Tally3Icon:LN,Tally4:IN,Tally4Icon:IN,Tally5:AN,Tally5Icon:AN,Tangent:_N,TangentIcon:_N,Target:EN,TargetIcon:EN,Telescope:PN,TelescopeIcon:PN,Tent:RN,TentIcon:RN,TentTree:NN,TentTreeIcon:NN,Terminal:Ep,TerminalIcon:Ep,TerminalSquare:Fd,TerminalSquareIcon:Fd,TestTube:jN,TestTube2:Ud,TestTube2Icon:Ud,TestTubeDiagonal:Ud,TestTubeDiagonalIcon:Ud,TestTubeIcon:jN,TestTubes:TN,TestTubesIcon:TN,Text:FN,TextCursor:qN,TextCursorIcon:qN,TextCursorInput:DN,TextCursorInputIcon:DN,TextIcon:FN,TextQuote:zN,TextQuoteIcon:zN,TextSearch:ON,TextSearchIcon:ON,TextSelect:$d,TextSelectIcon:$d,TextSelection:$d,TextSelectionIcon:$d,Theater:BN,TheaterIcon:BN,Thermometer:UN,ThermometerIcon:UN,ThermometerSnowflake:HN,ThermometerSnowflakeIcon:HN,ThermometerSun:VN,ThermometerSunIcon:VN,ThumbsDown:$N,ThumbsDownIcon:$N,ThumbsUp:WN,ThumbsUpIcon:WN,Ticket:QN,TicketCheck:GN,TicketCheckIcon:GN,TicketIcon:QN,TicketMinus:KN,TicketMinusIcon:KN,TicketPercent:ZN,TicketPercentIcon:ZN,TicketPlus:XN,TicketPlusIcon:XN,TicketSlash:YN,TicketSlashIcon:YN,TicketX:JN,TicketXIcon:JN,Tickets:tR,TicketsIcon:tR,TicketsPlane:eR,TicketsPlaneIcon:eR,Timer:iR,TimerIcon:iR,TimerOff:nR,TimerOffIcon:nR,TimerReset:rR,TimerResetIcon:rR,ToggleLeft:aR,ToggleLeftIcon:aR,ToggleRight:oR,ToggleRightIcon:oR,Tornado:sR,TornadoIcon:sR,Torus:cR,TorusIcon:cR,Touchpad:uR,TouchpadIcon:uR,TouchpadOff:lR,TouchpadOffIcon:lR,TowerControl:dR,TowerControlIcon:dR,ToyBrick:hR,ToyBrickIcon:hR,Tractor:fR,TractorIcon:fR,TrafficCone:pR,TrafficConeIcon:pR,Train:Wd,TrainFront:gR,TrainFrontIcon:gR,TrainFrontTunnel:yR,TrainFrontTunnelIcon:yR,TrainIcon:Wd,TrainTrack:mR,TrainTrackIcon:mR,TramFront:Wd,TramFrontIcon:Wd,Trash:vR,Trash2:Pp,Trash2Icon:Pp,TrashIcon:vR,TreeDeciduous:kR,TreeDeciduousIcon:kR,TreePalm:Gd,TreePalmIcon:Gd,TreePine:xR,TreePineIcon:xR,Trees:wR,TreesIcon:wR,Trello:bR,TrelloIcon:bR,TrendingDown:MR,TrendingDownIcon:MR,TrendingUp:CR,TrendingUpDown:SR,TrendingUpDownIcon:SR,TrendingUpIcon:CR,Triangle:IR,TriangleAlert:Kd,TriangleAlertIcon:Kd,TriangleIcon:IR,TriangleRight:LR,TriangleRightIcon:LR,Trophy:AR,TrophyIcon:AR,Truck:_R,TruckIcon:_R,Turtle:ER,TurtleIcon:ER,Tv:NR,Tv2:Zd,Tv2Icon:Zd,TvIcon:NR,TvMinimal:Zd,TvMinimalIcon:Zd,TvMinimalPlay:PR,TvMinimalPlayIcon:PR,Twitch:RR,TwitchIcon:RR,Twitter:jR,TwitterIcon:jR,Type:ef,TypeIcon:ef,TypeOutline:TR,TypeOutlineIcon:TR,Umbrella:qR,UmbrellaIcon:qR,UmbrellaOff:DR,UmbrellaOffIcon:DR,Underline:zR,UnderlineIcon:zR,Undo:BR,Undo2:OR,Undo2Icon:OR,UndoDot:FR,UndoDotIcon:FR,UndoIcon:BR,UnfoldHorizontal:HR,UnfoldHorizontalIcon:HR,UnfoldVertical:VR,UnfoldVerticalIcon:VR,Ungroup:UR,UngroupIcon:UR,University:Xd,UniversityIcon:Xd,Unlink:WR,Unlink2:$R,Unlink2Icon:$R,UnlinkIcon:WR,Unlock:k1,UnlockIcon:k1,UnlockKeyhole:v1,UnlockKeyholeIcon:v1,Unplug:GR,UnplugIcon:GR,Upload:Np,UploadCloud:$u,UploadCloudIcon:$u,UploadIcon:Np,Usb:KR,UsbIcon:KR,User:Rp,User2:nh,User2Icon:nh,UserCheck:ZR,UserCheck2:Yd,UserCheck2Icon:Yd,UserCheckIcon:ZR,UserCircle:Fu,UserCircle2:Ou,UserCircle2Icon:Ou,UserCircleIcon:Fu,UserCog:XR,UserCog2:Jd,UserCog2Icon:Jd,UserCogIcon:XR,UserIcon:Rp,UserMinus:YR,UserMinus2:Qd,UserMinus2Icon:Qd,UserMinusIcon:YR,UserPen:JR,UserPenIcon:JR,UserPlus:QR,UserPlus2:eh,UserPlus2Icon:eh,UserPlusIcon:QR,UserRound:nh,UserRoundCheck:Yd,UserRoundCheckIcon:Yd,UserRoundCog:Jd,UserRoundCogIcon:Jd,UserRoundIcon:nh,UserRoundMinus:Qd,UserRoundMinusIcon:Qd,UserRoundPen:ej,UserRoundPenIcon:ej,UserRoundPlus:eh,UserRoundPlusIcon:eh,UserRoundSearch:tj,UserRoundSearchIcon:tj,UserRoundX:th,UserRoundXIcon:th,UserSearch:nj,UserSearchIcon:nj,UserSquare:Hd,UserSquare2:Bd,UserSquare2Icon:Bd,UserSquareIcon:Hd,UserX:rj,UserX2:th,UserX2Icon:th,UserXIcon:rj,Users:ij,Users2:rh,Users2Icon:rh,UsersIcon:ij,UsersRound:rh,UsersRoundIcon:rh,Utensils:ah,UtensilsCrossed:ih,UtensilsCrossedIcon:ih,UtensilsIcon:ah,UtilityPole:aj,UtilityPoleIcon:aj,Variable:oj,VariableIcon:oj,Vault:sj,VaultIcon:sj,Vegan:cj,VeganIcon:cj,VenetianMask:lj,VenetianMaskIcon:lj,Verified:Wl,VerifiedIcon:Wl,Vibrate:dj,VibrateIcon:dj,VibrateOff:uj,VibrateOffIcon:uj,Video:fj,VideoIcon:fj,VideoOff:hj,VideoOffIcon:hj,Videotape:pj,VideotapeIcon:pj,View:yj,ViewIcon:yj,Voicemail:gj,VoicemailIcon:gj,Volleyball:mj,VolleyballIcon:mj,Volume:bj,Volume1:vj,Volume1Icon:vj,Volume2:kj,Volume2Icon:kj,VolumeIcon:bj,VolumeOff:xj,VolumeOffIcon:xj,VolumeX:wj,VolumeXIcon:wj,Vote:Mj,VoteIcon:Mj,Wallet:Cj,Wallet2:oh,Wallet2Icon:oh,WalletCards:Sj,WalletCardsIcon:Sj,WalletIcon:Cj,WalletMinimal:oh,WalletMinimalIcon:oh,Wallpaper:Lj,WallpaperIcon:Lj,Wand:Ij,Wand2:sh,Wand2Icon:sh,WandIcon:Ij,WandSparkles:sh,WandSparklesIcon:sh,Warehouse:Aj,WarehouseIcon:Aj,WashingMachine:_j,WashingMachineIcon:_j,Watch:Ej,WatchIcon:Ej,Waves:Pj,WavesIcon:Pj,Waypoints:Nj,WaypointsIcon:Nj,Webcam:Rj,WebcamIcon:Rj,Webhook:Tj,WebhookIcon:Tj,WebhookOff:jj,WebhookOffIcon:jj,Weight:Dj,WeightIcon:Dj,Wheat:zj,WheatIcon:zj,WheatOff:qj,WheatOffIcon:qj,WholeWord:Oj,WholeWordIcon:Oj,Wifi:Uj,WifiHigh:Fj,WifiHighIcon:Fj,WifiIcon:Uj,WifiLow:Bj,WifiLowIcon:Bj,WifiOff:Hj,WifiOffIcon:Hj,WifiZero:Vj,WifiZeroIcon:Vj,Wind:$j,WindIcon:$j,Wine:Gj,WineIcon:Gj,WineOff:Wj,WineOffIcon:Wj,Workflow:jp,WorkflowIcon:jp,Worm:Kj,WormIcon:Kj,WrapText:Zj,WrapTextIcon:Zj,Wrench:Xj,WrenchIcon:Xj,X:tf,XCircle:Bu,XCircleIcon:Bu,XIcon:tf,XOctagon:S1,XOctagonIcon:S1,XSquare:Vd,XSquareIcon:Vd,Youtube:Yj,YoutubeIcon:Yj,Zap:Qj,ZapIcon:Qj,ZapOff:Jj,ZapOffIcon:Jj,ZoomIn:eT,ZoomInIcon:eT,ZoomOut:tT,ZoomOutIcon:tT,createLucideIcon:p,icons:B4e},Symbol.toStringTag,{value:"Module"})),hK=$D,V4e=WD,Bue=M.forwardRef(({className:e,...t},n)=>x.jsx(Ry,{ref:n,className:Ze("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));Bue.displayName=Ry.displayName;const ZD=M.forwardRef(({className:e,children:t,...n},r)=>x.jsxs(V4e,{children:[x.jsx(Bue,{}),x.jsxs(Ff,{ref:r,className:Ze("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-border bg-card p-6 shadow-lg duration-200 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...n,children:[t,x.jsxs(zue,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[x.jsx(tf,{className:"h-4 w-4"}),x.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));ZD.displayName=Ff.displayName;const XD=({className:e,...t})=>x.jsx("div",{className:Ze("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});XD.displayName="DialogHeader";const sy=({className:e,...t})=>x.jsx("div",{className:Ze("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});sy.displayName="DialogFooter";const YD=M.forwardRef(({className:e,...t},n)=>x.jsx(GD,{ref:n,className:Ze("text-lg font-semibold leading-none tracking-tight",e),...t}));YD.displayName=GD.displayName;const JD=M.forwardRef(({className:e,...t},n)=>x.jsx(KD,{ref:n,className:Ze("text-sm text-muted-foreground",e),...t}));JD.displayName=KD.displayName;const U4e=async()=>{const e=await fetch("/api/demos");if(!e.ok)throw new Error(`GET /api/demos failed: ${e.status}`);return await e.json()},Hue=async e=>{const t=await fetch(`/api/demos/${e}`);if(!t.ok)throw new Error(`GET /api/demos/${e} failed: ${t.status}`);return await t.json()},Ts=async(e,t,n)=>{const r=await fetch(`/api/demos/${e}/nodes/${t}/position`,{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify(n)});if(!r.ok){let i=null;try{i=await r.json()}catch{}throw new Error((i==null?void 0:i.error)??`PATCH /api/demos/${e}/nodes/${t}/position → ${r.status}`)}return await r.json()},_n=async(e,t,n)=>{const r=await fetch(`/api/demos/${e}/nodes/${t}`,{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify(n)});if(!r.ok){let i=null;try{i=await r.json()}catch{}throw new Error((i==null?void 0:i.error)??`PATCH /api/demos/${e}/nodes/${t} → ${r.status}`)}return await r.json()},Ui=async(e,t,n)=>{const r=await fetch(`/api/demos/${e}/connectors/${t}`,{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify(n)});if(!r.ok){let i=null;try{i=await r.json()}catch{}throw new Error((i==null?void 0:i.error)??`PATCH /api/demos/${e}/connectors/${t} → ${r.status}`)}return await r.json()},Ia=async(e,t)=>{const n=await fetch(`/api/demos/${e}/nodes`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(t)});if(!n.ok){let r=null;try{r=await n.json()}catch{}throw new Error((r==null?void 0:r.error)??`POST /api/demos/${e}/nodes → ${n.status}`)}return await n.json()},Ds=async(e,t)=>{const n=await fetch(`/api/demos/${e}/connectors`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(t)});if(!n.ok){let r=null;try{r=await n.json()}catch{}throw new Error((r==null?void 0:r.error)??`POST /api/demos/${e}/connectors → ${n.status}`)}return await n.json()},Jz=async(e,t,n)=>{const r=await fetch(`/api/demos/${e}/nodes/${t}/order`,{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify(n)});if(!r.ok){let i=null;try{i=await r.json()}catch{}throw new Error((i==null?void 0:i.error)??`PATCH /api/demos/${e}/nodes/${t}/order → ${r.status}`)}return await r.json()},Yo=async(e,t)=>{const n=await fetch(`/api/demos/${e}/nodes/${t}`,{method:"DELETE"});if(!n.ok){let r=null;try{r=await n.json()}catch{}throw new Error((r==null?void 0:r.error)??`DELETE /api/demos/${e}/nodes/${t} → ${n.status}`)}return await n.json()},Pl=async(e,t)=>{const n=await fetch(`/api/demos/${e}/connectors/${t}`,{method:"DELETE"});if(!n.ok){let r=null;try{r=await n.json()}catch{}throw new Error((r==null?void 0:r.error)??`DELETE /api/demos/${e}/connectors/${t} → ${n.status}`)}return await n.json()},$4e=async e=>{const t=await fetch(`/api/demos/${encodeURIComponent(e)}`,{method:"DELETE"});if(!t.ok){let n=null;try{n=await t.json()}catch{}throw new Error((n==null?void 0:n.error)??`DELETE /api/demos/${e} → ${t.status}`)}return await t.json()},W4e=async e=>{const t=await fetch("/api/projects",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(e)});if(!t.ok){let n=null;try{n=await t.json()}catch{}throw new Error((n==null?void 0:n.error)??`POST /api/projects → ${t.status}`)}return await t.json()},G4e=async e=>{const t=await fetch(`/api/demos/${e}/reset`,{method:"POST",headers:{"content-type":"application/json"},body:"{}"});if(!t.ok){let n=null;try{n=await t.json()}catch{}throw new Error((n==null?void 0:n.error)??`POST /api/demos/${e}/reset → ${t.status}`)}return await t.json()},Vue=async(e,t,n)=>{const r=await fetch(`/api/projects/${encodeURIComponent(e)}/files/${t}`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({path:n})});let i=null;try{i=await r.json()}catch{}if(r.ok)return{ok:(i==null?void 0:i.ok)===!0,absPath:typeof(i==null?void 0:i.absPath)=="string"?i.absPath:"",error:typeof(i==null?void 0:i.error)=="string"?i.error:void 0};if(r.status===404&&typeof(i==null?void 0:i.absPath)=="string")return{ok:!1,absPath:i.absPath,error:typeof(i==null?void 0:i.error)=="string"?i.error:"file not found"};const a=typeof(i==null?void 0:i.error)=="string"?i.error:void 0;throw new Error(a??`POST /api/projects/${e}/files/${t} → ${r.status}`)},K4e=async(e,t)=>Vue(e,"open",t),Z4e=async(e,t)=>Vue(e,"reveal",t),X4e=async(e,t,n)=>{const r=new FormData;r.append("file",t),r.append("filename",n);const i=await fetch(`/api/projects/${encodeURIComponent(e)}/files/upload`,{method:"POST",body:r});if(!i.ok){let a=null;try{a=await i.json()}catch{}throw new Error((a==null?void 0:a.error)??`POST /api/projects/${e}/files/upload → ${i.status}`)}return await i.json()},Y4e=async(e,t)=>{const n=await fetch(`/api/demos/${e}/play/${t}`,{method:"POST",headers:{"content-type":"application/json"},body:"{}"});if(!n.ok){let r=null;try{r=await n.json()}catch{}throw new Error((r==null?void 0:r.error)??`POST /api/demos/${e}/play/${t} → ${n.status}`)}return await n.json()};function J4e({open:e,onOpenChange:t,onCreated:n}){const[r,i]=M.useState(""),[a,o]=M.useState(null),[s,c]=M.useState(!1);M.useEffect(()=>{e&&(i(""),o(null),c(!1))},[e]);const l=r.trim(),u=l.length>0&&!s,d=async f=>{if(f.preventDefault(),!!u){c(!0),o(null);try{const h=await W4e({name:l});n(h),t(!1)}catch(h){o(h instanceof Error?h.message:String(h)),c(!1)}}};return x.jsx(hK,{open:e,onOpenChange:t,children:x.jsxs(ZD,{className:"sm:max-w-md","data-testid":"create-project-dialog",onOpenAutoFocus:f=>{f.preventDefault();const h=document.querySelector('[data-testid="create-project-name-input"]');h==null||h.focus()},children:[x.jsxs(XD,{children:[x.jsx(YD,{children:"Create new project"}),x.jsxs(JD,{children:["The project will be created at ",x.jsx("code",{children:"~/.seeflow/<slug>"}),"."]})]}),x.jsxs("form",{onSubmit:d,className:"flex flex-col gap-4",children:[x.jsxs("label",{className:"flex flex-col gap-1.5 text-sm",children:[x.jsx("span",{className:"font-medium",children:"Project name"}),x.jsx("input",{type:"text",required:!0,autoComplete:"off",spellCheck:!1,value:r,onChange:f=>i(f.target.value),"data-testid":"create-project-name-input",className:"rounded-md border bg-background px-3 py-2 text-sm outline-none ring-offset-background focus:border-ring focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2"})]}),a?x.jsx("div",{role:"alert","data-testid":"create-project-error",className:"rounded-md border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive",children:a}):null,x.jsxs(sy,{children:[x.jsx(oi,{type:"button",variant:"ghost",onClick:()=>t(!1),disabled:s,children:"Cancel"}),x.jsx(oi,{type:"submit",disabled:!u,"data-testid":"create-project-submit",children:s?"Creating…":"Create project"})]})]})]})})}var aJ=1,Q4e=.9,e3e=.8,t3e=.17,Qz=.1,eO=.999,n3e=.9999,r3e=.99,i3e=/[\\\/_+.#"@\[\(\{&]/,a3e=/[\\\/_+.#"@\[\(\{&]/g,o3e=/[\s-]/,Uue=/[\s-]/g;function J$(e,t,n,r,i,a,o){if(a===t.length)return i===e.length?aJ:r3e;var s=`${i},${a}`;if(o[s]!==void 0)return o[s];for(var c=r.charAt(a),l=n.indexOf(c,i),u=0,d,f,h,y;l>=0;)d=J$(e,t,n,r,l+1,a+1,o),d>u&&(l===i?d*=aJ:i3e.test(e.charAt(l-1))?(d*=e3e,h=e.slice(i,l-1).match(a3e),h&&i>0&&(d*=Math.pow(eO,h.length))):o3e.test(e.charAt(l-1))?(d*=Q4e,y=e.slice(i,l-1).match(Uue),y&&i>0&&(d*=Math.pow(eO,y.length))):(d*=t3e,i>0&&(d*=Math.pow(eO,l-i))),e.charAt(l)!==t.charAt(a)&&(d*=n3e)),(d<Qz&&n.charAt(l-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(l-1)!==r.charAt(a))&&(f=J$(e,t,n,r,l+1,a+2,o),f*Qz>d&&(d=f*Qz)),d>u&&(u=d),l=n.indexOf(c,l+1);return o[s]=u,u}function oJ(e){return e.toLowerCase().replace(Uue," ")}function s3e(e,t,n){return e=n&&n.length>0?`${e+" "+n.join(" ")}`:e,J$(e,t,oJ(e),oJ(t),0,0,{})}var I0='[cmdk-group=""]',tO='[cmdk-group-items=""]',c3e='[cmdk-group-heading=""]',$ue='[cmdk-item=""]',sJ=`${$ue}:not([aria-disabled="true"])`,Q$="cmdk-item-select",x2="data-value",l3e=(e,t,n)=>s3e(e,t,n),Wue=M.createContext(void 0),jy=()=>M.useContext(Wue),Gue=M.createContext(void 0),fK=()=>M.useContext(Gue),Kue=M.createContext(void 0),Zue=M.forwardRef((e,t)=>{let n=w2(()=>{var N,P;return{search:"",value:(P=(N=e.value)!=null?N:e.defaultValue)!=null?P:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=w2(()=>new Set),i=w2(()=>new Map),a=w2(()=>new Map),o=w2(()=>new Set),s=Xue(e),{label:c,children:l,value:u,onValueChange:d,filter:f,shouldFilter:h,loop:y,disablePointerSelection:v=!1,vimBindings:k=!0,...g}=e,S=da(),w=da(),C=da(),_=M.useRef(null),A=x3e();Ah(()=>{if(u!==void 0){let N=u.trim();n.current.value=N,j.emit()}},[u]),Ah(()=>{A(6,U)},[]);let j=M.useMemo(()=>({subscribe:N=>(o.current.add(N),()=>o.current.delete(N)),snapshot:()=>n.current,setState:(N,P,G)=>{var J,X,ae,re;if(!Object.is(n.current[N],P)){if(n.current[N]=P,N==="search")R(),D(),A(1,I);else if(N==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let fe=document.getElementById(C);fe?fe.focus():(J=document.getElementById(S))==null||J.focus()}if(A(7,()=>{var fe;n.current.selectedItemId=(fe=q())==null?void 0:fe.id,j.emit()}),G||A(5,U),((X=s.current)==null?void 0:X.value)!==void 0){let fe=P??"";(re=(ae=s.current).onValueChange)==null||re.call(ae,fe);return}}j.emit()}},emit:()=>{o.current.forEach(N=>N())}}),[]),O=M.useMemo(()=>({value:(N,P,G)=>{var J;P!==((J=a.current.get(N))==null?void 0:J.value)&&(a.current.set(N,{value:P,keywords:G}),n.current.filtered.items.set(N,T(P,G)),A(2,()=>{D(),j.emit()}))},item:(N,P)=>(r.current.add(N),P&&(i.current.has(P)?i.current.get(P).add(N):i.current.set(P,new Set([N]))),A(3,()=>{R(),D(),n.current.value||I(),j.emit()}),()=>{a.current.delete(N),r.current.delete(N),n.current.filtered.items.delete(N);let G=q();A(4,()=>{R(),(G==null?void 0:G.getAttribute("id"))===N&&I(),j.emit()})}),group:N=>(i.current.has(N)||i.current.set(N,new Set),()=>{a.current.delete(N),i.current.delete(N)}),filter:()=>s.current.shouldFilter,label:c||e["aria-label"],getDisablePointerSelection:()=>s.current.disablePointerSelection,listId:S,inputId:C,labelId:w,listInnerRef:_}),[]);function T(N,P){var G,J;let X=(J=(G=s.current)==null?void 0:G.filter)!=null?J:l3e;return N?X(N,n.current.search,P):0}function D(){if(!n.current.search||s.current.shouldFilter===!1)return;let N=n.current.filtered.items,P=[];n.current.filtered.groups.forEach(J=>{let X=i.current.get(J),ae=0;X.forEach(re=>{let fe=N.get(re);ae=Math.max(fe,ae)}),P.push([J,ae])});let G=_.current;K().sort((J,X)=>{var ae,re;let fe=J.getAttribute("id"),ke=X.getAttribute("id");return((ae=N.get(ke))!=null?ae:0)-((re=N.get(fe))!=null?re:0)}).forEach(J=>{let X=J.closest(tO);X?X.appendChild(J.parentElement===X?J:J.closest(`${tO} > *`)):G.appendChild(J.parentElement===G?J:J.closest(`${tO} > *`))}),P.sort((J,X)=>X[1]-J[1]).forEach(J=>{var X;let ae=(X=_.current)==null?void 0:X.querySelector(`${I0}[${x2}="${encodeURIComponent(J[0])}"]`);ae==null||ae.parentElement.appendChild(ae)})}function I(){let N=K().find(G=>G.getAttribute("aria-disabled")!=="true"),P=N==null?void 0:N.getAttribute(x2);j.setState("value",P||void 0)}function R(){var N,P,G,J;if(!n.current.search||s.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let X=0;for(let ae of r.current){let re=(P=(N=a.current.get(ae))==null?void 0:N.value)!=null?P:"",fe=(J=(G=a.current.get(ae))==null?void 0:G.keywords)!=null?J:[],ke=T(re,fe);n.current.filtered.items.set(ae,ke),ke>0&&X++}for(let[ae,re]of i.current)for(let fe of re)if(n.current.filtered.items.get(fe)>0){n.current.filtered.groups.add(ae);break}n.current.filtered.count=X}function U(){var N,P,G;let J=q();J&&(((N=J.parentElement)==null?void 0:N.firstChild)===J&&((G=(P=J.closest(I0))==null?void 0:P.querySelector(c3e))==null||G.scrollIntoView({block:"nearest"})),J.scrollIntoView({block:"nearest"}))}function q(){var N;return(N=_.current)==null?void 0:N.querySelector(`${$ue}[aria-selected="true"]`)}function K(){var N;return Array.from(((N=_.current)==null?void 0:N.querySelectorAll(sJ))||[])}function Z(N){let P=K()[N];P&&j.setState("value",P.getAttribute(x2))}function $(N){var P;let G=q(),J=K(),X=J.findIndex(re=>re===G),ae=J[X+N];(P=s.current)!=null&&P.loop&&(ae=X+N<0?J[J.length-1]:X+N===J.length?J[0]:J[X+N]),ae&&j.setState("value",ae.getAttribute(x2))}function B(N){let P=q(),G=P==null?void 0:P.closest(I0),J;for(;G&&!J;)G=N>0?v3e(G,I0):k3e(G,I0),J=G==null?void 0:G.querySelector(sJ);J?j.setState("value",J.getAttribute(x2)):$(N)}let V=()=>Z(K().length-1),F=N=>{N.preventDefault(),N.metaKey?V():N.altKey?B(1):$(1)},ie=N=>{N.preventDefault(),N.metaKey?Z(0):N.altKey?B(-1):$(-1)};return M.createElement(Jt.div,{ref:t,tabIndex:-1,...g,"cmdk-root":"",onKeyDown:N=>{var P;(P=g.onKeyDown)==null||P.call(g,N);let G=N.nativeEvent.isComposing||N.keyCode===229;if(!(N.defaultPrevented||G))switch(N.key){case"n":case"j":{k&&N.ctrlKey&&F(N);break}case"ArrowDown":{F(N);break}case"p":case"k":{k&&N.ctrlKey&&ie(N);break}case"ArrowUp":{ie(N);break}case"Home":{N.preventDefault(),Z(0);break}case"End":{N.preventDefault(),V();break}case"Enter":{N.preventDefault();let J=q();if(J){let X=new Event(Q$);J.dispatchEvent(X)}}}}},M.createElement("label",{"cmdk-label":"",htmlFor:O.inputId,id:O.labelId,style:b3e},c),QD(e,N=>M.createElement(Gue.Provider,{value:j},M.createElement(Wue.Provider,{value:O},N))))}),u3e=M.forwardRef((e,t)=>{var n,r;let i=da(),a=M.useRef(null),o=M.useContext(Kue),s=jy(),c=Xue(e),l=(r=(n=c.current)==null?void 0:n.forceMount)!=null?r:o==null?void 0:o.forceMount;Ah(()=>{if(!l)return s.item(i,o==null?void 0:o.id)},[l]);let u=Yue(i,a,[e.value,e.children,a],e.keywords),d=fK(),f=al(A=>A.value&&A.value===u.current),h=al(A=>l||s.filter()===!1?!0:A.search?A.filtered.items.get(i)>0:!0);M.useEffect(()=>{let A=a.current;if(!(!A||e.disabled))return A.addEventListener(Q$,y),()=>A.removeEventListener(Q$,y)},[h,e.onSelect,e.disabled]);function y(){var A,j;v(),(j=(A=c.current).onSelect)==null||j.call(A,u.current)}function v(){d.setState("value",u.current,!0)}if(!h)return null;let{disabled:k,value:g,onSelect:S,forceMount:w,keywords:C,..._}=e;return M.createElement(Jt.div,{ref:ms(a,t),..._,id:i,"cmdk-item":"",role:"option","aria-disabled":!!k,"aria-selected":!!f,"data-disabled":!!k,"data-selected":!!f,onPointerMove:k||s.getDisablePointerSelection()?void 0:v,onClick:k?void 0:y},e.children)}),d3e=M.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:i,...a}=e,o=da(),s=M.useRef(null),c=M.useRef(null),l=da(),u=jy(),d=al(h=>i||u.filter()===!1?!0:h.search?h.filtered.groups.has(o):!0);Ah(()=>u.group(o),[]),Yue(o,s,[e.value,e.heading,c]);let f=M.useMemo(()=>({id:o,forceMount:i}),[i]);return M.createElement(Jt.div,{ref:ms(s,t),...a,"cmdk-group":"",role:"presentation",hidden:d?void 0:!0},n&&M.createElement("div",{ref:c,"cmdk-group-heading":"","aria-hidden":!0,id:l},n),QD(e,h=>M.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?l:void 0},M.createElement(Kue.Provider,{value:f},h))))}),h3e=M.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,i=M.useRef(null),a=al(o=>!o.search);return!n&&!a?null:M.createElement(Jt.div,{ref:ms(i,t),...r,"cmdk-separator":"",role:"separator"})}),f3e=M.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,i=e.value!=null,a=fK(),o=al(l=>l.search),s=al(l=>l.selectedItemId),c=jy();return M.useEffect(()=>{e.value!=null&&a.setState("search",e.value)},[e.value]),M.createElement(Jt.input,{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":c.listId,"aria-labelledby":c.labelId,"aria-activedescendant":s,id:c.inputId,type:"text",value:i?e.value:o,onChange:l=>{i||a.setState("search",l.target.value),n==null||n(l.target.value)}})}),p3e=M.forwardRef((e,t)=>{let{children:n,label:r="Suggestions",...i}=e,a=M.useRef(null),o=M.useRef(null),s=al(l=>l.selectedItemId),c=jy();return M.useEffect(()=>{if(o.current&&a.current){let l=o.current,u=a.current,d,f=new ResizeObserver(()=>{d=requestAnimationFrame(()=>{let h=l.offsetHeight;u.style.setProperty("--cmdk-list-height",h.toFixed(1)+"px")})});return f.observe(l),()=>{cancelAnimationFrame(d),f.unobserve(l)}}},[]),M.createElement(Jt.div,{ref:ms(a,t),...i,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":s,"aria-label":r,id:c.listId},QD(e,l=>M.createElement("div",{ref:ms(o,c.listInnerRef),"cmdk-list-sizer":""},l)))}),y3e=M.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:i,contentClassName:a,container:o,...s}=e;return M.createElement($D,{open:n,onOpenChange:r},M.createElement(WD,{container:o},M.createElement(Ry,{"cmdk-overlay":"",className:i}),M.createElement(Ff,{"aria-label":e.label,"cmdk-dialog":"",className:a},M.createElement(Zue,{ref:t,...s}))))}),g3e=M.forwardRef((e,t)=>al(n=>n.filtered.count===0)?M.createElement(Jt.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),m3e=M.forwardRef((e,t)=>{let{progress:n,children:r,label:i="Loading...",...a}=e;return M.createElement(Jt.div,{ref:t,...a,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},QD(e,o=>M.createElement("div",{"aria-hidden":!0},o)))}),pa=Object.assign(Zue,{List:p3e,Item:u3e,Input:f3e,Group:d3e,Separator:h3e,Dialog:y3e,Empty:g3e,Loading:m3e});function v3e(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function k3e(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function Xue(e){let t=M.useRef(e);return Ah(()=>{t.current=e}),t}var Ah=typeof window>"u"?M.useEffect:M.useLayoutEffect;function w2(e){let t=M.useRef();return t.current===void 0&&(t.current=e()),t}function al(e){let t=fK(),n=()=>e(t.snapshot());return M.useSyncExternalStore(t.subscribe,n,n)}function Yue(e,t,n,r=[]){let i=M.useRef(),a=jy();return Ah(()=>{var o;let s=(()=>{var l;for(let u of n){if(typeof u=="string")return u.trim();if(typeof u=="object"&&"current"in u)return u.current?(l=u.current.textContent)==null?void 0:l.trim():i.current}})(),c=r.map(l=>l.trim());a.value(e,s,c),(o=t.current)==null||o.setAttribute(x2,s),i.current=s}),i}var x3e=()=>{let[e,t]=M.useState(),n=w2(()=>new Map);return Ah(()=>{n.current.forEach(r=>r()),n.current=new Map},[e]),(r,i)=>{n.current.set(r,i),t({})}};function w3e(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function QD({asChild:e,children:t},n){return e&&M.isValidElement(t)?M.cloneElement(w3e(t),{ref:t.ref},n(t.props.children)):n(t)}var b3e={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const Jue=M.forwardRef(({className:e,...t},n)=>x.jsx(pa,{ref:n,className:Ze("flex h-full w-full flex-col overflow-hidden rounded-md bg-card text-foreground",e),...t}));Jue.displayName=pa.displayName;const Que=M.forwardRef(({className:e,...t},n)=>x.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[x.jsx(Sp,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),x.jsx(pa.Input,{ref:n,className:Ze("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}));Que.displayName=pa.Input.displayName;const e1e=M.forwardRef(({className:e,...t},n)=>x.jsx(pa.List,{ref:n,className:Ze("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));e1e.displayName=pa.List.displayName;const t1e=M.forwardRef((e,t)=>x.jsx(pa.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));t1e.displayName=pa.Empty.displayName;const eW=M.forwardRef(({className:e,...t},n)=>x.jsx(pa.Group,{ref:n,className:Ze("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t}));eW.displayName=pa.Group.displayName;const n1e=M.forwardRef(({className:e,...t},n)=>x.jsx(pa.Separator,{ref:n,className:Ze("-mx-1 h-px bg-border",e),...t}));n1e.displayName=pa.Separator.displayName;const tW=M.forwardRef(({className:e,...t},n)=>x.jsx(pa.Item,{ref:n,className:Ze("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none aria-selected:bg-muted aria-selected:text-foreground data-[disabled='true']:pointer-events-none data-[disabled='true']:opacity-50",e),...t}));tW.displayName=pa.Item.displayName;const r1e=({className:e,...t})=>x.jsx("span",{className:Ze("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});r1e.displayName="CommandShortcut";const M3e=["top","right","bottom","left"],ol=Math.min,ja=Math.max,UT=Math.round,em=Math.floor,ys=e=>({x:e,y:e}),S3e={left:"right",right:"left",bottom:"top",top:"bottom"};function nW(e,t,n){return ja(e,ol(t,n))}function tc(e,t){return typeof e=="function"?e(t):e}function nc(e){return e.split("-")[0]}function Bf(e){return e.split("-")[1]}function pK(e){return e==="x"?"y":"x"}function yK(e){return e==="y"?"height":"width"}function ls(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function gK(e){return pK(ls(e))}function C3e(e,t,n){n===void 0&&(n=!1);const r=Bf(e),i=gK(e),a=yK(i);let o=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(o=$T(o)),[o,$T(o)]}function L3e(e){const t=$T(e);return[rW(e),t,rW(t)]}function rW(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const cJ=["left","right"],lJ=["right","left"],I3e=["top","bottom"],A3e=["bottom","top"];function _3e(e,t,n){switch(e){case"top":case"bottom":return n?t?lJ:cJ:t?cJ:lJ;case"left":case"right":return t?I3e:A3e;default:return[]}}function E3e(e,t,n,r){const i=Bf(e);let a=_3e(nc(e),n==="start",r);return i&&(a=a.map(o=>o+"-"+i),t&&(a=a.concat(a.map(rW)))),a}function $T(e){const t=nc(e);return S3e[t]+e.slice(t.length)}function P3e(e){return{top:0,right:0,bottom:0,left:0,...e}}function i1e(e){return typeof e!="number"?P3e(e):{top:e,right:e,bottom:e,left:e}}function WT(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function uJ(e,t,n){let{reference:r,floating:i}=e;const a=ls(t),o=gK(t),s=yK(o),c=nc(t),l=a==="y",u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2;let h;switch(c){case"top":h={x:u,y:r.y-i.height};break;case"bottom":h={x:u,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:d};break;case"left":h={x:r.x-i.width,y:d};break;default:h={x:r.x,y:r.y}}switch(Bf(t)){case"start":h[o]-=f*(n&&l?-1:1);break;case"end":h[o]+=f*(n&&l?-1:1);break}return h}async function N3e(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:a,rects:o,elements:s,strategy:c}=e,{boundary:l="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:h=0}=tc(t,e),y=i1e(h),k=s[f?d==="floating"?"reference":"floating":d],g=WT(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(k)))==null||n?k:k.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(s.floating)),boundary:l,rootBoundary:u,strategy:c})),S=d==="floating"?{x:r,y:i,width:o.floating.width,height:o.floating.height}:o.reference,w=await(a.getOffsetParent==null?void 0:a.getOffsetParent(s.floating)),C=await(a.isElement==null?void 0:a.isElement(w))?await(a.getScale==null?void 0:a.getScale(w))||{x:1,y:1}:{x:1,y:1},_=WT(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:S,offsetParent:w,strategy:c}):S);return{top:(g.top-_.top+y.top)/C.y,bottom:(_.bottom-g.bottom+y.bottom)/C.y,left:(g.left-_.left+y.left)/C.x,right:(_.right-g.right+y.right)/C.x}}const R3e=50,j3e=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:N3e},c=await(o.isRTL==null?void 0:o.isRTL(t));let l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=uJ(l,r,c),f=r,h=0;const y={};for(let v=0;v<a.length;v++){const k=a[v];if(!k)continue;const{name:g,fn:S}=k,{x:w,y:C,data:_,reset:A}=await S({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:y,rects:l,platform:s,elements:{reference:e,floating:t}});u=w??u,d=C??d,y[g]={...y[g],..._},A&&h<R3e&&(h++,typeof A=="object"&&(A.placement&&(f=A.placement),A.rects&&(l=A.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):A.rects),{x:u,y:d}=uJ(l,f,c)),v=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:y}},T3e=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=tc(e,t)||{};if(l==null)return{};const d=i1e(u),f={x:n,y:r},h=gK(i),y=yK(h),v=await o.getDimensions(l),k=h==="y",g=k?"top":"left",S=k?"bottom":"right",w=k?"clientHeight":"clientWidth",C=a.reference[y]+a.reference[h]-f[h]-a.floating[y],_=f[h]-a.reference[h],A=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l));let j=A?A[w]:0;(!j||!await(o.isElement==null?void 0:o.isElement(A)))&&(j=s.floating[w]||a.floating[y]);const O=C/2-_/2,T=j/2-v[y]/2-1,D=ol(d[g],T),I=ol(d[S],T),R=D,U=j-v[y]-I,q=j/2-v[y]/2+O,K=nW(R,q,U),Z=!c.arrow&&Bf(i)!=null&&q!==K&&a.reference[y]/2-(q<R?D:I)-v[y]/2<0,$=Z?q<R?q-R:q-U:0;return{[h]:f[h]+$,data:{[h]:K,centerOffset:q-K-$,...Z&&{alignmentOffset:$}},reset:Z}}}),D3e=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:a,rects:o,initialPlacement:s,platform:c,elements:l}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:v=!0,...k}=tc(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const g=nc(i),S=ls(s),w=nc(s)===s,C=await(c.isRTL==null?void 0:c.isRTL(l.floating)),_=f||(w||!v?[$T(s)]:L3e(s)),A=y!=="none";!f&&A&&_.push(...E3e(s,v,y,C));const j=[s,..._],O=await c.detectOverflow(t,k),T=[];let D=((r=a.flip)==null?void 0:r.overflows)||[];if(u&&T.push(O[g]),d){const q=C3e(i,o,C);T.push(O[q[0]],O[q[1]])}if(D=[...D,{placement:i,overflows:T}],!T.every(q=>q<=0)){var I,R;const q=(((I=a.flip)==null?void 0:I.index)||0)+1,K=j[q];if(K&&(!(d==="alignment"?S!==ls(K):!1)||D.every(B=>ls(B.placement)===S?B.overflows[0]>0:!0)))return{data:{index:q,overflows:D},reset:{placement:K}};let Z=(R=D.filter($=>$.overflows[0]<=0).sort(($,B)=>$.overflows[1]-B.overflows[1])[0])==null?void 0:R.placement;if(!Z)switch(h){case"bestFit":{var U;const $=(U=D.filter(B=>{if(A){const V=ls(B.placement);return V===S||V==="y"}return!0}).map(B=>[B.placement,B.overflows.filter(V=>V>0).reduce((V,F)=>V+F,0)]).sort((B,V)=>B[1]-V[1])[0])==null?void 0:U[0];$&&(Z=$);break}case"initialPlacement":Z=s;break}if(i!==Z)return{reset:{placement:Z}}}return{}}}};function dJ(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function hJ(e){return M3e.some(t=>e[t]>=0)}const q3e=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:i="referenceHidden",...a}=tc(e,t);switch(i){case"referenceHidden":{const o=await r.detectOverflow(t,{...a,elementContext:"reference"}),s=dJ(o,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:hJ(s)}}}case"escaped":{const o=await r.detectOverflow(t,{...a,altBoundary:!0}),s=dJ(o,n.floating);return{data:{escapedOffsets:s,escaped:hJ(s)}}}default:return{}}}}},a1e=new Set(["left","top"]);async function z3e(e,t){const{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=nc(n),s=Bf(n),c=ls(n)==="y",l=a1e.has(o)?-1:1,u=a&&c?-1:1,d=tc(t,e);let{mainAxis:f,crossAxis:h,alignmentAxis:y}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof y=="number"&&(h=s==="end"?y*-1:y),c?{x:h*u,y:f*l}:{x:f*l,y:h*u}}const O3e=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:a,placement:o,middlewareData:s}=t,c=await z3e(t,e);return o===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:i+c.x,y:a+c.y,data:{...c,placement:o}}}}},F3e=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:g=>{let{x:S,y:w}=g;return{x:S,y:w}}},...l}=tc(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=ls(nc(i)),h=pK(f);let y=u[h],v=u[f];if(o){const g=h==="y"?"top":"left",S=h==="y"?"bottom":"right",w=y+d[g],C=y-d[S];y=nW(w,y,C)}if(s){const g=f==="y"?"top":"left",S=f==="y"?"bottom":"right",w=v+d[g],C=v-d[S];v=nW(w,v,C)}const k=c.fn({...t,[h]:y,[f]:v});return{...k,data:{x:k.x-n,y:k.y-r,enabled:{[h]:o,[f]:s}}}}}},B3e=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=tc(e,t),u={x:n,y:r},d=ls(i),f=pK(d);let h=u[f],y=u[d];const v=tc(s,t),k=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(c){const w=f==="y"?"height":"width",C=a.reference[f]-a.floating[w]+k.mainAxis,_=a.reference[f]+a.reference[w]-k.mainAxis;h<C?h=C:h>_&&(h=_)}if(l){var g,S;const w=f==="y"?"width":"height",C=a1e.has(nc(i)),_=a.reference[d]-a.floating[w]+(C&&((g=o.offset)==null?void 0:g[d])||0)+(C?0:k.crossAxis),A=a.reference[d]+a.reference[w]+(C?0:((S=o.offset)==null?void 0:S[d])||0)-(C?k.crossAxis:0);y<_?y=_:y>A&&(y=A)}return{[f]:h,[d]:y}}}},H3e=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=tc(e,t),u=await o.detectOverflow(t,l),d=nc(i),f=Bf(i),h=ls(i)==="y",{width:y,height:v}=a.floating;let k,g;d==="top"||d==="bottom"?(k=d,g=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?"start":"end")?"left":"right"):(g=d,k=f==="end"?"top":"bottom");const S=v-u.top-u.bottom,w=y-u.left-u.right,C=ol(v-u[k],S),_=ol(y-u[g],w),A=!t.middlewareData.shift;let j=C,O=_;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(O=w),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(j=S),A&&!f){const D=ja(u.left,0),I=ja(u.right,0),R=ja(u.top,0),U=ja(u.bottom,0);h?O=y-2*(D!==0||I!==0?D+I:ja(u.left,u.right)):j=v-2*(R!==0||U!==0?R+U:ja(u.top,u.bottom))}await c({...t,availableWidth:O,availableHeight:j});const T=await o.getDimensions(s.floating);return y!==T.width||v!==T.height?{reset:{rects:!0}}:{}}}};function eq(){return typeof window<"u"}function Hf(e){return o1e(e)?(e.nodeName||"").toLowerCase():"#document"}function Oa(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ws(e){var t;return(t=(o1e(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function o1e(e){return eq()?e instanceof Node||e instanceof Oa(e).Node:!1}function qo(e){return eq()?e instanceof Element||e instanceof Oa(e).Element:!1}function oc(e){return eq()?e instanceof HTMLElement||e instanceof Oa(e).HTMLElement:!1}function fJ(e){return!eq()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Oa(e).ShadowRoot}function Ty(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=zo(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!=="inline"&&i!=="contents"}function V3e(e){return/^(table|td|th)$/.test(Hf(e))}function tq(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const U3e=/transform|translate|scale|rotate|perspective|filter/,$3e=/paint|layout|strict|content/,Nl=e=>!!e&&e!=="none";let nO;function mK(e){const t=qo(e)?zo(e):e;return Nl(t.transform)||Nl(t.translate)||Nl(t.scale)||Nl(t.rotate)||Nl(t.perspective)||!vK()&&(Nl(t.backdropFilter)||Nl(t.filter))||U3e.test(t.willChange||"")||$3e.test(t.contain||"")}function W3e(e){let t=sl(e);for(;oc(t)&&!kf(t);){if(mK(t))return t;if(tq(t))return null;t=sl(t)}return null}function vK(){return nO==null&&(nO=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),nO}function kf(e){return/^(html|body|#document)$/.test(Hf(e))}function zo(e){return Oa(e).getComputedStyle(e)}function nq(e){return qo(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function sl(e){if(Hf(e)==="html")return e;const t=e.assignedSlot||e.parentNode||fJ(e)&&e.host||ws(e);return fJ(t)?t.host:t}function s1e(e){const t=sl(e);return kf(t)?e.ownerDocument?e.ownerDocument.body:e.body:oc(t)&&Ty(t)?t:s1e(t)}function cy(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=s1e(e),a=i===((r=e.ownerDocument)==null?void 0:r.body),o=Oa(i);if(a){const s=iW(o);return t.concat(o,o.visualViewport||[],Ty(i)?i:[],s&&n?cy(s):[])}else return t.concat(i,cy(i,[],n))}function iW(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function c1e(e){const t=zo(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=oc(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=UT(n)!==a||UT(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function kK(e){return qo(e)?e:e.contextElement}function nf(e){const t=kK(e);if(!oc(t))return ys(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:a}=c1e(t);let o=(a?UT(n.width):n.width)/r,s=(a?UT(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}const G3e=ys(0);function l1e(e){const t=Oa(e);return!vK()||!t.visualViewport?G3e:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function K3e(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Oa(e)?!1:t}function _h(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),a=kK(e);let o=ys(1);t&&(r?qo(r)&&(o=nf(r)):o=nf(e));const s=K3e(a,n,r)?l1e(a):ys(0);let c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){const f=Oa(a),h=r&&qo(r)?Oa(r):r;let y=f,v=iW(y);for(;v&&r&&h!==y;){const k=nf(v),g=v.getBoundingClientRect(),S=zo(v),w=g.left+(v.clientLeft+parseFloat(S.paddingLeft))*k.x,C=g.top+(v.clientTop+parseFloat(S.paddingTop))*k.y;c*=k.x,l*=k.y,u*=k.x,d*=k.y,c+=w,l+=C,y=Oa(v),v=iW(y)}}return WT({width:u,height:d,x:c,y:l})}function rq(e,t){const n=nq(e).scrollLeft;return t?t.left+n:_h(ws(e)).left+n}function u1e(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-rq(e,n),i=n.top+t.scrollTop;return{x:r,y:i}}function Z3e(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const a=i==="fixed",o=ws(r),s=t?tq(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=ys(1);const u=ys(0),d=oc(r);if((d||!d&&!a)&&((Hf(r)!=="body"||Ty(o))&&(c=nq(r)),d)){const h=_h(r);l=nf(r),u.x=h.x+r.clientLeft,u.y=h.y+r.clientTop}const f=o&&!d&&!a?u1e(o,c):ys(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function X3e(e){return Array.from(e.getClientRects())}function Y3e(e){const t=ws(e),n=nq(e),r=e.ownerDocument.body,i=ja(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=ja(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+rq(e);const s=-n.scrollTop;return zo(r).direction==="rtl"&&(o+=ja(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}const pJ=25;function J3e(e,t){const n=Oa(e),r=ws(e),i=n.visualViewport;let a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;const u=vK();(!u||u&&t==="fixed")&&(s=i.offsetLeft,c=i.offsetTop)}const l=rq(r);if(l<=0){const u=r.ownerDocument,d=u.body,f=getComputedStyle(d),h=u.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,y=Math.abs(r.clientWidth-d.clientWidth-h);y<=pJ&&(a-=y)}else l<=pJ&&(a+=l);return{width:a,height:o,x:s,y:c}}function Q3e(e,t){const n=_h(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=oc(e)?nf(e):ys(1),o=e.clientWidth*a.x,s=e.clientHeight*a.y,c=i*a.x,l=r*a.y;return{width:o,height:s,x:c,y:l}}function yJ(e,t,n){let r;if(t==="viewport")r=J3e(e,n);else if(t==="document")r=Y3e(ws(e));else if(qo(t))r=Q3e(t,n);else{const i=l1e(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return WT(r)}function d1e(e,t){const n=sl(e);return n===t||!qo(n)||kf(n)?!1:zo(n).position==="fixed"||d1e(n,t)}function exe(e,t){const n=t.get(e);if(n)return n;let r=cy(e,[],!1).filter(s=>qo(s)&&Hf(s)!=="body"),i=null;const a=zo(e).position==="fixed";let o=a?sl(e):e;for(;qo(o)&&!kf(o);){const s=zo(o),c=mK(o);!c&&s.position==="fixed"&&(i=null),(a?!c&&!i:!c&&s.position==="static"&&!!i&&(i.position==="absolute"||i.position==="fixed")||Ty(o)&&!c&&d1e(e,o))?r=r.filter(u=>u!==o):i=s,o=sl(o)}return t.set(e,r),r}function txe(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const o=[...n==="clippingAncestors"?tq(t)?[]:exe(t,this._c):[].concat(n),r],s=yJ(t,o[0],i);let c=s.top,l=s.right,u=s.bottom,d=s.left;for(let f=1;f<o.length;f++){const h=yJ(t,o[f],i);c=ja(h.top,c),l=ol(h.right,l),u=ol(h.bottom,u),d=ja(h.left,d)}return{width:l-d,height:u-c,x:d,y:c}}function nxe(e){const{width:t,height:n}=c1e(e);return{width:t,height:n}}function rxe(e,t,n){const r=oc(t),i=ws(t),a=n==="fixed",o=_h(e,!0,a,t);let s={scrollLeft:0,scrollTop:0};const c=ys(0);function l(){c.x=rq(i)}if(r||!r&&!a)if((Hf(t)!=="body"||Ty(i))&&(s=nq(t)),r){const h=_h(t,!0,a,t);c.x=h.x+t.clientLeft,c.y=h.y+t.clientTop}else i&&l();a&&!r&&i&&l();const u=i&&!r&&!a?u1e(i,s):ys(0),d=o.left+s.scrollLeft-c.x-u.x,f=o.top+s.scrollTop-c.y-u.y;return{x:d,y:f,width:o.width,height:o.height}}function rO(e){return zo(e).position==="static"}function gJ(e,t){if(!oc(e)||zo(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ws(e)===n&&(n=n.ownerDocument.body),n}function h1e(e,t){const n=Oa(e);if(tq(e))return n;if(!oc(e)){let i=sl(e);for(;i&&!kf(i);){if(qo(i)&&!rO(i))return i;i=sl(i)}return n}let r=gJ(e,t);for(;r&&V3e(r)&&rO(r);)r=gJ(r,t);return r&&kf(r)&&rO(r)&&!mK(r)?n:r||W3e(e)||n}const ixe=async function(e){const t=this.getOffsetParent||h1e,n=this.getDimensions,r=await n(e.floating);return{reference:rxe(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function axe(e){return zo(e).direction==="rtl"}const oxe={convertOffsetParentRelativeRectToViewportRelativeRect:Z3e,getDocumentElement:ws,getClippingRect:txe,getOffsetParent:h1e,getElementRects:ixe,getClientRects:X3e,getDimensions:nxe,getScale:nf,isElement:qo,isRTL:axe};function f1e(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function sxe(e,t){let n=null,r;const i=ws(e);function a(){var s;clearTimeout(r),(s=n)==null||s.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();const l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:h}=l;if(s||t(),!f||!h)return;const y=em(d),v=em(i.clientWidth-(u+f)),k=em(i.clientHeight-(d+h)),g=em(u),w={rootMargin:-y+"px "+-v+"px "+-k+"px "+-g+"px",threshold:ja(0,ol(1,c))||1};let C=!0;function _(A){const j=A[0].intersectionRatio;if(j!==c){if(!C)return o();j?o(!1,j):r=setTimeout(()=>{o(!1,1e-7)},1e3)}j===1&&!f1e(l,e.getBoundingClientRect())&&o(),C=!1}try{n=new IntersectionObserver(_,{...w,root:i.ownerDocument})}catch{n=new IntersectionObserver(_,w)}n.observe(e)}return o(!0),a}function cxe(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,l=kK(e),u=i||a?[...l?cy(l):[],...t?cy(t):[]]:[];u.forEach(g=>{i&&g.addEventListener("scroll",n,{passive:!0}),a&&g.addEventListener("resize",n)});const d=l&&s?sxe(l,n):null;let f=-1,h=null;o&&(h=new ResizeObserver(g=>{let[S]=g;S&&S.target===l&&h&&t&&(h.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var w;(w=h)==null||w.observe(t)})),n()}),l&&!c&&h.observe(l),t&&h.observe(t));let y,v=c?_h(e):null;c&&k();function k(){const g=_h(e);v&&!f1e(v,g)&&n(),v=g,y=requestAnimationFrame(k)}return n(),()=>{var g;u.forEach(S=>{i&&S.removeEventListener("scroll",n),a&&S.removeEventListener("resize",n)}),d==null||d(),(g=h)==null||g.disconnect(),h=null,c&&cancelAnimationFrame(y)}}const lxe=O3e,uxe=F3e,dxe=D3e,hxe=H3e,fxe=q3e,mJ=T3e,pxe=B3e,yxe=(e,t,n)=>{const r=new Map,i={platform:oxe,...n},a={...i.platform,_c:r};return j3e(e,t,{...i,platform:a})};var gxe=typeof document<"u",mxe=function(){},nT=gxe?M.useLayoutEffect:mxe;function GT(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!GT(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const a=i[r];if(!(a==="_owner"&&e.$$typeof)&&!GT(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function p1e(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function vJ(e,t){const n=p1e(e);return Math.round(t*n)/n}function iO(e){const t=M.useRef(e);return nT(()=>{t.current=e}),t}function vxe(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=M.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,h]=M.useState(r);GT(f,r)||h(r);const[y,v]=M.useState(null),[k,g]=M.useState(null),S=M.useCallback(B=>{B!==A.current&&(A.current=B,v(B))},[]),w=M.useCallback(B=>{B!==j.current&&(j.current=B,g(B))},[]),C=a||y,_=o||k,A=M.useRef(null),j=M.useRef(null),O=M.useRef(u),T=c!=null,D=iO(c),I=iO(i),R=iO(l),U=M.useCallback(()=>{if(!A.current||!j.current)return;const B={placement:t,strategy:n,middleware:f};I.current&&(B.platform=I.current),yxe(A.current,j.current,B).then(V=>{const F={...V,isPositioned:R.current!==!1};q.current&&!GT(O.current,F)&&(O.current=F,qf.flushSync(()=>{d(F)}))})},[f,t,n,I,R]);nT(()=>{l===!1&&O.current.isPositioned&&(O.current.isPositioned=!1,d(B=>({...B,isPositioned:!1})))},[l]);const q=M.useRef(!1);nT(()=>(q.current=!0,()=>{q.current=!1}),[]),nT(()=>{if(C&&(A.current=C),_&&(j.current=_),C&&_){if(D.current)return D.current(C,_,U);U()}},[C,_,U,D,T]);const K=M.useMemo(()=>({reference:A,floating:j,setReference:S,setFloating:w}),[S,w]),Z=M.useMemo(()=>({reference:C,floating:_}),[C,_]),$=M.useMemo(()=>{const B={position:n,left:0,top:0};if(!Z.floating)return B;const V=vJ(Z.floating,u.x),F=vJ(Z.floating,u.y);return s?{...B,transform:"translate("+V+"px, "+F+"px)",...p1e(Z.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:V,top:F}},[n,s,Z.floating,u.x,u.y]);return M.useMemo(()=>({...u,update:U,refs:K,elements:Z,floatingStyles:$}),[u,U,K,Z,$])}const kxe=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:i}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?mJ({element:r.current,padding:i}).fn(n):{}:r?mJ({element:r,padding:i}).fn(n):{}}}},xxe=(e,t)=>{const n=lxe(e);return{name:n.name,fn:n.fn,options:[e,t]}},wxe=(e,t)=>{const n=uxe(e);return{name:n.name,fn:n.fn,options:[e,t]}},bxe=(e,t)=>({fn:pxe(e).fn,options:[e,t]}),Mxe=(e,t)=>{const n=dxe(e);return{name:n.name,fn:n.fn,options:[e,t]}},Sxe=(e,t)=>{const n=hxe(e);return{name:n.name,fn:n.fn,options:[e,t]}},Cxe=(e,t)=>{const n=fxe(e);return{name:n.name,fn:n.fn,options:[e,t]}},Lxe=(e,t)=>{const n=kxe(e);return{name:n.name,fn:n.fn,options:[e,t]}};var Ixe="Arrow",y1e=M.forwardRef((e,t)=>{const{children:n,width:r=10,height:i=5,...a}=e;return x.jsx(Jt.svg,{...a,ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:x.jsx("polygon",{points:"0,0 30,0 15,10"})})});y1e.displayName=Ixe;var Axe=y1e;function g1e(e){const[t,n]=M.useState(void 0);return il(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const a=i[0];let o,s;if("borderBoxSize"in a){const c=a.borderBoxSize,l=Array.isArray(c)?c[0]:c;o=l.inlineSize,s=l.blockSize}else o=e.offsetWidth,s=e.offsetHeight;n({width:o,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var xK="Popper",[m1e,Vf]=xs(xK),[_xe,v1e]=m1e(xK),k1e=e=>{const{__scopePopper:t,children:n}=e,[r,i]=M.useState(null);return x.jsx(_xe,{scope:t,anchor:r,onAnchorChange:i,children:n})};k1e.displayName=xK;var x1e="PopperAnchor",w1e=M.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,a=v1e(x1e,n),o=M.useRef(null),s=Nn(t,o),c=M.useRef(null);return M.useEffect(()=>{const l=c.current;c.current=(r==null?void 0:r.current)||o.current,l!==c.current&&a.onAnchorChange(c.current)}),r?null:x.jsx(Jt.div,{...i,ref:s})});w1e.displayName=x1e;var wK="PopperContent",[Exe,Pxe]=m1e(wK),b1e=M.forwardRef((e,t)=>{var ae,re,fe,ke,Ne,je;const{__scopePopper:n,side:r="bottom",sideOffset:i=0,align:a="center",alignOffset:o=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:d="partial",hideWhenDetached:f=!1,updatePositionStrategy:h="optimized",onPlaced:y,...v}=e,k=v1e(wK,n),[g,S]=M.useState(null),w=Nn(t,Re=>S(Re)),[C,_]=M.useState(null),A=g1e(C),j=(A==null?void 0:A.width)??0,O=(A==null?void 0:A.height)??0,T=r+(a!=="center"?"-"+a:""),D=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},I=Array.isArray(l)?l:[l],R=I.length>0,U={padding:D,boundary:I.filter(Rxe),altBoundary:R},{refs:q,floatingStyles:K,placement:Z,isPositioned:$,middlewareData:B}=vxe({strategy:"fixed",placement:T,whileElementsMounted:(...Re)=>cxe(...Re,{animationFrame:h==="always"}),elements:{reference:k.anchor},middleware:[xxe({mainAxis:i+O,alignmentAxis:o}),c&&wxe({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?bxe():void 0,...U}),c&&Mxe({...U}),Sxe({...U,apply:({elements:Re,rects:$e,availableWidth:ee,availableHeight:qe})=>{const{width:Ke,height:_e}=$e.reference,Se=Re.floating.style;Se.setProperty("--radix-popper-available-width",`${ee}px`),Se.setProperty("--radix-popper-available-height",`${qe}px`),Se.setProperty("--radix-popper-anchor-width",`${Ke}px`),Se.setProperty("--radix-popper-anchor-height",`${_e}px`)}}),C&&Lxe({element:C,padding:s}),jxe({arrowWidth:j,arrowHeight:O}),f&&Cxe({strategy:"referenceHidden",...U})]}),[V,F]=C1e(Z),ie=vs(y);il(()=>{$&&(ie==null||ie())},[$,ie]);const N=(ae=B.arrow)==null?void 0:ae.x,P=(re=B.arrow)==null?void 0:re.y,G=((fe=B.arrow)==null?void 0:fe.centerOffset)!==0,[J,X]=M.useState();return il(()=>{g&&X(window.getComputedStyle(g).zIndex)},[g]),x.jsx("div",{ref:q.setFloating,"data-radix-popper-content-wrapper":"",style:{...K,transform:$?K.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:J,"--radix-popper-transform-origin":[(ke=B.transformOrigin)==null?void 0:ke.x,(Ne=B.transformOrigin)==null?void 0:Ne.y].join(" "),...((je=B.hide)==null?void 0:je.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:x.jsx(Exe,{scope:n,placedSide:V,onArrowChange:_,arrowX:N,arrowY:P,shouldHideArrow:G,children:x.jsx(Jt.div,{"data-side":V,"data-align":F,...v,ref:w,style:{...v.style,animation:$?void 0:"none"}})})})});b1e.displayName=wK;var M1e="PopperArrow",Nxe={top:"bottom",right:"left",bottom:"top",left:"right"},S1e=M.forwardRef(function(t,n){const{__scopePopper:r,...i}=t,a=Pxe(M1e,r),o=Nxe[a.placedSide];return x.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:x.jsx(Axe,{...i,ref:n,style:{...i.style,display:"block"}})})});S1e.displayName=M1e;function Rxe(e){return e!==null}var jxe=e=>({name:"transformOrigin",options:e,fn(t){var k,g,S;const{placement:n,rects:r,middlewareData:i}=t,o=((k=i.arrow)==null?void 0:k.centerOffset)!==0,s=o?0:e.arrowWidth,c=o?0:e.arrowHeight,[l,u]=C1e(n),d={start:"0%",center:"50%",end:"100%"}[u],f=(((g=i.arrow)==null?void 0:g.x)??0)+s/2,h=(((S=i.arrow)==null?void 0:S.y)??0)+c/2;let y="",v="";return l==="bottom"?(y=o?d:`${f}px`,v=`${-c}px`):l==="top"?(y=o?d:`${f}px`,v=`${r.floating.height+c}px`):l==="right"?(y=`${-c}px`,v=o?d:`${h}px`):l==="left"&&(y=`${r.floating.width+c}px`,v=o?d:`${h}px`),{data:{x:y,y:v}}}});function C1e(e){const[t,n="center"]=e.split("-");return[t,n]}var bK=k1e,iq=w1e,MK=b1e,SK=S1e,aq="Popover",[L1e]=xs(aq,[Vf]),Dy=Vf(),[Txe,pl]=L1e(aq),I1e=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!1}=e,s=Dy(t),c=M.useRef(null),[l,u]=M.useState(!1),[d,f]=Of({prop:r,defaultProp:i??!1,onChange:a,caller:aq});return x.jsx(bK,{...s,children:x.jsx(Txe,{scope:t,contentId:da(),triggerRef:c,open:d,onOpenChange:f,onOpenToggle:M.useCallback(()=>f(h=>!h),[f]),hasCustomAnchor:l,onCustomAnchorAdd:M.useCallback(()=>u(!0),[]),onCustomAnchorRemove:M.useCallback(()=>u(!1),[]),modal:o,children:n})})};I1e.displayName=aq;var A1e="PopoverAnchor",_1e=M.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=pl(A1e,n),a=Dy(n),{onCustomAnchorAdd:o,onCustomAnchorRemove:s}=i;return M.useEffect(()=>(o(),()=>s()),[o,s]),x.jsx(iq,{...a,...r,ref:t})});_1e.displayName=A1e;var E1e="PopoverTrigger",P1e=M.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=pl(E1e,n),a=Dy(n),o=Nn(t,i.triggerRef),s=x.jsx(Jt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":D1e(i.open),...r,ref:o,onClick:St(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?s:x.jsx(iq,{asChild:!0,...a,children:s})});P1e.displayName=E1e;var CK="PopoverPortal",[Dxe,qxe]=L1e(CK,{forceMount:void 0}),N1e=e=>{const{__scopePopover:t,forceMount:n,children:r,container:i}=e,a=pl(CK,t);return x.jsx(Dxe,{scope:t,forceMount:n,children:x.jsx(lo,{present:n||a.open,children:x.jsx(Ny,{asChild:!0,container:i,children:r})})})};N1e.displayName=CK;var xf="PopoverContent",R1e=M.forwardRef((e,t)=>{const n=qxe(xf,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,a=pl(xf,e.__scopePopover);return x.jsx(lo,{present:r||a.open,children:a.modal?x.jsx(Oxe,{...i,ref:t}):x.jsx(Fxe,{...i,ref:t})})});R1e.displayName=xf;var zxe=vf("PopoverContent.RemoveScroll"),Oxe=M.forwardRef((e,t)=>{const n=pl(xf,e.__scopePopover),r=M.useRef(null),i=Nn(t,r),a=M.useRef(!1);return M.useEffect(()=>{const o=r.current;if(o)return cK(o)},[]),x.jsx(VD,{as:zxe,allowPinchZoom:!0,children:x.jsx(j1e,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:St(e.onCloseAutoFocus,o=>{var s;o.preventDefault(),a.current||(s=n.triggerRef.current)==null||s.focus()}),onPointerDownOutside:St(e.onPointerDownOutside,o=>{const s=o.detail.originalEvent,c=s.button===0&&s.ctrlKey===!0,l=s.button===2||c;a.current=l},{checkForDefaultPrevented:!1}),onFocusOutside:St(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1})})})}),Fxe=M.forwardRef((e,t)=>{const n=pl(xf,e.__scopePopover),r=M.useRef(!1),i=M.useRef(!1);return x.jsx(j1e,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var o,s;(o=e.onCloseAutoFocus)==null||o.call(e,a),a.defaultPrevented||(r.current||(s=n.triggerRef.current)==null||s.focus(),a.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:a=>{var c,l;(c=e.onInteractOutside)==null||c.call(e,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const o=a.target;((l=n.triggerRef.current)==null?void 0:l.contains(o))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&i.current&&a.preventDefault()}})}),j1e=M.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:o,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onInteractOutside:u,...d}=e,f=pl(xf,n),h=Dy(n);return sK(),x.jsx(BD,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:x.jsx(Py,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:u,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onDismiss:()=>f.onOpenChange(!1),children:x.jsx(MK,{"data-state":D1e(f.open),role:"dialog",id:f.contentId,...h,...d,ref:t,style:{...d.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),T1e="PopoverClose",Bxe=M.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=pl(T1e,n);return x.jsx(Jt.button,{type:"button",...r,ref:t,onClick:St(e.onClick,()=>i.onOpenChange(!1))})});Bxe.displayName=T1e;var Hxe="PopoverArrow",Vxe=M.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=Dy(n);return x.jsx(SK,{...i,...r,ref:t})});Vxe.displayName=Hxe;function D1e(e){return e?"open":"closed"}var Uxe=I1e,$xe=_1e,Wxe=P1e,Gxe=N1e,q1e=R1e;const Uf=Uxe,qy=Wxe,Kxe=$xe,Fh=M.forwardRef(({className:e,align:t="center",sideOffset:n=4,...r},i)=>x.jsx(Gxe,{children:x.jsx(q1e,{ref:i,align:t,sideOffset:n,className:Ze("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none 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",e),...r})}));Fh.displayName=q1e.displayName;const aW="seeflow:navigate",Zxe=e=>(window.addEventListener("popstate",e),window.addEventListener(aW,e),()=>{window.removeEventListener("popstate",e),window.removeEventListener(aW,e)}),kJ=()=>window.location.pathname,Xxe=()=>M.useSyncExternalStore(Zxe,kJ,kJ),wf=e=>{e!==window.location.pathname&&(window.history.pushState({},"",e),window.dispatchEvent(new Event(aW)))};function Yxe({demos:e,currentSlug:t,onProjectCreated:n,onProjectUnregistered:r}){const[i,a]=M.useState(!1),[o,s]=M.useState(!1),[c,l]=M.useState(null),[u,d]=M.useState(!1),[f,h]=M.useState(null);M.useEffect(()=>{const w=C=>{C.key==="k"&&(C.metaKey||C.ctrlKey)&&(C.preventDefault(),a(_=>!_))};return document.addEventListener("keydown",w),()=>document.removeEventListener("keydown",w)},[]);const y=e.find(w=>w.slug===t),v=w=>{n==null||n(w),wf(`/d/${w.slug}`)},k=w=>{l(w),h(null)},g=()=>{u||(l(null),h(null))},S=async()=>{if(c){d(!0),h(null);try{await $4e(c.id);const w=c.id;l(null),r==null||r(w)}catch(w){h(w instanceof Error?w.message:String(w))}finally{d(!1)}}};return x.jsxs(x.Fragment,{children:[x.jsxs(Uf,{open:i,onOpenChange:a,children:[x.jsx(qy,{asChild:!0,children:x.jsxs(oi,{type:"button",variant:"outline",size:"sm","aria-label":"Switch demo","aria-expanded":i,className:"gap-2","data-testid":"project-switcher-trigger",children:[x.jsx("span",{className:"max-w-[180px] truncate text-sm",children:(y==null?void 0:y.name)??"Select demo"}),x.jsx(r1e,{children:"⌘K"}),x.jsx(sp,{className:"h-3.5 w-3.5 opacity-60"})]})}),x.jsx(Fh,{align:"end",sideOffset:6,className:"w-[320px] p-0","data-testid":"project-switcher-popover",children:x.jsxs(Jue,{children:[x.jsx(Que,{placeholder:"Search demos..."}),x.jsxs(e1e,{children:[x.jsx(t1e,{children:"No demos."}),e.length>0?x.jsx(eW,{heading:"Demos",children:e.map(w=>x.jsxs(tW,{value:`${w.name} ${w.slug}`,onSelect:()=>{a(!1),wf(`/d/${w.slug}`)},className:"group flex items-center justify-between gap-2",children:[x.jsxs("div",{className:"flex min-w-0 flex-col items-start gap-0.5",children:[x.jsx("span",{className:"font-medium",children:w.name}),x.jsx("span",{className:"w-full truncate text-xs text-muted-foreground",children:w.repoPath})]}),x.jsx("button",{type:"button","aria-label":`Unregister ${w.name}`,className:"shrink-0 rounded p-0.5 opacity-0 transition-opacity hover:text-destructive group-hover:opacity-100 focus-visible:opacity-100 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",onClick:C=>{C.stopPropagation(),a(!1),k(w)},children:x.jsx(Pp,{className:"h-3.5 w-3.5"})})]},w.id))}):null,e.length>0?x.jsx(n1e,{}):null,x.jsx(eW,{children:x.jsxs(tW,{value:"+ create new project",onSelect:()=>{a(!1),s(!0)},"data-testid":"project-switcher-create",className:"flex items-center gap-2 text-sm",children:[x.jsx(bp,{className:"h-4 w-4 opacity-70"}),x.jsx("span",{className:"font-medium",children:"Create new project"})]})})]})]})})]}),x.jsx(J4e,{open:o,onOpenChange:s,onCreated:v}),x.jsx(hK,{open:c!==null,onOpenChange:w=>{w||g()},children:x.jsxs(ZD,{className:"sm:max-w-md","data-testid":"unregister-project-dialog",children:[x.jsxs(XD,{children:[x.jsx(YD,{children:"Unregister project?"}),x.jsxs(JD,{children:["This removes ",x.jsx("strong",{children:c==null?void 0:c.name})," from SeeFlow. Your files at"," ",x.jsx("code",{className:"text-xs",children:c==null?void 0:c.repoPath})," will not be deleted."]})]}),f?x.jsx("div",{role:"alert","data-testid":"unregister-project-error",className:"rounded-md border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive",children:f}):null,x.jsxs(sy,{children:[x.jsx(oi,{type:"button",variant:"ghost",onClick:g,disabled:u,children:"Cancel"}),x.jsx(oi,{type:"button",variant:"destructive",onClick:S,disabled:u,"data-testid":"unregister-project-confirm",children:u?"Unregistering…":"Unregister"})]})]})})]})}function Jxe({demos:e,currentSlug:t,onProjectCreated:n,onProjectUnregistered:r}){return x.jsxs("header",{className:"flex h-12 shrink-0 items-center justify-between border-b border-border bg-background px-4",children:[x.jsxs("button",{type:"button",onClick:()=>wf("/"),style:{display:"flex",alignItems:"center",gap:6,fontWeight:700,fontSize:16,letterSpacing:"-0.02em",background:"none",border:"none",cursor:"pointer",padding:0},children:[x.jsx(jp,{size:20,strokeWidth:2,className:"text-emerald-400"}),"SeeFlow"]}),x.jsx("div",{className:"flex items-center gap-3",children:x.jsx(Yxe,{demos:e,currentSlug:t,onProjectCreated:n,onProjectUnregistered:r})})]})}var Qxe=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),ewe="VisuallyHidden",z1e=M.forwardRef((e,t)=>x.jsx(Jt.span,{...e,ref:t,style:{...Qxe,...e.style}}));z1e.displayName=ewe;var twe=z1e,[oq]=xs("Tooltip",[Vf]),sq=Vf(),O1e="TooltipProvider",nwe=700,oW="tooltip.open",[rwe,LK]=oq(O1e),F1e=e=>{const{__scopeTooltip:t,delayDuration:n=nwe,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:a}=e,o=M.useRef(!0),s=M.useRef(!1),c=M.useRef(0);return M.useEffect(()=>{const l=c.current;return()=>window.clearTimeout(l)},[]),x.jsx(rwe,{scope:t,isOpenDelayedRef:o,delayDuration:n,onOpen:M.useCallback(()=>{window.clearTimeout(c.current),o.current=!1},[]),onClose:M.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>o.current=!0,r)},[r]),isPointerInTransitRef:s,onPointerInTransitChange:M.useCallback(l=>{s.current=l},[]),disableHoverableContent:i,children:a})};F1e.displayName=O1e;var ly="Tooltip",[iwe,zy]=oq(ly),B1e=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:i,onOpenChange:a,disableHoverableContent:o,delayDuration:s}=e,c=LK(ly,e.__scopeTooltip),l=sq(t),[u,d]=M.useState(null),f=da(),h=M.useRef(0),y=o??c.disableHoverableContent,v=s??c.delayDuration,k=M.useRef(!1),[g,S]=Of({prop:r,defaultProp:i??!1,onChange:j=>{j?(c.onOpen(),document.dispatchEvent(new CustomEvent(oW))):c.onClose(),a==null||a(j)},caller:ly}),w=M.useMemo(()=>g?k.current?"delayed-open":"instant-open":"closed",[g]),C=M.useCallback(()=>{window.clearTimeout(h.current),h.current=0,k.current=!1,S(!0)},[S]),_=M.useCallback(()=>{window.clearTimeout(h.current),h.current=0,S(!1)},[S]),A=M.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{k.current=!0,S(!0),h.current=0},v)},[v,S]);return M.useEffect(()=>()=>{h.current&&(window.clearTimeout(h.current),h.current=0)},[]),x.jsx(bK,{...l,children:x.jsx(iwe,{scope:t,contentId:f,open:g,stateAttribute:w,trigger:u,onTriggerChange:d,onTriggerEnter:M.useCallback(()=>{c.isOpenDelayedRef.current?A():C()},[c.isOpenDelayedRef,A,C]),onTriggerLeave:M.useCallback(()=>{y?_():(window.clearTimeout(h.current),h.current=0)},[_,y]),onOpen:C,onClose:_,disableHoverableContent:y,children:n})})};B1e.displayName=ly;var sW="TooltipTrigger",H1e=M.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=zy(sW,n),a=LK(sW,n),o=sq(n),s=M.useRef(null),c=Nn(t,s,i.onTriggerChange),l=M.useRef(!1),u=M.useRef(!1),d=M.useCallback(()=>l.current=!1,[]);return M.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),x.jsx(iq,{asChild:!0,...o,children:x.jsx(Jt.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:c,onPointerMove:St(e.onPointerMove,f=>{f.pointerType!=="touch"&&!u.current&&!a.isPointerInTransitRef.current&&(i.onTriggerEnter(),u.current=!0)}),onPointerLeave:St(e.onPointerLeave,()=>{i.onTriggerLeave(),u.current=!1}),onPointerDown:St(e.onPointerDown,()=>{i.open&&i.onClose(),l.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:St(e.onFocus,()=>{l.current||i.onOpen()}),onBlur:St(e.onBlur,i.onClose),onClick:St(e.onClick,i.onClose)})})});H1e.displayName=sW;var IK="TooltipPortal",[awe,owe]=oq(IK,{forceMount:void 0}),V1e=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,a=zy(IK,t);return x.jsx(awe,{scope:t,forceMount:n,children:x.jsx(lo,{present:n||a.open,children:x.jsx(Ny,{asChild:!0,container:i,children:r})})})};V1e.displayName=IK;var bf="TooltipContent",U1e=M.forwardRef((e,t)=>{const n=owe(bf,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i="top",...a}=e,o=zy(bf,e.__scopeTooltip);return x.jsx(lo,{present:r||o.open,children:o.disableHoverableContent?x.jsx($1e,{side:i,...a,ref:t}):x.jsx(swe,{side:i,...a,ref:t})})}),swe=M.forwardRef((e,t)=>{const n=zy(bf,e.__scopeTooltip),r=LK(bf,e.__scopeTooltip),i=M.useRef(null),a=Nn(t,i),[o,s]=M.useState(null),{trigger:c,onClose:l}=n,u=i.current,{onPointerInTransitChange:d}=r,f=M.useCallback(()=>{s(null),d(!1)},[d]),h=M.useCallback((y,v)=>{const k=y.currentTarget,g={x:y.clientX,y:y.clientY},S=hwe(g,k.getBoundingClientRect()),w=fwe(g,S),C=pwe(v.getBoundingClientRect()),_=gwe([...w,...C]);s(_),d(!0)},[d]);return M.useEffect(()=>()=>f(),[f]),M.useEffect(()=>{if(c&&u){const y=k=>h(k,u),v=k=>h(k,c);return c.addEventListener("pointerleave",y),u.addEventListener("pointerleave",v),()=>{c.removeEventListener("pointerleave",y),u.removeEventListener("pointerleave",v)}}},[c,u,h,f]),M.useEffect(()=>{if(o){const y=v=>{const k=v.target,g={x:v.clientX,y:v.clientY},S=(c==null?void 0:c.contains(k))||(u==null?void 0:u.contains(k)),w=!ywe(g,o);S?f():w&&(f(),l())};return document.addEventListener("pointermove",y),()=>document.removeEventListener("pointermove",y)}},[c,u,o,l,f]),x.jsx($1e,{...e,ref:a})}),[cwe,lwe]=oq(ly,{isInside:!1}),uwe=xke("TooltipContent"),$1e=M.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:a,onPointerDownOutside:o,...s}=e,c=zy(bf,n),l=sq(n),{onClose:u}=c;return M.useEffect(()=>(document.addEventListener(oW,u),()=>document.removeEventListener(oW,u)),[u]),M.useEffect(()=>{if(c.trigger){const d=f=>{const h=f.target;h!=null&&h.contains(c.trigger)&&u()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[c.trigger,u]),x.jsx(Py,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:d=>d.preventDefault(),onDismiss:u,children:x.jsxs(MK,{"data-state":c.stateAttribute,...l,...s,ref:t,style:{...s.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[x.jsx(uwe,{children:r}),x.jsx(cwe,{scope:n,isInside:!0,children:x.jsx(twe,{id:c.contentId,role:"tooltip",children:i||r})})]})})});U1e.displayName=bf;var W1e="TooltipArrow",dwe=M.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=sq(n);return lwe(W1e,n).isInside?null:x.jsx(SK,{...i,...r,ref:t})});dwe.displayName=W1e;function hwe(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,i,a)){case a:return"left";case i:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function fwe(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function pwe(e){const{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function ywe(e,t){const{x:n,y:r}=e;let i=!1;for(let a=0,o=t.length-1;a<t.length;o=a++){const s=t[a],c=t[o],l=s.x,u=s.y,d=c.x,f=c.y;u>r!=f>r&&n<(d-l)*(r-u)/(f-u)+l&&(i=!i)}return i}function gwe(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),mwe(t)}function mwe(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const i=e[r];for(;t.length>=2;){const a=t[t.length-1],o=t[t.length-2];if((a.x-o.x)*(i.y-o.y)>=(a.y-o.y)*(i.x-o.x))t.pop();else break}t.push(i)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const i=e[r];for(;n.length>=2;){const a=n[n.length-1],o=n[n.length-2];if((a.x-o.x)*(i.y-o.y)>=(a.y-o.y)*(i.x-o.x))n.pop();else break}n.push(i)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var vwe=F1e,kwe=B1e,xwe=H1e,wwe=V1e,G1e=U1e;const Tp=vwe,Oy=kwe,Fy=xwe,$f=M.forwardRef(({className:e,sideOffset:t=4,...n},r)=>x.jsx(wwe,{children:x.jsx(G1e,{ref:r,sideOffset:t,className:Ze("z-50 overflow-hidden rounded-md bg-foreground px-3 py-1.5 text-sm text-background shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));$f.displayName=G1e.displayName;const bwe=e=>{const[t,n]=M.useState(null),[r,i]=M.useState(e!==null),[a,o]=M.useState(null),s=M.useCallback(()=>{e&&(i(!0),Hue(e).then(c=>{n(c),o(null)}).catch(c=>{console.error("[useDemoData] failed",c),o(String(c))}).finally(()=>i(!1)))},[e]);return M.useEffect(()=>{if(!e){n(null),i(!1);return}s()},[e,s]),{detail:t,loading:r,error:a,refresh:s}},Mwe=()=>{const[e,t]=M.useState(null),[n,r]=M.useState(null),i=M.useCallback(()=>U4e().then(a=>{t(a),r(null)}).catch(a=>{console.error("[useDemos] failed",a),t([]),r(String(a))}),[]);return M.useEffect(()=>{i()},[i]),{demos:e,error:n,refresh:i}},Swe=5,Cwe={"node:running":"running","node:done":"done","node:error":"error"},Lwe=(e,t)=>{if(t.type==="reset")return{};const n=e[t.nodeId]??[],r=[t.entry,...n].slice(0,Swe);return{...e,[t.nodeId]:r}},Iwe=e=>{const[t,n]=M.useReducer(Lwe,{}),r=M.useRef(n);r.current=n,M.useEffect(()=>{r.current({type:"reset"})},[e]);const i=M.useCallback(o=>{const s=Cwe[o.type];if(!s)return;const c=typeof o.nodeId=="string"?o.nodeId:null;if(!c)return;const l=typeof o.runId=="string"?o.runId:void 0,u=typeof o.ts=="number"?o.ts:Date.now();r.current({type:"append",nodeId:c,entry:{status:s,ts:u,runId:l}})},[]),a=M.useCallback(()=>{r.current({type:"reset"})},[]);return{events:t,apply:i,reset:a}},Awe=(e,t)=>{var n,r;switch(t.type){case"reset":return{};case"running":return{...e,[t.nodeId]:{status:"running",runId:t.runId,ts:t.ts??Date.now()}};case"done":return{...e,[t.nodeId]:{...e[t.nodeId],status:"done",runId:t.runId??((n=e[t.nodeId])==null?void 0:n.runId),responseStatus:t.responseStatus,body:t.body,ts:t.ts??Date.now()}};case"error":return{...e,[t.nodeId]:{...e[t.nodeId],status:"error",runId:t.runId??((r=e[t.nodeId])==null?void 0:r.runId),error:t.message,ts:t.ts??Date.now()}}}},_we=e=>{const[t,n]=M.useReducer(Awe,{}),r=M.useRef(n);r.current=n,M.useEffect(()=>{r.current({type:"reset"})},[e]);const i=M.useCallback(o=>{const s=typeof o.nodeId=="string"?o.nodeId:null;if(!s)return;const c=typeof o.runId=="string"?o.runId:void 0;if(o.type==="node:running"){r.current({type:"running",nodeId:s,runId:c,ts:o.ts});return}if(o.type==="node:done"){const l=typeof o.status=="number"?o.status:void 0;r.current({type:"done",nodeId:s,runId:c,responseStatus:l,body:o.body,ts:o.ts});return}if(o.type==="node:error"){const l=typeof o.message=="string"?o.message:void 0;r.current({type:"error",nodeId:s,runId:c,message:l,ts:o.ts})}},[]),a=M.useCallback(()=>{r.current({type:"reset"})},[]);return{runs:t,apply:i,reset:a}},Ewe=new Set(["ok","warn","error","pending"]),Pwe=(e,t)=>{if(t.type!=="node:status")return e;const n=typeof t.nodeId=="string"?t.nodeId:null;if(!n||typeof t.state!="string"||!Ewe.has(t.state))return e;const r=typeof t.summary=="string"?t.summary:void 0,i=typeof t.detail=="string"?t.detail:void 0,a=t.data&&typeof t.data=="object"&&!Array.isArray(t.data)?t.data:void 0,o=typeof t.ts=="number"?t.ts:Date.now();return{...e,[n]:{state:t.state,summary:r,detail:i,data:a,ts:o}}},Nwe=(e,t)=>{switch(t.type){case"reset":return{};case"event":return Pwe(e,t.event)}},Rwe=e=>{const[t,n]=M.useReducer(Nwe,{}),r=M.useRef(n);r.current=n,M.useEffect(()=>{r.current({type:"reset"})},[e]);const i=M.useCallback(o=>{r.current({type:"event",event:o})},[]),a=M.useCallback(()=>{r.current({type:"reset"})},[]);return{statusByNode:t,apply:i,reset:a}},jwe=(e,t={})=>{const[n,r]=M.useState(null),[i,a]=M.useState(!1),{onReload:o,onEvent:s}=t;return M.useEffect(()=>{if(!e){r(null),a(!1);return}const c=`/api/events?demoId=${encodeURIComponent(e)}`,l=new EventSource(c);l.addEventListener("open",()=>a(!0)),l.addEventListener("error",()=>a(!1)),l.addEventListener("hello",()=>{o==null||o()}),l.addEventListener("demo:reload",u=>{const d=xJ(u,"demo:reload");r(d),s==null||s(d),o==null||o()});for(const u of["node:running","node:done","node:error","node:status"])l.addEventListener(u,d=>{s==null||s(xJ(d,u))});return()=>{l.close()}},[e,o,s]),{lastReload:n,connected:i}},xJ=(e,t)=>{try{const n=JSON.parse(e.data);return{type:t,ts:Date.now(),...n}}catch{return{type:t,ts:Date.now()}}},K1e="seeflow:last-project",Twe=()=>{if(typeof window>"u")return null;try{return window.localStorage.getItem(K1e)}catch{return null}},wJ=e=>{if(!(typeof window>"u"))try{window.localStorage.setItem(K1e,e)}catch{}},Dwe=(e,t)=>{if(e.length===0)return null;if(e.length===1)return e[0]??null;if(t){const n=e.find(r=>r.id===t);if(n)return n}return null},qwe=typeof navigator<"u"&&typeof navigator.platform=="string"&&navigator.platform.toLowerCase().includes("mac"),zwe=e=>e.length===1?e.toUpperCase():e==="Escape"?"Esc":e,Ar=(e,t=qwe)=>{const n=zwe(e.key);if(t){let i="";return e.meta&&(i+="⌘"),e.alt&&(i+="⌥"),e.shift&&(i+="⇧"),`${i}${n}`}const r=[];return e.meta&&r.push("Ctrl"),e.shift&&r.push("Shift"),e.alt&&r.push("Alt"),r.push(n),r.join("+")},AK=[{id:"tool.select",label:"Select tool",description:"Switch to the selection / pan tool",category:"Tools",shortcut:Ar({key:"V"})},{id:"tool.rectangle",label:"Rectangle",description:"Draw rectangle nodes",category:"Tools",shortcut:Ar({key:"R"})},{id:"tool.ellipse",label:"Ellipse",description:"Draw ellipse nodes",category:"Tools",shortcut:Ar({key:"O"})},{id:"tool.text",label:"Text",description:"Add a text node",category:"Tools",shortcut:Ar({key:"T"})},{id:"tool.sticky",label:"Sticky note",description:"Add a sticky note",category:"Tools",shortcut:Ar({key:"S"})},{id:"tool.database",label:"Database",description:"Add a database node",category:"Tools",shortcut:Ar({key:"D"})},{id:"tool.server",label:"Server",description:"Add a server node",category:"Tools"},{id:"tool.user",label:"User",description:"Add a user node",category:"Tools"},{id:"tool.queue",label:"Queue",description:"Add a queue node",category:"Tools"},{id:"tool.cloud",label:"Cloud",description:"Add a cloud node",category:"Tools"},{id:"edit.undo",label:"Undo",category:"Edit",shortcut:Ar({meta:!0,key:"Z"}),enabled:e=>e.canUndo},{id:"edit.redo",label:"Redo",category:"Edit",shortcut:Ar({meta:!0,shift:!0,key:"Z"}),enabled:e=>e.canRedo},{id:"edit.copy",label:"Copy",category:"Edit",shortcut:Ar({meta:!0,key:"C"}),enabled:e=>e.hasSelection},{id:"edit.paste",label:"Paste",category:"Edit",shortcut:Ar({meta:!0,key:"V"}),enabled:e=>e.hasClipboard},{id:"edit.duplicate",label:"Duplicate",category:"Edit",shortcut:Ar({meta:!0,key:"D"}),enabled:e=>e.hasSelection},{id:"edit.delete",label:"Delete",category:"Edit",shortcut:Ar({key:"Delete"}),enabled:e=>e.hasSelection},{id:"edit.selectAll",label:"Select all",category:"Edit",shortcut:Ar({meta:!0,key:"A"})},{id:"view.fit",label:"Fit view",description:"Fit everything in the viewport",category:"View",shortcut:Ar({meta:!0,key:"0"})},{id:"view.zoomIn",label:"Zoom in",category:"View",shortcut:Ar({meta:!0,key:"="})},{id:"view.zoomOut",label:"Zoom out",category:"View",shortcut:Ar({meta:!0,key:"-"})},{id:"view.zoom100",label:"Zoom to 100%",category:"View",shortcut:Ar({key:"1"})},{id:"view.zoomToSelection",label:"Zoom to selection",category:"View",shortcut:Ar({key:"F"}),enabled:e=>e.hasSelection},{id:"layout.tidy",label:"Tidy layout",description:"Auto-layout the canvas or current selection",category:"Layout",shortcut:Ar({meta:!0,shift:!0,key:"L"})},{id:"selection.deselect",label:"Deselect",description:"Clear selection and exit draw mode",category:"Selection",shortcut:Ar({key:"Escape"})},{id:"help.commandPalette",label:"Open command palette",category:"Help",shortcut:Ar({meta:!0,key:"P"})},{id:"export.pdf",label:"Export to PDF",description:"Download the current canvas as a PDF",category:"File",enabled:e=>e.canExportDemo},{id:"export.png",label:"Export as image",description:"Download the current canvas as a PNG",category:"File",enabled:e=>e.canExportDemo},{id:"session.reset",label:"Restart the demo",description:"Stop running scripts and re-run the reset script",category:"File",enabled:e=>e.canResetSession}],bJ=e=>{const t=AK.find(n=>n.id===e);return t?t.shortcut?`${t.label} (${t.shortcut})`:t.label:""},Owe=1,Fwe=10,Bwe=e=>{if(e.metaKey||e.ctrlKey||e.altKey)return null;const t=e.shiftKey?Fwe:Owe;switch(e.key){case"ArrowLeft":return{dx:-t,dy:0};case"ArrowRight":return{dx:t,dy:0};case"ArrowUp":return{dx:0,dy:-t};case"ArrowDown":return{dx:0,dy:t};default:return null}},Hwe=e=>{if(!(e.metaKey||e.ctrlKey)||e.altKey)return null;switch(e.key){case"0":return"fit";case"=":case"+":return"in";case"-":case"_":return"out";default:return null}},Vwe=(e,t,n)=>{if(t.length===0)return[];const r=new Map(n.map(a=>[a.id,a])),i=[];for(const a of t){const o=r.get(a);o&&i.push({id:a,position:{x:o.position.x+e.dx,y:o.position.y+e.dy}})}return i},Uwe=({event:e,isEditableActive:t,hasNodes:n,hasConnectors:r,selectedIds:i,hasClipboard:a})=>{if(!(e.metaKey||e.ctrlKey))return{type:"noop"};if(e.shiftKey||e.altKey)return{type:"noop"};const o=e.key.toLowerCase();return o!=="a"&&o!=="c"&&o!=="v"&&o!=="d"?{type:"noop"}:t?{type:"noop"}:o==="a"?!n&&!r?{type:"noop"}:{type:"selectAll"}:o==="c"?i.length===0?{type:"noop"}:{type:"copy",ids:i}:o==="d"?i.length===0?{type:"noop"}:{type:"duplicate",ids:i}:a?{type:"paste"}:{type:"noop"}},$we=e=>{if(e.metaKey||e.ctrlKey||e.shiftKey||e.altKey)return null;switch(e.key.toLowerCase()){case"v":return"select";case"r":return"rectangle";case"o":return"ellipse";case"t":return"text";case"s":return"sticky";case"d":return"database";default:return null}},MJ=["File","Edit","View","Tools","Layout","Selection","Help"],Z1e="seeflow:command-palette:recent",X1e=5,Y1e=new Map(AK.map(e=>[e.id,e])),Wwe=e=>typeof e=="string"&&Y1e.has(e),SJ=()=>{if(typeof window>"u")return[];try{const e=window.localStorage.getItem(Z1e);if(!e)return[];const t=JSON.parse(e);return Array.isArray(t)?t.filter(Wwe).slice(0,X1e):[]}catch{return[]}},Gwe=e=>{if(!(typeof window>"u"))try{window.localStorage.setItem(Z1e,JSON.stringify(e))}catch{}},CJ=(e,t)=>e.enabled?e.enabled(t):!0,Kwe=(e,t)=>t.length===0?!0:`${e.label} ${e.description??""}`.toLowerCase().includes(t);function Zwe({open:e,onOpenChange:t,runCommand:n,ctx:r}){const[i,a]=M.useState(""),[o,s]=M.useState(0),[c,l]=M.useState(()=>SJ()),u=M.useRef(null),d=M.useRef(null);M.useEffect(()=>{e&&(a(""),s(0),l(SJ()))},[e]);const{groups:f,flat:h}=M.useMemo(()=>{const C=i.trim().toLowerCase();if(C.length===0){if(c.length===0)return{groups:[],flat:[]};const T=[];for(const I of c){const R=Y1e.get(I);R&&T.push({cmd:R,enabled:CJ(R,r)})}return{groups:[{category:"Recent",rows:T}],flat:T}}const _=new Map;for(const T of AK){if(!Kwe(T,C))continue;const D={cmd:T,enabled:CJ(T,r)},I=_.get(T.category);I?I.push(D):_.set(T.category,[D])}const j=[...MJ.filter(T=>_.has(T)),...Array.from(_.keys()).filter(T=>!MJ.includes(T))].map(T=>({category:T,rows:_.get(T)??[]})),O=j.flatMap(T=>T.rows);return{groups:j,flat:O}},[i,r,c]);M.useEffect(()=>{if(h.length===0){s(0);return}s(C=>{var A;let _=C;if(_>=h.length&&(_=0),!((A=h[_])!=null&&A.enabled)){const j=h.findIndex(O=>O.enabled);j!==-1&&(_=j)}return _})},[h]);const y=M.useCallback(C=>{h.length!==0&&s(_=>{var j;let A=_;for(let O=0;O<h.length;O++)if(A=(A+C+h.length)%h.length,(j=h[A])!=null&&j.enabled)return A;return _})},[h]),v=M.useCallback(C=>{l(_=>{const A=[C,..._.filter(j=>j!==C)].slice(0,X1e);return Gwe(A),A})},[]),k=M.useCallback(C=>{const _=h[C];!_||!_.enabled||(v(_.cmd.id),n(_.cmd.id),t(!1))},[h,t,v,n]),g=M.useCallback(C=>{if(C.key==="ArrowDown"){C.preventDefault(),y(1);return}if(C.key==="ArrowUp"){C.preventDefault(),y(-1);return}C.key==="Enter"&&(C.preventDefault(),k(o))},[k,o,y]);M.useEffect(()=>{if(!e)return;const C=d.current;if(!C)return;const _=C.querySelector(`[data-command-row-index="${o}"]`);_&&typeof _.scrollIntoView=="function"&&_.scrollIntoView({block:"nearest"})},[o,e]);const w=i.trim().length>0;return x.jsx($D,{open:e,onOpenChange:t,children:x.jsx(WD,{children:x.jsxs(Ff,{className:Ze("fixed left-0 right-0 top-[20%] z-50 mx-auto w-[480px] max-w-[90vw] border border-border bg-card shadow-lg duration-200","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","sm:rounded-lg"),"data-testid":"command-palette",onOpenAutoFocus:C=>{var _;C.preventDefault(),(_=u.current)==null||_.focus()},children:[x.jsx("div",{className:Ze("border-b",h.length===0&&!w&&"border-b-0"),children:x.jsx("input",{ref:u,type:"text",value:i,onChange:C=>a(C.target.value),onKeyDown:g,placeholder:"Type a command…","data-testid":"command-palette-input","aria-label":"Search commands",autoComplete:"off",spellCheck:!1,className:"w-full bg-transparent px-4 py-3 text-sm outline-none placeholder:text-muted-foreground"})}),x.jsx("div",{ref:d,"data-testid":"command-palette-list","data-empty":h.length===0?"true":"false",className:Ze("max-h-[50vh] overflow-y-auto",h.length>0?"py-1":"","seeflow-no-scrollbar"),children:h.length===0?w?x.jsxs("div",{"data-testid":"command-palette-empty",className:"px-4 py-6 text-center text-sm text-muted-foreground",children:['No commands match "',i,'"']}):null:(()=>{let C=-1;return f.map(_=>x.jsxs("div",{className:"py-1",children:[x.jsx("div",{className:"px-3 pb-1 pt-2 text-xs font-medium uppercase tracking-wide text-muted-foreground",children:_.category}),_.rows.map(A=>{C+=1;const j=C,O=j===o;return x.jsxs("button",{type:"button","data-testid":`command-palette-row-${A.cmd.id}`,"data-command-row-index":j,"data-highlighted":O?"true":"false","aria-disabled":A.enabled?void 0:!0,disabled:!A.enabled,onMouseEnter:()=>{A.enabled&&s(j)},onClick:()=>k(j),className:Ze("flex w-full items-center justify-between gap-3 px-3 py-2 text-left text-sm outline-none",A.enabled?"cursor-pointer text-foreground hover:bg-muted":"cursor-not-allowed text-muted-foreground/50",O&&A.enabled?"bg-muted":""),children:[x.jsxs("div",{className:"flex min-w-0 flex-col",children:[x.jsx("span",{className:"truncate font-medium",children:A.cmd.label}),A.cmd.description?x.jsx("span",{className:"truncate text-xs text-muted-foreground",children:A.cmd.description}):null]}),A.cmd.shortcut?x.jsx("kbd",{"data-testid":`command-palette-shortcut-${A.cmd.id}`,className:"shrink-0 rounded border bg-muted px-1.5 py-0.5 font-mono text-[11px] text-muted-foreground",children:A.cmd.shortcut}):null]},A.cmd.id)})]},_.category))})()})]})})})}const J1e="seeflow:icon-recents",Xwe=16;function Q1e(){if(typeof window>"u")return[];try{const e=window.localStorage.getItem(J1e);if(e===null)return[];const t=JSON.parse(e);return Array.isArray(t)?t.every(n=>typeof n=="string")?t:[]:[]}catch{return[]}}function Ywe(e){if(!(typeof window>"u"))try{const n=Q1e().filter(i=>i!==e),r=[e,...n].slice(0,Xwe);window.localStorage.setItem(J1e,JSON.stringify(r))}catch{}}const Jwe=new Set(["createLucideIcon","Icon","icons","default"]),Qwe=Symbol.for("react.forward_ref");function e6e(e){return typeof e=="function"?!0:e!==null&&typeof e=="object"?e.$$typeof===Qwe:!1}function t6e(e){return e.replace(/[A-Z]/g,(t,n)=>n===0?t.toLowerCase():`-${t.toLowerCase()}`)}function n6e(){const e={};for(const[t,n]of Object.entries(H4e))Jwe.has(t)||e6e(n)&&(e[t6e(t)]=n);return e}const KT=n6e(),r6e=Object.keys(KT).sort(),A0=8,tm=32,aO=256,LJ=2;function i6e(e,t){const n=t.trim().toLowerCase();return n===""?e.slice():e.filter(r=>r.toLowerCase().includes(n))}function a6e({open:e,onOpenChange:t,anchor:n,onPick:r}){const[i,a]=M.useState(""),o=M.useMemo(()=>e?Q1e():[],[e]);return M.useEffect(()=>{e||a("")},[e]),x.jsxs(Uf,{open:e,onOpenChange:t,children:[x.jsx(qy,{asChild:!0,children:n}),x.jsx(Fh,{align:"start",side:"bottom",sideOffset:6,className:"w-[340px] p-0","data-testid":"icon-picker-popover",children:x.jsx(o6e,{query:i,onQueryChange:a,recents:o,onPick:r})})]})}function o6e({query:e,onQueryChange:t,recents:n,onPick:r}){const i=M.useMemo(()=>i6e(r6e,e),[e]),a=e.trim()===""&&n.length>0,[o,s]=M.useState(0),c=Math.max(1,Math.ceil(i.length/A0)),l=c*tm,u=Math.ceil(aO/tm)+LJ*2,d=Math.max(0,Math.floor(o/tm)-LJ),f=Math.min(c,d+u),h=d*A0,y=Math.min(i.length,f*A0),v=i.slice(h,y);return x.jsxs("div",{className:"flex w-full flex-col",children:[x.jsx("div",{className:"border-b border-border p-2",children:x.jsx("input",{type:"text",value:e,placeholder:"Search icons…","aria-label":"Search icons","data-testid":"icon-picker-search",className:Ze("flex h-8 w-full rounded-md border border-input bg-background px-3 text-sm","placeholder:text-muted-foreground","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1"),onChange:k=>t(k.target.value)})}),a?x.jsxs("div",{className:"border-b border-border p-2","data-testid":"icon-picker-recents",children:[x.jsx("div",{className:"mb-1 px-1 text-[11px] font-medium uppercase tracking-wide text-muted-foreground",children:"Recent"}),x.jsx("div",{className:"grid gap-1",style:{gridTemplateColumns:`repeat(${A0}, minmax(0, 1fr))`},children:n.map(k=>IJ(k,r,`icon-picker-recent-${k}`))})]}):null,x.jsxs("div",{className:"p-2",children:[x.jsx("div",{className:"mb-1 px-1 text-[11px] font-medium uppercase tracking-wide text-muted-foreground",children:"All icons"}),i.length===0?x.jsx("div",{className:"flex items-center justify-center text-xs text-muted-foreground",style:{height:aO},"data-testid":"icon-picker-empty",children:"No icons match."}):x.jsx("div",{"data-testid":"icon-picker-all",className:"overflow-y-auto",style:{height:aO},onScroll:k=>s(k.currentTarget.scrollTop),children:x.jsx("div",{style:{height:l,position:"relative"},children:x.jsx("div",{style:{position:"absolute",top:d*tm,left:0,right:0},children:x.jsx("div",{className:"grid gap-1",style:{gridTemplateColumns:`repeat(${A0}, minmax(0, 1fr))`},children:v.map(k=>IJ(k,r,`icon-picker-tile-${k}`))})})})})]})]})}function IJ(e,t,n){const r=KT[e];return x.jsx("button",{type:"button",title:e,"aria-label":e,"data-testid":n,"data-icon-name":e,onClick:()=>t(e),className:Ze("inline-flex h-7 w-7 items-center justify-center rounded-md text-muted-foreground transition-colors","hover:bg-accent hover:text-accent-foreground","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1"),children:r?x.jsx(r,{className:"h-4 w-4","aria-hidden":"true"}):null},n)}const AJ="application/x-seeflow-create-html-block",ede=[{shape:"rectangle",label:"Rectangle",commandId:"tool.rectangle",Icon:Ap},{shape:"ellipse",label:"Ellipse",commandId:"tool.ellipse",Icon:cp}],tde=[{shape:"sticky",label:"Sticky note",commandId:"tool.sticky",Icon:_p},{shape:"text",label:"Text",commandId:"tool.text",Icon:ef}],cW=[{shape:"database",label:"Database",commandId:"tool.database",Icon:up},{shape:"server",label:"Server",commandId:"tool.server",Icon:Cp},{shape:"user",label:"User",commandId:"tool.user",Icon:Rp},{shape:"queue",label:"Queue",commandId:"tool.queue",Icon:Tc},{shape:"cloud",label:"Cloud",commandId:"tool.cloud",Icon:lp}],s6e=[...ede,...tde,...cW],_J="Insert icon",EJ="Shape";function c6e({activeShape:e,onSelectShape:t,iconPickerOpen:n,onOpenIconPicker:r,onCloseIconPicker:i,onPickIcon:a}){const[o,s]=M.useState(!1),c=e!==null&&cW.some(u=>u.shape===e),l=({shape:u,commandId:d,Icon:f})=>{const h=e===u,y=bJ(d);return x.jsx("button",{type:"button","data-testid":`toolbar-shape-${u}`,"data-active":h?"true":"false","aria-pressed":h,"aria-label":y,title:y,onClick:()=>t(h?null:u),className:Ze("inline-flex h-8 w-8 items-center justify-center rounded-md text-muted-foreground transition-colors",h?"bg-primary/10 text-primary border border-primary/30":"hover:bg-muted"),children:x.jsx(f,{className:"h-4 w-4"})},u)};return x.jsxs("div",{"data-testid":"canvas-toolbar",className:"pointer-events-auto flex flex-col items-center gap-1 rounded-lg border border-border bg-card p-1 shadow-md backdrop-blur",children:[ede.map(l),x.jsxs(Uf,{open:o,onOpenChange:s,children:[x.jsx(qy,{asChild:!0,children:x.jsx("button",{type:"button","data-testid":"toolbar-shape-picker","aria-label":EJ,"aria-pressed":o||c,title:EJ,className:Ze("inline-flex h-8 w-8 items-center justify-center rounded-md text-muted-foreground transition-colors",o||c?"bg-primary/10 text-primary border border-primary/30":"hover:bg-muted"),children:x.jsx(Lp,{className:"h-4 w-4","aria-hidden":"true"})})}),x.jsx(Fh,{align:"start",side:"right",sideOffset:6,className:"w-auto p-1","data-testid":"shape-picker-popover",onOpenAutoFocus:u=>{u.preventDefault()},children:x.jsx("div",{role:"menu","aria-label":"More shapes",className:"flex flex-col gap-0.5",children:cW.map(({shape:u,label:d,commandId:f,Icon:h})=>{const y=e===u,v=bJ(f);return x.jsxs("button",{type:"button",role:"menuitem","data-testid":`shape-picker-${u}`,"data-active":y?"true":"false","aria-pressed":y,"aria-label":v,title:v,onClick:()=>{t(y?null:u),s(!1)},className:Ze("flex items-center gap-2 rounded-sm px-2 py-1.5 text-left text-sm",y?"bg-primary/10 text-primary border border-primary/30":"hover:bg-muted focus:bg-muted focus:outline-none"),children:[x.jsx(h,{className:"h-4 w-4 text-muted-foreground","aria-hidden":"true"}),x.jsx("span",{children:d})]},u)})})})]}),a?x.jsx(a6e,{open:n??!1,onOpenChange:u=>{u?r==null||r():i==null||i()},anchor:x.jsx("button",{type:"button","data-testid":"toolbar-insert-icon","aria-label":_J,"aria-pressed":n??!1,title:_J,className:Ze("inline-flex h-8 w-8 items-center justify-center rounded-md text-muted-foreground transition-colors",n?"bg-primary/10 text-primary border border-primary/30":"hover:bg-muted"),children:x.jsx(Q2,{className:"h-4 w-4","aria-hidden":"true"})}),onPick:a}):null,x.jsx("div",{className:"my-1 h-px w-6 bg-border","aria-hidden":"true"}),tde.map(l)]})}const l6e=(e,t={})=>{const n=t.setTimer??((l,u)=>globalThis.setTimeout(l,u)),r=t.clearTimer??(l=>{globalThis.clearTimeout(l)});let i=null,a=null;return{schedule:l=>{i!==null&&r(i),a=l,i=n(()=>{i=null;const u=a;a=null,u&&u()},e)},flush:()=>{i!==null&&(r(i),i=null);const l=a;a=null,l&&l()},cancel:()=>{i!==null&&(r(i),i=null),a=null},get pending(){return i!==null}}};function us({initialValue:e,onCommit:t,onExit:n,multiline:r=!1,commitMode:i="enter-commits",required:a=!1,field:o,className:s,style:c,placeholder:l}){const u=r||i==="blur-only",d=M.useRef(null),[f,h]=M.useState(!1),[y,v]=M.useState(e.length===0),k=M.useRef(l6e(400)),g=M.useRef(e),S=M.useRef(!1);M.useEffect(()=>{const I=d.current;if(!I)return;I.textContent=e,I.focus();const R=window.getSelection();if(R){const q=document.createRange();q.selectNodeContents(I),R.removeAllRanges(),R.addRange(q)}const U=k.current;return()=>{U.cancel()}},[]);const w=()=>{const I=d.current;return I?u?I.innerText:I.textContent??"":""},C=I=>{k.current.cancel(),I!==g.current&&(g.current=I,t(I))},_=()=>{const I=w();if(v(I.length===0),a&&I.trim().length===0){k.current.cancel();return}k.current.schedule(()=>C(I))},A=()=>{k.current.cancel();const I=w();if(a&&I.trim().length===0){const R=d.current;R&&(R.textContent=e),h(!0),setTimeout(()=>h(!1),320),n();return}C(I),n()},j=()=>{k.current.cancel();const I=d.current;I&&(I.textContent=e),n()},O=I=>{if(I.stopPropagation(),I.nativeEvent.stopPropagation(),I.key==="Enter"){if(i==="blur-only"||r&&I.shiftKey){I.preventDefault(),document.execCommand("insertText",!1,`
7785
7785
  `);return}I.preventDefault(),S.current=!0,A();return}I.key==="Escape"&&(I.preventDefault(),S.current=!0,j())},T=I=>{I.preventDefault();const R=I.clipboardData.getData("text/plain");document.execCommand("insertText",!1,R)},D=()=>{if(S.current){S.current=!1;return}A()};return x.jsx("div",{ref:d,"data-testid":"inline-edit-input","data-field":o,"data-placeholder":l,role:"textbox",tabIndex:0,contentEditable:!0,suppressContentEditableWarning:!0,spellCheck:!1,onInput:_,onKeyDown:O,onPaste:T,onBlur:D,onMouseDown:I=>I.stopPropagation(),onClick:I=>I.stopPropagation(),onDoubleClick:I=>I.stopPropagation(),style:c,className:Ze("nodrag nopan nowheel block w-full bg-transparent p-0 text-inherit outline-none","whitespace-pre-wrap break-words",y&&l?"inline-edit-empty":"",f?"inline-edit-shake":"",s)})}const ZT=(e,t)=>{const n=e.w/2,r=e.h/2,i=e.x+n,a=e.y+r,o=t.x-i,s=t.y-a;if(o===0&&s===0)return{x:i,y:a,side:"right"};const c=Math.abs(o),l=Math.abs(s),u=c===0?Number.POSITIVE_INFINITY:n/c,d=l===0?Number.POSITIVE_INFINITY:r/l,f=Math.min(u,d),h=i+o*f,y=a+s*f,v=c*r>=l*n?o>=0?"right":"left":s>=0?"bottom":"top";return{x:h,y,side:v}},lW=(e,t)=>{const n=Math.max(0,Math.min(e.w,t.x-e.x)),r=Math.max(0,Math.min(e.h,t.y-e.y)),i=n,a=e.w-n,o=r,s=e.h-r,c=Math.min(i,a,o,s),l=e.h===0?0:r/e.h,u=e.w===0?0:n/e.w;return c===i?{side:"left",t:l}:c===a?{side:"right",t:l}:c===o?{side:"top",t:u}:{side:"bottom",t:u}},XT=(e,t)=>{const n=Math.min(1,Math.max(0,t.t));let r,i;switch(t.side){case"top":r=e.x+n*e.w,i=e.y;break;case"bottom":r=e.x+n*e.w,i=e.y+e.h;break;case"left":r=e.x,i=e.y+n*e.h;break;case"right":r=e.x+e.w,i=e.y+n*e.h;break}return{x:r,y:i,side:t.side}},u6e=(e,t)=>{const n=r=>Math.min(1,Math.max(0,r));switch(t.side){case"top":case"bottom":return{side:t.side,t:e.w===0?0:n((t.x-e.x)/e.w)};case"left":case"right":return{side:t.side,t:e.h===0?0:n((t.y-e.y)/e.h)}}},d6e=(e,t)=>{const n=(e==null?void 0:e.fallback)??{x:0,y:0,side:"right"},r=(t==null?void 0:t.fallback)??{x:0,y:0,side:"left"};if(!e||!t)return{source:n,target:r};const i={x:e.box.x+e.box.w/2,y:e.box.y+e.box.h/2},a={x:t.box.x+t.box.w/2,y:t.box.y+t.box.h/2},o=e.pin?XT(e.box,e.pin):e.autoPicked===!1?e.fallback:ZT(e.box,a),s=t.pin?XT(t.box,t.pin):t.autoPicked===!1?t.fallback:ZT(t.box,i);return{source:o,target:s}};function Ur(e){if(typeof e=="string"||typeof e=="number")return""+e;let t="";if(Array.isArray(e))for(let n=0,r;n<e.length;n++)(r=Ur(e[n]))!==""&&(t+=(t&&" ")+r);else for(let n in e)e[n]&&(t+=(t&&" ")+n);return t}var h6e={value:()=>{}};function cq(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new rT(n)}function rT(e){this._=e}function f6e(e,t){return e.trim().split(/^|\s+/).map(function(n){var r="",i=n.indexOf(".");if(i>=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}rT.prototype=cq.prototype={constructor:rT,on:function(e,t){var n=this._,r=f6e(e+"",n),i,a=-1,o=r.length;if(arguments.length<2){for(;++a<o;)if((i=(e=r[a]).type)&&(i=p6e(n[i],e.name)))return i;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++a<o;)if(i=(e=r[a]).type)n[i]=PJ(n[i],e.name,t);else if(t==null)for(i in n)n[i]=PJ(n[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new rT(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,a;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(a=this._[e],r=0,i=a.length;r<i;++r)a[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],i=0,a=r.length;i<a;++i)r[i].value.apply(t,n)}};function p6e(e,t){for(var n=0,r=e.length,i;n<r;++n)if((i=e[n]).name===t)return i.value}function PJ(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=h6e,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var uW="http://www.w3.org/1999/xhtml";const NJ={svg:"http://www.w3.org/2000/svg",xhtml:uW,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function lq(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),NJ.hasOwnProperty(t)?{space:NJ[t],local:e}:e}function y6e(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===uW&&t.documentElement.namespaceURI===uW?t.createElement(e):t.createElementNS(n,e)}}function g6e(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function nde(e){var t=lq(e);return(t.local?g6e:y6e)(t)}function m6e(){}function _K(e){return e==null?m6e:function(){return this.querySelector(e)}}function v6e(e){typeof e!="function"&&(e=_K(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,s=r[i]=new Array(o),c,l,u=0;u<o;++u)(c=a[u])&&(l=e.call(c,c.__data__,u,a))&&("__data__"in c&&(l.__data__=c.__data__),s[u]=l);return new Ha(r,this._parents)}function k6e(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function x6e(){return[]}function rde(e){return e==null?x6e:function(){return this.querySelectorAll(e)}}function w6e(e){return function(){return k6e(e.apply(this,arguments))}}function b6e(e){typeof e=="function"?e=w6e(e):e=rde(e);for(var t=this._groups,n=t.length,r=[],i=[],a=0;a<n;++a)for(var o=t[a],s=o.length,c,l=0;l<s;++l)(c=o[l])&&(r.push(e.call(c,c.__data__,l,o)),i.push(c));return new Ha(r,i)}function ide(e){return function(){return this.matches(e)}}function ade(e){return function(t){return t.matches(e)}}var M6e=Array.prototype.find;function S6e(e){return function(){return M6e.call(this.children,e)}}function C6e(){return this.firstElementChild}function L6e(e){return this.select(e==null?C6e:S6e(typeof e=="function"?e:ade(e)))}var I6e=Array.prototype.filter;function A6e(){return Array.from(this.children)}function _6e(e){return function(){return I6e.call(this.children,e)}}function E6e(e){return this.selectAll(e==null?A6e:_6e(typeof e=="function"?e:ade(e)))}function P6e(e){typeof e!="function"&&(e=ide(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,s=r[i]=[],c,l=0;l<o;++l)(c=a[l])&&e.call(c,c.__data__,l,a)&&s.push(c);return new Ha(r,this._parents)}function ode(e){return new Array(e.length)}function N6e(){return new Ha(this._enter||this._groups.map(ode),this._parents)}function YT(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}YT.prototype={constructor:YT,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function R6e(e){return function(){return e}}function j6e(e,t,n,r,i,a){for(var o=0,s,c=t.length,l=a.length;o<l;++o)(s=t[o])?(s.__data__=a[o],r[o]=s):n[o]=new YT(e,a[o]);for(;o<c;++o)(s=t[o])&&(i[o]=s)}function T6e(e,t,n,r,i,a,o){var s,c,l=new Map,u=t.length,d=a.length,f=new Array(u),h;for(s=0;s<u;++s)(c=t[s])&&(f[s]=h=o.call(c,c.__data__,s,t)+"",l.has(h)?i[s]=c:l.set(h,c));for(s=0;s<d;++s)h=o.call(e,a[s],s,a)+"",(c=l.get(h))?(r[s]=c,c.__data__=a[s],l.delete(h)):n[s]=new YT(e,a[s]);for(s=0;s<u;++s)(c=t[s])&&l.get(f[s])===c&&(i[s]=c)}function D6e(e){return e.__data__}function q6e(e,t){if(!arguments.length)return Array.from(this,D6e);var n=t?T6e:j6e,r=this._parents,i=this._groups;typeof e!="function"&&(e=R6e(e));for(var a=i.length,o=new Array(a),s=new Array(a),c=new Array(a),l=0;l<a;++l){var u=r[l],d=i[l],f=d.length,h=z6e(e.call(u,u&&u.__data__,l,r)),y=h.length,v=s[l]=new Array(y),k=o[l]=new Array(y),g=c[l]=new Array(f);n(u,d,v,k,g,h,t);for(var S=0,w=0,C,_;S<y;++S)if(C=v[S]){for(S>=w&&(w=S+1);!(_=k[w])&&++w<y;);C._next=_||null}}return o=new Ha(o,r),o._enter=s,o._exit=c,o}function z6e(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function O6e(){return new Ha(this._exit||this._groups.map(ode),this._parents)}function F6e(e,t,n){var r=this.enter(),i=this,a=this.exit();return typeof e=="function"?(r=e(r),r&&(r=r.selection())):r=r.append(e+""),t!=null&&(i=t(i),i&&(i=i.selection())),n==null?a.remove():n(a),r&&i?r.merge(i).order():i}function B6e(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,i=n.length,a=r.length,o=Math.min(i,a),s=new Array(i),c=0;c<o;++c)for(var l=n[c],u=r[c],d=l.length,f=s[c]=new Array(d),h,y=0;y<d;++y)(h=l[y]||u[y])&&(f[y]=h);for(;c<i;++c)s[c]=n[c];return new Ha(s,this._parents)}function H6e(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],i=r.length-1,a=r[i],o;--i>=0;)(o=r[i])&&(a&&o.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(o,a),a=o);return this}function V6e(e){e||(e=U6e);function t(d,f){return d&&f?e(d.__data__,f.__data__):!d-!f}for(var n=this._groups,r=n.length,i=new Array(r),a=0;a<r;++a){for(var o=n[a],s=o.length,c=i[a]=new Array(s),l,u=0;u<s;++u)(l=o[u])&&(c[u]=l);c.sort(t)}return new Ha(i,this._parents).order()}function U6e(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function $6e(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function W6e(){return Array.from(this)}function G6e(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,a=r.length;i<a;++i){var o=r[i];if(o)return o}return null}function K6e(){let e=0;for(const t of this)++e;return e}function Z6e(){return!this.node()}function X6e(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var i=t[n],a=0,o=i.length,s;a<o;++a)(s=i[a])&&e.call(s,s.__data__,a,i);return this}function Y6e(e){return function(){this.removeAttribute(e)}}function J6e(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Q6e(e,t){return function(){this.setAttribute(e,t)}}function e8e(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function t8e(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function n8e(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function r8e(e,t){var n=lq(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((t==null?n.local?J6e:Y6e:typeof t=="function"?n.local?n8e:t8e:n.local?e8e:Q6e)(n,t))}function sde(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function i8e(e){return function(){this.style.removeProperty(e)}}function a8e(e,t,n){return function(){this.style.setProperty(e,t,n)}}function o8e(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function s8e(e,t,n){return arguments.length>1?this.each((t==null?i8e:typeof t=="function"?o8e:a8e)(e,t,n??"")):Mf(this.node(),e)}function Mf(e,t){return e.style.getPropertyValue(t)||sde(e).getComputedStyle(e,null).getPropertyValue(t)}function c8e(e){return function(){delete this[e]}}function l8e(e,t){return function(){this[e]=t}}function u8e(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function d8e(e,t){return arguments.length>1?this.each((t==null?c8e:typeof t=="function"?u8e:l8e)(e,t)):this.node()[e]}function cde(e){return e.trim().split(/^|\s+/)}function EK(e){return e.classList||new lde(e)}function lde(e){this._node=e,this._names=cde(e.getAttribute("class")||"")}lde.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function ude(e,t){for(var n=EK(e),r=-1,i=t.length;++r<i;)n.add(t[r])}function dde(e,t){for(var n=EK(e),r=-1,i=t.length;++r<i;)n.remove(t[r])}function h8e(e){return function(){ude(this,e)}}function f8e(e){return function(){dde(this,e)}}function p8e(e,t){return function(){(t.apply(this,arguments)?ude:dde)(this,e)}}function y8e(e,t){var n=cde(e+"");if(arguments.length<2){for(var r=EK(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof t=="function"?p8e:t?h8e:f8e)(n,t))}function g8e(){this.textContent=""}function m8e(e){return function(){this.textContent=e}}function v8e(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function k8e(e){return arguments.length?this.each(e==null?g8e:(typeof e=="function"?v8e:m8e)(e)):this.node().textContent}function x8e(){this.innerHTML=""}function w8e(e){return function(){this.innerHTML=e}}function b8e(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function M8e(e){return arguments.length?this.each(e==null?x8e:(typeof e=="function"?b8e:w8e)(e)):this.node().innerHTML}function S8e(){this.nextSibling&&this.parentNode.appendChild(this)}function C8e(){return this.each(S8e)}function L8e(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function I8e(){return this.each(L8e)}function A8e(e){var t=typeof e=="function"?e:nde(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function _8e(){return null}function E8e(e,t){var n=typeof e=="function"?e:nde(e),r=t==null?_8e:typeof t=="function"?t:_K(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function P8e(){var e=this.parentNode;e&&e.removeChild(this)}function N8e(){return this.each(P8e)}function R8e(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function j8e(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function T8e(e){return this.select(e?j8e:R8e)}function D8e(e){return arguments.length?this.property("__data__",e):this.node().__data__}function q8e(e){return function(t){e.call(this,t,this.__data__)}}function z8e(e){return e.trim().split(/^|\s+/).map(function(t){var n="",r=t.indexOf(".");return r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),{type:t,name:n}})}function O8e(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,i=t.length,a;n<i;++n)a=t[n],(!e.type||a.type===e.type)&&a.name===e.name?this.removeEventListener(a.type,a.listener,a.options):t[++r]=a;++r?t.length=r:delete this.__on}}}function F8e(e,t,n){return function(){var r=this.__on,i,a=q8e(t);if(r){for(var o=0,s=r.length;o<s;++o)if((i=r[o]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=a,i.options=n),i.value=t;return}}this.addEventListener(e.type,a,n),i={type:e.type,name:e.name,value:t,listener:a,options:n},r?r.push(i):this.__on=[i]}}function B8e(e,t,n){var r=z8e(e+""),i,a=r.length,o;if(arguments.length<2){var s=this.node().__on;if(s){for(var c=0,l=s.length,u;c<l;++c)for(i=0,u=s[c];i<a;++i)if((o=r[i]).type===u.type&&o.name===u.name)return u.value}return}for(s=t?F8e:O8e,i=0;i<a;++i)this.each(s(r[i],t,n));return this}function hde(e,t,n){var r=sde(e),i=r.CustomEvent;typeof i=="function"?i=new i(t,n):(i=r.document.createEvent("Event"),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function H8e(e,t){return function(){return hde(this,e,t)}}function V8e(e,t){return function(){return hde(this,e,t.apply(this,arguments))}}function U8e(e,t){return this.each((typeof t=="function"?V8e:H8e)(e,t))}function*$8e(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,a=r.length,o;i<a;++i)(o=r[i])&&(yield o)}var fde=[null];function Ha(e,t){this._groups=e,this._parents=t}function By(){return new Ha([[document.documentElement]],fde)}function W8e(){return this}Ha.prototype=By.prototype={constructor:Ha,select:v6e,selectAll:b6e,selectChild:L6e,selectChildren:E6e,filter:P6e,data:q6e,enter:N6e,exit:O6e,join:F6e,merge:B6e,selection:W8e,order:H6e,sort:V6e,call:$6e,nodes:W6e,node:G6e,size:K6e,empty:Z6e,each:X6e,attr:r8e,style:s8e,property:d8e,classed:y8e,text:k8e,html:M8e,raise:C8e,lower:I8e,append:A8e,insert:E8e,remove:N8e,clone:T8e,datum:D8e,on:B8e,dispatch:U8e,[Symbol.iterator]:$8e};function Ta(e){return typeof e=="string"?new Ha([[document.querySelector(e)]],[document.documentElement]):new Ha([[e]],fde)}function G8e(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Ao(e,t){if(e=G8e(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}if(t.getBoundingClientRect){var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}}return[e.pageX,e.pageY]}const K8e={passive:!1},uy={capture:!0,passive:!1};function oO(e){e.stopImmediatePropagation()}function rf(e){e.preventDefault(),e.stopImmediatePropagation()}function pde(e){var t=e.document.documentElement,n=Ta(e).on("dragstart.drag",rf,uy);"onselectstart"in t?n.on("selectstart.drag",rf,uy):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function yde(e,t){var n=e.document.documentElement,r=Ta(e).on("dragstart.drag",null);t&&(r.on("click.drag",rf,uy),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const nm=e=>()=>e;function dW(e,{sourceEvent:t,subject:n,target:r,identifier:i,active:a,x:o,y:s,dx:c,dy:l,dispatch:u}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:a,enumerable:!0,configurable:!0},x:{value:o,enumerable:!0,configurable:!0},y:{value:s,enumerable:!0,configurable:!0},dx:{value:c,enumerable:!0,configurable:!0},dy:{value:l,enumerable:!0,configurable:!0},_:{value:u}})}dW.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function Z8e(e){return!e.ctrlKey&&!e.button}function X8e(){return this.parentNode}function Y8e(e,t){return t??{x:e.x,y:e.y}}function J8e(){return navigator.maxTouchPoints||"ontouchstart"in this}function gde(){var e=Z8e,t=X8e,n=Y8e,r=J8e,i={},a=cq("start","drag","end"),o=0,s,c,l,u,d=0;function f(C){C.on("mousedown.drag",h).filter(r).on("touchstart.drag",k).on("touchmove.drag",g,K8e).on("touchend.drag touchcancel.drag",S).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function h(C,_){if(!(u||!e.call(this,C,_))){var A=w(this,t.call(this,C,_),C,_,"mouse");A&&(Ta(C.view).on("mousemove.drag",y,uy).on("mouseup.drag",v,uy),pde(C.view),oO(C),l=!1,s=C.clientX,c=C.clientY,A("start",C))}}function y(C){if(rf(C),!l){var _=C.clientX-s,A=C.clientY-c;l=_*_+A*A>d}i.mouse("drag",C)}function v(C){Ta(C.view).on("mousemove.drag mouseup.drag",null),yde(C.view,l),rf(C),i.mouse("end",C)}function k(C,_){if(e.call(this,C,_)){var A=C.changedTouches,j=t.call(this,C,_),O=A.length,T,D;for(T=0;T<O;++T)(D=w(this,j,C,_,A[T].identifier,A[T]))&&(oO(C),D("start",C,A[T]))}}function g(C){var _=C.changedTouches,A=_.length,j,O;for(j=0;j<A;++j)(O=i[_[j].identifier])&&(rf(C),O("drag",C,_[j]))}function S(C){var _=C.changedTouches,A=_.length,j,O;for(u&&clearTimeout(u),u=setTimeout(function(){u=null},500),j=0;j<A;++j)(O=i[_[j].identifier])&&(oO(C),O("end",C,_[j]))}function w(C,_,A,j,O,T){var D=a.copy(),I=Ao(T||A,_),R,U,q;if((q=n.call(C,new dW("beforestart",{sourceEvent:A,target:f,identifier:O,active:o,x:I[0],y:I[1],dx:0,dy:0,dispatch:D}),j))!=null)return R=q.x-I[0]||0,U=q.y-I[1]||0,function K(Z,$,B){var V=I,F;switch(Z){case"start":i[O]=K,F=o++;break;case"end":delete i[O],--o;case"drag":I=Ao(B||$,_),F=o;break}D.call(Z,C,new dW(Z,{sourceEvent:$,subject:q,target:f,identifier:O,active:F,x:I[0]+R,y:I[1]+U,dx:I[0]-V[0],dy:I[1]-V[1],dispatch:D}),j)}}return f.filter=function(C){return arguments.length?(e=typeof C=="function"?C:nm(!!C),f):e},f.container=function(C){return arguments.length?(t=typeof C=="function"?C:nm(C),f):t},f.subject=function(C){return arguments.length?(n=typeof C=="function"?C:nm(C),f):n},f.touchable=function(C){return arguments.length?(r=typeof C=="function"?C:nm(!!C),f):r},f.on=function(){var C=a.on.apply(a,arguments);return C===a?f:C},f.clickDistance=function(C){return arguments.length?(d=(C=+C)*C,f):Math.sqrt(d)},f}function PK(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function mde(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Hy(){}var dy=.7,JT=1/dy,af="\\s*([+-]?\\d+)\\s*",hy="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",gs="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Q8e=/^#([0-9a-f]{3,8})$/,ebe=new RegExp(`^rgb\\(${af},${af},${af}\\)$`),tbe=new RegExp(`^rgb\\(${gs},${gs},${gs}\\)$`),nbe=new RegExp(`^rgba\\(${af},${af},${af},${hy}\\)$`),rbe=new RegExp(`^rgba\\(${gs},${gs},${gs},${hy}\\)$`),ibe=new RegExp(`^hsl\\(${hy},${gs},${gs}\\)$`),abe=new RegExp(`^hsla\\(${hy},${gs},${gs},${hy}\\)$`),RJ={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};PK(Hy,Eh,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:jJ,formatHex:jJ,formatHex8:obe,formatHsl:sbe,formatRgb:TJ,toString:TJ});function jJ(){return this.rgb().formatHex()}function obe(){return this.rgb().formatHex8()}function sbe(){return vde(this).formatHsl()}function TJ(){return this.rgb().formatRgb()}function Eh(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Q8e.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?DJ(t):n===3?new sa(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?rm(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?rm(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=ebe.exec(e))?new sa(t[1],t[2],t[3],1):(t=tbe.exec(e))?new sa(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=nbe.exec(e))?rm(t[1],t[2],t[3],t[4]):(t=rbe.exec(e))?rm(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=ibe.exec(e))?OJ(t[1],t[2]/100,t[3]/100,1):(t=abe.exec(e))?OJ(t[1],t[2]/100,t[3]/100,t[4]):RJ.hasOwnProperty(e)?DJ(RJ[e]):e==="transparent"?new sa(NaN,NaN,NaN,0):null}function DJ(e){return new sa(e>>16&255,e>>8&255,e&255,1)}function rm(e,t,n,r){return r<=0&&(e=t=n=NaN),new sa(e,t,n,r)}function cbe(e){return e instanceof Hy||(e=Eh(e)),e?(e=e.rgb(),new sa(e.r,e.g,e.b,e.opacity)):new sa}function hW(e,t,n,r){return arguments.length===1?cbe(e):new sa(e,t,n,r??1)}function sa(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}PK(sa,hW,mde(Hy,{brighter(e){return e=e==null?JT:Math.pow(JT,e),new sa(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?dy:Math.pow(dy,e),new sa(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new sa(kh(this.r),kh(this.g),kh(this.b),QT(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:qJ,formatHex:qJ,formatHex8:lbe,formatRgb:zJ,toString:zJ}));function qJ(){return`#${yh(this.r)}${yh(this.g)}${yh(this.b)}`}function lbe(){return`#${yh(this.r)}${yh(this.g)}${yh(this.b)}${yh((isNaN(this.opacity)?1:this.opacity)*255)}`}function zJ(){const e=QT(this.opacity);return`${e===1?"rgb(":"rgba("}${kh(this.r)}, ${kh(this.g)}, ${kh(this.b)}${e===1?")":`, ${e})`}`}function QT(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function kh(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function yh(e){return e=kh(e),(e<16?"0":"")+e.toString(16)}function OJ(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Eo(e,t,n,r)}function vde(e){if(e instanceof Eo)return new Eo(e.h,e.s,e.l,e.opacity);if(e instanceof Hy||(e=Eh(e)),!e)return new Eo;if(e instanceof Eo)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=NaN,s=a-i,c=(a+i)/2;return s?(t===a?o=(n-r)/s+(n<r)*6:n===a?o=(r-t)/s+2:o=(t-n)/s+4,s/=c<.5?a+i:2-a-i,o*=60):s=c>0&&c<1?0:o,new Eo(o,s,c,e.opacity)}function ube(e,t,n,r){return arguments.length===1?vde(e):new Eo(e,t,n,r??1)}function Eo(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}PK(Eo,ube,mde(Hy,{brighter(e){return e=e==null?JT:Math.pow(JT,e),new Eo(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?dy:Math.pow(dy,e),new Eo(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new sa(sO(e>=240?e-240:e+120,i,r),sO(e,i,r),sO(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new Eo(FJ(this.h),im(this.s),im(this.l),QT(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=QT(this.opacity);return`${e===1?"hsl(":"hsla("}${FJ(this.h)}, ${im(this.s)*100}%, ${im(this.l)*100}%${e===1?")":`, ${e})`}`}}));function FJ(e){return e=(e||0)%360,e<0?e+360:e}function im(e){return Math.max(0,Math.min(1,e||0))}function sO(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const NK=e=>()=>e;function dbe(e,t){return function(n){return e+n*t}}function hbe(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function fbe(e){return(e=+e)==1?kde:function(t,n){return n-t?hbe(t,n,e):NK(isNaN(t)?n:t)}}function kde(e,t){var n=t-e;return n?dbe(e,n):NK(isNaN(e)?t:e)}const eD=function e(t){var n=fbe(t);function r(i,a){var o=n((i=hW(i)).r,(a=hW(a)).r),s=n(i.g,a.g),c=n(i.b,a.b),l=kde(i.opacity,a.opacity);return function(u){return i.r=o(u),i.g=s(u),i.b=c(u),i.opacity=l(u),i+""}}return r.gamma=e,r}(1);function pbe(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(a){for(i=0;i<n;++i)r[i]=e[i]*(1-a)+t[i]*a;return r}}function ybe(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function gbe(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=new Array(r),a=new Array(n),o;for(o=0;o<r;++o)i[o]=Dp(e[o],t[o]);for(;o<n;++o)a[o]=t[o];return function(s){for(o=0;o<r;++o)a[o]=i[o](s);return a}}function mbe(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function os(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function vbe(e,t){var n={},r={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?n[i]=Dp(e[i],t[i]):r[i]=t[i];return function(a){for(i in n)r[i]=n[i](a);return r}}var fW=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,cO=new RegExp(fW.source,"g");function kbe(e){return function(){return e}}function xbe(e){return function(t){return e(t)+""}}function xde(e,t){var n=fW.lastIndex=cO.lastIndex=0,r,i,a,o=-1,s=[],c=[];for(e=e+"",t=t+"";(r=fW.exec(e))&&(i=cO.exec(t));)(a=i.index)>n&&(a=t.slice(n,a),s[o]?s[o]+=a:s[++o]=a),(r=r[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,c.push({i:o,x:os(r,i)})),n=cO.lastIndex;return n<t.length&&(a=t.slice(n),s[o]?s[o]+=a:s[++o]=a),s.length<2?c[0]?xbe(c[0].x):kbe(t):(t=c.length,function(l){for(var u=0,d;u<t;++u)s[(d=c[u]).i]=d.x(l);return s.join("")})}function Dp(e,t){var n=typeof t,r;return t==null||n==="boolean"?NK(t):(n==="number"?os:n==="string"?(r=Eh(t))?(t=r,eD):xde:t instanceof Eh?eD:t instanceof Date?mbe:ybe(t)?pbe:Array.isArray(t)?gbe:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?vbe:os)(e,t)}var BJ=180/Math.PI,pW={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function wde(e,t,n,r,i,a){var o,s,c;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(c=e*n+t*r)&&(n-=e*c,r-=t*c),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,c/=s),e*r<t*n&&(e=-e,t=-t,c=-c,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(t,e)*BJ,skewX:Math.atan(c)*BJ,scaleX:o,scaleY:s}}var am;function wbe(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?pW:wde(t.a,t.b,t.c,t.d,t.e,t.f)}function bbe(e){return e==null||(am||(am=document.createElementNS("http://www.w3.org/2000/svg","g")),am.setAttribute("transform",e),!(e=am.transform.baseVal.consolidate()))?pW:(e=e.matrix,wde(e.a,e.b,e.c,e.d,e.e,e.f))}function bde(e,t,n,r){function i(l){return l.length?l.pop()+" ":""}function a(l,u,d,f,h,y){if(l!==d||u!==f){var v=h.push("translate(",null,t,null,n);y.push({i:v-4,x:os(l,d)},{i:v-2,x:os(u,f)})}else(d||f)&&h.push("translate("+d+t+f+n)}function o(l,u,d,f){l!==u?(l-u>180?u+=360:u-l>180&&(l+=360),f.push({i:d.push(i(d)+"rotate(",null,r)-2,x:os(l,u)})):u&&d.push(i(d)+"rotate("+u+r)}function s(l,u,d,f){l!==u?f.push({i:d.push(i(d)+"skewX(",null,r)-2,x:os(l,u)}):u&&d.push(i(d)+"skewX("+u+r)}function c(l,u,d,f,h,y){if(l!==d||u!==f){var v=h.push(i(h)+"scale(",null,",",null,")");y.push({i:v-4,x:os(l,d)},{i:v-2,x:os(u,f)})}else(d!==1||f!==1)&&h.push(i(h)+"scale("+d+","+f+")")}return function(l,u){var d=[],f=[];return l=e(l),u=e(u),a(l.translateX,l.translateY,u.translateX,u.translateY,d,f),o(l.rotate,u.rotate,d,f),s(l.skewX,u.skewX,d,f),c(l.scaleX,l.scaleY,u.scaleX,u.scaleY,d,f),l=u=null,function(h){for(var y=-1,v=f.length,k;++y<v;)d[(k=f[y]).i]=k.x(h);return d.join("")}}}var Mbe=bde(wbe,"px, ","px)","deg)"),Sbe=bde(bbe,", ",")",")"),Cbe=1e-12;function HJ(e){return((e=Math.exp(e))+1/e)/2}function Lbe(e){return((e=Math.exp(e))-1/e)/2}function Ibe(e){return((e=Math.exp(2*e))-1)/(e+1)}const iT=function e(t,n,r){function i(a,o){var s=a[0],c=a[1],l=a[2],u=o[0],d=o[1],f=o[2],h=u-s,y=d-c,v=h*h+y*y,k,g;if(v<Cbe)g=Math.log(f/l)/t,k=function(j){return[s+j*h,c+j*y,l*Math.exp(t*j*g)]};else{var S=Math.sqrt(v),w=(f*f-l*l+r*v)/(2*l*n*S),C=(f*f-l*l-r*v)/(2*f*n*S),_=Math.log(Math.sqrt(w*w+1)-w),A=Math.log(Math.sqrt(C*C+1)-C);g=(A-_)/t,k=function(j){var O=j*g,T=HJ(_),D=l/(n*S)*(T*Ibe(t*O+_)-Lbe(_));return[s+D*h,c+D*y,l*T/HJ(t*O+_)]}}return k.duration=g*1e3*t/Math.SQRT2,k}return i.rho=function(a){var o=Math.max(.001,+a),s=o*o,c=s*s;return e(o,s,c)},i}(Math.SQRT2,2,4);var Sf=0,B0=0,_0=0,Mde=1e3,tD,H0,nD=0,Ph=0,uq=0,fy=typeof performance=="object"&&performance.now?performance:Date,Sde=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function RK(){return Ph||(Sde(Abe),Ph=fy.now()+uq)}function Abe(){Ph=0}function rD(){this._call=this._time=this._next=null}rD.prototype=Cde.prototype={constructor:rD,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?RK():+n)+(t==null?0:+t),!this._next&&H0!==this&&(H0?H0._next=this:tD=this,H0=this),this._call=e,this._time=n,yW()},stop:function(){this._call&&(this._call=null,this._time=1/0,yW())}};function Cde(e,t,n){var r=new rD;return r.restart(e,t,n),r}function _be(){RK(),++Sf;for(var e=tD,t;e;)(t=Ph-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Sf}function VJ(){Ph=(nD=fy.now())+uq,Sf=B0=0;try{_be()}finally{Sf=0,Pbe(),Ph=0}}function Ebe(){var e=fy.now(),t=e-nD;t>Mde&&(uq-=t,nD=e)}function Pbe(){for(var e,t=tD,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:tD=n);H0=e,yW(r)}function yW(e){if(!Sf){B0&&(B0=clearTimeout(B0));var t=e-Ph;t>24?(e<1/0&&(B0=setTimeout(VJ,e-fy.now()-uq)),_0&&(_0=clearInterval(_0))):(_0||(nD=fy.now(),_0=setInterval(Ebe,Mde)),Sf=1,Sde(VJ))}}function UJ(e,t,n){var r=new rD;return t=t==null?0:+t,r.restart(i=>{r.stop(),e(i+t)},t,n),r}var Nbe=cq("start","end","cancel","interrupt"),Rbe=[],Lde=0,$J=1,gW=2,aT=3,WJ=4,mW=5,oT=6;function dq(e,t,n,r,i,a){var o=e.__transition;if(!o)e.__transition={};else if(n in o)return;jbe(e,n,{name:t,index:r,group:i,on:Nbe,tween:Rbe,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:Lde})}function jK(e,t){var n=Fo(e,t);if(n.state>Lde)throw new Error("too late; already scheduled");return n}function bs(e,t){var n=Fo(e,t);if(n.state>aT)throw new Error("too late; already running");return n}function Fo(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function jbe(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=Cde(a,0,n.time);function a(l){n.state=$J,n.timer.restart(o,n.delay,n.time),n.delay<=l&&o(l-n.delay)}function o(l){var u,d,f,h;if(n.state!==$J)return c();for(u in r)if(h=r[u],h.name===n.name){if(h.state===aT)return UJ(o);h.state===WJ?(h.state=oT,h.timer.stop(),h.on.call("interrupt",e,e.__data__,h.index,h.group),delete r[u]):+u<t&&(h.state=oT,h.timer.stop(),h.on.call("cancel",e,e.__data__,h.index,h.group),delete r[u])}if(UJ(function(){n.state===aT&&(n.state=WJ,n.timer.restart(s,n.delay,n.time),s(l))}),n.state=gW,n.on.call("start",e,e.__data__,n.index,n.group),n.state===gW){for(n.state=aT,i=new Array(f=n.tween.length),u=0,d=-1;u<f;++u)(h=n.tween[u].value.call(e,e.__data__,n.index,n.group))&&(i[++d]=h);i.length=d+1}}function s(l){for(var u=l<n.duration?n.ease.call(null,l/n.duration):(n.timer.restart(c),n.state=mW,1),d=-1,f=i.length;++d<f;)i[d].call(e,u);n.state===mW&&(n.on.call("end",e,e.__data__,n.index,n.group),c())}function c(){n.state=oT,n.timer.stop(),delete r[t];for(var l in r)return;delete e.__transition}}function sT(e,t){var n=e.__transition,r,i,a=!0,o;if(n){t=t==null?null:t+"";for(o in n){if((r=n[o]).name!==t){a=!1;continue}i=r.state>gW&&r.state<mW,r.state=oT,r.timer.stop(),r.on.call(i?"interrupt":"cancel",e,e.__data__,r.index,r.group),delete n[o]}a&&delete e.__transition}}function Tbe(e){return this.each(function(){sT(this,e)})}function Dbe(e,t){var n,r;return function(){var i=bs(this,e),a=i.tween;if(a!==n){r=n=a;for(var o=0,s=r.length;o<s;++o)if(r[o].name===t){r=r.slice(),r.splice(o,1);break}}i.tween=r}}function qbe(e,t,n){var r,i;if(typeof n!="function")throw new Error;return function(){var a=bs(this,e),o=a.tween;if(o!==r){i=(r=o).slice();for(var s={name:t,value:n},c=0,l=i.length;c<l;++c)if(i[c].name===t){i[c]=s;break}c===l&&i.push(s)}a.tween=i}}function zbe(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r=Fo(this.node(),n).tween,i=0,a=r.length,o;i<a;++i)if((o=r[i]).name===e)return o.value;return null}return this.each((t==null?Dbe:qbe)(n,e,t))}function TK(e,t,n){var r=e._id;return e.each(function(){var i=bs(this,r);(i.value||(i.value={}))[t]=n.apply(this,arguments)}),function(i){return Fo(i,r).value[t]}}function Ide(e,t){var n;return(typeof t=="number"?os:t instanceof Eh?eD:(n=Eh(t))?(t=n,eD):xde)(e,t)}function Obe(e){return function(){this.removeAttribute(e)}}function Fbe(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Bbe(e,t,n){var r,i=n+"",a;return function(){var o=this.getAttribute(e);return o===i?null:o===r?a:a=t(r=o,n)}}function Hbe(e,t,n){var r,i=n+"",a;return function(){var o=this.getAttributeNS(e.space,e.local);return o===i?null:o===r?a:a=t(r=o,n)}}function Vbe(e,t,n){var r,i,a;return function(){var o,s=n(this),c;return s==null?void this.removeAttribute(e):(o=this.getAttribute(e),c=s+"",o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,s)))}}function Ube(e,t,n){var r,i,a;return function(){var o,s=n(this),c;return s==null?void this.removeAttributeNS(e.space,e.local):(o=this.getAttributeNS(e.space,e.local),c=s+"",o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,s)))}}function $be(e,t){var n=lq(e),r=n==="transform"?Sbe:Ide;return this.attrTween(e,typeof t=="function"?(n.local?Ube:Vbe)(n,r,TK(this,"attr."+e,t)):t==null?(n.local?Fbe:Obe)(n):(n.local?Hbe:Bbe)(n,r,t))}function Wbe(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function Gbe(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function Kbe(e,t){var n,r;function i(){var a=t.apply(this,arguments);return a!==r&&(n=(r=a)&&Gbe(e,a)),n}return i._value=t,i}function Zbe(e,t){var n,r;function i(){var a=t.apply(this,arguments);return a!==r&&(n=(r=a)&&Wbe(e,a)),n}return i._value=t,i}function Xbe(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var r=lq(e);return this.tween(n,(r.local?Kbe:Zbe)(r,t))}function Ybe(e,t){return function(){jK(this,e).delay=+t.apply(this,arguments)}}function Jbe(e,t){return t=+t,function(){jK(this,e).delay=t}}function Qbe(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Ybe:Jbe)(t,e)):Fo(this.node(),t).delay}function e7e(e,t){return function(){bs(this,e).duration=+t.apply(this,arguments)}}function t7e(e,t){return t=+t,function(){bs(this,e).duration=t}}function n7e(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?e7e:t7e)(t,e)):Fo(this.node(),t).duration}function r7e(e,t){if(typeof t!="function")throw new Error;return function(){bs(this,e).ease=t}}function i7e(e){var t=this._id;return arguments.length?this.each(r7e(t,e)):Fo(this.node(),t).ease}function a7e(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;bs(this,e).ease=n}}function o7e(e){if(typeof e!="function")throw new Error;return this.each(a7e(this._id,e))}function s7e(e){typeof e!="function"&&(e=ide(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,s=r[i]=[],c,l=0;l<o;++l)(c=a[l])&&e.call(c,c.__data__,l,a)&&s.push(c);return new rc(r,this._parents,this._name,this._id)}function c7e(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,r=t.length,i=n.length,a=Math.min(r,i),o=new Array(r),s=0;s<a;++s)for(var c=t[s],l=n[s],u=c.length,d=o[s]=new Array(u),f,h=0;h<u;++h)(f=c[h]||l[h])&&(d[h]=f);for(;s<r;++s)o[s]=t[s];return new rc(o,this._parents,this._name,this._id)}function l7e(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function u7e(e,t,n){var r,i,a=l7e(t)?jK:bs;return function(){var o=a(this,e),s=o.on;s!==r&&(i=(r=s).copy()).on(t,n),o.on=i}}function d7e(e,t){var n=this._id;return arguments.length<2?Fo(this.node(),n).on.on(e):this.each(u7e(n,e,t))}function h7e(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function f7e(){return this.on("end.remove",h7e(this._id))}function p7e(e){var t=this._name,n=this._id;typeof e!="function"&&(e=_K(e));for(var r=this._groups,i=r.length,a=new Array(i),o=0;o<i;++o)for(var s=r[o],c=s.length,l=a[o]=new Array(c),u,d,f=0;f<c;++f)(u=s[f])&&(d=e.call(u,u.__data__,f,s))&&("__data__"in u&&(d.__data__=u.__data__),l[f]=d,dq(l[f],t,n,f,l,Fo(u,n)));return new rc(a,this._parents,t,n)}function y7e(e){var t=this._name,n=this._id;typeof e!="function"&&(e=rde(e));for(var r=this._groups,i=r.length,a=[],o=[],s=0;s<i;++s)for(var c=r[s],l=c.length,u,d=0;d<l;++d)if(u=c[d]){for(var f=e.call(u,u.__data__,d,c),h,y=Fo(u,n),v=0,k=f.length;v<k;++v)(h=f[v])&&dq(h,t,n,v,f,y);a.push(f),o.push(u)}return new rc(a,o,t,n)}var g7e=By.prototype.constructor;function m7e(){return new g7e(this._groups,this._parents)}function v7e(e,t){var n,r,i;return function(){var a=Mf(this,e),o=(this.style.removeProperty(e),Mf(this,e));return a===o?null:a===n&&o===r?i:i=t(n=a,r=o)}}function Ade(e){return function(){this.style.removeProperty(e)}}function k7e(e,t,n){var r,i=n+"",a;return function(){var o=Mf(this,e);return o===i?null:o===r?a:a=t(r=o,n)}}function x7e(e,t,n){var r,i,a;return function(){var o=Mf(this,e),s=n(this),c=s+"";return s==null&&(c=s=(this.style.removeProperty(e),Mf(this,e))),o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,s))}}function w7e(e,t){var n,r,i,a="style."+t,o="end."+a,s;return function(){var c=bs(this,e),l=c.on,u=c.value[a]==null?s||(s=Ade(t)):void 0;(l!==n||i!==u)&&(r=(n=l).copy()).on(o,i=u),c.on=r}}function b7e(e,t,n){var r=(e+="")=="transform"?Mbe:Ide;return t==null?this.styleTween(e,v7e(e,r)).on("end.style."+e,Ade(e)):typeof t=="function"?this.styleTween(e,x7e(e,r,TK(this,"style."+e,t))).each(w7e(this._id,e)):this.styleTween(e,k7e(e,r,t),n).on("end.style."+e,null)}function M7e(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function S7e(e,t,n){var r,i;function a(){var o=t.apply(this,arguments);return o!==i&&(r=(i=o)&&M7e(e,o,n)),r}return a._value=t,a}function C7e(e,t,n){var r="style."+(e+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;return this.tween(r,S7e(e,t,n??""))}function L7e(e){return function(){this.textContent=e}}function I7e(e){return function(){var t=e(this);this.textContent=t??""}}function A7e(e){return this.tween("text",typeof e=="function"?I7e(TK(this,"text",e)):L7e(e==null?"":e+""))}function _7e(e){return function(t){this.textContent=e.call(this,t)}}function E7e(e){var t,n;function r(){var i=e.apply(this,arguments);return i!==n&&(t=(n=i)&&_7e(i)),t}return r._value=e,r}function P7e(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,E7e(e))}function N7e(){for(var e=this._name,t=this._id,n=_de(),r=this._groups,i=r.length,a=0;a<i;++a)for(var o=r[a],s=o.length,c,l=0;l<s;++l)if(c=o[l]){var u=Fo(c,t);dq(c,e,n,l,o,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new rc(r,this._parents,e,n)}function R7e(){var e,t,n=this,r=n._id,i=n.size();return new Promise(function(a,o){var s={value:o},c={value:function(){--i===0&&a()}};n.each(function(){var l=bs(this,r),u=l.on;u!==e&&(t=(e=u).copy(),t._.cancel.push(s),t._.interrupt.push(s),t._.end.push(c)),l.on=t}),i===0&&a()})}var j7e=0;function rc(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function _de(){return++j7e}var qs=By.prototype;rc.prototype={constructor:rc,select:p7e,selectAll:y7e,selectChild:qs.selectChild,selectChildren:qs.selectChildren,filter:s7e,merge:c7e,selection:m7e,transition:N7e,call:qs.call,nodes:qs.nodes,node:qs.node,size:qs.size,empty:qs.empty,each:qs.each,on:d7e,attr:$be,attrTween:Xbe,style:b7e,styleTween:C7e,text:A7e,textTween:P7e,remove:f7e,tween:zbe,delay:Qbe,duration:n7e,ease:i7e,easeVarying:o7e,end:R7e,[Symbol.iterator]:qs[Symbol.iterator]};function T7e(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var D7e={time:null,delay:0,duration:250,ease:T7e};function q7e(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function z7e(e){var t,n;e instanceof rc?(t=e._id,e=e._name):(t=_de(),(n=D7e).time=RK(),e=e==null?null:e+"");for(var r=this._groups,i=r.length,a=0;a<i;++a)for(var o=r[a],s=o.length,c,l=0;l<s;++l)(c=o[l])&&dq(c,e,t,l,o,n||q7e(c,t));return new rc(r,this._parents,e,t)}By.prototype.interrupt=Tbe;By.prototype.transition=z7e;const om=e=>()=>e;function O7e(e,{sourceEvent:t,target:n,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}function Gs(e,t,n){this.k=e,this.x=t,this.y=n}Gs.prototype={constructor:Gs,scale:function(e){return e===1?this:new Gs(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Gs(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var hq=new Gs(1,0,0);Ede.prototype=Gs.prototype;function Ede(e){for(;!e.__zoom;)if(!(e=e.parentNode))return hq;return e.__zoom}function lO(e){e.stopImmediatePropagation()}function E0(e){e.preventDefault(),e.stopImmediatePropagation()}function F7e(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function B7e(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function GJ(){return this.__zoom||hq}function H7e(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function V7e(){return navigator.maxTouchPoints||"ontouchstart"in this}function U7e(e,t,n){var r=e.invertX(t[0][0])-n[0][0],i=e.invertX(t[1][0])-n[1][0],a=e.invertY(t[0][1])-n[0][1],o=e.invertY(t[1][1])-n[1][1];return e.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),o>a?(a+o)/2:Math.min(0,a)||Math.max(0,o))}function Pde(){var e=F7e,t=B7e,n=U7e,r=H7e,i=V7e,a=[0,1/0],o=[[-1/0,-1/0],[1/0,1/0]],s=250,c=iT,l=cq("start","zoom","end"),u,d,f,h=500,y=150,v=0,k=10;function g(q){q.property("__zoom",GJ).on("wheel.zoom",O,{passive:!1}).on("mousedown.zoom",T).on("dblclick.zoom",D).filter(i).on("touchstart.zoom",I).on("touchmove.zoom",R).on("touchend.zoom touchcancel.zoom",U).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}g.transform=function(q,K,Z,$){var B=q.selection?q.selection():q;B.property("__zoom",GJ),q!==B?_(q,K,Z,$):B.interrupt().each(function(){A(this,arguments).event($).start().zoom(null,typeof K=="function"?K.apply(this,arguments):K).end()})},g.scaleBy=function(q,K,Z,$){g.scaleTo(q,function(){var B=this.__zoom.k,V=typeof K=="function"?K.apply(this,arguments):K;return B*V},Z,$)},g.scaleTo=function(q,K,Z,$){g.transform(q,function(){var B=t.apply(this,arguments),V=this.__zoom,F=Z==null?C(B):typeof Z=="function"?Z.apply(this,arguments):Z,ie=V.invert(F),N=typeof K=="function"?K.apply(this,arguments):K;return n(w(S(V,N),F,ie),B,o)},Z,$)},g.translateBy=function(q,K,Z,$){g.transform(q,function(){return n(this.__zoom.translate(typeof K=="function"?K.apply(this,arguments):K,typeof Z=="function"?Z.apply(this,arguments):Z),t.apply(this,arguments),o)},null,$)},g.translateTo=function(q,K,Z,$,B){g.transform(q,function(){var V=t.apply(this,arguments),F=this.__zoom,ie=$==null?C(V):typeof $=="function"?$.apply(this,arguments):$;return n(hq.translate(ie[0],ie[1]).scale(F.k).translate(typeof K=="function"?-K.apply(this,arguments):-K,typeof Z=="function"?-Z.apply(this,arguments):-Z),V,o)},$,B)};function S(q,K){return K=Math.max(a[0],Math.min(a[1],K)),K===q.k?q:new Gs(K,q.x,q.y)}function w(q,K,Z){var $=K[0]-Z[0]*q.k,B=K[1]-Z[1]*q.k;return $===q.x&&B===q.y?q:new Gs(q.k,$,B)}function C(q){return[(+q[0][0]+ +q[1][0])/2,(+q[0][1]+ +q[1][1])/2]}function _(q,K,Z,$){q.on("start.zoom",function(){A(this,arguments).event($).start()}).on("interrupt.zoom end.zoom",function(){A(this,arguments).event($).end()}).tween("zoom",function(){var B=this,V=arguments,F=A(B,V).event($),ie=t.apply(B,V),N=Z==null?C(ie):typeof Z=="function"?Z.apply(B,V):Z,P=Math.max(ie[1][0]-ie[0][0],ie[1][1]-ie[0][1]),G=B.__zoom,J=typeof K=="function"?K.apply(B,V):K,X=c(G.invert(N).concat(P/G.k),J.invert(N).concat(P/J.k));return function(ae){if(ae===1)ae=J;else{var re=X(ae),fe=P/re[2];ae=new Gs(fe,N[0]-re[0]*fe,N[1]-re[1]*fe)}F.zoom(null,ae)}})}function A(q,K,Z){return!Z&&q.__zooming||new j(q,K)}function j(q,K){this.that=q,this.args=K,this.active=0,this.sourceEvent=null,this.extent=t.apply(q,K),this.taps=0}j.prototype={event:function(q){return q&&(this.sourceEvent=q),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(q,K){return this.mouse&&q!=="mouse"&&(this.mouse[1]=K.invert(this.mouse[0])),this.touch0&&q!=="touch"&&(this.touch0[1]=K.invert(this.touch0[0])),this.touch1&&q!=="touch"&&(this.touch1[1]=K.invert(this.touch1[0])),this.that.__zoom=K,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(q){var K=Ta(this.that).datum();l.call(q,this.that,new O7e(q,{sourceEvent:this.sourceEvent,target:g,transform:this.that.__zoom,dispatch:l}),K)}};function O(q,...K){if(!e.apply(this,arguments))return;var Z=A(this,K).event(q),$=this.__zoom,B=Math.max(a[0],Math.min(a[1],$.k*Math.pow(2,r.apply(this,arguments)))),V=Ao(q);if(Z.wheel)(Z.mouse[0][0]!==V[0]||Z.mouse[0][1]!==V[1])&&(Z.mouse[1]=$.invert(Z.mouse[0]=V)),clearTimeout(Z.wheel);else{if($.k===B)return;Z.mouse=[V,$.invert(V)],sT(this),Z.start()}E0(q),Z.wheel=setTimeout(F,y),Z.zoom("mouse",n(w(S($,B),Z.mouse[0],Z.mouse[1]),Z.extent,o));function F(){Z.wheel=null,Z.end()}}function T(q,...K){if(f||!e.apply(this,arguments))return;var Z=q.currentTarget,$=A(this,K,!0).event(q),B=Ta(q.view).on("mousemove.zoom",N,!0).on("mouseup.zoom",P,!0),V=Ao(q,Z),F=q.clientX,ie=q.clientY;pde(q.view),lO(q),$.mouse=[V,this.__zoom.invert(V)],sT(this),$.start();function N(G){if(E0(G),!$.moved){var J=G.clientX-F,X=G.clientY-ie;$.moved=J*J+X*X>v}$.event(G).zoom("mouse",n(w($.that.__zoom,$.mouse[0]=Ao(G,Z),$.mouse[1]),$.extent,o))}function P(G){B.on("mousemove.zoom mouseup.zoom",null),yde(G.view,$.moved),E0(G),$.event(G).end()}}function D(q,...K){if(e.apply(this,arguments)){var Z=this.__zoom,$=Ao(q.changedTouches?q.changedTouches[0]:q,this),B=Z.invert($),V=Z.k*(q.shiftKey?.5:2),F=n(w(S(Z,V),$,B),t.apply(this,K),o);E0(q),s>0?Ta(this).transition().duration(s).call(_,F,$,q):Ta(this).call(g.transform,F,$,q)}}function I(q,...K){if(e.apply(this,arguments)){var Z=q.touches,$=Z.length,B=A(this,K,q.changedTouches.length===$).event(q),V,F,ie,N;for(lO(q),F=0;F<$;++F)ie=Z[F],N=Ao(ie,this),N=[N,this.__zoom.invert(N),ie.identifier],B.touch0?!B.touch1&&B.touch0[2]!==N[2]&&(B.touch1=N,B.taps=0):(B.touch0=N,V=!0,B.taps=1+!!u);u&&(u=clearTimeout(u)),V&&(B.taps<2&&(d=N[0],u=setTimeout(function(){u=null},h)),sT(this),B.start())}}function R(q,...K){if(this.__zooming){var Z=A(this,K).event(q),$=q.changedTouches,B=$.length,V,F,ie,N;for(E0(q),V=0;V<B;++V)F=$[V],ie=Ao(F,this),Z.touch0&&Z.touch0[2]===F.identifier?Z.touch0[0]=ie:Z.touch1&&Z.touch1[2]===F.identifier&&(Z.touch1[0]=ie);if(F=Z.that.__zoom,Z.touch1){var P=Z.touch0[0],G=Z.touch0[1],J=Z.touch1[0],X=Z.touch1[1],ae=(ae=J[0]-P[0])*ae+(ae=J[1]-P[1])*ae,re=(re=X[0]-G[0])*re+(re=X[1]-G[1])*re;F=S(F,Math.sqrt(ae/re)),ie=[(P[0]+J[0])/2,(P[1]+J[1])/2],N=[(G[0]+X[0])/2,(G[1]+X[1])/2]}else if(Z.touch0)ie=Z.touch0[0],N=Z.touch0[1];else return;Z.zoom("touch",n(w(F,ie,N),Z.extent,o))}}function U(q,...K){if(this.__zooming){var Z=A(this,K).event(q),$=q.changedTouches,B=$.length,V,F;for(lO(q),f&&clearTimeout(f),f=setTimeout(function(){f=null},h),V=0;V<B;++V)F=$[V],Z.touch0&&Z.touch0[2]===F.identifier?delete Z.touch0:Z.touch1&&Z.touch1[2]===F.identifier&&delete Z.touch1;if(Z.touch1&&!Z.touch0&&(Z.touch0=Z.touch1,delete Z.touch1),Z.touch0)Z.touch0[1]=this.__zoom.invert(Z.touch0[0]);else if(Z.end(),Z.taps===2&&(F=Ao(F,this),Math.hypot(d[0]-F[0],d[1]-F[1])<k)){var ie=Ta(this).on("dblclick.zoom");ie&&ie.apply(this,arguments)}}}return g.wheelDelta=function(q){return arguments.length?(r=typeof q=="function"?q:om(+q),g):r},g.filter=function(q){return arguments.length?(e=typeof q=="function"?q:om(!!q),g):e},g.touchable=function(q){return arguments.length?(i=typeof q=="function"?q:om(!!q),g):i},g.extent=function(q){return arguments.length?(t=typeof q=="function"?q:om([[+q[0][0],+q[0][1]],[+q[1][0],+q[1][1]]]),g):t},g.scaleExtent=function(q){return arguments.length?(a[0]=+q[0],a[1]=+q[1],g):[a[0],a[1]]},g.translateExtent=function(q){return arguments.length?(o[0][0]=+q[0][0],o[1][0]=+q[1][0],o[0][1]=+q[0][1],o[1][1]=+q[1][1],g):[[o[0][0],o[0][1]],[o[1][0],o[1][1]]]},g.constrain=function(q){return arguments.length?(n=q,g):n},g.duration=function(q){return arguments.length?(s=+q,g):s},g.interpolate=function(q){return arguments.length?(c=q,g):c},g.on=function(){var q=l.on.apply(l,arguments);return q===l?g:q},g.clickDistance=function(q){return arguments.length?(v=(q=+q)*q,g):Math.sqrt(v)},g.tapDistance=function(q){return arguments.length?(k=+q,g):k},g}const ks={error001:()=>"[React Flow]: Seems like you have not used zustand provider as an ancestor. Help: https://reactflow.dev/error#001",error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:e=>`Node type "${e}" not found. Using fallback type "default".`,error004:()=>"The React Flow parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:e=>`The old edge with id=${e} does not exist.`,error009:e=>`Marker type "${e}" doesn't exist.`,error008:(e,{id:t,sourceHandle:n,targetHandle:r})=>`Couldn't create edge for ${e} handle id: "${e==="source"?n:r}", edge id: ${t}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:e=>`Edge type "${e}" not found. Using fallback type "default".`,error012:e=>`Node with id "${e}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(e="react")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${e}/dist/style.css' or base.css to make sure everything is working properly.`,error014:()=>"useNodeConnections: No node ID found. Call useNodeConnections inside a custom Node or provide a node ID.",error015:()=>"It seems that you are trying to drag a node that is not initialized. Please use onNodesChange as explained in the docs."},py=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],Nde=["Enter"," ","Escape"],Rde={"node.a11yDescription.default":"Press enter or space to select a node. Press delete to remove it and escape to cancel.","node.a11yDescription.keyboardDisabled":"Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.","node.a11yDescription.ariaLiveMessage":({direction:e,x:t,y:n})=>`Moved selected node ${e}. New position, x: ${t}, y: ${n}`,"edge.a11yDescription.default":"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.","controls.ariaLabel":"Control Panel","controls.zoomIn.ariaLabel":"Zoom In","controls.zoomOut.ariaLabel":"Zoom Out","controls.fitView.ariaLabel":"Fit View","controls.interactive.ariaLabel":"Toggle Interactivity","minimap.ariaLabel":"Mini Map","handle.ariaLabel":"Handle"};var Cf;(function(e){e.Strict="strict",e.Loose="loose"})(Cf||(Cf={}));var xh;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(xh||(xh={}));var Lf;(function(e){e.Partial="partial",e.Full="full"})(Lf||(Lf={}));const jde={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var zc;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(zc||(zc={}));var yy;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(yy||(yy={}));var tt;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(tt||(tt={}));const KJ={[tt.Left]:tt.Right,[tt.Right]:tt.Left,[tt.Top]:tt.Bottom,[tt.Bottom]:tt.Top};function Tde(e){return e===null?null:e?"valid":"invalid"}const Dde=e=>"id"in e&&"source"in e&&"target"in e,$7e=e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),DK=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),Vy=(e,t=[0,0])=>{const{width:n,height:r}=sc(e),i=e.origin??t,a=n*i[0],o=r*i[1];return{x:e.position.x-a,y:e.position.y-o}},W7e=(e,t={nodeOrigin:[0,0]})=>{if(e.length===0)return{x:0,y:0,width:0,height:0};const n=e.reduce((r,i)=>{const a=typeof i=="string";let o=!t.nodeLookup&&!a?i:void 0;t.nodeLookup&&(o=a?t.nodeLookup.get(i):DK(i)?i:t.nodeLookup.get(i.id));const s=o?iD(o,t.nodeOrigin):{x:0,y:0,x2:0,y2:0};return fq(r,s)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return pq(n)},Uy=(e,t={})=>{let n={x:1/0,y:1/0,x2:-1/0,y2:-1/0},r=!1;return e.forEach(i=>{(t.filter===void 0||t.filter(i))&&(n=fq(n,iD(i)),r=!0)}),r?pq(n):{x:0,y:0,width:0,height:0}},qK=(e,t,[n,r,i]=[0,0,1],a=!1,o=!1)=>{const s={...Wy(t,[n,r,i]),width:t.width/i,height:t.height/i},c=[];for(const l of e.values()){const{measured:u,selectable:d=!0,hidden:f=!1}=l;if(o&&!d||f)continue;const h=u.width??l.width??l.initialWidth??null,y=u.height??l.height??l.initialHeight??null,v=gy(s,Af(l)),k=(h??0)*(y??0),g=a&&v>0;(!l.internals.handleBounds||g||v>=k||l.dragging)&&c.push(l)}return c},G7e=(e,t)=>{const n=new Set;return e.forEach(r=>{n.add(r.id)}),t.filter(r=>n.has(r.source)||n.has(r.target))};function K7e(e,t){const n=new Map,r=t!=null&&t.nodes?new Set(t.nodes.map(i=>i.id)):null;return e.forEach(i=>{i.measured.width&&i.measured.height&&((t==null?void 0:t.includeHiddenNodes)||!i.hidden)&&(!r||r.has(i.id))&&n.set(i.id,i)}),n}async function Z7e({nodes:e,width:t,height:n,panZoom:r,minZoom:i,maxZoom:a},o){if(e.size===0)return Promise.resolve(!0);const s=K7e(e,o),c=Uy(s),l=zK(c,t,n,(o==null?void 0:o.minZoom)??i,(o==null?void 0:o.maxZoom)??a,(o==null?void 0:o.padding)??.1);return await r.setViewport(l,{duration:o==null?void 0:o.duration,ease:o==null?void 0:o.ease,interpolate:o==null?void 0:o.interpolate}),Promise.resolve(!0)}function qde({nodeId:e,nextPosition:t,nodeLookup:n,nodeOrigin:r=[0,0],nodeExtent:i,onError:a}){const o=n.get(e),s=o.parentId?n.get(o.parentId):void 0,{x:c,y:l}=s?s.internals.positionAbsolute:{x:0,y:0},u=o.origin??r;let d=o.extent||i;if(o.extent==="parent"&&!o.expandParent)if(!s)a==null||a("005",ks.error005());else{const h=s.measured.width,y=s.measured.height;h&&y&&(d=[[c,l],[c+h,l+y]])}else s&&_f(o.extent)&&(d=[[o.extent[0][0]+c,o.extent[0][1]+l],[o.extent[1][0]+c,o.extent[1][1]+l]]);const f=_f(d)?Nh(t,d,o.measured):t;return(o.measured.width===void 0||o.measured.height===void 0)&&(a==null||a("015",ks.error015())),{position:{x:f.x-c+(o.measured.width??0)*u[0],y:f.y-l+(o.measured.height??0)*u[1]},positionAbsolute:f}}async function X7e({nodesToRemove:e=[],edgesToRemove:t=[],nodes:n,edges:r,onBeforeDelete:i}){const a=new Set(e.map(f=>f.id)),o=[];for(const f of n){if(f.deletable===!1)continue;const h=a.has(f.id),y=!h&&f.parentId&&o.find(v=>v.id===f.parentId);(h||y)&&o.push(f)}const s=new Set(t.map(f=>f.id)),c=r.filter(f=>f.deletable!==!1),u=G7e(o,c);for(const f of c)s.has(f.id)&&!u.find(y=>y.id===f.id)&&u.push(f);if(!i)return{edges:u,nodes:o};const d=await i({nodes:o,edges:u});return typeof d=="boolean"?d?{edges:u,nodes:o}:{edges:[],nodes:[]}:d}const If=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),Nh=(e={x:0,y:0},t,n)=>({x:If(e.x,t[0][0],t[1][0]-((n==null?void 0:n.width)??0)),y:If(e.y,t[0][1],t[1][1]-((n==null?void 0:n.height)??0))});function zde(e,t,n){const{width:r,height:i}=sc(n),{x:a,y:o}=n.internals.positionAbsolute;return Nh(e,[[a,o],[a+r,o+i]],t)}const ZJ=(e,t,n)=>e<t?If(Math.abs(e-t),1,t)/t:e>n?-If(Math.abs(e-n),1,t)/t:0,Ode=(e,t,n=15,r=40)=>{const i=ZJ(e.x,r,t.width-r)*n,a=ZJ(e.y,r,t.height-r)*n;return[i,a]},fq=(e,t)=>({x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}),vW=({x:e,y:t,width:n,height:r})=>({x:e,y:t,x2:e+n,y2:t+r}),pq=({x:e,y:t,x2:n,y2:r})=>({x:e,y:t,width:n-e,height:r-t}),Af=(e,t=[0,0])=>{var i,a;const{x:n,y:r}=DK(e)?e.internals.positionAbsolute:Vy(e,t);return{x:n,y:r,width:((i=e.measured)==null?void 0:i.width)??e.width??e.initialWidth??0,height:((a=e.measured)==null?void 0:a.height)??e.height??e.initialHeight??0}},iD=(e,t=[0,0])=>{var i,a;const{x:n,y:r}=DK(e)?e.internals.positionAbsolute:Vy(e,t);return{x:n,y:r,x2:n+(((i=e.measured)==null?void 0:i.width)??e.width??e.initialWidth??0),y2:r+(((a=e.measured)==null?void 0:a.height)??e.height??e.initialHeight??0)}},Fde=(e,t)=>pq(fq(vW(e),vW(t))),gy=(e,t)=>{const n=Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x)),r=Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y));return Math.ceil(n*r)},XJ=e=>Po(e.width)&&Po(e.height)&&Po(e.x)&&Po(e.y),Po=e=>!isNaN(e)&&isFinite(e),Y7e=(e,t)=>{},$y=(e,t=[1,1])=>({x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}),Wy=({x:e,y:t},[n,r,i],a=!1,o=[1,1])=>{const s={x:(e-n)/i,y:(t-r)/i};return a?$y(s,o):s},aD=({x:e,y:t},[n,r,i])=>({x:e*i+n,y:t*i+r});function d2(e,t){if(typeof e=="number")return Math.floor((t-t/(1+e))*.5);if(typeof e=="string"&&e.endsWith("px")){const n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(n)}if(typeof e=="string"&&e.endsWith("%")){const n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(t*n*.01)}return console.error(`[React Flow] The padding value "${e}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function J7e(e,t,n){if(typeof e=="string"||typeof e=="number"){const r=d2(e,n),i=d2(e,t);return{top:r,right:i,bottom:r,left:i,x:i*2,y:r*2}}if(typeof e=="object"){const r=d2(e.top??e.y??0,n),i=d2(e.bottom??e.y??0,n),a=d2(e.left??e.x??0,t),o=d2(e.right??e.x??0,t);return{top:r,right:o,bottom:i,left:a,x:a+o,y:r+i}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function Q7e(e,t,n,r,i,a){const{x:o,y:s}=aD(e,[t,n,r]),{x:c,y:l}=aD({x:e.x+e.width,y:e.y+e.height},[t,n,r]),u=i-c,d=a-l;return{left:Math.floor(o),top:Math.floor(s),right:Math.floor(u),bottom:Math.floor(d)}}const zK=(e,t,n,r,i,a)=>{const o=J7e(a,t,n),s=(t-o.x)/e.width,c=(n-o.y)/e.height,l=Math.min(s,c),u=If(l,r,i),d=e.x+e.width/2,f=e.y+e.height/2,h=t/2-d*u,y=n/2-f*u,v=Q7e(e,h,y,u,t,n),k={left:Math.min(v.left-o.left,0),top:Math.min(v.top-o.top,0),right:Math.min(v.right-o.right,0),bottom:Math.min(v.bottom-o.bottom,0)};return{x:h-k.left+k.right,y:y-k.top+k.bottom,zoom:u}},my=()=>{var e;return typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)==null?void 0:e.indexOf("Mac"))>=0};function _f(e){return e!=null&&e!=="parent"}function sc(e){var t,n;return{width:((t=e.measured)==null?void 0:t.width)??e.width??e.initialWidth??0,height:((n=e.measured)==null?void 0:n.height)??e.height??e.initialHeight??0}}function Bde(e){var t,n;return(((t=e.measured)==null?void 0:t.width)??e.width??e.initialWidth)!==void 0&&(((n=e.measured)==null?void 0:n.height)??e.height??e.initialHeight)!==void 0}function Hde(e,t={width:0,height:0},n,r,i){const a={...e},o=r.get(n);if(o){const s=o.origin||i;a.x+=o.internals.positionAbsolute.x-(t.width??0)*s[0],a.y+=o.internals.positionAbsolute.y-(t.height??0)*s[1]}return a}function YJ(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function eMe(){let e,t;return{promise:new Promise((r,i)=>{e=r,t=i}),resolve:e,reject:t}}function tMe(e){return{...Rde,...e||{}}}function qp(e,{snapGrid:t=[0,0],snapToGrid:n=!1,transform:r,containerBounds:i}){const{x:a,y:o}=No(e),s=Wy({x:a-((i==null?void 0:i.left)??0),y:o-((i==null?void 0:i.top)??0)},r),{x:c,y:l}=n?$y(s,t):s;return{xSnapped:c,ySnapped:l,...s}}const OK=e=>({width:e.offsetWidth,height:e.offsetHeight}),Vde=e=>{var t;return((t=e==null?void 0:e.getRootNode)==null?void 0:t.call(e))||(window==null?void 0:window.document)},nMe=["INPUT","SELECT","TEXTAREA"];function Ude(e){var r,i;const t=((i=(r=e.composedPath)==null?void 0:r.call(e))==null?void 0:i[0])||e.target;return(t==null?void 0:t.nodeType)!==1?!1:nMe.includes(t.nodeName)||t.hasAttribute("contenteditable")||!!t.closest(".nokey")}const $de=e=>"clientX"in e,No=(e,t)=>{var a,o;const n=$de(e),r=n?e.clientX:(a=e.touches)==null?void 0:a[0].clientX,i=n?e.clientY:(o=e.touches)==null?void 0:o[0].clientY;return{x:r-((t==null?void 0:t.left)??0),y:i-((t==null?void 0:t.top)??0)}},JJ=(e,t,n,r,i)=>{const a=t.querySelectorAll(`.${e}`);return!a||!a.length?null:Array.from(a).map(o=>{const s=o.getBoundingClientRect();return{id:o.getAttribute("data-handleid"),type:e,nodeId:i,position:o.getAttribute("data-handlepos"),x:(s.left-n.left)/r,y:(s.top-n.top)/r,...OK(o)}})};function Wde({sourceX:e,sourceY:t,targetX:n,targetY:r,sourceControlX:i,sourceControlY:a,targetControlX:o,targetControlY:s}){const c=e*.125+i*.375+o*.375+n*.125,l=t*.125+a*.375+s*.375+r*.125,u=Math.abs(c-e),d=Math.abs(l-t);return[c,l,u,d]}function sm(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function QJ({pos:e,x1:t,y1:n,x2:r,y2:i,c:a}){switch(e){case tt.Left:return[t-sm(t-r,a),n];case tt.Right:return[t+sm(r-t,a),n];case tt.Top:return[t,n-sm(n-i,a)];case tt.Bottom:return[t,n+sm(i-n,a)]}}function yq({sourceX:e,sourceY:t,sourcePosition:n=tt.Bottom,targetX:r,targetY:i,targetPosition:a=tt.Top,curvature:o=.25}){const[s,c]=QJ({pos:n,x1:e,y1:t,x2:r,y2:i,c:o}),[l,u]=QJ({pos:a,x1:r,y1:i,x2:e,y2:t,c:o}),[d,f,h,y]=Wde({sourceX:e,sourceY:t,targetX:r,targetY:i,sourceControlX:s,sourceControlY:c,targetControlX:l,targetControlY:u});return[`M${e},${t} C${s},${c} ${l},${u} ${r},${i}`,d,f,h,y]}function Gde({sourceX:e,sourceY:t,targetX:n,targetY:r}){const i=Math.abs(n-e)/2,a=n<e?n+i:n-i,o=Math.abs(r-t)/2,s=r<t?r+o:r-o;return[a,s,i,o]}function rMe({sourceNode:e,targetNode:t,selected:n=!1,zIndex:r=0,elevateOnSelect:i=!1,zIndexMode:a="basic"}){if(a==="manual")return r;const o=i&&n?r+1e3:r,s=Math.max(e.parentId||i&&e.selected?e.internals.z:0,t.parentId||i&&t.selected?t.internals.z:0);return o+s}function iMe({sourceNode:e,targetNode:t,width:n,height:r,transform:i}){const a=fq(iD(e),iD(t));a.x===a.x2&&(a.x2+=1),a.y===a.y2&&(a.y2+=1);const o={x:-i[0]/i[2],y:-i[1]/i[2],width:n/i[2],height:r/i[2]};return gy(o,pq(a))>0}const aMe=({source:e,sourceHandle:t,target:n,targetHandle:r})=>`xy-edge__${e}${t||""}-${n}${r||""}`,oMe=(e,t)=>t.some(n=>n.source===e.source&&n.target===e.target&&(n.sourceHandle===e.sourceHandle||!n.sourceHandle&&!e.sourceHandle)&&(n.targetHandle===e.targetHandle||!n.targetHandle&&!e.targetHandle)),sMe=(e,t,n={})=>{if(!e.source||!e.target)return t;const r=n.getEdgeId||aMe;let i;return Dde(e)?i={...e}:i={...e,id:r(e)},oMe(i,t)?t:(i.sourceHandle===null&&delete i.sourceHandle,i.targetHandle===null&&delete i.targetHandle,t.concat(i))};function Kde({sourceX:e,sourceY:t,targetX:n,targetY:r}){const[i,a,o,s]=Gde({sourceX:e,sourceY:t,targetX:n,targetY:r});return[`M ${e},${t}L ${n},${r}`,i,a,o,s]}const eQ={[tt.Left]:{x:-1,y:0},[tt.Right]:{x:1,y:0},[tt.Top]:{x:0,y:-1},[tt.Bottom]:{x:0,y:1}},cMe=({source:e,sourcePosition:t=tt.Bottom,target:n})=>t===tt.Left||t===tt.Right?e.x<n.x?{x:1,y:0}:{x:-1,y:0}:e.y<n.y?{x:0,y:1}:{x:0,y:-1},tQ=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function lMe({source:e,sourcePosition:t=tt.Bottom,target:n,targetPosition:r=tt.Top,center:i,offset:a,stepPosition:o}){const s=eQ[t],c=eQ[r],l={x:e.x+s.x*a,y:e.y+s.y*a},u={x:n.x+c.x*a,y:n.y+c.y*a},d=cMe({source:l,sourcePosition:t,target:u}),f=d.x!==0?"x":"y",h=d[f];let y=[],v,k;const g={x:0,y:0},S={x:0,y:0},[,,w,C]=Gde({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(s[f]*c[f]===-1){f==="x"?(v=i.x??l.x+(u.x-l.x)*o,k=i.y??(l.y+u.y)/2):(v=i.x??(l.x+u.x)/2,k=i.y??l.y+(u.y-l.y)*o);const O=[{x:v,y:l.y},{x:v,y:u.y}],T=[{x:l.x,y:k},{x:u.x,y:k}];s[f]===h?y=f==="x"?O:T:y=f==="x"?T:O}else{const O=[{x:l.x,y:u.y}],T=[{x:u.x,y:l.y}];if(f==="x"?y=s.x===h?T:O:y=s.y===h?O:T,t===r){const q=Math.abs(e[f]-n[f]);if(q<=a){const K=Math.min(a-1,a-q);s[f]===h?g[f]=(l[f]>e[f]?-1:1)*K:S[f]=(u[f]>n[f]?-1:1)*K}}if(t!==r){const q=f==="x"?"y":"x",K=s[f]===c[q],Z=l[q]>u[q],$=l[q]<u[q];(s[f]===1&&(!K&&Z||K&&$)||s[f]!==1&&(!K&&$||K&&Z))&&(y=f==="x"?O:T)}const D={x:l.x+g.x,y:l.y+g.y},I={x:u.x+S.x,y:u.y+S.y},R=Math.max(Math.abs(D.x-y[0].x),Math.abs(I.x-y[0].x)),U=Math.max(Math.abs(D.y-y[0].y),Math.abs(I.y-y[0].y));R>=U?(v=(D.x+I.x)/2,k=y[0].y):(v=y[0].x,k=(D.y+I.y)/2)}const _={x:l.x+g.x,y:l.y+g.y},A={x:u.x+S.x,y:u.y+S.y};return[[e,..._.x!==y[0].x||_.y!==y[0].y?[_]:[],...y,...A.x!==y[y.length-1].x||A.y!==y[y.length-1].y?[A]:[],n],v,k,w,C]}function uMe(e,t,n,r){const i=Math.min(tQ(e,t)/2,tQ(t,n)/2,r),{x:a,y:o}=t;if(e.x===a&&a===n.x||e.y===o&&o===n.y)return`L${a} ${o}`;if(e.y===o){const l=e.x<n.x?-1:1,u=e.y<n.y?1:-1;return`L ${a+i*l},${o}Q ${a},${o} ${a},${o+i*u}`}const s=e.x<n.x?1:-1,c=e.y<n.y?-1:1;return`L ${a},${o+i*c}Q ${a},${o} ${a+i*s},${o}`}function vy({sourceX:e,sourceY:t,sourcePosition:n=tt.Bottom,targetX:r,targetY:i,targetPosition:a=tt.Top,borderRadius:o=5,centerX:s,centerY:c,offset:l=20,stepPosition:u=.5}){const[d,f,h,y,v]=lMe({source:{x:e,y:t},sourcePosition:n,target:{x:r,y:i},targetPosition:a,center:{x:s,y:c},offset:l,stepPosition:u});let k=`M${d[0].x} ${d[0].y}`;for(let g=1;g<d.length-1;g++)k+=uMe(d[g-1],d[g],d[g+1],o);return k+=`L${d[d.length-1].x} ${d[d.length-1].y}`,[k,f,h,y,v]}function nQ(e){var t;return e&&!!(e.internals.handleBounds||(t=e.handles)!=null&&t.length)&&!!(e.measured.width||e.width||e.initialWidth)}function dMe(e){var d;const{sourceNode:t,targetNode:n}=e;if(!nQ(t)||!nQ(n))return null;const r=t.internals.handleBounds||rQ(t.handles),i=n.internals.handleBounds||rQ(n.handles),a=iQ((r==null?void 0:r.source)??[],e.sourceHandle),o=iQ(e.connectionMode===Cf.Strict?(i==null?void 0:i.target)??[]:((i==null?void 0:i.target)??[]).concat((i==null?void 0:i.source)??[]),e.targetHandle);if(!a||!o)return(d=e.onError)==null||d.call(e,"008",ks.error008(a?"target":"source",{id:e.id,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),null;const s=(a==null?void 0:a.position)||tt.Bottom,c=(o==null?void 0:o.position)||tt.Top,l=Rh(t,a,s),u=Rh(n,o,c);return{sourceX:l.x,sourceY:l.y,targetX:u.x,targetY:u.y,sourcePosition:s,targetPosition:c}}function rQ(e){if(!e)return null;const t=[],n=[];for(const r of e)r.width=r.width??1,r.height=r.height??1,r.type==="source"?t.push(r):r.type==="target"&&n.push(r);return{source:t,target:n}}function Rh(e,t,n=tt.Left,r=!1){const i=((t==null?void 0:t.x)??0)+e.internals.positionAbsolute.x,a=((t==null?void 0:t.y)??0)+e.internals.positionAbsolute.y,{width:o,height:s}=t??sc(e);if(r)return{x:i+o/2,y:a+s/2};switch((t==null?void 0:t.position)??n){case tt.Top:return{x:i+o/2,y:a};case tt.Right:return{x:i+o,y:a+s/2};case tt.Bottom:return{x:i+o/2,y:a+s};case tt.Left:return{x:i,y:a+s/2}}}function iQ(e,t){return e&&(t?e.find(n=>n.id===t):e[0])||null}function kW(e,t){return e?typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(r=>`${r}=${e[r]}`).join("&")}`:""}function hMe(e,{id:t,defaultColor:n,defaultMarkerStart:r,defaultMarkerEnd:i}){const a=new Set;return e.reduce((o,s)=>([s.markerStart||r,s.markerEnd||i].forEach(c=>{if(c&&typeof c=="object"){const l=kW(c,t);a.has(l)||(o.push({id:l,color:c.color||n,...c}),a.add(l))}}),o),[]).sort((o,s)=>o.id.localeCompare(s.id))}const Zde=1e3,fMe=10,FK={nodeOrigin:[0,0],nodeExtent:py,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},pMe={...FK,checkEquality:!0};function BK(e,t){const n={...e};for(const r in t)t[r]!==void 0&&(n[r]=t[r]);return n}function yMe(e,t,n){const r=BK(FK,n);for(const i of e.values())if(i.parentId)VK(i,e,t,r);else{const a=Vy(i,r.nodeOrigin),o=_f(i.extent)?i.extent:r.nodeExtent,s=Nh(a,o,sc(i));i.internals.positionAbsolute=s}}function gMe(e,t){if(!e.handles)return e.measured?t==null?void 0:t.internals.handleBounds:void 0;const n=[],r=[];for(const i of e.handles){const a={id:i.id,width:i.width??1,height:i.height??1,nodeId:e.id,x:i.x,y:i.y,position:i.position,type:i.type};i.type==="source"?n.push(a):i.type==="target"&&r.push(a)}return{source:n,target:r}}function HK(e){return e==="manual"}function xW(e,t,n,r={}){var u,d;const i=BK(pMe,r),a={i:0},o=new Map(t),s=i!=null&&i.elevateNodesOnSelect&&!HK(i.zIndexMode)?Zde:0;let c=e.length>0,l=!1;t.clear(),n.clear();for(const f of e){let h=o.get(f.id);if(i.checkEquality&&f===(h==null?void 0:h.internals.userNode))t.set(f.id,h);else{const y=Vy(f,i.nodeOrigin),v=_f(f.extent)?f.extent:i.nodeExtent,k=Nh(y,v,sc(f));h={...i.defaults,...f,measured:{width:(u=f.measured)==null?void 0:u.width,height:(d=f.measured)==null?void 0:d.height},internals:{positionAbsolute:k,handleBounds:gMe(f,h),z:Xde(f,s,i.zIndexMode),userNode:f}},t.set(f.id,h)}(h.measured===void 0||h.measured.width===void 0||h.measured.height===void 0)&&!h.hidden&&(c=!1),f.parentId&&VK(h,t,n,r,a),l||(l=f.selected??!1)}return{nodesInitialized:c,hasSelectedNodes:l}}function mMe(e,t){if(!e.parentId)return;const n=t.get(e.parentId);n?n.set(e.id,e):t.set(e.parentId,new Map([[e.id,e]]))}function VK(e,t,n,r,i){const{elevateNodesOnSelect:a,nodeOrigin:o,nodeExtent:s,zIndexMode:c}=BK(FK,r),l=e.parentId,u=t.get(l);if(!u){console.warn(`Parent node ${l} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}mMe(e,n),i&&!u.parentId&&u.internals.rootParentIndex===void 0&&c==="auto"&&(u.internals.rootParentIndex=++i.i,u.internals.z=u.internals.z+i.i*fMe),i&&u.internals.rootParentIndex!==void 0&&(i.i=u.internals.rootParentIndex);const d=a&&!HK(c)?Zde:0,{x:f,y:h,z:y}=vMe(e,u,o,s,d,c),{positionAbsolute:v}=e.internals,k=f!==v.x||h!==v.y;(k||y!==e.internals.z)&&t.set(e.id,{...e,internals:{...e.internals,positionAbsolute:k?{x:f,y:h}:v,z:y}})}function Xde(e,t,n){const r=Po(e.zIndex)?e.zIndex:0;return HK(n)?r:r+(e.selected?t:0)}function vMe(e,t,n,r,i,a){const{x:o,y:s}=t.internals.positionAbsolute,c=sc(e),l=Vy(e,n),u=_f(e.extent)?Nh(l,e.extent,c):l;let d=Nh({x:o+u.x,y:s+u.y},r,c);e.extent==="parent"&&(d=zde(d,c,t));const f=Xde(e,i,a),h=t.internals.z??0;return{x:d.x,y:d.y,z:h>=f?h+1:f}}function UK(e,t,n,r=[0,0]){var o;const i=[],a=new Map;for(const s of e){const c=t.get(s.parentId);if(!c)continue;const l=((o=a.get(s.parentId))==null?void 0:o.expandedRect)??Af(c),u=Fde(l,s.rect);a.set(s.parentId,{expandedRect:u,parent:c})}return a.size>0&&a.forEach(({expandedRect:s,parent:c},l)=>{var w;const u=c.internals.positionAbsolute,d=sc(c),f=c.origin??r,h=s.x<u.x?Math.round(Math.abs(u.x-s.x)):0,y=s.y<u.y?Math.round(Math.abs(u.y-s.y)):0,v=Math.max(d.width,Math.round(s.width)),k=Math.max(d.height,Math.round(s.height)),g=(v-d.width)*f[0],S=(k-d.height)*f[1];(h>0||y>0||g||S)&&(i.push({id:l,type:"position",position:{x:c.position.x-h+g,y:c.position.y-y+S}}),(w=n.get(l))==null||w.forEach(C=>{e.some(_=>_.id===C.id)||i.push({id:C.id,type:"position",position:{x:C.position.x+h,y:C.position.y+y}})})),(d.width<s.width||d.height<s.height||h||y)&&i.push({id:l,type:"dimensions",setAttributes:!0,dimensions:{width:v+(h?f[0]*h-g:0),height:k+(y?f[1]*y-S:0)}})}),i}function kMe(e,t,n,r,i,a,o){const s=r==null?void 0:r.querySelector(".xyflow__viewport");let c=!1;if(!s)return{changes:[],updatedInternals:c};const l=[],u=window.getComputedStyle(s),{m22:d}=new window.DOMMatrixReadOnly(u.transform),f=[];for(const h of e.values()){const y=t.get(h.id);if(!y)continue;if(y.hidden){t.set(y.id,{...y,internals:{...y.internals,handleBounds:void 0}}),c=!0;continue}const v=OK(h.nodeElement),k=y.measured.width!==v.width||y.measured.height!==v.height;if(!!(v.width&&v.height&&(k||!y.internals.handleBounds||h.force))){const S=h.nodeElement.getBoundingClientRect(),w=_f(y.extent)?y.extent:a;let{positionAbsolute:C}=y.internals;y.parentId&&y.extent==="parent"?C=zde(C,v,t.get(y.parentId)):w&&(C=Nh(C,w,v));const _={...y,measured:v,internals:{...y.internals,positionAbsolute:C,handleBounds:{source:JJ("source",h.nodeElement,S,d,y.id),target:JJ("target",h.nodeElement,S,d,y.id)}}};t.set(y.id,_),y.parentId&&VK(_,t,n,{nodeOrigin:i,zIndexMode:o}),c=!0,k&&(l.push({id:y.id,type:"dimensions",dimensions:v}),y.expandParent&&y.parentId&&f.push({id:y.id,parentId:y.parentId,rect:Af(_,i)}))}}if(f.length>0){const h=UK(f,t,n,i);l.push(...h)}return{changes:l,updatedInternals:c}}async function xMe({delta:e,panZoom:t,transform:n,translateExtent:r,width:i,height:a}){if(!t||!e.x&&!e.y)return Promise.resolve(!1);const o=await t.setViewportConstrained({x:n[0]+e.x,y:n[1]+e.y,zoom:n[2]},[[0,0],[i,a]],r),s=!!o&&(o.x!==n[0]||o.y!==n[1]||o.k!==n[2]);return Promise.resolve(s)}function aQ(e,t,n,r,i,a){let o=i;const s=r.get(o)||new Map;r.set(o,s.set(n,t)),o=`${i}-${e}`;const c=r.get(o)||new Map;if(r.set(o,c.set(n,t)),a){o=`${i}-${e}-${a}`;const l=r.get(o)||new Map;r.set(o,l.set(n,t))}}function Yde(e,t,n){e.clear(),t.clear();for(const r of n){const{source:i,target:a,sourceHandle:o=null,targetHandle:s=null}=r,c={edgeId:r.id,source:i,target:a,sourceHandle:o,targetHandle:s},l=`${i}-${o}--${a}-${s}`,u=`${a}-${s}--${i}-${o}`;aQ("source",c,u,e,i,o),aQ("target",c,l,e,a,s),t.set(r.id,r)}}function Jde(e,t){if(!e.parentId)return!1;const n=t.get(e.parentId);return n?n.selected?!0:Jde(n,t):!1}function oQ(e,t,n){var i;let r=e;do{if((i=r==null?void 0:r.matches)!=null&&i.call(r,t))return!0;if(r===n)return!1;r=r==null?void 0:r.parentElement}while(r);return!1}function wMe(e,t,n,r){const i=new Map;for(const[a,o]of e)if((o.selected||o.id===r)&&(!o.parentId||!Jde(o,e))&&(o.draggable||t&&typeof o.draggable>"u")){const s=e.get(a);s&&i.set(a,{id:a,position:s.position||{x:0,y:0},distance:{x:n.x-s.internals.positionAbsolute.x,y:n.y-s.internals.positionAbsolute.y},extent:s.extent,parentId:s.parentId,origin:s.origin,expandParent:s.expandParent,internals:{positionAbsolute:s.internals.positionAbsolute||{x:0,y:0}},measured:{width:s.measured.width??0,height:s.measured.height??0}})}return i}function uO({nodeId:e,dragItems:t,nodeLookup:n,dragging:r=!0}){var o,s,c;const i=[];for(const[l,u]of t){const d=(o=n.get(l))==null?void 0:o.internals.userNode;d&&i.push({...d,position:u.position,dragging:r})}if(!e)return[i[0],i];const a=(s=n.get(e))==null?void 0:s.internals.userNode;return[a?{...a,position:((c=t.get(e))==null?void 0:c.position)||a.position,dragging:r}:i[0],i]}function bMe({dragItems:e,snapGrid:t,x:n,y:r}){const i=e.values().next().value;if(!i)return null;const a={x:n-i.distance.x,y:r-i.distance.y},o=$y(a,t);return{x:o.x-a.x,y:o.y-a.y}}function MMe({onNodeMouseDown:e,getStoreItems:t,onDragStart:n,onDrag:r,onDragStop:i}){let a={x:null,y:null},o=0,s=new Map,c=!1,l={x:0,y:0},u=null,d=!1,f=null,h=!1,y=!1,v=null;function k({noDragClassName:S,handleSelector:w,domNode:C,isSelectable:_,nodeId:A,nodeClickDistance:j=0}){f=Ta(C);function O({x:R,y:U}){const{nodeLookup:q,nodeExtent:K,snapGrid:Z,snapToGrid:$,nodeOrigin:B,onNodeDrag:V,onSelectionDrag:F,onError:ie,updateNodePositions:N}=t();a={x:R,y:U};let P=!1;const G=s.size>1,J=G&&K?vW(Uy(s)):null,X=G&&$?bMe({dragItems:s,snapGrid:Z,x:R,y:U}):null;for(const[ae,re]of s){if(!q.has(ae))continue;let fe={x:R-re.distance.x,y:U-re.distance.y};$&&(fe=X?{x:Math.round(fe.x+X.x),y:Math.round(fe.y+X.y)}:$y(fe,Z));let ke=null;if(G&&K&&!re.extent&&J){const{positionAbsolute:Re}=re.internals,$e=Re.x-J.x+K[0][0],ee=Re.x+re.measured.width-J.x2+K[1][0],qe=Re.y-J.y+K[0][1],Ke=Re.y+re.measured.height-J.y2+K[1][1];ke=[[$e,qe],[ee,Ke]]}const{position:Ne,positionAbsolute:je}=qde({nodeId:ae,nextPosition:fe,nodeLookup:q,nodeExtent:ke||K,nodeOrigin:B,onError:ie});P=P||re.position.x!==Ne.x||re.position.y!==Ne.y,re.position=Ne,re.internals.positionAbsolute=je}if(y=y||P,!!P&&(N(s,!0),v&&(r||V||!A&&F))){const[ae,re]=uO({nodeId:A,dragItems:s,nodeLookup:q});r==null||r(v,s,ae,re),V==null||V(v,ae,re),A||F==null||F(v,re)}}async function T(){if(!u)return;const{transform:R,panBy:U,autoPanSpeed:q,autoPanOnNodeDrag:K}=t();if(!K){c=!1,cancelAnimationFrame(o);return}const[Z,$]=Ode(l,u,q);(Z!==0||$!==0)&&(a.x=(a.x??0)-Z/R[2],a.y=(a.y??0)-$/R[2],await U({x:Z,y:$})&&O(a)),o=requestAnimationFrame(T)}function D(R){var G;const{nodeLookup:U,multiSelectionActive:q,nodesDraggable:K,transform:Z,snapGrid:$,snapToGrid:B,selectNodesOnDrag:V,onNodeDragStart:F,onSelectionDragStart:ie,unselectNodesAndEdges:N}=t();d=!0,(!V||!_)&&!q&&A&&((G=U.get(A))!=null&&G.selected||N()),_&&V&&A&&(e==null||e(A));const P=qp(R.sourceEvent,{transform:Z,snapGrid:$,snapToGrid:B,containerBounds:u});if(a=P,s=wMe(U,K,P,A),s.size>0&&(n||F||!A&&ie)){const[J,X]=uO({nodeId:A,dragItems:s,nodeLookup:U});n==null||n(R.sourceEvent,s,J,X),F==null||F(R.sourceEvent,J,X),A||ie==null||ie(R.sourceEvent,X)}}const I=gde().clickDistance(j).on("start",R=>{const{domNode:U,nodeDragThreshold:q,transform:K,snapGrid:Z,snapToGrid:$}=t();u=(U==null?void 0:U.getBoundingClientRect())||null,h=!1,y=!1,v=R.sourceEvent,q===0&&D(R),a=qp(R.sourceEvent,{transform:K,snapGrid:Z,snapToGrid:$,containerBounds:u}),l=No(R.sourceEvent,u)}).on("drag",R=>{const{autoPanOnNodeDrag:U,transform:q,snapGrid:K,snapToGrid:Z,nodeDragThreshold:$,nodeLookup:B}=t(),V=qp(R.sourceEvent,{transform:q,snapGrid:K,snapToGrid:Z,containerBounds:u});if(v=R.sourceEvent,(R.sourceEvent.type==="touchmove"&&R.sourceEvent.touches.length>1||A&&!B.has(A))&&(h=!0),!h){if(!c&&U&&d&&(c=!0,T()),!d){const F=No(R.sourceEvent,u),ie=F.x-l.x,N=F.y-l.y;Math.sqrt(ie*ie+N*N)>$&&D(R)}(a.x!==V.xSnapped||a.y!==V.ySnapped)&&s&&d&&(l=No(R.sourceEvent,u),O(V))}}).on("end",R=>{if(!(!d||h)&&(c=!1,d=!1,cancelAnimationFrame(o),s.size>0)){const{nodeLookup:U,updateNodePositions:q,onNodeDragStop:K,onSelectionDragStop:Z}=t();if(y&&(q(s,!1),y=!1),i||K||!A&&Z){const[$,B]=uO({nodeId:A,dragItems:s,nodeLookup:U,dragging:!1});i==null||i(R.sourceEvent,s,$,B),K==null||K(R.sourceEvent,$,B),A||Z==null||Z(R.sourceEvent,B)}}}).filter(R=>{const U=R.target;return!R.button&&(!S||!oQ(U,`.${S}`,C))&&(!w||oQ(U,w,C))});f.call(I)}function g(){f==null||f.on(".drag",null)}return{update:k,destroy:g}}function SMe(e,t,n){const r=[],i={x:e.x-n,y:e.y-n,width:n*2,height:n*2};for(const a of t.values())gy(i,Af(a))>0&&r.push(a);return r}const CMe=250;function LMe(e,t,n,r){var s,c;let i=[],a=1/0;const o=SMe(e,n,t+CMe);for(const l of o){const u=[...((s=l.internals.handleBounds)==null?void 0:s.source)??[],...((c=l.internals.handleBounds)==null?void 0:c.target)??[]];for(const d of u){if(r.nodeId===d.nodeId&&r.type===d.type&&r.id===d.id)continue;const{x:f,y:h}=Rh(l,d,d.position,!0),y=Math.sqrt(Math.pow(f-e.x,2)+Math.pow(h-e.y,2));y>t||(y<a?(i=[{...d,x:f,y:h}],a=y):y===a&&i.push({...d,x:f,y:h}))}}if(!i.length)return null;if(i.length>1){const l=r.type==="source"?"target":"source";return i.find(u=>u.type===l)??i[0]}return i[0]}function Qde(e,t,n,r,i,a=!1){var l,u,d;const o=r.get(e);if(!o)return null;const s=i==="strict"?(l=o.internals.handleBounds)==null?void 0:l[t]:[...((u=o.internals.handleBounds)==null?void 0:u.source)??[],...((d=o.internals.handleBounds)==null?void 0:d.target)??[]],c=(n?s==null?void 0:s.find(f=>f.id===n):s==null?void 0:s[0])??null;return c&&a?{...c,...Rh(o,c,c.position,!0)}:c}function ehe(e,t){return e||(t!=null&&t.classList.contains("target")?"target":t!=null&&t.classList.contains("source")?"source":null)}function IMe(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}const the=()=>!0;function AMe(e,{connectionMode:t,connectionRadius:n,handleId:r,nodeId:i,edgeUpdaterType:a,isTarget:o,domNode:s,nodeLookup:c,lib:l,autoPanOnConnect:u,flowId:d,panBy:f,cancelConnection:h,onConnectStart:y,onConnect:v,onConnectEnd:k,isValidConnection:g=the,onReconnectEnd:S,updateConnection:w,getTransform:C,getFromHandle:_,autoPanSpeed:A,dragThreshold:j=1,handleDomNode:O}){const T=Vde(e.target);let D=0,I;const{x:R,y:U}=No(e),q=ehe(a,O),K=s==null?void 0:s.getBoundingClientRect();let Z=!1;if(!K||!q)return;const $=Qde(i,q,r,c,t);if(!$)return;let B=No(e,K),V=!1,F=null,ie=!1,N=null;function P(){if(!u||!K)return;const[Ne,je]=Ode(B,K,A);f({x:Ne,y:je}),D=requestAnimationFrame(P)}const G={...$,nodeId:i,type:q,position:$.position},J=c.get(i);let ae={inProgress:!0,isValid:null,from:Rh(J,G,tt.Left,!0),fromHandle:G,fromPosition:G.position,fromNode:J,to:B,toHandle:null,toPosition:KJ[G.position],toNode:null,pointer:B};function re(){Z=!0,w(ae),y==null||y(e,{nodeId:i,handleId:r,handleType:q})}j===0&&re();function fe(Ne){if(!Z){const{x:Ke,y:_e}=No(Ne),Se=Ke-R,ot=_e-U;if(!(Se*Se+ot*ot>j*j))return;re()}if(!_()||!G){ke(Ne);return}const je=C();B=No(Ne,K),I=LMe(Wy(B,je,!1,[1,1]),n,c,G),V||(P(),V=!0);const Re=nhe(Ne,{handle:I,connectionMode:t,fromNodeId:i,fromHandleId:r,fromType:o?"target":"source",isValidConnection:g,doc:T,lib:l,flowId:d,nodeLookup:c});N=Re.handleDomNode,F=Re.connection,ie=IMe(!!I,Re.isValid);const $e=c.get(i),ee=$e?Rh($e,G,tt.Left,!0):ae.from,qe={...ae,from:ee,isValid:ie,to:Re.toHandle&&ie?aD({x:Re.toHandle.x,y:Re.toHandle.y},je):B,toHandle:Re.toHandle,toPosition:ie&&Re.toHandle?Re.toHandle.position:KJ[G.position],toNode:Re.toHandle?c.get(Re.toHandle.nodeId):null,pointer:B};w(qe),ae=qe}function ke(Ne){if(!("touches"in Ne&&Ne.touches.length>0)){if(Z){(I||N)&&F&&ie&&(v==null||v(F));const{inProgress:je,...Re}=ae,$e={...Re,toPosition:ae.toHandle?ae.toPosition:null};k==null||k(Ne,$e),a&&(S==null||S(Ne,$e))}h(),cancelAnimationFrame(D),V=!1,ie=!1,F=null,N=null,T.removeEventListener("mousemove",fe),T.removeEventListener("mouseup",ke),T.removeEventListener("touchmove",fe),T.removeEventListener("touchend",ke)}}T.addEventListener("mousemove",fe),T.addEventListener("mouseup",ke),T.addEventListener("touchmove",fe),T.addEventListener("touchend",ke)}function nhe(e,{handle:t,connectionMode:n,fromNodeId:r,fromHandleId:i,fromType:a,doc:o,lib:s,flowId:c,isValidConnection:l=the,nodeLookup:u}){const d=a==="target",f=t?o.querySelector(`.${s}-flow__handle[data-id="${c}-${t==null?void 0:t.nodeId}-${t==null?void 0:t.id}-${t==null?void 0:t.type}"]`):null,{x:h,y}=No(e),v=o.elementFromPoint(h,y),k=v!=null&&v.classList.contains(`${s}-flow__handle`)?v:f,g={handleDomNode:k,isValid:!1,connection:null,toHandle:null};if(k){const S=ehe(void 0,k),w=k.getAttribute("data-nodeid"),C=k.getAttribute("data-handleid"),_=k.classList.contains("connectable"),A=k.classList.contains("connectableend");if(!w||!S)return g;const j={source:d?w:r,sourceHandle:d?C:i,target:d?r:w,targetHandle:d?i:C};g.connection=j;const T=_&&A&&(n===Cf.Strict?d&&S==="source"||!d&&S==="target":w!==r||C!==i);g.isValid=T&&l(j),g.toHandle=Qde(w,S,C,u,n,!0)}return g}const wW={onPointerDown:AMe,isValid:nhe};function _Me({domNode:e,panZoom:t,getTransform:n,getViewScale:r}){const i=Ta(e);function a({translateExtent:s,width:c,height:l,zoomStep:u=1,pannable:d=!0,zoomable:f=!0,inversePan:h=!1}){const y=w=>{if(w.sourceEvent.type!=="wheel"||!t)return;const C=n(),_=w.sourceEvent.ctrlKey&&my()?10:1,A=-w.sourceEvent.deltaY*(w.sourceEvent.deltaMode===1?.05:w.sourceEvent.deltaMode?1:.002)*u,j=C[2]*Math.pow(2,A*_);t.scaleTo(j)};let v=[0,0];const k=w=>{(w.sourceEvent.type==="mousedown"||w.sourceEvent.type==="touchstart")&&(v=[w.sourceEvent.clientX??w.sourceEvent.touches[0].clientX,w.sourceEvent.clientY??w.sourceEvent.touches[0].clientY])},g=w=>{const C=n();if(w.sourceEvent.type!=="mousemove"&&w.sourceEvent.type!=="touchmove"||!t)return;const _=[w.sourceEvent.clientX??w.sourceEvent.touches[0].clientX,w.sourceEvent.clientY??w.sourceEvent.touches[0].clientY],A=[_[0]-v[0],_[1]-v[1]];v=_;const j=r()*Math.max(C[2],Math.log(C[2]))*(h?-1:1),O={x:C[0]-A[0]*j,y:C[1]-A[1]*j},T=[[0,0],[c,l]];t.setViewportConstrained({x:O.x,y:O.y,zoom:C[2]},T,s)},S=Pde().on("start",k).on("zoom",d?g:null).on("zoom.wheel",f?y:null);i.call(S,{})}function o(){i.on("zoom",null)}return{update:a,destroy:o,pointer:Ao}}const gq=e=>({x:e.x,y:e.y,zoom:e.k}),dO=({x:e,y:t,zoom:n})=>hq.translate(e,t).scale(n),z2=(e,t)=>e.target.closest(`.${t}`),rhe=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),EMe=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,hO=(e,t=0,n=EMe,r=()=>{})=>{const i=typeof t=="number"&&t>0;return i||r(),i?e.transition().duration(t).ease(n).on("end",r):e},ihe=e=>{const t=e.ctrlKey&&my()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t};function PMe({zoomPanValues:e,noWheelClassName:t,d3Selection:n,d3Zoom:r,panOnScrollMode:i,panOnScrollSpeed:a,zoomOnPinch:o,onPanZoomStart:s,onPanZoom:c,onPanZoomEnd:l}){return u=>{if(z2(u,t))return u.ctrlKey&&u.preventDefault(),!1;u.preventDefault(),u.stopImmediatePropagation();const d=n.property("__zoom").k||1;if(u.ctrlKey&&o){const k=Ao(u),g=ihe(u),S=d*Math.pow(2,g);r.scaleTo(n,S,k,u);return}const f=u.deltaMode===1?20:1;let h=i===xh.Vertical?0:u.deltaX*f,y=i===xh.Horizontal?0:u.deltaY*f;!my()&&u.shiftKey&&i!==xh.Vertical&&(h=u.deltaY*f,y=0),r.translateBy(n,-(h/d)*a,-(y/d)*a,{internal:!0});const v=gq(n.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling?(c==null||c(u,v),e.panScrollTimeout=setTimeout(()=>{l==null||l(u,v),e.isPanScrolling=!1},150)):(e.isPanScrolling=!0,s==null||s(u,v))}}function NMe({noWheelClassName:e,preventScrolling:t,d3ZoomHandler:n}){return function(r,i){const a=r.type==="wheel",o=!t&&a&&!r.ctrlKey,s=z2(r,e);if(r.ctrlKey&&a&&s&&r.preventDefault(),o||s)return null;r.preventDefault(),n.call(this,r,i)}}function RMe({zoomPanValues:e,onDraggingChange:t,onPanZoomStart:n}){return r=>{var a,o,s;if((a=r.sourceEvent)!=null&&a.internal)return;const i=gq(r.transform);e.mouseButton=((o=r.sourceEvent)==null?void 0:o.button)||0,e.isZoomingOrPanning=!0,e.prevViewport=i,((s=r.sourceEvent)==null?void 0:s.type)==="mousedown"&&t(!0),n&&(n==null||n(r.sourceEvent,i))}}function jMe({zoomPanValues:e,panOnDrag:t,onPaneContextMenu:n,onTransformChange:r,onPanZoom:i}){return a=>{var o,s;e.usedRightMouseButton=!!(n&&rhe(t,e.mouseButton??0)),(o=a.sourceEvent)!=null&&o.sync||r([a.transform.x,a.transform.y,a.transform.k]),i&&!((s=a.sourceEvent)!=null&&s.internal)&&(i==null||i(a.sourceEvent,gq(a.transform)))}}function TMe({zoomPanValues:e,panOnDrag:t,panOnScroll:n,onDraggingChange:r,onPanZoomEnd:i,onPaneContextMenu:a}){return o=>{var s;if(!((s=o.sourceEvent)!=null&&s.internal)&&(e.isZoomingOrPanning=!1,a&&rhe(t,e.mouseButton??0)&&!e.usedRightMouseButton&&o.sourceEvent&&a(o.sourceEvent),e.usedRightMouseButton=!1,r(!1),i)){const c=gq(o.transform);e.prevViewport=c,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{i==null||i(o.sourceEvent,c)},n?150:0)}}}function DMe({zoomActivationKeyPressed:e,zoomOnScroll:t,zoomOnPinch:n,panOnDrag:r,panOnScroll:i,zoomOnDoubleClick:a,userSelectionActive:o,noWheelClassName:s,noPanClassName:c,lib:l,connectionInProgress:u}){return d=>{var k;const f=e||t,h=n&&d.ctrlKey,y=d.type==="wheel";if(d.button===1&&d.type==="mousedown"&&(z2(d,`${l}-flow__node`)||z2(d,`${l}-flow__edge`)))return!0;if(!r&&!f&&!i&&!a&&!n||o||u&&!y||z2(d,s)&&y||z2(d,c)&&(!y||i&&y&&!e)||!n&&d.ctrlKey&&y)return!1;if(!n&&d.type==="touchstart"&&((k=d.touches)==null?void 0:k.length)>1)return d.preventDefault(),!1;if(!f&&!i&&!h&&y||!r&&(d.type==="mousedown"||d.type==="touchstart")||Array.isArray(r)&&!r.includes(d.button)&&d.type==="mousedown")return!1;const v=Array.isArray(r)&&r.includes(d.button)||!d.button||d.button<=1;return(!d.ctrlKey||y)&&v}}function qMe({domNode:e,minZoom:t,maxZoom:n,translateExtent:r,viewport:i,onPanZoom:a,onPanZoomStart:o,onPanZoomEnd:s,onDraggingChange:c}){const l={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},u=e.getBoundingClientRect(),d=Pde().scaleExtent([t,n]).translateExtent(r),f=Ta(e).call(d);S({x:i.x,y:i.y,zoom:If(i.zoom,t,n)},[[0,0],[u.width,u.height]],r);const h=f.on("wheel.zoom"),y=f.on("dblclick.zoom");d.wheelDelta(ihe);function v(I,R){return f?new Promise(U=>{d==null||d.interpolate((R==null?void 0:R.interpolate)==="linear"?Dp:iT).transform(hO(f,R==null?void 0:R.duration,R==null?void 0:R.ease,()=>U(!0)),I)}):Promise.resolve(!1)}function k({noWheelClassName:I,noPanClassName:R,onPaneContextMenu:U,userSelectionActive:q,panOnScroll:K,panOnDrag:Z,panOnScrollMode:$,panOnScrollSpeed:B,preventScrolling:V,zoomOnPinch:F,zoomOnScroll:ie,zoomOnDoubleClick:N,zoomActivationKeyPressed:P,lib:G,onTransformChange:J,connectionInProgress:X,paneClickDistance:ae,selectionOnDrag:re}){q&&!l.isZoomingOrPanning&&g();const fe=K&&!P&&!q;d.clickDistance(re?1/0:!Po(ae)||ae<0?0:ae);const ke=fe?PMe({zoomPanValues:l,noWheelClassName:I,d3Selection:f,d3Zoom:d,panOnScrollMode:$,panOnScrollSpeed:B,zoomOnPinch:F,onPanZoomStart:o,onPanZoom:a,onPanZoomEnd:s}):NMe({noWheelClassName:I,preventScrolling:V,d3ZoomHandler:h});if(f.on("wheel.zoom",ke,{passive:!1}),!q){const je=RMe({zoomPanValues:l,onDraggingChange:c,onPanZoomStart:o});d.on("start",je);const Re=jMe({zoomPanValues:l,panOnDrag:Z,onPaneContextMenu:!!U,onPanZoom:a,onTransformChange:J});d.on("zoom",Re);const $e=TMe({zoomPanValues:l,panOnDrag:Z,panOnScroll:K,onPaneContextMenu:U,onPanZoomEnd:s,onDraggingChange:c});d.on("end",$e)}const Ne=DMe({zoomActivationKeyPressed:P,panOnDrag:Z,zoomOnScroll:ie,panOnScroll:K,zoomOnDoubleClick:N,zoomOnPinch:F,userSelectionActive:q,noPanClassName:R,noWheelClassName:I,lib:G,connectionInProgress:X});d.filter(Ne),N?f.on("dblclick.zoom",y):f.on("dblclick.zoom",null)}function g(){d.on("zoom",null)}async function S(I,R,U){const q=dO(I),K=d==null?void 0:d.constrain()(q,R,U);return K&&await v(K),new Promise(Z=>Z(K))}async function w(I,R){const U=dO(I);return await v(U,R),new Promise(q=>q(U))}function C(I){if(f){const R=dO(I),U=f.property("__zoom");(U.k!==I.zoom||U.x!==I.x||U.y!==I.y)&&(d==null||d.transform(f,R,null,{sync:!0}))}}function _(){const I=f?Ede(f.node()):{x:0,y:0,k:1};return{x:I.x,y:I.y,zoom:I.k}}function A(I,R){return f?new Promise(U=>{d==null||d.interpolate((R==null?void 0:R.interpolate)==="linear"?Dp:iT).scaleTo(hO(f,R==null?void 0:R.duration,R==null?void 0:R.ease,()=>U(!0)),I)}):Promise.resolve(!1)}function j(I,R){return f?new Promise(U=>{d==null||d.interpolate((R==null?void 0:R.interpolate)==="linear"?Dp:iT).scaleBy(hO(f,R==null?void 0:R.duration,R==null?void 0:R.ease,()=>U(!0)),I)}):Promise.resolve(!1)}function O(I){d==null||d.scaleExtent(I)}function T(I){d==null||d.translateExtent(I)}function D(I){const R=!Po(I)||I<0?0:I;d==null||d.clickDistance(R)}return{update:k,destroy:g,setViewport:w,setViewportConstrained:S,getViewport:_,scaleTo:A,scaleBy:j,setScaleExtent:O,setTranslateExtent:T,syncViewport:C,setClickDistance:D}}var cl;(function(e){e.Line="line",e.Handle="handle"})(cl||(cl={}));function zMe({width:e,prevWidth:t,height:n,prevHeight:r,affectsX:i,affectsY:a}){const o=e-t,s=n-r,c=[o>0?1:o<0?-1:0,s>0?1:s<0?-1:0];return o&&i&&(c[0]=c[0]*-1),s&&a&&(c[1]=c[1]*-1),c}function sQ(e){const t=e.includes("right")||e.includes("left"),n=e.includes("bottom")||e.includes("top"),r=e.includes("left"),i=e.includes("top");return{isHorizontal:t,isVertical:n,affectsX:r,affectsY:i}}function Lc(e,t){return Math.max(0,t-e)}function Ic(e,t){return Math.max(0,e-t)}function cm(e,t,n){return Math.max(0,t-e,e-n)}function cQ(e,t){return e?!t:t}function OMe(e,t,n,r,i,a,o,s){let{affectsX:c,affectsY:l}=t;const{isHorizontal:u,isVertical:d}=t,f=u&&d,{xSnapped:h,ySnapped:y}=n,{minWidth:v,maxWidth:k,minHeight:g,maxHeight:S}=r,{x:w,y:C,width:_,height:A,aspectRatio:j}=e;let O=Math.floor(u?h-e.pointerX:0),T=Math.floor(d?y-e.pointerY:0);const D=_+(c?-O:O),I=A+(l?-T:T),R=-a[0]*_,U=-a[1]*A;let q=cm(D,v,k),K=cm(I,g,S);if(o){let B=0,V=0;c&&O<0?B=Lc(w+O+R,o[0][0]):!c&&O>0&&(B=Ic(w+D+R,o[1][0])),l&&T<0?V=Lc(C+T+U,o[0][1]):!l&&T>0&&(V=Ic(C+I+U,o[1][1])),q=Math.max(q,B),K=Math.max(K,V)}if(s){let B=0,V=0;c&&O>0?B=Ic(w+O,s[0][0]):!c&&O<0&&(B=Lc(w+D,s[1][0])),l&&T>0?V=Ic(C+T,s[0][1]):!l&&T<0&&(V=Lc(C+I,s[1][1])),q=Math.max(q,B),K=Math.max(K,V)}if(i){if(u){const B=cm(D/j,g,S)*j;if(q=Math.max(q,B),o){let V=0;!c&&!l||c&&!l&&f?V=Ic(C+U+D/j,o[1][1])*j:V=Lc(C+U+(c?O:-O)/j,o[0][1])*j,q=Math.max(q,V)}if(s){let V=0;!c&&!l||c&&!l&&f?V=Lc(C+D/j,s[1][1])*j:V=Ic(C+(c?O:-O)/j,s[0][1])*j,q=Math.max(q,V)}}if(d){const B=cm(I*j,v,k)/j;if(K=Math.max(K,B),o){let V=0;!c&&!l||l&&!c&&f?V=Ic(w+I*j+R,o[1][0])/j:V=Lc(w+(l?T:-T)*j+R,o[0][0])/j,K=Math.max(K,V)}if(s){let V=0;!c&&!l||l&&!c&&f?V=Lc(w+I*j,s[1][0])/j:V=Ic(w+(l?T:-T)*j,s[0][0])/j,K=Math.max(K,V)}}}T=T+(T<0?K:-K),O=O+(O<0?q:-q),i&&(f?D>I*j?T=(cQ(c,l)?-O:O)/j:O=(cQ(c,l)?-T:T)*j:u?(T=O/j,l=c):(O=T*j,c=l));const Z=c?w+O:w,$=l?C+T:C;return{width:_+(c?-O:O),height:A+(l?-T:T),x:a[0]*O*(c?-1:1)+Z,y:a[1]*T*(l?-1:1)+$}}const ahe={width:0,height:0,x:0,y:0},FMe={...ahe,pointerX:0,pointerY:0,aspectRatio:1};function BMe(e){return[[0,0],[e.measured.width,e.measured.height]]}function HMe(e,t,n){const r=t.position.x+e.position.x,i=t.position.y+e.position.y,a=e.measured.width??0,o=e.measured.height??0,s=n[0]*a,c=n[1]*o;return[[r-s,i-c],[r+a-s,i+o-c]]}function VMe({domNode:e,nodeId:t,getStoreItems:n,onChange:r,onEnd:i}){const a=Ta(e);let o={controlDirection:sQ("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function s({controlPosition:l,boundaries:u,keepAspectRatio:d,resizeDirection:f,onResizeStart:h,onResize:y,onResizeEnd:v,shouldResize:k}){let g={...ahe},S={...FMe};o={boundaries:u,resizeDirection:f,keepAspectRatio:d,controlDirection:sQ(l)};let w,C=null,_=[],A,j,O,T=!1;const D=gde().on("start",I=>{const{nodeLookup:R,transform:U,snapGrid:q,snapToGrid:K,nodeOrigin:Z,paneDomNode:$}=n();if(w=R.get(t),!w)return;C=($==null?void 0:$.getBoundingClientRect())??null;const{xSnapped:B,ySnapped:V}=qp(I.sourceEvent,{transform:U,snapGrid:q,snapToGrid:K,containerBounds:C});g={width:w.measured.width??0,height:w.measured.height??0,x:w.position.x??0,y:w.position.y??0},S={...g,pointerX:B,pointerY:V,aspectRatio:g.width/g.height},A=void 0,w.parentId&&(w.extent==="parent"||w.expandParent)&&(A=R.get(w.parentId),j=A&&w.extent==="parent"?BMe(A):void 0),_=[],O=void 0;for(const[F,ie]of R)if(ie.parentId===t&&(_.push({id:F,position:{...ie.position},extent:ie.extent}),ie.extent==="parent"||ie.expandParent)){const N=HMe(ie,w,ie.origin??Z);O?O=[[Math.min(N[0][0],O[0][0]),Math.min(N[0][1],O[0][1])],[Math.max(N[1][0],O[1][0]),Math.max(N[1][1],O[1][1])]]:O=N}h==null||h(I,{...g})}).on("drag",I=>{const{transform:R,snapGrid:U,snapToGrid:q,nodeOrigin:K}=n(),Z=qp(I.sourceEvent,{transform:R,snapGrid:U,snapToGrid:q,containerBounds:C}),$=[];if(!w)return;const{x:B,y:V,width:F,height:ie}=g,N={},P=w.origin??K,{width:G,height:J,x:X,y:ae}=OMe(S,o.controlDirection,Z,o.boundaries,o.keepAspectRatio,P,j,O),re=G!==F,fe=J!==ie,ke=X!==B&&re,Ne=ae!==V&&fe;if(!ke&&!Ne&&!re&&!fe)return;if((ke||Ne||P[0]===1||P[1]===1)&&(N.x=ke?X:g.x,N.y=Ne?ae:g.y,g.x=N.x,g.y=N.y,_.length>0)){const ee=X-B,qe=ae-V;for(const Ke of _)Ke.position={x:Ke.position.x-ee+P[0]*(G-F),y:Ke.position.y-qe+P[1]*(J-ie)},$.push(Ke)}if((re||fe)&&(N.width=re&&(!o.resizeDirection||o.resizeDirection==="horizontal")?G:g.width,N.height=fe&&(!o.resizeDirection||o.resizeDirection==="vertical")?J:g.height,g.width=N.width,g.height=N.height),A&&w.expandParent){const ee=P[0]*(N.width??0);N.x&&N.x<ee&&(g.x=ee,S.x=S.x-(N.x-ee));const qe=P[1]*(N.height??0);N.y&&N.y<qe&&(g.y=qe,S.y=S.y-(N.y-qe))}const je=zMe({width:g.width,prevWidth:F,height:g.height,prevHeight:ie,affectsX:o.controlDirection.affectsX,affectsY:o.controlDirection.affectsY}),Re={...g,direction:je};(k==null?void 0:k(I,Re))!==!1&&(T=!0,y==null||y(I,Re),r(N,$))}).on("end",I=>{T&&(v==null||v(I,{...g}),i==null||i({...g}),T=!1)});a.call(D)}function c(){a.on(".drag",null)}return{update:s,destroy:c}}var ohe={exports:{}},she={},che={exports:{}},lhe={};/**
7786
7786
  * @license React
7787
7787
  * use-sync-external-store-shim.production.js
@@ -7804,7 +7804,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
7804
7804
  `,`
7805
7805
  +`).split(`
7806
7806
  `)),u=l.reduce((d,f)=>d.concat(...f),[]);return[l,u]}return[[],[]]},[e]);return M.useEffect(()=>{const c=(t==null?void 0:t.target)??yQ,l=(t==null?void 0:t.actInsideInputWithModifier)??!0;if(e!==null){const u=h=>{var k,g;if(i.current=h.ctrlKey||h.metaKey||h.shiftKey||h.altKey,(!i.current||i.current&&!l)&&Ude(h))return!1;const v=mQ(h.code,s);if(a.current.add(h[v]),gQ(o,a.current,!1)){const S=((g=(k=h.composedPath)==null?void 0:k.call(h))==null?void 0:g[0])||h.target,w=(S==null?void 0:S.nodeName)==="BUTTON"||(S==null?void 0:S.nodeName)==="A";t.preventDefault!==!1&&(i.current||!w)&&h.preventDefault(),r(!0)}},d=h=>{const y=mQ(h.code,s);gQ(o,a.current,!0)?(r(!1),a.current.clear()):a.current.delete(h[y]),h.key==="Meta"&&a.current.clear(),i.current=!1},f=()=>{a.current.clear(),r(!1)};return c==null||c.addEventListener("keydown",u),c==null||c.addEventListener("keyup",d),window.addEventListener("blur",f),window.addEventListener("contextmenu",f),()=>{c==null||c.removeEventListener("keydown",u),c==null||c.removeEventListener("keyup",d),window.removeEventListener("blur",f),window.removeEventListener("contextmenu",f)}}},[e,r]),n}function gQ(e,t,n){return e.filter(r=>n||r.length===t.size).some(r=>r.every(i=>t.has(i)))}function mQ(e,t){return t.includes(e)?"code":"key"}const j9e=()=>{const e=Yn();return M.useMemo(()=>({zoomIn:t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1.2,t):Promise.resolve(!1)},zoomOut:t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1/1.2,t):Promise.resolve(!1)},zoomTo:(t,n)=>{const{panZoom:r}=e.getState();return r?r.scaleTo(t,n):Promise.resolve(!1)},getZoom:()=>e.getState().transform[2],setViewport:async(t,n)=>{const{transform:[r,i,a],panZoom:o}=e.getState();return o?(await o.setViewport({x:t.x??r,y:t.y??i,zoom:t.zoom??a},n),Promise.resolve(!0)):Promise.resolve(!1)},getViewport:()=>{const[t,n,r]=e.getState().transform;return{x:t,y:n,zoom:r}},setCenter:async(t,n,r)=>e.getState().setCenter(t,n,r),fitBounds:async(t,n)=>{const{width:r,height:i,minZoom:a,maxZoom:o,panZoom:s}=e.getState(),c=zK(t,r,i,a,o,(n==null?void 0:n.padding)??.1);return s?(await s.setViewport(c,{duration:n==null?void 0:n.duration,ease:n==null?void 0:n.ease,interpolate:n==null?void 0:n.interpolate}),Promise.resolve(!0)):Promise.resolve(!1)},screenToFlowPosition:(t,n={})=>{const{transform:r,snapGrid:i,snapToGrid:a,domNode:o}=e.getState();if(!o)return t;const{x:s,y:c}=o.getBoundingClientRect(),l={x:t.x-s,y:t.y-c},u=n.snapGrid??i,d=n.snapToGrid??a;return Wy(l,r,d,u)},flowToScreenPosition:t=>{const{transform:n,domNode:r}=e.getState();if(!r)return t;const{x:i,y:a}=r.getBoundingClientRect(),o=aD(t,n);return{x:o.x+i,y:o.y+a}}}),[])};function yhe(e,t){const n=[],r=new Map,i=[];for(const a of e)if(a.type==="add"){i.push(a);continue}else if(a.type==="remove"||a.type==="replace")r.set(a.id,[a]);else{const o=r.get(a.id);o?o.push(a):r.set(a.id,[a])}for(const a of t){const o=r.get(a.id);if(!o){n.push(a);continue}if(o[0].type==="remove")continue;if(o[0].type==="replace"){n.push({...o[0].item});continue}const s={...a};for(const c of o)T9e(c,s);n.push(s)}return i.length&&i.forEach(a=>{a.index!==void 0?n.splice(a.index,0,{...a.item}):n.push({...a.item})}),n}function T9e(e,t){switch(e.type){case"select":{t.selected=e.selected;break}case"position":{typeof e.position<"u"&&(t.position=e.position),typeof e.dragging<"u"&&(t.dragging=e.dragging);break}case"dimensions":{typeof e.dimensions<"u"&&(t.measured={...e.dimensions},e.setAttributes&&((e.setAttributes===!0||e.setAttributes==="width")&&(t.width=e.dimensions.width),(e.setAttributes===!0||e.setAttributes==="height")&&(t.height=e.dimensions.height))),typeof e.resizing=="boolean"&&(t.resizing=e.resizing);break}}}function ghe(e,t){return yhe(e,t)}function mhe(e,t){return yhe(e,t)}function ch(e,t){return{id:e,type:"select",selected:t}}function O2(e,t=new Set,n=!1){const r=[];for(const[i,a]of e){const o=t.has(i);!(a.selected===void 0&&!o)&&a.selected!==o&&(n&&(a.selected=o),r.push(ch(a.id,o)))}return r}function vQ({items:e=[],lookup:t}){var i;const n=[],r=new Map(e.map(a=>[a.id,a]));for(const[a,o]of e.entries()){const s=t.get(o.id),c=((i=s==null?void 0:s.internals)==null?void 0:i.userNode)??s;c!==void 0&&c!==o&&n.push({id:o.id,item:o,type:"replace"}),c===void 0&&n.push({item:o,type:"add",index:a})}for(const[a]of t)r.get(a)===void 0&&n.push({id:a,type:"remove"});return n}function kQ(e){return{id:e.id,type:"remove"}}const xQ=e=>$7e(e),D9e=e=>Dde(e);function vhe(e){return M.forwardRef(e)}function wQ(e){const[t,n]=M.useState(BigInt(0)),[r]=M.useState(()=>q9e(()=>n(i=>i+BigInt(1))));return bW(()=>{const i=r.get();i.length&&(e(i),r.reset())},[t]),r}function q9e(e){let t=[];return{get:()=>t,reset:()=>{t=[]},push:n=>{t.push(n),e()}}}const khe=M.createContext(null);function z9e({children:e}){const t=Yn(),n=M.useCallback(s=>{const{nodes:c=[],setNodes:l,hasDefaultNodes:u,onNodesChange:d,nodeLookup:f,fitViewQueued:h,onNodesChangeMiddlewareMap:y}=t.getState();let v=c;for(const g of s)v=typeof g=="function"?g(v):g;let k=vQ({items:v,lookup:f});for(const g of y.values())k=g(k);u&&l(v),k.length>0?d==null||d(k):h&&window.requestAnimationFrame(()=>{const{fitViewQueued:g,nodes:S,setNodes:w}=t.getState();g&&w(S)})},[]),r=wQ(n),i=M.useCallback(s=>{const{edges:c=[],setEdges:l,hasDefaultEdges:u,onEdgesChange:d,edgeLookup:f}=t.getState();let h=c;for(const y of s)h=typeof y=="function"?y(h):y;u?l(h):d&&d(vQ({items:h,lookup:f}))},[]),a=wQ(i),o=M.useMemo(()=>({nodeQueue:r,edgeQueue:a}),[]);return x.jsx(khe.Provider,{value:o,children:e})}function O9e(){const e=M.useContext(khe);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}const F9e=e=>!!e.panZoom;function kq(){const e=j9e(),t=Yn(),n=O9e(),r=qt(F9e),i=M.useMemo(()=>{const a=d=>t.getState().nodeLookup.get(d),o=d=>{n.nodeQueue.push(d)},s=d=>{n.edgeQueue.push(d)},c=d=>{var g,S;const{nodeLookup:f,nodeOrigin:h}=t.getState(),y=xQ(d)?d:f.get(d.id),v=y.parentId?Hde(y.position,y.measured,y.parentId,f,h):y.position,k={...y,position:v,width:((g=y.measured)==null?void 0:g.width)??y.width,height:((S=y.measured)==null?void 0:S.height)??y.height};return Af(k)},l=(d,f,h={replace:!1})=>{o(y=>y.map(v=>{if(v.id===d){const k=typeof f=="function"?f(v):f;return h.replace&&xQ(k)?k:{...v,...k}}return v}))},u=(d,f,h={replace:!1})=>{s(y=>y.map(v=>{if(v.id===d){const k=typeof f=="function"?f(v):f;return h.replace&&D9e(k)?k:{...v,...k}}return v}))};return{getNodes:()=>t.getState().nodes.map(d=>({...d})),getNode:d=>{var f;return(f=a(d))==null?void 0:f.internals.userNode},getInternalNode:a,getEdges:()=>{const{edges:d=[]}=t.getState();return d.map(f=>({...f}))},getEdge:d=>t.getState().edgeLookup.get(d),setNodes:o,setEdges:s,addNodes:d=>{const f=Array.isArray(d)?d:[d];n.nodeQueue.push(h=>[...h,...f])},addEdges:d=>{const f=Array.isArray(d)?d:[d];n.edgeQueue.push(h=>[...h,...f])},toObject:()=>{const{nodes:d=[],edges:f=[],transform:h}=t.getState(),[y,v,k]=h;return{nodes:d.map(g=>({...g})),edges:f.map(g=>({...g})),viewport:{x:y,y:v,zoom:k}}},deleteElements:async({nodes:d=[],edges:f=[]})=>{const{nodes:h,edges:y,onNodesDelete:v,onEdgesDelete:k,triggerNodeChanges:g,triggerEdgeChanges:S,onDelete:w,onBeforeDelete:C}=t.getState(),{nodes:_,edges:A}=await X7e({nodesToRemove:d,edgesToRemove:f,nodes:h,edges:y,onBeforeDelete:C}),j=A.length>0,O=_.length>0;if(j){const T=A.map(kQ);k==null||k(A),S(T)}if(O){const T=_.map(kQ);v==null||v(_),g(T)}return(O||j)&&(w==null||w({nodes:_,edges:A})),{deletedNodes:_,deletedEdges:A}},getIntersectingNodes:(d,f=!0,h)=>{const y=XJ(d),v=y?d:c(d),k=h!==void 0;return v?(h||t.getState().nodes).filter(g=>{const S=t.getState().nodeLookup.get(g.id);if(S&&!y&&(g.id===d.id||!S.internals.positionAbsolute))return!1;const w=Af(k?g:S),C=gy(w,v);return f&&C>0||C>=w.width*w.height||C>=v.width*v.height}):[]},isNodeIntersecting:(d,f,h=!0)=>{const v=XJ(d)?d:c(d);if(!v)return!1;const k=gy(v,f);return h&&k>0||k>=f.width*f.height||k>=v.width*v.height},updateNode:l,updateNodeData:(d,f,h={replace:!1})=>{l(d,y=>{const v=typeof f=="function"?f(y):f;return h.replace?{...y,data:v}:{...y,data:{...y.data,...v}}},h)},updateEdge:u,updateEdgeData:(d,f,h={replace:!1})=>{u(d,y=>{const v=typeof f=="function"?f(y):f;return h.replace?{...y,data:v}:{...y,data:{...y.data,...v}}},h)},getNodesBounds:d=>{const{nodeLookup:f,nodeOrigin:h}=t.getState();return W7e(d,{nodeLookup:f,nodeOrigin:h})},getHandleConnections:({type:d,id:f,nodeId:h})=>{var y;return Array.from(((y=t.getState().connectionLookup.get(`${h}-${d}${f?`-${f}`:""}`))==null?void 0:y.values())??[])},getNodeConnections:({type:d,handleId:f,nodeId:h})=>{var y;return Array.from(((y=t.getState().connectionLookup.get(`${h}${d?f?`-${d}-${f}`:`-${d}`:""}`))==null?void 0:y.values())??[])},fitView:async d=>{const f=t.getState().fitViewResolver??eMe();return t.setState({fitViewQueued:!0,fitViewOptions:d,fitViewResolver:f}),n.nodeQueue.push(h=>[...h]),f.promise}}},[]);return M.useMemo(()=>({...i,...e,viewportInitialized:r}),[r])}const bQ=e=>e.selected,B9e=typeof window<"u"?window:void 0;function H9e({deleteKeyCode:e,multiSelectionKeyCode:t}){const n=Yn(),{deleteElements:r}=kq(),i=ky(e,{actInsideInputWithModifier:!1}),a=ky(t,{target:B9e});M.useEffect(()=>{if(i){const{edges:o,nodes:s}=n.getState();r({nodes:s.filter(bQ),edges:o.filter(bQ)}),n.setState({nodesSelectionActive:!1})}},[i]),M.useEffect(()=>{n.setState({multiSelectionActive:a})},[a])}function V9e(e){const t=Yn();M.useEffect(()=>{const n=()=>{var i,a,o,s;if(!e.current||!(((a=(i=e.current).checkVisibility)==null?void 0:a.call(i))??!0))return!1;const r=OK(e.current);(r.height===0||r.width===0)&&((s=(o=t.getState()).onError)==null||s.call(o,"004",ks.error004())),t.setState({width:r.width||500,height:r.height||500})};if(e.current){n(),window.addEventListener("resize",n);const r=new ResizeObserver(()=>n());return r.observe(e.current),()=>{window.removeEventListener("resize",n),r&&e.current&&r.unobserve(e.current)}}},[])}const xq={position:"absolute",width:"100%",height:"100%",top:0,left:0},U9e=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib,connectionInProgress:e.connection.inProgress});function $9e({onPaneContextMenu:e,zoomOnScroll:t=!0,zoomOnPinch:n=!0,panOnScroll:r=!1,panOnScrollSpeed:i=.5,panOnScrollMode:a=xh.Free,zoomOnDoubleClick:o=!0,panOnDrag:s=!0,defaultViewport:c,translateExtent:l,minZoom:u,maxZoom:d,zoomActivationKeyCode:f,preventScrolling:h=!0,children:y,noWheelClassName:v,noPanClassName:k,onViewportChange:g,isControlledViewport:S,paneClickDistance:w,selectionOnDrag:C}){const _=Yn(),A=M.useRef(null),{userSelectionActive:j,lib:O,connectionInProgress:T}=qt(U9e,Xn),D=ky(f),I=M.useRef();V9e(A);const R=M.useCallback(U=>{g==null||g({x:U[0],y:U[1],zoom:U[2]}),S||_.setState({transform:U})},[g,S]);return M.useEffect(()=>{if(A.current){I.current=qMe({domNode:A.current,minZoom:u,maxZoom:d,translateExtent:l,viewport:c,onDraggingChange:Z=>_.setState($=>$.paneDragging===Z?$:{paneDragging:Z}),onPanZoomStart:(Z,$)=>{const{onViewportChangeStart:B,onMoveStart:V}=_.getState();V==null||V(Z,$),B==null||B($)},onPanZoom:(Z,$)=>{const{onViewportChange:B,onMove:V}=_.getState();V==null||V(Z,$),B==null||B($)},onPanZoomEnd:(Z,$)=>{const{onViewportChangeEnd:B,onMoveEnd:V}=_.getState();V==null||V(Z,$),B==null||B($)}});const{x:U,y:q,zoom:K}=I.current.getViewport();return _.setState({panZoom:I.current,transform:[U,q,K],domNode:A.current.closest(".react-flow")}),()=>{var Z;(Z=I.current)==null||Z.destroy()}}},[]),M.useEffect(()=>{var U;(U=I.current)==null||U.update({onPaneContextMenu:e,zoomOnScroll:t,zoomOnPinch:n,panOnScroll:r,panOnScrollSpeed:i,panOnScrollMode:a,zoomOnDoubleClick:o,panOnDrag:s,zoomActivationKeyPressed:D,preventScrolling:h,noPanClassName:k,userSelectionActive:j,noWheelClassName:v,lib:O,onTransformChange:R,connectionInProgress:T,selectionOnDrag:C,paneClickDistance:w})},[e,t,n,r,i,a,o,s,D,h,k,j,v,O,R,T,C,w]),x.jsx("div",{className:"react-flow__renderer",ref:A,style:xq,children:y})}const W9e=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function G9e(){const{userSelectionActive:e,userSelectionRect:t}=qt(W9e,Xn);return e&&t?x.jsx("div",{className:"react-flow__selection react-flow__container",style:{width:t.width,height:t.height,transform:`translate(${t.x}px, ${t.y}px)`}}):null}const pO=(e,t)=>n=>{n.target===t.current&&(e==null||e(n))},K9e=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,connectionInProgress:e.connection.inProgress,dragging:e.paneDragging});function Z9e({isSelecting:e,selectionKeyPressed:t,selectionMode:n=Lf.Full,panOnDrag:r,paneClickDistance:i,selectionOnDrag:a,onSelectionStart:o,onSelectionEnd:s,onPaneClick:c,onPaneContextMenu:l,onPaneScroll:u,onPaneMouseEnter:d,onPaneMouseMove:f,onPaneMouseLeave:h,children:y}){const v=Yn(),{userSelectionActive:k,elementsSelectable:g,dragging:S,connectionInProgress:w}=qt(K9e,Xn),C=g&&(e||k),_=M.useRef(null),A=M.useRef(),j=M.useRef(new Set),O=M.useRef(new Set),T=M.useRef(!1),D=B=>{if(T.current||w){T.current=!1;return}c==null||c(B),v.getState().resetSelectedElements(),v.setState({nodesSelectionActive:!1})},I=B=>{if(Array.isArray(r)&&(r!=null&&r.includes(2))){B.preventDefault();return}l==null||l(B)},R=u?B=>u(B):void 0,U=B=>{T.current&&(B.stopPropagation(),T.current=!1)},q=B=>{var J,X;const{domNode:V}=v.getState();if(A.current=V==null?void 0:V.getBoundingClientRect(),!A.current)return;const F=B.target===_.current;if(!F&&!!B.target.closest(".nokey")||!e||!(a&&F||t)||B.button!==0||!B.isPrimary)return;(X=(J=B.target)==null?void 0:J.setPointerCapture)==null||X.call(J,B.pointerId),T.current=!1;const{x:P,y:G}=No(B.nativeEvent,A.current);v.setState({userSelectionRect:{width:0,height:0,startX:P,startY:G,x:P,y:G}}),F||(B.stopPropagation(),B.preventDefault())},K=B=>{const{userSelectionRect:V,transform:F,nodeLookup:ie,edgeLookup:N,connectionLookup:P,triggerNodeChanges:G,triggerEdgeChanges:J,defaultEdgeOptions:X,resetSelectedElements:ae}=v.getState();if(!A.current||!V)return;const{x:re,y:fe}=No(B.nativeEvent,A.current),{startX:ke,startY:Ne}=V;if(!T.current){const qe=t?0:i;if(Math.hypot(re-ke,fe-Ne)<=qe)return;ae(),o==null||o(B)}T.current=!0;const je={startX:ke,startY:Ne,x:re<ke?re:ke,y:fe<Ne?fe:Ne,width:Math.abs(re-ke),height:Math.abs(fe-Ne)},Re=j.current,$e=O.current;j.current=new Set(qK(ie,je,F,n===Lf.Partial,!0).map(qe=>qe.id)),O.current=new Set;const ee=(X==null?void 0:X.selectable)??!0;for(const qe of j.current){const Ke=P.get(qe);if(Ke)for(const{edgeId:_e}of Ke.values()){const Se=N.get(_e);Se&&(Se.selectable??ee)&&O.current.add(_e)}}if(!YJ(Re,j.current)){const qe=O2(ie,j.current,!0);G(qe)}if(!YJ($e,O.current)){const qe=O2(N,O.current);J(qe)}v.setState({userSelectionRect:je,userSelectionActive:!0,nodesSelectionActive:!1})},Z=B=>{var V,F;B.button===0&&((F=(V=B.target)==null?void 0:V.releasePointerCapture)==null||F.call(V,B.pointerId),!k&&B.target===_.current&&v.getState().userSelectionRect&&(D==null||D(B)),v.setState({userSelectionActive:!1,userSelectionRect:null}),T.current&&(s==null||s(B),v.setState({nodesSelectionActive:j.current.size>0})))},$=r===!0||Array.isArray(r)&&r.includes(0);return x.jsxs("div",{className:Ur(["react-flow__pane",{draggable:$,dragging:S,selection:e}]),onClick:C?void 0:pO(D,_),onContextMenu:pO(I,_),onWheel:pO(R,_),onPointerEnter:C?void 0:d,onPointerMove:C?K:f,onPointerUp:C?Z:void 0,onPointerDownCapture:C?q:void 0,onClickCapture:C?U:void 0,onPointerLeave:h,ref:_,style:xq,children:[y,x.jsx(G9e,{})]})}function MW({id:e,store:t,unselect:n=!1,nodeRef:r}){const{addSelectedNodes:i,unselectNodesAndEdges:a,multiSelectionActive:o,nodeLookup:s,onError:c}=t.getState(),l=s.get(e);if(!l){c==null||c("012",ks.error012(e));return}t.setState({nodesSelectionActive:!1}),l.selected?(n||l.selected&&o)&&(a({nodes:[l],edges:[]}),requestAnimationFrame(()=>{var u;return(u=r==null?void 0:r.current)==null?void 0:u.blur()})):i([e])}function xhe({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:r,nodeId:i,isSelectable:a,nodeClickDistance:o}){const s=Yn(),[c,l]=M.useState(!1),u=M.useRef();return M.useEffect(()=>{u.current=MMe({getStoreItems:()=>s.getState(),onNodeMouseDown:d=>{MW({id:d,store:s,nodeRef:e})},onDragStart:()=>{l(!0)},onDragStop:()=>{l(!1)}})},[]),M.useEffect(()=>{if(!(t||!e.current||!u.current))return u.current.update({noDragClassName:n,handleSelector:r,domNode:e.current,isSelectable:a,nodeId:i,nodeClickDistance:o}),()=>{var d;(d=u.current)==null||d.destroy()}},[n,r,t,a,e,i,o]),c}const X9e=e=>t=>t.selected&&(t.draggable||e&&typeof t.draggable>"u");function whe(){const e=Yn();return M.useCallback(n=>{const{nodeExtent:r,snapToGrid:i,snapGrid:a,nodesDraggable:o,onError:s,updateNodePositions:c,nodeLookup:l,nodeOrigin:u}=e.getState(),d=new Map,f=X9e(o),h=i?a[0]:5,y=i?a[1]:5,v=n.direction.x*h*n.factor,k=n.direction.y*y*n.factor;for(const[,g]of l){if(!f(g))continue;let S={x:g.internals.positionAbsolute.x+v,y:g.internals.positionAbsolute.y+k};i&&(S=$y(S,a));const{position:w,positionAbsolute:C}=qde({nodeId:g.id,nextPosition:S,nodeLookup:l,nodeExtent:r,nodeOrigin:u,onError:s});g.position=w,g.internals.positionAbsolute=C,d.set(g.id,g)}c(d)},[])}const $K=M.createContext(null),Y9e=$K.Provider;$K.Consumer;const bhe=()=>M.useContext($K),J9e=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),Q9e=(e,t,n)=>r=>{const{connectionClickStartHandle:i,connectionMode:a,connection:o}=r,{fromHandle:s,toHandle:c,isValid:l}=o,u=(c==null?void 0:c.nodeId)===e&&(c==null?void 0:c.id)===t&&(c==null?void 0:c.type)===n;return{connectingFrom:(s==null?void 0:s.nodeId)===e&&(s==null?void 0:s.id)===t&&(s==null?void 0:s.type)===n,connectingTo:u,clickConnecting:(i==null?void 0:i.nodeId)===e&&(i==null?void 0:i.id)===t&&(i==null?void 0:i.type)===n,isPossibleEndHandle:a===Cf.Strict?(s==null?void 0:s.type)!==n:e!==(s==null?void 0:s.nodeId)||t!==(s==null?void 0:s.id),connectionInProcess:!!s,clickConnectionInProcess:!!i,valid:u&&l}};function eSe({type:e="source",position:t=tt.Top,isValidConnection:n,isConnectable:r=!0,isConnectableStart:i=!0,isConnectableEnd:a=!0,id:o,onConnect:s,children:c,className:l,onMouseDown:u,onTouchStart:d,...f},h){var K,Z;const y=o||null,v=e==="target",k=Yn(),g=bhe(),{connectOnClick:S,noPanClassName:w,rfId:C}=qt(J9e,Xn),{connectingFrom:_,connectingTo:A,clickConnecting:j,isPossibleEndHandle:O,connectionInProcess:T,clickConnectionInProcess:D,valid:I}=qt(Q9e(g,y,e),Xn);g||(Z=(K=k.getState()).onError)==null||Z.call(K,"010",ks.error010());const R=$=>{const{defaultEdgeOptions:B,onConnect:V,hasDefaultEdges:F}=k.getState(),ie={...B,...$};if(F){const{edges:N,setEdges:P}=k.getState();P(sMe(ie,N))}V==null||V(ie),s==null||s(ie)},U=$=>{if(!g)return;const B=$de($.nativeEvent);if(i&&(B&&$.button===0||!B)){const V=k.getState();wW.onPointerDown($.nativeEvent,{handleDomNode:$.currentTarget,autoPanOnConnect:V.autoPanOnConnect,connectionMode:V.connectionMode,connectionRadius:V.connectionRadius,domNode:V.domNode,nodeLookup:V.nodeLookup,lib:V.lib,isTarget:v,handleId:y,nodeId:g,flowId:V.rfId,panBy:V.panBy,cancelConnection:V.cancelConnection,onConnectStart:V.onConnectStart,onConnectEnd:(...F)=>{var ie,N;return(N=(ie=k.getState()).onConnectEnd)==null?void 0:N.call(ie,...F)},updateConnection:V.updateConnection,onConnect:R,isValidConnection:n||((...F)=>{var ie,N;return((N=(ie=k.getState()).isValidConnection)==null?void 0:N.call(ie,...F))??!0}),getTransform:()=>k.getState().transform,getFromHandle:()=>k.getState().connection.fromHandle,autoPanSpeed:V.autoPanSpeed,dragThreshold:V.connectionDragThreshold})}B?u==null||u($):d==null||d($)},q=$=>{const{onClickConnectStart:B,onClickConnectEnd:V,connectionClickStartHandle:F,connectionMode:ie,isValidConnection:N,lib:P,rfId:G,nodeLookup:J,connection:X}=k.getState();if(!g||!F&&!i)return;if(!F){B==null||B($.nativeEvent,{nodeId:g,handleId:y,handleType:e}),k.setState({connectionClickStartHandle:{nodeId:g,type:e,id:y}});return}const ae=Vde($.target),re=n||N,{connection:fe,isValid:ke}=wW.isValid($.nativeEvent,{handle:{nodeId:g,id:y,type:e},connectionMode:ie,fromNodeId:F.nodeId,fromHandleId:F.id||null,fromType:F.type,isValidConnection:re,flowId:G,doc:ae,lib:P,nodeLookup:J});ke&&fe&&R(fe);const Ne=structuredClone(X);delete Ne.inProgress,Ne.toPosition=Ne.toHandle?Ne.toHandle.position:null,V==null||V($,Ne),k.setState({connectionClickStartHandle:null})};return x.jsx("div",{"data-handleid":y,"data-nodeid":g,"data-handlepos":t,"data-id":`${C}-${g}-${y}-${e}`,className:Ur(["react-flow__handle",`react-flow__handle-${t}`,"nodrag",w,l,{source:!v,target:v,connectable:r,connectablestart:i,connectableend:a,clickconnecting:j,connectingfrom:_,connectingto:A,valid:I,connectionindicator:r&&(!T||O)&&(T||D?a:i)}]),onMouseDown:U,onTouchStart:U,onClick:S?q:void 0,ref:h,...f,children:c})}const Ln=M.memo(vhe(eSe));function tSe({data:e,isConnectable:t,sourcePosition:n=tt.Bottom}){return x.jsxs(x.Fragment,{children:[e==null?void 0:e.label,x.jsx(Ln,{type:"source",position:n,isConnectable:t})]})}function nSe({data:e,isConnectable:t,targetPosition:n=tt.Top,sourcePosition:r=tt.Bottom}){return x.jsxs(x.Fragment,{children:[x.jsx(Ln,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label,x.jsx(Ln,{type:"source",position:r,isConnectable:t})]})}function rSe(){return null}function iSe({data:e,isConnectable:t,targetPosition:n=tt.Top}){return x.jsxs(x.Fragment,{children:[x.jsx(Ln,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label]})}const oD={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},MQ={input:tSe,default:nSe,output:iSe,group:rSe};function aSe(e){var t,n,r,i;return e.internals.handleBounds===void 0?{width:e.width??e.initialWidth??((t=e.style)==null?void 0:t.width),height:e.height??e.initialHeight??((n=e.style)==null?void 0:n.height)}:{width:e.width??((r=e.style)==null?void 0:r.width),height:e.height??((i=e.style)==null?void 0:i.height)}}const oSe=e=>{const{width:t,height:n,x:r,y:i}=Uy(e.nodeLookup,{filter:a=>!!a.selected});return{width:Po(t)?t:null,height:Po(n)?n:null,userSelectionActive:e.userSelectionActive,transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]}) translate(${r}px,${i}px)`}};function sSe({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){const r=Yn(),{width:i,height:a,transformString:o,userSelectionActive:s}=qt(oSe,Xn),c=whe(),l=M.useRef(null);M.useEffect(()=>{var h;n||(h=l.current)==null||h.focus({preventScroll:!0})},[n]);const u=!s&&i!==null&&a!==null;if(xhe({nodeRef:l,disabled:!u}),!u)return null;const d=e?h=>{const y=r.getState().nodes.filter(v=>v.selected);e(h,y)}:void 0,f=h=>{Object.prototype.hasOwnProperty.call(oD,h.key)&&(h.preventDefault(),c({direction:oD[h.key],factor:h.shiftKey?4:1}))};return x.jsx("div",{className:Ur(["react-flow__nodesselection","react-flow__container",t]),style:{transform:o},children:x.jsx("div",{ref:l,className:"react-flow__nodesselection-rect",onContextMenu:d,tabIndex:n?void 0:-1,onKeyDown:n?void 0:f,style:{width:i,height:a}})})}const SQ=typeof window<"u"?window:void 0,cSe=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function Mhe({children:e,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:i,onPaneContextMenu:a,onPaneScroll:o,paneClickDistance:s,deleteKeyCode:c,selectionKeyCode:l,selectionOnDrag:u,selectionMode:d,onSelectionStart:f,onSelectionEnd:h,multiSelectionKeyCode:y,panActivationKeyCode:v,zoomActivationKeyCode:k,elementsSelectable:g,zoomOnScroll:S,zoomOnPinch:w,panOnScroll:C,panOnScrollSpeed:_,panOnScrollMode:A,zoomOnDoubleClick:j,panOnDrag:O,defaultViewport:T,translateExtent:D,minZoom:I,maxZoom:R,preventScrolling:U,onSelectionContextMenu:q,noWheelClassName:K,noPanClassName:Z,disableKeyboardA11y:$,onViewportChange:B,isControlledViewport:V}){const{nodesSelectionActive:F,userSelectionActive:ie}=qt(cSe,Xn),N=ky(l,{target:SQ}),P=ky(v,{target:SQ}),G=P||O,J=P||C,X=u&&G!==!0,ae=N||ie||X;return H9e({deleteKeyCode:c,multiSelectionKeyCode:y}),x.jsx($9e,{onPaneContextMenu:a,elementsSelectable:g,zoomOnScroll:S,zoomOnPinch:w,panOnScroll:J,panOnScrollSpeed:_,panOnScrollMode:A,zoomOnDoubleClick:j,panOnDrag:!N&&G,defaultViewport:T,translateExtent:D,minZoom:I,maxZoom:R,zoomActivationKeyCode:k,preventScrolling:U,noWheelClassName:K,noPanClassName:Z,onViewportChange:B,isControlledViewport:V,paneClickDistance:s,selectionOnDrag:X,children:x.jsxs(Z9e,{onSelectionStart:f,onSelectionEnd:h,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:i,onPaneContextMenu:a,onPaneScroll:o,panOnDrag:G,isSelecting:!!ae,selectionMode:d,selectionKeyPressed:N,paneClickDistance:s,selectionOnDrag:X,children:[e,F&&x.jsx(sSe,{onSelectionContextMenu:q,noPanClassName:Z,disableKeyboardA11y:$})]})})}Mhe.displayName="FlowRenderer";const lSe=M.memo(Mhe),uSe=e=>t=>e?qK(t.nodeLookup,{x:0,y:0,width:t.width,height:t.height},t.transform,!0).map(n=>n.id):Array.from(t.nodeLookup.keys());function dSe(e){return qt(M.useCallback(uSe(e),[e]),Xn)}const hSe=e=>e.updateNodeInternals;function fSe(){const e=qt(hSe),[t]=M.useState(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(n=>{const r=new Map;n.forEach(i=>{const a=i.target.getAttribute("data-id");r.set(a,{id:a,nodeElement:i.target,force:!0})}),e(r)}));return M.useEffect(()=>()=>{t==null||t.disconnect()},[t]),t}function pSe({node:e,nodeType:t,hasDimensions:n,resizeObserver:r}){const i=Yn(),a=M.useRef(null),o=M.useRef(null),s=M.useRef(e.sourcePosition),c=M.useRef(e.targetPosition),l=M.useRef(t),u=n&&!!e.internals.handleBounds;return M.useEffect(()=>{a.current&&!e.hidden&&(!u||o.current!==a.current)&&(o.current&&(r==null||r.unobserve(o.current)),r==null||r.observe(a.current),o.current=a.current)},[u,e.hidden]),M.useEffect(()=>()=>{o.current&&(r==null||r.unobserve(o.current),o.current=null)},[]),M.useEffect(()=>{if(a.current){const d=l.current!==t,f=s.current!==e.sourcePosition,h=c.current!==e.targetPosition;(d||f||h)&&(l.current=t,s.current=e.sourcePosition,c.current=e.targetPosition,i.getState().updateNodeInternals(new Map([[e.id,{id:e.id,nodeElement:a.current,force:!0}]])))}},[e.id,t,e.sourcePosition,e.targetPosition]),a}function ySe({id:e,onClick:t,onMouseEnter:n,onMouseMove:r,onMouseLeave:i,onContextMenu:a,onDoubleClick:o,nodesDraggable:s,elementsSelectable:c,nodesConnectable:l,nodesFocusable:u,resizeObserver:d,noDragClassName:f,noPanClassName:h,disableKeyboardA11y:y,rfId:v,nodeTypes:k,nodeClickDistance:g,onError:S}){const{node:w,internals:C,isParent:_}=qt(re=>{const fe=re.nodeLookup.get(e),ke=re.parentLookup.has(e);return{node:fe,internals:fe.internals,isParent:ke}},Xn);let A=w.type||"default",j=(k==null?void 0:k[A])||MQ[A];j===void 0&&(S==null||S("003",ks.error003(A)),A="default",j=(k==null?void 0:k.default)||MQ.default);const O=!!(w.draggable||s&&typeof w.draggable>"u"),T=!!(w.selectable||c&&typeof w.selectable>"u"),D=!!(w.connectable||l&&typeof w.connectable>"u"),I=!!(w.focusable||u&&typeof w.focusable>"u"),R=Yn(),U=Bde(w),q=pSe({node:w,nodeType:A,hasDimensions:U,resizeObserver:d}),K=xhe({nodeRef:q,disabled:w.hidden||!O,noDragClassName:f,handleSelector:w.dragHandle,nodeId:e,isSelectable:T,nodeClickDistance:g}),Z=whe();if(w.hidden)return null;const $=sc(w),B=aSe(w),V=T||O||t||n||r||i,F=n?re=>n(re,{...C.userNode}):void 0,ie=r?re=>r(re,{...C.userNode}):void 0,N=i?re=>i(re,{...C.userNode}):void 0,P=a?re=>a(re,{...C.userNode}):void 0,G=o?re=>o(re,{...C.userNode}):void 0,J=re=>{const{selectNodesOnDrag:fe,nodeDragThreshold:ke}=R.getState();T&&(!fe||!O||ke>0)&&MW({id:e,store:R,nodeRef:q}),t&&t(re,{...C.userNode})},X=re=>{if(!(Ude(re.nativeEvent)||y)){if(Nde.includes(re.key)&&T){const fe=re.key==="Escape";MW({id:e,store:R,unselect:fe,nodeRef:q})}else if(O&&w.selected&&Object.prototype.hasOwnProperty.call(oD,re.key)){re.preventDefault();const{ariaLabelConfig:fe}=R.getState();R.setState({ariaLiveMessage:fe["node.a11yDescription.ariaLiveMessage"]({direction:re.key.replace("Arrow","").toLowerCase(),x:~~C.positionAbsolute.x,y:~~C.positionAbsolute.y})}),Z({direction:oD[re.key],factor:re.shiftKey?4:1})}}},ae=()=>{var $e;if(y||!(($e=q.current)!=null&&$e.matches(":focus-visible")))return;const{transform:re,width:fe,height:ke,autoPanOnNodeFocus:Ne,setCenter:je}=R.getState();if(!Ne)return;qK(new Map([[e,w]]),{x:0,y:0,width:fe,height:ke},re,!0).length>0||je(w.position.x+$.width/2,w.position.y+$.height/2,{zoom:re[2]})};return x.jsx("div",{className:Ur(["react-flow__node",`react-flow__node-${A}`,{[h]:O},w.className,{selected:w.selected,selectable:T,parent:_,draggable:O,dragging:K}]),ref:q,style:{zIndex:C.z,transform:`translate(${C.positionAbsolute.x}px,${C.positionAbsolute.y}px)`,pointerEvents:V?"all":"none",visibility:U?"visible":"hidden",...w.style,...B},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:F,onMouseMove:ie,onMouseLeave:N,onContextMenu:P,onClick:J,onDoubleClick:G,onKeyDown:I?X:void 0,tabIndex:I?0:void 0,onFocus:I?ae:void 0,role:w.ariaRole??(I?"group":void 0),"aria-roledescription":"node","aria-describedby":y?void 0:`${hhe}-${v}`,"aria-label":w.ariaLabel,...w.domAttributes,children:x.jsx(Y9e,{value:e,children:x.jsx(j,{id:e,data:w.data,type:A,positionAbsoluteX:C.positionAbsolute.x,positionAbsoluteY:C.positionAbsolute.y,selected:w.selected??!1,selectable:T,draggable:O,deletable:w.deletable??!0,isConnectable:D,sourcePosition:w.sourcePosition,targetPosition:w.targetPosition,dragging:K,dragHandle:w.dragHandle,zIndex:C.z,parentId:w.parentId,...$})})})}var gSe=M.memo(ySe);const mSe=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function She(e){const{nodesDraggable:t,nodesConnectable:n,nodesFocusable:r,elementsSelectable:i,onError:a}=qt(mSe,Xn),o=dSe(e.onlyRenderVisibleElements),s=fSe();return x.jsx("div",{className:"react-flow__nodes",style:xq,children:o.map(c=>x.jsx(gSe,{id:c,nodeTypes:e.nodeTypes,nodeExtent:e.nodeExtent,onClick:e.onNodeClick,onMouseEnter:e.onNodeMouseEnter,onMouseMove:e.onNodeMouseMove,onMouseLeave:e.onNodeMouseLeave,onContextMenu:e.onNodeContextMenu,onDoubleClick:e.onNodeDoubleClick,noDragClassName:e.noDragClassName,noPanClassName:e.noPanClassName,rfId:e.rfId,disableKeyboardA11y:e.disableKeyboardA11y,resizeObserver:s,nodesDraggable:t,nodesConnectable:n,nodesFocusable:r,elementsSelectable:i,nodeClickDistance:e.nodeClickDistance,onError:a},c))})}She.displayName="NodeRenderer";const vSe=M.memo(She);function kSe(e){return qt(M.useCallback(n=>{if(!e)return n.edges.map(i=>i.id);const r=[];if(n.width&&n.height)for(const i of n.edges){const a=n.nodeLookup.get(i.source),o=n.nodeLookup.get(i.target);a&&o&&iMe({sourceNode:a,targetNode:o,width:n.width,height:n.height,transform:n.transform})&&r.push(i.id)}return r},[e]),Xn)}const xSe=({color:e="none",strokeWidth:t=1})=>{const n={strokeWidth:t,...e&&{stroke:e}};return x.jsx("polyline",{className:"arrow",style:n,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},wSe=({color:e="none",strokeWidth:t=1})=>{const n={strokeWidth:t,...e&&{stroke:e,fill:e}};return x.jsx("polyline",{className:"arrowclosed",style:n,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},CQ={[yy.Arrow]:xSe,[yy.ArrowClosed]:wSe};function bSe(e){const t=Yn();return M.useMemo(()=>{var i,a;return Object.prototype.hasOwnProperty.call(CQ,e)?CQ[e]:((a=(i=t.getState()).onError)==null||a.call(i,"009",ks.error009(e)),null)},[e])}const MSe=({id:e,type:t,color:n,width:r=12.5,height:i=12.5,markerUnits:a="strokeWidth",strokeWidth:o,orient:s="auto-start-reverse"})=>{const c=bSe(t);return c?x.jsx("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${r}`,markerHeight:`${i}`,viewBox:"-10 -10 20 20",markerUnits:a,orient:s,refX:"0",refY:"0",children:x.jsx(c,{color:n,strokeWidth:o})}):null},Che=({defaultColor:e,rfId:t})=>{const n=qt(a=>a.edges),r=qt(a=>a.defaultEdgeOptions),i=M.useMemo(()=>hMe(n,{id:t,defaultColor:e,defaultMarkerStart:r==null?void 0:r.markerStart,defaultMarkerEnd:r==null?void 0:r.markerEnd}),[n,r,t,e]);return i.length?x.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:x.jsx("defs",{children:i.map(a=>x.jsx(MSe,{id:a.id,type:a.type,color:a.color,width:a.width,height:a.height,markerUnits:a.markerUnits,strokeWidth:a.strokeWidth,orient:a.orient},a.id))})}):null};Che.displayName="MarkerDefinitions";var SSe=M.memo(Che);function Lhe({x:e,y:t,label:n,labelStyle:r,labelShowBg:i=!0,labelBgStyle:a,labelBgPadding:o=[2,4],labelBgBorderRadius:s=2,children:c,className:l,...u}){const[d,f]=M.useState({x:1,y:0,width:0,height:0}),h=Ur(["react-flow__edge-textwrapper",l]),y=M.useRef(null);return M.useEffect(()=>{if(y.current){const v=y.current.getBBox();f({x:v.x,y:v.y,width:v.width,height:v.height})}},[n]),n?x.jsxs("g",{transform:`translate(${e-d.width/2} ${t-d.height/2})`,className:h,visibility:d.width?"visible":"hidden",...u,children:[i&&x.jsx("rect",{width:d.width+2*o[0],x:-o[0],y:-o[1],height:d.height+2*o[1],className:"react-flow__edge-textbg",style:a,rx:s,ry:s}),x.jsx("text",{className:"react-flow__edge-text",y:d.height/2,dy:"0.3em",ref:y,style:r,children:n}),c]}):null}Lhe.displayName="EdgeText";const CSe=M.memo(Lhe);function Ky({path:e,labelX:t,labelY:n,label:r,labelStyle:i,labelShowBg:a,labelBgStyle:o,labelBgPadding:s,labelBgBorderRadius:c,interactionWidth:l=20,...u}){return x.jsxs(x.Fragment,{children:[x.jsx("path",{...u,d:e,fill:"none",className:Ur(["react-flow__edge-path",u.className])}),l?x.jsx("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:l,className:"react-flow__edge-interaction"}):null,r&&Po(t)&&Po(n)?x.jsx(CSe,{x:t,y:n,label:r,labelStyle:i,labelShowBg:a,labelBgStyle:o,labelBgPadding:s,labelBgBorderRadius:c}):null]})}function LQ({pos:e,x1:t,y1:n,x2:r,y2:i}){return e===tt.Left||e===tt.Right?[.5*(t+r),n]:[t,.5*(n+i)]}function Ihe({sourceX:e,sourceY:t,sourcePosition:n=tt.Bottom,targetX:r,targetY:i,targetPosition:a=tt.Top}){const[o,s]=LQ({pos:n,x1:e,y1:t,x2:r,y2:i}),[c,l]=LQ({pos:a,x1:r,y1:i,x2:e,y2:t}),[u,d,f,h]=Wde({sourceX:e,sourceY:t,targetX:r,targetY:i,sourceControlX:o,sourceControlY:s,targetControlX:c,targetControlY:l});return[`M${e},${t} C${o},${s} ${c},${l} ${r},${i}`,u,d,f,h]}function Ahe(e){return M.memo(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:a,sourcePosition:o,targetPosition:s,label:c,labelStyle:l,labelShowBg:u,labelBgStyle:d,labelBgPadding:f,labelBgBorderRadius:h,style:y,markerEnd:v,markerStart:k,interactionWidth:g})=>{const[S,w,C]=Ihe({sourceX:n,sourceY:r,sourcePosition:o,targetX:i,targetY:a,targetPosition:s}),_=e.isInternal?void 0:t;return x.jsx(Ky,{id:_,path:S,labelX:w,labelY:C,label:c,labelStyle:l,labelShowBg:u,labelBgStyle:d,labelBgPadding:f,labelBgBorderRadius:h,style:y,markerEnd:v,markerStart:k,interactionWidth:g})})}const LSe=Ahe({isInternal:!1}),_he=Ahe({isInternal:!0});LSe.displayName="SimpleBezierEdge";_he.displayName="SimpleBezierEdgeInternal";function Ehe(e){return M.memo(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:a,label:o,labelStyle:s,labelShowBg:c,labelBgStyle:l,labelBgPadding:u,labelBgBorderRadius:d,style:f,sourcePosition:h=tt.Bottom,targetPosition:y=tt.Top,markerEnd:v,markerStart:k,pathOptions:g,interactionWidth:S})=>{const[w,C,_]=vy({sourceX:n,sourceY:r,sourcePosition:h,targetX:i,targetY:a,targetPosition:y,borderRadius:g==null?void 0:g.borderRadius,offset:g==null?void 0:g.offset,stepPosition:g==null?void 0:g.stepPosition}),A=e.isInternal?void 0:t;return x.jsx(Ky,{id:A,path:w,labelX:C,labelY:_,label:o,labelStyle:s,labelShowBg:c,labelBgStyle:l,labelBgPadding:u,labelBgBorderRadius:d,style:f,markerEnd:v,markerStart:k,interactionWidth:S})})}const Phe=Ehe({isInternal:!1}),Nhe=Ehe({isInternal:!0});Phe.displayName="SmoothStepEdge";Nhe.displayName="SmoothStepEdgeInternal";function Rhe(e){return M.memo(({id:t,...n})=>{var i;const r=e.isInternal?void 0:t;return x.jsx(Phe,{...n,id:r,pathOptions:M.useMemo(()=>{var a;return{borderRadius:0,offset:(a=n.pathOptions)==null?void 0:a.offset}},[(i=n.pathOptions)==null?void 0:i.offset])})})}const ISe=Rhe({isInternal:!1}),jhe=Rhe({isInternal:!0});ISe.displayName="StepEdge";jhe.displayName="StepEdgeInternal";function The(e){return M.memo(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:a,label:o,labelStyle:s,labelShowBg:c,labelBgStyle:l,labelBgPadding:u,labelBgBorderRadius:d,style:f,markerEnd:h,markerStart:y,interactionWidth:v})=>{const[k,g,S]=Kde({sourceX:n,sourceY:r,targetX:i,targetY:a}),w=e.isInternal?void 0:t;return x.jsx(Ky,{id:w,path:k,labelX:g,labelY:S,label:o,labelStyle:s,labelShowBg:c,labelBgStyle:l,labelBgPadding:u,labelBgBorderRadius:d,style:f,markerEnd:h,markerStart:y,interactionWidth:v})})}const ASe=The({isInternal:!1}),Dhe=The({isInternal:!0});ASe.displayName="StraightEdge";Dhe.displayName="StraightEdgeInternal";function qhe(e){return M.memo(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:a,sourcePosition:o=tt.Bottom,targetPosition:s=tt.Top,label:c,labelStyle:l,labelShowBg:u,labelBgStyle:d,labelBgPadding:f,labelBgBorderRadius:h,style:y,markerEnd:v,markerStart:k,pathOptions:g,interactionWidth:S})=>{const[w,C,_]=yq({sourceX:n,sourceY:r,sourcePosition:o,targetX:i,targetY:a,targetPosition:s,curvature:g==null?void 0:g.curvature}),A=e.isInternal?void 0:t;return x.jsx(Ky,{id:A,path:w,labelX:C,labelY:_,label:c,labelStyle:l,labelShowBg:u,labelBgStyle:d,labelBgPadding:f,labelBgBorderRadius:h,style:y,markerEnd:v,markerStart:k,interactionWidth:S})})}const _Se=qhe({isInternal:!1}),zhe=qhe({isInternal:!0});_Se.displayName="BezierEdge";zhe.displayName="BezierEdgeInternal";const IQ={default:zhe,straight:Dhe,step:jhe,smoothstep:Nhe,simplebezier:_he},AQ={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},ESe=(e,t,n)=>n===tt.Left?e-t:n===tt.Right?e+t:e,PSe=(e,t,n)=>n===tt.Top?e-t:n===tt.Bottom?e+t:e,_Q="react-flow__edgeupdater";function EQ({position:e,centerX:t,centerY:n,radius:r=10,onMouseDown:i,onMouseEnter:a,onMouseOut:o,type:s}){return x.jsx("circle",{onMouseDown:i,onMouseEnter:a,onMouseOut:o,className:Ur([_Q,`${_Q}-${s}`]),cx:ESe(t,r,e),cy:PSe(n,r,e),r,stroke:"transparent",fill:"transparent"})}function NSe({isReconnectable:e,reconnectRadius:t,edge:n,sourceX:r,sourceY:i,targetX:a,targetY:o,sourcePosition:s,targetPosition:c,onReconnect:l,onReconnectStart:u,onReconnectEnd:d,setReconnecting:f,setUpdateHover:h}){const y=Yn(),v=(C,_)=>{if(C.button!==0)return;const{autoPanOnConnect:A,domNode:j,connectionMode:O,connectionRadius:T,lib:D,onConnectStart:I,cancelConnection:R,nodeLookup:U,rfId:q,panBy:K,updateConnection:Z}=y.getState(),$=_.type==="target",B=(ie,N)=>{f(!1),d==null||d(ie,n,_.type,N)},V=ie=>l==null?void 0:l(n,ie),F=(ie,N)=>{f(!0),u==null||u(C,n,_.type),I==null||I(ie,N)};wW.onPointerDown(C.nativeEvent,{autoPanOnConnect:A,connectionMode:O,connectionRadius:T,domNode:j,handleId:_.id,nodeId:_.nodeId,nodeLookup:U,isTarget:$,edgeUpdaterType:_.type,lib:D,flowId:q,cancelConnection:R,panBy:K,isValidConnection:(...ie)=>{var N,P;return((P=(N=y.getState()).isValidConnection)==null?void 0:P.call(N,...ie))??!0},onConnect:V,onConnectStart:F,onConnectEnd:(...ie)=>{var N,P;return(P=(N=y.getState()).onConnectEnd)==null?void 0:P.call(N,...ie)},onReconnectEnd:B,updateConnection:Z,getTransform:()=>y.getState().transform,getFromHandle:()=>y.getState().connection.fromHandle,dragThreshold:y.getState().connectionDragThreshold,handleDomNode:C.currentTarget})},k=C=>v(C,{nodeId:n.target,id:n.targetHandle??null,type:"target"}),g=C=>v(C,{nodeId:n.source,id:n.sourceHandle??null,type:"source"}),S=()=>h(!0),w=()=>h(!1);return x.jsxs(x.Fragment,{children:[(e===!0||e==="source")&&x.jsx(EQ,{position:s,centerX:r,centerY:i,radius:t,onMouseDown:k,onMouseEnter:S,onMouseOut:w,type:"source"}),(e===!0||e==="target")&&x.jsx(EQ,{position:c,centerX:a,centerY:o,radius:t,onMouseDown:g,onMouseEnter:S,onMouseOut:w,type:"target"})]})}function RSe({id:e,edgesFocusable:t,edgesReconnectable:n,elementsSelectable:r,onClick:i,onDoubleClick:a,onContextMenu:o,onMouseEnter:s,onMouseMove:c,onMouseLeave:l,reconnectRadius:u,onReconnect:d,onReconnectStart:f,onReconnectEnd:h,rfId:y,edgeTypes:v,noPanClassName:k,onError:g,disableKeyboardA11y:S}){let w=qt(je=>je.edgeLookup.get(e));const C=qt(je=>je.defaultEdgeOptions);w=C?{...C,...w}:w;let _=w.type||"default",A=(v==null?void 0:v[_])||IQ[_];A===void 0&&(g==null||g("011",ks.error011(_)),_="default",A=(v==null?void 0:v.default)||IQ.default);const j=!!(w.focusable||t&&typeof w.focusable>"u"),O=typeof d<"u"&&(w.reconnectable||n&&typeof w.reconnectable>"u"),T=!!(w.selectable||r&&typeof w.selectable>"u"),D=M.useRef(null),[I,R]=M.useState(!1),[U,q]=M.useState(!1),K=Yn(),{zIndex:Z,sourceX:$,sourceY:B,targetX:V,targetY:F,sourcePosition:ie,targetPosition:N}=qt(M.useCallback(je=>{const Re=je.nodeLookup.get(w.source),$e=je.nodeLookup.get(w.target);if(!Re||!$e)return{zIndex:w.zIndex,...AQ};const ee=dMe({id:e,sourceNode:Re,targetNode:$e,sourceHandle:w.sourceHandle||null,targetHandle:w.targetHandle||null,connectionMode:je.connectionMode,onError:g});return{zIndex:rMe({selected:w.selected,zIndex:w.zIndex,sourceNode:Re,targetNode:$e,elevateOnSelect:je.elevateEdgesOnSelect,zIndexMode:je.zIndexMode}),...ee||AQ}},[w.source,w.target,w.sourceHandle,w.targetHandle,w.selected,w.zIndex]),Xn),P=M.useMemo(()=>w.markerStart?`url('#${kW(w.markerStart,y)}')`:void 0,[w.markerStart,y]),G=M.useMemo(()=>w.markerEnd?`url('#${kW(w.markerEnd,y)}')`:void 0,[w.markerEnd,y]);if(w.hidden||$===null||B===null||V===null||F===null)return null;const J=je=>{var qe;const{addSelectedEdges:Re,unselectNodesAndEdges:$e,multiSelectionActive:ee}=K.getState();T&&(K.setState({nodesSelectionActive:!1}),w.selected&&ee?($e({nodes:[],edges:[w]}),(qe=D.current)==null||qe.blur()):Re([e])),i&&i(je,w)},X=a?je=>{a(je,{...w})}:void 0,ae=o?je=>{o(je,{...w})}:void 0,re=s?je=>{s(je,{...w})}:void 0,fe=c?je=>{c(je,{...w})}:void 0,ke=l?je=>{l(je,{...w})}:void 0,Ne=je=>{var Re;if(!S&&Nde.includes(je.key)&&T){const{unselectNodesAndEdges:$e,addSelectedEdges:ee}=K.getState();je.key==="Escape"?((Re=D.current)==null||Re.blur(),$e({edges:[w]})):ee([e])}};return x.jsx("svg",{style:{zIndex:Z},children:x.jsxs("g",{className:Ur(["react-flow__edge",`react-flow__edge-${_}`,w.className,k,{selected:w.selected,animated:w.animated,inactive:!T&&!i,updating:I,selectable:T}]),onClick:J,onDoubleClick:X,onContextMenu:ae,onMouseEnter:re,onMouseMove:fe,onMouseLeave:ke,onKeyDown:j?Ne:void 0,tabIndex:j?0:void 0,role:w.ariaRole??(j?"group":"img"),"aria-roledescription":"edge","data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":w.ariaLabel===null?void 0:w.ariaLabel||`Edge from ${w.source} to ${w.target}`,"aria-describedby":j?`${fhe}-${y}`:void 0,ref:D,...w.domAttributes,children:[!U&&x.jsx(A,{id:e,source:w.source,target:w.target,type:w.type,selected:w.selected,animated:w.animated,selectable:T,deletable:w.deletable??!0,label:w.label,labelStyle:w.labelStyle,labelShowBg:w.labelShowBg,labelBgStyle:w.labelBgStyle,labelBgPadding:w.labelBgPadding,labelBgBorderRadius:w.labelBgBorderRadius,sourceX:$,sourceY:B,targetX:V,targetY:F,sourcePosition:ie,targetPosition:N,data:w.data,style:w.style,sourceHandleId:w.sourceHandle,targetHandleId:w.targetHandle,markerStart:P,markerEnd:G,pathOptions:"pathOptions"in w?w.pathOptions:void 0,interactionWidth:w.interactionWidth}),O&&x.jsx(NSe,{edge:w,isReconnectable:O,reconnectRadius:u,onReconnect:d,onReconnectStart:f,onReconnectEnd:h,sourceX:$,sourceY:B,targetX:V,targetY:F,sourcePosition:ie,targetPosition:N,setUpdateHover:R,setReconnecting:q})]})})}var jSe=M.memo(RSe);const TSe=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function Ohe({defaultMarkerColor:e,onlyRenderVisibleElements:t,rfId:n,edgeTypes:r,noPanClassName:i,onReconnect:a,onEdgeContextMenu:o,onEdgeMouseEnter:s,onEdgeMouseMove:c,onEdgeMouseLeave:l,onEdgeClick:u,reconnectRadius:d,onEdgeDoubleClick:f,onReconnectStart:h,onReconnectEnd:y,disableKeyboardA11y:v}){const{edgesFocusable:k,edgesReconnectable:g,elementsSelectable:S,onError:w}=qt(TSe,Xn),C=kSe(t);return x.jsxs("div",{className:"react-flow__edges",children:[x.jsx(SSe,{defaultColor:e,rfId:n}),C.map(_=>x.jsx(jSe,{id:_,edgesFocusable:k,edgesReconnectable:g,elementsSelectable:S,noPanClassName:i,onReconnect:a,onContextMenu:o,onMouseEnter:s,onMouseMove:c,onMouseLeave:l,onClick:u,reconnectRadius:d,onDoubleClick:f,onReconnectStart:h,onReconnectEnd:y,rfId:n,onError:w,edgeTypes:r,disableKeyboardA11y:v},_))]})}Ohe.displayName="EdgeRenderer";const DSe=M.memo(Ohe),qSe=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function zSe({children:e}){const t=qt(qSe);return x.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:t},children:e})}function OSe(e){const t=kq(),n=M.useRef(!1);M.useEffect(()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),n.current=!0)},[e,t.viewportInitialized])}const FSe=e=>{var t;return(t=e.panZoom)==null?void 0:t.syncViewport};function BSe(e){const t=qt(FSe),n=Yn();return M.useEffect(()=>{e&&(t==null||t(e),n.setState({transform:[e.x,e.y,e.zoom]}))},[e,t]),null}function HSe(e){return e.connection.inProgress?{...e.connection,to:Wy(e.connection.to,e.transform)}:{...e.connection}}function VSe(e){return HSe}function USe(e){const t=VSe();return qt(t,Xn)}const $Se=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function WSe({containerStyle:e,style:t,type:n,component:r}){const{nodesConnectable:i,width:a,height:o,isValid:s,inProgress:c}=qt($Se,Xn);return!(a&&i&&c)?null:x.jsx("svg",{style:e,width:a,height:o,className:"react-flow__connectionline react-flow__container",children:x.jsx("g",{className:Ur(["react-flow__connection",Tde(s)]),children:x.jsx(Fhe,{style:t,type:n,CustomComponent:r,isValid:s})})})}const Fhe=({style:e,type:t=zc.Bezier,CustomComponent:n,isValid:r})=>{const{inProgress:i,from:a,fromNode:o,fromHandle:s,fromPosition:c,to:l,toNode:u,toHandle:d,toPosition:f,pointer:h}=USe();if(!i)return;if(n)return x.jsx(n,{connectionLineType:t,connectionLineStyle:e,fromNode:o,fromHandle:s,fromX:a.x,fromY:a.y,toX:l.x,toY:l.y,fromPosition:c,toPosition:f,connectionStatus:Tde(r),toNode:u,toHandle:d,pointer:h});let y="";const v={sourceX:a.x,sourceY:a.y,sourcePosition:c,targetX:l.x,targetY:l.y,targetPosition:f};switch(t){case zc.Bezier:[y]=yq(v);break;case zc.SimpleBezier:[y]=Ihe(v);break;case zc.Step:[y]=vy({...v,borderRadius:0});break;case zc.SmoothStep:[y]=vy(v);break;default:[y]=Kde(v)}return x.jsx("path",{d:y,fill:"none",className:"react-flow__connection-path",style:e})};Fhe.displayName="ConnectionLine";const GSe={};function PQ(e=GSe){M.useRef(e),Yn(),M.useEffect(()=>{},[e])}function KSe(){Yn(),M.useRef(!1),M.useEffect(()=>{},[])}function Bhe({nodeTypes:e,edgeTypes:t,onInit:n,onNodeClick:r,onEdgeClick:i,onNodeDoubleClick:a,onEdgeDoubleClick:o,onNodeMouseEnter:s,onNodeMouseMove:c,onNodeMouseLeave:l,onNodeContextMenu:u,onSelectionContextMenu:d,onSelectionStart:f,onSelectionEnd:h,connectionLineType:y,connectionLineStyle:v,connectionLineComponent:k,connectionLineContainerStyle:g,selectionKeyCode:S,selectionOnDrag:w,selectionMode:C,multiSelectionKeyCode:_,panActivationKeyCode:A,zoomActivationKeyCode:j,deleteKeyCode:O,onlyRenderVisibleElements:T,elementsSelectable:D,defaultViewport:I,translateExtent:R,minZoom:U,maxZoom:q,preventScrolling:K,defaultMarkerColor:Z,zoomOnScroll:$,zoomOnPinch:B,panOnScroll:V,panOnScrollSpeed:F,panOnScrollMode:ie,zoomOnDoubleClick:N,panOnDrag:P,onPaneClick:G,onPaneMouseEnter:J,onPaneMouseMove:X,onPaneMouseLeave:ae,onPaneScroll:re,onPaneContextMenu:fe,paneClickDistance:ke,nodeClickDistance:Ne,onEdgeContextMenu:je,onEdgeMouseEnter:Re,onEdgeMouseMove:$e,onEdgeMouseLeave:ee,reconnectRadius:qe,onReconnect:Ke,onReconnectStart:_e,onReconnectEnd:Se,noDragClassName:ot,noWheelClassName:Qe,noPanClassName:Pe,disableKeyboardA11y:Ie,nodeExtent:ye,rfId:wt,viewport:Me,onViewportChange:Ce}){return PQ(e),PQ(t),KSe(),OSe(n),BSe(Me),x.jsx(lSe,{onPaneClick:G,onPaneMouseEnter:J,onPaneMouseMove:X,onPaneMouseLeave:ae,onPaneContextMenu:fe,onPaneScroll:re,paneClickDistance:ke,deleteKeyCode:O,selectionKeyCode:S,selectionOnDrag:w,selectionMode:C,onSelectionStart:f,onSelectionEnd:h,multiSelectionKeyCode:_,panActivationKeyCode:A,zoomActivationKeyCode:j,elementsSelectable:D,zoomOnScroll:$,zoomOnPinch:B,zoomOnDoubleClick:N,panOnScroll:V,panOnScrollSpeed:F,panOnScrollMode:ie,panOnDrag:P,defaultViewport:I,translateExtent:R,minZoom:U,maxZoom:q,onSelectionContextMenu:d,preventScrolling:K,noDragClassName:ot,noWheelClassName:Qe,noPanClassName:Pe,disableKeyboardA11y:Ie,onViewportChange:Ce,isControlledViewport:!!Me,children:x.jsxs(zSe,{children:[x.jsx(DSe,{edgeTypes:t,onEdgeClick:i,onEdgeDoubleClick:o,onReconnect:Ke,onReconnectStart:_e,onReconnectEnd:Se,onlyRenderVisibleElements:T,onEdgeContextMenu:je,onEdgeMouseEnter:Re,onEdgeMouseMove:$e,onEdgeMouseLeave:ee,reconnectRadius:qe,defaultMarkerColor:Z,noPanClassName:Pe,disableKeyboardA11y:Ie,rfId:wt}),x.jsx(WSe,{style:v,type:y,component:k,containerStyle:g}),x.jsx("div",{className:"react-flow__edgelabel-renderer"}),x.jsx(vSe,{nodeTypes:e,onNodeClick:r,onNodeDoubleClick:a,onNodeMouseEnter:s,onNodeMouseMove:c,onNodeMouseLeave:l,onNodeContextMenu:u,nodeClickDistance:Ne,onlyRenderVisibleElements:T,noPanClassName:Pe,noDragClassName:ot,disableKeyboardA11y:Ie,nodeExtent:ye,rfId:wt}),x.jsx("div",{className:"react-flow__viewport-portal"})]})})}Bhe.displayName="GraphView";const ZSe=M.memo(Bhe),NQ=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:i,height:a,fitView:o,fitViewOptions:s,minZoom:c=.5,maxZoom:l=2,nodeOrigin:u,nodeExtent:d,zIndexMode:f="basic"}={})=>{const h=new Map,y=new Map,v=new Map,k=new Map,g=r??t??[],S=n??e??[],w=u??[0,0],C=d??py;Yde(v,k,g);const{nodesInitialized:_}=xW(S,h,y,{nodeOrigin:w,nodeExtent:C,zIndexMode:f});let A=[0,0,1];if(o&&i&&a){const j=Uy(h,{filter:I=>!!((I.width||I.initialWidth)&&(I.height||I.initialHeight))}),{x:O,y:T,zoom:D}=zK(j,i,a,c,l,(s==null?void 0:s.padding)??.1);A=[O,T,D]}return{rfId:"1",width:i??0,height:a??0,transform:A,nodes:S,nodesInitialized:_,nodeLookup:h,parentLookup:y,edges:g,edgeLookup:k,connectionLookup:v,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:n!==void 0,hasDefaultEdges:r!==void 0,panZoom:null,minZoom:c,maxZoom:l,translateExtent:py,nodeExtent:C,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:Cf.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:w,nodeDragThreshold:1,connectionDragThreshold:1,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesReconnectable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,elevateEdgesOnSelect:!0,selectNodesOnDrag:!0,multiSelectionActive:!1,fitViewQueued:o??!1,fitViewOptions:s,fitViewResolver:null,connection:{...jde},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:Y7e,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:Rde,zIndexMode:f,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},XSe=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:i,height:a,fitView:o,fitViewOptions:s,minZoom:c,maxZoom:l,nodeOrigin:u,nodeExtent:d,zIndexMode:f})=>y9e((h,y)=>{async function v(){const{nodeLookup:k,panZoom:g,fitViewOptions:S,fitViewResolver:w,width:C,height:_,minZoom:A,maxZoom:j}=y();g&&(await Z7e({nodes:k,width:C,height:_,panZoom:g,minZoom:A,maxZoom:j},S),w==null||w.resolve(!0),h({fitViewResolver:null}))}return{...NQ({nodes:e,edges:t,width:i,height:a,fitView:o,fitViewOptions:s,minZoom:c,maxZoom:l,nodeOrigin:u,nodeExtent:d,defaultNodes:n,defaultEdges:r,zIndexMode:f}),setNodes:k=>{const{nodeLookup:g,parentLookup:S,nodeOrigin:w,elevateNodesOnSelect:C,fitViewQueued:_,zIndexMode:A,nodesSelectionActive:j}=y(),{nodesInitialized:O,hasSelectedNodes:T}=xW(k,g,S,{nodeOrigin:w,nodeExtent:d,elevateNodesOnSelect:C,checkEquality:!0,zIndexMode:A}),D=j&&T;_&&O?(v(),h({nodes:k,nodesInitialized:O,fitViewQueued:!1,fitViewOptions:void 0,nodesSelectionActive:D})):h({nodes:k,nodesInitialized:O,nodesSelectionActive:D})},setEdges:k=>{const{connectionLookup:g,edgeLookup:S}=y();Yde(g,S,k),h({edges:k})},setDefaultNodesAndEdges:(k,g)=>{if(k){const{setNodes:S}=y();S(k),h({hasDefaultNodes:!0})}if(g){const{setEdges:S}=y();S(g),h({hasDefaultEdges:!0})}},updateNodeInternals:k=>{const{triggerNodeChanges:g,nodeLookup:S,parentLookup:w,domNode:C,nodeOrigin:_,nodeExtent:A,debug:j,fitViewQueued:O,zIndexMode:T}=y(),{changes:D,updatedInternals:I}=kMe(k,S,w,C,_,A,T);I&&(yMe(S,w,{nodeOrigin:_,nodeExtent:A,zIndexMode:T}),O?(v(),h({fitViewQueued:!1,fitViewOptions:void 0})):h({}),(D==null?void 0:D.length)>0&&(j&&console.log("React Flow: trigger node changes",D),g==null||g(D)))},updateNodePositions:(k,g=!1)=>{const S=[];let w=[];const{nodeLookup:C,triggerNodeChanges:_,connection:A,updateConnection:j,onNodesChangeMiddlewareMap:O}=y();for(const[T,D]of k){const I=C.get(T),R=!!(I!=null&&I.expandParent&&(I!=null&&I.parentId)&&(D!=null&&D.position)),U={id:T,type:"position",position:R?{x:Math.max(0,D.position.x),y:Math.max(0,D.position.y)}:D.position,dragging:g};if(I&&A.inProgress&&A.fromNode.id===I.id){const q=Rh(I,A.fromHandle,tt.Left,!0);j({...A,from:q})}R&&I.parentId&&S.push({id:T,parentId:I.parentId,rect:{...D.internals.positionAbsolute,width:D.measured.width??0,height:D.measured.height??0}}),w.push(U)}if(S.length>0){const{parentLookup:T,nodeOrigin:D}=y(),I=UK(S,C,T,D);w.push(...I)}for(const T of O.values())w=T(w);_(w)},triggerNodeChanges:k=>{const{onNodesChange:g,setNodes:S,nodes:w,hasDefaultNodes:C,debug:_}=y();if(k!=null&&k.length){if(C){const A=ghe(k,w);S(A)}_&&console.log("React Flow: trigger node changes",k),g==null||g(k)}},triggerEdgeChanges:k=>{const{onEdgesChange:g,setEdges:S,edges:w,hasDefaultEdges:C,debug:_}=y();if(k!=null&&k.length){if(C){const A=mhe(k,w);S(A)}_&&console.log("React Flow: trigger edge changes",k),g==null||g(k)}},addSelectedNodes:k=>{const{multiSelectionActive:g,edgeLookup:S,nodeLookup:w,triggerNodeChanges:C,triggerEdgeChanges:_}=y();if(g){const A=k.map(j=>ch(j,!0));C(A);return}C(O2(w,new Set([...k]),!0)),_(O2(S))},addSelectedEdges:k=>{const{multiSelectionActive:g,edgeLookup:S,nodeLookup:w,triggerNodeChanges:C,triggerEdgeChanges:_}=y();if(g){const A=k.map(j=>ch(j,!0));_(A);return}_(O2(S,new Set([...k]))),C(O2(w,new Set,!0))},unselectNodesAndEdges:({nodes:k,edges:g}={})=>{const{edges:S,nodes:w,nodeLookup:C,triggerNodeChanges:_,triggerEdgeChanges:A}=y(),j=k||w,O=g||S,T=[];for(const I of j){if(!I.selected)continue;const R=C.get(I.id);R&&(R.selected=!1),T.push(ch(I.id,!1))}const D=[];for(const I of O)I.selected&&D.push(ch(I.id,!1));_(T),A(D)},setMinZoom:k=>{const{panZoom:g,maxZoom:S}=y();g==null||g.setScaleExtent([k,S]),h({minZoom:k})},setMaxZoom:k=>{const{panZoom:g,minZoom:S}=y();g==null||g.setScaleExtent([S,k]),h({maxZoom:k})},setTranslateExtent:k=>{var g;(g=y().panZoom)==null||g.setTranslateExtent(k),h({translateExtent:k})},resetSelectedElements:()=>{const{edges:k,nodes:g,triggerNodeChanges:S,triggerEdgeChanges:w,elementsSelectable:C}=y();if(!C)return;const _=g.reduce((j,O)=>O.selected?[...j,ch(O.id,!1)]:j,[]),A=k.reduce((j,O)=>O.selected?[...j,ch(O.id,!1)]:j,[]);S(_),w(A)},setNodeExtent:k=>{const{nodes:g,nodeLookup:S,parentLookup:w,nodeOrigin:C,elevateNodesOnSelect:_,nodeExtent:A,zIndexMode:j}=y();k[0][0]===A[0][0]&&k[0][1]===A[0][1]&&k[1][0]===A[1][0]&&k[1][1]===A[1][1]||(xW(g,S,w,{nodeOrigin:C,nodeExtent:k,elevateNodesOnSelect:_,checkEquality:!1,zIndexMode:j}),h({nodeExtent:k}))},panBy:k=>{const{transform:g,width:S,height:w,panZoom:C,translateExtent:_}=y();return xMe({delta:k,panZoom:C,transform:g,translateExtent:_,width:S,height:w})},setCenter:async(k,g,S)=>{const{width:w,height:C,maxZoom:_,panZoom:A}=y();if(!A)return Promise.resolve(!1);const j=typeof(S==null?void 0:S.zoom)<"u"?S.zoom:_;return await A.setViewport({x:w/2-k*j,y:C/2-g*j,zoom:j},{duration:S==null?void 0:S.duration,ease:S==null?void 0:S.ease,interpolate:S==null?void 0:S.interpolate}),Promise.resolve(!0)},cancelConnection:()=>{h({connection:{...jde}})},updateConnection:k=>{h({connection:k})},reset:()=>h({...NQ()})}},Object.is);function YSe({initialNodes:e,initialEdges:t,defaultNodes:n,defaultEdges:r,initialWidth:i,initialHeight:a,initialMinZoom:o,initialMaxZoom:s,initialFitViewOptions:c,fitView:l,nodeOrigin:u,nodeExtent:d,zIndexMode:f,children:h}){const[y]=M.useState(()=>XSe({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:i,height:a,fitView:l,minZoom:o,maxZoom:s,fitViewOptions:c,nodeOrigin:u,nodeExtent:d,zIndexMode:f}));return x.jsx(g9e,{value:y,children:x.jsx(z9e,{children:h})})}function JSe({children:e,nodes:t,edges:n,defaultNodes:r,defaultEdges:i,width:a,height:o,fitView:s,fitViewOptions:c,minZoom:l,maxZoom:u,nodeOrigin:d,nodeExtent:f,zIndexMode:h}){return M.useContext(vq)?x.jsx(x.Fragment,{children:e}):x.jsx(YSe,{initialNodes:t,initialEdges:n,defaultNodes:r,defaultEdges:i,initialWidth:a,initialHeight:o,fitView:s,initialFitViewOptions:c,initialMinZoom:l,initialMaxZoom:u,nodeOrigin:d,nodeExtent:f,zIndexMode:h,children:e})}const QSe={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function eCe({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,className:i,nodeTypes:a,edgeTypes:o,onNodeClick:s,onEdgeClick:c,onInit:l,onMove:u,onMoveStart:d,onMoveEnd:f,onConnect:h,onConnectStart:y,onConnectEnd:v,onClickConnectStart:k,onClickConnectEnd:g,onNodeMouseEnter:S,onNodeMouseMove:w,onNodeMouseLeave:C,onNodeContextMenu:_,onNodeDoubleClick:A,onNodeDragStart:j,onNodeDrag:O,onNodeDragStop:T,onNodesDelete:D,onEdgesDelete:I,onDelete:R,onSelectionChange:U,onSelectionDragStart:q,onSelectionDrag:K,onSelectionDragStop:Z,onSelectionContextMenu:$,onSelectionStart:B,onSelectionEnd:V,onBeforeDelete:F,connectionMode:ie,connectionLineType:N=zc.Bezier,connectionLineStyle:P,connectionLineComponent:G,connectionLineContainerStyle:J,deleteKeyCode:X="Backspace",selectionKeyCode:ae="Shift",selectionOnDrag:re=!1,selectionMode:fe=Lf.Full,panActivationKeyCode:ke="Space",multiSelectionKeyCode:Ne=my()?"Meta":"Control",zoomActivationKeyCode:je=my()?"Meta":"Control",snapToGrid:Re,snapGrid:$e,onlyRenderVisibleElements:ee=!1,selectNodesOnDrag:qe,nodesDraggable:Ke,autoPanOnNodeFocus:_e,nodesConnectable:Se,nodesFocusable:ot,nodeOrigin:Qe=phe,edgesFocusable:Pe,edgesReconnectable:Ie,elementsSelectable:ye=!0,defaultViewport:wt=_9e,minZoom:Me=.5,maxZoom:Ce=2,translateExtent:De=py,preventScrolling:Ve=!0,nodeExtent:nt,defaultMarkerColor:rt="#b1b1b7",zoomOnScroll:Pt=!0,zoomOnPinch:it=!0,panOnScroll:at=!1,panOnScrollSpeed:ft=.5,panOnScrollMode:Ot=xh.Free,zoomOnDoubleClick:ht=!0,panOnDrag:Ht=!0,onPaneClick:Lt,onPaneMouseEnter:Nt,onPaneMouseMove:un,onPaneMouseLeave:jt,onPaneScroll:Ct,onPaneContextMenu:Vt,paneClickDistance:Rr=1,nodeClickDistance:wn=0,children:jr,onReconnect:Hn,onReconnectStart:gt,onReconnectEnd:rr,onEdgeContextMenu:Di,onEdgeDoubleClick:Qr,onEdgeMouseEnter:ir,onEdgeMouseMove:rn,onEdgeMouseLeave:bn,reconnectRadius:Mn=10,onNodesChange:ei,onEdgesChange:Rn,noDragClassName:pr="nodrag",noWheelClassName:Jn="nowheel",noPanClassName:br="nopan",fitView:Mr,fitViewOptions:ar,connectOnClick:Tr,attributionPosition:Sr,proOptions:jn,defaultEdgeOptions:ci,elevateNodesOnSelect:qi=!0,elevateEdgesOnSelect:$a=!1,disableKeyboardA11y:zi=!1,autoPanOnConnect:Wa,autoPanOnNodeDrag:ma,autoPanSpeed:Ga,connectionRadius:ti,isValidConnection:Ka,onError:$o,style:fo,id:gi,nodeDragThreshold:po,connectionDragThreshold:Dr,viewport:li,onViewportChange:va,width:ni,height:on,colorMode:mi="light",debug:Tn,onScroll:or,ariaLabelConfig:sr,zIndexMode:Dn="basic",...qr},zr){const Sn=gi||"1",Za=R9e(mi),yo=M.useCallback(zt=>{zt.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),or==null||or(zt)},[or]);return x.jsx("div",{"data-testid":"rf__wrapper",...qr,onScroll:yo,style:{...fo,...QSe},ref:zr,className:Ur(["react-flow",i,Za]),id:gi,role:"application",children:x.jsxs(JSe,{nodes:e,edges:t,width:ni,height:on,fitView:Mr,fitViewOptions:ar,minZoom:Me,maxZoom:Ce,nodeOrigin:Qe,nodeExtent:nt,zIndexMode:Dn,children:[x.jsx(N9e,{nodes:e,edges:t,defaultNodes:n,defaultEdges:r,onConnect:h,onConnectStart:y,onConnectEnd:v,onClickConnectStart:k,onClickConnectEnd:g,nodesDraggable:Ke,autoPanOnNodeFocus:_e,nodesConnectable:Se,nodesFocusable:ot,edgesFocusable:Pe,edgesReconnectable:Ie,elementsSelectable:ye,elevateNodesOnSelect:qi,elevateEdgesOnSelect:$a,minZoom:Me,maxZoom:Ce,nodeExtent:nt,onNodesChange:ei,onEdgesChange:Rn,snapToGrid:Re,snapGrid:$e,connectionMode:ie,translateExtent:De,connectOnClick:Tr,defaultEdgeOptions:ci,fitView:Mr,fitViewOptions:ar,onNodesDelete:D,onEdgesDelete:I,onDelete:R,onNodeDragStart:j,onNodeDrag:O,onNodeDragStop:T,onSelectionDrag:K,onSelectionDragStart:q,onSelectionDragStop:Z,onMove:u,onMoveStart:d,onMoveEnd:f,noPanClassName:br,nodeOrigin:Qe,rfId:Sn,autoPanOnConnect:Wa,autoPanOnNodeDrag:ma,autoPanSpeed:Ga,onError:$o,connectionRadius:ti,isValidConnection:Ka,selectNodesOnDrag:qe,nodeDragThreshold:po,connectionDragThreshold:Dr,onBeforeDelete:F,debug:Tn,ariaLabelConfig:sr,zIndexMode:Dn}),x.jsx(ZSe,{onInit:l,onNodeClick:s,onEdgeClick:c,onNodeMouseEnter:S,onNodeMouseMove:w,onNodeMouseLeave:C,onNodeContextMenu:_,onNodeDoubleClick:A,nodeTypes:a,edgeTypes:o,connectionLineType:N,connectionLineStyle:P,connectionLineComponent:G,connectionLineContainerStyle:J,selectionKeyCode:ae,selectionOnDrag:re,selectionMode:fe,deleteKeyCode:X,multiSelectionKeyCode:Ne,panActivationKeyCode:ke,zoomActivationKeyCode:je,onlyRenderVisibleElements:ee,defaultViewport:wt,translateExtent:De,minZoom:Me,maxZoom:Ce,preventScrolling:Ve,zoomOnScroll:Pt,zoomOnPinch:it,zoomOnDoubleClick:ht,panOnScroll:at,panOnScrollSpeed:ft,panOnScrollMode:Ot,panOnDrag:Ht,onPaneClick:Lt,onPaneMouseEnter:Nt,onPaneMouseMove:un,onPaneMouseLeave:jt,onPaneScroll:Ct,onPaneContextMenu:Vt,paneClickDistance:Rr,nodeClickDistance:wn,onSelectionContextMenu:$,onSelectionStart:B,onSelectionEnd:V,onReconnect:Hn,onReconnectStart:gt,onReconnectEnd:rr,onEdgeContextMenu:Di,onEdgeDoubleClick:Qr,onEdgeMouseEnter:ir,onEdgeMouseMove:rn,onEdgeMouseLeave:bn,reconnectRadius:Mn,defaultMarkerColor:rt,noDragClassName:pr,noWheelClassName:Jn,noPanClassName:br,rfId:Sn,disableKeyboardA11y:zi,nodeExtent:nt,viewport:li,onViewportChange:va}),x.jsx(A9e,{onSelectionChange:U}),jr,x.jsx(M9e,{proOptions:jn,position:Sr}),x.jsx(b9e,{rfId:Sn,disableKeyboardA11y:zi})]})})}var tCe=vhe(eCe);const nCe=e=>{var t;return(t=e.domNode)==null?void 0:t.querySelector(".react-flow__edgelabel-renderer")};function rCe({children:e}){const t=qt(nCe);return t?qf.createPortal(e,t):null}const iCe=e=>{var t;return(t=e.domNode)==null?void 0:t.querySelector(".react-flow__viewport-portal")};function aCe({children:e}){const t=qt(iCe);return t?qf.createPortal(e,t):null}function RQ(e){return qt(M.useCallback(n=>n.nodeLookup.get(e),[e]),Xn)}function oCe({dimensions:e,lineWidth:t,variant:n,className:r}){return x.jsx("path",{strokeWidth:t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:Ur(["react-flow__background-pattern",n,r])})}function sCe({radius:e,className:t}){return x.jsx("circle",{cx:e,cy:e,r:e,className:Ur(["react-flow__background-pattern","dots",t])})}var Qc;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(Qc||(Qc={}));const cCe={[Qc.Dots]:1,[Qc.Lines]:1,[Qc.Cross]:6},lCe=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function Hhe({id:e,variant:t=Qc.Dots,gap:n=20,size:r,lineWidth:i=1,offset:a=0,color:o,bgColor:s,style:c,className:l,patternClassName:u}){const d=M.useRef(null),{transform:f,patternId:h}=qt(lCe,Xn),y=r||cCe[t],v=t===Qc.Dots,k=t===Qc.Cross,g=Array.isArray(n)?n:[n,n],S=[g[0]*f[2]||1,g[1]*f[2]||1],w=y*f[2],C=Array.isArray(a)?a:[a,a],_=k?[w,w]:S,A=[C[0]*f[2]||1+_[0]/2,C[1]*f[2]||1+_[1]/2],j=`${h}${e||""}`;return x.jsxs("svg",{className:Ur(["react-flow__background",l]),style:{...c,...xq,"--xy-background-color-props":s,"--xy-background-pattern-color-props":o},ref:d,"data-testid":"rf__background",children:[x.jsx("pattern",{id:j,x:f[0]%S[0],y:f[1]%S[1],width:S[0],height:S[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${A[0]},-${A[1]})`,children:v?x.jsx(sCe,{radius:w/2,className:u}):x.jsx(oCe,{dimensions:_,lineWidth:i,variant:t,className:u})}),x.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${j})`})]})}Hhe.displayName="Background";const uCe=M.memo(Hhe);function dCe(){return x.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:x.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function hCe(){return x.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:x.jsx("path",{d:"M0 0h32v4.2H0z"})})}function fCe(){return x.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:x.jsx("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"})})}function pCe(){return x.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:x.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"})})}function yCe(){return x.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:x.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"})})}function F2({children:e,className:t,...n}){return x.jsx("button",{type:"button",className:Ur(["react-flow__controls-button",t]),...n,children:e})}const gCe=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function Vhe({style:e,showZoom:t=!0,showFitView:n=!0,showInteractive:r=!0,fitViewOptions:i,onZoomIn:a,onZoomOut:o,onFitView:s,onInteractiveChange:c,className:l,children:u,position:d="bottom-left",orientation:f="vertical","aria-label":h}){const y=Yn(),{isInteractive:v,minZoomReached:k,maxZoomReached:g,ariaLabelConfig:S}=qt(gCe,Xn),{zoomIn:w,zoomOut:C,fitView:_}=kq(),A=()=>{w(),a==null||a()},j=()=>{C(),o==null||o()},O=()=>{_(i),s==null||s()},T=()=>{y.setState({nodesDraggable:!v,nodesConnectable:!v,elementsSelectable:!v}),c==null||c(!v)},D=f==="horizontal"?"horizontal":"vertical";return x.jsxs(Gy,{className:Ur(["react-flow__controls",D,l]),position:d,style:e,"data-testid":"rf__controls","aria-label":h??S["controls.ariaLabel"],children:[t&&x.jsxs(x.Fragment,{children:[x.jsx(F2,{onClick:A,className:"react-flow__controls-zoomin",title:S["controls.zoomIn.ariaLabel"],"aria-label":S["controls.zoomIn.ariaLabel"],disabled:g,children:x.jsx(dCe,{})}),x.jsx(F2,{onClick:j,className:"react-flow__controls-zoomout",title:S["controls.zoomOut.ariaLabel"],"aria-label":S["controls.zoomOut.ariaLabel"],disabled:k,children:x.jsx(hCe,{})})]}),n&&x.jsx(F2,{className:"react-flow__controls-fitview",onClick:O,title:S["controls.fitView.ariaLabel"],"aria-label":S["controls.fitView.ariaLabel"],children:x.jsx(fCe,{})}),r&&x.jsx(F2,{className:"react-flow__controls-interactive",onClick:T,title:S["controls.interactive.ariaLabel"],"aria-label":S["controls.interactive.ariaLabel"],children:v?x.jsx(yCe,{}):x.jsx(pCe,{})}),u]})}Vhe.displayName="Controls";const mCe=M.memo(Vhe);function vCe({id:e,x:t,y:n,width:r,height:i,style:a,color:o,strokeColor:s,strokeWidth:c,className:l,borderRadius:u,shapeRendering:d,selected:f,onClick:h}){const{background:y,backgroundColor:v}=a||{},k=o||y||v;return x.jsx("rect",{className:Ur(["react-flow__minimap-node",{selected:f},l]),x:t,y:n,rx:u,ry:u,width:r,height:i,style:{fill:k,stroke:s,strokeWidth:c},shapeRendering:d,onClick:h?g=>h(g,e):void 0})}const kCe=M.memo(vCe),xCe=e=>e.nodes.map(t=>t.id),yO=e=>e instanceof Function?e:()=>e;function wCe({nodeStrokeColor:e,nodeColor:t,nodeClassName:n="",nodeBorderRadius:r=5,nodeStrokeWidth:i,nodeComponent:a=kCe,onClick:o}){const s=qt(xCe,Xn),c=yO(t),l=yO(e),u=yO(n),d=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return x.jsx(x.Fragment,{children:s.map(f=>x.jsx(MCe,{id:f,nodeColorFunc:c,nodeStrokeColorFunc:l,nodeClassNameFunc:u,nodeBorderRadius:r,nodeStrokeWidth:i,NodeComponent:a,onClick:o,shapeRendering:d},f))})}function bCe({id:e,nodeColorFunc:t,nodeStrokeColorFunc:n,nodeClassNameFunc:r,nodeBorderRadius:i,nodeStrokeWidth:a,shapeRendering:o,NodeComponent:s,onClick:c}){const{node:l,x:u,y:d,width:f,height:h}=qt(y=>{const v=y.nodeLookup.get(e);if(!v)return{node:void 0,x:0,y:0,width:0,height:0};const k=v.internals.userNode,{x:g,y:S}=v.internals.positionAbsolute,{width:w,height:C}=sc(k);return{node:k,x:g,y:S,width:w,height:C}},Xn);return!l||l.hidden||!Bde(l)?null:x.jsx(s,{x:u,y:d,width:f,height:h,style:l.style,selected:!!l.selected,className:r(l),color:t(l),borderRadius:i,strokeColor:n(l),strokeWidth:a,shapeRendering:o,onClick:c,id:l.id})}const MCe=M.memo(bCe);var SCe=M.memo(wCe);const CCe=200,LCe=150,ICe=e=>!e.hidden,ACe=e=>{const t={x:-e.transform[0]/e.transform[2],y:-e.transform[1]/e.transform[2],width:e.width/e.transform[2],height:e.height/e.transform[2]};return{viewBB:t,boundingRect:e.nodeLookup.size>0?Fde(Uy(e.nodeLookup,{filter:ICe}),t):t,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}},_Ce="react-flow__minimap-desc";function Uhe({style:e,className:t,nodeStrokeColor:n,nodeColor:r,nodeClassName:i="",nodeBorderRadius:a=5,nodeStrokeWidth:o,nodeComponent:s,bgColor:c,maskColor:l,maskStrokeColor:u,maskStrokeWidth:d,position:f="bottom-right",onClick:h,onNodeClick:y,pannable:v=!1,zoomable:k=!1,ariaLabel:g,inversePan:S,zoomStep:w=1,offsetScale:C=5}){const _=Yn(),A=M.useRef(null),{boundingRect:j,viewBB:O,rfId:T,panZoom:D,translateExtent:I,flowWidth:R,flowHeight:U,ariaLabelConfig:q}=qt(ACe,Xn),K=(e==null?void 0:e.width)??CCe,Z=(e==null?void 0:e.height)??LCe,$=j.width/K,B=j.height/Z,V=Math.max($,B),F=V*K,ie=V*Z,N=C*V,P=j.x-(F-j.width)/2-N,G=j.y-(ie-j.height)/2-N,J=F+N*2,X=ie+N*2,ae=`${_Ce}-${T}`,re=M.useRef(0),fe=M.useRef();re.current=V,M.useEffect(()=>{if(A.current&&D)return fe.current=_Me({domNode:A.current,panZoom:D,getTransform:()=>_.getState().transform,getViewScale:()=>re.current}),()=>{var Re;(Re=fe.current)==null||Re.destroy()}},[D]),M.useEffect(()=>{var Re;(Re=fe.current)==null||Re.update({translateExtent:I,width:R,height:U,inversePan:S,pannable:v,zoomStep:w,zoomable:k})},[v,k,S,w,I,R,U]);const ke=h?Re=>{var qe;const[$e,ee]=((qe=fe.current)==null?void 0:qe.pointer(Re))||[0,0];h(Re,{x:$e,y:ee})}:void 0,Ne=y?M.useCallback((Re,$e)=>{const ee=_.getState().nodeLookup.get($e).internals.userNode;y(Re,ee)},[]):void 0,je=g??q["minimap.ariaLabel"];return x.jsx(Gy,{position:f,style:{...e,"--xy-minimap-background-color-props":typeof c=="string"?c:void 0,"--xy-minimap-mask-background-color-props":typeof l=="string"?l:void 0,"--xy-minimap-mask-stroke-color-props":typeof u=="string"?u:void 0,"--xy-minimap-mask-stroke-width-props":typeof d=="number"?d*V:void 0,"--xy-minimap-node-background-color-props":typeof r=="string"?r:void 0,"--xy-minimap-node-stroke-color-props":typeof n=="string"?n:void 0,"--xy-minimap-node-stroke-width-props":typeof o=="number"?o:void 0},className:Ur(["react-flow__minimap",t]),"data-testid":"rf__minimap",children:x.jsxs("svg",{width:K,height:Z,viewBox:`${P} ${G} ${J} ${X}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":ae,ref:A,onClick:ke,children:[je&&x.jsx("title",{id:ae,children:je}),x.jsx(SCe,{onClick:Ne,nodeColor:r,nodeStrokeColor:n,nodeBorderRadius:a,nodeClassName:i,nodeStrokeWidth:o,nodeComponent:s}),x.jsx("path",{className:"react-flow__minimap-mask",d:`M${P-N},${G-N}h${J+N*2}v${X+N*2}h${-J-N*2}z
7807
- M${O.x},${O.y}h${O.width}v${O.height}h${-O.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}Uhe.displayName="MiniMap";M.memo(Uhe);const ECe=e=>t=>e?`${Math.max(1/t.transform[2],1)}`:void 0,PCe={[cl.Line]:"right",[cl.Handle]:"bottom-right"};function NCe({nodeId:e,position:t,variant:n=cl.Handle,className:r,style:i=void 0,children:a,color:o,minWidth:s=10,minHeight:c=10,maxWidth:l=Number.MAX_VALUE,maxHeight:u=Number.MAX_VALUE,keepAspectRatio:d=!1,resizeDirection:f,autoScale:h=!0,shouldResize:y,onResizeStart:v,onResize:k,onResizeEnd:g}){const S=bhe(),w=typeof e=="string"?e:S,C=Yn(),_=M.useRef(null),A=n===cl.Handle,j=qt(M.useCallback(ECe(A&&h),[A,h]),Xn),O=M.useRef(null),T=t??PCe[n];M.useEffect(()=>{if(!(!_.current||!w))return O.current||(O.current=VMe({domNode:_.current,nodeId:w,getStoreItems:()=>{const{nodeLookup:I,transform:R,snapGrid:U,snapToGrid:q,nodeOrigin:K,domNode:Z}=C.getState();return{nodeLookup:I,transform:R,snapGrid:U,snapToGrid:q,nodeOrigin:K,paneDomNode:Z}},onChange:(I,R)=>{const{triggerNodeChanges:U,nodeLookup:q,parentLookup:K,nodeOrigin:Z}=C.getState(),$=[],B={x:I.x,y:I.y},V=q.get(w);if(V&&V.expandParent&&V.parentId){const F=V.origin??Z,ie=I.width??V.measured.width??0,N=I.height??V.measured.height??0,P={id:V.id,parentId:V.parentId,rect:{width:ie,height:N,...Hde({x:I.x??V.position.x,y:I.y??V.position.y},{width:ie,height:N},V.parentId,q,F)}},G=UK([P],q,K,Z);$.push(...G),B.x=I.x?Math.max(F[0]*ie,I.x):void 0,B.y=I.y?Math.max(F[1]*N,I.y):void 0}if(B.x!==void 0&&B.y!==void 0){const F={id:w,type:"position",position:{...B}};$.push(F)}if(I.width!==void 0&&I.height!==void 0){const ie={id:w,type:"dimensions",resizing:!0,setAttributes:f?f==="horizontal"?"width":"height":!0,dimensions:{width:I.width,height:I.height}};$.push(ie)}for(const F of R){const ie={...F,type:"position"};$.push(ie)}U($)},onEnd:({width:I,height:R})=>{const U={id:w,type:"dimensions",resizing:!1,dimensions:{width:I,height:R}};C.getState().triggerNodeChanges([U])}})),O.current.update({controlPosition:T,boundaries:{minWidth:s,minHeight:c,maxWidth:l,maxHeight:u},keepAspectRatio:d,resizeDirection:f,onResizeStart:v,onResize:k,onResizeEnd:g,shouldResize:y}),()=>{var I;(I=O.current)==null||I.destroy()}},[T,s,c,l,u,d,v,k,g,y]);const D=T.split("-");return x.jsx("div",{className:Ur(["react-flow__resize-control","nodrag",...D,n,r]),ref:_,style:{...i,scale:j,...o&&{[A?"backgroundColor":"borderColor"]:o}},children:a})}const jQ=M.memo(NCe),RCe=8,um=10,TQ=(e,t,n)=>{switch(n){case"top":return{cx:e,cy:t-um};case"bottom":return{cx:e,cy:t+um};case"left":return{cx:e-um,cy:t};case"right":return{cx:e+um,cy:t}}},DQ={top:tt.Top,right:tt.Right,bottom:tt.Bottom,left:tt.Left},qQ=e=>{switch(e){case tt.Top:return"top";case tt.Right:return"right";case tt.Bottom:return"bottom";case tt.Left:return"left"}};function jCe({id:e,source:t,target:n,sourceX:r,sourceY:i,targetX:a,targetY:o,sourcePosition:s,targetPosition:c,label:l,style:u,markerEnd:d,markerStart:f,interactionWidth:h,data:y}){const[v,k]=M.useState(!1),g=RQ(t),S=RQ(n),w={x:r,y:i,side:qQ(s)},C={x:a,y:o,side:qQ(c)},_=d6e(g?{box:{x:g.internals.positionAbsolute.x,y:g.internals.positionAbsolute.y,w:g.measured.width??g.width??0,h:g.measured.height??g.height??0},autoPicked:y==null?void 0:y.sourceHandleAutoPicked,pin:y==null?void 0:y.sourcePin,fallback:w}:null,S?{box:{x:S.internals.positionAbsolute.x,y:S.internals.positionAbsolute.y,w:S.measured.width??S.width??0,h:S.measured.height??S.height??0},autoPicked:y==null?void 0:y.targetHandleAutoPicked,pin:y==null?void 0:y.targetPin,fallback:C}:null),A=_.source.x,j=_.source.y,O=DQ[_.source.side],T=_.target.x,D=_.target.y,I=DQ[_.target.side],R=_.source.side,U=_.target.side,q=TQ(A,j,R),K=TQ(T,D,U);M.useEffect(()=>{const re=document.querySelector(`.react-flow__edge[data-id="${CSS.escape(e)}"]`);if(!re)return;const fe=re.querySelector(".react-flow__edgeupdater-source"),ke=re.querySelector(".react-flow__edgeupdater-target");fe&&(fe.setAttribute("cx",String(q.cx)),fe.setAttribute("cy",String(q.cy))),ke&&(ke.setAttribute("cx",String(K.cx)),ke.setAttribute("cy",String(K.cy)))},[e,q.cx,q.cy,K.cx,K.cy]);const[Z,$,B]=(y==null?void 0:y.path)==="step"?vy({sourceX:A,sourceY:j,sourcePosition:O,targetX:T,targetY:D,targetPosition:I,borderRadius:RCe}):yq({sourceX:A,sourceY:j,sourcePosition:O,targetX:T,targetY:D,targetPosition:I}),V=y==null?void 0:y.onLabelChange,F=typeof l=="string"?l:"",ie=!!V,N=y==null?void 0:y.fontSize,P=typeof N=="number"?{fontSize:`${N}px`}:void 0,G=y==null?void 0:y.registerEditHandle;M.useEffect(()=>{if(!(!G||!ie))return G(e,()=>k(!0))},[e,G,ie]);const J=(y==null?void 0:y.reconnectable)===!0,X=(y==null?void 0:y.sourcePin)!==void 0,ae=(y==null?void 0:y.targetPin)!==void 0;return x.jsxs(x.Fragment,{children:[x.jsx(Ky,{id:e,path:Z,style:u,markerEnd:d,markerStart:f,interactionWidth:h}),J?x.jsxs(aCe,{children:[x.jsx("div",{"data-testid":`edge-endpoint-source-${e}`,"data-pinned":X?"true":"false",className:"seeflow-connector-endpoint-dot",style:{transform:`translate(-50%, -50%) translate(${q.cx}px, ${q.cy}px)`}}),x.jsx("div",{"data-testid":`edge-endpoint-target-${e}`,"data-pinned":ae?"true":"false",className:"seeflow-connector-endpoint-dot",style:{transform:`translate(-50%, -50%) translate(${K.cx}px, ${K.cy}px)`}})]}):null,x.jsx(rCe,{children:x.jsx("div",{className:"nodrag nopan nowheel pointer-events-auto absolute",style:{transform:`translate(-50%, -50%) translate(${$}px, ${B}px)`},children:v&&ie?x.jsx(us,{initialValue:F,field:"connector-label",onCommit:re=>V==null?void 0:V(e,re),onExit:()=>k(!1),className:"rounded border border-border/40 bg-background px-1.5 py-0.5 text-[11px] text-foreground shadow-sm",style:P,placeholder:"Label"}):F?x.jsx("button",{type:"button",className:Ze("rounded border border-border/40 bg-background px-1.5 py-0.5 text-[11px] text-foreground shadow-sm",ie?"hover:bg-muted/60":""),style:P,onDoubleClick:ie?re=>{re.stopPropagation(),k(!0)}:void 0,children:F}):ie?x.jsx("button",{type:"button","aria-label":"Add connector label",className:"rounded-full border border-dashed border-muted-foreground/40 bg-background px-1 text-[10px] text-muted-foreground/60 opacity-0 transition-opacity hover:opacity-100 group-hover/canvas:opacity-50",onDoubleClick:re=>{re.stopPropagation(),k(!0)},children:"+"}):null})})]})}function Wf({className:e}){return x.jsx("span",{"data-testid":"node-lock-badge","aria-hidden":"true",className:Ze("absolute -top-2 -right-2 z-10 inline-flex h-4 w-4 items-center justify-center rounded-sm bg-background/90 text-muted-foreground shadow-sm ring-1 ring-border",e),children:x.jsx(gp,{className:"h-2.5 w-2.5",strokeWidth:2.5})})}function gO({message:e,variant:t="muted",className:n}){return x.jsx("div",{"data-testid":"placeholder-card","data-placeholder-variant":t,className:Ze("pointer-events-none flex h-full w-full select-none items-center justify-center px-2 text-center text-xs",t==="destructive"?"text-destructive":"text-muted-foreground",n),children:e})}const $he=8,zQ=12,OQ={height:`${$he}px`,borderColor:"transparent"},FQ={width:`${$he}px`,borderColor:"transparent"},TCe={width:`${zQ}px`,height:`${zQ}px`,background:"transparent",border:"none"},DCe={width:"calc(10px / var(--rf-zoom, 1))",height:"calc(10px / var(--rf-zoom, 1))",background:"hsl(var(--background))",border:"calc(1px / var(--rf-zoom, 1)) solid hsl(var(--primary) / 0.6)",borderRadius:"calc(2px / var(--rf-zoom, 1))",zIndex:1},qCe=[{position:"top",style:OQ},{position:"bottom",style:OQ},{position:"left",style:FQ},{position:"right",style:FQ}],zCe=["top-left","top-right","bottom-left","bottom-right"],BQ={pointerEvents:"none",cursor:"default"};function Gf({visible:e,minWidth:t=80,minHeight:n=40,onResizeStart:r,onResize:i,onResizeEnd:a,cornerVariant:o="invisible"}){const s=o==="visible"?DCe:TCe,c=u=>e?u:{...u,...BQ},l=e?s:{...s,opacity:0,...BQ};return x.jsxs(x.Fragment,{children:[qCe.map(({position:u,style:d})=>x.jsx(jQ,{position:u,variant:cl.Line,minWidth:t,minHeight:n,style:c(d),onResizeStart:r,onResize:i,onResizeEnd:a,children:x.jsx("span",{"data-testid":"resize-control","data-position":u})},u)),zCe.map(u=>x.jsx(jQ,{position:u,variant:cl.Handle,minWidth:t,minHeight:n,style:l,autoScale:!1,onResizeStart:r,onResize:i,onResizeEnd:a,children:x.jsx("span",{"data-testid":"resize-control","data-position":u})},u))]})}function Kf(e){const{onResize:t,onResizeFinal:n,setResizing:r}=e,[i,a]=M.useState(!1),o=M.useRef(null),s=M.useRef(t),c=M.useRef(n),l=M.useRef(r);M.useEffect(()=>{s.current=t},[t]),M.useEffect(()=>{c.current=n},[n]),M.useEffect(()=>{l.current=r},[r]);const u=M.useCallback((h,y)=>{var v;a(!0),(v=l.current)==null||v.call(l,!0),o.current=y?{x:y.x,y:y.y,width:y.width,height:y.height}:null},[]),d=M.useCallback((h,y)=>{var v;(v=s.current)==null||v.call(s,{x:y.x,y:y.y,width:y.width,height:y.height})},[]),f=M.useCallback((h,y)=>{var k,g,S;a(!1),(k=l.current)==null||k.call(l,!1);const v=o.current;o.current=null,!(v&&v.width===y.width&&v.height===y.height)&&((g=s.current)==null||g.call(s,{x:y.x,y:y.y,width:y.width,height:y.height}),v&&((S=c.current)==null||S.call(c,{x:y.x,y:y.y,width:y.width,height:y.height},v)))},[]);return{isResizing:i,onResizeStart:u,onResizeEvent:d,onResizeEnd:f}}const Whe={default:{border:"hsl(var(--border))",background:"hsl(var(--card))",edge:"hsl(var(--muted-foreground))"},slate:{border:"hsl(215, 20%, 65%)",background:"hsl(210, 40%, 96%)",edge:"hsl(215, 16%, 47%)"},blue:{border:"hsl(213, 94%, 68%)",background:"hsl(214, 100%, 97%)",edge:"hsl(217, 91%, 60%)"},green:{border:"hsl(142, 69%, 58%)",background:"hsl(138, 76%, 97%)",edge:"hsl(142, 71%, 45%)"},amber:{border:"hsl(43, 96%, 56%)",background:"hsl(48, 100%, 96%)",edge:"hsl(38, 92%, 50%)"},red:{border:"hsl(0, 91%, 71%)",background:"hsl(0, 86%, 97%)",edge:"hsl(0, 84%, 60%)"},purple:{border:"hsl(270, 95%, 75%)",background:"hsl(270, 100%, 98%)",edge:"hsl(271, 91%, 65%)"},pink:{border:"hsl(330, 81%, 75%)",background:"hsl(327, 73%, 97%)",edge:"hsl(330, 81%, 60%)"}},zp=Whe,Zy="#ffffff";function dr(e,t){const n=e??"default",r=Whe[n];return t==="edge"?{stroke:r.edge}:t==="text"?n==="default"?{}:{color:r.edge}:{borderColor:r.border,backgroundColor:r.background}}const OCe=new Set(["SCRIPT","STYLE","IFRAME","OBJECT","EMBED","LINK"]),FCe=new Set(["href","src"]),BCe=e=>/^on/i.test(e),HCe=e=>{let t=0;for(;t<e.length&&e.charCodeAt(t)<=32;)t+=1;return e.slice(t,t+11).toLowerCase()==="javascript:"};function VCe(e){if(typeof DOMParser>"u")return"";const t=new DOMParser().parseFromString(`<!doctype html><html><body>${e}</body></html>`,"text/html"),n=t.body,r=t.createTreeWalker(n,1),i=[];let a=r.nextNode();for(;a;){const o=a;if(OCe.has(o.tagName))i.push(o);else for(const s of Array.from(o.attributes)){if(BCe(s.name)){o.removeAttribute(s.name);continue}FCe.has(s.name.toLowerCase())&&HCe(s.value)&&o.removeAttribute(s.name)}a=r.nextNode()}for(const o of i)o.remove();return n.innerHTML}function UCe(e){return{dangerouslySetInnerHTML:{__html:VCe(e)}}}const $Ce="/runtime/tailwind.js",HQ="data-seeflow-tailwind-runtime";function WCe(){if(typeof document>"u"||document.querySelector(`script[${HQ}]`))return;const e=document.createElement("script");e.src=$Ce,e.async=!0,e.setAttribute(HQ,"true"),document.head.appendChild(e)}function Ghe(e,t){return`/api/projects/${encodeURIComponent(e)}/files/${encodeURI(t)}`}const GCe=e=>typeof EventSource>"u"?null:new EventSource(e),dm=new Map;function KCe(e,t){let n=dm.get(e);if(!n){const i=GCe(`/api/events?demoId=${encodeURIComponent(e)}`);if(!i)return()=>{};const a={source:i,listeners:new Set,refCount:0};i.addEventListener("file:changed",o=>{let s;try{s=JSON.parse(o.data).path}catch{return}if(typeof s=="string")for(const c of a.listeners)c(s)}),dm.set(e,a),n=a}return n.listeners.add(t),n.refCount+=1,()=>{const r=dm.get(e);r&&(r.listeners.delete(t),r.refCount-=1,r.refCount===0&&(r.source.close(),dm.delete(e)))}}const h2=new Map,VQ=(e,t)=>`${e}::${t}`;function ZCe(e,t){const[n,r]=M.useState(()=>!e||!t?{kind:"loading"}:h2.get(VQ(e,t))??{kind:"loading"});return M.useEffect(()=>{if(!e||!t){r({kind:"loading"});return}const i=VQ(e,t);let a=!1;const o=h2.get(i);r(o||{kind:"loading"});const s=async()=>{try{const l=await fetch(Ghe(e,t));if(a)return;if(l.status===404){const f={kind:"missing"};h2.set(i,f),r(f);return}if(!l.ok){const f={kind:"error",message:`GET ${t} → ${l.status}`};h2.set(i,f),r(f);return}const u=await l.text();if(a)return;const d={kind:"loaded",html:u};h2.set(i,d),r(d)}catch(l){if(a)return;const u={kind:"error",message:l instanceof Error?l.message:String(l)};h2.set(i,u),r(u)}};s();const c=KCe(e,l=>{l===t&&s()});return()=>{a=!0,c()}},[e,t]),n}const UQ={width:320,height:200},XCe=80,YCe=40,hm="opacity-0 transition-opacity";function JCe({id:e,data:t,selected:n,isConnectable:r}){const{isResizing:i,onResizeStart:a,onResizeEvent:o,onResizeEnd:s}=Kf({onResize:f=>{var h;return(h=t.onResize)==null?void 0:h.call(t,e,f)},setResizing:t.setResizing}),c=i||t.width!==void 0||t.height!==void 0,l={...t.backgroundColor!==void 0?{backgroundColor:dr(t.backgroundColor,"node").backgroundColor}:{},...t.borderColor!==void 0?{borderColor:dr(t.borderColor,"node").borderColor}:{},...t.borderSize!==void 0?{borderWidth:t.borderSize}:{},...t.borderStyle!==void 0?{borderStyle:t.borderStyle}:{},...t.cornerRadius!==void 0?{borderRadius:t.cornerRadius}:{},...t.fontSize!==void 0?{fontSize:`${t.fontSize}px`}:{},...dr(t.textColor,"text"),...c?{}:{width:UQ.width,height:UQ.height}};M.useEffect(()=>{WCe()},[]);const u=ZCe(t.projectId,t.htmlPath);let d;return u.kind==="loaded"?d=x.jsx("div",{"data-testid":"html-node-content",className:"h-full w-full overflow-auto",...UCe(u.html)}):u.kind==="missing"?d=x.jsx(gO,{message:`Missing: ${t.htmlPath}`,variant:"destructive"}):u.kind==="error"?d=x.jsx(gO,{message:`Error: ${u.message}`,variant:"destructive"}):d=x.jsx(gO,{message:"Loading…"}),x.jsxs("div",{className:Ze("group relative overflow-hidden",c?"h-full w-full":""),style:l,"data-testid":"html-node",children:[x.jsx(Gf,{visible:!!n&&!!t.onResize&&!t.locked,cornerVariant:"visible",minWidth:XCe,minHeight:YCe,onResizeStart:a,onResize:o,onResizeEnd:s}),t.locked?x.jsx(Wf,{}):null,x.jsx(Ln,{type:"target",position:tt.Top,id:"t",isConnectable:r,className:Ze(hm,n&&"!opacity-100")}),x.jsx(Ln,{type:"target",position:tt.Left,id:"l",isConnectable:r,className:Ze(hm,n&&"!opacity-100")}),d,x.jsx(Ln,{type:"source",position:tt.Right,id:"r",isConnectable:r,className:Ze(hm,n&&"!opacity-100")}),x.jsx(Ln,{type:"source",position:tt.Bottom,id:"b",isConnectable:r,className:Ze(hm,n&&"!opacity-100")}),t.name!==void 0&&t.name!==""?x.jsx("div",{"data-testid":"html-node-label",className:"-bottom-5 absolute right-0 left-0 truncate text-center text-[11px] text-muted-foreground",children:t.name}):null]})}function QCe(e,t){return e.selected===t.selected&&e.data===t.data&&e.width===t.width&&e.height===t.height}const eLe=M.memo(JCe,QCe),Pf={width:48,height:48},$Q="help-circle",tLe=24,nLe=24,fm="opacity-0 transition-opacity";function rLe(e){return dr(e,"text").color??"currentColor"}const WQ=new Set;function iLe({id:e,data:t,selected:n,isConnectable:r}){const{isResizing:i,onResizeStart:a,onResizeEvent:o,onResizeEnd:s}=Kf({onResize:S=>{var w;return(w=t.onResize)==null?void 0:w.call(t,e,S)},setResizing:t.setResizing}),c=i||t.width!==void 0||t.height!==void 0,l=!!t.onNameChange,[u,d]=M.useState(!1),f=KT[t.icon];!f&&!WQ.has(t.icon)&&(WQ.add(t.icon),console.warn(`[iconNode] Unknown icon "${t.icon}"; falling back to "${$Q}".`));const h=f??KT[$Q],y=rLe(t.color),v=t.strokeWidth??2,k={...c?{}:{width:Pf.width,height:Pf.height}},g=S=>{!l||u||(S.stopPropagation(),d(!0))};return x.jsxs("div",{className:Ze("group relative",c?"h-full w-full":""),style:k,"data-testid":"icon-node",onDoubleClick:g,children:[x.jsx(Gf,{visible:!!n&&!!t.onResize&&!u&&!t.locked,cornerVariant:"visible",minWidth:tLe,minHeight:nLe,onResizeStart:a,onResize:o,onResizeEnd:s}),t.locked?x.jsx(Wf,{}):null,x.jsx(Ln,{type:"target",position:tt.Top,id:"t",isConnectable:r,className:Ze(fm,n&&"!opacity-100")}),x.jsx(Ln,{type:"target",position:tt.Left,id:"l",isConnectable:r,className:Ze(fm,n&&"!opacity-100")}),h?x.jsx(h,{color:y,strokeWidth:v,absoluteStrokeWidth:!0,"aria-label":t.alt,className:"block h-full w-full pointer-events-none select-none"}):null,u&&l?x.jsx("div",{className:"absolute left-0 right-0 top-full mt-1 text-center text-xs text-muted-foreground",children:x.jsx(us,{initialValue:t.name??"",field:"icon-node-label",onCommit:S=>{var w;return(w=t.onNameChange)==null?void 0:w.call(t,e,S)},onExit:()=>d(!1),placeholder:"Label"})}):t.name?x.jsx("span",{"data-testid":"icon-node-label",className:"pointer-events-none absolute left-0 right-0 top-full mt-1 truncate text-center text-xs text-muted-foreground select-none",children:t.name}):null,x.jsx(Ln,{type:"source",position:tt.Right,id:"r",isConnectable:r,className:Ze(fm,n&&"!opacity-100")}),x.jsx(Ln,{type:"source",position:tt.Bottom,id:"b",isConnectable:r,className:Ze(fm,n&&"!opacity-100")})]})}function aLe(e,t){return e.selected===t.selected&&e.data===t.data&&e.width===t.width&&e.height===t.height}const oLe=M.memo(iLe,aLe),GQ={width:200,height:150},sLe=40,cLe=40,pm="opacity-0 transition-opacity";function lLe({id:e,data:t,selected:n,isConnectable:r}){const{isResizing:i,onResizeStart:a,onResizeEvent:o,onResizeEnd:s}=Kf({onResize:u=>{var d;return(d=t.onResize)==null?void 0:d.call(t,e,u)},setResizing:t.setResizing}),c=i||t.width!==void 0||t.height!==void 0,l={backgroundColor:t.backgroundColor!==void 0?dr(t.backgroundColor,"node").backgroundColor:Zy,...t.borderColor!==void 0?{borderColor:dr(t.borderColor,"node").borderColor}:{},...t.borderWidth!==void 0?{borderWidth:t.borderWidth}:{},...t.borderStyle!==void 0?{borderStyle:t.borderStyle}:{},...t.cornerRadius!==void 0?{borderRadius:t.cornerRadius}:{},...c?{}:{width:GQ.width,height:GQ.height}};return x.jsxs("div",{className:Ze("group relative overflow-hidden",c?"h-full w-full":""),style:l,"data-testid":"image-node",children:[x.jsx(Gf,{visible:!!n&&!!t.onResize&&!t.locked,cornerVariant:"visible",minWidth:sLe,minHeight:cLe,onResizeStart:a,onResize:o,onResizeEnd:s}),t.locked?x.jsx(Wf,{}):null,x.jsx(Ln,{type:"target",position:tt.Top,id:"t",isConnectable:r,className:Ze(pm,n&&"!opacity-100")}),x.jsx(Ln,{type:"target",position:tt.Left,id:"l",isConnectable:r,className:Ze(pm,n&&"!opacity-100")}),t._uploading?x.jsx("div",{"data-testid":"image-node-placeholder","data-placeholder":"loading",className:"flex h-full w-full select-none items-center justify-center text-xs text-muted-foreground pointer-events-none",children:"Loading…"}):t._uploadError?x.jsx("button",{type:"button","data-testid":"image-node-placeholder","data-placeholder":"failed",onClick:()=>{var u;return(u=t.onRetryUpload)==null?void 0:u.call(t,e)},title:t._uploadError,className:"flex h-full w-full cursor-pointer select-none items-center justify-center px-2 text-center text-xs text-destructive",children:"Upload failed (click to retry)"}):x.jsx("img",{src:t.projectId?Ghe(t.projectId,t.path):"",alt:t.alt??"",className:"block h-full w-full select-none object-contain pointer-events-none",draggable:!1}),x.jsx(Ln,{type:"source",position:tt.Right,id:"r",isConnectable:r,className:Ze(pm,n&&"!opacity-100")}),x.jsx(Ln,{type:"source",position:tt.Bottom,id:"b",isConnectable:r,className:Ze(pm,n&&"!opacity-100")})]})}function uLe(e,t){return e.selected===t.selected&&e.data===t.data&&e.width===t.width&&e.height===t.height}const dLe=M.memo(lLe,uLe),hLe={ok:"bg-emerald-500 dark:bg-emerald-400",warn:"bg-amber-500 dark:bg-amber-400",error:"bg-rose-500 dark:bg-rose-400",pending:"bg-slate-400 dark:bg-slate-500"};function Khe({state:e,summary:t,"data-testid":n}){return x.jsxs("span",{"data-testid":n,"data-state":e,className:"inline-flex max-w-full items-center gap-1.5 text-[11px] leading-tight text-muted-foreground",children:[x.jsx("span",{"aria-hidden":!0,className:Ze("h-2 w-2 shrink-0 rounded-full",hLe[e])}),t?x.jsx("span",{className:"min-w-0 flex-1 truncate",title:t,children:t}):null]})}const fLe=100,pLe=44,yLe=200;function gLe({id:e,data:t,selected:n,isConnectable:r}){var O;const i=t.status,a=t.playAction,o=t.description??t.kind,s=!!a&&!!t.onPlay,c=i==="running",l=i==="error",u=c?"Running…":l?t.errorMessage?`Failed: ${t.errorMessage}`:"Failed":"Play",{isResizing:d,onResizeStart:f,onResizeEvent:h,onResizeEnd:y}=Kf({onResize:T=>{var D;return(D=t.onResize)==null?void 0:D.call(t,e,T)},setResizing:t.setResizing}),[v,k]=M.useState(null),g=!!t.onNameChange,S=!!t.onDescriptionChange,w=d||t.width!==void 0||t.height!==void 0,C={...t.fontSize!==void 0?{fontSize:`${t.fontSize}px`}:{},...dr(t.textColor,"text")},_=C,A={borderColor:((O=t.statusReport)==null?void 0:O.state)==="error"?dr("red","node").borderColor:dr(t.borderColor,"node").borderColor,backgroundColor:t.backgroundColor!==void 0?dr(t.backgroundColor,"node").backgroundColor:Zy,borderWidth:t.borderSize!==void 0?t.borderSize:void 0,borderStyle:t.borderStyle,borderRadius:t.cornerRadius!==void 0?t.cornerRadius:void 0,...w?{}:{width:yLe}},j=g||S?T=>{if(v!==null)return;const D=T.target;if(!(D!=null&&D.closest(".react-flow__handle"))&&!(D!=null&&D.closest(".react-flow__resize-control"))){if(T.stopPropagation(),D!=null&&D.closest('[data-testid="node-header"]')){g&&k("name");return}if(D!=null&&D.closest('[data-testid="node-content"]')){S?k("description"):g&&k("name");return}S?k("description"):g&&k("name")}}:void 0;return x.jsxs("div",{className:Ze("group flex flex-col justify-center overflow-hidden rounded-lg border-[3px] shadow-sm transition-shadow",w?"h-full w-full":"",c?"seeflow-node-pulse":""),style:A,"data-status":i??"idle","data-testid":"play-node",onDoubleClick:j,children:[x.jsx(Gf,{visible:!!n&&!!t.onResize&&!t.locked,cornerVariant:"visible",minWidth:fLe,minHeight:pLe,onResizeStart:f,onResize:h,onResizeEnd:y}),t.locked?x.jsx(Wf,{}):null,x.jsx(Ln,{type:"target",position:tt.Top,id:"t",isConnectable:r,className:Ze("opacity-0 transition-opacity",n&&"!opacity-100")}),x.jsx(Ln,{type:"target",position:tt.Left,id:"l",isConnectable:r,className:Ze("opacity-0 transition-opacity",n&&"!opacity-100")}),x.jsxs("div",{className:"flex shrink-0 items-center justify-between gap-2 border-b bg-muted/30 px-2 py-2","data-testid":"node-header",children:[x.jsx("div",{className:"min-w-0 flex-1 text-[18px] font-semibold leading-tight",style:C,children:v==="name"&&g?x.jsx(us,{initialValue:t.name,field:"node-name",required:!0,commitMode:"blur-only",onCommit:T=>{var D;return(D=t.onNameChange)==null?void 0:D.call(t,e,T)},onExit:()=>k(null),className:"text-[18px] font-semibold",style:C}):x.jsx("button",{type:"button",className:Ze("block w-full whitespace-pre-wrap break-words bg-transparent p-0 text-left text-[18px] font-semibold leading-tight",g?"hover:opacity-80":""),style:C,children:t.name})}),x.jsx("div",{className:"flex shrink-0 items-center gap-1",children:x.jsx(oi,{type:"button",size:"sm",variant:"secondary",disabled:!s||c,className:Ze("h-8 w-8 rounded-full p-0 hover:bg-emerald-500 hover:text-white focus-visible:bg-emerald-500 focus-visible:text-white dark:hover:bg-emerald-400 dark:focus-visible:bg-emerald-400",l&&"border-2 border-rose-500 dark:border-rose-400"),"data-testid":"play-button","data-status":i??"idle","aria-label":u,title:u,onClick:T=>{var D;T.stopPropagation(),(D=t.onPlay)==null||D.call(t,e)},children:c?x.jsx(to,{className:"h-4 w-4 animate-spin","aria-hidden":!0}):x.jsx(wp,{className:"h-4 w-4","aria-hidden":!0})})})]}),x.jsx("div",{className:"flex min-h-0 flex-1 items-center px-2 py-1","data-testid":"node-content","data-resizing":d?"true":void 0,children:v==="description"&&S?x.jsx(us,{initialValue:t.description??"",field:"node-description",multiline:!0,onCommit:T=>{var D;return(D=t.onDescriptionChange)==null?void 0:D.call(t,e,T)},onExit:()=>k(null),className:"w-full text-[18px] text-muted-foreground",style:_,placeholder:t.kind}):x.jsx("button",{type:"button",className:Ze("block w-full whitespace-normal break-words bg-transparent p-0 text-left text-[18px] text-muted-foreground",S?"hover:opacity-80":""),style:_,children:o})}),t.statusReport&&x.jsx("div",{className:"flex items-center px-2 pb-1","data-testid":"play-node-status-badge",children:x.jsx(Khe,{state:t.statusReport.state,summary:t.statusReport.summary,"data-testid":"status-badge"})}),x.jsx(Ln,{type:"source",position:tt.Right,id:"r",isConnectable:r,className:Ze("opacity-0 transition-opacity",n&&"!opacity-100")}),x.jsx(Ln,{type:"source",position:tt.Bottom,id:"b",isConnectable:r,className:Ze("opacity-0 transition-opacity",n&&"!opacity-100")})]})}function mLe(e,t){return e.selected===t.selected&&e.data===t.data&&e.width===t.width&&e.height===t.height}const vLe=M.memo(gLe,mLe),Xy="var(--seeflow-node-border)",Yy="var(--seeflow-node-bg)",Jy=2;function Qy(e){if(e==="dashed")return"6 4";if(e==="dotted")return"2 4"}const KQ=5;function kLe({width:e,height:t,borderColor:n,backgroundColor:r,borderSize:i,borderStyle:a}){const o=n??Xy,s=r??Yy,c=i??Jy,l=Qy(a),u=e-2*KQ,d=u/7,f=u/7*1.5,h=d,y=KQ,v=y+d,k=v+d+f,S=k+f+h+h,w=t*.85,C=[`M ${y} ${w}`,`A ${d} ${d} 0 0 1 ${v+d} ${w}`,`A ${f} ${f} 0 0 1 ${k+f} ${w}`,`A ${h} ${h} 0 0 1 ${S} ${w}`,`L ${S} ${t}`,`L ${y} ${t}`,"Z"].join(" ");return x.jsxs("svg",{width:"100%",height:"100%",viewBox:`0 0 ${e} ${t}`,preserveAspectRatio:"none",role:"img","aria-label":"Cloud","data-testid":"cloud-shape",children:[x.jsx("title",{children:"Cloud"}),x.jsx("path",{d:C,fill:s,stroke:o,strokeWidth:c,strokeDasharray:l})]})}function xLe({width:e,height:t,borderColor:n,backgroundColor:r,borderSize:i,borderStyle:a}){const o=Math.max(6,Math.min(28,t*.12)),s=e/2,c=e/2,l=n??Xy,u=r??Yy,d=i??Jy,f=Qy(a),h=`M 0 ${t-o} A ${s} ${o} 0 0 0 ${e} ${t-o}`;return x.jsxs("svg",{width:"100%",height:"100%",viewBox:`0 0 ${e} ${t}`,preserveAspectRatio:"none",role:"img","aria-label":"Database","data-testid":"database-shape",children:[x.jsx("title",{children:"Database"}),x.jsx("rect",{x:0,y:o,width:e,height:Math.max(0,t-2*o),fill:u}),x.jsx("line",{x1:0,y1:o,x2:0,y2:t-o,stroke:l,strokeWidth:d,strokeDasharray:f}),x.jsx("line",{x1:e,y1:o,x2:e,y2:t-o,stroke:l,strokeWidth:d,strokeDasharray:f}),x.jsx("path",{d:h,fill:u,stroke:l,strokeWidth:d,strokeDasharray:f}),x.jsx("ellipse",{cx:c,cy:o,rx:s,ry:o,fill:u,stroke:l,strokeWidth:d,strokeDasharray:f})]})}function wLe({width:e,height:t,borderColor:n,backgroundColor:r,borderSize:i,borderStyle:a}){const o=n??Xy,s=r??Yy,c=i??Jy,l=Qy(a),u=t/2,d=e*.25,f=e*.5,h=e*.75;return x.jsxs("svg",{width:"100%",height:"100%",viewBox:`0 0 ${e} ${t}`,preserveAspectRatio:"none",role:"img","aria-label":"Queue","data-testid":"queue-shape",children:[x.jsx("title",{children:"Queue"}),x.jsx("rect",{x:0,y:0,width:e,height:t,rx:u,ry:u,fill:s,stroke:o,strokeWidth:c,strokeDasharray:l}),x.jsx("line",{x1:d,y1:0,x2:d,y2:t,stroke:o,strokeWidth:c,strokeDasharray:l}),x.jsx("line",{x1:f,y1:0,x2:f,y2:t,stroke:o,strokeWidth:c,strokeDasharray:l}),x.jsx("line",{x1:h,y1:0,x2:h,y2:t,stroke:o,strokeWidth:c,strokeDasharray:l})]})}const bLe=3;function MLe({width:e,height:t,borderColor:n,backgroundColor:r,borderSize:i,borderStyle:a}){const o=n??Xy,s=r??Yy,c=i??Jy,l=Qy(a),u=t/bLe,d=Math.max(3,Math.min(6,u*.18)),f=e-Math.max(10,d*3),h=Math.min(8,Math.min(e,t)*.06);return x.jsxs("svg",{width:"100%",height:"100%",viewBox:`0 0 ${e} ${t}`,preserveAspectRatio:"none",role:"img","aria-label":"Server","data-testid":"server-shape",children:[x.jsx("title",{children:"Server"}),x.jsx("rect",{x:0,y:0,width:e,height:t,rx:h,ry:h,fill:s,stroke:o,strokeWidth:c,strokeDasharray:l}),x.jsx("line",{x1:0,y1:u,x2:e,y2:u,stroke:o,strokeWidth:c,strokeDasharray:l}),x.jsx("line",{x1:0,y1:u*2,x2:e,y2:u*2,stroke:o,strokeWidth:c,strokeDasharray:l}),x.jsx("circle",{cx:f,cy:u/2,r:d,fill:o}),x.jsx("circle",{cx:f,cy:u+u/2,r:d,fill:o}),x.jsx("circle",{cx:f,cy:u*2+u/2,r:d,fill:o})]})}function SLe({width:e,height:t,borderColor:n,backgroundColor:r,borderSize:i,borderStyle:a}){const o=n??Xy,s=r??Yy,c=i??Jy,l=Qy(a),u=t*.22,d=Math.max(8,Math.min(28,Math.min(e,t)*.18)),f=u+d+Math.max(4,t*.05),h=Math.max(6,e*.1),y=h,v=e-h,k=Math.min((v-y)/2,(t-f)/2,40),g=[`M ${y} ${t}`,`L ${y} ${f+k}`,`A ${k} ${k} 0 0 1 ${y+k} ${f}`,`L ${v-k} ${f}`,`A ${k} ${k} 0 0 1 ${v} ${f+k}`,`L ${v} ${t}`,"Z"].join(" ");return x.jsxs("svg",{width:"100%",height:"100%",viewBox:`0 0 ${e} ${t}`,preserveAspectRatio:"none",role:"img","aria-label":"User","data-testid":"user-shape",children:[x.jsx("title",{children:"User"}),x.jsx("circle",{cx:e/2,cy:u,r:d,fill:s,stroke:o,strokeWidth:c,strokeDasharray:l}),x.jsx("path",{d:g,fill:s,stroke:o,strokeWidth:c,strokeDasharray:l})]})}const WK={database:xLe,server:MLe,user:SLe,queue:wLe,cloud:kLe},CLe=new Set(Object.keys(WK));function LLe(e){return CLe.has(e)}const sD={rectangle:{width:200,height:120},ellipse:{width:200,height:120},sticky:{width:180,height:180},text:{width:160,height:40},database:{width:120,height:140},server:{width:140,height:120},user:{width:100,height:140},queue:{width:220,height:80},cloud:{width:180,height:120}},ILe={rectangle:"rounded-lg border-[3px] bg-transparent",ellipse:"rounded-full border-[3px] bg-transparent",sticky:"rounded-md border-[3px] shadow-md -rotate-1",text:"bg-transparent",database:"",server:"",user:"",queue:"",cloud:""};function Zhe(e){return ILe[e]}function Xhe(e,t){if(e==="text")return{};if(LLe(e))return{};const n=t==null?void 0:t.backgroundColor;let r;n!==void 0?r=dr(n,"node").backgroundColor:e==="sticky"?r=dr("amber","node").backgroundColor:(e==="rectangle"||e==="ellipse")&&(r=Zy);const i=e==="rectangle"||e==="sticky";return{borderColor:dr(t==null?void 0:t.borderColor,"node").borderColor,backgroundColor:r,borderWidth:(t==null?void 0:t.borderSize)!==void 0?t.borderSize:void 0,borderStyle:t==null?void 0:t.borderStyle,borderRadius:i&&(t==null?void 0:t.cornerRadius)!==void 0?t.cornerRadius:void 0}}function ALe(e){return{borderColor:dr(e.borderColor,"node").borderColor,backgroundColor:e.backgroundColor!==void 0?dr(e.backgroundColor,"node").backgroundColor:Zy}}const ym="opacity-0 transition-opacity";function _Le({id:e,data:t,selected:n,isConnectable:r}){const i=t.shape,a=sD[i],{isResizing:o,onResizeStart:s,onResizeEvent:c,onResizeEnd:l}=Kf({onResize:V=>{var F;return(F=t.onResize)==null?void 0:F.call(t,e,V)},setResizing:t.setResizing}),[u,d]=M.useState(()=>t.autoEditOnMount?t.shape==="ellipse"||t.shape==="sticky"||t.shape==="rectangle"&&(t.name===void 0||t.name==="")?"description":"name":null),f=u!==null,h=!!t.onNameChange,y=!!t.onDescriptionChange,v=i==="rectangle",k=i==="ellipse"||i==="sticky",g=t.name!==void 0&&t.name!=="",S=v&&g,w=k||v&&!g,C=o||t.width!==void 0||t.height!==void 0,_=i==="text",A=t.textColor,j=A!==void 0?dr(A,"text"):_?dr(t.borderColor,"text"):{},O={...Xhe(i,t),...t.fontSize!==void 0?{fontSize:`${t.fontSize}px`}:{}},T={...t.fontSize!==void 0?{fontSize:`${t.fontSize}px`}:{},...j},D=C?O:{...O,width:t.width??a.width,height:t.height??a.height},I=h||y?V=>{if(f)return;const F=V.target;if(!(F!=null&&F.closest(".react-flow__handle"))&&!(F!=null&&F.closest(".react-flow__resize-control"))){if(V.stopPropagation(),S){if(F!=null&&F.closest('[data-testid="shape-node-header"]')){h&&d("name");return}y?d("description"):h&&d("name");return}if(w){y?d("description"):h&&d("name");return}h&&d("name")}}:void 0;let R=null;const U=WK[i];if(U){const V=t.width??a.width,F=t.height??a.height,{borderColor:ie,backgroundColor:N}=ALe(t);R=x.jsx("div",{className:"pointer-events-none absolute inset-0",children:x.jsx(U,{width:V,height:F,borderColor:ie,backgroundColor:N,borderSize:t.borderSize,borderStyle:t.borderStyle})})}const q=t.description??"",K=q!=="",Z={...t.fontSize!==void 0?{fontSize:`${t.fontSize}px`}:{},...j};let $;w?$=u==="description"&&y?x.jsx(us,{initialValue:q,field:"node-description",commitMode:"blur-only",onCommit:V=>{var F;return(F=t.onDescriptionChange)==null?void 0:F.call(t,e,V)},onExit:()=>d(null),className:"relative text-[22px]",style:Z,placeholder:"Description"}):x.jsx("button",{type:"button",className:Ze("relative block whitespace-pre-wrap bg-transparent p-0 font-medium leading-tight",K?"break-words":"italic text-muted-foreground/40"),style:Z,children:K?q:""}):$=u==="name"&&h?x.jsx(us,{initialValue:t.name??"",field:"node-label",commitMode:"blur-only",onCommit:V=>{var F;return(F=t.onNameChange)==null?void 0:F.call(t,e,V)},onExit:()=>d(null),className:"relative text-[22px]",style:T,placeholder:_?"Text":"Label"}):x.jsx("button",{type:"button",className:Ze("relative block whitespace-pre-wrap bg-transparent p-0 font-medium leading-tight",t.name?"break-words":"text-muted-foreground/40 italic"),style:T,children:t.name??(_&&h?"Text":"")});const B=x.jsxs(x.Fragment,{children:[x.jsx("div",{className:"relative flex shrink-0 items-center border-b bg-muted/30 px-2 py-1.5","data-testid":"shape-node-header",children:x.jsx("div",{className:"min-w-0 flex-1 whitespace-pre-wrap break-words text-left font-semibold text-[18px] leading-tight",style:T,children:u==="name"&&h?x.jsx(us,{initialValue:t.name??"",field:"node-label",commitMode:"blur-only",onCommit:V=>{var F;return(F=t.onNameChange)==null?void 0:F.call(t,e,V)},onExit:()=>d(null),className:"text-[18px] font-semibold",style:T,placeholder:"Title"}):x.jsx("button",{type:"button",className:Ze("block w-full whitespace-pre-wrap break-words bg-transparent p-0 text-left font-semibold text-[18px] leading-tight",h?"hover:opacity-80":""),style:T,children:t.name})})}),x.jsx("div",{className:"relative flex min-h-0 flex-1 items-center px-2 py-1.5","data-testid":"shape-node-body",children:u==="description"&&y?x.jsx(us,{initialValue:q,field:"node-description",commitMode:"blur-only",onCommit:V=>{var F;return(F=t.onDescriptionChange)==null?void 0:F.call(t,e,V)},onExit:()=>d(null),className:"w-full text-[16px] text-muted-foreground",style:Z,placeholder:"Description"}):x.jsx("button",{type:"button",className:Ze("block w-full whitespace-pre-wrap break-words bg-transparent p-0 text-left text-[16px] leading-tight",K?"text-muted-foreground":"italic text-muted-foreground/40",y?"hover:opacity-80":""),style:Z,children:K?q:y?"Double-click to add description":""})})]});return x.jsxs("div",{className:Ze("group",S?"":"relative",S?"flex flex-col overflow-hidden text-left":"flex items-center justify-center p-2 text-center text-[22px]",C?"h-full w-full":"",Zhe(i)),style:D,"data-testid":"shape-node","data-shape":i,onDoubleClick:I,children:[R,x.jsx(Gf,{visible:!!n&&!!t.onResize&&!f&&!t.locked,cornerVariant:"visible",minWidth:80,minHeight:40,onResizeStart:s,onResize:c,onResizeEnd:l}),t.locked?x.jsx(Wf,{}):null,!_&&x.jsx(Ln,{type:"target",position:tt.Top,id:"t",isConnectable:r,className:Ze(ym,n&&"!opacity-100")}),!_&&x.jsx(Ln,{type:"target",position:tt.Left,id:"l",isConnectable:r,className:Ze(ym,n&&"!opacity-100")}),S?B:$,!_&&x.jsx(Ln,{type:"source",position:tt.Right,id:"r",isConnectable:r,className:Ze(ym,n&&"!opacity-100")}),!_&&x.jsx(Ln,{type:"source",position:tt.Bottom,id:"b",isConnectable:r,className:Ze(ym,n&&"!opacity-100")})]})}function ELe(e,t){return e.selected===t.selected&&e.data===t.data&&e.width===t.width&&e.height===t.height}const PLe=M.memo(_Le,ELe),NLe={running:"bg-amber-100 text-amber-900 dark:bg-amber-900/40 dark:text-amber-100 animate-pulse",done:"bg-emerald-100 text-emerald-900 dark:bg-emerald-900/40 dark:text-emerald-100",error:"bg-rose-100 text-rose-900 dark:bg-rose-950/40 dark:text-rose-100"};function RLe({status:e,"data-testid":t}){return e==="idle"?null:x.jsx("span",{"data-status":e,"data-testid":t,className:Ze("inline-flex h-4 items-center rounded-full px-1.5 py-0 font-normal text-[9px] uppercase tracking-wide",NLe[e]),children:e})}const jLe=100,TLe=44,DLe=200;function qLe({id:e,data:t,selected:n,isConnectable:r}){var w;const i=t.status??"idle",a=t.description??t.kind,{isResizing:o,onResizeStart:s,onResizeEvent:c,onResizeEnd:l}=Kf({onResize:C=>{var _;return(_=t.onResize)==null?void 0:_.call(t,e,C)},setResizing:t.setResizing}),[u,d]=M.useState(null),f=!!t.onNameChange,h=!!t.onDescriptionChange,y=o||t.width!==void 0||t.height!==void 0,v={...t.fontSize!==void 0?{fontSize:`${t.fontSize}px`}:{},...dr(t.textColor,"text")},k=v,g={borderColor:((w=t.statusReport)==null?void 0:w.state)==="error"?dr("red","node").borderColor:dr(t.borderColor,"node").borderColor,backgroundColor:dr(t.backgroundColor,"node").backgroundColor,borderWidth:t.borderSize!==void 0?t.borderSize:void 0,borderStyle:t.borderStyle,borderRadius:t.cornerRadius!==void 0?t.cornerRadius:void 0,...y?{}:{width:DLe}},S=f||h?C=>{if(u!==null)return;const _=C.target;if(!(_!=null&&_.closest(".react-flow__handle"))&&!(_!=null&&_.closest(".react-flow__resize-control"))){if(C.stopPropagation(),_!=null&&_.closest('[data-testid="node-header"]')){f&&d("name");return}if(_!=null&&_.closest('[data-testid="node-content"]')){h?d("description"):f&&d("name");return}h?d("description"):f&&d("name")}}:void 0;return x.jsxs("div",{className:Ze("group flex flex-col justify-center overflow-hidden rounded-lg border-[3px] border-dashed shadow-sm transition-shadow",y?"h-full w-full":"",i==="running"?"seeflow-node-pulse":""),style:g,"data-status":i,"data-testid":"state-node",onDoubleClick:S,children:[x.jsx(Gf,{visible:!!n&&!!t.onResize&&!t.locked,cornerVariant:"visible",minWidth:jLe,minHeight:TLe,onResizeStart:s,onResize:c,onResizeEnd:l}),t.locked?x.jsx(Wf,{}):null,x.jsx(Ln,{type:"target",position:tt.Top,id:"t",isConnectable:r,className:Ze("opacity-0 transition-opacity",n&&"!opacity-100")}),x.jsx(Ln,{type:"target",position:tt.Left,id:"l",isConnectable:r,className:Ze("opacity-0 transition-opacity",n&&"!opacity-100")}),x.jsxs("div",{className:"flex shrink-0 items-center justify-between gap-2 border-b bg-muted/30 px-2 py-2","data-testid":"node-header",children:[x.jsx("div",{className:"min-w-0 flex-1 text-[18px] font-semibold leading-tight",style:v,children:u==="name"&&f?x.jsx(us,{initialValue:t.name,field:"node-name",required:!0,commitMode:"blur-only",onCommit:C=>{var _;return(_=t.onNameChange)==null?void 0:_.call(t,e,C)},onExit:()=>d(null),className:"text-[18px] font-semibold",style:v}):x.jsx("button",{type:"button",className:Ze("block w-full whitespace-pre-wrap break-words bg-transparent p-0 text-left text-[18px] font-semibold leading-tight",f?"hover:opacity-80":""),style:v,children:t.name})}),x.jsx("div",{className:"flex shrink-0 items-center gap-1",children:x.jsx(RLe,{status:i})})]}),x.jsx("div",{className:"flex min-h-0 flex-1 items-center px-2 py-1","data-testid":"node-content","data-resizing":o?"true":void 0,children:u==="description"&&h?x.jsx(us,{initialValue:t.description??"",field:"node-description",multiline:!0,onCommit:C=>{var _;return(_=t.onDescriptionChange)==null?void 0:_.call(t,e,C)},onExit:()=>d(null),className:"w-full text-[18px] text-muted-foreground",style:k,placeholder:t.kind}):x.jsx("button",{type:"button",className:Ze("block w-full whitespace-normal break-words bg-transparent p-0 text-left text-[18px] text-muted-foreground",h?"hover:opacity-80":""),style:k,children:a})}),x.jsx(Ln,{type:"source",position:tt.Right,id:"r",isConnectable:r,className:Ze("opacity-0 transition-opacity",n&&"!opacity-100")}),x.jsx(Ln,{type:"source",position:tt.Bottom,id:"b",isConnectable:r,className:Ze("opacity-0 transition-opacity",n&&"!opacity-100")})]})}function zLe(e,t){return e.selected===t.selected&&e.data===t.data&&e.width===t.width&&e.height===t.height}const OLe=M.memo(qLe,zLe),FLe=8;function BLe(e){let t=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY,i=Number.NEGATIVE_INFINITY,a=!1;for(const o of e){const s=o.data.width,c=o.data.height;s===void 0||c===void 0||(a=!0,o.position.x<t&&(t=o.position.x),o.position.y<n&&(n=o.position.y),o.position.x+s>r&&(r=o.position.x+s),o.position.y+c>i&&(i=o.position.y+c))}return a?{x:t,y:n,width:r-t,height:i-n}:null}function HLe(e){return e.length>=2}function VLe({selectedNodes:e,onMultiResize:t,paddingPx:n=FLe}){kq();const[r,i]=M.useState(null),[a,o]=M.useState(null);if(M.useRef(!1),M.useRef(null),!HLe(e))return null;const s=BLe(e);if(!s)return null;const c=a??s;return c.x-n,c.y-n,c.width+n*2,c.height+n*2,null}function P0({value:e,onChange:t,options:n,ariaLabel:r,className:i}){return x.jsx(Tp,{delayDuration:300,children:x.jsx("div",{"aria-label":r,className:Ze("inline-flex h-9 items-stretch overflow-hidden rounded-md border border-input bg-background p-0.5",i),children:n.map((a,o)=>{const s=e===a.value,c=a.icon;return x.jsxs(M.Fragment,{children:[o>0?x.jsx("div",{"aria-hidden":!0,className:"mx-0.5 w-px self-stretch bg-border/70"}):null,x.jsxs(Oy,{children:[x.jsx(Fy,{asChild:!0,children:x.jsx("button",{type:"button","aria-pressed":s,"aria-label":a.label,"data-active":s,"data-testid":a.testId,onClick:()=>t(a.value),className:Ze("flex flex-1 items-center justify-center rounded px-2 transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",s?"bg-secondary text-secondary-foreground shadow-sm":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),children:x.jsx(c,{className:"h-4 w-4"})})}),x.jsx($f,{side:"top",className:"px-2 py-1 text-xs",children:a.label})]})]},a.value)})})})}const eg=e=>({width:16,height:16,viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:1.75,...e}),cD=e=>x.jsx("svg",{...eg(e),"aria-hidden":"true",children:x.jsx("line",{x1:"2",y1:"8",x2:"14",y2:"8"})}),Yhe=e=>x.jsx("svg",{...eg(e),"aria-hidden":"true",children:x.jsx("line",{x1:"2",y1:"8",x2:"14",y2:"8",strokeDasharray:"3 2.5"})}),Jhe=e=>x.jsx("svg",{...eg(e),"aria-hidden":"true",children:x.jsx("line",{x1:"2",y1:"8",x2:"14",y2:"8",strokeDasharray:"0.1 2.6"})}),Qhe=e=>x.jsx("svg",{...eg(e),"aria-hidden":"true",children:x.jsx("path",{d:"M2 12 C 5 12, 5 4, 8 4 S 11 12, 14 12"})}),ULe=e=>x.jsx("svg",{...eg(e),"aria-hidden":"true",children:x.jsx("path",{d:"M2 12 H 6 V 4 H 14"})});function e2e(e,[t,n]){return Math.min(n,Math.max(t,e))}var $Le=M.createContext(void 0);function GK(e){const t=M.useContext($Le);return e||t||"ltr"}function WLe(e){const t=M.useRef({value:e,previous:e});return M.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function KK(e){const t=e+"CollectionProvider",[n,r]=xs(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=v=>{const{scope:k,children:g}=v,S=as.useRef(null),w=as.useRef(new Map).current;return x.jsx(i,{scope:k,itemMap:w,collectionRef:S,children:g})};o.displayName=t;const s=e+"CollectionSlot",c=vf(s),l=as.forwardRef((v,k)=>{const{scope:g,children:S}=v,w=a(s,g),C=Nn(k,w.collectionRef);return x.jsx(c,{ref:C,children:S})});l.displayName=s;const u=e+"CollectionItemSlot",d="data-radix-collection-item",f=vf(u),h=as.forwardRef((v,k)=>{const{scope:g,children:S,...w}=v,C=as.useRef(null),_=Nn(k,C),A=a(u,g);return as.useEffect(()=>(A.itemMap.set(C,{ref:C,...w}),()=>void A.itemMap.delete(C))),x.jsx(f,{[d]:"",ref:_,children:S})});h.displayName=u;function y(v){const k=a(e+"CollectionConsumer",v);return as.useCallback(()=>{const S=k.collectionRef.current;if(!S)return[];const w=Array.from(S.querySelectorAll(`[${d}]`));return Array.from(k.itemMap.values()).sort((A,j)=>w.indexOf(A.ref.current)-w.indexOf(j.ref.current))},[k.collectionRef,k.itemMap])}return[{Provider:o,Slot:l,ItemSlot:h},y,r]}var t2e=["PageUp","PageDown"],n2e=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],r2e={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},Zf="Slider",[SW,GLe,KLe]=KK(Zf),[i2e]=xs(Zf,[KLe]),[ZLe,wq]=i2e(Zf),a2e=M.forwardRef((e,t)=>{const{name:n,min:r=0,max:i=100,step:a=1,orientation:o="horizontal",disabled:s=!1,minStepsBetweenThumbs:c=0,defaultValue:l=[r],value:u,onValueChange:d=()=>{},onValueCommit:f=()=>{},inverted:h=!1,form:y,...v}=e,k=M.useRef(new Set),g=M.useRef(0),w=o==="horizontal"?XLe:YLe,[C=[],_]=Of({prop:u,defaultProp:l,onChange:I=>{var U;(U=[...k.current][g.current])==null||U.focus(),d(I)}}),A=M.useRef(C);function j(I){const R=nIe(C,I);D(I,R)}function O(I){D(I,g.current)}function T(){const I=A.current[g.current];C[g.current]!==I&&f(C)}function D(I,R,{commit:U}={commit:!1}){const q=oIe(a),K=sIe(Math.round((I-r)/a)*a+r,q),Z=e2e(K,[r,i]);_(($=[])=>{const B=eIe($,Z,R);if(aIe(B,c*a)){g.current=B.indexOf(Z);const V=String(B)!==String($);return V&&U&&f(B),V?B:$}else return $})}return x.jsx(ZLe,{scope:e.__scopeSlider,name:n,disabled:s,min:r,max:i,valueIndexToChangeRef:g,thumbs:k.current,values:C,orientation:o,form:y,children:x.jsx(SW.Provider,{scope:e.__scopeSlider,children:x.jsx(SW.Slot,{scope:e.__scopeSlider,children:x.jsx(w,{"aria-disabled":s,"data-disabled":s?"":void 0,...v,ref:t,onPointerDown:St(v.onPointerDown,()=>{s||(A.current=C)}),min:r,max:i,inverted:h,onSlideStart:s?void 0:j,onSlideMove:s?void 0:O,onSlideEnd:s?void 0:T,onHomeKeyDown:()=>!s&&D(r,0,{commit:!0}),onEndKeyDown:()=>!s&&D(i,C.length-1,{commit:!0}),onStepKeyDown:({event:I,direction:R})=>{if(!s){const K=t2e.includes(I.key)||I.shiftKey&&n2e.includes(I.key)?10:1,Z=g.current,$=C[Z],B=a*K*R;D($+B,Z,{commit:!0})}}})})})})});a2e.displayName=Zf;var[o2e,s2e]=i2e(Zf,{startEdge:"left",endEdge:"right",size:"width",direction:1}),XLe=M.forwardRef((e,t)=>{const{min:n,max:r,dir:i,inverted:a,onSlideStart:o,onSlideMove:s,onSlideEnd:c,onStepKeyDown:l,...u}=e,[d,f]=M.useState(null),h=Nn(t,w=>f(w)),y=M.useRef(void 0),v=GK(i),k=v==="ltr",g=k&&!a||!k&&a;function S(w){const C=y.current||d.getBoundingClientRect(),_=[0,C.width],j=ZK(_,g?[n,r]:[r,n]);return y.current=C,j(w-C.left)}return x.jsx(o2e,{scope:e.__scopeSlider,startEdge:g?"left":"right",endEdge:g?"right":"left",direction:g?1:-1,size:"width",children:x.jsx(c2e,{dir:v,"data-orientation":"horizontal",...u,ref:h,style:{...u.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:w=>{const C=S(w.clientX);o==null||o(C)},onSlideMove:w=>{const C=S(w.clientX);s==null||s(C)},onSlideEnd:()=>{y.current=void 0,c==null||c()},onStepKeyDown:w=>{const _=r2e[g?"from-left":"from-right"].includes(w.key);l==null||l({event:w,direction:_?-1:1})}})})}),YLe=M.forwardRef((e,t)=>{const{min:n,max:r,inverted:i,onSlideStart:a,onSlideMove:o,onSlideEnd:s,onStepKeyDown:c,...l}=e,u=M.useRef(null),d=Nn(t,u),f=M.useRef(void 0),h=!i;function y(v){const k=f.current||u.current.getBoundingClientRect(),g=[0,k.height],w=ZK(g,h?[r,n]:[n,r]);return f.current=k,w(v-k.top)}return x.jsx(o2e,{scope:e.__scopeSlider,startEdge:h?"bottom":"top",endEdge:h?"top":"bottom",size:"height",direction:h?1:-1,children:x.jsx(c2e,{"data-orientation":"vertical",...l,ref:d,style:{...l.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:v=>{const k=y(v.clientY);a==null||a(k)},onSlideMove:v=>{const k=y(v.clientY);o==null||o(k)},onSlideEnd:()=>{f.current=void 0,s==null||s()},onStepKeyDown:v=>{const g=r2e[h?"from-bottom":"from-top"].includes(v.key);c==null||c({event:v,direction:g?-1:1})}})})}),c2e=M.forwardRef((e,t)=>{const{__scopeSlider:n,onSlideStart:r,onSlideMove:i,onSlideEnd:a,onHomeKeyDown:o,onEndKeyDown:s,onStepKeyDown:c,...l}=e,u=wq(Zf,n);return x.jsx(Jt.span,{...l,ref:t,onKeyDown:St(e.onKeyDown,d=>{d.key==="Home"?(o(d),d.preventDefault()):d.key==="End"?(s(d),d.preventDefault()):t2e.concat(n2e).includes(d.key)&&(c(d),d.preventDefault())}),onPointerDown:St(e.onPointerDown,d=>{const f=d.target;f.setPointerCapture(d.pointerId),d.preventDefault(),u.thumbs.has(f)?f.focus():r(d)}),onPointerMove:St(e.onPointerMove,d=>{d.target.hasPointerCapture(d.pointerId)&&i(d)}),onPointerUp:St(e.onPointerUp,d=>{const f=d.target;f.hasPointerCapture(d.pointerId)&&(f.releasePointerCapture(d.pointerId),a(d))})})}),l2e="SliderTrack",u2e=M.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,i=wq(l2e,n);return x.jsx(Jt.span,{"data-disabled":i.disabled?"":void 0,"data-orientation":i.orientation,...r,ref:t})});u2e.displayName=l2e;var CW="SliderRange",d2e=M.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,i=wq(CW,n),a=s2e(CW,n),o=M.useRef(null),s=Nn(t,o),c=i.values.length,l=i.values.map(f=>p2e(f,i.min,i.max)),u=c>1?Math.min(...l):0,d=100-Math.max(...l);return x.jsx(Jt.span,{"data-orientation":i.orientation,"data-disabled":i.disabled?"":void 0,...r,ref:s,style:{...e.style,[a.startEdge]:u+"%",[a.endEdge]:d+"%"}})});d2e.displayName=CW;var LW="SliderThumb",h2e=M.forwardRef((e,t)=>{const n=GLe(e.__scopeSlider),[r,i]=M.useState(null),a=Nn(t,s=>i(s)),o=M.useMemo(()=>r?n().findIndex(s=>s.ref.current===r):-1,[n,r]);return x.jsx(JLe,{...e,ref:a,index:o})}),JLe=M.forwardRef((e,t)=>{const{__scopeSlider:n,index:r,name:i,...a}=e,o=wq(LW,n),s=s2e(LW,n),[c,l]=M.useState(null),u=Nn(t,S=>l(S)),d=c?o.form||!!c.closest("form"):!0,f=g1e(c),h=o.values[r],y=h===void 0?0:p2e(h,o.min,o.max),v=tIe(r,o.values.length),k=f==null?void 0:f[s.size],g=k?rIe(k,y,s.direction):0;return M.useEffect(()=>{if(c)return o.thumbs.add(c),()=>{o.thumbs.delete(c)}},[c,o.thumbs]),x.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[s.startEdge]:`calc(${y}% + ${g}px)`},children:[x.jsx(SW.ItemSlot,{scope:e.__scopeSlider,children:x.jsx(Jt.span,{role:"slider","aria-label":e["aria-label"]||v,"aria-valuemin":o.min,"aria-valuenow":h,"aria-valuemax":o.max,"aria-orientation":o.orientation,"data-orientation":o.orientation,"data-disabled":o.disabled?"":void 0,tabIndex:o.disabled?void 0:0,...a,ref:u,style:h===void 0?{display:"none"}:e.style,onFocus:St(e.onFocus,()=>{o.valueIndexToChangeRef.current=r})})}),d&&x.jsx(f2e,{name:i??(o.name?o.name+(o.values.length>1?"[]":""):void 0),form:o.form,value:h},r)]})});h2e.displayName=LW;var QLe="RadioBubbleInput",f2e=M.forwardRef(({__scopeSlider:e,value:t,...n},r)=>{const i=M.useRef(null),a=Nn(i,r),o=WLe(t);return M.useEffect(()=>{const s=i.current;if(!s)return;const c=window.HTMLInputElement.prototype,u=Object.getOwnPropertyDescriptor(c,"value").set;if(o!==t&&u){const d=new Event("input",{bubbles:!0});u.call(s,t),s.dispatchEvent(d)}},[o,t]),x.jsx(Jt.input,{style:{display:"none"},...n,ref:a,defaultValue:t})});f2e.displayName=QLe;function eIe(e=[],t,n){const r=[...e];return r[n]=t,r.sort((i,a)=>i-a)}function p2e(e,t,n){const a=100/(n-t)*(e-t);return e2e(a,[0,100])}function tIe(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function nIe(e,t){if(e.length===1)return 0;const n=e.map(i=>Math.abs(i-t)),r=Math.min(...n);return n.indexOf(r)}function rIe(e,t,n){const r=e/2,a=ZK([0,50],[0,r]);return(r-a(t)*n)*n}function iIe(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function aIe(e,t){if(t>0){const n=iIe(e);return Math.min(...n)>=t}return!0}function ZK(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function oIe(e){return(String(e).split(".")[1]||"").length}function sIe(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}var y2e=a2e,cIe=u2e,lIe=d2e,uIe=h2e;const g2e=M.forwardRef(({className:e,...t},n)=>x.jsxs(y2e,{ref:n,className:Ze("relative flex w-full touch-none select-none items-center",e),...t,children:[x.jsx(cIe,{className:"relative h-1.5 w-full grow overflow-hidden rounded-full bg-secondary",children:x.jsx(lIe,{className:"absolute h-full bg-primary"})}),x.jsx(uIe,{className:"block h-4 w-4 rounded-full border border-primary/60 bg-background shadow-sm transition-colors hover:border-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50"})]}));g2e.displayName=y2e.displayName;const ZQ=22,XQ=11,YQ=3,JQ=2,mO=8,dIe={http:"solid",event:"dashed",queue:"dotted",default:"solid"},m2e=["default","slate","blue","green","amber","red","purple","pink"],gm=[{value:"solid",icon:cD,label:"Solid",testId:"style-tab-border-style-solid"},{value:"dashed",icon:Yhe,label:"Dashed",testId:"style-tab-border-style-dashed"},{value:"dotted",icon:Jhe,label:"Dotted",testId:"style-tab-border-style-dotted"}],QQ=[{value:"solid",icon:cD,label:"Solid",testId:"style-tab-edge-style-solid"},{value:"dashed",icon:Yhe,label:"Dashed",testId:"style-tab-edge-style-dashed"},{value:"dotted",icon:Jhe,label:"Dotted",testId:"style-tab-edge-style-dotted"}],eee=[{value:"curve",icon:Qhe,label:"Curve",testId:"style-tab-edge-path-curve"},{value:"step",icon:ULe,label:"Zigzag",testId:"style-tab-edge-path-step"}],tee=[{value:"none",icon:vp,label:"None",testId:"style-tab-direction-none"},{value:"backward",icon:kp,label:"Backward",testId:"style-tab-direction-backward"},{value:"forward",icon:X2,label:"Forward",testId:"style-tab-direction-forward"},{value:"both",icon:op,label:"Both",testId:"style-tab-direction-both"}];function hIe({nodes:e,connectors:t,onStyleNode:n,onStyleNodePreview:r,onStyleNodes:i,onStyleNodesPreview:a,onStyleConnector:o,onStyleConnectorPreview:s,onRequestIconReplace:c}){const l=e.length>0,u=t.length>0;if(!l&&!u)return null;const d=l&&!u,f=!l&&u,h=e[0],y=t[0],v=e.filter(Pe=>Pe.type!=="iconNode"),k=v[0],g=d&&e.every(Pe=>Pe.type==="iconNode"),S=g?e.find(Pe=>Pe.type==="iconNode"):void 0,w=d&&e.every(Pe=>Pe.type==="imageNode"),C=d&&(h==null?void 0:h.type)==="shapeNode"&&h.data.shape==="text",_=(f?y==null?void 0:y.color:k==null?void 0:k.data.borderColor)??"default",A=(k==null?void 0:k.data.backgroundColor)??"default",j=(k==null?void 0:k.data.borderStyle)??"solid",O=y?y.style??dIe[y.kind]:"solid",T=(y==null?void 0:y.direction)??"forward",D=(y==null?void 0:y.path)??"curve",I=Pe=>{for(const Ie of e)n(Ie.id,{borderColor:Pe});for(const Ie of t)o(Ie.id,{color:Pe})},R=Pe=>{for(const Ie of e)n(Ie.id,{backgroundColor:Pe})},U=Pe=>{for(const Ie of e)n(Ie.id,{borderStyle:Pe});for(const Ie of t)o(Ie.id,{style:Pe})},q=Pe=>{for(const Ie of e)n(Ie.id,{borderSize:Pe});for(const Ie of t)o(Ie.id,{borderSize:Pe})},K=Pe=>{for(const Ie of e)r==null||r(Ie.id,{borderSize:Pe});for(const Ie of t)s==null||s(Ie.id,{borderSize:Pe})},Z=Pe=>{if(e.length>1&&i)i(e.map(Ie=>Ie.id),{fontSize:Pe});else for(const Ie of e)n(Ie.id,{fontSize:Pe})},$=Pe=>{if(e.length>1&&a)a(e.map(Ie=>Ie.id),{fontSize:Pe});else for(const Ie of e)r==null||r(Ie.id,{fontSize:Pe})},B=v.length>1&&new Set(v.map(Pe=>Pe.data.fontSize??ZQ)).size>1,V=Pe=>{if(e.length>1&&i)i(e.map(Ie=>Ie.id),{textColor:Pe});else for(const Ie of e)n(Ie.id,{textColor:Pe})},F=(k==null?void 0:k.data.textColor)??(C?(k==null?void 0:k.data.borderColor)??"default":"default"),ie=Pe=>{for(const Ie of t)o(Ie.id,{fontSize:Pe})},N=Pe=>{for(const Ie of t)s==null||s(Ie.id,{fontSize:Pe})},P=t.length>1&&new Set(t.map(Pe=>Pe.fontSize??XQ)).size>1,G=Pe=>{for(const Ie of e)n(Ie.id,{cornerRadius:Pe})},J=Pe=>{for(const Ie of e)r==null||r(Ie.id,{cornerRadius:Pe})},X=v.length>1&&new Set(v.map(Pe=>Pe.data.cornerRadius??mO)).size>1,ae=Pe=>{for(const Ie of t)o(Ie.id,{path:Pe})},re=Pe=>{for(const Ie of t)o(Ie.id,{direction:Pe})},fe=Pe=>{for(const Ie of e)n(Ie.id,{color:Pe})},ke=(S==null?void 0:S.data.color)??"default",Ne=f?(y==null?void 0:y.borderSize)??JQ:(k==null?void 0:k.data.borderSize)??YQ,je=f?JQ:YQ,Re=f?"edge":"border",$e=f?"Connector color":C?"Color":"Border color",ee=f?"connector color":C?"color":"border color",qe=f?"style-tab-edge-color-trigger":C?"style-tab-color-trigger":"style-tab-border-color-trigger",Ke=f||C?"style-tab-color":"style-tab-border-color";if(g){const Pe=!!c&&e.length===1&&!!S,Ie=()=>{S&&c&&c(S.id)};return x.jsx(Tp,{delayDuration:300,children:x.jsxs("div",{"data-testid":"canvas-style-strip",className:"pointer-events-auto flex flex-col items-center gap-1 rounded-lg border border-border bg-background/95 p-1 shadow-md backdrop-blur",children:[x.jsx(nee,{testId:"style-strip-icon-color",tooltip:"Icon color",ariaLabel:"icon color",activeToken:ke,previewKind:"edge",tokenTestIdPrefix:"style-tab-icon-color",innerTestId:"style-tab-icon-color-trigger",onSelect:fe}),Pe?x.jsxs(Oy,{children:[x.jsx(Fy,{asChild:!0,children:x.jsx("button",{type:"button","data-testid":"style-strip-change-icon","aria-label":"change icon",title:"Change icon",onClick:Ie,className:Ze("inline-flex h-8 w-8 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1"),children:x.jsx(Q2,{className:"h-4 w-4"})})}),x.jsx($f,{side:"right",className:"px-2 py-1 text-xs",children:"Change icon"})]}):null]})})}if(w){const Pe=e[0],Ie=(Pe==null?void 0:Pe.data.borderColor)??"default",ye=(Pe==null?void 0:Pe.data.borderStyle)??"solid",wt=(Pe==null?void 0:Pe.data.borderWidth)??1,Me=Pt=>{for(const it of e)n(it.id,{borderColor:Pt})},Ce=Pt=>{for(const it of e)n(it.id,{borderStyle:Pt})},De=Pt=>{for(const it of e)n(it.id,{borderWidth:Pt})},Ve=Pt=>{for(const it of e)r==null||r(it.id,{borderWidth:Pt})},nt=Pt=>{for(const it of e)n(it.id,{cornerRadius:Pt})},rt=Pt=>{for(const it of e)r==null||r(it.id,{cornerRadius:Pt})};return x.jsx(Tp,{delayDuration:300,children:x.jsxs("div",{"data-testid":"canvas-style-strip",className:"pointer-events-auto flex flex-col items-center gap-1 rounded-lg border border-border bg-background/95 p-1 shadow-md backdrop-blur",children:[x.jsx(nee,{testId:"style-strip-image-border-color",tooltip:"Border color",ariaLabel:"image border color",activeToken:Ie,previewKind:"border",tokenTestIdPrefix:"style-tab-image-border-color",innerTestId:"style-tab-image-border-color-trigger",onSelect:Me}),x.jsx(zs,{testId:"style-strip-image-border-style",tooltip:"Border style",ariaLabel:"image border style",renderIcon:()=>{var it;const Pt=((it=gm.find(at=>at.value===ye))==null?void 0:it.icon)??cD;return x.jsx(Pt,{className:"h-4 w-4"})},children:x.jsx(P0,{ariaLabel:"Border style",value:ye,onChange:Ce,options:gm})}),x.jsx(zs,{testId:"style-strip-image-border-width",tooltip:"Border width",ariaLabel:"image border width",renderIcon:()=>x.jsx("span",{className:"font-mono text-[10px] tabular-nums",children:wt}),children:x.jsx(N0,{value:Pe==null?void 0:Pe.data.borderWidth,defaultValue:1,min:1,max:8,suffix:"px",onPreview:Ve,onCommit:De,testId:"style-tab-image-border-width-slider"})}),x.jsx(zs,{testId:"style-strip-image-corner-radius",tooltip:"Corners",ariaLabel:"image corner radius",renderIcon:()=>x.jsx(J2,{className:"h-4 w-4"}),children:x.jsx(N0,{value:Pe==null?void 0:Pe.data.cornerRadius,defaultValue:mO,min:0,max:32,suffix:"px",onPreview:rt,onCommit:nt,testId:"style-tab-image-corner-radius-slider"})})]})})}const _e=d&&!C,Se=!C,ot=!f,Qe=()=>{if(f){const ye=zp[_].edge;return x.jsx("span",{className:"inline-block h-5 w-5 rounded-full ring-1 ring-border",style:{backgroundColor:ye}})}const Pe=zp[_].border,Ie=zp[A].background;return x.jsx("span",{className:"inline-block h-5 w-5 rounded-md ring-1 ring-border",style:{backgroundColor:Ie,border:`2px solid ${Pe}`}})};return x.jsx(Tp,{delayDuration:300,children:x.jsxs("div",{"data-testid":"canvas-style-strip",className:"pointer-events-auto flex flex-col items-center gap-1 rounded-lg border border-border bg-background/95 p-1 shadow-md backdrop-blur",children:[C?null:x.jsx(zs,{testId:"style-strip-colors",tooltip:"Colors",ariaLabel:"colors",renderIcon:Qe,children:x.jsxs("div",{className:"flex w-56 flex-col gap-3",children:[x.jsx(f2,{label:$e,children:x.jsx(vO,{testId:"style-strip-border-color",activeToken:_,previewKind:Re,tokenTestIdPrefix:Ke,innerTestId:qe,ariaLabel:ee,onSelect:I})}),_e?x.jsx(f2,{label:"Fill",children:x.jsx(vO,{testId:"style-strip-fill",activeToken:A,previewKind:"background",tokenTestIdPrefix:"style-tab-background-color",innerTestId:"style-tab-background-color-trigger",ariaLabel:"fill",onSelect:R})}):null]})}),Se?x.jsx(zs,{testId:"style-strip-border",tooltip:f?"Connector":"Border",ariaLabel:f?"connector":"border",renderIcon:()=>{var Ie,ye;const Pe=(f?(Ie=QQ.find(wt=>wt.value===O))==null?void 0:Ie.icon:(ye=gm.find(wt=>wt.value===j))==null?void 0:ye.icon)??cD;return x.jsx(Pe,{className:"h-4 w-4"})},children:x.jsxs("div",{className:"flex w-56 flex-col gap-3",children:[x.jsx(f2,{label:"Style",testId:"style-strip-border-style",children:f?x.jsx(P0,{ariaLabel:"Connector style",value:O,onChange:Pe=>U(Pe),options:QQ}):x.jsx(P0,{ariaLabel:"Border style",value:j,onChange:Pe=>U(Pe),options:gm})}),x.jsx(f2,{label:"Width",testId:"style-strip-border-size",children:x.jsx(N0,{value:Ne,defaultValue:je,min:1,max:8,suffix:"px",onPreview:K,onCommit:q,testId:f?"style-tab-stroke-width-slider":"style-tab-border-size-slider"})})]})}):null,l||f?x.jsx(zs,{testId:"style-strip-text",tooltip:"Text",ariaLabel:"text",renderIcon:()=>x.jsx(ef,{className:"h-4 w-4"}),children:x.jsxs("div",{className:"flex w-56 flex-col gap-3",children:[x.jsx(f2,{label:"Size",testId:f?"style-strip-connector-font-size":"style-strip-font-size",children:x.jsx(N0,{value:f?y==null?void 0:y.fontSize:k==null?void 0:k.data.fontSize,defaultValue:f?XQ:ZQ,min:f?8:10,max:32,suffix:"px",indeterminate:f?P:B,onPreview:f?N:$,onCommit:f?ie:Z,testId:f?"style-tab-connector-font-size-slider":"style-tab-font-size-slider"})}),ot?x.jsx(f2,{label:"Color",children:x.jsx(vO,{testId:"style-strip-text-color",activeToken:F,previewKind:"edge",tokenTestIdPrefix:"style-tab-text-color",innerTestId:"style-tab-text-color-trigger",ariaLabel:"text color",onSelect:V})}):null]})}):null,l&&!C?x.jsx(zs,{testId:"style-strip-corner-radius",tooltip:"Corners",ariaLabel:"corner radius",renderIcon:()=>x.jsx(J2,{className:"h-4 w-4"}),children:x.jsx(N0,{value:k==null?void 0:k.data.cornerRadius,defaultValue:mO,min:0,max:32,suffix:"px",indeterminate:X,onPreview:J,onCommit:G,testId:"style-tab-corner-radius-slider"})}):null,f?x.jsx(zs,{testId:"style-strip-path",tooltip:"Connector path",ariaLabel:"connector path",renderIcon:()=>{var Ie;const Pe=((Ie=eee.find(ye=>ye.value===D))==null?void 0:Ie.icon)??Qhe;return x.jsx(Pe,{className:"h-4 w-4"})},children:x.jsx(P0,{ariaLabel:"Connector path",value:D,onChange:ae,options:eee})}):null,f?x.jsx(zs,{testId:"style-strip-direction",tooltip:"Direction",ariaLabel:"direction",renderIcon:()=>{var Ie;const Pe=((Ie=tee.find(ye=>ye.value===T))==null?void 0:Ie.icon)??X2;return x.jsx(Pe,{className:"h-4 w-4"})},children:x.jsx(P0,{ariaLabel:"Connector direction",value:T,onChange:re,options:tee})}):null]})})}function v2e(e,t){const n=zp[e];return t==="background"?{backgroundColor:n.background,borderColor:n.border}:t==="edge"?{backgroundColor:n.edge,borderColor:n.edge}:{borderColor:n.border,backgroundColor:n.background}}function fIe(e,t){const n=zp[e];return t==="background"?{backgroundColor:n.background}:t==="edge"?{backgroundColor:n.edge}:{backgroundColor:n.border}}function nee({testId:e,tooltip:t,ariaLabel:n,activeToken:r,previewKind:i,tokenTestIdPrefix:a,innerTestId:o,onSelect:s}){const[c,l]=M.useState(!1),u=r==="default";return x.jsxs(Uf,{open:c,onOpenChange:l,children:[x.jsxs(Oy,{children:[x.jsx(Fy,{asChild:!0,children:x.jsx(qy,{asChild:!0,children:x.jsx("button",{type:"button","data-testid":e,"data-active-token":r,"aria-label":`${n}: ${r}`,title:t,className:Ze("group relative inline-flex h-8 w-8 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1"),children:x.jsx("span",{"data-testid":o,className:"relative h-5 w-5 rounded-full ring-1 ring-border",style:fIe(r,i),children:u?x.jsx("span",{"aria-hidden":"true",className:"pointer-events-none absolute inset-0 rounded-full",style:{backgroundImage:"linear-gradient(45deg, transparent 45%, currentColor 45%, currentColor 55%, transparent 55%)",color:"hsl(var(--muted-foreground))",opacity:.5}}):null})})})}),x.jsx($f,{side:"right",className:"px-2 py-1 text-xs",children:t})]}),x.jsx(Fh,{side:"right",align:"start",className:"w-auto p-2","data-testid":`${o}-popover`,children:x.jsx("div",{className:"grid grid-cols-4 gap-1.5",children:m2e.map(d=>{const f=r===d;return x.jsx("button",{type:"button",onClick:()=>{s(d),l(!1)},"data-testid":`${a}-${d}`,"data-active":f,"aria-label":`${n} ${d}`,"aria-pressed":f,title:d,className:Ze("relative flex h-7 w-7 items-center justify-center rounded-full border-2 transition-all",f?"ring-2 ring-ring ring-offset-2 ring-offset-popover":"hover:scale-110"),style:v2e(d,i),children:f?x.jsx(Jc,{className:"h-3 w-3 drop-shadow-sm",style:{color:"hsl(var(--foreground))"}}):null},d)})})})]})}function vO({testId:e,activeToken:t,previewKind:n,tokenTestIdPrefix:r,innerTestId:i,ariaLabel:a,onSelect:o}){return x.jsx("div",{"data-testid":e,"data-active-token":t,"data-inner-testid":i,className:"grid grid-cols-4 gap-1.5",children:m2e.map(s=>{const c=t===s;return x.jsx("button",{type:"button",onClick:()=>o(s),"data-testid":`${r}-${s}`,"data-active":c,"aria-label":`${a} ${s}`,"aria-pressed":c,title:s,className:Ze("relative flex h-7 w-7 items-center justify-center rounded-full border-2 transition-all",c?"ring-2 ring-ring ring-offset-2 ring-offset-popover":"hover:scale-110"),style:v2e(s,n),children:c?x.jsx(Jc,{className:"h-3 w-3 drop-shadow-sm",style:{color:"hsl(var(--foreground))"}}):null},s)})})}function f2({label:e,testId:t,children:n}){return x.jsxs("div",{className:"flex flex-col gap-1.5","data-testid":t,children:[x.jsx("div",{className:"text-[11px] font-medium uppercase tracking-wide text-muted-foreground",children:e}),n]})}function zs({testId:e,tooltip:t,ariaLabel:n,renderIcon:r,children:i}){const[a,o]=M.useState(!1);return x.jsxs(Uf,{open:a,onOpenChange:o,children:[x.jsxs(Oy,{children:[x.jsx(Fy,{asChild:!0,children:x.jsx(qy,{asChild:!0,children:x.jsx("button",{type:"button","data-testid":e,"aria-label":n,title:t,className:Ze("inline-flex h-8 w-8 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1"),children:r()})})}),x.jsx($f,{side:"right",className:"px-2 py-1 text-xs",children:t})]}),x.jsx(Fh,{side:"right",align:"start",className:"w-auto p-3",children:i})]})}function N0({value:e,defaultValue:t,min:n,max:r,suffix:i,indeterminate:a,onPreview:o,onCommit:s,testId:c}){const l=e??t,[u,d]=M.useState(l),[f,h]=M.useState(!1);M.useEffect(()=>{d(l),h(!1)},[l]);const y=a&&!f;return x.jsxs("div",{className:"flex w-48 items-center gap-3",children:[x.jsx(g2e,{min:n,max:r,step:1,value:[u],onValueChange:([v])=>{const k=v??n;d(k),h(!0),o==null||o(k)},onValueCommit:([v])=>s(v??n),"data-testid":c,"data-indeterminate":y?"true":void 0,className:Ze("flex-1",y&&"opacity-60")}),x.jsx("span",{"data-testid":`${c}-value`,className:"w-12 shrink-0 text-right text-xs tabular-nums text-muted-foreground",children:y?"Mixed":x.jsxs(x.Fragment,{children:[u,i]})})]})}var kO="rovingFocusGroup.onEntryFocus",pIe={bubbles:!1,cancelable:!0},tg="RovingFocusGroup",[IW,k2e,yIe]=KK(tg),[gIe,x2e]=xs(tg,[yIe]),[mIe,vIe]=gIe(tg),w2e=M.forwardRef((e,t)=>x.jsx(IW.Provider,{scope:e.__scopeRovingFocusGroup,children:x.jsx(IW.Slot,{scope:e.__scopeRovingFocusGroup,children:x.jsx(kIe,{...e,ref:t})})}));w2e.displayName=tg;var kIe=M.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:a,currentTabStopId:o,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:l,preventScrollOnEntryFocus:u=!1,...d}=e,f=M.useRef(null),h=Nn(t,f),y=GK(a),[v,k]=Of({prop:o,defaultProp:s??null,onChange:c,caller:tg}),[g,S]=M.useState(!1),w=vs(l),C=k2e(n),_=M.useRef(!1),[A,j]=M.useState(0);return M.useEffect(()=>{const O=f.current;if(O)return O.addEventListener(kO,w),()=>O.removeEventListener(kO,w)},[w]),x.jsx(mIe,{scope:n,orientation:r,dir:y,loop:i,currentTabStopId:v,onItemFocus:M.useCallback(O=>k(O),[k]),onItemShiftTab:M.useCallback(()=>S(!0),[]),onFocusableItemAdd:M.useCallback(()=>j(O=>O+1),[]),onFocusableItemRemove:M.useCallback(()=>j(O=>O-1),[]),children:x.jsx(Jt.div,{tabIndex:g||A===0?-1:0,"data-orientation":r,...d,ref:h,style:{outline:"none",...e.style},onMouseDown:St(e.onMouseDown,()=>{_.current=!0}),onFocus:St(e.onFocus,O=>{const T=!_.current;if(O.target===O.currentTarget&&T&&!g){const D=new CustomEvent(kO,pIe);if(O.currentTarget.dispatchEvent(D),!D.defaultPrevented){const I=C().filter(Z=>Z.focusable),R=I.find(Z=>Z.active),U=I.find(Z=>Z.id===v),K=[R,U,...I].filter(Boolean).map(Z=>Z.ref.current);S2e(K,u)}}_.current=!1}),onBlur:St(e.onBlur,()=>S(!1))})})}),b2e="RovingFocusGroupItem",M2e=M.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,children:o,...s}=e,c=da(),l=a||c,u=vIe(b2e,n),d=u.currentTabStopId===l,f=k2e(n),{onFocusableItemAdd:h,onFocusableItemRemove:y,currentTabStopId:v}=u;return M.useEffect(()=>{if(r)return h(),()=>y()},[r,h,y]),x.jsx(IW.ItemSlot,{scope:n,id:l,focusable:r,active:i,children:x.jsx(Jt.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...s,ref:t,onMouseDown:St(e.onMouseDown,k=>{r?u.onItemFocus(l):k.preventDefault()}),onFocus:St(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:St(e.onKeyDown,k=>{if(k.key==="Tab"&&k.shiftKey){u.onItemShiftTab();return}if(k.target!==k.currentTarget)return;const g=bIe(k,u.orientation,u.dir);if(g!==void 0){if(k.metaKey||k.ctrlKey||k.altKey||k.shiftKey)return;k.preventDefault();let w=f().filter(C=>C.focusable).map(C=>C.ref.current);if(g==="last")w.reverse();else if(g==="prev"||g==="next"){g==="prev"&&w.reverse();const C=w.indexOf(k.currentTarget);w=u.loop?MIe(w,C+1):w.slice(C+1)}setTimeout(()=>S2e(w))}}),children:typeof o=="function"?o({isCurrentTabStop:d,hasTabStop:v!=null}):o})})});M2e.displayName=b2e;var xIe={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function wIe(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function bIe(e,t,n){const r=wIe(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return xIe[r]}function S2e(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function MIe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var SIe=w2e,CIe=M2e,AW=["Enter"," "],LIe=["ArrowDown","PageUp","Home"],C2e=["ArrowUp","PageDown","End"],IIe=[...LIe,...C2e],AIe={ltr:[...AW,"ArrowRight"],rtl:[...AW,"ArrowLeft"]},_Ie={ltr:["ArrowLeft"],rtl:["ArrowRight"]},ng="Menu",[xy,EIe,PIe]=KK(ng),[Bh,bq]=xs(ng,[PIe,Vf,x2e]),Mq=Vf(),L2e=x2e(),[NIe,Hh]=Bh(ng),[RIe,rg]=Bh(ng),I2e=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:a,modal:o=!0}=e,s=Mq(t),[c,l]=M.useState(null),u=M.useRef(!1),d=vs(a),f=GK(i);return M.useEffect(()=>{const h=()=>{u.current=!0,document.addEventListener("pointerdown",y,{capture:!0,once:!0}),document.addEventListener("pointermove",y,{capture:!0,once:!0})},y=()=>u.current=!1;return document.addEventListener("keydown",h,{capture:!0}),()=>{document.removeEventListener("keydown",h,{capture:!0}),document.removeEventListener("pointerdown",y,{capture:!0}),document.removeEventListener("pointermove",y,{capture:!0})}},[]),x.jsx(bK,{...s,children:x.jsx(NIe,{scope:t,open:n,onOpenChange:d,content:c,onContentChange:l,children:x.jsx(RIe,{scope:t,onClose:M.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:u,dir:f,modal:o,children:r})})})};I2e.displayName=ng;var jIe="MenuAnchor",XK=M.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=Mq(n);return x.jsx(iq,{...i,...r,ref:t})});XK.displayName=jIe;var YK="MenuPortal",[TIe,A2e]=Bh(YK,{forceMount:void 0}),_2e=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:i}=e,a=Hh(YK,t);return x.jsx(TIe,{scope:t,forceMount:n,children:x.jsx(lo,{present:n||a.open,children:x.jsx(Ny,{asChild:!0,container:i,children:r})})})};_2e.displayName=YK;var ao="MenuContent",[DIe,JK]=Bh(ao),E2e=M.forwardRef((e,t)=>{const n=A2e(ao,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=Hh(ao,e.__scopeMenu),o=rg(ao,e.__scopeMenu);return x.jsx(xy.Provider,{scope:e.__scopeMenu,children:x.jsx(lo,{present:r||a.open,children:x.jsx(xy.Slot,{scope:e.__scopeMenu,children:o.modal?x.jsx(qIe,{...i,ref:t}):x.jsx(zIe,{...i,ref:t})})})})}),qIe=M.forwardRef((e,t)=>{const n=Hh(ao,e.__scopeMenu),r=M.useRef(null),i=Nn(t,r);return M.useEffect(()=>{const a=r.current;if(a)return cK(a)},[]),x.jsx(QK,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:St(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),zIe=M.forwardRef((e,t)=>{const n=Hh(ao,e.__scopeMenu);return x.jsx(QK,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),OIe=vf("MenuContent.ScrollLock"),QK=M.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:o,disableOutsidePointerEvents:s,onEntryFocus:c,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:h,disableOutsideScroll:y,...v}=e,k=Hh(ao,n),g=rg(ao,n),S=Mq(n),w=L2e(n),C=EIe(n),[_,A]=M.useState(null),j=M.useRef(null),O=Nn(t,j,k.onContentChange),T=M.useRef(0),D=M.useRef(""),I=M.useRef(0),R=M.useRef(null),U=M.useRef("right"),q=M.useRef(0),K=y?VD:M.Fragment,Z=y?{as:OIe,allowPinchZoom:!0}:void 0,$=V=>{var ae,re;const F=D.current+V,ie=C().filter(fe=>!fe.disabled),N=document.activeElement,P=(ae=ie.find(fe=>fe.ref.current===N))==null?void 0:ae.textValue,G=ie.map(fe=>fe.textValue),J=YIe(G,F,P),X=(re=ie.find(fe=>fe.textValue===J))==null?void 0:re.ref.current;(function fe(ke){D.current=ke,window.clearTimeout(T.current),ke!==""&&(T.current=window.setTimeout(()=>fe(""),1e3))})(F),X&&setTimeout(()=>X.focus())};M.useEffect(()=>()=>window.clearTimeout(T.current),[]),sK();const B=M.useCallback(V=>{var ie,N;return U.current===((ie=R.current)==null?void 0:ie.side)&&QIe(V,(N=R.current)==null?void 0:N.area)},[]);return x.jsx(DIe,{scope:n,searchRef:D,onItemEnter:M.useCallback(V=>{B(V)&&V.preventDefault()},[B]),onItemLeave:M.useCallback(V=>{var F;B(V)||((F=j.current)==null||F.focus(),A(null))},[B]),onTriggerLeave:M.useCallback(V=>{B(V)&&V.preventDefault()},[B]),pointerGraceTimerRef:I,onPointerGraceIntentChange:M.useCallback(V=>{R.current=V},[]),children:x.jsx(K,{...Z,children:x.jsx(BD,{asChild:!0,trapped:i,onMountAutoFocus:St(a,V=>{var F;V.preventDefault(),(F=j.current)==null||F.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:x.jsx(Py,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:h,children:x.jsx(SIe,{asChild:!0,...w,dir:g.dir,orientation:"vertical",loop:r,currentTabStopId:_,onCurrentTabStopIdChange:A,onEntryFocus:St(c,V=>{g.isUsingKeyboardRef.current||V.preventDefault()}),preventScrollOnEntryFocus:!0,children:x.jsx(MK,{role:"menu","aria-orientation":"vertical","data-state":W2e(k.open),"data-radix-menu-content":"",dir:g.dir,...S,...v,ref:O,style:{outline:"none",...v.style},onKeyDown:St(v.onKeyDown,V=>{const ie=V.target.closest("[data-radix-menu-content]")===V.currentTarget,N=V.ctrlKey||V.altKey||V.metaKey,P=V.key.length===1;ie&&(V.key==="Tab"&&V.preventDefault(),!N&&P&&$(V.key));const G=j.current;if(V.target!==G||!IIe.includes(V.key))return;V.preventDefault();const X=C().filter(ae=>!ae.disabled).map(ae=>ae.ref.current);C2e.includes(V.key)&&X.reverse(),ZIe(X)}),onBlur:St(e.onBlur,V=>{V.currentTarget.contains(V.target)||(window.clearTimeout(T.current),D.current="")}),onPointerMove:St(e.onPointerMove,wy(V=>{const F=V.target,ie=q.current!==V.clientX;if(V.currentTarget.contains(F)&&ie){const N=V.clientX>q.current?"right":"left";U.current=N,q.current=V.clientX}}))})})})})})})});E2e.displayName=ao;var FIe="MenuGroup",eZ=M.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return x.jsx(Jt.div,{role:"group",...r,ref:t})});eZ.displayName=FIe;var BIe="MenuLabel",P2e=M.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return x.jsx(Jt.div,{...r,ref:t})});P2e.displayName=BIe;var lD="MenuItem",ree="menu.itemSelect",Sq=M.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...i}=e,a=M.useRef(null),o=rg(lD,e.__scopeMenu),s=JK(lD,e.__scopeMenu),c=Nn(t,a),l=M.useRef(!1),u=()=>{const d=a.current;if(!n&&d){const f=new CustomEvent(ree,{bubbles:!0,cancelable:!0});d.addEventListener(ree,h=>r==null?void 0:r(h),{once:!0}),due(d,f),f.defaultPrevented?l.current=!1:o.onClose()}};return x.jsx(N2e,{...i,ref:c,disabled:n,onClick:St(e.onClick,u),onPointerDown:d=>{var f;(f=e.onPointerDown)==null||f.call(e,d),l.current=!0},onPointerUp:St(e.onPointerUp,d=>{var f;l.current||(f=d.currentTarget)==null||f.click()}),onKeyDown:St(e.onKeyDown,d=>{const f=s.searchRef.current!=="";n||f&&d.key===" "||AW.includes(d.key)&&(d.currentTarget.click(),d.preventDefault())})})});Sq.displayName=lD;var N2e=M.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:i,...a}=e,o=JK(lD,n),s=L2e(n),c=M.useRef(null),l=Nn(t,c),[u,d]=M.useState(!1),[f,h]=M.useState("");return M.useEffect(()=>{const y=c.current;y&&h((y.textContent??"").trim())},[a.children]),x.jsx(xy.ItemSlot,{scope:n,disabled:r,textValue:i??f,children:x.jsx(CIe,{asChild:!0,...s,focusable:!r,children:x.jsx(Jt.div,{role:"menuitem","data-highlighted":u?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...a,ref:l,onPointerMove:St(e.onPointerMove,wy(y=>{r?o.onItemLeave(y):(o.onItemEnter(y),y.defaultPrevented||y.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:St(e.onPointerLeave,wy(y=>o.onItemLeave(y))),onFocus:St(e.onFocus,()=>d(!0)),onBlur:St(e.onBlur,()=>d(!1))})})})}),HIe="MenuCheckboxItem",R2e=M.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...i}=e;return x.jsx(z2e,{scope:e.__scopeMenu,checked:n,children:x.jsx(Sq,{role:"menuitemcheckbox","aria-checked":uD(n)?"mixed":n,...i,ref:t,"data-state":nZ(n),onSelect:St(i.onSelect,()=>r==null?void 0:r(uD(n)?!0:!n),{checkForDefaultPrevented:!1})})})});R2e.displayName=HIe;var j2e="MenuRadioGroup",[VIe,UIe]=Bh(j2e,{value:void 0,onValueChange:()=>{}}),T2e=M.forwardRef((e,t)=>{const{value:n,onValueChange:r,...i}=e,a=vs(r);return x.jsx(VIe,{scope:e.__scopeMenu,value:n,onValueChange:a,children:x.jsx(eZ,{...i,ref:t})})});T2e.displayName=j2e;var D2e="MenuRadioItem",q2e=M.forwardRef((e,t)=>{const{value:n,...r}=e,i=UIe(D2e,e.__scopeMenu),a=n===i.value;return x.jsx(z2e,{scope:e.__scopeMenu,checked:a,children:x.jsx(Sq,{role:"menuitemradio","aria-checked":a,...r,ref:t,"data-state":nZ(a),onSelect:St(r.onSelect,()=>{var o;return(o=i.onValueChange)==null?void 0:o.call(i,n)},{checkForDefaultPrevented:!1})})})});q2e.displayName=D2e;var tZ="MenuItemIndicator",[z2e,$Ie]=Bh(tZ,{checked:!1}),O2e=M.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...i}=e,a=$Ie(tZ,n);return x.jsx(lo,{present:r||uD(a.checked)||a.checked===!0,children:x.jsx(Jt.span,{...i,ref:t,"data-state":nZ(a.checked)})})});O2e.displayName=tZ;var WIe="MenuSeparator",F2e=M.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return x.jsx(Jt.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});F2e.displayName=WIe;var GIe="MenuArrow",B2e=M.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=Mq(n);return x.jsx(SK,{...i,...r,ref:t})});B2e.displayName=GIe;var KIe="MenuSub",[bGe,H2e]=Bh(KIe),V0="MenuSubTrigger",V2e=M.forwardRef((e,t)=>{const n=Hh(V0,e.__scopeMenu),r=rg(V0,e.__scopeMenu),i=H2e(V0,e.__scopeMenu),a=JK(V0,e.__scopeMenu),o=M.useRef(null),{pointerGraceTimerRef:s,onPointerGraceIntentChange:c}=a,l={__scopeMenu:e.__scopeMenu},u=M.useCallback(()=>{o.current&&window.clearTimeout(o.current),o.current=null},[]);return M.useEffect(()=>u,[u]),M.useEffect(()=>{const d=s.current;return()=>{window.clearTimeout(d),c(null)}},[s,c]),x.jsx(XK,{asChild:!0,...l,children:x.jsx(N2e,{id:i.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":i.contentId,"data-state":W2e(n.open),...e,ref:ms(t,i.onTriggerChange),onClick:d=>{var f;(f=e.onClick)==null||f.call(e,d),!(e.disabled||d.defaultPrevented)&&(d.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:St(e.onPointerMove,wy(d=>{a.onItemEnter(d),!d.defaultPrevented&&!e.disabled&&!n.open&&!o.current&&(a.onPointerGraceIntentChange(null),o.current=window.setTimeout(()=>{n.onOpenChange(!0),u()},100))})),onPointerLeave:St(e.onPointerLeave,wy(d=>{var h,y;u();const f=(h=n.content)==null?void 0:h.getBoundingClientRect();if(f){const v=(y=n.content)==null?void 0:y.dataset.side,k=v==="right",g=k?-5:5,S=f[k?"left":"right"],w=f[k?"right":"left"];a.onPointerGraceIntentChange({area:[{x:d.clientX+g,y:d.clientY},{x:S,y:f.top},{x:w,y:f.top},{x:w,y:f.bottom},{x:S,y:f.bottom}],side:v}),window.clearTimeout(s.current),s.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(d),d.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:St(e.onKeyDown,d=>{var h;const f=a.searchRef.current!=="";e.disabled||f&&d.key===" "||AIe[r.dir].includes(d.key)&&(n.onOpenChange(!0),(h=n.content)==null||h.focus(),d.preventDefault())})})})});V2e.displayName=V0;var U2e="MenuSubContent",$2e=M.forwardRef((e,t)=>{const n=A2e(ao,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=Hh(ao,e.__scopeMenu),o=rg(ao,e.__scopeMenu),s=H2e(U2e,e.__scopeMenu),c=M.useRef(null),l=Nn(t,c);return x.jsx(xy.Provider,{scope:e.__scopeMenu,children:x.jsx(lo,{present:r||a.open,children:x.jsx(xy.Slot,{scope:e.__scopeMenu,children:x.jsx(QK,{id:s.contentId,"aria-labelledby":s.triggerId,...i,ref:l,align:"start",side:o.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:u=>{var d;o.isUsingKeyboardRef.current&&((d=c.current)==null||d.focus()),u.preventDefault()},onCloseAutoFocus:u=>u.preventDefault(),onFocusOutside:St(e.onFocusOutside,u=>{u.target!==s.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:St(e.onEscapeKeyDown,u=>{o.onClose(),u.preventDefault()}),onKeyDown:St(e.onKeyDown,u=>{var h;const d=u.currentTarget.contains(u.target),f=_Ie[o.dir].includes(u.key);d&&f&&(a.onOpenChange(!1),(h=s.trigger)==null||h.focus(),u.preventDefault())})})})})})});$2e.displayName=U2e;function W2e(e){return e?"open":"closed"}function uD(e){return e==="indeterminate"}function nZ(e){return uD(e)?"indeterminate":e?"checked":"unchecked"}function ZIe(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function XIe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function YIe(e,t,n){const i=t.length>1&&Array.from(t).every(l=>l===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let o=XIe(e,Math.max(a,0));i.length===1&&(o=o.filter(l=>l!==n));const c=o.find(l=>l.toLowerCase().startsWith(i.toLowerCase()));return c!==n?c:void 0}function JIe(e,t){const{x:n,y:r}=e;let i=!1;for(let a=0,o=t.length-1;a<t.length;o=a++){const s=t[a],c=t[o],l=s.x,u=s.y,d=c.x,f=c.y;u>r!=f>r&&n<(d-l)*(r-u)/(f-u)+l&&(i=!i)}return i}function QIe(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return JIe(n,t)}function wy(e){return t=>t.pointerType==="mouse"?e(t):void 0}var G2e=I2e,K2e=XK,Z2e=_2e,X2e=E2e,Y2e=eZ,J2e=P2e,Q2e=Sq,efe=R2e,tfe=T2e,nfe=q2e,rfe=O2e,ife=F2e,afe=B2e,ofe=V2e,sfe=$2e,rZ="ContextMenu",[eAe]=xs(rZ,[bq]),Xi=bq(),[tAe,cfe]=eAe(rZ),lfe=e=>{const{__scopeContextMenu:t,children:n,onOpenChange:r,dir:i,modal:a=!0}=e,[o,s]=M.useState(!1),c=Xi(t),l=vs(r),u=M.useCallback(d=>{s(d),l(d)},[l]);return x.jsx(tAe,{scope:t,open:o,onOpenChange:u,modal:a,children:x.jsx(G2e,{...c,dir:i,open:o,onOpenChange:u,modal:a,children:n})})};lfe.displayName=rZ;var ufe="ContextMenuTrigger",dfe=M.forwardRef((e,t)=>{const{__scopeContextMenu:n,disabled:r=!1,...i}=e,a=cfe(ufe,n),o=Xi(n),s=M.useRef({x:0,y:0}),c=M.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...s.current})}),l=M.useRef(0),u=M.useCallback(()=>window.clearTimeout(l.current),[]),d=f=>{s.current={x:f.clientX,y:f.clientY},a.onOpenChange(!0)};return M.useEffect(()=>u,[u]),M.useEffect(()=>void(r&&u()),[r,u]),x.jsxs(x.Fragment,{children:[x.jsx(K2e,{...o,virtualRef:c}),x.jsx(Jt.span,{"data-state":a.open?"open":"closed","data-disabled":r?"":void 0,...i,ref:t,style:{WebkitTouchCallout:"none",...e.style},onContextMenu:r?e.onContextMenu:St(e.onContextMenu,f=>{u(),d(f),f.preventDefault()}),onPointerDown:r?e.onPointerDown:St(e.onPointerDown,mm(f=>{u(),l.current=window.setTimeout(()=>d(f),700)})),onPointerMove:r?e.onPointerMove:St(e.onPointerMove,mm(u)),onPointerCancel:r?e.onPointerCancel:St(e.onPointerCancel,mm(u)),onPointerUp:r?e.onPointerUp:St(e.onPointerUp,mm(u))})]})});dfe.displayName=ufe;var nAe="ContextMenuPortal",hfe=e=>{const{__scopeContextMenu:t,...n}=e,r=Xi(t);return x.jsx(Z2e,{...r,...n})};hfe.displayName=nAe;var ffe="ContextMenuContent",pfe=M.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=cfe(ffe,n),a=Xi(n),o=M.useRef(!1);return x.jsx(X2e,{...a,...r,ref:t,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:s=>{var c;(c=e.onCloseAutoFocus)==null||c.call(e,s),!s.defaultPrevented&&o.current&&s.preventDefault(),o.current=!1},onInteractOutside:s=>{var c;(c=e.onInteractOutside)==null||c.call(e,s),!s.defaultPrevented&&!i.modal&&(o.current=!0)},style:{...e.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)"}})});pfe.displayName=ffe;var rAe="ContextMenuGroup",iAe=M.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=Xi(n);return x.jsx(Y2e,{...i,...r,ref:t})});iAe.displayName=rAe;var aAe="ContextMenuLabel",oAe=M.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=Xi(n);return x.jsx(J2e,{...i,...r,ref:t})});oAe.displayName=aAe;var sAe="ContextMenuItem",yfe=M.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=Xi(n);return x.jsx(Q2e,{...i,...r,ref:t})});yfe.displayName=sAe;var cAe="ContextMenuCheckboxItem",lAe=M.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=Xi(n);return x.jsx(efe,{...i,...r,ref:t})});lAe.displayName=cAe;var uAe="ContextMenuRadioGroup",dAe=M.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=Xi(n);return x.jsx(tfe,{...i,...r,ref:t})});dAe.displayName=uAe;var hAe="ContextMenuRadioItem",fAe=M.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=Xi(n);return x.jsx(nfe,{...i,...r,ref:t})});fAe.displayName=hAe;var pAe="ContextMenuItemIndicator",yAe=M.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=Xi(n);return x.jsx(rfe,{...i,...r,ref:t})});yAe.displayName=pAe;var gAe="ContextMenuSeparator",gfe=M.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=Xi(n);return x.jsx(ife,{...i,...r,ref:t})});gfe.displayName=gAe;var mAe="ContextMenuArrow",vAe=M.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=Xi(n);return x.jsx(afe,{...i,...r,ref:t})});vAe.displayName=mAe;var kAe="ContextMenuSubTrigger",xAe=M.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=Xi(n);return x.jsx(ofe,{...i,...r,ref:t})});xAe.displayName=kAe;var wAe="ContextMenuSubContent",bAe=M.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=Xi(n);return x.jsx(sfe,{...i,...r,ref:t,style:{...e.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)"}})});bAe.displayName=wAe;function mm(e){return t=>t.pointerType!=="mouse"?e(t):void 0}var MAe=lfe,SAe=dfe,CAe=hfe,mfe=pfe,vfe=yfe,kfe=gfe;const LAe=MAe,IAe=SAe,xfe=M.forwardRef(({className:e,...t},n)=>x.jsx(CAe,{children:x.jsx(mfe,{ref:n,className:Ze("z-50 min-w-[10rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md 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",e),...t})}));xfe.displayName=mfe.displayName;const Co=M.forwardRef(({className:e,...t},n)=>x.jsx(vfe,{ref:n,className:Ze("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled]:pointer-events-none data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground data-[disabled]:opacity-50",e),...t}));Co.displayName=vfe.displayName;const U0=M.forwardRef(({className:e,...t},n)=>x.jsx(kfe,{ref:n,className:Ze("-mx-1 my-1 h-px bg-border",e),...t}));U0.displayName=kfe.displayName;const _W=({className:e,...t})=>x.jsx("span",{className:Ze("ml-auto pl-4 text-xs tracking-widest text-muted-foreground",e),...t});_W.displayName="ContextMenuShortcut";const AAe=[".png",".jpg",".jpeg",".gif",".webp",".svg"],_Ae=400,EW={width:200,height:200},EAe=e=>{const t=e.lastIndexOf(".");return t>=0?e.slice(t).toLowerCase():""},PAe=e=>{if(e.type.startsWith("image/")){const t=e.type.slice(6).toLowerCase();if(t==="png"||t==="jpeg"||t==="jpg"||t==="gif"||t==="webp"||t==="svg+xml")return!0}return AAe.includes(EAe(e.name))},NAe=e=>{if(!e)return null;const t=e.files;if(!t||t.length===0)return null;for(let n=0;n<t.length;n++){const r=t.item(n);if(r&&PAe(r))return r}return null},RAe=(e,t=_Ae)=>{if(e.width<=0||e.height<=0)return{...EW};const n=Math.max(e.width,e.height);if(n<=t)return{width:Math.round(e.width),height:Math.round(e.height)};const r=t/n;return{width:Math.round(e.width*r),height:Math.round(e.height*r)}},jAe=async e=>{const t=NAe(e.dataTransfer);if(!t||!e.rfInstance)return!1;const n=e.rfInstance.screenToFlowPosition(e.clientPos),r=await e.computeDims(t);return e.dispatch({file:t,position:{x:n.x-r.width/2,y:n.y-r.height/2},dims:r,originalFilename:t.name}),!0},TAe=e=>new Promise(t=>{let n=null;const r=a=>{n&&URL.revokeObjectURL(n),t(a)};try{n=URL.createObjectURL(e)}catch{t({...EW});return}const i=new Image;i.onload=()=>{r(RAe({width:i.naturalWidth,height:i.naturalHeight}))},i.onerror=()=>{r({...EW})},i.src=n}),DAe=24,qAe=e=>({type:yy.ArrowClosed,width:18,height:18,...e?{color:e}:{}}),zAe={http:{},event:{strokeDasharray:"6 4"},queue:{strokeDasharray:"2 4"},default:{}},OAe={solid:{},dashed:{strokeDasharray:"6 4"},dotted:{strokeDasharray:"2 4"}},FAe=3,iee=new WeakMap,BAe=(e,t,n=!1)=>{const r=iee.get(e);if(r&&r.isAdjacentToRunning===t&&r.selected===n)return r.edge;const i=e.style?OAe[e.style]:zAe[e.kind],a=dr(e.color,"edge"),o=e.borderSize??2,s=n?Math.max(FAe,o):o,l={...i,...a,...n?{strokeWidth:s,opacity:1}:{strokeWidth:s}},u=e.direction??"forward",d=a.stroke,f=qAe(d),h=u==="backward"||u==="both"?f:void 0,y=u==="forward"||u==="both"?f:void 0,v={id:e.id,source:e.source,target:e.target,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle,type:"editableEdge",label:e.label,animated:t,data:{kind:e.kind,path:e.path,sourceHandleAutoPicked:e.sourceHandleAutoPicked,targetHandleAutoPicked:e.targetHandleAutoPicked,sourcePin:e.sourcePin,targetPin:e.targetPin,fontSize:e.fontSize},style:l,markerStart:h,markerEnd:y,interactionWidth:DAe};return iee.set(e,{isAdjacentToRunning:t,selected:n,edge:v}),v},iZ=3,aee=17,PW=(e,t)=>{if(!e)return{};const n={};for(const r of t)e[r]!==void 0&&(n[r]=e[r]);return n},HAe=["borderColor","backgroundColor","borderSize","borderStyle","fontSize","cornerRadius"],VAe=["borderColor","backgroundColor","borderSize","borderStyle","fontSize"],UAe=["fontSize"],$Ae=["borderColor","borderWidth","borderStyle"];function oee(e,t,n){if(e==="text")return{shape:e,width:t.width,height:t.height,fontSize:aee,...PW(n,UAe)};const r=e==="ellipse"?VAe:HAe;return{shape:e,width:t.width,height:t.height,borderSize:iZ,fontSize:aee,...PW(n,r)}}function WAe(e,t,n){return{path:e,width:t.width,height:t.height,borderWidth:iZ,...PW(n,$Ae)}}const see=40,cee=e=>{if("clientX"in e)return{clientX:e.clientX,clientY:e.clientY};const t=e.changedTouches[0]??e.touches[0];return t?{clientX:t.clientX,clientY:t.clientY}:null},GAe=(e,t)=>{var r;const n=document.elementsFromPoint(e,t);for(const i of n){const a=(r=i.closest)==null?void 0:r.call(i,".react-flow__node");if(a)return a}return null},wfe=15,xO=(e,t,n)=>{const r=GAe(t,n);if(r)return r;if(!e)return null;let i=null,a=wfe;const o=e.querySelectorAll(".react-flow__node");for(const s of o){const c=s.getBoundingClientRect();if(c.width===0||c.height===0)continue;const l=Math.max(c.left-t,0,t-c.right),u=Math.max(c.top-n,0,n-c.bottom),d=Math.hypot(l,u);d<=a&&(i=s,a=d)}return i};function lee(e,t,n,r,i){if(e==="source"?(r==null?void 0:r.targetPin)!==void 0||(r==null?void 0:r.targetHandleAutoPicked)===!1:(r==null?void 0:r.sourcePin)!==void 0||(r==null?void 0:r.sourceHandleAutoPicked)===!1)return;const o=e==="source"?n:t,s=e==="source"?t:n,c=i(o),l=i(s);if(!c||!l)return;const u=c.measured.width??c.width??0,d=c.measured.height??c.height??0,f=l.measured.width??l.width??0,h=l.measured.height??l.height??0;if(u===0||d===0||f===0||h===0)return;const y={x:c.internals.positionAbsolute.x,y:c.internals.positionAbsolute.y,w:u,h:d},v={x:l.internals.positionAbsolute.x+f/2,y:l.internals.positionAbsolute.y+h/2};return u6e(y,ZT(y,v))}function KAe(e,t,n,r){if(r===null)return"no-op";const i=e==="source"?t:n;return r===(e==="source"?n:t)?"self-loop":r===i?"pin-own":"reconnect-and-pin"}const ZAe=(e,t)=>{if(!t)return e;const n=t.data?{...e.data,...t.data}:e.data;return{...e,...t,data:n}},XAe=(e,t)=>t?{...e,...t}:e,YAe={playNode:vLe,stateNode:OLe,shapeNode:PLe,imageNode:dLe,iconNode:oLe,htmlNode:eLe},JAe={editableEdge:jCe},QAe={zIndex:0},e_e=8,uee=(e,t)=>e?typeof e=="string"?`url('#${e}')`:`url('#${`${t?`${t}__`:""}${Object.keys(e).sort().map(i=>`${i}=${e[i]}`).join("&")}`}')`:void 0,t_e=e=>function({fromX:n,fromY:r,toX:i,toY:a,fromPosition:o,toPosition:s,connectionLineStyle:c}){const l=qt(ie=>e.current?ie.edges.find(N=>N.reconnectable===!0)??null:null),u=l==null?void 0:l.data,d=qt(ie=>{var P;const N=ie.connection;return((P=N==null?void 0:N.fromHandle)==null?void 0:P.nodeId)??null}),f=qt(ie=>l!=null&&l.source?ie.nodeLookup.get(l.source)??null:null),h=qt(ie=>l!=null&&l.target?ie.nodeLookup.get(l.target)??null:null),y=qt(ie=>d?ie.nodeLookup.get(d)??null:null),v=(l==null?void 0:l.source)===d,k=l?v?f:h:y,g=v?h:f,S=v?u==null?void 0:u.sourcePin:u==null?void 0:u.targetPin,w=v?u==null?void 0:u.sourceHandleAutoPicked:u==null?void 0:u.targetHandleAutoPicked;let C=n,_=r,A=o;if(k){const ie=k.measured.width??k.width??0,N=k.measured.height??k.height??0;if(ie>0&&N>0){const P={x:k.internals.positionAbsolute.x,y:k.internals.positionAbsolute.y,w:ie,h:N};let G=null;if(S)G=XT(P,S);else if(w!==!1&&g){const J=g.measured.width??g.width??0,X=g.measured.height??g.height??0;if(J>0&&X>0){const ae={x:g.internals.positionAbsolute.x+J/2,y:g.internals.positionAbsolute.y+X/2};G=ZT(P,ae)}}G&&(C=G.x,_=G.y,A=dee[G.side])}}const j=qt(ie=>ie.transform[2]),O=qt(ie=>ie.nodeLookup),T=qt(ie=>{var N;return((N=ie.connection.toHandle)==null?void 0:N.nodeId)??null});let D=i,I=a,R=s;if(j>0){const ie=wfe/j,N=l?v?l.target:l.source:null;let P=null;if(T&&T!==N){const G=O.get(T)??null;G&&(P=G)}if(!P){let G=ie;for(const J of O.values()){if(N&&J.id===N||k&&J.id===k.id)continue;const X=J.measured.width??J.width??0,ae=J.measured.height??J.height??0;if(X===0||ae===0)continue;const re=J.internals.positionAbsolute.x,fe=J.internals.positionAbsolute.y,ke=Math.max(re-i,0,i-(re+X)),Ne=Math.max(fe-a,0,a-(fe+ae)),je=Math.hypot(ke,Ne);je<=G&&(G=je,P=J)}}if(!P&&l&&k){const G=k.measured.width??k.width??0,J=k.measured.height??k.height??0;if(G>0&&J>0){const X=k.internals.positionAbsolute.x,ae=k.internals.positionAbsolute.y,re=Math.max(X-i,0,i-(X+G)),fe=Math.max(ae-a,0,a-(ae+J));Math.hypot(re,fe)<=ie&&(P=k)}}if(P){const G=P.measured.width??P.width??0,J=P.measured.height??P.height??0;if(G>0&&J>0){const X=lW({x:P.internals.positionAbsolute.x,y:P.internals.positionAbsolute.y,w:G,h:J},{x:i,y:a}),ae=XT({x:P.internals.positionAbsolute.x,y:P.internals.positionAbsolute.y,w:G,h:J},X);D=ae.x,I=ae.y,R=dee[ae.side]}}}const U=(u==null?void 0:u.path)==="step",[q]=U?vy({sourceX:C,sourceY:_,sourcePosition:A,targetX:D,targetY:I,targetPosition:R,borderRadius:e_e}):yq({sourceX:C,sourceY:_,sourcePosition:A,targetX:D,targetY:I,targetPosition:R}),K=(l==null?void 0:l.style)??c??void 0,Z=qt(ie=>ie.rfId),$=v?l==null?void 0:l.markerStart:l==null?void 0:l.markerEnd,B=v?l==null?void 0:l.markerEnd:l==null?void 0:l.markerStart,V=uee($,Z),F=uee(B,Z);return x.jsx("path",{d:q,fill:"none",className:"react-flow__connection-path",style:K,markerStart:V,markerEnd:F})},dee={top:tt.Top,right:tt.Right,bottom:tt.Bottom,left:tt.Left};function n_e({storeApiRef:e}){const t=Yn();return M.useEffect(()=>(e.current=t,()=>{e.current===t&&(e.current=null)}),[t,e]),null}function r_e({wrapperRef:e}){const t=qt(r=>r.transform[2]),n=e.current;return n&&n.style.setProperty("--rf-zoom",String(t)),null}const i_e=new Set(["INPUT","TEXTAREA","SELECT"]),bfe=e=>e?i_e.has(e.tagName)?!0:e instanceof HTMLElement&&e.isContentEditable:!1;function a_e(e){const{event:t,selectedNodeIds:n,hasClipboard:r,activeElement:i,onCopySelection:a,onPasteSelection:o}=e;if(!(t.metaKey||t.ctrlKey)||t.shiftKey||t.altKey)return!1;const s=t.key.toLowerCase();return s!=="c"&&s!=="v"||bfe(i)?!1:s==="c"?n.length===0||!a?!1:(t.preventDefault(),a([...n]),!0):!r||!o?!1:(t.preventDefault(),o(),!0)}const hee=(e,t)=>{var n;return((n=e==null?void 0:e[t])==null?void 0:n.status)??"idle"},o_e=(e,t)=>{var n;return(n=e==null?void 0:e[t])==null?void 0:n.status},s_e=(e,t)=>{var n,r;return((n=e==null?void 0:e[t])==null?void 0:n.status)==="error"?(r=e[t])==null?void 0:r.error:void 0};function c_e({projectId:e,nodes:t,connectors:n,selectedNodeIds:r,selectedConnectorIds:i,onSelectionChange:a,runs:o,statusByNode:s,onPlayNode:c,nodeOverrides:l,connectorOverrides:u,onNodePositionChange:d,onNodePositionsChange:f,onNodeResize:h,onMultiResize:y,onNodeNameChange:v,onNodeDescriptionChange:k,onConnectorLabelChange:g,onCreateShapeNode:S,onCreateImageFromFile:w,onRetryImageUpload:C,onCreateHtmlNode:_,onCreateConnector:A,onReconnectConnector:j,onReorderNode:O,onDeleteNode:T,onCopyNode:D,onPasteAt:I,hasClipboard:R,onCopySelection:U,onPasteSelection:q,selectedNodes:K,selectedConnectors:Z,onStyleNode:$,onStyleNodePreview:B,onStyleNodes:V,onStyleNodesPreview:F,onStyleConnector:ie,onStyleConnectorPreview:N,onRfInit:P,onTidy:G,onNodeClick:J,onConnectorClick:X,onPaneClick:ae,onCreateAndConnectFromPane:re,pendingEditNodeId:fe,iconPickerOpen:ke,onOpenIconPicker:Ne,onCloseIconPicker:je,onPickIcon:Re,onRequestIconReplace:$e,onPinEndpoint:ee,onUnpinEndpoint:qe,onToggleNodeLock:Ke,activeShape:_e,onSelectShape:Se}){const ot=M.useRef(null),Qe=M.useRef(null),Pe=M.useRef(null),Ie=_e,ye=Se,wt=M.useRef(new Map),Me=M.useCallback((ve,be)=>(wt.current.set(ve,be),()=>{wt.current.get(ve)===be&&wt.current.delete(ve)}),[]),[Ce,De]=M.useState(!1),Ve=M.useRef(!1);M.useEffect(()=>{Ve.current=Ce},[Ce]);const nt=M.useRef(!1),rt=M.useRef(!1),Pt=M.useRef(!1),[it,at]=M.useState(null),ft=M.useRef(null);M.useEffect(()=>{ft.current=it},[it]),M.useCallback(()=>{at(null)},[]);const Ot=M.useMemo(()=>t_e(Pt),[]),ht=M.useRef(null),Ht=M.useRef(null),Lt=M.useCallback(ve=>{const be=ot.current;if(!be){ht.current=ve;return}const We=ht.current;if(We&&We!==ve){const Ue=be.querySelector(`.react-flow__node[data-id="${CSS.escape(We)}"]`);Ue==null||Ue.removeAttribute("data-connect-source")}if(ve){const Ue=be.querySelector(`.react-flow__node[data-id="${CSS.escape(ve)}"]`);Ue==null||Ue.setAttribute("data-connect-source","true")}ht.current=ve},[]),Nt=M.useCallback(ve=>{const be=ot.current,We=Ht.current;if(We!==ve){if(be&&We){const Ue=be.querySelector(`.react-flow__node[data-id="${CSS.escape(We)}"]`);Ue==null||Ue.removeAttribute("data-connect-target")}if(be&&ve){const Ue=be.querySelector(`.react-flow__node[data-id="${CSS.escape(ve)}"]`);Ue==null||Ue.setAttribute("data-connect-target","true")}Ht.current=ve}},[]),un=M.useCallback(()=>{Lt(null),Nt(null)},[Lt,Nt]);M.useEffect(()=>{if(!Ce){Nt(null);return}const ve=be=>{const We=xO(ot.current,be.clientX,be.clientY),Ue=(We==null?void 0:We.getAttribute("data-id"))??null;if(Ue&&Ue===ht.current){Nt(null);return}Nt(Ue)};return document.addEventListener("pointermove",ve),()=>{document.removeEventListener("pointermove",ve)}},[Ce,Nt]);const[jt,Ct]=M.useState(null),[Vt,Rr]=M.useState(null),wn=M.useRef(null),jr=M.useRef(null),Hn=M.useRef(null),gt=M.useRef(!1);M.useEffect(()=>{wn.current=Ie},[Ie]);const rr=M.useCallback(()=>{ye(null),Ct(null),Rr(null),wn.current=null,jr.current=null,Hn.current=null,gt.current=!1},[ye]);M.useEffect(()=>{const ve=be=>{var Ye,_t;if(be.key!=="Escape"||bfe(document.activeElement))return;if(wn.current){be.preventDefault(),rr();return}if(Ve.current){be.preventDefault(),nt.current=!0,rt.current=!0;try{(Ye=Pe.current)==null||Ye.getState().cancelConnection()}catch{}document.dispatchEvent(new MouseEvent("mouseup",{bubbles:!0,cancelable:!0,button:0})),De(!1);return}if(ft.current){be.preventDefault(),at(null);return}const We=Tn.current.size>0,Ue=sr.current.size>0;(We||Ue)&&(be.preventDefault(),(_t=or.current)==null||_t.call(or,[],[]))};return window.addEventListener("keydown",ve),()=>window.removeEventListener("keydown",ve)},[rr]),M.useEffect(()=>{const ve=be=>{a_e({event:be,selectedNodeIds:r,hasClipboard:!!R,activeElement:document.activeElement,onCopySelection:U,onPasteSelection:q})};return window.addEventListener("keydown",ve),()=>window.removeEventListener("keydown",ve)},[r,R,U,q]);const Di=M.useCallback(ve=>{var Ue,Ye;if(!wn.current)return;const be=ve.target;if(!(be!=null&&be.classList.contains("react-flow__pane")))return;const We={x:ve.clientX,y:ve.clientY};gt.current=!0,jr.current=We,Hn.current=We,Ct(We),Rr(We);try{(Ye=(Ue=ve.currentTarget).setPointerCapture)==null||Ye.call(Ue,ve.pointerId)}catch{}ve.preventDefault(),ve.stopPropagation()},[]),Qr=M.useCallback(ve=>{if(!gt.current)return;const be={x:ve.clientX,y:ve.clientY};Hn.current=be,Rr(be)},[]),ir=M.useCallback(ve=>{var dt,Tt;if(!gt.current)return;gt.current=!1;try{(Tt=(dt=ve.currentTarget).releasePointerCapture)==null||Tt.call(dt,ve.pointerId)}catch{}const be=jr.current,We=Hn.current,Ue=wn.current,Ye=Qe.current;if(rr(),!be||!We||!Ue||!Ye)return;const _t=Math.min(be.x,We.x),ut=Math.min(be.y,We.y),Et=Math.max(be.x,We.x),Yt=Math.max(be.y,We.y),yn=Et-_t,L=Yt-ut,H=Ye.screenToFlowPosition({x:_t,y:ut}),se=Ye.screenToFlowPosition({x:Et,y:Yt}),he=se.x-H.x,we=se.y-H.y,Te=yn<see||L<see,He=Te?sD[Ue].width:he,pt=Te?sD[Ue].height:we;S==null||S(Ue,H,{width:He,height:pt})},[rr,S]),rn=M.useRef(!1),bn=M.useRef(!1),Mn=M.useCallback(ve=>{bn.current=ve},[]),ei=!!O||!!T||!!D||!!I||!!qe,[Rn,pr]=M.useState(null),[Jn,br]=M.useState(!1),[Mr,ar]=M.useState(null),[Tr,Sr]=M.useState(null),jn=M.useRef(null),ci=M.useRef(null);M.useEffect(()=>{if(!Rn)return;const ve=ci.current;if(!ve)return;const be=new MouseEvent("contextmenu",{clientX:Rn.x,clientY:Rn.y,bubbles:!0,cancelable:!0,button:2,buttons:2});ve.dispatchEvent(be)},[Rn]);const qi=M.useCallback(ve=>{const be=jn.current;!be||!O||O(be,ve)},[O]),$a=M.useCallback(()=>{const ve=jn.current;!ve||!T||T(ve)},[T]),zi=M.useCallback(()=>{const ve=jn.current;!ve||!D||D(ve)},[D]),Wa=M.useCallback(()=>{const ve=jn.current;!ve||!$e||$e(ve)},[$e]),ma=M.useCallback(()=>{if(!Ke)return;const ve=jn.current,be=ve?[ve]:[...r];be.length!==0&&Ke(be)},[Ke,r]);M.useCallback((ve,be,We,Ue,Ye)=>{jn.current=null,br(!1),ar(null),Sr({connectorId:ve,kind:be,pinned:We}),pr({x:Ue,y:Ye})},[]);const Ga=M.useCallback(()=>{const ve=Tr;!ve||!qe||qe(ve.connectorId,ve.kind)},[Tr,qe]),ti=M.useCallback(()=>{if(!I)return;const ve=Rn,be=Qe.current;if(!ve||!be)return;const We=be.screenToFlowPosition({x:ve.x,y:ve.y});I(We)},[Rn,I]),Ka=typeof navigator<"u"&&/Mac|iPhone|iPad|iPod/.test(navigator.platform||navigator.userAgent||""),$o=Ka?"⌘C":"Ctrl+C",fo=Ka?"⌘V":"Ctrl+V",gi=M.useMemo(()=>new Set(r),[r]),po=M.useMemo(()=>{const ve=new Set;for(const be of t)be.data.locked===!0&&ve.add(be.id);return ve},[t]),Dr=M.useMemo(()=>new Set(i),[i]),li=M.useMemo(()=>{if(r.length<2)return[];const ve=l,be=[];for(const We of r){const Ue=t.find(Et=>Et.id===We);if(!Ue)continue;const Ye=ve==null?void 0:ve[We],_t=(Ye==null?void 0:Ye.data)??{},ut=Ue.data;be.push({id:We,position:(Ye==null?void 0:Ye.position)??Ue.position,data:{width:_t.width??ut.width,height:_t.height??ut.height,locked:_t.locked??ut.locked}})}return be},[t,l,r]),va=K??[],ni=M.useMemo(()=>{const ve=Ye=>{const _t={id:Ye.id,type:Ye.type,position:Ye.position,data:{...Ye.data,projectId:e,onRetryUpload:C,status:o_e(o,Ye.id),errorMessage:s_e(o,Ye.id),statusReport:s==null?void 0:s[Ye.id],onPlay:c,onResize:h,setResizing:Mn,onNameChange:(()=>{if(!(Ye.type==="shapeNode"&&Ye.data.shape==="ellipse"))return v})(),onDescriptionChange:(()=>{if(Ye.type==="shapeNode"){const ut=Ye.data.shape;return ut==="rectangle"||ut==="ellipse"||ut==="sticky"?k:void 0}if(!(Ye.type==="imageNode"||Ye.type==="iconNode"))return k})(),autoEditOnMount:fe===Ye.id?!0:void 0},selected:gi.has(Ye.id)};return Ye.data.width!==void 0&&(_t.width=Ye.data.width),Ye.data.height!==void 0&&(_t.height=Ye.data.height),gi.has(Ye.id)||(_t.connectable=!1),Ye.data.locked===!0&&(_t.draggable=!1),_t},be=t.map(Ye=>ve(ZAe(Ye,l==null?void 0:l[Ye.id]))),We=new Set(t.map(Ye=>Ye.id)),Ue=[];if(l)for(const[Ye,_t]of Object.entries(l)){if(We.has(Ye))continue;const ut=_t;typeof ut.type!="string"||!ut.position||!ut.data||Ue.push(ve({...ut,id:Ye}))}return[...be,...Ue]},[e,t,gi,o,s,c,h,Mn,l,v,k,C,fe]),[on,mi]=M.useState(ni);M.useEffect(()=>{rn.current||bn.current||mi(ni)},[ni]),M.useEffect(()=>{Dn.current=on},[on]);const Tn=M.useRef(gi);M.useEffect(()=>{Tn.current=gi},[gi]);const or=M.useRef(a);M.useEffect(()=>{or.current=a},[a]);const sr=M.useRef(Dr);M.useEffect(()=>{sr.current=Dr},[Dr]);const Dn=M.useRef(ni),qr=M.useRef(!1),zr=M.useRef(new Set),Sn=M.useRef(new Set),Za=M.useRef(new Set),yo=M.useRef(new Set),zt=M.useRef(null),go=M.useCallback(ve=>{var se;const be=qr.current?Za.current:(se=zt.current)!=null&&se.shift?zt.current.nodeIds:null,We=be&&be.size>0?ve.filter(he=>he.type!=="select"?!0:!(he.selected===!1&&be.has(he.id))):ve,Ue=new Set;for(const he of We)he.type==="select"&&Ue.add(he.id);const Ye=ghe(We,Dn.current),_t=Tn.current,ut=qr.current||_t.size===0?Ye:Ye.map(he=>_t.has(he.id)&&!Ue.has(he.id)&&!he.selected?{...he,selected:!0}:he);if(Dn.current=ut,mi(ut),Ue.size===0)return;if(qr.current){for(const he of We)he.type==="select"&&(he.selected?zr.current.add(he.id):zr.current.delete(he.id));return}const Et=or.current;if(!Et)return;const Yt=ut.filter(he=>he.selected).map(he=>he.id),yn=Tn.current;yn.size===Yt.length&&Yt.every(he=>yn.has(he))||(Tn.current=new Set(Yt),Et(Yt,[...sr.current]))},[]),Or=M.useRef([]),vi=M.useCallback(ve=>{var L;const be=qr.current?yo.current:(L=zt.current)!=null&&L.shift?zt.current.edgeIds:null,We=be&&be.size>0?ve.filter(H=>H.type!=="select"?!0:!(H.selected===!1&&be.has(H.id))):ve,Ue=new Set;for(const H of We)H.type==="select"&&Ue.add(H.id);if(Ue.size===0)return;if(qr.current){for(const H of We)H.type==="select"&&(H.selected?Sn.current.add(H.id):Sn.current.delete(H.id));return}const Ye=or.current;if(!Ye)return;const ut=mhe(We,Or.current).filter(H=>H.selected).map(H=>H.id),Et=sr.current;Et.size===ut.length&&ut.every(H=>Et.has(H))||(sr.current=new Set(ut),Ye([...Tn.current],ut))},[]),Ji=M.useCallback(ve=>{qr.current=!0;const be=zt.current,We=(be==null?void 0:be.shift)??(ve.shiftKey||ve.metaKey||ve.ctrlKey);Za.current=We?new Set((be==null?void 0:be.nodeIds)??Tn.current):new Set,yo.current=We?new Set((be==null?void 0:be.edgeIds)??sr.current):new Set,zr.current=new Set(Za.current),Sn.current=new Set(yo.current)},[]),Wo=M.useCallback(()=>{qr.current=!1,zt.current=null;const ve=or.current;if(!ve)return;const be=[...zr.current],We=new Set(be),Ue=new Set(Sn.current);for(const Yt of Or.current)We.has(Yt.source)&&We.has(Yt.target)&&Ue.add(Yt.id);const Ye=Tn.current,_t=sr.current,ut=Ye.size===We.size&&be.every(Yt=>Ye.has(Yt)),Et=_t.size===Ue.size&&[...Ue].every(Yt=>_t.has(Yt));ut&&Et||(Tn.current=new Set(be),sr.current=new Set(Ue),ve(be,[...Ue]))},[]),Ls=M.useCallback(ve=>{if(zt.current=null,wn.current||ve.button!==0)return;const be=ve.target;be!=null&&be.classList.contains("react-flow__pane")&&(zt.current={shift:ve.shiftKey||ve.metaKey||ve.ctrlKey,nodeIds:new Set(Tn.current),edgeIds:new Set(sr.current)})},[]),ml=M.useCallback(ve=>{if(Tn.current.size<2)return;const We=ve.target;We!==ci.current&&(We!=null&&We.closest(".seeflow-connector-endpoint-dot")||(ve.preventDefault(),ve.stopPropagation(),jn.current=null,br(!0),ar(null),Sr(null),pr({x:ve.clientX,y:ve.clientY})))},[]),vl=M.useCallback(ve=>{const be=ve.dataTransfer;if(!be)return;const We=be.types?Array.from(be.types):[],Ue=We.includes("Files"),Ye=We.includes(AJ);if(!(!(Ue&&w)&&!(Ye&&_))){ve.preventDefault();try{be.dropEffect="copy"}catch{}}},[w,_]),dc=M.useCallback(ve=>{const be=ve.dataTransfer;if((be!=null&&be.types?Array.from(be.types):[]).includes(AJ)&&_){ve.preventDefault();const _t=Qe.current;if(!_t)return;const ut=_t.screenToFlowPosition({x:ve.clientX,y:ve.clientY});_({position:ut});return}if(!w)return;const Ye={x:ve.clientX,y:ve.clientY};ve.preventDefault(),jAe({dataTransfer:be,clientPos:Ye,rfInstance:Qe.current,computeDims:TAe,dispatch:w})},[w,_]),ka=!!j,Is=Dr.size===1?[...Dr][0]:null,Qi=M.useMemo(()=>{const ve=Et=>{const Yt=hee(o,Et.source)==="running"||hee(o,Et.target)==="running",yn=Dr.has(Et.id),L=BAe(Et,Yt,yn);yn&&(L.selected=!0);const H=ka&&Et.id===Is,se=H?{...L,reconnectable:!0}:L;return{...se,data:{...se.data,onLabelChange:g,reconnectable:H,registerEditHandle:Me}}},be=new Set(n.map(Et=>Et.id)),We=n.map(Et=>ve(XAe(Et,u==null?void 0:u[Et.id]))),Ue=[];if(u)for(const[Et,Yt]of Object.entries(u)){if(be.has(Et))continue;const yn=Yt;typeof yn.source!="string"||typeof yn.target!="string"||typeof yn.kind!="string"||Ue.push(ve({...yn,id:Et}))}const Ye=[...We,...Ue],_t=[],ut=[];for(const Et of Ye)Dr.has(Et.id)?ut.push(Et):_t.push(Et);return[..._t,...ut]},[n,o,Dr,Is,u,g,ka,Me]);M.useEffect(()=>{Or.current=Qi},[Qi]);const mo=M.useRef(!1),xa=M.useRef(null),te=M.useCallback(ve=>{var Et;if(!A)return;const{source:be,target:We}=ve;if(!be||!We||be===We)return;mo.current=!0;const Ue=((Et=xa.current)==null?void 0:Et.nodeId)??null,Ye=Ue!==null&&Ue===We&&Ue!==be;A(Ye?We:be,Ye?be:We)},[A]),de=M.useCallback(ve=>{const be=We=>{if(!We)return!1;const Ue=Dn.current.find(Ye=>Ye.id===We);return Ue?Ue.type==="shapeNode"&&Ue.data.shape==="text":!1};return!be(ve.source)&&!be(ve.target)},[]),ge=M.useCallback((ve,be)=>{var L;De(!1),un();const We=mo.current;if(mo.current=!1,We||Pt.current)return;if(nt.current){nt.current=!1;return}if(!A)return;const Ue=(L=be.fromNode)==null?void 0:L.id,Ye=be.fromHandle;if(!Ue||!Ye)return;const _t=cee(ve);if(!_t)return;const ut=xO(ot.current,_t.clientX,_t.clientY);if(!ut)return;const Et=ut.getAttribute("data-id");if(!Et||Et===Ue||!de({source:Ue,target:Et,sourceHandle:null,targetHandle:null}))return;let Yt;const yn=Qe.current;if(yn){const H=yn.getInternalNode(Et);if(H){const se=H.measured.width??H.width??0,he=H.measured.height??H.height??0;if(se>0&&he>0){const we=yn.screenToFlowPosition({x:_t.clientX,y:_t.clientY});Yt=lW({x:H.internals.positionAbsolute.x,y:H.internals.positionAbsolute.y,w:se,h:he},we)}}}A(Ue,Et,Yt?{targetPin:Yt}:void 0)},[A,un,de]),pe=M.useRef(!1),ce=M.useCallback((ve,be)=>{if(!j)return;const{source:We,target:Ue,sourceHandle:Ye,targetHandle:_t}=be;if(!We||!Ue||We===Ue)return;const ut={};if(We!==ve.source&&(ut.source=We),Ue!==ve.target&&(ut.target=Ue),typeof Ye=="string"&&Ye!==ve.sourceHandle&&(ut.sourceHandle=Ye),typeof _t=="string"&&_t!==ve.targetHandle&&(ut.targetHandle=_t),ut.source===void 0&&ut.target===void 0&&ut.sourceHandle===void 0&&ut.targetHandle===void 0)return;(ut.source!==void 0||ut.sourceHandle!==void 0)&&(ut.sourceHandleAutoPicked=!1),(ut.target!==void 0||ut.targetHandle!==void 0)&&(ut.targetHandleAutoPicked=!1);const Et=Qe.current;if(!(ut.source===void 0&&ut.target===void 0)&&Et){const yn=ut.source!==void 0?"source":"target",L=lee(yn,ve.source,ve.target,ve.data,H=>Et.getInternalNode(H)??null);L&&(yn==="source"?ut.targetPin=L:ut.sourcePin=L)}pe.current=!0,j(ve.id,ut)},[j]),Oe=M.useCallback((ve,be,We,Ue)=>{var pt;De(!1),un(),Pt.current=!1;const Ye=pe.current;if(pe.current=!1,Ye)return;if(rt.current){rt.current=!1;return}if(!j)return;const _t=cee(ve);let ut=((pt=Ue.toNode)==null?void 0:pt.id)??null;if(!ut&&_t){const dt=xO(ot.current,_t.clientX,_t.clientY);ut=(dt==null?void 0:dt.getAttribute("data-id"))??null}const Et=We==="source"?"target":"source",Yt=KAe(Et,be.source,be.target,ut);if(Yt==="no-op"||Yt==="self-loop"||!_t)return;const yn=Qe.current;if(!yn)return;const L=Yt==="pin-own"?Et==="source"?be.source:be.target:ut,H=yn.getInternalNode(L);if(!H)return;const se=H.measured.width??H.width??0,he=H.measured.height??H.height??0;if(se===0||he===0)return;const we=yn.screenToFlowPosition({x:_t.clientX,y:_t.clientY}),Te=lW({x:H.internals.positionAbsolute.x,y:H.internals.positionAbsolute.y,w:se,h:he},we);if(Yt==="pin-own"){if(!ee)return;ee(be.id,Et,Te);return}const He=lee(Et,be.source,be.target,be.data,dt=>yn.getInternalNode(dt)??null);Et==="source"?j(be.id,{source:ut,sourceHandle:null,sourceHandleAutoPicked:!1,sourcePin:Te,...He?{targetPin:He}:{}}):j(be.id,{target:ut,targetHandle:null,targetHandleAutoPicked:!1,targetPin:Te,...He?{sourcePin:He}:{}})},[j,un,ee]),lt=M.useMemo(()=>{var Et;if(!jt||!Vt)return null;const ve=(Et=ot.current)==null?void 0:Et.getBoundingClientRect(),be=(ve==null?void 0:ve.left)??0,We=(ve==null?void 0:ve.top)??0,Ue=Math.min(jt.x,Vt.x),Ye=Math.min(jt.y,Vt.y),_t=Math.abs(Vt.x-jt.x),ut=Math.abs(Vt.y-jt.y);return{left:Ue-be,top:Ye-We,width:_t,height:ut}},[jt,Vt]),ct=Ie?Zhe(Ie):"",pn=Ie?Xhe(Ie):void 0,yr=Ie==="text",[gr,Vn]=M.useState(!1),[mr,ki]=M.useState(!1);M.useEffect(()=>{const ve=Ue=>{if(!Ue)return!1;const Ye=Ue.tagName;return Ye==="INPUT"||Ye==="TEXTAREA"||Ye==="SELECT"?!0:Ue instanceof HTMLElement&&Ue.isContentEditable},be=Ue=>{Ue.code==="Space"&&(ve(document.activeElement)||(Ue.preventDefault(),Vn(!0)))},We=Ue=>{Ue.code==="Space"&&(Vn(!1),ki(!1))};return window.addEventListener("keydown",be),window.addEventListener("keyup",We),()=>{window.removeEventListener("keydown",be),window.removeEventListener("keyup",We)}},[]);const xi=M.useCallback(ve=>{if(ve.length!==0){if(ve.length===1){const be=ve[0];be&&d&&d(be.id,{x:be.position.x,y:be.position.y});return}if(f){f(ve.map(be=>({id:be.id,position:{x:be.position.x,y:be.position.y}})));return}if(d)for(const be of ve)d(be.id,{x:be.position.x,y:be.position.y})}},[d,f]),vt=M.useCallback((ve,be,We)=>{rn.current=!1,xi(We)},[xi]),tn=M.useCallback(()=>{rn.current=!0},[]),xt=M.useCallback((ve,be)=>{rn.current=!1,xi(be)},[xi]),nn=M.useCallback((ve,be)=>{J==null||J(be.id)},[J]),Qn=M.useCallback(ve=>{ae==null||ae()},[ae]),ri=M.useCallback((ve,be)=>{X==null||X(be.id)},[X]),ea=Ie?"crosshair":gr?mr?"grabbing":"grab":void 0;return x.jsxs("div",{"data-testid":"seeflow-canvas",ref:ot,className:"relative h-full w-full",style:ea?{cursor:ea}:void 0,onPointerDownCapture:Ls,onPointerDown:ve=>{gr&&ki(!0),Di(ve)},onPointerMove:Qr,onPointerUp:ve=>{ki(!1),ir(ve)},onPointerCancel:()=>{gt.current=!1,jr.current=null,Hn.current=null,Ct(null),Rr(null),ki(!1)},onContextMenuCapture:ml,onDragOver:vl,onDrop:dc,children:[x.jsxs(tCe,{nodes:on,edges:Qi,onNodesChange:go,nodeTypes:YAe,edgeTypes:JAe,proOptions:{hideAttribution:!0},fitView:!0,nodesDraggable:!!d&&!Ie,nodesConnectable:!!A&&!Ie,className:Ce?"seeflow-connecting":void 0,onConnect:te,isValidConnection:de,onConnectStart:(ve,be)=>{De(!0),mo.current=!1,xa.current={nodeId:be.nodeId??null,handleType:be.handleType??null},Lt(be.nodeId??null)},onConnectEnd:ge,onReconnect:j?ce:void 0,onReconnectStart:(ve,be,We)=>{De(!0),pe.current=!1,Pt.current=!0;const Ue=We==="source"?be.source:be.target;Lt(Ue)},onReconnectEnd:Oe,connectionLineComponent:Ot,connectionLineStyle:{strokeWidth:2},connectionRadius:32,reconnectRadius:10,edgesReconnectable:!1,elevateNodesOnSelect:!1,elementsSelectable:!Ie,selectNodesOnDrag:!1,nodeClickDistance:5,selectionOnDrag:!Ie,panOnDrag:Ie?!1:[1,2],selectionMode:Lf.Partial,selectionKeyCode:null,multiSelectionKeyCode:Ie?null:["Meta","Shift"],panActivationKeyCode:Ie?null:"Space",onSelectionStart:Ji,onSelectionEnd:Wo,defaultEdgeOptions:QAe,zoomOnDoubleClick:!1,onInit:ve=>{Qe.current=ve;const be=ot.current;be&&be.style.setProperty("--rf-zoom",String(ve.getZoom())),P==null||P(ve)},onMove:(ve,be)=>{ft.current&&at(null);const We=ot.current;We&&We.style.setProperty("--rf-zoom",String(be.zoom))},onEdgesChange:vi,onNodeDragStart:()=>{rn.current=!0},onNodeDragStop:vt,onSelectionDragStart:tn,onSelectionDragStop:xt,onNodeClick:nn,onEdgeClick:ri,onEdgeDoubleClick:(ve,be)=>{var We;(We=wt.current.get(be.id))==null||We()},onPaneClick:Qn,onNodeContextMenu:ei?(ve,be)=>{ve.preventDefault(),jn.current=be.id,br(!0),ar(be.type??null),Sr(null),pr({x:ve.clientX,y:ve.clientY})}:void 0,onPaneContextMenu:I?ve=>{ve.preventDefault(),jn.current=null,br(!1),ar(null),Sr(null),pr({x:ve.clientX,y:ve.clientY})}:void 0,children:[x.jsx(n_e,{storeApiRef:Pe}),x.jsx(r_e,{wrapperRef:ot}),x.jsx(uCe,{gap:12,size:.6}),x.jsxs(mCe,{showInteractive:!1,showFitView:!1,children:[x.jsx(F2,{"data-testid":"controls-fit-view","aria-label":"Fit view",title:"Fit view",disabled:t.length===0,onClick:()=>{var ve;(ve=Qe.current)==null||ve.fitView({padding:.15,duration:300,includeHiddenNodes:!1})},children:x.jsx(mp,{className:"h-3 w-3","aria-hidden":"true"})}),x.jsx(F2,{"data-testid":"controls-tidy","aria-label":"Tidy layout (⌘⇧L)",title:"Tidy layout (⌘⇧L)",disabled:!G,onClick:()=>G==null?void 0:G(),children:x.jsx(yp,{className:"h-3 w-3","aria-hidden":"true"})})]}),x.jsx(VLe,{selectedNodes:li,onMultiResize:y}),S||$||ie?x.jsx(Gy,{position:"top-left",children:x.jsxs("div",{className:"flex flex-col gap-2",children:[S?x.jsx(c6e,{activeShape:Ie,onSelectShape:ye,iconPickerOpen:ke??!1,onOpenIconPicker:Ne,onCloseIconPicker:je,onPickIcon:Re}):null,$&&ie?x.jsx(hIe,{nodes:va,connectors:Z??[],onStyleNode:$,onStyleNodePreview:B,onStyleNodes:V,onStyleNodesPreview:F,onStyleConnector:ie,onStyleConnectorPreview:N,onRequestIconReplace:$e}):null]})}):null]}),lt?x.jsx("div",{"data-testid":"canvas-draw-ghost","data-ghost-shape":Ie??void 0,"aria-hidden":!0,className:Ze("pointer-events-none absolute z-10",ct,yr?"rounded-sm border border-dashed border-muted-foreground/40":""),style:{...pn,left:lt.left,top:lt.top,width:lt.width,height:lt.height},children:(()=>{const ve=Ie?WK[Ie]:void 0;return ve?x.jsx(ve,{width:lt.width,height:lt.height,borderColor:dr(void 0,"node").borderColor,backgroundColor:Zy,borderSize:iZ}):null})()}):null,ei?x.jsxs(LAe,{onOpenChange:ve=>{ve||(pr(null),jn.current=null,ar(null),Sr(null))},children:[x.jsx(IAe,{asChild:!0,children:x.jsx("div",{ref:ci,"data-testid":"node-context-menu-trigger","aria-hidden":!0,className:"pointer-events-none fixed",style:{left:(Rn==null?void 0:Rn.x)??0,top:(Rn==null?void 0:Rn.y)??0,width:0,height:0}})}),x.jsxs(xfe,{"data-testid":"node-context-menu",children:[Tr!=null&&Tr.pinned&&qe?x.jsx(Co,{"data-testid":"connector-endpoint-context-menu-unpin",onSelect:Ga,children:"Unpin"}):null,Jn&&D?x.jsxs(Co,{"data-testid":"node-context-menu-copy",onSelect:zi,children:["Copy",x.jsx(_W,{children:$o})]}):null,I?x.jsxs(Co,{"data-testid":"node-context-menu-paste",disabled:!R,onSelect:ti,children:["Paste",x.jsx(_W,{children:fo})]}):null,Jn&&(D||I)&&(Mr==="iconNode"&&$e||O||T)?x.jsx(U0,{}):null,Jn&&Mr==="iconNode"&&$e?x.jsx(Co,{"data-testid":"node-context-menu-change-icon",onSelect:Wa,children:"Change icon"}):null,Jn&&Mr==="iconNode"&&$e&&(O||T)?x.jsx(U0,{}):null,Jn&&O?x.jsxs(x.Fragment,{children:[x.jsx(Co,{"data-testid":"node-context-menu-to-front",onSelect:()=>qi({op:"toFront"}),children:"Bring to front"}),x.jsx(Co,{"data-testid":"node-context-menu-forward",onSelect:()=>qi({op:"forward"}),children:"Bring forward"}),x.jsx(Co,{"data-testid":"node-context-menu-backward",onSelect:()=>qi({op:"backward"}),children:"Send backward"}),x.jsx(Co,{"data-testid":"node-context-menu-to-back",onSelect:()=>qi({op:"toBack"}),children:"Send to back"})]}):null,Jn&&O&&(Ke||T)?x.jsx(U0,{}):null,Jn&&Ke?(()=>{const ve=jn.current,be=ve?[ve]:r,We=be.length>0&&be.every(Ue=>po.has(Ue))?"Unlock":"Lock";return x.jsx(Co,{"data-testid":"node-context-menu-toggle-lock",onSelect:ma,disabled:be.length===0,children:We})})():null,Jn&&Ke&&T?x.jsx(U0,{}):null,Jn&&T?x.jsx(Co,{"data-testid":"node-context-menu-delete",onSelect:$a,disabled:jn.current?po.has(jn.current):!1,children:"Delete"}):null]})]}):null,re?x.jsxs(Uf,{open:!!it,onOpenChange:ve=>{ve||at(null)},children:[x.jsx(Kxe,{asChild:!0,children:x.jsx("div",{"data-testid":"drop-popover-anchor","aria-hidden":!0,className:"pointer-events-none fixed",style:{left:(it==null?void 0:it.clientX)??0,top:(it==null?void 0:it.clientY)??0,width:0,height:0}})}),x.jsx(Fh,{"data-testid":"drop-popover",align:"start",side:"bottom",sideOffset:4,className:"w-auto p-1",onOpenAutoFocus:ve=>{ve.preventDefault()},children:x.jsx("div",{role:"menu","aria-label":"Create connected node",className:"flex flex-col gap-0.5",children:s6e.map(({shape:ve,label:be,Icon:We})=>x.jsxs("button",{type:"button",role:"menuitem","data-testid":`drop-popover-shape-${ve}`,onClick:()=>{const Ue=it;Ue&&(re({sourceNodeId:Ue.sourceNodeId,position:{x:Ue.flowX,y:Ue.flowY},shape:ve}),at(null))},className:Ze("flex items-center gap-2 rounded-sm px-2 py-1.5 text-left text-sm","hover:bg-accent hover:text-accent-foreground","focus:bg-accent focus:text-accent-foreground focus:outline-none"),children:[x.jsx(We,{className:"h-4 w-4 text-muted-foreground","aria-hidden":"true"}),x.jsx("span",{children:be})]},ve))})})]}):null]})}const l_e=$D,u_e=WD,Mfe=M.forwardRef(({className:e,...t},n)=>x.jsx(Ry,{className:Ze("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n}));Mfe.displayName=Ry.displayName;const d_e=iue("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),Sfe=M.forwardRef(({side:e="right",className:t,children:n,...r},i)=>x.jsxs(u_e,{children:[x.jsx(Mfe,{}),x.jsxs(Ff,{ref:i,className:Ze(d_e({side:e}),t),...r,children:[n,x.jsxs(zue,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[x.jsx(tf,{className:"h-4 w-4"}),x.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Sfe.displayName=Ff.displayName;const cT=M.forwardRef(({className:e,...t},n)=>x.jsx(GD,{ref:n,className:Ze("text-lg font-semibold text-foreground",e),...t}));cT.displayName=GD.displayName;const NW=M.forwardRef(({className:e,...t},n)=>x.jsx(KD,{ref:n,className:Ze("text-sm text-muted-foreground",e),...t}));NW.displayName=KD.displayName;const Cfe="seeflow:detail-panel-width",b2=380,RW=320,jW=800;function TW(e){return Number.isFinite(e)?e<RW?RW:e>jW?jW:e:b2}function h_e(){if(typeof window>"u")return b2;try{const e=window.localStorage.getItem(Cfe);if(e===null)return b2;const t=Number(e);return!Number.isFinite(t)||t<RW||t>jW?b2:t}catch{return b2}}function f_e(e){if(!(typeof window>"u"))try{const t=TW(e);window.localStorage.setItem(Cfe,String(t))}catch{}}function p_e(e,t,n,r){const i=typeof window>"u"?null:window;if(!i)return;let a=TW(e);const o=c=>{a=TW(e+(t-c.clientX)),n.onWidth(a)},s=()=>{i.removeEventListener("pointermove",o),i.removeEventListener("pointerup",s),i.removeEventListener("pointercancel",s),n.onCommit(a)};i.addEventListener("pointermove",o),i.addEventListener("pointerup",s),i.addEventListener("pointercancel",s)}function y_e(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const g_e=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,m_e=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,v_e={};function fee(e,t){return(v_e.jsx?m_e:g_e).test(e)}const k_e=/[ \t\n\f\r]/g;function x_e(e){return typeof e=="object"?e.type==="text"?pee(e.value):!1:pee(e)}function pee(e){return e.replace(k_e,"")===""}class ig{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}ig.prototype.normal={};ig.prototype.property={};ig.prototype.space=void 0;function Lfe(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new ig(n,r,t)}function DW(e){return e.toLowerCase()}class ya{constructor(t,n){this.attribute=n,this.property=t}}ya.prototype.attribute="";ya.prototype.booleanish=!1;ya.prototype.boolean=!1;ya.prototype.commaOrSpaceSeparated=!1;ya.prototype.commaSeparated=!1;ya.prototype.defined=!1;ya.prototype.mustUseProperty=!1;ya.prototype.number=!1;ya.prototype.overloadedBoolean=!1;ya.prototype.property="";ya.prototype.spaceSeparated=!1;ya.prototype.space=void 0;let w_e=0;const Zt=Vh(),Hr=Vh(),qW=Vh(),et=Vh(),Fn=Vh(),of=Vh(),Pa=Vh();function Vh(){return 2**++w_e}const zW=Object.freeze(Object.defineProperty({__proto__:null,boolean:Zt,booleanish:Hr,commaOrSpaceSeparated:Pa,commaSeparated:of,number:et,overloadedBoolean:qW,spaceSeparated:Fn},Symbol.toStringTag,{value:"Module"})),wO=Object.keys(zW);class aZ extends ya{constructor(t,n,r,i){let a=-1;if(super(t,n),yee(this,"space",i),typeof r=="number")for(;++a<wO.length;){const o=wO[a];yee(this,wO[a],(r&zW[o])===zW[o])}}}aZ.prototype.defined=!0;function yee(e,t,n){n&&(e[t]=n)}function Xf(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const a=new aZ(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[DW(r)]=r,n[DW(a.attribute)]=r}return new ig(t,n,e.space)}const Ife=Xf({properties:{ariaActiveDescendant:null,ariaAtomic:Hr,ariaAutoComplete:null,ariaBusy:Hr,ariaChecked:Hr,ariaColCount:et,ariaColIndex:et,ariaColSpan:et,ariaControls:Fn,ariaCurrent:null,ariaDescribedBy:Fn,ariaDetails:null,ariaDisabled:Hr,ariaDropEffect:Fn,ariaErrorMessage:null,ariaExpanded:Hr,ariaFlowTo:Fn,ariaGrabbed:Hr,ariaHasPopup:null,ariaHidden:Hr,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Fn,ariaLevel:et,ariaLive:null,ariaModal:Hr,ariaMultiLine:Hr,ariaMultiSelectable:Hr,ariaOrientation:null,ariaOwns:Fn,ariaPlaceholder:null,ariaPosInSet:et,ariaPressed:Hr,ariaReadOnly:Hr,ariaRelevant:null,ariaRequired:Hr,ariaRoleDescription:Fn,ariaRowCount:et,ariaRowIndex:et,ariaRowSpan:et,ariaSelected:Hr,ariaSetSize:et,ariaSort:null,ariaValueMax:et,ariaValueMin:et,ariaValueNow:et,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Afe(e,t){return t in e?e[t]:t}function _fe(e,t){return Afe(e,t.toLowerCase())}const b_e=Xf({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:of,acceptCharset:Fn,accessKey:Fn,action:null,allow:null,allowFullScreen:Zt,allowPaymentRequest:Zt,allowUserMedia:Zt,alt:null,as:null,async:Zt,autoCapitalize:null,autoComplete:Fn,autoFocus:Zt,autoPlay:Zt,blocking:Fn,capture:null,charSet:null,checked:Zt,cite:null,className:Fn,cols:et,colSpan:null,content:null,contentEditable:Hr,controls:Zt,controlsList:Fn,coords:et|of,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Zt,defer:Zt,dir:null,dirName:null,disabled:Zt,download:qW,draggable:Hr,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Zt,formTarget:null,headers:Fn,height:et,hidden:qW,high:et,href:null,hrefLang:null,htmlFor:Fn,httpEquiv:Fn,id:null,imageSizes:null,imageSrcSet:null,inert:Zt,inputMode:null,integrity:null,is:null,isMap:Zt,itemId:null,itemProp:Fn,itemRef:Fn,itemScope:Zt,itemType:Fn,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Zt,low:et,manifest:null,max:null,maxLength:et,media:null,method:null,min:null,minLength:et,multiple:Zt,muted:Zt,name:null,nonce:null,noModule:Zt,noValidate:Zt,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Zt,optimum:et,pattern:null,ping:Fn,placeholder:null,playsInline:Zt,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Zt,referrerPolicy:null,rel:Fn,required:Zt,reversed:Zt,rows:et,rowSpan:et,sandbox:Fn,scope:null,scoped:Zt,seamless:Zt,selected:Zt,shadowRootClonable:Zt,shadowRootDelegatesFocus:Zt,shadowRootMode:null,shape:null,size:et,sizes:null,slot:null,span:et,spellCheck:Hr,src:null,srcDoc:null,srcLang:null,srcSet:null,start:et,step:null,style:null,tabIndex:et,target:null,title:null,translate:null,type:null,typeMustMatch:Zt,useMap:null,value:Hr,width:et,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Fn,axis:null,background:null,bgColor:null,border:et,borderColor:null,bottomMargin:et,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Zt,declare:Zt,event:null,face:null,frame:null,frameBorder:null,hSpace:et,leftMargin:et,link:null,longDesc:null,lowSrc:null,marginHeight:et,marginWidth:et,noResize:Zt,noHref:Zt,noShade:Zt,noWrap:Zt,object:null,profile:null,prompt:null,rev:null,rightMargin:et,rules:null,scheme:null,scrolling:Hr,standby:null,summary:null,text:null,topMargin:et,valueType:null,version:null,vAlign:null,vLink:null,vSpace:et,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Zt,disableRemotePlayback:Zt,prefix:null,property:null,results:et,security:null,unselectable:null},space:"html",transform:_fe}),M_e=Xf({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",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",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",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",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",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",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Pa,accentHeight:et,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:et,amplitude:et,arabicForm:null,ascent:et,attributeName:null,attributeType:null,azimuth:et,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:et,by:null,calcMode:null,capHeight:et,className:Fn,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:et,diffuseConstant:et,direction:null,display:null,dur:null,divisor:et,dominantBaseline:null,download:Zt,dx:null,dy:null,edgeMode:null,editable:null,elevation:et,enableBackground:null,end:null,event:null,exponent:et,externalResourcesRequired:null,fill:null,fillOpacity:et,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:of,g2:of,glyphName:of,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:et,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:et,horizOriginX:et,horizOriginY:et,id:null,ideographic:et,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:et,k:et,k1:et,k2:et,k3:et,k4:et,kernelMatrix:Pa,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:et,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:et,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:et,overlineThickness:et,paintOrder:null,panose1:null,path:null,pathLength:et,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Fn,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:et,pointsAtY:et,pointsAtZ:et,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Pa,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Pa,rev:Pa,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Pa,requiredFeatures:Pa,requiredFonts:Pa,requiredFormats:Pa,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:et,specularExponent:et,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:et,strikethroughThickness:et,string:null,stroke:null,strokeDashArray:Pa,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:et,strokeOpacity:et,strokeWidth:null,style:null,surfaceScale:et,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Pa,tabIndex:et,tableValues:null,target:null,targetX:et,targetY:et,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Pa,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:et,underlineThickness:et,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:et,values:null,vAlphabetic:et,vMathematical:et,vectorEffect:null,vHanging:et,vIdeographic:et,version:null,vertAdvY:et,vertOriginX:et,vertOriginY:et,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:et,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Afe}),Efe=Xf({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),Pfe=Xf({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:_fe}),Nfe=Xf({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),S_e={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},C_e=/[A-Z]/g,gee=/-[a-z]/g,L_e=/^data[-\w.:]+$/i;function I_e(e,t){const n=DW(t);let r=t,i=ya;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&L_e.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(gee,__e);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!gee.test(a)){let o=a.replace(C_e,A_e);o.charAt(0)!=="-"&&(o="-"+o),t="data"+o}}i=aZ}return new i(r,t)}function A_e(e){return"-"+e.toLowerCase()}function __e(e){return e.charAt(1).toUpperCase()}const E_e=Lfe([Ife,b_e,Efe,Pfe,Nfe],"html"),oZ=Lfe([Ife,M_e,Efe,Pfe,Nfe],"svg");function P_e(e){return e.join(" ").trim()}var sZ={},mee=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,N_e=/\n/g,R_e=/^\s*/,j_e=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,T_e=/^:\s*/,D_e=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,q_e=/^[;\s]*/,z_e=/^\s+|\s+$/g,O_e=`
7807
+ M${O.x},${O.y}h${O.width}v${O.height}h${-O.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}Uhe.displayName="MiniMap";M.memo(Uhe);const ECe=e=>t=>e?`${Math.max(1/t.transform[2],1)}`:void 0,PCe={[cl.Line]:"right",[cl.Handle]:"bottom-right"};function NCe({nodeId:e,position:t,variant:n=cl.Handle,className:r,style:i=void 0,children:a,color:o,minWidth:s=10,minHeight:c=10,maxWidth:l=Number.MAX_VALUE,maxHeight:u=Number.MAX_VALUE,keepAspectRatio:d=!1,resizeDirection:f,autoScale:h=!0,shouldResize:y,onResizeStart:v,onResize:k,onResizeEnd:g}){const S=bhe(),w=typeof e=="string"?e:S,C=Yn(),_=M.useRef(null),A=n===cl.Handle,j=qt(M.useCallback(ECe(A&&h),[A,h]),Xn),O=M.useRef(null),T=t??PCe[n];M.useEffect(()=>{if(!(!_.current||!w))return O.current||(O.current=VMe({domNode:_.current,nodeId:w,getStoreItems:()=>{const{nodeLookup:I,transform:R,snapGrid:U,snapToGrid:q,nodeOrigin:K,domNode:Z}=C.getState();return{nodeLookup:I,transform:R,snapGrid:U,snapToGrid:q,nodeOrigin:K,paneDomNode:Z}},onChange:(I,R)=>{const{triggerNodeChanges:U,nodeLookup:q,parentLookup:K,nodeOrigin:Z}=C.getState(),$=[],B={x:I.x,y:I.y},V=q.get(w);if(V&&V.expandParent&&V.parentId){const F=V.origin??Z,ie=I.width??V.measured.width??0,N=I.height??V.measured.height??0,P={id:V.id,parentId:V.parentId,rect:{width:ie,height:N,...Hde({x:I.x??V.position.x,y:I.y??V.position.y},{width:ie,height:N},V.parentId,q,F)}},G=UK([P],q,K,Z);$.push(...G),B.x=I.x?Math.max(F[0]*ie,I.x):void 0,B.y=I.y?Math.max(F[1]*N,I.y):void 0}if(B.x!==void 0&&B.y!==void 0){const F={id:w,type:"position",position:{...B}};$.push(F)}if(I.width!==void 0&&I.height!==void 0){const ie={id:w,type:"dimensions",resizing:!0,setAttributes:f?f==="horizontal"?"width":"height":!0,dimensions:{width:I.width,height:I.height}};$.push(ie)}for(const F of R){const ie={...F,type:"position"};$.push(ie)}U($)},onEnd:({width:I,height:R})=>{const U={id:w,type:"dimensions",resizing:!1,dimensions:{width:I,height:R}};C.getState().triggerNodeChanges([U])}})),O.current.update({controlPosition:T,boundaries:{minWidth:s,minHeight:c,maxWidth:l,maxHeight:u},keepAspectRatio:d,resizeDirection:f,onResizeStart:v,onResize:k,onResizeEnd:g,shouldResize:y}),()=>{var I;(I=O.current)==null||I.destroy()}},[T,s,c,l,u,d,v,k,g,y]);const D=T.split("-");return x.jsx("div",{className:Ur(["react-flow__resize-control","nodrag",...D,n,r]),ref:_,style:{...i,scale:j,...o&&{[A?"backgroundColor":"borderColor"]:o}},children:a})}const jQ=M.memo(NCe),RCe=8,um=10,TQ=(e,t,n)=>{switch(n){case"top":return{cx:e,cy:t-um};case"bottom":return{cx:e,cy:t+um};case"left":return{cx:e-um,cy:t};case"right":return{cx:e+um,cy:t}}},DQ={top:tt.Top,right:tt.Right,bottom:tt.Bottom,left:tt.Left},qQ=e=>{switch(e){case tt.Top:return"top";case tt.Right:return"right";case tt.Bottom:return"bottom";case tt.Left:return"left"}};function jCe({id:e,source:t,target:n,sourceX:r,sourceY:i,targetX:a,targetY:o,sourcePosition:s,targetPosition:c,label:l,style:u,markerEnd:d,markerStart:f,interactionWidth:h,data:y}){const[v,k]=M.useState(!1),g=RQ(t),S=RQ(n),w={x:r,y:i,side:qQ(s)},C={x:a,y:o,side:qQ(c)},_=d6e(g?{box:{x:g.internals.positionAbsolute.x,y:g.internals.positionAbsolute.y,w:g.measured.width??g.width??0,h:g.measured.height??g.height??0},autoPicked:y==null?void 0:y.sourceHandleAutoPicked,pin:y==null?void 0:y.sourcePin,fallback:w}:null,S?{box:{x:S.internals.positionAbsolute.x,y:S.internals.positionAbsolute.y,w:S.measured.width??S.width??0,h:S.measured.height??S.height??0},autoPicked:y==null?void 0:y.targetHandleAutoPicked,pin:y==null?void 0:y.targetPin,fallback:C}:null),A=_.source.x,j=_.source.y,O=DQ[_.source.side],T=_.target.x,D=_.target.y,I=DQ[_.target.side],R=_.source.side,U=_.target.side,q=TQ(A,j,R),K=TQ(T,D,U);M.useEffect(()=>{const re=document.querySelector(`.react-flow__edge[data-id="${CSS.escape(e)}"]`);if(!re)return;const fe=re.querySelector(".react-flow__edgeupdater-source"),ke=re.querySelector(".react-flow__edgeupdater-target");fe&&(fe.setAttribute("cx",String(q.cx)),fe.setAttribute("cy",String(q.cy))),ke&&(ke.setAttribute("cx",String(K.cx)),ke.setAttribute("cy",String(K.cy)))},[e,q.cx,q.cy,K.cx,K.cy]);const[Z,$,B]=(y==null?void 0:y.path)==="step"?vy({sourceX:A,sourceY:j,sourcePosition:O,targetX:T,targetY:D,targetPosition:I,borderRadius:RCe}):yq({sourceX:A,sourceY:j,sourcePosition:O,targetX:T,targetY:D,targetPosition:I}),V=y==null?void 0:y.onLabelChange,F=typeof l=="string"?l:"",ie=!!V,N=y==null?void 0:y.fontSize,P=typeof N=="number"?{fontSize:`${N}px`}:void 0,G=y==null?void 0:y.registerEditHandle;M.useEffect(()=>{if(!(!G||!ie))return G(e,()=>k(!0))},[e,G,ie]);const J=(y==null?void 0:y.reconnectable)===!0,X=(y==null?void 0:y.sourcePin)!==void 0,ae=(y==null?void 0:y.targetPin)!==void 0;return x.jsxs(x.Fragment,{children:[x.jsx(Ky,{id:e,path:Z,style:u,markerEnd:d,markerStart:f,interactionWidth:h}),J?x.jsxs(aCe,{children:[x.jsx("div",{"data-testid":`edge-endpoint-source-${e}`,"data-pinned":X?"true":"false",className:"seeflow-connector-endpoint-dot",style:{transform:`translate(-50%, -50%) translate(${q.cx}px, ${q.cy}px)`}}),x.jsx("div",{"data-testid":`edge-endpoint-target-${e}`,"data-pinned":ae?"true":"false",className:"seeflow-connector-endpoint-dot",style:{transform:`translate(-50%, -50%) translate(${K.cx}px, ${K.cy}px)`}})]}):null,x.jsx(rCe,{children:x.jsx("div",{className:"nodrag nopan nowheel pointer-events-auto absolute",style:{transform:`translate(-50%, -50%) translate(${$}px, ${B}px)`},children:v&&ie?x.jsx(us,{initialValue:F,field:"connector-label",onCommit:re=>V==null?void 0:V(e,re),onExit:()=>k(!1),className:"rounded border border-border/40 bg-background px-1.5 py-0.5 text-[11px] text-foreground shadow-sm",style:P,placeholder:"Label"}):F?x.jsx("button",{type:"button",className:Ze("rounded border border-border/40 bg-background px-1.5 py-0.5 text-[11px] text-foreground shadow-sm",ie?"hover:bg-muted/60":""),style:P,onDoubleClick:ie?re=>{re.stopPropagation(),k(!0)}:void 0,children:F}):ie?x.jsx("button",{type:"button","aria-label":"Add connector label",className:"rounded-full border border-dashed border-muted-foreground/40 bg-background px-1 text-[10px] text-muted-foreground/60 opacity-0 transition-opacity hover:opacity-100 group-hover/canvas:opacity-50",onDoubleClick:re=>{re.stopPropagation(),k(!0)},children:"+"}):null})})]})}function Wf({className:e}){return x.jsx("span",{"data-testid":"node-lock-badge","aria-hidden":"true",className:Ze("absolute -top-2 -right-2 z-10 inline-flex h-4 w-4 items-center justify-center rounded-sm bg-background/90 text-muted-foreground shadow-sm ring-1 ring-border",e),children:x.jsx(gp,{className:"h-2.5 w-2.5",strokeWidth:2.5})})}function gO({message:e,variant:t="muted",className:n}){return x.jsx("div",{"data-testid":"placeholder-card","data-placeholder-variant":t,className:Ze("pointer-events-none flex h-full w-full select-none items-center justify-center px-2 text-center text-xs",t==="destructive"?"text-destructive":"text-muted-foreground",n),children:e})}const $he=8,zQ=12,OQ={height:`${$he}px`,borderColor:"transparent"},FQ={width:`${$he}px`,borderColor:"transparent"},TCe={width:`${zQ}px`,height:`${zQ}px`,background:"transparent",border:"none"},DCe={width:"calc(10px / var(--rf-zoom, 1))",height:"calc(10px / var(--rf-zoom, 1))",background:"hsl(var(--background))",border:"calc(1px / var(--rf-zoom, 1)) solid hsl(var(--primary) / 0.6)",borderRadius:"calc(2px / var(--rf-zoom, 1))",zIndex:1},qCe=[{position:"top",style:OQ},{position:"bottom",style:OQ},{position:"left",style:FQ},{position:"right",style:FQ}],zCe=["top-left","top-right","bottom-left","bottom-right"],BQ={pointerEvents:"none",cursor:"default"};function Gf({visible:e,minWidth:t=80,minHeight:n=40,onResizeStart:r,onResize:i,onResizeEnd:a,cornerVariant:o="invisible"}){const s=o==="visible"?DCe:TCe,c=u=>e?u:{...u,...BQ},l=e?s:{...s,opacity:0,...BQ};return x.jsxs(x.Fragment,{children:[qCe.map(({position:u,style:d})=>x.jsx(jQ,{position:u,variant:cl.Line,minWidth:t,minHeight:n,style:c(d),onResizeStart:r,onResize:i,onResizeEnd:a,children:x.jsx("span",{"data-testid":"resize-control","data-position":u})},u)),zCe.map(u=>x.jsx(jQ,{position:u,variant:cl.Handle,minWidth:t,minHeight:n,style:l,autoScale:!1,onResizeStart:r,onResize:i,onResizeEnd:a,children:x.jsx("span",{"data-testid":"resize-control","data-position":u})},u))]})}function Kf(e){const{onResize:t,onResizeFinal:n,setResizing:r}=e,[i,a]=M.useState(!1),o=M.useRef(null),s=M.useRef(t),c=M.useRef(n),l=M.useRef(r);M.useEffect(()=>{s.current=t},[t]),M.useEffect(()=>{c.current=n},[n]),M.useEffect(()=>{l.current=r},[r]);const u=M.useCallback((h,y)=>{var v;a(!0),(v=l.current)==null||v.call(l,!0),o.current=y?{x:y.x,y:y.y,width:y.width,height:y.height}:null},[]),d=M.useCallback((h,y)=>{var v;(v=s.current)==null||v.call(s,{x:y.x,y:y.y,width:y.width,height:y.height})},[]),f=M.useCallback((h,y)=>{var k,g,S;a(!1),(k=l.current)==null||k.call(l,!1);const v=o.current;o.current=null,!(v&&v.width===y.width&&v.height===y.height)&&((g=s.current)==null||g.call(s,{x:y.x,y:y.y,width:y.width,height:y.height}),v&&((S=c.current)==null||S.call(c,{x:y.x,y:y.y,width:y.width,height:y.height},v)))},[]);return{isResizing:i,onResizeStart:u,onResizeEvent:d,onResizeEnd:f}}const Whe={default:{border:"hsl(var(--border))",background:"hsl(var(--card))",edge:"hsl(var(--muted-foreground))"},slate:{border:"hsl(215, 20%, 40%)",background:"hsl(215, 15%, 15%)",edge:"hsl(215, 16%, 47%)"},blue:{border:"hsl(213, 70%, 55%)",background:"hsl(214, 30%, 14%)",edge:"hsl(217, 91%, 60%)"},green:{border:"hsl(142, 50%, 45%)",background:"hsl(142, 25%, 13%)",edge:"hsl(142, 71%, 45%)"},amber:{border:"hsl(43, 70%, 50%)",background:"hsl(43, 30%, 14%)",edge:"hsl(38, 92%, 50%)"},red:{border:"hsl(0, 70%, 55%)",background:"hsl(0, 25%, 14%)",edge:"hsl(0, 84%, 60%)"},purple:{border:"hsl(270, 60%, 60%)",background:"hsl(270, 20%, 15%)",edge:"hsl(271, 91%, 65%)"},pink:{border:"hsl(330, 60%, 60%)",background:"hsl(330, 20%, 14%)",edge:"hsl(330, 81%, 60%)"}},zp=Whe,Zy="hsl(var(--card))";function dr(e,t){const n=e??"default",r=Whe[n];return t==="edge"?{stroke:r.edge}:t==="text"?n==="default"?{}:{color:r.edge}:{borderColor:r.border,backgroundColor:r.background}}const OCe=new Set(["SCRIPT","STYLE","IFRAME","OBJECT","EMBED","LINK"]),FCe=new Set(["href","src"]),BCe=e=>/^on/i.test(e),HCe=e=>{let t=0;for(;t<e.length&&e.charCodeAt(t)<=32;)t+=1;return e.slice(t,t+11).toLowerCase()==="javascript:"};function VCe(e){if(typeof DOMParser>"u")return"";const t=new DOMParser().parseFromString(`<!doctype html><html><body>${e}</body></html>`,"text/html"),n=t.body,r=t.createTreeWalker(n,1),i=[];let a=r.nextNode();for(;a;){const o=a;if(OCe.has(o.tagName))i.push(o);else for(const s of Array.from(o.attributes)){if(BCe(s.name)){o.removeAttribute(s.name);continue}FCe.has(s.name.toLowerCase())&&HCe(s.value)&&o.removeAttribute(s.name)}a=r.nextNode()}for(const o of i)o.remove();return n.innerHTML}function UCe(e){return{dangerouslySetInnerHTML:{__html:VCe(e)}}}const $Ce="/runtime/tailwind.js",HQ="data-seeflow-tailwind-runtime";function WCe(){if(typeof document>"u"||document.querySelector(`script[${HQ}]`))return;const e=document.createElement("script");e.src=$Ce,e.async=!0,e.setAttribute(HQ,"true"),document.head.appendChild(e)}function Ghe(e,t){return`/api/projects/${encodeURIComponent(e)}/files/${encodeURI(t)}`}const GCe=e=>typeof EventSource>"u"?null:new EventSource(e),dm=new Map;function KCe(e,t){let n=dm.get(e);if(!n){const i=GCe(`/api/events?demoId=${encodeURIComponent(e)}`);if(!i)return()=>{};const a={source:i,listeners:new Set,refCount:0};i.addEventListener("file:changed",o=>{let s;try{s=JSON.parse(o.data).path}catch{return}if(typeof s=="string")for(const c of a.listeners)c(s)}),dm.set(e,a),n=a}return n.listeners.add(t),n.refCount+=1,()=>{const r=dm.get(e);r&&(r.listeners.delete(t),r.refCount-=1,r.refCount===0&&(r.source.close(),dm.delete(e)))}}const h2=new Map,VQ=(e,t)=>`${e}::${t}`;function ZCe(e,t){const[n,r]=M.useState(()=>!e||!t?{kind:"loading"}:h2.get(VQ(e,t))??{kind:"loading"});return M.useEffect(()=>{if(!e||!t){r({kind:"loading"});return}const i=VQ(e,t);let a=!1;const o=h2.get(i);r(o||{kind:"loading"});const s=async()=>{try{const l=await fetch(Ghe(e,t));if(a)return;if(l.status===404){const f={kind:"missing"};h2.set(i,f),r(f);return}if(!l.ok){const f={kind:"error",message:`GET ${t} → ${l.status}`};h2.set(i,f),r(f);return}const u=await l.text();if(a)return;const d={kind:"loaded",html:u};h2.set(i,d),r(d)}catch(l){if(a)return;const u={kind:"error",message:l instanceof Error?l.message:String(l)};h2.set(i,u),r(u)}};s();const c=KCe(e,l=>{l===t&&s()});return()=>{a=!0,c()}},[e,t]),n}const UQ={width:320,height:200},XCe=80,YCe=40,hm="opacity-0 transition-opacity";function JCe({id:e,data:t,selected:n,isConnectable:r}){const{isResizing:i,onResizeStart:a,onResizeEvent:o,onResizeEnd:s}=Kf({onResize:f=>{var h;return(h=t.onResize)==null?void 0:h.call(t,e,f)},setResizing:t.setResizing}),c=i||t.width!==void 0||t.height!==void 0,l={...t.backgroundColor!==void 0?{backgroundColor:dr(t.backgroundColor,"node").backgroundColor}:{},...t.borderColor!==void 0?{borderColor:dr(t.borderColor,"node").borderColor}:{},...t.borderSize!==void 0?{borderWidth:t.borderSize}:{},...t.borderStyle!==void 0?{borderStyle:t.borderStyle}:{},...t.cornerRadius!==void 0?{borderRadius:t.cornerRadius}:{},...t.fontSize!==void 0?{fontSize:`${t.fontSize}px`}:{},...dr(t.textColor,"text"),...c?{}:{width:UQ.width,height:UQ.height}};M.useEffect(()=>{WCe()},[]);const u=ZCe(t.projectId,t.htmlPath);let d;return u.kind==="loaded"?d=x.jsx("div",{"data-testid":"html-node-content",className:"h-full w-full overflow-auto",...UCe(u.html)}):u.kind==="missing"?d=x.jsx(gO,{message:`Missing: ${t.htmlPath}`,variant:"destructive"}):u.kind==="error"?d=x.jsx(gO,{message:`Error: ${u.message}`,variant:"destructive"}):d=x.jsx(gO,{message:"Loading…"}),x.jsxs("div",{className:Ze("group relative overflow-hidden",c?"h-full w-full":""),style:l,"data-testid":"html-node",children:[x.jsx(Gf,{visible:!!n&&!!t.onResize&&!t.locked,cornerVariant:"visible",minWidth:XCe,minHeight:YCe,onResizeStart:a,onResize:o,onResizeEnd:s}),t.locked?x.jsx(Wf,{}):null,x.jsx(Ln,{type:"target",position:tt.Top,id:"t",isConnectable:r,className:Ze(hm,n&&"!opacity-100")}),x.jsx(Ln,{type:"target",position:tt.Left,id:"l",isConnectable:r,className:Ze(hm,n&&"!opacity-100")}),d,x.jsx(Ln,{type:"source",position:tt.Right,id:"r",isConnectable:r,className:Ze(hm,n&&"!opacity-100")}),x.jsx(Ln,{type:"source",position:tt.Bottom,id:"b",isConnectable:r,className:Ze(hm,n&&"!opacity-100")}),t.name!==void 0&&t.name!==""?x.jsx("div",{"data-testid":"html-node-label",className:"-bottom-5 absolute right-0 left-0 truncate text-center text-[11px] text-muted-foreground",children:t.name}):null]})}function QCe(e,t){return e.selected===t.selected&&e.data===t.data&&e.width===t.width&&e.height===t.height}const eLe=M.memo(JCe,QCe),Pf={width:48,height:48},$Q="help-circle",tLe=24,nLe=24,fm="opacity-0 transition-opacity";function rLe(e){return dr(e,"text").color??"currentColor"}const WQ=new Set;function iLe({id:e,data:t,selected:n,isConnectable:r}){const{isResizing:i,onResizeStart:a,onResizeEvent:o,onResizeEnd:s}=Kf({onResize:S=>{var w;return(w=t.onResize)==null?void 0:w.call(t,e,S)},setResizing:t.setResizing}),c=i||t.width!==void 0||t.height!==void 0,l=!!t.onNameChange,[u,d]=M.useState(!1),f=KT[t.icon];!f&&!WQ.has(t.icon)&&(WQ.add(t.icon),console.warn(`[iconNode] Unknown icon "${t.icon}"; falling back to "${$Q}".`));const h=f??KT[$Q],y=rLe(t.color),v=t.strokeWidth??2,k={...c?{}:{width:Pf.width,height:Pf.height}},g=S=>{!l||u||(S.stopPropagation(),d(!0))};return x.jsxs("div",{className:Ze("group relative",c?"h-full w-full":""),style:k,"data-testid":"icon-node",onDoubleClick:g,children:[x.jsx(Gf,{visible:!!n&&!!t.onResize&&!u&&!t.locked,cornerVariant:"visible",minWidth:tLe,minHeight:nLe,onResizeStart:a,onResize:o,onResizeEnd:s}),t.locked?x.jsx(Wf,{}):null,x.jsx(Ln,{type:"target",position:tt.Top,id:"t",isConnectable:r,className:Ze(fm,n&&"!opacity-100")}),x.jsx(Ln,{type:"target",position:tt.Left,id:"l",isConnectable:r,className:Ze(fm,n&&"!opacity-100")}),h?x.jsx(h,{color:y,strokeWidth:v,absoluteStrokeWidth:!0,"aria-label":t.alt,className:"block h-full w-full pointer-events-none select-none"}):null,u&&l?x.jsx("div",{className:"absolute left-0 right-0 top-full mt-1 text-center text-xs text-muted-foreground",children:x.jsx(us,{initialValue:t.name??"",field:"icon-node-label",onCommit:S=>{var w;return(w=t.onNameChange)==null?void 0:w.call(t,e,S)},onExit:()=>d(!1),placeholder:"Label"})}):t.name?x.jsx("span",{"data-testid":"icon-node-label",className:"pointer-events-none absolute left-0 right-0 top-full mt-1 truncate text-center text-xs text-muted-foreground select-none",children:t.name}):null,x.jsx(Ln,{type:"source",position:tt.Right,id:"r",isConnectable:r,className:Ze(fm,n&&"!opacity-100")}),x.jsx(Ln,{type:"source",position:tt.Bottom,id:"b",isConnectable:r,className:Ze(fm,n&&"!opacity-100")})]})}function aLe(e,t){return e.selected===t.selected&&e.data===t.data&&e.width===t.width&&e.height===t.height}const oLe=M.memo(iLe,aLe),GQ={width:200,height:150},sLe=40,cLe=40,pm="opacity-0 transition-opacity";function lLe({id:e,data:t,selected:n,isConnectable:r}){const{isResizing:i,onResizeStart:a,onResizeEvent:o,onResizeEnd:s}=Kf({onResize:u=>{var d;return(d=t.onResize)==null?void 0:d.call(t,e,u)},setResizing:t.setResizing}),c=i||t.width!==void 0||t.height!==void 0,l={backgroundColor:t.backgroundColor!==void 0?dr(t.backgroundColor,"node").backgroundColor:Zy,...t.borderColor!==void 0?{borderColor:dr(t.borderColor,"node").borderColor}:{},...t.borderWidth!==void 0?{borderWidth:t.borderWidth}:{},...t.borderStyle!==void 0?{borderStyle:t.borderStyle}:{},...t.cornerRadius!==void 0?{borderRadius:t.cornerRadius}:{},...c?{}:{width:GQ.width,height:GQ.height}};return x.jsxs("div",{className:Ze("group relative overflow-hidden",c?"h-full w-full":""),style:l,"data-testid":"image-node",children:[x.jsx(Gf,{visible:!!n&&!!t.onResize&&!t.locked,cornerVariant:"visible",minWidth:sLe,minHeight:cLe,onResizeStart:a,onResize:o,onResizeEnd:s}),t.locked?x.jsx(Wf,{}):null,x.jsx(Ln,{type:"target",position:tt.Top,id:"t",isConnectable:r,className:Ze(pm,n&&"!opacity-100")}),x.jsx(Ln,{type:"target",position:tt.Left,id:"l",isConnectable:r,className:Ze(pm,n&&"!opacity-100")}),t._uploading?x.jsx("div",{"data-testid":"image-node-placeholder","data-placeholder":"loading",className:"flex h-full w-full select-none items-center justify-center text-xs text-muted-foreground pointer-events-none",children:"Loading…"}):t._uploadError?x.jsx("button",{type:"button","data-testid":"image-node-placeholder","data-placeholder":"failed",onClick:()=>{var u;return(u=t.onRetryUpload)==null?void 0:u.call(t,e)},title:t._uploadError,className:"flex h-full w-full cursor-pointer select-none items-center justify-center px-2 text-center text-xs text-destructive",children:"Upload failed (click to retry)"}):x.jsx("img",{src:t.projectId?Ghe(t.projectId,t.path):"",alt:t.alt??"",className:"block h-full w-full select-none object-contain pointer-events-none",draggable:!1}),x.jsx(Ln,{type:"source",position:tt.Right,id:"r",isConnectable:r,className:Ze(pm,n&&"!opacity-100")}),x.jsx(Ln,{type:"source",position:tt.Bottom,id:"b",isConnectable:r,className:Ze(pm,n&&"!opacity-100")})]})}function uLe(e,t){return e.selected===t.selected&&e.data===t.data&&e.width===t.width&&e.height===t.height}const dLe=M.memo(lLe,uLe),hLe={ok:"bg-emerald-400",warn:"bg-amber-400",error:"bg-rose-400",pending:"bg-slate-400"};function Khe({state:e,summary:t,"data-testid":n}){return x.jsxs("span",{"data-testid":n,"data-state":e,className:"inline-flex max-w-full items-center gap-1.5 text-[11px] leading-tight text-muted-foreground",children:[x.jsx("span",{"aria-hidden":!0,className:Ze("h-2 w-2 shrink-0 rounded-full",hLe[e])}),t?x.jsx("span",{className:"min-w-0 flex-1 truncate",title:t,children:t}):null]})}const fLe=100,pLe=44,yLe=200;function gLe({id:e,data:t,selected:n,isConnectable:r}){var O;const i=t.status,a=t.playAction,o=t.description??t.kind,s=!!a&&!!t.onPlay,c=i==="running",l=i==="error",u=c?"Running…":l?t.errorMessage?`Failed: ${t.errorMessage}`:"Failed":"Play",{isResizing:d,onResizeStart:f,onResizeEvent:h,onResizeEnd:y}=Kf({onResize:T=>{var D;return(D=t.onResize)==null?void 0:D.call(t,e,T)},setResizing:t.setResizing}),[v,k]=M.useState(null),g=!!t.onNameChange,S=!!t.onDescriptionChange,w=d||t.width!==void 0||t.height!==void 0,C={...t.fontSize!==void 0?{fontSize:`${t.fontSize}px`}:{},...dr(t.textColor,"text")},_=C,A={borderColor:((O=t.statusReport)==null?void 0:O.state)==="error"?dr("red","node").borderColor:dr(t.borderColor,"node").borderColor,backgroundColor:t.backgroundColor!==void 0?dr(t.backgroundColor,"node").backgroundColor:Zy,borderWidth:t.borderSize!==void 0?t.borderSize:void 0,borderStyle:t.borderStyle,borderRadius:t.cornerRadius!==void 0?t.cornerRadius:void 0,...w?{}:{width:yLe}},j=g||S?T=>{if(v!==null)return;const D=T.target;if(!(D!=null&&D.closest(".react-flow__handle"))&&!(D!=null&&D.closest(".react-flow__resize-control"))){if(T.stopPropagation(),D!=null&&D.closest('[data-testid="node-header"]')){g&&k("name");return}if(D!=null&&D.closest('[data-testid="node-content"]')){S?k("description"):g&&k("name");return}S?k("description"):g&&k("name")}}:void 0;return x.jsxs("div",{className:Ze("group flex flex-col justify-center overflow-hidden rounded-lg border-[3px] shadow-sm transition-shadow",w?"h-full w-full":"",c?"seeflow-node-pulse":""),style:A,"data-status":i??"idle","data-testid":"play-node",onDoubleClick:j,children:[x.jsx(Gf,{visible:!!n&&!!t.onResize&&!t.locked,cornerVariant:"visible",minWidth:fLe,minHeight:pLe,onResizeStart:f,onResize:h,onResizeEnd:y}),t.locked?x.jsx(Wf,{}):null,x.jsx(Ln,{type:"target",position:tt.Top,id:"t",isConnectable:r,className:Ze("opacity-0 transition-opacity",n&&"!opacity-100")}),x.jsx(Ln,{type:"target",position:tt.Left,id:"l",isConnectable:r,className:Ze("opacity-0 transition-opacity",n&&"!opacity-100")}),x.jsxs("div",{className:"flex shrink-0 items-center justify-between gap-2 border-b bg-muted/30 px-2 py-2","data-testid":"node-header",children:[x.jsx("div",{className:"min-w-0 flex-1 text-[18px] font-semibold leading-tight",style:C,children:v==="name"&&g?x.jsx(us,{initialValue:t.name,field:"node-name",required:!0,commitMode:"blur-only",onCommit:T=>{var D;return(D=t.onNameChange)==null?void 0:D.call(t,e,T)},onExit:()=>k(null),className:"text-[18px] font-semibold",style:C}):x.jsx("button",{type:"button",className:Ze("block w-full whitespace-pre-wrap break-words bg-transparent p-0 text-left text-[18px] font-semibold leading-tight",g?"hover:opacity-80":""),style:C,children:t.name})}),x.jsx("div",{className:"flex shrink-0 items-center gap-1",children:x.jsx(oi,{type:"button",size:"sm",variant:"secondary",disabled:!s||c,className:Ze("h-8 w-8 rounded-full p-0 hover:bg-primary hover:text-primary-foreground focus-visible:bg-primary focus-visible:text-primary-foreground",l&&"border-2 border-rose-500"),"data-testid":"play-button","data-status":i??"idle","aria-label":u,title:u,onClick:T=>{var D;T.stopPropagation(),(D=t.onPlay)==null||D.call(t,e)},children:c?x.jsx(to,{className:"h-4 w-4 animate-spin","aria-hidden":!0}):x.jsx(wp,{className:"h-4 w-4","aria-hidden":!0})})})]}),x.jsx("div",{className:"flex min-h-0 flex-1 items-center px-2 py-1","data-testid":"node-content","data-resizing":d?"true":void 0,children:v==="description"&&S?x.jsx(us,{initialValue:t.description??"",field:"node-description",multiline:!0,onCommit:T=>{var D;return(D=t.onDescriptionChange)==null?void 0:D.call(t,e,T)},onExit:()=>k(null),className:"w-full text-[18px] text-muted-foreground",style:_,placeholder:t.kind}):x.jsx("button",{type:"button",className:Ze("block w-full whitespace-normal break-words bg-transparent p-0 text-left text-[18px] text-muted-foreground",S?"hover:opacity-80":""),style:_,children:o})}),t.statusReport&&x.jsx("div",{className:"flex items-center px-2 pb-1","data-testid":"play-node-status-badge",children:x.jsx(Khe,{state:t.statusReport.state,summary:t.statusReport.summary,"data-testid":"status-badge"})}),x.jsx(Ln,{type:"source",position:tt.Right,id:"r",isConnectable:r,className:Ze("opacity-0 transition-opacity",n&&"!opacity-100")}),x.jsx(Ln,{type:"source",position:tt.Bottom,id:"b",isConnectable:r,className:Ze("opacity-0 transition-opacity",n&&"!opacity-100")})]})}function mLe(e,t){return e.selected===t.selected&&e.data===t.data&&e.width===t.width&&e.height===t.height}const vLe=M.memo(gLe,mLe),Xy="var(--seeflow-node-border)",Yy="var(--seeflow-node-bg)",Jy=2;function Qy(e){if(e==="dashed")return"6 4";if(e==="dotted")return"2 4"}const KQ=5;function kLe({width:e,height:t,borderColor:n,backgroundColor:r,borderSize:i,borderStyle:a}){const o=n??Xy,s=r??Yy,c=i??Jy,l=Qy(a),u=e-2*KQ,d=u/7,f=u/7*1.5,h=d,y=KQ,v=y+d,k=v+d+f,S=k+f+h+h,w=t*.85,C=[`M ${y} ${w}`,`A ${d} ${d} 0 0 1 ${v+d} ${w}`,`A ${f} ${f} 0 0 1 ${k+f} ${w}`,`A ${h} ${h} 0 0 1 ${S} ${w}`,`L ${S} ${t}`,`L ${y} ${t}`,"Z"].join(" ");return x.jsxs("svg",{width:"100%",height:"100%",viewBox:`0 0 ${e} ${t}`,preserveAspectRatio:"none",role:"img","aria-label":"Cloud","data-testid":"cloud-shape",children:[x.jsx("title",{children:"Cloud"}),x.jsx("path",{d:C,fill:s,stroke:o,strokeWidth:c,strokeDasharray:l})]})}function xLe({width:e,height:t,borderColor:n,backgroundColor:r,borderSize:i,borderStyle:a}){const o=Math.max(6,Math.min(28,t*.12)),s=e/2,c=e/2,l=n??Xy,u=r??Yy,d=i??Jy,f=Qy(a),h=`M 0 ${t-o} A ${s} ${o} 0 0 0 ${e} ${t-o}`;return x.jsxs("svg",{width:"100%",height:"100%",viewBox:`0 0 ${e} ${t}`,preserveAspectRatio:"none",role:"img","aria-label":"Database","data-testid":"database-shape",children:[x.jsx("title",{children:"Database"}),x.jsx("rect",{x:0,y:o,width:e,height:Math.max(0,t-2*o),fill:u}),x.jsx("line",{x1:0,y1:o,x2:0,y2:t-o,stroke:l,strokeWidth:d,strokeDasharray:f}),x.jsx("line",{x1:e,y1:o,x2:e,y2:t-o,stroke:l,strokeWidth:d,strokeDasharray:f}),x.jsx("path",{d:h,fill:u,stroke:l,strokeWidth:d,strokeDasharray:f}),x.jsx("ellipse",{cx:c,cy:o,rx:s,ry:o,fill:u,stroke:l,strokeWidth:d,strokeDasharray:f})]})}function wLe({width:e,height:t,borderColor:n,backgroundColor:r,borderSize:i,borderStyle:a}){const o=n??Xy,s=r??Yy,c=i??Jy,l=Qy(a),u=t/2,d=e*.25,f=e*.5,h=e*.75;return x.jsxs("svg",{width:"100%",height:"100%",viewBox:`0 0 ${e} ${t}`,preserveAspectRatio:"none",role:"img","aria-label":"Queue","data-testid":"queue-shape",children:[x.jsx("title",{children:"Queue"}),x.jsx("rect",{x:0,y:0,width:e,height:t,rx:u,ry:u,fill:s,stroke:o,strokeWidth:c,strokeDasharray:l}),x.jsx("line",{x1:d,y1:0,x2:d,y2:t,stroke:o,strokeWidth:c,strokeDasharray:l}),x.jsx("line",{x1:f,y1:0,x2:f,y2:t,stroke:o,strokeWidth:c,strokeDasharray:l}),x.jsx("line",{x1:h,y1:0,x2:h,y2:t,stroke:o,strokeWidth:c,strokeDasharray:l})]})}const bLe=3;function MLe({width:e,height:t,borderColor:n,backgroundColor:r,borderSize:i,borderStyle:a}){const o=n??Xy,s=r??Yy,c=i??Jy,l=Qy(a),u=t/bLe,d=Math.max(3,Math.min(6,u*.18)),f=e-Math.max(10,d*3),h=Math.min(8,Math.min(e,t)*.06);return x.jsxs("svg",{width:"100%",height:"100%",viewBox:`0 0 ${e} ${t}`,preserveAspectRatio:"none",role:"img","aria-label":"Server","data-testid":"server-shape",children:[x.jsx("title",{children:"Server"}),x.jsx("rect",{x:0,y:0,width:e,height:t,rx:h,ry:h,fill:s,stroke:o,strokeWidth:c,strokeDasharray:l}),x.jsx("line",{x1:0,y1:u,x2:e,y2:u,stroke:o,strokeWidth:c,strokeDasharray:l}),x.jsx("line",{x1:0,y1:u*2,x2:e,y2:u*2,stroke:o,strokeWidth:c,strokeDasharray:l}),x.jsx("circle",{cx:f,cy:u/2,r:d,fill:o}),x.jsx("circle",{cx:f,cy:u+u/2,r:d,fill:o}),x.jsx("circle",{cx:f,cy:u*2+u/2,r:d,fill:o})]})}function SLe({width:e,height:t,borderColor:n,backgroundColor:r,borderSize:i,borderStyle:a}){const o=n??Xy,s=r??Yy,c=i??Jy,l=Qy(a),u=t*.22,d=Math.max(8,Math.min(28,Math.min(e,t)*.18)),f=u+d+Math.max(4,t*.05),h=Math.max(6,e*.1),y=h,v=e-h,k=Math.min((v-y)/2,(t-f)/2,40),g=[`M ${y} ${t}`,`L ${y} ${f+k}`,`A ${k} ${k} 0 0 1 ${y+k} ${f}`,`L ${v-k} ${f}`,`A ${k} ${k} 0 0 1 ${v} ${f+k}`,`L ${v} ${t}`,"Z"].join(" ");return x.jsxs("svg",{width:"100%",height:"100%",viewBox:`0 0 ${e} ${t}`,preserveAspectRatio:"none",role:"img","aria-label":"User","data-testid":"user-shape",children:[x.jsx("title",{children:"User"}),x.jsx("circle",{cx:e/2,cy:u,r:d,fill:s,stroke:o,strokeWidth:c,strokeDasharray:l}),x.jsx("path",{d:g,fill:s,stroke:o,strokeWidth:c,strokeDasharray:l})]})}const WK={database:xLe,server:MLe,user:SLe,queue:wLe,cloud:kLe},CLe=new Set(Object.keys(WK));function LLe(e){return CLe.has(e)}const sD={rectangle:{width:200,height:120},ellipse:{width:200,height:120},sticky:{width:180,height:180},text:{width:160,height:40},database:{width:120,height:140},server:{width:140,height:120},user:{width:100,height:140},queue:{width:220,height:80},cloud:{width:180,height:120}},ILe={rectangle:"rounded-lg border-[3px] bg-transparent",ellipse:"rounded-full border-[3px] bg-transparent",sticky:"rounded-md border-[3px] shadow-md -rotate-1",text:"bg-transparent",database:"",server:"",user:"",queue:"",cloud:""};function Zhe(e){return ILe[e]}function Xhe(e,t){if(e==="text")return{};if(LLe(e))return{};const n=t==null?void 0:t.backgroundColor;let r;n!==void 0?r=dr(n,"node").backgroundColor:e==="sticky"?r=dr("amber","node").backgroundColor:(e==="rectangle"||e==="ellipse")&&(r=Zy);const i=e==="rectangle"||e==="sticky";return{borderColor:dr(t==null?void 0:t.borderColor,"node").borderColor,backgroundColor:r,borderWidth:(t==null?void 0:t.borderSize)!==void 0?t.borderSize:void 0,borderStyle:t==null?void 0:t.borderStyle,borderRadius:i&&(t==null?void 0:t.cornerRadius)!==void 0?t.cornerRadius:void 0}}function ALe(e){return{borderColor:dr(e.borderColor,"node").borderColor,backgroundColor:e.backgroundColor!==void 0?dr(e.backgroundColor,"node").backgroundColor:Zy}}const ym="opacity-0 transition-opacity";function _Le({id:e,data:t,selected:n,isConnectable:r}){const i=t.shape,a=sD[i],{isResizing:o,onResizeStart:s,onResizeEvent:c,onResizeEnd:l}=Kf({onResize:V=>{var F;return(F=t.onResize)==null?void 0:F.call(t,e,V)},setResizing:t.setResizing}),[u,d]=M.useState(()=>t.autoEditOnMount?t.shape==="ellipse"||t.shape==="sticky"||t.shape==="rectangle"&&(t.name===void 0||t.name==="")?"description":"name":null),f=u!==null,h=!!t.onNameChange,y=!!t.onDescriptionChange,v=i==="rectangle",k=i==="ellipse"||i==="sticky",g=t.name!==void 0&&t.name!=="",S=v&&g,w=k||v&&!g,C=o||t.width!==void 0||t.height!==void 0,_=i==="text",A=t.textColor,j=A!==void 0?dr(A,"text"):_?dr(t.borderColor,"text"):{},O={...Xhe(i,t),...t.fontSize!==void 0?{fontSize:`${t.fontSize}px`}:{}},T={...t.fontSize!==void 0?{fontSize:`${t.fontSize}px`}:{},...j},D=C?O:{...O,width:t.width??a.width,height:t.height??a.height},I=h||y?V=>{if(f)return;const F=V.target;if(!(F!=null&&F.closest(".react-flow__handle"))&&!(F!=null&&F.closest(".react-flow__resize-control"))){if(V.stopPropagation(),S){if(F!=null&&F.closest('[data-testid="shape-node-header"]')){h&&d("name");return}y?d("description"):h&&d("name");return}if(w){y?d("description"):h&&d("name");return}h&&d("name")}}:void 0;let R=null;const U=WK[i];if(U){const V=t.width??a.width,F=t.height??a.height,{borderColor:ie,backgroundColor:N}=ALe(t);R=x.jsx("div",{className:"pointer-events-none absolute inset-0",children:x.jsx(U,{width:V,height:F,borderColor:ie,backgroundColor:N,borderSize:t.borderSize,borderStyle:t.borderStyle})})}const q=t.description??"",K=q!=="",Z={...t.fontSize!==void 0?{fontSize:`${t.fontSize}px`}:{},...j};let $;w?$=u==="description"&&y?x.jsx(us,{initialValue:q,field:"node-description",commitMode:"blur-only",onCommit:V=>{var F;return(F=t.onDescriptionChange)==null?void 0:F.call(t,e,V)},onExit:()=>d(null),className:"relative text-[22px]",style:Z,placeholder:"Description"}):x.jsx("button",{type:"button",className:Ze("relative block whitespace-pre-wrap bg-transparent p-0 font-medium leading-tight",K?"break-words":"italic text-muted-foreground/40"),style:Z,children:K?q:""}):$=u==="name"&&h?x.jsx(us,{initialValue:t.name??"",field:"node-label",commitMode:"blur-only",onCommit:V=>{var F;return(F=t.onNameChange)==null?void 0:F.call(t,e,V)},onExit:()=>d(null),className:"relative text-[22px]",style:T,placeholder:_?"Text":"Label"}):x.jsx("button",{type:"button",className:Ze("relative block whitespace-pre-wrap bg-transparent p-0 font-medium leading-tight",t.name?"break-words":"text-muted-foreground/40 italic"),style:T,children:t.name??(_&&h?"Text":"")});const B=x.jsxs(x.Fragment,{children:[x.jsx("div",{className:"relative flex shrink-0 items-center border-b bg-muted/30 px-2 py-1.5","data-testid":"shape-node-header",children:x.jsx("div",{className:"min-w-0 flex-1 whitespace-pre-wrap break-words text-left font-semibold text-[18px] leading-tight",style:T,children:u==="name"&&h?x.jsx(us,{initialValue:t.name??"",field:"node-label",commitMode:"blur-only",onCommit:V=>{var F;return(F=t.onNameChange)==null?void 0:F.call(t,e,V)},onExit:()=>d(null),className:"text-[18px] font-semibold",style:T,placeholder:"Title"}):x.jsx("button",{type:"button",className:Ze("block w-full whitespace-pre-wrap break-words bg-transparent p-0 text-left font-semibold text-[18px] leading-tight",h?"hover:opacity-80":""),style:T,children:t.name})})}),x.jsx("div",{className:"relative flex min-h-0 flex-1 items-center px-2 py-1.5","data-testid":"shape-node-body",children:u==="description"&&y?x.jsx(us,{initialValue:q,field:"node-description",commitMode:"blur-only",onCommit:V=>{var F;return(F=t.onDescriptionChange)==null?void 0:F.call(t,e,V)},onExit:()=>d(null),className:"w-full text-[16px] text-muted-foreground",style:Z,placeholder:"Description"}):x.jsx("button",{type:"button",className:Ze("block w-full whitespace-pre-wrap break-words bg-transparent p-0 text-left text-[16px] leading-tight",K?"text-muted-foreground":"italic text-muted-foreground/40",y?"hover:opacity-80":""),style:Z,children:K?q:y?"Double-click to add description":""})})]});return x.jsxs("div",{className:Ze("group",S?"":"relative",S?"flex flex-col overflow-hidden text-left":"flex items-center justify-center p-2 text-center text-[22px]",C?"h-full w-full":"",Zhe(i)),style:D,"data-testid":"shape-node","data-shape":i,onDoubleClick:I,children:[R,x.jsx(Gf,{visible:!!n&&!!t.onResize&&!f&&!t.locked,cornerVariant:"visible",minWidth:80,minHeight:40,onResizeStart:s,onResize:c,onResizeEnd:l}),t.locked?x.jsx(Wf,{}):null,!_&&x.jsx(Ln,{type:"target",position:tt.Top,id:"t",isConnectable:r,className:Ze(ym,n&&"!opacity-100")}),!_&&x.jsx(Ln,{type:"target",position:tt.Left,id:"l",isConnectable:r,className:Ze(ym,n&&"!opacity-100")}),S?B:$,!_&&x.jsx(Ln,{type:"source",position:tt.Right,id:"r",isConnectable:r,className:Ze(ym,n&&"!opacity-100")}),!_&&x.jsx(Ln,{type:"source",position:tt.Bottom,id:"b",isConnectable:r,className:Ze(ym,n&&"!opacity-100")})]})}function ELe(e,t){return e.selected===t.selected&&e.data===t.data&&e.width===t.width&&e.height===t.height}const PLe=M.memo(_Le,ELe),NLe={running:"bg-amber-950/50 text-amber-300 animate-pulse",done:"bg-emerald-950/50 text-emerald-300",error:"bg-rose-950/50 text-rose-300"};function RLe({status:e,"data-testid":t}){return e==="idle"?null:x.jsx("span",{"data-status":e,"data-testid":t,className:Ze("inline-flex h-4 items-center rounded-full px-1.5 py-0 font-normal text-[9px] uppercase tracking-wide",NLe[e]),children:e})}const jLe=100,TLe=44,DLe=200;function qLe({id:e,data:t,selected:n,isConnectable:r}){var w;const i=t.status??"idle",a=t.description??t.kind,{isResizing:o,onResizeStart:s,onResizeEvent:c,onResizeEnd:l}=Kf({onResize:C=>{var _;return(_=t.onResize)==null?void 0:_.call(t,e,C)},setResizing:t.setResizing}),[u,d]=M.useState(null),f=!!t.onNameChange,h=!!t.onDescriptionChange,y=o||t.width!==void 0||t.height!==void 0,v={...t.fontSize!==void 0?{fontSize:`${t.fontSize}px`}:{},...dr(t.textColor,"text")},k=v,g={borderColor:((w=t.statusReport)==null?void 0:w.state)==="error"?dr("red","node").borderColor:dr(t.borderColor,"node").borderColor,backgroundColor:dr(t.backgroundColor,"node").backgroundColor,borderWidth:t.borderSize!==void 0?t.borderSize:void 0,borderStyle:t.borderStyle,borderRadius:t.cornerRadius!==void 0?t.cornerRadius:void 0,...y?{}:{width:DLe}},S=f||h?C=>{if(u!==null)return;const _=C.target;if(!(_!=null&&_.closest(".react-flow__handle"))&&!(_!=null&&_.closest(".react-flow__resize-control"))){if(C.stopPropagation(),_!=null&&_.closest('[data-testid="node-header"]')){f&&d("name");return}if(_!=null&&_.closest('[data-testid="node-content"]')){h?d("description"):f&&d("name");return}h?d("description"):f&&d("name")}}:void 0;return x.jsxs("div",{className:Ze("group flex flex-col justify-center overflow-hidden rounded-lg border-[3px] border-dashed shadow-sm transition-shadow",y?"h-full w-full":"",i==="running"?"seeflow-node-pulse":""),style:g,"data-status":i,"data-testid":"state-node",onDoubleClick:S,children:[x.jsx(Gf,{visible:!!n&&!!t.onResize&&!t.locked,cornerVariant:"visible",minWidth:jLe,minHeight:TLe,onResizeStart:s,onResize:c,onResizeEnd:l}),t.locked?x.jsx(Wf,{}):null,x.jsx(Ln,{type:"target",position:tt.Top,id:"t",isConnectable:r,className:Ze("opacity-0 transition-opacity",n&&"!opacity-100")}),x.jsx(Ln,{type:"target",position:tt.Left,id:"l",isConnectable:r,className:Ze("opacity-0 transition-opacity",n&&"!opacity-100")}),x.jsxs("div",{className:"flex shrink-0 items-center justify-between gap-2 border-b bg-muted/30 px-2 py-2","data-testid":"node-header",children:[x.jsx("div",{className:"min-w-0 flex-1 text-[18px] font-semibold leading-tight",style:v,children:u==="name"&&f?x.jsx(us,{initialValue:t.name,field:"node-name",required:!0,commitMode:"blur-only",onCommit:C=>{var _;return(_=t.onNameChange)==null?void 0:_.call(t,e,C)},onExit:()=>d(null),className:"text-[18px] font-semibold",style:v}):x.jsx("button",{type:"button",className:Ze("block w-full whitespace-pre-wrap break-words bg-transparent p-0 text-left text-[18px] font-semibold leading-tight",f?"hover:opacity-80":""),style:v,children:t.name})}),x.jsx("div",{className:"flex shrink-0 items-center gap-1",children:x.jsx(RLe,{status:i})})]}),x.jsx("div",{className:"flex min-h-0 flex-1 items-center px-2 py-1","data-testid":"node-content","data-resizing":o?"true":void 0,children:u==="description"&&h?x.jsx(us,{initialValue:t.description??"",field:"node-description",multiline:!0,onCommit:C=>{var _;return(_=t.onDescriptionChange)==null?void 0:_.call(t,e,C)},onExit:()=>d(null),className:"w-full text-[18px] text-muted-foreground",style:k,placeholder:t.kind}):x.jsx("button",{type:"button",className:Ze("block w-full whitespace-normal break-words bg-transparent p-0 text-left text-[18px] text-muted-foreground",h?"hover:opacity-80":""),style:k,children:a})}),x.jsx(Ln,{type:"source",position:tt.Right,id:"r",isConnectable:r,className:Ze("opacity-0 transition-opacity",n&&"!opacity-100")}),x.jsx(Ln,{type:"source",position:tt.Bottom,id:"b",isConnectable:r,className:Ze("opacity-0 transition-opacity",n&&"!opacity-100")})]})}function zLe(e,t){return e.selected===t.selected&&e.data===t.data&&e.width===t.width&&e.height===t.height}const OLe=M.memo(qLe,zLe),FLe=8;function BLe(e){let t=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY,i=Number.NEGATIVE_INFINITY,a=!1;for(const o of e){const s=o.data.width,c=o.data.height;s===void 0||c===void 0||(a=!0,o.position.x<t&&(t=o.position.x),o.position.y<n&&(n=o.position.y),o.position.x+s>r&&(r=o.position.x+s),o.position.y+c>i&&(i=o.position.y+c))}return a?{x:t,y:n,width:r-t,height:i-n}:null}function HLe(e){return e.length>=2}function VLe({selectedNodes:e,onMultiResize:t,paddingPx:n=FLe}){kq();const[r,i]=M.useState(null),[a,o]=M.useState(null);if(M.useRef(!1),M.useRef(null),!HLe(e))return null;const s=BLe(e);if(!s)return null;const c=a??s;return c.x-n,c.y-n,c.width+n*2,c.height+n*2,null}function P0({value:e,onChange:t,options:n,ariaLabel:r,className:i}){return x.jsx(Tp,{delayDuration:300,children:x.jsx("div",{"aria-label":r,className:Ze("inline-flex h-9 items-stretch overflow-hidden rounded-md border border-input bg-background p-0.5",i),children:n.map((a,o)=>{const s=e===a.value,c=a.icon;return x.jsxs(M.Fragment,{children:[o>0?x.jsx("div",{"aria-hidden":!0,className:"mx-0.5 w-px self-stretch bg-border/70"}):null,x.jsxs(Oy,{children:[x.jsx(Fy,{asChild:!0,children:x.jsx("button",{type:"button","aria-pressed":s,"aria-label":a.label,"data-active":s,"data-testid":a.testId,onClick:()=>t(a.value),className:Ze("flex flex-1 items-center justify-center rounded px-2 transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",s?"bg-secondary text-secondary-foreground shadow-sm":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),children:x.jsx(c,{className:"h-4 w-4"})})}),x.jsx($f,{side:"top",className:"px-2 py-1 text-xs",children:a.label})]})]},a.value)})})})}const eg=e=>({width:16,height:16,viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:1.75,...e}),cD=e=>x.jsx("svg",{...eg(e),"aria-hidden":"true",children:x.jsx("line",{x1:"2",y1:"8",x2:"14",y2:"8"})}),Yhe=e=>x.jsx("svg",{...eg(e),"aria-hidden":"true",children:x.jsx("line",{x1:"2",y1:"8",x2:"14",y2:"8",strokeDasharray:"3 2.5"})}),Jhe=e=>x.jsx("svg",{...eg(e),"aria-hidden":"true",children:x.jsx("line",{x1:"2",y1:"8",x2:"14",y2:"8",strokeDasharray:"0.1 2.6"})}),Qhe=e=>x.jsx("svg",{...eg(e),"aria-hidden":"true",children:x.jsx("path",{d:"M2 12 C 5 12, 5 4, 8 4 S 11 12, 14 12"})}),ULe=e=>x.jsx("svg",{...eg(e),"aria-hidden":"true",children:x.jsx("path",{d:"M2 12 H 6 V 4 H 14"})});function e2e(e,[t,n]){return Math.min(n,Math.max(t,e))}var $Le=M.createContext(void 0);function GK(e){const t=M.useContext($Le);return e||t||"ltr"}function WLe(e){const t=M.useRef({value:e,previous:e});return M.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function KK(e){const t=e+"CollectionProvider",[n,r]=xs(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=v=>{const{scope:k,children:g}=v,S=as.useRef(null),w=as.useRef(new Map).current;return x.jsx(i,{scope:k,itemMap:w,collectionRef:S,children:g})};o.displayName=t;const s=e+"CollectionSlot",c=vf(s),l=as.forwardRef((v,k)=>{const{scope:g,children:S}=v,w=a(s,g),C=Nn(k,w.collectionRef);return x.jsx(c,{ref:C,children:S})});l.displayName=s;const u=e+"CollectionItemSlot",d="data-radix-collection-item",f=vf(u),h=as.forwardRef((v,k)=>{const{scope:g,children:S,...w}=v,C=as.useRef(null),_=Nn(k,C),A=a(u,g);return as.useEffect(()=>(A.itemMap.set(C,{ref:C,...w}),()=>void A.itemMap.delete(C))),x.jsx(f,{[d]:"",ref:_,children:S})});h.displayName=u;function y(v){const k=a(e+"CollectionConsumer",v);return as.useCallback(()=>{const S=k.collectionRef.current;if(!S)return[];const w=Array.from(S.querySelectorAll(`[${d}]`));return Array.from(k.itemMap.values()).sort((A,j)=>w.indexOf(A.ref.current)-w.indexOf(j.ref.current))},[k.collectionRef,k.itemMap])}return[{Provider:o,Slot:l,ItemSlot:h},y,r]}var t2e=["PageUp","PageDown"],n2e=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],r2e={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},Zf="Slider",[SW,GLe,KLe]=KK(Zf),[i2e]=xs(Zf,[KLe]),[ZLe,wq]=i2e(Zf),a2e=M.forwardRef((e,t)=>{const{name:n,min:r=0,max:i=100,step:a=1,orientation:o="horizontal",disabled:s=!1,minStepsBetweenThumbs:c=0,defaultValue:l=[r],value:u,onValueChange:d=()=>{},onValueCommit:f=()=>{},inverted:h=!1,form:y,...v}=e,k=M.useRef(new Set),g=M.useRef(0),w=o==="horizontal"?XLe:YLe,[C=[],_]=Of({prop:u,defaultProp:l,onChange:I=>{var U;(U=[...k.current][g.current])==null||U.focus(),d(I)}}),A=M.useRef(C);function j(I){const R=nIe(C,I);D(I,R)}function O(I){D(I,g.current)}function T(){const I=A.current[g.current];C[g.current]!==I&&f(C)}function D(I,R,{commit:U}={commit:!1}){const q=oIe(a),K=sIe(Math.round((I-r)/a)*a+r,q),Z=e2e(K,[r,i]);_(($=[])=>{const B=eIe($,Z,R);if(aIe(B,c*a)){g.current=B.indexOf(Z);const V=String(B)!==String($);return V&&U&&f(B),V?B:$}else return $})}return x.jsx(ZLe,{scope:e.__scopeSlider,name:n,disabled:s,min:r,max:i,valueIndexToChangeRef:g,thumbs:k.current,values:C,orientation:o,form:y,children:x.jsx(SW.Provider,{scope:e.__scopeSlider,children:x.jsx(SW.Slot,{scope:e.__scopeSlider,children:x.jsx(w,{"aria-disabled":s,"data-disabled":s?"":void 0,...v,ref:t,onPointerDown:St(v.onPointerDown,()=>{s||(A.current=C)}),min:r,max:i,inverted:h,onSlideStart:s?void 0:j,onSlideMove:s?void 0:O,onSlideEnd:s?void 0:T,onHomeKeyDown:()=>!s&&D(r,0,{commit:!0}),onEndKeyDown:()=>!s&&D(i,C.length-1,{commit:!0}),onStepKeyDown:({event:I,direction:R})=>{if(!s){const K=t2e.includes(I.key)||I.shiftKey&&n2e.includes(I.key)?10:1,Z=g.current,$=C[Z],B=a*K*R;D($+B,Z,{commit:!0})}}})})})})});a2e.displayName=Zf;var[o2e,s2e]=i2e(Zf,{startEdge:"left",endEdge:"right",size:"width",direction:1}),XLe=M.forwardRef((e,t)=>{const{min:n,max:r,dir:i,inverted:a,onSlideStart:o,onSlideMove:s,onSlideEnd:c,onStepKeyDown:l,...u}=e,[d,f]=M.useState(null),h=Nn(t,w=>f(w)),y=M.useRef(void 0),v=GK(i),k=v==="ltr",g=k&&!a||!k&&a;function S(w){const C=y.current||d.getBoundingClientRect(),_=[0,C.width],j=ZK(_,g?[n,r]:[r,n]);return y.current=C,j(w-C.left)}return x.jsx(o2e,{scope:e.__scopeSlider,startEdge:g?"left":"right",endEdge:g?"right":"left",direction:g?1:-1,size:"width",children:x.jsx(c2e,{dir:v,"data-orientation":"horizontal",...u,ref:h,style:{...u.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:w=>{const C=S(w.clientX);o==null||o(C)},onSlideMove:w=>{const C=S(w.clientX);s==null||s(C)},onSlideEnd:()=>{y.current=void 0,c==null||c()},onStepKeyDown:w=>{const _=r2e[g?"from-left":"from-right"].includes(w.key);l==null||l({event:w,direction:_?-1:1})}})})}),YLe=M.forwardRef((e,t)=>{const{min:n,max:r,inverted:i,onSlideStart:a,onSlideMove:o,onSlideEnd:s,onStepKeyDown:c,...l}=e,u=M.useRef(null),d=Nn(t,u),f=M.useRef(void 0),h=!i;function y(v){const k=f.current||u.current.getBoundingClientRect(),g=[0,k.height],w=ZK(g,h?[r,n]:[n,r]);return f.current=k,w(v-k.top)}return x.jsx(o2e,{scope:e.__scopeSlider,startEdge:h?"bottom":"top",endEdge:h?"top":"bottom",size:"height",direction:h?1:-1,children:x.jsx(c2e,{"data-orientation":"vertical",...l,ref:d,style:{...l.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:v=>{const k=y(v.clientY);a==null||a(k)},onSlideMove:v=>{const k=y(v.clientY);o==null||o(k)},onSlideEnd:()=>{f.current=void 0,s==null||s()},onStepKeyDown:v=>{const g=r2e[h?"from-bottom":"from-top"].includes(v.key);c==null||c({event:v,direction:g?-1:1})}})})}),c2e=M.forwardRef((e,t)=>{const{__scopeSlider:n,onSlideStart:r,onSlideMove:i,onSlideEnd:a,onHomeKeyDown:o,onEndKeyDown:s,onStepKeyDown:c,...l}=e,u=wq(Zf,n);return x.jsx(Jt.span,{...l,ref:t,onKeyDown:St(e.onKeyDown,d=>{d.key==="Home"?(o(d),d.preventDefault()):d.key==="End"?(s(d),d.preventDefault()):t2e.concat(n2e).includes(d.key)&&(c(d),d.preventDefault())}),onPointerDown:St(e.onPointerDown,d=>{const f=d.target;f.setPointerCapture(d.pointerId),d.preventDefault(),u.thumbs.has(f)?f.focus():r(d)}),onPointerMove:St(e.onPointerMove,d=>{d.target.hasPointerCapture(d.pointerId)&&i(d)}),onPointerUp:St(e.onPointerUp,d=>{const f=d.target;f.hasPointerCapture(d.pointerId)&&(f.releasePointerCapture(d.pointerId),a(d))})})}),l2e="SliderTrack",u2e=M.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,i=wq(l2e,n);return x.jsx(Jt.span,{"data-disabled":i.disabled?"":void 0,"data-orientation":i.orientation,...r,ref:t})});u2e.displayName=l2e;var CW="SliderRange",d2e=M.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,i=wq(CW,n),a=s2e(CW,n),o=M.useRef(null),s=Nn(t,o),c=i.values.length,l=i.values.map(f=>p2e(f,i.min,i.max)),u=c>1?Math.min(...l):0,d=100-Math.max(...l);return x.jsx(Jt.span,{"data-orientation":i.orientation,"data-disabled":i.disabled?"":void 0,...r,ref:s,style:{...e.style,[a.startEdge]:u+"%",[a.endEdge]:d+"%"}})});d2e.displayName=CW;var LW="SliderThumb",h2e=M.forwardRef((e,t)=>{const n=GLe(e.__scopeSlider),[r,i]=M.useState(null),a=Nn(t,s=>i(s)),o=M.useMemo(()=>r?n().findIndex(s=>s.ref.current===r):-1,[n,r]);return x.jsx(JLe,{...e,ref:a,index:o})}),JLe=M.forwardRef((e,t)=>{const{__scopeSlider:n,index:r,name:i,...a}=e,o=wq(LW,n),s=s2e(LW,n),[c,l]=M.useState(null),u=Nn(t,S=>l(S)),d=c?o.form||!!c.closest("form"):!0,f=g1e(c),h=o.values[r],y=h===void 0?0:p2e(h,o.min,o.max),v=tIe(r,o.values.length),k=f==null?void 0:f[s.size],g=k?rIe(k,y,s.direction):0;return M.useEffect(()=>{if(c)return o.thumbs.add(c),()=>{o.thumbs.delete(c)}},[c,o.thumbs]),x.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[s.startEdge]:`calc(${y}% + ${g}px)`},children:[x.jsx(SW.ItemSlot,{scope:e.__scopeSlider,children:x.jsx(Jt.span,{role:"slider","aria-label":e["aria-label"]||v,"aria-valuemin":o.min,"aria-valuenow":h,"aria-valuemax":o.max,"aria-orientation":o.orientation,"data-orientation":o.orientation,"data-disabled":o.disabled?"":void 0,tabIndex:o.disabled?void 0:0,...a,ref:u,style:h===void 0?{display:"none"}:e.style,onFocus:St(e.onFocus,()=>{o.valueIndexToChangeRef.current=r})})}),d&&x.jsx(f2e,{name:i??(o.name?o.name+(o.values.length>1?"[]":""):void 0),form:o.form,value:h},r)]})});h2e.displayName=LW;var QLe="RadioBubbleInput",f2e=M.forwardRef(({__scopeSlider:e,value:t,...n},r)=>{const i=M.useRef(null),a=Nn(i,r),o=WLe(t);return M.useEffect(()=>{const s=i.current;if(!s)return;const c=window.HTMLInputElement.prototype,u=Object.getOwnPropertyDescriptor(c,"value").set;if(o!==t&&u){const d=new Event("input",{bubbles:!0});u.call(s,t),s.dispatchEvent(d)}},[o,t]),x.jsx(Jt.input,{style:{display:"none"},...n,ref:a,defaultValue:t})});f2e.displayName=QLe;function eIe(e=[],t,n){const r=[...e];return r[n]=t,r.sort((i,a)=>i-a)}function p2e(e,t,n){const a=100/(n-t)*(e-t);return e2e(a,[0,100])}function tIe(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function nIe(e,t){if(e.length===1)return 0;const n=e.map(i=>Math.abs(i-t)),r=Math.min(...n);return n.indexOf(r)}function rIe(e,t,n){const r=e/2,a=ZK([0,50],[0,r]);return(r-a(t)*n)*n}function iIe(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function aIe(e,t){if(t>0){const n=iIe(e);return Math.min(...n)>=t}return!0}function ZK(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function oIe(e){return(String(e).split(".")[1]||"").length}function sIe(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}var y2e=a2e,cIe=u2e,lIe=d2e,uIe=h2e;const g2e=M.forwardRef(({className:e,...t},n)=>x.jsxs(y2e,{ref:n,className:Ze("relative flex w-full touch-none select-none items-center",e),...t,children:[x.jsx(cIe,{className:"relative h-1.5 w-full grow overflow-hidden rounded-full bg-secondary",children:x.jsx(lIe,{className:"absolute h-full bg-primary"})}),x.jsx(uIe,{className:"block h-4 w-4 rounded-full border border-primary/60 bg-background shadow-sm transition-colors hover:border-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50"})]}));g2e.displayName=y2e.displayName;const ZQ=22,XQ=11,YQ=3,JQ=2,mO=8,dIe={http:"solid",event:"dashed",queue:"dotted",default:"solid"},m2e=["default","slate","blue","green","amber","red","purple","pink"],gm=[{value:"solid",icon:cD,label:"Solid",testId:"style-tab-border-style-solid"},{value:"dashed",icon:Yhe,label:"Dashed",testId:"style-tab-border-style-dashed"},{value:"dotted",icon:Jhe,label:"Dotted",testId:"style-tab-border-style-dotted"}],QQ=[{value:"solid",icon:cD,label:"Solid",testId:"style-tab-edge-style-solid"},{value:"dashed",icon:Yhe,label:"Dashed",testId:"style-tab-edge-style-dashed"},{value:"dotted",icon:Jhe,label:"Dotted",testId:"style-tab-edge-style-dotted"}],eee=[{value:"curve",icon:Qhe,label:"Curve",testId:"style-tab-edge-path-curve"},{value:"step",icon:ULe,label:"Zigzag",testId:"style-tab-edge-path-step"}],tee=[{value:"none",icon:vp,label:"None",testId:"style-tab-direction-none"},{value:"backward",icon:kp,label:"Backward",testId:"style-tab-direction-backward"},{value:"forward",icon:X2,label:"Forward",testId:"style-tab-direction-forward"},{value:"both",icon:op,label:"Both",testId:"style-tab-direction-both"}];function hIe({nodes:e,connectors:t,onStyleNode:n,onStyleNodePreview:r,onStyleNodes:i,onStyleNodesPreview:a,onStyleConnector:o,onStyleConnectorPreview:s,onRequestIconReplace:c}){const l=e.length>0,u=t.length>0;if(!l&&!u)return null;const d=l&&!u,f=!l&&u,h=e[0],y=t[0],v=e.filter(Pe=>Pe.type!=="iconNode"),k=v[0],g=d&&e.every(Pe=>Pe.type==="iconNode"),S=g?e.find(Pe=>Pe.type==="iconNode"):void 0,w=d&&e.every(Pe=>Pe.type==="imageNode"),C=d&&(h==null?void 0:h.type)==="shapeNode"&&h.data.shape==="text",_=(f?y==null?void 0:y.color:k==null?void 0:k.data.borderColor)??"default",A=(k==null?void 0:k.data.backgroundColor)??"default",j=(k==null?void 0:k.data.borderStyle)??"solid",O=y?y.style??dIe[y.kind]:"solid",T=(y==null?void 0:y.direction)??"forward",D=(y==null?void 0:y.path)??"curve",I=Pe=>{for(const Ie of e)n(Ie.id,{borderColor:Pe});for(const Ie of t)o(Ie.id,{color:Pe})},R=Pe=>{for(const Ie of e)n(Ie.id,{backgroundColor:Pe})},U=Pe=>{for(const Ie of e)n(Ie.id,{borderStyle:Pe});for(const Ie of t)o(Ie.id,{style:Pe})},q=Pe=>{for(const Ie of e)n(Ie.id,{borderSize:Pe});for(const Ie of t)o(Ie.id,{borderSize:Pe})},K=Pe=>{for(const Ie of e)r==null||r(Ie.id,{borderSize:Pe});for(const Ie of t)s==null||s(Ie.id,{borderSize:Pe})},Z=Pe=>{if(e.length>1&&i)i(e.map(Ie=>Ie.id),{fontSize:Pe});else for(const Ie of e)n(Ie.id,{fontSize:Pe})},$=Pe=>{if(e.length>1&&a)a(e.map(Ie=>Ie.id),{fontSize:Pe});else for(const Ie of e)r==null||r(Ie.id,{fontSize:Pe})},B=v.length>1&&new Set(v.map(Pe=>Pe.data.fontSize??ZQ)).size>1,V=Pe=>{if(e.length>1&&i)i(e.map(Ie=>Ie.id),{textColor:Pe});else for(const Ie of e)n(Ie.id,{textColor:Pe})},F=(k==null?void 0:k.data.textColor)??(C?(k==null?void 0:k.data.borderColor)??"default":"default"),ie=Pe=>{for(const Ie of t)o(Ie.id,{fontSize:Pe})},N=Pe=>{for(const Ie of t)s==null||s(Ie.id,{fontSize:Pe})},P=t.length>1&&new Set(t.map(Pe=>Pe.fontSize??XQ)).size>1,G=Pe=>{for(const Ie of e)n(Ie.id,{cornerRadius:Pe})},J=Pe=>{for(const Ie of e)r==null||r(Ie.id,{cornerRadius:Pe})},X=v.length>1&&new Set(v.map(Pe=>Pe.data.cornerRadius??mO)).size>1,ae=Pe=>{for(const Ie of t)o(Ie.id,{path:Pe})},re=Pe=>{for(const Ie of t)o(Ie.id,{direction:Pe})},fe=Pe=>{for(const Ie of e)n(Ie.id,{color:Pe})},ke=(S==null?void 0:S.data.color)??"default",Ne=f?(y==null?void 0:y.borderSize)??JQ:(k==null?void 0:k.data.borderSize)??YQ,je=f?JQ:YQ,Re=f?"edge":"border",$e=f?"Connector color":C?"Color":"Border color",ee=f?"connector color":C?"color":"border color",qe=f?"style-tab-edge-color-trigger":C?"style-tab-color-trigger":"style-tab-border-color-trigger",Ke=f||C?"style-tab-color":"style-tab-border-color";if(g){const Pe=!!c&&e.length===1&&!!S,Ie=()=>{S&&c&&c(S.id)};return x.jsx(Tp,{delayDuration:300,children:x.jsxs("div",{"data-testid":"canvas-style-strip",className:"pointer-events-auto flex flex-col items-center gap-1 rounded-lg border border-border bg-background/95 p-1 shadow-md backdrop-blur",children:[x.jsx(nee,{testId:"style-strip-icon-color",tooltip:"Icon color",ariaLabel:"icon color",activeToken:ke,previewKind:"edge",tokenTestIdPrefix:"style-tab-icon-color",innerTestId:"style-tab-icon-color-trigger",onSelect:fe}),Pe?x.jsxs(Oy,{children:[x.jsx(Fy,{asChild:!0,children:x.jsx("button",{type:"button","data-testid":"style-strip-change-icon","aria-label":"change icon",title:"Change icon",onClick:Ie,className:Ze("inline-flex h-8 w-8 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1"),children:x.jsx(Q2,{className:"h-4 w-4"})})}),x.jsx($f,{side:"right",className:"px-2 py-1 text-xs",children:"Change icon"})]}):null]})})}if(w){const Pe=e[0],Ie=(Pe==null?void 0:Pe.data.borderColor)??"default",ye=(Pe==null?void 0:Pe.data.borderStyle)??"solid",wt=(Pe==null?void 0:Pe.data.borderWidth)??1,Me=Pt=>{for(const it of e)n(it.id,{borderColor:Pt})},Ce=Pt=>{for(const it of e)n(it.id,{borderStyle:Pt})},De=Pt=>{for(const it of e)n(it.id,{borderWidth:Pt})},Ve=Pt=>{for(const it of e)r==null||r(it.id,{borderWidth:Pt})},nt=Pt=>{for(const it of e)n(it.id,{cornerRadius:Pt})},rt=Pt=>{for(const it of e)r==null||r(it.id,{cornerRadius:Pt})};return x.jsx(Tp,{delayDuration:300,children:x.jsxs("div",{"data-testid":"canvas-style-strip",className:"pointer-events-auto flex flex-col items-center gap-1 rounded-lg border border-border bg-background/95 p-1 shadow-md backdrop-blur",children:[x.jsx(nee,{testId:"style-strip-image-border-color",tooltip:"Border color",ariaLabel:"image border color",activeToken:Ie,previewKind:"border",tokenTestIdPrefix:"style-tab-image-border-color",innerTestId:"style-tab-image-border-color-trigger",onSelect:Me}),x.jsx(zs,{testId:"style-strip-image-border-style",tooltip:"Border style",ariaLabel:"image border style",renderIcon:()=>{var it;const Pt=((it=gm.find(at=>at.value===ye))==null?void 0:it.icon)??cD;return x.jsx(Pt,{className:"h-4 w-4"})},children:x.jsx(P0,{ariaLabel:"Border style",value:ye,onChange:Ce,options:gm})}),x.jsx(zs,{testId:"style-strip-image-border-width",tooltip:"Border width",ariaLabel:"image border width",renderIcon:()=>x.jsx("span",{className:"font-mono text-[10px] tabular-nums",children:wt}),children:x.jsx(N0,{value:Pe==null?void 0:Pe.data.borderWidth,defaultValue:1,min:1,max:8,suffix:"px",onPreview:Ve,onCommit:De,testId:"style-tab-image-border-width-slider"})}),x.jsx(zs,{testId:"style-strip-image-corner-radius",tooltip:"Corners",ariaLabel:"image corner radius",renderIcon:()=>x.jsx(J2,{className:"h-4 w-4"}),children:x.jsx(N0,{value:Pe==null?void 0:Pe.data.cornerRadius,defaultValue:mO,min:0,max:32,suffix:"px",onPreview:rt,onCommit:nt,testId:"style-tab-image-corner-radius-slider"})})]})})}const _e=d&&!C,Se=!C,ot=!f,Qe=()=>{if(f){const ye=zp[_].edge;return x.jsx("span",{className:"inline-block h-5 w-5 rounded-full ring-1 ring-border",style:{backgroundColor:ye}})}const Pe=zp[_].border,Ie=zp[A].background;return x.jsx("span",{className:"inline-block h-5 w-5 rounded-md ring-1 ring-border",style:{backgroundColor:Ie,border:`2px solid ${Pe}`}})};return x.jsx(Tp,{delayDuration:300,children:x.jsxs("div",{"data-testid":"canvas-style-strip",className:"pointer-events-auto flex flex-col items-center gap-1 rounded-lg border border-border bg-background/95 p-1 shadow-md backdrop-blur",children:[C?null:x.jsx(zs,{testId:"style-strip-colors",tooltip:"Colors",ariaLabel:"colors",renderIcon:Qe,children:x.jsxs("div",{className:"flex w-56 flex-col gap-3",children:[x.jsx(f2,{label:$e,children:x.jsx(vO,{testId:"style-strip-border-color",activeToken:_,previewKind:Re,tokenTestIdPrefix:Ke,innerTestId:qe,ariaLabel:ee,onSelect:I})}),_e?x.jsx(f2,{label:"Fill",children:x.jsx(vO,{testId:"style-strip-fill",activeToken:A,previewKind:"background",tokenTestIdPrefix:"style-tab-background-color",innerTestId:"style-tab-background-color-trigger",ariaLabel:"fill",onSelect:R})}):null]})}),Se?x.jsx(zs,{testId:"style-strip-border",tooltip:f?"Connector":"Border",ariaLabel:f?"connector":"border",renderIcon:()=>{var Ie,ye;const Pe=(f?(Ie=QQ.find(wt=>wt.value===O))==null?void 0:Ie.icon:(ye=gm.find(wt=>wt.value===j))==null?void 0:ye.icon)??cD;return x.jsx(Pe,{className:"h-4 w-4"})},children:x.jsxs("div",{className:"flex w-56 flex-col gap-3",children:[x.jsx(f2,{label:"Style",testId:"style-strip-border-style",children:f?x.jsx(P0,{ariaLabel:"Connector style",value:O,onChange:Pe=>U(Pe),options:QQ}):x.jsx(P0,{ariaLabel:"Border style",value:j,onChange:Pe=>U(Pe),options:gm})}),x.jsx(f2,{label:"Width",testId:"style-strip-border-size",children:x.jsx(N0,{value:Ne,defaultValue:je,min:1,max:8,suffix:"px",onPreview:K,onCommit:q,testId:f?"style-tab-stroke-width-slider":"style-tab-border-size-slider"})})]})}):null,l||f?x.jsx(zs,{testId:"style-strip-text",tooltip:"Text",ariaLabel:"text",renderIcon:()=>x.jsx(ef,{className:"h-4 w-4"}),children:x.jsxs("div",{className:"flex w-56 flex-col gap-3",children:[x.jsx(f2,{label:"Size",testId:f?"style-strip-connector-font-size":"style-strip-font-size",children:x.jsx(N0,{value:f?y==null?void 0:y.fontSize:k==null?void 0:k.data.fontSize,defaultValue:f?XQ:ZQ,min:f?8:10,max:32,suffix:"px",indeterminate:f?P:B,onPreview:f?N:$,onCommit:f?ie:Z,testId:f?"style-tab-connector-font-size-slider":"style-tab-font-size-slider"})}),ot?x.jsx(f2,{label:"Color",children:x.jsx(vO,{testId:"style-strip-text-color",activeToken:F,previewKind:"edge",tokenTestIdPrefix:"style-tab-text-color",innerTestId:"style-tab-text-color-trigger",ariaLabel:"text color",onSelect:V})}):null]})}):null,l&&!C?x.jsx(zs,{testId:"style-strip-corner-radius",tooltip:"Corners",ariaLabel:"corner radius",renderIcon:()=>x.jsx(J2,{className:"h-4 w-4"}),children:x.jsx(N0,{value:k==null?void 0:k.data.cornerRadius,defaultValue:mO,min:0,max:32,suffix:"px",indeterminate:X,onPreview:J,onCommit:G,testId:"style-tab-corner-radius-slider"})}):null,f?x.jsx(zs,{testId:"style-strip-path",tooltip:"Connector path",ariaLabel:"connector path",renderIcon:()=>{var Ie;const Pe=((Ie=eee.find(ye=>ye.value===D))==null?void 0:Ie.icon)??Qhe;return x.jsx(Pe,{className:"h-4 w-4"})},children:x.jsx(P0,{ariaLabel:"Connector path",value:D,onChange:ae,options:eee})}):null,f?x.jsx(zs,{testId:"style-strip-direction",tooltip:"Direction",ariaLabel:"direction",renderIcon:()=>{var Ie;const Pe=((Ie=tee.find(ye=>ye.value===T))==null?void 0:Ie.icon)??X2;return x.jsx(Pe,{className:"h-4 w-4"})},children:x.jsx(P0,{ariaLabel:"Connector direction",value:T,onChange:re,options:tee})}):null]})})}function v2e(e,t){const n=zp[e];return t==="background"?{backgroundColor:n.background,borderColor:n.border}:t==="edge"?{backgroundColor:n.edge,borderColor:n.edge}:{borderColor:n.border,backgroundColor:n.background}}function fIe(e,t){const n=zp[e];return t==="background"?{backgroundColor:n.background}:t==="edge"?{backgroundColor:n.edge}:{backgroundColor:n.border}}function nee({testId:e,tooltip:t,ariaLabel:n,activeToken:r,previewKind:i,tokenTestIdPrefix:a,innerTestId:o,onSelect:s}){const[c,l]=M.useState(!1),u=r==="default";return x.jsxs(Uf,{open:c,onOpenChange:l,children:[x.jsxs(Oy,{children:[x.jsx(Fy,{asChild:!0,children:x.jsx(qy,{asChild:!0,children:x.jsx("button",{type:"button","data-testid":e,"data-active-token":r,"aria-label":`${n}: ${r}`,title:t,className:Ze("group relative inline-flex h-8 w-8 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1"),children:x.jsx("span",{"data-testid":o,className:"relative h-5 w-5 rounded-full ring-1 ring-border",style:fIe(r,i),children:u?x.jsx("span",{"aria-hidden":"true",className:"pointer-events-none absolute inset-0 rounded-full",style:{backgroundImage:"linear-gradient(45deg, transparent 45%, currentColor 45%, currentColor 55%, transparent 55%)",color:"hsl(var(--muted-foreground))",opacity:.5}}):null})})})}),x.jsx($f,{side:"right",className:"px-2 py-1 text-xs",children:t})]}),x.jsx(Fh,{side:"right",align:"start",className:"w-auto p-2","data-testid":`${o}-popover`,children:x.jsx("div",{className:"grid grid-cols-4 gap-1.5",children:m2e.map(d=>{const f=r===d;return x.jsx("button",{type:"button",onClick:()=>{s(d),l(!1)},"data-testid":`${a}-${d}`,"data-active":f,"aria-label":`${n} ${d}`,"aria-pressed":f,title:d,className:Ze("relative flex h-7 w-7 items-center justify-center rounded-full border-2 transition-all",f?"ring-2 ring-ring ring-offset-2 ring-offset-popover":"hover:scale-110"),style:v2e(d,i),children:f?x.jsx(Jc,{className:"h-3 w-3 drop-shadow-sm",style:{color:"hsl(var(--foreground))"}}):null},d)})})})]})}function vO({testId:e,activeToken:t,previewKind:n,tokenTestIdPrefix:r,innerTestId:i,ariaLabel:a,onSelect:o}){return x.jsx("div",{"data-testid":e,"data-active-token":t,"data-inner-testid":i,className:"grid grid-cols-4 gap-1.5",children:m2e.map(s=>{const c=t===s;return x.jsx("button",{type:"button",onClick:()=>o(s),"data-testid":`${r}-${s}`,"data-active":c,"aria-label":`${a} ${s}`,"aria-pressed":c,title:s,className:Ze("relative flex h-7 w-7 items-center justify-center rounded-full border-2 transition-all",c?"ring-2 ring-ring ring-offset-2 ring-offset-popover":"hover:scale-110"),style:v2e(s,n),children:c?x.jsx(Jc,{className:"h-3 w-3 drop-shadow-sm",style:{color:"hsl(var(--foreground))"}}):null},s)})})}function f2({label:e,testId:t,children:n}){return x.jsxs("div",{className:"flex flex-col gap-1.5","data-testid":t,children:[x.jsx("div",{className:"text-[11px] font-medium uppercase tracking-wide text-muted-foreground",children:e}),n]})}function zs({testId:e,tooltip:t,ariaLabel:n,renderIcon:r,children:i}){const[a,o]=M.useState(!1);return x.jsxs(Uf,{open:a,onOpenChange:o,children:[x.jsxs(Oy,{children:[x.jsx(Fy,{asChild:!0,children:x.jsx(qy,{asChild:!0,children:x.jsx("button",{type:"button","data-testid":e,"aria-label":n,title:t,className:Ze("inline-flex h-8 w-8 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1"),children:r()})})}),x.jsx($f,{side:"right",className:"px-2 py-1 text-xs",children:t})]}),x.jsx(Fh,{side:"right",align:"start",className:"w-auto p-3",children:i})]})}function N0({value:e,defaultValue:t,min:n,max:r,suffix:i,indeterminate:a,onPreview:o,onCommit:s,testId:c}){const l=e??t,[u,d]=M.useState(l),[f,h]=M.useState(!1);M.useEffect(()=>{d(l),h(!1)},[l]);const y=a&&!f;return x.jsxs("div",{className:"flex w-48 items-center gap-3",children:[x.jsx(g2e,{min:n,max:r,step:1,value:[u],onValueChange:([v])=>{const k=v??n;d(k),h(!0),o==null||o(k)},onValueCommit:([v])=>s(v??n),"data-testid":c,"data-indeterminate":y?"true":void 0,className:Ze("flex-1",y&&"opacity-60")}),x.jsx("span",{"data-testid":`${c}-value`,className:"w-12 shrink-0 text-right text-xs tabular-nums text-muted-foreground",children:y?"Mixed":x.jsxs(x.Fragment,{children:[u,i]})})]})}var kO="rovingFocusGroup.onEntryFocus",pIe={bubbles:!1,cancelable:!0},tg="RovingFocusGroup",[IW,k2e,yIe]=KK(tg),[gIe,x2e]=xs(tg,[yIe]),[mIe,vIe]=gIe(tg),w2e=M.forwardRef((e,t)=>x.jsx(IW.Provider,{scope:e.__scopeRovingFocusGroup,children:x.jsx(IW.Slot,{scope:e.__scopeRovingFocusGroup,children:x.jsx(kIe,{...e,ref:t})})}));w2e.displayName=tg;var kIe=M.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:a,currentTabStopId:o,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:l,preventScrollOnEntryFocus:u=!1,...d}=e,f=M.useRef(null),h=Nn(t,f),y=GK(a),[v,k]=Of({prop:o,defaultProp:s??null,onChange:c,caller:tg}),[g,S]=M.useState(!1),w=vs(l),C=k2e(n),_=M.useRef(!1),[A,j]=M.useState(0);return M.useEffect(()=>{const O=f.current;if(O)return O.addEventListener(kO,w),()=>O.removeEventListener(kO,w)},[w]),x.jsx(mIe,{scope:n,orientation:r,dir:y,loop:i,currentTabStopId:v,onItemFocus:M.useCallback(O=>k(O),[k]),onItemShiftTab:M.useCallback(()=>S(!0),[]),onFocusableItemAdd:M.useCallback(()=>j(O=>O+1),[]),onFocusableItemRemove:M.useCallback(()=>j(O=>O-1),[]),children:x.jsx(Jt.div,{tabIndex:g||A===0?-1:0,"data-orientation":r,...d,ref:h,style:{outline:"none",...e.style},onMouseDown:St(e.onMouseDown,()=>{_.current=!0}),onFocus:St(e.onFocus,O=>{const T=!_.current;if(O.target===O.currentTarget&&T&&!g){const D=new CustomEvent(kO,pIe);if(O.currentTarget.dispatchEvent(D),!D.defaultPrevented){const I=C().filter(Z=>Z.focusable),R=I.find(Z=>Z.active),U=I.find(Z=>Z.id===v),K=[R,U,...I].filter(Boolean).map(Z=>Z.ref.current);S2e(K,u)}}_.current=!1}),onBlur:St(e.onBlur,()=>S(!1))})})}),b2e="RovingFocusGroupItem",M2e=M.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,children:o,...s}=e,c=da(),l=a||c,u=vIe(b2e,n),d=u.currentTabStopId===l,f=k2e(n),{onFocusableItemAdd:h,onFocusableItemRemove:y,currentTabStopId:v}=u;return M.useEffect(()=>{if(r)return h(),()=>y()},[r,h,y]),x.jsx(IW.ItemSlot,{scope:n,id:l,focusable:r,active:i,children:x.jsx(Jt.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...s,ref:t,onMouseDown:St(e.onMouseDown,k=>{r?u.onItemFocus(l):k.preventDefault()}),onFocus:St(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:St(e.onKeyDown,k=>{if(k.key==="Tab"&&k.shiftKey){u.onItemShiftTab();return}if(k.target!==k.currentTarget)return;const g=bIe(k,u.orientation,u.dir);if(g!==void 0){if(k.metaKey||k.ctrlKey||k.altKey||k.shiftKey)return;k.preventDefault();let w=f().filter(C=>C.focusable).map(C=>C.ref.current);if(g==="last")w.reverse();else if(g==="prev"||g==="next"){g==="prev"&&w.reverse();const C=w.indexOf(k.currentTarget);w=u.loop?MIe(w,C+1):w.slice(C+1)}setTimeout(()=>S2e(w))}}),children:typeof o=="function"?o({isCurrentTabStop:d,hasTabStop:v!=null}):o})})});M2e.displayName=b2e;var xIe={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function wIe(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function bIe(e,t,n){const r=wIe(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return xIe[r]}function S2e(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function MIe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var SIe=w2e,CIe=M2e,AW=["Enter"," "],LIe=["ArrowDown","PageUp","Home"],C2e=["ArrowUp","PageDown","End"],IIe=[...LIe,...C2e],AIe={ltr:[...AW,"ArrowRight"],rtl:[...AW,"ArrowLeft"]},_Ie={ltr:["ArrowLeft"],rtl:["ArrowRight"]},ng="Menu",[xy,EIe,PIe]=KK(ng),[Bh,bq]=xs(ng,[PIe,Vf,x2e]),Mq=Vf(),L2e=x2e(),[NIe,Hh]=Bh(ng),[RIe,rg]=Bh(ng),I2e=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:a,modal:o=!0}=e,s=Mq(t),[c,l]=M.useState(null),u=M.useRef(!1),d=vs(a),f=GK(i);return M.useEffect(()=>{const h=()=>{u.current=!0,document.addEventListener("pointerdown",y,{capture:!0,once:!0}),document.addEventListener("pointermove",y,{capture:!0,once:!0})},y=()=>u.current=!1;return document.addEventListener("keydown",h,{capture:!0}),()=>{document.removeEventListener("keydown",h,{capture:!0}),document.removeEventListener("pointerdown",y,{capture:!0}),document.removeEventListener("pointermove",y,{capture:!0})}},[]),x.jsx(bK,{...s,children:x.jsx(NIe,{scope:t,open:n,onOpenChange:d,content:c,onContentChange:l,children:x.jsx(RIe,{scope:t,onClose:M.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:u,dir:f,modal:o,children:r})})})};I2e.displayName=ng;var jIe="MenuAnchor",XK=M.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=Mq(n);return x.jsx(iq,{...i,...r,ref:t})});XK.displayName=jIe;var YK="MenuPortal",[TIe,A2e]=Bh(YK,{forceMount:void 0}),_2e=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:i}=e,a=Hh(YK,t);return x.jsx(TIe,{scope:t,forceMount:n,children:x.jsx(lo,{present:n||a.open,children:x.jsx(Ny,{asChild:!0,container:i,children:r})})})};_2e.displayName=YK;var ao="MenuContent",[DIe,JK]=Bh(ao),E2e=M.forwardRef((e,t)=>{const n=A2e(ao,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=Hh(ao,e.__scopeMenu),o=rg(ao,e.__scopeMenu);return x.jsx(xy.Provider,{scope:e.__scopeMenu,children:x.jsx(lo,{present:r||a.open,children:x.jsx(xy.Slot,{scope:e.__scopeMenu,children:o.modal?x.jsx(qIe,{...i,ref:t}):x.jsx(zIe,{...i,ref:t})})})})}),qIe=M.forwardRef((e,t)=>{const n=Hh(ao,e.__scopeMenu),r=M.useRef(null),i=Nn(t,r);return M.useEffect(()=>{const a=r.current;if(a)return cK(a)},[]),x.jsx(QK,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:St(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),zIe=M.forwardRef((e,t)=>{const n=Hh(ao,e.__scopeMenu);return x.jsx(QK,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),OIe=vf("MenuContent.ScrollLock"),QK=M.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:o,disableOutsidePointerEvents:s,onEntryFocus:c,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:h,disableOutsideScroll:y,...v}=e,k=Hh(ao,n),g=rg(ao,n),S=Mq(n),w=L2e(n),C=EIe(n),[_,A]=M.useState(null),j=M.useRef(null),O=Nn(t,j,k.onContentChange),T=M.useRef(0),D=M.useRef(""),I=M.useRef(0),R=M.useRef(null),U=M.useRef("right"),q=M.useRef(0),K=y?VD:M.Fragment,Z=y?{as:OIe,allowPinchZoom:!0}:void 0,$=V=>{var ae,re;const F=D.current+V,ie=C().filter(fe=>!fe.disabled),N=document.activeElement,P=(ae=ie.find(fe=>fe.ref.current===N))==null?void 0:ae.textValue,G=ie.map(fe=>fe.textValue),J=YIe(G,F,P),X=(re=ie.find(fe=>fe.textValue===J))==null?void 0:re.ref.current;(function fe(ke){D.current=ke,window.clearTimeout(T.current),ke!==""&&(T.current=window.setTimeout(()=>fe(""),1e3))})(F),X&&setTimeout(()=>X.focus())};M.useEffect(()=>()=>window.clearTimeout(T.current),[]),sK();const B=M.useCallback(V=>{var ie,N;return U.current===((ie=R.current)==null?void 0:ie.side)&&QIe(V,(N=R.current)==null?void 0:N.area)},[]);return x.jsx(DIe,{scope:n,searchRef:D,onItemEnter:M.useCallback(V=>{B(V)&&V.preventDefault()},[B]),onItemLeave:M.useCallback(V=>{var F;B(V)||((F=j.current)==null||F.focus(),A(null))},[B]),onTriggerLeave:M.useCallback(V=>{B(V)&&V.preventDefault()},[B]),pointerGraceTimerRef:I,onPointerGraceIntentChange:M.useCallback(V=>{R.current=V},[]),children:x.jsx(K,{...Z,children:x.jsx(BD,{asChild:!0,trapped:i,onMountAutoFocus:St(a,V=>{var F;V.preventDefault(),(F=j.current)==null||F.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:x.jsx(Py,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:h,children:x.jsx(SIe,{asChild:!0,...w,dir:g.dir,orientation:"vertical",loop:r,currentTabStopId:_,onCurrentTabStopIdChange:A,onEntryFocus:St(c,V=>{g.isUsingKeyboardRef.current||V.preventDefault()}),preventScrollOnEntryFocus:!0,children:x.jsx(MK,{role:"menu","aria-orientation":"vertical","data-state":W2e(k.open),"data-radix-menu-content":"",dir:g.dir,...S,...v,ref:O,style:{outline:"none",...v.style},onKeyDown:St(v.onKeyDown,V=>{const ie=V.target.closest("[data-radix-menu-content]")===V.currentTarget,N=V.ctrlKey||V.altKey||V.metaKey,P=V.key.length===1;ie&&(V.key==="Tab"&&V.preventDefault(),!N&&P&&$(V.key));const G=j.current;if(V.target!==G||!IIe.includes(V.key))return;V.preventDefault();const X=C().filter(ae=>!ae.disabled).map(ae=>ae.ref.current);C2e.includes(V.key)&&X.reverse(),ZIe(X)}),onBlur:St(e.onBlur,V=>{V.currentTarget.contains(V.target)||(window.clearTimeout(T.current),D.current="")}),onPointerMove:St(e.onPointerMove,wy(V=>{const F=V.target,ie=q.current!==V.clientX;if(V.currentTarget.contains(F)&&ie){const N=V.clientX>q.current?"right":"left";U.current=N,q.current=V.clientX}}))})})})})})})});E2e.displayName=ao;var FIe="MenuGroup",eZ=M.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return x.jsx(Jt.div,{role:"group",...r,ref:t})});eZ.displayName=FIe;var BIe="MenuLabel",P2e=M.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return x.jsx(Jt.div,{...r,ref:t})});P2e.displayName=BIe;var lD="MenuItem",ree="menu.itemSelect",Sq=M.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...i}=e,a=M.useRef(null),o=rg(lD,e.__scopeMenu),s=JK(lD,e.__scopeMenu),c=Nn(t,a),l=M.useRef(!1),u=()=>{const d=a.current;if(!n&&d){const f=new CustomEvent(ree,{bubbles:!0,cancelable:!0});d.addEventListener(ree,h=>r==null?void 0:r(h),{once:!0}),due(d,f),f.defaultPrevented?l.current=!1:o.onClose()}};return x.jsx(N2e,{...i,ref:c,disabled:n,onClick:St(e.onClick,u),onPointerDown:d=>{var f;(f=e.onPointerDown)==null||f.call(e,d),l.current=!0},onPointerUp:St(e.onPointerUp,d=>{var f;l.current||(f=d.currentTarget)==null||f.click()}),onKeyDown:St(e.onKeyDown,d=>{const f=s.searchRef.current!=="";n||f&&d.key===" "||AW.includes(d.key)&&(d.currentTarget.click(),d.preventDefault())})})});Sq.displayName=lD;var N2e=M.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:i,...a}=e,o=JK(lD,n),s=L2e(n),c=M.useRef(null),l=Nn(t,c),[u,d]=M.useState(!1),[f,h]=M.useState("");return M.useEffect(()=>{const y=c.current;y&&h((y.textContent??"").trim())},[a.children]),x.jsx(xy.ItemSlot,{scope:n,disabled:r,textValue:i??f,children:x.jsx(CIe,{asChild:!0,...s,focusable:!r,children:x.jsx(Jt.div,{role:"menuitem","data-highlighted":u?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...a,ref:l,onPointerMove:St(e.onPointerMove,wy(y=>{r?o.onItemLeave(y):(o.onItemEnter(y),y.defaultPrevented||y.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:St(e.onPointerLeave,wy(y=>o.onItemLeave(y))),onFocus:St(e.onFocus,()=>d(!0)),onBlur:St(e.onBlur,()=>d(!1))})})})}),HIe="MenuCheckboxItem",R2e=M.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...i}=e;return x.jsx(z2e,{scope:e.__scopeMenu,checked:n,children:x.jsx(Sq,{role:"menuitemcheckbox","aria-checked":uD(n)?"mixed":n,...i,ref:t,"data-state":nZ(n),onSelect:St(i.onSelect,()=>r==null?void 0:r(uD(n)?!0:!n),{checkForDefaultPrevented:!1})})})});R2e.displayName=HIe;var j2e="MenuRadioGroup",[VIe,UIe]=Bh(j2e,{value:void 0,onValueChange:()=>{}}),T2e=M.forwardRef((e,t)=>{const{value:n,onValueChange:r,...i}=e,a=vs(r);return x.jsx(VIe,{scope:e.__scopeMenu,value:n,onValueChange:a,children:x.jsx(eZ,{...i,ref:t})})});T2e.displayName=j2e;var D2e="MenuRadioItem",q2e=M.forwardRef((e,t)=>{const{value:n,...r}=e,i=UIe(D2e,e.__scopeMenu),a=n===i.value;return x.jsx(z2e,{scope:e.__scopeMenu,checked:a,children:x.jsx(Sq,{role:"menuitemradio","aria-checked":a,...r,ref:t,"data-state":nZ(a),onSelect:St(r.onSelect,()=>{var o;return(o=i.onValueChange)==null?void 0:o.call(i,n)},{checkForDefaultPrevented:!1})})})});q2e.displayName=D2e;var tZ="MenuItemIndicator",[z2e,$Ie]=Bh(tZ,{checked:!1}),O2e=M.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...i}=e,a=$Ie(tZ,n);return x.jsx(lo,{present:r||uD(a.checked)||a.checked===!0,children:x.jsx(Jt.span,{...i,ref:t,"data-state":nZ(a.checked)})})});O2e.displayName=tZ;var WIe="MenuSeparator",F2e=M.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return x.jsx(Jt.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});F2e.displayName=WIe;var GIe="MenuArrow",B2e=M.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=Mq(n);return x.jsx(SK,{...i,...r,ref:t})});B2e.displayName=GIe;var KIe="MenuSub",[bGe,H2e]=Bh(KIe),V0="MenuSubTrigger",V2e=M.forwardRef((e,t)=>{const n=Hh(V0,e.__scopeMenu),r=rg(V0,e.__scopeMenu),i=H2e(V0,e.__scopeMenu),a=JK(V0,e.__scopeMenu),o=M.useRef(null),{pointerGraceTimerRef:s,onPointerGraceIntentChange:c}=a,l={__scopeMenu:e.__scopeMenu},u=M.useCallback(()=>{o.current&&window.clearTimeout(o.current),o.current=null},[]);return M.useEffect(()=>u,[u]),M.useEffect(()=>{const d=s.current;return()=>{window.clearTimeout(d),c(null)}},[s,c]),x.jsx(XK,{asChild:!0,...l,children:x.jsx(N2e,{id:i.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":i.contentId,"data-state":W2e(n.open),...e,ref:ms(t,i.onTriggerChange),onClick:d=>{var f;(f=e.onClick)==null||f.call(e,d),!(e.disabled||d.defaultPrevented)&&(d.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:St(e.onPointerMove,wy(d=>{a.onItemEnter(d),!d.defaultPrevented&&!e.disabled&&!n.open&&!o.current&&(a.onPointerGraceIntentChange(null),o.current=window.setTimeout(()=>{n.onOpenChange(!0),u()},100))})),onPointerLeave:St(e.onPointerLeave,wy(d=>{var h,y;u();const f=(h=n.content)==null?void 0:h.getBoundingClientRect();if(f){const v=(y=n.content)==null?void 0:y.dataset.side,k=v==="right",g=k?-5:5,S=f[k?"left":"right"],w=f[k?"right":"left"];a.onPointerGraceIntentChange({area:[{x:d.clientX+g,y:d.clientY},{x:S,y:f.top},{x:w,y:f.top},{x:w,y:f.bottom},{x:S,y:f.bottom}],side:v}),window.clearTimeout(s.current),s.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(d),d.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:St(e.onKeyDown,d=>{var h;const f=a.searchRef.current!=="";e.disabled||f&&d.key===" "||AIe[r.dir].includes(d.key)&&(n.onOpenChange(!0),(h=n.content)==null||h.focus(),d.preventDefault())})})})});V2e.displayName=V0;var U2e="MenuSubContent",$2e=M.forwardRef((e,t)=>{const n=A2e(ao,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=Hh(ao,e.__scopeMenu),o=rg(ao,e.__scopeMenu),s=H2e(U2e,e.__scopeMenu),c=M.useRef(null),l=Nn(t,c);return x.jsx(xy.Provider,{scope:e.__scopeMenu,children:x.jsx(lo,{present:r||a.open,children:x.jsx(xy.Slot,{scope:e.__scopeMenu,children:x.jsx(QK,{id:s.contentId,"aria-labelledby":s.triggerId,...i,ref:l,align:"start",side:o.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:u=>{var d;o.isUsingKeyboardRef.current&&((d=c.current)==null||d.focus()),u.preventDefault()},onCloseAutoFocus:u=>u.preventDefault(),onFocusOutside:St(e.onFocusOutside,u=>{u.target!==s.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:St(e.onEscapeKeyDown,u=>{o.onClose(),u.preventDefault()}),onKeyDown:St(e.onKeyDown,u=>{var h;const d=u.currentTarget.contains(u.target),f=_Ie[o.dir].includes(u.key);d&&f&&(a.onOpenChange(!1),(h=s.trigger)==null||h.focus(),u.preventDefault())})})})})})});$2e.displayName=U2e;function W2e(e){return e?"open":"closed"}function uD(e){return e==="indeterminate"}function nZ(e){return uD(e)?"indeterminate":e?"checked":"unchecked"}function ZIe(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function XIe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function YIe(e,t,n){const i=t.length>1&&Array.from(t).every(l=>l===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let o=XIe(e,Math.max(a,0));i.length===1&&(o=o.filter(l=>l!==n));const c=o.find(l=>l.toLowerCase().startsWith(i.toLowerCase()));return c!==n?c:void 0}function JIe(e,t){const{x:n,y:r}=e;let i=!1;for(let a=0,o=t.length-1;a<t.length;o=a++){const s=t[a],c=t[o],l=s.x,u=s.y,d=c.x,f=c.y;u>r!=f>r&&n<(d-l)*(r-u)/(f-u)+l&&(i=!i)}return i}function QIe(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return JIe(n,t)}function wy(e){return t=>t.pointerType==="mouse"?e(t):void 0}var G2e=I2e,K2e=XK,Z2e=_2e,X2e=E2e,Y2e=eZ,J2e=P2e,Q2e=Sq,efe=R2e,tfe=T2e,nfe=q2e,rfe=O2e,ife=F2e,afe=B2e,ofe=V2e,sfe=$2e,rZ="ContextMenu",[eAe]=xs(rZ,[bq]),Xi=bq(),[tAe,cfe]=eAe(rZ),lfe=e=>{const{__scopeContextMenu:t,children:n,onOpenChange:r,dir:i,modal:a=!0}=e,[o,s]=M.useState(!1),c=Xi(t),l=vs(r),u=M.useCallback(d=>{s(d),l(d)},[l]);return x.jsx(tAe,{scope:t,open:o,onOpenChange:u,modal:a,children:x.jsx(G2e,{...c,dir:i,open:o,onOpenChange:u,modal:a,children:n})})};lfe.displayName=rZ;var ufe="ContextMenuTrigger",dfe=M.forwardRef((e,t)=>{const{__scopeContextMenu:n,disabled:r=!1,...i}=e,a=cfe(ufe,n),o=Xi(n),s=M.useRef({x:0,y:0}),c=M.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...s.current})}),l=M.useRef(0),u=M.useCallback(()=>window.clearTimeout(l.current),[]),d=f=>{s.current={x:f.clientX,y:f.clientY},a.onOpenChange(!0)};return M.useEffect(()=>u,[u]),M.useEffect(()=>void(r&&u()),[r,u]),x.jsxs(x.Fragment,{children:[x.jsx(K2e,{...o,virtualRef:c}),x.jsx(Jt.span,{"data-state":a.open?"open":"closed","data-disabled":r?"":void 0,...i,ref:t,style:{WebkitTouchCallout:"none",...e.style},onContextMenu:r?e.onContextMenu:St(e.onContextMenu,f=>{u(),d(f),f.preventDefault()}),onPointerDown:r?e.onPointerDown:St(e.onPointerDown,mm(f=>{u(),l.current=window.setTimeout(()=>d(f),700)})),onPointerMove:r?e.onPointerMove:St(e.onPointerMove,mm(u)),onPointerCancel:r?e.onPointerCancel:St(e.onPointerCancel,mm(u)),onPointerUp:r?e.onPointerUp:St(e.onPointerUp,mm(u))})]})});dfe.displayName=ufe;var nAe="ContextMenuPortal",hfe=e=>{const{__scopeContextMenu:t,...n}=e,r=Xi(t);return x.jsx(Z2e,{...r,...n})};hfe.displayName=nAe;var ffe="ContextMenuContent",pfe=M.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=cfe(ffe,n),a=Xi(n),o=M.useRef(!1);return x.jsx(X2e,{...a,...r,ref:t,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:s=>{var c;(c=e.onCloseAutoFocus)==null||c.call(e,s),!s.defaultPrevented&&o.current&&s.preventDefault(),o.current=!1},onInteractOutside:s=>{var c;(c=e.onInteractOutside)==null||c.call(e,s),!s.defaultPrevented&&!i.modal&&(o.current=!0)},style:{...e.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)"}})});pfe.displayName=ffe;var rAe="ContextMenuGroup",iAe=M.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=Xi(n);return x.jsx(Y2e,{...i,...r,ref:t})});iAe.displayName=rAe;var aAe="ContextMenuLabel",oAe=M.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=Xi(n);return x.jsx(J2e,{...i,...r,ref:t})});oAe.displayName=aAe;var sAe="ContextMenuItem",yfe=M.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=Xi(n);return x.jsx(Q2e,{...i,...r,ref:t})});yfe.displayName=sAe;var cAe="ContextMenuCheckboxItem",lAe=M.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=Xi(n);return x.jsx(efe,{...i,...r,ref:t})});lAe.displayName=cAe;var uAe="ContextMenuRadioGroup",dAe=M.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=Xi(n);return x.jsx(tfe,{...i,...r,ref:t})});dAe.displayName=uAe;var hAe="ContextMenuRadioItem",fAe=M.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=Xi(n);return x.jsx(nfe,{...i,...r,ref:t})});fAe.displayName=hAe;var pAe="ContextMenuItemIndicator",yAe=M.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=Xi(n);return x.jsx(rfe,{...i,...r,ref:t})});yAe.displayName=pAe;var gAe="ContextMenuSeparator",gfe=M.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=Xi(n);return x.jsx(ife,{...i,...r,ref:t})});gfe.displayName=gAe;var mAe="ContextMenuArrow",vAe=M.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=Xi(n);return x.jsx(afe,{...i,...r,ref:t})});vAe.displayName=mAe;var kAe="ContextMenuSubTrigger",xAe=M.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=Xi(n);return x.jsx(ofe,{...i,...r,ref:t})});xAe.displayName=kAe;var wAe="ContextMenuSubContent",bAe=M.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=Xi(n);return x.jsx(sfe,{...i,...r,ref:t,style:{...e.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)"}})});bAe.displayName=wAe;function mm(e){return t=>t.pointerType!=="mouse"?e(t):void 0}var MAe=lfe,SAe=dfe,CAe=hfe,mfe=pfe,vfe=yfe,kfe=gfe;const LAe=MAe,IAe=SAe,xfe=M.forwardRef(({className:e,...t},n)=>x.jsx(CAe,{children:x.jsx(mfe,{ref:n,className:Ze("z-50 min-w-[10rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md 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",e),...t})}));xfe.displayName=mfe.displayName;const Co=M.forwardRef(({className:e,...t},n)=>x.jsx(vfe,{ref:n,className:Ze("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled]:pointer-events-none data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground data-[disabled]:opacity-50",e),...t}));Co.displayName=vfe.displayName;const U0=M.forwardRef(({className:e,...t},n)=>x.jsx(kfe,{ref:n,className:Ze("-mx-1 my-1 h-px bg-border",e),...t}));U0.displayName=kfe.displayName;const _W=({className:e,...t})=>x.jsx("span",{className:Ze("ml-auto pl-4 text-xs tracking-widest text-muted-foreground",e),...t});_W.displayName="ContextMenuShortcut";const AAe=[".png",".jpg",".jpeg",".gif",".webp",".svg"],_Ae=400,EW={width:200,height:200},EAe=e=>{const t=e.lastIndexOf(".");return t>=0?e.slice(t).toLowerCase():""},PAe=e=>{if(e.type.startsWith("image/")){const t=e.type.slice(6).toLowerCase();if(t==="png"||t==="jpeg"||t==="jpg"||t==="gif"||t==="webp"||t==="svg+xml")return!0}return AAe.includes(EAe(e.name))},NAe=e=>{if(!e)return null;const t=e.files;if(!t||t.length===0)return null;for(let n=0;n<t.length;n++){const r=t.item(n);if(r&&PAe(r))return r}return null},RAe=(e,t=_Ae)=>{if(e.width<=0||e.height<=0)return{...EW};const n=Math.max(e.width,e.height);if(n<=t)return{width:Math.round(e.width),height:Math.round(e.height)};const r=t/n;return{width:Math.round(e.width*r),height:Math.round(e.height*r)}},jAe=async e=>{const t=NAe(e.dataTransfer);if(!t||!e.rfInstance)return!1;const n=e.rfInstance.screenToFlowPosition(e.clientPos),r=await e.computeDims(t);return e.dispatch({file:t,position:{x:n.x-r.width/2,y:n.y-r.height/2},dims:r,originalFilename:t.name}),!0},TAe=e=>new Promise(t=>{let n=null;const r=a=>{n&&URL.revokeObjectURL(n),t(a)};try{n=URL.createObjectURL(e)}catch{t({...EW});return}const i=new Image;i.onload=()=>{r(RAe({width:i.naturalWidth,height:i.naturalHeight}))},i.onerror=()=>{r({...EW})},i.src=n}),DAe=24,qAe=e=>({type:yy.ArrowClosed,width:18,height:18,...e?{color:e}:{}}),zAe={http:{},event:{strokeDasharray:"6 4"},queue:{strokeDasharray:"2 4"},default:{}},OAe={solid:{},dashed:{strokeDasharray:"6 4"},dotted:{strokeDasharray:"2 4"}},FAe=3,iee=new WeakMap,BAe=(e,t,n=!1)=>{const r=iee.get(e);if(r&&r.isAdjacentToRunning===t&&r.selected===n)return r.edge;const i=e.style?OAe[e.style]:zAe[e.kind],a=dr(e.color,"edge"),o=e.borderSize??2,s=n?Math.max(FAe,o):o,l={...i,...a,...n?{strokeWidth:s,opacity:1}:{strokeWidth:s}},u=e.direction??"forward",d=a.stroke,f=qAe(d),h=u==="backward"||u==="both"?f:void 0,y=u==="forward"||u==="both"?f:void 0,v={id:e.id,source:e.source,target:e.target,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle,type:"editableEdge",label:e.label,animated:t,data:{kind:e.kind,path:e.path,sourceHandleAutoPicked:e.sourceHandleAutoPicked,targetHandleAutoPicked:e.targetHandleAutoPicked,sourcePin:e.sourcePin,targetPin:e.targetPin,fontSize:e.fontSize},style:l,markerStart:h,markerEnd:y,interactionWidth:DAe};return iee.set(e,{isAdjacentToRunning:t,selected:n,edge:v}),v},iZ=3,aee=17,PW=(e,t)=>{if(!e)return{};const n={};for(const r of t)e[r]!==void 0&&(n[r]=e[r]);return n},HAe=["borderColor","backgroundColor","borderSize","borderStyle","fontSize","cornerRadius"],VAe=["borderColor","backgroundColor","borderSize","borderStyle","fontSize"],UAe=["fontSize"],$Ae=["borderColor","borderWidth","borderStyle"];function oee(e,t,n){if(e==="text")return{shape:e,width:t.width,height:t.height,fontSize:aee,...PW(n,UAe)};const r=e==="ellipse"?VAe:HAe;return{shape:e,width:t.width,height:t.height,borderSize:iZ,fontSize:aee,...PW(n,r)}}function WAe(e,t,n){return{path:e,width:t.width,height:t.height,borderWidth:iZ,...PW(n,$Ae)}}const see=40,cee=e=>{if("clientX"in e)return{clientX:e.clientX,clientY:e.clientY};const t=e.changedTouches[0]??e.touches[0];return t?{clientX:t.clientX,clientY:t.clientY}:null},GAe=(e,t)=>{var r;const n=document.elementsFromPoint(e,t);for(const i of n){const a=(r=i.closest)==null?void 0:r.call(i,".react-flow__node");if(a)return a}return null},wfe=15,xO=(e,t,n)=>{const r=GAe(t,n);if(r)return r;if(!e)return null;let i=null,a=wfe;const o=e.querySelectorAll(".react-flow__node");for(const s of o){const c=s.getBoundingClientRect();if(c.width===0||c.height===0)continue;const l=Math.max(c.left-t,0,t-c.right),u=Math.max(c.top-n,0,n-c.bottom),d=Math.hypot(l,u);d<=a&&(i=s,a=d)}return i};function lee(e,t,n,r,i){if(e==="source"?(r==null?void 0:r.targetPin)!==void 0||(r==null?void 0:r.targetHandleAutoPicked)===!1:(r==null?void 0:r.sourcePin)!==void 0||(r==null?void 0:r.sourceHandleAutoPicked)===!1)return;const o=e==="source"?n:t,s=e==="source"?t:n,c=i(o),l=i(s);if(!c||!l)return;const u=c.measured.width??c.width??0,d=c.measured.height??c.height??0,f=l.measured.width??l.width??0,h=l.measured.height??l.height??0;if(u===0||d===0||f===0||h===0)return;const y={x:c.internals.positionAbsolute.x,y:c.internals.positionAbsolute.y,w:u,h:d},v={x:l.internals.positionAbsolute.x+f/2,y:l.internals.positionAbsolute.y+h/2};return u6e(y,ZT(y,v))}function KAe(e,t,n,r){if(r===null)return"no-op";const i=e==="source"?t:n;return r===(e==="source"?n:t)?"self-loop":r===i?"pin-own":"reconnect-and-pin"}const ZAe=(e,t)=>{if(!t)return e;const n=t.data?{...e.data,...t.data}:e.data;return{...e,...t,data:n}},XAe=(e,t)=>t?{...e,...t}:e,YAe={playNode:vLe,stateNode:OLe,shapeNode:PLe,imageNode:dLe,iconNode:oLe,htmlNode:eLe},JAe={editableEdge:jCe},QAe={zIndex:0},e_e=8,uee=(e,t)=>e?typeof e=="string"?`url('#${e}')`:`url('#${`${t?`${t}__`:""}${Object.keys(e).sort().map(i=>`${i}=${e[i]}`).join("&")}`}')`:void 0,t_e=e=>function({fromX:n,fromY:r,toX:i,toY:a,fromPosition:o,toPosition:s,connectionLineStyle:c}){const l=qt(ie=>e.current?ie.edges.find(N=>N.reconnectable===!0)??null:null),u=l==null?void 0:l.data,d=qt(ie=>{var P;const N=ie.connection;return((P=N==null?void 0:N.fromHandle)==null?void 0:P.nodeId)??null}),f=qt(ie=>l!=null&&l.source?ie.nodeLookup.get(l.source)??null:null),h=qt(ie=>l!=null&&l.target?ie.nodeLookup.get(l.target)??null:null),y=qt(ie=>d?ie.nodeLookup.get(d)??null:null),v=(l==null?void 0:l.source)===d,k=l?v?f:h:y,g=v?h:f,S=v?u==null?void 0:u.sourcePin:u==null?void 0:u.targetPin,w=v?u==null?void 0:u.sourceHandleAutoPicked:u==null?void 0:u.targetHandleAutoPicked;let C=n,_=r,A=o;if(k){const ie=k.measured.width??k.width??0,N=k.measured.height??k.height??0;if(ie>0&&N>0){const P={x:k.internals.positionAbsolute.x,y:k.internals.positionAbsolute.y,w:ie,h:N};let G=null;if(S)G=XT(P,S);else if(w!==!1&&g){const J=g.measured.width??g.width??0,X=g.measured.height??g.height??0;if(J>0&&X>0){const ae={x:g.internals.positionAbsolute.x+J/2,y:g.internals.positionAbsolute.y+X/2};G=ZT(P,ae)}}G&&(C=G.x,_=G.y,A=dee[G.side])}}const j=qt(ie=>ie.transform[2]),O=qt(ie=>ie.nodeLookup),T=qt(ie=>{var N;return((N=ie.connection.toHandle)==null?void 0:N.nodeId)??null});let D=i,I=a,R=s;if(j>0){const ie=wfe/j,N=l?v?l.target:l.source:null;let P=null;if(T&&T!==N){const G=O.get(T)??null;G&&(P=G)}if(!P){let G=ie;for(const J of O.values()){if(N&&J.id===N||k&&J.id===k.id)continue;const X=J.measured.width??J.width??0,ae=J.measured.height??J.height??0;if(X===0||ae===0)continue;const re=J.internals.positionAbsolute.x,fe=J.internals.positionAbsolute.y,ke=Math.max(re-i,0,i-(re+X)),Ne=Math.max(fe-a,0,a-(fe+ae)),je=Math.hypot(ke,Ne);je<=G&&(G=je,P=J)}}if(!P&&l&&k){const G=k.measured.width??k.width??0,J=k.measured.height??k.height??0;if(G>0&&J>0){const X=k.internals.positionAbsolute.x,ae=k.internals.positionAbsolute.y,re=Math.max(X-i,0,i-(X+G)),fe=Math.max(ae-a,0,a-(ae+J));Math.hypot(re,fe)<=ie&&(P=k)}}if(P){const G=P.measured.width??P.width??0,J=P.measured.height??P.height??0;if(G>0&&J>0){const X=lW({x:P.internals.positionAbsolute.x,y:P.internals.positionAbsolute.y,w:G,h:J},{x:i,y:a}),ae=XT({x:P.internals.positionAbsolute.x,y:P.internals.positionAbsolute.y,w:G,h:J},X);D=ae.x,I=ae.y,R=dee[ae.side]}}}const U=(u==null?void 0:u.path)==="step",[q]=U?vy({sourceX:C,sourceY:_,sourcePosition:A,targetX:D,targetY:I,targetPosition:R,borderRadius:e_e}):yq({sourceX:C,sourceY:_,sourcePosition:A,targetX:D,targetY:I,targetPosition:R}),K=(l==null?void 0:l.style)??c??void 0,Z=qt(ie=>ie.rfId),$=v?l==null?void 0:l.markerStart:l==null?void 0:l.markerEnd,B=v?l==null?void 0:l.markerEnd:l==null?void 0:l.markerStart,V=uee($,Z),F=uee(B,Z);return x.jsx("path",{d:q,fill:"none",className:"react-flow__connection-path",style:K,markerStart:V,markerEnd:F})},dee={top:tt.Top,right:tt.Right,bottom:tt.Bottom,left:tt.Left};function n_e({storeApiRef:e}){const t=Yn();return M.useEffect(()=>(e.current=t,()=>{e.current===t&&(e.current=null)}),[t,e]),null}function r_e({wrapperRef:e}){const t=qt(r=>r.transform[2]),n=e.current;return n&&n.style.setProperty("--rf-zoom",String(t)),null}const i_e=new Set(["INPUT","TEXTAREA","SELECT"]),bfe=e=>e?i_e.has(e.tagName)?!0:e instanceof HTMLElement&&e.isContentEditable:!1;function a_e(e){const{event:t,selectedNodeIds:n,hasClipboard:r,activeElement:i,onCopySelection:a,onPasteSelection:o}=e;if(!(t.metaKey||t.ctrlKey)||t.shiftKey||t.altKey)return!1;const s=t.key.toLowerCase();return s!=="c"&&s!=="v"||bfe(i)?!1:s==="c"?n.length===0||!a?!1:(t.preventDefault(),a([...n]),!0):!r||!o?!1:(t.preventDefault(),o(),!0)}const hee=(e,t)=>{var n;return((n=e==null?void 0:e[t])==null?void 0:n.status)??"idle"},o_e=(e,t)=>{var n;return(n=e==null?void 0:e[t])==null?void 0:n.status},s_e=(e,t)=>{var n,r;return((n=e==null?void 0:e[t])==null?void 0:n.status)==="error"?(r=e[t])==null?void 0:r.error:void 0};function c_e({projectId:e,nodes:t,connectors:n,selectedNodeIds:r,selectedConnectorIds:i,onSelectionChange:a,runs:o,statusByNode:s,onPlayNode:c,nodeOverrides:l,connectorOverrides:u,onNodePositionChange:d,onNodePositionsChange:f,onNodeResize:h,onMultiResize:y,onNodeNameChange:v,onNodeDescriptionChange:k,onConnectorLabelChange:g,onCreateShapeNode:S,onCreateImageFromFile:w,onRetryImageUpload:C,onCreateHtmlNode:_,onCreateConnector:A,onReconnectConnector:j,onReorderNode:O,onDeleteNode:T,onCopyNode:D,onPasteAt:I,hasClipboard:R,onCopySelection:U,onPasteSelection:q,selectedNodes:K,selectedConnectors:Z,onStyleNode:$,onStyleNodePreview:B,onStyleNodes:V,onStyleNodesPreview:F,onStyleConnector:ie,onStyleConnectorPreview:N,onRfInit:P,onTidy:G,onNodeClick:J,onConnectorClick:X,onPaneClick:ae,onCreateAndConnectFromPane:re,pendingEditNodeId:fe,iconPickerOpen:ke,onOpenIconPicker:Ne,onCloseIconPicker:je,onPickIcon:Re,onRequestIconReplace:$e,onPinEndpoint:ee,onUnpinEndpoint:qe,onToggleNodeLock:Ke,activeShape:_e,onSelectShape:Se}){const ot=M.useRef(null),Qe=M.useRef(null),Pe=M.useRef(null),Ie=_e,ye=Se,wt=M.useRef(new Map),Me=M.useCallback((ve,be)=>(wt.current.set(ve,be),()=>{wt.current.get(ve)===be&&wt.current.delete(ve)}),[]),[Ce,De]=M.useState(!1),Ve=M.useRef(!1);M.useEffect(()=>{Ve.current=Ce},[Ce]);const nt=M.useRef(!1),rt=M.useRef(!1),Pt=M.useRef(!1),[it,at]=M.useState(null),ft=M.useRef(null);M.useEffect(()=>{ft.current=it},[it]),M.useCallback(()=>{at(null)},[]);const Ot=M.useMemo(()=>t_e(Pt),[]),ht=M.useRef(null),Ht=M.useRef(null),Lt=M.useCallback(ve=>{const be=ot.current;if(!be){ht.current=ve;return}const We=ht.current;if(We&&We!==ve){const Ue=be.querySelector(`.react-flow__node[data-id="${CSS.escape(We)}"]`);Ue==null||Ue.removeAttribute("data-connect-source")}if(ve){const Ue=be.querySelector(`.react-flow__node[data-id="${CSS.escape(ve)}"]`);Ue==null||Ue.setAttribute("data-connect-source","true")}ht.current=ve},[]),Nt=M.useCallback(ve=>{const be=ot.current,We=Ht.current;if(We!==ve){if(be&&We){const Ue=be.querySelector(`.react-flow__node[data-id="${CSS.escape(We)}"]`);Ue==null||Ue.removeAttribute("data-connect-target")}if(be&&ve){const Ue=be.querySelector(`.react-flow__node[data-id="${CSS.escape(ve)}"]`);Ue==null||Ue.setAttribute("data-connect-target","true")}Ht.current=ve}},[]),un=M.useCallback(()=>{Lt(null),Nt(null)},[Lt,Nt]);M.useEffect(()=>{if(!Ce){Nt(null);return}const ve=be=>{const We=xO(ot.current,be.clientX,be.clientY),Ue=(We==null?void 0:We.getAttribute("data-id"))??null;if(Ue&&Ue===ht.current){Nt(null);return}Nt(Ue)};return document.addEventListener("pointermove",ve),()=>{document.removeEventListener("pointermove",ve)}},[Ce,Nt]);const[jt,Ct]=M.useState(null),[Vt,Rr]=M.useState(null),wn=M.useRef(null),jr=M.useRef(null),Hn=M.useRef(null),gt=M.useRef(!1);M.useEffect(()=>{wn.current=Ie},[Ie]);const rr=M.useCallback(()=>{ye(null),Ct(null),Rr(null),wn.current=null,jr.current=null,Hn.current=null,gt.current=!1},[ye]);M.useEffect(()=>{const ve=be=>{var Ye,_t;if(be.key!=="Escape"||bfe(document.activeElement))return;if(wn.current){be.preventDefault(),rr();return}if(Ve.current){be.preventDefault(),nt.current=!0,rt.current=!0;try{(Ye=Pe.current)==null||Ye.getState().cancelConnection()}catch{}document.dispatchEvent(new MouseEvent("mouseup",{bubbles:!0,cancelable:!0,button:0})),De(!1);return}if(ft.current){be.preventDefault(),at(null);return}const We=Tn.current.size>0,Ue=sr.current.size>0;(We||Ue)&&(be.preventDefault(),(_t=or.current)==null||_t.call(or,[],[]))};return window.addEventListener("keydown",ve),()=>window.removeEventListener("keydown",ve)},[rr]),M.useEffect(()=>{const ve=be=>{a_e({event:be,selectedNodeIds:r,hasClipboard:!!R,activeElement:document.activeElement,onCopySelection:U,onPasteSelection:q})};return window.addEventListener("keydown",ve),()=>window.removeEventListener("keydown",ve)},[r,R,U,q]);const Di=M.useCallback(ve=>{var Ue,Ye;if(!wn.current)return;const be=ve.target;if(!(be!=null&&be.classList.contains("react-flow__pane")))return;const We={x:ve.clientX,y:ve.clientY};gt.current=!0,jr.current=We,Hn.current=We,Ct(We),Rr(We);try{(Ye=(Ue=ve.currentTarget).setPointerCapture)==null||Ye.call(Ue,ve.pointerId)}catch{}ve.preventDefault(),ve.stopPropagation()},[]),Qr=M.useCallback(ve=>{if(!gt.current)return;const be={x:ve.clientX,y:ve.clientY};Hn.current=be,Rr(be)},[]),ir=M.useCallback(ve=>{var dt,Tt;if(!gt.current)return;gt.current=!1;try{(Tt=(dt=ve.currentTarget).releasePointerCapture)==null||Tt.call(dt,ve.pointerId)}catch{}const be=jr.current,We=Hn.current,Ue=wn.current,Ye=Qe.current;if(rr(),!be||!We||!Ue||!Ye)return;const _t=Math.min(be.x,We.x),ut=Math.min(be.y,We.y),Et=Math.max(be.x,We.x),Yt=Math.max(be.y,We.y),yn=Et-_t,L=Yt-ut,H=Ye.screenToFlowPosition({x:_t,y:ut}),se=Ye.screenToFlowPosition({x:Et,y:Yt}),he=se.x-H.x,we=se.y-H.y,Te=yn<see||L<see,He=Te?sD[Ue].width:he,pt=Te?sD[Ue].height:we;S==null||S(Ue,H,{width:He,height:pt})},[rr,S]),rn=M.useRef(!1),bn=M.useRef(!1),Mn=M.useCallback(ve=>{bn.current=ve},[]),ei=!!O||!!T||!!D||!!I||!!qe,[Rn,pr]=M.useState(null),[Jn,br]=M.useState(!1),[Mr,ar]=M.useState(null),[Tr,Sr]=M.useState(null),jn=M.useRef(null),ci=M.useRef(null);M.useEffect(()=>{if(!Rn)return;const ve=ci.current;if(!ve)return;const be=new MouseEvent("contextmenu",{clientX:Rn.x,clientY:Rn.y,bubbles:!0,cancelable:!0,button:2,buttons:2});ve.dispatchEvent(be)},[Rn]);const qi=M.useCallback(ve=>{const be=jn.current;!be||!O||O(be,ve)},[O]),$a=M.useCallback(()=>{const ve=jn.current;!ve||!T||T(ve)},[T]),zi=M.useCallback(()=>{const ve=jn.current;!ve||!D||D(ve)},[D]),Wa=M.useCallback(()=>{const ve=jn.current;!ve||!$e||$e(ve)},[$e]),ma=M.useCallback(()=>{if(!Ke)return;const ve=jn.current,be=ve?[ve]:[...r];be.length!==0&&Ke(be)},[Ke,r]);M.useCallback((ve,be,We,Ue,Ye)=>{jn.current=null,br(!1),ar(null),Sr({connectorId:ve,kind:be,pinned:We}),pr({x:Ue,y:Ye})},[]);const Ga=M.useCallback(()=>{const ve=Tr;!ve||!qe||qe(ve.connectorId,ve.kind)},[Tr,qe]),ti=M.useCallback(()=>{if(!I)return;const ve=Rn,be=Qe.current;if(!ve||!be)return;const We=be.screenToFlowPosition({x:ve.x,y:ve.y});I(We)},[Rn,I]),Ka=typeof navigator<"u"&&/Mac|iPhone|iPad|iPod/.test(navigator.platform||navigator.userAgent||""),$o=Ka?"⌘C":"Ctrl+C",fo=Ka?"⌘V":"Ctrl+V",gi=M.useMemo(()=>new Set(r),[r]),po=M.useMemo(()=>{const ve=new Set;for(const be of t)be.data.locked===!0&&ve.add(be.id);return ve},[t]),Dr=M.useMemo(()=>new Set(i),[i]),li=M.useMemo(()=>{if(r.length<2)return[];const ve=l,be=[];for(const We of r){const Ue=t.find(Et=>Et.id===We);if(!Ue)continue;const Ye=ve==null?void 0:ve[We],_t=(Ye==null?void 0:Ye.data)??{},ut=Ue.data;be.push({id:We,position:(Ye==null?void 0:Ye.position)??Ue.position,data:{width:_t.width??ut.width,height:_t.height??ut.height,locked:_t.locked??ut.locked}})}return be},[t,l,r]),va=K??[],ni=M.useMemo(()=>{const ve=Ye=>{const _t={id:Ye.id,type:Ye.type,position:Ye.position,data:{...Ye.data,projectId:e,onRetryUpload:C,status:o_e(o,Ye.id),errorMessage:s_e(o,Ye.id),statusReport:s==null?void 0:s[Ye.id],onPlay:c,onResize:h,setResizing:Mn,onNameChange:(()=>{if(!(Ye.type==="shapeNode"&&Ye.data.shape==="ellipse"))return v})(),onDescriptionChange:(()=>{if(Ye.type==="shapeNode"){const ut=Ye.data.shape;return ut==="rectangle"||ut==="ellipse"||ut==="sticky"?k:void 0}if(!(Ye.type==="imageNode"||Ye.type==="iconNode"))return k})(),autoEditOnMount:fe===Ye.id?!0:void 0},selected:gi.has(Ye.id)};return Ye.data.width!==void 0&&(_t.width=Ye.data.width),Ye.data.height!==void 0&&(_t.height=Ye.data.height),gi.has(Ye.id)||(_t.connectable=!1),Ye.data.locked===!0&&(_t.draggable=!1),_t},be=t.map(Ye=>ve(ZAe(Ye,l==null?void 0:l[Ye.id]))),We=new Set(t.map(Ye=>Ye.id)),Ue=[];if(l)for(const[Ye,_t]of Object.entries(l)){if(We.has(Ye))continue;const ut=_t;typeof ut.type!="string"||!ut.position||!ut.data||Ue.push(ve({...ut,id:Ye}))}return[...be,...Ue]},[e,t,gi,o,s,c,h,Mn,l,v,k,C,fe]),[on,mi]=M.useState(ni);M.useEffect(()=>{rn.current||bn.current||mi(ni)},[ni]),M.useEffect(()=>{Dn.current=on},[on]);const Tn=M.useRef(gi);M.useEffect(()=>{Tn.current=gi},[gi]);const or=M.useRef(a);M.useEffect(()=>{or.current=a},[a]);const sr=M.useRef(Dr);M.useEffect(()=>{sr.current=Dr},[Dr]);const Dn=M.useRef(ni),qr=M.useRef(!1),zr=M.useRef(new Set),Sn=M.useRef(new Set),Za=M.useRef(new Set),yo=M.useRef(new Set),zt=M.useRef(null),go=M.useCallback(ve=>{var se;const be=qr.current?Za.current:(se=zt.current)!=null&&se.shift?zt.current.nodeIds:null,We=be&&be.size>0?ve.filter(he=>he.type!=="select"?!0:!(he.selected===!1&&be.has(he.id))):ve,Ue=new Set;for(const he of We)he.type==="select"&&Ue.add(he.id);const Ye=ghe(We,Dn.current),_t=Tn.current,ut=qr.current||_t.size===0?Ye:Ye.map(he=>_t.has(he.id)&&!Ue.has(he.id)&&!he.selected?{...he,selected:!0}:he);if(Dn.current=ut,mi(ut),Ue.size===0)return;if(qr.current){for(const he of We)he.type==="select"&&(he.selected?zr.current.add(he.id):zr.current.delete(he.id));return}const Et=or.current;if(!Et)return;const Yt=ut.filter(he=>he.selected).map(he=>he.id),yn=Tn.current;yn.size===Yt.length&&Yt.every(he=>yn.has(he))||(Tn.current=new Set(Yt),Et(Yt,[...sr.current]))},[]),Or=M.useRef([]),vi=M.useCallback(ve=>{var L;const be=qr.current?yo.current:(L=zt.current)!=null&&L.shift?zt.current.edgeIds:null,We=be&&be.size>0?ve.filter(H=>H.type!=="select"?!0:!(H.selected===!1&&be.has(H.id))):ve,Ue=new Set;for(const H of We)H.type==="select"&&Ue.add(H.id);if(Ue.size===0)return;if(qr.current){for(const H of We)H.type==="select"&&(H.selected?Sn.current.add(H.id):Sn.current.delete(H.id));return}const Ye=or.current;if(!Ye)return;const ut=mhe(We,Or.current).filter(H=>H.selected).map(H=>H.id),Et=sr.current;Et.size===ut.length&&ut.every(H=>Et.has(H))||(sr.current=new Set(ut),Ye([...Tn.current],ut))},[]),Ji=M.useCallback(ve=>{qr.current=!0;const be=zt.current,We=(be==null?void 0:be.shift)??(ve.shiftKey||ve.metaKey||ve.ctrlKey);Za.current=We?new Set((be==null?void 0:be.nodeIds)??Tn.current):new Set,yo.current=We?new Set((be==null?void 0:be.edgeIds)??sr.current):new Set,zr.current=new Set(Za.current),Sn.current=new Set(yo.current)},[]),Wo=M.useCallback(()=>{qr.current=!1,zt.current=null;const ve=or.current;if(!ve)return;const be=[...zr.current],We=new Set(be),Ue=new Set(Sn.current);for(const Yt of Or.current)We.has(Yt.source)&&We.has(Yt.target)&&Ue.add(Yt.id);const Ye=Tn.current,_t=sr.current,ut=Ye.size===We.size&&be.every(Yt=>Ye.has(Yt)),Et=_t.size===Ue.size&&[...Ue].every(Yt=>_t.has(Yt));ut&&Et||(Tn.current=new Set(be),sr.current=new Set(Ue),ve(be,[...Ue]))},[]),Ls=M.useCallback(ve=>{if(zt.current=null,wn.current||ve.button!==0)return;const be=ve.target;be!=null&&be.classList.contains("react-flow__pane")&&(zt.current={shift:ve.shiftKey||ve.metaKey||ve.ctrlKey,nodeIds:new Set(Tn.current),edgeIds:new Set(sr.current)})},[]),ml=M.useCallback(ve=>{if(Tn.current.size<2)return;const We=ve.target;We!==ci.current&&(We!=null&&We.closest(".seeflow-connector-endpoint-dot")||(ve.preventDefault(),ve.stopPropagation(),jn.current=null,br(!0),ar(null),Sr(null),pr({x:ve.clientX,y:ve.clientY})))},[]),vl=M.useCallback(ve=>{const be=ve.dataTransfer;if(!be)return;const We=be.types?Array.from(be.types):[],Ue=We.includes("Files"),Ye=We.includes(AJ);if(!(!(Ue&&w)&&!(Ye&&_))){ve.preventDefault();try{be.dropEffect="copy"}catch{}}},[w,_]),dc=M.useCallback(ve=>{const be=ve.dataTransfer;if((be!=null&&be.types?Array.from(be.types):[]).includes(AJ)&&_){ve.preventDefault();const _t=Qe.current;if(!_t)return;const ut=_t.screenToFlowPosition({x:ve.clientX,y:ve.clientY});_({position:ut});return}if(!w)return;const Ye={x:ve.clientX,y:ve.clientY};ve.preventDefault(),jAe({dataTransfer:be,clientPos:Ye,rfInstance:Qe.current,computeDims:TAe,dispatch:w})},[w,_]),ka=!!j,Is=Dr.size===1?[...Dr][0]:null,Qi=M.useMemo(()=>{const ve=Et=>{const Yt=hee(o,Et.source)==="running"||hee(o,Et.target)==="running",yn=Dr.has(Et.id),L=BAe(Et,Yt,yn);yn&&(L.selected=!0);const H=ka&&Et.id===Is,se=H?{...L,reconnectable:!0}:L;return{...se,data:{...se.data,onLabelChange:g,reconnectable:H,registerEditHandle:Me}}},be=new Set(n.map(Et=>Et.id)),We=n.map(Et=>ve(XAe(Et,u==null?void 0:u[Et.id]))),Ue=[];if(u)for(const[Et,Yt]of Object.entries(u)){if(be.has(Et))continue;const yn=Yt;typeof yn.source!="string"||typeof yn.target!="string"||typeof yn.kind!="string"||Ue.push(ve({...yn,id:Et}))}const Ye=[...We,...Ue],_t=[],ut=[];for(const Et of Ye)Dr.has(Et.id)?ut.push(Et):_t.push(Et);return[..._t,...ut]},[n,o,Dr,Is,u,g,ka,Me]);M.useEffect(()=>{Or.current=Qi},[Qi]);const mo=M.useRef(!1),xa=M.useRef(null),te=M.useCallback(ve=>{var Et;if(!A)return;const{source:be,target:We}=ve;if(!be||!We||be===We)return;mo.current=!0;const Ue=((Et=xa.current)==null?void 0:Et.nodeId)??null,Ye=Ue!==null&&Ue===We&&Ue!==be;A(Ye?We:be,Ye?be:We)},[A]),de=M.useCallback(ve=>{const be=We=>{if(!We)return!1;const Ue=Dn.current.find(Ye=>Ye.id===We);return Ue?Ue.type==="shapeNode"&&Ue.data.shape==="text":!1};return!be(ve.source)&&!be(ve.target)},[]),ge=M.useCallback((ve,be)=>{var L;De(!1),un();const We=mo.current;if(mo.current=!1,We||Pt.current)return;if(nt.current){nt.current=!1;return}if(!A)return;const Ue=(L=be.fromNode)==null?void 0:L.id,Ye=be.fromHandle;if(!Ue||!Ye)return;const _t=cee(ve);if(!_t)return;const ut=xO(ot.current,_t.clientX,_t.clientY);if(!ut)return;const Et=ut.getAttribute("data-id");if(!Et||Et===Ue||!de({source:Ue,target:Et,sourceHandle:null,targetHandle:null}))return;let Yt;const yn=Qe.current;if(yn){const H=yn.getInternalNode(Et);if(H){const se=H.measured.width??H.width??0,he=H.measured.height??H.height??0;if(se>0&&he>0){const we=yn.screenToFlowPosition({x:_t.clientX,y:_t.clientY});Yt=lW({x:H.internals.positionAbsolute.x,y:H.internals.positionAbsolute.y,w:se,h:he},we)}}}A(Ue,Et,Yt?{targetPin:Yt}:void 0)},[A,un,de]),pe=M.useRef(!1),ce=M.useCallback((ve,be)=>{if(!j)return;const{source:We,target:Ue,sourceHandle:Ye,targetHandle:_t}=be;if(!We||!Ue||We===Ue)return;const ut={};if(We!==ve.source&&(ut.source=We),Ue!==ve.target&&(ut.target=Ue),typeof Ye=="string"&&Ye!==ve.sourceHandle&&(ut.sourceHandle=Ye),typeof _t=="string"&&_t!==ve.targetHandle&&(ut.targetHandle=_t),ut.source===void 0&&ut.target===void 0&&ut.sourceHandle===void 0&&ut.targetHandle===void 0)return;(ut.source!==void 0||ut.sourceHandle!==void 0)&&(ut.sourceHandleAutoPicked=!1),(ut.target!==void 0||ut.targetHandle!==void 0)&&(ut.targetHandleAutoPicked=!1);const Et=Qe.current;if(!(ut.source===void 0&&ut.target===void 0)&&Et){const yn=ut.source!==void 0?"source":"target",L=lee(yn,ve.source,ve.target,ve.data,H=>Et.getInternalNode(H)??null);L&&(yn==="source"?ut.targetPin=L:ut.sourcePin=L)}pe.current=!0,j(ve.id,ut)},[j]),Oe=M.useCallback((ve,be,We,Ue)=>{var pt;De(!1),un(),Pt.current=!1;const Ye=pe.current;if(pe.current=!1,Ye)return;if(rt.current){rt.current=!1;return}if(!j)return;const _t=cee(ve);let ut=((pt=Ue.toNode)==null?void 0:pt.id)??null;if(!ut&&_t){const dt=xO(ot.current,_t.clientX,_t.clientY);ut=(dt==null?void 0:dt.getAttribute("data-id"))??null}const Et=We==="source"?"target":"source",Yt=KAe(Et,be.source,be.target,ut);if(Yt==="no-op"||Yt==="self-loop"||!_t)return;const yn=Qe.current;if(!yn)return;const L=Yt==="pin-own"?Et==="source"?be.source:be.target:ut,H=yn.getInternalNode(L);if(!H)return;const se=H.measured.width??H.width??0,he=H.measured.height??H.height??0;if(se===0||he===0)return;const we=yn.screenToFlowPosition({x:_t.clientX,y:_t.clientY}),Te=lW({x:H.internals.positionAbsolute.x,y:H.internals.positionAbsolute.y,w:se,h:he},we);if(Yt==="pin-own"){if(!ee)return;ee(be.id,Et,Te);return}const He=lee(Et,be.source,be.target,be.data,dt=>yn.getInternalNode(dt)??null);Et==="source"?j(be.id,{source:ut,sourceHandle:null,sourceHandleAutoPicked:!1,sourcePin:Te,...He?{targetPin:He}:{}}):j(be.id,{target:ut,targetHandle:null,targetHandleAutoPicked:!1,targetPin:Te,...He?{sourcePin:He}:{}})},[j,un,ee]),lt=M.useMemo(()=>{var Et;if(!jt||!Vt)return null;const ve=(Et=ot.current)==null?void 0:Et.getBoundingClientRect(),be=(ve==null?void 0:ve.left)??0,We=(ve==null?void 0:ve.top)??0,Ue=Math.min(jt.x,Vt.x),Ye=Math.min(jt.y,Vt.y),_t=Math.abs(Vt.x-jt.x),ut=Math.abs(Vt.y-jt.y);return{left:Ue-be,top:Ye-We,width:_t,height:ut}},[jt,Vt]),ct=Ie?Zhe(Ie):"",pn=Ie?Xhe(Ie):void 0,yr=Ie==="text",[gr,Vn]=M.useState(!1),[mr,ki]=M.useState(!1);M.useEffect(()=>{const ve=Ue=>{if(!Ue)return!1;const Ye=Ue.tagName;return Ye==="INPUT"||Ye==="TEXTAREA"||Ye==="SELECT"?!0:Ue instanceof HTMLElement&&Ue.isContentEditable},be=Ue=>{Ue.code==="Space"&&(ve(document.activeElement)||(Ue.preventDefault(),Vn(!0)))},We=Ue=>{Ue.code==="Space"&&(Vn(!1),ki(!1))};return window.addEventListener("keydown",be),window.addEventListener("keyup",We),()=>{window.removeEventListener("keydown",be),window.removeEventListener("keyup",We)}},[]);const xi=M.useCallback(ve=>{if(ve.length!==0){if(ve.length===1){const be=ve[0];be&&d&&d(be.id,{x:be.position.x,y:be.position.y});return}if(f){f(ve.map(be=>({id:be.id,position:{x:be.position.x,y:be.position.y}})));return}if(d)for(const be of ve)d(be.id,{x:be.position.x,y:be.position.y})}},[d,f]),vt=M.useCallback((ve,be,We)=>{rn.current=!1,xi(We)},[xi]),tn=M.useCallback(()=>{rn.current=!0},[]),xt=M.useCallback((ve,be)=>{rn.current=!1,xi(be)},[xi]),nn=M.useCallback((ve,be)=>{J==null||J(be.id)},[J]),Qn=M.useCallback(ve=>{ae==null||ae()},[ae]),ri=M.useCallback((ve,be)=>{X==null||X(be.id)},[X]),ea=Ie?"crosshair":gr?mr?"grabbing":"grab":void 0;return x.jsxs("div",{"data-testid":"seeflow-canvas",ref:ot,className:"relative h-full w-full",style:ea?{cursor:ea}:void 0,onPointerDownCapture:Ls,onPointerDown:ve=>{gr&&ki(!0),Di(ve)},onPointerMove:Qr,onPointerUp:ve=>{ki(!1),ir(ve)},onPointerCancel:()=>{gt.current=!1,jr.current=null,Hn.current=null,Ct(null),Rr(null),ki(!1)},onContextMenuCapture:ml,onDragOver:vl,onDrop:dc,children:[x.jsxs(tCe,{nodes:on,edges:Qi,onNodesChange:go,nodeTypes:YAe,edgeTypes:JAe,proOptions:{hideAttribution:!0},fitView:!0,nodesDraggable:!!d&&!Ie,nodesConnectable:!!A&&!Ie,className:Ce?"seeflow-connecting":void 0,onConnect:te,isValidConnection:de,onConnectStart:(ve,be)=>{De(!0),mo.current=!1,xa.current={nodeId:be.nodeId??null,handleType:be.handleType??null},Lt(be.nodeId??null)},onConnectEnd:ge,onReconnect:j?ce:void 0,onReconnectStart:(ve,be,We)=>{De(!0),pe.current=!1,Pt.current=!0;const Ue=We==="source"?be.source:be.target;Lt(Ue)},onReconnectEnd:Oe,connectionLineComponent:Ot,connectionLineStyle:{strokeWidth:2},connectionRadius:32,reconnectRadius:10,edgesReconnectable:!1,elevateNodesOnSelect:!1,elementsSelectable:!Ie,selectNodesOnDrag:!1,nodeClickDistance:5,selectionOnDrag:!Ie,panOnDrag:Ie?!1:[1,2],selectionMode:Lf.Partial,selectionKeyCode:null,multiSelectionKeyCode:Ie?null:["Meta","Shift"],panActivationKeyCode:Ie?null:"Space",onSelectionStart:Ji,onSelectionEnd:Wo,defaultEdgeOptions:QAe,zoomOnDoubleClick:!1,onInit:ve=>{Qe.current=ve;const be=ot.current;be&&be.style.setProperty("--rf-zoom",String(ve.getZoom())),P==null||P(ve)},onMove:(ve,be)=>{ft.current&&at(null);const We=ot.current;We&&We.style.setProperty("--rf-zoom",String(be.zoom))},onEdgesChange:vi,onNodeDragStart:()=>{rn.current=!0},onNodeDragStop:vt,onSelectionDragStart:tn,onSelectionDragStop:xt,onNodeClick:nn,onEdgeClick:ri,onEdgeDoubleClick:(ve,be)=>{var We;(We=wt.current.get(be.id))==null||We()},onPaneClick:Qn,onNodeContextMenu:ei?(ve,be)=>{ve.preventDefault(),jn.current=be.id,br(!0),ar(be.type??null),Sr(null),pr({x:ve.clientX,y:ve.clientY})}:void 0,onPaneContextMenu:I?ve=>{ve.preventDefault(),jn.current=null,br(!1),ar(null),Sr(null),pr({x:ve.clientX,y:ve.clientY})}:void 0,children:[x.jsx(n_e,{storeApiRef:Pe}),x.jsx(r_e,{wrapperRef:ot}),x.jsx(uCe,{gap:12,size:.6}),x.jsxs(mCe,{showInteractive:!1,showFitView:!1,children:[x.jsx(F2,{"data-testid":"controls-fit-view","aria-label":"Fit view",title:"Fit view",disabled:t.length===0,onClick:()=>{var ve;(ve=Qe.current)==null||ve.fitView({padding:.15,duration:300,includeHiddenNodes:!1})},children:x.jsx(mp,{className:"h-3 w-3","aria-hidden":"true"})}),x.jsx(F2,{"data-testid":"controls-tidy","aria-label":"Tidy layout (⌘⇧L)",title:"Tidy layout (⌘⇧L)",disabled:!G,onClick:()=>G==null?void 0:G(),children:x.jsx(yp,{className:"h-3 w-3","aria-hidden":"true"})})]}),x.jsx(VLe,{selectedNodes:li,onMultiResize:y}),S||$||ie?x.jsx(Gy,{position:"top-left",children:x.jsxs("div",{className:"flex flex-col gap-2",children:[S?x.jsx(c6e,{activeShape:Ie,onSelectShape:ye,iconPickerOpen:ke??!1,onOpenIconPicker:Ne,onCloseIconPicker:je,onPickIcon:Re}):null,$&&ie?x.jsx(hIe,{nodes:va,connectors:Z??[],onStyleNode:$,onStyleNodePreview:B,onStyleNodes:V,onStyleNodesPreview:F,onStyleConnector:ie,onStyleConnectorPreview:N,onRequestIconReplace:$e}):null]})}):null]}),lt?x.jsx("div",{"data-testid":"canvas-draw-ghost","data-ghost-shape":Ie??void 0,"aria-hidden":!0,className:Ze("pointer-events-none absolute z-10",ct,yr?"rounded-sm border border-dashed border-muted-foreground/40":""),style:{...pn,left:lt.left,top:lt.top,width:lt.width,height:lt.height},children:(()=>{const ve=Ie?WK[Ie]:void 0;return ve?x.jsx(ve,{width:lt.width,height:lt.height,borderColor:dr(void 0,"node").borderColor,backgroundColor:Zy,borderSize:iZ}):null})()}):null,ei?x.jsxs(LAe,{onOpenChange:ve=>{ve||(pr(null),jn.current=null,ar(null),Sr(null))},children:[x.jsx(IAe,{asChild:!0,children:x.jsx("div",{ref:ci,"data-testid":"node-context-menu-trigger","aria-hidden":!0,className:"pointer-events-none fixed",style:{left:(Rn==null?void 0:Rn.x)??0,top:(Rn==null?void 0:Rn.y)??0,width:0,height:0}})}),x.jsxs(xfe,{"data-testid":"node-context-menu",children:[Tr!=null&&Tr.pinned&&qe?x.jsx(Co,{"data-testid":"connector-endpoint-context-menu-unpin",onSelect:Ga,children:"Unpin"}):null,Jn&&D?x.jsxs(Co,{"data-testid":"node-context-menu-copy",onSelect:zi,children:["Copy",x.jsx(_W,{children:$o})]}):null,I?x.jsxs(Co,{"data-testid":"node-context-menu-paste",disabled:!R,onSelect:ti,children:["Paste",x.jsx(_W,{children:fo})]}):null,Jn&&(D||I)&&(Mr==="iconNode"&&$e||O||T)?x.jsx(U0,{}):null,Jn&&Mr==="iconNode"&&$e?x.jsx(Co,{"data-testid":"node-context-menu-change-icon",onSelect:Wa,children:"Change icon"}):null,Jn&&Mr==="iconNode"&&$e&&(O||T)?x.jsx(U0,{}):null,Jn&&O?x.jsxs(x.Fragment,{children:[x.jsx(Co,{"data-testid":"node-context-menu-to-front",onSelect:()=>qi({op:"toFront"}),children:"Bring to front"}),x.jsx(Co,{"data-testid":"node-context-menu-forward",onSelect:()=>qi({op:"forward"}),children:"Bring forward"}),x.jsx(Co,{"data-testid":"node-context-menu-backward",onSelect:()=>qi({op:"backward"}),children:"Send backward"}),x.jsx(Co,{"data-testid":"node-context-menu-to-back",onSelect:()=>qi({op:"toBack"}),children:"Send to back"})]}):null,Jn&&O&&(Ke||T)?x.jsx(U0,{}):null,Jn&&Ke?(()=>{const ve=jn.current,be=ve?[ve]:r,We=be.length>0&&be.every(Ue=>po.has(Ue))?"Unlock":"Lock";return x.jsx(Co,{"data-testid":"node-context-menu-toggle-lock",onSelect:ma,disabled:be.length===0,children:We})})():null,Jn&&Ke&&T?x.jsx(U0,{}):null,Jn&&T?x.jsx(Co,{"data-testid":"node-context-menu-delete",onSelect:$a,disabled:jn.current?po.has(jn.current):!1,children:"Delete"}):null]})]}):null,re?x.jsxs(Uf,{open:!!it,onOpenChange:ve=>{ve||at(null)},children:[x.jsx(Kxe,{asChild:!0,children:x.jsx("div",{"data-testid":"drop-popover-anchor","aria-hidden":!0,className:"pointer-events-none fixed",style:{left:(it==null?void 0:it.clientX)??0,top:(it==null?void 0:it.clientY)??0,width:0,height:0}})}),x.jsx(Fh,{"data-testid":"drop-popover",align:"start",side:"bottom",sideOffset:4,className:"w-auto p-1",onOpenAutoFocus:ve=>{ve.preventDefault()},children:x.jsx("div",{role:"menu","aria-label":"Create connected node",className:"flex flex-col gap-0.5",children:s6e.map(({shape:ve,label:be,Icon:We})=>x.jsxs("button",{type:"button",role:"menuitem","data-testid":`drop-popover-shape-${ve}`,onClick:()=>{const Ue=it;Ue&&(re({sourceNodeId:Ue.sourceNodeId,position:{x:Ue.flowX,y:Ue.flowY},shape:ve}),at(null))},className:Ze("flex items-center gap-2 rounded-sm px-2 py-1.5 text-left text-sm","hover:bg-accent hover:text-accent-foreground","focus:bg-accent focus:text-accent-foreground focus:outline-none"),children:[x.jsx(We,{className:"h-4 w-4 text-muted-foreground","aria-hidden":"true"}),x.jsx("span",{children:be})]},ve))})})]}):null]})}const l_e=$D,u_e=WD,Mfe=M.forwardRef(({className:e,...t},n)=>x.jsx(Ry,{className:Ze("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n}));Mfe.displayName=Ry.displayName;const d_e=iue("fixed z-50 gap-4 bg-card border-border p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),Sfe=M.forwardRef(({side:e="right",className:t,children:n,...r},i)=>x.jsxs(u_e,{children:[x.jsx(Mfe,{}),x.jsxs(Ff,{ref:i,className:Ze(d_e({side:e}),t),...r,children:[n,x.jsxs(zue,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[x.jsx(tf,{className:"h-4 w-4"}),x.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Sfe.displayName=Ff.displayName;const cT=M.forwardRef(({className:e,...t},n)=>x.jsx(GD,{ref:n,className:Ze("text-lg font-semibold text-foreground",e),...t}));cT.displayName=GD.displayName;const NW=M.forwardRef(({className:e,...t},n)=>x.jsx(KD,{ref:n,className:Ze("text-sm text-muted-foreground",e),...t}));NW.displayName=KD.displayName;const Cfe="seeflow:detail-panel-width",b2=380,RW=320,jW=800;function TW(e){return Number.isFinite(e)?e<RW?RW:e>jW?jW:e:b2}function h_e(){if(typeof window>"u")return b2;try{const e=window.localStorage.getItem(Cfe);if(e===null)return b2;const t=Number(e);return!Number.isFinite(t)||t<RW||t>jW?b2:t}catch{return b2}}function f_e(e){if(!(typeof window>"u"))try{const t=TW(e);window.localStorage.setItem(Cfe,String(t))}catch{}}function p_e(e,t,n,r){const i=typeof window>"u"?null:window;if(!i)return;let a=TW(e);const o=c=>{a=TW(e+(t-c.clientX)),n.onWidth(a)},s=()=>{i.removeEventListener("pointermove",o),i.removeEventListener("pointerup",s),i.removeEventListener("pointercancel",s),n.onCommit(a)};i.addEventListener("pointermove",o),i.addEventListener("pointerup",s),i.addEventListener("pointercancel",s)}function y_e(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const g_e=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,m_e=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,v_e={};function fee(e,t){return(v_e.jsx?m_e:g_e).test(e)}const k_e=/[ \t\n\f\r]/g;function x_e(e){return typeof e=="object"?e.type==="text"?pee(e.value):!1:pee(e)}function pee(e){return e.replace(k_e,"")===""}class ig{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}ig.prototype.normal={};ig.prototype.property={};ig.prototype.space=void 0;function Lfe(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new ig(n,r,t)}function DW(e){return e.toLowerCase()}class ya{constructor(t,n){this.attribute=n,this.property=t}}ya.prototype.attribute="";ya.prototype.booleanish=!1;ya.prototype.boolean=!1;ya.prototype.commaOrSpaceSeparated=!1;ya.prototype.commaSeparated=!1;ya.prototype.defined=!1;ya.prototype.mustUseProperty=!1;ya.prototype.number=!1;ya.prototype.overloadedBoolean=!1;ya.prototype.property="";ya.prototype.spaceSeparated=!1;ya.prototype.space=void 0;let w_e=0;const Zt=Vh(),Hr=Vh(),qW=Vh(),et=Vh(),Fn=Vh(),of=Vh(),Pa=Vh();function Vh(){return 2**++w_e}const zW=Object.freeze(Object.defineProperty({__proto__:null,boolean:Zt,booleanish:Hr,commaOrSpaceSeparated:Pa,commaSeparated:of,number:et,overloadedBoolean:qW,spaceSeparated:Fn},Symbol.toStringTag,{value:"Module"})),wO=Object.keys(zW);class aZ extends ya{constructor(t,n,r,i){let a=-1;if(super(t,n),yee(this,"space",i),typeof r=="number")for(;++a<wO.length;){const o=wO[a];yee(this,wO[a],(r&zW[o])===zW[o])}}}aZ.prototype.defined=!0;function yee(e,t,n){n&&(e[t]=n)}function Xf(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const a=new aZ(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[DW(r)]=r,n[DW(a.attribute)]=r}return new ig(t,n,e.space)}const Ife=Xf({properties:{ariaActiveDescendant:null,ariaAtomic:Hr,ariaAutoComplete:null,ariaBusy:Hr,ariaChecked:Hr,ariaColCount:et,ariaColIndex:et,ariaColSpan:et,ariaControls:Fn,ariaCurrent:null,ariaDescribedBy:Fn,ariaDetails:null,ariaDisabled:Hr,ariaDropEffect:Fn,ariaErrorMessage:null,ariaExpanded:Hr,ariaFlowTo:Fn,ariaGrabbed:Hr,ariaHasPopup:null,ariaHidden:Hr,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Fn,ariaLevel:et,ariaLive:null,ariaModal:Hr,ariaMultiLine:Hr,ariaMultiSelectable:Hr,ariaOrientation:null,ariaOwns:Fn,ariaPlaceholder:null,ariaPosInSet:et,ariaPressed:Hr,ariaReadOnly:Hr,ariaRelevant:null,ariaRequired:Hr,ariaRoleDescription:Fn,ariaRowCount:et,ariaRowIndex:et,ariaRowSpan:et,ariaSelected:Hr,ariaSetSize:et,ariaSort:null,ariaValueMax:et,ariaValueMin:et,ariaValueNow:et,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Afe(e,t){return t in e?e[t]:t}function _fe(e,t){return Afe(e,t.toLowerCase())}const b_e=Xf({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:of,acceptCharset:Fn,accessKey:Fn,action:null,allow:null,allowFullScreen:Zt,allowPaymentRequest:Zt,allowUserMedia:Zt,alt:null,as:null,async:Zt,autoCapitalize:null,autoComplete:Fn,autoFocus:Zt,autoPlay:Zt,blocking:Fn,capture:null,charSet:null,checked:Zt,cite:null,className:Fn,cols:et,colSpan:null,content:null,contentEditable:Hr,controls:Zt,controlsList:Fn,coords:et|of,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Zt,defer:Zt,dir:null,dirName:null,disabled:Zt,download:qW,draggable:Hr,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Zt,formTarget:null,headers:Fn,height:et,hidden:qW,high:et,href:null,hrefLang:null,htmlFor:Fn,httpEquiv:Fn,id:null,imageSizes:null,imageSrcSet:null,inert:Zt,inputMode:null,integrity:null,is:null,isMap:Zt,itemId:null,itemProp:Fn,itemRef:Fn,itemScope:Zt,itemType:Fn,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Zt,low:et,manifest:null,max:null,maxLength:et,media:null,method:null,min:null,minLength:et,multiple:Zt,muted:Zt,name:null,nonce:null,noModule:Zt,noValidate:Zt,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Zt,optimum:et,pattern:null,ping:Fn,placeholder:null,playsInline:Zt,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Zt,referrerPolicy:null,rel:Fn,required:Zt,reversed:Zt,rows:et,rowSpan:et,sandbox:Fn,scope:null,scoped:Zt,seamless:Zt,selected:Zt,shadowRootClonable:Zt,shadowRootDelegatesFocus:Zt,shadowRootMode:null,shape:null,size:et,sizes:null,slot:null,span:et,spellCheck:Hr,src:null,srcDoc:null,srcLang:null,srcSet:null,start:et,step:null,style:null,tabIndex:et,target:null,title:null,translate:null,type:null,typeMustMatch:Zt,useMap:null,value:Hr,width:et,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Fn,axis:null,background:null,bgColor:null,border:et,borderColor:null,bottomMargin:et,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Zt,declare:Zt,event:null,face:null,frame:null,frameBorder:null,hSpace:et,leftMargin:et,link:null,longDesc:null,lowSrc:null,marginHeight:et,marginWidth:et,noResize:Zt,noHref:Zt,noShade:Zt,noWrap:Zt,object:null,profile:null,prompt:null,rev:null,rightMargin:et,rules:null,scheme:null,scrolling:Hr,standby:null,summary:null,text:null,topMargin:et,valueType:null,version:null,vAlign:null,vLink:null,vSpace:et,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Zt,disableRemotePlayback:Zt,prefix:null,property:null,results:et,security:null,unselectable:null},space:"html",transform:_fe}),M_e=Xf({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",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",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",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",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",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",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Pa,accentHeight:et,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:et,amplitude:et,arabicForm:null,ascent:et,attributeName:null,attributeType:null,azimuth:et,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:et,by:null,calcMode:null,capHeight:et,className:Fn,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:et,diffuseConstant:et,direction:null,display:null,dur:null,divisor:et,dominantBaseline:null,download:Zt,dx:null,dy:null,edgeMode:null,editable:null,elevation:et,enableBackground:null,end:null,event:null,exponent:et,externalResourcesRequired:null,fill:null,fillOpacity:et,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:of,g2:of,glyphName:of,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:et,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:et,horizOriginX:et,horizOriginY:et,id:null,ideographic:et,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:et,k:et,k1:et,k2:et,k3:et,k4:et,kernelMatrix:Pa,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:et,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:et,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:et,overlineThickness:et,paintOrder:null,panose1:null,path:null,pathLength:et,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Fn,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:et,pointsAtY:et,pointsAtZ:et,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Pa,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Pa,rev:Pa,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Pa,requiredFeatures:Pa,requiredFonts:Pa,requiredFormats:Pa,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:et,specularExponent:et,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:et,strikethroughThickness:et,string:null,stroke:null,strokeDashArray:Pa,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:et,strokeOpacity:et,strokeWidth:null,style:null,surfaceScale:et,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Pa,tabIndex:et,tableValues:null,target:null,targetX:et,targetY:et,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Pa,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:et,underlineThickness:et,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:et,values:null,vAlphabetic:et,vMathematical:et,vectorEffect:null,vHanging:et,vIdeographic:et,version:null,vertAdvY:et,vertOriginX:et,vertOriginY:et,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:et,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Afe}),Efe=Xf({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),Pfe=Xf({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:_fe}),Nfe=Xf({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),S_e={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},C_e=/[A-Z]/g,gee=/-[a-z]/g,L_e=/^data[-\w.:]+$/i;function I_e(e,t){const n=DW(t);let r=t,i=ya;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&L_e.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(gee,__e);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!gee.test(a)){let o=a.replace(C_e,A_e);o.charAt(0)!=="-"&&(o="-"+o),t="data"+o}}i=aZ}return new i(r,t)}function A_e(e){return"-"+e.toLowerCase()}function __e(e){return e.charAt(1).toUpperCase()}const E_e=Lfe([Ife,b_e,Efe,Pfe,Nfe],"html"),oZ=Lfe([Ife,M_e,Efe,Pfe,Nfe],"svg");function P_e(e){return e.join(" ").trim()}var sZ={},mee=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,N_e=/\n/g,R_e=/^\s*/,j_e=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,T_e=/^:\s*/,D_e=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,q_e=/^[;\s]*/,z_e=/^\s+|\s+$/g,O_e=`
7808
7808
  `,vee="/",kee="*",uh="",F_e="comment",B_e="declaration";function H_e(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function i(y){var v=y.match(N_e);v&&(n+=v.length);var k=y.lastIndexOf(O_e);r=~k?y.length-k:r+y.length}function a(){var y={line:n,column:r};return function(v){return v.position=new o(y),l(),v}}function o(y){this.start=y,this.end={line:n,column:r},this.source=t.source}o.prototype.content=e;function s(y){var v=new Error(t.source+":"+n+":"+r+": "+y);if(v.reason=y,v.filename=t.source,v.line=n,v.column=r,v.source=e,!t.silent)throw v}function c(y){var v=y.exec(e);if(v){var k=v[0];return i(k),e=e.slice(k.length),v}}function l(){c(R_e)}function u(y){var v;for(y=y||[];v=d();)v!==!1&&y.push(v);return y}function d(){var y=a();if(!(vee!=e.charAt(0)||kee!=e.charAt(1))){for(var v=2;uh!=e.charAt(v)&&(kee!=e.charAt(v)||vee!=e.charAt(v+1));)++v;if(v+=2,uh===e.charAt(v-1))return s("End of comment missing");var k=e.slice(2,v-2);return r+=2,i(k),e=e.slice(v),r+=2,y({type:F_e,comment:k})}}function f(){var y=a(),v=c(j_e);if(v){if(d(),!c(T_e))return s("property missing ':'");var k=c(D_e),g=y({type:B_e,property:xee(v[0].replace(mee,uh)),value:k?xee(k[0].replace(mee,uh)):uh});return c(q_e),g}}function h(){var y=[];u(y);for(var v;v=f();)v!==!1&&(y.push(v),u(y));return y}return l(),h()}function xee(e){return e?e.replace(z_e,uh):uh}var V_e=H_e,U_e=Fc&&Fc.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(sZ,"__esModule",{value:!0});sZ.default=W_e;const $_e=U_e(V_e);function W_e(e,t){let n=null;if(!e||typeof e!="string")return n;const r=(0,$_e.default)(e),i=typeof t=="function";return r.forEach(a=>{if(a.type!=="declaration")return;const{property:o,value:s}=a;i?t(o,s,a):s&&(n=n||{},n[o]=s)}),n}var Cq={};Object.defineProperty(Cq,"__esModule",{value:!0});Cq.camelCase=void 0;var G_e=/^--[a-zA-Z0-9_-]+$/,K_e=/-([a-z])/g,Z_e=/^[^-]+$/,X_e=/^-(webkit|moz|ms|o|khtml)-/,Y_e=/^-(ms)-/,J_e=function(e){return!e||Z_e.test(e)||G_e.test(e)},Q_e=function(e,t){return t.toUpperCase()},wee=function(e,t){return"".concat(t,"-")},eEe=function(e,t){return t===void 0&&(t={}),J_e(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(Y_e,wee):e=e.replace(X_e,wee),e.replace(K_e,Q_e))};Cq.camelCase=eEe;var tEe=Fc&&Fc.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},nEe=tEe(sZ),rEe=Cq;function OW(e,t){var n={};return!e||typeof e!="string"||(0,nEe.default)(e,function(r,i){r&&i&&(n[(0,rEe.camelCase)(r,t)]=i)}),n}OW.default=OW;var iEe=OW;const aEe=Rf(iEe),Rfe=jfe("end"),cZ=jfe("start");function jfe(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function oEe(e){const t=cZ(e),n=Rfe(e);if(t&&n)return{start:t,end:n}}function Op(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?bee(e.position):"start"in e||"end"in e?bee(e):"line"in e||"column"in e?FW(e):""}function FW(e){return Mee(e&&e.line)+":"+Mee(e&&e.column)}function bee(e){return FW(e&&e.start)+"-"+FW(e&&e.end)}function Mee(e){return e&&typeof e=="number"?e:1}class Ti extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",a={},o=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a={...n}),typeof t=="string"?i=t:!a.cause&&t&&(o=!0,i=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof r=="string"){const c=r.indexOf(":");c===-1?a.ruleId=r:(a.source=r.slice(0,c),a.ruleId=r.slice(c+1))}if(!a.place&&a.ancestors&&a.ancestors){const c=a.ancestors[a.ancestors.length-1];c&&(a.place=c.position)}const s=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=s?s.line:void 0,this.name=Op(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=o&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Ti.prototype.file="";Ti.prototype.name="";Ti.prototype.reason="";Ti.prototype.message="";Ti.prototype.stack="";Ti.prototype.column=void 0;Ti.prototype.line=void 0;Ti.prototype.ancestors=void 0;Ti.prototype.cause=void 0;Ti.prototype.fatal=void 0;Ti.prototype.place=void 0;Ti.prototype.ruleId=void 0;Ti.prototype.source=void 0;const lZ={}.hasOwnProperty,sEe=new Map,cEe=/[A-Z]/g,lEe=new Set(["table","tbody","thead","tfoot","tr"]),uEe=new Set(["td","th"]),Tfe="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function dEe(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=kEe(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=vEe(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?oZ:E_e,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=Dfe(i,e,void 0);return a&&typeof a!="string"?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function Dfe(e,t,n){if(t.type==="element")return hEe(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return fEe(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return yEe(e,t,n);if(t.type==="mdxjsEsm")return pEe(e,t);if(t.type==="root")return gEe(e,t,n);if(t.type==="text")return mEe(e,t)}function hEe(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=oZ,e.schema=i),e.ancestors.push(t);const a=zfe(e,t.tagName,!1),o=xEe(e,t);let s=dZ(e,t);return lEe.has(t.tagName)&&(s=s.filter(function(c){return typeof c=="string"?!x_e(c):!0})),qfe(e,o,a,t),uZ(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function fEe(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}by(e,t.position)}function pEe(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);by(e,t.position)}function yEe(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=oZ,e.schema=i),e.ancestors.push(t);const a=t.name===null?e.Fragment:zfe(e,t.name,!0),o=wEe(e,t),s=dZ(e,t);return qfe(e,o,a,t),uZ(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function gEe(e,t,n){const r={};return uZ(r,dZ(e,t)),e.create(t,e.Fragment,r,n)}function mEe(e,t){return t.value}function qfe(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function uZ(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function vEe(e,t,n){return r;function r(i,a,o,s){const l=Array.isArray(o.children)?n:t;return s?l(a,o,s):l(a,o)}}function kEe(e,t){return n;function n(r,i,a,o){const s=Array.isArray(a.children),c=cZ(r);return t(i,a,o,s,{columnNumber:c?c.column-1:void 0,fileName:e,lineNumber:c?c.line:void 0},void 0)}}function xEe(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&lZ.call(t.properties,i)){const a=bEe(e,i,t.properties[i]);if(a){const[o,s]=a;e.tableCellAlignToStyle&&o==="align"&&typeof s=="string"&&uEe.has(t.tagName)?r=s:n[o]=s}}if(r){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function wEe(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const a=r.data.estree.body[0];a.type;const o=a.expression;o.type;const s=o.properties[0];s.type,Object.assign(n,e.evaluater.evaluateExpression(s.argument))}else by(e,t.position);else{const i=r.name;let a;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const s=r.value.data.estree.body[0];s.type,a=e.evaluater.evaluateExpression(s.expression)}else by(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function dZ(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:sEe;for(;++r<t.children.length;){const a=t.children[r];let o;if(e.passKeys){const c=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(c){const l=i.get(c)||0;o=c+"-"+l,i.set(c,l+1)}}const s=Dfe(e,a,o);s!==void 0&&n.push(s)}return n}function bEe(e,t,n){const r=I_e(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?y_e(n):P_e(n)),r.property==="style"){let i=typeof n=="object"?n:MEe(e,String(n));return e.stylePropertyNameCase==="css"&&(i=SEe(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?S_e[r.property]||r.property:r.attribute,n]}}function MEe(e,t){try{return aEe(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new Ti("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=Tfe+"#cannot-parse-style-attribute",i}}function zfe(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let a=-1,o;for(;++a<i.length;){const s=fee(i[a])?{type:"Identifier",name:i[a]}:{type:"Literal",value:i[a]};o=o?{type:"MemberExpression",object:o,property:s,computed:!!(a&&s.type==="Literal"),optional:!1}:s}r=o}else r=fee(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return lZ.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);by(e)}function by(e,t){const n=new Ti("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=Tfe+"#cannot-handle-mdx-estrees-without-createevaluater",n}function SEe(e){const t={};let n;for(n in e)lZ.call(e,n)&&(t[CEe(n)]=e[n]);return t}function CEe(e){let t=e.replace(cEe,LEe);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function LEe(e){return"-"+e.toLowerCase()}const bO={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},IEe={};function hZ(e,t){const n=IEe,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Ofe(e,r,i)}function Ofe(e,t,n){if(AEe(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return See(e.children,t,n)}return Array.isArray(e)?See(e,t,n):""}function See(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=Ofe(e[i],t,n);return r.join("")}function AEe(e){return!!(e&&typeof e=="object")}const Cee=document.createElement("i");function fZ(e){const t="&"+e+";";Cee.innerHTML=t;const n=Cee.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Fa(e,t,n,r){const i=e.length;let a=0,o;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function no(e,t){return e.length>0?(Fa(e,e.length,0,t),e):t}const Lee={}.hasOwnProperty;function Ffe(e){const t={};let n=-1;for(;++n<e.length;)_Ee(t,e[n]);return t}function _Ee(e,t){let n;for(n in t){const i=(Lee.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let o;if(a)for(o in a){Lee.call(i,o)||(i[o]=[]);const s=a[o];EEe(i[o],Array.isArray(s)?s:s?[s]:[])}}}function EEe(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Fa(e,0,0,r)}function Bfe(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function To(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Wi=yl(/[A-Za-z]/),Ni=yl(/[\dA-Za-z]/),PEe=yl(/[#-'*+\--9=?A-Z^-~]/);function dD(e){return e!==null&&(e<32||e===127)}const BW=yl(/\d/),NEe=yl(/[\dA-Fa-f]/),REe=yl(/[!-/:-@[-`{-~]/);function Rt(e){return e!==null&&e<-2}function Pn(e){return e!==null&&(e<0||e===32)}function Qt(e){return e===-2||e===-1||e===32}const Lq=yl(new RegExp("\\p{P}|\\p{S}","u")),jh=yl(/\s/);function yl(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Yf(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const a=e.charCodeAt(n);let o="";if(a===37&&Ni(e.charCodeAt(n+1))&&Ni(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){const s=e.charCodeAt(n+1);a<56320&&s>56319&&s<57344?(o=String.fromCharCode(a,s),i=1):o="�"}else o=String.fromCharCode(a);o&&(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,o=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function ln(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let a=0;return o;function o(c){return Qt(c)?(e.enter(n),s(c)):t(c)}function s(c){return Qt(c)&&a++<i?(e.consume(c),s):(e.exit(n),t(c))}}const jEe={tokenize:TEe};function TEe(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),ln(e,t,"linePrefix")}function i(s){return e.enter("paragraph"),a(s)}function a(s){const c=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=c),n=c,o(s)}function o(s){if(s===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(s);return}return Rt(s)?(e.consume(s),e.exit("chunkText"),a):(e.consume(s),o)}}const DEe={tokenize:qEe},Iee={tokenize:zEe};function qEe(e){const t=this,n=[];let r=0,i,a,o;return s;function s(w){if(r<n.length){const C=n[r];return t.containerState=C[1],e.attempt(C[0].continuation,c,l)(w)}return l(w)}function c(w){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&S();const C=t.events.length;let _=C,A;for(;_--;)if(t.events[_][0]==="exit"&&t.events[_][1].type==="chunkFlow"){A=t.events[_][1].end;break}g(r);let j=C;for(;j<t.events.length;)t.events[j][1].end={...A},j++;return Fa(t.events,_+1,0,t.events.slice(C)),t.events.length=j,l(w)}return s(w)}function l(w){if(r===n.length){if(!i)return f(w);if(i.currentConstruct&&i.currentConstruct.concrete)return y(w);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Iee,u,d)(w)}function u(w){return i&&S(),g(r),f(w)}function d(w){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,y(w)}function f(w){return t.containerState={},e.attempt(Iee,h,y)(w)}function h(w){return r++,n.push([t.currentConstruct,t.containerState]),f(w)}function y(w){if(w===null){i&&S(),g(0),e.consume(w);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:a}),v(w)}function v(w){if(w===null){k(e.exit("chunkFlow"),!0),g(0),e.consume(w);return}return Rt(w)?(e.consume(w),k(e.exit("chunkFlow")),r=0,t.interrupt=void 0,s):(e.consume(w),v)}function k(w,C){const _=t.sliceStream(w);if(C&&_.push(null),w.previous=a,a&&(a.next=w),a=w,i.defineSkip(w.start),i.write(_),t.parser.lazy[w.start.line]){let A=i.events.length;for(;A--;)if(i.events[A][1].start.offset<o&&(!i.events[A][1].end||i.events[A][1].end.offset>o))return;const j=t.events.length;let O=j,T,D;for(;O--;)if(t.events[O][0]==="exit"&&t.events[O][1].type==="chunkFlow"){if(T){D=t.events[O][1].end;break}T=!0}for(g(r),A=j;A<t.events.length;)t.events[A][1].end={...D},A++;Fa(t.events,O+1,0,t.events.slice(j)),t.events.length=A}}function g(w){let C=n.length;for(;C-- >w;){const _=n[C];t.containerState=_[1],_[0].exit.call(t,e)}n.length=w}function S(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function zEe(e,t,n){return ln(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Nf(e){if(e===null||Pn(e)||jh(e))return 1;if(Lq(e))return 2}function Iq(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const HW={name:"attention",resolveAll:OEe,tokenize:FEe};function OEe(e,t){let n=-1,r,i,a,o,s,c,l,u;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const d={...e[r][1].end},f={...e[n][1].start};Aee(d,-c),Aee(f,c),o={type:c>1?"strongSequence":"emphasisSequence",start:d,end:{...e[r][1].end}},s={type:c>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:f},a={type:c>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?"strong":"emphasis",start:{...o.start},end:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=no(l,[["enter",e[r][1],t],["exit",e[r][1],t]])),l=no(l,[["enter",i,t],["enter",o,t],["exit",o,t],["enter",a,t]]),l=no(l,Iq(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=no(l,[["exit",a,t],["enter",s,t],["exit",s,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,l=no(l,[["enter",e[n][1],t],["exit",e[n][1],t]])):u=0,Fa(e,r-1,n-r+3,l),n=r+l.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function FEe(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Nf(r);let a;return o;function o(c){return a=c,e.enter("attentionSequence"),s(c)}function s(c){if(c===a)return e.consume(c),s;const l=e.exit("attentionSequence"),u=Nf(c),d=!u||u===2&&i||n.includes(c),f=!i||i===2&&u||n.includes(r);return l._open=!!(a===42?d:d&&(i||!f)),l._close=!!(a===42?f:f&&(u||!d)),t(c)}}function Aee(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const BEe={name:"autolink",tokenize:HEe};function HEe(e,t,n){let r=0;return i;function i(h){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(h){return Wi(h)?(e.consume(h),o):h===64?n(h):l(h)}function o(h){return h===43||h===45||h===46||Ni(h)?(r=1,s(h)):l(h)}function s(h){return h===58?(e.consume(h),r=0,c):(h===43||h===45||h===46||Ni(h))&&r++<32?(e.consume(h),s):(r=0,l(h))}function c(h){return h===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):h===null||h===32||h===60||dD(h)?n(h):(e.consume(h),c)}function l(h){return h===64?(e.consume(h),u):PEe(h)?(e.consume(h),l):n(h)}function u(h){return Ni(h)?d(h):n(h)}function d(h){return h===46?(e.consume(h),r=0,u):h===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):f(h)}function f(h){if((h===45||Ni(h))&&r++<63){const y=h===45?f:d;return e.consume(h),y}return n(h)}}const ag={partial:!0,tokenize:VEe};function VEe(e,t,n){return r;function r(a){return Qt(a)?ln(e,i,"linePrefix")(a):i(a)}function i(a){return a===null||Rt(a)?t(a):n(a)}}const Hfe={continuation:{tokenize:$Ee},exit:WEe,name:"blockQuote",tokenize:UEe};function UEe(e,t,n){const r=this;return i;function i(o){if(o===62){const s=r.containerState;return s.open||(e.enter("blockQuote",{_container:!0}),s.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(o),e.exit("blockQuoteMarker"),a}return n(o)}function a(o){return Qt(o)?(e.enter("blockQuotePrefixWhitespace"),e.consume(o),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(o))}}function $Ee(e,t,n){const r=this;return i;function i(o){return Qt(o)?ln(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):a(o)}function a(o){return e.attempt(Hfe,t,n)(o)}}function WEe(e){e.exit("blockQuote")}const Vfe={name:"characterEscape",tokenize:GEe};function GEe(e,t,n){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),i}function i(a){return REe(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const Ufe={name:"characterReference",tokenize:KEe};function KEe(e,t,n){const r=this;let i=0,a,o;return s;function s(d){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),c}function c(d){return d===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(d),e.exit("characterReferenceMarkerNumeric"),l):(e.enter("characterReferenceValue"),a=31,o=Ni,u(d))}function l(d){return d===88||d===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(d),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,o=NEe,u):(e.enter("characterReferenceValue"),a=7,o=BW,u(d))}function u(d){if(d===59&&i){const f=e.exit("characterReferenceValue");return o===Ni&&!fZ(r.sliceSerialize(f))?n(d):(e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return o(d)&&i++<a?(e.consume(d),u):n(d)}}const _ee={partial:!0,tokenize:XEe},Eee={concrete:!0,name:"codeFenced",tokenize:ZEe};function ZEe(e,t,n){const r=this,i={partial:!0,tokenize:_};let a=0,o=0,s;return c;function c(A){return l(A)}function l(A){const j=r.events[r.events.length-1];return a=j&&j[1].type==="linePrefix"?j[2].sliceSerialize(j[1],!0).length:0,s=A,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),u(A)}function u(A){return A===s?(o++,e.consume(A),u):o<3?n(A):(e.exit("codeFencedFenceSequence"),Qt(A)?ln(e,d,"whitespace")(A):d(A))}function d(A){return A===null||Rt(A)?(e.exit("codeFencedFence"),r.interrupt?t(A):e.check(_ee,v,C)(A)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),f(A))}function f(A){return A===null||Rt(A)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(A)):Qt(A)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),ln(e,h,"whitespace")(A)):A===96&&A===s?n(A):(e.consume(A),f)}function h(A){return A===null||Rt(A)?d(A):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),y(A))}function y(A){return A===null||Rt(A)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(A)):A===96&&A===s?n(A):(e.consume(A),y)}function v(A){return e.attempt(i,C,k)(A)}function k(A){return e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),g}function g(A){return a>0&&Qt(A)?ln(e,S,"linePrefix",a+1)(A):S(A)}function S(A){return A===null||Rt(A)?e.check(_ee,v,C)(A):(e.enter("codeFlowValue"),w(A))}function w(A){return A===null||Rt(A)?(e.exit("codeFlowValue"),S(A)):(e.consume(A),w)}function C(A){return e.exit("codeFenced"),t(A)}function _(A,j,O){let T=0;return D;function D(K){return A.enter("lineEnding"),A.consume(K),A.exit("lineEnding"),I}function I(K){return A.enter("codeFencedFence"),Qt(K)?ln(A,R,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(K):R(K)}function R(K){return K===s?(A.enter("codeFencedFenceSequence"),U(K)):O(K)}function U(K){return K===s?(T++,A.consume(K),U):T>=o?(A.exit("codeFencedFenceSequence"),Qt(K)?ln(A,q,"whitespace")(K):q(K)):O(K)}function q(K){return K===null||Rt(K)?(A.exit("codeFencedFence"),j(K)):O(K)}}}function XEe(e,t,n){const r=this;return i;function i(o){return o===null?n(o):(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),a)}function a(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}const MO={name:"codeIndented",tokenize:JEe},YEe={partial:!0,tokenize:QEe};function JEe(e,t,n){const r=this;return i;function i(l){return e.enter("codeIndented"),ln(e,a,"linePrefix",5)(l)}function a(l){const u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?o(l):n(l)}function o(l){return l===null?c(l):Rt(l)?e.attempt(YEe,o,c)(l):(e.enter("codeFlowValue"),s(l))}function s(l){return l===null||Rt(l)?(e.exit("codeFlowValue"),o(l)):(e.consume(l),s)}function c(l){return e.exit("codeIndented"),t(l)}}function QEe(e,t,n){const r=this;return i;function i(o){return r.parser.lazy[r.now().line]?n(o):Rt(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i):ln(e,a,"linePrefix",5)(o)}function a(o){const s=r.events[r.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(o):Rt(o)?i(o):n(o)}}const ePe={name:"codeText",previous:nPe,resolve:tPe,tokenize:rPe};function tPe(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function nPe(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function rPe(e,t,n){let r=0,i,a;return o;function o(d){return e.enter("codeText"),e.enter("codeTextSequence"),s(d)}function s(d){return d===96?(e.consume(d),r++,s):(e.exit("codeTextSequence"),c(d))}function c(d){return d===null?n(d):d===32?(e.enter("space"),e.consume(d),e.exit("space"),c):d===96?(a=e.enter("codeTextSequence"),i=0,u(d)):Rt(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),c):(e.enter("codeTextData"),l(d))}function l(d){return d===null||d===32||d===96||Rt(d)?(e.exit("codeTextData"),c(d)):(e.consume(d),l)}function u(d){return d===96?(e.consume(d),i++,u):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(d)):(a.type="codeTextData",l(d))}}class iPe{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&R0(this.left,r),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),R0(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),R0(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);R0(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);R0(this.left,n.reverse())}}}function R0(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function $fe(e){const t={};let n=-1,r,i,a,o,s,c,l;const u=new iPe(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type==="chunkFlow"&&u.get(n-1)[1].type==="listItemPrefix"&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type==="lineEndingBlank"&&(a+=2),a<c.length&&c[a][1].type==="content"))for(;++a<c.length&&c[a][1].type!=="content";)c[a][1].type==="chunkText"&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,aPe(u,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=u.get(a),o[1].type==="lineEnding"||o[1].type==="lineEndingBlank")o[0]==="enter"&&(i&&(u.get(i)[1].type="lineEndingBlank"),o[1].type="lineEnding",i=a);else if(!(o[1].type==="linePrefix"||o[1].type==="listItemIndent"))break;i&&(r[1].end={...u.get(i)[1].start},s=u.slice(i,n),s.unshift(r),u.splice(i,n-i+1,s))}}return Fa(e,0,Number.POSITIVE_INFINITY,u.slice(0)),!l}function aPe(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const a=[];let o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));const s=o.events,c=[],l={};let u,d,f=-1,h=n,y=0,v=0;const k=[v];for(;h;){for(;e.get(++i)[1]!==h;);a.push(i),h._tokenizer||(u=r.sliceStream(h),h.next||u.push(null),d&&o.defineSkip(h.start),h._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),h._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=h,h=h.next}for(h=n;++f<s.length;)s[f][0]==="exit"&&s[f-1][0]==="enter"&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(v=f+1,k.push(v),h._tokenizer=void 0,h.previous=void 0,h=h.next);for(o.events=[],h?(h._tokenizer=void 0,h.previous=void 0):k.pop(),f=k.length;f--;){const g=s.slice(k[f],k[f+1]),S=a.pop();c.push([S,S+g.length-1]),e.splice(S,2,g)}for(c.reverse(),f=-1;++f<c.length;)l[y+c[f][0]]=y+c[f][1],y+=c[f][1]-c[f][0]-1;return l}const oPe={resolve:cPe,tokenize:lPe},sPe={partial:!0,tokenize:uPe};function cPe(e){return $fe(e),e}function lPe(e,t){let n;return r;function r(s){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(s)}function i(s){return s===null?a(s):Rt(s)?e.check(sPe,o,a)(s):(e.consume(s),i)}function a(s){return e.exit("chunkContent"),e.exit("content"),t(s)}function o(s){return e.consume(s),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function uPe(e,t,n){const r=this;return i;function i(o){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),ln(e,a,"linePrefix")}function a(o){if(o===null||Rt(o))return n(o);const s=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(o):e.interrupt(r.parser.constructs.flow,n,t)(o)}}function Wfe(e,t,n,r,i,a,o,s,c){const l=c||Number.POSITIVE_INFINITY;let u=0;return d;function d(g){return g===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(g),e.exit(a),f):g===null||g===32||g===41||dD(g)?n(g):(e.enter(r),e.enter(o),e.enter(s),e.enter("chunkString",{contentType:"string"}),v(g))}function f(g){return g===62?(e.enter(a),e.consume(g),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),h(g))}function h(g){return g===62?(e.exit("chunkString"),e.exit(s),f(g)):g===null||g===60||Rt(g)?n(g):(e.consume(g),g===92?y:h)}function y(g){return g===60||g===62||g===92?(e.consume(g),h):h(g)}function v(g){return!u&&(g===null||g===41||Pn(g))?(e.exit("chunkString"),e.exit(s),e.exit(o),e.exit(r),t(g)):u<l&&g===40?(e.consume(g),u++,v):g===41?(e.consume(g),u--,v):g===null||g===32||g===40||dD(g)?n(g):(e.consume(g),g===92?k:v)}function k(g){return g===40||g===41||g===92?(e.consume(g),v):v(g)}}function Gfe(e,t,n,r,i,a){const o=this;let s=0,c;return l;function l(h){return e.enter(r),e.enter(i),e.consume(h),e.exit(i),e.enter(a),u}function u(h){return s>999||h===null||h===91||h===93&&!c||h===94&&!s&&"_hiddenFootnoteSupport"in o.parser.constructs?n(h):h===93?(e.exit(a),e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):Rt(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),u):(e.enter("chunkString",{contentType:"string"}),d(h))}function d(h){return h===null||h===91||h===93||Rt(h)||s++>999?(e.exit("chunkString"),u(h)):(e.consume(h),c||(c=!Qt(h)),h===92?f:d)}function f(h){return h===91||h===92||h===93?(e.consume(h),s++,d):d(h)}}function Kfe(e,t,n,r,i,a){let o;return s;function s(f){return f===34||f===39||f===40?(e.enter(r),e.enter(i),e.consume(f),e.exit(i),o=f===40?41:f,c):n(f)}function c(f){return f===o?(e.enter(i),e.consume(f),e.exit(i),e.exit(r),t):(e.enter(a),l(f))}function l(f){return f===o?(e.exit(a),c(o)):f===null?n(f):Rt(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),ln(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),u(f))}function u(f){return f===o||f===null||Rt(f)?(e.exit("chunkString"),l(f)):(e.consume(f),f===92?d:u)}function d(f){return f===o||f===92?(e.consume(f),u):u(f)}}function Fp(e,t){let n;return r;function r(i){return Rt(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):Qt(i)?ln(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const dPe={name:"definition",tokenize:fPe},hPe={partial:!0,tokenize:pPe};function fPe(e,t,n){const r=this;let i;return a;function a(h){return e.enter("definition"),o(h)}function o(h){return Gfe.call(r,e,s,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(h)}function s(h){return i=To(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),c):n(h)}function c(h){return Pn(h)?Fp(e,l)(h):l(h)}function l(h){return Wfe(e,u,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(h)}function u(h){return e.attempt(hPe,d,d)(h)}function d(h){return Qt(h)?ln(e,f,"whitespace")(h):f(h)}function f(h){return h===null||Rt(h)?(e.exit("definition"),r.parser.defined.push(i),t(h)):n(h)}}function pPe(e,t,n){return r;function r(s){return Pn(s)?Fp(e,i)(s):n(s)}function i(s){return Kfe(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function a(s){return Qt(s)?ln(e,o,"whitespace")(s):o(s)}function o(s){return s===null||Rt(s)?t(s):n(s)}}const yPe={name:"hardBreakEscape",tokenize:gPe};function gPe(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),i}function i(a){return Rt(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const mPe={name:"headingAtx",resolve:vPe,tokenize:kPe};function vPe(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},a={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Fa(e,r,n-r+1,[["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t]])),e}function kPe(e,t,n){let r=0;return i;function i(u){return e.enter("atxHeading"),a(u)}function a(u){return e.enter("atxHeadingSequence"),o(u)}function o(u){return u===35&&r++<6?(e.consume(u),o):u===null||Pn(u)?(e.exit("atxHeadingSequence"),s(u)):n(u)}function s(u){return u===35?(e.enter("atxHeadingSequence"),c(u)):u===null||Rt(u)?(e.exit("atxHeading"),t(u)):Qt(u)?ln(e,s,"whitespace")(u):(e.enter("atxHeadingText"),l(u))}function c(u){return u===35?(e.consume(u),c):(e.exit("atxHeadingSequence"),s(u))}function l(u){return u===null||u===35||Pn(u)?(e.exit("atxHeadingText"),s(u)):(e.consume(u),l)}}const xPe=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Pee=["pre","script","style","textarea"],wPe={concrete:!0,name:"htmlFlow",resolveTo:SPe,tokenize:CPe},bPe={partial:!0,tokenize:IPe},MPe={partial:!0,tokenize:LPe};function SPe(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function CPe(e,t,n){const r=this;let i,a,o,s,c;return l;function l(P){return u(P)}function u(P){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(P),d}function d(P){return P===33?(e.consume(P),f):P===47?(e.consume(P),a=!0,v):P===63?(e.consume(P),i=3,r.interrupt?t:F):Wi(P)?(e.consume(P),o=String.fromCharCode(P),k):n(P)}function f(P){return P===45?(e.consume(P),i=2,h):P===91?(e.consume(P),i=5,s=0,y):Wi(P)?(e.consume(P),i=4,r.interrupt?t:F):n(P)}function h(P){return P===45?(e.consume(P),r.interrupt?t:F):n(P)}function y(P){const G="CDATA[";return P===G.charCodeAt(s++)?(e.consume(P),s===G.length?r.interrupt?t:R:y):n(P)}function v(P){return Wi(P)?(e.consume(P),o=String.fromCharCode(P),k):n(P)}function k(P){if(P===null||P===47||P===62||Pn(P)){const G=P===47,J=o.toLowerCase();return!G&&!a&&Pee.includes(J)?(i=1,r.interrupt?t(P):R(P)):xPe.includes(o.toLowerCase())?(i=6,G?(e.consume(P),g):r.interrupt?t(P):R(P)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(P):a?S(P):w(P))}return P===45||Ni(P)?(e.consume(P),o+=String.fromCharCode(P),k):n(P)}function g(P){return P===62?(e.consume(P),r.interrupt?t:R):n(P)}function S(P){return Qt(P)?(e.consume(P),S):D(P)}function w(P){return P===47?(e.consume(P),D):P===58||P===95||Wi(P)?(e.consume(P),C):Qt(P)?(e.consume(P),w):D(P)}function C(P){return P===45||P===46||P===58||P===95||Ni(P)?(e.consume(P),C):_(P)}function _(P){return P===61?(e.consume(P),A):Qt(P)?(e.consume(P),_):w(P)}function A(P){return P===null||P===60||P===61||P===62||P===96?n(P):P===34||P===39?(e.consume(P),c=P,j):Qt(P)?(e.consume(P),A):O(P)}function j(P){return P===c?(e.consume(P),c=null,T):P===null||Rt(P)?n(P):(e.consume(P),j)}function O(P){return P===null||P===34||P===39||P===47||P===60||P===61||P===62||P===96||Pn(P)?_(P):(e.consume(P),O)}function T(P){return P===47||P===62||Qt(P)?w(P):n(P)}function D(P){return P===62?(e.consume(P),I):n(P)}function I(P){return P===null||Rt(P)?R(P):Qt(P)?(e.consume(P),I):n(P)}function R(P){return P===45&&i===2?(e.consume(P),Z):P===60&&i===1?(e.consume(P),$):P===62&&i===4?(e.consume(P),ie):P===63&&i===3?(e.consume(P),F):P===93&&i===5?(e.consume(P),V):Rt(P)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(bPe,N,U)(P)):P===null||Rt(P)?(e.exit("htmlFlowData"),U(P)):(e.consume(P),R)}function U(P){return e.check(MPe,q,N)(P)}function q(P){return e.enter("lineEnding"),e.consume(P),e.exit("lineEnding"),K}function K(P){return P===null||Rt(P)?U(P):(e.enter("htmlFlowData"),R(P))}function Z(P){return P===45?(e.consume(P),F):R(P)}function $(P){return P===47?(e.consume(P),o="",B):R(P)}function B(P){if(P===62){const G=o.toLowerCase();return Pee.includes(G)?(e.consume(P),ie):R(P)}return Wi(P)&&o.length<8?(e.consume(P),o+=String.fromCharCode(P),B):R(P)}function V(P){return P===93?(e.consume(P),F):R(P)}function F(P){return P===62?(e.consume(P),ie):P===45&&i===2?(e.consume(P),F):R(P)}function ie(P){return P===null||Rt(P)?(e.exit("htmlFlowData"),N(P)):(e.consume(P),ie)}function N(P){return e.exit("htmlFlow"),t(P)}}function LPe(e,t,n){const r=this;return i;function i(o){return Rt(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),a):n(o)}function a(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}function IPe(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(ag,t,n)}}const APe={name:"htmlText",tokenize:_Pe};function _Pe(e,t,n){const r=this;let i,a,o;return s;function s(F){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(F),c}function c(F){return F===33?(e.consume(F),l):F===47?(e.consume(F),_):F===63?(e.consume(F),w):Wi(F)?(e.consume(F),O):n(F)}function l(F){return F===45?(e.consume(F),u):F===91?(e.consume(F),a=0,y):Wi(F)?(e.consume(F),S):n(F)}function u(F){return F===45?(e.consume(F),h):n(F)}function d(F){return F===null?n(F):F===45?(e.consume(F),f):Rt(F)?(o=d,$(F)):(e.consume(F),d)}function f(F){return F===45?(e.consume(F),h):d(F)}function h(F){return F===62?Z(F):F===45?f(F):d(F)}function y(F){const ie="CDATA[";return F===ie.charCodeAt(a++)?(e.consume(F),a===ie.length?v:y):n(F)}function v(F){return F===null?n(F):F===93?(e.consume(F),k):Rt(F)?(o=v,$(F)):(e.consume(F),v)}function k(F){return F===93?(e.consume(F),g):v(F)}function g(F){return F===62?Z(F):F===93?(e.consume(F),g):v(F)}function S(F){return F===null||F===62?Z(F):Rt(F)?(o=S,$(F)):(e.consume(F),S)}function w(F){return F===null?n(F):F===63?(e.consume(F),C):Rt(F)?(o=w,$(F)):(e.consume(F),w)}function C(F){return F===62?Z(F):w(F)}function _(F){return Wi(F)?(e.consume(F),A):n(F)}function A(F){return F===45||Ni(F)?(e.consume(F),A):j(F)}function j(F){return Rt(F)?(o=j,$(F)):Qt(F)?(e.consume(F),j):Z(F)}function O(F){return F===45||Ni(F)?(e.consume(F),O):F===47||F===62||Pn(F)?T(F):n(F)}function T(F){return F===47?(e.consume(F),Z):F===58||F===95||Wi(F)?(e.consume(F),D):Rt(F)?(o=T,$(F)):Qt(F)?(e.consume(F),T):Z(F)}function D(F){return F===45||F===46||F===58||F===95||Ni(F)?(e.consume(F),D):I(F)}function I(F){return F===61?(e.consume(F),R):Rt(F)?(o=I,$(F)):Qt(F)?(e.consume(F),I):T(F)}function R(F){return F===null||F===60||F===61||F===62||F===96?n(F):F===34||F===39?(e.consume(F),i=F,U):Rt(F)?(o=R,$(F)):Qt(F)?(e.consume(F),R):(e.consume(F),q)}function U(F){return F===i?(e.consume(F),i=void 0,K):F===null?n(F):Rt(F)?(o=U,$(F)):(e.consume(F),U)}function q(F){return F===null||F===34||F===39||F===60||F===61||F===96?n(F):F===47||F===62||Pn(F)?T(F):(e.consume(F),q)}function K(F){return F===47||F===62||Pn(F)?T(F):n(F)}function Z(F){return F===62?(e.consume(F),e.exit("htmlTextData"),e.exit("htmlText"),t):n(F)}function $(F){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(F),e.exit("lineEnding"),B}function B(F){return Qt(F)?ln(e,V,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(F):V(F)}function V(F){return e.enter("htmlTextData"),o(F)}}const pZ={name:"labelEnd",resolveAll:RPe,resolveTo:jPe,tokenize:TPe},EPe={tokenize:DPe},PPe={tokenize:qPe},NPe={tokenize:zPe};function RPe(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&Fa(e,0,e.length,n),e}function jPe(e,t){let n=e.length,r=0,i,a,o,s;for(;n--;)if(i=e[n][1],a){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(o){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(a=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(o=n);const c={type:e[a][1].type==="labelLink"?"link":"image",start:{...e[a][1].start},end:{...e[e.length-1][1].end}},l={type:"label",start:{...e[a][1].start},end:{...e[o][1].end}},u={type:"labelText",start:{...e[a+r+2][1].end},end:{...e[o-2][1].start}};return s=[["enter",c,t],["enter",l,t]],s=no(s,e.slice(a+1,a+r+3)),s=no(s,[["enter",u,t]]),s=no(s,Iq(t.parser.constructs.insideSpan.null,e.slice(a+r+4,o-3),t)),s=no(s,[["exit",u,t],e[o-2],e[o-1],["exit",l,t]]),s=no(s,e.slice(o+1)),s=no(s,[["exit",c,t]]),Fa(e,a,e.length,s),e}function TPe(e,t,n){const r=this;let i=r.events.length,a,o;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){a=r.events[i][1];break}return s;function s(f){return a?a._inactive?d(f):(o=r.parser.defined.includes(To(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelEnd"),c):n(f)}function c(f){return f===40?e.attempt(EPe,u,o?u:d)(f):f===91?e.attempt(PPe,u,o?l:d)(f):o?u(f):d(f)}function l(f){return e.attempt(NPe,u,d)(f)}function u(f){return t(f)}function d(f){return a._balanced=!0,n(f)}}function DPe(e,t,n){return r;function r(d){return e.enter("resource"),e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),i}function i(d){return Pn(d)?Fp(e,a)(d):a(d)}function a(d){return d===41?u(d):Wfe(e,o,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function o(d){return Pn(d)?Fp(e,c)(d):u(d)}function s(d){return n(d)}function c(d){return d===34||d===39||d===40?Kfe(e,l,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):u(d)}function l(d){return Pn(d)?Fp(e,u)(d):u(d)}function u(d){return d===41?(e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),e.exit("resource"),t):n(d)}}function qPe(e,t,n){const r=this;return i;function i(s){return Gfe.call(r,e,a,o,"reference","referenceMarker","referenceString")(s)}function a(s){return r.parser.defined.includes(To(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(s):n(s)}function o(s){return n(s)}}function zPe(e,t,n){return r;function r(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),i}function i(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}const OPe={name:"labelStartImage",resolveAll:pZ.resolveAll,tokenize:FPe};function FPe(e,t,n){const r=this;return i;function i(s){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(s),e.exit("labelImageMarker"),a}function a(s){return s===91?(e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelImage"),o):n(s)}function o(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const BPe={name:"labelStartLink",resolveAll:pZ.resolveAll,tokenize:HPe};function HPe(e,t,n){const r=this;return i;function i(o){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelLink"),a}function a(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(o):t(o)}}const SO={name:"lineEnding",tokenize:VPe};function VPe(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),ln(e,t,"linePrefix")}}const lT={name:"thematicBreak",tokenize:UPe};function UPe(e,t,n){let r=0,i;return a;function a(l){return e.enter("thematicBreak"),o(l)}function o(l){return i=l,s(l)}function s(l){return l===i?(e.enter("thematicBreakSequence"),c(l)):r>=3&&(l===null||Rt(l))?(e.exit("thematicBreak"),t(l)):n(l)}function c(l){return l===i?(e.consume(l),r++,c):(e.exit("thematicBreakSequence"),Qt(l)?ln(e,s,"whitespace")(l):s(l))}}const ia={continuation:{tokenize:KPe},exit:XPe,name:"list",tokenize:GPe},$Pe={partial:!0,tokenize:YPe},WPe={partial:!0,tokenize:ZPe};function GPe(e,t,n){const r=this,i=r.events[r.events.length-1];let a=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(h){const y=r.containerState.type||(h===42||h===43||h===45?"listUnordered":"listOrdered");if(y==="listUnordered"?!r.containerState.marker||h===r.containerState.marker:BW(h)){if(r.containerState.type||(r.containerState.type=y,e.enter(y,{_container:!0})),y==="listUnordered")return e.enter("listItemPrefix"),h===42||h===45?e.check(lT,n,l)(h):l(h);if(!r.interrupt||h===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),c(h)}return n(h)}function c(h){return BW(h)&&++o<10?(e.consume(h),c):(!r.interrupt||o<2)&&(r.containerState.marker?h===r.containerState.marker:h===41||h===46)?(e.exit("listItemValue"),l(h)):n(h)}function l(h){return e.enter("listItemMarker"),e.consume(h),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||h,e.check(ag,r.interrupt?n:u,e.attempt($Pe,f,d))}function u(h){return r.containerState.initialBlankLine=!0,a++,f(h)}function d(h){return Qt(h)?(e.enter("listItemPrefixWhitespace"),e.consume(h),e.exit("listItemPrefixWhitespace"),f):n(h)}function f(h){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(h)}}function KPe(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(ag,i,a);function i(s){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,ln(e,t,"listItemIndent",r.containerState.size+1)(s)}function a(s){return r.containerState.furtherBlankLines||!Qt(s)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(s)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(WPe,t,o)(s))}function o(s){return r.containerState._closeFlow=!0,r.interrupt=void 0,ln(e,e.attempt(ia,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function ZPe(e,t,n){const r=this;return ln(e,i,"listItemIndent",r.containerState.size+1);function i(a){const o=r.events[r.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?t(a):n(a)}}function XPe(e){e.exit(this.containerState.type)}function YPe(e,t,n){const r=this;return ln(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(a){const o=r.events[r.events.length-1];return!Qt(a)&&o&&o[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const Nee={name:"setextUnderline",resolveTo:JPe,tokenize:QPe};function JPe(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);const o={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",a?(e.splice(i,0,["enter",o,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=o,e.push(["exit",o,t]),e}function QPe(e,t,n){const r=this;let i;return a;function a(l){let u=r.events.length,d;for(;u--;)if(r.events[u][1].type!=="lineEnding"&&r.events[u][1].type!=="linePrefix"&&r.events[u][1].type!=="content"){d=r.events[u][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||d)?(e.enter("setextHeadingLine"),i=l,o(l)):n(l)}function o(l){return e.enter("setextHeadingLineSequence"),s(l)}function s(l){return l===i?(e.consume(l),s):(e.exit("setextHeadingLineSequence"),Qt(l)?ln(e,c,"lineSuffix")(l):c(l))}function c(l){return l===null||Rt(l)?(e.exit("setextHeadingLine"),t(l)):n(l)}}const eNe={tokenize:tNe};function tNe(e){const t=this,n=e.attempt(ag,r,e.attempt(this.parser.constructs.flowInitial,i,ln(e,e.attempt(this.parser.constructs.flow,i,e.attempt(oPe,i)),"linePrefix")));return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const nNe={resolveAll:Xfe()},rNe=Zfe("string"),iNe=Zfe("text");function Zfe(e){return{resolveAll:Xfe(e==="text"?aNe:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],a=n.attempt(i,o,s);return o;function o(u){return l(u)?a(u):s(u)}function s(u){if(u===null){n.consume(u);return}return n.enter("data"),n.consume(u),c}function c(u){return l(u)?(n.exit("data"),a(u)):(n.consume(u),c)}function l(u){if(u===null)return!0;const d=i[u];let f=-1;if(d)for(;++f<d.length;){const h=d[f];if(!h.previous||h.previous.call(r,r.previous))return!0}return!1}}}function Xfe(e){return t;function t(n,r){let i=-1,a;for(;++i<=n.length;)a===void 0?n[i]&&n[i][1].type==="data"&&(a=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==a+2&&(n[a][1].end=n[i-1][1].end,n.splice(a+2,i-a-2),i=a+2),a=void 0);return e?e(n,r):n}}function aNe(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let a=i.length,o=-1,s=0,c;for(;a--;){const l=i[a];if(typeof l=="string"){for(o=l.length;l.charCodeAt(o-1)===32;)s++,o--;if(o)break;o=-1}else if(l===-2)c=!0,s++;else if(l!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){const l={type:n===e.length||c||s<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?o:r.start._bufferIndex+o,_index:r.start._index+a,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...l.start},r.start.offset===r.end.offset?Object.assign(r,l):(e.splice(n,0,["enter",l,t],["exit",l,t]),n+=2)}n++}return e}const oNe={42:ia,43:ia,45:ia,48:ia,49:ia,50:ia,51:ia,52:ia,53:ia,54:ia,55:ia,56:ia,57:ia,62:Hfe},sNe={91:dPe},cNe={[-2]:MO,[-1]:MO,32:MO},lNe={35:mPe,42:lT,45:[Nee,lT],60:wPe,61:Nee,95:lT,96:Eee,126:Eee},uNe={38:Ufe,92:Vfe},dNe={[-5]:SO,[-4]:SO,[-3]:SO,33:OPe,38:Ufe,42:HW,60:[BEe,APe],91:BPe,92:[yPe,Vfe],93:pZ,95:HW,96:ePe},hNe={null:[HW,nNe]},fNe={null:[42,95]},pNe={null:[]},yNe=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:fNe,contentInitial:sNe,disable:pNe,document:oNe,flow:lNe,flowInitial:cNe,insideSpan:hNe,string:uNe,text:dNe},Symbol.toStringTag,{value:"Module"}));function gNe(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},a=[];let o=[],s=[];const c={attempt:j(_),check:j(A),consume:S,enter:w,exit:C,interrupt:j(A,{interrupt:!0})},l={code:null,containerState:{},defineSkip:v,events:[],now:y,parser:e,previous:null,sliceSerialize:f,sliceStream:h,write:d};let u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(I){return o=no(o,I),k(),o[o.length-1]!==null?[]:(O(t,0),l.events=Iq(a,l.events,l),l.events)}function f(I,R){return vNe(h(I),R)}function h(I){return mNe(o,I)}function y(){const{_bufferIndex:I,_index:R,line:U,column:q,offset:K}=r;return{_bufferIndex:I,_index:R,line:U,column:q,offset:K}}function v(I){i[I.line]=I.column,D()}function k(){let I;for(;r._index<o.length;){const R=o[r._index];if(typeof R=="string")for(I=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===I&&r._bufferIndex<R.length;)g(R.charCodeAt(r._bufferIndex));else g(R)}}function g(I){u=u(I)}function S(I){Rt(I)?(r.line++,r.column=1,r.offset+=I===-3?2:1,D()):I!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=I}function w(I,R){const U=R||{};return U.type=I,U.start=y(),l.events.push(["enter",U,l]),s.push(U),U}function C(I){const R=s.pop();return R.end=y(),l.events.push(["exit",R,l]),R}function _(I,R){O(I,R.from)}function A(I,R){R.restore()}function j(I,R){return U;function U(q,K,Z){let $,B,V,F;return Array.isArray(q)?N(q):"tokenize"in q?N([q]):ie(q);function ie(X){return ae;function ae(re){const fe=re!==null&&X[re],ke=re!==null&&X.null,Ne=[...Array.isArray(fe)?fe:fe?[fe]:[],...Array.isArray(ke)?ke:ke?[ke]:[]];return N(Ne)(re)}}function N(X){return $=X,B=0,X.length===0?Z:P(X[B])}function P(X){return ae;function ae(re){return F=T(),V=X,X.partial||(l.currentConstruct=X),X.name&&l.parser.constructs.disable.null.includes(X.name)?J():X.tokenize.call(R?Object.assign(Object.create(l),R):l,c,G,J)(re)}}function G(X){return I(V,F),K}function J(X){return F.restore(),++B<$.length?P($[B]):Z}}}function O(I,R){I.resolveAll&&!a.includes(I)&&a.push(I),I.resolve&&Fa(l.events,R,l.events.length-R,I.resolve(l.events.slice(R),l)),I.resolveTo&&(l.events=I.resolveTo(l.events,l))}function T(){const I=y(),R=l.previous,U=l.currentConstruct,q=l.events.length,K=Array.from(s);return{from:q,restore:Z};function Z(){r=I,l.previous=R,l.currentConstruct=U,l.events.length=q,s=K,D()}}function D(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function mNe(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex;let o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){const s=o[0];typeof s=="string"?o[0]=s.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function vNe(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const a=e[n];let o;if(typeof a=="string")o=a;else switch(a){case-5:{o="\r";break}case-4:{o=`
7809
7809
  `;break}case-3:{o=`\r
7810
7810
  `;break}case-2:{o=t?" ":" ";break}case-1:{if(!t&&i)continue;o=" ";break}default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join("")}function kNe(e){const r={constructs:Ffe([yNe,...(e||{}).extensions||[]]),content:i(jEe),defined:[],document:i(DEe),flow:i(eNe),lazy:{},string:i(rNe),text:i(iNe)};return r;function i(a){return o;function o(s){return gNe(r,a,s)}}}function xNe(e){for(;!$fe(e););return e}const Ree=/[\0\t\n\r]/g;function wNe(){let e=1,t="",n=!0,r;return i;function i(a,o,s){const c=[];let l,u,d,f,h;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(o||void 0).decode(a)),d=0,t="",n&&(a.charCodeAt(0)===65279&&d++,n=void 0);d<a.length;){if(Ree.lastIndex=d,l=Ree.exec(a),f=l&&l.index!==void 0?l.index:a.length,h=a.charCodeAt(f),!l){t=a.slice(d);break}if(h===10&&d===f&&r)c.push(-3),r=void 0;else switch(r&&(c.push(-5),r=void 0),d<f&&(c.push(a.slice(d,f)),e+=f-d),h){case 0:{c.push(65533),e++;break}case 9:{for(u=Math.ceil(e/4)*4,c.push(-2);e++<u;)c.push(-1);break}case 10:{c.push(-4),e=1;break}default:r=!0,e=1}d=f+1}return s&&(r&&c.push(-5),t&&c.push(t),c.push(null)),c}}const bNe=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function MNe(e){return e.replace(bNe,SNe)}function SNe(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),a=i===120||i===88;return Bfe(n.slice(a?2:1),a?16:10)}return fZ(n)||e}const Yfe={}.hasOwnProperty;function CNe(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),LNe(n)(xNe(kNe(n).document().write(wNe()(e,t,!0))))}function LNe(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(Se),autolinkProtocol:T,autolinkEmail:T,atxHeading:a(ee),blockQuote:a(ke),characterEscape:T,characterReference:T,codeFenced:a(Ne),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(Ne,o),codeText:a(je,o),codeTextData:T,data:T,codeFlowValue:T,definition:a(Re),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a($e),hardBreakEscape:a(qe),hardBreakTrailing:a(qe),htmlFlow:a(Ke,o),htmlFlowData:T,htmlText:a(Ke,o),htmlTextData:T,image:a(_e),label:o,link:a(Se),listItem:a(Qe),listItemValue:f,listOrdered:a(ot,d),listUnordered:a(ot),paragraph:a(Pe),reference:P,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(ee),strong:a(Ie),thematicBreak:a(wt)},exit:{atxHeading:c(),atxHeadingSequence:_,autolink:c(),autolinkEmail:fe,autolinkProtocol:re,blockQuote:c(),characterEscapeValue:D,characterReferenceMarkerHexadecimal:J,characterReferenceMarkerNumeric:J,characterReferenceValue:X,characterReference:ae,codeFenced:c(k),codeFencedFence:v,codeFencedFenceInfo:h,codeFencedFenceMeta:y,codeFlowValue:D,codeIndented:c(g),codeText:c(K),codeTextData:D,data:D,definition:c(),definitionDestinationString:C,definitionLabelString:S,definitionTitleString:w,emphasis:c(),hardBreakEscape:c(R),hardBreakTrailing:c(R),htmlFlow:c(U),htmlFlowData:D,htmlText:c(q),htmlTextData:D,image:c($),label:V,labelText:B,lineEnding:I,link:c(Z),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:G,resourceDestinationString:F,resourceTitleString:ie,resource:N,setextHeading:c(O),setextHeadingLineSequence:j,setextHeadingText:A,strong:c(),thematicBreak:c()}};Jfe(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(Me){let Ce={type:"root",children:[]};const De={stack:[Ce],tokenStack:[],config:t,enter:s,exit:l,buffer:o,resume:u,data:n},Ve=[];let nt=-1;for(;++nt<Me.length;)if(Me[nt][1].type==="listOrdered"||Me[nt][1].type==="listUnordered")if(Me[nt][0]==="enter")Ve.push(nt);else{const rt=Ve.pop();nt=i(Me,rt,nt)}for(nt=-1;++nt<Me.length;){const rt=t[Me[nt][0]];Yfe.call(rt,Me[nt][1].type)&&rt[Me[nt][1].type].call(Object.assign({sliceSerialize:Me[nt][2].sliceSerialize},De),Me[nt][1])}if(De.tokenStack.length>0){const rt=De.tokenStack[De.tokenStack.length-1];(rt[1]||jee).call(De,void 0,rt[0])}for(Ce.position={start:Ac(Me.length>0?Me[0][1].start:{line:1,column:1,offset:0}),end:Ac(Me.length>0?Me[Me.length-2][1].end:{line:1,column:1,offset:0})},nt=-1;++nt<t.transforms.length;)Ce=t.transforms[nt](Ce)||Ce;return Ce}function i(Me,Ce,De){let Ve=Ce-1,nt=-1,rt=!1,Pt,it,at,ft;for(;++Ve<=De;){const Ot=Me[Ve];switch(Ot[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Ot[0]==="enter"?nt++:nt--,ft=void 0;break}case"lineEndingBlank":{Ot[0]==="enter"&&(Pt&&!ft&&!nt&&!at&&(at=Ve),ft=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:ft=void 0}if(!nt&&Ot[0]==="enter"&&Ot[1].type==="listItemPrefix"||nt===-1&&Ot[0]==="exit"&&(Ot[1].type==="listUnordered"||Ot[1].type==="listOrdered")){if(Pt){let ht=Ve;for(it=void 0;ht--;){const Ht=Me[ht];if(Ht[1].type==="lineEnding"||Ht[1].type==="lineEndingBlank"){if(Ht[0]==="exit")continue;it&&(Me[it][1].type="lineEndingBlank",rt=!0),Ht[1].type="lineEnding",it=ht}else if(!(Ht[1].type==="linePrefix"||Ht[1].type==="blockQuotePrefix"||Ht[1].type==="blockQuotePrefixWhitespace"||Ht[1].type==="blockQuoteMarker"||Ht[1].type==="listItemIndent"))break}at&&(!it||at<it)&&(Pt._spread=!0),Pt.end=Object.assign({},it?Me[it][1].start:Ot[1].end),Me.splice(it||Ve,0,["exit",Pt,Ot[2]]),Ve++,De++}if(Ot[1].type==="listItemPrefix"){const ht={type:"listItem",_spread:!1,start:Object.assign({},Ot[1].start),end:void 0};Pt=ht,Me.splice(Ve,0,["enter",ht,Ot[2]]),Ve++,De++,at=void 0,ft=!0}}}return Me[Ce][1]._spread=rt,De}function a(Me,Ce){return De;function De(Ve){s.call(this,Me(Ve),Ve),Ce&&Ce.call(this,Ve)}}function o(){this.stack.push({type:"fragment",children:[]})}function s(Me,Ce,De){this.stack[this.stack.length-1].children.push(Me),this.stack.push(Me),this.tokenStack.push([Ce,De||void 0]),Me.position={start:Ac(Ce.start),end:void 0}}function c(Me){return Ce;function Ce(De){Me&&Me.call(this,De),l.call(this,De)}}function l(Me,Ce){const De=this.stack.pop(),Ve=this.tokenStack.pop();if(Ve)Ve[0].type!==Me.type&&(Ce?Ce.call(this,Me,Ve[0]):(Ve[1]||jee).call(this,Me,Ve[0]));else throw new Error("Cannot close `"+Me.type+"` ("+Op({start:Me.start,end:Me.end})+"): it’s not open");De.position.end=Ac(Me.end)}function u(){return hZ(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(Me){if(this.data.expectingFirstListItemValue){const Ce=this.stack[this.stack.length-2];Ce.start=Number.parseInt(this.sliceSerialize(Me),10),this.data.expectingFirstListItemValue=void 0}}function h(){const Me=this.resume(),Ce=this.stack[this.stack.length-1];Ce.lang=Me}function y(){const Me=this.resume(),Ce=this.stack[this.stack.length-1];Ce.meta=Me}function v(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function k(){const Me=this.resume(),Ce=this.stack[this.stack.length-1];Ce.value=Me.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function g(){const Me=this.resume(),Ce=this.stack[this.stack.length-1];Ce.value=Me.replace(/(\r?\n|\r)$/g,"")}function S(Me){const Ce=this.resume(),De=this.stack[this.stack.length-1];De.label=Ce,De.identifier=To(this.sliceSerialize(Me)).toLowerCase()}function w(){const Me=this.resume(),Ce=this.stack[this.stack.length-1];Ce.title=Me}function C(){const Me=this.resume(),Ce=this.stack[this.stack.length-1];Ce.url=Me}function _(Me){const Ce=this.stack[this.stack.length-1];if(!Ce.depth){const De=this.sliceSerialize(Me).length;Ce.depth=De}}function A(){this.data.setextHeadingSlurpLineEnding=!0}function j(Me){const Ce=this.stack[this.stack.length-1];Ce.depth=this.sliceSerialize(Me).codePointAt(0)===61?1:2}function O(){this.data.setextHeadingSlurpLineEnding=void 0}function T(Me){const De=this.stack[this.stack.length-1].children;let Ve=De[De.length-1];(!Ve||Ve.type!=="text")&&(Ve=ye(),Ve.position={start:Ac(Me.start),end:void 0},De.push(Ve)),this.stack.push(Ve)}function D(Me){const Ce=this.stack.pop();Ce.value+=this.sliceSerialize(Me),Ce.position.end=Ac(Me.end)}function I(Me){const Ce=this.stack[this.stack.length-1];if(this.data.atHardBreak){const De=Ce.children[Ce.children.length-1];De.position.end=Ac(Me.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(Ce.type)&&(T.call(this,Me),D.call(this,Me))}function R(){this.data.atHardBreak=!0}function U(){const Me=this.resume(),Ce=this.stack[this.stack.length-1];Ce.value=Me}function q(){const Me=this.resume(),Ce=this.stack[this.stack.length-1];Ce.value=Me}function K(){const Me=this.resume(),Ce=this.stack[this.stack.length-1];Ce.value=Me}function Z(){const Me=this.stack[this.stack.length-1];if(this.data.inReference){const Ce=this.data.referenceType||"shortcut";Me.type+="Reference",Me.referenceType=Ce,delete Me.url,delete Me.title}else delete Me.identifier,delete Me.label;this.data.referenceType=void 0}function $(){const Me=this.stack[this.stack.length-1];if(this.data.inReference){const Ce=this.data.referenceType||"shortcut";Me.type+="Reference",Me.referenceType=Ce,delete Me.url,delete Me.title}else delete Me.identifier,delete Me.label;this.data.referenceType=void 0}function B(Me){const Ce=this.sliceSerialize(Me),De=this.stack[this.stack.length-2];De.label=MNe(Ce),De.identifier=To(Ce).toLowerCase()}function V(){const Me=this.stack[this.stack.length-1],Ce=this.resume(),De=this.stack[this.stack.length-1];if(this.data.inReference=!0,De.type==="link"){const Ve=Me.children;De.children=Ve}else De.alt=Ce}function F(){const Me=this.resume(),Ce=this.stack[this.stack.length-1];Ce.url=Me}function ie(){const Me=this.resume(),Ce=this.stack[this.stack.length-1];Ce.title=Me}function N(){this.data.inReference=void 0}function P(){this.data.referenceType="collapsed"}function G(Me){const Ce=this.resume(),De=this.stack[this.stack.length-1];De.label=Ce,De.identifier=To(this.sliceSerialize(Me)).toLowerCase(),this.data.referenceType="full"}function J(Me){this.data.characterReferenceType=Me.type}function X(Me){const Ce=this.sliceSerialize(Me),De=this.data.characterReferenceType;let Ve;De?(Ve=Bfe(Ce,De==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ve=fZ(Ce);const nt=this.stack[this.stack.length-1];nt.value+=Ve}function ae(Me){const Ce=this.stack.pop();Ce.position.end=Ac(Me.end)}function re(Me){D.call(this,Me);const Ce=this.stack[this.stack.length-1];Ce.url=this.sliceSerialize(Me)}function fe(Me){D.call(this,Me);const Ce=this.stack[this.stack.length-1];Ce.url="mailto:"+this.sliceSerialize(Me)}function ke(){return{type:"blockquote",children:[]}}function Ne(){return{type:"code",lang:null,meta:null,value:""}}function je(){return{type:"inlineCode",value:""}}function Re(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function $e(){return{type:"emphasis",children:[]}}function ee(){return{type:"heading",depth:0,children:[]}}function qe(){return{type:"break"}}function Ke(){return{type:"html",value:""}}function _e(){return{type:"image",title:null,url:"",alt:null}}function Se(){return{type:"link",title:null,url:"",children:[]}}function ot(Me){return{type:"list",ordered:Me.type==="listOrdered",start:null,spread:Me._spread,children:[]}}function Qe(Me){return{type:"listItem",spread:Me._spread,checked:null,children:[]}}function Pe(){return{type:"paragraph",children:[]}}function Ie(){return{type:"strong",children:[]}}function ye(){return{type:"text",value:""}}function wt(){return{type:"thematicBreak"}}}function Ac(e){return{line:e.line,column:e.column,offset:e.offset}}function Jfe(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Jfe(e,r):INe(e,r)}}function INe(e,t){let n;for(n in t)if(Yfe.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function jee(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Op({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Op({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Op({start:t.start,end:t.end})+") is still open")}function ANe(e){const t=this;t.parser=n;function n(r){return CNe(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function _Ne(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function ENe(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
@@ -7832,8 +7832,8 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
7832
7832
  `))+1))}const o="#".repeat(i),s=n.enter("headingAtx"),c=n.enter("phrasing");a.move(o+" ");let l=n.containerPhrasing(e,{before:"# ",after:`
7833
7833
  `,...a.current()});return/^[\t ]/.test(l)&&(l=My(l.charCodeAt(0))+l.slice(1)),l=l?o+" "+l:o,n.options.closeAtx&&(l+=" "+o),c(),s(),l}f0e.peek=Zje;function f0e(e){return e.value||""}function Zje(){return"<"}p0e.peek=Xje;function p0e(e,t,n,r){const i=wZ(n),a=i==='"'?"Quote":"Apostrophe",o=n.enter("image");let s=n.enter("label");const c=n.createTracker(r);let l=c.move("![");return l+=c.move(n.safe(e.alt,{before:l,after:"]",...c.current()})),l+=c.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),l+=c.move("<"),l+=c.move(n.safe(e.url,{before:l,after:">",...c.current()})),l+=c.move(">")):(s=n.enter("destinationRaw"),l+=c.move(n.safe(e.url,{before:l,after:e.title?" ":")",...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(" "+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),l+=c.move(")"),o(),l}function Xje(){return"!"}y0e.peek=Yje;function y0e(e,t,n,r){const i=e.referenceType,a=n.enter("imageReference");let o=n.enter("label");const s=n.createTracker(r);let c=s.move("![");const l=n.safe(e.alt,{before:c,after:"]",...s.current()});c+=s.move(l+"]["),o();const u=n.stack;n.stack=[],o=n.enter("reference");const d=n.safe(n.associationId(e),{before:c,after:"]",...s.current()});return o(),n.stack=u,a(),i==="full"||!l||l!==d?c+=s.move(d+"]"):i==="shortcut"?c=c.slice(0,-1):c+=s.move("]"),c}function Yje(){return"!"}g0e.peek=Jje;function g0e(e,t,n){let r=e.value||"",i="`",a=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++a<n.unsafe.length;){const o=n.unsafe[a],s=n.compilePattern(o);let c;if(o.atBreak)for(;c=s.exec(r);){let l=c.index;r.charCodeAt(l)===10&&r.charCodeAt(l-1)===13&&l--,r=r.slice(0,l)+" "+r.slice(c.index+1)}}return i+r+i}function Jje(){return"`"}function m0e(e,t){const n=hZ(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}v0e.peek=Qje;function v0e(e,t,n,r){const i=wZ(n),a=i==='"'?"Quote":"Apostrophe",o=n.createTracker(r);let s,c;if(m0e(e,n)){const u=n.stack;n.stack=[],s=n.enter("autolink");let d=o.move("<");return d+=o.move(n.containerPhrasing(e,{before:d,after:">",...o.current()})),d+=o.move(">"),s(),n.stack=u,d}s=n.enter("link"),c=n.enter("label");let l=o.move("[");return l+=o.move(n.containerPhrasing(e,{before:l,after:"](",...o.current()})),l+=o.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),l+=o.move("<"),l+=o.move(n.safe(e.url,{before:l,after:">",...o.current()})),l+=o.move(">")):(c=n.enter("destinationRaw"),l+=o.move(n.safe(e.url,{before:l,after:e.title?" ":")",...o.current()}))),c(),e.title&&(c=n.enter(`title${a}`),l+=o.move(" "+i),l+=o.move(n.safe(e.title,{before:l,after:i,...o.current()})),l+=o.move(i),c()),l+=o.move(")"),s(),l}function Qje(e,t,n){return m0e(e,n)?"<":"["}k0e.peek=eTe;function k0e(e,t,n,r){const i=e.referenceType,a=n.enter("linkReference");let o=n.enter("label");const s=n.createTracker(r);let c=s.move("[");const l=n.containerPhrasing(e,{before:c,after:"]",...s.current()});c+=s.move(l+"]["),o();const u=n.stack;n.stack=[],o=n.enter("reference");const d=n.safe(n.associationId(e),{before:c,after:"]",...s.current()});return o(),n.stack=u,a(),i==="full"||!l||l!==d?c+=s.move(d+"]"):i==="shortcut"?c=c.slice(0,-1):c+=s.move("]"),c}function eTe(){return"["}function bZ(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function tTe(e){const t=bZ(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function nTe(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function x0e(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function rTe(e,t,n,r){const i=n.enter("list"),a=n.bulletCurrent;let o=e.ordered?nTe(n):bZ(n);const s=e.ordered?o==="."?")":".":tTe(n);let c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){const u=e.children?e.children[0]:void 0;if((o==="*"||o==="-")&&u&&(!u.children||!u.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(c=!0),x0e(n)===o&&u){let d=-1;for(;++d<e.children.length;){const f=e.children[d];if(f&&f.type==="listItem"&&f.children&&f.children[0]&&f.children[0].type==="thematicBreak"){c=!0;break}}}}c&&(o=s),n.bulletCurrent=o;const l=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=a,i(),l}function iTe(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function aTe(e,t,n,r){const i=iTe(n);let a=n.bulletCurrent||bZ(n);t&&t.type==="list"&&t.ordered&&(a=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);const s=n.createTracker(r);s.move(a+" ".repeat(o-a.length)),s.shift(o);const c=n.enter("listItem"),l=n.indentLines(n.containerFlow(e,s.current()),u);return c(),l;function u(d,f,h){return f?(h?"":" ".repeat(o))+d:(h?a:a+" ".repeat(o-a.length))+d}}function oTe(e,t,n,r){const i=n.enter("paragraph"),a=n.enter("phrasing"),o=n.containerPhrasing(e,r);return a(),i(),o}const sTe=_q(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function cTe(e,t,n,r){return(e.children.some(function(o){return sTe(o)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function lTe(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}w0e.peek=uTe;function w0e(e,t,n,r){const i=lTe(n),a=n.enter("strong"),o=n.createTracker(r),s=o.move(i+i);let c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()}));const l=c.charCodeAt(0),u=pD(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=My(l)+c.slice(1));const d=c.charCodeAt(c.length-1),f=pD(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+My(d));const h=o.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+h}function uTe(e,t,n){return n.options.strong||"*"}function dTe(e,t,n,r){return n.safe(e.value,r)}function hTe(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function fTe(e,t,n){const r=(x0e(n)+(n.options.ruleSpaces?" ":"")).repeat(hTe(n));return n.options.ruleSpaces?r.slice(0,-1):r}const b0e={blockquote:Dje,break:ite,code:Hje,definition:Uje,emphasis:h0e,hardBreak:ite,heading:Kje,html:f0e,image:p0e,imageReference:y0e,inlineCode:g0e,link:v0e,linkReference:k0e,list:rTe,listItem:aTe,paragraph:oTe,root:cTe,strong:w0e,text:dTe,thematicBreak:fTe};function pTe(){return{enter:{table:yTe,tableData:ate,tableHeader:ate,tableRow:mTe},exit:{codeText:vTe,table:gTe,tableData:TO,tableHeader:TO,tableRow:TO}}}function yTe(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function gTe(e){this.exit(e),this.data.inTable=void 0}function mTe(e){this.enter({type:"tableRow",children:[]},e)}function TO(e){this.exit(e)}function ate(e){this.enter({type:"tableCell",children:[]},e)}function vTe(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,kTe));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function kTe(e,t){return t==="|"?t:e}function xTe(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
7834
7834
  `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:f,table:o,tableCell:c,tableRow:s}};function o(h,y,v,k){return l(u(h,v,k),h.align)}function s(h,y,v,k){const g=d(h,v,k),S=l([g]);return S.slice(0,S.indexOf(`
7835
- `))}function c(h,y,v,k){const g=v.enter("tableCell"),S=v.enter("phrasing"),w=v.containerPhrasing(h,{...k,before:a,after:a});return S(),g(),w}function l(h,y){return jje(h,{align:y,alignDelimiters:r,padding:n,stringLength:i})}function u(h,y,v){const k=h.children;let g=-1;const S=[],w=y.enter("table");for(;++g<k.length;)S[g]=d(k[g],y,v);return w(),S}function d(h,y,v){const k=h.children;let g=-1;const S=[],w=y.enter("tableRow");for(;++g<k.length;)S[g]=c(k[g],h,y,v);return w(),S}function f(h,y,v){let k=b0e.inlineCode(h,y,v);return v.stack.includes("tableCell")&&(k=k.replace(/\|/g,"\\$&")),k}}function wTe(){return{exit:{taskListCheckValueChecked:ote,taskListCheckValueUnchecked:ote,paragraph:MTe}}}function bTe(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:STe}}}function ote(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function MTe(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let a=-1,o;for(;++a<i.length;){const s=i[a];if(s.type==="paragraph"){o=s;break}}o===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function STe(e,t,n,r){const i=e.children[0],a=typeof e.checked=="boolean"&&i&&i.type==="paragraph",o="["+(e.checked?"x":" ")+"] ",s=n.createTracker(r);a&&s.move(o);let c=b0e.listItem(e,t,n,{...r,...s.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(u){return u+o}}function CTe(){return[rje(),Sje(),Aje(),pTe(),wTe()]}function LTe(e){return{extensions:[ije(),Cje(e),_je(),xTe(e),bTe()]}}const ITe={tokenize:RTe,partial:!0},M0e={tokenize:jTe,partial:!0},S0e={tokenize:TTe,partial:!0},C0e={tokenize:DTe,partial:!0},ATe={tokenize:qTe,partial:!0},L0e={name:"wwwAutolink",tokenize:PTe,previous:A0e},I0e={name:"protocolAutolink",tokenize:NTe,previous:_0e},cc={name:"emailAutolink",tokenize:ETe,previous:E0e},Ms={};function _Te(){return{text:Ms}}let Rl=48;for(;Rl<123;)Ms[Rl]=cc,Rl++,Rl===58?Rl=65:Rl===91&&(Rl=97);Ms[43]=cc;Ms[45]=cc;Ms[46]=cc;Ms[95]=cc;Ms[72]=[cc,I0e];Ms[104]=[cc,I0e];Ms[87]=[cc,L0e];Ms[119]=[cc,L0e];function ETe(e,t,n){const r=this;let i,a;return o;function o(d){return!GW(d)||!E0e.call(r,r.previous)||MZ(r.events)?n(d):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(d))}function s(d){return GW(d)?(e.consume(d),s):d===64?(e.consume(d),c):n(d)}function c(d){return d===46?e.check(ATe,u,l)(d):d===45||d===95||Ni(d)?(a=!0,e.consume(d),c):u(d)}function l(d){return e.consume(d),i=!0,c}function u(d){return a&&i&&Wi(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(d)):n(d)}}function PTe(e,t,n){const r=this;return i;function i(o){return o!==87&&o!==119||!A0e.call(r,r.previous)||MZ(r.events)?n(o):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(ITe,e.attempt(M0e,e.attempt(S0e,a),n),n)(o))}function a(o){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(o)}}function NTe(e,t,n){const r=this;let i="",a=!1;return o;function o(d){return(d===72||d===104)&&_0e.call(r,r.previous)&&!MZ(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(d),e.consume(d),s):n(d)}function s(d){if(Wi(d)&&i.length<5)return i+=String.fromCodePoint(d),e.consume(d),s;if(d===58){const f=i.toLowerCase();if(f==="http"||f==="https")return e.consume(d),c}return n(d)}function c(d){return d===47?(e.consume(d),a?l:(a=!0,c)):n(d)}function l(d){return d===null||dD(d)||Pn(d)||jh(d)||Lq(d)?n(d):e.attempt(M0e,e.attempt(S0e,u),n)(d)}function u(d){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(d)}}function RTe(e,t,n){let r=0;return i;function i(o){return(o===87||o===119)&&r<3?(r++,e.consume(o),i):o===46&&r===3?(e.consume(o),a):n(o)}function a(o){return o===null?n(o):t(o)}}function jTe(e,t,n){let r,i,a;return o;function o(l){return l===46||l===95?e.check(C0e,c,s)(l):l===null||Pn(l)||jh(l)||l!==45&&Lq(l)?c(l):(a=!0,e.consume(l),o)}function s(l){return l===95?r=!0:(i=r,r=void 0),e.consume(l),o}function c(l){return i||r||!a?n(l):t(l)}}function TTe(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(C0e,t,a)(o):o===null||Pn(o)||jh(o)?t(o):(e.consume(o),i)}function a(o){return o===41&&r++,e.consume(o),i}}function DTe(e,t,n){return r;function r(s){return s===33||s===34||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===63||s===95||s===126?(e.consume(s),r):s===38?(e.consume(s),a):s===93?(e.consume(s),i):s===60||s===null||Pn(s)||jh(s)?t(s):n(s)}function i(s){return s===null||s===40||s===91||Pn(s)||jh(s)?t(s):r(s)}function a(s){return Wi(s)?o(s):n(s)}function o(s){return s===59?(e.consume(s),r):Wi(s)?(e.consume(s),o):n(s)}}function qTe(e,t,n){return r;function r(a){return e.consume(a),i}function i(a){return Ni(a)?n(a):t(a)}}function A0e(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Pn(e)}function _0e(e){return!Wi(e)}function E0e(e){return!(e===47||GW(e))}function GW(e){return e===43||e===45||e===46||e===95||Ni(e)}function MZ(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const zTe={tokenize:WTe,partial:!0};function OTe(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:VTe,continuation:{tokenize:UTe},exit:$Te}},text:{91:{name:"gfmFootnoteCall",tokenize:HTe},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:FTe,resolveTo:BTe}}}}function FTe(e,t,n){const r=this;let i=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o;for(;i--;){const c=r.events[i][1];if(c.type==="labelImage"){o=c;break}if(c.type==="gfmFootnoteCall"||c.type==="labelLink"||c.type==="label"||c.type==="image"||c.type==="link")break}return s;function s(c){if(!o||!o._balanced)return n(c);const l=To(r.sliceSerialize({start:o.end,end:r.now()}));return l.codePointAt(0)!==94||!a.includes(l.slice(1))?n(c):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),t(c))}}function BTe(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",a,t],["enter",o,t],["exit",o,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...s),e}function HTe(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,o;return s;function s(d){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),c}function c(d){return d!==94?n(d):(e.enter("gfmFootnoteCallMarker"),e.consume(d),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",l)}function l(d){if(a>999||d===93&&!o||d===null||d===91||Pn(d))return n(d);if(d===93){e.exit("chunkString");const f=e.exit("gfmFootnoteCallString");return i.includes(To(r.sliceSerialize(f)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(d)}return Pn(d)||(o=!0),a++,e.consume(d),d===92?u:l}function u(d){return d===91||d===92||d===93?(e.consume(d),a++,l):l(d)}}function VTe(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,o=0,s;return c;function c(y){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(y),e.exit("gfmFootnoteDefinitionLabelMarker"),l}function l(y){return y===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(y),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",u):n(y)}function u(y){if(o>999||y===93&&!s||y===null||y===91||Pn(y))return n(y);if(y===93){e.exit("chunkString");const v=e.exit("gfmFootnoteDefinitionLabelString");return a=To(r.sliceSerialize(v)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(y),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),f}return Pn(y)||(s=!0),o++,e.consume(y),y===92?d:u}function d(y){return y===91||y===92||y===93?(e.consume(y),o++,u):u(y)}function f(y){return y===58?(e.enter("definitionMarker"),e.consume(y),e.exit("definitionMarker"),i.includes(a)||i.push(a),ln(e,h,"gfmFootnoteDefinitionWhitespace")):n(y)}function h(y){return t(y)}}function UTe(e,t,n){return e.check(ag,t,e.attempt(zTe,t,n))}function $Te(e){e.exit("gfmFootnoteDefinition")}function WTe(e,t,n){const r=this;return ln(e,i,"gfmFootnoteDefinitionIndent",5);function i(a){const o=r.events[r.events.length-1];return o&&o[1].type==="gfmFootnoteDefinitionIndent"&&o[2].sliceSerialize(o[1],!0).length===4?t(a):n(a)}}function GTe(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(o,s){let c=-1;for(;++c<o.length;)if(o[c][0]==="enter"&&o[c][1].type==="strikethroughSequenceTemporary"&&o[c][1]._close){let l=c;for(;l--;)if(o[l][0]==="exit"&&o[l][1].type==="strikethroughSequenceTemporary"&&o[l][1]._open&&o[c][1].end.offset-o[c][1].start.offset===o[l][1].end.offset-o[l][1].start.offset){o[c][1].type="strikethroughSequence",o[l][1].type="strikethroughSequence";const u={type:"strikethrough",start:Object.assign({},o[l][1].start),end:Object.assign({},o[c][1].end)},d={type:"strikethroughText",start:Object.assign({},o[l][1].end),end:Object.assign({},o[c][1].start)},f=[["enter",u,s],["enter",o[l][1],s],["exit",o[l][1],s],["enter",d,s]],h=s.parser.constructs.insideSpan.null;h&&Fa(f,f.length,0,Iq(h,o.slice(l+1,c),s)),Fa(f,f.length,0,[["exit",d,s],["enter",o[c][1],s],["exit",o[c][1],s],["exit",u,s]]),Fa(o,l-1,c-l+3,f),c=l+f.length-2;break}}for(c=-1;++c<o.length;)o[c][1].type==="strikethroughSequenceTemporary"&&(o[c][1].type="data");return o}function a(o,s,c){const l=this.previous,u=this.events;let d=0;return f;function f(y){return l===126&&u[u.length-1][1].type!=="characterEscape"?c(y):(o.enter("strikethroughSequenceTemporary"),h(y))}function h(y){const v=Nf(l);if(y===126)return d>1?c(y):(o.consume(y),d++,h);if(d<2&&!n)return c(y);const k=o.exit("strikethroughSequenceTemporary"),g=Nf(y);return k._open=!g||g===2&&!!v,k._close=!v||v===2&&!!g,s(y)}}}class KTe{constructor(){this.map=[]}add(t,n,r){ZTe(this,t,n,r)}consume(t){if(this.map.sort(function(a,o){return a[0]-o[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const a of i)t.push(a);i=r.pop()}this.map.length=0}}function ZTe(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function XTe(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=r.length-1;r[a]=r[a]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function YTe(){return{flow:{null:{name:"table",tokenize:JTe,resolveAll:QTe}}}}function JTe(e,t,n){const r=this;let i=0,a=0,o;return s;function s(D){let I=r.events.length-1;for(;I>-1;){const q=r.events[I][1].type;if(q==="lineEnding"||q==="linePrefix")I--;else break}const R=I>-1?r.events[I][1].type:null,U=R==="tableHead"||R==="tableRow"?A:c;return U===A&&r.parser.lazy[r.now().line]?n(D):U(D)}function c(D){return e.enter("tableHead"),e.enter("tableRow"),l(D)}function l(D){return D===124||(o=!0,a+=1),u(D)}function u(D){return D===null?n(D):Rt(D)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(D),e.exit("lineEnding"),h):n(D):Qt(D)?ln(e,u,"whitespace")(D):(a+=1,o&&(o=!1,i+=1),D===124?(e.enter("tableCellDivider"),e.consume(D),e.exit("tableCellDivider"),o=!0,u):(e.enter("data"),d(D)))}function d(D){return D===null||D===124||Pn(D)?(e.exit("data"),u(D)):(e.consume(D),D===92?f:d)}function f(D){return D===92||D===124?(e.consume(D),d):d(D)}function h(D){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(D):(e.enter("tableDelimiterRow"),o=!1,Qt(D)?ln(e,y,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(D):y(D))}function y(D){return D===45||D===58?k(D):D===124?(o=!0,e.enter("tableCellDivider"),e.consume(D),e.exit("tableCellDivider"),v):_(D)}function v(D){return Qt(D)?ln(e,k,"whitespace")(D):k(D)}function k(D){return D===58?(a+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(D),e.exit("tableDelimiterMarker"),g):D===45?(a+=1,g(D)):D===null||Rt(D)?C(D):_(D)}function g(D){return D===45?(e.enter("tableDelimiterFiller"),S(D)):_(D)}function S(D){return D===45?(e.consume(D),S):D===58?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(D),e.exit("tableDelimiterMarker"),w):(e.exit("tableDelimiterFiller"),w(D))}function w(D){return Qt(D)?ln(e,C,"whitespace")(D):C(D)}function C(D){return D===124?y(D):D===null||Rt(D)?!o||i!==a?_(D):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(D)):_(D)}function _(D){return n(D)}function A(D){return e.enter("tableRow"),j(D)}function j(D){return D===124?(e.enter("tableCellDivider"),e.consume(D),e.exit("tableCellDivider"),j):D===null||Rt(D)?(e.exit("tableRow"),t(D)):Qt(D)?ln(e,j,"whitespace")(D):(e.enter("data"),O(D))}function O(D){return D===null||D===124||Pn(D)?(e.exit("data"),j(D)):(e.consume(D),D===92?T:O)}function T(D){return D===92||D===124?(e.consume(D),O):O(D)}}function QTe(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d;const f=new KTe;for(;++n<e.length;){const h=e[n],y=h[1];h[0]==="enter"?y.type==="tableHead"?(s=!1,c!==0&&(ste(f,t,c,l,u),u=void 0,c=0),l={type:"table",start:Object.assign({},y.start),end:Object.assign({},y.end)},f.add(n,0,[["enter",l,t]])):y.type==="tableRow"||y.type==="tableDelimiterRow"?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:"tableBody",start:Object.assign({},y.start),end:Object.assign({},y.end)},f.add(n,0,[["enter",u,t]])),i=y.type==="tableDelimiterRow"?2:u?3:1):i&&(y.type==="data"||y.type==="tableDelimiterMarker"||y.type==="tableDelimiterFiller")?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=wm(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):y.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=wm(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):y.type==="tableHead"?(s=!0,c=n):y.type==="tableRow"||y.type==="tableDelimiterRow"?(c=n,a[1]!==0?(o[0]=o[1],d=wm(f,t,a,i,n,d)):o[1]!==0&&(d=wm(f,t,o,i,n,d)),i=0):i&&(y.type==="data"||y.type==="tableDelimiterMarker"||y.type==="tableDelimiterFiller")&&(o[3]=n)}for(c!==0&&ste(f,t,c,l,u),f.consume(t.events),n=-1;++n<t.events.length;){const h=t.events[n];h[0]==="enter"&&h[1].type==="table"&&(h[1]._align=XTe(t.events,n))}return e}function wm(e,t,n,r,i,a){const o=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",s="tableContent";n[0]!==0&&(a.end=Object.assign({},M2(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const c=M2(t.events,n[1]);if(a={type:o,start:Object.assign({},c),end:Object.assign({},c)},e.add(n[1],0,[["enter",a,t]]),n[2]!==0){const l=M2(t.events,n[2]),u=M2(t.events,n[3]),d={type:s,start:Object.assign({},l),end:Object.assign({},u)};if(e.add(n[2],0,[["enter",d,t]]),r!==2){const f=t.events[n[2]],h=t.events[n[3]];if(f[1].end=Object.assign({},h[1].end),f[1].type="chunkText",f[1].contentType="text",n[3]>n[2]+1){const y=n[2]+1,v=n[3]-n[2]-1;e.add(y,v,[])}}e.add(n[3]+1,0,[["exit",d,t]])}return i!==void 0&&(a.end=Object.assign({},M2(t.events,i)),e.add(i,0,[["exit",a,t]]),a=void 0),a}function ste(e,t,n,r,i){const a=[],o=M2(t.events,n);i&&(i.end=Object.assign({},o),a.push(["exit",i,t])),r.end=Object.assign({},o),a.push(["exit",r,t]),e.add(n+1,0,a)}function M2(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const eDe={name:"tasklistCheck",tokenize:nDe};function tDe(){return{text:{91:eDe}}}function nDe(e,t,n){const r=this;return i;function i(c){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(c):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),a)}function a(c){return Pn(c)?(e.enter("taskListCheckValueUnchecked"),e.consume(c),e.exit("taskListCheckValueUnchecked"),o):c===88||c===120?(e.enter("taskListCheckValueChecked"),e.consume(c),e.exit("taskListCheckValueChecked"),o):n(c)}function o(c){return c===93?(e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):n(c)}function s(c){return Rt(c)?t(c):Qt(c)?e.check({tokenize:rDe},t,n)(c):n(c)}}function rDe(e,t,n){return ln(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function iDe(e){return Ffe([_Te(),OTe(),GTe(e),YTe(),tDe()])}const aDe={};function oDe(e){const t=this,n=e||aDe,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),o=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(iDe(n)),a.push(CTe()),o.push(LTe(n))}function sDe({demoId:e,node:t,connector:n,onNameChange:r,onDescriptionChange:i,onDetailChange:a,statusReport:o,onClose:s}){const c=(t==null?void 0:t.type)==="shapeNode"&&t.data.shape==="text",l=(t==null?void 0:t.type)==="shapeNode"?t.data.shape:void 0,u=l==="ellipse"||l==="sticky",d=c?null:t,f=d!==null||n!==null,h=d&&"name"in d.data?d.data.name??"":"",y=(d==null?void 0:d.data.description)??"",v=(d==null?void 0:d.data.detail)??"",k=d!==null&&!u,[g,S]=M.useState(()=>h_e()),w=_=>{_.preventDefault(),p_e(g,_.clientX,{onWidth:S,onCommit:f_e})},C={"--detail-panel-w":`${g}px`};return x.jsx(l_e,{open:f,modal:!1,onOpenChange:_=>{_||s()},children:x.jsxs(Sfe,{side:"right",className:"overflow-y-auto sm:!w-[var(--detail-panel-w)] sm:!max-w-[var(--detail-panel-w)]",style:C,"data-testid":"detail-panel",onEscapeKeyDown:_=>{var j;const A=document.activeElement;(j=A==null?void 0:A.getAttribute("data-testid"))!=null&&j.endsWith("-editor")&&_.preventDefault()},onInteractOutside:_=>{var O;const A=document.activeElement;(O=A==null?void 0:A.getAttribute("data-testid"))!=null&&O.endsWith("-editor")&&A.blur();const j=_.target;j!=null&&j.closest(".react-flow__resize-control")&&_.preventDefault(),j!=null&&j.closest("[data-radix-popper-content-wrapper]")&&_.preventDefault(),j!=null&&j.closest('[data-testid="canvas-style-strip"]')&&_.preventDefault(),j!=null&&j.closest(".react-flow__node")&&_.preventDefault(),j!=null&&j.closest(".react-flow__edge")&&_.preventDefault()},children:[x.jsx("div",{"aria-label":"Resize detail panel",onPointerDown:w,"data-testid":"detail-panel-resize-handle",className:"absolute inset-y-0 left-0 z-10 hidden w-1.5 cursor-col-resize bg-transparent transition-colors hover:bg-border sm:block"}),d?x.jsxs("div",{className:"flex flex-col gap-3",children:[x.jsxs("div",{className:"flex flex-col gap-1",children:[k?x.jsx(cT,{"data-testid":"detail-panel-title",children:x.jsx(DO,{nodeId:d.id,value:h,placeholder:"Name",multiline:!1,ariaLabel:"Name",testIdBase:"detail-panel-name",onSave:r,textClassName:"text-base font-semibold"})}):x.jsx(cT,{"data-testid":"detail-panel-title",className:"sr-only",children:d.id}),x.jsxs(NW,{className:"sr-only",children:[d.id," · ",d.type]})]}),x.jsxs("div",{className:"mt-0 flex flex-col gap-3",children:[o?x.jsx(dDe,{report:o}):null,x.jsx(DO,{nodeId:d.id,value:y,placeholder:"Short description shown on the node body",multiline:!0,ariaLabel:"Description",testIdBase:"detail-panel-description",onSave:i,textClassName:"font-medium text-muted-foreground"}),x.jsx(DO,{nodeId:d.id,value:v,placeholder:"Long-form notes, context, anything…",multiline:!0,ariaLabel:"Detail",testIdBase:"detail-panel-detail",onSave:a,markdown:!0}),d.type==="htmlNode"&&e?x.jsx(cDe,{projectId:e,htmlPath:d.data.htmlPath}):null]})]}):n?x.jsxs("div",{className:"flex flex-col gap-3",children:[x.jsxs("div",{className:"flex flex-col gap-1",children:[x.jsx(cT,{"data-testid":"detail-panel-title",children:n.label??"Connector"}),x.jsxs(NW,{className:"sr-only",children:[n.id," · ",n.kind]})]}),x.jsx("div",{className:"mt-0 flex flex-col gap-3",children:x.jsx(hDe,{connector:n})})]}):null]})})}function DO({nodeId:e,value:t,placeholder:n,multiline:r,ariaLabel:i,testIdBase:a,onSave:o,textClassName:s,markdown:c=!1}){const[l,u]=M.useState(!1),d=M.useRef(null),f=M.useRef(!1);M.useEffect(()=>{if(!l)return;const _=d.current;if(!_)return;_.textContent=t,_.focus();const A=window.getSelection();if(A){const j=document.createRange();j.selectNodeContents(_),j.collapse(!1),A.removeAllRanges(),A.addRange(j)}},[l,t]);const h=t==="";if(!o)return x.jsx("div",{"data-testid":a,"aria-label":i,className:Ze("w-full rounded-md px-2 py-1.5 text-sm",h?"italic text-muted-foreground/50":"text-foreground",!c&&"whitespace-pre-wrap break-words",s),children:h?n:c?x.jsx(cte,{value:t}):t});const y=()=>{var A;const _=((A=d.current)==null?void 0:A.textContent)??t;o(e,_),u(!1)},v=()=>{u(!1)},k=_=>{if(_.stopPropagation(),_.nativeEvent.stopPropagation(),_.key==="Escape"){_.preventDefault(),f.current=!0,v();return}if(_.key==="Enter"){if(_.preventDefault(),_.shiftKey||!r){y();return}document.execCommand("insertText",!1,`
7836
- `)}},g=_=>{_.preventDefault();const A=_.clipboardData.getData("text/plain");document.execCommand("insertText",!1,A)},S=_=>{},w=()=>{if(f.current){f.current=!1;return}y()},C=()=>{l||u(!0)};return x.jsx("div",{className:"relative","data-testid":a,"data-editing":l?"true":"false",children:l?x.jsx("div",{ref:d,contentEditable:"plaintext-only",suppressContentEditableWarning:!0,spellCheck:!1,tabIndex:0,onKeyDown:k,onPaste:g,onInput:S,onBlur:w,"data-testid":`${a}-editor`,className:Ze("block w-full whitespace-pre-wrap break-words rounded-md px-2 py-1.5 text-sm outline-none",s),role:"textbox","aria-multiline":r?"true":"false","aria-label":i}):x.jsx("button",{type:"button",onClick:C,"aria-label":`Edit ${i.toLowerCase()}`,className:Ze("block w-full cursor-text rounded-md px-2 py-1.5 text-left text-sm transition-colors hover:bg-muted/50",h?"italic text-muted-foreground/50":"text-foreground",!c&&"whitespace-pre-wrap break-words",s),children:h?n:c?x.jsx(cte,{value:t}):t})})}function cDe({projectId:e,htmlPath:t}){const[n,r]=M.useState({kind:"idle"}),i=async(o,s)=>{try{await navigator.clipboard.writeText(o),r({kind:"copied",message:s}),setTimeout(()=>r({kind:"idle"}),1200)}catch(c){r({kind:"error",message:c instanceof Error?c.message:"Clipboard write failed"})}},a=async o=>{r({kind:"pending"});try{const s=o==="open"?await K4e(e,t):await Z4e(e,t);if(s.ok){r({kind:"idle"});return}const c=o==="open"?"Copied path — paste into your editor":"Copied path to clipboard";await i(s.absPath,c)}catch(s){r({kind:"error",message:s instanceof Error?s.message:String(s)})}};return x.jsxs("div",{className:"flex flex-col gap-2 rounded-md border bg-card px-3 py-2 text-xs","data-testid":"detail-panel-html-node",children:[x.jsxs("div",{className:"flex flex-col gap-1",children:[x.jsx("span",{className:"font-medium tracking-wide text-[10px] text-muted-foreground",children:"Path"}),x.jsx("code",{"data-testid":"detail-panel-html-path",className:"block break-all rounded bg-muted/40 px-2 py-1 font-mono text-[11px]",children:t})]}),x.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[x.jsxs(oi,{type:"button",size:"sm",variant:"outline",className:"h-7 gap-1.5 px-2",onClick:()=>{a("open")},disabled:n.kind==="pending","data-testid":"detail-panel-html-open","aria-label":"Open in editor",children:[x.jsx(xp,{className:"h-3.5 w-3.5"}),"Open in editor"]}),x.jsxs(oi,{type:"button",size:"sm",variant:"outline",className:"h-7 gap-1.5 px-2",onClick:()=>{a("reveal")},disabled:n.kind==="pending","data-testid":"detail-panel-html-reveal","aria-label":"Reveal in Finder/Explorer",children:[x.jsx(fp,{className:"h-3.5 w-3.5"}),"Reveal"]})]}),n.kind==="copied"||n.kind==="error"?x.jsx("div",{"data-testid":"detail-panel-html-status","data-status":n.kind,className:Ze("text-[11px]",n.kind==="copied"?"text-muted-foreground":"text-destructive"),children:n.message??""}):null]})}function lDe(e,t){const n=Math.max(0,t-e);if(n<1e3)return"just now";const r=Math.floor(n/1e3);if(r<60)return`${r}s ago`;const i=Math.floor(r/60);if(i<60)return`${i}m ago`;const a=Math.floor(i/60);return a<24?`${a}h ago`:`${Math.floor(a/24)}d ago`}function uDe(e){if(e===null)return"null";if(e===void 0)return"undefined";if(typeof e=="string")return e;try{return JSON.stringify(e)}catch{return String(e)}}function dDe({report:e,now:t=Date.now()}){const n=e.data?Object.entries(e.data):[];return x.jsxs("section",{className:"flex flex-col gap-2 rounded-md border bg-card px-3 py-2 text-xs","data-testid":"detail-panel-status","data-state":e.state,children:[x.jsxs("div",{className:"flex items-center justify-between gap-2",children:[x.jsx(Khe,{state:e.state,summary:e.summary,"data-testid":"detail-panel-status-badge"}),x.jsx("span",{className:"shrink-0 text-[10px] text-muted-foreground","data-testid":"detail-panel-status-relative-time",children:`Last updated: ${lDe(e.ts,t)}`})]}),e.detail?x.jsx("div",{"data-testid":"detail-panel-status-detail",className:"whitespace-pre-wrap break-words rounded bg-muted/40 px-2 py-1 text-[11px] text-foreground",children:e.detail}):null,n.length>0?x.jsx("dl",{"data-testid":"detail-panel-status-data",className:"grid grid-cols-[auto_1fr] gap-x-3 gap-y-1 text-[11px]",children:n.map(([r,i])=>x.jsxs("div",{className:"contents","data-testid":"detail-panel-status-data-row",children:[x.jsx("dt",{className:"truncate font-medium text-muted-foreground",children:r}),x.jsx("dd",{className:"break-all font-mono text-foreground",children:uDe(i)})]},r))}):null]})}function cte({value:e}){return x.jsx(GRe,{remarkPlugins:[oDe],components:{h1:({children:t})=>x.jsx("h1",{className:"mb-1 text-base font-bold leading-snug",children:t}),h2:({children:t})=>x.jsx("h2",{className:"mb-1 text-sm font-semibold leading-snug",children:t}),h3:({children:t})=>x.jsx("h3",{className:"mb-0.5 text-sm font-medium leading-snug",children:t}),p:({children:t})=>x.jsx("p",{className:"mb-2 last:mb-0 leading-relaxed",children:t}),ul:({children:t})=>x.jsx("ul",{className:"mb-2 list-disc pl-4 last:mb-0",children:t}),ol:({children:t})=>x.jsx("ol",{className:"mb-2 list-decimal pl-4 last:mb-0",children:t}),li:({children:t})=>x.jsx("li",{className:"mb-0.5",children:t}),code:({children:t,className:n})=>(n==null?void 0:n.includes("language-"))?x.jsx("code",{className:"block overflow-x-auto rounded bg-muted/60 px-2 py-1 font-mono text-xs",children:t}):x.jsx("code",{className:"rounded bg-muted/60 px-1 py-0.5 font-mono text-xs",children:t}),pre:({children:t})=>x.jsx("pre",{className:"mb-2 last:mb-0",children:t}),blockquote:({children:t})=>x.jsx("blockquote",{className:"mb-2 border-l-2 border-muted-foreground/30 pl-3 italic text-muted-foreground last:mb-0",children:t}),a:({href:t,children:n})=>x.jsx("a",{href:t,target:"_blank",rel:"noreferrer",className:"text-primary underline underline-offset-2",children:n}),strong:({children:t})=>x.jsx("strong",{className:"font-semibold",children:t}),em:({children:t})=>x.jsx("em",{className:"italic",children:t}),hr:()=>x.jsx("hr",{className:"my-2 border-border"}),table:({children:t})=>x.jsx("div",{className:"mb-2 overflow-x-auto last:mb-0",children:x.jsx("table",{className:"w-full border-collapse text-xs",children:t})}),th:({children:t})=>x.jsx("th",{className:"border border-border bg-muted/40 px-2 py-1 text-left font-medium",children:t}),td:({children:t})=>x.jsx("td",{className:"border border-border px-2 py-1",children:t})},children:e})}function hDe({connector:e}){return x.jsx("div",{className:"rounded-md border bg-card px-3 py-2 text-xs",children:x.jsxs("dl",{className:"divide-y",children:[x.jsx(Jo,{label:"Source",value:e.source}),x.jsx(Jo,{label:"Target",value:e.target}),x.jsx(Jo,{label:"Kind",value:e.kind}),e.label?x.jsx(Jo,{label:"Label",value:e.label}):null,e.style?x.jsx(Jo,{label:"Style",value:e.style}):null,e.color?x.jsx(Jo,{label:"Color",value:e.color}):null,e.direction?x.jsx(Jo,{label:"Direction",value:e.direction}):null,e.kind==="http"&&e.url?x.jsx(Jo,{label:"URL",value:`${e.method??"GET"} ${e.url}`}):null,e.kind==="event"?x.jsx(Jo,{label:"Event",value:e.eventName}):null,e.kind==="queue"?x.jsx(Jo,{label:"Queue",value:e.queueName}):null]})})}function Jo({label:e,value:t}){return x.jsxs("div",{className:"flex items-start gap-3 py-2 first:pt-0 last:pb-0",children:[x.jsx("dt",{className:"w-20 shrink-0 font-medium text-muted-foreground",children:e}),x.jsx("dd",{className:"flex-1 break-all font-mono",children:t})]})}var ji=Uint8Array,qa=Uint16Array,SZ=Int32Array,CZ=new ji([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),LZ=new ji([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),lte=new ji([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),P0e=function(e,t){for(var n=new qa(31),r=0;r<31;++r)n[r]=t+=1<<e[r-1];for(var i=new SZ(n[30]),r=1;r<30;++r)for(var a=n[r];a<n[r+1];++a)i[a]=a-n[r]<<5|r;return{b:n,r:i}},N0e=P0e(CZ,2),fDe=N0e.b,KW=N0e.r;fDe[28]=258,KW[258]=28;var pDe=P0e(LZ,0),ute=pDe.r,ZW=new qa(32768);for(var Kn=0;Kn<32768;++Kn){var _c=(Kn&43690)>>1|(Kn&21845)<<1;_c=(_c&52428)>>2|(_c&13107)<<2,_c=(_c&61680)>>4|(_c&3855)<<4,ZW[Kn]=((_c&65280)>>8|(_c&255)<<8)>>1}var Hp=function(e,t,n){for(var r=e.length,i=0,a=new qa(t);i<r;++i)e[i]&&++a[e[i]-1];var o=new qa(t);for(i=1;i<t;++i)o[i]=o[i-1]+a[i-1]<<1;var s;if(n){s=new qa(1<<t);var c=15-t;for(i=0;i<r;++i)if(e[i])for(var l=i<<4|e[i],u=t-e[i],d=o[e[i]-1]++<<u,f=d|(1<<u)-1;d<=f;++d)s[ZW[d]>>c]=l}else for(s=new qa(r),i=0;i<r;++i)e[i]&&(s[i]=ZW[o[e[i]-1]++]>>15-e[i]);return s},Th=new ji(288);for(var Kn=0;Kn<144;++Kn)Th[Kn]=8;for(var Kn=144;Kn<256;++Kn)Th[Kn]=9;for(var Kn=256;Kn<280;++Kn)Th[Kn]=7;for(var Kn=280;Kn<288;++Kn)Th[Kn]=8;var yD=new ji(32);for(var Kn=0;Kn<32;++Kn)yD[Kn]=5;var yDe=Hp(Th,9,0),gDe=Hp(yD,5,0),R0e=function(e){return(e+7)/8|0},j0e=function(e,t,n){return(n==null||n>e.length)&&(n=e.length),new ji(e.subarray(t,n))},mDe=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],Pq=function(e,t,n){var r=new Error(t||mDe[e]);if(r.code=e,Error.captureStackTrace&&Error.captureStackTrace(r,Pq),!n)throw r;return r},Os=function(e,t,n){n<<=t&7;var r=t/8|0;e[r]|=n,e[r+1]|=n>>8},T0=function(e,t,n){n<<=t&7;var r=t/8|0;e[r]|=n,e[r+1]|=n>>8,e[r+2]|=n>>16},qO=function(e,t){for(var n=[],r=0;r<e.length;++r)e[r]&&n.push({s:r,f:e[r]});var i=n.length,a=n.slice();if(!i)return{t:D0e,l:0};if(i==1){var o=new ji(n[0].s+1);return o[n[0].s]=1,{t:o,l:1}}n.sort(function(_,A){return _.f-A.f}),n.push({s:-1,f:25001});var s=n[0],c=n[1],l=0,u=1,d=2;for(n[0]={s:-1,f:s.f+c.f,l:s,r:c};u!=i-1;)s=n[n[l].f<n[d].f?l++:d++],c=n[l!=u&&n[l].f<n[d].f?l++:d++],n[u++]={s:-1,f:s.f+c.f,l:s,r:c};for(var f=a[0].s,r=1;r<i;++r)a[r].s>f&&(f=a[r].s);var h=new qa(f+1),y=XW(n[u-1],h,0);if(y>t){var r=0,v=0,k=y-t,g=1<<k;for(a.sort(function(A,j){return h[j.s]-h[A.s]||A.f-j.f});r<i;++r){var S=a[r].s;if(h[S]>t)v+=g-(1<<y-h[S]),h[S]=t;else break}for(v>>=k;v>0;){var w=a[r].s;h[w]<t?v-=1<<t-h[w]++-1:++r}for(;r>=0&&v;--r){var C=a[r].s;h[C]==t&&(--h[C],++v)}y=t}return{t:new ji(h),l:y}},XW=function(e,t,n){return e.s==-1?Math.max(XW(e.l,t,n+1),XW(e.r,t,n+1)):t[e.s]=n},dte=function(e){for(var t=e.length;t&&!e[--t];);for(var n=new qa(++t),r=0,i=e[0],a=1,o=function(c){n[r++]=c},s=1;s<=t;++s)if(e[s]==i&&s!=t)++a;else{if(!i&&a>2){for(;a>138;a-=138)o(32754);a>2&&(o(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(o(i),--a;a>6;a-=6)o(8304);a>2&&(o(a-3<<5|8208),a=0)}for(;a--;)o(i);a=1,i=e[s]}return{c:n.subarray(0,r),n:t}},D0=function(e,t){for(var n=0,r=0;r<t.length;++r)n+=e[r]*t[r];return n},T0e=function(e,t,n){var r=n.length,i=R0e(t+2);e[i]=r&255,e[i+1]=r>>8,e[i+2]=e[i]^255,e[i+3]=e[i+1]^255;for(var a=0;a<r;++a)e[i+a+4]=n[a];return(i+4+r)*8},hte=function(e,t,n,r,i,a,o,s,c,l,u){Os(t,u++,n),++i[256];for(var d=qO(i,15),f=d.t,h=d.l,y=qO(a,15),v=y.t,k=y.l,g=dte(f),S=g.c,w=g.n,C=dte(v),_=C.c,A=C.n,j=new qa(19),O=0;O<S.length;++O)++j[S[O]&31];for(var O=0;O<_.length;++O)++j[_[O]&31];for(var T=qO(j,7),D=T.t,I=T.l,R=19;R>4&&!D[lte[R-1]];--R);var U=l+5<<3,q=D0(i,Th)+D0(a,yD)+o,K=D0(i,f)+D0(a,v)+o+14+3*R+D0(j,D)+2*j[16]+3*j[17]+7*j[18];if(c>=0&&U<=q&&U<=K)return T0e(t,u,e.subarray(c,c+l));var Z,$,B,V;if(Os(t,u,1+(K<q)),u+=2,K<q){Z=Hp(f,h,0),$=f,B=Hp(v,k,0),V=v;var F=Hp(D,I,0);Os(t,u,w-257),Os(t,u+5,A-1),Os(t,u+10,R-4),u+=14;for(var O=0;O<R;++O)Os(t,u+3*O,D[lte[O]]);u+=3*R;for(var ie=[S,_],N=0;N<2;++N)for(var P=ie[N],O=0;O<P.length;++O){var G=P[O]&31;Os(t,u,F[G]),u+=D[G],G>15&&(Os(t,u,P[O]>>5&127),u+=P[O]>>12)}}else Z=yDe,$=Th,B=gDe,V=yD;for(var O=0;O<s;++O){var J=r[O];if(J>255){var G=J>>18&31;T0(t,u,Z[G+257]),u+=$[G+257],G>7&&(Os(t,u,J>>23&31),u+=CZ[G]);var X=J&31;T0(t,u,B[X]),u+=V[X],X>3&&(T0(t,u,J>>5&8191),u+=LZ[X])}else T0(t,u,Z[J]),u+=$[J]}return T0(t,u,Z[256]),u+$[256]},vDe=new SZ([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),D0e=new ji(0),kDe=function(e,t,n,r,i,a){var o=a.z||e.length,s=new ji(r+o+5*(1+Math.ceil(o/7e3))+i),c=s.subarray(r,s.length-i),l=a.l,u=(a.r||0)&7;if(t){u&&(c[0]=a.r>>3);for(var d=vDe[t-1],f=d>>13,h=d&8191,y=(1<<n)-1,v=a.p||new qa(32768),k=a.h||new qa(y+1),g=Math.ceil(n/3),S=2*g,w=function($e){return(e[$e]^e[$e+1]<<g^e[$e+2]<<S)&y},C=new SZ(25e3),_=new qa(288),A=new qa(32),j=0,O=0,T=a.i||0,D=0,I=a.w||0,R=0;T+2<o;++T){var U=w(T),q=T&32767,K=k[U];if(v[q]=K,k[U]=q,I<=T){var Z=o-T;if((j>7e3||D>24576)&&(Z>423||!l)){u=hte(e,c,0,C,_,A,O,D,R,T-R,u),D=j=O=0,R=T;for(var $=0;$<286;++$)_[$]=0;for(var $=0;$<30;++$)A[$]=0}var B=2,V=0,F=h,ie=q-K&32767;if(Z>2&&U==w(T-ie))for(var N=Math.min(f,Z)-1,P=Math.min(32767,T),G=Math.min(258,Z);ie<=P&&--F&&q!=K;){if(e[T+B]==e[T+B-ie]){for(var J=0;J<G&&e[T+J]==e[T+J-ie];++J);if(J>B){if(B=J,V=ie,J>N)break;for(var X=Math.min(ie,J-2),ae=0,$=0;$<X;++$){var re=T-ie+$&32767,fe=v[re],ke=re-fe&32767;ke>ae&&(ae=ke,K=re)}}}q=K,K=v[q],ie+=q-K&32767}if(V){C[D++]=268435456|KW[B]<<18|ute[V];var Ne=KW[B]&31,je=ute[V]&31;O+=CZ[Ne]+LZ[je],++_[257+Ne],++A[je],I=T+B,++j}else C[D++]=e[T],++_[e[T]]}}for(T=Math.max(T,I);T<o;++T)C[D++]=e[T],++_[e[T]];u=hte(e,c,l,C,_,A,O,D,R,T-R,u),l||(a.r=u&7|c[u/8|0]<<3,u-=7,a.h=k,a.p=v,a.i=T,a.w=I)}else{for(var T=a.w||0;T<o+l;T+=65535){var Re=T+65535;Re>=o&&(c[u/8|0]=l,Re=o),u=T0e(c,u+1,e.subarray(T,Re))}a.i=o}return j0e(s,0,r+R0e(u)+i)},xDe=function(){for(var e=new Int32Array(256),t=0;t<256;++t){for(var n=t,r=9;--r;)n=(n&1&&-306674912)^n>>>1;e[t]=n}return e}(),wDe=function(){var e=-1;return{p:function(t){for(var n=e,r=0;r<t.length;++r)n=xDe[n&255^t[r]]^n>>>8;e=n},d:function(){return~e}}},q0e=function(){var e=1,t=0;return{p:function(n){for(var r=e,i=t,a=n.length|0,o=0;o!=a;){for(var s=Math.min(o+2655,a);o<s;++o)i+=r+=n[o];r=(r&65535)+15*(r>>16),i=(i&65535)+15*(i>>16)}e=r,t=i},d:function(){return e%=65521,t%=65521,(e&255)<<24|(e&65280)<<8|(t&255)<<8|t>>8}}},z0e=function(e,t,n,r,i){if(!i&&(i={l:1},t.dictionary)){var a=t.dictionary.subarray(-32768),o=new ji(a.length+e.length);o.set(a),o.set(e,a.length),e=o,i.w=a.length}return kDe(e,t.level==null?6:t.level,t.mem==null?i.l?Math.ceil(Math.max(8,Math.min(13,Math.log(e.length)))*1.5):20:12+t.mem,n,r,i)},O0e=function(e,t){var n={};for(var r in e)n[r]=e[r];for(var r in t)n[r]=t[r];return n},Xr=function(e,t,n){for(;n;++t)e[t]=n,n>>>=8},bDe=function(e,t){var n=t.level,r=n==0?0:n<6?1:n==9?3:2;if(e[0]=120,e[1]=r<<6|(t.dictionary&&32),e[1]|=31-(e[0]<<8|e[1])%31,t.dictionary){var i=q0e();i.p(t.dictionary),Xr(e,2,i.d())}};function MDe(e,t){return z0e(e,t||{},0,0)}function YW(e,t){t||(t={});var n=q0e();n.p(e);var r=z0e(e,t,t.dictionary?6:2,4);return bDe(r,t),Xr(r,r.length-4,n.d()),r}var F0e=function(e,t,n,r){for(var i in e){var a=e[i],o=t+i,s=r;Array.isArray(a)&&(s=O0e(r,a[1]),a=a[0]),a instanceof ji?n[o]=[a,s]:(n[o+="/"]=[new ji(0),s],F0e(a,o,n,r))}},fte=typeof TextEncoder<"u"&&new TextEncoder,SDe=typeof TextDecoder<"u"&&new TextDecoder,CDe=0;try{SDe.decode(D0e,{stream:!0}),CDe=1}catch{}function JW(e,t){var n;if(fte)return fte.encode(e);for(var r=e.length,i=new ji(e.length+(e.length>>1)),a=0,o=function(l){i[a++]=l},n=0;n<r;++n){if(a+5>i.length){var s=new ji(a+8+(r-n<<1));s.set(i),i=s}var c=e.charCodeAt(n);c<128||t?o(c):c<2048?(o(192|c>>6),o(128|c&63)):c>55295&&c<57344?(c=65536+(c&1047552)|e.charCodeAt(++n)&1023,o(240|c>>18),o(128|c>>12&63),o(128|c>>6&63),o(128|c&63)):(o(224|c>>12),o(128|c>>6&63),o(128|c&63))}return j0e(i,0,a)}var QW=function(e){var t=0;if(e)for(var n in e){var r=e[n].length;r>65535&&Pq(9),t+=r+4}return t},pte=function(e,t,n,r,i,a,o,s){var c=r.length,l=n.extra,u=s&&s.length,d=QW(l);Xr(e,t,o!=null?33639248:67324752),t+=4,o!=null&&(e[t++]=20,e[t++]=n.os),e[t]=20,t+=2,e[t++]=n.flag<<1|(a<0&&8),e[t++]=i&&8,e[t++]=n.compression&255,e[t++]=n.compression>>8;var f=new Date(n.mtime==null?Date.now():n.mtime),h=f.getFullYear()-1980;if((h<0||h>119)&&Pq(10),Xr(e,t,h<<25|f.getMonth()+1<<21|f.getDate()<<16|f.getHours()<<11|f.getMinutes()<<5|f.getSeconds()>>1),t+=4,a!=-1&&(Xr(e,t,n.crc),Xr(e,t+4,a<0?-a-2:a),Xr(e,t+8,n.size)),Xr(e,t+12,c),Xr(e,t+14,d),t+=16,o!=null&&(Xr(e,t,u),Xr(e,t+6,n.attrs),Xr(e,t+10,o),t+=14),e.set(r,t),t+=c,d)for(var y in l){var v=l[y],k=v.length;Xr(e,t,+y),Xr(e,t+2,k),e.set(v,t+4),t+=4+k}return u&&(e.set(s,t),t+=u),t},LDe=function(e,t,n,r,i){Xr(e,t,101010256),Xr(e,t+8,n),Xr(e,t+10,n),Xr(e,t+12,r),Xr(e,t+16,i)};function IDe(e,t){t||(t={});var n={},r=[];F0e(e,"",n,t);var i=0,a=0;for(var o in n){var s=n[o],c=s[0],l=s[1],u=l.level==0?0:8,d=JW(o),f=d.length,h=l.comment,y=h&&JW(h),v=y&&y.length,k=QW(l.extra);f>65535&&Pq(11);var g=u?MDe(c,l):c,S=g.length,w=wDe();w.p(c),r.push(O0e(l,{size:c.length,crc:w.d(),c:g,f:d,m:y,u:f!=o.length||y&&h.length!=v,o:i,compression:u})),i+=30+f+k+S,a+=76+2*(f+k)+(v||0)+S}for(var C=new ji(a+22),_=i,A=a-i,j=0;j<r.length;++j){var d=r[j];pte(C,d.o,d,d.f,d.u,d.c.length);var O=30+d.f.length+QW(d.extra);C.set(d.c,d.o+O),pte(C,i,d,d.f,d.u,d.c.length,d.o,d.m),i+=16+O+(d.m?d.m.length:0)}return LDe(C,i,r.length,A,_),C}const ADe="https://seeflow.dev/api";async function _De(e,t,n,r,i){const a=await Hue(e);if(!a.demo)throw new Error("Demo has no data");const o=a.demo,s=new Set,c=[];for(const y of o.nodes)y.type==="imageNode"&&y.data.path&&!s.has(y.data.path)?(s.add(y.data.path),c.push(y.data.path)):y.type==="htmlNode"&&y.data.htmlPath&&!s.has(y.data.htmlPath)&&(s.add(y.data.htmlPath),c.push(y.data.htmlPath));const u={[r==="link"?"seeflow.private.json":"seeflow.json"]:JW(JSON.stringify(o))};if(i){const y=i.split(",")[1];y&&(u["preview.png"]=Uint8Array.from(atob(y),v=>v.charCodeAt(0)))}for(const y of c){const v=await fetch(`/api/projects/${encodeURIComponent(e)}/files/${y}`);v.ok&&(u[`files/${y}`]=new Uint8Array(await v.arrayBuffer()))}const d=IDe(u),f=await fetch(`${ADe}/flows?email=${encodeURIComponent(t)}&name=${encodeURIComponent(n)}`,{method:"POST",headers:{"content-type":"application/zip"},body:d.buffer});if(!f.ok)throw new Error(`Export failed with status ${f.status}`);const h=await f.json();if(typeof h.url!="string")throw new Error("Invalid response from cloud API: missing url");return{shareUrl:h.url}}function EDe(e){return M.useCallback((t,n,r,i)=>_De(e,t,n,r,i),[e])}const yte="seeflow.export.email",gte="seeflow.export.name",mte="seeflow.export.visibility";function PDe({open:e,onOpenChange:t,projectId:n,onCapturePreview:r}){const[i,a]=M.useState(""),[o,s]=M.useState(""),[c,l]=M.useState("public"),[u,d]=M.useState({kind:"idle"}),[f,h]=M.useState(!1),y=EDe(n);M.useEffect(()=>{e&&(a(localStorage.getItem(yte)??""),s(localStorage.getItem(gte)??""),l(localStorage.getItem(mte)??"public"),d({kind:"idle"}),h(!1))},[e]);const v=M.useCallback(async()=>{d({kind:"loading"});try{const w=await(r==null?void 0:r()),{shareUrl:C}=await y(i.trim(),o.trim(),c,w);localStorage.setItem(yte,i.trim()),localStorage.setItem(gte,o.trim()),localStorage.setItem(mte,c),d({kind:"done",shareUrl:C})}catch(w){d({kind:"error",message:w instanceof Error?w.message:String(w)})}},[y,i,o,c,r]),k=M.useCallback(async()=>{if(u.kind==="done")try{await navigator.clipboard.writeText(u.shareUrl),h(!0),setTimeout(()=>h(!1),2e3)}catch(w){console.error("Failed to copy to clipboard:",w)}},[u]),g=u.kind==="loading",S=i.trim().length>0&&o.trim().length>0;return x.jsx(hK,{open:e,onOpenChange:t,children:x.jsxs(ZD,{className:"sm:max-w-md","data-testid":"export-dialog",onOpenAutoFocus:w=>{w.preventDefault();const C=document.querySelector('[data-testid="export-email-input"]');C==null||C.focus()},children:[x.jsxs(XD,{children:[x.jsx(YD,{children:"Export to seeflow.dev"}),x.jsx(JD,{children:"Upload this diagram to the cloud and get a shareable link."})]}),u.kind!=="done"?x.jsxs(x.Fragment,{children:[x.jsxs("div",{className:"flex flex-col gap-4",children:[x.jsxs("label",{className:"flex flex-col gap-1.5 text-sm",children:[x.jsx("span",{className:"font-medium",children:"Email"}),x.jsx("input",{type:"email",required:!0,autoComplete:"email",value:i,onChange:w=>a(w.target.value),disabled:g,"data-testid":"export-email-input",className:"rounded-md border bg-background px-3 py-2 text-sm outline-none ring-offset-background focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50"}),x.jsx("span",{className:"text-xs text-muted-foreground",children:"We'll use this to let you manage your flows in the future."})]}),x.jsxs("label",{className:"flex flex-col gap-1.5 text-sm",children:[x.jsx("span",{className:"font-medium",children:"Flow Name"}),x.jsx("input",{type:"text",required:!0,value:o,onChange:w=>s(w.target.value),disabled:g,"data-testid":"export-name-input",className:"rounded-md border bg-background px-3 py-2 text-sm outline-none ring-offset-background focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50"})]}),x.jsxs("label",{className:"flex flex-col gap-1.5 text-sm",children:[x.jsx("span",{className:"font-medium",children:"Visibility"}),x.jsxs("select",{value:c,onChange:w=>l(w.target.value),disabled:g,"data-testid":"export-visibility-select",className:"rounded-md border bg-background px-3 py-2 text-sm outline-none ring-offset-background focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",children:[x.jsx("option",{value:"public",children:"Public — anyone can discover it"}),x.jsx("option",{value:"link",children:"Anyone with the link"})]})]}),u.kind==="error"?x.jsx("div",{role:"alert","data-testid":"export-error",className:"rounded-md border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive",children:u.message}):null]}),x.jsx(sy,{children:u.kind==="error"?x.jsxs(x.Fragment,{children:[x.jsx(oi,{type:"button",variant:"ghost",onClick:()=>t(!1),"data-testid":"export-cancel",children:"Cancel"}),x.jsx(oi,{type:"button",onClick:()=>d({kind:"idle"}),"data-testid":"export-retry",children:"Try again"})]}):x.jsxs(x.Fragment,{children:[x.jsx(oi,{type:"button",variant:"ghost",onClick:()=>t(!1),disabled:g,"data-testid":"export-cancel",children:"Cancel"}),x.jsx(oi,{type:"button",onClick:v,disabled:g||!S,"data-testid":"export-submit",children:g?x.jsxs(x.Fragment,{children:[x.jsx(to,{className:"h-4 w-4 animate-spin","aria-hidden":"true"}),x.jsx("span",{children:"Uploading…"})]}):"Export"})]})})]}):x.jsxs(x.Fragment,{children:[x.jsxs("div",{className:"flex flex-col gap-3",children:[x.jsx("p",{className:"text-sm text-muted-foreground",children:"Your diagram is live. Share this link:"}),x.jsxs("div",{className:"flex gap-2",children:[x.jsx("input",{type:"text",readOnly:!0,value:u.shareUrl,"data-testid":"export-share-url",className:"min-w-0 flex-1 rounded-md border bg-muted px-3 py-2 text-sm outline-none"}),x.jsx(oi,{type:"button",variant:"outline",size:"icon",onClick:k,"aria-label":"Copy link","data-testid":"export-copy",children:f?x.jsx(Jc,{className:"h-4 w-4","aria-hidden":"true"}):x.jsx(Y2,{className:"h-4 w-4","aria-hidden":"true"})}),x.jsx(oi,{type:"button",variant:"outline",size:"icon",onClick:()=>window.open(u.shareUrl,"_blank"),"aria-label":"View in new tab","data-testid":"export-view",children:x.jsx(dp,{className:"h-4 w-4","aria-hidden":"true"})})]})]}),x.jsx(sy,{children:x.jsx(oi,{type:"button",onClick:()=>t(!1),"data-testid":"export-done",children:"Done"})})]})]})})}function NDe({onRestartDemo:e}){const[t,n]=M.useState(!1),r=M.useCallback(()=>{t||(n(!0),Promise.resolve(e()).finally(()=>{n(!1)}))},[e,t]);return x.jsxs(Oy,{children:[x.jsx(Fy,{asChild:!0,children:x.jsx(oi,{"data-testid":"header-restart-demo",type:"button",variant:"ghost",size:"icon","aria-label":"Restart demo",title:"Restart demo",disabled:t,onClick:r,className:"h-8 w-8",children:t?x.jsx(to,{className:"h-4 w-4 animate-spin","aria-hidden":"true"}):x.jsx(Mp,{className:"h-4 w-4","aria-hidden":"true"})})}),x.jsx($f,{side:"bottom",children:"Restart demo"})]})}var Nq="DropdownMenu",[RDe]=xs(Nq,[bq]),Yi=bq(),[jDe,B0e]=RDe(Nq),H0e=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:a,onOpenChange:o,modal:s=!0}=e,c=Yi(t),l=M.useRef(null),[u,d]=Of({prop:i,defaultProp:a??!1,onChange:o,caller:Nq});return x.jsx(jDe,{scope:t,triggerId:da(),triggerRef:l,contentId:da(),open:u,onOpenChange:d,onOpenToggle:M.useCallback(()=>d(f=>!f),[d]),modal:s,children:x.jsx(G2e,{...c,open:u,onOpenChange:d,dir:r,modal:s,children:n})})};H0e.displayName=Nq;var V0e="DropdownMenuTrigger",U0e=M.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,a=B0e(V0e,n),o=Yi(n);return x.jsx(K2e,{asChild:!0,...o,children:x.jsx(Jt.button,{type:"button",id:a.triggerId,"aria-haspopup":"menu","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...i,ref:ms(t,a.triggerRef),onPointerDown:St(e.onPointerDown,s=>{!r&&s.button===0&&s.ctrlKey===!1&&(a.onOpenToggle(),a.open||s.preventDefault())}),onKeyDown:St(e.onKeyDown,s=>{r||(["Enter"," "].includes(s.key)&&a.onOpenToggle(),s.key==="ArrowDown"&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(s.key)&&s.preventDefault())})})})});U0e.displayName=V0e;var TDe="DropdownMenuPortal",$0e=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Yi(t);return x.jsx(Z2e,{...r,...n})};$0e.displayName=TDe;var W0e="DropdownMenuContent",G0e=M.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=B0e(W0e,n),a=Yi(n),o=M.useRef(!1);return x.jsx(X2e,{id:i.contentId,"aria-labelledby":i.triggerId,...a,...r,ref:t,onCloseAutoFocus:St(e.onCloseAutoFocus,s=>{var c;o.current||(c=i.triggerRef.current)==null||c.focus(),o.current=!1,s.preventDefault()}),onInteractOutside:St(e.onInteractOutside,s=>{const c=s.detail.originalEvent,l=c.button===0&&c.ctrlKey===!0,u=c.button===2||l;(!i.modal||u)&&(o.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});G0e.displayName=W0e;var DDe="DropdownMenuGroup",qDe=M.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Yi(n);return x.jsx(Y2e,{...i,...r,ref:t})});qDe.displayName=DDe;var zDe="DropdownMenuLabel",ODe=M.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Yi(n);return x.jsx(J2e,{...i,...r,ref:t})});ODe.displayName=zDe;var FDe="DropdownMenuItem",K0e=M.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Yi(n);return x.jsx(Q2e,{...i,...r,ref:t})});K0e.displayName=FDe;var BDe="DropdownMenuCheckboxItem",HDe=M.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Yi(n);return x.jsx(efe,{...i,...r,ref:t})});HDe.displayName=BDe;var VDe="DropdownMenuRadioGroup",UDe=M.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Yi(n);return x.jsx(tfe,{...i,...r,ref:t})});UDe.displayName=VDe;var $De="DropdownMenuRadioItem",WDe=M.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Yi(n);return x.jsx(nfe,{...i,...r,ref:t})});WDe.displayName=$De;var GDe="DropdownMenuItemIndicator",KDe=M.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Yi(n);return x.jsx(rfe,{...i,...r,ref:t})});KDe.displayName=GDe;var ZDe="DropdownMenuSeparator",Z0e=M.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Yi(n);return x.jsx(ife,{...i,...r,ref:t})});Z0e.displayName=ZDe;var XDe="DropdownMenuArrow",YDe=M.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Yi(n);return x.jsx(afe,{...i,...r,ref:t})});YDe.displayName=XDe;var JDe="DropdownMenuSubTrigger",QDe=M.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Yi(n);return x.jsx(ofe,{...i,...r,ref:t})});QDe.displayName=JDe;var eqe="DropdownMenuSubContent",tqe=M.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Yi(n);return x.jsx(sfe,{...i,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});tqe.displayName=eqe;var nqe=H0e,rqe=U0e,iqe=$0e,X0e=G0e,Y0e=K0e,J0e=Z0e;const aqe=nqe,oqe=rqe,Q0e=M.forwardRef(({className:e,sideOffset:t=4,...n},r)=>x.jsx(iqe,{children:x.jsx(X0e,{ref:r,sideOffset:t,className:Ze("z-50 min-w-[10rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md 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",e),...n})}));Q0e.displayName=X0e.displayName;const dT=M.forwardRef(({className:e,...t},n)=>x.jsx(Y0e,{ref:n,className:Ze("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled]:pointer-events-none data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground data-[disabled]:opacity-50",e),...t}));dT.displayName=Y0e.displayName;const sqe=M.forwardRef(({className:e,...t},n)=>x.jsx(J0e,{ref:n,className:Ze("-mx-1 my-1 h-px bg-border",e),...t}));sqe.displayName=J0e.displayName;const vte="Share / download",cqe="Download PDF",lqe="Download PNG",uqe="Export to seeflow.dev";function dqe({onDownloadPdf:e,onDownloadPng:t,onExportToCloud:n}){const[r,i]=M.useState(!1),[a,o]=M.useState(!1),s=M.useCallback(()=>{!e||r||(i(!0),Promise.resolve(e()).finally(()=>i(!1)))},[e,r]),c=M.useCallback(()=>{!t||a||(o(!0),Promise.resolve(t()).finally(()=>o(!1)))},[t,a]);return!e&&!t&&!n?null:x.jsxs(aqe,{children:[x.jsx(oqe,{asChild:!0,children:x.jsx("button",{type:"button","data-testid":"share-menu-trigger","aria-label":vte,title:vte,className:Ze("inline-flex h-8 w-8 items-center justify-center rounded-md border border-border bg-background/95 text-muted-foreground shadow-md backdrop-blur transition-colors","hover:bg-accent hover:text-accent-foreground","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"),children:x.jsx(Ip,{className:"h-4 w-4","aria-hidden":"true"})})}),x.jsxs(Q0e,{align:"end","data-testid":"share-menu-content",onCloseAutoFocus:l=>{l.preventDefault()},children:[e?x.jsxs(dT,{"data-testid":"share-menu-pdf",disabled:r,onSelect:l=>{l.preventDefault(),s()},children:[r?x.jsx(to,{className:"h-4 w-4 animate-spin","aria-hidden":"true"}):x.jsx(hp,{className:"h-4 w-4","aria-hidden":"true"}),x.jsx("span",{children:cqe})]}):null,t?x.jsxs(dT,{"data-testid":"share-menu-png",disabled:a,onSelect:l=>{l.preventDefault(),c()},children:[a?x.jsx(to,{className:"h-4 w-4 animate-spin","aria-hidden":"true"}):x.jsx(pp,{className:"h-4 w-4","aria-hidden":"true"}),x.jsx("span",{children:lqe})]}):null,n?x.jsxs(dT,{"data-testid":"share-menu-export-cloud",onSelect:()=>{n()},children:[x.jsx(Np,{className:"h-4 w-4","aria-hidden":"true"}),x.jsx("span",{children:uqe})]}):null]})]})}const hqe=(e,t)=>{if(e.has(t))return e;const n=new Set(e);return n.add(t),n},fqe=(e,t)=>{if(t.length===0)return e;let n=!1;const r=new Set(e);for(const i of t)r.has(i)||(r.add(i),n=!0);return n?r:e},pqe=(e,t)=>{if(!e.has(t))return e;const n=new Set(e);return n.delete(t),n},yqe=(e,t)=>{if(t.length===0)return e;let n=!1;const r=new Set(e);for(const i of t)r.has(i)&&(r.delete(i),n=!0);return n?r:e},gqe=(e,t)=>{if(e.size===0)return e;const n=new Set(t.map(a=>a.id));let r=!1;const i=new Set(e);for(const a of i)n.has(a)||(i.delete(a),r=!0);return r?i:e},kte=()=>{const[e,t]=M.useState(()=>new Set),n=M.useCallback(c=>{t(l=>hqe(l,c))},[]),r=M.useCallback(c=>{t(l=>fqe(l,c))},[]),i=M.useCallback(c=>{t(l=>pqe(l,c))},[]),a=M.useCallback(c=>{t(l=>yqe(l,c))},[]),o=M.useCallback(c=>{t(l=>gqe(l,c))},[]),s=M.useCallback(()=>t(new Set),[]);return{ids:e,mark:n,markMany:r,unmark:i,unmarkMany:a,pruneAgainst:o,reset:s}},mqe=(e,t)=>e===t?!0:e==null||t==null||typeof e!=typeof t||typeof e!="object"?!1:JSON.stringify(e)===JSON.stringify(t),vqe=(e,t,n)=>({...e,[t]:{...e[t],...n}}),kqe=(e,t)=>{if(!(t in e))return e;const n={...e};return delete n[t],n},xqe=(e,t)=>{const n=Object.entries(e);if(n.length===0)return e;const r=new Map(t.map(o=>[o.id,o]));let i=!1;const a={...e};for(const[o,s]of n){const c=r.get(o);if(!c)continue;const l={};let u=!1;for(const d of Object.keys(s))mqe(s[d],c[d])?i=!0:(l[d]=s[d],u=!0);u?a[o]=l:(i=!0,delete a[o])}return i?a:e},xte=()=>{const[e,t]=M.useState({}),n=M.useCallback((o,s)=>{t(c=>vqe(c,o,s))},[]),r=M.useCallback(o=>{t(s=>kqe(s,o))},[]),i=M.useCallback(o=>{t(s=>xqe(s,o))},[]),a=M.useCallback(()=>t({}),[]);return{overrides:e,setOverride:n,dropOverride:r,pruneAgainst:i,reset:a}},wqe=500,bqe=500,Mqe={stack:[],cursor:0},Sqe=(e,t,n)=>{const r=Date.now(),i=wqe,a=bqe,{stack:o,cursor:s}=e;if(t.coalesceKey&&s>0){const u=o[s-1];if(u&&u.coalesceKey===t.coalesceKey&&r-u.capturedAt<=a){const d=o.slice(0,s);return d[s-1]={...u,do:t.do,capturedAt:r},{stack:d,cursor:s}}}const c=o.slice(0,s);c.push({...t,capturedAt:r});let l=s+1;for(;c.length>i;)c.shift(),l-=1;return l<0&&(l=0),{stack:c,cursor:l}},Cqe=e=>e.cursor===0?{state:e,entry:void 0}:{state:{...e,cursor:e.cursor-1},entry:e.stack[e.cursor-1]},Lqe=e=>e.cursor===e.stack.length?{state:e,entry:void 0}:{state:{...e,cursor:e.cursor+1},entry:e.stack[e.cursor]},Iqe=()=>({stack:[],cursor:0}),Aqe=e=>{if(e.cursor===0)return e;const t=e.stack.slice();return t.splice(e.cursor-1,1),{stack:t,cursor:e.cursor-1}},_qe=(e,t)=>t.state,Eqe=()=>{const[e,t]=M.useReducer(_qe,Mqe),n=M.useRef(e);n.current=e;const r=M.useRef(Promise.resolve()),i=M.useRef(0),a=M.useCallback(h=>{h!==n.current&&(n.current=h,t({type:"replace",state:h}))},[]),o=M.useCallback(h=>{const y={do:h.do,undo:h.undo,coalesceKey:h.coalesceKey,capturedAt:h.capturedAt??Date.now()};a(Sqe(n.current,y))},[a]),s=M.useCallback(()=>{i.current=Date.now();const h=r.current.then(()=>{const y=Cqe(n.current);if(y.entry)return a(y.state),{entry:y.entry}});return r.current=h.then(()=>{},()=>{}),h},[a]),c=M.useCallback(()=>{i.current=Date.now();const h=r.current.then(()=>{const y=Lqe(n.current);if(y.entry)return a(y.state),{entry:y.entry}});return r.current=h.then(()=>{},()=>{}),h},[a]),l=M.useCallback(()=>{a(Iqe())},[a]),u=M.useCallback(()=>{a(Aqe(n.current))},[a]),d=M.useCallback(()=>{i.current=Date.now()},[]),f=M.useCallback(()=>i.current,[]);return{push:o,undo:s,redo:c,clear:l,dropTop:u,canUndo:e.cursor>0,canRedo:e.cursor<e.stack.length,markMutation:d,lastMutationAt:f}};function IZ(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var zO,wte;function Pqe(){if(wte)return zO;wte=1;function e(){this.__data__=[],this.size=0}return zO=e,zO}var OO,bte;function Jf(){if(bte)return OO;bte=1;function e(t,n){return t===n||t!==t&&n!==n}return OO=e,OO}var FO,Mte;function Rq(){if(Mte)return FO;Mte=1;var e=Jf();function t(n,r){for(var i=n.length;i--;)if(e(n[i][0],r))return i;return-1}return FO=t,FO}var BO,Ste;function Nqe(){if(Ste)return BO;Ste=1;var e=Rq(),t=Array.prototype,n=t.splice;function r(i){var a=this.__data__,o=e(a,i);if(o<0)return!1;var s=a.length-1;return o==s?a.pop():n.call(a,o,1),--this.size,!0}return BO=r,BO}var HO,Cte;function Rqe(){if(Cte)return HO;Cte=1;var e=Rq();function t(n){var r=this.__data__,i=e(r,n);return i<0?void 0:r[i][1]}return HO=t,HO}var VO,Lte;function jqe(){if(Lte)return VO;Lte=1;var e=Rq();function t(n){return e(this.__data__,n)>-1}return VO=t,VO}var UO,Ite;function Tqe(){if(Ite)return UO;Ite=1;var e=Rq();function t(n,r){var i=this.__data__,a=e(i,n);return a<0?(++this.size,i.push([n,r])):i[a][1]=r,this}return UO=t,UO}var $O,Ate;function jq(){if(Ate)return $O;Ate=1;var e=Pqe(),t=Nqe(),n=Rqe(),r=jqe(),i=Tqe();function a(o){var s=-1,c=o==null?0:o.length;for(this.clear();++s<c;){var l=o[s];this.set(l[0],l[1])}}return a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=n,a.prototype.has=r,a.prototype.set=i,$O=a,$O}var WO,_te;function Dqe(){if(_te)return WO;_te=1;var e=jq();function t(){this.__data__=new e,this.size=0}return WO=t,WO}var GO,Ete;function qqe(){if(Ete)return GO;Ete=1;function e(t){var n=this.__data__,r=n.delete(t);return this.size=n.size,r}return GO=e,GO}var KO,Pte;function zqe(){if(Pte)return KO;Pte=1;function e(t){return this.__data__.get(t)}return KO=e,KO}var ZO,Nte;function Oqe(){if(Nte)return ZO;Nte=1;function e(t){return this.__data__.has(t)}return ZO=e,ZO}var XO,Rte;function epe(){if(Rte)return XO;Rte=1;var e=typeof Fc=="object"&&Fc&&Fc.Object===Object&&Fc;return XO=e,XO}var YO,jte;function Bo(){if(jte)return YO;jte=1;var e=epe(),t=typeof self=="object"&&self&&self.Object===Object&&self,n=e||t||Function("return this")();return YO=n,YO}var JO,Tte;function Qf(){if(Tte)return JO;Tte=1;var e=Bo(),t=e.Symbol;return JO=t,JO}var QO,Dte;function Fqe(){if(Dte)return QO;Dte=1;var e=Qf(),t=Object.prototype,n=t.hasOwnProperty,r=t.toString,i=e?e.toStringTag:void 0;function a(o){var s=n.call(o,i),c=o[i];try{o[i]=void 0;var l=!0}catch{}var u=r.call(o);return l&&(s?o[i]=c:delete o[i]),u}return QO=a,QO}var eF,qte;function Bqe(){if(qte)return eF;qte=1;var e=Object.prototype,t=e.toString;function n(r){return t.call(r)}return eF=n,eF}var tF,zte;function Uh(){if(zte)return tF;zte=1;var e=Qf(),t=Fqe(),n=Bqe(),r="[object Null]",i="[object Undefined]",a=e?e.toStringTag:void 0;function o(s){return s==null?s===void 0?i:r:a&&a in Object(s)?t(s):n(s)}return tF=o,tF}var nF,Ote;function uo(){if(Ote)return nF;Ote=1;function e(t){var n=typeof t;return t!=null&&(n=="object"||n=="function")}return nF=e,nF}var rF,Fte;function sg(){if(Fte)return rF;Fte=1;var e=Uh(),t=uo(),n="[object AsyncFunction]",r="[object Function]",i="[object GeneratorFunction]",a="[object Proxy]";function o(s){if(!t(s))return!1;var c=e(s);return c==r||c==i||c==n||c==a}return rF=o,rF}var iF,Bte;function Hqe(){if(Bte)return iF;Bte=1;var e=Bo(),t=e["__core-js_shared__"];return iF=t,iF}var aF,Hte;function Vqe(){if(Hte)return aF;Hte=1;var e=Hqe(),t=function(){var r=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""}();function n(r){return!!t&&t in r}return aF=n,aF}var oF,Vte;function tpe(){if(Vte)return oF;Vte=1;var e=Function.prototype,t=e.toString;function n(r){if(r!=null){try{return t.call(r)}catch{}try{return r+""}catch{}}return""}return oF=n,oF}var sF,Ute;function Uqe(){if(Ute)return sF;Ute=1;var e=sg(),t=Vqe(),n=uo(),r=tpe(),i=/[\\^$.*+?()[\]{}|]/g,a=/^\[object .+?Constructor\]$/,o=Function.prototype,s=Object.prototype,c=o.toString,l=s.hasOwnProperty,u=RegExp("^"+c.call(l).replace(i,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function d(f){if(!n(f)||t(f))return!1;var h=e(f)?u:a;return h.test(r(f))}return sF=d,sF}var cF,$te;function $qe(){if($te)return cF;$te=1;function e(t,n){return t==null?void 0:t[n]}return cF=e,cF}var lF,Wte;function $h(){if(Wte)return lF;Wte=1;var e=Uqe(),t=$qe();function n(r,i){var a=t(r,i);return e(a)?a:void 0}return lF=n,lF}var uF,Gte;function AZ(){if(Gte)return uF;Gte=1;var e=$h(),t=Bo(),n=e(t,"Map");return uF=n,uF}var dF,Kte;function Tq(){if(Kte)return dF;Kte=1;var e=$h(),t=e(Object,"create");return dF=t,dF}var hF,Zte;function Wqe(){if(Zte)return hF;Zte=1;var e=Tq();function t(){this.__data__=e?e(null):{},this.size=0}return hF=t,hF}var fF,Xte;function Gqe(){if(Xte)return fF;Xte=1;function e(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n}return fF=e,fF}var pF,Yte;function Kqe(){if(Yte)return pF;Yte=1;var e=Tq(),t="__lodash_hash_undefined__",n=Object.prototype,r=n.hasOwnProperty;function i(a){var o=this.__data__;if(e){var s=o[a];return s===t?void 0:s}return r.call(o,a)?o[a]:void 0}return pF=i,pF}var yF,Jte;function Zqe(){if(Jte)return yF;Jte=1;var e=Tq(),t=Object.prototype,n=t.hasOwnProperty;function r(i){var a=this.__data__;return e?a[i]!==void 0:n.call(a,i)}return yF=r,yF}var gF,Qte;function Xqe(){if(Qte)return gF;Qte=1;var e=Tq(),t="__lodash_hash_undefined__";function n(r,i){var a=this.__data__;return this.size+=this.has(r)?0:1,a[r]=e&&i===void 0?t:i,this}return gF=n,gF}var mF,ene;function Yqe(){if(ene)return mF;ene=1;var e=Wqe(),t=Gqe(),n=Kqe(),r=Zqe(),i=Xqe();function a(o){var s=-1,c=o==null?0:o.length;for(this.clear();++s<c;){var l=o[s];this.set(l[0],l[1])}}return a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=n,a.prototype.has=r,a.prototype.set=i,mF=a,mF}var vF,tne;function Jqe(){if(tne)return vF;tne=1;var e=Yqe(),t=jq(),n=AZ();function r(){this.size=0,this.__data__={hash:new e,map:new(n||t),string:new e}}return vF=r,vF}var kF,nne;function Qqe(){if(nne)return kF;nne=1;function e(t){var n=typeof t;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?t!=="__proto__":t===null}return kF=e,kF}var xF,rne;function Dq(){if(rne)return xF;rne=1;var e=Qqe();function t(n,r){var i=n.__data__;return e(r)?i[typeof r=="string"?"string":"hash"]:i.map}return xF=t,xF}var wF,ine;function eze(){if(ine)return wF;ine=1;var e=Dq();function t(n){var r=e(this,n).delete(n);return this.size-=r?1:0,r}return wF=t,wF}var bF,ane;function tze(){if(ane)return bF;ane=1;var e=Dq();function t(n){return e(this,n).get(n)}return bF=t,bF}var MF,one;function nze(){if(one)return MF;one=1;var e=Dq();function t(n){return e(this,n).has(n)}return MF=t,MF}var SF,sne;function rze(){if(sne)return SF;sne=1;var e=Dq();function t(n,r){var i=e(this,n),a=i.size;return i.set(n,r),this.size+=i.size==a?0:1,this}return SF=t,SF}var CF,cne;function _Z(){if(cne)return CF;cne=1;var e=Jqe(),t=eze(),n=tze(),r=nze(),i=rze();function a(o){var s=-1,c=o==null?0:o.length;for(this.clear();++s<c;){var l=o[s];this.set(l[0],l[1])}}return a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=n,a.prototype.has=r,a.prototype.set=i,CF=a,CF}var LF,lne;function ize(){if(lne)return LF;lne=1;var e=jq(),t=AZ(),n=_Z(),r=200;function i(a,o){var s=this.__data__;if(s instanceof e){var c=s.__data__;if(!t||c.length<r-1)return c.push([a,o]),this.size=++s.size,this;s=this.__data__=new n(c)}return s.set(a,o),this.size=s.size,this}return LF=i,LF}var IF,une;function qq(){if(une)return IF;une=1;var e=jq(),t=Dqe(),n=qqe(),r=zqe(),i=Oqe(),a=ize();function o(s){var c=this.__data__=new e(s);this.size=c.size}return o.prototype.clear=t,o.prototype.delete=n,o.prototype.get=r,o.prototype.has=i,o.prototype.set=a,IF=o,IF}var AF,dne;function EZ(){if(dne)return AF;dne=1;function e(t,n){for(var r=-1,i=t==null?0:t.length;++r<i&&n(t[r],r,t)!==!1;);return t}return AF=e,AF}var _F,hne;function npe(){if(hne)return _F;hne=1;var e=$h(),t=function(){try{var n=e(Object,"defineProperty");return n({},"",{}),n}catch{}}();return _F=t,_F}var EF,fne;function zq(){if(fne)return EF;fne=1;var e=npe();function t(n,r,i){r=="__proto__"&&e?e(n,r,{configurable:!0,enumerable:!0,value:i,writable:!0}):n[r]=i}return EF=t,EF}var PF,pne;function Oq(){if(pne)return PF;pne=1;var e=zq(),t=Jf(),n=Object.prototype,r=n.hasOwnProperty;function i(a,o,s){var c=a[o];(!(r.call(a,o)&&t(c,s))||s===void 0&&!(o in a))&&e(a,o,s)}return PF=i,PF}var NF,yne;function cg(){if(yne)return NF;yne=1;var e=Oq(),t=zq();function n(r,i,a,o){var s=!a;a||(a={});for(var c=-1,l=i.length;++c<l;){var u=i[c],d=o?o(a[u],r[u],u,a,r):void 0;d===void 0&&(d=r[u]),s?t(a,u,d):e(a,u,d)}return a}return NF=n,NF}var RF,gne;function aze(){if(gne)return RF;gne=1;function e(t,n){for(var r=-1,i=Array(t);++r<t;)i[r]=n(r);return i}return RF=e,RF}var jF,mne;function Ss(){if(mne)return jF;mne=1;function e(t){return t!=null&&typeof t=="object"}return jF=e,jF}var TF,vne;function oze(){if(vne)return TF;vne=1;var e=Uh(),t=Ss(),n="[object Arguments]";function r(i){return t(i)&&e(i)==n}return TF=r,TF}var DF,kne;function lg(){if(kne)return DF;kne=1;var e=oze(),t=Ss(),n=Object.prototype,r=n.hasOwnProperty,i=n.propertyIsEnumerable,a=e(function(){return arguments}())?e:function(o){return t(o)&&r.call(o,"callee")&&!i.call(o,"callee")};return DF=a,DF}var qF,xne;function $r(){if(xne)return qF;xne=1;var e=Array.isArray;return qF=e,qF}var $0={exports:{}},zF,wne;function sze(){if(wne)return zF;wne=1;function e(){return!1}return zF=e,zF}$0.exports;var bne;function e0(){return bne||(bne=1,function(e,t){var n=Bo(),r=sze(),i=t&&!t.nodeType&&t,a=i&&!0&&e&&!e.nodeType&&e,o=a&&a.exports===i,s=o?n.Buffer:void 0,c=s?s.isBuffer:void 0,l=c||r;e.exports=l}($0,$0.exports)),$0.exports}var OF,Mne;function Fq(){if(Mne)return OF;Mne=1;var e=9007199254740991,t=/^(?:0|[1-9]\d*)$/;function n(r,i){var a=typeof r;return i=i??e,!!i&&(a=="number"||a!="symbol"&&t.test(r))&&r>-1&&r%1==0&&r<i}return OF=n,OF}var FF,Sne;function PZ(){if(Sne)return FF;Sne=1;var e=9007199254740991;function t(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=e}return FF=t,FF}var BF,Cne;function cze(){if(Cne)return BF;Cne=1;var e=Uh(),t=PZ(),n=Ss(),r="[object Arguments]",i="[object Array]",a="[object Boolean]",o="[object Date]",s="[object Error]",c="[object Function]",l="[object Map]",u="[object Number]",d="[object Object]",f="[object RegExp]",h="[object Set]",y="[object String]",v="[object WeakMap]",k="[object ArrayBuffer]",g="[object DataView]",S="[object Float32Array]",w="[object Float64Array]",C="[object Int8Array]",_="[object Int16Array]",A="[object Int32Array]",j="[object Uint8Array]",O="[object Uint8ClampedArray]",T="[object Uint16Array]",D="[object Uint32Array]",I={};I[S]=I[w]=I[C]=I[_]=I[A]=I[j]=I[O]=I[T]=I[D]=!0,I[r]=I[i]=I[k]=I[a]=I[g]=I[o]=I[s]=I[c]=I[l]=I[u]=I[d]=I[f]=I[h]=I[y]=I[v]=!1;function R(U){return n(U)&&t(U.length)&&!!I[e(U)]}return BF=R,BF}var HF,Lne;function Bq(){if(Lne)return HF;Lne=1;function e(t){return function(n){return t(n)}}return HF=e,HF}var W0={exports:{}};W0.exports;var Ine;function NZ(){return Ine||(Ine=1,function(e,t){var n=epe(),r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===r,o=a&&n.process,s=function(){try{var c=i&&i.require&&i.require("util").types;return c||o&&o.binding&&o.binding("util")}catch{}}();e.exports=s}(W0,W0.exports)),W0.exports}var VF,Ane;function ug(){if(Ane)return VF;Ane=1;var e=cze(),t=Bq(),n=NZ(),r=n&&n.isTypedArray,i=r?t(r):e;return VF=i,VF}var UF,_ne;function rpe(){if(_ne)return UF;_ne=1;var e=aze(),t=lg(),n=$r(),r=e0(),i=Fq(),a=ug(),o=Object.prototype,s=o.hasOwnProperty;function c(l,u){var d=n(l),f=!d&&t(l),h=!d&&!f&&r(l),y=!d&&!f&&!h&&a(l),v=d||f||h||y,k=v?e(l.length,String):[],g=k.length;for(var S in l)(u||s.call(l,S))&&!(v&&(S=="length"||h&&(S=="offset"||S=="parent")||y&&(S=="buffer"||S=="byteLength"||S=="byteOffset")||i(S,g)))&&k.push(S);return k}return UF=c,UF}var $F,Ene;function Hq(){if(Ene)return $F;Ene=1;var e=Object.prototype;function t(n){var r=n&&n.constructor,i=typeof r=="function"&&r.prototype||e;return n===i}return $F=t,$F}var WF,Pne;function ipe(){if(Pne)return WF;Pne=1;function e(t,n){return function(r){return t(n(r))}}return WF=e,WF}var GF,Nne;function lze(){if(Nne)return GF;Nne=1;var e=ipe(),t=e(Object.keys,Object);return GF=t,GF}var KF,Rne;function RZ(){if(Rne)return KF;Rne=1;var e=Hq(),t=lze(),n=Object.prototype,r=n.hasOwnProperty;function i(a){if(!e(a))return t(a);var o=[];for(var s in Object(a))r.call(a,s)&&s!="constructor"&&o.push(s);return o}return KF=i,KF}var ZF,jne;function lc(){if(jne)return ZF;jne=1;var e=sg(),t=PZ();function n(r){return r!=null&&t(r.length)&&!e(r)}return ZF=n,ZF}var XF,Tne;function gl(){if(Tne)return XF;Tne=1;var e=rpe(),t=RZ(),n=lc();function r(i){return n(i)?e(i):t(i)}return XF=r,XF}var YF,Dne;function uze(){if(Dne)return YF;Dne=1;var e=cg(),t=gl();function n(r,i){return r&&e(i,t(i),r)}return YF=n,YF}var JF,qne;function dze(){if(qne)return JF;qne=1;function e(t){var n=[];if(t!=null)for(var r in Object(t))n.push(r);return n}return JF=e,JF}var QF,zne;function hze(){if(zne)return QF;zne=1;var e=uo(),t=Hq(),n=dze(),r=Object.prototype,i=r.hasOwnProperty;function a(o){if(!e(o))return n(o);var s=t(o),c=[];for(var l in o)l=="constructor"&&(s||!i.call(o,l))||c.push(l);return c}return QF=a,QF}var eB,One;function Wh(){if(One)return eB;One=1;var e=rpe(),t=hze(),n=lc();function r(i){return n(i)?e(i,!0):t(i)}return eB=r,eB}var tB,Fne;function fze(){if(Fne)return tB;Fne=1;var e=cg(),t=Wh();function n(r,i){return r&&e(i,t(i),r)}return tB=n,tB}var G0={exports:{}};G0.exports;var Bne;function ape(){return Bne||(Bne=1,function(e,t){var n=Bo(),r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===r,o=a?n.Buffer:void 0,s=o?o.allocUnsafe:void 0;function c(l,u){if(u)return l.slice();var d=l.length,f=s?s(d):new l.constructor(d);return l.copy(f),f}e.exports=c}(G0,G0.exports)),G0.exports}var nB,Hne;function ope(){if(Hne)return nB;Hne=1;function e(t,n){var r=-1,i=t.length;for(n||(n=Array(i));++r<i;)n[r]=t[r];return n}return nB=e,nB}var rB,Vne;function spe(){if(Vne)return rB;Vne=1;function e(t,n){for(var r=-1,i=t==null?0:t.length,a=0,o=[];++r<i;){var s=t[r];n(s,r,t)&&(o[a++]=s)}return o}return rB=e,rB}var iB,Une;function cpe(){if(Une)return iB;Une=1;function e(){return[]}return iB=e,iB}var aB,$ne;function jZ(){if($ne)return aB;$ne=1;var e=spe(),t=cpe(),n=Object.prototype,r=n.propertyIsEnumerable,i=Object.getOwnPropertySymbols,a=i?function(o){return o==null?[]:(o=Object(o),e(i(o),function(s){return r.call(o,s)}))}:t;return aB=a,aB}var oB,Wne;function pze(){if(Wne)return oB;Wne=1;var e=cg(),t=jZ();function n(r,i){return e(r,t(r),i)}return oB=n,oB}var sB,Gne;function TZ(){if(Gne)return sB;Gne=1;function e(t,n){for(var r=-1,i=n.length,a=t.length;++r<i;)t[a+r]=n[r];return t}return sB=e,sB}var cB,Kne;function Vq(){if(Kne)return cB;Kne=1;var e=ipe(),t=e(Object.getPrototypeOf,Object);return cB=t,cB}var lB,Zne;function lpe(){if(Zne)return lB;Zne=1;var e=TZ(),t=Vq(),n=jZ(),r=cpe(),i=Object.getOwnPropertySymbols,a=i?function(o){for(var s=[];o;)e(s,n(o)),o=t(o);return s}:r;return lB=a,lB}var uB,Xne;function yze(){if(Xne)return uB;Xne=1;var e=cg(),t=lpe();function n(r,i){return e(r,t(r),i)}return uB=n,uB}var dB,Yne;function upe(){if(Yne)return dB;Yne=1;var e=TZ(),t=$r();function n(r,i,a){var o=i(r);return t(r)?o:e(o,a(r))}return dB=n,dB}var hB,Jne;function dpe(){if(Jne)return hB;Jne=1;var e=upe(),t=jZ(),n=gl();function r(i){return e(i,n,t)}return hB=r,hB}var fB,Qne;function gze(){if(Qne)return fB;Qne=1;var e=upe(),t=lpe(),n=Wh();function r(i){return e(i,n,t)}return fB=r,fB}var pB,ere;function mze(){if(ere)return pB;ere=1;var e=$h(),t=Bo(),n=e(t,"DataView");return pB=n,pB}var yB,tre;function vze(){if(tre)return yB;tre=1;var e=$h(),t=Bo(),n=e(t,"Promise");return yB=n,yB}var gB,nre;function hpe(){if(nre)return gB;nre=1;var e=$h(),t=Bo(),n=e(t,"Set");return gB=n,gB}var mB,rre;function kze(){if(rre)return mB;rre=1;var e=$h(),t=Bo(),n=e(t,"WeakMap");return mB=n,mB}var vB,ire;function t0(){if(ire)return vB;ire=1;var e=mze(),t=AZ(),n=vze(),r=hpe(),i=kze(),a=Uh(),o=tpe(),s="[object Map]",c="[object Object]",l="[object Promise]",u="[object Set]",d="[object WeakMap]",f="[object DataView]",h=o(e),y=o(t),v=o(n),k=o(r),g=o(i),S=a;return(e&&S(new e(new ArrayBuffer(1)))!=f||t&&S(new t)!=s||n&&S(n.resolve())!=l||r&&S(new r)!=u||i&&S(new i)!=d)&&(S=function(w){var C=a(w),_=C==c?w.constructor:void 0,A=_?o(_):"";if(A)switch(A){case h:return f;case y:return s;case v:return l;case k:return u;case g:return d}return C}),vB=S,vB}var kB,are;function xze(){if(are)return kB;are=1;var e=Object.prototype,t=e.hasOwnProperty;function n(r){var i=r.length,a=new r.constructor(i);return i&&typeof r[0]=="string"&&t.call(r,"index")&&(a.index=r.index,a.input=r.input),a}return kB=n,kB}var xB,ore;function fpe(){if(ore)return xB;ore=1;var e=Bo(),t=e.Uint8Array;return xB=t,xB}var wB,sre;function DZ(){if(sre)return wB;sre=1;var e=fpe();function t(n){var r=new n.constructor(n.byteLength);return new e(r).set(new e(n)),r}return wB=t,wB}var bB,cre;function wze(){if(cre)return bB;cre=1;var e=DZ();function t(n,r){var i=r?e(n.buffer):n.buffer;return new n.constructor(i,n.byteOffset,n.byteLength)}return bB=t,bB}var MB,lre;function bze(){if(lre)return MB;lre=1;var e=/\w*$/;function t(n){var r=new n.constructor(n.source,e.exec(n));return r.lastIndex=n.lastIndex,r}return MB=t,MB}var SB,ure;function Mze(){if(ure)return SB;ure=1;var e=Qf(),t=e?e.prototype:void 0,n=t?t.valueOf:void 0;function r(i){return n?Object(n.call(i)):{}}return SB=r,SB}var CB,dre;function ppe(){if(dre)return CB;dre=1;var e=DZ();function t(n,r){var i=r?e(n.buffer):n.buffer;return new n.constructor(i,n.byteOffset,n.length)}return CB=t,CB}var LB,hre;function Sze(){if(hre)return LB;hre=1;var e=DZ(),t=wze(),n=bze(),r=Mze(),i=ppe(),a="[object Boolean]",o="[object Date]",s="[object Map]",c="[object Number]",l="[object RegExp]",u="[object Set]",d="[object String]",f="[object Symbol]",h="[object ArrayBuffer]",y="[object DataView]",v="[object Float32Array]",k="[object Float64Array]",g="[object Int8Array]",S="[object Int16Array]",w="[object Int32Array]",C="[object Uint8Array]",_="[object Uint8ClampedArray]",A="[object Uint16Array]",j="[object Uint32Array]";function O(T,D,I){var R=T.constructor;switch(D){case h:return e(T);case a:case o:return new R(+T);case y:return t(T,I);case v:case k:case g:case S:case w:case C:case _:case A:case j:return i(T,I);case s:return new R;case c:case d:return new R(T);case l:return n(T);case u:return new R;case f:return r(T)}}return LB=O,LB}var IB,fre;function ype(){if(fre)return IB;fre=1;var e=uo(),t=Object.create,n=function(){function r(){}return function(i){if(!e(i))return{};if(t)return t(i);r.prototype=i;var a=new r;return r.prototype=void 0,a}}();return IB=n,IB}var AB,pre;function gpe(){if(pre)return AB;pre=1;var e=ype(),t=Vq(),n=Hq();function r(i){return typeof i.constructor=="function"&&!n(i)?e(t(i)):{}}return AB=r,AB}var _B,yre;function Cze(){if(yre)return _B;yre=1;var e=t0(),t=Ss(),n="[object Map]";function r(i){return t(i)&&e(i)==n}return _B=r,_B}var EB,gre;function Lze(){if(gre)return EB;gre=1;var e=Cze(),t=Bq(),n=NZ(),r=n&&n.isMap,i=r?t(r):e;return EB=i,EB}var PB,mre;function Ize(){if(mre)return PB;mre=1;var e=t0(),t=Ss(),n="[object Set]";function r(i){return t(i)&&e(i)==n}return PB=r,PB}var NB,vre;function Aze(){if(vre)return NB;vre=1;var e=Ize(),t=Bq(),n=NZ(),r=n&&n.isSet,i=r?t(r):e;return NB=i,NB}var RB,kre;function mpe(){if(kre)return RB;kre=1;var e=qq(),t=EZ(),n=Oq(),r=uze(),i=fze(),a=ape(),o=ope(),s=pze(),c=yze(),l=dpe(),u=gze(),d=t0(),f=xze(),h=Sze(),y=gpe(),v=$r(),k=e0(),g=Lze(),S=uo(),w=Aze(),C=gl(),_=Wh(),A=1,j=2,O=4,T="[object Arguments]",D="[object Array]",I="[object Boolean]",R="[object Date]",U="[object Error]",q="[object Function]",K="[object GeneratorFunction]",Z="[object Map]",$="[object Number]",B="[object Object]",V="[object RegExp]",F="[object Set]",ie="[object String]",N="[object Symbol]",P="[object WeakMap]",G="[object ArrayBuffer]",J="[object DataView]",X="[object Float32Array]",ae="[object Float64Array]",re="[object Int8Array]",fe="[object Int16Array]",ke="[object Int32Array]",Ne="[object Uint8Array]",je="[object Uint8ClampedArray]",Re="[object Uint16Array]",$e="[object Uint32Array]",ee={};ee[T]=ee[D]=ee[G]=ee[J]=ee[I]=ee[R]=ee[X]=ee[ae]=ee[re]=ee[fe]=ee[ke]=ee[Z]=ee[$]=ee[B]=ee[V]=ee[F]=ee[ie]=ee[N]=ee[Ne]=ee[je]=ee[Re]=ee[$e]=!0,ee[U]=ee[q]=ee[P]=!1;function qe(Ke,_e,Se,ot,Qe,Pe){var Ie,ye=_e&A,wt=_e&j,Me=_e&O;if(Se&&(Ie=Qe?Se(Ke,ot,Qe,Pe):Se(Ke)),Ie!==void 0)return Ie;if(!S(Ke))return Ke;var Ce=v(Ke);if(Ce){if(Ie=f(Ke),!ye)return o(Ke,Ie)}else{var De=d(Ke),Ve=De==q||De==K;if(k(Ke))return a(Ke,ye);if(De==B||De==T||Ve&&!Qe){if(Ie=wt||Ve?{}:y(Ke),!ye)return wt?c(Ke,i(Ie,Ke)):s(Ke,r(Ie,Ke))}else{if(!ee[De])return Qe?Ke:{};Ie=h(Ke,De,ye)}}Pe||(Pe=new e);var nt=Pe.get(Ke);if(nt)return nt;Pe.set(Ke,Ie),w(Ke)?Ke.forEach(function(it){Ie.add(qe(it,_e,Se,it,Ke,Pe))}):g(Ke)&&Ke.forEach(function(it,at){Ie.set(at,qe(it,_e,Se,at,Ke,Pe))});var rt=Me?wt?u:l:wt?_:C,Pt=Ce?void 0:rt(Ke);return t(Pt||Ke,function(it,at){Pt&&(at=it,it=Ke[at]),n(Ie,at,qe(it,_e,Se,at,Ke,Pe))}),Ie}return RB=qe,RB}var jB,xre;function _ze(){if(xre)return jB;xre=1;var e=mpe(),t=4;function n(r){return e(r,t)}return jB=n,jB}var TB,wre;function qZ(){if(wre)return TB;wre=1;function e(t){return function(){return t}}return TB=e,TB}var DB,bre;function Eze(){if(bre)return DB;bre=1;function e(t){return function(n,r,i){for(var a=-1,o=Object(n),s=i(n),c=s.length;c--;){var l=s[t?c:++a];if(r(o[l],l,o)===!1)break}return n}}return DB=e,DB}var qB,Mre;function zZ(){if(Mre)return qB;Mre=1;var e=Eze(),t=e();return qB=t,qB}var zB,Sre;function OZ(){if(Sre)return zB;Sre=1;var e=zZ(),t=gl();function n(r,i){return r&&e(r,i,t)}return zB=n,zB}var OB,Cre;function Pze(){if(Cre)return OB;Cre=1;var e=lc();function t(n,r){return function(i,a){if(i==null)return i;if(!e(i))return n(i,a);for(var o=i.length,s=r?o:-1,c=Object(i);(r?s--:++s<o)&&a(c[s],s,c)!==!1;);return i}}return OB=t,OB}var FB,Lre;function Uq(){if(Lre)return FB;Lre=1;var e=OZ(),t=Pze(),n=t(e);return FB=n,FB}var BB,Ire;function Gh(){if(Ire)return BB;Ire=1;function e(t){return t}return BB=e,BB}var HB,Are;function vpe(){if(Are)return HB;Are=1;var e=Gh();function t(n){return typeof n=="function"?n:e}return HB=t,HB}var VB,_re;function kpe(){if(_re)return VB;_re=1;var e=EZ(),t=Uq(),n=vpe(),r=$r();function i(a,o){var s=r(a)?e:t;return s(a,n(o))}return VB=i,VB}var UB,Ere;function xpe(){return Ere||(Ere=1,UB=kpe()),UB}var $B,Pre;function Nze(){if(Pre)return $B;Pre=1;var e=Uq();function t(n,r){var i=[];return e(n,function(a,o,s){r(a,o,s)&&i.push(a)}),i}return $B=t,$B}var WB,Nre;function Rze(){if(Nre)return WB;Nre=1;var e="__lodash_hash_undefined__";function t(n){return this.__data__.set(n,e),this}return WB=t,WB}var GB,Rre;function jze(){if(Rre)return GB;Rre=1;function e(t){return this.__data__.has(t)}return GB=e,GB}var KB,jre;function wpe(){if(jre)return KB;jre=1;var e=_Z(),t=Rze(),n=jze();function r(i){var a=-1,o=i==null?0:i.length;for(this.__data__=new e;++a<o;)this.add(i[a])}return r.prototype.add=r.prototype.push=t,r.prototype.has=n,KB=r,KB}var ZB,Tre;function Tze(){if(Tre)return ZB;Tre=1;function e(t,n){for(var r=-1,i=t==null?0:t.length;++r<i;)if(n(t[r],r,t))return!0;return!1}return ZB=e,ZB}var XB,Dre;function bpe(){if(Dre)return XB;Dre=1;function e(t,n){return t.has(n)}return XB=e,XB}var YB,qre;function Mpe(){if(qre)return YB;qre=1;var e=wpe(),t=Tze(),n=bpe(),r=1,i=2;function a(o,s,c,l,u,d){var f=c&r,h=o.length,y=s.length;if(h!=y&&!(f&&y>h))return!1;var v=d.get(o),k=d.get(s);if(v&&k)return v==s&&k==o;var g=-1,S=!0,w=c&i?new e:void 0;for(d.set(o,s),d.set(s,o);++g<h;){var C=o[g],_=s[g];if(l)var A=f?l(_,C,g,s,o,d):l(C,_,g,o,s,d);if(A!==void 0){if(A)continue;S=!1;break}if(w){if(!t(s,function(j,O){if(!n(w,O)&&(C===j||u(C,j,c,l,d)))return w.push(O)})){S=!1;break}}else if(!(C===_||u(C,_,c,l,d))){S=!1;break}}return d.delete(o),d.delete(s),S}return YB=a,YB}var JB,zre;function Dze(){if(zre)return JB;zre=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(i,a){r[++n]=[a,i]}),r}return JB=e,JB}var QB,Ore;function FZ(){if(Ore)return QB;Ore=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(i){r[++n]=i}),r}return QB=e,QB}var eH,Fre;function qze(){if(Fre)return eH;Fre=1;var e=Qf(),t=fpe(),n=Jf(),r=Mpe(),i=Dze(),a=FZ(),o=1,s=2,c="[object Boolean]",l="[object Date]",u="[object Error]",d="[object Map]",f="[object Number]",h="[object RegExp]",y="[object Set]",v="[object String]",k="[object Symbol]",g="[object ArrayBuffer]",S="[object DataView]",w=e?e.prototype:void 0,C=w?w.valueOf:void 0;function _(A,j,O,T,D,I,R){switch(O){case S:if(A.byteLength!=j.byteLength||A.byteOffset!=j.byteOffset)return!1;A=A.buffer,j=j.buffer;case g:return!(A.byteLength!=j.byteLength||!I(new t(A),new t(j)));case c:case l:case f:return n(+A,+j);case u:return A.name==j.name&&A.message==j.message;case h:case v:return A==j+"";case d:var U=i;case y:var q=T&o;if(U||(U=a),A.size!=j.size&&!q)return!1;var K=R.get(A);if(K)return K==j;T|=s,R.set(A,j);var Z=r(U(A),U(j),T,D,I,R);return R.delete(A),Z;case k:if(C)return C.call(A)==C.call(j)}return!1}return eH=_,eH}var tH,Bre;function zze(){if(Bre)return tH;Bre=1;var e=dpe(),t=1,n=Object.prototype,r=n.hasOwnProperty;function i(a,o,s,c,l,u){var d=s&t,f=e(a),h=f.length,y=e(o),v=y.length;if(h!=v&&!d)return!1;for(var k=h;k--;){var g=f[k];if(!(d?g in o:r.call(o,g)))return!1}var S=u.get(a),w=u.get(o);if(S&&w)return S==o&&w==a;var C=!0;u.set(a,o),u.set(o,a);for(var _=d;++k<h;){g=f[k];var A=a[g],j=o[g];if(c)var O=d?c(j,A,g,o,a,u):c(A,j,g,a,o,u);if(!(O===void 0?A===j||l(A,j,s,c,u):O)){C=!1;break}_||(_=g=="constructor")}if(C&&!_){var T=a.constructor,D=o.constructor;T!=D&&"constructor"in a&&"constructor"in o&&!(typeof T=="function"&&T instanceof T&&typeof D=="function"&&D instanceof D)&&(C=!1)}return u.delete(a),u.delete(o),C}return tH=i,tH}var nH,Hre;function Oze(){if(Hre)return nH;Hre=1;var e=qq(),t=Mpe(),n=qze(),r=zze(),i=t0(),a=$r(),o=e0(),s=ug(),c=1,l="[object Arguments]",u="[object Array]",d="[object Object]",f=Object.prototype,h=f.hasOwnProperty;function y(v,k,g,S,w,C){var _=a(v),A=a(k),j=_?u:i(v),O=A?u:i(k);j=j==l?d:j,O=O==l?d:O;var T=j==d,D=O==d,I=j==O;if(I&&o(v)){if(!o(k))return!1;_=!0,T=!1}if(I&&!T)return C||(C=new e),_||s(v)?t(v,k,g,S,w,C):n(v,k,j,g,S,w,C);if(!(g&c)){var R=T&&h.call(v,"__wrapped__"),U=D&&h.call(k,"__wrapped__");if(R||U){var q=R?v.value():v,K=U?k.value():k;return C||(C=new e),w(q,K,g,S,C)}}return I?(C||(C=new e),r(v,k,g,S,w,C)):!1}return nH=y,nH}var rH,Vre;function Spe(){if(Vre)return rH;Vre=1;var e=Oze(),t=Ss();function n(r,i,a,o,s){return r===i?!0:r==null||i==null||!t(r)&&!t(i)?r!==r&&i!==i:e(r,i,a,o,n,s)}return rH=n,rH}var iH,Ure;function Fze(){if(Ure)return iH;Ure=1;var e=qq(),t=Spe(),n=1,r=2;function i(a,o,s,c){var l=s.length,u=l,d=!c;if(a==null)return!u;for(a=Object(a);l--;){var f=s[l];if(d&&f[2]?f[1]!==a[f[0]]:!(f[0]in a))return!1}for(;++l<u;){f=s[l];var h=f[0],y=a[h],v=f[1];if(d&&f[2]){if(y===void 0&&!(h in a))return!1}else{var k=new e;if(c)var g=c(y,v,h,a,o,k);if(!(g===void 0?t(v,y,n|r,c,k):g))return!1}}return!0}return iH=i,iH}var aH,$re;function Cpe(){if($re)return aH;$re=1;var e=uo();function t(n){return n===n&&!e(n)}return aH=t,aH}var oH,Wre;function Bze(){if(Wre)return oH;Wre=1;var e=Cpe(),t=gl();function n(r){for(var i=t(r),a=i.length;a--;){var o=i[a],s=r[o];i[a]=[o,s,e(s)]}return i}return oH=n,oH}var sH,Gre;function Lpe(){if(Gre)return sH;Gre=1;function e(t,n){return function(r){return r==null?!1:r[t]===n&&(n!==void 0||t in Object(r))}}return sH=e,sH}var cH,Kre;function Hze(){if(Kre)return cH;Kre=1;var e=Fze(),t=Bze(),n=Lpe();function r(i){var a=t(i);return a.length==1&&a[0][2]?n(a[0][0],a[0][1]):function(o){return o===i||e(o,i,a)}}return cH=r,cH}var lH,Zre;function n0(){if(Zre)return lH;Zre=1;var e=Uh(),t=Ss(),n="[object Symbol]";function r(i){return typeof i=="symbol"||t(i)&&e(i)==n}return lH=r,lH}var uH,Xre;function BZ(){if(Xre)return uH;Xre=1;var e=$r(),t=n0(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;function i(a,o){if(e(a))return!1;var s=typeof a;return s=="number"||s=="symbol"||s=="boolean"||a==null||t(a)?!0:r.test(a)||!n.test(a)||o!=null&&a in Object(o)}return uH=i,uH}var dH,Yre;function Vze(){if(Yre)return dH;Yre=1;var e=_Z(),t="Expected a function";function n(r,i){if(typeof r!="function"||i!=null&&typeof i!="function")throw new TypeError(t);var a=function(){var o=arguments,s=i?i.apply(this,o):o[0],c=a.cache;if(c.has(s))return c.get(s);var l=r.apply(this,o);return a.cache=c.set(s,l)||c,l};return a.cache=new(n.Cache||e),a}return n.Cache=e,dH=n,dH}var hH,Jre;function Uze(){if(Jre)return hH;Jre=1;var e=Vze(),t=500;function n(r){var i=e(r,function(o){return a.size===t&&a.clear(),o}),a=i.cache;return i}return hH=n,hH}var fH,Qre;function $ze(){if(Qre)return fH;Qre=1;var e=Uze(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n=/\\(\\)?/g,r=e(function(i){var a=[];return i.charCodeAt(0)===46&&a.push(""),i.replace(t,function(o,s,c,l){a.push(c?l.replace(n,"$1"):s||o)}),a});return fH=r,fH}var pH,eie;function $q(){if(eie)return pH;eie=1;function e(t,n){for(var r=-1,i=t==null?0:t.length,a=Array(i);++r<i;)a[r]=n(t[r],r,t);return a}return pH=e,pH}var yH,tie;function Wze(){if(tie)return yH;tie=1;var e=Qf(),t=$q(),n=$r(),r=n0(),i=e?e.prototype:void 0,a=i?i.toString:void 0;function o(s){if(typeof s=="string")return s;if(n(s))return t(s,o)+"";if(r(s))return a?a.call(s):"";var c=s+"";return c=="0"&&1/s==-1/0?"-0":c}return yH=o,yH}var gH,nie;function Ipe(){if(nie)return gH;nie=1;var e=Wze();function t(n){return n==null?"":e(n)}return gH=t,gH}var mH,rie;function Wq(){if(rie)return mH;rie=1;var e=$r(),t=BZ(),n=$ze(),r=Ipe();function i(a,o){return e(a)?a:t(a,o)?[a]:n(r(a))}return mH=i,mH}var vH,iie;function dg(){if(iie)return vH;iie=1;var e=n0();function t(n){if(typeof n=="string"||e(n))return n;var r=n+"";return r=="0"&&1/n==-1/0?"-0":r}return vH=t,vH}var kH,aie;function Gq(){if(aie)return kH;aie=1;var e=Wq(),t=dg();function n(r,i){i=e(i,r);for(var a=0,o=i.length;r!=null&&a<o;)r=r[t(i[a++])];return a&&a==o?r:void 0}return kH=n,kH}var xH,oie;function Gze(){if(oie)return xH;oie=1;var e=Gq();function t(n,r,i){var a=n==null?void 0:e(n,r);return a===void 0?i:a}return xH=t,xH}var wH,sie;function Kze(){if(sie)return wH;sie=1;function e(t,n){return t!=null&&n in Object(t)}return wH=e,wH}var bH,cie;function Ape(){if(cie)return bH;cie=1;var e=Wq(),t=lg(),n=$r(),r=Fq(),i=PZ(),a=dg();function o(s,c,l){c=e(c,s);for(var u=-1,d=c.length,f=!1;++u<d;){var h=a(c[u]);if(!(f=s!=null&&l(s,h)))break;s=s[h]}return f||++u!=d?f:(d=s==null?0:s.length,!!d&&i(d)&&r(h,d)&&(n(s)||t(s)))}return bH=o,bH}var MH,lie;function _pe(){if(lie)return MH;lie=1;var e=Kze(),t=Ape();function n(r,i){return r!=null&&t(r,i,e)}return MH=n,MH}var SH,uie;function Zze(){if(uie)return SH;uie=1;var e=Spe(),t=Gze(),n=_pe(),r=BZ(),i=Cpe(),a=Lpe(),o=dg(),s=1,c=2;function l(u,d){return r(u)&&i(d)?a(o(u),d):function(f){var h=t(f,u);return h===void 0&&h===d?n(f,u):e(d,h,s|c)}}return SH=l,SH}var CH,die;function Epe(){if(die)return CH;die=1;function e(t){return function(n){return n==null?void 0:n[t]}}return CH=e,CH}var LH,hie;function Xze(){if(hie)return LH;hie=1;var e=Gq();function t(n){return function(r){return e(r,n)}}return LH=t,LH}var IH,fie;function Yze(){if(fie)return IH;fie=1;var e=Epe(),t=Xze(),n=BZ(),r=dg();function i(a){return n(a)?e(r(a)):t(a)}return IH=i,IH}var AH,pie;function uc(){if(pie)return AH;pie=1;var e=Hze(),t=Zze(),n=Gh(),r=$r(),i=Yze();function a(o){return typeof o=="function"?o:o==null?n:typeof o=="object"?r(o)?t(o[0],o[1]):e(o):i(o)}return AH=a,AH}var _H,yie;function Ppe(){if(yie)return _H;yie=1;var e=spe(),t=Nze(),n=uc(),r=$r();function i(a,o){var s=r(a)?e:t;return s(a,n(o,3))}return _H=i,_H}var EH,gie;function Jze(){if(gie)return EH;gie=1;var e=Object.prototype,t=e.hasOwnProperty;function n(r,i){return r!=null&&t.call(r,i)}return EH=n,EH}var PH,mie;function Npe(){if(mie)return PH;mie=1;var e=Jze(),t=Ape();function n(r,i){return r!=null&&t(r,i,e)}return PH=n,PH}var NH,vie;function Qze(){if(vie)return NH;vie=1;var e=RZ(),t=t0(),n=lg(),r=$r(),i=lc(),a=e0(),o=Hq(),s=ug(),c="[object Map]",l="[object Set]",u=Object.prototype,d=u.hasOwnProperty;function f(h){if(h==null)return!0;if(i(h)&&(r(h)||typeof h=="string"||typeof h.splice=="function"||a(h)||s(h)||n(h)))return!h.length;var y=t(h);if(y==c||y==l)return!h.size;if(o(h))return!e(h).length;for(var v in h)if(d.call(h,v))return!1;return!0}return NH=f,NH}var RH,kie;function Rpe(){if(kie)return RH;kie=1;function e(t){return t===void 0}return RH=e,RH}var jH,xie;function jpe(){if(xie)return jH;xie=1;var e=Uq(),t=lc();function n(r,i){var a=-1,o=t(r)?Array(r.length):[];return e(r,function(s,c,l){o[++a]=i(s,c,l)}),o}return jH=n,jH}var TH,wie;function Tpe(){if(wie)return TH;wie=1;var e=$q(),t=uc(),n=jpe(),r=$r();function i(a,o){var s=r(a)?e:n;return s(a,t(o,3))}return TH=i,TH}var DH,bie;function eOe(){if(bie)return DH;bie=1;function e(t,n,r,i){var a=-1,o=t==null?0:t.length;for(i&&o&&(r=t[++a]);++a<o;)r=n(r,t[a],a,t);return r}return DH=e,DH}var qH,Mie;function tOe(){if(Mie)return qH;Mie=1;function e(t,n,r,i,a){return a(t,function(o,s,c){r=i?(i=!1,o):n(r,o,s,c)}),r}return qH=e,qH}var zH,Sie;function Dpe(){if(Sie)return zH;Sie=1;var e=eOe(),t=Uq(),n=uc(),r=tOe(),i=$r();function a(o,s,c){var l=i(o)?e:r,u=arguments.length<3;return l(o,n(s,4),c,u,t)}return zH=a,zH}var OH,Cie;function nOe(){if(Cie)return OH;Cie=1;var e=Uh(),t=$r(),n=Ss(),r="[object String]";function i(a){return typeof a=="string"||!t(a)&&n(a)&&e(a)==r}return OH=i,OH}var FH,Lie;function rOe(){if(Lie)return FH;Lie=1;var e=Epe(),t=e("length");return FH=t,FH}var BH,Iie;function iOe(){if(Iie)return BH;Iie=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",i=t+n+r,a="\\ufe0e\\ufe0f",o="\\u200d",s=RegExp("["+o+e+i+a+"]");function c(l){return s.test(l)}return BH=c,BH}var HH,Aie;function aOe(){if(Aie)return HH;Aie=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",i=t+n+r,a="\\ufe0e\\ufe0f",o="["+e+"]",s="["+i+"]",c="\\ud83c[\\udffb-\\udfff]",l="(?:"+s+"|"+c+")",u="[^"+e+"]",d="(?:\\ud83c[\\udde6-\\uddff]){2}",f="[\\ud800-\\udbff][\\udc00-\\udfff]",h="\\u200d",y=l+"?",v="["+a+"]?",k="(?:"+h+"(?:"+[u,d,f].join("|")+")"+v+y+")*",g=v+y+k,S="(?:"+[u+s+"?",s,d,f,o].join("|")+")",w=RegExp(c+"(?="+c+")|"+S+g,"g");function C(_){for(var A=w.lastIndex=0;w.test(_);)++A;return A}return HH=C,HH}var VH,_ie;function oOe(){if(_ie)return VH;_ie=1;var e=rOe(),t=iOe(),n=aOe();function r(i){return t(i)?n(i):e(i)}return VH=r,VH}var UH,Eie;function sOe(){if(Eie)return UH;Eie=1;var e=RZ(),t=t0(),n=lc(),r=nOe(),i=oOe(),a="[object Map]",o="[object Set]";function s(c){if(c==null)return 0;if(n(c))return r(c)?i(c):c.length;var l=t(c);return l==a||l==o?c.size:e(c).length}return UH=s,UH}var $H,Pie;function cOe(){if(Pie)return $H;Pie=1;var e=EZ(),t=ype(),n=OZ(),r=uc(),i=Vq(),a=$r(),o=e0(),s=sg(),c=uo(),l=ug();function u(d,f,h){var y=a(d),v=y||o(d)||l(d);if(f=r(f,4),h==null){var k=d&&d.constructor;v?h=y?new k:[]:c(d)?h=s(k)?t(i(d)):{}:h={}}return(v?e:n)(d,function(g,S,w){return f(h,g,S,w)}),h}return $H=u,$H}var WH,Nie;function lOe(){if(Nie)return WH;Nie=1;var e=Qf(),t=lg(),n=$r(),r=e?e.isConcatSpreadable:void 0;function i(a){return n(a)||t(a)||!!(r&&a&&a[r])}return WH=i,WH}var GH,Rie;function HZ(){if(Rie)return GH;Rie=1;var e=TZ(),t=lOe();function n(r,i,a,o,s){var c=-1,l=r.length;for(a||(a=t),s||(s=[]);++c<l;){var u=r[c];i>0&&a(u)?i>1?n(u,i-1,a,o,s):e(s,u):o||(s[s.length]=u)}return s}return GH=n,GH}var KH,jie;function uOe(){if(jie)return KH;jie=1;function e(t,n,r){switch(r.length){case 0:return t.call(n);case 1:return t.call(n,r[0]);case 2:return t.call(n,r[0],r[1]);case 3:return t.call(n,r[0],r[1],r[2])}return t.apply(n,r)}return KH=e,KH}var ZH,Tie;function qpe(){if(Tie)return ZH;Tie=1;var e=uOe(),t=Math.max;function n(r,i,a){return i=t(i===void 0?r.length-1:i,0),function(){for(var o=arguments,s=-1,c=t(o.length-i,0),l=Array(c);++s<c;)l[s]=o[i+s];s=-1;for(var u=Array(i+1);++s<i;)u[s]=o[s];return u[i]=a(l),e(r,this,u)}}return ZH=n,ZH}var XH,Die;function dOe(){if(Die)return XH;Die=1;var e=qZ(),t=npe(),n=Gh(),r=t?function(i,a){return t(i,"toString",{configurable:!0,enumerable:!1,value:e(a),writable:!0})}:n;return XH=r,XH}var YH,qie;function hOe(){if(qie)return YH;qie=1;var e=800,t=16,n=Date.now;function r(i){var a=0,o=0;return function(){var s=n(),c=t-(s-o);if(o=s,c>0){if(++a>=e)return arguments[0]}else a=0;return i.apply(void 0,arguments)}}return YH=r,YH}var JH,zie;function zpe(){if(zie)return JH;zie=1;var e=dOe(),t=hOe(),n=t(e);return JH=n,JH}var QH,Oie;function Kq(){if(Oie)return QH;Oie=1;var e=Gh(),t=qpe(),n=zpe();function r(i,a){return n(t(i,a,e),i+"")}return QH=r,QH}var eV,Fie;function Ope(){if(Fie)return eV;Fie=1;function e(t,n,r,i){for(var a=t.length,o=r+(i?1:-1);i?o--:++o<a;)if(n(t[o],o,t))return o;return-1}return eV=e,eV}var tV,Bie;function fOe(){if(Bie)return tV;Bie=1;function e(t){return t!==t}return tV=e,tV}var nV,Hie;function pOe(){if(Hie)return nV;Hie=1;function e(t,n,r){for(var i=r-1,a=t.length;++i<a;)if(t[i]===n)return i;return-1}return nV=e,nV}var rV,Vie;function yOe(){if(Vie)return rV;Vie=1;var e=Ope(),t=fOe(),n=pOe();function r(i,a,o){return a===a?n(i,a,o):e(i,t,o)}return rV=r,rV}var iV,Uie;function gOe(){if(Uie)return iV;Uie=1;var e=yOe();function t(n,r){var i=n==null?0:n.length;return!!i&&e(n,r,0)>-1}return iV=t,iV}var aV,$ie;function mOe(){if($ie)return aV;$ie=1;function e(t,n,r){for(var i=-1,a=t==null?0:t.length;++i<a;)if(r(n,t[i]))return!0;return!1}return aV=e,aV}var oV,Wie;function vOe(){if(Wie)return oV;Wie=1;function e(){}return oV=e,oV}var sV,Gie;function kOe(){if(Gie)return sV;Gie=1;var e=hpe(),t=vOe(),n=FZ(),r=1/0,i=e&&1/n(new e([,-0]))[1]==r?function(a){return new e(a)}:t;return sV=i,sV}var cV,Kie;function xOe(){if(Kie)return cV;Kie=1;var e=wpe(),t=gOe(),n=mOe(),r=bpe(),i=kOe(),a=FZ(),o=200;function s(c,l,u){var d=-1,f=t,h=c.length,y=!0,v=[],k=v;if(u)y=!1,f=n;else if(h>=o){var g=l?null:i(c);if(g)return a(g);y=!1,f=r,k=new e}else k=l?[]:v;e:for(;++d<h;){var S=c[d],w=l?l(S):S;if(S=u||S!==0?S:0,y&&w===w){for(var C=k.length;C--;)if(k[C]===w)continue e;l&&k.push(w),v.push(S)}else f(k,w,u)||(k!==v&&k.push(w),v.push(S))}return v}return cV=s,cV}var lV,Zie;function Fpe(){if(Zie)return lV;Zie=1;var e=lc(),t=Ss();function n(r){return t(r)&&e(r)}return lV=n,lV}var uV,Xie;function wOe(){if(Xie)return uV;Xie=1;var e=HZ(),t=Kq(),n=xOe(),r=Fpe(),i=t(function(a){return n(e(a,1,r,!0))});return uV=i,uV}var dV,Yie;function bOe(){if(Yie)return dV;Yie=1;var e=$q();function t(n,r){return e(r,function(i){return n[i]})}return dV=t,dV}var hV,Jie;function Bpe(){if(Jie)return hV;Jie=1;var e=bOe(),t=gl();function n(r){return r==null?[]:e(r,t(r))}return hV=n,hV}var fV,Qie;function ho(){if(Qie)return fV;Qie=1;var e;if(typeof IZ=="function")try{e={clone:_ze(),constant:qZ(),each:xpe(),filter:Ppe(),has:Npe(),isArray:$r(),isEmpty:Qze(),isFunction:sg(),isUndefined:Rpe(),keys:gl(),map:Tpe(),reduce:Dpe(),size:sOe(),transform:cOe(),union:wOe(),values:Bpe()}}catch{}return e||(e=window._),fV=e,fV}var pV,eae;function VZ(){if(eae)return pV;eae=1;var e=ho();pV=i;var t="\0",n="\0",r="";function i(u){this._isDirected=e.has(u,"directed")?u.directed:!0,this._isMultigraph=e.has(u,"multigraph")?u.multigraph:!1,this._isCompound=e.has(u,"compound")?u.compound:!1,this._label=void 0,this._defaultNodeLabelFn=e.constant(void 0),this._defaultEdgeLabelFn=e.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[n]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}i.prototype._nodeCount=0,i.prototype._edgeCount=0,i.prototype.isDirected=function(){return this._isDirected},i.prototype.isMultigraph=function(){return this._isMultigraph},i.prototype.isCompound=function(){return this._isCompound},i.prototype.setGraph=function(u){return this._label=u,this},i.prototype.graph=function(){return this._label},i.prototype.setDefaultNodeLabel=function(u){return e.isFunction(u)||(u=e.constant(u)),this._defaultNodeLabelFn=u,this},i.prototype.nodeCount=function(){return this._nodeCount},i.prototype.nodes=function(){return e.keys(this._nodes)},i.prototype.sources=function(){var u=this;return e.filter(this.nodes(),function(d){return e.isEmpty(u._in[d])})},i.prototype.sinks=function(){var u=this;return e.filter(this.nodes(),function(d){return e.isEmpty(u._out[d])})},i.prototype.setNodes=function(u,d){var f=arguments,h=this;return e.each(u,function(y){f.length>1?h.setNode(y,d):h.setNode(y)}),this},i.prototype.setNode=function(u,d){return e.has(this._nodes,u)?(arguments.length>1&&(this._nodes[u]=d),this):(this._nodes[u]=arguments.length>1?d:this._defaultNodeLabelFn(u),this._isCompound&&(this._parent[u]=n,this._children[u]={},this._children[n][u]=!0),this._in[u]={},this._preds[u]={},this._out[u]={},this._sucs[u]={},++this._nodeCount,this)},i.prototype.node=function(u){return this._nodes[u]},i.prototype.hasNode=function(u){return e.has(this._nodes,u)},i.prototype.removeNode=function(u){var d=this;if(e.has(this._nodes,u)){var f=function(h){d.removeEdge(d._edgeObjs[h])};delete this._nodes[u],this._isCompound&&(this._removeFromParentsChildList(u),delete this._parent[u],e.each(this.children(u),function(h){d.setParent(h)}),delete this._children[u]),e.each(e.keys(this._in[u]),f),delete this._in[u],delete this._preds[u],e.each(e.keys(this._out[u]),f),delete this._out[u],delete this._sucs[u],--this._nodeCount}return this},i.prototype.setParent=function(u,d){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(e.isUndefined(d))d=n;else{d+="";for(var f=d;!e.isUndefined(f);f=this.parent(f))if(f===u)throw new Error("Setting "+d+" as parent of "+u+" would create a cycle");this.setNode(d)}return this.setNode(u),this._removeFromParentsChildList(u),this._parent[u]=d,this._children[d][u]=!0,this},i.prototype._removeFromParentsChildList=function(u){delete this._children[this._parent[u]][u]},i.prototype.parent=function(u){if(this._isCompound){var d=this._parent[u];if(d!==n)return d}},i.prototype.children=function(u){if(e.isUndefined(u)&&(u=n),this._isCompound){var d=this._children[u];if(d)return e.keys(d)}else{if(u===n)return this.nodes();if(this.hasNode(u))return[]}},i.prototype.predecessors=function(u){var d=this._preds[u];if(d)return e.keys(d)},i.prototype.successors=function(u){var d=this._sucs[u];if(d)return e.keys(d)},i.prototype.neighbors=function(u){var d=this.predecessors(u);if(d)return e.union(d,this.successors(u))},i.prototype.isLeaf=function(u){var d;return this.isDirected()?d=this.successors(u):d=this.neighbors(u),d.length===0},i.prototype.filterNodes=function(u){var d=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});d.setGraph(this.graph());var f=this;e.each(this._nodes,function(v,k){u(k)&&d.setNode(k,v)}),e.each(this._edgeObjs,function(v){d.hasNode(v.v)&&d.hasNode(v.w)&&d.setEdge(v,f.edge(v))});var h={};function y(v){var k=f.parent(v);return k===void 0||d.hasNode(k)?(h[v]=k,k):k in h?h[k]:y(k)}return this._isCompound&&e.each(d.nodes(),function(v){d.setParent(v,y(v))}),d},i.prototype.setDefaultEdgeLabel=function(u){return e.isFunction(u)||(u=e.constant(u)),this._defaultEdgeLabelFn=u,this},i.prototype.edgeCount=function(){return this._edgeCount},i.prototype.edges=function(){return e.values(this._edgeObjs)},i.prototype.setPath=function(u,d){var f=this,h=arguments;return e.reduce(u,function(y,v){return h.length>1?f.setEdge(y,v,d):f.setEdge(y,v),v}),this},i.prototype.setEdge=function(){var u,d,f,h,y=!1,v=arguments[0];typeof v=="object"&&v!==null&&"v"in v?(u=v.v,d=v.w,f=v.name,arguments.length===2&&(h=arguments[1],y=!0)):(u=v,d=arguments[1],f=arguments[3],arguments.length>2&&(h=arguments[2],y=!0)),u=""+u,d=""+d,e.isUndefined(f)||(f=""+f);var k=s(this._isDirected,u,d,f);if(e.has(this._edgeLabels,k))return y&&(this._edgeLabels[k]=h),this;if(!e.isUndefined(f)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(u),this.setNode(d),this._edgeLabels[k]=y?h:this._defaultEdgeLabelFn(u,d,f);var g=c(this._isDirected,u,d,f);return u=g.v,d=g.w,Object.freeze(g),this._edgeObjs[k]=g,a(this._preds[d],u),a(this._sucs[u],d),this._in[d][k]=g,this._out[u][k]=g,this._edgeCount++,this},i.prototype.edge=function(u,d,f){var h=arguments.length===1?l(this._isDirected,arguments[0]):s(this._isDirected,u,d,f);return this._edgeLabels[h]},i.prototype.hasEdge=function(u,d,f){var h=arguments.length===1?l(this._isDirected,arguments[0]):s(this._isDirected,u,d,f);return e.has(this._edgeLabels,h)},i.prototype.removeEdge=function(u,d,f){var h=arguments.length===1?l(this._isDirected,arguments[0]):s(this._isDirected,u,d,f),y=this._edgeObjs[h];return y&&(u=y.v,d=y.w,delete this._edgeLabels[h],delete this._edgeObjs[h],o(this._preds[d],u),o(this._sucs[u],d),delete this._in[d][h],delete this._out[u][h],this._edgeCount--),this},i.prototype.inEdges=function(u,d){var f=this._in[u];if(f){var h=e.values(f);return d?e.filter(h,function(y){return y.v===d}):h}},i.prototype.outEdges=function(u,d){var f=this._out[u];if(f){var h=e.values(f);return d?e.filter(h,function(y){return y.w===d}):h}},i.prototype.nodeEdges=function(u,d){var f=this.inEdges(u,d);if(f)return f.concat(this.outEdges(u,d))};function a(u,d){u[d]?u[d]++:u[d]=1}function o(u,d){--u[d]||delete u[d]}function s(u,d,f,h){var y=""+d,v=""+f;if(!u&&y>v){var k=y;y=v,v=k}return y+r+v+r+(e.isUndefined(h)?t:h)}function c(u,d,f,h){var y=""+d,v=""+f;if(!u&&y>v){var k=y;y=v,v=k}var g={v:y,w:v};return h&&(g.name=h),g}function l(u,d){return s(u,d.v,d.w,d.name)}return pV}var yV,tae;function MOe(){return tae||(tae=1,yV="2.1.8"),yV}var gV,nae;function SOe(){return nae||(nae=1,gV={Graph:VZ(),version:MOe()}),gV}var mV,rae;function COe(){if(rae)return mV;rae=1;var e=ho(),t=VZ();mV={write:n,read:a};function n(o){var s={options:{directed:o.isDirected(),multigraph:o.isMultigraph(),compound:o.isCompound()},nodes:r(o),edges:i(o)};return e.isUndefined(o.graph())||(s.value=e.clone(o.graph())),s}function r(o){return e.map(o.nodes(),function(s){var c=o.node(s),l=o.parent(s),u={v:s};return e.isUndefined(c)||(u.value=c),e.isUndefined(l)||(u.parent=l),u})}function i(o){return e.map(o.edges(),function(s){var c=o.edge(s),l={v:s.v,w:s.w};return e.isUndefined(s.name)||(l.name=s.name),e.isUndefined(c)||(l.value=c),l})}function a(o){var s=new t(o.options).setGraph(o.value);return e.each(o.nodes,function(c){s.setNode(c.v,c.value),c.parent&&s.setParent(c.v,c.parent)}),e.each(o.edges,function(c){s.setEdge({v:c.v,w:c.w,name:c.name},c.value)}),s}return mV}var vV,iae;function LOe(){if(iae)return vV;iae=1;var e=ho();vV=t;function t(n){var r={},i=[],a;function o(s){e.has(r,s)||(r[s]=!0,a.push(s),e.each(n.successors(s),o),e.each(n.predecessors(s),o))}return e.each(n.nodes(),function(s){a=[],o(s),a.length&&i.push(a)}),i}return vV}var kV,aae;function Hpe(){if(aae)return kV;aae=1;var e=ho();kV=t;function t(){this._arr=[],this._keyIndices={}}return t.prototype.size=function(){return this._arr.length},t.prototype.keys=function(){return this._arr.map(function(n){return n.key})},t.prototype.has=function(n){return e.has(this._keyIndices,n)},t.prototype.priority=function(n){var r=this._keyIndices[n];if(r!==void 0)return this._arr[r].priority},t.prototype.min=function(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key},t.prototype.add=function(n,r){var i=this._keyIndices;if(n=String(n),!e.has(i,n)){var a=this._arr,o=a.length;return i[n]=o,a.push({key:n,priority:r}),this._decrease(o),!0}return!1},t.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var n=this._arr.pop();return delete this._keyIndices[n.key],this._heapify(0),n.key},t.prototype.decrease=function(n,r){var i=this._keyIndices[n];if(r>this._arr[i].priority)throw new Error("New priority is greater than current priority. Key: "+n+" Old: "+this._arr[i].priority+" New: "+r);this._arr[i].priority=r,this._decrease(i)},t.prototype._heapify=function(n){var r=this._arr,i=2*n,a=i+1,o=n;i<r.length&&(o=r[i].priority<r[o].priority?i:o,a<r.length&&(o=r[a].priority<r[o].priority?a:o),o!==n&&(this._swap(n,o),this._heapify(o)))},t.prototype._decrease=function(n){for(var r=this._arr,i=r[n].priority,a;n!==0&&(a=n>>1,!(r[a].priority<i));)this._swap(n,a),n=a},t.prototype._swap=function(n,r){var i=this._arr,a=this._keyIndices,o=i[n],s=i[r];i[n]=s,i[r]=o,a[s.key]=n,a[o.key]=r},kV}var xV,oae;function Vpe(){if(oae)return xV;oae=1;var e=ho(),t=Hpe();xV=r;var n=e.constant(1);function r(a,o,s,c){return i(a,String(o),s||n,c||function(l){return a.outEdges(l)})}function i(a,o,s,c){var l={},u=new t,d,f,h=function(y){var v=y.v!==d?y.v:y.w,k=l[v],g=s(y),S=f.distance+g;if(g<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+y+" Weight: "+g);S<k.distance&&(k.distance=S,k.predecessor=d,u.decrease(v,S))};for(a.nodes().forEach(function(y){var v=y===o?0:Number.POSITIVE_INFINITY;l[y]={distance:v},u.add(y,v)});u.size()>0&&(d=u.removeMin(),f=l[d],f.distance!==Number.POSITIVE_INFINITY);)c(d).forEach(h);return l}return xV}var wV,sae;function IOe(){if(sae)return wV;sae=1;var e=Vpe(),t=ho();wV=n;function n(r,i,a){return t.transform(r.nodes(),function(o,s){o[s]=e(r,s,i,a)},{})}return wV}var bV,cae;function Upe(){if(cae)return bV;cae=1;var e=ho();bV=t;function t(n){var r=0,i=[],a={},o=[];function s(c){var l=a[c]={onStack:!0,lowlink:r,index:r++};if(i.push(c),n.successors(c).forEach(function(f){e.has(a,f)?a[f].onStack&&(l.lowlink=Math.min(l.lowlink,a[f].index)):(s(f),l.lowlink=Math.min(l.lowlink,a[f].lowlink))}),l.lowlink===l.index){var u=[],d;do d=i.pop(),a[d].onStack=!1,u.push(d);while(c!==d);o.push(u)}}return n.nodes().forEach(function(c){e.has(a,c)||s(c)}),o}return bV}var MV,lae;function AOe(){if(lae)return MV;lae=1;var e=ho(),t=Upe();MV=n;function n(r){return e.filter(t(r),function(i){return i.length>1||i.length===1&&r.hasEdge(i[0],i[0])})}return MV}var SV,uae;function _Oe(){if(uae)return SV;uae=1;var e=ho();SV=n;var t=e.constant(1);function n(i,a,o){return r(i,a||t,o||function(s){return i.outEdges(s)})}function r(i,a,o){var s={},c=i.nodes();return c.forEach(function(l){s[l]={},s[l][l]={distance:0},c.forEach(function(u){l!==u&&(s[l][u]={distance:Number.POSITIVE_INFINITY})}),o(l).forEach(function(u){var d=u.v===l?u.w:u.v,f=a(u);s[l][d]={distance:f,predecessor:l}})}),c.forEach(function(l){var u=s[l];c.forEach(function(d){var f=s[d];c.forEach(function(h){var y=f[l],v=u[h],k=f[h],g=y.distance+v.distance;g<k.distance&&(k.distance=g,k.predecessor=v.predecessor)})})}),s}return SV}var CV,dae;function $pe(){if(dae)return CV;dae=1;var e=ho();CV=t,t.CycleException=n;function t(r){var i={},a={},o=[];function s(c){if(e.has(a,c))throw new n;e.has(i,c)||(a[c]=!0,i[c]=!0,e.each(r.predecessors(c),s),delete a[c],o.push(c))}if(e.each(r.sinks(),s),e.size(i)!==r.nodeCount())throw new n;return o}function n(){}return n.prototype=new Error,CV}var LV,hae;function EOe(){if(hae)return LV;hae=1;var e=$pe();LV=t;function t(n){try{e(n)}catch(r){if(r instanceof e.CycleException)return!1;throw r}return!0}return LV}var IV,fae;function Wpe(){if(fae)return IV;fae=1;var e=ho();IV=t;function t(r,i,a){e.isArray(i)||(i=[i]);var o=(r.isDirected()?r.successors:r.neighbors).bind(r),s=[],c={};return e.each(i,function(l){if(!r.hasNode(l))throw new Error("Graph does not have node: "+l);n(r,l,a==="post",c,o,s)}),s}function n(r,i,a,o,s,c){e.has(o,i)||(o[i]=!0,a||c.push(i),e.each(s(i),function(l){n(r,l,a,o,s,c)}),a&&c.push(i))}return IV}var AV,pae;function POe(){if(pae)return AV;pae=1;var e=Wpe();AV=t;function t(n,r){return e(n,r,"post")}return AV}var _V,yae;function NOe(){if(yae)return _V;yae=1;var e=Wpe();_V=t;function t(n,r){return e(n,r,"pre")}return _V}var EV,gae;function ROe(){if(gae)return EV;gae=1;var e=ho(),t=VZ(),n=Hpe();EV=r;function r(i,a){var o=new t,s={},c=new n,l;function u(f){var h=f.v===l?f.w:f.v,y=c.priority(h);if(y!==void 0){var v=a(f);v<y&&(s[h]=l,c.decrease(h,v))}}if(i.nodeCount()===0)return o;e.each(i.nodes(),function(f){c.add(f,Number.POSITIVE_INFINITY),o.setNode(f)}),c.decrease(i.nodes()[0],0);for(var d=!1;c.size()>0;){if(l=c.removeMin(),e.has(s,l))o.setEdge(l,s[l]);else{if(d)throw new Error("Input graph is not connected: "+i);d=!0}i.nodeEdges(l).forEach(u)}return o}return EV}var PV,mae;function jOe(){return mae||(mae=1,PV={components:LOe(),dijkstra:Vpe(),dijkstraAll:IOe(),findCycles:AOe(),floydWarshall:_Oe(),isAcyclic:EOe(),postorder:POe(),preorder:NOe(),prim:ROe(),tarjan:Upe(),topsort:$pe()}),PV}var NV,vae;function TOe(){if(vae)return NV;vae=1;var e=SOe();return NV={Graph:e.Graph,json:COe(),alg:jOe(),version:e.version},NV}var gD;if(typeof IZ=="function")try{gD=TOe()}catch{}gD||(gD=window.graphlib);var Ho=gD,RV,kae;function DOe(){if(kae)return RV;kae=1;var e=mpe(),t=1,n=4;function r(i){return e(i,t|n)}return RV=r,RV}var jV,xae;function Zq(){if(xae)return jV;xae=1;var e=Jf(),t=lc(),n=Fq(),r=uo();function i(a,o,s){if(!r(s))return!1;var c=typeof o;return(c=="number"?t(s)&&n(o,s.length):c=="string"&&o in s)?e(s[o],a):!1}return jV=i,jV}var TV,wae;function qOe(){if(wae)return TV;wae=1;var e=Kq(),t=Jf(),n=Zq(),r=Wh(),i=Object.prototype,a=i.hasOwnProperty,o=e(function(s,c){s=Object(s);var l=-1,u=c.length,d=u>2?c[2]:void 0;for(d&&n(c[0],c[1],d)&&(u=1);++l<u;)for(var f=c[l],h=r(f),y=-1,v=h.length;++y<v;){var k=h[y],g=s[k];(g===void 0||t(g,i[k])&&!a.call(s,k))&&(s[k]=f[k])}return s});return TV=o,TV}var DV,bae;function zOe(){if(bae)return DV;bae=1;var e=uc(),t=lc(),n=gl();function r(i){return function(a,o,s){var c=Object(a);if(!t(a)){var l=e(o,3);a=n(a),o=function(d){return l(c[d],d,c)}}var u=i(a,o,s);return u>-1?c[l?a[u]:u]:void 0}}return DV=r,DV}var qV,Mae;function OOe(){if(Mae)return qV;Mae=1;var e=/\s/;function t(n){for(var r=n.length;r--&&e.test(n.charAt(r)););return r}return qV=t,qV}var zV,Sae;function FOe(){if(Sae)return zV;Sae=1;var e=OOe(),t=/^\s+/;function n(r){return r&&r.slice(0,e(r)+1).replace(t,"")}return zV=n,zV}var OV,Cae;function BOe(){if(Cae)return OV;Cae=1;var e=FOe(),t=uo(),n=n0(),r=NaN,i=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,o=/^0o[0-7]+$/i,s=parseInt;function c(l){if(typeof l=="number")return l;if(n(l))return r;if(t(l)){var u=typeof l.valueOf=="function"?l.valueOf():l;l=t(u)?u+"":u}if(typeof l!="string")return l===0?l:+l;l=e(l);var d=a.test(l);return d||o.test(l)?s(l.slice(2),d?2:8):i.test(l)?r:+l}return OV=c,OV}var FV,Lae;function Gpe(){if(Lae)return FV;Lae=1;var e=BOe(),t=1/0,n=17976931348623157e292;function r(i){if(!i)return i===0?i:0;if(i=e(i),i===t||i===-t){var a=i<0?-1:1;return a*n}return i===i?i:0}return FV=r,FV}var BV,Iae;function HOe(){if(Iae)return BV;Iae=1;var e=Gpe();function t(n){var r=e(n),i=r%1;return r===r?i?r-i:r:0}return BV=t,BV}var HV,Aae;function VOe(){if(Aae)return HV;Aae=1;var e=Ope(),t=uc(),n=HOe(),r=Math.max;function i(a,o,s){var c=a==null?0:a.length;if(!c)return-1;var l=s==null?0:n(s);return l<0&&(l=r(c+l,0)),e(a,t(o,3),l)}return HV=i,HV}var VV,_ae;function UOe(){if(_ae)return VV;_ae=1;var e=zOe(),t=VOe(),n=e(t);return VV=n,VV}var UV,Eae;function Kpe(){if(Eae)return UV;Eae=1;var e=HZ();function t(n){var r=n==null?0:n.length;return r?e(n,1):[]}return UV=t,UV}var $V,Pae;function $Oe(){if(Pae)return $V;Pae=1;var e=zZ(),t=vpe(),n=Wh();function r(i,a){return i==null?i:e(i,t(a),n)}return $V=r,$V}var WV,Nae;function WOe(){if(Nae)return WV;Nae=1;function e(t){var n=t==null?0:t.length;return n?t[n-1]:void 0}return WV=e,WV}var GV,Rae;function GOe(){if(Rae)return GV;Rae=1;var e=zq(),t=OZ(),n=uc();function r(i,a){var o={};return a=n(a,3),t(i,function(s,c,l){e(o,c,a(s,c,l))}),o}return GV=r,GV}var KV,jae;function UZ(){if(jae)return KV;jae=1;var e=n0();function t(n,r,i){for(var a=-1,o=n.length;++a<o;){var s=n[a],c=r(s);if(c!=null&&(l===void 0?c===c&&!e(c):i(c,l)))var l=c,u=s}return u}return KV=t,KV}var ZV,Tae;function KOe(){if(Tae)return ZV;Tae=1;function e(t,n){return t>n}return ZV=e,ZV}var XV,Dae;function ZOe(){if(Dae)return XV;Dae=1;var e=UZ(),t=KOe(),n=Gh();function r(i){return i&&i.length?e(i,n,t):void 0}return XV=r,XV}var YV,qae;function Zpe(){if(qae)return YV;qae=1;var e=zq(),t=Jf();function n(r,i,a){(a!==void 0&&!t(r[i],a)||a===void 0&&!(i in r))&&e(r,i,a)}return YV=n,YV}var JV,zae;function XOe(){if(zae)return JV;zae=1;var e=Uh(),t=Vq(),n=Ss(),r="[object Object]",i=Function.prototype,a=Object.prototype,o=i.toString,s=a.hasOwnProperty,c=o.call(Object);function l(u){if(!n(u)||e(u)!=r)return!1;var d=t(u);if(d===null)return!0;var f=s.call(d,"constructor")&&d.constructor;return typeof f=="function"&&f instanceof f&&o.call(f)==c}return JV=l,JV}var QV,Oae;function Xpe(){if(Oae)return QV;Oae=1;function e(t,n){if(!(n==="constructor"&&typeof t[n]=="function")&&n!="__proto__")return t[n]}return QV=e,QV}var eU,Fae;function YOe(){if(Fae)return eU;Fae=1;var e=cg(),t=Wh();function n(r){return e(r,t(r))}return eU=n,eU}var tU,Bae;function JOe(){if(Bae)return tU;Bae=1;var e=Zpe(),t=ape(),n=ppe(),r=ope(),i=gpe(),a=lg(),o=$r(),s=Fpe(),c=e0(),l=sg(),u=uo(),d=XOe(),f=ug(),h=Xpe(),y=YOe();function v(k,g,S,w,C,_,A){var j=h(k,S),O=h(g,S),T=A.get(O);if(T){e(k,S,T);return}var D=_?_(j,O,S+"",k,g,A):void 0,I=D===void 0;if(I){var R=o(O),U=!R&&c(O),q=!R&&!U&&f(O);D=O,R||U||q?o(j)?D=j:s(j)?D=r(j):U?(I=!1,D=t(O,!0)):q?(I=!1,D=n(O,!0)):D=[]:d(O)||a(O)?(D=j,a(j)?D=y(j):(!u(j)||l(j))&&(D=i(O))):I=!1}I&&(A.set(O,D),C(D,O,w,_,A),A.delete(O)),e(k,S,D)}return tU=v,tU}var nU,Hae;function QOe(){if(Hae)return nU;Hae=1;var e=qq(),t=Zpe(),n=zZ(),r=JOe(),i=uo(),a=Wh(),o=Xpe();function s(c,l,u,d,f){c!==l&&n(l,function(h,y){if(f||(f=new e),i(h))r(c,l,y,u,s,d,f);else{var v=d?d(o(c,y),h,y+"",c,l,f):void 0;v===void 0&&(v=h),t(c,y,v)}},a)}return nU=s,nU}var rU,Vae;function eFe(){if(Vae)return rU;Vae=1;var e=Kq(),t=Zq();function n(r){return e(function(i,a){var o=-1,s=a.length,c=s>1?a[s-1]:void 0,l=s>2?a[2]:void 0;for(c=r.length>3&&typeof c=="function"?(s--,c):void 0,l&&t(a[0],a[1],l)&&(c=s<3?void 0:c,s=1),i=Object(i);++o<s;){var u=a[o];u&&r(i,u,o,c)}return i})}return rU=n,rU}var iU,Uae;function tFe(){if(Uae)return iU;Uae=1;var e=QOe(),t=eFe(),n=t(function(r,i,a){e(r,i,a)});return iU=n,iU}var aU,$ae;function Ype(){if($ae)return aU;$ae=1;function e(t,n){return t<n}return aU=e,aU}var oU,Wae;function nFe(){if(Wae)return oU;Wae=1;var e=UZ(),t=Ype(),n=Gh();function r(i){return i&&i.length?e(i,n,t):void 0}return oU=r,oU}var sU,Gae;function rFe(){if(Gae)return sU;Gae=1;var e=UZ(),t=uc(),n=Ype();function r(i,a){return i&&i.length?e(i,t(a,2),n):void 0}return sU=r,sU}var cU,Kae;function iFe(){if(Kae)return cU;Kae=1;var e=Bo(),t=function(){return e.Date.now()};return cU=t,cU}var lU,Zae;function aFe(){if(Zae)return lU;Zae=1;var e=Oq(),t=Wq(),n=Fq(),r=uo(),i=dg();function a(o,s,c,l){if(!r(o))return o;s=t(s,o);for(var u=-1,d=s.length,f=d-1,h=o;h!=null&&++u<d;){var y=i(s[u]),v=c;if(y==="__proto__"||y==="constructor"||y==="prototype")return o;if(u!=f){var k=h[y];v=l?l(k,y,h):void 0,v===void 0&&(v=r(k)?k:n(s[u+1])?[]:{})}e(h,y,v),h=h[y]}return o}return lU=a,lU}var uU,Xae;function oFe(){if(Xae)return uU;Xae=1;var e=Gq(),t=aFe(),n=Wq();function r(i,a,o){for(var s=-1,c=a.length,l={};++s<c;){var u=a[s],d=e(i,u);o(d,u)&&t(l,n(u,i),d)}return l}return uU=r,uU}var dU,Yae;function sFe(){if(Yae)return dU;Yae=1;var e=oFe(),t=_pe();function n(r,i){return e(r,i,function(a,o){return t(r,o)})}return dU=n,dU}var hU,Jae;function cFe(){if(Jae)return hU;Jae=1;var e=Kpe(),t=qpe(),n=zpe();function r(i){return n(t(i,void 0,e),i+"")}return hU=r,hU}var fU,Qae;function lFe(){if(Qae)return fU;Qae=1;var e=sFe(),t=cFe(),n=t(function(r,i){return r==null?{}:e(r,i)});return fU=n,fU}var pU,eoe;function uFe(){if(eoe)return pU;eoe=1;var e=Math.ceil,t=Math.max;function n(r,i,a,o){for(var s=-1,c=t(e((i-r)/(a||1)),0),l=Array(c);c--;)l[o?c:++s]=r,r+=a;return l}return pU=n,pU}var yU,toe;function dFe(){if(toe)return yU;toe=1;var e=uFe(),t=Zq(),n=Gpe();function r(i){return function(a,o,s){return s&&typeof s!="number"&&t(a,o,s)&&(o=s=void 0),a=n(a),o===void 0?(o=a,a=0):o=n(o),s=s===void 0?a<o?1:-1:n(s),e(a,o,s,i)}}return yU=r,yU}var gU,noe;function hFe(){if(noe)return gU;noe=1;var e=dFe(),t=e();return gU=t,gU}var mU,roe;function fFe(){if(roe)return mU;roe=1;function e(t,n){var r=t.length;for(t.sort(n);r--;)t[r]=t[r].value;return t}return mU=e,mU}var vU,ioe;function pFe(){if(ioe)return vU;ioe=1;var e=n0();function t(n,r){if(n!==r){var i=n!==void 0,a=n===null,o=n===n,s=e(n),c=r!==void 0,l=r===null,u=r===r,d=e(r);if(!l&&!d&&!s&&n>r||s&&c&&u&&!l&&!d||a&&c&&u||!i&&u||!o)return 1;if(!a&&!s&&!d&&n<r||d&&i&&o&&!a&&!s||l&&i&&o||!c&&o||!u)return-1}return 0}return vU=t,vU}var kU,aoe;function yFe(){if(aoe)return kU;aoe=1;var e=pFe();function t(n,r,i){for(var a=-1,o=n.criteria,s=r.criteria,c=o.length,l=i.length;++a<c;){var u=e(o[a],s[a]);if(u){if(a>=l)return u;var d=i[a];return u*(d=="desc"?-1:1)}}return n.index-r.index}return kU=t,kU}var xU,ooe;function gFe(){if(ooe)return xU;ooe=1;var e=$q(),t=Gq(),n=uc(),r=jpe(),i=fFe(),a=Bq(),o=yFe(),s=Gh(),c=$r();function l(u,d,f){d.length?d=e(d,function(v){return c(v)?function(k){return t(k,v.length===1?v[0]:v)}:v}):d=[s];var h=-1;d=e(d,a(n));var y=r(u,function(v,k,g){var S=e(d,function(w){return w(v)});return{criteria:S,index:++h,value:v}});return i(y,function(v,k){return o(v,k,f)})}return xU=l,xU}var wU,soe;function mFe(){if(soe)return wU;soe=1;var e=HZ(),t=gFe(),n=Kq(),r=Zq(),i=n(function(a,o){if(a==null)return[];var s=o.length;return s>1&&r(a,o[0],o[1])?o=[]:s>2&&r(o[0],o[1],o[2])&&(o=[o[0]]),t(a,e(o,1),[])});return wU=i,wU}var bU,coe;function vFe(){if(coe)return bU;coe=1;var e=Ipe(),t=0;function n(r){var i=++t;return e(r)+i}return bU=n,bU}var MU,loe;function kFe(){if(loe)return MU;loe=1;function e(t,n,r){for(var i=-1,a=t.length,o=n.length,s={};++i<a;){var c=i<o?n[i]:void 0;r(s,t[i],c)}return s}return MU=e,MU}var SU,uoe;function xFe(){if(uoe)return SU;uoe=1;var e=Oq(),t=kFe();function n(r,i){return t(r||[],i||[],e)}return SU=n,SU}var mD;if(typeof IZ=="function")try{mD={cloneDeep:DOe(),constant:qZ(),defaults:qOe(),each:xpe(),filter:Ppe(),find:UOe(),flatten:Kpe(),forEach:kpe(),forIn:$Oe(),has:Npe(),isUndefined:Rpe(),last:WOe(),map:Tpe(),mapValues:GOe(),max:ZOe(),merge:tFe(),min:nFe(),minBy:rFe(),now:iFe(),pick:lFe(),range:hFe(),reduce:Dpe(),sortBy:mFe(),uniqueId:vFe(),values:Bpe(),zipObject:xFe()}}catch{}mD||(mD=window._);var nr=mD,wFe=Xq;function Xq(){var e={};e._next=e._prev=e,this._sentinel=e}Xq.prototype.dequeue=function(){var e=this._sentinel,t=e._prev;if(t!==e)return Jpe(t),t};Xq.prototype.enqueue=function(e){var t=this._sentinel;e._prev&&e._next&&Jpe(e),e._next=t._next,t._next._prev=e,t._next=e,e._prev=t};Xq.prototype.toString=function(){for(var e=[],t=this._sentinel,n=t._prev;n!==t;)e.push(JSON.stringify(n,bFe)),n=n._prev;return"["+e.join(", ")+"]"};function Jpe(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function bFe(e,t){if(e!=="_next"&&e!=="_prev")return t}var Ks=nr,MFe=Ho.Graph,SFe=wFe,CFe=IFe,LFe=Ks.constant(1);function IFe(e,t){if(e.nodeCount()<=1)return[];var n=_Fe(e,t||LFe),r=AFe(n.graph,n.buckets,n.zeroIdx);return Ks.flatten(Ks.map(r,function(i){return e.outEdges(i.v,i.w)}),!0)}function AFe(e,t,n){for(var r=[],i=t[t.length-1],a=t[0],o;e.nodeCount();){for(;o=a.dequeue();)CU(e,t,n,o);for(;o=i.dequeue();)CU(e,t,n,o);if(e.nodeCount()){for(var s=t.length-2;s>0;--s)if(o=t[s].dequeue(),o){r=r.concat(CU(e,t,n,o,!0));break}}}return r}function CU(e,t,n,r,i){var a=i?[]:void 0;return Ks.forEach(e.inEdges(r.v),function(o){var s=e.edge(o),c=e.node(o.v);i&&a.push({v:o.v,w:o.w}),c.out-=s,eG(t,n,c)}),Ks.forEach(e.outEdges(r.v),function(o){var s=e.edge(o),c=o.w,l=e.node(c);l.in-=s,eG(t,n,l)}),e.removeNode(r.v),a}function _Fe(e,t){var n=new MFe,r=0,i=0;Ks.forEach(e.nodes(),function(s){n.setNode(s,{v:s,in:0,out:0})}),Ks.forEach(e.edges(),function(s){var c=n.edge(s.v,s.w)||0,l=t(s),u=c+l;n.setEdge(s.v,s.w,u),i=Math.max(i,n.node(s.v).out+=l),r=Math.max(r,n.node(s.w).in+=l)});var a=Ks.range(i+r+3).map(function(){return new SFe}),o=r+1;return Ks.forEach(n.nodes(),function(s){eG(a,o,n.node(s))}),{graph:n,buckets:a,zeroIdx:o}}function eG(e,t,n){n.out?n.in?e[n.out-n.in+t].enqueue(n):e[e.length-1].enqueue(n):e[0].enqueue(n)}var gh=nr,EFe=CFe,PFe={run:NFe,undo:jFe};function NFe(e){var t=e.graph().acyclicer==="greedy"?EFe(e,n(e)):RFe(e);gh.forEach(t,function(r){var i=e.edge(r);e.removeEdge(r),i.forwardName=r.name,i.reversed=!0,e.setEdge(r.w,r.v,i,gh.uniqueId("rev"))});function n(r){return function(i){return r.edge(i).weight}}}function RFe(e){var t=[],n={},r={};function i(a){gh.has(r,a)||(r[a]=!0,n[a]=!0,gh.forEach(e.outEdges(a),function(o){gh.has(n,o.w)?t.push(o):i(o.w)}),delete n[a])}return gh.forEach(e.nodes(),i),t}function jFe(e){gh.forEach(e.edges(),function(t){var n=e.edge(t);if(n.reversed){e.removeEdge(t);var r=n.forwardName;delete n.reversed,delete n.forwardName,e.setEdge(t.w,t.v,n,r)}})}var fn=nr,Qpe=Ho.Graph,fa={addDummyNode:eye,simplify:TFe,asNonCompoundGraph:DFe,successorWeights:qFe,predecessorWeights:zFe,intersectRect:OFe,buildLayerMatrix:FFe,normalizeRanks:BFe,removeEmptyRanks:HFe,addBorderNode:VFe,maxRank:tye,partition:UFe,time:$Fe,notime:WFe};function eye(e,t,n,r){var i;do i=fn.uniqueId(r);while(e.hasNode(i));return n.dummy=t,e.setNode(i,n),i}function TFe(e){var t=new Qpe().setGraph(e.graph());return fn.forEach(e.nodes(),function(n){t.setNode(n,e.node(n))}),fn.forEach(e.edges(),function(n){var r=t.edge(n.v,n.w)||{weight:0,minlen:1},i=e.edge(n);t.setEdge(n.v,n.w,{weight:r.weight+i.weight,minlen:Math.max(r.minlen,i.minlen)})}),t}function DFe(e){var t=new Qpe({multigraph:e.isMultigraph()}).setGraph(e.graph());return fn.forEach(e.nodes(),function(n){e.children(n).length||t.setNode(n,e.node(n))}),fn.forEach(e.edges(),function(n){t.setEdge(n,e.edge(n))}),t}function qFe(e){var t=fn.map(e.nodes(),function(n){var r={};return fn.forEach(e.outEdges(n),function(i){r[i.w]=(r[i.w]||0)+e.edge(i).weight}),r});return fn.zipObject(e.nodes(),t)}function zFe(e){var t=fn.map(e.nodes(),function(n){var r={};return fn.forEach(e.inEdges(n),function(i){r[i.v]=(r[i.v]||0)+e.edge(i).weight}),r});return fn.zipObject(e.nodes(),t)}function OFe(e,t){var n=e.x,r=e.y,i=t.x-n,a=t.y-r,o=e.width/2,s=e.height/2;if(!i&&!a)throw new Error("Not possible to find intersection inside of the rectangle");var c,l;return Math.abs(a)*o>Math.abs(i)*s?(a<0&&(s=-s),c=s*i/a,l=s):(i<0&&(o=-o),c=o,l=o*a/i),{x:n+c,y:r+l}}function FFe(e){var t=fn.map(fn.range(tye(e)+1),function(){return[]});return fn.forEach(e.nodes(),function(n){var r=e.node(n),i=r.rank;fn.isUndefined(i)||(t[i][r.order]=n)}),t}function BFe(e){var t=fn.min(fn.map(e.nodes(),function(n){return e.node(n).rank}));fn.forEach(e.nodes(),function(n){var r=e.node(n);fn.has(r,"rank")&&(r.rank-=t)})}function HFe(e){var t=fn.min(fn.map(e.nodes(),function(a){return e.node(a).rank})),n=[];fn.forEach(e.nodes(),function(a){var o=e.node(a).rank-t;n[o]||(n[o]=[]),n[o].push(a)});var r=0,i=e.graph().nodeRankFactor;fn.forEach(n,function(a,o){fn.isUndefined(a)&&o%i!==0?--r:r&&fn.forEach(a,function(s){e.node(s).rank+=r})})}function VFe(e,t,n,r){var i={width:0,height:0};return arguments.length>=4&&(i.rank=n,i.order=r),eye(e,"border",i,t)}function tye(e){return fn.max(fn.map(e.nodes(),function(t){var n=e.node(t).rank;if(!fn.isUndefined(n))return n}))}function UFe(e,t){var n={lhs:[],rhs:[]};return fn.forEach(e,function(r){t(r)?n.lhs.push(r):n.rhs.push(r)}),n}function $Fe(e,t){var n=fn.now();try{return t()}finally{console.log(e+" time: "+(fn.now()-n)+"ms")}}function WFe(e,t){return t()}var nye=nr,GFe=fa,KFe={run:ZFe,undo:YFe};function ZFe(e){e.graph().dummyChains=[],nye.forEach(e.edges(),function(t){XFe(e,t)})}function XFe(e,t){var n=t.v,r=e.node(n).rank,i=t.w,a=e.node(i).rank,o=t.name,s=e.edge(t),c=s.labelRank;if(a!==r+1){e.removeEdge(t);var l,u,d;for(d=0,++r;r<a;++d,++r)s.points=[],u={width:0,height:0,edgeLabel:s,edgeObj:t,rank:r},l=GFe.addDummyNode(e,"edge",u,"_d"),r===c&&(u.width=s.width,u.height=s.height,u.dummy="edge-label",u.labelpos=s.labelpos),e.setEdge(n,l,{weight:s.weight},o),d===0&&e.graph().dummyChains.push(l),n=l;e.setEdge(n,i,{weight:s.weight},o)}}function YFe(e){nye.forEach(e.graph().dummyChains,function(t){var n=e.node(t),r=n.edgeLabel,i;for(e.setEdge(n.edgeObj,r);n.dummy;)i=e.successors(t)[0],e.removeNode(t),r.points.push({x:n.x,y:n.y}),n.dummy==="edge-label"&&(r.x=n.x,r.y=n.y,r.width=n.width,r.height=n.height),t=i,n=e.node(t)})}var bm=nr,Yq={longestPath:JFe,slack:QFe};function JFe(e){var t={};function n(r){var i=e.node(r);if(bm.has(t,r))return i.rank;t[r]=!0;var a=bm.min(bm.map(e.outEdges(r),function(o){return n(o.w)-e.edge(o).minlen}));return(a===Number.POSITIVE_INFINITY||a===void 0||a===null)&&(a=0),i.rank=a}bm.forEach(e.sources(),n)}function QFe(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}var vD=nr,eBe=Ho.Graph,kD=Yq.slack,rye=tBe;function tBe(e){var t=new eBe({directed:!1}),n=e.nodes()[0],r=e.nodeCount();t.setNode(n,{});for(var i,a;nBe(t,e)<r;)i=rBe(t,e),a=t.hasNode(i.v)?kD(e,i):-kD(e,i),iBe(t,e,a);return t}function nBe(e,t){function n(r){vD.forEach(t.nodeEdges(r),function(i){var a=i.v,o=r===a?i.w:a;!e.hasNode(o)&&!kD(t,i)&&(e.setNode(o,{}),e.setEdge(r,o,{}),n(o))})}return vD.forEach(e.nodes(),n),e.nodeCount()}function rBe(e,t){return vD.minBy(t.edges(),function(n){if(e.hasNode(n.v)!==e.hasNode(n.w))return kD(t,n)})}function iBe(e,t,n){vD.forEach(e.nodes(),function(r){t.node(r).rank+=n})}var ic=nr,aBe=rye,oBe=Yq.slack,sBe=Yq.longestPath,cBe=Ho.alg.preorder,lBe=Ho.alg.postorder,uBe=fa.simplify,dBe=Kh;Kh.initLowLimValues=WZ;Kh.initCutValues=$Z;Kh.calcCutValue=iye;Kh.leaveEdge=oye;Kh.enterEdge=sye;Kh.exchangeEdges=cye;function Kh(e){e=uBe(e),sBe(e);var t=aBe(e);WZ(t),$Z(t,e);for(var n,r;n=oye(t);)r=sye(t,e,n),cye(t,e,n,r)}function $Z(e,t){var n=lBe(e,e.nodes());n=n.slice(0,n.length-1),ic.forEach(n,function(r){hBe(e,t,r)})}function hBe(e,t,n){var r=e.node(n),i=r.parent;e.edge(n,i).cutvalue=iye(e,t,n)}function iye(e,t,n){var r=e.node(n),i=r.parent,a=!0,o=t.edge(n,i),s=0;return o||(a=!1,o=t.edge(i,n)),s=o.weight,ic.forEach(t.nodeEdges(n),function(c){var l=c.v===n,u=l?c.w:c.v;if(u!==i){var d=l===a,f=t.edge(c).weight;if(s+=d?f:-f,pBe(e,n,u)){var h=e.edge(n,u).cutvalue;s+=d?-h:h}}}),s}function WZ(e,t){arguments.length<2&&(t=e.nodes()[0]),aye(e,{},1,t)}function aye(e,t,n,r,i){var a=n,o=e.node(r);return t[r]=!0,ic.forEach(e.neighbors(r),function(s){ic.has(t,s)||(n=aye(e,t,n,s,r))}),o.low=a,o.lim=n++,i?o.parent=i:delete o.parent,n}function oye(e){return ic.find(e.edges(),function(t){return e.edge(t).cutvalue<0})}function sye(e,t,n){var r=n.v,i=n.w;t.hasEdge(r,i)||(r=n.w,i=n.v);var a=e.node(r),o=e.node(i),s=a,c=!1;a.lim>o.lim&&(s=o,c=!0);var l=ic.filter(t.edges(),function(u){return c===doe(e,e.node(u.v),s)&&c!==doe(e,e.node(u.w),s)});return ic.minBy(l,function(u){return oBe(t,u)})}function cye(e,t,n,r){var i=n.v,a=n.w;e.removeEdge(i,a),e.setEdge(r.v,r.w,{}),WZ(e),$Z(e,t),fBe(e,t)}function fBe(e,t){var n=ic.find(e.nodes(),function(i){return!t.node(i).parent}),r=cBe(e,n);r=r.slice(1),ic.forEach(r,function(i){var a=e.node(i).parent,o=t.edge(i,a),s=!1;o||(o=t.edge(a,i),s=!0),t.node(i).rank=t.node(a).rank+(s?o.minlen:-o.minlen)})}function pBe(e,t,n){return e.hasEdge(t,n)}function doe(e,t,n){return n.low<=t.lim&&t.lim<=n.lim}var yBe=Yq,lye=yBe.longestPath,gBe=rye,mBe=dBe,vBe=kBe;function kBe(e){switch(e.graph().ranker){case"network-simplex":hoe(e);break;case"tight-tree":wBe(e);break;case"longest-path":xBe(e);break;default:hoe(e)}}var xBe=lye;function wBe(e){lye(e),gBe(e)}function hoe(e){mBe(e)}var tG=nr,bBe=MBe;function MBe(e){var t=CBe(e);tG.forEach(e.graph().dummyChains,function(n){for(var r=e.node(n),i=r.edgeObj,a=SBe(e,t,i.v,i.w),o=a.path,s=a.lca,c=0,l=o[c],u=!0;n!==i.w;){if(r=e.node(n),u){for(;(l=o[c])!==s&&e.node(l).maxRank<r.rank;)c++;l===s&&(u=!1)}if(!u){for(;c<o.length-1&&e.node(l=o[c+1]).minRank<=r.rank;)c++;l=o[c]}e.setParent(n,l),n=e.successors(n)[0]}})}function SBe(e,t,n,r){var i=[],a=[],o=Math.min(t[n].low,t[r].low),s=Math.max(t[n].lim,t[r].lim),c,l;c=n;do c=e.parent(c),i.push(c);while(c&&(t[c].low>o||s>t[c].lim));for(l=c,c=r;(c=e.parent(c))!==l;)a.push(c);return{path:i.concat(a.reverse()),lca:l}}function CBe(e){var t={},n=0;function r(i){var a=n;tG.forEach(e.children(i),r),t[i]={low:a,lim:n++}}return tG.forEach(e.children(),r),t}var Zs=nr,nG=fa,LBe={run:IBe,cleanup:EBe};function IBe(e){var t=nG.addDummyNode(e,"root",{},"_root"),n=ABe(e),r=Zs.max(Zs.values(n))-1,i=2*r+1;e.graph().nestingRoot=t,Zs.forEach(e.edges(),function(o){e.edge(o).minlen*=i});var a=_Be(e)+1;Zs.forEach(e.children(),function(o){uye(e,t,i,a,r,n,o)}),e.graph().nodeRankFactor=i}function uye(e,t,n,r,i,a,o){var s=e.children(o);if(!s.length){o!==t&&e.setEdge(t,o,{weight:0,minlen:n});return}var c=nG.addBorderNode(e,"_bt"),l=nG.addBorderNode(e,"_bb"),u=e.node(o);e.setParent(c,o),u.borderTop=c,e.setParent(l,o),u.borderBottom=l,Zs.forEach(s,function(d){uye(e,t,n,r,i,a,d);var f=e.node(d),h=f.borderTop?f.borderTop:d,y=f.borderBottom?f.borderBottom:d,v=f.borderTop?r:2*r,k=h!==y?1:i-a[o]+1;e.setEdge(c,h,{weight:v,minlen:k,nestingEdge:!0}),e.setEdge(y,l,{weight:v,minlen:k,nestingEdge:!0})}),e.parent(o)||e.setEdge(t,c,{weight:0,minlen:i+a[o]})}function ABe(e){var t={};function n(r,i){var a=e.children(r);a&&a.length&&Zs.forEach(a,function(o){n(o,i+1)}),t[r]=i}return Zs.forEach(e.children(),function(r){n(r,1)}),t}function _Be(e){return Zs.reduce(e.edges(),function(t,n){return t+e.edge(n).weight},0)}function EBe(e){var t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,Zs.forEach(e.edges(),function(n){var r=e.edge(n);r.nestingEdge&&e.removeEdge(n)})}var LU=nr,PBe=fa,NBe=RBe;function RBe(e){function t(n){var r=e.children(n),i=e.node(n);if(r.length&&LU.forEach(r,t),LU.has(i,"minRank")){i.borderLeft=[],i.borderRight=[];for(var a=i.minRank,o=i.maxRank+1;a<o;++a)foe(e,"borderLeft","_bl",n,i,a),foe(e,"borderRight","_br",n,i,a)}}LU.forEach(e.children(),t)}function foe(e,t,n,r,i,a){var o={width:0,height:0,rank:a,borderType:t},s=i[t][a-1],c=PBe.addDummyNode(e,"border",o,n);i[t][a]=c,e.setParent(c,r),s&&e.setEdge(s,c,{weight:1})}var ds=nr,jBe={adjust:TBe,undo:DBe};function TBe(e){var t=e.graph().rankdir.toLowerCase();(t==="lr"||t==="rl")&&dye(e)}function DBe(e){var t=e.graph().rankdir.toLowerCase();(t==="bt"||t==="rl")&&qBe(e),(t==="lr"||t==="rl")&&(zBe(e),dye(e))}function dye(e){ds.forEach(e.nodes(),function(t){poe(e.node(t))}),ds.forEach(e.edges(),function(t){poe(e.edge(t))})}function poe(e){var t=e.width;e.width=e.height,e.height=t}function qBe(e){ds.forEach(e.nodes(),function(t){IU(e.node(t))}),ds.forEach(e.edges(),function(t){var n=e.edge(t);ds.forEach(n.points,IU),ds.has(n,"y")&&IU(n)})}function IU(e){e.y=-e.y}function zBe(e){ds.forEach(e.nodes(),function(t){AU(e.node(t))}),ds.forEach(e.edges(),function(t){var n=e.edge(t);ds.forEach(n.points,AU),ds.has(n,"x")&&AU(n)})}function AU(e){var t=e.x;e.x=e.y,e.y=t}var Fs=nr,OBe=FBe;function FBe(e){var t={},n=Fs.filter(e.nodes(),function(s){return!e.children(s).length}),r=Fs.max(Fs.map(n,function(s){return e.node(s).rank})),i=Fs.map(Fs.range(r+1),function(){return[]});function a(s){if(!Fs.has(t,s)){t[s]=!0;var c=e.node(s);i[c.rank].push(s),Fs.forEach(e.successors(s),a)}}var o=Fs.sortBy(n,function(s){return e.node(s).rank});return Fs.forEach(o,a),i}var Ec=nr,BBe=HBe;function HBe(e,t){for(var n=0,r=1;r<t.length;++r)n+=VBe(e,t[r-1],t[r]);return n}function VBe(e,t,n){for(var r=Ec.zipObject(n,Ec.map(n,function(l,u){return u})),i=Ec.flatten(Ec.map(t,function(l){return Ec.sortBy(Ec.map(e.outEdges(l),function(u){return{pos:r[u.w],weight:e.edge(u).weight}}),"pos")}),!0),a=1;a<n.length;)a<<=1;var o=2*a-1;a-=1;var s=Ec.map(new Array(o),function(){return 0}),c=0;return Ec.forEach(i.forEach(function(l){var u=l.pos+a;s[u]+=l.weight;for(var d=0;u>0;)u%2&&(d+=s[u+1]),u=u-1>>1,s[u]+=l.weight;c+=l.weight*d})),c}var yoe=nr,UBe=$Be;function $Be(e,t){return yoe.map(t,function(n){var r=e.inEdges(n);if(r.length){var i=yoe.reduce(r,function(a,o){var s=e.edge(o),c=e.node(o.v);return{sum:a.sum+s.weight*c.order,weight:a.weight+s.weight}},{sum:0,weight:0});return{v:n,barycenter:i.sum/i.weight,weight:i.weight}}else return{v:n}})}var Ra=nr,WBe=GBe;function GBe(e,t){var n={};Ra.forEach(e,function(i,a){var o=n[i.v]={indegree:0,in:[],out:[],vs:[i.v],i:a};Ra.isUndefined(i.barycenter)||(o.barycenter=i.barycenter,o.weight=i.weight)}),Ra.forEach(t.edges(),function(i){var a=n[i.v],o=n[i.w];!Ra.isUndefined(a)&&!Ra.isUndefined(o)&&(o.indegree++,a.out.push(n[i.w]))});var r=Ra.filter(n,function(i){return!i.indegree});return KBe(r)}function KBe(e){var t=[];function n(a){return function(o){o.merged||(Ra.isUndefined(o.barycenter)||Ra.isUndefined(a.barycenter)||o.barycenter>=a.barycenter)&&ZBe(a,o)}}function r(a){return function(o){o.in.push(a),--o.indegree===0&&e.push(o)}}for(;e.length;){var i=e.pop();t.push(i),Ra.forEach(i.in.reverse(),n(i)),Ra.forEach(i.out,r(i))}return Ra.map(Ra.filter(t,function(a){return!a.merged}),function(a){return Ra.pick(a,["vs","i","barycenter","weight"])})}function ZBe(e,t){var n=0,r=0;e.weight&&(n+=e.barycenter*e.weight,r+=e.weight),t.weight&&(n+=t.barycenter*t.weight,r+=t.weight),e.vs=t.vs.concat(e.vs),e.barycenter=n/r,e.weight=r,e.i=Math.min(t.i,e.i),t.merged=!0}var K0=nr,XBe=fa,YBe=JBe;function JBe(e,t){var n=XBe.partition(e,function(u){return K0.has(u,"barycenter")}),r=n.lhs,i=K0.sortBy(n.rhs,function(u){return-u.i}),a=[],o=0,s=0,c=0;r.sort(QBe(!!t)),c=goe(a,i,c),K0.forEach(r,function(u){c+=u.vs.length,a.push(u.vs),o+=u.barycenter*u.weight,s+=u.weight,c=goe(a,i,c)});var l={vs:K0.flatten(a,!0)};return s&&(l.barycenter=o/s,l.weight=s),l}function goe(e,t,n){for(var r;t.length&&(r=K0.last(t)).i<=n;)t.pop(),e.push(r.vs),n++;return n}function QBe(e){return function(t,n){return t.barycenter<n.barycenter?-1:t.barycenter>n.barycenter?1:e?n.i-t.i:t.i-n.i}}var Oc=nr,eHe=UBe,tHe=WBe,nHe=YBe,rHe=hye;function hye(e,t,n,r){var i=e.children(t),a=e.node(t),o=a?a.borderLeft:void 0,s=a?a.borderRight:void 0,c={};o&&(i=Oc.filter(i,function(y){return y!==o&&y!==s}));var l=eHe(e,i);Oc.forEach(l,function(y){if(e.children(y.v).length){var v=hye(e,y.v,n,r);c[y.v]=v,Oc.has(v,"barycenter")&&aHe(y,v)}});var u=tHe(l,n);iHe(u,c);var d=nHe(u,r);if(o&&(d.vs=Oc.flatten([o,d.vs,s],!0),e.predecessors(o).length)){var f=e.node(e.predecessors(o)[0]),h=e.node(e.predecessors(s)[0]);Oc.has(d,"barycenter")||(d.barycenter=0,d.weight=0),d.barycenter=(d.barycenter*d.weight+f.order+h.order)/(d.weight+2),d.weight+=2}return d}function iHe(e,t){Oc.forEach(e,function(n){n.vs=Oc.flatten(n.vs.map(function(r){return t[r]?t[r].vs:r}),!0)})}function aHe(e,t){Oc.isUndefined(e.barycenter)?(e.barycenter=t.barycenter,e.weight=t.weight):(e.barycenter=(e.barycenter*e.weight+t.barycenter*t.weight)/(e.weight+t.weight),e.weight+=t.weight)}var Z0=nr,oHe=Ho.Graph,sHe=cHe;function cHe(e,t,n){var r=lHe(e),i=new oHe({compound:!0}).setGraph({root:r}).setDefaultNodeLabel(function(a){return e.node(a)});return Z0.forEach(e.nodes(),function(a){var o=e.node(a),s=e.parent(a);(o.rank===t||o.minRank<=t&&t<=o.maxRank)&&(i.setNode(a),i.setParent(a,s||r),Z0.forEach(e[n](a),function(c){var l=c.v===a?c.w:c.v,u=i.edge(l,a),d=Z0.isUndefined(u)?0:u.weight;i.setEdge(l,a,{weight:e.edge(c).weight+d})}),Z0.has(o,"minRank")&&i.setNode(a,{borderLeft:o.borderLeft[t],borderRight:o.borderRight[t]}))}),i}function lHe(e){for(var t;e.hasNode(t=Z0.uniqueId("_root")););return t}var uHe=nr,dHe=hHe;function hHe(e,t,n){var r={},i;uHe.forEach(n,function(a){for(var o=e.parent(a),s,c;o;){if(s=e.parent(o),s?(c=r[s],r[s]=o):(c=i,i=o),c&&c!==o){t.setEdge(c,o);return}o=s}})}var el=nr,fHe=OBe,pHe=BBe,yHe=rHe,gHe=sHe,mHe=dHe,vHe=Ho.Graph,moe=fa,kHe=xHe;function xHe(e){var t=moe.maxRank(e),n=voe(e,el.range(1,t+1),"inEdges"),r=voe(e,el.range(t-1,-1,-1),"outEdges"),i=fHe(e);koe(e,i);for(var a=Number.POSITIVE_INFINITY,o,s=0,c=0;c<4;++s,++c){wHe(s%2?n:r,s%4>=2),i=moe.buildLayerMatrix(e);var l=pHe(e,i);l<a&&(c=0,o=el.cloneDeep(i),a=l)}koe(e,o)}function voe(e,t,n){return el.map(t,function(r){return gHe(e,r,n)})}function wHe(e,t){var n=new vHe;el.forEach(e,function(r){var i=r.graph().root,a=yHe(r,i,n,t);el.forEach(a.vs,function(o,s){r.node(o).order=s}),mHe(r,n,a.vs)})}function koe(e,t){el.forEach(t,function(n){el.forEach(n,function(r,i){e.node(r).order=i})})}var Bt=nr,bHe=Ho.Graph,MHe=fa,SHe={positionX:THe};function CHe(e,t){var n={};function r(i,a){var o=0,s=0,c=i.length,l=Bt.last(a);return Bt.forEach(a,function(u,d){var f=IHe(e,u),h=f?e.node(f).order:c;(f||u===l)&&(Bt.forEach(a.slice(s,d+1),function(y){Bt.forEach(e.predecessors(y),function(v){var k=e.node(v),g=k.order;(g<o||h<g)&&!(k.dummy&&e.node(y).dummy)&&fye(n,v,y)})}),s=d+1,o=h)}),a}return Bt.reduce(t,r),n}function LHe(e,t){var n={};function r(a,o,s,c,l){var u;Bt.forEach(Bt.range(o,s),function(d){u=a[d],e.node(u).dummy&&Bt.forEach(e.predecessors(u),function(f){var h=e.node(f);h.dummy&&(h.order<c||h.order>l)&&fye(n,f,u)})})}function i(a,o){var s=-1,c,l=0;return Bt.forEach(o,function(u,d){if(e.node(u).dummy==="border"){var f=e.predecessors(u);f.length&&(c=e.node(f[0]).order,r(o,l,d,s,c),l=d,s=c)}r(o,l,o.length,c,a.length)}),o}return Bt.reduce(t,i),n}function IHe(e,t){if(e.node(t).dummy)return Bt.find(e.predecessors(t),function(n){return e.node(n).dummy})}function fye(e,t,n){if(t>n){var r=t;t=n,n=r}var i=e[t];i||(e[t]=i={}),i[n]=!0}function AHe(e,t,n){if(t>n){var r=t;t=n,n=r}return Bt.has(e[t],n)}function _He(e,t,n,r){var i={},a={},o={};return Bt.forEach(t,function(s){Bt.forEach(s,function(c,l){i[c]=c,a[c]=c,o[c]=l})}),Bt.forEach(t,function(s){var c=-1;Bt.forEach(s,function(l){var u=r(l);if(u.length){u=Bt.sortBy(u,function(v){return o[v]});for(var d=(u.length-1)/2,f=Math.floor(d),h=Math.ceil(d);f<=h;++f){var y=u[f];a[l]===l&&c<o[y]&&!AHe(n,l,y)&&(a[y]=l,a[l]=i[l]=i[y],c=o[y])}}})}),{root:i,align:a}}function EHe(e,t,n,r,i){var a={},o=PHe(e,t,n,i),s=i?"borderLeft":"borderRight";function c(d,f){for(var h=o.nodes(),y=h.pop(),v={};y;)v[y]?d(y):(v[y]=!0,h.push(y),h=h.concat(f(y))),y=h.pop()}function l(d){a[d]=o.inEdges(d).reduce(function(f,h){return Math.max(f,a[h.v]+o.edge(h))},0)}function u(d){var f=o.outEdges(d).reduce(function(y,v){return Math.min(y,a[v.w]-o.edge(v))},Number.POSITIVE_INFINITY),h=e.node(d);f!==Number.POSITIVE_INFINITY&&h.borderType!==s&&(a[d]=Math.max(a[d],f))}return c(l,o.predecessors.bind(o)),c(u,o.successors.bind(o)),Bt.forEach(r,function(d){a[d]=a[n[d]]}),a}function PHe(e,t,n,r){var i=new bHe,a=e.graph(),o=DHe(a.nodesep,a.edgesep,r);return Bt.forEach(t,function(s){var c;Bt.forEach(s,function(l){var u=n[l];if(i.setNode(u),c){var d=n[c],f=i.edge(d,u);i.setEdge(d,u,Math.max(o(e,l,c),f||0))}c=l})}),i}function NHe(e,t){return Bt.minBy(Bt.values(t),function(n){var r=Number.NEGATIVE_INFINITY,i=Number.POSITIVE_INFINITY;return Bt.forIn(n,function(a,o){var s=qHe(e,o)/2;r=Math.max(a+s,r),i=Math.min(a-s,i)}),r-i})}function RHe(e,t){var n=Bt.values(t),r=Bt.min(n),i=Bt.max(n);Bt.forEach(["u","d"],function(a){Bt.forEach(["l","r"],function(o){var s=a+o,c=e[s],l;if(c!==t){var u=Bt.values(c);l=o==="l"?r-Bt.min(u):i-Bt.max(u),l&&(e[s]=Bt.mapValues(c,function(d){return d+l}))}})})}function jHe(e,t){return Bt.mapValues(e.ul,function(n,r){if(t)return e[t.toLowerCase()][r];var i=Bt.sortBy(Bt.map(e,r));return(i[1]+i[2])/2})}function THe(e){var t=MHe.buildLayerMatrix(e),n=Bt.merge(CHe(e,t),LHe(e,t)),r={},i;Bt.forEach(["u","d"],function(o){i=o==="u"?t:Bt.values(t).reverse(),Bt.forEach(["l","r"],function(s){s==="r"&&(i=Bt.map(i,function(d){return Bt.values(d).reverse()}));var c=(o==="u"?e.predecessors:e.successors).bind(e),l=_He(e,i,n,c),u=EHe(e,i,l.root,l.align,s==="r");s==="r"&&(u=Bt.mapValues(u,function(d){return-d})),r[o+s]=u})});var a=NHe(e,r);return RHe(r,a),jHe(r,e.graph().align)}function DHe(e,t,n){return function(r,i,a){var o=r.node(i),s=r.node(a),c=0,l;if(c+=o.width/2,Bt.has(o,"labelpos"))switch(o.labelpos.toLowerCase()){case"l":l=-o.width/2;break;case"r":l=o.width/2;break}if(l&&(c+=n?l:-l),l=0,c+=(o.dummy?t:e)/2,c+=(s.dummy?t:e)/2,c+=s.width/2,Bt.has(s,"labelpos"))switch(s.labelpos.toLowerCase()){case"l":l=s.width/2;break;case"r":l=-s.width/2;break}return l&&(c+=n?l:-l),l=0,c}}function qHe(e,t){return e.node(t).width}var X0=nr,pye=fa,zHe=SHe.positionX,OHe=FHe;function FHe(e){e=pye.asNonCompoundGraph(e),BHe(e),X0.forEach(zHe(e),function(t,n){e.node(n).x=t})}function BHe(e){var t=pye.buildLayerMatrix(e),n=e.graph().ranksep,r=0;X0.forEach(t,function(i){var a=X0.max(X0.map(i,function(o){return e.node(o).height}));X0.forEach(i,function(o){e.node(o).y=r+a/2}),r+=a+n})}var Xt=nr,xoe=PFe,woe=KFe,HHe=vBe,VHe=fa.normalizeRanks,UHe=bBe,$He=fa.removeEmptyRanks,boe=LBe,WHe=NBe,Moe=jBe,GHe=kHe,KHe=OHe,ll=fa,ZHe=Ho.Graph,XHe=YHe;function YHe(e,t){var n=t&&t.debugTiming?ll.time:ll.notime;n("layout",function(){var r=n(" buildLayoutGraph",function(){return cVe(e)});n(" runLayout",function(){JHe(r,n)}),n(" updateInputGraph",function(){QHe(e,r)})})}function JHe(e,t){t(" makeSpaceForEdgeLabels",function(){lVe(e)}),t(" removeSelfEdges",function(){vVe(e)}),t(" acyclic",function(){xoe.run(e)}),t(" nestingGraph.run",function(){boe.run(e)}),t(" rank",function(){HHe(ll.asNonCompoundGraph(e))}),t(" injectEdgeLabelProxies",function(){uVe(e)}),t(" removeEmptyRanks",function(){$He(e)}),t(" nestingGraph.cleanup",function(){boe.cleanup(e)}),t(" normalizeRanks",function(){VHe(e)}),t(" assignRankMinMax",function(){dVe(e)}),t(" removeEdgeLabelProxies",function(){hVe(e)}),t(" normalize.run",function(){woe.run(e)}),t(" parentDummyChains",function(){UHe(e)}),t(" addBorderSegments",function(){WHe(e)}),t(" order",function(){GHe(e)}),t(" insertSelfEdges",function(){kVe(e)}),t(" adjustCoordinateSystem",function(){Moe.adjust(e)}),t(" position",function(){KHe(e)}),t(" positionSelfEdges",function(){xVe(e)}),t(" removeBorderNodes",function(){mVe(e)}),t(" normalize.undo",function(){woe.undo(e)}),t(" fixupEdgeLabelCoords",function(){yVe(e)}),t(" undoCoordinateSystem",function(){Moe.undo(e)}),t(" translateGraph",function(){fVe(e)}),t(" assignNodeIntersects",function(){pVe(e)}),t(" reversePoints",function(){gVe(e)}),t(" acyclic.undo",function(){xoe.undo(e)})}function QHe(e,t){Xt.forEach(e.nodes(),function(n){var r=e.node(n),i=t.node(n);r&&(r.x=i.x,r.y=i.y,t.children(n).length&&(r.width=i.width,r.height=i.height))}),Xt.forEach(e.edges(),function(n){var r=e.edge(n),i=t.edge(n);r.points=i.points,Xt.has(i,"x")&&(r.x=i.x,r.y=i.y)}),e.graph().width=t.graph().width,e.graph().height=t.graph().height}var eVe=["nodesep","edgesep","ranksep","marginx","marginy"],tVe={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},nVe=["acyclicer","ranker","rankdir","align"],rVe=["width","height"],iVe={width:0,height:0},aVe=["minlen","weight","width","height","labeloffset"],oVe={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},sVe=["labelpos"];function cVe(e){var t=new ZHe({multigraph:!0,compound:!0}),n=EU(e.graph());return t.setGraph(Xt.merge({},tVe,_U(n,eVe),Xt.pick(n,nVe))),Xt.forEach(e.nodes(),function(r){var i=EU(e.node(r));t.setNode(r,Xt.defaults(_U(i,rVe),iVe)),t.setParent(r,e.parent(r))}),Xt.forEach(e.edges(),function(r){var i=EU(e.edge(r));t.setEdge(r,Xt.merge({},oVe,_U(i,aVe),Xt.pick(i,sVe)))}),t}function lVe(e){var t=e.graph();t.ranksep/=2,Xt.forEach(e.edges(),function(n){var r=e.edge(n);r.minlen*=2,r.labelpos.toLowerCase()!=="c"&&(t.rankdir==="TB"||t.rankdir==="BT"?r.width+=r.labeloffset:r.height+=r.labeloffset)})}function uVe(e){Xt.forEach(e.edges(),function(t){var n=e.edge(t);if(n.width&&n.height){var r=e.node(t.v),i=e.node(t.w),a={rank:(i.rank-r.rank)/2+r.rank,e:t};ll.addDummyNode(e,"edge-proxy",a,"_ep")}})}function dVe(e){var t=0;Xt.forEach(e.nodes(),function(n){var r=e.node(n);r.borderTop&&(r.minRank=e.node(r.borderTop).rank,r.maxRank=e.node(r.borderBottom).rank,t=Xt.max(t,r.maxRank))}),e.graph().maxRank=t}function hVe(e){Xt.forEach(e.nodes(),function(t){var n=e.node(t);n.dummy==="edge-proxy"&&(e.edge(n.e).labelRank=n.rank,e.removeNode(t))})}function fVe(e){var t=Number.POSITIVE_INFINITY,n=0,r=Number.POSITIVE_INFINITY,i=0,a=e.graph(),o=a.marginx||0,s=a.marginy||0;function c(l){var u=l.x,d=l.y,f=l.width,h=l.height;t=Math.min(t,u-f/2),n=Math.max(n,u+f/2),r=Math.min(r,d-h/2),i=Math.max(i,d+h/2)}Xt.forEach(e.nodes(),function(l){c(e.node(l))}),Xt.forEach(e.edges(),function(l){var u=e.edge(l);Xt.has(u,"x")&&c(u)}),t-=o,r-=s,Xt.forEach(e.nodes(),function(l){var u=e.node(l);u.x-=t,u.y-=r}),Xt.forEach(e.edges(),function(l){var u=e.edge(l);Xt.forEach(u.points,function(d){d.x-=t,d.y-=r}),Xt.has(u,"x")&&(u.x-=t),Xt.has(u,"y")&&(u.y-=r)}),a.width=n-t+o,a.height=i-r+s}function pVe(e){Xt.forEach(e.edges(),function(t){var n=e.edge(t),r=e.node(t.v),i=e.node(t.w),a,o;n.points?(a=n.points[0],o=n.points[n.points.length-1]):(n.points=[],a=i,o=r),n.points.unshift(ll.intersectRect(r,a)),n.points.push(ll.intersectRect(i,o))})}function yVe(e){Xt.forEach(e.edges(),function(t){var n=e.edge(t);if(Xt.has(n,"x"))switch((n.labelpos==="l"||n.labelpos==="r")&&(n.width-=n.labeloffset),n.labelpos){case"l":n.x-=n.width/2+n.labeloffset;break;case"r":n.x+=n.width/2+n.labeloffset;break}})}function gVe(e){Xt.forEach(e.edges(),function(t){var n=e.edge(t);n.reversed&&n.points.reverse()})}function mVe(e){Xt.forEach(e.nodes(),function(t){if(e.children(t).length){var n=e.node(t),r=e.node(n.borderTop),i=e.node(n.borderBottom),a=e.node(Xt.last(n.borderLeft)),o=e.node(Xt.last(n.borderRight));n.width=Math.abs(o.x-a.x),n.height=Math.abs(i.y-r.y),n.x=a.x+n.width/2,n.y=r.y+n.height/2}}),Xt.forEach(e.nodes(),function(t){e.node(t).dummy==="border"&&e.removeNode(t)})}function vVe(e){Xt.forEach(e.edges(),function(t){if(t.v===t.w){var n=e.node(t.v);n.selfEdges||(n.selfEdges=[]),n.selfEdges.push({e:t,label:e.edge(t)}),e.removeEdge(t)}})}function kVe(e){var t=ll.buildLayerMatrix(e);Xt.forEach(t,function(n){var r=0;Xt.forEach(n,function(i,a){var o=e.node(i);o.order=a+r,Xt.forEach(o.selfEdges,function(s){ll.addDummyNode(e,"selfedge",{width:s.label.width,height:s.label.height,rank:o.rank,order:a+ ++r,e:s.e,label:s.label},"_se")}),delete o.selfEdges})})}function xVe(e){Xt.forEach(e.nodes(),function(t){var n=e.node(t);if(n.dummy==="selfedge"){var r=e.node(n.e.v),i=r.x+r.width/2,a=r.y,o=n.x-i,s=r.height/2;e.setEdge(n.e,n.label),e.removeNode(t),n.label.points=[{x:i+2*o/3,y:a-s},{x:i+5*o/6,y:a-s},{x:i+o,y:a},{x:i+5*o/6,y:a+s},{x:i+2*o/3,y:a+s}],n.label.x=n.x,n.label.y=n.y}})}function _U(e,t){return Xt.mapValues(Xt.pick(e,t),Number)}function EU(e){var t={};return Xt.forEach(e,function(n,r){t[r.toLowerCase()]=n}),t}var Mm=nr,wVe=fa,bVe=Ho.Graph,MVe={debugOrdering:SVe};function SVe(e){var t=wVe.buildLayerMatrix(e),n=new bVe({compound:!0,multigraph:!0}).setGraph({});return Mm.forEach(e.nodes(),function(r){n.setNode(r,{label:r}),n.setParent(r,"layer"+e.node(r).rank)}),Mm.forEach(e.edges(),function(r){n.setEdge(r.v,r.w,{},r.name)}),Mm.forEach(t,function(r,i){var a="layer"+i;n.setNode(a,{rank:"same"}),Mm.reduce(r,function(o,s){return n.setEdge(o,s,{style:"invis"}),s})}),n}var CVe="0.8.5",LVe={graphlib:Ho,layout:XHe,debug:MVe,util:{time:fa.time,notime:fa.notime},version:CVe};const Soe=Rf(LVe),PU={direction:"LR",nodesep:60,ranksep:140},IVe=(e,t,n)=>{const r=new Map;if(e.length===0)return r;if(e.length===1){const u=e[0];return u&&r.set(u.id,{x:u.position.x,y:u.position.y}),r}const i=PU.direction,a=PU.nodesep,o=PU.ranksep,s=new Soe.graphlib.Graph({multigraph:!0});s.setGraph({rankdir:i,nodesep:a,ranksep:o}),s.setDefaultEdgeLabel(()=>({}));const c=new Set;for(const u of e)s.setNode(u.id,{width:u.width,height:u.height}),c.add(u.id);let l=0;for(const u of t)!c.has(u.source)||!c.has(u.target)||s.setEdge(u.source,u.target,{},`e${l++}`);Soe.layout(s);for(const u of e){const d=s.node(u.id);d&&r.set(u.id,{x:d.x-u.width/2,y:d.y-u.height/2})}return r};function AVe({nodes:e,connectors:t,flowPos:n,nodeIdGen:r,connectorIdGen:i,defaultOffset:a={x:24,y:24}}){const o=new Map;for(const h of e)o.set(h.id,r(h.id));let s=Number.POSITIVE_INFINITY,c=Number.POSITIVE_INFINITY;for(const h of e)h.position.x<s&&(s=h.position.x),h.position.y<c&&(c=h.position.y);Number.isFinite(s)||(s=0),Number.isFinite(c)||(c=0);const l=n?n.x-s:a.x,u=n?n.y-c:a.y,d=e.map(h=>{const y=o.get(h.id);if(y===void 0)throw new Error(`paste id missing for ${h.id}`);return{...h,id:y,position:{x:h.position.x+l,y:h.position.y+u}}}),f=t.map(h=>{const y=i(h.id);return{...h,id:y,source:o.get(h.source)??h.source,target:o.get(h.target)??h.target}});return{newNodes:d,newConnectors:f,idMap:o}}function _Ve(e,t){if(e.match(/^[a-z]+:\/\//i))return e;if(e.match(/^\/\//))return window.location.protocol+e;if(e.match(/^[a-z]+:/i))return e;const n=document.implementation.createHTMLDocument(),r=n.createElement("base"),i=n.createElement("a");return n.head.appendChild(r),n.body.appendChild(i),t&&(r.href=t),i.href=e,i.href}const EVe=(()=>{let e=0;const t=()=>`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4);return()=>(e+=1,`u${t()}${e}`)})();function tl(e){const t=[];for(let n=0,r=e.length;n<r;n++)t.push(e[n]);return t}let y2=null;function yye(e={}){return y2||(e.includeStyleProperties?(y2=e.includeStyleProperties,y2):(y2=tl(window.getComputedStyle(document.documentElement)),y2))}function xD(e,t){const r=(e.ownerDocument.defaultView||window).getComputedStyle(e).getPropertyValue(t);return r?parseFloat(r.replace("px","")):0}function PVe(e){const t=xD(e,"border-left-width"),n=xD(e,"border-right-width");return e.clientWidth+t+n}function NVe(e){const t=xD(e,"border-top-width"),n=xD(e,"border-bottom-width");return e.clientHeight+t+n}function gye(e,t={}){const n=t.width||PVe(e),r=t.height||NVe(e);return{width:n,height:r}}function RVe(){let e,t;try{t=process}catch{}const n=t&&t.env?t.env.devicePixelRatio:null;return n&&(e=parseInt(n,10),Number.isNaN(e)&&(e=1)),e||window.devicePixelRatio||1}const Aa=16384;function jVe(e){(e.width>Aa||e.height>Aa)&&(e.width>Aa&&e.height>Aa?e.width>e.height?(e.height*=Aa/e.width,e.width=Aa):(e.width*=Aa/e.height,e.height=Aa):e.width>Aa?(e.height*=Aa/e.width,e.width=Aa):(e.width*=Aa/e.height,e.height=Aa))}function wD(e){return new Promise((t,n)=>{const r=new Image;r.onload=()=>{r.decode().then(()=>{requestAnimationFrame(()=>t(r))})},r.onerror=n,r.crossOrigin="anonymous",r.decoding="async",r.src=e})}async function TVe(e){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(e)).then(encodeURIComponent).then(t=>`data:image/svg+xml;charset=utf-8,${t}`)}async function DVe(e,t,n){const r="http://www.w3.org/2000/svg",i=document.createElementNS(r,"svg"),a=document.createElementNS(r,"foreignObject");return i.setAttribute("width",`${t}`),i.setAttribute("height",`${n}`),i.setAttribute("viewBox",`0 0 ${t} ${n}`),a.setAttribute("width","100%"),a.setAttribute("height","100%"),a.setAttribute("x","0"),a.setAttribute("y","0"),a.setAttribute("externalResourcesRequired","true"),i.appendChild(a),a.appendChild(e),TVe(i)}const ha=(e,t)=>{if(e instanceof t)return!0;const n=Object.getPrototypeOf(e);return n===null?!1:n.constructor.name===t.name||ha(n,t)};function qVe(e){const t=e.getPropertyValue("content");return`${e.cssText} content: '${t.replace(/'|"/g,"")}';`}function zVe(e,t){return yye(t).map(n=>{const r=e.getPropertyValue(n),i=e.getPropertyPriority(n);return`${n}: ${r}${i?" !important":""};`}).join(" ")}function OVe(e,t,n,r){const i=`.${e}:${t}`,a=n.cssText?qVe(n):zVe(n,r);return document.createTextNode(`${i}{${a}}`)}function Coe(e,t,n,r){const i=window.getComputedStyle(e,n),a=i.getPropertyValue("content");if(a===""||a==="none")return;const o=EVe();try{t.className=`${t.className} ${o}`}catch{return}const s=document.createElement("style");s.appendChild(OVe(o,n,i,r)),t.appendChild(s)}function FVe(e,t,n){Coe(e,t,":before",n),Coe(e,t,":after",n)}const Loe="application/font-woff",Ioe="image/jpeg",BVe={woff:Loe,woff2:Loe,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:Ioe,jpeg:Ioe,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function HVe(e){const t=/\.([^./]*?)$/g.exec(e);return t?t[1]:""}function GZ(e){const t=HVe(e).toLowerCase();return BVe[t]||""}function VVe(e){return e.split(/,/)[1]}function rG(e){return e.search(/^(data:)/)!==-1}function UVe(e,t){return`data:${t};base64,${e}`}async function mye(e,t,n){const r=await fetch(e,t);if(r.status===404)throw new Error(`Resource "${r.url}" not found`);const i=await r.blob();return new Promise((a,o)=>{const s=new FileReader;s.onerror=o,s.onloadend=()=>{try{a(n({res:r,result:s.result}))}catch(c){o(c)}},s.readAsDataURL(i)})}const NU={};function $Ve(e,t,n){let r=e.replace(/\?.*/,"");return n&&(r=e),/ttf|otf|eot|woff2?/i.test(r)&&(r=r.replace(/.*\//,"")),t?`[${t}]${r}`:r}async function KZ(e,t,n){const r=$Ve(e,t,n.includeQueryParams);if(NU[r]!=null)return NU[r];n.cacheBust&&(e+=(/\?/.test(e)?"&":"?")+new Date().getTime());let i;try{const a=await mye(e,n.fetchRequestInit,({res:o,result:s})=>(t||(t=o.headers.get("Content-Type")||""),VVe(s)));i=UVe(a,t)}catch(a){i=n.imagePlaceholder||"";let o=`Failed to fetch resource: ${e}`;a&&(o=typeof a=="string"?a:a.message),o&&console.warn(o)}return NU[r]=i,i}async function WVe(e){const t=e.toDataURL();return t==="data:,"?e.cloneNode(!1):wD(t)}async function GVe(e,t){if(e.currentSrc){const a=document.createElement("canvas"),o=a.getContext("2d");a.width=e.clientWidth,a.height=e.clientHeight,o==null||o.drawImage(e,0,0,a.width,a.height);const s=a.toDataURL();return wD(s)}const n=e.poster,r=GZ(n),i=await KZ(n,r,t);return wD(i)}async function KVe(e,t){var n;try{if(!((n=e==null?void 0:e.contentDocument)===null||n===void 0)&&n.body)return await Jq(e.contentDocument.body,t,!0)}catch{}return e.cloneNode(!1)}async function ZVe(e,t){return ha(e,HTMLCanvasElement)?WVe(e):ha(e,HTMLVideoElement)?GVe(e,t):ha(e,HTMLIFrameElement)?KVe(e,t):e.cloneNode(vye(e))}const XVe=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SLOT",vye=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SVG";async function YVe(e,t,n){var r,i;if(vye(t))return t;let a=[];return XVe(e)&&e.assignedNodes?a=tl(e.assignedNodes()):ha(e,HTMLIFrameElement)&&(!((r=e.contentDocument)===null||r===void 0)&&r.body)?a=tl(e.contentDocument.body.childNodes):a=tl(((i=e.shadowRoot)!==null&&i!==void 0?i:e).childNodes),a.length===0||ha(e,HTMLVideoElement)||await a.reduce((o,s)=>o.then(()=>Jq(s,n)).then(c=>{c&&t.appendChild(c)}),Promise.resolve()),t}function JVe(e,t,n){const r=t.style;if(!r)return;const i=window.getComputedStyle(e);i.cssText?(r.cssText=i.cssText,r.transformOrigin=i.transformOrigin):yye(n).forEach(a=>{let o=i.getPropertyValue(a);a==="font-size"&&o.endsWith("px")&&(o=`${Math.floor(parseFloat(o.substring(0,o.length-2)))-.1}px`),ha(e,HTMLIFrameElement)&&a==="display"&&o==="inline"&&(o="block"),a==="d"&&t.getAttribute("d")&&(o=`path(${t.getAttribute("d")})`),r.setProperty(a,o,i.getPropertyPriority(a))})}function QVe(e,t){ha(e,HTMLTextAreaElement)&&(t.innerHTML=e.value),ha(e,HTMLInputElement)&&t.setAttribute("value",e.value)}function eUe(e,t){if(ha(e,HTMLSelectElement)){const n=t,r=Array.from(n.children).find(i=>e.value===i.getAttribute("value"));r&&r.setAttribute("selected","")}}function tUe(e,t,n){return ha(t,Element)&&(JVe(e,t,n),FVe(e,t,n),QVe(e,t),eUe(e,t)),t}async function nUe(e,t){const n=e.querySelectorAll?e.querySelectorAll("use"):[];if(n.length===0)return e;const r={};for(let a=0;a<n.length;a++){const s=n[a].getAttribute("xlink:href");if(s){const c=e.querySelector(s),l=document.querySelector(s);!c&&l&&!r[s]&&(r[s]=await Jq(l,t,!0))}}const i=Object.values(r);if(i.length){const a="http://www.w3.org/1999/xhtml",o=document.createElementNS(a,"svg");o.setAttribute("xmlns",a),o.style.position="absolute",o.style.width="0",o.style.height="0",o.style.overflow="hidden",o.style.display="none";const s=document.createElementNS(a,"defs");o.appendChild(s);for(let c=0;c<i.length;c++)s.appendChild(i[c]);e.appendChild(o)}return e}async function Jq(e,t,n){return!n&&t.filter&&!t.filter(e)?null:Promise.resolve(e).then(r=>ZVe(r,t)).then(r=>YVe(e,r,t)).then(r=>tUe(e,r,t)).then(r=>nUe(r,t))}const kye=/url\((['"]?)([^'"]+?)\1\)/g,rUe=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,iUe=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function aUe(e){const t=e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${t})(['"]?\\))`,"g")}function oUe(e){const t=[];return e.replace(kye,(n,r,i)=>(t.push(i),n)),t.filter(n=>!rG(n))}async function sUe(e,t,n,r,i){try{const a=n?_Ve(t,n):t,o=GZ(t);let s;return i||(s=await KZ(a,o,r)),e.replace(aUe(t),`$1${s}$3`)}catch{}return e}function cUe(e,{preferredFontFormat:t}){return t?e.replace(iUe,n=>{for(;;){const[r,,i]=rUe.exec(n)||[];if(!i)return"";if(i===t)return`src: ${r};`}}):e}function xye(e){return e.search(kye)!==-1}async function wye(e,t,n){if(!xye(e))return e;const r=cUe(e,n);return oUe(r).reduce((a,o)=>a.then(s=>sUe(s,o,t,n)),Promise.resolve(r))}async function g2(e,t,n){var r;const i=(r=t.style)===null||r===void 0?void 0:r.getPropertyValue(e);if(i){const a=await wye(i,null,n);return t.style.setProperty(e,a,t.style.getPropertyPriority(e)),!0}return!1}async function lUe(e,t){await g2("background",e,t)||await g2("background-image",e,t),await g2("mask",e,t)||await g2("-webkit-mask",e,t)||await g2("mask-image",e,t)||await g2("-webkit-mask-image",e,t)}async function uUe(e,t){const n=ha(e,HTMLImageElement);if(!(n&&!rG(e.src))&&!(ha(e,SVGImageElement)&&!rG(e.href.baseVal)))return;const r=n?e.src:e.href.baseVal,i=await KZ(r,GZ(r),t);await new Promise((a,o)=>{e.onload=a,e.onerror=t.onImageErrorHandler?(...c)=>{try{a(t.onImageErrorHandler(...c))}catch(l){o(l)}}:o;const s=e;s.decode&&(s.decode=a),s.loading==="lazy"&&(s.loading="eager"),n?(e.srcset="",e.src=i):e.href.baseVal=i})}async function dUe(e,t){const r=tl(e.childNodes).map(i=>bye(i,t));await Promise.all(r).then(()=>e)}async function bye(e,t){ha(e,Element)&&(await lUe(e,t),await uUe(e,t),await dUe(e,t))}function hUe(e,t){const{style:n}=e;t.backgroundColor&&(n.backgroundColor=t.backgroundColor),t.width&&(n.width=`${t.width}px`),t.height&&(n.height=`${t.height}px`);const r=t.style;return r!=null&&Object.keys(r).forEach(i=>{n[i]=r[i]}),e}const Aoe={};async function _oe(e){let t=Aoe[e];if(t!=null)return t;const r=await(await fetch(e)).text();return t={url:e,cssText:r},Aoe[e]=t,t}async function Eoe(e,t){let n=e.cssText;const r=/url\(["']?([^"')]+)["']?\)/g,a=(n.match(/url\([^)]+\)/g)||[]).map(async o=>{let s=o.replace(r,"$1");return s.startsWith("https://")||(s=new URL(s,e.url).href),mye(s,t.fetchRequestInit,({result:c})=>(n=n.replace(o,`url(${c})`),[o,c]))});return Promise.all(a).then(()=>n)}function Poe(e){if(e==null)return[];const t=[],n=/(\/\*[\s\S]*?\*\/)/gi;let r=e.replace(n,"");const i=new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})","gi");for(;;){const c=i.exec(r);if(c===null)break;t.push(c[0])}r=r.replace(i,"");const a=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,o="((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})",s=new RegExp(o,"gi");for(;;){let c=a.exec(r);if(c===null){if(c=s.exec(r),c===null)break;a.lastIndex=s.lastIndex}else s.lastIndex=a.lastIndex;t.push(c[0])}return t}async function fUe(e,t){const n=[],r=[];return e.forEach(i=>{if("cssRules"in i)try{tl(i.cssRules||[]).forEach((a,o)=>{if(a.type===CSSRule.IMPORT_RULE){let s=o+1;const c=a.href,l=_oe(c).then(u=>Eoe(u,t)).then(u=>Poe(u).forEach(d=>{try{i.insertRule(d,d.startsWith("@import")?s+=1:i.cssRules.length)}catch(f){console.error("Error inserting rule from remote css",{rule:d,error:f})}})).catch(u=>{console.error("Error loading remote css",u.toString())});r.push(l)}})}catch(a){const o=e.find(s=>s.href==null)||document.styleSheets[0];i.href!=null&&r.push(_oe(i.href).then(s=>Eoe(s,t)).then(s=>Poe(s).forEach(c=>{o.insertRule(c,o.cssRules.length)})).catch(s=>{console.error("Error loading remote stylesheet",s)})),console.error("Error inlining remote css file",a)}}),Promise.all(r).then(()=>(e.forEach(i=>{if("cssRules"in i)try{tl(i.cssRules||[]).forEach(a=>{n.push(a)})}catch(a){console.error(`Error while reading CSS rules from ${i.href}`,a)}}),n))}function pUe(e){return e.filter(t=>t.type===CSSRule.FONT_FACE_RULE).filter(t=>xye(t.style.getPropertyValue("src")))}async function yUe(e,t){if(e.ownerDocument==null)throw new Error("Provided element is not within a Document");const n=tl(e.ownerDocument.styleSheets),r=await fUe(n,t);return pUe(r)}function Mye(e){return e.trim().replace(/["']/g,"")}function gUe(e){const t=new Set;function n(r){(r.style.fontFamily||getComputedStyle(r).fontFamily).split(",").forEach(a=>{t.add(Mye(a))}),Array.from(r.children).forEach(a=>{a instanceof HTMLElement&&n(a)})}return n(e),t}async function mUe(e,t){const n=await yUe(e,t),r=gUe(e);return(await Promise.all(n.filter(a=>r.has(Mye(a.style.fontFamily))).map(a=>{const o=a.parentStyleSheet?a.parentStyleSheet.href:null;return wye(a.cssText,o,t)}))).join(`
7835
+ `))}function c(h,y,v,k){const g=v.enter("tableCell"),S=v.enter("phrasing"),w=v.containerPhrasing(h,{...k,before:a,after:a});return S(),g(),w}function l(h,y){return jje(h,{align:y,alignDelimiters:r,padding:n,stringLength:i})}function u(h,y,v){const k=h.children;let g=-1;const S=[],w=y.enter("table");for(;++g<k.length;)S[g]=d(k[g],y,v);return w(),S}function d(h,y,v){const k=h.children;let g=-1;const S=[],w=y.enter("tableRow");for(;++g<k.length;)S[g]=c(k[g],h,y,v);return w(),S}function f(h,y,v){let k=b0e.inlineCode(h,y,v);return v.stack.includes("tableCell")&&(k=k.replace(/\|/g,"\\$&")),k}}function wTe(){return{exit:{taskListCheckValueChecked:ote,taskListCheckValueUnchecked:ote,paragraph:MTe}}}function bTe(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:STe}}}function ote(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function MTe(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let a=-1,o;for(;++a<i.length;){const s=i[a];if(s.type==="paragraph"){o=s;break}}o===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function STe(e,t,n,r){const i=e.children[0],a=typeof e.checked=="boolean"&&i&&i.type==="paragraph",o="["+(e.checked?"x":" ")+"] ",s=n.createTracker(r);a&&s.move(o);let c=b0e.listItem(e,t,n,{...r,...s.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(u){return u+o}}function CTe(){return[rje(),Sje(),Aje(),pTe(),wTe()]}function LTe(e){return{extensions:[ije(),Cje(e),_je(),xTe(e),bTe()]}}const ITe={tokenize:RTe,partial:!0},M0e={tokenize:jTe,partial:!0},S0e={tokenize:TTe,partial:!0},C0e={tokenize:DTe,partial:!0},ATe={tokenize:qTe,partial:!0},L0e={name:"wwwAutolink",tokenize:PTe,previous:A0e},I0e={name:"protocolAutolink",tokenize:NTe,previous:_0e},cc={name:"emailAutolink",tokenize:ETe,previous:E0e},Ms={};function _Te(){return{text:Ms}}let Rl=48;for(;Rl<123;)Ms[Rl]=cc,Rl++,Rl===58?Rl=65:Rl===91&&(Rl=97);Ms[43]=cc;Ms[45]=cc;Ms[46]=cc;Ms[95]=cc;Ms[72]=[cc,I0e];Ms[104]=[cc,I0e];Ms[87]=[cc,L0e];Ms[119]=[cc,L0e];function ETe(e,t,n){const r=this;let i,a;return o;function o(d){return!GW(d)||!E0e.call(r,r.previous)||MZ(r.events)?n(d):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(d))}function s(d){return GW(d)?(e.consume(d),s):d===64?(e.consume(d),c):n(d)}function c(d){return d===46?e.check(ATe,u,l)(d):d===45||d===95||Ni(d)?(a=!0,e.consume(d),c):u(d)}function l(d){return e.consume(d),i=!0,c}function u(d){return a&&i&&Wi(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(d)):n(d)}}function PTe(e,t,n){const r=this;return i;function i(o){return o!==87&&o!==119||!A0e.call(r,r.previous)||MZ(r.events)?n(o):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(ITe,e.attempt(M0e,e.attempt(S0e,a),n),n)(o))}function a(o){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(o)}}function NTe(e,t,n){const r=this;let i="",a=!1;return o;function o(d){return(d===72||d===104)&&_0e.call(r,r.previous)&&!MZ(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(d),e.consume(d),s):n(d)}function s(d){if(Wi(d)&&i.length<5)return i+=String.fromCodePoint(d),e.consume(d),s;if(d===58){const f=i.toLowerCase();if(f==="http"||f==="https")return e.consume(d),c}return n(d)}function c(d){return d===47?(e.consume(d),a?l:(a=!0,c)):n(d)}function l(d){return d===null||dD(d)||Pn(d)||jh(d)||Lq(d)?n(d):e.attempt(M0e,e.attempt(S0e,u),n)(d)}function u(d){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(d)}}function RTe(e,t,n){let r=0;return i;function i(o){return(o===87||o===119)&&r<3?(r++,e.consume(o),i):o===46&&r===3?(e.consume(o),a):n(o)}function a(o){return o===null?n(o):t(o)}}function jTe(e,t,n){let r,i,a;return o;function o(l){return l===46||l===95?e.check(C0e,c,s)(l):l===null||Pn(l)||jh(l)||l!==45&&Lq(l)?c(l):(a=!0,e.consume(l),o)}function s(l){return l===95?r=!0:(i=r,r=void 0),e.consume(l),o}function c(l){return i||r||!a?n(l):t(l)}}function TTe(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(C0e,t,a)(o):o===null||Pn(o)||jh(o)?t(o):(e.consume(o),i)}function a(o){return o===41&&r++,e.consume(o),i}}function DTe(e,t,n){return r;function r(s){return s===33||s===34||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===63||s===95||s===126?(e.consume(s),r):s===38?(e.consume(s),a):s===93?(e.consume(s),i):s===60||s===null||Pn(s)||jh(s)?t(s):n(s)}function i(s){return s===null||s===40||s===91||Pn(s)||jh(s)?t(s):r(s)}function a(s){return Wi(s)?o(s):n(s)}function o(s){return s===59?(e.consume(s),r):Wi(s)?(e.consume(s),o):n(s)}}function qTe(e,t,n){return r;function r(a){return e.consume(a),i}function i(a){return Ni(a)?n(a):t(a)}}function A0e(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Pn(e)}function _0e(e){return!Wi(e)}function E0e(e){return!(e===47||GW(e))}function GW(e){return e===43||e===45||e===46||e===95||Ni(e)}function MZ(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const zTe={tokenize:WTe,partial:!0};function OTe(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:VTe,continuation:{tokenize:UTe},exit:$Te}},text:{91:{name:"gfmFootnoteCall",tokenize:HTe},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:FTe,resolveTo:BTe}}}}function FTe(e,t,n){const r=this;let i=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o;for(;i--;){const c=r.events[i][1];if(c.type==="labelImage"){o=c;break}if(c.type==="gfmFootnoteCall"||c.type==="labelLink"||c.type==="label"||c.type==="image"||c.type==="link")break}return s;function s(c){if(!o||!o._balanced)return n(c);const l=To(r.sliceSerialize({start:o.end,end:r.now()}));return l.codePointAt(0)!==94||!a.includes(l.slice(1))?n(c):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),t(c))}}function BTe(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",a,t],["enter",o,t],["exit",o,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...s),e}function HTe(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,o;return s;function s(d){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),c}function c(d){return d!==94?n(d):(e.enter("gfmFootnoteCallMarker"),e.consume(d),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",l)}function l(d){if(a>999||d===93&&!o||d===null||d===91||Pn(d))return n(d);if(d===93){e.exit("chunkString");const f=e.exit("gfmFootnoteCallString");return i.includes(To(r.sliceSerialize(f)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(d)}return Pn(d)||(o=!0),a++,e.consume(d),d===92?u:l}function u(d){return d===91||d===92||d===93?(e.consume(d),a++,l):l(d)}}function VTe(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,o=0,s;return c;function c(y){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(y),e.exit("gfmFootnoteDefinitionLabelMarker"),l}function l(y){return y===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(y),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",u):n(y)}function u(y){if(o>999||y===93&&!s||y===null||y===91||Pn(y))return n(y);if(y===93){e.exit("chunkString");const v=e.exit("gfmFootnoteDefinitionLabelString");return a=To(r.sliceSerialize(v)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(y),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),f}return Pn(y)||(s=!0),o++,e.consume(y),y===92?d:u}function d(y){return y===91||y===92||y===93?(e.consume(y),o++,u):u(y)}function f(y){return y===58?(e.enter("definitionMarker"),e.consume(y),e.exit("definitionMarker"),i.includes(a)||i.push(a),ln(e,h,"gfmFootnoteDefinitionWhitespace")):n(y)}function h(y){return t(y)}}function UTe(e,t,n){return e.check(ag,t,e.attempt(zTe,t,n))}function $Te(e){e.exit("gfmFootnoteDefinition")}function WTe(e,t,n){const r=this;return ln(e,i,"gfmFootnoteDefinitionIndent",5);function i(a){const o=r.events[r.events.length-1];return o&&o[1].type==="gfmFootnoteDefinitionIndent"&&o[2].sliceSerialize(o[1],!0).length===4?t(a):n(a)}}function GTe(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(o,s){let c=-1;for(;++c<o.length;)if(o[c][0]==="enter"&&o[c][1].type==="strikethroughSequenceTemporary"&&o[c][1]._close){let l=c;for(;l--;)if(o[l][0]==="exit"&&o[l][1].type==="strikethroughSequenceTemporary"&&o[l][1]._open&&o[c][1].end.offset-o[c][1].start.offset===o[l][1].end.offset-o[l][1].start.offset){o[c][1].type="strikethroughSequence",o[l][1].type="strikethroughSequence";const u={type:"strikethrough",start:Object.assign({},o[l][1].start),end:Object.assign({},o[c][1].end)},d={type:"strikethroughText",start:Object.assign({},o[l][1].end),end:Object.assign({},o[c][1].start)},f=[["enter",u,s],["enter",o[l][1],s],["exit",o[l][1],s],["enter",d,s]],h=s.parser.constructs.insideSpan.null;h&&Fa(f,f.length,0,Iq(h,o.slice(l+1,c),s)),Fa(f,f.length,0,[["exit",d,s],["enter",o[c][1],s],["exit",o[c][1],s],["exit",u,s]]),Fa(o,l-1,c-l+3,f),c=l+f.length-2;break}}for(c=-1;++c<o.length;)o[c][1].type==="strikethroughSequenceTemporary"&&(o[c][1].type="data");return o}function a(o,s,c){const l=this.previous,u=this.events;let d=0;return f;function f(y){return l===126&&u[u.length-1][1].type!=="characterEscape"?c(y):(o.enter("strikethroughSequenceTemporary"),h(y))}function h(y){const v=Nf(l);if(y===126)return d>1?c(y):(o.consume(y),d++,h);if(d<2&&!n)return c(y);const k=o.exit("strikethroughSequenceTemporary"),g=Nf(y);return k._open=!g||g===2&&!!v,k._close=!v||v===2&&!!g,s(y)}}}class KTe{constructor(){this.map=[]}add(t,n,r){ZTe(this,t,n,r)}consume(t){if(this.map.sort(function(a,o){return a[0]-o[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const a of i)t.push(a);i=r.pop()}this.map.length=0}}function ZTe(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function XTe(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=r.length-1;r[a]=r[a]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function YTe(){return{flow:{null:{name:"table",tokenize:JTe,resolveAll:QTe}}}}function JTe(e,t,n){const r=this;let i=0,a=0,o;return s;function s(D){let I=r.events.length-1;for(;I>-1;){const q=r.events[I][1].type;if(q==="lineEnding"||q==="linePrefix")I--;else break}const R=I>-1?r.events[I][1].type:null,U=R==="tableHead"||R==="tableRow"?A:c;return U===A&&r.parser.lazy[r.now().line]?n(D):U(D)}function c(D){return e.enter("tableHead"),e.enter("tableRow"),l(D)}function l(D){return D===124||(o=!0,a+=1),u(D)}function u(D){return D===null?n(D):Rt(D)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(D),e.exit("lineEnding"),h):n(D):Qt(D)?ln(e,u,"whitespace")(D):(a+=1,o&&(o=!1,i+=1),D===124?(e.enter("tableCellDivider"),e.consume(D),e.exit("tableCellDivider"),o=!0,u):(e.enter("data"),d(D)))}function d(D){return D===null||D===124||Pn(D)?(e.exit("data"),u(D)):(e.consume(D),D===92?f:d)}function f(D){return D===92||D===124?(e.consume(D),d):d(D)}function h(D){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(D):(e.enter("tableDelimiterRow"),o=!1,Qt(D)?ln(e,y,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(D):y(D))}function y(D){return D===45||D===58?k(D):D===124?(o=!0,e.enter("tableCellDivider"),e.consume(D),e.exit("tableCellDivider"),v):_(D)}function v(D){return Qt(D)?ln(e,k,"whitespace")(D):k(D)}function k(D){return D===58?(a+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(D),e.exit("tableDelimiterMarker"),g):D===45?(a+=1,g(D)):D===null||Rt(D)?C(D):_(D)}function g(D){return D===45?(e.enter("tableDelimiterFiller"),S(D)):_(D)}function S(D){return D===45?(e.consume(D),S):D===58?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(D),e.exit("tableDelimiterMarker"),w):(e.exit("tableDelimiterFiller"),w(D))}function w(D){return Qt(D)?ln(e,C,"whitespace")(D):C(D)}function C(D){return D===124?y(D):D===null||Rt(D)?!o||i!==a?_(D):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(D)):_(D)}function _(D){return n(D)}function A(D){return e.enter("tableRow"),j(D)}function j(D){return D===124?(e.enter("tableCellDivider"),e.consume(D),e.exit("tableCellDivider"),j):D===null||Rt(D)?(e.exit("tableRow"),t(D)):Qt(D)?ln(e,j,"whitespace")(D):(e.enter("data"),O(D))}function O(D){return D===null||D===124||Pn(D)?(e.exit("data"),j(D)):(e.consume(D),D===92?T:O)}function T(D){return D===92||D===124?(e.consume(D),O):O(D)}}function QTe(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d;const f=new KTe;for(;++n<e.length;){const h=e[n],y=h[1];h[0]==="enter"?y.type==="tableHead"?(s=!1,c!==0&&(ste(f,t,c,l,u),u=void 0,c=0),l={type:"table",start:Object.assign({},y.start),end:Object.assign({},y.end)},f.add(n,0,[["enter",l,t]])):y.type==="tableRow"||y.type==="tableDelimiterRow"?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:"tableBody",start:Object.assign({},y.start),end:Object.assign({},y.end)},f.add(n,0,[["enter",u,t]])),i=y.type==="tableDelimiterRow"?2:u?3:1):i&&(y.type==="data"||y.type==="tableDelimiterMarker"||y.type==="tableDelimiterFiller")?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=wm(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):y.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=wm(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):y.type==="tableHead"?(s=!0,c=n):y.type==="tableRow"||y.type==="tableDelimiterRow"?(c=n,a[1]!==0?(o[0]=o[1],d=wm(f,t,a,i,n,d)):o[1]!==0&&(d=wm(f,t,o,i,n,d)),i=0):i&&(y.type==="data"||y.type==="tableDelimiterMarker"||y.type==="tableDelimiterFiller")&&(o[3]=n)}for(c!==0&&ste(f,t,c,l,u),f.consume(t.events),n=-1;++n<t.events.length;){const h=t.events[n];h[0]==="enter"&&h[1].type==="table"&&(h[1]._align=XTe(t.events,n))}return e}function wm(e,t,n,r,i,a){const o=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",s="tableContent";n[0]!==0&&(a.end=Object.assign({},M2(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const c=M2(t.events,n[1]);if(a={type:o,start:Object.assign({},c),end:Object.assign({},c)},e.add(n[1],0,[["enter",a,t]]),n[2]!==0){const l=M2(t.events,n[2]),u=M2(t.events,n[3]),d={type:s,start:Object.assign({},l),end:Object.assign({},u)};if(e.add(n[2],0,[["enter",d,t]]),r!==2){const f=t.events[n[2]],h=t.events[n[3]];if(f[1].end=Object.assign({},h[1].end),f[1].type="chunkText",f[1].contentType="text",n[3]>n[2]+1){const y=n[2]+1,v=n[3]-n[2]-1;e.add(y,v,[])}}e.add(n[3]+1,0,[["exit",d,t]])}return i!==void 0&&(a.end=Object.assign({},M2(t.events,i)),e.add(i,0,[["exit",a,t]]),a=void 0),a}function ste(e,t,n,r,i){const a=[],o=M2(t.events,n);i&&(i.end=Object.assign({},o),a.push(["exit",i,t])),r.end=Object.assign({},o),a.push(["exit",r,t]),e.add(n+1,0,a)}function M2(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const eDe={name:"tasklistCheck",tokenize:nDe};function tDe(){return{text:{91:eDe}}}function nDe(e,t,n){const r=this;return i;function i(c){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(c):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),a)}function a(c){return Pn(c)?(e.enter("taskListCheckValueUnchecked"),e.consume(c),e.exit("taskListCheckValueUnchecked"),o):c===88||c===120?(e.enter("taskListCheckValueChecked"),e.consume(c),e.exit("taskListCheckValueChecked"),o):n(c)}function o(c){return c===93?(e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):n(c)}function s(c){return Rt(c)?t(c):Qt(c)?e.check({tokenize:rDe},t,n)(c):n(c)}}function rDe(e,t,n){return ln(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function iDe(e){return Ffe([_Te(),OTe(),GTe(e),YTe(),tDe()])}const aDe={};function oDe(e){const t=this,n=e||aDe,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),o=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(iDe(n)),a.push(CTe()),o.push(LTe(n))}function sDe({demoId:e,node:t,connector:n,onNameChange:r,onDescriptionChange:i,onDetailChange:a,statusReport:o,onClose:s}){const c=(t==null?void 0:t.type)==="shapeNode"&&t.data.shape==="text",l=(t==null?void 0:t.type)==="shapeNode"?t.data.shape:void 0,u=l==="ellipse"||l==="sticky",d=c?null:t,f=d!==null||n!==null,h=d&&"name"in d.data?d.data.name??"":"",y=(d==null?void 0:d.data.description)??"",v=(d==null?void 0:d.data.detail)??"",k=d!==null&&!u,[g,S]=M.useState(()=>h_e()),w=_=>{_.preventDefault(),p_e(g,_.clientX,{onWidth:S,onCommit:f_e})},C={"--detail-panel-w":`${g}px`};return x.jsx(l_e,{open:f,modal:!1,onOpenChange:_=>{_||s()},children:x.jsxs(Sfe,{side:"right",className:"overflow-y-auto bg-card/94 backdrop-blur-[14px] border-border sm:!w-[var(--detail-panel-w)] sm:!max-w-[var(--detail-panel-w)]",style:C,"data-testid":"detail-panel",onEscapeKeyDown:_=>{var j;const A=document.activeElement;(j=A==null?void 0:A.getAttribute("data-testid"))!=null&&j.endsWith("-editor")&&_.preventDefault()},onInteractOutside:_=>{var O;const A=document.activeElement;(O=A==null?void 0:A.getAttribute("data-testid"))!=null&&O.endsWith("-editor")&&A.blur();const j=_.target;j!=null&&j.closest(".react-flow__resize-control")&&_.preventDefault(),j!=null&&j.closest("[data-radix-popper-content-wrapper]")&&_.preventDefault(),j!=null&&j.closest('[data-testid="canvas-style-strip"]')&&_.preventDefault(),j!=null&&j.closest(".react-flow__node")&&_.preventDefault(),j!=null&&j.closest(".react-flow__edge")&&_.preventDefault()},children:[x.jsx("div",{"aria-label":"Resize detail panel",onPointerDown:w,"data-testid":"detail-panel-resize-handle",className:"absolute inset-y-0 left-0 z-10 hidden w-1.5 cursor-col-resize bg-transparent transition-colors hover:bg-border sm:block"}),d?x.jsxs("div",{className:"flex flex-col gap-3",children:[x.jsxs("div",{className:"flex flex-col gap-1",children:[k?x.jsx(cT,{"data-testid":"detail-panel-title",children:x.jsx(DO,{nodeId:d.id,value:h,placeholder:"Name",multiline:!1,ariaLabel:"Name",testIdBase:"detail-panel-name",onSave:r,textClassName:"text-base font-semibold"})}):x.jsx(cT,{"data-testid":"detail-panel-title",className:"sr-only",children:d.id}),x.jsxs(NW,{className:"sr-only",children:[d.id," · ",d.type]})]}),x.jsxs("div",{className:"mt-0 flex flex-col gap-3",children:[o?x.jsx(dDe,{report:o}):null,x.jsx(DO,{nodeId:d.id,value:y,placeholder:"Short description shown on the node body",multiline:!0,ariaLabel:"Description",testIdBase:"detail-panel-description",onSave:i,textClassName:"font-medium text-muted-foreground"}),x.jsx(DO,{nodeId:d.id,value:v,placeholder:"Long-form notes, context, anything…",multiline:!0,ariaLabel:"Detail",testIdBase:"detail-panel-detail",onSave:a,markdown:!0}),d.type==="htmlNode"&&e?x.jsx(cDe,{projectId:e,htmlPath:d.data.htmlPath}):null]})]}):n?x.jsxs("div",{className:"flex flex-col gap-3",children:[x.jsxs("div",{className:"flex flex-col gap-1",children:[x.jsx(cT,{"data-testid":"detail-panel-title",children:n.label??"Connector"}),x.jsxs(NW,{className:"sr-only",children:[n.id," · ",n.kind]})]}),x.jsx("div",{className:"mt-0 flex flex-col gap-3",children:x.jsx(hDe,{connector:n})})]}):null]})})}function DO({nodeId:e,value:t,placeholder:n,multiline:r,ariaLabel:i,testIdBase:a,onSave:o,textClassName:s,markdown:c=!1}){const[l,u]=M.useState(!1),d=M.useRef(null),f=M.useRef(!1);M.useEffect(()=>{if(!l)return;const _=d.current;if(!_)return;_.textContent=t,_.focus();const A=window.getSelection();if(A){const j=document.createRange();j.selectNodeContents(_),j.collapse(!1),A.removeAllRanges(),A.addRange(j)}},[l,t]);const h=t==="";if(!o)return x.jsx("div",{"data-testid":a,"aria-label":i,className:Ze("w-full rounded-md px-2 py-1.5 text-sm",h?"italic text-muted-foreground/50":"text-foreground",!c&&"whitespace-pre-wrap break-words",s),children:h?n:c?x.jsx(cte,{value:t}):t});const y=()=>{var A;const _=((A=d.current)==null?void 0:A.textContent)??t;o(e,_),u(!1)},v=()=>{u(!1)},k=_=>{if(_.stopPropagation(),_.nativeEvent.stopPropagation(),_.key==="Escape"){_.preventDefault(),f.current=!0,v();return}if(_.key==="Enter"){if(_.preventDefault(),_.shiftKey||!r){y();return}document.execCommand("insertText",!1,`
7836
+ `)}},g=_=>{_.preventDefault();const A=_.clipboardData.getData("text/plain");document.execCommand("insertText",!1,A)},S=_=>{},w=()=>{if(f.current){f.current=!1;return}y()},C=()=>{l||u(!0)};return x.jsx("div",{className:"relative","data-testid":a,"data-editing":l?"true":"false",children:l?x.jsx("div",{ref:d,contentEditable:"plaintext-only",suppressContentEditableWarning:!0,spellCheck:!1,tabIndex:0,onKeyDown:k,onPaste:g,onInput:S,onBlur:w,"data-testid":`${a}-editor`,className:Ze("block w-full whitespace-pre-wrap break-words rounded-md px-2 py-1.5 text-sm outline-none",s),role:"textbox","aria-multiline":r?"true":"false","aria-label":i}):x.jsx("button",{type:"button",onClick:C,"aria-label":`Edit ${i.toLowerCase()}`,className:Ze("block w-full cursor-text rounded-md px-2 py-1.5 text-left text-sm transition-colors hover:bg-muted/50",h?"italic text-muted-foreground/50":"text-foreground",!c&&"whitespace-pre-wrap break-words",s),children:h?n:c?x.jsx(cte,{value:t}):t})})}function cDe({projectId:e,htmlPath:t}){const[n,r]=M.useState({kind:"idle"}),i=async(o,s)=>{try{await navigator.clipboard.writeText(o),r({kind:"copied",message:s}),setTimeout(()=>r({kind:"idle"}),1200)}catch(c){r({kind:"error",message:c instanceof Error?c.message:"Clipboard write failed"})}},a=async o=>{r({kind:"pending"});try{const s=o==="open"?await K4e(e,t):await Z4e(e,t);if(s.ok){r({kind:"idle"});return}const c=o==="open"?"Copied path — paste into your editor":"Copied path to clipboard";await i(s.absPath,c)}catch(s){r({kind:"error",message:s instanceof Error?s.message:String(s)})}};return x.jsxs("div",{className:"flex flex-col gap-2 rounded-md border bg-card px-3 py-2 text-xs","data-testid":"detail-panel-html-node",children:[x.jsxs("div",{className:"flex flex-col gap-1",children:[x.jsx("span",{className:"font-mono text-[11px] text-muted-foreground uppercase tracking-widest",children:"Path"}),x.jsx("code",{"data-testid":"detail-panel-html-path",className:"block break-all rounded bg-muted/40 px-2 py-1 font-mono text-[11px]",children:t})]}),x.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[x.jsxs(oi,{type:"button",size:"sm",variant:"outline",className:"h-7 gap-1.5 px-2",onClick:()=>{a("open")},disabled:n.kind==="pending","data-testid":"detail-panel-html-open","aria-label":"Open in editor",children:[x.jsx(xp,{className:"h-3.5 w-3.5"}),"Open in editor"]}),x.jsxs(oi,{type:"button",size:"sm",variant:"outline",className:"h-7 gap-1.5 px-2",onClick:()=>{a("reveal")},disabled:n.kind==="pending","data-testid":"detail-panel-html-reveal","aria-label":"Reveal in Finder/Explorer",children:[x.jsx(fp,{className:"h-3.5 w-3.5"}),"Reveal"]})]}),n.kind==="copied"||n.kind==="error"?x.jsx("div",{"data-testid":"detail-panel-html-status","data-status":n.kind,className:Ze("text-[11px]",n.kind==="copied"?"text-muted-foreground":"text-destructive"),children:n.message??""}):null]})}function lDe(e,t){const n=Math.max(0,t-e);if(n<1e3)return"just now";const r=Math.floor(n/1e3);if(r<60)return`${r}s ago`;const i=Math.floor(r/60);if(i<60)return`${i}m ago`;const a=Math.floor(i/60);return a<24?`${a}h ago`:`${Math.floor(a/24)}d ago`}function uDe(e){if(e===null)return"null";if(e===void 0)return"undefined";if(typeof e=="string")return e;try{return JSON.stringify(e)}catch{return String(e)}}function dDe({report:e,now:t=Date.now()}){const n=e.data?Object.entries(e.data):[];return x.jsxs("section",{className:"flex flex-col gap-2 rounded-md border bg-card px-3 py-2 text-xs","data-testid":"detail-panel-status","data-state":e.state,children:[x.jsxs("div",{className:"flex items-center justify-between gap-2",children:[x.jsx(Khe,{state:e.state,summary:e.summary,"data-testid":"detail-panel-status-badge"}),x.jsx("span",{className:"shrink-0 text-[10px] text-muted-foreground","data-testid":"detail-panel-status-relative-time",children:`Last updated: ${lDe(e.ts,t)}`})]}),e.detail?x.jsx("div",{"data-testid":"detail-panel-status-detail",className:"whitespace-pre-wrap break-words rounded bg-muted/40 px-2 py-1 text-[11px] text-foreground",children:e.detail}):null,n.length>0?x.jsx("dl",{"data-testid":"detail-panel-status-data",className:"grid grid-cols-[auto_1fr] gap-x-3 gap-y-1 text-[11px]",children:n.map(([r,i])=>x.jsxs("div",{className:"contents","data-testid":"detail-panel-status-data-row",children:[x.jsx("dt",{className:"truncate font-medium text-muted-foreground",children:r}),x.jsx("dd",{className:"break-all font-mono text-foreground",children:uDe(i)})]},r))}):null]})}function cte({value:e}){return x.jsx(GRe,{remarkPlugins:[oDe],components:{h1:({children:t})=>x.jsx("h1",{className:"mb-1 text-base font-bold leading-snug",children:t}),h2:({children:t})=>x.jsx("h2",{className:"mb-1 text-sm font-semibold leading-snug",children:t}),h3:({children:t})=>x.jsx("h3",{className:"mb-0.5 text-sm font-medium leading-snug",children:t}),p:({children:t})=>x.jsx("p",{className:"mb-2 last:mb-0 leading-relaxed",children:t}),ul:({children:t})=>x.jsx("ul",{className:"mb-2 list-disc pl-4 last:mb-0",children:t}),ol:({children:t})=>x.jsx("ol",{className:"mb-2 list-decimal pl-4 last:mb-0",children:t}),li:({children:t})=>x.jsx("li",{className:"mb-0.5",children:t}),code:({children:t,className:n})=>(n==null?void 0:n.includes("language-"))?x.jsx("code",{className:"block overflow-x-auto rounded bg-muted/60 px-2 py-1 font-mono text-xs",children:t}):x.jsx("code",{className:"rounded bg-muted/60 px-1 py-0.5 font-mono text-xs",children:t}),pre:({children:t})=>x.jsx("pre",{className:"mb-2 last:mb-0",children:t}),blockquote:({children:t})=>x.jsx("blockquote",{className:"mb-2 border-l-2 border-muted-foreground/30 pl-3 italic text-muted-foreground last:mb-0",children:t}),a:({href:t,children:n})=>x.jsx("a",{href:t,target:"_blank",rel:"noreferrer",className:"text-primary underline underline-offset-2",children:n}),strong:({children:t})=>x.jsx("strong",{className:"font-semibold",children:t}),em:({children:t})=>x.jsx("em",{className:"italic",children:t}),hr:()=>x.jsx("hr",{className:"my-2 border-border"}),table:({children:t})=>x.jsx("div",{className:"mb-2 overflow-x-auto last:mb-0",children:x.jsx("table",{className:"w-full border-collapse text-xs",children:t})}),th:({children:t})=>x.jsx("th",{className:"border border-border bg-muted/40 px-2 py-1 text-left font-medium",children:t}),td:({children:t})=>x.jsx("td",{className:"border border-border px-2 py-1",children:t})},children:e})}function hDe({connector:e}){return x.jsx("div",{className:"rounded-md border bg-card px-3 py-2 text-xs",children:x.jsxs("dl",{className:"divide-y",children:[x.jsx(Jo,{label:"Source",value:e.source}),x.jsx(Jo,{label:"Target",value:e.target}),x.jsx(Jo,{label:"Kind",value:e.kind}),e.label?x.jsx(Jo,{label:"Label",value:e.label}):null,e.style?x.jsx(Jo,{label:"Style",value:e.style}):null,e.color?x.jsx(Jo,{label:"Color",value:e.color}):null,e.direction?x.jsx(Jo,{label:"Direction",value:e.direction}):null,e.kind==="http"&&e.url?x.jsx(Jo,{label:"URL",value:`${e.method??"GET"} ${e.url}`}):null,e.kind==="event"?x.jsx(Jo,{label:"Event",value:e.eventName}):null,e.kind==="queue"?x.jsx(Jo,{label:"Queue",value:e.queueName}):null]})})}function Jo({label:e,value:t}){return x.jsxs("div",{className:"flex items-start gap-3 py-2 first:pt-0 last:pb-0",children:[x.jsx("dt",{className:"w-20 shrink-0 font-medium text-muted-foreground",children:e}),x.jsx("dd",{className:"flex-1 break-all font-mono",children:t})]})}var ji=Uint8Array,qa=Uint16Array,SZ=Int32Array,CZ=new ji([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),LZ=new ji([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),lte=new ji([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),P0e=function(e,t){for(var n=new qa(31),r=0;r<31;++r)n[r]=t+=1<<e[r-1];for(var i=new SZ(n[30]),r=1;r<30;++r)for(var a=n[r];a<n[r+1];++a)i[a]=a-n[r]<<5|r;return{b:n,r:i}},N0e=P0e(CZ,2),fDe=N0e.b,KW=N0e.r;fDe[28]=258,KW[258]=28;var pDe=P0e(LZ,0),ute=pDe.r,ZW=new qa(32768);for(var Kn=0;Kn<32768;++Kn){var _c=(Kn&43690)>>1|(Kn&21845)<<1;_c=(_c&52428)>>2|(_c&13107)<<2,_c=(_c&61680)>>4|(_c&3855)<<4,ZW[Kn]=((_c&65280)>>8|(_c&255)<<8)>>1}var Hp=function(e,t,n){for(var r=e.length,i=0,a=new qa(t);i<r;++i)e[i]&&++a[e[i]-1];var o=new qa(t);for(i=1;i<t;++i)o[i]=o[i-1]+a[i-1]<<1;var s;if(n){s=new qa(1<<t);var c=15-t;for(i=0;i<r;++i)if(e[i])for(var l=i<<4|e[i],u=t-e[i],d=o[e[i]-1]++<<u,f=d|(1<<u)-1;d<=f;++d)s[ZW[d]>>c]=l}else for(s=new qa(r),i=0;i<r;++i)e[i]&&(s[i]=ZW[o[e[i]-1]++]>>15-e[i]);return s},Th=new ji(288);for(var Kn=0;Kn<144;++Kn)Th[Kn]=8;for(var Kn=144;Kn<256;++Kn)Th[Kn]=9;for(var Kn=256;Kn<280;++Kn)Th[Kn]=7;for(var Kn=280;Kn<288;++Kn)Th[Kn]=8;var yD=new ji(32);for(var Kn=0;Kn<32;++Kn)yD[Kn]=5;var yDe=Hp(Th,9,0),gDe=Hp(yD,5,0),R0e=function(e){return(e+7)/8|0},j0e=function(e,t,n){return(n==null||n>e.length)&&(n=e.length),new ji(e.subarray(t,n))},mDe=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],Pq=function(e,t,n){var r=new Error(t||mDe[e]);if(r.code=e,Error.captureStackTrace&&Error.captureStackTrace(r,Pq),!n)throw r;return r},Os=function(e,t,n){n<<=t&7;var r=t/8|0;e[r]|=n,e[r+1]|=n>>8},T0=function(e,t,n){n<<=t&7;var r=t/8|0;e[r]|=n,e[r+1]|=n>>8,e[r+2]|=n>>16},qO=function(e,t){for(var n=[],r=0;r<e.length;++r)e[r]&&n.push({s:r,f:e[r]});var i=n.length,a=n.slice();if(!i)return{t:D0e,l:0};if(i==1){var o=new ji(n[0].s+1);return o[n[0].s]=1,{t:o,l:1}}n.sort(function(_,A){return _.f-A.f}),n.push({s:-1,f:25001});var s=n[0],c=n[1],l=0,u=1,d=2;for(n[0]={s:-1,f:s.f+c.f,l:s,r:c};u!=i-1;)s=n[n[l].f<n[d].f?l++:d++],c=n[l!=u&&n[l].f<n[d].f?l++:d++],n[u++]={s:-1,f:s.f+c.f,l:s,r:c};for(var f=a[0].s,r=1;r<i;++r)a[r].s>f&&(f=a[r].s);var h=new qa(f+1),y=XW(n[u-1],h,0);if(y>t){var r=0,v=0,k=y-t,g=1<<k;for(a.sort(function(A,j){return h[j.s]-h[A.s]||A.f-j.f});r<i;++r){var S=a[r].s;if(h[S]>t)v+=g-(1<<y-h[S]),h[S]=t;else break}for(v>>=k;v>0;){var w=a[r].s;h[w]<t?v-=1<<t-h[w]++-1:++r}for(;r>=0&&v;--r){var C=a[r].s;h[C]==t&&(--h[C],++v)}y=t}return{t:new ji(h),l:y}},XW=function(e,t,n){return e.s==-1?Math.max(XW(e.l,t,n+1),XW(e.r,t,n+1)):t[e.s]=n},dte=function(e){for(var t=e.length;t&&!e[--t];);for(var n=new qa(++t),r=0,i=e[0],a=1,o=function(c){n[r++]=c},s=1;s<=t;++s)if(e[s]==i&&s!=t)++a;else{if(!i&&a>2){for(;a>138;a-=138)o(32754);a>2&&(o(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(o(i),--a;a>6;a-=6)o(8304);a>2&&(o(a-3<<5|8208),a=0)}for(;a--;)o(i);a=1,i=e[s]}return{c:n.subarray(0,r),n:t}},D0=function(e,t){for(var n=0,r=0;r<t.length;++r)n+=e[r]*t[r];return n},T0e=function(e,t,n){var r=n.length,i=R0e(t+2);e[i]=r&255,e[i+1]=r>>8,e[i+2]=e[i]^255,e[i+3]=e[i+1]^255;for(var a=0;a<r;++a)e[i+a+4]=n[a];return(i+4+r)*8},hte=function(e,t,n,r,i,a,o,s,c,l,u){Os(t,u++,n),++i[256];for(var d=qO(i,15),f=d.t,h=d.l,y=qO(a,15),v=y.t,k=y.l,g=dte(f),S=g.c,w=g.n,C=dte(v),_=C.c,A=C.n,j=new qa(19),O=0;O<S.length;++O)++j[S[O]&31];for(var O=0;O<_.length;++O)++j[_[O]&31];for(var T=qO(j,7),D=T.t,I=T.l,R=19;R>4&&!D[lte[R-1]];--R);var U=l+5<<3,q=D0(i,Th)+D0(a,yD)+o,K=D0(i,f)+D0(a,v)+o+14+3*R+D0(j,D)+2*j[16]+3*j[17]+7*j[18];if(c>=0&&U<=q&&U<=K)return T0e(t,u,e.subarray(c,c+l));var Z,$,B,V;if(Os(t,u,1+(K<q)),u+=2,K<q){Z=Hp(f,h,0),$=f,B=Hp(v,k,0),V=v;var F=Hp(D,I,0);Os(t,u,w-257),Os(t,u+5,A-1),Os(t,u+10,R-4),u+=14;for(var O=0;O<R;++O)Os(t,u+3*O,D[lte[O]]);u+=3*R;for(var ie=[S,_],N=0;N<2;++N)for(var P=ie[N],O=0;O<P.length;++O){var G=P[O]&31;Os(t,u,F[G]),u+=D[G],G>15&&(Os(t,u,P[O]>>5&127),u+=P[O]>>12)}}else Z=yDe,$=Th,B=gDe,V=yD;for(var O=0;O<s;++O){var J=r[O];if(J>255){var G=J>>18&31;T0(t,u,Z[G+257]),u+=$[G+257],G>7&&(Os(t,u,J>>23&31),u+=CZ[G]);var X=J&31;T0(t,u,B[X]),u+=V[X],X>3&&(T0(t,u,J>>5&8191),u+=LZ[X])}else T0(t,u,Z[J]),u+=$[J]}return T0(t,u,Z[256]),u+$[256]},vDe=new SZ([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),D0e=new ji(0),kDe=function(e,t,n,r,i,a){var o=a.z||e.length,s=new ji(r+o+5*(1+Math.ceil(o/7e3))+i),c=s.subarray(r,s.length-i),l=a.l,u=(a.r||0)&7;if(t){u&&(c[0]=a.r>>3);for(var d=vDe[t-1],f=d>>13,h=d&8191,y=(1<<n)-1,v=a.p||new qa(32768),k=a.h||new qa(y+1),g=Math.ceil(n/3),S=2*g,w=function($e){return(e[$e]^e[$e+1]<<g^e[$e+2]<<S)&y},C=new SZ(25e3),_=new qa(288),A=new qa(32),j=0,O=0,T=a.i||0,D=0,I=a.w||0,R=0;T+2<o;++T){var U=w(T),q=T&32767,K=k[U];if(v[q]=K,k[U]=q,I<=T){var Z=o-T;if((j>7e3||D>24576)&&(Z>423||!l)){u=hte(e,c,0,C,_,A,O,D,R,T-R,u),D=j=O=0,R=T;for(var $=0;$<286;++$)_[$]=0;for(var $=0;$<30;++$)A[$]=0}var B=2,V=0,F=h,ie=q-K&32767;if(Z>2&&U==w(T-ie))for(var N=Math.min(f,Z)-1,P=Math.min(32767,T),G=Math.min(258,Z);ie<=P&&--F&&q!=K;){if(e[T+B]==e[T+B-ie]){for(var J=0;J<G&&e[T+J]==e[T+J-ie];++J);if(J>B){if(B=J,V=ie,J>N)break;for(var X=Math.min(ie,J-2),ae=0,$=0;$<X;++$){var re=T-ie+$&32767,fe=v[re],ke=re-fe&32767;ke>ae&&(ae=ke,K=re)}}}q=K,K=v[q],ie+=q-K&32767}if(V){C[D++]=268435456|KW[B]<<18|ute[V];var Ne=KW[B]&31,je=ute[V]&31;O+=CZ[Ne]+LZ[je],++_[257+Ne],++A[je],I=T+B,++j}else C[D++]=e[T],++_[e[T]]}}for(T=Math.max(T,I);T<o;++T)C[D++]=e[T],++_[e[T]];u=hte(e,c,l,C,_,A,O,D,R,T-R,u),l||(a.r=u&7|c[u/8|0]<<3,u-=7,a.h=k,a.p=v,a.i=T,a.w=I)}else{for(var T=a.w||0;T<o+l;T+=65535){var Re=T+65535;Re>=o&&(c[u/8|0]=l,Re=o),u=T0e(c,u+1,e.subarray(T,Re))}a.i=o}return j0e(s,0,r+R0e(u)+i)},xDe=function(){for(var e=new Int32Array(256),t=0;t<256;++t){for(var n=t,r=9;--r;)n=(n&1&&-306674912)^n>>>1;e[t]=n}return e}(),wDe=function(){var e=-1;return{p:function(t){for(var n=e,r=0;r<t.length;++r)n=xDe[n&255^t[r]]^n>>>8;e=n},d:function(){return~e}}},q0e=function(){var e=1,t=0;return{p:function(n){for(var r=e,i=t,a=n.length|0,o=0;o!=a;){for(var s=Math.min(o+2655,a);o<s;++o)i+=r+=n[o];r=(r&65535)+15*(r>>16),i=(i&65535)+15*(i>>16)}e=r,t=i},d:function(){return e%=65521,t%=65521,(e&255)<<24|(e&65280)<<8|(t&255)<<8|t>>8}}},z0e=function(e,t,n,r,i){if(!i&&(i={l:1},t.dictionary)){var a=t.dictionary.subarray(-32768),o=new ji(a.length+e.length);o.set(a),o.set(e,a.length),e=o,i.w=a.length}return kDe(e,t.level==null?6:t.level,t.mem==null?i.l?Math.ceil(Math.max(8,Math.min(13,Math.log(e.length)))*1.5):20:12+t.mem,n,r,i)},O0e=function(e,t){var n={};for(var r in e)n[r]=e[r];for(var r in t)n[r]=t[r];return n},Xr=function(e,t,n){for(;n;++t)e[t]=n,n>>>=8},bDe=function(e,t){var n=t.level,r=n==0?0:n<6?1:n==9?3:2;if(e[0]=120,e[1]=r<<6|(t.dictionary&&32),e[1]|=31-(e[0]<<8|e[1])%31,t.dictionary){var i=q0e();i.p(t.dictionary),Xr(e,2,i.d())}};function MDe(e,t){return z0e(e,t||{},0,0)}function YW(e,t){t||(t={});var n=q0e();n.p(e);var r=z0e(e,t,t.dictionary?6:2,4);return bDe(r,t),Xr(r,r.length-4,n.d()),r}var F0e=function(e,t,n,r){for(var i in e){var a=e[i],o=t+i,s=r;Array.isArray(a)&&(s=O0e(r,a[1]),a=a[0]),a instanceof ji?n[o]=[a,s]:(n[o+="/"]=[new ji(0),s],F0e(a,o,n,r))}},fte=typeof TextEncoder<"u"&&new TextEncoder,SDe=typeof TextDecoder<"u"&&new TextDecoder,CDe=0;try{SDe.decode(D0e,{stream:!0}),CDe=1}catch{}function JW(e,t){var n;if(fte)return fte.encode(e);for(var r=e.length,i=new ji(e.length+(e.length>>1)),a=0,o=function(l){i[a++]=l},n=0;n<r;++n){if(a+5>i.length){var s=new ji(a+8+(r-n<<1));s.set(i),i=s}var c=e.charCodeAt(n);c<128||t?o(c):c<2048?(o(192|c>>6),o(128|c&63)):c>55295&&c<57344?(c=65536+(c&1047552)|e.charCodeAt(++n)&1023,o(240|c>>18),o(128|c>>12&63),o(128|c>>6&63),o(128|c&63)):(o(224|c>>12),o(128|c>>6&63),o(128|c&63))}return j0e(i,0,a)}var QW=function(e){var t=0;if(e)for(var n in e){var r=e[n].length;r>65535&&Pq(9),t+=r+4}return t},pte=function(e,t,n,r,i,a,o,s){var c=r.length,l=n.extra,u=s&&s.length,d=QW(l);Xr(e,t,o!=null?33639248:67324752),t+=4,o!=null&&(e[t++]=20,e[t++]=n.os),e[t]=20,t+=2,e[t++]=n.flag<<1|(a<0&&8),e[t++]=i&&8,e[t++]=n.compression&255,e[t++]=n.compression>>8;var f=new Date(n.mtime==null?Date.now():n.mtime),h=f.getFullYear()-1980;if((h<0||h>119)&&Pq(10),Xr(e,t,h<<25|f.getMonth()+1<<21|f.getDate()<<16|f.getHours()<<11|f.getMinutes()<<5|f.getSeconds()>>1),t+=4,a!=-1&&(Xr(e,t,n.crc),Xr(e,t+4,a<0?-a-2:a),Xr(e,t+8,n.size)),Xr(e,t+12,c),Xr(e,t+14,d),t+=16,o!=null&&(Xr(e,t,u),Xr(e,t+6,n.attrs),Xr(e,t+10,o),t+=14),e.set(r,t),t+=c,d)for(var y in l){var v=l[y],k=v.length;Xr(e,t,+y),Xr(e,t+2,k),e.set(v,t+4),t+=4+k}return u&&(e.set(s,t),t+=u),t},LDe=function(e,t,n,r,i){Xr(e,t,101010256),Xr(e,t+8,n),Xr(e,t+10,n),Xr(e,t+12,r),Xr(e,t+16,i)};function IDe(e,t){t||(t={});var n={},r=[];F0e(e,"",n,t);var i=0,a=0;for(var o in n){var s=n[o],c=s[0],l=s[1],u=l.level==0?0:8,d=JW(o),f=d.length,h=l.comment,y=h&&JW(h),v=y&&y.length,k=QW(l.extra);f>65535&&Pq(11);var g=u?MDe(c,l):c,S=g.length,w=wDe();w.p(c),r.push(O0e(l,{size:c.length,crc:w.d(),c:g,f:d,m:y,u:f!=o.length||y&&h.length!=v,o:i,compression:u})),i+=30+f+k+S,a+=76+2*(f+k)+(v||0)+S}for(var C=new ji(a+22),_=i,A=a-i,j=0;j<r.length;++j){var d=r[j];pte(C,d.o,d,d.f,d.u,d.c.length);var O=30+d.f.length+QW(d.extra);C.set(d.c,d.o+O),pte(C,i,d,d.f,d.u,d.c.length,d.o,d.m),i+=16+O+(d.m?d.m.length:0)}return LDe(C,i,r.length,A,_),C}const ADe="https://seeflow.dev/api";async function _De(e,t,n,r,i){const a=await Hue(e);if(!a.demo)throw new Error("Demo has no data");const o=a.demo,s=new Set,c=[];for(const y of o.nodes)y.type==="imageNode"&&y.data.path&&!s.has(y.data.path)?(s.add(y.data.path),c.push(y.data.path)):y.type==="htmlNode"&&y.data.htmlPath&&!s.has(y.data.htmlPath)&&(s.add(y.data.htmlPath),c.push(y.data.htmlPath));const u={[r==="link"?"seeflow.private.json":"seeflow.json"]:JW(JSON.stringify(o))};if(i){const y=i.split(",")[1];y&&(u["preview.png"]=Uint8Array.from(atob(y),v=>v.charCodeAt(0)))}for(const y of c){const v=await fetch(`/api/projects/${encodeURIComponent(e)}/files/${y}`);v.ok&&(u[`files/${y}`]=new Uint8Array(await v.arrayBuffer()))}const d=IDe(u),f=await fetch(`${ADe}/flows?email=${encodeURIComponent(t)}&name=${encodeURIComponent(n)}`,{method:"POST",headers:{"content-type":"application/zip"},body:d.buffer});if(!f.ok)throw new Error(`Export failed with status ${f.status}`);const h=await f.json();if(typeof h.url!="string")throw new Error("Invalid response from cloud API: missing url");return{shareUrl:h.url}}function EDe(e){return M.useCallback((t,n,r,i)=>_De(e,t,n,r,i),[e])}const yte="seeflow.export.email",gte="seeflow.export.name",mte="seeflow.export.visibility";function PDe({open:e,onOpenChange:t,projectId:n,onCapturePreview:r}){const[i,a]=M.useState(""),[o,s]=M.useState(""),[c,l]=M.useState("public"),[u,d]=M.useState({kind:"idle"}),[f,h]=M.useState(!1),y=EDe(n);M.useEffect(()=>{e&&(a(localStorage.getItem(yte)??""),s(localStorage.getItem(gte)??""),l(localStorage.getItem(mte)??"public"),d({kind:"idle"}),h(!1))},[e]);const v=M.useCallback(async()=>{d({kind:"loading"});try{const w=await(r==null?void 0:r()),{shareUrl:C}=await y(i.trim(),o.trim(),c,w);localStorage.setItem(yte,i.trim()),localStorage.setItem(gte,o.trim()),localStorage.setItem(mte,c),d({kind:"done",shareUrl:C})}catch(w){d({kind:"error",message:w instanceof Error?w.message:String(w)})}},[y,i,o,c,r]),k=M.useCallback(async()=>{if(u.kind==="done")try{await navigator.clipboard.writeText(u.shareUrl),h(!0),setTimeout(()=>h(!1),2e3)}catch(w){console.error("Failed to copy to clipboard:",w)}},[u]),g=u.kind==="loading",S=i.trim().length>0&&o.trim().length>0;return x.jsx(hK,{open:e,onOpenChange:t,children:x.jsxs(ZD,{className:"sm:max-w-md","data-testid":"export-dialog",onOpenAutoFocus:w=>{w.preventDefault();const C=document.querySelector('[data-testid="export-email-input"]');C==null||C.focus()},children:[x.jsxs(XD,{children:[x.jsx(YD,{children:"Export to seeflow.dev"}),x.jsx(JD,{children:"Upload this diagram to the cloud and get a shareable link."})]}),u.kind!=="done"?x.jsxs(x.Fragment,{children:[x.jsxs("div",{className:"flex flex-col gap-4",children:[x.jsxs("label",{className:"flex flex-col gap-1.5 text-sm",children:[x.jsx("span",{className:"font-medium",children:"Email"}),x.jsx("input",{type:"email",required:!0,autoComplete:"email",value:i,onChange:w=>a(w.target.value),disabled:g,"data-testid":"export-email-input",className:"rounded-md border bg-background px-3 py-2 text-sm outline-none ring-offset-background focus:border-ring focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50"}),x.jsx("span",{className:"text-xs text-muted-foreground",children:"We'll use this to let you manage your flows in the future."})]}),x.jsxs("label",{className:"flex flex-col gap-1.5 text-sm",children:[x.jsx("span",{className:"font-medium",children:"Flow Name"}),x.jsx("input",{type:"text",required:!0,value:o,onChange:w=>s(w.target.value),disabled:g,"data-testid":"export-name-input",className:"rounded-md border bg-background px-3 py-2 text-sm outline-none ring-offset-background focus:border-ring focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50"})]}),x.jsxs("label",{className:"flex flex-col gap-1.5 text-sm",children:[x.jsx("span",{className:"font-medium",children:"Visibility"}),x.jsxs("select",{value:c,onChange:w=>l(w.target.value),disabled:g,"data-testid":"export-visibility-select",className:"rounded-md border bg-background px-3 py-2 text-sm outline-none ring-offset-background focus:border-ring focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",children:[x.jsx("option",{value:"public",children:"Public — anyone can discover it"}),x.jsx("option",{value:"link",children:"Anyone with the link"})]})]}),u.kind==="error"?x.jsx("div",{role:"alert","data-testid":"export-error",className:"rounded-md border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive",children:u.message}):null]}),x.jsx(sy,{children:u.kind==="error"?x.jsxs(x.Fragment,{children:[x.jsx(oi,{type:"button",variant:"ghost",onClick:()=>t(!1),"data-testid":"export-cancel",children:"Cancel"}),x.jsx(oi,{type:"button",onClick:()=>d({kind:"idle"}),"data-testid":"export-retry",children:"Try again"})]}):x.jsxs(x.Fragment,{children:[x.jsx(oi,{type:"button",variant:"ghost",onClick:()=>t(!1),disabled:g,"data-testid":"export-cancel",children:"Cancel"}),x.jsx(oi,{type:"button",onClick:v,disabled:g||!S,"data-testid":"export-submit",children:g?x.jsxs(x.Fragment,{children:[x.jsx(to,{className:"h-4 w-4 animate-spin","aria-hidden":"true"}),x.jsx("span",{children:"Uploading…"})]}):"Export"})]})})]}):x.jsxs(x.Fragment,{children:[x.jsxs("div",{className:"flex flex-col gap-3",children:[x.jsx("p",{className:"text-sm text-muted-foreground",children:"Your diagram is live. Share this link:"}),x.jsxs("div",{className:"flex gap-2",children:[x.jsx("input",{type:"text",readOnly:!0,value:u.shareUrl,"data-testid":"export-share-url",className:"min-w-0 flex-1 rounded-md border bg-muted px-3 py-2 text-sm outline-none"}),x.jsx(oi,{type:"button",variant:"outline",size:"icon",onClick:k,"aria-label":"Copy link","data-testid":"export-copy",children:f?x.jsx(Jc,{className:"h-4 w-4","aria-hidden":"true"}):x.jsx(Y2,{className:"h-4 w-4","aria-hidden":"true"})}),x.jsx(oi,{type:"button",variant:"outline",size:"icon",onClick:()=>window.open(u.shareUrl,"_blank"),"aria-label":"View in new tab","data-testid":"export-view",children:x.jsx(dp,{className:"h-4 w-4","aria-hidden":"true"})})]})]}),x.jsx(sy,{children:x.jsx(oi,{type:"button",onClick:()=>t(!1),"data-testid":"export-done",children:"Done"})})]})]})})}function NDe({onRestartDemo:e}){const[t,n]=M.useState(!1),r=M.useCallback(()=>{t||(n(!0),Promise.resolve(e()).finally(()=>{n(!1)}))},[e,t]);return x.jsxs(Oy,{children:[x.jsx(Fy,{asChild:!0,children:x.jsx(oi,{"data-testid":"header-restart-demo",type:"button",variant:"ghost",size:"icon","aria-label":"Restart demo",title:"Restart demo",disabled:t,onClick:r,className:"h-8 w-8",children:t?x.jsx(to,{className:"h-4 w-4 animate-spin","aria-hidden":"true"}):x.jsx(Mp,{className:"h-4 w-4","aria-hidden":"true"})})}),x.jsx($f,{side:"bottom",children:"Restart demo"})]})}var Nq="DropdownMenu",[RDe]=xs(Nq,[bq]),Yi=bq(),[jDe,B0e]=RDe(Nq),H0e=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:a,onOpenChange:o,modal:s=!0}=e,c=Yi(t),l=M.useRef(null),[u,d]=Of({prop:i,defaultProp:a??!1,onChange:o,caller:Nq});return x.jsx(jDe,{scope:t,triggerId:da(),triggerRef:l,contentId:da(),open:u,onOpenChange:d,onOpenToggle:M.useCallback(()=>d(f=>!f),[d]),modal:s,children:x.jsx(G2e,{...c,open:u,onOpenChange:d,dir:r,modal:s,children:n})})};H0e.displayName=Nq;var V0e="DropdownMenuTrigger",U0e=M.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,a=B0e(V0e,n),o=Yi(n);return x.jsx(K2e,{asChild:!0,...o,children:x.jsx(Jt.button,{type:"button",id:a.triggerId,"aria-haspopup":"menu","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...i,ref:ms(t,a.triggerRef),onPointerDown:St(e.onPointerDown,s=>{!r&&s.button===0&&s.ctrlKey===!1&&(a.onOpenToggle(),a.open||s.preventDefault())}),onKeyDown:St(e.onKeyDown,s=>{r||(["Enter"," "].includes(s.key)&&a.onOpenToggle(),s.key==="ArrowDown"&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(s.key)&&s.preventDefault())})})})});U0e.displayName=V0e;var TDe="DropdownMenuPortal",$0e=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Yi(t);return x.jsx(Z2e,{...r,...n})};$0e.displayName=TDe;var W0e="DropdownMenuContent",G0e=M.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=B0e(W0e,n),a=Yi(n),o=M.useRef(!1);return x.jsx(X2e,{id:i.contentId,"aria-labelledby":i.triggerId,...a,...r,ref:t,onCloseAutoFocus:St(e.onCloseAutoFocus,s=>{var c;o.current||(c=i.triggerRef.current)==null||c.focus(),o.current=!1,s.preventDefault()}),onInteractOutside:St(e.onInteractOutside,s=>{const c=s.detail.originalEvent,l=c.button===0&&c.ctrlKey===!0,u=c.button===2||l;(!i.modal||u)&&(o.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});G0e.displayName=W0e;var DDe="DropdownMenuGroup",qDe=M.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Yi(n);return x.jsx(Y2e,{...i,...r,ref:t})});qDe.displayName=DDe;var zDe="DropdownMenuLabel",ODe=M.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Yi(n);return x.jsx(J2e,{...i,...r,ref:t})});ODe.displayName=zDe;var FDe="DropdownMenuItem",K0e=M.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Yi(n);return x.jsx(Q2e,{...i,...r,ref:t})});K0e.displayName=FDe;var BDe="DropdownMenuCheckboxItem",HDe=M.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Yi(n);return x.jsx(efe,{...i,...r,ref:t})});HDe.displayName=BDe;var VDe="DropdownMenuRadioGroup",UDe=M.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Yi(n);return x.jsx(tfe,{...i,...r,ref:t})});UDe.displayName=VDe;var $De="DropdownMenuRadioItem",WDe=M.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Yi(n);return x.jsx(nfe,{...i,...r,ref:t})});WDe.displayName=$De;var GDe="DropdownMenuItemIndicator",KDe=M.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Yi(n);return x.jsx(rfe,{...i,...r,ref:t})});KDe.displayName=GDe;var ZDe="DropdownMenuSeparator",Z0e=M.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Yi(n);return x.jsx(ife,{...i,...r,ref:t})});Z0e.displayName=ZDe;var XDe="DropdownMenuArrow",YDe=M.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Yi(n);return x.jsx(afe,{...i,...r,ref:t})});YDe.displayName=XDe;var JDe="DropdownMenuSubTrigger",QDe=M.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Yi(n);return x.jsx(ofe,{...i,...r,ref:t})});QDe.displayName=JDe;var eqe="DropdownMenuSubContent",tqe=M.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Yi(n);return x.jsx(sfe,{...i,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});tqe.displayName=eqe;var nqe=H0e,rqe=U0e,iqe=$0e,X0e=G0e,Y0e=K0e,J0e=Z0e;const aqe=nqe,oqe=rqe,Q0e=M.forwardRef(({className:e,sideOffset:t=4,...n},r)=>x.jsx(iqe,{children:x.jsx(X0e,{ref:r,sideOffset:t,className:Ze("z-50 min-w-[10rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md 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",e),...n})}));Q0e.displayName=X0e.displayName;const dT=M.forwardRef(({className:e,...t},n)=>x.jsx(Y0e,{ref:n,className:Ze("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled]:pointer-events-none data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground data-[disabled]:opacity-50",e),...t}));dT.displayName=Y0e.displayName;const sqe=M.forwardRef(({className:e,...t},n)=>x.jsx(J0e,{ref:n,className:Ze("-mx-1 my-1 h-px bg-border",e),...t}));sqe.displayName=J0e.displayName;const vte="Share / download",cqe="Download PDF",lqe="Download PNG",uqe="Export to seeflow.dev";function dqe({onDownloadPdf:e,onDownloadPng:t,onExportToCloud:n}){const[r,i]=M.useState(!1),[a,o]=M.useState(!1),s=M.useCallback(()=>{!e||r||(i(!0),Promise.resolve(e()).finally(()=>i(!1)))},[e,r]),c=M.useCallback(()=>{!t||a||(o(!0),Promise.resolve(t()).finally(()=>o(!1)))},[t,a]);return!e&&!t&&!n?null:x.jsxs(aqe,{children:[x.jsx(oqe,{asChild:!0,children:x.jsx("button",{type:"button","data-testid":"share-menu-trigger","aria-label":vte,title:vte,className:Ze("inline-flex h-8 w-8 items-center justify-center rounded-md border border-border bg-background/95 text-muted-foreground shadow-md backdrop-blur transition-colors","hover:bg-accent hover:text-accent-foreground","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"),children:x.jsx(Ip,{className:"h-4 w-4","aria-hidden":"true"})})}),x.jsxs(Q0e,{align:"end","data-testid":"share-menu-content",onCloseAutoFocus:l=>{l.preventDefault()},children:[e?x.jsxs(dT,{"data-testid":"share-menu-pdf",disabled:r,onSelect:l=>{l.preventDefault(),s()},children:[r?x.jsx(to,{className:"h-4 w-4 animate-spin","aria-hidden":"true"}):x.jsx(hp,{className:"h-4 w-4","aria-hidden":"true"}),x.jsx("span",{children:cqe})]}):null,t?x.jsxs(dT,{"data-testid":"share-menu-png",disabled:a,onSelect:l=>{l.preventDefault(),c()},children:[a?x.jsx(to,{className:"h-4 w-4 animate-spin","aria-hidden":"true"}):x.jsx(pp,{className:"h-4 w-4","aria-hidden":"true"}),x.jsx("span",{children:lqe})]}):null,n?x.jsxs(dT,{"data-testid":"share-menu-export-cloud",onSelect:()=>{n()},children:[x.jsx(Np,{className:"h-4 w-4","aria-hidden":"true"}),x.jsx("span",{children:uqe})]}):null]})]})}const hqe=(e,t)=>{if(e.has(t))return e;const n=new Set(e);return n.add(t),n},fqe=(e,t)=>{if(t.length===0)return e;let n=!1;const r=new Set(e);for(const i of t)r.has(i)||(r.add(i),n=!0);return n?r:e},pqe=(e,t)=>{if(!e.has(t))return e;const n=new Set(e);return n.delete(t),n},yqe=(e,t)=>{if(t.length===0)return e;let n=!1;const r=new Set(e);for(const i of t)r.has(i)&&(r.delete(i),n=!0);return n?r:e},gqe=(e,t)=>{if(e.size===0)return e;const n=new Set(t.map(a=>a.id));let r=!1;const i=new Set(e);for(const a of i)n.has(a)||(i.delete(a),r=!0);return r?i:e},kte=()=>{const[e,t]=M.useState(()=>new Set),n=M.useCallback(c=>{t(l=>hqe(l,c))},[]),r=M.useCallback(c=>{t(l=>fqe(l,c))},[]),i=M.useCallback(c=>{t(l=>pqe(l,c))},[]),a=M.useCallback(c=>{t(l=>yqe(l,c))},[]),o=M.useCallback(c=>{t(l=>gqe(l,c))},[]),s=M.useCallback(()=>t(new Set),[]);return{ids:e,mark:n,markMany:r,unmark:i,unmarkMany:a,pruneAgainst:o,reset:s}},mqe=(e,t)=>e===t?!0:e==null||t==null||typeof e!=typeof t||typeof e!="object"?!1:JSON.stringify(e)===JSON.stringify(t),vqe=(e,t,n)=>({...e,[t]:{...e[t],...n}}),kqe=(e,t)=>{if(!(t in e))return e;const n={...e};return delete n[t],n},xqe=(e,t)=>{const n=Object.entries(e);if(n.length===0)return e;const r=new Map(t.map(o=>[o.id,o]));let i=!1;const a={...e};for(const[o,s]of n){const c=r.get(o);if(!c)continue;const l={};let u=!1;for(const d of Object.keys(s))mqe(s[d],c[d])?i=!0:(l[d]=s[d],u=!0);u?a[o]=l:(i=!0,delete a[o])}return i?a:e},xte=()=>{const[e,t]=M.useState({}),n=M.useCallback((o,s)=>{t(c=>vqe(c,o,s))},[]),r=M.useCallback(o=>{t(s=>kqe(s,o))},[]),i=M.useCallback(o=>{t(s=>xqe(s,o))},[]),a=M.useCallback(()=>t({}),[]);return{overrides:e,setOverride:n,dropOverride:r,pruneAgainst:i,reset:a}},wqe=500,bqe=500,Mqe={stack:[],cursor:0},Sqe=(e,t,n)=>{const r=Date.now(),i=wqe,a=bqe,{stack:o,cursor:s}=e;if(t.coalesceKey&&s>0){const u=o[s-1];if(u&&u.coalesceKey===t.coalesceKey&&r-u.capturedAt<=a){const d=o.slice(0,s);return d[s-1]={...u,do:t.do,capturedAt:r},{stack:d,cursor:s}}}const c=o.slice(0,s);c.push({...t,capturedAt:r});let l=s+1;for(;c.length>i;)c.shift(),l-=1;return l<0&&(l=0),{stack:c,cursor:l}},Cqe=e=>e.cursor===0?{state:e,entry:void 0}:{state:{...e,cursor:e.cursor-1},entry:e.stack[e.cursor-1]},Lqe=e=>e.cursor===e.stack.length?{state:e,entry:void 0}:{state:{...e,cursor:e.cursor+1},entry:e.stack[e.cursor]},Iqe=()=>({stack:[],cursor:0}),Aqe=e=>{if(e.cursor===0)return e;const t=e.stack.slice();return t.splice(e.cursor-1,1),{stack:t,cursor:e.cursor-1}},_qe=(e,t)=>t.state,Eqe=()=>{const[e,t]=M.useReducer(_qe,Mqe),n=M.useRef(e);n.current=e;const r=M.useRef(Promise.resolve()),i=M.useRef(0),a=M.useCallback(h=>{h!==n.current&&(n.current=h,t({type:"replace",state:h}))},[]),o=M.useCallback(h=>{const y={do:h.do,undo:h.undo,coalesceKey:h.coalesceKey,capturedAt:h.capturedAt??Date.now()};a(Sqe(n.current,y))},[a]),s=M.useCallback(()=>{i.current=Date.now();const h=r.current.then(()=>{const y=Cqe(n.current);if(y.entry)return a(y.state),{entry:y.entry}});return r.current=h.then(()=>{},()=>{}),h},[a]),c=M.useCallback(()=>{i.current=Date.now();const h=r.current.then(()=>{const y=Lqe(n.current);if(y.entry)return a(y.state),{entry:y.entry}});return r.current=h.then(()=>{},()=>{}),h},[a]),l=M.useCallback(()=>{a(Iqe())},[a]),u=M.useCallback(()=>{a(Aqe(n.current))},[a]),d=M.useCallback(()=>{i.current=Date.now()},[]),f=M.useCallback(()=>i.current,[]);return{push:o,undo:s,redo:c,clear:l,dropTop:u,canUndo:e.cursor>0,canRedo:e.cursor<e.stack.length,markMutation:d,lastMutationAt:f}};function IZ(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var zO,wte;function Pqe(){if(wte)return zO;wte=1;function e(){this.__data__=[],this.size=0}return zO=e,zO}var OO,bte;function Jf(){if(bte)return OO;bte=1;function e(t,n){return t===n||t!==t&&n!==n}return OO=e,OO}var FO,Mte;function Rq(){if(Mte)return FO;Mte=1;var e=Jf();function t(n,r){for(var i=n.length;i--;)if(e(n[i][0],r))return i;return-1}return FO=t,FO}var BO,Ste;function Nqe(){if(Ste)return BO;Ste=1;var e=Rq(),t=Array.prototype,n=t.splice;function r(i){var a=this.__data__,o=e(a,i);if(o<0)return!1;var s=a.length-1;return o==s?a.pop():n.call(a,o,1),--this.size,!0}return BO=r,BO}var HO,Cte;function Rqe(){if(Cte)return HO;Cte=1;var e=Rq();function t(n){var r=this.__data__,i=e(r,n);return i<0?void 0:r[i][1]}return HO=t,HO}var VO,Lte;function jqe(){if(Lte)return VO;Lte=1;var e=Rq();function t(n){return e(this.__data__,n)>-1}return VO=t,VO}var UO,Ite;function Tqe(){if(Ite)return UO;Ite=1;var e=Rq();function t(n,r){var i=this.__data__,a=e(i,n);return a<0?(++this.size,i.push([n,r])):i[a][1]=r,this}return UO=t,UO}var $O,Ate;function jq(){if(Ate)return $O;Ate=1;var e=Pqe(),t=Nqe(),n=Rqe(),r=jqe(),i=Tqe();function a(o){var s=-1,c=o==null?0:o.length;for(this.clear();++s<c;){var l=o[s];this.set(l[0],l[1])}}return a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=n,a.prototype.has=r,a.prototype.set=i,$O=a,$O}var WO,_te;function Dqe(){if(_te)return WO;_te=1;var e=jq();function t(){this.__data__=new e,this.size=0}return WO=t,WO}var GO,Ete;function qqe(){if(Ete)return GO;Ete=1;function e(t){var n=this.__data__,r=n.delete(t);return this.size=n.size,r}return GO=e,GO}var KO,Pte;function zqe(){if(Pte)return KO;Pte=1;function e(t){return this.__data__.get(t)}return KO=e,KO}var ZO,Nte;function Oqe(){if(Nte)return ZO;Nte=1;function e(t){return this.__data__.has(t)}return ZO=e,ZO}var XO,Rte;function epe(){if(Rte)return XO;Rte=1;var e=typeof Fc=="object"&&Fc&&Fc.Object===Object&&Fc;return XO=e,XO}var YO,jte;function Bo(){if(jte)return YO;jte=1;var e=epe(),t=typeof self=="object"&&self&&self.Object===Object&&self,n=e||t||Function("return this")();return YO=n,YO}var JO,Tte;function Qf(){if(Tte)return JO;Tte=1;var e=Bo(),t=e.Symbol;return JO=t,JO}var QO,Dte;function Fqe(){if(Dte)return QO;Dte=1;var e=Qf(),t=Object.prototype,n=t.hasOwnProperty,r=t.toString,i=e?e.toStringTag:void 0;function a(o){var s=n.call(o,i),c=o[i];try{o[i]=void 0;var l=!0}catch{}var u=r.call(o);return l&&(s?o[i]=c:delete o[i]),u}return QO=a,QO}var eF,qte;function Bqe(){if(qte)return eF;qte=1;var e=Object.prototype,t=e.toString;function n(r){return t.call(r)}return eF=n,eF}var tF,zte;function Uh(){if(zte)return tF;zte=1;var e=Qf(),t=Fqe(),n=Bqe(),r="[object Null]",i="[object Undefined]",a=e?e.toStringTag:void 0;function o(s){return s==null?s===void 0?i:r:a&&a in Object(s)?t(s):n(s)}return tF=o,tF}var nF,Ote;function uo(){if(Ote)return nF;Ote=1;function e(t){var n=typeof t;return t!=null&&(n=="object"||n=="function")}return nF=e,nF}var rF,Fte;function sg(){if(Fte)return rF;Fte=1;var e=Uh(),t=uo(),n="[object AsyncFunction]",r="[object Function]",i="[object GeneratorFunction]",a="[object Proxy]";function o(s){if(!t(s))return!1;var c=e(s);return c==r||c==i||c==n||c==a}return rF=o,rF}var iF,Bte;function Hqe(){if(Bte)return iF;Bte=1;var e=Bo(),t=e["__core-js_shared__"];return iF=t,iF}var aF,Hte;function Vqe(){if(Hte)return aF;Hte=1;var e=Hqe(),t=function(){var r=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""}();function n(r){return!!t&&t in r}return aF=n,aF}var oF,Vte;function tpe(){if(Vte)return oF;Vte=1;var e=Function.prototype,t=e.toString;function n(r){if(r!=null){try{return t.call(r)}catch{}try{return r+""}catch{}}return""}return oF=n,oF}var sF,Ute;function Uqe(){if(Ute)return sF;Ute=1;var e=sg(),t=Vqe(),n=uo(),r=tpe(),i=/[\\^$.*+?()[\]{}|]/g,a=/^\[object .+?Constructor\]$/,o=Function.prototype,s=Object.prototype,c=o.toString,l=s.hasOwnProperty,u=RegExp("^"+c.call(l).replace(i,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function d(f){if(!n(f)||t(f))return!1;var h=e(f)?u:a;return h.test(r(f))}return sF=d,sF}var cF,$te;function $qe(){if($te)return cF;$te=1;function e(t,n){return t==null?void 0:t[n]}return cF=e,cF}var lF,Wte;function $h(){if(Wte)return lF;Wte=1;var e=Uqe(),t=$qe();function n(r,i){var a=t(r,i);return e(a)?a:void 0}return lF=n,lF}var uF,Gte;function AZ(){if(Gte)return uF;Gte=1;var e=$h(),t=Bo(),n=e(t,"Map");return uF=n,uF}var dF,Kte;function Tq(){if(Kte)return dF;Kte=1;var e=$h(),t=e(Object,"create");return dF=t,dF}var hF,Zte;function Wqe(){if(Zte)return hF;Zte=1;var e=Tq();function t(){this.__data__=e?e(null):{},this.size=0}return hF=t,hF}var fF,Xte;function Gqe(){if(Xte)return fF;Xte=1;function e(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n}return fF=e,fF}var pF,Yte;function Kqe(){if(Yte)return pF;Yte=1;var e=Tq(),t="__lodash_hash_undefined__",n=Object.prototype,r=n.hasOwnProperty;function i(a){var o=this.__data__;if(e){var s=o[a];return s===t?void 0:s}return r.call(o,a)?o[a]:void 0}return pF=i,pF}var yF,Jte;function Zqe(){if(Jte)return yF;Jte=1;var e=Tq(),t=Object.prototype,n=t.hasOwnProperty;function r(i){var a=this.__data__;return e?a[i]!==void 0:n.call(a,i)}return yF=r,yF}var gF,Qte;function Xqe(){if(Qte)return gF;Qte=1;var e=Tq(),t="__lodash_hash_undefined__";function n(r,i){var a=this.__data__;return this.size+=this.has(r)?0:1,a[r]=e&&i===void 0?t:i,this}return gF=n,gF}var mF,ene;function Yqe(){if(ene)return mF;ene=1;var e=Wqe(),t=Gqe(),n=Kqe(),r=Zqe(),i=Xqe();function a(o){var s=-1,c=o==null?0:o.length;for(this.clear();++s<c;){var l=o[s];this.set(l[0],l[1])}}return a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=n,a.prototype.has=r,a.prototype.set=i,mF=a,mF}var vF,tne;function Jqe(){if(tne)return vF;tne=1;var e=Yqe(),t=jq(),n=AZ();function r(){this.size=0,this.__data__={hash:new e,map:new(n||t),string:new e}}return vF=r,vF}var kF,nne;function Qqe(){if(nne)return kF;nne=1;function e(t){var n=typeof t;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?t!=="__proto__":t===null}return kF=e,kF}var xF,rne;function Dq(){if(rne)return xF;rne=1;var e=Qqe();function t(n,r){var i=n.__data__;return e(r)?i[typeof r=="string"?"string":"hash"]:i.map}return xF=t,xF}var wF,ine;function eze(){if(ine)return wF;ine=1;var e=Dq();function t(n){var r=e(this,n).delete(n);return this.size-=r?1:0,r}return wF=t,wF}var bF,ane;function tze(){if(ane)return bF;ane=1;var e=Dq();function t(n){return e(this,n).get(n)}return bF=t,bF}var MF,one;function nze(){if(one)return MF;one=1;var e=Dq();function t(n){return e(this,n).has(n)}return MF=t,MF}var SF,sne;function rze(){if(sne)return SF;sne=1;var e=Dq();function t(n,r){var i=e(this,n),a=i.size;return i.set(n,r),this.size+=i.size==a?0:1,this}return SF=t,SF}var CF,cne;function _Z(){if(cne)return CF;cne=1;var e=Jqe(),t=eze(),n=tze(),r=nze(),i=rze();function a(o){var s=-1,c=o==null?0:o.length;for(this.clear();++s<c;){var l=o[s];this.set(l[0],l[1])}}return a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=n,a.prototype.has=r,a.prototype.set=i,CF=a,CF}var LF,lne;function ize(){if(lne)return LF;lne=1;var e=jq(),t=AZ(),n=_Z(),r=200;function i(a,o){var s=this.__data__;if(s instanceof e){var c=s.__data__;if(!t||c.length<r-1)return c.push([a,o]),this.size=++s.size,this;s=this.__data__=new n(c)}return s.set(a,o),this.size=s.size,this}return LF=i,LF}var IF,une;function qq(){if(une)return IF;une=1;var e=jq(),t=Dqe(),n=qqe(),r=zqe(),i=Oqe(),a=ize();function o(s){var c=this.__data__=new e(s);this.size=c.size}return o.prototype.clear=t,o.prototype.delete=n,o.prototype.get=r,o.prototype.has=i,o.prototype.set=a,IF=o,IF}var AF,dne;function EZ(){if(dne)return AF;dne=1;function e(t,n){for(var r=-1,i=t==null?0:t.length;++r<i&&n(t[r],r,t)!==!1;);return t}return AF=e,AF}var _F,hne;function npe(){if(hne)return _F;hne=1;var e=$h(),t=function(){try{var n=e(Object,"defineProperty");return n({},"",{}),n}catch{}}();return _F=t,_F}var EF,fne;function zq(){if(fne)return EF;fne=1;var e=npe();function t(n,r,i){r=="__proto__"&&e?e(n,r,{configurable:!0,enumerable:!0,value:i,writable:!0}):n[r]=i}return EF=t,EF}var PF,pne;function Oq(){if(pne)return PF;pne=1;var e=zq(),t=Jf(),n=Object.prototype,r=n.hasOwnProperty;function i(a,o,s){var c=a[o];(!(r.call(a,o)&&t(c,s))||s===void 0&&!(o in a))&&e(a,o,s)}return PF=i,PF}var NF,yne;function cg(){if(yne)return NF;yne=1;var e=Oq(),t=zq();function n(r,i,a,o){var s=!a;a||(a={});for(var c=-1,l=i.length;++c<l;){var u=i[c],d=o?o(a[u],r[u],u,a,r):void 0;d===void 0&&(d=r[u]),s?t(a,u,d):e(a,u,d)}return a}return NF=n,NF}var RF,gne;function aze(){if(gne)return RF;gne=1;function e(t,n){for(var r=-1,i=Array(t);++r<t;)i[r]=n(r);return i}return RF=e,RF}var jF,mne;function Ss(){if(mne)return jF;mne=1;function e(t){return t!=null&&typeof t=="object"}return jF=e,jF}var TF,vne;function oze(){if(vne)return TF;vne=1;var e=Uh(),t=Ss(),n="[object Arguments]";function r(i){return t(i)&&e(i)==n}return TF=r,TF}var DF,kne;function lg(){if(kne)return DF;kne=1;var e=oze(),t=Ss(),n=Object.prototype,r=n.hasOwnProperty,i=n.propertyIsEnumerable,a=e(function(){return arguments}())?e:function(o){return t(o)&&r.call(o,"callee")&&!i.call(o,"callee")};return DF=a,DF}var qF,xne;function $r(){if(xne)return qF;xne=1;var e=Array.isArray;return qF=e,qF}var $0={exports:{}},zF,wne;function sze(){if(wne)return zF;wne=1;function e(){return!1}return zF=e,zF}$0.exports;var bne;function e0(){return bne||(bne=1,function(e,t){var n=Bo(),r=sze(),i=t&&!t.nodeType&&t,a=i&&!0&&e&&!e.nodeType&&e,o=a&&a.exports===i,s=o?n.Buffer:void 0,c=s?s.isBuffer:void 0,l=c||r;e.exports=l}($0,$0.exports)),$0.exports}var OF,Mne;function Fq(){if(Mne)return OF;Mne=1;var e=9007199254740991,t=/^(?:0|[1-9]\d*)$/;function n(r,i){var a=typeof r;return i=i??e,!!i&&(a=="number"||a!="symbol"&&t.test(r))&&r>-1&&r%1==0&&r<i}return OF=n,OF}var FF,Sne;function PZ(){if(Sne)return FF;Sne=1;var e=9007199254740991;function t(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=e}return FF=t,FF}var BF,Cne;function cze(){if(Cne)return BF;Cne=1;var e=Uh(),t=PZ(),n=Ss(),r="[object Arguments]",i="[object Array]",a="[object Boolean]",o="[object Date]",s="[object Error]",c="[object Function]",l="[object Map]",u="[object Number]",d="[object Object]",f="[object RegExp]",h="[object Set]",y="[object String]",v="[object WeakMap]",k="[object ArrayBuffer]",g="[object DataView]",S="[object Float32Array]",w="[object Float64Array]",C="[object Int8Array]",_="[object Int16Array]",A="[object Int32Array]",j="[object Uint8Array]",O="[object Uint8ClampedArray]",T="[object Uint16Array]",D="[object Uint32Array]",I={};I[S]=I[w]=I[C]=I[_]=I[A]=I[j]=I[O]=I[T]=I[D]=!0,I[r]=I[i]=I[k]=I[a]=I[g]=I[o]=I[s]=I[c]=I[l]=I[u]=I[d]=I[f]=I[h]=I[y]=I[v]=!1;function R(U){return n(U)&&t(U.length)&&!!I[e(U)]}return BF=R,BF}var HF,Lne;function Bq(){if(Lne)return HF;Lne=1;function e(t){return function(n){return t(n)}}return HF=e,HF}var W0={exports:{}};W0.exports;var Ine;function NZ(){return Ine||(Ine=1,function(e,t){var n=epe(),r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===r,o=a&&n.process,s=function(){try{var c=i&&i.require&&i.require("util").types;return c||o&&o.binding&&o.binding("util")}catch{}}();e.exports=s}(W0,W0.exports)),W0.exports}var VF,Ane;function ug(){if(Ane)return VF;Ane=1;var e=cze(),t=Bq(),n=NZ(),r=n&&n.isTypedArray,i=r?t(r):e;return VF=i,VF}var UF,_ne;function rpe(){if(_ne)return UF;_ne=1;var e=aze(),t=lg(),n=$r(),r=e0(),i=Fq(),a=ug(),o=Object.prototype,s=o.hasOwnProperty;function c(l,u){var d=n(l),f=!d&&t(l),h=!d&&!f&&r(l),y=!d&&!f&&!h&&a(l),v=d||f||h||y,k=v?e(l.length,String):[],g=k.length;for(var S in l)(u||s.call(l,S))&&!(v&&(S=="length"||h&&(S=="offset"||S=="parent")||y&&(S=="buffer"||S=="byteLength"||S=="byteOffset")||i(S,g)))&&k.push(S);return k}return UF=c,UF}var $F,Ene;function Hq(){if(Ene)return $F;Ene=1;var e=Object.prototype;function t(n){var r=n&&n.constructor,i=typeof r=="function"&&r.prototype||e;return n===i}return $F=t,$F}var WF,Pne;function ipe(){if(Pne)return WF;Pne=1;function e(t,n){return function(r){return t(n(r))}}return WF=e,WF}var GF,Nne;function lze(){if(Nne)return GF;Nne=1;var e=ipe(),t=e(Object.keys,Object);return GF=t,GF}var KF,Rne;function RZ(){if(Rne)return KF;Rne=1;var e=Hq(),t=lze(),n=Object.prototype,r=n.hasOwnProperty;function i(a){if(!e(a))return t(a);var o=[];for(var s in Object(a))r.call(a,s)&&s!="constructor"&&o.push(s);return o}return KF=i,KF}var ZF,jne;function lc(){if(jne)return ZF;jne=1;var e=sg(),t=PZ();function n(r){return r!=null&&t(r.length)&&!e(r)}return ZF=n,ZF}var XF,Tne;function gl(){if(Tne)return XF;Tne=1;var e=rpe(),t=RZ(),n=lc();function r(i){return n(i)?e(i):t(i)}return XF=r,XF}var YF,Dne;function uze(){if(Dne)return YF;Dne=1;var e=cg(),t=gl();function n(r,i){return r&&e(i,t(i),r)}return YF=n,YF}var JF,qne;function dze(){if(qne)return JF;qne=1;function e(t){var n=[];if(t!=null)for(var r in Object(t))n.push(r);return n}return JF=e,JF}var QF,zne;function hze(){if(zne)return QF;zne=1;var e=uo(),t=Hq(),n=dze(),r=Object.prototype,i=r.hasOwnProperty;function a(o){if(!e(o))return n(o);var s=t(o),c=[];for(var l in o)l=="constructor"&&(s||!i.call(o,l))||c.push(l);return c}return QF=a,QF}var eB,One;function Wh(){if(One)return eB;One=1;var e=rpe(),t=hze(),n=lc();function r(i){return n(i)?e(i,!0):t(i)}return eB=r,eB}var tB,Fne;function fze(){if(Fne)return tB;Fne=1;var e=cg(),t=Wh();function n(r,i){return r&&e(i,t(i),r)}return tB=n,tB}var G0={exports:{}};G0.exports;var Bne;function ape(){return Bne||(Bne=1,function(e,t){var n=Bo(),r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===r,o=a?n.Buffer:void 0,s=o?o.allocUnsafe:void 0;function c(l,u){if(u)return l.slice();var d=l.length,f=s?s(d):new l.constructor(d);return l.copy(f),f}e.exports=c}(G0,G0.exports)),G0.exports}var nB,Hne;function ope(){if(Hne)return nB;Hne=1;function e(t,n){var r=-1,i=t.length;for(n||(n=Array(i));++r<i;)n[r]=t[r];return n}return nB=e,nB}var rB,Vne;function spe(){if(Vne)return rB;Vne=1;function e(t,n){for(var r=-1,i=t==null?0:t.length,a=0,o=[];++r<i;){var s=t[r];n(s,r,t)&&(o[a++]=s)}return o}return rB=e,rB}var iB,Une;function cpe(){if(Une)return iB;Une=1;function e(){return[]}return iB=e,iB}var aB,$ne;function jZ(){if($ne)return aB;$ne=1;var e=spe(),t=cpe(),n=Object.prototype,r=n.propertyIsEnumerable,i=Object.getOwnPropertySymbols,a=i?function(o){return o==null?[]:(o=Object(o),e(i(o),function(s){return r.call(o,s)}))}:t;return aB=a,aB}var oB,Wne;function pze(){if(Wne)return oB;Wne=1;var e=cg(),t=jZ();function n(r,i){return e(r,t(r),i)}return oB=n,oB}var sB,Gne;function TZ(){if(Gne)return sB;Gne=1;function e(t,n){for(var r=-1,i=n.length,a=t.length;++r<i;)t[a+r]=n[r];return t}return sB=e,sB}var cB,Kne;function Vq(){if(Kne)return cB;Kne=1;var e=ipe(),t=e(Object.getPrototypeOf,Object);return cB=t,cB}var lB,Zne;function lpe(){if(Zne)return lB;Zne=1;var e=TZ(),t=Vq(),n=jZ(),r=cpe(),i=Object.getOwnPropertySymbols,a=i?function(o){for(var s=[];o;)e(s,n(o)),o=t(o);return s}:r;return lB=a,lB}var uB,Xne;function yze(){if(Xne)return uB;Xne=1;var e=cg(),t=lpe();function n(r,i){return e(r,t(r),i)}return uB=n,uB}var dB,Yne;function upe(){if(Yne)return dB;Yne=1;var e=TZ(),t=$r();function n(r,i,a){var o=i(r);return t(r)?o:e(o,a(r))}return dB=n,dB}var hB,Jne;function dpe(){if(Jne)return hB;Jne=1;var e=upe(),t=jZ(),n=gl();function r(i){return e(i,n,t)}return hB=r,hB}var fB,Qne;function gze(){if(Qne)return fB;Qne=1;var e=upe(),t=lpe(),n=Wh();function r(i){return e(i,n,t)}return fB=r,fB}var pB,ere;function mze(){if(ere)return pB;ere=1;var e=$h(),t=Bo(),n=e(t,"DataView");return pB=n,pB}var yB,tre;function vze(){if(tre)return yB;tre=1;var e=$h(),t=Bo(),n=e(t,"Promise");return yB=n,yB}var gB,nre;function hpe(){if(nre)return gB;nre=1;var e=$h(),t=Bo(),n=e(t,"Set");return gB=n,gB}var mB,rre;function kze(){if(rre)return mB;rre=1;var e=$h(),t=Bo(),n=e(t,"WeakMap");return mB=n,mB}var vB,ire;function t0(){if(ire)return vB;ire=1;var e=mze(),t=AZ(),n=vze(),r=hpe(),i=kze(),a=Uh(),o=tpe(),s="[object Map]",c="[object Object]",l="[object Promise]",u="[object Set]",d="[object WeakMap]",f="[object DataView]",h=o(e),y=o(t),v=o(n),k=o(r),g=o(i),S=a;return(e&&S(new e(new ArrayBuffer(1)))!=f||t&&S(new t)!=s||n&&S(n.resolve())!=l||r&&S(new r)!=u||i&&S(new i)!=d)&&(S=function(w){var C=a(w),_=C==c?w.constructor:void 0,A=_?o(_):"";if(A)switch(A){case h:return f;case y:return s;case v:return l;case k:return u;case g:return d}return C}),vB=S,vB}var kB,are;function xze(){if(are)return kB;are=1;var e=Object.prototype,t=e.hasOwnProperty;function n(r){var i=r.length,a=new r.constructor(i);return i&&typeof r[0]=="string"&&t.call(r,"index")&&(a.index=r.index,a.input=r.input),a}return kB=n,kB}var xB,ore;function fpe(){if(ore)return xB;ore=1;var e=Bo(),t=e.Uint8Array;return xB=t,xB}var wB,sre;function DZ(){if(sre)return wB;sre=1;var e=fpe();function t(n){var r=new n.constructor(n.byteLength);return new e(r).set(new e(n)),r}return wB=t,wB}var bB,cre;function wze(){if(cre)return bB;cre=1;var e=DZ();function t(n,r){var i=r?e(n.buffer):n.buffer;return new n.constructor(i,n.byteOffset,n.byteLength)}return bB=t,bB}var MB,lre;function bze(){if(lre)return MB;lre=1;var e=/\w*$/;function t(n){var r=new n.constructor(n.source,e.exec(n));return r.lastIndex=n.lastIndex,r}return MB=t,MB}var SB,ure;function Mze(){if(ure)return SB;ure=1;var e=Qf(),t=e?e.prototype:void 0,n=t?t.valueOf:void 0;function r(i){return n?Object(n.call(i)):{}}return SB=r,SB}var CB,dre;function ppe(){if(dre)return CB;dre=1;var e=DZ();function t(n,r){var i=r?e(n.buffer):n.buffer;return new n.constructor(i,n.byteOffset,n.length)}return CB=t,CB}var LB,hre;function Sze(){if(hre)return LB;hre=1;var e=DZ(),t=wze(),n=bze(),r=Mze(),i=ppe(),a="[object Boolean]",o="[object Date]",s="[object Map]",c="[object Number]",l="[object RegExp]",u="[object Set]",d="[object String]",f="[object Symbol]",h="[object ArrayBuffer]",y="[object DataView]",v="[object Float32Array]",k="[object Float64Array]",g="[object Int8Array]",S="[object Int16Array]",w="[object Int32Array]",C="[object Uint8Array]",_="[object Uint8ClampedArray]",A="[object Uint16Array]",j="[object Uint32Array]";function O(T,D,I){var R=T.constructor;switch(D){case h:return e(T);case a:case o:return new R(+T);case y:return t(T,I);case v:case k:case g:case S:case w:case C:case _:case A:case j:return i(T,I);case s:return new R;case c:case d:return new R(T);case l:return n(T);case u:return new R;case f:return r(T)}}return LB=O,LB}var IB,fre;function ype(){if(fre)return IB;fre=1;var e=uo(),t=Object.create,n=function(){function r(){}return function(i){if(!e(i))return{};if(t)return t(i);r.prototype=i;var a=new r;return r.prototype=void 0,a}}();return IB=n,IB}var AB,pre;function gpe(){if(pre)return AB;pre=1;var e=ype(),t=Vq(),n=Hq();function r(i){return typeof i.constructor=="function"&&!n(i)?e(t(i)):{}}return AB=r,AB}var _B,yre;function Cze(){if(yre)return _B;yre=1;var e=t0(),t=Ss(),n="[object Map]";function r(i){return t(i)&&e(i)==n}return _B=r,_B}var EB,gre;function Lze(){if(gre)return EB;gre=1;var e=Cze(),t=Bq(),n=NZ(),r=n&&n.isMap,i=r?t(r):e;return EB=i,EB}var PB,mre;function Ize(){if(mre)return PB;mre=1;var e=t0(),t=Ss(),n="[object Set]";function r(i){return t(i)&&e(i)==n}return PB=r,PB}var NB,vre;function Aze(){if(vre)return NB;vre=1;var e=Ize(),t=Bq(),n=NZ(),r=n&&n.isSet,i=r?t(r):e;return NB=i,NB}var RB,kre;function mpe(){if(kre)return RB;kre=1;var e=qq(),t=EZ(),n=Oq(),r=uze(),i=fze(),a=ape(),o=ope(),s=pze(),c=yze(),l=dpe(),u=gze(),d=t0(),f=xze(),h=Sze(),y=gpe(),v=$r(),k=e0(),g=Lze(),S=uo(),w=Aze(),C=gl(),_=Wh(),A=1,j=2,O=4,T="[object Arguments]",D="[object Array]",I="[object Boolean]",R="[object Date]",U="[object Error]",q="[object Function]",K="[object GeneratorFunction]",Z="[object Map]",$="[object Number]",B="[object Object]",V="[object RegExp]",F="[object Set]",ie="[object String]",N="[object Symbol]",P="[object WeakMap]",G="[object ArrayBuffer]",J="[object DataView]",X="[object Float32Array]",ae="[object Float64Array]",re="[object Int8Array]",fe="[object Int16Array]",ke="[object Int32Array]",Ne="[object Uint8Array]",je="[object Uint8ClampedArray]",Re="[object Uint16Array]",$e="[object Uint32Array]",ee={};ee[T]=ee[D]=ee[G]=ee[J]=ee[I]=ee[R]=ee[X]=ee[ae]=ee[re]=ee[fe]=ee[ke]=ee[Z]=ee[$]=ee[B]=ee[V]=ee[F]=ee[ie]=ee[N]=ee[Ne]=ee[je]=ee[Re]=ee[$e]=!0,ee[U]=ee[q]=ee[P]=!1;function qe(Ke,_e,Se,ot,Qe,Pe){var Ie,ye=_e&A,wt=_e&j,Me=_e&O;if(Se&&(Ie=Qe?Se(Ke,ot,Qe,Pe):Se(Ke)),Ie!==void 0)return Ie;if(!S(Ke))return Ke;var Ce=v(Ke);if(Ce){if(Ie=f(Ke),!ye)return o(Ke,Ie)}else{var De=d(Ke),Ve=De==q||De==K;if(k(Ke))return a(Ke,ye);if(De==B||De==T||Ve&&!Qe){if(Ie=wt||Ve?{}:y(Ke),!ye)return wt?c(Ke,i(Ie,Ke)):s(Ke,r(Ie,Ke))}else{if(!ee[De])return Qe?Ke:{};Ie=h(Ke,De,ye)}}Pe||(Pe=new e);var nt=Pe.get(Ke);if(nt)return nt;Pe.set(Ke,Ie),w(Ke)?Ke.forEach(function(it){Ie.add(qe(it,_e,Se,it,Ke,Pe))}):g(Ke)&&Ke.forEach(function(it,at){Ie.set(at,qe(it,_e,Se,at,Ke,Pe))});var rt=Me?wt?u:l:wt?_:C,Pt=Ce?void 0:rt(Ke);return t(Pt||Ke,function(it,at){Pt&&(at=it,it=Ke[at]),n(Ie,at,qe(it,_e,Se,at,Ke,Pe))}),Ie}return RB=qe,RB}var jB,xre;function _ze(){if(xre)return jB;xre=1;var e=mpe(),t=4;function n(r){return e(r,t)}return jB=n,jB}var TB,wre;function qZ(){if(wre)return TB;wre=1;function e(t){return function(){return t}}return TB=e,TB}var DB,bre;function Eze(){if(bre)return DB;bre=1;function e(t){return function(n,r,i){for(var a=-1,o=Object(n),s=i(n),c=s.length;c--;){var l=s[t?c:++a];if(r(o[l],l,o)===!1)break}return n}}return DB=e,DB}var qB,Mre;function zZ(){if(Mre)return qB;Mre=1;var e=Eze(),t=e();return qB=t,qB}var zB,Sre;function OZ(){if(Sre)return zB;Sre=1;var e=zZ(),t=gl();function n(r,i){return r&&e(r,i,t)}return zB=n,zB}var OB,Cre;function Pze(){if(Cre)return OB;Cre=1;var e=lc();function t(n,r){return function(i,a){if(i==null)return i;if(!e(i))return n(i,a);for(var o=i.length,s=r?o:-1,c=Object(i);(r?s--:++s<o)&&a(c[s],s,c)!==!1;);return i}}return OB=t,OB}var FB,Lre;function Uq(){if(Lre)return FB;Lre=1;var e=OZ(),t=Pze(),n=t(e);return FB=n,FB}var BB,Ire;function Gh(){if(Ire)return BB;Ire=1;function e(t){return t}return BB=e,BB}var HB,Are;function vpe(){if(Are)return HB;Are=1;var e=Gh();function t(n){return typeof n=="function"?n:e}return HB=t,HB}var VB,_re;function kpe(){if(_re)return VB;_re=1;var e=EZ(),t=Uq(),n=vpe(),r=$r();function i(a,o){var s=r(a)?e:t;return s(a,n(o))}return VB=i,VB}var UB,Ere;function xpe(){return Ere||(Ere=1,UB=kpe()),UB}var $B,Pre;function Nze(){if(Pre)return $B;Pre=1;var e=Uq();function t(n,r){var i=[];return e(n,function(a,o,s){r(a,o,s)&&i.push(a)}),i}return $B=t,$B}var WB,Nre;function Rze(){if(Nre)return WB;Nre=1;var e="__lodash_hash_undefined__";function t(n){return this.__data__.set(n,e),this}return WB=t,WB}var GB,Rre;function jze(){if(Rre)return GB;Rre=1;function e(t){return this.__data__.has(t)}return GB=e,GB}var KB,jre;function wpe(){if(jre)return KB;jre=1;var e=_Z(),t=Rze(),n=jze();function r(i){var a=-1,o=i==null?0:i.length;for(this.__data__=new e;++a<o;)this.add(i[a])}return r.prototype.add=r.prototype.push=t,r.prototype.has=n,KB=r,KB}var ZB,Tre;function Tze(){if(Tre)return ZB;Tre=1;function e(t,n){for(var r=-1,i=t==null?0:t.length;++r<i;)if(n(t[r],r,t))return!0;return!1}return ZB=e,ZB}var XB,Dre;function bpe(){if(Dre)return XB;Dre=1;function e(t,n){return t.has(n)}return XB=e,XB}var YB,qre;function Mpe(){if(qre)return YB;qre=1;var e=wpe(),t=Tze(),n=bpe(),r=1,i=2;function a(o,s,c,l,u,d){var f=c&r,h=o.length,y=s.length;if(h!=y&&!(f&&y>h))return!1;var v=d.get(o),k=d.get(s);if(v&&k)return v==s&&k==o;var g=-1,S=!0,w=c&i?new e:void 0;for(d.set(o,s),d.set(s,o);++g<h;){var C=o[g],_=s[g];if(l)var A=f?l(_,C,g,s,o,d):l(C,_,g,o,s,d);if(A!==void 0){if(A)continue;S=!1;break}if(w){if(!t(s,function(j,O){if(!n(w,O)&&(C===j||u(C,j,c,l,d)))return w.push(O)})){S=!1;break}}else if(!(C===_||u(C,_,c,l,d))){S=!1;break}}return d.delete(o),d.delete(s),S}return YB=a,YB}var JB,zre;function Dze(){if(zre)return JB;zre=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(i,a){r[++n]=[a,i]}),r}return JB=e,JB}var QB,Ore;function FZ(){if(Ore)return QB;Ore=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(i){r[++n]=i}),r}return QB=e,QB}var eH,Fre;function qze(){if(Fre)return eH;Fre=1;var e=Qf(),t=fpe(),n=Jf(),r=Mpe(),i=Dze(),a=FZ(),o=1,s=2,c="[object Boolean]",l="[object Date]",u="[object Error]",d="[object Map]",f="[object Number]",h="[object RegExp]",y="[object Set]",v="[object String]",k="[object Symbol]",g="[object ArrayBuffer]",S="[object DataView]",w=e?e.prototype:void 0,C=w?w.valueOf:void 0;function _(A,j,O,T,D,I,R){switch(O){case S:if(A.byteLength!=j.byteLength||A.byteOffset!=j.byteOffset)return!1;A=A.buffer,j=j.buffer;case g:return!(A.byteLength!=j.byteLength||!I(new t(A),new t(j)));case c:case l:case f:return n(+A,+j);case u:return A.name==j.name&&A.message==j.message;case h:case v:return A==j+"";case d:var U=i;case y:var q=T&o;if(U||(U=a),A.size!=j.size&&!q)return!1;var K=R.get(A);if(K)return K==j;T|=s,R.set(A,j);var Z=r(U(A),U(j),T,D,I,R);return R.delete(A),Z;case k:if(C)return C.call(A)==C.call(j)}return!1}return eH=_,eH}var tH,Bre;function zze(){if(Bre)return tH;Bre=1;var e=dpe(),t=1,n=Object.prototype,r=n.hasOwnProperty;function i(a,o,s,c,l,u){var d=s&t,f=e(a),h=f.length,y=e(o),v=y.length;if(h!=v&&!d)return!1;for(var k=h;k--;){var g=f[k];if(!(d?g in o:r.call(o,g)))return!1}var S=u.get(a),w=u.get(o);if(S&&w)return S==o&&w==a;var C=!0;u.set(a,o),u.set(o,a);for(var _=d;++k<h;){g=f[k];var A=a[g],j=o[g];if(c)var O=d?c(j,A,g,o,a,u):c(A,j,g,a,o,u);if(!(O===void 0?A===j||l(A,j,s,c,u):O)){C=!1;break}_||(_=g=="constructor")}if(C&&!_){var T=a.constructor,D=o.constructor;T!=D&&"constructor"in a&&"constructor"in o&&!(typeof T=="function"&&T instanceof T&&typeof D=="function"&&D instanceof D)&&(C=!1)}return u.delete(a),u.delete(o),C}return tH=i,tH}var nH,Hre;function Oze(){if(Hre)return nH;Hre=1;var e=qq(),t=Mpe(),n=qze(),r=zze(),i=t0(),a=$r(),o=e0(),s=ug(),c=1,l="[object Arguments]",u="[object Array]",d="[object Object]",f=Object.prototype,h=f.hasOwnProperty;function y(v,k,g,S,w,C){var _=a(v),A=a(k),j=_?u:i(v),O=A?u:i(k);j=j==l?d:j,O=O==l?d:O;var T=j==d,D=O==d,I=j==O;if(I&&o(v)){if(!o(k))return!1;_=!0,T=!1}if(I&&!T)return C||(C=new e),_||s(v)?t(v,k,g,S,w,C):n(v,k,j,g,S,w,C);if(!(g&c)){var R=T&&h.call(v,"__wrapped__"),U=D&&h.call(k,"__wrapped__");if(R||U){var q=R?v.value():v,K=U?k.value():k;return C||(C=new e),w(q,K,g,S,C)}}return I?(C||(C=new e),r(v,k,g,S,w,C)):!1}return nH=y,nH}var rH,Vre;function Spe(){if(Vre)return rH;Vre=1;var e=Oze(),t=Ss();function n(r,i,a,o,s){return r===i?!0:r==null||i==null||!t(r)&&!t(i)?r!==r&&i!==i:e(r,i,a,o,n,s)}return rH=n,rH}var iH,Ure;function Fze(){if(Ure)return iH;Ure=1;var e=qq(),t=Spe(),n=1,r=2;function i(a,o,s,c){var l=s.length,u=l,d=!c;if(a==null)return!u;for(a=Object(a);l--;){var f=s[l];if(d&&f[2]?f[1]!==a[f[0]]:!(f[0]in a))return!1}for(;++l<u;){f=s[l];var h=f[0],y=a[h],v=f[1];if(d&&f[2]){if(y===void 0&&!(h in a))return!1}else{var k=new e;if(c)var g=c(y,v,h,a,o,k);if(!(g===void 0?t(v,y,n|r,c,k):g))return!1}}return!0}return iH=i,iH}var aH,$re;function Cpe(){if($re)return aH;$re=1;var e=uo();function t(n){return n===n&&!e(n)}return aH=t,aH}var oH,Wre;function Bze(){if(Wre)return oH;Wre=1;var e=Cpe(),t=gl();function n(r){for(var i=t(r),a=i.length;a--;){var o=i[a],s=r[o];i[a]=[o,s,e(s)]}return i}return oH=n,oH}var sH,Gre;function Lpe(){if(Gre)return sH;Gre=1;function e(t,n){return function(r){return r==null?!1:r[t]===n&&(n!==void 0||t in Object(r))}}return sH=e,sH}var cH,Kre;function Hze(){if(Kre)return cH;Kre=1;var e=Fze(),t=Bze(),n=Lpe();function r(i){var a=t(i);return a.length==1&&a[0][2]?n(a[0][0],a[0][1]):function(o){return o===i||e(o,i,a)}}return cH=r,cH}var lH,Zre;function n0(){if(Zre)return lH;Zre=1;var e=Uh(),t=Ss(),n="[object Symbol]";function r(i){return typeof i=="symbol"||t(i)&&e(i)==n}return lH=r,lH}var uH,Xre;function BZ(){if(Xre)return uH;Xre=1;var e=$r(),t=n0(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;function i(a,o){if(e(a))return!1;var s=typeof a;return s=="number"||s=="symbol"||s=="boolean"||a==null||t(a)?!0:r.test(a)||!n.test(a)||o!=null&&a in Object(o)}return uH=i,uH}var dH,Yre;function Vze(){if(Yre)return dH;Yre=1;var e=_Z(),t="Expected a function";function n(r,i){if(typeof r!="function"||i!=null&&typeof i!="function")throw new TypeError(t);var a=function(){var o=arguments,s=i?i.apply(this,o):o[0],c=a.cache;if(c.has(s))return c.get(s);var l=r.apply(this,o);return a.cache=c.set(s,l)||c,l};return a.cache=new(n.Cache||e),a}return n.Cache=e,dH=n,dH}var hH,Jre;function Uze(){if(Jre)return hH;Jre=1;var e=Vze(),t=500;function n(r){var i=e(r,function(o){return a.size===t&&a.clear(),o}),a=i.cache;return i}return hH=n,hH}var fH,Qre;function $ze(){if(Qre)return fH;Qre=1;var e=Uze(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n=/\\(\\)?/g,r=e(function(i){var a=[];return i.charCodeAt(0)===46&&a.push(""),i.replace(t,function(o,s,c,l){a.push(c?l.replace(n,"$1"):s||o)}),a});return fH=r,fH}var pH,eie;function $q(){if(eie)return pH;eie=1;function e(t,n){for(var r=-1,i=t==null?0:t.length,a=Array(i);++r<i;)a[r]=n(t[r],r,t);return a}return pH=e,pH}var yH,tie;function Wze(){if(tie)return yH;tie=1;var e=Qf(),t=$q(),n=$r(),r=n0(),i=e?e.prototype:void 0,a=i?i.toString:void 0;function o(s){if(typeof s=="string")return s;if(n(s))return t(s,o)+"";if(r(s))return a?a.call(s):"";var c=s+"";return c=="0"&&1/s==-1/0?"-0":c}return yH=o,yH}var gH,nie;function Ipe(){if(nie)return gH;nie=1;var e=Wze();function t(n){return n==null?"":e(n)}return gH=t,gH}var mH,rie;function Wq(){if(rie)return mH;rie=1;var e=$r(),t=BZ(),n=$ze(),r=Ipe();function i(a,o){return e(a)?a:t(a,o)?[a]:n(r(a))}return mH=i,mH}var vH,iie;function dg(){if(iie)return vH;iie=1;var e=n0();function t(n){if(typeof n=="string"||e(n))return n;var r=n+"";return r=="0"&&1/n==-1/0?"-0":r}return vH=t,vH}var kH,aie;function Gq(){if(aie)return kH;aie=1;var e=Wq(),t=dg();function n(r,i){i=e(i,r);for(var a=0,o=i.length;r!=null&&a<o;)r=r[t(i[a++])];return a&&a==o?r:void 0}return kH=n,kH}var xH,oie;function Gze(){if(oie)return xH;oie=1;var e=Gq();function t(n,r,i){var a=n==null?void 0:e(n,r);return a===void 0?i:a}return xH=t,xH}var wH,sie;function Kze(){if(sie)return wH;sie=1;function e(t,n){return t!=null&&n in Object(t)}return wH=e,wH}var bH,cie;function Ape(){if(cie)return bH;cie=1;var e=Wq(),t=lg(),n=$r(),r=Fq(),i=PZ(),a=dg();function o(s,c,l){c=e(c,s);for(var u=-1,d=c.length,f=!1;++u<d;){var h=a(c[u]);if(!(f=s!=null&&l(s,h)))break;s=s[h]}return f||++u!=d?f:(d=s==null?0:s.length,!!d&&i(d)&&r(h,d)&&(n(s)||t(s)))}return bH=o,bH}var MH,lie;function _pe(){if(lie)return MH;lie=1;var e=Kze(),t=Ape();function n(r,i){return r!=null&&t(r,i,e)}return MH=n,MH}var SH,uie;function Zze(){if(uie)return SH;uie=1;var e=Spe(),t=Gze(),n=_pe(),r=BZ(),i=Cpe(),a=Lpe(),o=dg(),s=1,c=2;function l(u,d){return r(u)&&i(d)?a(o(u),d):function(f){var h=t(f,u);return h===void 0&&h===d?n(f,u):e(d,h,s|c)}}return SH=l,SH}var CH,die;function Epe(){if(die)return CH;die=1;function e(t){return function(n){return n==null?void 0:n[t]}}return CH=e,CH}var LH,hie;function Xze(){if(hie)return LH;hie=1;var e=Gq();function t(n){return function(r){return e(r,n)}}return LH=t,LH}var IH,fie;function Yze(){if(fie)return IH;fie=1;var e=Epe(),t=Xze(),n=BZ(),r=dg();function i(a){return n(a)?e(r(a)):t(a)}return IH=i,IH}var AH,pie;function uc(){if(pie)return AH;pie=1;var e=Hze(),t=Zze(),n=Gh(),r=$r(),i=Yze();function a(o){return typeof o=="function"?o:o==null?n:typeof o=="object"?r(o)?t(o[0],o[1]):e(o):i(o)}return AH=a,AH}var _H,yie;function Ppe(){if(yie)return _H;yie=1;var e=spe(),t=Nze(),n=uc(),r=$r();function i(a,o){var s=r(a)?e:t;return s(a,n(o,3))}return _H=i,_H}var EH,gie;function Jze(){if(gie)return EH;gie=1;var e=Object.prototype,t=e.hasOwnProperty;function n(r,i){return r!=null&&t.call(r,i)}return EH=n,EH}var PH,mie;function Npe(){if(mie)return PH;mie=1;var e=Jze(),t=Ape();function n(r,i){return r!=null&&t(r,i,e)}return PH=n,PH}var NH,vie;function Qze(){if(vie)return NH;vie=1;var e=RZ(),t=t0(),n=lg(),r=$r(),i=lc(),a=e0(),o=Hq(),s=ug(),c="[object Map]",l="[object Set]",u=Object.prototype,d=u.hasOwnProperty;function f(h){if(h==null)return!0;if(i(h)&&(r(h)||typeof h=="string"||typeof h.splice=="function"||a(h)||s(h)||n(h)))return!h.length;var y=t(h);if(y==c||y==l)return!h.size;if(o(h))return!e(h).length;for(var v in h)if(d.call(h,v))return!1;return!0}return NH=f,NH}var RH,kie;function Rpe(){if(kie)return RH;kie=1;function e(t){return t===void 0}return RH=e,RH}var jH,xie;function jpe(){if(xie)return jH;xie=1;var e=Uq(),t=lc();function n(r,i){var a=-1,o=t(r)?Array(r.length):[];return e(r,function(s,c,l){o[++a]=i(s,c,l)}),o}return jH=n,jH}var TH,wie;function Tpe(){if(wie)return TH;wie=1;var e=$q(),t=uc(),n=jpe(),r=$r();function i(a,o){var s=r(a)?e:n;return s(a,t(o,3))}return TH=i,TH}var DH,bie;function eOe(){if(bie)return DH;bie=1;function e(t,n,r,i){var a=-1,o=t==null?0:t.length;for(i&&o&&(r=t[++a]);++a<o;)r=n(r,t[a],a,t);return r}return DH=e,DH}var qH,Mie;function tOe(){if(Mie)return qH;Mie=1;function e(t,n,r,i,a){return a(t,function(o,s,c){r=i?(i=!1,o):n(r,o,s,c)}),r}return qH=e,qH}var zH,Sie;function Dpe(){if(Sie)return zH;Sie=1;var e=eOe(),t=Uq(),n=uc(),r=tOe(),i=$r();function a(o,s,c){var l=i(o)?e:r,u=arguments.length<3;return l(o,n(s,4),c,u,t)}return zH=a,zH}var OH,Cie;function nOe(){if(Cie)return OH;Cie=1;var e=Uh(),t=$r(),n=Ss(),r="[object String]";function i(a){return typeof a=="string"||!t(a)&&n(a)&&e(a)==r}return OH=i,OH}var FH,Lie;function rOe(){if(Lie)return FH;Lie=1;var e=Epe(),t=e("length");return FH=t,FH}var BH,Iie;function iOe(){if(Iie)return BH;Iie=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",i=t+n+r,a="\\ufe0e\\ufe0f",o="\\u200d",s=RegExp("["+o+e+i+a+"]");function c(l){return s.test(l)}return BH=c,BH}var HH,Aie;function aOe(){if(Aie)return HH;Aie=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",i=t+n+r,a="\\ufe0e\\ufe0f",o="["+e+"]",s="["+i+"]",c="\\ud83c[\\udffb-\\udfff]",l="(?:"+s+"|"+c+")",u="[^"+e+"]",d="(?:\\ud83c[\\udde6-\\uddff]){2}",f="[\\ud800-\\udbff][\\udc00-\\udfff]",h="\\u200d",y=l+"?",v="["+a+"]?",k="(?:"+h+"(?:"+[u,d,f].join("|")+")"+v+y+")*",g=v+y+k,S="(?:"+[u+s+"?",s,d,f,o].join("|")+")",w=RegExp(c+"(?="+c+")|"+S+g,"g");function C(_){for(var A=w.lastIndex=0;w.test(_);)++A;return A}return HH=C,HH}var VH,_ie;function oOe(){if(_ie)return VH;_ie=1;var e=rOe(),t=iOe(),n=aOe();function r(i){return t(i)?n(i):e(i)}return VH=r,VH}var UH,Eie;function sOe(){if(Eie)return UH;Eie=1;var e=RZ(),t=t0(),n=lc(),r=nOe(),i=oOe(),a="[object Map]",o="[object Set]";function s(c){if(c==null)return 0;if(n(c))return r(c)?i(c):c.length;var l=t(c);return l==a||l==o?c.size:e(c).length}return UH=s,UH}var $H,Pie;function cOe(){if(Pie)return $H;Pie=1;var e=EZ(),t=ype(),n=OZ(),r=uc(),i=Vq(),a=$r(),o=e0(),s=sg(),c=uo(),l=ug();function u(d,f,h){var y=a(d),v=y||o(d)||l(d);if(f=r(f,4),h==null){var k=d&&d.constructor;v?h=y?new k:[]:c(d)?h=s(k)?t(i(d)):{}:h={}}return(v?e:n)(d,function(g,S,w){return f(h,g,S,w)}),h}return $H=u,$H}var WH,Nie;function lOe(){if(Nie)return WH;Nie=1;var e=Qf(),t=lg(),n=$r(),r=e?e.isConcatSpreadable:void 0;function i(a){return n(a)||t(a)||!!(r&&a&&a[r])}return WH=i,WH}var GH,Rie;function HZ(){if(Rie)return GH;Rie=1;var e=TZ(),t=lOe();function n(r,i,a,o,s){var c=-1,l=r.length;for(a||(a=t),s||(s=[]);++c<l;){var u=r[c];i>0&&a(u)?i>1?n(u,i-1,a,o,s):e(s,u):o||(s[s.length]=u)}return s}return GH=n,GH}var KH,jie;function uOe(){if(jie)return KH;jie=1;function e(t,n,r){switch(r.length){case 0:return t.call(n);case 1:return t.call(n,r[0]);case 2:return t.call(n,r[0],r[1]);case 3:return t.call(n,r[0],r[1],r[2])}return t.apply(n,r)}return KH=e,KH}var ZH,Tie;function qpe(){if(Tie)return ZH;Tie=1;var e=uOe(),t=Math.max;function n(r,i,a){return i=t(i===void 0?r.length-1:i,0),function(){for(var o=arguments,s=-1,c=t(o.length-i,0),l=Array(c);++s<c;)l[s]=o[i+s];s=-1;for(var u=Array(i+1);++s<i;)u[s]=o[s];return u[i]=a(l),e(r,this,u)}}return ZH=n,ZH}var XH,Die;function dOe(){if(Die)return XH;Die=1;var e=qZ(),t=npe(),n=Gh(),r=t?function(i,a){return t(i,"toString",{configurable:!0,enumerable:!1,value:e(a),writable:!0})}:n;return XH=r,XH}var YH,qie;function hOe(){if(qie)return YH;qie=1;var e=800,t=16,n=Date.now;function r(i){var a=0,o=0;return function(){var s=n(),c=t-(s-o);if(o=s,c>0){if(++a>=e)return arguments[0]}else a=0;return i.apply(void 0,arguments)}}return YH=r,YH}var JH,zie;function zpe(){if(zie)return JH;zie=1;var e=dOe(),t=hOe(),n=t(e);return JH=n,JH}var QH,Oie;function Kq(){if(Oie)return QH;Oie=1;var e=Gh(),t=qpe(),n=zpe();function r(i,a){return n(t(i,a,e),i+"")}return QH=r,QH}var eV,Fie;function Ope(){if(Fie)return eV;Fie=1;function e(t,n,r,i){for(var a=t.length,o=r+(i?1:-1);i?o--:++o<a;)if(n(t[o],o,t))return o;return-1}return eV=e,eV}var tV,Bie;function fOe(){if(Bie)return tV;Bie=1;function e(t){return t!==t}return tV=e,tV}var nV,Hie;function pOe(){if(Hie)return nV;Hie=1;function e(t,n,r){for(var i=r-1,a=t.length;++i<a;)if(t[i]===n)return i;return-1}return nV=e,nV}var rV,Vie;function yOe(){if(Vie)return rV;Vie=1;var e=Ope(),t=fOe(),n=pOe();function r(i,a,o){return a===a?n(i,a,o):e(i,t,o)}return rV=r,rV}var iV,Uie;function gOe(){if(Uie)return iV;Uie=1;var e=yOe();function t(n,r){var i=n==null?0:n.length;return!!i&&e(n,r,0)>-1}return iV=t,iV}var aV,$ie;function mOe(){if($ie)return aV;$ie=1;function e(t,n,r){for(var i=-1,a=t==null?0:t.length;++i<a;)if(r(n,t[i]))return!0;return!1}return aV=e,aV}var oV,Wie;function vOe(){if(Wie)return oV;Wie=1;function e(){}return oV=e,oV}var sV,Gie;function kOe(){if(Gie)return sV;Gie=1;var e=hpe(),t=vOe(),n=FZ(),r=1/0,i=e&&1/n(new e([,-0]))[1]==r?function(a){return new e(a)}:t;return sV=i,sV}var cV,Kie;function xOe(){if(Kie)return cV;Kie=1;var e=wpe(),t=gOe(),n=mOe(),r=bpe(),i=kOe(),a=FZ(),o=200;function s(c,l,u){var d=-1,f=t,h=c.length,y=!0,v=[],k=v;if(u)y=!1,f=n;else if(h>=o){var g=l?null:i(c);if(g)return a(g);y=!1,f=r,k=new e}else k=l?[]:v;e:for(;++d<h;){var S=c[d],w=l?l(S):S;if(S=u||S!==0?S:0,y&&w===w){for(var C=k.length;C--;)if(k[C]===w)continue e;l&&k.push(w),v.push(S)}else f(k,w,u)||(k!==v&&k.push(w),v.push(S))}return v}return cV=s,cV}var lV,Zie;function Fpe(){if(Zie)return lV;Zie=1;var e=lc(),t=Ss();function n(r){return t(r)&&e(r)}return lV=n,lV}var uV,Xie;function wOe(){if(Xie)return uV;Xie=1;var e=HZ(),t=Kq(),n=xOe(),r=Fpe(),i=t(function(a){return n(e(a,1,r,!0))});return uV=i,uV}var dV,Yie;function bOe(){if(Yie)return dV;Yie=1;var e=$q();function t(n,r){return e(r,function(i){return n[i]})}return dV=t,dV}var hV,Jie;function Bpe(){if(Jie)return hV;Jie=1;var e=bOe(),t=gl();function n(r){return r==null?[]:e(r,t(r))}return hV=n,hV}var fV,Qie;function ho(){if(Qie)return fV;Qie=1;var e;if(typeof IZ=="function")try{e={clone:_ze(),constant:qZ(),each:xpe(),filter:Ppe(),has:Npe(),isArray:$r(),isEmpty:Qze(),isFunction:sg(),isUndefined:Rpe(),keys:gl(),map:Tpe(),reduce:Dpe(),size:sOe(),transform:cOe(),union:wOe(),values:Bpe()}}catch{}return e||(e=window._),fV=e,fV}var pV,eae;function VZ(){if(eae)return pV;eae=1;var e=ho();pV=i;var t="\0",n="\0",r="";function i(u){this._isDirected=e.has(u,"directed")?u.directed:!0,this._isMultigraph=e.has(u,"multigraph")?u.multigraph:!1,this._isCompound=e.has(u,"compound")?u.compound:!1,this._label=void 0,this._defaultNodeLabelFn=e.constant(void 0),this._defaultEdgeLabelFn=e.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[n]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}i.prototype._nodeCount=0,i.prototype._edgeCount=0,i.prototype.isDirected=function(){return this._isDirected},i.prototype.isMultigraph=function(){return this._isMultigraph},i.prototype.isCompound=function(){return this._isCompound},i.prototype.setGraph=function(u){return this._label=u,this},i.prototype.graph=function(){return this._label},i.prototype.setDefaultNodeLabel=function(u){return e.isFunction(u)||(u=e.constant(u)),this._defaultNodeLabelFn=u,this},i.prototype.nodeCount=function(){return this._nodeCount},i.prototype.nodes=function(){return e.keys(this._nodes)},i.prototype.sources=function(){var u=this;return e.filter(this.nodes(),function(d){return e.isEmpty(u._in[d])})},i.prototype.sinks=function(){var u=this;return e.filter(this.nodes(),function(d){return e.isEmpty(u._out[d])})},i.prototype.setNodes=function(u,d){var f=arguments,h=this;return e.each(u,function(y){f.length>1?h.setNode(y,d):h.setNode(y)}),this},i.prototype.setNode=function(u,d){return e.has(this._nodes,u)?(arguments.length>1&&(this._nodes[u]=d),this):(this._nodes[u]=arguments.length>1?d:this._defaultNodeLabelFn(u),this._isCompound&&(this._parent[u]=n,this._children[u]={},this._children[n][u]=!0),this._in[u]={},this._preds[u]={},this._out[u]={},this._sucs[u]={},++this._nodeCount,this)},i.prototype.node=function(u){return this._nodes[u]},i.prototype.hasNode=function(u){return e.has(this._nodes,u)},i.prototype.removeNode=function(u){var d=this;if(e.has(this._nodes,u)){var f=function(h){d.removeEdge(d._edgeObjs[h])};delete this._nodes[u],this._isCompound&&(this._removeFromParentsChildList(u),delete this._parent[u],e.each(this.children(u),function(h){d.setParent(h)}),delete this._children[u]),e.each(e.keys(this._in[u]),f),delete this._in[u],delete this._preds[u],e.each(e.keys(this._out[u]),f),delete this._out[u],delete this._sucs[u],--this._nodeCount}return this},i.prototype.setParent=function(u,d){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(e.isUndefined(d))d=n;else{d+="";for(var f=d;!e.isUndefined(f);f=this.parent(f))if(f===u)throw new Error("Setting "+d+" as parent of "+u+" would create a cycle");this.setNode(d)}return this.setNode(u),this._removeFromParentsChildList(u),this._parent[u]=d,this._children[d][u]=!0,this},i.prototype._removeFromParentsChildList=function(u){delete this._children[this._parent[u]][u]},i.prototype.parent=function(u){if(this._isCompound){var d=this._parent[u];if(d!==n)return d}},i.prototype.children=function(u){if(e.isUndefined(u)&&(u=n),this._isCompound){var d=this._children[u];if(d)return e.keys(d)}else{if(u===n)return this.nodes();if(this.hasNode(u))return[]}},i.prototype.predecessors=function(u){var d=this._preds[u];if(d)return e.keys(d)},i.prototype.successors=function(u){var d=this._sucs[u];if(d)return e.keys(d)},i.prototype.neighbors=function(u){var d=this.predecessors(u);if(d)return e.union(d,this.successors(u))},i.prototype.isLeaf=function(u){var d;return this.isDirected()?d=this.successors(u):d=this.neighbors(u),d.length===0},i.prototype.filterNodes=function(u){var d=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});d.setGraph(this.graph());var f=this;e.each(this._nodes,function(v,k){u(k)&&d.setNode(k,v)}),e.each(this._edgeObjs,function(v){d.hasNode(v.v)&&d.hasNode(v.w)&&d.setEdge(v,f.edge(v))});var h={};function y(v){var k=f.parent(v);return k===void 0||d.hasNode(k)?(h[v]=k,k):k in h?h[k]:y(k)}return this._isCompound&&e.each(d.nodes(),function(v){d.setParent(v,y(v))}),d},i.prototype.setDefaultEdgeLabel=function(u){return e.isFunction(u)||(u=e.constant(u)),this._defaultEdgeLabelFn=u,this},i.prototype.edgeCount=function(){return this._edgeCount},i.prototype.edges=function(){return e.values(this._edgeObjs)},i.prototype.setPath=function(u,d){var f=this,h=arguments;return e.reduce(u,function(y,v){return h.length>1?f.setEdge(y,v,d):f.setEdge(y,v),v}),this},i.prototype.setEdge=function(){var u,d,f,h,y=!1,v=arguments[0];typeof v=="object"&&v!==null&&"v"in v?(u=v.v,d=v.w,f=v.name,arguments.length===2&&(h=arguments[1],y=!0)):(u=v,d=arguments[1],f=arguments[3],arguments.length>2&&(h=arguments[2],y=!0)),u=""+u,d=""+d,e.isUndefined(f)||(f=""+f);var k=s(this._isDirected,u,d,f);if(e.has(this._edgeLabels,k))return y&&(this._edgeLabels[k]=h),this;if(!e.isUndefined(f)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(u),this.setNode(d),this._edgeLabels[k]=y?h:this._defaultEdgeLabelFn(u,d,f);var g=c(this._isDirected,u,d,f);return u=g.v,d=g.w,Object.freeze(g),this._edgeObjs[k]=g,a(this._preds[d],u),a(this._sucs[u],d),this._in[d][k]=g,this._out[u][k]=g,this._edgeCount++,this},i.prototype.edge=function(u,d,f){var h=arguments.length===1?l(this._isDirected,arguments[0]):s(this._isDirected,u,d,f);return this._edgeLabels[h]},i.prototype.hasEdge=function(u,d,f){var h=arguments.length===1?l(this._isDirected,arguments[0]):s(this._isDirected,u,d,f);return e.has(this._edgeLabels,h)},i.prototype.removeEdge=function(u,d,f){var h=arguments.length===1?l(this._isDirected,arguments[0]):s(this._isDirected,u,d,f),y=this._edgeObjs[h];return y&&(u=y.v,d=y.w,delete this._edgeLabels[h],delete this._edgeObjs[h],o(this._preds[d],u),o(this._sucs[u],d),delete this._in[d][h],delete this._out[u][h],this._edgeCount--),this},i.prototype.inEdges=function(u,d){var f=this._in[u];if(f){var h=e.values(f);return d?e.filter(h,function(y){return y.v===d}):h}},i.prototype.outEdges=function(u,d){var f=this._out[u];if(f){var h=e.values(f);return d?e.filter(h,function(y){return y.w===d}):h}},i.prototype.nodeEdges=function(u,d){var f=this.inEdges(u,d);if(f)return f.concat(this.outEdges(u,d))};function a(u,d){u[d]?u[d]++:u[d]=1}function o(u,d){--u[d]||delete u[d]}function s(u,d,f,h){var y=""+d,v=""+f;if(!u&&y>v){var k=y;y=v,v=k}return y+r+v+r+(e.isUndefined(h)?t:h)}function c(u,d,f,h){var y=""+d,v=""+f;if(!u&&y>v){var k=y;y=v,v=k}var g={v:y,w:v};return h&&(g.name=h),g}function l(u,d){return s(u,d.v,d.w,d.name)}return pV}var yV,tae;function MOe(){return tae||(tae=1,yV="2.1.8"),yV}var gV,nae;function SOe(){return nae||(nae=1,gV={Graph:VZ(),version:MOe()}),gV}var mV,rae;function COe(){if(rae)return mV;rae=1;var e=ho(),t=VZ();mV={write:n,read:a};function n(o){var s={options:{directed:o.isDirected(),multigraph:o.isMultigraph(),compound:o.isCompound()},nodes:r(o),edges:i(o)};return e.isUndefined(o.graph())||(s.value=e.clone(o.graph())),s}function r(o){return e.map(o.nodes(),function(s){var c=o.node(s),l=o.parent(s),u={v:s};return e.isUndefined(c)||(u.value=c),e.isUndefined(l)||(u.parent=l),u})}function i(o){return e.map(o.edges(),function(s){var c=o.edge(s),l={v:s.v,w:s.w};return e.isUndefined(s.name)||(l.name=s.name),e.isUndefined(c)||(l.value=c),l})}function a(o){var s=new t(o.options).setGraph(o.value);return e.each(o.nodes,function(c){s.setNode(c.v,c.value),c.parent&&s.setParent(c.v,c.parent)}),e.each(o.edges,function(c){s.setEdge({v:c.v,w:c.w,name:c.name},c.value)}),s}return mV}var vV,iae;function LOe(){if(iae)return vV;iae=1;var e=ho();vV=t;function t(n){var r={},i=[],a;function o(s){e.has(r,s)||(r[s]=!0,a.push(s),e.each(n.successors(s),o),e.each(n.predecessors(s),o))}return e.each(n.nodes(),function(s){a=[],o(s),a.length&&i.push(a)}),i}return vV}var kV,aae;function Hpe(){if(aae)return kV;aae=1;var e=ho();kV=t;function t(){this._arr=[],this._keyIndices={}}return t.prototype.size=function(){return this._arr.length},t.prototype.keys=function(){return this._arr.map(function(n){return n.key})},t.prototype.has=function(n){return e.has(this._keyIndices,n)},t.prototype.priority=function(n){var r=this._keyIndices[n];if(r!==void 0)return this._arr[r].priority},t.prototype.min=function(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key},t.prototype.add=function(n,r){var i=this._keyIndices;if(n=String(n),!e.has(i,n)){var a=this._arr,o=a.length;return i[n]=o,a.push({key:n,priority:r}),this._decrease(o),!0}return!1},t.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var n=this._arr.pop();return delete this._keyIndices[n.key],this._heapify(0),n.key},t.prototype.decrease=function(n,r){var i=this._keyIndices[n];if(r>this._arr[i].priority)throw new Error("New priority is greater than current priority. Key: "+n+" Old: "+this._arr[i].priority+" New: "+r);this._arr[i].priority=r,this._decrease(i)},t.prototype._heapify=function(n){var r=this._arr,i=2*n,a=i+1,o=n;i<r.length&&(o=r[i].priority<r[o].priority?i:o,a<r.length&&(o=r[a].priority<r[o].priority?a:o),o!==n&&(this._swap(n,o),this._heapify(o)))},t.prototype._decrease=function(n){for(var r=this._arr,i=r[n].priority,a;n!==0&&(a=n>>1,!(r[a].priority<i));)this._swap(n,a),n=a},t.prototype._swap=function(n,r){var i=this._arr,a=this._keyIndices,o=i[n],s=i[r];i[n]=s,i[r]=o,a[s.key]=n,a[o.key]=r},kV}var xV,oae;function Vpe(){if(oae)return xV;oae=1;var e=ho(),t=Hpe();xV=r;var n=e.constant(1);function r(a,o,s,c){return i(a,String(o),s||n,c||function(l){return a.outEdges(l)})}function i(a,o,s,c){var l={},u=new t,d,f,h=function(y){var v=y.v!==d?y.v:y.w,k=l[v],g=s(y),S=f.distance+g;if(g<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+y+" Weight: "+g);S<k.distance&&(k.distance=S,k.predecessor=d,u.decrease(v,S))};for(a.nodes().forEach(function(y){var v=y===o?0:Number.POSITIVE_INFINITY;l[y]={distance:v},u.add(y,v)});u.size()>0&&(d=u.removeMin(),f=l[d],f.distance!==Number.POSITIVE_INFINITY);)c(d).forEach(h);return l}return xV}var wV,sae;function IOe(){if(sae)return wV;sae=1;var e=Vpe(),t=ho();wV=n;function n(r,i,a){return t.transform(r.nodes(),function(o,s){o[s]=e(r,s,i,a)},{})}return wV}var bV,cae;function Upe(){if(cae)return bV;cae=1;var e=ho();bV=t;function t(n){var r=0,i=[],a={},o=[];function s(c){var l=a[c]={onStack:!0,lowlink:r,index:r++};if(i.push(c),n.successors(c).forEach(function(f){e.has(a,f)?a[f].onStack&&(l.lowlink=Math.min(l.lowlink,a[f].index)):(s(f),l.lowlink=Math.min(l.lowlink,a[f].lowlink))}),l.lowlink===l.index){var u=[],d;do d=i.pop(),a[d].onStack=!1,u.push(d);while(c!==d);o.push(u)}}return n.nodes().forEach(function(c){e.has(a,c)||s(c)}),o}return bV}var MV,lae;function AOe(){if(lae)return MV;lae=1;var e=ho(),t=Upe();MV=n;function n(r){return e.filter(t(r),function(i){return i.length>1||i.length===1&&r.hasEdge(i[0],i[0])})}return MV}var SV,uae;function _Oe(){if(uae)return SV;uae=1;var e=ho();SV=n;var t=e.constant(1);function n(i,a,o){return r(i,a||t,o||function(s){return i.outEdges(s)})}function r(i,a,o){var s={},c=i.nodes();return c.forEach(function(l){s[l]={},s[l][l]={distance:0},c.forEach(function(u){l!==u&&(s[l][u]={distance:Number.POSITIVE_INFINITY})}),o(l).forEach(function(u){var d=u.v===l?u.w:u.v,f=a(u);s[l][d]={distance:f,predecessor:l}})}),c.forEach(function(l){var u=s[l];c.forEach(function(d){var f=s[d];c.forEach(function(h){var y=f[l],v=u[h],k=f[h],g=y.distance+v.distance;g<k.distance&&(k.distance=g,k.predecessor=v.predecessor)})})}),s}return SV}var CV,dae;function $pe(){if(dae)return CV;dae=1;var e=ho();CV=t,t.CycleException=n;function t(r){var i={},a={},o=[];function s(c){if(e.has(a,c))throw new n;e.has(i,c)||(a[c]=!0,i[c]=!0,e.each(r.predecessors(c),s),delete a[c],o.push(c))}if(e.each(r.sinks(),s),e.size(i)!==r.nodeCount())throw new n;return o}function n(){}return n.prototype=new Error,CV}var LV,hae;function EOe(){if(hae)return LV;hae=1;var e=$pe();LV=t;function t(n){try{e(n)}catch(r){if(r instanceof e.CycleException)return!1;throw r}return!0}return LV}var IV,fae;function Wpe(){if(fae)return IV;fae=1;var e=ho();IV=t;function t(r,i,a){e.isArray(i)||(i=[i]);var o=(r.isDirected()?r.successors:r.neighbors).bind(r),s=[],c={};return e.each(i,function(l){if(!r.hasNode(l))throw new Error("Graph does not have node: "+l);n(r,l,a==="post",c,o,s)}),s}function n(r,i,a,o,s,c){e.has(o,i)||(o[i]=!0,a||c.push(i),e.each(s(i),function(l){n(r,l,a,o,s,c)}),a&&c.push(i))}return IV}var AV,pae;function POe(){if(pae)return AV;pae=1;var e=Wpe();AV=t;function t(n,r){return e(n,r,"post")}return AV}var _V,yae;function NOe(){if(yae)return _V;yae=1;var e=Wpe();_V=t;function t(n,r){return e(n,r,"pre")}return _V}var EV,gae;function ROe(){if(gae)return EV;gae=1;var e=ho(),t=VZ(),n=Hpe();EV=r;function r(i,a){var o=new t,s={},c=new n,l;function u(f){var h=f.v===l?f.w:f.v,y=c.priority(h);if(y!==void 0){var v=a(f);v<y&&(s[h]=l,c.decrease(h,v))}}if(i.nodeCount()===0)return o;e.each(i.nodes(),function(f){c.add(f,Number.POSITIVE_INFINITY),o.setNode(f)}),c.decrease(i.nodes()[0],0);for(var d=!1;c.size()>0;){if(l=c.removeMin(),e.has(s,l))o.setEdge(l,s[l]);else{if(d)throw new Error("Input graph is not connected: "+i);d=!0}i.nodeEdges(l).forEach(u)}return o}return EV}var PV,mae;function jOe(){return mae||(mae=1,PV={components:LOe(),dijkstra:Vpe(),dijkstraAll:IOe(),findCycles:AOe(),floydWarshall:_Oe(),isAcyclic:EOe(),postorder:POe(),preorder:NOe(),prim:ROe(),tarjan:Upe(),topsort:$pe()}),PV}var NV,vae;function TOe(){if(vae)return NV;vae=1;var e=SOe();return NV={Graph:e.Graph,json:COe(),alg:jOe(),version:e.version},NV}var gD;if(typeof IZ=="function")try{gD=TOe()}catch{}gD||(gD=window.graphlib);var Ho=gD,RV,kae;function DOe(){if(kae)return RV;kae=1;var e=mpe(),t=1,n=4;function r(i){return e(i,t|n)}return RV=r,RV}var jV,xae;function Zq(){if(xae)return jV;xae=1;var e=Jf(),t=lc(),n=Fq(),r=uo();function i(a,o,s){if(!r(s))return!1;var c=typeof o;return(c=="number"?t(s)&&n(o,s.length):c=="string"&&o in s)?e(s[o],a):!1}return jV=i,jV}var TV,wae;function qOe(){if(wae)return TV;wae=1;var e=Kq(),t=Jf(),n=Zq(),r=Wh(),i=Object.prototype,a=i.hasOwnProperty,o=e(function(s,c){s=Object(s);var l=-1,u=c.length,d=u>2?c[2]:void 0;for(d&&n(c[0],c[1],d)&&(u=1);++l<u;)for(var f=c[l],h=r(f),y=-1,v=h.length;++y<v;){var k=h[y],g=s[k];(g===void 0||t(g,i[k])&&!a.call(s,k))&&(s[k]=f[k])}return s});return TV=o,TV}var DV,bae;function zOe(){if(bae)return DV;bae=1;var e=uc(),t=lc(),n=gl();function r(i){return function(a,o,s){var c=Object(a);if(!t(a)){var l=e(o,3);a=n(a),o=function(d){return l(c[d],d,c)}}var u=i(a,o,s);return u>-1?c[l?a[u]:u]:void 0}}return DV=r,DV}var qV,Mae;function OOe(){if(Mae)return qV;Mae=1;var e=/\s/;function t(n){for(var r=n.length;r--&&e.test(n.charAt(r)););return r}return qV=t,qV}var zV,Sae;function FOe(){if(Sae)return zV;Sae=1;var e=OOe(),t=/^\s+/;function n(r){return r&&r.slice(0,e(r)+1).replace(t,"")}return zV=n,zV}var OV,Cae;function BOe(){if(Cae)return OV;Cae=1;var e=FOe(),t=uo(),n=n0(),r=NaN,i=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,o=/^0o[0-7]+$/i,s=parseInt;function c(l){if(typeof l=="number")return l;if(n(l))return r;if(t(l)){var u=typeof l.valueOf=="function"?l.valueOf():l;l=t(u)?u+"":u}if(typeof l!="string")return l===0?l:+l;l=e(l);var d=a.test(l);return d||o.test(l)?s(l.slice(2),d?2:8):i.test(l)?r:+l}return OV=c,OV}var FV,Lae;function Gpe(){if(Lae)return FV;Lae=1;var e=BOe(),t=1/0,n=17976931348623157e292;function r(i){if(!i)return i===0?i:0;if(i=e(i),i===t||i===-t){var a=i<0?-1:1;return a*n}return i===i?i:0}return FV=r,FV}var BV,Iae;function HOe(){if(Iae)return BV;Iae=1;var e=Gpe();function t(n){var r=e(n),i=r%1;return r===r?i?r-i:r:0}return BV=t,BV}var HV,Aae;function VOe(){if(Aae)return HV;Aae=1;var e=Ope(),t=uc(),n=HOe(),r=Math.max;function i(a,o,s){var c=a==null?0:a.length;if(!c)return-1;var l=s==null?0:n(s);return l<0&&(l=r(c+l,0)),e(a,t(o,3),l)}return HV=i,HV}var VV,_ae;function UOe(){if(_ae)return VV;_ae=1;var e=zOe(),t=VOe(),n=e(t);return VV=n,VV}var UV,Eae;function Kpe(){if(Eae)return UV;Eae=1;var e=HZ();function t(n){var r=n==null?0:n.length;return r?e(n,1):[]}return UV=t,UV}var $V,Pae;function $Oe(){if(Pae)return $V;Pae=1;var e=zZ(),t=vpe(),n=Wh();function r(i,a){return i==null?i:e(i,t(a),n)}return $V=r,$V}var WV,Nae;function WOe(){if(Nae)return WV;Nae=1;function e(t){var n=t==null?0:t.length;return n?t[n-1]:void 0}return WV=e,WV}var GV,Rae;function GOe(){if(Rae)return GV;Rae=1;var e=zq(),t=OZ(),n=uc();function r(i,a){var o={};return a=n(a,3),t(i,function(s,c,l){e(o,c,a(s,c,l))}),o}return GV=r,GV}var KV,jae;function UZ(){if(jae)return KV;jae=1;var e=n0();function t(n,r,i){for(var a=-1,o=n.length;++a<o;){var s=n[a],c=r(s);if(c!=null&&(l===void 0?c===c&&!e(c):i(c,l)))var l=c,u=s}return u}return KV=t,KV}var ZV,Tae;function KOe(){if(Tae)return ZV;Tae=1;function e(t,n){return t>n}return ZV=e,ZV}var XV,Dae;function ZOe(){if(Dae)return XV;Dae=1;var e=UZ(),t=KOe(),n=Gh();function r(i){return i&&i.length?e(i,n,t):void 0}return XV=r,XV}var YV,qae;function Zpe(){if(qae)return YV;qae=1;var e=zq(),t=Jf();function n(r,i,a){(a!==void 0&&!t(r[i],a)||a===void 0&&!(i in r))&&e(r,i,a)}return YV=n,YV}var JV,zae;function XOe(){if(zae)return JV;zae=1;var e=Uh(),t=Vq(),n=Ss(),r="[object Object]",i=Function.prototype,a=Object.prototype,o=i.toString,s=a.hasOwnProperty,c=o.call(Object);function l(u){if(!n(u)||e(u)!=r)return!1;var d=t(u);if(d===null)return!0;var f=s.call(d,"constructor")&&d.constructor;return typeof f=="function"&&f instanceof f&&o.call(f)==c}return JV=l,JV}var QV,Oae;function Xpe(){if(Oae)return QV;Oae=1;function e(t,n){if(!(n==="constructor"&&typeof t[n]=="function")&&n!="__proto__")return t[n]}return QV=e,QV}var eU,Fae;function YOe(){if(Fae)return eU;Fae=1;var e=cg(),t=Wh();function n(r){return e(r,t(r))}return eU=n,eU}var tU,Bae;function JOe(){if(Bae)return tU;Bae=1;var e=Zpe(),t=ape(),n=ppe(),r=ope(),i=gpe(),a=lg(),o=$r(),s=Fpe(),c=e0(),l=sg(),u=uo(),d=XOe(),f=ug(),h=Xpe(),y=YOe();function v(k,g,S,w,C,_,A){var j=h(k,S),O=h(g,S),T=A.get(O);if(T){e(k,S,T);return}var D=_?_(j,O,S+"",k,g,A):void 0,I=D===void 0;if(I){var R=o(O),U=!R&&c(O),q=!R&&!U&&f(O);D=O,R||U||q?o(j)?D=j:s(j)?D=r(j):U?(I=!1,D=t(O,!0)):q?(I=!1,D=n(O,!0)):D=[]:d(O)||a(O)?(D=j,a(j)?D=y(j):(!u(j)||l(j))&&(D=i(O))):I=!1}I&&(A.set(O,D),C(D,O,w,_,A),A.delete(O)),e(k,S,D)}return tU=v,tU}var nU,Hae;function QOe(){if(Hae)return nU;Hae=1;var e=qq(),t=Zpe(),n=zZ(),r=JOe(),i=uo(),a=Wh(),o=Xpe();function s(c,l,u,d,f){c!==l&&n(l,function(h,y){if(f||(f=new e),i(h))r(c,l,y,u,s,d,f);else{var v=d?d(o(c,y),h,y+"",c,l,f):void 0;v===void 0&&(v=h),t(c,y,v)}},a)}return nU=s,nU}var rU,Vae;function eFe(){if(Vae)return rU;Vae=1;var e=Kq(),t=Zq();function n(r){return e(function(i,a){var o=-1,s=a.length,c=s>1?a[s-1]:void 0,l=s>2?a[2]:void 0;for(c=r.length>3&&typeof c=="function"?(s--,c):void 0,l&&t(a[0],a[1],l)&&(c=s<3?void 0:c,s=1),i=Object(i);++o<s;){var u=a[o];u&&r(i,u,o,c)}return i})}return rU=n,rU}var iU,Uae;function tFe(){if(Uae)return iU;Uae=1;var e=QOe(),t=eFe(),n=t(function(r,i,a){e(r,i,a)});return iU=n,iU}var aU,$ae;function Ype(){if($ae)return aU;$ae=1;function e(t,n){return t<n}return aU=e,aU}var oU,Wae;function nFe(){if(Wae)return oU;Wae=1;var e=UZ(),t=Ype(),n=Gh();function r(i){return i&&i.length?e(i,n,t):void 0}return oU=r,oU}var sU,Gae;function rFe(){if(Gae)return sU;Gae=1;var e=UZ(),t=uc(),n=Ype();function r(i,a){return i&&i.length?e(i,t(a,2),n):void 0}return sU=r,sU}var cU,Kae;function iFe(){if(Kae)return cU;Kae=1;var e=Bo(),t=function(){return e.Date.now()};return cU=t,cU}var lU,Zae;function aFe(){if(Zae)return lU;Zae=1;var e=Oq(),t=Wq(),n=Fq(),r=uo(),i=dg();function a(o,s,c,l){if(!r(o))return o;s=t(s,o);for(var u=-1,d=s.length,f=d-1,h=o;h!=null&&++u<d;){var y=i(s[u]),v=c;if(y==="__proto__"||y==="constructor"||y==="prototype")return o;if(u!=f){var k=h[y];v=l?l(k,y,h):void 0,v===void 0&&(v=r(k)?k:n(s[u+1])?[]:{})}e(h,y,v),h=h[y]}return o}return lU=a,lU}var uU,Xae;function oFe(){if(Xae)return uU;Xae=1;var e=Gq(),t=aFe(),n=Wq();function r(i,a,o){for(var s=-1,c=a.length,l={};++s<c;){var u=a[s],d=e(i,u);o(d,u)&&t(l,n(u,i),d)}return l}return uU=r,uU}var dU,Yae;function sFe(){if(Yae)return dU;Yae=1;var e=oFe(),t=_pe();function n(r,i){return e(r,i,function(a,o){return t(r,o)})}return dU=n,dU}var hU,Jae;function cFe(){if(Jae)return hU;Jae=1;var e=Kpe(),t=qpe(),n=zpe();function r(i){return n(t(i,void 0,e),i+"")}return hU=r,hU}var fU,Qae;function lFe(){if(Qae)return fU;Qae=1;var e=sFe(),t=cFe(),n=t(function(r,i){return r==null?{}:e(r,i)});return fU=n,fU}var pU,eoe;function uFe(){if(eoe)return pU;eoe=1;var e=Math.ceil,t=Math.max;function n(r,i,a,o){for(var s=-1,c=t(e((i-r)/(a||1)),0),l=Array(c);c--;)l[o?c:++s]=r,r+=a;return l}return pU=n,pU}var yU,toe;function dFe(){if(toe)return yU;toe=1;var e=uFe(),t=Zq(),n=Gpe();function r(i){return function(a,o,s){return s&&typeof s!="number"&&t(a,o,s)&&(o=s=void 0),a=n(a),o===void 0?(o=a,a=0):o=n(o),s=s===void 0?a<o?1:-1:n(s),e(a,o,s,i)}}return yU=r,yU}var gU,noe;function hFe(){if(noe)return gU;noe=1;var e=dFe(),t=e();return gU=t,gU}var mU,roe;function fFe(){if(roe)return mU;roe=1;function e(t,n){var r=t.length;for(t.sort(n);r--;)t[r]=t[r].value;return t}return mU=e,mU}var vU,ioe;function pFe(){if(ioe)return vU;ioe=1;var e=n0();function t(n,r){if(n!==r){var i=n!==void 0,a=n===null,o=n===n,s=e(n),c=r!==void 0,l=r===null,u=r===r,d=e(r);if(!l&&!d&&!s&&n>r||s&&c&&u&&!l&&!d||a&&c&&u||!i&&u||!o)return 1;if(!a&&!s&&!d&&n<r||d&&i&&o&&!a&&!s||l&&i&&o||!c&&o||!u)return-1}return 0}return vU=t,vU}var kU,aoe;function yFe(){if(aoe)return kU;aoe=1;var e=pFe();function t(n,r,i){for(var a=-1,o=n.criteria,s=r.criteria,c=o.length,l=i.length;++a<c;){var u=e(o[a],s[a]);if(u){if(a>=l)return u;var d=i[a];return u*(d=="desc"?-1:1)}}return n.index-r.index}return kU=t,kU}var xU,ooe;function gFe(){if(ooe)return xU;ooe=1;var e=$q(),t=Gq(),n=uc(),r=jpe(),i=fFe(),a=Bq(),o=yFe(),s=Gh(),c=$r();function l(u,d,f){d.length?d=e(d,function(v){return c(v)?function(k){return t(k,v.length===1?v[0]:v)}:v}):d=[s];var h=-1;d=e(d,a(n));var y=r(u,function(v,k,g){var S=e(d,function(w){return w(v)});return{criteria:S,index:++h,value:v}});return i(y,function(v,k){return o(v,k,f)})}return xU=l,xU}var wU,soe;function mFe(){if(soe)return wU;soe=1;var e=HZ(),t=gFe(),n=Kq(),r=Zq(),i=n(function(a,o){if(a==null)return[];var s=o.length;return s>1&&r(a,o[0],o[1])?o=[]:s>2&&r(o[0],o[1],o[2])&&(o=[o[0]]),t(a,e(o,1),[])});return wU=i,wU}var bU,coe;function vFe(){if(coe)return bU;coe=1;var e=Ipe(),t=0;function n(r){var i=++t;return e(r)+i}return bU=n,bU}var MU,loe;function kFe(){if(loe)return MU;loe=1;function e(t,n,r){for(var i=-1,a=t.length,o=n.length,s={};++i<a;){var c=i<o?n[i]:void 0;r(s,t[i],c)}return s}return MU=e,MU}var SU,uoe;function xFe(){if(uoe)return SU;uoe=1;var e=Oq(),t=kFe();function n(r,i){return t(r||[],i||[],e)}return SU=n,SU}var mD;if(typeof IZ=="function")try{mD={cloneDeep:DOe(),constant:qZ(),defaults:qOe(),each:xpe(),filter:Ppe(),find:UOe(),flatten:Kpe(),forEach:kpe(),forIn:$Oe(),has:Npe(),isUndefined:Rpe(),last:WOe(),map:Tpe(),mapValues:GOe(),max:ZOe(),merge:tFe(),min:nFe(),minBy:rFe(),now:iFe(),pick:lFe(),range:hFe(),reduce:Dpe(),sortBy:mFe(),uniqueId:vFe(),values:Bpe(),zipObject:xFe()}}catch{}mD||(mD=window._);var nr=mD,wFe=Xq;function Xq(){var e={};e._next=e._prev=e,this._sentinel=e}Xq.prototype.dequeue=function(){var e=this._sentinel,t=e._prev;if(t!==e)return Jpe(t),t};Xq.prototype.enqueue=function(e){var t=this._sentinel;e._prev&&e._next&&Jpe(e),e._next=t._next,t._next._prev=e,t._next=e,e._prev=t};Xq.prototype.toString=function(){for(var e=[],t=this._sentinel,n=t._prev;n!==t;)e.push(JSON.stringify(n,bFe)),n=n._prev;return"["+e.join(", ")+"]"};function Jpe(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function bFe(e,t){if(e!=="_next"&&e!=="_prev")return t}var Ks=nr,MFe=Ho.Graph,SFe=wFe,CFe=IFe,LFe=Ks.constant(1);function IFe(e,t){if(e.nodeCount()<=1)return[];var n=_Fe(e,t||LFe),r=AFe(n.graph,n.buckets,n.zeroIdx);return Ks.flatten(Ks.map(r,function(i){return e.outEdges(i.v,i.w)}),!0)}function AFe(e,t,n){for(var r=[],i=t[t.length-1],a=t[0],o;e.nodeCount();){for(;o=a.dequeue();)CU(e,t,n,o);for(;o=i.dequeue();)CU(e,t,n,o);if(e.nodeCount()){for(var s=t.length-2;s>0;--s)if(o=t[s].dequeue(),o){r=r.concat(CU(e,t,n,o,!0));break}}}return r}function CU(e,t,n,r,i){var a=i?[]:void 0;return Ks.forEach(e.inEdges(r.v),function(o){var s=e.edge(o),c=e.node(o.v);i&&a.push({v:o.v,w:o.w}),c.out-=s,eG(t,n,c)}),Ks.forEach(e.outEdges(r.v),function(o){var s=e.edge(o),c=o.w,l=e.node(c);l.in-=s,eG(t,n,l)}),e.removeNode(r.v),a}function _Fe(e,t){var n=new MFe,r=0,i=0;Ks.forEach(e.nodes(),function(s){n.setNode(s,{v:s,in:0,out:0})}),Ks.forEach(e.edges(),function(s){var c=n.edge(s.v,s.w)||0,l=t(s),u=c+l;n.setEdge(s.v,s.w,u),i=Math.max(i,n.node(s.v).out+=l),r=Math.max(r,n.node(s.w).in+=l)});var a=Ks.range(i+r+3).map(function(){return new SFe}),o=r+1;return Ks.forEach(n.nodes(),function(s){eG(a,o,n.node(s))}),{graph:n,buckets:a,zeroIdx:o}}function eG(e,t,n){n.out?n.in?e[n.out-n.in+t].enqueue(n):e[e.length-1].enqueue(n):e[0].enqueue(n)}var gh=nr,EFe=CFe,PFe={run:NFe,undo:jFe};function NFe(e){var t=e.graph().acyclicer==="greedy"?EFe(e,n(e)):RFe(e);gh.forEach(t,function(r){var i=e.edge(r);e.removeEdge(r),i.forwardName=r.name,i.reversed=!0,e.setEdge(r.w,r.v,i,gh.uniqueId("rev"))});function n(r){return function(i){return r.edge(i).weight}}}function RFe(e){var t=[],n={},r={};function i(a){gh.has(r,a)||(r[a]=!0,n[a]=!0,gh.forEach(e.outEdges(a),function(o){gh.has(n,o.w)?t.push(o):i(o.w)}),delete n[a])}return gh.forEach(e.nodes(),i),t}function jFe(e){gh.forEach(e.edges(),function(t){var n=e.edge(t);if(n.reversed){e.removeEdge(t);var r=n.forwardName;delete n.reversed,delete n.forwardName,e.setEdge(t.w,t.v,n,r)}})}var fn=nr,Qpe=Ho.Graph,fa={addDummyNode:eye,simplify:TFe,asNonCompoundGraph:DFe,successorWeights:qFe,predecessorWeights:zFe,intersectRect:OFe,buildLayerMatrix:FFe,normalizeRanks:BFe,removeEmptyRanks:HFe,addBorderNode:VFe,maxRank:tye,partition:UFe,time:$Fe,notime:WFe};function eye(e,t,n,r){var i;do i=fn.uniqueId(r);while(e.hasNode(i));return n.dummy=t,e.setNode(i,n),i}function TFe(e){var t=new Qpe().setGraph(e.graph());return fn.forEach(e.nodes(),function(n){t.setNode(n,e.node(n))}),fn.forEach(e.edges(),function(n){var r=t.edge(n.v,n.w)||{weight:0,minlen:1},i=e.edge(n);t.setEdge(n.v,n.w,{weight:r.weight+i.weight,minlen:Math.max(r.minlen,i.minlen)})}),t}function DFe(e){var t=new Qpe({multigraph:e.isMultigraph()}).setGraph(e.graph());return fn.forEach(e.nodes(),function(n){e.children(n).length||t.setNode(n,e.node(n))}),fn.forEach(e.edges(),function(n){t.setEdge(n,e.edge(n))}),t}function qFe(e){var t=fn.map(e.nodes(),function(n){var r={};return fn.forEach(e.outEdges(n),function(i){r[i.w]=(r[i.w]||0)+e.edge(i).weight}),r});return fn.zipObject(e.nodes(),t)}function zFe(e){var t=fn.map(e.nodes(),function(n){var r={};return fn.forEach(e.inEdges(n),function(i){r[i.v]=(r[i.v]||0)+e.edge(i).weight}),r});return fn.zipObject(e.nodes(),t)}function OFe(e,t){var n=e.x,r=e.y,i=t.x-n,a=t.y-r,o=e.width/2,s=e.height/2;if(!i&&!a)throw new Error("Not possible to find intersection inside of the rectangle");var c,l;return Math.abs(a)*o>Math.abs(i)*s?(a<0&&(s=-s),c=s*i/a,l=s):(i<0&&(o=-o),c=o,l=o*a/i),{x:n+c,y:r+l}}function FFe(e){var t=fn.map(fn.range(tye(e)+1),function(){return[]});return fn.forEach(e.nodes(),function(n){var r=e.node(n),i=r.rank;fn.isUndefined(i)||(t[i][r.order]=n)}),t}function BFe(e){var t=fn.min(fn.map(e.nodes(),function(n){return e.node(n).rank}));fn.forEach(e.nodes(),function(n){var r=e.node(n);fn.has(r,"rank")&&(r.rank-=t)})}function HFe(e){var t=fn.min(fn.map(e.nodes(),function(a){return e.node(a).rank})),n=[];fn.forEach(e.nodes(),function(a){var o=e.node(a).rank-t;n[o]||(n[o]=[]),n[o].push(a)});var r=0,i=e.graph().nodeRankFactor;fn.forEach(n,function(a,o){fn.isUndefined(a)&&o%i!==0?--r:r&&fn.forEach(a,function(s){e.node(s).rank+=r})})}function VFe(e,t,n,r){var i={width:0,height:0};return arguments.length>=4&&(i.rank=n,i.order=r),eye(e,"border",i,t)}function tye(e){return fn.max(fn.map(e.nodes(),function(t){var n=e.node(t).rank;if(!fn.isUndefined(n))return n}))}function UFe(e,t){var n={lhs:[],rhs:[]};return fn.forEach(e,function(r){t(r)?n.lhs.push(r):n.rhs.push(r)}),n}function $Fe(e,t){var n=fn.now();try{return t()}finally{console.log(e+" time: "+(fn.now()-n)+"ms")}}function WFe(e,t){return t()}var nye=nr,GFe=fa,KFe={run:ZFe,undo:YFe};function ZFe(e){e.graph().dummyChains=[],nye.forEach(e.edges(),function(t){XFe(e,t)})}function XFe(e,t){var n=t.v,r=e.node(n).rank,i=t.w,a=e.node(i).rank,o=t.name,s=e.edge(t),c=s.labelRank;if(a!==r+1){e.removeEdge(t);var l,u,d;for(d=0,++r;r<a;++d,++r)s.points=[],u={width:0,height:0,edgeLabel:s,edgeObj:t,rank:r},l=GFe.addDummyNode(e,"edge",u,"_d"),r===c&&(u.width=s.width,u.height=s.height,u.dummy="edge-label",u.labelpos=s.labelpos),e.setEdge(n,l,{weight:s.weight},o),d===0&&e.graph().dummyChains.push(l),n=l;e.setEdge(n,i,{weight:s.weight},o)}}function YFe(e){nye.forEach(e.graph().dummyChains,function(t){var n=e.node(t),r=n.edgeLabel,i;for(e.setEdge(n.edgeObj,r);n.dummy;)i=e.successors(t)[0],e.removeNode(t),r.points.push({x:n.x,y:n.y}),n.dummy==="edge-label"&&(r.x=n.x,r.y=n.y,r.width=n.width,r.height=n.height),t=i,n=e.node(t)})}var bm=nr,Yq={longestPath:JFe,slack:QFe};function JFe(e){var t={};function n(r){var i=e.node(r);if(bm.has(t,r))return i.rank;t[r]=!0;var a=bm.min(bm.map(e.outEdges(r),function(o){return n(o.w)-e.edge(o).minlen}));return(a===Number.POSITIVE_INFINITY||a===void 0||a===null)&&(a=0),i.rank=a}bm.forEach(e.sources(),n)}function QFe(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}var vD=nr,eBe=Ho.Graph,kD=Yq.slack,rye=tBe;function tBe(e){var t=new eBe({directed:!1}),n=e.nodes()[0],r=e.nodeCount();t.setNode(n,{});for(var i,a;nBe(t,e)<r;)i=rBe(t,e),a=t.hasNode(i.v)?kD(e,i):-kD(e,i),iBe(t,e,a);return t}function nBe(e,t){function n(r){vD.forEach(t.nodeEdges(r),function(i){var a=i.v,o=r===a?i.w:a;!e.hasNode(o)&&!kD(t,i)&&(e.setNode(o,{}),e.setEdge(r,o,{}),n(o))})}return vD.forEach(e.nodes(),n),e.nodeCount()}function rBe(e,t){return vD.minBy(t.edges(),function(n){if(e.hasNode(n.v)!==e.hasNode(n.w))return kD(t,n)})}function iBe(e,t,n){vD.forEach(e.nodes(),function(r){t.node(r).rank+=n})}var ic=nr,aBe=rye,oBe=Yq.slack,sBe=Yq.longestPath,cBe=Ho.alg.preorder,lBe=Ho.alg.postorder,uBe=fa.simplify,dBe=Kh;Kh.initLowLimValues=WZ;Kh.initCutValues=$Z;Kh.calcCutValue=iye;Kh.leaveEdge=oye;Kh.enterEdge=sye;Kh.exchangeEdges=cye;function Kh(e){e=uBe(e),sBe(e);var t=aBe(e);WZ(t),$Z(t,e);for(var n,r;n=oye(t);)r=sye(t,e,n),cye(t,e,n,r)}function $Z(e,t){var n=lBe(e,e.nodes());n=n.slice(0,n.length-1),ic.forEach(n,function(r){hBe(e,t,r)})}function hBe(e,t,n){var r=e.node(n),i=r.parent;e.edge(n,i).cutvalue=iye(e,t,n)}function iye(e,t,n){var r=e.node(n),i=r.parent,a=!0,o=t.edge(n,i),s=0;return o||(a=!1,o=t.edge(i,n)),s=o.weight,ic.forEach(t.nodeEdges(n),function(c){var l=c.v===n,u=l?c.w:c.v;if(u!==i){var d=l===a,f=t.edge(c).weight;if(s+=d?f:-f,pBe(e,n,u)){var h=e.edge(n,u).cutvalue;s+=d?-h:h}}}),s}function WZ(e,t){arguments.length<2&&(t=e.nodes()[0]),aye(e,{},1,t)}function aye(e,t,n,r,i){var a=n,o=e.node(r);return t[r]=!0,ic.forEach(e.neighbors(r),function(s){ic.has(t,s)||(n=aye(e,t,n,s,r))}),o.low=a,o.lim=n++,i?o.parent=i:delete o.parent,n}function oye(e){return ic.find(e.edges(),function(t){return e.edge(t).cutvalue<0})}function sye(e,t,n){var r=n.v,i=n.w;t.hasEdge(r,i)||(r=n.w,i=n.v);var a=e.node(r),o=e.node(i),s=a,c=!1;a.lim>o.lim&&(s=o,c=!0);var l=ic.filter(t.edges(),function(u){return c===doe(e,e.node(u.v),s)&&c!==doe(e,e.node(u.w),s)});return ic.minBy(l,function(u){return oBe(t,u)})}function cye(e,t,n,r){var i=n.v,a=n.w;e.removeEdge(i,a),e.setEdge(r.v,r.w,{}),WZ(e),$Z(e,t),fBe(e,t)}function fBe(e,t){var n=ic.find(e.nodes(),function(i){return!t.node(i).parent}),r=cBe(e,n);r=r.slice(1),ic.forEach(r,function(i){var a=e.node(i).parent,o=t.edge(i,a),s=!1;o||(o=t.edge(a,i),s=!0),t.node(i).rank=t.node(a).rank+(s?o.minlen:-o.minlen)})}function pBe(e,t,n){return e.hasEdge(t,n)}function doe(e,t,n){return n.low<=t.lim&&t.lim<=n.lim}var yBe=Yq,lye=yBe.longestPath,gBe=rye,mBe=dBe,vBe=kBe;function kBe(e){switch(e.graph().ranker){case"network-simplex":hoe(e);break;case"tight-tree":wBe(e);break;case"longest-path":xBe(e);break;default:hoe(e)}}var xBe=lye;function wBe(e){lye(e),gBe(e)}function hoe(e){mBe(e)}var tG=nr,bBe=MBe;function MBe(e){var t=CBe(e);tG.forEach(e.graph().dummyChains,function(n){for(var r=e.node(n),i=r.edgeObj,a=SBe(e,t,i.v,i.w),o=a.path,s=a.lca,c=0,l=o[c],u=!0;n!==i.w;){if(r=e.node(n),u){for(;(l=o[c])!==s&&e.node(l).maxRank<r.rank;)c++;l===s&&(u=!1)}if(!u){for(;c<o.length-1&&e.node(l=o[c+1]).minRank<=r.rank;)c++;l=o[c]}e.setParent(n,l),n=e.successors(n)[0]}})}function SBe(e,t,n,r){var i=[],a=[],o=Math.min(t[n].low,t[r].low),s=Math.max(t[n].lim,t[r].lim),c,l;c=n;do c=e.parent(c),i.push(c);while(c&&(t[c].low>o||s>t[c].lim));for(l=c,c=r;(c=e.parent(c))!==l;)a.push(c);return{path:i.concat(a.reverse()),lca:l}}function CBe(e){var t={},n=0;function r(i){var a=n;tG.forEach(e.children(i),r),t[i]={low:a,lim:n++}}return tG.forEach(e.children(),r),t}var Zs=nr,nG=fa,LBe={run:IBe,cleanup:EBe};function IBe(e){var t=nG.addDummyNode(e,"root",{},"_root"),n=ABe(e),r=Zs.max(Zs.values(n))-1,i=2*r+1;e.graph().nestingRoot=t,Zs.forEach(e.edges(),function(o){e.edge(o).minlen*=i});var a=_Be(e)+1;Zs.forEach(e.children(),function(o){uye(e,t,i,a,r,n,o)}),e.graph().nodeRankFactor=i}function uye(e,t,n,r,i,a,o){var s=e.children(o);if(!s.length){o!==t&&e.setEdge(t,o,{weight:0,minlen:n});return}var c=nG.addBorderNode(e,"_bt"),l=nG.addBorderNode(e,"_bb"),u=e.node(o);e.setParent(c,o),u.borderTop=c,e.setParent(l,o),u.borderBottom=l,Zs.forEach(s,function(d){uye(e,t,n,r,i,a,d);var f=e.node(d),h=f.borderTop?f.borderTop:d,y=f.borderBottom?f.borderBottom:d,v=f.borderTop?r:2*r,k=h!==y?1:i-a[o]+1;e.setEdge(c,h,{weight:v,minlen:k,nestingEdge:!0}),e.setEdge(y,l,{weight:v,minlen:k,nestingEdge:!0})}),e.parent(o)||e.setEdge(t,c,{weight:0,minlen:i+a[o]})}function ABe(e){var t={};function n(r,i){var a=e.children(r);a&&a.length&&Zs.forEach(a,function(o){n(o,i+1)}),t[r]=i}return Zs.forEach(e.children(),function(r){n(r,1)}),t}function _Be(e){return Zs.reduce(e.edges(),function(t,n){return t+e.edge(n).weight},0)}function EBe(e){var t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,Zs.forEach(e.edges(),function(n){var r=e.edge(n);r.nestingEdge&&e.removeEdge(n)})}var LU=nr,PBe=fa,NBe=RBe;function RBe(e){function t(n){var r=e.children(n),i=e.node(n);if(r.length&&LU.forEach(r,t),LU.has(i,"minRank")){i.borderLeft=[],i.borderRight=[];for(var a=i.minRank,o=i.maxRank+1;a<o;++a)foe(e,"borderLeft","_bl",n,i,a),foe(e,"borderRight","_br",n,i,a)}}LU.forEach(e.children(),t)}function foe(e,t,n,r,i,a){var o={width:0,height:0,rank:a,borderType:t},s=i[t][a-1],c=PBe.addDummyNode(e,"border",o,n);i[t][a]=c,e.setParent(c,r),s&&e.setEdge(s,c,{weight:1})}var ds=nr,jBe={adjust:TBe,undo:DBe};function TBe(e){var t=e.graph().rankdir.toLowerCase();(t==="lr"||t==="rl")&&dye(e)}function DBe(e){var t=e.graph().rankdir.toLowerCase();(t==="bt"||t==="rl")&&qBe(e),(t==="lr"||t==="rl")&&(zBe(e),dye(e))}function dye(e){ds.forEach(e.nodes(),function(t){poe(e.node(t))}),ds.forEach(e.edges(),function(t){poe(e.edge(t))})}function poe(e){var t=e.width;e.width=e.height,e.height=t}function qBe(e){ds.forEach(e.nodes(),function(t){IU(e.node(t))}),ds.forEach(e.edges(),function(t){var n=e.edge(t);ds.forEach(n.points,IU),ds.has(n,"y")&&IU(n)})}function IU(e){e.y=-e.y}function zBe(e){ds.forEach(e.nodes(),function(t){AU(e.node(t))}),ds.forEach(e.edges(),function(t){var n=e.edge(t);ds.forEach(n.points,AU),ds.has(n,"x")&&AU(n)})}function AU(e){var t=e.x;e.x=e.y,e.y=t}var Fs=nr,OBe=FBe;function FBe(e){var t={},n=Fs.filter(e.nodes(),function(s){return!e.children(s).length}),r=Fs.max(Fs.map(n,function(s){return e.node(s).rank})),i=Fs.map(Fs.range(r+1),function(){return[]});function a(s){if(!Fs.has(t,s)){t[s]=!0;var c=e.node(s);i[c.rank].push(s),Fs.forEach(e.successors(s),a)}}var o=Fs.sortBy(n,function(s){return e.node(s).rank});return Fs.forEach(o,a),i}var Ec=nr,BBe=HBe;function HBe(e,t){for(var n=0,r=1;r<t.length;++r)n+=VBe(e,t[r-1],t[r]);return n}function VBe(e,t,n){for(var r=Ec.zipObject(n,Ec.map(n,function(l,u){return u})),i=Ec.flatten(Ec.map(t,function(l){return Ec.sortBy(Ec.map(e.outEdges(l),function(u){return{pos:r[u.w],weight:e.edge(u).weight}}),"pos")}),!0),a=1;a<n.length;)a<<=1;var o=2*a-1;a-=1;var s=Ec.map(new Array(o),function(){return 0}),c=0;return Ec.forEach(i.forEach(function(l){var u=l.pos+a;s[u]+=l.weight;for(var d=0;u>0;)u%2&&(d+=s[u+1]),u=u-1>>1,s[u]+=l.weight;c+=l.weight*d})),c}var yoe=nr,UBe=$Be;function $Be(e,t){return yoe.map(t,function(n){var r=e.inEdges(n);if(r.length){var i=yoe.reduce(r,function(a,o){var s=e.edge(o),c=e.node(o.v);return{sum:a.sum+s.weight*c.order,weight:a.weight+s.weight}},{sum:0,weight:0});return{v:n,barycenter:i.sum/i.weight,weight:i.weight}}else return{v:n}})}var Ra=nr,WBe=GBe;function GBe(e,t){var n={};Ra.forEach(e,function(i,a){var o=n[i.v]={indegree:0,in:[],out:[],vs:[i.v],i:a};Ra.isUndefined(i.barycenter)||(o.barycenter=i.barycenter,o.weight=i.weight)}),Ra.forEach(t.edges(),function(i){var a=n[i.v],o=n[i.w];!Ra.isUndefined(a)&&!Ra.isUndefined(o)&&(o.indegree++,a.out.push(n[i.w]))});var r=Ra.filter(n,function(i){return!i.indegree});return KBe(r)}function KBe(e){var t=[];function n(a){return function(o){o.merged||(Ra.isUndefined(o.barycenter)||Ra.isUndefined(a.barycenter)||o.barycenter>=a.barycenter)&&ZBe(a,o)}}function r(a){return function(o){o.in.push(a),--o.indegree===0&&e.push(o)}}for(;e.length;){var i=e.pop();t.push(i),Ra.forEach(i.in.reverse(),n(i)),Ra.forEach(i.out,r(i))}return Ra.map(Ra.filter(t,function(a){return!a.merged}),function(a){return Ra.pick(a,["vs","i","barycenter","weight"])})}function ZBe(e,t){var n=0,r=0;e.weight&&(n+=e.barycenter*e.weight,r+=e.weight),t.weight&&(n+=t.barycenter*t.weight,r+=t.weight),e.vs=t.vs.concat(e.vs),e.barycenter=n/r,e.weight=r,e.i=Math.min(t.i,e.i),t.merged=!0}var K0=nr,XBe=fa,YBe=JBe;function JBe(e,t){var n=XBe.partition(e,function(u){return K0.has(u,"barycenter")}),r=n.lhs,i=K0.sortBy(n.rhs,function(u){return-u.i}),a=[],o=0,s=0,c=0;r.sort(QBe(!!t)),c=goe(a,i,c),K0.forEach(r,function(u){c+=u.vs.length,a.push(u.vs),o+=u.barycenter*u.weight,s+=u.weight,c=goe(a,i,c)});var l={vs:K0.flatten(a,!0)};return s&&(l.barycenter=o/s,l.weight=s),l}function goe(e,t,n){for(var r;t.length&&(r=K0.last(t)).i<=n;)t.pop(),e.push(r.vs),n++;return n}function QBe(e){return function(t,n){return t.barycenter<n.barycenter?-1:t.barycenter>n.barycenter?1:e?n.i-t.i:t.i-n.i}}var Oc=nr,eHe=UBe,tHe=WBe,nHe=YBe,rHe=hye;function hye(e,t,n,r){var i=e.children(t),a=e.node(t),o=a?a.borderLeft:void 0,s=a?a.borderRight:void 0,c={};o&&(i=Oc.filter(i,function(y){return y!==o&&y!==s}));var l=eHe(e,i);Oc.forEach(l,function(y){if(e.children(y.v).length){var v=hye(e,y.v,n,r);c[y.v]=v,Oc.has(v,"barycenter")&&aHe(y,v)}});var u=tHe(l,n);iHe(u,c);var d=nHe(u,r);if(o&&(d.vs=Oc.flatten([o,d.vs,s],!0),e.predecessors(o).length)){var f=e.node(e.predecessors(o)[0]),h=e.node(e.predecessors(s)[0]);Oc.has(d,"barycenter")||(d.barycenter=0,d.weight=0),d.barycenter=(d.barycenter*d.weight+f.order+h.order)/(d.weight+2),d.weight+=2}return d}function iHe(e,t){Oc.forEach(e,function(n){n.vs=Oc.flatten(n.vs.map(function(r){return t[r]?t[r].vs:r}),!0)})}function aHe(e,t){Oc.isUndefined(e.barycenter)?(e.barycenter=t.barycenter,e.weight=t.weight):(e.barycenter=(e.barycenter*e.weight+t.barycenter*t.weight)/(e.weight+t.weight),e.weight+=t.weight)}var Z0=nr,oHe=Ho.Graph,sHe=cHe;function cHe(e,t,n){var r=lHe(e),i=new oHe({compound:!0}).setGraph({root:r}).setDefaultNodeLabel(function(a){return e.node(a)});return Z0.forEach(e.nodes(),function(a){var o=e.node(a),s=e.parent(a);(o.rank===t||o.minRank<=t&&t<=o.maxRank)&&(i.setNode(a),i.setParent(a,s||r),Z0.forEach(e[n](a),function(c){var l=c.v===a?c.w:c.v,u=i.edge(l,a),d=Z0.isUndefined(u)?0:u.weight;i.setEdge(l,a,{weight:e.edge(c).weight+d})}),Z0.has(o,"minRank")&&i.setNode(a,{borderLeft:o.borderLeft[t],borderRight:o.borderRight[t]}))}),i}function lHe(e){for(var t;e.hasNode(t=Z0.uniqueId("_root")););return t}var uHe=nr,dHe=hHe;function hHe(e,t,n){var r={},i;uHe.forEach(n,function(a){for(var o=e.parent(a),s,c;o;){if(s=e.parent(o),s?(c=r[s],r[s]=o):(c=i,i=o),c&&c!==o){t.setEdge(c,o);return}o=s}})}var el=nr,fHe=OBe,pHe=BBe,yHe=rHe,gHe=sHe,mHe=dHe,vHe=Ho.Graph,moe=fa,kHe=xHe;function xHe(e){var t=moe.maxRank(e),n=voe(e,el.range(1,t+1),"inEdges"),r=voe(e,el.range(t-1,-1,-1),"outEdges"),i=fHe(e);koe(e,i);for(var a=Number.POSITIVE_INFINITY,o,s=0,c=0;c<4;++s,++c){wHe(s%2?n:r,s%4>=2),i=moe.buildLayerMatrix(e);var l=pHe(e,i);l<a&&(c=0,o=el.cloneDeep(i),a=l)}koe(e,o)}function voe(e,t,n){return el.map(t,function(r){return gHe(e,r,n)})}function wHe(e,t){var n=new vHe;el.forEach(e,function(r){var i=r.graph().root,a=yHe(r,i,n,t);el.forEach(a.vs,function(o,s){r.node(o).order=s}),mHe(r,n,a.vs)})}function koe(e,t){el.forEach(t,function(n){el.forEach(n,function(r,i){e.node(r).order=i})})}var Bt=nr,bHe=Ho.Graph,MHe=fa,SHe={positionX:THe};function CHe(e,t){var n={};function r(i,a){var o=0,s=0,c=i.length,l=Bt.last(a);return Bt.forEach(a,function(u,d){var f=IHe(e,u),h=f?e.node(f).order:c;(f||u===l)&&(Bt.forEach(a.slice(s,d+1),function(y){Bt.forEach(e.predecessors(y),function(v){var k=e.node(v),g=k.order;(g<o||h<g)&&!(k.dummy&&e.node(y).dummy)&&fye(n,v,y)})}),s=d+1,o=h)}),a}return Bt.reduce(t,r),n}function LHe(e,t){var n={};function r(a,o,s,c,l){var u;Bt.forEach(Bt.range(o,s),function(d){u=a[d],e.node(u).dummy&&Bt.forEach(e.predecessors(u),function(f){var h=e.node(f);h.dummy&&(h.order<c||h.order>l)&&fye(n,f,u)})})}function i(a,o){var s=-1,c,l=0;return Bt.forEach(o,function(u,d){if(e.node(u).dummy==="border"){var f=e.predecessors(u);f.length&&(c=e.node(f[0]).order,r(o,l,d,s,c),l=d,s=c)}r(o,l,o.length,c,a.length)}),o}return Bt.reduce(t,i),n}function IHe(e,t){if(e.node(t).dummy)return Bt.find(e.predecessors(t),function(n){return e.node(n).dummy})}function fye(e,t,n){if(t>n){var r=t;t=n,n=r}var i=e[t];i||(e[t]=i={}),i[n]=!0}function AHe(e,t,n){if(t>n){var r=t;t=n,n=r}return Bt.has(e[t],n)}function _He(e,t,n,r){var i={},a={},o={};return Bt.forEach(t,function(s){Bt.forEach(s,function(c,l){i[c]=c,a[c]=c,o[c]=l})}),Bt.forEach(t,function(s){var c=-1;Bt.forEach(s,function(l){var u=r(l);if(u.length){u=Bt.sortBy(u,function(v){return o[v]});for(var d=(u.length-1)/2,f=Math.floor(d),h=Math.ceil(d);f<=h;++f){var y=u[f];a[l]===l&&c<o[y]&&!AHe(n,l,y)&&(a[y]=l,a[l]=i[l]=i[y],c=o[y])}}})}),{root:i,align:a}}function EHe(e,t,n,r,i){var a={},o=PHe(e,t,n,i),s=i?"borderLeft":"borderRight";function c(d,f){for(var h=o.nodes(),y=h.pop(),v={};y;)v[y]?d(y):(v[y]=!0,h.push(y),h=h.concat(f(y))),y=h.pop()}function l(d){a[d]=o.inEdges(d).reduce(function(f,h){return Math.max(f,a[h.v]+o.edge(h))},0)}function u(d){var f=o.outEdges(d).reduce(function(y,v){return Math.min(y,a[v.w]-o.edge(v))},Number.POSITIVE_INFINITY),h=e.node(d);f!==Number.POSITIVE_INFINITY&&h.borderType!==s&&(a[d]=Math.max(a[d],f))}return c(l,o.predecessors.bind(o)),c(u,o.successors.bind(o)),Bt.forEach(r,function(d){a[d]=a[n[d]]}),a}function PHe(e,t,n,r){var i=new bHe,a=e.graph(),o=DHe(a.nodesep,a.edgesep,r);return Bt.forEach(t,function(s){var c;Bt.forEach(s,function(l){var u=n[l];if(i.setNode(u),c){var d=n[c],f=i.edge(d,u);i.setEdge(d,u,Math.max(o(e,l,c),f||0))}c=l})}),i}function NHe(e,t){return Bt.minBy(Bt.values(t),function(n){var r=Number.NEGATIVE_INFINITY,i=Number.POSITIVE_INFINITY;return Bt.forIn(n,function(a,o){var s=qHe(e,o)/2;r=Math.max(a+s,r),i=Math.min(a-s,i)}),r-i})}function RHe(e,t){var n=Bt.values(t),r=Bt.min(n),i=Bt.max(n);Bt.forEach(["u","d"],function(a){Bt.forEach(["l","r"],function(o){var s=a+o,c=e[s],l;if(c!==t){var u=Bt.values(c);l=o==="l"?r-Bt.min(u):i-Bt.max(u),l&&(e[s]=Bt.mapValues(c,function(d){return d+l}))}})})}function jHe(e,t){return Bt.mapValues(e.ul,function(n,r){if(t)return e[t.toLowerCase()][r];var i=Bt.sortBy(Bt.map(e,r));return(i[1]+i[2])/2})}function THe(e){var t=MHe.buildLayerMatrix(e),n=Bt.merge(CHe(e,t),LHe(e,t)),r={},i;Bt.forEach(["u","d"],function(o){i=o==="u"?t:Bt.values(t).reverse(),Bt.forEach(["l","r"],function(s){s==="r"&&(i=Bt.map(i,function(d){return Bt.values(d).reverse()}));var c=(o==="u"?e.predecessors:e.successors).bind(e),l=_He(e,i,n,c),u=EHe(e,i,l.root,l.align,s==="r");s==="r"&&(u=Bt.mapValues(u,function(d){return-d})),r[o+s]=u})});var a=NHe(e,r);return RHe(r,a),jHe(r,e.graph().align)}function DHe(e,t,n){return function(r,i,a){var o=r.node(i),s=r.node(a),c=0,l;if(c+=o.width/2,Bt.has(o,"labelpos"))switch(o.labelpos.toLowerCase()){case"l":l=-o.width/2;break;case"r":l=o.width/2;break}if(l&&(c+=n?l:-l),l=0,c+=(o.dummy?t:e)/2,c+=(s.dummy?t:e)/2,c+=s.width/2,Bt.has(s,"labelpos"))switch(s.labelpos.toLowerCase()){case"l":l=s.width/2;break;case"r":l=-s.width/2;break}return l&&(c+=n?l:-l),l=0,c}}function qHe(e,t){return e.node(t).width}var X0=nr,pye=fa,zHe=SHe.positionX,OHe=FHe;function FHe(e){e=pye.asNonCompoundGraph(e),BHe(e),X0.forEach(zHe(e),function(t,n){e.node(n).x=t})}function BHe(e){var t=pye.buildLayerMatrix(e),n=e.graph().ranksep,r=0;X0.forEach(t,function(i){var a=X0.max(X0.map(i,function(o){return e.node(o).height}));X0.forEach(i,function(o){e.node(o).y=r+a/2}),r+=a+n})}var Xt=nr,xoe=PFe,woe=KFe,HHe=vBe,VHe=fa.normalizeRanks,UHe=bBe,$He=fa.removeEmptyRanks,boe=LBe,WHe=NBe,Moe=jBe,GHe=kHe,KHe=OHe,ll=fa,ZHe=Ho.Graph,XHe=YHe;function YHe(e,t){var n=t&&t.debugTiming?ll.time:ll.notime;n("layout",function(){var r=n(" buildLayoutGraph",function(){return cVe(e)});n(" runLayout",function(){JHe(r,n)}),n(" updateInputGraph",function(){QHe(e,r)})})}function JHe(e,t){t(" makeSpaceForEdgeLabels",function(){lVe(e)}),t(" removeSelfEdges",function(){vVe(e)}),t(" acyclic",function(){xoe.run(e)}),t(" nestingGraph.run",function(){boe.run(e)}),t(" rank",function(){HHe(ll.asNonCompoundGraph(e))}),t(" injectEdgeLabelProxies",function(){uVe(e)}),t(" removeEmptyRanks",function(){$He(e)}),t(" nestingGraph.cleanup",function(){boe.cleanup(e)}),t(" normalizeRanks",function(){VHe(e)}),t(" assignRankMinMax",function(){dVe(e)}),t(" removeEdgeLabelProxies",function(){hVe(e)}),t(" normalize.run",function(){woe.run(e)}),t(" parentDummyChains",function(){UHe(e)}),t(" addBorderSegments",function(){WHe(e)}),t(" order",function(){GHe(e)}),t(" insertSelfEdges",function(){kVe(e)}),t(" adjustCoordinateSystem",function(){Moe.adjust(e)}),t(" position",function(){KHe(e)}),t(" positionSelfEdges",function(){xVe(e)}),t(" removeBorderNodes",function(){mVe(e)}),t(" normalize.undo",function(){woe.undo(e)}),t(" fixupEdgeLabelCoords",function(){yVe(e)}),t(" undoCoordinateSystem",function(){Moe.undo(e)}),t(" translateGraph",function(){fVe(e)}),t(" assignNodeIntersects",function(){pVe(e)}),t(" reversePoints",function(){gVe(e)}),t(" acyclic.undo",function(){xoe.undo(e)})}function QHe(e,t){Xt.forEach(e.nodes(),function(n){var r=e.node(n),i=t.node(n);r&&(r.x=i.x,r.y=i.y,t.children(n).length&&(r.width=i.width,r.height=i.height))}),Xt.forEach(e.edges(),function(n){var r=e.edge(n),i=t.edge(n);r.points=i.points,Xt.has(i,"x")&&(r.x=i.x,r.y=i.y)}),e.graph().width=t.graph().width,e.graph().height=t.graph().height}var eVe=["nodesep","edgesep","ranksep","marginx","marginy"],tVe={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},nVe=["acyclicer","ranker","rankdir","align"],rVe=["width","height"],iVe={width:0,height:0},aVe=["minlen","weight","width","height","labeloffset"],oVe={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},sVe=["labelpos"];function cVe(e){var t=new ZHe({multigraph:!0,compound:!0}),n=EU(e.graph());return t.setGraph(Xt.merge({},tVe,_U(n,eVe),Xt.pick(n,nVe))),Xt.forEach(e.nodes(),function(r){var i=EU(e.node(r));t.setNode(r,Xt.defaults(_U(i,rVe),iVe)),t.setParent(r,e.parent(r))}),Xt.forEach(e.edges(),function(r){var i=EU(e.edge(r));t.setEdge(r,Xt.merge({},oVe,_U(i,aVe),Xt.pick(i,sVe)))}),t}function lVe(e){var t=e.graph();t.ranksep/=2,Xt.forEach(e.edges(),function(n){var r=e.edge(n);r.minlen*=2,r.labelpos.toLowerCase()!=="c"&&(t.rankdir==="TB"||t.rankdir==="BT"?r.width+=r.labeloffset:r.height+=r.labeloffset)})}function uVe(e){Xt.forEach(e.edges(),function(t){var n=e.edge(t);if(n.width&&n.height){var r=e.node(t.v),i=e.node(t.w),a={rank:(i.rank-r.rank)/2+r.rank,e:t};ll.addDummyNode(e,"edge-proxy",a,"_ep")}})}function dVe(e){var t=0;Xt.forEach(e.nodes(),function(n){var r=e.node(n);r.borderTop&&(r.minRank=e.node(r.borderTop).rank,r.maxRank=e.node(r.borderBottom).rank,t=Xt.max(t,r.maxRank))}),e.graph().maxRank=t}function hVe(e){Xt.forEach(e.nodes(),function(t){var n=e.node(t);n.dummy==="edge-proxy"&&(e.edge(n.e).labelRank=n.rank,e.removeNode(t))})}function fVe(e){var t=Number.POSITIVE_INFINITY,n=0,r=Number.POSITIVE_INFINITY,i=0,a=e.graph(),o=a.marginx||0,s=a.marginy||0;function c(l){var u=l.x,d=l.y,f=l.width,h=l.height;t=Math.min(t,u-f/2),n=Math.max(n,u+f/2),r=Math.min(r,d-h/2),i=Math.max(i,d+h/2)}Xt.forEach(e.nodes(),function(l){c(e.node(l))}),Xt.forEach(e.edges(),function(l){var u=e.edge(l);Xt.has(u,"x")&&c(u)}),t-=o,r-=s,Xt.forEach(e.nodes(),function(l){var u=e.node(l);u.x-=t,u.y-=r}),Xt.forEach(e.edges(),function(l){var u=e.edge(l);Xt.forEach(u.points,function(d){d.x-=t,d.y-=r}),Xt.has(u,"x")&&(u.x-=t),Xt.has(u,"y")&&(u.y-=r)}),a.width=n-t+o,a.height=i-r+s}function pVe(e){Xt.forEach(e.edges(),function(t){var n=e.edge(t),r=e.node(t.v),i=e.node(t.w),a,o;n.points?(a=n.points[0],o=n.points[n.points.length-1]):(n.points=[],a=i,o=r),n.points.unshift(ll.intersectRect(r,a)),n.points.push(ll.intersectRect(i,o))})}function yVe(e){Xt.forEach(e.edges(),function(t){var n=e.edge(t);if(Xt.has(n,"x"))switch((n.labelpos==="l"||n.labelpos==="r")&&(n.width-=n.labeloffset),n.labelpos){case"l":n.x-=n.width/2+n.labeloffset;break;case"r":n.x+=n.width/2+n.labeloffset;break}})}function gVe(e){Xt.forEach(e.edges(),function(t){var n=e.edge(t);n.reversed&&n.points.reverse()})}function mVe(e){Xt.forEach(e.nodes(),function(t){if(e.children(t).length){var n=e.node(t),r=e.node(n.borderTop),i=e.node(n.borderBottom),a=e.node(Xt.last(n.borderLeft)),o=e.node(Xt.last(n.borderRight));n.width=Math.abs(o.x-a.x),n.height=Math.abs(i.y-r.y),n.x=a.x+n.width/2,n.y=r.y+n.height/2}}),Xt.forEach(e.nodes(),function(t){e.node(t).dummy==="border"&&e.removeNode(t)})}function vVe(e){Xt.forEach(e.edges(),function(t){if(t.v===t.w){var n=e.node(t.v);n.selfEdges||(n.selfEdges=[]),n.selfEdges.push({e:t,label:e.edge(t)}),e.removeEdge(t)}})}function kVe(e){var t=ll.buildLayerMatrix(e);Xt.forEach(t,function(n){var r=0;Xt.forEach(n,function(i,a){var o=e.node(i);o.order=a+r,Xt.forEach(o.selfEdges,function(s){ll.addDummyNode(e,"selfedge",{width:s.label.width,height:s.label.height,rank:o.rank,order:a+ ++r,e:s.e,label:s.label},"_se")}),delete o.selfEdges})})}function xVe(e){Xt.forEach(e.nodes(),function(t){var n=e.node(t);if(n.dummy==="selfedge"){var r=e.node(n.e.v),i=r.x+r.width/2,a=r.y,o=n.x-i,s=r.height/2;e.setEdge(n.e,n.label),e.removeNode(t),n.label.points=[{x:i+2*o/3,y:a-s},{x:i+5*o/6,y:a-s},{x:i+o,y:a},{x:i+5*o/6,y:a+s},{x:i+2*o/3,y:a+s}],n.label.x=n.x,n.label.y=n.y}})}function _U(e,t){return Xt.mapValues(Xt.pick(e,t),Number)}function EU(e){var t={};return Xt.forEach(e,function(n,r){t[r.toLowerCase()]=n}),t}var Mm=nr,wVe=fa,bVe=Ho.Graph,MVe={debugOrdering:SVe};function SVe(e){var t=wVe.buildLayerMatrix(e),n=new bVe({compound:!0,multigraph:!0}).setGraph({});return Mm.forEach(e.nodes(),function(r){n.setNode(r,{label:r}),n.setParent(r,"layer"+e.node(r).rank)}),Mm.forEach(e.edges(),function(r){n.setEdge(r.v,r.w,{},r.name)}),Mm.forEach(t,function(r,i){var a="layer"+i;n.setNode(a,{rank:"same"}),Mm.reduce(r,function(o,s){return n.setEdge(o,s,{style:"invis"}),s})}),n}var CVe="0.8.5",LVe={graphlib:Ho,layout:XHe,debug:MVe,util:{time:fa.time,notime:fa.notime},version:CVe};const Soe=Rf(LVe),PU={direction:"LR",nodesep:60,ranksep:140},IVe=(e,t,n)=>{const r=new Map;if(e.length===0)return r;if(e.length===1){const u=e[0];return u&&r.set(u.id,{x:u.position.x,y:u.position.y}),r}const i=PU.direction,a=PU.nodesep,o=PU.ranksep,s=new Soe.graphlib.Graph({multigraph:!0});s.setGraph({rankdir:i,nodesep:a,ranksep:o}),s.setDefaultEdgeLabel(()=>({}));const c=new Set;for(const u of e)s.setNode(u.id,{width:u.width,height:u.height}),c.add(u.id);let l=0;for(const u of t)!c.has(u.source)||!c.has(u.target)||s.setEdge(u.source,u.target,{},`e${l++}`);Soe.layout(s);for(const u of e){const d=s.node(u.id);d&&r.set(u.id,{x:d.x-u.width/2,y:d.y-u.height/2})}return r};function AVe({nodes:e,connectors:t,flowPos:n,nodeIdGen:r,connectorIdGen:i,defaultOffset:a={x:24,y:24}}){const o=new Map;for(const h of e)o.set(h.id,r(h.id));let s=Number.POSITIVE_INFINITY,c=Number.POSITIVE_INFINITY;for(const h of e)h.position.x<s&&(s=h.position.x),h.position.y<c&&(c=h.position.y);Number.isFinite(s)||(s=0),Number.isFinite(c)||(c=0);const l=n?n.x-s:a.x,u=n?n.y-c:a.y,d=e.map(h=>{const y=o.get(h.id);if(y===void 0)throw new Error(`paste id missing for ${h.id}`);return{...h,id:y,position:{x:h.position.x+l,y:h.position.y+u}}}),f=t.map(h=>{const y=i(h.id);return{...h,id:y,source:o.get(h.source)??h.source,target:o.get(h.target)??h.target}});return{newNodes:d,newConnectors:f,idMap:o}}function _Ve(e,t){if(e.match(/^[a-z]+:\/\//i))return e;if(e.match(/^\/\//))return window.location.protocol+e;if(e.match(/^[a-z]+:/i))return e;const n=document.implementation.createHTMLDocument(),r=n.createElement("base"),i=n.createElement("a");return n.head.appendChild(r),n.body.appendChild(i),t&&(r.href=t),i.href=e,i.href}const EVe=(()=>{let e=0;const t=()=>`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4);return()=>(e+=1,`u${t()}${e}`)})();function tl(e){const t=[];for(let n=0,r=e.length;n<r;n++)t.push(e[n]);return t}let y2=null;function yye(e={}){return y2||(e.includeStyleProperties?(y2=e.includeStyleProperties,y2):(y2=tl(window.getComputedStyle(document.documentElement)),y2))}function xD(e,t){const r=(e.ownerDocument.defaultView||window).getComputedStyle(e).getPropertyValue(t);return r?parseFloat(r.replace("px","")):0}function PVe(e){const t=xD(e,"border-left-width"),n=xD(e,"border-right-width");return e.clientWidth+t+n}function NVe(e){const t=xD(e,"border-top-width"),n=xD(e,"border-bottom-width");return e.clientHeight+t+n}function gye(e,t={}){const n=t.width||PVe(e),r=t.height||NVe(e);return{width:n,height:r}}function RVe(){let e,t;try{t=process}catch{}const n=t&&t.env?t.env.devicePixelRatio:null;return n&&(e=parseInt(n,10),Number.isNaN(e)&&(e=1)),e||window.devicePixelRatio||1}const Aa=16384;function jVe(e){(e.width>Aa||e.height>Aa)&&(e.width>Aa&&e.height>Aa?e.width>e.height?(e.height*=Aa/e.width,e.width=Aa):(e.width*=Aa/e.height,e.height=Aa):e.width>Aa?(e.height*=Aa/e.width,e.width=Aa):(e.width*=Aa/e.height,e.height=Aa))}function wD(e){return new Promise((t,n)=>{const r=new Image;r.onload=()=>{r.decode().then(()=>{requestAnimationFrame(()=>t(r))})},r.onerror=n,r.crossOrigin="anonymous",r.decoding="async",r.src=e})}async function TVe(e){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(e)).then(encodeURIComponent).then(t=>`data:image/svg+xml;charset=utf-8,${t}`)}async function DVe(e,t,n){const r="http://www.w3.org/2000/svg",i=document.createElementNS(r,"svg"),a=document.createElementNS(r,"foreignObject");return i.setAttribute("width",`${t}`),i.setAttribute("height",`${n}`),i.setAttribute("viewBox",`0 0 ${t} ${n}`),a.setAttribute("width","100%"),a.setAttribute("height","100%"),a.setAttribute("x","0"),a.setAttribute("y","0"),a.setAttribute("externalResourcesRequired","true"),i.appendChild(a),a.appendChild(e),TVe(i)}const ha=(e,t)=>{if(e instanceof t)return!0;const n=Object.getPrototypeOf(e);return n===null?!1:n.constructor.name===t.name||ha(n,t)};function qVe(e){const t=e.getPropertyValue("content");return`${e.cssText} content: '${t.replace(/'|"/g,"")}';`}function zVe(e,t){return yye(t).map(n=>{const r=e.getPropertyValue(n),i=e.getPropertyPriority(n);return`${n}: ${r}${i?" !important":""};`}).join(" ")}function OVe(e,t,n,r){const i=`.${e}:${t}`,a=n.cssText?qVe(n):zVe(n,r);return document.createTextNode(`${i}{${a}}`)}function Coe(e,t,n,r){const i=window.getComputedStyle(e,n),a=i.getPropertyValue("content");if(a===""||a==="none")return;const o=EVe();try{t.className=`${t.className} ${o}`}catch{return}const s=document.createElement("style");s.appendChild(OVe(o,n,i,r)),t.appendChild(s)}function FVe(e,t,n){Coe(e,t,":before",n),Coe(e,t,":after",n)}const Loe="application/font-woff",Ioe="image/jpeg",BVe={woff:Loe,woff2:Loe,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:Ioe,jpeg:Ioe,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function HVe(e){const t=/\.([^./]*?)$/g.exec(e);return t?t[1]:""}function GZ(e){const t=HVe(e).toLowerCase();return BVe[t]||""}function VVe(e){return e.split(/,/)[1]}function rG(e){return e.search(/^(data:)/)!==-1}function UVe(e,t){return`data:${t};base64,${e}`}async function mye(e,t,n){const r=await fetch(e,t);if(r.status===404)throw new Error(`Resource "${r.url}" not found`);const i=await r.blob();return new Promise((a,o)=>{const s=new FileReader;s.onerror=o,s.onloadend=()=>{try{a(n({res:r,result:s.result}))}catch(c){o(c)}},s.readAsDataURL(i)})}const NU={};function $Ve(e,t,n){let r=e.replace(/\?.*/,"");return n&&(r=e),/ttf|otf|eot|woff2?/i.test(r)&&(r=r.replace(/.*\//,"")),t?`[${t}]${r}`:r}async function KZ(e,t,n){const r=$Ve(e,t,n.includeQueryParams);if(NU[r]!=null)return NU[r];n.cacheBust&&(e+=(/\?/.test(e)?"&":"?")+new Date().getTime());let i;try{const a=await mye(e,n.fetchRequestInit,({res:o,result:s})=>(t||(t=o.headers.get("Content-Type")||""),VVe(s)));i=UVe(a,t)}catch(a){i=n.imagePlaceholder||"";let o=`Failed to fetch resource: ${e}`;a&&(o=typeof a=="string"?a:a.message),o&&console.warn(o)}return NU[r]=i,i}async function WVe(e){const t=e.toDataURL();return t==="data:,"?e.cloneNode(!1):wD(t)}async function GVe(e,t){if(e.currentSrc){const a=document.createElement("canvas"),o=a.getContext("2d");a.width=e.clientWidth,a.height=e.clientHeight,o==null||o.drawImage(e,0,0,a.width,a.height);const s=a.toDataURL();return wD(s)}const n=e.poster,r=GZ(n),i=await KZ(n,r,t);return wD(i)}async function KVe(e,t){var n;try{if(!((n=e==null?void 0:e.contentDocument)===null||n===void 0)&&n.body)return await Jq(e.contentDocument.body,t,!0)}catch{}return e.cloneNode(!1)}async function ZVe(e,t){return ha(e,HTMLCanvasElement)?WVe(e):ha(e,HTMLVideoElement)?GVe(e,t):ha(e,HTMLIFrameElement)?KVe(e,t):e.cloneNode(vye(e))}const XVe=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SLOT",vye=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SVG";async function YVe(e,t,n){var r,i;if(vye(t))return t;let a=[];return XVe(e)&&e.assignedNodes?a=tl(e.assignedNodes()):ha(e,HTMLIFrameElement)&&(!((r=e.contentDocument)===null||r===void 0)&&r.body)?a=tl(e.contentDocument.body.childNodes):a=tl(((i=e.shadowRoot)!==null&&i!==void 0?i:e).childNodes),a.length===0||ha(e,HTMLVideoElement)||await a.reduce((o,s)=>o.then(()=>Jq(s,n)).then(c=>{c&&t.appendChild(c)}),Promise.resolve()),t}function JVe(e,t,n){const r=t.style;if(!r)return;const i=window.getComputedStyle(e);i.cssText?(r.cssText=i.cssText,r.transformOrigin=i.transformOrigin):yye(n).forEach(a=>{let o=i.getPropertyValue(a);a==="font-size"&&o.endsWith("px")&&(o=`${Math.floor(parseFloat(o.substring(0,o.length-2)))-.1}px`),ha(e,HTMLIFrameElement)&&a==="display"&&o==="inline"&&(o="block"),a==="d"&&t.getAttribute("d")&&(o=`path(${t.getAttribute("d")})`),r.setProperty(a,o,i.getPropertyPriority(a))})}function QVe(e,t){ha(e,HTMLTextAreaElement)&&(t.innerHTML=e.value),ha(e,HTMLInputElement)&&t.setAttribute("value",e.value)}function eUe(e,t){if(ha(e,HTMLSelectElement)){const n=t,r=Array.from(n.children).find(i=>e.value===i.getAttribute("value"));r&&r.setAttribute("selected","")}}function tUe(e,t,n){return ha(t,Element)&&(JVe(e,t,n),FVe(e,t,n),QVe(e,t),eUe(e,t)),t}async function nUe(e,t){const n=e.querySelectorAll?e.querySelectorAll("use"):[];if(n.length===0)return e;const r={};for(let a=0;a<n.length;a++){const s=n[a].getAttribute("xlink:href");if(s){const c=e.querySelector(s),l=document.querySelector(s);!c&&l&&!r[s]&&(r[s]=await Jq(l,t,!0))}}const i=Object.values(r);if(i.length){const a="http://www.w3.org/1999/xhtml",o=document.createElementNS(a,"svg");o.setAttribute("xmlns",a),o.style.position="absolute",o.style.width="0",o.style.height="0",o.style.overflow="hidden",o.style.display="none";const s=document.createElementNS(a,"defs");o.appendChild(s);for(let c=0;c<i.length;c++)s.appendChild(i[c]);e.appendChild(o)}return e}async function Jq(e,t,n){return!n&&t.filter&&!t.filter(e)?null:Promise.resolve(e).then(r=>ZVe(r,t)).then(r=>YVe(e,r,t)).then(r=>tUe(e,r,t)).then(r=>nUe(r,t))}const kye=/url\((['"]?)([^'"]+?)\1\)/g,rUe=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,iUe=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function aUe(e){const t=e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${t})(['"]?\\))`,"g")}function oUe(e){const t=[];return e.replace(kye,(n,r,i)=>(t.push(i),n)),t.filter(n=>!rG(n))}async function sUe(e,t,n,r,i){try{const a=n?_Ve(t,n):t,o=GZ(t);let s;return i||(s=await KZ(a,o,r)),e.replace(aUe(t),`$1${s}$3`)}catch{}return e}function cUe(e,{preferredFontFormat:t}){return t?e.replace(iUe,n=>{for(;;){const[r,,i]=rUe.exec(n)||[];if(!i)return"";if(i===t)return`src: ${r};`}}):e}function xye(e){return e.search(kye)!==-1}async function wye(e,t,n){if(!xye(e))return e;const r=cUe(e,n);return oUe(r).reduce((a,o)=>a.then(s=>sUe(s,o,t,n)),Promise.resolve(r))}async function g2(e,t,n){var r;const i=(r=t.style)===null||r===void 0?void 0:r.getPropertyValue(e);if(i){const a=await wye(i,null,n);return t.style.setProperty(e,a,t.style.getPropertyPriority(e)),!0}return!1}async function lUe(e,t){await g2("background",e,t)||await g2("background-image",e,t),await g2("mask",e,t)||await g2("-webkit-mask",e,t)||await g2("mask-image",e,t)||await g2("-webkit-mask-image",e,t)}async function uUe(e,t){const n=ha(e,HTMLImageElement);if(!(n&&!rG(e.src))&&!(ha(e,SVGImageElement)&&!rG(e.href.baseVal)))return;const r=n?e.src:e.href.baseVal,i=await KZ(r,GZ(r),t);await new Promise((a,o)=>{e.onload=a,e.onerror=t.onImageErrorHandler?(...c)=>{try{a(t.onImageErrorHandler(...c))}catch(l){o(l)}}:o;const s=e;s.decode&&(s.decode=a),s.loading==="lazy"&&(s.loading="eager"),n?(e.srcset="",e.src=i):e.href.baseVal=i})}async function dUe(e,t){const r=tl(e.childNodes).map(i=>bye(i,t));await Promise.all(r).then(()=>e)}async function bye(e,t){ha(e,Element)&&(await lUe(e,t),await uUe(e,t),await dUe(e,t))}function hUe(e,t){const{style:n}=e;t.backgroundColor&&(n.backgroundColor=t.backgroundColor),t.width&&(n.width=`${t.width}px`),t.height&&(n.height=`${t.height}px`);const r=t.style;return r!=null&&Object.keys(r).forEach(i=>{n[i]=r[i]}),e}const Aoe={};async function _oe(e){let t=Aoe[e];if(t!=null)return t;const r=await(await fetch(e)).text();return t={url:e,cssText:r},Aoe[e]=t,t}async function Eoe(e,t){let n=e.cssText;const r=/url\(["']?([^"')]+)["']?\)/g,a=(n.match(/url\([^)]+\)/g)||[]).map(async o=>{let s=o.replace(r,"$1");return s.startsWith("https://")||(s=new URL(s,e.url).href),mye(s,t.fetchRequestInit,({result:c})=>(n=n.replace(o,`url(${c})`),[o,c]))});return Promise.all(a).then(()=>n)}function Poe(e){if(e==null)return[];const t=[],n=/(\/\*[\s\S]*?\*\/)/gi;let r=e.replace(n,"");const i=new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})","gi");for(;;){const c=i.exec(r);if(c===null)break;t.push(c[0])}r=r.replace(i,"");const a=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,o="((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})",s=new RegExp(o,"gi");for(;;){let c=a.exec(r);if(c===null){if(c=s.exec(r),c===null)break;a.lastIndex=s.lastIndex}else s.lastIndex=a.lastIndex;t.push(c[0])}return t}async function fUe(e,t){const n=[],r=[];return e.forEach(i=>{if("cssRules"in i)try{tl(i.cssRules||[]).forEach((a,o)=>{if(a.type===CSSRule.IMPORT_RULE){let s=o+1;const c=a.href,l=_oe(c).then(u=>Eoe(u,t)).then(u=>Poe(u).forEach(d=>{try{i.insertRule(d,d.startsWith("@import")?s+=1:i.cssRules.length)}catch(f){console.error("Error inserting rule from remote css",{rule:d,error:f})}})).catch(u=>{console.error("Error loading remote css",u.toString())});r.push(l)}})}catch(a){const o=e.find(s=>s.href==null)||document.styleSheets[0];i.href!=null&&r.push(_oe(i.href).then(s=>Eoe(s,t)).then(s=>Poe(s).forEach(c=>{o.insertRule(c,o.cssRules.length)})).catch(s=>{console.error("Error loading remote stylesheet",s)})),console.error("Error inlining remote css file",a)}}),Promise.all(r).then(()=>(e.forEach(i=>{if("cssRules"in i)try{tl(i.cssRules||[]).forEach(a=>{n.push(a)})}catch(a){console.error(`Error while reading CSS rules from ${i.href}`,a)}}),n))}function pUe(e){return e.filter(t=>t.type===CSSRule.FONT_FACE_RULE).filter(t=>xye(t.style.getPropertyValue("src")))}async function yUe(e,t){if(e.ownerDocument==null)throw new Error("Provided element is not within a Document");const n=tl(e.ownerDocument.styleSheets),r=await fUe(n,t);return pUe(r)}function Mye(e){return e.trim().replace(/["']/g,"")}function gUe(e){const t=new Set;function n(r){(r.style.fontFamily||getComputedStyle(r).fontFamily).split(",").forEach(a=>{t.add(Mye(a))}),Array.from(r.children).forEach(a=>{a instanceof HTMLElement&&n(a)})}return n(e),t}async function mUe(e,t){const n=await yUe(e,t),r=gUe(e);return(await Promise.all(n.filter(a=>r.has(Mye(a.style.fontFamily))).map(a=>{const o=a.parentStyleSheet?a.parentStyleSheet.href:null;return wye(a.cssText,o,t)}))).join(`
7837
7837
  `)}async function vUe(e,t){const n=t.fontEmbedCSS!=null?t.fontEmbedCSS:t.skipFonts?null:await mUe(e,t);if(n){const r=document.createElement("style"),i=document.createTextNode(n);r.appendChild(i),e.firstChild?e.insertBefore(r,e.firstChild):e.appendChild(r)}}async function kUe(e,t={}){const{width:n,height:r}=gye(e,t),i=await Jq(e,t,!0);return await vUe(i,t),await bye(i,t),hUe(i,t),await DVe(i,n,r)}async function xUe(e,t={}){const{width:n,height:r}=gye(e,t),i=await kUe(e,t),a=await wD(i),o=document.createElement("canvas"),s=o.getContext("2d"),c=t.pixelRatio||RVe(),l=t.canvasWidth||n,u=t.canvasHeight||r;return o.width=l*c,o.height=u*c,t.skipAutoScale||jVe(o),o.style.width=`${l}`,o.style.height=`${u}`,t.backgroundColor&&(s.fillStyle=t.backgroundColor,s.fillRect(0,0,o.width,o.height)),s.drawImage(a,0,0,o.width,o.height),o}async function wUe(e,t={}){return(await xUe(e,t)).toDataURL()}const bUe=e=>e instanceof Element?!(e.classList.contains("react-flow__minimap")||e.classList.contains("react-flow__controls")||e.classList.contains("react-flow__panel")):!0,MUe=async e=>{const t=await wUe(e,{cacheBust:!0,filter:bUe}),n=await new Promise((r,i)=>{const a=new Image;a.onload=()=>r({width:a.naturalWidth,height:a.naturalHeight}),a.onerror=()=>i(new Error("Failed to decode captured image")),a.src=t});return{dataUrl:t,...n}},SUe=(e,t)=>{const n=document.createElement("a");n.href=e,n.download=t,n.rel="noopener",document.body.appendChild(n),n.click(),n.remove()};function CUe(e,t){const n=e.screenToFlowPosition({x:t.width/2,y:t.height/2});return{x:n.x-Pf.width/2,y:n.y-Pf.height/2}}const LUe=e=>({type:"imageNode",position:e.position,data:{path:"",alt:e.originalFilename,width:e.dims.width,height:e.dims.height,_uploading:!0}}),IUe=e=>({type:"imageNode",data:Sye(e)}),AUe=e=>({type:"imageNode",position:e.position,data:{path:"",alt:e.originalFilename,width:e.dims.width,height:e.dims.height,_uploadError:e.message}}),Sye=e=>({...WAe(e.path,e.dims,e.lastUsed),alt:e.originalFilename}),_Ue=async(e,t)=>{const{nodeId:n,demoId:r,file:i,originalFilename:a,position:o,dims:s,lastUsed:c}=e;t.rememberRetry(n,{file:i,originalFilename:a,position:o,dims:s}),t.setOverride(n,LUe({position:o,dims:s,originalFilename:a}));let l;try{l=(await t.upload(r,i,a)).path}catch(h){const y=h instanceof Error?h.message:String(h);throw t.setOverride(n,AUe({position:o,dims:s,originalFilename:a,message:y})),h}t.setOverride(n,IUe({path:l,dims:s,originalFilename:a,lastUsed:c}));const u=Sye({path:l,dims:s,originalFilename:a,lastUsed:c}),d={id:n,type:"imageNode",position:o,data:u},{id:f}=await t.createNode(r,d);t.forgetRetry(n),t.pushUndo&&t.pushUndo({do:async()=>{await t.createNode(r,{...d,id:f})},undo:async()=>{await t.deleteNode(r,f)}})},Cye="seeflow:last-used-style:v1",RU=()=>({node:{},connector:{}}),jU=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),ZZ=()=>{var e;try{const t=(e=globalThis.localStorage)==null?void 0:e.getItem(Cye);if(!t)return RU();const n=JSON.parse(t);if(!jU(n))return RU();const r=jU(n.node)?n.node:{},i=jU(n.connector)?n.connector:{};return{node:r,connector:i}}catch{return RU()}},Lye=e=>{var t;try{(t=globalThis.localStorage)==null||t.setItem(Cye,JSON.stringify(e))}catch{}},Sm=()=>ZZ(),Noe=e=>{const{alt:t,...n}=e,r={...n};r.borderSize!==void 0&&r.borderWidth===void 0?r.borderWidth=r.borderSize:r.borderWidth!==void 0&&r.borderSize===void 0&&(r.borderSize=r.borderWidth);const i=ZZ();Lye({...i,node:{...i.node,...r}})},EUe=e=>{const t=ZZ();Lye({...t,connector:{...t.connector,...e}})},PUe="modulepreload",NUe=function(e){return"/"+e},Roe={},TU=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),s=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));i=Promise.allSettled(n.map(c=>{if(c=NUe(c),c in Roe)return;Roe[c]=!0;const l=c.endsWith(".css"),u=l?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${u}`))return;const d=document.createElement("link");if(d.rel=l?"stylesheet":PUe,l||(d.as="script"),d.crossOrigin="",d.href=c,s&&d.setAttribute("nonce",s),document.head.appendChild(d),l)return new Promise((f,h)=>{d.addEventListener("load",f),d.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${c}`)))})}))}function a(o){const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=o,window.dispatchEvent(s),!s.defaultPrevented)throw o}return i.then(o=>{for(const s of o||[])s.status==="rejected"&&a(s.reason);return t().catch(a)})};function kn(e){"@babel/helpers - typeof";return kn=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},kn(e)}function RUe(e){if(Array.isArray(e))return e}function jUe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(u){l=!0,i=u}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function joe(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function TUe(e,t){if(e){if(typeof e=="string")return joe(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?joe(e,t):void 0}}function DUe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
7838
7838
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Toe(e,t){return RUe(e)||jUe(e,t)||TUe(e,t)||DUe()}function Doe(e,t="utf8"){return new TextDecoder(t).decode(e)}const qUe=new TextEncoder;function zUe(e){return qUe.encode(e)}const OUe=1024*8,FUe=(()=>{const e=new Uint8Array(4),t=new Uint32Array(e.buffer);return!((t[0]=1)&e[0])})(),DU={int8:globalThis.Int8Array,uint8:globalThis.Uint8Array,int16:globalThis.Int16Array,uint16:globalThis.Uint16Array,int32:globalThis.Int32Array,uint32:globalThis.Uint32Array,uint64:globalThis.BigUint64Array,int64:globalThis.BigInt64Array,float32:globalThis.Float32Array,float64:globalThis.Float64Array};class XZ{constructor(t=OUe,n={}){vn(this,"buffer");vn(this,"byteLength");vn(this,"byteOffset");vn(this,"length");vn(this,"offset");vn(this,"lastWrittenByte");vn(this,"littleEndian");vn(this,"_data");vn(this,"_mark");vn(this,"_marks");let r=!1;typeof t=="number"?t=new ArrayBuffer(t):(r=!0,this.lastWrittenByte=t.byteLength);const i=n.offset?n.offset>>>0:0,a=t.byteLength-i;let o=i;(ArrayBuffer.isView(t)||t instanceof XZ)&&(t.byteLength!==t.buffer.byteLength&&(o=t.byteOffset+i),t=t.buffer),r?this.lastWrittenByte=a:this.lastWrittenByte=0,this.buffer=t,this.length=a,this.byteLength=a,this.byteOffset=o,this.offset=0,this.littleEndian=!0,this._data=new DataView(this.buffer,o,a),this._mark=0,this._marks=[]}available(t=1){return this.offset+t<=this.length}isLittleEndian(){return this.littleEndian}setLittleEndian(){return this.littleEndian=!0,this}isBigEndian(){return!this.littleEndian}setBigEndian(){return this.littleEndian=!1,this}skip(t=1){return this.offset+=t,this}back(t=1){return this.offset-=t,this}seek(t){return this.offset=t,this}mark(){return this._mark=this.offset,this}reset(){return this.offset=this._mark,this}pushMark(){return this._marks.push(this.offset),this}popMark(){const t=this._marks.pop();if(t===void 0)throw new Error("Mark stack empty");return this.seek(t),this}rewind(){return this.offset=0,this}ensureAvailable(t=1){if(!this.available(t)){const r=(this.offset+t)*2,i=new Uint8Array(r);i.set(new Uint8Array(this.buffer)),this.buffer=i.buffer,this.length=r,this.byteLength=r,this._data=new DataView(this.buffer)}return this}readBoolean(){return this.readUint8()!==0}readInt8(){return this._data.getInt8(this.offset++)}readUint8(){return this._data.getUint8(this.offset++)}readByte(){return this.readUint8()}readBytes(t=1){return this.readArray(t,"uint8")}readArray(t,n){const r=DU[n].BYTES_PER_ELEMENT*t,i=this.byteOffset+this.offset,a=this.buffer.slice(i,i+r);if(this.littleEndian===FUe&&n!=="uint8"&&n!=="int8"){const s=new Uint8Array(this.buffer.slice(i,i+r));s.reverse();const c=new DU[n](s.buffer);return this.offset+=r,c.reverse(),c}const o=new DU[n](a);return this.offset+=r,o}readInt16(){const t=this._data.getInt16(this.offset,this.littleEndian);return this.offset+=2,t}readUint16(){const t=this._data.getUint16(this.offset,this.littleEndian);return this.offset+=2,t}readInt32(){const t=this._data.getInt32(this.offset,this.littleEndian);return this.offset+=4,t}readUint32(){const t=this._data.getUint32(this.offset,this.littleEndian);return this.offset+=4,t}readFloat32(){const t=this._data.getFloat32(this.offset,this.littleEndian);return this.offset+=4,t}readFloat64(){const t=this._data.getFloat64(this.offset,this.littleEndian);return this.offset+=8,t}readBigInt64(){const t=this._data.getBigInt64(this.offset,this.littleEndian);return this.offset+=8,t}readBigUint64(){const t=this._data.getBigUint64(this.offset,this.littleEndian);return this.offset+=8,t}readChar(){return String.fromCharCode(this.readInt8())}readChars(t=1){let n="";for(let r=0;r<t;r++)n+=this.readChar();return n}readUtf8(t=1){return Doe(this.readBytes(t))}decodeText(t=1,n="utf8"){return Doe(this.readBytes(t),n)}writeBoolean(t){return this.writeUint8(t?255:0),this}writeInt8(t){return this.ensureAvailable(1),this._data.setInt8(this.offset++,t),this._updateLastWrittenByte(),this}writeUint8(t){return this.ensureAvailable(1),this._data.setUint8(this.offset++,t),this._updateLastWrittenByte(),this}writeByte(t){return this.writeUint8(t)}writeBytes(t){this.ensureAvailable(t.length);for(let n=0;n<t.length;n++)this._data.setUint8(this.offset++,t[n]);return this._updateLastWrittenByte(),this}writeInt16(t){return this.ensureAvailable(2),this._data.setInt16(this.offset,t,this.littleEndian),this.offset+=2,this._updateLastWrittenByte(),this}writeUint16(t){return this.ensureAvailable(2),this._data.setUint16(this.offset,t,this.littleEndian),this.offset+=2,this._updateLastWrittenByte(),this}writeInt32(t){return this.ensureAvailable(4),this._data.setInt32(this.offset,t,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeUint32(t){return this.ensureAvailable(4),this._data.setUint32(this.offset,t,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeFloat32(t){return this.ensureAvailable(4),this._data.setFloat32(this.offset,t,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeFloat64(t){return this.ensureAvailable(8),this._data.setFloat64(this.offset,t,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeBigInt64(t){return this.ensureAvailable(8),this._data.setBigInt64(this.offset,t,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeBigUint64(t){return this.ensureAvailable(8),this._data.setBigUint64(this.offset,t,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeChar(t){return this.writeUint8(t.charCodeAt(0))}writeChars(t){for(let n=0;n<t.length;n++)this.writeUint8(t.charCodeAt(n));return this}writeUtf8(t){return this.writeBytes(zUe(t))}toArray(){return new Uint8Array(this.buffer,this.byteOffset,this.lastWrittenByte)}getWrittenByteLength(){return this.lastWrittenByte-this.byteOffset}_updateLastWrittenByte(){this.offset>this.lastWrittenByte&&(this.lastWrittenByte=this.offset)}}function r0(e){let t=e.length;for(;--t>=0;)e[t]=0}const BUe=3,HUe=258,Iye=29,VUe=256,UUe=VUe+1+Iye,Aye=30,$Ue=512,WUe=new Array((UUe+2)*2);r0(WUe);const GUe=new Array(Aye*2);r0(GUe);const KUe=new Array($Ue);r0(KUe);const ZUe=new Array(HUe-BUe+1);r0(ZUe);const XUe=new Array(Iye);r0(XUe);const YUe=new Array(Aye);r0(YUe);const JUe=(e,t,n,r)=>{let i=e&65535|0,a=e>>>16&65535|0,o=0;for(;n!==0;){o=n>2e3?2e3:n,n-=o;do i=i+t[r++]|0,a=a+i|0;while(--o);i%=65521,a%=65521}return i|a<<16|0};var iG=JUe;const QUe=()=>{let e,t=[];for(var n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=e&1?3988292384^e>>>1:e>>>1;t[n]=e}return t},e$e=new Uint32Array(QUe()),t$e=(e,t,n,r)=>{const i=e$e,a=r+n;e^=-1;for(let o=r;o<a;o++)e=e>>>8^i[(e^t[o])&255];return e^-1};var Qo=t$e,aG={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},_ye={Z_NO_FLUSH:0,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_DEFLATED:8};const n$e=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var r$e=function(e){const t=Array.prototype.slice.call(arguments,1);for(;t.length;){const n=t.shift();if(n){if(typeof n!="object")throw new TypeError(n+"must be non-object");for(const r in n)n$e(n,r)&&(e[r]=n[r])}}return e},i$e=e=>{let t=0;for(let r=0,i=e.length;r<i;r++)t+=e[r].length;const n=new Uint8Array(t);for(let r=0,i=0,a=e.length;r<a;r++){let o=e[r];n.set(o,i),i+=o.length}return n},Eye={assign:r$e,flattenChunks:i$e};let Pye=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{Pye=!1}const Sy=new Uint8Array(256);for(let e=0;e<256;e++)Sy[e]=e>=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;Sy[254]=Sy[254]=1;var a$e=e=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(e);let t,n,r,i,a,o=e.length,s=0;for(i=0;i<o;i++)n=e.charCodeAt(i),(n&64512)===55296&&i+1<o&&(r=e.charCodeAt(i+1),(r&64512)===56320&&(n=65536+(n-55296<<10)+(r-56320),i++)),s+=n<128?1:n<2048?2:n<65536?3:4;for(t=new Uint8Array(s),a=0,i=0;a<s;i++)n=e.charCodeAt(i),(n&64512)===55296&&i+1<o&&(r=e.charCodeAt(i+1),(r&64512)===56320&&(n=65536+(n-55296<<10)+(r-56320),i++)),n<128?t[a++]=n:n<2048?(t[a++]=192|n>>>6,t[a++]=128|n&63):n<65536?(t[a++]=224|n>>>12,t[a++]=128|n>>>6&63,t[a++]=128|n&63):(t[a++]=240|n>>>18,t[a++]=128|n>>>12&63,t[a++]=128|n>>>6&63,t[a++]=128|n&63);return t};const o$e=(e,t)=>{if(t<65534&&e.subarray&&Pye)return String.fromCharCode.apply(null,e.length===t?e:e.subarray(0,t));let n="";for(let r=0;r<t;r++)n+=String.fromCharCode(e[r]);return n};var s$e=(e,t)=>{const n=t||e.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(e.subarray(0,t));let r,i;const a=new Array(n*2);for(i=0,r=0;r<n;){let o=e[r++];if(o<128){a[i++]=o;continue}let s=Sy[o];if(s>4){a[i++]=65533,r+=s-1;continue}for(o&=s===2?31:s===3?15:7;s>1&&r<n;)o=o<<6|e[r++]&63,s--;if(s>1){a[i++]=65533;continue}o<65536?a[i++]=o:(o-=65536,a[i++]=55296|o>>10&1023,a[i++]=56320|o&1023)}return o$e(a,i)},c$e=(e,t)=>{t=t||e.length,t>e.length&&(t=e.length);let n=t-1;for(;n>=0&&(e[n]&192)===128;)n--;return n<0||n===0?t:n+Sy[e[n]]>t?n:t},oG={string2buf:a$e,buf2string:s$e,utf8border:c$e};function l$e(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}var u$e=l$e;const Cm=16209,d$e=16191;var h$e=function(t,n){let r,i,a,o,s,c,l,u,d,f,h,y,v,k,g,S,w,C,_,A,j,O,T,D;const I=t.state;r=t.next_in,T=t.input,i=r+(t.avail_in-5),a=t.next_out,D=t.output,o=a-(n-t.avail_out),s=a+(t.avail_out-257),c=I.dmax,l=I.wsize,u=I.whave,d=I.wnext,f=I.window,h=I.hold,y=I.bits,v=I.lencode,k=I.distcode,g=(1<<I.lenbits)-1,S=(1<<I.distbits)-1;e:do{y<15&&(h+=T[r++]<<y,y+=8,h+=T[r++]<<y,y+=8),w=v[h&g];t:for(;;){if(C=w>>>24,h>>>=C,y-=C,C=w>>>16&255,C===0)D[a++]=w&65535;else if(C&16){_=w&65535,C&=15,C&&(y<C&&(h+=T[r++]<<y,y+=8),_+=h&(1<<C)-1,h>>>=C,y-=C),y<15&&(h+=T[r++]<<y,y+=8,h+=T[r++]<<y,y+=8),w=k[h&S];n:for(;;){if(C=w>>>24,h>>>=C,y-=C,C=w>>>16&255,C&16){if(A=w&65535,C&=15,y<C&&(h+=T[r++]<<y,y+=8,y<C&&(h+=T[r++]<<y,y+=8)),A+=h&(1<<C)-1,A>c){t.msg="invalid distance too far back",I.mode=Cm;break e}if(h>>>=C,y-=C,C=a-o,A>C){if(C=A-C,C>u&&I.sane){t.msg="invalid distance too far back",I.mode=Cm;break e}if(j=0,O=f,d===0){if(j+=l-C,C<_){_-=C;do D[a++]=f[j++];while(--C);j=a-A,O=D}}else if(d<C){if(j+=l+d-C,C-=d,C<_){_-=C;do D[a++]=f[j++];while(--C);if(j=0,d<_){C=d,_-=C;do D[a++]=f[j++];while(--C);j=a-A,O=D}}}else if(j+=d-C,C<_){_-=C;do D[a++]=f[j++];while(--C);j=a-A,O=D}for(;_>2;)D[a++]=O[j++],D[a++]=O[j++],D[a++]=O[j++],_-=3;_&&(D[a++]=O[j++],_>1&&(D[a++]=O[j++]))}else{j=a-A;do D[a++]=D[j++],D[a++]=D[j++],D[a++]=D[j++],_-=3;while(_>2);_&&(D[a++]=D[j++],_>1&&(D[a++]=D[j++]))}}else if(C&64){t.msg="invalid distance code",I.mode=Cm;break e}else{w=k[(w&65535)+(h&(1<<C)-1)];continue n}break}}else if(C&64)if(C&32){I.mode=d$e;break e}else{t.msg="invalid literal/length code",I.mode=Cm;break e}else{w=v[(w&65535)+(h&(1<<C)-1)];continue t}break}}while(r<i&&a<s);_=y>>3,r-=_,y-=_<<3,h&=(1<<y)-1,t.next_in=r,t.next_out=a,t.avail_in=r<i?5+(i-r):5-(r-i),t.avail_out=a<s?257+(s-a):257-(a-s),I.hold=h,I.bits=y};const m2=15,qoe=852,zoe=592,Ooe=0,qU=1,Foe=2,f$e=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),p$e=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),y$e=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),g$e=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]),m$e=(e,t,n,r,i,a,o,s)=>{const c=s.bits;let l=0,u=0,d=0,f=0,h=0,y=0,v=0,k=0,g=0,S=0,w,C,_,A,j,O=null,T;const D=new Uint16Array(m2+1),I=new Uint16Array(m2+1);let R=null,U,q,K;for(l=0;l<=m2;l++)D[l]=0;for(u=0;u<r;u++)D[t[n+u]]++;for(h=c,f=m2;f>=1&&D[f]===0;f--);if(h>f&&(h=f),f===0)return i[a++]=1<<24|64<<16|0,i[a++]=1<<24|64<<16|0,s.bits=1,0;for(d=1;d<f&&D[d]===0;d++);for(h<d&&(h=d),k=1,l=1;l<=m2;l++)if(k<<=1,k-=D[l],k<0)return-1;if(k>0&&(e===Ooe||f!==1))return-1;for(I[1]=0,l=1;l<m2;l++)I[l+1]=I[l]+D[l];for(u=0;u<r;u++)t[n+u]!==0&&(o[I[t[n+u]]++]=u);if(e===Ooe?(O=R=o,T=20):e===qU?(O=f$e,R=p$e,T=257):(O=y$e,R=g$e,T=0),S=0,u=0,l=d,j=a,y=h,v=0,_=-1,g=1<<h,A=g-1,e===qU&&g>qoe||e===Foe&&g>zoe)return 1;for(;;){U=l-v,o[u]+1<T?(q=0,K=o[u]):o[u]>=T?(q=R[o[u]-T],K=O[o[u]-T]):(q=96,K=0),w=1<<l-v,C=1<<y,d=C;do C-=w,i[j+(S>>v)+C]=U<<24|q<<16|K|0;while(C!==0);for(w=1<<l-1;S&w;)w>>=1;if(w!==0?(S&=w-1,S+=w):S=0,u++,--D[l]===0){if(l===f)break;l=t[n+o[u]]}if(l>h&&(S&A)!==_){for(v===0&&(v=h),j+=d,y=l-v,k=1<<y;y+v<f&&(k-=D[y+v],!(k<=0));)y++,k<<=1;if(g+=1<<y,e===qU&&g>qoe||e===Foe&&g>zoe)return 1;_=S&A,i[_]=h<<24|y<<16|j-a|0}}return S!==0&&(i[j+S]=l-v<<24|64<<16|0),s.bits=h,0};var Vp=m$e;const v$e=0,Nye=1,Rye=2,{Z_FINISH:Boe,Z_BLOCK:k$e,Z_TREES:Lm,Z_OK:Dh,Z_STREAM_END:x$e,Z_NEED_DICT:w$e,Z_STREAM_ERROR:co,Z_DATA_ERROR:jye,Z_MEM_ERROR:Tye,Z_BUF_ERROR:b$e,Z_DEFLATED:Hoe}=_ye,Qq=16180,Voe=16181,Uoe=16182,$oe=16183,Woe=16184,Goe=16185,Koe=16186,Zoe=16187,Xoe=16188,Yoe=16189,bD=16190,Bs=16191,zU=16192,Joe=16193,OU=16194,Qoe=16195,ese=16196,tse=16197,nse=16198,Im=16199,Am=16200,rse=16201,ise=16202,ase=16203,ose=16204,sse=16205,FU=16206,cse=16207,lse=16208,er=16209,Dye=16210,qye=16211,M$e=852,S$e=592,C$e=15,L$e=C$e,use=e=>(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24);function I$e(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const Zh=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||t.mode<Qq||t.mode>qye?1:0},zye=e=>{if(Zh(e))return co;const t=e.state;return e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=t.wrap&1),t.mode=Qq,t.last=0,t.havedict=0,t.flags=-1,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(M$e),t.distcode=t.distdyn=new Int32Array(S$e),t.sane=1,t.back=-1,Dh},Oye=e=>{if(Zh(e))return co;const t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,zye(e)},Fye=(e,t)=>{let n;if(Zh(e))return co;const r=e.state;return t<0?(n=0,t=-t):(n=(t>>4)+5,t<48&&(t&=15)),t&&(t<8||t>15)?co:(r.window!==null&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,Oye(e))},Bye=(e,t)=>{if(!e)return co;const n=new I$e;e.state=n,n.strm=e,n.window=null,n.mode=Qq;const r=Fye(e,t);return r!==Dh&&(e.state=null),r},A$e=e=>Bye(e,L$e);let dse=!0,BU,HU;const _$e=e=>{if(dse){BU=new Int32Array(512),HU=new Int32Array(32);let t=0;for(;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(Vp(Nye,e.lens,0,288,BU,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;Vp(Rye,e.lens,0,32,HU,0,e.work,{bits:5}),dse=!1}e.lencode=BU,e.lenbits=9,e.distcode=HU,e.distbits=5},Hye=(e,t,n,r)=>{let i;const a=e.state;return a.window===null&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new Uint8Array(a.wsize)),r>=a.wsize?(a.window.set(t.subarray(n-a.wsize,n),0),a.wnext=0,a.whave=a.wsize):(i=a.wsize-a.wnext,i>r&&(i=r),a.window.set(t.subarray(n-r,n-r+i),a.wnext),r-=i,r?(a.window.set(t.subarray(n-r,n),0),a.wnext=r,a.whave=a.wsize):(a.wnext+=i,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=i))),0},E$e=(e,t)=>{let n,r,i,a,o,s,c,l,u,d,f,h,y,v,k=0,g,S,w,C,_,A,j,O;const T=new Uint8Array(4);let D,I;const R=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(Zh(e)||!e.output||!e.input&&e.avail_in!==0)return co;n=e.state,n.mode===Bs&&(n.mode=zU),o=e.next_out,i=e.output,c=e.avail_out,a=e.next_in,r=e.input,s=e.avail_in,l=n.hold,u=n.bits,d=s,f=c,O=Dh;e:for(;;)switch(n.mode){case Qq:if(n.wrap===0){n.mode=zU;break}for(;u<16;){if(s===0)break e;s--,l+=r[a++]<<u,u+=8}if(n.wrap&2&&l===35615){n.wbits===0&&(n.wbits=15),n.check=0,T[0]=l&255,T[1]=l>>>8&255,n.check=Qo(n.check,T,2,0),l=0,u=0,n.mode=Voe;break}if(n.head&&(n.head.done=!1),!(n.wrap&1)||(((l&255)<<8)+(l>>8))%31){e.msg="incorrect header check",n.mode=er;break}if((l&15)!==Hoe){e.msg="unknown compression method",n.mode=er;break}if(l>>>=4,u-=4,j=(l&15)+8,n.wbits===0&&(n.wbits=j),j>15||j>n.wbits){e.msg="invalid window size",n.mode=er;break}n.dmax=1<<n.wbits,n.flags=0,e.adler=n.check=1,n.mode=l&512?Yoe:Bs,l=0,u=0;break;case Voe:for(;u<16;){if(s===0)break e;s--,l+=r[a++]<<u,u+=8}if(n.flags=l,(n.flags&255)!==Hoe){e.msg="unknown compression method",n.mode=er;break}if(n.flags&57344){e.msg="unknown header flags set",n.mode=er;break}n.head&&(n.head.text=l>>8&1),n.flags&512&&n.wrap&4&&(T[0]=l&255,T[1]=l>>>8&255,n.check=Qo(n.check,T,2,0)),l=0,u=0,n.mode=Uoe;case Uoe:for(;u<32;){if(s===0)break e;s--,l+=r[a++]<<u,u+=8}n.head&&(n.head.time=l),n.flags&512&&n.wrap&4&&(T[0]=l&255,T[1]=l>>>8&255,T[2]=l>>>16&255,T[3]=l>>>24&255,n.check=Qo(n.check,T,4,0)),l=0,u=0,n.mode=$oe;case $oe:for(;u<16;){if(s===0)break e;s--,l+=r[a++]<<u,u+=8}n.head&&(n.head.xflags=l&255,n.head.os=l>>8),n.flags&512&&n.wrap&4&&(T[0]=l&255,T[1]=l>>>8&255,n.check=Qo(n.check,T,2,0)),l=0,u=0,n.mode=Woe;case Woe:if(n.flags&1024){for(;u<16;){if(s===0)break e;s--,l+=r[a++]<<u,u+=8}n.length=l,n.head&&(n.head.extra_len=l),n.flags&512&&n.wrap&4&&(T[0]=l&255,T[1]=l>>>8&255,n.check=Qo(n.check,T,2,0)),l=0,u=0}else n.head&&(n.head.extra=null);n.mode=Goe;case Goe:if(n.flags&1024&&(h=n.length,h>s&&(h=s),h&&(n.head&&(j=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Uint8Array(n.head.extra_len)),n.head.extra.set(r.subarray(a,a+h),j)),n.flags&512&&n.wrap&4&&(n.check=Qo(n.check,r,h,a)),s-=h,a+=h,n.length-=h),n.length))break e;n.length=0,n.mode=Koe;case Koe:if(n.flags&2048){if(s===0)break e;h=0;do j=r[a+h++],n.head&&j&&n.length<65536&&(n.head.name+=String.fromCharCode(j));while(j&&h<s);if(n.flags&512&&n.wrap&4&&(n.check=Qo(n.check,r,h,a)),s-=h,a+=h,j)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=Zoe;case Zoe:if(n.flags&4096){if(s===0)break e;h=0;do j=r[a+h++],n.head&&j&&n.length<65536&&(n.head.comment+=String.fromCharCode(j));while(j&&h<s);if(n.flags&512&&n.wrap&4&&(n.check=Qo(n.check,r,h,a)),s-=h,a+=h,j)break e}else n.head&&(n.head.comment=null);n.mode=Xoe;case Xoe:if(n.flags&512){for(;u<16;){if(s===0)break e;s--,l+=r[a++]<<u,u+=8}if(n.wrap&4&&l!==(n.check&65535)){e.msg="header crc mismatch",n.mode=er;break}l=0,u=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=Bs;break;case Yoe:for(;u<32;){if(s===0)break e;s--,l+=r[a++]<<u,u+=8}e.adler=n.check=use(l),l=0,u=0,n.mode=bD;case bD:if(n.havedict===0)return e.next_out=o,e.avail_out=c,e.next_in=a,e.avail_in=s,n.hold=l,n.bits=u,w$e;e.adler=n.check=1,n.mode=Bs;case Bs:if(t===k$e||t===Lm)break e;case zU:if(n.last){l>>>=u&7,u-=u&7,n.mode=FU;break}for(;u<3;){if(s===0)break e;s--,l+=r[a++]<<u,u+=8}switch(n.last=l&1,l>>>=1,u-=1,l&3){case 0:n.mode=Joe;break;case 1:if(_$e(n),n.mode=Im,t===Lm){l>>>=2,u-=2;break e}break;case 2:n.mode=ese;break;case 3:e.msg="invalid block type",n.mode=er}l>>>=2,u-=2;break;case Joe:for(l>>>=u&7,u-=u&7;u<32;){if(s===0)break e;s--,l+=r[a++]<<u,u+=8}if((l&65535)!==(l>>>16^65535)){e.msg="invalid stored block lengths",n.mode=er;break}if(n.length=l&65535,l=0,u=0,n.mode=OU,t===Lm)break e;case OU:n.mode=Qoe;case Qoe:if(h=n.length,h){if(h>s&&(h=s),h>c&&(h=c),h===0)break e;i.set(r.subarray(a,a+h),o),s-=h,a+=h,c-=h,o+=h,n.length-=h;break}n.mode=Bs;break;case ese:for(;u<14;){if(s===0)break e;s--,l+=r[a++]<<u,u+=8}if(n.nlen=(l&31)+257,l>>>=5,u-=5,n.ndist=(l&31)+1,l>>>=5,u-=5,n.ncode=(l&15)+4,l>>>=4,u-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=er;break}n.have=0,n.mode=tse;case tse:for(;n.have<n.ncode;){for(;u<3;){if(s===0)break e;s--,l+=r[a++]<<u,u+=8}n.lens[R[n.have++]]=l&7,l>>>=3,u-=3}for(;n.have<19;)n.lens[R[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,D={bits:n.lenbits},O=Vp(v$e,n.lens,0,19,n.lencode,0,n.work,D),n.lenbits=D.bits,O){e.msg="invalid code lengths set",n.mode=er;break}n.have=0,n.mode=nse;case nse:for(;n.have<n.nlen+n.ndist;){for(;k=n.lencode[l&(1<<n.lenbits)-1],g=k>>>24,S=k>>>16&255,w=k&65535,!(g<=u);){if(s===0)break e;s--,l+=r[a++]<<u,u+=8}if(w<16)l>>>=g,u-=g,n.lens[n.have++]=w;else{if(w===16){for(I=g+2;u<I;){if(s===0)break e;s--,l+=r[a++]<<u,u+=8}if(l>>>=g,u-=g,n.have===0){e.msg="invalid bit length repeat",n.mode=er;break}j=n.lens[n.have-1],h=3+(l&3),l>>>=2,u-=2}else if(w===17){for(I=g+3;u<I;){if(s===0)break e;s--,l+=r[a++]<<u,u+=8}l>>>=g,u-=g,j=0,h=3+(l&7),l>>>=3,u-=3}else{for(I=g+7;u<I;){if(s===0)break e;s--,l+=r[a++]<<u,u+=8}l>>>=g,u-=g,j=0,h=11+(l&127),l>>>=7,u-=7}if(n.have+h>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=er;break}for(;h--;)n.lens[n.have++]=j}}if(n.mode===er)break;if(n.lens[256]===0){e.msg="invalid code -- missing end-of-block",n.mode=er;break}if(n.lenbits=9,D={bits:n.lenbits},O=Vp(Nye,n.lens,0,n.nlen,n.lencode,0,n.work,D),n.lenbits=D.bits,O){e.msg="invalid literal/lengths set",n.mode=er;break}if(n.distbits=6,n.distcode=n.distdyn,D={bits:n.distbits},O=Vp(Rye,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,D),n.distbits=D.bits,O){e.msg="invalid distances set",n.mode=er;break}if(n.mode=Im,t===Lm)break e;case Im:n.mode=Am;case Am:if(s>=6&&c>=258){e.next_out=o,e.avail_out=c,e.next_in=a,e.avail_in=s,n.hold=l,n.bits=u,h$e(e,f),o=e.next_out,i=e.output,c=e.avail_out,a=e.next_in,r=e.input,s=e.avail_in,l=n.hold,u=n.bits,n.mode===Bs&&(n.back=-1);break}for(n.back=0;k=n.lencode[l&(1<<n.lenbits)-1],g=k>>>24,S=k>>>16&255,w=k&65535,!(g<=u);){if(s===0)break e;s--,l+=r[a++]<<u,u+=8}if(S&&!(S&240)){for(C=g,_=S,A=w;k=n.lencode[A+((l&(1<<C+_)-1)>>C)],g=k>>>24,S=k>>>16&255,w=k&65535,!(C+g<=u);){if(s===0)break e;s--,l+=r[a++]<<u,u+=8}l>>>=C,u-=C,n.back+=C}if(l>>>=g,u-=g,n.back+=g,n.length=w,S===0){n.mode=sse;break}if(S&32){n.back=-1,n.mode=Bs;break}if(S&64){e.msg="invalid literal/length code",n.mode=er;break}n.extra=S&15,n.mode=rse;case rse:if(n.extra){for(I=n.extra;u<I;){if(s===0)break e;s--,l+=r[a++]<<u,u+=8}n.length+=l&(1<<n.extra)-1,l>>>=n.extra,u-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=ise;case ise:for(;k=n.distcode[l&(1<<n.distbits)-1],g=k>>>24,S=k>>>16&255,w=k&65535,!(g<=u);){if(s===0)break e;s--,l+=r[a++]<<u,u+=8}if(!(S&240)){for(C=g,_=S,A=w;k=n.distcode[A+((l&(1<<C+_)-1)>>C)],g=k>>>24,S=k>>>16&255,w=k&65535,!(C+g<=u);){if(s===0)break e;s--,l+=r[a++]<<u,u+=8}l>>>=C,u-=C,n.back+=C}if(l>>>=g,u-=g,n.back+=g,S&64){e.msg="invalid distance code",n.mode=er;break}n.offset=w,n.extra=S&15,n.mode=ase;case ase:if(n.extra){for(I=n.extra;u<I;){if(s===0)break e;s--,l+=r[a++]<<u,u+=8}n.offset+=l&(1<<n.extra)-1,l>>>=n.extra,u-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=er;break}n.mode=ose;case ose:if(c===0)break e;if(h=f-c,n.offset>h){if(h=n.offset-h,h>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=er;break}h>n.wnext?(h-=n.wnext,y=n.wsize-h):y=n.wnext-h,h>n.length&&(h=n.length),v=n.window}else v=i,y=o-n.offset,h=n.length;h>c&&(h=c),c-=h,n.length-=h;do i[o++]=v[y++];while(--h);n.length===0&&(n.mode=Am);break;case sse:if(c===0)break e;i[o++]=n.length,c--,n.mode=Am;break;case FU:if(n.wrap){for(;u<32;){if(s===0)break e;s--,l|=r[a++]<<u,u+=8}if(f-=c,e.total_out+=f,n.total+=f,n.wrap&4&&f&&(e.adler=n.check=n.flags?Qo(n.check,i,f,o-f):iG(n.check,i,f,o-f)),f=c,n.wrap&4&&(n.flags?l:use(l))!==n.check){e.msg="incorrect data check",n.mode=er;break}l=0,u=0}n.mode=cse;case cse:if(n.wrap&&n.flags){for(;u<32;){if(s===0)break e;s--,l+=r[a++]<<u,u+=8}if(n.wrap&4&&l!==(n.total&4294967295)){e.msg="incorrect length check",n.mode=er;break}l=0,u=0}n.mode=lse;case lse:O=x$e;break e;case er:O=jye;break e;case Dye:return Tye;case qye:default:return co}return e.next_out=o,e.avail_out=c,e.next_in=a,e.avail_in=s,n.hold=l,n.bits=u,(n.wsize||f!==e.avail_out&&n.mode<er&&(n.mode<FU||t!==Boe))&&Hye(e,e.output,e.next_out,f-e.avail_out),d-=e.avail_in,f-=e.avail_out,e.total_in+=d,e.total_out+=f,n.total+=f,n.wrap&4&&f&&(e.adler=n.check=n.flags?Qo(n.check,i,f,e.next_out-f):iG(n.check,i,f,e.next_out-f)),e.data_type=n.bits+(n.last?64:0)+(n.mode===Bs?128:0)+(n.mode===Im||n.mode===OU?256:0),(d===0&&f===0||t===Boe)&&O===Dh&&(O=b$e),O},P$e=e=>{if(Zh(e))return co;let t=e.state;return t.window&&(t.window=null),e.state=null,Dh},N$e=(e,t)=>{if(Zh(e))return co;const n=e.state;return n.wrap&2?(n.head=t,t.done=!1,Dh):co},R$e=(e,t)=>{const n=t.length;let r,i,a;return Zh(e)||(r=e.state,r.wrap!==0&&r.mode!==bD)?co:r.mode===bD&&(i=1,i=iG(i,t,n,0),i!==r.check)?jye:(a=Hye(e,t,n,n),a?(r.mode=Dye,Tye):(r.havedict=1,Dh))};var j$e=Oye,T$e=Fye,D$e=zye,q$e=A$e,z$e=Bye,O$e=E$e,F$e=P$e,B$e=N$e,H$e=R$e,V$e="pako inflate (from Nodeca project)",Us={inflateReset:j$e,inflateReset2:T$e,inflateResetKeep:D$e,inflateInit:q$e,inflateInit2:z$e,inflate:O$e,inflateEnd:F$e,inflateGetHeader:B$e,inflateSetDictionary:H$e,inflateInfo:V$e};function U$e(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}var $$e=U$e;const Vye=Object.prototype.toString,{Z_NO_FLUSH:W$e,Z_FINISH:G$e,Z_OK:Cy,Z_STREAM_END:VU,Z_NEED_DICT:UU,Z_STREAM_ERROR:K$e,Z_DATA_ERROR:hse,Z_MEM_ERROR:Z$e}=_ye;function hg(e){this.options=Eye.assign({chunkSize:1024*64,windowBits:15,to:""},e||{});const t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,t.windowBits===0&&(t.windowBits=-15)),t.windowBits>=0&&t.windowBits<16&&!(e&&e.windowBits)&&(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(t.windowBits&15||(t.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new u$e,this.strm.avail_out=0;let n=Us.inflateInit2(this.strm,t.windowBits);if(n!==Cy)throw new Error(aG[n]);if(this.header=new $$e,Us.inflateGetHeader(this.strm,this.header),t.dictionary&&(typeof t.dictionary=="string"?t.dictionary=oG.string2buf(t.dictionary):Vye.call(t.dictionary)==="[object ArrayBuffer]"&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=Us.inflateSetDictionary(this.strm,t.dictionary),n!==Cy)))throw new Error(aG[n])}hg.prototype.push=function(e,t){const n=this.strm,r=this.options.chunkSize,i=this.options.dictionary;let a,o,s;if(this.ended)return!1;for(t===~~t?o=t:o=t===!0?G$e:W$e,Vye.call(e)==="[object ArrayBuffer]"?n.input=new Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;;){for(n.avail_out===0&&(n.output=new Uint8Array(r),n.next_out=0,n.avail_out=r),a=Us.inflate(n,o),a===UU&&i&&(a=Us.inflateSetDictionary(n,i),a===Cy?a=Us.inflate(n,o):a===hse&&(a=UU));n.avail_in>0&&a===VU&&n.state.wrap>0&&e[n.next_in]!==0;)Us.inflateReset(n),a=Us.inflate(n,o);switch(a){case K$e:case hse:case UU:case Z$e:return this.onEnd(a),this.ended=!0,!1}if(s=n.avail_out,n.next_out&&(n.avail_out===0||a===VU))if(this.options.to==="string"){let c=oG.utf8border(n.output,n.next_out),l=n.next_out-c,u=oG.buf2string(n.output,c);n.next_out=l,n.avail_out=r-l,l&&n.output.set(n.output.subarray(c,c+l),0),this.onData(u)}else this.onData(n.output.length===n.next_out?n.output:n.output.subarray(0,n.next_out));if(!(a===Cy&&s===0)){if(a===VU)return a=Us.inflateEnd(this.strm),this.onEnd(a),this.ended=!0,!0;if(n.avail_in===0)break}}return!0};hg.prototype.onData=function(e){this.chunks.push(e)};hg.prototype.onEnd=function(e){e===Cy&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=Eye.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function X$e(e,t){const n=new hg(t);if(n.push(e),n.err)throw n.msg||aG[n.err];return n.result}var Y$e=hg,J$e=X$e,Q$e={Inflate:Y$e,inflate:J$e};const{Inflate:eWe,inflate:tWe}=Q$e;var fse=eWe,nWe=tWe;const Uye=[];for(let e=0;e<256;e++){let t=e;for(let n=0;n<8;n++)t&1?t=3988292384^t>>>1:t=t>>>1;Uye[e]=t}const pse=4294967295;function rWe(e,t,n){let r=e;for(let i=0;i<n;i++)r=Uye[(r^t[i])&255]^r>>>8;return r}function iWe(e,t){return(rWe(pse,e,t)^pse)>>>0}function yse(e,t,n){const r=e.readUint32(),i=iWe(new Uint8Array(e.buffer,e.byteOffset+e.offset-t-4,t),t);if(i!==r)throw new Error(`CRC mismatch for chunk ${n}. Expected ${r}, found ${i}`)}function $ye(e,t,n){for(let r=0;r<n;r++)t[r]=e[r]}function Wye(e,t,n,r){let i=0;for(;i<r;i++)t[i]=e[i];for(;i<n;i++)t[i]=e[i]+t[i-r]&255}function Gye(e,t,n,r){let i=0;if(n.length===0)for(;i<r;i++)t[i]=e[i];else for(;i<r;i++)t[i]=e[i]+n[i]&255}function Kye(e,t,n,r,i){let a=0;if(n.length===0){for(;a<i;a++)t[a]=e[a];for(;a<r;a++)t[a]=e[a]+(t[a-i]>>1)&255}else{for(;a<i;a++)t[a]=e[a]+(n[a]>>1)&255;for(;a<r;a++)t[a]=e[a]+(t[a-i]+n[a]>>1)&255}}function Zye(e,t,n,r,i){let a=0;if(n.length===0){for(;a<i;a++)t[a]=e[a];for(;a<r;a++)t[a]=e[a]+t[a-i]&255}else{for(;a<i;a++)t[a]=e[a]+n[a]&255;for(;a<r;a++)t[a]=e[a]+aWe(t[a-i],n[a],n[a-i])&255}}function aWe(e,t,n){const r=e+t-n,i=Math.abs(r-e),a=Math.abs(r-t),o=Math.abs(r-n);return i<=a&&i<=o?e:a<=o?t:n}function oWe(e,t,n,r,i,a){switch(e){case 0:$ye(t,n,i);break;case 1:Wye(t,n,i,a);break;case 2:Gye(t,n,r,i);break;case 3:Kye(t,n,r,i,a);break;case 4:Zye(t,n,r,i,a);break;default:throw new Error(`Unsupported filter: ${e}`)}}const sWe=new Uint16Array([255]),cWe=new Uint8Array(sWe.buffer),lWe=cWe[0]===255;function uWe(e){const{data:t,width:n,height:r,channels:i,depth:a}=e,o=[{x:0,y:0,xStep:8,yStep:8},{x:4,y:0,xStep:8,yStep:8},{x:0,y:4,xStep:4,yStep:8},{x:2,y:0,xStep:4,yStep:4},{x:0,y:2,xStep:2,yStep:4},{x:1,y:0,xStep:2,yStep:2},{x:0,y:1,xStep:1,yStep:2}],s=Math.ceil(a/8)*i,c=new Uint8Array(r*n*s);let l=0;for(let u=0;u<7;u++){const d=o[u],f=Math.ceil((n-d.x)/d.xStep),h=Math.ceil((r-d.y)/d.yStep);if(f<=0||h<=0)continue;const y=f*s,v=new Uint8Array(y);for(let k=0;k<h;k++){const g=t[l++],S=t.subarray(l,l+y);l+=y;const w=new Uint8Array(y);oWe(g,S,w,v,y,s),v.set(w);for(let C=0;C<f;C++){const _=d.x+C*d.xStep,A=d.y+k*d.yStep;if(!(_>=n||A>=r))for(let j=0;j<s;j++)c[(A*n+_)*s+j]=w[C*s+j]}}}if(a===16){const u=new Uint16Array(c.buffer);if(lWe)for(let d=0;d<u.length;d++)u[d]=dWe(u[d]);return u}else return c}function dWe(e){return(e&255)<<8|e>>8&255}const hWe=new Uint16Array([255]),fWe=new Uint8Array(hWe.buffer),pWe=fWe[0]===255,yWe=new Uint8Array(0);function gse(e){const{data:t,width:n,height:r,channels:i,depth:a}=e,o=Math.ceil(a/8)*i,s=Math.ceil(a/8*i*n),c=new Uint8Array(r*s);let l=yWe,u=0,d,f;for(let h=0;h<r;h++){switch(d=t.subarray(u+1,u+1+s),f=c.subarray(h*s,(h+1)*s),t[u]){case 0:$ye(d,f,s);break;case 1:Wye(d,f,s,o);break;case 2:Gye(d,f,l,s);break;case 3:Kye(d,f,l,s,o);break;case 4:Zye(d,f,l,s,o);break;default:throw new Error(`Unsupported filter: ${t[u]}`)}l=f,u+=s+1}if(a===16){const h=new Uint16Array(c.buffer);if(pWe)for(let y=0;y<h.length;y++)h[y]=gWe(h[y]);return h}else return c}function gWe(e){return(e&255)<<8|e>>8&255}const hT=Uint8Array.of(137,80,78,71,13,10,26,10);function mse(e){if(!mWe(e.readBytes(hT.length)))throw new Error("wrong PNG signature")}function mWe(e){if(e.length<hT.length)return!1;for(let t=0;t<hT.length;t++)if(e[t]!==hT[t])return!1;return!0}const vWe="tEXt",kWe=0,Xye=new TextDecoder("latin1");function xWe(e){if(bWe(e),e.length===0||e.length>79)throw new Error("keyword length must be between 1 and 79")}const wWe=/^[\u0000-\u00FF]*$/;function bWe(e){if(!wWe.test(e))throw new Error("invalid latin1 text")}function MWe(e,t,n){const r=Yye(t);e[r]=SWe(t,n-r.length-1)}function Yye(e){for(e.mark();e.readByte()!==kWe;);const t=e.offset;e.reset();const n=Xye.decode(e.readBytes(t-e.offset-1));return e.skip(1),xWe(n),n}function SWe(e,t){return Xye.decode(e.readBytes(t))}const _a={UNKNOWN:-1,GREYSCALE:0,TRUECOLOUR:2,INDEXED_COLOUR:3,GREYSCALE_ALPHA:4,TRUECOLOUR_ALPHA:6},$U={UNKNOWN:-1,DEFLATE:0},vse={UNKNOWN:-1,ADAPTIVE:0},WU={UNKNOWN:-1,NO_INTERLACE:0,ADAM7:1},_m={NONE:0,BACKGROUND:1,PREVIOUS:2},GU={SOURCE:0,OVER:1};class CWe extends XZ{constructor(n,r={}){super(n);vn(this,"_checkCrc");vn(this,"_inflator");vn(this,"_png");vn(this,"_apng");vn(this,"_end");vn(this,"_hasPalette");vn(this,"_palette");vn(this,"_hasTransparency");vn(this,"_transparency");vn(this,"_compressionMethod");vn(this,"_filterMethod");vn(this,"_interlaceMethod");vn(this,"_colorType");vn(this,"_isAnimated");vn(this,"_numberOfFrames");vn(this,"_numberOfPlays");vn(this,"_frames");vn(this,"_writingDataChunks");const{checkCrc:i=!1}=r;this._checkCrc=i,this._inflator=new fse,this._png={width:-1,height:-1,channels:-1,data:new Uint8Array(0),depth:1,text:{}},this._apng={width:-1,height:-1,channels:-1,depth:1,numberOfFrames:1,numberOfPlays:0,text:{},frames:[]},this._end=!1,this._hasPalette=!1,this._palette=[],this._hasTransparency=!1,this._transparency=new Uint16Array(0),this._compressionMethod=$U.UNKNOWN,this._filterMethod=vse.UNKNOWN,this._interlaceMethod=WU.UNKNOWN,this._colorType=_a.UNKNOWN,this._isAnimated=!1,this._numberOfFrames=1,this._numberOfPlays=0,this._frames=[],this._writingDataChunks=!1,this.setBigEndian()}decode(){for(mse(this);!this._end;){const n=this.readUint32(),r=this.readChars(4);this.decodeChunk(n,r)}return this.decodeImage(),this._png}decodeApng(){for(mse(this);!this._end;){const n=this.readUint32(),r=this.readChars(4);this.decodeApngChunk(n,r)}return this.decodeApngImage(),this._apng}decodeChunk(n,r){const i=this.offset;switch(r){case"IHDR":this.decodeIHDR();break;case"PLTE":this.decodePLTE(n);break;case"IDAT":this.decodeIDAT(n);break;case"IEND":this._end=!0;break;case"tRNS":this.decodetRNS(n);break;case"iCCP":this.decodeiCCP(n);break;case vWe:MWe(this._png.text,this,n);break;case"pHYs":this.decodepHYs();break;default:this.skip(n);break}if(this.offset-i!==n)throw new Error(`Length mismatch while decoding chunk ${r}`);this._checkCrc?yse(this,n+4,r):this.skip(4)}decodeApngChunk(n,r){const i=this.offset;switch(r!=="fdAT"&&r!=="IDAT"&&this._writingDataChunks&&this.pushDataToFrame(),r){case"acTL":this.decodeACTL();break;case"fcTL":this.decodeFCTL();break;case"fdAT":this.decodeFDAT(n);break;default:this.decodeChunk(n,r),this.offset=i+n;break}if(this.offset-i!==n)throw new Error(`Length mismatch while decoding chunk ${r}`);this._checkCrc?yse(this,n+4,r):this.skip(4)}decodeIHDR(){const n=this._png;n.width=this.readUint32(),n.height=this.readUint32(),n.depth=LWe(this.readUint8());const r=this.readUint8();this._colorType=r;let i;switch(r){case _a.GREYSCALE:i=1;break;case _a.TRUECOLOUR:i=3;break;case _a.INDEXED_COLOUR:i=1;break;case _a.GREYSCALE_ALPHA:i=2;break;case _a.TRUECOLOUR_ALPHA:i=4;break;case _a.UNKNOWN:default:throw new Error(`Unknown color type: ${r}`)}if(this._png.channels=i,this._compressionMethod=this.readUint8(),this._compressionMethod!==$U.DEFLATE)throw new Error(`Unsupported compression method: ${this._compressionMethod}`);this._filterMethod=this.readUint8(),this._interlaceMethod=this.readUint8()}decodeACTL(){this._numberOfFrames=this.readUint32(),this._numberOfPlays=this.readUint32(),this._isAnimated=!0}decodeFCTL(){const n={sequenceNumber:this.readUint32(),width:this.readUint32(),height:this.readUint32(),xOffset:this.readUint32(),yOffset:this.readUint32(),delayNumber:this.readUint16(),delayDenominator:this.readUint16(),disposeOp:this.readUint8(),blendOp:this.readUint8(),data:new Uint8Array(0)};this._frames.push(n)}decodePLTE(n){if(n%3!==0)throw new RangeError(`PLTE field length must be a multiple of 3. Got ${n}`);const r=n/3;this._hasPalette=!0;const i=[];this._palette=i;for(let a=0;a<r;a++)i.push([this.readUint8(),this.readUint8(),this.readUint8()])}decodeIDAT(n){this._writingDataChunks=!0;const r=n,i=this.offset+this.byteOffset;if(this._inflator.push(new Uint8Array(this.buffer,i,r)),this._inflator.err)throw new Error(`Error while decompressing the data: ${this._inflator.err}`);this.skip(n)}decodeFDAT(n){this._writingDataChunks=!0;let r=n,i=this.offset+this.byteOffset;if(i+=4,r-=4,this._inflator.push(new Uint8Array(this.buffer,i,r)),this._inflator.err)throw new Error(`Error while decompressing the data: ${this._inflator.err}`);this.skip(n)}decodetRNS(n){switch(this._colorType){case _a.GREYSCALE:case _a.TRUECOLOUR:{if(n%2!==0)throw new RangeError(`tRNS chunk length must be a multiple of 2. Got ${n}`);if(n/2>this._png.width*this._png.height)throw new Error(`tRNS chunk contains more alpha values than there are pixels (${n/2} vs ${this._png.width*this._png.height})`);this._hasTransparency=!0,this._transparency=new Uint16Array(n/2);for(let r=0;r<n/2;r++)this._transparency[r]=this.readUint16();break}case _a.INDEXED_COLOUR:{if(n>this._palette.length)throw new Error(`tRNS chunk contains more alpha values than there are palette colors (${n} vs ${this._palette.length})`);let r=0;for(;r<n;r++){const i=this.readByte();this._palette[r].push(i)}for(;r<this._palette.length;r++)this._palette[r].push(255);break}case _a.UNKNOWN:case _a.GREYSCALE_ALPHA:case _a.TRUECOLOUR_ALPHA:default:throw new Error(`tRNS chunk is not supported for color type ${this._colorType}`)}}decodeiCCP(n){const r=Yye(this),i=this.readUint8();if(i!==$U.DEFLATE)throw new Error(`Unsupported iCCP compression method: ${i}`);const a=this.readBytes(n-r.length-2);this._png.iccEmbeddedProfile={name:r,profile:nWe(a)}}decodepHYs(){const n=this.readUint32(),r=this.readUint32(),i=this.readByte();this._png.resolution={x:n,y:r,unit:i}}decodeApngImage(){this._apng.width=this._png.width,this._apng.height=this._png.height,this._apng.channels=this._png.channels,this._apng.depth=this._png.depth,this._apng.numberOfFrames=this._numberOfFrames,this._apng.numberOfPlays=this._numberOfPlays,this._apng.text=this._png.text,this._apng.resolution=this._png.resolution;for(let n=0;n<this._numberOfFrames;n++){const r={sequenceNumber:this._frames[n].sequenceNumber,delayNumber:this._frames[n].delayNumber,delayDenominator:this._frames[n].delayDenominator,data:this._apng.depth===8?new Uint8Array(this._apng.width*this._apng.height*this._apng.channels):new Uint16Array(this._apng.width*this._apng.height*this._apng.channels)},i=this._frames.at(n);if(i){if(i.data=gse({data:i.data,width:i.width,height:i.height,channels:this._apng.channels,depth:this._apng.depth}),this._hasPalette&&(this._apng.palette=this._palette),this._hasTransparency&&(this._apng.transparency=this._transparency),n===0||i.xOffset===0&&i.yOffset===0&&i.width===this._png.width&&i.height===this._png.height)r.data=i.data;else{const a=this._apng.frames.at(n-1);this.disposeFrame(i,a,r),this.addFrameDataToCanvas(r,i)}this._apng.frames.push(r)}}return this._apng}disposeFrame(n,r,i){switch(n.disposeOp){case _m.NONE:break;case _m.BACKGROUND:for(let a=0;a<this._png.height;a++)for(let o=0;o<this._png.width;o++){const s=(a*n.width+o)*this._png.channels;for(let c=0;c<this._png.channels;c++)i.data[s+c]=0}break;case _m.PREVIOUS:i.data.set(r.data);break;default:throw new Error("Unknown disposeOp")}}addFrameDataToCanvas(n,r){const i=1<<this._png.depth,a=(o,s)=>{const c=((o+r.yOffset)*this._png.width+r.xOffset+s)*this._png.channels,l=(o*r.width+s)*this._png.channels;return{index:c,frameIndex:l}};switch(r.blendOp){case GU.SOURCE:for(let o=0;o<r.height;o++)for(let s=0;s<r.width;s++){const{index:c,frameIndex:l}=a(o,s);for(let u=0;u<this._png.channels;u++)n.data[c+u]=r.data[l+u]}break;case GU.OVER:for(let o=0;o<r.height;o++)for(let s=0;s<r.width;s++){const{index:c,frameIndex:l}=a(o,s);for(let u=0;u<this._png.channels;u++){const d=r.data[l+this._png.channels-1]/i,f=u%(this._png.channels-1)===0?1:r.data[l+u],h=Math.floor(d*f+(1-d)*n.data[c+u]);n.data[c+u]+=h}}break;default:throw new Error("Unknown blendOp")}}decodeImage(){var r;if(this._inflator.err)throw new Error(`Error while decompressing the data: ${this._inflator.err}`);const n=this._isAnimated?((r=this._frames)==null?void 0:r.at(0)).data:this._inflator.result;if(this._filterMethod!==vse.ADAPTIVE)throw new Error(`Filter method ${this._filterMethod} not supported`);if(this._interlaceMethod===WU.NO_INTERLACE)this._png.data=gse({data:n,width:this._png.width,height:this._png.height,channels:this._png.channels,depth:this._png.depth});else if(this._interlaceMethod===WU.ADAM7)this._png.data=uWe({data:n,width:this._png.width,height:this._png.height,channels:this._png.channels,depth:this._png.depth});else throw new Error(`Interlace method ${this._interlaceMethod} not supported`);this._hasPalette&&(this._png.palette=this._palette),this._hasTransparency&&(this._png.transparency=this._transparency)}pushDataToFrame(){const n=this._inflator.result,r=this._frames.at(-1);r?r.data=n:this._frames.push({sequenceNumber:0,width:this._png.width,height:this._png.height,xOffset:0,yOffset:0,delayNumber:0,delayDenominator:0,disposeOp:_m.NONE,blendOp:GU.SOURCE,data:n}),this._inflator=new fse,this._writingDataChunks=!1}}function LWe(e){if(e!==1&&e!==2&&e!==4&&e!==8&&e!==16)throw new Error(`invalid bit depth: ${e}`);return e}var kse;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.METRE=1]="METRE"})(kse||(kse={}));function IWe(e,t){return new CWe(e,t).decode()}var Dt=function(){return typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:this}();function KU(){Dt.console&&typeof Dt.console.log=="function"&&Dt.console.log.apply(Dt.console,arguments)}var En={log:KU,warn:function(e){Dt.console&&(typeof Dt.console.warn=="function"?Dt.console.warn.apply(Dt.console,arguments):KU.call(null,arguments))},error:function(e){Dt.console&&(typeof Dt.console.error=="function"?Dt.console.error.apply(Dt.console,arguments):KU(e))}};function ZU(e,t,n){var r=new XMLHttpRequest;r.open("GET",e),r.responseType="blob",r.onload=function(){lh(r.response,t,n)},r.onerror=function(){En.error("could not download file")},r.send()}function xse(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch{}return t.status>=200&&t.status<=299}function Em(e){try{e.dispatchEvent(new MouseEvent("click"))}catch{var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var lh=Dt.saveAs||((typeof window>"u"?"undefined":kn(window))!=="object"||window!==Dt?function(){}:typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype?function(e,t,n){var r=Dt.URL||Dt.webkitURL,i=document.createElement("a");t=t||e.name||"download",i.download=t,i.rel="noopener",typeof e=="string"?(i.href=e,i.origin!==location.origin?xse(i.href)?ZU(e,t,n):Em(i,i.target="_blank"):Em(i)):(i.href=r.createObjectURL(e),setTimeout(function(){r.revokeObjectURL(i.href)},4e4),setTimeout(function(){Em(i)},0))}:"msSaveOrOpenBlob"in navigator?function(e,t,n){if(t=t||e.name||"download",typeof e=="string")if(xse(e))ZU(e,t,n);else{var r=document.createElement("a");r.href=e,r.target="_blank",setTimeout(function(){Em(r)})}else navigator.msSaveOrOpenBlob(function(i,a){return a===void 0?a={autoBom:!1}:kn(a)!=="object"&&(En.warn("Deprecated: Expected third argument to be a object"),a={autoBom:!a}),a.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(i.type)?new Blob(["\uFEFF",i],{type:i.type}):i}(e,n),t)}:function(e,t,n,r){if((r=r||open("","_blank"))&&(r.document.title=r.document.body.innerText="downloading..."),typeof e=="string")return ZU(e,t,n);var i=e.type==="application/octet-stream",a=/constructor/i.test(Dt.HTMLElement)||Dt.safari,o=/CriOS\/[\d]+/.test(navigator.userAgent);if((o||i&&a)&&(typeof FileReader>"u"?"undefined":kn(FileReader))==="object"){var s=new FileReader;s.onloadend=function(){var u=s.result;u=o?u:u.replace(/^data:[^;]*;/,"data:attachment/file;"),r?r.location.href=u:location=u,r=null},s.readAsDataURL(e)}else{var c=Dt.URL||Dt.webkitURL,l=c.createObjectURL(e);r?r.location=l:location.href=l,r=null,setTimeout(function(){c.revokeObjectURL(l)},4e4)}});/**
7839
7839
  * A class to parse color values
@@ -7973,7 +7973,7 @@ T* `):L.join(` Tj
7973
7973
  endobj\r
7974
7974
  `},n.outline.count_r=function(r,i){for(var a=0;a<i.children.length;a++)r.count++,this.count_r(r,i.children[a]);return r.count}}])}(At.API),function(e){var t=[192,193,194,195,196,197,198,199];e.processJPEG=function(n,r,i,a,o,s){var c,l=this.decode.DCT_DECODE,u=null;if(typeof n=="string"||this.__addimage__.isArrayBuffer(n)||this.__addimage__.isArrayBufferView(n)){switch(n=o||n,n=this.__addimage__.isArrayBuffer(n)?new Uint8Array(n):n,c=function(d){for(var f,h=256*d.charCodeAt(4)+d.charCodeAt(5),y=d.length,v={width:0,height:0,numcomponents:1},k=4;k<y;k+=2){if(k+=h,t.indexOf(d.charCodeAt(k+1))!==-1){f=256*d.charCodeAt(k+5)+d.charCodeAt(k+6),v={width:256*d.charCodeAt(k+7)+d.charCodeAt(k+8),height:f,numcomponents:d.charCodeAt(k+9)};break}h=256*d.charCodeAt(k+2)+d.charCodeAt(k+3)}return v}(n=this.__addimage__.isArrayBufferView(n)?this.__addimage__.arrayBufferToBinaryString(n):n),c.numcomponents){case 1:s=this.color_spaces.DEVICE_GRAY;break;case 4:s=this.color_spaces.DEVICE_CMYK;break;case 3:s=this.color_spaces.DEVICE_RGB}u={data:n,width:c.width,height:c.height,colorSpace:s,bitsPerComponent:8,filter:l,index:r,alias:i}}return u}}(At.API),At.API.processPNG=function(e,t,n,r){if(this.__addimage__.isArrayBuffer(e)&&(e=new Uint8Array(e)),this.__addimage__.isArrayBufferView(e)){var i,a=IWe(e,{checkCrc:!0}),o=a.width,s=a.height,c=a.channels,l=a.palette,u=a.depth;i=l&&c===1?function(O){for(var T=O.width,D=O.height,I=O.data,R=O.palette,U=O.depth,q=!1,K=[],Z=[],$=void 0,B=!1,V=0,F=0;F<R.length;F++){var ie=Toe(R[F],4),N=ie[0],P=ie[1],G=ie[2],J=ie[3];K.push(N,P,G),J!=null&&(J===0?(V++,Z.length<1&&Z.push(F)):J<255&&(B=!0))}if(B||V>1){q=!0,Z=void 0;var X=T*D;$=new Uint8Array(X);for(var ae=new DataView(I.buffer),re=0;re<X;re++){var fe=e$(ae,re,U),ke=Toe(R[fe],4)[3];$[re]=ke}}else V===0&&(Z=void 0);return{colorSpace:"Indexed",colorsPerPixel:1,sMaskBitsPerComponent:q?8:void 0,colorBytes:I,alphaBytes:$,needSMask:q,palette:K,mask:Z}}(a):c===2||c===4?function(O){for(var T=O.data,D=O.width,I=O.height,R=O.channels,U=O.depth,q=R===2?"DeviceGray":"DeviceRGB",K=R-1,Z=D*I,$=K,B=Z*$,V=1*Z,F=Math.ceil(B*U/8),ie=Math.ceil(V*U/8),N=new Uint8Array(F),P=new Uint8Array(ie),G=new DataView(T.buffer),J=new DataView(N.buffer),X=new DataView(P.buffer),ae=!1,re=0;re<Z;re++){for(var fe=re*R,ke=0;ke<$;ke++)zse(J,e$(G,fe+ke,U),re*$+ke,U);var Ne=e$(G,fe+$,U);Ne<(1<<U)-1&&(ae=!0),zse(X,Ne,1*re,U)}return{colorSpace:q,colorsPerPixel:K,sMaskBitsPerComponent:ae?U:void 0,colorBytes:N,alphaBytes:P,needSMask:ae}}(a):function(O){var T=O.data,D=O.channels===1?"DeviceGray":"DeviceRGB";return{colorSpace:D,colorsPerPixel:D==="DeviceGray"?1:3,colorBytes:T instanceof Uint16Array?function(I){for(var R=I.length,U=new Uint8Array(2*R),q=new DataView(U.buffer,U.byteOffset,U.byteLength),K=0;K<R;K++)q.setUint16(2*K,I[K],!1);return U}(T):T,needSMask:!1}}(a);var d,f,h,y=i,v=y.colorSpace,k=y.colorsPerPixel,g=y.sMaskBitsPerComponent,S=y.colorBytes,w=y.alphaBytes,C=y.needSMask,_=y.palette,A=y.mask,j=null;return r!==At.API.image_compression.NONE&&typeof YW=="function"?(j=function(O){var T;switch(O){case At.API.image_compression.FAST:T=11;break;case At.API.image_compression.MEDIUM:T=13;break;case At.API.image_compression.SLOW:T=14;break;default:T=12}return T}(r),d=this.decode.FLATE_DECODE,f="/Predictor ".concat(j," /Colors ").concat(k," /BitsPerComponent ").concat(u," /Columns ").concat(o),e=Rse(S,Math.ceil(o*k*u/8),k,u,r),C&&(h=Rse(w,Math.ceil(o*g/8),1,g,r))):(d=void 0,f=void 0,e=S,C&&(h=w)),(this.__addimage__.isArrayBuffer(e)||this.__addimage__.isArrayBufferView(e))&&(e=this.__addimage__.arrayBufferToBinaryString(e)),(h&&this.__addimage__.isArrayBuffer(h)||this.__addimage__.isArrayBufferView(h))&&(h=this.__addimage__.arrayBufferToBinaryString(h)),{alias:n,data:e,index:t,filter:d,decodeParameters:f,transparency:A,palette:_,sMask:h,predictor:j,width:o,height:s,bitsPerComponent:u,sMaskBitsPerComponent:g,colorSpace:v}}},function(e){e.processGIF89A=function(t,n,r,i){var a=new KWe(t),o=a.width,s=a.height,c=[];a.decodeAndBlitFrameRGBA(0,c);var l={data:c,width:o,height:s},u=new t$(100).encode(l,100);return e.processJPEG.call(this,u,n,r,i)},e.processGIF87A=e.processGIF89A}(At.API),Mo.prototype.parseHeader=function(){if(this.fileSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.reserved=this.datav.getUint32(this.pos,!0),this.pos+=4,this.offset=this.datav.getUint32(this.pos,!0),this.pos+=4,this.headerSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.width=this.datav.getUint32(this.pos,!0),this.pos+=4,this.height=this.datav.getInt32(this.pos,!0),this.pos+=4,this.planes=this.datav.getUint16(this.pos,!0),this.pos+=2,this.bitPP=this.datav.getUint16(this.pos,!0),this.pos+=2,this.compress=this.datav.getUint32(this.pos,!0),this.pos+=4,this.rawSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.hr=this.datav.getUint32(this.pos,!0),this.pos+=4,this.vr=this.datav.getUint32(this.pos,!0),this.pos+=4,this.colors=this.datav.getUint32(this.pos,!0),this.pos+=4,this.importantColors=this.datav.getUint32(this.pos,!0),this.pos+=4,this.bitPP===16&&this.is_with_alpha&&(this.bitPP=15),this.bitPP<15){var e=this.colors===0?1<<this.bitPP:this.colors;this.palette=new Array(e);for(var t=0;t<e;t++){var n=this.datav.getUint8(this.pos++,!0),r=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),a=this.datav.getUint8(this.pos++,!0);this.palette[t]={red:i,green:r,blue:n,quad:a}}}this.height<0&&(this.height*=-1,this.bottom_up=!1)},Mo.prototype.parseBGR=function(){this.pos=this.offset;var e="bit"+this.bitPP,t=this.width*this.height*4;if(t>536870912)throw new Error("Image dimensions exceed 512MB, which is too large.");this.data=new Uint8Array(t);try{this[e]()}catch(n){En.log("bit decode error:"+n)}},Mo.prototype.bit1=function(){var e,t=Math.ceil(this.width/8),n=t%4;for(e=this.height-1;e>=0;e--){for(var r=this.bottom_up?e:this.height-1-e,i=0;i<t;i++)for(var a=this.datav.getUint8(this.pos++,!0),o=r*this.width*4+8*i*4,s=0;s<8&&8*i+s<this.width;s++){var c=this.palette[a>>7-s&1];this.data[o+4*s]=c.blue,this.data[o+4*s+1]=c.green,this.data[o+4*s+2]=c.red,this.data[o+4*s+3]=255}n!==0&&(this.pos+=4-n)}},Mo.prototype.bit4=function(){for(var e=Math.ceil(this.width/2),t=e%4,n=this.height-1;n>=0;n--){for(var r=this.bottom_up?n:this.height-1-n,i=0;i<e;i++){var a=this.datav.getUint8(this.pos++,!0),o=r*this.width*4+2*i*4,s=a>>4,c=15&a,l=this.palette[s];if(this.data[o]=l.blue,this.data[o+1]=l.green,this.data[o+2]=l.red,this.data[o+3]=255,2*i+1>=this.width)break;l=this.palette[c],this.data[o+4]=l.blue,this.data[o+4+1]=l.green,this.data[o+4+2]=l.red,this.data[o+4+3]=255}t!==0&&(this.pos+=4-t)}},Mo.prototype.bit8=function(){for(var e=this.width%4,t=this.height-1;t>=0;t--){for(var n=this.bottom_up?t:this.height-1-t,r=0;r<this.width;r++){var i=this.datav.getUint8(this.pos++,!0),a=n*this.width*4+4*r;if(i<this.palette.length){var o=this.palette[i];this.data[a]=o.red,this.data[a+1]=o.green,this.data[a+2]=o.blue,this.data[a+3]=255}else this.data[a]=255,this.data[a+1]=255,this.data[a+2]=255,this.data[a+3]=255}e!==0&&(this.pos+=4-e)}},Mo.prototype.bit15=function(){for(var e=this.width%3,t=parseInt("11111",2),n=this.height-1;n>=0;n--){for(var r=this.bottom_up?n:this.height-1-n,i=0;i<this.width;i++){var a=this.datav.getUint16(this.pos,!0);this.pos+=2;var o=(a&t)/t*255|0,s=(a>>5&t)/t*255|0,c=(a>>10&t)/t*255|0,l=a>>15?255:0,u=r*this.width*4+4*i;this.data[u]=c,this.data[u+1]=s,this.data[u+2]=o,this.data[u+3]=l}this.pos+=e}},Mo.prototype.bit16=function(){for(var e=this.width%3,t=parseInt("11111",2),n=parseInt("111111",2),r=this.height-1;r>=0;r--){for(var i=this.bottom_up?r:this.height-1-r,a=0;a<this.width;a++){var o=this.datav.getUint16(this.pos,!0);this.pos+=2;var s=(o&t)/t*255|0,c=(o>>5&n)/n*255|0,l=(o>>11)/t*255|0,u=i*this.width*4+4*a;this.data[u]=l,this.data[u+1]=c,this.data[u+2]=s,this.data[u+3]=255}this.pos+=e}},Mo.prototype.bit24=function(){for(var e=this.height-1;e>=0;e--){for(var t=this.bottom_up?e:this.height-1-e,n=0;n<this.width;n++){var r=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),a=this.datav.getUint8(this.pos++,!0),o=t*this.width*4+4*n;this.data[o]=a,this.data[o+1]=i,this.data[o+2]=r,this.data[o+3]=255}this.pos+=this.width%4}},Mo.prototype.bit32=function(){for(var e=this.height-1;e>=0;e--)for(var t=this.bottom_up?e:this.height-1-e,n=0;n<this.width;n++){var r=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),a=this.datav.getUint8(this.pos++,!0),o=this.datav.getUint8(this.pos++,!0),s=t*this.width*4+4*n;this.data[s]=a,this.data[s+1]=i,this.data[s+2]=r,this.data[s+3]=o}},Mo.prototype.getData=function(){return this.data},function(e){e.processBMP=function(t,n,r,i){var a=new Mo(t,!1),o=a.width,s=a.height,c={data:a.getData(),width:o,height:s},l=new t$(100).encode(c,100);return e.processJPEG.call(this,l,n,r,i)}}(At.API),Fse.prototype.getData=function(){return this.data},function(e){e.processWEBP=function(t,n,r,i){var a=new Fse(t),o=a.width,s=a.height,c={data:a.getData(),width:o,height:s},l=new t$(100).encode(c,100);return e.processJPEG.call(this,l,n,r,i)}}(At.API),At.API.processRGBA=function(e,t,n){for(var r=e.data,i=r.length,a=new Uint8Array(i/4*3),o=new Uint8Array(i/4),s=0,c=0,l=0;l<i;l+=4){var u=r[l],d=r[l+1],f=r[l+2],h=r[l+3];a[s++]=u,a[s++]=d,a[s++]=f,o[c++]=h}var y=this.__addimage__.arrayBufferToBinaryString(a);return{alpha:this.__addimage__.arrayBufferToBinaryString(o),data:y,index:t,alias:n,colorSpace:"DeviceRGB",bitsPerComponent:8,width:e.width,height:e.height}},At.API.setLanguage=function(e){return this.internal.languageSettings===void 0&&(this.internal.languageSettings={},this.internal.languageSettings.isSubscribed=!1),{af:"Afrikaans",sq:"Albanian",ar:"Arabic (Standard)","ar-DZ":"Arabic (Algeria)","ar-BH":"Arabic (Bahrain)","ar-EG":"Arabic (Egypt)","ar-IQ":"Arabic (Iraq)","ar-JO":"Arabic (Jordan)","ar-KW":"Arabic (Kuwait)","ar-LB":"Arabic (Lebanon)","ar-LY":"Arabic (Libya)","ar-MA":"Arabic (Morocco)","ar-OM":"Arabic (Oman)","ar-QA":"Arabic (Qatar)","ar-SA":"Arabic (Saudi Arabia)","ar-SY":"Arabic (Syria)","ar-TN":"Arabic (Tunisia)","ar-AE":"Arabic (U.A.E.)","ar-YE":"Arabic (Yemen)",an:"Aragonese",hy:"Armenian",as:"Assamese",ast:"Asturian",az:"Azerbaijani",eu:"Basque",be:"Belarusian",bn:"Bengali",bs:"Bosnian",br:"Breton",bg:"Bulgarian",my:"Burmese",ca:"Catalan",ch:"Chamorro",ce:"Chechen",zh:"Chinese","zh-HK":"Chinese (Hong Kong)","zh-CN":"Chinese (PRC)","zh-SG":"Chinese (Singapore)","zh-TW":"Chinese (Taiwan)",cv:"Chuvash",co:"Corsican",cr:"Cree",hr:"Croatian",cs:"Czech",da:"Danish",nl:"Dutch (Standard)","nl-BE":"Dutch (Belgian)",en:"English","en-AU":"English (Australia)","en-BZ":"English (Belize)","en-CA":"English (Canada)","en-IE":"English (Ireland)","en-JM":"English (Jamaica)","en-NZ":"English (New Zealand)","en-PH":"English (Philippines)","en-ZA":"English (South Africa)","en-TT":"English (Trinidad & Tobago)","en-GB":"English (United Kingdom)","en-US":"English (United States)","en-ZW":"English (Zimbabwe)",eo:"Esperanto",et:"Estonian",fo:"Faeroese",fj:"Fijian",fi:"Finnish",fr:"French (Standard)","fr-BE":"French (Belgium)","fr-CA":"French (Canada)","fr-FR":"French (France)","fr-LU":"French (Luxembourg)","fr-MC":"French (Monaco)","fr-CH":"French (Switzerland)",fy:"Frisian",fur:"Friulian",gd:"Gaelic (Scots)","gd-IE":"Gaelic (Irish)",gl:"Galacian",ka:"Georgian",de:"German (Standard)","de-AT":"German (Austria)","de-DE":"German (Germany)","de-LI":"German (Liechtenstein)","de-LU":"German (Luxembourg)","de-CH":"German (Switzerland)",el:"Greek",gu:"Gujurati",ht:"Haitian",he:"Hebrew",hi:"Hindi",hu:"Hungarian",is:"Icelandic",id:"Indonesian",iu:"Inuktitut",ga:"Irish",it:"Italian (Standard)","it-CH":"Italian (Switzerland)",ja:"Japanese",kn:"Kannada",ks:"Kashmiri",kk:"Kazakh",km:"Khmer",ky:"Kirghiz",tlh:"Klingon",ko:"Korean","ko-KP":"Korean (North Korea)","ko-KR":"Korean (South Korea)",la:"Latin",lv:"Latvian",lt:"Lithuanian",lb:"Luxembourgish",mk:"North Macedonia",ms:"Malay",ml:"Malayalam",mt:"Maltese",mi:"Maori",mr:"Marathi",mo:"Moldavian",nv:"Navajo",ng:"Ndonga",ne:"Nepali",no:"Norwegian",nb:"Norwegian (Bokmal)",nn:"Norwegian (Nynorsk)",oc:"Occitan",or:"Oriya",om:"Oromo",fa:"Persian","fa-IR":"Persian/Iran",pl:"Polish",pt:"Portuguese","pt-BR":"Portuguese (Brazil)",pa:"Punjabi","pa-IN":"Punjabi (India)","pa-PK":"Punjabi (Pakistan)",qu:"Quechua",rm:"Rhaeto-Romanic",ro:"Romanian","ro-MO":"Romanian (Moldavia)",ru:"Russian","ru-MO":"Russian (Moldavia)",sz:"Sami (Lappish)",sg:"Sango",sa:"Sanskrit",sc:"Sardinian",sd:"Sindhi",si:"Singhalese",sr:"Serbian",sk:"Slovak",sl:"Slovenian",so:"Somani",sb:"Sorbian",es:"Spanish","es-AR":"Spanish (Argentina)","es-BO":"Spanish (Bolivia)","es-CL":"Spanish (Chile)","es-CO":"Spanish (Colombia)","es-CR":"Spanish (Costa Rica)","es-DO":"Spanish (Dominican Republic)","es-EC":"Spanish (Ecuador)","es-SV":"Spanish (El Salvador)","es-GT":"Spanish (Guatemala)","es-HN":"Spanish (Honduras)","es-MX":"Spanish (Mexico)","es-NI":"Spanish (Nicaragua)","es-PA":"Spanish (Panama)","es-PY":"Spanish (Paraguay)","es-PE":"Spanish (Peru)","es-PR":"Spanish (Puerto Rico)","es-ES":"Spanish (Spain)","es-UY":"Spanish (Uruguay)","es-VE":"Spanish (Venezuela)",sx:"Sutu",sw:"Swahili",sv:"Swedish","sv-FI":"Swedish (Finland)","sv-SV":"Swedish (Sweden)",ta:"Tamil",tt:"Tatar",te:"Teluga",th:"Thai",tig:"Tigre",ts:"Tsonga",tn:"Tswana",tr:"Turkish",tk:"Turkmen",uk:"Ukrainian",hsb:"Upper Sorbian",ur:"Urdu",ve:"Venda",vi:"Vietnamese",vo:"Volapuk",wa:"Walloon",cy:"Welsh",xh:"Xhosa",ji:"Yiddish",zu:"Zulu"}[e]!==void 0&&(this.internal.languageSettings.languageCode=e,this.internal.languageSettings.isSubscribed===!1&&(this.internal.events.subscribe("putCatalog",function(){this.internal.write("/Lang ("+this.internal.languageSettings.languageCode+")")}),this.internal.languageSettings.isSubscribed=!0)),this},k2=At.API,Nm=k2.getCharWidthsArray=function(e,t){var n,r,i=(t=t||{}).font||this.internal.getFont(),a=t.fontSize||this.internal.getFontSize(),o=t.charSpace||this.internal.getCharSpace(),s=t.widths?t.widths:i.metadata.Unicode.widths,c=s.fof?s.fof:1,l=t.kerning?t.kerning:i.metadata.Unicode.kerning,u=l.fof?l.fof:1,d=t.doKerning!==!1,f=0,h=e.length,y=0,v=s[0]||c,k=[];for(n=0;n<h;n++)r=e.charCodeAt(n),typeof i.metadata.widthOfString=="function"?k.push((i.metadata.widthOfGlyph(i.metadata.characterToGlyph(r))+o*(1e3/a)||0)/1e3):(f=d&&kn(l[r])==="object"&&!isNaN(parseInt(l[r][y],10))?l[r][y]/u:0,k.push((s[r]||v)/c+f)),y=r;return k},Ese=k2.getStringUnitWidth=function(e,t){var n=(t=t||{}).fontSize||this.internal.getFontSize(),r=t.font||this.internal.getFont(),i=t.charSpace||this.internal.getCharSpace();return k2.processArabic&&(e=k2.processArabic(e)),typeof r.metadata.widthOfString=="function"?r.metadata.widthOfString(e,n,i)/n:Nm.apply(this,arguments).reduce(function(a,o){return a+o},0)},Pse=function(e,t,n,r){for(var i=[],a=0,o=e.length,s=0;a!==o&&s+t[a]<n;)s+=t[a],a++;i.push(e.slice(0,a));var c=a;for(s=0;a!==o;)s+t[a]>r&&(i.push(e.slice(c,a)),s=0,c=a),s+=t[a],a++;return c!==a&&i.push(e.slice(c,a)),i},Nse=function(e,t,n){n||(n={});var r,i,a,o,s,c,l,u=[],d=[u],f=n.textIndent||0,h=0,y=0,v=e.split(" "),k=Nm.apply(this,[" ",n])[0];if(c=n.lineIndent===-1?v[0].length+2:n.lineIndent||0){var g=Array(c).join(" "),S=[];v.map(function(C){(C=C.split(/\s*\n/)).length>1?S=S.concat(C.map(function(_,A){return(A&&_.length?`
7975
7975
  `:"")+_})):S.push(C[0])}),v=S,c=Ese.apply(this,[g,n])}for(a=0,o=v.length;a<o;a++){var w=0;if(r=v[a],c&&r[0]==`
7976
- `&&(r=r.substr(1),w=1),f+h+(y=(i=Nm.apply(this,[r,n])).reduce(function(C,_){return C+_},0))>t||w){if(y>t){for(s=Pse.apply(this,[r,i,t-(f+h),t]),u.push(s.shift()),u=[s.pop()];s.length;)d.push([s.shift()]);y=i.slice(r.length-(u[0]?u[0].length:0)).reduce(function(C,_){return C+_},0)}else u=[r];d.push(u),f=y+c,h=k}else u.push(r),f+=h+y,h=k}return l=c?function(C,_){return(_?g:"")+C.join(" ")}:function(C){return C.join(" ")},d.map(l)},k2.splitTextToSize=function(e,t,n){var r,i=(n=n||{}).fontSize||this.internal.getFontSize(),a=(function(u){if(u.widths&&u.kerning)return{widths:u.widths,kerning:u.kerning};var d=this.internal.getFont(u.fontName,u.fontStyle),f="Unicode";return d.metadata[f]?{widths:d.metadata[f].widths||{0:1},kerning:d.metadata[f].kerning||{}}:{font:d.metadata,fontSize:this.internal.getFontSize(),charSpace:this.internal.getCharSpace()}}).call(this,n);r=Array.isArray(e)?e:String(e).split(/\r?\n/);var o=1*this.internal.scaleFactor*t/i;a.textIndent=n.textIndent?1*n.textIndent*this.internal.scaleFactor/i:0,a.lineIndent=n.lineIndent;var s,c,l=[];for(s=0,c=r.length;s<c;s++)l=l.concat(Nse.apply(this,[r[s],o,a]));return l},function(e){e.__fontmetrics__=e.__fontmetrics__||{};for(var t="0123456789abcdef",n="klmnopqrstuvwxyz",r={},i={},a=0;a<16;a++)r[n[a]]=t[a],i[t[a]]=n[a];var o=function(f){return"0x"+parseInt(f,10).toString(16)},s=e.__fontmetrics__.compress=function(f){var h,y,v,k,g=["{"];for(var S in f){if(h=f[S],isNaN(parseInt(S,10))?y="'"+S+"'":(S=parseInt(S,10),y=(y=o(S).slice(2)).slice(0,-1)+i[y.slice(-1)]),typeof h=="number")h<0?(v=o(h).slice(3),k="-"):(v=o(h).slice(2),k=""),v=k+v.slice(0,-1)+i[v.slice(-1)];else{if(kn(h)!=="object")throw new Error("Don't know what to do with value type "+kn(h)+".");v=s(h)}g.push(y+v)}return g.push("}"),g.join("")},c=e.__fontmetrics__.uncompress=function(f){if(typeof f!="string")throw new Error("Invalid argument passed to uncompress.");for(var h,y,v,k,g={},S=1,w=g,C=[],_="",A="",j=f.length-1,O=1;O<j;O+=1)(k=f[O])=="'"?h?(v=h.join(""),h=void 0):h=[]:h?h.push(k):k=="{"?(C.push([w,v]),w={},v=void 0):k=="}"?((y=C.pop())[0][y[1]]=w,v=void 0,w=y[0]):k=="-"?S=-1:v===void 0?r.hasOwnProperty(k)?(_+=r[k],v=parseInt(_,16)*S,S=1,_=""):_+=k:r.hasOwnProperty(k)?(A+=r[k],w[v]=parseInt(A,16)*S,S=1,v=void 0,A=""):A+=k;return g},l={codePages:["WinAnsiEncoding"],WinAnsiEncoding:c("{19m8n201n9q201o9r201s9l201t9m201u8m201w9n201x9o201y8o202k8q202l8r202m9p202q8p20aw8k203k8t203t8v203u9v2cq8s212m9t15m8w15n9w2dw9s16k8u16l9u17s9z17x8y17y9y}")},u={Unicode:{Courier:l,"Courier-Bold":l,"Courier-BoldOblique":l,"Courier-Oblique":l,Helvetica:l,"Helvetica-Bold":l,"Helvetica-BoldOblique":l,"Helvetica-Oblique":l,"Times-Roman":l,"Times-Bold":l,"Times-BoldItalic":l,"Times-Italic":l}},d={Unicode:{"Courier-Oblique":c("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-BoldItalic":c("{'widths'{k3o2q4ycx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2r202m2n2n3m2o3m2p5n202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5n4l4m4m4m4n4m4o4s4p4m4q4m4r4s4s4y4t2r4u3m4v4m4w3x4x5t4y4s4z4s5k3x5l4s5m4m5n3r5o3x5p4s5q4m5r5t5s4m5t3x5u3x5v2l5w1w5x2l5y3t5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q2l6r3m6s3r6t1w6u1w6v3m6w1w6x4y6y3r6z3m7k3m7l3m7m2r7n2r7o1w7p3r7q2w7r4m7s3m7t2w7u2r7v2n7w1q7x2n7y3t202l3mcl4mal2ram3man3mao3map3mar3mas2lat4uau1uav3maw3way4uaz2lbk2sbl3t'fof'6obo2lbp3tbq3mbr1tbs2lbu1ybv3mbz3mck4m202k3mcm4mcn4mco4mcp4mcq5ycr4mcs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz2w203k6o212m6o2dw2l2cq2l3t3m3u2l17s3x19m3m}'kerning'{cl{4qu5kt5qt5rs17ss5ts}201s{201ss}201t{cks4lscmscnscoscpscls2wu2yu201ts}201x{2wu2yu}2k{201ts}2w{4qx5kx5ou5qx5rs17su5tu}2x{17su5tu5ou}2y{4qx5kx5ou5qx5rs17ss5ts}'fof'-6ofn{17sw5tw5ou5qw5rs}7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qs}3v{17su5tu5os5qs}7p{17su5tu}ck{4qu5kt5qt5rs17ss5ts}4l{4qu5kt5qt5rs17ss5ts}cm{4qu5kt5qt5rs17ss5ts}cn{4qu5kt5qt5rs17ss5ts}co{4qu5kt5qt5rs17ss5ts}cp{4qu5kt5qt5rs17ss5ts}6l{4qu5ou5qw5rt17su5tu}5q{ckuclucmucnucoucpu4lu}5r{ckuclucmucnucoucpu4lu}7q{cksclscmscnscoscps4ls}6p{4qu5ou5qw5rt17sw5tw}ek{4qu5ou5qw5rt17su5tu}el{4qu5ou5qw5rt17su5tu}em{4qu5ou5qw5rt17su5tu}en{4qu5ou5qw5rt17su5tu}eo{4qu5ou5qw5rt17su5tu}ep{4qu5ou5qw5rt17su5tu}es{17ss5ts5qs4qu}et{4qu5ou5qw5rt17sw5tw}eu{4qu5ou5qw5rt17ss5ts}ev{17ss5ts5qs4qu}6z{17sw5tw5ou5qw5rs}fm{17sw5tw5ou5qw5rs}7n{201ts}fo{17sw5tw5ou5qw5rs}fp{17sw5tw5ou5qw5rs}fq{17sw5tw5ou5qw5rs}7r{cksclscmscnscoscps4ls}fs{17sw5tw5ou5qw5rs}ft{17su5tu}fu{17su5tu}fv{17su5tu}fw{17su5tu}fz{cksclscmscnscoscps4ls}}}"),"Helvetica-Bold":c("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),Courier:c("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-BoldOblique":c("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Bold":c("{'widths'{k3q2q5ncx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2l202m2n2n3m2o3m2p6o202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5x4l4s4m4m4n4s4o4s4p4m4q3x4r4y4s4y4t2r4u3m4v4y4w4m4x5y4y4s4z4y5k3x5l4y5m4s5n3r5o4m5p4s5q4s5r6o5s4s5t4s5u4m5v2l5w1w5x2l5y3u5z3m6k2l6l3m6m3r6n2w6o3r6p2w6q2l6r3m6s3r6t1w6u2l6v3r6w1w6x5n6y3r6z3m7k3r7l3r7m2w7n2r7o2l7p3r7q3m7r4s7s3m7t3m7u2w7v2r7w1q7x2r7y3o202l3mcl4sal2lam3man3mao3map3mar3mas2lat4uau1yav3maw3tay4uaz2lbk2sbl3t'fof'6obo2lbp3rbr1tbs2lbu2lbv3mbz3mck4s202k3mcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3rek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3m3u2l17s4s19m3m}'kerning'{cl{4qt5ks5ot5qy5rw17sv5tv}201t{cks4lscmscnscoscpscls4wv}2k{201ts}2w{4qu5ku7mu5os5qx5ru17su5tu}2x{17su5tu5ou5qs}2y{4qv5kv7mu5ot5qz5ru17su5tu}'fof'-6o7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qu}3v{17su5tu5os5qu}fu{17su5tu5ou5qu}7p{17su5tu5ou5qu}ck{4qt5ks5ot5qy5rw17sv5tv}4l{4qt5ks5ot5qy5rw17sv5tv}cm{4qt5ks5ot5qy5rw17sv5tv}cn{4qt5ks5ot5qy5rw17sv5tv}co{4qt5ks5ot5qy5rw17sv5tv}cp{4qt5ks5ot5qy5rw17sv5tv}6l{17st5tt5ou5qu}17s{ckuclucmucnucoucpu4lu4wu}5o{ckuclucmucnucoucpu4lu4wu}5q{ckzclzcmzcnzcozcpz4lz4wu}5r{ckxclxcmxcnxcoxcpx4lx4wu}5t{ckuclucmucnucoucpu4lu4wu}7q{ckuclucmucnucoucpu4lu}6p{17sw5tw5ou5qu}ek{17st5tt5qu}el{17st5tt5ou5qu}em{17st5tt5qu}en{17st5tt5qu}eo{17st5tt5qu}ep{17st5tt5ou5qu}es{17ss5ts5qu}et{17sw5tw5ou5qu}eu{17sw5tw5ou5qu}ev{17ss5ts5qu}6z{17sw5tw5ou5qu5rs}fm{17sw5tw5ou5qu5rs}fn{17sw5tw5ou5qu5rs}fo{17sw5tw5ou5qu5rs}fp{17sw5tw5ou5qu5rs}fq{17sw5tw5ou5qu5rs}7r{cktcltcmtcntcotcpt4lt5os}fs{17sw5tw5ou5qu5rs}ft{17su5tu5ou5qu}7m{5os}fv{17su5tu5ou5qu}fw{17su5tu5ou5qu}fz{cksclscmscnscoscps4ls}}}"),Symbol:c("{'widths'{k3uaw4r19m3m2k1t2l2l202m2y2n3m2p5n202q6o3k3m2s2l2t2l2v3r2w1t3m3m2y1t2z1wbk2sbl3r'fof'6o3n3m3o3m3p3m3q3m3r3m3s3m3t3m3u1w3v1w3w3r3x3r3y3r3z2wbp3t3l3m5v2l5x2l5z3m2q4yfr3r7v3k7w1o7x3k}'kerning'{'fof'-6o}}"),Helvetica:c("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}"),"Helvetica-BoldOblique":c("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),ZapfDingbats:c("{'widths'{k4u2k1w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-Bold":c("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Italic":c("{'widths'{k3n2q4ycx2l201n3m201o5t201s2l201t2l201u2l201w3r201x3r201y3r2k1t2l2l202m2n2n3m2o3m2p5n202q5t2r1p2s2l2t2l2u3m2v4n2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w4n3x4n3y4n3z3m4k5w4l3x4m3x4n4m4o4s4p3x4q3x4r4s4s4s4t2l4u2w4v4m4w3r4x5n4y4m4z4s5k3x5l4s5m3x5n3m5o3r5p4s5q3x5r5n5s3x5t3r5u3r5v2r5w1w5x2r5y2u5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q1w6r3m6s3m6t1w6u1w6v2w6w1w6x4s6y3m6z3m7k3m7l3m7m2r7n2r7o1w7p3m7q2w7r4m7s2w7t2w7u2r7v2s7w1v7x2s7y3q202l3mcl3xal2ram3man3mao3map3mar3mas2lat4wau1vav3maw4nay4waz2lbk2sbl4n'fof'6obo2lbp3mbq3obr1tbs2lbu1zbv3mbz3mck3x202k3mcm3xcn3xco3xcp3xcq5tcr4mcs3xct3xcu3xcv3xcw2l2m2ucy2lcz2ldl4mdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr4nfs3mft3mfu3mfv3mfw3mfz2w203k6o212m6m2dw2l2cq2l3t3m3u2l17s3r19m3m}'kerning'{cl{5kt4qw}201s{201sw}201t{201tw2wy2yy6q-t}201x{2wy2yy}2k{201tw}2w{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}2x{17ss5ts5os}2y{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}'fof'-6o6t{17ss5ts5qs}7t{5os}3v{5qs}7p{17su5tu5qs}ck{5kt4qw}4l{5kt4qw}cm{5kt4qw}cn{5kt4qw}co{5kt4qw}cp{5kt4qw}6l{4qs5ks5ou5qw5ru17su5tu}17s{2ks}5q{ckvclvcmvcnvcovcpv4lv}5r{ckuclucmucnucoucpu4lu}5t{2ks}6p{4qs5ks5ou5qw5ru17su5tu}ek{4qs5ks5ou5qw5ru17su5tu}el{4qs5ks5ou5qw5ru17su5tu}em{4qs5ks5ou5qw5ru17su5tu}en{4qs5ks5ou5qw5ru17su5tu}eo{4qs5ks5ou5qw5ru17su5tu}ep{4qs5ks5ou5qw5ru17su5tu}es{5ks5qs4qs}et{4qs5ks5ou5qw5ru17su5tu}eu{4qs5ks5qw5ru17su5tu}ev{5ks5qs4qs}ex{17ss5ts5qs}6z{4qv5ks5ou5qw5ru17su5tu}fm{4qv5ks5ou5qw5ru17su5tu}fn{4qv5ks5ou5qw5ru17su5tu}fo{4qv5ks5ou5qw5ru17su5tu}fp{4qv5ks5ou5qw5ru17su5tu}fq{4qv5ks5ou5qw5ru17su5tu}7r{5os}fs{4qv5ks5ou5qw5ru17su5tu}ft{17su5tu5qs}fu{17su5tu5qs}fv{17su5tu5qs}fw{17su5tu5qs}}}"),"Times-Roman":c("{'widths'{k3n2q4ycx2l201n3m201o6o201s2l201t2l201u2l201w2w201x2w201y2w2k1t2l2l202m2n2n3m2o3m2p5n202q6o2r1m2s2l2t2l2u3m2v3s2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v1w3w3s3x3s3y3s3z2w4k5w4l4s4m4m4n4m4o4s4p3x4q3r4r4s4s4s4t2l4u2r4v4s4w3x4x5t4y4s4z4s5k3r5l4s5m4m5n3r5o3x5p4s5q4s5r5y5s4s5t4s5u3x5v2l5w1w5x2l5y2z5z3m6k2l6l2w6m3m6n2w6o3m6p2w6q2l6r3m6s3m6t1w6u1w6v3m6w1w6x4y6y3m6z3m7k3m7l3m7m2l7n2r7o1w7p3m7q3m7r4s7s3m7t3m7u2w7v3k7w1o7x3k7y3q202l3mcl4sal2lam3man3mao3map3mar3mas2lat4wau1vav3maw3say4waz2lbk2sbl3s'fof'6obo2lbp3mbq2xbr1tbs2lbu1zbv3mbz2wck4s202k3mcm4scn4sco4scp4scq5tcr4mcs3xct3xcu3xcv3xcw2l2m2tcy2lcz2ldl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek2wel2wem2wen2weo2wep2weq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr3sfs3mft3mfu3mfv3mfw3mfz3m203k6o212m6m2dw2l2cq2l3t3m3u1w17s4s19m3m}'kerning'{cl{4qs5ku17sw5ou5qy5rw201ss5tw201ws}201s{201ss}201t{ckw4lwcmwcnwcowcpwclw4wu201ts}2k{201ts}2w{4qs5kw5os5qx5ru17sx5tx}2x{17sw5tw5ou5qu}2y{4qs5kw5os5qx5ru17sx5tx}'fof'-6o7t{ckuclucmucnucoucpu4lu5os5rs}3u{17su5tu5qs}3v{17su5tu5qs}7p{17sw5tw5qs}ck{4qs5ku17sw5ou5qy5rw201ss5tw201ws}4l{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cm{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cn{4qs5ku17sw5ou5qy5rw201ss5tw201ws}co{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cp{4qs5ku17sw5ou5qy5rw201ss5tw201ws}6l{17su5tu5os5qw5rs}17s{2ktclvcmvcnvcovcpv4lv4wuckv}5o{ckwclwcmwcnwcowcpw4lw4wu}5q{ckyclycmycnycoycpy4ly4wu5ms}5r{cktcltcmtcntcotcpt4lt4ws}5t{2ktclvcmvcnvcovcpv4lv4wuckv}7q{cksclscmscnscoscps4ls}6p{17su5tu5qw5rs}ek{5qs5rs}el{17su5tu5os5qw5rs}em{17su5tu5os5qs5rs}en{17su5qs5rs}eo{5qs5rs}ep{17su5tu5os5qw5rs}es{5qs}et{17su5tu5qw5rs}eu{17su5tu5qs5rs}ev{5qs}6z{17sv5tv5os5qx5rs}fm{5os5qt5rs}fn{17sv5tv5os5qx5rs}fo{17sv5tv5os5qx5rs}fp{5os5qt5rs}fq{5os5qt5rs}7r{ckuclucmucnucoucpu4lu5os}fs{17sv5tv5os5qx5rs}ft{17ss5ts5qs}fu{17sw5tw5qs}fv{17sw5tw5qs}fw{17ss5ts5qs}fz{ckuclucmucnucoucpu4lu5os5rs}}}"),"Helvetica-Oblique":c("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}")}};e.events.push(["addFont",function(f){var h=f.font,y=d.Unicode[h.postScriptName];y&&(h.metadata.Unicode={},h.metadata.Unicode.widths=y.widths,h.metadata.Unicode.kerning=y.kerning);var v=u.Unicode[h.postScriptName];v&&(h.metadata.Unicode.encoding=v,h.encoding=v.codePages[0])}])}(At.API),function(e){var t=function(n){for(var r=n.length,i=new Uint8Array(r),a=0;a<r;a++)i[a]=n.charCodeAt(a);return i};e.API.events.push(["addFont",function(n){var r=void 0,i=n.font,a=n.instance;if(!i.isStandardFont){if(a===void 0)throw new Error("Font does not exist in vFS, import fonts or remove declaration doc.addFont('"+i.postScriptName+"').");if(typeof(r=a.existsFileInVFS(i.postScriptName)===!1?a.loadFile(i.postScriptName):a.getFileFromVFS(i.postScriptName))!="string")throw new Error("Font is not stored as string-data in vFS, import fonts or remove declaration doc.addFont('"+i.postScriptName+"').");(function(o,s){s=/^\x00\x01\x00\x00/.test(s)?t(s):t(fT(s)),o.metadata=e.API.TTFFont.open(s),o.metadata.Unicode=o.metadata.Unicode||{encoding:{},kerning:{},widths:[]},o.metadata.glyIdsUsed=[0]})(i,r)}}])}(At),At.API.addSvgAsImage=function(e,t,n,r,i,a,o,s){if(isNaN(t)||isNaN(n))throw En.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(r)||isNaN(i))throw En.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var c=document.createElement("canvas");c.width=r,c.height=i;var l=c.getContext("2d");l.fillStyle="#fff",l.fillRect(0,0,c.width,c.height);var u={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},d=this;return(Dt.canvg?Promise.resolve(Dt.canvg):TU(()=>import("./index.es-DWsOF_i7.js"),[])).catch(function(f){return Promise.reject(new Error("Could not load canvg: "+f))}).then(function(f){return f.default?f.default:f}).then(function(f){return f.fromString(l,e,u)},function(){return Promise.reject(new Error("Could not load canvg."))}).then(function(f){return f.render(u)}).then(function(){d.addImage(c.toDataURL("image/jpeg",1),t,n,r,i,o,s)})},At.API.putTotalPages=function(e){var t,n=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(t=new RegExp(e,"g"),n=this.internal.getNumberOfPages()):(t=new RegExp(this.pdfEscape16(e,this.internal.getFont()),"g"),n=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var r=1;r<=this.internal.getNumberOfPages();r++)for(var i=0;i<this.internal.pages[r].length;i++)this.internal.pages[r][i]=this.internal.pages[r][i].replace(t,n);return this},At.API.viewerPreferences=function(e,t){var n;e=e||{},t=t||!1;var r,i,a,o={HideToolbar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideMenubar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideWindowUI:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},FitWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},CenterWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},DisplayDocTitle:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.4},NonFullScreenPageMode:{defaultValue:"UseNone",value:"UseNone",type:"name",explicitSet:!1,valueSet:["UseNone","UseOutlines","UseThumbs","UseOC"],pdfVersion:1.3},Direction:{defaultValue:"L2R",value:"L2R",type:"name",explicitSet:!1,valueSet:["L2R","R2L"],pdfVersion:1.3},ViewArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},ViewClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintScaling:{defaultValue:"AppDefault",value:"AppDefault",type:"name",explicitSet:!1,valueSet:["AppDefault","None"],pdfVersion:1.6},Duplex:{defaultValue:"",value:"none",type:"name",explicitSet:!1,valueSet:["Simplex","DuplexFlipShortEdge","DuplexFlipLongEdge","none"],pdfVersion:1.7},PickTrayByPDFSize:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.7},PrintPageRange:{defaultValue:"",value:"",type:"array",explicitSet:!1,valueSet:null,pdfVersion:1.7},NumCopies:{defaultValue:1,value:1,type:"integer",explicitSet:!1,valueSet:null,pdfVersion:1.7}},s=Object.keys(o),c=[],l=0,u=0,d=0;function f(y,v){var k,g=!1;for(k=0;k<y.length;k+=1)y[k]===v&&(g=!0);return g}if(this.internal.viewerpreferences===void 0&&(this.internal.viewerpreferences={},this.internal.viewerpreferences.configuration=JSON.parse(JSON.stringify(o)),this.internal.viewerpreferences.isSubscribed=!1),n=this.internal.viewerpreferences.configuration,e==="reset"||t===!0){var h=s.length;for(d=0;d<h;d+=1)n[s[d]].value=n[s[d]].defaultValue,n[s[d]].explicitSet=!1}if(kn(e)==="object"){for(i in e)if(a=e[i],f(s,i)&&a!==void 0){if(n[i].type==="boolean"&&typeof a=="boolean")n[i].value=a;else if(n[i].type==="name"&&f(n[i].valueSet,a))n[i].value=a;else if(n[i].type==="integer"&&Number.isInteger(a))n[i].value=a;else if(n[i].type==="array"){for(l=0;l<a.length;l+=1)if(r=!0,a[l].length===1&&typeof a[l][0]=="number")c.push(String(a[l]-1));else if(a[l].length>1){for(u=0;u<a[l].length;u+=1)typeof a[l][u]!="number"&&(r=!1);r===!0&&c.push([a[l][0]-1,a[l][1]-1].join(" "))}n[i].value="["+c.join(" ")+"]"}else n[i].value=n[i].defaultValue;n[i].explicitSet=!0}}return this.internal.viewerpreferences.isSubscribed===!1&&(this.internal.events.subscribe("putCatalog",function(){var y,v=[];for(y in n)n[y].explicitSet===!0&&(n[y].type==="name"?v.push("/"+y+" /"+n[y].value):v.push("/"+y+" "+n[y].value));v.length!==0&&this.internal.write(`/ViewerPreferences
7976
+ `&&(r=r.substr(1),w=1),f+h+(y=(i=Nm.apply(this,[r,n])).reduce(function(C,_){return C+_},0))>t||w){if(y>t){for(s=Pse.apply(this,[r,i,t-(f+h),t]),u.push(s.shift()),u=[s.pop()];s.length;)d.push([s.shift()]);y=i.slice(r.length-(u[0]?u[0].length:0)).reduce(function(C,_){return C+_},0)}else u=[r];d.push(u),f=y+c,h=k}else u.push(r),f+=h+y,h=k}return l=c?function(C,_){return(_?g:"")+C.join(" ")}:function(C){return C.join(" ")},d.map(l)},k2.splitTextToSize=function(e,t,n){var r,i=(n=n||{}).fontSize||this.internal.getFontSize(),a=(function(u){if(u.widths&&u.kerning)return{widths:u.widths,kerning:u.kerning};var d=this.internal.getFont(u.fontName,u.fontStyle),f="Unicode";return d.metadata[f]?{widths:d.metadata[f].widths||{0:1},kerning:d.metadata[f].kerning||{}}:{font:d.metadata,fontSize:this.internal.getFontSize(),charSpace:this.internal.getCharSpace()}}).call(this,n);r=Array.isArray(e)?e:String(e).split(/\r?\n/);var o=1*this.internal.scaleFactor*t/i;a.textIndent=n.textIndent?1*n.textIndent*this.internal.scaleFactor/i:0,a.lineIndent=n.lineIndent;var s,c,l=[];for(s=0,c=r.length;s<c;s++)l=l.concat(Nse.apply(this,[r[s],o,a]));return l},function(e){e.__fontmetrics__=e.__fontmetrics__||{};for(var t="0123456789abcdef",n="klmnopqrstuvwxyz",r={},i={},a=0;a<16;a++)r[n[a]]=t[a],i[t[a]]=n[a];var o=function(f){return"0x"+parseInt(f,10).toString(16)},s=e.__fontmetrics__.compress=function(f){var h,y,v,k,g=["{"];for(var S in f){if(h=f[S],isNaN(parseInt(S,10))?y="'"+S+"'":(S=parseInt(S,10),y=(y=o(S).slice(2)).slice(0,-1)+i[y.slice(-1)]),typeof h=="number")h<0?(v=o(h).slice(3),k="-"):(v=o(h).slice(2),k=""),v=k+v.slice(0,-1)+i[v.slice(-1)];else{if(kn(h)!=="object")throw new Error("Don't know what to do with value type "+kn(h)+".");v=s(h)}g.push(y+v)}return g.push("}"),g.join("")},c=e.__fontmetrics__.uncompress=function(f){if(typeof f!="string")throw new Error("Invalid argument passed to uncompress.");for(var h,y,v,k,g={},S=1,w=g,C=[],_="",A="",j=f.length-1,O=1;O<j;O+=1)(k=f[O])=="'"?h?(v=h.join(""),h=void 0):h=[]:h?h.push(k):k=="{"?(C.push([w,v]),w={},v=void 0):k=="}"?((y=C.pop())[0][y[1]]=w,v=void 0,w=y[0]):k=="-"?S=-1:v===void 0?r.hasOwnProperty(k)?(_+=r[k],v=parseInt(_,16)*S,S=1,_=""):_+=k:r.hasOwnProperty(k)?(A+=r[k],w[v]=parseInt(A,16)*S,S=1,v=void 0,A=""):A+=k;return g},l={codePages:["WinAnsiEncoding"],WinAnsiEncoding:c("{19m8n201n9q201o9r201s9l201t9m201u8m201w9n201x9o201y8o202k8q202l8r202m9p202q8p20aw8k203k8t203t8v203u9v2cq8s212m9t15m8w15n9w2dw9s16k8u16l9u17s9z17x8y17y9y}")},u={Unicode:{Courier:l,"Courier-Bold":l,"Courier-BoldOblique":l,"Courier-Oblique":l,Helvetica:l,"Helvetica-Bold":l,"Helvetica-BoldOblique":l,"Helvetica-Oblique":l,"Times-Roman":l,"Times-Bold":l,"Times-BoldItalic":l,"Times-Italic":l}},d={Unicode:{"Courier-Oblique":c("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-BoldItalic":c("{'widths'{k3o2q4ycx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2r202m2n2n3m2o3m2p5n202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5n4l4m4m4m4n4m4o4s4p4m4q4m4r4s4s4y4t2r4u3m4v4m4w3x4x5t4y4s4z4s5k3x5l4s5m4m5n3r5o3x5p4s5q4m5r5t5s4m5t3x5u3x5v2l5w1w5x2l5y3t5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q2l6r3m6s3r6t1w6u1w6v3m6w1w6x4y6y3r6z3m7k3m7l3m7m2r7n2r7o1w7p3r7q2w7r4m7s3m7t2w7u2r7v2n7w1q7x2n7y3t202l3mcl4mal2ram3man3mao3map3mar3mas2lat4uau1uav3maw3way4uaz2lbk2sbl3t'fof'6obo2lbp3tbq3mbr1tbs2lbu1ybv3mbz3mck4m202k3mcm4mcn4mco4mcp4mcq5ycr4mcs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz2w203k6o212m6o2dw2l2cq2l3t3m3u2l17s3x19m3m}'kerning'{cl{4qu5kt5qt5rs17ss5ts}201s{201ss}201t{cks4lscmscnscoscpscls2wu2yu201ts}201x{2wu2yu}2k{201ts}2w{4qx5kx5ou5qx5rs17su5tu}2x{17su5tu5ou}2y{4qx5kx5ou5qx5rs17ss5ts}'fof'-6ofn{17sw5tw5ou5qw5rs}7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qs}3v{17su5tu5os5qs}7p{17su5tu}ck{4qu5kt5qt5rs17ss5ts}4l{4qu5kt5qt5rs17ss5ts}cm{4qu5kt5qt5rs17ss5ts}cn{4qu5kt5qt5rs17ss5ts}co{4qu5kt5qt5rs17ss5ts}cp{4qu5kt5qt5rs17ss5ts}6l{4qu5ou5qw5rt17su5tu}5q{ckuclucmucnucoucpu4lu}5r{ckuclucmucnucoucpu4lu}7q{cksclscmscnscoscps4ls}6p{4qu5ou5qw5rt17sw5tw}ek{4qu5ou5qw5rt17su5tu}el{4qu5ou5qw5rt17su5tu}em{4qu5ou5qw5rt17su5tu}en{4qu5ou5qw5rt17su5tu}eo{4qu5ou5qw5rt17su5tu}ep{4qu5ou5qw5rt17su5tu}es{17ss5ts5qs4qu}et{4qu5ou5qw5rt17sw5tw}eu{4qu5ou5qw5rt17ss5ts}ev{17ss5ts5qs4qu}6z{17sw5tw5ou5qw5rs}fm{17sw5tw5ou5qw5rs}7n{201ts}fo{17sw5tw5ou5qw5rs}fp{17sw5tw5ou5qw5rs}fq{17sw5tw5ou5qw5rs}7r{cksclscmscnscoscps4ls}fs{17sw5tw5ou5qw5rs}ft{17su5tu}fu{17su5tu}fv{17su5tu}fw{17su5tu}fz{cksclscmscnscoscps4ls}}}"),"Helvetica-Bold":c("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),Courier:c("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-BoldOblique":c("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Bold":c("{'widths'{k3q2q5ncx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2l202m2n2n3m2o3m2p6o202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5x4l4s4m4m4n4s4o4s4p4m4q3x4r4y4s4y4t2r4u3m4v4y4w4m4x5y4y4s4z4y5k3x5l4y5m4s5n3r5o4m5p4s5q4s5r6o5s4s5t4s5u4m5v2l5w1w5x2l5y3u5z3m6k2l6l3m6m3r6n2w6o3r6p2w6q2l6r3m6s3r6t1w6u2l6v3r6w1w6x5n6y3r6z3m7k3r7l3r7m2w7n2r7o2l7p3r7q3m7r4s7s3m7t3m7u2w7v2r7w1q7x2r7y3o202l3mcl4sal2lam3man3mao3map3mar3mas2lat4uau1yav3maw3tay4uaz2lbk2sbl3t'fof'6obo2lbp3rbr1tbs2lbu2lbv3mbz3mck4s202k3mcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3rek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3m3u2l17s4s19m3m}'kerning'{cl{4qt5ks5ot5qy5rw17sv5tv}201t{cks4lscmscnscoscpscls4wv}2k{201ts}2w{4qu5ku7mu5os5qx5ru17su5tu}2x{17su5tu5ou5qs}2y{4qv5kv7mu5ot5qz5ru17su5tu}'fof'-6o7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qu}3v{17su5tu5os5qu}fu{17su5tu5ou5qu}7p{17su5tu5ou5qu}ck{4qt5ks5ot5qy5rw17sv5tv}4l{4qt5ks5ot5qy5rw17sv5tv}cm{4qt5ks5ot5qy5rw17sv5tv}cn{4qt5ks5ot5qy5rw17sv5tv}co{4qt5ks5ot5qy5rw17sv5tv}cp{4qt5ks5ot5qy5rw17sv5tv}6l{17st5tt5ou5qu}17s{ckuclucmucnucoucpu4lu4wu}5o{ckuclucmucnucoucpu4lu4wu}5q{ckzclzcmzcnzcozcpz4lz4wu}5r{ckxclxcmxcnxcoxcpx4lx4wu}5t{ckuclucmucnucoucpu4lu4wu}7q{ckuclucmucnucoucpu4lu}6p{17sw5tw5ou5qu}ek{17st5tt5qu}el{17st5tt5ou5qu}em{17st5tt5qu}en{17st5tt5qu}eo{17st5tt5qu}ep{17st5tt5ou5qu}es{17ss5ts5qu}et{17sw5tw5ou5qu}eu{17sw5tw5ou5qu}ev{17ss5ts5qu}6z{17sw5tw5ou5qu5rs}fm{17sw5tw5ou5qu5rs}fn{17sw5tw5ou5qu5rs}fo{17sw5tw5ou5qu5rs}fp{17sw5tw5ou5qu5rs}fq{17sw5tw5ou5qu5rs}7r{cktcltcmtcntcotcpt4lt5os}fs{17sw5tw5ou5qu5rs}ft{17su5tu5ou5qu}7m{5os}fv{17su5tu5ou5qu}fw{17su5tu5ou5qu}fz{cksclscmscnscoscps4ls}}}"),Symbol:c("{'widths'{k3uaw4r19m3m2k1t2l2l202m2y2n3m2p5n202q6o3k3m2s2l2t2l2v3r2w1t3m3m2y1t2z1wbk2sbl3r'fof'6o3n3m3o3m3p3m3q3m3r3m3s3m3t3m3u1w3v1w3w3r3x3r3y3r3z2wbp3t3l3m5v2l5x2l5z3m2q4yfr3r7v3k7w1o7x3k}'kerning'{'fof'-6o}}"),Helvetica:c("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}"),"Helvetica-BoldOblique":c("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),ZapfDingbats:c("{'widths'{k4u2k1w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-Bold":c("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Italic":c("{'widths'{k3n2q4ycx2l201n3m201o5t201s2l201t2l201u2l201w3r201x3r201y3r2k1t2l2l202m2n2n3m2o3m2p5n202q5t2r1p2s2l2t2l2u3m2v4n2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w4n3x4n3y4n3z3m4k5w4l3x4m3x4n4m4o4s4p3x4q3x4r4s4s4s4t2l4u2w4v4m4w3r4x5n4y4m4z4s5k3x5l4s5m3x5n3m5o3r5p4s5q3x5r5n5s3x5t3r5u3r5v2r5w1w5x2r5y2u5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q1w6r3m6s3m6t1w6u1w6v2w6w1w6x4s6y3m6z3m7k3m7l3m7m2r7n2r7o1w7p3m7q2w7r4m7s2w7t2w7u2r7v2s7w1v7x2s7y3q202l3mcl3xal2ram3man3mao3map3mar3mas2lat4wau1vav3maw4nay4waz2lbk2sbl4n'fof'6obo2lbp3mbq3obr1tbs2lbu1zbv3mbz3mck3x202k3mcm3xcn3xco3xcp3xcq5tcr4mcs3xct3xcu3xcv3xcw2l2m2ucy2lcz2ldl4mdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr4nfs3mft3mfu3mfv3mfw3mfz2w203k6o212m6m2dw2l2cq2l3t3m3u2l17s3r19m3m}'kerning'{cl{5kt4qw}201s{201sw}201t{201tw2wy2yy6q-t}201x{2wy2yy}2k{201tw}2w{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}2x{17ss5ts5os}2y{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}'fof'-6o6t{17ss5ts5qs}7t{5os}3v{5qs}7p{17su5tu5qs}ck{5kt4qw}4l{5kt4qw}cm{5kt4qw}cn{5kt4qw}co{5kt4qw}cp{5kt4qw}6l{4qs5ks5ou5qw5ru17su5tu}17s{2ks}5q{ckvclvcmvcnvcovcpv4lv}5r{ckuclucmucnucoucpu4lu}5t{2ks}6p{4qs5ks5ou5qw5ru17su5tu}ek{4qs5ks5ou5qw5ru17su5tu}el{4qs5ks5ou5qw5ru17su5tu}em{4qs5ks5ou5qw5ru17su5tu}en{4qs5ks5ou5qw5ru17su5tu}eo{4qs5ks5ou5qw5ru17su5tu}ep{4qs5ks5ou5qw5ru17su5tu}es{5ks5qs4qs}et{4qs5ks5ou5qw5ru17su5tu}eu{4qs5ks5qw5ru17su5tu}ev{5ks5qs4qs}ex{17ss5ts5qs}6z{4qv5ks5ou5qw5ru17su5tu}fm{4qv5ks5ou5qw5ru17su5tu}fn{4qv5ks5ou5qw5ru17su5tu}fo{4qv5ks5ou5qw5ru17su5tu}fp{4qv5ks5ou5qw5ru17su5tu}fq{4qv5ks5ou5qw5ru17su5tu}7r{5os}fs{4qv5ks5ou5qw5ru17su5tu}ft{17su5tu5qs}fu{17su5tu5qs}fv{17su5tu5qs}fw{17su5tu5qs}}}"),"Times-Roman":c("{'widths'{k3n2q4ycx2l201n3m201o6o201s2l201t2l201u2l201w2w201x2w201y2w2k1t2l2l202m2n2n3m2o3m2p5n202q6o2r1m2s2l2t2l2u3m2v3s2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v1w3w3s3x3s3y3s3z2w4k5w4l4s4m4m4n4m4o4s4p3x4q3r4r4s4s4s4t2l4u2r4v4s4w3x4x5t4y4s4z4s5k3r5l4s5m4m5n3r5o3x5p4s5q4s5r5y5s4s5t4s5u3x5v2l5w1w5x2l5y2z5z3m6k2l6l2w6m3m6n2w6o3m6p2w6q2l6r3m6s3m6t1w6u1w6v3m6w1w6x4y6y3m6z3m7k3m7l3m7m2l7n2r7o1w7p3m7q3m7r4s7s3m7t3m7u2w7v3k7w1o7x3k7y3q202l3mcl4sal2lam3man3mao3map3mar3mas2lat4wau1vav3maw3say4waz2lbk2sbl3s'fof'6obo2lbp3mbq2xbr1tbs2lbu1zbv3mbz2wck4s202k3mcm4scn4sco4scp4scq5tcr4mcs3xct3xcu3xcv3xcw2l2m2tcy2lcz2ldl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek2wel2wem2wen2weo2wep2weq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr3sfs3mft3mfu3mfv3mfw3mfz3m203k6o212m6m2dw2l2cq2l3t3m3u1w17s4s19m3m}'kerning'{cl{4qs5ku17sw5ou5qy5rw201ss5tw201ws}201s{201ss}201t{ckw4lwcmwcnwcowcpwclw4wu201ts}2k{201ts}2w{4qs5kw5os5qx5ru17sx5tx}2x{17sw5tw5ou5qu}2y{4qs5kw5os5qx5ru17sx5tx}'fof'-6o7t{ckuclucmucnucoucpu4lu5os5rs}3u{17su5tu5qs}3v{17su5tu5qs}7p{17sw5tw5qs}ck{4qs5ku17sw5ou5qy5rw201ss5tw201ws}4l{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cm{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cn{4qs5ku17sw5ou5qy5rw201ss5tw201ws}co{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cp{4qs5ku17sw5ou5qy5rw201ss5tw201ws}6l{17su5tu5os5qw5rs}17s{2ktclvcmvcnvcovcpv4lv4wuckv}5o{ckwclwcmwcnwcowcpw4lw4wu}5q{ckyclycmycnycoycpy4ly4wu5ms}5r{cktcltcmtcntcotcpt4lt4ws}5t{2ktclvcmvcnvcovcpv4lv4wuckv}7q{cksclscmscnscoscps4ls}6p{17su5tu5qw5rs}ek{5qs5rs}el{17su5tu5os5qw5rs}em{17su5tu5os5qs5rs}en{17su5qs5rs}eo{5qs5rs}ep{17su5tu5os5qw5rs}es{5qs}et{17su5tu5qw5rs}eu{17su5tu5qs5rs}ev{5qs}6z{17sv5tv5os5qx5rs}fm{5os5qt5rs}fn{17sv5tv5os5qx5rs}fo{17sv5tv5os5qx5rs}fp{5os5qt5rs}fq{5os5qt5rs}7r{ckuclucmucnucoucpu4lu5os}fs{17sv5tv5os5qx5rs}ft{17ss5ts5qs}fu{17sw5tw5qs}fv{17sw5tw5qs}fw{17ss5ts5qs}fz{ckuclucmucnucoucpu4lu5os5rs}}}"),"Helvetica-Oblique":c("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}")}};e.events.push(["addFont",function(f){var h=f.font,y=d.Unicode[h.postScriptName];y&&(h.metadata.Unicode={},h.metadata.Unicode.widths=y.widths,h.metadata.Unicode.kerning=y.kerning);var v=u.Unicode[h.postScriptName];v&&(h.metadata.Unicode.encoding=v,h.encoding=v.codePages[0])}])}(At.API),function(e){var t=function(n){for(var r=n.length,i=new Uint8Array(r),a=0;a<r;a++)i[a]=n.charCodeAt(a);return i};e.API.events.push(["addFont",function(n){var r=void 0,i=n.font,a=n.instance;if(!i.isStandardFont){if(a===void 0)throw new Error("Font does not exist in vFS, import fonts or remove declaration doc.addFont('"+i.postScriptName+"').");if(typeof(r=a.existsFileInVFS(i.postScriptName)===!1?a.loadFile(i.postScriptName):a.getFileFromVFS(i.postScriptName))!="string")throw new Error("Font is not stored as string-data in vFS, import fonts or remove declaration doc.addFont('"+i.postScriptName+"').");(function(o,s){s=/^\x00\x01\x00\x00/.test(s)?t(s):t(fT(s)),o.metadata=e.API.TTFFont.open(s),o.metadata.Unicode=o.metadata.Unicode||{encoding:{},kerning:{},widths:[]},o.metadata.glyIdsUsed=[0]})(i,r)}}])}(At),At.API.addSvgAsImage=function(e,t,n,r,i,a,o,s){if(isNaN(t)||isNaN(n))throw En.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(r)||isNaN(i))throw En.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var c=document.createElement("canvas");c.width=r,c.height=i;var l=c.getContext("2d");l.fillStyle="#fff",l.fillRect(0,0,c.width,c.height);var u={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},d=this;return(Dt.canvg?Promise.resolve(Dt.canvg):TU(()=>import("./index.es-CM2fDgHg.js"),[])).catch(function(f){return Promise.reject(new Error("Could not load canvg: "+f))}).then(function(f){return f.default?f.default:f}).then(function(f){return f.fromString(l,e,u)},function(){return Promise.reject(new Error("Could not load canvg."))}).then(function(f){return f.render(u)}).then(function(){d.addImage(c.toDataURL("image/jpeg",1),t,n,r,i,o,s)})},At.API.putTotalPages=function(e){var t,n=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(t=new RegExp(e,"g"),n=this.internal.getNumberOfPages()):(t=new RegExp(this.pdfEscape16(e,this.internal.getFont()),"g"),n=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var r=1;r<=this.internal.getNumberOfPages();r++)for(var i=0;i<this.internal.pages[r].length;i++)this.internal.pages[r][i]=this.internal.pages[r][i].replace(t,n);return this},At.API.viewerPreferences=function(e,t){var n;e=e||{},t=t||!1;var r,i,a,o={HideToolbar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideMenubar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideWindowUI:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},FitWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},CenterWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},DisplayDocTitle:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.4},NonFullScreenPageMode:{defaultValue:"UseNone",value:"UseNone",type:"name",explicitSet:!1,valueSet:["UseNone","UseOutlines","UseThumbs","UseOC"],pdfVersion:1.3},Direction:{defaultValue:"L2R",value:"L2R",type:"name",explicitSet:!1,valueSet:["L2R","R2L"],pdfVersion:1.3},ViewArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},ViewClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintScaling:{defaultValue:"AppDefault",value:"AppDefault",type:"name",explicitSet:!1,valueSet:["AppDefault","None"],pdfVersion:1.6},Duplex:{defaultValue:"",value:"none",type:"name",explicitSet:!1,valueSet:["Simplex","DuplexFlipShortEdge","DuplexFlipLongEdge","none"],pdfVersion:1.7},PickTrayByPDFSize:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.7},PrintPageRange:{defaultValue:"",value:"",type:"array",explicitSet:!1,valueSet:null,pdfVersion:1.7},NumCopies:{defaultValue:1,value:1,type:"integer",explicitSet:!1,valueSet:null,pdfVersion:1.7}},s=Object.keys(o),c=[],l=0,u=0,d=0;function f(y,v){var k,g=!1;for(k=0;k<y.length;k+=1)y[k]===v&&(g=!0);return g}if(this.internal.viewerpreferences===void 0&&(this.internal.viewerpreferences={},this.internal.viewerpreferences.configuration=JSON.parse(JSON.stringify(o)),this.internal.viewerpreferences.isSubscribed=!1),n=this.internal.viewerpreferences.configuration,e==="reset"||t===!0){var h=s.length;for(d=0;d<h;d+=1)n[s[d]].value=n[s[d]].defaultValue,n[s[d]].explicitSet=!1}if(kn(e)==="object"){for(i in e)if(a=e[i],f(s,i)&&a!==void 0){if(n[i].type==="boolean"&&typeof a=="boolean")n[i].value=a;else if(n[i].type==="name"&&f(n[i].valueSet,a))n[i].value=a;else if(n[i].type==="integer"&&Number.isInteger(a))n[i].value=a;else if(n[i].type==="array"){for(l=0;l<a.length;l+=1)if(r=!0,a[l].length===1&&typeof a[l][0]=="number")c.push(String(a[l]-1));else if(a[l].length>1){for(u=0;u<a[l].length;u+=1)typeof a[l][u]!="number"&&(r=!1);r===!0&&c.push([a[l][0]-1,a[l][1]-1].join(" "))}n[i].value="["+c.join(" ")+"]"}else n[i].value=n[i].defaultValue;n[i].explicitSet=!0}}return this.internal.viewerpreferences.isSubscribed===!1&&(this.internal.events.subscribe("putCatalog",function(){var y,v=[];for(y in n)n[y].explicitSet===!0&&(n[y].type==="name"?v.push("/"+y+" /"+n[y].value):v.push("/"+y+" "+n[y].value));v.length!==0&&this.internal.write(`/ViewerPreferences
7977
7977
  <<
7978
7978
  `+v.join(`
7979
7979
  `)+`
@@ -8002,4 +8002,4 @@ endbfchar
8002
8002
  CMapName currentdict /CMap defineresource pop
8003
8003
  end
8004
8004
  end`};t.events.push(["putFont",function(a){(function(o){var s=o.font,c=o.out,l=o.newObject,u=o.putStream;if(s.metadata instanceof e.API.TTFFont&&s.encoding==="Identity-H"){for(var d=s.metadata.Unicode.widths,f=s.metadata.subset.encode(s.metadata.glyIdsUsed,1),h="",y=0;y<f.length;y++)h+=String.fromCharCode(f[y]);var v=l();u({data:h,addLength1:!0,objectId:v}),c("endobj");var k=l();u({data:r(s.metadata.toUnicode),addLength1:!0,objectId:k}),c("endobj");var g=l();c("<<"),c("/Type /FontDescriptor"),c("/FontName /"+C2(s.fontName)),c("/FontFile2 "+v+" 0 R"),c("/FontBBox "+e.API.PDFObject.convert(s.metadata.bbox)),c("/Flags "+s.metadata.flags),c("/StemV "+s.metadata.stemV),c("/ItalicAngle "+s.metadata.italicAngle),c("/Ascent "+s.metadata.ascender),c("/Descent "+s.metadata.decender),c("/CapHeight "+s.metadata.capHeight),c(">>"),c("endobj");var S=l();c("<<"),c("/Type /Font"),c("/BaseFont /"+C2(s.fontName)),c("/FontDescriptor "+g+" 0 R"),c("/W "+e.API.PDFObject.convert(d)),c("/CIDToGIDMap /Identity"),c("/DW 1000"),c("/Subtype /CIDFontType2"),c("/CIDSystemInfo"),c("<<"),c("/Supplement 0"),c("/Registry (Adobe)"),c("/Ordering ("+s.encoding+")"),c(">>"),c(">>"),c("endobj"),s.objectNumber=l(),c("<<"),c("/Type /Font"),c("/Subtype /Type0"),c("/ToUnicode "+k+" 0 R"),c("/BaseFont /"+C2(s.fontName)),c("/Encoding /"+s.encoding),c("/DescendantFonts ["+S+" 0 R]"),c(">>"),c("endobj"),s.isAlreadyPutted=!0}})(a)}]),t.events.push(["putFont",function(a){(function(o){var s=o.font,c=o.out,l=o.newObject,u=o.putStream;if(s.metadata instanceof e.API.TTFFont&&s.encoding==="WinAnsiEncoding"){for(var d=s.metadata.rawData,f="",h=0;h<d.length;h++)f+=String.fromCharCode(d[h]);var y=l();u({data:f,addLength1:!0,objectId:y}),c("endobj");var v=l();u({data:r(s.metadata.toUnicode),addLength1:!0,objectId:v}),c("endobj");var k=l();c("<<"),c("/Descent "+s.metadata.decender),c("/CapHeight "+s.metadata.capHeight),c("/StemV "+s.metadata.stemV),c("/Type /FontDescriptor"),c("/FontFile2 "+y+" 0 R"),c("/Flags 96"),c("/FontBBox "+e.API.PDFObject.convert(s.metadata.bbox)),c("/FontName /"+C2(s.fontName)),c("/ItalicAngle "+s.metadata.italicAngle),c("/Ascent "+s.metadata.ascender),c(">>"),c("endobj"),s.objectNumber=l();for(var g=0;g<s.metadata.hmtx.widths.length;g++)s.metadata.hmtx.widths[g]=parseInt(s.metadata.hmtx.widths[g]*(1e3/s.metadata.head.unitsPerEm));c("<</Subtype/TrueType/Type/Font/ToUnicode "+v+" 0 R/BaseFont/"+C2(s.fontName)+"/FontDescriptor "+k+" 0 R/Encoding/"+s.encoding+" /FirstChar 29 /LastChar 255 /Widths "+e.API.PDFObject.convert(s.metadata.hmtx.widths)+">>"),c("endobj"),s.isAlreadyPutted=!0}})(a)}]);var i=function(a){var o,s=a.text||"",c=a.x,l=a.y,u=a.options||{},d=a.mutex||{},f=d.pdfEscape,h=d.activeFontKey,y=d.fonts,v=h,k="",g=0,S="",w=y[v].encoding;if(y[v].encoding!=="Identity-H")return{text:s,x:c,y:l,options:u,mutex:d};for(S=s,v=h,Array.isArray(s)&&(S=s[0]),g=0;g<S.length;g+=1)y[v].metadata.hasOwnProperty("cmap")&&(o=y[v].metadata.cmap.unicode.codeMap[S[g].charCodeAt(0)]),o||S[g].charCodeAt(0)<256&&y[v].metadata.hasOwnProperty("Unicode")?k+=S[g]:k+="";var C="";return parseInt(v.slice(1))<14||w==="WinAnsiEncoding"?C=f(k,v).split("").map(function(_){return _.charCodeAt(0).toString(16)}).join(""):w==="Identity-H"&&(C=n(k,y[v])),d.isHex=!0,{text:C,x:c,y:l,options:u,mutex:d}};t.events.push(["postProcessText",function(a){var o=a.text||"",s=[],c={text:o,x:a.x,y:a.y,options:a.options,mutex:a.mutex};if(Array.isArray(o)){var l=0;for(l=0;l<o.length;l+=1)Array.isArray(o[l])&&o[l].length===3?s.push([i(Object.assign({},c,{text:o[l][0]})).text,o[l][1],o[l][2]]):s.push(i(Object.assign({},c,{text:o[l]})).text);a.text=s}else a.text=i(Object.assign({},c,{text:o})).text}])}(At),function(e){var t=function(){return this.internal.vFS===void 0&&(this.internal.vFS={}),!0};e.existsFileInVFS=function(n){return t.call(this),this.internal.vFS[n]!==void 0},e.addFileToVFS=function(n,r){return t.call(this),this.internal.vFS[n]=r,this},e.getFileFromVFS=function(n){return t.call(this),this.internal.vFS[n]!==void 0?this.internal.vFS[n]:null}}(At.API),function(e){e.__bidiEngine__=e.prototype.__bidiEngine__=function(r){var i,a,o,s,c,l,u,d=t,f=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],h=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],y={L:0,R:1,EN:2,AN:3,N:4,B:5,S:6},v={0:0,5:1,6:2,7:3,32:4,251:5,254:6,255:7},k=["(",")","(","<",">","<","[","]","[","{","}","{","«","»","«","‹","›","‹","⁅","⁆","⁅","⁽","⁾","⁽","₍","₎","₍","≤","≥","≤","〈","〉","〈","﹙","﹚","﹙","﹛","﹜","﹛","﹝","﹞","﹝","﹤","﹥","﹤"],g=new RegExp(/^([1-4|9]|1[0-9]|2[0-9]|3[0168]|4[04589]|5[012]|7[78]|159|16[0-9]|17[0-2]|21[569]|22[03489]|250)$/),S=!1,w=0;this.__bidiEngine__={};var C=function(I){var R=I.charCodeAt(),U=R>>8,q=v[U];return q!==void 0?d[256*q+(255&R)]:U===252||U===253?"AL":g.test(U)?"L":U===8?"R":"N"},_=function(I){for(var R,U=0;U<I.length;U++){if((R=C(I.charAt(U)))==="L")return!1;if(R==="R")return!0}return!1},A=function(I,R,U,q){var K,Z,$,B,V=R[q];switch(V){case"L":case"R":case"LRE":case"RLE":case"LRO":case"RLO":case"PDF":S=!1;break;case"N":case"AN":break;case"EN":S&&(V="AN");break;case"AL":S=!0,V="R";break;case"WS":case"BN":V="N";break;case"CS":q<1||q+1>=R.length||(K=U[q-1])!=="EN"&&K!=="AN"||(Z=R[q+1])!=="EN"&&Z!=="AN"?V="N":S&&(Z="AN"),V=Z===K?Z:"N";break;case"ES":V=(K=q>0?U[q-1]:"B")==="EN"&&q+1<R.length&&R[q+1]==="EN"?"EN":"N";break;case"ET":if(q>0&&U[q-1]==="EN"){V="EN";break}if(S){V="N";break}for($=q+1,B=R.length;$<B&&R[$]==="ET";)$++;V=$<B&&R[$]==="EN"?"EN":"N";break;case"NSM":if(o&&!s){for(B=R.length,$=q+1;$<B&&R[$]==="NSM";)$++;if($<B){var F=I[q],ie=F>=1425&&F<=2303||F===64286;if(K=R[$],ie&&(K==="R"||K==="AL")){V="R";break}}}V=q<1||(K=R[q-1])==="B"?"N":U[q-1];break;case"B":S=!1,i=!0,V=w;break;case"S":a=!0,V="N"}return V},j=function(I,R,U){var q=I.split("");return U&&O(q,U,{hiLevel:w}),q.reverse(),R&&R.reverse(),q.join("")},O=function(I,R,U){var q,K,Z,$,B,V=-1,F=I.length,ie=0,N=[],P=w?h:f,G=[];for(S=!1,i=!1,a=!1,K=0;K<F;K++)G[K]=C(I[K]);for(Z=0;Z<F;Z++){if(B=ie,N[Z]=A(I,G,N,Z),q=240&(ie=P[B][y[N[Z]]]),ie&=15,R[Z]=$=P[ie][5],q>0)if(q===16){for(K=V;K<Z;K++)R[K]=1;V=-1}else V=-1;if(P[ie][6])V===-1&&(V=Z);else if(V>-1){for(K=V;K<Z;K++)R[K]=$;V=-1}G[Z]==="B"&&(R[Z]=0),U.hiLevel|=$}a&&function(J,X,ae){for(var re=0;re<ae;re++)if(J[re]==="S"){X[re]=w;for(var fe=re-1;fe>=0&&J[fe]==="WS";fe--)X[fe]=w}}(G,R,F)},T=function(I,R,U,q,K){if(!(K.hiLevel<I)){if(I===1&&w===1&&!i)return R.reverse(),void(U&&U.reverse());for(var Z,$,B,V,F=R.length,ie=0;ie<F;){if(q[ie]>=I){for(B=ie+1;B<F&&q[B]>=I;)B++;for(V=ie,$=B-1;V<$;V++,$--)Z=R[V],R[V]=R[$],R[$]=Z,U&&(Z=U[V],U[V]=U[$],U[$]=Z);ie=B}ie++}}},D=function(I,R,U){var q=I.split(""),K={hiLevel:w};return U||(U=[]),O(q,U,K),function(Z,$,B){if(B.hiLevel!==0&&u)for(var V,F=0;F<Z.length;F++)$[F]===1&&(V=k.indexOf(Z[F]))>=0&&(Z[F]=k[V+1])}(q,U,K),T(2,q,R,U,K),T(1,q,R,U,K),q.join("")};return this.__bidiEngine__.doBidiReorder=function(I,R,U){if(function(K,Z){if(Z)for(var $=0;$<K.length;$++)Z[$]=$;s===void 0&&(s=_(K)),l===void 0&&(l=_(K))}(I,R),o||!c||l)if(o&&c&&s^l)w=s?1:0,I=j(I,R,U);else if(!o&&c&&l)w=s?1:0,I=D(I,R,U),I=j(I,R);else if(!o||s||c||l){if(o&&!c&&s^l)I=j(I,R),s?(w=0,I=D(I,R,U)):(w=1,I=D(I,R,U),I=j(I,R));else if(o&&s&&!c&&l)w=1,I=D(I,R,U),I=j(I,R);else if(!o&&!c&&s^l){var q=u;s?(w=1,I=D(I,R,U),w=0,u=!1,I=D(I,R,U),u=q):(w=0,I=D(I,R,U),I=j(I,R),w=1,u=!1,I=D(I,R,U),u=q,I=j(I,R))}}else w=0,I=D(I,R,U);else w=s?1:0,I=D(I,R,U);return I},this.__bidiEngine__.setOptions=function(I){I&&(o=I.isInputVisual,c=I.isOutputVisual,s=I.isInputRtl,l=I.isOutputRtl,u=I.isSymmetricSwapping)},this.__bidiEngine__.setOptions(r),this.__bidiEngine__};var t=["BN","BN","BN","BN","BN","BN","BN","BN","BN","S","B","S","WS","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","B","B","B","S","WS","N","N","ET","ET","ET","N","N","N","N","N","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","BN","BN","BN","BN","BN","BN","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","CS","N","ET","ET","ET","ET","N","N","N","N","L","N","N","BN","N","N","ET","ET","EN","EN","N","L","N","N","N","EN","L","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","N","N","N","N","N","ET","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","R","NSM","R","NSM","NSM","R","NSM","NSM","R","NSM","N","N","N","N","N","N","N","N","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","N","N","N","N","N","R","R","R","R","R","N","N","N","N","N","N","N","N","N","N","N","AN","AN","AN","AN","AN","AN","N","N","AL","ET","ET","AL","CS","AL","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","AN","AN","AN","AN","AN","AN","AN","AN","AN","ET","AN","AN","AL","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","N","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","NSM","NSM","N","NSM","NSM","NSM","NSM","AL","AL","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","N","N","N","N","N","N","N","N","N","N","N","N","N","N","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","R","R","N","N","N","N","R","N","N","N","N","N","WS","WS","WS","WS","WS","WS","WS","WS","WS","WS","WS","BN","BN","BN","L","R","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","WS","B","LRE","RLE","PDF","LRO","RLO","CS","ET","ET","ET","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","CS","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","WS","BN","BN","BN","BN","BN","N","LRI","RLI","FSI","PDI","BN","BN","BN","BN","BN","BN","EN","L","N","N","EN","EN","EN","EN","EN","EN","ES","ES","N","N","N","L","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","ES","ES","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","L","L","N","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","N","N","N","N","N","R","NSM","R","R","R","R","R","R","R","R","R","R","ES","R","R","R","R","R","R","R","R","R","R","R","R","R","N","R","R","R","R","R","N","R","N","R","R","N","R","R","N","R","R","R","R","R","R","R","R","R","R","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","CS","N","CS","N","N","CS","N","N","N","N","N","N","N","N","N","ET","N","N","ES","ES","N","N","N","N","N","ET","ET","N","N","N","N","N","AL","AL","AL","AL","AL","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","N","BN","N","N","N","ET","ET","ET","N","N","N","N","N","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","L","L","L","L","L","L","N","N","L","L","L","L","L","L","N","N","L","L","L","L","L","L","N","N","L","L","L","N","N","N","ET","ET","N","N","N","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N"],n=new e.__bidiEngine__({isInputVisual:!0});e.API.events.push(["postProcessText",function(r){var i=r.text;r.x,r.y;var a=r.options||{};r.mutex,a.lang;var o=[];if(a.isInputVisual=typeof a.isInputVisual!="boolean"||a.isInputVisual,n.setOptions(a),Object.prototype.toString.call(i)==="[object Array]"){var s=0;for(o=[],s=0;s<i.length;s+=1)Object.prototype.toString.call(i[s])==="[object Array]"?o.push([n.doBidiReorder(i[s][0]),i[s][1],i[s][2]]):o.push([n.doBidiReorder(i[s])]);r.text=o}else r.text=n.doBidiReorder(i);n.setOptions({isInputVisual:!0})}])}(At),At.API.TTFFont=function(){function e(t){var n;if(this.rawData=t,n=this.contents=new ul(t),this.contents.pos=4,n.readString(4)==="ttcf")throw new Error("TTCF not supported.");n.pos=0,this.parse(),this.subset=new dGe(this),this.registerTTF()}return e.open=function(t){return new e(t)},e.prototype.parse=function(){return this.directory=new YWe(this.contents),this.head=new QWe(this),this.name=new iGe(this),this.cmap=new lge(this),this.toUnicode={},this.hhea=new eGe(this),this.maxp=new aGe(this),this.hmtx=new oGe(this),this.post=new nGe(this),this.os2=new tGe(this),this.loca=new uGe(this),this.glyf=new sGe(this),this.ascender=this.os2.exists&&this.os2.ascender||this.hhea.ascender,this.decender=this.os2.exists&&this.os2.decender||this.hhea.decender,this.lineGap=this.os2.exists&&this.os2.lineGap||this.hhea.lineGap,this.bbox=[this.head.xMin,this.head.yMin,this.head.xMax,this.head.yMax]},e.prototype.registerTTF=function(){var t,n,r,i,a;if(this.scaleFactor=1e3/this.head.unitsPerEm,this.bbox=(function(){var o,s,c,l;for(l=[],o=0,s=(c=this.bbox).length;o<s;o++)t=c[o],l.push(Math.round(t*this.scaleFactor));return l}).call(this),this.stemV=0,this.post.exists?(r=255&(i=this.post.italic_angle),32768&(n=i>>16)&&(n=-(1+(65535^n))),this.italicAngle=+(n+"."+r)):this.italicAngle=0,this.ascender=Math.round(this.ascender*this.scaleFactor),this.decender=Math.round(this.decender*this.scaleFactor),this.lineGap=Math.round(this.lineGap*this.scaleFactor),this.capHeight=this.os2.exists&&this.os2.capHeight||this.ascender,this.xHeight=this.os2.exists&&this.os2.xHeight||0,this.familyClass=(this.os2.exists&&this.os2.familyClass||0)>>8,this.isSerif=(a=this.familyClass)===1||a===2||a===3||a===4||a===5||a===7,this.isScript=this.familyClass===10,this.flags=0,this.post.isFixedPitch&&(this.flags|=1),this.isSerif&&(this.flags|=2),this.isScript&&(this.flags|=8),this.italicAngle!==0&&(this.flags|=64),this.flags|=32,!this.cmap.unicode)throw new Error("No unicode cmap for font")},e.prototype.characterToGlyph=function(t){var n;return((n=this.cmap.unicode)!=null?n.codeMap[t]:void 0)||0},e.prototype.widthOfGlyph=function(t){var n;return n=1e3/this.head.unitsPerEm,this.hmtx.forGlyph(t).advance*n},e.prototype.widthOfString=function(t,n,r){var i,a,o,s;for(o=0,a=0,s=(t=""+t).length;0<=s?a<s:a>s;a=0<=s?++a:--a)i=t.charCodeAt(a),o+=this.widthOfGlyph(this.characterToGlyph(i))+r*(1e3/n)||0;return o*(n/1e3)},e.prototype.lineHeight=function(t,n){var r;return n==null&&(n=!1),r=n?this.lineGap:0,(this.ascender+r-this.decender)/1e3*t},e}();var Uo,ul=function(){function e(t){this.data=t??[],this.pos=0,this.length=this.data.length}return e.prototype.readByte=function(){return this.data[this.pos++]},e.prototype.writeByte=function(t){return this.data[this.pos++]=t},e.prototype.readUInt32=function(){return 16777216*this.readByte()+(this.readByte()<<16)+(this.readByte()<<8)+this.readByte()},e.prototype.writeUInt32=function(t){return this.writeByte(t>>>24&255),this.writeByte(t>>16&255),this.writeByte(t>>8&255),this.writeByte(255&t)},e.prototype.readInt32=function(){var t;return(t=this.readUInt32())>=2147483648?t-4294967296:t},e.prototype.writeInt32=function(t){return t<0&&(t+=4294967296),this.writeUInt32(t)},e.prototype.readUInt16=function(){return this.readByte()<<8|this.readByte()},e.prototype.writeUInt16=function(t){return this.writeByte(t>>8&255),this.writeByte(255&t)},e.prototype.readInt16=function(){var t;return(t=this.readUInt16())>=32768?t-65536:t},e.prototype.writeInt16=function(t){return t<0&&(t+=65536),this.writeUInt16(t)},e.prototype.readString=function(t){var n,r;for(r=[],n=0;0<=t?n<t:n>t;n=0<=t?++n:--n)r[n]=String.fromCharCode(this.readByte());return r.join("")},e.prototype.writeString=function(t){var n,r,i;for(i=[],n=0,r=t.length;0<=r?n<r:n>r;n=0<=r?++n:--n)i.push(this.writeByte(t.charCodeAt(n)));return i},e.prototype.readShort=function(){return this.readInt16()},e.prototype.writeShort=function(t){return this.writeInt16(t)},e.prototype.readLongLong=function(){var t,n,r,i,a,o,s,c;return t=this.readByte(),n=this.readByte(),r=this.readByte(),i=this.readByte(),a=this.readByte(),o=this.readByte(),s=this.readByte(),c=this.readByte(),128&t?-1*(72057594037927940*(255^t)+281474976710656*(255^n)+1099511627776*(255^r)+4294967296*(255^i)+16777216*(255^a)+65536*(255^o)+256*(255^s)+(255^c)+1):72057594037927940*t+281474976710656*n+1099511627776*r+4294967296*i+16777216*a+65536*o+256*s+c},e.prototype.writeLongLong=function(t){var n,r;return n=Math.floor(t/4294967296),r=4294967295&t,this.writeByte(n>>24&255),this.writeByte(n>>16&255),this.writeByte(n>>8&255),this.writeByte(255&n),this.writeByte(r>>24&255),this.writeByte(r>>16&255),this.writeByte(r>>8&255),this.writeByte(255&r)},e.prototype.readInt=function(){return this.readInt32()},e.prototype.writeInt=function(t){return this.writeInt32(t)},e.prototype.read=function(t){var n,r;for(n=[],r=0;0<=t?r<t:r>t;r=0<=t?++r:--r)n.push(this.readByte());return n},e.prototype.write=function(t){var n,r,i,a;for(a=[],r=0,i=t.length;r<i;r++)n=t[r],a.push(this.writeByte(n));return a},e}(),YWe=function(){var e;function t(n){var r,i,a;for(this.scalarType=n.readInt(),this.tableCount=n.readShort(),this.searchRange=n.readShort(),this.entrySelector=n.readShort(),this.rangeShift=n.readShort(),this.tables={},i=0,a=this.tableCount;0<=a?i<a:i>a;i=0<=a?++i:--i)r={tag:n.readString(4),checksum:n.readInt(),offset:n.readInt(),length:n.readInt()},this.tables[r.tag]=r}return t.prototype.encode=function(n){var r,i,a,o,s,c,l,u,d,f,h,y,v;for(v in h=Object.keys(n).length,c=Math.log(2),d=16*Math.floor(Math.log(h)/c),o=Math.floor(d/c),u=16*h-d,(i=new ul).writeInt(this.scalarType),i.writeShort(h),i.writeShort(d),i.writeShort(o),i.writeShort(u),a=16*h,l=i.pos+a,s=null,y=[],n)for(f=n[v],i.writeString(v),i.writeInt(e(f)),i.writeInt(l),i.writeInt(f.length),y=y.concat(f),v==="head"&&(s=l),l+=f.length;l%4;)y.push(0),l++;return i.write(y),r=2981146554-e(i.data),i.pos=s+8,i.writeUInt32(r),i.data},e=function(n){var r,i,a,o;for(n=uge.call(n);n.length%4;)n.push(0);for(a=new ul(n),i=0,r=0,o=n.length;r<o;r=r+=4)i+=a.readUInt32();return 4294967295&i},t}(),JWe={}.hasOwnProperty,Cs=function(e,t){for(var n in t)JWe.call(t,n)&&(e[n]=t[n]);function r(){this.constructor=e}return r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype,e};Uo=function(){function e(t){var n;this.file=t,n=this.file.directory.tables[this.tag],this.exists=!!n,n&&(this.offset=n.offset,this.length=n.length,this.parse(this.file.contents))}return e.prototype.parse=function(){},e.prototype.encode=function(){},e.prototype.raw=function(){return this.exists?(this.file.contents.pos=this.offset,this.file.contents.read(this.length)):null},e}();var QWe=function(){function e(){return e.__super__.constructor.apply(this,arguments)}return Cs(e,Uo),e.prototype.tag="head",e.prototype.parse=function(t){return t.pos=this.offset,this.version=t.readInt(),this.revision=t.readInt(),this.checkSumAdjustment=t.readInt(),this.magicNumber=t.readInt(),this.flags=t.readShort(),this.unitsPerEm=t.readShort(),this.created=t.readLongLong(),this.modified=t.readLongLong(),this.xMin=t.readShort(),this.yMin=t.readShort(),this.xMax=t.readShort(),this.yMax=t.readShort(),this.macStyle=t.readShort(),this.lowestRecPPEM=t.readShort(),this.fontDirectionHint=t.readShort(),this.indexToLocFormat=t.readShort(),this.glyphDataFormat=t.readShort()},e.prototype.encode=function(t){var n;return(n=new ul).writeInt(this.version),n.writeInt(this.revision),n.writeInt(this.checkSumAdjustment),n.writeInt(this.magicNumber),n.writeShort(this.flags),n.writeShort(this.unitsPerEm),n.writeLongLong(this.created),n.writeLongLong(this.modified),n.writeShort(this.xMin),n.writeShort(this.yMin),n.writeShort(this.xMax),n.writeShort(this.yMax),n.writeShort(this.macStyle),n.writeShort(this.lowestRecPPEM),n.writeShort(this.fontDirectionHint),n.writeShort(t),n.writeShort(this.glyphDataFormat),n.data},e}(),Bse=function(){function e(t,n){var r,i,a,o,s,c,l,u,d,f,h,y,v,k,g,S,w;switch(this.platformID=t.readUInt16(),this.encodingID=t.readShort(),this.offset=n+t.readInt(),d=t.pos,t.pos=this.offset,this.format=t.readUInt16(),this.length=t.readUInt16(),this.language=t.readUInt16(),this.isUnicode=this.platformID===3&&this.encodingID===1&&this.format===4||this.platformID===0&&this.format===4,this.codeMap={},this.format){case 0:for(c=0;c<256;++c)this.codeMap[c]=t.readByte();break;case 4:for(h=t.readUInt16(),f=h/2,t.pos+=6,a=function(){var C,_;for(_=[],c=C=0;0<=f?C<f:C>f;c=0<=f?++C:--C)_.push(t.readUInt16());return _}(),t.pos+=2,v=function(){var C,_;for(_=[],c=C=0;0<=f?C<f:C>f;c=0<=f?++C:--C)_.push(t.readUInt16());return _}(),l=function(){var C,_;for(_=[],c=C=0;0<=f?C<f:C>f;c=0<=f?++C:--C)_.push(t.readUInt16());return _}(),u=function(){var C,_;for(_=[],c=C=0;0<=f?C<f:C>f;c=0<=f?++C:--C)_.push(t.readUInt16());return _}(),i=(this.length-t.pos+this.offset)/2,s=function(){var C,_;for(_=[],c=C=0;0<=i?C<i:C>i;c=0<=i?++C:--C)_.push(t.readUInt16());return _}(),c=g=0,w=a.length;g<w;c=++g)for(k=a[c],r=S=y=v[c];y<=k?S<=k:S>=k;r=y<=k?++S:--S)u[c]===0?o=r+l[c]:(o=s[u[c]/2+(r-y)-(f-c)]||0)!==0&&(o+=l[c]),this.codeMap[r]=65535&o}t.pos=d}return e.encode=function(t,n){var r,i,a,o,s,c,l,u,d,f,h,y,v,k,g,S,w,C,_,A,j,O,T,D,I,R,U,q,K,Z,$,B,V,F,ie,N,P,G,J,X,ae,re,fe,ke,Ne,je;switch(q=new ul,o=Object.keys(t).sort(function(Re,$e){return Re-$e}),n){case"macroman":for(v=0,k=function(){var Re=[];for(y=0;y<256;++y)Re.push(0);return Re}(),S={0:0},a={},K=0,V=o.length;K<V;K++)S[fe=t[i=o[K]]]==null&&(S[fe]=++v),a[i]={old:t[i],new:S[t[i]]},k[i]=S[t[i]];return q.writeUInt16(1),q.writeUInt16(0),q.writeUInt32(12),q.writeUInt16(0),q.writeUInt16(262),q.writeUInt16(0),q.write(k),{charMap:a,subtable:q.data,maxGlyphID:v+1};case"unicode":for(R=[],d=[],w=0,S={},r={},g=l=null,Z=0,F=o.length;Z<F;Z++)S[_=t[i=o[Z]]]==null&&(S[_]=++w),r[i]={old:_,new:S[_]},s=S[_]-i,g!=null&&s===l||(g&&d.push(g),R.push(i),l=s),g=i;for(g&&d.push(g),d.push(65535),R.push(65535),D=2*(T=R.length),O=2*Math.pow(Math.log(T)/Math.LN2,2),f=Math.log(O/2)/Math.LN2,j=2*T-O,c=[],A=[],h=[],y=$=0,ie=R.length;$<ie;y=++$){if(I=R[y],u=d[y],I===65535){c.push(0),A.push(0);break}if(I-(U=r[I].new)>=32768)for(c.push(0),A.push(2*(h.length+T-y)),i=B=I;I<=u?B<=u:B>=u;i=I<=u?++B:--B)h.push(r[i].new);else c.push(U-I),A.push(0)}for(q.writeUInt16(3),q.writeUInt16(1),q.writeUInt32(12),q.writeUInt16(4),q.writeUInt16(16+8*T+2*h.length),q.writeUInt16(0),q.writeUInt16(D),q.writeUInt16(O),q.writeUInt16(f),q.writeUInt16(j),ae=0,N=d.length;ae<N;ae++)i=d[ae],q.writeUInt16(i);for(q.writeUInt16(0),re=0,P=R.length;re<P;re++)i=R[re],q.writeUInt16(i);for(ke=0,G=c.length;ke<G;ke++)s=c[ke],q.writeUInt16(s);for(Ne=0,J=A.length;Ne<J;Ne++)C=A[Ne],q.writeUInt16(C);for(je=0,X=h.length;je<X;je++)v=h[je],q.writeUInt16(v);return{charMap:r,subtable:q.data,maxGlyphID:w+1}}},e}(),lge=function(){function e(){return e.__super__.constructor.apply(this,arguments)}return Cs(e,Uo),e.prototype.tag="cmap",e.prototype.parse=function(t){var n,r,i;for(t.pos=this.offset,this.version=t.readUInt16(),i=t.readUInt16(),this.tables=[],this.unicode=null,r=0;0<=i?r<i:r>i;r=0<=i?++r:--r)n=new Bse(t,this.offset),this.tables.push(n),n.isUnicode&&this.unicode==null&&(this.unicode=n);return!0},e.encode=function(t,n){var r,i;return n==null&&(n="macroman"),r=Bse.encode(t,n),(i=new ul).writeUInt16(0),i.writeUInt16(1),r.table=i.data.concat(r.subtable),r},e}(),eGe=function(){function e(){return e.__super__.constructor.apply(this,arguments)}return Cs(e,Uo),e.prototype.tag="hhea",e.prototype.parse=function(t){return t.pos=this.offset,this.version=t.readInt(),this.ascender=t.readShort(),this.decender=t.readShort(),this.lineGap=t.readShort(),this.advanceWidthMax=t.readShort(),this.minLeftSideBearing=t.readShort(),this.minRightSideBearing=t.readShort(),this.xMaxExtent=t.readShort(),this.caretSlopeRise=t.readShort(),this.caretSlopeRun=t.readShort(),this.caretOffset=t.readShort(),t.pos+=8,this.metricDataFormat=t.readShort(),this.numberOfMetrics=t.readUInt16()},e}(),tGe=function(){function e(){return e.__super__.constructor.apply(this,arguments)}return Cs(e,Uo),e.prototype.tag="OS/2",e.prototype.parse=function(t){if(t.pos=this.offset,this.version=t.readUInt16(),this.averageCharWidth=t.readShort(),this.weightClass=t.readUInt16(),this.widthClass=t.readUInt16(),this.type=t.readShort(),this.ySubscriptXSize=t.readShort(),this.ySubscriptYSize=t.readShort(),this.ySubscriptXOffset=t.readShort(),this.ySubscriptYOffset=t.readShort(),this.ySuperscriptXSize=t.readShort(),this.ySuperscriptYSize=t.readShort(),this.ySuperscriptXOffset=t.readShort(),this.ySuperscriptYOffset=t.readShort(),this.yStrikeoutSize=t.readShort(),this.yStrikeoutPosition=t.readShort(),this.familyClass=t.readShort(),this.panose=function(){var n,r;for(r=[],n=0;n<10;++n)r.push(t.readByte());return r}(),this.charRange=function(){var n,r;for(r=[],n=0;n<4;++n)r.push(t.readInt());return r}(),this.vendorID=t.readString(4),this.selection=t.readShort(),this.firstCharIndex=t.readShort(),this.lastCharIndex=t.readShort(),this.version>0&&(this.ascent=t.readShort(),this.descent=t.readShort(),this.lineGap=t.readShort(),this.winAscent=t.readShort(),this.winDescent=t.readShort(),this.codePageRange=function(){var n,r;for(r=[],n=0;n<2;n=++n)r.push(t.readInt());return r}(),this.version>1))return this.xHeight=t.readShort(),this.capHeight=t.readShort(),this.defaultChar=t.readShort(),this.breakChar=t.readShort(),this.maxContext=t.readShort()},e}(),nGe=function(){function e(){return e.__super__.constructor.apply(this,arguments)}return Cs(e,Uo),e.prototype.tag="post",e.prototype.parse=function(t){var n,r,i;switch(t.pos=this.offset,this.format=t.readInt(),this.italicAngle=t.readInt(),this.underlinePosition=t.readShort(),this.underlineThickness=t.readShort(),this.isFixedPitch=t.readInt(),this.minMemType42=t.readInt(),this.maxMemType42=t.readInt(),this.minMemType1=t.readInt(),this.maxMemType1=t.readInt(),this.format){case 65536:case 196608:break;case 131072:var a;for(r=t.readUInt16(),this.glyphNameIndex=[],a=0;0<=r?a<r:a>r;a=0<=r?++a:--a)this.glyphNameIndex.push(t.readUInt16());for(this.names=[],i=[];t.pos<this.offset+this.length;)n=t.readByte(),i.push(this.names.push(t.readString(n)));return i;case 151552:return r=t.readUInt16(),this.offsets=t.read(r);case 262144:return this.map=(function(){var o,s,c;for(c=[],a=o=0,s=this.file.maxp.numGlyphs;0<=s?o<s:o>s;a=0<=s?++o:--o)c.push(t.readUInt32());return c}).call(this)}},e}(),rGe=function(e,t){this.raw=e,this.length=e.length,this.platformID=t.platformID,this.encodingID=t.encodingID,this.languageID=t.languageID},iGe=function(){function e(){return e.__super__.constructor.apply(this,arguments)}return Cs(e,Uo),e.prototype.tag="name",e.prototype.parse=function(t){var n,r,i,a,o,s,c,l,u,d,f;for(t.pos=this.offset,t.readShort(),n=t.readShort(),s=t.readShort(),r=[],a=0;0<=n?a<n:a>n;a=0<=n?++a:--a)r.push({platformID:t.readShort(),encodingID:t.readShort(),languageID:t.readShort(),nameID:t.readShort(),length:t.readShort(),offset:this.offset+s+t.readShort()});for(c={},a=u=0,d=r.length;u<d;a=++u)i=r[a],t.pos=i.offset,l=t.readString(i.length),o=new rGe(l,i),c[f=i.nameID]==null&&(c[f]=[]),c[i.nameID].push(o);this.strings=c,this.copyright=c[0],this.fontFamily=c[1],this.fontSubfamily=c[2],this.uniqueSubfamily=c[3],this.fontName=c[4],this.version=c[5];try{this.postscriptName=c[6][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}catch{this.postscriptName=c[4][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}return this.trademark=c[7],this.manufacturer=c[8],this.designer=c[9],this.description=c[10],this.vendorUrl=c[11],this.designerUrl=c[12],this.license=c[13],this.licenseUrl=c[14],this.preferredFamily=c[15],this.preferredSubfamily=c[17],this.compatibleFull=c[18],this.sampleText=c[19]},e}(),aGe=function(){function e(){return e.__super__.constructor.apply(this,arguments)}return Cs(e,Uo),e.prototype.tag="maxp",e.prototype.parse=function(t){return t.pos=this.offset,this.version=t.readInt(),this.numGlyphs=t.readUInt16(),this.maxPoints=t.readUInt16(),this.maxContours=t.readUInt16(),this.maxCompositePoints=t.readUInt16(),this.maxComponentContours=t.readUInt16(),this.maxZones=t.readUInt16(),this.maxTwilightPoints=t.readUInt16(),this.maxStorage=t.readUInt16(),this.maxFunctionDefs=t.readUInt16(),this.maxInstructionDefs=t.readUInt16(),this.maxStackElements=t.readUInt16(),this.maxSizeOfInstructions=t.readUInt16(),this.maxComponentElements=t.readUInt16(),this.maxComponentDepth=t.readUInt16()},e}(),oGe=function(){function e(){return e.__super__.constructor.apply(this,arguments)}return Cs(e,Uo),e.prototype.tag="hmtx",e.prototype.parse=function(t){var n,r,i,a,o,s,c;for(t.pos=this.offset,this.metrics=[],n=0,s=this.file.hhea.numberOfMetrics;0<=s?n<s:n>s;n=0<=s?++n:--n)this.metrics.push({advance:t.readUInt16(),lsb:t.readInt16()});for(i=this.file.maxp.numGlyphs-this.file.hhea.numberOfMetrics,this.leftSideBearings=function(){var l,u;for(u=[],n=l=0;0<=i?l<i:l>i;n=0<=i?++l:--l)u.push(t.readInt16());return u}(),this.widths=(function(){var l,u,d,f;for(f=[],l=0,u=(d=this.metrics).length;l<u;l++)a=d[l],f.push(a.advance);return f}).call(this),r=this.widths[this.widths.length-1],c=[],n=o=0;0<=i?o<i:o>i;n=0<=i?++o:--o)c.push(this.widths.push(r));return c},e.prototype.forGlyph=function(t){return t in this.metrics?this.metrics[t]:{advance:this.metrics[this.metrics.length-1].advance,lsb:this.leftSideBearings[t-this.metrics.length]}},e}(),uge=[].slice,sGe=function(){function e(){return e.__super__.constructor.apply(this,arguments)}return Cs(e,Uo),e.prototype.tag="glyf",e.prototype.parse=function(){return this.cache={}},e.prototype.glyphFor=function(t){var n,r,i,a,o,s,c,l,u,d;return t in this.cache?this.cache[t]:(a=this.file.loca,n=this.file.contents,r=a.indexOf(t),(i=a.lengthOf(t))===0?this.cache[t]=null:(n.pos=this.offset+r,o=(s=new ul(n.read(i))).readShort(),l=s.readShort(),d=s.readShort(),c=s.readShort(),u=s.readShort(),this.cache[t]=o===-1?new lGe(s,l,d,c,u):new cGe(s,o,l,d,c,u),this.cache[t]))},e.prototype.encode=function(t,n,r){var i,a,o,s,c;for(o=[],a=[],s=0,c=n.length;s<c;s++)i=t[n[s]],a.push(o.length),i&&(o=o.concat(i.encode(r)));return a.push(o.length),{table:o,offsets:a}},e}(),cGe=function(){function e(t,n,r,i,a,o){this.raw=t,this.numberOfContours=n,this.xMin=r,this.yMin=i,this.xMax=a,this.yMax=o,this.compound=!1}return e.prototype.encode=function(){return this.raw.data},e}(),lGe=function(){function e(t,n,r,i,a){var o,s;for(this.raw=t,this.xMin=n,this.yMin=r,this.xMax=i,this.yMax=a,this.compound=!0,this.glyphIDs=[],this.glyphOffsets=[],o=this.raw;s=o.readShort(),this.glyphOffsets.push(o.pos),this.glyphIDs.push(o.readUInt16()),32&s;)o.pos+=1&s?4:2,128&s?o.pos+=8:64&s?o.pos+=4:8&s&&(o.pos+=2)}return e.prototype.encode=function(){var t,n,r;for(n=new ul(uge.call(this.raw.data)),t=0,r=this.glyphIDs.length;t<r;++t)n.pos=this.glyphOffsets[t];return n.data},e}(),uGe=function(){function e(){return e.__super__.constructor.apply(this,arguments)}return Cs(e,Uo),e.prototype.tag="loca",e.prototype.parse=function(t){var n,r;return t.pos=this.offset,n=this.file.head.indexToLocFormat,this.offsets=n===0?(function(){var i,a;for(a=[],r=0,i=this.length;r<i;r+=2)a.push(2*t.readUInt16());return a}).call(this):(function(){var i,a;for(a=[],r=0,i=this.length;r<i;r+=4)a.push(t.readUInt32());return a}).call(this)},e.prototype.indexOf=function(t){return this.offsets[t]},e.prototype.lengthOf=function(t){return this.offsets[t+1]-this.offsets[t]},e.prototype.encode=function(t,n){for(var r=new Uint32Array(this.offsets.length),i=0,a=0,o=0;o<r.length;++o)if(r[o]=i,a<n.length&&n[a]==o){++a,r[o]=i;var s=this.offsets[o],c=this.offsets[o+1]-s;c>0&&(i+=c)}for(var l=new Array(4*r.length),u=0;u<r.length;++u)l[4*u+3]=255&r[u],l[4*u+2]=(65280&r[u])>>8,l[4*u+1]=(16711680&r[u])>>16,l[4*u]=(4278190080&r[u])>>24;return l},e}(),dGe=function(){function e(t){this.font=t,this.subset={},this.unicodes={},this.next=33}return e.prototype.generateCmap=function(){var t,n,r,i,a;for(n in i=this.font.cmap.tables[0].codeMap,t={},a=this.subset)r=a[n],t[n]=i[r];return t},e.prototype.glyphsFor=function(t){var n,r,i,a,o,s,c;for(i={},o=0,s=t.length;o<s;o++)i[a=t[o]]=this.font.glyf.glyphFor(a);for(a in n=[],i)(r=i[a])!=null&&r.compound&&n.push.apply(n,r.glyphIDs);if(n.length>0)for(a in c=this.glyphsFor(n))r=c[a],i[a]=r;return i},e.prototype.encode=function(t,n){var r,i,a,o,s,c,l,u,d,f,h,y,v,k,g;for(i in r=lge.encode(this.generateCmap(),"unicode"),o=this.glyphsFor(t),h={0:0},g=r.charMap)h[(c=g[i]).old]=c.new;for(y in f=r.maxGlyphID,o)y in h||(h[y]=f++);return u=function(S){var w,C;for(w in C={},S)C[S[w]]=w;return C}(h),d=Object.keys(u).sort(function(S,w){return S-w}),v=function(){var S,w,C;for(C=[],S=0,w=d.length;S<w;S++)s=d[S],C.push(u[s]);return C}(),a=this.font.glyf.encode(o,v,h),l=this.font.loca.encode(a.offsets,v),k={cmap:this.font.cmap.raw(),glyf:a.table,loca:l,hmtx:this.font.hmtx.raw(),hhea:this.font.hhea.raw(),maxp:this.font.maxp.raw(),post:this.font.post.raw(),name:this.font.name.raw(),head:this.font.head.encode(n)},this.font.os2.exists&&(k["OS/2"]=this.font.os2.raw()),this.font.directory.encode(k)},e}();At.API.PDFObject=function(){var e;function t(){}return e=function(n,r){return(Array(r+1).join("0")+n).slice(-r)},t.convert=function(n){var r,i,a,o;if(Array.isArray(n))return"["+function(){var s,c,l;for(l=[],s=0,c=n.length;s<c;s++)r=n[s],l.push(t.convert(r));return l}().join(" ")+"]";if(typeof n=="string")return"/"+n;if(n!=null&&n.isString)return"("+n+")";if(n instanceof Date)return"(D:"+e(n.getUTCFullYear(),4)+e(n.getUTCMonth(),2)+e(n.getUTCDate(),2)+e(n.getUTCHours(),2)+e(n.getUTCMinutes(),2)+e(n.getUTCSeconds(),2)+"Z)";if({}.toString.call(n)==="[object Object]"){for(i in a=["<<"],n)o=n[i],a.push("/"+i+" "+t.convert(o));return a.push(">>"),a.join(`
8005
- `)}return""+n},t}();const hGe=new Set(["INPUT","TEXTAREA","SELECT"]),So=e=>e?hGe.has(e.tagName)?!0:e instanceof HTMLElement&&e.isContentEditable:!1,fGe=e=>{const t=e.replace(/[\\/:*?"<>|\x00-\x1f]+/g,"_").trim();return t.length>0?t.slice(0,80):"demo"},pGe=(e,t,n)=>{const r=e.indexOf(t);if(r<0)return null;const i=e.length,a=[...e];switch(n.op){case"forward":{if(r>=i-1)return null;const o=a[r],s=a[r+1];return o===void 0||s===void 0?null:(a[r]=s,a[r+1]=o,a)}case"backward":{if(r<=0)return null;const o=a[r],s=a[r-1];return o===void 0||s===void 0?null:(a[r]=s,a[r-1]=o,a)}case"toFront":{if(r===i-1)return null;const[o]=a.splice(r,1);return o===void 0?null:(a.push(o),a)}case"toBack":{if(r===0)return null;const[o]=a.splice(r,1);return o===void 0?null:(a.unshift(o),a)}case"toIndex":{const o=Math.min(Math.max(n.index,0),i-1);if(o===r)return null;const[s]=a.splice(r,1);return s===void 0?null:(a.splice(o,0,s),a)}}};function yGe({slug:e,demos:t,detail:n,loading:r,runs:i,nodeEvents:a,statusByNode:o,onPlayNode:s,onRestartDemo:c}){var mo,xa;const l=t.find(te=>te.slug===e),[u,d]=M.useState([]),[f,h]=M.useState([]),[y,v]=M.useState(null),[k,g]=M.useState(null),[S,w]=M.useState(null),C=M.useRef(u),_=M.useRef(f);M.useEffect(()=>{C.current=u},[u]),M.useEffect(()=>{_.current=f},[f]);const A=M.useRef(null),j=M.useRef(null),O=M.useRef(null),T=M.useRef(null),D=xte(),I=xte(),R=kte(),U=kte(),[q,K]=M.useState(null),[Z,$]=M.useState(null),[B,V]=M.useState(null),F=M.useRef(null);M.useEffect(()=>{F.current=B},[B]);const[ie,N]=M.useState(!1),P=M.useRef(null),G=M.useCallback(te=>{P.current=te},[]),J=Eqe(),{push:X,dropTop:ae,markMutation:re,clear:fe,lastMutationAt:ke}=J,{reset:Ne}=D,{reset:je}=I,{reset:Re}=R,{reset:$e}=U;M.useEffect(()=>{d([]),h([]),v(null),g(null),w(null),Ne(),je(),Re(),$e(),K(null),$(null),Dr.current=null,va(!1),Tr.current.clear(),J.clear()},[n==null?void 0:n.id]);const ee=M.useCallback((te,de)=>{d(te),h(de)},[]),qe=M.useCallback(te=>{v(te),g(null)},[]),Ke=M.useCallback(()=>{v(null),g(null)},[]),_e=(mo=n==null?void 0:n.demo)==null?void 0:mo.nodes,Se=(xa=n==null?void 0:n.demo)==null?void 0:xa.connectors,{pruneAgainst:ot}=D,{pruneAgainst:Qe}=I,{pruneAgainst:Pe}=R,{pruneAgainst:Ie}=U;M.useEffect(()=>{_e&&(ot(_e),Pe(_e)),Date.now()-ke()>2e3&&fe()},[_e,ot,Pe,ke,fe]),M.useEffect(()=>{Se&&(Qe(Se),Ie(Se)),Date.now()-ke()>2e3&&fe()},[Se,Qe,Ie,ke,fe]),M.useEffect(()=>{if(!(!_e||!q)&&_e.length===q.length){for(let te=0;te<_e.length;te++){const de=_e[te],ge=q[te];if(!de||de.id!==ge)return}K(null)}},[_e,q]);const ye=(n==null?void 0:n.id)??null,[wt,Me]=M.useState(!1),{setOverride:Ce,dropOverride:De}=D,Ve=M.useRef(D.overrides);M.useEffect(()=>{Ve.current=D.overrides},[D.overrides]);const nt=M.useCallback((te,de)=>{var pe;if(!ye)return;const ge=(pe=_e==null?void 0:_e.find(ce=>ce.id===te))==null?void 0:pe.position;Ce(te,{position:de}),$(null),re(),ge&&X({do:async()=>{await Ts(ye,te,de)},undo:async()=>{await Ts(ye,te,ge)},coalesceKey:`node:${te}:position`}),Ts(ye,te,de).catch(ce=>{De(te),ge&&ae(),$(ce instanceof Error?ce.message:String(ce)),console.error("updateNodePosition failed",ce)})},[ye,_e,Ce,De,X,ae,re]),rt=M.useCallback(te=>{if(!ye||te.length===0)return;const de=Ve.current,ge=te.map(pe=>{var lt;const ce=_e==null?void 0:_e.find(ct=>ct.id===pe.id);if(!ce)return null;const Oe=((lt=de[pe.id])==null?void 0:lt.position)??ce.position;return{id:pe.id,prev:Oe,next:pe.position}}).filter(pe=>pe!==null);if(ge.length!==0){for(const pe of ge)Ce(pe.id,{position:pe.next});$(null),re(),X({do:async()=>{await Promise.allSettled(ge.map(pe=>Ts(ye,pe.id,pe.next)))},undo:async()=>{await Promise.allSettled(ge.map(pe=>Ts(ye,pe.id,pe.prev)))}}),Promise.all(ge.map(async pe=>{try{return await Ts(ye,pe.id,pe.next),null}catch(ce){return De(pe.id),ce instanceof Error?ce.message:String(ce)}})).then(pe=>{const ce=pe.find(Oe=>Oe!==null);ce&&$(ce)})}},[ye,_e,Ce,De,X,re]),Pt=M.useCallback((te,de)=>{if(!ye)return;const ge=_e==null?void 0:_e.find(Oe=>Oe.id===te),pe=ge?{width:ge.data.width,height:ge.data.height,position:{x:ge.position.x,y:ge.position.y}}:void 0,ce={width:de.width,height:de.height,position:{x:de.x,y:de.y}};Ce(te,{position:ce.position,data:{width:ce.width,height:ce.height}}),$(null),re(),pe&&X({do:async()=>{await _n(ye,te,ce)},undo:async()=>{await _n(ye,te,pe)},coalesceKey:`node:${te}:resize`}),_n(ye,te,ce).catch(Oe=>{De(te),pe&&ae(),$(Oe instanceof Error?Oe.message:String(Oe)),console.error("updateNode resize failed",Oe)})},[ye,_e,Ce,De,X,ae,re]),it=M.useCallback(te=>{if(!ye||te.length===0)return;const de=[];for(const pe of te){const ce=_e==null?void 0:_e.find(pn=>pn.id===pe.id);if(!ce)continue;const Oe=ce.data,lt={position:{x:ce.position.x,y:ce.position.y}};Oe.width!==void 0&&(lt.width=Oe.width),Oe.height!==void 0&&(lt.height=Oe.height);const ct={position:pe.position};pe.width!==void 0&&(ct.width=pe.width),pe.height!==void 0&&(ct.height=pe.height),de.push({id:pe.id,prev:lt,next:ct})}if(de.length===0)return;for(const pe of de){const ce={};pe.next.width!==void 0&&(ce.width=pe.next.width),pe.next.height!==void 0&&(ce.height=pe.next.height),Ce(pe.id,{position:pe.next.position,...Object.keys(ce).length>0?{data:ce}:{}})}$(null),re();const ge=de.map(pe=>pe.id).sort();X({do:async()=>{await Promise.allSettled(de.map(pe=>_n(ye,pe.id,pe.next)))},undo:async()=>{await Promise.allSettled(de.map(pe=>_n(ye,pe.id,pe.prev)))},coalesceKey:`multi:resize:${ge.join(",")}`}),Promise.all(de.map(async pe=>{try{return await _n(ye,pe.id,pe.next),null}catch(ce){return De(pe.id),ce instanceof Error?ce.message:String(ce)}})).then(pe=>{const ce=pe.find(Oe=>Oe!==null);ce&&$(ce)})},[ye,_e,Ce,De,X,re]),{setOverride:at,dropOverride:ft}=I,Ot=M.useCallback((te,de)=>{Ce(te,{data:de})},[Ce]),ht=M.useCallback((te,de)=>{for(const ge of te)Ce(ge,{data:de})},[Ce]),Ht=M.useCallback((te,de)=>{at(te,de)},[at]),Lt=M.useCallback((te,de)=>{if(!ye)return;Noe(de);const ge=_e==null?void 0:_e.find(ce=>ce.id===te);let pe=null;if(ge){pe={};const ce=ge.data;for(const Oe of Object.keys(de))pe[Oe]=ce[Oe]}if(Ce(te,{data:de}),$(null),re(),pe){const ce=pe;X({do:async()=>{await _n(ye,te,de)},undo:async()=>{await _n(ye,te,ce)},coalesceKey:`node:${te}:style`})}_n(ye,te,de).catch(ce=>{De(te),pe&&ae(),$(ce instanceof Error?ce.message:String(ce)),console.error("updateNode style failed",ce)})},[ye,_e,Ce,De,X,ae,re]),Nt=M.useCallback((te,de)=>{if(!ye||te.length===0)return;Noe(de);const ge=te.map(pe=>{const ce=_e==null?void 0:_e.find(ct=>ct.id===pe);if(!ce)return null;const Oe=ce.data,lt={};for(const ct of Object.keys(de))lt[ct]=Oe[ct];return{id:pe,prev:lt}}).filter(pe=>pe!==null);if(ge.length!==0){for(const pe of ge)Ce(pe.id,{data:de});$(null),re(),X({do:async()=>{await Promise.allSettled(ge.map(pe=>_n(ye,pe.id,de)))},undo:async()=>{await Promise.allSettled(ge.map(pe=>_n(ye,pe.id,pe.prev)))}}),Promise.all(ge.map(async pe=>{try{return await _n(ye,pe.id,de),null}catch(ce){return De(pe.id),ce instanceof Error?ce.message:String(ce)}})).then(pe=>{const ce=pe.find(Oe=>Oe!==null);ce&&$(ce)})}},[ye,_e,Ce,De,X,re]),un=M.useCallback(te=>{if(!ye||te.length===0)return;const de=te.map(ce=>{const Oe=_e==null?void 0:_e.find(ct=>ct.id===ce);if(!Oe)return null;const lt=Oe.data;return{id:ce,prev:lt.locked===!0}}).filter(ce=>ce!==null);if(de.length===0)return;const ge=de.some(ce=>!ce.prev),pe=de.filter(ce=>ce.prev!==ge);if(pe.length!==0){for(const ce of pe)Ce(ce.id,{data:{locked:ge}});$(null),re(),X({do:async()=>{await Promise.allSettled(pe.map(ce=>_n(ye,ce.id,{locked:ge})))},undo:async()=>{await Promise.allSettled(pe.map(ce=>_n(ye,ce.id,{locked:ce.prev})))}}),Promise.all(pe.map(async ce=>{try{return await _n(ye,ce.id,{locked:ge}),null}catch(Oe){return De(ce.id),Oe instanceof Error?Oe.message:String(Oe)}})).then(ce=>{const Oe=ce.find(lt=>lt!==null);Oe&&$(Oe)})}},[ye,_e,Ce,De,X,re]),jt=M.useCallback((te,de)=>{if(!ye)return;EUe(de);const ge=Se==null?void 0:Se.find(ce=>ce.id===te);let pe=null;if(ge){pe={};const ce=ge;for(const Oe of Object.keys(de))pe[Oe]=ce[Oe]}if(at(te,de),$(null),re(),pe){const ce=pe;X({do:async()=>{await Ui(ye,te,de)},undo:async()=>{await Ui(ye,te,ce)},coalesceKey:`connector:${te}:style`})}Ui(ye,te,de).catch(ce=>{ft(te),pe&&ae(),$(ce instanceof Error?ce.message:String(ce)),console.error("updateConnector failed",ce)})},[ye,Se,at,ft,X,ae,re]),{mark:Ct,markMany:Vt,unmark:Rr,unmarkMany:wn}=R,{mark:jr,markMany:Hn,unmark:gt,unmarkMany:rr}=U,Di=M.useCallback(te=>{if(!ye)return;const de=_e==null?void 0:_e.find(ct=>ct.id===te);if(!de||de.data.locked===!0)return;const ge=(Se??[]).filter(ct=>ct.source===te||ct.target===te),pe=ge.map(ct=>ct.id),ce=new Set(pe);$(null),Ct(te),pe.length>0&&Hn(pe),d(ct=>ct.filter(pn=>pn!==te)),h(ct=>ct.filter(pn=>!ce.has(pn))),y===te&&v(null),k&&ce.has(k)&&g(null),re();const Oe=de,lt=ge;X({do:async()=>{Ct(te),pe.length>0&&Hn(pe),await Yo(ye,te)},undo:async()=>{Rr(te),pe.length>0&&rr(pe),await Ia(ye,{id:Oe.id,type:Oe.type,position:Oe.position,data:Oe.data});for(const ct of lt)await Ds(ye,{...ct,id:ct.id})}}),Yo(ye,te).catch(ct=>{Rr(te),pe.length>0&&rr(pe),ae(),$(ct instanceof Error?ct.message:String(ct)),console.error("deleteNode failed",ct)})},[ye,_e,Se,y,k,Ct,Hn,Rr,rr,X,ae,re]),Qr=M.useCallback((te,de)=>{if(!ye||!_e)return;const ge=q??_e.map(Oe=>Oe.id),pe=pGe(ge,te,de);if(!pe)return;const ce=ge.indexOf(te);K(pe),$(null),re(),X({do:async()=>{await Jz(ye,te,de)},undo:async()=>{await Jz(ye,te,{op:"toIndex",index:ce})}}),Jz(ye,te,de).catch(Oe=>{K(null),ae(),$(Oe instanceof Error?Oe.message:String(Oe)),console.error("reorderNode failed",Oe)})},[ye,_e,q,X,ae,re]);M.useCallback(te=>{if(!ye)return;const de=Se==null?void 0:Se.find(pe=>pe.id===te);if(!de)return;$(null),jr(te),h(pe=>pe.filter(ce=>ce!==te)),k===te&&g(null),re();const ge=de;X({do:async()=>{jr(te),await Pl(ye,te)},undo:async()=>{gt(te),await Ds(ye,{...ge,id:ge.id})}}),Pl(ye,te).catch(pe=>{gt(te),ae(),$(pe instanceof Error?pe.message:String(pe)),console.error("deleteConnector failed",pe)})},[ye,Se,k,jr,gt,X,ae,re]);const ir=M.useCallback((te,de)=>{if(!ye||te.length===0&&de.length===0)return;const ge=te,pe=new Set((_e??[]).filter(vt=>vt.data.locked===!0).map(vt=>vt.id)),ce=ge.filter(vt=>!pe.has(vt)),Oe=new Set(ce),lt=ce.map(vt=>_e==null?void 0:_e.find(tn=>tn.id===vt)).filter(vt=>!!vt),ct=(Se??[]).filter(vt=>Oe.has(vt.source)||Oe.has(vt.target)),pn=new Set(ct.map(vt=>vt.id)),yr=de.map(vt=>Se==null?void 0:Se.find(tn=>tn.id===vt)).filter(vt=>!!vt).filter(vt=>!pn.has(vt.id)).filter(vt=>!(pe.has(vt.source)&&pe.has(vt.target)));if(lt.length===0&&ct.length===0&&yr.length===0)return;$(null);const gr=lt.map(vt=>vt.id),Vn=[...ct.map(vt=>vt.id),...yr.map(vt=>vt.id)];gr.length>0&&Vt(gr),Vn.length>0&&Hn(Vn);const mr=lt;d(vt=>vt.filter(tn=>!Oe.has(tn)));const ki=new Set(yr.map(vt=>vt.id));h(vt=>vt.filter(tn=>!ki.has(tn)&&!pn.has(tn))),y&&Oe.has(y)&&v(null),k&&(ki.has(k)||pn.has(k))&&g(null),re(),X({do:async()=>{gr.length>0&&Vt(gr),Vn.length>0&&Hn(Vn);for(const vt of mr)await Yo(ye,vt.id).catch(()=>{});await Promise.allSettled(yr.map(vt=>Pl(ye,vt.id)))},undo:async()=>{gr.length>0&&wn(gr),Vn.length>0&&rr(Vn);for(let vt=mr.length-1;vt>=0;vt--){const tn=mr[vt];tn&&await Ia(ye,{id:tn.id,type:tn.type,position:tn.position,data:tn.data})}for(const vt of[...ct,...yr])await Ds(ye,{...vt,id:vt.id})}});const xi=new Map;for(const vt of lt)xi.set(vt.id,ct.filter(tn=>tn.source===vt.id||tn.target===vt.id).map(tn=>tn.id));(async()=>{const vt=[];for(const xt of mr)try{await Yo(ye,xt.id)}catch(nn){Rr(xt.id);const Qn=xi.get(xt.id)??[];Qn.length>0&&rr(Qn),vt.push(nn instanceof Error?nn.message:String(nn))}const tn=await Promise.all(yr.map(async xt=>{try{return await Pl(ye,xt.id),null}catch(nn){return gt(xt.id),nn instanceof Error?nn.message:String(nn)}}));for(const xt of tn)xt!==null&&vt.push(xt);vt.length>0&&vt[0]!==void 0&&$(vt[0])})()},[ye,_e,Se,y,k,Vt,Hn,Rr,wn,gt,rr,X,re]);M.useEffect(()=>{A.current=ir},[ir]),M.useEffect(()=>{const te=de=>{if(de.key!=="Delete"&&de.key!=="Backspace"||So(document.activeElement)||document.querySelector('[data-testid="inline-edit-input"]'))return;const ge=C.current,pe=_.current;ge.length===0&&pe.length===0||(de.preventDefault(),ir(ge,pe))};return window.addEventListener("keydown",te),()=>window.removeEventListener("keydown",te)},[ir]);const{undo:rn,redo:bn,canUndo:Mn,canRedo:ei}=J;M.useEffect(()=>{const te=async de=>{if((de.metaKey||de.ctrlKey)&&de.key.toLowerCase()==="z"&&!So(document.activeElement)){if(de.preventDefault(),de.shiftKey){if(!ei)return;try{const ge=await bn();ge!=null&&ge.entry&&await ge.entry.do()}catch(ge){$(ge instanceof Error?ge.message:String(ge)),console.error("redo failed",ge)}return}if(Mn)try{const ge=await rn();ge!=null&&ge.entry&&await ge.entry.undo()}catch(ge){$(ge instanceof Error?ge.message:String(ge)),console.error("undo failed",ge)}}};return window.addEventListener("keydown",te),()=>window.removeEventListener("keydown",te)},[rn,bn,Mn,ei]);const Rn=M.useCallback((te,de)=>{if(!ye)return;const ge=_e==null?void 0:_e.find(Oe=>Oe.id===te),ce=(ge&&"name"in ge.data?ge.data.name:void 0)??"";Ce(te,{data:{name:de}}),$(null),re(),ge&&X({do:async()=>{await _n(ye,te,{name:de})},undo:async()=>{await _n(ye,te,{name:ce})},coalesceKey:`node:${te}:name`}),_n(ye,te,{name:de}).catch(Oe=>{ge&&ae(),$(Oe instanceof Error?Oe.message:String(Oe)),console.error("updateNode name failed",Oe)})},[ye,_e,Ce,X,ae,re]),pr=M.useCallback((te,de)=>{if(!ye)return;const ge=_e==null?void 0:_e.find(ce=>ce.id===te);if(!ge)return;const pe=ge.data.description??"";Ce(te,{data:{description:de}}),$(null),re(),X({do:async()=>{await _n(ye,te,{description:de})},undo:async()=>{await _n(ye,te,{description:pe})},coalesceKey:`node:${te}:description`}),_n(ye,te,{description:de}).catch(ce=>{ae(),$(ce instanceof Error?ce.message:String(ce)),console.error("updateNode description failed",ce)})},[ye,_e,Ce,X,ae,re]),Jn=M.useCallback((te,de)=>{if(!ye)return;const ge=_e==null?void 0:_e.find(ce=>ce.id===te);if(!ge)return;const pe=ge.data.detail??"";Ce(te,{data:{detail:de}}),$(null),re(),X({do:async()=>{await _n(ye,te,{detail:de})},undo:async()=>{await _n(ye,te,{detail:pe})},coalesceKey:`node:${te}:detail`}),_n(ye,te,{detail:de}).catch(ce=>{ae(),$(ce instanceof Error?ce.message:String(ce)),console.error("updateNode detail failed",ce)})},[ye,_e,Ce,X,ae,re]),br=M.useCallback((te,de,ge)=>{if(!ye)return;$(null);const pe=`node-${crypto.randomUUID()}`,ce=oee(te,ge,Sm().node),Oe={id:pe,type:"shapeNode",position:de,data:ce};Ce(pe,{id:pe,type:"shapeNode",position:de,data:ce}),re(),Ia(ye,Oe).then(({id:ct})=>{X({do:async()=>{await Ia(ye,{...Oe,id:ct})},undo:async()=>{await Yo(ye,ct)}})}).catch(ct=>{De(pe),$(ct instanceof Error?ct.message:String(ct)),console.error("createNode failed",ct)})},[ye,Ce,De,X,re]),Mr=M.useCallback((te,de)=>{if(!ye)return;$(null);const ge=`node-${crypto.randomUUID()}`,pe={icon:te,width:Pf.width,height:Pf.height},ce={id:ge,type:"iconNode",position:de,data:pe};Ce(ge,{id:ge,type:"iconNode",position:de,data:pe}),d([ge]),re(),Ia(ye,ce).then(({id:lt})=>{X({do:async()=>{await Ia(ye,{...ce,id:lt})},undo:async()=>{await Yo(ye,lt)}})}).catch(lt=>{De(ge),$(lt instanceof Error?lt.message:String(lt)),console.error("createNode (icon) failed",lt)})},[ye,Ce,De,X,re]),ar=M.useCallback(te=>{if(!ye)return;$(null);const de=`node-${crypto.randomUUID()}`,ge=`blocks/${de}.html`,pe={id:de,type:"htmlNode",position:te.position,data:{}},ce={id:de,type:"htmlNode",position:te.position,data:{htmlPath:ge}};Ce(de,ce),d([de]),re(),Ia(ye,pe).then(({id:Oe})=>{X({do:async()=>{await Ia(ye,{...pe,id:Oe})},undo:async()=>{await Yo(ye,Oe)}})}).catch(Oe=>{De(de),$(Oe instanceof Error?Oe.message:String(Oe)),console.error("createNode (htmlNode) failed",Oe)})},[ye,Ce,De,X,re]),Tr=M.useRef(new Map),Sr=M.useCallback((te,de)=>{Tr.current.set(te,de)},[]),jn=M.useCallback(te=>{Tr.current.delete(te)},[]),ci=M.useCallback(te=>{ye&&($(null),re(),_Ue({...te,demoId:ye,lastUsed:Sm().node},{upload:X4e,createNode:Ia,deleteNode:Yo,setOverride:Ce,pushUndo:X,rememberRetry:Sr,forgetRetry:jn}).catch(de=>{console.error("image-upload-flow failed",de)}))},[ye,Ce,X,re,Sr,jn]),qi=M.useCallback(te=>{if(!ye)return;const de=`node-${crypto.randomUUID()}`;ci({nodeId:de,...te})},[ye,ci]),$a=M.useCallback(te=>{const de=Tr.current.get(te);de&&ci({nodeId:te,...de})},[ci]),[zi,Wa]=M.useState({open:!1,mode:"insert"}),ma=M.useCallback((te,de)=>{Wa({open:!0,mode:te,nodeId:de})},[]),Ga=M.useCallback(()=>{Wa(te=>({...te,open:!1}))},[]),ti=M.useCallback(()=>{ma("insert")},[ma]),Ka=M.useCallback(te=>ma("replace",te),[ma]),$o=M.useCallback(te=>{if(Ywe(te),zi.mode==="replace"&&zi.nodeId){if(ye){const de=zi.nodeId,ge=_e==null?void 0:_e.find(ce=>ce.id===de),pe=(ge==null?void 0:ge.type)==="iconNode"?ge.data.icon:void 0;if(Ce(de,{data:{icon:te}}),$(null),re(),pe!==void 0){const ce=pe;X({do:async()=>{await _n(ye,de,{icon:te})},undo:async()=>{await _n(ye,de,{icon:ce})},coalesceKey:`node:${de}:icon`})}_n(ye,de,{icon:te}).catch(ce=>{De(de),pe!==void 0&&ae(),$(ce instanceof Error?ce.message:String(ce)),console.error("updateNode (icon replace) failed",ce)})}}else{const de=P.current;if(de&&ye){const ge=CUe(de,{width:window.innerWidth,height:window.innerHeight});Mr(te,ge)}}Ga()},[zi.mode,zi.nodeId,ye,_e,Ce,De,X,ae,re,Mr,Ga]),fo=M.useCallback((te,de)=>{if(!ye)return;const ge=Se==null?void 0:Se.find(ce=>ce.id===te),pe=ge==null?void 0:ge.label;at(te,{label:de}),$(null),re(),ge&&X({do:async()=>{await Ui(ye,te,{label:de})},undo:async()=>{await Ui(ye,te,{label:pe})},coalesceKey:`connector:${te}:label`}),Ui(ye,te,{label:de}).catch(ce=>{ge&&ae(),$(ce instanceof Error?ce.message:String(ce)),console.error("updateConnector label failed",ce)})},[ye,Se,at,X,ae,re]),gi=M.useCallback((te,de,ge)=>{if(!ye)return;const pe=`conn-${crypto.randomUUID()}`,ce=ge==null?void 0:ge.targetPin,Oe=Sm().connector,lt={id:pe,source:te,target:de,sourceHandleAutoPicked:!0,targetHandleAutoPicked:!0,...ce?{targetPin:ce}:{},...Oe,kind:"default"},ct={id:pe,source:te,target:de,sourceHandleAutoPicked:!0,targetHandleAutoPicked:!0,...ce?{targetPin:ce}:{},...Oe,kind:"default"};at(pe,lt),$(null),re(),Ds(ye,ct).then(({id:pn})=>{X({do:async()=>{await Ds(ye,{...ct,id:pn})},undo:async()=>{await Pl(ye,pn)}})}).catch(pn=>{ft(pe),$(pn instanceof Error?pn.message:String(pn)),console.error("createConnector failed",pn)})},[ye,at,ft,X,re]),po=M.useCallback(({sourceNodeId:te,position:de,shape:ge})=>{if(!ye)return;$(null);const pe=`node-${crypto.randomUUID()}`,ce=`conn-${crypto.randomUUID()}`,Oe=sD[ge],lt=Sm(),ct=oee(ge,Oe,lt.node),pn={id:pe,type:"shapeNode",position:de,data:ct},yr={id:ce,source:te,target:pe,sourceHandleAutoPicked:!0,targetHandleAutoPicked:!0,...lt.connector,kind:"default"};Ce(pe,{id:pe,type:"shapeNode",position:de,data:ct}),at(ce,yr),w(pe),re(),(async()=>{try{await Ia(ye,pn),await Ds(ye,yr),X({do:async()=>{await Ia(ye,pn),await Ds(ye,yr)},undo:async()=>{ft(ce),De(pe),await Pl(ye,ce).catch(()=>{}),await Yo(ye,pe).catch(()=>{})}})}catch(Vn){De(pe),ft(ce),$(Vn instanceof Error?Vn.message:String(Vn)),console.error("createAndConnectFromPane failed",Vn)}})()},[ye,Ce,De,at,ft,X,re]),Dr=M.useRef(null),[li,va]=M.useState(!1),ni=M.useCallback(te=>{if(!_e)return;const de=new Set(te),ge=_e.filter(ce=>de.has(ce.id));if(ge.length===0)return;const pe=(Se??[]).filter(ce=>de.has(ce.source)&&de.has(ce.target));Dr.current=JSON.parse(JSON.stringify({nodes:ge,connectors:pe})),va(!0)},[_e,Se]),on=M.useCallback(te=>{if(!ye)return;const de=Dr.current;if(!de||de.nodes.length===0)return;const{newNodes:ge,newConnectors:pe}=AVe({nodes:de.nodes,connectors:de.connectors,flowPos:te,nodeIdGen:()=>`node-${crypto.randomUUID()}`,connectorIdGen:()=>`conn-${crypto.randomUUID()}`});for(const ce of ge)Ce(ce.id,ce);for(const ce of pe)at(ce.id,ce);d(ge.map(ce=>ce.id)),h(pe.map(ce=>ce.id)),$(null),re(),(async()=>{try{for(const ce of ge)await Ia(ye,{id:ce.id,type:ce.type,position:ce.position,data:ce.data});for(const ce of pe)await Ds(ye,ce);X({do:async()=>{for(const ce of ge)await Ia(ye,{id:ce.id,type:ce.type,position:ce.position,data:ce.data});for(const ce of pe)await Ds(ye,ce)},undo:async()=>{await Promise.allSettled(pe.map(ce=>Pl(ye,ce.id))),await Promise.allSettled(ge.map(ce=>Yo(ye,ce.id)))}})}catch(ce){for(const Oe of ge)De(Oe.id);for(const Oe of pe)ft(Oe.id);$(ce instanceof Error?ce.message:String(ce)),console.error("paste failed",ce)}})()},[ye,Ce,De,at,ft,re,X]);M.useEffect(()=>{const te=de=>{const ge=Uwe({event:de,isEditableActive:So(document.activeElement),hasNodes:!!_e&&_e.length>0,hasConnectors:!!Se&&Se.length>0,selectedIds:C.current,hasClipboard:!!Dr.current});if(ge.type!=="noop"&&!(ge.type==="copy"||ge.type==="paste")){if(de.preventDefault(),ge.type==="selectAll"){d((_e??[]).map(pe=>pe.id)),h((Se??[]).map(pe=>pe.id));return}ni([...ge.ids]),on(null)}};return window.addEventListener("keydown",te),()=>window.removeEventListener("keydown",te)},[_e,Se,ni,on]),M.useEffect(()=>{const te=de=>{const ge=Bwe(de);if(!ge||So(document.activeElement))return;const pe=C.current;if(pe.length===0)return;const ce=D.overrides,Oe=(_e??[]).map(ct=>{var yr;const pn=((yr=ce[ct.id])==null?void 0:yr.position)??ct.position;return{id:ct.id,position:pn}}),lt=Vwe(ge,pe,Oe);if(lt.length!==0)if(de.preventDefault(),lt.length===1){const ct=lt[0];ct&&nt(ct.id,ct.position)}else rt(lt)};return window.addEventListener("keydown",te),()=>window.removeEventListener("keydown",te)},[_e,D.overrides,nt,rt]),M.useEffect(()=>{const te=de=>{const ge=Hwe(de);if(!ge||So(document.activeElement))return;de.preventDefault();const pe=P.current;pe&&(ge==="fit"?pe.fitView({padding:.2,duration:200}):ge==="in"?pe.zoomIn({duration:150}):pe.zoomOut({duration:150}))};return window.addEventListener("keydown",te),()=>window.removeEventListener("keydown",te)},[]);const mi=M.useCallback(te=>{if(!ye||!_e)return;const de=D.overrides,ge=P.current,pe=te==="selection"?new Set(C.current):null,ce=pe?_e.filter(xt=>pe.has(xt.id)):_e;if(ce.length<2)return;const Oe=new Set(ce.map(xt=>xt.id)),lt=(Se??[]).filter(xt=>Oe.has(xt.source)&&Oe.has(xt.target)),ct=ce.map(xt=>{var We;const nn=((We=de[xt.id])==null?void 0:We.position)??xt.position,Qn=ge==null?void 0:ge.getInternalNode(xt.id),ri=Qn==null?void 0:Qn.measured,ea=xt.data,ve=(ri==null?void 0:ri.width)??ea.width??200,be=(ri==null?void 0:ri.height)??ea.height??120;return{id:xt.id,width:ve,height:be,position:nn}}),pn=lt.map(xt=>({source:xt.source,target:xt.target})),yr=IVe(ct,pn);let gr=Number.POSITIVE_INFINITY,Vn=Number.POSITIVE_INFINITY,mr=Number.POSITIVE_INFINITY,ki=Number.POSITIVE_INFINITY;for(const xt of ct){xt.position.x<gr&&(gr=xt.position.x),xt.position.y<Vn&&(Vn=xt.position.y);const nn=yr.get(xt.id);nn&&(nn.x<mr&&(mr=nn.x),nn.y<ki&&(ki=nn.y))}const xi=Number.isFinite(gr)&&Number.isFinite(mr)?gr-mr:0,vt=Number.isFinite(Vn)&&Number.isFinite(ki)?Vn-ki:0,tn=[];for(const xt of ct){const nn=yr.get(xt.id);if(!nn)continue;const Qn={x:nn.x+xi,y:nn.y+vt},ri=Qn.x-xt.position.x,ea=Qn.y-xt.position.y;Math.abs(ri)<1&&Math.abs(ea)<1||tn.push({id:xt.id,prev:xt.position,next:Qn})}if(tn.length!==0){$(null);for(const xt of tn)Ce(xt.id,{position:xt.next});re(),X({do:async()=>{await Promise.allSettled(tn.map(xt=>Ts(ye,xt.id,xt.next)))},undo:async()=>{await Promise.allSettled(tn.map(xt=>Ts(ye,xt.id,xt.prev)))}}),Promise.all(tn.map(async xt=>{try{return await Ts(ye,xt.id,xt.next),null}catch(nn){return De(xt.id),nn instanceof Error?nn.message:String(nn)}})).then(xt=>{const nn=xt.filter(ri=>ri!==null),Qn=nn[0];Qn&&($(nn.length===1?Qn:`${nn.length} node updates failed (first: ${Qn})`),console.error("Tidy: some updateNodePosition calls failed",nn))})}},[ye,_e,Se,D.overrides,Ce,De,X,re]);M.useEffect(()=>{const te=de=>{if(!(de.metaKey||de.ctrlKey)||!de.shiftKey||de.altKey||de.key.toLowerCase()!=="l"||So(document.activeElement))return;de.preventDefault();const ge=C.current.length>0?"selection":"all";mi(ge)};return window.addEventListener("keydown",te),()=>window.removeEventListener("keydown",te)},[mi]);const Tn=M.useCallback(()=>{const te=C.current.length>0?"selection":"all";mi(te)},[mi]);M.useEffect(()=>{const te=de=>{if(So(document.activeElement)||document.querySelector('[data-testid="inline-edit-input"]'))return;const ge=$we(de);if(ge===null)return;const pe=ge==="select"?null:ge;if(F.current===pe){V(null);return}V(pe)};return window.addEventListener("keydown",te),()=>window.removeEventListener("keydown",te)},[]),M.useEffect(()=>{const te=de=>{de.key==="Escape"&&(So(document.activeElement)||document.querySelector('[data-testid="inline-edit-input"]')||(C.current.length>0&&d([]),_.current.length>0&&h([]),F.current!==null&&V(null)))};return window.addEventListener("keydown",te),()=>window.removeEventListener("keydown",te)},[]),M.useEffect(()=>{const te=de=>{if(de.key.toLowerCase()!=="f"||de.metaKey||de.ctrlKey||de.shiftKey||de.altKey||So(document.activeElement)||document.querySelector('[data-testid="inline-edit-input"]'))return;const ge=C.current;if(ge.length===0)return;const pe=P.current;pe&&pe.fitView({nodes:ge.map(ce=>({id:ce})),padding:.2,duration:200})};return window.addEventListener("keydown",te),()=>window.removeEventListener("keydown",te)},[]),M.useEffect(()=>{const te=de=>{if(de.key!=="1"||de.metaKey||de.ctrlKey||de.shiftKey||de.altKey||So(document.activeElement)||document.querySelector('[data-testid="inline-edit-input"]'))return;const ge=P.current;if(!ge)return;const{x:pe,y:ce}=ge.getViewport();ge.setViewport({x:pe,y:ce,zoom:1},{duration:150})};return window.addEventListener("keydown",te),()=>window.removeEventListener("keydown",te)},[]);const or=M.useCallback(te=>{var de,ge,pe;switch(te){case"tool.select":V(null);return;case"tool.rectangle":V("rectangle");return;case"tool.ellipse":V("ellipse");return;case"tool.text":V("text");return;case"tool.sticky":V("sticky");return;case"tool.database":V("database");return;case"edit.undo":{if(!Mn)return;(async()=>{try{const ce=await rn();ce!=null&&ce.entry&&await ce.entry.undo()}catch(ce){$(ce instanceof Error?ce.message:String(ce)),console.error("undo failed",ce)}})();return}case"edit.redo":{if(!ei)return;(async()=>{try{const ce=await bn();ce!=null&&ce.entry&&await ce.entry.do()}catch(ce){$(ce instanceof Error?ce.message:String(ce)),console.error("redo failed",ce)}})();return}case"edit.copy":{const ce=C.current;if(ce.length===0)return;ni([...ce]);return}case"edit.paste":on(null);return;case"edit.duplicate":{const ce=C.current;if(ce.length===0)return;ni([...ce]),on(null);return}case"edit.delete":{const ce=C.current,Oe=_.current;if(ce.length===0&&Oe.length===0)return;ir([...ce],[...Oe]);return}case"edit.selectAll":d((_e??[]).map(ce=>ce.id)),h((Se??[]).map(ce=>ce.id));return;case"view.fit":{const ce=P.current;if(!ce)return;ce.fitView({padding:.2,duration:200});return}case"view.zoomIn":{const ce=P.current;if(!ce)return;ce.zoomIn({duration:150});return}case"view.zoomOut":{const ce=P.current;if(!ce)return;ce.zoomOut({duration:150});return}case"view.zoom100":{const ce=P.current;if(!ce)return;const{x:Oe,y:lt}=ce.getViewport();ce.setViewport({x:Oe,y:lt,zoom:1},{duration:150});return}case"view.zoomToSelection":{const ce=C.current;if(ce.length===0)return;const Oe=P.current;if(!Oe)return;Oe.fitView({nodes:ce.map(lt=>({id:lt})),padding:.2,duration:200});return}case"layout.tidy":{const ce=C.current.length>0?"selection":"all";mi(ce);return}case"selection.deselect":C.current.length>0&&d([]),_.current.length>0&&h([]),F.current!==null&&V(null);return;case"help.commandPalette":N(!0);return;case"export.pdf":{(de=j.current)==null||de.call(j);return}case"export.png":{(ge=O.current)==null||ge.call(O);return}case"session.reset":{(pe=T.current)==null||pe.call(T);return}}},[Mn,ei,rn,bn,ni,on,ir,_e,Se,mi]);M.useEffect(()=>{const te=de=>{(de.metaKey||de.ctrlKey)&&(de.shiftKey||de.altKey||de.key.toLowerCase()==="p"&&(de.preventDefault(),!So(document.activeElement)&&or("help.commandPalette")))};return window.addEventListener("keydown",te),()=>window.removeEventListener("keydown",te)},[or]);const sr=M.useCallback(async()=>{const te=P.current;if(!te)return null;const de=document.querySelector(".react-flow__viewport");if(!de)return null;const ge=te.getViewport();try{return await te.fitView({duration:0,padding:.1}),await new Promise(pe=>requestAnimationFrame(()=>pe())),await MUe(de)}finally{te.setViewport(ge,{duration:0})}},[]),Dn=M.useCallback(te=>{var ge;const de=((ge=n==null?void 0:n.demo)==null?void 0:ge.name)??(n==null?void 0:n.name)??e??"demo";return`${fGe(de)}.${te}`},[n,e]),qr=M.useCallback(async()=>{$(null);try{const te=await sr();if(!te)return;SUe(te.dataUrl,Dn("png"))}catch(te){$(te instanceof Error?te.message:String(te))}},[sr,Dn]),zr=M.useCallback(async()=>{$(null);try{const te=await sr();if(!te)return;const de=te.width>te.height?"landscape":"portrait",ge=new At({orientation:de,unit:"px",format:[te.width,te.height],hotfixes:["px_scaling"]});ge.addImage(te.dataUrl,"PNG",0,0,te.width,te.height),ge.save(Dn("pdf"))}catch(te){$(te instanceof Error?te.message:String(te))}},[sr,Dn]);M.useEffect(()=>{j.current=zr},[zr]),M.useEffect(()=>{O.current=qr},[qr]),M.useEffect(()=>{T.current=c??null},[c]);const Sn=M.useCallback((te,de)=>{if(!ye)return;const ge=Se==null?void 0:Se.find(Oe=>Oe.id===te),pe=ge?{source:ge.source,target:ge.target,sourceHandle:ge.sourceHandle,targetHandle:ge.targetHandle,sourceHandleAutoPicked:ge.sourceHandleAutoPicked,targetHandleAutoPicked:ge.targetHandleAutoPicked,sourcePin:ge.sourcePin??null,targetPin:ge.targetPin??null}:null,ce={...de.source!==void 0?{source:de.source}:{},...de.target!==void 0?{target:de.target}:{},...de.sourceHandle!==void 0?{sourceHandle:de.sourceHandle===null?void 0:de.sourceHandle}:{},...de.targetHandle!==void 0?{targetHandle:de.targetHandle===null?void 0:de.targetHandle}:{},...de.sourceHandleAutoPicked!==void 0?{sourceHandleAutoPicked:de.sourceHandleAutoPicked}:{},...de.targetHandleAutoPicked!==void 0?{targetHandleAutoPicked:de.targetHandleAutoPicked}:{},...de.sourcePin!==void 0?{sourcePin:de.sourcePin===null?void 0:de.sourcePin}:{},...de.targetPin!==void 0?{targetPin:de.targetPin===null?void 0:de.targetPin}:{}};if(at(te,ce),$(null),re(),pe){const Oe=pe;X({do:async()=>{await Ui(ye,te,de)},undo:async()=>{await Ui(ye,te,Oe)},coalesceKey:`connector:${te}:reconnect`})}Ui(ye,te,de).catch(Oe=>{ft(te),pe&&ae(),$(Oe instanceof Error?Oe.message:String(Oe)),console.error("updateConnector reconnect failed",Oe)})},[ye,Se,at,ft,X,ae,re]),Za=M.useCallback((te,de,ge)=>{if(!ye)return;const pe=Se==null?void 0:Se.find(lt=>lt.id===te),ce=pe?de==="source"?pe.sourcePin:pe.targetPin:void 0,Oe=de==="source"?"sourcePin":"targetPin";if(at(te,{[Oe]:ge}),$(null),re(),pe){const lt={[Oe]:ce??null};X({do:async()=>{await Ui(ye,te,{[Oe]:ge})},undo:async()=>{await Ui(ye,te,lt)},coalesceKey:`connector:${te}:${Oe}`})}Ui(ye,te,{[Oe]:ge}).catch(lt=>{ft(te),pe&&ae(),$(lt instanceof Error?lt.message:String(lt)),console.error("updateConnector pin failed",lt)})},[ye,Se,at,ft,X,ae,re]),yo=M.useCallback((te,de)=>{if(!ye)return;const ge=Se==null?void 0:Se.find(Oe=>Oe.id===te),pe=ge?de==="source"?ge.sourcePin:ge.targetPin:void 0;if(!pe)return;const ce=de==="source"?"sourcePin":"targetPin";at(te,{[ce]:void 0}),$(null),re(),X({do:async()=>{await Ui(ye,te,{[ce]:null})},undo:async()=>{await Ui(ye,te,{[ce]:pe})}}),Ui(ye,te,{[ce]:null}).catch(Oe=>{ft(te),ae(),$(Oe instanceof Error?Oe.message:String(Oe)),console.error("updateConnector unpin failed",Oe)})},[ye,Se,at,ft,X,ae,re]),zt=n==null?void 0:n.demo,go=D.overrides,Or=I.overrides,vi=R.ids,Ji=U.ids,Wo=M.useMemo(()=>{if(!y||vi.has(y))return null;const te=zt==null?void 0:zt.nodes.find(pe=>pe.id===y);if(!te)return null;const de=go[y];if(!de)return te;const ge=de.data?{...te.data,...de.data}:te.data;return{...te,...de,data:ge}},[zt,y,go,vi]),Ls=M.useMemo(()=>{if(!k||Ji.has(k))return null;const te=zt==null?void 0:zt.connectors.find(ge=>ge.id===k);if(!te)return null;const de=Or[k];return de?{...te,...de}:te},[zt,k,Or,Ji]),ml=M.useMemo(()=>{if(!zt||u.length===0)return[];const te=new Map(zt.nodes.map(ge=>[ge.id,ge])),de=[];for(const ge of u){const pe=te.get(ge);if(!pe)continue;const ce=go[ge];if(!ce){de.push(pe);continue}const Oe=ce.data?{...pe.data,...ce.data}:pe.data;de.push({...pe,...ce,data:Oe})}return de},[zt,u,go]),vl=M.useMemo(()=>{if(!zt||f.length===0)return[];const te=new Map(zt.connectors.map(ge=>[ge.id,ge])),de=[];for(const ge of f){const pe=te.get(ge);if(!pe)continue;const ce=Or[ge];de.push(ce?{...pe,...ce}:pe)}return de},[zt,f,Or]),dc=M.useMemo(()=>{if(!zt)return null;if(!q)return zt.nodes;const te=new Map(zt.nodes.map(pe=>[pe.id,pe])),de=[],ge=new Set;for(const pe of q){const ce=te.get(pe);ce&&(de.push(ce),ge.add(pe))}for(const pe of zt.nodes)ge.has(pe.id)||de.push(pe);return de},[zt,q]),ka=M.useMemo(()=>{const te=dc??(zt==null?void 0:zt.nodes)??null;return te?vi.size===0?te:te.filter(de=>!vi.has(de.id)):null},[dc,zt,vi]),Is=M.useMemo(()=>{const te=(zt==null?void 0:zt.connectors)??null;return te?Ji.size===0&&vi.size===0?te:te.filter(de=>!Ji.has(de.id)&&!vi.has(de.source)&&!vi.has(de.target)):null},[zt,Ji,vi]);if(!l)return x.jsxs("div",{className:"flex h-full w-full flex-col items-center justify-center gap-2 bg-background p-6 text-center",children:[x.jsxs("p",{className:"text-sm font-medium",children:["Unknown demo: ",e]}),x.jsx("p",{className:"text-xs text-muted-foreground",children:"The slug may have been removed. Re-register from the project repo to bring it back."})]});if(r&&!n)return x.jsx("div",{className:"flex h-full w-full items-center justify-center text-sm text-muted-foreground",children:"Loading demo…"});y&&i[y],y&&a[y];const Qi=y?o[y]:void 0;return x.jsxs("div",{className:"relative h-full w-full",children:[n&&!n.valid?x.jsxs("div",{"data-testid":"demo-error-banner",className:"absolute inset-x-0 top-0 z-10 border-b border-rose-500/40 bg-rose-50 px-4 py-2 text-xs text-rose-900 shadow-sm dark:bg-rose-950/40 dark:text-rose-100",children:[x.jsx("span",{className:"font-medium uppercase tracking-wide",children:"Invalid demo: "}),x.jsx("span",{className:"font-mono",children:n.error})]}):null,x.jsxs("div",{className:"pointer-events-auto absolute right-3 top-3 z-20 flex items-center gap-1",children:[c?x.jsx(NDe,{onRestartDemo:c}):null,x.jsx(dqe,{onDownloadPdf:ye?zr:void 0,onDownloadPng:ye?qr:void 0,onExportToCloud:ye?()=>Me(!0):void 0})]}),zt?x.jsx(c_e,{projectId:ye??void 0,nodes:ka??zt.nodes,connectors:Is??zt.connectors,selectedNodeIds:u,selectedConnectorIds:f,onSelectionChange:ee,runs:i,statusByNode:o,onPlayNode:s,nodeOverrides:go,connectorOverrides:Or,onNodePositionChange:nt,onNodePositionsChange:rt,onNodeResize:Pt,onMultiResize:it,onNodeNameChange:Rn,onNodeDescriptionChange:pr,onConnectorLabelChange:fo,onCreateShapeNode:br,onCreateImageFromFile:ye?qi:void 0,onRetryImageUpload:ye?$a:void 0,onCreateHtmlNode:ye?ar:void 0,iconPickerOpen:zi.open,onOpenIconPicker:ye?ti:void 0,onCloseIconPicker:ye?Ga:void 0,onPickIcon:ye?$o:void 0,onRequestIconReplace:ye?Ka:void 0,onCreateConnector:gi,onReconnectConnector:Sn,onPinEndpoint:ye?Za:void 0,onUnpinEndpoint:ye?yo:void 0,onReorderNode:Qr,onDeleteNode:Di,onCopyNode:te=>ni([te]),onPasteAt:on,onCopySelection:ye?ni:void 0,onPasteSelection:ye?()=>on(null):void 0,onToggleNodeLock:ye?un:void 0,hasClipboard:li,selectedNodes:ml,selectedConnectors:vl,onStyleNode:Lt,onStyleNodePreview:Ot,onStyleNodes:Nt,onStyleNodesPreview:ht,onStyleConnector:jt,onStyleConnectorPreview:Ht,onRfInit:G,onTidy:_e?Tn:void 0,onNodeClick:qe,onPaneClick:Ke,onCreateAndConnectFromPane:po,pendingEditNodeId:S,activeShape:B,onSelectShape:V}):x.jsx("div",{className:"flex h-full w-full items-center justify-center text-sm text-muted-foreground",children:"No demo data yet."}),Z?x.jsxs("div",{"data-testid":"edit-error-banner",className:"absolute inset-x-0 bottom-4 z-20 mx-auto w-fit max-w-[80%] rounded-md border border-rose-500/50 bg-rose-50 px-3 py-2 text-xs text-rose-900 shadow-md dark:bg-rose-950/60 dark:text-rose-100",children:[x.jsx("span",{className:"font-medium",children:"Couldn't save change: "}),x.jsx("span",{className:"font-mono",children:Z}),x.jsx("button",{type:"button",className:"ml-3 underline underline-offset-2",onClick:()=>$(null),children:"Dismiss"})]}):null,x.jsx(Zwe,{open:ie,onOpenChange:N,runCommand:or,ctx:{hasSelection:u.length>0||f.length>0,canUndo:Mn,canRedo:ei,hasClipboard:li,canExportDemo:!!ye,canResetSession:!!c}}),x.jsx(sDe,{demoId:(n==null?void 0:n.id)??null,node:Wo,connector:Ls,statusReport:Qi,onNameChange:Rn,onDescriptionChange:pr,onDetailChange:Jn,onClose:()=>{v(null),g(null)}}),ye?x.jsx(PDe,{open:wt,onOpenChange:Me,projectId:ye,onCapturePreview:async()=>{const te=await sr();return te==null?void 0:te.dataUrl}}):null]})}const Hse="npx seeflow register --path .";function gGe(){const[e,t]=M.useState(!1),n=async()=>{try{await navigator.clipboard.writeText(Hse),t(!0),setTimeout(()=>t(!1),1200)}catch(r){console.error("[empty-state] copy failed",r)}};return x.jsx("div",{"data-testid":"seeflow-empty-state",className:"flex h-full w-full items-center justify-center bg-background p-6",children:x.jsxs("div",{className:"flex max-w-lg flex-col items-center gap-6 text-center",children:[x.jsx("div",{className:"flex h-12 w-12 items-center justify-center rounded-full bg-muted",children:x.jsx(Ep,{className:"h-6 w-6 text-muted-foreground"})}),x.jsxs("div",{className:"space-y-2",children:[x.jsx("h1",{className:"text-2xl font-semibold tracking-tight",children:"No demos registered yet"}),x.jsxs("p",{className:"text-sm text-muted-foreground",children:["Point SeeFlow at any folder containing a"," ",x.jsx("code",{className:"rounded bg-muted px-1.5 py-0.5 text-xs",children:".seeflow/seeflow.json"})," ","file and it'll appear here."]})]}),x.jsxs("div",{className:"flex w-full items-center gap-2 rounded-md border bg-card px-3 py-2 font-mono text-sm",children:[x.jsx("span",{className:"text-muted-foreground select-none",children:"$"}),x.jsx("code",{className:"flex-1 truncate text-left",children:Hse}),x.jsx(oi,{type:"button",variant:"ghost",size:"sm",onClick:n,"aria-label":"Copy register command",children:e?x.jsx(Jc,{className:"h-4 w-4"}):x.jsx(Y2,{className:"h-4 w-4"})})]})]})})}function mGe({demos:e}){return e.length===0?x.jsx(gGe,{}):x.jsx("div",{className:"flex h-full w-full items-start justify-center overflow-y-auto bg-background p-8",children:x.jsxs("div",{"data-testid":"studio-home-picker",className:"flex w-full max-w-2xl flex-col gap-6 pt-8",children:[x.jsxs("div",{className:"space-y-1",children:[x.jsx("h1",{className:"text-2xl font-semibold tracking-tight",children:"Open a demo"}),x.jsxs("p",{className:"text-sm text-muted-foreground",children:[e.length," demos registered — pick one to load its canvas."]})]}),x.jsx("ul",{className:"flex flex-col gap-2",children:e.map(t=>x.jsx("li",{children:x.jsxs("button",{type:"button",onClick:()=>wf(`/d/${t.slug}`),"data-testid":`studio-home-demo-${t.slug}`,className:"flex w-full flex-col items-start gap-0.5 rounded-md border bg-card px-4 py-3 text-left transition-colors hover:bg-accent hover:text-accent-foreground",children:[x.jsx("span",{className:"text-sm font-medium",children:t.name}),x.jsx("span",{className:"truncate text-xs text-muted-foreground",children:t.repoPath})]})},t.id))})]})})}const vGe=e=>{if(!e.startsWith("/d/"))return null;const t=e.slice(3);return t.length>0?decodeURIComponent(t):null};function kGe(){const e=Xxe(),{demos:t,refresh:n}=Mwe(),r=vGe(e),i=r?(t??[]).find(A=>A.slug===r):void 0,a=(i==null?void 0:i.id)??null,{detail:o,loading:s,refresh:c}=bwe(a),{runs:l,apply:u}=_we(a),{events:d,apply:f}=Iwe(a),{statusByNode:h,apply:y,reset:v}=Rwe(a),k=M.useCallback(()=>{v(),c(),n()},[c,n,v]),g=M.useCallback(A=>{u(A),f(A),y(A)},[u,f,y]);jwe(a,{onReload:k,onEvent:g});const S=M.useCallback(async()=>{if(a)try{await G4e(a)}catch(A){console.error("Failed to restart demo:",A)}},[a]),w=M.useCallback(A=>{wJ(A.id),n()},[n]),C=M.useCallback(async A=>{await n(),a===A&&wf("/")},[n,a]);M.useEffect(()=>{if(e!=="/"||t===null)return;const A=Dwe(t,Twe());A&&wf(`/d/${A.slug}`)},[e,t]),M.useEffect(()=>{i&&wJ(i.id)},[i]);const _=M.useCallback(A=>{a&&Y4e(a,A).catch(j=>{u({type:"node:error",nodeId:A,message:j instanceof Error?j.message:String(j),ts:Date.now()})})},[a,u]);return t===null?x.jsx("div",{className:"flex h-full w-full items-center justify-center bg-background text-sm text-muted-foreground",children:"Loading…"}):x.jsx(Tp,{delayDuration:150,children:x.jsxs("div",{className:"flex h-full w-full flex-col bg-background text-foreground",children:[x.jsx(Jxe,{demos:t,currentSlug:r??void 0,onProjectCreated:w,onProjectUnregistered:C}),x.jsx("main",{className:"min-h-0 flex-1",children:r?x.jsx(yGe,{slug:r,demos:t,detail:o,loading:s,runs:l,nodeEvents:d,statusByNode:h,onPlayNode:_,onRestartDemo:a?S:void 0}):x.jsx(mGe,{demos:t})})]})})}const dge=document.getElementById("root");if(!dge)throw new Error("Root element #root not found");n$.createRoot(dge).render(x.jsx(as.StrictMode,{children:x.jsx(kGe,{})}));export{kn as _,Fc as c,Rf as g};
8005
+ `)}return""+n},t}();const hGe=new Set(["INPUT","TEXTAREA","SELECT"]),So=e=>e?hGe.has(e.tagName)?!0:e instanceof HTMLElement&&e.isContentEditable:!1,fGe=e=>{const t=e.replace(/[\\/:*?"<>|\x00-\x1f]+/g,"_").trim();return t.length>0?t.slice(0,80):"demo"},pGe=(e,t,n)=>{const r=e.indexOf(t);if(r<0)return null;const i=e.length,a=[...e];switch(n.op){case"forward":{if(r>=i-1)return null;const o=a[r],s=a[r+1];return o===void 0||s===void 0?null:(a[r]=s,a[r+1]=o,a)}case"backward":{if(r<=0)return null;const o=a[r],s=a[r-1];return o===void 0||s===void 0?null:(a[r]=s,a[r-1]=o,a)}case"toFront":{if(r===i-1)return null;const[o]=a.splice(r,1);return o===void 0?null:(a.push(o),a)}case"toBack":{if(r===0)return null;const[o]=a.splice(r,1);return o===void 0?null:(a.unshift(o),a)}case"toIndex":{const o=Math.min(Math.max(n.index,0),i-1);if(o===r)return null;const[s]=a.splice(r,1);return s===void 0?null:(a.splice(o,0,s),a)}}};function yGe({slug:e,demos:t,detail:n,loading:r,runs:i,nodeEvents:a,statusByNode:o,onPlayNode:s,onRestartDemo:c}){var mo,xa;const l=t.find(te=>te.slug===e),[u,d]=M.useState([]),[f,h]=M.useState([]),[y,v]=M.useState(null),[k,g]=M.useState(null),[S,w]=M.useState(null),C=M.useRef(u),_=M.useRef(f);M.useEffect(()=>{C.current=u},[u]),M.useEffect(()=>{_.current=f},[f]);const A=M.useRef(null),j=M.useRef(null),O=M.useRef(null),T=M.useRef(null),D=xte(),I=xte(),R=kte(),U=kte(),[q,K]=M.useState(null),[Z,$]=M.useState(null),[B,V]=M.useState(null),F=M.useRef(null);M.useEffect(()=>{F.current=B},[B]);const[ie,N]=M.useState(!1),P=M.useRef(null),G=M.useCallback(te=>{P.current=te},[]),J=Eqe(),{push:X,dropTop:ae,markMutation:re,clear:fe,lastMutationAt:ke}=J,{reset:Ne}=D,{reset:je}=I,{reset:Re}=R,{reset:$e}=U;M.useEffect(()=>{d([]),h([]),v(null),g(null),w(null),Ne(),je(),Re(),$e(),K(null),$(null),Dr.current=null,va(!1),Tr.current.clear(),J.clear()},[n==null?void 0:n.id]);const ee=M.useCallback((te,de)=>{d(te),h(de)},[]),qe=M.useCallback(te=>{v(te),g(null)},[]),Ke=M.useCallback(()=>{v(null),g(null)},[]),_e=(mo=n==null?void 0:n.demo)==null?void 0:mo.nodes,Se=(xa=n==null?void 0:n.demo)==null?void 0:xa.connectors,{pruneAgainst:ot}=D,{pruneAgainst:Qe}=I,{pruneAgainst:Pe}=R,{pruneAgainst:Ie}=U;M.useEffect(()=>{_e&&(ot(_e),Pe(_e)),Date.now()-ke()>2e3&&fe()},[_e,ot,Pe,ke,fe]),M.useEffect(()=>{Se&&(Qe(Se),Ie(Se)),Date.now()-ke()>2e3&&fe()},[Se,Qe,Ie,ke,fe]),M.useEffect(()=>{if(!(!_e||!q)&&_e.length===q.length){for(let te=0;te<_e.length;te++){const de=_e[te],ge=q[te];if(!de||de.id!==ge)return}K(null)}},[_e,q]);const ye=(n==null?void 0:n.id)??null,[wt,Me]=M.useState(!1),{setOverride:Ce,dropOverride:De}=D,Ve=M.useRef(D.overrides);M.useEffect(()=>{Ve.current=D.overrides},[D.overrides]);const nt=M.useCallback((te,de)=>{var pe;if(!ye)return;const ge=(pe=_e==null?void 0:_e.find(ce=>ce.id===te))==null?void 0:pe.position;Ce(te,{position:de}),$(null),re(),ge&&X({do:async()=>{await Ts(ye,te,de)},undo:async()=>{await Ts(ye,te,ge)},coalesceKey:`node:${te}:position`}),Ts(ye,te,de).catch(ce=>{De(te),ge&&ae(),$(ce instanceof Error?ce.message:String(ce)),console.error("updateNodePosition failed",ce)})},[ye,_e,Ce,De,X,ae,re]),rt=M.useCallback(te=>{if(!ye||te.length===0)return;const de=Ve.current,ge=te.map(pe=>{var lt;const ce=_e==null?void 0:_e.find(ct=>ct.id===pe.id);if(!ce)return null;const Oe=((lt=de[pe.id])==null?void 0:lt.position)??ce.position;return{id:pe.id,prev:Oe,next:pe.position}}).filter(pe=>pe!==null);if(ge.length!==0){for(const pe of ge)Ce(pe.id,{position:pe.next});$(null),re(),X({do:async()=>{await Promise.allSettled(ge.map(pe=>Ts(ye,pe.id,pe.next)))},undo:async()=>{await Promise.allSettled(ge.map(pe=>Ts(ye,pe.id,pe.prev)))}}),Promise.all(ge.map(async pe=>{try{return await Ts(ye,pe.id,pe.next),null}catch(ce){return De(pe.id),ce instanceof Error?ce.message:String(ce)}})).then(pe=>{const ce=pe.find(Oe=>Oe!==null);ce&&$(ce)})}},[ye,_e,Ce,De,X,re]),Pt=M.useCallback((te,de)=>{if(!ye)return;const ge=_e==null?void 0:_e.find(Oe=>Oe.id===te),pe=ge?{width:ge.data.width,height:ge.data.height,position:{x:ge.position.x,y:ge.position.y}}:void 0,ce={width:de.width,height:de.height,position:{x:de.x,y:de.y}};Ce(te,{position:ce.position,data:{width:ce.width,height:ce.height}}),$(null),re(),pe&&X({do:async()=>{await _n(ye,te,ce)},undo:async()=>{await _n(ye,te,pe)},coalesceKey:`node:${te}:resize`}),_n(ye,te,ce).catch(Oe=>{De(te),pe&&ae(),$(Oe instanceof Error?Oe.message:String(Oe)),console.error("updateNode resize failed",Oe)})},[ye,_e,Ce,De,X,ae,re]),it=M.useCallback(te=>{if(!ye||te.length===0)return;const de=[];for(const pe of te){const ce=_e==null?void 0:_e.find(pn=>pn.id===pe.id);if(!ce)continue;const Oe=ce.data,lt={position:{x:ce.position.x,y:ce.position.y}};Oe.width!==void 0&&(lt.width=Oe.width),Oe.height!==void 0&&(lt.height=Oe.height);const ct={position:pe.position};pe.width!==void 0&&(ct.width=pe.width),pe.height!==void 0&&(ct.height=pe.height),de.push({id:pe.id,prev:lt,next:ct})}if(de.length===0)return;for(const pe of de){const ce={};pe.next.width!==void 0&&(ce.width=pe.next.width),pe.next.height!==void 0&&(ce.height=pe.next.height),Ce(pe.id,{position:pe.next.position,...Object.keys(ce).length>0?{data:ce}:{}})}$(null),re();const ge=de.map(pe=>pe.id).sort();X({do:async()=>{await Promise.allSettled(de.map(pe=>_n(ye,pe.id,pe.next)))},undo:async()=>{await Promise.allSettled(de.map(pe=>_n(ye,pe.id,pe.prev)))},coalesceKey:`multi:resize:${ge.join(",")}`}),Promise.all(de.map(async pe=>{try{return await _n(ye,pe.id,pe.next),null}catch(ce){return De(pe.id),ce instanceof Error?ce.message:String(ce)}})).then(pe=>{const ce=pe.find(Oe=>Oe!==null);ce&&$(ce)})},[ye,_e,Ce,De,X,re]),{setOverride:at,dropOverride:ft}=I,Ot=M.useCallback((te,de)=>{Ce(te,{data:de})},[Ce]),ht=M.useCallback((te,de)=>{for(const ge of te)Ce(ge,{data:de})},[Ce]),Ht=M.useCallback((te,de)=>{at(te,de)},[at]),Lt=M.useCallback((te,de)=>{if(!ye)return;Noe(de);const ge=_e==null?void 0:_e.find(ce=>ce.id===te);let pe=null;if(ge){pe={};const ce=ge.data;for(const Oe of Object.keys(de))pe[Oe]=ce[Oe]}if(Ce(te,{data:de}),$(null),re(),pe){const ce=pe;X({do:async()=>{await _n(ye,te,de)},undo:async()=>{await _n(ye,te,ce)},coalesceKey:`node:${te}:style`})}_n(ye,te,de).catch(ce=>{De(te),pe&&ae(),$(ce instanceof Error?ce.message:String(ce)),console.error("updateNode style failed",ce)})},[ye,_e,Ce,De,X,ae,re]),Nt=M.useCallback((te,de)=>{if(!ye||te.length===0)return;Noe(de);const ge=te.map(pe=>{const ce=_e==null?void 0:_e.find(ct=>ct.id===pe);if(!ce)return null;const Oe=ce.data,lt={};for(const ct of Object.keys(de))lt[ct]=Oe[ct];return{id:pe,prev:lt}}).filter(pe=>pe!==null);if(ge.length!==0){for(const pe of ge)Ce(pe.id,{data:de});$(null),re(),X({do:async()=>{await Promise.allSettled(ge.map(pe=>_n(ye,pe.id,de)))},undo:async()=>{await Promise.allSettled(ge.map(pe=>_n(ye,pe.id,pe.prev)))}}),Promise.all(ge.map(async pe=>{try{return await _n(ye,pe.id,de),null}catch(ce){return De(pe.id),ce instanceof Error?ce.message:String(ce)}})).then(pe=>{const ce=pe.find(Oe=>Oe!==null);ce&&$(ce)})}},[ye,_e,Ce,De,X,re]),un=M.useCallback(te=>{if(!ye||te.length===0)return;const de=te.map(ce=>{const Oe=_e==null?void 0:_e.find(ct=>ct.id===ce);if(!Oe)return null;const lt=Oe.data;return{id:ce,prev:lt.locked===!0}}).filter(ce=>ce!==null);if(de.length===0)return;const ge=de.some(ce=>!ce.prev),pe=de.filter(ce=>ce.prev!==ge);if(pe.length!==0){for(const ce of pe)Ce(ce.id,{data:{locked:ge}});$(null),re(),X({do:async()=>{await Promise.allSettled(pe.map(ce=>_n(ye,ce.id,{locked:ge})))},undo:async()=>{await Promise.allSettled(pe.map(ce=>_n(ye,ce.id,{locked:ce.prev})))}}),Promise.all(pe.map(async ce=>{try{return await _n(ye,ce.id,{locked:ge}),null}catch(Oe){return De(ce.id),Oe instanceof Error?Oe.message:String(Oe)}})).then(ce=>{const Oe=ce.find(lt=>lt!==null);Oe&&$(Oe)})}},[ye,_e,Ce,De,X,re]),jt=M.useCallback((te,de)=>{if(!ye)return;EUe(de);const ge=Se==null?void 0:Se.find(ce=>ce.id===te);let pe=null;if(ge){pe={};const ce=ge;for(const Oe of Object.keys(de))pe[Oe]=ce[Oe]}if(at(te,de),$(null),re(),pe){const ce=pe;X({do:async()=>{await Ui(ye,te,de)},undo:async()=>{await Ui(ye,te,ce)},coalesceKey:`connector:${te}:style`})}Ui(ye,te,de).catch(ce=>{ft(te),pe&&ae(),$(ce instanceof Error?ce.message:String(ce)),console.error("updateConnector failed",ce)})},[ye,Se,at,ft,X,ae,re]),{mark:Ct,markMany:Vt,unmark:Rr,unmarkMany:wn}=R,{mark:jr,markMany:Hn,unmark:gt,unmarkMany:rr}=U,Di=M.useCallback(te=>{if(!ye)return;const de=_e==null?void 0:_e.find(ct=>ct.id===te);if(!de||de.data.locked===!0)return;const ge=(Se??[]).filter(ct=>ct.source===te||ct.target===te),pe=ge.map(ct=>ct.id),ce=new Set(pe);$(null),Ct(te),pe.length>0&&Hn(pe),d(ct=>ct.filter(pn=>pn!==te)),h(ct=>ct.filter(pn=>!ce.has(pn))),y===te&&v(null),k&&ce.has(k)&&g(null),re();const Oe=de,lt=ge;X({do:async()=>{Ct(te),pe.length>0&&Hn(pe),await Yo(ye,te)},undo:async()=>{Rr(te),pe.length>0&&rr(pe),await Ia(ye,{id:Oe.id,type:Oe.type,position:Oe.position,data:Oe.data});for(const ct of lt)await Ds(ye,{...ct,id:ct.id})}}),Yo(ye,te).catch(ct=>{Rr(te),pe.length>0&&rr(pe),ae(),$(ct instanceof Error?ct.message:String(ct)),console.error("deleteNode failed",ct)})},[ye,_e,Se,y,k,Ct,Hn,Rr,rr,X,ae,re]),Qr=M.useCallback((te,de)=>{if(!ye||!_e)return;const ge=q??_e.map(Oe=>Oe.id),pe=pGe(ge,te,de);if(!pe)return;const ce=ge.indexOf(te);K(pe),$(null),re(),X({do:async()=>{await Jz(ye,te,de)},undo:async()=>{await Jz(ye,te,{op:"toIndex",index:ce})}}),Jz(ye,te,de).catch(Oe=>{K(null),ae(),$(Oe instanceof Error?Oe.message:String(Oe)),console.error("reorderNode failed",Oe)})},[ye,_e,q,X,ae,re]);M.useCallback(te=>{if(!ye)return;const de=Se==null?void 0:Se.find(pe=>pe.id===te);if(!de)return;$(null),jr(te),h(pe=>pe.filter(ce=>ce!==te)),k===te&&g(null),re();const ge=de;X({do:async()=>{jr(te),await Pl(ye,te)},undo:async()=>{gt(te),await Ds(ye,{...ge,id:ge.id})}}),Pl(ye,te).catch(pe=>{gt(te),ae(),$(pe instanceof Error?pe.message:String(pe)),console.error("deleteConnector failed",pe)})},[ye,Se,k,jr,gt,X,ae,re]);const ir=M.useCallback((te,de)=>{if(!ye||te.length===0&&de.length===0)return;const ge=te,pe=new Set((_e??[]).filter(vt=>vt.data.locked===!0).map(vt=>vt.id)),ce=ge.filter(vt=>!pe.has(vt)),Oe=new Set(ce),lt=ce.map(vt=>_e==null?void 0:_e.find(tn=>tn.id===vt)).filter(vt=>!!vt),ct=(Se??[]).filter(vt=>Oe.has(vt.source)||Oe.has(vt.target)),pn=new Set(ct.map(vt=>vt.id)),yr=de.map(vt=>Se==null?void 0:Se.find(tn=>tn.id===vt)).filter(vt=>!!vt).filter(vt=>!pn.has(vt.id)).filter(vt=>!(pe.has(vt.source)&&pe.has(vt.target)));if(lt.length===0&&ct.length===0&&yr.length===0)return;$(null);const gr=lt.map(vt=>vt.id),Vn=[...ct.map(vt=>vt.id),...yr.map(vt=>vt.id)];gr.length>0&&Vt(gr),Vn.length>0&&Hn(Vn);const mr=lt;d(vt=>vt.filter(tn=>!Oe.has(tn)));const ki=new Set(yr.map(vt=>vt.id));h(vt=>vt.filter(tn=>!ki.has(tn)&&!pn.has(tn))),y&&Oe.has(y)&&v(null),k&&(ki.has(k)||pn.has(k))&&g(null),re(),X({do:async()=>{gr.length>0&&Vt(gr),Vn.length>0&&Hn(Vn);for(const vt of mr)await Yo(ye,vt.id).catch(()=>{});await Promise.allSettled(yr.map(vt=>Pl(ye,vt.id)))},undo:async()=>{gr.length>0&&wn(gr),Vn.length>0&&rr(Vn);for(let vt=mr.length-1;vt>=0;vt--){const tn=mr[vt];tn&&await Ia(ye,{id:tn.id,type:tn.type,position:tn.position,data:tn.data})}for(const vt of[...ct,...yr])await Ds(ye,{...vt,id:vt.id})}});const xi=new Map;for(const vt of lt)xi.set(vt.id,ct.filter(tn=>tn.source===vt.id||tn.target===vt.id).map(tn=>tn.id));(async()=>{const vt=[];for(const xt of mr)try{await Yo(ye,xt.id)}catch(nn){Rr(xt.id);const Qn=xi.get(xt.id)??[];Qn.length>0&&rr(Qn),vt.push(nn instanceof Error?nn.message:String(nn))}const tn=await Promise.all(yr.map(async xt=>{try{return await Pl(ye,xt.id),null}catch(nn){return gt(xt.id),nn instanceof Error?nn.message:String(nn)}}));for(const xt of tn)xt!==null&&vt.push(xt);vt.length>0&&vt[0]!==void 0&&$(vt[0])})()},[ye,_e,Se,y,k,Vt,Hn,Rr,wn,gt,rr,X,re]);M.useEffect(()=>{A.current=ir},[ir]),M.useEffect(()=>{const te=de=>{if(de.key!=="Delete"&&de.key!=="Backspace"||So(document.activeElement)||document.querySelector('[data-testid="inline-edit-input"]'))return;const ge=C.current,pe=_.current;ge.length===0&&pe.length===0||(de.preventDefault(),ir(ge,pe))};return window.addEventListener("keydown",te),()=>window.removeEventListener("keydown",te)},[ir]);const{undo:rn,redo:bn,canUndo:Mn,canRedo:ei}=J;M.useEffect(()=>{const te=async de=>{if((de.metaKey||de.ctrlKey)&&de.key.toLowerCase()==="z"&&!So(document.activeElement)){if(de.preventDefault(),de.shiftKey){if(!ei)return;try{const ge=await bn();ge!=null&&ge.entry&&await ge.entry.do()}catch(ge){$(ge instanceof Error?ge.message:String(ge)),console.error("redo failed",ge)}return}if(Mn)try{const ge=await rn();ge!=null&&ge.entry&&await ge.entry.undo()}catch(ge){$(ge instanceof Error?ge.message:String(ge)),console.error("undo failed",ge)}}};return window.addEventListener("keydown",te),()=>window.removeEventListener("keydown",te)},[rn,bn,Mn,ei]);const Rn=M.useCallback((te,de)=>{if(!ye)return;const ge=_e==null?void 0:_e.find(Oe=>Oe.id===te),ce=(ge&&"name"in ge.data?ge.data.name:void 0)??"";Ce(te,{data:{name:de}}),$(null),re(),ge&&X({do:async()=>{await _n(ye,te,{name:de})},undo:async()=>{await _n(ye,te,{name:ce})},coalesceKey:`node:${te}:name`}),_n(ye,te,{name:de}).catch(Oe=>{ge&&ae(),$(Oe instanceof Error?Oe.message:String(Oe)),console.error("updateNode name failed",Oe)})},[ye,_e,Ce,X,ae,re]),pr=M.useCallback((te,de)=>{if(!ye)return;const ge=_e==null?void 0:_e.find(ce=>ce.id===te);if(!ge)return;const pe=ge.data.description??"";Ce(te,{data:{description:de}}),$(null),re(),X({do:async()=>{await _n(ye,te,{description:de})},undo:async()=>{await _n(ye,te,{description:pe})},coalesceKey:`node:${te}:description`}),_n(ye,te,{description:de}).catch(ce=>{ae(),$(ce instanceof Error?ce.message:String(ce)),console.error("updateNode description failed",ce)})},[ye,_e,Ce,X,ae,re]),Jn=M.useCallback((te,de)=>{if(!ye)return;const ge=_e==null?void 0:_e.find(ce=>ce.id===te);if(!ge)return;const pe=ge.data.detail??"";Ce(te,{data:{detail:de}}),$(null),re(),X({do:async()=>{await _n(ye,te,{detail:de})},undo:async()=>{await _n(ye,te,{detail:pe})},coalesceKey:`node:${te}:detail`}),_n(ye,te,{detail:de}).catch(ce=>{ae(),$(ce instanceof Error?ce.message:String(ce)),console.error("updateNode detail failed",ce)})},[ye,_e,Ce,X,ae,re]),br=M.useCallback((te,de,ge)=>{if(!ye)return;$(null);const pe=`node-${crypto.randomUUID()}`,ce=oee(te,ge,Sm().node),Oe={id:pe,type:"shapeNode",position:de,data:ce};Ce(pe,{id:pe,type:"shapeNode",position:de,data:ce}),re(),Ia(ye,Oe).then(({id:ct})=>{X({do:async()=>{await Ia(ye,{...Oe,id:ct})},undo:async()=>{await Yo(ye,ct)}})}).catch(ct=>{De(pe),$(ct instanceof Error?ct.message:String(ct)),console.error("createNode failed",ct)})},[ye,Ce,De,X,re]),Mr=M.useCallback((te,de)=>{if(!ye)return;$(null);const ge=`node-${crypto.randomUUID()}`,pe={icon:te,width:Pf.width,height:Pf.height},ce={id:ge,type:"iconNode",position:de,data:pe};Ce(ge,{id:ge,type:"iconNode",position:de,data:pe}),d([ge]),re(),Ia(ye,ce).then(({id:lt})=>{X({do:async()=>{await Ia(ye,{...ce,id:lt})},undo:async()=>{await Yo(ye,lt)}})}).catch(lt=>{De(ge),$(lt instanceof Error?lt.message:String(lt)),console.error("createNode (icon) failed",lt)})},[ye,Ce,De,X,re]),ar=M.useCallback(te=>{if(!ye)return;$(null);const de=`node-${crypto.randomUUID()}`,ge=`blocks/${de}.html`,pe={id:de,type:"htmlNode",position:te.position,data:{}},ce={id:de,type:"htmlNode",position:te.position,data:{htmlPath:ge}};Ce(de,ce),d([de]),re(),Ia(ye,pe).then(({id:Oe})=>{X({do:async()=>{await Ia(ye,{...pe,id:Oe})},undo:async()=>{await Yo(ye,Oe)}})}).catch(Oe=>{De(de),$(Oe instanceof Error?Oe.message:String(Oe)),console.error("createNode (htmlNode) failed",Oe)})},[ye,Ce,De,X,re]),Tr=M.useRef(new Map),Sr=M.useCallback((te,de)=>{Tr.current.set(te,de)},[]),jn=M.useCallback(te=>{Tr.current.delete(te)},[]),ci=M.useCallback(te=>{ye&&($(null),re(),_Ue({...te,demoId:ye,lastUsed:Sm().node},{upload:X4e,createNode:Ia,deleteNode:Yo,setOverride:Ce,pushUndo:X,rememberRetry:Sr,forgetRetry:jn}).catch(de=>{console.error("image-upload-flow failed",de)}))},[ye,Ce,X,re,Sr,jn]),qi=M.useCallback(te=>{if(!ye)return;const de=`node-${crypto.randomUUID()}`;ci({nodeId:de,...te})},[ye,ci]),$a=M.useCallback(te=>{const de=Tr.current.get(te);de&&ci({nodeId:te,...de})},[ci]),[zi,Wa]=M.useState({open:!1,mode:"insert"}),ma=M.useCallback((te,de)=>{Wa({open:!0,mode:te,nodeId:de})},[]),Ga=M.useCallback(()=>{Wa(te=>({...te,open:!1}))},[]),ti=M.useCallback(()=>{ma("insert")},[ma]),Ka=M.useCallback(te=>ma("replace",te),[ma]),$o=M.useCallback(te=>{if(Ywe(te),zi.mode==="replace"&&zi.nodeId){if(ye){const de=zi.nodeId,ge=_e==null?void 0:_e.find(ce=>ce.id===de),pe=(ge==null?void 0:ge.type)==="iconNode"?ge.data.icon:void 0;if(Ce(de,{data:{icon:te}}),$(null),re(),pe!==void 0){const ce=pe;X({do:async()=>{await _n(ye,de,{icon:te})},undo:async()=>{await _n(ye,de,{icon:ce})},coalesceKey:`node:${de}:icon`})}_n(ye,de,{icon:te}).catch(ce=>{De(de),pe!==void 0&&ae(),$(ce instanceof Error?ce.message:String(ce)),console.error("updateNode (icon replace) failed",ce)})}}else{const de=P.current;if(de&&ye){const ge=CUe(de,{width:window.innerWidth,height:window.innerHeight});Mr(te,ge)}}Ga()},[zi.mode,zi.nodeId,ye,_e,Ce,De,X,ae,re,Mr,Ga]),fo=M.useCallback((te,de)=>{if(!ye)return;const ge=Se==null?void 0:Se.find(ce=>ce.id===te),pe=ge==null?void 0:ge.label;at(te,{label:de}),$(null),re(),ge&&X({do:async()=>{await Ui(ye,te,{label:de})},undo:async()=>{await Ui(ye,te,{label:pe})},coalesceKey:`connector:${te}:label`}),Ui(ye,te,{label:de}).catch(ce=>{ge&&ae(),$(ce instanceof Error?ce.message:String(ce)),console.error("updateConnector label failed",ce)})},[ye,Se,at,X,ae,re]),gi=M.useCallback((te,de,ge)=>{if(!ye)return;const pe=`conn-${crypto.randomUUID()}`,ce=ge==null?void 0:ge.targetPin,Oe=Sm().connector,lt={id:pe,source:te,target:de,sourceHandleAutoPicked:!0,targetHandleAutoPicked:!0,...ce?{targetPin:ce}:{},...Oe,kind:"default"},ct={id:pe,source:te,target:de,sourceHandleAutoPicked:!0,targetHandleAutoPicked:!0,...ce?{targetPin:ce}:{},...Oe,kind:"default"};at(pe,lt),$(null),re(),Ds(ye,ct).then(({id:pn})=>{X({do:async()=>{await Ds(ye,{...ct,id:pn})},undo:async()=>{await Pl(ye,pn)}})}).catch(pn=>{ft(pe),$(pn instanceof Error?pn.message:String(pn)),console.error("createConnector failed",pn)})},[ye,at,ft,X,re]),po=M.useCallback(({sourceNodeId:te,position:de,shape:ge})=>{if(!ye)return;$(null);const pe=`node-${crypto.randomUUID()}`,ce=`conn-${crypto.randomUUID()}`,Oe=sD[ge],lt=Sm(),ct=oee(ge,Oe,lt.node),pn={id:pe,type:"shapeNode",position:de,data:ct},yr={id:ce,source:te,target:pe,sourceHandleAutoPicked:!0,targetHandleAutoPicked:!0,...lt.connector,kind:"default"};Ce(pe,{id:pe,type:"shapeNode",position:de,data:ct}),at(ce,yr),w(pe),re(),(async()=>{try{await Ia(ye,pn),await Ds(ye,yr),X({do:async()=>{await Ia(ye,pn),await Ds(ye,yr)},undo:async()=>{ft(ce),De(pe),await Pl(ye,ce).catch(()=>{}),await Yo(ye,pe).catch(()=>{})}})}catch(Vn){De(pe),ft(ce),$(Vn instanceof Error?Vn.message:String(Vn)),console.error("createAndConnectFromPane failed",Vn)}})()},[ye,Ce,De,at,ft,X,re]),Dr=M.useRef(null),[li,va]=M.useState(!1),ni=M.useCallback(te=>{if(!_e)return;const de=new Set(te),ge=_e.filter(ce=>de.has(ce.id));if(ge.length===0)return;const pe=(Se??[]).filter(ce=>de.has(ce.source)&&de.has(ce.target));Dr.current=JSON.parse(JSON.stringify({nodes:ge,connectors:pe})),va(!0)},[_e,Se]),on=M.useCallback(te=>{if(!ye)return;const de=Dr.current;if(!de||de.nodes.length===0)return;const{newNodes:ge,newConnectors:pe}=AVe({nodes:de.nodes,connectors:de.connectors,flowPos:te,nodeIdGen:()=>`node-${crypto.randomUUID()}`,connectorIdGen:()=>`conn-${crypto.randomUUID()}`});for(const ce of ge)Ce(ce.id,ce);for(const ce of pe)at(ce.id,ce);d(ge.map(ce=>ce.id)),h(pe.map(ce=>ce.id)),$(null),re(),(async()=>{try{for(const ce of ge)await Ia(ye,{id:ce.id,type:ce.type,position:ce.position,data:ce.data});for(const ce of pe)await Ds(ye,ce);X({do:async()=>{for(const ce of ge)await Ia(ye,{id:ce.id,type:ce.type,position:ce.position,data:ce.data});for(const ce of pe)await Ds(ye,ce)},undo:async()=>{await Promise.allSettled(pe.map(ce=>Pl(ye,ce.id))),await Promise.allSettled(ge.map(ce=>Yo(ye,ce.id)))}})}catch(ce){for(const Oe of ge)De(Oe.id);for(const Oe of pe)ft(Oe.id);$(ce instanceof Error?ce.message:String(ce)),console.error("paste failed",ce)}})()},[ye,Ce,De,at,ft,re,X]);M.useEffect(()=>{const te=de=>{const ge=Uwe({event:de,isEditableActive:So(document.activeElement),hasNodes:!!_e&&_e.length>0,hasConnectors:!!Se&&Se.length>0,selectedIds:C.current,hasClipboard:!!Dr.current});if(ge.type!=="noop"&&!(ge.type==="copy"||ge.type==="paste")){if(de.preventDefault(),ge.type==="selectAll"){d((_e??[]).map(pe=>pe.id)),h((Se??[]).map(pe=>pe.id));return}ni([...ge.ids]),on(null)}};return window.addEventListener("keydown",te),()=>window.removeEventListener("keydown",te)},[_e,Se,ni,on]),M.useEffect(()=>{const te=de=>{const ge=Bwe(de);if(!ge||So(document.activeElement))return;const pe=C.current;if(pe.length===0)return;const ce=D.overrides,Oe=(_e??[]).map(ct=>{var yr;const pn=((yr=ce[ct.id])==null?void 0:yr.position)??ct.position;return{id:ct.id,position:pn}}),lt=Vwe(ge,pe,Oe);if(lt.length!==0)if(de.preventDefault(),lt.length===1){const ct=lt[0];ct&&nt(ct.id,ct.position)}else rt(lt)};return window.addEventListener("keydown",te),()=>window.removeEventListener("keydown",te)},[_e,D.overrides,nt,rt]),M.useEffect(()=>{const te=de=>{const ge=Hwe(de);if(!ge||So(document.activeElement))return;de.preventDefault();const pe=P.current;pe&&(ge==="fit"?pe.fitView({padding:.2,duration:200}):ge==="in"?pe.zoomIn({duration:150}):pe.zoomOut({duration:150}))};return window.addEventListener("keydown",te),()=>window.removeEventListener("keydown",te)},[]);const mi=M.useCallback(te=>{if(!ye||!_e)return;const de=D.overrides,ge=P.current,pe=te==="selection"?new Set(C.current):null,ce=pe?_e.filter(xt=>pe.has(xt.id)):_e;if(ce.length<2)return;const Oe=new Set(ce.map(xt=>xt.id)),lt=(Se??[]).filter(xt=>Oe.has(xt.source)&&Oe.has(xt.target)),ct=ce.map(xt=>{var We;const nn=((We=de[xt.id])==null?void 0:We.position)??xt.position,Qn=ge==null?void 0:ge.getInternalNode(xt.id),ri=Qn==null?void 0:Qn.measured,ea=xt.data,ve=(ri==null?void 0:ri.width)??ea.width??200,be=(ri==null?void 0:ri.height)??ea.height??120;return{id:xt.id,width:ve,height:be,position:nn}}),pn=lt.map(xt=>({source:xt.source,target:xt.target})),yr=IVe(ct,pn);let gr=Number.POSITIVE_INFINITY,Vn=Number.POSITIVE_INFINITY,mr=Number.POSITIVE_INFINITY,ki=Number.POSITIVE_INFINITY;for(const xt of ct){xt.position.x<gr&&(gr=xt.position.x),xt.position.y<Vn&&(Vn=xt.position.y);const nn=yr.get(xt.id);nn&&(nn.x<mr&&(mr=nn.x),nn.y<ki&&(ki=nn.y))}const xi=Number.isFinite(gr)&&Number.isFinite(mr)?gr-mr:0,vt=Number.isFinite(Vn)&&Number.isFinite(ki)?Vn-ki:0,tn=[];for(const xt of ct){const nn=yr.get(xt.id);if(!nn)continue;const Qn={x:nn.x+xi,y:nn.y+vt},ri=Qn.x-xt.position.x,ea=Qn.y-xt.position.y;Math.abs(ri)<1&&Math.abs(ea)<1||tn.push({id:xt.id,prev:xt.position,next:Qn})}if(tn.length!==0){$(null);for(const xt of tn)Ce(xt.id,{position:xt.next});re(),X({do:async()=>{await Promise.allSettled(tn.map(xt=>Ts(ye,xt.id,xt.next)))},undo:async()=>{await Promise.allSettled(tn.map(xt=>Ts(ye,xt.id,xt.prev)))}}),Promise.all(tn.map(async xt=>{try{return await Ts(ye,xt.id,xt.next),null}catch(nn){return De(xt.id),nn instanceof Error?nn.message:String(nn)}})).then(xt=>{const nn=xt.filter(ri=>ri!==null),Qn=nn[0];Qn&&($(nn.length===1?Qn:`${nn.length} node updates failed (first: ${Qn})`),console.error("Tidy: some updateNodePosition calls failed",nn))})}},[ye,_e,Se,D.overrides,Ce,De,X,re]);M.useEffect(()=>{const te=de=>{if(!(de.metaKey||de.ctrlKey)||!de.shiftKey||de.altKey||de.key.toLowerCase()!=="l"||So(document.activeElement))return;de.preventDefault();const ge=C.current.length>0?"selection":"all";mi(ge)};return window.addEventListener("keydown",te),()=>window.removeEventListener("keydown",te)},[mi]);const Tn=M.useCallback(()=>{const te=C.current.length>0?"selection":"all";mi(te)},[mi]);M.useEffect(()=>{const te=de=>{if(So(document.activeElement)||document.querySelector('[data-testid="inline-edit-input"]'))return;const ge=$we(de);if(ge===null)return;const pe=ge==="select"?null:ge;if(F.current===pe){V(null);return}V(pe)};return window.addEventListener("keydown",te),()=>window.removeEventListener("keydown",te)},[]),M.useEffect(()=>{const te=de=>{de.key==="Escape"&&(So(document.activeElement)||document.querySelector('[data-testid="inline-edit-input"]')||(C.current.length>0&&d([]),_.current.length>0&&h([]),F.current!==null&&V(null)))};return window.addEventListener("keydown",te),()=>window.removeEventListener("keydown",te)},[]),M.useEffect(()=>{const te=de=>{if(de.key.toLowerCase()!=="f"||de.metaKey||de.ctrlKey||de.shiftKey||de.altKey||So(document.activeElement)||document.querySelector('[data-testid="inline-edit-input"]'))return;const ge=C.current;if(ge.length===0)return;const pe=P.current;pe&&pe.fitView({nodes:ge.map(ce=>({id:ce})),padding:.2,duration:200})};return window.addEventListener("keydown",te),()=>window.removeEventListener("keydown",te)},[]),M.useEffect(()=>{const te=de=>{if(de.key!=="1"||de.metaKey||de.ctrlKey||de.shiftKey||de.altKey||So(document.activeElement)||document.querySelector('[data-testid="inline-edit-input"]'))return;const ge=P.current;if(!ge)return;const{x:pe,y:ce}=ge.getViewport();ge.setViewport({x:pe,y:ce,zoom:1},{duration:150})};return window.addEventListener("keydown",te),()=>window.removeEventListener("keydown",te)},[]);const or=M.useCallback(te=>{var de,ge,pe;switch(te){case"tool.select":V(null);return;case"tool.rectangle":V("rectangle");return;case"tool.ellipse":V("ellipse");return;case"tool.text":V("text");return;case"tool.sticky":V("sticky");return;case"tool.database":V("database");return;case"edit.undo":{if(!Mn)return;(async()=>{try{const ce=await rn();ce!=null&&ce.entry&&await ce.entry.undo()}catch(ce){$(ce instanceof Error?ce.message:String(ce)),console.error("undo failed",ce)}})();return}case"edit.redo":{if(!ei)return;(async()=>{try{const ce=await bn();ce!=null&&ce.entry&&await ce.entry.do()}catch(ce){$(ce instanceof Error?ce.message:String(ce)),console.error("redo failed",ce)}})();return}case"edit.copy":{const ce=C.current;if(ce.length===0)return;ni([...ce]);return}case"edit.paste":on(null);return;case"edit.duplicate":{const ce=C.current;if(ce.length===0)return;ni([...ce]),on(null);return}case"edit.delete":{const ce=C.current,Oe=_.current;if(ce.length===0&&Oe.length===0)return;ir([...ce],[...Oe]);return}case"edit.selectAll":d((_e??[]).map(ce=>ce.id)),h((Se??[]).map(ce=>ce.id));return;case"view.fit":{const ce=P.current;if(!ce)return;ce.fitView({padding:.2,duration:200});return}case"view.zoomIn":{const ce=P.current;if(!ce)return;ce.zoomIn({duration:150});return}case"view.zoomOut":{const ce=P.current;if(!ce)return;ce.zoomOut({duration:150});return}case"view.zoom100":{const ce=P.current;if(!ce)return;const{x:Oe,y:lt}=ce.getViewport();ce.setViewport({x:Oe,y:lt,zoom:1},{duration:150});return}case"view.zoomToSelection":{const ce=C.current;if(ce.length===0)return;const Oe=P.current;if(!Oe)return;Oe.fitView({nodes:ce.map(lt=>({id:lt})),padding:.2,duration:200});return}case"layout.tidy":{const ce=C.current.length>0?"selection":"all";mi(ce);return}case"selection.deselect":C.current.length>0&&d([]),_.current.length>0&&h([]),F.current!==null&&V(null);return;case"help.commandPalette":N(!0);return;case"export.pdf":{(de=j.current)==null||de.call(j);return}case"export.png":{(ge=O.current)==null||ge.call(O);return}case"session.reset":{(pe=T.current)==null||pe.call(T);return}}},[Mn,ei,rn,bn,ni,on,ir,_e,Se,mi]);M.useEffect(()=>{const te=de=>{(de.metaKey||de.ctrlKey)&&(de.shiftKey||de.altKey||de.key.toLowerCase()==="p"&&(de.preventDefault(),!So(document.activeElement)&&or("help.commandPalette")))};return window.addEventListener("keydown",te),()=>window.removeEventListener("keydown",te)},[or]);const sr=M.useCallback(async()=>{const te=P.current;if(!te)return null;const de=document.querySelector(".react-flow__viewport");if(!de)return null;const ge=te.getViewport();try{return await te.fitView({duration:0,padding:.1}),await new Promise(pe=>requestAnimationFrame(()=>pe())),await MUe(de)}finally{te.setViewport(ge,{duration:0})}},[]),Dn=M.useCallback(te=>{var ge;const de=((ge=n==null?void 0:n.demo)==null?void 0:ge.name)??(n==null?void 0:n.name)??e??"demo";return`${fGe(de)}.${te}`},[n,e]),qr=M.useCallback(async()=>{$(null);try{const te=await sr();if(!te)return;SUe(te.dataUrl,Dn("png"))}catch(te){$(te instanceof Error?te.message:String(te))}},[sr,Dn]),zr=M.useCallback(async()=>{$(null);try{const te=await sr();if(!te)return;const de=te.width>te.height?"landscape":"portrait",ge=new At({orientation:de,unit:"px",format:[te.width,te.height],hotfixes:["px_scaling"]});ge.addImage(te.dataUrl,"PNG",0,0,te.width,te.height),ge.save(Dn("pdf"))}catch(te){$(te instanceof Error?te.message:String(te))}},[sr,Dn]);M.useEffect(()=>{j.current=zr},[zr]),M.useEffect(()=>{O.current=qr},[qr]),M.useEffect(()=>{T.current=c??null},[c]);const Sn=M.useCallback((te,de)=>{if(!ye)return;const ge=Se==null?void 0:Se.find(Oe=>Oe.id===te),pe=ge?{source:ge.source,target:ge.target,sourceHandle:ge.sourceHandle,targetHandle:ge.targetHandle,sourceHandleAutoPicked:ge.sourceHandleAutoPicked,targetHandleAutoPicked:ge.targetHandleAutoPicked,sourcePin:ge.sourcePin??null,targetPin:ge.targetPin??null}:null,ce={...de.source!==void 0?{source:de.source}:{},...de.target!==void 0?{target:de.target}:{},...de.sourceHandle!==void 0?{sourceHandle:de.sourceHandle===null?void 0:de.sourceHandle}:{},...de.targetHandle!==void 0?{targetHandle:de.targetHandle===null?void 0:de.targetHandle}:{},...de.sourceHandleAutoPicked!==void 0?{sourceHandleAutoPicked:de.sourceHandleAutoPicked}:{},...de.targetHandleAutoPicked!==void 0?{targetHandleAutoPicked:de.targetHandleAutoPicked}:{},...de.sourcePin!==void 0?{sourcePin:de.sourcePin===null?void 0:de.sourcePin}:{},...de.targetPin!==void 0?{targetPin:de.targetPin===null?void 0:de.targetPin}:{}};if(at(te,ce),$(null),re(),pe){const Oe=pe;X({do:async()=>{await Ui(ye,te,de)},undo:async()=>{await Ui(ye,te,Oe)},coalesceKey:`connector:${te}:reconnect`})}Ui(ye,te,de).catch(Oe=>{ft(te),pe&&ae(),$(Oe instanceof Error?Oe.message:String(Oe)),console.error("updateConnector reconnect failed",Oe)})},[ye,Se,at,ft,X,ae,re]),Za=M.useCallback((te,de,ge)=>{if(!ye)return;const pe=Se==null?void 0:Se.find(lt=>lt.id===te),ce=pe?de==="source"?pe.sourcePin:pe.targetPin:void 0,Oe=de==="source"?"sourcePin":"targetPin";if(at(te,{[Oe]:ge}),$(null),re(),pe){const lt={[Oe]:ce??null};X({do:async()=>{await Ui(ye,te,{[Oe]:ge})},undo:async()=>{await Ui(ye,te,lt)},coalesceKey:`connector:${te}:${Oe}`})}Ui(ye,te,{[Oe]:ge}).catch(lt=>{ft(te),pe&&ae(),$(lt instanceof Error?lt.message:String(lt)),console.error("updateConnector pin failed",lt)})},[ye,Se,at,ft,X,ae,re]),yo=M.useCallback((te,de)=>{if(!ye)return;const ge=Se==null?void 0:Se.find(Oe=>Oe.id===te),pe=ge?de==="source"?ge.sourcePin:ge.targetPin:void 0;if(!pe)return;const ce=de==="source"?"sourcePin":"targetPin";at(te,{[ce]:void 0}),$(null),re(),X({do:async()=>{await Ui(ye,te,{[ce]:null})},undo:async()=>{await Ui(ye,te,{[ce]:pe})}}),Ui(ye,te,{[ce]:null}).catch(Oe=>{ft(te),ae(),$(Oe instanceof Error?Oe.message:String(Oe)),console.error("updateConnector unpin failed",Oe)})},[ye,Se,at,ft,X,ae,re]),zt=n==null?void 0:n.demo,go=D.overrides,Or=I.overrides,vi=R.ids,Ji=U.ids,Wo=M.useMemo(()=>{if(!y||vi.has(y))return null;const te=zt==null?void 0:zt.nodes.find(pe=>pe.id===y);if(!te)return null;const de=go[y];if(!de)return te;const ge=de.data?{...te.data,...de.data}:te.data;return{...te,...de,data:ge}},[zt,y,go,vi]),Ls=M.useMemo(()=>{if(!k||Ji.has(k))return null;const te=zt==null?void 0:zt.connectors.find(ge=>ge.id===k);if(!te)return null;const de=Or[k];return de?{...te,...de}:te},[zt,k,Or,Ji]),ml=M.useMemo(()=>{if(!zt||u.length===0)return[];const te=new Map(zt.nodes.map(ge=>[ge.id,ge])),de=[];for(const ge of u){const pe=te.get(ge);if(!pe)continue;const ce=go[ge];if(!ce){de.push(pe);continue}const Oe=ce.data?{...pe.data,...ce.data}:pe.data;de.push({...pe,...ce,data:Oe})}return de},[zt,u,go]),vl=M.useMemo(()=>{if(!zt||f.length===0)return[];const te=new Map(zt.connectors.map(ge=>[ge.id,ge])),de=[];for(const ge of f){const pe=te.get(ge);if(!pe)continue;const ce=Or[ge];de.push(ce?{...pe,...ce}:pe)}return de},[zt,f,Or]),dc=M.useMemo(()=>{if(!zt)return null;if(!q)return zt.nodes;const te=new Map(zt.nodes.map(pe=>[pe.id,pe])),de=[],ge=new Set;for(const pe of q){const ce=te.get(pe);ce&&(de.push(ce),ge.add(pe))}for(const pe of zt.nodes)ge.has(pe.id)||de.push(pe);return de},[zt,q]),ka=M.useMemo(()=>{const te=dc??(zt==null?void 0:zt.nodes)??null;return te?vi.size===0?te:te.filter(de=>!vi.has(de.id)):null},[dc,zt,vi]),Is=M.useMemo(()=>{const te=(zt==null?void 0:zt.connectors)??null;return te?Ji.size===0&&vi.size===0?te:te.filter(de=>!Ji.has(de.id)&&!vi.has(de.source)&&!vi.has(de.target)):null},[zt,Ji,vi]);if(!l)return x.jsxs("div",{className:"flex h-full w-full flex-col items-center justify-center gap-2 bg-background p-6 text-center",children:[x.jsxs("p",{className:"text-sm font-medium",children:["Unknown demo: ",e]}),x.jsx("p",{className:"text-xs text-muted-foreground",children:"The slug may have been removed. Re-register from the project repo to bring it back."})]});if(r&&!n)return x.jsx("div",{className:"flex h-full w-full items-center justify-center text-sm text-muted-foreground",children:"Loading demo…"});y&&i[y],y&&a[y];const Qi=y?o[y]:void 0;return x.jsxs("div",{className:"relative h-full w-full",children:[n&&!n.valid?x.jsxs("div",{"data-testid":"demo-error-banner",className:"absolute inset-x-0 top-0 z-10 border-b border-rose-500/40 bg-rose-50 px-4 py-2 text-xs text-rose-900 shadow-sm dark:bg-rose-950/40 dark:text-rose-100",children:[x.jsx("span",{className:"font-medium uppercase tracking-wide",children:"Invalid demo: "}),x.jsx("span",{className:"font-mono",children:n.error})]}):null,x.jsxs("div",{className:"pointer-events-auto absolute right-3 top-3 z-20 flex items-center gap-1",children:[c?x.jsx(NDe,{onRestartDemo:c}):null,x.jsx(dqe,{onDownloadPdf:ye?zr:void 0,onDownloadPng:ye?qr:void 0,onExportToCloud:ye?()=>Me(!0):void 0})]}),zt?x.jsx(c_e,{projectId:ye??void 0,nodes:ka??zt.nodes,connectors:Is??zt.connectors,selectedNodeIds:u,selectedConnectorIds:f,onSelectionChange:ee,runs:i,statusByNode:o,onPlayNode:s,nodeOverrides:go,connectorOverrides:Or,onNodePositionChange:nt,onNodePositionsChange:rt,onNodeResize:Pt,onMultiResize:it,onNodeNameChange:Rn,onNodeDescriptionChange:pr,onConnectorLabelChange:fo,onCreateShapeNode:br,onCreateImageFromFile:ye?qi:void 0,onRetryImageUpload:ye?$a:void 0,onCreateHtmlNode:ye?ar:void 0,iconPickerOpen:zi.open,onOpenIconPicker:ye?ti:void 0,onCloseIconPicker:ye?Ga:void 0,onPickIcon:ye?$o:void 0,onRequestIconReplace:ye?Ka:void 0,onCreateConnector:gi,onReconnectConnector:Sn,onPinEndpoint:ye?Za:void 0,onUnpinEndpoint:ye?yo:void 0,onReorderNode:Qr,onDeleteNode:Di,onCopyNode:te=>ni([te]),onPasteAt:on,onCopySelection:ye?ni:void 0,onPasteSelection:ye?()=>on(null):void 0,onToggleNodeLock:ye?un:void 0,hasClipboard:li,selectedNodes:ml,selectedConnectors:vl,onStyleNode:Lt,onStyleNodePreview:Ot,onStyleNodes:Nt,onStyleNodesPreview:ht,onStyleConnector:jt,onStyleConnectorPreview:Ht,onRfInit:G,onTidy:_e?Tn:void 0,onNodeClick:qe,onPaneClick:Ke,onCreateAndConnectFromPane:po,pendingEditNodeId:S,activeShape:B,onSelectShape:V}):x.jsx("div",{className:"flex h-full w-full items-center justify-center text-sm text-muted-foreground",children:"No demo data yet."}),Z?x.jsxs("div",{"data-testid":"edit-error-banner",className:"absolute inset-x-0 bottom-4 z-20 mx-auto w-fit max-w-[80%] rounded-md border border-rose-500/50 bg-rose-50 px-3 py-2 text-xs text-rose-900 shadow-md dark:bg-rose-950/60 dark:text-rose-100",children:[x.jsx("span",{className:"font-medium",children:"Couldn't save change: "}),x.jsx("span",{className:"font-mono",children:Z}),x.jsx("button",{type:"button",className:"ml-3 underline underline-offset-2",onClick:()=>$(null),children:"Dismiss"})]}):null,x.jsx(Zwe,{open:ie,onOpenChange:N,runCommand:or,ctx:{hasSelection:u.length>0||f.length>0,canUndo:Mn,canRedo:ei,hasClipboard:li,canExportDemo:!!ye,canResetSession:!!c}}),x.jsx(sDe,{demoId:(n==null?void 0:n.id)??null,node:Wo,connector:Ls,statusReport:Qi,onNameChange:Rn,onDescriptionChange:pr,onDetailChange:Jn,onClose:()=>{v(null),g(null)}}),ye?x.jsx(PDe,{open:wt,onOpenChange:Me,projectId:ye,onCapturePreview:async()=>{const te=await sr();return te==null?void 0:te.dataUrl}}):null]})}const Hse="npx seeflow register --path .";function gGe(){const[e,t]=M.useState(!1),n=async()=>{try{await navigator.clipboard.writeText(Hse),t(!0),setTimeout(()=>t(!1),1200)}catch(r){console.error("[empty-state] copy failed",r)}};return x.jsx("div",{"data-testid":"seeflow-empty-state",className:"flex h-full w-full items-center justify-center bg-background p-6",children:x.jsxs("div",{className:"flex max-w-lg flex-col items-center gap-6 text-center",children:[x.jsx("div",{className:"flex h-12 w-12 items-center justify-center rounded-full bg-muted",children:x.jsx(Ep,{className:"h-6 w-6 text-muted-foreground"})}),x.jsxs("div",{className:"space-y-2",children:[x.jsx("h1",{className:"text-2xl font-semibold tracking-tight text-foreground",children:"No demos registered yet"}),x.jsxs("p",{className:"text-sm text-muted-foreground",children:["Point SeeFlow at any folder containing a"," ",x.jsx("code",{className:"rounded bg-muted px-1.5 py-0.5 text-xs",children:".seeflow/seeflow.json"})," ","file and it'll appear here."]})]}),x.jsxs("div",{className:"flex w-full items-center gap-2 rounded-md border border-border bg-card px-3 py-2 font-mono text-sm",children:[x.jsx("span",{className:"text-muted-foreground select-none",children:"$"}),x.jsx("code",{className:"flex-1 truncate text-left",children:Hse}),x.jsx(oi,{type:"button",variant:"ghost",size:"sm",onClick:n,"aria-label":"Copy register command",children:e?x.jsx(Jc,{className:"h-4 w-4"}):x.jsx(Y2,{className:"h-4 w-4"})})]})]})})}function mGe({demos:e}){return e.length===0?x.jsx(gGe,{}):x.jsx("div",{className:"flex h-full w-full items-start justify-center overflow-y-auto bg-background p-8",children:x.jsxs("div",{"data-testid":"studio-home-picker",className:"flex w-full max-w-2xl flex-col gap-6 pt-8",children:[x.jsxs("div",{className:"space-y-1",children:[x.jsx("h1",{className:"text-2xl font-semibold tracking-tight",children:"Open a demo"}),x.jsxs("p",{className:"text-sm text-muted-foreground",children:[e.length," demos registered — pick one to load its canvas."]})]}),x.jsx("ul",{className:"flex flex-col gap-2",children:e.map(t=>x.jsx("li",{children:x.jsxs("button",{type:"button",onClick:()=>wf(`/d/${t.slug}`),"data-testid":`studio-home-demo-${t.slug}`,className:"flex w-full flex-col items-start gap-0.5 rounded-lg border border-border bg-card px-4 py-3 text-left transition-colors hover:border-input",style:{boxShadow:"var(--shadow-card)"},children:[x.jsx("span",{className:"text-sm font-medium",children:t.name}),x.jsx("span",{className:"truncate text-xs text-muted-foreground",children:t.repoPath})]})},t.id))})]})})}const vGe=e=>{if(!e.startsWith("/d/"))return null;const t=e.slice(3);return t.length>0?decodeURIComponent(t):null};function kGe(){const e=Xxe(),{demos:t,refresh:n}=Mwe(),r=vGe(e),i=r?(t??[]).find(A=>A.slug===r):void 0,a=(i==null?void 0:i.id)??null,{detail:o,loading:s,refresh:c}=bwe(a),{runs:l,apply:u}=_we(a),{events:d,apply:f}=Iwe(a),{statusByNode:h,apply:y,reset:v}=Rwe(a),k=M.useCallback(()=>{v(),c(),n()},[c,n,v]),g=M.useCallback(A=>{u(A),f(A),y(A)},[u,f,y]);jwe(a,{onReload:k,onEvent:g});const S=M.useCallback(async()=>{if(a)try{await G4e(a)}catch(A){console.error("Failed to restart demo:",A)}},[a]),w=M.useCallback(A=>{wJ(A.id),n()},[n]),C=M.useCallback(async A=>{await n(),a===A&&wf("/")},[n,a]);M.useEffect(()=>{if(e!=="/"||t===null)return;const A=Dwe(t,Twe());A&&wf(`/d/${A.slug}`)},[e,t]),M.useEffect(()=>{i&&wJ(i.id)},[i]);const _=M.useCallback(A=>{a&&Y4e(a,A).catch(j=>{u({type:"node:error",nodeId:A,message:j instanceof Error?j.message:String(j),ts:Date.now()})})},[a,u]);return t===null?x.jsx("div",{className:"flex h-full w-full items-center justify-center bg-background text-sm text-muted-foreground",children:"Loading…"}):x.jsx(Tp,{delayDuration:150,children:x.jsxs("div",{className:"flex h-full w-full flex-col bg-background text-foreground",children:[x.jsx(Jxe,{demos:t,currentSlug:r??void 0,onProjectCreated:w,onProjectUnregistered:C}),x.jsx("main",{className:"min-h-0 flex-1",children:r?x.jsx(yGe,{slug:r,demos:t,detail:o,loading:s,runs:l,nodeEvents:d,statusByNode:h,onPlayNode:_,onRestartDemo:a?S:void 0}):x.jsx(mGe,{demos:t})})]})})}const dge=document.getElementById("root");if(!dge)throw new Error("Root element #root not found");n$.createRoot(dge).render(x.jsx(as.StrictMode,{children:x.jsx(kGe,{})}));export{kn as _,Fc as c,Rf as g};