@equinor/fusion-framework-cli 10.7.4-next-c88655f3c93bff52499b1301c9a009301f818f5a → 10.7.4

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.
@@ -40,10 +40,10 @@ Error generating stack: `+w.message+`
40
40
  `+w.stack}return{value:s,source:l,stack:y,digest:null}}function cy(s,l,f){return{value:s,source:null,stack:f??null,digest:l??null}}function ly(s,l){try{console.error(l.value)}catch(f){setTimeout(function(){throw f})}}var NL=typeof WeakMap=="function"?WeakMap:Map;function N7(s,l,f){f=zs(-1,f),f.tag=3,f.payload={element:null};var g=l.value;return f.callback=function(){E0||(E0=!0,ky=g),ly(s,l)},f}function D7(s,l,f){f=zs(-1,f),f.tag=3;var g=s.type.getDerivedStateFromError;if(typeof g=="function"){var y=l.value;f.payload=function(){return g(y)},f.callback=function(){ly(s,l)}}var w=s.stateNode;return w!==null&&typeof w.componentDidCatch=="function"&&(f.callback=function(){ly(s,l),typeof g!="function"&&(Kc===null?Kc=new Set([this]):Kc.add(this));var S=l.stack;this.componentDidCatch(l.value,{componentStack:S!==null?S:""})}),f}function V7(s,l,f){var g=s.pingCache;if(g===null){g=s.pingCache=new NL;var y=new Set;g.set(l,y)}else y=g.get(l),y===void 0&&(y=new Set,g.set(l,y));y.has(f)||(y.add(f),s=XL.bind(null,s,l,f),l.then(s,s))}function F7(s){do{var l;if((l=s.tag===13)&&(l=s.memoizedState,l=l!==null?l.dehydrated!==null:!0),l)return s;s=s.return}while(s!==null);return null}function z7(s,l,f,g,y){return(s.mode&1)===0?(s===l?s.flags|=65536:(s.flags|=128,f.flags|=131072,f.flags&=-52805,f.tag===1&&(f.alternate===null?f.tag=17:(l=zs(-1,1),l.tag=2,Bc(f,l,1))),f.lanes|=1),s):(s.flags|=65536,s.lanes=y,s)}var DL=O.ReactCurrentOwner,Bi=!1;function Ai(s,l,f,g){l.child=s===null?c7(l,null,f,g):vh(l,s.child,f,g)}function j7(s,l,f,g,y){f=f.render;var w=l.ref;return _h(l,y),g=ey(s,l,f,g,w,y),f=ty(),s!==null&&!Bi?(l.updateQueue=s.updateQueue,l.flags&=-2053,s.lanes&=~y,js(s,l,y)):(zr&&f&&H5(l),l.flags|=1,Ai(s,l,g,y),l.child)}function U7(s,l,f,g,y){if(s===null){var w=f.type;return typeof w=="function"&&!Py(w)&&w.defaultProps===void 0&&f.compare===null&&f.defaultProps===void 0?(l.tag=15,l.type=w,B7(s,l,w,g,y)):(s=P0(f.type,null,g,l,l.mode,y),s.ref=l.ref,s.return=l,l.child=s)}if(w=s.child,(s.lanes&y)===0){var S=w.memoizedProps;if(f=f.compare,f=f!==null?f:E1,f(S,g)&&s.ref===l.ref)return js(s,l,y)}return l.flags|=1,s=Qc(w,g),s.ref=l.ref,s.return=l,l.child=s}function B7(s,l,f,g,y){if(s!==null){var w=s.memoizedProps;if(E1(w,g)&&s.ref===l.ref)if(Bi=!1,l.pendingProps=g=w,(s.lanes&y)!==0)(s.flags&131072)!==0&&(Bi=!0);else return l.lanes=s.lanes,js(s,l,y)}return dy(s,l,f,g,y)}function q7(s,l,f){var g=l.pendingProps,y=g.children,w=s!==null?s.memoizedState:null;if(g.mode==="hidden")if((l.mode&1)===0)l.memoizedState={baseLanes:0,cachePool:null,transitions:null},$r(Ch,go),go|=f;else{if((f&1073741824)===0)return s=w!==null?w.baseLanes|f:f,l.lanes=l.childLanes=1073741824,l.memoizedState={baseLanes:s,cachePool:null,transitions:null},l.updateQueue=null,$r(Ch,go),go|=s,null;l.memoizedState={baseLanes:0,cachePool:null,transitions:null},g=w!==null?w.baseLanes:f,$r(Ch,go),go|=g}else w!==null?(g=w.baseLanes|f,l.memoizedState=null):g=f,$r(Ch,go),go|=g;return Ai(s,l,y,f),l.child}function K7(s,l){var f=l.ref;(s===null&&f!==null||s!==null&&s.ref!==f)&&(l.flags|=512,l.flags|=2097152)}function dy(s,l,f,g,y){var w=Ui(f)?fd:ai.current;return w=fh(l,w),_h(l,y),f=ey(s,l,f,g,w,y),g=ty(),s!==null&&!Bi?(l.updateQueue=s.updateQueue,l.flags&=-2053,s.lanes&=~y,js(s,l,y)):(zr&&g&&H5(l),l.flags|=1,Ai(s,l,f,y),l.child)}function G7(s,l,f,g,y){if(Ui(f)){var w=!0;r0(l)}else w=!1;if(_h(l,y),l.stateNode===null)b0(s,l),L7(l,f,g),sy(l,f,g,y),g=!0;else if(s===null){var S=l.stateNode,H=l.memoizedProps;S.props=H;var F=S.context,ne=f.contextType;typeof ne=="object"&&ne!==null?ne=jo(ne):(ne=Ui(f)?fd:ai.current,ne=fh(l,ne));var ve=f.getDerivedStateFromProps,_e=typeof ve=="function"||typeof S.getSnapshotBeforeUpdate=="function";_e||typeof S.UNSAFE_componentWillReceiveProps!="function"&&typeof S.componentWillReceiveProps!="function"||(H!==g||F!==ne)&&H7(l,S,g,ne),Uc=!1;var ge=l.memoizedState;S.state=ge,u0(l,g,S,y),F=l.memoizedState,H!==g||ge!==F||ji.current||Uc?(typeof ve=="function"&&(ay(l,f,ve,g),F=l.memoizedState),(H=Uc||Z7(l,f,H,g,ge,F,ne))?(_e||typeof S.UNSAFE_componentWillMount!="function"&&typeof S.componentWillMount!="function"||(typeof S.componentWillMount=="function"&&S.componentWillMount(),typeof S.UNSAFE_componentWillMount=="function"&&S.UNSAFE_componentWillMount()),typeof S.componentDidMount=="function"&&(l.flags|=4194308)):(typeof S.componentDidMount=="function"&&(l.flags|=4194308),l.memoizedProps=g,l.memoizedState=F),S.props=g,S.state=F,S.context=ne,g=H):(typeof S.componentDidMount=="function"&&(l.flags|=4194308),g=!1)}else{S=l.stateNode,d7(s,l),H=l.memoizedProps,ne=l.type===l.elementType?H:Ca(l.type,H),S.props=ne,_e=l.pendingProps,ge=S.context,F=f.contextType,typeof F=="object"&&F!==null?F=jo(F):(F=Ui(f)?fd:ai.current,F=fh(l,F));var je=f.getDerivedStateFromProps;(ve=typeof je=="function"||typeof S.getSnapshotBeforeUpdate=="function")||typeof S.UNSAFE_componentWillReceiveProps!="function"&&typeof S.componentWillReceiveProps!="function"||(H!==_e||ge!==F)&&H7(l,S,g,F),Uc=!1,ge=l.memoizedState,S.state=ge,u0(l,g,S,y);var ot=l.memoizedState;H!==_e||ge!==ot||ji.current||Uc?(typeof je=="function"&&(ay(l,f,je,g),ot=l.memoizedState),(ne=Uc||Z7(l,f,ne,g,ge,ot,F)||!1)?(ve||typeof S.UNSAFE_componentWillUpdate!="function"&&typeof S.componentWillUpdate!="function"||(typeof S.componentWillUpdate=="function"&&S.componentWillUpdate(g,ot,F),typeof S.UNSAFE_componentWillUpdate=="function"&&S.UNSAFE_componentWillUpdate(g,ot,F)),typeof S.componentDidUpdate=="function"&&(l.flags|=4),typeof S.getSnapshotBeforeUpdate=="function"&&(l.flags|=1024)):(typeof S.componentDidUpdate!="function"||H===s.memoizedProps&&ge===s.memoizedState||(l.flags|=4),typeof S.getSnapshotBeforeUpdate!="function"||H===s.memoizedProps&&ge===s.memoizedState||(l.flags|=1024),l.memoizedProps=g,l.memoizedState=ot),S.props=g,S.state=ot,S.context=F,g=ne):(typeof S.componentDidUpdate!="function"||H===s.memoizedProps&&ge===s.memoizedState||(l.flags|=4),typeof S.getSnapshotBeforeUpdate!="function"||H===s.memoizedProps&&ge===s.memoizedState||(l.flags|=1024),g=!1)}return uy(s,l,f,g,w,y)}function uy(s,l,f,g,y,w){K7(s,l);var S=(l.flags&128)!==0;if(!g&&!S)return y&&J9(l,f,!1),js(s,l,w);g=l.stateNode,DL.current=l;var H=S&&typeof f.getDerivedStateFromError!="function"?null:g.render();return l.flags|=1,s!==null&&S?(l.child=vh(l,s.child,null,w),l.child=vh(l,null,H,w)):Ai(s,l,H,w),l.memoizedState=g.state,y&&J9(l,f,!0),l.child}function W7(s){var l=s.stateNode;l.pendingContext?Q9(s,l.pendingContext,l.pendingContext!==l.context):l.context&&Q9(s,l.context,!1),G5(s,l.containerInfo)}function Y7(s,l,f,g,y){return gh(),F5(y),l.flags|=256,Ai(s,l,f,g),l.child}var hy={dehydrated:null,treeContext:null,retryLane:0};function fy(s){return{baseLanes:s,cachePool:null,transitions:null}}function Q7(s,l,f){var g=l.pendingProps,y=Wr.current,w=!1,S=(l.flags&128)!==0,H;if((H=S)||(H=s!==null&&s.memoizedState===null?!1:(y&2)!==0),H?(w=!0,l.flags&=-129):(s===null||s.memoizedState!==null)&&(y|=1),$r(Wr,y&1),s===null)return V5(l),s=l.memoizedState,s!==null&&(s=s.dehydrated,s!==null)?((l.mode&1)===0?l.lanes=1:s.data==="$!"?l.lanes=8:l.lanes=1073741824,null):(S=g.children,s=g.fallback,w?(g=l.mode,w=l.child,S={mode:"hidden",children:S},(g&1)===0&&w!==null?(w.childLanes=0,w.pendingProps=S):w=M0(S,g,0,null),s=Cd(s,g,f,null),w.return=l,s.return=l,w.sibling=s,l.child=w,l.child.memoizedState=fy(f),l.memoizedState=hy,s):py(l,S));if(y=s.memoizedState,y!==null&&(H=y.dehydrated,H!==null))return VL(s,l,S,g,H,y,f);if(w){w=g.fallback,S=l.mode,y=s.child,H=y.sibling;var F={mode:"hidden",children:g.children};return(S&1)===0&&l.child!==y?(g=l.child,g.childLanes=0,g.pendingProps=F,l.deletions=null):(g=Qc(y,F),g.subtreeFlags=y.subtreeFlags&14680064),H!==null?w=Qc(H,w):(w=Cd(w,S,f,null),w.flags|=2),w.return=l,g.return=l,g.sibling=w,l.child=g,g=w,w=l.child,S=s.child.memoizedState,S=S===null?fy(f):{baseLanes:S.baseLanes|f,cachePool:null,transitions:S.transitions},w.memoizedState=S,w.childLanes=s.childLanes&~f,l.memoizedState=hy,g}return w=s.child,s=w.sibling,g=Qc(w,{mode:"visible",children:g.children}),(l.mode&1)===0&&(g.lanes=f),g.return=l,g.sibling=null,s!==null&&(f=l.deletions,f===null?(l.deletions=[s],l.flags|=16):f.push(s)),l.child=g,l.memoizedState=null,g}function py(s,l){return l=M0({mode:"visible",children:l},s.mode,0,null),l.return=s,s.child=l}function _0(s,l,f,g){return g!==null&&F5(g),vh(l,s.child,null,f),s=py(l,l.pendingProps.children),s.flags|=2,l.memoizedState=null,s}function VL(s,l,f,g,y,w,S){if(f)return l.flags&256?(l.flags&=-257,g=cy(Error(t(422))),_0(s,l,S,g)):l.memoizedState!==null?(l.child=s.child,l.flags|=128,null):(w=g.fallback,y=l.mode,g=M0({mode:"visible",children:g.children},y,0,null),w=Cd(w,y,S,null),w.flags|=2,g.return=l,w.return=l,g.sibling=w,l.child=g,(l.mode&1)!==0&&vh(l,s.child,null,S),l.child.memoizedState=fy(S),l.memoizedState=hy,w);if((l.mode&1)===0)return _0(s,l,S,null);if(y.data==="$!"){if(g=y.nextSibling&&y.nextSibling.dataset,g)var H=g.dgst;return g=H,w=Error(t(419)),g=cy(w,g,void 0),_0(s,l,S,g)}if(H=(S&s.childLanes)!==0,Bi||H){if(g=Ln,g!==null){switch(S&-S){case 4:y=2;break;case 16:y=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:y=32;break;case 536870912:y=268435456;break;default:y=0}y=(y&(g.suspendedLanes|S))!==0?0:y,y!==0&&y!==w.retryLane&&(w.retryLane=y,Fs(s,y),Sa(g,s,y,-1))}return Ry(),g=cy(Error(t(421))),_0(s,l,S,g)}return y.data==="$?"?(l.flags|=128,l.child=s.child,l=JL.bind(null,s),y._reactRetry=l,null):(s=w.treeContext,mo=Vc(y.nextSibling),po=l,zr=!0,xa=null,s!==null&&(Fo[zo++]=Ds,Fo[zo++]=Vs,Fo[zo++]=pd,Ds=s.id,Vs=s.overflow,pd=l),l=py(l,g.children),l.flags|=4096,l)}function X7(s,l,f){s.lanes|=l;var g=s.alternate;g!==null&&(g.lanes|=l),B5(s.return,l,f)}function my(s,l,f,g,y){var w=s.memoizedState;w===null?s.memoizedState={isBackwards:l,rendering:null,renderingStartTime:0,last:g,tail:f,tailMode:y}:(w.isBackwards=l,w.rendering=null,w.renderingStartTime=0,w.last=g,w.tail=f,w.tailMode=y)}function J7(s,l,f){var g=l.pendingProps,y=g.revealOrder,w=g.tail;if(Ai(s,l,g.children,f),g=Wr.current,(g&2)!==0)g=g&1|2,l.flags|=128;else{if(s!==null&&(s.flags&128)!==0)e:for(s=l.child;s!==null;){if(s.tag===13)s.memoizedState!==null&&X7(s,f,l);else if(s.tag===19)X7(s,f,l);else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===l)break e;for(;s.sibling===null;){if(s.return===null||s.return===l)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}g&=1}if($r(Wr,g),(l.mode&1)===0)l.memoizedState=null;else switch(y){case"forwards":for(f=l.child,y=null;f!==null;)s=f.alternate,s!==null&&h0(s)===null&&(y=f),f=f.sibling;f=y,f===null?(y=l.child,l.child=null):(y=f.sibling,f.sibling=null),my(l,!1,y,f,w);break;case"backwards":for(f=null,y=l.child,l.child=null;y!==null;){if(s=y.alternate,s!==null&&h0(s)===null){l.child=y;break}s=y.sibling,y.sibling=f,f=y,y=s}my(l,!0,f,null,w);break;case"together":my(l,!1,null,null,void 0);break;default:l.memoizedState=null}return l.child}function b0(s,l){(l.mode&1)===0&&s!==null&&(s.alternate=null,l.alternate=null,l.flags|=2)}function js(s,l,f){if(s!==null&&(l.dependencies=s.dependencies),_d|=l.lanes,(f&l.childLanes)===0)return null;if(s!==null&&l.child!==s.child)throw Error(t(153));if(l.child!==null){for(s=l.child,f=Qc(s,s.pendingProps),l.child=f,f.return=l;s.sibling!==null;)s=s.sibling,f=f.sibling=Qc(s,s.pendingProps),f.return=l;f.sibling=null}return l.child}function FL(s,l,f){switch(l.tag){case 3:W7(l),gh();break;case 5:f7(l);break;case 1:Ui(l.type)&&r0(l);break;case 4:G5(l,l.stateNode.containerInfo);break;case 10:var g=l.type._context,y=l.memoizedProps.value;$r(c0,g._currentValue),g._currentValue=y;break;case 13:if(g=l.memoizedState,g!==null)return g.dehydrated!==null?($r(Wr,Wr.current&1),l.flags|=128,null):(f&l.child.childLanes)!==0?Q7(s,l,f):($r(Wr,Wr.current&1),s=js(s,l,f),s!==null?s.sibling:null);$r(Wr,Wr.current&1);break;case 19:if(g=(f&l.childLanes)!==0,(s.flags&128)!==0){if(g)return J7(s,l,f);l.flags|=128}if(y=l.memoizedState,y!==null&&(y.rendering=null,y.tail=null,y.lastEffect=null),$r(Wr,Wr.current),g)break;return null;case 22:case 23:return l.lanes=0,q7(s,l,f)}return js(s,l,f)}var ex,gy,tx,rx;ex=function(s,l){for(var f=l.child;f!==null;){if(f.tag===5||f.tag===6)s.appendChild(f.stateNode);else if(f.tag!==4&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===l)break;for(;f.sibling===null;){if(f.return===null||f.return===l)return;f=f.return}f.sibling.return=f.return,f=f.sibling}},gy=function(){},tx=function(s,l,f,g){var y=s.memoizedProps;if(y!==g){s=l.stateNode,vd(Ja.current);var w=null;switch(f){case"input":y=so(s,y),g=so(s,g),w=[];break;case"select":y=D({},y,{value:void 0}),g=D({},g,{value:void 0}),w=[];break;case"textarea":y=Mc(s,y),g=Mc(s,g),w=[];break;default:typeof y.onClick!="function"&&typeof g.onClick=="function"&&(s.onclick=J2)}Oc(f,g);var S;f=null;for(ne in y)if(!g.hasOwnProperty(ne)&&y.hasOwnProperty(ne)&&y[ne]!=null)if(ne==="style"){var H=y[ne];for(S in H)H.hasOwnProperty(S)&&(f||(f={}),f[S]="")}else ne!=="dangerouslySetInnerHTML"&&ne!=="children"&&ne!=="suppressContentEditableWarning"&&ne!=="suppressHydrationWarning"&&ne!=="autoFocus"&&(i.hasOwnProperty(ne)?w||(w=[]):(w=w||[]).push(ne,null));for(ne in g){var F=g[ne];if(H=y!=null?y[ne]:void 0,g.hasOwnProperty(ne)&&F!==H&&(F!=null||H!=null))if(ne==="style")if(H){for(S in H)!H.hasOwnProperty(S)||F&&F.hasOwnProperty(S)||(f||(f={}),f[S]="");for(S in F)F.hasOwnProperty(S)&&H[S]!==F[S]&&(f||(f={}),f[S]=F[S])}else f||(w||(w=[]),w.push(ne,f)),f=F;else ne==="dangerouslySetInnerHTML"?(F=F?F.__html:void 0,H=H?H.__html:void 0,F!=null&&H!==F&&(w=w||[]).push(ne,F)):ne==="children"?typeof F!="string"&&typeof F!="number"||(w=w||[]).push(ne,""+F):ne!=="suppressContentEditableWarning"&&ne!=="suppressHydrationWarning"&&(i.hasOwnProperty(ne)?(F!=null&&ne==="onScroll"&&Nr("scroll",s),w||H===F||(w=[])):(w=w||[]).push(ne,F))}f&&(w=w||[]).push("style",f);var ne=w;(l.updateQueue=ne)&&(l.flags|=4)}},rx=function(s,l,f,g){f!==g&&(l.flags|=4)};function V1(s,l){if(!zr)switch(s.tailMode){case"hidden":l=s.tail;for(var f=null;l!==null;)l.alternate!==null&&(f=l),l=l.sibling;f===null?s.tail=null:f.sibling=null;break;case"collapsed":f=s.tail;for(var g=null;f!==null;)f.alternate!==null&&(g=f),f=f.sibling;g===null?l||s.tail===null?s.tail=null:s.tail.sibling=null:g.sibling=null}}function ci(s){var l=s.alternate!==null&&s.alternate.child===s.child,f=0,g=0;if(l)for(var y=s.child;y!==null;)f|=y.lanes|y.childLanes,g|=y.subtreeFlags&14680064,g|=y.flags&14680064,y.return=s,y=y.sibling;else for(y=s.child;y!==null;)f|=y.lanes|y.childLanes,g|=y.subtreeFlags,g|=y.flags,y.return=s,y=y.sibling;return s.subtreeFlags|=g,s.childLanes=f,l}function zL(s,l,f){var g=l.pendingProps;switch(N5(l),l.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ci(l),null;case 1:return Ui(l.type)&&t0(),ci(l),null;case 3:return g=l.stateNode,bh(),Dr(ji),Dr(ai),Q5(),g.pendingContext&&(g.context=g.pendingContext,g.pendingContext=null),(s===null||s.child===null)&&(a0(l)?l.flags|=4:s===null||s.memoizedState.isDehydrated&&(l.flags&256)===0||(l.flags|=1024,xa!==null&&(Ay(xa),xa=null))),gy(s,l),ci(l),null;case 5:W5(l);var y=vd(Z1.current);if(f=l.type,s!==null&&l.stateNode!=null)tx(s,l,f,g,y),s.ref!==l.ref&&(l.flags|=512,l.flags|=2097152);else{if(!g){if(l.stateNode===null)throw Error(t(166));return ci(l),null}if(s=vd(Ja.current),a0(l)){g=l.stateNode,f=l.type;var w=l.memoizedProps;switch(g[Xa]=l,g[R1]=w,s=(l.mode&1)!==0,f){case"dialog":Nr("cancel",g),Nr("close",g);break;case"iframe":case"object":case"embed":Nr("load",g);break;case"video":case"audio":for(y=0;y<A1.length;y++)Nr(A1[y],g);break;case"source":Nr("error",g);break;case"img":case"image":case"link":Nr("error",g),Nr("load",g);break;case"details":Nr("toggle",g);break;case"input":ma(g,w),Nr("invalid",g);break;case"select":g._wrapperState={wasMultiple:!!w.multiple},Nr("invalid",g);break;case"textarea":Ql(g,w),Nr("invalid",g)}Oc(f,w),y=null;for(var S in w)if(w.hasOwnProperty(S)){var H=w[S];S==="children"?typeof H=="string"?g.textContent!==H&&(w.suppressHydrationWarning!==!0&&X2(g.textContent,H,s),y=["children",H]):typeof H=="number"&&g.textContent!==""+H&&(w.suppressHydrationWarning!==!0&&X2(g.textContent,H,s),y=["children",""+H]):i.hasOwnProperty(S)&&H!=null&&S==="onScroll"&&Nr("scroll",g)}switch(f){case"input":Gr(g),Yu(g,w,!0);break;case"textarea":Gr(g),co(g);break;case"select":case"option":break;default:typeof w.onClick=="function"&&(g.onclick=J2)}g=y,l.updateQueue=g,g!==null&&(l.flags|=4)}else{S=y.nodeType===9?y:y.ownerDocument,s==="http://www.w3.org/1999/xhtml"&&(s=Xl(f)),s==="http://www.w3.org/1999/xhtml"?f==="script"?(s=S.createElement("div"),s.innerHTML="<script><\/script>",s=s.removeChild(s.firstChild)):typeof g.is=="string"?s=S.createElement(f,{is:g.is}):(s=S.createElement(f),f==="select"&&(S=s,g.multiple?S.multiple=!0:g.size&&(S.size=g.size))):s=S.createElementNS(s,f),s[Xa]=l,s[R1]=g,ex(s,l,!1,!1),l.stateNode=s;e:{switch(S=Ms(f,g),f){case"dialog":Nr("cancel",s),Nr("close",s),y=g;break;case"iframe":case"object":case"embed":Nr("load",s),y=g;break;case"video":case"audio":for(y=0;y<A1.length;y++)Nr(A1[y],s);y=g;break;case"source":Nr("error",s),y=g;break;case"img":case"image":case"link":Nr("error",s),Nr("load",s),y=g;break;case"details":Nr("toggle",s),y=g;break;case"input":ma(s,g),y=so(s,g),Nr("invalid",s);break;case"option":y=g;break;case"select":s._wrapperState={wasMultiple:!!g.multiple},y=D({},g,{value:void 0}),Nr("invalid",s);break;case"textarea":Ql(s,g),y=Mc(s,g),Nr("invalid",s);break;default:y=g}Oc(f,y),H=y;for(w in H)if(H.hasOwnProperty(w)){var F=H[w];w==="style"?$c(s,F):w==="dangerouslySetInnerHTML"?(F=F?F.__html:void 0,F!=null&&Ei(s,F)):w==="children"?typeof F=="string"?(f!=="textarea"||F!=="")&&qa(s,F):typeof F=="number"&&qa(s,""+F):w!=="suppressContentEditableWarning"&&w!=="suppressHydrationWarning"&&w!=="autoFocus"&&(i.hasOwnProperty(w)?F!=null&&w==="onScroll"&&Nr("scroll",s):F!=null&&I(s,w,F,S))}switch(f){case"input":Gr(s),Yu(s,g,!1);break;case"textarea":Gr(s),co(s);break;case"option":g.value!=null&&s.setAttribute("value",""+lt(g.value));break;case"select":s.multiple=!!g.multiple,w=g.value,w!=null?Oo(s,!!g.multiple,w,!1):g.defaultValue!=null&&Oo(s,!!g.multiple,g.defaultValue,!0);break;default:typeof y.onClick=="function"&&(s.onclick=J2)}switch(f){case"button":case"input":case"select":case"textarea":g=!!g.autoFocus;break e;case"img":g=!0;break e;default:g=!1}}g&&(l.flags|=4)}l.ref!==null&&(l.flags|=512,l.flags|=2097152)}return ci(l),null;case 6:if(s&&l.stateNode!=null)rx(s,l,s.memoizedProps,g);else{if(typeof g!="string"&&l.stateNode===null)throw Error(t(166));if(f=vd(Z1.current),vd(Ja.current),a0(l)){if(g=l.stateNode,f=l.memoizedProps,g[Xa]=l,(w=g.nodeValue!==f)&&(s=po,s!==null))switch(s.tag){case 3:X2(g.nodeValue,f,(s.mode&1)!==0);break;case 5:s.memoizedProps.suppressHydrationWarning!==!0&&X2(g.nodeValue,f,(s.mode&1)!==0)}w&&(l.flags|=4)}else g=(f.nodeType===9?f:f.ownerDocument).createTextNode(g),g[Xa]=l,l.stateNode=g}return ci(l),null;case 13:if(Dr(Wr),g=l.memoizedState,s===null||s.memoizedState!==null&&s.memoizedState.dehydrated!==null){if(zr&&mo!==null&&(l.mode&1)!==0&&(l.flags&128)===0)o7(),gh(),l.flags|=98560,w=!1;else if(w=a0(l),g!==null&&g.dehydrated!==null){if(s===null){if(!w)throw Error(t(318));if(w=l.memoizedState,w=w!==null?w.dehydrated:null,!w)throw Error(t(317));w[Xa]=l}else gh(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;ci(l),w=!1}else xa!==null&&(Ay(xa),xa=null),w=!0;if(!w)return l.flags&65536?l:null}return(l.flags&128)!==0?(l.lanes=f,l):(g=g!==null,g!==(s!==null&&s.memoizedState!==null)&&g&&(l.child.flags|=8192,(l.mode&1)!==0&&(s===null||(Wr.current&1)!==0?In===0&&(In=3):Ry())),l.updateQueue!==null&&(l.flags|=4),ci(l),null);case 4:return bh(),gy(s,l),s===null&&T1(l.stateNode.containerInfo),ci(l),null;case 10:return U5(l.type._context),ci(l),null;case 17:return Ui(l.type)&&t0(),ci(l),null;case 19:if(Dr(Wr),w=l.memoizedState,w===null)return ci(l),null;if(g=(l.flags&128)!==0,S=w.rendering,S===null)if(g)V1(w,!1);else{if(In!==0||s!==null&&(s.flags&128)!==0)for(s=l.child;s!==null;){if(S=h0(s),S!==null){for(l.flags|=128,V1(w,!1),g=S.updateQueue,g!==null&&(l.updateQueue=g,l.flags|=4),l.subtreeFlags=0,g=f,f=l.child;f!==null;)w=f,s=g,w.flags&=14680066,S=w.alternate,S===null?(w.childLanes=0,w.lanes=s,w.child=null,w.subtreeFlags=0,w.memoizedProps=null,w.memoizedState=null,w.updateQueue=null,w.dependencies=null,w.stateNode=null):(w.childLanes=S.childLanes,w.lanes=S.lanes,w.child=S.child,w.subtreeFlags=0,w.deletions=null,w.memoizedProps=S.memoizedProps,w.memoizedState=S.memoizedState,w.updateQueue=S.updateQueue,w.type=S.type,s=S.dependencies,w.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext}),f=f.sibling;return $r(Wr,Wr.current&1|2),l.child}s=s.sibling}w.tail!==null&&Jt()>kh&&(l.flags|=128,g=!0,V1(w,!1),l.lanes=4194304)}else{if(!g)if(s=h0(S),s!==null){if(l.flags|=128,g=!0,f=s.updateQueue,f!==null&&(l.updateQueue=f,l.flags|=4),V1(w,!0),w.tail===null&&w.tailMode==="hidden"&&!S.alternate&&!zr)return ci(l),null}else 2*Jt()-w.renderingStartTime>kh&&f!==1073741824&&(l.flags|=128,g=!0,V1(w,!1),l.lanes=4194304);w.isBackwards?(S.sibling=l.child,l.child=S):(f=w.last,f!==null?f.sibling=S:l.child=S,w.last=S)}return w.tail!==null?(l=w.tail,w.rendering=l,w.tail=l.sibling,w.renderingStartTime=Jt(),l.sibling=null,f=Wr.current,$r(Wr,g?f&1|2:f&1),l):(ci(l),null);case 22:case 23:return Iy(),g=l.memoizedState!==null,s!==null&&s.memoizedState!==null!==g&&(l.flags|=8192),g&&(l.mode&1)!==0?(go&1073741824)!==0&&(ci(l),l.subtreeFlags&6&&(l.flags|=8192)):ci(l),null;case 24:return null;case 25:return null}throw Error(t(156,l.tag))}function jL(s,l){switch(N5(l),l.tag){case 1:return Ui(l.type)&&t0(),s=l.flags,s&65536?(l.flags=s&-65537|128,l):null;case 3:return bh(),Dr(ji),Dr(ai),Q5(),s=l.flags,(s&65536)!==0&&(s&128)===0?(l.flags=s&-65537|128,l):null;case 5:return W5(l),null;case 13:if(Dr(Wr),s=l.memoizedState,s!==null&&s.dehydrated!==null){if(l.alternate===null)throw Error(t(340));gh()}return s=l.flags,s&65536?(l.flags=s&-65537|128,l):null;case 19:return Dr(Wr),null;case 4:return bh(),null;case 10:return U5(l.type._context),null;case 22:case 23:return Iy(),null;case 24:return null;default:return null}}var w0=!1,li=!1,UL=typeof WeakSet=="function"?WeakSet:Set,et=null;function xh(s,l){var f=s.ref;if(f!==null)if(typeof f=="function")try{f(null)}catch(g){sn(s,l,g)}else f.current=null}function vy(s,l,f){try{f()}catch(g){sn(s,l,g)}}var nx=!1;function BL(s,l){if(I5=te,s=Z9(),w5(s)){if("selectionStart"in s)var f={start:s.selectionStart,end:s.selectionEnd};else e:{f=(f=s.ownerDocument)&&f.defaultView||window;var g=f.getSelection&&f.getSelection();if(g&&g.rangeCount!==0){f=g.anchorNode;var y=g.anchorOffset,w=g.focusNode;g=g.focusOffset;try{f.nodeType,w.nodeType}catch{f=null;break e}var S=0,H=-1,F=-1,ne=0,ve=0,_e=s,ge=null;t:for(;;){for(var je;_e!==f||y!==0&&_e.nodeType!==3||(H=S+y),_e!==w||g!==0&&_e.nodeType!==3||(F=S+g),_e.nodeType===3&&(S+=_e.nodeValue.length),(je=_e.firstChild)!==null;)ge=_e,_e=je;for(;;){if(_e===s)break t;if(ge===f&&++ne===y&&(H=S),ge===w&&++ve===g&&(F=S),(je=_e.nextSibling)!==null)break;_e=ge,ge=_e.parentNode}_e=je}f=H===-1||F===-1?null:{start:H,end:F}}else f=null}f=f||{start:0,end:0}}else f=null;for(R5={focusedElem:s,selectionRange:f},te=!1,et=l;et!==null;)if(l=et,s=l.child,(l.subtreeFlags&1028)!==0&&s!==null)s.return=l,et=s;else for(;et!==null;){l=et;try{var ot=l.alternate;if((l.flags&1024)!==0)switch(l.tag){case 0:case 11:case 15:break;case 1:if(ot!==null){var st=ot.memoizedProps,mn=ot.memoizedState,J=l.stateNode,K=J.getSnapshotBeforeUpdate(l.elementType===l.type?st:Ca(l.type,st),mn);J.__reactInternalSnapshotBeforeUpdate=K}break;case 3:var ee=l.stateNode.containerInfo;ee.nodeType===1?ee.textContent="":ee.nodeType===9&&ee.documentElement&&ee.removeChild(ee.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(t(163))}}catch(Se){sn(l,l.return,Se)}if(s=l.sibling,s!==null){s.return=l.return,et=s;break}et=l.return}return ot=nx,nx=!1,ot}function F1(s,l,f){var g=l.updateQueue;if(g=g!==null?g.lastEffect:null,g!==null){var y=g=g.next;do{if((y.tag&s)===s){var w=y.destroy;y.destroy=void 0,w!==void 0&&vy(l,f,w)}y=y.next}while(y!==g)}}function x0(s,l){if(l=l.updateQueue,l=l!==null?l.lastEffect:null,l!==null){var f=l=l.next;do{if((f.tag&s)===s){var g=f.create;f.destroy=g()}f=f.next}while(f!==l)}}function yy(s){var l=s.ref;if(l!==null){var f=s.stateNode;switch(s.tag){case 5:s=f;break;default:s=f}typeof l=="function"?l(s):l.current=s}}function ix(s){var l=s.alternate;l!==null&&(s.alternate=null,ix(l)),s.child=null,s.deletions=null,s.sibling=null,s.tag===5&&(l=s.stateNode,l!==null&&(delete l[Xa],delete l[R1],delete l[O5],delete l[AL],delete l[TL])),s.stateNode=null,s.return=null,s.dependencies=null,s.memoizedProps=null,s.memoizedState=null,s.pendingProps=null,s.stateNode=null,s.updateQueue=null}function ox(s){return s.tag===5||s.tag===3||s.tag===4}function ax(s){e:for(;;){for(;s.sibling===null;){if(s.return===null||ox(s.return))return null;s=s.return}for(s.sibling.return=s.return,s=s.sibling;s.tag!==5&&s.tag!==6&&s.tag!==18;){if(s.flags&2||s.child===null||s.tag===4)continue e;s.child.return=s,s=s.child}if(!(s.flags&2))return s.stateNode}}function _y(s,l,f){var g=s.tag;if(g===5||g===6)s=s.stateNode,l?f.nodeType===8?f.parentNode.insertBefore(s,l):f.insertBefore(s,l):(f.nodeType===8?(l=f.parentNode,l.insertBefore(s,f)):(l=f,l.appendChild(s)),f=f._reactRootContainer,f!=null||l.onclick!==null||(l.onclick=J2));else if(g!==4&&(s=s.child,s!==null))for(_y(s,l,f),s=s.sibling;s!==null;)_y(s,l,f),s=s.sibling}function by(s,l,f){var g=s.tag;if(g===5||g===6)s=s.stateNode,l?f.insertBefore(s,l):f.appendChild(s);else if(g!==4&&(s=s.child,s!==null))for(by(s,l,f),s=s.sibling;s!==null;)by(s,l,f),s=s.sibling}var Un=null,ka=!1;function qc(s,l,f){for(f=f.child;f!==null;)sx(s,l,f),f=f.sibling}function sx(s,l,f){if(Sn&&typeof Sn.onCommitFiberUnmount=="function")try{Sn.onCommitFiberUnmount(ur,f)}catch{}switch(f.tag){case 5:li||xh(f,l);case 6:var g=Un,y=ka;Un=null,qc(s,l,f),Un=g,ka=y,Un!==null&&(ka?(s=Un,f=f.stateNode,s.nodeType===8?s.parentNode.removeChild(f):s.removeChild(f)):Un.removeChild(f.stateNode));break;case 18:Un!==null&&(ka?(s=Un,f=f.stateNode,s.nodeType===8?$5(s.parentNode,f):s.nodeType===1&&$5(s,f),cd(s)):$5(Un,f.stateNode));break;case 4:g=Un,y=ka,Un=f.stateNode.containerInfo,ka=!0,qc(s,l,f),Un=g,ka=y;break;case 0:case 11:case 14:case 15:if(!li&&(g=f.updateQueue,g!==null&&(g=g.lastEffect,g!==null))){y=g=g.next;do{var w=y,S=w.destroy;w=w.tag,S!==void 0&&((w&2)!==0||(w&4)!==0)&&vy(f,l,S),y=y.next}while(y!==g)}qc(s,l,f);break;case 1:if(!li&&(xh(f,l),g=f.stateNode,typeof g.componentWillUnmount=="function"))try{g.props=f.memoizedProps,g.state=f.memoizedState,g.componentWillUnmount()}catch(H){sn(f,l,H)}qc(s,l,f);break;case 21:qc(s,l,f);break;case 22:f.mode&1?(li=(g=li)||f.memoizedState!==null,qc(s,l,f),li=g):qc(s,l,f);break;default:qc(s,l,f)}}function cx(s){var l=s.updateQueue;if(l!==null){s.updateQueue=null;var f=s.stateNode;f===null&&(f=s.stateNode=new UL),l.forEach(function(g){var y=eH.bind(null,s,g);f.has(g)||(f.add(g),g.then(y,y))})}}function Ea(s,l){var f=l.deletions;if(f!==null)for(var g=0;g<f.length;g++){var y=f[g];try{var w=s,S=l,H=S;e:for(;H!==null;){switch(H.tag){case 5:Un=H.stateNode,ka=!1;break e;case 3:Un=H.stateNode.containerInfo,ka=!0;break e;case 4:Un=H.stateNode.containerInfo,ka=!0;break e}H=H.return}if(Un===null)throw Error(t(160));sx(w,S,y),Un=null,ka=!1;var F=y.alternate;F!==null&&(F.return=null),y.return=null}catch(ne){sn(y,l,ne)}}if(l.subtreeFlags&12854)for(l=l.child;l!==null;)lx(l,s),l=l.sibling}function lx(s,l){var f=s.alternate,g=s.flags;switch(s.tag){case 0:case 11:case 14:case 15:if(Ea(l,s),ts(s),g&4){try{F1(3,s,s.return),x0(3,s)}catch(st){sn(s,s.return,st)}try{F1(5,s,s.return)}catch(st){sn(s,s.return,st)}}break;case 1:Ea(l,s),ts(s),g&512&&f!==null&&xh(f,f.return);break;case 5:if(Ea(l,s),ts(s),g&512&&f!==null&&xh(f,f.return),s.flags&32){var y=s.stateNode;try{qa(y,"")}catch(st){sn(s,s.return,st)}}if(g&4&&(y=s.stateNode,y!=null)){var w=s.memoizedProps,S=f!==null?f.memoizedProps:w,H=s.type,F=s.updateQueue;if(s.updateQueue=null,F!==null)try{H==="input"&&w.type==="radio"&&w.name!=null&&Fi(y,w),Ms(H,S);var ne=Ms(H,w);for(S=0;S<F.length;S+=2){var ve=F[S],_e=F[S+1];ve==="style"?$c(y,_e):ve==="dangerouslySetInnerHTML"?Ei(y,_e):ve==="children"?qa(y,_e):I(y,ve,_e,ne)}switch(H){case"input":Rc(y,w);break;case"textarea":En(y,w);break;case"select":var ge=y._wrapperState.wasMultiple;y._wrapperState.wasMultiple=!!w.multiple;var je=w.value;je!=null?Oo(y,!!w.multiple,je,!1):ge!==!!w.multiple&&(w.defaultValue!=null?Oo(y,!!w.multiple,w.defaultValue,!0):Oo(y,!!w.multiple,w.multiple?[]:"",!1))}y[R1]=w}catch(st){sn(s,s.return,st)}}break;case 6:if(Ea(l,s),ts(s),g&4){if(s.stateNode===null)throw Error(t(162));y=s.stateNode,w=s.memoizedProps;try{y.nodeValue=w}catch(st){sn(s,s.return,st)}}break;case 3:if(Ea(l,s),ts(s),g&4&&f!==null&&f.memoizedState.isDehydrated)try{cd(l.containerInfo)}catch(st){sn(s,s.return,st)}break;case 4:Ea(l,s),ts(s);break;case 13:Ea(l,s),ts(s),y=s.child,y.flags&8192&&(w=y.memoizedState!==null,y.stateNode.isHidden=w,!w||y.alternate!==null&&y.alternate.memoizedState!==null||(Cy=Jt())),g&4&&cx(s);break;case 22:if(ve=f!==null&&f.memoizedState!==null,s.mode&1?(li=(ne=li)||ve,Ea(l,s),li=ne):Ea(l,s),ts(s),g&8192){if(ne=s.memoizedState!==null,(s.stateNode.isHidden=ne)&&!ve&&(s.mode&1)!==0)for(et=s,ve=s.child;ve!==null;){for(_e=et=ve;et!==null;){switch(ge=et,je=ge.child,ge.tag){case 0:case 11:case 14:case 15:F1(4,ge,ge.return);break;case 1:xh(ge,ge.return);var ot=ge.stateNode;if(typeof ot.componentWillUnmount=="function"){g=ge,f=ge.return;try{l=g,ot.props=l.memoizedProps,ot.state=l.memoizedState,ot.componentWillUnmount()}catch(st){sn(g,f,st)}}break;case 5:xh(ge,ge.return);break;case 22:if(ge.memoizedState!==null){hx(_e);continue}}je!==null?(je.return=ge,et=je):hx(_e)}ve=ve.sibling}e:for(ve=null,_e=s;;){if(_e.tag===5){if(ve===null){ve=_e;try{y=_e.stateNode,ne?(w=y.style,typeof w.setProperty=="function"?w.setProperty("display","none","important"):w.display="none"):(H=_e.stateNode,F=_e.memoizedProps.style,S=F!=null&&F.hasOwnProperty("display")?F.display:null,H.style.display=lo("display",S))}catch(st){sn(s,s.return,st)}}}else if(_e.tag===6){if(ve===null)try{_e.stateNode.nodeValue=ne?"":_e.memoizedProps}catch(st){sn(s,s.return,st)}}else if((_e.tag!==22&&_e.tag!==23||_e.memoizedState===null||_e===s)&&_e.child!==null){_e.child.return=_e,_e=_e.child;continue}if(_e===s)break e;for(;_e.sibling===null;){if(_e.return===null||_e.return===s)break e;ve===_e&&(ve=null),_e=_e.return}ve===_e&&(ve=null),_e.sibling.return=_e.return,_e=_e.sibling}}break;case 19:Ea(l,s),ts(s),g&4&&cx(s);break;case 21:break;default:Ea(l,s),ts(s)}}function ts(s){var l=s.flags;if(l&2){try{e:{for(var f=s.return;f!==null;){if(ox(f)){var g=f;break e}f=f.return}throw Error(t(160))}switch(g.tag){case 5:var y=g.stateNode;g.flags&32&&(qa(y,""),g.flags&=-33);var w=ax(s);by(s,w,y);break;case 3:case 4:var S=g.stateNode.containerInfo,H=ax(s);_y(s,H,S);break;default:throw Error(t(161))}}catch(F){sn(s,s.return,F)}s.flags&=-3}l&4096&&(s.flags&=-4097)}function qL(s,l,f){et=s,dx(s)}function dx(s,l,f){for(var g=(s.mode&1)!==0;et!==null;){var y=et,w=y.child;if(y.tag===22&&g){var S=y.memoizedState!==null||w0;if(!S){var H=y.alternate,F=H!==null&&H.memoizedState!==null||li;H=w0;var ne=li;if(w0=S,(li=F)&&!ne)for(et=y;et!==null;)S=et,F=S.child,S.tag===22&&S.memoizedState!==null?fx(y):F!==null?(F.return=S,et=F):fx(y);for(;w!==null;)et=w,dx(w),w=w.sibling;et=y,w0=H,li=ne}ux(s)}else(y.subtreeFlags&8772)!==0&&w!==null?(w.return=y,et=w):ux(s)}}function ux(s){for(;et!==null;){var l=et;if((l.flags&8772)!==0){var f=l.alternate;try{if((l.flags&8772)!==0)switch(l.tag){case 0:case 11:case 15:li||x0(5,l);break;case 1:var g=l.stateNode;if(l.flags&4&&!li)if(f===null)g.componentDidMount();else{var y=l.elementType===l.type?f.memoizedProps:Ca(l.type,f.memoizedProps);g.componentDidUpdate(y,f.memoizedState,g.__reactInternalSnapshotBeforeUpdate)}var w=l.updateQueue;w!==null&&h7(l,w,g);break;case 3:var S=l.updateQueue;if(S!==null){if(f=null,l.child!==null)switch(l.child.tag){case 5:f=l.child.stateNode;break;case 1:f=l.child.stateNode}h7(l,S,f)}break;case 5:var H=l.stateNode;if(f===null&&l.flags&4){f=H;var F=l.memoizedProps;switch(l.type){case"button":case"input":case"select":case"textarea":F.autoFocus&&f.focus();break;case"img":F.src&&(f.src=F.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(l.memoizedState===null){var ne=l.alternate;if(ne!==null){var ve=ne.memoizedState;if(ve!==null){var _e=ve.dehydrated;_e!==null&&cd(_e)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(t(163))}li||l.flags&512&&yy(l)}catch(ge){sn(l,l.return,ge)}}if(l===s){et=null;break}if(f=l.sibling,f!==null){f.return=l.return,et=f;break}et=l.return}}function hx(s){for(;et!==null;){var l=et;if(l===s){et=null;break}var f=l.sibling;if(f!==null){f.return=l.return,et=f;break}et=l.return}}function fx(s){for(;et!==null;){var l=et;try{switch(l.tag){case 0:case 11:case 15:var f=l.return;try{x0(4,l)}catch(F){sn(l,f,F)}break;case 1:var g=l.stateNode;if(typeof g.componentDidMount=="function"){var y=l.return;try{g.componentDidMount()}catch(F){sn(l,y,F)}}var w=l.return;try{yy(l)}catch(F){sn(l,w,F)}break;case 5:var S=l.return;try{yy(l)}catch(F){sn(l,S,F)}}}catch(F){sn(l,l.return,F)}if(l===s){et=null;break}var H=l.sibling;if(H!==null){H.return=l.return,et=H;break}et=l.return}}var KL=Math.ceil,C0=O.ReactCurrentDispatcher,wy=O.ReactCurrentOwner,Bo=O.ReactCurrentBatchConfig,rr=0,Ln=null,yn=null,Bn=0,go=0,Ch=Fc(0),In=0,z1=null,_d=0,k0=0,xy=0,j1=null,qi=null,Cy=0,kh=1/0,Us=null,E0=!1,ky=null,Kc=null,S0=!1,Gc=null,A0=0,U1=0,Ey=null,T0=-1,I0=0;function Ti(){return(rr&6)!==0?Jt():T0!==-1?T0:T0=Jt()}function Wc(s){return(s.mode&1)===0?1:(rr&2)!==0&&Bn!==0?Bn&-Bn:RL.transition!==null?(I0===0&&(I0=H2()),I0):(s=Wt,s!==0||(s=window.event,s=s===void 0?16:jn(s.type)),s)}function Sa(s,l,f,g){if(50<U1)throw U1=0,Ey=null,Error(t(185));id(s,f,g),((rr&2)===0||s!==Ln)&&(s===Ln&&((rr&2)===0&&(k0|=f),In===4&&Yc(s,Bn)),Ki(s,g),f===1&&rr===0&&(l.mode&1)===0&&(kh=Jt()+500,n0&&jc()))}function Ki(s,l){var f=s.callbackNode;u5(s,l);var g=rh(s,s===Ln?Bn:0);if(g===0)f!==null&&ii(f),s.callbackNode=null,s.callbackPriority=0;else if(l=g&-g,s.callbackPriority!==l){if(f!=null&&ii(f),l===1)s.tag===0?IL(mx.bind(null,s)):e7(mx.bind(null,s)),EL(function(){(rr&6)===0&&jc()}),f=null;else{switch(m1(g)){case 1:f=va;break;case 4:f=No;break;case 16:f=Do;break;case 536870912:f=Bt;break;default:f=Do}f=Cx(f,px.bind(null,s))}s.callbackPriority=l,s.callbackNode=f}}function px(s,l){if(T0=-1,I0=0,(rr&6)!==0)throw Error(t(327));var f=s.callbackNode;if(Eh()&&s.callbackNode!==f)return null;var g=rh(s,s===Ln?Bn:0);if(g===0)return null;if((g&30)!==0||(g&s.expiredLanes)!==0||l)l=R0(s,g);else{l=g;var y=rr;rr|=2;var w=vx();(Ln!==s||Bn!==l)&&(Us=null,kh=Jt()+500,wd(s,l));do try{YL();break}catch(H){gx(s,H)}while(!0);j5(),C0.current=w,rr=y,yn!==null?l=0:(Ln=null,Bn=0,l=In)}if(l!==0){if(l===2&&(y=p1(s),y!==0&&(g=y,l=Sy(s,y))),l===1)throw f=z1,wd(s,0),Yc(s,g),Ki(s,Jt()),f;if(l===6)Yc(s,g);else{if(y=s.current.alternate,(g&30)===0&&!GL(y)&&(l=R0(s,g),l===2&&(w=p1(s),w!==0&&(g=w,l=Sy(s,w))),l===1))throw f=z1,wd(s,0),Yc(s,g),Ki(s,Jt()),f;switch(s.finishedWork=y,s.finishedLanes=g,l){case 0:case 1:throw Error(t(345));case 2:xd(s,qi,Us);break;case 3:if(Yc(s,g),(g&130023424)===g&&(l=Cy+500-Jt(),10<l)){if(rh(s,0)!==0)break;if(y=s.suspendedLanes,(y&g)!==g){Ti(),s.pingedLanes|=s.suspendedLanes&y;break}s.timeoutHandle=M5(xd.bind(null,s,qi,Us),l);break}xd(s,qi,Us);break;case 4:if(Yc(s,g),(g&4194240)===g)break;for(l=s.eventTimes,y=-1;0<g;){var S=31-er(g);w=1<<S,S=l[S],S>y&&(y=S),g&=~w}if(g=y,g=Jt()-g,g=(120>g?120:480>g?480:1080>g?1080:1920>g?1920:3e3>g?3e3:4320>g?4320:1960*KL(g/1960))-g,10<g){s.timeoutHandle=M5(xd.bind(null,s,qi,Us),g);break}xd(s,qi,Us);break;case 5:xd(s,qi,Us);break;default:throw Error(t(329))}}}return Ki(s,Jt()),s.callbackNode===f?px.bind(null,s):null}function Sy(s,l){var f=j1;return s.current.memoizedState.isDehydrated&&(wd(s,l).flags|=256),s=R0(s,l),s!==2&&(l=qi,qi=f,l!==null&&Ay(l)),s}function Ay(s){qi===null?qi=s:qi.push.apply(qi,s)}function GL(s){for(var l=s;;){if(l.flags&16384){var f=l.updateQueue;if(f!==null&&(f=f.stores,f!==null))for(var g=0;g<f.length;g++){var y=f[g],w=y.getSnapshot;y=y.value;try{if(!wa(w(),y))return!1}catch{return!1}}}if(f=l.child,l.subtreeFlags&16384&&f!==null)f.return=l,l=f;else{if(l===s)break;for(;l.sibling===null;){if(l.return===null||l.return===s)return!0;l=l.return}l.sibling.return=l.return,l=l.sibling}}return!0}function Yc(s,l){for(l&=~xy,l&=~k0,s.suspendedLanes|=l,s.pingedLanes&=~l,s=s.expirationTimes;0<l;){var f=31-er(l),g=1<<f;s[f]=-1,l&=~g}}function mx(s){if((rr&6)!==0)throw Error(t(327));Eh();var l=rh(s,0);if((l&1)===0)return Ki(s,Jt()),null;var f=R0(s,l);if(s.tag!==0&&f===2){var g=p1(s);g!==0&&(l=g,f=Sy(s,g))}if(f===1)throw f=z1,wd(s,0),Yc(s,l),Ki(s,Jt()),f;if(f===6)throw Error(t(345));return s.finishedWork=s.current.alternate,s.finishedLanes=l,xd(s,qi,Us),Ki(s,Jt()),null}function Ty(s,l){var f=rr;rr|=1;try{return s(l)}finally{rr=f,rr===0&&(kh=Jt()+500,n0&&jc())}}function bd(s){Gc!==null&&Gc.tag===0&&(rr&6)===0&&Eh();var l=rr;rr|=1;var f=Bo.transition,g=Wt;try{if(Bo.transition=null,Wt=1,s)return s()}finally{Wt=g,Bo.transition=f,rr=l,(rr&6)===0&&jc()}}function Iy(){go=Ch.current,Dr(Ch)}function wd(s,l){s.finishedWork=null,s.finishedLanes=0;var f=s.timeoutHandle;if(f!==-1&&(s.timeoutHandle=-1,kL(f)),yn!==null)for(f=yn.return;f!==null;){var g=f;switch(N5(g),g.tag){case 1:g=g.type.childContextTypes,g!=null&&t0();break;case 3:bh(),Dr(ji),Dr(ai),Q5();break;case 5:W5(g);break;case 4:bh();break;case 13:Dr(Wr);break;case 19:Dr(Wr);break;case 10:U5(g.type._context);break;case 22:case 23:Iy()}f=f.return}if(Ln=s,yn=s=Qc(s.current,null),Bn=go=l,In=0,z1=null,xy=k0=_d=0,qi=j1=null,gd!==null){for(l=0;l<gd.length;l++)if(f=gd[l],g=f.interleaved,g!==null){f.interleaved=null;var y=g.next,w=f.pending;if(w!==null){var S=w.next;w.next=y,g.next=S}f.pending=g}gd=null}return s}function gx(s,l){do{var f=yn;try{if(j5(),f0.current=v0,p0){for(var g=Yr.memoizedState;g!==null;){var y=g.queue;y!==null&&(y.pending=null),g=g.next}p0=!1}if(yd=0,Zn=Tn=Yr=null,L1=!1,H1=0,wy.current=null,f===null||f.return===null){In=1,z1=l,yn=null;break}e:{var w=s,S=f.return,H=f,F=l;if(l=Bn,H.flags|=32768,F!==null&&typeof F=="object"&&typeof F.then=="function"){var ne=F,ve=H,_e=ve.tag;if((ve.mode&1)===0&&(_e===0||_e===11||_e===15)){var ge=ve.alternate;ge?(ve.updateQueue=ge.updateQueue,ve.memoizedState=ge.memoizedState,ve.lanes=ge.lanes):(ve.updateQueue=null,ve.memoizedState=null)}var je=F7(S);if(je!==null){je.flags&=-257,z7(je,S,H,w,l),je.mode&1&&V7(w,ne,l),l=je,F=ne;var ot=l.updateQueue;if(ot===null){var st=new Set;st.add(F),l.updateQueue=st}else ot.add(F);break e}else{if((l&1)===0){V7(w,ne,l),Ry();break e}F=Error(t(426))}}else if(zr&&H.mode&1){var mn=F7(S);if(mn!==null){(mn.flags&65536)===0&&(mn.flags|=256),z7(mn,S,H,w,l),F5(wh(F,H));break e}}w=F=wh(F,H),In!==4&&(In=2),j1===null?j1=[w]:j1.push(w),w=S;do{switch(w.tag){case 3:w.flags|=65536,l&=-l,w.lanes|=l;var J=N7(w,F,l);u7(w,J);break e;case 1:H=F;var K=w.type,ee=w.stateNode;if((w.flags&128)===0&&(typeof K.getDerivedStateFromError=="function"||ee!==null&&typeof ee.componentDidCatch=="function"&&(Kc===null||!Kc.has(ee)))){w.flags|=65536,l&=-l,w.lanes|=l;var Se=D7(w,H,l);u7(w,Se);break e}}w=w.return}while(w!==null)}_x(f)}catch(ut){l=ut,yn===f&&f!==null&&(yn=f=f.return);continue}break}while(!0)}function vx(){var s=C0.current;return C0.current=v0,s===null?v0:s}function Ry(){(In===0||In===3||In===2)&&(In=4),Ln===null||(_d&268435455)===0&&(k0&268435455)===0||Yc(Ln,Bn)}function R0(s,l){var f=rr;rr|=2;var g=vx();(Ln!==s||Bn!==l)&&(Us=null,wd(s,l));do try{WL();break}catch(y){gx(s,y)}while(!0);if(j5(),rr=f,C0.current=g,yn!==null)throw Error(t(261));return Ln=null,Bn=0,In}function WL(){for(;yn!==null;)yx(yn)}function YL(){for(;yn!==null&&!Os();)yx(yn)}function yx(s){var l=xx(s.alternate,s,go);s.memoizedProps=s.pendingProps,l===null?_x(s):yn=l,wy.current=null}function _x(s){var l=s;do{var f=l.alternate;if(s=l.return,(l.flags&32768)===0){if(f=zL(f,l,go),f!==null){yn=f;return}}else{if(f=jL(f,l),f!==null){f.flags&=32767,yn=f;return}if(s!==null)s.flags|=32768,s.subtreeFlags=0,s.deletions=null;else{In=6,yn=null;return}}if(l=l.sibling,l!==null){yn=l;return}yn=l=s}while(l!==null);In===0&&(In=5)}function xd(s,l,f){var g=Wt,y=Bo.transition;try{Bo.transition=null,Wt=1,QL(s,l,f,g)}finally{Bo.transition=y,Wt=g}return null}function QL(s,l,f,g){do Eh();while(Gc!==null);if((rr&6)!==0)throw Error(t(327));f=s.finishedWork;var y=s.finishedLanes;if(f===null)return null;if(s.finishedWork=null,s.finishedLanes=0,f===s.current)throw Error(t(177));s.callbackNode=null,s.callbackPriority=0;var w=f.lanes|f.childLanes;if(h5(s,w),s===Ln&&(yn=Ln=null,Bn=0),(f.subtreeFlags&2064)===0&&(f.flags&2064)===0||S0||(S0=!0,Cx(Do,function(){return Eh(),null})),w=(f.flags&15990)!==0,(f.subtreeFlags&15990)!==0||w){w=Bo.transition,Bo.transition=null;var S=Wt;Wt=1;var H=rr;rr|=4,wy.current=null,BL(s,f),lx(f,s),vL(R5),te=!!I5,R5=I5=null,s.current=f,qL(f),uo(),rr=H,Wt=S,Bo.transition=w}else s.current=f;if(S0&&(S0=!1,Gc=s,A0=y),w=s.pendingLanes,w===0&&(Kc=null),Zs(f.stateNode),Ki(s,Jt()),l!==null)for(g=s.onRecoverableError,f=0;f<l.length;f++)y=l[f],g(y.value,{componentStack:y.stack,digest:y.digest});if(E0)throw E0=!1,s=ky,ky=null,s;return(A0&1)!==0&&s.tag!==0&&Eh(),w=s.pendingLanes,(w&1)!==0?s===Ey?U1++:(U1=0,Ey=s):U1=0,jc(),null}function Eh(){if(Gc!==null){var s=m1(A0),l=Bo.transition,f=Wt;try{if(Bo.transition=null,Wt=16>s?16:s,Gc===null)var g=!1;else{if(s=Gc,Gc=null,A0=0,(rr&6)!==0)throw Error(t(331));var y=rr;for(rr|=4,et=s.current;et!==null;){var w=et,S=w.child;if((et.flags&16)!==0){var H=w.deletions;if(H!==null){for(var F=0;F<H.length;F++){var ne=H[F];for(et=ne;et!==null;){var ve=et;switch(ve.tag){case 0:case 11:case 15:F1(8,ve,w)}var _e=ve.child;if(_e!==null)_e.return=ve,et=_e;else for(;et!==null;){ve=et;var ge=ve.sibling,je=ve.return;if(ix(ve),ve===ne){et=null;break}if(ge!==null){ge.return=je,et=ge;break}et=je}}}var ot=w.alternate;if(ot!==null){var st=ot.child;if(st!==null){ot.child=null;do{var mn=st.sibling;st.sibling=null,st=mn}while(st!==null)}}et=w}}if((w.subtreeFlags&2064)!==0&&S!==null)S.return=w,et=S;else e:for(;et!==null;){if(w=et,(w.flags&2048)!==0)switch(w.tag){case 0:case 11:case 15:F1(9,w,w.return)}var J=w.sibling;if(J!==null){J.return=w.return,et=J;break e}et=w.return}}var K=s.current;for(et=K;et!==null;){S=et;var ee=S.child;if((S.subtreeFlags&2064)!==0&&ee!==null)ee.return=S,et=ee;else e:for(S=K;et!==null;){if(H=et,(H.flags&2048)!==0)try{switch(H.tag){case 0:case 11:case 15:x0(9,H)}}catch(ut){sn(H,H.return,ut)}if(H===S){et=null;break e}var Se=H.sibling;if(Se!==null){Se.return=H.return,et=Se;break e}et=H.return}}if(rr=y,jc(),Sn&&typeof Sn.onPostCommitFiberRoot=="function")try{Sn.onPostCommitFiberRoot(ur,s)}catch{}g=!0}return g}finally{Wt=f,Bo.transition=l}}return!1}function bx(s,l,f){l=wh(f,l),l=N7(s,l,1),s=Bc(s,l,1),l=Ti(),s!==null&&(id(s,1,l),Ki(s,l))}function sn(s,l,f){if(s.tag===3)bx(s,s,f);else for(;l!==null;){if(l.tag===3){bx(l,s,f);break}else if(l.tag===1){var g=l.stateNode;if(typeof l.type.getDerivedStateFromError=="function"||typeof g.componentDidCatch=="function"&&(Kc===null||!Kc.has(g))){s=wh(f,s),s=D7(l,s,1),l=Bc(l,s,1),s=Ti(),l!==null&&(id(l,1,s),Ki(l,s));break}}l=l.return}}function XL(s,l,f){var g=s.pingCache;g!==null&&g.delete(l),l=Ti(),s.pingedLanes|=s.suspendedLanes&f,Ln===s&&(Bn&f)===f&&(In===4||In===3&&(Bn&130023424)===Bn&&500>Jt()-Cy?wd(s,0):xy|=f),Ki(s,l)}function wx(s,l){l===0&&((s.mode&1)===0?l=1:(l=th,th<<=1,(th&130023424)===0&&(th=4194304)));var f=Ti();s=Fs(s,l),s!==null&&(id(s,l,f),Ki(s,f))}function JL(s){var l=s.memoizedState,f=0;l!==null&&(f=l.retryLane),wx(s,f)}function eH(s,l){var f=0;switch(s.tag){case 13:var g=s.stateNode,y=s.memoizedState;y!==null&&(f=y.retryLane);break;case 19:g=s.stateNode;break;default:throw Error(t(314))}g!==null&&g.delete(l),wx(s,f)}var xx;xx=function(s,l,f){if(s!==null)if(s.memoizedProps!==l.pendingProps||ji.current)Bi=!0;else{if((s.lanes&f)===0&&(l.flags&128)===0)return Bi=!1,FL(s,l,f);Bi=(s.flags&131072)!==0}else Bi=!1,zr&&(l.flags&1048576)!==0&&t7(l,o0,l.index);switch(l.lanes=0,l.tag){case 2:var g=l.type;b0(s,l),s=l.pendingProps;var y=fh(l,ai.current);_h(l,f),y=ey(null,l,g,s,y,f);var w=ty();return l.flags|=1,typeof y=="object"&&y!==null&&typeof y.render=="function"&&y.$$typeof===void 0?(l.tag=1,l.memoizedState=null,l.updateQueue=null,Ui(g)?(w=!0,r0(l)):w=!1,l.memoizedState=y.state!==null&&y.state!==void 0?y.state:null,K5(l),y.updater=y0,l.stateNode=y,y._reactInternals=l,sy(l,g,s,f),l=uy(null,l,g,!0,w,f)):(l.tag=0,zr&&w&&H5(l),Ai(null,l,y,f),l=l.child),l;case 16:g=l.elementType;e:{switch(b0(s,l),s=l.pendingProps,y=g._init,g=y(g._payload),l.type=g,y=l.tag=rH(g),s=Ca(g,s),y){case 0:l=dy(null,l,g,s,f);break e;case 1:l=G7(null,l,g,s,f);break e;case 11:l=j7(null,l,g,s,f);break e;case 14:l=U7(null,l,g,Ca(g.type,s),f);break e}throw Error(t(306,g,""))}return l;case 0:return g=l.type,y=l.pendingProps,y=l.elementType===g?y:Ca(g,y),dy(s,l,g,y,f);case 1:return g=l.type,y=l.pendingProps,y=l.elementType===g?y:Ca(g,y),G7(s,l,g,y,f);case 3:e:{if(W7(l),s===null)throw Error(t(387));g=l.pendingProps,w=l.memoizedState,y=w.element,d7(s,l),u0(l,g,null,f);var S=l.memoizedState;if(g=S.element,w.isDehydrated)if(w={element:g,isDehydrated:!1,cache:S.cache,pendingSuspenseBoundaries:S.pendingSuspenseBoundaries,transitions:S.transitions},l.updateQueue.baseState=w,l.memoizedState=w,l.flags&256){y=wh(Error(t(423)),l),l=Y7(s,l,g,f,y);break e}else if(g!==y){y=wh(Error(t(424)),l),l=Y7(s,l,g,f,y);break e}else for(mo=Vc(l.stateNode.containerInfo.firstChild),po=l,zr=!0,xa=null,f=c7(l,null,g,f),l.child=f;f;)f.flags=f.flags&-3|4096,f=f.sibling;else{if(gh(),g===y){l=js(s,l,f);break e}Ai(s,l,g,f)}l=l.child}return l;case 5:return f7(l),s===null&&V5(l),g=l.type,y=l.pendingProps,w=s!==null?s.memoizedProps:null,S=y.children,P5(g,y)?S=null:w!==null&&P5(g,w)&&(l.flags|=32),K7(s,l),Ai(s,l,S,f),l.child;case 6:return s===null&&V5(l),null;case 13:return Q7(s,l,f);case 4:return G5(l,l.stateNode.containerInfo),g=l.pendingProps,s===null?l.child=vh(l,null,g,f):Ai(s,l,g,f),l.child;case 11:return g=l.type,y=l.pendingProps,y=l.elementType===g?y:Ca(g,y),j7(s,l,g,y,f);case 7:return Ai(s,l,l.pendingProps,f),l.child;case 8:return Ai(s,l,l.pendingProps.children,f),l.child;case 12:return Ai(s,l,l.pendingProps.children,f),l.child;case 10:e:{if(g=l.type._context,y=l.pendingProps,w=l.memoizedProps,S=y.value,$r(c0,g._currentValue),g._currentValue=S,w!==null)if(wa(w.value,S)){if(w.children===y.children&&!ji.current){l=js(s,l,f);break e}}else for(w=l.child,w!==null&&(w.return=l);w!==null;){var H=w.dependencies;if(H!==null){S=w.child;for(var F=H.firstContext;F!==null;){if(F.context===g){if(w.tag===1){F=zs(-1,f&-f),F.tag=2;var ne=w.updateQueue;if(ne!==null){ne=ne.shared;var ve=ne.pending;ve===null?F.next=F:(F.next=ve.next,ve.next=F),ne.pending=F}}w.lanes|=f,F=w.alternate,F!==null&&(F.lanes|=f),B5(w.return,f,l),H.lanes|=f;break}F=F.next}}else if(w.tag===10)S=w.type===l.type?null:w.child;else if(w.tag===18){if(S=w.return,S===null)throw Error(t(341));S.lanes|=f,H=S.alternate,H!==null&&(H.lanes|=f),B5(S,f,l),S=w.sibling}else S=w.child;if(S!==null)S.return=w;else for(S=w;S!==null;){if(S===l){S=null;break}if(w=S.sibling,w!==null){w.return=S.return,S=w;break}S=S.return}w=S}Ai(s,l,y.children,f),l=l.child}return l;case 9:return y=l.type,g=l.pendingProps.children,_h(l,f),y=jo(y),g=g(y),l.flags|=1,Ai(s,l,g,f),l.child;case 14:return g=l.type,y=Ca(g,l.pendingProps),y=Ca(g.type,y),U7(s,l,g,y,f);case 15:return B7(s,l,l.type,l.pendingProps,f);case 17:return g=l.type,y=l.pendingProps,y=l.elementType===g?y:Ca(g,y),b0(s,l),l.tag=1,Ui(g)?(s=!0,r0(l)):s=!1,_h(l,f),L7(l,g,y),sy(l,g,y,f),uy(null,l,g,!0,s,f);case 19:return J7(s,l,f);case 22:return q7(s,l,f)}throw Error(t(156,l.tag))};function Cx(s,l){return Ir(s,l)}function tH(s,l,f,g){this.tag=s,this.key=f,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=l,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=g,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function qo(s,l,f,g){return new tH(s,l,f,g)}function Py(s){return s=s.prototype,!(!s||!s.isReactComponent)}function rH(s){if(typeof s=="function")return Py(s)?1:0;if(s!=null){if(s=s.$$typeof,s===ke)return 11;if(s===q)return 14}return 2}function Qc(s,l){var f=s.alternate;return f===null?(f=qo(s.tag,l,s.key,s.mode),f.elementType=s.elementType,f.type=s.type,f.stateNode=s.stateNode,f.alternate=s,s.alternate=f):(f.pendingProps=l,f.type=s.type,f.flags=0,f.subtreeFlags=0,f.deletions=null),f.flags=s.flags&14680064,f.childLanes=s.childLanes,f.lanes=s.lanes,f.child=s.child,f.memoizedProps=s.memoizedProps,f.memoizedState=s.memoizedState,f.updateQueue=s.updateQueue,l=s.dependencies,f.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext},f.sibling=s.sibling,f.index=s.index,f.ref=s.ref,f}function P0(s,l,f,g,y,w){var S=2;if(g=s,typeof s=="function")Py(s)&&(S=1);else if(typeof s=="string")S=5;else e:switch(s){case R:return Cd(f.children,y,w,l);case Y:S=8,y|=8;break;case ue:return s=qo(12,f,l,y|2),s.elementType=ue,s.lanes=w,s;case xe:return s=qo(13,f,l,y),s.elementType=xe,s.lanes=w,s;case X:return s=qo(19,f,l,y),s.elementType=X,s.lanes=w,s;case W:return M0(f,y,w,l);default:if(typeof s=="object"&&s!==null)switch(s.$$typeof){case le:S=10;break e;case Te:S=9;break e;case ke:S=11;break e;case q:S=14;break e;case re:S=16,g=null;break e}throw Error(t(130,s==null?s:typeof s,""))}return l=qo(S,f,l,y),l.elementType=s,l.type=g,l.lanes=w,l}function Cd(s,l,f,g){return s=qo(7,s,g,l),s.lanes=f,s}function M0(s,l,f,g){return s=qo(22,s,g,l),s.elementType=W,s.lanes=f,s.stateNode={isHidden:!1},s}function My(s,l,f){return s=qo(6,s,null,l),s.lanes=f,s}function $y(s,l,f){return l=qo(4,s.children!==null?s.children:[],s.key,l),l.lanes=f,l.stateNode={containerInfo:s.containerInfo,pendingChildren:null,implementation:s.implementation},l}function nH(s,l,f,g,y){this.tag=l,this.containerInfo=s,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=nh(0),this.expirationTimes=nh(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=nh(0),this.identifierPrefix=g,this.onRecoverableError=y,this.mutableSourceEagerHydrationData=null}function Oy(s,l,f,g,y,w,S,H,F){return s=new nH(s,l,f,H,F),l===1?(l=1,w===!0&&(l|=8)):l=0,w=qo(3,null,null,l),s.current=w,w.stateNode=s,w.memoizedState={element:g,isDehydrated:f,cache:null,transitions:null,pendingSuspenseBoundaries:null},K5(w),s}function iH(s,l,f){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:z,key:g==null?null:""+g,children:s,containerInfo:l,implementation:f}}function kx(s){if(!s)return zc;s=s._reactInternals;e:{if(Qe(s)!==s||s.tag!==1)throw Error(t(170));var l=s;do{switch(l.tag){case 3:l=l.stateNode.context;break e;case 1:if(Ui(l.type)){l=l.stateNode.__reactInternalMemoizedMergedChildContext;break e}}l=l.return}while(l!==null);throw Error(t(171))}if(s.tag===1){var f=s.type;if(Ui(f))return X9(s,f,l)}return l}function Ex(s,l,f,g,y,w,S,H,F){return s=Oy(f,g,!0,s,y,w,S,H,F),s.context=kx(null),f=s.current,g=Ti(),y=Wc(f),w=zs(g,y),w.callback=l??null,Bc(f,w,y),s.current.lanes=y,id(s,y,g),Ki(s,g),s}function $0(s,l,f,g){var y=l.current,w=Ti(),S=Wc(y);return f=kx(f),l.context===null?l.context=f:l.pendingContext=f,l=zs(w,S),l.payload={element:s},g=g===void 0?null:g,g!==null&&(l.callback=g),s=Bc(y,l,S),s!==null&&(Sa(s,y,S,w),d0(s,y,S)),S}function O0(s){if(s=s.current,!s.child)return null;switch(s.child.tag){case 5:return s.child.stateNode;default:return s.child.stateNode}}function Sx(s,l){if(s=s.memoizedState,s!==null&&s.dehydrated!==null){var f=s.retryLane;s.retryLane=f!==0&&f<l?f:l}}function Zy(s,l){Sx(s,l),(s=s.alternate)&&Sx(s,l)}function oH(){return null}var Ax=typeof reportError=="function"?reportError:function(s){console.error(s)};function Ly(s){this._internalRoot=s}Z0.prototype.render=Ly.prototype.render=function(s){var l=this._internalRoot;if(l===null)throw Error(t(409));$0(s,l,null,null)},Z0.prototype.unmount=Ly.prototype.unmount=function(){var s=this._internalRoot;if(s!==null){this._internalRoot=null;var l=s.containerInfo;bd(function(){$0(null,s,null,null)}),l[Hs]=null}};function Z0(s){this._internalRoot=s}Z0.prototype.unstable_scheduleHydration=function(s){if(s){var l=D2();s={blockedOn:null,target:s,priority:l};for(var f=0;f<Vo.length&&l!==0&&l<Vo[f].priority;f++);Vo.splice(f,0,s),f===0&&U2(s)}};function Hy(s){return!(!s||s.nodeType!==1&&s.nodeType!==9&&s.nodeType!==11)}function L0(s){return!(!s||s.nodeType!==1&&s.nodeType!==9&&s.nodeType!==11&&(s.nodeType!==8||s.nodeValue!==" react-mount-point-unstable "))}function Tx(){}function aH(s,l,f,g,y){if(y){if(typeof g=="function"){var w=g;g=function(){var ne=O0(S);w.call(ne)}}var S=Ex(l,g,s,0,null,!1,!1,"",Tx);return s._reactRootContainer=S,s[Hs]=S.current,T1(s.nodeType===8?s.parentNode:s),bd(),S}for(;y=s.lastChild;)s.removeChild(y);if(typeof g=="function"){var H=g;g=function(){var ne=O0(F);H.call(ne)}}var F=Oy(s,0,!1,null,null,!1,!1,"",Tx);return s._reactRootContainer=F,s[Hs]=F.current,T1(s.nodeType===8?s.parentNode:s),bd(function(){$0(l,F,f,g)}),F}function H0(s,l,f,g,y){var w=f._reactRootContainer;if(w){var S=w;if(typeof y=="function"){var H=y;y=function(){var F=O0(S);H.call(F)}}$0(l,S,s,y)}else S=aH(f,l,s,y,g);return O0(S)}Wa=function(s){switch(s.tag){case 3:var l=s.stateNode;if(l.current.memoizedState.isDehydrated){var f=nd(l.pendingLanes);f!==0&&(Lc(l,f|1),Ki(l,Jt()),(rr&6)===0&&(kh=Jt()+500,jc()))}break;case 13:bd(function(){var g=Fs(s,1);if(g!==null){var y=Ti();Sa(g,s,1,y)}}),Zy(s,1)}},g1=function(s){if(s.tag===13){var l=Fs(s,134217728);if(l!==null){var f=Ti();Sa(l,s,134217728,f)}Zy(s,134217728)}},N2=function(s){if(s.tag===13){var l=Wc(s),f=Fs(s,l);if(f!==null){var g=Ti();Sa(f,s,l,g)}Zy(s,l)}},D2=function(){return Wt},V2=function(s,l){var f=Wt;try{return Wt=s,l()}finally{Wt=f}},Ka=function(s,l,f){switch(l){case"input":if(Rc(s,f),l=f.name,f.type==="radio"&&l!=null){for(f=s;f.parentNode;)f=f.parentNode;for(f=f.querySelectorAll("input[name="+JSON.stringify(""+l)+'][type="radio"]'),l=0;l<f.length;l++){var g=f[l];if(g!==s&&g.form===s.form){var y=e0(g);if(!y)throw Error(t(90));Mt(g),Rc(g,y)}}}break;case"textarea":En(s,f);break;case"select":l=f.value,l!=null&&Oo(s,!!f.multiple,l,!1)}},ed=Ty,$s=bd;var sH={usingClientEntryPoint:!1,Events:[P1,uh,e0,Jl,Ju,Ty]},B1={findFiberByHostInstance:hd,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},cH={bundleType:B1.bundleType,version:B1.version,rendererPackageName:B1.rendererPackageName,rendererConfig:B1.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:O.ReactCurrentDispatcher,findHostInstanceByFiber:function(s){return s=dr(s),s===null?null:s.stateNode},findFiberByHostInstance:B1.findFiberByHostInstance||oH,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 N0=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!N0.isDisabled&&N0.supportsFiber)try{ur=N0.inject(cH),Sn=N0}catch{}}return Gi.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=sH,Gi.createPortal=function(s,l){var f=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Hy(l))throw Error(t(200));return iH(s,l,null,f)},Gi.createRoot=function(s,l){if(!Hy(s))throw Error(t(299));var f=!1,g="",y=Ax;return l!=null&&(l.unstable_strictMode===!0&&(f=!0),l.identifierPrefix!==void 0&&(g=l.identifierPrefix),l.onRecoverableError!==void 0&&(y=l.onRecoverableError)),l=Oy(s,1,!1,null,null,f,!1,g,y),s[Hs]=l.current,T1(s.nodeType===8?s.parentNode:s),new Ly(l)},Gi.findDOMNode=function(s){if(s==null)return null;if(s.nodeType===1)return s;var l=s._reactInternals;if(l===void 0)throw typeof s.render=="function"?Error(t(188)):(s=Object.keys(s).join(","),Error(t(268,s)));return s=dr(l),s=s===null?null:s.stateNode,s},Gi.flushSync=function(s){return bd(s)},Gi.hydrate=function(s,l,f){if(!L0(l))throw Error(t(200));return H0(null,s,l,!0,f)},Gi.hydrateRoot=function(s,l,f){if(!Hy(s))throw Error(t(405));var g=f!=null&&f.hydratedSources||null,y=!1,w="",S=Ax;if(f!=null&&(f.unstable_strictMode===!0&&(y=!0),f.identifierPrefix!==void 0&&(w=f.identifierPrefix),f.onRecoverableError!==void 0&&(S=f.onRecoverableError)),l=Ex(l,null,s,1,f??null,y,!1,w,S),s[Hs]=l.current,T1(s),g)for(s=0;s<g.length;s++)f=g[s],y=f._getVersion,y=y(f._source),l.mutableSourceEagerHydrationData==null?l.mutableSourceEagerHydrationData=[f,y]:l.mutableSourceEagerHydrationData.push(f,y);return new Z0(l)},Gi.render=function(s,l,f){if(!L0(l))throw Error(t(200));return H0(null,s,l,!1,f)},Gi.unmountComponentAtNode=function(s){if(!L0(s))throw Error(t(40));return s._reactRootContainer?(bd(function(){H0(null,null,s,!1,function(){s._reactRootContainer=null,s[Hs]=null})}),!0):!1},Gi.unstable_batchedUpdates=Ty,Gi.unstable_renderSubtreeIntoContainer=function(s,l,f,g){if(!L0(f))throw Error(t(200));if(s==null||s._reactInternals===void 0)throw Error(t(38));return H0(s,l,f,!1,g)},Gi.version="18.3.1-next-f1338f8080-20240426",Gi}var Nx;function sR(){if(Nx)return Fy.exports;Nx=1;function r(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(e){console.error(e)}}return r(),Fy.exports=vH(),Fy.exports}var Dx;function yH(){if(Dx)return V0;Dx=1;var r=sR();return V0.createRoot=r.createRoot,V0.hydrateRoot=r.hydrateRoot,V0}var _H=yH();const bH=zu(_H);var F0={exports:{}},Uy,Vx;function c4(){if(Vx)return Uy;Vx=1;const r="2.0.0",e=256,t=Number.MAX_SAFE_INTEGER||9007199254740991,n=16,i=e-6;return Uy={MAX_LENGTH:e,MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:i,MAX_SAFE_INTEGER:t,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:r,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},Uy}var By,Fx;function l4(){if(Fx)return By;Fx=1;var r={};return By=typeof process=="object"&&r&&r.NODE_DEBUG&&/\bsemver\b/i.test(r.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{},By}var zx;function Jm(){return zx||(zx=1,function(r,e){const{MAX_SAFE_COMPONENT_LENGTH:t,MAX_SAFE_BUILD_LENGTH:n,MAX_LENGTH:i}=c4(),o=l4();e=r.exports={};const a=e.re=[],c=e.safeRe=[],d=e.src=[],u=e.safeSrc=[],h=e.t={};let p=0;const m="[a-zA-Z0-9-]",v=[["\\s",1],["\\d",i],[m,n]],_=C=>{for(const[T,A]of v)C=C.split(`${T}*`).join(`${T}{0,${A}}`).split(`${T}+`).join(`${T}{1,${A}}`);return C},b=(C,T,A)=>{const I=_(T),O=p++;o(C,O,T),h[C]=O,d[O]=T,u[O]=I,a[O]=new RegExp(T,A?"g":void 0),c[O]=new RegExp(I,A?"g":void 0)};b("NUMERICIDENTIFIER","0|[1-9]\\d*"),b("NUMERICIDENTIFIERLOOSE","\\d+"),b("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${m}*`),b("MAINVERSION",`(${d[h.NUMERICIDENTIFIER]})\\.(${d[h.NUMERICIDENTIFIER]})\\.(${d[h.NUMERICIDENTIFIER]})`),b("MAINVERSIONLOOSE",`(${d[h.NUMERICIDENTIFIERLOOSE]})\\.(${d[h.NUMERICIDENTIFIERLOOSE]})\\.(${d[h.NUMERICIDENTIFIERLOOSE]})`),b("PRERELEASEIDENTIFIER",`(?:${d[h.NUMERICIDENTIFIER]}|${d[h.NONNUMERICIDENTIFIER]})`),b("PRERELEASEIDENTIFIERLOOSE",`(?:${d[h.NUMERICIDENTIFIERLOOSE]}|${d[h.NONNUMERICIDENTIFIER]})`),b("PRERELEASE",`(?:-(${d[h.PRERELEASEIDENTIFIER]}(?:\\.${d[h.PRERELEASEIDENTIFIER]})*))`),b("PRERELEASELOOSE",`(?:-?(${d[h.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${d[h.PRERELEASEIDENTIFIERLOOSE]})*))`),b("BUILDIDENTIFIER",`${m}+`),b("BUILD",`(?:\\+(${d[h.BUILDIDENTIFIER]}(?:\\.${d[h.BUILDIDENTIFIER]})*))`),b("FULLPLAIN",`v?${d[h.MAINVERSION]}${d[h.PRERELEASE]}?${d[h.BUILD]}?`),b("FULL",`^${d[h.FULLPLAIN]}$`),b("LOOSEPLAIN",`[v=\\s]*${d[h.MAINVERSIONLOOSE]}${d[h.PRERELEASELOOSE]}?${d[h.BUILD]}?`),b("LOOSE",`^${d[h.LOOSEPLAIN]}$`),b("GTLT","((?:<|>)?=?)"),b("XRANGEIDENTIFIERLOOSE",`${d[h.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),b("XRANGEIDENTIFIER",`${d[h.NUMERICIDENTIFIER]}|x|X|\\*`),b("XRANGEPLAIN",`[v=\\s]*(${d[h.XRANGEIDENTIFIER]})(?:\\.(${d[h.XRANGEIDENTIFIER]})(?:\\.(${d[h.XRANGEIDENTIFIER]})(?:${d[h.PRERELEASE]})?${d[h.BUILD]}?)?)?`),b("XRANGEPLAINLOOSE",`[v=\\s]*(${d[h.XRANGEIDENTIFIERLOOSE]})(?:\\.(${d[h.XRANGEIDENTIFIERLOOSE]})(?:\\.(${d[h.XRANGEIDENTIFIERLOOSE]})(?:${d[h.PRERELEASELOOSE]})?${d[h.BUILD]}?)?)?`),b("XRANGE",`^${d[h.GTLT]}\\s*${d[h.XRANGEPLAIN]}$`),b("XRANGELOOSE",`^${d[h.GTLT]}\\s*${d[h.XRANGEPLAINLOOSE]}$`),b("COERCEPLAIN",`(^|[^\\d])(\\d{1,${t}})(?:\\.(\\d{1,${t}}))?(?:\\.(\\d{1,${t}}))?`),b("COERCE",`${d[h.COERCEPLAIN]}(?:$|[^\\d])`),b("COERCEFULL",d[h.COERCEPLAIN]+`(?:${d[h.PRERELEASE]})?(?:${d[h.BUILD]})?(?:$|[^\\d])`),b("COERCERTL",d[h.COERCE],!0),b("COERCERTLFULL",d[h.COERCEFULL],!0),b("LONETILDE","(?:~>?)"),b("TILDETRIM",`(\\s*)${d[h.LONETILDE]}\\s+`,!0),e.tildeTrimReplace="$1~",b("TILDE",`^${d[h.LONETILDE]}${d[h.XRANGEPLAIN]}$`),b("TILDELOOSE",`^${d[h.LONETILDE]}${d[h.XRANGEPLAINLOOSE]}$`),b("LONECARET","(?:\\^)"),b("CARETTRIM",`(\\s*)${d[h.LONECARET]}\\s+`,!0),e.caretTrimReplace="$1^",b("CARET",`^${d[h.LONECARET]}${d[h.XRANGEPLAIN]}$`),b("CARETLOOSE",`^${d[h.LONECARET]}${d[h.XRANGEPLAINLOOSE]}$`),b("COMPARATORLOOSE",`^${d[h.GTLT]}\\s*(${d[h.LOOSEPLAIN]})$|^$`),b("COMPARATOR",`^${d[h.GTLT]}\\s*(${d[h.FULLPLAIN]})$|^$`),b("COMPARATORTRIM",`(\\s*)${d[h.GTLT]}\\s*(${d[h.LOOSEPLAIN]}|${d[h.XRANGEPLAIN]})`,!0),e.comparatorTrimReplace="$1$2$3",b("HYPHENRANGE",`^\\s*(${d[h.XRANGEPLAIN]})\\s+-\\s+(${d[h.XRANGEPLAIN]})\\s*$`),b("HYPHENRANGELOOSE",`^\\s*(${d[h.XRANGEPLAINLOOSE]})\\s+-\\s+(${d[h.XRANGEPLAINLOOSE]})\\s*$`),b("STAR","(<|>)?=?\\s*\\*"),b("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),b("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}(F0,F0.exports)),F0.exports}var qy,jx;function uw(){if(jx)return qy;jx=1;const r=Object.freeze({loose:!0}),e=Object.freeze({});return qy=n=>n?typeof n!="object"?r:n:e,qy}var Ky,Ux;function cR(){if(Ux)return Ky;Ux=1;const r=/^[0-9]+$/,e=(n,i)=>{const o=r.test(n),a=r.test(i);return o&&a&&(n=+n,i=+i),n===i?0:o&&!a?-1:a&&!o?1:n<i?-1:1};return Ky={compareIdentifiers:e,rcompareIdentifiers:(n,i)=>e(i,n)},Ky}var Gy,Bx;function Hi(){if(Bx)return Gy;Bx=1;const r=l4(),{MAX_LENGTH:e,MAX_SAFE_INTEGER:t}=c4(),{safeRe:n,safeSrc:i,t:o}=Jm(),a=uw(),{compareIdentifiers:c}=cR();class d{constructor(h,p){if(p=a(p),h instanceof d){if(h.loose===!!p.loose&&h.includePrerelease===!!p.includePrerelease)return h;h=h.version}else if(typeof h!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof h}".`);if(h.length>e)throw new TypeError(`version is longer than ${e} characters`);r("SemVer",h,p),this.options=p,this.loose=!!p.loose,this.includePrerelease=!!p.includePrerelease;const m=h.trim().match(p.loose?n[o.LOOSE]:n[o.FULL]);if(!m)throw new TypeError(`Invalid Version: ${h}`);if(this.raw=h,this.major=+m[1],this.minor=+m[2],this.patch=+m[3],this.major>t||this.major<0)throw new TypeError("Invalid major version");if(this.minor>t||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>t||this.patch<0)throw new TypeError("Invalid patch version");m[4]?this.prerelease=m[4].split(".").map(v=>{if(/^[0-9]+$/.test(v)){const _=+v;if(_>=0&&_<t)return _}return v}):this.prerelease=[],this.build=m[5]?m[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(h){if(r("SemVer.compare",this.version,this.options,h),!(h instanceof d)){if(typeof h=="string"&&h===this.version)return 0;h=new d(h,this.options)}return h.version===this.version?0:this.compareMain(h)||this.comparePre(h)}compareMain(h){return h instanceof d||(h=new d(h,this.options)),c(this.major,h.major)||c(this.minor,h.minor)||c(this.patch,h.patch)}comparePre(h){if(h instanceof d||(h=new d(h,this.options)),this.prerelease.length&&!h.prerelease.length)return-1;if(!this.prerelease.length&&h.prerelease.length)return 1;if(!this.prerelease.length&&!h.prerelease.length)return 0;let p=0;do{const m=this.prerelease[p],v=h.prerelease[p];if(r("prerelease compare",p,m,v),m===void 0&&v===void 0)return 0;if(v===void 0)return 1;if(m===void 0)return-1;if(m===v)continue;return c(m,v)}while(++p)}compareBuild(h){h instanceof d||(h=new d(h,this.options));let p=0;do{const m=this.build[p],v=h.build[p];if(r("build compare",p,m,v),m===void 0&&v===void 0)return 0;if(v===void 0)return 1;if(m===void 0)return-1;if(m===v)continue;return c(m,v)}while(++p)}inc(h,p,m){if(h.startsWith("pre")){if(!p&&m===!1)throw new Error("invalid increment argument: identifier is empty");if(p){const v=new RegExp(`^${this.options.loose?i[o.PRERELEASELOOSE]:i[o.PRERELEASE]}$`),_=`-${p}`.match(v);if(!_||_[1]!==p)throw new Error(`invalid identifier: ${p}`)}}switch(h){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",p,m);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",p,m);break;case"prepatch":this.prerelease.length=0,this.inc("patch",p,m),this.inc("pre",p,m);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",p,m),this.inc("pre",p,m);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{const v=Number(m)?1:0;if(this.prerelease.length===0)this.prerelease=[v];else{let _=this.prerelease.length;for(;--_>=0;)typeof this.prerelease[_]=="number"&&(this.prerelease[_]++,_=-2);if(_===-1){if(p===this.prerelease.join(".")&&m===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(v)}}if(p){let _=[p,v];m===!1&&(_=[p]),c(this.prerelease[0],p)===0?isNaN(this.prerelease[1])&&(this.prerelease=_):this.prerelease=_}break}default:throw new Error(`invalid increment argument: ${h}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}return Gy=d,Gy}var Wy,qx;function Qf(){if(qx)return Wy;qx=1;const r=Hi();return Wy=(t,n,i=!1)=>{if(t instanceof r)return t;try{return new r(t,n)}catch(o){if(!i)return null;throw o}},Wy}var Yy,Kx;function wH(){if(Kx)return Yy;Kx=1;const r=Qf();return Yy=(t,n)=>{const i=r(t,n);return i?i.version:null},Yy}var Qy,Gx;function xH(){if(Gx)return Qy;Gx=1;const r=Qf();return Qy=(t,n)=>{const i=r(t.trim().replace(/^[=v]+/,""),n);return i?i.version:null},Qy}var Xy,Wx;function CH(){if(Wx)return Xy;Wx=1;const r=Hi();return Xy=(t,n,i,o,a)=>{typeof i=="string"&&(a=o,o=i,i=void 0);try{return new r(t instanceof r?t.version:t,i).inc(n,o,a).version}catch{return null}},Xy}var Jy,Yx;function kH(){if(Yx)return Jy;Yx=1;const r=Qf();return Jy=(t,n)=>{const i=r(t,null,!0),o=r(n,null,!0),a=i.compare(o);if(a===0)return null;const c=a>0,d=c?i:o,u=c?o:i,h=!!d.prerelease.length;if(!!u.prerelease.length&&!h){if(!u.patch&&!u.minor)return"major";if(u.compareMain(d)===0)return u.minor&&!u.patch?"minor":"patch"}const m=h?"pre":"";return i.major!==o.major?m+"major":i.minor!==o.minor?m+"minor":i.patch!==o.patch?m+"patch":"prerelease"},Jy}var e3,Qx;function EH(){if(Qx)return e3;Qx=1;const r=Hi();return e3=(t,n)=>new r(t,n).major,e3}var t3,Xx;function SH(){if(Xx)return t3;Xx=1;const r=Hi();return t3=(t,n)=>new r(t,n).minor,t3}var r3,Jx;function AH(){if(Jx)return r3;Jx=1;const r=Hi();return r3=(t,n)=>new r(t,n).patch,r3}var n3,eC;function TH(){if(eC)return n3;eC=1;const r=Qf();return n3=(t,n)=>{const i=r(t,n);return i&&i.prerelease.length?i.prerelease:null},n3}var i3,tC;function za(){if(tC)return i3;tC=1;const r=Hi();return i3=(t,n,i)=>new r(t,i).compare(new r(n,i)),i3}var o3,rC;function IH(){if(rC)return o3;rC=1;const r=za();return o3=(t,n,i)=>r(n,t,i),o3}var a3,nC;function RH(){if(nC)return a3;nC=1;const r=za();return a3=(t,n)=>r(t,n,!0),a3}var s3,iC;function hw(){if(iC)return s3;iC=1;const r=Hi();return s3=(t,n,i)=>{const o=new r(t,i),a=new r(n,i);return o.compare(a)||o.compareBuild(a)},s3}var c3,oC;function PH(){if(oC)return c3;oC=1;const r=hw();return c3=(t,n)=>t.sort((i,o)=>r(i,o,n)),c3}var l3,aC;function MH(){if(aC)return l3;aC=1;const r=hw();return l3=(t,n)=>t.sort((i,o)=>r(o,i,n)),l3}var d3,sC;function d4(){if(sC)return d3;sC=1;const r=za();return d3=(t,n,i)=>r(t,n,i)>0,d3}var u3,cC;function fw(){if(cC)return u3;cC=1;const r=za();return u3=(t,n,i)=>r(t,n,i)<0,u3}var h3,lC;function lR(){if(lC)return h3;lC=1;const r=za();return h3=(t,n,i)=>r(t,n,i)===0,h3}var f3,dC;function dR(){if(dC)return f3;dC=1;const r=za();return f3=(t,n,i)=>r(t,n,i)!==0,f3}var p3,uC;function pw(){if(uC)return p3;uC=1;const r=za();return p3=(t,n,i)=>r(t,n,i)>=0,p3}var m3,hC;function mw(){if(hC)return m3;hC=1;const r=za();return m3=(t,n,i)=>r(t,n,i)<=0,m3}var g3,fC;function uR(){if(fC)return g3;fC=1;const r=lR(),e=dR(),t=d4(),n=pw(),i=fw(),o=mw();return g3=(c,d,u,h)=>{switch(d){case"===":return typeof c=="object"&&(c=c.version),typeof u=="object"&&(u=u.version),c===u;case"!==":return typeof c=="object"&&(c=c.version),typeof u=="object"&&(u=u.version),c!==u;case"":case"=":case"==":return r(c,u,h);case"!=":return e(c,u,h);case">":return t(c,u,h);case">=":return n(c,u,h);case"<":return i(c,u,h);case"<=":return o(c,u,h);default:throw new TypeError(`Invalid operator: ${d}`)}},g3}var v3,pC;function $H(){if(pC)return v3;pC=1;const r=Hi(),e=Qf(),{safeRe:t,t:n}=Jm();return v3=(o,a)=>{if(o instanceof r)return o;if(typeof o=="number"&&(o=String(o)),typeof o!="string")return null;a=a||{};let c=null;if(!a.rtl)c=o.match(a.includePrerelease?t[n.COERCEFULL]:t[n.COERCE]);else{const v=a.includePrerelease?t[n.COERCERTLFULL]:t[n.COERCERTL];let _;for(;(_=v.exec(o))&&(!c||c.index+c[0].length!==o.length);)(!c||_.index+_[0].length!==c.index+c[0].length)&&(c=_),v.lastIndex=_.index+_[1].length+_[2].length;v.lastIndex=-1}if(c===null)return null;const d=c[2],u=c[3]||"0",h=c[4]||"0",p=a.includePrerelease&&c[5]?`-${c[5]}`:"",m=a.includePrerelease&&c[6]?`+${c[6]}`:"";return e(`${d}.${u}.${h}${p}${m}`,a)},v3}var y3,mC;function OH(){if(mC)return y3;mC=1;class r{constructor(){this.max=1e3,this.map=new Map}get(t){const n=this.map.get(t);if(n!==void 0)return this.map.delete(t),this.map.set(t,n),n}delete(t){return this.map.delete(t)}set(t,n){if(!this.delete(t)&&n!==void 0){if(this.map.size>=this.max){const o=this.map.keys().next().value;this.delete(o)}this.map.set(t,n)}return this}}return y3=r,y3}var _3,gC;function ja(){if(gC)return _3;gC=1;const r=/\s+/g;class e{constructor(q,re){if(re=i(re),q instanceof e)return q.loose===!!re.loose&&q.includePrerelease===!!re.includePrerelease?q:new e(q.raw,re);if(q instanceof o)return this.raw=q.value,this.set=[[q]],this.formatted=void 0,this;if(this.options=re,this.loose=!!re.loose,this.includePrerelease=!!re.includePrerelease,this.raw=q.trim().replace(r," "),this.set=this.raw.split("||").map(W=>this.parseRange(W.trim())).filter(W=>W.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const W=this.set[0];if(this.set=this.set.filter($=>!b($[0])),this.set.length===0)this.set=[W];else if(this.set.length>1){for(const $ of this.set)if($.length===1&&C($[0])){this.set=[$];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let q=0;q<this.set.length;q++){q>0&&(this.formatted+="||");const re=this.set[q];for(let W=0;W<re.length;W++)W>0&&(this.formatted+=" "),this.formatted+=re[W].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(q){const W=((this.options.includePrerelease&&v)|(this.options.loose&&_))+":"+q,$=n.get(W);if($)return $;const L=this.options.loose,D=L?d[u.HYPHENRANGELOOSE]:d[u.HYPHENRANGE];q=q.replace(D,ke(this.options.includePrerelease)),a("hyphen replace",q),q=q.replace(d[u.COMPARATORTRIM],h),a("comparator trim",q),q=q.replace(d[u.TILDETRIM],p),a("tilde trim",q),q=q.replace(d[u.CARETTRIM],m),a("caret trim",q);let Z=q.split(" ").map(Ee=>A(Ee,this.options)).join(" ").split(/\s+/).map(Ee=>Te(Ee,this.options));L&&(Z=Z.filter(Ee=>(a("loose invalid filter",Ee,this.options),!!Ee.match(d[u.COMPARATORLOOSE])))),a("range list",Z);const N=new Map,ae=Z.map(Ee=>new o(Ee,this.options));for(const Ee of ae){if(b(Ee))return[Ee];N.set(Ee.value,Ee)}N.size>1&&N.has("")&&N.delete("");const He=[...N.values()];return n.set(W,He),He}intersects(q,re){if(!(q instanceof e))throw new TypeError("a Range is required");return this.set.some(W=>T(W,re)&&q.set.some($=>T($,re)&&W.every(L=>$.every(D=>L.intersects(D,re)))))}test(q){if(!q)return!1;if(typeof q=="string")try{q=new c(q,this.options)}catch{return!1}for(let re=0;re<this.set.length;re++)if(xe(this.set[re],q,this.options))return!0;return!1}}_3=e;const t=OH(),n=new t,i=uw(),o=u4(),a=l4(),c=Hi(),{safeRe:d,t:u,comparatorTrimReplace:h,tildeTrimReplace:p,caretTrimReplace:m}=Jm(),{FLAG_INCLUDE_PRERELEASE:v,FLAG_LOOSE:_}=c4(),b=X=>X.value==="<0.0.0-0",C=X=>X.value==="",T=(X,q)=>{let re=!0;const W=X.slice();let $=W.pop();for(;re&&W.length;)re=W.every(L=>$.intersects(L,q)),$=W.pop();return re},A=(X,q)=>(a("comp",X,q),X=z(X,q),a("caret",X),X=O(X,q),a("tildes",X),X=Y(X,q),a("xrange",X),X=le(X,q),a("stars",X),X),I=X=>!X||X.toLowerCase()==="x"||X==="*",O=(X,q)=>X.trim().split(/\s+/).map(re=>B(re,q)).join(" "),B=(X,q)=>{const re=q.loose?d[u.TILDELOOSE]:d[u.TILDE];return X.replace(re,(W,$,L,D,Z)=>{a("tilde",X,W,$,L,D,Z);let N;return I($)?N="":I(L)?N=`>=${$}.0.0 <${+$+1}.0.0-0`:I(D)?N=`>=${$}.${L}.0 <${$}.${+L+1}.0-0`:Z?(a("replaceTilde pr",Z),N=`>=${$}.${L}.${D}-${Z} <${$}.${+L+1}.0-0`):N=`>=${$}.${L}.${D} <${$}.${+L+1}.0-0`,a("tilde return",N),N})},z=(X,q)=>X.trim().split(/\s+/).map(re=>R(re,q)).join(" "),R=(X,q)=>{a("caret",X,q);const re=q.loose?d[u.CARETLOOSE]:d[u.CARET],W=q.includePrerelease?"-0":"";return X.replace(re,($,L,D,Z,N)=>{a("caret",X,$,L,D,Z,N);let ae;return I(L)?ae="":I(D)?ae=`>=${L}.0.0${W} <${+L+1}.0.0-0`:I(Z)?L==="0"?ae=`>=${L}.${D}.0${W} <${L}.${+D+1}.0-0`:ae=`>=${L}.${D}.0${W} <${+L+1}.0.0-0`:N?(a("replaceCaret pr",N),L==="0"?D==="0"?ae=`>=${L}.${D}.${Z}-${N} <${L}.${D}.${+Z+1}-0`:ae=`>=${L}.${D}.${Z}-${N} <${L}.${+D+1}.0-0`:ae=`>=${L}.${D}.${Z}-${N} <${+L+1}.0.0-0`):(a("no pr"),L==="0"?D==="0"?ae=`>=${L}.${D}.${Z}${W} <${L}.${D}.${+Z+1}-0`:ae=`>=${L}.${D}.${Z}${W} <${L}.${+D+1}.0-0`:ae=`>=${L}.${D}.${Z} <${+L+1}.0.0-0`),a("caret return",ae),ae})},Y=(X,q)=>(a("replaceXRanges",X,q),X.split(/\s+/).map(re=>ue(re,q)).join(" ")),ue=(X,q)=>{X=X.trim();const re=q.loose?d[u.XRANGELOOSE]:d[u.XRANGE];return X.replace(re,(W,$,L,D,Z,N)=>{a("xRange",X,W,$,L,D,Z,N);const ae=I(L),He=ae||I(D),Ee=He||I(Z),Ae=Ee;return $==="="&&Ae&&($=""),N=q.includePrerelease?"-0":"",ae?$===">"||$==="<"?W="<0.0.0-0":W="*":$&&Ae?(He&&(D=0),Z=0,$===">"?($=">=",He?(L=+L+1,D=0,Z=0):(D=+D+1,Z=0)):$==="<="&&($="<",He?L=+L+1:D=+D+1),$==="<"&&(N="-0"),W=`${$+L}.${D}.${Z}${N}`):He?W=`>=${L}.0.0${N} <${+L+1}.0.0-0`:Ee&&(W=`>=${L}.${D}.0${N} <${L}.${+D+1}.0-0`),a("xRange return",W),W})},le=(X,q)=>(a("replaceStars",X,q),X.trim().replace(d[u.STAR],"")),Te=(X,q)=>(a("replaceGTE0",X,q),X.trim().replace(d[q.includePrerelease?u.GTE0PRE:u.GTE0],"")),ke=X=>(q,re,W,$,L,D,Z,N,ae,He,Ee,Ae)=>(I(W)?re="":I($)?re=`>=${W}.0.0${X?"-0":""}`:I(L)?re=`>=${W}.${$}.0${X?"-0":""}`:D?re=`>=${re}`:re=`>=${re}${X?"-0":""}`,I(ae)?N="":I(He)?N=`<${+ae+1}.0.0-0`:I(Ee)?N=`<${ae}.${+He+1}.0-0`:Ae?N=`<=${ae}.${He}.${Ee}-${Ae}`:X?N=`<${ae}.${He}.${+Ee+1}-0`:N=`<=${N}`,`${re} ${N}`.trim()),xe=(X,q,re)=>{for(let W=0;W<X.length;W++)if(!X[W].test(q))return!1;if(q.prerelease.length&&!re.includePrerelease){for(let W=0;W<X.length;W++)if(a(X[W].semver),X[W].semver!==o.ANY&&X[W].semver.prerelease.length>0){const $=X[W].semver;if($.major===q.major&&$.minor===q.minor&&$.patch===q.patch)return!0}return!1}return!0};return _3}var b3,vC;function u4(){if(vC)return b3;vC=1;const r=Symbol("SemVer ANY");class e{static get ANY(){return r}constructor(h,p){if(p=t(p),h instanceof e){if(h.loose===!!p.loose)return h;h=h.value}h=h.trim().split(/\s+/).join(" "),a("comparator",h,p),this.options=p,this.loose=!!p.loose,this.parse(h),this.semver===r?this.value="":this.value=this.operator+this.semver.version,a("comp",this)}parse(h){const p=this.options.loose?n[i.COMPARATORLOOSE]:n[i.COMPARATOR],m=h.match(p);if(!m)throw new TypeError(`Invalid comparator: ${h}`);this.operator=m[1]!==void 0?m[1]:"",this.operator==="="&&(this.operator=""),m[2]?this.semver=new c(m[2],this.options.loose):this.semver=r}toString(){return this.value}test(h){if(a("Comparator.test",h,this.options.loose),this.semver===r||h===r)return!0;if(typeof h=="string")try{h=new c(h,this.options)}catch{return!1}return o(h,this.operator,this.semver,this.options)}intersects(h,p){if(!(h instanceof e))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new d(h.value,p).test(this.value):h.operator===""?h.value===""?!0:new d(this.value,p).test(h.semver):(p=t(p),p.includePrerelease&&(this.value==="<0.0.0-0"||h.value==="<0.0.0-0")||!p.includePrerelease&&(this.value.startsWith("<0.0.0")||h.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&h.operator.startsWith(">")||this.operator.startsWith("<")&&h.operator.startsWith("<")||this.semver.version===h.semver.version&&this.operator.includes("=")&&h.operator.includes("=")||o(this.semver,"<",h.semver,p)&&this.operator.startsWith(">")&&h.operator.startsWith("<")||o(this.semver,">",h.semver,p)&&this.operator.startsWith("<")&&h.operator.startsWith(">")))}}b3=e;const t=uw(),{safeRe:n,t:i}=Jm(),o=uR(),a=l4(),c=Hi(),d=ja();return b3}var w3,yC;function h4(){if(yC)return w3;yC=1;const r=ja();return w3=(t,n,i)=>{try{n=new r(n,i)}catch{return!1}return n.test(t)},w3}var x3,_C;function ZH(){if(_C)return x3;_C=1;const r=ja();return x3=(t,n)=>new r(t,n).set.map(i=>i.map(o=>o.value).join(" ").trim().split(" ")),x3}var C3,bC;function LH(){if(bC)return C3;bC=1;const r=Hi(),e=ja();return C3=(n,i,o)=>{let a=null,c=null,d=null;try{d=new e(i,o)}catch{return null}return n.forEach(u=>{d.test(u)&&(!a||c.compare(u)===-1)&&(a=u,c=new r(a,o))}),a},C3}var k3,wC;function HH(){if(wC)return k3;wC=1;const r=Hi(),e=ja();return k3=(n,i,o)=>{let a=null,c=null,d=null;try{d=new e(i,o)}catch{return null}return n.forEach(u=>{d.test(u)&&(!a||c.compare(u)===1)&&(a=u,c=new r(a,o))}),a},k3}var E3,xC;function NH(){if(xC)return E3;xC=1;const r=Hi(),e=ja(),t=d4();return E3=(i,o)=>{i=new e(i,o);let a=new r("0.0.0");if(i.test(a)||(a=new r("0.0.0-0"),i.test(a)))return a;a=null;for(let c=0;c<i.set.length;++c){const d=i.set[c];let u=null;d.forEach(h=>{const p=new r(h.semver.version);switch(h.operator){case">":p.prerelease.length===0?p.patch++:p.prerelease.push(0),p.raw=p.format();case"":case">=":(!u||t(p,u))&&(u=p);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${h.operator}`)}}),u&&(!a||t(a,u))&&(a=u)}return a&&i.test(a)?a:null},E3}var S3,CC;function DH(){if(CC)return S3;CC=1;const r=ja();return S3=(t,n)=>{try{return new r(t,n).range||"*"}catch{return null}},S3}var A3,kC;function gw(){if(kC)return A3;kC=1;const r=Hi(),e=u4(),{ANY:t}=e,n=ja(),i=h4(),o=d4(),a=fw(),c=mw(),d=pw();return A3=(h,p,m,v)=>{h=new r(h,v),p=new n(p,v);let _,b,C,T,A;switch(m){case">":_=o,b=c,C=a,T=">",A=">=";break;case"<":_=a,b=d,C=o,T="<",A="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(i(h,p,v))return!1;for(let I=0;I<p.set.length;++I){const O=p.set[I];let B=null,z=null;if(O.forEach(R=>{R.semver===t&&(R=new e(">=0.0.0")),B=B||R,z=z||R,_(R.semver,B.semver,v)?B=R:C(R.semver,z.semver,v)&&(z=R)}),B.operator===T||B.operator===A||(!z.operator||z.operator===T)&&b(h,z.semver))return!1;if(z.operator===A&&C(h,z.semver))return!1}return!0},A3}var T3,EC;function VH(){if(EC)return T3;EC=1;const r=gw();return T3=(t,n,i)=>r(t,n,">",i),T3}var I3,SC;function FH(){if(SC)return I3;SC=1;const r=gw();return I3=(t,n,i)=>r(t,n,"<",i),I3}var R3,AC;function zH(){if(AC)return R3;AC=1;const r=ja();return R3=(t,n,i)=>(t=new r(t,i),n=new r(n,i),t.intersects(n,i)),R3}var P3,TC;function jH(){if(TC)return P3;TC=1;const r=h4(),e=za();return P3=(t,n,i)=>{const o=[];let a=null,c=null;const d=t.sort((m,v)=>e(m,v,i));for(const m of d)r(m,n,i)?(c=m,a||(a=m)):(c&&o.push([a,c]),c=null,a=null);a&&o.push([a,null]);const u=[];for(const[m,v]of o)m===v?u.push(m):!v&&m===d[0]?u.push("*"):v?m===d[0]?u.push(`<=${v}`):u.push(`${m} - ${v}`):u.push(`>=${m}`);const h=u.join(" || "),p=typeof n.raw=="string"?n.raw:String(n);return h.length<p.length?h:n},P3}var M3,IC;function UH(){if(IC)return M3;IC=1;const r=ja(),e=u4(),{ANY:t}=e,n=h4(),i=za(),o=(p,m,v={})=>{if(p===m)return!0;p=new r(p,v),m=new r(m,v);let _=!1;e:for(const b of p.set){for(const C of m.set){const T=d(b,C,v);if(_=_||T!==null,T)continue e}if(_)return!1}return!0},a=[new e(">=0.0.0-0")],c=[new e(">=0.0.0")],d=(p,m,v)=>{if(p===m)return!0;if(p.length===1&&p[0].semver===t){if(m.length===1&&m[0].semver===t)return!0;v.includePrerelease?p=a:p=c}if(m.length===1&&m[0].semver===t){if(v.includePrerelease)return!0;m=c}const _=new Set;let b,C;for(const Y of p)Y.operator===">"||Y.operator===">="?b=u(b,Y,v):Y.operator==="<"||Y.operator==="<="?C=h(C,Y,v):_.add(Y.semver);if(_.size>1)return null;let T;if(b&&C){if(T=i(b.semver,C.semver,v),T>0)return null;if(T===0&&(b.operator!==">="||C.operator!=="<="))return null}for(const Y of _){if(b&&!n(Y,String(b),v)||C&&!n(Y,String(C),v))return null;for(const ue of m)if(!n(Y,String(ue),v))return!1;return!0}let A,I,O,B,z=C&&!v.includePrerelease&&C.semver.prerelease.length?C.semver:!1,R=b&&!v.includePrerelease&&b.semver.prerelease.length?b.semver:!1;z&&z.prerelease.length===1&&C.operator==="<"&&z.prerelease[0]===0&&(z=!1);for(const Y of m){if(B=B||Y.operator===">"||Y.operator===">=",O=O||Y.operator==="<"||Y.operator==="<=",b){if(R&&Y.semver.prerelease&&Y.semver.prerelease.length&&Y.semver.major===R.major&&Y.semver.minor===R.minor&&Y.semver.patch===R.patch&&(R=!1),Y.operator===">"||Y.operator===">="){if(A=u(b,Y,v),A===Y&&A!==b)return!1}else if(b.operator===">="&&!n(b.semver,String(Y),v))return!1}if(C){if(z&&Y.semver.prerelease&&Y.semver.prerelease.length&&Y.semver.major===z.major&&Y.semver.minor===z.minor&&Y.semver.patch===z.patch&&(z=!1),Y.operator==="<"||Y.operator==="<="){if(I=h(C,Y,v),I===Y&&I!==C)return!1}else if(C.operator==="<="&&!n(C.semver,String(Y),v))return!1}if(!Y.operator&&(C||b)&&T!==0)return!1}return!(b&&O&&!C&&T!==0||C&&B&&!b&&T!==0||R||z)},u=(p,m,v)=>{if(!p)return m;const _=i(p.semver,m.semver,v);return _>0?p:_<0||m.operator===">"&&p.operator===">="?m:p},h=(p,m,v)=>{if(!p)return m;const _=i(p.semver,m.semver,v);return _<0?p:_>0||m.operator==="<"&&p.operator==="<="?m:p};return M3=o,M3}var $3,RC;function BH(){if(RC)return $3;RC=1;const r=Jm(),e=c4(),t=Hi(),n=cR(),i=Qf(),o=wH(),a=xH(),c=CH(),d=kH(),u=EH(),h=SH(),p=AH(),m=TH(),v=za(),_=IH(),b=RH(),C=hw(),T=PH(),A=MH(),I=d4(),O=fw(),B=lR(),z=dR(),R=pw(),Y=mw(),ue=uR(),le=$H(),Te=u4(),ke=ja(),xe=h4(),X=ZH(),q=LH(),re=HH(),W=NH(),$=DH(),L=gw(),D=VH(),Z=FH(),N=zH(),ae=jH(),He=UH();return $3={parse:i,valid:o,clean:a,inc:c,diff:d,major:u,minor:h,patch:p,prerelease:m,compare:v,rcompare:_,compareLoose:b,compareBuild:C,sort:T,rsort:A,gt:I,lt:O,eq:B,neq:z,gte:R,lte:Y,cmp:ue,coerce:le,Comparator:Te,Range:ke,satisfies:xe,toComparators:X,maxSatisfying:q,minSatisfying:re,minVersion:W,validRange:$,outside:L,gtr:D,ltr:Z,intersects:N,simplifyRange:ae,subset:He,SemVer:t,re:r.re,src:r.src,tokens:r.t,SEMVER_SPEC_VERSION:e.SEMVER_SPEC_VERSION,RELEASE_TYPES:e.RELEASE_TYPES,compareIdentifiers:n.compareIdentifiers,rcompareIdentifiers:n.rcompareIdentifiers},$3}var kb=BH();const cp=zu(kb);class fs extends kb.SemVer{satisfies(e){return kb.satisfies(this,e)}}var qH={};let KH=class{constructor(e){Le(this,"domain");Le(this,"level",Number(qH.FUSION_LOG_LEVEL)||1);this.domain=e}_createMessage(e){return[`%c FUSION FRAMEWORK %c ${this.domain} %c %s`,"background: rgb(179, 13, 47); color: white; padding: 1px;","background: rgb(244, 244, 244); color: rgb(36, 55, 70); padding: 1px;","background: none; color: inherit",...e.reduce((t,n)=>t.concat(n,`
41
41
  `),[])]}debug(...e){this.level>3&&console.debug(...this._createMessage(e))}info(...e){this.level>2&&console.info(...this._createMessage(e))}warn(...e){this.level>1&&console.warn(...this._createMessage(e))}error(...e){this.level>0&&console.error(...this._createMessage(e))}};class hR extends KH{formatModuleName(e){return`📦\x1B[1;32m${(typeof e=="string"?e:e.name).replace(/([A-Z])/g," $1").toUpperCase()}\x1B[0m`}}var Eb=function(r,e){return Eb=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])},Eb(r,e)};function xi(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");Eb(r,e);function t(){this.constructor=r}r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var Cn=function(){return Cn=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},Cn.apply(this,arguments)};function fR(r,e){var t={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(t[n[i]]=r[n[i]]);return t}function P(r,e,t,n){var i=arguments.length,o=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(r,e,t,n);else for(var c=r.length-1;c>=0;c--)(a=r[c])&&(o=(i<3?a(o):i>3?a(e,t,o):a(e,t))||o);return i>3&&o&&Object.defineProperty(e,t,o),o}function mc(r,e,t,n){function i(o){return o instanceof t?o:new t(function(a){a(o)})}return new(t||(t=Promise))(function(o,a){function c(h){try{u(n.next(h))}catch(p){a(p)}}function d(h){try{u(n.throw(h))}catch(p){a(p)}}function u(h){h.done?o(h.value):i(h.value).then(c,d)}u((n=n.apply(r,e||[])).next())})}function pR(r,e){var t={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return a.next=c(0),a.throw=c(1),a.return=c(2),typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function c(u){return function(h){return d([u,h])}}function d(u){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,u[0]&&(t=0)),t;)try{if(n=1,i&&(o=u[0]&2?i.return:u[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,u[1])).done)return o;switch(i=0,o&&(u=[u[0]&2,o.value]),u[0]){case 0:case 1:o=u;break;case 4:return t.label++,{value:u[1],done:!1};case 5:t.label++,i=u[1],u=[0];continue;case 7:u=t.ops.pop(),t.trys.pop();continue;default:if(o=t.trys,!(o=o.length>0&&o[o.length-1])&&(u[0]===6||u[0]===2)){t=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]<o[3])){t.label=u[1];break}if(u[0]===6&&t.label<o[1]){t.label=o[1],o=u;break}if(o&&t.label<o[2]){t.label=o[2],t.ops.push(u);break}o[2]&&t.ops.pop(),t.trys.pop();continue}u=e.call(r,t)}catch(h){u=[6,h],i=0}finally{n=o=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}function $i(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function _s(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(c){a={error:c}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(a)throw a.error}}return o}function bc(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return r.concat(o||Array.prototype.slice.call(e))}function tf(r){return this instanceof tf?(this.v=r,this):new tf(r)}function GH(r,e,t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=t.apply(r,e||[]),i,o=[];return i=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),c("next"),c("throw"),c("return",a),i[Symbol.asyncIterator]=function(){return this},i;function a(v){return function(_){return Promise.resolve(_).then(v,p)}}function c(v,_){n[v]&&(i[v]=function(b){return new Promise(function(C,T){o.push([v,b,C,T])>1||d(v,b)})},_&&(i[v]=_(i[v])))}function d(v,_){try{u(n[v](_))}catch(b){m(o[0][3],b)}}function u(v){v.value instanceof tf?Promise.resolve(v.value.v).then(h,p):m(o[0][2],v)}function h(v){d("next",v)}function p(v){d("throw",v)}function m(v,_){v(_),o.shift(),o.length&&d(o[0][0],o[0][1])}}function WH(r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=r[Symbol.asyncIterator],t;return e?e.call(r):(r=typeof $i=="function"?$i(r):r[Symbol.iterator](),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(o){t[o]=r[o]&&function(a){return new Promise(function(c,d){a=r[o](a),i(c,d,a.done,a.value)})}}function i(o,a,c,d){Promise.resolve(d).then(function(u){o({value:u,done:c})},a)}}function Re(r,e,t,n){if(t==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?r!==e||!n:!e.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?n:t==="a"?n.call(r):n?n.value:e.get(r)}function cc(r,e,t,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?r!==e||!i:!e.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(r,t):i?i.value=t:e.set(r,t),t}function br(r){return typeof r=="function"}function f4(r){var e=function(n){Error.call(n),n.stack=new Error().stack},t=r(e);return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}var O3=f4(function(r){return function(t){r(this),this.message=t?t.length+` errors occurred during unsubscription:
42
42
  `+t.map(function(n,i){return i+1+") "+n.toString()}).join(`
43
- `):"",this.name="UnsubscriptionError",this.errors=t}});function Yg(r,e){if(r){var t=r.indexOf(e);0<=t&&r.splice(t,1)}}var Qn=function(){function r(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return r.prototype.unsubscribe=function(){var e,t,n,i,o;if(!this.closed){this.closed=!0;var a=this._parentage;if(a)if(this._parentage=null,Array.isArray(a))try{for(var c=$i(a),d=c.next();!d.done;d=c.next()){var u=d.value;u.remove(this)}}catch(b){e={error:b}}finally{try{d&&!d.done&&(t=c.return)&&t.call(c)}finally{if(e)throw e.error}}else a.remove(this);var h=this.initialTeardown;if(br(h))try{h()}catch(b){o=b instanceof O3?b.errors:[b]}var p=this._finalizers;if(p){this._finalizers=null;try{for(var m=$i(p),v=m.next();!v.done;v=m.next()){var _=v.value;try{PC(_)}catch(b){o=o??[],b instanceof O3?o=bc(bc([],_s(o)),_s(b.errors)):o.push(b)}}}catch(b){n={error:b}}finally{try{v&&!v.done&&(i=m.return)&&i.call(m)}finally{if(n)throw n.error}}}if(o)throw new O3(o)}},r.prototype.add=function(e){var t;if(e&&e!==this)if(this.closed)PC(e);else{if(e instanceof r){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=(t=this._finalizers)!==null&&t!==void 0?t:[]).push(e)}},r.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},r.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},r.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&Yg(t,e)},r.prototype.remove=function(e){var t=this._finalizers;t&&Yg(t,e),e instanceof r&&e._removeParent(this)},r.EMPTY=function(){var e=new r;return e.closed=!0,e}(),r}(),mR=Qn.EMPTY;function gR(r){return r instanceof Qn||r&&"closed"in r&&br(r.remove)&&br(r.add)&&br(r.unsubscribe)}function PC(r){br(r)?r():r.unsubscribe()}var YH={Promise:void 0},QH={setTimeout:function(r,e){for(var t=[],n=2;n<arguments.length;n++)t[n-2]=arguments[n];return setTimeout.apply(void 0,bc([r,e],_s(t)))},clearTimeout:function(r){return clearTimeout(r)},delegate:void 0};function vR(r){QH.setTimeout(function(){throw r})}function Qg(){}function Tg(r){r()}var vw=function(r){xi(e,r);function e(t){var n=r.call(this)||this;return n.isStopped=!1,t?(n.destination=t,gR(t)&&t.add(n)):n.destination=eN,n}return e.create=function(t,n,i){return new kf(t,n,i)},e.prototype.next=function(t){this.isStopped||this._next(t)},e.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,r.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){try{this.destination.error(t)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e}(Qn),XH=function(){function r(e){this.partialObserver=e}return r.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(n){z0(n)}},r.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(n){z0(n)}else z0(e)},r.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(t){z0(t)}},r}(),kf=function(r){xi(e,r);function e(t,n,i){var o=r.call(this)||this,a;return br(t)||!t?a={next:t??void 0,error:n??void 0,complete:i??void 0}:a=t,o.destination=new XH(a),o}return e}(vw);function z0(r){vR(r)}function JH(r){throw r}var eN={closed:!0,next:Qg,error:JH,complete:Qg},yw=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function As(r){return r}function tN(r){return r.length===0?As:r.length===1?r[0]:function(t){return r.reduce(function(n,i){return i(n)},t)}}var It=function(){function r(e){e&&(this._subscribe=e)}return r.prototype.lift=function(e){var t=new r;return t.source=this,t.operator=e,t},r.prototype.subscribe=function(e,t,n){var i=this,o=nN(e)?e:new kf(e,t,n);return Tg(function(){var a=i,c=a.operator,d=a.source;o.add(c?c.call(o,d):d?i._subscribe(o):i._trySubscribe(o))}),o},r.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},r.prototype.forEach=function(e,t){var n=this;return t=MC(t),new t(function(i,o){var a=new kf({next:function(c){try{e(c)}catch(d){o(d),a.unsubscribe()}},error:o,complete:i});n.subscribe(a)})},r.prototype._subscribe=function(e){var t;return(t=this.source)===null||t===void 0?void 0:t.subscribe(e)},r.prototype[yw]=function(){return this},r.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return tN(e)(this)},r.prototype.toPromise=function(e){var t=this;return e=MC(e),new e(function(n,i){var o;t.subscribe(function(a){return o=a},function(a){return i(a)},function(){return n(o)})})},r.create=function(e){return new r(e)},r}();function MC(r){var e;return(e=r??YH.Promise)!==null&&e!==void 0?e:Promise}function rN(r){return r&&br(r.next)&&br(r.error)&&br(r.complete)}function nN(r){return r&&r instanceof vw||rN(r)&&gR(r)}function iN(r){return br(r==null?void 0:r.lift)}function Mr(r){return function(e){if(iN(e))return e.lift(function(t){try{return r(t,this)}catch(n){this.error(n)}});throw new TypeError("Unable to lift unknown Observable type")}}function Er(r,e,t,n,i){return new yR(r,e,t,n,i)}var yR=function(r){xi(e,r);function e(t,n,i,o,a,c){var d=r.call(this,t)||this;return d.onFinalize=a,d.shouldUnsubscribe=c,d._next=n?function(u){try{n(u)}catch(h){t.error(h)}}:r.prototype._next,d._error=o?function(u){try{o(u)}catch(h){t.error(h)}finally{this.unsubscribe()}}:r.prototype._error,d._complete=i?function(){try{i()}catch(u){t.error(u)}finally{this.unsubscribe()}}:r.prototype._complete,d}return e.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;r.prototype.unsubscribe.call(this),!n&&((t=this.onFinalize)===null||t===void 0||t.call(this))}},e}(vw),oN=f4(function(r){return function(){r(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),Fn=function(r){xi(e,r);function e(){var t=r.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return e.prototype.lift=function(t){var n=new $C(this,this);return n.operator=t,n},e.prototype._throwIfClosed=function(){if(this.closed)throw new oN},e.prototype.next=function(t){var n=this;Tg(function(){var i,o;if(n._throwIfClosed(),!n.isStopped){n.currentObservers||(n.currentObservers=Array.from(n.observers));try{for(var a=$i(n.currentObservers),c=a.next();!c.done;c=a.next()){var d=c.value;d.next(t)}}catch(u){i={error:u}}finally{try{c&&!c.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}}})},e.prototype.error=function(t){var n=this;Tg(function(){if(n._throwIfClosed(),!n.isStopped){n.hasError=n.isStopped=!0,n.thrownError=t;for(var i=n.observers;i.length;)i.shift().error(t)}})},e.prototype.complete=function(){var t=this;Tg(function(){if(t._throwIfClosed(),!t.isStopped){t.isStopped=!0;for(var n=t.observers;n.length;)n.shift().complete()}})},e.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(e.prototype,"observed",{get:function(){var t;return((t=this.observers)===null||t===void 0?void 0:t.length)>0},enumerable:!1,configurable:!0}),e.prototype._trySubscribe=function(t){return this._throwIfClosed(),r.prototype._trySubscribe.call(this,t)},e.prototype._subscribe=function(t){return this._throwIfClosed(),this._checkFinalizedStatuses(t),this._innerSubscribe(t)},e.prototype._innerSubscribe=function(t){var n=this,i=this,o=i.hasError,a=i.isStopped,c=i.observers;return o||a?mR:(this.currentObservers=null,c.push(t),new Qn(function(){n.currentObservers=null,Yg(c,t)}))},e.prototype._checkFinalizedStatuses=function(t){var n=this,i=n.hasError,o=n.thrownError,a=n.isStopped;i?t.error(o):a&&t.complete()},e.prototype.asObservable=function(){var t=new It;return t.source=this,t},e.create=function(t,n){return new $C(t,n)},e}(It),$C=function(r){xi(e,r);function e(t,n){var i=r.call(this)||this;return i.destination=t,i.source=n,i}return e.prototype.next=function(t){var n,i;(i=(n=this.destination)===null||n===void 0?void 0:n.next)===null||i===void 0||i.call(n,t)},e.prototype.error=function(t){var n,i;(i=(n=this.destination)===null||n===void 0?void 0:n.error)===null||i===void 0||i.call(n,t)},e.prototype.complete=function(){var t,n;(n=(t=this.destination)===null||t===void 0?void 0:t.complete)===null||n===void 0||n.call(t)},e.prototype._subscribe=function(t){var n,i;return(i=(n=this.source)===null||n===void 0?void 0:n.subscribe(t))!==null&&i!==void 0?i:mR},e}(Fn),Xf=function(r){xi(e,r);function e(t){var n=r.call(this)||this;return n._value=t,n}return Object.defineProperty(e.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),e.prototype._subscribe=function(t){var n=r.prototype._subscribe.call(this,t);return!n.closed&&t.next(this._value),n},e.prototype.getValue=function(){var t=this,n=t.hasError,i=t.thrownError,o=t._value;if(n)throw i;return this._throwIfClosed(),o},e.prototype.next=function(t){r.prototype.next.call(this,this._value=t)},e}(Fn),_w={now:function(){return(_w.delegate||Date).now()},delegate:void 0},_R=function(r){xi(e,r);function e(t,n,i){t===void 0&&(t=1/0),n===void 0&&(n=1/0),i===void 0&&(i=_w);var o=r.call(this)||this;return o._bufferSize=t,o._windowTime=n,o._timestampProvider=i,o._buffer=[],o._infiniteTimeWindow=!0,o._infiniteTimeWindow=n===1/0,o._bufferSize=Math.max(1,t),o._windowTime=Math.max(1,n),o}return e.prototype.next=function(t){var n=this,i=n.isStopped,o=n._buffer,a=n._infiniteTimeWindow,c=n._timestampProvider,d=n._windowTime;i||(o.push(t),!a&&o.push(c.now()+d)),this._trimBuffer(),r.prototype.next.call(this,t)},e.prototype._subscribe=function(t){this._throwIfClosed(),this._trimBuffer();for(var n=this._innerSubscribe(t),i=this,o=i._infiniteTimeWindow,a=i._buffer,c=a.slice(),d=0;d<c.length&&!t.closed;d+=o?1:2)t.next(c[d]);return this._checkFinalizedStatuses(t),n},e.prototype._trimBuffer=function(){var t=this,n=t._bufferSize,i=t._timestampProvider,o=t._buffer,a=t._infiniteTimeWindow,c=(a?1:2)*n;if(n<1/0&&c<o.length&&o.splice(0,o.length-c),!a){for(var d=i.now(),u=0,h=1;h<o.length&&o[h]<=d;h+=2)u=h;u&&o.splice(0,u+1)}},e}(Fn),aN=function(r){xi(e,r);function e(t,n){return r.call(this)||this}return e.prototype.schedule=function(t,n){return this},e}(Qn),OC={setInterval:function(r,e){for(var t=[],n=2;n<arguments.length;n++)t[n-2]=arguments[n];return setInterval.apply(void 0,bc([r,e],_s(t)))},clearInterval:function(r){return clearInterval(r)},delegate:void 0},sN=function(r){xi(e,r);function e(t,n){var i=r.call(this,t,n)||this;return i.scheduler=t,i.work=n,i.pending=!1,i}return e.prototype.schedule=function(t,n){var i;if(n===void 0&&(n=0),this.closed)return this;this.state=t;var o=this.id,a=this.scheduler;return o!=null&&(this.id=this.recycleAsyncId(a,o,n)),this.pending=!0,this.delay=n,this.id=(i=this.id)!==null&&i!==void 0?i:this.requestAsyncId(a,this.id,n),this},e.prototype.requestAsyncId=function(t,n,i){return i===void 0&&(i=0),OC.setInterval(t.flush.bind(t,this),i)},e.prototype.recycleAsyncId=function(t,n,i){if(i===void 0&&(i=0),i!=null&&this.delay===i&&this.pending===!1)return n;n!=null&&OC.clearInterval(n)},e.prototype.execute=function(t,n){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var i=this._execute(t,n);if(i)return i;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},e.prototype._execute=function(t,n){var i=!1,o;try{this.work(t)}catch(a){i=!0,o=a||new Error("Scheduled action threw falsy error")}if(i)return this.unsubscribe(),o},e.prototype.unsubscribe=function(){if(!this.closed){var t=this,n=t.id,i=t.scheduler,o=i.actions;this.work=this.state=this.scheduler=null,this.pending=!1,Yg(o,this),n!=null&&(this.id=this.recycleAsyncId(i,n,null)),this.delay=null,r.prototype.unsubscribe.call(this)}},e}(aN),ZC=function(){function r(e,t){t===void 0&&(t=r.now),this.schedulerActionCtor=e,this.now=t}return r.prototype.schedule=function(e,t,n){return t===void 0&&(t=0),new this.schedulerActionCtor(this,e).schedule(n,t)},r.now=_w.now,r}(),cN=function(r){xi(e,r);function e(t,n){n===void 0&&(n=ZC.now);var i=r.call(this,t,n)||this;return i.actions=[],i._active=!1,i}return e.prototype.flush=function(t){var n=this.actions;if(this._active){n.push(t);return}var i;this._active=!0;do if(i=t.execute(t.state,t.delay))break;while(t=n.shift());if(this._active=!1,i){for(;t=n.shift();)t.unsubscribe();throw i}},e}(ZC),Ef=new cN(sN),lN=Ef,Tr=new It(function(r){return r.complete()});function bR(r){return r&&br(r.schedule)}function bw(r){return r[r.length-1]}function ww(r){return br(bw(r))?r.pop():void 0}function p4(r){return bR(bw(r))?r.pop():void 0}function dN(r,e){return typeof bw(r)=="number"?r.pop():e}var xw=function(r){return r&&typeof r.length=="number"&&typeof r!="function"};function wR(r){return br(r==null?void 0:r.then)}function xR(r){return br(r[yw])}function CR(r){return Symbol.asyncIterator&&br(r==null?void 0:r[Symbol.asyncIterator])}function kR(r){return new TypeError("You provided "+(r!==null&&typeof r=="object"?"an invalid object":"'"+r+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function uN(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var ER=uN();function SR(r){return br(r==null?void 0:r[ER])}function AR(r){return GH(this,arguments,function(){var t,n,i,o;return pR(this,function(a){switch(a.label){case 0:t=r.getReader(),a.label=1;case 1:a.trys.push([1,,9,10]),a.label=2;case 2:return[4,tf(t.read())];case 3:return n=a.sent(),i=n.value,o=n.done,o?[4,tf(void 0)]:[3,5];case 4:return[2,a.sent()];case 5:return[4,tf(i)];case 6:return[4,a.sent()];case 7:return a.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}})})}function TR(r){return br(r==null?void 0:r.getReader)}function On(r){if(r instanceof It)return r;if(r!=null){if(xR(r))return hN(r);if(xw(r))return fN(r);if(wR(r))return pN(r);if(CR(r))return IR(r);if(SR(r))return mN(r);if(TR(r))return gN(r)}throw kR(r)}function hN(r){return new It(function(e){var t=r[yw]();if(br(t.subscribe))return t.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function fN(r){return new It(function(e){for(var t=0;t<r.length&&!e.closed;t++)e.next(r[t]);e.complete()})}function pN(r){return new It(function(e){r.then(function(t){e.closed||(e.next(t),e.complete())},function(t){return e.error(t)}).then(null,vR)})}function mN(r){return new It(function(e){var t,n;try{for(var i=$i(r),o=i.next();!o.done;o=i.next()){var a=o.value;if(e.next(a),e.closed)return}}catch(c){t={error:c}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}e.complete()})}function IR(r){return new It(function(e){vN(r,e).catch(function(t){return e.error(t)})})}function gN(r){return IR(AR(r))}function vN(r,e){var t,n,i,o;return mc(this,void 0,void 0,function(){var a,c;return pR(this,function(d){switch(d.label){case 0:d.trys.push([0,5,6,11]),t=WH(r),d.label=1;case 1:return[4,t.next()];case 2:if(n=d.sent(),!!n.done)return[3,4];if(a=n.value,e.next(a),e.closed)return[2];d.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return c=d.sent(),i={error:c},[3,11];case 6:return d.trys.push([6,,9,10]),n&&!n.done&&(o=t.return)?[4,o.call(t)]:[3,8];case 7:d.sent(),d.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return e.complete(),[2]}})})}function gc(r,e,t,n,i){n===void 0&&(n=0),i===void 0&&(i=!1);var o=e.schedule(function(){t(),i?r.add(this.schedule(null,n)):this.unsubscribe()},n);if(r.add(o),!i)return o}function Xg(r,e){return e===void 0&&(e=0),Mr(function(t,n){t.subscribe(Er(n,function(i){return gc(n,r,function(){return n.next(i)},e)},function(){return gc(n,r,function(){return n.complete()},e)},function(i){return gc(n,r,function(){return n.error(i)},e)}))})}function RR(r,e){return e===void 0&&(e=0),Mr(function(t,n){n.add(r.schedule(function(){return t.subscribe(n)},e))})}function yN(r,e){return On(r).pipe(RR(e),Xg(e))}function _N(r,e){return On(r).pipe(RR(e),Xg(e))}function bN(r,e){return new It(function(t){var n=0;return e.schedule(function(){n===r.length?t.complete():(t.next(r[n++]),t.closed||this.schedule())})})}function wN(r,e){return new It(function(t){var n;return gc(t,e,function(){n=r[ER](),gc(t,e,function(){var i,o,a;try{i=n.next(),o=i.value,a=i.done}catch(c){t.error(c);return}a?t.complete():t.next(o)},0,!0)}),function(){return br(n==null?void 0:n.return)&&n.return()}})}function PR(r,e){if(!r)throw new Error("Iterable cannot be null");return new It(function(t){gc(t,e,function(){var n=r[Symbol.asyncIterator]();gc(t,e,function(){n.next().then(function(i){i.done?t.complete():t.next(i.value)})},0,!0)})})}function xN(r,e){return PR(AR(r),e)}function CN(r,e){if(r!=null){if(xR(r))return yN(r,e);if(xw(r))return bN(r,e);if(wR(r))return _N(r,e);if(CR(r))return PR(r,e);if(SR(r))return wN(r,e);if(TR(r))return xN(r,e)}throw kR(r)}function at(r,e){return e?CN(r,e):On(r)}function Pt(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var t=p4(r);return at(r,t)}function MR(r,e){var t=br(r)?r:function(){return r},n=function(i){return i.error(t())};return new It(n)}var e2=f4(function(r){return function(){r(this),this.name="EmptyError",this.message="no elements in sequence"}});function hr(r,e){var t=typeof e=="object";return new Promise(function(n,i){var o=!1,a;r.subscribe({next:function(c){a=c,o=!0},error:i,complete:function(){o?n(a):t?n(e.defaultValue):i(new e2)}})})}function Vn(r,e){var t=typeof e=="object";return new Promise(function(n,i){var o=new kf({next:function(a){n(a),o.unsubscribe()},error:i,complete:function(){t?n(e.defaultValue):i(new e2)}});r.subscribe(o)})}function $R(r){return r instanceof Date&&!isNaN(r)}var kN=f4(function(r){return function(t){t===void 0&&(t=null),r(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=t}});function Ks(r,e){var t=$R(r)?{first:r}:typeof r=="number"?{each:r}:r,n=t.first,i=t.each,o=t.with,a=o===void 0?EN:o,c=t.scheduler,d=c===void 0?Ef:c,u=t.meta,h=u===void 0?null:u;if(n==null&&i==null)throw new TypeError("No timeout provided.");return Mr(function(p,m){var v,_,b=null,C=0,T=function(A){_=gc(m,d,function(){try{v.unsubscribe(),On(a({meta:h,lastValue:b,seen:C})).subscribe(m)}catch(I){m.error(I)}},A)};v=p.subscribe(Er(m,function(A){_==null||_.unsubscribe(),C++,m.next(b=A),i>0&&T(i)},void 0,void 0,function(){_!=null&&_.closed||_==null||_.unsubscribe(),b=null})),!C&&T(n!=null?typeof n=="number"?n:+n-d.now():i)})}function EN(r){throw new kN(r)}function me(r,e){return Mr(function(t,n){var i=0;t.subscribe(Er(n,function(o){n.next(r.call(e,o,i++))}))})}var SN=Array.isArray;function AN(r,e){return SN(e)?r.apply(void 0,bc([],_s(e))):r(e)}function Cw(r){return me(function(e){return AN(r,e)})}var TN=Array.isArray,IN=Object.getPrototypeOf,RN=Object.prototype,PN=Object.keys;function OR(r){if(r.length===1){var e=r[0];if(TN(e))return{args:e,keys:null};if(MN(e)){var t=PN(e);return{args:t.map(function(n){return e[n]}),keys:t}}}return{args:r,keys:null}}function MN(r){return r&&typeof r=="object"&&IN(r)===RN}function ZR(r,e){return r.reduce(function(t,n,i){return t[n]=e[i],t},{})}function $N(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var t=p4(r),n=ww(r),i=OR(r),o=i.args,a=i.keys;if(o.length===0)return at([],t);var c=new It(ON(o,t,a?function(d){return ZR(a,d)}:As));return n?c.pipe(Cw(n)):c}function ON(r,e,t){return t===void 0&&(t=As),function(n){LC(e,function(){for(var i=r.length,o=new Array(i),a=i,c=i,d=function(h){LC(e,function(){var p=at(r[h],e),m=!1;p.subscribe(Er(n,function(v){o[h]=v,m||(m=!0,c--),c||n.next(t(o.slice()))},function(){--a||n.complete()}))},n)},u=0;u<i;u++)d(u)},n)}}function LC(r,e,t){r?gc(t,r,e):e()}function LR(r,e,t,n,i,o,a,c){var d=[],u=0,h=0,p=!1,m=function(){p&&!d.length&&!u&&e.complete()},v=function(b){return u<n?_(b):d.push(b)},_=function(b){o&&e.next(b),u++;var C=!1;On(t(b,h++)).subscribe(Er(e,function(T){i==null||i(T),o?v(T):e.next(T)},function(){C=!0},void 0,function(){if(C)try{u--;for(var T=function(){var A=d.shift();a||_(A)};d.length&&u<n;)T();m()}catch(A){e.error(A)}}))};return r.subscribe(Er(e,v,function(){p=!0,m()})),function(){c==null||c()}}function Wn(r,e,t){return t===void 0&&(t=1/0),br(e)?Wn(function(n,i){return me(function(o,a){return e(n,o,i,a)})(On(r(n,i)))},t):(typeof e=="number"&&(t=e),Mr(function(n,i){return LR(n,i,r,t)}))}function HR(r){return r===void 0&&(r=1/0),Wn(As,r)}function ZN(){return HR(1)}function El(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];return ZN()(at(r,p4(r)))}function Ig(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var t=ww(r),n=OR(r),i=n.args,o=n.keys,a=new It(function(c){var d=i.length;if(!d){c.complete();return}for(var u=new Array(d),h=d,p=d,m=function(_){var b=!1;On(i[_]).subscribe(Er(c,function(C){b||(b=!0,p--),u[_]=C},function(){return h--},void 0,function(){(!h||!b)&&(p||c.next(o?ZR(o,u):u),c.complete())}))},v=0;v<d;v++)m(v)});return t?a.pipe(Cw(t)):a}var LN=["addListener","removeListener"],HN=["addEventListener","removeEventListener"],NN=["on","off"];function Sl(r,e,t,n){if(br(t)&&(n=t,t=void 0),n)return Sl(r,e,t).pipe(Cw(n));var i=_s(FN(r)?HN.map(function(c){return function(d){return r[c](e,d,t)}}):DN(r)?LN.map(HC(r,e)):VN(r)?NN.map(HC(r,e)):[],2),o=i[0],a=i[1];if(!o&&xw(r))return Wn(function(c){return Sl(c,e,t)})(On(r));if(!o)throw new TypeError("Invalid event target");return new It(function(c){var d=function(){for(var u=[],h=0;h<arguments.length;h++)u[h]=arguments[h];return c.next(1<u.length?u:u[0])};return o(d),function(){return a(d)}})}function HC(r,e){return function(t){return function(n){return r[t](e,n)}}}function DN(r){return br(r.addListener)&&br(r.removeListener)}function VN(r){return br(r.on)&&br(r.off)}function FN(r){return br(r.addEventListener)&&br(r.removeEventListener)}function kw(r,e,t){r===void 0&&(r=0),t===void 0&&(t=lN);var n=-1;return e!=null&&(bR(e)?t=e:n=e),new It(function(i){var o=$R(r)?+r-t.now():r;o<0&&(o=0);var a=0;return t.schedule(function(){i.closed||(i.next(a++),0<=n?this.schedule(void 0,n):i.complete())},o)})}function zN(r,e){return e===void 0&&(e=Ef),kw(r,r,e)}function Z3(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var t=p4(r),n=dN(r,1/0),i=r;return i.length?i.length===1?On(i[0]):HR(n)(at(i,t)):Tr}function Oe(r,e){return Mr(function(t,n){var i=0;t.subscribe(Er(n,function(o){return r.call(e,o,i++)&&n.next(o)}))})}function jN(r){return function(e){for(var t=[],n=function(o){t.push(On(r[o]).subscribe(Er(e,function(a){if(t){for(var c=0;c<t.length;c++)c!==o&&t[c].unsubscribe();t=null}e.next(a)})))},i=0;t&&!e.closed&&i<r.length;i++)n(i)}}function jt(r){return Mr(function(e,t){var n=null,i=!1,o;n=e.subscribe(Er(t,void 0,void 0,function(a){o=On(r(a,jt(r)(e))),n?(n.unsubscribe(),n=null,o.subscribe(t)):i=!0})),i&&(n.unsubscribe(),n=null,o.subscribe(t))})}function NR(r,e,t,n,i){return function(o,a){var c=t,d=e,u=0;o.subscribe(Er(a,function(h){var p=u++;d=c?r(d,h,p):(c=!0,h),n&&a.next(d)},i&&function(){c&&a.next(d),a.complete()}))}}function zp(r,e){return Mr(NR(r,e,arguments.length>=2,!1,!0))}function bs(r,e){return br(e)?Wn(r,e,1):Wn(r,1)}function Ew(r){return Mr(function(e,t){var n=!1;e.subscribe(Er(t,function(i){n=!0,t.next(i)},function(){n||t.next(r),t.complete()}))})}function lp(r){return r<=0?function(){return Tr}:Mr(function(e,t){var n=0;e.subscribe(Er(t,function(i){++n<=r&&(t.next(i),r<=n&&t.complete())}))})}function Jg(r,e){return e===void 0&&(e=As),r=r??UN,Mr(function(t,n){var i,o=!0;t.subscribe(Er(n,function(a){var c=e(a);(o||!r(i,c))&&(o=!1,i=c,n.next(a))}))})}function UN(r,e){return r===e}function Sw(r){return r===void 0&&(r=BN),Mr(function(e,t){var n=!1;e.subscribe(Er(t,function(i){n=!0,t.next(i)},function(){return n?t.complete():t.error(r())}))})}function BN(){return new e2}function jp(r){return Mr(function(e,t){try{e.subscribe(t)}finally{t.add(r)}})}function K1(r,e){return Mr(qN(r,e,"value"))}function qN(r,e,t){return function(n,i){var o=0;n.subscribe(Er(i,function(a){var c=o++;r.call(e,a,c,n)&&(i.next(a),i.complete())},function(){i.next(void 0),i.complete()}))}}function Gs(r,e){var t=arguments.length>=2;return function(n){return n.pipe(As,lp(1),t?Ew(e):Sw(function(){return new e2}))}}function Aw(r,e,t,n){return Mr(function(i,o){var a;(!e||typeof e=="function")&&(a=e);var c=new Map,d=function(_){c.forEach(_),_(o)},u=function(_){return d(function(b){return b.error(_)})},h=0,p=!1,m=new yR(o,function(_){try{var b=r(_),C=c.get(b);if(!C){c.set(b,C=n?n():new Fn);var T=v(b,C);if(o.next(T),t){var A=Er(C,function(){C.complete(),A==null||A.unsubscribe()},void 0,void 0,function(){return c.delete(b)});m.add(On(t(T)).subscribe(A))}}C.next(a?a(_):_)}catch(I){u(I)}},function(){return d(function(_){return _.complete()})},u,function(){return c.clear()},function(){return p=!0,h===0});i.subscribe(m);function v(_,b){var C=new It(function(T){h++;var A=b.subscribe(T);return function(){A.unsubscribe(),--h===0&&p&&m.unsubscribe()}});return C.key=_,C}})}function KN(r){return r<=0?function(){return Tr}:Mr(function(e,t){var n=[];e.subscribe(Er(t,function(i){n.push(i),r<n.length&&n.shift()},function(){var i,o;try{for(var a=$i(n),c=a.next();!c.done;c=a.next()){var d=c.value;t.next(d)}}catch(u){i={error:u}}finally{try{c&&!c.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}t.complete()},void 0,function(){n=null}))})}function Ci(r,e){var t=arguments.length>=2;return function(n){return n.pipe(As,KN(1),t?Ew(e):Sw(function(){return new e2}))}}function DR(r,e,t){return Mr(function(n,i){var o=e;return LR(n,i,function(a,c){return r(o,a,c)},t,function(a){o=a},!1,void 0,function(){return o=null})})}function ev(){return Mr(function(r,e){var t,n=!1;r.subscribe(Er(e,function(i){var o=t;t=i,n&&e.next([o,i]),n=!0}))})}function Jc(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];return r.length?Mr(function(t,n){jN(bc([t],_s(r)))(n)}):As}function GN(r,e){return Mr(NR(r,e,arguments.length>=2,!0))}function Jf(r){r===void 0&&(r={});var e=r.connector,t=e===void 0?function(){return new Fn}:e,n=r.resetOnError,i=n===void 0?!0:n,o=r.resetOnComplete,a=o===void 0?!0:o,c=r.resetOnRefCountZero,d=c===void 0?!0:c;return function(u){var h,p,m,v=0,_=!1,b=!1,C=function(){p==null||p.unsubscribe(),p=void 0},T=function(){C(),h=m=void 0,_=b=!1},A=function(){var I=h;T(),I==null||I.unsubscribe()};return Mr(function(I,O){v++,!b&&!_&&C();var B=m=m??t();O.add(function(){v--,v===0&&!b&&!_&&(p=L3(A,d))}),B.subscribe(O),!h&&v>0&&(h=new kf({next:function(z){return B.next(z)},error:function(z){b=!0,C(),p=L3(T,i,z),B.error(z)},complete:function(){_=!0,C(),p=L3(T,a),B.complete()}}),On(I).subscribe(h))})(u)}}function L3(r,e){for(var t=[],n=2;n<arguments.length;n++)t[n-2]=arguments[n];if(e===!0){r();return}if(e!==!1){var i=new kf({next:function(){i.unsubscribe(),r()}});return On(e.apply(void 0,bc([],_s(t)))).subscribe(i)}}function WN(r,e,t){var n,i=!1;return n=1/0,Jf({connector:function(){return new _R(n,e,t)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:i})}function Qt(r,e){return Mr(function(t,n){var i=null,o=0,a=!1,c=function(){return a&&!i&&n.complete()};t.subscribe(Er(n,function(d){i==null||i.unsubscribe();var u=0,h=o++;On(r(d,h)).subscribe(i=Er(n,function(p){return n.next(e?e(d,p,h,u++):p)},function(){i=null,c()}))},function(){a=!0,c()}))})}function Al(r){return Mr(function(e,t){On(r).subscribe(Er(t,function(){return t.complete()},Qg)),!t.closed&&e.subscribe(t)})}function VR(r,e){return e===void 0&&(e=!1),Mr(function(t,n){var i=0;t.subscribe(Er(n,function(o){var a=r(o,i++);(a||e)&&n.next(o),!a&&n.complete()}))})}function qr(r,e,t){var n=br(r)||e||t?{next:r,error:e,complete:t}:r;return n?Mr(function(i,o){var a;(a=n.subscribe)===null||a===void 0||a.call(n);var c=!0;i.subscribe(Er(o,function(d){var u;(u=n.next)===null||u===void 0||u.call(n,d),o.next(d)},function(){var d;c=!1,(d=n.complete)===null||d===void 0||d.call(n),o.complete()},function(d){var u;c=!1,(u=n.error)===null||u===void 0||u.call(n,d),o.error(d)},function(){var d,u;c&&((d=n.unsubscribe)===null||d===void 0||d.call(n)),(u=n.finalize)===null||u===void 0||u.call(n)}))}):As}function YN(r,e){return Mr(function(t,n){var i=e??{},o=i.leading,a=o===void 0?!0:o,c=i.trailing,d=c===void 0?!1:c,u=!1,h=null,p=null,m=!1,v=function(){p==null||p.unsubscribe(),p=null,d&&(C(),m&&n.complete())},_=function(){p=null,m&&n.complete()},b=function(T){return p=On(r(T)).subscribe(Er(n,v,_))},C=function(){if(u){u=!1;var T=h;h=null,n.next(T),!m&&b(T)}};t.subscribe(Er(n,function(T){u=!0,h=T,!(p&&!p.closed)&&(a?C():b(T))},function(){m=!0,!(d&&u&&p&&!p.closed)&&n.complete()}))})}function Tw(r,e,t){e===void 0&&(e=Ef);var n=kw(r,e);return YN(function(){return n},t)}function Up(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var t=ww(r);return Mr(function(n,i){for(var o=r.length,a=new Array(o),c=r.map(function(){return!1}),d=!1,u=function(p){On(r[p]).subscribe(Er(i,function(m){a[p]=m,!d&&!c[p]&&(c[p]=!0,(d=c.every(As))&&(c=null))},Qg))},h=0;h<o;h++)u(h);n.subscribe(Er(i,function(p){if(d){var m=bc([p],_s(a));i.next(t?t.apply(void 0,bc([],_s(m))):m)}}))})}const FR=(r,e,t)=>{const n=typeof e=="string"?e.split("."):e,i=n.shift();return i&&(r[i]??(r[i]={}),n.length?FR(r[i],n,t):Object.assign(r,{[i]:t})),r};var ou;class t2{constructor(){Ie(this,ou,{})}createConfig(e,t){return at(this._createConfig(e,t))}async createConfigAsync(e,t){return hr(this.createConfig(e,t))}_set(e,t){const n=typeof t=="function"?t:async()=>t;k(this,ou)[e]=n}_get(e){return k(this,ou)[e]}_has(e){return e in k(this,ou)}_createConfig(e,t){return at(this._buildConfig(e,t)).pipe(Qt(n=>this._processConfig(n,e)))}_buildConfig(e,t){return at(Object.entries(k(this,ou))).pipe(Wn(([n,i])=>at(i(e)).pipe(Oe(o=>o!==void 0),me(o=>({target:n,value:o})),jt(o=>(console.error(`Failed to execute config callback: ${i.name} for attribute: '${n}'`,o),Tr)))),zp((n,{target:i,value:o})=>FR(n,i,o),t??{}))}_processConfig(e,t){return Pt(e)}}ou=new WeakMap;var Mm,au;class zR{constructor(e){Ie(this,Mm);Ie(this,au);const{version:t}=e;Be(this,Mm,new fs(t)),Be(this,au,new Qn)}get version(){return k(this,Mm)}_addTeardown(e){return k(this,au).add(e),()=>k(this,au).remove(e)}dispose(){k(this,au).unsubscribe()}}Mm=new WeakMap,au=new WeakMap;class QN extends Error{constructor(){super("It was too slow"),this.name="RequiredModuleTimeoutError"}}class XN{constructor(e){Le(this,"logger",new hR("ModulesConfigurator"));Le(this,"_configs",[]);Le(this,"_afterConfiguration",[]);Le(this,"_afterInit",[]);Le(this,"_modules");this._modules=new Set(e)}get modules(){return[...this._modules]}configure(...e){for(const t of e)this.addConfig(t)}addConfig(e){const{module:t,afterConfig:n,afterInit:i,configure:o}=e;this._modules.add(t),o&&this._configs.push((a,c)=>o(a[t.name],c)),n&&this._afterConfiguration.push(a=>n(a[t.name])),i&&this._afterInit.push(a=>i(a[t.name]))}onConfigured(e){this._afterConfiguration.push(e)}onInitialized(e){this._afterInit.push(e)}async initialize(e){const t=await this._configure(e),n=await this._initialize(t,e);return await this._postInitialize(n,e),Object.seal(Object.assign({},n,{dispose:()=>this.dispose(n)}))}async _configure(e){const t=await this._createConfig(e);return await Promise.all(this._configs.map(n=>Promise.resolve(n(t,e)))),await this._postConfigure(t),t}_createConfig(e){const{modules:t,logger:n,_afterConfiguration:i,_afterInit:o}=this,a=at(t).pipe(Wn(async c=>{var d;n.debug(`🛠 creating configurator ${n.formatModuleName(c)}`);try{const u=await((d=c.configure)==null?void 0:d.call(c,e));return n.debug(`🛠 created configurator for ${n.formatModuleName(c)}`,u),{[c.name]:u}}catch(u){throw n.error(`🛠 Failed to created configurator for ${n.formatModuleName(c)}`,u),u}}),zp((c,d)=>Object.assign(c,d),{onAfterConfiguration(c){i.push(c)},onAfterInit(c){o.push(c)}}));return hr(a)}async _postConfigure(e){const{modules:t,logger:n,_afterConfiguration:i}=this;if(await Promise.allSettled(t.filter(o=>!!o.postConfigure).map(async o=>{var a;try{await((a=o.postConfigure)==null?void 0:a.call(o,e)),n.debug(`🏗📌 post configured ${n.formatModuleName(o)}`,o)}catch{n.warn(`🏗📌 post configure failed ${n.formatModuleName(o)}`)}})),i.length)try{n.debug(`🏗📌 post configure hooks [${i.length}]`),await Promise.allSettled(i.map(o=>Promise.resolve(o(e)))),n.debug("🏗📌 post configure hooks complete")}catch(o){n.warn("🏗📌 post configure hook failed",o)}}async _initialize(e,t){const{modules:n,logger:i}=this,o=n.map(h=>h.name),a=new Xf({}),c=h=>o.includes(h),d=(h,p=60)=>{if(!o.includes(h))throw i.error(`🚀⌛️ Cannot not require ${i.formatModuleName(String(h))} since module is not defined!`),Error(`cannot not require [${String(h)}] since module is not defined!`);return a.value[h]?(i.debug(`🚀⌛️ ${i.formatModuleName(String(h))} is initiated, skipping queue`),Promise.resolve(a.value[h])):(i.debug(`🚀⌛️ Awaiting init ${i.formatModuleName(String(h))}, timeout ${p}s`),Vn(a.pipe(Oe(m=>!!m[h]),me(m=>m[h]),Ks({each:p*1e3,with:()=>MR(()=>new QN)}))))};at(n).pipe(Wn(h=>{const p=h.name;return i.debug(`🚀 initializing ${i.formatModuleName(h)}`),at(Promise.resolve(h.initialize({ref:t,config:e[p],requireInstance:d,hasModule:c}))).pipe(me(m=>{if(!(m instanceof zR)&&!(m.version instanceof fs)){i.debug("🤷 module does not extends the [BaseModuleProvider] or exposes [SemanticVersion]");try{m.version=h.version instanceof fs?h.version:new fs(h.version??"0.0.0-unknown")}catch{i.error("🚨 failed to set module version")}}return i.debug(`🚀 initialized ${i.formatModuleName(h)}`),[p,m]}))})).subscribe({next:([h,p])=>{a.next(Object.assign(a.value,{[h]:p}))},complete:()=>a.complete()});const u=await hr(a);return Object.seal(u),u}async _postInitialize(e,t){const{modules:n,logger:i,_afterInit:o}=this,a=at(n).pipe(Oe(c=>!!c.postInitialize),qr(c=>i.debug(`🚀📌 post initializing moule ${i.formatModuleName(c)}`)),Wn(c=>at(c.postInitialize({ref:t,modules:e,instance:e[c.name]})).pipe(qr(()=>{i.debug(`🚀📌 post initialized moule ${i.formatModuleName(c)}`)}),jt(d=>(i.warn(`🚀📌 post initialize failed moule ${i.formatModuleName(c)}`,d),Tr)))));if(await new Promise((c,d)=>{a.subscribe({complete:()=>c(!0),error:d})}),o.length)try{i.debug(`🚀📌 post configure hooks [${o.length}]`),await Promise.allSettled(o.map(c=>Promise.resolve(c(e)))),i.debug("🚀📌 post configure hooks complete")}catch(c){i.warn("🚀📌 post configure hook failed",c)}i.debug(`🎉 Modules initialized ${n.map(i.formatModuleName)}`,e),i.info("🟢 Modules initialized")}async dispose(e,t){const{modules:n}=this;await Promise.allSettled(n.filter(i=>!!i.dispose).map(async i=>{var o;await((o=i.dispose)==null?void 0:o.call(i,{ref:t,modules:e,instance:e[i.name]}))}))}}var dp={exports:{}};dp.exports;var NC;function JN(){return NC||(NC=1,function(r,e){var t=200,n="__lodash_hash_undefined__",i=9007199254740991,o="[object Arguments]",a="[object Array]",c="[object Boolean]",d="[object Date]",u="[object Error]",h="[object Function]",p="[object GeneratorFunction]",m="[object Map]",v="[object Number]",_="[object Object]",b="[object Promise]",C="[object RegExp]",T="[object Set]",A="[object String]",I="[object Symbol]",O="[object WeakMap]",B="[object ArrayBuffer]",z="[object DataView]",R="[object Float32Array]",Y="[object Float64Array]",ue="[object Int8Array]",le="[object Int16Array]",Te="[object Int32Array]",ke="[object Uint8Array]",xe="[object Uint8ClampedArray]",X="[object Uint16Array]",q="[object Uint32Array]",re=/[\\^$.*+?()[\]{}|]/g,W=/\w*$/,$=/^\[object .+?Constructor\]$/,L=/^(?:0|[1-9]\d*)$/,D={};D[o]=D[a]=D[B]=D[z]=D[c]=D[d]=D[R]=D[Y]=D[ue]=D[le]=D[Te]=D[m]=D[v]=D[_]=D[C]=D[T]=D[A]=D[I]=D[ke]=D[xe]=D[X]=D[q]=!0,D[u]=D[h]=D[O]=!1;var Z=typeof D0=="object"&&D0&&D0.Object===Object&&D0,N=typeof self=="object"&&self&&self.Object===Object&&self,ae=Z||N||Function("return this")(),He=e&&!e.nodeType&&e,Ee=He&&!0&&r&&!r.nodeType&&r,Ae=Ee&&Ee.exports===He;function Xe(M,te){return M.set(te[0],te[1]),M}function lt(M,te){return M.add(te),M}function xt(M,te){for(var de=-1,dt=M?M.length:0;++de<dt&&te(M[de],de,M)!==!1;);return M}function wr(M,te){for(var de=-1,dt=te.length,pn=M.length;++de<dt;)M[pn+de]=te[de];return M}function Gr(M,te,de,dt){for(var pn=-1,An=M?M.length:0;++pn<An;)de=te(de,M[pn],pn,M);return de}function Mt(M,te){for(var de=-1,dt=Array(M);++de<M;)dt[de]=te(de);return dt}function zn(M,te){return M==null?void 0:M[te]}function so(M){var te=!1;if(M!=null&&typeof M.toString!="function")try{te=!!(M+"")}catch{}return te}function ma(M){var te=-1,de=Array(M.size);return M.forEach(function(dt,pn){de[++te]=[pn,dt]}),de}function Fi(M,te){return function(de){return M(te(de))}}function Rc(M){var te=-1,de=Array(M.size);return M.forEach(function(dt){de[++te]=dt}),de}var Yu=Array.prototype,Pc=Function.prototype,$o=Object.prototype,Oo=ae["__core-js_shared__"],Mc=function(){var M=/[^.]+$/.exec(Oo&&Oo.keys&&Oo.keys.IE_PROTO||"");return M?"Symbol(src)_1."+M:""}(),Ql=Pc.toString,En=$o.hasOwnProperty,co=$o.toString,Xl=RegExp("^"+Ql.call(En).replace(re,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ba=Ae?ae.Buffer:void 0,ri=ae.Symbol,Ei=ae.Uint8Array,qa=Fi(Object.getPrototypeOf,Object),Zo=Object.create,h1=$o.propertyIsEnumerable,lo=Yu.splice,$c=Object.getOwnPropertySymbols,Qu=Ba?Ba.isBuffer:void 0,Oc=Fi(Object.keys,Object),Ms=Wt(ae,"DataView"),Lo=Wt(ae,"Map"),Ho=Wt(ae,"Promise"),Ka=Wt(ae,"Set"),zi=Wt(ae,"WeakMap"),ni=Wt(Object,"create"),Xu=oi(Ms),Jl=oi(Lo),Ju=oi(Ho),ed=oi(Ka),$s=oi(zi),ga=ri?ri.prototype:void 0,td=ga?ga.valueOf:void 0;function Si(M){var te=-1,de=M?M.length:0;for(this.clear();++te<de;){var dt=M[te];this.set(dt[0],dt[1])}}function V(){this.__data__=ni?ni(null):{}}function Q(M){return this.has(M)&&delete this.__data__[M]}function ie(M){var te=this.__data__;if(ni){var de=te[M];return de===n?void 0:de}return En.call(te,M)?te[M]:void 0}function pe(M){var te=this.__data__;return ni?te[M]!==void 0:En.call(te,M)}function Pe(M,te){var de=this.__data__;return de[M]=ni&&te===void 0?n:te,this}Si.prototype.clear=V,Si.prototype.delete=Q,Si.prototype.get=ie,Si.prototype.has=pe,Si.prototype.set=Pe;function Ue(M){var te=-1,de=M?M.length:0;for(this.clear();++te<de;){var dt=M[te];this.set(dt[0],dt[1])}}function vt(){this.__data__=[]}function Je(M){var te=this.__data__,de=ya(te,M);if(de<0)return!1;var dt=te.length-1;return de==dt?te.pop():lo.call(te,de,1),!0}function it(M){var te=this.__data__,de=ya(te,M);return de<0?void 0:te[de][1]}function Ge(M){return ya(this.__data__,M)>-1}function Qe(M,te){var de=this.__data__,dt=ya(de,M);return dt<0?de.push([M,te]):de[dt][1]=te,this}Ue.prototype.clear=vt,Ue.prototype.delete=Je,Ue.prototype.get=it,Ue.prototype.has=Ge,Ue.prototype.set=Qe;function bt(M){var te=-1,de=M?M.length:0;for(this.clear();++te<de;){var dt=M[te];this.set(dt[0],dt[1])}}function Vt(){this.__data__={hash:new Si,map:new(Lo||Ue),string:new Si}}function fn(M){return Lc(this,M).delete(M)}function dr(M){return Lc(this,M).get(M)}function Gt(M){return Lc(this,M).has(M)}function Ir(M,te){return Lc(this,M).set(M,te),this}bt.prototype.clear=Vt,bt.prototype.delete=fn,bt.prototype.get=dr,bt.prototype.has=Gt,bt.prototype.set=Ir;function ii(M){this.__data__=new Ue(M)}function Os(){this.__data__=new Ue}function uo(M){return this.__data__.delete(M)}function Jt(M){return this.__data__.get(M)}function rd(M){return this.__data__.has(M)}function va(M,te){var de=this.__data__;if(de instanceof Ue){var dt=de.__data__;if(!Lo||dt.length<t-1)return dt.push([M,te]),this;de=this.__data__=new bt(dt)}return de.set(M,te),this}ii.prototype.clear=Os,ii.prototype.delete=uo,ii.prototype.get=Jt,ii.prototype.has=rd,ii.prototype.set=va;function No(M,te){var de=Vo(M)||od(M)?Mt(M.length,String):[],dt=de.length,pn=!!dt;for(var An in M)En.call(M,An)&&!(pn&&(An=="length"||V2(An,dt)))&&de.push(An);return de}function Do(M,te,de){var dt=M[te];(!(En.call(M,te)&&Hc(dt,de))||de===void 0&&!(te in M))&&(M[te]=de)}function ya(M,te){for(var de=M.length;de--;)if(Hc(M[de][0],te))return de;return-1}function Bt(M,te){return M&&nh(te,y1(te),M)}function ur(M,te,de,dt,pn,An,ho){var jn;if(dt&&(jn=An?dt(M,pn,An,ho):dt(M)),jn!==void 0)return jn;if(!Ls(M))return M;var ba=Vo(M);if(ba){if(jn=g1(M),!te)return H2(M,jn)}else{var Qa=Wa(M),ld=Qa==h||Qa==p;if(ad(M))return f1(M,te);if(Qa==_||Qa==o||ld&&!An){if(so(M))return An?M:{};if(jn=N2(ld?{}:M),!te)return id(M,Bt(jn,M))}else{if(!D[Qa])return An?M:{};jn=D2(M,Qa,ur,te)}}ho||(ho=new ii);var _1=ho.get(M);if(_1)return _1;if(ho.set(M,jn),!ba)var dd=de?h5(M):y1(M);return xt(dd||M,function(Nc,ud){dd&&(ud=Nc,Nc=M[ud]),Do(jn,ud,ur(Nc,te,de,dt,ud,M,ho))}),jn}function Sn(M){return Ls(M)?Zo(M):{}}function Zs(M,te,de){var dt=te(M);return Vo(M)?dt:wr(dt,de(M))}function er(M){return co.call(M)}function Ga(M){if(!Ls(M)||ih(M))return!1;var te=j2(M)||so(M)?Xl:$;return te.test(oi(M))}function eh(M){if(!_a(M))return Oc(M);var te=[];for(var de in Object(M))En.call(M,de)&&de!="constructor"&&te.push(de);return te}function f1(M,te){if(te)return M.slice();var de=new M.constructor(M.length);return M.copy(de),de}function Zc(M){var te=new M.constructor(M.byteLength);return new Ei(te).set(new Ei(M)),te}function th(M,te){var de=te?Zc(M.buffer):M.buffer;return new M.constructor(de,M.byteOffset,M.byteLength)}function nd(M,te,de){var dt=te?de(ma(M),!0):ma(M);return Gr(dt,Xe,new M.constructor)}function rh(M){var te=new M.constructor(M.source,W.exec(M));return te.lastIndex=M.lastIndex,te}function d5(M,te,de){var dt=te?de(Rc(M),!0):Rc(M);return Gr(dt,lt,new M.constructor)}function u5(M){return td?Object(td.call(M)):{}}function p1(M,te){var de=te?Zc(M.buffer):M.buffer;return new M.constructor(de,M.byteOffset,M.length)}function H2(M,te){var de=-1,dt=M.length;for(te||(te=Array(dt));++de<dt;)te[de]=M[de];return te}function nh(M,te,de,dt){de||(de={});for(var pn=-1,An=te.length;++pn<An;){var ho=te[pn],jn=void 0;Do(de,ho,jn===void 0?M[ho]:jn)}return de}function id(M,te){return nh(M,m1(M),te)}function h5(M){return Zs(M,y1,m1)}function Lc(M,te){var de=M.__data__;return v1(te)?de[typeof te=="string"?"string":"hash"]:de.map}function Wt(M,te){var de=zn(M,te);return Ga(de)?de:void 0}var m1=$c?Fi($c,Object):sd,Wa=er;(Ms&&Wa(new Ms(new ArrayBuffer(1)))!=z||Lo&&Wa(new Lo)!=m||Ho&&Wa(Ho.resolve())!=b||Ka&&Wa(new Ka)!=T||zi&&Wa(new zi)!=O)&&(Wa=function(M){var te=co.call(M),de=te==_?M.constructor:void 0,dt=de?oi(de):void 0;if(dt)switch(dt){case Xu:return z;case Jl:return m;case Ju:return b;case ed:return T;case $s:return O}return te});function g1(M){var te=M.length,de=M.constructor(te);return te&&typeof M[0]=="string"&&En.call(M,"index")&&(de.index=M.index,de.input=M.input),de}function N2(M){return typeof M.constructor=="function"&&!_a(M)?Sn(qa(M)):{}}function D2(M,te,de,dt){var pn=M.constructor;switch(te){case B:return Zc(M);case c:case d:return new pn(+M);case z:return th(M,dt);case R:case Y:case ue:case le:case Te:case ke:case xe:case X:case q:return p1(M,dt);case m:return nd(M,dt,de);case v:case A:return new pn(M);case C:return rh(M);case T:return d5(M,dt,de);case I:return u5(M)}}function V2(M,te){return te=te??i,!!te&&(typeof M=="number"||L.test(M))&&M>-1&&M%1==0&&M<te}function v1(M){var te=typeof M;return te=="string"||te=="number"||te=="symbol"||te=="boolean"?M!=="__proto__":M===null}function ih(M){return!!Mc&&Mc in M}function _a(M){var te=M&&M.constructor,de=typeof te=="function"&&te.prototype||$o;return M===de}function oi(M){if(M!=null){try{return Ql.call(M)}catch{}try{return M+""}catch{}}return""}function Ya(M){return ur(M,!0,!0)}function Hc(M,te){return M===te||M!==M&&te!==te}function od(M){return z2(M)&&En.call(M,"callee")&&(!h1.call(M,"callee")||co.call(M)==o)}var Vo=Array.isArray;function F2(M){return M!=null&&U2(M.length)&&!j2(M)}function z2(M){return B2(M)&&F2(M)}var ad=Qu||cd;function j2(M){var te=Ls(M)?co.call(M):"";return te==h||te==p}function U2(M){return typeof M=="number"&&M>-1&&M%1==0&&M<=i}function Ls(M){var te=typeof M;return!!M&&(te=="object"||te=="function")}function B2(M){return!!M&&typeof M=="object"}function y1(M){return F2(M)?No(M):eh(M)}function sd(){return[]}function cd(){return!1}r.exports=Ya}(dp,dp.exports)),dp.exports}var eD=JN();const tD=zu(eD);var gl,$m,Om,lf,Zm,df,uf,t4;class jR{constructor(e,t){Le(this,"__type");Ie(this,gl);Ie(this,$m);Ie(this,Om);Ie(this,lf,!1);Ie(this,Zm);Ie(this,df);Ie(this,uf);Ie(this,t4,Date.now());this.__type=e,Be(this,gl,t.detail),Be(this,$m,tD(t.detail)),Be(this,df,!!t.mutableDetails),Be(this,Om,t.source),Be(this,Zm,!!t.cancelable),Be(this,uf,t.canBubble===void 0?!0:t.canBubble)}get bubbles(){return k(this,uf)&&!k(this,lf)}get created(){return k(this,t4)}get cancelable(){return k(this,Zm)}get canceled(){return k(this,lf)}get detail(){return k(this,gl)}get originalDetail(){return k(this,$m)}get source(){return k(this,Om)}get type(){return this.__type}get allowEventDetailsMutation(){return k(this,df)}preventDefault(){this.cancelable&&Be(this,lf,!0)}stopPropagation(){Be(this,uf,!1)}updateDetails(e){if(!k(this,df))throw new Error("Event details are not mutable");const t=e(k(this,gl));Be(this,gl,t===void 0?k(this,gl):t)}}gl=new WeakMap,$m=new WeakMap,Om=new WeakMap,lf=new WeakMap,Zm=new WeakMap,df=new WeakMap,uf=new WeakMap,t4=new WeakMap;class rD{constructor({onDispatch:e,onBubble:t}){Le(this,"__onDispatch");Le(this,"__onBubble");this.__onDispatch=e,this.__onBubble=t}async dispatch(e,t){var i,o;try{await((i=this.__onDispatch)==null?void 0:i.call(this,e))}catch(a){throw a}const n=e;if(!n.dispatcher)n.dispatcher=this;else if(n.dispatcher===this)throw Error("loop detected");for(const a of t)e.cancelable?e.canceled||await Promise.resolve(a(e)):a(e);if(e.bubbles)try{await((o=this.__onBubble)==null?void 0:o.call(this,e))}catch(a){throw a}}}class nD extends It{constructor(t){super(n=>{this.__event$.subscribe(n)});Le(this,"__listeners",[]);Le(this,"__event$",new Fn);Le(this,"__dispatcher");this.__dispatcher=new rD({onDispatch:t.onDispatch,onBubble:t.onBubble})}get event$(){return this.__event$.asObservable()}get closed(){return this.__event$.closed}addEventListener(t,n){if(this.closed)throw Error("Cannot listen to events when provider is closed!");const i={type:t,handler:n};return this.__listeners.push(i),()=>{const o=this.__listeners.indexOf(i);0<=o&&this.__listeners.splice(o,1)}}async dispatchEvent(t,n){if(typeof t=="string"){if(!n)throw Error("invalid arguments, missing [FrameworkEventInit]");return this._dispatchEvent(new jR(t,n))}else return this._dispatchEvent(t)}async _dispatchEvent(t){if(this.closed)throw Error("Cannot dispatch events when provider is closed!");this.__event$.next(t);try{const n=this.__listeners.filter(i=>i.type===t.type).map(({handler:i})=>i);await this.__dispatcher.dispatch(t,n)}catch(n){throw n}return t}dispose(){this.__listeners=[],this.__event$.complete()}}const iD="event",oD={name:iD,configure:r=>{const e={},t=r==null?void 0:r.event;return t&&(e.onBubble=async n=>{await t.dispatchEvent(n)}),e},initialize:({config:r})=>new nD(r),postInitialize:async({instance:r,modules:e})=>{r.dispatchEvent("onModulesLoaded",{detail:e,source:r})},dispose({instance:r}){r.dispose()}};class UR{constructor(e){Le(this,"_operators");e&&"operators"in e?this._operators={...e.operators}:this._operators=e??{}}get operators(){return this._operators}add(e,t){if(Object.keys(this._operators).includes(e))throw Error(`Operator [${e}] already defined`);return this.set(e,t)}set(e,t){return this._operators[e]=t,this}remove(e){return delete this._operators[e],this}get(e){return this._operators[e]}process(e){return Object.values(this._operators).length?at(Object.values(this._operators)).pipe(DR((n,i)=>Promise.resolve(i(n)).then(o=>o??n),e,1),Ci()):Pt(e)}}const aD=(r,e)=>t=>{const n=new Headers(t.headers);return n.append(r,e),{...t,headers:n}};class BR extends UR{setHeader(e,t){const n=aD(e,t);return this.set("header-"+e,n)}}class sD extends UR{}var tr;(function(r){r.assertEqual=i=>i;function e(i){}r.assertIs=e;function t(i){throw new Error}r.assertNever=t,r.arrayToEnum=i=>{const o={};for(const a of i)o[a]=a;return o},r.getValidEnumValues=i=>{const o=r.objectKeys(i).filter(c=>typeof i[i[c]]!="number"),a={};for(const c of o)a[c]=i[c];return r.objectValues(a)},r.objectValues=i=>r.objectKeys(i).map(function(o){return i[o]}),r.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const o=[];for(const a in i)Object.prototype.hasOwnProperty.call(i,a)&&o.push(a);return o},r.find=(i,o)=>{for(const a of i)if(o(a))return a},r.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function n(i,o=" | "){return i.map(a=>typeof a=="string"?`'${a}'`:a).join(o)}r.joinValues=n,r.jsonStringifyReplacer=(i,o)=>typeof o=="bigint"?o.toString():o})(tr||(tr={}));var Sb;(function(r){r.mergeShapes=(e,t)=>({...e,...t})})(Sb||(Sb={}));const Ke=tr.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Qs=r=>{switch(typeof r){case"undefined":return Ke.undefined;case"string":return Ke.string;case"number":return isNaN(r)?Ke.nan:Ke.number;case"boolean":return Ke.boolean;case"function":return Ke.function;case"bigint":return Ke.bigint;case"symbol":return Ke.symbol;case"object":return Array.isArray(r)?Ke.array:r===null?Ke.null:r.then&&typeof r.then=="function"&&r.catch&&typeof r.catch=="function"?Ke.promise:typeof Map<"u"&&r instanceof Map?Ke.map:typeof Set<"u"&&r instanceof Set?Ke.set:typeof Date<"u"&&r instanceof Date?Ke.date:Ke.object;default:return Ke.unknown}},be=tr.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),cD=r=>JSON.stringify(r,null,2).replace(/"([^"]+)":/g,"$1:");class Eo extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}format(e){const t=e||function(o){return o.message},n={_errors:[]},i=o=>{for(const a of o.issues)if(a.code==="invalid_union")a.unionErrors.map(i);else if(a.code==="invalid_return_type")i(a.returnTypeError);else if(a.code==="invalid_arguments")i(a.argumentsError);else if(a.path.length===0)n._errors.push(t(a));else{let c=n,d=0;for(;d<a.path.length;){const u=a.path[d];d===a.path.length-1?(c[u]=c[u]||{_errors:[]},c[u]._errors.push(t(a))):c[u]=c[u]||{_errors:[]},c=c[u],d++}}};return i(this),n}static assert(e){if(!(e instanceof Eo))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,tr.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=t=>t.message){const t={},n=[];for(const i of this.issues)i.path.length>0?(t[i.path[0]]=t[i.path[0]]||[],t[i.path[0]].push(e(i))):n.push(e(i));return{formErrors:n,fieldErrors:t}}get formErrors(){return this.flatten()}}Eo.create=r=>new Eo(r);const Sf=(r,e)=>{let t;switch(r.code){case be.invalid_type:r.received===Ke.undefined?t="Required":t=`Expected ${r.expected}, received ${r.received}`;break;case be.invalid_literal:t=`Invalid literal value, expected ${JSON.stringify(r.expected,tr.jsonStringifyReplacer)}`;break;case be.unrecognized_keys:t=`Unrecognized key(s) in object: ${tr.joinValues(r.keys,", ")}`;break;case be.invalid_union:t="Invalid input";break;case be.invalid_union_discriminator:t=`Invalid discriminator value. Expected ${tr.joinValues(r.options)}`;break;case be.invalid_enum_value:t=`Invalid enum value. Expected ${tr.joinValues(r.options)}, received '${r.received}'`;break;case be.invalid_arguments:t="Invalid function arguments";break;case be.invalid_return_type:t="Invalid function return type";break;case be.invalid_date:t="Invalid date";break;case be.invalid_string:typeof r.validation=="object"?"includes"in r.validation?(t=`Invalid input: must include "${r.validation.includes}"`,typeof r.validation.position=="number"&&(t=`${t} at one or more positions greater than or equal to ${r.validation.position}`)):"startsWith"in r.validation?t=`Invalid input: must start with "${r.validation.startsWith}"`:"endsWith"in r.validation?t=`Invalid input: must end with "${r.validation.endsWith}"`:tr.assertNever(r.validation):r.validation!=="regex"?t=`Invalid ${r.validation}`:t="Invalid";break;case be.too_small:r.type==="array"?t=`Array must contain ${r.exact?"exactly":r.inclusive?"at least":"more than"} ${r.minimum} element(s)`:r.type==="string"?t=`String must contain ${r.exact?"exactly":r.inclusive?"at least":"over"} ${r.minimum} character(s)`:r.type==="number"?t=`Number must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${r.minimum}`:r.type==="date"?t=`Date must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(r.minimum))}`:t="Invalid input";break;case be.too_big:r.type==="array"?t=`Array must contain ${r.exact?"exactly":r.inclusive?"at most":"less than"} ${r.maximum} element(s)`:r.type==="string"?t=`String must contain ${r.exact?"exactly":r.inclusive?"at most":"under"} ${r.maximum} character(s)`:r.type==="number"?t=`Number must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="bigint"?t=`BigInt must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="date"?t=`Date must be ${r.exact?"exactly":r.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(r.maximum))}`:t="Invalid input";break;case be.custom:t="Invalid input";break;case be.invalid_intersection_types:t="Intersection results could not be merged";break;case be.not_multiple_of:t=`Number must be a multiple of ${r.multipleOf}`;break;case be.not_finite:t="Number must be finite";break;default:t=e.defaultError,tr.assertNever(r)}return{message:t}};let qR=Sf;function lD(r){qR=r}function tv(){return qR}const rv=r=>{const{data:e,path:t,errorMaps:n,issueData:i}=r,o=[...t,...i.path||[]],a={...i,path:o};if(i.message!==void 0)return{...i,path:o,message:i.message};let c="";const d=n.filter(u=>!!u).slice().reverse();for(const u of d)c=u(a,{data:e,defaultError:c}).message;return{...i,path:o,message:c}},dD=[];function De(r,e){const t=tv(),n=rv({issueData:e,data:r.data,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,t,t===Sf?void 0:Sf].filter(i=>!!i)});r.common.issues.push(n)}class bi{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,t){const n=[];for(const i of t){if(i.status==="aborted")return Ct;i.status==="dirty"&&e.dirty(),n.push(i.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,t){const n=[];for(const i of t){const o=await i.key,a=await i.value;n.push({key:o,value:a})}return bi.mergeObjectSync(e,n)}static mergeObjectSync(e,t){const n={};for(const i of t){const{key:o,value:a}=i;if(o.status==="aborted"||a.status==="aborted")return Ct;o.status==="dirty"&&e.dirty(),a.status==="dirty"&&e.dirty(),o.value!=="__proto__"&&(typeof a.value<"u"||i.alwaysSet)&&(n[o.value]=a.value)}return{status:e.value,value:n}}}const Ct=Object.freeze({status:"aborted"}),Uh=r=>({status:"dirty",value:r}),Li=r=>({status:"valid",value:r}),Ab=r=>r.status==="aborted",Tb=r=>r.status==="dirty",Cu=r=>r.status==="valid",Bp=r=>typeof Promise<"u"&&r instanceof Promise;function nv(r,e,t,n){if(typeof e=="function"?r!==e||!0:!e.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e.get(r)}function KR(r,e,t,n,i){if(typeof e=="function"?r!==e||!0:!e.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return e.set(r,t),t}var ht;(function(r){r.errToObj=e=>typeof e=="string"?{message:e}:e||{},r.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(ht||(ht={}));var up,hp;class ws{constructor(e,t,n,i){this._cachedPath=[],this.parent=e,this.data=t,this._path=n,this._key=i}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const DC=(r,e)=>{if(Cu(e))return{success:!0,data:e.value};if(!r.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new Eo(r.common.issues);return this._error=t,this._error}}};function Ot(r){if(!r)return{};const{errorMap:e,invalid_type_error:t,required_error:n,description:i}=r;if(e&&(t||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:i}:{errorMap:(a,c)=>{var d,u;const{message:h}=r;return a.code==="invalid_enum_value"?{message:h??c.defaultError}:typeof c.data>"u"?{message:(d=h??n)!==null&&d!==void 0?d:c.defaultError}:a.code!=="invalid_type"?{message:c.defaultError}:{message:(u=h??t)!==null&&u!==void 0?u:c.defaultError}},description:i}}class Dt{get description(){return this._def.description}_getType(e){return Qs(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:Qs(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new bi,ctx:{common:e.parent.common,data:e.data,parsedType:Qs(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(Bp(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const n=this.safeParse(e,t);if(n.success)return n.data;throw n.error}safeParse(e,t){var n;const i={common:{issues:[],async:(n=t==null?void 0:t.async)!==null&&n!==void 0?n:!1,contextualErrorMap:t==null?void 0:t.errorMap},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Qs(e)},o=this._parseSync({data:e,path:i.path,parent:i});return DC(i,o)}"~validate"(e){var t,n;const i={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Qs(e)};if(!this["~standard"].async)try{const o=this._parseSync({data:e,path:[],parent:i});return Cu(o)?{value:o.value}:{issues:i.common.issues}}catch(o){!((n=(t=o==null?void 0:o.message)===null||t===void 0?void 0:t.toLowerCase())===null||n===void 0)&&n.includes("encountered")&&(this["~standard"].async=!0),i.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:i}).then(o=>Cu(o)?{value:o.value}:{issues:i.common.issues})}async parseAsync(e,t){const n=await this.safeParseAsync(e,t);if(n.success)return n.data;throw n.error}async safeParseAsync(e,t){const n={common:{issues:[],contextualErrorMap:t==null?void 0:t.errorMap,async:!0},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Qs(e)},i=this._parse({data:e,path:n.path,parent:n}),o=await(Bp(i)?i:Promise.resolve(i));return DC(n,o)}refine(e,t){const n=i=>typeof t=="string"||typeof t>"u"?{message:t}:typeof t=="function"?t(i):t;return this._refinement((i,o)=>{const a=e(i),c=()=>o.addIssue({code:be.custom,...n(i)});return typeof Promise<"u"&&a instanceof Promise?a.then(d=>d?!0:(c(),!1)):a?!0:(c(),!1)})}refinement(e,t){return this._refinement((n,i)=>e(n)?!0:(i.addIssue(typeof t=="function"?t(n,i):t),!1))}_refinement(e){return new Da({schema:this,typeName:wt.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:t=>this["~validate"](t)}}optional(){return ps.create(this,this._def)}nullable(){return Nl.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Za.create(this)}promise(){return Tf.create(this,this._def)}or(e){return Wp.create([this,e],this._def)}and(e){return Yp.create(this,e,this._def)}transform(e){return new Da({...Ot(this._def),schema:this,typeName:wt.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t=typeof e=="function"?e:()=>e;return new tm({...Ot(this._def),innerType:this,defaultValue:t,typeName:wt.ZodDefault})}brand(){return new Iw({typeName:wt.ZodBranded,type:this,...Ot(this._def)})}catch(e){const t=typeof e=="function"?e:()=>e;return new rm({...Ot(this._def),innerType:this,catchValue:t,typeName:wt.ZodCatch})}describe(e){const t=this.constructor;return new t({...this._def,description:e})}pipe(e){return r2.create(this,e)}readonly(){return nm.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const uD=/^c[^\s-]{8,}$/i,hD=/^[0-9a-z]+$/,fD=/^[0-9A-HJKMNP-TV-Z]{26}$/i,pD=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,mD=/^[a-z0-9_-]{21}$/i,gD=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,vD=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,yD=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,_D="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let H3;const bD=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,wD=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,xD=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,CD=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,kD=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,ED=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,GR="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",SD=new RegExp(`^${GR}$`);function WR(r){let e="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return r.precision?e=`${e}\\.\\d{${r.precision}}`:r.precision==null&&(e=`${e}(\\.\\d+)?`),e}function AD(r){return new RegExp(`^${WR(r)}$`)}function YR(r){let e=`${GR}T${WR(r)}`;const t=[];return t.push(r.local?"Z?":"Z"),r.offset&&t.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${t.join("|")})`,new RegExp(`^${e}$`)}function TD(r,e){return!!((e==="v4"||!e)&&bD.test(r)||(e==="v6"||!e)&&xD.test(r))}function ID(r,e){if(!gD.test(r))return!1;try{const[t]=r.split("."),n=t.replace(/-/g,"+").replace(/_/g,"/").padEnd(t.length+(4-t.length%4)%4,"="),i=JSON.parse(atob(n));return!(typeof i!="object"||i===null||!i.typ||!i.alg||e&&i.alg!==e)}catch{return!1}}function RD(r,e){return!!((e==="v4"||!e)&&wD.test(r)||(e==="v6"||!e)&&CD.test(r))}class Ma extends Dt{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==Ke.string){const o=this._getOrReturnCtx(e);return De(o,{code:be.invalid_type,expected:Ke.string,received:o.parsedType}),Ct}const n=new bi;let i;for(const o of this._def.checks)if(o.kind==="min")e.data.length<o.value&&(i=this._getOrReturnCtx(e,i),De(i,{code:be.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),n.dirty());else if(o.kind==="max")e.data.length>o.value&&(i=this._getOrReturnCtx(e,i),De(i,{code:be.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),n.dirty());else if(o.kind==="length"){const a=e.data.length>o.value,c=e.data.length<o.value;(a||c)&&(i=this._getOrReturnCtx(e,i),a?De(i,{code:be.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):c&&De(i,{code:be.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),n.dirty())}else if(o.kind==="email")yD.test(e.data)||(i=this._getOrReturnCtx(e,i),De(i,{validation:"email",code:be.invalid_string,message:o.message}),n.dirty());else if(o.kind==="emoji")H3||(H3=new RegExp(_D,"u")),H3.test(e.data)||(i=this._getOrReturnCtx(e,i),De(i,{validation:"emoji",code:be.invalid_string,message:o.message}),n.dirty());else if(o.kind==="uuid")pD.test(e.data)||(i=this._getOrReturnCtx(e,i),De(i,{validation:"uuid",code:be.invalid_string,message:o.message}),n.dirty());else if(o.kind==="nanoid")mD.test(e.data)||(i=this._getOrReturnCtx(e,i),De(i,{validation:"nanoid",code:be.invalid_string,message:o.message}),n.dirty());else if(o.kind==="cuid")uD.test(e.data)||(i=this._getOrReturnCtx(e,i),De(i,{validation:"cuid",code:be.invalid_string,message:o.message}),n.dirty());else if(o.kind==="cuid2")hD.test(e.data)||(i=this._getOrReturnCtx(e,i),De(i,{validation:"cuid2",code:be.invalid_string,message:o.message}),n.dirty());else if(o.kind==="ulid")fD.test(e.data)||(i=this._getOrReturnCtx(e,i),De(i,{validation:"ulid",code:be.invalid_string,message:o.message}),n.dirty());else if(o.kind==="url")try{new URL(e.data)}catch{i=this._getOrReturnCtx(e,i),De(i,{validation:"url",code:be.invalid_string,message:o.message}),n.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(e.data)||(i=this._getOrReturnCtx(e,i),De(i,{validation:"regex",code:be.invalid_string,message:o.message}),n.dirty())):o.kind==="trim"?e.data=e.data.trim():o.kind==="includes"?e.data.includes(o.value,o.position)||(i=this._getOrReturnCtx(e,i),De(i,{code:be.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),n.dirty()):o.kind==="toLowerCase"?e.data=e.data.toLowerCase():o.kind==="toUpperCase"?e.data=e.data.toUpperCase():o.kind==="startsWith"?e.data.startsWith(o.value)||(i=this._getOrReturnCtx(e,i),De(i,{code:be.invalid_string,validation:{startsWith:o.value},message:o.message}),n.dirty()):o.kind==="endsWith"?e.data.endsWith(o.value)||(i=this._getOrReturnCtx(e,i),De(i,{code:be.invalid_string,validation:{endsWith:o.value},message:o.message}),n.dirty()):o.kind==="datetime"?YR(o).test(e.data)||(i=this._getOrReturnCtx(e,i),De(i,{code:be.invalid_string,validation:"datetime",message:o.message}),n.dirty()):o.kind==="date"?SD.test(e.data)||(i=this._getOrReturnCtx(e,i),De(i,{code:be.invalid_string,validation:"date",message:o.message}),n.dirty()):o.kind==="time"?AD(o).test(e.data)||(i=this._getOrReturnCtx(e,i),De(i,{code:be.invalid_string,validation:"time",message:o.message}),n.dirty()):o.kind==="duration"?vD.test(e.data)||(i=this._getOrReturnCtx(e,i),De(i,{validation:"duration",code:be.invalid_string,message:o.message}),n.dirty()):o.kind==="ip"?TD(e.data,o.version)||(i=this._getOrReturnCtx(e,i),De(i,{validation:"ip",code:be.invalid_string,message:o.message}),n.dirty()):o.kind==="jwt"?ID(e.data,o.alg)||(i=this._getOrReturnCtx(e,i),De(i,{validation:"jwt",code:be.invalid_string,message:o.message}),n.dirty()):o.kind==="cidr"?RD(e.data,o.version)||(i=this._getOrReturnCtx(e,i),De(i,{validation:"cidr",code:be.invalid_string,message:o.message}),n.dirty()):o.kind==="base64"?kD.test(e.data)||(i=this._getOrReturnCtx(e,i),De(i,{validation:"base64",code:be.invalid_string,message:o.message}),n.dirty()):o.kind==="base64url"?ED.test(e.data)||(i=this._getOrReturnCtx(e,i),De(i,{validation:"base64url",code:be.invalid_string,message:o.message}),n.dirty()):tr.assertNever(o);return{status:n.value,value:e.data}}_regex(e,t,n){return this.refinement(i=>e.test(i),{validation:t,code:be.invalid_string,...ht.errToObj(n)})}_addCheck(e){return new Ma({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...ht.errToObj(e)})}url(e){return this._addCheck({kind:"url",...ht.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...ht.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...ht.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...ht.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...ht.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...ht.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...ht.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...ht.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...ht.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...ht.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...ht.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...ht.errToObj(e)})}datetime(e){var t,n;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(t=e==null?void 0:e.offset)!==null&&t!==void 0?t:!1,local:(n=e==null?void 0:e.local)!==null&&n!==void 0?n:!1,...ht.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,...ht.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...ht.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...ht.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t==null?void 0:t.position,...ht.errToObj(t==null?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...ht.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...ht.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...ht.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...ht.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...ht.errToObj(t)})}nonempty(e){return this.min(1,ht.errToObj(e))}trim(){return new Ma({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Ma({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Ma({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}}Ma.create=r=>{var e;return new Ma({checks:[],typeName:wt.ZodString,coerce:(e=r==null?void 0:r.coerce)!==null&&e!==void 0?e:!1,...Ot(r)})};function PD(r,e){const t=(r.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,i=t>n?t:n,o=parseInt(r.toFixed(i).replace(".","")),a=parseInt(e.toFixed(i).replace(".",""));return o%a/Math.pow(10,i)}class Zl extends Dt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==Ke.number){const o=this._getOrReturnCtx(e);return De(o,{code:be.invalid_type,expected:Ke.number,received:o.parsedType}),Ct}let n;const i=new bi;for(const o of this._def.checks)o.kind==="int"?tr.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),De(n,{code:be.invalid_type,expected:"integer",received:"float",message:o.message}),i.dirty()):o.kind==="min"?(o.inclusive?e.data<o.value:e.data<=o.value)&&(n=this._getOrReturnCtx(e,n),De(n,{code:be.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind==="max"?(o.inclusive?e.data>o.value:e.data>=o.value)&&(n=this._getOrReturnCtx(e,n),De(n,{code:be.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind==="multipleOf"?PD(e.data,o.value)!==0&&(n=this._getOrReturnCtx(e,n),De(n,{code:be.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):o.kind==="finite"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),De(n,{code:be.not_finite,message:o.message}),i.dirty()):tr.assertNever(o);return{status:i.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,ht.toString(t))}gt(e,t){return this.setLimit("min",e,!1,ht.toString(t))}lte(e,t){return this.setLimit("max",e,!0,ht.toString(t))}lt(e,t){return this.setLimit("max",e,!1,ht.toString(t))}setLimit(e,t,n,i){return new Zl({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:ht.toString(i)}]})}_addCheck(e){return new Zl({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:ht.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ht.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ht.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ht.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ht.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:ht.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:ht.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ht.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ht.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&tr.isInteger(e.value))}get isFinite(){let e=null,t=null;for(const n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(t===null||n.value>t)&&(t=n.value):n.kind==="max"&&(e===null||n.value<e)&&(e=n.value)}return Number.isFinite(t)&&Number.isFinite(e)}}Zl.create=r=>new Zl({checks:[],typeName:wt.ZodNumber,coerce:(r==null?void 0:r.coerce)||!1,...Ot(r)});class Ll extends Dt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==Ke.bigint)return this._getInvalidInput(e);let n;const i=new bi;for(const o of this._def.checks)o.kind==="min"?(o.inclusive?e.data<o.value:e.data<=o.value)&&(n=this._getOrReturnCtx(e,n),De(n,{code:be.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),i.dirty()):o.kind==="max"?(o.inclusive?e.data>o.value:e.data>=o.value)&&(n=this._getOrReturnCtx(e,n),De(n,{code:be.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),i.dirty()):o.kind==="multipleOf"?e.data%o.value!==BigInt(0)&&(n=this._getOrReturnCtx(e,n),De(n,{code:be.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):tr.assertNever(o);return{status:i.value,value:e.data}}_getInvalidInput(e){const t=this._getOrReturnCtx(e);return De(t,{code:be.invalid_type,expected:Ke.bigint,received:t.parsedType}),Ct}gte(e,t){return this.setLimit("min",e,!0,ht.toString(t))}gt(e,t){return this.setLimit("min",e,!1,ht.toString(t))}lte(e,t){return this.setLimit("max",e,!0,ht.toString(t))}lt(e,t){return this.setLimit("max",e,!1,ht.toString(t))}setLimit(e,t,n,i){return new Ll({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:ht.toString(i)}]})}_addCheck(e){return new Ll({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ht.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ht.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ht.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ht.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:ht.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}}Ll.create=r=>{var e;return new Ll({checks:[],typeName:wt.ZodBigInt,coerce:(e=r==null?void 0:r.coerce)!==null&&e!==void 0?e:!1,...Ot(r)})};class qp extends Dt{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==Ke.boolean){const n=this._getOrReturnCtx(e);return De(n,{code:be.invalid_type,expected:Ke.boolean,received:n.parsedType}),Ct}return Li(e.data)}}qp.create=r=>new qp({typeName:wt.ZodBoolean,coerce:(r==null?void 0:r.coerce)||!1,...Ot(r)});class ku extends Dt{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==Ke.date){const o=this._getOrReturnCtx(e);return De(o,{code:be.invalid_type,expected:Ke.date,received:o.parsedType}),Ct}if(isNaN(e.data.getTime())){const o=this._getOrReturnCtx(e);return De(o,{code:be.invalid_date}),Ct}const n=new bi;let i;for(const o of this._def.checks)o.kind==="min"?e.data.getTime()<o.value&&(i=this._getOrReturnCtx(e,i),De(i,{code:be.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),n.dirty()):o.kind==="max"?e.data.getTime()>o.value&&(i=this._getOrReturnCtx(e,i),De(i,{code:be.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),n.dirty()):tr.assertNever(o);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new ku({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:ht.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:ht.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e!=null?new Date(e):null}}ku.create=r=>new ku({checks:[],coerce:(r==null?void 0:r.coerce)||!1,typeName:wt.ZodDate,...Ot(r)});class iv extends Dt{_parse(e){if(this._getType(e)!==Ke.symbol){const n=this._getOrReturnCtx(e);return De(n,{code:be.invalid_type,expected:Ke.symbol,received:n.parsedType}),Ct}return Li(e.data)}}iv.create=r=>new iv({typeName:wt.ZodSymbol,...Ot(r)});class Kp extends Dt{_parse(e){if(this._getType(e)!==Ke.undefined){const n=this._getOrReturnCtx(e);return De(n,{code:be.invalid_type,expected:Ke.undefined,received:n.parsedType}),Ct}return Li(e.data)}}Kp.create=r=>new Kp({typeName:wt.ZodUndefined,...Ot(r)});class Gp extends Dt{_parse(e){if(this._getType(e)!==Ke.null){const n=this._getOrReturnCtx(e);return De(n,{code:be.invalid_type,expected:Ke.null,received:n.parsedType}),Ct}return Li(e.data)}}Gp.create=r=>new Gp({typeName:wt.ZodNull,...Ot(r)});class Af extends Dt{constructor(){super(...arguments),this._any=!0}_parse(e){return Li(e.data)}}Af.create=r=>new Af({typeName:wt.ZodAny,...Ot(r)});class uu extends Dt{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Li(e.data)}}uu.create=r=>new uu({typeName:wt.ZodUnknown,...Ot(r)});class wc extends Dt{_parse(e){const t=this._getOrReturnCtx(e);return De(t,{code:be.invalid_type,expected:Ke.never,received:t.parsedType}),Ct}}wc.create=r=>new wc({typeName:wt.ZodNever,...Ot(r)});class ov extends Dt{_parse(e){if(this._getType(e)!==Ke.undefined){const n=this._getOrReturnCtx(e);return De(n,{code:be.invalid_type,expected:Ke.void,received:n.parsedType}),Ct}return Li(e.data)}}ov.create=r=>new ov({typeName:wt.ZodVoid,...Ot(r)});class Za extends Dt{_parse(e){const{ctx:t,status:n}=this._processInputParams(e),i=this._def;if(t.parsedType!==Ke.array)return De(t,{code:be.invalid_type,expected:Ke.array,received:t.parsedType}),Ct;if(i.exactLength!==null){const a=t.data.length>i.exactLength.value,c=t.data.length<i.exactLength.value;(a||c)&&(De(t,{code:a?be.too_big:be.too_small,minimum:c?i.exactLength.value:void 0,maximum:a?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),n.dirty())}if(i.minLength!==null&&t.data.length<i.minLength.value&&(De(t,{code:be.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),n.dirty()),i.maxLength!==null&&t.data.length>i.maxLength.value&&(De(t,{code:be.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),n.dirty()),t.common.async)return Promise.all([...t.data].map((a,c)=>i.type._parseAsync(new ws(t,a,t.path,c)))).then(a=>bi.mergeArray(n,a));const o=[...t.data].map((a,c)=>i.type._parseSync(new ws(t,a,t.path,c)));return bi.mergeArray(n,o)}get element(){return this._def.type}min(e,t){return new Za({...this._def,minLength:{value:e,message:ht.toString(t)}})}max(e,t){return new Za({...this._def,maxLength:{value:e,message:ht.toString(t)}})}length(e,t){return new Za({...this._def,exactLength:{value:e,message:ht.toString(t)}})}nonempty(e){return this.min(1,e)}}Za.create=(r,e)=>new Za({type:r,minLength:null,maxLength:null,exactLength:null,typeName:wt.ZodArray,...Ot(e)});function Zh(r){if(r instanceof rn){const e={};for(const t in r.shape){const n=r.shape[t];e[t]=ps.create(Zh(n))}return new rn({...r._def,shape:()=>e})}else return r instanceof Za?new Za({...r._def,type:Zh(r.element)}):r instanceof ps?ps.create(Zh(r.unwrap())):r instanceof Nl?Nl.create(Zh(r.unwrap())):r instanceof xs?xs.create(r.items.map(e=>Zh(e))):r}class rn extends Dt{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),t=tr.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==Ke.object){const u=this._getOrReturnCtx(e);return De(u,{code:be.invalid_type,expected:Ke.object,received:u.parsedType}),Ct}const{status:n,ctx:i}=this._processInputParams(e),{shape:o,keys:a}=this._getCached(),c=[];if(!(this._def.catchall instanceof wc&&this._def.unknownKeys==="strip"))for(const u in i.data)a.includes(u)||c.push(u);const d=[];for(const u of a){const h=o[u],p=i.data[u];d.push({key:{status:"valid",value:u},value:h._parse(new ws(i,p,i.path,u)),alwaysSet:u in i.data})}if(this._def.catchall instanceof wc){const u=this._def.unknownKeys;if(u==="passthrough")for(const h of c)d.push({key:{status:"valid",value:h},value:{status:"valid",value:i.data[h]}});else if(u==="strict")c.length>0&&(De(i,{code:be.unrecognized_keys,keys:c}),n.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const u=this._def.catchall;for(const h of c){const p=i.data[h];d.push({key:{status:"valid",value:h},value:u._parse(new ws(i,p,i.path,h)),alwaysSet:h in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const u=[];for(const h of d){const p=await h.key,m=await h.value;u.push({key:p,value:m,alwaysSet:h.alwaysSet})}return u}).then(u=>bi.mergeObjectSync(n,u)):bi.mergeObjectSync(n,d)}get shape(){return this._def.shape()}strict(e){return ht.errToObj,new rn({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,n)=>{var i,o,a,c;const d=(a=(o=(i=this._def).errorMap)===null||o===void 0?void 0:o.call(i,t,n).message)!==null&&a!==void 0?a:n.defaultError;return t.code==="unrecognized_keys"?{message:(c=ht.errToObj(e).message)!==null&&c!==void 0?c:d}:{message:d}}}:{}})}strip(){return new rn({...this._def,unknownKeys:"strip"})}passthrough(){return new rn({...this._def,unknownKeys:"passthrough"})}extend(e){return new rn({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new rn({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:wt.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new rn({...this._def,catchall:e})}pick(e){const t={};return tr.objectKeys(e).forEach(n=>{e[n]&&this.shape[n]&&(t[n]=this.shape[n])}),new rn({...this._def,shape:()=>t})}omit(e){const t={};return tr.objectKeys(this.shape).forEach(n=>{e[n]||(t[n]=this.shape[n])}),new rn({...this._def,shape:()=>t})}deepPartial(){return Zh(this)}partial(e){const t={};return tr.objectKeys(this.shape).forEach(n=>{const i=this.shape[n];e&&!e[n]?t[n]=i:t[n]=i.optional()}),new rn({...this._def,shape:()=>t})}required(e){const t={};return tr.objectKeys(this.shape).forEach(n=>{if(e&&!e[n])t[n]=this.shape[n];else{let o=this.shape[n];for(;o instanceof ps;)o=o._def.innerType;t[n]=o}}),new rn({...this._def,shape:()=>t})}keyof(){return QR(tr.objectKeys(this.shape))}}rn.create=(r,e)=>new rn({shape:()=>r,unknownKeys:"strip",catchall:wc.create(),typeName:wt.ZodObject,...Ot(e)});rn.strictCreate=(r,e)=>new rn({shape:()=>r,unknownKeys:"strict",catchall:wc.create(),typeName:wt.ZodObject,...Ot(e)});rn.lazycreate=(r,e)=>new rn({shape:r,unknownKeys:"strip",catchall:wc.create(),typeName:wt.ZodObject,...Ot(e)});class Wp extends Dt{_parse(e){const{ctx:t}=this._processInputParams(e),n=this._def.options;function i(o){for(const c of o)if(c.result.status==="valid")return c.result;for(const c of o)if(c.result.status==="dirty")return t.common.issues.push(...c.ctx.common.issues),c.result;const a=o.map(c=>new Eo(c.ctx.common.issues));return De(t,{code:be.invalid_union,unionErrors:a}),Ct}if(t.common.async)return Promise.all(n.map(async o=>{const a={...t,common:{...t.common,issues:[]},parent:null};return{result:await o._parseAsync({data:t.data,path:t.path,parent:a}),ctx:a}})).then(i);{let o;const a=[];for(const d of n){const u={...t,common:{...t.common,issues:[]},parent:null},h=d._parseSync({data:t.data,path:t.path,parent:u});if(h.status==="valid")return h;h.status==="dirty"&&!o&&(o={result:h,ctx:u}),u.common.issues.length&&a.push(u.common.issues)}if(o)return t.common.issues.push(...o.ctx.common.issues),o.result;const c=a.map(d=>new Eo(d));return De(t,{code:be.invalid_union,unionErrors:c}),Ct}}get options(){return this._def.options}}Wp.create=(r,e)=>new Wp({options:r,typeName:wt.ZodUnion,...Ot(e)});const Ws=r=>r instanceof Xp?Ws(r.schema):r instanceof Da?Ws(r.innerType()):r instanceof Jp?[r.value]:r instanceof Hl?r.options:r instanceof em?tr.objectValues(r.enum):r instanceof tm?Ws(r._def.innerType):r instanceof Kp?[void 0]:r instanceof Gp?[null]:r instanceof ps?[void 0,...Ws(r.unwrap())]:r instanceof Nl?[null,...Ws(r.unwrap())]:r instanceof Iw||r instanceof nm?Ws(r.unwrap()):r instanceof rm?Ws(r._def.innerType):[];class m4 extends Dt{_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==Ke.object)return De(t,{code:be.invalid_type,expected:Ke.object,received:t.parsedType}),Ct;const n=this.discriminator,i=t.data[n],o=this.optionsMap.get(i);return o?t.common.async?o._parseAsync({data:t.data,path:t.path,parent:t}):o._parseSync({data:t.data,path:t.path,parent:t}):(De(t,{code:be.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),Ct)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,n){const i=new Map;for(const o of t){const a=Ws(o.shape[e]);if(!a.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const c of a){if(i.has(c))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(c)}`);i.set(c,o)}}return new m4({typeName:wt.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:i,...Ot(n)})}}function Ib(r,e){const t=Qs(r),n=Qs(e);if(r===e)return{valid:!0,data:r};if(t===Ke.object&&n===Ke.object){const i=tr.objectKeys(e),o=tr.objectKeys(r).filter(c=>i.indexOf(c)!==-1),a={...r,...e};for(const c of o){const d=Ib(r[c],e[c]);if(!d.valid)return{valid:!1};a[c]=d.data}return{valid:!0,data:a}}else if(t===Ke.array&&n===Ke.array){if(r.length!==e.length)return{valid:!1};const i=[];for(let o=0;o<r.length;o++){const a=r[o],c=e[o],d=Ib(a,c);if(!d.valid)return{valid:!1};i.push(d.data)}return{valid:!0,data:i}}else return t===Ke.date&&n===Ke.date&&+r==+e?{valid:!0,data:r}:{valid:!1}}class Yp extends Dt{_parse(e){const{status:t,ctx:n}=this._processInputParams(e),i=(o,a)=>{if(Ab(o)||Ab(a))return Ct;const c=Ib(o.value,a.value);return c.valid?((Tb(o)||Tb(a))&&t.dirty(),{status:t.value,value:c.data}):(De(n,{code:be.invalid_intersection_types}),Ct)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([o,a])=>i(o,a)):i(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}Yp.create=(r,e,t)=>new Yp({left:r,right:e,typeName:wt.ZodIntersection,...Ot(t)});class xs extends Dt{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==Ke.array)return De(n,{code:be.invalid_type,expected:Ke.array,received:n.parsedType}),Ct;if(n.data.length<this._def.items.length)return De(n,{code:be.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Ct;!this._def.rest&&n.data.length>this._def.items.length&&(De(n,{code:be.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const o=[...n.data].map((a,c)=>{const d=this._def.items[c]||this._def.rest;return d?d._parse(new ws(n,a,n.path,c)):null}).filter(a=>!!a);return n.common.async?Promise.all(o).then(a=>bi.mergeArray(t,a)):bi.mergeArray(t,o)}get items(){return this._def.items}rest(e){return new xs({...this._def,rest:e})}}xs.create=(r,e)=>{if(!Array.isArray(r))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new xs({items:r,typeName:wt.ZodTuple,rest:null,...Ot(e)})};class Qp extends Dt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==Ke.object)return De(n,{code:be.invalid_type,expected:Ke.object,received:n.parsedType}),Ct;const i=[],o=this._def.keyType,a=this._def.valueType;for(const c in n.data)i.push({key:o._parse(new ws(n,c,n.path,c)),value:a._parse(new ws(n,n.data[c],n.path,c)),alwaysSet:c in n.data});return n.common.async?bi.mergeObjectAsync(t,i):bi.mergeObjectSync(t,i)}get element(){return this._def.valueType}static create(e,t,n){return t instanceof Dt?new Qp({keyType:e,valueType:t,typeName:wt.ZodRecord,...Ot(n)}):new Qp({keyType:Ma.create(),valueType:e,typeName:wt.ZodRecord,...Ot(t)})}}class av extends Dt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==Ke.map)return De(n,{code:be.invalid_type,expected:Ke.map,received:n.parsedType}),Ct;const i=this._def.keyType,o=this._def.valueType,a=[...n.data.entries()].map(([c,d],u)=>({key:i._parse(new ws(n,c,n.path,[u,"key"])),value:o._parse(new ws(n,d,n.path,[u,"value"]))}));if(n.common.async){const c=new Map;return Promise.resolve().then(async()=>{for(const d of a){const u=await d.key,h=await d.value;if(u.status==="aborted"||h.status==="aborted")return Ct;(u.status==="dirty"||h.status==="dirty")&&t.dirty(),c.set(u.value,h.value)}return{status:t.value,value:c}})}else{const c=new Map;for(const d of a){const u=d.key,h=d.value;if(u.status==="aborted"||h.status==="aborted")return Ct;(u.status==="dirty"||h.status==="dirty")&&t.dirty(),c.set(u.value,h.value)}return{status:t.value,value:c}}}}av.create=(r,e,t)=>new av({valueType:e,keyType:r,typeName:wt.ZodMap,...Ot(t)});class Eu extends Dt{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==Ke.set)return De(n,{code:be.invalid_type,expected:Ke.set,received:n.parsedType}),Ct;const i=this._def;i.minSize!==null&&n.data.size<i.minSize.value&&(De(n,{code:be.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),t.dirty()),i.maxSize!==null&&n.data.size>i.maxSize.value&&(De(n,{code:be.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),t.dirty());const o=this._def.valueType;function a(d){const u=new Set;for(const h of d){if(h.status==="aborted")return Ct;h.status==="dirty"&&t.dirty(),u.add(h.value)}return{status:t.value,value:u}}const c=[...n.data.values()].map((d,u)=>o._parse(new ws(n,d,n.path,u)));return n.common.async?Promise.all(c).then(d=>a(d)):a(c)}min(e,t){return new Eu({...this._def,minSize:{value:e,message:ht.toString(t)}})}max(e,t){return new Eu({...this._def,maxSize:{value:e,message:ht.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}Eu.create=(r,e)=>new Eu({valueType:r,minSize:null,maxSize:null,typeName:wt.ZodSet,...Ot(e)});class rf extends Dt{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==Ke.function)return De(t,{code:be.invalid_type,expected:Ke.function,received:t.parsedType}),Ct;function n(c,d){return rv({data:c,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,tv(),Sf].filter(u=>!!u),issueData:{code:be.invalid_arguments,argumentsError:d}})}function i(c,d){return rv({data:c,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,tv(),Sf].filter(u=>!!u),issueData:{code:be.invalid_return_type,returnTypeError:d}})}const o={errorMap:t.common.contextualErrorMap},a=t.data;if(this._def.returns instanceof Tf){const c=this;return Li(async function(...d){const u=new Eo([]),h=await c._def.args.parseAsync(d,o).catch(v=>{throw u.addIssue(n(d,v)),u}),p=await Reflect.apply(a,this,h);return await c._def.returns._def.type.parseAsync(p,o).catch(v=>{throw u.addIssue(i(p,v)),u})})}else{const c=this;return Li(function(...d){const u=c._def.args.safeParse(d,o);if(!u.success)throw new Eo([n(d,u.error)]);const h=Reflect.apply(a,this,u.data),p=c._def.returns.safeParse(h,o);if(!p.success)throw new Eo([i(h,p.error)]);return p.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new rf({...this._def,args:xs.create(e).rest(uu.create())})}returns(e){return new rf({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,n){return new rf({args:e||xs.create([]).rest(uu.create()),returns:t||uu.create(),typeName:wt.ZodFunction,...Ot(n)})}}class Xp extends Dt{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}Xp.create=(r,e)=>new Xp({getter:r,typeName:wt.ZodLazy,...Ot(e)});class Jp extends Dt{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return De(t,{received:t.data,code:be.invalid_literal,expected:this._def.value}),Ct}return{status:"valid",value:e.data}}get value(){return this._def.value}}Jp.create=(r,e)=>new Jp({value:r,typeName:wt.ZodLiteral,...Ot(e)});function QR(r,e){return new Hl({values:r,typeName:wt.ZodEnum,...Ot(e)})}class Hl extends Dt{constructor(){super(...arguments),up.set(this,void 0)}_parse(e){if(typeof e.data!="string"){const t=this._getOrReturnCtx(e),n=this._def.values;return De(t,{expected:tr.joinValues(n),received:t.parsedType,code:be.invalid_type}),Ct}if(nv(this,up)||KR(this,up,new Set(this._def.values)),!nv(this,up).has(e.data)){const t=this._getOrReturnCtx(e),n=this._def.values;return De(t,{received:t.data,code:be.invalid_enum_value,options:n}),Ct}return Li(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return Hl.create(e,{...this._def,...t})}exclude(e,t=this._def){return Hl.create(this.options.filter(n=>!e.includes(n)),{...this._def,...t})}}up=new WeakMap;Hl.create=QR;class em extends Dt{constructor(){super(...arguments),hp.set(this,void 0)}_parse(e){const t=tr.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==Ke.string&&n.parsedType!==Ke.number){const i=tr.objectValues(t);return De(n,{expected:tr.joinValues(i),received:n.parsedType,code:be.invalid_type}),Ct}if(nv(this,hp)||KR(this,hp,new Set(tr.getValidEnumValues(this._def.values))),!nv(this,hp).has(e.data)){const i=tr.objectValues(t);return De(n,{received:n.data,code:be.invalid_enum_value,options:i}),Ct}return Li(e.data)}get enum(){return this._def.values}}hp=new WeakMap;em.create=(r,e)=>new em({values:r,typeName:wt.ZodNativeEnum,...Ot(e)});class Tf extends Dt{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==Ke.promise&&t.common.async===!1)return De(t,{code:be.invalid_type,expected:Ke.promise,received:t.parsedType}),Ct;const n=t.parsedType===Ke.promise?t.data:Promise.resolve(t.data);return Li(n.then(i=>this._def.type.parseAsync(i,{path:t.path,errorMap:t.common.contextualErrorMap})))}}Tf.create=(r,e)=>new Tf({type:r,typeName:wt.ZodPromise,...Ot(e)});class Da extends Dt{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===wt.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:n}=this._processInputParams(e),i=this._def.effect||null,o={addIssue:a=>{De(n,a),a.fatal?t.abort():t.dirty()},get path(){return n.path}};if(o.addIssue=o.addIssue.bind(o),i.type==="preprocess"){const a=i.transform(n.data,o);if(n.common.async)return Promise.resolve(a).then(async c=>{if(t.value==="aborted")return Ct;const d=await this._def.schema._parseAsync({data:c,path:n.path,parent:n});return d.status==="aborted"?Ct:d.status==="dirty"||t.value==="dirty"?Uh(d.value):d});{if(t.value==="aborted")return Ct;const c=this._def.schema._parseSync({data:a,path:n.path,parent:n});return c.status==="aborted"?Ct:c.status==="dirty"||t.value==="dirty"?Uh(c.value):c}}if(i.type==="refinement"){const a=c=>{const d=i.refinement(c,o);if(n.common.async)return Promise.resolve(d);if(d instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return c};if(n.common.async===!1){const c=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return c.status==="aborted"?Ct:(c.status==="dirty"&&t.dirty(),a(c.value),{status:t.value,value:c.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(c=>c.status==="aborted"?Ct:(c.status==="dirty"&&t.dirty(),a(c.value).then(()=>({status:t.value,value:c.value}))))}if(i.type==="transform")if(n.common.async===!1){const a=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!Cu(a))return a;const c=i.transform(a.value,o);if(c instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:c}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(a=>Cu(a)?Promise.resolve(i.transform(a.value,o)).then(c=>({status:t.value,value:c})):a);tr.assertNever(i)}}Da.create=(r,e,t)=>new Da({schema:r,typeName:wt.ZodEffects,effect:e,...Ot(t)});Da.createWithPreprocess=(r,e,t)=>new Da({schema:e,effect:{type:"preprocess",transform:r},typeName:wt.ZodEffects,...Ot(t)});class ps extends Dt{_parse(e){return this._getType(e)===Ke.undefined?Li(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}ps.create=(r,e)=>new ps({innerType:r,typeName:wt.ZodOptional,...Ot(e)});class Nl extends Dt{_parse(e){return this._getType(e)===Ke.null?Li(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Nl.create=(r,e)=>new Nl({innerType:r,typeName:wt.ZodNullable,...Ot(e)});class tm extends Dt{_parse(e){const{ctx:t}=this._processInputParams(e);let n=t.data;return t.parsedType===Ke.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}tm.create=(r,e)=>new tm({innerType:r,typeName:wt.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...Ot(e)});class rm extends Dt{_parse(e){const{ctx:t}=this._processInputParams(e),n={...t,common:{...t.common,issues:[]}},i=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return Bp(i)?i.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Eo(n.common.issues)},input:n.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Eo(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}rm.create=(r,e)=>new rm({innerType:r,typeName:wt.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...Ot(e)});class sv extends Dt{_parse(e){if(this._getType(e)!==Ke.nan){const n=this._getOrReturnCtx(e);return De(n,{code:be.invalid_type,expected:Ke.nan,received:n.parsedType}),Ct}return{status:"valid",value:e.data}}}sv.create=r=>new sv({typeName:wt.ZodNaN,...Ot(r)});const MD=Symbol("zod_brand");class Iw extends Dt{_parse(e){const{ctx:t}=this._processInputParams(e),n=t.data;return this._def.type._parse({data:n,path:t.path,parent:t})}unwrap(){return this._def.type}}class r2 extends Dt{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{const o=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return o.status==="aborted"?Ct:o.status==="dirty"?(t.dirty(),Uh(o.value)):this._def.out._parseAsync({data:o.value,path:n.path,parent:n})})();{const i=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?Ct:i.status==="dirty"?(t.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:n.path,parent:n})}}static create(e,t){return new r2({in:e,out:t,typeName:wt.ZodPipeline})}}class nm extends Dt{_parse(e){const t=this._def.innerType._parse(e),n=i=>(Cu(i)&&(i.value=Object.freeze(i.value)),i);return Bp(t)?t.then(i=>n(i)):n(t)}unwrap(){return this._def.innerType}}nm.create=(r,e)=>new nm({innerType:r,typeName:wt.ZodReadonly,...Ot(e)});function VC(r,e){const t=typeof r=="function"?r(e):typeof r=="string"?{message:r}:r;return typeof t=="string"?{message:t}:t}function XR(r,e={},t){return r?Af.create().superRefine((n,i)=>{var o,a;const c=r(n);if(c instanceof Promise)return c.then(d=>{var u,h;if(!d){const p=VC(e,n),m=(h=(u=p.fatal)!==null&&u!==void 0?u:t)!==null&&h!==void 0?h:!0;i.addIssue({code:"custom",...p,fatal:m})}});if(!c){const d=VC(e,n),u=(a=(o=d.fatal)!==null&&o!==void 0?o:t)!==null&&a!==void 0?a:!0;i.addIssue({code:"custom",...d,fatal:u})}}):Af.create()}const $D={object:rn.lazycreate};var wt;(function(r){r.ZodString="ZodString",r.ZodNumber="ZodNumber",r.ZodNaN="ZodNaN",r.ZodBigInt="ZodBigInt",r.ZodBoolean="ZodBoolean",r.ZodDate="ZodDate",r.ZodSymbol="ZodSymbol",r.ZodUndefined="ZodUndefined",r.ZodNull="ZodNull",r.ZodAny="ZodAny",r.ZodUnknown="ZodUnknown",r.ZodNever="ZodNever",r.ZodVoid="ZodVoid",r.ZodArray="ZodArray",r.ZodObject="ZodObject",r.ZodUnion="ZodUnion",r.ZodDiscriminatedUnion="ZodDiscriminatedUnion",r.ZodIntersection="ZodIntersection",r.ZodTuple="ZodTuple",r.ZodRecord="ZodRecord",r.ZodMap="ZodMap",r.ZodSet="ZodSet",r.ZodFunction="ZodFunction",r.ZodLazy="ZodLazy",r.ZodLiteral="ZodLiteral",r.ZodEnum="ZodEnum",r.ZodEffects="ZodEffects",r.ZodNativeEnum="ZodNativeEnum",r.ZodOptional="ZodOptional",r.ZodNullable="ZodNullable",r.ZodDefault="ZodDefault",r.ZodCatch="ZodCatch",r.ZodPromise="ZodPromise",r.ZodBranded="ZodBranded",r.ZodPipeline="ZodPipeline",r.ZodReadonly="ZodReadonly"})(wt||(wt={}));const OD=(r,e={message:`Input not instance of ${r.name}`})=>XR(t=>t instanceof r,e),gi=Ma.create,JR=Zl.create,ZD=sv.create,LD=Ll.create,Rw=qp.create,Rb=ku.create,HD=iv.create,ND=Kp.create,DD=Gp.create,VD=Af.create,eP=uu.create,FD=wc.create,zD=ov.create,tP=Za.create,n2=rn.create,jD=rn.strictCreate,UD=Wp.create,BD=m4.create,qD=Yp.create,KD=xs.create,rP=Qp.create,GD=av.create,WD=Eu.create,YD=rf.create,QD=Xp.create,XD=Jp.create,JD=Hl.create,eV=em.create,tV=Tf.create,FC=Da.create,rV=ps.create,nV=Nl.create,iV=Da.createWithPreprocess,oV=r2.create,aV=()=>gi().optional(),sV=()=>JR().optional(),cV=()=>Rw().optional(),lV={string:r=>Ma.create({...r,coerce:!0}),number:r=>Zl.create({...r,coerce:!0}),boolean:r=>qp.create({...r,coerce:!0}),bigint:r=>Ll.create({...r,coerce:!0}),date:r=>ku.create({...r,coerce:!0})},dV=Ct;var j=Object.freeze({__proto__:null,defaultErrorMap:Sf,setErrorMap:lD,getErrorMap:tv,makeIssue:rv,EMPTY_PATH:dD,addIssueToContext:De,ParseStatus:bi,INVALID:Ct,DIRTY:Uh,OK:Li,isAborted:Ab,isDirty:Tb,isValid:Cu,isAsync:Bp,get util(){return tr},get objectUtil(){return Sb},ZodParsedType:Ke,getParsedType:Qs,ZodType:Dt,datetimeRegex:YR,ZodString:Ma,ZodNumber:Zl,ZodBigInt:Ll,ZodBoolean:qp,ZodDate:ku,ZodSymbol:iv,ZodUndefined:Kp,ZodNull:Gp,ZodAny:Af,ZodUnknown:uu,ZodNever:wc,ZodVoid:ov,ZodArray:Za,ZodObject:rn,ZodUnion:Wp,ZodDiscriminatedUnion:m4,ZodIntersection:Yp,ZodTuple:xs,ZodRecord:Qp,ZodMap:av,ZodSet:Eu,ZodFunction:rf,ZodLazy:Xp,ZodLiteral:Jp,ZodEnum:Hl,ZodNativeEnum:em,ZodPromise:Tf,ZodEffects:Da,ZodTransformer:Da,ZodOptional:ps,ZodNullable:Nl,ZodDefault:tm,ZodCatch:rm,ZodNaN:sv,BRAND:MD,ZodBranded:Iw,ZodPipeline:r2,ZodReadonly:nm,custom:XR,Schema:Dt,ZodSchema:Dt,late:$D,get ZodFirstPartyTypeKind(){return wt},coerce:lV,any:VD,array:tP,bigint:LD,boolean:Rw,date:Rb,discriminatedUnion:BD,effect:FC,enum:JD,function:YD,instanceof:OD,intersection:qD,lazy:QD,literal:XD,map:GD,nan:ZD,nativeEnum:eV,never:FD,null:DD,nullable:nV,number:JR,object:n2,oboolean:cV,onumber:sV,optional:rV,ostring:aV,pipeline:oV,preprocess:iV,promise:tV,record:rP,set:WD,strictObject:jD,string:gi,symbol:HD,transformer:FC,tuple:KD,undefined:ND,union:UD,unknown:eP,void:zD,NEVER:dV,ZodIssueCode:be,quotelessJson:cD,ZodError:Eo});const nP=()=>j.custom(r=>r===(r==null?void 0:r.toUpperCase()),r=>({code:j.ZodIssueCode.custom,validation:"uppercase",path:["method"],message:[`Provided HTTP method '${r}' must be in uppercase.`,"See RFC 7231 Section 4.1 for more information","https://www.rfc-editor.org/rfc/rfc7231#section-4.1"].join(" ")})),uV=()=>j.enum(["GET","POST","PUT","DELETE","PATCH","OPTIONS","HEAD","CONNECT","TRACE"],{errorMap:r=>{const{received:e,options:t}=r;return{message:["Invalid request method.",`Expected '${t.join(" | ")}', but received '${e}'.`,"See RFC 2615 Section 9 for more information","https://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html"].join(" ")}}}),hV=()=>nP().pipe(uV()),fV=j.object({attributionReporting:j.object({eventSourceEligible:j.boolean().optional(),triggerEligible:j.boolean().optional()}).optional(),body:j.union([j.string(),j.instanceof(Blob),j.instanceof(ArrayBuffer),j.instanceof(FormData),j.instanceof(URLSearchParams),j.instanceof(ReadableStream)]).optional(),browsingTopics:j.boolean().optional(),cache:j.enum(["default","no-store","reload","no-cache","force-cache","only-if-cached"]).optional(),credentials:j.enum(["omit","same-origin","include"]).optional(),headers:j.record(j.string(),j.string()).optional().or(j.instanceof(Headers)),integrity:j.string().optional(),keepalive:j.boolean().optional(),method:hV().optional(),mode:j.enum(["same-origin","cors","no-cors","navigate","websocket"]).optional(),priority:j.enum(["low","high","auto"]).optional(),redirect:j.enum(["follow","error","manual"]).optional(),referrer:j.string().optional(),referrerPolicy:j.enum(["no-referrer","no-referrer-when-downgrade","origin","origin-when-cross-origin","same-origin","strict-origin","strict-origin-when-cross-origin","unsafe-url"]).optional(),signal:j.instanceof(AbortSignal).optional()}),zC=fV.extend({uri:j.string(),path:j.string().optional()}),pV=r=>e=>{var o;const{error:t,success:n,data:i}=nP().safeParse(e.method);if(e.method=n?i:(o=e.method)==null?void 0:o.toUpperCase(),t)for(const a of t.errors)console.warn(a.message);return e},mV=r=>e=>{const{strict:t,parse:n}={},i=t?zC:zC.passthrough();try{const o=i.parse(e);return n?o:void 0}catch(o){if(n)throw o;console.error("Invalid request options",o.message)}};class gV{constructor(e){Le(this,"_clients",{});Le(this,"defaultHttpClientCtor");Le(this,"defaultHttpRequestHandler",new BR({"capitalize-method":pV(),"request-validation":mV()}));this.defaultHttpClientCtor=e}get clients(){return{...this._clients}}hasClient(e){return Object.keys(this._clients).includes(e)}configureClient(e,t){const n=typeof t=="string"?{baseUri:t}:t,i=typeof n=="function"?{onCreate:n}:n;return this._clients[e]={...this._clients[e],...i},this}}class vV extends Error{}const yV=r=>new RegExp("^(https?:\\/\\/)?((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.?)+[a-z]{2,}|((\\d{1,3}\\.){3}\\d{1,3}))(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*(\\?[;&a-z\\d%_.~+=-]*)?(\\#[-a-z\\d_]*)?$","i").test(r);class _V{constructor(e){Le(this,"config");this.config=e}get defaultHttpRequestHandler(){return this.config.defaultHttpRequestHandler}hasClient(e){return Object.keys(this.config.clients).includes(e)}createClient(e){const t=this._resolveConfig(e),{baseUri:n,defaultScopes:i=[],onCreate:o,ctor:a=this.config.defaultHttpClientCtor,requestHandler:c=this.defaultHttpRequestHandler}=t,d={requestHandler:c},u=new a(n||"",d);return Object.assign(u,{defaultScopes:i}),o==null||o(u),u}createCustomClient(e){return this.createClient(e)}_resolveConfig(e){if(typeof e=="string"){const t=this.config.clients[e];if(!t&&yV(e))return{baseUri:e};if(!t)throw new vV(`No registered http client for key [${e}]`);return t}return e}}function bV(r,e){e===void 0&&(e={});var t=e.selector,n=fR(e,["selector"]);return new It(function(i){var o=new AbortController,a=o.signal,c=!0,d=n.signal;if(d)if(d.aborted)o.abort();else{var u=function(){a.aborted||o.abort()};d.addEventListener("abort",u),i.add(function(){return d.removeEventListener("abort",u)})}var h=Cn(Cn({},n),{signal:a}),p=function(m){c=!1,i.error(m)};return fetch(r,h).then(function(m){t?On(t(m)).subscribe(Er(i,void 0,function(){c=!1,i.complete()},p)):(c=!1,i.next(m),i.complete())}).catch(p),function(){c&&o.abort()}})}class Tl extends Error{constructor(t,n,i){super(t,i);Le(this,"response");this.response=n}}Le(Tl,"Name","HttpResponseError");const r4=class r4 extends Tl{constructor(t,n,i){super(t,n,i);Le(this,"data");this.name=r4.Name,this.data=i==null?void 0:i.data}};Le(r4,"Name","HttpJsonResponseError");let nf=r4;const n4=class n4 extends Tl{constructor(e,t,n){super(e,t,n),this.name=n4.Name}};Le(n4,"Name","ServerSentEventResponseError");let Cp=n4;const If=async r=>{if(r.status===204)return Promise.resolve();try{const e=await r.json();if(!r.ok)throw new nf("network response was not OK",r,{data:e});return e}catch(e){throw e instanceof nf?e:new nf("failed to parse response",r,{cause:e})}},wV=async r=>{var t,n,i;if(!r.ok)throw new Error("network response was not OK");if(r.status===204)throw new Error("no content");const e=(i=(n=(t=r.headers.get("content-disposition"))==null?void 0:t.split(";").find(o=>o.includes("filename=")))==null?void 0:n.replace("filename=",""))==null?void 0:i.trim();try{const o=await r.blob();return{filename:e,blob:o}}catch{throw Error("failed to parse response")}},xV=r=>{try{return JSON.parse(r)}catch{return r}};function*CV(r,e){const t=r.split(`
43
+ `):"",this.name="UnsubscriptionError",this.errors=t}});function Yg(r,e){if(r){var t=r.indexOf(e);0<=t&&r.splice(t,1)}}var Qn=function(){function r(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return r.prototype.unsubscribe=function(){var e,t,n,i,o;if(!this.closed){this.closed=!0;var a=this._parentage;if(a)if(this._parentage=null,Array.isArray(a))try{for(var c=$i(a),d=c.next();!d.done;d=c.next()){var u=d.value;u.remove(this)}}catch(b){e={error:b}}finally{try{d&&!d.done&&(t=c.return)&&t.call(c)}finally{if(e)throw e.error}}else a.remove(this);var h=this.initialTeardown;if(br(h))try{h()}catch(b){o=b instanceof O3?b.errors:[b]}var p=this._finalizers;if(p){this._finalizers=null;try{for(var m=$i(p),v=m.next();!v.done;v=m.next()){var _=v.value;try{PC(_)}catch(b){o=o??[],b instanceof O3?o=bc(bc([],_s(o)),_s(b.errors)):o.push(b)}}}catch(b){n={error:b}}finally{try{v&&!v.done&&(i=m.return)&&i.call(m)}finally{if(n)throw n.error}}}if(o)throw new O3(o)}},r.prototype.add=function(e){var t;if(e&&e!==this)if(this.closed)PC(e);else{if(e instanceof r){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=(t=this._finalizers)!==null&&t!==void 0?t:[]).push(e)}},r.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},r.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},r.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&Yg(t,e)},r.prototype.remove=function(e){var t=this._finalizers;t&&Yg(t,e),e instanceof r&&e._removeParent(this)},r.EMPTY=function(){var e=new r;return e.closed=!0,e}(),r}(),mR=Qn.EMPTY;function gR(r){return r instanceof Qn||r&&"closed"in r&&br(r.remove)&&br(r.add)&&br(r.unsubscribe)}function PC(r){br(r)?r():r.unsubscribe()}var YH={Promise:void 0},QH={setTimeout:function(r,e){for(var t=[],n=2;n<arguments.length;n++)t[n-2]=arguments[n];return setTimeout.apply(void 0,bc([r,e],_s(t)))},clearTimeout:function(r){return clearTimeout(r)},delegate:void 0};function vR(r){QH.setTimeout(function(){throw r})}function Qg(){}function Tg(r){r()}var vw=function(r){xi(e,r);function e(t){var n=r.call(this)||this;return n.isStopped=!1,t?(n.destination=t,gR(t)&&t.add(n)):n.destination=eN,n}return e.create=function(t,n,i){return new kf(t,n,i)},e.prototype.next=function(t){this.isStopped||this._next(t)},e.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,r.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){try{this.destination.error(t)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e}(Qn),XH=function(){function r(e){this.partialObserver=e}return r.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(n){z0(n)}},r.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(n){z0(n)}else z0(e)},r.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(t){z0(t)}},r}(),kf=function(r){xi(e,r);function e(t,n,i){var o=r.call(this)||this,a;return br(t)||!t?a={next:t??void 0,error:n??void 0,complete:i??void 0}:a=t,o.destination=new XH(a),o}return e}(vw);function z0(r){vR(r)}function JH(r){throw r}var eN={closed:!0,next:Qg,error:JH,complete:Qg},yw=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function As(r){return r}function tN(r){return r.length===0?As:r.length===1?r[0]:function(t){return r.reduce(function(n,i){return i(n)},t)}}var It=function(){function r(e){e&&(this._subscribe=e)}return r.prototype.lift=function(e){var t=new r;return t.source=this,t.operator=e,t},r.prototype.subscribe=function(e,t,n){var i=this,o=nN(e)?e:new kf(e,t,n);return Tg(function(){var a=i,c=a.operator,d=a.source;o.add(c?c.call(o,d):d?i._subscribe(o):i._trySubscribe(o))}),o},r.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},r.prototype.forEach=function(e,t){var n=this;return t=MC(t),new t(function(i,o){var a=new kf({next:function(c){try{e(c)}catch(d){o(d),a.unsubscribe()}},error:o,complete:i});n.subscribe(a)})},r.prototype._subscribe=function(e){var t;return(t=this.source)===null||t===void 0?void 0:t.subscribe(e)},r.prototype[yw]=function(){return this},r.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return tN(e)(this)},r.prototype.toPromise=function(e){var t=this;return e=MC(e),new e(function(n,i){var o;t.subscribe(function(a){return o=a},function(a){return i(a)},function(){return n(o)})})},r.create=function(e){return new r(e)},r}();function MC(r){var e;return(e=r??YH.Promise)!==null&&e!==void 0?e:Promise}function rN(r){return r&&br(r.next)&&br(r.error)&&br(r.complete)}function nN(r){return r&&r instanceof vw||rN(r)&&gR(r)}function iN(r){return br(r==null?void 0:r.lift)}function Mr(r){return function(e){if(iN(e))return e.lift(function(t){try{return r(t,this)}catch(n){this.error(n)}});throw new TypeError("Unable to lift unknown Observable type")}}function Er(r,e,t,n,i){return new yR(r,e,t,n,i)}var yR=function(r){xi(e,r);function e(t,n,i,o,a,c){var d=r.call(this,t)||this;return d.onFinalize=a,d.shouldUnsubscribe=c,d._next=n?function(u){try{n(u)}catch(h){t.error(h)}}:r.prototype._next,d._error=o?function(u){try{o(u)}catch(h){t.error(h)}finally{this.unsubscribe()}}:r.prototype._error,d._complete=i?function(){try{i()}catch(u){t.error(u)}finally{this.unsubscribe()}}:r.prototype._complete,d}return e.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;r.prototype.unsubscribe.call(this),!n&&((t=this.onFinalize)===null||t===void 0||t.call(this))}},e}(vw),oN=f4(function(r){return function(){r(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),Fn=function(r){xi(e,r);function e(){var t=r.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return e.prototype.lift=function(t){var n=new $C(this,this);return n.operator=t,n},e.prototype._throwIfClosed=function(){if(this.closed)throw new oN},e.prototype.next=function(t){var n=this;Tg(function(){var i,o;if(n._throwIfClosed(),!n.isStopped){n.currentObservers||(n.currentObservers=Array.from(n.observers));try{for(var a=$i(n.currentObservers),c=a.next();!c.done;c=a.next()){var d=c.value;d.next(t)}}catch(u){i={error:u}}finally{try{c&&!c.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}}})},e.prototype.error=function(t){var n=this;Tg(function(){if(n._throwIfClosed(),!n.isStopped){n.hasError=n.isStopped=!0,n.thrownError=t;for(var i=n.observers;i.length;)i.shift().error(t)}})},e.prototype.complete=function(){var t=this;Tg(function(){if(t._throwIfClosed(),!t.isStopped){t.isStopped=!0;for(var n=t.observers;n.length;)n.shift().complete()}})},e.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(e.prototype,"observed",{get:function(){var t;return((t=this.observers)===null||t===void 0?void 0:t.length)>0},enumerable:!1,configurable:!0}),e.prototype._trySubscribe=function(t){return this._throwIfClosed(),r.prototype._trySubscribe.call(this,t)},e.prototype._subscribe=function(t){return this._throwIfClosed(),this._checkFinalizedStatuses(t),this._innerSubscribe(t)},e.prototype._innerSubscribe=function(t){var n=this,i=this,o=i.hasError,a=i.isStopped,c=i.observers;return o||a?mR:(this.currentObservers=null,c.push(t),new Qn(function(){n.currentObservers=null,Yg(c,t)}))},e.prototype._checkFinalizedStatuses=function(t){var n=this,i=n.hasError,o=n.thrownError,a=n.isStopped;i?t.error(o):a&&t.complete()},e.prototype.asObservable=function(){var t=new It;return t.source=this,t},e.create=function(t,n){return new $C(t,n)},e}(It),$C=function(r){xi(e,r);function e(t,n){var i=r.call(this)||this;return i.destination=t,i.source=n,i}return e.prototype.next=function(t){var n,i;(i=(n=this.destination)===null||n===void 0?void 0:n.next)===null||i===void 0||i.call(n,t)},e.prototype.error=function(t){var n,i;(i=(n=this.destination)===null||n===void 0?void 0:n.error)===null||i===void 0||i.call(n,t)},e.prototype.complete=function(){var t,n;(n=(t=this.destination)===null||t===void 0?void 0:t.complete)===null||n===void 0||n.call(t)},e.prototype._subscribe=function(t){var n,i;return(i=(n=this.source)===null||n===void 0?void 0:n.subscribe(t))!==null&&i!==void 0?i:mR},e}(Fn),Xf=function(r){xi(e,r);function e(t){var n=r.call(this)||this;return n._value=t,n}return Object.defineProperty(e.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),e.prototype._subscribe=function(t){var n=r.prototype._subscribe.call(this,t);return!n.closed&&t.next(this._value),n},e.prototype.getValue=function(){var t=this,n=t.hasError,i=t.thrownError,o=t._value;if(n)throw i;return this._throwIfClosed(),o},e.prototype.next=function(t){r.prototype.next.call(this,this._value=t)},e}(Fn),_w={now:function(){return(_w.delegate||Date).now()},delegate:void 0},_R=function(r){xi(e,r);function e(t,n,i){t===void 0&&(t=1/0),n===void 0&&(n=1/0),i===void 0&&(i=_w);var o=r.call(this)||this;return o._bufferSize=t,o._windowTime=n,o._timestampProvider=i,o._buffer=[],o._infiniteTimeWindow=!0,o._infiniteTimeWindow=n===1/0,o._bufferSize=Math.max(1,t),o._windowTime=Math.max(1,n),o}return e.prototype.next=function(t){var n=this,i=n.isStopped,o=n._buffer,a=n._infiniteTimeWindow,c=n._timestampProvider,d=n._windowTime;i||(o.push(t),!a&&o.push(c.now()+d)),this._trimBuffer(),r.prototype.next.call(this,t)},e.prototype._subscribe=function(t){this._throwIfClosed(),this._trimBuffer();for(var n=this._innerSubscribe(t),i=this,o=i._infiniteTimeWindow,a=i._buffer,c=a.slice(),d=0;d<c.length&&!t.closed;d+=o?1:2)t.next(c[d]);return this._checkFinalizedStatuses(t),n},e.prototype._trimBuffer=function(){var t=this,n=t._bufferSize,i=t._timestampProvider,o=t._buffer,a=t._infiniteTimeWindow,c=(a?1:2)*n;if(n<1/0&&c<o.length&&o.splice(0,o.length-c),!a){for(var d=i.now(),u=0,h=1;h<o.length&&o[h]<=d;h+=2)u=h;u&&o.splice(0,u+1)}},e}(Fn),aN=function(r){xi(e,r);function e(t,n){return r.call(this)||this}return e.prototype.schedule=function(t,n){return this},e}(Qn),OC={setInterval:function(r,e){for(var t=[],n=2;n<arguments.length;n++)t[n-2]=arguments[n];return setInterval.apply(void 0,bc([r,e],_s(t)))},clearInterval:function(r){return clearInterval(r)},delegate:void 0},sN=function(r){xi(e,r);function e(t,n){var i=r.call(this,t,n)||this;return i.scheduler=t,i.work=n,i.pending=!1,i}return e.prototype.schedule=function(t,n){var i;if(n===void 0&&(n=0),this.closed)return this;this.state=t;var o=this.id,a=this.scheduler;return o!=null&&(this.id=this.recycleAsyncId(a,o,n)),this.pending=!0,this.delay=n,this.id=(i=this.id)!==null&&i!==void 0?i:this.requestAsyncId(a,this.id,n),this},e.prototype.requestAsyncId=function(t,n,i){return i===void 0&&(i=0),OC.setInterval(t.flush.bind(t,this),i)},e.prototype.recycleAsyncId=function(t,n,i){if(i===void 0&&(i=0),i!=null&&this.delay===i&&this.pending===!1)return n;n!=null&&OC.clearInterval(n)},e.prototype.execute=function(t,n){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var i=this._execute(t,n);if(i)return i;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},e.prototype._execute=function(t,n){var i=!1,o;try{this.work(t)}catch(a){i=!0,o=a||new Error("Scheduled action threw falsy error")}if(i)return this.unsubscribe(),o},e.prototype.unsubscribe=function(){if(!this.closed){var t=this,n=t.id,i=t.scheduler,o=i.actions;this.work=this.state=this.scheduler=null,this.pending=!1,Yg(o,this),n!=null&&(this.id=this.recycleAsyncId(i,n,null)),this.delay=null,r.prototype.unsubscribe.call(this)}},e}(aN),ZC=function(){function r(e,t){t===void 0&&(t=r.now),this.schedulerActionCtor=e,this.now=t}return r.prototype.schedule=function(e,t,n){return t===void 0&&(t=0),new this.schedulerActionCtor(this,e).schedule(n,t)},r.now=_w.now,r}(),cN=function(r){xi(e,r);function e(t,n){n===void 0&&(n=ZC.now);var i=r.call(this,t,n)||this;return i.actions=[],i._active=!1,i}return e.prototype.flush=function(t){var n=this.actions;if(this._active){n.push(t);return}var i;this._active=!0;do if(i=t.execute(t.state,t.delay))break;while(t=n.shift());if(this._active=!1,i){for(;t=n.shift();)t.unsubscribe();throw i}},e}(ZC),Ef=new cN(sN),lN=Ef,Tr=new It(function(r){return r.complete()});function bR(r){return r&&br(r.schedule)}function bw(r){return r[r.length-1]}function ww(r){return br(bw(r))?r.pop():void 0}function p4(r){return bR(bw(r))?r.pop():void 0}function dN(r,e){return typeof bw(r)=="number"?r.pop():e}var xw=function(r){return r&&typeof r.length=="number"&&typeof r!="function"};function wR(r){return br(r==null?void 0:r.then)}function xR(r){return br(r[yw])}function CR(r){return Symbol.asyncIterator&&br(r==null?void 0:r[Symbol.asyncIterator])}function kR(r){return new TypeError("You provided "+(r!==null&&typeof r=="object"?"an invalid object":"'"+r+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function uN(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var ER=uN();function SR(r){return br(r==null?void 0:r[ER])}function AR(r){return GH(this,arguments,function(){var t,n,i,o;return pR(this,function(a){switch(a.label){case 0:t=r.getReader(),a.label=1;case 1:a.trys.push([1,,9,10]),a.label=2;case 2:return[4,tf(t.read())];case 3:return n=a.sent(),i=n.value,o=n.done,o?[4,tf(void 0)]:[3,5];case 4:return[2,a.sent()];case 5:return[4,tf(i)];case 6:return[4,a.sent()];case 7:return a.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}})})}function TR(r){return br(r==null?void 0:r.getReader)}function On(r){if(r instanceof It)return r;if(r!=null){if(xR(r))return hN(r);if(xw(r))return fN(r);if(wR(r))return pN(r);if(CR(r))return IR(r);if(SR(r))return mN(r);if(TR(r))return gN(r)}throw kR(r)}function hN(r){return new It(function(e){var t=r[yw]();if(br(t.subscribe))return t.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function fN(r){return new It(function(e){for(var t=0;t<r.length&&!e.closed;t++)e.next(r[t]);e.complete()})}function pN(r){return new It(function(e){r.then(function(t){e.closed||(e.next(t),e.complete())},function(t){return e.error(t)}).then(null,vR)})}function mN(r){return new It(function(e){var t,n;try{for(var i=$i(r),o=i.next();!o.done;o=i.next()){var a=o.value;if(e.next(a),e.closed)return}}catch(c){t={error:c}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}e.complete()})}function IR(r){return new It(function(e){vN(r,e).catch(function(t){return e.error(t)})})}function gN(r){return IR(AR(r))}function vN(r,e){var t,n,i,o;return mc(this,void 0,void 0,function(){var a,c;return pR(this,function(d){switch(d.label){case 0:d.trys.push([0,5,6,11]),t=WH(r),d.label=1;case 1:return[4,t.next()];case 2:if(n=d.sent(),!!n.done)return[3,4];if(a=n.value,e.next(a),e.closed)return[2];d.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return c=d.sent(),i={error:c},[3,11];case 6:return d.trys.push([6,,9,10]),n&&!n.done&&(o=t.return)?[4,o.call(t)]:[3,8];case 7:d.sent(),d.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return e.complete(),[2]}})})}function gc(r,e,t,n,i){n===void 0&&(n=0),i===void 0&&(i=!1);var o=e.schedule(function(){t(),i?r.add(this.schedule(null,n)):this.unsubscribe()},n);if(r.add(o),!i)return o}function Xg(r,e){return e===void 0&&(e=0),Mr(function(t,n){t.subscribe(Er(n,function(i){return gc(n,r,function(){return n.next(i)},e)},function(){return gc(n,r,function(){return n.complete()},e)},function(i){return gc(n,r,function(){return n.error(i)},e)}))})}function RR(r,e){return e===void 0&&(e=0),Mr(function(t,n){n.add(r.schedule(function(){return t.subscribe(n)},e))})}function yN(r,e){return On(r).pipe(RR(e),Xg(e))}function _N(r,e){return On(r).pipe(RR(e),Xg(e))}function bN(r,e){return new It(function(t){var n=0;return e.schedule(function(){n===r.length?t.complete():(t.next(r[n++]),t.closed||this.schedule())})})}function wN(r,e){return new It(function(t){var n;return gc(t,e,function(){n=r[ER](),gc(t,e,function(){var i,o,a;try{i=n.next(),o=i.value,a=i.done}catch(c){t.error(c);return}a?t.complete():t.next(o)},0,!0)}),function(){return br(n==null?void 0:n.return)&&n.return()}})}function PR(r,e){if(!r)throw new Error("Iterable cannot be null");return new It(function(t){gc(t,e,function(){var n=r[Symbol.asyncIterator]();gc(t,e,function(){n.next().then(function(i){i.done?t.complete():t.next(i.value)})},0,!0)})})}function xN(r,e){return PR(AR(r),e)}function CN(r,e){if(r!=null){if(xR(r))return yN(r,e);if(xw(r))return bN(r,e);if(wR(r))return _N(r,e);if(CR(r))return PR(r,e);if(SR(r))return wN(r,e);if(TR(r))return xN(r,e)}throw kR(r)}function at(r,e){return e?CN(r,e):On(r)}function Pt(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var t=p4(r);return at(r,t)}function MR(r,e){var t=br(r)?r:function(){return r},n=function(i){return i.error(t())};return new It(n)}var e2=f4(function(r){return function(){r(this),this.name="EmptyError",this.message="no elements in sequence"}});function hr(r,e){var t=typeof e=="object";return new Promise(function(n,i){var o=!1,a;r.subscribe({next:function(c){a=c,o=!0},error:i,complete:function(){o?n(a):t?n(e.defaultValue):i(new e2)}})})}function Vn(r,e){var t=typeof e=="object";return new Promise(function(n,i){var o=new kf({next:function(a){n(a),o.unsubscribe()},error:i,complete:function(){t?n(e.defaultValue):i(new e2)}});r.subscribe(o)})}function $R(r){return r instanceof Date&&!isNaN(r)}var kN=f4(function(r){return function(t){t===void 0&&(t=null),r(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=t}});function Ks(r,e){var t=$R(r)?{first:r}:typeof r=="number"?{each:r}:r,n=t.first,i=t.each,o=t.with,a=o===void 0?EN:o,c=t.scheduler,d=c===void 0?Ef:c,u=t.meta,h=u===void 0?null:u;if(n==null&&i==null)throw new TypeError("No timeout provided.");return Mr(function(p,m){var v,_,b=null,C=0,T=function(A){_=gc(m,d,function(){try{v.unsubscribe(),On(a({meta:h,lastValue:b,seen:C})).subscribe(m)}catch(I){m.error(I)}},A)};v=p.subscribe(Er(m,function(A){_==null||_.unsubscribe(),C++,m.next(b=A),i>0&&T(i)},void 0,void 0,function(){_!=null&&_.closed||_==null||_.unsubscribe(),b=null})),!C&&T(n!=null?typeof n=="number"?n:+n-d.now():i)})}function EN(r){throw new kN(r)}function me(r,e){return Mr(function(t,n){var i=0;t.subscribe(Er(n,function(o){n.next(r.call(e,o,i++))}))})}var SN=Array.isArray;function AN(r,e){return SN(e)?r.apply(void 0,bc([],_s(e))):r(e)}function Cw(r){return me(function(e){return AN(r,e)})}var TN=Array.isArray,IN=Object.getPrototypeOf,RN=Object.prototype,PN=Object.keys;function OR(r){if(r.length===1){var e=r[0];if(TN(e))return{args:e,keys:null};if(MN(e)){var t=PN(e);return{args:t.map(function(n){return e[n]}),keys:t}}}return{args:r,keys:null}}function MN(r){return r&&typeof r=="object"&&IN(r)===RN}function ZR(r,e){return r.reduce(function(t,n,i){return t[n]=e[i],t},{})}function $N(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var t=p4(r),n=ww(r),i=OR(r),o=i.args,a=i.keys;if(o.length===0)return at([],t);var c=new It(ON(o,t,a?function(d){return ZR(a,d)}:As));return n?c.pipe(Cw(n)):c}function ON(r,e,t){return t===void 0&&(t=As),function(n){LC(e,function(){for(var i=r.length,o=new Array(i),a=i,c=i,d=function(h){LC(e,function(){var p=at(r[h],e),m=!1;p.subscribe(Er(n,function(v){o[h]=v,m||(m=!0,c--),c||n.next(t(o.slice()))},function(){--a||n.complete()}))},n)},u=0;u<i;u++)d(u)},n)}}function LC(r,e,t){r?gc(t,r,e):e()}function LR(r,e,t,n,i,o,a,c){var d=[],u=0,h=0,p=!1,m=function(){p&&!d.length&&!u&&e.complete()},v=function(b){return u<n?_(b):d.push(b)},_=function(b){o&&e.next(b),u++;var C=!1;On(t(b,h++)).subscribe(Er(e,function(T){i==null||i(T),o?v(T):e.next(T)},function(){C=!0},void 0,function(){if(C)try{u--;for(var T=function(){var A=d.shift();a||_(A)};d.length&&u<n;)T();m()}catch(A){e.error(A)}}))};return r.subscribe(Er(e,v,function(){p=!0,m()})),function(){c==null||c()}}function Wn(r,e,t){return t===void 0&&(t=1/0),br(e)?Wn(function(n,i){return me(function(o,a){return e(n,o,i,a)})(On(r(n,i)))},t):(typeof e=="number"&&(t=e),Mr(function(n,i){return LR(n,i,r,t)}))}function HR(r){return r===void 0&&(r=1/0),Wn(As,r)}function ZN(){return HR(1)}function El(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];return ZN()(at(r,p4(r)))}function Ig(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var t=ww(r),n=OR(r),i=n.args,o=n.keys,a=new It(function(c){var d=i.length;if(!d){c.complete();return}for(var u=new Array(d),h=d,p=d,m=function(_){var b=!1;On(i[_]).subscribe(Er(c,function(C){b||(b=!0,p--),u[_]=C},function(){return h--},void 0,function(){(!h||!b)&&(p||c.next(o?ZR(o,u):u),c.complete())}))},v=0;v<d;v++)m(v)});return t?a.pipe(Cw(t)):a}var LN=["addListener","removeListener"],HN=["addEventListener","removeEventListener"],NN=["on","off"];function Sl(r,e,t,n){if(br(t)&&(n=t,t=void 0),n)return Sl(r,e,t).pipe(Cw(n));var i=_s(FN(r)?HN.map(function(c){return function(d){return r[c](e,d,t)}}):DN(r)?LN.map(HC(r,e)):VN(r)?NN.map(HC(r,e)):[],2),o=i[0],a=i[1];if(!o&&xw(r))return Wn(function(c){return Sl(c,e,t)})(On(r));if(!o)throw new TypeError("Invalid event target");return new It(function(c){var d=function(){for(var u=[],h=0;h<arguments.length;h++)u[h]=arguments[h];return c.next(1<u.length?u:u[0])};return o(d),function(){return a(d)}})}function HC(r,e){return function(t){return function(n){return r[t](e,n)}}}function DN(r){return br(r.addListener)&&br(r.removeListener)}function VN(r){return br(r.on)&&br(r.off)}function FN(r){return br(r.addEventListener)&&br(r.removeEventListener)}function kw(r,e,t){r===void 0&&(r=0),t===void 0&&(t=lN);var n=-1;return e!=null&&(bR(e)?t=e:n=e),new It(function(i){var o=$R(r)?+r-t.now():r;o<0&&(o=0);var a=0;return t.schedule(function(){i.closed||(i.next(a++),0<=n?this.schedule(void 0,n):i.complete())},o)})}function zN(r,e){return e===void 0&&(e=Ef),kw(r,r,e)}function Z3(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var t=p4(r),n=dN(r,1/0),i=r;return i.length?i.length===1?On(i[0]):HR(n)(at(i,t)):Tr}function Oe(r,e){return Mr(function(t,n){var i=0;t.subscribe(Er(n,function(o){return r.call(e,o,i++)&&n.next(o)}))})}function jN(r){return function(e){for(var t=[],n=function(o){t.push(On(r[o]).subscribe(Er(e,function(a){if(t){for(var c=0;c<t.length;c++)c!==o&&t[c].unsubscribe();t=null}e.next(a)})))},i=0;t&&!e.closed&&i<r.length;i++)n(i)}}function jt(r){return Mr(function(e,t){var n=null,i=!1,o;n=e.subscribe(Er(t,void 0,void 0,function(a){o=On(r(a,jt(r)(e))),n?(n.unsubscribe(),n=null,o.subscribe(t)):i=!0})),i&&(n.unsubscribe(),n=null,o.subscribe(t))})}function NR(r,e,t,n,i){return function(o,a){var c=t,d=e,u=0;o.subscribe(Er(a,function(h){var p=u++;d=c?r(d,h,p):(c=!0,h),n&&a.next(d)},i&&function(){c&&a.next(d),a.complete()}))}}function zp(r,e){return Mr(NR(r,e,arguments.length>=2,!1,!0))}function bs(r,e){return br(e)?Wn(r,e,1):Wn(r,1)}function Ew(r){return Mr(function(e,t){var n=!1;e.subscribe(Er(t,function(i){n=!0,t.next(i)},function(){n||t.next(r),t.complete()}))})}function lp(r){return r<=0?function(){return Tr}:Mr(function(e,t){var n=0;e.subscribe(Er(t,function(i){++n<=r&&(t.next(i),r<=n&&t.complete())}))})}function Jg(r,e){return e===void 0&&(e=As),r=r??UN,Mr(function(t,n){var i,o=!0;t.subscribe(Er(n,function(a){var c=e(a);(o||!r(i,c))&&(o=!1,i=c,n.next(a))}))})}function UN(r,e){return r===e}function Sw(r){return r===void 0&&(r=BN),Mr(function(e,t){var n=!1;e.subscribe(Er(t,function(i){n=!0,t.next(i)},function(){return n?t.complete():t.error(r())}))})}function BN(){return new e2}function jp(r){return Mr(function(e,t){try{e.subscribe(t)}finally{t.add(r)}})}function K1(r,e){return Mr(qN(r,e,"value"))}function qN(r,e,t){return function(n,i){var o=0;n.subscribe(Er(i,function(a){var c=o++;r.call(e,a,c,n)&&(i.next(a),i.complete())},function(){i.next(void 0),i.complete()}))}}function Gs(r,e){var t=arguments.length>=2;return function(n){return n.pipe(As,lp(1),t?Ew(e):Sw(function(){return new e2}))}}function Aw(r,e,t,n){return Mr(function(i,o){var a;(!e||typeof e=="function")&&(a=e);var c=new Map,d=function(_){c.forEach(_),_(o)},u=function(_){return d(function(b){return b.error(_)})},h=0,p=!1,m=new yR(o,function(_){try{var b=r(_),C=c.get(b);if(!C){c.set(b,C=n?n():new Fn);var T=v(b,C);if(o.next(T),t){var A=Er(C,function(){C.complete(),A==null||A.unsubscribe()},void 0,void 0,function(){return c.delete(b)});m.add(On(t(T)).subscribe(A))}}C.next(a?a(_):_)}catch(I){u(I)}},function(){return d(function(_){return _.complete()})},u,function(){return c.clear()},function(){return p=!0,h===0});i.subscribe(m);function v(_,b){var C=new It(function(T){h++;var A=b.subscribe(T);return function(){A.unsubscribe(),--h===0&&p&&m.unsubscribe()}});return C.key=_,C}})}function KN(r){return r<=0?function(){return Tr}:Mr(function(e,t){var n=[];e.subscribe(Er(t,function(i){n.push(i),r<n.length&&n.shift()},function(){var i,o;try{for(var a=$i(n),c=a.next();!c.done;c=a.next()){var d=c.value;t.next(d)}}catch(u){i={error:u}}finally{try{c&&!c.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}t.complete()},void 0,function(){n=null}))})}function Ci(r,e){var t=arguments.length>=2;return function(n){return n.pipe(As,KN(1),t?Ew(e):Sw(function(){return new e2}))}}function DR(r,e,t){return Mr(function(n,i){var o=e;return LR(n,i,function(a,c){return r(o,a,c)},t,function(a){o=a},!1,void 0,function(){return o=null})})}function ev(){return Mr(function(r,e){var t,n=!1;r.subscribe(Er(e,function(i){var o=t;t=i,n&&e.next([o,i]),n=!0}))})}function Jc(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];return r.length?Mr(function(t,n){jN(bc([t],_s(r)))(n)}):As}function GN(r,e){return Mr(NR(r,e,arguments.length>=2,!0))}function Jf(r){r===void 0&&(r={});var e=r.connector,t=e===void 0?function(){return new Fn}:e,n=r.resetOnError,i=n===void 0?!0:n,o=r.resetOnComplete,a=o===void 0?!0:o,c=r.resetOnRefCountZero,d=c===void 0?!0:c;return function(u){var h,p,m,v=0,_=!1,b=!1,C=function(){p==null||p.unsubscribe(),p=void 0},T=function(){C(),h=m=void 0,_=b=!1},A=function(){var I=h;T(),I==null||I.unsubscribe()};return Mr(function(I,O){v++,!b&&!_&&C();var B=m=m??t();O.add(function(){v--,v===0&&!b&&!_&&(p=L3(A,d))}),B.subscribe(O),!h&&v>0&&(h=new kf({next:function(z){return B.next(z)},error:function(z){b=!0,C(),p=L3(T,i,z),B.error(z)},complete:function(){_=!0,C(),p=L3(T,a),B.complete()}}),On(I).subscribe(h))})(u)}}function L3(r,e){for(var t=[],n=2;n<arguments.length;n++)t[n-2]=arguments[n];if(e===!0){r();return}if(e!==!1){var i=new kf({next:function(){i.unsubscribe(),r()}});return On(e.apply(void 0,bc([],_s(t)))).subscribe(i)}}function WN(r,e,t){var n,i=!1;return n=1/0,Jf({connector:function(){return new _R(n,e,t)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:i})}function Qt(r,e){return Mr(function(t,n){var i=null,o=0,a=!1,c=function(){return a&&!i&&n.complete()};t.subscribe(Er(n,function(d){i==null||i.unsubscribe();var u=0,h=o++;On(r(d,h)).subscribe(i=Er(n,function(p){return n.next(e?e(d,p,h,u++):p)},function(){i=null,c()}))},function(){a=!0,c()}))})}function Al(r){return Mr(function(e,t){On(r).subscribe(Er(t,function(){return t.complete()},Qg)),!t.closed&&e.subscribe(t)})}function VR(r,e){return e===void 0&&(e=!1),Mr(function(t,n){var i=0;t.subscribe(Er(n,function(o){var a=r(o,i++);(a||e)&&n.next(o),!a&&n.complete()}))})}function qr(r,e,t){var n=br(r)||e||t?{next:r,error:e,complete:t}:r;return n?Mr(function(i,o){var a;(a=n.subscribe)===null||a===void 0||a.call(n);var c=!0;i.subscribe(Er(o,function(d){var u;(u=n.next)===null||u===void 0||u.call(n,d),o.next(d)},function(){var d;c=!1,(d=n.complete)===null||d===void 0||d.call(n),o.complete()},function(d){var u;c=!1,(u=n.error)===null||u===void 0||u.call(n,d),o.error(d)},function(){var d,u;c&&((d=n.unsubscribe)===null||d===void 0||d.call(n)),(u=n.finalize)===null||u===void 0||u.call(n)}))}):As}function YN(r,e){return Mr(function(t,n){var i=e??{},o=i.leading,a=o===void 0?!0:o,c=i.trailing,d=c===void 0?!1:c,u=!1,h=null,p=null,m=!1,v=function(){p==null||p.unsubscribe(),p=null,d&&(C(),m&&n.complete())},_=function(){p=null,m&&n.complete()},b=function(T){return p=On(r(T)).subscribe(Er(n,v,_))},C=function(){if(u){u=!1;var T=h;h=null,n.next(T),!m&&b(T)}};t.subscribe(Er(n,function(T){u=!0,h=T,!(p&&!p.closed)&&(a?C():b(T))},function(){m=!0,!(d&&u&&p&&!p.closed)&&n.complete()}))})}function Tw(r,e,t){e===void 0&&(e=Ef);var n=kw(r,e);return YN(function(){return n},t)}function Up(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var t=ww(r);return Mr(function(n,i){for(var o=r.length,a=new Array(o),c=r.map(function(){return!1}),d=!1,u=function(p){On(r[p]).subscribe(Er(i,function(m){a[p]=m,!d&&!c[p]&&(c[p]=!0,(d=c.every(As))&&(c=null))},Qg))},h=0;h<o;h++)u(h);n.subscribe(Er(i,function(p){if(d){var m=bc([p],_s(a));i.next(t?t.apply(void 0,bc([],_s(m))):m)}}))})}const FR=(r,e,t)=>{const n=typeof e=="string"?e.split("."):e,i=n.shift();return i&&(r[i]??(r[i]={}),n.length?FR(r[i],n,t):Object.assign(r,{[i]:t})),r};var ou;class t2{constructor(){Ie(this,ou,{})}createConfig(e,t){return at(this._createConfig(e,t))}async createConfigAsync(e,t){return hr(this.createConfig(e,t))}_set(e,t){const n=typeof t=="function"?t:async()=>t;k(this,ou)[e]=n}_get(e){return k(this,ou)[e]}_has(e){return e in k(this,ou)}_createConfig(e,t){return at(this._buildConfig(e,t)).pipe(Qt(n=>this._processConfig(n,e)))}_buildConfig(e,t){return at(Object.entries(k(this,ou))).pipe(Wn(([n,i])=>at(i(e)).pipe(Oe(o=>o!==void 0),me(o=>({target:n,value:o})),jt(o=>(console.error(`Failed to execute config callback: ${i.name} for attribute: '${n}'`,o),Tr)))),zp((n,{target:i,value:o})=>FR(n,i,o),t??{}))}_processConfig(e,t){return Pt(e)}}ou=new WeakMap;var Mm,au;class zR{constructor(e){Ie(this,Mm);Ie(this,au);const{version:t}=e;Be(this,Mm,new fs(t)),Be(this,au,new Qn)}get version(){return k(this,Mm)}_addTeardown(e){return k(this,au).add(e),()=>k(this,au).remove(e)}dispose(){k(this,au).unsubscribe()}}Mm=new WeakMap,au=new WeakMap;class QN extends Error{constructor(){super("It was too slow"),this.name="RequiredModuleTimeoutError"}}class XN{constructor(e){Le(this,"logger",new hR("ModulesConfigurator"));Le(this,"_configs",[]);Le(this,"_afterConfiguration",[]);Le(this,"_afterInit",[]);Le(this,"_modules");this._modules=new Set(e)}get modules(){return[...this._modules]}configure(...e){for(const t of e)this.addConfig(t)}addConfig(e){const{module:t,afterConfig:n,afterInit:i,configure:o}=e;this._modules.add(t),o&&this._configs.push((a,c)=>o(a[t.name],c)),n&&this._afterConfiguration.push(a=>n(a[t.name])),i&&this._afterInit.push(a=>i(a[t.name]))}onConfigured(e){this._afterConfiguration.push(e)}onInitialized(e){this._afterInit.push(e)}async initialize(e){const t=await this._configure(e),n=await this._initialize(t,e);return await this._postInitialize(n,e),Object.seal(Object.assign({},n,{dispose:()=>this.dispose(n)}))}async _configure(e){const t=await this._createConfig(e);return await Promise.all(this._configs.map(n=>Promise.resolve(n(t,e)))),await this._postConfigure(t),t}_createConfig(e){const{modules:t,logger:n,_afterConfiguration:i,_afterInit:o}=this,a=at(t).pipe(Wn(async c=>{var d;n.debug(`🛠 creating configurator ${n.formatModuleName(c)}`);try{const u=await((d=c.configure)==null?void 0:d.call(c,e));return n.debug(`🛠 created configurator for ${n.formatModuleName(c)}`,u),{[c.name]:u}}catch(u){throw n.error(`🛠 Failed to created configurator for ${n.formatModuleName(c)}`,u),u}}),zp((c,d)=>Object.assign(c,d),{onAfterConfiguration(c){i.push(c)},onAfterInit(c){o.push(c)}}));return hr(a)}async _postConfigure(e){const{modules:t,logger:n,_afterConfiguration:i}=this;if(await Promise.allSettled(t.filter(o=>!!o.postConfigure).map(async o=>{var a;try{await((a=o.postConfigure)==null?void 0:a.call(o,e)),n.debug(`🏗📌 post configured ${n.formatModuleName(o)}`,o)}catch{n.warn(`🏗📌 post configure failed ${n.formatModuleName(o)}`)}})),i.length)try{n.debug(`🏗📌 post configure hooks [${i.length}]`),await Promise.allSettled(i.map(o=>Promise.resolve(o(e)))),n.debug("🏗📌 post configure hooks complete")}catch(o){n.warn("🏗📌 post configure hook failed",o)}}async _initialize(e,t){const{modules:n,logger:i}=this,o=n.map(h=>h.name),a=new Xf({}),c=h=>o.includes(h),d=(h,p=60)=>{if(!o.includes(h))throw i.error(`🚀⌛️ Cannot not require ${i.formatModuleName(String(h))} since module is not defined!`),Error(`cannot not require [${String(h)}] since module is not defined!`);return a.value[h]?(i.debug(`🚀⌛️ ${i.formatModuleName(String(h))} is initiated, skipping queue`),Promise.resolve(a.value[h])):(i.debug(`🚀⌛️ Awaiting init ${i.formatModuleName(String(h))}, timeout ${p}s`),Vn(a.pipe(Oe(m=>!!m[h]),me(m=>m[h]),Ks({each:p*1e3,with:()=>MR(()=>new QN)}))))};at(n).pipe(Wn(h=>{const p=h.name;return i.debug(`🚀 initializing ${i.formatModuleName(h)}`),at(Promise.resolve(h.initialize({ref:t,config:e[p],requireInstance:d,hasModule:c}))).pipe(me(m=>{if(!(m instanceof zR)&&!(m.version instanceof fs)){i.debug("🤷 module does not extends the [BaseModuleProvider] or exposes [SemanticVersion]");try{m.version=h.version instanceof fs?h.version:new fs(h.version??"0.0.0-unknown")}catch{i.error("🚨 failed to set module version")}}return i.debug(`🚀 initialized ${i.formatModuleName(h)}`),[p,m]}))})).subscribe({next:([h,p])=>{a.next(Object.assign(a.value,{[h]:p}))},error:h=>{i.error("🚨 failed to initialize",h),a.error(h)},complete:()=>a.complete()});const u=await hr(a);return Object.seal(u),u}async _postInitialize(e,t){const{modules:n,logger:i,_afterInit:o}=this,a=at(n).pipe(Oe(c=>!!c.postInitialize),qr(c=>i.debug(`🚀📌 post initializing moule ${i.formatModuleName(c)}`)),Wn(c=>at(c.postInitialize({ref:t,modules:e,instance:e[c.name]})).pipe(qr(()=>{i.debug(`🚀📌 post initialized moule ${i.formatModuleName(c)}`)}),jt(d=>(i.warn(`🚀📌 post initialize failed moule ${i.formatModuleName(c)}`,d),Tr)))));if(await new Promise((c,d)=>{a.subscribe({complete:()=>c(!0),error:d})}),o.length)try{i.debug(`🚀📌 post configure hooks [${o.length}]`),await Promise.allSettled(o.map(c=>Promise.resolve(c(e)))),i.debug("🚀📌 post configure hooks complete")}catch(c){i.warn("🚀📌 post configure hook failed",c)}i.debug(`🎉 Modules initialized ${n.map(i.formatModuleName)}`,e),i.info("🟢 Modules initialized")}async dispose(e,t){const{modules:n}=this;await Promise.allSettled(n.filter(i=>!!i.dispose).map(async i=>{var o;await((o=i.dispose)==null?void 0:o.call(i,{ref:t,modules:e,instance:e[i.name]}))}))}}var dp={exports:{}};dp.exports;var NC;function JN(){return NC||(NC=1,function(r,e){var t=200,n="__lodash_hash_undefined__",i=9007199254740991,o="[object Arguments]",a="[object Array]",c="[object Boolean]",d="[object Date]",u="[object Error]",h="[object Function]",p="[object GeneratorFunction]",m="[object Map]",v="[object Number]",_="[object Object]",b="[object Promise]",C="[object RegExp]",T="[object Set]",A="[object String]",I="[object Symbol]",O="[object WeakMap]",B="[object ArrayBuffer]",z="[object DataView]",R="[object Float32Array]",Y="[object Float64Array]",ue="[object Int8Array]",le="[object Int16Array]",Te="[object Int32Array]",ke="[object Uint8Array]",xe="[object Uint8ClampedArray]",X="[object Uint16Array]",q="[object Uint32Array]",re=/[\\^$.*+?()[\]{}|]/g,W=/\w*$/,$=/^\[object .+?Constructor\]$/,L=/^(?:0|[1-9]\d*)$/,D={};D[o]=D[a]=D[B]=D[z]=D[c]=D[d]=D[R]=D[Y]=D[ue]=D[le]=D[Te]=D[m]=D[v]=D[_]=D[C]=D[T]=D[A]=D[I]=D[ke]=D[xe]=D[X]=D[q]=!0,D[u]=D[h]=D[O]=!1;var Z=typeof D0=="object"&&D0&&D0.Object===Object&&D0,N=typeof self=="object"&&self&&self.Object===Object&&self,ae=Z||N||Function("return this")(),He=e&&!e.nodeType&&e,Ee=He&&!0&&r&&!r.nodeType&&r,Ae=Ee&&Ee.exports===He;function Xe(M,te){return M.set(te[0],te[1]),M}function lt(M,te){return M.add(te),M}function xt(M,te){for(var de=-1,dt=M?M.length:0;++de<dt&&te(M[de],de,M)!==!1;);return M}function wr(M,te){for(var de=-1,dt=te.length,pn=M.length;++de<dt;)M[pn+de]=te[de];return M}function Gr(M,te,de,dt){for(var pn=-1,An=M?M.length:0;++pn<An;)de=te(de,M[pn],pn,M);return de}function Mt(M,te){for(var de=-1,dt=Array(M);++de<M;)dt[de]=te(de);return dt}function zn(M,te){return M==null?void 0:M[te]}function so(M){var te=!1;if(M!=null&&typeof M.toString!="function")try{te=!!(M+"")}catch{}return te}function ma(M){var te=-1,de=Array(M.size);return M.forEach(function(dt,pn){de[++te]=[pn,dt]}),de}function Fi(M,te){return function(de){return M(te(de))}}function Rc(M){var te=-1,de=Array(M.size);return M.forEach(function(dt){de[++te]=dt}),de}var Yu=Array.prototype,Pc=Function.prototype,$o=Object.prototype,Oo=ae["__core-js_shared__"],Mc=function(){var M=/[^.]+$/.exec(Oo&&Oo.keys&&Oo.keys.IE_PROTO||"");return M?"Symbol(src)_1."+M:""}(),Ql=Pc.toString,En=$o.hasOwnProperty,co=$o.toString,Xl=RegExp("^"+Ql.call(En).replace(re,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ba=Ae?ae.Buffer:void 0,ri=ae.Symbol,Ei=ae.Uint8Array,qa=Fi(Object.getPrototypeOf,Object),Zo=Object.create,h1=$o.propertyIsEnumerable,lo=Yu.splice,$c=Object.getOwnPropertySymbols,Qu=Ba?Ba.isBuffer:void 0,Oc=Fi(Object.keys,Object),Ms=Wt(ae,"DataView"),Lo=Wt(ae,"Map"),Ho=Wt(ae,"Promise"),Ka=Wt(ae,"Set"),zi=Wt(ae,"WeakMap"),ni=Wt(Object,"create"),Xu=oi(Ms),Jl=oi(Lo),Ju=oi(Ho),ed=oi(Ka),$s=oi(zi),ga=ri?ri.prototype:void 0,td=ga?ga.valueOf:void 0;function Si(M){var te=-1,de=M?M.length:0;for(this.clear();++te<de;){var dt=M[te];this.set(dt[0],dt[1])}}function V(){this.__data__=ni?ni(null):{}}function Q(M){return this.has(M)&&delete this.__data__[M]}function ie(M){var te=this.__data__;if(ni){var de=te[M];return de===n?void 0:de}return En.call(te,M)?te[M]:void 0}function pe(M){var te=this.__data__;return ni?te[M]!==void 0:En.call(te,M)}function Pe(M,te){var de=this.__data__;return de[M]=ni&&te===void 0?n:te,this}Si.prototype.clear=V,Si.prototype.delete=Q,Si.prototype.get=ie,Si.prototype.has=pe,Si.prototype.set=Pe;function Ue(M){var te=-1,de=M?M.length:0;for(this.clear();++te<de;){var dt=M[te];this.set(dt[0],dt[1])}}function vt(){this.__data__=[]}function Je(M){var te=this.__data__,de=ya(te,M);if(de<0)return!1;var dt=te.length-1;return de==dt?te.pop():lo.call(te,de,1),!0}function it(M){var te=this.__data__,de=ya(te,M);return de<0?void 0:te[de][1]}function Ge(M){return ya(this.__data__,M)>-1}function Qe(M,te){var de=this.__data__,dt=ya(de,M);return dt<0?de.push([M,te]):de[dt][1]=te,this}Ue.prototype.clear=vt,Ue.prototype.delete=Je,Ue.prototype.get=it,Ue.prototype.has=Ge,Ue.prototype.set=Qe;function bt(M){var te=-1,de=M?M.length:0;for(this.clear();++te<de;){var dt=M[te];this.set(dt[0],dt[1])}}function Vt(){this.__data__={hash:new Si,map:new(Lo||Ue),string:new Si}}function fn(M){return Lc(this,M).delete(M)}function dr(M){return Lc(this,M).get(M)}function Gt(M){return Lc(this,M).has(M)}function Ir(M,te){return Lc(this,M).set(M,te),this}bt.prototype.clear=Vt,bt.prototype.delete=fn,bt.prototype.get=dr,bt.prototype.has=Gt,bt.prototype.set=Ir;function ii(M){this.__data__=new Ue(M)}function Os(){this.__data__=new Ue}function uo(M){return this.__data__.delete(M)}function Jt(M){return this.__data__.get(M)}function rd(M){return this.__data__.has(M)}function va(M,te){var de=this.__data__;if(de instanceof Ue){var dt=de.__data__;if(!Lo||dt.length<t-1)return dt.push([M,te]),this;de=this.__data__=new bt(dt)}return de.set(M,te),this}ii.prototype.clear=Os,ii.prototype.delete=uo,ii.prototype.get=Jt,ii.prototype.has=rd,ii.prototype.set=va;function No(M,te){var de=Vo(M)||od(M)?Mt(M.length,String):[],dt=de.length,pn=!!dt;for(var An in M)En.call(M,An)&&!(pn&&(An=="length"||V2(An,dt)))&&de.push(An);return de}function Do(M,te,de){var dt=M[te];(!(En.call(M,te)&&Hc(dt,de))||de===void 0&&!(te in M))&&(M[te]=de)}function ya(M,te){for(var de=M.length;de--;)if(Hc(M[de][0],te))return de;return-1}function Bt(M,te){return M&&nh(te,y1(te),M)}function ur(M,te,de,dt,pn,An,ho){var jn;if(dt&&(jn=An?dt(M,pn,An,ho):dt(M)),jn!==void 0)return jn;if(!Ls(M))return M;var ba=Vo(M);if(ba){if(jn=g1(M),!te)return H2(M,jn)}else{var Qa=Wa(M),ld=Qa==h||Qa==p;if(ad(M))return f1(M,te);if(Qa==_||Qa==o||ld&&!An){if(so(M))return An?M:{};if(jn=N2(ld?{}:M),!te)return id(M,Bt(jn,M))}else{if(!D[Qa])return An?M:{};jn=D2(M,Qa,ur,te)}}ho||(ho=new ii);var _1=ho.get(M);if(_1)return _1;if(ho.set(M,jn),!ba)var dd=de?h5(M):y1(M);return xt(dd||M,function(Nc,ud){dd&&(ud=Nc,Nc=M[ud]),Do(jn,ud,ur(Nc,te,de,dt,ud,M,ho))}),jn}function Sn(M){return Ls(M)?Zo(M):{}}function Zs(M,te,de){var dt=te(M);return Vo(M)?dt:wr(dt,de(M))}function er(M){return co.call(M)}function Ga(M){if(!Ls(M)||ih(M))return!1;var te=j2(M)||so(M)?Xl:$;return te.test(oi(M))}function eh(M){if(!_a(M))return Oc(M);var te=[];for(var de in Object(M))En.call(M,de)&&de!="constructor"&&te.push(de);return te}function f1(M,te){if(te)return M.slice();var de=new M.constructor(M.length);return M.copy(de),de}function Zc(M){var te=new M.constructor(M.byteLength);return new Ei(te).set(new Ei(M)),te}function th(M,te){var de=te?Zc(M.buffer):M.buffer;return new M.constructor(de,M.byteOffset,M.byteLength)}function nd(M,te,de){var dt=te?de(ma(M),!0):ma(M);return Gr(dt,Xe,new M.constructor)}function rh(M){var te=new M.constructor(M.source,W.exec(M));return te.lastIndex=M.lastIndex,te}function d5(M,te,de){var dt=te?de(Rc(M),!0):Rc(M);return Gr(dt,lt,new M.constructor)}function u5(M){return td?Object(td.call(M)):{}}function p1(M,te){var de=te?Zc(M.buffer):M.buffer;return new M.constructor(de,M.byteOffset,M.length)}function H2(M,te){var de=-1,dt=M.length;for(te||(te=Array(dt));++de<dt;)te[de]=M[de];return te}function nh(M,te,de,dt){de||(de={});for(var pn=-1,An=te.length;++pn<An;){var ho=te[pn],jn=void 0;Do(de,ho,jn===void 0?M[ho]:jn)}return de}function id(M,te){return nh(M,m1(M),te)}function h5(M){return Zs(M,y1,m1)}function Lc(M,te){var de=M.__data__;return v1(te)?de[typeof te=="string"?"string":"hash"]:de.map}function Wt(M,te){var de=zn(M,te);return Ga(de)?de:void 0}var m1=$c?Fi($c,Object):sd,Wa=er;(Ms&&Wa(new Ms(new ArrayBuffer(1)))!=z||Lo&&Wa(new Lo)!=m||Ho&&Wa(Ho.resolve())!=b||Ka&&Wa(new Ka)!=T||zi&&Wa(new zi)!=O)&&(Wa=function(M){var te=co.call(M),de=te==_?M.constructor:void 0,dt=de?oi(de):void 0;if(dt)switch(dt){case Xu:return z;case Jl:return m;case Ju:return b;case ed:return T;case $s:return O}return te});function g1(M){var te=M.length,de=M.constructor(te);return te&&typeof M[0]=="string"&&En.call(M,"index")&&(de.index=M.index,de.input=M.input),de}function N2(M){return typeof M.constructor=="function"&&!_a(M)?Sn(qa(M)):{}}function D2(M,te,de,dt){var pn=M.constructor;switch(te){case B:return Zc(M);case c:case d:return new pn(+M);case z:return th(M,dt);case R:case Y:case ue:case le:case Te:case ke:case xe:case X:case q:return p1(M,dt);case m:return nd(M,dt,de);case v:case A:return new pn(M);case C:return rh(M);case T:return d5(M,dt,de);case I:return u5(M)}}function V2(M,te){return te=te??i,!!te&&(typeof M=="number"||L.test(M))&&M>-1&&M%1==0&&M<te}function v1(M){var te=typeof M;return te=="string"||te=="number"||te=="symbol"||te=="boolean"?M!=="__proto__":M===null}function ih(M){return!!Mc&&Mc in M}function _a(M){var te=M&&M.constructor,de=typeof te=="function"&&te.prototype||$o;return M===de}function oi(M){if(M!=null){try{return Ql.call(M)}catch{}try{return M+""}catch{}}return""}function Ya(M){return ur(M,!0,!0)}function Hc(M,te){return M===te||M!==M&&te!==te}function od(M){return z2(M)&&En.call(M,"callee")&&(!h1.call(M,"callee")||co.call(M)==o)}var Vo=Array.isArray;function F2(M){return M!=null&&U2(M.length)&&!j2(M)}function z2(M){return B2(M)&&F2(M)}var ad=Qu||cd;function j2(M){var te=Ls(M)?co.call(M):"";return te==h||te==p}function U2(M){return typeof M=="number"&&M>-1&&M%1==0&&M<=i}function Ls(M){var te=typeof M;return!!M&&(te=="object"||te=="function")}function B2(M){return!!M&&typeof M=="object"}function y1(M){return F2(M)?No(M):eh(M)}function sd(){return[]}function cd(){return!1}r.exports=Ya}(dp,dp.exports)),dp.exports}var eD=JN();const tD=zu(eD);var gl,$m,Om,lf,Zm,df,uf,t4;class jR{constructor(e,t){Le(this,"__type");Ie(this,gl);Ie(this,$m);Ie(this,Om);Ie(this,lf,!1);Ie(this,Zm);Ie(this,df);Ie(this,uf);Ie(this,t4,Date.now());this.__type=e,Be(this,gl,t.detail),Be(this,$m,tD(t.detail)),Be(this,df,!!t.mutableDetails),Be(this,Om,t.source),Be(this,Zm,!!t.cancelable),Be(this,uf,t.canBubble===void 0?!0:t.canBubble)}get bubbles(){return k(this,uf)&&!k(this,lf)}get created(){return k(this,t4)}get cancelable(){return k(this,Zm)}get canceled(){return k(this,lf)}get detail(){return k(this,gl)}get originalDetail(){return k(this,$m)}get source(){return k(this,Om)}get type(){return this.__type}get allowEventDetailsMutation(){return k(this,df)}preventDefault(){this.cancelable&&Be(this,lf,!0)}stopPropagation(){Be(this,uf,!1)}updateDetails(e){if(!k(this,df))throw new Error("Event details are not mutable");const t=e(k(this,gl));Be(this,gl,t===void 0?k(this,gl):t)}}gl=new WeakMap,$m=new WeakMap,Om=new WeakMap,lf=new WeakMap,Zm=new WeakMap,df=new WeakMap,uf=new WeakMap,t4=new WeakMap;class rD{constructor({onDispatch:e,onBubble:t}){Le(this,"__onDispatch");Le(this,"__onBubble");this.__onDispatch=e,this.__onBubble=t}async dispatch(e,t){var i,o;try{await((i=this.__onDispatch)==null?void 0:i.call(this,e))}catch(a){throw a}const n=e;if(!n.dispatcher)n.dispatcher=this;else if(n.dispatcher===this)throw Error("loop detected");for(const a of t)e.cancelable?e.canceled||await Promise.resolve(a(e)):a(e);if(e.bubbles)try{await((o=this.__onBubble)==null?void 0:o.call(this,e))}catch(a){throw a}}}class nD extends It{constructor(t){super(n=>{this.__event$.subscribe(n)});Le(this,"__listeners",[]);Le(this,"__event$",new Fn);Le(this,"__dispatcher");this.__dispatcher=new rD({onDispatch:t.onDispatch,onBubble:t.onBubble})}get event$(){return this.__event$.asObservable()}get closed(){return this.__event$.closed}addEventListener(t,n){if(this.closed)throw Error("Cannot listen to events when provider is closed!");const i={type:t,handler:n};return this.__listeners.push(i),()=>{const o=this.__listeners.indexOf(i);0<=o&&this.__listeners.splice(o,1)}}async dispatchEvent(t,n){if(typeof t=="string"){if(!n)throw Error("invalid arguments, missing [FrameworkEventInit]");return this._dispatchEvent(new jR(t,n))}else return this._dispatchEvent(t)}async _dispatchEvent(t){if(this.closed)throw Error("Cannot dispatch events when provider is closed!");this.__event$.next(t);try{const n=this.__listeners.filter(i=>i.type===t.type).map(({handler:i})=>i);await this.__dispatcher.dispatch(t,n)}catch(n){throw n}return t}dispose(){this.__listeners=[],this.__event$.complete()}}const iD="event",oD={name:iD,configure:r=>{const e={},t=r==null?void 0:r.event;return t&&(e.onBubble=async n=>{await t.dispatchEvent(n)}),e},initialize:({config:r})=>new nD(r),postInitialize:async({instance:r,modules:e})=>{r.dispatchEvent("onModulesLoaded",{detail:e,source:r})},dispose({instance:r}){r.dispose()}};class UR{constructor(e){Le(this,"_operators");e&&"operators"in e?this._operators={...e.operators}:this._operators=e??{}}get operators(){return this._operators}add(e,t){if(Object.keys(this._operators).includes(e))throw Error(`Operator [${e}] already defined`);return this.set(e,t)}set(e,t){return this._operators[e]=t,this}remove(e){return delete this._operators[e],this}get(e){return this._operators[e]}process(e){return Object.values(this._operators).length?at(Object.values(this._operators)).pipe(DR((n,i)=>Promise.resolve(i(n)).then(o=>o??n),e,1),Ci()):Pt(e)}}const aD=(r,e)=>t=>{const n=new Headers(t.headers);return n.append(r,e),{...t,headers:n}};class BR extends UR{setHeader(e,t){const n=aD(e,t);return this.set("header-"+e,n)}}class sD extends UR{}var tr;(function(r){r.assertEqual=i=>i;function e(i){}r.assertIs=e;function t(i){throw new Error}r.assertNever=t,r.arrayToEnum=i=>{const o={};for(const a of i)o[a]=a;return o},r.getValidEnumValues=i=>{const o=r.objectKeys(i).filter(c=>typeof i[i[c]]!="number"),a={};for(const c of o)a[c]=i[c];return r.objectValues(a)},r.objectValues=i=>r.objectKeys(i).map(function(o){return i[o]}),r.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const o=[];for(const a in i)Object.prototype.hasOwnProperty.call(i,a)&&o.push(a);return o},r.find=(i,o)=>{for(const a of i)if(o(a))return a},r.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function n(i,o=" | "){return i.map(a=>typeof a=="string"?`'${a}'`:a).join(o)}r.joinValues=n,r.jsonStringifyReplacer=(i,o)=>typeof o=="bigint"?o.toString():o})(tr||(tr={}));var Sb;(function(r){r.mergeShapes=(e,t)=>({...e,...t})})(Sb||(Sb={}));const Ke=tr.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Qs=r=>{switch(typeof r){case"undefined":return Ke.undefined;case"string":return Ke.string;case"number":return isNaN(r)?Ke.nan:Ke.number;case"boolean":return Ke.boolean;case"function":return Ke.function;case"bigint":return Ke.bigint;case"symbol":return Ke.symbol;case"object":return Array.isArray(r)?Ke.array:r===null?Ke.null:r.then&&typeof r.then=="function"&&r.catch&&typeof r.catch=="function"?Ke.promise:typeof Map<"u"&&r instanceof Map?Ke.map:typeof Set<"u"&&r instanceof Set?Ke.set:typeof Date<"u"&&r instanceof Date?Ke.date:Ke.object;default:return Ke.unknown}},be=tr.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),cD=r=>JSON.stringify(r,null,2).replace(/"([^"]+)":/g,"$1:");class Eo extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}format(e){const t=e||function(o){return o.message},n={_errors:[]},i=o=>{for(const a of o.issues)if(a.code==="invalid_union")a.unionErrors.map(i);else if(a.code==="invalid_return_type")i(a.returnTypeError);else if(a.code==="invalid_arguments")i(a.argumentsError);else if(a.path.length===0)n._errors.push(t(a));else{let c=n,d=0;for(;d<a.path.length;){const u=a.path[d];d===a.path.length-1?(c[u]=c[u]||{_errors:[]},c[u]._errors.push(t(a))):c[u]=c[u]||{_errors:[]},c=c[u],d++}}};return i(this),n}static assert(e){if(!(e instanceof Eo))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,tr.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=t=>t.message){const t={},n=[];for(const i of this.issues)i.path.length>0?(t[i.path[0]]=t[i.path[0]]||[],t[i.path[0]].push(e(i))):n.push(e(i));return{formErrors:n,fieldErrors:t}}get formErrors(){return this.flatten()}}Eo.create=r=>new Eo(r);const Sf=(r,e)=>{let t;switch(r.code){case be.invalid_type:r.received===Ke.undefined?t="Required":t=`Expected ${r.expected}, received ${r.received}`;break;case be.invalid_literal:t=`Invalid literal value, expected ${JSON.stringify(r.expected,tr.jsonStringifyReplacer)}`;break;case be.unrecognized_keys:t=`Unrecognized key(s) in object: ${tr.joinValues(r.keys,", ")}`;break;case be.invalid_union:t="Invalid input";break;case be.invalid_union_discriminator:t=`Invalid discriminator value. Expected ${tr.joinValues(r.options)}`;break;case be.invalid_enum_value:t=`Invalid enum value. Expected ${tr.joinValues(r.options)}, received '${r.received}'`;break;case be.invalid_arguments:t="Invalid function arguments";break;case be.invalid_return_type:t="Invalid function return type";break;case be.invalid_date:t="Invalid date";break;case be.invalid_string:typeof r.validation=="object"?"includes"in r.validation?(t=`Invalid input: must include "${r.validation.includes}"`,typeof r.validation.position=="number"&&(t=`${t} at one or more positions greater than or equal to ${r.validation.position}`)):"startsWith"in r.validation?t=`Invalid input: must start with "${r.validation.startsWith}"`:"endsWith"in r.validation?t=`Invalid input: must end with "${r.validation.endsWith}"`:tr.assertNever(r.validation):r.validation!=="regex"?t=`Invalid ${r.validation}`:t="Invalid";break;case be.too_small:r.type==="array"?t=`Array must contain ${r.exact?"exactly":r.inclusive?"at least":"more than"} ${r.minimum} element(s)`:r.type==="string"?t=`String must contain ${r.exact?"exactly":r.inclusive?"at least":"over"} ${r.minimum} character(s)`:r.type==="number"?t=`Number must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${r.minimum}`:r.type==="date"?t=`Date must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(r.minimum))}`:t="Invalid input";break;case be.too_big:r.type==="array"?t=`Array must contain ${r.exact?"exactly":r.inclusive?"at most":"less than"} ${r.maximum} element(s)`:r.type==="string"?t=`String must contain ${r.exact?"exactly":r.inclusive?"at most":"under"} ${r.maximum} character(s)`:r.type==="number"?t=`Number must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="bigint"?t=`BigInt must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="date"?t=`Date must be ${r.exact?"exactly":r.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(r.maximum))}`:t="Invalid input";break;case be.custom:t="Invalid input";break;case be.invalid_intersection_types:t="Intersection results could not be merged";break;case be.not_multiple_of:t=`Number must be a multiple of ${r.multipleOf}`;break;case be.not_finite:t="Number must be finite";break;default:t=e.defaultError,tr.assertNever(r)}return{message:t}};let qR=Sf;function lD(r){qR=r}function tv(){return qR}const rv=r=>{const{data:e,path:t,errorMaps:n,issueData:i}=r,o=[...t,...i.path||[]],a={...i,path:o};if(i.message!==void 0)return{...i,path:o,message:i.message};let c="";const d=n.filter(u=>!!u).slice().reverse();for(const u of d)c=u(a,{data:e,defaultError:c}).message;return{...i,path:o,message:c}},dD=[];function De(r,e){const t=tv(),n=rv({issueData:e,data:r.data,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,t,t===Sf?void 0:Sf].filter(i=>!!i)});r.common.issues.push(n)}class bi{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,t){const n=[];for(const i of t){if(i.status==="aborted")return Ct;i.status==="dirty"&&e.dirty(),n.push(i.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,t){const n=[];for(const i of t){const o=await i.key,a=await i.value;n.push({key:o,value:a})}return bi.mergeObjectSync(e,n)}static mergeObjectSync(e,t){const n={};for(const i of t){const{key:o,value:a}=i;if(o.status==="aborted"||a.status==="aborted")return Ct;o.status==="dirty"&&e.dirty(),a.status==="dirty"&&e.dirty(),o.value!=="__proto__"&&(typeof a.value<"u"||i.alwaysSet)&&(n[o.value]=a.value)}return{status:e.value,value:n}}}const Ct=Object.freeze({status:"aborted"}),Uh=r=>({status:"dirty",value:r}),Li=r=>({status:"valid",value:r}),Ab=r=>r.status==="aborted",Tb=r=>r.status==="dirty",Cu=r=>r.status==="valid",Bp=r=>typeof Promise<"u"&&r instanceof Promise;function nv(r,e,t,n){if(typeof e=="function"?r!==e||!0:!e.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e.get(r)}function KR(r,e,t,n,i){if(typeof e=="function"?r!==e||!0:!e.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return e.set(r,t),t}var ht;(function(r){r.errToObj=e=>typeof e=="string"?{message:e}:e||{},r.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(ht||(ht={}));var up,hp;class ws{constructor(e,t,n,i){this._cachedPath=[],this.parent=e,this.data=t,this._path=n,this._key=i}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const DC=(r,e)=>{if(Cu(e))return{success:!0,data:e.value};if(!r.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new Eo(r.common.issues);return this._error=t,this._error}}};function Ot(r){if(!r)return{};const{errorMap:e,invalid_type_error:t,required_error:n,description:i}=r;if(e&&(t||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:i}:{errorMap:(a,c)=>{var d,u;const{message:h}=r;return a.code==="invalid_enum_value"?{message:h??c.defaultError}:typeof c.data>"u"?{message:(d=h??n)!==null&&d!==void 0?d:c.defaultError}:a.code!=="invalid_type"?{message:c.defaultError}:{message:(u=h??t)!==null&&u!==void 0?u:c.defaultError}},description:i}}class Dt{get description(){return this._def.description}_getType(e){return Qs(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:Qs(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new bi,ctx:{common:e.parent.common,data:e.data,parsedType:Qs(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(Bp(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const n=this.safeParse(e,t);if(n.success)return n.data;throw n.error}safeParse(e,t){var n;const i={common:{issues:[],async:(n=t==null?void 0:t.async)!==null&&n!==void 0?n:!1,contextualErrorMap:t==null?void 0:t.errorMap},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Qs(e)},o=this._parseSync({data:e,path:i.path,parent:i});return DC(i,o)}"~validate"(e){var t,n;const i={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Qs(e)};if(!this["~standard"].async)try{const o=this._parseSync({data:e,path:[],parent:i});return Cu(o)?{value:o.value}:{issues:i.common.issues}}catch(o){!((n=(t=o==null?void 0:o.message)===null||t===void 0?void 0:t.toLowerCase())===null||n===void 0)&&n.includes("encountered")&&(this["~standard"].async=!0),i.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:i}).then(o=>Cu(o)?{value:o.value}:{issues:i.common.issues})}async parseAsync(e,t){const n=await this.safeParseAsync(e,t);if(n.success)return n.data;throw n.error}async safeParseAsync(e,t){const n={common:{issues:[],contextualErrorMap:t==null?void 0:t.errorMap,async:!0},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Qs(e)},i=this._parse({data:e,path:n.path,parent:n}),o=await(Bp(i)?i:Promise.resolve(i));return DC(n,o)}refine(e,t){const n=i=>typeof t=="string"||typeof t>"u"?{message:t}:typeof t=="function"?t(i):t;return this._refinement((i,o)=>{const a=e(i),c=()=>o.addIssue({code:be.custom,...n(i)});return typeof Promise<"u"&&a instanceof Promise?a.then(d=>d?!0:(c(),!1)):a?!0:(c(),!1)})}refinement(e,t){return this._refinement((n,i)=>e(n)?!0:(i.addIssue(typeof t=="function"?t(n,i):t),!1))}_refinement(e){return new Da({schema:this,typeName:wt.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:t=>this["~validate"](t)}}optional(){return ps.create(this,this._def)}nullable(){return Nl.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Za.create(this)}promise(){return Tf.create(this,this._def)}or(e){return Wp.create([this,e],this._def)}and(e){return Yp.create(this,e,this._def)}transform(e){return new Da({...Ot(this._def),schema:this,typeName:wt.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t=typeof e=="function"?e:()=>e;return new tm({...Ot(this._def),innerType:this,defaultValue:t,typeName:wt.ZodDefault})}brand(){return new Iw({typeName:wt.ZodBranded,type:this,...Ot(this._def)})}catch(e){const t=typeof e=="function"?e:()=>e;return new rm({...Ot(this._def),innerType:this,catchValue:t,typeName:wt.ZodCatch})}describe(e){const t=this.constructor;return new t({...this._def,description:e})}pipe(e){return r2.create(this,e)}readonly(){return nm.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const uD=/^c[^\s-]{8,}$/i,hD=/^[0-9a-z]+$/,fD=/^[0-9A-HJKMNP-TV-Z]{26}$/i,pD=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,mD=/^[a-z0-9_-]{21}$/i,gD=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,vD=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,yD=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,_D="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let H3;const bD=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,wD=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,xD=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,CD=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,kD=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,ED=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,GR="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",SD=new RegExp(`^${GR}$`);function WR(r){let e="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return r.precision?e=`${e}\\.\\d{${r.precision}}`:r.precision==null&&(e=`${e}(\\.\\d+)?`),e}function AD(r){return new RegExp(`^${WR(r)}$`)}function YR(r){let e=`${GR}T${WR(r)}`;const t=[];return t.push(r.local?"Z?":"Z"),r.offset&&t.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${t.join("|")})`,new RegExp(`^${e}$`)}function TD(r,e){return!!((e==="v4"||!e)&&bD.test(r)||(e==="v6"||!e)&&xD.test(r))}function ID(r,e){if(!gD.test(r))return!1;try{const[t]=r.split("."),n=t.replace(/-/g,"+").replace(/_/g,"/").padEnd(t.length+(4-t.length%4)%4,"="),i=JSON.parse(atob(n));return!(typeof i!="object"||i===null||!i.typ||!i.alg||e&&i.alg!==e)}catch{return!1}}function RD(r,e){return!!((e==="v4"||!e)&&wD.test(r)||(e==="v6"||!e)&&CD.test(r))}class Ma extends Dt{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==Ke.string){const o=this._getOrReturnCtx(e);return De(o,{code:be.invalid_type,expected:Ke.string,received:o.parsedType}),Ct}const n=new bi;let i;for(const o of this._def.checks)if(o.kind==="min")e.data.length<o.value&&(i=this._getOrReturnCtx(e,i),De(i,{code:be.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),n.dirty());else if(o.kind==="max")e.data.length>o.value&&(i=this._getOrReturnCtx(e,i),De(i,{code:be.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),n.dirty());else if(o.kind==="length"){const a=e.data.length>o.value,c=e.data.length<o.value;(a||c)&&(i=this._getOrReturnCtx(e,i),a?De(i,{code:be.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):c&&De(i,{code:be.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),n.dirty())}else if(o.kind==="email")yD.test(e.data)||(i=this._getOrReturnCtx(e,i),De(i,{validation:"email",code:be.invalid_string,message:o.message}),n.dirty());else if(o.kind==="emoji")H3||(H3=new RegExp(_D,"u")),H3.test(e.data)||(i=this._getOrReturnCtx(e,i),De(i,{validation:"emoji",code:be.invalid_string,message:o.message}),n.dirty());else if(o.kind==="uuid")pD.test(e.data)||(i=this._getOrReturnCtx(e,i),De(i,{validation:"uuid",code:be.invalid_string,message:o.message}),n.dirty());else if(o.kind==="nanoid")mD.test(e.data)||(i=this._getOrReturnCtx(e,i),De(i,{validation:"nanoid",code:be.invalid_string,message:o.message}),n.dirty());else if(o.kind==="cuid")uD.test(e.data)||(i=this._getOrReturnCtx(e,i),De(i,{validation:"cuid",code:be.invalid_string,message:o.message}),n.dirty());else if(o.kind==="cuid2")hD.test(e.data)||(i=this._getOrReturnCtx(e,i),De(i,{validation:"cuid2",code:be.invalid_string,message:o.message}),n.dirty());else if(o.kind==="ulid")fD.test(e.data)||(i=this._getOrReturnCtx(e,i),De(i,{validation:"ulid",code:be.invalid_string,message:o.message}),n.dirty());else if(o.kind==="url")try{new URL(e.data)}catch{i=this._getOrReturnCtx(e,i),De(i,{validation:"url",code:be.invalid_string,message:o.message}),n.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(e.data)||(i=this._getOrReturnCtx(e,i),De(i,{validation:"regex",code:be.invalid_string,message:o.message}),n.dirty())):o.kind==="trim"?e.data=e.data.trim():o.kind==="includes"?e.data.includes(o.value,o.position)||(i=this._getOrReturnCtx(e,i),De(i,{code:be.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),n.dirty()):o.kind==="toLowerCase"?e.data=e.data.toLowerCase():o.kind==="toUpperCase"?e.data=e.data.toUpperCase():o.kind==="startsWith"?e.data.startsWith(o.value)||(i=this._getOrReturnCtx(e,i),De(i,{code:be.invalid_string,validation:{startsWith:o.value},message:o.message}),n.dirty()):o.kind==="endsWith"?e.data.endsWith(o.value)||(i=this._getOrReturnCtx(e,i),De(i,{code:be.invalid_string,validation:{endsWith:o.value},message:o.message}),n.dirty()):o.kind==="datetime"?YR(o).test(e.data)||(i=this._getOrReturnCtx(e,i),De(i,{code:be.invalid_string,validation:"datetime",message:o.message}),n.dirty()):o.kind==="date"?SD.test(e.data)||(i=this._getOrReturnCtx(e,i),De(i,{code:be.invalid_string,validation:"date",message:o.message}),n.dirty()):o.kind==="time"?AD(o).test(e.data)||(i=this._getOrReturnCtx(e,i),De(i,{code:be.invalid_string,validation:"time",message:o.message}),n.dirty()):o.kind==="duration"?vD.test(e.data)||(i=this._getOrReturnCtx(e,i),De(i,{validation:"duration",code:be.invalid_string,message:o.message}),n.dirty()):o.kind==="ip"?TD(e.data,o.version)||(i=this._getOrReturnCtx(e,i),De(i,{validation:"ip",code:be.invalid_string,message:o.message}),n.dirty()):o.kind==="jwt"?ID(e.data,o.alg)||(i=this._getOrReturnCtx(e,i),De(i,{validation:"jwt",code:be.invalid_string,message:o.message}),n.dirty()):o.kind==="cidr"?RD(e.data,o.version)||(i=this._getOrReturnCtx(e,i),De(i,{validation:"cidr",code:be.invalid_string,message:o.message}),n.dirty()):o.kind==="base64"?kD.test(e.data)||(i=this._getOrReturnCtx(e,i),De(i,{validation:"base64",code:be.invalid_string,message:o.message}),n.dirty()):o.kind==="base64url"?ED.test(e.data)||(i=this._getOrReturnCtx(e,i),De(i,{validation:"base64url",code:be.invalid_string,message:o.message}),n.dirty()):tr.assertNever(o);return{status:n.value,value:e.data}}_regex(e,t,n){return this.refinement(i=>e.test(i),{validation:t,code:be.invalid_string,...ht.errToObj(n)})}_addCheck(e){return new Ma({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...ht.errToObj(e)})}url(e){return this._addCheck({kind:"url",...ht.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...ht.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...ht.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...ht.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...ht.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...ht.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...ht.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...ht.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...ht.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...ht.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...ht.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...ht.errToObj(e)})}datetime(e){var t,n;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(t=e==null?void 0:e.offset)!==null&&t!==void 0?t:!1,local:(n=e==null?void 0:e.local)!==null&&n!==void 0?n:!1,...ht.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,...ht.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...ht.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...ht.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t==null?void 0:t.position,...ht.errToObj(t==null?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...ht.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...ht.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...ht.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...ht.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...ht.errToObj(t)})}nonempty(e){return this.min(1,ht.errToObj(e))}trim(){return new Ma({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Ma({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Ma({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}}Ma.create=r=>{var e;return new Ma({checks:[],typeName:wt.ZodString,coerce:(e=r==null?void 0:r.coerce)!==null&&e!==void 0?e:!1,...Ot(r)})};function PD(r,e){const t=(r.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,i=t>n?t:n,o=parseInt(r.toFixed(i).replace(".","")),a=parseInt(e.toFixed(i).replace(".",""));return o%a/Math.pow(10,i)}class Zl extends Dt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==Ke.number){const o=this._getOrReturnCtx(e);return De(o,{code:be.invalid_type,expected:Ke.number,received:o.parsedType}),Ct}let n;const i=new bi;for(const o of this._def.checks)o.kind==="int"?tr.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),De(n,{code:be.invalid_type,expected:"integer",received:"float",message:o.message}),i.dirty()):o.kind==="min"?(o.inclusive?e.data<o.value:e.data<=o.value)&&(n=this._getOrReturnCtx(e,n),De(n,{code:be.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind==="max"?(o.inclusive?e.data>o.value:e.data>=o.value)&&(n=this._getOrReturnCtx(e,n),De(n,{code:be.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind==="multipleOf"?PD(e.data,o.value)!==0&&(n=this._getOrReturnCtx(e,n),De(n,{code:be.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):o.kind==="finite"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),De(n,{code:be.not_finite,message:o.message}),i.dirty()):tr.assertNever(o);return{status:i.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,ht.toString(t))}gt(e,t){return this.setLimit("min",e,!1,ht.toString(t))}lte(e,t){return this.setLimit("max",e,!0,ht.toString(t))}lt(e,t){return this.setLimit("max",e,!1,ht.toString(t))}setLimit(e,t,n,i){return new Zl({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:ht.toString(i)}]})}_addCheck(e){return new Zl({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:ht.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ht.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ht.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ht.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ht.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:ht.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:ht.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ht.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ht.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&tr.isInteger(e.value))}get isFinite(){let e=null,t=null;for(const n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(t===null||n.value>t)&&(t=n.value):n.kind==="max"&&(e===null||n.value<e)&&(e=n.value)}return Number.isFinite(t)&&Number.isFinite(e)}}Zl.create=r=>new Zl({checks:[],typeName:wt.ZodNumber,coerce:(r==null?void 0:r.coerce)||!1,...Ot(r)});class Ll extends Dt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==Ke.bigint)return this._getInvalidInput(e);let n;const i=new bi;for(const o of this._def.checks)o.kind==="min"?(o.inclusive?e.data<o.value:e.data<=o.value)&&(n=this._getOrReturnCtx(e,n),De(n,{code:be.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),i.dirty()):o.kind==="max"?(o.inclusive?e.data>o.value:e.data>=o.value)&&(n=this._getOrReturnCtx(e,n),De(n,{code:be.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),i.dirty()):o.kind==="multipleOf"?e.data%o.value!==BigInt(0)&&(n=this._getOrReturnCtx(e,n),De(n,{code:be.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):tr.assertNever(o);return{status:i.value,value:e.data}}_getInvalidInput(e){const t=this._getOrReturnCtx(e);return De(t,{code:be.invalid_type,expected:Ke.bigint,received:t.parsedType}),Ct}gte(e,t){return this.setLimit("min",e,!0,ht.toString(t))}gt(e,t){return this.setLimit("min",e,!1,ht.toString(t))}lte(e,t){return this.setLimit("max",e,!0,ht.toString(t))}lt(e,t){return this.setLimit("max",e,!1,ht.toString(t))}setLimit(e,t,n,i){return new Ll({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:ht.toString(i)}]})}_addCheck(e){return new Ll({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ht.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ht.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ht.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ht.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:ht.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}}Ll.create=r=>{var e;return new Ll({checks:[],typeName:wt.ZodBigInt,coerce:(e=r==null?void 0:r.coerce)!==null&&e!==void 0?e:!1,...Ot(r)})};class qp extends Dt{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==Ke.boolean){const n=this._getOrReturnCtx(e);return De(n,{code:be.invalid_type,expected:Ke.boolean,received:n.parsedType}),Ct}return Li(e.data)}}qp.create=r=>new qp({typeName:wt.ZodBoolean,coerce:(r==null?void 0:r.coerce)||!1,...Ot(r)});class ku extends Dt{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==Ke.date){const o=this._getOrReturnCtx(e);return De(o,{code:be.invalid_type,expected:Ke.date,received:o.parsedType}),Ct}if(isNaN(e.data.getTime())){const o=this._getOrReturnCtx(e);return De(o,{code:be.invalid_date}),Ct}const n=new bi;let i;for(const o of this._def.checks)o.kind==="min"?e.data.getTime()<o.value&&(i=this._getOrReturnCtx(e,i),De(i,{code:be.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),n.dirty()):o.kind==="max"?e.data.getTime()>o.value&&(i=this._getOrReturnCtx(e,i),De(i,{code:be.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),n.dirty()):tr.assertNever(o);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new ku({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:ht.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:ht.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e!=null?new Date(e):null}}ku.create=r=>new ku({checks:[],coerce:(r==null?void 0:r.coerce)||!1,typeName:wt.ZodDate,...Ot(r)});class iv extends Dt{_parse(e){if(this._getType(e)!==Ke.symbol){const n=this._getOrReturnCtx(e);return De(n,{code:be.invalid_type,expected:Ke.symbol,received:n.parsedType}),Ct}return Li(e.data)}}iv.create=r=>new iv({typeName:wt.ZodSymbol,...Ot(r)});class Kp extends Dt{_parse(e){if(this._getType(e)!==Ke.undefined){const n=this._getOrReturnCtx(e);return De(n,{code:be.invalid_type,expected:Ke.undefined,received:n.parsedType}),Ct}return Li(e.data)}}Kp.create=r=>new Kp({typeName:wt.ZodUndefined,...Ot(r)});class Gp extends Dt{_parse(e){if(this._getType(e)!==Ke.null){const n=this._getOrReturnCtx(e);return De(n,{code:be.invalid_type,expected:Ke.null,received:n.parsedType}),Ct}return Li(e.data)}}Gp.create=r=>new Gp({typeName:wt.ZodNull,...Ot(r)});class Af extends Dt{constructor(){super(...arguments),this._any=!0}_parse(e){return Li(e.data)}}Af.create=r=>new Af({typeName:wt.ZodAny,...Ot(r)});class uu extends Dt{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Li(e.data)}}uu.create=r=>new uu({typeName:wt.ZodUnknown,...Ot(r)});class wc extends Dt{_parse(e){const t=this._getOrReturnCtx(e);return De(t,{code:be.invalid_type,expected:Ke.never,received:t.parsedType}),Ct}}wc.create=r=>new wc({typeName:wt.ZodNever,...Ot(r)});class ov extends Dt{_parse(e){if(this._getType(e)!==Ke.undefined){const n=this._getOrReturnCtx(e);return De(n,{code:be.invalid_type,expected:Ke.void,received:n.parsedType}),Ct}return Li(e.data)}}ov.create=r=>new ov({typeName:wt.ZodVoid,...Ot(r)});class Za extends Dt{_parse(e){const{ctx:t,status:n}=this._processInputParams(e),i=this._def;if(t.parsedType!==Ke.array)return De(t,{code:be.invalid_type,expected:Ke.array,received:t.parsedType}),Ct;if(i.exactLength!==null){const a=t.data.length>i.exactLength.value,c=t.data.length<i.exactLength.value;(a||c)&&(De(t,{code:a?be.too_big:be.too_small,minimum:c?i.exactLength.value:void 0,maximum:a?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),n.dirty())}if(i.minLength!==null&&t.data.length<i.minLength.value&&(De(t,{code:be.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),n.dirty()),i.maxLength!==null&&t.data.length>i.maxLength.value&&(De(t,{code:be.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),n.dirty()),t.common.async)return Promise.all([...t.data].map((a,c)=>i.type._parseAsync(new ws(t,a,t.path,c)))).then(a=>bi.mergeArray(n,a));const o=[...t.data].map((a,c)=>i.type._parseSync(new ws(t,a,t.path,c)));return bi.mergeArray(n,o)}get element(){return this._def.type}min(e,t){return new Za({...this._def,minLength:{value:e,message:ht.toString(t)}})}max(e,t){return new Za({...this._def,maxLength:{value:e,message:ht.toString(t)}})}length(e,t){return new Za({...this._def,exactLength:{value:e,message:ht.toString(t)}})}nonempty(e){return this.min(1,e)}}Za.create=(r,e)=>new Za({type:r,minLength:null,maxLength:null,exactLength:null,typeName:wt.ZodArray,...Ot(e)});function Zh(r){if(r instanceof rn){const e={};for(const t in r.shape){const n=r.shape[t];e[t]=ps.create(Zh(n))}return new rn({...r._def,shape:()=>e})}else return r instanceof Za?new Za({...r._def,type:Zh(r.element)}):r instanceof ps?ps.create(Zh(r.unwrap())):r instanceof Nl?Nl.create(Zh(r.unwrap())):r instanceof xs?xs.create(r.items.map(e=>Zh(e))):r}class rn extends Dt{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),t=tr.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==Ke.object){const u=this._getOrReturnCtx(e);return De(u,{code:be.invalid_type,expected:Ke.object,received:u.parsedType}),Ct}const{status:n,ctx:i}=this._processInputParams(e),{shape:o,keys:a}=this._getCached(),c=[];if(!(this._def.catchall instanceof wc&&this._def.unknownKeys==="strip"))for(const u in i.data)a.includes(u)||c.push(u);const d=[];for(const u of a){const h=o[u],p=i.data[u];d.push({key:{status:"valid",value:u},value:h._parse(new ws(i,p,i.path,u)),alwaysSet:u in i.data})}if(this._def.catchall instanceof wc){const u=this._def.unknownKeys;if(u==="passthrough")for(const h of c)d.push({key:{status:"valid",value:h},value:{status:"valid",value:i.data[h]}});else if(u==="strict")c.length>0&&(De(i,{code:be.unrecognized_keys,keys:c}),n.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const u=this._def.catchall;for(const h of c){const p=i.data[h];d.push({key:{status:"valid",value:h},value:u._parse(new ws(i,p,i.path,h)),alwaysSet:h in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const u=[];for(const h of d){const p=await h.key,m=await h.value;u.push({key:p,value:m,alwaysSet:h.alwaysSet})}return u}).then(u=>bi.mergeObjectSync(n,u)):bi.mergeObjectSync(n,d)}get shape(){return this._def.shape()}strict(e){return ht.errToObj,new rn({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,n)=>{var i,o,a,c;const d=(a=(o=(i=this._def).errorMap)===null||o===void 0?void 0:o.call(i,t,n).message)!==null&&a!==void 0?a:n.defaultError;return t.code==="unrecognized_keys"?{message:(c=ht.errToObj(e).message)!==null&&c!==void 0?c:d}:{message:d}}}:{}})}strip(){return new rn({...this._def,unknownKeys:"strip"})}passthrough(){return new rn({...this._def,unknownKeys:"passthrough"})}extend(e){return new rn({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new rn({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:wt.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new rn({...this._def,catchall:e})}pick(e){const t={};return tr.objectKeys(e).forEach(n=>{e[n]&&this.shape[n]&&(t[n]=this.shape[n])}),new rn({...this._def,shape:()=>t})}omit(e){const t={};return tr.objectKeys(this.shape).forEach(n=>{e[n]||(t[n]=this.shape[n])}),new rn({...this._def,shape:()=>t})}deepPartial(){return Zh(this)}partial(e){const t={};return tr.objectKeys(this.shape).forEach(n=>{const i=this.shape[n];e&&!e[n]?t[n]=i:t[n]=i.optional()}),new rn({...this._def,shape:()=>t})}required(e){const t={};return tr.objectKeys(this.shape).forEach(n=>{if(e&&!e[n])t[n]=this.shape[n];else{let o=this.shape[n];for(;o instanceof ps;)o=o._def.innerType;t[n]=o}}),new rn({...this._def,shape:()=>t})}keyof(){return QR(tr.objectKeys(this.shape))}}rn.create=(r,e)=>new rn({shape:()=>r,unknownKeys:"strip",catchall:wc.create(),typeName:wt.ZodObject,...Ot(e)});rn.strictCreate=(r,e)=>new rn({shape:()=>r,unknownKeys:"strict",catchall:wc.create(),typeName:wt.ZodObject,...Ot(e)});rn.lazycreate=(r,e)=>new rn({shape:r,unknownKeys:"strip",catchall:wc.create(),typeName:wt.ZodObject,...Ot(e)});class Wp extends Dt{_parse(e){const{ctx:t}=this._processInputParams(e),n=this._def.options;function i(o){for(const c of o)if(c.result.status==="valid")return c.result;for(const c of o)if(c.result.status==="dirty")return t.common.issues.push(...c.ctx.common.issues),c.result;const a=o.map(c=>new Eo(c.ctx.common.issues));return De(t,{code:be.invalid_union,unionErrors:a}),Ct}if(t.common.async)return Promise.all(n.map(async o=>{const a={...t,common:{...t.common,issues:[]},parent:null};return{result:await o._parseAsync({data:t.data,path:t.path,parent:a}),ctx:a}})).then(i);{let o;const a=[];for(const d of n){const u={...t,common:{...t.common,issues:[]},parent:null},h=d._parseSync({data:t.data,path:t.path,parent:u});if(h.status==="valid")return h;h.status==="dirty"&&!o&&(o={result:h,ctx:u}),u.common.issues.length&&a.push(u.common.issues)}if(o)return t.common.issues.push(...o.ctx.common.issues),o.result;const c=a.map(d=>new Eo(d));return De(t,{code:be.invalid_union,unionErrors:c}),Ct}}get options(){return this._def.options}}Wp.create=(r,e)=>new Wp({options:r,typeName:wt.ZodUnion,...Ot(e)});const Ws=r=>r instanceof Xp?Ws(r.schema):r instanceof Da?Ws(r.innerType()):r instanceof Jp?[r.value]:r instanceof Hl?r.options:r instanceof em?tr.objectValues(r.enum):r instanceof tm?Ws(r._def.innerType):r instanceof Kp?[void 0]:r instanceof Gp?[null]:r instanceof ps?[void 0,...Ws(r.unwrap())]:r instanceof Nl?[null,...Ws(r.unwrap())]:r instanceof Iw||r instanceof nm?Ws(r.unwrap()):r instanceof rm?Ws(r._def.innerType):[];class m4 extends Dt{_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==Ke.object)return De(t,{code:be.invalid_type,expected:Ke.object,received:t.parsedType}),Ct;const n=this.discriminator,i=t.data[n],o=this.optionsMap.get(i);return o?t.common.async?o._parseAsync({data:t.data,path:t.path,parent:t}):o._parseSync({data:t.data,path:t.path,parent:t}):(De(t,{code:be.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),Ct)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,n){const i=new Map;for(const o of t){const a=Ws(o.shape[e]);if(!a.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const c of a){if(i.has(c))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(c)}`);i.set(c,o)}}return new m4({typeName:wt.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:i,...Ot(n)})}}function Ib(r,e){const t=Qs(r),n=Qs(e);if(r===e)return{valid:!0,data:r};if(t===Ke.object&&n===Ke.object){const i=tr.objectKeys(e),o=tr.objectKeys(r).filter(c=>i.indexOf(c)!==-1),a={...r,...e};for(const c of o){const d=Ib(r[c],e[c]);if(!d.valid)return{valid:!1};a[c]=d.data}return{valid:!0,data:a}}else if(t===Ke.array&&n===Ke.array){if(r.length!==e.length)return{valid:!1};const i=[];for(let o=0;o<r.length;o++){const a=r[o],c=e[o],d=Ib(a,c);if(!d.valid)return{valid:!1};i.push(d.data)}return{valid:!0,data:i}}else return t===Ke.date&&n===Ke.date&&+r==+e?{valid:!0,data:r}:{valid:!1}}class Yp extends Dt{_parse(e){const{status:t,ctx:n}=this._processInputParams(e),i=(o,a)=>{if(Ab(o)||Ab(a))return Ct;const c=Ib(o.value,a.value);return c.valid?((Tb(o)||Tb(a))&&t.dirty(),{status:t.value,value:c.data}):(De(n,{code:be.invalid_intersection_types}),Ct)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([o,a])=>i(o,a)):i(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}Yp.create=(r,e,t)=>new Yp({left:r,right:e,typeName:wt.ZodIntersection,...Ot(t)});class xs extends Dt{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==Ke.array)return De(n,{code:be.invalid_type,expected:Ke.array,received:n.parsedType}),Ct;if(n.data.length<this._def.items.length)return De(n,{code:be.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Ct;!this._def.rest&&n.data.length>this._def.items.length&&(De(n,{code:be.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const o=[...n.data].map((a,c)=>{const d=this._def.items[c]||this._def.rest;return d?d._parse(new ws(n,a,n.path,c)):null}).filter(a=>!!a);return n.common.async?Promise.all(o).then(a=>bi.mergeArray(t,a)):bi.mergeArray(t,o)}get items(){return this._def.items}rest(e){return new xs({...this._def,rest:e})}}xs.create=(r,e)=>{if(!Array.isArray(r))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new xs({items:r,typeName:wt.ZodTuple,rest:null,...Ot(e)})};class Qp extends Dt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==Ke.object)return De(n,{code:be.invalid_type,expected:Ke.object,received:n.parsedType}),Ct;const i=[],o=this._def.keyType,a=this._def.valueType;for(const c in n.data)i.push({key:o._parse(new ws(n,c,n.path,c)),value:a._parse(new ws(n,n.data[c],n.path,c)),alwaysSet:c in n.data});return n.common.async?bi.mergeObjectAsync(t,i):bi.mergeObjectSync(t,i)}get element(){return this._def.valueType}static create(e,t,n){return t instanceof Dt?new Qp({keyType:e,valueType:t,typeName:wt.ZodRecord,...Ot(n)}):new Qp({keyType:Ma.create(),valueType:e,typeName:wt.ZodRecord,...Ot(t)})}}class av extends Dt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==Ke.map)return De(n,{code:be.invalid_type,expected:Ke.map,received:n.parsedType}),Ct;const i=this._def.keyType,o=this._def.valueType,a=[...n.data.entries()].map(([c,d],u)=>({key:i._parse(new ws(n,c,n.path,[u,"key"])),value:o._parse(new ws(n,d,n.path,[u,"value"]))}));if(n.common.async){const c=new Map;return Promise.resolve().then(async()=>{for(const d of a){const u=await d.key,h=await d.value;if(u.status==="aborted"||h.status==="aborted")return Ct;(u.status==="dirty"||h.status==="dirty")&&t.dirty(),c.set(u.value,h.value)}return{status:t.value,value:c}})}else{const c=new Map;for(const d of a){const u=d.key,h=d.value;if(u.status==="aborted"||h.status==="aborted")return Ct;(u.status==="dirty"||h.status==="dirty")&&t.dirty(),c.set(u.value,h.value)}return{status:t.value,value:c}}}}av.create=(r,e,t)=>new av({valueType:e,keyType:r,typeName:wt.ZodMap,...Ot(t)});class Eu extends Dt{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==Ke.set)return De(n,{code:be.invalid_type,expected:Ke.set,received:n.parsedType}),Ct;const i=this._def;i.minSize!==null&&n.data.size<i.minSize.value&&(De(n,{code:be.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),t.dirty()),i.maxSize!==null&&n.data.size>i.maxSize.value&&(De(n,{code:be.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),t.dirty());const o=this._def.valueType;function a(d){const u=new Set;for(const h of d){if(h.status==="aborted")return Ct;h.status==="dirty"&&t.dirty(),u.add(h.value)}return{status:t.value,value:u}}const c=[...n.data.values()].map((d,u)=>o._parse(new ws(n,d,n.path,u)));return n.common.async?Promise.all(c).then(d=>a(d)):a(c)}min(e,t){return new Eu({...this._def,minSize:{value:e,message:ht.toString(t)}})}max(e,t){return new Eu({...this._def,maxSize:{value:e,message:ht.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}Eu.create=(r,e)=>new Eu({valueType:r,minSize:null,maxSize:null,typeName:wt.ZodSet,...Ot(e)});class rf extends Dt{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==Ke.function)return De(t,{code:be.invalid_type,expected:Ke.function,received:t.parsedType}),Ct;function n(c,d){return rv({data:c,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,tv(),Sf].filter(u=>!!u),issueData:{code:be.invalid_arguments,argumentsError:d}})}function i(c,d){return rv({data:c,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,tv(),Sf].filter(u=>!!u),issueData:{code:be.invalid_return_type,returnTypeError:d}})}const o={errorMap:t.common.contextualErrorMap},a=t.data;if(this._def.returns instanceof Tf){const c=this;return Li(async function(...d){const u=new Eo([]),h=await c._def.args.parseAsync(d,o).catch(v=>{throw u.addIssue(n(d,v)),u}),p=await Reflect.apply(a,this,h);return await c._def.returns._def.type.parseAsync(p,o).catch(v=>{throw u.addIssue(i(p,v)),u})})}else{const c=this;return Li(function(...d){const u=c._def.args.safeParse(d,o);if(!u.success)throw new Eo([n(d,u.error)]);const h=Reflect.apply(a,this,u.data),p=c._def.returns.safeParse(h,o);if(!p.success)throw new Eo([i(h,p.error)]);return p.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new rf({...this._def,args:xs.create(e).rest(uu.create())})}returns(e){return new rf({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,n){return new rf({args:e||xs.create([]).rest(uu.create()),returns:t||uu.create(),typeName:wt.ZodFunction,...Ot(n)})}}class Xp extends Dt{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}Xp.create=(r,e)=>new Xp({getter:r,typeName:wt.ZodLazy,...Ot(e)});class Jp extends Dt{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return De(t,{received:t.data,code:be.invalid_literal,expected:this._def.value}),Ct}return{status:"valid",value:e.data}}get value(){return this._def.value}}Jp.create=(r,e)=>new Jp({value:r,typeName:wt.ZodLiteral,...Ot(e)});function QR(r,e){return new Hl({values:r,typeName:wt.ZodEnum,...Ot(e)})}class Hl extends Dt{constructor(){super(...arguments),up.set(this,void 0)}_parse(e){if(typeof e.data!="string"){const t=this._getOrReturnCtx(e),n=this._def.values;return De(t,{expected:tr.joinValues(n),received:t.parsedType,code:be.invalid_type}),Ct}if(nv(this,up)||KR(this,up,new Set(this._def.values)),!nv(this,up).has(e.data)){const t=this._getOrReturnCtx(e),n=this._def.values;return De(t,{received:t.data,code:be.invalid_enum_value,options:n}),Ct}return Li(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return Hl.create(e,{...this._def,...t})}exclude(e,t=this._def){return Hl.create(this.options.filter(n=>!e.includes(n)),{...this._def,...t})}}up=new WeakMap;Hl.create=QR;class em extends Dt{constructor(){super(...arguments),hp.set(this,void 0)}_parse(e){const t=tr.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==Ke.string&&n.parsedType!==Ke.number){const i=tr.objectValues(t);return De(n,{expected:tr.joinValues(i),received:n.parsedType,code:be.invalid_type}),Ct}if(nv(this,hp)||KR(this,hp,new Set(tr.getValidEnumValues(this._def.values))),!nv(this,hp).has(e.data)){const i=tr.objectValues(t);return De(n,{received:n.data,code:be.invalid_enum_value,options:i}),Ct}return Li(e.data)}get enum(){return this._def.values}}hp=new WeakMap;em.create=(r,e)=>new em({values:r,typeName:wt.ZodNativeEnum,...Ot(e)});class Tf extends Dt{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==Ke.promise&&t.common.async===!1)return De(t,{code:be.invalid_type,expected:Ke.promise,received:t.parsedType}),Ct;const n=t.parsedType===Ke.promise?t.data:Promise.resolve(t.data);return Li(n.then(i=>this._def.type.parseAsync(i,{path:t.path,errorMap:t.common.contextualErrorMap})))}}Tf.create=(r,e)=>new Tf({type:r,typeName:wt.ZodPromise,...Ot(e)});class Da extends Dt{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===wt.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:n}=this._processInputParams(e),i=this._def.effect||null,o={addIssue:a=>{De(n,a),a.fatal?t.abort():t.dirty()},get path(){return n.path}};if(o.addIssue=o.addIssue.bind(o),i.type==="preprocess"){const a=i.transform(n.data,o);if(n.common.async)return Promise.resolve(a).then(async c=>{if(t.value==="aborted")return Ct;const d=await this._def.schema._parseAsync({data:c,path:n.path,parent:n});return d.status==="aborted"?Ct:d.status==="dirty"||t.value==="dirty"?Uh(d.value):d});{if(t.value==="aborted")return Ct;const c=this._def.schema._parseSync({data:a,path:n.path,parent:n});return c.status==="aborted"?Ct:c.status==="dirty"||t.value==="dirty"?Uh(c.value):c}}if(i.type==="refinement"){const a=c=>{const d=i.refinement(c,o);if(n.common.async)return Promise.resolve(d);if(d instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return c};if(n.common.async===!1){const c=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return c.status==="aborted"?Ct:(c.status==="dirty"&&t.dirty(),a(c.value),{status:t.value,value:c.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(c=>c.status==="aborted"?Ct:(c.status==="dirty"&&t.dirty(),a(c.value).then(()=>({status:t.value,value:c.value}))))}if(i.type==="transform")if(n.common.async===!1){const a=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!Cu(a))return a;const c=i.transform(a.value,o);if(c instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:c}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(a=>Cu(a)?Promise.resolve(i.transform(a.value,o)).then(c=>({status:t.value,value:c})):a);tr.assertNever(i)}}Da.create=(r,e,t)=>new Da({schema:r,typeName:wt.ZodEffects,effect:e,...Ot(t)});Da.createWithPreprocess=(r,e,t)=>new Da({schema:e,effect:{type:"preprocess",transform:r},typeName:wt.ZodEffects,...Ot(t)});class ps extends Dt{_parse(e){return this._getType(e)===Ke.undefined?Li(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}ps.create=(r,e)=>new ps({innerType:r,typeName:wt.ZodOptional,...Ot(e)});class Nl extends Dt{_parse(e){return this._getType(e)===Ke.null?Li(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Nl.create=(r,e)=>new Nl({innerType:r,typeName:wt.ZodNullable,...Ot(e)});class tm extends Dt{_parse(e){const{ctx:t}=this._processInputParams(e);let n=t.data;return t.parsedType===Ke.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}tm.create=(r,e)=>new tm({innerType:r,typeName:wt.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...Ot(e)});class rm extends Dt{_parse(e){const{ctx:t}=this._processInputParams(e),n={...t,common:{...t.common,issues:[]}},i=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return Bp(i)?i.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Eo(n.common.issues)},input:n.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Eo(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}rm.create=(r,e)=>new rm({innerType:r,typeName:wt.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...Ot(e)});class sv extends Dt{_parse(e){if(this._getType(e)!==Ke.nan){const n=this._getOrReturnCtx(e);return De(n,{code:be.invalid_type,expected:Ke.nan,received:n.parsedType}),Ct}return{status:"valid",value:e.data}}}sv.create=r=>new sv({typeName:wt.ZodNaN,...Ot(r)});const MD=Symbol("zod_brand");class Iw extends Dt{_parse(e){const{ctx:t}=this._processInputParams(e),n=t.data;return this._def.type._parse({data:n,path:t.path,parent:t})}unwrap(){return this._def.type}}class r2 extends Dt{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{const o=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return o.status==="aborted"?Ct:o.status==="dirty"?(t.dirty(),Uh(o.value)):this._def.out._parseAsync({data:o.value,path:n.path,parent:n})})();{const i=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?Ct:i.status==="dirty"?(t.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:n.path,parent:n})}}static create(e,t){return new r2({in:e,out:t,typeName:wt.ZodPipeline})}}class nm extends Dt{_parse(e){const t=this._def.innerType._parse(e),n=i=>(Cu(i)&&(i.value=Object.freeze(i.value)),i);return Bp(t)?t.then(i=>n(i)):n(t)}unwrap(){return this._def.innerType}}nm.create=(r,e)=>new nm({innerType:r,typeName:wt.ZodReadonly,...Ot(e)});function VC(r,e){const t=typeof r=="function"?r(e):typeof r=="string"?{message:r}:r;return typeof t=="string"?{message:t}:t}function XR(r,e={},t){return r?Af.create().superRefine((n,i)=>{var o,a;const c=r(n);if(c instanceof Promise)return c.then(d=>{var u,h;if(!d){const p=VC(e,n),m=(h=(u=p.fatal)!==null&&u!==void 0?u:t)!==null&&h!==void 0?h:!0;i.addIssue({code:"custom",...p,fatal:m})}});if(!c){const d=VC(e,n),u=(a=(o=d.fatal)!==null&&o!==void 0?o:t)!==null&&a!==void 0?a:!0;i.addIssue({code:"custom",...d,fatal:u})}}):Af.create()}const $D={object:rn.lazycreate};var wt;(function(r){r.ZodString="ZodString",r.ZodNumber="ZodNumber",r.ZodNaN="ZodNaN",r.ZodBigInt="ZodBigInt",r.ZodBoolean="ZodBoolean",r.ZodDate="ZodDate",r.ZodSymbol="ZodSymbol",r.ZodUndefined="ZodUndefined",r.ZodNull="ZodNull",r.ZodAny="ZodAny",r.ZodUnknown="ZodUnknown",r.ZodNever="ZodNever",r.ZodVoid="ZodVoid",r.ZodArray="ZodArray",r.ZodObject="ZodObject",r.ZodUnion="ZodUnion",r.ZodDiscriminatedUnion="ZodDiscriminatedUnion",r.ZodIntersection="ZodIntersection",r.ZodTuple="ZodTuple",r.ZodRecord="ZodRecord",r.ZodMap="ZodMap",r.ZodSet="ZodSet",r.ZodFunction="ZodFunction",r.ZodLazy="ZodLazy",r.ZodLiteral="ZodLiteral",r.ZodEnum="ZodEnum",r.ZodEffects="ZodEffects",r.ZodNativeEnum="ZodNativeEnum",r.ZodOptional="ZodOptional",r.ZodNullable="ZodNullable",r.ZodDefault="ZodDefault",r.ZodCatch="ZodCatch",r.ZodPromise="ZodPromise",r.ZodBranded="ZodBranded",r.ZodPipeline="ZodPipeline",r.ZodReadonly="ZodReadonly"})(wt||(wt={}));const OD=(r,e={message:`Input not instance of ${r.name}`})=>XR(t=>t instanceof r,e),gi=Ma.create,JR=Zl.create,ZD=sv.create,LD=Ll.create,Rw=qp.create,Rb=ku.create,HD=iv.create,ND=Kp.create,DD=Gp.create,VD=Af.create,eP=uu.create,FD=wc.create,zD=ov.create,tP=Za.create,n2=rn.create,jD=rn.strictCreate,UD=Wp.create,BD=m4.create,qD=Yp.create,KD=xs.create,rP=Qp.create,GD=av.create,WD=Eu.create,YD=rf.create,QD=Xp.create,XD=Jp.create,JD=Hl.create,eV=em.create,tV=Tf.create,FC=Da.create,rV=ps.create,nV=Nl.create,iV=Da.createWithPreprocess,oV=r2.create,aV=()=>gi().optional(),sV=()=>JR().optional(),cV=()=>Rw().optional(),lV={string:r=>Ma.create({...r,coerce:!0}),number:r=>Zl.create({...r,coerce:!0}),boolean:r=>qp.create({...r,coerce:!0}),bigint:r=>Ll.create({...r,coerce:!0}),date:r=>ku.create({...r,coerce:!0})},dV=Ct;var j=Object.freeze({__proto__:null,defaultErrorMap:Sf,setErrorMap:lD,getErrorMap:tv,makeIssue:rv,EMPTY_PATH:dD,addIssueToContext:De,ParseStatus:bi,INVALID:Ct,DIRTY:Uh,OK:Li,isAborted:Ab,isDirty:Tb,isValid:Cu,isAsync:Bp,get util(){return tr},get objectUtil(){return Sb},ZodParsedType:Ke,getParsedType:Qs,ZodType:Dt,datetimeRegex:YR,ZodString:Ma,ZodNumber:Zl,ZodBigInt:Ll,ZodBoolean:qp,ZodDate:ku,ZodSymbol:iv,ZodUndefined:Kp,ZodNull:Gp,ZodAny:Af,ZodUnknown:uu,ZodNever:wc,ZodVoid:ov,ZodArray:Za,ZodObject:rn,ZodUnion:Wp,ZodDiscriminatedUnion:m4,ZodIntersection:Yp,ZodTuple:xs,ZodRecord:Qp,ZodMap:av,ZodSet:Eu,ZodFunction:rf,ZodLazy:Xp,ZodLiteral:Jp,ZodEnum:Hl,ZodNativeEnum:em,ZodPromise:Tf,ZodEffects:Da,ZodTransformer:Da,ZodOptional:ps,ZodNullable:Nl,ZodDefault:tm,ZodCatch:rm,ZodNaN:sv,BRAND:MD,ZodBranded:Iw,ZodPipeline:r2,ZodReadonly:nm,custom:XR,Schema:Dt,ZodSchema:Dt,late:$D,get ZodFirstPartyTypeKind(){return wt},coerce:lV,any:VD,array:tP,bigint:LD,boolean:Rw,date:Rb,discriminatedUnion:BD,effect:FC,enum:JD,function:YD,instanceof:OD,intersection:qD,lazy:QD,literal:XD,map:GD,nan:ZD,nativeEnum:eV,never:FD,null:DD,nullable:nV,number:JR,object:n2,oboolean:cV,onumber:sV,optional:rV,ostring:aV,pipeline:oV,preprocess:iV,promise:tV,record:rP,set:WD,strictObject:jD,string:gi,symbol:HD,transformer:FC,tuple:KD,undefined:ND,union:UD,unknown:eP,void:zD,NEVER:dV,ZodIssueCode:be,quotelessJson:cD,ZodError:Eo});const nP=()=>j.custom(r=>r===(r==null?void 0:r.toUpperCase()),r=>({code:j.ZodIssueCode.custom,validation:"uppercase",path:["method"],message:[`Provided HTTP method '${r}' must be in uppercase.`,"See RFC 7231 Section 4.1 for more information","https://www.rfc-editor.org/rfc/rfc7231#section-4.1"].join(" ")})),uV=()=>j.enum(["GET","POST","PUT","DELETE","PATCH","OPTIONS","HEAD","CONNECT","TRACE"],{errorMap:r=>{const{received:e,options:t}=r;return{message:["Invalid request method.",`Expected '${t.join(" | ")}', but received '${e}'.`,"See RFC 2615 Section 9 for more information","https://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html"].join(" ")}}}),hV=()=>nP().pipe(uV()),fV=j.object({attributionReporting:j.object({eventSourceEligible:j.boolean().optional(),triggerEligible:j.boolean().optional()}).optional(),body:j.union([j.string(),j.instanceof(Blob),j.instanceof(ArrayBuffer),j.instanceof(FormData),j.instanceof(URLSearchParams),j.instanceof(ReadableStream)]).optional(),browsingTopics:j.boolean().optional(),cache:j.enum(["default","no-store","reload","no-cache","force-cache","only-if-cached"]).optional(),credentials:j.enum(["omit","same-origin","include"]).optional(),headers:j.record(j.string(),j.string()).optional().or(j.instanceof(Headers)),integrity:j.string().optional(),keepalive:j.boolean().optional(),method:hV().optional(),mode:j.enum(["same-origin","cors","no-cors","navigate","websocket"]).optional(),priority:j.enum(["low","high","auto"]).optional(),redirect:j.enum(["follow","error","manual"]).optional(),referrer:j.string().optional(),referrerPolicy:j.enum(["no-referrer","no-referrer-when-downgrade","origin","origin-when-cross-origin","same-origin","strict-origin","strict-origin-when-cross-origin","unsafe-url"]).optional(),signal:j.instanceof(AbortSignal).optional()}),zC=fV.extend({uri:j.string(),path:j.string().optional()}),pV=r=>e=>{var o;const{error:t,success:n,data:i}=nP().safeParse(e.method);if(e.method=n?i:(o=e.method)==null?void 0:o.toUpperCase(),t)for(const a of t.errors)console.warn(a.message);return e},mV=r=>e=>{const{strict:t,parse:n}={},i=t?zC:zC.passthrough();try{const o=i.parse(e);return n?o:void 0}catch(o){if(n)throw o;console.error("Invalid request options",o.message)}};class gV{constructor(e){Le(this,"_clients",{});Le(this,"defaultHttpClientCtor");Le(this,"defaultHttpRequestHandler",new BR({"capitalize-method":pV(),"request-validation":mV()}));this.defaultHttpClientCtor=e}get clients(){return{...this._clients}}hasClient(e){return Object.keys(this._clients).includes(e)}configureClient(e,t){const n=typeof t=="string"?{baseUri:t}:t,i=typeof n=="function"?{onCreate:n}:n;return this._clients[e]={...this._clients[e],...i},this}}class vV extends Error{}const yV=r=>new RegExp("^(https?:\\/\\/)?((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.?)+[a-z]{2,}|((\\d{1,3}\\.){3}\\d{1,3}))(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*(\\?[;&a-z\\d%_.~+=-]*)?(\\#[-a-z\\d_]*)?$","i").test(r);class _V{constructor(e){Le(this,"config");this.config=e}get defaultHttpRequestHandler(){return this.config.defaultHttpRequestHandler}hasClient(e){return Object.keys(this.config.clients).includes(e)}createClient(e){const t=this._resolveConfig(e),{baseUri:n,defaultScopes:i=[],onCreate:o,ctor:a=this.config.defaultHttpClientCtor,requestHandler:c=this.defaultHttpRequestHandler}=t,d={requestHandler:c},u=new a(n||"",d);return Object.assign(u,{defaultScopes:i}),o==null||o(u),u}createCustomClient(e){return this.createClient(e)}_resolveConfig(e){if(typeof e=="string"){const t=this.config.clients[e];if(!t&&yV(e))return{baseUri:e};if(!t)throw new vV(`No registered http client for key [${e}]`);return t}return e}}function bV(r,e){e===void 0&&(e={});var t=e.selector,n=fR(e,["selector"]);return new It(function(i){var o=new AbortController,a=o.signal,c=!0,d=n.signal;if(d)if(d.aborted)o.abort();else{var u=function(){a.aborted||o.abort()};d.addEventListener("abort",u),i.add(function(){return d.removeEventListener("abort",u)})}var h=Cn(Cn({},n),{signal:a}),p=function(m){c=!1,i.error(m)};return fetch(r,h).then(function(m){t?On(t(m)).subscribe(Er(i,void 0,function(){c=!1,i.complete()},p)):(c=!1,i.next(m),i.complete())}).catch(p),function(){c&&o.abort()}})}class Tl extends Error{constructor(t,n,i){super(t,i);Le(this,"response");this.response=n}}Le(Tl,"Name","HttpResponseError");const r4=class r4 extends Tl{constructor(t,n,i){super(t,n,i);Le(this,"data");this.name=r4.Name,this.data=i==null?void 0:i.data}};Le(r4,"Name","HttpJsonResponseError");let nf=r4;const n4=class n4 extends Tl{constructor(e,t,n){super(e,t,n),this.name=n4.Name}};Le(n4,"Name","ServerSentEventResponseError");let Cp=n4;const If=async r=>{if(r.status===204)return Promise.resolve();try{const e=await r.json();if(!r.ok)throw new nf("network response was not OK",r,{data:e});return e}catch(e){throw e instanceof nf?e:new nf("failed to parse response",r,{cause:e})}},wV=async r=>{var t,n,i;if(!r.ok)throw new Error("network response was not OK");if(r.status===204)throw new Error("no content");const e=(i=(n=(t=r.headers.get("content-disposition"))==null?void 0:t.split(";").find(o=>o.includes("filename=")))==null?void 0:n.replace("filename=",""))==null?void 0:i.trim();try{const o=await r.blob();return{filename:e,blob:o}}catch{throw Error("failed to parse response")}},xV=r=>{try{return JSON.parse(r)}catch{return r}};function*CV(r,e){const t=r.split(`
44
44
 
45
45
  `),n=(e==null?void 0:e.dataParser)||xV;for(const i of t){if(!i.trim())continue;const a=i.split(`
46
- `).reduce((c,d)=>{if(!d)return c;const u=d.indexOf(":");if(u===-1)return c;const h=d.slice(0,u).trim(),p=d.slice(u+1).trim();return h==="data"?c.data=n(p):c[h]=p,c},{});Object.keys(a).length&&(yield a)}}async function*kV(r,e){const t=!!(e!=null&&e.skipHeartbeats),n=e!=null&&e.eventFilter?Array.isArray(e.eventFilter)?e.eventFilter:[e.eventFilter]:null,i=new TextDecoder;for(;;){const{done:o,value:a}=await r.read();if(o)break;const c=i.decode(a,{stream:!0}),d=CV(c,{dataParser:e==null?void 0:e.dataParser});for(const u of d){if(u.retry){await new Promise(h=>setTimeout(h,Number.parseInt(u.retry??"300",10)));continue}t&&(!u.event&&!u.data&&!u.id||u.event&&["heartbeat","ping"].includes(u.event))||(!n||u.event&&n.includes(u.event))&&(yield u)}}}const EV=r=>e=>{var n;if(!e.ok)throw new Cp(`HTTP error! Status: ${e.status}`,e);if(!e.body)throw new Cp("Response body is not readable",e);if(!((n=e.headers.get("Content-Type"))!=null&&n.includes("text/event-stream")))throw new Cp("Response is not a text/event-stream",e);const t=e.body.getReader();return at(kV(t,{dataParser:r==null?void 0:r.dataParser,skipHeartbeats:r==null?void 0:r.skipHeartbeats,eventFilter:r==null?void 0:r.eventFilter})).pipe(Al(r!=null&&r.abortSignal?Sl(r.abortSignal,"abort"):Tr),jp(async()=>{await t.cancel().catch(()=>{}),t.releaseLock()}))};class SV{constructor(e,t){Le(this,"uri");Le(this,"requestHandler");Le(this,"responseHandler");Le(this,"_request$",new Fn);Le(this,"_response$",new Fn);Le(this,"_abort$",new Fn);this.uri=e,this.requestHandler=new BR(t==null?void 0:t.requestHandler),this.responseHandler=new sD(t==null?void 0:t.responseHandler),this._init()}get request$(){return this._request$.asObservable()}get response$(){return this._response$.asObservable()}_init(){}fetch$(e,t){return this._fetch$(e,t)}fetch(e,t){return Vn(this.fetch$(e,t))}fetchAsync(e,t){return this.fetch(e,t)}json$(e,t){const n=typeof(t==null?void 0:t.body)=="object"?JSON.stringify(t==null?void 0:t.body):t==null?void 0:t.body,i=(t==null?void 0:t.selector)??If,o=new Headers(t==null?void 0:t.headers);return o.append("Accept","application/json"),o.append("Content-Type","application/json"),this.fetch$(e,{...t,body:n,selector:i,headers:o})}json(e,t){return Vn(this.json$(e,t))}blob$(e,t){const n=(t==null?void 0:t.selector)??wV,i={...t,selector:n};return this.fetch$(e,i)}blob(e,t){return Vn(this.blob$(e,t))}sse$(e,t,n){const i=new Headers(t==null?void 0:t.headers);i.append("Accept","text/event-stream"),i.append("Content-Type","text/event-stream"),i.append("Cache-Control","no-cache"),i.append("Connection","keep-alive");const o=EV({...n,abortSignal:t==null?void 0:t.signal});return this._fetch$(e,{selector:o,...t,headers:i})}jsonAsync(e,t){return this.json(e,t)}execute(e,t,n){return this[e](t,n)}abort(){this._abort$.next()}_fetch$(e,t){const{selector:n,...i}=t||{};return Pt({...i,uri:this._resolveUrl(e)}).pipe(Qt(a=>this._prepareRequest(a)),qr(a=>this._request$.next(a)),Qt(({uri:a,path:c,...d})=>bV(a,d)),Qt(a=>this._prepareResponse(a)),qr(a=>this._response$.next(a)),Qt(a=>{if(n)try{return n(a)}catch(c){throw new Tl("failed to execute response selector",a,{cause:c})}return Pt(a)}),Al(this._abort$))}_prepareRequest(e){return this.requestHandler.process(e)}_prepareResponse(e){return this.responseHandler.process(e)}_resolveUrl(e){const{origin:t,pathname:n}=new URL(this.uri,this.uri.startsWith("http")?void 0:window.location.origin),i=[n,e].join("/").replace(/\/{2,}/g,"/");return new URL(i,t).href}}class AV extends SV{constructor(){super(...arguments);Le(this,"defaultScopes",[])}fetch$(t,n){const i=Object.assign(n||{},{scopes:this.defaultScopes.concat((n==null?void 0:n.scopes)||[])});return super._fetch$(t,i)}}const Pw={name:"http",configure:()=>new gV(AV),initialize:async({config:r,hasModule:e,requireInstance:t})=>{const n=new _V(r);if(e("auth")){const i=await t("auth");n.defaultHttpRequestHandler.set("MSAL",async o=>{const{scopes:a=[]}=o;if(a.length){const c=await i.acquireToken({scopes:a});if(c){const d=new Headers(o.headers);return d.set("Authorization",`Bearer ${c.accessToken}`),{...o,headers:d}}}})}return n}},TV=r=>({module:Pw,configure:r}),iP=(r,e)=>({module:Pw,configure:t=>{t.configureClient(r,e)}});var $a;(function(r){r.V2="v2",r.Latest="4.0.3"})($a||($a={}));const IV=j.string().transform(r=>String(cp.coerce(r))),RV=j.object({clientId:j.string(),tenantId:j.string(),redirectUri:j.string().optional()}),PV=j.custom(),MV=j.object({client:RV.optional(),provider:PV.optional(),requiresAuth:j.boolean().optional(),version:IV});class $V extends t2{constructor(){super();Le(this,"version",$a.Latest);this._set("version",async()=>this.version)}setClientConfig(t){this._set("client",async()=>t)}setRequiresAuth(t){this._set("requiresAuth",async()=>t)}setProvider(t){this._set("provider",async()=>t)}setVersion(t){this._set("version",async()=>t)}async _processConfig(t){return MV.parseAsync(t)}}/*! @azure/msal-browser v2.39.0 2024-06-06 *//*! *****************************************************************************
46
+ `).reduce((c,d)=>{if(!d)return c;const u=d.indexOf(":");if(u===-1)return c;const h=d.slice(0,u).trim(),p=d.slice(u+1).trim();return h==="data"?c.data=n(p):c[h]=p,c},{});Object.keys(a).length&&(yield a)}}async function*kV(r,e){const t=!!(e!=null&&e.skipHeartbeats),n=e!=null&&e.eventFilter?Array.isArray(e.eventFilter)?e.eventFilter:[e.eventFilter]:null,i=new TextDecoder;for(;;){const{done:o,value:a}=await r.read();if(o)break;const c=i.decode(a,{stream:!0}),d=CV(c,{dataParser:e==null?void 0:e.dataParser});for(const u of d){if(u.retry){await new Promise(h=>setTimeout(h,Number.parseInt(u.retry??"300",10)));continue}t&&(!u.event&&!u.data&&!u.id||u.event&&["heartbeat","ping"].includes(u.event))||(!n||u.event&&n.includes(u.event))&&(yield u)}}}const EV=r=>e=>{var n;if(!e.ok)throw new Cp(`HTTP error! Status: ${e.status}`,e);if(!e.body)throw new Cp("Response body is not readable",e);if(!((n=e.headers.get("Content-Type"))!=null&&n.includes("text/event-stream")))throw new Cp("Response is not a text/event-stream",e);const t=e.body.getReader();return at(kV(t,{dataParser:r==null?void 0:r.dataParser,skipHeartbeats:r==null?void 0:r.skipHeartbeats,eventFilter:r==null?void 0:r.eventFilter})).pipe(Al(r!=null&&r.abortSignal?Sl(r.abortSignal,"abort"):Tr),jp(async()=>{await t.cancel().catch(()=>{}),t.releaseLock()}))};class SV{constructor(e,t){Le(this,"uri");Le(this,"requestHandler");Le(this,"responseHandler");Le(this,"_request$",new Fn);Le(this,"_response$",new Fn);Le(this,"_abort$",new Fn);this.uri=e,this.requestHandler=new BR(t==null?void 0:t.requestHandler),this.responseHandler=new sD(t==null?void 0:t.responseHandler),this._init()}get request$(){return this._request$.asObservable()}get response$(){return this._response$.asObservable()}_init(){}fetch$(e,t){return this._fetch$(e,t)}fetch(e,t){return Vn(this.fetch$(e,t))}fetchAsync(e,t){return this.fetch(e,t)}json$(e,t){const n=typeof(t==null?void 0:t.body)=="object"?JSON.stringify(t==null?void 0:t.body):t==null?void 0:t.body,i=(t==null?void 0:t.selector)??If,o=new Headers(t==null?void 0:t.headers);return o.append("Accept","application/json"),o.append("Content-Type","application/json"),this.fetch$(e,{...t,body:n,selector:i,headers:o})}json(e,t){return Vn(this.json$(e,t))}blob$(e,t){const n=(t==null?void 0:t.selector)??wV,i={...t,selector:n};return this.fetch$(e,i)}blob(e,t){return Vn(this.blob$(e,t))}sse$(e,t,n){const i=new Headers(t==null?void 0:t.headers);i.append("Accept","text/event-stream"),i.append("Content-Type","text/event-stream"),i.append("Cache-Control","no-cache"),i.append("Connection","keep-alive");const o=EV({...n,abortSignal:t==null?void 0:t.signal});return this._fetch$(e,{selector:o,...t,headers:i})}jsonAsync(e,t){return this.json(e,t)}execute(e,t,n){return this[e](t,n)}abort(){this._abort$.next()}_fetch$(e,t){const{selector:n,...i}=t||{};return Pt({...i,uri:this._resolveUrl(e)}).pipe(Qt(a=>this._prepareRequest(a)),qr(a=>this._request$.next(a)),Qt(({uri:a,path:c,...d})=>bV(a,d)),Qt(a=>this._prepareResponse(a)),qr(a=>this._response$.next(a)),Qt(a=>{if(n)try{return n(a)}catch(c){throw new Tl("failed to execute response selector",a,{cause:c})}return Pt(a)}),Al(this._abort$))}_prepareRequest(e){return this.requestHandler.process(e)}_prepareResponse(e){return this.responseHandler.process(e)}_resolveUrl(e){const{origin:t,pathname:n}=new URL(this.uri,this.uri.startsWith("http")?void 0:window.location.origin),i=[n,e].join("/").replace(/\/{2,}/g,"/");return new URL(i,t).href}}class AV extends SV{constructor(){super(...arguments);Le(this,"defaultScopes",[])}fetch$(t,n){const i=Object.assign(n||{},{scopes:this.defaultScopes.concat((n==null?void 0:n.scopes)||[])});return super._fetch$(t,i)}}const Pw={name:"http",configure:()=>new gV(AV),initialize:async({config:r,hasModule:e,requireInstance:t})=>{const n=new _V(r);if(e("auth")){const i=await t("auth");n.defaultHttpRequestHandler.set("MSAL",async o=>{const{scopes:a=[]}=o;if(a.length){const c=await i.acquireToken({scopes:a});if(c){const d=new Headers(o.headers);return d.set("Authorization",`Bearer ${c.accessToken}`),{...o,headers:d}}}})}return n}},TV=r=>({module:Pw,configure:r}),iP=(r,e)=>({module:Pw,configure:t=>{t.configureClient(r,e)}});var $a;(function(r){r.V2="v2",r.Latest="4.0.6"})($a||($a={}));const IV=j.string().transform(r=>String(cp.coerce(r))),RV=j.object({clientId:j.string(),tenantId:j.string(),redirectUri:j.string().optional()}),PV=j.custom(),MV=j.object({client:RV.optional(),provider:PV.optional(),requiresAuth:j.boolean().optional(),version:IV});class $V extends t2{constructor(){super();Le(this,"version",$a.Latest);this._set("version",async()=>this.version)}setClientConfig(t){this._set("client",async()=>t)}setRequiresAuth(t){this._set("requiresAuth",async()=>t)}setProvider(t){this._set("provider",async()=>t)}setVersion(t){this._set("version",async()=>t)}async _processConfig(t){return MV.parseAsync(t)}}/*! @azure/msal-browser v2.39.0 2024-06-06 *//*! *****************************************************************************
47
47
  Copyright (c) Microsoft Corporation.
48
48
 
49
49
  Permission to use, copy, modify, and/or distribute this software for any
@@ -78,7 +78,7 @@ Error Description: `+u.message)),[2,null];case 4:return i||(this.logger.warning(
78
78
  `:`
79
79
  `)+t,i=n+1,n=r.indexOf(`
80
80
  `,i)}while(n!==-1);return o+=r.slice(i),o}const{stdout:Ek,stderr:Sk}=Dz,Kb=Symbol("GENERATOR"),Of=Symbol("STYLER"),dm=Symbol("IS_EMPTY"),Ak=["ansi","ansi","ansi256","ansi16m"],Zf=Object.create(null),zz=(r,e={})=>{if(e.level&&!(Number.isInteger(e.level)&&e.level>=0&&e.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");const t=Ek?Ek.level:0;r.level=e.level===void 0?t:e.level},jz=r=>{const e=(...t)=>t.join(" ");return zz(e,r),Object.setPrototypeOf(e,s2.prototype),e};function s2(r){return jz(r)}Object.setPrototypeOf(s2.prototype,Function.prototype);for(const[r,e]of Object.entries(is))Zf[r]={get(){const t=Ev(this,Wb(e.open,e.close,this[Of]),this[dm]);return Object.defineProperty(this,r,{value:t}),t}};Zf.visible={get(){const r=Ev(this,this[Of],!0);return Object.defineProperty(this,"visible",{value:r}),r}};const Gb=(r,e,t,...n)=>r==="rgb"?e==="ansi16m"?is[t].ansi16m(...n):e==="ansi256"?is[t].ansi256(is.rgbToAnsi256(...n)):is[t].ansi(is.rgbToAnsi(...n)):r==="hex"?Gb("rgb",e,t,...is.hexToRgb(...n)):is[t][r](...n),Uz=["rgb","hex","ansi256"];for(const r of Uz){Zf[r]={get(){const{level:t}=this;return function(...n){const i=Wb(Gb(r,Ak[t],"color",...n),is.color.close,this[Of]);return Ev(this,i,this[dm])}}};const e="bg"+r[0].toUpperCase()+r.slice(1);Zf[e]={get(){const{level:t}=this;return function(...n){const i=Wb(Gb(r,Ak[t],"bgColor",...n),is.bgColor.close,this[Of]);return Ev(this,i,this[dm])}}}}const Bz=Object.defineProperties(()=>{},{...Zf,level:{enumerable:!0,get(){return this[Kb].level},set(r){this[Kb].level=r}}}),Wb=(r,e,t)=>{let n,i;return t===void 0?(n=r,i=e):(n=t.openAll+r,i=e+t.closeAll),{open:r,close:e,openAll:n,closeAll:i,parent:t}},Ev=(r,e,t)=>{const n=(...i)=>qz(n,i.length===1?""+i[0]:i.join(" "));return Object.setPrototypeOf(n,Bz),n[Kb]=r,n[Of]=e,n[dm]=t,n},qz=(r,e)=>{if(r.level<=0||!e)return r[dm]?"":e;let t=r[Of];if(t===void 0)return e;const{openAll:n,closeAll:i}=t;if(e.includes("\x1B"))for(;t!==void 0;)e=Vz(e,t.close,t.open),t=t.parent;const o=e.indexOf(`
81
- `);return o!==-1&&(e=Fz(e,i,n,o)),n+e+i};Object.defineProperties(s2.prototype,Zf);const Tk=s2();s2({level:Sk?Sk.level:0});const Kz=r=>{if(typeof r!="string")throw new Error("Expected LogLevel key to be a string.");const e=r.toLowerCase(),t=Object.keys(ln).find(n=>n.toLowerCase()===e);if(!t)throw new Error(`Failed to parse LogLevel from string: ${r}.`);return ln[t]},Gz=r=>{const e=Number(r);if(Object.values(ln).includes(e))return e;if(isNaN(e))return Kz(r);throw Error(`Invalid log level: ${r}`)};var Wz={},ln;(function(r){r[r.None=0]="None",r[r.Error=1]="Error",r[r.Warning=2]="Warning",r[r.Info=3]="Info",r[r.Debug=4]="Debug"})(ln||(ln={}));const Yz=()=>{const r=Wz.FUSION_LOG_LEVEL;if(r)try{return Gz(r)}catch{return ln.Error}return ln.Error},Qz=Yz(),Xz="1.1.3";class Jz{constructor(){Le(this,"level",Qz);Le(this,"version",Xz);Le(this,"_log$",new Fn)}get log(){return this._log$.pipe(Oe(e=>this.level>=e.lvl))}debug(...e){this._log$.next({lvl:ln.Debug,msg:this._createMessage(ln.Debug,...e)})}info(...e){this._log$.next({lvl:ln.Info,msg:this._createMessage(ln.Info,...e)})}warn(...e){this._log$.next({lvl:ln.Warning,msg:this._createMessage(ln.Warning,...e)})}error(...e){this._log$.next({lvl:ln.Error,msg:this._createMessage(ln.Error,...e)})}}class c2 extends Jz{constructor(t,n){super();Le(this,"title");Le(this,"subtitle");this.title=t,this.subtitle=n,this.log.subscribe(({lvl:i,msg:o})=>{switch(i){case ln.Debug:console.debug(...o);break;case ln.Info:console.info(...o);break;case ln.Warning:console.warn(...o);break;case ln.Error:console.error(...o);break}})}_createMessage(t,...n){return[this._formatTitle(t),...n]}_formatTitle(t){const n=Tk.magenta([this.title,this.subtitle].filter(i=>!!i).join(" - "));switch(t){case ln.Warning:case ln.Error:return Tk.bold(n)}return n}createSubLogger(t,n,i){const o=new c2(`${this.title}::${t}`,n??this.subtitle);return o.level=i===void 0?this.level:i,o}}var Js,su,Dm;class ej extends It{constructor(t,n,i){super(a=>{const{transaction:c}=this,d=t.action$.pipe(Oe(u=>u.meta.transaction===c));a.add(t.state$.pipe(Oe(u=>!!u[c]),me(u=>u[c])).subscribe(u=>{k(this,Js).next(u.status)})),a.add(d.pipe(Oe(cr.execute.success.match),me(({payload:u})=>u)).subscribe(u=>{k(this,Js).next("complete"),a.next(u),a.complete()})),a.add(d.pipe(Oe(cr.error.match),me(({payload:u})=>u)).subscribe(u=>{k(this,Js).next("error"),a.error(u.error)})),a.add(d.pipe(Oe(cr.cancel.match)).subscribe(u=>{k(this,Js).next("canceled"),a.error(new Fd("abort",{message:u.payload.reason||`job: ${c} was canceled`,request:k(this,su).getRequest(u.meta.transaction)}))})),i!=null&&i.signal&&a.add(Sl(i==null?void 0:i.signal,"abort").pipe(me(()=>cr.cancel(c,`job: ${c} was aborted on signal from caller: ${i==null?void 0:i.ref}`))).subscribe(u=>t.next(u))),a.add(()=>{this.complete()})});Ie(this,Js,new Xf("idle"));Ie(this,su);Ie(this,Dm);Le(this,"created",Date.now());Be(this,su,t);const o=cr.request(n,{ref:i==null?void 0:i.ref,retry:i==null?void 0:i.retry});Be(this,Dm,o.meta.transaction),k(this,su).next(o)}get status(){return k(this,Js).value}get status$(){return k(this,Js).asObservable()}get transaction(){return k(this,Dm)}get closed(){return this.status==="complete"||this.status==="error"||this.status==="canceled"}complete(t){this.closed||this.cancel(t??`job: ${this.transaction} was completed`)}cancel(t){const n=this.transaction;k(this,su).cancel(n,t??`job: ${n} was canceled`)}[Symbol.dispose](){this.complete()}}Js=new WeakMap,su=new WeakMap,Dm=new WeakMap;var Or,vl,Ta;class Ik extends It{constructor(t,n){super(i=>k(this,Or).subscribe(i));Ie(this,Or);Ie(this,vl);Ie(this,Ta);Be(this,Or,new o2(Zz({}))),Be(this,vl,new Qn(()=>k(this,Or).complete())),k(this,vl).add(k(this,Or).addFlow(Mz)),k(this,vl).add(k(this,Or).addFlow($z(t))),k(this,vl).add(k(this,Or).addFlow(Oz(Object.assign({count:0,delay:0},n==null?void 0:n.retry)))),Be(this,Ta,(n==null?void 0:n.logger)??new c2("QueryClient")),k(this,Or).addEffect(cr.request.type,({payload:i,meta:{transaction:o}})=>{k(this,Ta).debug("Job requested",{transaction:o,payload:i})}),k(this,Or).addEffect(cr.execute.type,({payload:i,meta:{transaction:o}})=>{k(this,Ta).debug("Job executing",{transaction:o,payload:i})}),k(this,Or).addEffect(cr.execute.success.type,({payload:i})=>{k(this,Ta).info("Job complete",{...i})}),k(this,Or).addEffect(cr.execute.failure.type,({payload:i,meta:{transaction:o}})=>{k(this,Ta).debug("Job failed",{transaction:o,payload:i})}),k(this,Or).addEffect(cr.cancel.type,({payload:{reason:i},meta:{transaction:o}})=>{k(this,Ta).debug("Job canceled",{transaction:o,reason:i})}),k(this,Or).addEffect(cr.error.type,({payload:{transaction:i,error:o}})=>{k(this,Ta).error("Job error",{transaction:i,error:o})})}get closed(){return k(this,Or).closed}get state$(){return k(this,Or).asObservable()}get action$(){return k(this,Or).action$}get success$(){return this.action$.pipe(Oe(cr.execute.success.match),me(({payload:t})=>t))}get error$(){return this.action$.pipe(lm("client/error"),Up(k(this,Or)),me(([t,n])=>{const{payload:i,meta:{transaction:o}}=t,a=n[o];return new Fd("error",{request:a,message:`job: ${o} failed`,cause:i})}))}next(t){k(this,Or).next(t)}query(t,n){const i=new ej(this,t,n),o=i.pipe(Jf({connector:()=>new _R,resetOnRefCountZero:!1}));return Object.defineProperties(o,{transaction:{get:()=>i.transaction},created:{get:()=>i.created},status:{get:()=>i.status},closed:{get:()=>i.closed},cancel:{value:a=>i.cancel(a)},complete:{value:()=>i.complete()}}),o}async nextAsync(t,n){return Vn(this.query(t,n))}getRequest(t){return k(this,Or).value[t]}getRequestByRef(t){return Object.values(k(this,Or).value).find(n=>n.ref===t)}cancelTaskByRef(t,n){const i=this.getRequestByRef(t);i!=null&&i.ref&&this.cancel(i.transaction,n)}cancel(t,n){if(t)k(this,Or).value[t]?(n??(n=`cancelation requested for job: ${t}`),k(this,Or).next(cr.cancel(t,n))):k(this,Ta).warn("Task not registered, nothing to cancel",{transaction:t,reason:n});else for(const i of Object.keys(k(this,Or).value))this.cancel(i,"all transactions requested canceled")}on(t,n){return k(this,Or).addEffect(cr[t].type,i=>{n(i,this)})}complete(){k(this,vl).unsubscribe()}}Or=new WeakMap,vl=new WeakMap,Ta=new WeakMap;function tj(){return{set:nn("cache/set",(r,e)=>({payload:{key:r,record:e}})),insert:nn("cache/insert",(r,e)=>({payload:{key:r,entry:e}})),remove:nn("cache/remove",r=>({payload:r})),invalidate:nn("cache/invalidate",(r,e)=>({payload:r,meta:{item:e}})),mutate:nn("cache/mutate",(r,e,t)=>({payload:{...e,key:r},meta:{item:t}})),trim:nn("cache/trim",r=>({payload:r}))}}const el=tj(),rj=(r,e)=>(e.updated??0)-(r.updated??0);function nj(r,e={}){return a2(e,t=>t.addCase(r.set,(n,i)=>{const{key:o,record:a}=i.payload;n[o]=a}).addCase(r.insert,(n,i)=>{const{key:o,entry:a}=i.payload,c=n[o];if(c)c.updated=Date.now(),c.updates??(c.updates=0),c.updates++,c.value=a.value,c.transaction=a.transaction,c.mutated=void 0;else{const d=Date.now();n[o]={...a,created:d,updated:d}}}).addCase(r.remove,(n,i)=>{delete n[i.payload]}).addCase(r.invalidate,(n,i)=>{const o=i.payload?[i.payload]:Object.keys(n);for(const a of o){const c=n[a];c&&(c.updated=void 0)}}).addCase(r.mutate,(n,i)=>{const{key:o,value:a,updated:c}=i.payload,d=n[o];d&&(d.value=a,d.updated=c,d.mutated=Date.now(),d.updates??(d.updates=0),d.updates++)}).addCase(r.trim,(n,i)=>{const{payload:o}=i,a=o.sort??rj,c=Object.keys(n),d=Object.entries(n).filter(([u,h])=>!o.validate||o.validate(h)).sort((u,h)=>a(u[1],h[1])).slice(0,o.size??Number.MAX_SAFE_INTEGER).map(([u])=>u);if(c.length!==d.length)for(const u of c){const h=d.indexOf(u);h!==-1?d.splice(h,1):delete n[u]}}))}var cn;class Rk{constructor(e){Ie(this,cn);const{trimming:t,initial:n}=e??{};Be(this,cn,new o2(nj(el,n))),t&&k(this,cn).addEffect("cache/set",()=>k(this,cn).next(el.trim(t)))}get state(){return k(this,cn).value}get state$(){return k(this,cn).asObservable()}get action$(){return k(this,cn).action$}has(e){return e in k(this,cn).value}setItem(e,t){const{args:n,transaction:i,value:o}=t;k(this,cn).next(el.insert(e,{args:n,transaction:i,value:o}))}getItem(e){return k(this,cn).value[e]}removeItem(e){k(this,cn).next(el.remove(e))}invalidate(e){const t=e?k(this,cn).value[e]:void 0;k(this,cn).next(el.invalidate(e,t))}mutate(e,t){const n=e in k(this,cn).value?k(this,cn).value[e]:void 0;if(!n)throw new Error(`Cannot mutate cache item with key ${e}: item not found`);const i=typeof t=="function"?t(n==null?void 0:n.value):t;return k(this,cn).next(el.mutate(e,i,n)),()=>k(this,cn).next(el.set(e,n))}trim(e){k(this,cn).next(el.trim(e))}reset(){k(this,cn).reset()}complete(){k(this,cn).complete()}}cn=new WeakMap;var i4,o4;class ij extends Fn{constructor(t,n,i){super();Le(this,"key");Le(this,"args");Le(this,"options");Ie(this,i4,Date.now());Ie(this,o4,am());this.key=t,this.args=n,this.options=i}get created(){return k(this,i4)}get uuid(){return k(this,o4)}processJob(t,n){return t.pipe(me(i=>{const{key:o,uuid:a,created:c}=this;return{key:o,uuid:a,created:c,status:"complete",transaction:t.transaction,complete:i.completed,value:i.value}}),jp(()=>{n==null||n.debug("QueryTask complete",{uuid:this.uuid,key:this.key,job:{status:t.status,transaction:t.transaction}}),t.complete()})).subscribe(this)}}i4=new WeakMap,o4=new WeakMap;const oj=(r=0)=>e=>(e.updated??0)+r>Date.now(),aj=(r="switch")=>typeof r=="function"?r:(()=>{switch(r){case"concat":return nz;case"merge":return iz;case"switch":return oz;default:throw new Error(`Invalid queue operator: ${r}`)}})();var yl,ec,bo,hf,os,tc,ff,Vm,Pn;class yi{constructor(e){Ie(this,yl,new Qn);Ie(this,ec);Ie(this,bo);Ie(this,hf,new Fn);Ie(this,os,{});Ie(this,tc);Ie(this,ff);Ie(this,Vm,am());Ie(this,Pn);Be(this,Pn,e.logger??new c2("Query",k(this,Vm))),Be(this,tc,n=>Nw(e.key(n),k(this,Vm))),Be(this,ff,(e==null?void 0:e.validate)??oj(e==null?void 0:e.expire)),e.client instanceof Ik?Be(this,ec,e.client):(Be(this,ec,new Ik(e.client.fn,{logger:k(this,Pn).createSubLogger("Client"),...e.client.options})),k(this,yl).add(()=>k(this,ec).complete())),e.cache instanceof Rk?Be(this,bo,e.cache):(Be(this,bo,new Rk(e.cache||{})),k(this,yl).add(()=>k(this,bo).complete()));const t=aj(e.queueOperator);k(this,yl).add(()=>k(this,hf).complete()),k(this,yl).add(k(this,hf).pipe(qr(n=>k(this,Pn).debug("Task added to queue",{key:n})),Oe(n=>n in k(this,os)),t(n=>{const i=k(this,os)[n],{args:o,options:a,uuid:c}=i;if(k(this,Pn).debug("Task selected from queue",{key:n,task:i.uuid,args:o,options:a}),!(i!=null&&i.observed))return k(this,Pn).debug("Task skipped",{task:c}),delete k(this,os)[n],Tr;const d=k(this,ec).query(o,{...a,ref:i.uuid});return new It(u=>{const{transaction:h}=d;k(this,Pn).info("Task stated",{task:c,transaction:h}),u.add(()=>{k(this,Pn).debug("Task closed",{task:c,transaction:h,jobStatus:d.status}),d.complete("task closed"),delete k(this,os)[n]}),u.add(zN(10).pipe(Oe(()=>!i.observed)).subscribe(()=>{d.cancel(`task: ${i.uuid} is not observed`),u.complete()})),u.add(i.processJob(d,k(this,Pn))),d.pipe(me(p=>({result:p,task:i})),jt(()=>Tr)).subscribe(u)})}),VR(()=>!k(this,ec).closed)).subscribe(n=>{const{value:i,transaction:o}=n.result,{args:a,key:c,uuid:d}=n.task;k(this,Pn).debug("Task output added to cache",{uuid:d,args:a,key:c,transaction:o,value:i}),k(this,bo).setItem(c,{value:i,args:a,transaction:o})}))}get client(){return k(this,ec)}get cache(){return k(this,bo)}query(e,t){return this._query(e,t)}queryAsync(e,t){const{skipResolve:n,...i}=t||{},o=n?Vn:hr;return new Promise((a,c)=>{t!=null&&t.signal&&t.signal.addEventListener("abort",()=>c(new Error("Query aborted"))),o(this._query(e,i).pipe(Sw())).then(a,c)})}persistentQuery(e,t){const n=k(this,tc).call(this,e),i=this._query(e,t);return new It(o=>{var c;o.add(i.subscribe({next:o.next.bind(o),error:o.error.bind(o)}));const a=((c=t==null?void 0:t.cache)==null?void 0:c.validate)||k(this,ff);o.add(this.cache.state$.pipe(Oe(d=>n in d),me(d=>({...d[n],key:n,status:"cache",hasValidCache:a(d[n],e)}))).subscribe(o))}).pipe(Jg((o,a)=>o.transaction===a.transaction&&o.mutated===a.mutated))}generateCacheKey(e){return k(this,tc).call(this,e)}mutate(e,t,n){const i=k(this,tc).call(this,e);if(!(i in this.cache.state)){if((n==null?void 0:n.allowCreation)===void 0)throw new Error(`Cannot mutate cache item with key ${i}: item not found and option "allowCreation" is false`);if(n.allowCreation===!1)return()=>{};const{value:o}=typeof t=="function"?t():t;this.cache.setItem(i,{args:e,transaction:am(),value:o})}return k(this,bo).mutate(i,t)}invalidate(e){k(this,bo).invalidate(e&&k(this,tc).call(this,e))}complete(){k(this,yl).unsubscribe()}onInvalidate(e){const t=k(this,bo).action$.pipe(lm("cache/invalidate")).subscribe(n=>e({detail:{item:n.meta.item}}));return()=>t.unsubscribe()}onMutate(e){const t=k(this,bo).action$.pipe(lm("cache/mutate")).subscribe(n=>e({detail:{changes:n.payload,current:n.meta.item}}));return()=>t.unsubscribe()}_query(e,t){const n=k(this,tc).call(this,e),i=this._createTask(n,e,t);return k(this,Pn).debug("New query created",{key:n,args:e,options:t}),i}_createTask(e,t,n){return new It(i=>{var d,u,h;if(n!=null&&n.signal){if(n!=null&&n.signal.aborted)return k(this,Pn).debug("Abort signal already triggered by caller",{key:e}),i.complete();i.add(Sl(n==null?void 0:n.signal,"abort").subscribe(()=>{k(this,Pn).debug("Abort signal triggered by caller",{key:e}),i.complete()}))}const o=k(this,bo).getItem(e);if(o){k(this,Pn).debug("Query has cache",{key:e,cacheEntry:o});const p=((d=n==null?void 0:n.cache)==null?void 0:d.suppressInvalid)??!1,v=(((u=n==null?void 0:n.cache)==null?void 0:u.validate)||k(this,ff))(o,t),_={...o,key:e,status:"cache",hasValidCache:v};if(k(this,Pn).info("Query cache valid, completing",{hasValidCache:v,suppressInvalid:p,record:_}),i.next(_),v||p)return i.complete();k(this,Pn).debug("Query cache entry is invalid, proceeding to fetch new data",{key:e})}const a=e in k(this,os);(h=k(this,os))[e]??(h[e]=new ij(e,t,n));const c=k(this,os)[e];i.add(c.subscribe(i)),k(this,Pn).info(a?"Query connected to existing task":"Query started new task",{key:e}),a||k(this,hf).next(e)})}}yl=new WeakMap,ec=new WeakMap,bo=new WeakMap,hf=new WeakMap,os=new WeakMap,tc=new WeakMap,ff=new WeakMap,Vm=new WeakMap,Pn=new WeakMap,Le(yi,"extractQueryValue",sf);var pf,as;class sj extends It{constructor(t){super(n=>k(this,as).subscribe(n));Ie(this,pf);Ie(this,as);Be(this,pf,new yi(t)),Be(this,as,new Xf(void 0))}get currentContext(){return k(this,as).value}get currentContext$(){return k(this,as).asObservable()}get client(){return k(this,pf)}setCurrentContext(t){typeof t=="string"?this.resolveContext(t).pipe(jt(()=>Tr)).subscribe(n=>this.setCurrentContext(n)):zb(t,k(this,as).value)||k(this,as).next(t)}resolveContext(t){return k(this,pf).query({id:t}).pipe(me(n=>n.value),jt(n=>{throw n.cause?n.cause:n}))}resolveContextAsync(t,n){return(n!=null&&n.awaitResolve?hr:Vn)(this.resolveContext(t))}dispose(){k(this,as).complete()}}pf=new WeakMap,as=new WeakMap;var ss,Fm,mf,Xo,_l,bl,gf,zm,jm,rR;let cj=(rR=class{constructor(e){Ie(this,ss);Ie(this,Fm);Ie(this,mf);Ie(this,Xo);Ie(this,_l,new Qn);Ie(this,bl);Ie(this,gf);Ie(this,zm);Ie(this,jm,new Fn);var i,o;const{config:t,event:n}=e;e.parentContext&&console.warn("@deprecated","parentContext as arg is deprecated, use ContextProvider.connectParentContext"),Be(this,Xo,n),t.resolveContext&&(this.resolveContext=(i=t.resolveContext)==null?void 0:i.bind(this)),t.validateContext&&(this.validateContext=(o=t.validateContext)==null?void 0:o.bind(this)),t.extractContextIdFromPath&&(this.extractContextIdFromPath=t.extractContextIdFromPath),t.generatePathFromContext&&(this.generatePathFromContext=t.generatePathFromContext),Be(this,bl,t.contextType),Be(this,gf,t.contextFilter),Be(this,ss,new sj(t.client.get)),Be(this,Fm,new yi(t.client.query)),t.client.related&&Be(this,mf,new yi(t.client.related)),Be(this,zm,t.contextParameterFn??(a=>({search:a.search,filter:{type:a.type}}))),k(this,Xo)&&(k(this,_l).add(this.currentContext$.pipe(ev()).subscribe(([a,c])=>{var d;(d=k(this,Xo))==null||d.dispatchEvent("onCurrentContextChanged",{source:this,canBubble:!0,detail:{previous:a,next:c}})})),k(this,_l).add(k(this,Xo).addEventListener("onCurrentContextChanged",a=>{a.source!==this&&a.detail.next!==void 0&&this.setCurrentContext(a.detail.next)}))),k(this,_l).add(k(this,jm).pipe(Qt(a=>a),qr(a=>console.debug("ContextProvider::#contextQueue",a))).subscribe(a=>{k(this,ss).setCurrentContext(a??null)}))}get contextClient(){return k(this,ss)}get queryClient(){return k(this,Fm)}get currentContext$(){return k(this,ss).currentContext$}get currentContext(){return k(this,ss).currentContext}set currentContext(e){if(console.warn("@deprecated","ContextProvider.currentContext","use setCurrentContextById|setCurrentContext|clearCurrentContext"),e===void 0)throw Error("not allowed to set current context as undefined undefined!");this.setCurrentContextAsync(e)}connectParentContext(e,t){const i=e.currentContext$.pipe(Oe(o=>o!==void 0),Oe((o,a)=>{var c;return t!=null&&t.skipFirst&&a<=1?(console.debug("ContextProvider::connectParentContext","skipping first item",o),!1):((c=this.currentContext)==null?void 0:c.id)!==(o==null?void 0:o.id)}),Qt(async o=>{var c;if(!o)return{next:o};const a=await((c=k(this,Xo))==null?void 0:c.dispatchEvent("onParentContextChanged",{source:this,detail:o,cancelable:!0}));return{next:o,canceled:a==null?void 0:a.canceled}}),Oe(o=>!o.canceled),Qt(({next:o})=>this.setCurrentContext(o,{validate:!0,resolve:!0}).pipe(jt(a=>(console.warn("ContextProvider::onParentContextChanged","setCurrentContext",a),Tr)))),jt(o=>(console.warn("ContextProvider::onParentContextChanged","unhandled exception",o),Tr))).subscribe();return k(this,_l).add(i),i}setCurrentContextById(e){return new It(t=>{try{k(this,ss).resolveContext(e).pipe(Oe(n=>!!n),Qt(n=>this.setCurrentContext(n))).subscribe(t)}catch(n){t.error(n)}})}setCurrentContextByIdAsync(e){return hr(this.setCurrentContextById(e))}setCurrentContext(e,t){const n=new Fn,i=new Fn,o=this._setCurrentContext(e,t).pipe(qr(a=>i.next(a)),Al(n),jp(()=>i.complete()),jt(a=>(i.error(a),Tr)));return k(this,jm).next(o),i.pipe(jp(()=>n.next(!0)))}_setCurrentContext(e,t){return new It(n=>{var i;if(e===this.currentContext)return n.next(e),n.complete();if(e&&(t!=null&&t.validate)&&!this.validateContext(e)){if(!t.resolve)return(i=k(this,Xo))==null||i.dispatchEvent("onSetContextValidationFailed",{source:this,detail:{context:e}}),n.error(Error("failed to validate provided context"));if(t.resolve)return Pt(e).pipe(Qt(async o=>{var c;const a=await((c=k(this,Xo))==null?void 0:c.dispatchEvent("onSetContextResolve",{source:this,cancelable:!0,detail:{context:o}}));if(a!=null&&a.canceled)throw Error("resolving of context was canceled");return o}),Qt(o=>this.resolveContext(o).pipe(me(a=>({context:o,resolved:a})))),Qt(async({context:o,resolved:a})=>{var d;const c=await((d=k(this,Xo))==null?void 0:d.dispatchEvent("onSetContextResolved",{source:this,cancelable:!0,detail:{context:o,resolved:a}}));if(c!=null&&c.canceled)throw Error("resolving of context was canceled");return a}),Qt(o=>this._setCurrentContext(o))).subscribe(n)}return Pt(e).pipe(Qt(async o=>{var c;const a=await((c=k(this,Xo))==null?void 0:c.dispatchEvent("onCurrentContextChange",{source:this,canBubble:!0,cancelable:!0,detail:{context:o}}));if(a!=null&&a.canceled)throw Error("change of context was aborted");return o})).subscribe(o=>{n.next(o),n.complete()})})}async setCurrentContextAsync(e,t){return hr(this.setCurrentContext(e,t))}queryContext(e){const t=this.queryClient.query(k(this,zm).call(this,{search:e,type:k(this,bl)})).pipe(jt(n=>{throw n.name==="QueryClientError"?n.cause:n}),me(n=>n.value));return k(this,gf)?t.pipe(me(k(this,gf))):t}queryContextAsync(e){return hr(this.queryContext(e))}validateContext(e){return k(this,bl)?k(this,bl).map(t=>t.toLowerCase()).includes(e.type.id.toLowerCase()):!0}resolveContext(e){return this.relatedContexts({item:e,filter:{type:k(this,bl)}}).pipe(me(t=>t.filter(n=>this.validateContext(n))),me(t=>{const n=t.shift();if(!n)throw Error("failed to resolve context");return t.length&&console.warn("ContextProvider::relatedContext","multiple items found 🤣",t),n}))}resolveContextAsync(e){return hr(this.resolveContext(e))}relatedContexts(e){return k(this,mf)?k(this,mf).query(e).pipe(me(({value:t})=>t),jt(t=>{throw t.cause?t.cause:t})):MR(()=>Error("ContextProvider::relatedContexts - no client defined for resolving related context"))}relatedContextsAsync(e){return hr(this.relatedContexts(e))}clearCurrentContext(){this.setCurrentContext(null)}dispose(){k(this,_l).unsubscribe(),k(this,ss).dispose()}},ss=new WeakMap,Fm=new WeakMap,mf=new WeakMap,Xo=new WeakMap,_l=new WeakMap,bl=new WeakMap,gf=new WeakMap,zm=new WeakMap,jm=new WeakMap,rR);const lj="context",dj={name:lj,configure:()=>new ez,initialize:async function(r){var a;const e=await r.config.createConfig(r),t=r.hasModule("event")?await r.requireInstance("event"):void 0,n=(a=r.ref)==null?void 0:a.context,i=new cj({config:e,event:t,parentContext:n}),o=new Qn(()=>i.dispose());return this.postInitialize=c=>new It(d=>{const u=e.resolveInitialContext?at(e.resolveInitialContext(c)).pipe(Oe(h=>!!h),Qt(h=>c.modules.context.setCurrentContext(h,{validate:!0,resolve:!0}))):Tr;d.add(u.pipe(jt(h=>(console.warn("ContextModule.postInitialize","failed to resolve initial context",h),Tr))).subscribe({next:h=>{console.debug("ContextModule.postInitialize",`initial context was resolved to [${h?h.id:"none"}]`,h)},complete:()=>{e.connectParentContext!==!1&&n&&i.connectParentContext(n),d.complete()}}))}),this.dispose=()=>o.unsubscribe(),i}},uj=j.object({key:j.string().describe("The key used to identify the service"),uri:j.string().describe("The URI of the service"),id:j.string().optional().describe("The ID of the service"),environment:j.string().optional().describe("The environment of the service"),name:j.string().optional().describe("The name of the service"),scopes:j.array(j.string()).optional().default([]).describe("Endpoint authentication scopes"),tags:j.array(j.string()).optional().describe("Tags for the service")}).describe("A service from the service discovery API").transform(r=>({...r,get defaultScopes(){return r.scopes??[]}})),hj=j.array(uj).describe("A list of services from the service discovery API"),fj="services",pj=r=>at(If(r)).pipe(me(e=>hj.default([]).parse(e)));var Um;class mj{constructor({http:e,endpoint:t}){Ie(this,Um);Le(this,"endpoint");Le(this,"http");this.http=e,this.endpoint=t,Be(this,Um,new yi({client:{fn:()=>e.fetch$(t??"",{selector:pj})},key:()=>fj,expire:5*60*1e3}))}resolveServices(e){return(e?Vn:hr)(yi.extractQueryValue(k(this,Um).query()))}async resolveService(e,t){const i=(await this.resolveServices(t)).find(o=>o.key===e);if(!i)throw Error(`Failed to resolve service, invalid key [${e}]`);return i}}Um=new WeakMap;class gj extends t2{async _createConfig(e,t){if(!e.hasModule("http"))throw new Error("http module is required");return this._has("discoveryClient")||(await e.requireInstance("http")).hasClient("service_discovery")&&this.configureServiceDiscoveryClientByClientKey("service_discovery"),hr(at(super._createConfig(e,t)))}_processConfig(e,t){if(!e.discoveryClient)throw new Error("discoveryClient is required, please configure it");return super._processConfig(e,t)}setServiceDiscoveryClient(e){this._set("discoveryClient",typeof e=="function"?e:async()=>e)}configureServiceDiscoveryClient(e){this.setServiceDiscoveryClient(async t=>{const{httpClient:n,endpoint:i}=await hr(at(e(t)))??{};if(n)return new mj({http:n,endpoint:i});throw Error("httpClient is required")})}configureServiceDiscoveryClientByClientKey(e,t){this.configureServiceDiscoveryClient(async({requireInstance:n})=>({httpClient:(await n("http")).createClient(e),endpoint:t}))}}class vj{constructor(e,t){Le(this,"config");Le(this,"_http");this.config=e,this._http=t}resolveServices(){return this.config.discoveryClient.resolveServices()}async resolveService(e){return this.config.discoveryClient.resolveService(e)}async createClient(e,t){const n=await this.resolveService(e);if(!n)throw Error(`Could not load configuration of service [${e}]`);return this._http.createClient({...t,baseUri:n.uri,defaultScopes:n.scopes})}async configureClient(e,t){const{key:n,alias:i}=typeof e=="string"?{key:e,alias:e}:e,{uri:o,scopes:a}=await this.resolveService(n);t.addConfig(iP(i,{baseUri:o,defaultScopes:a}))}}const yj="serviceDiscovery",_j={name:yj,configure:()=>new gj,initialize:async r=>{var o;const{requireInstance:e,ref:t}=r,n=await r.config.createConfigAsync(r,{...(o=t==null?void 0:t.serviceDiscovery)==null?void 0:o.config}),i=await e("http");return new vj(n,i)}};class bj{}var xc;(function(r){r.v1="1.0",r.v2="2.0"})(xc||(xc={}));class Po extends Error{constructor(t,n){super(`unsupported version ${t}`,{cause:n});Le(this,"version");this.version=t}}const wj=(r,e)=>{const t=xc[r]??r;switch(t){case xc.v2:throw new Po(r);default:{const{id:n}=e,i=new URLSearchParams;return i.append("api-version",t),`/contexts/${n}/?${String(i)}`}}},xj=(r,e,t)=>[wj(r,e),t],Cj=(r,e,t="json")=>(n,i)=>r[t](...xj(e,n,i));var kj=["eq","ne","gt","ge","lt","le"],q0=["and","or","not"],Ej=["any","all"],Sj=["startswith","endswith","contains","matchespattern"],Aj=["expand","levels","select","skip","top","count","orderby","filter"],Pk=/\((.*)\)/,Mk=/(?!indexof)\((\w+)\)/,$k;(function(r){r.sum="sum",r.min="min",r.max="max",r.average="average",r.countdistinct="countdistinct"})($k||($k={}));var Bs="";function AP(r){var e=r===void 0?{}:r,t=e.select,n=e.search,i=e.skiptoken,o=e.format,a=e.top,c=e.skip,d=e.filter,u=e.transform,h=e.orderBy,p=e.key,m=e.count,v=e.expand,_=e.action,b=e.func,C="",T=[],A={};if(p!=null&&(C+="(".concat(hs(p,T),")")),(d||typeof m=="object")&&(A.$filter=um(typeof m=="object"?m:d,T)),u&&(A.$apply=TP(u)),v&&(A.$expand=Pg(v)),h&&(A.$orderby=Ww(h)),m&&(typeof m=="boolean"?A.$count=!0:C+="/$count"),typeof a=="number"&&(A.$top=a),typeof c=="number"&&(A.$skip=c),_&&(C+="/".concat(_)),b){if(typeof b=="string")C+="/".concat(b);else if(typeof b=="object"){var I=Object.keys(b)[0],O=hs(b[I],T);C+="/".concat(I),O!==""&&(C+="(".concat(O,")"))}}return T.length>0&&Object.assign(A,T.reduce(function(B,z){var R;return Object.assign(B,(R={},R["@".concat(z.name)]=hs(z.value),R))},{})),Mj(C,Cn({$select:t,$search:n,$skiptoken:i,$format:o},A))}function K3(r,e,t){return t===void 0&&(t=[]),"".concat(r," eq ").concat(hs(e,t))}function um(r,e,t){return r===void 0&&(r={}),e===void 0&&(e=[]),t===void 0&&(t=""),(Array.isArray(r)?r:[r]).reduce(function(o,a){if(a){var c=n(a,e,t);c&&o.push(c)}return o},[]).join(" and ");function n(o,a,c){o===void 0&&(o={}),a===void 0&&(a=[]),c===void 0&&(c="");var d="";if(typeof o=="string")d=o;else if(o&&typeof o=="object"){var u=Object.keys(o).reduce(function(h,p){var m=o[p];if(m===void 0)return h;var v="";if(c?p===Bs?v=c:Mk.test(p)?v=p.replace(Mk,function(A,I){return I.trim()===Bs?"(".concat(c,")"):"(".concat(c,"/").concat(I.trim(),")")}):Pk.test(p)?v=p.replace(Pk,function(A,I){return I.trim()===Bs?"(".concat(c,")"):"(".concat(c,"/").concat(I.trim(),")")}):v="".concat(c,"/").concat(p):v=p,p===Bs&&Array.isArray(m))return h.concat(m.map(function(A){return K3(v,A)}));if(["number","string","boolean"].indexOf(typeof m)!==-1||m instanceof Date||m===null)h.push(K3(v,m,a));else if(Array.isArray(m)){var _=p,b=m.map(function(A){return um(A,a,c)}).filter(function(A){return A}).map(function(A){return q0.indexOf(_)!==-1?"(".concat(A,")"):A});b.length&&(q0.indexOf(_)!==-1?b.length&&(_==="not"?h.push(Ok(b)):h.push("(".concat(b.join(" ".concat(_," ")),")"))):h.push(b.join(" ".concat(_," "))))}else if(q0.indexOf(v)!==-1){var C=v,b=Object.keys(m).map(function(I){var O;return n((O={},O[I]=m[I],O))});b.length&&(C==="not"?h.push(Ok(b)):h.push("(".concat(b.join(" ".concat(C," ")),")")))}else if(typeof m=="object")if("type"in m)h.push(K3(v,m,a));else{var T=Object.keys(m);T.forEach(function(A){var I;if(m[A]!==void 0)if(kj.indexOf(A)!==-1)h.push("".concat(v," ").concat(A," ").concat(hs(m[A],a)));else if(q0.indexOf(A)!==-1)Array.isArray(m[A])?h.push(m[A].map(function(R){return"("+n(R,a,v)+")"}).join(" ".concat(A," "))):h.push("("+n(m[A],a,v)+")");else if(Ej.indexOf(A)!==-1){var O=i(p.toLowerCase(),m[A],A,v);O&&h.push(O)}else if(A==="has")h.push("".concat(v," ").concat(A," ").concat(hs(m[A],a)));else if(A==="in"){var B=Array.isArray(m[A])?m[A]:m[A].value.map(function(R){return{type:m[A].type,value:R}});h.push(v+" in ("+B.map(function(R){return hs(R,a)}).join(",")+")")}else if(Sj.indexOf(A)!==-1)h.push("".concat(A,"(").concat(v,",").concat(hs(m[A],a),")"));else{var z=n((I={},I[A]=m[A],I),a,v);z&&h.push(z)}})}else throw new Error("Unexpected value type: ".concat(m));return h},[]);d=u.join(" and ")}return d}function i(o,a,c,d){var u="";if(typeof a=="string"||a instanceof String)u=Tj(o,a,c,d);else if(a){var h=Array.isArray(a)?a.reduce(function(m,v){return v.hasOwnProperty(Bs)?(m.hasOwnProperty(Bs)||(m[Bs]=[]),m[Bs].push(v[Bs]),m):Cn(Cn({},m),v)},{}):a,p=n(h,e,o);u="".concat(d,"/").concat(c,"(").concat(p?"".concat(o,":").concat(p):"",")")}return u}}function Tj(r,e,t,n){var i="",o=t=="all"?"ne":"eq";return i="".concat(n,"/").concat(t,"(").concat(r,": ").concat(r," ").concat(o," '").concat(e,"')"),i}function Ij(r){return r=r.replace(/%/g,"%25"),r=r.replace(/\+/g,"%2B"),r=r.replace(/\//g,"%2F"),r=r.replace(/\?/g,"%3F"),r=r.replace(/#/g,"%23"),r=r.replace(/&/g,"%26"),r=r.replace(/'/g,"''"),r}function hs(r,e){if(typeof r=="string")return"'".concat(Ij(r),"'");if(r instanceof Date)return r.toISOString();if(typeof r=="number")return r;if(Array.isArray(r))return"[".concat(r.map(function(t){return hs(t)}).join(","),"]");if(r===null)return r;if(typeof r=="object")switch(r.type){case"raw":case"guid":return r.value;case"duration":return"duration'".concat(r.value,"'");case"binary":return"binary'".concat(r.value,"'");case"alias":return Array.isArray(e)&&e.push(r),"@".concat(r.name);case"json":return escape(JSON.stringify(r.value));case"decimal":return"".concat(r.value,"M");default:return Object.entries(r).filter(function(t){var n=t[1];return n!==void 0}).map(function(t){var n=t[0],i=t[1];return"".concat(n,"=").concat(hs(i,e))}).join(",")}return r}function Pg(r){if(typeof r=="number")return r;if(typeof r=="string")return r.indexOf("/")===-1?r:r.split("/").reverse().reduce(function(t,n,i,o){return i===0?"$expand=".concat(n):i===o.length-1?"".concat(n,"(").concat(t,")"):"$expand=".concat(n,"(").concat(t,")")},"");if(Array.isArray(r))return"".concat(r.map(function(t){return Pg(t)}).join(","));if(typeof r=="object"){var e=Object.keys(r);return e.some(function(t){return Aj.indexOf(t.toLowerCase())!==-1})?e.map(function(t){var n;switch(t){case"filter":n=um(r[t]);break;case"orderBy":n=Ww(r[t]);break;case"levels":case"count":case"skip":case"top":n="".concat(r[t]);break;default:n=Pg(r[t])}return"$".concat(t.toLowerCase(),"=").concat(n)}).join(";"):e.map(function(t){var n=Pg(r[t]);return n?"".concat(t,"(").concat(n,")"):t}).join(",")}return""}function TP(r){var e=Array.isArray(r)?r:[r],t=e.reduce(function(n,i){var o=i.aggregate,a=i.filter,c=i.groupBy,d=fR(i,["aggregate","filter","groupBy"]),u=Object.keys(d);if(u.length)throw new Error("Unsupported transform(s): ".concat(u));if(o&&n.push("aggregate(".concat(Rj(o),")")),a){var h=um(a);h&&n.push("filter(".concat(um(h),")"))}return c&&n.push("groupby(".concat(Pj(c),")")),n},[]);return t.join("/")||void 0}function Rj(r){var e=Array.isArray(r)?r:[r];return e.map(function(t){return typeof t=="string"?t:Object.keys(t).map(function(n){var i=t[n];if(!i.with&&i.as)return"".concat(n," as ").concat(i.as);if(!i.with)throw new Error("'with' property required for '".concat(n,"'"));if(!i.as)throw new Error("'as' property required for '".concat(n,"'"));return"".concat(n," with ").concat(i.with," as ").concat(i.as)})}).join(",")}function Pj(r){if(!r.properties)throw new Error("'properties' property required for groupBy");var e="(".concat(r.properties.join(","),")");return r.transform&&(e+=",".concat(TP(r.transform))),e}function Ww(r,e){return e===void 0&&(e=""),Array.isArray(r)?r.map(function(t){return Array.isArray(t)&&t.length===2&&["asc","desc"].indexOf(t[1])!==-1?t.join(" "):t}).map(function(t){return"".concat(e).concat(String(t))}).join(","):typeof r=="object"?Object.entries(r).map(function(t){var n=t[0],i=t[1];return Ww(i,"".concat(n,"/"))}).map(function(t){return"".concat(e).concat(t)}).join(","):"".concat(e).concat(String(r))}function Mj(r,e){var t=Object.getOwnPropertyNames(e).filter(function(n){return e[n]!==void 0&&e[n]!==""}).map(function(n){return"".concat(n,"=").concat(e[n])});return t.length?"".concat(r,"?").concat(t.join("&")):r}function Ok(r){return"not (".concat(r.join(" and "),")")}function $j(r){return Object.keys(r).reduce((e,t)=>{var n;switch(t){case"type":(n=r[t])!=null&&n.length&&(e[t]={in:r[t]});break;default:e[t]=r[t];break}return e},{})}function Oj(r){return Object.entries(r).filter(([e,t])=>!!t).reduce((e,[t,n])=>{switch(t){case"filter":e[t]=$j(n);break;default:e[t]=r[t];break}return e},{})}function Zj(r){return typeof r=="string"?r:AP(Oj(r))}const Lj=(r,e)=>{const t=xc[r]??r;switch(t){case xc.v2:throw new Po(r);default:{const{query:n,includeDeleted:i}=e,o=new URLSearchParams(Zj(n));return o.append("api-version",t),i&&o.append("includeDeleted","true"),`/contexts/?${String(o)}`}}},Hj=(r,e,t)=>[Lj(r,e),t],Nj=(r,e,t="json")=>(n,i)=>r[t](...Hj(e,n,i));function Dj(r){return Object.keys(r).reduce((e,t)=>{var n;switch(t){case"type":(n=r[t])!=null&&n.length&&(e[t]={in:r[t]});break;default:e[t]=r[t];break}return e},{})}function Vj(r){return Object.entries(r).filter(([e,t])=>!!t).reduce((e,[t,n])=>{switch(t){case"filter":e[t]=Dj(n);break;default:e[t]=r[t];break}return e},{})}function Fj(r){return typeof r=="string"?r:AP(Vj(r))}const zj=(r,e)=>{const t=xc[r]??r;switch(t){case xc.v2:throw new Po(r);default:{const{id:n,query:i}=e,o=new URLSearchParams(Fj(i||""));return o.append("api-version",t),`/contexts/${n}/relations?${String(o)}`}}},jj=(r,e,t)=>[zj(r,e),t],Uj=(r,e,t="json")=>(n,i)=>r[t](...jj(e,n,i));class Bj{constructor(e,t){Le(this,"_client");Le(this,"_method");this._client=e,this._method=t}get Version(){return xc}get(e,...t){return Cj(this._client,e,this._method)(...t)}query(e,...t){return Nj(this._client,e,this._method)(...t)}related(e,...t){return Uj(this._client,e,this._method)(...t)}}const Ac=(r,e)=>{if(e in r)return r[e];const t=Object.values(r).find(n=>n===e);if(!t)throw new Error(`Version ${e} is not supported`);return t},l2=r=>async e=>r.parse(await If(e));var Ze;(function(r){r.v1="1.0",r.v2="2.0"})(Ze||(Ze={}));const Zk=j.string().datetime({offset:!0}).transform(r=>new Date(r)),Yb={[Ze.v1]:j.object({azureUniqueId:j.string(),name:j.string(),mail:j.string().optional(),phoneNumber:j.string().optional(),jobTitle:j.string().optional(),accountType:j.enum(["Employee","Consultant","External","Application","Local"]).optional(),accountClassification:j.enum(["Unclassified","Internal","External"]).nullish()})},y4={[Ze.v1]:j.object({identifier:j.string(),name:j.string().nullish(),subSystem:j.string().nullish()})},qj={[Ze.v1]:j.object({id:j.string(),name:j.string().nullish(),type:j.string().nullish()})},Lf={get[Ze.v1](){return j.object({id:j.string(),name:j.string(),appKey:j.string(),description:j.string().optional(),isShared:j.boolean().optional(),context:qj[Ze.v1].optional(),createdBy:Yb[Ze.v1],updatedBy:Yb[Ze.v1].optional(),created:Zk,updated:Zk.optional(),sourceSystem:y4[Ze.v1].nullish()})},get[Ze.v2](){return this[Ze.v1]}},Yw={get[Ze.v1](){return j.record(j.unknown()).or(j.string()).optional().default("").transform(r=>{try{return typeof r=="string"?JSON.parse(r):r}catch{return r}})}},IP=r=>Object.entries(r).map(([e,t])=>{if(t===null)return`${e} eq null`;if(typeof t=="string")return`${e} eq '${t}'`;if(typeof t=="boolean")return`${e} eq ${t}`;if(typeof t=="object")return Object.entries(t).map(([n,i])=>`${e}.${n} eq '${i}'`).join(" and ")}).filter(e=>!!e).join(" and "),Kj=j.object({appKey:j.string().optional(),contextId:j.string().optional(),sourceSystem:y4[Ze.v1].partial().optional()}).transform(IP),Gj=j.object({appKey:j.string().optional(),contextId:j.string().optional(),sourceSystem:y4[Ze.v1].partial().optional(),isFavourite:j.boolean().optional()}).transform(IP),Wj={[Ze.v1]:j.object({filter:j.string().or(Kj).optional()}).optional(),[Ze.v2]:j.object({filter:j.string().or(Gj).optional()}).optional()},Yj={[Ze.v1]:j.array(Lf[Ze.v1]),[Ze.v2]:j.array(Lf[Ze.v2])},Qj=(r,e,t)=>{switch(r){case Ze.v1:case Ze.v2:{const n={selector:l2(Yj[r])};return Object.assign({},n,t)}}throw Error(`Unknown API version: ${r}`)},Xj=(r,e)=>{switch(r){case Ze.v1:case Ze.v2:{const t=new URLSearchParams;return t.append("api-version",r),e!=null&&e.filter&&t.append("$filter",e.filter),`/persons/me/bookmarks/?${String(t)}`}}throw Error(`Unknown API version: ${r}`)},Jj=(r,e,t="json")=>{const n=Ac(Ze,r);return(i,o)=>{const a=Wj[n].parse(i),c=Xj(n,a),d=Qj(n,a,o);return e[t](c,d)}},eU={[Ze.v1]:j.object({bookmarkId:j.string()}),[Ze.v2]:j.object({bookmarkId:j.string()})},tU={[Ze.v1]:Lf[Ze.v1],[Ze.v2]:Lf[Ze.v2]},rU=(r,e,t)=>{switch(r){case Ze.v1:case Ze.v2:{const n={selector:l2(tU[r])};return Object.assign({},n,t)}}throw Error(`Unknown API version: ${r}`)},nU=(r,e)=>{switch(r){case Ze.v1:case Ze.v2:{const t=new URLSearchParams;return t.append("api-version",r),`/bookmarks/${e.bookmarkId}?${String(t)}`}}throw Error(`Unknown API version: ${r}`)},iU=(r,e,t="json")=>{const n=Ac(Ze,r);return(i,o)=>{const a=eU[n].parse(i);return e[t](nU(n,a),rU(n,a,o))}},oU={[Ze.v1]:j.object({name:j.string(),appKey:j.string(),payload:j.record(j.unknown()).or(j.string()).optional(),description:j.string().nullish(),isShared:j.boolean().nullish(),contextId:j.string().nullish(),sourceSystem:y4[Ze.v1].nullish()})},aU={[Ze.v1]:Lf[Ze.v1].and(j.object({payload:Yw[Ze.v1].optional()}))},sU=(r,e,t)=>{switch(r){case Ze.v1:{const n={method:"POST",selector:l2(aU[r]),body:e};return Object.assign({},n,t)}}throw Error(`Unknown API version: ${r}`)},cU=(r,e)=>{switch(r){case Ze.v1:{const t=new URLSearchParams;return t.append("api-version",r),`/bookmarks?${String(t)}`}}throw Error(`Unknown API version: ${r}`)},lU=(r,e,t="json")=>{const n=Ac(Ze,r);return(i,o)=>{const a=oU[n].parse(i);return e[t](cU(n),sU(n,a,o))}},dU={[Ze.v1]:j.object({bookmarkId:j.string(),updates:j.object({name:j.string().nullish(),description:j.string().nullish(),isShared:j.boolean().nullish(),payload:j.record(j.unknown()).or(j.string()).nullish().transform(r=>typeof r=="object"?JSON.stringify(r):r),sourceSystem:j.object({identifier:j.string().nullish(),name:j.string().nullish(),subSystem:j.string().nullish()}).nullish()})})},uU={[Ze.v1]:Lf[Ze.v1].and(j.object({payload:Yw[Ze.v1].optional()}))},hU=(r,e,t)=>{switch(r){case Ze.v1:{const n={method:"PATCH",selector:l2(uU[r]),body:e.updates};return Object.assign({},n,t)}}throw Error(`Unknown API version: ${r}`)},fU=(r,e)=>{switch(r){case Ze.v1:{const t=new URLSearchParams;return t.append("api-version",r),`/bookmarks/${e.bookmarkId}?${String(t)}`}}throw Error(`Unknown API version: ${r}`)},pU=(r,e,t="json")=>{const n=Ac(Ze,r);return(i,o)=>{const a=dU[n].parse(i);return e[t](fU(n,a),hU(n,a,o))}},mU={[Ze.v1]:j.object({bookmarkId:j.string()})},gU={[Ze.v1]:j.object({id:j.string(),payload:Yw[Ze.v1]})},vU=(r,e,t)=>{switch(r){case Ze.v1:{const n={method:"GET",selector:l2(gU[r])};return Object.assign({},n,t)}}throw Error(`Unknown API version: ${r}`)},yU=(r,e)=>{switch(r){case Ze.v1:{const t=new URLSearchParams;return t.append("api-version",r),`/bookmarks/${e.bookmarkId}/apply?${String(t)}`}}throw Error(`Unknown API version: ${r}`)},_U=(r,e,t="json")=>{const n=Ac(Ze,r);return(i,o)=>{const a=mU[n].parse(i);return e[t](yU(n,a),vU(n,a,o))}},Qw=async r=>{if(r.ok)return!0;const e=`Failed to execute request. Status code: ${r.status}`;let t,n;switch(r.status){case 403:case 404:try{n=await r.json()}catch(i){t=i}}throw new nf(e,r,{cause:t,data:n})},bU=async r=>{if(r.ok)return!0;if(r.status===404)return!1;throw new Tl(`Failed to execute request. Status code: ${r.status}`,r)},wU={[Ze.v1]:j.object({bookmarkId:j.string()})};Ze.v1+"",j.boolean();const xU=(r,e,t)=>{switch(r){case Ze.v1:return Object.assign({},{method:"POST",selector:Qw,body:e},t)}throw Error(`Unknown API version: ${r}`)},CU=(r,e)=>{switch(r){case Ze.v1:{const t=new URLSearchParams;return t.append("api-version",r),`/persons/me/bookmarks/favourites?${String(t)}`}}throw Error(`Unknown API version: ${r}`)},kU=(r,e,t="json")=>{const n=Ac(Ze,r);return(i,o)=>{const a=wU[n].parse(i);return e[t](CU(n),xU(n,a,o))}},EU={[Ze.v1]:j.object({bookmarkId:j.string()})};Ze.v1+"",j.boolean();const SU=(r,e,t)=>{switch(r){case Ze.v1:return Object.assign({},{method:"DELETE",selector:Qw},t)}throw Error(`Unknown API version: ${r}`)},AU=(r,e)=>{switch(r){case Ze.v1:{const t=new URLSearchParams;return t.append("api-version",r),`/bookmarks/${e.bookmarkId}?${String(t)}`}}throw Error(`Unknown API version: ${r}`)},TU=(r,e,t="json")=>{const n=Ac(Ze,r);return(i,o)=>{const a=EU[n].parse(i);return e[t](AU(n,a),SU(n,a,o))}},IU={[Ze.v1]:j.object({bookmarkId:j.string()})};Ze.v1+"",j.boolean();const RU=(r,e,t)=>{switch(r){case Ze.v1:return Object.assign({},{method:"HEAD",selector:bU},t)}throw Error(`Unknown API version: ${r}`)},PU=(r,e)=>{switch(r){case Ze.v1:{const t=new URLSearchParams;return t.append("api-version",r),`/persons/me/bookmarks/favourites/${e.bookmarkId}?${String(t)}`}}throw Error(`Unknown API version: ${r}`)},MU=(r,e,t="json")=>{const n=Ac(Ze,r);return(i,o)=>{const a=IU[n].parse(i);return e[t](PU(n,a),RU(n,a,o))}},$U={[Ze.v1]:j.object({bookmarkId:j.string()})};Ze.v1+"",j.boolean();const OU=(r,e,t)=>{switch(r){case Ze.v1:return Object.assign({},{method:"DELETE",selector:Qw},t)}throw Error(`Unknown API version: ${r}`)},ZU=(r,e)=>{switch(r){case Ze.v1:{const t=new URLSearchParams;return t.append("api-version",r),`/persons/me/bookmarks/favourites/${e.bookmarkId}?${String(t)}`}}throw Error(`Unknown API version: ${r}`)},LU=(r,e,t="json")=>{const n=Ac(Ze,r);return(i,o)=>{const a=$U[n].parse(i);return e[t](ZU(n,a),OU(n,a,o))}};class HU{constructor(e,t){Le(this,"_client");Le(this,"_method");this._client=e,this._method=t}get(e,t,n){return iU(e,this._client,this._method)(t,n)}getPayload(e,t,n){return _U(e,this._client,this._method)(t,n)}query(e,t,n){return Jj(e,this._client,this._method)(t,n)}patch(e,t,n){return pU(e,this._client,this._method)(t,n)}create(e,t,n){return lU(e,this._client,this._method)(t,n)}delete(e,t,n){return TU(e,this._client,this._method)(t,n)}isFavorite(e,t,n){return MU(e,this._client,this._method)(t,n)}addFavourite(e,t,n){return kU(e,this._client,this._method)(t,n)}removeFavourite(e,t,n){return LU(e,this._client,this._method)(t,n)}}const NU=(r,e)=>{const t=Yn[r]??r;switch(t){case Yn.v2:throw new Po(r);default:{const{id:n}=e,i=new URLSearchParams;return i.append("api-version",t),`/notification/${n}/?${String(i)}`}}},DU=(r,e,t)=>[NU(r,e),t],VU=(r,e,t="json")=>(n,i)=>r[t](...DU(e,n,i)),FU=(r,e)=>{const t=Yn[r]??r;switch(t){case Yn.v2:throw new Po(r);default:{const{userId:n}=e,i=new URLSearchParams;return i.append("api-version",t),`/person/${n}/notifications/?${String(i)}`}}},zU=(r,e,t)=>{const n=FU(r,e),i=new Headers;i.append("content-type","application/json");const o=Object.assign({},{method:"POST",body:JSON.stringify(e),headers:i},t);return[n,o]},jU=(r,e,t="json")=>(n,i)=>r[t](...zU(e,n,i)),UU=(r,e)=>{const t=Yn[r]??r;switch(t){case Yn.v2:throw new Po(r);default:{const{id:n}=e,i=new URLSearchParams;return i.append("api-version",t),`/notification/${n}/?${String(i)}`}}},BU=(r,e,t)=>{const n=UU(r,e),i=new Headers;i.append("content-type","application/json");const o=Object.assign({},{method:"PATCH",body:JSON.stringify(e),headers:i},t);return[n,o]},qU=(r,e,t="json")=>(n,i)=>r[t](...BU(e,n,i)),KU=(r,e)=>{const t=Yn[r]??r;switch(t){case Yn.v2:throw new Po(r);default:{const{userId:n}=e,i=new URLSearchParams;return i.append("api-version",t),`/person/${n}/notifications/?${String(i)}`}}},GU=(r,e,t)=>[KU(r,e),t],WU=(r,e,t="json")=>(n,i)=>r[t](...GU(e,n,i)),YU=(r,e)=>{const t=Yn[r]??r;switch(t){case Yn.v2:throw new Po(r);default:{const{id:n}=e,i=new URLSearchParams;return i.append("api-version",t),`/notification/${n}/?${String(i)}`}}},QU=(r,e,t)=>{const n=YU(r,e),i=new Headers;i.append("content-type","application/json");const o=Object.assign({},{method:"DELETE",headers:i},t);return[n,o]},XU=(r,e,t="json")=>(n,i)=>r[t](...QU(e,n,i));var Yn;(function(r){r.v1="1.0",r.v2="2.0"})(Yn||(Yn={}));const JU=(r,e)=>{const t=Yn[r]??r;switch(t){case Yn.v2:throw new Po(r);default:{const{userId:n}=e,i=new URLSearchParams;return i.append("api-version",t),`/person/${n}/notifications/settings/?${String(i)}`}}},eB=(r,e,t)=>{const n=JU(r,e),i=new Headers;i.append("content-type","application/json");const o=Object.assign({},{method:"PUT",body:JSON.stringify(e),headers:i},t);return[n,o]},tB=(r,e,t="json")=>(n,i)=>r[t](...eB(e,n,i)),rB=(r,e)=>{const t=Yn[r]??r;switch(t){case Yn.v2:throw new Po(r);default:{const{userId:n}=e,i=new URLSearchParams;return i.append("api-version",t),`/person/${n}/notifications/settings/?${String(i)}`}}},nB=(r,e,t)=>[rB(r,e),t],iB=(r,e,t="json")=>(n,i)=>r[t](...nB(e,n,i));class oB{constructor(e,t){Le(this,"_client");Le(this,"_method");this._client=e,this._method=t}get Version(){return Yn}getAll(e,...t){return WU(this._client,e,this._method)(...t)}getById(e,...t){return VU(this._client,e,this._method)(...t)}setSeenByUser(e,...t){return qU(this._client,e,this._method)(...t)}create(e,...t){return jU(this._client,e,this._method)(...t)}delete(e,...t){return XU(this._client,e,this._method)(...t)}getSettings(e,...t){return iB(this._client,e,this._method)(...t)}updateSettings(e,...t){return tB(this._client,e,this._method)(...t)}}var aa;(function(r){r.v2="2.0",r.v4="4.0"})(aa||(aa={}));const aB=(r,e)=>{const t=aa[r]??r;switch(t){case aa.v4:{const{azureId:n,expand:i}=e,o=new URLSearchParams;return o.append("api-version",t),i&&o.append("$expand",i.join(",")),`/persons/${n}?${String(o)}`}default:throw new Po(r)}},sB=(r,e,t)=>[aB(r,e),t],cB=(r,e,t="json")=>(n,i)=>r[t](...sB(e,n,i)),lB=(r,e)=>{const t=aa[r]??r;switch(t){case aa.v2:{const{search:n}=e,i=new URLSearchParams;return i.append("api-version",t),i.append("$search",n),`/persons?${String(i)}`}default:throw new Po(r)}},dB=(r,e,t)=>[lB(r,e),t],uB=(r,e,t="json")=>(n,i)=>r[t](...dB(e,n,i)),hB=(r,e)=>{const t=aa[r]??r;switch(t){case aa.v2:{const{azureId:n}=e,i=new URLSearchParams;return i.append("api-version",t),`/persons/${n}/photo?${String(i)}`}default:throw new Po(r)}},fB=(r,e,t)=>[hB(r,e),t],pB=(r,e,t="blob")=>(n,i)=>r[t](...fB(e,n,i));class mB{constructor(e){Le(this,"_client");this._client=e}get Version(){return aa}get(e,t,n,i){return cB(this._client,e,t)(n,i)}query(e,t,n,i){return uB(this._client,e,t)(n,i)}photo(e,t,n,i){return pB(this._client,e,t)(n,i)}}class gB extends Error{constructor(t,n,i){super(t,i);Le(this,"response");this.response=n,this.name="ApiProviderError"}}const G3=async r=>{var e;if(!r.ok){const{headers:t,status:n,statusText:i,type:o,url:a,bodyUsed:c}=r,d=(e=t.get("content-type"))==null?void 0:e.match(/application\/(\w*)?[+]?json/),u=!c&&await(d?r.json():r.text());throw new gB("failed to execute request, response was not ok",{headers:t,status:n,statusText:i,type:o,url:a,data:u})}};class vB{constructor({createClient:e}){Le(this,"_createClientFn");this._createClientFn=e}async createNotificationClient(e){const t=await this._createClientFn("notification");return t.responseHandler.add("validate_api_request",G3),new oB(t,e)}async createBookmarksClient(e){const t=await this._createClientFn("bookmarks");return new HU(t,e)}async createContextClient(e){const t=await this._createClientFn("context");return t.responseHandler.add("validate_api_request",G3),new Bj(t,e)}async createPeopleClient(){const e=await this._createClientFn("people");return e.responseHandler.add("validate_api_request",G3),new mB(e)}}const yB="services",_B=(r,e)=>async t=>{if(r.hasClient(t))return r.createClient(t);if(e)return e.createClient(t);throw Error(`failed to create http client for service ${t}`)},RP={name:yB,configure:()=>new bj,initialize:async({ref:r,config:e,requireInstance:t,hasModule:n})=>{if(!e.createClient){const i=await t("http"),o=n("serviceDiscovery")?await t("serviceDiscovery"):r==null?void 0:r.serviceDiscovery;e.createClient=_B(i,o)}if(!e.createClient)throw Error("missing configuration for creating API client");return new vB(e)}},bB=r=>{r.addConfig({module:RP})};class wB extends XN{constructor(){super([oD,ck,Pw,_j,RP,dj]),this.logger=new hR("FrameworkConfigurator")}configureHttp(...e){this.addConfig(TV(...e))}configureHttpClient(...e){this.addConfig(iP(...e))}configureMsal(e,t=!0){this.addConfig({module:ck,configure:n=>{t!==void 0&&n.setRequiresAuth(!!t),typeof e=="function"&&e(n),typeof e=="object"&&n.setClientConfig(e)}})}configureServiceDiscovery(e){this.configureHttpClient("service_discovery",e.client)}}const xB=async(r,e)=>{const t=await r.initialize(e),n={modules:t};return window.Fusion=n,t.event.dispatchEvent("onFrameworkLoaded",{detail:n}),n};var x=dw();const lr=zu(x),Xw=aR({__proto__:null,default:lr},[x]),PP=x.createContext(null),CB=PP.Provider,MP=x.createContext({}),kB=MP.Provider,$P=()=>x.useContext(MP),EB=r=>$P()[r],SB=(r,e)=>x.lazy(async()=>{const t=new wB;await r(t,e);const n=await xB(t,e);return{default:({children:i})=>E.jsx(CB,{value:n,children:E.jsx(kB,{value:n.modules,children:i})})}}),jl=()=>{let r=x.useContext(PP);return r||console.warn("could not locate fusion in context!"),r??(r=window.Fusion),r||console.error("Could not load framework, might not be initiated?"),r},Jw=r=>{const t=jl().modules[r];return t||console.warn(`the requested module [${t}] is not included in the framework instance`),t},AB=r=>{const{configure:e,fallback:t,parent:n,children:i}=r,o=$P(),a=x.useMemo(()=>SB(e,n??o),[e,o,n]);return E.jsx(x.Suspense,{fallback:t,children:E.jsx(a,{children:i})})};function Cr(){return Cr=Object.assign?Object.assign.bind():function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)({}).hasOwnProperty.call(t,n)&&(r[n]=t[n])}return r},Cr.apply(null,arguments)}function Hf(r){"@babel/helpers - typeof";return Hf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Hf(r)}function W3(r){return r&&Hf(r)==="object"&&r.constructor===Object}function OP(r,e){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{clone:!0},n=t.clone?Cr({},r):r;return W3(r)&&W3(e)&&Object.keys(e).forEach(function(i){i!=="__proto__"&&(W3(e[i])&&i in r?n[i]=OP(r[i],e[i],t):n[i]=e[i])}),n}function TB(r,e){if(Hf(r)!="object"||!r)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e);if(Hf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(r)}function IB(r){var e=TB(r,"string");return Hf(e)=="symbol"?e:e+""}var RB=typeof Symbol=="function"&&Symbol.for;const ZP=RB?Symbol.for("mui.nested"):"__THEME_NESTED__";var PB=["checked","disabled","error","focused","focusVisible","required","expanded","selected"];function MB(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=r.disableGlobal,t=e===void 0?!1:e,n=r.productionPrefix,i=n===void 0?"jss":n,o=r.seed,a=o===void 0?"":o,c=a===""?"":"".concat(a,"-"),d=0,u=function(){return d+=1,d};return function(h,p){var m=p.options.name;if(m&&m.indexOf("Mui")===0&&!p.options.link&&!t){if(PB.indexOf(h.key)!==-1)return"Mui-".concat(h.key);var v="".concat(c).concat(m,"-").concat(h.key);return!p.options.theme[ZP]||a!==""?v:"".concat(v,"-").concat(u())}return"".concat(c).concat(i).concat(u())}}var Lk=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},d2=(typeof window>"u"?"undefined":Lk(window))==="object"&&(typeof document>"u"?"undefined":Lk(document))==="object"&&document.nodeType===9;function $B(r,e){for(var t=0;t<e.length;t++){var n=e[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(r,IB(n.key),n)}}function LP(r,e,t){return e&&$B(r.prototype,e),Object.defineProperty(r,"prototype",{writable:!1}),r}function Qb(r,e){return Qb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,n){return t.__proto__=n,t},Qb(r,e)}function HP(r,e){r.prototype=Object.create(e.prototype),r.prototype.constructor=r,Qb(r,e)}function Hk(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function NP(r,e){if(r==null)return{};var t={};for(var n in r)if({}.hasOwnProperty.call(r,n)){if(e.indexOf(n)!==-1)continue;t[n]=r[n]}return t}var OB={}.constructor;function Xb(r){if(r==null||typeof r!="object")return r;if(Array.isArray(r))return r.map(Xb);if(r.constructor!==OB)return r;var e={};for(var t in r)e[t]=Xb(r[t]);return e}function e8(r,e,t){r===void 0&&(r="unnamed");var n=t.jss,i=Xb(e),o=n.plugins.onCreateRule(r,i,t);return o||(r[0],null)}var Nk=function(e,t){for(var n="",i=0;i<e.length&&e[i]!=="!important";i++)n&&(n+=t),n+=e[i];return n},pu=function(e){if(!Array.isArray(e))return e;var t="";if(Array.isArray(e[0]))for(var n=0;n<e.length&&e[n]!=="!important";n++)t&&(t+=", "),t+=Nk(e[n]," ");else t=Nk(e,", ");return e[e.length-1]==="!important"&&(t+=" !important"),t};function r1(r){return r&&r.format===!1?{linebreak:"",space:""}:{linebreak:`
81
+ `);return o!==-1&&(e=Fz(e,i,n,o)),n+e+i};Object.defineProperties(s2.prototype,Zf);const Tk=s2();s2({level:Sk?Sk.level:0});const Kz=r=>{if(typeof r!="string")throw new Error("Expected LogLevel key to be a string.");const e=r.toLowerCase(),t=Object.keys(ln).find(n=>n.toLowerCase()===e);if(!t)throw new Error(`Failed to parse LogLevel from string: ${r}.`);return ln[t]},Gz=r=>{const e=Number(r);if(Object.values(ln).includes(e))return e;if(isNaN(e))return Kz(r);throw Error(`Invalid log level: ${r}`)};var Wz={},ln;(function(r){r[r.None=0]="None",r[r.Error=1]="Error",r[r.Warning=2]="Warning",r[r.Info=3]="Info",r[r.Debug=4]="Debug"})(ln||(ln={}));const Yz=()=>{const r=Wz.FUSION_LOG_LEVEL;if(r)try{return Gz(r)}catch{return ln.Error}return ln.Error},Qz=Yz(),Xz="1.1.4";class Jz{constructor(){Le(this,"level",Qz);Le(this,"version",Xz);Le(this,"_log$",new Fn)}get log(){return this._log$.pipe(Oe(e=>this.level>=e.lvl))}debug(...e){this._log$.next({lvl:ln.Debug,msg:this._createMessage(ln.Debug,...e)})}info(...e){this._log$.next({lvl:ln.Info,msg:this._createMessage(ln.Info,...e)})}warn(...e){this._log$.next({lvl:ln.Warning,msg:this._createMessage(ln.Warning,...e)})}error(...e){this._log$.next({lvl:ln.Error,msg:this._createMessage(ln.Error,...e)})}}class c2 extends Jz{constructor(t,n){super();Le(this,"title");Le(this,"subtitle");this.title=t,this.subtitle=n,this.log.subscribe(({lvl:i,msg:o})=>{switch(i){case ln.Debug:console.debug(...o);break;case ln.Info:console.info(...o);break;case ln.Warning:console.warn(...o);break;case ln.Error:console.error(...o);break}})}_createMessage(t,...n){return[this._formatTitle(t),...n]}_formatTitle(t){const n=Tk.magenta([this.title,this.subtitle].filter(i=>!!i).join(" - "));switch(t){case ln.Warning:case ln.Error:return Tk.bold(n)}return n}createSubLogger(t,n,i){const o=new c2(`${this.title}::${t}`,n??this.subtitle);return o.level=i===void 0?this.level:i,o}}var Js,su,Dm;class ej extends It{constructor(t,n,i){super(a=>{const{transaction:c}=this,d=t.action$.pipe(Oe(u=>u.meta.transaction===c));a.add(t.state$.pipe(Oe(u=>!!u[c]),me(u=>u[c])).subscribe(u=>{k(this,Js).next(u.status)})),a.add(d.pipe(Oe(cr.execute.success.match),me(({payload:u})=>u)).subscribe(u=>{k(this,Js).next("complete"),a.next(u),a.complete()})),a.add(d.pipe(Oe(cr.error.match),me(({payload:u})=>u)).subscribe(u=>{k(this,Js).next("error"),a.error(u.error)})),a.add(d.pipe(Oe(cr.cancel.match)).subscribe(u=>{k(this,Js).next("canceled"),a.error(new Fd("abort",{message:u.payload.reason||`job: ${c} was canceled`,request:k(this,su).getRequest(u.meta.transaction)}))})),i!=null&&i.signal&&a.add(Sl(i==null?void 0:i.signal,"abort").pipe(me(()=>cr.cancel(c,`job: ${c} was aborted on signal from caller: ${i==null?void 0:i.ref}`))).subscribe(u=>t.next(u))),a.add(()=>{this.complete()})});Ie(this,Js,new Xf("idle"));Ie(this,su);Ie(this,Dm);Le(this,"created",Date.now());Be(this,su,t);const o=cr.request(n,{ref:i==null?void 0:i.ref,retry:i==null?void 0:i.retry});Be(this,Dm,o.meta.transaction),k(this,su).next(o)}get status(){return k(this,Js).value}get status$(){return k(this,Js).asObservable()}get transaction(){return k(this,Dm)}get closed(){return this.status==="complete"||this.status==="error"||this.status==="canceled"}complete(t){this.closed||this.cancel(t??`job: ${this.transaction} was completed`)}cancel(t){const n=this.transaction;k(this,su).cancel(n,t??`job: ${n} was canceled`)}[Symbol.dispose](){this.complete()}}Js=new WeakMap,su=new WeakMap,Dm=new WeakMap;var Or,vl,Ta;class Ik extends It{constructor(t,n){super(i=>k(this,Or).subscribe(i));Ie(this,Or);Ie(this,vl);Ie(this,Ta);Be(this,Or,new o2(Zz({}))),Be(this,vl,new Qn(()=>k(this,Or).complete())),k(this,vl).add(k(this,Or).addFlow(Mz)),k(this,vl).add(k(this,Or).addFlow($z(t))),k(this,vl).add(k(this,Or).addFlow(Oz(Object.assign({count:0,delay:0},n==null?void 0:n.retry)))),Be(this,Ta,(n==null?void 0:n.logger)??new c2("QueryClient")),k(this,Or).addEffect(cr.request.type,({payload:i,meta:{transaction:o}})=>{k(this,Ta).debug("Job requested",{transaction:o,payload:i})}),k(this,Or).addEffect(cr.execute.type,({payload:i,meta:{transaction:o}})=>{k(this,Ta).debug("Job executing",{transaction:o,payload:i})}),k(this,Or).addEffect(cr.execute.success.type,({payload:i})=>{k(this,Ta).info("Job complete",{...i})}),k(this,Or).addEffect(cr.execute.failure.type,({payload:i,meta:{transaction:o}})=>{k(this,Ta).debug("Job failed",{transaction:o,payload:i})}),k(this,Or).addEffect(cr.cancel.type,({payload:{reason:i},meta:{transaction:o}})=>{k(this,Ta).debug("Job canceled",{transaction:o,reason:i})}),k(this,Or).addEffect(cr.error.type,({payload:{transaction:i,error:o}})=>{k(this,Ta).error("Job error",{transaction:i,error:o})})}get closed(){return k(this,Or).closed}get state$(){return k(this,Or).asObservable()}get action$(){return k(this,Or).action$}get success$(){return this.action$.pipe(Oe(cr.execute.success.match),me(({payload:t})=>t))}get error$(){return this.action$.pipe(lm("client/error"),Up(k(this,Or)),me(([t,n])=>{const{payload:i,meta:{transaction:o}}=t,a=n[o];return new Fd("error",{request:a,message:`job: ${o} failed`,cause:i})}))}next(t){k(this,Or).next(t)}query(t,n){const i=new ej(this,t,n),o=i.pipe(Jf({connector:()=>new _R,resetOnRefCountZero:!1}));return Object.defineProperties(o,{transaction:{get:()=>i.transaction},created:{get:()=>i.created},status:{get:()=>i.status},closed:{get:()=>i.closed},cancel:{value:a=>i.cancel(a)},complete:{value:()=>i.complete()}}),o}async nextAsync(t,n){return Vn(this.query(t,n))}getRequest(t){return k(this,Or).value[t]}getRequestByRef(t){return Object.values(k(this,Or).value).find(n=>n.ref===t)}cancelTaskByRef(t,n){const i=this.getRequestByRef(t);i!=null&&i.ref&&this.cancel(i.transaction,n)}cancel(t,n){if(t)k(this,Or).value[t]?(n??(n=`cancelation requested for job: ${t}`),k(this,Or).next(cr.cancel(t,n))):k(this,Ta).warn("Task not registered, nothing to cancel",{transaction:t,reason:n});else for(const i of Object.keys(k(this,Or).value))this.cancel(i,"all transactions requested canceled")}on(t,n){return k(this,Or).addEffect(cr[t].type,i=>{n(i,this)})}complete(){k(this,vl).unsubscribe()}}Or=new WeakMap,vl=new WeakMap,Ta=new WeakMap;function tj(){return{set:nn("cache/set",(r,e)=>({payload:{key:r,record:e}})),insert:nn("cache/insert",(r,e)=>({payload:{key:r,entry:e}})),remove:nn("cache/remove",r=>({payload:r})),invalidate:nn("cache/invalidate",(r,e)=>({payload:r,meta:{item:e}})),mutate:nn("cache/mutate",(r,e,t)=>({payload:{...e,key:r},meta:{item:t}})),trim:nn("cache/trim",r=>({payload:r}))}}const el=tj(),rj=(r,e)=>(e.updated??0)-(r.updated??0);function nj(r,e={}){return a2(e,t=>t.addCase(r.set,(n,i)=>{const{key:o,record:a}=i.payload;n[o]=a}).addCase(r.insert,(n,i)=>{const{key:o,entry:a}=i.payload,c=n[o];if(c)c.updated=Date.now(),c.updates??(c.updates=0),c.updates++,c.value=a.value,c.transaction=a.transaction,c.mutated=void 0;else{const d=Date.now();n[o]={...a,created:d,updated:d}}}).addCase(r.remove,(n,i)=>{delete n[i.payload]}).addCase(r.invalidate,(n,i)=>{const o=i.payload?[i.payload]:Object.keys(n);for(const a of o){const c=n[a];c&&(c.updated=void 0)}}).addCase(r.mutate,(n,i)=>{const{key:o,value:a,updated:c}=i.payload,d=n[o];d&&(d.value=a,d.updated=c,d.mutated=Date.now(),d.updates??(d.updates=0),d.updates++)}).addCase(r.trim,(n,i)=>{const{payload:o}=i,a=o.sort??rj,c=Object.keys(n),d=Object.entries(n).filter(([u,h])=>!o.validate||o.validate(h)).sort((u,h)=>a(u[1],h[1])).slice(0,o.size??Number.MAX_SAFE_INTEGER).map(([u])=>u);if(c.length!==d.length)for(const u of c){const h=d.indexOf(u);h!==-1?d.splice(h,1):delete n[u]}}))}var cn;class Rk{constructor(e){Ie(this,cn);const{trimming:t,initial:n}=e??{};Be(this,cn,new o2(nj(el,n))),t&&k(this,cn).addEffect("cache/set",()=>k(this,cn).next(el.trim(t)))}get state(){return k(this,cn).value}get state$(){return k(this,cn).asObservable()}get action$(){return k(this,cn).action$}has(e){return e in k(this,cn).value}setItem(e,t){const{args:n,transaction:i,value:o}=t;k(this,cn).next(el.insert(e,{args:n,transaction:i,value:o}))}getItem(e){return k(this,cn).value[e]}removeItem(e){k(this,cn).next(el.remove(e))}invalidate(e){const t=e?k(this,cn).value[e]:void 0;k(this,cn).next(el.invalidate(e,t))}mutate(e,t){const n=e in k(this,cn).value?k(this,cn).value[e]:void 0;if(!n)throw new Error(`Cannot mutate cache item with key ${e}: item not found`);const i=typeof t=="function"?t(n==null?void 0:n.value):t;return k(this,cn).next(el.mutate(e,i,n)),()=>k(this,cn).next(el.set(e,n))}trim(e){k(this,cn).next(el.trim(e))}reset(){k(this,cn).reset()}complete(){k(this,cn).complete()}}cn=new WeakMap;var i4,o4;class ij extends Fn{constructor(t,n,i){super();Le(this,"key");Le(this,"args");Le(this,"options");Ie(this,i4,Date.now());Ie(this,o4,am());this.key=t,this.args=n,this.options=i}get created(){return k(this,i4)}get uuid(){return k(this,o4)}processJob(t,n){return t.pipe(me(i=>{const{key:o,uuid:a,created:c}=this;return{key:o,uuid:a,created:c,status:"complete",transaction:t.transaction,complete:i.completed,value:i.value}}),jp(()=>{n==null||n.debug("QueryTask complete",{uuid:this.uuid,key:this.key,job:{status:t.status,transaction:t.transaction}}),t.complete()})).subscribe(this)}}i4=new WeakMap,o4=new WeakMap;const oj=(r=0)=>e=>(e.updated??0)+r>Date.now(),aj=(r="switch")=>typeof r=="function"?r:(()=>{switch(r){case"concat":return nz;case"merge":return iz;case"switch":return oz;default:throw new Error(`Invalid queue operator: ${r}`)}})();var yl,ec,bo,hf,os,tc,ff,Vm,Pn;class yi{constructor(e){Ie(this,yl,new Qn);Ie(this,ec);Ie(this,bo);Ie(this,hf,new Fn);Ie(this,os,{});Ie(this,tc);Ie(this,ff);Ie(this,Vm,am());Ie(this,Pn);Be(this,Pn,e.logger??new c2("Query",k(this,Vm))),Be(this,tc,n=>Nw(e.key(n),k(this,Vm))),Be(this,ff,(e==null?void 0:e.validate)??oj(e==null?void 0:e.expire)),e.client instanceof Ik?Be(this,ec,e.client):(Be(this,ec,new Ik(e.client.fn,{logger:k(this,Pn).createSubLogger("Client"),...e.client.options})),k(this,yl).add(()=>k(this,ec).complete())),e.cache instanceof Rk?Be(this,bo,e.cache):(Be(this,bo,new Rk(e.cache||{})),k(this,yl).add(()=>k(this,bo).complete()));const t=aj(e.queueOperator);k(this,yl).add(()=>k(this,hf).complete()),k(this,yl).add(k(this,hf).pipe(qr(n=>k(this,Pn).debug("Task added to queue",{key:n})),Oe(n=>n in k(this,os)),t(n=>{const i=k(this,os)[n],{args:o,options:a,uuid:c}=i;if(k(this,Pn).debug("Task selected from queue",{key:n,task:i.uuid,args:o,options:a}),!(i!=null&&i.observed))return k(this,Pn).debug("Task skipped",{task:c}),delete k(this,os)[n],Tr;const d=k(this,ec).query(o,{...a,ref:i.uuid});return new It(u=>{const{transaction:h}=d;k(this,Pn).info("Task stated",{task:c,transaction:h}),u.add(()=>{k(this,Pn).debug("Task closed",{task:c,transaction:h,jobStatus:d.status}),d.complete("task closed"),delete k(this,os)[n]}),u.add(zN(10).pipe(Oe(()=>!i.observed)).subscribe(()=>{d.cancel(`task: ${i.uuid} is not observed`),u.complete()})),u.add(i.processJob(d,k(this,Pn))),d.pipe(me(p=>({result:p,task:i})),jt(()=>Tr)).subscribe(u)})}),VR(()=>!k(this,ec).closed)).subscribe(n=>{const{value:i,transaction:o}=n.result,{args:a,key:c,uuid:d}=n.task;k(this,Pn).debug("Task output added to cache",{uuid:d,args:a,key:c,transaction:o,value:i}),k(this,bo).setItem(c,{value:i,args:a,transaction:o})}))}get client(){return k(this,ec)}get cache(){return k(this,bo)}query(e,t){return this._query(e,t)}queryAsync(e,t){const{skipResolve:n,...i}=t||{},o=n?Vn:hr;return new Promise((a,c)=>{t!=null&&t.signal&&t.signal.addEventListener("abort",()=>c(new Error("Query aborted"))),o(this._query(e,i).pipe(Sw())).then(a,c)})}persistentQuery(e,t){const n=k(this,tc).call(this,e),i=this._query(e,t);return new It(o=>{var c;o.add(i.subscribe({next:o.next.bind(o),error:o.error.bind(o)}));const a=((c=t==null?void 0:t.cache)==null?void 0:c.validate)||k(this,ff);o.add(this.cache.state$.pipe(Oe(d=>n in d),me(d=>({...d[n],key:n,status:"cache",hasValidCache:a(d[n],e)}))).subscribe(o))}).pipe(Jg((o,a)=>o.transaction===a.transaction&&o.mutated===a.mutated))}generateCacheKey(e){return k(this,tc).call(this,e)}mutate(e,t,n){const i=k(this,tc).call(this,e);if(!(i in this.cache.state)){if((n==null?void 0:n.allowCreation)===void 0)throw new Error(`Cannot mutate cache item with key ${i}: item not found and option "allowCreation" is false`);if(n.allowCreation===!1)return()=>{};const{value:o}=typeof t=="function"?t():t;this.cache.setItem(i,{args:e,transaction:am(),value:o})}return k(this,bo).mutate(i,t)}invalidate(e){k(this,bo).invalidate(e&&k(this,tc).call(this,e))}complete(){k(this,yl).unsubscribe()}onInvalidate(e){const t=k(this,bo).action$.pipe(lm("cache/invalidate")).subscribe(n=>e({detail:{item:n.meta.item}}));return()=>t.unsubscribe()}onMutate(e){const t=k(this,bo).action$.pipe(lm("cache/mutate")).subscribe(n=>e({detail:{changes:n.payload,current:n.meta.item}}));return()=>t.unsubscribe()}_query(e,t){const n=k(this,tc).call(this,e),i=this._createTask(n,e,t);return k(this,Pn).debug("New query created",{key:n,args:e,options:t}),i}_createTask(e,t,n){return new It(i=>{var d,u,h;if(n!=null&&n.signal){if(n!=null&&n.signal.aborted)return k(this,Pn).debug("Abort signal already triggered by caller",{key:e}),i.complete();i.add(Sl(n==null?void 0:n.signal,"abort").subscribe(()=>{k(this,Pn).debug("Abort signal triggered by caller",{key:e}),i.complete()}))}const o=k(this,bo).getItem(e);if(o){k(this,Pn).debug("Query has cache",{key:e,cacheEntry:o});const p=((d=n==null?void 0:n.cache)==null?void 0:d.suppressInvalid)??!1,v=(((u=n==null?void 0:n.cache)==null?void 0:u.validate)||k(this,ff))(o,t),_={...o,key:e,status:"cache",hasValidCache:v};if(k(this,Pn).info("Query cache valid, completing",{hasValidCache:v,suppressInvalid:p,record:_}),i.next(_),v||p)return i.complete();k(this,Pn).debug("Query cache entry is invalid, proceeding to fetch new data",{key:e})}const a=e in k(this,os);(h=k(this,os))[e]??(h[e]=new ij(e,t,n));const c=k(this,os)[e];i.add(c.subscribe(i)),k(this,Pn).info(a?"Query connected to existing task":"Query started new task",{key:e}),a||k(this,hf).next(e)})}}yl=new WeakMap,ec=new WeakMap,bo=new WeakMap,hf=new WeakMap,os=new WeakMap,tc=new WeakMap,ff=new WeakMap,Vm=new WeakMap,Pn=new WeakMap,Le(yi,"extractQueryValue",sf);var pf,as;class sj extends It{constructor(t){super(n=>k(this,as).subscribe(n));Ie(this,pf);Ie(this,as);Be(this,pf,new yi(t)),Be(this,as,new Xf(void 0))}get currentContext(){return k(this,as).value}get currentContext$(){return k(this,as).asObservable()}get client(){return k(this,pf)}setCurrentContext(t){typeof t=="string"?this.resolveContext(t).pipe(jt(()=>Tr)).subscribe(n=>this.setCurrentContext(n)):zb(t,k(this,as).value)||k(this,as).next(t)}resolveContext(t){return k(this,pf).query({id:t}).pipe(me(n=>n.value),jt(n=>{throw n.cause?n.cause:n}))}resolveContextAsync(t,n){return(n!=null&&n.awaitResolve?hr:Vn)(this.resolveContext(t))}dispose(){k(this,as).complete()}}pf=new WeakMap,as=new WeakMap;var ss,Fm,mf,Xo,_l,bl,gf,zm,jm,rR;let cj=(rR=class{constructor(e){Ie(this,ss);Ie(this,Fm);Ie(this,mf);Ie(this,Xo);Ie(this,_l,new Qn);Ie(this,bl);Ie(this,gf);Ie(this,zm);Ie(this,jm,new Fn);var i,o;const{config:t,event:n}=e;e.parentContext&&console.warn("@deprecated","parentContext as arg is deprecated, use ContextProvider.connectParentContext"),Be(this,Xo,n),t.resolveContext&&(this.resolveContext=(i=t.resolveContext)==null?void 0:i.bind(this)),t.validateContext&&(this.validateContext=(o=t.validateContext)==null?void 0:o.bind(this)),t.extractContextIdFromPath&&(this.extractContextIdFromPath=t.extractContextIdFromPath),t.generatePathFromContext&&(this.generatePathFromContext=t.generatePathFromContext),Be(this,bl,t.contextType),Be(this,gf,t.contextFilter),Be(this,ss,new sj(t.client.get)),Be(this,Fm,new yi(t.client.query)),t.client.related&&Be(this,mf,new yi(t.client.related)),Be(this,zm,t.contextParameterFn??(a=>({search:a.search,filter:{type:a.type}}))),k(this,Xo)&&(k(this,_l).add(this.currentContext$.pipe(ev()).subscribe(([a,c])=>{var d;(d=k(this,Xo))==null||d.dispatchEvent("onCurrentContextChanged",{source:this,canBubble:!0,detail:{previous:a,next:c}})})),k(this,_l).add(k(this,Xo).addEventListener("onCurrentContextChanged",a=>{a.source!==this&&a.detail.next!==void 0&&this.setCurrentContext(a.detail.next)}))),k(this,_l).add(k(this,jm).pipe(Qt(a=>a),qr(a=>console.debug("ContextProvider::#contextQueue",a))).subscribe(a=>{k(this,ss).setCurrentContext(a??null)}))}get contextClient(){return k(this,ss)}get queryClient(){return k(this,Fm)}get currentContext$(){return k(this,ss).currentContext$}get currentContext(){return k(this,ss).currentContext}set currentContext(e){if(console.warn("@deprecated","ContextProvider.currentContext","use setCurrentContextById|setCurrentContext|clearCurrentContext"),e===void 0)throw Error("not allowed to set current context as undefined undefined!");this.setCurrentContextAsync(e)}connectParentContext(e,t){const i=e.currentContext$.pipe(Oe(o=>o!==void 0),Oe((o,a)=>{var c;return t!=null&&t.skipFirst&&a<=1?(console.debug("ContextProvider::connectParentContext","skipping first item",o),!1):((c=this.currentContext)==null?void 0:c.id)!==(o==null?void 0:o.id)}),Qt(async o=>{var c;if(!o)return{next:o};const a=await((c=k(this,Xo))==null?void 0:c.dispatchEvent("onParentContextChanged",{source:this,detail:o,cancelable:!0}));return{next:o,canceled:a==null?void 0:a.canceled}}),Oe(o=>!o.canceled),Qt(({next:o})=>this.setCurrentContext(o,{validate:!0,resolve:!0}).pipe(jt(a=>(console.warn("ContextProvider::onParentContextChanged","setCurrentContext",a),Tr)))),jt(o=>(console.warn("ContextProvider::onParentContextChanged","unhandled exception",o),Tr))).subscribe();return k(this,_l).add(i),i}setCurrentContextById(e){return new It(t=>{try{k(this,ss).resolveContext(e).pipe(Oe(n=>!!n),Qt(n=>this.setCurrentContext(n))).subscribe(t)}catch(n){t.error(n)}})}setCurrentContextByIdAsync(e){return hr(this.setCurrentContextById(e))}setCurrentContext(e,t){const n=new Fn,i=new Fn,o=this._setCurrentContext(e,t).pipe(qr(a=>i.next(a)),Al(n),jp(()=>i.complete()),jt(a=>(i.error(a),Tr)));return k(this,jm).next(o),i.pipe(jp(()=>n.next(!0)))}_setCurrentContext(e,t){return new It(n=>{var i;if(e===this.currentContext)return n.next(e),n.complete();if(e&&(t!=null&&t.validate)&&!this.validateContext(e)){if(!t.resolve)return(i=k(this,Xo))==null||i.dispatchEvent("onSetContextValidationFailed",{source:this,detail:{context:e}}),n.error(Error("failed to validate provided context"));if(t.resolve)return Pt(e).pipe(Qt(async o=>{var c;const a=await((c=k(this,Xo))==null?void 0:c.dispatchEvent("onSetContextResolve",{source:this,cancelable:!0,detail:{context:o}}));if(a!=null&&a.canceled)throw Error("resolving of context was canceled");return o}),Qt(o=>this.resolveContext(o).pipe(me(a=>({context:o,resolved:a})))),Qt(async({context:o,resolved:a})=>{var d;const c=await((d=k(this,Xo))==null?void 0:d.dispatchEvent("onSetContextResolved",{source:this,cancelable:!0,detail:{context:o,resolved:a}}));if(c!=null&&c.canceled)throw Error("resolving of context was canceled");return a}),Qt(o=>this._setCurrentContext(o))).subscribe(n)}return Pt(e).pipe(Qt(async o=>{var c;const a=await((c=k(this,Xo))==null?void 0:c.dispatchEvent("onCurrentContextChange",{source:this,canBubble:!0,cancelable:!0,detail:{context:o}}));if(a!=null&&a.canceled)throw Error("change of context was aborted");return o})).subscribe(o=>{n.next(o),n.complete()})})}async setCurrentContextAsync(e,t){return hr(this.setCurrentContext(e,t))}queryContext(e){const t=this.queryClient.query(k(this,zm).call(this,{search:e,type:k(this,bl)})).pipe(jt(n=>{throw n.name==="QueryClientError"?n.cause:n}),me(n=>n.value));return k(this,gf)?t.pipe(me(k(this,gf))):t}queryContextAsync(e){return hr(this.queryContext(e))}validateContext(e){return k(this,bl)?k(this,bl).map(t=>t.toLowerCase()).includes(e.type.id.toLowerCase()):!0}resolveContext(e){return this.relatedContexts({item:e,filter:{type:k(this,bl)}}).pipe(me(t=>t.filter(n=>this.validateContext(n))),me(t=>{const n=t.shift();if(!n)throw Error("failed to resolve context");return t.length&&console.warn("ContextProvider::relatedContext","multiple items found 🤣",t),n}))}resolveContextAsync(e){return hr(this.resolveContext(e))}relatedContexts(e){return k(this,mf)?k(this,mf).query(e).pipe(me(({value:t})=>t),jt(t=>{throw t.cause?t.cause:t})):MR(()=>Error("ContextProvider::relatedContexts - no client defined for resolving related context"))}relatedContextsAsync(e){return hr(this.relatedContexts(e))}clearCurrentContext(){this.setCurrentContext(null)}dispose(){k(this,_l).unsubscribe(),k(this,ss).dispose()}},ss=new WeakMap,Fm=new WeakMap,mf=new WeakMap,Xo=new WeakMap,_l=new WeakMap,bl=new WeakMap,gf=new WeakMap,zm=new WeakMap,jm=new WeakMap,rR);const lj="context",dj={name:lj,configure:()=>new ez,initialize:async function(r){var a;const e=await r.config.createConfig(r),t=r.hasModule("event")?await r.requireInstance("event"):void 0,n=(a=r.ref)==null?void 0:a.context,i=new cj({config:e,event:t,parentContext:n}),o=new Qn(()=>i.dispose());return this.postInitialize=c=>new It(d=>{const u=e.resolveInitialContext?at(e.resolveInitialContext(c)).pipe(Oe(h=>!!h),Qt(h=>c.modules.context.setCurrentContext(h,{validate:!0,resolve:!0}))):Tr;d.add(u.pipe(jt(h=>(console.warn("ContextModule.postInitialize","failed to resolve initial context",h),Tr))).subscribe({next:h=>{console.debug("ContextModule.postInitialize",`initial context was resolved to [${h?h.id:"none"}]`,h)},complete:()=>{e.connectParentContext!==!1&&n&&i.connectParentContext(n),d.complete()}}))}),this.dispose=()=>o.unsubscribe(),i}},uj=j.object({key:j.string().describe("The key used to identify the service"),uri:j.string().describe("The URI of the service"),id:j.string().optional().describe("The ID of the service"),environment:j.string().optional().describe("The environment of the service"),name:j.string().optional().describe("The name of the service"),scopes:j.array(j.string()).optional().default([]).describe("Endpoint authentication scopes"),tags:j.array(j.string()).optional().describe("Tags for the service")}).describe("A service from the service discovery API").transform(r=>({...r,get defaultScopes(){return r.scopes??[]}})),hj=j.array(uj).describe("A list of services from the service discovery API"),fj="services",pj=r=>at(If(r)).pipe(me(e=>hj.default([]).parse(e)));var Um;class mj{constructor({http:e,endpoint:t}){Ie(this,Um);Le(this,"endpoint");Le(this,"http");this.http=e,this.endpoint=t,Be(this,Um,new yi({client:{fn:()=>e.fetch$(t??"",{selector:pj})},key:()=>fj,expire:5*60*1e3}))}resolveServices(e){return(e?Vn:hr)(yi.extractQueryValue(k(this,Um).query()))}async resolveService(e,t){const i=(await this.resolveServices(t)).find(o=>o.key===e);if(!i)throw Error(`Failed to resolve service, invalid key [${e}]`);return i}}Um=new WeakMap;class gj extends t2{async _createConfig(e,t){if(!e.hasModule("http"))throw new Error("http module is required");return this._has("discoveryClient")||(await e.requireInstance("http")).hasClient("service_discovery")&&this.configureServiceDiscoveryClientByClientKey("service_discovery"),hr(at(super._createConfig(e,t)))}_processConfig(e,t){if(!e.discoveryClient)throw new Error("discoveryClient is required, please configure it");return super._processConfig(e,t)}setServiceDiscoveryClient(e){this._set("discoveryClient",typeof e=="function"?e:async()=>e)}configureServiceDiscoveryClient(e){this.setServiceDiscoveryClient(async t=>{const{httpClient:n,endpoint:i}=await hr(at(e(t)))??{};if(n)return new mj({http:n,endpoint:i});throw Error("httpClient is required")})}configureServiceDiscoveryClientByClientKey(e,t){this.configureServiceDiscoveryClient(async({requireInstance:n})=>({httpClient:(await n("http")).createClient(e),endpoint:t}))}}class vj{constructor(e,t){Le(this,"config");Le(this,"_http");this.config=e,this._http=t}resolveServices(){return this.config.discoveryClient.resolveServices()}async resolveService(e){return this.config.discoveryClient.resolveService(e)}async createClient(e,t){const n=await this.resolveService(e);if(!n)throw Error(`Could not load configuration of service [${e}]`);return this._http.createClient({...t,baseUri:n.uri,defaultScopes:n.scopes})}async configureClient(e,t){const{key:n,alias:i}=typeof e=="string"?{key:e,alias:e}:e,{uri:o,scopes:a}=await this.resolveService(n);t.addConfig(iP(i,{baseUri:o,defaultScopes:a}))}}const yj="serviceDiscovery",_j={name:yj,configure:()=>new gj,initialize:async r=>{var o;const{requireInstance:e,ref:t}=r,n=await r.config.createConfigAsync(r,{...(o=t==null?void 0:t.serviceDiscovery)==null?void 0:o.config}),i=await e("http");return new vj(n,i)}};class bj{}var xc;(function(r){r.v1="1.0",r.v2="2.0"})(xc||(xc={}));class Po extends Error{constructor(t,n){super(`unsupported version ${t}`,{cause:n});Le(this,"version");this.version=t}}const wj=(r,e)=>{const t=xc[r]??r;switch(t){case xc.v2:throw new Po(r);default:{const{id:n}=e,i=new URLSearchParams;return i.append("api-version",t),`/contexts/${n}/?${String(i)}`}}},xj=(r,e,t)=>[wj(r,e),t],Cj=(r,e,t="json")=>(n,i)=>r[t](...xj(e,n,i));var kj=["eq","ne","gt","ge","lt","le"],q0=["and","or","not"],Ej=["any","all"],Sj=["startswith","endswith","contains","matchespattern"],Aj=["expand","levels","select","skip","top","count","orderby","filter"],Pk=/\((.*)\)/,Mk=/(?!indexof)\((\w+)\)/,$k;(function(r){r.sum="sum",r.min="min",r.max="max",r.average="average",r.countdistinct="countdistinct"})($k||($k={}));var Bs="";function AP(r){var e=r===void 0?{}:r,t=e.select,n=e.search,i=e.skiptoken,o=e.format,a=e.top,c=e.skip,d=e.filter,u=e.transform,h=e.orderBy,p=e.key,m=e.count,v=e.expand,_=e.action,b=e.func,C="",T=[],A={};if(p!=null&&(C+="(".concat(hs(p,T),")")),(d||typeof m=="object")&&(A.$filter=um(typeof m=="object"?m:d,T)),u&&(A.$apply=TP(u)),v&&(A.$expand=Pg(v)),h&&(A.$orderby=Ww(h)),m&&(typeof m=="boolean"?A.$count=!0:C+="/$count"),typeof a=="number"&&(A.$top=a),typeof c=="number"&&(A.$skip=c),_&&(C+="/".concat(_)),b){if(typeof b=="string")C+="/".concat(b);else if(typeof b=="object"){var I=Object.keys(b)[0],O=hs(b[I],T);C+="/".concat(I),O!==""&&(C+="(".concat(O,")"))}}return T.length>0&&Object.assign(A,T.reduce(function(B,z){var R;return Object.assign(B,(R={},R["@".concat(z.name)]=hs(z.value),R))},{})),Mj(C,Cn({$select:t,$search:n,$skiptoken:i,$format:o},A))}function K3(r,e,t){return t===void 0&&(t=[]),"".concat(r," eq ").concat(hs(e,t))}function um(r,e,t){return r===void 0&&(r={}),e===void 0&&(e=[]),t===void 0&&(t=""),(Array.isArray(r)?r:[r]).reduce(function(o,a){if(a){var c=n(a,e,t);c&&o.push(c)}return o},[]).join(" and ");function n(o,a,c){o===void 0&&(o={}),a===void 0&&(a=[]),c===void 0&&(c="");var d="";if(typeof o=="string")d=o;else if(o&&typeof o=="object"){var u=Object.keys(o).reduce(function(h,p){var m=o[p];if(m===void 0)return h;var v="";if(c?p===Bs?v=c:Mk.test(p)?v=p.replace(Mk,function(A,I){return I.trim()===Bs?"(".concat(c,")"):"(".concat(c,"/").concat(I.trim(),")")}):Pk.test(p)?v=p.replace(Pk,function(A,I){return I.trim()===Bs?"(".concat(c,")"):"(".concat(c,"/").concat(I.trim(),")")}):v="".concat(c,"/").concat(p):v=p,p===Bs&&Array.isArray(m))return h.concat(m.map(function(A){return K3(v,A)}));if(["number","string","boolean"].indexOf(typeof m)!==-1||m instanceof Date||m===null)h.push(K3(v,m,a));else if(Array.isArray(m)){var _=p,b=m.map(function(A){return um(A,a,c)}).filter(function(A){return A}).map(function(A){return q0.indexOf(_)!==-1?"(".concat(A,")"):A});b.length&&(q0.indexOf(_)!==-1?b.length&&(_==="not"?h.push(Ok(b)):h.push("(".concat(b.join(" ".concat(_," ")),")"))):h.push(b.join(" ".concat(_," "))))}else if(q0.indexOf(v)!==-1){var C=v,b=Object.keys(m).map(function(I){var O;return n((O={},O[I]=m[I],O))});b.length&&(C==="not"?h.push(Ok(b)):h.push("(".concat(b.join(" ".concat(C," ")),")")))}else if(typeof m=="object")if("type"in m)h.push(K3(v,m,a));else{var T=Object.keys(m);T.forEach(function(A){var I;if(m[A]!==void 0)if(kj.indexOf(A)!==-1)h.push("".concat(v," ").concat(A," ").concat(hs(m[A],a)));else if(q0.indexOf(A)!==-1)Array.isArray(m[A])?h.push(m[A].map(function(R){return"("+n(R,a,v)+")"}).join(" ".concat(A," "))):h.push("("+n(m[A],a,v)+")");else if(Ej.indexOf(A)!==-1){var O=i(p.toLowerCase(),m[A],A,v);O&&h.push(O)}else if(A==="has")h.push("".concat(v," ").concat(A," ").concat(hs(m[A],a)));else if(A==="in"){var B=Array.isArray(m[A])?m[A]:m[A].value.map(function(R){return{type:m[A].type,value:R}});h.push(v+" in ("+B.map(function(R){return hs(R,a)}).join(",")+")")}else if(Sj.indexOf(A)!==-1)h.push("".concat(A,"(").concat(v,",").concat(hs(m[A],a),")"));else{var z=n((I={},I[A]=m[A],I),a,v);z&&h.push(z)}})}else throw new Error("Unexpected value type: ".concat(m));return h},[]);d=u.join(" and ")}return d}function i(o,a,c,d){var u="";if(typeof a=="string"||a instanceof String)u=Tj(o,a,c,d);else if(a){var h=Array.isArray(a)?a.reduce(function(m,v){return v.hasOwnProperty(Bs)?(m.hasOwnProperty(Bs)||(m[Bs]=[]),m[Bs].push(v[Bs]),m):Cn(Cn({},m),v)},{}):a,p=n(h,e,o);u="".concat(d,"/").concat(c,"(").concat(p?"".concat(o,":").concat(p):"",")")}return u}}function Tj(r,e,t,n){var i="",o=t=="all"?"ne":"eq";return i="".concat(n,"/").concat(t,"(").concat(r,": ").concat(r," ").concat(o," '").concat(e,"')"),i}function Ij(r){return r=r.replace(/%/g,"%25"),r=r.replace(/\+/g,"%2B"),r=r.replace(/\//g,"%2F"),r=r.replace(/\?/g,"%3F"),r=r.replace(/#/g,"%23"),r=r.replace(/&/g,"%26"),r=r.replace(/'/g,"''"),r}function hs(r,e){if(typeof r=="string")return"'".concat(Ij(r),"'");if(r instanceof Date)return r.toISOString();if(typeof r=="number")return r;if(Array.isArray(r))return"[".concat(r.map(function(t){return hs(t)}).join(","),"]");if(r===null)return r;if(typeof r=="object")switch(r.type){case"raw":case"guid":return r.value;case"duration":return"duration'".concat(r.value,"'");case"binary":return"binary'".concat(r.value,"'");case"alias":return Array.isArray(e)&&e.push(r),"@".concat(r.name);case"json":return escape(JSON.stringify(r.value));case"decimal":return"".concat(r.value,"M");default:return Object.entries(r).filter(function(t){var n=t[1];return n!==void 0}).map(function(t){var n=t[0],i=t[1];return"".concat(n,"=").concat(hs(i,e))}).join(",")}return r}function Pg(r){if(typeof r=="number")return r;if(typeof r=="string")return r.indexOf("/")===-1?r:r.split("/").reverse().reduce(function(t,n,i,o){return i===0?"$expand=".concat(n):i===o.length-1?"".concat(n,"(").concat(t,")"):"$expand=".concat(n,"(").concat(t,")")},"");if(Array.isArray(r))return"".concat(r.map(function(t){return Pg(t)}).join(","));if(typeof r=="object"){var e=Object.keys(r);return e.some(function(t){return Aj.indexOf(t.toLowerCase())!==-1})?e.map(function(t){var n;switch(t){case"filter":n=um(r[t]);break;case"orderBy":n=Ww(r[t]);break;case"levels":case"count":case"skip":case"top":n="".concat(r[t]);break;default:n=Pg(r[t])}return"$".concat(t.toLowerCase(),"=").concat(n)}).join(";"):e.map(function(t){var n=Pg(r[t]);return n?"".concat(t,"(").concat(n,")"):t}).join(",")}return""}function TP(r){var e=Array.isArray(r)?r:[r],t=e.reduce(function(n,i){var o=i.aggregate,a=i.filter,c=i.groupBy,d=fR(i,["aggregate","filter","groupBy"]),u=Object.keys(d);if(u.length)throw new Error("Unsupported transform(s): ".concat(u));if(o&&n.push("aggregate(".concat(Rj(o),")")),a){var h=um(a);h&&n.push("filter(".concat(um(h),")"))}return c&&n.push("groupby(".concat(Pj(c),")")),n},[]);return t.join("/")||void 0}function Rj(r){var e=Array.isArray(r)?r:[r];return e.map(function(t){return typeof t=="string"?t:Object.keys(t).map(function(n){var i=t[n];if(!i.with&&i.as)return"".concat(n," as ").concat(i.as);if(!i.with)throw new Error("'with' property required for '".concat(n,"'"));if(!i.as)throw new Error("'as' property required for '".concat(n,"'"));return"".concat(n," with ").concat(i.with," as ").concat(i.as)})}).join(",")}function Pj(r){if(!r.properties)throw new Error("'properties' property required for groupBy");var e="(".concat(r.properties.join(","),")");return r.transform&&(e+=",".concat(TP(r.transform))),e}function Ww(r,e){return e===void 0&&(e=""),Array.isArray(r)?r.map(function(t){return Array.isArray(t)&&t.length===2&&["asc","desc"].indexOf(t[1])!==-1?t.join(" "):t}).map(function(t){return"".concat(e).concat(String(t))}).join(","):typeof r=="object"?Object.entries(r).map(function(t){var n=t[0],i=t[1];return Ww(i,"".concat(n,"/"))}).map(function(t){return"".concat(e).concat(t)}).join(","):"".concat(e).concat(String(r))}function Mj(r,e){var t=Object.getOwnPropertyNames(e).filter(function(n){return e[n]!==void 0&&e[n]!==""}).map(function(n){return"".concat(n,"=").concat(e[n])});return t.length?"".concat(r,"?").concat(t.join("&")):r}function Ok(r){return"not (".concat(r.join(" and "),")")}function $j(r){return Object.keys(r).reduce((e,t)=>{var n;switch(t){case"type":(n=r[t])!=null&&n.length&&(e[t]={in:r[t]});break;default:e[t]=r[t];break}return e},{})}function Oj(r){return Object.entries(r).filter(([e,t])=>!!t).reduce((e,[t,n])=>{switch(t){case"filter":e[t]=$j(n);break;default:e[t]=r[t];break}return e},{})}function Zj(r){return typeof r=="string"?r:AP(Oj(r))}const Lj=(r,e)=>{const t=xc[r]??r;switch(t){case xc.v2:throw new Po(r);default:{const{query:n,includeDeleted:i}=e,o=new URLSearchParams(Zj(n));return o.append("api-version",t),i&&o.append("includeDeleted","true"),`/contexts/?${String(o)}`}}},Hj=(r,e,t)=>[Lj(r,e),t],Nj=(r,e,t="json")=>(n,i)=>r[t](...Hj(e,n,i));function Dj(r){return Object.keys(r).reduce((e,t)=>{var n;switch(t){case"type":(n=r[t])!=null&&n.length&&(e[t]={in:r[t]});break;default:e[t]=r[t];break}return e},{})}function Vj(r){return Object.entries(r).filter(([e,t])=>!!t).reduce((e,[t,n])=>{switch(t){case"filter":e[t]=Dj(n);break;default:e[t]=r[t];break}return e},{})}function Fj(r){return typeof r=="string"?r:AP(Vj(r))}const zj=(r,e)=>{const t=xc[r]??r;switch(t){case xc.v2:throw new Po(r);default:{const{id:n,query:i}=e,o=new URLSearchParams(Fj(i||""));return o.append("api-version",t),`/contexts/${n}/relations?${String(o)}`}}},jj=(r,e,t)=>[zj(r,e),t],Uj=(r,e,t="json")=>(n,i)=>r[t](...jj(e,n,i));class Bj{constructor(e,t){Le(this,"_client");Le(this,"_method");this._client=e,this._method=t}get Version(){return xc}get(e,...t){return Cj(this._client,e,this._method)(...t)}query(e,...t){return Nj(this._client,e,this._method)(...t)}related(e,...t){return Uj(this._client,e,this._method)(...t)}}const Ac=(r,e)=>{if(e in r)return r[e];const t=Object.values(r).find(n=>n===e);if(!t)throw new Error(`Version ${e} is not supported`);return t},l2=r=>async e=>r.parse(await If(e));var Ze;(function(r){r.v1="1.0",r.v2="2.0"})(Ze||(Ze={}));const Zk=j.string().datetime({offset:!0}).transform(r=>new Date(r)),Yb={[Ze.v1]:j.object({azureUniqueId:j.string(),name:j.string(),mail:j.string().optional(),phoneNumber:j.string().optional(),jobTitle:j.string().optional(),accountType:j.enum(["Employee","Consultant","External","Application","Local"]).optional(),accountClassification:j.enum(["Unclassified","Internal","External"]).nullish()})},y4={[Ze.v1]:j.object({identifier:j.string(),name:j.string().nullish(),subSystem:j.string().nullish()})},qj={[Ze.v1]:j.object({id:j.string(),name:j.string().nullish(),type:j.string().nullish()})},Lf={get[Ze.v1](){return j.object({id:j.string(),name:j.string(),appKey:j.string(),description:j.string().optional(),isShared:j.boolean().optional(),context:qj[Ze.v1].optional(),createdBy:Yb[Ze.v1],updatedBy:Yb[Ze.v1].optional(),created:Zk,updated:Zk.optional(),sourceSystem:y4[Ze.v1].nullish()})},get[Ze.v2](){return this[Ze.v1]}},Yw={get[Ze.v1](){return j.record(j.unknown()).or(j.string()).optional().default("").transform(r=>{try{return typeof r=="string"?JSON.parse(r):r}catch{return r}})}},IP=r=>Object.entries(r).map(([e,t])=>{if(t===null)return`${e} eq null`;if(typeof t=="string")return`${e} eq '${t}'`;if(typeof t=="boolean")return`${e} eq ${t}`;if(typeof t=="object")return Object.entries(t).map(([n,i])=>`${e}.${n} eq '${i}'`).join(" and ")}).filter(e=>!!e).join(" and "),Kj=j.object({appKey:j.string().optional(),contextId:j.string().optional(),sourceSystem:y4[Ze.v1].partial().optional()}).transform(IP),Gj=j.object({appKey:j.string().optional(),contextId:j.string().optional(),sourceSystem:y4[Ze.v1].partial().optional(),isFavourite:j.boolean().optional()}).transform(IP),Wj={[Ze.v1]:j.object({filter:j.string().or(Kj).optional()}).optional(),[Ze.v2]:j.object({filter:j.string().or(Gj).optional()}).optional()},Yj={[Ze.v1]:j.array(Lf[Ze.v1]),[Ze.v2]:j.array(Lf[Ze.v2])},Qj=(r,e,t)=>{switch(r){case Ze.v1:case Ze.v2:{const n={selector:l2(Yj[r])};return Object.assign({},n,t)}}throw Error(`Unknown API version: ${r}`)},Xj=(r,e)=>{switch(r){case Ze.v1:case Ze.v2:{const t=new URLSearchParams;return t.append("api-version",r),e!=null&&e.filter&&t.append("$filter",e.filter),`/persons/me/bookmarks/?${String(t)}`}}throw Error(`Unknown API version: ${r}`)},Jj=(r,e,t="json")=>{const n=Ac(Ze,r);return(i,o)=>{const a=Wj[n].parse(i),c=Xj(n,a),d=Qj(n,a,o);return e[t](c,d)}},eU={[Ze.v1]:j.object({bookmarkId:j.string()}),[Ze.v2]:j.object({bookmarkId:j.string()})},tU={[Ze.v1]:Lf[Ze.v1],[Ze.v2]:Lf[Ze.v2]},rU=(r,e,t)=>{switch(r){case Ze.v1:case Ze.v2:{const n={selector:l2(tU[r])};return Object.assign({},n,t)}}throw Error(`Unknown API version: ${r}`)},nU=(r,e)=>{switch(r){case Ze.v1:case Ze.v2:{const t=new URLSearchParams;return t.append("api-version",r),`/bookmarks/${e.bookmarkId}?${String(t)}`}}throw Error(`Unknown API version: ${r}`)},iU=(r,e,t="json")=>{const n=Ac(Ze,r);return(i,o)=>{const a=eU[n].parse(i);return e[t](nU(n,a),rU(n,a,o))}},oU={[Ze.v1]:j.object({name:j.string(),appKey:j.string(),payload:j.record(j.unknown()).or(j.string()).optional(),description:j.string().nullish(),isShared:j.boolean().nullish(),contextId:j.string().nullish(),sourceSystem:y4[Ze.v1].nullish()})},aU={[Ze.v1]:Lf[Ze.v1].and(j.object({payload:Yw[Ze.v1].optional()}))},sU=(r,e,t)=>{switch(r){case Ze.v1:{const n={method:"POST",selector:l2(aU[r]),body:e};return Object.assign({},n,t)}}throw Error(`Unknown API version: ${r}`)},cU=(r,e)=>{switch(r){case Ze.v1:{const t=new URLSearchParams;return t.append("api-version",r),`/bookmarks?${String(t)}`}}throw Error(`Unknown API version: ${r}`)},lU=(r,e,t="json")=>{const n=Ac(Ze,r);return(i,o)=>{const a=oU[n].parse(i);return e[t](cU(n),sU(n,a,o))}},dU={[Ze.v1]:j.object({bookmarkId:j.string(),updates:j.object({name:j.string().nullish(),description:j.string().nullish(),isShared:j.boolean().nullish(),payload:j.record(j.unknown()).or(j.string()).nullish().transform(r=>typeof r=="object"?JSON.stringify(r):r),sourceSystem:j.object({identifier:j.string().nullish(),name:j.string().nullish(),subSystem:j.string().nullish()}).nullish()})})},uU={[Ze.v1]:Lf[Ze.v1].and(j.object({payload:Yw[Ze.v1].optional()}))},hU=(r,e,t)=>{switch(r){case Ze.v1:{const n={method:"PATCH",selector:l2(uU[r]),body:e.updates};return Object.assign({},n,t)}}throw Error(`Unknown API version: ${r}`)},fU=(r,e)=>{switch(r){case Ze.v1:{const t=new URLSearchParams;return t.append("api-version",r),`/bookmarks/${e.bookmarkId}?${String(t)}`}}throw Error(`Unknown API version: ${r}`)},pU=(r,e,t="json")=>{const n=Ac(Ze,r);return(i,o)=>{const a=dU[n].parse(i);return e[t](fU(n,a),hU(n,a,o))}},mU={[Ze.v1]:j.object({bookmarkId:j.string()})},gU={[Ze.v1]:j.object({id:j.string(),payload:Yw[Ze.v1]})},vU=(r,e,t)=>{switch(r){case Ze.v1:{const n={method:"GET",selector:l2(gU[r])};return Object.assign({},n,t)}}throw Error(`Unknown API version: ${r}`)},yU=(r,e)=>{switch(r){case Ze.v1:{const t=new URLSearchParams;return t.append("api-version",r),`/bookmarks/${e.bookmarkId}/apply?${String(t)}`}}throw Error(`Unknown API version: ${r}`)},_U=(r,e,t="json")=>{const n=Ac(Ze,r);return(i,o)=>{const a=mU[n].parse(i);return e[t](yU(n,a),vU(n,a,o))}},Qw=async r=>{if(r.ok)return!0;const e=`Failed to execute request. Status code: ${r.status}`;let t,n;switch(r.status){case 403:case 404:try{n=await r.json()}catch(i){t=i}}throw new nf(e,r,{cause:t,data:n})},bU=async r=>{if(r.ok)return!0;if(r.status===404)return!1;throw new Tl(`Failed to execute request. Status code: ${r.status}`,r)},wU={[Ze.v1]:j.object({bookmarkId:j.string()})};Ze.v1+"",j.boolean();const xU=(r,e,t)=>{switch(r){case Ze.v1:return Object.assign({},{method:"POST",selector:Qw,body:e},t)}throw Error(`Unknown API version: ${r}`)},CU=(r,e)=>{switch(r){case Ze.v1:{const t=new URLSearchParams;return t.append("api-version",r),`/persons/me/bookmarks/favourites?${String(t)}`}}throw Error(`Unknown API version: ${r}`)},kU=(r,e,t="json")=>{const n=Ac(Ze,r);return(i,o)=>{const a=wU[n].parse(i);return e[t](CU(n),xU(n,a,o))}},EU={[Ze.v1]:j.object({bookmarkId:j.string()})};Ze.v1+"",j.boolean();const SU=(r,e,t)=>{switch(r){case Ze.v1:return Object.assign({},{method:"DELETE",selector:Qw},t)}throw Error(`Unknown API version: ${r}`)},AU=(r,e)=>{switch(r){case Ze.v1:{const t=new URLSearchParams;return t.append("api-version",r),`/bookmarks/${e.bookmarkId}?${String(t)}`}}throw Error(`Unknown API version: ${r}`)},TU=(r,e,t="json")=>{const n=Ac(Ze,r);return(i,o)=>{const a=EU[n].parse(i);return e[t](AU(n,a),SU(n,a,o))}},IU={[Ze.v1]:j.object({bookmarkId:j.string()})};Ze.v1+"",j.boolean();const RU=(r,e,t)=>{switch(r){case Ze.v1:return Object.assign({},{method:"HEAD",selector:bU},t)}throw Error(`Unknown API version: ${r}`)},PU=(r,e)=>{switch(r){case Ze.v1:{const t=new URLSearchParams;return t.append("api-version",r),`/persons/me/bookmarks/favourites/${e.bookmarkId}?${String(t)}`}}throw Error(`Unknown API version: ${r}`)},MU=(r,e,t="json")=>{const n=Ac(Ze,r);return(i,o)=>{const a=IU[n].parse(i);return e[t](PU(n,a),RU(n,a,o))}},$U={[Ze.v1]:j.object({bookmarkId:j.string()})};Ze.v1+"",j.boolean();const OU=(r,e,t)=>{switch(r){case Ze.v1:return Object.assign({},{method:"DELETE",selector:Qw},t)}throw Error(`Unknown API version: ${r}`)},ZU=(r,e)=>{switch(r){case Ze.v1:{const t=new URLSearchParams;return t.append("api-version",r),`/persons/me/bookmarks/favourites/${e.bookmarkId}?${String(t)}`}}throw Error(`Unknown API version: ${r}`)},LU=(r,e,t="json")=>{const n=Ac(Ze,r);return(i,o)=>{const a=$U[n].parse(i);return e[t](ZU(n,a),OU(n,a,o))}};class HU{constructor(e,t){Le(this,"_client");Le(this,"_method");this._client=e,this._method=t}get(e,t,n){return iU(e,this._client,this._method)(t,n)}getPayload(e,t,n){return _U(e,this._client,this._method)(t,n)}query(e,t,n){return Jj(e,this._client,this._method)(t,n)}patch(e,t,n){return pU(e,this._client,this._method)(t,n)}create(e,t,n){return lU(e,this._client,this._method)(t,n)}delete(e,t,n){return TU(e,this._client,this._method)(t,n)}isFavorite(e,t,n){return MU(e,this._client,this._method)(t,n)}addFavourite(e,t,n){return kU(e,this._client,this._method)(t,n)}removeFavourite(e,t,n){return LU(e,this._client,this._method)(t,n)}}const NU=(r,e)=>{const t=Yn[r]??r;switch(t){case Yn.v2:throw new Po(r);default:{const{id:n}=e,i=new URLSearchParams;return i.append("api-version",t),`/notification/${n}/?${String(i)}`}}},DU=(r,e,t)=>[NU(r,e),t],VU=(r,e,t="json")=>(n,i)=>r[t](...DU(e,n,i)),FU=(r,e)=>{const t=Yn[r]??r;switch(t){case Yn.v2:throw new Po(r);default:{const{userId:n}=e,i=new URLSearchParams;return i.append("api-version",t),`/person/${n}/notifications/?${String(i)}`}}},zU=(r,e,t)=>{const n=FU(r,e),i=new Headers;i.append("content-type","application/json");const o=Object.assign({},{method:"POST",body:JSON.stringify(e),headers:i},t);return[n,o]},jU=(r,e,t="json")=>(n,i)=>r[t](...zU(e,n,i)),UU=(r,e)=>{const t=Yn[r]??r;switch(t){case Yn.v2:throw new Po(r);default:{const{id:n}=e,i=new URLSearchParams;return i.append("api-version",t),`/notification/${n}/?${String(i)}`}}},BU=(r,e,t)=>{const n=UU(r,e),i=new Headers;i.append("content-type","application/json");const o=Object.assign({},{method:"PATCH",body:JSON.stringify(e),headers:i},t);return[n,o]},qU=(r,e,t="json")=>(n,i)=>r[t](...BU(e,n,i)),KU=(r,e)=>{const t=Yn[r]??r;switch(t){case Yn.v2:throw new Po(r);default:{const{userId:n}=e,i=new URLSearchParams;return i.append("api-version",t),`/person/${n}/notifications/?${String(i)}`}}},GU=(r,e,t)=>[KU(r,e),t],WU=(r,e,t="json")=>(n,i)=>r[t](...GU(e,n,i)),YU=(r,e)=>{const t=Yn[r]??r;switch(t){case Yn.v2:throw new Po(r);default:{const{id:n}=e,i=new URLSearchParams;return i.append("api-version",t),`/notification/${n}/?${String(i)}`}}},QU=(r,e,t)=>{const n=YU(r,e),i=new Headers;i.append("content-type","application/json");const o=Object.assign({},{method:"DELETE",headers:i},t);return[n,o]},XU=(r,e,t="json")=>(n,i)=>r[t](...QU(e,n,i));var Yn;(function(r){r.v1="1.0",r.v2="2.0"})(Yn||(Yn={}));const JU=(r,e)=>{const t=Yn[r]??r;switch(t){case Yn.v2:throw new Po(r);default:{const{userId:n}=e,i=new URLSearchParams;return i.append("api-version",t),`/person/${n}/notifications/settings/?${String(i)}`}}},eB=(r,e,t)=>{const n=JU(r,e),i=new Headers;i.append("content-type","application/json");const o=Object.assign({},{method:"PUT",body:JSON.stringify(e),headers:i},t);return[n,o]},tB=(r,e,t="json")=>(n,i)=>r[t](...eB(e,n,i)),rB=(r,e)=>{const t=Yn[r]??r;switch(t){case Yn.v2:throw new Po(r);default:{const{userId:n}=e,i=new URLSearchParams;return i.append("api-version",t),`/person/${n}/notifications/settings/?${String(i)}`}}},nB=(r,e,t)=>[rB(r,e),t],iB=(r,e,t="json")=>(n,i)=>r[t](...nB(e,n,i));class oB{constructor(e,t){Le(this,"_client");Le(this,"_method");this._client=e,this._method=t}get Version(){return Yn}getAll(e,...t){return WU(this._client,e,this._method)(...t)}getById(e,...t){return VU(this._client,e,this._method)(...t)}setSeenByUser(e,...t){return qU(this._client,e,this._method)(...t)}create(e,...t){return jU(this._client,e,this._method)(...t)}delete(e,...t){return XU(this._client,e,this._method)(...t)}getSettings(e,...t){return iB(this._client,e,this._method)(...t)}updateSettings(e,...t){return tB(this._client,e,this._method)(...t)}}var aa;(function(r){r.v2="2.0",r.v4="4.0"})(aa||(aa={}));const aB=(r,e)=>{const t=aa[r]??r;switch(t){case aa.v4:{const{azureId:n,expand:i}=e,o=new URLSearchParams;return o.append("api-version",t),i&&o.append("$expand",i.join(",")),`/persons/${n}?${String(o)}`}default:throw new Po(r)}},sB=(r,e,t)=>[aB(r,e),t],cB=(r,e,t="json")=>(n,i)=>r[t](...sB(e,n,i)),lB=(r,e)=>{const t=aa[r]??r;switch(t){case aa.v2:{const{search:n}=e,i=new URLSearchParams;return i.append("api-version",t),i.append("$search",n),`/persons?${String(i)}`}default:throw new Po(r)}},dB=(r,e,t)=>[lB(r,e),t],uB=(r,e,t="json")=>(n,i)=>r[t](...dB(e,n,i)),hB=(r,e)=>{const t=aa[r]??r;switch(t){case aa.v2:{const{azureId:n}=e,i=new URLSearchParams;return i.append("api-version",t),`/persons/${n}/photo?${String(i)}`}default:throw new Po(r)}},fB=(r,e,t)=>[hB(r,e),t],pB=(r,e,t="blob")=>(n,i)=>r[t](...fB(e,n,i));class mB{constructor(e){Le(this,"_client");this._client=e}get Version(){return aa}get(e,t,n,i){return cB(this._client,e,t)(n,i)}query(e,t,n,i){return uB(this._client,e,t)(n,i)}photo(e,t,n,i){return pB(this._client,e,t)(n,i)}}class gB extends Error{constructor(t,n,i){super(t,i);Le(this,"response");this.response=n,this.name="ApiProviderError"}}const G3=async r=>{var e;if(!r.ok){const{headers:t,status:n,statusText:i,type:o,url:a,bodyUsed:c}=r,d=(e=t.get("content-type"))==null?void 0:e.match(/application\/(\w*)?[+]?json/),u=!c&&await(d?r.json():r.text());throw new gB("failed to execute request, response was not ok",{headers:t,status:n,statusText:i,type:o,url:a,data:u})}};class vB{constructor({createClient:e}){Le(this,"_createClientFn");this._createClientFn=e}async createNotificationClient(e){const t=await this._createClientFn("notification");return t.responseHandler.add("validate_api_request",G3),new oB(t,e)}async createBookmarksClient(e){const t=await this._createClientFn("bookmarks");return new HU(t,e)}async createContextClient(e){const t=await this._createClientFn("context");return t.responseHandler.add("validate_api_request",G3),new Bj(t,e)}async createPeopleClient(){const e=await this._createClientFn("people");return e.responseHandler.add("validate_api_request",G3),new mB(e)}}const yB="services",_B=(r,e)=>async t=>{if(r.hasClient(t))return r.createClient(t);if(e)return e.createClient(t);throw Error(`failed to create http client for service ${t}`)},RP={name:yB,configure:()=>new bj,initialize:async({ref:r,config:e,requireInstance:t,hasModule:n})=>{if(!e.createClient){const i=await t("http"),o=n("serviceDiscovery")?await t("serviceDiscovery"):r==null?void 0:r.serviceDiscovery;e.createClient=_B(i,o)}if(!e.createClient)throw Error("missing configuration for creating API client");return new vB(e)}},bB=r=>{r.addConfig({module:RP})};class wB extends XN{constructor(){super([oD,ck,Pw,_j,RP,dj]),this.logger=new hR("FrameworkConfigurator")}configureHttp(...e){this.addConfig(TV(...e))}configureHttpClient(...e){this.addConfig(iP(...e))}configureMsal(e,t=!0){this.addConfig({module:ck,configure:n=>{t!==void 0&&n.setRequiresAuth(!!t),typeof e=="function"&&e(n),typeof e=="object"&&n.setClientConfig(e)}})}configureServiceDiscovery(e){this.configureHttpClient("service_discovery",e.client)}}const xB=async(r,e)=>{const t=await r.initialize(e),n={modules:t};return window.Fusion=n,t.event.dispatchEvent("onFrameworkLoaded",{detail:n}),n};var x=dw();const lr=zu(x),Xw=aR({__proto__:null,default:lr},[x]),PP=x.createContext(null),CB=PP.Provider,MP=x.createContext({}),kB=MP.Provider,$P=()=>x.useContext(MP),EB=r=>$P()[r],SB=(r,e)=>x.lazy(async()=>{const t=new wB;await r(t,e);const n=await xB(t,e);return{default:({children:i})=>E.jsx(CB,{value:n,children:E.jsx(kB,{value:n.modules,children:i})})}}),jl=()=>{let r=x.useContext(PP);return r||console.warn("could not locate fusion in context!"),r??(r=window.Fusion),r||console.error("Could not load framework, might not be initiated?"),r},Jw=r=>{const t=jl().modules[r];return t||console.warn(`the requested module [${t}] is not included in the framework instance`),t},AB=r=>{const{configure:e,fallback:t,parent:n,children:i}=r,o=$P(),a=x.useMemo(()=>SB(e,n??o),[e,o,n]);return E.jsx(x.Suspense,{fallback:t,children:E.jsx(a,{children:i})})};function Cr(){return Cr=Object.assign?Object.assign.bind():function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)({}).hasOwnProperty.call(t,n)&&(r[n]=t[n])}return r},Cr.apply(null,arguments)}function Hf(r){"@babel/helpers - typeof";return Hf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Hf(r)}function W3(r){return r&&Hf(r)==="object"&&r.constructor===Object}function OP(r,e){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{clone:!0},n=t.clone?Cr({},r):r;return W3(r)&&W3(e)&&Object.keys(e).forEach(function(i){i!=="__proto__"&&(W3(e[i])&&i in r?n[i]=OP(r[i],e[i],t):n[i]=e[i])}),n}function TB(r,e){if(Hf(r)!="object"||!r)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e);if(Hf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(r)}function IB(r){var e=TB(r,"string");return Hf(e)=="symbol"?e:e+""}var RB=typeof Symbol=="function"&&Symbol.for;const ZP=RB?Symbol.for("mui.nested"):"__THEME_NESTED__";var PB=["checked","disabled","error","focused","focusVisible","required","expanded","selected"];function MB(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=r.disableGlobal,t=e===void 0?!1:e,n=r.productionPrefix,i=n===void 0?"jss":n,o=r.seed,a=o===void 0?"":o,c=a===""?"":"".concat(a,"-"),d=0,u=function(){return d+=1,d};return function(h,p){var m=p.options.name;if(m&&m.indexOf("Mui")===0&&!p.options.link&&!t){if(PB.indexOf(h.key)!==-1)return"Mui-".concat(h.key);var v="".concat(c).concat(m,"-").concat(h.key);return!p.options.theme[ZP]||a!==""?v:"".concat(v,"-").concat(u())}return"".concat(c).concat(i).concat(u())}}var Lk=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},d2=(typeof window>"u"?"undefined":Lk(window))==="object"&&(typeof document>"u"?"undefined":Lk(document))==="object"&&document.nodeType===9;function $B(r,e){for(var t=0;t<e.length;t++){var n=e[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(r,IB(n.key),n)}}function LP(r,e,t){return e&&$B(r.prototype,e),Object.defineProperty(r,"prototype",{writable:!1}),r}function Qb(r,e){return Qb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,n){return t.__proto__=n,t},Qb(r,e)}function HP(r,e){r.prototype=Object.create(e.prototype),r.prototype.constructor=r,Qb(r,e)}function Hk(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function NP(r,e){if(r==null)return{};var t={};for(var n in r)if({}.hasOwnProperty.call(r,n)){if(e.indexOf(n)!==-1)continue;t[n]=r[n]}return t}var OB={}.constructor;function Xb(r){if(r==null||typeof r!="object")return r;if(Array.isArray(r))return r.map(Xb);if(r.constructor!==OB)return r;var e={};for(var t in r)e[t]=Xb(r[t]);return e}function e8(r,e,t){r===void 0&&(r="unnamed");var n=t.jss,i=Xb(e),o=n.plugins.onCreateRule(r,i,t);return o||(r[0],null)}var Nk=function(e,t){for(var n="",i=0;i<e.length&&e[i]!=="!important";i++)n&&(n+=t),n+=e[i];return n},pu=function(e){if(!Array.isArray(e))return e;var t="";if(Array.isArray(e[0]))for(var n=0;n<e.length&&e[n]!=="!important";n++)t&&(t+=", "),t+=Nk(e[n]," ");else t=Nk(e,", ");return e[e.length-1]==="!important"&&(t+=" !important"),t};function r1(r){return r&&r.format===!1?{linebreak:"",space:""}:{linebreak:`
82
82
  `,space:" "}}function W1(r,e){for(var t="",n=0;n<e;n++)t+=" ";return t+r}function hm(r,e,t){t===void 0&&(t={});var n="";if(!e)return n;var i=t,o=i.indent,a=o===void 0?0:o,c=e.fallbacks;t.format===!1&&(a=-1/0);var d=r1(t),u=d.linebreak,h=d.space;if(r&&a++,c)if(Array.isArray(c))for(var p=0;p<c.length;p++){var m=c[p];for(var v in m){var _=m[v];_!=null&&(n&&(n+=u),n+=W1(v+":"+h+pu(_)+";",a))}}else for(var b in c){var C=c[b];C!=null&&(n&&(n+=u),n+=W1(b+":"+h+pu(C)+";",a))}for(var T in e){var A=e[T];A!=null&&T!=="fallbacks"&&(n&&(n+=u),n+=W1(T+":"+h+pu(A)+";",a))}return!n&&!t.allowEmpty||!r?n:(a--,n&&(n=""+u+n+u),W1(""+r+h+"{"+n,a)+W1("}",a))}var ZB=/([[\].#*$><+~=|^:(),"'`\s])/g,Dk=typeof CSS<"u"&&CSS.escape,t8=function(r){return Dk?Dk(r):r.replace(ZB,"\\$1")},DP=function(){function r(t,n,i){this.type="style",this.isProcessed=!1;var o=i.sheet,a=i.Renderer;this.key=t,this.options=i,this.style=n,o?this.renderer=o.renderer:a&&(this.renderer=new a)}var e=r.prototype;return e.prop=function(n,i,o){if(i===void 0)return this.style[n];var a=o?o.force:!1;if(!a&&this.style[n]===i)return this;var c=i;(!o||o.process!==!1)&&(c=this.options.jss.plugins.onChangeValue(i,n,this));var d=c==null||c===!1,u=n in this.style;if(d&&!u&&!a)return this;var h=d&&u;if(h?delete this.style[n]:this.style[n]=c,this.renderable&&this.renderer)return h?this.renderer.removeProperty(this.renderable,n):this.renderer.setProperty(this.renderable,n,c),this;var p=this.options.sheet;return p&&p.attached,this},r}(),Jb=function(r){HP(e,r);function e(n,i,o){var a;a=r.call(this,n,i,o)||this;var c=o.selector,d=o.scoped,u=o.sheet,h=o.generateId;return c?a.selectorText=c:d!==!1&&(a.id=h(Hk(Hk(a)),u),a.selectorText="."+t8(a.id)),a}var t=e.prototype;return t.applyTo=function(i){var o=this.renderer;if(o){var a=this.toJSON();for(var c in a)o.setProperty(i,c,a[c])}return this},t.toJSON=function(){var i={};for(var o in this.style){var a=this.style[o];typeof a!="object"?i[o]=a:Array.isArray(a)&&(i[o]=pu(a))}return i},t.toString=function(i){var o=this.options.sheet,a=o?o.options.link:!1,c=a?Cr({},i,{allowEmpty:!0}):i;return hm(this.selectorText,this.style,c)},LP(e,[{key:"selector",set:function(i){if(i!==this.selectorText){this.selectorText=i;var o=this.renderer,a=this.renderable;if(!(!a||!o)){var c=o.setSelector(a,i);c||o.replaceRule(a,this)}}},get:function(){return this.selectorText}}]),e}(DP),LB={onCreateRule:function(e,t,n){return e[0]==="@"||n.parent&&n.parent.type==="keyframes"?null:new Jb(e,t,n)}},Y3={indent:1,children:!0},HB=/@([\w-]+)/,NB=function(){function r(t,n,i){this.type="conditional",this.isProcessed=!1,this.key=t;var o=t.match(HB);this.at=o?o[1]:"unknown",this.query=i.name||"@"+this.at,this.options=i,this.rules=new _4(Cr({},i,{parent:this}));for(var a in n)this.rules.add(a,n[a]);this.rules.process()}var e=r.prototype;return e.getRule=function(n){return this.rules.get(n)},e.indexOf=function(n){return this.rules.indexOf(n)},e.addRule=function(n,i,o){var a=this.rules.add(n,i,o);return a?(this.options.jss.plugins.onProcessRule(a),a):null},e.replaceRule=function(n,i,o){var a=this.rules.replace(n,i,o);return a&&this.options.jss.plugins.onProcessRule(a),a},e.toString=function(n){n===void 0&&(n=Y3);var i=r1(n),o=i.linebreak;if(n.indent==null&&(n.indent=Y3.indent),n.children==null&&(n.children=Y3.children),n.children===!1)return this.query+" {}";var a=this.rules.toString(n);return a?this.query+" {"+o+a+o+"}":""},r}(),DB=/@container|@media|@supports\s+/,VB={onCreateRule:function(e,t,n){return DB.test(e)?new NB(e,t,n):null}},Q3={indent:1,children:!0},FB=/@keyframes\s+([\w-]+)/,e6=function(){function r(t,n,i){this.type="keyframes",this.at="@keyframes",this.isProcessed=!1;var o=t.match(FB);o&&o[1]?this.name=o[1]:this.name="noname",this.key=this.type+"-"+this.name,this.options=i;var a=i.scoped,c=i.sheet,d=i.generateId;this.id=a===!1?this.name:t8(d(this,c)),this.rules=new _4(Cr({},i,{parent:this}));for(var u in n)this.rules.add(u,n[u],Cr({},i,{parent:this}));this.rules.process()}var e=r.prototype;return e.toString=function(n){n===void 0&&(n=Q3);var i=r1(n),o=i.linebreak;if(n.indent==null&&(n.indent=Q3.indent),n.children==null&&(n.children=Q3.children),n.children===!1)return this.at+" "+this.id+" {}";var a=this.rules.toString(n);return a&&(a=""+o+a+o),this.at+" "+this.id+" {"+a+"}"},r}(),zB=/@keyframes\s+/,jB=/\$([\w-]+)/g,t6=function(e,t){return typeof e=="string"?e.replace(jB,function(n,i){return i in t?t[i]:n}):e},Vk=function(e,t,n){var i=e[t],o=t6(i,n);o!==i&&(e[t]=o)},UB={onCreateRule:function(e,t,n){return typeof e=="string"&&zB.test(e)?new e6(e,t,n):null},onProcessStyle:function(e,t,n){return t.type!=="style"||!n||("animation-name"in e&&Vk(e,"animation-name",n.keyframes),"animation"in e&&Vk(e,"animation",n.keyframes)),e},onChangeValue:function(e,t,n){var i=n.options.sheet;if(!i)return e;switch(t){case"animation":return t6(e,i.keyframes);case"animation-name":return t6(e,i.keyframes);default:return e}}},BB=function(r){HP(e,r);function e(){return r.apply(this,arguments)||this}var t=e.prototype;return t.toString=function(i){var o=this.options.sheet,a=o?o.options.link:!1,c=a?Cr({},i,{allowEmpty:!0}):i;return hm(this.key,this.style,c)},e}(DP),qB={onCreateRule:function(e,t,n){return n.parent&&n.parent.type==="keyframes"?new BB(e,t,n):null}},KB=function(){function r(t,n,i){this.type="font-face",this.at="@font-face",this.isProcessed=!1,this.key=t,this.style=n,this.options=i}var e=r.prototype;return e.toString=function(n){var i=r1(n),o=i.linebreak;if(Array.isArray(this.style)){for(var a="",c=0;c<this.style.length;c++)a+=hm(this.at,this.style[c]),this.style[c+1]&&(a+=o);return a}return hm(this.at,this.style,n)},r}(),GB=/@font-face/,WB={onCreateRule:function(e,t,n){return GB.test(e)?new KB(e,t,n):null}},YB=function(){function r(t,n,i){this.type="viewport",this.at="@viewport",this.isProcessed=!1,this.key=t,this.style=n,this.options=i}var e=r.prototype;return e.toString=function(n){return hm(this.key,this.style,n)},r}(),QB={onCreateRule:function(e,t,n){return e==="@viewport"||e==="@-ms-viewport"?new YB(e,t,n):null}},XB=function(){function r(t,n,i){this.type="simple",this.isProcessed=!1,this.key=t,this.value=n,this.options=i}var e=r.prototype;return e.toString=function(n){if(Array.isArray(this.value)){for(var i="",o=0;o<this.value.length;o++)i+=this.key+" "+this.value[o]+";",this.value[o+1]&&(i+=`
83
83
  `);return i}return this.key+" "+this.value+";"},r}(),JB={"@charset":!0,"@import":!0,"@namespace":!0},eq={onCreateRule:function(e,t,n){return e in JB?new XB(e,t,n):null}},Fk=[LB,VB,UB,qB,WB,QB,eq],tq={process:!0},zk={force:!0,process:!0},_4=function(){function r(t){this.map={},this.raw={},this.index=[],this.counter=0,this.options=t,this.classes=t.classes,this.keyframes=t.keyframes}var e=r.prototype;return e.add=function(n,i,o){var a=this.options,c=a.parent,d=a.sheet,u=a.jss,h=a.Renderer,p=a.generateId,m=a.scoped,v=Cr({classes:this.classes,parent:c,sheet:d,jss:u,Renderer:h,generateId:p,scoped:m,name:n,keyframes:this.keyframes,selector:void 0},o),_=n;n in this.raw&&(_=n+"-d"+this.counter++),this.raw[_]=i,_ in this.classes&&(v.selector="."+t8(this.classes[_]));var b=e8(_,i,v);if(!b)return null;this.register(b);var C=v.index===void 0?this.index.length:v.index;return this.index.splice(C,0,b),b},e.replace=function(n,i,o){var a=this.get(n),c=this.index.indexOf(a);a&&this.remove(a);var d=o;return c!==-1&&(d=Cr({},o,{index:c})),this.add(n,i,d)},e.get=function(n){return this.map[n]},e.remove=function(n){this.unregister(n),delete this.raw[n.key],this.index.splice(this.index.indexOf(n),1)},e.indexOf=function(n){return this.index.indexOf(n)},e.process=function(){var n=this.options.jss.plugins;this.index.slice(0).forEach(n.onProcessRule,n)},e.register=function(n){this.map[n.key]=n,n instanceof Jb?(this.map[n.selector]=n,n.id&&(this.classes[n.key]=n.id)):n instanceof e6&&this.keyframes&&(this.keyframes[n.name]=n.id)},e.unregister=function(n){delete this.map[n.key],n instanceof Jb?(delete this.map[n.selector],delete this.classes[n.key]):n instanceof e6&&delete this.keyframes[n.name]},e.update=function(){var n,i,o;if(typeof(arguments.length<=0?void 0:arguments[0])=="string"?(n=arguments.length<=0?void 0:arguments[0],i=arguments.length<=1?void 0:arguments[1],o=arguments.length<=2?void 0:arguments[2]):(i=arguments.length<=0?void 0:arguments[0],o=arguments.length<=1?void 0:arguments[1],n=null),n)this.updateOne(this.get(n),i,o);else for(var a=0;a<this.index.length;a++)this.updateOne(this.index[a],i,o)},e.updateOne=function(n,i,o){o===void 0&&(o=tq);var a=this.options,c=a.jss.plugins,d=a.sheet;if(n.rules instanceof r){n.rules.update(i,o);return}var u=n.style;if(c.onUpdate(i,n,d,o),o.process&&u&&u!==n.style){c.onProcessStyle(n.style,n,d);for(var h in n.style){var p=n.style[h],m=u[h];p!==m&&n.prop(h,p,zk)}for(var v in u){var _=n.style[v],b=u[v];_==null&&_!==b&&n.prop(v,null,zk)}}},e.toString=function(n){for(var i="",o=this.options.sheet,a=o?o.options.link:!1,c=r1(n),d=c.linebreak,u=0;u<this.index.length;u++){var h=this.index[u],p=h.toString(n);!p&&!a||(i&&(i+=d),i+=p)}return i},r}(),VP=function(){function r(t,n){this.attached=!1,this.deployed=!1,this.classes={},this.keyframes={},this.options=Cr({},n,{sheet:this,parent:this,classes:this.classes,keyframes:this.keyframes}),n.Renderer&&(this.renderer=new n.Renderer(this)),this.rules=new _4(this.options);for(var i in t)this.rules.add(i,t[i]);this.rules.process()}var e=r.prototype;return e.attach=function(){return this.attached?this:(this.renderer&&this.renderer.attach(),this.attached=!0,this.deployed||this.deploy(),this)},e.detach=function(){return this.attached?(this.renderer&&this.renderer.detach(),this.attached=!1,this):this},e.addRule=function(n,i,o){var a=this.queue;this.attached&&!a&&(this.queue=[]);var c=this.rules.add(n,i,o);return c?(this.options.jss.plugins.onProcessRule(c),this.attached?(this.deployed&&(a?a.push(c):(this.insertRule(c),this.queue&&(this.queue.forEach(this.insertRule,this),this.queue=void 0))),c):(this.deployed=!1,c)):null},e.replaceRule=function(n,i,o){var a=this.rules.get(n);if(!a)return this.addRule(n,i,o);var c=this.rules.replace(n,i,o);return c&&this.options.jss.plugins.onProcessRule(c),this.attached?(this.deployed&&this.renderer&&(c?a.renderable&&this.renderer.replaceRule(a.renderable,c):this.renderer.deleteRule(a)),c):(this.deployed=!1,c)},e.insertRule=function(n){this.renderer&&this.renderer.insertRule(n)},e.addRules=function(n,i){var o=[];for(var a in n){var c=this.addRule(a,n[a],i);c&&o.push(c)}return o},e.getRule=function(n){return this.rules.get(n)},e.deleteRule=function(n){var i=typeof n=="object"?n:this.rules.get(n);return!i||this.attached&&!i.renderable?!1:(this.rules.remove(i),this.attached&&i.renderable&&this.renderer?this.renderer.deleteRule(i.renderable):!0)},e.indexOf=function(n){return this.rules.indexOf(n)},e.deploy=function(){return this.renderer&&this.renderer.deploy(),this.deployed=!0,this},e.update=function(){var n;return(n=this.rules).update.apply(n,arguments),this},e.updateOne=function(n,i,o){return this.rules.updateOne(n,i,o),this},e.toString=function(n){return this.rules.toString(n)},r}(),rq=function(){function r(){this.plugins={internal:[],external:[]},this.registry={}}var e=r.prototype;return e.onCreateRule=function(n,i,o){for(var a=0;a<this.registry.onCreateRule.length;a++){var c=this.registry.onCreateRule[a](n,i,o);if(c)return c}return null},e.onProcessRule=function(n){if(!n.isProcessed){for(var i=n.options.sheet,o=0;o<this.registry.onProcessRule.length;o++)this.registry.onProcessRule[o](n,i);n.style&&this.onProcessStyle(n.style,n,i),n.isProcessed=!0}},e.onProcessStyle=function(n,i,o){for(var a=0;a<this.registry.onProcessStyle.length;a++)i.style=this.registry.onProcessStyle[a](i.style,i,o)},e.onProcessSheet=function(n){for(var i=0;i<this.registry.onProcessSheet.length;i++)this.registry.onProcessSheet[i](n)},e.onUpdate=function(n,i,o,a){for(var c=0;c<this.registry.onUpdate.length;c++)this.registry.onUpdate[c](n,i,o,a)},e.onChangeValue=function(n,i,o){for(var a=n,c=0;c<this.registry.onChangeValue.length;c++)a=this.registry.onChangeValue[c](a,i,o);return a},e.use=function(n,i){i===void 0&&(i={queue:"external"});var o=this.plugins[i.queue];o.indexOf(n)===-1&&(o.push(n),this.registry=[].concat(this.plugins.external,this.plugins.internal).reduce(function(a,c){for(var d in c)d in a&&a[d].push(c[d]);return a},{onCreateRule:[],onProcessRule:[],onProcessStyle:[],onProcessSheet:[],onChangeValue:[],onUpdate:[]}))},r}(),nq=function(){function r(){this.registry=[]}var e=r.prototype;return e.add=function(n){var i=this.registry,o=n.options.index;if(i.indexOf(n)===-1){if(i.length===0||o>=this.index){i.push(n);return}for(var a=0;a<i.length;a++)if(i[a].options.index>o){i.splice(a,0,n);return}}},e.reset=function(){this.registry=[]},e.remove=function(n){var i=this.registry.indexOf(n);this.registry.splice(i,1)},e.toString=function(n){for(var i=n===void 0?{}:n,o=i.attached,a=NP(i,["attached"]),c=r1(a),d=c.linebreak,u="",h=0;h<this.registry.length;h++){var p=this.registry[h];o!=null&&p.attached!==o||(u&&(u+=d),u+=p.toString(a))}return u},LP(r,[{key:"index",get:function(){return this.registry.length===0?0:this.registry[this.registry.length-1].options.index}}]),r}(),Mp=new nq,r6=typeof globalThis<"u"?globalThis:typeof window<"u"&&window.Math===Math?window:typeof self<"u"&&self.Math===Math?self:Function("return this")(),n6="2f1acc6c3a606b082e5eef5e54414ffb";r6[n6]==null&&(r6[n6]=0);var jk=r6[n6]++,Uk=function(e){e===void 0&&(e={});var t=0,n=function(o,a){t+=1;var c="",d="";return a&&(a.options.classNamePrefix&&(d=a.options.classNamePrefix),a.options.jss.id!=null&&(c=String(a.options.jss.id))),e.minify?""+(d||"c")+jk+c+t:d+o.key+"-"+jk+(c?"-"+c:"")+"-"+t};return n},FP=function(e){var t;return function(){return t||(t=e()),t}},iq=function(e,t){try{return e.attributeStyleMap?e.attributeStyleMap.get(t):e.style.getPropertyValue(t)}catch{return""}},oq=function(e,t,n){try{var i=n;if(Array.isArray(n)&&(i=pu(n)),e.attributeStyleMap)e.attributeStyleMap.set(t,i);else{var o=i?i.indexOf("!important"):-1,a=o>-1?i.substr(0,o-1):i;e.style.setProperty(t,a,o>-1?"important":"")}}catch{return!1}return!0},aq=function(e,t){try{e.attributeStyleMap?e.attributeStyleMap.delete(t):e.style.removeProperty(t)}catch{}},sq=function(e,t){return e.selectorText=t,e.selectorText===t},zP=FP(function(){return document.querySelector("head")});function cq(r,e){for(var t=0;t<r.length;t++){var n=r[t];if(n.attached&&n.options.index>e.index&&n.options.insertionPoint===e.insertionPoint)return n}return null}function lq(r,e){for(var t=r.length-1;t>=0;t--){var n=r[t];if(n.attached&&n.options.insertionPoint===e.insertionPoint)return n}return null}function dq(r){for(var e=zP(),t=0;t<e.childNodes.length;t++){var n=e.childNodes[t];if(n.nodeType===8&&n.nodeValue.trim()===r)return n}return null}function uq(r){var e=Mp.registry;if(e.length>0){var t=cq(e,r);if(t&&t.renderer)return{parent:t.renderer.element.parentNode,node:t.renderer.element};if(t=lq(e,r),t&&t.renderer)return{parent:t.renderer.element.parentNode,node:t.renderer.element.nextSibling}}var n=r.insertionPoint;if(n&&typeof n=="string"){var i=dq(n);if(i)return{parent:i.parentNode,node:i.nextSibling}}return!1}function hq(r,e){var t=e.insertionPoint,n=uq(e);if(n!==!1&&n.parent){n.parent.insertBefore(r,n.node);return}if(t&&typeof t.nodeType=="number"){var i=t,o=i.parentNode;o&&o.insertBefore(r,i.nextSibling);return}zP().appendChild(r)}var fq=FP(function(){var r=document.querySelector('meta[property="csp-nonce"]');return r?r.getAttribute("content"):null}),Bk=function(e,t,n){try{"insertRule"in e?e.insertRule(t,n):"appendRule"in e&&e.appendRule(t)}catch{return!1}return e.cssRules[n]},qk=function(e,t){var n=e.cssRules.length;return t===void 0||t>n?n:t},pq=function(){var e=document.createElement("style");return e.textContent=`
84
84
  `,e},mq=function(){function r(t){this.getPropertyValue=iq,this.setProperty=oq,this.removeProperty=aq,this.setSelector=sq,this.hasInsertedRules=!1,this.cssRules=[],t&&Mp.add(t),this.sheet=t;var n=this.sheet?this.sheet.options:{},i=n.media,o=n.meta,a=n.element;this.element=a||pq(),this.element.setAttribute("data-jss",""),i&&this.element.setAttribute("media",i),o&&this.element.setAttribute("data-meta",o);var c=fq();c&&this.element.setAttribute("nonce",c)}var e=r.prototype;return e.attach=function(){if(!(this.element.parentNode||!this.sheet)){hq(this.element,this.sheet.options);var n=!!(this.sheet&&this.sheet.deployed);this.hasInsertedRules&&n&&(this.hasInsertedRules=!1,this.deploy())}},e.detach=function(){if(this.sheet){var n=this.element.parentNode;n&&n.removeChild(this.element),this.sheet.options.link&&(this.cssRules=[],this.element.textContent=`
@@ -401,7 +401,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
401
401
  class="progress">
402
402
  </circle>
403
403
  </svg>
404
- `}}P([ft({type:String,reflect:!0})],p2.prototype,"size",void 0);P([ft({type:String,reflect:!0})],p2.prototype,"color",void 0);p2.styles=UG;const CM="fwc-circular-progress";let pE=class extends p2{};pE=P([Sr(CM)],pE);const BG=u2(h2,wM);u2(p2,CM);u2(f2,xM);const kM=({children:r,text:e})=>E.jsx("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",width:"100vw",height:"100vh",overflow:"hidden"},children:E.jsx(BG,{text:e,children:r})}),qG=()=>({setManifest:nn("set_manifest",(r,e)=>({payload:r,meta:{created:Date.now(),update:e}})),fetchManifest:hi("fetch_manifest",(r,e)=>({payload:r,meta:{update:e}}),r=>({payload:r}),r=>({payload:r})),setConfig:nn("set_config",r=>({payload:r})),fetchConfig:hi("fetch_config",r=>({payload:r}),r=>({payload:r}),r=>({payload:r})),setSettings:nn("set_settings",r=>({payload:r})),fetchSettings:hi("fetch_settings",r=>({payload:{appKey:r}}),r=>({payload:r}),r=>({payload:r})),updateSettings:hi("update_settings",(r,e)=>({payload:{appKey:r,settings:e}}),r=>({payload:r}),r=>({payload:r})),updateSettingsAbort:nn("update_settings::abort",r=>({payload:r})),setModule:nn("set_module",r=>({payload:r})),importApp:hi("import_app",r=>({payload:r}),r=>({payload:r}),r=>({payload:r})),setInstance:nn("set_instance",r=>({payload:r})),initialize:hi("initialize_app",()=>({payload:null}),()=>({payload:null}),r=>({payload:r}))}),pt=qG();Cz();const KG=r=>a2({...r,status:new Set},e=>e.addCase(pt.setManifest,(t,n)=>{n.meta.update?t.manifest=Object.assign(t.manifest??{},n.payload):t.manifest=n.payload}).addCase(pt.setConfig,(t,n)=>{t.config=n.payload}).addCase(pt.setSettings,(t,n)=>{t.settings=n.payload}).addCase(pt.setModule,(t,n)=>{t.modules=n.payload}).addCase(pt.setInstance,(t,n)=>{t.instance=n.payload}).addMatcher(kP,(t,n)=>{t.status.add(kv(n.type))}).addMatcher(SP,(t,n)=>{t.status.delete(kv(n.type))})),GG=r=>e=>e.pipe(Oe(pt.fetchManifest.match),Qt(t=>{const{payload:n,meta:{update:i}}=t,o=at(r.getAppManifest(n)).pipe(Oe(a=>!!a),Jf());return El(o.pipe(me(a=>pt.setManifest(a,i))),o.pipe(Ci(),me(a=>pt.fetchManifest.success(a)))).pipe(jt(a=>Pt(pt.fetchManifest.failure(a))))})),WG=r=>e=>e.pipe(Oe(pt.fetchConfig.match),Qt(({payload:t})=>{var i;const n=at(r.getAppConfig(t.appKey,(i=t.build)==null?void 0:i.version)).pipe(Oe(o=>!!o),Jf());return El(n.pipe(me(o=>pt.setConfig(o))),n.pipe(Ci(),me(o=>pt.fetchConfig.success(o)))).pipe(jt(o=>Pt(pt.fetchConfig.failure(o))))})),YG=r=>e=>e.pipe(Oe(pt.fetchSettings.match),Qt(({payload:t})=>{const{appKey:n}=t,i=at(r.getAppSettings(n)).pipe(Oe(o=>!!o),Jf());return El(i.pipe(me(o=>pt.setSettings(o))),i.pipe(Ci(),me(o=>pt.fetchSettings.success(o)))).pipe(jt(o=>Pt(pt.fetchSettings.failure(o))))})),QG=r=>e=>e.pipe(Oe(pt.updateSettings.match)).pipe(Qt(({payload:t})=>{const{appKey:n,settings:i}=t;return r.updateAppSettings(n,i).pipe(Ci(),bs(o=>at([pt.setSettings(o),pt.updateSettings.success(o)])),jt(o=>Pt(pt.updateSettings.failure(o))))})),XG=r=>e=>e.pipe(Oe(pt.importApp.match),Qt(({payload:t})=>{const n=[r.assetUri,t].join("/").replace(/\/{2,}/g,"/");return at(import(n)).pipe(me(pt.importApp.success),jt(i=>Pt(pt.importApp.failure(i))))})),JG=(r,e)=>{const t=KG(r),n=new o2(t);return n.addFlow(GG(e)),n.addFlow(WG(e)),n.addFlow(YG(e)),n.addFlow(QG(e)),n.addFlow(XG(e)),n};function Hh(){return Oe(r=>r!=null)}const eW={};var Fe,a4,EM;class tW{constructor(e,t){Ie(this,a4);Ie(this,Fe);Le(this,"dispose");Be(this,Fe,JG(e,t.provider));const{appKey:n}=e,{event:i}=t;i&&Rx(this,a4,EM).call(this,i);const o=new Qn;i&&(o.add(()=>{i.dispatchEvent("onAppDispose",{detail:{appKey:n}})}),o.add(i.addEventListener("onAppModulesLoaded",a=>{a.detail.appKey===n&&k(this,Fe).next(pt.setInstance(a.detail.modules))}))),this.dispose=()=>{o==null||o.unsubscribe(),k(this,Fe).value.instance&&k(this,Fe).value.instance.dispose(),k(this,Fe).complete()}}get manifest$(){return k(this,Fe).select(e=>e.manifest).pipe(Hh())}get config$(){return k(this,Fe).select(e=>e.config,zb).pipe(Hh())}get modules$(){return k(this,Fe).select(e=>e.modules).pipe(Hh())}get instance$(){return k(this,Fe).select(e=>e.instance).pipe(Hh())}get settings$(){return new It(e=>{k(this,Fe).next(pt.fetchSettings(this.appKey)),e.add(k(this,Fe).select(t=>t.settings,zb).pipe(Hh(),Ew(eW)).subscribe(e))})}get status$(){return k(this,Fe).select(e=>e.status)}get state(){return Object.freeze(k(this,Fe).value)}get appKey(){return k(this,Fe).value.appKey}get manifest(){return this.state.manifest}get manifestAsync(){return Vn(this.manifest$)}get config(){return this.state.config}get configAsync(){return Vn(this.config$)}get instance(){return k(this,Fe).value.instance}initialize(){return new It(e=>{k(this,Fe).next(pt.initialize()),e.add($N([this.getManifest(),this.getAppModule(),this.getConfig()]).subscribe({next:([t,n,i])=>e.next({manifest:t,script:n,config:i}),error:t=>{e.error(t),k(this,Fe).next(pt.initialize.failure(t))},complete:()=>{k(this,Fe).next(pt.initialize.success()),e.complete()}}))})}loadConfig(){(this.manifest?Pt(this.manifest):this.getManifest()).subscribe({next:e=>{k(this,Fe).next(pt.fetchConfig(e))}})}loadManifest(e){k(this,Fe).next(pt.fetchManifest(this.appKey,e))}updateManifest(e,t){k(this,Fe).next(pt.setManifest(e,!t))}async loadAppModule(e=!0){var n;const t=await this.getManifestAsync(e);(n=t.build)!=null&&n.entryPoint?k(this,Fe).next(pt.importApp(t.build.entryPoint)):console.warn(`The ${t.appKey} is missing entryPoint, please upload a build for the app before continuing`)}getConfig(e=!1){return new It(t=>{if(k(this,Fe).value.config&&(t.next(k(this,Fe).value.config),!e))return t.complete();t.add(k(this,Fe).addEffect("set_config",({payload:n})=>{t.next(n)})),t.add(k(this,Fe).addEffect("fetch_config::success",({payload:n})=>{t.next(n),t.complete()})),t.add(k(this,Fe).addEffect("fetch_config::failure",({payload:n})=>{t.error(Error("failed to load application config",{cause:n}))})),this.loadConfig()})}getConfigAsync(e=!0){return(e?Vn:hr)(this.getConfig(!e))}getSettings(e=!1){return new It(t=>{if(k(this,Fe).value.settings&&(t.next(k(this,Fe).value.settings),!e))return t.complete();t.add(k(this,Fe).addEffect("set_settings",({payload:n})=>{t.next(n)})),t.add(k(this,Fe).addEffect("fetch_settings::success",({payload:n})=>{t.next(n),t.complete()})),t.add(k(this,Fe).addEffect("fetch_settings::failure",({payload:n})=>{t.error(Error("failed to load application settings",{cause:n}))})),k(this,Fe).next(pt.fetchSettings(this.appKey))})}getSettingsAsync(e=!0){return(e?Vn:hr)(this.getSettings(!e))}updateSettings(e){return new It(t=>{t.add(k(this,Fe).addEffect("update_settings::failure",({payload:n})=>{k(this,Fe).next(pt.fetchSettings(this.appKey)),t.error(Error("failed to update application settings",{cause:n}))})),t.add(k(this,Fe).addEffect("update_settings::success",({payload:n})=>{t.next(n),t.complete()})),k(this,Fe).next(pt.setSettings(e)),k(this,Fe).next(pt.updateSettings(this.appKey,e))})}updateSettingsAsync(e){return hr(this.updateSettings(e))}updateSetting(e,t){return(k(this,Fe).value.settings===void 0?this.getSettings().pipe(Ci()):Pt(k(this,Fe).value.settings)).pipe(me(i=>({...i,[e]:t})),Qt(i=>this.updateSettings(i)),me(i=>i[e]))}updateSettingAsync(e,t){return hr(this.updateSetting(e,t))}getManifest(e=!1){return new It(t=>{if(k(this,Fe).value.manifest&&(t.next(k(this,Fe).value.manifest),!e))return t.complete();t.add(k(this,Fe).addEffect("set_manifest",({payload:n})=>{t.next(n)})),t.add(k(this,Fe).addEffect("fetch_manifest::success",({payload:n})=>{t.next(n),t.complete()})),t.add(k(this,Fe).addEffect("fetch_manifest::failure",({payload:n})=>{t.error(Error("failed to load application manifest",{cause:n}))})),this.loadManifest()})}getManifestAsync(e=!0){return(e?Vn:hr)(this.getManifest(!e))}getAppModule(e=!1){return new It(t=>{if(k(this,Fe).value.modules&&(t.next(k(this,Fe).value.modules),!e))return t.complete();t.add(k(this,Fe).addEffect("set_module",({payload:n})=>{t.next(n)})),t.add(k(this,Fe).addEffect("import_app::success",({payload:n})=>{t.next(n),t.complete()})),t.add(k(this,Fe).addEffect("import_app::failure",({payload:n})=>{t.error(Error("failed to load application modules from script",{cause:n}))})),t.add(this.getManifest().subscribe(n=>{var i;if((i=n.build)!=null&&i.entryPoint){const o=n.build.assetPath??[n.appKey,n.build.version].join("@");k(this,Fe).next(pt.importApp([o,n.build.entryPoint].join("/")))}else console.error(`The ${n.appKey} app is missing a entry in the manifest, upload a build for your app before continuing`)}))})}getAppModuleAsync(e=!0){return(e?Vn:hr)(this.getAppModule(!e))}}Fe=new WeakMap,a4=new WeakSet,EM=function(e){const{appKey:t}=this;k(this,Fe).addEffect(pt.fetchManifest.type,()=>{e.dispatchEvent("onAppManifestLoad",{detail:{appKey:t},source:this})}),k(this,Fe).addEffect(pt.fetchManifest.success.type,n=>{e.dispatchEvent("onAppManifestLoaded",{detail:{appKey:t,manifest:n.payload},source:this})}),k(this,Fe).addEffect(pt.fetchManifest.failure.type,n=>{e.dispatchEvent("onAppManifestFailure",{detail:{appKey:t,error:n.payload},source:this})}),k(this,Fe).addEffect(pt.fetchConfig.type,()=>{e.dispatchEvent("onAppConfigLoad",{detail:{appKey:t},source:this})}),k(this,Fe).addEffect(pt.fetchConfig.success.type,n=>{e.dispatchEvent("onAppConfigLoaded",{detail:{appKey:t,config:n.payload},source:this})}),k(this,Fe).addEffect(pt.fetchConfig.failure.type,n=>{e.dispatchEvent("onAppConfigFailure",{detail:{appKey:t,error:n.payload},source:this})}),k(this,Fe).addEffect(pt.fetchSettings.type,()=>{e.dispatchEvent("onAppSettingsLoad",{detail:{appKey:t},source:this})}),k(this,Fe).addEffect(pt.fetchSettings.success.type,n=>{e.dispatchEvent("onAppSettingsLoaded",{detail:{appKey:t,settings:n.payload},source:this})}),k(this,Fe).addEffect(pt.fetchSettings.failure.type,n=>{e.dispatchEvent("onAppSettingsFailure",{detail:{appKey:t,error:n.payload},source:this})}),k(this,Fe).addEffect(pt.updateSettings.type,n=>{e.dispatchEvent("onAppSettingsUpdate",{detail:{appKey:t,settings:n.payload.settings},source:this})}),k(this,Fe).addEffect(pt.updateSettings.success.type,n=>{e.dispatchEvent("onAppSettingsUpdated",{detail:{appKey:t,settings:n.payload.settings},source:this})}),k(this,Fe).addEffect(pt.updateSettings.failure.type,n=>{e.dispatchEvent("onAppSettingsUpdateFailure",{detail:{appKey:t,settings:n.payload},source:this})}),k(this,Fe).addEffect(pt.importApp.type,()=>{e.dispatchEvent("onAppScriptLoad",{detail:{appKey:t},source:this})}),k(this,Fe).addEffect(pt.importApp.success.type,n=>{e.dispatchEvent("onAppScriptLoaded",{detail:{appKey:t,script:n.payload},source:this})}),k(this,Fe).addEffect(pt.importApp.failure.type,n=>{e.dispatchEvent("onAppScriptFailure",{detail:{appKey:t,error:n.payload},source:this})}),k(this,Fe).addEffect(pt.initialize.type,()=>{e.dispatchEvent("onAppInitialize",{detail:{appKey:t},source:this})}),k(this,Fe).addEffect(pt.initialize.success.type,()=>{e.dispatchEvent("onAppInitialized",{detail:{appKey:t},source:this})}),k(this,Fe).addEffect(pt.initialize.failure.type,({payload:n})=>{e.dispatchEvent("onAppInitializeFailure",{detail:{appKey:t,error:n},source:this})})};const rW="6.1.10";var rc,Bm,nc,vf,qm;class nW{constructor(e){Ie(this,rc);Ie(this,Bm);Ie(this,nc);Ie(this,vf,new Qn);Ie(this,qm);const{event:t,config:n}=e;Be(this,rc,n.client),Be(this,qm,t),Be(this,nc,new Xf(void 0)),Be(this,Bm,n.assetUri??""),k(this,vf).add(this.current$.pipe(ev(),VR(()=>!!t)).subscribe(([i,o])=>{t==null||t.dispatchEvent("onCurrentAppChanged",{source:this,detail:{previous:i,next:o}})})),k(this,vf).add(k(this,nc).pipe(ev(),me(([i])=>i),Hh()).subscribe(i=>i.dispose()))}static compareAppManifest(e,t){return JSON.stringify(e)===JSON.stringify(t)}get version(){return new fs(rW)}get current(){return k(this,nc).value}get current$(){return k(this,nc).pipe(Jg((e,t)=>e&&t?e.appKey===t.appKey:e===t))}getAppManifest(e){return at(k(this,rc).getAppManifest({appKey:e}))}getAppManifests(e){return at(k(this,rc).getAppManifests(e))}getAllAppManifests(){return this.getAppManifests()}getAppConfig(e,t){return at(k(this,rc).getAppConfig({appKey:e,tag:t}))}getAppSettings(e){return at(k(this,rc).getAppSettings({appKey:e}))}updateAppSettings(e,t){return at(k(this,rc).updateAppSettings({appKey:e,settings:t}))}setCurrentApp(e){const t=typeof e=="string"?this.createApp({appKey:e}):e;k(this,nc).next(t)}clearCurrentApp(){k(this,nc).next(null)}get assetUri(){return k(this,Bm)}createApp(e){return console.warn(),new tW(e,{provider:this,event:k(this,qm)})}dispose(){k(this,vf).unsubscribe()}}rc=new WeakMap,Bm=new WeakMap,nc=new WeakMap,vf=new WeakMap,qm=new WeakMap;const l6="app",iW={name:l6,configure:()=>new uW,initialize:async r=>{const e=await r.config.createConfigAsync(r),t=await r.requireInstance("event").catch(()=>{});return new nW({config:e,event:t})},dispose:r=>{r.instance.dispose()}},oW=j.object({environment:j.record(j.any()).optional().default({}),endpoints:j.record(j.object({url:j.string(),scopes:j.array(j.string()).optional().default([])})).optional()}),d6=j.object({azureUniqueId:j.string({description:"The unique identifier for the person in Azure."}),displayName:j.string({description:"The display name of the person."}),mail:j.string({description:"The email address of the person, which can be null or undefined."}).nullish(),upn:j.string({description:"The User Principal Name (UPN) of the person, which can be null or undefined."}).nullish(),accountType:j.string({description:"The type of account the person has."}),accountClassification:j.string({description:"The classification of the account, which can be null or undefined."}).nullish(),isExpired:j.boolean({description:"Indicates whether the account is expired, which can be null or undefined."}).nullish()}),aW=j.object({version:j.string(),entryPoint:j.string(),tags:j.array(j.string()).nullish(),tag:j.enum(["latest","preview"]).nullish(),assetPath:j.string().nullish(),configUrl:j.string().nullish(),timestamp:j.string().nullish(),commitSha:j.string().nullish(),githubRepo:j.string().nullish(),projectPage:j.string().nullish(),allowedExtensions:j.array(j.string()).nullish(),uploadedBy:d6.nullish()}),sW=j.object({appKey:j.string(),displayName:j.string(),description:j.string(),type:j.string(),isPinned:j.boolean().nullish(),templateSource:j.string().nullish(),category:j.object({id:j.string(),name:j.string(),displayName:j.string(),color:j.string(),defaultIcon:j.string(),sortOrder:j.number()}).nullish(),visualization:j.object({color:j.string().nullish(),icon:j.string().nullish(),sortOrder:j.number()}).nullish(),keywords:j.array(j.string()).nullish(),admins:j.array(d6).nullish(),owners:j.array(d6).nullish(),build:aW.nullish()});class Pl extends Error{constructor(t,n,i){super(n,i);Le(this,"type");this.type=t}static fromHttpResponse(t,n){switch(t.status){case 401:return new Pl("unauthorized","failed to load application manifest, request not authorized",n);case 404:return new Pl("not_found","application manifest not found",n)}return new Pl("unknown",`failed to load application manifest, status code ${t.status}`,n)}}class mu extends Error{constructor(t,n,i){super(n,i);Le(this,"type");this.type=t}static fromHttpResponse(t,n){switch(t.status){case 401:return new mu("unauthorized","failed to load application config, request not authorized",n);case 404:return new mu("not_found","application config not found",n)}return new mu("unknown",`failed to load application config, status code ${t.status}`,n)}}class gu extends Error{constructor(t,n,i){super(n,i);Le(this,"type");this.type=t}static fromHttpResponse(t,n){switch(t.status){case 401:return new gu("unauthorized","failed to load application settings, request not authorized",n);case 404:return new gu("not_found","application not found",n)}return new gu("unknown",`failed to load application settings, status code ${t.status}`,n)}}const SM=r=>{for(const e of Object.keys(r))typeof r[e]=="object"&&r[e]!==null&&!Object.isFrozen(r[e])&&SM(r[e]);return Object.freeze(r)};var yf;class cW{constructor(e){Ie(this,yf);Le(this,"environment");this.environment=SM(e.environment??{}),Be(this,yf,e.endpoints??{})}get endpoints(){return console.warn("endpoints is deprecated, use getEndpoint instead"),new Proxy(k(this,yf),{get(e,t){var n;return(n=e[t])==null?void 0:n.url}})}getEndpoint(e){return k(this,yf)[e]}}yf=new WeakMap;const lW=async r=>{const e=await If(r),t=oW.parse(e);return new cW(t)},mE=sW.transform(r=>{const{category:e,...t}=r;return{...t,get key(){return t.appKey},get name(){return t.displayName},categoryId:e==null?void 0:e.id,category:e}});var _f,bf,wf,cu,Km;class dW{constructor(e){Ie(this,_f);Ie(this,bf);Ie(this,wf);Ie(this,cu);Ie(this,Km);Be(this,Km,e);const t=1*60*1e3;Be(this,_f,new yi({client:{fn:({appKey:n})=>e.json(`/persons/me/apps/${n}`,{headers:{"Api-Version":"1.0"},selector:async i=>mE.parse(await If(i))})},queueOperator:"merge",key:({appKey:n})=>n,expire:t})),Be(this,bf,new yi({client:{fn:n=>{const i=n!=null&&n.filterByCurrentUser?"/persons/me/apps":"/apps?=$expand=category,admins,owners,keywords";return e.json(i,{headers:{"Api-Version":"1.0"},selector:async o=>{const a=await If(o);return mE.array().parse(a.value)}})}},key:n=>n!=null&&n.filterByCurrentUser?"currentUser":"all",expire:t})),Be(this,wf,new yi({client:{fn:({appKey:n,tag:i="latest"})=>e.json(`/apps/${n}/builds/${i}/config`,{selector:lW,headers:{"Api-Version":"1.0"}})},queueOperator:"merge",key:n=>JSON.stringify(n),expire:t})),Be(this,cu,new yi({client:{fn:({appKey:n})=>e.json(`/persons/me/apps/${n}/settings`,{headers:{"Api-Version":"1.0"}})},key:n=>n.appKey,expire:t}))}getAppManifest(e){return k(this,_f).query(e).pipe(sf,jt(t=>{const{cause:n}=t;throw n instanceof Pl?n:n instanceof Tl?Pl.fromHttpResponse(n.response,{cause:n}):new Pl("unknown","failed to load manifest",{cause:n})}))}getAppManifests(e){return k(this,bf).query(e).pipe(sf)}getAppConfig(e){return k(this,wf).query(e).pipe(me(t=>t.value),jt(t=>{const{cause:n}=t;throw n instanceof mu?n:n instanceof Tl?mu.fromHttpResponse(n.response,{cause:n}):new mu("unknown","failed to load config",{cause:n})}))}getAppSettings(e){return k(this,cu).query(e).pipe(sf,jt(t=>{const{cause:n}=t;throw n instanceof gu?n:n instanceof Tl?gu.fromHttpResponse(n.response,{cause:n}):new gu("unknown","failed to load settings",{cause:n})}))}updateAppSettings(e){const{appKey:t,settings:n}=e;return k(this,Km).json$(`/persons/me/apps/${t}/settings`,{method:"PUT",body:n,headers:{"Api-Version":"1.0"}}).pipe(qr(i=>{k(this,cu).mutate({appKey:t},{value:i,updated:Date.now()})}))}[Symbol.dispose](){console.warn("AppClient disposed"),k(this,_f).complete(),k(this,bf).complete(),k(this,wf).complete(),k(this,cu).complete()}}_f=new WeakMap,bf=new WeakMap,wf=new WeakMap,cu=new WeakMap,Km=new WeakMap;class uW extends t2{constructor(){super(...arguments);Le(this,"defaultExpireTime",1*60*1e3)}async _createHttpClient(t){const n=await t.requireInstance("http");return n.hasClient(l6)?n.createClient(l6):await(await t.requireInstance("serviceDiscovery")).createClient("apps")}setClient(t){const n=typeof t=="object"?()=>t:t;this._set("client",n)}setAssetUri(t){const n=typeof t=="string"?async()=>t:t;this._set("assetUri",n)}_createConfig(t,n){return this._has("client")||this.setClient(async()=>{const i=await this._createHttpClient(t);return new dW(i)}),this._has("assetUri")||this.setAssetUri("/apps-proxy"),super._createConfig(t,n)}}const hW=(r,e)=>{r.addConfig({module:iW,configure:async t=>{}})},AM=(r,e,t)=>{x.useEffect(()=>{const n=r.subscribe(e);return n.add(t),()=>n.unsubscribe()},[r,e])},fW=(r,e,t)=>{x.useLayoutEffect(()=>{const n=r.subscribe(e);return n.add(t),()=>n.unsubscribe()},[r,e])};function ks(r,e){const t=x.useCallback(()=>(e==null?void 0:e.initial)??r.value??void 0,[r,e==null?void 0:e.initial]),n=x.useRef(t()),[i,o]=x.useState(n.current),[a,c]=x.useState(null),[d,u]=x.useState(!1);x.useLayoutEffect(()=>{n.current=t()},[t]),x.useLayoutEffect(()=>{c(null),u(!1),o(n.current)},[r]);const h=x.useMemo(()=>({next:o,error:c,complete:()=>u(!0)}),[]);return fW(r,h,e==null?void 0:e.teardown),{value:i,error:a,complete:d}}const gE=n2({id:gi(),name:gi(),mail:gi().optional()}),TM=n2({identifier:gi(),name:gi().nullish(),subSystem:gi().nullish()},{message:"invalid source system"}),pW=n2({id:gi(),name:gi().optional(),type:gi().optional()}),IM=n2({id:gi(),name:gi(),appKey:gi(),description:gi().optional(),isShared:Rw().optional(),created:Rb(),createdBy:gE,updated:Rb().optional(),updatedBy:gE.optional(),context:pW.optional(),sourceSystem:TM.nullish()});tP(IM);const mW=(r=rP(eP()).or(gi()).optional())=>IM.extend({payload:r}),vE=Yb["1.0"].transform(r=>({azureUniqueId:r.azureUniqueId,id:r.azureUniqueId,name:r.name,email:r.mail})),u6=r=>{const{createdBy:e,updatedBy:t,...n}=r;return mW().parse({...n,createdBy:vE.parse(e),updatedBy:t?vE.parse(t):void 0})},yE=r=>{const{payload:e,...t}=u6(r);return t};var eo,lu,ic,cs;class gW{constructor(e,t){Ie(this,eo);Ie(this,lu);Ie(this,ic);Ie(this,cs);Be(this,eo,e);const{expire:n=5*60*1e3}=t??{};Be(this,lu,new yi({client:{fn:i=>k(this,eo).get("v2",i).pipe(me(yE))},key:i=>i.bookmarkId,expire:n})),Be(this,ic,new yi({client:{fn:i=>k(this,eo).query("v2",{filter:i}).pipe(me(o=>o.map(yE)))},key:i=>JSON.stringify(i??""),expire:n})),Be(this,cs,new yi({client:{fn:i=>k(this,eo).getPayload("v1",i).pipe(me(o=>o.payload))},key:i=>i.bookmarkId,expire:n,cache:{trimming:{size:3}}}))}getAllBookmarks(e){return k(this,ic).query(e).pipe(me(t=>t.value))}getBookmarkById(e){return k(this,lu).query({bookmarkId:e}).pipe(me(t=>t.value))}getBookmarkData(e){return k(this,cs).query({bookmarkId:e}).pipe(me(t=>t.value))}setBookmarkData(e,t){return k(this,eo).patch("v1",{bookmarkId:e,updates:{payload:t}}).pipe(me(n=>n.payload),qr(n=>{n&&k(this,cs).mutate({bookmarkId:e},{value:n,updated:Date.now()},{allowCreation:!0})}))}createBookmark(e){return k(this,eo).create("v1",e).pipe(me(t=>u6(t)),qr(t=>{console.log("createdBookmark",t);const{payload:n,...i}=t;k(this,lu).mutate({bookmarkId:i.id},{value:i,updated:Date.now()},{allowCreation:!0}),n&&k(this,cs).mutate({bookmarkId:i.id},{value:n,updated:Date.now()},{allowCreation:!0}),k(this,ic).invalidate()}))}updateBookmark(e,t){const n=k(this,eo).patch("v1",{bookmarkId:e,updates:t}).pipe(me(i=>u6(i)),WN());return new It(i=>{i.add(n.subscribe(o=>{const{payload:a,...c}=o;k(this,lu).mutate({bookmarkId:e},{value:c,updated:Date.now()},{allowCreation:!1})})),i.add(n.subscribe(o=>{const{payload:a}=o;if(a)k(this,cs).mutate({bookmarkId:o.id},{value:a,updated:Date.now()},{allowCreation:!0});else{const c=k(this,cs).generateCacheKey({bookmarkId:o.id});k(this,cs).cache.removeItem(c)}})),i.add(n.subscribe(()=>{k(this,ic).invalidate()})),n.subscribe(i)})}deleteBookmark(e){return k(this,eo).delete("v1",{bookmarkId:e})}addBookmarkToFavorites(e){return k(this,eo).addFavourite("v1",{bookmarkId:e}).pipe(qr(()=>k(this,ic).invalidate()))}removeBookmarkFromFavorites(e){return k(this,eo).removeFavourite("v1",{bookmarkId:e}).pipe(qr(()=>k(this,ic).invalidate()))}isBookmarkFavorite(e){return k(this,eo).isFavorite("v1",{bookmarkId:e})}}eo=new WeakMap,lu=new WeakMap,ic=new WeakMap,cs=new WeakMap;const RM=j.object({log:j.custom().optional(),logLevel:j.nativeEnum(ln).optional(),eventProvider:j.custom().optional(),sourceSystem:TM.optional().describe("The source system for the bookmarks"),parent:j.custom().describe("Parent Bookmark provider").optional().nullable(),client:j.custom().describe("API client for interacting with bookmarks"),resolve:j.object({context:j.function().returns(j.promise(j.object({id:j.string()}).optional())),application:j.function().returns(j.promise(j.object({appKey:j.string(),name:j.string().optional()}).optional()))}).describe("Functions for resolving context and application"),filters:j.object({context:j.boolean().optional().default(!1),application:j.boolean().optional().default(!1)}).describe("Flags for enabling resolving when fetching bookmarks").optional().default({context:!1,application:!1})}),vW=RM.pick({filters:!0,sourceSystem:!0,resolve:!0}).partial().optional();var Rr;class yW extends t2{constructor(t){super();Ie(this,Rr);Le(this,"defaultExpireTime",1*60*1e3);const{log:n}=t??{};Be(this,Rr,n),this._set("log",async()=>n)}setLogLevel(t){this._set("logLevel",async()=>t),k(this,Rr)&&(k(this,Rr).level=t)}setClient(t){typeof t=="function"?this._set("client",n=>t(n)):this._set("client",async()=>t)}setParent(t){typeof t=="function"?this._set("parent",n=>t(n)):this._set("parent",async()=>t)}setSourceSystem(t){typeof t=="function"?this._set("sourceSystem",t):this._set("sourceSystem",async()=>t)}setContextResolver(t){this._set("resolve.context",t)}setApplicationResolver(t){this._set("resolve.application",t)}setFilter(t,n){this._set(`filters.${t}`,async()=>n)}_createConfig(t,n){var i,o,a,c,d,u,h;if(!this._has("parent")){(i=k(this,Rr))==null||i.debug("No parent provided, using default parent");const p=t.ref;if(p&&"bookmark"in p){const m=p.bookmark;"version"in m&&m.version.satisfies(">=2.0.0")?this._set("parent",async()=>m):(o=k(this,Rr))==null||o.warn("invalid version of parent BookmarkProvider provided")}else(a=k(this,Rr))==null||a.info("No parent BookmarkProvider found")}return this._has("client")||((c=k(this,Rr))==null||c.debug("No client provided, using default client"),this._set("client",this._createDefaultClient.bind(this))),this._has("resolve.context")||((d=k(this,Rr))==null||d.debug("No context resolver provided, using default context resolver"),this._set("resolve.context",this._createDefaultContextResolver.bind(this))),this._has("resolve.application")||((u=k(this,Rr))==null||u.debug("No application resolver provided, using default application resolver"),this._set("resolve.application",this._createDefaultApplicationResolver.bind(this))),this._has("eventProvider")||((h=k(this,Rr))==null||h.debug("No event provider provided, using default event provider"),this._set("eventProvider",this._resolveEventProvider.bind(this))),super._createConfig(t,vW.parse(n))}async _createDefaultContextResolver(t){var n,i;if(t.hasModule("context")){(n=k(this,Rr))==null||n.debug("Context module available, awaiting instance");const o=await t.requireInstance("context");return(i=k(this,Rr))==null||i.debug("Context provider available, creating context resolver"),async()=>{var c,d;(c=k(this,Rr))==null||c.debug("Resolving context for bookmarks");const a=(d=o.currentContext)==null?void 0:d.id;return a?{id:a}:void 0}}}async _createDefaultApplicationResolver(t){var n,i;if(t.hasModule("app")){(n=k(this,Rr))==null||n.debug("App module available, awaiting instance");const o=await t.requireInstance("app");return(i=k(this,Rr))==null||i.debug("App provider available, creating application resolver"),async()=>{var c,d;const a=o.current;if(a)return{appKey:a.appKey,name:(c=a.manifest)==null?void 0:c.name};(d=k(this,Rr))==null||d.warn("No current application found")}}}async _resolveAppProvider(t){var n,i;if(t.hasModule("app"))return(n=k(this,Rr))==null||n.debug("App module available, awaiting instance"),t.requireInstance("app");(i=k(this,Rr))==null||i.debug("No app module available, will use ref to app module if available")}async _resolveEventProvider(t){var n;if(t.hasModule("event"))return(n=k(this,Rr))==null||n.debug("Event module available, awaiting instance"),t.requireInstance("event")}async _createDefaultClient(t){var n;try{const o=await(await this._getServiceProvider(t)).createBookmarksClient("json$");return new gW(o)}catch{(n=k(this,Rr))==null||n.warn("Failed to create bookmark api client")}}async _getServiceProvider(t){var i,o,a,c;if(t.hasModule("services"))return(i=k(this,Rr))==null||i.debug("Services module available, awaiting instance"),t.requireInstance("services");(o=k(this,Rr))==null||o.debug("No services module available, will use ref services module if available");const n=(a=t.ref)==null?void 0:a.services;if(n)return n;throw(c=k(this,Rr))==null||c.error("No service provider available, cannot create bookmarks client"),Error("[BookmarkConfigurator] No service provider configures [ServicesModule] ")}async _processConfig(t,n){var i;try{return RM.parse(t)}catch(o){throw(i=k(this,Rr))==null||i.error("Failed to parse config",t,o.issues??o),o}}}Rr=new WeakMap;var u_,_E;function _W(){return _E||(_E=1,u_=function r(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,i,o;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(i=n;i--!==0;)if(!r(e[i],t[i]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(i of e.entries())if(!t.has(i[0]))return!1;for(i of e.entries())if(!r(i[1],t.get(i[0])))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(i of e.entries())if(!t.has(i[0]))return!1;return!0}if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(n=e.length,n!=t.length)return!1;for(i=n;i--!==0;)if(e[i]!==t[i])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(i=n;i--!==0;)if(!Object.prototype.hasOwnProperty.call(t,o[i]))return!1;for(i=n;i--!==0;){var a=o[i];if(!r(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}),u_}var bW=_W();const h_=zu(bW),qe={aborted:nn("action_aborted",r=>({payload:r})),setBookmark:nn("set_bookmark",r=>({payload:r})),setCurrentBookmark:nn("set_current_bookmark",r=>({payload:r})),fetchBookmark:hi("fetch_bookmark",(r,e)=>({payload:r,meta:e}),(r,e)=>({payload:r,meta:e}),(r,e)=>({payload:r,meta:e})),fetchBookmarkData:hi("fetch_bookmark_payload",(r,e)=>({payload:r,meta:e}),(r,e,t)=>({payload:{bookmarkId:r,data:e},meta:t}),(r,e)=>({payload:r,meta:e})),fetchBookmarks:hi("fetch_bookmarks",(r,e)=>({payload:r,meta:e}),(r,e)=>({payload:r,meta:e}),(r,e)=>({payload:r,meta:e})),updateBookmark:hi("set_bookmark",(r,e)=>({payload:r,meta:e}),(r,e)=>({payload:r,meta:e}),(r,e)=>({payload:r,meta:e})),createBookmark:hi("create_bookmark",(r,e)=>({payload:r,meta:e}),(r,e)=>({payload:r,meta:e}),(r,e)=>({payload:r,meta:e})),deleteBookmark:hi("delete_bookmark",(r,e)=>({payload:r,meta:{ref:r,...e}}),(r,e)=>({payload:r,meta:{ref:r,...e}}),(r,e)=>({payload:r,meta:e})),removeBookmark:hi("remove_bookmark",(r,e)=>({payload:r,meta:{ref:r,...e}}),(r,e)=>({payload:r,meta:e}),(r,e)=>({payload:r,meta:e})),addBookmarkAsFavourite:hi("add_favourite_bookmark",(r,e)=>({payload:r,meta:{ref:r,...e}}),(r,e)=>({payload:r,meta:{ref:r,...e}}),(r,e)=>({payload:r,meta:e})),removeBookmarkAsFavourite:hi("remove_favourite_bookmark",(r,e)=>({payload:r,meta:{ref:r,...e}}),(r,e)=>({payload:r,meta:{ref:r,...e}}),(r,e)=>({payload:r,meta:e}))},G0=r=>kv(r.type),wW={status:new Set,errors:{},bookmarks:{}},xW=r=>a2({...wW,...r},e=>{e.addCase(qe.fetchBookmark.success,(t,n)=>{n.payload.id in t.bookmarks&&(t.bookmarks[n.payload.id]=n.payload)}).addCase(qe.fetchBookmarkData.success,(t,n)=>{var a;const{bookmarkId:i,data:o}=n.payload;((a=t.currentBookmark)==null?void 0:a.id)===i&&(t.currentBookmark.payload=o)}).addCase(qe.fetchBookmarks.success,(t,n)=>{t.bookmarks=n.payload.reduce((i,o)=>(i[o.id]=o,i),{})}).addCase(qe.setBookmark,(t,n)=>{var o;const i=n.payload.id;i in t.bookmarks&&(t.bookmarks[i]=n.payload),((o=t.currentBookmark)==null?void 0:o.id)===i&&(t.currentBookmark=n.payload)}).addCase(qe.setCurrentBookmark,(t,n)=>{t.currentBookmark=n.payload}).addCase(qe.createBookmark.success,(t,n)=>{const{payload:i,...o}=n.payload;t.bookmarks[o.id]=o}).addCase(qe.updateBookmark.success,(t,n)=>{var u;const i=n.payload.id,o=i in t.bookmarks,a=((u=t.currentBookmark)==null?void 0:u.id)===i,d={...o?t.bookmarks[i]:a?t.currentBookmark:null,...n.payload};o&&(t.bookmarks[i]=d),a&&(t.currentBookmark=d)}).addCase(qe.deleteBookmark.success,(t,n)=>{delete t.bookmarks[n.payload]}).addCase(qe.removeBookmarkAsFavourite.success,(t,n)=>{delete t.bookmarks[n.payload]}).addMatcher(kP,(t,n)=>{const i=G0(n);t.status.add(i)}).addMatcher(EP,(t,n)=>{const i=G0(n);delete t.errors[i]}).addMatcher(Gw,(t,n)=>{const i=G0(n);t.errors[i]=n.payload}).addMatcher(SP,(t,n)=>{const i=G0(n);t.status.delete(i)})});class Ul extends Error{constructor(t,n,i){super(t,i);Le(this,"action");this.action=n,this.name="BookmarkProcessError"}}class Ar extends Error{constructor(e,t){super(e,t),this.name="BookmarkProviderError"}}const c8=200,CW=r=>e=>e.pipe(Oe(qe.fetchBookmark.match),Aw(n=>n.payload),Wn(n=>n.pipe(Tw(c8))),Qt(n=>at(r.getBookmarkById(n.payload)).pipe(Ci(),me(i=>qe.fetchBookmark.success(i,n.meta)),jt(i=>Pt(qe.fetchBookmark.failure(new Ul("Failed to fetch bookmark",n,{cause:i}),n.meta)))))),kW=r=>e=>e.pipe(Oe(qe.fetchBookmarkData.match),Aw(n=>JSON.stringify(n.payload)),Wn(n=>n.pipe(Tw(c8))),Qt(n=>at(r.getBookmarkData(n.payload)).pipe(Ci(),me(i=>qe.fetchBookmarkData.success(n.payload,i,n.meta)),jt(i=>Pt(qe.fetchBookmarkData.failure(new Ul("Failed to fetch bookmark payload",n,{cause:i}),n.meta)))))),EW=r=>e=>e.pipe(Oe(qe.fetchBookmarks.match),Aw(n=>JSON.stringify(n.payload)),Qt(n=>n.pipe(Tw(c8))),Qt(n=>at(r.getAllBookmarks(n.payload)).pipe(Ci(),me(i=>qe.fetchBookmarks.success(i,n.meta)),jt(i=>Pt(qe.fetchBookmarks.failure(new Ul("Failed to fetch all bookmarks",n,{cause:i}),n.meta)))))),SW=r=>e=>e.pipe(Oe(qe.createBookmark.match),bs(n=>at(r.createBookmark(n.payload)).pipe(Ci(),me(i=>qe.createBookmark.success(i,n.meta)),jt(i=>Pt(qe.createBookmark.failure(new Ul("Failed to create new bookmark",n,{cause:i}),n.meta)))))),AW=r=>e=>e.pipe(Oe(qe.updateBookmark.match),bs(n=>{const{bookmarkId:i,updates:o}=n.payload;return at(r.updateBookmark(i,o)).pipe(Ci(),me(a=>qe.updateBookmark.success(a,n.meta)),jt(a=>Pt(qe.updateBookmark.failure(new Ul("Failed to update bookmark",n,{cause:a}),n.meta))))})),TW=r=>e=>e.pipe(Oe(qe.deleteBookmark.match),bs(n=>at(r.deleteBookmark(n.payload)).pipe(Ci(),me(()=>qe.deleteBookmark.success(n.payload,n.meta)),jt(i=>Pt(qe.deleteBookmark.failure(new Ul("Failed to delete bookmark",n,{cause:i}),n.meta)))))),IW=r=>e=>e.pipe(Oe(qe.removeBookmarkAsFavourite.match),bs(n=>at(r.removeBookmarkFromFavorites(n.payload)).pipe(Ci(),me(()=>qe.removeBookmarkAsFavourite.success(n.payload,n.meta)),jt(i=>Pt(qe.removeBookmarkAsFavourite.failure(new Ul("Failed to remove bookmark as favorite",n,{cause:i}),n.meta)))))),RW=r=>e=>e.pipe(Oe(qe.addBookmarkAsFavourite.match),bs(n=>at(r.addBookmarkToFavorites(n.payload)).pipe(Ci(),me(()=>qe.addBookmarkAsFavourite.success(n.payload,n.meta)),jt(i=>Pt(qe.addBookmarkAsFavourite.failure(new Ul("Failed to add bookmark as favorite",n,{cause:i}),n.meta)))))),PW=r=>e=>{const t=e.pipe(Oe(qe.removeBookmark.match),bs(({payload:a})=>at(r.isBookmarkFavorite(a)).pipe(me(c=>(c?qe.removeBookmarkAsFavourite:qe.deleteBookmark)(a))))),n=Z3(e.pipe(Oe(qe.deleteBookmark.failure.match)),e.pipe(Oe(qe.removeBookmarkAsFavourite.failure.match))).pipe(me(a=>qe.removeBookmark.failure(a.payload,a.meta))),i=Z3(e.pipe(Oe(qe.deleteBookmark.success.match)),e.pipe(Oe(qe.removeBookmarkAsFavourite.success.match))).pipe(me(a=>qe.removeBookmark.success({type:kv(a.type),bookmarkId:a.payload},a.meta)));return El(t,Z3(n,i))},MW=r=>(e,t)=>Pt(CW,kW,EW,SW,AW,TW,PW,IW,RW).pipe(Wn(n=>n(r)(e,t))),$W=r=>{const e=new o2(xW(r.initial));return e.addFlow(MW(r.client)),e},bE=r=>Object.values(r.bookmarks),W0=(r,e)=>r.bookmarks[e],f_=r=>r.currentBookmark,OW=r=>Object.values(r.errors),PM="2.1.6",Ed=2*60*1e3;var ui,nr,wl,xl,iR;let ZW=(iR=class{constructor(e){Ie(this,ui);Ie(this,nr);Ie(this,wl,[]);Ie(this,xl,new Qn);var t,n;if(Be(this,ui,e),Be(this,nr,$W({client:e.client,initial:{currentBookmark:((t=this._parent)==null?void 0:t.currentBookmark)??null}})),k(this,xl).add(()=>k(this,nr).complete()),k(this,xl).add(k(this,nr).action$.subscribe(i=>{var o,a;Gw(i)?(o=this._log)==null||o.error(`Action: ${i.type}`,i):(a=this._log)==null||a.debug(`Action: ${i.type}`,i)})),k(this,xl).add(k(this,nr).select(f_).subscribe(i=>{i!==void 0&&this._dispatchEvent("onCurrentBookmarkChanged",{detail:i})})),this._event&&this._event.addEventListener("onCurrentBookmarkChanged",i=>{const{source:o,detail:a}=i;a!==void 0&&o!==this&&a!==this.currentBookmark&&k(this,nr).next(qe.setCurrentBookmark(a))}),this._parent)try{k(this,xl).add(this._parent.currentBookmark$.pipe(Oe(i=>i!==void 0),Oe(i=>i!==this.currentBookmark)).subscribe(i=>{k(this,nr).next(qe.setCurrentBookmark(i))}))}catch(i){(n=this._log)==null||n.error("Failed to subscribe to parent bookmark provider",i)}}get config(){return{getCurrentAppIdentification(){return window.Fusion.modules.app.current.appKey}}}addStateCreator(e){return console.warn("addStateCreator is deprecated, use addPayloadGenerator instead"),this.addPayloadGenerator(e)}deleteBookmarkByIdAsync(e){return console.warn("deleteBookmarkByIdAsync is deprecated, use deleteBookmarkAsync instead"),this.deleteBookmarkAsync(e)}addBookmarkFavoriteAsync(e){return console.warn("addBookmarkFavoriteAsync is deprecated, use addBookmarkToFavoritesAsync instead"),this.addBookmarkToFavoritesAsync(e)}removeBookmarkFavoriteAsync(e){return console.warn("removeBookmarkFavoriteAsync is deprecated, use removeBookmarkAsFavoriteAsync instead"),this.removeBookmarkAsFavoriteAsync(e)}getBookmarkById(e){return console.warn("getBookmarkById is deprecated, use getBookmarkAsync instead"),this.getBookmarkAsync(e)}get version(){return new fs(PM)}get filters(){return k(this,ui).filters}get client(){return k(this,ui).client}get currentBookmark$(){return k(this,nr).select(f_,h_)}get bookmarks$(){return this.getAllBookmarksAsync(),k(this,nr).select(bE,h_)}get bookmarks(){return bE(k(this,nr).value)}get currentBookmark(){return f_(k(this,nr).value)}get status$(){return k(this,nr).select(e=>e.status)}get errors$(){return k(this,nr).select(OW,h_)}get canCreateBookmarks(){return k(this,wl).length>0}get sourceSystem(){return k(this,ui).sourceSystem}get resolvedApplication(){return k(this,ui).resolve.application}get resolvedContext(){return k(this,ui).resolve.context}get _apiClient(){return k(this,ui).client}get _log(){return k(this,ui).log}get _resolve(){return k(this,ui).resolve}get _event(){return k(this,ui).eventProvider}get _parent(){return k(this,ui).parent}on(e,t){var n,i;return this._event?(i=this._event)==null?void 0:i.addEventListener(e,o=>{o.source===this&&t(o)}):((n=this._log)==null||n.warn("Failed to register event listener, event provider not configured"),()=>{})}addPayloadGenerator(e){var t;return(t=this._log)==null||t.debug(`adding bookmark payload generator: ${e.name}`),k(this,wl).push(e),this._dispatchEvent("onBookmarkPayloadCreatorAdded",{detail:e}),()=>{var n;(n=this._log)==null||n.debug(`removing bookmark payload generator: ${e.name}`),Be(this,wl,k(this,wl).filter(i=>i!==e))}}generatePayload(e){var n;return(n=this._log)==null||n.debug("generating payload",e),at(k(this,wl)).pipe(DR((i,o)=>this._producePayload(i,o),e??{},1),qr(i=>{var o;return(o=this._log)==null?void 0:o.debug("generated payload",{initial:e,payload:i})}))}_producePayload(e,t,n){return qw(e,async i=>{var o,a,c;try{const d=await Promise.resolve(t(i,n));if(d)return(o=this._log)==null||o.warn(`bookmark data generator ${t.name} returned a value, but it should not do this, since the data is an immer draft object`),JSON.parse(JSON.stringify(d));if(d===null){(a=this._log)==null||a.info(`bookmark data generator ${t.name} wish to clear the bookmark data`);return}}catch(d){(c=this._log)==null||c.error(`Failed to produce payload using generator ${t.name}`,d)}})}getBookmark(e,t){var n;return(n=this._log)==null||n.debug(`fetching bookmark: ${e}`,t),Ig({bookmark:this._getBookmarkInfo(e),payload:t!=null&&t.excludePayload?Pt({}):this._getBookmarkData(e)}).pipe(jt(i=>{var o;throw(o=this._log)==null||o.error(`Failed to fetch bookmark: ${e}`,i),i}),me(({bookmark:i,payload:o})=>Object.assign({},i,{payload:o})),qr(i=>{var o;(o=this._log)==null||o.debug(`Bookmark fetched: ${i.id}`,i)}))}getBookmarkAsync(e,t){return hr(this.getBookmark(e,t))}getAllBookmarks(){return new It(e=>{var o,a,c;(o=this._log)==null||o.debug("fetching all bookmarks");const t=Ig({sourceSystem:Pt(this.sourceSystem),appKey:(a=k(this,ui).filters)!=null&&a.application?at(this._resolve.application()).pipe(me(d=>d==null?void 0:d.appKey)):Pt(void 0),contextId:(c=k(this,ui).filters)!=null&&c.context?at(this._resolve.context()).pipe(me(d=>d==null?void 0:d.id)):Pt(void 0)}).pipe(jt(d=>{var h;const u=new Ar("Could not fetch bookmarks, failed to resolve filter parameters",d);throw(h=this._log)==null||h.error(u.message,u),u}));e.add(t.subscribe(d=>{k(this,nr).next(qe.fetchBookmarks(d))}));const n=k(this,nr).action$.pipe(Oe(qe.fetchBookmarks.failure.match),me(d=>{var u;throw(u=this._log)==null||u.error("Failed to fetch bookmarks",d.payload),new Ar("Failed to fetch bookmarks",d.payload)}),Ks({each:Ed,with:()=>{throw new Ar("Timeout while fetching bookmarks")}}));k(this,nr).action$.pipe(Oe(qe.fetchBookmarks.success.match),me(d=>d.payload),qr(d=>{var u;(u=this._log)==null||u.debug("fetched all bookmarks",d)}),Jc(n),Gs()).subscribe(e)})}async getAllBookmarksAsync(){return hr(this.getAllBookmarks())}setCurrentBookmark(e){var n;return e==this.currentBookmark?Pt(e):((n=this._log)==null||n.debug("setting current bookmark",e),(typeof e=="string"?this.getBookmark(e):Pt(e??null)).pipe(Qt(async i=>{var d;const o=this.currentBookmark,{type:a,canceled:c}=await this._dispatchEvent("onCurrentBookmarkChange",{detail:{current:o,next:i}});if(c){const u=new Ar(`event: ${a} was canceled by listener for change to ${(i==null?void 0:i.id)??"none"}, from ${(o==null?void 0:o.id)??"none"}`);throw(d=this._log)==null||d.info(u.message),u}return i}),qr(i=>{k(this,nr).next(qe.setCurrentBookmark(i))}),jt(i=>{var a;const o=new Ar("Could not set current bookmark, resolve of bookmark failed",i);throw(a=this._log)==null||a.error(o.message,o),o})))}setCurrentBookmarkAsync(e){return hr(this.setCurrentBookmark(e))}createBookmark(e){return new It(t=>{var u;const{ref:n,action$:i}=this._useScopedActions();(u=this._log)==null||u.debug(`creating new bookmark, ref: ${n}`,e);const a=Ig({appKey:e.appKey?Pt(e.appKey):at(this._resolve.application()).pipe(me(h=>{if(!(h!=null&&h.appKey))throw new Ar("Failed to resolve application key");return h.appKey})),contextId:this._resolve.context().then(h=>h==null?void 0:h.id),payload:this.generatePayload(e.payload),sourceSystem:Pt(this.sourceSystem)}).pipe(jt(h=>{var m;const p=new Ar("Could not create new bookmark, failed to resolve bookmark data",h);throw(m=this._log)==null||m.error(p.message,p),p}),me(h=>({...e,...h}))).pipe(Qt(async h=>{var v;const{canceled:p,type:m}=await this._dispatchEvent("onBookmarkCreate",{detail:h,cancelable:!0});if(p){const _=new Ar(`event: ${m} was canceled by listener for creating bookmark: ${n}`);throw(v=this._log)==null||v.info(_.message),_}return h}));t.add(a.subscribe({error:h=>t.error(h),next:h=>{k(this,nr).next(qe.createBookmark(h,{ref:n}))}}));const c=i.pipe(Oe(qe.createBookmark.failure.match),me(({payload:h})=>{var m;const p=new Ar(`Failed to create bookmark: ${n}`,{cause:h});throw(m=this._log)==null||m.warn(p.message),p}),Ks({each:Ed,with:()=>{throw new Ar(`Timeout while creating bookmark: ${n}`)}}));i.pipe(Oe(qe.createBookmark.success.match),me(({payload:h})=>h),qr(h=>{var p;(p=this._log)==null||p.info(`Bookmark created: ${h.id}, ref: ${n}`),this._dispatchEvent("onBookmarkCreated",{detail:h})}),Jc(c),Gs()).subscribe(t)})}createBookmarkAsync(e){return hr(this.createBookmark(e))}updateBookmark(e,t,n){if(!t&&(n!=null&&n.excludePayloadGeneration))throw new Ar("Cannot update bookmark without updates and excludePayloadGeneration option");return new It(i=>{var p;const{ref:o,action$:a}=this._useScopedActions();(p=this._log)==null||p.debug(`Updating bookmark: ${e}, ref: ${o}`);const d=(n!=null&&n.excludePayloadGeneration?Pt(t):this.generatePayload(t==null?void 0:t.payload).pipe(me(m=>({...t,payload:m})))).pipe(Qt(async m=>{var b;const{canceled:v,type:_}=await this._dispatchEvent("onBookmarkUpdate",{detail:{current:W0(k(this,nr).value,e),updates:m},cancelable:!0});if(v){const C=new Ar(`event: ${_} was canceled by listener for updating bookmark: ${e}, ref: ${o}`);throw(b=this._log)==null||b.warn(C.message,m),C}return m}));i.add(d.subscribe({error:m=>i.error(m),next:m=>{k(this,nr).next(qe.updateBookmark({bookmarkId:e,updates:m},{ref:o}))}}));const u=a.pipe(Oe(qe.updateBookmark.failure.match),me(({payload:m})=>{var _;const v=new Ar(`Failed to update bookmark: ${e}`,{cause:m});throw(_=this._log)==null||_.info(v.message),v}),Ks({each:Ed,with:()=>{throw new Ar(`Timeout while updating bookmark: ${e}`)}}));a.pipe(Oe(qe.updateBookmark.success.match),me(({payload:m})=>({...W0(k(this,nr).value,m.id),payload:m.payload})),qr(m=>{var v;(v=this._log)==null||v.info(`Bookmark updated: ${m.id}, ref: ${o}`),this._dispatchEvent("onBookmarkUpdated",{detail:m})}),Jc(u),Gs()).subscribe(i)})}updateBookmarkAsync(e,t,n){if(typeof e=="object"){console.warn("updateBookmarkAsync(bookmark, updates, options) is deprecated, use updateBookmarkAsync(id, updates, options) instead");const{id:i,...o}=e;return hr(this.updateBookmark(i,o,{excludePayloadGeneration:!t.updatePayload}).pipe(me(a=>a.payload)))}return hr(this.updateBookmark(e,t,n))}deleteBookmark(e){return new It(t=>{var u;const{ref:n,action$:i}=this._useScopedActions();(u=this._log)==null||u.debug(`Removing bookmark: ${e}, ref: ${n}`);const o=W0(k(this,nr).value,e)??{id:e},a=at(this._dispatchEvent("onBookmarkDelete",{detail:o,cancelable:!0})).pipe(me(({canceled:h,type:p,detail:m})=>{var v;if(h){const _=new Ar(`event: ${p} was canceled by listener for removing bookmark: ${e}, ref: ${n}`);throw(v=this._log)==null||v.warn(_.message),_}return m}));t.add(a.subscribe({error:h=>t.error(h),next:h=>{k(this,nr).next(qe.deleteBookmark(h.id,{ref:n}))}}));const c=i.pipe(Oe(qe.deleteBookmark.failure.match),me(({payload:h})=>{var m;const p=new Ar(`Failed to update bookmark: ${e}`,{cause:h});throw(m=this._log)==null||m.warn(p.message),p}),Ks({each:Ed,with:()=>{throw new Ar(`Timeout while updating bookmark: ${e}`)}}));i.pipe(Oe(qe.deleteBookmark.success.match),me(()=>{}),qr(()=>{var h;(h=this._log)==null||h.info(`Removed bookmark: ${o.id}, ref: ${n}`),this._dispatchEvent("onBookmarkDeleted",{detail:o})}),Jc(c),Gs()).subscribe(t)})}async deleteBookmarkAsync(e){return hr(this.deleteBookmark(e))}addBookmarkToFavorites(e){return new It(n=>{var u;const{ref:i,action$:o}=this._useScopedActions();(u=this._log)==null||u.debug(`Adding bookmark: ${e} to favourites, ref: ${i}`);const a=at(this._dispatchEvent("onBookmarkFavouriteAdd",{detail:{id:e},cancelable:!0})).pipe(me(({canceled:h,type:p})=>{var m;if(h){const v=new Ar(`event: ${p} was canceled by listener for adding favourite bookmark: ${e}, ref: ${i}`);throw(m=this._log)==null||m.info(v.message),v}}));n.add(a.subscribe({error:h=>n.error(h),next:()=>{k(this,nr).next(qe.addBookmarkAsFavourite(e,{ref:i}))}}));const c=o.pipe(Oe(qe.addBookmarkAsFavourite.failure.match),me(({payload:h})=>{var m;const p=new Ar(`Failed to add bookmark to favorites: ${e}`,{cause:h});throw(m=this._log)==null||m.warn(p.message),p}),Ks({each:Ed,with:()=>{throw new Ar(`Timeout while adding bookmark to favorites: ${e}`)}}));return o.pipe(Oe(qe.addBookmarkAsFavourite.success.match),Qt(({payload:h})=>this.getBookmark(h,{excludePayload:!0})),qr(h=>{var p;(p=this._log)==null||p.info(`Added bookmark: ${e} to favourites, ref: ${i}`),this._dispatchEvent("onBookmarkFavouriteAdded",{detail:h})}),Jc(c),Gs()).subscribe(n)})}addBookmarkToFavoritesAsync(e){return hr(this.addBookmarkToFavorites(e))}removeBookmarkAsFavorite(e){return new It(n=>{var h;const{ref:i,action$:o}=this._useScopedActions();(h=this._log)==null||h.debug(`Removing bookmark: ${e} from favourites, ref: ${i}`);const a=W0(k(this,nr).value,e)??{id:e},c=at(this._dispatchEvent("onBookmarkFavouriteRemove",{detail:a,cancelable:!0})).pipe(me(({canceled:p,type:m,detail:v})=>{var _;if(p){const b=new Ar(`event: ${m} was canceled by listener for removing favourite bookmark: ${e}, ref: ${i}`);throw(_=this._log)==null||_.warn(b.message),b}return v}));n.add(c.subscribe({error:p=>n.error(p),next:p=>{k(this,nr).next(qe.removeBookmarkAsFavourite(p.id,{ref:i}))}}));const d=o.pipe(Oe(qe.removeBookmarkAsFavourite.failure.match),me(({payload:p})=>{var v;const m=new Ar(`Failed to remove bookmark: ${e} from favourites`,{cause:p});throw(v=this._log)==null||v.warn(m.message),m}),Ks({each:Ed,with:()=>{throw new Ar(`Timeout while removing bookmark: ${e} from favourites`)}}));o.pipe(Oe(qe.removeBookmarkAsFavourite.success.match),qr(()=>{var p;(p=this._log)==null||p.info(`Removed bookmark: ${e} from favourites, ref: ${i}`),this._dispatchEvent("onBookmarkFavouriteRemoved",{detail:a})}),me(()=>{}),Jc(d),Gs()).subscribe(n)})}removeBookmarkAsFavoriteAsync(e){return hr(this.removeBookmarkAsFavorite(e))}isBookmarkInFavorites(e){var t;return(t=this._log)==null||t.debug(`Checking if bookmark: ${e} is in favourites`),at(this._apiClient.isBookmarkFavorite(e)).pipe(jt(n=>{var o;const i=new Ar(`Failed to check if bookmark: ${e} is in favourites`,n);throw(o=this._log)==null||o.error(i.message,i),i}),qr(n=>{var i;(i=this._log)==null||i.debug(`Bookmark: ${e} is ${n?"in":"not in"} favourites`)}))}isBookmarkInFavoritesAsync(e){return hr(this.isBookmarkInFavorites(e))}_getBookmarkInfo(e,t){const{action$:n}=this._useScopedActions(e),i=n.pipe(Oe(qe.fetchBookmark.success.match),me(a=>a.payload),Gs()),o=k(this,nr).action$.pipe(Oe(qe.fetchBookmark.failure.match),me(a=>{throw new Ar(`Failed to fetch bookmark data: ${e}`,a.payload)}),Ks({each:(t==null?void 0:t.timeout)??2*60*1e3,with:()=>{throw new Ar(`Timeout while fetching bookmark data: ${e}`)}}));return k(this,nr).next(qe.fetchBookmark(e,{ref:e})),i.pipe(Jc(o))}_getBookmarkData(e,t){const{action$:n}=this._useScopedActions(e),i=n.pipe(Oe(qe.fetchBookmarkData.success.match),me(a=>a.payload.data),Gs()),o=k(this,nr).action$.pipe(Oe(qe.fetchBookmarkData.failure.match),me(a=>{throw new Ar(`Failed to fetch bookmark data: ${e}`,a.payload)}),Ks({each:(t==null?void 0:t.timeout)??Ed,with:()=>{throw new Ar(`Timeout while fetching bookmark data: ${e}`)}}));return k(this,nr).next(qe.fetchBookmarkData(e,{ref:e})),i.pipe(Jc(o))}async _dispatchEvent(e,t){var i,o;const n=new jR(e,{source:this,canBubble:!0,...t});if(this._event){(i=this._log)==null||i.debug(`dispatching event ${e}`,t);const{canceled:a}=await this._event.dispatchEvent(n);a&&((o=this._log)==null||o.debug(`event ${e} was canceled`,t))}return n}_useScopedActions(e){e??(e=am());const t=k(this,nr).action$.pipe(Oe(n=>{var i;return"meta"in n&&((i=n.meta)==null?void 0:i.ref)===e}));return{ref:e,action$:t}}dispose(){var e;(e=this._log)==null||e.debug("disposing BookmarkProvider"),k(this,xl).unsubscribe()}[Symbol.dispose](){this.dispose()}},ui=new WeakMap,nr=new WeakMap,wl=new WeakMap,xl=new WeakMap,iR);const LW="bookmark",HW=new c2("BookmarkModule"),NW={name:LW,version:new fs(PM),configure:r=>{var i;const e=((i=r==null?void 0:r.log)==null?void 0:i.createSubLogger("BookmarkModule"))||HW,t=r==null?void 0:r.ref;return new yW({log:e,ref:t})},initialize:async r=>{var i;const e=(i=r.ref)==null?void 0:i.bookmark,t=await hr(r.config.createConfig(r,{filters:e==null?void 0:e.filters,sourceSystem:e==null?void 0:e.sourceSystem,resolve:e?{application:e.resolvedApplication.bind(e),context:e.resolvedContext.bind(e)}:void 0}));return new ZW(t)},dispose:r=>{r.instance.dispose()}},DW=(r,e)=>{r.addConfig({module:NW,configure:async t=>{e&&Promise.resolve(e(t))}})};class VW{constructor(){Le(this,"history");Le(this,"basename")}}/**
404
+ `}}P([ft({type:String,reflect:!0})],p2.prototype,"size",void 0);P([ft({type:String,reflect:!0})],p2.prototype,"color",void 0);p2.styles=UG;const CM="fwc-circular-progress";let pE=class extends p2{};pE=P([Sr(CM)],pE);const BG=u2(h2,wM);u2(p2,CM);u2(f2,xM);const kM=({children:r,text:e})=>E.jsx("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",width:"100vw",height:"100vh",overflow:"hidden"},children:E.jsx(BG,{text:e,children:r})}),qG=()=>({setManifest:nn("set_manifest",(r,e)=>({payload:r,meta:{created:Date.now(),update:e}})),fetchManifest:hi("fetch_manifest",(r,e)=>({payload:r,meta:{update:e}}),r=>({payload:r}),r=>({payload:r})),setConfig:nn("set_config",r=>({payload:r})),fetchConfig:hi("fetch_config",r=>({payload:r}),r=>({payload:r}),r=>({payload:r})),setSettings:nn("set_settings",r=>({payload:r})),fetchSettings:hi("fetch_settings",r=>({payload:{appKey:r}}),r=>({payload:r}),r=>({payload:r})),updateSettings:hi("update_settings",(r,e)=>({payload:{appKey:r,settings:e}}),r=>({payload:r}),r=>({payload:r})),updateSettingsAbort:nn("update_settings::abort",r=>({payload:r})),setModule:nn("set_module",r=>({payload:r})),importApp:hi("import_app",r=>({payload:r}),r=>({payload:r}),r=>({payload:r})),setInstance:nn("set_instance",r=>({payload:r})),initialize:hi("initialize_app",()=>({payload:null}),()=>({payload:null}),r=>({payload:r}))}),pt=qG();Cz();const KG=r=>a2({...r,status:new Set},e=>e.addCase(pt.setManifest,(t,n)=>{n.meta.update?t.manifest=Object.assign(t.manifest??{},n.payload):t.manifest=n.payload}).addCase(pt.setConfig,(t,n)=>{t.config=n.payload}).addCase(pt.setSettings,(t,n)=>{t.settings=n.payload}).addCase(pt.setModule,(t,n)=>{t.modules=n.payload}).addCase(pt.setInstance,(t,n)=>{t.instance=n.payload}).addMatcher(kP,(t,n)=>{t.status.add(kv(n.type))}).addMatcher(SP,(t,n)=>{t.status.delete(kv(n.type))})),GG=r=>e=>e.pipe(Oe(pt.fetchManifest.match),Qt(t=>{const{payload:n,meta:{update:i}}=t,o=at(r.getAppManifest(n)).pipe(Oe(a=>!!a),Jf());return El(o.pipe(me(a=>pt.setManifest(a,i))),o.pipe(Ci(),me(a=>pt.fetchManifest.success(a)))).pipe(jt(a=>Pt(pt.fetchManifest.failure(a))))})),WG=r=>e=>e.pipe(Oe(pt.fetchConfig.match),Qt(({payload:t})=>{var i;const n=at(r.getAppConfig(t.appKey,(i=t.build)==null?void 0:i.version)).pipe(Oe(o=>!!o),Jf());return El(n.pipe(me(o=>pt.setConfig(o))),n.pipe(Ci(),me(o=>pt.fetchConfig.success(o)))).pipe(jt(o=>Pt(pt.fetchConfig.failure(o))))})),YG=r=>e=>e.pipe(Oe(pt.fetchSettings.match),Qt(({payload:t})=>{const{appKey:n}=t,i=at(r.getAppSettings(n)).pipe(Oe(o=>!!o),Jf());return El(i.pipe(me(o=>pt.setSettings(o))),i.pipe(Ci(),me(o=>pt.fetchSettings.success(o)))).pipe(jt(o=>Pt(pt.fetchSettings.failure(o))))})),QG=r=>e=>e.pipe(Oe(pt.updateSettings.match)).pipe(Qt(({payload:t})=>{const{appKey:n,settings:i}=t;return r.updateAppSettings(n,i).pipe(Ci(),bs(o=>at([pt.setSettings(o),pt.updateSettings.success(o)])),jt(o=>Pt(pt.updateSettings.failure(o))))})),XG=r=>e=>e.pipe(Oe(pt.importApp.match),Qt(({payload:t})=>{const n=[r.assetUri,t].join("/").replace(/\/{2,}/g,"/");return at(import(n)).pipe(me(pt.importApp.success),jt(i=>Pt(pt.importApp.failure(i))))})),JG=(r,e)=>{const t=KG(r),n=new o2(t);return n.addFlow(GG(e)),n.addFlow(WG(e)),n.addFlow(YG(e)),n.addFlow(QG(e)),n.addFlow(XG(e)),n};function Hh(){return Oe(r=>r!=null)}const eW={};var Fe,a4,EM;class tW{constructor(e,t){Ie(this,a4);Ie(this,Fe);Le(this,"dispose");Be(this,Fe,JG(e,t.provider));const{appKey:n}=e,{event:i}=t;i&&Rx(this,a4,EM).call(this,i);const o=new Qn;i&&(o.add(()=>{i.dispatchEvent("onAppDispose",{detail:{appKey:n}})}),o.add(i.addEventListener("onAppModulesLoaded",a=>{a.detail.appKey===n&&k(this,Fe).next(pt.setInstance(a.detail.modules))}))),this.dispose=()=>{o==null||o.unsubscribe(),k(this,Fe).value.instance&&k(this,Fe).value.instance.dispose(),k(this,Fe).complete()}}get manifest$(){return k(this,Fe).select(e=>e.manifest).pipe(Hh())}get config$(){return k(this,Fe).select(e=>e.config,zb).pipe(Hh())}get modules$(){return k(this,Fe).select(e=>e.modules).pipe(Hh())}get instance$(){return k(this,Fe).select(e=>e.instance).pipe(Hh())}get settings$(){return new It(e=>{k(this,Fe).next(pt.fetchSettings(this.appKey)),e.add(k(this,Fe).select(t=>t.settings,zb).pipe(Hh(),Ew(eW)).subscribe(e))})}get status$(){return k(this,Fe).select(e=>e.status)}get state(){return Object.freeze(k(this,Fe).value)}get appKey(){return k(this,Fe).value.appKey}get manifest(){return this.state.manifest}get manifestAsync(){return Vn(this.manifest$)}get config(){return this.state.config}get configAsync(){return Vn(this.config$)}get instance(){return k(this,Fe).value.instance}initialize(){return new It(e=>{k(this,Fe).next(pt.initialize()),e.add($N([this.getManifest(),this.getAppModule(),this.getConfig()]).subscribe({next:([t,n,i])=>e.next({manifest:t,script:n,config:i}),error:t=>{e.error(t),k(this,Fe).next(pt.initialize.failure(t))},complete:()=>{k(this,Fe).next(pt.initialize.success()),e.complete()}}))})}loadConfig(){(this.manifest?Pt(this.manifest):this.getManifest()).subscribe({next:e=>{k(this,Fe).next(pt.fetchConfig(e))}})}loadManifest(e){k(this,Fe).next(pt.fetchManifest(this.appKey,e))}updateManifest(e,t){k(this,Fe).next(pt.setManifest(e,!t))}async loadAppModule(e=!0){var n;const t=await this.getManifestAsync(e);(n=t.build)!=null&&n.entryPoint?k(this,Fe).next(pt.importApp(t.build.entryPoint)):console.warn(`The ${t.appKey} is missing entryPoint, please upload a build for the app before continuing`)}getConfig(e=!1){return new It(t=>{if(k(this,Fe).value.config&&(t.next(k(this,Fe).value.config),!e))return t.complete();t.add(k(this,Fe).addEffect("set_config",({payload:n})=>{t.next(n)})),t.add(k(this,Fe).addEffect("fetch_config::success",({payload:n})=>{t.next(n),t.complete()})),t.add(k(this,Fe).addEffect("fetch_config::failure",({payload:n})=>{t.error(Error("failed to load application config",{cause:n}))})),this.loadConfig()})}getConfigAsync(e=!0){return(e?Vn:hr)(this.getConfig(!e))}getSettings(e=!1){return new It(t=>{if(k(this,Fe).value.settings&&(t.next(k(this,Fe).value.settings),!e))return t.complete();t.add(k(this,Fe).addEffect("set_settings",({payload:n})=>{t.next(n)})),t.add(k(this,Fe).addEffect("fetch_settings::success",({payload:n})=>{t.next(n),t.complete()})),t.add(k(this,Fe).addEffect("fetch_settings::failure",({payload:n})=>{t.error(Error("failed to load application settings",{cause:n}))})),k(this,Fe).next(pt.fetchSettings(this.appKey))})}getSettingsAsync(e=!0){return(e?Vn:hr)(this.getSettings(!e))}updateSettings(e){return new It(t=>{t.add(k(this,Fe).addEffect("update_settings::failure",({payload:n})=>{k(this,Fe).next(pt.fetchSettings(this.appKey)),t.error(Error("failed to update application settings",{cause:n}))})),t.add(k(this,Fe).addEffect("update_settings::success",({payload:n})=>{t.next(n),t.complete()})),k(this,Fe).next(pt.setSettings(e)),k(this,Fe).next(pt.updateSettings(this.appKey,e))})}updateSettingsAsync(e){return hr(this.updateSettings(e))}updateSetting(e,t){return(k(this,Fe).value.settings===void 0?this.getSettings().pipe(Ci()):Pt(k(this,Fe).value.settings)).pipe(me(i=>({...i,[e]:t})),Qt(i=>this.updateSettings(i)),me(i=>i[e]))}updateSettingAsync(e,t){return hr(this.updateSetting(e,t))}getManifest(e=!1){return new It(t=>{if(k(this,Fe).value.manifest&&(t.next(k(this,Fe).value.manifest),!e))return t.complete();t.add(k(this,Fe).addEffect("set_manifest",({payload:n})=>{t.next(n)})),t.add(k(this,Fe).addEffect("fetch_manifest::success",({payload:n})=>{t.next(n),t.complete()})),t.add(k(this,Fe).addEffect("fetch_manifest::failure",({payload:n})=>{t.error(Error("failed to load application manifest",{cause:n}))})),this.loadManifest()})}getManifestAsync(e=!0){return(e?Vn:hr)(this.getManifest(!e))}getAppModule(e=!1){return new It(t=>{if(k(this,Fe).value.modules&&(t.next(k(this,Fe).value.modules),!e))return t.complete();t.add(k(this,Fe).addEffect("set_module",({payload:n})=>{t.next(n)})),t.add(k(this,Fe).addEffect("import_app::success",({payload:n})=>{t.next(n),t.complete()})),t.add(k(this,Fe).addEffect("import_app::failure",({payload:n})=>{t.error(Error("failed to load application modules from script",{cause:n}))})),t.add(this.getManifest().subscribe(n=>{var i;if((i=n.build)!=null&&i.entryPoint){const o=n.build.assetPath??[n.appKey,n.build.version].join("@");k(this,Fe).next(pt.importApp([o,n.build.entryPoint].join("/")))}else console.error(`The ${n.appKey} app is missing a entry in the manifest, upload a build for your app before continuing`)}))})}getAppModuleAsync(e=!0){return(e?Vn:hr)(this.getAppModule(!e))}}Fe=new WeakMap,a4=new WeakSet,EM=function(e){const{appKey:t}=this;k(this,Fe).addEffect(pt.fetchManifest.type,()=>{e.dispatchEvent("onAppManifestLoad",{detail:{appKey:t},source:this})}),k(this,Fe).addEffect(pt.fetchManifest.success.type,n=>{e.dispatchEvent("onAppManifestLoaded",{detail:{appKey:t,manifest:n.payload},source:this})}),k(this,Fe).addEffect(pt.fetchManifest.failure.type,n=>{e.dispatchEvent("onAppManifestFailure",{detail:{appKey:t,error:n.payload},source:this})}),k(this,Fe).addEffect(pt.fetchConfig.type,()=>{e.dispatchEvent("onAppConfigLoad",{detail:{appKey:t},source:this})}),k(this,Fe).addEffect(pt.fetchConfig.success.type,n=>{e.dispatchEvent("onAppConfigLoaded",{detail:{appKey:t,config:n.payload},source:this})}),k(this,Fe).addEffect(pt.fetchConfig.failure.type,n=>{e.dispatchEvent("onAppConfigFailure",{detail:{appKey:t,error:n.payload},source:this})}),k(this,Fe).addEffect(pt.fetchSettings.type,()=>{e.dispatchEvent("onAppSettingsLoad",{detail:{appKey:t},source:this})}),k(this,Fe).addEffect(pt.fetchSettings.success.type,n=>{e.dispatchEvent("onAppSettingsLoaded",{detail:{appKey:t,settings:n.payload},source:this})}),k(this,Fe).addEffect(pt.fetchSettings.failure.type,n=>{e.dispatchEvent("onAppSettingsFailure",{detail:{appKey:t,error:n.payload},source:this})}),k(this,Fe).addEffect(pt.updateSettings.type,n=>{e.dispatchEvent("onAppSettingsUpdate",{detail:{appKey:t,settings:n.payload.settings},source:this})}),k(this,Fe).addEffect(pt.updateSettings.success.type,n=>{e.dispatchEvent("onAppSettingsUpdated",{detail:{appKey:t,settings:n.payload.settings},source:this})}),k(this,Fe).addEffect(pt.updateSettings.failure.type,n=>{e.dispatchEvent("onAppSettingsUpdateFailure",{detail:{appKey:t,settings:n.payload},source:this})}),k(this,Fe).addEffect(pt.importApp.type,()=>{e.dispatchEvent("onAppScriptLoad",{detail:{appKey:t},source:this})}),k(this,Fe).addEffect(pt.importApp.success.type,n=>{e.dispatchEvent("onAppScriptLoaded",{detail:{appKey:t,script:n.payload},source:this})}),k(this,Fe).addEffect(pt.importApp.failure.type,n=>{e.dispatchEvent("onAppScriptFailure",{detail:{appKey:t,error:n.payload},source:this})}),k(this,Fe).addEffect(pt.initialize.type,()=>{e.dispatchEvent("onAppInitialize",{detail:{appKey:t},source:this})}),k(this,Fe).addEffect(pt.initialize.success.type,()=>{e.dispatchEvent("onAppInitialized",{detail:{appKey:t},source:this})}),k(this,Fe).addEffect(pt.initialize.failure.type,({payload:n})=>{e.dispatchEvent("onAppInitializeFailure",{detail:{appKey:t,error:n},source:this})})};const rW="6.1.13";var rc,Bm,nc,vf,qm;class nW{constructor(e){Ie(this,rc);Ie(this,Bm);Ie(this,nc);Ie(this,vf,new Qn);Ie(this,qm);const{event:t,config:n}=e;Be(this,rc,n.client),Be(this,qm,t),Be(this,nc,new Xf(void 0)),Be(this,Bm,n.assetUri??""),k(this,vf).add(this.current$.pipe(ev(),VR(()=>!!t)).subscribe(([i,o])=>{t==null||t.dispatchEvent("onCurrentAppChanged",{source:this,detail:{previous:i,next:o}})})),k(this,vf).add(k(this,nc).pipe(ev(),me(([i])=>i),Hh()).subscribe(i=>i.dispose()))}static compareAppManifest(e,t){return JSON.stringify(e)===JSON.stringify(t)}get version(){return new fs(rW)}get current(){return k(this,nc).value}get current$(){return k(this,nc).pipe(Jg((e,t)=>e&&t?e.appKey===t.appKey:e===t))}getAppManifest(e){return at(k(this,rc).getAppManifest({appKey:e}))}getAppManifests(e){return at(k(this,rc).getAppManifests(e))}getAllAppManifests(){return this.getAppManifests()}getAppConfig(e,t){return at(k(this,rc).getAppConfig({appKey:e,tag:t}))}getAppSettings(e){return at(k(this,rc).getAppSettings({appKey:e}))}updateAppSettings(e,t){return at(k(this,rc).updateAppSettings({appKey:e,settings:t}))}setCurrentApp(e){const t=typeof e=="string"?this.createApp({appKey:e}):e;k(this,nc).next(t)}clearCurrentApp(){k(this,nc).next(null)}get assetUri(){return k(this,Bm)}createApp(e){return console.warn(),new tW(e,{provider:this,event:k(this,qm)})}dispose(){k(this,vf).unsubscribe()}}rc=new WeakMap,Bm=new WeakMap,nc=new WeakMap,vf=new WeakMap,qm=new WeakMap;const l6="app",iW={name:l6,configure:()=>new uW,initialize:async r=>{const e=await r.config.createConfigAsync(r),t=await r.requireInstance("event").catch(()=>{});return new nW({config:e,event:t})},dispose:r=>{r.instance.dispose()}},oW=j.object({environment:j.record(j.any()).optional().default({}),endpoints:j.record(j.object({url:j.string(),scopes:j.array(j.string()).optional().default([])})).optional()}),d6=j.object({azureUniqueId:j.string({description:"The unique identifier for the person in Azure."}),displayName:j.string({description:"The display name of the person."}),mail:j.string({description:"The email address of the person, which can be null or undefined."}).nullish(),upn:j.string({description:"The User Principal Name (UPN) of the person, which can be null or undefined."}).nullish(),accountType:j.string({description:"The type of account the person has."}),accountClassification:j.string({description:"The classification of the account, which can be null or undefined."}).nullish(),isExpired:j.boolean({description:"Indicates whether the account is expired, which can be null or undefined."}).nullish()}),aW=j.object({version:j.string(),entryPoint:j.string(),tags:j.array(j.string()).nullish(),tag:j.enum(["latest","preview"]).nullish(),assetPath:j.string().nullish(),configUrl:j.string().nullish(),timestamp:j.string().nullish(),commitSha:j.string().nullish(),githubRepo:j.string().nullish(),projectPage:j.string().nullish(),allowedExtensions:j.array(j.string()).nullish(),uploadedBy:d6.nullish()}),sW=j.object({appKey:j.string(),displayName:j.string(),description:j.string(),type:j.string(),isPinned:j.boolean().nullish(),templateSource:j.string().nullish(),category:j.object({id:j.string(),name:j.string(),displayName:j.string(),color:j.string(),defaultIcon:j.string(),sortOrder:j.number()}).nullish(),visualization:j.object({color:j.string().nullish(),icon:j.string().nullish(),sortOrder:j.number()}).nullish(),keywords:j.array(j.string()).nullish(),admins:j.array(d6).nullish(),owners:j.array(d6).nullish(),build:aW.nullish()});class Pl extends Error{constructor(t,n,i){super(n,i);Le(this,"type");this.type=t}static fromHttpResponse(t,n){switch(t.status){case 401:return new Pl("unauthorized","failed to load application manifest, request not authorized",n);case 404:return new Pl("not_found","application manifest not found",n)}return new Pl("unknown",`failed to load application manifest, status code ${t.status}`,n)}}class mu extends Error{constructor(t,n,i){super(n,i);Le(this,"type");this.type=t}static fromHttpResponse(t,n){switch(t.status){case 401:return new mu("unauthorized","failed to load application config, request not authorized",n);case 404:return new mu("not_found","application config not found",n)}return new mu("unknown",`failed to load application config, status code ${t.status}`,n)}}class gu extends Error{constructor(t,n,i){super(n,i);Le(this,"type");this.type=t}static fromHttpResponse(t,n){switch(t.status){case 401:return new gu("unauthorized","failed to load application settings, request not authorized",n);case 404:return new gu("not_found","application not found",n)}return new gu("unknown",`failed to load application settings, status code ${t.status}`,n)}}const SM=r=>{for(const e of Object.keys(r))typeof r[e]=="object"&&r[e]!==null&&!Object.isFrozen(r[e])&&SM(r[e]);return Object.freeze(r)};var yf;class cW{constructor(e){Ie(this,yf);Le(this,"environment");this.environment=SM(e.environment??{}),Be(this,yf,e.endpoints??{})}get endpoints(){return console.warn("endpoints is deprecated, use getEndpoint instead"),new Proxy(k(this,yf),{get(e,t){var n;return(n=e[t])==null?void 0:n.url}})}getEndpoint(e){return k(this,yf)[e]}}yf=new WeakMap;const lW=async r=>{const e=await If(r),t=oW.parse(e);return new cW(t)},mE=sW.transform(r=>{const{category:e,...t}=r;return{...t,get key(){return t.appKey},get name(){return t.displayName},categoryId:e==null?void 0:e.id,category:e}});var _f,bf,wf,cu,Km;class dW{constructor(e){Ie(this,_f);Ie(this,bf);Ie(this,wf);Ie(this,cu);Ie(this,Km);Be(this,Km,e);const t=1*60*1e3;Be(this,_f,new yi({client:{fn:({appKey:n})=>e.json(`/persons/me/apps/${n}`,{headers:{"Api-Version":"1.0"},selector:async i=>mE.parse(await If(i))})},queueOperator:"merge",key:({appKey:n})=>n,expire:t})),Be(this,bf,new yi({client:{fn:n=>{const i=n!=null&&n.filterByCurrentUser?"/persons/me/apps":"/apps?=$expand=category,admins,owners,keywords";return e.json(i,{headers:{"Api-Version":"1.0"},selector:async o=>{const a=await If(o);return mE.array().parse(a.value)}})}},key:n=>n!=null&&n.filterByCurrentUser?"currentUser":"all",expire:t})),Be(this,wf,new yi({client:{fn:({appKey:n,tag:i="latest"})=>e.json(`/apps/${n}/builds/${i}/config`,{selector:lW,headers:{"Api-Version":"1.0"}})},queueOperator:"merge",key:n=>JSON.stringify(n),expire:t})),Be(this,cu,new yi({client:{fn:({appKey:n})=>e.json(`/persons/me/apps/${n}/settings`,{headers:{"Api-Version":"1.0"}})},key:n=>n.appKey,expire:t}))}getAppManifest(e){return k(this,_f).query(e).pipe(sf,jt(t=>{const{cause:n}=t;throw n instanceof Pl?n:n instanceof Tl?Pl.fromHttpResponse(n.response,{cause:n}):new Pl("unknown","failed to load manifest",{cause:n})}))}getAppManifests(e){return k(this,bf).query(e).pipe(sf)}getAppConfig(e){return k(this,wf).query(e).pipe(me(t=>t.value),jt(t=>{const{cause:n}=t;throw n instanceof mu?n:n instanceof Tl?mu.fromHttpResponse(n.response,{cause:n}):new mu("unknown","failed to load config",{cause:n})}))}getAppSettings(e){return k(this,cu).query(e).pipe(sf,jt(t=>{const{cause:n}=t;throw n instanceof gu?n:n instanceof Tl?gu.fromHttpResponse(n.response,{cause:n}):new gu("unknown","failed to load settings",{cause:n})}))}updateAppSettings(e){const{appKey:t,settings:n}=e;return k(this,Km).json$(`/persons/me/apps/${t}/settings`,{method:"PUT",body:n,headers:{"Api-Version":"1.0"}}).pipe(qr(i=>{k(this,cu).mutate({appKey:t},{value:i,updated:Date.now()})}))}[Symbol.dispose](){console.warn("AppClient disposed"),k(this,_f).complete(),k(this,bf).complete(),k(this,wf).complete(),k(this,cu).complete()}}_f=new WeakMap,bf=new WeakMap,wf=new WeakMap,cu=new WeakMap,Km=new WeakMap;class uW extends t2{constructor(){super(...arguments);Le(this,"defaultExpireTime",1*60*1e3)}async _createHttpClient(t){const n=await t.requireInstance("http");return n.hasClient(l6)?n.createClient(l6):await(await t.requireInstance("serviceDiscovery")).createClient("apps")}setClient(t){const n=typeof t=="object"?()=>t:t;this._set("client",n)}setAssetUri(t){const n=typeof t=="string"?async()=>t:t;this._set("assetUri",n)}_createConfig(t,n){return this._has("client")||this.setClient(async()=>{const i=await this._createHttpClient(t);return new dW(i)}),this._has("assetUri")||this.setAssetUri("/apps-proxy"),super._createConfig(t,n)}}const hW=(r,e)=>{r.addConfig({module:iW,configure:async t=>{}})},AM=(r,e,t)=>{x.useEffect(()=>{const n=r.subscribe(e);return n.add(t),()=>n.unsubscribe()},[r,e])},fW=(r,e,t)=>{x.useLayoutEffect(()=>{const n=r.subscribe(e);return n.add(t),()=>n.unsubscribe()},[r,e])};function ks(r,e){const t=x.useCallback(()=>(e==null?void 0:e.initial)??r.value??void 0,[r,e==null?void 0:e.initial]),n=x.useRef(t()),[i,o]=x.useState(n.current),[a,c]=x.useState(null),[d,u]=x.useState(!1);x.useLayoutEffect(()=>{n.current=t()},[t]),x.useLayoutEffect(()=>{c(null),u(!1),o(n.current)},[r]);const h=x.useMemo(()=>({next:o,error:c,complete:()=>u(!0)}),[]);return fW(r,h,e==null?void 0:e.teardown),{value:i,error:a,complete:d}}const gE=n2({id:gi(),name:gi(),mail:gi().optional()}),TM=n2({identifier:gi(),name:gi().nullish(),subSystem:gi().nullish()},{message:"invalid source system"}),pW=n2({id:gi(),name:gi().optional(),type:gi().optional()}),IM=n2({id:gi(),name:gi(),appKey:gi(),description:gi().optional(),isShared:Rw().optional(),created:Rb(),createdBy:gE,updated:Rb().optional(),updatedBy:gE.optional(),context:pW.optional(),sourceSystem:TM.nullish()});tP(IM);const mW=(r=rP(eP()).or(gi()).optional())=>IM.extend({payload:r}),vE=Yb["1.0"].transform(r=>({azureUniqueId:r.azureUniqueId,id:r.azureUniqueId,name:r.name,email:r.mail})),u6=r=>{const{createdBy:e,updatedBy:t,...n}=r;return mW().parse({...n,createdBy:vE.parse(e),updatedBy:t?vE.parse(t):void 0})},yE=r=>{const{payload:e,...t}=u6(r);return t};var eo,lu,ic,cs;class gW{constructor(e,t){Ie(this,eo);Ie(this,lu);Ie(this,ic);Ie(this,cs);Be(this,eo,e);const{expire:n=5*60*1e3}=t??{};Be(this,lu,new yi({client:{fn:i=>k(this,eo).get("v2",i).pipe(me(yE))},key:i=>i.bookmarkId,expire:n})),Be(this,ic,new yi({client:{fn:i=>k(this,eo).query("v2",{filter:i}).pipe(me(o=>o.map(yE)))},key:i=>JSON.stringify(i??""),expire:n})),Be(this,cs,new yi({client:{fn:i=>k(this,eo).getPayload("v1",i).pipe(me(o=>o.payload))},key:i=>i.bookmarkId,expire:n,cache:{trimming:{size:3}}}))}getAllBookmarks(e){return k(this,ic).query(e).pipe(me(t=>t.value))}getBookmarkById(e){return k(this,lu).query({bookmarkId:e}).pipe(me(t=>t.value))}getBookmarkData(e){return k(this,cs).query({bookmarkId:e}).pipe(me(t=>t.value))}setBookmarkData(e,t){return k(this,eo).patch("v1",{bookmarkId:e,updates:{payload:t}}).pipe(me(n=>n.payload),qr(n=>{n&&k(this,cs).mutate({bookmarkId:e},{value:n,updated:Date.now()},{allowCreation:!0})}))}createBookmark(e){return k(this,eo).create("v1",e).pipe(me(t=>u6(t)),qr(t=>{console.log("createdBookmark",t);const{payload:n,...i}=t;k(this,lu).mutate({bookmarkId:i.id},{value:i,updated:Date.now()},{allowCreation:!0}),n&&k(this,cs).mutate({bookmarkId:i.id},{value:n,updated:Date.now()},{allowCreation:!0}),k(this,ic).invalidate()}))}updateBookmark(e,t){const n=k(this,eo).patch("v1",{bookmarkId:e,updates:t}).pipe(me(i=>u6(i)),WN());return new It(i=>{i.add(n.subscribe(o=>{const{payload:a,...c}=o;k(this,lu).mutate({bookmarkId:e},{value:c,updated:Date.now()},{allowCreation:!1})})),i.add(n.subscribe(o=>{const{payload:a}=o;if(a)k(this,cs).mutate({bookmarkId:o.id},{value:a,updated:Date.now()},{allowCreation:!0});else{const c=k(this,cs).generateCacheKey({bookmarkId:o.id});k(this,cs).cache.removeItem(c)}})),i.add(n.subscribe(()=>{k(this,ic).invalidate()})),n.subscribe(i)})}deleteBookmark(e){return k(this,eo).delete("v1",{bookmarkId:e})}addBookmarkToFavorites(e){return k(this,eo).addFavourite("v1",{bookmarkId:e}).pipe(qr(()=>k(this,ic).invalidate()))}removeBookmarkFromFavorites(e){return k(this,eo).removeFavourite("v1",{bookmarkId:e}).pipe(qr(()=>k(this,ic).invalidate()))}isBookmarkFavorite(e){return k(this,eo).isFavorite("v1",{bookmarkId:e})}}eo=new WeakMap,lu=new WeakMap,ic=new WeakMap,cs=new WeakMap;const RM=j.object({log:j.custom().optional(),logLevel:j.nativeEnum(ln).optional(),eventProvider:j.custom().optional(),sourceSystem:TM.optional().describe("The source system for the bookmarks"),parent:j.custom().describe("Parent Bookmark provider").optional().nullable(),client:j.custom().describe("API client for interacting with bookmarks"),resolve:j.object({context:j.function().returns(j.promise(j.object({id:j.string()}).optional())),application:j.function().returns(j.promise(j.object({appKey:j.string(),name:j.string().optional()}).optional()))}).describe("Functions for resolving context and application"),filters:j.object({context:j.boolean().optional().default(!1),application:j.boolean().optional().default(!1)}).describe("Flags for enabling resolving when fetching bookmarks").optional().default({context:!1,application:!1})}),vW=RM.pick({filters:!0,sourceSystem:!0,resolve:!0}).partial().optional();var Rr;class yW extends t2{constructor(t){super();Ie(this,Rr);Le(this,"defaultExpireTime",1*60*1e3);const{log:n}=t??{};Be(this,Rr,n),this._set("log",async()=>n)}setLogLevel(t){this._set("logLevel",async()=>t),k(this,Rr)&&(k(this,Rr).level=t)}setClient(t){typeof t=="function"?this._set("client",n=>t(n)):this._set("client",async()=>t)}setParent(t){typeof t=="function"?this._set("parent",n=>t(n)):this._set("parent",async()=>t)}setSourceSystem(t){typeof t=="function"?this._set("sourceSystem",t):this._set("sourceSystem",async()=>t)}setContextResolver(t){this._set("resolve.context",t)}setApplicationResolver(t){this._set("resolve.application",t)}setFilter(t,n){this._set(`filters.${t}`,async()=>n)}_createConfig(t,n){var i,o,a,c,d,u,h;if(!this._has("parent")){(i=k(this,Rr))==null||i.debug("No parent provided, using default parent");const p=t.ref;if(p&&"bookmark"in p){const m=p.bookmark;"version"in m&&m.version.satisfies(">=2.0.0")?this._set("parent",async()=>m):(o=k(this,Rr))==null||o.warn("invalid version of parent BookmarkProvider provided")}else(a=k(this,Rr))==null||a.info("No parent BookmarkProvider found")}return this._has("client")||((c=k(this,Rr))==null||c.debug("No client provided, using default client"),this._set("client",this._createDefaultClient.bind(this))),this._has("resolve.context")||((d=k(this,Rr))==null||d.debug("No context resolver provided, using default context resolver"),this._set("resolve.context",this._createDefaultContextResolver.bind(this))),this._has("resolve.application")||((u=k(this,Rr))==null||u.debug("No application resolver provided, using default application resolver"),this._set("resolve.application",this._createDefaultApplicationResolver.bind(this))),this._has("eventProvider")||((h=k(this,Rr))==null||h.debug("No event provider provided, using default event provider"),this._set("eventProvider",this._resolveEventProvider.bind(this))),super._createConfig(t,vW.parse(n))}async _createDefaultContextResolver(t){var n,i;if(t.hasModule("context")){(n=k(this,Rr))==null||n.debug("Context module available, awaiting instance");const o=await t.requireInstance("context");return(i=k(this,Rr))==null||i.debug("Context provider available, creating context resolver"),async()=>{var c,d;(c=k(this,Rr))==null||c.debug("Resolving context for bookmarks");const a=(d=o.currentContext)==null?void 0:d.id;return a?{id:a}:void 0}}}async _createDefaultApplicationResolver(t){var n,i;if(t.hasModule("app")){(n=k(this,Rr))==null||n.debug("App module available, awaiting instance");const o=await t.requireInstance("app");return(i=k(this,Rr))==null||i.debug("App provider available, creating application resolver"),async()=>{var c,d;const a=o.current;if(a)return{appKey:a.appKey,name:(c=a.manifest)==null?void 0:c.name};(d=k(this,Rr))==null||d.warn("No current application found")}}}async _resolveAppProvider(t){var n,i;if(t.hasModule("app"))return(n=k(this,Rr))==null||n.debug("App module available, awaiting instance"),t.requireInstance("app");(i=k(this,Rr))==null||i.debug("No app module available, will use ref to app module if available")}async _resolveEventProvider(t){var n;if(t.hasModule("event"))return(n=k(this,Rr))==null||n.debug("Event module available, awaiting instance"),t.requireInstance("event")}async _createDefaultClient(t){var n;try{const o=await(await this._getServiceProvider(t)).createBookmarksClient("json$");return new gW(o)}catch{(n=k(this,Rr))==null||n.warn("Failed to create bookmark api client")}}async _getServiceProvider(t){var i,o,a,c;if(t.hasModule("services"))return(i=k(this,Rr))==null||i.debug("Services module available, awaiting instance"),t.requireInstance("services");(o=k(this,Rr))==null||o.debug("No services module available, will use ref services module if available");const n=(a=t.ref)==null?void 0:a.services;if(n)return n;throw(c=k(this,Rr))==null||c.error("No service provider available, cannot create bookmarks client"),Error("[BookmarkConfigurator] No service provider configures [ServicesModule] ")}async _processConfig(t,n){var i;try{return RM.parse(t)}catch(o){throw(i=k(this,Rr))==null||i.error("Failed to parse config",t,o.issues??o),o}}}Rr=new WeakMap;var u_,_E;function _W(){return _E||(_E=1,u_=function r(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,i,o;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(i=n;i--!==0;)if(!r(e[i],t[i]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(i of e.entries())if(!t.has(i[0]))return!1;for(i of e.entries())if(!r(i[1],t.get(i[0])))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(i of e.entries())if(!t.has(i[0]))return!1;return!0}if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(n=e.length,n!=t.length)return!1;for(i=n;i--!==0;)if(e[i]!==t[i])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(i=n;i--!==0;)if(!Object.prototype.hasOwnProperty.call(t,o[i]))return!1;for(i=n;i--!==0;){var a=o[i];if(!r(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}),u_}var bW=_W();const h_=zu(bW),qe={aborted:nn("action_aborted",r=>({payload:r})),setBookmark:nn("set_bookmark",r=>({payload:r})),setCurrentBookmark:nn("set_current_bookmark",r=>({payload:r})),fetchBookmark:hi("fetch_bookmark",(r,e)=>({payload:r,meta:e}),(r,e)=>({payload:r,meta:e}),(r,e)=>({payload:r,meta:e})),fetchBookmarkData:hi("fetch_bookmark_payload",(r,e)=>({payload:r,meta:e}),(r,e,t)=>({payload:{bookmarkId:r,data:e},meta:t}),(r,e)=>({payload:r,meta:e})),fetchBookmarks:hi("fetch_bookmarks",(r,e)=>({payload:r,meta:e}),(r,e)=>({payload:r,meta:e}),(r,e)=>({payload:r,meta:e})),updateBookmark:hi("set_bookmark",(r,e)=>({payload:r,meta:e}),(r,e)=>({payload:r,meta:e}),(r,e)=>({payload:r,meta:e})),createBookmark:hi("create_bookmark",(r,e)=>({payload:r,meta:e}),(r,e)=>({payload:r,meta:e}),(r,e)=>({payload:r,meta:e})),deleteBookmark:hi("delete_bookmark",(r,e)=>({payload:r,meta:{ref:r,...e}}),(r,e)=>({payload:r,meta:{ref:r,...e}}),(r,e)=>({payload:r,meta:e})),removeBookmark:hi("remove_bookmark",(r,e)=>({payload:r,meta:{ref:r,...e}}),(r,e)=>({payload:r,meta:e}),(r,e)=>({payload:r,meta:e})),addBookmarkAsFavourite:hi("add_favourite_bookmark",(r,e)=>({payload:r,meta:{ref:r,...e}}),(r,e)=>({payload:r,meta:{ref:r,...e}}),(r,e)=>({payload:r,meta:e})),removeBookmarkAsFavourite:hi("remove_favourite_bookmark",(r,e)=>({payload:r,meta:{ref:r,...e}}),(r,e)=>({payload:r,meta:{ref:r,...e}}),(r,e)=>({payload:r,meta:e}))},G0=r=>kv(r.type),wW={status:new Set,errors:{},bookmarks:{}},xW=r=>a2({...wW,...r},e=>{e.addCase(qe.fetchBookmark.success,(t,n)=>{n.payload.id in t.bookmarks&&(t.bookmarks[n.payload.id]=n.payload)}).addCase(qe.fetchBookmarkData.success,(t,n)=>{var a;const{bookmarkId:i,data:o}=n.payload;((a=t.currentBookmark)==null?void 0:a.id)===i&&(t.currentBookmark.payload=o)}).addCase(qe.fetchBookmarks.success,(t,n)=>{t.bookmarks=n.payload.reduce((i,o)=>(i[o.id]=o,i),{})}).addCase(qe.setBookmark,(t,n)=>{var o;const i=n.payload.id;i in t.bookmarks&&(t.bookmarks[i]=n.payload),((o=t.currentBookmark)==null?void 0:o.id)===i&&(t.currentBookmark=n.payload)}).addCase(qe.setCurrentBookmark,(t,n)=>{t.currentBookmark=n.payload}).addCase(qe.createBookmark.success,(t,n)=>{const{payload:i,...o}=n.payload;t.bookmarks[o.id]=o}).addCase(qe.updateBookmark.success,(t,n)=>{var u;const i=n.payload.id,o=i in t.bookmarks,a=((u=t.currentBookmark)==null?void 0:u.id)===i,d={...o?t.bookmarks[i]:a?t.currentBookmark:null,...n.payload};o&&(t.bookmarks[i]=d),a&&(t.currentBookmark=d)}).addCase(qe.deleteBookmark.success,(t,n)=>{delete t.bookmarks[n.payload]}).addCase(qe.removeBookmarkAsFavourite.success,(t,n)=>{delete t.bookmarks[n.payload]}).addMatcher(kP,(t,n)=>{const i=G0(n);t.status.add(i)}).addMatcher(EP,(t,n)=>{const i=G0(n);delete t.errors[i]}).addMatcher(Gw,(t,n)=>{const i=G0(n);t.errors[i]=n.payload}).addMatcher(SP,(t,n)=>{const i=G0(n);t.status.delete(i)})});class Ul extends Error{constructor(t,n,i){super(t,i);Le(this,"action");this.action=n,this.name="BookmarkProcessError"}}class Ar extends Error{constructor(e,t){super(e,t),this.name="BookmarkProviderError"}}const c8=200,CW=r=>e=>e.pipe(Oe(qe.fetchBookmark.match),Aw(n=>n.payload),Wn(n=>n.pipe(Tw(c8))),Qt(n=>at(r.getBookmarkById(n.payload)).pipe(Ci(),me(i=>qe.fetchBookmark.success(i,n.meta)),jt(i=>Pt(qe.fetchBookmark.failure(new Ul("Failed to fetch bookmark",n,{cause:i}),n.meta)))))),kW=r=>e=>e.pipe(Oe(qe.fetchBookmarkData.match),Aw(n=>JSON.stringify(n.payload)),Wn(n=>n.pipe(Tw(c8))),Qt(n=>at(r.getBookmarkData(n.payload)).pipe(Ci(),me(i=>qe.fetchBookmarkData.success(n.payload,i,n.meta)),jt(i=>Pt(qe.fetchBookmarkData.failure(new Ul("Failed to fetch bookmark payload",n,{cause:i}),n.meta)))))),EW=r=>e=>e.pipe(Oe(qe.fetchBookmarks.match),Aw(n=>JSON.stringify(n.payload)),Qt(n=>n.pipe(Tw(c8))),Qt(n=>at(r.getAllBookmarks(n.payload)).pipe(Ci(),me(i=>qe.fetchBookmarks.success(i,n.meta)),jt(i=>Pt(qe.fetchBookmarks.failure(new Ul("Failed to fetch all bookmarks",n,{cause:i}),n.meta)))))),SW=r=>e=>e.pipe(Oe(qe.createBookmark.match),bs(n=>at(r.createBookmark(n.payload)).pipe(Ci(),me(i=>qe.createBookmark.success(i,n.meta)),jt(i=>Pt(qe.createBookmark.failure(new Ul("Failed to create new bookmark",n,{cause:i}),n.meta)))))),AW=r=>e=>e.pipe(Oe(qe.updateBookmark.match),bs(n=>{const{bookmarkId:i,updates:o}=n.payload;return at(r.updateBookmark(i,o)).pipe(Ci(),me(a=>qe.updateBookmark.success(a,n.meta)),jt(a=>Pt(qe.updateBookmark.failure(new Ul("Failed to update bookmark",n,{cause:a}),n.meta))))})),TW=r=>e=>e.pipe(Oe(qe.deleteBookmark.match),bs(n=>at(r.deleteBookmark(n.payload)).pipe(Ci(),me(()=>qe.deleteBookmark.success(n.payload,n.meta)),jt(i=>Pt(qe.deleteBookmark.failure(new Ul("Failed to delete bookmark",n,{cause:i}),n.meta)))))),IW=r=>e=>e.pipe(Oe(qe.removeBookmarkAsFavourite.match),bs(n=>at(r.removeBookmarkFromFavorites(n.payload)).pipe(Ci(),me(()=>qe.removeBookmarkAsFavourite.success(n.payload,n.meta)),jt(i=>Pt(qe.removeBookmarkAsFavourite.failure(new Ul("Failed to remove bookmark as favorite",n,{cause:i}),n.meta)))))),RW=r=>e=>e.pipe(Oe(qe.addBookmarkAsFavourite.match),bs(n=>at(r.addBookmarkToFavorites(n.payload)).pipe(Ci(),me(()=>qe.addBookmarkAsFavourite.success(n.payload,n.meta)),jt(i=>Pt(qe.addBookmarkAsFavourite.failure(new Ul("Failed to add bookmark as favorite",n,{cause:i}),n.meta)))))),PW=r=>e=>{const t=e.pipe(Oe(qe.removeBookmark.match),bs(({payload:a})=>at(r.isBookmarkFavorite(a)).pipe(me(c=>(c?qe.removeBookmarkAsFavourite:qe.deleteBookmark)(a))))),n=Z3(e.pipe(Oe(qe.deleteBookmark.failure.match)),e.pipe(Oe(qe.removeBookmarkAsFavourite.failure.match))).pipe(me(a=>qe.removeBookmark.failure(a.payload,a.meta))),i=Z3(e.pipe(Oe(qe.deleteBookmark.success.match)),e.pipe(Oe(qe.removeBookmarkAsFavourite.success.match))).pipe(me(a=>qe.removeBookmark.success({type:kv(a.type),bookmarkId:a.payload},a.meta)));return El(t,Z3(n,i))},MW=r=>(e,t)=>Pt(CW,kW,EW,SW,AW,TW,PW,IW,RW).pipe(Wn(n=>n(r)(e,t))),$W=r=>{const e=new o2(xW(r.initial));return e.addFlow(MW(r.client)),e},bE=r=>Object.values(r.bookmarks),W0=(r,e)=>r.bookmarks[e],f_=r=>r.currentBookmark,OW=r=>Object.values(r.errors),PM="2.1.9",Ed=2*60*1e3;var ui,nr,wl,xl,iR;let ZW=(iR=class{constructor(e){Ie(this,ui);Ie(this,nr);Ie(this,wl,[]);Ie(this,xl,new Qn);var t,n;if(Be(this,ui,e),Be(this,nr,$W({client:e.client,initial:{currentBookmark:((t=this._parent)==null?void 0:t.currentBookmark)??null}})),k(this,xl).add(()=>k(this,nr).complete()),k(this,xl).add(k(this,nr).action$.subscribe(i=>{var o,a;Gw(i)?(o=this._log)==null||o.error(`Action: ${i.type}`,i):(a=this._log)==null||a.debug(`Action: ${i.type}`,i)})),k(this,xl).add(k(this,nr).select(f_).subscribe(i=>{i!==void 0&&this._dispatchEvent("onCurrentBookmarkChanged",{detail:i})})),this._event&&this._event.addEventListener("onCurrentBookmarkChanged",i=>{const{source:o,detail:a}=i;a!==void 0&&o!==this&&a!==this.currentBookmark&&k(this,nr).next(qe.setCurrentBookmark(a))}),this._parent)try{k(this,xl).add(this._parent.currentBookmark$.pipe(Oe(i=>i!==void 0),Oe(i=>i!==this.currentBookmark)).subscribe(i=>{k(this,nr).next(qe.setCurrentBookmark(i))}))}catch(i){(n=this._log)==null||n.error("Failed to subscribe to parent bookmark provider",i)}}get config(){return{getCurrentAppIdentification(){return window.Fusion.modules.app.current.appKey}}}addStateCreator(e){return console.warn("addStateCreator is deprecated, use addPayloadGenerator instead"),this.addPayloadGenerator(e)}deleteBookmarkByIdAsync(e){return console.warn("deleteBookmarkByIdAsync is deprecated, use deleteBookmarkAsync instead"),this.deleteBookmarkAsync(e)}addBookmarkFavoriteAsync(e){return console.warn("addBookmarkFavoriteAsync is deprecated, use addBookmarkToFavoritesAsync instead"),this.addBookmarkToFavoritesAsync(e)}removeBookmarkFavoriteAsync(e){return console.warn("removeBookmarkFavoriteAsync is deprecated, use removeBookmarkAsFavoriteAsync instead"),this.removeBookmarkAsFavoriteAsync(e)}getBookmarkById(e){return console.warn("getBookmarkById is deprecated, use getBookmarkAsync instead"),this.getBookmarkAsync(e)}get version(){return new fs(PM)}get filters(){return k(this,ui).filters}get client(){return k(this,ui).client}get currentBookmark$(){return k(this,nr).select(f_,h_)}get bookmarks$(){return this.getAllBookmarksAsync(),k(this,nr).select(bE,h_)}get bookmarks(){return bE(k(this,nr).value)}get currentBookmark(){return f_(k(this,nr).value)}get status$(){return k(this,nr).select(e=>e.status)}get errors$(){return k(this,nr).select(OW,h_)}get canCreateBookmarks(){return k(this,wl).length>0}get sourceSystem(){return k(this,ui).sourceSystem}get resolvedApplication(){return k(this,ui).resolve.application}get resolvedContext(){return k(this,ui).resolve.context}get _apiClient(){return k(this,ui).client}get _log(){return k(this,ui).log}get _resolve(){return k(this,ui).resolve}get _event(){return k(this,ui).eventProvider}get _parent(){return k(this,ui).parent}on(e,t){var n,i;return this._event?(i=this._event)==null?void 0:i.addEventListener(e,o=>{o.source===this&&t(o)}):((n=this._log)==null||n.warn("Failed to register event listener, event provider not configured"),()=>{})}addPayloadGenerator(e){var t;return(t=this._log)==null||t.debug(`adding bookmark payload generator: ${e.name}`),k(this,wl).push(e),this._dispatchEvent("onBookmarkPayloadCreatorAdded",{detail:e}),()=>{var n;(n=this._log)==null||n.debug(`removing bookmark payload generator: ${e.name}`),Be(this,wl,k(this,wl).filter(i=>i!==e))}}generatePayload(e){var n;return(n=this._log)==null||n.debug("generating payload",e),at(k(this,wl)).pipe(DR((i,o)=>this._producePayload(i,o),e??{},1),qr(i=>{var o;return(o=this._log)==null?void 0:o.debug("generated payload",{initial:e,payload:i})}))}_producePayload(e,t,n){return qw(e,async i=>{var o,a,c;try{const d=await Promise.resolve(t(i,n));if(d)return(o=this._log)==null||o.warn(`bookmark data generator ${t.name} returned a value, but it should not do this, since the data is an immer draft object`),JSON.parse(JSON.stringify(d));if(d===null){(a=this._log)==null||a.info(`bookmark data generator ${t.name} wish to clear the bookmark data`);return}}catch(d){(c=this._log)==null||c.error(`Failed to produce payload using generator ${t.name}`,d)}})}getBookmark(e,t){var n;return(n=this._log)==null||n.debug(`fetching bookmark: ${e}`,t),Ig({bookmark:this._getBookmarkInfo(e),payload:t!=null&&t.excludePayload?Pt({}):this._getBookmarkData(e)}).pipe(jt(i=>{var o;throw(o=this._log)==null||o.error(`Failed to fetch bookmark: ${e}`,i),i}),me(({bookmark:i,payload:o})=>Object.assign({},i,{payload:o})),qr(i=>{var o;(o=this._log)==null||o.debug(`Bookmark fetched: ${i.id}`,i)}))}getBookmarkAsync(e,t){return hr(this.getBookmark(e,t))}getAllBookmarks(){return new It(e=>{var o,a,c;(o=this._log)==null||o.debug("fetching all bookmarks");const t=Ig({sourceSystem:Pt(this.sourceSystem),appKey:(a=k(this,ui).filters)!=null&&a.application?at(this._resolve.application()).pipe(me(d=>d==null?void 0:d.appKey)):Pt(void 0),contextId:(c=k(this,ui).filters)!=null&&c.context?at(this._resolve.context()).pipe(me(d=>d==null?void 0:d.id)):Pt(void 0)}).pipe(jt(d=>{var h;const u=new Ar("Could not fetch bookmarks, failed to resolve filter parameters",d);throw(h=this._log)==null||h.error(u.message,u),u}));e.add(t.subscribe(d=>{k(this,nr).next(qe.fetchBookmarks(d))}));const n=k(this,nr).action$.pipe(Oe(qe.fetchBookmarks.failure.match),me(d=>{var u;throw(u=this._log)==null||u.error("Failed to fetch bookmarks",d.payload),new Ar("Failed to fetch bookmarks",d.payload)}),Ks({each:Ed,with:()=>{throw new Ar("Timeout while fetching bookmarks")}}));k(this,nr).action$.pipe(Oe(qe.fetchBookmarks.success.match),me(d=>d.payload),qr(d=>{var u;(u=this._log)==null||u.debug("fetched all bookmarks",d)}),Jc(n),Gs()).subscribe(e)})}async getAllBookmarksAsync(){return hr(this.getAllBookmarks())}setCurrentBookmark(e){var n;return e==this.currentBookmark?Pt(e):((n=this._log)==null||n.debug("setting current bookmark",e),(typeof e=="string"?this.getBookmark(e):Pt(e??null)).pipe(Qt(async i=>{var d;const o=this.currentBookmark,{type:a,canceled:c}=await this._dispatchEvent("onCurrentBookmarkChange",{detail:{current:o,next:i}});if(c){const u=new Ar(`event: ${a} was canceled by listener for change to ${(i==null?void 0:i.id)??"none"}, from ${(o==null?void 0:o.id)??"none"}`);throw(d=this._log)==null||d.info(u.message),u}return i}),qr(i=>{k(this,nr).next(qe.setCurrentBookmark(i))}),jt(i=>{var a;const o=new Ar("Could not set current bookmark, resolve of bookmark failed",i);throw(a=this._log)==null||a.error(o.message,o),o})))}setCurrentBookmarkAsync(e){return hr(this.setCurrentBookmark(e))}createBookmark(e){return new It(t=>{var u;const{ref:n,action$:i}=this._useScopedActions();(u=this._log)==null||u.debug(`creating new bookmark, ref: ${n}`,e);const a=Ig({appKey:e.appKey?Pt(e.appKey):at(this._resolve.application()).pipe(me(h=>{if(!(h!=null&&h.appKey))throw new Ar("Failed to resolve application key");return h.appKey})),contextId:this._resolve.context().then(h=>h==null?void 0:h.id),payload:this.generatePayload(e.payload),sourceSystem:Pt(this.sourceSystem)}).pipe(jt(h=>{var m;const p=new Ar("Could not create new bookmark, failed to resolve bookmark data",h);throw(m=this._log)==null||m.error(p.message,p),p}),me(h=>({...e,...h}))).pipe(Qt(async h=>{var v;const{canceled:p,type:m}=await this._dispatchEvent("onBookmarkCreate",{detail:h,cancelable:!0});if(p){const _=new Ar(`event: ${m} was canceled by listener for creating bookmark: ${n}`);throw(v=this._log)==null||v.info(_.message),_}return h}));t.add(a.subscribe({error:h=>t.error(h),next:h=>{k(this,nr).next(qe.createBookmark(h,{ref:n}))}}));const c=i.pipe(Oe(qe.createBookmark.failure.match),me(({payload:h})=>{var m;const p=new Ar(`Failed to create bookmark: ${n}`,{cause:h});throw(m=this._log)==null||m.warn(p.message),p}),Ks({each:Ed,with:()=>{throw new Ar(`Timeout while creating bookmark: ${n}`)}}));i.pipe(Oe(qe.createBookmark.success.match),me(({payload:h})=>h),qr(h=>{var p;(p=this._log)==null||p.info(`Bookmark created: ${h.id}, ref: ${n}`),this._dispatchEvent("onBookmarkCreated",{detail:h})}),Jc(c),Gs()).subscribe(t)})}createBookmarkAsync(e){return hr(this.createBookmark(e))}updateBookmark(e,t,n){if(!t&&(n!=null&&n.excludePayloadGeneration))throw new Ar("Cannot update bookmark without updates and excludePayloadGeneration option");return new It(i=>{var p;const{ref:o,action$:a}=this._useScopedActions();(p=this._log)==null||p.debug(`Updating bookmark: ${e}, ref: ${o}`);const d=(n!=null&&n.excludePayloadGeneration?Pt(t):this.generatePayload(t==null?void 0:t.payload).pipe(me(m=>({...t,payload:m})))).pipe(Qt(async m=>{var b;const{canceled:v,type:_}=await this._dispatchEvent("onBookmarkUpdate",{detail:{current:W0(k(this,nr).value,e),updates:m},cancelable:!0});if(v){const C=new Ar(`event: ${_} was canceled by listener for updating bookmark: ${e}, ref: ${o}`);throw(b=this._log)==null||b.warn(C.message,m),C}return m}));i.add(d.subscribe({error:m=>i.error(m),next:m=>{k(this,nr).next(qe.updateBookmark({bookmarkId:e,updates:m},{ref:o}))}}));const u=a.pipe(Oe(qe.updateBookmark.failure.match),me(({payload:m})=>{var _;const v=new Ar(`Failed to update bookmark: ${e}`,{cause:m});throw(_=this._log)==null||_.info(v.message),v}),Ks({each:Ed,with:()=>{throw new Ar(`Timeout while updating bookmark: ${e}`)}}));a.pipe(Oe(qe.updateBookmark.success.match),me(({payload:m})=>({...W0(k(this,nr).value,m.id),payload:m.payload})),qr(m=>{var v;(v=this._log)==null||v.info(`Bookmark updated: ${m.id}, ref: ${o}`),this._dispatchEvent("onBookmarkUpdated",{detail:m})}),Jc(u),Gs()).subscribe(i)})}updateBookmarkAsync(e,t,n){if(typeof e=="object"){console.warn("updateBookmarkAsync(bookmark, updates, options) is deprecated, use updateBookmarkAsync(id, updates, options) instead");const{id:i,...o}=e;return hr(this.updateBookmark(i,o,{excludePayloadGeneration:!t.updatePayload}).pipe(me(a=>a.payload)))}return hr(this.updateBookmark(e,t,n))}deleteBookmark(e){return new It(t=>{var u;const{ref:n,action$:i}=this._useScopedActions();(u=this._log)==null||u.debug(`Removing bookmark: ${e}, ref: ${n}`);const o=W0(k(this,nr).value,e)??{id:e},a=at(this._dispatchEvent("onBookmarkDelete",{detail:o,cancelable:!0})).pipe(me(({canceled:h,type:p,detail:m})=>{var v;if(h){const _=new Ar(`event: ${p} was canceled by listener for removing bookmark: ${e}, ref: ${n}`);throw(v=this._log)==null||v.warn(_.message),_}return m}));t.add(a.subscribe({error:h=>t.error(h),next:h=>{k(this,nr).next(qe.deleteBookmark(h.id,{ref:n}))}}));const c=i.pipe(Oe(qe.deleteBookmark.failure.match),me(({payload:h})=>{var m;const p=new Ar(`Failed to update bookmark: ${e}`,{cause:h});throw(m=this._log)==null||m.warn(p.message),p}),Ks({each:Ed,with:()=>{throw new Ar(`Timeout while updating bookmark: ${e}`)}}));i.pipe(Oe(qe.deleteBookmark.success.match),me(()=>{}),qr(()=>{var h;(h=this._log)==null||h.info(`Removed bookmark: ${o.id}, ref: ${n}`),this._dispatchEvent("onBookmarkDeleted",{detail:o})}),Jc(c),Gs()).subscribe(t)})}async deleteBookmarkAsync(e){return hr(this.deleteBookmark(e))}addBookmarkToFavorites(e){return new It(n=>{var u;const{ref:i,action$:o}=this._useScopedActions();(u=this._log)==null||u.debug(`Adding bookmark: ${e} to favourites, ref: ${i}`);const a=at(this._dispatchEvent("onBookmarkFavouriteAdd",{detail:{id:e},cancelable:!0})).pipe(me(({canceled:h,type:p})=>{var m;if(h){const v=new Ar(`event: ${p} was canceled by listener for adding favourite bookmark: ${e}, ref: ${i}`);throw(m=this._log)==null||m.info(v.message),v}}));n.add(a.subscribe({error:h=>n.error(h),next:()=>{k(this,nr).next(qe.addBookmarkAsFavourite(e,{ref:i}))}}));const c=o.pipe(Oe(qe.addBookmarkAsFavourite.failure.match),me(({payload:h})=>{var m;const p=new Ar(`Failed to add bookmark to favorites: ${e}`,{cause:h});throw(m=this._log)==null||m.warn(p.message),p}),Ks({each:Ed,with:()=>{throw new Ar(`Timeout while adding bookmark to favorites: ${e}`)}}));return o.pipe(Oe(qe.addBookmarkAsFavourite.success.match),Qt(({payload:h})=>this.getBookmark(h,{excludePayload:!0})),qr(h=>{var p;(p=this._log)==null||p.info(`Added bookmark: ${e} to favourites, ref: ${i}`),this._dispatchEvent("onBookmarkFavouriteAdded",{detail:h})}),Jc(c),Gs()).subscribe(n)})}addBookmarkToFavoritesAsync(e){return hr(this.addBookmarkToFavorites(e))}removeBookmarkAsFavorite(e){return new It(n=>{var h;const{ref:i,action$:o}=this._useScopedActions();(h=this._log)==null||h.debug(`Removing bookmark: ${e} from favourites, ref: ${i}`);const a=W0(k(this,nr).value,e)??{id:e},c=at(this._dispatchEvent("onBookmarkFavouriteRemove",{detail:a,cancelable:!0})).pipe(me(({canceled:p,type:m,detail:v})=>{var _;if(p){const b=new Ar(`event: ${m} was canceled by listener for removing favourite bookmark: ${e}, ref: ${i}`);throw(_=this._log)==null||_.warn(b.message),b}return v}));n.add(c.subscribe({error:p=>n.error(p),next:p=>{k(this,nr).next(qe.removeBookmarkAsFavourite(p.id,{ref:i}))}}));const d=o.pipe(Oe(qe.removeBookmarkAsFavourite.failure.match),me(({payload:p})=>{var v;const m=new Ar(`Failed to remove bookmark: ${e} from favourites`,{cause:p});throw(v=this._log)==null||v.warn(m.message),m}),Ks({each:Ed,with:()=>{throw new Ar(`Timeout while removing bookmark: ${e} from favourites`)}}));o.pipe(Oe(qe.removeBookmarkAsFavourite.success.match),qr(()=>{var p;(p=this._log)==null||p.info(`Removed bookmark: ${e} from favourites, ref: ${i}`),this._dispatchEvent("onBookmarkFavouriteRemoved",{detail:a})}),me(()=>{}),Jc(d),Gs()).subscribe(n)})}removeBookmarkAsFavoriteAsync(e){return hr(this.removeBookmarkAsFavorite(e))}isBookmarkInFavorites(e){var t;return(t=this._log)==null||t.debug(`Checking if bookmark: ${e} is in favourites`),at(this._apiClient.isBookmarkFavorite(e)).pipe(jt(n=>{var o;const i=new Ar(`Failed to check if bookmark: ${e} is in favourites`,n);throw(o=this._log)==null||o.error(i.message,i),i}),qr(n=>{var i;(i=this._log)==null||i.debug(`Bookmark: ${e} is ${n?"in":"not in"} favourites`)}))}isBookmarkInFavoritesAsync(e){return hr(this.isBookmarkInFavorites(e))}_getBookmarkInfo(e,t){const{action$:n}=this._useScopedActions(e),i=n.pipe(Oe(qe.fetchBookmark.success.match),me(a=>a.payload),Gs()),o=k(this,nr).action$.pipe(Oe(qe.fetchBookmark.failure.match),me(a=>{throw new Ar(`Failed to fetch bookmark data: ${e}`,a.payload)}),Ks({each:(t==null?void 0:t.timeout)??2*60*1e3,with:()=>{throw new Ar(`Timeout while fetching bookmark data: ${e}`)}}));return k(this,nr).next(qe.fetchBookmark(e,{ref:e})),i.pipe(Jc(o))}_getBookmarkData(e,t){const{action$:n}=this._useScopedActions(e),i=n.pipe(Oe(qe.fetchBookmarkData.success.match),me(a=>a.payload.data),Gs()),o=k(this,nr).action$.pipe(Oe(qe.fetchBookmarkData.failure.match),me(a=>{throw new Ar(`Failed to fetch bookmark data: ${e}`,a.payload)}),Ks({each:(t==null?void 0:t.timeout)??Ed,with:()=>{throw new Ar(`Timeout while fetching bookmark data: ${e}`)}}));return k(this,nr).next(qe.fetchBookmarkData(e,{ref:e})),i.pipe(Jc(o))}async _dispatchEvent(e,t){var i,o;const n=new jR(e,{source:this,canBubble:!0,...t});if(this._event){(i=this._log)==null||i.debug(`dispatching event ${e}`,t);const{canceled:a}=await this._event.dispatchEvent(n);a&&((o=this._log)==null||o.debug(`event ${e} was canceled`,t))}return n}_useScopedActions(e){e??(e=am());const t=k(this,nr).action$.pipe(Oe(n=>{var i;return"meta"in n&&((i=n.meta)==null?void 0:i.ref)===e}));return{ref:e,action$:t}}dispose(){var e;(e=this._log)==null||e.debug("disposing BookmarkProvider"),k(this,xl).unsubscribe()}[Symbol.dispose](){this.dispose()}},ui=new WeakMap,nr=new WeakMap,wl=new WeakMap,xl=new WeakMap,iR);const LW="bookmark",HW=new c2("BookmarkModule"),NW={name:LW,version:new fs(PM),configure:r=>{var i;const e=((i=r==null?void 0:r.log)==null?void 0:i.createSubLogger("BookmarkModule"))||HW,t=r==null?void 0:r.ref;return new yW({log:e,ref:t})},initialize:async r=>{var i;const e=(i=r.ref)==null?void 0:i.bookmark,t=await hr(r.config.createConfig(r,{filters:e==null?void 0:e.filters,sourceSystem:e==null?void 0:e.sourceSystem,resolve:e?{application:e.resolvedApplication.bind(e),context:e.resolvedContext.bind(e)}:void 0}));return new ZW(t)},dispose:r=>{r.instance.dispose()}},DW=(r,e)=>{r.addConfig({module:NW,configure:async t=>{e&&Promise.resolve(e(t))}})};class VW{constructor(){Le(this,"history");Le(this,"basename")}}/**
405
405
  * @remix-run/router v1.23.0
406
406
  *
407
407
  * Copyright (c) Remix Software Inc.
@@ -411,7 +411,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
411
411
  *
412
412
  * @license MIT
413
413
  */function Kr(){return Kr=Object.assign?Object.assign.bind():function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n])}return r},Kr.apply(this,arguments)}var Br;(function(r){r.Pop="POP",r.Push="PUSH",r.Replace="REPLACE"})(Br||(Br={}));const wE="popstate";function FW(r){r===void 0&&(r={});let{initialEntries:e=["/"],initialIndex:t,v5Compat:n=!1}=r,i;i=e.map((v,_)=>h(v,typeof v=="string"?null:v.state,_===0?"default":void 0));let o=d(t??i.length-1),a=Br.Pop,c=null;function d(v){return Math.min(Math.max(v,0),i.length-1)}function u(){return i[o]}function h(v,_,b){_===void 0&&(_=null);let C=Iu(i?u().pathname:"/",v,_,b);return Vl(C.pathname.charAt(0)==="/","relative pathnames are not supported in memory history: "+JSON.stringify(v)),C}function p(v){return typeof v=="string"?v:ju(v)}return{get index(){return o},get action(){return a},get location(){return u()},createHref:p,createURL(v){return new URL(p(v),"http://localhost")},encodeLocation(v){let _=typeof v=="string"?Ts(v):v;return{pathname:_.pathname||"",search:_.search||"",hash:_.hash||""}},push(v,_){a=Br.Push;let b=h(v,_);o+=1,i.splice(o,i.length,b),n&&c&&c({action:a,location:b,delta:1})},replace(v,_){a=Br.Replace;let b=h(v,_);i[o]=b,n&&c&&c({action:a,location:b,delta:0})},go(v){a=Br.Pop;let _=d(o+v),b=i[_];o=_,c&&c({action:a,location:b,delta:v})},listen(v){return c=v,()=>{c=null}}}}function zW(r){r===void 0&&(r={});function e(n,i){let{pathname:o,search:a,hash:c}=n.location;return Iu("",{pathname:o,search:a,hash:c},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function t(n,i){return typeof i=="string"?i:ju(i)}return MM(e,t,null,r)}function jW(r){r===void 0&&(r={});function e(i,o){let{pathname:a="/",search:c="",hash:d=""}=Ts(i.location.hash.substr(1));return!a.startsWith("/")&&!a.startsWith(".")&&(a="/"+a),Iu("",{pathname:a,search:c,hash:d},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function t(i,o){let a=i.document.querySelector("base"),c="";if(a&&a.getAttribute("href")){let d=i.location.href,u=d.indexOf("#");c=u===-1?d:d.slice(0,u)}return c+"#"+(typeof o=="string"?o:ju(o))}function n(i,o){Vl(i.pathname.charAt(0)==="/","relative pathnames are not supported in hash history.push("+JSON.stringify(o)+")")}return MM(e,t,n,r)}function or(r,e){if(r===!1||r===null||typeof r>"u")throw new Error(e)}function Vl(r,e){if(!r){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function UW(){return Math.random().toString(36).substr(2,8)}function xE(r,e){return{usr:r.state,key:r.key,idx:e}}function Iu(r,e,t,n){return t===void 0&&(t=null),Kr({pathname:typeof r=="string"?r:r.pathname,search:"",hash:""},typeof e=="string"?Ts(e):e,{state:t,key:e&&e.key||n||UW()})}function ju(r){let{pathname:e="/",search:t="",hash:n=""}=r;return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function Ts(r){let e={};if(r){let t=r.indexOf("#");t>=0&&(e.hash=r.substr(t),r=r.substr(0,t));let n=r.indexOf("?");n>=0&&(e.search=r.substr(n),r=r.substr(0,n)),r&&(e.pathname=r)}return e}function MM(r,e,t,n){n===void 0&&(n={});let{window:i=document.defaultView,v5Compat:o=!1}=n,a=i.history,c=Br.Pop,d=null,u=h();u==null&&(u=0,a.replaceState(Kr({},a.state,{idx:u}),""));function h(){return(a.state||{idx:null}).idx}function p(){c=Br.Pop;let C=h(),T=C==null?null:C-u;u=C,d&&d({action:c,location:b.location,delta:T})}function m(C,T){c=Br.Push;let A=Iu(b.location,C,T);t&&t(A,C),u=h()+1;let I=xE(A,u),O=b.createHref(A);try{a.pushState(I,"",O)}catch(B){if(B instanceof DOMException&&B.name==="DataCloneError")throw B;i.location.assign(O)}o&&d&&d({action:c,location:b.location,delta:1})}function v(C,T){c=Br.Replace;let A=Iu(b.location,C,T);t&&t(A,C),u=h();let I=xE(A,u),O=b.createHref(A);a.replaceState(I,"",O),o&&d&&d({action:c,location:b.location,delta:0})}function _(C){let T=i.location.origin!=="null"?i.location.origin:i.location.href,A=typeof C=="string"?C:ju(C);return A=A.replace(/ $/,"%20"),or(T,"No window.location.(origin|href) available to create URL for href: "+A),new URL(A,T)}let b={get action(){return c},get location(){return r(i,a)},listen(C){if(d)throw new Error("A history only accepts one active listener");return i.addEventListener(wE,p),d=C,()=>{i.removeEventListener(wE,p),d=null}},createHref(C){return e(i,C)},createURL:_,encodeLocation(C){let T=_(C);return{pathname:T.pathname,search:T.search,hash:T.hash}},push:m,replace:v,go(C){return a.go(C)}};return b}var xr;(function(r){r.data="data",r.deferred="deferred",r.redirect="redirect",r.error="error"})(xr||(xr={}));const BW=new Set(["lazy","caseSensitive","path","id","index","children"]);function qW(r){return r.index===!0}function Iv(r,e,t,n){return t===void 0&&(t=[]),n===void 0&&(n={}),r.map((i,o)=>{let a=[...t,String(o)],c=typeof i.id=="string"?i.id:a.join("-");if(or(i.index!==!0||!i.children,"Cannot specify children on an index route"),or(!n[c],'Found a route id collision on id "'+c+`". Route id's must be globally unique within Data Router usages`),qW(i)){let d=Kr({},i,e(i),{id:c});return n[c]=d,d}else{let d=Kr({},i,e(i),{id:c,children:void 0});return n[c]=d,i.children&&(d.children=Iv(i.children,e,a,n)),d}})}function jd(r,e,t){return t===void 0&&(t="/"),$g(r,e,t,!1)}function $g(r,e,t,n){let i=typeof e=="string"?Ts(e):e,o=m2(i.pathname||"/",t);if(o==null)return null;let a=$M(r);GW(a);let c=null;for(let d=0;c==null&&d<a.length;++d){let u=oY(o);c=nY(a[d],u,n)}return c}function KW(r,e){let{route:t,pathname:n,params:i}=r;return{id:t.id,pathname:n,params:i,data:e[t.id],handle:t.handle}}function $M(r,e,t,n){e===void 0&&(e=[]),t===void 0&&(t=[]),n===void 0&&(n="");let i=(o,a,c)=>{let d={relativePath:c===void 0?o.path||"":c,caseSensitive:o.caseSensitive===!0,childrenIndex:a,route:o};d.relativePath.startsWith("/")&&(or(d.relativePath.startsWith(n),'Absolute route path "'+d.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),d.relativePath=d.relativePath.slice(n.length));let u=vu([n,d.relativePath]),h=t.concat(d);o.children&&o.children.length>0&&(or(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),$M(o.children,e,h,u)),!(o.path==null&&!o.index)&&e.push({path:u,score:tY(u,o.index),routesMeta:h})};return r.forEach((o,a)=>{var c;if(o.path===""||!((c=o.path)!=null&&c.includes("?")))i(o,a);else for(let d of OM(o.path))i(o,a,d)}),e}function OM(r){let e=r.split("/");if(e.length===0)return[];let[t,...n]=e,i=t.endsWith("?"),o=t.replace(/\?$/,"");if(n.length===0)return i?[o,""]:[o];let a=OM(n.join("/")),c=[];return c.push(...a.map(d=>d===""?o:[o,d].join("/"))),i&&c.push(...a),c.map(d=>r.startsWith("/")&&d===""?"/":d)}function GW(r){r.sort((e,t)=>e.score!==t.score?t.score-e.score:rY(e.routesMeta.map(n=>n.childrenIndex),t.routesMeta.map(n=>n.childrenIndex)))}const WW=/^:[\w-]+$/,YW=3,QW=2,XW=1,JW=10,eY=-2,CE=r=>r==="*";function tY(r,e){let t=r.split("/"),n=t.length;return t.some(CE)&&(n+=eY),e&&(n+=QW),t.filter(i=>!CE(i)).reduce((i,o)=>i+(WW.test(o)?YW:o===""?XW:JW),n)}function rY(r,e){return r.length===e.length&&r.slice(0,-1).every((n,i)=>n===e[i])?r[r.length-1]-e[e.length-1]:0}function nY(r,e,t){t===void 0&&(t=!1);let{routesMeta:n}=r,i={},o="/",a=[];for(let c=0;c<n.length;++c){let d=n[c],u=c===n.length-1,h=o==="/"?e:e.slice(o.length)||"/",p=kE({path:d.relativePath,caseSensitive:d.caseSensitive,end:u},h),m=d.route;if(!p&&u&&t&&!n[n.length-1].route.index&&(p=kE({path:d.relativePath,caseSensitive:d.caseSensitive,end:!1},h)),!p)return null;Object.assign(i,p.params),a.push({params:i,pathname:vu([o,p.pathname]),pathnameBase:dY(vu([o,p.pathnameBase])),route:m}),p.pathnameBase!=="/"&&(o=vu([o,p.pathnameBase]))}return a}function kE(r,e){typeof r=="string"&&(r={path:r,caseSensitive:!1,end:!0});let[t,n]=iY(r.path,r.caseSensitive,r.end),i=e.match(t);if(!i)return null;let o=i[0],a=o.replace(/(.)\/+$/,"$1"),c=i.slice(1);return{params:n.reduce((u,h,p)=>{let{paramName:m,isOptional:v}=h;if(m==="*"){let b=c[p]||"";a=o.slice(0,o.length-b.length).replace(/(.)\/+$/,"$1")}const _=c[p];return v&&!_?u[m]=void 0:u[m]=(_||"").replace(/%2F/g,"/"),u},{}),pathname:o,pathnameBase:a,pattern:r}}function iY(r,e,t){e===void 0&&(e=!1),t===void 0&&(t=!0),Vl(r==="*"||!r.endsWith("*")||r.endsWith("/*"),'Route path "'+r+'" will be treated as if it were '+('"'+r.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+r.replace(/\*$/,"/*")+'".'));let n=[],i="^"+r.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(a,c,d)=>(n.push({paramName:c,isOptional:d!=null}),d?"/?([^\\/]+)?":"/([^\\/]+)"));return r.endsWith("*")?(n.push({paramName:"*"}),i+=r==="*"||r==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):t?i+="\\/*$":r!==""&&r!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,e?void 0:"i"),n]}function oY(r){try{return r.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return Vl(!1,'The URL path "'+r+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+e+").")),r}}function m2(r,e){if(e==="/")return r;if(!r.toLowerCase().startsWith(e.toLowerCase()))return null;let t=e.endsWith("/")?e.length-1:e.length,n=r.charAt(t);return n&&n!=="/"?null:r.slice(t)||"/"}function aY(r,e){e===void 0&&(e="/");let{pathname:t,search:n="",hash:i=""}=typeof r=="string"?Ts(r):r;return{pathname:t?t.startsWith("/")?t:sY(t,e):e,search:uY(n),hash:hY(i)}}function sY(r,e){let t=e.replace(/\/+$/,"").split("/");return r.split("/").forEach(i=>{i===".."?t.length>1&&t.pop():i!=="."&&t.push(i)}),t.length>1?t.join("/"):"/"}function p_(r,e,t,n){return"Cannot include a '"+r+"' character in a manually specified "+("`to."+e+"` field ["+JSON.stringify(n)+"]. Please separate it out to the ")+("`to."+t+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function ZM(r){return r.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function cY(r,e){let t=ZM(r);return e?t.map((n,i)=>i===t.length-1?n.pathname:n.pathnameBase):t.map(n=>n.pathnameBase)}function lY(r,e,t,n){n===void 0&&(n=!1);let i;typeof r=="string"?i=Ts(r):(i=Kr({},r),or(!i.pathname||!i.pathname.includes("?"),p_("?","pathname","search",i)),or(!i.pathname||!i.pathname.includes("#"),p_("#","pathname","hash",i)),or(!i.search||!i.search.includes("#"),p_("#","search","hash",i)));let o=r===""||i.pathname==="",a=o?"/":i.pathname,c;if(a==null)c=t;else{let p=e.length-1;if(!n&&a.startsWith("..")){let m=a.split("/");for(;m[0]==="..";)m.shift(),p-=1;i.pathname=m.join("/")}c=p>=0?e[p]:"/"}let d=aY(i,c),u=a&&a!=="/"&&a.endsWith("/"),h=(o||a===".")&&t.endsWith("/");return!d.pathname.endsWith("/")&&(u||h)&&(d.pathname+="/"),d}const vu=r=>r.join("/").replace(/\/\/+/g,"/"),dY=r=>r.replace(/\/+$/,"").replace(/^\/*/,"/"),uY=r=>!r||r==="?"?"":r.startsWith("?")?r:"?"+r,hY=r=>!r||r==="#"?"":r.startsWith("#")?r:"#"+r;class h6{constructor(e,t,n,i){i===void 0&&(i=!1),this.status=e,this.statusText=t||"",this.internal=i,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}}function mm(r){return r!=null&&typeof r.status=="number"&&typeof r.statusText=="string"&&typeof r.internal=="boolean"&&"data"in r}const LM=["post","put","patch","delete"],fY=new Set(LM),pY=["get",...LM],mY=new Set(pY),gY=new Set([301,302,303,307,308]),vY=new Set([307,308]),m_={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},yY={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},X1={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},l8=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,_Y=r=>({hasErrorBoundary:!!r.hasErrorBoundary}),HM="remix-router-transitions";function bY(r){const e=r.window?r.window:typeof window<"u"?window:void 0,t=typeof e<"u"&&typeof e.document<"u"&&typeof e.document.createElement<"u",n=!t;or(r.routes.length>0,"You must provide a non-empty routes array to createRouter");let i;if(r.mapRouteProperties)i=r.mapRouteProperties;else if(r.detectErrorBoundary){let V=r.detectErrorBoundary;i=Q=>({hasErrorBoundary:V(Q)})}else i=_Y;let o={},a=Iv(r.routes,i,void 0,o),c,d=r.basename||"/",u=r.dataStrategy||kY,h=r.patchRoutesOnNavigation,p=Kr({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},r.future),m=null,v=new Set,_=null,b=null,C=null,T=r.hydrationData!=null,A=jd(a,r.history.location,d),I=!1,O=null;if(A==null&&!h){let V=to(404,{pathname:r.history.location.pathname}),{matches:Q,route:ie}=ZE(a);A=Q,O={[ie.id]:V}}A&&!r.hydrationData&&$s(A,a,r.history.location.pathname).active&&(A=null);let B;if(A)if(A.some(V=>V.route.lazy))B=!1;else if(!A.some(V=>V.route.loader))B=!0;else if(p.v7_partialHydration){let V=r.hydrationData?r.hydrationData.loaderData:null,Q=r.hydrationData?r.hydrationData.errors:null;if(Q){let ie=A.findIndex(pe=>Q[pe.route.id]!==void 0);B=A.slice(0,ie+1).every(pe=>!p6(pe.route,V,Q))}else B=A.every(ie=>!p6(ie.route,V,Q))}else B=r.hydrationData!=null;else if(B=!1,A=[],p.v7_partialHydration){let V=$s(null,a,r.history.location.pathname);V.active&&V.matches&&(I=!0,A=V.matches)}let z,R={historyAction:r.history.action,location:r.history.location,matches:A,initialized:B,navigation:m_,restoreScrollPosition:r.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:r.hydrationData&&r.hydrationData.loaderData||{},actionData:r.hydrationData&&r.hydrationData.actionData||null,errors:r.hydrationData&&r.hydrationData.errors||O,fetchers:new Map,blockers:new Map},Y=Br.Pop,ue=!1,le,Te=!1,ke=new Map,xe=null,X=!1,q=!1,re=[],W=new Set,$=new Map,L=0,D=-1,Z=new Map,N=new Set,ae=new Map,He=new Map,Ee=new Set,Ae=new Map,Xe=new Map,lt;function xt(){if(m=r.history.listen(V=>{let{action:Q,location:ie,delta:pe}=V;if(lt){lt(),lt=void 0;return}Vl(Xe.size===0||pe!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let Pe=Ka({currentLocation:R.location,nextLocation:ie,historyAction:Q});if(Pe&&pe!=null){let Ue=new Promise(vt=>{lt=vt});r.history.go(pe*-1),Ho(Pe,{state:"blocked",location:ie,proceed(){Ho(Pe,{state:"proceeding",proceed:void 0,reset:void 0,location:ie}),Ue.then(()=>r.history.go(pe))},reset(){let vt=new Map(R.blockers);vt.set(Pe,X1),Mt({blockers:vt})}});return}return Fi(Q,ie)}),t){NY(e,ke);let V=()=>DY(e,ke);e.addEventListener("pagehide",V),xe=()=>e.removeEventListener("pagehide",V)}return R.initialized||Fi(Br.Pop,R.location,{initialHydration:!0}),z}function wr(){m&&m(),xe&&xe(),v.clear(),le&&le.abort(),R.fetchers.forEach((V,Q)=>Zo(Q)),R.blockers.forEach((V,Q)=>Lo(Q))}function Gr(V){return v.add(V),()=>v.delete(V)}function Mt(V,Q){Q===void 0&&(Q={}),R=Kr({},R,V);let ie=[],pe=[];p.v7_fetcherPersist&&R.fetchers.forEach((Pe,Ue)=>{Pe.state==="idle"&&(Ee.has(Ue)?pe.push(Ue):ie.push(Ue))}),Ee.forEach(Pe=>{!R.fetchers.has(Pe)&&!$.has(Pe)&&pe.push(Pe)}),[...v].forEach(Pe=>Pe(R,{deletedFetchers:pe,viewTransitionOpts:Q.viewTransitionOpts,flushSync:Q.flushSync===!0})),p.v7_fetcherPersist?(ie.forEach(Pe=>R.fetchers.delete(Pe)),pe.forEach(Pe=>Zo(Pe))):pe.forEach(Pe=>Ee.delete(Pe))}function zn(V,Q,ie){var pe,Pe;let{flushSync:Ue}=ie===void 0?{}:ie,vt=R.actionData!=null&&R.navigation.formMethod!=null&&Ra(R.navigation.formMethod)&&R.navigation.state==="loading"&&((pe=V.state)==null?void 0:pe._isRedirect)!==!0,Je;Q.actionData?Object.keys(Q.actionData).length>0?Je=Q.actionData:Je=null:vt?Je=R.actionData:Je=null;let it=Q.loaderData?$E(R.loaderData,Q.loaderData,Q.matches||[],Q.errors):R.loaderData,Ge=R.blockers;Ge.size>0&&(Ge=new Map(Ge),Ge.forEach((Vt,fn)=>Ge.set(fn,X1)));let Qe=ue===!0||R.navigation.formMethod!=null&&Ra(R.navigation.formMethod)&&((Pe=V.state)==null?void 0:Pe._isRedirect)!==!0;c&&(a=c,c=void 0),X||Y===Br.Pop||(Y===Br.Push?r.history.push(V,V.state):Y===Br.Replace&&r.history.replace(V,V.state));let bt;if(Y===Br.Pop){let Vt=ke.get(R.location.pathname);Vt&&Vt.has(V.pathname)?bt={currentLocation:R.location,nextLocation:V}:ke.has(V.pathname)&&(bt={currentLocation:V,nextLocation:R.location})}else if(Te){let Vt=ke.get(R.location.pathname);Vt?Vt.add(V.pathname):(Vt=new Set([V.pathname]),ke.set(R.location.pathname,Vt)),bt={currentLocation:R.location,nextLocation:V}}Mt(Kr({},Q,{actionData:Je,loaderData:it,historyAction:Y,location:V,initialized:!0,navigation:m_,revalidation:"idle",restoreScrollPosition:ed(V,Q.matches||R.matches),preventScrollReset:Qe,blockers:Ge}),{viewTransitionOpts:bt,flushSync:Ue===!0}),Y=Br.Pop,ue=!1,Te=!1,X=!1,q=!1,re=[]}async function so(V,Q){if(typeof V=="number"){r.history.go(V);return}let ie=f6(R.location,R.matches,d,p.v7_prependBasename,V,p.v7_relativeSplatPath,Q==null?void 0:Q.fromRouteId,Q==null?void 0:Q.relative),{path:pe,submission:Pe,error:Ue}=EE(p.v7_normalizeFormMethod,!1,ie,Q),vt=R.location,Je=Iu(R.location,pe,Q&&Q.state);Je=Kr({},Je,r.history.encodeLocation(Je));let it=Q&&Q.replace!=null?Q.replace:void 0,Ge=Br.Push;it===!0?Ge=Br.Replace:it===!1||Pe!=null&&Ra(Pe.formMethod)&&Pe.formAction===R.location.pathname+R.location.search&&(Ge=Br.Replace);let Qe=Q&&"preventScrollReset"in Q?Q.preventScrollReset===!0:void 0,bt=(Q&&Q.flushSync)===!0,Vt=Ka({currentLocation:vt,nextLocation:Je,historyAction:Ge});if(Vt){Ho(Vt,{state:"blocked",location:Je,proceed(){Ho(Vt,{state:"proceeding",proceed:void 0,reset:void 0,location:Je}),so(V,Q)},reset(){let fn=new Map(R.blockers);fn.set(Vt,X1),Mt({blockers:fn})}});return}return await Fi(Ge,Je,{submission:Pe,pendingError:Ue,preventScrollReset:Qe,replace:Q&&Q.replace,enableViewTransition:Q&&Q.viewTransition,flushSync:bt})}function ma(){if(Ba(),Mt({revalidation:"loading"}),R.navigation.state!=="submitting"){if(R.navigation.state==="idle"){Fi(R.historyAction,R.location,{startUninterruptedRevalidation:!0});return}Fi(Y||R.historyAction,R.navigation.location,{overrideNavigation:R.navigation,enableViewTransition:Te===!0})}}async function Fi(V,Q,ie){le&&le.abort(),le=null,Y=V,X=(ie&&ie.startUninterruptedRevalidation)===!0,Ju(R.location,R.matches),ue=(ie&&ie.preventScrollReset)===!0,Te=(ie&&ie.enableViewTransition)===!0;let pe=c||a,Pe=ie&&ie.overrideNavigation,Ue=ie!=null&&ie.initialHydration&&R.matches&&R.matches.length>0&&!I?R.matches:jd(pe,Q,d),vt=(ie&&ie.flushSync)===!0;if(Ue&&R.initialized&&!q&&RY(R.location,Q)&&!(ie&&ie.submission&&Ra(ie.submission.formMethod))){zn(Q,{matches:Ue},{flushSync:vt});return}let Je=$s(Ue,pe,Q.pathname);if(Je.active&&Je.matches&&(Ue=Je.matches),!Ue){let{error:dr,notFoundMatches:Gt,route:Ir}=zi(Q.pathname);zn(Q,{matches:Gt,loaderData:{},errors:{[Ir.id]:dr}},{flushSync:vt});return}le=new AbortController;let it=Ih(r.history,Q,le.signal,ie&&ie.submission),Ge;if(ie&&ie.pendingError)Ge=[Ud(Ue).route.id,{type:xr.error,error:ie.pendingError}];else if(ie&&ie.submission&&Ra(ie.submission.formMethod)){let dr=await Rc(it,Q,ie.submission,Ue,Je.active,{replace:ie.replace,flushSync:vt});if(dr.shortCircuited)return;if(dr.pendingActionResult){let[Gt,Ir]=dr.pendingActionResult;if(xo(Ir)&&mm(Ir.error)&&Ir.error.status===404){le=null,zn(Q,{matches:dr.matches,loaderData:{},errors:{[Gt]:Ir.error}});return}}Ue=dr.matches||Ue,Ge=dr.pendingActionResult,Pe=g_(Q,ie.submission),vt=!1,Je.active=!1,it=Ih(r.history,it.url,it.signal)}let{shortCircuited:Qe,matches:bt,loaderData:Vt,errors:fn}=await Yu(it,Q,Ue,Je.active,Pe,ie&&ie.submission,ie&&ie.fetcherSubmission,ie&&ie.replace,ie&&ie.initialHydration===!0,vt,Ge);Qe||(le=null,zn(Q,Kr({matches:bt||Ue},OE(Ge),{loaderData:Vt,errors:fn})))}async function Rc(V,Q,ie,pe,Pe,Ue){Ue===void 0&&(Ue={}),Ba();let vt=LY(Q,ie);if(Mt({navigation:vt},{flushSync:Ue.flushSync===!0}),Pe){let Ge=await ga(pe,Q.pathname,V.signal);if(Ge.type==="aborted")return{shortCircuited:!0};if(Ge.type==="error"){let Qe=Ud(Ge.partialMatches).route.id;return{matches:Ge.partialMatches,pendingActionResult:[Qe,{type:xr.error,error:Ge.error}]}}else if(Ge.matches)pe=Ge.matches;else{let{notFoundMatches:Qe,error:bt,route:Vt}=zi(Q.pathname);return{matches:Qe,pendingActionResult:[Vt.id,{type:xr.error,error:bt}]}}}let Je,it=vp(pe,Q);if(!it.route.action&&!it.route.lazy)Je={type:xr.error,error:to(405,{method:V.method,pathname:Q.pathname,routeId:it.route.id})};else if(Je=(await co("action",R,V,[it],pe,null))[it.route.id],V.signal.aborted)return{shortCircuited:!0};if(Kd(Je)){let Ge;return Ue&&Ue.replace!=null?Ge=Ue.replace:Ge=RE(Je.response.headers.get("Location"),new URL(V.url),d)===R.location.pathname+R.location.search,await En(V,Je,!0,{submission:ie,replace:Ge}),{shortCircuited:!0}}if(kl(Je))throw to(400,{type:"defer-action"});if(xo(Je)){let Ge=Ud(pe,it.route.id);return(Ue&&Ue.replace)!==!0&&(Y=Br.Push),{matches:pe,pendingActionResult:[Ge.route.id,Je]}}return{matches:pe,pendingActionResult:[it.route.id,Je]}}async function Yu(V,Q,ie,pe,Pe,Ue,vt,Je,it,Ge,Qe){let bt=Pe||g_(Q,Ue),Vt=Ue||vt||HE(bt),fn=!X&&(!p.v7_partialHydration||!it);if(pe){if(fn){let ur=Pc(Qe);Mt(Kr({navigation:bt},ur!==void 0?{actionData:ur}:{}),{flushSync:Ge})}let Bt=await ga(ie,Q.pathname,V.signal);if(Bt.type==="aborted")return{shortCircuited:!0};if(Bt.type==="error"){let ur=Ud(Bt.partialMatches).route.id;return{matches:Bt.partialMatches,loaderData:{},errors:{[ur]:Bt.error}}}else if(Bt.matches)ie=Bt.matches;else{let{error:ur,notFoundMatches:Sn,route:Zs}=zi(Q.pathname);return{matches:Sn,loaderData:{},errors:{[Zs.id]:ur}}}}let dr=c||a,[Gt,Ir]=AE(r.history,R,ie,Vt,Q,p.v7_partialHydration&&it===!0,p.v7_skipActionErrorRevalidation,q,re,W,Ee,ae,N,dr,d,Qe);if(ni(Bt=>!(ie&&ie.some(ur=>ur.route.id===Bt))||Gt&&Gt.some(ur=>ur.route.id===Bt)),D=++L,Gt.length===0&&Ir.length===0){let Bt=Qu();return zn(Q,Kr({matches:ie,loaderData:{},errors:Qe&&xo(Qe[1])?{[Qe[0]]:Qe[1].error}:null},OE(Qe),Bt?{fetchers:new Map(R.fetchers)}:{}),{flushSync:Ge}),{shortCircuited:!0}}if(fn){let Bt={};if(!pe){Bt.navigation=bt;let ur=Pc(Qe);ur!==void 0&&(Bt.actionData=ur)}Ir.length>0&&(Bt.fetchers=$o(Ir)),Mt(Bt,{flushSync:Ge})}Ir.forEach(Bt=>{lo(Bt.key),Bt.controller&&$.set(Bt.key,Bt.controller)});let ii=()=>Ir.forEach(Bt=>lo(Bt.key));le&&le.signal.addEventListener("abort",ii);let{loaderResults:Os,fetcherResults:uo}=await Xl(R,ie,Gt,Ir,V);if(V.signal.aborted)return{shortCircuited:!0};le&&le.signal.removeEventListener("abort",ii),Ir.forEach(Bt=>$.delete(Bt.key));let Jt=Y0(Os);if(Jt)return await En(V,Jt.result,!0,{replace:Je}),{shortCircuited:!0};if(Jt=Y0(uo),Jt)return N.add(Jt.key),await En(V,Jt.result,!0,{replace:Je}),{shortCircuited:!0};let{loaderData:rd,errors:va}=ME(R,ie,Os,Qe,Ir,uo,Ae);Ae.forEach((Bt,ur)=>{Bt.subscribe(Sn=>{(Sn||Bt.done)&&Ae.delete(ur)})}),p.v7_partialHydration&&it&&R.errors&&(va=Kr({},R.errors,va));let No=Qu(),Do=Oc(D),ya=No||Do||Ir.length>0;return Kr({matches:ie,loaderData:rd,errors:va},ya?{fetchers:new Map(R.fetchers)}:{})}function Pc(V){if(V&&!xo(V[1]))return{[V[0]]:V[1].data};if(R.actionData)return Object.keys(R.actionData).length===0?null:R.actionData}function $o(V){return V.forEach(Q=>{let ie=R.fetchers.get(Q.key),pe=J1(void 0,ie?ie.data:void 0);R.fetchers.set(Q.key,pe)}),new Map(R.fetchers)}function Oo(V,Q,ie,pe){if(n)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");lo(V);let Pe=(pe&&pe.flushSync)===!0,Ue=c||a,vt=f6(R.location,R.matches,d,p.v7_prependBasename,ie,p.v7_relativeSplatPath,Q,pe==null?void 0:pe.relative),Je=jd(Ue,vt,d),it=$s(Je,Ue,vt);if(it.active&&it.matches&&(Je=it.matches),!Je){Ei(V,Q,to(404,{pathname:vt}),{flushSync:Pe});return}let{path:Ge,submission:Qe,error:bt}=EE(p.v7_normalizeFormMethod,!0,vt,pe);if(bt){Ei(V,Q,bt,{flushSync:Pe});return}let Vt=vp(Je,Ge),fn=(pe&&pe.preventScrollReset)===!0;if(Qe&&Ra(Qe.formMethod)){Mc(V,Q,Ge,Vt,Je,it.active,Pe,fn,Qe);return}ae.set(V,{routeId:Q,path:Ge}),Ql(V,Q,Ge,Vt,Je,it.active,Pe,fn,Qe)}async function Mc(V,Q,ie,pe,Pe,Ue,vt,Je,it){Ba(),ae.delete(V);function Ge(er){if(!er.route.action&&!er.route.lazy){let Ga=to(405,{method:it.formMethod,pathname:ie,routeId:Q});return Ei(V,Q,Ga,{flushSync:vt}),!0}return!1}if(!Ue&&Ge(pe))return;let Qe=R.fetchers.get(V);ri(V,HY(it,Qe),{flushSync:vt});let bt=new AbortController,Vt=Ih(r.history,ie,bt.signal,it);if(Ue){let er=await ga(Pe,new URL(Vt.url).pathname,Vt.signal,V);if(er.type==="aborted")return;if(er.type==="error"){Ei(V,Q,er.error,{flushSync:vt});return}else if(er.matches){if(Pe=er.matches,pe=vp(Pe,ie),Ge(pe))return}else{Ei(V,Q,to(404,{pathname:ie}),{flushSync:vt});return}}$.set(V,bt);let fn=L,Gt=(await co("action",R,Vt,[pe],Pe,V))[pe.route.id];if(Vt.signal.aborted){$.get(V)===bt&&$.delete(V);return}if(p.v7_fetcherPersist&&Ee.has(V)){if(Kd(Gt)||xo(Gt)){ri(V,al(void 0));return}}else{if(Kd(Gt))if($.delete(V),D>fn){ri(V,al(void 0));return}else return N.add(V),ri(V,J1(it)),En(Vt,Gt,!1,{fetcherSubmission:it,preventScrollReset:Je});if(xo(Gt)){Ei(V,Q,Gt.error);return}}if(kl(Gt))throw to(400,{type:"defer-action"});let Ir=R.navigation.location||R.location,ii=Ih(r.history,Ir,bt.signal),Os=c||a,uo=R.navigation.state!=="idle"?jd(Os,R.navigation.location,d):R.matches;or(uo,"Didn't find any matches after fetcher action");let Jt=++L;Z.set(V,Jt);let rd=J1(it,Gt.data);R.fetchers.set(V,rd);let[va,No]=AE(r.history,R,uo,it,Ir,!1,p.v7_skipActionErrorRevalidation,q,re,W,Ee,ae,N,Os,d,[pe.route.id,Gt]);No.filter(er=>er.key!==V).forEach(er=>{let Ga=er.key,eh=R.fetchers.get(Ga),f1=J1(void 0,eh?eh.data:void 0);R.fetchers.set(Ga,f1),lo(Ga),er.controller&&$.set(Ga,er.controller)}),Mt({fetchers:new Map(R.fetchers)});let Do=()=>No.forEach(er=>lo(er.key));bt.signal.addEventListener("abort",Do);let{loaderResults:ya,fetcherResults:Bt}=await Xl(R,uo,va,No,ii);if(bt.signal.aborted)return;bt.signal.removeEventListener("abort",Do),Z.delete(V),$.delete(V),No.forEach(er=>$.delete(er.key));let ur=Y0(ya);if(ur)return En(ii,ur.result,!1,{preventScrollReset:Je});if(ur=Y0(Bt),ur)return N.add(ur.key),En(ii,ur.result,!1,{preventScrollReset:Je});let{loaderData:Sn,errors:Zs}=ME(R,uo,ya,void 0,No,Bt,Ae);if(R.fetchers.has(V)){let er=al(Gt.data);R.fetchers.set(V,er)}Oc(Jt),R.navigation.state==="loading"&&Jt>D?(or(Y,"Expected pending action"),le&&le.abort(),zn(R.navigation.location,{matches:uo,loaderData:Sn,errors:Zs,fetchers:new Map(R.fetchers)})):(Mt({errors:Zs,loaderData:$E(R.loaderData,Sn,uo,Zs),fetchers:new Map(R.fetchers)}),q=!1)}async function Ql(V,Q,ie,pe,Pe,Ue,vt,Je,it){let Ge=R.fetchers.get(V);ri(V,J1(it,Ge?Ge.data:void 0),{flushSync:vt});let Qe=new AbortController,bt=Ih(r.history,ie,Qe.signal);if(Ue){let Gt=await ga(Pe,new URL(bt.url).pathname,bt.signal,V);if(Gt.type==="aborted")return;if(Gt.type==="error"){Ei(V,Q,Gt.error,{flushSync:vt});return}else if(Gt.matches)Pe=Gt.matches,pe=vp(Pe,ie);else{Ei(V,Q,to(404,{pathname:ie}),{flushSync:vt});return}}$.set(V,Qe);let Vt=L,dr=(await co("loader",R,bt,[pe],Pe,V))[pe.route.id];if(kl(dr)&&(dr=await d8(dr,bt.signal,!0)||dr),$.get(V)===Qe&&$.delete(V),!bt.signal.aborted){if(Ee.has(V)){ri(V,al(void 0));return}if(Kd(dr))if(D>Vt){ri(V,al(void 0));return}else{N.add(V),await En(bt,dr,!1,{preventScrollReset:Je});return}if(xo(dr)){Ei(V,Q,dr.error);return}or(!kl(dr),"Unhandled fetcher deferred data"),ri(V,al(dr.data))}}async function En(V,Q,ie,pe){let{submission:Pe,fetcherSubmission:Ue,preventScrollReset:vt,replace:Je}=pe===void 0?{}:pe;Q.response.headers.has("X-Remix-Revalidate")&&(q=!0);let it=Q.response.headers.get("Location");or(it,"Expected a Location header on the redirect Response"),it=RE(it,new URL(V.url),d);let Ge=Iu(R.location,it,{_isRedirect:!0});if(t){let Gt=!1;if(Q.response.headers.has("X-Remix-Reload-Document"))Gt=!0;else if(l8.test(it)){const Ir=r.history.createURL(it);Gt=Ir.origin!==e.location.origin||m2(Ir.pathname,d)==null}if(Gt){Je?e.location.replace(it):e.location.assign(it);return}}le=null;let Qe=Je===!0||Q.response.headers.has("X-Remix-Replace")?Br.Replace:Br.Push,{formMethod:bt,formAction:Vt,formEncType:fn}=R.navigation;!Pe&&!Ue&&bt&&Vt&&fn&&(Pe=HE(R.navigation));let dr=Pe||Ue;if(vY.has(Q.response.status)&&dr&&Ra(dr.formMethod))await Fi(Qe,Ge,{submission:Kr({},dr,{formAction:it}),preventScrollReset:vt||ue,enableViewTransition:ie?Te:void 0});else{let Gt=g_(Ge,Pe);await Fi(Qe,Ge,{overrideNavigation:Gt,fetcherSubmission:Ue,preventScrollReset:vt||ue,enableViewTransition:ie?Te:void 0})}}async function co(V,Q,ie,pe,Pe,Ue){let vt,Je={};try{vt=await EY(u,V,Q,ie,pe,Pe,Ue,o,i)}catch(it){return pe.forEach(Ge=>{Je[Ge.route.id]={type:xr.error,error:it}}),Je}for(let[it,Ge]of Object.entries(vt))if(PY(Ge)){let Qe=Ge.result;Je[it]={type:xr.redirect,response:TY(Qe,ie,it,Pe,d,p.v7_relativeSplatPath)}}else Je[it]=await AY(Ge);return Je}async function Xl(V,Q,ie,pe,Pe){let Ue=V.matches,vt=co("loader",V,Pe,ie,Q,null),Je=Promise.all(pe.map(async Qe=>{if(Qe.matches&&Qe.match&&Qe.controller){let Vt=(await co("loader",V,Ih(r.history,Qe.path,Qe.controller.signal),[Qe.match],Qe.matches,Qe.key))[Qe.match.route.id];return{[Qe.key]:Vt}}else return Promise.resolve({[Qe.key]:{type:xr.error,error:to(404,{pathname:Qe.path})}})})),it=await vt,Ge=(await Je).reduce((Qe,bt)=>Object.assign(Qe,bt),{});return await Promise.all([OY(Q,it,Pe.signal,Ue,V.loaderData),ZY(Q,Ge,pe)]),{loaderResults:it,fetcherResults:Ge}}function Ba(){q=!0,re.push(...ni()),ae.forEach((V,Q)=>{$.has(Q)&&W.add(Q),lo(Q)})}function ri(V,Q,ie){ie===void 0&&(ie={}),R.fetchers.set(V,Q),Mt({fetchers:new Map(R.fetchers)},{flushSync:(ie&&ie.flushSync)===!0})}function Ei(V,Q,ie,pe){pe===void 0&&(pe={});let Pe=Ud(R.matches,Q);Zo(V),Mt({errors:{[Pe.route.id]:ie},fetchers:new Map(R.fetchers)},{flushSync:(pe&&pe.flushSync)===!0})}function qa(V){return He.set(V,(He.get(V)||0)+1),Ee.has(V)&&Ee.delete(V),R.fetchers.get(V)||yY}function Zo(V){let Q=R.fetchers.get(V);$.has(V)&&!(Q&&Q.state==="loading"&&Z.has(V))&&lo(V),ae.delete(V),Z.delete(V),N.delete(V),p.v7_fetcherPersist&&Ee.delete(V),W.delete(V),R.fetchers.delete(V)}function h1(V){let Q=(He.get(V)||0)-1;Q<=0?(He.delete(V),Ee.add(V),p.v7_fetcherPersist||Zo(V)):He.set(V,Q),Mt({fetchers:new Map(R.fetchers)})}function lo(V){let Q=$.get(V);Q&&(Q.abort(),$.delete(V))}function $c(V){for(let Q of V){let ie=qa(Q),pe=al(ie.data);R.fetchers.set(Q,pe)}}function Qu(){let V=[],Q=!1;for(let ie of N){let pe=R.fetchers.get(ie);or(pe,"Expected fetcher: "+ie),pe.state==="loading"&&(N.delete(ie),V.push(ie),Q=!0)}return $c(V),Q}function Oc(V){let Q=[];for(let[ie,pe]of Z)if(pe<V){let Pe=R.fetchers.get(ie);or(Pe,"Expected fetcher: "+ie),Pe.state==="loading"&&(lo(ie),Z.delete(ie),Q.push(ie))}return $c(Q),Q.length>0}function Ms(V,Q){let ie=R.blockers.get(V)||X1;return Xe.get(V)!==Q&&Xe.set(V,Q),ie}function Lo(V){R.blockers.delete(V),Xe.delete(V)}function Ho(V,Q){let ie=R.blockers.get(V)||X1;or(ie.state==="unblocked"&&Q.state==="blocked"||ie.state==="blocked"&&Q.state==="blocked"||ie.state==="blocked"&&Q.state==="proceeding"||ie.state==="blocked"&&Q.state==="unblocked"||ie.state==="proceeding"&&Q.state==="unblocked","Invalid blocker state transition: "+ie.state+" -> "+Q.state);let pe=new Map(R.blockers);pe.set(V,Q),Mt({blockers:pe})}function Ka(V){let{currentLocation:Q,nextLocation:ie,historyAction:pe}=V;if(Xe.size===0)return;Xe.size>1&&Vl(!1,"A router only supports one blocker at a time");let Pe=Array.from(Xe.entries()),[Ue,vt]=Pe[Pe.length-1],Je=R.blockers.get(Ue);if(!(Je&&Je.state==="proceeding")&&vt({currentLocation:Q,nextLocation:ie,historyAction:pe}))return Ue}function zi(V){let Q=to(404,{pathname:V}),ie=c||a,{matches:pe,route:Pe}=ZE(ie);return ni(),{notFoundMatches:pe,route:Pe,error:Q}}function ni(V){let Q=[];return Ae.forEach((ie,pe)=>{(!V||V(pe))&&(ie.cancel(),Q.push(pe),Ae.delete(pe))}),Q}function Xu(V,Q,ie){if(_=V,C=Q,b=ie||null,!T&&R.navigation===m_){T=!0;let pe=ed(R.location,R.matches);pe!=null&&Mt({restoreScrollPosition:pe})}return()=>{_=null,C=null,b=null}}function Jl(V,Q){return b&&b(V,Q.map(pe=>KW(pe,R.loaderData)))||V.key}function Ju(V,Q){if(_&&C){let ie=Jl(V,Q);_[ie]=C()}}function ed(V,Q){if(_){let ie=Jl(V,Q),pe=_[ie];if(typeof pe=="number")return pe}return null}function $s(V,Q,ie){if(h)if(V){if(Object.keys(V[0].params).length>0)return{active:!0,matches:$g(Q,ie,d,!0)}}else return{active:!0,matches:$g(Q,ie,d,!0)||[]};return{active:!1,matches:null}}async function ga(V,Q,ie,pe){if(!h)return{type:"success",matches:V};let Pe=V;for(;;){let Ue=c==null,vt=c||a,Je=o;try{await h({signal:ie,path:Q,matches:Pe,fetcherKey:pe,patch:(Qe,bt)=>{ie.aborted||IE(Qe,bt,vt,Je,i)}})}catch(Qe){return{type:"error",error:Qe,partialMatches:Pe}}finally{Ue&&!ie.aborted&&(a=[...a])}if(ie.aborted)return{type:"aborted"};let it=jd(vt,Q,d);if(it)return{type:"success",matches:it};let Ge=$g(vt,Q,d,!0);if(!Ge||Pe.length===Ge.length&&Pe.every((Qe,bt)=>Qe.route.id===Ge[bt].route.id))return{type:"success",matches:null};Pe=Ge}}function td(V){o={},c=Iv(V,i,void 0,o)}function Si(V,Q){let ie=c==null;IE(V,Q,c||a,o,i),ie&&(a=[...a],Mt({}))}return z={get basename(){return d},get future(){return p},get state(){return R},get routes(){return a},get window(){return e},initialize:xt,subscribe:Gr,enableScrollRestoration:Xu,navigate:so,fetch:Oo,revalidate:ma,createHref:V=>r.history.createHref(V),encodeLocation:V=>r.history.encodeLocation(V),getFetcher:qa,deleteFetcher:h1,dispose:wr,getBlocker:Ms,deleteBlocker:Lo,patchRoutes:Si,_internalFetchControllers:$,_internalActiveDeferreds:Ae,_internalSetRoutes:td},z}function wY(r){return r!=null&&("formData"in r&&r.formData!=null||"body"in r&&r.body!==void 0)}function f6(r,e,t,n,i,o,a,c){let d,u;if(a){d=[];for(let p of e)if(d.push(p),p.route.id===a){u=p;break}}else d=e,u=e[e.length-1];let h=lY(i||".",cY(d,o),m2(r.pathname,t)||r.pathname,c==="path");if(i==null&&(h.search=r.search,h.hash=r.hash),(i==null||i===""||i===".")&&u){let p=u8(h.search);if(u.route.index&&!p)h.search=h.search?h.search.replace(/^\?/,"?index&"):"?index";else if(!u.route.index&&p){let m=new URLSearchParams(h.search),v=m.getAll("index");m.delete("index"),v.filter(b=>b).forEach(b=>m.append("index",b));let _=m.toString();h.search=_?"?"+_:""}}return n&&t!=="/"&&(h.pathname=h.pathname==="/"?t:vu([t,h.pathname])),ju(h)}function EE(r,e,t,n){if(!n||!wY(n))return{path:t};if(n.formMethod&&!$Y(n.formMethod))return{path:t,error:to(405,{method:n.formMethod})};let i=()=>({path:t,error:to(400,{type:"invalid-body"})}),o=n.formMethod||"get",a=r?o.toUpperCase():o.toLowerCase(),c=VM(t);if(n.body!==void 0){if(n.formEncType==="text/plain"){if(!Ra(a))return i();let m=typeof n.body=="string"?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((v,_)=>{let[b,C]=_;return""+v+b+"="+C+`
414
- `},""):String(n.body);return{path:t,submission:{formMethod:a,formAction:c,formEncType:n.formEncType,formData:void 0,json:void 0,text:m}}}else if(n.formEncType==="application/json"){if(!Ra(a))return i();try{let m=typeof n.body=="string"?JSON.parse(n.body):n.body;return{path:t,submission:{formMethod:a,formAction:c,formEncType:n.formEncType,formData:void 0,json:m,text:void 0}}}catch{return i()}}}or(typeof FormData=="function","FormData is not available in this environment");let d,u;if(n.formData)d=m6(n.formData),u=n.formData;else if(n.body instanceof FormData)d=m6(n.body),u=n.body;else if(n.body instanceof URLSearchParams)d=n.body,u=PE(d);else if(n.body==null)d=new URLSearchParams,u=new FormData;else try{d=new URLSearchParams(n.body),u=PE(d)}catch{return i()}let h={formMethod:a,formAction:c,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:u,json:void 0,text:void 0};if(Ra(h.formMethod))return{path:t,submission:h};let p=Ts(t);return e&&p.search&&u8(p.search)&&d.append("index",""),p.search="?"+d,{path:ju(p),submission:h}}function SE(r,e,t){t===void 0&&(t=!1);let n=r.findIndex(i=>i.route.id===e);return n>=0?r.slice(0,t?n+1:n):r}function AE(r,e,t,n,i,o,a,c,d,u,h,p,m,v,_,b){let C=b?xo(b[1])?b[1].error:b[1].data:void 0,T=r.createURL(e.location),A=r.createURL(i),I=t;o&&e.errors?I=SE(t,Object.keys(e.errors)[0],!0):b&&xo(b[1])&&(I=SE(t,b[0]));let O=b?b[1].statusCode:void 0,B=a&&O&&O>=400,z=I.filter((Y,ue)=>{let{route:le}=Y;if(le.lazy)return!0;if(le.loader==null)return!1;if(o)return p6(le,e.loaderData,e.errors);if(xY(e.loaderData,e.matches[ue],Y)||d.some(xe=>xe===Y.route.id))return!0;let Te=e.matches[ue],ke=Y;return TE(Y,Kr({currentUrl:T,currentParams:Te.params,nextUrl:A,nextParams:ke.params},n,{actionResult:C,actionStatus:O,defaultShouldRevalidate:B?!1:c||T.pathname+T.search===A.pathname+A.search||T.search!==A.search||NM(Te,ke)}))}),R=[];return p.forEach((Y,ue)=>{if(o||!t.some(X=>X.route.id===Y.routeId)||h.has(ue))return;let le=jd(v,Y.path,_);if(!le){R.push({key:ue,routeId:Y.routeId,path:Y.path,matches:null,match:null,controller:null});return}let Te=e.fetchers.get(ue),ke=vp(le,Y.path),xe=!1;m.has(ue)?xe=!1:u.has(ue)?(u.delete(ue),xe=!0):Te&&Te.state!=="idle"&&Te.data===void 0?xe=c:xe=TE(ke,Kr({currentUrl:T,currentParams:e.matches[e.matches.length-1].params,nextUrl:A,nextParams:t[t.length-1].params},n,{actionResult:C,actionStatus:O,defaultShouldRevalidate:B?!1:c})),xe&&R.push({key:ue,routeId:Y.routeId,path:Y.path,matches:le,match:ke,controller:new AbortController})}),[z,R]}function p6(r,e,t){if(r.lazy)return!0;if(!r.loader)return!1;let n=e!=null&&e[r.id]!==void 0,i=t!=null&&t[r.id]!==void 0;return!n&&i?!1:typeof r.loader=="function"&&r.loader.hydrate===!0?!0:!n&&!i}function xY(r,e,t){let n=!e||t.route.id!==e.route.id,i=r[t.route.id]===void 0;return n||i}function NM(r,e){let t=r.route.path;return r.pathname!==e.pathname||t!=null&&t.endsWith("*")&&r.params["*"]!==e.params["*"]}function TE(r,e){if(r.route.shouldRevalidate){let t=r.route.shouldRevalidate(e);if(typeof t=="boolean")return t}return e.defaultShouldRevalidate}function IE(r,e,t,n,i){var o;let a;if(r){let u=n[r];or(u,"No route found to patch children into: routeId = "+r),u.children||(u.children=[]),a=u.children}else a=t;let c=e.filter(u=>!a.some(h=>DM(u,h))),d=Iv(c,i,[r||"_","patch",String(((o=a)==null?void 0:o.length)||"0")],n);a.push(...d)}function DM(r,e){return"id"in r&&"id"in e&&r.id===e.id?!0:r.index===e.index&&r.path===e.path&&r.caseSensitive===e.caseSensitive?(!r.children||r.children.length===0)&&(!e.children||e.children.length===0)?!0:r.children.every((t,n)=>{var i;return(i=e.children)==null?void 0:i.some(o=>DM(t,o))}):!1}async function CY(r,e,t){if(!r.lazy)return;let n=await r.lazy();if(!r.lazy)return;let i=t[r.id];or(i,"No route found in manifest");let o={};for(let a in n){let d=i[a]!==void 0&&a!=="hasErrorBoundary";Vl(!d,'Route "'+i.id+'" has a static property "'+a+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+a+'" will be ignored.')),!d&&!BW.has(a)&&(o[a]=n[a])}Object.assign(i,o),Object.assign(i,Kr({},e(i),{lazy:void 0}))}async function kY(r){let{matches:e}=r,t=e.filter(i=>i.shouldLoad);return(await Promise.all(t.map(i=>i.resolve()))).reduce((i,o,a)=>Object.assign(i,{[t[a].route.id]:o}),{})}async function EY(r,e,t,n,i,o,a,c,d,u){let h=o.map(v=>v.route.lazy?CY(v.route,d,c):void 0),p=o.map((v,_)=>{let b=h[_],C=i.some(A=>A.route.id===v.route.id);return Kr({},v,{shouldLoad:C,resolve:async A=>(A&&n.method==="GET"&&(v.route.lazy||v.route.loader)&&(C=!0),C?SY(e,n,v,b,A,u):Promise.resolve({type:xr.data,result:void 0}))})}),m=await r({matches:p,request:n,params:o[0].params,fetcherKey:a,context:u});try{await Promise.all(h)}catch{}return m}async function SY(r,e,t,n,i,o){let a,c,d=u=>{let h,p=new Promise((_,b)=>h=b);c=()=>h(),e.signal.addEventListener("abort",c);let m=_=>typeof u!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+r+'" [routeId: '+t.route.id+"]"))):u({request:e,params:t.params,context:o},..._!==void 0?[_]:[]),v=(async()=>{try{return{type:"data",result:await(i?i(b=>m(b)):m())}}catch(_){return{type:"error",result:_}}})();return Promise.race([v,p])};try{let u=t.route[r];if(n)if(u){let h,[p]=await Promise.all([d(u).catch(m=>{h=m}),n]);if(h!==void 0)throw h;a=p}else if(await n,u=t.route[r],u)a=await d(u);else if(r==="action"){let h=new URL(e.url),p=h.pathname+h.search;throw to(405,{method:e.method,pathname:p,routeId:t.route.id})}else return{type:xr.data,result:void 0};else if(u)a=await d(u);else{let h=new URL(e.url),p=h.pathname+h.search;throw to(404,{pathname:p})}or(a.result!==void 0,"You defined "+(r==="action"?"an action":"a loader")+" for route "+('"'+t.route.id+"\" but didn't return anything from your `"+r+"` ")+"function. Please return a value or `null`.")}catch(u){return{type:xr.error,result:u}}finally{c&&e.signal.removeEventListener("abort",c)}return a}async function AY(r){let{result:e,type:t}=r;if(FM(e)){let p;try{let m=e.headers.get("Content-Type");m&&/\bapplication\/json\b/.test(m)?e.body==null?p=null:p=await e.json():p=await e.text()}catch(m){return{type:xr.error,error:m}}return t===xr.error?{type:xr.error,error:new h6(e.status,e.statusText,p),statusCode:e.status,headers:e.headers}:{type:xr.data,data:p,statusCode:e.status,headers:e.headers}}if(t===xr.error){if(LE(e)){var n,i;if(e.data instanceof Error){var o,a;return{type:xr.error,error:e.data,statusCode:(o=e.init)==null?void 0:o.status,headers:(a=e.init)!=null&&a.headers?new Headers(e.init.headers):void 0}}return{type:xr.error,error:new h6(((n=e.init)==null?void 0:n.status)||500,void 0,e.data),statusCode:mm(e)?e.status:void 0,headers:(i=e.init)!=null&&i.headers?new Headers(e.init.headers):void 0}}return{type:xr.error,error:e,statusCode:mm(e)?e.status:void 0}}if(MY(e)){var c,d;return{type:xr.deferred,deferredData:e,statusCode:(c=e.init)==null?void 0:c.status,headers:((d=e.init)==null?void 0:d.headers)&&new Headers(e.init.headers)}}if(LE(e)){var u,h;return{type:xr.data,data:e.data,statusCode:(u=e.init)==null?void 0:u.status,headers:(h=e.init)!=null&&h.headers?new Headers(e.init.headers):void 0}}return{type:xr.data,data:e}}function TY(r,e,t,n,i,o){let a=r.headers.get("Location");if(or(a,"Redirects returned/thrown from loaders/actions must have a Location header"),!l8.test(a)){let c=n.slice(0,n.findIndex(d=>d.route.id===t)+1);a=f6(new URL(e.url),c,i,!0,a,o),r.headers.set("Location",a)}return r}function RE(r,e,t){if(l8.test(r)){let n=r,i=n.startsWith("//")?new URL(e.protocol+n):new URL(n),o=m2(i.pathname,t)!=null;if(i.origin===e.origin&&o)return i.pathname+i.search+i.hash}return r}function Ih(r,e,t,n){let i=r.createURL(VM(e)).toString(),o={signal:t};if(n&&Ra(n.formMethod)){let{formMethod:a,formEncType:c}=n;o.method=a.toUpperCase(),c==="application/json"?(o.headers=new Headers({"Content-Type":c}),o.body=JSON.stringify(n.json)):c==="text/plain"?o.body=n.text:c==="application/x-www-form-urlencoded"&&n.formData?o.body=m6(n.formData):o.body=n.formData}return new Request(i,o)}function m6(r){let e=new URLSearchParams;for(let[t,n]of r.entries())e.append(t,typeof n=="string"?n:n.name);return e}function PE(r){let e=new FormData;for(let[t,n]of r.entries())e.append(t,n);return e}function IY(r,e,t,n,i){let o={},a=null,c,d=!1,u={},h=t&&xo(t[1])?t[1].error:void 0;return r.forEach(p=>{if(!(p.route.id in e))return;let m=p.route.id,v=e[m];if(or(!Kd(v),"Cannot handle redirect results in processLoaderData"),xo(v)){let _=v.error;h!==void 0&&(_=h,h=void 0),a=a||{};{let b=Ud(r,m);a[b.route.id]==null&&(a[b.route.id]=_)}o[m]=void 0,d||(d=!0,c=mm(v.error)?v.error.status:500),v.headers&&(u[m]=v.headers)}else kl(v)?(n.set(m,v.deferredData),o[m]=v.deferredData.data,v.statusCode!=null&&v.statusCode!==200&&!d&&(c=v.statusCode),v.headers&&(u[m]=v.headers)):(o[m]=v.data,v.statusCode&&v.statusCode!==200&&!d&&(c=v.statusCode),v.headers&&(u[m]=v.headers))}),h!==void 0&&t&&(a={[t[0]]:h},o[t[0]]=void 0),{loaderData:o,errors:a,statusCode:c||200,loaderHeaders:u}}function ME(r,e,t,n,i,o,a){let{loaderData:c,errors:d}=IY(e,t,n,a);return i.forEach(u=>{let{key:h,match:p,controller:m}=u,v=o[h];if(or(v,"Did not find corresponding fetcher result"),!(m&&m.signal.aborted))if(xo(v)){let _=Ud(r.matches,p==null?void 0:p.route.id);d&&d[_.route.id]||(d=Kr({},d,{[_.route.id]:v.error})),r.fetchers.delete(h)}else if(Kd(v))or(!1,"Unhandled fetcher revalidation redirect");else if(kl(v))or(!1,"Unhandled fetcher deferred data");else{let _=al(v.data);r.fetchers.set(h,_)}}),{loaderData:c,errors:d}}function $E(r,e,t,n){let i=Kr({},e);for(let o of t){let a=o.route.id;if(e.hasOwnProperty(a)?e[a]!==void 0&&(i[a]=e[a]):r[a]!==void 0&&o.route.loader&&(i[a]=r[a]),n&&n.hasOwnProperty(a))break}return i}function OE(r){return r?xo(r[1])?{actionData:{}}:{actionData:{[r[0]]:r[1].data}}:{}}function Ud(r,e){return(e?r.slice(0,r.findIndex(n=>n.route.id===e)+1):[...r]).reverse().find(n=>n.route.hasErrorBoundary===!0)||r[0]}function ZE(r){let e=r.length===1?r[0]:r.find(t=>t.index||!t.path||t.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:e}],route:e}}function to(r,e){let{pathname:t,routeId:n,method:i,type:o,message:a}=e===void 0?{}:e,c="Unknown Server Error",d="Unknown @remix-run/router error";return r===400?(c="Bad Request",i&&t&&n?d="You made a "+i+' request to "'+t+'" but '+('did not provide a `loader` for route "'+n+'", ')+"so there is no way to handle the request.":o==="defer-action"?d="defer() is not supported in actions":o==="invalid-body"&&(d="Unable to encode submission body")):r===403?(c="Forbidden",d='Route "'+n+'" does not match URL "'+t+'"'):r===404?(c="Not Found",d='No route matches URL "'+t+'"'):r===405&&(c="Method Not Allowed",i&&t&&n?d="You made a "+i.toUpperCase()+' request to "'+t+'" but '+('did not provide an `action` for route "'+n+'", ')+"so there is no way to handle the request.":i&&(d='Invalid request method "'+i.toUpperCase()+'"')),new h6(r||500,c,new Error(d),!0)}function Y0(r){let e=Object.entries(r);for(let t=e.length-1;t>=0;t--){let[n,i]=e[t];if(Kd(i))return{key:n,result:i}}}function VM(r){let e=typeof r=="string"?Ts(r):r;return ju(Kr({},e,{hash:""}))}function RY(r,e){return r.pathname!==e.pathname||r.search!==e.search?!1:r.hash===""?e.hash!=="":r.hash===e.hash?!0:e.hash!==""}function PY(r){return FM(r.result)&&gY.has(r.result.status)}function kl(r){return r.type===xr.deferred}function xo(r){return r.type===xr.error}function Kd(r){return(r&&r.type)===xr.redirect}function LE(r){return typeof r=="object"&&r!=null&&"type"in r&&"data"in r&&"init"in r&&r.type==="DataWithResponseInit"}function MY(r){let e=r;return e&&typeof e=="object"&&typeof e.data=="object"&&typeof e.subscribe=="function"&&typeof e.cancel=="function"&&typeof e.resolveData=="function"}function FM(r){return r!=null&&typeof r.status=="number"&&typeof r.statusText=="string"&&typeof r.headers=="object"&&typeof r.body<"u"}function $Y(r){return mY.has(r.toLowerCase())}function Ra(r){return fY.has(r.toLowerCase())}async function OY(r,e,t,n,i){let o=Object.entries(e);for(let a=0;a<o.length;a++){let[c,d]=o[a],u=r.find(m=>(m==null?void 0:m.route.id)===c);if(!u)continue;let h=n.find(m=>m.route.id===u.route.id),p=h!=null&&!NM(h,u)&&(i&&i[u.route.id])!==void 0;kl(d)&&p&&await d8(d,t,!1).then(m=>{m&&(e[c]=m)})}}async function ZY(r,e,t){for(let n=0;n<t.length;n++){let{key:i,routeId:o,controller:a}=t[n],c=e[i];r.find(u=>(u==null?void 0:u.route.id)===o)&&kl(c)&&(or(a,"Expected an AbortController for revalidating fetcher deferred result"),await d8(c,a.signal,!0).then(u=>{u&&(e[i]=u)}))}}async function d8(r,e,t){if(t===void 0&&(t=!1),!await r.deferredData.resolveData(e)){if(t)try{return{type:xr.data,data:r.deferredData.unwrappedData}}catch(i){return{type:xr.error,error:i}}return{type:xr.data,data:r.deferredData.data}}}function u8(r){return new URLSearchParams(r).getAll("index").some(e=>e==="")}function vp(r,e){let t=typeof e=="string"?Ts(e).search:e.search;if(r[r.length-1].route.index&&u8(t||""))return r[r.length-1];let n=ZM(r);return n[n.length-1]}function HE(r){let{formMethod:e,formAction:t,formEncType:n,text:i,formData:o,json:a}=r;if(!(!e||!t||!n)){if(i!=null)return{formMethod:e,formAction:t,formEncType:n,formData:void 0,json:void 0,text:i};if(o!=null)return{formMethod:e,formAction:t,formEncType:n,formData:o,json:void 0,text:void 0};if(a!==void 0)return{formMethod:e,formAction:t,formEncType:n,formData:void 0,json:a,text:void 0}}}function g_(r,e){return e?{state:"loading",location:r,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text}:{state:"loading",location:r,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function LY(r,e){return{state:"submitting",location:r,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text}}function J1(r,e){return r?{state:"loading",formMethod:r.formMethod,formAction:r.formAction,formEncType:r.formEncType,formData:r.formData,json:r.json,text:r.text,data:e}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function HY(r,e){return{state:"submitting",formMethod:r.formMethod,formAction:r.formAction,formEncType:r.formEncType,formData:r.formData,json:r.json,text:r.text,data:e?e.data:void 0}}function al(r){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:r}}function NY(r,e){try{let t=r.sessionStorage.getItem(HM);if(t){let n=JSON.parse(t);for(let[i,o]of Object.entries(n||{}))o&&Array.isArray(o)&&e.set(i,new Set(o||[]))}}catch{}}function DY(r,e){if(e.size>0){let t={};for(let[n,i]of e)t[n]=[...i];try{r.sessionStorage.setItem(HM,JSON.stringify(t))}catch(n){Vl(!1,"Failed to save applied view transitions in sessionStorage ("+n+").")}}}const zM=r=>{switch(r){case"hash":return jW({v5Compat:!0});case"memory":return FW({v5Compat:!0});case"browser":return zW({v5Compat:!0});default:return console.warn(`Unknown history type: ${r}. Using browser history as default.`),zM("browser")}},NE=r=>typeof r=="object"&&"key"in r;var wo,Gm,s4,Wm,Ia,xf;class VY extends It{constructor(t){super(o=>k(this,Ia).subscribe(o));Ie(this,wo);Ie(this,Gm);Ie(this,s4,window.location.origin);Ie(this,Wm,new Qn);Ie(this,Ia);Ie(this,xf);const{basename:n,history:i}=t;Be(this,xf,t.logger||console),Be(this,Gm,n),Be(this,wo,i),Be(this,Ia,new Xf({action:k(this,wo).action,location:k(this,wo).location,delta:null})),k(this,Wm).add(k(this,wo).listen(o=>{o.location.key!==k(this,Ia).value.location.key&&k(this,Ia).next(o)}))}get basename(){return k(this,Gm)}get origin(){return k(this,s4)}get state(){return k(this,Ia).asObservable()}get value(){return k(this,Ia).value}get location(){return this.value.location}get action(){return this.value.action}encodeLocation(t){return k(this,wo).encodeLocation(t)}listen(t){const n=k(this,Ia).subscribe(t);return k(this,xf).debug("Navigator::listen",t),()=>(k(this,xf).debug("Navigator::listen[unsubscribe]",t),n.unsubscribe())}createHref(t){return k(this,wo).createHref(t)}go(t){k(this,wo).go(t)}push(t,n){NE(t)&&this._isDuplicateLocation(t)||k(this,wo).push(t,n)}replace(t,n){NE(t)&&this._isDuplicateLocation(t)||k(this,wo).replace(t,n)}createURL(t){return k(this,wo).createURL(t)}_isDuplicateLocation(t){return t.key===k(this,Ia).value.location.key}dispose(){k(this,Wm).unsubscribe()}}wo=new WeakMap,Gm=new WeakMap,s4=new WeakMap,Wm=new WeakMap,Ia=new WeakMap,xf=new WeakMap;const DE=r=>r.replace(/\/+/g,"/");var Jo,Cl;class FY extends zR{constructor(t){super(t);Ie(this,Jo);Ie(this,Cl);const{basename:n,history:i}=t.config;if(Be(this,Cl,n),!i)throw Error("no history provided!");Be(this,Jo,new VY({basename:n,history:i})),this._addTeardown(()=>k(this,Jo).dispose())}get state$(){return k(this,Jo).pipe(Oe(t=>k(this,Cl)?t.location.pathname.startsWith(k(this,Cl)):!0),me(({action:t,location:n})=>({action:t,location:this._localizePath(n)})))}get navigator(){return k(this,Jo)}get path(){return this._localizePath(this.navigator.location)}createRouter(t){const n=k(this,Jo);console.debug("NavigationProvider::createRouter",t);const i=bY({basename:n.basename,history:n,routes:t,future:{v7_prependBasename:!0}});return i.initialize(),i}createHref(t){return k(this,Jo).createHref(this._createToPath(t??this.path))}createURL(t){return k(this,Jo).createURL(this._createToPath(t??this.path))}push(t,n){k(this,Jo).push(this._createToPath(t),n)}replace(t,n){k(this,Jo).replace(this._createToPath(t),n)}_localizePath(t){const{pathname:n,search:i,hash:o}=t;return{pathname:DE(n.replace(k(this,Cl)??"","")),search:i,hash:o}}_createToPath(t){const{pathname:n,search:i,hash:o}=typeof t=="string"?{pathname:t,search:void 0,hash:void 0}:t;return{pathname:DE([k(this,Cl),n==="/"?void 0:n].filter(a=>!!a).join("/")),search:i,hash:o}}}Jo=new WeakMap,Cl=new WeakMap;const VE="4.0.10",zY="navigation",jY={version:new fs(VE),name:zY,configure:r=>{const e=new VW;return r!=null&&r.navigation&&(e.history=r.navigation.navigator),e},initialize:({config:r})=>(r.history??(r.history=zM()),new FY({version:VE,config:r})),dispose({instance:r}){r.dispose()}},UY=(r,e)=>{const t=e;r.addConfig({module:jY,...t})},jM="::",BY=r=>{const[e,t]=r.split(jM);return{namespace:e,id:t}};var oc;class UM{constructor(e,t){Le(this,"namespace");Ie(this,oc);this.namespace=e,Be(this,oc,t)}*[Symbol.iterator](){for(const e of Object.values(this.getItems()))yield e}generateId(e){return[this.namespace,e].join(jM)}setItem(e,t){k(this,oc).setItem(this.generateId(e),JSON.stringify(t))}removeItem(e){k(this,oc).removeItem(this.generateId(e))}getItem(e){const t=k(this,oc).getItem(this.generateId(e));return t?JSON.parse(t):void 0}getItems(){return this._getItems().reduce((e,{id:t,value:n})=>Object.assign(e,{[t]:n}),{})}clear(){for(const e of this._getItems())k(this,oc).removeItem(e.key)}_getItems(){const{namespace:e}=this;return Object.entries(k(this,oc)).map(([t,n])=>({...BY(t),key:t,value:n})).filter(t=>t.namespace===e).map(t=>Object.assign(t,{value:JSON.parse(t.value)}))}}oc=new WeakMap;class qY extends UM{constructor(e){super(e,window.localStorage)}}class KY extends UM{constructor(e){super(e,window.sessionStorage)}}const GY=(r,e)=>{switch(e){case"local":return new qY(r);case"session":return new KY(r)}throw Error("invalid type provided")},BM=(r,e)=>async()=>{const{name:t,type:n="local"}=e??{},i=["FEATURES",t].filter(a=>!!a).join("_"),o=GY(i,n);return{connect:({provider:a})=>a.onFeatureToggle(({features:c})=>{c.map(d=>o.setItem(d.key,d))}),initial:async()=>{const a=await o.getItems();return r.map(c=>{const d=a[c.key];return{...c,enabled:d?d.enabled:c.enabled}})}}},WY=r=>!(r.value==="0"||r.value==="false"),qM=(r,e)=>{if(!r.length)return()=>Promise.resolve({});const t=r.map(n=>typeof n=="string"?n:n.key);return async n=>{if(!n.hasModule("navigation"))throw Error("missing navigation module");const i=await n.requireInstance("navigation"),{isFeatureEnabled:o=WY}=e??{};return{order:-1,initial:async()=>r.filter(a=>typeof a!="string"),connect(a){const{provider:c}=a,d=new Qn,u=new Fn,h=new Fn,p=c.features$.pipe(me(v=>Object.values(v)),me(v=>v.filter(_=>t.includes(_.key)))),m=h.pipe(Up(p),me(([v,_])=>{const b=new URLSearchParams(v.search);return _.reduce((C,T)=>{const{key:A}=T;if(b.has(A)){const I=b.get(A),O=o({feature:T,value:I,path:v});C.push({key:A,enabled:O})}return C},[])}),Al(u));return d.add(m.subscribe(v=>c.toggleFeatures(v))),d.add(()=>h.complete()),d.add(i.navigator.listen(v=>{h.next(v.location)})),h.next(i.path),d}}}};var Ym,lw;class YY extends t2{constructor(){super(...arguments);Ie(this,Ym,[]);Ie(this,lw,[])}addPlugin(t){return k(this,Ym).push(t),this}enableLocalFeatures(...t){return this.addPlugin(BM(...t))}enableUrlToggle(...t){return this.addPlugin(qM(...t))}_processConfig(t,n){const i=at(k(this,Ym)).pipe(Wn(c=>c(n)),Oe(c=>Object.keys(c).length>0),zp((c,d)=>(c.push(d),c),[]),Ci(),Jf()),o=i.pipe(bs(c=>at(c.sort((d,u)=>(d.order??0)-(u.order??0))).pipe(Oe(d=>!!d.initial),bs(d=>d.initial()),zp((d,u)=>{for(const h in u)h in d&&console.warn("FeatureFlagConfigurator",`duplicate entry of ${h}`);return d.push(...u),d},[]))));return Ig({initial:o,plugins:i}).pipe(me(c=>({...t,...c})))}}Ym=new WeakMap,lw=new WeakMap;const Rv={setFeatures:nn("set_features_enabled",r=>({payload:r})),toggleFeatures:nn("toggle_features_enabled",r=>({payload:r}))},QY=r=>a2(r,e=>{e.addCase(Rv.setFeatures,(t,n)=>{for(const i of n.payload)t.features[i.key]=i}),e.addCase(Rv.toggleFeatures,(t,n)=>{const i=n.payload.filter(o=>o.key in t.features);for(const o of i){const{key:a}=o;t.features[a].enabled=!!o.enabled}})}),XY={features:{}},JY=r=>new o2(QY(r??XY)),eQ=r=>r.reduce((e,t)=>Object.assign(e,{[t.key]:t}),{});var ac,sc,Qm;class tQ{constructor(e){Ie(this,ac,new Qn);Ie(this,sc);Ie(this,Qm);const{config:t,event:n}=e;Be(this,Qm,n),Be(this,sc,JY({features:eQ(t.initial)}));for(const i of Object.values(t.plugins))i.connect&&k(this,ac).add(i.connect({provider:this}));n&&this.onFeatureToggle(({features:i})=>n.dispatchEvent("onFeatureFlagsToggled",{detail:{features:i}}))}get features(){return k(this,sc).value.features}get features$(){return k(this,sc).pipe(me(e=>e.features))}hasFeature(e){return e in this.features}setFeatures(e){k(this,sc).next(Rv.setFeatures(e))}onFeatureToggle(e){const t=this.features$.pipe(ev(),me(([n,i])=>Object.values(i).filter(o=>{var a;return o.enabled!==((a=n[o.key])==null?void 0:a.enabled)})),me(n=>({features:n}))).subscribe(e);return k(this,ac).add(t),()=>k(this,ac).remove(t)}async toggleFeature(e){return this.toggleFeatures([e])}async toggleFeatures(e){const{features:t}=k(this,sc).value,n=at(e).pipe(Qt(async i=>{var c;const o=t[i.key];if(o){if(o.readonly){console.warn(`skipped toggling flag [${o.key}], since readonly!`);return}}else{console.warn(`toggling flag [${i.key}] which is not registered`);return}const a=await((c=k(this,Qm))==null?void 0:c.dispatchEvent("onFeatureFlagToggle",{source:this,detail:{feature:o,enable:i.enabled},cancelable:!0}));if(a!=null&&a.canceled)console.debug(`skipped toggling flag [${o.key}], since aborted!`);else return i}),Oe(i=>!!i),zp((i,o)=>i.concat([o]),[]),jp(()=>{k(this,ac).remove(n)})).subscribe(i=>{k(this,sc).next(Rv.toggleFeatures(i))});k(this,ac).add(n)}getFeature(e){return this.features[e]}getFeatures(e){return Object.values(this.features).filter(e)}dispose(){k(this,ac).unsubscribe()}}ac=new WeakMap,sc=new WeakMap,Qm=new WeakMap;const rQ="featureFlag",nQ={name:rQ,configure:()=>new YY,initialize:async r=>{const e=await r.config.createConfigAsync(r),t=r.hasModule("event")?await r.requireInstance("event"):void 0;return new tQ({config:e,event:t})}},iQ=(r,e)=>{r.addConfig({module:nQ,configure:async t=>{if(e)return Promise.resolve(e(t))}})},oQ=async r=>{r.configureServiceDiscovery({client:{baseUri:"https://discovery.fusion.equinor.com/service-registry/environments/ci/services",defaultScopes:["5a842df8-3238-415d-b168-9f16a6a6031b/.default"]}}),r.configureHttpClient("app",{baseUri:new URL("/apps-proxy/",window.location.href).href,defaultScopes:["5a842df8-3238-415d-b168-9f16a6a6031b/.default"]}),r.configureMsal(e=>{e.setClientConfig({clientId:"9b707e3a-3e90-41ed-a47e-652a1e3b53d0",tenantId:"3aa4a235-b6e2-48d5-9195-7fcf05b459b0",redirectUri:"/authentication/login-callback"}),e.setRequiresAuth(!0)}),hW(r),UY(r),bB(r),DW(r,e=>{e.setSourceSystem({subSystem:"CLI",identifier:"fusion-cli",name:"Fusion CLI"})}),iQ(r,e=>{e.addPlugin(BM([{key:"fusionDebug",title:"Fusion debug log",description:"Show Fusion debug log in console"},{key:"pinkBg",title:"Use pink bg?",description:"When enabled the background should be pink"}])),e.addPlugin(qM(["fusionDebug"]))}),r.onConfigured(()=>{console.log("framework config done")}),r.onInitialized(async e=>{console.debug("📒 subscribing to all events");try{await e.http.createClient({defaultScopes:["5a842df8-3238-415d-b168-9f16a6a6031b/.default"]}).fetch("/help-proxy",{method:"OPTIONS"})}catch(t){console.error("Could not call help-proxy OPTIONS call to aquire an access token",t.message)}})},aQ="bookmarkId",sQ=r=>{const{event:e,context:t,navigation:{navigator:n}}=jl().modules;x.useLayoutEffect(()=>e.addEventListener("onBookmarkChanged",o=>{var u;const{appKey:a,context:c}=o.detail,d=r.resolveAppPath(a);if(n.location.pathname!==d){const{hash:h,search:p}=n.location,m={pathname:d,search:cQ(p),hash:h};n.push(m)}c&&((u=t.currentContext)==null?void 0:u.id)!==c.id&&t.setCurrentContextByIdAsync(c.id)}),[r,t,e,n])};function cQ(r){const e=new URLSearchParams(r);return e.delete(aQ),`?${e.toString()}`}var Uu=sR();const lQ=zu(Uu),dQ=aR({__proto__:null,default:lQ},[Uu]);/**
414
+ `},""):String(n.body);return{path:t,submission:{formMethod:a,formAction:c,formEncType:n.formEncType,formData:void 0,json:void 0,text:m}}}else if(n.formEncType==="application/json"){if(!Ra(a))return i();try{let m=typeof n.body=="string"?JSON.parse(n.body):n.body;return{path:t,submission:{formMethod:a,formAction:c,formEncType:n.formEncType,formData:void 0,json:m,text:void 0}}}catch{return i()}}}or(typeof FormData=="function","FormData is not available in this environment");let d,u;if(n.formData)d=m6(n.formData),u=n.formData;else if(n.body instanceof FormData)d=m6(n.body),u=n.body;else if(n.body instanceof URLSearchParams)d=n.body,u=PE(d);else if(n.body==null)d=new URLSearchParams,u=new FormData;else try{d=new URLSearchParams(n.body),u=PE(d)}catch{return i()}let h={formMethod:a,formAction:c,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:u,json:void 0,text:void 0};if(Ra(h.formMethod))return{path:t,submission:h};let p=Ts(t);return e&&p.search&&u8(p.search)&&d.append("index",""),p.search="?"+d,{path:ju(p),submission:h}}function SE(r,e,t){t===void 0&&(t=!1);let n=r.findIndex(i=>i.route.id===e);return n>=0?r.slice(0,t?n+1:n):r}function AE(r,e,t,n,i,o,a,c,d,u,h,p,m,v,_,b){let C=b?xo(b[1])?b[1].error:b[1].data:void 0,T=r.createURL(e.location),A=r.createURL(i),I=t;o&&e.errors?I=SE(t,Object.keys(e.errors)[0],!0):b&&xo(b[1])&&(I=SE(t,b[0]));let O=b?b[1].statusCode:void 0,B=a&&O&&O>=400,z=I.filter((Y,ue)=>{let{route:le}=Y;if(le.lazy)return!0;if(le.loader==null)return!1;if(o)return p6(le,e.loaderData,e.errors);if(xY(e.loaderData,e.matches[ue],Y)||d.some(xe=>xe===Y.route.id))return!0;let Te=e.matches[ue],ke=Y;return TE(Y,Kr({currentUrl:T,currentParams:Te.params,nextUrl:A,nextParams:ke.params},n,{actionResult:C,actionStatus:O,defaultShouldRevalidate:B?!1:c||T.pathname+T.search===A.pathname+A.search||T.search!==A.search||NM(Te,ke)}))}),R=[];return p.forEach((Y,ue)=>{if(o||!t.some(X=>X.route.id===Y.routeId)||h.has(ue))return;let le=jd(v,Y.path,_);if(!le){R.push({key:ue,routeId:Y.routeId,path:Y.path,matches:null,match:null,controller:null});return}let Te=e.fetchers.get(ue),ke=vp(le,Y.path),xe=!1;m.has(ue)?xe=!1:u.has(ue)?(u.delete(ue),xe=!0):Te&&Te.state!=="idle"&&Te.data===void 0?xe=c:xe=TE(ke,Kr({currentUrl:T,currentParams:e.matches[e.matches.length-1].params,nextUrl:A,nextParams:t[t.length-1].params},n,{actionResult:C,actionStatus:O,defaultShouldRevalidate:B?!1:c})),xe&&R.push({key:ue,routeId:Y.routeId,path:Y.path,matches:le,match:ke,controller:new AbortController})}),[z,R]}function p6(r,e,t){if(r.lazy)return!0;if(!r.loader)return!1;let n=e!=null&&e[r.id]!==void 0,i=t!=null&&t[r.id]!==void 0;return!n&&i?!1:typeof r.loader=="function"&&r.loader.hydrate===!0?!0:!n&&!i}function xY(r,e,t){let n=!e||t.route.id!==e.route.id,i=r[t.route.id]===void 0;return n||i}function NM(r,e){let t=r.route.path;return r.pathname!==e.pathname||t!=null&&t.endsWith("*")&&r.params["*"]!==e.params["*"]}function TE(r,e){if(r.route.shouldRevalidate){let t=r.route.shouldRevalidate(e);if(typeof t=="boolean")return t}return e.defaultShouldRevalidate}function IE(r,e,t,n,i){var o;let a;if(r){let u=n[r];or(u,"No route found to patch children into: routeId = "+r),u.children||(u.children=[]),a=u.children}else a=t;let c=e.filter(u=>!a.some(h=>DM(u,h))),d=Iv(c,i,[r||"_","patch",String(((o=a)==null?void 0:o.length)||"0")],n);a.push(...d)}function DM(r,e){return"id"in r&&"id"in e&&r.id===e.id?!0:r.index===e.index&&r.path===e.path&&r.caseSensitive===e.caseSensitive?(!r.children||r.children.length===0)&&(!e.children||e.children.length===0)?!0:r.children.every((t,n)=>{var i;return(i=e.children)==null?void 0:i.some(o=>DM(t,o))}):!1}async function CY(r,e,t){if(!r.lazy)return;let n=await r.lazy();if(!r.lazy)return;let i=t[r.id];or(i,"No route found in manifest");let o={};for(let a in n){let d=i[a]!==void 0&&a!=="hasErrorBoundary";Vl(!d,'Route "'+i.id+'" has a static property "'+a+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+a+'" will be ignored.')),!d&&!BW.has(a)&&(o[a]=n[a])}Object.assign(i,o),Object.assign(i,Kr({},e(i),{lazy:void 0}))}async function kY(r){let{matches:e}=r,t=e.filter(i=>i.shouldLoad);return(await Promise.all(t.map(i=>i.resolve()))).reduce((i,o,a)=>Object.assign(i,{[t[a].route.id]:o}),{})}async function EY(r,e,t,n,i,o,a,c,d,u){let h=o.map(v=>v.route.lazy?CY(v.route,d,c):void 0),p=o.map((v,_)=>{let b=h[_],C=i.some(A=>A.route.id===v.route.id);return Kr({},v,{shouldLoad:C,resolve:async A=>(A&&n.method==="GET"&&(v.route.lazy||v.route.loader)&&(C=!0),C?SY(e,n,v,b,A,u):Promise.resolve({type:xr.data,result:void 0}))})}),m=await r({matches:p,request:n,params:o[0].params,fetcherKey:a,context:u});try{await Promise.all(h)}catch{}return m}async function SY(r,e,t,n,i,o){let a,c,d=u=>{let h,p=new Promise((_,b)=>h=b);c=()=>h(),e.signal.addEventListener("abort",c);let m=_=>typeof u!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+r+'" [routeId: '+t.route.id+"]"))):u({request:e,params:t.params,context:o},..._!==void 0?[_]:[]),v=(async()=>{try{return{type:"data",result:await(i?i(b=>m(b)):m())}}catch(_){return{type:"error",result:_}}})();return Promise.race([v,p])};try{let u=t.route[r];if(n)if(u){let h,[p]=await Promise.all([d(u).catch(m=>{h=m}),n]);if(h!==void 0)throw h;a=p}else if(await n,u=t.route[r],u)a=await d(u);else if(r==="action"){let h=new URL(e.url),p=h.pathname+h.search;throw to(405,{method:e.method,pathname:p,routeId:t.route.id})}else return{type:xr.data,result:void 0};else if(u)a=await d(u);else{let h=new URL(e.url),p=h.pathname+h.search;throw to(404,{pathname:p})}or(a.result!==void 0,"You defined "+(r==="action"?"an action":"a loader")+" for route "+('"'+t.route.id+"\" but didn't return anything from your `"+r+"` ")+"function. Please return a value or `null`.")}catch(u){return{type:xr.error,result:u}}finally{c&&e.signal.removeEventListener("abort",c)}return a}async function AY(r){let{result:e,type:t}=r;if(FM(e)){let p;try{let m=e.headers.get("Content-Type");m&&/\bapplication\/json\b/.test(m)?e.body==null?p=null:p=await e.json():p=await e.text()}catch(m){return{type:xr.error,error:m}}return t===xr.error?{type:xr.error,error:new h6(e.status,e.statusText,p),statusCode:e.status,headers:e.headers}:{type:xr.data,data:p,statusCode:e.status,headers:e.headers}}if(t===xr.error){if(LE(e)){var n,i;if(e.data instanceof Error){var o,a;return{type:xr.error,error:e.data,statusCode:(o=e.init)==null?void 0:o.status,headers:(a=e.init)!=null&&a.headers?new Headers(e.init.headers):void 0}}return{type:xr.error,error:new h6(((n=e.init)==null?void 0:n.status)||500,void 0,e.data),statusCode:mm(e)?e.status:void 0,headers:(i=e.init)!=null&&i.headers?new Headers(e.init.headers):void 0}}return{type:xr.error,error:e,statusCode:mm(e)?e.status:void 0}}if(MY(e)){var c,d;return{type:xr.deferred,deferredData:e,statusCode:(c=e.init)==null?void 0:c.status,headers:((d=e.init)==null?void 0:d.headers)&&new Headers(e.init.headers)}}if(LE(e)){var u,h;return{type:xr.data,data:e.data,statusCode:(u=e.init)==null?void 0:u.status,headers:(h=e.init)!=null&&h.headers?new Headers(e.init.headers):void 0}}return{type:xr.data,data:e}}function TY(r,e,t,n,i,o){let a=r.headers.get("Location");if(or(a,"Redirects returned/thrown from loaders/actions must have a Location header"),!l8.test(a)){let c=n.slice(0,n.findIndex(d=>d.route.id===t)+1);a=f6(new URL(e.url),c,i,!0,a,o),r.headers.set("Location",a)}return r}function RE(r,e,t){if(l8.test(r)){let n=r,i=n.startsWith("//")?new URL(e.protocol+n):new URL(n),o=m2(i.pathname,t)!=null;if(i.origin===e.origin&&o)return i.pathname+i.search+i.hash}return r}function Ih(r,e,t,n){let i=r.createURL(VM(e)).toString(),o={signal:t};if(n&&Ra(n.formMethod)){let{formMethod:a,formEncType:c}=n;o.method=a.toUpperCase(),c==="application/json"?(o.headers=new Headers({"Content-Type":c}),o.body=JSON.stringify(n.json)):c==="text/plain"?o.body=n.text:c==="application/x-www-form-urlencoded"&&n.formData?o.body=m6(n.formData):o.body=n.formData}return new Request(i,o)}function m6(r){let e=new URLSearchParams;for(let[t,n]of r.entries())e.append(t,typeof n=="string"?n:n.name);return e}function PE(r){let e=new FormData;for(let[t,n]of r.entries())e.append(t,n);return e}function IY(r,e,t,n,i){let o={},a=null,c,d=!1,u={},h=t&&xo(t[1])?t[1].error:void 0;return r.forEach(p=>{if(!(p.route.id in e))return;let m=p.route.id,v=e[m];if(or(!Kd(v),"Cannot handle redirect results in processLoaderData"),xo(v)){let _=v.error;h!==void 0&&(_=h,h=void 0),a=a||{};{let b=Ud(r,m);a[b.route.id]==null&&(a[b.route.id]=_)}o[m]=void 0,d||(d=!0,c=mm(v.error)?v.error.status:500),v.headers&&(u[m]=v.headers)}else kl(v)?(n.set(m,v.deferredData),o[m]=v.deferredData.data,v.statusCode!=null&&v.statusCode!==200&&!d&&(c=v.statusCode),v.headers&&(u[m]=v.headers)):(o[m]=v.data,v.statusCode&&v.statusCode!==200&&!d&&(c=v.statusCode),v.headers&&(u[m]=v.headers))}),h!==void 0&&t&&(a={[t[0]]:h},o[t[0]]=void 0),{loaderData:o,errors:a,statusCode:c||200,loaderHeaders:u}}function ME(r,e,t,n,i,o,a){let{loaderData:c,errors:d}=IY(e,t,n,a);return i.forEach(u=>{let{key:h,match:p,controller:m}=u,v=o[h];if(or(v,"Did not find corresponding fetcher result"),!(m&&m.signal.aborted))if(xo(v)){let _=Ud(r.matches,p==null?void 0:p.route.id);d&&d[_.route.id]||(d=Kr({},d,{[_.route.id]:v.error})),r.fetchers.delete(h)}else if(Kd(v))or(!1,"Unhandled fetcher revalidation redirect");else if(kl(v))or(!1,"Unhandled fetcher deferred data");else{let _=al(v.data);r.fetchers.set(h,_)}}),{loaderData:c,errors:d}}function $E(r,e,t,n){let i=Kr({},e);for(let o of t){let a=o.route.id;if(e.hasOwnProperty(a)?e[a]!==void 0&&(i[a]=e[a]):r[a]!==void 0&&o.route.loader&&(i[a]=r[a]),n&&n.hasOwnProperty(a))break}return i}function OE(r){return r?xo(r[1])?{actionData:{}}:{actionData:{[r[0]]:r[1].data}}:{}}function Ud(r,e){return(e?r.slice(0,r.findIndex(n=>n.route.id===e)+1):[...r]).reverse().find(n=>n.route.hasErrorBoundary===!0)||r[0]}function ZE(r){let e=r.length===1?r[0]:r.find(t=>t.index||!t.path||t.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:e}],route:e}}function to(r,e){let{pathname:t,routeId:n,method:i,type:o,message:a}=e===void 0?{}:e,c="Unknown Server Error",d="Unknown @remix-run/router error";return r===400?(c="Bad Request",i&&t&&n?d="You made a "+i+' request to "'+t+'" but '+('did not provide a `loader` for route "'+n+'", ')+"so there is no way to handle the request.":o==="defer-action"?d="defer() is not supported in actions":o==="invalid-body"&&(d="Unable to encode submission body")):r===403?(c="Forbidden",d='Route "'+n+'" does not match URL "'+t+'"'):r===404?(c="Not Found",d='No route matches URL "'+t+'"'):r===405&&(c="Method Not Allowed",i&&t&&n?d="You made a "+i.toUpperCase()+' request to "'+t+'" but '+('did not provide an `action` for route "'+n+'", ')+"so there is no way to handle the request.":i&&(d='Invalid request method "'+i.toUpperCase()+'"')),new h6(r||500,c,new Error(d),!0)}function Y0(r){let e=Object.entries(r);for(let t=e.length-1;t>=0;t--){let[n,i]=e[t];if(Kd(i))return{key:n,result:i}}}function VM(r){let e=typeof r=="string"?Ts(r):r;return ju(Kr({},e,{hash:""}))}function RY(r,e){return r.pathname!==e.pathname||r.search!==e.search?!1:r.hash===""?e.hash!=="":r.hash===e.hash?!0:e.hash!==""}function PY(r){return FM(r.result)&&gY.has(r.result.status)}function kl(r){return r.type===xr.deferred}function xo(r){return r.type===xr.error}function Kd(r){return(r&&r.type)===xr.redirect}function LE(r){return typeof r=="object"&&r!=null&&"type"in r&&"data"in r&&"init"in r&&r.type==="DataWithResponseInit"}function MY(r){let e=r;return e&&typeof e=="object"&&typeof e.data=="object"&&typeof e.subscribe=="function"&&typeof e.cancel=="function"&&typeof e.resolveData=="function"}function FM(r){return r!=null&&typeof r.status=="number"&&typeof r.statusText=="string"&&typeof r.headers=="object"&&typeof r.body<"u"}function $Y(r){return mY.has(r.toLowerCase())}function Ra(r){return fY.has(r.toLowerCase())}async function OY(r,e,t,n,i){let o=Object.entries(e);for(let a=0;a<o.length;a++){let[c,d]=o[a],u=r.find(m=>(m==null?void 0:m.route.id)===c);if(!u)continue;let h=n.find(m=>m.route.id===u.route.id),p=h!=null&&!NM(h,u)&&(i&&i[u.route.id])!==void 0;kl(d)&&p&&await d8(d,t,!1).then(m=>{m&&(e[c]=m)})}}async function ZY(r,e,t){for(let n=0;n<t.length;n++){let{key:i,routeId:o,controller:a}=t[n],c=e[i];r.find(u=>(u==null?void 0:u.route.id)===o)&&kl(c)&&(or(a,"Expected an AbortController for revalidating fetcher deferred result"),await d8(c,a.signal,!0).then(u=>{u&&(e[i]=u)}))}}async function d8(r,e,t){if(t===void 0&&(t=!1),!await r.deferredData.resolveData(e)){if(t)try{return{type:xr.data,data:r.deferredData.unwrappedData}}catch(i){return{type:xr.error,error:i}}return{type:xr.data,data:r.deferredData.data}}}function u8(r){return new URLSearchParams(r).getAll("index").some(e=>e==="")}function vp(r,e){let t=typeof e=="string"?Ts(e).search:e.search;if(r[r.length-1].route.index&&u8(t||""))return r[r.length-1];let n=ZM(r);return n[n.length-1]}function HE(r){let{formMethod:e,formAction:t,formEncType:n,text:i,formData:o,json:a}=r;if(!(!e||!t||!n)){if(i!=null)return{formMethod:e,formAction:t,formEncType:n,formData:void 0,json:void 0,text:i};if(o!=null)return{formMethod:e,formAction:t,formEncType:n,formData:o,json:void 0,text:void 0};if(a!==void 0)return{formMethod:e,formAction:t,formEncType:n,formData:void 0,json:a,text:void 0}}}function g_(r,e){return e?{state:"loading",location:r,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text}:{state:"loading",location:r,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function LY(r,e){return{state:"submitting",location:r,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text}}function J1(r,e){return r?{state:"loading",formMethod:r.formMethod,formAction:r.formAction,formEncType:r.formEncType,formData:r.formData,json:r.json,text:r.text,data:e}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function HY(r,e){return{state:"submitting",formMethod:r.formMethod,formAction:r.formAction,formEncType:r.formEncType,formData:r.formData,json:r.json,text:r.text,data:e?e.data:void 0}}function al(r){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:r}}function NY(r,e){try{let t=r.sessionStorage.getItem(HM);if(t){let n=JSON.parse(t);for(let[i,o]of Object.entries(n||{}))o&&Array.isArray(o)&&e.set(i,new Set(o||[]))}}catch{}}function DY(r,e){if(e.size>0){let t={};for(let[n,i]of e)t[n]=[...i];try{r.sessionStorage.setItem(HM,JSON.stringify(t))}catch(n){Vl(!1,"Failed to save applied view transitions in sessionStorage ("+n+").")}}}const zM=r=>{switch(r){case"hash":return jW({v5Compat:!0});case"memory":return FW({v5Compat:!0});case"browser":return zW({v5Compat:!0});default:return console.warn(`Unknown history type: ${r}. Using browser history as default.`),zM("browser")}},NE=r=>typeof r=="object"&&"key"in r;var wo,Gm,s4,Wm,Ia,xf;class VY extends It{constructor(t){super(o=>k(this,Ia).subscribe(o));Ie(this,wo);Ie(this,Gm);Ie(this,s4,window.location.origin);Ie(this,Wm,new Qn);Ie(this,Ia);Ie(this,xf);const{basename:n,history:i}=t;Be(this,xf,t.logger||console),Be(this,Gm,n),Be(this,wo,i),Be(this,Ia,new Xf({action:k(this,wo).action,location:k(this,wo).location,delta:null})),k(this,Wm).add(k(this,wo).listen(o=>{o.location.key!==k(this,Ia).value.location.key&&k(this,Ia).next(o)}))}get basename(){return k(this,Gm)}get origin(){return k(this,s4)}get state(){return k(this,Ia).asObservable()}get value(){return k(this,Ia).value}get location(){return this.value.location}get action(){return this.value.action}encodeLocation(t){return k(this,wo).encodeLocation(t)}listen(t){const n=k(this,Ia).subscribe(t);return k(this,xf).debug("Navigator::listen",t),()=>(k(this,xf).debug("Navigator::listen[unsubscribe]",t),n.unsubscribe())}createHref(t){return k(this,wo).createHref(t)}go(t){k(this,wo).go(t)}push(t,n){NE(t)&&this._isDuplicateLocation(t)||k(this,wo).push(t,n)}replace(t,n){NE(t)&&this._isDuplicateLocation(t)||k(this,wo).replace(t,n)}createURL(t){return k(this,wo).createURL(t)}_isDuplicateLocation(t){return t.key===k(this,Ia).value.location.key}dispose(){k(this,Wm).unsubscribe()}}wo=new WeakMap,Gm=new WeakMap,s4=new WeakMap,Wm=new WeakMap,Ia=new WeakMap,xf=new WeakMap;const DE=r=>r.replace(/\/+/g,"/");var Jo,Cl;class FY extends zR{constructor(t){super(t);Ie(this,Jo);Ie(this,Cl);const{basename:n,history:i}=t.config;if(Be(this,Cl,n),!i)throw Error("no history provided!");Be(this,Jo,new VY({basename:n,history:i})),this._addTeardown(()=>k(this,Jo).dispose())}get state$(){return k(this,Jo).pipe(Oe(t=>k(this,Cl)?t.location.pathname.startsWith(k(this,Cl)):!0),me(({action:t,location:n})=>({action:t,location:this._localizePath(n)})))}get navigator(){return k(this,Jo)}get path(){return this._localizePath(this.navigator.location)}createRouter(t){const n=k(this,Jo);console.debug("NavigationProvider::createRouter",t);const i=bY({basename:n.basename,history:n,routes:t,future:{v7_prependBasename:!0}});return i.initialize(),i}createHref(t){return k(this,Jo).createHref(this._createToPath(t??this.path))}createURL(t){return k(this,Jo).createURL(this._createToPath(t??this.path))}push(t,n){k(this,Jo).push(this._createToPath(t),n)}replace(t,n){k(this,Jo).replace(this._createToPath(t),n)}_localizePath(t){const{pathname:n,search:i,hash:o}=t;return{pathname:DE(n.replace(k(this,Cl)??"","")),search:i,hash:o}}_createToPath(t){const{pathname:n,search:i,hash:o}=typeof t=="string"?{pathname:t,search:void 0,hash:void 0}:t;return{pathname:DE([k(this,Cl),n==="/"?void 0:n].filter(a=>!!a).join("/")),search:i,hash:o}}}Jo=new WeakMap,Cl=new WeakMap;const VE="5.0.2",zY="navigation",jY={version:new fs(VE),name:zY,configure:r=>{const e=new VW;return r!=null&&r.navigation&&(e.history=r.navigation.navigator),e},initialize:({config:r})=>(r.history??(r.history=zM()),new FY({version:VE,config:r})),dispose({instance:r}){r.dispose()}},UY=(r,e)=>{const t=e;r.addConfig({module:jY,...t})},jM="::",BY=r=>{const[e,t]=r.split(jM);return{namespace:e,id:t}};var oc;class UM{constructor(e,t){Le(this,"namespace");Ie(this,oc);this.namespace=e,Be(this,oc,t)}*[Symbol.iterator](){for(const e of Object.values(this.getItems()))yield e}generateId(e){return[this.namespace,e].join(jM)}setItem(e,t){k(this,oc).setItem(this.generateId(e),JSON.stringify(t))}removeItem(e){k(this,oc).removeItem(this.generateId(e))}getItem(e){const t=k(this,oc).getItem(this.generateId(e));return t?JSON.parse(t):void 0}getItems(){return this._getItems().reduce((e,{id:t,value:n})=>Object.assign(e,{[t]:n}),{})}clear(){for(const e of this._getItems())k(this,oc).removeItem(e.key)}_getItems(){const{namespace:e}=this;return Object.entries(k(this,oc)).map(([t,n])=>({...BY(t),key:t,value:n})).filter(t=>t.namespace===e).map(t=>Object.assign(t,{value:JSON.parse(t.value)}))}}oc=new WeakMap;class qY extends UM{constructor(e){super(e,window.localStorage)}}class KY extends UM{constructor(e){super(e,window.sessionStorage)}}const GY=(r,e)=>{switch(e){case"local":return new qY(r);case"session":return new KY(r)}throw Error("invalid type provided")},BM=(r,e)=>async()=>{const{name:t,type:n="local"}=e??{},i=["FEATURES",t].filter(a=>!!a).join("_"),o=GY(i,n);return{connect:({provider:a})=>a.onFeatureToggle(({features:c})=>{c.map(d=>o.setItem(d.key,d))}),initial:async()=>{const a=await o.getItems();return r.map(c=>{const d=a[c.key];return{...c,enabled:d?d.enabled:c.enabled}})}}},WY=r=>!(r.value==="0"||r.value==="false"),qM=(r,e)=>{if(!r.length)return()=>Promise.resolve({});const t=r.map(n=>typeof n=="string"?n:n.key);return async n=>{if(!n.hasModule("navigation"))throw Error("missing navigation module");const i=await n.requireInstance("navigation"),{isFeatureEnabled:o=WY}=e??{};return{order:-1,initial:async()=>r.filter(a=>typeof a!="string"),connect(a){const{provider:c}=a,d=new Qn,u=new Fn,h=new Fn,p=c.features$.pipe(me(v=>Object.values(v)),me(v=>v.filter(_=>t.includes(_.key)))),m=h.pipe(Up(p),me(([v,_])=>{const b=new URLSearchParams(v.search);return _.reduce((C,T)=>{const{key:A}=T;if(b.has(A)){const I=b.get(A),O=o({feature:T,value:I,path:v});C.push({key:A,enabled:O})}return C},[])}),Al(u));return d.add(m.subscribe(v=>c.toggleFeatures(v))),d.add(()=>h.complete()),d.add(i.navigator.listen(v=>{h.next(v.location)})),h.next(i.path),d}}}};var Ym,lw;class YY extends t2{constructor(){super(...arguments);Ie(this,Ym,[]);Ie(this,lw,[])}addPlugin(t){return k(this,Ym).push(t),this}enableLocalFeatures(...t){return this.addPlugin(BM(...t))}enableUrlToggle(...t){return this.addPlugin(qM(...t))}_processConfig(t,n){const i=at(k(this,Ym)).pipe(Wn(c=>c(n)),Oe(c=>Object.keys(c).length>0),zp((c,d)=>(c.push(d),c),[]),Ci(),Jf()),o=i.pipe(bs(c=>at(c.sort((d,u)=>(d.order??0)-(u.order??0))).pipe(Oe(d=>!!d.initial),bs(d=>d.initial()),zp((d,u)=>{for(const h in u)h in d&&console.warn("FeatureFlagConfigurator",`duplicate entry of ${h}`);return d.push(...u),d},[]))));return Ig({initial:o,plugins:i}).pipe(me(c=>({...t,...c})))}}Ym=new WeakMap,lw=new WeakMap;const Rv={setFeatures:nn("set_features_enabled",r=>({payload:r})),toggleFeatures:nn("toggle_features_enabled",r=>({payload:r}))},QY=r=>a2(r,e=>{e.addCase(Rv.setFeatures,(t,n)=>{for(const i of n.payload)t.features[i.key]=i}),e.addCase(Rv.toggleFeatures,(t,n)=>{const i=n.payload.filter(o=>o.key in t.features);for(const o of i){const{key:a}=o;t.features[a].enabled=!!o.enabled}})}),XY={features:{}},JY=r=>new o2(QY(r??XY)),eQ=r=>r.reduce((e,t)=>Object.assign(e,{[t.key]:t}),{});var ac,sc,Qm;class tQ{constructor(e){Ie(this,ac,new Qn);Ie(this,sc);Ie(this,Qm);const{config:t,event:n}=e;Be(this,Qm,n),Be(this,sc,JY({features:eQ(t.initial)}));for(const i of Object.values(t.plugins))i.connect&&k(this,ac).add(i.connect({provider:this}));n&&this.onFeatureToggle(({features:i})=>n.dispatchEvent("onFeatureFlagsToggled",{detail:{features:i}}))}get features(){return k(this,sc).value.features}get features$(){return k(this,sc).pipe(me(e=>e.features))}hasFeature(e){return e in this.features}setFeatures(e){k(this,sc).next(Rv.setFeatures(e))}onFeatureToggle(e){const t=this.features$.pipe(ev(),me(([n,i])=>Object.values(i).filter(o=>{var a;return o.enabled!==((a=n[o.key])==null?void 0:a.enabled)})),me(n=>({features:n}))).subscribe(e);return k(this,ac).add(t),()=>k(this,ac).remove(t)}async toggleFeature(e){return this.toggleFeatures([e])}async toggleFeatures(e){const{features:t}=k(this,sc).value,n=at(e).pipe(Qt(async i=>{var c;const o=t[i.key];if(o){if(o.readonly){console.warn(`skipped toggling flag [${o.key}], since readonly!`);return}}else{console.warn(`toggling flag [${i.key}] which is not registered`);return}const a=await((c=k(this,Qm))==null?void 0:c.dispatchEvent("onFeatureFlagToggle",{source:this,detail:{feature:o,enable:i.enabled},cancelable:!0}));if(a!=null&&a.canceled)console.debug(`skipped toggling flag [${o.key}], since aborted!`);else return i}),Oe(i=>!!i),zp((i,o)=>i.concat([o]),[]),jp(()=>{k(this,ac).remove(n)})).subscribe(i=>{k(this,sc).next(Rv.toggleFeatures(i))});k(this,ac).add(n)}getFeature(e){return this.features[e]}getFeatures(e){return Object.values(this.features).filter(e)}dispose(){k(this,ac).unsubscribe()}}ac=new WeakMap,sc=new WeakMap,Qm=new WeakMap;const rQ="featureFlag",nQ={name:rQ,configure:()=>new YY,initialize:async r=>{const e=await r.config.createConfigAsync(r),t=r.hasModule("event")?await r.requireInstance("event"):void 0;return new tQ({config:e,event:t})}},iQ=(r,e)=>{r.addConfig({module:nQ,configure:async t=>{if(e)return Promise.resolve(e(t))}})},oQ=async r=>{r.configureServiceDiscovery({client:{baseUri:"https://discovery.fusion.equinor.com/service-registry/environments/ci/services",defaultScopes:["5a842df8-3238-415d-b168-9f16a6a6031b/.default"]}}),r.configureHttpClient("app",{baseUri:new URL("/apps-proxy/",window.location.href).href,defaultScopes:["5a842df8-3238-415d-b168-9f16a6a6031b/.default"]}),r.configureMsal(e=>{e.setClientConfig({clientId:"9b707e3a-3e90-41ed-a47e-652a1e3b53d0",tenantId:"3aa4a235-b6e2-48d5-9195-7fcf05b459b0",redirectUri:"/authentication/login-callback"}),e.setRequiresAuth(!0)}),hW(r),UY(r),bB(r),DW(r,e=>{e.setSourceSystem({subSystem:"CLI",identifier:"fusion-cli",name:"Fusion CLI"})}),iQ(r,e=>{e.addPlugin(BM([{key:"fusionDebug",title:"Fusion debug log",description:"Show Fusion debug log in console"},{key:"pinkBg",title:"Use pink bg?",description:"When enabled the background should be pink"}])),e.addPlugin(qM(["fusionDebug"]))}),r.onConfigured(()=>{console.log("framework config done")}),r.onInitialized(async e=>{console.debug("📒 subscribing to all events");try{await e.http.createClient({defaultScopes:["5a842df8-3238-415d-b168-9f16a6a6031b/.default"]}).fetch("/help-proxy",{method:"OPTIONS"})}catch(t){console.error("Could not call help-proxy OPTIONS call to aquire an access token",t.message)}})},aQ="bookmarkId",sQ=r=>{const{event:e,context:t,navigation:{navigator:n}}=jl().modules;x.useLayoutEffect(()=>e.addEventListener("onBookmarkChanged",o=>{var u;const{appKey:a,context:c}=o.detail,d=r.resolveAppPath(a);if(n.location.pathname!==d){const{hash:h,search:p}=n.location,m={pathname:d,search:cQ(p),hash:h};n.push(m)}c&&((u=t.currentContext)==null?void 0:u.id)!==c.id&&t.setCurrentContextByIdAsync(c.id)}),[r,t,e,n])};function cQ(r){const e=new URLSearchParams(r);return e.delete(aQ),`?${e.toString()}`}var Uu=sR();const lQ=zu(Uu),dQ=aR({__proto__:null,default:lQ},[Uu]);/**
415
415
  * React Router v6.30.0
416
416
  *
417
417
  * Copyright (c) Remix Software Inc.
@@ -1981,8 +1981,8 @@ cursor: pointer;`),t},v2=({left:r,right:e,top:t,bottom:n})=>kr({paddingLeft:r,pa
1981
1981
  <div id="graphic">${this.renderGraphic()}</div>
1982
1982
  <div id="content">${this.renderContent()}</div>
1983
1983
  <div id="remove" @click=${this.handleRemoveOnClick}>${this.renderRemoveIcon()}</div>
1984
- </div>`}handleOnClick(e){this.clickable&&this.dispatchEvent(new PointerEvent("click",e))}handleRemoveOnClick(e){e.stopPropagation(),this.removable&&this.dispatchEvent(new PointerEvent("remove",e))}}P([ft({type:String,reflect:!0})],ha.prototype,"size",void 0);P([ft({type:String,reflect:!0})],ha.prototype,"variant",void 0);P([ft({type:String,reflect:!0})],ha.prototype,"color",void 0);P([ft({type:String})],ha.prototype,"value",void 0);P([ft({type:String,reflect:!0})],ha.prototype,"icon",void 0);P([ft({type:String})],ha.prototype,"tooltip",void 0);P([ft({type:Boolean,reflect:!0})],ha.prototype,"active",void 0);P([ft({type:Boolean,reflect:!0})],ha.prototype,"clickable",void 0);P([ft({type:Boolean,reflect:!0})],ha.prototype,"removable",void 0);P([ft({type:Boolean,reflect:!0})],ha.prototype,"disabled",void 0);ha.styles=M0e;const $0e="fwc-chip";let YA=class extends ha{};YA=P([Sr($0e)],YA);function O0e(r){return r.charAt(0).toUpperCase()+r.slice(1).toLowerCase()}const QA=r=>r.map(e=>{const t={id:e.id,title:e.title,subTitle:e.subTitle??e.type.id,graphic:e.graphic,meta:e.meta};switch(e.type.id){case"EquinorTask":return{...t,meta:e.value.taskState&&e.value.taskState!=="Active"?`<fwc-chip disabled variant="outlined" value="${e.value.taskState}" />`:""};case"OrgChart":return{...t,graphic:"list",meta:e.value.state&&e.value.state.toLowerCase()!=="active"?`<fwc-chip disabled variant="outlined" value="${O0e(e.value.state)}" />`:""};default:return t}}),ug=r=>Object.assign({id:"no-such-item",title:"Change me"},r),Z0e=()=>{const r=jl(),{currentApp:e}=r9(),t=x.useMemo(()=>(e==null?void 0:e.instance$)||Tr,[e]),[n,i]=x.useState(null),{value:o}=ks(x.useMemo(()=>(n==null?void 0:n.currentContext$)||Tr,[n])),a=x.useMemo(()=>o?QA([o]):[],[o]),c=x.useCallback(m=>{const v=m.context;i(v||null)},[]),d=x.useCallback(()=>{i(null)},[]);AM(t,c,d),x.useEffect(()=>r.modules.event.addEventListener("onReactAppLoaded",m=>{var v;if(m.detail.env.manifest.appKey===((v=r.modules.app.current)==null?void 0:v.appKey))return console.debug("useContextResolver::onReactAppLoaded","using legacy register hack method"),c(m.detail.modules)}),[r,c]);const u=x.useCallback(m=>{if(m.name==="QueryClientError")return u(m.cause);if(m.name==="FusionContextSearchError"){const v=m;return[ug({id:v.name,title:v.title,subTitle:v.description,graphic:"error_outlined",isDisabled:!0})]}return[ug({title:"Unexpected error occurred",subTitle:"Please try again or report the issue in Services@Equinor",graphic:"error_outlined",isDisabled:!0})]},[]),h=2;return{resolver:x.useMemo(()=>n&&{searchQuery:async m=>{if(m.length<h)return[ug({id:"min-length",title:`Type ${h-m.length} more chars to search`,isDisabled:!0})];try{return hr(n.queryContext(m).pipe(me(QA),me(v=>v.length?v:[ug({id:"no-results",title:"No results found",graphic:"info_circle",isDisabled:!0})]),jt(v=>(console.error("PORTAL::ContextResolver",`failed to resolve context for query ${m}`,v,v.cause),Pt(u(v))))))}catch(v){const _=v;return console.error("PORTAL::ContextResolver",`unhandled error for [${m}]`,v),u(_)}},initialResult:a},[n,a,u]),provider:n,currentContext:a}},L0e=r=>{const{resolver:e,provider:t,currentContext:[n]}=Z0e(),i=x.useCallback(a=>{if(t)if(a.type==="select"){const c=a;c.nativeEvent.detail.selected.length&&t.contextClient.setCurrentContext(c.nativeEvent.detail.selected[0].id)}else t.clearCurrentContext()},[t]),o=x.useMemo(()=>new X4({date:Date.now()}),[]);return x.useEffect(()=>{n||document.dispatchEvent(o)},[o,n]),e?E.jsx("div",{style:{flex:1,maxWidth:"480px"},children:E.jsx(E0e,{resolver:e,children:E.jsx(T0e,{id:"context-selector-cli-header",placeholder:r.placeholder??"Search for context",initialText:r.initialText??"Start typing to search",dropdownHeight:r.dropdownHeight??"300px",variant:r.variant??"header",onSelect:a=>i(a),selectTextOnFocus:!0,previewItem:n,onClearContext:i})})}):null},H0e=({scale:r=1,style:e})=>E.jsxs("svg",{viewBox:"0 0 50 35",style:{height:"1em",...e,transform:`scale(${r})`},children:[E.jsx("title",{children:"Fusion Logo"}),E.jsx("path",{d:"M0 2V23.1776L7.05405 16.1235V7.05405H16.1235L23.1776 0H2C0.895431 0 0 0.89543 0 2Z",transform:"translate(50 17.5) scale(0.92727 1.06779) rotate(135)",fill:"url(#paint0_linear)"}),E.jsx("path",{d:"M0 2V23.1776L7.05405 16.1235V7.05405H16.1235L23.1776 0H2C0.895431 0 0 0.89543 0 2Z",transform:"translate(0 17.5) scale(0.92727 1.06779) rotate(-45)",fill:"url(#paint1_linear)"}),E.jsx("path",{d:"M9.61965 36.6972L2.60087 29.6784L1.96135 22.3809L8.42623 22.9069L9.61965 36.6972Z",transform:"translate(33.8887 34.9863) scale(0.92727 -1.06779) rotate(45)",fill:"#990025"}),E.jsx("path",{d:"M7.05434 7.05434L0 0L1.21096 13.8183L7.68846 14.3818L7.05434 7.05434Z",transform:"translate(33.8887 34.9863) scale(0.92727 -1.06779) rotate(45)",fill:"#990025"}),E.jsx("path",{d:"M0 0L2.49398 29.5715L9.61965 36.6972L7.01878 7.01878L0 0Z",transform:"translate(33.8887 0.015625) scale(0.92727 1.06779) rotate(45)",fill:"#FF1243"}),E.jsxs("defs",{children:[E.jsxs("linearGradient",{id:"paint0_linear",x2:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"matrix(-13.5478 9.01983 -12.9578 -13.5478 18.0677 6.77391)",children:[E.jsx("stop",{offset:"0.508287",stopColor:"#DC002E"}),E.jsx("stop",{offset:"0.508387",stopColor:"#FF1243"})]}),E.jsxs("linearGradient",{id:"paint1_linear",x2:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"matrix(-13.5478 9.01983 -12.9578 -13.5478 18.0677 6.77391)",children:[E.jsx("stop",{offset:"0.508287",stopColor:"#DC002E"}),E.jsx("stop",{offset:"0.508387",stopColor:"#FF1243"})]})]})]}),$O=()=>jl().modules.auth.defaultAccount,XA={"Group by app":r=>r.appKey,"Created by":r=>r.createdBy.name,"Group by Context":r=>{var e;return((e=r==null?void 0:r.context)==null?void 0:e.name)??"Unknown"}},N0e=r=>{const[e,t]=x.useState(null),[n,i]=x.useState("Group by app"),o=D0e(r||[],XA[n],e,"name");return{setGroupBy:i,setSearchText:t,searchText:e,bookmarkGroups:o,groupingModes:XA,groupByKey:n}},D0e=(r,e,t,n)=>(r==null?void 0:r.map(e).filter((i,o,a)=>a.indexOf(i)===o).map(i=>({groupingProperty:i,values:r.filter(o=>e(o)===i).filter(o=>{const a=o[n];return typeof a=="string"&&t?a.includes(t):!0})})))??[];var yo={},Kf=typeof process<"u"&&yo!==void 0&&(yo.REACT_APP_SC_ATTR||yo.SC_ATTR)||"data-styled",OO="active",ZO="data-styled-version",J4="6.1.17",n9=`/*!sc*/
1985
- `,Gv=typeof window<"u"&&"HTMLElement"in window,V0e=!!(typeof SC_DISABLE_SPEEDY=="boolean"?SC_DISABLE_SPEEDY:typeof process<"u"&&yo!==void 0&&yo.REACT_APP_SC_DISABLE_SPEEDY!==void 0&&yo.REACT_APP_SC_DISABLE_SPEEDY!==""?yo.REACT_APP_SC_DISABLE_SPEEDY!=="false"&&yo.REACT_APP_SC_DISABLE_SPEEDY:typeof process<"u"&&yo!==void 0&&yo.SC_DISABLE_SPEEDY!==void 0&&yo.SC_DISABLE_SPEEDY!==""&&yo.SC_DISABLE_SPEEDY!=="false"&&yo.SC_DISABLE_SPEEDY),e5=Object.freeze([]),Gf=Object.freeze({});function F0e(r,e,t){return t===void 0&&(t=Gf),r.theme!==t.theme&&r.theme||e||t.theme}var LO=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","track","u","ul","use","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]),z0e=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,j0e=/(^-|-$)/g;function JA(r){return r.replace(z0e,"-").replace(j0e,"")}var U0e=/(a)(d)/gi,hg=52,eT=function(r){return String.fromCharCode(r+(r>25?39:97))};function W6(r){var e,t="";for(e=Math.abs(r);e>hg;e=e/hg|0)t=eT(e%hg)+t;return(eT(e%hg)+t).replace(U0e,"$1-$2")}var X_,HO=5381,Jh=function(r,e){for(var t=e.length;t;)r=33*r^e.charCodeAt(--t);return r},NO=function(r){return Jh(HO,r)};function DO(r){return W6(NO(r)>>>0)}function B0e(r){return r.displayName||r.name||"Component"}function J_(r){return typeof r=="string"&&!0}var VO=typeof Symbol=="function"&&Symbol.for,FO=VO?Symbol.for("react.memo"):60115,q0e=VO?Symbol.for("react.forward_ref"):60112,K0e={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},G0e={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},zO={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},W0e=((X_={})[q0e]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},X_[FO]=zO,X_);function tT(r){return("type"in(e=r)&&e.type.$$typeof)===FO?zO:"$$typeof"in r?W0e[r.$$typeof]:K0e;var e}var Y0e=Object.defineProperty,Q0e=Object.getOwnPropertyNames,rT=Object.getOwnPropertySymbols,X0e=Object.getOwnPropertyDescriptor,J0e=Object.getPrototypeOf,nT=Object.prototype;function jO(r,e,t){if(typeof e!="string"){if(nT){var n=J0e(e);n&&n!==nT&&jO(r,n,t)}var i=Q0e(e);rT&&(i=i.concat(rT(e)));for(var o=tT(r),a=tT(e),c=0;c<i.length;++c){var d=i[c];if(!(d in G0e||t&&t[d]||a&&d in a||o&&d in o)){var u=X0e(e,d);try{Y0e(r,d,u)}catch{}}}}return r}function Nu(r){return typeof r=="function"}function i9(r){return typeof r=="object"&&"styledComponentId"in r}function eu(r,e){return r&&e?"".concat(r," ").concat(e):r||e||""}function Y6(r,e){if(r.length===0)return"";for(var t=r[0],n=1;n<r.length;n++)t+=r[n];return t}function Em(r){return r!==null&&typeof r=="object"&&r.constructor.name===Object.name&&!("props"in r&&r.$$typeof)}function Q6(r,e,t){if(t===void 0&&(t=!1),!t&&!Em(r)&&!Array.isArray(r))return e;if(Array.isArray(e))for(var n=0;n<e.length;n++)r[n]=Q6(r[n],e[n]);else if(Em(e))for(var n in e)r[n]=Q6(r[n],e[n]);return r}function o9(r,e){Object.defineProperty(r,"toString",{value:e})}function Du(r){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];return new Error("An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#".concat(r," for more information.").concat(e.length>0?" Args: ".concat(e.join(", ")):""))}var ege=function(){function r(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}return r.prototype.indexOfGroup=function(e){for(var t=0,n=0;n<e;n++)t+=this.groupSizes[n];return t},r.prototype.insertRules=function(e,t){if(e>=this.groupSizes.length){for(var n=this.groupSizes,i=n.length,o=i;e>=o;)if((o<<=1)<0)throw Du(16,"".concat(e));this.groupSizes=new Uint32Array(o),this.groupSizes.set(n),this.length=o;for(var a=i;a<o;a++)this.groupSizes[a]=0}for(var c=this.indexOfGroup(e+1),d=(a=0,t.length);a<d;a++)this.tag.insertRule(c,t[a])&&(this.groupSizes[e]++,c++)},r.prototype.clearGroup=function(e){if(e<this.length){var t=this.groupSizes[e],n=this.indexOfGroup(e),i=n+t;this.groupSizes[e]=0;for(var o=n;o<i;o++)this.tag.deleteRule(n)}},r.prototype.getGroup=function(e){var t="";if(e>=this.length||this.groupSizes[e]===0)return t;for(var n=this.groupSizes[e],i=this.indexOfGroup(e),o=i+n,a=i;a<o;a++)t+="".concat(this.tag.getRule(a)).concat(n9);return t},r}(),jg=new Map,Wv=new Map,Ug=1,fg=function(r){if(jg.has(r))return jg.get(r);for(;Wv.has(Ug);)Ug++;var e=Ug++;return jg.set(r,e),Wv.set(e,r),e},tge=function(r,e){Ug=e+1,jg.set(r,e),Wv.set(e,r)},rge="style[".concat(Kf,"][").concat(ZO,'="').concat(J4,'"]'),nge=new RegExp("^".concat(Kf,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),ige=function(r,e,t){for(var n,i=t.split(","),o=0,a=i.length;o<a;o++)(n=i[o])&&r.registerName(e,n)},oge=function(r,e){for(var t,n=((t=e.textContent)!==null&&t!==void 0?t:"").split(n9),i=[],o=0,a=n.length;o<a;o++){var c=n[o].trim();if(c){var d=c.match(nge);if(d){var u=0|parseInt(d[1],10),h=d[2];u!==0&&(tge(h,u),ige(r,h,d[3]),r.getTag().insertRules(u,i)),i.length=0}else i.push(c)}}},iT=function(r){for(var e=document.querySelectorAll(rge),t=0,n=e.length;t<n;t++){var i=e[t];i&&i.getAttribute(Kf)!==OO&&(oge(r,i),i.parentNode&&i.parentNode.removeChild(i))}};function age(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:null}var UO=function(r){var e=document.head,t=r||e,n=document.createElement("style"),i=function(c){var d=Array.from(c.querySelectorAll("style[".concat(Kf,"]")));return d[d.length-1]}(t),o=i!==void 0?i.nextSibling:null;n.setAttribute(Kf,OO),n.setAttribute(ZO,J4);var a=age();return a&&n.setAttribute("nonce",a),t.insertBefore(n,o),n},sge=function(){function r(e){this.element=UO(e),this.element.appendChild(document.createTextNode("")),this.sheet=function(t){if(t.sheet)return t.sheet;for(var n=document.styleSheets,i=0,o=n.length;i<o;i++){var a=n[i];if(a.ownerNode===t)return a}throw Du(17)}(this.element),this.length=0}return r.prototype.insertRule=function(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch{return!1}},r.prototype.deleteRule=function(e){this.sheet.deleteRule(e),this.length--},r.prototype.getRule=function(e){var t=this.sheet.cssRules[e];return t&&t.cssText?t.cssText:""},r}(),cge=function(){function r(e){this.element=UO(e),this.nodes=this.element.childNodes,this.length=0}return r.prototype.insertRule=function(e,t){if(e<=this.length&&e>=0){var n=document.createTextNode(t);return this.element.insertBefore(n,this.nodes[e]||null),this.length++,!0}return!1},r.prototype.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},r.prototype.getRule=function(e){return e<this.length?this.nodes[e].textContent:""},r}(),lge=function(){function r(e){this.rules=[],this.length=0}return r.prototype.insertRule=function(e,t){return e<=this.length&&(this.rules.splice(e,0,t),this.length++,!0)},r.prototype.deleteRule=function(e){this.rules.splice(e,1),this.length--},r.prototype.getRule=function(e){return e<this.length?this.rules[e]:""},r}(),oT=Gv,dge={isServer:!Gv,useCSSOMInjection:!V0e},BO=function(){function r(e,t,n){e===void 0&&(e=Gf),t===void 0&&(t={});var i=this;this.options=_r(_r({},dge),e),this.gs=t,this.names=new Map(n),this.server=!!e.isServer,!this.server&&Gv&&oT&&(oT=!1,iT(this)),o9(this,function(){return function(o){for(var a=o.getTag(),c=a.length,d="",u=function(p){var m=function(T){return Wv.get(T)}(p);if(m===void 0)return"continue";var v=o.names.get(m),_=a.getGroup(p);if(v===void 0||!v.size||_.length===0)return"continue";var b="".concat(Kf,".g").concat(p,'[id="').concat(m,'"]'),C="";v!==void 0&&v.forEach(function(T){T.length>0&&(C+="".concat(T,","))}),d+="".concat(_).concat(b,'{content:"').concat(C,'"}').concat(n9)},h=0;h<c;h++)u(h);return d}(i)})}return r.registerId=function(e){return fg(e)},r.prototype.rehydrate=function(){!this.server&&Gv&&iT(this)},r.prototype.reconstructWithOptions=function(e,t){return t===void 0&&(t=!0),new r(_r(_r({},this.options),e),this.gs,t&&this.names||void 0)},r.prototype.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},r.prototype.getTag=function(){return this.tag||(this.tag=(e=function(t){var n=t.useCSSOMInjection,i=t.target;return t.isServer?new lge(i):n?new sge(i):new cge(i)}(this.options),new ege(e)));var e},r.prototype.hasNameForId=function(e,t){return this.names.has(e)&&this.names.get(e).has(t)},r.prototype.registerName=function(e,t){if(fg(e),this.names.has(e))this.names.get(e).add(t);else{var n=new Set;n.add(t),this.names.set(e,n)}},r.prototype.insertRules=function(e,t,n){this.registerName(e,t),this.getTag().insertRules(fg(e),n)},r.prototype.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},r.prototype.clearRules=function(e){this.getTag().clearGroup(fg(e)),this.clearNames(e)},r.prototype.clearTag=function(){this.tag=void 0},r}(),uge=/&/g,hge=/^\s*\/\/.*$/gm;function qO(r,e){return r.map(function(t){return t.type==="rule"&&(t.value="".concat(e," ").concat(t.value),t.value=t.value.replaceAll(",",",".concat(e," ")),t.props=t.props.map(function(n){return"".concat(e," ").concat(n)})),Array.isArray(t.children)&&t.type!=="@keyframes"&&(t.children=qO(t.children,e)),t})}function fge(r){var e,t,n,i=Gf,o=i.options,a=o===void 0?Gf:o,c=i.plugins,d=c===void 0?e5:c,u=function(m,v,_){return _.startsWith(t)&&_.endsWith(t)&&_.replaceAll(t,"").length>0?".".concat(e):m},h=d.slice();h.push(function(m){m.type===g2&&m.value.includes("&")&&(m.props[0]=m.props[0].replace(uge,t).replace(n,u))}),a.prefix&&h.push(l$),h.push(a$);var p=function(m,v,_,b){v===void 0&&(v=""),_===void 0&&(_=""),b===void 0&&(b="&"),e=b,t=v,n=new RegExp("\\".concat(t,"\\b"),"g");var C=m.replace(hge,""),T=i$(_||v?"".concat(_," ").concat(v," { ").concat(C," }"):C);a.namespace&&(T=qO(T,a.namespace));var A=[];return gm(T,s$(h.concat(c$(function(I){return A.push(I)})))),A};return p.hash=d.length?d.reduce(function(m,v){return v.name||Du(15),Jh(m,v.name)},HO).toString():"",p}var pge=new BO,X6=fge(),KO=lr.createContext({shouldForwardProp:void 0,styleSheet:pge,stylis:X6});KO.Consumer;lr.createContext(void 0);function aT(){return x.useContext(KO)}var GO=function(){function r(e,t){var n=this;this.inject=function(i,o){o===void 0&&(o=X6);var a=n.name+o.hash;i.hasNameForId(n.id,a)||i.insertRules(n.id,a,o(n.rules,a,"@keyframes"))},this.name=e,this.id="sc-keyframes-".concat(e),this.rules=t,o9(this,function(){throw Du(12,String(n.name))})}return r.prototype.getName=function(e){return e===void 0&&(e=X6),this.name+e.hash},r}(),mge=function(r){return r>="A"&&r<="Z"};function sT(r){for(var e="",t=0;t<r.length;t++){var n=r[t];if(t===1&&n==="-"&&r[0]==="-")return r;mge(n)?e+="-"+n.toLowerCase():e+=n}return e.startsWith("ms-")?"-"+e:e}var WO=function(r){return r==null||r===!1||r===""},YO=function(r){var e,t,n=[];for(var i in r){var o=r[i];r.hasOwnProperty(i)&&!WO(o)&&(Array.isArray(o)&&o.isCss||Nu(o)?n.push("".concat(sT(i),":"),o,";"):Em(o)?n.push.apply(n,kc(kc(["".concat(i," {")],YO(o),!1),["}"],!1)):n.push("".concat(sT(i),": ").concat((e=i,(t=o)==null||typeof t=="boolean"||t===""?"":typeof t!="number"||t===0||e in d$||e.startsWith("--")?String(t).trim():"".concat(t,"px")),";")))}return n};function xu(r,e,t,n){if(WO(r))return[];if(i9(r))return[".".concat(r.styledComponentId)];if(Nu(r)){if(!Nu(o=r)||o.prototype&&o.prototype.isReactComponent||!e)return[r];var i=r(e);return xu(i,e,t,n)}var o;return r instanceof GO?t?(r.inject(t,n),[r.getName(n)]):[r]:Em(r)?YO(r):Array.isArray(r)?Array.prototype.concat.apply(e5,r.map(function(a){return xu(a,e,t,n)})):[r.toString()]}function gge(r){for(var e=0;e<r.length;e+=1){var t=r[e];if(Nu(t)&&!i9(t))return!1}return!0}var vge=NO(J4),yge=function(){function r(e,t,n){this.rules=e,this.staticRulesId="",this.isStatic=(n===void 0||n.isStatic)&&gge(e),this.componentId=t,this.baseHash=Jh(vge,t),this.baseStyle=n,BO.registerId(t)}return r.prototype.generateAndInjectStyles=function(e,t,n){var i=this.baseStyle?this.baseStyle.generateAndInjectStyles(e,t,n):"";if(this.isStatic&&!n.hash)if(this.staticRulesId&&t.hasNameForId(this.componentId,this.staticRulesId))i=eu(i,this.staticRulesId);else{var o=Y6(xu(this.rules,e,t,n)),a=W6(Jh(this.baseHash,o)>>>0);if(!t.hasNameForId(this.componentId,a)){var c=n(o,".".concat(a),void 0,this.componentId);t.insertRules(this.componentId,a,c)}i=eu(i,a),this.staticRulesId=a}else{for(var d=Jh(this.baseHash,n.hash),u="",h=0;h<this.rules.length;h++){var p=this.rules[h];if(typeof p=="string")u+=p;else if(p){var m=Y6(xu(p,e,t,n));d=Jh(d,m+h),u+=m}}if(u){var v=W6(d>>>0);t.hasNameForId(this.componentId,v)||t.insertRules(this.componentId,v,n(u,".".concat(v),void 0,this.componentId)),i=eu(i,v)}}return i},r}(),Yv=lr.createContext(void 0);Yv.Consumer;function l1(r){var e=lr.useContext(Yv),t=x.useMemo(function(){return function(n,i){if(!n)throw Du(14);if(Nu(n)){var o=n(i);return o}if(Array.isArray(n)||typeof n!="object")throw Du(8);return i?_r(_r({},i),n):n}(r.theme,e)},[r.theme,e]);return r.children?lr.createElement(Yv.Provider,{value:t},r.children):null}var eb={};function _ge(r,e,t){var n=i9(r),i=r,o=!J_(r),a=e.attrs,c=a===void 0?e5:a,d=e.componentId,u=d===void 0?function(O,B){var z=typeof O!="string"?"sc":JA(O);eb[z]=(eb[z]||0)+1;var R="".concat(z,"-").concat(DO(J4+z+eb[z]));return B?"".concat(B,"-").concat(R):R}(e.displayName,e.parentComponentId):d,h=e.displayName,p=h===void 0?function(O){return J_(O)?"styled.".concat(O):"Styled(".concat(B0e(O),")")}(r):h,m=e.displayName&&e.componentId?"".concat(JA(e.displayName),"-").concat(e.componentId):e.componentId||u,v=n&&i.attrs?i.attrs.concat(c).filter(Boolean):c,_=e.shouldForwardProp;if(n&&i.shouldForwardProp){var b=i.shouldForwardProp;if(e.shouldForwardProp){var C=e.shouldForwardProp;_=function(O,B){return b(O,B)&&C(O,B)}}else _=b}var T=new yge(t,m,n?i.componentStyle:void 0);function A(O,B){return function(z,R,Y){var ue=z.attrs,le=z.componentStyle,Te=z.defaultProps,ke=z.foldedComponentIds,xe=z.styledComponentId,X=z.target,q=lr.useContext(Yv),re=aT(),W=z.shouldForwardProp||re.shouldForwardProp,$=F0e(R,q,Te)||Gf,L=function(Ee,Ae,Xe){for(var lt,xt=_r(_r({},Ae),{className:void 0,theme:Xe}),wr=0;wr<Ee.length;wr+=1){var Gr=Nu(lt=Ee[wr])?lt(xt):lt;for(var Mt in Gr)xt[Mt]=Mt==="className"?eu(xt[Mt],Gr[Mt]):Mt==="style"?_r(_r({},xt[Mt]),Gr[Mt]):Gr[Mt]}return Ae.className&&(xt.className=eu(xt.className,Ae.className)),xt}(ue,R,$),D=L.as||X,Z={};for(var N in L)L[N]===void 0||N[0]==="$"||N==="as"||N==="theme"&&L.theme===$||(N==="forwardedAs"?Z.as=L.forwardedAs:W&&!W(N,D)||(Z[N]=L[N]));var ae=function(Ee,Ae){var Xe=aT(),lt=Ee.generateAndInjectStyles(Ae,Xe.styleSheet,Xe.stylis);return lt}(le,L),He=eu(ke,xe);return ae&&(He+=" "+ae),L.className&&(He+=" "+L.className),Z[J_(D)&&!LO.has(D)?"class":"className"]=He,Y&&(Z.ref=Y),x.createElement(D,Z)}(I,O,B)}A.displayName=p;var I=lr.forwardRef(A);return I.attrs=v,I.componentStyle=T,I.displayName=p,I.shouldForwardProp=_,I.foldedComponentIds=n?eu(i.foldedComponentIds,i.styledComponentId):"",I.styledComponentId=m,I.target=n?i.target:r,Object.defineProperty(I,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(O){this._foldedDefaultProps=n?function(B){for(var z=[],R=1;R<arguments.length;R++)z[R-1]=arguments[R];for(var Y=0,ue=z;Y<ue.length;Y++)Q6(B,ue[Y],!0);return B}({},i.defaultProps,O):O}}),o9(I,function(){return".".concat(I.styledComponentId)}),o&&jO(I,r,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),I}function cT(r,e){for(var t=[r[0]],n=0,i=e.length;n<i;n+=1)t.push(e[n],r[n+1]);return t}var lT=function(r){return Object.assign(r,{isCss:!0})};function Nt(r){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];if(Nu(r)||Em(r))return lT(xu(cT(e5,kc([r],e,!0))));var n=r;return e.length===0&&n.length===1&&typeof n[0]=="string"?xu(n):lT(xu(cT(n,e)))}function J6(r,e,t){if(t===void 0&&(t=Gf),!e)throw Du(1,e);var n=function(i){for(var o=[],a=1;a<arguments.length;a++)o[a-1]=arguments[a];return r(e,t,Nt.apply(void 0,kc([i],o,!1)))};return n.attrs=function(i){return J6(r,e,_r(_r({},t),{attrs:Array.prototype.concat(t.attrs,i).filter(Boolean)}))},n.withConfig=function(i){return J6(r,e,_r(_r({},t),i))},n}var QO=function(r){return J6(_ge,r)},Ve=QO;LO.forEach(function(r){Ve[r]=QO(r)});function bge(r){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];var n=Y6(Nt.apply(void 0,kc([r],e,!1))),i=DO(n);return new GO(i,n)}const{typography:{navigation:{button:tb}},colors:{interactive:{disabled__text:{rgba:wge},disabled__border:{rgba:xge},disabled__fill:{rgba:Cge}}},spacings:{comfortable:{medium:dT}},shape:{button:{minHeight:uT,borderRadius:hT},_modes:{compact:{button:{minHeight:fT}}}},interactions:{focused:pT},clickbounds:{default__base:mT,compact__standard:gT}}=tt,t5={background:"transparent",height:`var(--eds_button__height, ${uT})`,typography:{...tb,textAlign:"center",fontSize:`var(--eds_button__font_size, ${tb.fontSize})`},border:{type:"border",width:"var(--eds_button__border_width, 1px)",color:"transparent",radius:`var(--eds_button__radius, ${hT})`,style:"solid"},spacings:{top:"var(--eds_button__padding_y, 0)",bottom:"var(--eds_button__padding_y, 0)",left:`var(--eds_button__padding_x, ${dT})`,right:`var(--eds_button__padding_x, ${dT})`},clickbound:{height:mT,width:"100%",offset:{top:`${(parseInt(mT)-parseInt(uT))/2+1}px`,left:"0"}},entities:{icon:{height:"var(--eds_button__icon__size, 24px)",width:"var(--eds_button__icon__size, 24px)"}},states:{hover:{border:{type:"border",width:"1px",color:"transparent",radius:`var(--eds_button__radius, ${hT})`,style:"solid"}},focus:{outline:{type:"outline",offset:"3px",style:"dashed",color:pT.color,width:pT.width}},disabled:{background:Cge,border:{type:"border",width:"1px",color:xge,style:"solid"},typography:{...tb,color:wge,textAlign:"center"}}},modes:{compact:{height:`var(--eds_button__height_compact, ${fT})`,spacings:{top:"var(--eds_button__padding_y_compact, 0)",bottom:"var(--eds_button__padding_y_compact, 0)"},clickbound:{height:gT,width:"100%",offset:{top:`${(parseInt(gT)-parseInt(fT))/2+1}px`,left:"0"}}}}};function Jr(r){return r!=null&&typeof r=="object"&&r["@@functional/placeholder"]===!0}function tu(r){return function e(t){return arguments.length===0||Jr(t)?e:r.apply(this,arguments)}}function Nd(r){return function e(t,n){switch(arguments.length){case 0:return e;case 1:return Jr(t)?e:tu(function(i){return r(t,i)});default:return Jr(t)&&Jr(n)?e:Jr(t)?tu(function(i){return r(i,n)}):Jr(n)?tu(function(i){return r(t,i)}):r(t,n)}}}function XO(r){return function e(t,n,i){switch(arguments.length){case 0:return e;case 1:return Jr(t)?e:Nd(function(o,a){return r(t,o,a)});case 2:return Jr(t)&&Jr(n)?e:Jr(t)?Nd(function(o,a){return r(o,n,a)}):Jr(n)?Nd(function(o,a){return r(t,o,a)}):tu(function(o){return r(t,n,o)});default:return Jr(t)&&Jr(n)&&Jr(i)?e:Jr(t)&&Jr(n)?Nd(function(o,a){return r(o,a,i)}):Jr(t)&&Jr(i)?Nd(function(o,a){return r(o,n,a)}):Jr(n)&&Jr(i)?Nd(function(o,a){return r(t,o,a)}):Jr(t)?tu(function(o){return r(o,n,i)}):Jr(n)?tu(function(o){return r(t,o,i)}):Jr(i)?tu(function(o){return r(t,n,o)}):r(t,n,i)}}}function vT(r){return Object.prototype.toString.call(r)==="[object Object]"}function pg(r,e){return Object.prototype.hasOwnProperty.call(e,r)}var kge=XO(function(e,t,n){var i={},o;t=t||{},n=n||{};for(o in t)pg(o,t)&&(i[o]=pg(o,n)?e(o,t[o],n[o]):t[o]);for(o in n)pg(o,n)&&!pg(o,i)&&(i[o]=n[o]);return i}),Ege=XO(function r(e,t,n){return kge(function(i,o,a){return vT(o)&&vT(a)?r(e,o,a):e(i,o,a)},t,n)}),vn=Nd(function(e,t){return Ege(function(n,i,o){return o},e,t)});const{colors:{text:{static_icons__primary_white:{rgba:Sge}},interactive:{primary__resting:{rgba:yT},primary__hover:{rgba:Age},secondary__resting:{rgba:_T},secondary__link_hover:{rgba:bT},danger__resting:{rgba:wT},danger__hover:{rgba:xT}}},shape:{button:{borderRadius:Tge}}}=tt,r5=vn(t5,{background:yT,typography:{color:Sge},border:{type:"border",style:"solid",width:"1px",color:yT,radius:`var(--eds_button__radius, ${Tge})`},states:{hover:{background:Age}}}),JO=vn(r5,{background:_T,border:{color:_T},states:{hover:{background:bT,border:{color:bT}}}}),eZ=vn(r5,{background:wT,border:{color:wT},states:{hover:{background:xT,border:{color:xT}}}}),{colors:{interactive:{primary__resting:{rgba:CT},primary__hover:{rgba:kT},primary__hover_alt:{rgba:Ige},secondary__resting:{rgba:ET},secondary__link_hover:{rgba:ST},secondary__highlight:{rgba:Rge},danger__resting:{rgba:AT},danger__hover:{rgba:TT},danger__highlight:{rgba:Pge}}},shape:{button:{borderRadius:Mge}}}=tt,a9=vn(t5,{typography:{color:CT},border:{type:"border",style:"solid",width:"1px",color:CT,radius:`var(--eds_button__radius, ${Mge})`},states:{hover:{typography:{color:kT},background:Ige,border:{style:"solid",type:"border",width:"1px",color:kT}},disabled:{background:"transparent"}}}),$ge=vn(a9,{typography:{color:ET},border:{color:ET},states:{hover:{background:Rge,typography:{color:ST},border:{color:ST}}}}),Oge=vn(a9,{typography:{color:AT},border:{color:AT},states:{hover:{background:Pge,typography:{color:TT},border:{color:TT}}}}),{colors:{interactive:{primary__resting:{rgba:Zge},primary__hover:{rgba:Lge},primary__hover_alt:{rgba:Hge},secondary__resting:{rgba:Nge},secondary__link_hover:{rgba:Dge},secondary__highlight:{rgba:Vge},danger__resting:{rgba:Fge},danger__hover:{rgba:zge},danger__highlight:{rgba:jge}}}}=tt,s9=vn(t5,{typography:{color:Zge},states:{hover:{background:Hge,typography:{color:Lge}},disabled:{background:"transparent",border:{color:"transparent"}}}}),Uge=vn(s9,{typography:{color:Nge},states:{hover:{background:Vge,typography:{color:Dge}}}}),Bge=vn(s9,{typography:{color:Fge},states:{hover:{background:jge,typography:{color:zge}}}}),{colors:{interactive:{primary__resting:{rgba:qge},primary__hover_alt:{rgba:Kge},secondary__resting:{rgba:Gge},secondary__link_hover:{rgba:Wge},secondary__highlight:{rgba:Yge},danger__resting:{rgba:Qge},danger__hover:{rgba:Xge},danger__highlight:{rgba:Jge}}},clickbounds:{default__base:rb,compact__standard:IT},shape:Pd,interactions:{focused:{width:eve}}}=tt,c9=vn(t5,{height:Pd.icon_button.minHeight,width:Pd.icon_button.minWidth,typography:{color:qge},border:{width:"0px",radius:"50%"},background:"transparent",spacings:{left:"0",right:"0"},clickbound:{width:rb,offset:{top:`${(parseInt(rb)-parseInt(Pd.icon_button.minWidth))/2}px`,left:`${(parseInt(rb)-parseInt(Pd.icon_button.minWidth))/2}px`}},states:{hover:{background:Kge,border:{width:"0px",radius:"50%"}},disabled:{background:"transparent",border:{color:"transparent"}},focus:{outline:{offset:`-${parseInt(eve)}px`}}},modes:{compact:{height:Pd._modes.compact.icon_button.minHeight,width:Pd._modes.compact.icon_button.minWidth,clickbound:{width:IT,offset:{top:"0",left:`${(parseInt(IT)-parseInt(Pd._modes.compact.icon_button.minWidth))/2}px`}}}}}),tve=vn(c9,{typography:{color:Gge},states:{hover:{background:Yge,typography:{color:Wge}}}}),rve=vn(c9,{typography:{color:Qge},states:{hover:{background:Jge,typography:{color:Xge}}}}),{clickbounds:{default__base:nb,compact__standard:RT},shape:Md}=tt,l9={height:Md.icon_button.minHeight,width:Md.icon_button.minWidth,border:{width:"0px",radius:"50%"},spacings:{left:"0",right:"0"},clickbound:{width:nb,offset:{top:`${(parseInt(nb)-parseInt(Md.icon_button.minWidth))/2}px`,left:`${(parseInt(nb)-parseInt(Md.icon_button.minWidth))/2}px`}},states:{hover:{border:{width:"0px",radius:"50%"}}},modes:{compact:{height:Md._modes.compact.icon_button.minHeight,width:Md._modes.compact.icon_button.minWidth,clickbound:{width:RT,offset:{top:"0",left:`${(parseInt(RT)-parseInt(Md._modes.compact.icon_button.minWidth))/2}px`}}}}},nve=vn(r5,l9),ive=vn(JO,l9),ove=vn(eZ,l9),ib={primary:{contained:r5,outlined:a9,ghost:s9,ghost_icon:c9,contained_icon:nve},secondary:{contained:JO,outlined:$ge,ghost:Uge,ghost_icon:tve,contained_icon:ive},danger:{contained:eZ,outlined:Oge,ghost:Bge,ghost_icon:rve,contained_icon:ove}},ew=(r,e)=>{x.useEffect(()=>{const t=n=>{const{key:i}=n;switch(i){case r:e(n);break}};return document.addEventListener("keydown",t,!0),()=>{document.removeEventListener("keydown",t,!0)}},[r,e])};let ave=0;const tw=(r,e)=>{const[t,n]=x.useState(r),i=r||t;return x.useEffect(()=>{t==null&&n(`eds-${e?e+"-":""}${ave++}`)},[t,e]),i},sve=(r,e)=>{x.useEffect(()=>{const t=()=>{r.style.height="auto";const{scrollHeight:n,clientHeight:i}=r;let o=i;e>o&&(o=Math.min(e,Math.max(n,o)),n>e?r.style.overflow="auto":r.style.overflow="hidden",o>i&&(r.style.height=`${o}px`))};return r&&e&&(t(),r.addEventListener("keyup",t,!0)),()=>{r==null||r.removeEventListener("keyup",t,!0)}},[r,e])},PT=typeof window<"u"?x.useLayoutEffect:x.useEffect;function en(r){return r!=null&&typeof r=="object"&&r["@@functional/placeholder"]===!0}function ru(r){return function e(t){return arguments.length===0||en(t)?e:r.apply(this,arguments)}}function Dd(r){return function e(t,n){switch(arguments.length){case 0:return e;case 1:return en(t)?e:ru(function(i){return r(t,i)});default:return en(t)&&en(n)?e:en(t)?ru(function(i){return r(i,n)}):en(n)?ru(function(i){return r(t,i)}):r(t,n)}}}function tZ(r){return function e(t,n,i){switch(arguments.length){case 0:return e;case 1:return en(t)?e:Dd(function(o,a){return r(t,o,a)});case 2:return en(t)&&en(n)?e:en(t)?Dd(function(o,a){return r(o,n,a)}):en(n)?Dd(function(o,a){return r(t,o,a)}):ru(function(o){return r(t,n,o)});default:return en(t)&&en(n)&&en(i)?e:en(t)&&en(n)?Dd(function(o,a){return r(o,a,i)}):en(t)&&en(i)?Dd(function(o,a){return r(o,n,a)}):en(n)&&en(i)?Dd(function(o,a){return r(t,o,a)}):en(t)?ru(function(o){return r(o,n,i)}):en(n)?ru(function(o){return r(t,o,i)}):en(i)?ru(function(o){return r(t,n,o)}):r(t,n,i)}}}function MT(r){return Object.prototype.toString.call(r)==="[object Object]"}function mg(r,e){return Object.prototype.hasOwnProperty.call(e,r)}var cve=tZ(function(e,t,n){var i={},o;t=t||{},n=n||{};for(o in t)mg(o,t)&&(i[o]=mg(o,n)?e(o,t[o],n[o]):t[o]);for(o in n)mg(o,n)&&!mg(o,i)&&(i[o]=n[o]);return i}),lve=tZ(function r(e,t,n){return cve(function(i,o,a){return MT(o)&&MT(a)?r(e,o,a):e(i,o,a)},t,n)}),dve=Dd(function(e,t){return lve(function(n,i,o){return o},e,t)});const Gu=(r,e)=>x.useCallback(()=>{const{density:t}=r;return t==="compact"?dve(e,e.modes.compact):e},[r,e]),Qi={count:0,originalOverflow:"",originalPaddingRight:""},uve=r=>{const e=x.useRef(!1);x.useEffect(()=>{if(typeof document>"u")return;const{body:t}=document,n=document.documentElement;if(r&&!e.current){if(e.current=!0,Qi.count===0){Qi.originalOverflow=t.style.overflow||"",Qi.originalPaddingRight=t.style.paddingRight||"";const i=window.innerWidth-n.clientWidth,o=parseInt(window.getComputedStyle(t).getPropertyValue("padding-right"))||0;t.style.overflow="hidden",t.style.paddingRight=`${o+i}px`}Qi.count+=1}else!r&&e.current&&(e.current=!1,Qi.count=Math.max(0,Qi.count-1),Qi.count===0&&(t.style.overflow=Qi.originalOverflow,t.style.paddingRight=Qi.originalPaddingRight));return()=>{e.current&&(e.current=!1,Qi.count=Math.max(0,Qi.count-1),Qi.count===0&&(t.style.overflow=Qi.originalOverflow,t.style.paddingRight=Qi.originalPaddingRight))}},[r])},Vu=(...r)=>e=>r.forEach(t=>{typeof t=="function"?t(e):t&&typeof t=="object"&&(t.current=e)}),hve=(r,e)=>{const t=r.value;r.value=e;const n=r._valueTracker;typeof n<"u"&&n.setValue(t),r.dispatchEvent(new Event("change",{bubbles:!0}))},zh=r=>{if(!r)return;const{width:e="",style:t="",color:n=""}=r;return e?`${e} ${t} ${n}`:null},Ol=r=>{var e,t,n,i;if(!r)return Nt({});switch(r.type){case"border":return Nt({border:zh(r),borderRadius:r.radius});case"bordergroup":return Nt({borderBottom:zh(r.bottom),borderTop:zh(r.top),borderLeft:zh(r.left),borderRight:zh(r.right),borderBottomLeftRadius:(e=r==null?void 0:r.left)==null?void 0:e.radius,borderTopLeftRadius:(t=r==null?void 0:r.left)==null?void 0:t.radius,borderBottomRightRadius:(n=r==null?void 0:r.right)==null?void 0:n.radius,borderTopRightRadius:(i=r==null?void 0:r.right)==null?void 0:i.radius});default:return Nt({})}},{colors:{interactive:{focus:{rgba:fve}}}}=tt,Sc=r=>{const{color:e=fve,style:t="dashed",width:n="2px",offset:i="0px",type:o}=r,a={color:e,style:t,width:n,offset:i};return Nt({outline:zh(a),outlineOffset:a.offset})},Fa=(r,e)=>{if(!r)return"";let t=`
1984
+ </div>`}handleOnClick(e){this.clickable&&this.dispatchEvent(new PointerEvent("click",e))}handleRemoveOnClick(e){e.stopPropagation(),this.removable&&this.dispatchEvent(new PointerEvent("remove",e))}}P([ft({type:String,reflect:!0})],ha.prototype,"size",void 0);P([ft({type:String,reflect:!0})],ha.prototype,"variant",void 0);P([ft({type:String,reflect:!0})],ha.prototype,"color",void 0);P([ft({type:String})],ha.prototype,"value",void 0);P([ft({type:String,reflect:!0})],ha.prototype,"icon",void 0);P([ft({type:String})],ha.prototype,"tooltip",void 0);P([ft({type:Boolean,reflect:!0})],ha.prototype,"active",void 0);P([ft({type:Boolean,reflect:!0})],ha.prototype,"clickable",void 0);P([ft({type:Boolean,reflect:!0})],ha.prototype,"removable",void 0);P([ft({type:Boolean,reflect:!0})],ha.prototype,"disabled",void 0);ha.styles=M0e;const $0e="fwc-chip";let YA=class extends ha{};YA=P([Sr($0e)],YA);function O0e(r){return r.charAt(0).toUpperCase()+r.slice(1).toLowerCase()}function Z0e(r){return r===void 0?{}:typeof r=="string"?{graphicType:r.startsWith("<")?"inline-html":"eds",graphic:r}:r.type==="svg"?{graphicType:"inline-svg",graphic:r.content}:{graphicType:"inline-html",graphic:r.content}}function L0e(r){return r===void 0?{}:typeof r=="string"?{metaType:r.startsWith("<")?"inline-html":"eds",meta:r}:r.type==="svg"?{metaType:"inline-svg",meta:r.content}:{metaType:"inline-html",meta:r.content}}const QA=r=>r.map(e=>{const t={id:e.id,title:e.title,subTitle:e.subTitle??e.type.id,...Z0e(e.graphic),...L0e(e.meta)},n=!!(e.value.taskState&&e.value.taskState.toLowerCase()!=="active");return e.type.id==="EquinorTask"&&n&&(t.meta=`<fwc-chip disabled variant="outlined" value="${e.value.taskState}" />`,t.metaType="inline-html"),e.type.id==="OrgChart"&&(t.graphic="list",t.graphicType="eds",e.value.state&&e.value.state.toLowerCase()!=="active"&&(t.meta=`<fwc-chip disabled variant="outlined" value="${O0e(e.value.state??"")}" />`,t.metaType="inline-html")),t}),ug=r=>Object.assign({id:"no-such-item",title:"Change me"},r),H0e=()=>{const r=jl(),{currentApp:e}=r9(),t=x.useMemo(()=>(e==null?void 0:e.instance$)||Tr,[e]),[n,i]=x.useState(null),{value:o}=ks(x.useMemo(()=>(n==null?void 0:n.currentContext$)||Tr,[n])),a=x.useMemo(()=>o?QA([o]):[],[o]),c=x.useCallback(m=>{const v=m.context;i(v||null)},[]),d=x.useCallback(()=>{i(null)},[]);AM(t,c,d),x.useEffect(()=>r.modules.event.addEventListener("onReactAppLoaded",m=>{var v;if(m.detail.env.manifest.appKey===((v=r.modules.app.current)==null?void 0:v.appKey))return console.debug("useContextResolver::onReactAppLoaded","using legacy register hack method"),c(m.detail.modules)}),[r,c]);const u=x.useCallback(m=>{if(m.name==="QueryClientError")return u(m.cause);if(m.name==="FusionContextSearchError"){const v=m;return[ug({id:v.name,title:v.title,subTitle:v.description,graphic:"error_outlined",isDisabled:!0})]}return[ug({title:"Unexpected error occurred",subTitle:"Please try again or report the issue in Services@Equinor",graphic:"error_outlined",isDisabled:!0})]},[]),h=2;return{resolver:x.useMemo(()=>n&&{searchQuery:async m=>{if(m.length<h)return[ug({id:"min-length",title:`Type ${h-m.length} more chars to search`,isDisabled:!0})];try{return hr(n.queryContext(m).pipe(me(QA),me(v=>v.length?v:[ug({id:"no-results",title:"No results found",graphic:"info_circle",isDisabled:!0})]),jt(v=>(console.error("PORTAL::ContextResolver",`failed to resolve context for query ${m}`,v,v.cause),Pt(u(v))))))}catch(v){const _=v;return console.error("PORTAL::ContextResolver",`unhandled error for [${m}]`,v),u(_)}},initialResult:a},[n,a,u]),provider:n,currentContext:a}},N0e=r=>{const{resolver:e,provider:t,currentContext:[n]}=H0e(),i=x.useCallback(a=>{if(t)if(a.type==="select"){const c=a;c.nativeEvent.detail.selected.length&&t.contextClient.setCurrentContext(c.nativeEvent.detail.selected[0].id)}else t.clearCurrentContext()},[t]),o=x.useMemo(()=>new X4({date:Date.now()}),[]);return x.useEffect(()=>{n||document.dispatchEvent(o)},[o,n]),e?E.jsx("div",{style:{flex:1,maxWidth:"480px"},children:E.jsx(E0e,{resolver:e,children:E.jsx(T0e,{id:"context-selector-cli-header",placeholder:r.placeholder??"Search for context",initialText:r.initialText??"Start typing to search",dropdownHeight:r.dropdownHeight??"300px",variant:r.variant??"header",onSelect:a=>i(a),selectTextOnFocus:!0,previewItem:n,onClearContext:i})})}):null},D0e=({scale:r=1,style:e})=>E.jsxs("svg",{viewBox:"0 0 50 35",style:{height:"1em",...e,transform:`scale(${r})`},children:[E.jsx("title",{children:"Fusion Logo"}),E.jsx("path",{d:"M0 2V23.1776L7.05405 16.1235V7.05405H16.1235L23.1776 0H2C0.895431 0 0 0.89543 0 2Z",transform:"translate(50 17.5) scale(0.92727 1.06779) rotate(135)",fill:"url(#paint0_linear)"}),E.jsx("path",{d:"M0 2V23.1776L7.05405 16.1235V7.05405H16.1235L23.1776 0H2C0.895431 0 0 0.89543 0 2Z",transform:"translate(0 17.5) scale(0.92727 1.06779) rotate(-45)",fill:"url(#paint1_linear)"}),E.jsx("path",{d:"M9.61965 36.6972L2.60087 29.6784L1.96135 22.3809L8.42623 22.9069L9.61965 36.6972Z",transform:"translate(33.8887 34.9863) scale(0.92727 -1.06779) rotate(45)",fill:"#990025"}),E.jsx("path",{d:"M7.05434 7.05434L0 0L1.21096 13.8183L7.68846 14.3818L7.05434 7.05434Z",transform:"translate(33.8887 34.9863) scale(0.92727 -1.06779) rotate(45)",fill:"#990025"}),E.jsx("path",{d:"M0 0L2.49398 29.5715L9.61965 36.6972L7.01878 7.01878L0 0Z",transform:"translate(33.8887 0.015625) scale(0.92727 1.06779) rotate(45)",fill:"#FF1243"}),E.jsxs("defs",{children:[E.jsxs("linearGradient",{id:"paint0_linear",x2:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"matrix(-13.5478 9.01983 -12.9578 -13.5478 18.0677 6.77391)",children:[E.jsx("stop",{offset:"0.508287",stopColor:"#DC002E"}),E.jsx("stop",{offset:"0.508387",stopColor:"#FF1243"})]}),E.jsxs("linearGradient",{id:"paint1_linear",x2:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"matrix(-13.5478 9.01983 -12.9578 -13.5478 18.0677 6.77391)",children:[E.jsx("stop",{offset:"0.508287",stopColor:"#DC002E"}),E.jsx("stop",{offset:"0.508387",stopColor:"#FF1243"})]})]})]}),$O=()=>jl().modules.auth.defaultAccount,XA={"Group by app":r=>r.appKey,"Created by":r=>r.createdBy.name,"Group by Context":r=>{var e;return((e=r==null?void 0:r.context)==null?void 0:e.name)??"Unknown"}},V0e=r=>{const[e,t]=x.useState(null),[n,i]=x.useState("Group by app"),o=F0e(r||[],XA[n],e,"name");return{setGroupBy:i,setSearchText:t,searchText:e,bookmarkGroups:o,groupingModes:XA,groupByKey:n}},F0e=(r,e,t,n)=>(r==null?void 0:r.map(e).filter((i,o,a)=>a.indexOf(i)===o).map(i=>({groupingProperty:i,values:r.filter(o=>e(o)===i).filter(o=>{const a=o[n];return typeof a=="string"&&t?a.includes(t):!0})})))??[];var yo={},Kf=typeof process<"u"&&yo!==void 0&&(yo.REACT_APP_SC_ATTR||yo.SC_ATTR)||"data-styled",OO="active",ZO="data-styled-version",J4="6.1.17",n9=`/*!sc*/
1985
+ `,Gv=typeof window<"u"&&"HTMLElement"in window,z0e=!!(typeof SC_DISABLE_SPEEDY=="boolean"?SC_DISABLE_SPEEDY:typeof process<"u"&&yo!==void 0&&yo.REACT_APP_SC_DISABLE_SPEEDY!==void 0&&yo.REACT_APP_SC_DISABLE_SPEEDY!==""?yo.REACT_APP_SC_DISABLE_SPEEDY!=="false"&&yo.REACT_APP_SC_DISABLE_SPEEDY:typeof process<"u"&&yo!==void 0&&yo.SC_DISABLE_SPEEDY!==void 0&&yo.SC_DISABLE_SPEEDY!==""&&yo.SC_DISABLE_SPEEDY!=="false"&&yo.SC_DISABLE_SPEEDY),e5=Object.freeze([]),Gf=Object.freeze({});function j0e(r,e,t){return t===void 0&&(t=Gf),r.theme!==t.theme&&r.theme||e||t.theme}var LO=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","track","u","ul","use","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]),U0e=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,B0e=/(^-|-$)/g;function JA(r){return r.replace(U0e,"-").replace(B0e,"")}var q0e=/(a)(d)/gi,hg=52,eT=function(r){return String.fromCharCode(r+(r>25?39:97))};function W6(r){var e,t="";for(e=Math.abs(r);e>hg;e=e/hg|0)t=eT(e%hg)+t;return(eT(e%hg)+t).replace(q0e,"$1-$2")}var X_,HO=5381,Jh=function(r,e){for(var t=e.length;t;)r=33*r^e.charCodeAt(--t);return r},NO=function(r){return Jh(HO,r)};function DO(r){return W6(NO(r)>>>0)}function K0e(r){return r.displayName||r.name||"Component"}function J_(r){return typeof r=="string"&&!0}var VO=typeof Symbol=="function"&&Symbol.for,FO=VO?Symbol.for("react.memo"):60115,G0e=VO?Symbol.for("react.forward_ref"):60112,W0e={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},Y0e={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},zO={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Q0e=((X_={})[G0e]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},X_[FO]=zO,X_);function tT(r){return("type"in(e=r)&&e.type.$$typeof)===FO?zO:"$$typeof"in r?Q0e[r.$$typeof]:W0e;var e}var X0e=Object.defineProperty,J0e=Object.getOwnPropertyNames,rT=Object.getOwnPropertySymbols,ege=Object.getOwnPropertyDescriptor,tge=Object.getPrototypeOf,nT=Object.prototype;function jO(r,e,t){if(typeof e!="string"){if(nT){var n=tge(e);n&&n!==nT&&jO(r,n,t)}var i=J0e(e);rT&&(i=i.concat(rT(e)));for(var o=tT(r),a=tT(e),c=0;c<i.length;++c){var d=i[c];if(!(d in Y0e||t&&t[d]||a&&d in a||o&&d in o)){var u=ege(e,d);try{X0e(r,d,u)}catch{}}}}return r}function Nu(r){return typeof r=="function"}function i9(r){return typeof r=="object"&&"styledComponentId"in r}function eu(r,e){return r&&e?"".concat(r," ").concat(e):r||e||""}function Y6(r,e){if(r.length===0)return"";for(var t=r[0],n=1;n<r.length;n++)t+=r[n];return t}function Em(r){return r!==null&&typeof r=="object"&&r.constructor.name===Object.name&&!("props"in r&&r.$$typeof)}function Q6(r,e,t){if(t===void 0&&(t=!1),!t&&!Em(r)&&!Array.isArray(r))return e;if(Array.isArray(e))for(var n=0;n<e.length;n++)r[n]=Q6(r[n],e[n]);else if(Em(e))for(var n in e)r[n]=Q6(r[n],e[n]);return r}function o9(r,e){Object.defineProperty(r,"toString",{value:e})}function Du(r){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];return new Error("An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#".concat(r," for more information.").concat(e.length>0?" Args: ".concat(e.join(", ")):""))}var rge=function(){function r(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}return r.prototype.indexOfGroup=function(e){for(var t=0,n=0;n<e;n++)t+=this.groupSizes[n];return t},r.prototype.insertRules=function(e,t){if(e>=this.groupSizes.length){for(var n=this.groupSizes,i=n.length,o=i;e>=o;)if((o<<=1)<0)throw Du(16,"".concat(e));this.groupSizes=new Uint32Array(o),this.groupSizes.set(n),this.length=o;for(var a=i;a<o;a++)this.groupSizes[a]=0}for(var c=this.indexOfGroup(e+1),d=(a=0,t.length);a<d;a++)this.tag.insertRule(c,t[a])&&(this.groupSizes[e]++,c++)},r.prototype.clearGroup=function(e){if(e<this.length){var t=this.groupSizes[e],n=this.indexOfGroup(e),i=n+t;this.groupSizes[e]=0;for(var o=n;o<i;o++)this.tag.deleteRule(n)}},r.prototype.getGroup=function(e){var t="";if(e>=this.length||this.groupSizes[e]===0)return t;for(var n=this.groupSizes[e],i=this.indexOfGroup(e),o=i+n,a=i;a<o;a++)t+="".concat(this.tag.getRule(a)).concat(n9);return t},r}(),jg=new Map,Wv=new Map,Ug=1,fg=function(r){if(jg.has(r))return jg.get(r);for(;Wv.has(Ug);)Ug++;var e=Ug++;return jg.set(r,e),Wv.set(e,r),e},nge=function(r,e){Ug=e+1,jg.set(r,e),Wv.set(e,r)},ige="style[".concat(Kf,"][").concat(ZO,'="').concat(J4,'"]'),oge=new RegExp("^".concat(Kf,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),age=function(r,e,t){for(var n,i=t.split(","),o=0,a=i.length;o<a;o++)(n=i[o])&&r.registerName(e,n)},sge=function(r,e){for(var t,n=((t=e.textContent)!==null&&t!==void 0?t:"").split(n9),i=[],o=0,a=n.length;o<a;o++){var c=n[o].trim();if(c){var d=c.match(oge);if(d){var u=0|parseInt(d[1],10),h=d[2];u!==0&&(nge(h,u),age(r,h,d[3]),r.getTag().insertRules(u,i)),i.length=0}else i.push(c)}}},iT=function(r){for(var e=document.querySelectorAll(ige),t=0,n=e.length;t<n;t++){var i=e[t];i&&i.getAttribute(Kf)!==OO&&(sge(r,i),i.parentNode&&i.parentNode.removeChild(i))}};function cge(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:null}var UO=function(r){var e=document.head,t=r||e,n=document.createElement("style"),i=function(c){var d=Array.from(c.querySelectorAll("style[".concat(Kf,"]")));return d[d.length-1]}(t),o=i!==void 0?i.nextSibling:null;n.setAttribute(Kf,OO),n.setAttribute(ZO,J4);var a=cge();return a&&n.setAttribute("nonce",a),t.insertBefore(n,o),n},lge=function(){function r(e){this.element=UO(e),this.element.appendChild(document.createTextNode("")),this.sheet=function(t){if(t.sheet)return t.sheet;for(var n=document.styleSheets,i=0,o=n.length;i<o;i++){var a=n[i];if(a.ownerNode===t)return a}throw Du(17)}(this.element),this.length=0}return r.prototype.insertRule=function(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch{return!1}},r.prototype.deleteRule=function(e){this.sheet.deleteRule(e),this.length--},r.prototype.getRule=function(e){var t=this.sheet.cssRules[e];return t&&t.cssText?t.cssText:""},r}(),dge=function(){function r(e){this.element=UO(e),this.nodes=this.element.childNodes,this.length=0}return r.prototype.insertRule=function(e,t){if(e<=this.length&&e>=0){var n=document.createTextNode(t);return this.element.insertBefore(n,this.nodes[e]||null),this.length++,!0}return!1},r.prototype.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},r.prototype.getRule=function(e){return e<this.length?this.nodes[e].textContent:""},r}(),uge=function(){function r(e){this.rules=[],this.length=0}return r.prototype.insertRule=function(e,t){return e<=this.length&&(this.rules.splice(e,0,t),this.length++,!0)},r.prototype.deleteRule=function(e){this.rules.splice(e,1),this.length--},r.prototype.getRule=function(e){return e<this.length?this.rules[e]:""},r}(),oT=Gv,hge={isServer:!Gv,useCSSOMInjection:!z0e},BO=function(){function r(e,t,n){e===void 0&&(e=Gf),t===void 0&&(t={});var i=this;this.options=_r(_r({},hge),e),this.gs=t,this.names=new Map(n),this.server=!!e.isServer,!this.server&&Gv&&oT&&(oT=!1,iT(this)),o9(this,function(){return function(o){for(var a=o.getTag(),c=a.length,d="",u=function(p){var m=function(T){return Wv.get(T)}(p);if(m===void 0)return"continue";var v=o.names.get(m),_=a.getGroup(p);if(v===void 0||!v.size||_.length===0)return"continue";var b="".concat(Kf,".g").concat(p,'[id="').concat(m,'"]'),C="";v!==void 0&&v.forEach(function(T){T.length>0&&(C+="".concat(T,","))}),d+="".concat(_).concat(b,'{content:"').concat(C,'"}').concat(n9)},h=0;h<c;h++)u(h);return d}(i)})}return r.registerId=function(e){return fg(e)},r.prototype.rehydrate=function(){!this.server&&Gv&&iT(this)},r.prototype.reconstructWithOptions=function(e,t){return t===void 0&&(t=!0),new r(_r(_r({},this.options),e),this.gs,t&&this.names||void 0)},r.prototype.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},r.prototype.getTag=function(){return this.tag||(this.tag=(e=function(t){var n=t.useCSSOMInjection,i=t.target;return t.isServer?new uge(i):n?new lge(i):new dge(i)}(this.options),new rge(e)));var e},r.prototype.hasNameForId=function(e,t){return this.names.has(e)&&this.names.get(e).has(t)},r.prototype.registerName=function(e,t){if(fg(e),this.names.has(e))this.names.get(e).add(t);else{var n=new Set;n.add(t),this.names.set(e,n)}},r.prototype.insertRules=function(e,t,n){this.registerName(e,t),this.getTag().insertRules(fg(e),n)},r.prototype.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},r.prototype.clearRules=function(e){this.getTag().clearGroup(fg(e)),this.clearNames(e)},r.prototype.clearTag=function(){this.tag=void 0},r}(),fge=/&/g,pge=/^\s*\/\/.*$/gm;function qO(r,e){return r.map(function(t){return t.type==="rule"&&(t.value="".concat(e," ").concat(t.value),t.value=t.value.replaceAll(",",",".concat(e," ")),t.props=t.props.map(function(n){return"".concat(e," ").concat(n)})),Array.isArray(t.children)&&t.type!=="@keyframes"&&(t.children=qO(t.children,e)),t})}function mge(r){var e,t,n,i=Gf,o=i.options,a=o===void 0?Gf:o,c=i.plugins,d=c===void 0?e5:c,u=function(m,v,_){return _.startsWith(t)&&_.endsWith(t)&&_.replaceAll(t,"").length>0?".".concat(e):m},h=d.slice();h.push(function(m){m.type===g2&&m.value.includes("&")&&(m.props[0]=m.props[0].replace(fge,t).replace(n,u))}),a.prefix&&h.push(l$),h.push(a$);var p=function(m,v,_,b){v===void 0&&(v=""),_===void 0&&(_=""),b===void 0&&(b="&"),e=b,t=v,n=new RegExp("\\".concat(t,"\\b"),"g");var C=m.replace(pge,""),T=i$(_||v?"".concat(_," ").concat(v," { ").concat(C," }"):C);a.namespace&&(T=qO(T,a.namespace));var A=[];return gm(T,s$(h.concat(c$(function(I){return A.push(I)})))),A};return p.hash=d.length?d.reduce(function(m,v){return v.name||Du(15),Jh(m,v.name)},HO).toString():"",p}var gge=new BO,X6=mge(),KO=lr.createContext({shouldForwardProp:void 0,styleSheet:gge,stylis:X6});KO.Consumer;lr.createContext(void 0);function aT(){return x.useContext(KO)}var GO=function(){function r(e,t){var n=this;this.inject=function(i,o){o===void 0&&(o=X6);var a=n.name+o.hash;i.hasNameForId(n.id,a)||i.insertRules(n.id,a,o(n.rules,a,"@keyframes"))},this.name=e,this.id="sc-keyframes-".concat(e),this.rules=t,o9(this,function(){throw Du(12,String(n.name))})}return r.prototype.getName=function(e){return e===void 0&&(e=X6),this.name+e.hash},r}(),vge=function(r){return r>="A"&&r<="Z"};function sT(r){for(var e="",t=0;t<r.length;t++){var n=r[t];if(t===1&&n==="-"&&r[0]==="-")return r;vge(n)?e+="-"+n.toLowerCase():e+=n}return e.startsWith("ms-")?"-"+e:e}var WO=function(r){return r==null||r===!1||r===""},YO=function(r){var e,t,n=[];for(var i in r){var o=r[i];r.hasOwnProperty(i)&&!WO(o)&&(Array.isArray(o)&&o.isCss||Nu(o)?n.push("".concat(sT(i),":"),o,";"):Em(o)?n.push.apply(n,kc(kc(["".concat(i," {")],YO(o),!1),["}"],!1)):n.push("".concat(sT(i),": ").concat((e=i,(t=o)==null||typeof t=="boolean"||t===""?"":typeof t!="number"||t===0||e in d$||e.startsWith("--")?String(t).trim():"".concat(t,"px")),";")))}return n};function xu(r,e,t,n){if(WO(r))return[];if(i9(r))return[".".concat(r.styledComponentId)];if(Nu(r)){if(!Nu(o=r)||o.prototype&&o.prototype.isReactComponent||!e)return[r];var i=r(e);return xu(i,e,t,n)}var o;return r instanceof GO?t?(r.inject(t,n),[r.getName(n)]):[r]:Em(r)?YO(r):Array.isArray(r)?Array.prototype.concat.apply(e5,r.map(function(a){return xu(a,e,t,n)})):[r.toString()]}function yge(r){for(var e=0;e<r.length;e+=1){var t=r[e];if(Nu(t)&&!i9(t))return!1}return!0}var _ge=NO(J4),bge=function(){function r(e,t,n){this.rules=e,this.staticRulesId="",this.isStatic=(n===void 0||n.isStatic)&&yge(e),this.componentId=t,this.baseHash=Jh(_ge,t),this.baseStyle=n,BO.registerId(t)}return r.prototype.generateAndInjectStyles=function(e,t,n){var i=this.baseStyle?this.baseStyle.generateAndInjectStyles(e,t,n):"";if(this.isStatic&&!n.hash)if(this.staticRulesId&&t.hasNameForId(this.componentId,this.staticRulesId))i=eu(i,this.staticRulesId);else{var o=Y6(xu(this.rules,e,t,n)),a=W6(Jh(this.baseHash,o)>>>0);if(!t.hasNameForId(this.componentId,a)){var c=n(o,".".concat(a),void 0,this.componentId);t.insertRules(this.componentId,a,c)}i=eu(i,a),this.staticRulesId=a}else{for(var d=Jh(this.baseHash,n.hash),u="",h=0;h<this.rules.length;h++){var p=this.rules[h];if(typeof p=="string")u+=p;else if(p){var m=Y6(xu(p,e,t,n));d=Jh(d,m+h),u+=m}}if(u){var v=W6(d>>>0);t.hasNameForId(this.componentId,v)||t.insertRules(this.componentId,v,n(u,".".concat(v),void 0,this.componentId)),i=eu(i,v)}}return i},r}(),Yv=lr.createContext(void 0);Yv.Consumer;function l1(r){var e=lr.useContext(Yv),t=x.useMemo(function(){return function(n,i){if(!n)throw Du(14);if(Nu(n)){var o=n(i);return o}if(Array.isArray(n)||typeof n!="object")throw Du(8);return i?_r(_r({},i),n):n}(r.theme,e)},[r.theme,e]);return r.children?lr.createElement(Yv.Provider,{value:t},r.children):null}var eb={};function wge(r,e,t){var n=i9(r),i=r,o=!J_(r),a=e.attrs,c=a===void 0?e5:a,d=e.componentId,u=d===void 0?function(O,B){var z=typeof O!="string"?"sc":JA(O);eb[z]=(eb[z]||0)+1;var R="".concat(z,"-").concat(DO(J4+z+eb[z]));return B?"".concat(B,"-").concat(R):R}(e.displayName,e.parentComponentId):d,h=e.displayName,p=h===void 0?function(O){return J_(O)?"styled.".concat(O):"Styled(".concat(K0e(O),")")}(r):h,m=e.displayName&&e.componentId?"".concat(JA(e.displayName),"-").concat(e.componentId):e.componentId||u,v=n&&i.attrs?i.attrs.concat(c).filter(Boolean):c,_=e.shouldForwardProp;if(n&&i.shouldForwardProp){var b=i.shouldForwardProp;if(e.shouldForwardProp){var C=e.shouldForwardProp;_=function(O,B){return b(O,B)&&C(O,B)}}else _=b}var T=new bge(t,m,n?i.componentStyle:void 0);function A(O,B){return function(z,R,Y){var ue=z.attrs,le=z.componentStyle,Te=z.defaultProps,ke=z.foldedComponentIds,xe=z.styledComponentId,X=z.target,q=lr.useContext(Yv),re=aT(),W=z.shouldForwardProp||re.shouldForwardProp,$=j0e(R,q,Te)||Gf,L=function(Ee,Ae,Xe){for(var lt,xt=_r(_r({},Ae),{className:void 0,theme:Xe}),wr=0;wr<Ee.length;wr+=1){var Gr=Nu(lt=Ee[wr])?lt(xt):lt;for(var Mt in Gr)xt[Mt]=Mt==="className"?eu(xt[Mt],Gr[Mt]):Mt==="style"?_r(_r({},xt[Mt]),Gr[Mt]):Gr[Mt]}return Ae.className&&(xt.className=eu(xt.className,Ae.className)),xt}(ue,R,$),D=L.as||X,Z={};for(var N in L)L[N]===void 0||N[0]==="$"||N==="as"||N==="theme"&&L.theme===$||(N==="forwardedAs"?Z.as=L.forwardedAs:W&&!W(N,D)||(Z[N]=L[N]));var ae=function(Ee,Ae){var Xe=aT(),lt=Ee.generateAndInjectStyles(Ae,Xe.styleSheet,Xe.stylis);return lt}(le,L),He=eu(ke,xe);return ae&&(He+=" "+ae),L.className&&(He+=" "+L.className),Z[J_(D)&&!LO.has(D)?"class":"className"]=He,Y&&(Z.ref=Y),x.createElement(D,Z)}(I,O,B)}A.displayName=p;var I=lr.forwardRef(A);return I.attrs=v,I.componentStyle=T,I.displayName=p,I.shouldForwardProp=_,I.foldedComponentIds=n?eu(i.foldedComponentIds,i.styledComponentId):"",I.styledComponentId=m,I.target=n?i.target:r,Object.defineProperty(I,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(O){this._foldedDefaultProps=n?function(B){for(var z=[],R=1;R<arguments.length;R++)z[R-1]=arguments[R];for(var Y=0,ue=z;Y<ue.length;Y++)Q6(B,ue[Y],!0);return B}({},i.defaultProps,O):O}}),o9(I,function(){return".".concat(I.styledComponentId)}),o&&jO(I,r,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),I}function cT(r,e){for(var t=[r[0]],n=0,i=e.length;n<i;n+=1)t.push(e[n],r[n+1]);return t}var lT=function(r){return Object.assign(r,{isCss:!0})};function Nt(r){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];if(Nu(r)||Em(r))return lT(xu(cT(e5,kc([r],e,!0))));var n=r;return e.length===0&&n.length===1&&typeof n[0]=="string"?xu(n):lT(xu(cT(n,e)))}function J6(r,e,t){if(t===void 0&&(t=Gf),!e)throw Du(1,e);var n=function(i){for(var o=[],a=1;a<arguments.length;a++)o[a-1]=arguments[a];return r(e,t,Nt.apply(void 0,kc([i],o,!1)))};return n.attrs=function(i){return J6(r,e,_r(_r({},t),{attrs:Array.prototype.concat(t.attrs,i).filter(Boolean)}))},n.withConfig=function(i){return J6(r,e,_r(_r({},t),i))},n}var QO=function(r){return J6(wge,r)},Ve=QO;LO.forEach(function(r){Ve[r]=QO(r)});function xge(r){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];var n=Y6(Nt.apply(void 0,kc([r],e,!1))),i=DO(n);return new GO(i,n)}const{typography:{navigation:{button:tb}},colors:{interactive:{disabled__text:{rgba:Cge},disabled__border:{rgba:kge},disabled__fill:{rgba:Ege}}},spacings:{comfortable:{medium:dT}},shape:{button:{minHeight:uT,borderRadius:hT},_modes:{compact:{button:{minHeight:fT}}}},interactions:{focused:pT},clickbounds:{default__base:mT,compact__standard:gT}}=tt,t5={background:"transparent",height:`var(--eds_button__height, ${uT})`,typography:{...tb,textAlign:"center",fontSize:`var(--eds_button__font_size, ${tb.fontSize})`},border:{type:"border",width:"var(--eds_button__border_width, 1px)",color:"transparent",radius:`var(--eds_button__radius, ${hT})`,style:"solid"},spacings:{top:"var(--eds_button__padding_y, 0)",bottom:"var(--eds_button__padding_y, 0)",left:`var(--eds_button__padding_x, ${dT})`,right:`var(--eds_button__padding_x, ${dT})`},clickbound:{height:mT,width:"100%",offset:{top:`${(parseInt(mT)-parseInt(uT))/2+1}px`,left:"0"}},entities:{icon:{height:"var(--eds_button__icon__size, 24px)",width:"var(--eds_button__icon__size, 24px)"}},states:{hover:{border:{type:"border",width:"1px",color:"transparent",radius:`var(--eds_button__radius, ${hT})`,style:"solid"}},focus:{outline:{type:"outline",offset:"3px",style:"dashed",color:pT.color,width:pT.width}},disabled:{background:Ege,border:{type:"border",width:"1px",color:kge,style:"solid"},typography:{...tb,color:Cge,textAlign:"center"}}},modes:{compact:{height:`var(--eds_button__height_compact, ${fT})`,spacings:{top:"var(--eds_button__padding_y_compact, 0)",bottom:"var(--eds_button__padding_y_compact, 0)"},clickbound:{height:gT,width:"100%",offset:{top:`${(parseInt(gT)-parseInt(fT))/2+1}px`,left:"0"}}}}};function Jr(r){return r!=null&&typeof r=="object"&&r["@@functional/placeholder"]===!0}function tu(r){return function e(t){return arguments.length===0||Jr(t)?e:r.apply(this,arguments)}}function Nd(r){return function e(t,n){switch(arguments.length){case 0:return e;case 1:return Jr(t)?e:tu(function(i){return r(t,i)});default:return Jr(t)&&Jr(n)?e:Jr(t)?tu(function(i){return r(i,n)}):Jr(n)?tu(function(i){return r(t,i)}):r(t,n)}}}function XO(r){return function e(t,n,i){switch(arguments.length){case 0:return e;case 1:return Jr(t)?e:Nd(function(o,a){return r(t,o,a)});case 2:return Jr(t)&&Jr(n)?e:Jr(t)?Nd(function(o,a){return r(o,n,a)}):Jr(n)?Nd(function(o,a){return r(t,o,a)}):tu(function(o){return r(t,n,o)});default:return Jr(t)&&Jr(n)&&Jr(i)?e:Jr(t)&&Jr(n)?Nd(function(o,a){return r(o,a,i)}):Jr(t)&&Jr(i)?Nd(function(o,a){return r(o,n,a)}):Jr(n)&&Jr(i)?Nd(function(o,a){return r(t,o,a)}):Jr(t)?tu(function(o){return r(o,n,i)}):Jr(n)?tu(function(o){return r(t,o,i)}):Jr(i)?tu(function(o){return r(t,n,o)}):r(t,n,i)}}}function vT(r){return Object.prototype.toString.call(r)==="[object Object]"}function pg(r,e){return Object.prototype.hasOwnProperty.call(e,r)}var Sge=XO(function(e,t,n){var i={},o;t=t||{},n=n||{};for(o in t)pg(o,t)&&(i[o]=pg(o,n)?e(o,t[o],n[o]):t[o]);for(o in n)pg(o,n)&&!pg(o,i)&&(i[o]=n[o]);return i}),Age=XO(function r(e,t,n){return Sge(function(i,o,a){return vT(o)&&vT(a)?r(e,o,a):e(i,o,a)},t,n)}),vn=Nd(function(e,t){return Age(function(n,i,o){return o},e,t)});const{colors:{text:{static_icons__primary_white:{rgba:Tge}},interactive:{primary__resting:{rgba:yT},primary__hover:{rgba:Ige},secondary__resting:{rgba:_T},secondary__link_hover:{rgba:bT},danger__resting:{rgba:wT},danger__hover:{rgba:xT}}},shape:{button:{borderRadius:Rge}}}=tt,r5=vn(t5,{background:yT,typography:{color:Tge},border:{type:"border",style:"solid",width:"1px",color:yT,radius:`var(--eds_button__radius, ${Rge})`},states:{hover:{background:Ige}}}),JO=vn(r5,{background:_T,border:{color:_T},states:{hover:{background:bT,border:{color:bT}}}}),eZ=vn(r5,{background:wT,border:{color:wT},states:{hover:{background:xT,border:{color:xT}}}}),{colors:{interactive:{primary__resting:{rgba:CT},primary__hover:{rgba:kT},primary__hover_alt:{rgba:Pge},secondary__resting:{rgba:ET},secondary__link_hover:{rgba:ST},secondary__highlight:{rgba:Mge},danger__resting:{rgba:AT},danger__hover:{rgba:TT},danger__highlight:{rgba:$ge}}},shape:{button:{borderRadius:Oge}}}=tt,a9=vn(t5,{typography:{color:CT},border:{type:"border",style:"solid",width:"1px",color:CT,radius:`var(--eds_button__radius, ${Oge})`},states:{hover:{typography:{color:kT},background:Pge,border:{style:"solid",type:"border",width:"1px",color:kT}},disabled:{background:"transparent"}}}),Zge=vn(a9,{typography:{color:ET},border:{color:ET},states:{hover:{background:Mge,typography:{color:ST},border:{color:ST}}}}),Lge=vn(a9,{typography:{color:AT},border:{color:AT},states:{hover:{background:$ge,typography:{color:TT},border:{color:TT}}}}),{colors:{interactive:{primary__resting:{rgba:Hge},primary__hover:{rgba:Nge},primary__hover_alt:{rgba:Dge},secondary__resting:{rgba:Vge},secondary__link_hover:{rgba:Fge},secondary__highlight:{rgba:zge},danger__resting:{rgba:jge},danger__hover:{rgba:Uge},danger__highlight:{rgba:Bge}}}}=tt,s9=vn(t5,{typography:{color:Hge},states:{hover:{background:Dge,typography:{color:Nge}},disabled:{background:"transparent",border:{color:"transparent"}}}}),qge=vn(s9,{typography:{color:Vge},states:{hover:{background:zge,typography:{color:Fge}}}}),Kge=vn(s9,{typography:{color:jge},states:{hover:{background:Bge,typography:{color:Uge}}}}),{colors:{interactive:{primary__resting:{rgba:Gge},primary__hover_alt:{rgba:Wge},secondary__resting:{rgba:Yge},secondary__link_hover:{rgba:Qge},secondary__highlight:{rgba:Xge},danger__resting:{rgba:Jge},danger__hover:{rgba:eve},danger__highlight:{rgba:tve}}},clickbounds:{default__base:rb,compact__standard:IT},shape:Pd,interactions:{focused:{width:rve}}}=tt,c9=vn(t5,{height:Pd.icon_button.minHeight,width:Pd.icon_button.minWidth,typography:{color:Gge},border:{width:"0px",radius:"50%"},background:"transparent",spacings:{left:"0",right:"0"},clickbound:{width:rb,offset:{top:`${(parseInt(rb)-parseInt(Pd.icon_button.minWidth))/2}px`,left:`${(parseInt(rb)-parseInt(Pd.icon_button.minWidth))/2}px`}},states:{hover:{background:Wge,border:{width:"0px",radius:"50%"}},disabled:{background:"transparent",border:{color:"transparent"}},focus:{outline:{offset:`-${parseInt(rve)}px`}}},modes:{compact:{height:Pd._modes.compact.icon_button.minHeight,width:Pd._modes.compact.icon_button.minWidth,clickbound:{width:IT,offset:{top:"0",left:`${(parseInt(IT)-parseInt(Pd._modes.compact.icon_button.minWidth))/2}px`}}}}}),nve=vn(c9,{typography:{color:Yge},states:{hover:{background:Xge,typography:{color:Qge}}}}),ive=vn(c9,{typography:{color:Jge},states:{hover:{background:tve,typography:{color:eve}}}}),{clickbounds:{default__base:nb,compact__standard:RT},shape:Md}=tt,l9={height:Md.icon_button.minHeight,width:Md.icon_button.minWidth,border:{width:"0px",radius:"50%"},spacings:{left:"0",right:"0"},clickbound:{width:nb,offset:{top:`${(parseInt(nb)-parseInt(Md.icon_button.minWidth))/2}px`,left:`${(parseInt(nb)-parseInt(Md.icon_button.minWidth))/2}px`}},states:{hover:{border:{width:"0px",radius:"50%"}}},modes:{compact:{height:Md._modes.compact.icon_button.minHeight,width:Md._modes.compact.icon_button.minWidth,clickbound:{width:RT,offset:{top:"0",left:`${(parseInt(RT)-parseInt(Md._modes.compact.icon_button.minWidth))/2}px`}}}}},ove=vn(r5,l9),ave=vn(JO,l9),sve=vn(eZ,l9),ib={primary:{contained:r5,outlined:a9,ghost:s9,ghost_icon:c9,contained_icon:ove},secondary:{contained:JO,outlined:Zge,ghost:qge,ghost_icon:nve,contained_icon:ave},danger:{contained:eZ,outlined:Lge,ghost:Kge,ghost_icon:ive,contained_icon:sve}},ew=(r,e)=>{x.useEffect(()=>{const t=n=>{const{key:i}=n;switch(i){case r:e(n);break}};return document.addEventListener("keydown",t,!0),()=>{document.removeEventListener("keydown",t,!0)}},[r,e])};let cve=0;const tw=(r,e)=>{const[t,n]=x.useState(r),i=r||t;return x.useEffect(()=>{t==null&&n(`eds-${e?e+"-":""}${cve++}`)},[t,e]),i},lve=(r,e)=>{x.useEffect(()=>{const t=()=>{r.style.height="auto";const{scrollHeight:n,clientHeight:i}=r;let o=i;e>o&&(o=Math.min(e,Math.max(n,o)),n>e?r.style.overflow="auto":r.style.overflow="hidden",o>i&&(r.style.height=`${o}px`))};return r&&e&&(t(),r.addEventListener("keyup",t,!0)),()=>{r==null||r.removeEventListener("keyup",t,!0)}},[r,e])},PT=typeof window<"u"?x.useLayoutEffect:x.useEffect;function en(r){return r!=null&&typeof r=="object"&&r["@@functional/placeholder"]===!0}function ru(r){return function e(t){return arguments.length===0||en(t)?e:r.apply(this,arguments)}}function Dd(r){return function e(t,n){switch(arguments.length){case 0:return e;case 1:return en(t)?e:ru(function(i){return r(t,i)});default:return en(t)&&en(n)?e:en(t)?ru(function(i){return r(i,n)}):en(n)?ru(function(i){return r(t,i)}):r(t,n)}}}function tZ(r){return function e(t,n,i){switch(arguments.length){case 0:return e;case 1:return en(t)?e:Dd(function(o,a){return r(t,o,a)});case 2:return en(t)&&en(n)?e:en(t)?Dd(function(o,a){return r(o,n,a)}):en(n)?Dd(function(o,a){return r(t,o,a)}):ru(function(o){return r(t,n,o)});default:return en(t)&&en(n)&&en(i)?e:en(t)&&en(n)?Dd(function(o,a){return r(o,a,i)}):en(t)&&en(i)?Dd(function(o,a){return r(o,n,a)}):en(n)&&en(i)?Dd(function(o,a){return r(t,o,a)}):en(t)?ru(function(o){return r(o,n,i)}):en(n)?ru(function(o){return r(t,o,i)}):en(i)?ru(function(o){return r(t,n,o)}):r(t,n,i)}}}function MT(r){return Object.prototype.toString.call(r)==="[object Object]"}function mg(r,e){return Object.prototype.hasOwnProperty.call(e,r)}var dve=tZ(function(e,t,n){var i={},o;t=t||{},n=n||{};for(o in t)mg(o,t)&&(i[o]=mg(o,n)?e(o,t[o],n[o]):t[o]);for(o in n)mg(o,n)&&!mg(o,i)&&(i[o]=n[o]);return i}),uve=tZ(function r(e,t,n){return dve(function(i,o,a){return MT(o)&&MT(a)?r(e,o,a):e(i,o,a)},t,n)}),hve=Dd(function(e,t){return uve(function(n,i,o){return o},e,t)});const Gu=(r,e)=>x.useCallback(()=>{const{density:t}=r;return t==="compact"?hve(e,e.modes.compact):e},[r,e]),Qi={count:0,originalOverflow:"",originalPaddingRight:""},fve=r=>{const e=x.useRef(!1);x.useEffect(()=>{if(typeof document>"u")return;const{body:t}=document,n=document.documentElement;if(r&&!e.current){if(e.current=!0,Qi.count===0){Qi.originalOverflow=t.style.overflow||"",Qi.originalPaddingRight=t.style.paddingRight||"";const i=window.innerWidth-n.clientWidth,o=parseInt(window.getComputedStyle(t).getPropertyValue("padding-right"))||0;t.style.overflow="hidden",t.style.paddingRight=`${o+i}px`}Qi.count+=1}else!r&&e.current&&(e.current=!1,Qi.count=Math.max(0,Qi.count-1),Qi.count===0&&(t.style.overflow=Qi.originalOverflow,t.style.paddingRight=Qi.originalPaddingRight));return()=>{e.current&&(e.current=!1,Qi.count=Math.max(0,Qi.count-1),Qi.count===0&&(t.style.overflow=Qi.originalOverflow,t.style.paddingRight=Qi.originalPaddingRight))}},[r])},Vu=(...r)=>e=>r.forEach(t=>{typeof t=="function"?t(e):t&&typeof t=="object"&&(t.current=e)}),pve=(r,e)=>{const t=r.value;r.value=e;const n=r._valueTracker;typeof n<"u"&&n.setValue(t),r.dispatchEvent(new Event("change",{bubbles:!0}))},zh=r=>{if(!r)return;const{width:e="",style:t="",color:n=""}=r;return e?`${e} ${t} ${n}`:null},Ol=r=>{var e,t,n,i;if(!r)return Nt({});switch(r.type){case"border":return Nt({border:zh(r),borderRadius:r.radius});case"bordergroup":return Nt({borderBottom:zh(r.bottom),borderTop:zh(r.top),borderLeft:zh(r.left),borderRight:zh(r.right),borderBottomLeftRadius:(e=r==null?void 0:r.left)==null?void 0:e.radius,borderTopLeftRadius:(t=r==null?void 0:r.left)==null?void 0:t.radius,borderBottomRightRadius:(n=r==null?void 0:r.right)==null?void 0:n.radius,borderTopRightRadius:(i=r==null?void 0:r.right)==null?void 0:i.radius});default:return Nt({})}},{colors:{interactive:{focus:{rgba:mve}}}}=tt,Sc=r=>{const{color:e=mve,style:t="dashed",width:n="2px",offset:i="0px",type:o}=r,a={color:e,style:t,width:n,offset:i};return Nt({outline:zh(a),outlineOffset:a.offset})},Fa=(r,e)=>{if(!r)return"";let t=`
1986
1986
  margin: 0;
1987
1987
  color: ${r.color};
1988
1988
  font-family: ${r.fontFamily};
@@ -1996,15 +1996,15 @@ text-transform: ${r.textTransform};`),r.textDecoration&&(t+=`
1996
1996
  text-decoration: ${r.textDecoration};`),r.textAlign&&(t+=`
1997
1997
  text-align: ${r.textAlign};`),r.fontFeature&&(t+=`
1998
1998
  font-feature-settings: ${r.fontFeature};`),e&&(t+=`
1999
- cursor: pointer;`),t},Gl=({left:r,right:e,top:t,bottom:n})=>Nt({paddingLeft:r,paddingTop:t,paddingRight:e,paddingBottom:n}),d9=r=>{const{fontFamily:e,fontSize:t,fontWeight:n,lineHeight:i,letterSpacing:o,fontFeature:a,textDecoration:c,textTransform:d,fontStyle:u}=r;return{fontFeatureSettings:a,fontFamily:e,fontSize:t,fontWeight:n,letterSpacing:o,lineHeight:i,textDecoration:c,textTransform:d,fontStyle:u}},pve=Ve.span.withConfig({displayName:"InnerFullWidth__FullWidthCenterContent",componentId:"sc-qeawkb-0"})(["text-align:center;flex:1;"]),mve=Ve.span.withConfig({displayName:"InnerFullWidth__FullWidthInner",componentId:"sc-qeawkb-1"})(["height:100%;display:flex;align-items:center;> :is(svg,img){margin-top:var(--eds_button__margin_y,inherit);margin-bottom:var(--eds_button__margin_y,inherit);}> :is(svg,img):first-child{margin-right:var(--eds_button__fullwidth__icon__margin_x,8px);}> :is(svg,img):last-child{margin-left:var(--eds_button__fullwidth__icon__margin_x,8px);}> :is(svg,img):only-child{margin-left:auto;margin-right:auto;}> span:first-child{margin-left:var(--eds_button__fullwidth__margin_x,32px);}> span:last-child{margin-right:var(--eds_button__fullwidth__margin_x,32px);}> span:only-child{margin-right:0;margin-left:0;}"]),gve=x.forwardRef(function({children:e},t){const n=x.Children.map(e,i=>typeof i!="object"?E.jsx(pve,{children:i}):i);return E.jsx(mve,{ref:t,children:n})}),vve={density:"comfortable"},yve=x.createContext(vve),Tc=()=>x.useContext(yve),ob=(r,e)=>{switch(e){case"ghost":return r.ghost;case"ghost_icon":return r.ghost_icon;case"outlined":return r.outlined;case"contained_icon":return r.contained_icon;case"contained":default:return r.contained}},_ve=(r,e)=>{switch(e){case"danger":return ob(ib.danger,r);case"secondary":return ob(ib.secondary,r);case"primary":default:return ob(ib.primary,r)}},bve=Ve.span.withConfig({displayName:"Button__Inner",componentId:"sc-1hs0myn-0"})(["display:grid;grid-gap:var(--eds_button__gap,8px);grid-auto-flow:column;align-items:center;height:100%;justify-content:center;& > :is(svg,img){margin-top:var(--eds_button__icon__margin_y,0);margin-bottom:var(--eds_button__icon__margin_y,0);}"]),wve=Ve.button.withConfig({displayName:"Button__ButtonBase",componentId:"sc-1hs0myn-1"})(({theme:r})=>{var a,c,d;const{states:e,clickbound:t}=r,{focus:n,hover:i,disabled:o}=e;return Nt(["box-sizing:border-box;margin:0;padding:0;text-decoration:none;position:relative;cursor:pointer;display:inline-block;background:",";height:",";width:",";svg{justify-self:center;}"," "," "," &::after{position:absolute;top:-",";left:-",";width:",";height:",";content:'';}@media (hover:hover) and (pointer:fine){&:hover{background:",";color:",";",";}}&:focus{outline:none;}&[data-focus-visible-added]:focus{","}&:focus-visible{","}&::-moz-focus-inner{border:0;}&:disabled,&[aria-disabled='true']{cursor:not-allowed;background:",";",";",";@media (hover:hover) and (pointer:fine){&:hover{background:",";}}}"],r.background,r.height,r.width,Gl(r.spacings),Ol(r.border),Fa(r.typography),(a=t==null?void 0:t.offset)==null?void 0:a.top,(c=t==null?void 0:t.offset)==null?void 0:c.left,t==null?void 0:t.width,t==null?void 0:t.height,i.background,(d=i.typography)==null?void 0:d.color,Ol(i==null?void 0:i.border),Sc(n.outline),Sc(n.outline),o.background,Ol(o.border),Fa(o.typography),o.background)}),xve=x.forwardRef(function({color:e="primary",variant:t="contained",children:n,disabled:i=!1,href:o,tabIndex:a=0,fullWidth:c=!1,...d},u){const{density:h}=Tc(),p=Gu({density:h},_ve(t,e)),m=o&&!i?"a":d.as?d.as:"button",v=o||d.as?void 0:"button";a=i?-1:a;const _={ref:u,as:m,href:o,type:v,disabled:i,tabIndex:a,...d};return E.jsx(l1,{theme:p,children:E.jsx(wve,{..._,children:c?E.jsx(gve,{children:n}):E.jsx(bve,{children:n})})})}),{shape:{corners:{borderRadius:Cve}}}=tt,kve={border:{radius:Cve}},{border:Eve}=kve,il=Eve.radius,Sve=Ve.div.withConfig({displayName:"ButtonGroup__ButtonGroupBase",componentId:"sc-1fn8jon-0"})(["display:inline-flex;> *{border-radius:0;@media (hover:hover) and (pointer:fine){&:hover{border-radius:0;}}}",""],({$vertical:r})=>Nt(r?["flex-direction:column;> :first-child{border-top-left-radius:",";border-top-right-radius:",";}> :last-child{border-bottom-left-radius:",";border-bottom-right-radius:",";}> :not(:last-child){border-bottom:none;}"]:["> :first-child{border-top-left-radius:",";border-bottom-left-radius:",";}> :last-child{border-top-right-radius:",";border-bottom-right-radius:",";}> :not(:last-child){border-right:none;}"],il,il,il,il)),rZ=x.forwardRef(function({children:e,vertical:t,...n},i){const o={ref:i,$vertical:t,...n};return E.jsx(Sve,{role:"group",...o,children:e})}),{colors:{text:{static_icons__primary_white:{rgba:Ave}},ui:{background__overlay:{rgba:Tve}}},typography:{ui:Ive},spacings:{comfortable:{small:ip}},shape:{corners:{borderRadius:Rve}}}=tt,pc={typography:{...Ive.tooltip,color:Ave},background:Tve,border:{type:"border",radius:Rve},entities:{arrow:{width:"6px",height:ip}},spacings:{left:ip,right:ip,top:ip,bottom:ip}};function $T(r){let e=r.activeElement;for(;((t=e)==null||(t=t.shadowRoot)==null?void 0:t.activeElement)!=null;){var t;e=e.shadowRoot.activeElement}return e}function Sm(r,e){if(!r||!e)return!1;const t=e.getRootNode==null?void 0:e.getRootNode();if(r.contains(e))return!0;if(t&&Ov(t)){let n=e;for(;n;){if(r===n)return!0;n=n.parentNode||n.host}}return!1}function Pve(){const r=navigator.userAgentData;return r!=null&&r.platform?r.platform:navigator.platform}function Mve(){return/apple/i.test(navigator.vendor)}function $ve(){return Pve().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function rw(r,e){const t=["mouse","pen"];return t.push("",void 0),t.includes(r)}function Ove(r){return"nativeEvent"in r}function Zve(r){return r.matches("html,body")}function nu(r){return(r==null?void 0:r.ownerDocument)||document}function ab(r,e){if(e==null)return!1;if("composedPath"in r)return r.composedPath().includes(e);const t=r;return t.target!=null&&e.contains(t.target)}function jh(r){return"composedPath"in r?r.composedPath()[0]:r.target}const Lve="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function Hve(r){return wi(r)&&r.matches(Lve)}var Bg=typeof document<"u"?x.useLayoutEffect:x.useEffect;function Qv(r,e){if(r===e)return!0;if(typeof r!=typeof e)return!1;if(typeof r=="function"&&r.toString()===e.toString())return!0;let t,n,i;if(r&&e&&typeof r=="object"){if(Array.isArray(r)){if(t=r.length,t!==e.length)return!1;for(n=t;n--!==0;)if(!Qv(r[n],e[n]))return!1;return!0}if(i=Object.keys(r),t=i.length,t!==Object.keys(e).length)return!1;for(n=t;n--!==0;)if(!{}.hasOwnProperty.call(e,i[n]))return!1;for(n=t;n--!==0;){const o=i[n];if(!(o==="_owner"&&r.$$typeof)&&!Qv(r[o],e[o]))return!1}return!0}return r!==r&&e!==e}function nZ(r){return typeof window>"u"?1:(r.ownerDocument.defaultView||window).devicePixelRatio||1}function OT(r,e){const t=nZ(r);return Math.round(e*t)/t}function sb(r){const e=x.useRef(r);return Bg(()=>{e.current=r}),e}function Nve(r){r===void 0&&(r={});const{placement:e="bottom",strategy:t="absolute",middleware:n=[],platform:i,elements:{reference:o,floating:a}={},transform:c=!0,whileElementsMounted:d,open:u}=r,[h,p]=x.useState({x:0,y:0,strategy:t,placement:e,middlewareData:{},isPositioned:!1}),[m,v]=x.useState(n);Qv(m,n)||v(n);const[_,b]=x.useState(null),[C,T]=x.useState(null),A=x.useCallback($=>{$!==z.current&&(z.current=$,b($))},[]),I=x.useCallback($=>{$!==R.current&&(R.current=$,T($))},[]),O=o||_,B=a||C,z=x.useRef(null),R=x.useRef(null),Y=x.useRef(h),ue=d!=null,le=sb(d),Te=sb(i),ke=sb(u),xe=x.useCallback(()=>{if(!z.current||!R.current)return;const $={placement:e,strategy:t,middleware:m};Te.current&&($.platform=Te.current),R8(z.current,R.current,$).then(L=>{const D={...L,isPositioned:ke.current!==!1};X.current&&!Qv(Y.current,D)&&(Y.current=D,Uu.flushSync(()=>{p(D)}))})},[m,e,t,Te,ke]);Bg(()=>{u===!1&&Y.current.isPositioned&&(Y.current.isPositioned=!1,p($=>({...$,isPositioned:!1})))},[u]);const X=x.useRef(!1);Bg(()=>(X.current=!0,()=>{X.current=!1}),[]),Bg(()=>{if(O&&(z.current=O),B&&(R.current=B),O&&B){if(le.current)return le.current(O,B,xe);xe()}},[O,B,xe,le,ue]);const q=x.useMemo(()=>({reference:z,floating:R,setReference:A,setFloating:I}),[A,I]),re=x.useMemo(()=>({reference:O,floating:B}),[O,B]),W=x.useMemo(()=>{const $={position:t,left:0,top:0};if(!re.floating)return $;const L=OT(re.floating,h.x),D=OT(re.floating,h.y);return c?{...$,transform:"translate("+L+"px, "+D+"px)",...nZ(re.floating)>=1.5&&{willChange:"transform"}}:{position:t,left:L,top:D}},[t,c,re.floating,h.x,h.y]);return x.useMemo(()=>({...h,update:xe,refs:q,elements:re,floatingStyles:W}),[h,xe,q,re,W])}const Dve=r=>{function e(t){return{}.hasOwnProperty.call(t,"current")}return{name:"arrow",options:r,fn(t){const{element:n,padding:i}=typeof r=="function"?r(t):r;return n&&e(n)?n.current!=null?Dv({element:n.current,padding:i}).fn(t):{}:n?Dv({element:n,padding:i}).fn(t):{}}}},iZ=(r,e)=>({...T8(r),options:[r,e]}),oZ=(r,e)=>({...I8(r),options:[r,e]}),aZ=(r,e)=>({...B$(r),options:[r,e]}),Vve=(r,e)=>({...Iee(r),options:[r,e]}),Fve=(r,e)=>({...Dve(r),options:[r,e]}),sZ={...Xw},zve=sZ.useInsertionEffect,jve=zve||(r=>r());function dc(r){const e=x.useRef(()=>{});return jve(()=>{e.current=r}),x.useCallback(function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return e.current==null?void 0:e.current(...n)},[])}var Wf=typeof document<"u"?x.useLayoutEffect:x.useEffect;let ZT=!1,Uve=0;const LT=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Uve++;function Bve(){const[r,e]=x.useState(()=>ZT?LT():void 0);return Wf(()=>{r==null&&e(LT())},[]),x.useEffect(()=>{ZT=!0},[]),r}const qve=sZ.useId,cZ=qve||Bve;function Kve(){const r=new Map;return{emit(e,t){var n;(n=r.get(e))==null||n.forEach(i=>i(t))},on(e,t){r.has(e)||r.set(e,new Set),r.get(e).add(t)},off(e,t){var n;(n=r.get(e))==null||n.delete(t)}}}const Gve=x.createContext(null),Wve=x.createContext(null),u9=()=>{var r;return((r=x.useContext(Gve))==null?void 0:r.id)||null},h9=()=>x.useContext(Wve);function f9(r){return"data-floating-ui-"+r}function Wo(r){r.current!==-1&&(clearTimeout(r.current),r.current=-1)}function gg(r){const e=x.useRef(r);return Wf(()=>{e.current=r}),e}const HT=f9("safe-polygon");function cb(r,e,t){if(t&&!rw(t))return 0;if(typeof r=="number")return r;if(typeof r=="function"){const n=r();return typeof n=="number"?n:n==null?void 0:n[e]}return r==null?void 0:r[e]}function lb(r){return typeof r=="function"?r():r}function Yve(r,e){e===void 0&&(e={});const{open:t,onOpenChange:n,dataRef:i,events:o,elements:a}=r,{enabled:c=!0,delay:d=0,handleClose:u=null,mouseOnly:h=!1,restMs:p=0,move:m=!0}=e,v=h9(),_=u9(),b=gg(u),C=gg(d),T=gg(t),A=gg(p),I=x.useRef(),O=x.useRef(-1),B=x.useRef(),z=x.useRef(-1),R=x.useRef(!0),Y=x.useRef(!1),ue=x.useRef(()=>{}),le=x.useRef(!1),Te=x.useCallback(()=>{var W;const $=(W=i.current.openEvent)==null?void 0:W.type;return($==null?void 0:$.includes("mouse"))&&$!=="mousedown"},[i]);x.useEffect(()=>{if(!c)return;function W($){let{open:L}=$;L||(Wo(O),Wo(z),R.current=!0,le.current=!1)}return o.on("openchange",W),()=>{o.off("openchange",W)}},[c,o]),x.useEffect(()=>{if(!c||!b.current||!t)return;function W(L){Te()&&n(!1,L,"hover")}const $=nu(a.floating).documentElement;return $.addEventListener("mouseleave",W),()=>{$.removeEventListener("mouseleave",W)}},[a.floating,t,n,c,b,Te]);const ke=x.useCallback(function(W,$,L){$===void 0&&($=!0),L===void 0&&(L="hover");const D=cb(C.current,"close",I.current);D&&!B.current?(Wo(O),O.current=window.setTimeout(()=>n(!1,W,L),D)):$&&(Wo(O),n(!1,W,L))},[C,n]),xe=dc(()=>{ue.current(),B.current=void 0}),X=dc(()=>{if(Y.current){const W=nu(a.floating).body;W.style.pointerEvents="",W.removeAttribute(HT),Y.current=!1}}),q=dc(()=>i.current.openEvent?["click","mousedown"].includes(i.current.openEvent.type):!1);x.useEffect(()=>{if(!c)return;function W(N){if(Wo(O),R.current=!1,h&&!rw(I.current)||lb(A.current)>0&&!cb(C.current,"open"))return;const ae=cb(C.current,"open",I.current);ae?O.current=window.setTimeout(()=>{T.current||n(!0,N,"hover")},ae):t||n(!0,N,"hover")}function $(N){if(q()){X();return}ue.current();const ae=nu(a.floating);if(Wo(z),le.current=!1,b.current&&i.current.floatingContext){t||Wo(O),B.current=b.current({...i.current.floatingContext,tree:v,x:N.clientX,y:N.clientY,onClose(){X(),xe(),q()||ke(N,!0,"safe-polygon")}});const Ee=B.current;ae.addEventListener("mousemove",Ee),ue.current=()=>{ae.removeEventListener("mousemove",Ee)};return}(I.current==="touch"?!Sm(a.floating,N.relatedTarget):!0)&&ke(N)}function L(N){q()||i.current.floatingContext&&(b.current==null||b.current({...i.current.floatingContext,tree:v,x:N.clientX,y:N.clientY,onClose(){X(),xe(),q()||ke(N)}})(N))}function D(){Wo(O)}function Z(N){q()||ke(N,!1)}if(zt(a.domReference)){const N=a.domReference,ae=a.floating;return t&&N.addEventListener("mouseleave",L),m&&N.addEventListener("mousemove",W,{once:!0}),N.addEventListener("mouseenter",W),N.addEventListener("mouseleave",$),ae&&(ae.addEventListener("mouseleave",L),ae.addEventListener("mouseenter",D),ae.addEventListener("mouseleave",Z)),()=>{t&&N.removeEventListener("mouseleave",L),m&&N.removeEventListener("mousemove",W),N.removeEventListener("mouseenter",W),N.removeEventListener("mouseleave",$),ae&&(ae.removeEventListener("mouseleave",L),ae.removeEventListener("mouseenter",D),ae.removeEventListener("mouseleave",Z))}}},[a,c,r,h,m,ke,xe,X,n,t,T,v,C,b,i,q,A]),Wf(()=>{var W;if(c&&t&&(W=b.current)!=null&&W.__options.blockPointerEvents&&Te()){Y.current=!0;const L=a.floating;if(zt(a.domReference)&&L){var $;const D=nu(a.floating).body;D.setAttribute(HT,"");const Z=a.domReference,N=v==null||($=v.nodesRef.current.find(ae=>ae.id===_))==null||($=$.context)==null?void 0:$.elements.floating;return N&&(N.style.pointerEvents=""),D.style.pointerEvents="none",Z.style.pointerEvents="auto",L.style.pointerEvents="auto",()=>{D.style.pointerEvents="",Z.style.pointerEvents="",L.style.pointerEvents=""}}}},[c,t,_,a,v,b,Te]),Wf(()=>{t||(I.current=void 0,le.current=!1,xe(),X())},[t,xe,X]),x.useEffect(()=>()=>{xe(),Wo(O),Wo(z),X()},[c,a.domReference,xe,X]);const re=x.useMemo(()=>{function W($){I.current=$.pointerType}return{onPointerDown:W,onPointerEnter:W,onMouseMove($){const{nativeEvent:L}=$;function D(){!R.current&&!T.current&&n(!0,L,"hover")}h&&!rw(I.current)||t||lb(A.current)===0||le.current&&$.movementX**2+$.movementY**2<2||(Wo(z),I.current==="touch"?D():(le.current=!0,z.current=window.setTimeout(D,lb(A.current))))}}},[h,n,t,T,A]);return x.useMemo(()=>c?{reference:re}:{},[c,re])}function db(r,e){let t=r.filter(i=>{var o;return i.parentId===e&&((o=i.context)==null?void 0:o.open)}),n=t;for(;n.length;)n=r.filter(i=>{var o;return(o=n)==null?void 0:o.some(a=>{var c;return i.parentId===a.id&&((c=i.context)==null?void 0:c.open)})}),t=t.concat(n);return t}const nw="data-floating-ui-focusable";function Qve(r){return r?r.hasAttribute(nw)?r:r.querySelector("["+nw+"]")||r:null}const Xve={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},Jve={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},NT=r=>{var e,t;return{escapeKey:typeof r=="boolean"?r:(e=r==null?void 0:r.escapeKey)!=null?e:!1,outsidePress:typeof r=="boolean"?r:(t=r==null?void 0:r.outsidePress)!=null?t:!0}};function lZ(r,e){e===void 0&&(e={});const{open:t,onOpenChange:n,elements:i,dataRef:o}=r,{enabled:a=!0,escapeKey:c=!0,outsidePress:d=!0,outsidePressEvent:u="pointerdown",referencePress:h=!1,referencePressEvent:p="pointerdown",ancestorScroll:m=!1,bubbles:v,capture:_}=e,b=h9(),C=dc(typeof d=="function"?d:()=>!1),T=typeof d=="function"?C:d,A=x.useRef(!1),I=x.useRef(!1),{escapeKey:O,outsidePress:B}=NT(v),{escapeKey:z,outsidePress:R}=NT(_),Y=x.useRef(!1),ue=dc(q=>{var re;if(!t||!a||!c||q.key!=="Escape"||Y.current)return;const W=(re=o.current.floatingContext)==null?void 0:re.nodeId,$=b?db(b.nodesRef.current,W):[];if(!O&&(q.stopPropagation(),$.length>0)){let L=!0;if($.forEach(D=>{var Z;if((Z=D.context)!=null&&Z.open&&!D.context.dataRef.current.__escapeKeyBubbles){L=!1;return}}),!L)return}n(!1,Ove(q)?q.nativeEvent:q,"escape-key")}),le=dc(q=>{var re;const W=()=>{var $;ue(q),($=jh(q))==null||$.removeEventListener("keydown",W)};(re=jh(q))==null||re.addEventListener("keydown",W)}),Te=dc(q=>{var re;const W=A.current;A.current=!1;const $=I.current;if(I.current=!1,u==="click"&&$||W||typeof T=="function"&&!T(q))return;const L=jh(q),D="["+f9("inert")+"]",Z=nu(i.floating).querySelectorAll(D);let N=zt(L)?L:null;for(;N&&!ia(N);){const Ae=Es(N);if(ia(Ae)||!zt(Ae))break;N=Ae}if(Z.length&&zt(L)&&!Zve(L)&&!Sm(L,i.floating)&&Array.from(Z).every(Ae=>!Sm(N,Ae)))return;if(wi(L)&&X){const Ae=ia(L),Xe=Io(L),lt=/auto|scroll/,xt=Ae||lt.test(Xe.overflowX),wr=Ae||lt.test(Xe.overflowY),Gr=xt&&L.clientWidth>0&&L.scrollWidth>L.clientWidth,Mt=wr&&L.clientHeight>0&&L.scrollHeight>L.clientHeight,zn=Xe.direction==="rtl",so=Mt&&(zn?q.offsetX<=L.offsetWidth-L.clientWidth:q.offsetX>L.clientWidth),ma=Gr&&q.offsetY>L.clientHeight;if(so||ma)return}const ae=(re=o.current.floatingContext)==null?void 0:re.nodeId,He=b&&db(b.nodesRef.current,ae).some(Ae=>{var Xe;return ab(q,(Xe=Ae.context)==null?void 0:Xe.elements.floating)});if(ab(q,i.floating)||ab(q,i.domReference)||He)return;const Ee=b?db(b.nodesRef.current,ae):[];if(Ee.length>0){let Ae=!0;if(Ee.forEach(Xe=>{var lt;if((lt=Xe.context)!=null&&lt.open&&!Xe.context.dataRef.current.__outsidePressBubbles){Ae=!1;return}}),!Ae)return}n(!1,q,"outside-press")}),ke=dc(q=>{var re;const W=()=>{var $;Te(q),($=jh(q))==null||$.removeEventListener(u,W)};(re=jh(q))==null||re.addEventListener(u,W)});x.useEffect(()=>{if(!t||!a)return;o.current.__escapeKeyBubbles=O,o.current.__outsidePressBubbles=B;let q=-1;function re(Z){n(!1,Z,"ancestor-scroll")}function W(){window.clearTimeout(q),Y.current=!0}function $(){q=window.setTimeout(()=>{Y.current=!1},b2()?5:0)}const L=nu(i.floating);c&&(L.addEventListener("keydown",z?le:ue,z),L.addEventListener("compositionstart",W),L.addEventListener("compositionend",$)),T&&L.addEventListener(u,R?ke:Te,R);let D=[];return m&&(zt(i.domReference)&&(D=Ha(i.domReference)),zt(i.floating)&&(D=D.concat(Ha(i.floating))),!zt(i.reference)&&i.reference&&i.reference.contextElement&&(D=D.concat(Ha(i.reference.contextElement)))),D=D.filter(Z=>{var N;return Z!==((N=L.defaultView)==null?void 0:N.visualViewport)}),D.forEach(Z=>{Z.addEventListener("scroll",re,{passive:!0})}),()=>{c&&(L.removeEventListener("keydown",z?le:ue,z),L.removeEventListener("compositionstart",W),L.removeEventListener("compositionend",$)),T&&L.removeEventListener(u,R?ke:Te,R),D.forEach(Z=>{Z.removeEventListener("scroll",re)}),window.clearTimeout(q)}},[o,i,c,T,u,t,n,m,a,O,B,ue,z,le,Te,R,ke]),x.useEffect(()=>{A.current=!1},[T,u]);const xe=x.useMemo(()=>({onKeyDown:ue,...h&&{[Xve[p]]:q=>{n(!1,q.nativeEvent,"reference-press")},...p!=="click"&&{onClick(q){n(!1,q.nativeEvent,"reference-press")}}}}),[ue,n,h,p]),X=x.useMemo(()=>({onKeyDown:ue,onMouseDown(){I.current=!0},onMouseUp(){I.current=!0},[Jve[u]]:()=>{A.current=!0}}),[ue,u]);return x.useMemo(()=>a?{reference:xe,floating:X}:{},[a,xe,X])}function e4e(r){const{open:e=!1,onOpenChange:t,elements:n}=r,i=cZ(),o=x.useRef({}),[a]=x.useState(()=>Kve()),c=u9()!=null,[d,u]=x.useState(n.reference),h=dc((v,_,b)=>{o.current.openEvent=v?_:void 0,a.emit("openchange",{open:v,event:_,reason:b,nested:c}),t==null||t(v,_,b)}),p=x.useMemo(()=>({setPositionReference:u}),[]),m=x.useMemo(()=>({reference:d||n.reference||null,floating:n.floating||null,domReference:n.reference}),[d,n.reference,n.floating]);return x.useMemo(()=>({dataRef:o,open:e,onOpenChange:h,elements:m,events:a,floatingId:i,refs:p}),[e,h,m,a,i,p])}function dZ(r){r===void 0&&(r={});const{nodeId:e}=r,t=e4e({...r,elements:{reference:null,floating:null,...r.elements}}),n=r.rootContext||t,i=n.elements,[o,a]=x.useState(null),[c,d]=x.useState(null),h=(i==null?void 0:i.domReference)||o,p=x.useRef(null),m=h9();Wf(()=>{h&&(p.current=h)},[h]);const v=Nve({...r,elements:{...i,...c&&{reference:c}}}),_=x.useCallback(I=>{const O=zt(I)?{getBoundingClientRect:()=>I.getBoundingClientRect(),getClientRects:()=>I.getClientRects(),contextElement:I}:I;d(O),v.refs.setReference(O)},[v.refs]),b=x.useCallback(I=>{(zt(I)||I===null)&&(p.current=I,a(I)),(zt(v.refs.reference.current)||v.refs.reference.current===null||I!==null&&!zt(I))&&v.refs.setReference(I)},[v.refs]),C=x.useMemo(()=>({...v.refs,setReference:b,setPositionReference:_,domReference:p}),[v.refs,b,_]),T=x.useMemo(()=>({...v.elements,domReference:h}),[v.elements,h]),A=x.useMemo(()=>({...v,...n,refs:C,elements:T,nodeId:e}),[v,C,T,e,n]);return Wf(()=>{n.dataRef.current.floatingContext=A;const I=m==null?void 0:m.nodesRef.current.find(O=>O.id===e);I&&(I.context=A)}),x.useMemo(()=>({...v,context:A,refs:C,elements:T}),[v,C,T,A])}function t4e(){const r=navigator.userAgentData;return r&&Array.isArray(r.brands)?r.brands.map(e=>{let{brand:t,version:n}=e;return t+"/"+n}).join(" "):navigator.userAgent}function r4e(){return t4e().includes("jsdom/")}function n4e(r){if(!r||r4e())return!0;try{return r.matches(":focus-visible")}catch{return!0}}function ub(){return $ve()&&Mve()}function i4e(r,e){e===void 0&&(e={});const{open:t,onOpenChange:n,events:i,dataRef:o,elements:a}=r,{enabled:c=!0,visibleOnly:d=!0}=e,u=x.useRef(!1),h=x.useRef(-1),p=x.useRef(!0);x.useEffect(()=>{if(!c)return;const v=Zi(a.domReference);function _(){!t&&wi(a.domReference)&&a.domReference===$T(nu(a.domReference))&&(u.current=!0)}function b(){p.current=!0}function C(){p.current=!1}return v.addEventListener("blur",_),ub()&&(v.addEventListener("keydown",b,!0),v.addEventListener("pointerdown",C,!0)),()=>{v.removeEventListener("blur",_),ub()&&(v.removeEventListener("keydown",b,!0),v.removeEventListener("pointerdown",C,!0))}},[a.domReference,t,c]),x.useEffect(()=>{if(!c)return;function v(_){let{reason:b}=_;(b==="reference-press"||b==="escape-key")&&(u.current=!0)}return i.on("openchange",v),()=>{i.off("openchange",v)}},[i,c]),x.useEffect(()=>()=>{Wo(h)},[]);const m=x.useMemo(()=>({onMouseLeave(){u.current=!1},onFocus(v){if(u.current)return;const _=jh(v.nativeEvent);if(d&&zt(_)){if(ub()&&!v.relatedTarget){if(!p.current&&!Hve(_))return}else if(!n4e(_))return}n(!0,v.nativeEvent,"focus")},onBlur(v){u.current=!1;const _=v.relatedTarget,b=v.nativeEvent,C=zt(_)&&_.hasAttribute(f9("focus-guard"))&&_.getAttribute("data-type")==="outside";h.current=window.setTimeout(()=>{var T;const A=$T(a.domReference?a.domReference.ownerDocument:document);!_&&A===a.domReference||Sm((T=o.current.floatingContext)==null?void 0:T.refs.floating.current,A)||Sm(a.domReference,A)||C||n(!1,b,"focus")})}}),[o,a.domReference,n,d]);return x.useMemo(()=>c?{reference:m}:{},[c,m])}const DT="active",VT="selected";function hb(r,e,t){const n=new Map,i=t==="item";let o=r;if(i&&r){const{[DT]:a,[VT]:c,...d}=r;o=d}return{...t==="floating"&&{tabIndex:-1,[nw]:""},...o,...e.map(a=>{const c=a?a[t]:null;return typeof c=="function"?r?c(r):null:c}).concat(r).reduce((a,c)=>(c&&Object.entries(c).forEach(d=>{let[u,h]=d;if(!(i&&[DT,VT].includes(u)))if(u.indexOf("on")===0){if(n.has(u)||n.set(u,[]),typeof h=="function"){var p;(p=n.get(u))==null||p.push(h),a[u]=function(){for(var m,v=arguments.length,_=new Array(v),b=0;b<v;b++)_[b]=arguments[b];return(m=n.get(u))==null?void 0:m.map(C=>C(..._)).find(C=>C!==void 0)}}}else a[u]=h}),a),{})}}function uZ(r){r===void 0&&(r=[]);const e=r.map(c=>c==null?void 0:c.reference),t=r.map(c=>c==null?void 0:c.floating),n=r.map(c=>c==null?void 0:c.item),i=x.useCallback(c=>hb(c,r,"reference"),e),o=x.useCallback(c=>hb(c,r,"floating"),t),a=x.useCallback(c=>hb(c,r,"item"),n);return x.useMemo(()=>({getReferenceProps:i,getFloatingProps:o,getItemProps:a}),[i,o,a])}const o4e=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function a4e(r,e){var t,n;e===void 0&&(e={});const{open:i,elements:o,floatingId:a}=r,{enabled:c=!0,role:d="dialog"}=e,u=cZ(),h=((t=o.domReference)==null?void 0:t.id)||u,p=x.useMemo(()=>{var A;return((A=Qve(o.floating))==null?void 0:A.id)||a},[o.floating,a]),m=(n=o4e.get(d))!=null?n:d,_=u9()!=null,b=x.useMemo(()=>m==="tooltip"||d==="label"?{["aria-"+(d==="label"?"labelledby":"describedby")]:i?p:void 0}:{"aria-expanded":i?"true":"false","aria-haspopup":m==="alertdialog"?"dialog":m,"aria-controls":i?p:void 0,...m==="listbox"&&{role:"combobox"},...m==="menu"&&{id:h},...m==="menu"&&_&&{role:"menuitem"},...d==="select"&&{"aria-autocomplete":"none"},...d==="combobox"&&{"aria-autocomplete":"list"}},[m,p,_,i,h,d]),C=x.useMemo(()=>{const A={id:p,...m&&{role:m}};return m==="tooltip"||d==="label"?A:{...A,...m==="menu"&&{"aria-labelledby":h}}},[m,p,h,d]),T=x.useCallback(A=>{let{active:I,selected:O}=A;const B={role:"option",...I&&{id:p+"-fui-option"}};switch(d){case"select":return{...B,"aria-selected":I&&O};case"combobox":return{...B,"aria-selected":O}}return{}},[p,d]);return x.useMemo(()=>c?{reference:b,floating:C,item:T}:{},[c,b,C,T])}const s4e=Ve("div").withConfig({shouldForwardProp:()=>!0}).withConfig({displayName:"Tooltip__StyledTooltip",componentId:"sc-m2im2p-0"})(["inset:unset;border:0;overflow:visible;"," "," "," background:",";white-space:nowrap;&::before{content:'; Has tooltip: ';clip-path:inset(50%);height:1px;width:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;}&::backdrop{background-color:transparent;}"],Fa(pc.typography),Gl(pc.spacings),Ol(pc.border),pc.background),c4e=Ve.div.withConfig({displayName:"Tooltip__ArrowWrapper",componentId:"sc-m2im2p-1"})(["position:absolute;width:",";height:",";z-index:-1;"],pc.entities.arrow.width,pc.entities.arrow.height),l4e=Ve.svg.withConfig({displayName:"Tooltip__TooltipArrow",componentId:"sc-m2im2p-2"})(["width:",";height:",";position:absolute;fill:",";"],pc.entities.arrow.width,pc.entities.arrow.height,pc.background),d4e=x.forwardRef(function({title:e,placement:t="bottom",children:n,style:i,enterDelay:o=100,portalContainer:a,...c},d){const u=x.useRef(null),[h,p]=x.useState(!1),{rootElement:m}=Tc(),v=!!e&&typeof document<"u",{x:_,y:b,refs:C,strategy:T,context:A,middlewareData:{arrow:{x:I,y:O}={}},placement:B,elements:z}=dZ({placement:t,open:h,onOpenChange:p,middleware:[iZ(14),aZ(),oZ({padding:8}),Fve({element:u})],whileElementsMounted:D4}),R=x.useMemo(()=>Vu(C.setReference,n==null?void 0:n.ref),[C.setReference,n==null?void 0:n.ref]),Y=x.useMemo(()=>Vu(C.setFloating,d),[C.setFloating,d]),{getReferenceProps:ue,getFloatingProps:le}=uZ([Yve(A,{delay:{open:o}}),i4e(A),a4e(A,{role:"tooltip"}),lZ(A)]);x.useEffect(()=>{const xe={top:"bottom",right:"left",bottom:"top",left:"right"}[B.split("-")[0]];let X="none";switch(xe){case"right":X="rotateY(180deg)";break;case"left":X="none";break;case"top":X="rotate(90deg)";break;case"bottom":X="rotate(-90deg)";break}u.current&&Object.assign(u.current.style,{left:I!=null?`${I}px`:"",top:O!=null?`${O}px`:"",right:"",bottom:"",[xe]:"-6px",transform:X})});const Te=x.cloneElement(n,{...ue({ref:R,...n.props})});x.useEffect(()=>{z.floating&&z.floating.isConnected&&v&&h&&z.floating.showPopover()},[h,v,z.floating]);const ke=E.jsxs(s4e,{popover:"manual",...c,...le({ref:Y,className:`eds-tooltip ${c.className??""}`,style:{...i,position:T,top:b||0,left:_||0}}),children:[e,E.jsx(c4e,{ref:u,children:E.jsx(l4e,{className:"arrowSvg",children:E.jsx("path",{d:"M0.504838 4.86885C-0.168399 4.48524 -0.168399 3.51476 0.504838 3.13115L6 8.59227e-08L6 8L0.504838 4.86885Z"})})})]});return E.jsxs(E.Fragment,{children:[v&&h&&Uu.createPortal(ke,a??m??document.body),Te]})}),u4e=x.forwardRef(function({children:e,multiple:t,selectedIndexes:n,onChange:i,...o},a){const[c,d]=x.useState(n||[]);x.useEffect(()=>{Array.isArray(n)&&d(n)},[n]);function u(p,m,v){const _=p;if(x.isValidElement(p)){const b={"aria-pressed":m?!0:void 0,variant:m?"contained":"outlined",onClick:C=>{var A,I;(I=(A=_.props)==null?void 0:A.onClick)==null||I.call(A,C);let T=[v];t&&(T=c.includes(v)?c.filter(O=>O!==v):[...c,v]),d(T),i&&i(T)}};return x.cloneElement(p,b)}}const h=x.Children.map(e,(p,m)=>{const v=c.includes(m),_=p;if(x.isValidElement(p)&&p.type===d4e){const b=x.Children.map(_.props.children,C=>u(C,v,m));return x.cloneElement(_,null,b[0])}else return u(_,v,m)});return E.jsx(rZ,{ref:a,...o,children:h})}),da=xve;da.Group=rZ;da.Toggle=u4e;da.Group.displayName="Button.Group";da.Toggle.displayName="Button.Toggle";let iw={};const h4e=r=>{iw={...iw,...r}},f4e=r=>iw[r],p4e=Ve.svg.attrs(({$height:r,$width:e,fill:t})=>({name:null,xmlns:"http://www.w3.org/2000/svg",height:`${r}px`,width:`${e}px`,fill:t})).withConfig({displayName:"Icon__StyledSvg",componentId:"sc-6evbi1-0"})(["transform:",";"],({$rotation:r})=>r?`rotate(${r}deg)`:"none"),FT=Ve.path.attrs(({$height:r,$size:e})=>({size:null,fillRule:"evenodd",clipRule:"evenodd",transform:e/r!==1?`scale(${e/r})`:null})).withConfig({displayName:"Icon__StyledPath",componentId:"sc-6evbi1-1"})([""]),m4e=(r,e,t)=>{var i;const n=e??f4e(r);return t<24&&((i=n.sizes)==null?void 0:i.small)||n},g4e=x.forwardRef(function({size:e,color:t="currentColor",name:n,rotation:i,title:o,data:a,...c},d){const u=m4e(n,a,e);if(typeof u>"u")throw Error(`Icon "${n}" not found. Have you added it using Icon.add() or using data props?`);const h=e||parseInt(u.width),p=e||parseInt(u.height);let m={$height:h,$width:p,fill:t,viewBox:`0 0 ${p} ${h}`,$rotation:i,name:n,"aria-hidden":!0};const v={$height:u.height?parseInt(u.height):e,$size:e||parseInt(u.height)},_=tw(null,`${u.prefix}-${u.name}`);return o&&(m={...m,title:o,role:"img","aria-hidden":void 0,"aria-labelledby":_}),E.jsxs(p4e,{...m,...c,ref:d,children:[o&&E.jsx("title",{id:_,children:o}),Array.isArray(u.svgPathData)?u.svgPathData.map(b=>E.jsx(FT,{...v,d:b},b)):E.jsx(FT,{"data-testid":"eds-icon-path",...v,d:u.svgPathData})]})}),Pi=g4e;Pi.add=h4e;const{elevation:v4e,colors:{ui:{background__default:{rgba:y4e}}}}=tt,_4e={background:y4e},b4e=Ve.div.withConfig({displayName:"Paper__StyledPaper",componentId:"sc-6ncnv9-0"})(["background:",";box-shadow:",";"],_4e.background,({$elevation:r})=>r),p9=x.forwardRef(function({elevation:e="none",...t},n){const i={...t,$elevation:v4e[e]??"none"};return E.jsx(b4e,{...i,ref:n})}),{typography:hZ,colors:w4e,interactions:{focused:{width:x4e}}}=tt,{heading:C4e,paragraph:k4e}=hZ,{interactive:{primary__resting:{rgba:E4e},secondary__resting:{rgba:S4e},danger__resting:{rgba:A4e},warning__resting:{rgba:T4e},success__resting:{rgba:I4e},disabled__text:{rgba:R4e},focus:{rgba:P4e}}}=w4e,zT={primary:E4e,secondary:S4e,danger:A4e,warning:T4e,success:I4e,disabled:R4e},jT={...C4e,...k4e},UT={states:{focus:{outline:{width:x4e,color:P4e,style:"dashed",type:"outline",offset:"2px"}}}},M4e=(r,e)=>{if(e)return"a";switch(r){case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":return r;case"caption":case"overline":case"ingress":case"meta":case"body_short":case"body_long":default:return"p"}},$4e=(r,e)=>!e&&jT[r]?jT[r]:hZ[e][r],O4e=(r=null)=>typeof zT[r]>"u"?r:zT[r],Z4e=(r,e=!1,t=!1,n=!1)=>`${r}${e?"_bold":""}${t?"_italic":""}${n?"_link":""}`,L4e=Ve.p.withConfig({displayName:"Typography__StyledTypography",componentId:"sc-179guof-0"})([""," "," "," ",""],({$typography:r,$link:e})=>Fa(r,e),({$color:r})=>Nt({color:O4e(r)}),({$lines:r})=>r&&Nt(["display:-webkit-box;-webkit-line-clamp:",";-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;"],r),({$link:r})=>r&&Nt(["&:focus{outline:none;}&[data-focus-visible-added]:focus{","}&:focus-visible{","}"],Sc(UT.states.focus.outline),Sc(UT.states.focus.outline))),Am=x.forwardRef(function({variant:e="body_short",children:t,bold:n,italic:i,link:o,lines:a,color:c,group:d,token:u,as:h,...p},m){const v=h||M4e(e,o),_=Z4e(e,n,i,o),b=$4e(_,d);if(typeof b>"u")throw new Error(`Typography variant not found for variant "${_}" ("${e}") & group "${d||""}"`);return E.jsx(L4e,{as:v,$typography:{...b,...u},$link:o,$lines:a,ref:m,$color:c,...p,children:t})}),{spacings:{comfortable:{medium:op}},typography:{ui:{accordion_header:BT},paragraph:{body_long:H4e}},colors:{ui:{background__default:{rgba:N4e},background__scrim:{rgba:D4e}}},shape:{corners:{borderRadius:V4e}}}=tt,F4e={width:"252px",background:N4e,typography:BT,border:{type:"border",radius:V4e},spacings:{bottom:op},entities:{children:{spacings:{top:op,bottom:op,left:op,right:op}},title:{minHeight:"24px",typography:BT},content:{minHeight:"80px",height:"104px",typography:H4e},actions:{minHeight:"48px"},scrim:{background:D4e}},modes:{compact:{}}},z4e=Ve(p9).attrs({"aria-labelledby":"eds-dialog-title","aria-describedby":"eds-dialog-customcontent",elevation:"above_scrim"}).withConfig({displayName:"Dialog__StyledDialog",componentId:"sc-1mewo3f-0"})(({theme:r})=>Nt(["width:",";background:",";display:grid;grid-auto-columns:auto;",";",";grid-gap:",";"],r.width,r.background,Fa(r.typography),Ol(r.border),r.spacings.bottom)),j4e=Ve.dialog.withConfig({displayName:"Dialog__StyledNativeDialog",componentId:"sc-1mewo3f-1"})(({theme:r})=>Nt(["padding:0;border:0;overflow:visible;overscroll-behavior:contain;",";&::backdrop{background-color:",";}"],Ol(r.border),r.entities.scrim.background)),U4e=x.forwardRef(function({children:e,open:t,onClose:n,isDismissable:i=!1,dialogRef:o,...a},c){const{density:d}=Tc(),u=x.useRef(null),h=Gu({density:d},F4e),p=x.useMemo(()=>Vu(u,o),[u,o]);x.useEffect(()=>{var v,_;t?(v=u==null?void 0:u.current)==null||v.showModal():(_=u==null?void 0:u.current)==null||_.close()},[t]),uve(t);const m=v=>{const{target:_}=v;_ instanceof HTMLElement&&i&&_.nodeName==="DIALOG"&&n&&n()};return ew("Escape",v=>{v.preventDefault(),i&&n&&t&&n&&n()}),E.jsx(l1,{theme:h,children:E.jsx(j4e,{ref:p,onMouseDown:m,children:t&&E.jsx(z4e,{...a,ref:c,children:e})})})}),B4e=Ve.div.withConfig({displayName:"DialogActions__StyledDialogActions",componentId:"sc-16ydtxd-0"})(({theme:r,children:e})=>Nt(["align-self:end;justify-self:start;padding:0 "," 0 ",";&:first-child{padding-top:",";}&:last-child{padding-bottom:",";}",""],r.entities.children.spacings.right,r.entities.children.spacings.left,r.entities.children.spacings.top,r.entities.children.spacings.bottom,!e&&Nt(["min-height:initial;height:'8px';"]))),q4e=x.forwardRef(function({children:e,...t},n){return E.jsx(B4e,{ref:n,...t,children:e})}),K4e=Ve.div.withConfig({displayName:"DialogTitle__StyledDialogTitle",componentId:"sc-1t3jljt-0"})(({theme:r,children:e})=>Nt([""," min-height:",";align-self:end;justify-self:start;margin-right:",";",""],Fa(r.entities.title.typography),r.entities.title.minHeight,r.entities.children.spacings.right,!e&&Nt(["min-height:initial;height:'8px';"]))),G4e=x.forwardRef(function({children:e,...t},n){return E.jsx(E.Fragment,{children:E.jsx(K4e,{id:"eds-dialog-title",ref:n,...t,children:e})})}),{colors:{ui:{background__default:{rgba:W4e},background__light:{rgba:Y4e},background__medium:{rgba:Q4e}}},spacings:{comfortable:{small:qT,medium:KT}}}=tt,X4e={lighter:{background:W4e},light:{background:Y4e},mediumColor:{background:Q4e}},J4e={spacings:{top:qT,bottom:qT}},e5e={spacings:{top:KT,bottom:KT}},ow=Object.freeze(Object.defineProperty({__proto__:null,divider:X4e,medium:e5e,small:J4e},Symbol.toStringTag,{value:"Module"})),{divider:t5e}=ow,r5e=Ve.hr.withConfig({displayName:"Divider__StyledDivider",componentId:"sc-1d8osde-0"})(({$backgroundColor:r,$marginTop:e,$marginBottom:t,$dividerHeight:n})=>Nt(["border:none;background-color:",";margin-top:",";margin-bottom:calc("," - ","px);height:","px;"],r,e,t,n,n)),m9=x.forwardRef(function({color:e="medium",variant:t="medium",size:n="1",...i},o){const c={$backgroundColor:t5e[e==="medium"?"mediumColor":e].background,$marginTop:ow[t].spacings.top,$marginBottom:ow[t].spacings.bottom,$dividerHeight:parseInt(n),...i};return E.jsx(r5e,{...c,ref:o})}),n5e=Ve.div.withConfig({displayName:"DialogContent__StyledDialogContent",componentId:"sc-1tze18k-0"})(({theme:r,$scrollable:e})=>Nt(["--content-spacing-top:",";"," min-height:",";align-self:stretch;justify-self:stretch;padding:0 "," 0 ",";&:first-child{padding-top:var(--content-spacing-top);}&:last-child{padding-bottom:",";}",""],r.entities.children.spacings.top,Fa(r.entities.content.typography),r.entities.content.minHeight,r.entities.children.spacings.right,r.entities.children.spacings.left,r.entities.children.spacings.bottom,e&&Nt(["&:not(:first-child){margin-top:calc(var(--content-spacing-top) * -1);}padding-top:var(--content-spacing-top);margin-bottom:calc(var(--content-spacing-top) * -1);padding-bottom:var(--content-spacing-top);min-height:initial;height:",";overflow-y:auto;"],r.entities.content.height))),i5e=Ve(m9).withConfig({displayName:"DialogContent__StyledDivider",componentId:"sc-1tze18k-1"})(["width:100%;margin:0;"]),fZ=x.forwardRef(function({children:e,scrollable:t=!1,...n},i){const o={$scrollable:t,ref:i,...n};return E.jsxs(E.Fragment,{children:[E.jsx(n5e,{id:"eds-dialog-customcontent",...o,children:e}),e&&t&&E.jsx(i5e,{color:"medium",variant:"small"})]})}),o5e=Ve.div.withConfig({displayName:"DialogHeader__StyledDialogHeader",componentId:"sc-mbwcos-0"})(({theme:r})=>Nt(["display:flex;justify-content:space-between;align-items:center;padding:"," "," 0 ",";"],r.entities.children.spacings.top,r.entities.children.spacings.right,r.entities.children.spacings.left)),a5e=Ve(m9).withConfig({displayName:"DialogHeader__StyledDivider",componentId:"sc-mbwcos-1"})(["margin-bottom:0;"]),s5e=x.forwardRef(function({children:e,...t},n){const i={...t,ref:n};return E.jsxs("div",{...i,children:[E.jsx(o5e,{children:e}),E.jsx(a5e,{variant:"small",color:"medium"})]})}),gn=U4e;gn.Actions=q4e;gn.Title=G4e;gn.CustomContent=fZ;gn.Content=fZ;gn.Header=s5e;gn.Actions.displayName="Dialog.Actions";gn.Title.displayName="Dialog.Title";gn.Content.displayName="Dialog.Content";gn.Header.displayName="Dialog.Header";const c5e=Ve.div.withConfig({displayName:"SnackbarAction__StyledSnackbarAction",componentId:"sc-1v5mjvd-0"})(({theme:r})=>Nt(["display:inline-flex;margin-left:",";margin-top:",";margin-bottom:",";"],r.entities.actions.spacings.left,r.entities.actions.spacings.top,r.entities.actions.spacings.bottom)),l5e=x.forwardRef(function({children:e,...t},n){const i={...t,ref:n};return E.jsx(c5e,{...i,children:x.Children.only(e)})}),{typography:{ui:{snackbar:d5e}},colors:{ui:{background__overlay:{rgba:u5e}},text:{static_icons__primary_white:{rgba:h5e}},interactive:{link_in_snackbars:{rgba:f5e}}},spacings:{comfortable:{medium:vg,x_large:p5e}},clickbounds:{default__base:m5e},shape:{button:{borderRadius:g5e}}}=tt,v5e={background:u5e,minHeight:m5e,border:{type:"border",width:0,radius:g5e},entities:{actions:{spacings:{left:p5e,top:"-10px",bottom:"-10px"}},button:{typography:{color:f5e}}},spacings:{left:vg,bottom:vg,right:vg,top:vg},typography:{...d5e,color:h5e},modes:{compact:{}}},y5e=Ve("div").withConfig({shouldForwardProp:()=>!0,displayName:"Snackbar__PopoverDiv",componentId:"sc-ac6no8-0"})(({theme:r,$placement:e})=>Nt(["inset:unset;border:0;overflow:visible;position:fixed;padding:0;background-color:transparent;"," &::backdrop{background-color:transparent;}"],{top:e.includes("top")?r.spacings.top:e==="left"||e==="right"?"50%":void 0,bottom:e.includes("bottom")?r.spacings.bottom:void 0,right:e.includes("right")?r.spacings.right:void 0,left:e.includes("left")?r.spacings.left:e==="top"||e==="bottom"?"50%":void 0,transform:e==="left"||e==="right"?"translateY(-50%)":e==="top"||e==="bottom"?"translateX(-50%)":void 0})),_5e=Ve(p9).withConfig({displayName:"Snackbar__StyledSnackbar",componentId:"sc-ac6no8-1"})(({theme:r})=>Nt(["background-color:",";"," "," "," min-height:",";box-sizing:border-box;a,button{color:",";}"],r.background,Gl(r.spacings),Ol(r.border),Fa(r.typography),r.minHeight,r.entities.button.typography.color)),b5e=x.forwardRef(function({open:e=!1,autoHideDuration:t=7e3,onClose:n,placement:i="bottom",children:o,...a},c){const[d,u]=x.useState(e),h=x.useRef();x.useEffect(()=>(u(e),e&&(h.current=setTimeout(()=>{u(!1),n&&n()},t)),()=>clearTimeout(h.current)),[e,t]);const p={ref:c,...a},{density:m}=Tc(),v=Gu({density:m},v5e);return E.jsx(l1,{theme:v,children:d&&E.jsx(y5e,{popover:"manual",$placement:i,ref:_=>_==null?void 0:_.showPopover(),children:E.jsx(_5e,{role:"alert",elevation:"overlay",...p,children:o})})})}),pZ=b5e;pZ.Action=l5e;const{colors:{infographic:{primary__moss_green_13:{rgba:w5e},primary__moss_green_100:{rgba:x5e}},interactive:{icon_on_interactive_colors:{rgba:C5e}},ui:{background__semitransparent:{rgba:k5e}}}}=tt,E5e={background:w5e,entities:{progress:{background:x5e}}},S5e={background:k5e,entities:{progress:{background:C5e}}},GT=Object.freeze(Object.defineProperty({__proto__:null,neutral:S5e,primary:E5e},Symbol.toStringTag,{value:"Module"})),A5e=bge(["100%{transform:rotate(360deg);}"]),T5e=Ve.svg.withConfig({displayName:"CircularProgress__Svg",componentId:"sc-hib054-0"})(["display:inline-block;",";"],({$variant:r})=>r==="indeterminate"?Nt(["animation:"," 1.4s linear infinite;"],A5e):Nt(["transform:rotate(-90deg);"])),I5e=Ve.output.withConfig({displayName:"CircularProgress__SrOnlyOutput",componentId:"sc-hib054-1"})(["position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0;"]),R5e=Ve.circle.withConfig({displayName:"CircularProgress__TrackCircle",componentId:"sc-hib054-2"})([""]),P5e=Ve.circle.withConfig({displayName:"CircularProgress__ProgressCircle",componentId:"sc-hib054-3"})([""]),M5e=r=>GT[r]?GT[r]:{background:"transparent",entities:{progress:{background:r}}},$5e=x.forwardRef(function({variant:e="indeterminate",value:t=null,size:n=48,color:i="primary",...o},a){const d=Math.round(t),u={},h={...o,ref:a,$variant:e},p=M5e(i),[m,v]=x.useState(0),_=2*Math.PI*(44/2);e==="determinate"&&(u.stroke=_.toFixed(3),u.strokeDashoffset=`${((100-d)/100*_).toFixed(3)}px`,h["aria-valuenow"]=d,t!==void 0&&(h["aria-valuenow"]=d,h["aria-valuemin"]=0,h["aria-valuemax"]=100)),x.useEffect(()=>{e!=="indeterminate"&&(d>=25&&d<50?v(25):d>=50&&d<75?v(50):d>=75&&d<100?v(75):d===100&&v(100))},[d,e]);const b=()=>`Loading ${m}%`;return E.jsxs(E.Fragment,{children:[E.jsxs(T5e,{...h,viewBox:"24 24 48 48",role:"progressbar",height:n,width:n,preserveAspectRatio:"xMidYMid meet",children:[E.jsx(R5e,{style:u,cx:48,cy:48,r:44/2,fill:"none",strokeWidth:4,stroke:p.background}),E.jsx(P5e,{style:u,cx:48,cy:48,r:44/2,fill:"none",strokeLinecap:"round",strokeWidth:4,strokeDasharray:e==="determinate"?_:48,stroke:p.entities.progress.background})]}),e==="determinate"&&E.jsx(I5e,{children:b()})]})}),mZ={focusedIndex:-1,initialFocus:null,onClose:null},gZ=x.createContext(mZ),O5e=({children:r})=>{const[e,t]=x.useState(mZ),{focusedIndex:n,initialFocus:i,onClose:o}=e,a=h=>{t(p=>({...p,focusedIndex:h}))},c=h=>{t(p=>({...p,initialFocus:h}))},u={setFocusedIndex:a,focusedIndex:n,setInitialFocus:c,initialFocus:i,setOnClose:h=>{const p=()=>{a(-1),c(null),h()};t(m=>({...m,onClose:p}))},onClose:o};return E.jsx(gZ.Provider,{value:u,children:r})},g9=()=>x.useContext(gZ),{colors:{ui:{background__default:{rgba:Z5e}},interactive:{primary__selected_highlight:{rgba:L5e},primary__resting:{rgba:H5e},focus:{rgba:N5e},disabled__fill:{rgba:D5e},disabled__text:{rgba:V5e},table__header__fill_hover:{rgba:F5e}},text:{static_icons__default:{rgba:z5e}}},spacings:{comfortable:{medium:WT,large:Mh,small:$h}},typography:{navigation:{menu_title:fb}}}=tt,M2={background:Z5e,spacings:{top:$h,bottom:$h,left:"0px",right:"0px"},border:{type:"border",radius:"4px"},typography:{...fb,color:z5e},entities:{icon:{states:{disabled:{typography:{color:D5e}}}},item:{spacings:{left:Mh,right:Mh,top:WT,bottom:WT},states:{active:{typography:{...fb,color:H5e},background:L5e},focus:{outline:{color:N5e,style:"dashed",type:"outline",width:"2px",offset:"2px"}},hover:{background:F5e},disabled:{typography:{...fb,color:V5e}}}},title:{spacings:{left:Mh,right:Mh,top:$h,bottom:$h}}},modes:{compact:{entities:{item:{spacings:{left:Mh,right:Mh,top:$h,bottom:$h}}}}}},{typography:j5e,entities:{item:{states:{active:YT,focus:U5e,hover:B5e,disabled:q5e}},icon:K5e}}=M2,G5e=Ve.button.attrs(({$isFocused:r})=>({role:"menuitem",tabIndex:r?-1:0})).withConfig({displayName:"MenuItem__Item",componentId:"sc-1g9fpbe-0"})(["border:0;background-color:transparent;width:auto;position:relative;z-index:2;text-decoration:none;"," "," "," ",""],Fa(j5e),({theme:r})=>Gl(r.entities.item.spacings),({$active:r})=>r&&Nt(["background:",";*{color:",";}"],YT.background,YT.typography.color),({disabled:r})=>r?Nt(["*{color:",";}svg{fill:",";}@media (hover:hover) and (pointer:fine){&:hover{cursor:not-allowed;}}"],q5e.typography.color,K5e.states.disabled.typography.color):Nt(["@media (hover:hover) and (pointer:fine){&:hover{cursor:pointer;background:",";}}&:focus-visible{z-index:3;","}"],B5e.background,Sc(U5e.outline))),W5e=Ve.div.withConfig({displayName:"MenuItem__Content",componentId:"sc-1g9fpbe-1"})(["width:auto;display:grid;grid-gap:16px;grid-auto-flow:column;grid-auto-columns:max-content auto max-content;align-items:center;"]),n5=x.forwardRef(function({children:e,disabled:t,active:n,index:i=0,as:o="button",onClick:a,closeMenuOnClick:c=!0,...d},u){const{focusedIndex:h,setFocusedIndex:p,onClose:m}=g9(),v=C=>{h!==C&&p(C)},_=i===h,b={...d,as:o,disabled:t,$isFocused:_};return E.jsx(G5e,{...b,$active:n,type:"button",ref:Vu(u,C=>{_&&requestAnimationFrame(()=>{C!==null&&C.focus()})}),onFocus:()=>v(i),onClick:C=>{a&&(a(C),m!==null&&c&&m(C))},children:E.jsx(W5e,{children:e})})});n5.displayName="MenuItem";const Y5e=Ve.div.attrs(()=>({tabIndex:0})).withConfig({displayName:"MenuSection__Header",componentId:"sc-gfcbvg-0"})([""," &:focus{outline:none;}"],Gl(M2.entities.title.spacings)),vZ=x.memo(function(e){const{children:t,title:n,index:i}=e;return E.jsxs(E.Fragment,{children:[i!==0&&E.jsx("div",{children:E.jsx(m9,{variant:"small"})}),n&&E.jsx(Y5e,{role:"group",children:E.jsx(Am,{group:"navigation",variant:"label",children:n})}),t]})}),Q5e=Ve.div.withConfig({displayName:"MenuList__List",componentId:"sc-104rzof-0"})(["position:relative;list-style:none;display:flex;flex-direction:column;margin:0;"," li:first-child{z-index:3;}"],Gl(M2.spacings));function QT(r){return!!(x.isValidElement(r)&&!r.props.disabled&&r.type===n5)}function X5e(r){return!!(x.isValidElement(r)&&r.type===n5&&r.props.closeMenuOnClick!==!1)}const J5e=x.forwardRef(function({addCloseMenuOnClickIndex:e,children:t,...n},i){const{focusedIndex:o,setFocusedIndex:a,initialFocus:c}=g9();let d=-1;const u=x.useMemo(()=>[],[]),h=x.useMemo(()=>x.Children.map(t,b=>{if(!b)return b;if(b.type===vZ){d++;const C=d,T=x.Children.map(b.props.children,A=>(d++,QT(A)&&u.push(d),x.cloneElement(A,{index:d})));return x.cloneElement(b,{index:C},T)}else return d++,QT(b)&&u.push(d),X5e(b)&&e(d),x.cloneElement(b,{index:d})}),[t,u,d,e]),p=u[0],m=u[u.length-1];x.useEffect(()=>{c==="first"&&a(p),c==="last"&&a(m)},[c,p,m]);const v=(b,C)=>{const T=b==="down"?1:-1,A=u.indexOf(o),I=u[A+T];a(typeof I>"u"?C:I)},_=b=>{const{key:C}=b;b.stopPropagation(),C==="ArrowDown"&&(b.preventDefault(),v("down",p)),C==="ArrowUp"&&(b.preventDefault(),v("up",m))};return E.jsx(Q5e,{onKeyDown:_,role:"menu",...n,ref:i,children:h})}),{border:eye}=M2,tye=Ve(p9).withConfig({displayName:"Menu__MenuPaper",componentId:"sc-1vlnqcj-0"})(["width:100%;min-width:fit-content;",";"],Ol(eye)),rye=Ve("div").withConfig({shouldForwardProp:()=>!0}).withConfig({displayName:"Menu__StyledPopover",componentId:"sc-1vlnqcj-1"})(["inset:unset;border:0;padding:0;margin:0;overflow:visible;background-color:transparent;&::backdrop{background-color:transparent;}"]),nye=x.forwardRef(function({children:e,anchorEl:t,onClose:n,open:i,...o},a){const{setOnClose:c,onClose:d,setInitialFocus:u,focusedIndex:h}=g9(),p=x.useMemo(()=>[],[]);x.useEffect(()=>{d===null&&n&&c(n)},[d,n,c]),x.useEffect(()=>{const v=_=>{const{key:b}=_;switch((b==="ArrowDown"||b==="ArrowUp")&&(_.preventDefault(),_.stopPropagation(),t.dispatchEvent(new Event("click",{bubbles:!0}))),b){case"Enter":case"ArrowDown":u("first");break;case"ArrowUp":u("last");break}};return t&&t.addEventListener("keydown",v),()=>{t&&t.removeEventListener("keydown",v)}},[t]),ew("Escape",()=>{i&&d!==null&&(d(),t.focus())}),ew("Enter",()=>{i&&d!==null&&p.includes(h)&&setTimeout(()=>{window.document.contains(t)&&t.focus()},0)});const m=v=>{p.indexOf(v)<0&&p.push(v)};return E.jsx(J5e,{addCloseMenuOnClickIndex:m,...o,ref:a,children:e})}),iye=x.forwardRef(function({anchorEl:e,open:t,placement:n="bottom",matchAnchorWidth:i=!1,onClose:o,style:a,className:c,...d},u){const{density:h}=Tc(),p=Gu({density:h},M2);let m=[iZ(4),aZ(),oZ({padding:8})];i&&(m=[...m,Vve({apply({rects:R,elements:Y}){Object.assign(Y.floating.style,{width:`${R.reference.width}px`})}})]);const{x:v,y:_,refs:b,update:C,strategy:T,context:A}=dZ({elements:{reference:e},placement:n,open:t,onOpenChange:o,middleware:m}),I=x.useMemo(()=>Vu(b.setFloating,u),[b.setFloating,u]);PT(()=>{if(b.reference.current&&b.floating.current&&t)return D4(b.reference.current,b.floating.current,C)},[b.reference,b.floating,C,t]),PT(()=>{var R,Y;t?(R=b.floating.current)==null||R.showPopover():(Y=b.floating.current)==null||Y.hidePopover()},[t,b.floating]);const{getFloatingProps:O}=uZ([lZ(A,{escapeKey:!1})]),B={className:c},z={...d,onClose:o,anchorEl:e,open:t};return E.jsx(l1,{theme:p,children:E.jsx(rye,{popover:"manual",...O({ref:I,style:{...a,position:T,top:_||0,left:v||0}}),children:E.jsx(tye,{elevation:"raised",...B,children:E.jsx(O5e,{children:E.jsx(nye,{...z,ref:u})})})})})}),Yf=iye;Yf.Item=n5;Yf.Section=vZ;Yf.Item.displayName="Menu.Item";Yf.Section.displayName="Menu.Section";const{colors:{ui:{background__light:{rgba:oye}},text:{static_icons__default:aye,static_icons__tertiary:pb},interactive:{disabled__text:XT,primary__resting:sye,danger__resting:cye,danger__hover:JT,warning__resting:lye,warning__hover:eI,success__resting:dye,success__hover:tI}},spacings:{comfortable:{small:rI,x_small:yg}},typography:Tm,shape:nI}=tt,i5={minHeight:nI.straight.minHeight,background:oye,spacings:{left:rI,right:rI,top:"6px",bottom:"6px"},typography:{...Tm.input.text,color:aye.rgba},entities:{placeholder:{typography:{color:pb.rgba}},helperText:{typography:{...Tm.input.label,color:pb.rgba},states:{disabled:{typography:{color:XT.rgba}}}}},states:{disabled:{typography:{color:XT.rgba}},readOnly:{background:"transparent",boxShadow:"none"},active:{outline:{type:"outline",color:"transparent",width:"1px",style:"solid",offset:"0px"}},focus:{outline:{type:"outline",width:"2px",color:sye.rgba,style:"solid",offset:"0px"}}},boxShadow:"inset 0px -1px 0px 0px "+pb.rgba,modes:{compact:{minHeight:nI._modes.compact.straight.minHeight,spacings:{left:yg,right:yg,top:yg,bottom:yg}}}},uye=vn(i5,{boxShadow:"none",outline:{color:cye.rgba},states:{focus:{outline:{color:JT.rgba}}},entities:{helperText:{typography:{...Tm.input.label,color:JT.rgba}}}}),hye=vn(i5,{boxShadow:"none",outline:{color:lye.rgba},states:{focus:{outline:{color:eI.rgba}}},entities:{helperText:{typography:{...Tm.input.label,color:eI.rgba}}}}),fye=vn(i5,{boxShadow:"none",outline:{color:dye.rgba},states:{focus:{outline:{color:tI.rgba}}},entities:{helperText:{typography:{...Tm.input.label,color:tI.rgba}}}}),pye={input:i5,error:uye,warning:hye,success:fye},{colors:iI,typography:mye}=tt,yZ={background:iI.ui.background__light.hex,typography:{...mye.input.helper,color:iI.text.static_icons__tertiary.rgba}},gye=Ve.div.withConfig({displayName:"HelperText__Container",componentId:"sc-189ug61-0"})(({color:r})=>Nt({display:"grid",gap:"8px",gridAutoFlow:"column",alignItems:"start",justifyContent:"start",color:r})),vye=Ve.p.withConfig({displayName:"HelperText__Text",componentId:"sc-189ug61-1"})(["margin:0;",";white-space:pre-line;"],d9(yZ.typography)),yye=x.forwardRef(function({text:e,icon:t,color:n=yZ.typography.color,...i},o){return e?E.jsxs(gye,{...i,color:n,ref:o,children:[t,E.jsx(vye,{children:e})]}):null}),{colors:mb,spacings:{comfortable:oI},typography:_ye}=tt,ap={background:mb.ui.background__light.rgba,typography:{..._ye.input.label,color:mb.text.static_icons__tertiary.rgba},spacings:{left:oI.small,right:oI.small},states:{disabled:{typography:{color:mb.interactive.disabled__text.rgba}}}},bye=Ve.label.withConfig({displayName:"Label__LabelBase",componentId:"sc-1gi2bcn-0"})(["display:flex;justify-content:space-between;align-items:flex-end;position:relative;"," margin-left:",";margin-right:",";color:",";"],Fa(ap.typography),ap.spacings.left,ap.spacings.right,({$disabledText:r})=>r?ap.states.disabled.typography.color:ap.typography.color),aI=Ve.span.withConfig({displayName:"Label__Text",componentId:"sc-1gi2bcn-1"})(["margin:0;"]),Im=x.forwardRef(function(e,t){const{label:n="",meta:i,disabled:o=!1,...a}=e;return E.jsxs(bye,{ref:t,$disabledText:o,...a,children:[E.jsx(aI,{children:n}),i&&E.jsx(aI,{children:i})]})}),wye=Ve.div.withConfig({displayName:"InputWrapper__Container",componentId:"sc-v6o9z1-0"})([""]),xye=Ve(yye).withConfig({displayName:"InputWrapper__HelperText",componentId:"sc-v6o9z1-1"})(["margin-top:8px;margin-left:8px;"]),Cye=Ve(Im).withConfig({displayName:"InputWrapper__Label",componentId:"sc-v6o9z1-2"})(["margin-left:8px;margin-right:8px;"]),_Z=x.forwardRef(function({children:e,color:t,label:n,labelProps:i={},helperProps:o={},helperIcon:a,...c},d){const{density:u}=Tc(),p=pye[t||"input"],m=Gu({density:u},p),v=x.useCallback(()=>{const C=m();return c.disabled?C.entities.helperText.states.disabled.typography.color:C.entities.helperText.typography.color},[m,c.disabled])(),_=!!(o!=null&&o.text),b=!!(n||i!=null&&i.label);return E.jsx(l1,{theme:m,children:E.jsxs(wye,{...c,ref:d,children:[b&&E.jsx(Cye,{label:n,...i}),e,_&&E.jsx(xye,{color:v,icon:a,...o})]})})}),{colors:{ui:{background__light:{rgba:kye}},text:{static_icons__default:Eye,static_icons__tertiary:gb},interactive:{disabled__text:sI,primary__resting:Sye,danger__resting:cI,danger__hover:lI,warning__resting:dI,warning__hover:uI,success__resting:hI,success__hover:fI}},spacings:{comfortable:{small:_g,x_small:bg}},typography:Rm,shape:pI}=tt,d1={height:pI.straight.minHeight,width:"100%",background:kye,spacings:{left:_g,right:_g,top:"6px",bottom:"6px"},typography:{...Rm.input.text,color:Eye.rgba},outline:{type:"outline",color:"transparent",width:"1px",style:"solid",offset:"0px"},entities:{placeholder:{typography:{color:gb.rgba}},adornment:{typography:{...Rm.input.label,color:gb.rgba},spacings:{left:_g,right:_g},states:{disabled:{typography:{color:sI.rgba}}}}},states:{disabled:{typography:{color:sI.rgba}},readOnly:{background:"transparent",boxShadow:"none"},active:{},focus:{outline:{type:"outline",width:"2px",color:Sye.rgba,style:"solid",offset:"0px"}}},boxShadow:"inset 0px -1px 0px 0px "+gb.rgba,modes:{compact:{height:pI._modes.compact.straight.minHeight,spacings:{left:bg,right:bg,top:bg,bottom:bg}}}},bZ=vn(d1,{boxShadow:"none",outline:{color:cI.rgba},states:{focus:{outline:{color:lI.rgba}}},entities:{adornment:{typography:{...Rm.input.label,color:cI.rgba},states:{focus:{outline:{color:lI.rgba}}}}}}),wZ=vn(d1,{boxShadow:"none",outline:{color:dI.rgba},states:{focus:{outline:{color:uI.rgba}}},entities:{adornment:{typography:{...Rm.input.label,color:dI.rgba},states:{focus:{outline:{color:uI.rgba}}}}}}),xZ=vn(d1,{boxShadow:"none",outline:{color:hI.rgba},states:{focus:{outline:{color:fI.rgba}}},entities:{adornment:{typography:{...Rm.input.label,color:hI.rgba},states:{focus:{outline:{color:fI.rgba}}}}}}),qg={input:d1,error:bZ,warning:wZ,success:xZ},Aye=Object.freeze(Object.defineProperty({__proto__:null,error:bZ,input:d1,inputToken:qg,success:xZ,warning:wZ},Symbol.toStringTag,{value:"Module"})),Tye=Ve.div.withConfig({displayName:"Input__Container",componentId:"sc-1ykv024-0"})(({$token:r,disabled:e,readOnly:t})=>{var o,a;const{states:n,entities:i}=r;return Nt(["--eds-input-adornment-color:",";--eds-input-color:",";position:relative;height:",";width:",";display:flex;flex-direction:row;border:none;box-sizing:border-box;box-shadow:",";background:var(--eds-input-background,",");"," &:focus-within{--eds-input-adornment-color:",";box-shadow:none;","}"," "," & > input{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;}"],i.adornment.typography.color,r.typography.color,r.height,r.width,r.boxShadow,r.background,Sc(r.outline),(a=(o=i.adornment)==null?void 0:o.states.focus)==null?void 0:a.outline.color,Sc(n.focus.outline),e&&Nt(["--eds-input-adornment-color:",";--eds-input-color:",";cursor:not-allowed;box-shadow:none;"],n.disabled.typography.color,n.disabled.typography.color),t&&Nt({background:n.readOnly.background,boxShadow:n.readOnly.boxShadow}))}),Iye=Ve.input.withConfig({displayName:"Input__StyledInput",componentId:"sc-1ykv024-1"})(({$token:r,$paddingLeft:e,$paddingRight:t})=>Nt(["width:100%;border:none;background:transparent;"," "," outline:none;padding-left:",";padding-right:",";&::placeholder{color:",";}&:disabled{color:var(--eds-input-color);cursor:not-allowed;}"],Gl(r.spacings),d9(r.typography),e,t,r.entities.placeholder.typography.color)),CZ=Ve.div.withConfig({displayName:"Input__Adornments",componentId:"sc-1ykv024-2"})(({$token:r})=>Nt(["position:absolute;top:",";bottom:",";display:flex;align-items:center;"," color:var(--eds-input-adornment-color);"],r.spacings.top,r.spacings.bottom,d9(r.entities.adornment.typography))),Rye=Ve(CZ).withConfig({displayName:"Input__LeftAdornments",componentId:"sc-1ykv024-3"})(({$token:r})=>Nt(["left:0;padding-left:",";"],r.entities.adornment.spacings.left)),Pye=Ve(CZ).withConfig({displayName:"Input__RightAdornments",componentId:"sc-1ykv024-4"})(({$token:r})=>Nt(["right:0;padding-right:",";"],r.entities.adornment.spacings.right)),Fu=x.forwardRef(function({variant:e,disabled:t=!1,type:n="text",leftAdornments:i,rightAdornments:o,readOnly:a,className:c,style:d,leftAdornmentsProps:u,rightAdornmentsProps:h,leftAdornmentsWidth:p,rightAdornmentsWidth:m,...v},_){const b=qg[e]?qg[e]:qg.input,{density:C}=Tc(),T=Gu({density:C},b)(),[A,I]=x.useState(),[O,B]=x.useState(),z=x.useCallback(()=>{const Te=p||(O?O.clientWidth:0),ke=m||(A?A.clientWidth:0);return{...T,spacings:{...T.spacings,left:`${Te+parseInt(T.spacings.left)}px`,right:`${ke+parseInt(T.spacings.right)}px`}}},[p,O,m,A,T])(),R={ref:_,type:n,disabled:t,readOnly:a,$token:z,style:{resize:"none"},...v},Y={disabled:t,readOnly:a,className:c,style:d,$token:z},ue={...u,ref:B,$token:z},le={...h,ref:I,$token:z};return E.jsxs(Tye,{...Y,children:[i?E.jsx(Rye,{...ue,children:i}):null,E.jsx(Iye,{$paddingLeft:z.spacings.left,$paddingRight:z.spacings.right,...R}),o?E.jsx(Pye,{...le,children:o}):null]})}),{input:mI}=Aye,Mye=x.forwardRef(function({variant:e,disabled:t=!1,type:n="text",rowsMax:i,...o},a){const[c,d]=x.useState(null),{density:u}=Tc(),h=u==="compact"?mI.modes.compact.spacings:mI.spacings,{lineHeight:p}=d1.typography,{top:m,bottom:v}=h;let _=16;c&&(_=parseInt(window.getComputedStyle(c).fontSize));const b=parseInt(m)+parseInt(v),C=parseFloat(p)*_*i+b;sve(c,i?C:null);const A={ref:x.useCallback(()=>Vu(a,d),[d,a])(),type:n,disabled:t,variant:e,...o},I={style:{alignItems:"flex-start"}},O={style:{alignItems:"flex-start",pointerEvents:"none"}};return E.jsx(Fu,{as:"textarea",rightAdornmentsProps:O,leftAdornmentsProps:I,style:{height:"auto"},...A})}),$ye=x.forwardRef(function(e,t){return e.$multiline?E.jsx(Mye,{ref:t,...e}):E.jsx(Fu,{ref:t,...e})}),kZ=x.forwardRef(function({id:e,label:t,meta:n,unit:i,helperText:o,placeholder:a,disabled:c,multiline:d=!1,className:u,variant:h,inputIcon:p,helperIcon:m,style:v,rowsMax:_,textareaRef:b,inputRef:C,...T},A){const I=tw(e,"input"),O=tw(null,"helpertext");let z={"aria-invalid":h==="error"||void 0,disabled:c,placeholder:a,id:I,variant:h,rightAdornments:!!(i||p)&&E.jsxs(E.Fragment,{children:[p,E.jsx("span",{children:i})]}),rowsMax:_,ref:C||b,$multiline:d,...T},R={id:null,text:o,icon:m,disabled:c};const Y={ref:A,className:u,style:{width:"100%",...v},color:h},ue={htmlFor:I,label:t,meta:n,disabled:c};return o&&(z={"aria-describedby":O,...z},R={...R,id:O}),E.jsx(_Z,{helperProps:R,labelProps:ue,...Y,children:E.jsx($ye,{...z})})}),Oye=Ve(Fu).withConfig({displayName:"Search__SearchInput",componentId:"sc-v8l23u-0"})(["input{&[type='search']::-webkit-search-decoration,&[type='search']::-webkit-search-cancel-button,&[type='search']::-webkit-search-results-button,&[type='search']::-webkit-search-results-decoration{-webkit-appearance:none;}}"]),Zye=Ve(da).withConfig({displayName:"Search__InsideButton",componentId:"sc-v8l23u-1"})(["height:24px;width:24px;"]),Lye=x.forwardRef(function({onChange:e,style:t,className:n,...i},o){const a=x.useRef(null),[c,d]=x.useState(!!i.defaultValue);x.useEffect(()=>{i.disabled?d(!1):i.value&&d(!!i.value)},[i.value,i.disabled]);const u=()=>{const m=a.current;hve(m,"")},h=m=>{d(!!m.currentTarget.value)},p=x.useMemo(()=>Vu(a,o),[a,o]);return E.jsx(_Z,{role:"search",style:t,className:n,children:E.jsx(Oye,{onChange:m=>{h(m),e&&e(m)},ref:p,leftAdornmentsWidth:32,leftAdornments:E.jsx(Pi,{data:xte,"aria-hidden":!0,size:18}),rightAdornmentsWidth:32,rightAdornments:E.jsx(E.Fragment,{children:c&&E.jsx(Zye,{"aria-label":"clear search",title:"clear",variant:"ghost_icon",onClick:m=>{m.stopPropagation(),u()},children:E.jsx(Pi,{data:O8,size:16})})}),...i})})}),{colors:{interactive:{primary__resting:{rgba:Hye},primary__hover_alt:{rgba:Nye},focus:{rgba:gI},disabled__text:{rgba:Dye}}},typography:{navigation:{menu_title:Vye}},spacings:{comfortable:{medium_small:wg,x_small:xg,x_large:Fye,xx_large:zye}},clickbounds:{default__base:jye,compact__standard:Uye},interactions:{focused:{width:vI}}}=tt,Fp={background:Hye,typography:Vye,width:zye,spacings:{bottom:wg,top:wg,left:wg,right:wg},clickbound:{height:jye},states:{hover:{background:Nye},disabled:{background:Dye},focus:{outline:{type:"outline",style:"dashed",width:vI,color:gI,offset:"10px"}}},modes:{compact:{width:Fye,spacings:{bottom:xg,top:xg,left:xg,right:xg},clickbound:{height:Uye},states:{focus:{outline:{type:"outline",style:"dashed",width:vI,color:gI,offset:"2px"}}}}}},vb=Ve.path.attrs(({$icon:r})=>({fillRule:"evenodd",clipRule:"evenodd",d:r.svgPathData})).withConfig({displayName:"Input__StyledPath",componentId:"sc-rqj7qf-0"})([""]),Bye=Ve.input.attrs(({type:r="checkbox"})=>({type:r})).withConfig({displayName:"Input",componentId:"sc-rqj7qf-1"})(["--scale:",";appearance:none;width:100%;height:100%;margin:0;grid-area:input;transform:scale(var(--scale));cursor:",";&:focus{outline:none;}&[data-focus-visible-added]:focus + svg{","}&:focus-visible + svg{","}&:not(:checked) ~ svg path[name='checked']{display:none;}&:not(:checked) ~ svg path[name='not-checked']{display:inline;}&:checked ~ svg path[name='not-checked']{display:none;}&:checked ~ svg path[name='checked']{display:inline;}"],({theme:r,$iconSize:e})=>parseFloat(r.clickbound.height)/e,({disabled:r})=>r?"not-allowed":"pointer",({theme:r})=>Sc(r.states.focus.outline),({theme:r})=>Sc(r.states.focus.outline)),yI=Ve.svg.attrs(({height:r,width:e,fill:t})=>({name:null,xmlns:"http://www.w3.org/2000/svg",height:r,width:e,fill:t})).withConfig({displayName:"Input__Svg",componentId:"sc-rqj7qf-2"})(["grid-area:input;pointer-events:none;"]),qye=Ve.span.withConfig({displayName:"Input__InputWrapper",componentId:"sc-rqj7qf-3"})(["display:inline-grid;grid:[input] 1fr / [input] 1fr;position:relative;isolation:isolate;"," &::before{content:'';position:absolute;width:",";aspect-ratio:1/1;top:50%;left:50%;transform:translate(-50%,-50%);border-radius:100%;}@media (hover:hover) and (pointer:fine){> svg{z-index:1;}&:hover{&::before{background-color:",";}}}"],({theme:r})=>Gl(r.spacings),({theme:r})=>r.width,({disabled:r})=>r?"transparent":Fp.states.hover.background),_I=x.forwardRef(function({disabled:e=!1,indeterminate:t,style:n,className:i,...o},a){const{density:c}=Tc(),d=Gu({density:c},Fp),u=24,h=e?Fp.states.disabled.background:Fp.background,p={disabled:e,style:n,className:i},m={ref:a,disabled:e,"data-indeterminate":t,...o};return E.jsx(l1,{theme:d,children:E.jsxs(qye,{...p,children:[E.jsx(Bye,{$iconSize:u,...m}),t?E.jsx(yI,{width:u,height:u,viewBox:`0 0 ${u} ${u}`,fill:h,"aria-hidden":!0,children:E.jsx(vb,{$icon:Ete,name:"indeterminate"})}):E.jsxs(yI,{width:u,height:u,viewBox:`0 0 ${u} ${u}`,fill:h,"aria-hidden":!0,children:[E.jsx(vb,{$icon:Cte,name:"checked"}),E.jsx(vb,{$icon:kte,name:"not-checked"})]})]})})}),Kye=Ve.label.withConfig({displayName:"Checkbox__StyledLabel",componentId:"sc-yg6l8h-0"})(["display:inline-flex;align-items:center;cursor:",";"],({$disabled:r})=>r?"not-allowed":"pointer"),Gye=Ve.span.withConfig({displayName:"Checkbox__LabelText",componentId:"sc-yg6l8h-1"})(["",";"],Fa(Fp.typography)),Xv=x.forwardRef(function({label:e,disabled:t=!1,indeterminate:n,className:i,style:o,...a},c){return e?E.jsxs(Kye,{$disabled:t,className:i,style:o,children:[E.jsx(_I,{...a,disabled:t,ref:c,indeterminate:n}),E.jsx(Gye,{children:e})]}):E.jsx(_I,{...a,className:i,style:o,disabled:t,ref:c,indeterminate:n})});Xv.displayName="Checkbox";Ve.div`
1999
+ cursor: pointer;`),t},Gl=({left:r,right:e,top:t,bottom:n})=>Nt({paddingLeft:r,paddingTop:t,paddingRight:e,paddingBottom:n}),d9=r=>{const{fontFamily:e,fontSize:t,fontWeight:n,lineHeight:i,letterSpacing:o,fontFeature:a,textDecoration:c,textTransform:d,fontStyle:u}=r;return{fontFeatureSettings:a,fontFamily:e,fontSize:t,fontWeight:n,letterSpacing:o,lineHeight:i,textDecoration:c,textTransform:d,fontStyle:u}},gve=Ve.span.withConfig({displayName:"InnerFullWidth__FullWidthCenterContent",componentId:"sc-qeawkb-0"})(["text-align:center;flex:1;"]),vve=Ve.span.withConfig({displayName:"InnerFullWidth__FullWidthInner",componentId:"sc-qeawkb-1"})(["height:100%;display:flex;align-items:center;> :is(svg,img){margin-top:var(--eds_button__margin_y,inherit);margin-bottom:var(--eds_button__margin_y,inherit);}> :is(svg,img):first-child{margin-right:var(--eds_button__fullwidth__icon__margin_x,8px);}> :is(svg,img):last-child{margin-left:var(--eds_button__fullwidth__icon__margin_x,8px);}> :is(svg,img):only-child{margin-left:auto;margin-right:auto;}> span:first-child{margin-left:var(--eds_button__fullwidth__margin_x,32px);}> span:last-child{margin-right:var(--eds_button__fullwidth__margin_x,32px);}> span:only-child{margin-right:0;margin-left:0;}"]),yve=x.forwardRef(function({children:e},t){const n=x.Children.map(e,i=>typeof i!="object"?E.jsx(gve,{children:i}):i);return E.jsx(vve,{ref:t,children:n})}),_ve={density:"comfortable"},bve=x.createContext(_ve),Tc=()=>x.useContext(bve),ob=(r,e)=>{switch(e){case"ghost":return r.ghost;case"ghost_icon":return r.ghost_icon;case"outlined":return r.outlined;case"contained_icon":return r.contained_icon;case"contained":default:return r.contained}},wve=(r,e)=>{switch(e){case"danger":return ob(ib.danger,r);case"secondary":return ob(ib.secondary,r);case"primary":default:return ob(ib.primary,r)}},xve=Ve.span.withConfig({displayName:"Button__Inner",componentId:"sc-1hs0myn-0"})(["display:grid;grid-gap:var(--eds_button__gap,8px);grid-auto-flow:column;align-items:center;height:100%;justify-content:center;& > :is(svg,img){margin-top:var(--eds_button__icon__margin_y,0);margin-bottom:var(--eds_button__icon__margin_y,0);}"]),Cve=Ve.button.withConfig({displayName:"Button__ButtonBase",componentId:"sc-1hs0myn-1"})(({theme:r})=>{var a,c,d;const{states:e,clickbound:t}=r,{focus:n,hover:i,disabled:o}=e;return Nt(["box-sizing:border-box;margin:0;padding:0;text-decoration:none;position:relative;cursor:pointer;display:inline-block;background:",";height:",";width:",";svg{justify-self:center;}"," "," "," &::after{position:absolute;top:-",";left:-",";width:",";height:",";content:'';}@media (hover:hover) and (pointer:fine){&:hover{background:",";color:",";",";}}&:focus{outline:none;}&[data-focus-visible-added]:focus{","}&:focus-visible{","}&::-moz-focus-inner{border:0;}&:disabled,&[aria-disabled='true']{cursor:not-allowed;background:",";",";",";@media (hover:hover) and (pointer:fine){&:hover{background:",";}}}"],r.background,r.height,r.width,Gl(r.spacings),Ol(r.border),Fa(r.typography),(a=t==null?void 0:t.offset)==null?void 0:a.top,(c=t==null?void 0:t.offset)==null?void 0:c.left,t==null?void 0:t.width,t==null?void 0:t.height,i.background,(d=i.typography)==null?void 0:d.color,Ol(i==null?void 0:i.border),Sc(n.outline),Sc(n.outline),o.background,Ol(o.border),Fa(o.typography),o.background)}),kve=x.forwardRef(function({color:e="primary",variant:t="contained",children:n,disabled:i=!1,href:o,tabIndex:a=0,fullWidth:c=!1,...d},u){const{density:h}=Tc(),p=Gu({density:h},wve(t,e)),m=o&&!i?"a":d.as?d.as:"button",v=o||d.as?void 0:"button";a=i?-1:a;const _={ref:u,as:m,href:o,type:v,disabled:i,tabIndex:a,...d};return E.jsx(l1,{theme:p,children:E.jsx(Cve,{..._,children:c?E.jsx(yve,{children:n}):E.jsx(xve,{children:n})})})}),{shape:{corners:{borderRadius:Eve}}}=tt,Sve={border:{radius:Eve}},{border:Ave}=Sve,il=Ave.radius,Tve=Ve.div.withConfig({displayName:"ButtonGroup__ButtonGroupBase",componentId:"sc-1fn8jon-0"})(["display:inline-flex;> *{border-radius:0;@media (hover:hover) and (pointer:fine){&:hover{border-radius:0;}}}",""],({$vertical:r})=>Nt(r?["flex-direction:column;> :first-child{border-top-left-radius:",";border-top-right-radius:",";}> :last-child{border-bottom-left-radius:",";border-bottom-right-radius:",";}> :not(:last-child){border-bottom:none;}"]:["> :first-child{border-top-left-radius:",";border-bottom-left-radius:",";}> :last-child{border-top-right-radius:",";border-bottom-right-radius:",";}> :not(:last-child){border-right:none;}"],il,il,il,il)),rZ=x.forwardRef(function({children:e,vertical:t,...n},i){const o={ref:i,$vertical:t,...n};return E.jsx(Tve,{role:"group",...o,children:e})}),{colors:{text:{static_icons__primary_white:{rgba:Ive}},ui:{background__overlay:{rgba:Rve}}},typography:{ui:Pve},spacings:{comfortable:{small:ip}},shape:{corners:{borderRadius:Mve}}}=tt,pc={typography:{...Pve.tooltip,color:Ive},background:Rve,border:{type:"border",radius:Mve},entities:{arrow:{width:"6px",height:ip}},spacings:{left:ip,right:ip,top:ip,bottom:ip}};function $T(r){let e=r.activeElement;for(;((t=e)==null||(t=t.shadowRoot)==null?void 0:t.activeElement)!=null;){var t;e=e.shadowRoot.activeElement}return e}function Sm(r,e){if(!r||!e)return!1;const t=e.getRootNode==null?void 0:e.getRootNode();if(r.contains(e))return!0;if(t&&Ov(t)){let n=e;for(;n;){if(r===n)return!0;n=n.parentNode||n.host}}return!1}function $ve(){const r=navigator.userAgentData;return r!=null&&r.platform?r.platform:navigator.platform}function Ove(){return/apple/i.test(navigator.vendor)}function Zve(){return $ve().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function rw(r,e){const t=["mouse","pen"];return t.push("",void 0),t.includes(r)}function Lve(r){return"nativeEvent"in r}function Hve(r){return r.matches("html,body")}function nu(r){return(r==null?void 0:r.ownerDocument)||document}function ab(r,e){if(e==null)return!1;if("composedPath"in r)return r.composedPath().includes(e);const t=r;return t.target!=null&&e.contains(t.target)}function jh(r){return"composedPath"in r?r.composedPath()[0]:r.target}const Nve="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function Dve(r){return wi(r)&&r.matches(Nve)}var Bg=typeof document<"u"?x.useLayoutEffect:x.useEffect;function Qv(r,e){if(r===e)return!0;if(typeof r!=typeof e)return!1;if(typeof r=="function"&&r.toString()===e.toString())return!0;let t,n,i;if(r&&e&&typeof r=="object"){if(Array.isArray(r)){if(t=r.length,t!==e.length)return!1;for(n=t;n--!==0;)if(!Qv(r[n],e[n]))return!1;return!0}if(i=Object.keys(r),t=i.length,t!==Object.keys(e).length)return!1;for(n=t;n--!==0;)if(!{}.hasOwnProperty.call(e,i[n]))return!1;for(n=t;n--!==0;){const o=i[n];if(!(o==="_owner"&&r.$$typeof)&&!Qv(r[o],e[o]))return!1}return!0}return r!==r&&e!==e}function nZ(r){return typeof window>"u"?1:(r.ownerDocument.defaultView||window).devicePixelRatio||1}function OT(r,e){const t=nZ(r);return Math.round(e*t)/t}function sb(r){const e=x.useRef(r);return Bg(()=>{e.current=r}),e}function Vve(r){r===void 0&&(r={});const{placement:e="bottom",strategy:t="absolute",middleware:n=[],platform:i,elements:{reference:o,floating:a}={},transform:c=!0,whileElementsMounted:d,open:u}=r,[h,p]=x.useState({x:0,y:0,strategy:t,placement:e,middlewareData:{},isPositioned:!1}),[m,v]=x.useState(n);Qv(m,n)||v(n);const[_,b]=x.useState(null),[C,T]=x.useState(null),A=x.useCallback($=>{$!==z.current&&(z.current=$,b($))},[]),I=x.useCallback($=>{$!==R.current&&(R.current=$,T($))},[]),O=o||_,B=a||C,z=x.useRef(null),R=x.useRef(null),Y=x.useRef(h),ue=d!=null,le=sb(d),Te=sb(i),ke=sb(u),xe=x.useCallback(()=>{if(!z.current||!R.current)return;const $={placement:e,strategy:t,middleware:m};Te.current&&($.platform=Te.current),R8(z.current,R.current,$).then(L=>{const D={...L,isPositioned:ke.current!==!1};X.current&&!Qv(Y.current,D)&&(Y.current=D,Uu.flushSync(()=>{p(D)}))})},[m,e,t,Te,ke]);Bg(()=>{u===!1&&Y.current.isPositioned&&(Y.current.isPositioned=!1,p($=>({...$,isPositioned:!1})))},[u]);const X=x.useRef(!1);Bg(()=>(X.current=!0,()=>{X.current=!1}),[]),Bg(()=>{if(O&&(z.current=O),B&&(R.current=B),O&&B){if(le.current)return le.current(O,B,xe);xe()}},[O,B,xe,le,ue]);const q=x.useMemo(()=>({reference:z,floating:R,setReference:A,setFloating:I}),[A,I]),re=x.useMemo(()=>({reference:O,floating:B}),[O,B]),W=x.useMemo(()=>{const $={position:t,left:0,top:0};if(!re.floating)return $;const L=OT(re.floating,h.x),D=OT(re.floating,h.y);return c?{...$,transform:"translate("+L+"px, "+D+"px)",...nZ(re.floating)>=1.5&&{willChange:"transform"}}:{position:t,left:L,top:D}},[t,c,re.floating,h.x,h.y]);return x.useMemo(()=>({...h,update:xe,refs:q,elements:re,floatingStyles:W}),[h,xe,q,re,W])}const Fve=r=>{function e(t){return{}.hasOwnProperty.call(t,"current")}return{name:"arrow",options:r,fn(t){const{element:n,padding:i}=typeof r=="function"?r(t):r;return n&&e(n)?n.current!=null?Dv({element:n.current,padding:i}).fn(t):{}:n?Dv({element:n,padding:i}).fn(t):{}}}},iZ=(r,e)=>({...T8(r),options:[r,e]}),oZ=(r,e)=>({...I8(r),options:[r,e]}),aZ=(r,e)=>({...B$(r),options:[r,e]}),zve=(r,e)=>({...Iee(r),options:[r,e]}),jve=(r,e)=>({...Fve(r),options:[r,e]}),sZ={...Xw},Uve=sZ.useInsertionEffect,Bve=Uve||(r=>r());function dc(r){const e=x.useRef(()=>{});return Bve(()=>{e.current=r}),x.useCallback(function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return e.current==null?void 0:e.current(...n)},[])}var Wf=typeof document<"u"?x.useLayoutEffect:x.useEffect;let ZT=!1,qve=0;const LT=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+qve++;function Kve(){const[r,e]=x.useState(()=>ZT?LT():void 0);return Wf(()=>{r==null&&e(LT())},[]),x.useEffect(()=>{ZT=!0},[]),r}const Gve=sZ.useId,cZ=Gve||Kve;function Wve(){const r=new Map;return{emit(e,t){var n;(n=r.get(e))==null||n.forEach(i=>i(t))},on(e,t){r.has(e)||r.set(e,new Set),r.get(e).add(t)},off(e,t){var n;(n=r.get(e))==null||n.delete(t)}}}const Yve=x.createContext(null),Qve=x.createContext(null),u9=()=>{var r;return((r=x.useContext(Yve))==null?void 0:r.id)||null},h9=()=>x.useContext(Qve);function f9(r){return"data-floating-ui-"+r}function Wo(r){r.current!==-1&&(clearTimeout(r.current),r.current=-1)}function gg(r){const e=x.useRef(r);return Wf(()=>{e.current=r}),e}const HT=f9("safe-polygon");function cb(r,e,t){if(t&&!rw(t))return 0;if(typeof r=="number")return r;if(typeof r=="function"){const n=r();return typeof n=="number"?n:n==null?void 0:n[e]}return r==null?void 0:r[e]}function lb(r){return typeof r=="function"?r():r}function Xve(r,e){e===void 0&&(e={});const{open:t,onOpenChange:n,dataRef:i,events:o,elements:a}=r,{enabled:c=!0,delay:d=0,handleClose:u=null,mouseOnly:h=!1,restMs:p=0,move:m=!0}=e,v=h9(),_=u9(),b=gg(u),C=gg(d),T=gg(t),A=gg(p),I=x.useRef(),O=x.useRef(-1),B=x.useRef(),z=x.useRef(-1),R=x.useRef(!0),Y=x.useRef(!1),ue=x.useRef(()=>{}),le=x.useRef(!1),Te=x.useCallback(()=>{var W;const $=(W=i.current.openEvent)==null?void 0:W.type;return($==null?void 0:$.includes("mouse"))&&$!=="mousedown"},[i]);x.useEffect(()=>{if(!c)return;function W($){let{open:L}=$;L||(Wo(O),Wo(z),R.current=!0,le.current=!1)}return o.on("openchange",W),()=>{o.off("openchange",W)}},[c,o]),x.useEffect(()=>{if(!c||!b.current||!t)return;function W(L){Te()&&n(!1,L,"hover")}const $=nu(a.floating).documentElement;return $.addEventListener("mouseleave",W),()=>{$.removeEventListener("mouseleave",W)}},[a.floating,t,n,c,b,Te]);const ke=x.useCallback(function(W,$,L){$===void 0&&($=!0),L===void 0&&(L="hover");const D=cb(C.current,"close",I.current);D&&!B.current?(Wo(O),O.current=window.setTimeout(()=>n(!1,W,L),D)):$&&(Wo(O),n(!1,W,L))},[C,n]),xe=dc(()=>{ue.current(),B.current=void 0}),X=dc(()=>{if(Y.current){const W=nu(a.floating).body;W.style.pointerEvents="",W.removeAttribute(HT),Y.current=!1}}),q=dc(()=>i.current.openEvent?["click","mousedown"].includes(i.current.openEvent.type):!1);x.useEffect(()=>{if(!c)return;function W(N){if(Wo(O),R.current=!1,h&&!rw(I.current)||lb(A.current)>0&&!cb(C.current,"open"))return;const ae=cb(C.current,"open",I.current);ae?O.current=window.setTimeout(()=>{T.current||n(!0,N,"hover")},ae):t||n(!0,N,"hover")}function $(N){if(q()){X();return}ue.current();const ae=nu(a.floating);if(Wo(z),le.current=!1,b.current&&i.current.floatingContext){t||Wo(O),B.current=b.current({...i.current.floatingContext,tree:v,x:N.clientX,y:N.clientY,onClose(){X(),xe(),q()||ke(N,!0,"safe-polygon")}});const Ee=B.current;ae.addEventListener("mousemove",Ee),ue.current=()=>{ae.removeEventListener("mousemove",Ee)};return}(I.current==="touch"?!Sm(a.floating,N.relatedTarget):!0)&&ke(N)}function L(N){q()||i.current.floatingContext&&(b.current==null||b.current({...i.current.floatingContext,tree:v,x:N.clientX,y:N.clientY,onClose(){X(),xe(),q()||ke(N)}})(N))}function D(){Wo(O)}function Z(N){q()||ke(N,!1)}if(zt(a.domReference)){const N=a.domReference,ae=a.floating;return t&&N.addEventListener("mouseleave",L),m&&N.addEventListener("mousemove",W,{once:!0}),N.addEventListener("mouseenter",W),N.addEventListener("mouseleave",$),ae&&(ae.addEventListener("mouseleave",L),ae.addEventListener("mouseenter",D),ae.addEventListener("mouseleave",Z)),()=>{t&&N.removeEventListener("mouseleave",L),m&&N.removeEventListener("mousemove",W),N.removeEventListener("mouseenter",W),N.removeEventListener("mouseleave",$),ae&&(ae.removeEventListener("mouseleave",L),ae.removeEventListener("mouseenter",D),ae.removeEventListener("mouseleave",Z))}}},[a,c,r,h,m,ke,xe,X,n,t,T,v,C,b,i,q,A]),Wf(()=>{var W;if(c&&t&&(W=b.current)!=null&&W.__options.blockPointerEvents&&Te()){Y.current=!0;const L=a.floating;if(zt(a.domReference)&&L){var $;const D=nu(a.floating).body;D.setAttribute(HT,"");const Z=a.domReference,N=v==null||($=v.nodesRef.current.find(ae=>ae.id===_))==null||($=$.context)==null?void 0:$.elements.floating;return N&&(N.style.pointerEvents=""),D.style.pointerEvents="none",Z.style.pointerEvents="auto",L.style.pointerEvents="auto",()=>{D.style.pointerEvents="",Z.style.pointerEvents="",L.style.pointerEvents=""}}}},[c,t,_,a,v,b,Te]),Wf(()=>{t||(I.current=void 0,le.current=!1,xe(),X())},[t,xe,X]),x.useEffect(()=>()=>{xe(),Wo(O),Wo(z),X()},[c,a.domReference,xe,X]);const re=x.useMemo(()=>{function W($){I.current=$.pointerType}return{onPointerDown:W,onPointerEnter:W,onMouseMove($){const{nativeEvent:L}=$;function D(){!R.current&&!T.current&&n(!0,L,"hover")}h&&!rw(I.current)||t||lb(A.current)===0||le.current&&$.movementX**2+$.movementY**2<2||(Wo(z),I.current==="touch"?D():(le.current=!0,z.current=window.setTimeout(D,lb(A.current))))}}},[h,n,t,T,A]);return x.useMemo(()=>c?{reference:re}:{},[c,re])}function db(r,e){let t=r.filter(i=>{var o;return i.parentId===e&&((o=i.context)==null?void 0:o.open)}),n=t;for(;n.length;)n=r.filter(i=>{var o;return(o=n)==null?void 0:o.some(a=>{var c;return i.parentId===a.id&&((c=i.context)==null?void 0:c.open)})}),t=t.concat(n);return t}const nw="data-floating-ui-focusable";function Jve(r){return r?r.hasAttribute(nw)?r:r.querySelector("["+nw+"]")||r:null}const e4e={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},t4e={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},NT=r=>{var e,t;return{escapeKey:typeof r=="boolean"?r:(e=r==null?void 0:r.escapeKey)!=null?e:!1,outsidePress:typeof r=="boolean"?r:(t=r==null?void 0:r.outsidePress)!=null?t:!0}};function lZ(r,e){e===void 0&&(e={});const{open:t,onOpenChange:n,elements:i,dataRef:o}=r,{enabled:a=!0,escapeKey:c=!0,outsidePress:d=!0,outsidePressEvent:u="pointerdown",referencePress:h=!1,referencePressEvent:p="pointerdown",ancestorScroll:m=!1,bubbles:v,capture:_}=e,b=h9(),C=dc(typeof d=="function"?d:()=>!1),T=typeof d=="function"?C:d,A=x.useRef(!1),I=x.useRef(!1),{escapeKey:O,outsidePress:B}=NT(v),{escapeKey:z,outsidePress:R}=NT(_),Y=x.useRef(!1),ue=dc(q=>{var re;if(!t||!a||!c||q.key!=="Escape"||Y.current)return;const W=(re=o.current.floatingContext)==null?void 0:re.nodeId,$=b?db(b.nodesRef.current,W):[];if(!O&&(q.stopPropagation(),$.length>0)){let L=!0;if($.forEach(D=>{var Z;if((Z=D.context)!=null&&Z.open&&!D.context.dataRef.current.__escapeKeyBubbles){L=!1;return}}),!L)return}n(!1,Lve(q)?q.nativeEvent:q,"escape-key")}),le=dc(q=>{var re;const W=()=>{var $;ue(q),($=jh(q))==null||$.removeEventListener("keydown",W)};(re=jh(q))==null||re.addEventListener("keydown",W)}),Te=dc(q=>{var re;const W=A.current;A.current=!1;const $=I.current;if(I.current=!1,u==="click"&&$||W||typeof T=="function"&&!T(q))return;const L=jh(q),D="["+f9("inert")+"]",Z=nu(i.floating).querySelectorAll(D);let N=zt(L)?L:null;for(;N&&!ia(N);){const Ae=Es(N);if(ia(Ae)||!zt(Ae))break;N=Ae}if(Z.length&&zt(L)&&!Hve(L)&&!Sm(L,i.floating)&&Array.from(Z).every(Ae=>!Sm(N,Ae)))return;if(wi(L)&&X){const Ae=ia(L),Xe=Io(L),lt=/auto|scroll/,xt=Ae||lt.test(Xe.overflowX),wr=Ae||lt.test(Xe.overflowY),Gr=xt&&L.clientWidth>0&&L.scrollWidth>L.clientWidth,Mt=wr&&L.clientHeight>0&&L.scrollHeight>L.clientHeight,zn=Xe.direction==="rtl",so=Mt&&(zn?q.offsetX<=L.offsetWidth-L.clientWidth:q.offsetX>L.clientWidth),ma=Gr&&q.offsetY>L.clientHeight;if(so||ma)return}const ae=(re=o.current.floatingContext)==null?void 0:re.nodeId,He=b&&db(b.nodesRef.current,ae).some(Ae=>{var Xe;return ab(q,(Xe=Ae.context)==null?void 0:Xe.elements.floating)});if(ab(q,i.floating)||ab(q,i.domReference)||He)return;const Ee=b?db(b.nodesRef.current,ae):[];if(Ee.length>0){let Ae=!0;if(Ee.forEach(Xe=>{var lt;if((lt=Xe.context)!=null&&lt.open&&!Xe.context.dataRef.current.__outsidePressBubbles){Ae=!1;return}}),!Ae)return}n(!1,q,"outside-press")}),ke=dc(q=>{var re;const W=()=>{var $;Te(q),($=jh(q))==null||$.removeEventListener(u,W)};(re=jh(q))==null||re.addEventListener(u,W)});x.useEffect(()=>{if(!t||!a)return;o.current.__escapeKeyBubbles=O,o.current.__outsidePressBubbles=B;let q=-1;function re(Z){n(!1,Z,"ancestor-scroll")}function W(){window.clearTimeout(q),Y.current=!0}function $(){q=window.setTimeout(()=>{Y.current=!1},b2()?5:0)}const L=nu(i.floating);c&&(L.addEventListener("keydown",z?le:ue,z),L.addEventListener("compositionstart",W),L.addEventListener("compositionend",$)),T&&L.addEventListener(u,R?ke:Te,R);let D=[];return m&&(zt(i.domReference)&&(D=Ha(i.domReference)),zt(i.floating)&&(D=D.concat(Ha(i.floating))),!zt(i.reference)&&i.reference&&i.reference.contextElement&&(D=D.concat(Ha(i.reference.contextElement)))),D=D.filter(Z=>{var N;return Z!==((N=L.defaultView)==null?void 0:N.visualViewport)}),D.forEach(Z=>{Z.addEventListener("scroll",re,{passive:!0})}),()=>{c&&(L.removeEventListener("keydown",z?le:ue,z),L.removeEventListener("compositionstart",W),L.removeEventListener("compositionend",$)),T&&L.removeEventListener(u,R?ke:Te,R),D.forEach(Z=>{Z.removeEventListener("scroll",re)}),window.clearTimeout(q)}},[o,i,c,T,u,t,n,m,a,O,B,ue,z,le,Te,R,ke]),x.useEffect(()=>{A.current=!1},[T,u]);const xe=x.useMemo(()=>({onKeyDown:ue,...h&&{[e4e[p]]:q=>{n(!1,q.nativeEvent,"reference-press")},...p!=="click"&&{onClick(q){n(!1,q.nativeEvent,"reference-press")}}}}),[ue,n,h,p]),X=x.useMemo(()=>({onKeyDown:ue,onMouseDown(){I.current=!0},onMouseUp(){I.current=!0},[t4e[u]]:()=>{A.current=!0}}),[ue,u]);return x.useMemo(()=>a?{reference:xe,floating:X}:{},[a,xe,X])}function r4e(r){const{open:e=!1,onOpenChange:t,elements:n}=r,i=cZ(),o=x.useRef({}),[a]=x.useState(()=>Wve()),c=u9()!=null,[d,u]=x.useState(n.reference),h=dc((v,_,b)=>{o.current.openEvent=v?_:void 0,a.emit("openchange",{open:v,event:_,reason:b,nested:c}),t==null||t(v,_,b)}),p=x.useMemo(()=>({setPositionReference:u}),[]),m=x.useMemo(()=>({reference:d||n.reference||null,floating:n.floating||null,domReference:n.reference}),[d,n.reference,n.floating]);return x.useMemo(()=>({dataRef:o,open:e,onOpenChange:h,elements:m,events:a,floatingId:i,refs:p}),[e,h,m,a,i,p])}function dZ(r){r===void 0&&(r={});const{nodeId:e}=r,t=r4e({...r,elements:{reference:null,floating:null,...r.elements}}),n=r.rootContext||t,i=n.elements,[o,a]=x.useState(null),[c,d]=x.useState(null),h=(i==null?void 0:i.domReference)||o,p=x.useRef(null),m=h9();Wf(()=>{h&&(p.current=h)},[h]);const v=Vve({...r,elements:{...i,...c&&{reference:c}}}),_=x.useCallback(I=>{const O=zt(I)?{getBoundingClientRect:()=>I.getBoundingClientRect(),getClientRects:()=>I.getClientRects(),contextElement:I}:I;d(O),v.refs.setReference(O)},[v.refs]),b=x.useCallback(I=>{(zt(I)||I===null)&&(p.current=I,a(I)),(zt(v.refs.reference.current)||v.refs.reference.current===null||I!==null&&!zt(I))&&v.refs.setReference(I)},[v.refs]),C=x.useMemo(()=>({...v.refs,setReference:b,setPositionReference:_,domReference:p}),[v.refs,b,_]),T=x.useMemo(()=>({...v.elements,domReference:h}),[v.elements,h]),A=x.useMemo(()=>({...v,...n,refs:C,elements:T,nodeId:e}),[v,C,T,e,n]);return Wf(()=>{n.dataRef.current.floatingContext=A;const I=m==null?void 0:m.nodesRef.current.find(O=>O.id===e);I&&(I.context=A)}),x.useMemo(()=>({...v,context:A,refs:C,elements:T}),[v,C,T,A])}function n4e(){const r=navigator.userAgentData;return r&&Array.isArray(r.brands)?r.brands.map(e=>{let{brand:t,version:n}=e;return t+"/"+n}).join(" "):navigator.userAgent}function i4e(){return n4e().includes("jsdom/")}function o4e(r){if(!r||i4e())return!0;try{return r.matches(":focus-visible")}catch{return!0}}function ub(){return Zve()&&Ove()}function a4e(r,e){e===void 0&&(e={});const{open:t,onOpenChange:n,events:i,dataRef:o,elements:a}=r,{enabled:c=!0,visibleOnly:d=!0}=e,u=x.useRef(!1),h=x.useRef(-1),p=x.useRef(!0);x.useEffect(()=>{if(!c)return;const v=Zi(a.domReference);function _(){!t&&wi(a.domReference)&&a.domReference===$T(nu(a.domReference))&&(u.current=!0)}function b(){p.current=!0}function C(){p.current=!1}return v.addEventListener("blur",_),ub()&&(v.addEventListener("keydown",b,!0),v.addEventListener("pointerdown",C,!0)),()=>{v.removeEventListener("blur",_),ub()&&(v.removeEventListener("keydown",b,!0),v.removeEventListener("pointerdown",C,!0))}},[a.domReference,t,c]),x.useEffect(()=>{if(!c)return;function v(_){let{reason:b}=_;(b==="reference-press"||b==="escape-key")&&(u.current=!0)}return i.on("openchange",v),()=>{i.off("openchange",v)}},[i,c]),x.useEffect(()=>()=>{Wo(h)},[]);const m=x.useMemo(()=>({onMouseLeave(){u.current=!1},onFocus(v){if(u.current)return;const _=jh(v.nativeEvent);if(d&&zt(_)){if(ub()&&!v.relatedTarget){if(!p.current&&!Dve(_))return}else if(!o4e(_))return}n(!0,v.nativeEvent,"focus")},onBlur(v){u.current=!1;const _=v.relatedTarget,b=v.nativeEvent,C=zt(_)&&_.hasAttribute(f9("focus-guard"))&&_.getAttribute("data-type")==="outside";h.current=window.setTimeout(()=>{var T;const A=$T(a.domReference?a.domReference.ownerDocument:document);!_&&A===a.domReference||Sm((T=o.current.floatingContext)==null?void 0:T.refs.floating.current,A)||Sm(a.domReference,A)||C||n(!1,b,"focus")})}}),[o,a.domReference,n,d]);return x.useMemo(()=>c?{reference:m}:{},[c,m])}const DT="active",VT="selected";function hb(r,e,t){const n=new Map,i=t==="item";let o=r;if(i&&r){const{[DT]:a,[VT]:c,...d}=r;o=d}return{...t==="floating"&&{tabIndex:-1,[nw]:""},...o,...e.map(a=>{const c=a?a[t]:null;return typeof c=="function"?r?c(r):null:c}).concat(r).reduce((a,c)=>(c&&Object.entries(c).forEach(d=>{let[u,h]=d;if(!(i&&[DT,VT].includes(u)))if(u.indexOf("on")===0){if(n.has(u)||n.set(u,[]),typeof h=="function"){var p;(p=n.get(u))==null||p.push(h),a[u]=function(){for(var m,v=arguments.length,_=new Array(v),b=0;b<v;b++)_[b]=arguments[b];return(m=n.get(u))==null?void 0:m.map(C=>C(..._)).find(C=>C!==void 0)}}}else a[u]=h}),a),{})}}function uZ(r){r===void 0&&(r=[]);const e=r.map(c=>c==null?void 0:c.reference),t=r.map(c=>c==null?void 0:c.floating),n=r.map(c=>c==null?void 0:c.item),i=x.useCallback(c=>hb(c,r,"reference"),e),o=x.useCallback(c=>hb(c,r,"floating"),t),a=x.useCallback(c=>hb(c,r,"item"),n);return x.useMemo(()=>({getReferenceProps:i,getFloatingProps:o,getItemProps:a}),[i,o,a])}const s4e=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function c4e(r,e){var t,n;e===void 0&&(e={});const{open:i,elements:o,floatingId:a}=r,{enabled:c=!0,role:d="dialog"}=e,u=cZ(),h=((t=o.domReference)==null?void 0:t.id)||u,p=x.useMemo(()=>{var A;return((A=Jve(o.floating))==null?void 0:A.id)||a},[o.floating,a]),m=(n=s4e.get(d))!=null?n:d,_=u9()!=null,b=x.useMemo(()=>m==="tooltip"||d==="label"?{["aria-"+(d==="label"?"labelledby":"describedby")]:i?p:void 0}:{"aria-expanded":i?"true":"false","aria-haspopup":m==="alertdialog"?"dialog":m,"aria-controls":i?p:void 0,...m==="listbox"&&{role:"combobox"},...m==="menu"&&{id:h},...m==="menu"&&_&&{role:"menuitem"},...d==="select"&&{"aria-autocomplete":"none"},...d==="combobox"&&{"aria-autocomplete":"list"}},[m,p,_,i,h,d]),C=x.useMemo(()=>{const A={id:p,...m&&{role:m}};return m==="tooltip"||d==="label"?A:{...A,...m==="menu"&&{"aria-labelledby":h}}},[m,p,h,d]),T=x.useCallback(A=>{let{active:I,selected:O}=A;const B={role:"option",...I&&{id:p+"-fui-option"}};switch(d){case"select":return{...B,"aria-selected":I&&O};case"combobox":return{...B,"aria-selected":O}}return{}},[p,d]);return x.useMemo(()=>c?{reference:b,floating:C,item:T}:{},[c,b,C,T])}const l4e=Ve("div").withConfig({shouldForwardProp:()=>!0}).withConfig({displayName:"Tooltip__StyledTooltip",componentId:"sc-m2im2p-0"})(["inset:unset;border:0;overflow:visible;"," "," "," background:",";white-space:nowrap;&::before{content:'; Has tooltip: ';clip-path:inset(50%);height:1px;width:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;}&::backdrop{background-color:transparent;}"],Fa(pc.typography),Gl(pc.spacings),Ol(pc.border),pc.background),d4e=Ve.div.withConfig({displayName:"Tooltip__ArrowWrapper",componentId:"sc-m2im2p-1"})(["position:absolute;width:",";height:",";z-index:-1;"],pc.entities.arrow.width,pc.entities.arrow.height),u4e=Ve.svg.withConfig({displayName:"Tooltip__TooltipArrow",componentId:"sc-m2im2p-2"})(["width:",";height:",";position:absolute;fill:",";"],pc.entities.arrow.width,pc.entities.arrow.height,pc.background),h4e=x.forwardRef(function({title:e,placement:t="bottom",children:n,style:i,enterDelay:o=100,portalContainer:a,...c},d){const u=x.useRef(null),[h,p]=x.useState(!1),{rootElement:m}=Tc(),v=!!e&&typeof document<"u",{x:_,y:b,refs:C,strategy:T,context:A,middlewareData:{arrow:{x:I,y:O}={}},placement:B,elements:z}=dZ({placement:t,open:h,onOpenChange:p,middleware:[iZ(14),aZ(),oZ({padding:8}),jve({element:u})],whileElementsMounted:D4}),R=x.useMemo(()=>Vu(C.setReference,n==null?void 0:n.ref),[C.setReference,n==null?void 0:n.ref]),Y=x.useMemo(()=>Vu(C.setFloating,d),[C.setFloating,d]),{getReferenceProps:ue,getFloatingProps:le}=uZ([Xve(A,{delay:{open:o}}),a4e(A),c4e(A,{role:"tooltip"}),lZ(A)]);x.useEffect(()=>{const xe={top:"bottom",right:"left",bottom:"top",left:"right"}[B.split("-")[0]];let X="none";switch(xe){case"right":X="rotateY(180deg)";break;case"left":X="none";break;case"top":X="rotate(90deg)";break;case"bottom":X="rotate(-90deg)";break}u.current&&Object.assign(u.current.style,{left:I!=null?`${I}px`:"",top:O!=null?`${O}px`:"",right:"",bottom:"",[xe]:"-6px",transform:X})});const Te=x.cloneElement(n,{...ue({ref:R,...n.props})});x.useEffect(()=>{z.floating&&z.floating.isConnected&&v&&h&&z.floating.showPopover()},[h,v,z.floating]);const ke=E.jsxs(l4e,{popover:"manual",...c,...le({ref:Y,className:`eds-tooltip ${c.className??""}`,style:{...i,position:T,top:b||0,left:_||0}}),children:[e,E.jsx(d4e,{ref:u,children:E.jsx(u4e,{className:"arrowSvg",children:E.jsx("path",{d:"M0.504838 4.86885C-0.168399 4.48524 -0.168399 3.51476 0.504838 3.13115L6 8.59227e-08L6 8L0.504838 4.86885Z"})})})]});return E.jsxs(E.Fragment,{children:[v&&h&&Uu.createPortal(ke,a??m??document.body),Te]})}),f4e=x.forwardRef(function({children:e,multiple:t,selectedIndexes:n,onChange:i,...o},a){const[c,d]=x.useState(n||[]);x.useEffect(()=>{Array.isArray(n)&&d(n)},[n]);function u(p,m,v){const _=p;if(x.isValidElement(p)){const b={"aria-pressed":m?!0:void 0,variant:m?"contained":"outlined",onClick:C=>{var A,I;(I=(A=_.props)==null?void 0:A.onClick)==null||I.call(A,C);let T=[v];t&&(T=c.includes(v)?c.filter(O=>O!==v):[...c,v]),d(T),i&&i(T)}};return x.cloneElement(p,b)}}const h=x.Children.map(e,(p,m)=>{const v=c.includes(m),_=p;if(x.isValidElement(p)&&p.type===h4e){const b=x.Children.map(_.props.children,C=>u(C,v,m));return x.cloneElement(_,null,b[0])}else return u(_,v,m)});return E.jsx(rZ,{ref:a,...o,children:h})}),da=kve;da.Group=rZ;da.Toggle=f4e;da.Group.displayName="Button.Group";da.Toggle.displayName="Button.Toggle";let iw={};const p4e=r=>{iw={...iw,...r}},m4e=r=>iw[r],g4e=Ve.svg.attrs(({$height:r,$width:e,fill:t})=>({name:null,xmlns:"http://www.w3.org/2000/svg",height:`${r}px`,width:`${e}px`,fill:t})).withConfig({displayName:"Icon__StyledSvg",componentId:"sc-6evbi1-0"})(["transform:",";"],({$rotation:r})=>r?`rotate(${r}deg)`:"none"),FT=Ve.path.attrs(({$height:r,$size:e})=>({size:null,fillRule:"evenodd",clipRule:"evenodd",transform:e/r!==1?`scale(${e/r})`:null})).withConfig({displayName:"Icon__StyledPath",componentId:"sc-6evbi1-1"})([""]),v4e=(r,e,t)=>{var i;const n=e??m4e(r);return t<24&&((i=n.sizes)==null?void 0:i.small)||n},y4e=x.forwardRef(function({size:e,color:t="currentColor",name:n,rotation:i,title:o,data:a,...c},d){const u=v4e(n,a,e);if(typeof u>"u")throw Error(`Icon "${n}" not found. Have you added it using Icon.add() or using data props?`);const h=e||parseInt(u.width),p=e||parseInt(u.height);let m={$height:h,$width:p,fill:t,viewBox:`0 0 ${p} ${h}`,$rotation:i,name:n,"aria-hidden":!0};const v={$height:u.height?parseInt(u.height):e,$size:e||parseInt(u.height)},_=tw(null,`${u.prefix}-${u.name}`);return o&&(m={...m,title:o,role:"img","aria-hidden":void 0,"aria-labelledby":_}),E.jsxs(g4e,{...m,...c,ref:d,children:[o&&E.jsx("title",{id:_,children:o}),Array.isArray(u.svgPathData)?u.svgPathData.map(b=>E.jsx(FT,{...v,d:b},b)):E.jsx(FT,{"data-testid":"eds-icon-path",...v,d:u.svgPathData})]})}),Pi=y4e;Pi.add=p4e;const{elevation:_4e,colors:{ui:{background__default:{rgba:b4e}}}}=tt,w4e={background:b4e},x4e=Ve.div.withConfig({displayName:"Paper__StyledPaper",componentId:"sc-6ncnv9-0"})(["background:",";box-shadow:",";"],w4e.background,({$elevation:r})=>r),p9=x.forwardRef(function({elevation:e="none",...t},n){const i={...t,$elevation:_4e[e]??"none"};return E.jsx(x4e,{...i,ref:n})}),{typography:hZ,colors:C4e,interactions:{focused:{width:k4e}}}=tt,{heading:E4e,paragraph:S4e}=hZ,{interactive:{primary__resting:{rgba:A4e},secondary__resting:{rgba:T4e},danger__resting:{rgba:I4e},warning__resting:{rgba:R4e},success__resting:{rgba:P4e},disabled__text:{rgba:M4e},focus:{rgba:$4e}}}=C4e,zT={primary:A4e,secondary:T4e,danger:I4e,warning:R4e,success:P4e,disabled:M4e},jT={...E4e,...S4e},UT={states:{focus:{outline:{width:k4e,color:$4e,style:"dashed",type:"outline",offset:"2px"}}}},O4e=(r,e)=>{if(e)return"a";switch(r){case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":return r;case"caption":case"overline":case"ingress":case"meta":case"body_short":case"body_long":default:return"p"}},Z4e=(r,e)=>!e&&jT[r]?jT[r]:hZ[e][r],L4e=(r=null)=>typeof zT[r]>"u"?r:zT[r],H4e=(r,e=!1,t=!1,n=!1)=>`${r}${e?"_bold":""}${t?"_italic":""}${n?"_link":""}`,N4e=Ve.p.withConfig({displayName:"Typography__StyledTypography",componentId:"sc-179guof-0"})([""," "," "," ",""],({$typography:r,$link:e})=>Fa(r,e),({$color:r})=>Nt({color:L4e(r)}),({$lines:r})=>r&&Nt(["display:-webkit-box;-webkit-line-clamp:",";-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;"],r),({$link:r})=>r&&Nt(["&:focus{outline:none;}&[data-focus-visible-added]:focus{","}&:focus-visible{","}"],Sc(UT.states.focus.outline),Sc(UT.states.focus.outline))),Am=x.forwardRef(function({variant:e="body_short",children:t,bold:n,italic:i,link:o,lines:a,color:c,group:d,token:u,as:h,...p},m){const v=h||O4e(e,o),_=H4e(e,n,i,o),b=Z4e(_,d);if(typeof b>"u")throw new Error(`Typography variant not found for variant "${_}" ("${e}") & group "${d||""}"`);return E.jsx(N4e,{as:v,$typography:{...b,...u},$link:o,$lines:a,ref:m,$color:c,...p,children:t})}),{spacings:{comfortable:{medium:op}},typography:{ui:{accordion_header:BT},paragraph:{body_long:D4e}},colors:{ui:{background__default:{rgba:V4e},background__scrim:{rgba:F4e}}},shape:{corners:{borderRadius:z4e}}}=tt,j4e={width:"252px",background:V4e,typography:BT,border:{type:"border",radius:z4e},spacings:{bottom:op},entities:{children:{spacings:{top:op,bottom:op,left:op,right:op}},title:{minHeight:"24px",typography:BT},content:{minHeight:"80px",height:"104px",typography:D4e},actions:{minHeight:"48px"},scrim:{background:F4e}},modes:{compact:{}}},U4e=Ve(p9).attrs({"aria-labelledby":"eds-dialog-title","aria-describedby":"eds-dialog-customcontent",elevation:"above_scrim"}).withConfig({displayName:"Dialog__StyledDialog",componentId:"sc-1mewo3f-0"})(({theme:r})=>Nt(["width:",";background:",";display:grid;grid-auto-columns:auto;",";",";grid-gap:",";"],r.width,r.background,Fa(r.typography),Ol(r.border),r.spacings.bottom)),B4e=Ve.dialog.withConfig({displayName:"Dialog__StyledNativeDialog",componentId:"sc-1mewo3f-1"})(({theme:r})=>Nt(["padding:0;border:0;overflow:visible;overscroll-behavior:contain;",";&::backdrop{background-color:",";}"],Ol(r.border),r.entities.scrim.background)),q4e=x.forwardRef(function({children:e,open:t,onClose:n,isDismissable:i=!1,dialogRef:o,...a},c){const{density:d}=Tc(),u=x.useRef(null),h=Gu({density:d},j4e),p=x.useMemo(()=>Vu(u,o),[u,o]);x.useEffect(()=>{var v,_;t?(v=u==null?void 0:u.current)==null||v.showModal():(_=u==null?void 0:u.current)==null||_.close()},[t]),fve(t);const m=v=>{const{target:_}=v;_ instanceof HTMLElement&&i&&_.nodeName==="DIALOG"&&n&&n()};return ew("Escape",v=>{v.preventDefault(),i&&n&&t&&n&&n()}),E.jsx(l1,{theme:h,children:E.jsx(B4e,{ref:p,onMouseDown:m,children:t&&E.jsx(U4e,{...a,ref:c,children:e})})})}),K4e=Ve.div.withConfig({displayName:"DialogActions__StyledDialogActions",componentId:"sc-16ydtxd-0"})(({theme:r,children:e})=>Nt(["align-self:end;justify-self:start;padding:0 "," 0 ",";&:first-child{padding-top:",";}&:last-child{padding-bottom:",";}",""],r.entities.children.spacings.right,r.entities.children.spacings.left,r.entities.children.spacings.top,r.entities.children.spacings.bottom,!e&&Nt(["min-height:initial;height:'8px';"]))),G4e=x.forwardRef(function({children:e,...t},n){return E.jsx(K4e,{ref:n,...t,children:e})}),W4e=Ve.div.withConfig({displayName:"DialogTitle__StyledDialogTitle",componentId:"sc-1t3jljt-0"})(({theme:r,children:e})=>Nt([""," min-height:",";align-self:end;justify-self:start;margin-right:",";",""],Fa(r.entities.title.typography),r.entities.title.minHeight,r.entities.children.spacings.right,!e&&Nt(["min-height:initial;height:'8px';"]))),Y4e=x.forwardRef(function({children:e,...t},n){return E.jsx(E.Fragment,{children:E.jsx(W4e,{id:"eds-dialog-title",ref:n,...t,children:e})})}),{colors:{ui:{background__default:{rgba:Q4e},background__light:{rgba:X4e},background__medium:{rgba:J4e}}},spacings:{comfortable:{small:qT,medium:KT}}}=tt,e5e={lighter:{background:Q4e},light:{background:X4e},mediumColor:{background:J4e}},t5e={spacings:{top:qT,bottom:qT}},r5e={spacings:{top:KT,bottom:KT}},ow=Object.freeze(Object.defineProperty({__proto__:null,divider:e5e,medium:r5e,small:t5e},Symbol.toStringTag,{value:"Module"})),{divider:n5e}=ow,i5e=Ve.hr.withConfig({displayName:"Divider__StyledDivider",componentId:"sc-1d8osde-0"})(({$backgroundColor:r,$marginTop:e,$marginBottom:t,$dividerHeight:n})=>Nt(["border:none;background-color:",";margin-top:",";margin-bottom:calc("," - ","px);height:","px;"],r,e,t,n,n)),m9=x.forwardRef(function({color:e="medium",variant:t="medium",size:n="1",...i},o){const c={$backgroundColor:n5e[e==="medium"?"mediumColor":e].background,$marginTop:ow[t].spacings.top,$marginBottom:ow[t].spacings.bottom,$dividerHeight:parseInt(n),...i};return E.jsx(i5e,{...c,ref:o})}),o5e=Ve.div.withConfig({displayName:"DialogContent__StyledDialogContent",componentId:"sc-1tze18k-0"})(({theme:r,$scrollable:e})=>Nt(["--content-spacing-top:",";"," min-height:",";align-self:stretch;justify-self:stretch;padding:0 "," 0 ",";&:first-child{padding-top:var(--content-spacing-top);}&:last-child{padding-bottom:",";}",""],r.entities.children.spacings.top,Fa(r.entities.content.typography),r.entities.content.minHeight,r.entities.children.spacings.right,r.entities.children.spacings.left,r.entities.children.spacings.bottom,e&&Nt(["&:not(:first-child){margin-top:calc(var(--content-spacing-top) * -1);}padding-top:var(--content-spacing-top);margin-bottom:calc(var(--content-spacing-top) * -1);padding-bottom:var(--content-spacing-top);min-height:initial;height:",";overflow-y:auto;"],r.entities.content.height))),a5e=Ve(m9).withConfig({displayName:"DialogContent__StyledDivider",componentId:"sc-1tze18k-1"})(["width:100%;margin:0;"]),fZ=x.forwardRef(function({children:e,scrollable:t=!1,...n},i){const o={$scrollable:t,ref:i,...n};return E.jsxs(E.Fragment,{children:[E.jsx(o5e,{id:"eds-dialog-customcontent",...o,children:e}),e&&t&&E.jsx(a5e,{color:"medium",variant:"small"})]})}),s5e=Ve.div.withConfig({displayName:"DialogHeader__StyledDialogHeader",componentId:"sc-mbwcos-0"})(({theme:r})=>Nt(["display:flex;justify-content:space-between;align-items:center;padding:"," "," 0 ",";"],r.entities.children.spacings.top,r.entities.children.spacings.right,r.entities.children.spacings.left)),c5e=Ve(m9).withConfig({displayName:"DialogHeader__StyledDivider",componentId:"sc-mbwcos-1"})(["margin-bottom:0;"]),l5e=x.forwardRef(function({children:e,...t},n){const i={...t,ref:n};return E.jsxs("div",{...i,children:[E.jsx(s5e,{children:e}),E.jsx(c5e,{variant:"small",color:"medium"})]})}),gn=q4e;gn.Actions=G4e;gn.Title=Y4e;gn.CustomContent=fZ;gn.Content=fZ;gn.Header=l5e;gn.Actions.displayName="Dialog.Actions";gn.Title.displayName="Dialog.Title";gn.Content.displayName="Dialog.Content";gn.Header.displayName="Dialog.Header";const d5e=Ve.div.withConfig({displayName:"SnackbarAction__StyledSnackbarAction",componentId:"sc-1v5mjvd-0"})(({theme:r})=>Nt(["display:inline-flex;margin-left:",";margin-top:",";margin-bottom:",";"],r.entities.actions.spacings.left,r.entities.actions.spacings.top,r.entities.actions.spacings.bottom)),u5e=x.forwardRef(function({children:e,...t},n){const i={...t,ref:n};return E.jsx(d5e,{...i,children:x.Children.only(e)})}),{typography:{ui:{snackbar:h5e}},colors:{ui:{background__overlay:{rgba:f5e}},text:{static_icons__primary_white:{rgba:p5e}},interactive:{link_in_snackbars:{rgba:m5e}}},spacings:{comfortable:{medium:vg,x_large:g5e}},clickbounds:{default__base:v5e},shape:{button:{borderRadius:y5e}}}=tt,_5e={background:f5e,minHeight:v5e,border:{type:"border",width:0,radius:y5e},entities:{actions:{spacings:{left:g5e,top:"-10px",bottom:"-10px"}},button:{typography:{color:m5e}}},spacings:{left:vg,bottom:vg,right:vg,top:vg},typography:{...h5e,color:p5e},modes:{compact:{}}},b5e=Ve("div").withConfig({shouldForwardProp:()=>!0,displayName:"Snackbar__PopoverDiv",componentId:"sc-ac6no8-0"})(({theme:r,$placement:e})=>Nt(["inset:unset;border:0;overflow:visible;position:fixed;padding:0;background-color:transparent;"," &::backdrop{background-color:transparent;}"],{top:e.includes("top")?r.spacings.top:e==="left"||e==="right"?"50%":void 0,bottom:e.includes("bottom")?r.spacings.bottom:void 0,right:e.includes("right")?r.spacings.right:void 0,left:e.includes("left")?r.spacings.left:e==="top"||e==="bottom"?"50%":void 0,transform:e==="left"||e==="right"?"translateY(-50%)":e==="top"||e==="bottom"?"translateX(-50%)":void 0})),w5e=Ve(p9).withConfig({displayName:"Snackbar__StyledSnackbar",componentId:"sc-ac6no8-1"})(({theme:r})=>Nt(["background-color:",";"," "," "," min-height:",";box-sizing:border-box;a,button{color:",";}"],r.background,Gl(r.spacings),Ol(r.border),Fa(r.typography),r.minHeight,r.entities.button.typography.color)),x5e=x.forwardRef(function({open:e=!1,autoHideDuration:t=7e3,onClose:n,placement:i="bottom",children:o,...a},c){const[d,u]=x.useState(e),h=x.useRef();x.useEffect(()=>(u(e),e&&(h.current=setTimeout(()=>{u(!1),n&&n()},t)),()=>clearTimeout(h.current)),[e,t]);const p={ref:c,...a},{density:m}=Tc(),v=Gu({density:m},_5e);return E.jsx(l1,{theme:v,children:d&&E.jsx(b5e,{popover:"manual",$placement:i,ref:_=>_==null?void 0:_.showPopover(),children:E.jsx(w5e,{role:"alert",elevation:"overlay",...p,children:o})})})}),pZ=x5e;pZ.Action=u5e;const{colors:{infographic:{primary__moss_green_13:{rgba:C5e},primary__moss_green_100:{rgba:k5e}},interactive:{icon_on_interactive_colors:{rgba:E5e}},ui:{background__semitransparent:{rgba:S5e}}}}=tt,A5e={background:C5e,entities:{progress:{background:k5e}}},T5e={background:S5e,entities:{progress:{background:E5e}}},GT=Object.freeze(Object.defineProperty({__proto__:null,neutral:T5e,primary:A5e},Symbol.toStringTag,{value:"Module"})),I5e=xge(["100%{transform:rotate(360deg);}"]),R5e=Ve.svg.withConfig({displayName:"CircularProgress__Svg",componentId:"sc-hib054-0"})(["display:inline-block;",";"],({$variant:r})=>r==="indeterminate"?Nt(["animation:"," 1.4s linear infinite;"],I5e):Nt(["transform:rotate(-90deg);"])),P5e=Ve.output.withConfig({displayName:"CircularProgress__SrOnlyOutput",componentId:"sc-hib054-1"})(["position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0;"]),M5e=Ve.circle.withConfig({displayName:"CircularProgress__TrackCircle",componentId:"sc-hib054-2"})([""]),$5e=Ve.circle.withConfig({displayName:"CircularProgress__ProgressCircle",componentId:"sc-hib054-3"})([""]),O5e=r=>GT[r]?GT[r]:{background:"transparent",entities:{progress:{background:r}}},Z5e=x.forwardRef(function({variant:e="indeterminate",value:t=null,size:n=48,color:i="primary",...o},a){const d=Math.round(t),u={},h={...o,ref:a,$variant:e},p=O5e(i),[m,v]=x.useState(0),_=2*Math.PI*(44/2);e==="determinate"&&(u.stroke=_.toFixed(3),u.strokeDashoffset=`${((100-d)/100*_).toFixed(3)}px`,h["aria-valuenow"]=d,t!==void 0&&(h["aria-valuenow"]=d,h["aria-valuemin"]=0,h["aria-valuemax"]=100)),x.useEffect(()=>{e!=="indeterminate"&&(d>=25&&d<50?v(25):d>=50&&d<75?v(50):d>=75&&d<100?v(75):d===100&&v(100))},[d,e]);const b=()=>`Loading ${m}%`;return E.jsxs(E.Fragment,{children:[E.jsxs(R5e,{...h,viewBox:"24 24 48 48",role:"progressbar",height:n,width:n,preserveAspectRatio:"xMidYMid meet",children:[E.jsx(M5e,{style:u,cx:48,cy:48,r:44/2,fill:"none",strokeWidth:4,stroke:p.background}),E.jsx($5e,{style:u,cx:48,cy:48,r:44/2,fill:"none",strokeLinecap:"round",strokeWidth:4,strokeDasharray:e==="determinate"?_:48,stroke:p.entities.progress.background})]}),e==="determinate"&&E.jsx(P5e,{children:b()})]})}),mZ={focusedIndex:-1,initialFocus:null,onClose:null},gZ=x.createContext(mZ),L5e=({children:r})=>{const[e,t]=x.useState(mZ),{focusedIndex:n,initialFocus:i,onClose:o}=e,a=h=>{t(p=>({...p,focusedIndex:h}))},c=h=>{t(p=>({...p,initialFocus:h}))},u={setFocusedIndex:a,focusedIndex:n,setInitialFocus:c,initialFocus:i,setOnClose:h=>{const p=()=>{a(-1),c(null),h()};t(m=>({...m,onClose:p}))},onClose:o};return E.jsx(gZ.Provider,{value:u,children:r})},g9=()=>x.useContext(gZ),{colors:{ui:{background__default:{rgba:H5e}},interactive:{primary__selected_highlight:{rgba:N5e},primary__resting:{rgba:D5e},focus:{rgba:V5e},disabled__fill:{rgba:F5e},disabled__text:{rgba:z5e},table__header__fill_hover:{rgba:j5e}},text:{static_icons__default:{rgba:U5e}}},spacings:{comfortable:{medium:WT,large:Mh,small:$h}},typography:{navigation:{menu_title:fb}}}=tt,M2={background:H5e,spacings:{top:$h,bottom:$h,left:"0px",right:"0px"},border:{type:"border",radius:"4px"},typography:{...fb,color:U5e},entities:{icon:{states:{disabled:{typography:{color:F5e}}}},item:{spacings:{left:Mh,right:Mh,top:WT,bottom:WT},states:{active:{typography:{...fb,color:D5e},background:N5e},focus:{outline:{color:V5e,style:"dashed",type:"outline",width:"2px",offset:"2px"}},hover:{background:j5e},disabled:{typography:{...fb,color:z5e}}}},title:{spacings:{left:Mh,right:Mh,top:$h,bottom:$h}}},modes:{compact:{entities:{item:{spacings:{left:Mh,right:Mh,top:$h,bottom:$h}}}}}},{typography:B5e,entities:{item:{states:{active:YT,focus:q5e,hover:K5e,disabled:G5e}},icon:W5e}}=M2,Y5e=Ve.button.attrs(({$isFocused:r})=>({role:"menuitem",tabIndex:r?-1:0})).withConfig({displayName:"MenuItem__Item",componentId:"sc-1g9fpbe-0"})(["border:0;background-color:transparent;width:auto;position:relative;z-index:2;text-decoration:none;"," "," "," ",""],Fa(B5e),({theme:r})=>Gl(r.entities.item.spacings),({$active:r})=>r&&Nt(["background:",";*{color:",";}"],YT.background,YT.typography.color),({disabled:r})=>r?Nt(["*{color:",";}svg{fill:",";}@media (hover:hover) and (pointer:fine){&:hover{cursor:not-allowed;}}"],G5e.typography.color,W5e.states.disabled.typography.color):Nt(["@media (hover:hover) and (pointer:fine){&:hover{cursor:pointer;background:",";}}&:focus-visible{z-index:3;","}"],K5e.background,Sc(q5e.outline))),Q5e=Ve.div.withConfig({displayName:"MenuItem__Content",componentId:"sc-1g9fpbe-1"})(["width:auto;display:grid;grid-gap:16px;grid-auto-flow:column;grid-auto-columns:max-content auto max-content;align-items:center;"]),n5=x.forwardRef(function({children:e,disabled:t,active:n,index:i=0,as:o="button",onClick:a,closeMenuOnClick:c=!0,...d},u){const{focusedIndex:h,setFocusedIndex:p,onClose:m}=g9(),v=C=>{h!==C&&p(C)},_=i===h,b={...d,as:o,disabled:t,$isFocused:_};return E.jsx(Y5e,{...b,$active:n,type:"button",ref:Vu(u,C=>{_&&requestAnimationFrame(()=>{C!==null&&C.focus()})}),onFocus:()=>v(i),onClick:C=>{a&&(a(C),m!==null&&c&&m(C))},children:E.jsx(Q5e,{children:e})})});n5.displayName="MenuItem";const X5e=Ve.div.attrs(()=>({tabIndex:0})).withConfig({displayName:"MenuSection__Header",componentId:"sc-gfcbvg-0"})([""," &:focus{outline:none;}"],Gl(M2.entities.title.spacings)),vZ=x.memo(function(e){const{children:t,title:n,index:i}=e;return E.jsxs(E.Fragment,{children:[i!==0&&E.jsx("div",{children:E.jsx(m9,{variant:"small"})}),n&&E.jsx(X5e,{role:"group",children:E.jsx(Am,{group:"navigation",variant:"label",children:n})}),t]})}),J5e=Ve.div.withConfig({displayName:"MenuList__List",componentId:"sc-104rzof-0"})(["position:relative;list-style:none;display:flex;flex-direction:column;margin:0;"," li:first-child{z-index:3;}"],Gl(M2.spacings));function QT(r){return!!(x.isValidElement(r)&&!r.props.disabled&&r.type===n5)}function eye(r){return!!(x.isValidElement(r)&&r.type===n5&&r.props.closeMenuOnClick!==!1)}const tye=x.forwardRef(function({addCloseMenuOnClickIndex:e,children:t,...n},i){const{focusedIndex:o,setFocusedIndex:a,initialFocus:c}=g9();let d=-1;const u=x.useMemo(()=>[],[]),h=x.useMemo(()=>x.Children.map(t,b=>{if(!b)return b;if(b.type===vZ){d++;const C=d,T=x.Children.map(b.props.children,A=>(d++,QT(A)&&u.push(d),x.cloneElement(A,{index:d})));return x.cloneElement(b,{index:C},T)}else return d++,QT(b)&&u.push(d),eye(b)&&e(d),x.cloneElement(b,{index:d})}),[t,u,d,e]),p=u[0],m=u[u.length-1];x.useEffect(()=>{c==="first"&&a(p),c==="last"&&a(m)},[c,p,m]);const v=(b,C)=>{const T=b==="down"?1:-1,A=u.indexOf(o),I=u[A+T];a(typeof I>"u"?C:I)},_=b=>{const{key:C}=b;b.stopPropagation(),C==="ArrowDown"&&(b.preventDefault(),v("down",p)),C==="ArrowUp"&&(b.preventDefault(),v("up",m))};return E.jsx(J5e,{onKeyDown:_,role:"menu",...n,ref:i,children:h})}),{border:rye}=M2,nye=Ve(p9).withConfig({displayName:"Menu__MenuPaper",componentId:"sc-1vlnqcj-0"})(["width:100%;min-width:fit-content;",";"],Ol(rye)),iye=Ve("div").withConfig({shouldForwardProp:()=>!0}).withConfig({displayName:"Menu__StyledPopover",componentId:"sc-1vlnqcj-1"})(["inset:unset;border:0;padding:0;margin:0;overflow:visible;background-color:transparent;&::backdrop{background-color:transparent;}"]),oye=x.forwardRef(function({children:e,anchorEl:t,onClose:n,open:i,...o},a){const{setOnClose:c,onClose:d,setInitialFocus:u,focusedIndex:h}=g9(),p=x.useMemo(()=>[],[]);x.useEffect(()=>{d===null&&n&&c(n)},[d,n,c]),x.useEffect(()=>{const v=_=>{const{key:b}=_;switch((b==="ArrowDown"||b==="ArrowUp")&&(_.preventDefault(),_.stopPropagation(),t.dispatchEvent(new Event("click",{bubbles:!0}))),b){case"Enter":case"ArrowDown":u("first");break;case"ArrowUp":u("last");break}};return t&&t.addEventListener("keydown",v),()=>{t&&t.removeEventListener("keydown",v)}},[t]),ew("Escape",()=>{i&&d!==null&&(d(),t.focus())}),ew("Enter",()=>{i&&d!==null&&p.includes(h)&&setTimeout(()=>{window.document.contains(t)&&t.focus()},0)});const m=v=>{p.indexOf(v)<0&&p.push(v)};return E.jsx(tye,{addCloseMenuOnClickIndex:m,...o,ref:a,children:e})}),aye=x.forwardRef(function({anchorEl:e,open:t,placement:n="bottom",matchAnchorWidth:i=!1,onClose:o,style:a,className:c,...d},u){const{density:h}=Tc(),p=Gu({density:h},M2);let m=[iZ(4),aZ(),oZ({padding:8})];i&&(m=[...m,zve({apply({rects:R,elements:Y}){Object.assign(Y.floating.style,{width:`${R.reference.width}px`})}})]);const{x:v,y:_,refs:b,update:C,strategy:T,context:A}=dZ({elements:{reference:e},placement:n,open:t,onOpenChange:o,middleware:m}),I=x.useMemo(()=>Vu(b.setFloating,u),[b.setFloating,u]);PT(()=>{if(b.reference.current&&b.floating.current&&t)return D4(b.reference.current,b.floating.current,C)},[b.reference,b.floating,C,t]),PT(()=>{var R,Y;t?(R=b.floating.current)==null||R.showPopover():(Y=b.floating.current)==null||Y.hidePopover()},[t,b.floating]);const{getFloatingProps:O}=uZ([lZ(A,{escapeKey:!1})]),B={className:c},z={...d,onClose:o,anchorEl:e,open:t};return E.jsx(l1,{theme:p,children:E.jsx(iye,{popover:"manual",...O({ref:I,style:{...a,position:T,top:_||0,left:v||0}}),children:E.jsx(nye,{elevation:"raised",...B,children:E.jsx(L5e,{children:E.jsx(oye,{...z,ref:u})})})})})}),Yf=aye;Yf.Item=n5;Yf.Section=vZ;Yf.Item.displayName="Menu.Item";Yf.Section.displayName="Menu.Section";const{colors:{ui:{background__light:{rgba:sye}},text:{static_icons__default:cye,static_icons__tertiary:pb},interactive:{disabled__text:XT,primary__resting:lye,danger__resting:dye,danger__hover:JT,warning__resting:uye,warning__hover:eI,success__resting:hye,success__hover:tI}},spacings:{comfortable:{small:rI,x_small:yg}},typography:Tm,shape:nI}=tt,i5={minHeight:nI.straight.minHeight,background:sye,spacings:{left:rI,right:rI,top:"6px",bottom:"6px"},typography:{...Tm.input.text,color:cye.rgba},entities:{placeholder:{typography:{color:pb.rgba}},helperText:{typography:{...Tm.input.label,color:pb.rgba},states:{disabled:{typography:{color:XT.rgba}}}}},states:{disabled:{typography:{color:XT.rgba}},readOnly:{background:"transparent",boxShadow:"none"},active:{outline:{type:"outline",color:"transparent",width:"1px",style:"solid",offset:"0px"}},focus:{outline:{type:"outline",width:"2px",color:lye.rgba,style:"solid",offset:"0px"}}},boxShadow:"inset 0px -1px 0px 0px "+pb.rgba,modes:{compact:{minHeight:nI._modes.compact.straight.minHeight,spacings:{left:yg,right:yg,top:yg,bottom:yg}}}},fye=vn(i5,{boxShadow:"none",outline:{color:dye.rgba},states:{focus:{outline:{color:JT.rgba}}},entities:{helperText:{typography:{...Tm.input.label,color:JT.rgba}}}}),pye=vn(i5,{boxShadow:"none",outline:{color:uye.rgba},states:{focus:{outline:{color:eI.rgba}}},entities:{helperText:{typography:{...Tm.input.label,color:eI.rgba}}}}),mye=vn(i5,{boxShadow:"none",outline:{color:hye.rgba},states:{focus:{outline:{color:tI.rgba}}},entities:{helperText:{typography:{...Tm.input.label,color:tI.rgba}}}}),gye={input:i5,error:fye,warning:pye,success:mye},{colors:iI,typography:vye}=tt,yZ={background:iI.ui.background__light.hex,typography:{...vye.input.helper,color:iI.text.static_icons__tertiary.rgba}},yye=Ve.div.withConfig({displayName:"HelperText__Container",componentId:"sc-189ug61-0"})(({color:r})=>Nt({display:"grid",gap:"8px",gridAutoFlow:"column",alignItems:"start",justifyContent:"start",color:r})),_ye=Ve.p.withConfig({displayName:"HelperText__Text",componentId:"sc-189ug61-1"})(["margin:0;",";white-space:pre-line;"],d9(yZ.typography)),bye=x.forwardRef(function({text:e,icon:t,color:n=yZ.typography.color,...i},o){return e?E.jsxs(yye,{...i,color:n,ref:o,children:[t,E.jsx(_ye,{children:e})]}):null}),{colors:mb,spacings:{comfortable:oI},typography:wye}=tt,ap={background:mb.ui.background__light.rgba,typography:{...wye.input.label,color:mb.text.static_icons__tertiary.rgba},spacings:{left:oI.small,right:oI.small},states:{disabled:{typography:{color:mb.interactive.disabled__text.rgba}}}},xye=Ve.label.withConfig({displayName:"Label__LabelBase",componentId:"sc-1gi2bcn-0"})(["display:flex;justify-content:space-between;align-items:flex-end;position:relative;"," margin-left:",";margin-right:",";color:",";"],Fa(ap.typography),ap.spacings.left,ap.spacings.right,({$disabledText:r})=>r?ap.states.disabled.typography.color:ap.typography.color),aI=Ve.span.withConfig({displayName:"Label__Text",componentId:"sc-1gi2bcn-1"})(["margin:0;"]),Im=x.forwardRef(function(e,t){const{label:n="",meta:i,disabled:o=!1,...a}=e;return E.jsxs(xye,{ref:t,$disabledText:o,...a,children:[E.jsx(aI,{children:n}),i&&E.jsx(aI,{children:i})]})}),Cye=Ve.div.withConfig({displayName:"InputWrapper__Container",componentId:"sc-v6o9z1-0"})([""]),kye=Ve(bye).withConfig({displayName:"InputWrapper__HelperText",componentId:"sc-v6o9z1-1"})(["margin-top:8px;margin-left:8px;"]),Eye=Ve(Im).withConfig({displayName:"InputWrapper__Label",componentId:"sc-v6o9z1-2"})(["margin-left:8px;margin-right:8px;"]),_Z=x.forwardRef(function({children:e,color:t,label:n,labelProps:i={},helperProps:o={},helperIcon:a,...c},d){const{density:u}=Tc(),p=gye[t||"input"],m=Gu({density:u},p),v=x.useCallback(()=>{const C=m();return c.disabled?C.entities.helperText.states.disabled.typography.color:C.entities.helperText.typography.color},[m,c.disabled])(),_=!!(o!=null&&o.text),b=!!(n||i!=null&&i.label);return E.jsx(l1,{theme:m,children:E.jsxs(Cye,{...c,ref:d,children:[b&&E.jsx(Eye,{label:n,...i}),e,_&&E.jsx(kye,{color:v,icon:a,...o})]})})}),{colors:{ui:{background__light:{rgba:Sye}},text:{static_icons__default:Aye,static_icons__tertiary:gb},interactive:{disabled__text:sI,primary__resting:Tye,danger__resting:cI,danger__hover:lI,warning__resting:dI,warning__hover:uI,success__resting:hI,success__hover:fI}},spacings:{comfortable:{small:_g,x_small:bg}},typography:Rm,shape:pI}=tt,d1={height:pI.straight.minHeight,width:"100%",background:Sye,spacings:{left:_g,right:_g,top:"6px",bottom:"6px"},typography:{...Rm.input.text,color:Aye.rgba},outline:{type:"outline",color:"transparent",width:"1px",style:"solid",offset:"0px"},entities:{placeholder:{typography:{color:gb.rgba}},adornment:{typography:{...Rm.input.label,color:gb.rgba},spacings:{left:_g,right:_g},states:{disabled:{typography:{color:sI.rgba}}}}},states:{disabled:{typography:{color:sI.rgba}},readOnly:{background:"transparent",boxShadow:"none"},active:{},focus:{outline:{type:"outline",width:"2px",color:Tye.rgba,style:"solid",offset:"0px"}}},boxShadow:"inset 0px -1px 0px 0px "+gb.rgba,modes:{compact:{height:pI._modes.compact.straight.minHeight,spacings:{left:bg,right:bg,top:bg,bottom:bg}}}},bZ=vn(d1,{boxShadow:"none",outline:{color:cI.rgba},states:{focus:{outline:{color:lI.rgba}}},entities:{adornment:{typography:{...Rm.input.label,color:cI.rgba},states:{focus:{outline:{color:lI.rgba}}}}}}),wZ=vn(d1,{boxShadow:"none",outline:{color:dI.rgba},states:{focus:{outline:{color:uI.rgba}}},entities:{adornment:{typography:{...Rm.input.label,color:dI.rgba},states:{focus:{outline:{color:uI.rgba}}}}}}),xZ=vn(d1,{boxShadow:"none",outline:{color:hI.rgba},states:{focus:{outline:{color:fI.rgba}}},entities:{adornment:{typography:{...Rm.input.label,color:hI.rgba},states:{focus:{outline:{color:fI.rgba}}}}}}),qg={input:d1,error:bZ,warning:wZ,success:xZ},Iye=Object.freeze(Object.defineProperty({__proto__:null,error:bZ,input:d1,inputToken:qg,success:xZ,warning:wZ},Symbol.toStringTag,{value:"Module"})),Rye=Ve.div.withConfig({displayName:"Input__Container",componentId:"sc-1ykv024-0"})(({$token:r,disabled:e,readOnly:t})=>{var o,a;const{states:n,entities:i}=r;return Nt(["--eds-input-adornment-color:",";--eds-input-color:",";position:relative;height:",";width:",";display:flex;flex-direction:row;border:none;box-sizing:border-box;box-shadow:",";background:var(--eds-input-background,",");"," &:focus-within{--eds-input-adornment-color:",";box-shadow:none;","}"," "," & > input{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;}"],i.adornment.typography.color,r.typography.color,r.height,r.width,r.boxShadow,r.background,Sc(r.outline),(a=(o=i.adornment)==null?void 0:o.states.focus)==null?void 0:a.outline.color,Sc(n.focus.outline),e&&Nt(["--eds-input-adornment-color:",";--eds-input-color:",";cursor:not-allowed;box-shadow:none;"],n.disabled.typography.color,n.disabled.typography.color),t&&Nt({background:n.readOnly.background,boxShadow:n.readOnly.boxShadow}))}),Pye=Ve.input.withConfig({displayName:"Input__StyledInput",componentId:"sc-1ykv024-1"})(({$token:r,$paddingLeft:e,$paddingRight:t})=>Nt(["width:100%;border:none;background:transparent;"," "," outline:none;padding-left:",";padding-right:",";&::placeholder{color:",";}&:disabled{color:var(--eds-input-color);cursor:not-allowed;}"],Gl(r.spacings),d9(r.typography),e,t,r.entities.placeholder.typography.color)),CZ=Ve.div.withConfig({displayName:"Input__Adornments",componentId:"sc-1ykv024-2"})(({$token:r})=>Nt(["position:absolute;top:",";bottom:",";display:flex;align-items:center;"," color:var(--eds-input-adornment-color);"],r.spacings.top,r.spacings.bottom,d9(r.entities.adornment.typography))),Mye=Ve(CZ).withConfig({displayName:"Input__LeftAdornments",componentId:"sc-1ykv024-3"})(({$token:r})=>Nt(["left:0;padding-left:",";"],r.entities.adornment.spacings.left)),$ye=Ve(CZ).withConfig({displayName:"Input__RightAdornments",componentId:"sc-1ykv024-4"})(({$token:r})=>Nt(["right:0;padding-right:",";"],r.entities.adornment.spacings.right)),Fu=x.forwardRef(function({variant:e,disabled:t=!1,type:n="text",leftAdornments:i,rightAdornments:o,readOnly:a,className:c,style:d,leftAdornmentsProps:u,rightAdornmentsProps:h,leftAdornmentsWidth:p,rightAdornmentsWidth:m,...v},_){const b=qg[e]?qg[e]:qg.input,{density:C}=Tc(),T=Gu({density:C},b)(),[A,I]=x.useState(),[O,B]=x.useState(),z=x.useCallback(()=>{const Te=p||(O?O.clientWidth:0),ke=m||(A?A.clientWidth:0);return{...T,spacings:{...T.spacings,left:`${Te+parseInt(T.spacings.left)}px`,right:`${ke+parseInt(T.spacings.right)}px`}}},[p,O,m,A,T])(),R={ref:_,type:n,disabled:t,readOnly:a,$token:z,style:{resize:"none"},...v},Y={disabled:t,readOnly:a,className:c,style:d,$token:z},ue={...u,ref:B,$token:z},le={...h,ref:I,$token:z};return E.jsxs(Rye,{...Y,children:[i?E.jsx(Mye,{...ue,children:i}):null,E.jsx(Pye,{$paddingLeft:z.spacings.left,$paddingRight:z.spacings.right,...R}),o?E.jsx($ye,{...le,children:o}):null]})}),{input:mI}=Iye,Oye=x.forwardRef(function({variant:e,disabled:t=!1,type:n="text",rowsMax:i,...o},a){const[c,d]=x.useState(null),{density:u}=Tc(),h=u==="compact"?mI.modes.compact.spacings:mI.spacings,{lineHeight:p}=d1.typography,{top:m,bottom:v}=h;let _=16;c&&(_=parseInt(window.getComputedStyle(c).fontSize));const b=parseInt(m)+parseInt(v),C=parseFloat(p)*_*i+b;lve(c,i?C:null);const A={ref:x.useCallback(()=>Vu(a,d),[d,a])(),type:n,disabled:t,variant:e,...o},I={style:{alignItems:"flex-start"}},O={style:{alignItems:"flex-start",pointerEvents:"none"}};return E.jsx(Fu,{as:"textarea",rightAdornmentsProps:O,leftAdornmentsProps:I,style:{height:"auto"},...A})}),Zye=x.forwardRef(function(e,t){return e.$multiline?E.jsx(Oye,{ref:t,...e}):E.jsx(Fu,{ref:t,...e})}),kZ=x.forwardRef(function({id:e,label:t,meta:n,unit:i,helperText:o,placeholder:a,disabled:c,multiline:d=!1,className:u,variant:h,inputIcon:p,helperIcon:m,style:v,rowsMax:_,textareaRef:b,inputRef:C,...T},A){const I=tw(e,"input"),O=tw(null,"helpertext");let z={"aria-invalid":h==="error"||void 0,disabled:c,placeholder:a,id:I,variant:h,rightAdornments:!!(i||p)&&E.jsxs(E.Fragment,{children:[p,E.jsx("span",{children:i})]}),rowsMax:_,ref:C||b,$multiline:d,...T},R={id:null,text:o,icon:m,disabled:c};const Y={ref:A,className:u,style:{width:"100%",...v},color:h},ue={htmlFor:I,label:t,meta:n,disabled:c};return o&&(z={"aria-describedby":O,...z},R={...R,id:O}),E.jsx(_Z,{helperProps:R,labelProps:ue,...Y,children:E.jsx(Zye,{...z})})}),Lye=Ve(Fu).withConfig({displayName:"Search__SearchInput",componentId:"sc-v8l23u-0"})(["input{&[type='search']::-webkit-search-decoration,&[type='search']::-webkit-search-cancel-button,&[type='search']::-webkit-search-results-button,&[type='search']::-webkit-search-results-decoration{-webkit-appearance:none;}}"]),Hye=Ve(da).withConfig({displayName:"Search__InsideButton",componentId:"sc-v8l23u-1"})(["height:24px;width:24px;"]),Nye=x.forwardRef(function({onChange:e,style:t,className:n,...i},o){const a=x.useRef(null),[c,d]=x.useState(!!i.defaultValue);x.useEffect(()=>{i.disabled?d(!1):i.value&&d(!!i.value)},[i.value,i.disabled]);const u=()=>{const m=a.current;pve(m,"")},h=m=>{d(!!m.currentTarget.value)},p=x.useMemo(()=>Vu(a,o),[a,o]);return E.jsx(_Z,{role:"search",style:t,className:n,children:E.jsx(Lye,{onChange:m=>{h(m),e&&e(m)},ref:p,leftAdornmentsWidth:32,leftAdornments:E.jsx(Pi,{data:xte,"aria-hidden":!0,size:18}),rightAdornmentsWidth:32,rightAdornments:E.jsx(E.Fragment,{children:c&&E.jsx(Hye,{"aria-label":"clear search",title:"clear",variant:"ghost_icon",onClick:m=>{m.stopPropagation(),u()},children:E.jsx(Pi,{data:O8,size:16})})}),...i})})}),{colors:{interactive:{primary__resting:{rgba:Dye},primary__hover_alt:{rgba:Vye},focus:{rgba:gI},disabled__text:{rgba:Fye}}},typography:{navigation:{menu_title:zye}},spacings:{comfortable:{medium_small:wg,x_small:xg,x_large:jye,xx_large:Uye}},clickbounds:{default__base:Bye,compact__standard:qye},interactions:{focused:{width:vI}}}=tt,Fp={background:Dye,typography:zye,width:Uye,spacings:{bottom:wg,top:wg,left:wg,right:wg},clickbound:{height:Bye},states:{hover:{background:Vye},disabled:{background:Fye},focus:{outline:{type:"outline",style:"dashed",width:vI,color:gI,offset:"10px"}}},modes:{compact:{width:jye,spacings:{bottom:xg,top:xg,left:xg,right:xg},clickbound:{height:qye},states:{focus:{outline:{type:"outline",style:"dashed",width:vI,color:gI,offset:"2px"}}}}}},vb=Ve.path.attrs(({$icon:r})=>({fillRule:"evenodd",clipRule:"evenodd",d:r.svgPathData})).withConfig({displayName:"Input__StyledPath",componentId:"sc-rqj7qf-0"})([""]),Kye=Ve.input.attrs(({type:r="checkbox"})=>({type:r})).withConfig({displayName:"Input",componentId:"sc-rqj7qf-1"})(["--scale:",";appearance:none;width:100%;height:100%;margin:0;grid-area:input;transform:scale(var(--scale));cursor:",";&:focus{outline:none;}&[data-focus-visible-added]:focus + svg{","}&:focus-visible + svg{","}&:not(:checked) ~ svg path[name='checked']{display:none;}&:not(:checked) ~ svg path[name='not-checked']{display:inline;}&:checked ~ svg path[name='not-checked']{display:none;}&:checked ~ svg path[name='checked']{display:inline;}"],({theme:r,$iconSize:e})=>parseFloat(r.clickbound.height)/e,({disabled:r})=>r?"not-allowed":"pointer",({theme:r})=>Sc(r.states.focus.outline),({theme:r})=>Sc(r.states.focus.outline)),yI=Ve.svg.attrs(({height:r,width:e,fill:t})=>({name:null,xmlns:"http://www.w3.org/2000/svg",height:r,width:e,fill:t})).withConfig({displayName:"Input__Svg",componentId:"sc-rqj7qf-2"})(["grid-area:input;pointer-events:none;"]),Gye=Ve.span.withConfig({displayName:"Input__InputWrapper",componentId:"sc-rqj7qf-3"})(["display:inline-grid;grid:[input] 1fr / [input] 1fr;position:relative;isolation:isolate;"," &::before{content:'';position:absolute;width:",";aspect-ratio:1/1;top:50%;left:50%;transform:translate(-50%,-50%);border-radius:100%;}@media (hover:hover) and (pointer:fine){> svg{z-index:1;}&:hover{&::before{background-color:",";}}}"],({theme:r})=>Gl(r.spacings),({theme:r})=>r.width,({disabled:r})=>r?"transparent":Fp.states.hover.background),_I=x.forwardRef(function({disabled:e=!1,indeterminate:t,style:n,className:i,...o},a){const{density:c}=Tc(),d=Gu({density:c},Fp),u=24,h=e?Fp.states.disabled.background:Fp.background,p={disabled:e,style:n,className:i},m={ref:a,disabled:e,"data-indeterminate":t,...o};return E.jsx(l1,{theme:d,children:E.jsxs(Gye,{...p,children:[E.jsx(Kye,{$iconSize:u,...m}),t?E.jsx(yI,{width:u,height:u,viewBox:`0 0 ${u} ${u}`,fill:h,"aria-hidden":!0,children:E.jsx(vb,{$icon:Ete,name:"indeterminate"})}):E.jsxs(yI,{width:u,height:u,viewBox:`0 0 ${u} ${u}`,fill:h,"aria-hidden":!0,children:[E.jsx(vb,{$icon:Cte,name:"checked"}),E.jsx(vb,{$icon:kte,name:"not-checked"})]})]})})}),Wye=Ve.label.withConfig({displayName:"Checkbox__StyledLabel",componentId:"sc-yg6l8h-0"})(["display:inline-flex;align-items:center;cursor:",";"],({$disabled:r})=>r?"not-allowed":"pointer"),Yye=Ve.span.withConfig({displayName:"Checkbox__LabelText",componentId:"sc-yg6l8h-1"})(["",";"],Fa(Fp.typography)),Xv=x.forwardRef(function({label:e,disabled:t=!1,indeterminate:n,className:i,style:o,...a},c){return e?E.jsxs(Wye,{$disabled:t,className:i,style:o,children:[E.jsx(_I,{...a,disabled:t,ref:c,indeterminate:n}),E.jsx(Yye,{children:e})]}):E.jsx(_I,{...a,className:i,style:o,disabled:t,ref:c,indeterminate:n})});Xv.displayName="Checkbox";Ve.div`
2000
2000
  display: flex;
2001
2001
  align-items: center;
2002
2002
  justify-content: space-between;
2003
- `;const Wye=({searchText:r,setGroupBy:e,setSearchText:t,groupingModes:n,groupBy:i})=>E.jsx(Lye,{placeholder:"Search in my bookmarks",value:r??"",onChange:o=>{t(o.currentTarget.value.length?o.currentTarget.value:null)}}),Yye=(r,e)=>{x.useEffect(()=>{const t=n=>{r&&!r.contains(n.target)&&e(n)};return document.addEventListener("click",t),()=>{document.removeEventListener("click",t)}},[r,e])},Qye=({pRef:r,onClose:e,open:t,options:n})=>E.jsx(Yf,{open:t,anchorEl:r.current,children:n.map(({onClick:i,name:o,disabled:a,Icon:c})=>E.jsx(Yf.Item,{disabled:a,onClick:d=>{d.stopPropagation(),d.preventDefault(),i(),e()},children:E.jsxs(E.Fragment,{children:[c&&c,o]})},o))}),Xye=Ve(gn.Content)`
2003
+ `;const Qye=({searchText:r,setGroupBy:e,setSearchText:t,groupingModes:n,groupBy:i})=>E.jsx(Nye,{placeholder:"Search in my bookmarks",value:r??"",onChange:o=>{t(o.currentTarget.value.length?o.currentTarget.value:null)}}),Xye=(r,e)=>{x.useEffect(()=>{const t=n=>{r&&!r.contains(n.target)&&e(n)};return document.addEventListener("click",t),()=>{document.removeEventListener("click",t)}},[r,e])},Jye=({pRef:r,onClose:e,open:t,options:n})=>E.jsx(Yf,{open:t,anchorEl:r.current,children:n.map(({onClick:i,name:o,disabled:a,Icon:c})=>E.jsx(Yf.Item,{disabled:a,onClick:d=>{d.stopPropagation(),d.preventDefault(),i(),e()},children:E.jsxs(E.Fragment,{children:[c&&c,o]})},o))}),e3e=Ve(gn.Content)`
2004
2004
  display: flex;
2005
2005
  flex-direction: column;
2006
2006
  gap: 1rem;
2007
- `,Jye=({isOpen:r,onClose:e})=>{const{provider:t,currentApp:n}=Wl(),[i,o]=x.useState({name:"",description:"",isShared:!1});x.useEffect(()=>{o(c=>({...c,appKey:(n==null?void 0:n.appKey)||""}))},[n]);const a=x.useCallback(async c=>{if(!t){console.error("Provider not available");return}const d=at(t.createBookmark(c)).subscribe({next:u=>{console.debug("Bookmark created",u)},error:u=>{console.error("Failed to create bookmark",u)},complete(){e(!1)}});return()=>d.unsubscribe()},[e,t]);return E.jsxs(gn,{style:{width:"400px"},open:r,children:[E.jsx(gn.Header,{children:"Create bookmark"}),E.jsxs(Xye,{children:[E.jsxs("div",{children:[E.jsx(Im,{htmlFor:"name",label:"Name"}),E.jsx(Fu,{id:"name",autoComplete:"off",value:i==null?void 0:i.name,onChange:c=>{o(d=>({...d,name:c.target.value}))}})]}),E.jsx("div",{children:E.jsx(kZ,{id:"storybook-multiline-three",label:"Description",multiline:!0,rows:3,rowsMax:10,onChange:c=>{o(d=>({...d,description:c.target.value}))}})}),E.jsxs("div",{children:[E.jsx(Im,{htmlFor:"app",label:"App"}),E.jsx(Fu,{readOnly:!0,value:(n==null?void 0:n.name)||(n==null?void 0:n.appKey)||""})]}),E.jsx("div",{children:E.jsx(Xv,{label:"Is Shared",checked:i.isShared,onChange:c=>{o(d=>({...d,isShared:c.target.checked}))}})})]}),E.jsx(gn.Actions,{children:E.jsxs("div",{style:{display:"flex",gap:"0.2em"},children:[E.jsx(da,{onClick:()=>e(!1),variant:"ghost",children:"Cancel"}),E.jsx(da,{disabled:!n||!i.name,onClick:()=>{a(i)},children:"Create"})]})})]})},Cg={Dialog:Ve(gn)`
2007
+ `,t3e=({isOpen:r,onClose:e})=>{const{provider:t,currentApp:n}=Wl(),[i,o]=x.useState({name:"",description:"",isShared:!1});x.useEffect(()=>{o(c=>({...c,appKey:(n==null?void 0:n.appKey)||""}))},[n]);const a=x.useCallback(async c=>{if(!t){console.error("Provider not available");return}const d=at(t.createBookmark(c)).subscribe({next:u=>{console.debug("Bookmark created",u)},error:u=>{console.error("Failed to create bookmark",u)},complete(){e(!1)}});return()=>d.unsubscribe()},[e,t]);return E.jsxs(gn,{style:{width:"400px"},open:r,children:[E.jsx(gn.Header,{children:"Create bookmark"}),E.jsxs(e3e,{children:[E.jsxs("div",{children:[E.jsx(Im,{htmlFor:"name",label:"Name"}),E.jsx(Fu,{id:"name",autoComplete:"off",value:i==null?void 0:i.name,onChange:c=>{o(d=>({...d,name:c.target.value}))}})]}),E.jsx("div",{children:E.jsx(kZ,{id:"storybook-multiline-three",label:"Description",multiline:!0,rows:3,rowsMax:10,onChange:c=>{o(d=>({...d,description:c.target.value}))}})}),E.jsxs("div",{children:[E.jsx(Im,{htmlFor:"app",label:"App"}),E.jsx(Fu,{readOnly:!0,value:(n==null?void 0:n.name)||(n==null?void 0:n.appKey)||""})]}),E.jsx("div",{children:E.jsx(Xv,{label:"Is Shared",checked:i.isShared,onChange:c=>{o(d=>({...d,isShared:c.target.checked}))}})})]}),E.jsx(gn.Actions,{children:E.jsxs("div",{style:{display:"flex",gap:"0.2em"},children:[E.jsx(da,{onClick:()=>e(!1),variant:"ghost",children:"Cancel"}),E.jsx(da,{disabled:!n||!i.name,onClick:()=>{a(i)},children:"Create"})]})})]})},Cg={Dialog:Ve(gn)`
2008
2008
  width: 500px;
2009
2009
  `,DialogContent:Ve(gn.Content)`
2010
2010
  display: flex;
@@ -2016,10 +2016,10 @@ cursor: pointer;`),t},Gl=({left:r,right:e,top:t,bottom:n})=>Nt({paddingLeft:r,pa
2016
2016
  `,Actions:Ve.div`
2017
2017
  display: flex;
2018
2018
  gap: 0.2em;
2019
- `},e3e=({isOpen:r,onClose:e,bookmarkId:t})=>{const{provider:n,addBookmarkToClipboard:i,currentApp:o}=Wl(),[a,c]=x.useState({name:"",description:"",isShared:!1}),[d,u]=x.useState(!1),h=x.useMemo(()=>at(n?n.getBookmark(t):Tr),[n,t]),{value:p}=ks(h);x.useEffect(()=>{if(p){const{name:b,description:C,isShared:T}=p;c({name:b,description:C,isShared:T})}},[p]);const m=Jw("app"),{value:v}=ks(x.useMemo(()=>p&&m?m.getAppManifest(p.appKey):Pt(void 0),[m,p])),_=x.useCallback(async b=>{if(!n){console.error("Provider not available");return}at(n.updateBookmark(t,b,{excludePayloadGeneration:!d})).subscribe({next:C=>{console.debug("Bookmark updated",C)},error:C=>{console.error("Failed to update bookmark",C)},complete:()=>{e(!1)}}),e(!1)},[e,n,t,d]);return E.jsxs(Cg.Dialog,{open:r,children:[E.jsx(gn.Header,{children:"Edit bookmark"}),E.jsxs(Cg.DialogContent,{children:[E.jsxs("div",{children:[E.jsx(Im,{htmlFor:"name",label:"Name"}),E.jsx(Fu,{id:"name",autoComplete:"off",value:a==null?void 0:a.name,onChange:b=>{c(C=>({...C,name:b.target.value}))}})]}),E.jsx("div",{children:E.jsx(kZ,{id:"storybook-multiline-three",label:"Description",value:a==null?void 0:a.description,multiline:!0,rows:3,rowsMax:10,onChange:b=>{c(C=>({...C,description:b.target.value}))}})}),E.jsxs("div",{children:[E.jsx(Im,{htmlFor:"app",label:"App"}),E.jsx(Fu,{readOnly:!0,value:(v==null?void 0:v.displayName)||""})]}),E.jsxs(Cg.CheckboxWrapper,{children:[E.jsx(Xv,{label:"Is Shared",checked:a.isShared,onChange:b=>{const C=b.target.checked;C&&i(t),c(T=>({...T,isShared:C}))}}),(p==null?void 0:p.appKey)===(o==null?void 0:o.name)&&(n==null?void 0:n.canCreateBookmarks)&&E.jsx(Xv,{label:"Update bookmark with current view",checked:d,onChange:()=>{u(b=>!b)}})]})]}),E.jsx(gn.Actions,{children:E.jsxs(Cg.Actions,{children:[E.jsx(da,{onClick:()=>e(!1),variant:"ghost",children:"Cancel"}),E.jsx(da,{onClick:()=>{_(a)},children:"Save"})]})})]})},t3e={Actions:Ve.div`
2019
+ `},r3e=({isOpen:r,onClose:e,bookmarkId:t})=>{const{provider:n,addBookmarkToClipboard:i,currentApp:o}=Wl(),[a,c]=x.useState({name:"",description:"",isShared:!1}),[d,u]=x.useState(!1),h=x.useMemo(()=>at(n?n.getBookmark(t):Tr),[n,t]),{value:p}=ks(h);x.useEffect(()=>{if(p){const{name:b,description:C,isShared:T}=p;c({name:b,description:C,isShared:T})}},[p]);const m=Jw("app"),{value:v}=ks(x.useMemo(()=>p&&m?m.getAppManifest(p.appKey):Pt(void 0),[m,p])),_=x.useCallback(async b=>{if(!n){console.error("Provider not available");return}at(n.updateBookmark(t,b,{excludePayloadGeneration:!d})).subscribe({next:C=>{console.debug("Bookmark updated",C)},error:C=>{console.error("Failed to update bookmark",C)},complete:()=>{e(!1)}}),e(!1)},[e,n,t,d]);return E.jsxs(Cg.Dialog,{open:r,children:[E.jsx(gn.Header,{children:"Edit bookmark"}),E.jsxs(Cg.DialogContent,{children:[E.jsxs("div",{children:[E.jsx(Im,{htmlFor:"name",label:"Name"}),E.jsx(Fu,{id:"name",autoComplete:"off",value:a==null?void 0:a.name,onChange:b=>{c(C=>({...C,name:b.target.value}))}})]}),E.jsx("div",{children:E.jsx(kZ,{id:"storybook-multiline-three",label:"Description",value:a==null?void 0:a.description,multiline:!0,rows:3,rowsMax:10,onChange:b=>{c(C=>({...C,description:b.target.value}))}})}),E.jsxs("div",{children:[E.jsx(Im,{htmlFor:"app",label:"App"}),E.jsx(Fu,{readOnly:!0,value:(v==null?void 0:v.displayName)||""})]}),E.jsxs(Cg.CheckboxWrapper,{children:[E.jsx(Xv,{label:"Is Shared",checked:a.isShared,onChange:b=>{const C=b.target.checked;C&&i(t),c(T=>({...T,isShared:C}))}}),(p==null?void 0:p.appKey)===(o==null?void 0:o.name)&&(n==null?void 0:n.canCreateBookmarks)&&E.jsx(Xv,{label:"Update bookmark with current view",checked:d,onChange:()=>{u(b=>!b)}})]})]}),E.jsx(gn.Actions,{children:E.jsxs(Cg.Actions,{children:[E.jsx(da,{onClick:()=>e(!1),variant:"ghost",children:"Cancel"}),E.jsx(da,{onClick:()=>{_(a)},children:"Save"})]})})]})},n3e={Actions:Ve.div`
2020
2020
  display: flex;
2021
2021
  gap: 1rem;
2022
- `},r3e=()=>{const[r,e]=x.useState(!1),{provider:t,currentUser:n}=Wl(),i=x.useMemo(()=>t?t.currentBookmark$.pipe(Oe(c=>!!c),Qt(c=>c&&c.createdBy.id!==(n==null?void 0:n.id)?at(t.isBookmarkInFavorites(c.id)).pipe(me(u=>u?null:c)):Pt(null))):Pt(null),[t,n==null?void 0:n.id]),{value:o}=ks(i);x.useEffect(()=>{o&&e(!0)},[o]);const a=x.useCallback(c=>{if(!t){console.error("Provider not available");return}at(t.addBookmarkToFavorites(c.currentTarget.value)).subscribe({complete:()=>{e(!1)}})},[t]);return o?E.jsxs(gn,{style:{width:"600px"},open:r,children:[E.jsx(gn.Header,{children:"Import bookmark"}),E.jsxs(gn.Content,{children:[E.jsxs("p",{children:["This bookmark was created by ",o.createdBy.name]}),E.jsx("p",{children:"Would you like to import it?"})]}),E.jsx(gn.Actions,{children:E.jsxs(t3e.Actions,{children:[E.jsx(da,{onClick:()=>e(!1),variant:"ghost",style:{width:"70px"},children:"No"}),E.jsx(da,{value:o.id,onClick:a,variant:"ghost",children:"Import"})]})})]}):null},aw=x.createContext(null),Wl=()=>x.useContext(aw),n3e=r=>{const{provider:e,currentApp:t,currentUser:n,children:i}=r,[o,a]=x.useState(!1),[c,d]=x.useState(),u=x.useCallback(()=>{a(!0)},[]),[h,p]=x.useState(""),m=x.useCallback(v=>{const _=new URL(window.location.toString());_.searchParams.set("bookmarkId",v),navigator.clipboard.writeText(String(_)),p("Bookmark url copied to clipboard")},[]);return e?E.jsxs(aw.Provider,{value:{provider:e,currentApp:t,currentUser:n,showCreateBookmark:u,showEditBookmark:d,addBookmarkToClipboard:m},children:[E.jsx(Jye,{isOpen:o,onClose:a}),c&&E.jsx(e3e,{isOpen:!!c,onClose:()=>d(void 0),bookmarkId:c}),E.jsx(r3e,{}),E.jsx(pZ,{autoHideDuration:2e3,onClose:()=>p(""),open:!!h,children:h}),i]}):E.jsx(aw.Provider,{value:{provider:void 0,currentApp:t,currentUser:n,showCreateBookmark:u,showEditBookmark:d,addBookmarkToClipboard:m},children:i})},bI={Icons:Ve.div`
2022
+ `},i3e=()=>{const[r,e]=x.useState(!1),{provider:t,currentUser:n}=Wl(),i=x.useMemo(()=>t?t.currentBookmark$.pipe(Oe(c=>!!c),Qt(c=>c&&c.createdBy.id!==(n==null?void 0:n.id)?at(t.isBookmarkInFavorites(c.id)).pipe(me(u=>u?null:c)):Pt(null))):Pt(null),[t,n==null?void 0:n.id]),{value:o}=ks(i);x.useEffect(()=>{o&&e(!0)},[o]);const a=x.useCallback(c=>{if(!t){console.error("Provider not available");return}at(t.addBookmarkToFavorites(c.currentTarget.value)).subscribe({complete:()=>{e(!1)}})},[t]);return o?E.jsxs(gn,{style:{width:"600px"},open:r,children:[E.jsx(gn.Header,{children:"Import bookmark"}),E.jsxs(gn.Content,{children:[E.jsxs("p",{children:["This bookmark was created by ",o.createdBy.name]}),E.jsx("p",{children:"Would you like to import it?"})]}),E.jsx(gn.Actions,{children:E.jsxs(n3e.Actions,{children:[E.jsx(da,{onClick:()=>e(!1),variant:"ghost",style:{width:"70px"},children:"No"}),E.jsx(da,{value:o.id,onClick:a,variant:"ghost",children:"Import"})]})})]}):null},aw=x.createContext(null),Wl=()=>x.useContext(aw),o3e=r=>{const{provider:e,currentApp:t,currentUser:n,children:i}=r,[o,a]=x.useState(!1),[c,d]=x.useState(),u=x.useCallback(()=>{a(!0)},[]),[h,p]=x.useState(""),m=x.useCallback(v=>{const _=new URL(window.location.toString());_.searchParams.set("bookmarkId",v),navigator.clipboard.writeText(String(_)),p("Bookmark url copied to clipboard")},[]);return e?E.jsxs(aw.Provider,{value:{provider:e,currentApp:t,currentUser:n,showCreateBookmark:u,showEditBookmark:d,addBookmarkToClipboard:m},children:[E.jsx(t3e,{isOpen:o,onClose:a}),c&&E.jsx(r3e,{isOpen:!!c,onClose:()=>d(void 0),bookmarkId:c}),E.jsx(i3e,{}),E.jsx(pZ,{autoHideDuration:2e3,onClose:()=>p(""),open:!!h,children:h}),i]}):E.jsx(aw.Provider,{value:{provider:void 0,currentApp:t,currentUser:n,showCreateBookmark:u,showEditBookmark:d,addBookmarkToClipboard:m},children:i})},bI={Icons:Ve.div`
2023
2023
  display: flex;
2024
2024
  flex-direction: row;
2025
2025
  gap: 0.2em;
@@ -2037,7 +2037,7 @@ cursor: pointer;`),t},Gl=({left:r,right:e,top:t,bottom:n})=>Nt({paddingLeft:r,pa
2037
2037
  max-height: 32px;
2038
2038
  justify-content: space-between;
2039
2039
  border-bottom: 1px solid ${tt.colors.ui.background__medium.hex};
2040
- `},i3e=({name:r,menuOptions:e,children:t,id:n,menuOpen:i,onMenuOpen:o})=>{const a=x.useRef(null),{provider:c}=Wl(),d=x.useCallback(u=>{u.preventDefault(),u.stopPropagation(),c&&at(c.setCurrentBookmark(n)).subscribe()},[c,n]);return Yye(a.current,()=>o("")),E.jsxs(bI.ListItem,{onClick:d,children:[E.jsx(Am,{children:r}),E.jsxs(bI.Icons,{children:[t,!!(e!=null&&e.length)&&E.jsx(Pi,{name:"more_vertical",onClick:u=>{u.preventDefault(),u.stopPropagation(),o(n)},color:tt.colors.interactive.primary__resting.hex,ref:a}),E.jsx(Qye,{open:i,options:e,onClose:()=>{o("")},pRef:a})]})]})},wI={Button:Ve(da)`
2040
+ `},a3e=({name:r,menuOptions:e,children:t,id:n,menuOpen:i,onMenuOpen:o})=>{const a=x.useRef(null),{provider:c}=Wl(),d=x.useCallback(u=>{u.preventDefault(),u.stopPropagation(),c&&at(c.setCurrentBookmark(n)).subscribe()},[c,n]);return Xye(a.current,()=>o("")),E.jsxs(bI.ListItem,{onClick:d,children:[E.jsx(Am,{children:r}),E.jsxs(bI.Icons,{children:[t,!!(e!=null&&e.length)&&E.jsx(Pi,{name:"more_vertical",onClick:u=>{u.preventDefault(),u.stopPropagation(),o(n)},color:tt.colors.interactive.primary__resting.hex,ref:a}),E.jsx(Jye,{open:i,options:e,onClose:()=>{o("")},pRef:a})]})]})},wI={Button:Ve(da)`
2041
2041
  width: 100%;
2042
2042
  padding: 0;
2043
2043
  padding-top: 0.5rem;
@@ -2059,7 +2059,7 @@ cursor: pointer;`),t},Gl=({left:r,right:e,top:t,bottom:n})=>Nt({paddingLeft:r,pa
2059
2059
  flex-direction: column;
2060
2060
  gap: 1rem;
2061
2061
  border-left: 1px solid ${tt.colors.infographic.primary__moss_green_100.hex};
2062
- `};Pi.add({chevron_down:Z8,chevron_right:L8});const o3e=({children:r,name:e})=>{const[t,n]=x.useState(!0);return E.jsxs("div",{children:[E.jsxs(wI.Button,{variant:"ghost",onClick:()=>n(i=>!i),children:[E.jsx(Pi,{name:t?Z8.name:L8.name}),E.jsx(Am,{variant:"h6",children:e})]}),t&&E.jsx(wI.List,{children:r})]})},xI={Row:Ve.div`
2062
+ `};Pi.add({chevron_down:Z8,chevron_right:L8});const s3e=({children:r,name:e})=>{const[t,n]=x.useState(!0);return E.jsxs("div",{children:[E.jsxs(wI.Button,{variant:"ghost",onClick:()=>n(i=>!i),children:[E.jsx(Pi,{name:t?Z8.name:L8.name}),E.jsx(Am,{variant:"h6",children:e})]}),t&&E.jsx(wI.List,{children:r})]})},xI={Row:Ve.div`
2063
2063
  display: flex;
2064
2064
  align-items: center;
2065
2065
  gap: 0.2em;
@@ -2069,7 +2069,7 @@ cursor: pointer;`),t},Gl=({left:r,right:e,top:t,bottom:n})=>Nt({paddingLeft:r,pa
2069
2069
  line-height: 16px;
2070
2070
  letter-spacing: 0em;
2071
2071
  text-align: right;
2072
- `},a3e=({createdBy:r,createdById:e})=>{var i;const t=(i=jl().modules.auth.defaultAccount)==null?void 0:i.localAccountId,n=e===t;return E.jsxs(xI.Row,{children:[!n&&E.jsxs(xI.CreatedBy,{children:["shared by ",r]}),E.jsx(Pi,{name:"share",color:n?tt.colors.interactive.primary__resting.hex:tt.colors.interactive.disabled__border.hex})]})},s3e=r=>r.values.length,c3e=(r,e)=>r.name.localeCompare(e.name),l3e=r=>r.split("-").map(e=>`${e[0].toUpperCase()}${e.slice(1)}`).join(" ");Pi.add({delete_to_trash:wte,edit:_te,share:Y$,close:O8,update:bte});const d3e=({bookmarkGroups:r})=>{const{provider:e,currentApp:t,showEditBookmark:n,addBookmarkToClipboard:i}=Wl(),o=$O(),[a,c]=x.useState(""),d=x.useCallback(u=>{if(!e)return[];const h=t==null?void 0:t.appKey,p=u.id;return u.createdBy.id===(o==null?void 0:o.localAccountId)?[{name:"Edit",disabled:h!==u.appKey,onClick:()=>{n(p)},Icon:E.jsx(Pi,{name:"edit"})},{name:"Update with current view",disabled:h!==u.appKey,onClick:()=>{at(e.updateBookmark(u.id,void 0,{excludePayloadGeneration:!1})).subscribe({error(v){console.error("Failed to update bookmark with current view",v)},complete(){console.debug("Bookmark updated with current view")}})},Icon:E.jsx(Pi,{name:"update"})},{name:"Remove",disabled:!1,onClick:()=>{at(e.deleteBookmark(u.id)).subscribe({error(v){console.error("Failed to remove bookmark",v)},complete(){console.debug("Bookmark removed")}})},Icon:E.jsx(Pi,{name:"delete_to_trash"})},{name:u.isShared?"Unshare":"Share",disabled:!1,onClick:async()=>{at(e.updateBookmark(u.id,{isShared:!u.isShared})).subscribe({next(v){v.isShared&&i(v.id)},error(v){console.error("Failed to update bookmark",v)},complete(){console.debug("Bookmark updated")}})},Icon:E.jsx(Pi,{name:"share"})}]:[{name:"Unfavourite",disabled:!1,onClick:()=>{at(e.removeBookmarkAsFavorite(u.id)).subscribe({error(v){console.error("Failed to remove bookmark from favorites",v)},complete(){console.debug("Bookmark removed from favorites")}})},Icon:E.jsx(Pi,{name:"close"})}]},[e,n,i,o,t==null?void 0:t.appKey]);return E.jsx(E.Fragment,{children:r.filter(s3e).map(({groupingProperty:u,values:h})=>E.jsx(o3e,{name:l3e(u),children:h.sort(c3e).map(p=>E.jsx(i3e,{menuOptions:d(p),name:p.name,id:p.id,menuOpen:a===p.id,onMenuOpen:m=>{c(m)},children:p.isShared&&E.jsx(a3e,{createdById:p.createdBy.id,createdBy:p.createdBy.name})},p.id))},u))})},u3e=r=>{switch(r){case"Error":return{color:tt.colors.interactive.danger__resting.hex,icon:Vg};case"Info":return{color:tt.colors.interactive.primary__resting.hex,icon:Vg};case"Warning":return{color:tt.colors.interactive.warning__resting.hex,icon:Vg};case"NoContent":return{color:tt.colors.interactive.primary__resting.hex,icon:Ite};default:return}},CI={Wrapper:Ve.div`
2072
+ `},c3e=({createdBy:r,createdById:e})=>{var i;const t=(i=jl().modules.auth.defaultAccount)==null?void 0:i.localAccountId,n=e===t;return E.jsxs(xI.Row,{children:[!n&&E.jsxs(xI.CreatedBy,{children:["shared by ",r]}),E.jsx(Pi,{name:"share",color:n?tt.colors.interactive.primary__resting.hex:tt.colors.interactive.disabled__border.hex})]})},l3e=r=>r.values.length,d3e=(r,e)=>r.name.localeCompare(e.name),u3e=r=>r.split("-").map(e=>`${e[0].toUpperCase()}${e.slice(1)}`).join(" ");Pi.add({delete_to_trash:wte,edit:_te,share:Y$,close:O8,update:bte});const h3e=({bookmarkGroups:r})=>{const{provider:e,currentApp:t,showEditBookmark:n,addBookmarkToClipboard:i}=Wl(),o=$O(),[a,c]=x.useState(""),d=x.useCallback(u=>{if(!e)return[];const h=t==null?void 0:t.appKey,p=u.id;return u.createdBy.id===(o==null?void 0:o.localAccountId)?[{name:"Edit",disabled:h!==u.appKey,onClick:()=>{n(p)},Icon:E.jsx(Pi,{name:"edit"})},{name:"Update with current view",disabled:h!==u.appKey,onClick:()=>{at(e.updateBookmark(u.id,void 0,{excludePayloadGeneration:!1})).subscribe({error(v){console.error("Failed to update bookmark with current view",v)},complete(){console.debug("Bookmark updated with current view")}})},Icon:E.jsx(Pi,{name:"update"})},{name:"Remove",disabled:!1,onClick:()=>{at(e.deleteBookmark(u.id)).subscribe({error(v){console.error("Failed to remove bookmark",v)},complete(){console.debug("Bookmark removed")}})},Icon:E.jsx(Pi,{name:"delete_to_trash"})},{name:u.isShared?"Unshare":"Share",disabled:!1,onClick:async()=>{at(e.updateBookmark(u.id,{isShared:!u.isShared})).subscribe({next(v){v.isShared&&i(v.id)},error(v){console.error("Failed to update bookmark",v)},complete(){console.debug("Bookmark updated")}})},Icon:E.jsx(Pi,{name:"share"})}]:[{name:"Unfavourite",disabled:!1,onClick:()=>{at(e.removeBookmarkAsFavorite(u.id)).subscribe({error(v){console.error("Failed to remove bookmark from favorites",v)},complete(){console.debug("Bookmark removed from favorites")}})},Icon:E.jsx(Pi,{name:"close"})}]},[e,n,i,o,t==null?void 0:t.appKey]);return E.jsx(E.Fragment,{children:r.filter(l3e).map(({groupingProperty:u,values:h})=>E.jsx(s3e,{name:u3e(u),children:h.sort(d3e).map(p=>E.jsx(a3e,{menuOptions:d(p),name:p.name,id:p.id,menuOpen:a===p.id,onMenuOpen:m=>{c(m)},children:p.isShared&&E.jsx(c3e,{createdById:p.createdBy.id,createdBy:p.createdBy.name})},p.id))},u))})},f3e=r=>{switch(r){case"Error":return{color:tt.colors.interactive.danger__resting.hex,icon:Vg};case"Info":return{color:tt.colors.interactive.primary__resting.hex,icon:Vg};case"Warning":return{color:tt.colors.interactive.warning__resting.hex,icon:Vg};case"NoContent":return{color:tt.colors.interactive.primary__resting.hex,icon:Ite};default:return}},CI={Wrapper:Ve.div`
2073
2073
  width: 100%;
2074
2074
  height: 100%;
2075
2075
  display: flex;
@@ -2083,7 +2083,7 @@ cursor: pointer;`),t},Gl=({left:r,right:e,top:t,bottom:n})=>Nt({paddingLeft:r,pa
2083
2083
  align-items: center;
2084
2084
  gap: 0.5rem;
2085
2085
  justify-content: center;
2086
- `},h3e=({title:r,type:e="Info",color:t,children:n})=>{const i=u3e(e);return E.jsxs(CI.Wrapper,{children:[E.jsx(Pi,{"data-testid":"icon",size:40,color:(i==null?void 0:i.color)||t||tt.colors.text.static_icons__tertiary.hex,data:(i==null?void 0:i.icon)||Vg}),E.jsxs(CI.Content,{children:[E.jsx(Am,{color:tt.colors.text.static_icons__default.hex,variant:"h3","aria-label":`Title for ${e} message`,children:r}),E.jsx(Am,{children:n&&n})]})]})},f3e=()=>E.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",width:"100%"},children:E.jsx($5e,{})});Pi.add({chevron_down:Z8,chevron_right:L8,share:Y$,more_vertical:mte,add:W$});const kI={Wrapper:Ve.div`
2086
+ `},p3e=({title:r,type:e="Info",color:t,children:n})=>{const i=f3e(e);return E.jsxs(CI.Wrapper,{children:[E.jsx(Pi,{"data-testid":"icon",size:40,color:(i==null?void 0:i.color)||t||tt.colors.text.static_icons__tertiary.hex,data:(i==null?void 0:i.icon)||Vg}),E.jsxs(CI.Content,{children:[E.jsx(Am,{color:tt.colors.text.static_icons__default.hex,variant:"h3","aria-label":`Title for ${e} message`,children:r}),E.jsx(Am,{children:n&&n})]})]})},m3e=()=>E.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",width:"100%"},children:E.jsx(Z5e,{})});Pi.add({chevron_down:Z8,chevron_right:L8,share:Y$,more_vertical:mte,add:W$});const kI={Wrapper:Ve.div`
2087
2087
  padding-right: 1rem;
2088
2088
  display: flex;
2089
2089
  flex-direction: column;
@@ -2098,11 +2098,11 @@ cursor: pointer;`),t},Gl=({left:r,right:e,top:t,bottom:n})=>Nt({paddingLeft:r,pa
2098
2098
  bottom: 200px;
2099
2099
  left: 0px;
2100
2100
  right: 0px;
2101
- `},p3e=()=>{const{provider:r}=Wl(),{value:e}=ks(x.useMemo(()=>(r==null?void 0:r.bookmarks$)||Tr,[r])),{value:t}=ks(x.useMemo(()=>((r==null?void 0:r.status$)||Tr).pipe(me(h=>!!h.has("fetch_bookmarks"))),[r]),{initial:!0}),{bookmarkGroups:n,groupingModes:i,searchText:o,setGroupBy:a,setSearchText:c,groupByKey:d}=N0e(e),u=x.useMemo(()=>t?E.jsx(f3e,{}):n.length===0?E.jsx(h3e,{title:"No Bookmarks",type:"NoContent",children:"You have not created any bookmarks yet."}):E.jsx(d3e,{bookmarkGroups:n}),[t,n]);return E.jsxs(kI.Wrapper,{children:[E.jsx(Wye,{groupBy:d,groupingModes:Object.keys(i),searchText:o??"",setGroupBy:a,setSearchText:c}),E.jsx(kI.List,{children:u})]})};/**
2101
+ `},g3e=()=>{const{provider:r}=Wl(),{value:e}=ks(x.useMemo(()=>(r==null?void 0:r.bookmarks$)||Tr,[r])),{value:t}=ks(x.useMemo(()=>((r==null?void 0:r.status$)||Tr).pipe(me(h=>!!h.has("fetch_bookmarks"))),[r]),{initial:!0}),{bookmarkGroups:n,groupingModes:i,searchText:o,setGroupBy:a,setSearchText:c,groupByKey:d}=V0e(e),u=x.useMemo(()=>t?E.jsx(m3e,{}):n.length===0?E.jsx(p3e,{title:"No Bookmarks",type:"NoContent",children:"You have not created any bookmarks yet."}):E.jsx(h3e,{bookmarkGroups:n}),[t,n]);return E.jsxs(kI.Wrapper,{children:[E.jsx(Qye,{groupBy:d,groupingModes:Object.keys(i),searchText:o??"",setGroupBy:a,setSearchText:c}),E.jsx(kI.List,{children:u})]})};/**
2102
2102
  * @license
2103
2103
  * Copyright 2021 Google LLC
2104
2104
  * SPDX-License-Identifier: BSD-3-Clause
2105
- */function m3e(r,e,t){return r?e(r):t==null?void 0:t(r)}/**
2105
+ */function v3e(r,e,t){return r?e(r):t==null?void 0:t(r)}/**
2106
2106
  * @license
2107
2107
  * Copyright 2021 Google LLC
2108
2108
  * SPDX-License-Identifier: BSD-3-Clause
@@ -2154,7 +2154,7 @@ cursor: pointer;`),t},Gl=({left:r,right:e,top:t,bottom:n})=>Nt({paddingLeft:r,pa
2154
2154
  --fwc-avatar-color: #000;
2155
2155
  --fwc-avatar-ink-color: #fff;
2156
2156
  }
2157
- `,g3e=oo`
2157
+ `,y3e=oo`
2158
2158
  :host .person-card__content {
2159
2159
  font-size: 1rem;
2160
2160
  --fwc-avatar-size: 2.5em;
@@ -2166,7 +2166,7 @@ cursor: pointer;`),t},Gl=({left:r,right:e,top:t,bottom:n})=>Nt({paddingLeft:r,pa
2166
2166
  :host([size='large']) .person-card__content {
2167
2167
  font-size: 1.25rem;
2168
2168
  }
2169
- `,v3e=oo`
2169
+ `,_3e=oo`
2170
2170
  :host {
2171
2171
  display: inline-flex;
2172
2172
  --x-small-size-space: calc(
@@ -2300,7 +2300,7 @@ cursor: pointer;`),t},Gl=({left:r,right:e,top:t,bottom:n})=>Nt({paddingLeft:r,pa
2300
2300
  border-color: ${Ne(U.colors.ui.background__medium.getVariable("color"))};
2301
2301
  border-radius: 4px;
2302
2302
  }
2303
- `,y3e=[v9,g3e,v3e],a5=(r,e)=>mc(void 0,void 0,void 0,function*(){yield new Promise(i=>{window.requestAnimationFrame(()=>i())});const n=yield new Promise((i,o)=>{if(r.dispatchEvent(e),e.defaultPrevented)return o(new Error("Resolve prevented"));if(e.detail.result)return i(Promise.resolve(e.detail.result));o(new Error("No resolver resolved the request"))});if(n)return n;throw new Error("Could not resolve request result")});class s5 extends CustomEvent{constructor(e,t,n={bubbles:!0,composed:!0}){super(e,Object.assign({detail:t},n))}}class $2 extends s5{constructor(e,t){super($2.eventName,e,t)}}$2.eventName="request-resolve-person-photo";class O2 extends s5{constructor(e,t){super(O2.eventName,e,t)}}O2.eventName="request-resolve-person-info";class Z2 extends s5{constructor(e,t){super(Z2.eventName,e,t)}}Z2.eventName="request-resolve-person-detail";class L2 extends s5{constructor(e,t){super(L2.eventName,e,t)}}L2.eventName="request-resolve-person-search";class EZ extends x2{constructor(e){super(e,([t,n,i],o)=>{const{signal:a}=o??{};if(t)return Promise.resolve(t);if(!(n||i))throw new Error("The host must have either a azureId or a upn property");const c=new $2({azureId:n,upn:i,signal:a});return a5(e,c)},()=>[e.pictureSrc,e.azureId,e.upn]),this.host=e}}class _3e extends x2{constructor(e){super(e,([t,n,i],o)=>{const{signal:a}=o??{};if(t)return Promise.resolve(t);if(!(n||i))throw new Error("The host must have either a azureId or a upn property");const c=new Z2({azureId:n,upn:i,signal:a});return a5(e,c)},()=>[e.dataSource,e.azureId,e.upn]),this.host=e}}let Pm=class extends Ao{render(){var e;const{name:t,department:n,azureUniqueId:i}=(e=this.dataSource)!==null&&e!==void 0?e:{},{azureId:o=i}=this;return ye`<div class="root">
2303
+ `,b3e=[v9,y3e,_3e],a5=(r,e)=>mc(void 0,void 0,void 0,function*(){yield new Promise(i=>{window.requestAnimationFrame(()=>i())});const n=yield new Promise((i,o)=>{if(r.dispatchEvent(e),e.defaultPrevented)return o(new Error("Resolve prevented"));if(e.detail.result)return i(Promise.resolve(e.detail.result));o(new Error("No resolver resolved the request"))});if(n)return n;throw new Error("Could not resolve request result")});class s5 extends CustomEvent{constructor(e,t,n={bubbles:!0,composed:!0}){super(e,Object.assign({detail:t},n))}}class $2 extends s5{constructor(e,t){super($2.eventName,e,t)}}$2.eventName="request-resolve-person-photo";class O2 extends s5{constructor(e,t){super(O2.eventName,e,t)}}O2.eventName="request-resolve-person-info";class Z2 extends s5{constructor(e,t){super(Z2.eventName,e,t)}}Z2.eventName="request-resolve-person-detail";class L2 extends s5{constructor(e,t){super(L2.eventName,e,t)}}L2.eventName="request-resolve-person-search";class EZ extends x2{constructor(e){super(e,([t,n,i],o)=>{const{signal:a}=o??{};if(t)return Promise.resolve(t);if(!(n||i))throw new Error("The host must have either a azureId or a upn property");const c=new $2({azureId:n,upn:i,signal:a});return a5(e,c)},()=>[e.pictureSrc,e.azureId,e.upn]),this.host=e}}class w3e extends x2{constructor(e){super(e,([t,n,i],o)=>{const{signal:a}=o??{};if(t)return Promise.resolve(t);if(!(n||i))throw new Error("The host must have either a azureId or a upn property");const c=new Z2({azureId:n,upn:i,signal:a});return a5(e,c)},()=>[e.dataSource,e.azureId,e.upn]),this.host=e}}let Pm=class extends Ao{render(){var e;const{name:t,department:n,azureUniqueId:i}=(e=this.dataSource)!==null&&e!==void 0?e:{},{azureId:o=i}=this;return ye`<div class="root">
2304
2304
  <fwc-person-avatar azureId=${o} trigger="none"></fwc-person-avatar>
2305
2305
  <section>
2306
2306
  ${t&&ye`<header title="${t}" class="name">${t}</header>`}
@@ -2326,24 +2326,24 @@ cursor: pointer;`),t},Gl=({left:r,right:e,top:t,bottom:n})=>Nt({paddingLeft:r,pa
2326
2326
  ${Ne(U.typography.paragraph.caption.getVariable("fontSize"))} * var(--content-resize, 1)
2327
2327
  );
2328
2328
  }
2329
- `];P([nt({type:String})],Pm.prototype,"azureId",void 0);P([nt({type:String})],Pm.prototype,"dataSource",void 0);Pm=P([Sr("fwc-person-card-manager")],Pm);const b3e=pne`<svg height="24" viewBox="0 0 24 24" width="24">
2329
+ `];P([nt({type:String})],Pm.prototype,"azureId",void 0);P([nt({type:String})],Pm.prototype,"dataSource",void 0);Pm=P([Sr("fwc-person-card-manager")],Pm);const x3e=pne`<svg height="24" viewBox="0 0 24 24" width="24">
2330
2330
  <path
2331
2331
  d="M22.5 3C22.7031 3 22.8789 3.07422 23.0273 3.22266C23.1758 3.37109 23.25 3.54688 23.25 3.75V20.25C23.25 20.4531 23.1758 20.6289 23.0273 20.7773C22.8789 20.9258 22.7031 21 22.5 21H14.25V23.3438L0.75 20.9883V3.08203L14.25 0.65625V3H22.5ZM7.07812 16.6992C7.52344 16.6992 7.92188 16.6289 8.27344 16.4883C8.625 16.3477 8.9375 16.1602 9.21094 15.9258C9.48438 15.6914 9.71484 15.4102 9.90234 15.082C10.0898 14.7539 10.25 14.4062 10.3828 14.0391C10.5156 13.6719 10.6055 13.293 10.6523 12.9023C10.6992 12.5117 10.7266 12.1289 10.7344 11.7539C10.7344 11.1602 10.6836 10.5859 10.582 10.0312C10.4805 9.47656 10.3008 8.98047 10.043 8.54297C9.78516 8.10547 9.42969 7.75781 8.97656 7.5C8.52344 7.24219 7.95312 7.10938 7.26562 7.10156C6.78906 7.10156 6.3125 7.12891 5.83594 7.18359C5.35938 7.23828 4.88281 7.28906 4.40625 7.33594V16.5117L5.74219 16.6289C6.1875 16.668 6.63281 16.6914 7.07812 16.6992ZM17.25 16.5H14.25V20.25H17.25V16.5ZM17.25 3.75H14.25V15.75H17.25V3.75ZM22.5 9H18V20.25H22.5V9ZM22.5 3.75H18V8.25H22.5V3.75ZM5.89453 8.92969C6.04297 8.91406 6.1875 8.90234 6.32812 8.89453C6.46875 8.88672 6.62109 8.88281 6.78516 8.88281C7.19141 8.88281 7.53125 8.96875 7.80469 9.14062C8.07812 9.3125 8.29688 9.53906 8.46094 9.82031C8.625 10.1016 8.74219 10.4141 8.8125 10.7578C8.88281 11.1016 8.91797 11.4453 8.91797 11.7891C8.91797 12.125 8.88672 12.4766 8.82422 12.8438C8.76172 13.2109 8.64453 13.5508 8.47266 13.8633C8.30078 14.1758 8.08203 14.4297 7.81641 14.625C7.55078 14.8203 7.20312 14.9219 6.77344 14.9297H6.33984C6.19922 14.9297 6.05078 14.9219 5.89453 14.9062V8.92969Z"
2332
2332
  fill="currentColor"
2333
2333
  ></path>
2334
- </svg>`,w3e={Medium:"medium"},x3e={Disabled:"disabled"};/**
2334
+ </svg>`,C3e={Medium:"medium"},k3e={Disabled:"disabled"};/**
2335
2335
  * @license
2336
2336
  * Copyright 2018 Google LLC
2337
2337
  * SPDX-License-Identifier: BSD-3-Clause
2338
- */const SZ="important",C3e=" !"+SZ,k3e=X8(class extends J8{constructor(r){var e;if(super(r),r.type!==Q8.ATTRIBUTE||r.name!=="style"||((e=r.strings)==null?void 0:e.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(r){return Object.keys(r).reduce((e,t)=>{const n=r[t];return n==null?e:e+`${t=t.includes("-")?t:t.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${n};`},"")}update(r,[e]){const{style:t}=r.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(e)),this.render(e);for(const n of this.ft)e[n]==null&&(this.ft.delete(n),n.includes("-")?t.removeProperty(n):t[n]=null);for(const n in e){const i=e[n];if(i!=null){this.ft.add(n);const o=typeof i=="string"&&i.endsWith(C3e);n.includes("-")||o?t.setProperty(n,o?i.slice(0,-11):i,o?SZ:""):t[n]=i}}return Cc}});/**
2338
+ */const SZ="important",E3e=" !"+SZ,S3e=X8(class extends J8{constructor(r){var e;if(super(r),r.type!==Q8.ATTRIBUTE||r.name!=="style"||((e=r.strings)==null?void 0:e.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(r){return Object.keys(r).reduce((e,t)=>{const n=r[t];return n==null?e:e+`${t=t.includes("-")?t:t.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${n};`},"")}update(r,[e]){const{style:t}=r.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(e)),this.render(e);for(const n of this.ft)e[n]==null&&(this.ft.delete(n),n.includes("-")?t.removeProperty(n):t[n]=null);for(const n in e){const i=e[n];if(i!=null){this.ft.add(n);const o=typeof i=="string"&&i.endsWith(E3e);n.includes("-")||o?t.setProperty(n,o?i.slice(0,-11):i,o?SZ:""):t[n]=i}}return Cc}});/**
2339
2339
  * @license
2340
2340
  * Copyright 2020 Google LLC
2341
2341
  * SPDX-License-Identifier: BSD-3-Clause
2342
- */const{I:E3e}=vG,EI=()=>document.createComment(""),sp=(r,e,t)=>{var o;const n=r._$AA.parentNode,i=e===void 0?r._$AB:e._$AA;if(t===void 0){const a=n.insertBefore(EI(),i),c=n.insertBefore(EI(),i);t=new E3e(a,c,r,r.options)}else{const a=t._$AB.nextSibling,c=t._$AM,d=c!==r;if(d){let u;(o=t._$AQ)==null||o.call(t,r),t._$AM=r,t._$AP!==void 0&&(u=r._$AU)!==c._$AU&&t._$AP(u)}if(a!==i||d){let u=t._$AA;for(;u!==a;){const h=u.nextSibling;n.insertBefore(u,i),u=h}}}return t},$d=(r,e,t=r)=>(r._$AI(e,t),r),S3e={},A3e=(r,e=S3e)=>r._$AH=e,T3e=r=>r._$AH,yb=r=>{var n;(n=r._$AP)==null||n.call(r,!1,!0);let e=r._$AA;const t=r._$AB.nextSibling;for(;e!==t;){const i=e.nextSibling;e.remove(),e=i}};/**
2342
+ */const{I:A3e}=vG,EI=()=>document.createComment(""),sp=(r,e,t)=>{var o;const n=r._$AA.parentNode,i=e===void 0?r._$AB:e._$AA;if(t===void 0){const a=n.insertBefore(EI(),i),c=n.insertBefore(EI(),i);t=new A3e(a,c,r,r.options)}else{const a=t._$AB.nextSibling,c=t._$AM,d=c!==r;if(d){let u;(o=t._$AQ)==null||o.call(t,r),t._$AM=r,t._$AP!==void 0&&(u=r._$AU)!==c._$AU&&t._$AP(u)}if(a!==i||d){let u=t._$AA;for(;u!==a;){const h=u.nextSibling;n.insertBefore(u,i),u=h}}}return t},$d=(r,e,t=r)=>(r._$AI(e,t),r),T3e={},I3e=(r,e=T3e)=>r._$AH=e,R3e=r=>r._$AH,yb=r=>{var n;(n=r._$AP)==null||n.call(r,!1,!0);let e=r._$AA;const t=r._$AB.nextSibling;for(;e!==t;){const i=e.nextSibling;e.remove(),e=i}};/**
2343
2343
  * @license
2344
2344
  * Copyright 2017 Google LLC
2345
2345
  * SPDX-License-Identifier: BSD-3-Clause
2346
- */const SI=(r,e,t)=>{const n=new Map;for(let i=e;i<=t;i++)n.set(r[i],i);return n},I3e=X8(class extends J8{constructor(r){if(super(r),r.type!==Q8.CHILD)throw Error("repeat() can only be used in text expressions")}dt(r,e,t){let n;t===void 0?t=e:e!==void 0&&(n=e);const i=[],o=[];let a=0;for(const c of r)i[a]=n?n(c,a):a,o[a]=t(c,a),a++;return{values:o,keys:i}}render(r,e,t){return this.dt(r,e,t).values}update(r,[e,t,n]){const i=T3e(r),{values:o,keys:a}=this.dt(e,t,n);if(!Array.isArray(i))return this.ut=a,o;const c=this.ut??(this.ut=[]),d=[];let u,h,p=0,m=i.length-1,v=0,_=o.length-1;for(;p<=m&&v<=_;)if(i[p]===null)p++;else if(i[m]===null)m--;else if(c[p]===a[v])d[v]=$d(i[p],o[v]),p++,v++;else if(c[m]===a[_])d[_]=$d(i[m],o[_]),m--,_--;else if(c[p]===a[_])d[_]=$d(i[p],o[_]),sp(r,d[_+1],i[p]),p++,_--;else if(c[m]===a[v])d[v]=$d(i[m],o[v]),sp(r,i[p],i[m]),m--,v++;else if(u===void 0&&(u=SI(a,v,_),h=SI(c,p,m)),u.has(c[p]))if(u.has(c[m])){const b=h.get(a[v]),C=b!==void 0?i[b]:null;if(C===null){const T=sp(r,i[p]);$d(T,o[v]),d[v]=T}else d[v]=$d(C,o[v]),sp(r,i[p],C),i[b]=null;v++}else yb(i[m]),m--;else yb(i[p]),p++;for(;v<=_;){const b=sp(r,d[_+1]);$d(b,o[v]),d[v++]=b}for(;p<=m;){const b=i[p++];b!==null&&yb(b)}return this.ut=a,A3e(r,d),Cc}});class R3e extends CustomEvent{constructor(e,t){super(e,t)}}const P3e=Yt`
2346
+ */const SI=(r,e,t)=>{const n=new Map;for(let i=e;i<=t;i++)n.set(r[i],i);return n},P3e=X8(class extends J8{constructor(r){if(super(r),r.type!==Q8.CHILD)throw Error("repeat() can only be used in text expressions")}dt(r,e,t){let n;t===void 0?t=e:e!==void 0&&(n=e);const i=[],o=[];let a=0;for(const c of r)i[a]=n?n(c,a):a,o[a]=t(c,a),a++;return{values:o,keys:i}}render(r,e,t){return this.dt(r,e,t).values}update(r,[e,t,n]){const i=R3e(r),{values:o,keys:a}=this.dt(e,t,n);if(!Array.isArray(i))return this.ut=a,o;const c=this.ut??(this.ut=[]),d=[];let u,h,p=0,m=i.length-1,v=0,_=o.length-1;for(;p<=m&&v<=_;)if(i[p]===null)p++;else if(i[m]===null)m--;else if(c[p]===a[v])d[v]=$d(i[p],o[v]),p++,v++;else if(c[m]===a[_])d[_]=$d(i[m],o[_]),m--,_--;else if(c[p]===a[_])d[_]=$d(i[p],o[_]),sp(r,d[_+1],i[p]),p++,_--;else if(c[m]===a[v])d[v]=$d(i[m],o[v]),sp(r,i[p],i[m]),m--,v++;else if(u===void 0&&(u=SI(a,v,_),h=SI(c,p,m)),u.has(c[p]))if(u.has(c[m])){const b=h.get(a[v]),C=b!==void 0?i[b]:null;if(C===null){const T=sp(r,i[p]);$d(T,o[v]),d[v]=T}else d[v]=$d(C,o[v]),sp(r,i[p],C),i[b]=null;v++}else yb(i[m]),m--;else yb(i[p]),p++;for(;v<=_;){const b=sp(r,d[_+1]);$d(b,o[v]),d[v++]=b}for(;p<=m;){const b=i[p++];b!==null&&yb(b)}return this.ut=a,I3e(r,d),Cc}});class M3e extends CustomEvent{constructor(e,t){super(e,t)}}const $3e=Yt`
2347
2347
  :host {
2348
2348
  display: block;
2349
2349
  }
@@ -2365,8 +2365,8 @@ cursor: pointer;`),t},Gl=({left:r,right:e,top:t,bottom:n})=>Nt({paddingLeft:r,pa
2365
2365
  height: 100%;
2366
2366
  width: 100%;
2367
2367
  }
2368
- `;class Ua extends Oi{constructor(){super(...arguments),this.src="//:0",this.position="center"}get srcSets(){return[...this.querySelectorAll("source")].concat([...this.renderRoot.querySelectorAll("source")])}get loaded(){return this.hasAttribute("loaded")}render(){const e={backgroundImage:this.loaded?`url(${this.currentSrc})`:"",backgroundPosition:this.position||"",backgroundSize:this.cover?"cover":"contain",width:this.cover?"100%":void 0,height:this.cover?"'100%":void 0};return $t` <picture style=${k3e(e)}> ${this.renderImage()} </picture> `}renderImage(){return $t`
2369
- ${I3e(this.srcSets,e=>e.srcset||e.src,e=>e)}
2368
+ `;class Ua extends Oi{constructor(){super(...arguments),this.src="//:0",this.position="center"}get srcSets(){return[...this.querySelectorAll("source")].concat([...this.renderRoot.querySelectorAll("source")])}get loaded(){return this.hasAttribute("loaded")}render(){const e={backgroundImage:this.loaded?`url(${this.currentSrc})`:"",backgroundPosition:this.position||"",backgroundSize:this.cover?"cover":"contain",width:this.cover?"100%":void 0,height:this.cover?"'100%":void 0};return $t` <picture style=${S3e(e)}> ${this.renderImage()} </picture> `}renderImage(){return $t`
2369
+ ${P3e(this.srcSets,e=>e.srcset||e.src,e=>e)}
2370
2370
  <img
2371
2371
  src="${this.src}"
2372
2372
  height="${ys(this.width)}"
@@ -2374,7 +2374,7 @@ cursor: pointer;`),t},Gl=({left:r,right:e,top:t,bottom:n})=>Nt({paddingLeft:r,pa
2374
2374
  @load="${this._onSourceChange}"
2375
2375
  lazy
2376
2376
  />
2377
- `}_onSourceChange(e){const t=e.target,{naturalHeight:n,naturalWidth:i,currentSrc:o}=t;this.currentSrc!==o&&this._emitChange(t)&&(this.currentSrc=o,this.height=n,this.width=i,this.setAttribute("loaded",""))}_emitChange(e,t){const{naturalHeight:n,naturalWidth:i,currentSrc:o}=e,a={naturalHeight:n,naturalWidth:i,currentSrc:o},c=new R3e("picture-load",Object.assign(Object.assign({},t),{detail:a}));return this.dispatchEvent(c),!c.defaultPrevented}}Ua.styles=[P3e];P([ft()],Ua.prototype,"src",void 0);P([ft({reflect:!0})],Ua.prototype,"position",void 0);P([ft({type:Boolean})],Ua.prototype,"cover",void 0);P([ft({type:Boolean})],Ua.prototype,"lazy",void 0);P([E4()],Ua.prototype,"currentSrc",void 0);P([E4()],Ua.prototype,"height",void 0);P([E4()],Ua.prototype,"width",void 0);P([E4()],Ua.prototype,"intersected",void 0);P([s8({passive:!0})],Ua.prototype,"_onSourceChange",null);const M3e="fwc-picture";let AI=class extends Ua{};AI=P([Sr(M3e)],AI);class AZ extends kn{}AZ.styles=[EO];const $3e="fwc-ripple";let TI=class extends AZ{};TI=P([Sr($3e)],TI);const O3e=Yt`
2377
+ `}_onSourceChange(e){const t=e.target,{naturalHeight:n,naturalWidth:i,currentSrc:o}=t;this.currentSrc!==o&&this._emitChange(t)&&(this.currentSrc=o,this.height=n,this.width=i,this.setAttribute("loaded",""))}_emitChange(e,t){const{naturalHeight:n,naturalWidth:i,currentSrc:o}=e,a={naturalHeight:n,naturalWidth:i,currentSrc:o},c=new M3e("picture-load",Object.assign(Object.assign({},t),{detail:a}));return this.dispatchEvent(c),!c.defaultPrevented}}Ua.styles=[$3e];P([ft()],Ua.prototype,"src",void 0);P([ft({reflect:!0})],Ua.prototype,"position",void 0);P([ft({type:Boolean})],Ua.prototype,"cover",void 0);P([ft({type:Boolean})],Ua.prototype,"lazy",void 0);P([E4()],Ua.prototype,"currentSrc",void 0);P([E4()],Ua.prototype,"height",void 0);P([E4()],Ua.prototype,"width",void 0);P([E4()],Ua.prototype,"intersected",void 0);P([s8({passive:!0})],Ua.prototype,"_onSourceChange",null);const O3e="fwc-picture";let AI=class extends Ua{};AI=P([Sr(O3e)],AI);class AZ extends kn{}AZ.styles=[EO];const Z3e="fwc-ripple";let TI=class extends AZ{};TI=P([Sr(Z3e)],TI);const L3e=Yt`
2378
2378
  :host {
2379
2379
  --fwc-avatar-background: ${se(U.colors.ui.background__light.getVariable("color"))};
2380
2380
  --fwc-avatar-color: ${se(U.colors.interactive.primary__resting.getVariable("color"))};
@@ -2400,7 +2400,7 @@ cursor: pointer;`),t},Gl=({left:r,right:e,top:t,bottom:n})=>Nt({paddingLeft:r,pa
2400
2400
  :host([color='disabled']) {
2401
2401
  --fwc-avatar-color: ${se(U.colors.interactive.disabled__text.getVariable("color"))};
2402
2402
  }
2403
- `,Z3e=Yt`
2403
+ `,H3e=Yt`
2404
2404
  :host([size='x-small']) {
2405
2405
  --fwc-avatar-size: 1.25rem;
2406
2406
  --fwc-avatar-border-size: 1px;
@@ -2417,7 +2417,7 @@ cursor: pointer;`),t},Gl=({left:r,right:e,top:t,bottom:n})=>Nt({paddingLeft:r,pa
2417
2417
  --fwc-avatar-size: 5rem;
2418
2418
  --fwc-avatar-border-size: 4px;
2419
2419
  }
2420
- `,L3e=Yt`
2420
+ `,N3e=Yt`
2421
2421
  :host {
2422
2422
  display: contents;
2423
2423
  font-size: calc(var(--fwc-avatar-size, 3.5rem) * 0.5);
@@ -2499,7 +2499,7 @@ cursor: pointer;`),t},Gl=({left:r,right:e,top:t,bottom:n})=>Nt({paddingLeft:r,pa
2499
2499
  :host([elevated]) {
2500
2500
  --fwc-avatar-elevation: 2px 3px 5px 0 var(--fwc-avatar-shadow-color, rgba(0, 0, 0, 0.5));
2501
2501
  }
2502
- `,H3e=[L3e,O3e,Z3e];class fa extends Oi{constructor(){super(...arguments),this.size=w3e.Medium,this.clickable=!1,this.border=!1,this.disabled=!1,this.elevated=!1,this.rippleHandlers=new a1(()=>this.ripple)}updated(e){super.updated(e),e.has("disabled")&&(this.disabled&&(this.color=x3e.Disabled,this.clickable=!1),this.requestUpdate())}renderPicture(){return $t`<fwc-picture id="picture" src=${ys(this.src)} cover></fwc-picture>`}renderValue(){return $t`<span id="#value">${this.value}</span>`}renderBadge(){return $t`<slot name="badge"></slot>`}renderContent(){this.src&&console.warn("fwc-avatar.src property is deprecated, use slot instead!");const e=this.src?this.renderPicture():this.value?this.renderValue():$t`<slot></slot>`;return $t`<div id="content">${e}</div>`}render(){return $t`<div
2502
+ `,D3e=[N3e,L3e,H3e];class fa extends Oi{constructor(){super(...arguments),this.size=C3e.Medium,this.clickable=!1,this.border=!1,this.disabled=!1,this.elevated=!1,this.rippleHandlers=new a1(()=>this.ripple)}updated(e){super.updated(e),e.has("disabled")&&(this.disabled&&(this.color=k3e.Disabled,this.clickable=!1),this.requestUpdate())}renderPicture(){return $t`<fwc-picture id="picture" src=${ys(this.src)} cover></fwc-picture>`}renderValue(){return $t`<span id="#value">${this.value}</span>`}renderBadge(){return $t`<slot name="badge"></slot>`}renderContent(){this.src&&console.warn("fwc-avatar.src property is deprecated, use slot instead!");const e=this.src?this.renderPicture():this.value?this.renderValue():$t`<slot></slot>`;return $t`<div id="content">${e}</div>`}render(){return $t`<div
2503
2503
  id="root"
2504
2504
  @click=${this.handleOnClick}
2505
2505
  @focus="${this.handleRippleFocus}"
@@ -2513,7 +2513,7 @@ cursor: pointer;`),t},Gl=({left:r,right:e,top:t,bottom:n})=>Nt({paddingLeft:r,pa
2513
2513
  >
2514
2514
  ${this.renderRipple()}${this.renderContent()}
2515
2515
  <div id="badge">${this.renderBadge()}</div>
2516
- </div> `}renderRipple(){if(this.clickable)return $t`<fwc-ripple .disabled="${this.disabled}" unbounded></fwc-ripple>`}handleRippleActivate(e){const t=()=>{window.removeEventListener("mouseup",t),this.handleRippleDeactivate()};window.addEventListener("mouseup",t),this.rippleHandlers.startPress(e)}handleRippleDeactivate(){this.rippleHandlers.endPress()}handleRippleMouseEnter(){this.rippleHandlers.startHover()}handleRippleMouseLeave(){this.rippleHandlers.endHover()}handleRippleFocus(){this.rippleHandlers.startFocus()}handleRippleBlur(){this.rippleHandlers.endFocus()}handleOnClick(e){this.clickable&&this.dispatchEvent(new PointerEvent("click",e))}}fa.styles=H3e;P([ft({type:String,reflect:!0})],fa.prototype,"size",void 0);P([ft({type:String,reflect:!0})],fa.prototype,"color",void 0);P([ft({type:String})],fa.prototype,"value",void 0);P([ft({type:String})],fa.prototype,"src",void 0);P([ft({type:Boolean,reflect:!0})],fa.prototype,"clickable",void 0);P([ft({type:Boolean,reflect:!0})],fa.prototype,"border",void 0);P([ft({type:Boolean,reflect:!0})],fa.prototype,"disabled",void 0);P([ft({type:Boolean,reflect:!0})],fa.prototype,"elevated",void 0);P([_M("fwc-ripple")],fa.prototype,"ripple",void 0);P([s8({passive:!0})],fa.prototype,"handleRippleActivate",null);const N3e="fwc-avatar";let II=class extends fa{};II=P([Sr(N3e)],II);const RI={XSmall:"x-small",Medium:"medium"},D3e={TopRight:"top-right"},Mi={Secondary:"secondary",Success:"success",Danger:"danger",Warning:"warning",Disabled:"disabled"},V3e=Yt`
2516
+ </div> `}renderRipple(){if(this.clickable)return $t`<fwc-ripple .disabled="${this.disabled}" unbounded></fwc-ripple>`}handleRippleActivate(e){const t=()=>{window.removeEventListener("mouseup",t),this.handleRippleDeactivate()};window.addEventListener("mouseup",t),this.rippleHandlers.startPress(e)}handleRippleDeactivate(){this.rippleHandlers.endPress()}handleRippleMouseEnter(){this.rippleHandlers.startHover()}handleRippleMouseLeave(){this.rippleHandlers.endHover()}handleRippleFocus(){this.rippleHandlers.startFocus()}handleRippleBlur(){this.rippleHandlers.endFocus()}handleOnClick(e){this.clickable&&this.dispatchEvent(new PointerEvent("click",e))}}fa.styles=D3e;P([ft({type:String,reflect:!0})],fa.prototype,"size",void 0);P([ft({type:String,reflect:!0})],fa.prototype,"color",void 0);P([ft({type:String})],fa.prototype,"value",void 0);P([ft({type:String})],fa.prototype,"src",void 0);P([ft({type:Boolean,reflect:!0})],fa.prototype,"clickable",void 0);P([ft({type:Boolean,reflect:!0})],fa.prototype,"border",void 0);P([ft({type:Boolean,reflect:!0})],fa.prototype,"disabled",void 0);P([ft({type:Boolean,reflect:!0})],fa.prototype,"elevated",void 0);P([_M("fwc-ripple")],fa.prototype,"ripple",void 0);P([s8({passive:!0})],fa.prototype,"handleRippleActivate",null);const V3e="fwc-avatar";let II=class extends fa{};II=P([Sr(V3e)],II);const RI={XSmall:"x-small",Medium:"medium"},F3e={TopRight:"top-right"},Mi={Secondary:"secondary",Success:"success",Danger:"danger",Warning:"warning",Disabled:"disabled"},z3e=Yt`
2517
2517
  :host {
2518
2518
  --fwc-badge-background: ${se(U.colors.ui.background__light.getVariable("color"))};
2519
2519
  }
@@ -2538,7 +2538,7 @@ cursor: pointer;`),t},Gl=({left:r,right:e,top:t,bottom:n})=>Nt({paddingLeft:r,pa
2538
2538
  :host([color='disabled']) {
2539
2539
  --fwc-badge-color: ${se(U.colors.interactive.disabled__text.getVariable("color"))};
2540
2540
  }
2541
- `,F3e=Yt`
2541
+ `,j3e=Yt`
2542
2542
  :host([size='x-small']) {
2543
2543
  font-size: 0.375rem;
2544
2544
  }
@@ -2552,7 +2552,7 @@ cursor: pointer;`),t},Gl=({left:r,right:e,top:t,bottom:n})=>Nt({paddingLeft:r,pa
2552
2552
  :host([size='large']) {
2553
2553
  font-size: 2rem;
2554
2554
  }
2555
- `,z3e=Yt`
2555
+ `,U3e=Yt`
2556
2556
  :host([position='top-left']) #container {
2557
2557
  offset-distance: 0%;
2558
2558
  }
@@ -2583,7 +2583,7 @@ cursor: pointer;`),t},Gl=({left:r,right:e,top:t,bottom:n})=>Nt({paddingLeft:r,pa
2583
2583
  offset-distance: 37.5%;
2584
2584
  transform: rotate(-135deg);
2585
2585
  }
2586
- `,j3e=Yt`
2586
+ `,B3e=Yt`
2587
2587
  :host {
2588
2588
  --fwc-badge-color: ${se(U.colors.interactive.primary__resting.getVariable("color"))};
2589
2589
  --fwc-badge-size: 1.5rem;
@@ -2640,7 +2640,7 @@ cursor: pointer;`),t},Gl=({left:r,right:e,top:t,bottom:n})=>Nt({paddingLeft:r,pa
2640
2640
  :host([clickable]:not([disabled]):hover) {
2641
2641
  cursor: pointer;
2642
2642
  }
2643
- `,U3e=[V3e,F3e,z3e,j3e];class pa extends Oi{constructor(){super(...arguments),this.size=RI.Medium,this.position=D3e.TopRight,this.color=Mi.Secondary,this.circular=!0,this.rippleHandlers=new a1(()=>this.ripple)}updated(e){super.updated(e),e.has("disabled")&&this.disabled&&(this.clickable=!1,this.color=Mi.Disabled,this.requestUpdate("clickable"),this.requestUpdate("color"))}renderIcon(){return console.warn("[icon] is deprecated, please slot content"),$t`<slot name="icon"><fwc-icon icon=${ys(this.icon)}></fwc-icon></slot>`}renderValue(){return $t`<slot name="value">${this.value}</slot>`}renderRipple(){return this.clickable?$t`<fwc-ripple class="fwc-badge__ripple" disabled="${ys(this.disabled)}" unbounded></fwc-ripple>`:""}renderContent(){if(this.size!==RI.XSmall){if(this.value)return this.renderValue();if(this.icon)return this.renderIcon()}return $t`<slot></slot>`}render(){return $t`<div
2643
+ `,q3e=[z3e,j3e,U3e,B3e];class pa extends Oi{constructor(){super(...arguments),this.size=RI.Medium,this.position=F3e.TopRight,this.color=Mi.Secondary,this.circular=!0,this.rippleHandlers=new a1(()=>this.ripple)}updated(e){super.updated(e),e.has("disabled")&&this.disabled&&(this.clickable=!1,this.color=Mi.Disabled,this.requestUpdate("clickable"),this.requestUpdate("color"))}renderIcon(){return console.warn("[icon] is deprecated, please slot content"),$t`<slot name="icon"><fwc-icon icon=${ys(this.icon)}></fwc-icon></slot>`}renderValue(){return $t`<slot name="value">${this.value}</slot>`}renderRipple(){return this.clickable?$t`<fwc-ripple class="fwc-badge__ripple" disabled="${ys(this.disabled)}" unbounded></fwc-ripple>`:""}renderContent(){if(this.size!==RI.XSmall){if(this.value)return this.renderValue();if(this.icon)return this.renderIcon()}return $t`<slot></slot>`}render(){return $t`<div
2644
2644
  id="container"
2645
2645
  @click=${this.handleOnClick}
2646
2646
  @focus="${this.handleRippleFocus}"
@@ -2654,7 +2654,7 @@ cursor: pointer;`),t},Gl=({left:r,right:e,top:t,bottom:n})=>Nt({paddingLeft:r,pa
2654
2654
  >
2655
2655
  ${this.renderContent()}
2656
2656
  </div>
2657
- ${this.renderRipple()}`}handleRippleActivate(e){const t=()=>{window.removeEventListener("mouseup",t),this.handleRippleDeactivate()};window.addEventListener("mouseup",t),this.rippleHandlers.startPress(e)}handleRippleDeactivate(){this.rippleHandlers.endPress()}handleRippleMouseEnter(){this.rippleHandlers.startHover()}handleRippleMouseLeave(){this.rippleHandlers.endHover()}handleRippleFocus(){this.rippleHandlers.startFocus()}handleRippleBlur(){this.rippleHandlers.endFocus()}handleOnClick(e){this.clickable&&!this.disabled&&this.dispatchEvent(new PointerEvent("click",e))}}pa.styles=U3e;P([ft({type:String,reflect:!0})],pa.prototype,"size",void 0);P([ft({type:String,reflect:!0})],pa.prototype,"position",void 0);P([ft({type:String,reflect:!0})],pa.prototype,"color",void 0);P([ft({type:String})],pa.prototype,"value",void 0);P([ft({type:String,reflect:!0})],pa.prototype,"icon",void 0);P([ft({type:Boolean,reflect:!0})],pa.prototype,"circular",void 0);P([ft({type:Boolean,reflect:!0})],pa.prototype,"clickable",void 0);P([ft({type:Boolean,reflect:!0})],pa.prototype,"disabled",void 0);P([_M("fwc-ripple")],pa.prototype,"ripple",void 0);P([s8({passive:!0})],pa.prototype,"handleRippleActivate",null);const B3e="fwc-badge";let PI=class extends pa{};PI=P([Sr(B3e)],PI);const q3e=Yt`
2657
+ ${this.renderRipple()}`}handleRippleActivate(e){const t=()=>{window.removeEventListener("mouseup",t),this.handleRippleDeactivate()};window.addEventListener("mouseup",t),this.rippleHandlers.startPress(e)}handleRippleDeactivate(){this.rippleHandlers.endPress()}handleRippleMouseEnter(){this.rippleHandlers.startHover()}handleRippleMouseLeave(){this.rippleHandlers.endHover()}handleRippleFocus(){this.rippleHandlers.startFocus()}handleRippleBlur(){this.rippleHandlers.endFocus()}handleOnClick(e){this.clickable&&!this.disabled&&this.dispatchEvent(new PointerEvent("click",e))}}pa.styles=q3e;P([ft({type:String,reflect:!0})],pa.prototype,"size",void 0);P([ft({type:String,reflect:!0})],pa.prototype,"position",void 0);P([ft({type:String,reflect:!0})],pa.prototype,"color",void 0);P([ft({type:String})],pa.prototype,"value",void 0);P([ft({type:String,reflect:!0})],pa.prototype,"icon",void 0);P([ft({type:Boolean,reflect:!0})],pa.prototype,"circular",void 0);P([ft({type:Boolean,reflect:!0})],pa.prototype,"clickable",void 0);P([ft({type:Boolean,reflect:!0})],pa.prototype,"disabled",void 0);P([_M("fwc-ripple")],pa.prototype,"ripple",void 0);P([s8({passive:!0})],pa.prototype,"handleRippleActivate",null);const K3e="fwc-badge";let PI=class extends pa{};PI=P([Sr(K3e)],PI);const G3e=Yt`
2658
2658
  :host {
2659
2659
  font-size: calc(
2660
2660
  ${se(U.typography.paragraph.body_long.getVariable("fontSize"))} * var(--content-resize, 1)
@@ -2742,7 +2742,7 @@ cursor: pointer;`),t},Gl=({left:r,right:e,top:t,bottom:n})=>Nt({paddingLeft:r,pa
2742
2742
  * @license
2743
2743
  * Copyright 2021 Google LLC
2744
2744
  * SPDX-LIcense-Identifier: Apache-2.0
2745
- */const K3e=ql`.material-icons{font-family:var(--mdc-icon-font, "Material Icons");font-weight:normal;font-style:normal;font-size:var(--mdc-icon-size, 24px);line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale;font-feature-settings:"liga"}.mdc-icon-button{font-size:24px;width:48px;height:48px;padding:12px}.mdc-icon-button .mdc-icon-button__focus-ring{display:none}.mdc-icon-button.mdc-ripple-upgraded--background-focused .mdc-icon-button__focus-ring,.mdc-icon-button:not(.mdc-ripple-upgraded):focus .mdc-icon-button__focus-ring{display:block;max-height:48px;max-width:48px}@media screen and (forced-colors: active){.mdc-icon-button.mdc-ripple-upgraded--background-focused .mdc-icon-button__focus-ring,.mdc-icon-button:not(.mdc-ripple-upgraded):focus .mdc-icon-button__focus-ring{pointer-events:none;border:2px solid transparent;border-radius:6px;box-sizing:content-box;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:100%;width:100%}}@media screen and (forced-colors: active)and (forced-colors: active){.mdc-icon-button.mdc-ripple-upgraded--background-focused .mdc-icon-button__focus-ring,.mdc-icon-button:not(.mdc-ripple-upgraded):focus .mdc-icon-button__focus-ring{border-color:CanvasText}}@media screen and (forced-colors: active){.mdc-icon-button.mdc-ripple-upgraded--background-focused .mdc-icon-button__focus-ring::after,.mdc-icon-button:not(.mdc-ripple-upgraded):focus .mdc-icon-button__focus-ring::after{content:"";border:2px solid transparent;border-radius:8px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc(100% + 4px);width:calc(100% + 4px)}}@media screen and (forced-colors: active)and (forced-colors: active){.mdc-icon-button.mdc-ripple-upgraded--background-focused .mdc-icon-button__focus-ring::after,.mdc-icon-button:not(.mdc-ripple-upgraded):focus .mdc-icon-button__focus-ring::after{border-color:CanvasText}}.mdc-icon-button.mdc-icon-button--reduced-size .mdc-icon-button__ripple{width:40px;height:40px;margin-top:4px;margin-bottom:4px;margin-right:4px;margin-left:4px}.mdc-icon-button.mdc-icon-button--reduced-size.mdc-ripple-upgraded--background-focused .mdc-icon-button__focus-ring,.mdc-icon-button.mdc-icon-button--reduced-size:not(.mdc-ripple-upgraded):focus .mdc-icon-button__focus-ring{max-height:40px;max-width:40px}.mdc-icon-button .mdc-icon-button__touch{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%)}.mdc-icon-button:disabled{color:rgba(0, 0, 0, 0.38);color:var(--mdc-theme-text-disabled-on-light, rgba(0, 0, 0, 0.38))}.mdc-icon-button svg,.mdc-icon-button img{width:24px;height:24px}.mdc-icon-button{display:inline-block;position:relative;box-sizing:border-box;border:none;outline:none;background-color:transparent;fill:currentColor;color:inherit;text-decoration:none;cursor:pointer;user-select:none;z-index:0;overflow:visible}.mdc-icon-button .mdc-icon-button__touch{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%)}.mdc-icon-button:disabled{cursor:default;pointer-events:none}.mdc-icon-button--display-flex{align-items:center;display:inline-flex;justify-content:center}.mdc-icon-button__icon{display:inline-block}.mdc-icon-button__icon.mdc-icon-button__icon--on{display:none}.mdc-icon-button--on .mdc-icon-button__icon{display:none}.mdc-icon-button--on .mdc-icon-button__icon.mdc-icon-button__icon--on{display:inline-block}.mdc-icon-button__link{height:100%;left:0;outline:none;position:absolute;top:0;width:100%}.mdc-icon-button{display:inline-block;position:relative;box-sizing:border-box;border:none;outline:none;background-color:transparent;fill:currentColor;color:inherit;text-decoration:none;cursor:pointer;user-select:none;z-index:0;overflow:visible}.mdc-icon-button .mdc-icon-button__touch{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%)}.mdc-icon-button:disabled{cursor:default;pointer-events:none}.mdc-icon-button--display-flex{align-items:center;display:inline-flex;justify-content:center}.mdc-icon-button__icon{display:inline-block}.mdc-icon-button__icon.mdc-icon-button__icon--on{display:none}.mdc-icon-button--on .mdc-icon-button__icon{display:none}.mdc-icon-button--on .mdc-icon-button__icon.mdc-icon-button__icon--on{display:inline-block}.mdc-icon-button__link{height:100%;left:0;outline:none;position:absolute;top:0;width:100%}:host{display:inline-block;outline:none}:host([disabled]){pointer-events:none}.mdc-icon-button i,.mdc-icon-button svg,.mdc-icon-button img,.mdc-icon-button ::slotted(*){display:block}:host{--mdc-ripple-color: currentcolor;-webkit-tap-highlight-color:transparent}:host,.mdc-icon-button{vertical-align:top}.mdc-icon-button{width:var(--mdc-icon-button-size, 48px);height:var(--mdc-icon-button-size, 48px);padding:calc( (var(--mdc-icon-button-size, 48px) - var(--mdc-icon-size, 24px)) / 2 )}.mdc-icon-button i,.mdc-icon-button svg,.mdc-icon-button img,.mdc-icon-button ::slotted(*){display:block;width:var(--mdc-icon-size, 24px);height:var(--mdc-icon-size, 24px)}`;class Wu extends Rs{constructor(){super(...arguments),this.color="primary",this.size="medium",this.icon=""}renderRipple(){return this.shouldRenderRipple?$t` <mwc-ripple .disabled="${this.disabled}" .unbounded="${this.rounded}"> </mwc-ripple>`:""}render(){return $t`<a
2745
+ */const W3e=ql`.material-icons{font-family:var(--mdc-icon-font, "Material Icons");font-weight:normal;font-style:normal;font-size:var(--mdc-icon-size, 24px);line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale;font-feature-settings:"liga"}.mdc-icon-button{font-size:24px;width:48px;height:48px;padding:12px}.mdc-icon-button .mdc-icon-button__focus-ring{display:none}.mdc-icon-button.mdc-ripple-upgraded--background-focused .mdc-icon-button__focus-ring,.mdc-icon-button:not(.mdc-ripple-upgraded):focus .mdc-icon-button__focus-ring{display:block;max-height:48px;max-width:48px}@media screen and (forced-colors: active){.mdc-icon-button.mdc-ripple-upgraded--background-focused .mdc-icon-button__focus-ring,.mdc-icon-button:not(.mdc-ripple-upgraded):focus .mdc-icon-button__focus-ring{pointer-events:none;border:2px solid transparent;border-radius:6px;box-sizing:content-box;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:100%;width:100%}}@media screen and (forced-colors: active)and (forced-colors: active){.mdc-icon-button.mdc-ripple-upgraded--background-focused .mdc-icon-button__focus-ring,.mdc-icon-button:not(.mdc-ripple-upgraded):focus .mdc-icon-button__focus-ring{border-color:CanvasText}}@media screen and (forced-colors: active){.mdc-icon-button.mdc-ripple-upgraded--background-focused .mdc-icon-button__focus-ring::after,.mdc-icon-button:not(.mdc-ripple-upgraded):focus .mdc-icon-button__focus-ring::after{content:"";border:2px solid transparent;border-radius:8px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc(100% + 4px);width:calc(100% + 4px)}}@media screen and (forced-colors: active)and (forced-colors: active){.mdc-icon-button.mdc-ripple-upgraded--background-focused .mdc-icon-button__focus-ring::after,.mdc-icon-button:not(.mdc-ripple-upgraded):focus .mdc-icon-button__focus-ring::after{border-color:CanvasText}}.mdc-icon-button.mdc-icon-button--reduced-size .mdc-icon-button__ripple{width:40px;height:40px;margin-top:4px;margin-bottom:4px;margin-right:4px;margin-left:4px}.mdc-icon-button.mdc-icon-button--reduced-size.mdc-ripple-upgraded--background-focused .mdc-icon-button__focus-ring,.mdc-icon-button.mdc-icon-button--reduced-size:not(.mdc-ripple-upgraded):focus .mdc-icon-button__focus-ring{max-height:40px;max-width:40px}.mdc-icon-button .mdc-icon-button__touch{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%)}.mdc-icon-button:disabled{color:rgba(0, 0, 0, 0.38);color:var(--mdc-theme-text-disabled-on-light, rgba(0, 0, 0, 0.38))}.mdc-icon-button svg,.mdc-icon-button img{width:24px;height:24px}.mdc-icon-button{display:inline-block;position:relative;box-sizing:border-box;border:none;outline:none;background-color:transparent;fill:currentColor;color:inherit;text-decoration:none;cursor:pointer;user-select:none;z-index:0;overflow:visible}.mdc-icon-button .mdc-icon-button__touch{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%)}.mdc-icon-button:disabled{cursor:default;pointer-events:none}.mdc-icon-button--display-flex{align-items:center;display:inline-flex;justify-content:center}.mdc-icon-button__icon{display:inline-block}.mdc-icon-button__icon.mdc-icon-button__icon--on{display:none}.mdc-icon-button--on .mdc-icon-button__icon{display:none}.mdc-icon-button--on .mdc-icon-button__icon.mdc-icon-button__icon--on{display:inline-block}.mdc-icon-button__link{height:100%;left:0;outline:none;position:absolute;top:0;width:100%}.mdc-icon-button{display:inline-block;position:relative;box-sizing:border-box;border:none;outline:none;background-color:transparent;fill:currentColor;color:inherit;text-decoration:none;cursor:pointer;user-select:none;z-index:0;overflow:visible}.mdc-icon-button .mdc-icon-button__touch{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%)}.mdc-icon-button:disabled{cursor:default;pointer-events:none}.mdc-icon-button--display-flex{align-items:center;display:inline-flex;justify-content:center}.mdc-icon-button__icon{display:inline-block}.mdc-icon-button__icon.mdc-icon-button__icon--on{display:none}.mdc-icon-button--on .mdc-icon-button__icon{display:none}.mdc-icon-button--on .mdc-icon-button__icon.mdc-icon-button__icon--on{display:inline-block}.mdc-icon-button__link{height:100%;left:0;outline:none;position:absolute;top:0;width:100%}:host{display:inline-block;outline:none}:host([disabled]){pointer-events:none}.mdc-icon-button i,.mdc-icon-button svg,.mdc-icon-button img,.mdc-icon-button ::slotted(*){display:block}:host{--mdc-ripple-color: currentcolor;-webkit-tap-highlight-color:transparent}:host,.mdc-icon-button{vertical-align:top}.mdc-icon-button{width:var(--mdc-icon-button-size, 48px);height:var(--mdc-icon-button-size, 48px);padding:calc( (var(--mdc-icon-button-size, 48px) - var(--mdc-icon-size, 24px)) / 2 )}.mdc-icon-button i,.mdc-icon-button svg,.mdc-icon-button img,.mdc-icon-button ::slotted(*){display:block;width:var(--mdc-icon-size, 24px);height:var(--mdc-icon-size, 24px)}`;class Wu extends Rs{constructor(){super(...arguments),this.color="primary",this.size="medium",this.icon=""}renderRipple(){return this.shouldRenderRipple?$t` <mwc-ripple .disabled="${this.disabled}" .unbounded="${this.rounded}"> </mwc-ripple>`:""}render(){return $t`<a
2746
2746
  class="mdc-icon-button mdc-icon-button--display-flex"
2747
2747
  href="${ys(this.href)}"
2748
2748
  target="${ys(this.target)}"
@@ -2761,7 +2761,7 @@ cursor: pointer;`),t},Gl=({left:r,right:e,top:t,bottom:n})=>Nt({paddingLeft:r,pa
2761
2761
  ${this.renderRipple()}
2762
2762
  ${this.icon?$t`<fwc-icon class="mdc-icon-button__icon" .icon=${this.icon}></fwc-icon>`:""}
2763
2763
  <span><slot></slot></span>
2764
- </a>`}}Wu.styles=[q3e,K3e];P([ft({type:String})],Wu.prototype,"href",void 0);P([ft({type:String})],Wu.prototype,"target",void 0);P([ft({type:String})],Wu.prototype,"color",void 0);P([ft({type:String})],Wu.prototype,"size",void 0);P([ft({type:Boolean})],Wu.prototype,"rounded",void 0);const G3e="fwc-icon-button";let MI=class extends Wu{};MI=P([Sr(G3e)],MI);var oa;(function(r){r.Circle="circle",r.Rectangle="rectangle",r.Square="square",r.Text="text"})(oa||(oa={}));var Ri;(function(r){r.XSmall="x-small",r.small="small",r.Medium="medium",r.Large="large"})(Ri||(Ri={}));const W3e=Yt`
2764
+ </a>`}}Wu.styles=[G3e,W3e];P([ft({type:String})],Wu.prototype,"href",void 0);P([ft({type:String})],Wu.prototype,"target",void 0);P([ft({type:String})],Wu.prototype,"color",void 0);P([ft({type:String})],Wu.prototype,"size",void 0);P([ft({type:Boolean})],Wu.prototype,"rounded",void 0);const Y3e="fwc-icon-button";let MI=class extends Wu{};MI=P([Sr(Y3e)],MI);var oa;(function(r){r.Circle="circle",r.Rectangle="rectangle",r.Square="square",r.Text="text"})(oa||(oa={}));var Ri;(function(r){r.XSmall="x-small",r.small="small",r.Medium="medium",r.Large="large"})(Ri||(Ri={}));const Q3e=Yt`
2765
2765
  :host([variant='rectangle']) {
2766
2766
  border-radius: 0.25rem;
2767
2767
  }
@@ -2797,7 +2797,7 @@ cursor: pointer;`),t},Gl=({left:r,right:e,top:t,bottom:n})=>Nt({paddingLeft:r,pa
2797
2797
  :host([variant='rectangle'][size='large']:not([fluid])) {
2798
2798
  width: 15rem;
2799
2799
  }
2800
- `,Y3e=Yt`
2800
+ `,X3e=Yt`
2801
2801
  :host([variant='square']) {
2802
2802
  border-radius: 0.25rem;
2803
2803
  }
@@ -2833,7 +2833,7 @@ cursor: pointer;`),t},Gl=({left:r,right:e,top:t,bottom:n})=>Nt({paddingLeft:r,pa
2833
2833
  :host([variant='square'][size='large']:not([fluid])) {
2834
2834
  width: 7.5rem;
2835
2835
  }
2836
- `,Q3e=Yt`
2836
+ `,J3e=Yt`
2837
2837
  :host([variant='text']) {
2838
2838
  border-radius: 0.25rem;
2839
2839
  }
@@ -2865,7 +2865,7 @@ cursor: pointer;`),t},Gl=({left:r,right:e,top:t,bottom:n})=>Nt({paddingLeft:r,pa
2865
2865
  :host([variant='text'][size='large']:not([fluid])) {
2866
2866
  width: 30rem;
2867
2867
  }
2868
- `,X3e=Yt`
2868
+ `,e_e=Yt`
2869
2869
  :host([fluid]:not([variant='circle'])) {
2870
2870
  width: 100%;
2871
2871
  }
@@ -2899,7 +2899,7 @@ cursor: pointer;`),t},Gl=({left:r,right:e,top:t,bottom:n})=>Nt({paddingLeft:r,pa
2899
2899
  font-size: 3rem;
2900
2900
  line-height: 5rem;
2901
2901
  }
2902
- `,J3e=Yt`
2902
+ `,t_e=Yt`
2903
2903
  :host {
2904
2904
  display: block;
2905
2905
  position: relative;
@@ -2940,7 +2940,7 @@ cursor: pointer;`),t},Gl=({left:r,right:e,top:t,bottom:n})=>Nt({paddingLeft:r,pa
2940
2940
  transform: translateX(100%);
2941
2941
  }
2942
2942
  }
2943
- `,e_e=[W3e,Y3e,Q3e,X3e,J3e];class u1 extends Oi{constructor(){super(...arguments),this.variant=oa.Rectangle}render(){return $t`<div id="root"><slot></slot></div>`}}u1.styles=e_e;P([ft({type:String,reflect:!0})],u1.prototype,"size",void 0);P([ft({type:String,reflect:!0})],u1.prototype,"variant",void 0);P([ft({type:Boolean,reflect:!0})],u1.prototype,"inactive",void 0);P([ft({type:Boolean,reflect:!0})],u1.prototype,"fluid",void 0);const t_e="fwc-skeleton";let $I=class extends u1{};$I=P([Sr(t_e)],$I);class Ic extends Ao{constructor(){super(...arguments),this.intersected=!1,this.controllers={observer:new o5(this,{callback:e=>{this.intersected||(this.intersected=!!e.find(t=>t.isIntersecting),this.intersected&&(this.controllers.observer.unobserve(this),this.tasks={details:new _3e(this),photo:new EZ(this)}))}})},this.size="medium",this.maxWidth=300,this.contentHeight=150,this.copyToClipboard=e=>{e&&navigator.clipboard.writeText(e)}}renderJobTitle(e){return ye`${e.jobTitle?ye`<div class="person-card__jobtitle">${e.jobTitle}</div>`:null}`}renderIconBar(e){return ye`
2943
+ `,r_e=[Q3e,X3e,J3e,e_e,t_e];class u1 extends Oi{constructor(){super(...arguments),this.variant=oa.Rectangle}render(){return $t`<div id="root"><slot></slot></div>`}}u1.styles=r_e;P([ft({type:String,reflect:!0})],u1.prototype,"size",void 0);P([ft({type:String,reflect:!0})],u1.prototype,"variant",void 0);P([ft({type:Boolean,reflect:!0})],u1.prototype,"inactive",void 0);P([ft({type:Boolean,reflect:!0})],u1.prototype,"fluid",void 0);const n_e="fwc-skeleton";let $I=class extends u1{};$I=P([Sr(n_e)],$I);class Ic extends Ao{constructor(){super(...arguments),this.intersected=!1,this.controllers={observer:new o5(this,{callback:e=>{this.intersected||(this.intersected=!!e.find(t=>t.isIntersecting),this.intersected&&(this.controllers.observer.unobserve(this),this.tasks={details:new w3e(this),photo:new EZ(this)}))}})},this.size="medium",this.maxWidth=300,this.contentHeight=150,this.copyToClipboard=e=>{e&&navigator.clipboard.writeText(e)}}renderJobTitle(e){return ye`${e.jobTitle?ye`<div class="person-card__jobtitle">${e.jobTitle}</div>`:null}`}renderIconBar(e){return ye`
2944
2944
  <slot name="icon-bar">
2945
2945
  <fwc-icon-button
2946
2946
  title="Open profile"
@@ -2980,7 +2980,7 @@ cursor: pointer;`),t},Gl=({left:r,right:e,top:t,bottom:n})=>Nt({paddingLeft:r,pa
2980
2980
  rounded
2981
2981
  size="small"
2982
2982
  >
2983
- ${b3e}
2983
+ ${x3e}
2984
2984
  </fwc-icon-button>
2985
2985
  </slot>
2986
2986
  `}renderTypeStatus(e){return ye`<div class="person-card-type__row">
@@ -3104,7 +3104,7 @@ cursor: pointer;`),t},Gl=({left:r,right:e,top:t,bottom:n})=>Nt({paddingLeft:r,pa
3104
3104
  variant=${oa.Circle}
3105
3105
  icon="image"
3106
3106
  ?inactive=${e}
3107
- ></fwc-skeleton>`}renderTextPlaceholder(e,t){return ye`<fwc-skeleton size="${t}" variant=${oa.Text} ?inactive=${e}></fwc-skeleton>`}getToolbarPlaceholderIconSize(e){return e==="small"?"x-small":"small"}getAccountTypeColorClass(e){switch(e){case mi.Employee:return"fwc-person-type__employee";case mi.Consultant:case mi.Enterprise:return"fwc-person-type__consultant";case mi.External:return"fwc-person-type__external";case mi.ExternalHire:return"fwc-person-type__external-hire"}}getInitial(e){var t;return(t=e==null?void 0:e.substring(0,1))===null||t===void 0?void 0:t.toUpperCase()}}Ic.styles=y3e;P([nt({type:String})],Ic.prototype,"azureId",void 0);P([nt({type:String})],Ic.prototype,"upn",void 0);P([nt({type:String})],Ic.prototype,"dataSource",void 0);P([Bl()],Ic.prototype,"intersected",void 0);P([nt({type:String,reflect:!0})],Ic.prototype,"size",void 0);P([nt({type:Number,reflect:!0})],Ic.prototype,"maxWidth",void 0);P([nt({type:Number,reflect:!0})],Ic.prototype,"contentHeight",void 0);const r_e="fwc-person-card";let OI=class extends Ic{};OI=P([Sr(r_e)],OI);const n_e=oo`
3107
+ ></fwc-skeleton>`}renderTextPlaceholder(e,t){return ye`<fwc-skeleton size="${t}" variant=${oa.Text} ?inactive=${e}></fwc-skeleton>`}getToolbarPlaceholderIconSize(e){return e==="small"?"x-small":"small"}getAccountTypeColorClass(e){switch(e){case mi.Employee:return"fwc-person-type__employee";case mi.Consultant:case mi.Enterprise:return"fwc-person-type__consultant";case mi.External:return"fwc-person-type__external";case mi.ExternalHire:return"fwc-person-type__external-hire"}}getInitial(e){var t;return(t=e==null?void 0:e.substring(0,1))===null||t===void 0?void 0:t.toUpperCase()}}Ic.styles=b3e;P([nt({type:String})],Ic.prototype,"azureId",void 0);P([nt({type:String})],Ic.prototype,"upn",void 0);P([nt({type:String})],Ic.prototype,"dataSource",void 0);P([Bl()],Ic.prototype,"intersected",void 0);P([nt({type:String,reflect:!0})],Ic.prototype,"size",void 0);P([nt({type:Number,reflect:!0})],Ic.prototype,"maxWidth",void 0);P([nt({type:Number,reflect:!0})],Ic.prototype,"contentHeight",void 0);const i_e="fwc-person-card";let OI=class extends Ic{};OI=P([Sr(i_e)],OI);const o_e=oo`
3108
3108
  :host(:not([disabled])) fwc-avatar.employee-color {
3109
3109
  --fwc-avatar-color: #bebebe;
3110
3110
  --fwc-avatar-border-size: 0;
@@ -3160,7 +3160,7 @@ cursor: pointer;`),t},Gl=({left:r,right:e,top:t,bottom:n})=>Nt({paddingLeft:r,pa
3160
3160
  </div>`},pending:()=>ye`<fwc-avatar size=${this.size}>${this.renderImagePlaceholder(!0)}</fwc-avatar>`,error:()=>ye`<fwc-avatar size=${this.size} inactive>${this.renderImagePlaceholder(!1)}</fwc-avatar>`})}
3161
3161
  <div id="floating" @mouseover="${this.handleFloatingMouseOver}" @mouseout="${this.handleFloatingMouseOut}">
3162
3162
  <slot name="floating">
3163
- ${m3e(this.isFloatingOpen,()=>ye`<fwc-person-card onclick="event.stopPropagation()" .azureId="${this.azureId}" .upn="${this.upn}" />`)}
3163
+ ${v3e(this.isFloatingOpen,()=>ye`<fwc-person-card onclick="event.stopPropagation()" .azureId="${this.azureId}" .upn="${this.upn}" />`)}
3164
3164
  </slot>
3165
3165
  </div>
3166
3166
  </div>`:this.renderImagePlaceholder()}renderImagePlaceholder(e){const{size:t}=this;return ye`<fwc-skeleton
@@ -3168,17 +3168,17 @@ cursor: pointer;`),t},Gl=({left:r,right:e,top:t,bottom:n})=>Nt({paddingLeft:r,pa
3168
3168
  variant=${oa.Circle}
3169
3169
  icon="image"
3170
3170
  ?inactive=${e}
3171
- ></fwc-skeleton>`}getToolbarPlaceholderIconSize(e){return e==="small"?"x-small":"small"}static hideFloating(e){window.removeEventListener("click",ZI),e.isFloatingOpen=!1;const t=Zr.openedPersonAvatars.indexOf(e);t!=-1&&delete Zr.openedPersonAvatars[t]}static hideAllFloating(){Zr.openedPersonAvatars.forEach(e=>{Zr.hideFloating(e)})}showFloating(){Zr.openedPersonAvatars.push(this),window.addEventListener("click",ZI),this.isFloatingOpen=!0}handleOnClick(e){this.trigger==="click"&&!this.disabled&&(Zr.hideAllFloating(),e.target&&e.target.getRootNode()instanceof ShadowRoot&&e.target.getRootNode().host===this&&e.stopPropagation(),this.showFloating.bind(this)())}clearHideFloatingTask(){this.hideFloatingTask&&clearTimeout(this.hideFloatingTask),this.hideFloatingTask=void 0}invokeHideFloatingTask(){this.hideFloatingTask=setTimeout(()=>{Zr.hideAllFloating(),this.clearHideFloatingTask()},500)}clearShowFloatingTask(){this.showFloatingTask&&clearTimeout(this.showFloatingTask),this.showFloatingTask=void 0}invokeShowFloatingTask(){this.showFloatingTask=setTimeout(()=>{this.showFloating.bind(this)(),this.clearShowFloatingTask()},500)}handleMouseOver(e){this.clearHideFloatingTask(),this.trigger==="hover"&&this.isFloatingOpen===!1&&!this.disabled&&(Zr.hideAllFloating(),this.invokeShowFloatingTask())}handleMouseOut(e){if(this.showFloatingTask){this.clearShowFloatingTask();return}this.trigger==="hover"&&this.isFloatingOpen&&!this.disabled&&this.invokeHideFloatingTask()}handleFloatingMouseOver(){this.trigger==="hover"&&this.isFloatingOpen&&!this.disabled&&this.clearHideFloatingTask()}handleFloatingMouseOut(){this.trigger==="hover"&&this.isFloatingOpen&&!this.disabled&&this.invokeHideFloatingTask()}}Zr.styles=[n_e];Zr.openedPersonAvatars=[];P([nt({type:String})],Zr.prototype,"azureId",void 0);P([nt({type:String})],Zr.prototype,"upn",void 0);P([nt({type:String})],Zr.prototype,"dataSource",void 0);P([nt({type:Boolean,attribute:!1,reflect:!1})],Zr.prototype,"isFloatingOpen",void 0);P([nt({type:String,reflect:!0})],Zr.prototype,"size",void 0);P([nt({type:String,reflect:!0})],Zr.prototype,"pictureSrc",void 0);P([nt({type:Boolean,reflect:!0})],Zr.prototype,"clickable",void 0);P([nt({type:String,attribute:"trigger",reflect:!0})],Zr.prototype,"trigger",void 0);P([nt({type:Boolean})],Zr.prototype,"disabled",void 0);P([hO("#floating")],Zr.prototype,"floating",void 0);P([hO("#root")],Zr.prototype,"root",void 0);P([Bl()],Zr.prototype,"intersected",void 0);const i_e="fwc-person-avatar";let LI=class extends Zr{};LI=P([Sr(i_e)],LI);const TZ=({children:r,sideSheetRef:e})=>{const t=lr.Children.map(r,n=>lr.isValidElement(n)?lr.cloneElement(n,{sideSheetRef:e}):n);return E.jsx(E.Fragment,{children:t})},o_e=gt.div`
3171
+ ></fwc-skeleton>`}getToolbarPlaceholderIconSize(e){return e==="small"?"x-small":"small"}static hideFloating(e){window.removeEventListener("click",ZI),e.isFloatingOpen=!1;const t=Zr.openedPersonAvatars.indexOf(e);t!=-1&&delete Zr.openedPersonAvatars[t]}static hideAllFloating(){Zr.openedPersonAvatars.forEach(e=>{Zr.hideFloating(e)})}showFloating(){Zr.openedPersonAvatars.push(this),window.addEventListener("click",ZI),this.isFloatingOpen=!0}handleOnClick(e){this.trigger==="click"&&!this.disabled&&(Zr.hideAllFloating(),e.target&&e.target.getRootNode()instanceof ShadowRoot&&e.target.getRootNode().host===this&&e.stopPropagation(),this.showFloating.bind(this)())}clearHideFloatingTask(){this.hideFloatingTask&&clearTimeout(this.hideFloatingTask),this.hideFloatingTask=void 0}invokeHideFloatingTask(){this.hideFloatingTask=setTimeout(()=>{Zr.hideAllFloating(),this.clearHideFloatingTask()},500)}clearShowFloatingTask(){this.showFloatingTask&&clearTimeout(this.showFloatingTask),this.showFloatingTask=void 0}invokeShowFloatingTask(){this.showFloatingTask=setTimeout(()=>{this.showFloating.bind(this)(),this.clearShowFloatingTask()},500)}handleMouseOver(e){this.clearHideFloatingTask(),this.trigger==="hover"&&this.isFloatingOpen===!1&&!this.disabled&&(Zr.hideAllFloating(),this.invokeShowFloatingTask())}handleMouseOut(e){if(this.showFloatingTask){this.clearShowFloatingTask();return}this.trigger==="hover"&&this.isFloatingOpen&&!this.disabled&&this.invokeHideFloatingTask()}handleFloatingMouseOver(){this.trigger==="hover"&&this.isFloatingOpen&&!this.disabled&&this.clearHideFloatingTask()}handleFloatingMouseOut(){this.trigger==="hover"&&this.isFloatingOpen&&!this.disabled&&this.invokeHideFloatingTask()}}Zr.styles=[o_e];Zr.openedPersonAvatars=[];P([nt({type:String})],Zr.prototype,"azureId",void 0);P([nt({type:String})],Zr.prototype,"upn",void 0);P([nt({type:String})],Zr.prototype,"dataSource",void 0);P([nt({type:Boolean,attribute:!1,reflect:!1})],Zr.prototype,"isFloatingOpen",void 0);P([nt({type:String,reflect:!0})],Zr.prototype,"size",void 0);P([nt({type:String,reflect:!0})],Zr.prototype,"pictureSrc",void 0);P([nt({type:Boolean,reflect:!0})],Zr.prototype,"clickable",void 0);P([nt({type:String,attribute:"trigger",reflect:!0})],Zr.prototype,"trigger",void 0);P([nt({type:Boolean})],Zr.prototype,"disabled",void 0);P([hO("#floating")],Zr.prototype,"floating",void 0);P([hO("#root")],Zr.prototype,"root",void 0);P([Bl()],Zr.prototype,"intersected",void 0);const a_e="fwc-person-avatar";let LI=class extends Zr{};LI=P([Sr(a_e)],LI);const TZ=({children:r,sideSheetRef:e})=>{const t=lr.Children.map(r,n=>lr.isValidElement(n)?lr.cloneElement(n,{sideSheetRef:e}):n);return E.jsx(E.Fragment,{children:t})},s_e=gt.div`
3172
3172
  overflow-y: auto;
3173
3173
  height: calc(100vh - 7rem);
3174
3174
  padding: 1rem;
3175
- `,IZ=({children:r})=>E.jsx(o_e,{children:r});Ro.add({fullscreen:yte,fullscreen_exit:gte});const a_e=()=>{const[r,e]=x.useState(!1);return x.useEffect(()=>{const t=()=>e(!!document.fullscreenElement);return document.addEventListener("fullscreenchange",t),()=>document.removeEventListener("fullscreenchange",t)},[]),E.jsx(Ro,{name:r?"fullscreen_exit":"fullscreen"})},s_e=gt.span`
3175
+ `,IZ=({children:r})=>E.jsx(s_e,{children:r});Ro.add({fullscreen:yte,fullscreen_exit:gte});const c_e=()=>{const[r,e]=x.useState(!1);return x.useEffect(()=>{const t=()=>e(!!document.fullscreenElement);return document.addEventListener("fullscreenchange",t),()=>document.removeEventListener("fullscreenchange",t)},[]),E.jsx(Ro,{name:r?"fullscreen_exit":"fullscreen"})},l_e=gt.span`
3176
3176
  background-color: ${({color:r})=>r||"red"};
3177
3177
  height: 3rem;
3178
3178
  width: 8px;
3179
3179
  margin-right: 1rem;
3180
3180
  border-radius: 2px;
3181
- `,RZ=({color:r})=>E.jsx(s_e,{color:r}),PZ=({subTitle:r})=>E.jsx(Zu,{variant:"meta",children:r}),MZ=({title:r})=>E.jsx(Zu,{variant:"h4",children:r});var _n=function(){return _n=Object.assign||function(r){for(var e,t=1,n=arguments.length;t<n;t++){e=arguments[t];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=e[i])}return r},_n.apply(this,arguments)},HI={width:"100%",height:"10px",top:"0px",left:"0px",cursor:"row-resize"},NI={width:"10px",height:"100%",top:"0px",left:"0px",cursor:"col-resize"},kg={width:"20px",height:"20px",position:"absolute",zIndex:1},c_e={top:_n(_n({},HI),{top:"-5px"}),right:_n(_n({},NI),{left:void 0,right:"-5px"}),bottom:_n(_n({},HI),{top:void 0,bottom:"-5px"}),left:_n(_n({},NI),{left:"-5px"}),topRight:_n(_n({},kg),{right:"-10px",top:"-10px",cursor:"ne-resize"}),bottomRight:_n(_n({},kg),{right:"-10px",bottom:"-10px",cursor:"se-resize"}),bottomLeft:_n(_n({},kg),{left:"-10px",bottom:"-10px",cursor:"sw-resize"}),topLeft:_n(_n({},kg),{left:"-10px",top:"-10px",cursor:"nw-resize"})},l_e=x.memo(function(r){var e=r.onResizeStart,t=r.direction,n=r.children,i=r.replaceStyles,o=r.className,a=x.useCallback(function(u){e(u,t)},[e,t]),c=x.useCallback(function(u){e(u,t)},[e,t]),d=x.useMemo(function(){return _n(_n({position:"absolute",userSelect:"none"},c_e[t]),i??{})},[i,t]);return E.jsx("div",{className:o||void 0,style:d,onMouseDown:a,onTouchStart:c,children:n})}),d_e=function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),ns=function(){return ns=Object.assign||function(r){for(var e,t=1,n=arguments.length;t<n;t++){e=arguments[t];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=e[i])}return r},ns.apply(this,arguments)},u_e={width:"auto",height:"auto"},Eg=function(r,e,t){return Math.max(Math.min(r,t),e)},DI=function(r,e,t){var n=Math.round(r/e);return n*e+t*(n-1)},Oh=function(r,e){return new RegExp(r,"i").test(e)},Sg=function(r){return!!(r.touches&&r.touches.length)},h_e=function(r){return!!((r.clientX||r.clientX===0)&&(r.clientY||r.clientY===0))},VI=function(r,e,t){t===void 0&&(t=0);var n=e.reduce(function(o,a,c){return Math.abs(a-r)<Math.abs(e[o]-r)?c:o},0),i=Math.abs(e[n]-r);return t===0||i<t?e[n]:r},_b=function(r){return r=r.toString(),r==="auto"||r.endsWith("px")||r.endsWith("%")||r.endsWith("vh")||r.endsWith("vw")||r.endsWith("vmax")||r.endsWith("vmin")?r:"".concat(r,"px")},Ag=function(r,e,t,n){if(r&&typeof r=="string"){if(r.endsWith("px"))return Number(r.replace("px",""));if(r.endsWith("%")){var i=Number(r.replace("%",""))/100;return e*i}if(r.endsWith("vw")){var i=Number(r.replace("vw",""))/100;return t*i}if(r.endsWith("vh")){var i=Number(r.replace("vh",""))/100;return n*i}}return r},f_e=function(r,e,t,n,i,o,a){return n=Ag(n,r.width,e,t),i=Ag(i,r.height,e,t),o=Ag(o,r.width,e,t),a=Ag(a,r.height,e,t),{maxWidth:typeof n>"u"?void 0:Number(n),maxHeight:typeof i>"u"?void 0:Number(i),minWidth:typeof o>"u"?void 0:Number(o),minHeight:typeof a>"u"?void 0:Number(a)}},p_e=function(r){return Array.isArray(r)?r:[r,r]},m_e=["as","ref","style","className","grid","gridGap","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],FI="__resizable_base__",g_e=function(r){d_e(e,r);function e(t){var n,i,o,a,c=r.call(this,t)||this;return c.ratio=1,c.resizable=null,c.parentLeft=0,c.parentTop=0,c.resizableLeft=0,c.resizableRight=0,c.resizableTop=0,c.resizableBottom=0,c.targetLeft=0,c.targetTop=0,c.delta={width:0,height:0},c.appendBase=function(){if(!c.resizable||!c.window)return null;var d=c.parentNode;if(!d)return null;var u=c.window.document.createElement("div");return u.style.width="100%",u.style.height="100%",u.style.position="absolute",u.style.transform="scale(0, 0)",u.style.left="0",u.style.flex="0 0 100%",u.classList?u.classList.add(FI):u.className+=FI,d.appendChild(u),u},c.removeBase=function(d){var u=c.parentNode;u&&u.removeChild(d)},c.state={isResizing:!1,width:(i=(n=c.propsSize)===null||n===void 0?void 0:n.width)!==null&&i!==void 0?i:"auto",height:(a=(o=c.propsSize)===null||o===void 0?void 0:o.height)!==null&&a!==void 0?a:"auto",direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},c.onResizeStart=c.onResizeStart.bind(c),c.onMouseMove=c.onMouseMove.bind(c),c.onMouseUp=c.onMouseUp.bind(c),c}return Object.defineProperty(e.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"window",{get:function(){return!this.resizable||!this.resizable.ownerDocument?null:this.resizable.ownerDocument.defaultView},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||u_e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"size",{get:function(){var t=0,n=0;if(this.resizable&&this.window){var i=this.resizable.offsetWidth,o=this.resizable.offsetHeight,a=this.resizable.style.position;a!=="relative"&&(this.resizable.style.position="relative"),t=this.resizable.style.width!=="auto"?this.resizable.offsetWidth:i,n=this.resizable.style.height!=="auto"?this.resizable.offsetHeight:o,this.resizable.style.position=a}return{width:t,height:n}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sizeStyle",{get:function(){var t=this,n=this.props.size,i=function(c){var d;if(typeof t.state[c]>"u"||t.state[c]==="auto")return"auto";if(t.propsSize&&t.propsSize[c]&&(!((d=t.propsSize[c])===null||d===void 0)&&d.toString().endsWith("%"))){if(t.state[c].toString().endsWith("%"))return t.state[c].toString();var u=t.getParentSize(),h=Number(t.state[c].toString().replace("px","")),p=h/u[c]*100;return"".concat(p,"%")}return _b(t.state[c])},o=n&&typeof n.width<"u"&&!this.state.isResizing?_b(n.width):i("width"),a=n&&typeof n.height<"u"&&!this.state.isResizing?_b(n.height):i("height");return{width:o,height:a}},enumerable:!1,configurable:!0}),e.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var t=this.appendBase();if(!t)return{width:0,height:0};var n=!1,i=this.parentNode.style.flexWrap;i!=="wrap"&&(n=!0,this.parentNode.style.flexWrap="wrap"),t.style.position="relative",t.style.minWidth="100%",t.style.minHeight="100%";var o={width:t.offsetWidth,height:t.offsetHeight};return n&&(this.parentNode.style.flexWrap=i),this.removeBase(t),o},e.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},e.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},e.prototype.componentDidMount=function(){if(!(!this.resizable||!this.window)){var t=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:t.flexBasis!=="auto"?t.flexBasis:void 0})}},e.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},e.prototype.createSizeForCssProperty=function(t,n){var i=this.propsSize&&this.propsSize[n];return this.state[n]==="auto"&&this.state.original[n]===t&&(typeof i>"u"||i==="auto")?"auto":t},e.prototype.calculateNewMaxFromBoundary=function(t,n){var i=this.props.boundsByDirection,o=this.state.direction,a=i&&Oh("left",o),c=i&&Oh("top",o),d,u;if(this.props.bounds==="parent"){var h=this.parentNode;h&&(d=a?this.resizableRight-this.parentLeft:h.offsetWidth+(this.parentLeft-this.resizableLeft),u=c?this.resizableBottom-this.parentTop:h.offsetHeight+(this.parentTop-this.resizableTop))}else this.props.bounds==="window"?this.window&&(d=a?this.resizableRight:this.window.innerWidth-this.resizableLeft,u=c?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(d=a?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),u=c?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return d&&Number.isFinite(d)&&(t=t&&t<d?t:d),u&&Number.isFinite(u)&&(n=n&&n<u?n:u),{maxWidth:t,maxHeight:n}},e.prototype.calculateNewSizeFromDirection=function(t,n){var i=this.props.scale||1,o=p_e(this.props.resizeRatio||1),a=o[0],c=o[1],d=this.state,u=d.direction,h=d.original,p=this.props,m=p.lockAspectRatio,v=p.lockAspectRatioExtraHeight,_=p.lockAspectRatioExtraWidth,b=h.width,C=h.height,T=v||0,A=_||0;return Oh("right",u)&&(b=h.width+(t-h.x)*a/i,m&&(C=(b-A)/this.ratio+T)),Oh("left",u)&&(b=h.width-(t-h.x)*a/i,m&&(C=(b-A)/this.ratio+T)),Oh("bottom",u)&&(C=h.height+(n-h.y)*c/i,m&&(b=(C-T)*this.ratio+A)),Oh("top",u)&&(C=h.height-(n-h.y)*c/i,m&&(b=(C-T)*this.ratio+A)),{newWidth:b,newHeight:C}},e.prototype.calculateNewSizeFromAspectRatio=function(t,n,i,o){var a=this.props,c=a.lockAspectRatio,d=a.lockAspectRatioExtraHeight,u=a.lockAspectRatioExtraWidth,h=typeof o.width>"u"?10:o.width,p=typeof i.width>"u"||i.width<0?t:i.width,m=typeof o.height>"u"?10:o.height,v=typeof i.height>"u"||i.height<0?n:i.height,_=d||0,b=u||0;if(c){var C=(m-_)*this.ratio+b,T=(v-_)*this.ratio+b,A=(h-b)/this.ratio+_,I=(p-b)/this.ratio+_,O=Math.max(h,C),B=Math.min(p,T),z=Math.max(m,A),R=Math.min(v,I);t=Eg(t,O,B),n=Eg(n,z,R)}else t=Eg(t,h,p),n=Eg(n,m,v);return{newWidth:t,newHeight:n}},e.prototype.setBoundingClientRect=function(){var t=1/(this.props.scale||1);if(this.props.bounds==="parent"){var n=this.parentNode;if(n){var i=n.getBoundingClientRect();this.parentLeft=i.left*t,this.parentTop=i.top*t}}if(this.props.bounds&&typeof this.props.bounds!="string"){var o=this.props.bounds.getBoundingClientRect();this.targetLeft=o.left*t,this.targetTop=o.top*t}if(this.resizable){var a=this.resizable.getBoundingClientRect(),c=a.left,d=a.top,u=a.right,h=a.bottom;this.resizableLeft=c*t,this.resizableRight=u*t,this.resizableTop=d*t,this.resizableBottom=h*t}},e.prototype.onResizeStart=function(t,n){if(!(!this.resizable||!this.window)){var i=0,o=0;if(t.nativeEvent&&h_e(t.nativeEvent)?(i=t.nativeEvent.clientX,o=t.nativeEvent.clientY):t.nativeEvent&&Sg(t.nativeEvent)&&(i=t.nativeEvent.touches[0].clientX,o=t.nativeEvent.touches[0].clientY),this.props.onResizeStart&&this.resizable){var a=this.props.onResizeStart(t,n,this.resizable);if(a===!1)return}this.props.size&&(typeof this.props.size.height<"u"&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),typeof this.props.size.width<"u"&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio=typeof this.props.lockAspectRatio=="number"?this.props.lockAspectRatio:this.size.width/this.size.height;var c,d=this.window.getComputedStyle(this.resizable);if(d.flexBasis!=="auto"){var u=this.parentNode;if(u){var h=this.window.getComputedStyle(u).flexDirection;this.flexDir=h.startsWith("row")?"row":"column",c=d.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var p={original:{x:i,y:o,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:ns(ns({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(t.target).cursor||"auto"}),direction:n,flexBasis:c};this.setState(p)}},e.prototype.onMouseMove=function(t){var n=this;if(!(!this.state.isResizing||!this.resizable||!this.window)){if(this.window.TouchEvent&&Sg(t))try{t.preventDefault(),t.stopPropagation()}catch{}var i=this.props,o=i.maxWidth,a=i.maxHeight,c=i.minWidth,d=i.minHeight,u=Sg(t)?t.touches[0].clientX:t.clientX,h=Sg(t)?t.touches[0].clientY:t.clientY,p=this.state,m=p.direction,v=p.original,_=p.width,b=p.height,C=this.getParentSize(),T=f_e(C,this.window.innerWidth,this.window.innerHeight,o,a,c,d);o=T.maxWidth,a=T.maxHeight,c=T.minWidth,d=T.minHeight;var A=this.calculateNewSizeFromDirection(u,h),I=A.newHeight,O=A.newWidth,B=this.calculateNewMaxFromBoundary(o,a);this.props.snap&&this.props.snap.x&&(O=VI(O,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(I=VI(I,this.props.snap.y,this.props.snapGap));var z=this.calculateNewSizeFromAspectRatio(O,I,{width:B.maxWidth,height:B.maxHeight},{width:c,height:d});if(O=z.newWidth,I=z.newHeight,this.props.grid){var R=DI(O,this.props.grid[0],this.props.gridGap?this.props.gridGap[0]:0),Y=DI(I,this.props.grid[1],this.props.gridGap?this.props.gridGap[1]:0),ue=this.props.snapGap||0,le=ue===0||Math.abs(R-O)<=ue?R:O,Te=ue===0||Math.abs(Y-I)<=ue?Y:I;O=le,I=Te}var ke={width:O-v.width,height:I-v.height};if(this.delta=ke,_&&typeof _=="string"){if(_.endsWith("%")){var xe=O/C.width*100;O="".concat(xe,"%")}else if(_.endsWith("vw")){var X=O/this.window.innerWidth*100;O="".concat(X,"vw")}else if(_.endsWith("vh")){var q=O/this.window.innerHeight*100;O="".concat(q,"vh")}}if(b&&typeof b=="string"){if(b.endsWith("%")){var xe=I/C.height*100;I="".concat(xe,"%")}else if(b.endsWith("vw")){var X=I/this.window.innerWidth*100;I="".concat(X,"vw")}else if(b.endsWith("vh")){var q=I/this.window.innerHeight*100;I="".concat(q,"vh")}}var re={width:this.createSizeForCssProperty(O,"width"),height:this.createSizeForCssProperty(I,"height")};this.flexDir==="row"?re.flexBasis=re.width:this.flexDir==="column"&&(re.flexBasis=re.height);var W=this.state.width!==re.width,$=this.state.height!==re.height,L=this.state.flexBasis!==re.flexBasis,D=W||$||L;D&&Uu.flushSync(function(){n.setState(re)}),this.props.onResize&&D&&this.props.onResize(t,m,this.resizable,ke)}},e.prototype.onMouseUp=function(t){var n,i,o=this.state,a=o.isResizing,c=o.direction;o.original,!(!a||!this.resizable)&&(this.props.onResizeStop&&this.props.onResizeStop(t,c,this.resizable,this.delta),this.props.size&&this.setState({width:(n=this.props.size.width)!==null&&n!==void 0?n:"auto",height:(i=this.props.size.height)!==null&&i!==void 0?i:"auto"}),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:ns(ns({},this.state.backgroundStyle),{cursor:"auto"})}))},e.prototype.updateSize=function(t){var n,i;this.setState({width:(n=t.width)!==null&&n!==void 0?n:"auto",height:(i=t.height)!==null&&i!==void 0?i:"auto"})},e.prototype.renderResizer=function(){var t=this,n=this.props,i=n.enable,o=n.handleStyles,a=n.handleClasses,c=n.handleWrapperStyle,d=n.handleWrapperClass,u=n.handleComponent;if(!i)return null;var h=Object.keys(i).map(function(p){return i[p]!==!1?E.jsx(l_e,{direction:p,onResizeStart:t.onResizeStart,replaceStyles:o&&o[p],className:a&&a[p],children:u&&u[p]?u[p]:null},p):null});return E.jsx("div",{className:d,style:c,children:h})},e.prototype.render=function(){var t=this,n=Object.keys(this.props).reduce(function(a,c){return m_e.indexOf(c)!==-1||(a[c]=t.props[c]),a},{}),i=ns(ns(ns({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(i.flexBasis=this.state.flexBasis);var o=this.props.as||"div";return E.jsxs(o,ns({style:i,className:this.props.className},n,{ref:function(a){a&&(t.resizable=a)},children:[this.state.isResizing&&E.jsx("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer()]}))},e.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],gridGap:[0,0],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},e}(x.PureComponent);const v_e=gt(Nre).withConfig({shouldForwardProp:r=>r!=="shouldAnimate"})`
3181
+ `,RZ=({color:r})=>E.jsx(l_e,{color:r}),PZ=({subTitle:r})=>E.jsx(Zu,{variant:"meta",children:r}),MZ=({title:r})=>E.jsx(Zu,{variant:"h4",children:r});var _n=function(){return _n=Object.assign||function(r){for(var e,t=1,n=arguments.length;t<n;t++){e=arguments[t];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=e[i])}return r},_n.apply(this,arguments)},HI={width:"100%",height:"10px",top:"0px",left:"0px",cursor:"row-resize"},NI={width:"10px",height:"100%",top:"0px",left:"0px",cursor:"col-resize"},kg={width:"20px",height:"20px",position:"absolute",zIndex:1},d_e={top:_n(_n({},HI),{top:"-5px"}),right:_n(_n({},NI),{left:void 0,right:"-5px"}),bottom:_n(_n({},HI),{top:void 0,bottom:"-5px"}),left:_n(_n({},NI),{left:"-5px"}),topRight:_n(_n({},kg),{right:"-10px",top:"-10px",cursor:"ne-resize"}),bottomRight:_n(_n({},kg),{right:"-10px",bottom:"-10px",cursor:"se-resize"}),bottomLeft:_n(_n({},kg),{left:"-10px",bottom:"-10px",cursor:"sw-resize"}),topLeft:_n(_n({},kg),{left:"-10px",top:"-10px",cursor:"nw-resize"})},u_e=x.memo(function(r){var e=r.onResizeStart,t=r.direction,n=r.children,i=r.replaceStyles,o=r.className,a=x.useCallback(function(u){e(u,t)},[e,t]),c=x.useCallback(function(u){e(u,t)},[e,t]),d=x.useMemo(function(){return _n(_n({position:"absolute",userSelect:"none"},d_e[t]),i??{})},[i,t]);return E.jsx("div",{className:o||void 0,style:d,onMouseDown:a,onTouchStart:c,children:n})}),h_e=function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),ns=function(){return ns=Object.assign||function(r){for(var e,t=1,n=arguments.length;t<n;t++){e=arguments[t];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=e[i])}return r},ns.apply(this,arguments)},f_e={width:"auto",height:"auto"},Eg=function(r,e,t){return Math.max(Math.min(r,t),e)},DI=function(r,e,t){var n=Math.round(r/e);return n*e+t*(n-1)},Oh=function(r,e){return new RegExp(r,"i").test(e)},Sg=function(r){return!!(r.touches&&r.touches.length)},p_e=function(r){return!!((r.clientX||r.clientX===0)&&(r.clientY||r.clientY===0))},VI=function(r,e,t){t===void 0&&(t=0);var n=e.reduce(function(o,a,c){return Math.abs(a-r)<Math.abs(e[o]-r)?c:o},0),i=Math.abs(e[n]-r);return t===0||i<t?e[n]:r},_b=function(r){return r=r.toString(),r==="auto"||r.endsWith("px")||r.endsWith("%")||r.endsWith("vh")||r.endsWith("vw")||r.endsWith("vmax")||r.endsWith("vmin")?r:"".concat(r,"px")},Ag=function(r,e,t,n){if(r&&typeof r=="string"){if(r.endsWith("px"))return Number(r.replace("px",""));if(r.endsWith("%")){var i=Number(r.replace("%",""))/100;return e*i}if(r.endsWith("vw")){var i=Number(r.replace("vw",""))/100;return t*i}if(r.endsWith("vh")){var i=Number(r.replace("vh",""))/100;return n*i}}return r},m_e=function(r,e,t,n,i,o,a){return n=Ag(n,r.width,e,t),i=Ag(i,r.height,e,t),o=Ag(o,r.width,e,t),a=Ag(a,r.height,e,t),{maxWidth:typeof n>"u"?void 0:Number(n),maxHeight:typeof i>"u"?void 0:Number(i),minWidth:typeof o>"u"?void 0:Number(o),minHeight:typeof a>"u"?void 0:Number(a)}},g_e=function(r){return Array.isArray(r)?r:[r,r]},v_e=["as","ref","style","className","grid","gridGap","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],FI="__resizable_base__",y_e=function(r){h_e(e,r);function e(t){var n,i,o,a,c=r.call(this,t)||this;return c.ratio=1,c.resizable=null,c.parentLeft=0,c.parentTop=0,c.resizableLeft=0,c.resizableRight=0,c.resizableTop=0,c.resizableBottom=0,c.targetLeft=0,c.targetTop=0,c.delta={width:0,height:0},c.appendBase=function(){if(!c.resizable||!c.window)return null;var d=c.parentNode;if(!d)return null;var u=c.window.document.createElement("div");return u.style.width="100%",u.style.height="100%",u.style.position="absolute",u.style.transform="scale(0, 0)",u.style.left="0",u.style.flex="0 0 100%",u.classList?u.classList.add(FI):u.className+=FI,d.appendChild(u),u},c.removeBase=function(d){var u=c.parentNode;u&&u.removeChild(d)},c.state={isResizing:!1,width:(i=(n=c.propsSize)===null||n===void 0?void 0:n.width)!==null&&i!==void 0?i:"auto",height:(a=(o=c.propsSize)===null||o===void 0?void 0:o.height)!==null&&a!==void 0?a:"auto",direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},c.onResizeStart=c.onResizeStart.bind(c),c.onMouseMove=c.onMouseMove.bind(c),c.onMouseUp=c.onMouseUp.bind(c),c}return Object.defineProperty(e.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"window",{get:function(){return!this.resizable||!this.resizable.ownerDocument?null:this.resizable.ownerDocument.defaultView},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||f_e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"size",{get:function(){var t=0,n=0;if(this.resizable&&this.window){var i=this.resizable.offsetWidth,o=this.resizable.offsetHeight,a=this.resizable.style.position;a!=="relative"&&(this.resizable.style.position="relative"),t=this.resizable.style.width!=="auto"?this.resizable.offsetWidth:i,n=this.resizable.style.height!=="auto"?this.resizable.offsetHeight:o,this.resizable.style.position=a}return{width:t,height:n}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sizeStyle",{get:function(){var t=this,n=this.props.size,i=function(c){var d;if(typeof t.state[c]>"u"||t.state[c]==="auto")return"auto";if(t.propsSize&&t.propsSize[c]&&(!((d=t.propsSize[c])===null||d===void 0)&&d.toString().endsWith("%"))){if(t.state[c].toString().endsWith("%"))return t.state[c].toString();var u=t.getParentSize(),h=Number(t.state[c].toString().replace("px","")),p=h/u[c]*100;return"".concat(p,"%")}return _b(t.state[c])},o=n&&typeof n.width<"u"&&!this.state.isResizing?_b(n.width):i("width"),a=n&&typeof n.height<"u"&&!this.state.isResizing?_b(n.height):i("height");return{width:o,height:a}},enumerable:!1,configurable:!0}),e.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var t=this.appendBase();if(!t)return{width:0,height:0};var n=!1,i=this.parentNode.style.flexWrap;i!=="wrap"&&(n=!0,this.parentNode.style.flexWrap="wrap"),t.style.position="relative",t.style.minWidth="100%",t.style.minHeight="100%";var o={width:t.offsetWidth,height:t.offsetHeight};return n&&(this.parentNode.style.flexWrap=i),this.removeBase(t),o},e.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},e.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},e.prototype.componentDidMount=function(){if(!(!this.resizable||!this.window)){var t=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:t.flexBasis!=="auto"?t.flexBasis:void 0})}},e.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},e.prototype.createSizeForCssProperty=function(t,n){var i=this.propsSize&&this.propsSize[n];return this.state[n]==="auto"&&this.state.original[n]===t&&(typeof i>"u"||i==="auto")?"auto":t},e.prototype.calculateNewMaxFromBoundary=function(t,n){var i=this.props.boundsByDirection,o=this.state.direction,a=i&&Oh("left",o),c=i&&Oh("top",o),d,u;if(this.props.bounds==="parent"){var h=this.parentNode;h&&(d=a?this.resizableRight-this.parentLeft:h.offsetWidth+(this.parentLeft-this.resizableLeft),u=c?this.resizableBottom-this.parentTop:h.offsetHeight+(this.parentTop-this.resizableTop))}else this.props.bounds==="window"?this.window&&(d=a?this.resizableRight:this.window.innerWidth-this.resizableLeft,u=c?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(d=a?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),u=c?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return d&&Number.isFinite(d)&&(t=t&&t<d?t:d),u&&Number.isFinite(u)&&(n=n&&n<u?n:u),{maxWidth:t,maxHeight:n}},e.prototype.calculateNewSizeFromDirection=function(t,n){var i=this.props.scale||1,o=g_e(this.props.resizeRatio||1),a=o[0],c=o[1],d=this.state,u=d.direction,h=d.original,p=this.props,m=p.lockAspectRatio,v=p.lockAspectRatioExtraHeight,_=p.lockAspectRatioExtraWidth,b=h.width,C=h.height,T=v||0,A=_||0;return Oh("right",u)&&(b=h.width+(t-h.x)*a/i,m&&(C=(b-A)/this.ratio+T)),Oh("left",u)&&(b=h.width-(t-h.x)*a/i,m&&(C=(b-A)/this.ratio+T)),Oh("bottom",u)&&(C=h.height+(n-h.y)*c/i,m&&(b=(C-T)*this.ratio+A)),Oh("top",u)&&(C=h.height-(n-h.y)*c/i,m&&(b=(C-T)*this.ratio+A)),{newWidth:b,newHeight:C}},e.prototype.calculateNewSizeFromAspectRatio=function(t,n,i,o){var a=this.props,c=a.lockAspectRatio,d=a.lockAspectRatioExtraHeight,u=a.lockAspectRatioExtraWidth,h=typeof o.width>"u"?10:o.width,p=typeof i.width>"u"||i.width<0?t:i.width,m=typeof o.height>"u"?10:o.height,v=typeof i.height>"u"||i.height<0?n:i.height,_=d||0,b=u||0;if(c){var C=(m-_)*this.ratio+b,T=(v-_)*this.ratio+b,A=(h-b)/this.ratio+_,I=(p-b)/this.ratio+_,O=Math.max(h,C),B=Math.min(p,T),z=Math.max(m,A),R=Math.min(v,I);t=Eg(t,O,B),n=Eg(n,z,R)}else t=Eg(t,h,p),n=Eg(n,m,v);return{newWidth:t,newHeight:n}},e.prototype.setBoundingClientRect=function(){var t=1/(this.props.scale||1);if(this.props.bounds==="parent"){var n=this.parentNode;if(n){var i=n.getBoundingClientRect();this.parentLeft=i.left*t,this.parentTop=i.top*t}}if(this.props.bounds&&typeof this.props.bounds!="string"){var o=this.props.bounds.getBoundingClientRect();this.targetLeft=o.left*t,this.targetTop=o.top*t}if(this.resizable){var a=this.resizable.getBoundingClientRect(),c=a.left,d=a.top,u=a.right,h=a.bottom;this.resizableLeft=c*t,this.resizableRight=u*t,this.resizableTop=d*t,this.resizableBottom=h*t}},e.prototype.onResizeStart=function(t,n){if(!(!this.resizable||!this.window)){var i=0,o=0;if(t.nativeEvent&&p_e(t.nativeEvent)?(i=t.nativeEvent.clientX,o=t.nativeEvent.clientY):t.nativeEvent&&Sg(t.nativeEvent)&&(i=t.nativeEvent.touches[0].clientX,o=t.nativeEvent.touches[0].clientY),this.props.onResizeStart&&this.resizable){var a=this.props.onResizeStart(t,n,this.resizable);if(a===!1)return}this.props.size&&(typeof this.props.size.height<"u"&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),typeof this.props.size.width<"u"&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio=typeof this.props.lockAspectRatio=="number"?this.props.lockAspectRatio:this.size.width/this.size.height;var c,d=this.window.getComputedStyle(this.resizable);if(d.flexBasis!=="auto"){var u=this.parentNode;if(u){var h=this.window.getComputedStyle(u).flexDirection;this.flexDir=h.startsWith("row")?"row":"column",c=d.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var p={original:{x:i,y:o,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:ns(ns({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(t.target).cursor||"auto"}),direction:n,flexBasis:c};this.setState(p)}},e.prototype.onMouseMove=function(t){var n=this;if(!(!this.state.isResizing||!this.resizable||!this.window)){if(this.window.TouchEvent&&Sg(t))try{t.preventDefault(),t.stopPropagation()}catch{}var i=this.props,o=i.maxWidth,a=i.maxHeight,c=i.minWidth,d=i.minHeight,u=Sg(t)?t.touches[0].clientX:t.clientX,h=Sg(t)?t.touches[0].clientY:t.clientY,p=this.state,m=p.direction,v=p.original,_=p.width,b=p.height,C=this.getParentSize(),T=m_e(C,this.window.innerWidth,this.window.innerHeight,o,a,c,d);o=T.maxWidth,a=T.maxHeight,c=T.minWidth,d=T.minHeight;var A=this.calculateNewSizeFromDirection(u,h),I=A.newHeight,O=A.newWidth,B=this.calculateNewMaxFromBoundary(o,a);this.props.snap&&this.props.snap.x&&(O=VI(O,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(I=VI(I,this.props.snap.y,this.props.snapGap));var z=this.calculateNewSizeFromAspectRatio(O,I,{width:B.maxWidth,height:B.maxHeight},{width:c,height:d});if(O=z.newWidth,I=z.newHeight,this.props.grid){var R=DI(O,this.props.grid[0],this.props.gridGap?this.props.gridGap[0]:0),Y=DI(I,this.props.grid[1],this.props.gridGap?this.props.gridGap[1]:0),ue=this.props.snapGap||0,le=ue===0||Math.abs(R-O)<=ue?R:O,Te=ue===0||Math.abs(Y-I)<=ue?Y:I;O=le,I=Te}var ke={width:O-v.width,height:I-v.height};if(this.delta=ke,_&&typeof _=="string"){if(_.endsWith("%")){var xe=O/C.width*100;O="".concat(xe,"%")}else if(_.endsWith("vw")){var X=O/this.window.innerWidth*100;O="".concat(X,"vw")}else if(_.endsWith("vh")){var q=O/this.window.innerHeight*100;O="".concat(q,"vh")}}if(b&&typeof b=="string"){if(b.endsWith("%")){var xe=I/C.height*100;I="".concat(xe,"%")}else if(b.endsWith("vw")){var X=I/this.window.innerWidth*100;I="".concat(X,"vw")}else if(b.endsWith("vh")){var q=I/this.window.innerHeight*100;I="".concat(q,"vh")}}var re={width:this.createSizeForCssProperty(O,"width"),height:this.createSizeForCssProperty(I,"height")};this.flexDir==="row"?re.flexBasis=re.width:this.flexDir==="column"&&(re.flexBasis=re.height);var W=this.state.width!==re.width,$=this.state.height!==re.height,L=this.state.flexBasis!==re.flexBasis,D=W||$||L;D&&Uu.flushSync(function(){n.setState(re)}),this.props.onResize&&D&&this.props.onResize(t,m,this.resizable,ke)}},e.prototype.onMouseUp=function(t){var n,i,o=this.state,a=o.isResizing,c=o.direction;o.original,!(!a||!this.resizable)&&(this.props.onResizeStop&&this.props.onResizeStop(t,c,this.resizable,this.delta),this.props.size&&this.setState({width:(n=this.props.size.width)!==null&&n!==void 0?n:"auto",height:(i=this.props.size.height)!==null&&i!==void 0?i:"auto"}),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:ns(ns({},this.state.backgroundStyle),{cursor:"auto"})}))},e.prototype.updateSize=function(t){var n,i;this.setState({width:(n=t.width)!==null&&n!==void 0?n:"auto",height:(i=t.height)!==null&&i!==void 0?i:"auto"})},e.prototype.renderResizer=function(){var t=this,n=this.props,i=n.enable,o=n.handleStyles,a=n.handleClasses,c=n.handleWrapperStyle,d=n.handleWrapperClass,u=n.handleComponent;if(!i)return null;var h=Object.keys(i).map(function(p){return i[p]!==!1?E.jsx(u_e,{direction:p,onResizeStart:t.onResizeStart,replaceStyles:o&&o[p],className:a&&a[p],children:u&&u[p]?u[p]:null},p):null});return E.jsx("div",{className:d,style:c,children:h})},e.prototype.render=function(){var t=this,n=Object.keys(this.props).reduce(function(a,c){return v_e.indexOf(c)!==-1||(a[c]=t.props[c]),a},{}),i=ns(ns(ns({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(i.flexBasis=this.state.flexBasis);var o=this.props.as||"div";return E.jsxs(o,ns({style:i,className:this.props.className},n,{ref:function(a){a&&(t.resizable=a)},children:[this.state.isResizing&&E.jsx("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer()]}))},e.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],gridGap:[0,0],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},e}(x.PureComponent);const __e=gt(Nre).withConfig({shouldForwardProp:r=>r!=="shouldAnimate"})`
3182
3182
  animation: ${({shouldAnimate:r})=>r?"ScrimAnimation ease 0.3s":"none"};
3183
3183
  animation-iteration-count: 1;
3184
3184
  animation-fill-mode: forwards;
@@ -3192,7 +3192,7 @@ cursor: pointer;`),t},Gl=({left:r,right:e,top:t,bottom:n})=>Nt({paddingLeft:r,pa
3192
3192
  opacity: 1;
3193
3193
  }
3194
3194
  }
3195
- `,y_e=gt.div.withConfig({shouldForwardProp:r=>r!=="shouldAnimate"})`
3195
+ `,b_e=gt.div.withConfig({shouldForwardProp:r=>r!=="shouldAnimate"})`
3196
3196
  --side-sheet-height: calc(100vh - var(--header-height, 0));
3197
3197
  height: var(--custom-side-sheet-height, var(--side-sheet-height, 100%));
3198
3198
  position: fixed;
@@ -3209,11 +3209,11 @@ cursor: pointer;`),t},Gl=({left:r,right:e,top:t,bottom:n})=>Nt({paddingLeft:r,pa
3209
3209
  right: 0px;
3210
3210
  }
3211
3211
  }
3212
- `,__e=gt.div`
3212
+ `,w_e=gt.div`
3213
3213
  height: 100%;
3214
3214
  background: #fff; // TODO: token
3215
3215
  width: 100%;
3216
- `,zI=480,b_e=r=>{const{isOpen:e,onClose:t,isDismissable:n,minWidth:i,children:o,animate:a}=r,[c,d]=x.useState(i??zI),u=a===void 0?!0:a;return E.jsx(v_e,{open:e,onClose:t,isDismissable:n,shouldAnimate:u,children:E.jsx(y_e,{shouldAnimate:u,children:E.jsx(g_e,{size:{width:c,height:"100%"},maxWidth:"100vw",minWidth:i??zI,onResizeStop:(h,p,m,v)=>{h.stopPropagation(),h.stopImmediatePropagation(),d(c+v.width)},handleComponent:{left:E.jsxs("svg",{width:"14",height:"25",viewBox:"0 0 14 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[E.jsx("rect",{x:"7.21924",y:"21.274",width:"17",height:"2",transform:"rotate(-90 7.21924 21.274)",fill:"#6F6F6F"}),E.jsx("rect",{x:"11.2192",y:"21.274",width:"17",height:"2",transform:"rotate(-90 11.2192 21.274)",fill:"#6F6F6F"})]})},handleStyles:{left:{position:"absolute",top:"45%",left:"1px"}},children:E.jsx(__e,{children:o})})})})};var bb={exports:{}},mr={};/**
3216
+ `,zI=480,x_e=r=>{const{isOpen:e,onClose:t,isDismissable:n,minWidth:i,children:o,animate:a}=r,[c,d]=x.useState(i??zI),u=a===void 0?!0:a;return E.jsx(__e,{open:e,onClose:t,isDismissable:n,shouldAnimate:u,children:E.jsx(b_e,{shouldAnimate:u,children:E.jsx(y_e,{size:{width:c,height:"100%"},maxWidth:"100vw",minWidth:i??zI,onResizeStop:(h,p,m,v)=>{h.stopPropagation(),h.stopImmediatePropagation(),d(c+v.width)},handleComponent:{left:E.jsxs("svg",{width:"14",height:"25",viewBox:"0 0 14 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[E.jsx("rect",{x:"7.21924",y:"21.274",width:"17",height:"2",transform:"rotate(-90 7.21924 21.274)",fill:"#6F6F6F"}),E.jsx("rect",{x:"11.2192",y:"21.274",width:"17",height:"2",transform:"rotate(-90 11.2192 21.274)",fill:"#6F6F6F"})]})},handleStyles:{left:{position:"absolute",top:"45%",left:"1px"}},children:E.jsx(w_e,{children:o})})})})};var bb={exports:{}},mr={};/**
3217
3217
  * @license React
3218
3218
  * react-is.production.min.js
3219
3219
  *
@@ -3221,19 +3221,19 @@ cursor: pointer;`),t},Gl=({left:r,right:e,top:t,bottom:n})=>Nt({paddingLeft:r,pa
3221
3221
  *
3222
3222
  * This source code is licensed under the MIT license found in the
3223
3223
  * LICENSE file in the root directory of this source tree.
3224
- */var jI;function w_e(){if(jI)return mr;jI=1;var r=Symbol.for("react.element"),e=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),a=Symbol.for("react.context"),c=Symbol.for("react.server_context"),d=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),v=Symbol.for("react.offscreen"),_;_=Symbol.for("react.module.reference");function b(C){if(typeof C=="object"&&C!==null){var T=C.$$typeof;switch(T){case r:switch(C=C.type,C){case t:case i:case n:case u:case h:return C;default:switch(C=C&&C.$$typeof,C){case c:case a:case d:case m:case p:case o:return C;default:return T}}case e:return T}}}return mr.ContextConsumer=a,mr.ContextProvider=o,mr.Element=r,mr.ForwardRef=d,mr.Fragment=t,mr.Lazy=m,mr.Memo=p,mr.Portal=e,mr.Profiler=i,mr.StrictMode=n,mr.Suspense=u,mr.SuspenseList=h,mr.isAsyncMode=function(){return!1},mr.isConcurrentMode=function(){return!1},mr.isContextConsumer=function(C){return b(C)===a},mr.isContextProvider=function(C){return b(C)===o},mr.isElement=function(C){return typeof C=="object"&&C!==null&&C.$$typeof===r},mr.isForwardRef=function(C){return b(C)===d},mr.isFragment=function(C){return b(C)===t},mr.isLazy=function(C){return b(C)===m},mr.isMemo=function(C){return b(C)===p},mr.isPortal=function(C){return b(C)===e},mr.isProfiler=function(C){return b(C)===i},mr.isStrictMode=function(C){return b(C)===n},mr.isSuspense=function(C){return b(C)===u},mr.isSuspenseList=function(C){return b(C)===h},mr.isValidElementType=function(C){return typeof C=="string"||typeof C=="function"||C===t||C===i||C===n||C===u||C===h||C===v||typeof C=="object"&&C!==null&&(C.$$typeof===m||C.$$typeof===p||C.$$typeof===o||C.$$typeof===a||C.$$typeof===d||C.$$typeof===_||C.getModuleId!==void 0)},mr.typeOf=b,mr}var UI;function x_e(){return UI||(UI=1,bb.exports=w_e()),bb.exports}var C_e=x_e();function $Z(r,e=0,t=[]){return x.Children.toArray(r).reduce((n,i,o)=>(C_e.isFragment(i)?n.push.apply(n,$Z(i.props.children,e+1,t.concat(i.key||o))):x.isValidElement(i)?n.push(x.cloneElement(i,{key:t.concat(String(i.key)).join(".")})):(typeof i=="string"||typeof i=="number")&&n.push(i),n),[])}const Jv=gt.div`
3224
+ */var jI;function C_e(){if(jI)return mr;jI=1;var r=Symbol.for("react.element"),e=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),a=Symbol.for("react.context"),c=Symbol.for("react.server_context"),d=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),v=Symbol.for("react.offscreen"),_;_=Symbol.for("react.module.reference");function b(C){if(typeof C=="object"&&C!==null){var T=C.$$typeof;switch(T){case r:switch(C=C.type,C){case t:case i:case n:case u:case h:return C;default:switch(C=C&&C.$$typeof,C){case c:case a:case d:case m:case p:case o:return C;default:return T}}case e:return T}}}return mr.ContextConsumer=a,mr.ContextProvider=o,mr.Element=r,mr.ForwardRef=d,mr.Fragment=t,mr.Lazy=m,mr.Memo=p,mr.Portal=e,mr.Profiler=i,mr.StrictMode=n,mr.Suspense=u,mr.SuspenseList=h,mr.isAsyncMode=function(){return!1},mr.isConcurrentMode=function(){return!1},mr.isContextConsumer=function(C){return b(C)===a},mr.isContextProvider=function(C){return b(C)===o},mr.isElement=function(C){return typeof C=="object"&&C!==null&&C.$$typeof===r},mr.isForwardRef=function(C){return b(C)===d},mr.isFragment=function(C){return b(C)===t},mr.isLazy=function(C){return b(C)===m},mr.isMemo=function(C){return b(C)===p},mr.isPortal=function(C){return b(C)===e},mr.isProfiler=function(C){return b(C)===i},mr.isStrictMode=function(C){return b(C)===n},mr.isSuspense=function(C){return b(C)===u},mr.isSuspenseList=function(C){return b(C)===h},mr.isValidElementType=function(C){return typeof C=="string"||typeof C=="function"||C===t||C===i||C===n||C===u||C===h||C===v||typeof C=="object"&&C!==null&&(C.$$typeof===m||C.$$typeof===p||C.$$typeof===o||C.$$typeof===a||C.$$typeof===d||C.$$typeof===_||C.getModuleId!==void 0)},mr.typeOf=b,mr}var UI;function k_e(){return UI||(UI=1,bb.exports=C_e()),bb.exports}var E_e=k_e();function $Z(r,e=0,t=[]){return x.Children.toArray(r).reduce((n,i,o)=>(E_e.isFragment(i)?n.push.apply(n,$Z(i.props.children,e+1,t.concat(i.key||o))):x.isValidElement(i)?n.push(x.cloneElement(i,{key:t.concat(String(i.key)).join(".")})):(typeof i=="string"||typeof i=="number")&&n.push(i),n),[])}const Jv=gt.div`
3225
3225
  display: flex;
3226
3226
  z-index: 10;
3227
3227
  `,OZ=gt(Jv)`
3228
3228
  flex-direction: column;
3229
- `,k_e=gt(OZ)`
3229
+ `,S_e=gt(OZ)`
3230
3230
  background: ${tt.colors.ui.background__default.hex};
3231
3231
  height: 100%;
3232
- `,E_e=gt(Jv)`
3232
+ `,A_e=gt(Jv)`
3233
3233
  height: var(--side-sheet-header-height, 3rem);
3234
3234
  justify-content: space-between;
3235
3235
  padding: var(--side-sheet-header-padding, 1rem);
3236
- `;Ro.add({close:O8});const pi=r=>{const{onClose:e,children:t,enableFullscreen:n}=r,i=x.useRef(null),o=x.useCallback(()=>{var c;document.fullscreenElement?document.exitFullscreen().catch(d=>console.error(d)):(c=i.current)==null||c.requestFullscreen()},[i]),a=$Z(t).reduce((c,d)=>{if(!lr.isValidElement(d))return c;if(d.type===RZ)c.indicator=d;else if(d.type===MZ)c.title=d;else if(d.type===PZ)c.subTitle=d;else if(d.type===IZ)c.content=d;else if(d.type===TZ)c.actions=lr.cloneElement(d);else throw Error(`unsupported child ${d.type} in SideSheet component`);return c},{});if(!a.title)throw Error("Title Component is required child");if(!a.subTitle)throw Error("SubTitle Component is required child");if(!a.content)throw Error("Content Component is required child");return E.jsx(b_e,{...r,children:E.jsxs(k_e,{ref:i,children:[E.jsxs(E_e,{children:[E.jsxs(Jv,{children:[a.indicator,E.jsxs(OZ,{children:[a.title,a.subTitle]})]}),E.jsxs(Jv,{children:[a.actions,n&&E.jsx(T6,{title:"Full screen",enterDelay:500,children:E.jsx(la,{variant:"ghost_icon",onClick:o,children:E.jsx(a_e,{})})}),E.jsx(T6,{title:"Close",enterDelay:500,children:E.jsx(la,{variant:"ghost_icon",onClick:e,children:E.jsx(Ro,{name:"close"})})})]})]}),a.content]})})};pi.Title=MZ;pi.SubTitle=PZ;pi.Indicator=RZ;pi.Content=IZ;pi.Actions=TZ;const S_e=oo`
3236
+ `;Ro.add({close:O8});const pi=r=>{const{onClose:e,children:t,enableFullscreen:n}=r,i=x.useRef(null),o=x.useCallback(()=>{var c;document.fullscreenElement?document.exitFullscreen().catch(d=>console.error(d)):(c=i.current)==null||c.requestFullscreen()},[i]),a=$Z(t).reduce((c,d)=>{if(!lr.isValidElement(d))return c;if(d.type===RZ)c.indicator=d;else if(d.type===MZ)c.title=d;else if(d.type===PZ)c.subTitle=d;else if(d.type===IZ)c.content=d;else if(d.type===TZ)c.actions=lr.cloneElement(d);else throw Error(`unsupported child ${d.type} in SideSheet component`);return c},{});if(!a.title)throw Error("Title Component is required child");if(!a.subTitle)throw Error("SubTitle Component is required child");if(!a.content)throw Error("Content Component is required child");return E.jsx(x_e,{...r,children:E.jsxs(S_e,{ref:i,children:[E.jsxs(A_e,{children:[E.jsxs(Jv,{children:[a.indicator,E.jsxs(OZ,{children:[a.title,a.subTitle]})]}),E.jsxs(Jv,{children:[a.actions,n&&E.jsx(T6,{title:"Full screen",enterDelay:500,children:E.jsx(la,{variant:"ghost_icon",onClick:o,children:E.jsx(c_e,{})})}),E.jsx(T6,{title:"Close",enterDelay:500,children:E.jsx(la,{variant:"ghost_icon",onClick:e,children:E.jsx(Ro,{name:"close"})})})]})]}),a.content]})})};pi.Title=MZ;pi.SubTitle=PZ;pi.Indicator=RZ;pi.Content=IZ;pi.Actions=TZ;const T_e=oo`
3237
3237
  :host {
3238
3238
  --fwc-avatar-size: 2.5rem;
3239
3239
  --fwc-person-list-item-background: initial;
@@ -3325,7 +3325,7 @@ cursor: pointer;`),t},Gl=({left:r,right:e,top:t,bottom:n})=>Nt({paddingLeft:r,pa
3325
3325
  variant=${oa.Circle}
3326
3326
  icon="image"
3327
3327
  ?inactive=${e}
3328
- ></fwc-skeleton>`}renderTextPlaceholder(e,t){return ye`<fwc-skeleton size="${t}" variant=${oa.Text} ?inactive=${e}></fwc-skeleton>`}getToolbarPlaceholderIconSize(e){return e==="small"?"x-small":"small"}getAccountTypeColorClass(e){switch(e){case mi.Employee:return"fwc-person-type__employee";case mi.Consultant:case mi.Enterprise:return"fwc-person-type__consultant";case mi.External:return"fwc-person-type__external";case mi.ExternalHire:return"fwc-person-type__external-hire"}}getInitial(e){var t;return(t=e==null?void 0:e.substring(0,1))===null||t===void 0?void 0:t.toUpperCase()}renderCirclePlaceholder(e,t){return ye`<fwc-skeleton size="${t}" variant=${oa.Circle} ?inactive=${e}></fwc-skeleton>`}}Yl.styles=[S_e,v9];P([nt({type:String})],Yl.prototype,"azureId",void 0);P([nt({type:String})],Yl.prototype,"upn",void 0);P([nt({type:String})],Yl.prototype,"dataSource",void 0);P([Bl()],Yl.prototype,"intersected",void 0);P([nt({type:String,reflect:!0})],Yl.prototype,"size",void 0);P([nt({type:Boolean,reflect:!0})],Yl.prototype,"clickable",void 0);const A_e="fwc-person-list-item";let BI=class extends Yl{};BI=P([Sr(A_e)],BI);const ZZ=(r,e)=>{const{value:t,error:n}=ks(x.useMemo(()=>r?r==null?void 0:r.features$.pipe(me(o=>Object.values(o))):Pt([]),[r,e]),{initial:Object.values((r==null?void 0:r.features)??{})}),i=x.useCallback((o,a)=>{var d;if(!r)throw new Error("Missing IFeatureFlagProvider.");const c=a===void 0?!((d=r.getFeature(o))!=null&&d.enabled):a;r.toggleFeature({key:o,enabled:c})},[r]);return{features:t,error:n,toggleFeature:i}},T_e=()=>{const{module:r,error:e}=MO("featureFlag"),{features:t,toggleFeature:n,error:i}=ZZ(r);return{features:t,toggleFeature:n,error:i??e}},I_e=()=>{const r=Jw("featureFlag");if(!r)throw Error("Feature flagging is not enabled in the framework");return ZZ(r)},iu={SwitchList:gt.ul`
3328
+ ></fwc-skeleton>`}renderTextPlaceholder(e,t){return ye`<fwc-skeleton size="${t}" variant=${oa.Text} ?inactive=${e}></fwc-skeleton>`}getToolbarPlaceholderIconSize(e){return e==="small"?"x-small":"small"}getAccountTypeColorClass(e){switch(e){case mi.Employee:return"fwc-person-type__employee";case mi.Consultant:case mi.Enterprise:return"fwc-person-type__consultant";case mi.External:return"fwc-person-type__external";case mi.ExternalHire:return"fwc-person-type__external-hire"}}getInitial(e){var t;return(t=e==null?void 0:e.substring(0,1))===null||t===void 0?void 0:t.toUpperCase()}renderCirclePlaceholder(e,t){return ye`<fwc-skeleton size="${t}" variant=${oa.Circle} ?inactive=${e}></fwc-skeleton>`}}Yl.styles=[T_e,v9];P([nt({type:String})],Yl.prototype,"azureId",void 0);P([nt({type:String})],Yl.prototype,"upn",void 0);P([nt({type:String})],Yl.prototype,"dataSource",void 0);P([Bl()],Yl.prototype,"intersected",void 0);P([nt({type:String,reflect:!0})],Yl.prototype,"size",void 0);P([nt({type:Boolean,reflect:!0})],Yl.prototype,"clickable",void 0);const I_e="fwc-person-list-item";let BI=class extends Yl{};BI=P([Sr(I_e)],BI);const ZZ=(r,e)=>{const{value:t,error:n}=ks(x.useMemo(()=>r?r==null?void 0:r.features$.pipe(me(o=>Object.values(o))):Pt([]),[r,e]),{initial:Object.values((r==null?void 0:r.features)??{})}),i=x.useCallback((o,a)=>{var d;if(!r)throw new Error("Missing IFeatureFlagProvider.");const c=a===void 0?!((d=r.getFeature(o))!=null&&d.enabled):a;r.toggleFeature({key:o,enabled:c})},[r]);return{features:t,error:n,toggleFeature:i}},R_e=()=>{const{module:r,error:e}=MO("featureFlag"),{features:t,toggleFeature:n,error:i}=ZZ(r);return{features:t,toggleFeature:n,error:i??e}},P_e=()=>{const r=Jw("featureFlag");if(!r)throw Error("Feature flagging is not enabled in the framework");return ZZ(r)},iu={SwitchList:gt.ul`
3329
3329
  list-style: none;
3330
3330
  padding-left: 0;
3331
3331
  `,SwitchListItem:gt.li`
@@ -3347,18 +3347,18 @@ cursor: pointer;`),t},Gl=({left:r,right:e,top:t,bottom:n})=>Nt({paddingLeft:r,pa
3347
3347
  display: flex;
3348
3348
  justify-content: flex-end;
3349
3349
  transform: scale(0.9);
3350
- `},R_e=()=>{const{features:r,toggleFeature:e}=T_e();return E.jsx(iu.SwitchList,{children:r==null?void 0:r.map(t=>E.jsxs(iu.SwitchListItem,{onClick:()=>e(t.key),children:[E.jsxs(iu.SwitchLabel,{children:[E.jsx(Zu,{variant:"body_short_bold",children:t.title??t.key}),t.description&&E.jsx(Zu,{variant:"body_short_italic",children:t.description})]}),E.jsx(iu.Switch,{children:E.jsx(N8,{checked:t.enabled,disabled:t.readonly})})]},`feat-${t.key}`))})},P_e=()=>{const{features:r,toggleFeature:e}=I_e();return E.jsx(iu.SwitchList,{children:r==null?void 0:r.map(t=>E.jsxs(iu.SwitchListItem,{onClick:()=>e(t.key),children:[E.jsxs(iu.SwitchLabel,{children:[E.jsx(Zu,{variant:"body_short_bold",children:t.title??t.key}),E.jsx(Zu,{variant:"body_short_italic",children:t.description??""})]}),E.jsx(N8,{checked:t.enabled,disabled:t.readonly})]},`feat-${t.key}`))})};Ro.add({arrow_back:Rte,category:Q$});const M_e=({navigate:r})=>{const[e,t]=x.useState(0);return E.jsxs("section",{children:[E.jsx("div",{children:E.jsx("div",{children:E.jsxs(la,{variant:"ghost",onClick:()=>r(),children:[E.jsx(Ro,{name:"arrow_back"}),E.jsx(Ro,{name:"category"}),"My Features"]})})}),E.jsx(H8,{}),E.jsx("div",{children:E.jsxs(Ii,{activeTab:e,onChange:n=>t(n),children:[E.jsxs(Ii.List,{children:[E.jsx(Ii.Tab,{children:"App features"}),E.jsx(Ii.Tab,{children:"Portal features"})]}),E.jsxs(Ii.Panels,{children:[E.jsx(Ii.Panel,{children:E.jsx(R_e,{})}),E.jsx(Ii.Panel,{children:E.jsx(P_e,{})})]})]})})]})};Ro.add({bandage:Tte,category:Q$,work_outline:vte,security:Ste});const qI=gt.ul`
3350
+ `},M_e=()=>{const{features:r,toggleFeature:e}=R_e();return E.jsx(iu.SwitchList,{children:r==null?void 0:r.map(t=>E.jsxs(iu.SwitchListItem,{onClick:()=>e(t.key),children:[E.jsxs(iu.SwitchLabel,{children:[E.jsx(Zu,{variant:"body_short_bold",children:t.title??t.key}),t.description&&E.jsx(Zu,{variant:"body_short_italic",children:t.description})]}),E.jsx(iu.Switch,{children:E.jsx(N8,{checked:t.enabled,disabled:t.readonly})})]},`feat-${t.key}`))})},$_e=()=>{const{features:r,toggleFeature:e}=P_e();return E.jsx(iu.SwitchList,{children:r==null?void 0:r.map(t=>E.jsxs(iu.SwitchListItem,{onClick:()=>e(t.key),children:[E.jsxs(iu.SwitchLabel,{children:[E.jsx(Zu,{variant:"body_short_bold",children:t.title??t.key}),E.jsx(Zu,{variant:"body_short_italic",children:t.description??""})]}),E.jsx(N8,{checked:t.enabled,disabled:t.readonly})]},`feat-${t.key}`))})};Ro.add({arrow_back:Rte,category:Q$});const O_e=({navigate:r})=>{const[e,t]=x.useState(0);return E.jsxs("section",{children:[E.jsx("div",{children:E.jsx("div",{children:E.jsxs(la,{variant:"ghost",onClick:()=>r(),children:[E.jsx(Ro,{name:"arrow_back"}),E.jsx(Ro,{name:"category"}),"My Features"]})})}),E.jsx(H8,{}),E.jsx("div",{children:E.jsxs(Ii,{activeTab:e,onChange:n=>t(n),children:[E.jsxs(Ii.List,{children:[E.jsx(Ii.Tab,{children:"App features"}),E.jsx(Ii.Tab,{children:"Portal features"})]}),E.jsxs(Ii.Panels,{children:[E.jsx(Ii.Panel,{children:E.jsx(M_e,{})}),E.jsx(Ii.Panel,{children:E.jsx($_e,{})})]})]})})]})};Ro.add({bandage:Tte,category:Q$,work_outline:vte,security:Ste});const qI=gt.ul`
3351
3351
  list-style: none;
3352
3352
  padding-left: 0;
3353
3353
  `,KI=gt.li`
3354
3354
  margin: 1em 0;
3355
- `,$_e=({azureId:r,navigate:e})=>E.jsxs("section",{children:[E.jsx(qI,{children:E.jsx(KI,{children:E.jsxs(la,{variant:"ghost",onClick:()=>e("features"),children:[E.jsx(Ro,{name:"category"}),"My Features"]})})}),E.jsx(H8,{}),E.jsx(qI,{children:E.jsx(KI,{children:E.jsxs(la,{variant:"ghost",href:`https://eur.delve.office.com/?u=${r}&v=work`,target:"_blank",children:[E.jsxs("svg",{height:"24",viewBox:"0 0 24 24",width:"24",children:[E.jsx("title",{children:"Delve"}),E.jsx("path",{d:"M22.5 3C22.7031 3 22.8789 3.07422 23.0273 3.22266C23.1758 3.37109 23.25 3.54688 23.25 3.75V20.25C23.25 20.4531 23.1758 20.6289 23.0273 20.7773C22.8789 20.9258 22.7031 21 22.5 21H14.25V23.3438L0.75 20.9883V3.08203L14.25 0.65625V3H22.5ZM7.07812 16.6992C7.52344 16.6992 7.92188 16.6289 8.27344 16.4883C8.625 16.3477 8.9375 16.1602 9.21094 15.9258C9.48438 15.6914 9.71484 15.4102 9.90234 15.082C10.0898 14.7539 10.25 14.4062 10.3828 14.0391C10.5156 13.6719 10.6055 13.293 10.6523 12.9023C10.6992 12.5117 10.7266 12.1289 10.7344 11.7539C10.7344 11.1602 10.6836 10.5859 10.582 10.0312C10.4805 9.47656 10.3008 8.98047 10.043 8.54297C9.78516 8.10547 9.42969 7.75781 8.97656 7.5C8.52344 7.24219 7.95312 7.10938 7.26562 7.10156C6.78906 7.10156 6.3125 7.12891 5.83594 7.18359C5.35938 7.23828 4.88281 7.28906 4.40625 7.33594V16.5117L5.74219 16.6289C6.1875 16.668 6.63281 16.6914 7.07812 16.6992ZM17.25 16.5H14.25V20.25H17.25V16.5ZM17.25 3.75H14.25V15.75H17.25V3.75ZM22.5 9H18V20.25H22.5V9ZM22.5 3.75H18V8.25H22.5V3.75ZM5.89453 8.92969C6.04297 8.91406 6.1875 8.90234 6.32812 8.89453C6.46875 8.88672 6.62109 8.88281 6.78516 8.88281C7.19141 8.88281 7.53125 8.96875 7.80469 9.14062C8.07812 9.3125 8.29688 9.53906 8.46094 9.82031C8.625 10.1016 8.74219 10.4141 8.8125 10.7578C8.88281 11.1016 8.91797 11.4453 8.91797 11.7891C8.91797 12.125 8.88672 12.4766 8.82422 12.8438C8.76172 13.2109 8.64453 13.5508 8.47266 13.8633C8.30078 14.1758 8.08203 14.4297 7.81641 14.625C7.55078 14.8203 7.20312 14.9219 6.77344 14.9297H6.33984C6.19922 14.9297 6.05078 14.9219 5.89453 14.9062V8.92969Z",fill:"currentColor"})]}),"Delve"]})})})]}),O_e=({azureId:r,isOpen:e,onClose:t})=>{const[n,i]=x.useState("landing"),o=x.useMemo(()=>{let c;switch(n){case"features":c=M_e;break;default:c=$_e;break}return c},[n]),a=x.useCallback(c=>{i(c??"default")},[]);return E.jsxs(pi,{isOpen:e,onClose:t,isDismissable:!0,children:[E.jsx(pi.Title,{title:"User settings"}),E.jsx(pi.SubTitle,{subTitle:"Settings for your user in Fusion portal"}),E.jsx(pi.Actions,{}),E.jsx(pi.Content,{children:E.jsxs("section",{style:{paddingLeft:"0.5em"},children:[E.jsx("div",{children:E.jsx("fwc-person-list-item",{azureId:r})}),E.jsx(H8,{}),E.jsx(o,{azureId:r,sheet:n,navigate:a})]})})]})},Z_e=({isOpen:r,onClose:e})=>{const{provider:t,showCreateBookmark:n}=Wl();return E.jsxs(pi,{isOpen:r,onClose:e,isDismissable:!0,enableFullscreen:!0,children:[E.jsx(pi.Indicator,{color:"#258800"}),E.jsx(pi.Title,{title:"Bookmarks"}),E.jsx(pi.SubTitle,{subTitle:"Application bookmarks"}),E.jsx(pi.Actions,{children:E.jsxs(la,{disabled:!(t!=null&&t.canCreateBookmarks),variant:"ghost",onClick:()=>{n(),e()},children:[E.jsx(Ro,{name:"add"})," Add Bookmark"]})}),E.jsx(pi.Content,{children:E.jsx(p3e,{})})]})},L_e=r=>{const{toggleBookmark:e,togglePerson:t,userAzureId:n}=r,i=Wl();return E.jsxs(vs.Actions,{style:{minWidth:48,minHeight:48},children:[E.jsx(la,{onClick:()=>e(o=>!o),variant:"ghost_icon",disabled:!i.provider,title:i.provider?"Bookmarks":"Bookmarks not available, enable in app",children:E.jsx(Ro,{data:X$})}),E.jsx(la,{onClick:()=>t(o=>!o),variant:"ghost_icon",children:E.jsx("fwc-person-avatar",{size:"small",azureId:n,clickable:!1})})]})};Ro.add({menu:Ate,add:W$,tag:X$});const H_e={Title:gt.div`
3355
+ `,Z_e=({azureId:r,navigate:e})=>E.jsxs("section",{children:[E.jsx(qI,{children:E.jsx(KI,{children:E.jsxs(la,{variant:"ghost",onClick:()=>e("features"),children:[E.jsx(Ro,{name:"category"}),"My Features"]})})}),E.jsx(H8,{}),E.jsx(qI,{children:E.jsx(KI,{children:E.jsxs(la,{variant:"ghost",href:`https://eur.delve.office.com/?u=${r}&v=work`,target:"_blank",children:[E.jsxs("svg",{height:"24",viewBox:"0 0 24 24",width:"24",children:[E.jsx("title",{children:"Delve"}),E.jsx("path",{d:"M22.5 3C22.7031 3 22.8789 3.07422 23.0273 3.22266C23.1758 3.37109 23.25 3.54688 23.25 3.75V20.25C23.25 20.4531 23.1758 20.6289 23.0273 20.7773C22.8789 20.9258 22.7031 21 22.5 21H14.25V23.3438L0.75 20.9883V3.08203L14.25 0.65625V3H22.5ZM7.07812 16.6992C7.52344 16.6992 7.92188 16.6289 8.27344 16.4883C8.625 16.3477 8.9375 16.1602 9.21094 15.9258C9.48438 15.6914 9.71484 15.4102 9.90234 15.082C10.0898 14.7539 10.25 14.4062 10.3828 14.0391C10.5156 13.6719 10.6055 13.293 10.6523 12.9023C10.6992 12.5117 10.7266 12.1289 10.7344 11.7539C10.7344 11.1602 10.6836 10.5859 10.582 10.0312C10.4805 9.47656 10.3008 8.98047 10.043 8.54297C9.78516 8.10547 9.42969 7.75781 8.97656 7.5C8.52344 7.24219 7.95312 7.10938 7.26562 7.10156C6.78906 7.10156 6.3125 7.12891 5.83594 7.18359C5.35938 7.23828 4.88281 7.28906 4.40625 7.33594V16.5117L5.74219 16.6289C6.1875 16.668 6.63281 16.6914 7.07812 16.6992ZM17.25 16.5H14.25V20.25H17.25V16.5ZM17.25 3.75H14.25V15.75H17.25V3.75ZM22.5 9H18V20.25H22.5V9ZM22.5 3.75H18V8.25H22.5V3.75ZM5.89453 8.92969C6.04297 8.91406 6.1875 8.90234 6.32812 8.89453C6.46875 8.88672 6.62109 8.88281 6.78516 8.88281C7.19141 8.88281 7.53125 8.96875 7.80469 9.14062C8.07812 9.3125 8.29688 9.53906 8.46094 9.82031C8.625 10.1016 8.74219 10.4141 8.8125 10.7578C8.88281 11.1016 8.91797 11.4453 8.91797 11.7891C8.91797 12.125 8.88672 12.4766 8.82422 12.8438C8.76172 13.2109 8.64453 13.5508 8.47266 13.8633C8.30078 14.1758 8.08203 14.4297 7.81641 14.625C7.55078 14.8203 7.20312 14.9219 6.77344 14.9297H6.33984C6.19922 14.9297 6.05078 14.9219 5.89453 14.9062V8.92969Z",fill:"currentColor"})]}),"Delve"]})})})]}),L_e=({azureId:r,isOpen:e,onClose:t})=>{const[n,i]=x.useState("landing"),o=x.useMemo(()=>{let c;switch(n){case"features":c=O_e;break;default:c=Z_e;break}return c},[n]),a=x.useCallback(c=>{i(c??"default")},[]);return E.jsxs(pi,{isOpen:e,onClose:t,isDismissable:!0,children:[E.jsx(pi.Title,{title:"User settings"}),E.jsx(pi.SubTitle,{subTitle:"Settings for your user in Fusion portal"}),E.jsx(pi.Actions,{}),E.jsx(pi.Content,{children:E.jsxs("section",{style:{paddingLeft:"0.5em"},children:[E.jsx("div",{children:E.jsx("fwc-person-list-item",{azureId:r})}),E.jsx(H8,{}),E.jsx(o,{azureId:r,sheet:n,navigate:a})]})})]})},H_e=({isOpen:r,onClose:e})=>{const{provider:t,showCreateBookmark:n}=Wl();return E.jsxs(pi,{isOpen:r,onClose:e,isDismissable:!0,enableFullscreen:!0,children:[E.jsx(pi.Indicator,{color:"#258800"}),E.jsx(pi.Title,{title:"Bookmarks"}),E.jsx(pi.SubTitle,{subTitle:"Application bookmarks"}),E.jsx(pi.Actions,{children:E.jsxs(la,{disabled:!(t!=null&&t.canCreateBookmarks),variant:"ghost",onClick:()=>{n(),e()},children:[E.jsx(Ro,{name:"add"})," Add Bookmark"]})}),E.jsx(pi.Content,{children:E.jsx(g3e,{})})]})},N_e=r=>{const{toggleBookmark:e,togglePerson:t,userAzureId:n}=r,i=Wl();return E.jsxs(vs.Actions,{style:{minWidth:48,minHeight:48},children:[E.jsx(la,{onClick:()=>e(o=>!o),variant:"ghost_icon",disabled:!i.provider,title:i.provider?"Bookmarks":"Bookmarks not available, enable in app",children:E.jsx(Ro,{data:X$})}),E.jsx(la,{onClick:()=>t(o=>!o),variant:"ghost_icon",children:E.jsx("fwc-person-avatar",{size:"small",azureId:n,clickable:!1})})]})};Ro.add({menu:Ate,add:W$,tag:X$});const D_e={Title:gt.div`
3356
3356
  display: flex;
3357
3357
  align-items: center;
3358
3358
  gap: 0.75rem;
3359
3359
  font-size: 1rem;
3360
3360
  font-weight: 500;
3361
- `},N_e=()=>{var d;const r=$O(),[e,t]=x.useState(!1),[n,i]=x.useState(!1),o=x.useCallback(()=>{i(!1)},[]),{currentApp:a}=r9(),{module:c}=MO("bookmark");return E.jsxs(n3e,{provider:c??void 0,currentApp:a?{appKey:a.appKey,name:(d=a.manifest)==null?void 0:d.displayName}:void 0,currentUser:r?{id:r.localAccountId,name:r.name}:void 0,children:[E.jsxs(vs,{id:"cli-top-bar",sticky:!1,style:{padding:"0 1em",height:48},children:[E.jsx(vs.Header,{children:E.jsxs(H_e.Title,{children:[E.jsx(H0e,{}),E.jsx("span",{children:"Fusion Framework CLI"})]})}),E.jsx(L_e,{userAzureId:r==null?void 0:r.localAccountId,toggleBookmark:i,togglePerson:t}),E.jsx(vs.CustomContent,{children:E.jsx(L0e,{})})]}),E.jsx(Z_e,{isOpen:n,onClose:o}),E.jsx(O_e,{azureId:r==null?void 0:r.localAccountId,isOpen:e,onClose:()=>t(!e)})]})},D_e=(r,e,t,n)=>{var o,a;if(n){const c=((o=t==null?void 0:t.generatePathFromContext)==null?void 0:o.call(t,e,r))??r.replace(n,e.id);return console.debug("🌍 Portal: context changed, navigating to app's context url:",`found context id [${n}] in url, replacing with [${c}]`),c}const i=((a=t==null?void 0:t.generatePathFromContext)==null?void 0:a.call(t,e,r))??`/${e==null?void 0:e.id}`;return console.debug("🌍 Portal: context changed, navigating to app's context url:",`could not find context id in url, navigating to path [${i}]`),i},V_e=()=>{const r=Jw("navigation"),{modules:e}=PO(),{context:t,navigation:n}=e??{};AM((t==null?void 0:t.currentContext$)??Tr,x.useCallback(i=>{var c;if(i===void 0||r===void 0)return;const o=n?n.path.pathname:r.path.pathname;if(console.debug("🌍 Portal:",n?"App has its own navigation, using it to navigate.":"App does not have its own navigation, using portal navigation."),i===null){console.debug("🌍 Portal:","current context was cleared, navigating to root"),n?n.replace("/"):r.replace("/");return}if(i===void 0)return;const a=D_e(o,i,t,((c=t==null?void 0:t.extractContextIdFromPath)==null?void 0:c.call(t,o))??_P(o));n?n.replace({...n.path,pathname:a}):r.replace({...r.path,pathname:a})},[r,n,t]))},wb={ContentContainer:gt.div`
3361
+ `},V_e=()=>{var d;const r=$O(),[e,t]=x.useState(!1),[n,i]=x.useState(!1),o=x.useCallback(()=>{i(!1)},[]),{currentApp:a}=r9(),{module:c}=MO("bookmark");return E.jsxs(o3e,{provider:c??void 0,currentApp:a?{appKey:a.appKey,name:(d=a.manifest)==null?void 0:d.displayName}:void 0,currentUser:r?{id:r.localAccountId,name:r.name}:void 0,children:[E.jsxs(vs,{id:"cli-top-bar",sticky:!1,style:{padding:"0 1em",height:48},children:[E.jsx(vs.Header,{children:E.jsxs(D_e.Title,{children:[E.jsx(D0e,{}),E.jsx("span",{children:"Fusion Framework CLI"})]})}),E.jsx(N_e,{userAzureId:r==null?void 0:r.localAccountId,toggleBookmark:i,togglePerson:t}),E.jsx(vs.CustomContent,{children:E.jsx(N0e,{})})]}),E.jsx(H_e,{isOpen:n,onClose:o}),E.jsx(L_e,{azureId:r==null?void 0:r.localAccountId,isOpen:e,onClose:()=>t(!e)})]})},F_e=(r,e,t,n)=>{var o,a;if(n){const c=((o=t==null?void 0:t.generatePathFromContext)==null?void 0:o.call(t,e,r))??r.replace(n,e.id);return console.debug("🌍 Portal: context changed, navigating to app's context url:",`found context id [${n}] in url, replacing with [${c}]`),c}const i=((a=t==null?void 0:t.generatePathFromContext)==null?void 0:a.call(t,e,r))??`/${e==null?void 0:e.id}`;return console.debug("🌍 Portal: context changed, navigating to app's context url:",`could not find context id in url, navigating to path [${i}]`),i},z_e=()=>{const r=Jw("navigation"),{modules:e}=PO(),{context:t,navigation:n}=e??{};AM((t==null?void 0:t.currentContext$)??Tr,x.useCallback(i=>{var c;if(i===void 0||r===void 0)return;const o=n?n.path.pathname:r.path.pathname;if(console.debug("🌍 Portal:",n?"App has its own navigation, using it to navigate.":"App does not have its own navigation, using portal navigation."),i===null){console.debug("🌍 Portal:","current context was cleared, navigating to root"),n?n.replace("/"):r.replace("/");return}if(i===void 0)return;const a=F_e(o,i,t,((c=t==null?void 0:t.extractContextIdFromPath)==null?void 0:c.call(t,o))??_P(o));n?n.replace({...n.path,pathname:a}):r.replace({...r.path,pathname:a})},[r,n,t]))},wb={ContentContainer:gt.div`
3362
3362
  display: grid;
3363
3363
  grid-template-columns: 1fr;
3364
3364
  grid-template-rows: 48px 1fr;
@@ -3373,7 +3373,7 @@ cursor: pointer;`),t},Gl=({left:r,right:e,top:t,bottom:n})=>Nt({paddingLeft:r,pa
3373
3373
  position: relative;
3374
3374
  max-width: 100%;
3375
3375
  display: grid;
3376
- `},F_e=()=>(sQ({resolveAppPath:r=>`/apps/${r}`}),E.jsxs(wb.ContentContainer,{children:[E.jsx(wb.Head,{children:E.jsx(N_e,{})}),E.jsx(wb.Main,{children:E.jsx(AQ,{})})]})),z_e=()=>{const{appKey:r}=pQ();return r?E.jsx(nne,{appKey:r}):null},j_e=[{path:"/",element:E.jsx(F_e,{}),children:[{path:"apps/:appKey/*",element:E.jsx(z_e,{})}]}],U_e=()=>{const{navigation:r}=jl().modules,[e]=x.useState(()=>r.createRouter(j_e));return V_e(),E.jsx(LQ,{router:e,fallbackElement:E.jsx("p",{children:"wooot"})})},B_e=oo`
3376
+ `},j_e=()=>(sQ({resolveAppPath:r=>`/apps/${r}`}),E.jsxs(wb.ContentContainer,{children:[E.jsx(wb.Head,{children:E.jsx(V_e,{})}),E.jsx(wb.Main,{children:E.jsx(AQ,{})})]})),U_e=()=>{const{appKey:r}=pQ();return r?E.jsx(nne,{appKey:r}):null},B_e=[{path:"/",element:E.jsx(j_e,{}),children:[{path:"apps/:appKey/*",element:E.jsx(U_e,{})}]}],q_e=()=>{const{navigation:r}=jl().modules,[e]=x.useState(()=>r.createRouter(B_e));return z_e(),E.jsx(LQ,{router:e,fallbackElement:E.jsx("p",{children:"wooot"})})},K_e=oo`
3377
3377
  :host([size='small']) {
3378
3378
  --fwc-avatar-size: 2rem;
3379
3379
  --text-resize: 0.9;
@@ -3442,11 +3442,11 @@ cursor: pointer;`),t},Gl=({left:r,right:e,top:t,bottom:n})=>Nt({paddingLeft:r,pa
3442
3442
  variant=${oa.Circle}
3443
3443
  icon="image"
3444
3444
  ?inactive=${e}
3445
- />`}renderTextPlaceholder(e,t){return ye`<fwc-skeleton size="${t}" variant=${oa.Text} ?inactive=${e} />`}getToolbarPlaceholderIconSize(e){switch(e){case"small":return"x-small";case"large":return"medium";default:return"small"}}renderCirclePlaceholder(e,t){return ye`<fwc-skeleton size="${t}" variant=${oa.Circle} ?inactive=${e}></fwc-skeleton>`}}Ps.styles=[B_e,v9];P([nt({type:String})],Ps.prototype,"azureId",void 0);P([nt({type:String})],Ps.prototype,"upn",void 0);P([nt({type:String})],Ps.prototype,"dataSource",void 0);P([nt({type:Function})],Ps.prototype,"heading",void 0);P([nt({type:Function})],Ps.prototype,"subHeading",void 0);P([Bl()],Ps.prototype,"intersected",void 0);P([nt({type:String,reflect:!0})],Ps.prototype,"size",void 0);P([nt({type:Boolean,reflect:!0,converter:{fromAttribute:r=>r===null?!0:r.toLowerCase()!=="false",toAttribute:r=>r?"":"false"}})],Ps.prototype,"showAvatar",void 0);const q_e="fwc-person-table-cell";let GI=class extends Ps{};GI=P([Sr(q_e)],GI);var xp,Kg,Gg;const K_e={[Z2.eventName]:"getDetails",[O2.eventName]:"getInfo",[$2.eventName]:"getPhoto",[L2.eventName]:"search"},G_e=(r,e,t)=>{const n=e[t];n&&(r.detail.result=n(r.detail),r.stopPropagation())},W_e=(r,e)=>(t,n)=>{r.addEventListener(t,i=>{r.resolver&&G_e(i,r.resolver,n)},e)},Y_e=(r,e)=>{const t=new AbortController,n=W_e(r,{capture:!1,passive:!0,signal:t.signal});return Object.entries(e).forEach(([i,o])=>{n(i,o)}),t};class Q_e{constructor(e,t){this.resolver=void 0,xp.set(this,void 0),Kg.set(this,void 0),Gg.set(this,void 0),cc(this,xp,e,"f"),Re(this,xp,"f").addController(this),cc(this,Gg,Object.assign({events:K_e},t),"f")}hostConnected(){cc(this,Kg,Y_e(Re(this,xp,"f"),Re(this,Gg,"f").events),"f")}hostDisconnected(){var e;(e=Re(this,Kg,"f"))===null||e===void 0||e.abort()}}xp=new WeakMap,Kg=new WeakMap,Gg=new WeakMap;class X_e extends Ao{constructor(){super(),this.resolver=void 0,new Q_e(this)}createRenderRoot(){return this}render(){this.style.display="contents"}}const J_e="fwc-person-provider";let WI=class extends X_e{};WI=P([Sr(J_e)],WI);/**
3445
+ />`}renderTextPlaceholder(e,t){return ye`<fwc-skeleton size="${t}" variant=${oa.Text} ?inactive=${e} />`}getToolbarPlaceholderIconSize(e){switch(e){case"small":return"x-small";case"large":return"medium";default:return"small"}}renderCirclePlaceholder(e,t){return ye`<fwc-skeleton size="${t}" variant=${oa.Circle} ?inactive=${e}></fwc-skeleton>`}}Ps.styles=[K_e,v9];P([nt({type:String})],Ps.prototype,"azureId",void 0);P([nt({type:String})],Ps.prototype,"upn",void 0);P([nt({type:String})],Ps.prototype,"dataSource",void 0);P([nt({type:Function})],Ps.prototype,"heading",void 0);P([nt({type:Function})],Ps.prototype,"subHeading",void 0);P([Bl()],Ps.prototype,"intersected",void 0);P([nt({type:String,reflect:!0})],Ps.prototype,"size",void 0);P([nt({type:Boolean,reflect:!0,converter:{fromAttribute:r=>r===null?!0:r.toLowerCase()!=="false",toAttribute:r=>r?"":"false"}})],Ps.prototype,"showAvatar",void 0);const G_e="fwc-person-table-cell";let GI=class extends Ps{};GI=P([Sr(G_e)],GI);var xp,Kg,Gg;const W_e={[Z2.eventName]:"getDetails",[O2.eventName]:"getInfo",[$2.eventName]:"getPhoto",[L2.eventName]:"search"},Y_e=(r,e,t)=>{const n=e[t];n&&(r.detail.result=n(r.detail),r.stopPropagation())},Q_e=(r,e)=>(t,n)=>{r.addEventListener(t,i=>{r.resolver&&Y_e(i,r.resolver,n)},e)},X_e=(r,e)=>{const t=new AbortController,n=Q_e(r,{capture:!1,passive:!0,signal:t.signal});return Object.entries(e).forEach(([i,o])=>{n(i,o)}),t};class J_e{constructor(e,t){this.resolver=void 0,xp.set(this,void 0),Kg.set(this,void 0),Gg.set(this,void 0),cc(this,xp,e,"f"),Re(this,xp,"f").addController(this),cc(this,Gg,Object.assign({events:W_e},t),"f")}hostConnected(){cc(this,Kg,X_e(Re(this,xp,"f"),Re(this,Gg,"f").events),"f")}hostDisconnected(){var e;(e=Re(this,Kg,"f"))===null||e===void 0||e.abort()}}xp=new WeakMap,Kg=new WeakMap,Gg=new WeakMap;class ebe extends Ao{constructor(){super(),this.resolver=void 0,new J_e(this)}createRenderRoot(){return this}render(){this.style.display="contents"}}const tbe="fwc-person-provider";let WI=class extends ebe{};WI=P([Sr(tbe)],WI);/**
3446
3446
  * @license
3447
3447
  * Copyright 2020 Google LLC
3448
3448
  * SPDX-License-Identifier: BSD-3-Clause
3449
- */const{I:ebe}=wne,YI=(r,e)=>(r==null?void 0:r._$litType$)!==void 0,tbe=r=>{var e;return((e=r==null?void 0:r._$litType$)==null?void 0:e.h)!=null},QI=()=>document.createComment(""),Bd=(r,e,t)=>{var o;const n=r._$AA.parentNode,i=e===void 0?r._$AB:e._$AA;if(t===void 0){const a=n.insertBefore(QI(),i),c=n.insertBefore(QI(),i);t=new ebe(a,c,r,r.options)}else{const a=t._$AB.nextSibling,c=t._$AM,d=c!==r;if(d){let u;(o=t._$AQ)==null||o.call(t,r),t._$AM=r,t._$AP!==void 0&&(u=r._$AU)!==c._$AU&&t._$AP(u)}if(a!==i||d){let u=t._$AA;for(;u!==a;){const h=u.nextSibling;n.insertBefore(u,i),u=h}}}return t},Od=(r,e,t=r)=>(r._$AI(e,t),r),rbe={},sw=(r,e=rbe)=>r._$AH=e,cw=r=>r._$AH,xb=r=>{var n;(n=r._$AP)==null||n.call(r,!1,!0);let e=r._$AA;const t=r._$AB.nextSibling;for(;e!==t;){const i=e.nextSibling;e.remove(),e=i}},nbe=r=>{r._$AR()};/**
3449
+ */const{I:rbe}=wne,YI=(r,e)=>(r==null?void 0:r._$litType$)!==void 0,nbe=r=>{var e;return((e=r==null?void 0:r._$litType$)==null?void 0:e.h)!=null},QI=()=>document.createComment(""),Bd=(r,e,t)=>{var o;const n=r._$AA.parentNode,i=e===void 0?r._$AB:e._$AA;if(t===void 0){const a=n.insertBefore(QI(),i),c=n.insertBefore(QI(),i);t=new rbe(a,c,r,r.options)}else{const a=t._$AB.nextSibling,c=t._$AM,d=c!==r;if(d){let u;(o=t._$AQ)==null||o.call(t,r),t._$AM=r,t._$AP!==void 0&&(u=r._$AU)!==c._$AU&&t._$AP(u)}if(a!==i||d){let u=t._$AA;for(;u!==a;){const h=u.nextSibling;n.insertBefore(u,i),u=h}}}return t},Od=(r,e,t=r)=>(r._$AI(e,t),r),ibe={},sw=(r,e=ibe)=>r._$AH=e,cw=r=>r._$AH,xb=r=>{var n;(n=r._$AP)==null||n.call(r,!1,!0);let e=r._$AA;const t=r._$AB.nextSibling;for(;e!==t;){const i=e.nextSibling;e.remove(),e=i}},obe=r=>{r._$AR()};/**
3450
3450
  * @license
3451
3451
  * Copyright 2017 Google LLC
3452
3452
  * SPDX-License-Identifier: BSD-3-Clause
@@ -3454,7 +3454,7 @@ cursor: pointer;`),t},Gl=({left:r,right:e,top:t,bottom:n})=>Nt({paddingLeft:r,pa
3454
3454
  * @license
3455
3455
  * Copyright 2017 Google LLC
3456
3456
  * SPDX-License-Identifier: BSD-3-Clause
3457
- */const eR=r=>tbe(r)?r._$litType$.h:r.strings,ibe=C2(class extends U4{constructor(r){super(r),this.et=new WeakMap}render(r){return[r]}update(r,[e]){const t=YI(this.it)?eR(this.it):null,n=YI(e)?eR(e):null;if(t!==null&&(n===null||t!==n)){const i=cw(r).pop();let o=this.et.get(t);if(o===void 0){const a=document.createDocumentFragment();o=uO(un,a),o.setConnected(!1),this.et.set(t,o)}sw(o,[i]),Bd(o,void 0,i)}if(n!==null){if(t===null||t!==n){const i=this.et.get(n);if(i!==void 0){const o=cw(i).pop();nbe(r),Bd(r,void 0,o),sw(r,[o])}}this.it=e}else this.it=void 0;return this.render(e)}});var ef,Wg,Ft,e4,LZ;class l5 extends CustomEvent{constructor(e){super(l5.eventName,e)}}l5.eventName="select";class obe{constructor(e){ef.add(this),this._isOpen=!1,this.selectedIds=new Set,Wg.set(this,void 0),Ft.set(this,void 0),this._handleGlobalClick=t=>{const n=t.target;n&&!Re(this,Ft,"f").contains(n)&&this.isOpen&&(this.isOpen=!1)},this._handleGlobalKeyUp=t=>{var n;t.key==="Escape"?Re(this,Ft,"f").textInputElement&&(this.isOpen=!1):t.key==="Tab"&&((n=document.activeElement)===null||n===void 0?void 0:n.id)!==Re(this,Ft,"f").id&&(this.isOpen=!1)},this.closeClick=t=>{if(t.type==="keydown"){const i=t;if(i.key!=="Enter"&&i.key!=="Space")return;const o=Re(this,Ft,"f").renderRoot.querySelector(".trailing");o&&o.blur()}Re(this,Ft,"f").textInputElement&&Re(this,Ft,"f").textInputElement.blur(),this.isOpen&&(this.isOpen=!1),Re(this,Wg,"f")&&Re(this,Wg,"f").call(this,t),this.selectedIds.size?this.clear():this.clearInput();const n=new CustomEvent("dropdownClosed",{detail:{date:Date.now()},bubbles:!0});Re(this,Ft,"f").dispatchEvent(n)},cc(this,Ft,e,"f"),Re(this,Ft,"f").addController(this),this.handleSelect=this.handleSelect.bind(this),this.handleKeyup=this.handleKeyup.bind(this)}hostConnected(){this.resolveSelectedPerson(),requestAnimationFrame(()=>{Re(this,Ft,"f").textInputElement&&Re(this,Ft,"f").autofocus&&Re(this,Ft,"f").textInputElement.focus()}),document.body.addEventListener("click",this._handleGlobalClick)}resolveSelectedPerson(){const{selectedPerson:e}=Re(this,Ft,"f"),t=(()=>{var n;return e===null?null:typeof e=="object"?(n=e.azureId)!==null&&n!==void 0?n:e.upn:e})();if(t!==void 0){if(!t)return this.clear();if(t.match("@")){Re(this,Ft,"f").upn=t,Re(this,Ft,"f").azureId=void 0;return}if(t.match(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-5][0-9a-f]{3}-[089ab][0-9a-f]{3}-[0-9a-f]{12}$/i)){Re(this,Ft,"f").azureId=t,Re(this,Ft,"f").upn=void 0;return}}}selectPersonInfo(e){return mc(this,void 0,void 0,function*(){yield Re(this,Ft,"f").updateComplete,this.selectedIds.clear(),this.selectedIds.add(e.azureId),Re(this,ef,"m",e4).call(this,e),Re(this,Ft,"f").requestUpdate()})}hostDisconnected(){document.body.removeEventListener("click",this._handleGlobalClick),document.body.removeEventListener("keyup",this._handleGlobalKeyUp)}handleSelect(e){e.stopPropagation(),!(e.explicitOriginalTarget&&e.explicitOriginalTarget.type==="checkbox")&&(Re(this,ef,"m",LZ).call(this,e.detail.index),Re(this,Ft,"f").requestUpdate())}deSelectPerson(e){return!(e!=null&&e.azureId)||!this.selectedIds.has(e.azureId)?!1:(this.clear(),Re(this,Ft,"f").requestUpdate(),!0)}clearInput(){Re(this,Ft,"f").value="",Re(this,Ft,"f").search="",Re(this,Ft,"f").textInputElement.value="",Re(this,Ft,"f").azureId="",Re(this,Ft,"f").upn=""}clear(){this.clearInput(),this.selectedIds.size&&this.selectedIds.clear(),Re(this,ef,"m",e4).call(this,null)}set isOpen(e){var t,n;this._isOpen=e,this._isOpen?(document.body.addEventListener("keyup",this._handleGlobalKeyUp),(t=Re(this,Ft,"f").textInputElement)===null||t===void 0||t.focus()):(document.body.removeEventListener("keyup",this._handleGlobalKeyUp),(n=Re(this,Ft,"f").textInputElement)===null||n===void 0||n.blur()),Re(this,Ft,"f").requestUpdate()}get isOpen(){return this._isOpen}handleKeyup(e){var t;const n=e.target;if(e.key==="ArrowDown"){this._isOpen&&Re(this,Ft,"f").listItems.length&&((t=Re(this,Ft,"f").listElement)===null||t===void 0||t.focusItemAtIndex(0));return}this.timer&&clearTimeout(this.timer),this.timer=setTimeout(()=>{const i=n.value.trim().toLowerCase();Re(this,Ft,"f").search=i,Re(this,Ft,"f").requestUpdate()},500)}}Wg=new WeakMap,Ft=new WeakMap,ef=new WeakSet,e4=function(e){Re(this,Ft,"f").dispatchEvent(new l5({detail:{selected:e},bubbles:!0}))},LZ=function(e){const t=Re(this,Ft,"f").listItems[e];t||console.debug("Missing element at index:",e);const{dataSource:n}=t,{azureId:i}=n??{};if(!i){console.warn("This should not be possible, is dataSource missing?");return}let o=n||null;Re(this,Ft,"f").multiple?this.selectedIds.has(i)?this.selectedIds.delete(i):this.selectedIds.add(i):(this.isOpen=!1,this.selectedIds.has(i)?(this.selectedIds.clear(),o=null):(this.selectedIds.clear(),this.selectedIds.add(i))),Re(this,ef,"m",e4).call(this,o),(o===null||Re(this,Ft,"f").selectedPerson===null)&&(this.clearInput(),this.selectedIds.clear())};const abe=oo`
3457
+ */const eR=r=>nbe(r)?r._$litType$.h:r.strings,abe=C2(class extends U4{constructor(r){super(r),this.et=new WeakMap}render(r){return[r]}update(r,[e]){const t=YI(this.it)?eR(this.it):null,n=YI(e)?eR(e):null;if(t!==null&&(n===null||t!==n)){const i=cw(r).pop();let o=this.et.get(t);if(o===void 0){const a=document.createDocumentFragment();o=uO(un,a),o.setConnected(!1),this.et.set(t,o)}sw(o,[i]),Bd(o,void 0,i)}if(n!==null){if(t===null||t!==n){const i=this.et.get(n);if(i!==void 0){const o=cw(i).pop();obe(r),Bd(r,void 0,o),sw(r,[o])}}this.it=e}else this.it=void 0;return this.render(e)}});var ef,Wg,Ft,e4,LZ;class l5 extends CustomEvent{constructor(e){super(l5.eventName,e)}}l5.eventName="select";class sbe{constructor(e){ef.add(this),this._isOpen=!1,this.selectedIds=new Set,Wg.set(this,void 0),Ft.set(this,void 0),this._handleGlobalClick=t=>{const n=t.target;n&&!Re(this,Ft,"f").contains(n)&&this.isOpen&&(this.isOpen=!1)},this._handleGlobalKeyUp=t=>{var n;t.key==="Escape"?Re(this,Ft,"f").textInputElement&&(this.isOpen=!1):t.key==="Tab"&&((n=document.activeElement)===null||n===void 0?void 0:n.id)!==Re(this,Ft,"f").id&&(this.isOpen=!1)},this.closeClick=t=>{if(t.type==="keydown"){const i=t;if(i.key!=="Enter"&&i.key!=="Space")return;const o=Re(this,Ft,"f").renderRoot.querySelector(".trailing");o&&o.blur()}Re(this,Ft,"f").textInputElement&&Re(this,Ft,"f").textInputElement.blur(),this.isOpen&&(this.isOpen=!1),Re(this,Wg,"f")&&Re(this,Wg,"f").call(this,t),this.selectedIds.size?this.clear():this.clearInput();const n=new CustomEvent("dropdownClosed",{detail:{date:Date.now()},bubbles:!0});Re(this,Ft,"f").dispatchEvent(n)},cc(this,Ft,e,"f"),Re(this,Ft,"f").addController(this),this.handleSelect=this.handleSelect.bind(this),this.handleKeyup=this.handleKeyup.bind(this)}hostConnected(){this.resolveSelectedPerson(),requestAnimationFrame(()=>{Re(this,Ft,"f").textInputElement&&Re(this,Ft,"f").autofocus&&Re(this,Ft,"f").textInputElement.focus()}),document.body.addEventListener("click",this._handleGlobalClick)}resolveSelectedPerson(){const{selectedPerson:e}=Re(this,Ft,"f"),t=(()=>{var n;return e===null?null:typeof e=="object"?(n=e.azureId)!==null&&n!==void 0?n:e.upn:e})();if(t!==void 0){if(!t)return this.clear();if(t.match("@")){Re(this,Ft,"f").upn=t,Re(this,Ft,"f").azureId=void 0;return}if(t.match(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-5][0-9a-f]{3}-[089ab][0-9a-f]{3}-[0-9a-f]{12}$/i)){Re(this,Ft,"f").azureId=t,Re(this,Ft,"f").upn=void 0;return}}}selectPersonInfo(e){return mc(this,void 0,void 0,function*(){yield Re(this,Ft,"f").updateComplete,this.selectedIds.clear(),this.selectedIds.add(e.azureId),Re(this,ef,"m",e4).call(this,e),Re(this,Ft,"f").requestUpdate()})}hostDisconnected(){document.body.removeEventListener("click",this._handleGlobalClick),document.body.removeEventListener("keyup",this._handleGlobalKeyUp)}handleSelect(e){e.stopPropagation(),!(e.explicitOriginalTarget&&e.explicitOriginalTarget.type==="checkbox")&&(Re(this,ef,"m",LZ).call(this,e.detail.index),Re(this,Ft,"f").requestUpdate())}deSelectPerson(e){return!(e!=null&&e.azureId)||!this.selectedIds.has(e.azureId)?!1:(this.clear(),Re(this,Ft,"f").requestUpdate(),!0)}clearInput(){Re(this,Ft,"f").value="",Re(this,Ft,"f").search="",Re(this,Ft,"f").textInputElement.value="",Re(this,Ft,"f").azureId="",Re(this,Ft,"f").upn=""}clear(){this.clearInput(),this.selectedIds.size&&this.selectedIds.clear(),Re(this,ef,"m",e4).call(this,null)}set isOpen(e){var t,n;this._isOpen=e,this._isOpen?(document.body.addEventListener("keyup",this._handleGlobalKeyUp),(t=Re(this,Ft,"f").textInputElement)===null||t===void 0||t.focus()):(document.body.removeEventListener("keyup",this._handleGlobalKeyUp),(n=Re(this,Ft,"f").textInputElement)===null||n===void 0||n.blur()),Re(this,Ft,"f").requestUpdate()}get isOpen(){return this._isOpen}handleKeyup(e){var t;const n=e.target;if(e.key==="ArrowDown"){this._isOpen&&Re(this,Ft,"f").listItems.length&&((t=Re(this,Ft,"f").listElement)===null||t===void 0||t.focusItemAtIndex(0));return}this.timer&&clearTimeout(this.timer),this.timer=setTimeout(()=>{const i=n.value.trim().toLowerCase();Re(this,Ft,"f").search=i,Re(this,Ft,"f").requestUpdate()},500)}}Wg=new WeakMap,Ft=new WeakMap,ef=new WeakSet,e4=function(e){Re(this,Ft,"f").dispatchEvent(new l5({detail:{selected:e},bubbles:!0}))},LZ=function(e){const t=Re(this,Ft,"f").listItems[e];t||console.debug("Missing element at index:",e);const{dataSource:n}=t,{azureId:i}=n??{};if(!i){console.warn("This should not be possible, is dataSource missing?");return}let o=n||null;Re(this,Ft,"f").multiple?this.selectedIds.has(i)?this.selectedIds.delete(i):this.selectedIds.add(i):(this.isOpen=!1,this.selectedIds.has(i)?(this.selectedIds.clear(),o=null):(this.selectedIds.clear(),this.selectedIds.add(i))),Re(this,ef,"m",e4).call(this,o),(o===null||Re(this,Ft,"f").selectedPerson===null)&&(this.clearInput(),this.selectedIds.clear())};const cbe=oo`
3458
3458
  :host {
3459
3459
  position: relative;
3460
3460
  width: 100%;
@@ -3578,7 +3578,7 @@ cursor: pointer;`),t},Gl=({left:r,right:e,top:t,bottom:n})=>Nt({paddingLeft:r,pa
3578
3578
  --fwc-list-item-ink-color: ${Ne(U.colors.interactive.danger__resting.getVariable("color"))};
3579
3579
  color: ${Ne(U.colors.interactive.danger__resting.getVariable("color"))};
3580
3580
  }
3581
- `,sbe=t9.concat(abe,oo`
3581
+ `,lbe=t9.concat(cbe,oo`
3582
3582
  fwc-list {
3583
3583
  --fwc-list-side-padding: 0.5rem;
3584
3584
  }
@@ -3606,7 +3606,7 @@ cursor: pointer;`),t},Gl=({left:r,right:e,top:t,bottom:n})=>Nt({paddingLeft:r,pa
3606
3606
  #selected-persons li {
3607
3607
  flex: 1 0 auto;
3608
3608
  }
3609
- `);class cbe extends x2{constructor(e){super(e,([t],n)=>{const{signal:i}=n??{};if(!t||(t==null?void 0:t.length)<3)return Promise.resolve([]);if(t&&(t==null?void 0:t.length)>=3){const o=a5(e,new L2({search:t,signal:i}));if(o)return o}return Promise.resolve([])},()=>[e.search]),this.host=e}}class hn extends Ao{constructor(){super(...arguments),this.label="",this.placeholder="",this.variant="page",this.leadingIcon="search",this.trailingIcon="close",this.meta="",this.value="",this.graphic="",this.initialText="Start typing to search",this.multiple=!1,this.dropdownHeight="250px",this.disabled=!1,this.search="",this.selectedPerson=void 0,this.autofocus=!1,this.tasks={info:new c5(this),search:new cbe(this)},this.controllers={element:new obe(this)}}focusTextInput(){requestAnimationFrame(()=>{this.textInputElement&&this.textInputElement.focus()})}updated(e){e.has("selectedPerson")&&this.controllers.element.resolveSelectedPerson()}selectedPersonTask(){this.search||this.selectedPerson&&this.tasks.info.status===Sne.COMPLETE&&(this.controllers.element.selectedIds.size||this.controllers.element.selectPersonInfo(this.tasks.info.value))}renderList(){if(!this.controllers.element.isOpen)return ye``;const e=()=>ye`<fwc-list-item disabled=${!0}>
3609
+ `);class dbe extends x2{constructor(e){super(e,([t],n)=>{const{signal:i}=n??{};if(!t||(t==null?void 0:t.length)<3)return Promise.resolve([]);if(t&&(t==null?void 0:t.length)>=3){const o=a5(e,new L2({search:t,signal:i}));if(o)return o}return Promise.resolve([])},()=>[e.search]),this.host=e}}class hn extends Ao{constructor(){super(...arguments),this.label="",this.placeholder="",this.variant="page",this.leadingIcon="search",this.trailingIcon="close",this.meta="",this.value="",this.graphic="",this.initialText="Start typing to search",this.multiple=!1,this.dropdownHeight="250px",this.disabled=!1,this.search="",this.selectedPerson=void 0,this.autofocus=!1,this.tasks={info:new c5(this),search:new dbe(this)},this.controllers={element:new sbe(this)}}focusTextInput(){requestAnimationFrame(()=>{this.textInputElement&&this.textInputElement.focus()})}updated(e){e.has("selectedPerson")&&this.controllers.element.resolveSelectedPerson()}selectedPersonTask(){this.search||this.selectedPerson&&this.tasks.info.status===Sne.COMPLETE&&(this.controllers.element.selectedIds.size||this.controllers.element.selectPersonInfo(this.tasks.info.value))}renderList(){if(!this.controllers.element.isOpen)return ye``;const e=()=>ye`<fwc-list-item disabled=${!0}>
3610
3610
  <fwc-dots-progress size="small" color="primary" />
3611
3611
  </fwc-list-item>`,t=i=>ye`<fwc-list-item disabled=${!0} class="item-error">
3612
3612
  <span class="item-text"><span class="item-title">${i}</span></span>
@@ -3638,7 +3638,7 @@ cursor: pointer;`),t},Gl=({left:r,right:e,top:t,bottom:n})=>Nt({paddingLeft:r,pa
3638
3638
  `)}
3639
3639
  `;return ye`<fwc-list activatable=${!0} multi=${this.multiple} @action=${this.controllers.element.handleSelect}>
3640
3640
  ${this.tasks.search.render({complete:n,pending:e,error:t})}
3641
- </fwc-list>`}selectedPersonsTemplate(){const{selectedIds:e}=this.controllers.element;if(e.size<1||this.controllers.element.isOpen)return ye``;const t=Array.from(e).map(n=>({azureId:n}));return ye`${ibe(ye`<ul id="selected-persons">
3641
+ </fwc-list>`}selectedPersonsTemplate(){const{selectedIds:e}=this.controllers.element;if(e.size<1||this.controllers.element.isOpen)return ye``;const t=Array.from(e).map(n=>({azureId:n}));return ye`${abe(ye`<ul id="selected-persons">
3642
3642
  ${JI(t,n=>n.azureId,n=>ye`<li>
3643
3643
  <fwc-person-list-item
3644
3644
  size="small"
@@ -3683,4 +3683,4 @@ cursor: pointer;`),t},Gl=({left:r,right:e,top:t,bottom:n})=>Nt({paddingLeft:r,pa
3683
3683
  .list-scroll {
3684
3684
  max-height: ${this.dropdownHeight};
3685
3685
  }
3686
- </style>`}}hn.styles=sbe;P([nt()],hn.prototype,"label",void 0);P([nt()],hn.prototype,"placeholder",void 0);P([nt()],hn.prototype,"variant",void 0);P([nt()],hn.prototype,"leadingIcon",void 0);P([nt({attribute:!1,state:!0})],hn.prototype,"trailingIcon",void 0);P([nt()],hn.prototype,"meta",void 0);P([nt()],hn.prototype,"value",void 0);P([nt()],hn.prototype,"graphic",void 0);P([nt()],hn.prototype,"initialText",void 0);P([nt()],hn.prototype,"multiple",void 0);P([nt()],hn.prototype,"dropdownHeight",void 0);P([nt()],hn.prototype,"disabled",void 0);P([Bl()],hn.prototype,"azureId",void 0);P([Bl()],hn.prototype,"upn",void 0);P([Bl()],hn.prototype,"search",void 0);P([nt({attribute:"selected-person",type:String,converter(r){if(r!=null&&r.length)try{return JSON.parse(r)}catch{if(r!=null&&r.match("@"))return{upn:r.toLocaleLowerCase()};if(r!=null&&r.length)return{azureId:r.toLocaleLowerCase()}}return null}})],hn.prototype,"selectedPerson",void 0);P([nt()],hn.prototype,"autofocus",void 0);P([w2("fwc-textinput")],hn.prototype,"textInputElement",void 0);P([w2("fwc-list")],hn.prototype,"listElement",void 0);P([Ene("fwc-list-item:not([disabled])")],hn.prototype,"listItems",void 0);const lbe="fwc-person-select";let tR=class extends hn{};tR=P([Sr(lbe)],tR);const dbe=r=>{const{resolver:e,children:t}=r,n=x.useRef(null);return x.useEffect(()=>{n.current&&e&&(n.current.resolver=e)},[e]),E.jsx("fwc-person-provider",{ref:n,children:t})},ube={[aa.v2]:["azureUniqueId"],[aa.v4]:["azureUniqueId"]},Ko=r=>e=>{if(typeof e!="object")return!1;const t=Object.keys(e);return ube[aa[r]].every(o=>t.includes(o))},Cb=r=>e=>{var i,o;const{azureId:t,upn:n}=r;return t&&n?((i=e.upn)==null?void 0:i.toLocaleLowerCase())===n.toLocaleLowerCase()&&e.azureUniqueId===t:t?e.azureUniqueId===t:n?((o=e.upn)==null?void 0:o.toLocaleLowerCase())===n.toLocaleLowerCase():!1};var Cf,du,Xm;class hbe{constructor(e,t){Ie(this,Cf);Ie(this,du);Ie(this,Xm);Be(this,Cf,new yi({expire:18e4,queueOperator:"merge",key:({azureId:i})=>i,client:{fn:({azureId:i},o)=>e.get("v4","json$",{azureId:i,expand:["manager","positions"]},{signal:o}).pipe(me(a=>{const{positions:c=[]}=a;return{...a,positions:c.filter(d=>new Date(d.appliesTo)>new Date)}}))}})),Be(this,du,new yi({expire:18e4,queueOperator:"merge",key:({search:i})=>i,client:{fn:({search:i},o)=>e.query("v2","json$",{search:i},{signal:o})}})),Be(this,Xm,new yi({expire:18e4,queueOperator:"merge",key:({azureId:i})=>i,client:{fn:({azureId:i},o)=>e.photo("v2","blob$",{azureId:i},{signal:o}).pipe(me(a=>a.blob),jt(a=>{var c;if(a.name==="ApiProviderError"&&((c=a.response)==null?void 0:c.status)===404&&(t!=null&&t.fallbackImage))return Pt(t==null?void 0:t.fallbackImage);throw a}))}}))}search(e){const{search:t,signal:n}=e;return k(this,du).query({search:t},{signal:n}).pipe(sf)}getPhoto(e){const{azureId:t,upn:n,signal:i}=e;if(t)return this._getPersonPhotoByAzureId(t,i);if(n)return this._getPersonPhotoByUpn(n,i);throw Error("invalid args provided")}getPerson(e){const{azureId:t,upn:n,signal:i}=e;if(t)return this._getPersonByAzureId(t,i);if(n)return this._getPersonByUpn(n,i);throw Error("invalid args provided")}getPersonInfo(e){const{azureId:t,upn:n,signal:i}=e;if(t)return this._getPersonInfoById(t,i);if(n)return this._getPersonInfoByUpn(n,i);throw Error("invalid args provided")}_getPersonByUpn(e,t){const n=t?Sl(t,"abort"):Tr;return El(this._personCache$({upn:e}),this._getPersonInfoByUpn(e,t).pipe(Oe(Ko("v2")),Qt(({azureUniqueId:i})=>this._getPersonByAzureId(i,t)))).pipe(Oe(Ko("v4")),Al(n))}_getPersonByAzureId(e,t){return k(this,Cf).query({azureId:e},{signal:t}).pipe(sf)}_getPersonInfoById(e,t){const n=t?Sl(t,"abort"):Tr;return El(this._personCache$({azureId:e}),this._queryCache$({azureId:e}),this._getPersonByAzureId(e,t)).pipe(Oe(Ko("v2")),Al(n))}_getPersonInfoByUpn(e,t){const n=Cb({upn:e}),i=t?Sl(t,"abort"):Tr;return El(this._personCache$({upn:e}),this._queryCache$({upn:e}),k(this,du).query({search:e},{signal:t}).pipe(me(o=>o.value.find(n)),K1(Ko("v2")))).pipe(K1(Ko("v2")),Oe(Ko("v2")),Oe(Ko("v2")),Al(i))}_getPersonPhotoByAzureId(e,t){return k(this,Xm).query({azureId:e},{signal:t}).pipe(lp(1),me(n=>URL.createObjectURL(n.value)))}_getPersonPhotoByUpn(e,t){return this._getPersonInfoByUpn(e,t).pipe(lp(1),Qt(n=>this._getPersonPhotoByAzureId(n.azureUniqueId,t)))}_personCache$(e){const t=Cb(e);return k(this,Cf).cache.state$.pipe(lp(1),me(n=>{var i;return(i=Object.values(n).find(o=>t(o.value)))==null?void 0:i.value}),K1(Ko("v4")),Oe(Ko("v4")))}_queryCache$(e){const t=Cb(e);return k(this,du).cache.state$.pipe(lp(1),Qt(n=>at(Object.values(n)).pipe(me(i=>i.value.find(o=>t(o))),K1(Ko("v2")))),K1(Ko("v2")),Oe(Ko("v2")))}}Cf=new WeakMap,du=new WeakMap,Xm=new WeakMap;const fbe=r=>({getDetails(e){return Vn(r.getPerson(e).pipe(me(t=>({...t,azureId:t.azureUniqueId}))))},getInfo(e){return Vn(r.getPersonInfo(e).pipe(me(t=>({...t,azureId:t.azureUniqueId}))))},getPhoto(e){return Vn(r.getPhoto(e))},search(e){return Vn(r.search(e).pipe(me(t=>t.map(n=>({...n,azureId:n.azureUniqueId})))))}}),pbe=(r,e)=>x.lazy(async()=>{const t=await r.createPeopleClient(),n=new hbe(t,e),i=fbe(n);return{default:({children:a})=>E.jsx(dbe,{resolver:i,children:a})}}),mbe=r=>{const{children:e,options:t,fallback:n}=r,i=EB("services");if(!i)throw Error("missing service module");const o=x.useMemo(()=>pbe(i,t),[i,t]);return E.jsx(x.Suspense,{fallback:n||null,children:E.jsx(o,{children:e})})},gbe='<svg height="24px" width="24px" fill="#999" viewBox="0 0 24 24" title="person" role="img" xmlns="http://www.w3.org/2000/svg"><rect width="100%" height="100%" fill="#eee" /><path d="M12 4C9.79 4 8 5.79 8 8s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4Zm2 4c0-1.1-.9-2-2-2s-2 .9-2 2 .9 2 2 2 2-.9 2-2Zm4 10c-.2-.71-3.3-2-6-2-2.69 0-5.77 1.28-6 2h12ZM4 18c0-2.66 5.33-4 8-4s8 1.34 8 4v2H4v-2Z" fill-rule="evenodd" clip-rule="evenodd" class="sc-dmqHEX eydzYY"></path></svg>',vbe=document.getElementById("root"),ybe=new Blob([gbe],{type:"image/svg+xml"});bH.createRoot(vbe).render(E.jsx(wG,{theme:U,children:E.jsx(AB,{configure:oQ,fallback:E.jsx(kM,{text:"Loading framework"}),children:E.jsx(mbe,{options:{fallbackImage:ybe},children:E.jsx(U_e,{})})})}));
3686
+ </style>`}}hn.styles=lbe;P([nt()],hn.prototype,"label",void 0);P([nt()],hn.prototype,"placeholder",void 0);P([nt()],hn.prototype,"variant",void 0);P([nt()],hn.prototype,"leadingIcon",void 0);P([nt({attribute:!1,state:!0})],hn.prototype,"trailingIcon",void 0);P([nt()],hn.prototype,"meta",void 0);P([nt()],hn.prototype,"value",void 0);P([nt()],hn.prototype,"graphic",void 0);P([nt()],hn.prototype,"initialText",void 0);P([nt()],hn.prototype,"multiple",void 0);P([nt()],hn.prototype,"dropdownHeight",void 0);P([nt()],hn.prototype,"disabled",void 0);P([Bl()],hn.prototype,"azureId",void 0);P([Bl()],hn.prototype,"upn",void 0);P([Bl()],hn.prototype,"search",void 0);P([nt({attribute:"selected-person",type:String,converter(r){if(r!=null&&r.length)try{return JSON.parse(r)}catch{if(r!=null&&r.match("@"))return{upn:r.toLocaleLowerCase()};if(r!=null&&r.length)return{azureId:r.toLocaleLowerCase()}}return null}})],hn.prototype,"selectedPerson",void 0);P([nt()],hn.prototype,"autofocus",void 0);P([w2("fwc-textinput")],hn.prototype,"textInputElement",void 0);P([w2("fwc-list")],hn.prototype,"listElement",void 0);P([Ene("fwc-list-item:not([disabled])")],hn.prototype,"listItems",void 0);const ube="fwc-person-select";let tR=class extends hn{};tR=P([Sr(ube)],tR);const hbe=r=>{const{resolver:e,children:t}=r,n=x.useRef(null);return x.useEffect(()=>{n.current&&e&&(n.current.resolver=e)},[e]),E.jsx("fwc-person-provider",{ref:n,children:t})},fbe={[aa.v2]:["azureUniqueId"],[aa.v4]:["azureUniqueId"]},Ko=r=>e=>{if(typeof e!="object")return!1;const t=Object.keys(e);return fbe[aa[r]].every(o=>t.includes(o))},Cb=r=>e=>{var i,o;const{azureId:t,upn:n}=r;return t&&n?((i=e.upn)==null?void 0:i.toLocaleLowerCase())===n.toLocaleLowerCase()&&e.azureUniqueId===t:t?e.azureUniqueId===t:n?((o=e.upn)==null?void 0:o.toLocaleLowerCase())===n.toLocaleLowerCase():!1};var Cf,du,Xm;class pbe{constructor(e,t){Ie(this,Cf);Ie(this,du);Ie(this,Xm);Be(this,Cf,new yi({expire:18e4,queueOperator:"merge",key:({azureId:i})=>i,client:{fn:({azureId:i},o)=>e.get("v4","json$",{azureId:i,expand:["manager","positions"]},{signal:o}).pipe(me(a=>{const{positions:c=[]}=a;return{...a,positions:c.filter(d=>new Date(d.appliesTo)>new Date)}}))}})),Be(this,du,new yi({expire:18e4,queueOperator:"merge",key:({search:i})=>i,client:{fn:({search:i},o)=>e.query("v2","json$",{search:i},{signal:o})}})),Be(this,Xm,new yi({expire:18e4,queueOperator:"merge",key:({azureId:i})=>i,client:{fn:({azureId:i},o)=>e.photo("v2","blob$",{azureId:i},{signal:o}).pipe(me(a=>a.blob),jt(a=>{var c;if(a.name==="ApiProviderError"&&((c=a.response)==null?void 0:c.status)===404&&(t!=null&&t.fallbackImage))return Pt(t==null?void 0:t.fallbackImage);throw a}))}}))}search(e){const{search:t,signal:n}=e;return k(this,du).query({search:t},{signal:n}).pipe(sf)}getPhoto(e){const{azureId:t,upn:n,signal:i}=e;if(t)return this._getPersonPhotoByAzureId(t,i);if(n)return this._getPersonPhotoByUpn(n,i);throw Error("invalid args provided")}getPerson(e){const{azureId:t,upn:n,signal:i}=e;if(t)return this._getPersonByAzureId(t,i);if(n)return this._getPersonByUpn(n,i);throw Error("invalid args provided")}getPersonInfo(e){const{azureId:t,upn:n,signal:i}=e;if(t)return this._getPersonInfoById(t,i);if(n)return this._getPersonInfoByUpn(n,i);throw Error("invalid args provided")}_getPersonByUpn(e,t){const n=t?Sl(t,"abort"):Tr;return El(this._personCache$({upn:e}),this._getPersonInfoByUpn(e,t).pipe(Oe(Ko("v2")),Qt(({azureUniqueId:i})=>this._getPersonByAzureId(i,t)))).pipe(Oe(Ko("v4")),Al(n))}_getPersonByAzureId(e,t){return k(this,Cf).query({azureId:e},{signal:t}).pipe(sf)}_getPersonInfoById(e,t){const n=t?Sl(t,"abort"):Tr;return El(this._personCache$({azureId:e}),this._queryCache$({azureId:e}),this._getPersonByAzureId(e,t)).pipe(Oe(Ko("v2")),Al(n))}_getPersonInfoByUpn(e,t){const n=Cb({upn:e}),i=t?Sl(t,"abort"):Tr;return El(this._personCache$({upn:e}),this._queryCache$({upn:e}),k(this,du).query({search:e},{signal:t}).pipe(me(o=>o.value.find(n)),K1(Ko("v2")))).pipe(K1(Ko("v2")),Oe(Ko("v2")),Oe(Ko("v2")),Al(i))}_getPersonPhotoByAzureId(e,t){return k(this,Xm).query({azureId:e},{signal:t}).pipe(lp(1),me(n=>URL.createObjectURL(n.value)))}_getPersonPhotoByUpn(e,t){return this._getPersonInfoByUpn(e,t).pipe(lp(1),Qt(n=>this._getPersonPhotoByAzureId(n.azureUniqueId,t)))}_personCache$(e){const t=Cb(e);return k(this,Cf).cache.state$.pipe(lp(1),me(n=>{var i;return(i=Object.values(n).find(o=>t(o.value)))==null?void 0:i.value}),K1(Ko("v4")),Oe(Ko("v4")))}_queryCache$(e){const t=Cb(e);return k(this,du).cache.state$.pipe(lp(1),Qt(n=>at(Object.values(n)).pipe(me(i=>i.value.find(o=>t(o))),K1(Ko("v2")))),K1(Ko("v2")),Oe(Ko("v2")))}}Cf=new WeakMap,du=new WeakMap,Xm=new WeakMap;const mbe=r=>({getDetails(e){return Vn(r.getPerson(e).pipe(me(t=>({...t,azureId:t.azureUniqueId}))))},getInfo(e){return Vn(r.getPersonInfo(e).pipe(me(t=>({...t,azureId:t.azureUniqueId}))))},getPhoto(e){return Vn(r.getPhoto(e))},search(e){return Vn(r.search(e).pipe(me(t=>t.map(n=>({...n,azureId:n.azureUniqueId})))))}}),gbe=(r,e)=>x.lazy(async()=>{const t=await r.createPeopleClient(),n=new pbe(t,e),i=mbe(n);return{default:({children:a})=>E.jsx(hbe,{resolver:i,children:a})}}),vbe=r=>{const{children:e,options:t,fallback:n}=r,i=EB("services");if(!i)throw Error("missing service module");const o=x.useMemo(()=>gbe(i,t),[i,t]);return E.jsx(x.Suspense,{fallback:n||null,children:E.jsx(o,{children:e})})},ybe='<svg height="24px" width="24px" fill="#999" viewBox="0 0 24 24" title="person" role="img" xmlns="http://www.w3.org/2000/svg"><rect width="100%" height="100%" fill="#eee" /><path d="M12 4C9.79 4 8 5.79 8 8s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4Zm2 4c0-1.1-.9-2-2-2s-2 .9-2 2 .9 2 2 2 2-.9 2-2Zm4 10c-.2-.71-3.3-2-6-2-2.69 0-5.77 1.28-6 2h12ZM4 18c0-2.66 5.33-4 8-4s8 1.34 8 4v2H4v-2Z" fill-rule="evenodd" clip-rule="evenodd" class="sc-dmqHEX eydzYY"></path></svg>',_be=document.getElementById("root"),bbe=new Blob([ybe],{type:"image/svg+xml"});bH.createRoot(_be).render(E.jsx(wG,{theme:U,children:E.jsx(AB,{configure:oQ,fallback:E.jsx(kM,{text:"Loading framework"}),children:E.jsx(vbe,{options:{fallbackImage:bbe},children:E.jsx(q_e,{})})})}));